@shinobiapps/shinobi 0.1.0 → 0.1.1
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/CHANGELOG.md +26 -0
- package/dist/cli.js +19 -2
- package/dist/cli.js.map +1 -1
- package/dist/dashboard/server.d.ts.map +1 -1
- package/dist/dashboard/server.js +23 -4
- package/dist/dashboard/server.js.map +1 -1
- package/dist/dashboard-spa/assets/index-BiTX3zpZ.js +288 -0
- package/dist/dashboard-spa/assets/index-BiTX3zpZ.js.map +1 -0
- package/dist/dashboard-spa/assets/index-CrKsQshV.css +1 -0
- package/dist/dashboard-spa/index.html +2 -2
- package/dist/server/tools/git.js +2 -2
- package/dist/server/tools/git.js.map +1 -1
- package/dist/services/github/webhook.js +1 -1
- package/dist/services/github/webhook.js.map +1 -1
- package/package.json +1 -1
- package/dist/dashboard-spa/assets/index-0vWLEg34.css +0 -1
- package/dist/dashboard-spa/assets/index-Rnhs9802.js +0 -263
- package/dist/dashboard-spa/assets/index-Rnhs9802.js.map +0 -1
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
function Fd(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const l in r)if(l!=="default"&&!(l in e)){const i=Object.getOwnPropertyDescriptor(r,l);i&&Object.defineProperty(e,l,i.get?i:{enumerable:!0,get:()=>r[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(l){if(l.ep)return;l.ep=!0;const i=n(l);fetch(l.href,i)}})();function Ad(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tu={exports:{}},Ts={},nu={exports:{}},I={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var wr=Symbol.for("react.element"),Ud=Symbol.for("react.portal"),Bd=Symbol.for("react.fragment"),Vd=Symbol.for("react.strict_mode"),Wd=Symbol.for("react.profiler"),Hd=Symbol.for("react.provider"),Qd=Symbol.for("react.context"),Kd=Symbol.for("react.forward_ref"),Yd=Symbol.for("react.suspense"),Gd=Symbol.for("react.memo"),Xd=Symbol.for("react.lazy"),_a=Symbol.iterator;function Jd(e){return e===null||typeof e!="object"?null:(e=_a&&e[_a]||e["@@iterator"],typeof e=="function"?e:null)}var ru={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},su=Object.assign,lu={};function Cn(e,t,n){this.props=e,this.context=t,this.refs=lu,this.updater=n||ru}Cn.prototype.isReactComponent={};Cn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Cn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function iu(){}iu.prototype=Cn.prototype;function Si(e,t,n){this.props=e,this.context=t,this.refs=lu,this.updater=n||ru}var bi=Si.prototype=new iu;bi.constructor=Si;su(bi,Cn.prototype);bi.isPureReactComponent=!0;var Ea=Array.isArray,au=Object.prototype.hasOwnProperty,_i={current:null},ou={key:!0,ref:!0,__self:!0,__source:!0};function uu(e,t,n){var r,l={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)au.call(t,r)&&!ou.hasOwnProperty(r)&&(l[r]=t[r]);var o=arguments.length-2;if(o===1)l.children=n;else if(1<o){for(var u=Array(o),f=0;f<o;f++)u[f]=arguments[f+2];l.children=u}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)l[r]===void 0&&(l[r]=o[r]);return{$$typeof:wr,type:e,key:i,ref:a,props:l,_owner:_i.current}}function qd(e,t){return{$$typeof:wr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ei(e){return typeof e=="object"&&e!==null&&e.$$typeof===wr}function Zd(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ca=/\/+/g;function Zs(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Zd(""+e.key):t.toString(36)}function Qr(e,t,n,r,l){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case wr:case Ud:a=!0}}if(a)return a=e,l=l(a),e=r===""?"."+Zs(a,0):r,Ea(l)?(n="",e!=null&&(n=e.replace(Ca,"$&/")+"/"),Qr(l,t,n,"",function(f){return f})):l!=null&&(Ei(l)&&(l=qd(l,n+(!l.key||a&&a.key===l.key?"":(""+l.key).replace(Ca,"$&/")+"/")+e)),t.push(l)),1;if(a=0,r=r===""?".":r+":",Ea(e))for(var o=0;o<e.length;o++){i=e[o];var u=r+Zs(i,o);a+=Qr(i,t,n,u,l)}else if(u=Jd(e),typeof u=="function")for(e=u.call(e),o=0;!(i=e.next()).done;)i=i.value,u=r+Zs(i,o++),a+=Qr(i,t,n,u,l);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Pr(e,t,n){if(e==null)return e;var r=[],l=0;return Qr(e,r,"","",function(i){return t.call(n,i,l++)}),r}function ef(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ye={current:null},Kr={transition:null},tf={ReactCurrentDispatcher:ye,ReactCurrentBatchConfig:Kr,ReactCurrentOwner:_i};function cu(){throw Error("act(...) is not supported in production builds of React.")}I.Children={map:Pr,forEach:function(e,t,n){Pr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Pr(e,function(){t++}),t},toArray:function(e){return Pr(e,function(t){return t})||[]},only:function(e){if(!Ei(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};I.Component=Cn;I.Fragment=Bd;I.Profiler=Wd;I.PureComponent=Si;I.StrictMode=Vd;I.Suspense=Yd;I.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tf;I.act=cu;I.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=su({},e.props),l=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=_i.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(u in t)au.call(t,u)&&!ou.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&o!==void 0?o[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){o=Array(u);for(var f=0;f<u;f++)o[f]=arguments[f+2];r.children=o}return{$$typeof:wr,type:e.type,key:l,ref:i,props:r,_owner:a}};I.createContext=function(e){return e={$$typeof:Qd,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Hd,_context:e},e.Consumer=e};I.createElement=uu;I.createFactory=function(e){var t=uu.bind(null,e);return t.type=e,t};I.createRef=function(){return{current:null}};I.forwardRef=function(e){return{$$typeof:Kd,render:e}};I.isValidElement=Ei;I.lazy=function(e){return{$$typeof:Xd,_payload:{_status:-1,_result:e},_init:ef}};I.memo=function(e,t){return{$$typeof:Gd,type:e,compare:t===void 0?null:t}};I.startTransition=function(e){var t=Kr.transition;Kr.transition={};try{e()}finally{Kr.transition=t}};I.unstable_act=cu;I.useCallback=function(e,t){return ye.current.useCallback(e,t)};I.useContext=function(e){return ye.current.useContext(e)};I.useDebugValue=function(){};I.useDeferredValue=function(e){return ye.current.useDeferredValue(e)};I.useEffect=function(e,t){return ye.current.useEffect(e,t)};I.useId=function(){return ye.current.useId()};I.useImperativeHandle=function(e,t,n){return ye.current.useImperativeHandle(e,t,n)};I.useInsertionEffect=function(e,t){return ye.current.useInsertionEffect(e,t)};I.useLayoutEffect=function(e,t){return ye.current.useLayoutEffect(e,t)};I.useMemo=function(e,t){return ye.current.useMemo(e,t)};I.useReducer=function(e,t,n){return ye.current.useReducer(e,t,n)};I.useRef=function(e){return ye.current.useRef(e)};I.useState=function(e){return ye.current.useState(e)};I.useSyncExternalStore=function(e,t,n){return ye.current.useSyncExternalStore(e,t,n)};I.useTransition=function(){return ye.current.useTransition()};I.version="18.3.1";nu.exports=I;var g=nu.exports;const nf=Ad(g),rf=Fd({__proto__:null,default:nf},[g]);/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var sf=g,lf=Symbol.for("react.element"),af=Symbol.for("react.fragment"),of=Object.prototype.hasOwnProperty,uf=sf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,cf={key:!0,ref:!0,__self:!0,__source:!0};function du(e,t,n){var r,l={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)of.call(t,r)&&!cf.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:lf,type:e,key:i,ref:a,props:l,_owner:uf.current}}Ts.Fragment=af;Ts.jsx=du;Ts.jsxs=du;tu.exports=Ts;var s=tu.exports,fu={exports:{}},Le={},pu={exports:{}},mu={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(T,M){var O=T.length;T.push(M);e:for(;0<O;){var Z=O-1>>>1,ae=T[Z];if(0<l(ae,M))T[Z]=M,T[O]=ae,O=Z;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var M=T[0],O=T.pop();if(O!==M){T[0]=O;e:for(var Z=0,ae=T.length,Er=ae>>>1;Z<Er;){var Ot=2*(Z+1)-1,qs=T[Ot],zt=Ot+1,Cr=T[zt];if(0>l(qs,O))zt<ae&&0>l(Cr,qs)?(T[Z]=Cr,T[zt]=O,Z=zt):(T[Z]=qs,T[Ot]=O,Z=Ot);else if(zt<ae&&0>l(Cr,O))T[Z]=Cr,T[zt]=O,Z=zt;else break e}}return M}function l(T,M){var O=T.sortIndex-M.sortIndex;return O!==0?O:T.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var u=[],f=[],p=1,d=null,x=3,w=!1,v=!1,j=!1,y=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(T){for(var M=n(f);M!==null;){if(M.callback===null)r(f);else if(M.startTime<=T)r(f),M.sortIndex=M.expirationTime,t(u,M);else break;M=n(f)}}function k(T){if(j=!1,h(T),!v)if(n(u)!==null)v=!0,Xs(b);else{var M=n(f);M!==null&&Js(k,M.startTime-T)}}function b(T,M){v=!1,j&&(j=!1,m(E),E=-1),w=!0;var O=x;try{for(h(M),d=n(u);d!==null&&(!(d.expirationTime>M)||T&&!C());){var Z=d.callback;if(typeof Z=="function"){d.callback=null,x=d.priorityLevel;var ae=Z(d.expirationTime<=M);M=e.unstable_now(),typeof ae=="function"?d.callback=ae:d===n(u)&&r(u),h(M)}else r(u);d=n(u)}if(d!==null)var Er=!0;else{var Ot=n(f);Ot!==null&&Js(k,Ot.startTime-M),Er=!1}return Er}finally{d=null,x=O,w=!1}}var N=!1,_=null,E=-1,F=5,L=-1;function C(){return!(e.unstable_now()-L<F)}function ie(){if(_!==null){var T=e.unstable_now();L=T;var M=!0;try{M=_(!0,T)}finally{M?Mn():(N=!1,_=null)}}else N=!1}var Mn;if(typeof c=="function")Mn=function(){c(ie)};else if(typeof MessageChannel<"u"){var ba=new MessageChannel,Dd=ba.port2;ba.port1.onmessage=ie,Mn=function(){Dd.postMessage(null)}}else Mn=function(){y(ie,0)};function Xs(T){_=T,N||(N=!0,Mn())}function Js(T,M){E=y(function(){T(e.unstable_now())},M)}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(T){T.callback=null},e.unstable_continueExecution=function(){v||w||(v=!0,Xs(b))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(T){switch(x){case 1:case 2:case 3:var M=3;break;default:M=x}var O=x;x=M;try{return T()}finally{x=O}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,M){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var O=x;x=T;try{return M()}finally{x=O}},e.unstable_scheduleCallback=function(T,M,O){var Z=e.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?Z+O:Z):O=Z,T){case 1:var ae=-1;break;case 2:ae=250;break;case 5:ae=1073741823;break;case 4:ae=1e4;break;default:ae=5e3}return ae=O+ae,T={id:p++,callback:M,priorityLevel:T,startTime:O,expirationTime:ae,sortIndex:-1},O>Z?(T.sortIndex=O,t(f,T),n(u)===null&&T===n(f)&&(j?(m(E),E=-1):j=!0,Js(k,O-Z))):(T.sortIndex=ae,t(u,T),v||w||(v=!0,Xs(b))),T},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(T){var M=x;return function(){var O=x;x=M;try{return T.apply(this,arguments)}finally{x=O}}}})(mu);pu.exports=mu;var df=pu.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var ff=g,Te=df;function S(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 hu=new Set,tr={};function Gt(e,t){jn(e,t),jn(e+"Capture",t)}function jn(e,t){for(tr[e]=t,e=0;e<t.length;e++)hu.add(t[e])}var rt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_l=Object.prototype.hasOwnProperty,pf=/^[: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]*$/,Pa={},Ta={};function mf(e){return _l.call(Ta,e)?!0:_l.call(Pa,e)?!1:pf.test(e)?Ta[e]=!0:(Pa[e]=!0,!1)}function hf(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function xf(e,t,n,r){if(t===null||typeof t>"u"||hf(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function je(e,t,n,r,l,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var fe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){fe[e]=new je(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];fe[t]=new je(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){fe[e]=new je(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){fe[e]=new je(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){fe[e]=new je(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){fe[e]=new je(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){fe[e]=new je(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){fe[e]=new je(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){fe[e]=new je(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ci=/[\-:]([a-z])/g;function Pi(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ci,Pi);fe[t]=new je(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(Ci,Pi);fe[t]=new je(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(Ci,Pi);fe[t]=new je(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){fe[e]=new je(e,1,!1,e.toLowerCase(),null,!1,!1)});fe.xlinkHref=new je("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){fe[e]=new je(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ti(e,t,n,r){var l=fe.hasOwnProperty(t)?fe[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(xf(t,n,l,r)&&(n=null),r||l===null?mf(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=n===null?l.type===3?!1:"":n:(t=l.attributeName,r=l.attributeNamespace,n===null?e.removeAttribute(t):(l=l.type,n=l===3||l===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var ot=ff.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Tr=Symbol.for("react.element"),tn=Symbol.for("react.portal"),nn=Symbol.for("react.fragment"),Li=Symbol.for("react.strict_mode"),El=Symbol.for("react.profiler"),xu=Symbol.for("react.provider"),vu=Symbol.for("react.context"),Mi=Symbol.for("react.forward_ref"),Cl=Symbol.for("react.suspense"),Pl=Symbol.for("react.suspense_list"),Ri=Symbol.for("react.memo"),dt=Symbol.for("react.lazy"),gu=Symbol.for("react.offscreen"),La=Symbol.iterator;function Rn(e){return e===null||typeof e!="object"?null:(e=La&&e[La]||e["@@iterator"],typeof e=="function"?e:null)}var Y=Object.assign,el;function Bn(e){if(el===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);el=t&&t[1]||""}return`
|
|
34
|
+
`+el+e}var tl=!1;function nl(e,t){if(!e||tl)return"";tl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(f){var r=f}Reflect.construct(e,[],t)}else{try{t.call()}catch(f){r=f}e.call(t.prototype)}else{try{throw Error()}catch(f){r=f}e()}}catch(f){if(f&&r&&typeof f.stack=="string"){for(var l=f.stack.split(`
|
|
35
|
+
`),i=r.stack.split(`
|
|
36
|
+
`),a=l.length-1,o=i.length-1;1<=a&&0<=o&&l[a]!==i[o];)o--;for(;1<=a&&0<=o;a--,o--)if(l[a]!==i[o]){if(a!==1||o!==1)do if(a--,o--,0>o||l[a]!==i[o]){var u=`
|
|
37
|
+
`+l[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=a&&0<=o);break}}}finally{tl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bn(e):""}function vf(e){switch(e.tag){case 5:return Bn(e.type);case 16:return Bn("Lazy");case 13:return Bn("Suspense");case 19:return Bn("SuspenseList");case 0:case 2:case 15:return e=nl(e.type,!1),e;case 11:return e=nl(e.type.render,!1),e;case 1:return e=nl(e.type,!0),e;default:return""}}function Tl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case nn:return"Fragment";case tn:return"Portal";case El:return"Profiler";case Li:return"StrictMode";case Cl:return"Suspense";case Pl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vu:return(e.displayName||"Context")+".Consumer";case xu:return(e._context.displayName||"Context")+".Provider";case Mi:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ri:return t=e.displayName||null,t!==null?t:Tl(e.type)||"Memo";case dt:t=e._payload,e=e._init;try{return Tl(e(t))}catch{}}return null}function gf(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Tl(t);case 8:return t===Li?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Et(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function yf(e){var t=yu(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Lr(e){e._valueTracker||(e._valueTracker=yf(e))}function ju(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=yu(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ss(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ll(e,t){var n=t.checked;return Y({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ma(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Et(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function wu(e,t){t=t.checked,t!=null&&Ti(e,"checked",t,!1)}function Ml(e,t){wu(e,t);var n=Et(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Rl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Rl(e,t.type,Et(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ra(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Rl(e,t,n){(t!=="number"||ss(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Vn=Array.isArray;function mn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Et(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Ol(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(S(91));return Y({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Oa(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(S(92));if(Vn(n)){if(1<n.length)throw Error(S(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Et(n)}}function ku(e,t){var n=Et(t.value),r=Et(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function za(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Nu(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 zl(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Nu(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Mr,Su=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Mr=Mr||document.createElement("div"),Mr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Mr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qn={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},jf=["Webkit","ms","Moz","O"];Object.keys(Qn).forEach(function(e){jf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qn[t]=Qn[e]})});function bu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Qn.hasOwnProperty(e)&&Qn[e]?(""+t).trim():t+"px"}function _u(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=bu(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var wf=Y({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 Il(e,t){if(t){if(wf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(S(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(S(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(S(61))}if(t.style!=null&&typeof t.style!="object")throw Error(S(62))}}function $l(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Dl=null;function Oi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fl=null,hn=null,xn=null;function Ia(e){if(e=Sr(e)){if(typeof Fl!="function")throw Error(S(280));var t=e.stateNode;t&&(t=zs(t),Fl(e.stateNode,e.type,t))}}function Eu(e){hn?xn?xn.push(e):xn=[e]:hn=e}function Cu(){if(hn){var e=hn,t=xn;if(xn=hn=null,Ia(e),t)for(e=0;e<t.length;e++)Ia(t[e])}}function Pu(e,t){return e(t)}function Tu(){}var rl=!1;function Lu(e,t,n){if(rl)return e(t,n);rl=!0;try{return Pu(e,t,n)}finally{rl=!1,(hn!==null||xn!==null)&&(Tu(),Cu())}}function rr(e,t){var n=e.stateNode;if(n===null)return null;var r=zs(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(S(231,t,typeof n));return n}var Al=!1;if(rt)try{var On={};Object.defineProperty(On,"passive",{get:function(){Al=!0}}),window.addEventListener("test",On,On),window.removeEventListener("test",On,On)}catch{Al=!1}function kf(e,t,n,r,l,i,a,o,u){var f=Array.prototype.slice.call(arguments,3);try{t.apply(n,f)}catch(p){this.onError(p)}}var Kn=!1,ls=null,is=!1,Ul=null,Nf={onError:function(e){Kn=!0,ls=e}};function Sf(e,t,n,r,l,i,a,o,u){Kn=!1,ls=null,kf.apply(Nf,arguments)}function bf(e,t,n,r,l,i,a,o,u){if(Sf.apply(this,arguments),Kn){if(Kn){var f=ls;Kn=!1,ls=null}else throw Error(S(198));is||(is=!0,Ul=f)}}function Xt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Mu(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function $a(e){if(Xt(e)!==e)throw Error(S(188))}function _f(e){var t=e.alternate;if(!t){if(t=Xt(e),t===null)throw Error(S(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var i=l.alternate;if(i===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===n)return $a(l),e;if(i===r)return $a(l),t;i=i.sibling}throw Error(S(188))}if(n.return!==r.return)n=l,r=i;else{for(var a=!1,o=l.child;o;){if(o===n){a=!0,n=l,r=i;break}if(o===r){a=!0,r=l,n=i;break}o=o.sibling}if(!a){for(o=i.child;o;){if(o===n){a=!0,n=i,r=l;break}if(o===r){a=!0,r=i,n=l;break}o=o.sibling}if(!a)throw Error(S(189))}}if(n.alternate!==r)throw Error(S(190))}if(n.tag!==3)throw Error(S(188));return n.stateNode.current===n?e:t}function Ru(e){return e=_f(e),e!==null?Ou(e):null}function Ou(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ou(e);if(t!==null)return t;e=e.sibling}return null}var zu=Te.unstable_scheduleCallback,Da=Te.unstable_cancelCallback,Ef=Te.unstable_shouldYield,Cf=Te.unstable_requestPaint,ee=Te.unstable_now,Pf=Te.unstable_getCurrentPriorityLevel,zi=Te.unstable_ImmediatePriority,Iu=Te.unstable_UserBlockingPriority,as=Te.unstable_NormalPriority,Tf=Te.unstable_LowPriority,$u=Te.unstable_IdlePriority,Ls=null,Xe=null;function Lf(e){if(Xe&&typeof Xe.onCommitFiberRoot=="function")try{Xe.onCommitFiberRoot(Ls,e,void 0,(e.current.flags&128)===128)}catch{}}var We=Math.clz32?Math.clz32:Of,Mf=Math.log,Rf=Math.LN2;function Of(e){return e>>>=0,e===0?32:31-(Mf(e)/Rf|0)|0}var Rr=64,Or=4194304;function Wn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function os(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var o=a&~l;o!==0?r=Wn(o):(i&=a,i!==0&&(r=Wn(i)))}else a=n&~l,a!==0?r=Wn(a):i!==0&&(r=Wn(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-We(t),l=1<<n,r|=e[n],t&=~l;return r}function zf(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function If(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-We(i),o=1<<a,u=l[a];u===-1?(!(o&n)||o&r)&&(l[a]=zf(o,t)):u<=t&&(e.expiredLanes|=o),i&=~o}}function Bl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Du(){var e=Rr;return Rr<<=1,!(Rr&4194240)&&(Rr=64),e}function sl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function kr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-We(t),e[t]=n}function $f(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 l=31-We(n),i=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~i}}function Ii(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-We(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var A=0;function Fu(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Au,$i,Uu,Bu,Vu,Vl=!1,zr=[],gt=null,yt=null,jt=null,sr=new Map,lr=new Map,pt=[],Df="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 Fa(e,t){switch(e){case"focusin":case"focusout":gt=null;break;case"dragenter":case"dragleave":yt=null;break;case"mouseover":case"mouseout":jt=null;break;case"pointerover":case"pointerout":sr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":lr.delete(t.pointerId)}}function zn(e,t,n,r,l,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[l]},t!==null&&(t=Sr(t),t!==null&&$i(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Ff(e,t,n,r,l){switch(t){case"focusin":return gt=zn(gt,e,t,n,r,l),!0;case"dragenter":return yt=zn(yt,e,t,n,r,l),!0;case"mouseover":return jt=zn(jt,e,t,n,r,l),!0;case"pointerover":var i=l.pointerId;return sr.set(i,zn(sr.get(i)||null,e,t,n,r,l)),!0;case"gotpointercapture":return i=l.pointerId,lr.set(i,zn(lr.get(i)||null,e,t,n,r,l)),!0}return!1}function Wu(e){var t=Dt(e.target);if(t!==null){var n=Xt(t);if(n!==null){if(t=n.tag,t===13){if(t=Mu(n),t!==null){e.blockedOn=t,Vu(e.priority,function(){Uu(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Yr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Wl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Dl=r,n.target.dispatchEvent(r),Dl=null}else return t=Sr(n),t!==null&&$i(t),e.blockedOn=n,!1;t.shift()}return!0}function Aa(e,t,n){Yr(e)&&n.delete(t)}function Af(){Vl=!1,gt!==null&&Yr(gt)&&(gt=null),yt!==null&&Yr(yt)&&(yt=null),jt!==null&&Yr(jt)&&(jt=null),sr.forEach(Aa),lr.forEach(Aa)}function In(e,t){e.blockedOn===t&&(e.blockedOn=null,Vl||(Vl=!0,Te.unstable_scheduleCallback(Te.unstable_NormalPriority,Af)))}function ir(e){function t(l){return In(l,e)}if(0<zr.length){In(zr[0],e);for(var n=1;n<zr.length;n++){var r=zr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(gt!==null&&In(gt,e),yt!==null&&In(yt,e),jt!==null&&In(jt,e),sr.forEach(t),lr.forEach(t),n=0;n<pt.length;n++)r=pt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<pt.length&&(n=pt[0],n.blockedOn===null);)Wu(n),n.blockedOn===null&&pt.shift()}var vn=ot.ReactCurrentBatchConfig,us=!0;function Uf(e,t,n,r){var l=A,i=vn.transition;vn.transition=null;try{A=1,Di(e,t,n,r)}finally{A=l,vn.transition=i}}function Bf(e,t,n,r){var l=A,i=vn.transition;vn.transition=null;try{A=4,Di(e,t,n,r)}finally{A=l,vn.transition=i}}function Di(e,t,n,r){if(us){var l=Wl(e,t,n,r);if(l===null)ml(e,t,r,cs,n),Fa(e,r);else if(Ff(l,e,t,n,r))r.stopPropagation();else if(Fa(e,r),t&4&&-1<Df.indexOf(e)){for(;l!==null;){var i=Sr(l);if(i!==null&&Au(i),i=Wl(e,t,n,r),i===null&&ml(e,t,r,cs,n),i===l)break;l=i}l!==null&&r.stopPropagation()}else ml(e,t,r,null,n)}}var cs=null;function Wl(e,t,n,r){if(cs=null,e=Oi(r),e=Dt(e),e!==null)if(t=Xt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Mu(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return cs=e,null}function Hu(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(Pf()){case zi:return 1;case Iu:return 4;case as:case Tf:return 16;case $u:return 536870912;default:return 16}default:return 16}}var ht=null,Fi=null,Gr=null;function Qu(){if(Gr)return Gr;var e,t=Fi,n=t.length,r,l="value"in ht?ht.value:ht.textContent,i=l.length;for(e=0;e<n&&t[e]===l[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===l[i-r];r++);return Gr=l.slice(e,1<r?1-r:void 0)}function Xr(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ir(){return!0}function Ua(){return!1}function Me(e){function t(n,r,l,i,a){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ir:Ua,this.isPropagationStopped=Ua,this}return Y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ir)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ir)},persist:function(){},isPersistent:Ir}),t}var Pn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ai=Me(Pn),Nr=Y({},Pn,{view:0,detail:0}),Vf=Me(Nr),ll,il,$n,Ms=Y({},Nr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ui,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==$n&&($n&&e.type==="mousemove"?(ll=e.screenX-$n.screenX,il=e.screenY-$n.screenY):il=ll=0,$n=e),ll)},movementY:function(e){return"movementY"in e?e.movementY:il}}),Ba=Me(Ms),Wf=Y({},Ms,{dataTransfer:0}),Hf=Me(Wf),Qf=Y({},Nr,{relatedTarget:0}),al=Me(Qf),Kf=Y({},Pn,{animationName:0,elapsedTime:0,pseudoElement:0}),Yf=Me(Kf),Gf=Y({},Pn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Xf=Me(Gf),Jf=Y({},Pn,{data:0}),Va=Me(Jf),qf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zf={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"},ep={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ep[e])?!!t[e]:!1}function Ui(){return tp}var np=Y({},Nr,{key:function(e){if(e.key){var t=qf[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Xr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Zf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ui,charCode:function(e){return e.type==="keypress"?Xr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Xr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rp=Me(np),sp=Y({},Ms,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wa=Me(sp),lp=Y({},Nr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ui}),ip=Me(lp),ap=Y({},Pn,{propertyName:0,elapsedTime:0,pseudoElement:0}),op=Me(ap),up=Y({},Ms,{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}),cp=Me(up),dp=[9,13,27,32],Bi=rt&&"CompositionEvent"in window,Yn=null;rt&&"documentMode"in document&&(Yn=document.documentMode);var fp=rt&&"TextEvent"in window&&!Yn,Ku=rt&&(!Bi||Yn&&8<Yn&&11>=Yn),Ha=" ",Qa=!1;function Yu(e,t){switch(e){case"keyup":return dp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var rn=!1;function pp(e,t){switch(e){case"compositionend":return Gu(t);case"keypress":return t.which!==32?null:(Qa=!0,Ha);case"textInput":return e=t.data,e===Ha&&Qa?null:e;default:return null}}function mp(e,t){if(rn)return e==="compositionend"||!Bi&&Yu(e,t)?(e=Qu(),Gr=Fi=ht=null,rn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ku&&t.locale!=="ko"?null:t.data;default:return null}}var hp={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 Ka(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hp[e.type]:t==="textarea"}function Xu(e,t,n,r){Eu(r),t=ds(t,"onChange"),0<t.length&&(n=new Ai("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Gn=null,ar=null;function xp(e){ac(e,0)}function Rs(e){var t=an(e);if(ju(t))return e}function vp(e,t){if(e==="change")return t}var Ju=!1;if(rt){var ol;if(rt){var ul="oninput"in document;if(!ul){var Ya=document.createElement("div");Ya.setAttribute("oninput","return;"),ul=typeof Ya.oninput=="function"}ol=ul}else ol=!1;Ju=ol&&(!document.documentMode||9<document.documentMode)}function Ga(){Gn&&(Gn.detachEvent("onpropertychange",qu),ar=Gn=null)}function qu(e){if(e.propertyName==="value"&&Rs(ar)){var t=[];Xu(t,ar,e,Oi(e)),Lu(xp,t)}}function gp(e,t,n){e==="focusin"?(Ga(),Gn=t,ar=n,Gn.attachEvent("onpropertychange",qu)):e==="focusout"&&Ga()}function yp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Rs(ar)}function jp(e,t){if(e==="click")return Rs(t)}function wp(e,t){if(e==="input"||e==="change")return Rs(t)}function kp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qe=typeof Object.is=="function"?Object.is:kp;function or(e,t){if(Qe(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var l=n[r];if(!_l.call(t,l)||!Qe(e[l],t[l]))return!1}return!0}function Xa(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ja(e,t){var n=Xa(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Xa(n)}}function Zu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ec(){for(var e=window,t=ss();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ss(e.document)}return t}function Vi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Np(e){var t=ec(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Zu(n.ownerDocument.documentElement,n)){if(r!==null&&Vi(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=Ja(n,i);var a=Ja(n,r);l&&a&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Sp=rt&&"documentMode"in document&&11>=document.documentMode,sn=null,Hl=null,Xn=null,Ql=!1;function qa(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ql||sn==null||sn!==ss(r)||(r=sn,"selectionStart"in r&&Vi(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Xn&&or(Xn,r)||(Xn=r,r=ds(Hl,"onSelect"),0<r.length&&(t=new Ai("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=sn)))}function $r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ln={animationend:$r("Animation","AnimationEnd"),animationiteration:$r("Animation","AnimationIteration"),animationstart:$r("Animation","AnimationStart"),transitionend:$r("Transition","TransitionEnd")},cl={},tc={};rt&&(tc=document.createElement("div").style,"AnimationEvent"in window||(delete ln.animationend.animation,delete ln.animationiteration.animation,delete ln.animationstart.animation),"TransitionEvent"in window||delete ln.transitionend.transition);function Os(e){if(cl[e])return cl[e];if(!ln[e])return e;var t=ln[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in tc)return cl[e]=t[n];return e}var nc=Os("animationend"),rc=Os("animationiteration"),sc=Os("animationstart"),lc=Os("transitionend"),ic=new Map,Za="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 Pt(e,t){ic.set(e,t),Gt(t,[e])}for(var dl=0;dl<Za.length;dl++){var fl=Za[dl],bp=fl.toLowerCase(),_p=fl[0].toUpperCase()+fl.slice(1);Pt(bp,"on"+_p)}Pt(nc,"onAnimationEnd");Pt(rc,"onAnimationIteration");Pt(sc,"onAnimationStart");Pt("dblclick","onDoubleClick");Pt("focusin","onFocus");Pt("focusout","onBlur");Pt(lc,"onTransitionEnd");jn("onMouseEnter",["mouseout","mouseover"]);jn("onMouseLeave",["mouseout","mouseover"]);jn("onPointerEnter",["pointerout","pointerover"]);jn("onPointerLeave",["pointerout","pointerover"]);Gt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Gt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Gt("onBeforeInput",["compositionend","keypress","textInput","paste"]);Gt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Gt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Gt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hn="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(" "),Ep=new Set("cancel close invalid load scroll toggle".split(" ").concat(Hn));function eo(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,bf(r,t,void 0,e),e.currentTarget=null}function ac(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var o=r[a],u=o.instance,f=o.currentTarget;if(o=o.listener,u!==i&&l.isPropagationStopped())break e;eo(l,o,f),i=u}else for(a=0;a<r.length;a++){if(o=r[a],u=o.instance,f=o.currentTarget,o=o.listener,u!==i&&l.isPropagationStopped())break e;eo(l,o,f),i=u}}}if(is)throw e=Ul,is=!1,Ul=null,e}function B(e,t){var n=t[Jl];n===void 0&&(n=t[Jl]=new Set);var r=e+"__bubble";n.has(r)||(oc(t,e,2,!1),n.add(r))}function pl(e,t,n){var r=0;t&&(r|=4),oc(n,e,r,t)}var Dr="_reactListening"+Math.random().toString(36).slice(2);function ur(e){if(!e[Dr]){e[Dr]=!0,hu.forEach(function(n){n!=="selectionchange"&&(Ep.has(n)||pl(n,!1,e),pl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Dr]||(t[Dr]=!0,pl("selectionchange",!1,t))}}function oc(e,t,n,r){switch(Hu(t)){case 1:var l=Uf;break;case 4:l=Bf;break;default:l=Di}n=l.bind(null,t,n,e),l=void 0,!Al||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function ml(e,t,n,r,l){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var o=r.stateNode.containerInfo;if(o===l||o.nodeType===8&&o.parentNode===l)break;if(a===4)for(a=r.return;a!==null;){var u=a.tag;if((u===3||u===4)&&(u=a.stateNode.containerInfo,u===l||u.nodeType===8&&u.parentNode===l))return;a=a.return}for(;o!==null;){if(a=Dt(o),a===null)return;if(u=a.tag,u===5||u===6){r=i=a;continue e}o=o.parentNode}}r=r.return}Lu(function(){var f=i,p=Oi(n),d=[];e:{var x=ic.get(e);if(x!==void 0){var w=Ai,v=e;switch(e){case"keypress":if(Xr(n)===0)break e;case"keydown":case"keyup":w=rp;break;case"focusin":v="focus",w=al;break;case"focusout":v="blur",w=al;break;case"beforeblur":case"afterblur":w=al;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":w=Ba;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":w=Hf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":w=ip;break;case nc:case rc:case sc:w=Yf;break;case lc:w=op;break;case"scroll":w=Vf;break;case"wheel":w=cp;break;case"copy":case"cut":case"paste":w=Xf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":w=Wa}var j=(t&4)!==0,y=!j&&e==="scroll",m=j?x!==null?x+"Capture":null:x;j=[];for(var c=f,h;c!==null;){h=c;var k=h.stateNode;if(h.tag===5&&k!==null&&(h=k,m!==null&&(k=rr(c,m),k!=null&&j.push(cr(c,k,h)))),y)break;c=c.return}0<j.length&&(x=new w(x,v,null,n,p),d.push({event:x,listeners:j}))}}if(!(t&7)){e:{if(x=e==="mouseover"||e==="pointerover",w=e==="mouseout"||e==="pointerout",x&&n!==Dl&&(v=n.relatedTarget||n.fromElement)&&(Dt(v)||v[st]))break e;if((w||x)&&(x=p.window===p?p:(x=p.ownerDocument)?x.defaultView||x.parentWindow:window,w?(v=n.relatedTarget||n.toElement,w=f,v=v?Dt(v):null,v!==null&&(y=Xt(v),v!==y||v.tag!==5&&v.tag!==6)&&(v=null)):(w=null,v=f),w!==v)){if(j=Ba,k="onMouseLeave",m="onMouseEnter",c="mouse",(e==="pointerout"||e==="pointerover")&&(j=Wa,k="onPointerLeave",m="onPointerEnter",c="pointer"),y=w==null?x:an(w),h=v==null?x:an(v),x=new j(k,c+"leave",w,n,p),x.target=y,x.relatedTarget=h,k=null,Dt(p)===f&&(j=new j(m,c+"enter",v,n,p),j.target=h,j.relatedTarget=y,k=j),y=k,w&&v)t:{for(j=w,m=v,c=0,h=j;h;h=qt(h))c++;for(h=0,k=m;k;k=qt(k))h++;for(;0<c-h;)j=qt(j),c--;for(;0<h-c;)m=qt(m),h--;for(;c--;){if(j===m||m!==null&&j===m.alternate)break t;j=qt(j),m=qt(m)}j=null}else j=null;w!==null&&to(d,x,w,j,!1),v!==null&&y!==null&&to(d,y,v,j,!0)}}e:{if(x=f?an(f):window,w=x.nodeName&&x.nodeName.toLowerCase(),w==="select"||w==="input"&&x.type==="file")var b=vp;else if(Ka(x))if(Ju)b=wp;else{b=yp;var N=gp}else(w=x.nodeName)&&w.toLowerCase()==="input"&&(x.type==="checkbox"||x.type==="radio")&&(b=jp);if(b&&(b=b(e,f))){Xu(d,b,n,p);break e}N&&N(e,x,f),e==="focusout"&&(N=x._wrapperState)&&N.controlled&&x.type==="number"&&Rl(x,"number",x.value)}switch(N=f?an(f):window,e){case"focusin":(Ka(N)||N.contentEditable==="true")&&(sn=N,Hl=f,Xn=null);break;case"focusout":Xn=Hl=sn=null;break;case"mousedown":Ql=!0;break;case"contextmenu":case"mouseup":case"dragend":Ql=!1,qa(d,n,p);break;case"selectionchange":if(Sp)break;case"keydown":case"keyup":qa(d,n,p)}var _;if(Bi)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else rn?Yu(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(Ku&&n.locale!=="ko"&&(rn||E!=="onCompositionStart"?E==="onCompositionEnd"&&rn&&(_=Qu()):(ht=p,Fi="value"in ht?ht.value:ht.textContent,rn=!0)),N=ds(f,E),0<N.length&&(E=new Va(E,e,null,n,p),d.push({event:E,listeners:N}),_?E.data=_:(_=Gu(n),_!==null&&(E.data=_)))),(_=fp?pp(e,n):mp(e,n))&&(f=ds(f,"onBeforeInput"),0<f.length&&(p=new Va("onBeforeInput","beforeinput",null,n,p),d.push({event:p,listeners:f}),p.data=_))}ac(d,t)})}function cr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ds(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,i=l.stateNode;l.tag===5&&i!==null&&(l=i,i=rr(e,n),i!=null&&r.unshift(cr(e,i,l)),i=rr(e,t),i!=null&&r.push(cr(e,i,l))),e=e.return}return r}function qt(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function to(e,t,n,r,l){for(var i=t._reactName,a=[];n!==null&&n!==r;){var o=n,u=o.alternate,f=o.stateNode;if(u!==null&&u===r)break;o.tag===5&&f!==null&&(o=f,l?(u=rr(n,i),u!=null&&a.unshift(cr(n,u,o))):l||(u=rr(n,i),u!=null&&a.push(cr(n,u,o)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var Cp=/\r\n?/g,Pp=/\u0000|\uFFFD/g;function no(e){return(typeof e=="string"?e:""+e).replace(Cp,`
|
|
38
|
+
`).replace(Pp,"")}function Fr(e,t,n){if(t=no(t),no(e)!==t&&n)throw Error(S(425))}function fs(){}var Kl=null,Yl=null;function Gl(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Xl=typeof setTimeout=="function"?setTimeout:void 0,Tp=typeof clearTimeout=="function"?clearTimeout:void 0,ro=typeof Promise=="function"?Promise:void 0,Lp=typeof queueMicrotask=="function"?queueMicrotask:typeof ro<"u"?function(e){return ro.resolve(null).then(e).catch(Mp)}:Xl;function Mp(e){setTimeout(function(){throw e})}function hl(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),ir(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);ir(t)}function wt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function so(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Tn=Math.random().toString(36).slice(2),Ge="__reactFiber$"+Tn,dr="__reactProps$"+Tn,st="__reactContainer$"+Tn,Jl="__reactEvents$"+Tn,Rp="__reactListeners$"+Tn,Op="__reactHandles$"+Tn;function Dt(e){var t=e[Ge];if(t)return t;for(var n=e.parentNode;n;){if(t=n[st]||n[Ge]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=so(e);e!==null;){if(n=e[Ge])return n;e=so(e)}return t}e=n,n=e.parentNode}return null}function Sr(e){return e=e[Ge]||e[st],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function an(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(S(33))}function zs(e){return e[dr]||null}var ql=[],on=-1;function Tt(e){return{current:e}}function W(e){0>on||(e.current=ql[on],ql[on]=null,on--)}function U(e,t){on++,ql[on]=e.current,e.current=t}var Ct={},xe=Tt(Ct),Ne=Tt(!1),Vt=Ct;function wn(e,t){var n=e.type.contextTypes;if(!n)return Ct;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Se(e){return e=e.childContextTypes,e!=null}function ps(){W(Ne),W(xe)}function lo(e,t,n){if(xe.current!==Ct)throw Error(S(168));U(xe,t),U(Ne,n)}function uc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(S(108,gf(e)||"Unknown",l));return Y({},n,r)}function ms(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ct,Vt=xe.current,U(xe,e),U(Ne,Ne.current),!0}function io(e,t,n){var r=e.stateNode;if(!r)throw Error(S(169));n?(e=uc(e,t,Vt),r.__reactInternalMemoizedMergedChildContext=e,W(Ne),W(xe),U(xe,e)):W(Ne),U(Ne,n)}var Ze=null,Is=!1,xl=!1;function cc(e){Ze===null?Ze=[e]:Ze.push(e)}function zp(e){Is=!0,cc(e)}function Lt(){if(!xl&&Ze!==null){xl=!0;var e=0,t=A;try{var n=Ze;for(A=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ze=null,Is=!1}catch(l){throw Ze!==null&&(Ze=Ze.slice(e+1)),zu(zi,Lt),l}finally{A=t,xl=!1}}return null}var un=[],cn=0,hs=null,xs=0,Re=[],Oe=0,Wt=null,et=1,tt="";function It(e,t){un[cn++]=xs,un[cn++]=hs,hs=e,xs=t}function dc(e,t,n){Re[Oe++]=et,Re[Oe++]=tt,Re[Oe++]=Wt,Wt=e;var r=et;e=tt;var l=32-We(r)-1;r&=~(1<<l),n+=1;var i=32-We(t)+l;if(30<i){var a=l-l%5;i=(r&(1<<a)-1).toString(32),r>>=a,l-=a,et=1<<32-We(t)+l|n<<l|r,tt=i+e}else et=1<<i|n<<l|r,tt=e}function Wi(e){e.return!==null&&(It(e,1),dc(e,1,0))}function Hi(e){for(;e===hs;)hs=un[--cn],un[cn]=null,xs=un[--cn],un[cn]=null;for(;e===Wt;)Wt=Re[--Oe],Re[Oe]=null,tt=Re[--Oe],Re[Oe]=null,et=Re[--Oe],Re[Oe]=null}var Pe=null,Ce=null,H=!1,Ve=null;function fc(e,t){var n=ze(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ao(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Pe=e,Ce=wt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Pe=e,Ce=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Wt!==null?{id:et,overflow:tt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ze(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Pe=e,Ce=null,!0):!1;default:return!1}}function Zl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ei(e){if(H){var t=Ce;if(t){var n=t;if(!ao(e,t)){if(Zl(e))throw Error(S(418));t=wt(n.nextSibling);var r=Pe;t&&ao(e,t)?fc(r,n):(e.flags=e.flags&-4097|2,H=!1,Pe=e)}}else{if(Zl(e))throw Error(S(418));e.flags=e.flags&-4097|2,H=!1,Pe=e}}}function oo(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Pe=e}function Ar(e){if(e!==Pe)return!1;if(!H)return oo(e),H=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Gl(e.type,e.memoizedProps)),t&&(t=Ce)){if(Zl(e))throw pc(),Error(S(418));for(;t;)fc(e,t),t=wt(t.nextSibling)}if(oo(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(S(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ce=wt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ce=null}}else Ce=Pe?wt(e.stateNode.nextSibling):null;return!0}function pc(){for(var e=Ce;e;)e=wt(e.nextSibling)}function kn(){Ce=Pe=null,H=!1}function Qi(e){Ve===null?Ve=[e]:Ve.push(e)}var Ip=ot.ReactCurrentBatchConfig;function Dn(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(S(309));var r=n.stateNode}if(!r)throw Error(S(147,e));var l=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var o=l.refs;a===null?delete o[i]:o[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(S(284));if(!n._owner)throw Error(S(290,e))}return e}function Ur(e,t){throw e=Object.prototype.toString.call(t),Error(S(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function uo(e){var t=e._init;return t(e._payload)}function mc(e){function t(m,c){if(e){var h=m.deletions;h===null?(m.deletions=[c],m.flags|=16):h.push(c)}}function n(m,c){if(!e)return null;for(;c!==null;)t(m,c),c=c.sibling;return null}function r(m,c){for(m=new Map;c!==null;)c.key!==null?m.set(c.key,c):m.set(c.index,c),c=c.sibling;return m}function l(m,c){return m=bt(m,c),m.index=0,m.sibling=null,m}function i(m,c,h){return m.index=h,e?(h=m.alternate,h!==null?(h=h.index,h<c?(m.flags|=2,c):h):(m.flags|=2,c)):(m.flags|=1048576,c)}function a(m){return e&&m.alternate===null&&(m.flags|=2),m}function o(m,c,h,k){return c===null||c.tag!==6?(c=Nl(h,m.mode,k),c.return=m,c):(c=l(c,h),c.return=m,c)}function u(m,c,h,k){var b=h.type;return b===nn?p(m,c,h.props.children,k,h.key):c!==null&&(c.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===dt&&uo(b)===c.type)?(k=l(c,h.props),k.ref=Dn(m,c,h),k.return=m,k):(k=rs(h.type,h.key,h.props,null,m.mode,k),k.ref=Dn(m,c,h),k.return=m,k)}function f(m,c,h,k){return c===null||c.tag!==4||c.stateNode.containerInfo!==h.containerInfo||c.stateNode.implementation!==h.implementation?(c=Sl(h,m.mode,k),c.return=m,c):(c=l(c,h.children||[]),c.return=m,c)}function p(m,c,h,k,b){return c===null||c.tag!==7?(c=Bt(h,m.mode,k,b),c.return=m,c):(c=l(c,h),c.return=m,c)}function d(m,c,h){if(typeof c=="string"&&c!==""||typeof c=="number")return c=Nl(""+c,m.mode,h),c.return=m,c;if(typeof c=="object"&&c!==null){switch(c.$$typeof){case Tr:return h=rs(c.type,c.key,c.props,null,m.mode,h),h.ref=Dn(m,null,c),h.return=m,h;case tn:return c=Sl(c,m.mode,h),c.return=m,c;case dt:var k=c._init;return d(m,k(c._payload),h)}if(Vn(c)||Rn(c))return c=Bt(c,m.mode,h,null),c.return=m,c;Ur(m,c)}return null}function x(m,c,h,k){var b=c!==null?c.key:null;if(typeof h=="string"&&h!==""||typeof h=="number")return b!==null?null:o(m,c,""+h,k);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Tr:return h.key===b?u(m,c,h,k):null;case tn:return h.key===b?f(m,c,h,k):null;case dt:return b=h._init,x(m,c,b(h._payload),k)}if(Vn(h)||Rn(h))return b!==null?null:p(m,c,h,k,null);Ur(m,h)}return null}function w(m,c,h,k,b){if(typeof k=="string"&&k!==""||typeof k=="number")return m=m.get(h)||null,o(c,m,""+k,b);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Tr:return m=m.get(k.key===null?h:k.key)||null,u(c,m,k,b);case tn:return m=m.get(k.key===null?h:k.key)||null,f(c,m,k,b);case dt:var N=k._init;return w(m,c,h,N(k._payload),b)}if(Vn(k)||Rn(k))return m=m.get(h)||null,p(c,m,k,b,null);Ur(c,k)}return null}function v(m,c,h,k){for(var b=null,N=null,_=c,E=c=0,F=null;_!==null&&E<h.length;E++){_.index>E?(F=_,_=null):F=_.sibling;var L=x(m,_,h[E],k);if(L===null){_===null&&(_=F);break}e&&_&&L.alternate===null&&t(m,_),c=i(L,c,E),N===null?b=L:N.sibling=L,N=L,_=F}if(E===h.length)return n(m,_),H&&It(m,E),b;if(_===null){for(;E<h.length;E++)_=d(m,h[E],k),_!==null&&(c=i(_,c,E),N===null?b=_:N.sibling=_,N=_);return H&&It(m,E),b}for(_=r(m,_);E<h.length;E++)F=w(_,m,E,h[E],k),F!==null&&(e&&F.alternate!==null&&_.delete(F.key===null?E:F.key),c=i(F,c,E),N===null?b=F:N.sibling=F,N=F);return e&&_.forEach(function(C){return t(m,C)}),H&&It(m,E),b}function j(m,c,h,k){var b=Rn(h);if(typeof b!="function")throw Error(S(150));if(h=b.call(h),h==null)throw Error(S(151));for(var N=b=null,_=c,E=c=0,F=null,L=h.next();_!==null&&!L.done;E++,L=h.next()){_.index>E?(F=_,_=null):F=_.sibling;var C=x(m,_,L.value,k);if(C===null){_===null&&(_=F);break}e&&_&&C.alternate===null&&t(m,_),c=i(C,c,E),N===null?b=C:N.sibling=C,N=C,_=F}if(L.done)return n(m,_),H&&It(m,E),b;if(_===null){for(;!L.done;E++,L=h.next())L=d(m,L.value,k),L!==null&&(c=i(L,c,E),N===null?b=L:N.sibling=L,N=L);return H&&It(m,E),b}for(_=r(m,_);!L.done;E++,L=h.next())L=w(_,m,E,L.value,k),L!==null&&(e&&L.alternate!==null&&_.delete(L.key===null?E:L.key),c=i(L,c,E),N===null?b=L:N.sibling=L,N=L);return e&&_.forEach(function(ie){return t(m,ie)}),H&&It(m,E),b}function y(m,c,h,k){if(typeof h=="object"&&h!==null&&h.type===nn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Tr:e:{for(var b=h.key,N=c;N!==null;){if(N.key===b){if(b=h.type,b===nn){if(N.tag===7){n(m,N.sibling),c=l(N,h.props.children),c.return=m,m=c;break e}}else if(N.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===dt&&uo(b)===N.type){n(m,N.sibling),c=l(N,h.props),c.ref=Dn(m,N,h),c.return=m,m=c;break e}n(m,N);break}else t(m,N);N=N.sibling}h.type===nn?(c=Bt(h.props.children,m.mode,k,h.key),c.return=m,m=c):(k=rs(h.type,h.key,h.props,null,m.mode,k),k.ref=Dn(m,c,h),k.return=m,m=k)}return a(m);case tn:e:{for(N=h.key;c!==null;){if(c.key===N)if(c.tag===4&&c.stateNode.containerInfo===h.containerInfo&&c.stateNode.implementation===h.implementation){n(m,c.sibling),c=l(c,h.children||[]),c.return=m,m=c;break e}else{n(m,c);break}else t(m,c);c=c.sibling}c=Sl(h,m.mode,k),c.return=m,m=c}return a(m);case dt:return N=h._init,y(m,c,N(h._payload),k)}if(Vn(h))return v(m,c,h,k);if(Rn(h))return j(m,c,h,k);Ur(m,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,c!==null&&c.tag===6?(n(m,c.sibling),c=l(c,h),c.return=m,m=c):(n(m,c),c=Nl(h,m.mode,k),c.return=m,m=c),a(m)):n(m,c)}return y}var Nn=mc(!0),hc=mc(!1),vs=Tt(null),gs=null,dn=null,Ki=null;function Yi(){Ki=dn=gs=null}function Gi(e){var t=vs.current;W(vs),e._currentValue=t}function ti(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function gn(e,t){gs=e,Ki=dn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ke=!0),e.firstContext=null)}function $e(e){var t=e._currentValue;if(Ki!==e)if(e={context:e,memoizedValue:t,next:null},dn===null){if(gs===null)throw Error(S(308));dn=e,gs.dependencies={lanes:0,firstContext:e}}else dn=dn.next=e;return t}var Ft=null;function Xi(e){Ft===null?Ft=[e]:Ft.push(e)}function xc(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Xi(t)):(n.next=l.next,l.next=n),t.interleaved=n,lt(e,r)}function lt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ft=!1;function Ji(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vc(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 nt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function kt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,D&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,lt(e,n)}return l=r.interleaved,l===null?(t.next=t,Xi(r)):(t.next=l.next,l.next=t),r.interleaved=t,lt(e,n)}function Jr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ii(e,n)}}function co(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?l=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ys(e,t,n,r){var l=e.updateQueue;ft=!1;var i=l.firstBaseUpdate,a=l.lastBaseUpdate,o=l.shared.pending;if(o!==null){l.shared.pending=null;var u=o,f=u.next;u.next=null,a===null?i=f:a.next=f,a=u;var p=e.alternate;p!==null&&(p=p.updateQueue,o=p.lastBaseUpdate,o!==a&&(o===null?p.firstBaseUpdate=f:o.next=f,p.lastBaseUpdate=u))}if(i!==null){var d=l.baseState;a=0,p=f=u=null,o=i;do{var x=o.lane,w=o.eventTime;if((r&x)===x){p!==null&&(p=p.next={eventTime:w,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var v=e,j=o;switch(x=t,w=n,j.tag){case 1:if(v=j.payload,typeof v=="function"){d=v.call(w,d,x);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=j.payload,x=typeof v=="function"?v.call(w,d,x):v,x==null)break e;d=Y({},d,x);break e;case 2:ft=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,x=l.effects,x===null?l.effects=[o]:x.push(o))}else w={eventTime:w,lane:x,tag:o.tag,payload:o.payload,callback:o.callback,next:null},p===null?(f=p=w,u=d):p=p.next=w,a|=x;if(o=o.next,o===null){if(o=l.shared.pending,o===null)break;x=o,o=x.next,x.next=null,l.lastBaseUpdate=x,l.shared.pending=null}}while(!0);if(p===null&&(u=d),l.baseState=u,l.firstBaseUpdate=f,l.lastBaseUpdate=p,t=l.shared.interleaved,t!==null){l=t;do a|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);Qt|=a,e.lanes=a,e.memoizedState=d}}function fo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],l=r.callback;if(l!==null){if(r.callback=null,r=n,typeof l!="function")throw Error(S(191,l));l.call(r)}}}var br={},Je=Tt(br),fr=Tt(br),pr=Tt(br);function At(e){if(e===br)throw Error(S(174));return e}function qi(e,t){switch(U(pr,t),U(fr,e),U(Je,br),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:zl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=zl(t,e)}W(Je),U(Je,t)}function Sn(){W(Je),W(fr),W(pr)}function gc(e){At(pr.current);var t=At(Je.current),n=zl(t,e.type);t!==n&&(U(fr,e),U(Je,n))}function Zi(e){fr.current===e&&(W(Je),W(fr))}var Q=Tt(0);function js(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var vl=[];function ea(){for(var e=0;e<vl.length;e++)vl[e]._workInProgressVersionPrimary=null;vl.length=0}var qr=ot.ReactCurrentDispatcher,gl=ot.ReactCurrentBatchConfig,Ht=0,K=null,re=null,oe=null,ws=!1,Jn=!1,mr=0,$p=0;function pe(){throw Error(S(321))}function ta(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Qe(e[n],t[n]))return!1;return!0}function na(e,t,n,r,l,i){if(Ht=i,K=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,qr.current=e===null||e.memoizedState===null?Up:Bp,e=n(r,l),Jn){i=0;do{if(Jn=!1,mr=0,25<=i)throw Error(S(301));i+=1,oe=re=null,t.updateQueue=null,qr.current=Vp,e=n(r,l)}while(Jn)}if(qr.current=ks,t=re!==null&&re.next!==null,Ht=0,oe=re=K=null,ws=!1,t)throw Error(S(300));return e}function ra(){var e=mr!==0;return mr=0,e}function Ye(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return oe===null?K.memoizedState=oe=e:oe=oe.next=e,oe}function De(){if(re===null){var e=K.alternate;e=e!==null?e.memoizedState:null}else e=re.next;var t=oe===null?K.memoizedState:oe.next;if(t!==null)oe=t,re=e;else{if(e===null)throw Error(S(310));re=e,e={memoizedState:re.memoizedState,baseState:re.baseState,baseQueue:re.baseQueue,queue:re.queue,next:null},oe===null?K.memoizedState=oe=e:oe=oe.next=e}return oe}function hr(e,t){return typeof t=="function"?t(e):t}function yl(e){var t=De(),n=t.queue;if(n===null)throw Error(S(311));n.lastRenderedReducer=e;var r=re,l=r.baseQueue,i=n.pending;if(i!==null){if(l!==null){var a=l.next;l.next=i.next,i.next=a}r.baseQueue=l=i,n.pending=null}if(l!==null){i=l.next,r=r.baseState;var o=a=null,u=null,f=i;do{var p=f.lane;if((Ht&p)===p)u!==null&&(u=u.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),r=f.hasEagerState?f.eagerState:e(r,f.action);else{var d={lane:p,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};u===null?(o=u=d,a=r):u=u.next=d,K.lanes|=p,Qt|=p}f=f.next}while(f!==null&&f!==i);u===null?a=r:u.next=o,Qe(r,t.memoizedState)||(ke=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){l=e;do i=l.lane,K.lanes|=i,Qt|=i,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function jl(e){var t=De(),n=t.queue;if(n===null)throw Error(S(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,i=t.memoizedState;if(l!==null){n.pending=null;var a=l=l.next;do i=e(i,a.action),a=a.next;while(a!==l);Qe(i,t.memoizedState)||(ke=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function yc(){}function jc(e,t){var n=K,r=De(),l=t(),i=!Qe(r.memoizedState,l);if(i&&(r.memoizedState=l,ke=!0),r=r.queue,sa(Nc.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||oe!==null&&oe.memoizedState.tag&1){if(n.flags|=2048,xr(9,kc.bind(null,n,r,l,t),void 0,null),ue===null)throw Error(S(349));Ht&30||wc(n,t,l)}return l}function wc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=K.updateQueue,t===null?(t={lastEffect:null,stores:null},K.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function kc(e,t,n,r){t.value=n,t.getSnapshot=r,Sc(t)&&bc(e)}function Nc(e,t,n){return n(function(){Sc(t)&&bc(e)})}function Sc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qe(e,n)}catch{return!0}}function bc(e){var t=lt(e,1);t!==null&&He(t,e,1,-1)}function po(e){var t=Ye();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:hr,lastRenderedState:e},t.queue=e,e=e.dispatch=Ap.bind(null,K,e),[t.memoizedState,e]}function xr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=K.updateQueue,t===null?(t={lastEffect:null,stores:null},K.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function _c(){return De().memoizedState}function Zr(e,t,n,r){var l=Ye();K.flags|=e,l.memoizedState=xr(1|t,n,void 0,r===void 0?null:r)}function $s(e,t,n,r){var l=De();r=r===void 0?null:r;var i=void 0;if(re!==null){var a=re.memoizedState;if(i=a.destroy,r!==null&&ta(r,a.deps)){l.memoizedState=xr(t,n,i,r);return}}K.flags|=e,l.memoizedState=xr(1|t,n,i,r)}function mo(e,t){return Zr(8390656,8,e,t)}function sa(e,t){return $s(2048,8,e,t)}function Ec(e,t){return $s(4,2,e,t)}function Cc(e,t){return $s(4,4,e,t)}function Pc(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Tc(e,t,n){return n=n!=null?n.concat([e]):null,$s(4,4,Pc.bind(null,t,e),n)}function la(){}function Lc(e,t){var n=De();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ta(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Mc(e,t){var n=De();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ta(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Rc(e,t,n){return Ht&21?(Qe(n,t)||(n=Du(),K.lanes|=n,Qt|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ke=!0),e.memoizedState=n)}function Dp(e,t){var n=A;A=n!==0&&4>n?n:4,e(!0);var r=gl.transition;gl.transition={};try{e(!1),t()}finally{A=n,gl.transition=r}}function Oc(){return De().memoizedState}function Fp(e,t,n){var r=St(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zc(e))Ic(t,n);else if(n=xc(e,t,n,r),n!==null){var l=ge();He(n,e,r,l),$c(n,t,r)}}function Ap(e,t,n){var r=St(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zc(e))Ic(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,o=i(a,n);if(l.hasEagerState=!0,l.eagerState=o,Qe(o,a)){var u=t.interleaved;u===null?(l.next=l,Xi(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=xc(e,t,l,r),n!==null&&(l=ge(),He(n,e,r,l),$c(n,t,r))}}function zc(e){var t=e.alternate;return e===K||t!==null&&t===K}function Ic(e,t){Jn=ws=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $c(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ii(e,n)}}var ks={readContext:$e,useCallback:pe,useContext:pe,useEffect:pe,useImperativeHandle:pe,useInsertionEffect:pe,useLayoutEffect:pe,useMemo:pe,useReducer:pe,useRef:pe,useState:pe,useDebugValue:pe,useDeferredValue:pe,useTransition:pe,useMutableSource:pe,useSyncExternalStore:pe,useId:pe,unstable_isNewReconciler:!1},Up={readContext:$e,useCallback:function(e,t){return Ye().memoizedState=[e,t===void 0?null:t],e},useContext:$e,useEffect:mo,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Zr(4194308,4,Pc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zr(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zr(4,2,e,t)},useMemo:function(e,t){var n=Ye();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ye();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Fp.bind(null,K,e),[r.memoizedState,e]},useRef:function(e){var t=Ye();return e={current:e},t.memoizedState=e},useState:po,useDebugValue:la,useDeferredValue:function(e){return Ye().memoizedState=e},useTransition:function(){var e=po(!1),t=e[0];return e=Dp.bind(null,e[1]),Ye().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=K,l=Ye();if(H){if(n===void 0)throw Error(S(407));n=n()}else{if(n=t(),ue===null)throw Error(S(349));Ht&30||wc(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,mo(Nc.bind(null,r,i,e),[e]),r.flags|=2048,xr(9,kc.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ye(),t=ue.identifierPrefix;if(H){var n=tt,r=et;n=(r&~(1<<32-We(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=mr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=$p++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Bp={readContext:$e,useCallback:Lc,useContext:$e,useEffect:sa,useImperativeHandle:Tc,useInsertionEffect:Ec,useLayoutEffect:Cc,useMemo:Mc,useReducer:yl,useRef:_c,useState:function(){return yl(hr)},useDebugValue:la,useDeferredValue:function(e){var t=De();return Rc(t,re.memoizedState,e)},useTransition:function(){var e=yl(hr)[0],t=De().memoizedState;return[e,t]},useMutableSource:yc,useSyncExternalStore:jc,useId:Oc,unstable_isNewReconciler:!1},Vp={readContext:$e,useCallback:Lc,useContext:$e,useEffect:sa,useImperativeHandle:Tc,useInsertionEffect:Ec,useLayoutEffect:Cc,useMemo:Mc,useReducer:jl,useRef:_c,useState:function(){return jl(hr)},useDebugValue:la,useDeferredValue:function(e){var t=De();return re===null?t.memoizedState=e:Rc(t,re.memoizedState,e)},useTransition:function(){var e=jl(hr)[0],t=De().memoizedState;return[e,t]},useMutableSource:yc,useSyncExternalStore:jc,useId:Oc,unstable_isNewReconciler:!1};function Ue(e,t){if(e&&e.defaultProps){t=Y({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ni(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Y({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ds={isMounted:function(e){return(e=e._reactInternals)?Xt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ge(),l=St(e),i=nt(r,l);i.payload=t,n!=null&&(i.callback=n),t=kt(e,i,l),t!==null&&(He(t,e,l,r),Jr(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ge(),l=St(e),i=nt(r,l);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=kt(e,i,l),t!==null&&(He(t,e,l,r),Jr(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ge(),r=St(e),l=nt(n,r);l.tag=2,t!=null&&(l.callback=t),t=kt(e,l,r),t!==null&&(He(t,e,r,n),Jr(t,e,r))}};function ho(e,t,n,r,l,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!or(n,r)||!or(l,i):!0}function Dc(e,t,n){var r=!1,l=Ct,i=t.contextType;return typeof i=="object"&&i!==null?i=$e(i):(l=Se(t)?Vt:xe.current,r=t.contextTypes,i=(r=r!=null)?wn(e,l):Ct),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ds,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=i),t}function xo(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ds.enqueueReplaceState(t,t.state,null)}function ri(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},Ji(e);var i=t.contextType;typeof i=="object"&&i!==null?l.context=$e(i):(i=Se(t)?Vt:xe.current,l.context=wn(e,i)),l.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ni(e,t,i,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&Ds.enqueueReplaceState(l,l.state,null),ys(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function bn(e,t){try{var n="",r=t;do n+=vf(r),r=r.return;while(r);var l=n}catch(i){l=`
|
|
39
|
+
Error generating stack: `+i.message+`
|
|
40
|
+
`+i.stack}return{value:e,source:t,stack:l,digest:null}}function wl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function si(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Wp=typeof WeakMap=="function"?WeakMap:Map;function Fc(e,t,n){n=nt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ss||(Ss=!0,mi=r),si(e,t)},n}function Ac(e,t,n){n=nt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){si(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){si(e,t),typeof r!="function"&&(Nt===null?Nt=new Set([this]):Nt.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function vo(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Wp;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=sm.bind(null,e,t,n),t.then(e,e))}function go(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function yo(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=nt(-1,1),t.tag=2,kt(n,t,1))),n.lanes|=1),e)}var Hp=ot.ReactCurrentOwner,ke=!1;function ve(e,t,n,r){t.child=e===null?hc(t,null,n,r):Nn(t,e.child,n,r)}function jo(e,t,n,r,l){n=n.render;var i=t.ref;return gn(t,l),r=na(e,t,n,r,i,l),n=ra(),e!==null&&!ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,it(e,t,l)):(H&&n&&Wi(t),t.flags|=1,ve(e,t,r,l),t.child)}function wo(e,t,n,r,l){if(e===null){var i=n.type;return typeof i=="function"&&!pa(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Uc(e,t,i,r,l)):(e=rs(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&l)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:or,n(a,r)&&e.ref===t.ref)return it(e,t,l)}return t.flags|=1,e=bt(i,r),e.ref=t.ref,e.return=t,t.child=e}function Uc(e,t,n,r,l){if(e!==null){var i=e.memoizedProps;if(or(i,r)&&e.ref===t.ref)if(ke=!1,t.pendingProps=r=i,(e.lanes&l)!==0)e.flags&131072&&(ke=!0);else return t.lanes=e.lanes,it(e,t,l)}return li(e,t,n,r,l)}function Bc(e,t,n){var r=t.pendingProps,l=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},U(pn,Ee),Ee|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,U(pn,Ee),Ee|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,U(pn,Ee),Ee|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,U(pn,Ee),Ee|=r;return ve(e,t,l,n),t.child}function Vc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function li(e,t,n,r,l){var i=Se(n)?Vt:xe.current;return i=wn(t,i),gn(t,l),n=na(e,t,n,r,i,l),r=ra(),e!==null&&!ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,it(e,t,l)):(H&&r&&Wi(t),t.flags|=1,ve(e,t,n,l),t.child)}function ko(e,t,n,r,l){if(Se(n)){var i=!0;ms(t)}else i=!1;if(gn(t,l),t.stateNode===null)es(e,t),Dc(t,n,r),ri(t,n,r,l),r=!0;else if(e===null){var a=t.stateNode,o=t.memoizedProps;a.props=o;var u=a.context,f=n.contextType;typeof f=="object"&&f!==null?f=$e(f):(f=Se(n)?Vt:xe.current,f=wn(t,f));var p=n.getDerivedStateFromProps,d=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==r||u!==f)&&xo(t,a,r,f),ft=!1;var x=t.memoizedState;a.state=x,ys(t,r,a,l),u=t.memoizedState,o!==r||x!==u||Ne.current||ft?(typeof p=="function"&&(ni(t,n,p,r),u=t.memoizedState),(o=ft||ho(t,n,o,r,x,u,f))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=f,r=o):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,vc(e,t),o=t.memoizedProps,f=t.type===t.elementType?o:Ue(t.type,o),a.props=f,d=t.pendingProps,x=a.context,u=n.contextType,typeof u=="object"&&u!==null?u=$e(u):(u=Se(n)?Vt:xe.current,u=wn(t,u));var w=n.getDerivedStateFromProps;(p=typeof w=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==d||x!==u)&&xo(t,a,r,u),ft=!1,x=t.memoizedState,a.state=x,ys(t,r,a,l);var v=t.memoizedState;o!==d||x!==v||Ne.current||ft?(typeof w=="function"&&(ni(t,n,w,r),v=t.memoizedState),(f=ft||ho(t,n,f,r,x,v,u)||!1)?(p||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,v,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,v,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),a.props=r,a.state=v,a.context=u,r=f):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),r=!1)}return ii(e,t,n,r,i,l)}function ii(e,t,n,r,l,i){Vc(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return l&&io(t,n,!1),it(e,t,i);r=t.stateNode,Hp.current=t;var o=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Nn(t,e.child,null,i),t.child=Nn(t,null,o,i)):ve(e,t,o,i),t.memoizedState=r.state,l&&io(t,n,!0),t.child}function Wc(e){var t=e.stateNode;t.pendingContext?lo(e,t.pendingContext,t.pendingContext!==t.context):t.context&&lo(e,t.context,!1),qi(e,t.containerInfo)}function No(e,t,n,r,l){return kn(),Qi(l),t.flags|=256,ve(e,t,n,r),t.child}var ai={dehydrated:null,treeContext:null,retryLane:0};function oi(e){return{baseLanes:e,cachePool:null,transitions:null}}function Hc(e,t,n){var r=t.pendingProps,l=Q.current,i=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(l&2)!==0),o?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),U(Q,l&1),e===null)return ei(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=Us(a,r,0,null),e=Bt(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=oi(n),t.memoizedState=ai,e):ia(t,a));if(l=e.memoizedState,l!==null&&(o=l.dehydrated,o!==null))return Qp(e,t,a,r,o,l,n);if(i){i=r.fallback,a=t.mode,l=e.child,o=l.sibling;var u={mode:"hidden",children:r.children};return!(a&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=bt(l,u),r.subtreeFlags=l.subtreeFlags&14680064),o!==null?i=bt(o,i):(i=Bt(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?oi(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=ai,r}return i=e.child,e=i.sibling,r=bt(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ia(e,t){return t=Us({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Br(e,t,n,r){return r!==null&&Qi(r),Nn(t,e.child,null,n),e=ia(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Qp(e,t,n,r,l,i,a){if(n)return t.flags&256?(t.flags&=-257,r=wl(Error(S(422))),Br(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,l=t.mode,r=Us({mode:"visible",children:r.children},l,0,null),i=Bt(i,l,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Nn(t,e.child,null,a),t.child.memoizedState=oi(a),t.memoizedState=ai,i);if(!(t.mode&1))return Br(e,t,a,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var o=r.dgst;return r=o,i=Error(S(419)),r=wl(i,r,void 0),Br(e,t,a,r)}if(o=(a&e.childLanes)!==0,ke||o){if(r=ue,r!==null){switch(a&-a){case 4:l=2;break;case 16:l=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:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|a)?0:l,l!==0&&l!==i.retryLane&&(i.retryLane=l,lt(e,l),He(r,e,l,-1))}return fa(),r=wl(Error(S(421))),Br(e,t,a,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=lm.bind(null,e),l._reactRetry=t,null):(e=i.treeContext,Ce=wt(l.nextSibling),Pe=t,H=!0,Ve=null,e!==null&&(Re[Oe++]=et,Re[Oe++]=tt,Re[Oe++]=Wt,et=e.id,tt=e.overflow,Wt=t),t=ia(t,r.children),t.flags|=4096,t)}function So(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ti(e.return,t,n)}function kl(e,t,n,r,l){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=l)}function Qc(e,t,n){var r=t.pendingProps,l=r.revealOrder,i=r.tail;if(ve(e,t,r.children,n),r=Q.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&So(e,n,t);else if(e.tag===19)So(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(U(Q,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&js(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),kl(t,!1,l,n,i);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&js(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}kl(t,!0,n,null,i);break;case"together":kl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function es(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function it(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Qt|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(S(153));if(t.child!==null){for(e=t.child,n=bt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=bt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Kp(e,t,n){switch(t.tag){case 3:Wc(t),kn();break;case 5:gc(t);break;case 1:Se(t.type)&&ms(t);break;case 4:qi(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;U(vs,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(U(Q,Q.current&1),t.flags|=128,null):n&t.child.childLanes?Hc(e,t,n):(U(Q,Q.current&1),e=it(e,t,n),e!==null?e.sibling:null);U(Q,Q.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Qc(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),U(Q,Q.current),r)break;return null;case 22:case 23:return t.lanes=0,Bc(e,t,n)}return it(e,t,n)}var Kc,ui,Yc,Gc;Kc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ui=function(){};Yc=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,At(Je.current);var i=null;switch(n){case"input":l=Ll(e,l),r=Ll(e,r),i=[];break;case"select":l=Y({},l,{value:void 0}),r=Y({},r,{value:void 0}),i=[];break;case"textarea":l=Ol(e,l),r=Ol(e,r),i=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=fs)}Il(n,r);var a;n=null;for(f in l)if(!r.hasOwnProperty(f)&&l.hasOwnProperty(f)&&l[f]!=null)if(f==="style"){var o=l[f];for(a in o)o.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(tr.hasOwnProperty(f)?i||(i=[]):(i=i||[]).push(f,null));for(f in r){var u=r[f];if(o=l!=null?l[f]:void 0,r.hasOwnProperty(f)&&u!==o&&(u!=null||o!=null))if(f==="style")if(o){for(a in o)!o.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&o[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(i||(i=[]),i.push(f,n)),n=u;else f==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,o=o?o.__html:void 0,u!=null&&o!==u&&(i=i||[]).push(f,u)):f==="children"?typeof u!="string"&&typeof u!="number"||(i=i||[]).push(f,""+u):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(tr.hasOwnProperty(f)?(u!=null&&f==="onScroll"&&B("scroll",e),i||o===u||(i=[])):(i=i||[]).push(f,u))}n&&(i=i||[]).push("style",n);var f=i;(t.updateQueue=f)&&(t.flags|=4)}};Gc=function(e,t,n,r){n!==r&&(t.flags|=4)};function Fn(e,t){if(!H)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function me(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Yp(e,t,n){var r=t.pendingProps;switch(Hi(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return me(t),null;case 1:return Se(t.type)&&ps(),me(t),null;case 3:return r=t.stateNode,Sn(),W(Ne),W(xe),ea(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ar(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ve!==null&&(vi(Ve),Ve=null))),ui(e,t),me(t),null;case 5:Zi(t);var l=At(pr.current);if(n=t.type,e!==null&&t.stateNode!=null)Yc(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(S(166));return me(t),null}if(e=At(Je.current),Ar(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Ge]=t,r[dr]=i,e=(t.mode&1)!==0,n){case"dialog":B("cancel",r),B("close",r);break;case"iframe":case"object":case"embed":B("load",r);break;case"video":case"audio":for(l=0;l<Hn.length;l++)B(Hn[l],r);break;case"source":B("error",r);break;case"img":case"image":case"link":B("error",r),B("load",r);break;case"details":B("toggle",r);break;case"input":Ma(r,i),B("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},B("invalid",r);break;case"textarea":Oa(r,i),B("invalid",r)}Il(n,i),l=null;for(var a in i)if(i.hasOwnProperty(a)){var o=i[a];a==="children"?typeof o=="string"?r.textContent!==o&&(i.suppressHydrationWarning!==!0&&Fr(r.textContent,o,e),l=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(i.suppressHydrationWarning!==!0&&Fr(r.textContent,o,e),l=["children",""+o]):tr.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&B("scroll",r)}switch(n){case"input":Lr(r),Ra(r,i,!0);break;case"textarea":Lr(r),za(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=fs)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Nu(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Ge]=t,e[dr]=r,Kc(e,t,!1,!1),t.stateNode=e;e:{switch(a=$l(n,r),n){case"dialog":B("cancel",e),B("close",e),l=r;break;case"iframe":case"object":case"embed":B("load",e),l=r;break;case"video":case"audio":for(l=0;l<Hn.length;l++)B(Hn[l],e);l=r;break;case"source":B("error",e),l=r;break;case"img":case"image":case"link":B("error",e),B("load",e),l=r;break;case"details":B("toggle",e),l=r;break;case"input":Ma(e,r),l=Ll(e,r),B("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=Y({},r,{value:void 0}),B("invalid",e);break;case"textarea":Oa(e,r),l=Ol(e,r),B("invalid",e);break;default:l=r}Il(n,l),o=l;for(i in o)if(o.hasOwnProperty(i)){var u=o[i];i==="style"?_u(e,u):i==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Su(e,u)):i==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&nr(e,u):typeof u=="number"&&nr(e,""+u):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(tr.hasOwnProperty(i)?u!=null&&i==="onScroll"&&B("scroll",e):u!=null&&Ti(e,i,u,a))}switch(n){case"input":Lr(e),Ra(e,r,!1);break;case"textarea":Lr(e),za(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Et(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?mn(e,!!r.multiple,i,!1):r.defaultValue!=null&&mn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=fs)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return me(t),null;case 6:if(e&&t.stateNode!=null)Gc(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(S(166));if(n=At(pr.current),At(Je.current),Ar(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ge]=t,(i=r.nodeValue!==n)&&(e=Pe,e!==null))switch(e.tag){case 3:Fr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Fr(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ge]=t,t.stateNode=r}return me(t),null;case 13:if(W(Q),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(H&&Ce!==null&&t.mode&1&&!(t.flags&128))pc(),kn(),t.flags|=98560,i=!1;else if(i=Ar(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(S(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(S(317));i[Ge]=t}else kn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;me(t),i=!1}else Ve!==null&&(vi(Ve),Ve=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Q.current&1?se===0&&(se=3):fa())),t.updateQueue!==null&&(t.flags|=4),me(t),null);case 4:return Sn(),ui(e,t),e===null&&ur(t.stateNode.containerInfo),me(t),null;case 10:return Gi(t.type._context),me(t),null;case 17:return Se(t.type)&&ps(),me(t),null;case 19:if(W(Q),i=t.memoizedState,i===null)return me(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)Fn(i,!1);else{if(se!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=js(e),a!==null){for(t.flags|=128,Fn(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return U(Q,Q.current&1|2),t.child}e=e.sibling}i.tail!==null&&ee()>_n&&(t.flags|=128,r=!0,Fn(i,!1),t.lanes=4194304)}else{if(!r)if(e=js(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fn(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!H)return me(t),null}else 2*ee()-i.renderingStartTime>_n&&n!==1073741824&&(t.flags|=128,r=!0,Fn(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ee(),t.sibling=null,n=Q.current,U(Q,r?n&1|2:n&1),t):(me(t),null);case 22:case 23:return da(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ee&1073741824&&(me(t),t.subtreeFlags&6&&(t.flags|=8192)):me(t),null;case 24:return null;case 25:return null}throw Error(S(156,t.tag))}function Gp(e,t){switch(Hi(t),t.tag){case 1:return Se(t.type)&&ps(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Sn(),W(Ne),W(xe),ea(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Zi(t),null;case 13:if(W(Q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(S(340));kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return W(Q),null;case 4:return Sn(),null;case 10:return Gi(t.type._context),null;case 22:case 23:return da(),null;case 24:return null;default:return null}}var Vr=!1,he=!1,Xp=typeof WeakSet=="function"?WeakSet:Set,P=null;function fn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){J(e,t,r)}else n.current=null}function ci(e,t,n){try{n()}catch(r){J(e,t,r)}}var bo=!1;function Jp(e,t){if(Kl=us,e=ec(),Vi(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,o=-1,u=-1,f=0,p=0,d=e,x=null;t:for(;;){for(var w;d!==n||l!==0&&d.nodeType!==3||(o=a+l),d!==i||r!==0&&d.nodeType!==3||(u=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(w=d.firstChild)!==null;)x=d,d=w;for(;;){if(d===e)break t;if(x===n&&++f===l&&(o=a),x===i&&++p===r&&(u=a),(w=d.nextSibling)!==null)break;d=x,x=d.parentNode}d=w}n=o===-1||u===-1?null:{start:o,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Yl={focusedElem:e,selectionRange:n},us=!1,P=t;P!==null;)if(t=P,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,P=e;else for(;P!==null;){t=P;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var j=v.memoizedProps,y=v.memoizedState,m=t.stateNode,c=m.getSnapshotBeforeUpdate(t.elementType===t.type?j:Ue(t.type,j),y);m.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(S(163))}}catch(k){J(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,P=e;break}P=t.return}return v=bo,bo=!1,v}function qn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&ci(t,n,i)}l=l.next}while(l!==r)}}function Fs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function di(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Xc(e){var t=e.alternate;t!==null&&(e.alternate=null,Xc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ge],delete t[dr],delete t[Jl],delete t[Rp],delete t[Op])),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 Jc(e){return e.tag===5||e.tag===3||e.tag===4}function _o(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Jc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function fi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=fs));else if(r!==4&&(e=e.child,e!==null))for(fi(e,t,n),e=e.sibling;e!==null;)fi(e,t,n),e=e.sibling}function pi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(pi(e,t,n),e=e.sibling;e!==null;)pi(e,t,n),e=e.sibling}var ce=null,Be=!1;function ct(e,t,n){for(n=n.child;n!==null;)qc(e,t,n),n=n.sibling}function qc(e,t,n){if(Xe&&typeof Xe.onCommitFiberUnmount=="function")try{Xe.onCommitFiberUnmount(Ls,n)}catch{}switch(n.tag){case 5:he||fn(n,t);case 6:var r=ce,l=Be;ce=null,ct(e,t,n),ce=r,Be=l,ce!==null&&(Be?(e=ce,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ce.removeChild(n.stateNode));break;case 18:ce!==null&&(Be?(e=ce,n=n.stateNode,e.nodeType===8?hl(e.parentNode,n):e.nodeType===1&&hl(e,n),ir(e)):hl(ce,n.stateNode));break;case 4:r=ce,l=Be,ce=n.stateNode.containerInfo,Be=!0,ct(e,t,n),ce=r,Be=l;break;case 0:case 11:case 14:case 15:if(!he&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&ci(n,t,a),l=l.next}while(l!==r)}ct(e,t,n);break;case 1:if(!he&&(fn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){J(n,t,o)}ct(e,t,n);break;case 21:ct(e,t,n);break;case 22:n.mode&1?(he=(r=he)||n.memoizedState!==null,ct(e,t,n),he=r):ct(e,t,n);break;default:ct(e,t,n)}}function Eo(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Xp),t.forEach(function(r){var l=im.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Ae(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var i=e,a=t,o=a;e:for(;o!==null;){switch(o.tag){case 5:ce=o.stateNode,Be=!1;break e;case 3:ce=o.stateNode.containerInfo,Be=!0;break e;case 4:ce=o.stateNode.containerInfo,Be=!0;break e}o=o.return}if(ce===null)throw Error(S(160));qc(i,a,l),ce=null,Be=!1;var u=l.alternate;u!==null&&(u.return=null),l.return=null}catch(f){J(l,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Zc(t,e),t=t.sibling}function Zc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ae(t,e),Ke(e),r&4){try{qn(3,e,e.return),Fs(3,e)}catch(j){J(e,e.return,j)}try{qn(5,e,e.return)}catch(j){J(e,e.return,j)}}break;case 1:Ae(t,e),Ke(e),r&512&&n!==null&&fn(n,n.return);break;case 5:if(Ae(t,e),Ke(e),r&512&&n!==null&&fn(n,n.return),e.flags&32){var l=e.stateNode;try{nr(l,"")}catch(j){J(e,e.return,j)}}if(r&4&&(l=e.stateNode,l!=null)){var i=e.memoizedProps,a=n!==null?n.memoizedProps:i,o=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{o==="input"&&i.type==="radio"&&i.name!=null&&wu(l,i),$l(o,a);var f=$l(o,i);for(a=0;a<u.length;a+=2){var p=u[a],d=u[a+1];p==="style"?_u(l,d):p==="dangerouslySetInnerHTML"?Su(l,d):p==="children"?nr(l,d):Ti(l,p,d,f)}switch(o){case"input":Ml(l,i);break;case"textarea":ku(l,i);break;case"select":var x=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!i.multiple;var w=i.value;w!=null?mn(l,!!i.multiple,w,!1):x!==!!i.multiple&&(i.defaultValue!=null?mn(l,!!i.multiple,i.defaultValue,!0):mn(l,!!i.multiple,i.multiple?[]:"",!1))}l[dr]=i}catch(j){J(e,e.return,j)}}break;case 6:if(Ae(t,e),Ke(e),r&4){if(e.stateNode===null)throw Error(S(162));l=e.stateNode,i=e.memoizedProps;try{l.nodeValue=i}catch(j){J(e,e.return,j)}}break;case 3:if(Ae(t,e),Ke(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ir(t.containerInfo)}catch(j){J(e,e.return,j)}break;case 4:Ae(t,e),Ke(e);break;case 13:Ae(t,e),Ke(e),l=e.child,l.flags&8192&&(i=l.memoizedState!==null,l.stateNode.isHidden=i,!i||l.alternate!==null&&l.alternate.memoizedState!==null||(ua=ee())),r&4&&Eo(e);break;case 22:if(p=n!==null&&n.memoizedState!==null,e.mode&1?(he=(f=he)||p,Ae(t,e),he=f):Ae(t,e),Ke(e),r&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!p&&e.mode&1)for(P=e,p=e.child;p!==null;){for(d=P=p;P!==null;){switch(x=P,w=x.child,x.tag){case 0:case 11:case 14:case 15:qn(4,x,x.return);break;case 1:fn(x,x.return);var v=x.stateNode;if(typeof v.componentWillUnmount=="function"){r=x,n=x.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(j){J(r,n,j)}}break;case 5:fn(x,x.return);break;case 22:if(x.memoizedState!==null){Po(d);continue}}w!==null?(w.return=x,P=w):Po(d)}p=p.sibling}e:for(p=null,d=e;;){if(d.tag===5){if(p===null){p=d;try{l=d.stateNode,f?(i=l.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(o=d.stateNode,u=d.memoizedProps.style,a=u!=null&&u.hasOwnProperty("display")?u.display:null,o.style.display=bu("display",a))}catch(j){J(e,e.return,j)}}}else if(d.tag===6){if(p===null)try{d.stateNode.nodeValue=f?"":d.memoizedProps}catch(j){J(e,e.return,j)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;p===d&&(p=null),d=d.return}p===d&&(p=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Ae(t,e),Ke(e),r&4&&Eo(e);break;case 21:break;default:Ae(t,e),Ke(e)}}function Ke(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Jc(n)){var r=n;break e}n=n.return}throw Error(S(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(nr(l,""),r.flags&=-33);var i=_o(e);pi(e,i,l);break;case 3:case 4:var a=r.stateNode.containerInfo,o=_o(e);fi(e,o,a);break;default:throw Error(S(161))}}catch(u){J(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qp(e,t,n){P=e,ed(e)}function ed(e,t,n){for(var r=(e.mode&1)!==0;P!==null;){var l=P,i=l.child;if(l.tag===22&&r){var a=l.memoizedState!==null||Vr;if(!a){var o=l.alternate,u=o!==null&&o.memoizedState!==null||he;o=Vr;var f=he;if(Vr=a,(he=u)&&!f)for(P=l;P!==null;)a=P,u=a.child,a.tag===22&&a.memoizedState!==null?To(l):u!==null?(u.return=a,P=u):To(l);for(;i!==null;)P=i,ed(i),i=i.sibling;P=l,Vr=o,he=f}Co(e)}else l.subtreeFlags&8772&&i!==null?(i.return=l,P=i):Co(e)}}function Co(e){for(;P!==null;){var t=P;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:he||Fs(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!he)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:Ue(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&fo(t,i,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}fo(t,a,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var f=t.alternate;if(f!==null){var p=f.memoizedState;if(p!==null){var d=p.dehydrated;d!==null&&ir(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(S(163))}he||t.flags&512&&di(t)}catch(x){J(t,t.return,x)}}if(t===e){P=null;break}if(n=t.sibling,n!==null){n.return=t.return,P=n;break}P=t.return}}function Po(e){for(;P!==null;){var t=P;if(t===e){P=null;break}var n=t.sibling;if(n!==null){n.return=t.return,P=n;break}P=t.return}}function To(e){for(;P!==null;){var t=P;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Fs(4,t)}catch(u){J(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(u){J(t,l,u)}}var i=t.return;try{di(t)}catch(u){J(t,i,u)}break;case 5:var a=t.return;try{di(t)}catch(u){J(t,a,u)}}}catch(u){J(t,t.return,u)}if(t===e){P=null;break}var o=t.sibling;if(o!==null){o.return=t.return,P=o;break}P=t.return}}var Zp=Math.ceil,Ns=ot.ReactCurrentDispatcher,aa=ot.ReactCurrentOwner,Ie=ot.ReactCurrentBatchConfig,D=0,ue=null,te=null,de=0,Ee=0,pn=Tt(0),se=0,vr=null,Qt=0,As=0,oa=0,Zn=null,we=null,ua=0,_n=1/0,qe=null,Ss=!1,mi=null,Nt=null,Wr=!1,xt=null,bs=0,er=0,hi=null,ts=-1,ns=0;function ge(){return D&6?ee():ts!==-1?ts:ts=ee()}function St(e){return e.mode&1?D&2&&de!==0?de&-de:Ip.transition!==null?(ns===0&&(ns=Du()),ns):(e=A,e!==0||(e=window.event,e=e===void 0?16:Hu(e.type)),e):1}function He(e,t,n,r){if(50<er)throw er=0,hi=null,Error(S(185));kr(e,n,r),(!(D&2)||e!==ue)&&(e===ue&&(!(D&2)&&(As|=n),se===4&&mt(e,de)),be(e,r),n===1&&D===0&&!(t.mode&1)&&(_n=ee()+500,Is&&Lt()))}function be(e,t){var n=e.callbackNode;If(e,t);var r=os(e,e===ue?de:0);if(r===0)n!==null&&Da(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Da(n),t===1)e.tag===0?zp(Lo.bind(null,e)):cc(Lo.bind(null,e)),Lp(function(){!(D&6)&&Lt()}),n=null;else{switch(Fu(r)){case 1:n=zi;break;case 4:n=Iu;break;case 16:n=as;break;case 536870912:n=$u;break;default:n=as}n=od(n,td.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function td(e,t){if(ts=-1,ns=0,D&6)throw Error(S(327));var n=e.callbackNode;if(yn()&&e.callbackNode!==n)return null;var r=os(e,e===ue?de:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=_s(e,r);else{t=r;var l=D;D|=2;var i=rd();(ue!==e||de!==t)&&(qe=null,_n=ee()+500,Ut(e,t));do try{nm();break}catch(o){nd(e,o)}while(!0);Yi(),Ns.current=i,D=l,te!==null?t=0:(ue=null,de=0,t=se)}if(t!==0){if(t===2&&(l=Bl(e),l!==0&&(r=l,t=xi(e,l))),t===1)throw n=vr,Ut(e,0),mt(e,r),be(e,ee()),n;if(t===6)mt(e,r);else{if(l=e.current.alternate,!(r&30)&&!em(l)&&(t=_s(e,r),t===2&&(i=Bl(e),i!==0&&(r=i,t=xi(e,i))),t===1))throw n=vr,Ut(e,0),mt(e,r),be(e,ee()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(S(345));case 2:$t(e,we,qe);break;case 3:if(mt(e,r),(r&130023424)===r&&(t=ua+500-ee(),10<t)){if(os(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){ge(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=Xl($t.bind(null,e,we,qe),t);break}$t(e,we,qe);break;case 4:if(mt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var a=31-We(r);i=1<<a,a=t[a],a>l&&(l=a),r&=~i}if(r=l,r=ee()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Zp(r/1960))-r,10<r){e.timeoutHandle=Xl($t.bind(null,e,we,qe),r);break}$t(e,we,qe);break;case 5:$t(e,we,qe);break;default:throw Error(S(329))}}}return be(e,ee()),e.callbackNode===n?td.bind(null,e):null}function xi(e,t){var n=Zn;return e.current.memoizedState.isDehydrated&&(Ut(e,t).flags|=256),e=_s(e,t),e!==2&&(t=we,we=n,t!==null&&vi(t)),e}function vi(e){we===null?we=e:we.push.apply(we,e)}function em(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var l=n[r],i=l.getSnapshot;l=l.value;try{if(!Qe(i(),l))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function mt(e,t){for(t&=~oa,t&=~As,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-We(t),r=1<<n;e[n]=-1,t&=~r}}function Lo(e){if(D&6)throw Error(S(327));yn();var t=os(e,0);if(!(t&1))return be(e,ee()),null;var n=_s(e,t);if(e.tag!==0&&n===2){var r=Bl(e);r!==0&&(t=r,n=xi(e,r))}if(n===1)throw n=vr,Ut(e,0),mt(e,t),be(e,ee()),n;if(n===6)throw Error(S(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,$t(e,we,qe),be(e,ee()),null}function ca(e,t){var n=D;D|=1;try{return e(t)}finally{D=n,D===0&&(_n=ee()+500,Is&&Lt())}}function Kt(e){xt!==null&&xt.tag===0&&!(D&6)&&yn();var t=D;D|=1;var n=Ie.transition,r=A;try{if(Ie.transition=null,A=1,e)return e()}finally{A=r,Ie.transition=n,D=t,!(D&6)&&Lt()}}function da(){Ee=pn.current,W(pn)}function Ut(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Tp(n)),te!==null)for(n=te.return;n!==null;){var r=n;switch(Hi(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ps();break;case 3:Sn(),W(Ne),W(xe),ea();break;case 5:Zi(r);break;case 4:Sn();break;case 13:W(Q);break;case 19:W(Q);break;case 10:Gi(r.type._context);break;case 22:case 23:da()}n=n.return}if(ue=e,te=e=bt(e.current,null),de=Ee=t,se=0,vr=null,oa=As=Qt=0,we=Zn=null,Ft!==null){for(t=0;t<Ft.length;t++)if(n=Ft[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,i=n.pending;if(i!==null){var a=i.next;i.next=l,r.next=a}n.pending=r}Ft=null}return e}function nd(e,t){do{var n=te;try{if(Yi(),qr.current=ks,ws){for(var r=K.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}ws=!1}if(Ht=0,oe=re=K=null,Jn=!1,mr=0,aa.current=null,n===null||n.return===null){se=1,vr=t,te=null;break}e:{var i=e,a=n.return,o=n,u=t;if(t=de,o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var f=u,p=o,d=p.tag;if(!(p.mode&1)&&(d===0||d===11||d===15)){var x=p.alternate;x?(p.updateQueue=x.updateQueue,p.memoizedState=x.memoizedState,p.lanes=x.lanes):(p.updateQueue=null,p.memoizedState=null)}var w=go(a);if(w!==null){w.flags&=-257,yo(w,a,o,i,t),w.mode&1&&vo(i,f,t),t=w,u=f;var v=t.updateQueue;if(v===null){var j=new Set;j.add(u),t.updateQueue=j}else v.add(u);break e}else{if(!(t&1)){vo(i,f,t),fa();break e}u=Error(S(426))}}else if(H&&o.mode&1){var y=go(a);if(y!==null){!(y.flags&65536)&&(y.flags|=256),yo(y,a,o,i,t),Qi(bn(u,o));break e}}i=u=bn(u,o),se!==4&&(se=2),Zn===null?Zn=[i]:Zn.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=Fc(i,u,t);co(i,m);break e;case 1:o=u;var c=i.type,h=i.stateNode;if(!(i.flags&128)&&(typeof c.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Nt===null||!Nt.has(h)))){i.flags|=65536,t&=-t,i.lanes|=t;var k=Ac(i,o,t);co(i,k);break e}}i=i.return}while(i!==null)}ld(n)}catch(b){t=b,te===n&&n!==null&&(te=n=n.return);continue}break}while(!0)}function rd(){var e=Ns.current;return Ns.current=ks,e===null?ks:e}function fa(){(se===0||se===3||se===2)&&(se=4),ue===null||!(Qt&268435455)&&!(As&268435455)||mt(ue,de)}function _s(e,t){var n=D;D|=2;var r=rd();(ue!==e||de!==t)&&(qe=null,Ut(e,t));do try{tm();break}catch(l){nd(e,l)}while(!0);if(Yi(),D=n,Ns.current=r,te!==null)throw Error(S(261));return ue=null,de=0,se}function tm(){for(;te!==null;)sd(te)}function nm(){for(;te!==null&&!Ef();)sd(te)}function sd(e){var t=ad(e.alternate,e,Ee);e.memoizedProps=e.pendingProps,t===null?ld(e):te=t,aa.current=null}function ld(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Gp(n,t),n!==null){n.flags&=32767,te=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{se=6,te=null;return}}else if(n=Yp(n,t,Ee),n!==null){te=n;return}if(t=t.sibling,t!==null){te=t;return}te=t=e}while(t!==null);se===0&&(se=5)}function $t(e,t,n){var r=A,l=Ie.transition;try{Ie.transition=null,A=1,rm(e,t,n,r)}finally{Ie.transition=l,A=r}return null}function rm(e,t,n,r){do yn();while(xt!==null);if(D&6)throw Error(S(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(S(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if($f(e,i),e===ue&&(te=ue=null,de=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Wr||(Wr=!0,od(as,function(){return yn(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Ie.transition,Ie.transition=null;var a=A;A=1;var o=D;D|=4,aa.current=null,Jp(e,n),Zc(n,e),Np(Yl),us=!!Kl,Yl=Kl=null,e.current=n,qp(n),Cf(),D=o,A=a,Ie.transition=i}else e.current=n;if(Wr&&(Wr=!1,xt=e,bs=l),i=e.pendingLanes,i===0&&(Nt=null),Lf(n.stateNode),be(e,ee()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(Ss)throw Ss=!1,e=mi,mi=null,e;return bs&1&&e.tag!==0&&yn(),i=e.pendingLanes,i&1?e===hi?er++:(er=0,hi=e):er=0,Lt(),null}function yn(){if(xt!==null){var e=Fu(bs),t=Ie.transition,n=A;try{if(Ie.transition=null,A=16>e?16:e,xt===null)var r=!1;else{if(e=xt,xt=null,bs=0,D&6)throw Error(S(331));var l=D;for(D|=4,P=e.current;P!==null;){var i=P,a=i.child;if(P.flags&16){var o=i.deletions;if(o!==null){for(var u=0;u<o.length;u++){var f=o[u];for(P=f;P!==null;){var p=P;switch(p.tag){case 0:case 11:case 15:qn(8,p,i)}var d=p.child;if(d!==null)d.return=p,P=d;else for(;P!==null;){p=P;var x=p.sibling,w=p.return;if(Xc(p),p===f){P=null;break}if(x!==null){x.return=w,P=x;break}P=w}}}var v=i.alternate;if(v!==null){var j=v.child;if(j!==null){v.child=null;do{var y=j.sibling;j.sibling=null,j=y}while(j!==null)}}P=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,P=a;else e:for(;P!==null;){if(i=P,i.flags&2048)switch(i.tag){case 0:case 11:case 15:qn(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,P=m;break e}P=i.return}}var c=e.current;for(P=c;P!==null;){a=P;var h=a.child;if(a.subtreeFlags&2064&&h!==null)h.return=a,P=h;else e:for(a=c;P!==null;){if(o=P,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:Fs(9,o)}}catch(b){J(o,o.return,b)}if(o===a){P=null;break e}var k=o.sibling;if(k!==null){k.return=o.return,P=k;break e}P=o.return}}if(D=l,Lt(),Xe&&typeof Xe.onPostCommitFiberRoot=="function")try{Xe.onPostCommitFiberRoot(Ls,e)}catch{}r=!0}return r}finally{A=n,Ie.transition=t}}return!1}function Mo(e,t,n){t=bn(n,t),t=Fc(e,t,1),e=kt(e,t,1),t=ge(),e!==null&&(kr(e,1,t),be(e,t))}function J(e,t,n){if(e.tag===3)Mo(e,e,n);else for(;t!==null;){if(t.tag===3){Mo(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Nt===null||!Nt.has(r))){e=bn(n,e),e=Ac(t,e,1),t=kt(t,e,1),e=ge(),t!==null&&(kr(t,1,e),be(t,e));break}}t=t.return}}function sm(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ge(),e.pingedLanes|=e.suspendedLanes&n,ue===e&&(de&n)===n&&(se===4||se===3&&(de&130023424)===de&&500>ee()-ua?Ut(e,0):oa|=n),be(e,t)}function id(e,t){t===0&&(e.mode&1?(t=Or,Or<<=1,!(Or&130023424)&&(Or=4194304)):t=1);var n=ge();e=lt(e,t),e!==null&&(kr(e,t,n),be(e,n))}function lm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),id(e,n)}function im(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(S(314))}r!==null&&r.delete(t),id(e,n)}var ad;ad=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ne.current)ke=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ke=!1,Kp(e,t,n);ke=!!(e.flags&131072)}else ke=!1,H&&t.flags&1048576&&dc(t,xs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;es(e,t),e=t.pendingProps;var l=wn(t,xe.current);gn(t,n),l=na(null,t,r,e,l,n);var i=ra();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Se(r)?(i=!0,ms(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ji(t),l.updater=Ds,t.stateNode=l,l._reactInternals=t,ri(t,r,e,n),t=ii(null,t,r,!0,i,n)):(t.tag=0,H&&i&&Wi(t),ve(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(es(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=om(r),e=Ue(r,e),l){case 0:t=li(null,t,r,e,n);break e;case 1:t=ko(null,t,r,e,n);break e;case 11:t=jo(null,t,r,e,n);break e;case 14:t=wo(null,t,r,Ue(r.type,e),n);break e}throw Error(S(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ue(r,l),li(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ue(r,l),ko(e,t,r,l,n);case 3:e:{if(Wc(t),e===null)throw Error(S(387));r=t.pendingProps,i=t.memoizedState,l=i.element,vc(e,t),ys(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=bn(Error(S(423)),t),t=No(e,t,r,n,l);break e}else if(r!==l){l=bn(Error(S(424)),t),t=No(e,t,r,n,l);break e}else for(Ce=wt(t.stateNode.containerInfo.firstChild),Pe=t,H=!0,Ve=null,n=hc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(kn(),r===l){t=it(e,t,n);break e}ve(e,t,r,n)}t=t.child}return t;case 5:return gc(t),e===null&&ei(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,a=l.children,Gl(r,l)?a=null:i!==null&&Gl(r,i)&&(t.flags|=32),Vc(e,t),ve(e,t,a,n),t.child;case 6:return e===null&&ei(t),null;case 13:return Hc(e,t,n);case 4:return qi(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Nn(t,null,r,n):ve(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ue(r,l),jo(e,t,r,l,n);case 7:return ve(e,t,t.pendingProps,n),t.child;case 8:return ve(e,t,t.pendingProps.children,n),t.child;case 12:return ve(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,a=l.value,U(vs,r._currentValue),r._currentValue=a,i!==null)if(Qe(i.value,a)){if(i.children===l.children&&!Ne.current){t=it(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var o=i.dependencies;if(o!==null){a=i.child;for(var u=o.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=nt(-1,n&-n),u.tag=2;var f=i.updateQueue;if(f!==null){f=f.shared;var p=f.pending;p===null?u.next=u:(u.next=p.next,p.next=u),f.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),ti(i.return,n,t),o.lanes|=n;break}u=u.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(S(341));a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),ti(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}ve(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,gn(t,n),l=$e(l),r=r(l),t.flags|=1,ve(e,t,r,n),t.child;case 14:return r=t.type,l=Ue(r,t.pendingProps),l=Ue(r.type,l),wo(e,t,r,l,n);case 15:return Uc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ue(r,l),es(e,t),t.tag=1,Se(r)?(e=!0,ms(t)):e=!1,gn(t,n),Dc(t,r,l),ri(t,r,l,n),ii(null,t,r,!0,e,n);case 19:return Qc(e,t,n);case 22:return Bc(e,t,n)}throw Error(S(156,t.tag))};function od(e,t){return zu(e,t)}function am(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 ze(e,t,n,r){return new am(e,t,n,r)}function pa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function om(e){if(typeof e=="function")return pa(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Mi)return 11;if(e===Ri)return 14}return 2}function bt(e,t){var n=e.alternate;return n===null?(n=ze(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function rs(e,t,n,r,l,i){var a=2;if(r=e,typeof e=="function")pa(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case nn:return Bt(n.children,l,i,t);case Li:a=8,l|=8;break;case El:return e=ze(12,n,t,l|2),e.elementType=El,e.lanes=i,e;case Cl:return e=ze(13,n,t,l),e.elementType=Cl,e.lanes=i,e;case Pl:return e=ze(19,n,t,l),e.elementType=Pl,e.lanes=i,e;case gu:return Us(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xu:a=10;break e;case vu:a=9;break e;case Mi:a=11;break e;case Ri:a=14;break e;case dt:a=16,r=null;break e}throw Error(S(130,e==null?e:typeof e,""))}return t=ze(a,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function Bt(e,t,n,r){return e=ze(7,e,r,t),e.lanes=n,e}function Us(e,t,n,r){return e=ze(22,e,r,t),e.elementType=gu,e.lanes=n,e.stateNode={isHidden:!1},e}function Nl(e,t,n){return e=ze(6,e,null,t),e.lanes=n,e}function Sl(e,t,n){return t=ze(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function um(e,t,n,r,l){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=sl(0),this.expirationTimes=sl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function ma(e,t,n,r,l,i,a,o,u){return e=new um(e,t,n,o,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ze(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ji(i),e}function cm(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:tn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function ud(e){if(!e)return Ct;e=e._reactInternals;e:{if(Xt(e)!==e||e.tag!==1)throw Error(S(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Se(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(S(171))}if(e.tag===1){var n=e.type;if(Se(n))return uc(e,n,t)}return t}function cd(e,t,n,r,l,i,a,o,u){return e=ma(n,r,!0,e,l,i,a,o,u),e.context=ud(null),n=e.current,r=ge(),l=St(n),i=nt(r,l),i.callback=t??null,kt(n,i,l),e.current.lanes=l,kr(e,l,r),be(e,r),e}function Bs(e,t,n,r){var l=t.current,i=ge(),a=St(l);return n=ud(n),t.context===null?t.context=n:t.pendingContext=n,t=nt(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=kt(l,t,a),e!==null&&(He(e,l,a,i),Jr(e,l,a)),a}function Es(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Ro(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ha(e,t){Ro(e,t),(e=e.alternate)&&Ro(e,t)}function dm(){return null}var dd=typeof reportError=="function"?reportError:function(e){console.error(e)};function xa(e){this._internalRoot=e}Vs.prototype.render=xa.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(S(409));Bs(e,t,null,null)};Vs.prototype.unmount=xa.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Kt(function(){Bs(null,e,null,null)}),t[st]=null}};function Vs(e){this._internalRoot=e}Vs.prototype.unstable_scheduleHydration=function(e){if(e){var t=Bu();e={blockedOn:null,target:e,priority:t};for(var n=0;n<pt.length&&t!==0&&t<pt[n].priority;n++);pt.splice(n,0,e),n===0&&Wu(e)}};function va(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ws(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Oo(){}function fm(e,t,n,r,l){if(l){if(typeof r=="function"){var i=r;r=function(){var f=Es(a);i.call(f)}}var a=cd(t,r,e,0,null,!1,!1,"",Oo);return e._reactRootContainer=a,e[st]=a.current,ur(e.nodeType===8?e.parentNode:e),Kt(),a}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var o=r;r=function(){var f=Es(u);o.call(f)}}var u=ma(e,0,!1,null,null,!1,!1,"",Oo);return e._reactRootContainer=u,e[st]=u.current,ur(e.nodeType===8?e.parentNode:e),Kt(function(){Bs(t,u,n,r)}),u}function Hs(e,t,n,r,l){var i=n._reactRootContainer;if(i){var a=i;if(typeof l=="function"){var o=l;l=function(){var u=Es(a);o.call(u)}}Bs(t,a,e,l)}else a=fm(n,t,e,l,r);return Es(a)}Au=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Wn(t.pendingLanes);n!==0&&(Ii(t,n|1),be(t,ee()),!(D&6)&&(_n=ee()+500,Lt()))}break;case 13:Kt(function(){var r=lt(e,1);if(r!==null){var l=ge();He(r,e,1,l)}}),ha(e,1)}};$i=function(e){if(e.tag===13){var t=lt(e,134217728);if(t!==null){var n=ge();He(t,e,134217728,n)}ha(e,134217728)}};Uu=function(e){if(e.tag===13){var t=St(e),n=lt(e,t);if(n!==null){var r=ge();He(n,e,t,r)}ha(e,t)}};Bu=function(){return A};Vu=function(e,t){var n=A;try{return A=e,t()}finally{A=n}};Fl=function(e,t,n){switch(t){case"input":if(Ml(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=zs(r);if(!l)throw Error(S(90));ju(r),Ml(r,l)}}}break;case"textarea":ku(e,n);break;case"select":t=n.value,t!=null&&mn(e,!!n.multiple,t,!1)}};Pu=ca;Tu=Kt;var pm={usingClientEntryPoint:!1,Events:[Sr,an,zs,Eu,Cu,ca]},An={findFiberByHostInstance:Dt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},mm={bundleType:An.bundleType,version:An.version,rendererPackageName:An.rendererPackageName,rendererConfig:An.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ot.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ru(e),e===null?null:e.stateNode},findFiberByHostInstance:An.findFiberByHostInstance||dm,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hr.isDisabled&&Hr.supportsFiber)try{Ls=Hr.inject(mm),Xe=Hr}catch{}}Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pm;Le.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!va(t))throw Error(S(200));return cm(e,t,null,n)};Le.createRoot=function(e,t){if(!va(e))throw Error(S(299));var n=!1,r="",l=dd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=ma(e,1,!1,null,null,n,!1,r,l),e[st]=t.current,ur(e.nodeType===8?e.parentNode:e),new xa(t)};Le.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(S(188)):(e=Object.keys(e).join(","),Error(S(268,e)));return e=Ru(t),e=e===null?null:e.stateNode,e};Le.flushSync=function(e){return Kt(e)};Le.hydrate=function(e,t,n){if(!Ws(t))throw Error(S(200));return Hs(null,e,t,!0,n)};Le.hydrateRoot=function(e,t,n){if(!va(e))throw Error(S(405));var r=n!=null&&n.hydratedSources||null,l=!1,i="",a=dd;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=cd(t,null,e,1,n??null,l,!1,i,a),e[st]=t.current,ur(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new Vs(t)};Le.render=function(e,t,n){if(!Ws(t))throw Error(S(200));return Hs(null,e,t,!1,n)};Le.unmountComponentAtNode=function(e){if(!Ws(e))throw Error(S(40));return e._reactRootContainer?(Kt(function(){Hs(null,null,e,!1,function(){e._reactRootContainer=null,e[st]=null})}),!0):!1};Le.unstable_batchedUpdates=ca;Le.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ws(n))throw Error(S(200));if(e==null||e._reactInternals===void 0)throw Error(S(38));return Hs(e,t,n,!1,r)};Le.version="18.3.1-next-f1338f8080-20240426";function fd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(fd)}catch(e){console.error(e)}}fd(),fu.exports=Le;var pd=fu.exports,md,zo=pd;md=zo.createRoot,zo.hydrateRoot;/**
|
|
41
|
+
* @remix-run/router v1.23.2
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/function gr(){return gr=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},gr.apply(this,arguments)}var vt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(vt||(vt={}));const Io="popstate";function hm(e){e===void 0&&(e={});function t(r,l){let{pathname:i,search:a,hash:o}=r.location;return gi("",{pathname:i,search:a,hash:o},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function n(r,l){return typeof l=="string"?l:Cs(l)}return vm(t,n,null,e)}function q(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ga(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function xm(){return Math.random().toString(36).substr(2,8)}function $o(e,t){return{usr:e.state,key:e.key,idx:t}}function gi(e,t,n,r){return n===void 0&&(n=null),gr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ln(t):t,{state:n,key:t&&t.key||r||xm()})}function Cs(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 Ln(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function vm(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:i=!1}=r,a=l.history,o=vt.Pop,u=null,f=p();f==null&&(f=0,a.replaceState(gr({},a.state,{idx:f}),""));function p(){return(a.state||{idx:null}).idx}function d(){o=vt.Pop;let y=p(),m=y==null?null:y-f;f=y,u&&u({action:o,location:j.location,delta:m})}function x(y,m){o=vt.Push;let c=gi(j.location,y,m);f=p()+1;let h=$o(c,f),k=j.createHref(c);try{a.pushState(h,"",k)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;l.location.assign(k)}i&&u&&u({action:o,location:j.location,delta:1})}function w(y,m){o=vt.Replace;let c=gi(j.location,y,m);f=p();let h=$o(c,f),k=j.createHref(c);a.replaceState(h,"",k),i&&u&&u({action:o,location:j.location,delta:0})}function v(y){let m=l.location.origin!=="null"?l.location.origin:l.location.href,c=typeof y=="string"?y:Cs(y);return c=c.replace(/ $/,"%20"),q(m,"No window.location.(origin|href) available to create URL for href: "+c),new URL(c,m)}let j={get action(){return o},get location(){return e(l,a)},listen(y){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(Io,d),u=y,()=>{l.removeEventListener(Io,d),u=null}},createHref(y){return t(l,y)},createURL:v,encodeLocation(y){let m=v(y);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:x,replace:w,go(y){return a.go(y)}};return j}var Do;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Do||(Do={}));function gm(e,t,n){return n===void 0&&(n="/"),ym(e,t,n)}function ym(e,t,n,r){let l=typeof t=="string"?Ln(t):t,i=En(l.pathname||"/",n);if(i==null)return null;let a=hd(e);jm(a);let o=null;for(let u=0;o==null&&u<a.length;++u){let f=Lm(i);o=Pm(a[u],f)}return o}function hd(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let l=(i,a,o)=>{let u={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};u.relativePath.startsWith("/")&&(q(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let f=_t([r,u.relativePath]),p=n.concat(u);i.children&&i.children.length>0&&(q(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),hd(i.children,t,p,f)),!(i.path==null&&!i.index)&&t.push({path:f,score:Em(f,i.index),routesMeta:p})};return e.forEach((i,a)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))l(i,a);else for(let u of xd(i.path))l(i,a,u)}),t}function xd(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return l?[i,""]:[i];let a=xd(r.join("/")),o=[];return o.push(...a.map(u=>u===""?i:[i,u].join("/"))),l&&o.push(...a),o.map(u=>e.startsWith("/")&&u===""?"/":u)}function jm(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Cm(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const wm=/^:[\w-]+$/,km=3,Nm=2,Sm=1,bm=10,_m=-2,Fo=e=>e==="*";function Em(e,t){let n=e.split("/"),r=n.length;return n.some(Fo)&&(r+=_m),t&&(r+=Nm),n.filter(l=>!Fo(l)).reduce((l,i)=>l+(wm.test(i)?km:i===""?Sm:bm),r)}function Cm(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function Pm(e,t,n){let{routesMeta:r}=e,l={},i="/",a=[];for(let o=0;o<r.length;++o){let u=r[o],f=o===r.length-1,p=i==="/"?t:t.slice(i.length)||"/",d=yi({path:u.relativePath,caseSensitive:u.caseSensitive,end:f},p),x=u.route;if(!d)return null;Object.assign(l,d.params),a.push({params:l,pathname:_t([i,d.pathname]),pathnameBase:Im(_t([i,d.pathnameBase])),route:x}),d.pathnameBase!=="/"&&(i=_t([i,d.pathnameBase]))}return a}function yi(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Tm(e.path,e.caseSensitive,e.end),l=t.match(n);if(!l)return null;let i=l[0],a=i.replace(/(.)\/+$/,"$1"),o=l.slice(1);return{params:r.reduce((f,p,d)=>{let{paramName:x,isOptional:w}=p;if(x==="*"){let j=o[d]||"";a=i.slice(0,i.length-j.length).replace(/(.)\/+$/,"$1")}const v=o[d];return w&&!v?f[x]=void 0:f[x]=(v||"").replace(/%2F/g,"/"),f},{}),pathname:i,pathnameBase:a,pattern:e}}function Tm(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ga(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=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,u)=>(r.push({paramName:o,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function Lm(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ga(!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 En(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 Mm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Rm=e=>Mm.test(e);function Om(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?Ln(e):e,i;if(n)if(Rm(n))i=n;else{if(n.includes("//")){let a=n;n=n.replace(/\/\/+/g,"/"),ga(!1,"Pathnames cannot have embedded double slashes - normalizing "+(a+" -> "+n))}n.startsWith("/")?i=Ao(n.substring(1),"/"):i=Ao(n,t)}else i=t;return{pathname:i,search:$m(r),hash:Dm(l)}}function Ao(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function bl(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 zm(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function vd(e,t){let n=zm(e);return t?n.map((r,l)=>l===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function gd(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=Ln(e):(l=gr({},e),q(!l.pathname||!l.pathname.includes("?"),bl("?","pathname","search",l)),q(!l.pathname||!l.pathname.includes("#"),bl("#","pathname","hash",l)),q(!l.search||!l.search.includes("#"),bl("#","search","hash",l)));let i=e===""||l.pathname==="",a=i?"/":l.pathname,o;if(a==null)o=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let x=a.split("/");for(;x[0]==="..";)x.shift(),d-=1;l.pathname=x.join("/")}o=d>=0?t[d]:"/"}let u=Om(l,o),f=a&&a!=="/"&&a.endsWith("/"),p=(i||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(f||p)&&(u.pathname+="/"),u}const _t=e=>e.join("/").replace(/\/\/+/g,"/"),Im=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$m=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Dm=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Fm(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const yd=["post","put","patch","delete"];new Set(yd);const Am=["get",...yd];new Set(Am);/**
|
|
50
|
+
* React Router v6.30.3
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/function yr(){return yr=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},yr.apply(this,arguments)}const Qs=g.createContext(null),jd=g.createContext(null),Mt=g.createContext(null),Ks=g.createContext(null),ut=g.createContext({outlet:null,matches:[],isDataRoute:!1}),wd=g.createContext(null);function Um(e,t){let{relative:n}=t===void 0?{}:t;_r()||q(!1);let{basename:r,navigator:l}=g.useContext(Mt),{hash:i,pathname:a,search:o}=Ys(e,{relative:n}),u=a;return r!=="/"&&(u=a==="/"?r:_t([r,a])),l.createHref({pathname:u,search:o,hash:i})}function _r(){return g.useContext(Ks)!=null}function Jt(){return _r()||q(!1),g.useContext(Ks).location}function kd(e){g.useContext(Mt).static||g.useLayoutEffect(e)}function Nd(){let{isDataRoute:e}=g.useContext(ut);return e?th():Bm()}function Bm(){_r()||q(!1);let e=g.useContext(Qs),{basename:t,future:n,navigator:r}=g.useContext(Mt),{matches:l}=g.useContext(ut),{pathname:i}=Jt(),a=JSON.stringify(vd(l,n.v7_relativeSplatPath)),o=g.useRef(!1);return kd(()=>{o.current=!0}),g.useCallback(function(f,p){if(p===void 0&&(p={}),!o.current)return;if(typeof f=="number"){r.go(f);return}let d=gd(f,JSON.parse(a),i,p.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:_t([t,d.pathname])),(p.replace?r.replace:r.push)(d,p.state,p)},[t,r,a,i,e])}const Sd=g.createContext(null);function Fe(){return g.useContext(Sd)}function Vm(e){let t=g.useContext(ut).outlet;return t&&g.createElement(Sd.Provider,{value:e},t)}function ya(){let{matches:e}=g.useContext(ut),t=e[e.length-1];return t?t.params:{}}function Ys(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=g.useContext(Mt),{matches:l}=g.useContext(ut),{pathname:i}=Jt(),a=JSON.stringify(vd(l,r.v7_relativeSplatPath));return g.useMemo(()=>gd(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function Wm(e,t){return Hm(e,t)}function Hm(e,t,n,r){_r()||q(!1);let{navigator:l}=g.useContext(Mt),{matches:i}=g.useContext(ut),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let u=a?a.pathnameBase:"/";a&&a.route;let f=Jt(),p;if(t){var d;let y=typeof t=="string"?Ln(t):t;u==="/"||(d=y.pathname)!=null&&d.startsWith(u)||q(!1),p=y}else p=f;let x=p.pathname||"/",w=x;if(u!=="/"){let y=u.replace(/^\//,"").split("/");w="/"+x.replace(/^\//,"").split("/").slice(y.length).join("/")}let v=gm(e,{pathname:w}),j=Xm(v&&v.map(y=>Object.assign({},y,{params:Object.assign({},o,y.params),pathname:_t([u,l.encodeLocation?l.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?u:_t([u,l.encodeLocation?l.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n,r);return t&&j?g.createElement(Ks.Provider,{value:{location:yr({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:vt.Pop}},j):j}function Qm(){let e=eh(),t=Fm(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:l},n):null,null)}const Km=g.createElement(Qm,null);class Ym extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?g.createElement(ut.Provider,{value:this.props.routeContext},g.createElement(wd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Gm(e){let{routeContext:t,match:n,children:r}=e,l=g.useContext(Qs);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),g.createElement(ut.Provider,{value:t},r)}function Xm(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=(l=n)==null?void 0:l.errors;if(o!=null){let p=a.findIndex(d=>d.route.id&&(o==null?void 0:o[d.route.id])!==void 0);p>=0||q(!1),a=a.slice(0,Math.min(a.length,p+1))}let u=!1,f=-1;if(n&&r&&r.v7_partialHydration)for(let p=0;p<a.length;p++){let d=a[p];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(f=p),d.route.id){let{loaderData:x,errors:w}=n,v=d.route.loader&&x[d.route.id]===void 0&&(!w||w[d.route.id]===void 0);if(d.route.lazy||v){u=!0,f>=0?a=a.slice(0,f+1):a=[a[0]];break}}}return a.reduceRight((p,d,x)=>{let w,v=!1,j=null,y=null;n&&(w=o&&d.route.id?o[d.route.id]:void 0,j=d.route.errorElement||Km,u&&(f<0&&x===0?(nh("route-fallback"),v=!0,y=null):f===x&&(v=!0,y=d.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,x+1)),c=()=>{let h;return w?h=j:v?h=y:d.route.Component?h=g.createElement(d.route.Component,null):d.route.element?h=d.route.element:h=p,g.createElement(Gm,{match:d,routeContext:{outlet:p,matches:m,isDataRoute:n!=null},children:h})};return n&&(d.route.ErrorBoundary||d.route.errorElement||x===0)?g.createElement(Ym,{location:n.location,revalidation:n.revalidation,component:j,error:w,children:c(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):c()},null)}var bd=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(bd||{}),_d=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}(_d||{});function Jm(e){let t=g.useContext(Qs);return t||q(!1),t}function qm(e){let t=g.useContext(jd);return t||q(!1),t}function Zm(e){let t=g.useContext(ut);return t||q(!1),t}function Ed(e){let t=Zm(),n=t.matches[t.matches.length-1];return n.route.id||q(!1),n.route.id}function eh(){var e;let t=g.useContext(wd),n=qm(),r=Ed();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function th(){let{router:e}=Jm(bd.UseNavigateStable),t=Ed(_d.UseNavigateStable),n=g.useRef(!1);return kd(()=>{n.current=!0}),g.useCallback(function(l,i){i===void 0&&(i={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,yr({fromRouteId:t},i)))},[e,t])}const Uo={};function nh(e,t,n){Uo[e]||(Uo[e]=!0)}function rh(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Cd(e){return Vm(e.context)}function V(e){q(!1)}function sh(e){let{basename:t="/",children:n=null,location:r,navigationType:l=vt.Pop,navigator:i,static:a=!1,future:o}=e;_r()&&q(!1);let u=t.replace(/^\/*/,"/"),f=g.useMemo(()=>({basename:u,navigator:i,static:a,future:yr({v7_relativeSplatPath:!1},o)}),[u,o,i,a]);typeof r=="string"&&(r=Ln(r));let{pathname:p="/",search:d="",hash:x="",state:w=null,key:v="default"}=r,j=g.useMemo(()=>{let y=En(p,u);return y==null?null:{location:{pathname:y,search:d,hash:x,state:w,key:v},navigationType:l}},[u,p,d,x,w,v,l]);return j==null?null:g.createElement(Mt.Provider,{value:f},g.createElement(Ks.Provider,{children:n,value:j}))}function lh(e){let{children:t,location:n}=e;return Wm(ji(t),n)}new Promise(()=>{});function ji(e,t){t===void 0&&(t=[]);let n=[];return g.Children.forEach(e,(r,l)=>{if(!g.isValidElement(r))return;let i=[...t,l];if(r.type===g.Fragment){n.push.apply(n,ji(r.props.children,i));return}r.type!==V&&q(!1),!r.props.index||!r.props.children||q(!1);let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=ji(r.props.children,i)),n.push(a)}),n}/**
|
|
59
|
+
* React Router DOM v6.30.3
|
|
60
|
+
*
|
|
61
|
+
* Copyright (c) Remix Software Inc.
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the MIT license found in the
|
|
64
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
65
|
+
*
|
|
66
|
+
* @license MIT
|
|
67
|
+
*/function Ps(){return Ps=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},Ps.apply(this,arguments)}function Pd(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,i;for(i=0;i<r.length;i++)l=r[i],!(t.indexOf(l)>=0)&&(n[l]=e[l]);return n}function ih(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ah(e,t){return e.button===0&&(!t||t==="_self")&&!ih(e)}const oh=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],uh=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],ch="6";try{window.__reactRouterVersion=ch}catch{}const dh=g.createContext({isTransitioning:!1}),fh="startTransition",Bo=rf[fh];function ph(e){let{basename:t,children:n,future:r,window:l}=e,i=g.useRef();i.current==null&&(i.current=hm({window:l,v5Compat:!0}));let a=i.current,[o,u]=g.useState({action:a.action,location:a.location}),{v7_startTransition:f}=r||{},p=g.useCallback(d=>{f&&Bo?Bo(()=>u(d)):u(d)},[u,f]);return g.useLayoutEffect(()=>a.listen(p),[a,p]),g.useEffect(()=>rh(r),[r]),g.createElement(sh,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:a,future:r})}const mh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",hh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,X=g.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:i,replace:a,state:o,target:u,to:f,preventScrollReset:p,viewTransition:d}=t,x=Pd(t,oh),{basename:w}=g.useContext(Mt),v,j=!1;if(typeof f=="string"&&hh.test(f)&&(v=f,mh))try{let h=new URL(window.location.href),k=f.startsWith("//")?new URL(h.protocol+f):new URL(f),b=En(k.pathname,w);k.origin===h.origin&&b!=null?f=b+k.search+k.hash:j=!0}catch{}let y=Um(f,{relative:l}),m=gh(f,{replace:a,state:o,target:u,preventScrollReset:p,relative:l,viewTransition:d});function c(h){r&&r(h),h.defaultPrevented||m(h)}return g.createElement("a",Ps({},x,{href:v||y,onClick:j||i?r:c,ref:n,target:u}))}),xh=g.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:l=!1,className:i="",end:a=!1,style:o,to:u,viewTransition:f,children:p}=t,d=Pd(t,uh),x=Ys(u,{relative:d.relative}),w=Jt(),v=g.useContext(jd),{navigator:j,basename:y}=g.useContext(Mt),m=v!=null&&yh(x)&&f===!0,c=j.encodeLocation?j.encodeLocation(x).pathname:x.pathname,h=w.pathname,k=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;l||(h=h.toLowerCase(),k=k?k.toLowerCase():null,c=c.toLowerCase()),k&&y&&(k=En(k,y)||k);const b=c!=="/"&&c.endsWith("/")?c.length-1:c.length;let N=h===c||!a&&h.startsWith(c)&&h.charAt(b)==="/",_=k!=null&&(k===c||!a&&k.startsWith(c)&&k.charAt(c.length)==="/"),E={isActive:N,isPending:_,isTransitioning:m},F=N?r:void 0,L;typeof i=="function"?L=i(E):L=[i,N?"active":null,_?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let C=typeof o=="function"?o(E):o;return g.createElement(X,Ps({},d,{"aria-current":F,className:L,ref:n,style:C,to:u,viewTransition:f}),typeof p=="function"?p(E):p)});var wi;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(wi||(wi={}));var Vo;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Vo||(Vo={}));function vh(e){let t=g.useContext(Qs);return t||q(!1),t}function gh(e,t){let{target:n,replace:r,state:l,preventScrollReset:i,relative:a,viewTransition:o}=t===void 0?{}:t,u=Nd(),f=Jt(),p=Ys(e,{relative:a});return g.useCallback(d=>{if(ah(d,n)){d.preventDefault();let x=r!==void 0?r:Cs(f)===Cs(p);u(e,{replace:x,state:l,preventScrollReset:i,relative:a,viewTransition:o})}},[f,u,p,r,l,n,e,i,a,o])}function yh(e,t){t===void 0&&(t={});let n=g.useContext(dh);n==null&&q(!1);let{basename:r}=vh(wi.useViewTransitionState),l=Ys(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=En(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=En(n.nextLocation.pathname,r)||n.nextLocation.pathname;return yi(l.pathname,a)!=null||yi(l.pathname,i)!=null}/**
|
|
68
|
+
* @license lucide-react v0.460.0 - ISC
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the ISC license.
|
|
71
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/const jh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Td=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
73
|
+
* @license lucide-react v0.460.0 - ISC
|
|
74
|
+
*
|
|
75
|
+
* This source code is licensed under the ISC license.
|
|
76
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
+
*/var wh={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"};/**
|
|
78
|
+
* @license lucide-react v0.460.0 - ISC
|
|
79
|
+
*
|
|
80
|
+
* This source code is licensed under the ISC license.
|
|
81
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
+
*/const kh=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:l="",children:i,iconNode:a,...o},u)=>g.createElement("svg",{ref:u,...wh,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Td("lucide",l),...o},[...a.map(([f,p])=>g.createElement(f,p)),...Array.isArray(i)?i:[i]]));/**
|
|
83
|
+
* @license lucide-react v0.460.0 - ISC
|
|
84
|
+
*
|
|
85
|
+
* This source code is licensed under the ISC license.
|
|
86
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
+
*/const R=(e,t)=>{const n=g.forwardRef(({className:r,...l},i)=>g.createElement(kh,{ref:i,iconNode:t,className:Td(`lucide-${jh(e)}`,r),...l}));return n.displayName=`${e}`,n};/**
|
|
88
|
+
* @license lucide-react v0.460.0 - ISC
|
|
89
|
+
*
|
|
90
|
+
* This source code is licensed under the ISC license.
|
|
91
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
+
*/const Ld=R("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
93
|
+
* @license lucide-react v0.460.0 - ISC
|
|
94
|
+
*
|
|
95
|
+
* This source code is licensed under the ISC license.
|
|
96
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
+
*/const Md=R("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"}]]);/**
|
|
98
|
+
* @license lucide-react v0.460.0 - ISC
|
|
99
|
+
*
|
|
100
|
+
* This source code is licensed under the ISC license.
|
|
101
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
+
*/const Nh=R("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]);/**
|
|
103
|
+
* @license lucide-react v0.460.0 - ISC
|
|
104
|
+
*
|
|
105
|
+
* This source code is licensed under the ISC license.
|
|
106
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
+
*/const Sh=R("ArrowUpFromLine",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/**
|
|
108
|
+
* @license lucide-react v0.460.0 - ISC
|
|
109
|
+
*
|
|
110
|
+
* This source code is licensed under the ISC license.
|
|
111
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
+
*/const Wo=R("BellOff",[["path",{d:"M8.7 3A6 6 0 0 1 18 8a21.3 21.3 0 0 0 .6 5",key:"o7mx20"}],["path",{d:"M17 17H3s3-2 3-9a4.67 4.67 0 0 1 .3-1.7",key:"16f1lm"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
113
|
+
* @license lucide-react v0.460.0 - ISC
|
|
114
|
+
*
|
|
115
|
+
* This source code is licensed under the ISC license.
|
|
116
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
+
*/const ki=R("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
|
|
118
|
+
* @license lucide-react v0.460.0 - ISC
|
|
119
|
+
*
|
|
120
|
+
* This source code is licensed under the ISC license.
|
|
121
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
+
*/const bh=R("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
123
|
+
* @license lucide-react v0.460.0 - ISC
|
|
124
|
+
*
|
|
125
|
+
* This source code is licensed under the ISC license.
|
|
126
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
+
*/const _h=R("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
128
|
+
* @license lucide-react v0.460.0 - ISC
|
|
129
|
+
*
|
|
130
|
+
* This source code is licensed under the ISC license.
|
|
131
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
+
*/const Eh=R("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
133
|
+
* @license lucide-react v0.460.0 - ISC
|
|
134
|
+
*
|
|
135
|
+
* This source code is licensed under the ISC license.
|
|
136
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
+
*/const at=R("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
138
|
+
* @license lucide-react v0.460.0 - ISC
|
|
139
|
+
*
|
|
140
|
+
* This source code is licensed under the ISC license.
|
|
141
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
+
*/const Rt=R("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
143
|
+
* @license lucide-react v0.460.0 - ISC
|
|
144
|
+
*
|
|
145
|
+
* This source code is licensed under the ISC license.
|
|
146
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
+
*/const Ch=R("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"}]]);/**
|
|
148
|
+
* @license lucide-react v0.460.0 - ISC
|
|
149
|
+
*
|
|
150
|
+
* This source code is licensed under the ISC license.
|
|
151
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
+
*/const Ph=R("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
153
|
+
* @license lucide-react v0.460.0 - ISC
|
|
154
|
+
*
|
|
155
|
+
* This source code is licensed under the ISC license.
|
|
156
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
+
*/const Th=R("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
158
|
+
* @license lucide-react v0.460.0 - ISC
|
|
159
|
+
*
|
|
160
|
+
* This source code is licensed under the ISC license.
|
|
161
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
+
*/const Lh=R("FolderKanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]);/**
|
|
163
|
+
* @license lucide-react v0.460.0 - ISC
|
|
164
|
+
*
|
|
165
|
+
* This source code is licensed under the ISC license.
|
|
166
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
+
*/const Mh=R("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
|
|
168
|
+
* @license lucide-react v0.460.0 - ISC
|
|
169
|
+
*
|
|
170
|
+
* This source code is licensed under the ISC license.
|
|
171
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
+
*/const Rh=R("ListTodo",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
|
|
173
|
+
* @license lucide-react v0.460.0 - ISC
|
|
174
|
+
*
|
|
175
|
+
* This source code is licensed under the ISC license.
|
|
176
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
+
*/const Yt=R("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
178
|
+
* @license lucide-react v0.460.0 - ISC
|
|
179
|
+
*
|
|
180
|
+
* This source code is licensed under the ISC license.
|
|
181
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
+
*/const Oh=R("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
|
183
|
+
* @license lucide-react v0.460.0 - ISC
|
|
184
|
+
*
|
|
185
|
+
* This source code is licensed under the ISC license.
|
|
186
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
187
|
+
*/const Ni=R("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
|
|
188
|
+
* @license lucide-react v0.460.0 - ISC
|
|
189
|
+
*
|
|
190
|
+
* This source code is licensed under the ISC license.
|
|
191
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
192
|
+
*/const Rd=R("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
|
|
193
|
+
* @license lucide-react v0.460.0 - ISC
|
|
194
|
+
*
|
|
195
|
+
* This source code is licensed under the ISC license.
|
|
196
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
197
|
+
*/const zh=R("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
198
|
+
* @license lucide-react v0.460.0 - ISC
|
|
199
|
+
*
|
|
200
|
+
* This source code is licensed under the ISC license.
|
|
201
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
202
|
+
*/const Od=R("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/**
|
|
203
|
+
* @license lucide-react v0.460.0 - ISC
|
|
204
|
+
*
|
|
205
|
+
* This source code is licensed under the ISC license.
|
|
206
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
207
|
+
*/const ja=R("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"}]]);/**
|
|
208
|
+
* @license lucide-react v0.460.0 - ISC
|
|
209
|
+
*
|
|
210
|
+
* This source code is licensed under the ISC license.
|
|
211
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
+
*/const Ih=R("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
|
|
213
|
+
* @license lucide-react v0.460.0 - ISC
|
|
214
|
+
*
|
|
215
|
+
* This source code is licensed under the ISC license.
|
|
216
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
217
|
+
*/const $h=R("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
218
|
+
* @license lucide-react v0.460.0 - ISC
|
|
219
|
+
*
|
|
220
|
+
* This source code is licensed under the ISC license.
|
|
221
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
222
|
+
*/const wa=R("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
223
|
+
* @license lucide-react v0.460.0 - ISC
|
|
224
|
+
*
|
|
225
|
+
* This source code is licensed under the ISC license.
|
|
226
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
227
|
+
*/const ka=R("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
228
|
+
* @license lucide-react v0.460.0 - ISC
|
|
229
|
+
*
|
|
230
|
+
* This source code is licensed under the ISC license.
|
|
231
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
232
|
+
*/const Dh=R("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"}]]);/**
|
|
233
|
+
* @license lucide-react v0.460.0 - ISC
|
|
234
|
+
*
|
|
235
|
+
* This source code is licensed under the ISC license.
|
|
236
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
237
|
+
*/const Fh=R("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
238
|
+
* @license lucide-react v0.460.0 - ISC
|
|
239
|
+
*
|
|
240
|
+
* This source code is licensed under the ISC license.
|
|
241
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
242
|
+
*/const Ah=R("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
243
|
+
* @license lucide-react v0.460.0 - ISC
|
|
244
|
+
*
|
|
245
|
+
* This source code is licensed under the ISC license.
|
|
246
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
247
|
+
*/const Uh=R("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
248
|
+
* @license lucide-react v0.460.0 - ISC
|
|
249
|
+
*
|
|
250
|
+
* This source code is licensed under the ISC license.
|
|
251
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
252
|
+
*/const jr=R("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"}]]);/**
|
|
253
|
+
* @license lucide-react v0.460.0 - ISC
|
|
254
|
+
*
|
|
255
|
+
* This source code is licensed under the ISC license.
|
|
256
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
257
|
+
*/const Bh=R("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
258
|
+
* @license lucide-react v0.460.0 - ISC
|
|
259
|
+
*
|
|
260
|
+
* This source code is licensed under the ISC license.
|
|
261
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
262
|
+
*/const Vh=R("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/**
|
|
263
|
+
* @license lucide-react v0.460.0 - ISC
|
|
264
|
+
*
|
|
265
|
+
* This source code is licensed under the ISC license.
|
|
266
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
267
|
+
*/const Wh=R("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
268
|
+
* @license lucide-react v0.460.0 - ISC
|
|
269
|
+
*
|
|
270
|
+
* This source code is licensed under the ISC license.
|
|
271
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
272
|
+
*/const Hh=R("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"}]]);/**
|
|
273
|
+
* @license lucide-react v0.460.0 - ISC
|
|
274
|
+
*
|
|
275
|
+
* This source code is licensed under the ISC license.
|
|
276
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
277
|
+
*/const Ho=R("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
278
|
+
* @license lucide-react v0.460.0 - ISC
|
|
279
|
+
*
|
|
280
|
+
* This source code is licensed under the ISC license.
|
|
281
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
282
|
+
*/const Qh=R("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
|
|
283
|
+
* @license lucide-react v0.460.0 - ISC
|
|
284
|
+
*
|
|
285
|
+
* This source code is licensed under the ISC license.
|
|
286
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
287
|
+
*/const Kh=R("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function zd(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(n=zd(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function _e(){for(var e,t,n=0,r="",l=arguments.length;n<l;n++)(e=arguments[n])&&(t=zd(e))&&(r&&(r+=" "),r+=t);return r}function G(e){if(!e)return"";const t=new Date(e.replace(" ","T")+(e.includes("T")||e.includes("Z")?"":"Z"));if(isNaN(t.getTime()))return e;const n=Math.max(0,(Date.now()-t.getTime())/1e3);if(n<60)return`${Math.floor(n)}s ago`;const r=n/60;if(r<60)return`${Math.floor(r)}m ago`;const l=r/60;if(l<24)return`${Math.floor(l)}h ago`;const i=l/24;if(i<30)return`${Math.floor(i)}d ago`;const a=i/30;return a<12?`${Math.floor(a)}mo ago`:`${Math.floor(a/12)}y ago`}function Yh(e){return e?e.toLowerCase().replace(/[^a-z0-9]+/g,"-"):"none"}function Gh(e){switch(Yh(e)){case"shinobi":return"bg-ws-shinobi text-white";case"shinobiapps":return"bg-ws-shinobiapps text-bg";case"sitesnap":return"bg-ws-sitesnap text-bg";default:return"bg-border-2 text-text-muted italic"}}function Na({workspace:e}){return s.jsx("span",{className:_e("inline-block rounded text-[10px] font-medium lowercase tracking-wider px-1.5 py-0.5",Gh(e)),children:e??"(no workspace)"})}const Xh={default:"bg-border-2 border-border text-text hover:bg-border",primary:"bg-accent-2 border-accent-2 text-white hover:bg-accent-3",ghost:"bg-transparent border-transparent text-text-muted hover:text-text hover:bg-panel",danger:"bg-danger border-danger text-white hover:opacity-90"},Jh={sm:"text-xs px-2 py-1",md:"text-sm px-3 py-1.5"},z=g.forwardRef(({variant:e="default",size:t="md",className:n,...r},l)=>s.jsx("button",{ref:l,className:_e("border rounded transition-colors font-medium cursor-pointer disabled:opacity-50 disabled:cursor-wait",Xh[e],Jh[t],n),...r}));z.displayName="Button";async function $(e,t){const n=await fetch(e,{...t,headers:{"Content-Type":"application/json",...(t==null?void 0:t.headers)??{}}});if(!n.ok){const r=await n.text();throw new Error(`${(t==null?void 0:t.method)??"GET"} ${e} → ${n.status}: ${r.slice(0,200)}`)}return await n.json()}function Id(e){const t=new URLSearchParams;e!=null&&e.sort&&t.set("sort",e.sort),e!=null&&e.include_archived&&t.set("include_archived","true");const n=t.toString();return $(`/api/projects${n?`?${n}`:""}`)}function qh(e){return $(`/api/projects/${e}/snapshot`)}function Zh(e,t=8){const n=new URLSearchParams({q:e,limit:String(t)});return $(`/api/recall?${n.toString()}`)}function ex(e,t){return $(`/api/subtasks/${e}`,{method:"PATCH",body:JSON.stringify(t)})}function tx(e,t){return $(`/api/decisions/${e}/status`,{method:"PATCH",body:JSON.stringify({status:t})})}function nx(e){return $(`/api/projects/${e}/decision-drafts`)}function rx(e){return $(`/api/decision-drafts/${e}/approve`,{method:"POST",body:"{}"})}function sx(e){return $(`/api/decision-drafts/${e}/reject`,{method:"POST",body:"{}"})}function lx(e=200){return $(`/api/sessions?limit=${e}`)}function ix(e){return $(`/api/sessions/${encodeURIComponent(e)}`)}function ax(){return $("/api/settings")}function ox(e){return $("/api/settings",{method:"POST",body:JSON.stringify({patch:e})})}function ux(){return $("/api/push/vapid-key")}function cx(){return $("/api/push/subscriptions")}function dx(e){return $("/api/push/subscribe",{method:"POST",body:JSON.stringify(e)})}function Qo(e){return $(`/api/push/subscriptions/${e}`,{method:"DELETE"})}function fx(){return $("/api/push/test",{method:"POST"})}function px(e){return $("/api/approvals")}function mx(e,t,n){return $(`/api/approvals/${e}/respond`,{method:"POST",body:JSON.stringify({value:t,note:n})})}function hx(e){return $(`/api/approvals/${e}/cancel`,{method:"POST",body:"{}"})}function xx(){return $("/api/sync/status")}function vx(){return $("/api/sync/push",{method:"POST"})}function gx(){return $("/api/sync/pull",{method:"POST"})}function Ko(e){return $(`/api/projects/${e}/time-stats`)}function Yo(e){return $(`/api/projects/${e}/cost-stats`)}function yx(e={}){return $("/api/cost/ingest",{method:"POST",body:JSON.stringify(e)})}function jx(){return $("/api/plugins")}function wx(e){return $("/api/plugins/search",{method:"POST",body:JSON.stringify({query:e})})}function kx(e){return $("/api/plugins/install",{method:"POST",body:JSON.stringify({pkg:e})})}function Nx(e){return $(`/api/plugins/${encodeURIComponent(e)}`,{method:"DELETE"})}function Sx(){return $("/api/telemetry/summary")}function bx(){return $("/api/telemetry/flush",{method:"POST",body:"{}"})}function _x(){return $("/api/relay/status")}function Ex(){return $("/api/relay/broadcast-sync",{method:"POST",body:"{}"})}function Cx(){const[e,t]=g.useState(null),[n,r]=g.useState({kind:"idle"});g.useEffect(()=>{l()},[]);async function l(){try{t(await xx())}catch(o){r({kind:"err",message:o instanceof Error?o.message:String(o)})}}async function i(o){if(!(o==="pull"&&!window.confirm("Pull overwrites the local DB with the latest snapshot from the sync repo. Continue?"))){r({kind:"busy",op:o});try{const u=o==="push"?await vx():await gx();if(!u.ok)throw new Error(u.error??"unknown error");r({kind:"ok",op:o,elapsedMs:u.elapsed_ms??0}),await l(),o==="pull"&&setTimeout(()=>location.reload(),500)}catch(u){r({kind:"err",message:u instanceof Error?u.message:String(u)})}}}const a=e==null?void 0:e.sync;return s.jsxs("div",{className:"bg-panel border border-border rounded-md p-3 mt-4",children:[s.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Sync"}),s.jsxs("div",{className:"space-y-1 text-xs font-mono",children:[e!=null&&e.configured&&a?s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:["push: ",s.jsx("span",{className:a.last_push_at?"text-success":"text-text-muted",children:G(a.last_push_at)||"never"})]}),s.jsxs("div",{children:["pull: ",s.jsx("span",{className:a.last_pull_at?"text-success":"text-text-muted",children:G(a.last_pull_at)||"never"})]}),s.jsxs("div",{className:"text-text-dim text-[10px] break-all",children:[a.repo_path,s.jsx("br",{}),"(branch: ",a.branch,")"]})]}):s.jsx("div",{className:"text-text-muted",children:"not configured"}),n.kind==="ok"&&s.jsxs("div",{className:"text-success",children:[n.op," OK (",n.elapsedMs,"ms)"]}),n.kind==="err"&&s.jsx("div",{className:"text-danger break-all",children:n.message})]}),s.jsxs("div",{className:"flex gap-1.5 mt-3",children:[s.jsxs(z,{size:"sm",variant:"default",className:"flex-1 flex items-center justify-center gap-1",disabled:n.kind==="busy",onClick:()=>void i("pull"),children:[n.kind==="busy"&&n.op==="pull"?s.jsx(Yt,{className:"w-3 h-3 animate-spin"}):s.jsx(Nh,{className:"w-3 h-3"}),"Pull"]}),s.jsxs(z,{size:"sm",variant:"primary",className:"flex-1 flex items-center justify-center gap-1",disabled:n.kind==="busy",onClick:()=>void i("push"),children:[n.kind==="busy"&&n.op==="push"?s.jsx(Yt,{className:"w-3 h-3 animate-spin"}):s.jsx(Sh,{className:"w-3 h-3"}),"Push"]})]})]})}function Go({projects:e}){const t=Jt(),n=ya(),r=n.id?Number(n.id):null,l=e.filter(p=>!p.archived_at),i=e.filter(p=>p.archived_at),a=new Map;for(const p of l){const d=p.workspace??"(no workspace)";a.has(d)||a.set(d,[]),a.get(d).push(p)}const[o,u]=g.useState(!1);g.useEffect(()=>{u(/Mac|iPhone|iPad/.test(navigator.platform??navigator.userAgent))},[]);const f=o?"⌘":"Ctrl";return s.jsxs("aside",{className:"bg-panel-2 border-r border-border w-64 flex-shrink-0 overflow-y-auto scrollbar-thin p-4",children:[s.jsx(X,{to:"/",className:"block text-lg font-bold tracking-wider mb-4 text-text",children:"Shinobi 🥷"}),s.jsxs("button",{onClick:()=>window.dispatchEvent(new CustomEvent("cmd-palette:open")),className:"w-full flex items-center gap-2 px-2 py-1.5 mb-4 rounded text-sm bg-panel border border-border text-text-muted hover:text-text hover:border-accent/60 transition-colors",children:[s.jsx(wa,{className:"w-3.5 h-3.5"}),s.jsx("span",{className:"flex-1 text-left",children:"Search..."}),s.jsxs("kbd",{className:"text-[10px] border border-border rounded px-1 py-0.5",children:[f," K"]})]}),s.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Workspace"}),s.jsxs("ul",{className:"mb-4",children:[s.jsx("li",{children:s.jsx(X,{to:"/sessions",className:_e("block px-2 py-1.5 rounded text-sm transition-colors",t.pathname==="/sessions"?"bg-border text-text":"text-text hover:bg-panel"),children:"All sessions"})}),s.jsx("li",{children:s.jsxs(X,{to:"/voice",className:_e("flex items-center gap-2 px-2 py-1.5 rounded text-sm transition-colors",t.pathname==="/voice"?"bg-border text-text":"text-text hover:bg-panel"),children:[s.jsx(Ni,{className:"w-3.5 h-3.5"})," Voice capture"]})}),s.jsx("li",{children:s.jsxs(X,{to:"/approvals",className:_e("flex items-center gap-2 px-2 py-1.5 rounded text-sm transition-colors",t.pathname==="/approvals"?"bg-border text-text":"text-text hover:bg-panel"),children:[s.jsx(Ah,{className:"w-3.5 h-3.5"})," Approvals"]})}),s.jsx("li",{children:s.jsxs(X,{to:"/push",className:_e("flex items-center gap-2 px-2 py-1.5 rounded text-sm transition-colors",t.pathname==="/push"?"bg-border text-text":"text-text hover:bg-panel"),children:[s.jsx(ki,{className:"w-3.5 h-3.5"})," Push"]})}),s.jsx("li",{children:s.jsxs(X,{to:"/relay",className:_e("flex items-center gap-2 px-2 py-1.5 rounded text-sm transition-colors",t.pathname==="/relay"?"bg-border text-text":"text-text hover:bg-panel"),children:[s.jsx(Od,{className:"w-3.5 h-3.5"})," Relay"]})}),s.jsx("li",{children:s.jsxs(X,{to:"/plugins",className:_e("flex items-center gap-2 px-2 py-1.5 rounded text-sm transition-colors",t.pathname==="/plugins"?"bg-border text-text":"text-text hover:bg-panel"),children:[s.jsx(Rd,{className:"w-3.5 h-3.5"})," Plugins"]})}),s.jsx("li",{children:s.jsxs(X,{to:"/telemetry",className:_e("flex items-center gap-2 px-2 py-1.5 rounded text-sm transition-colors",t.pathname==="/telemetry"?"bg-border text-text":"text-text hover:bg-panel"),children:[s.jsx(Ld,{className:"w-3.5 h-3.5"})," Telemetry"]})}),s.jsx("li",{children:s.jsxs(X,{to:"/settings",className:_e("flex items-center gap-2 px-2 py-1.5 rounded text-sm transition-colors",t.pathname==="/settings"?"bg-border text-text":"text-text hover:bg-panel"),children:[s.jsx(Dh,{className:"w-3.5 h-3.5"})," Settings"]})})]}),s.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Projects"}),a.size===0?s.jsx("div",{className:"text-text-muted text-sm italic",children:"(none)"}):[...a.entries()].map(([p,d])=>s.jsxs("div",{className:"mb-3",children:[s.jsxs("div",{className:"flex items-center gap-1.5 mt-3 mb-1 text-[10px] uppercase tracking-wider text-text-muted",children:[s.jsx(Na,{workspace:p==="(no workspace)"?null:p}),s.jsx("span",{children:d.length})]}),s.jsx("ul",{children:d.map(x=>s.jsx("li",{children:s.jsx(X,{to:`/projects/${x.id}`,className:_e("block px-2 py-1.5 rounded text-sm transition-colors",r===x.id?"bg-border text-text":"text-text hover:bg-panel"),children:x.title})},x.id))})]},p)),i.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-[11px] uppercase tracking-wider text-text-muted mt-4 mb-2 flex items-center gap-1.5",children:[s.jsx(Md,{className:"w-3 h-3"}),"Archived"]}),s.jsx("ul",{children:i.map(p=>s.jsx("li",{children:s.jsx(X,{to:`/projects/${p.id}`,className:"block px-2 py-1.5 rounded text-sm text-text-dim hover:bg-panel",children:p.title})},p.id))})]}),s.jsx(Cx,{})]})}const Px={project:{label:"Projects",icon:Lh},subtask:{label:"Tasks",icon:Rh},decision:{label:"Decisions",icon:Mh},dead_end:{label:"Dead ends",icon:Bh},note:{label:"Notes",icon:Th}};function Tx(e){const t=[];for(const n of e.projects)t.push({kind:"project",id:n.id,title:n.title,subtitle:n.workspace?`workspace: ${n.workspace}`:"no workspace",projectId:n.id,href:`/projects/${n.id}`});for(const n of e.subtasks)t.push({kind:"subtask",id:n.id,title:n.title,subtitle:`task #${n.id} · status: ${n.status}`,projectId:n.project_id,href:`/projects/${n.project_id}`});for(const n of e.decisions)t.push({kind:"decision",id:n.id,title:n.summary,subtitle:`decision #${n.id} · ${n.kind}`,projectId:n.project_id,href:`/projects/${n.project_id}/decisions`});for(const n of e.dead_ends)t.push({kind:"dead_end",id:n.id,title:n.attempted_approach.slice(0,100),subtitle:`dead end #${n.id}${n.never_retry?" · never retry":""}`,projectId:n.project_id,href:`/projects/${n.project_id}/dead-ends`});for(const n of e.notes)t.push({kind:"note",id:n.id,title:n.body.slice(0,100),subtitle:`note #${n.id}`,projectId:n.project_id,href:`/projects/${n.project_id}/notes`});return t}function Lx({open:e,onClose:t}){const n=Nd(),[r,l]=g.useState(""),[i,a]=g.useState(null),[o,u]=g.useState(!1),[f,p]=g.useState(0),d=g.useRef(null),x=g.useRef(null);g.useEffect(()=>{e&&(l(""),a(null),p(0),setTimeout(()=>{var j;return(j=d.current)==null?void 0:j.focus()},0))},[e]),g.useEffect(()=>{if(!e)return;const j=r.trim();if(j.length<2){a(null),u(!1);return}u(!0);const y=setTimeout(()=>{Zh(j,6).then(m=>{a(m),p(0)}).catch(()=>a(null)).finally(()=>u(!1))},150);return()=>clearTimeout(y)},[r,e]);const w=g.useMemo(()=>i?Tx(i):[],[i]);if(g.useEffect(()=>{if(!e)return;function j(y){if(y.key==="Escape")y.preventDefault(),t();else if(y.key==="ArrowDown")y.preventDefault(),p(m=>Math.min(m+1,w.length-1));else if(y.key==="ArrowUp")y.preventDefault(),p(m=>Math.max(m-1,0));else if(y.key==="Enter"){const m=w[f];m&&(y.preventDefault(),n(m.href),t())}}return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[e,w,f,n,t]),g.useEffect(()=>{var y;const j=(y=x.current)==null?void 0:y.querySelector(`[data-cmd-idx="${f}"]`);j==null||j.scrollIntoView({block:"nearest"})},[f]),!e)return null;const v=["project","subtask","decision","dead_end","note"].map(j=>({kind:j,items:w.filter(y=>y.kind===j)})).filter(j=>j.items.length>0);return pd.createPortal(s.jsxs("div",{className:"fixed inset-0 z-[100] flex items-start justify-center pt-20 px-4",onClick:t,children:[s.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm","aria-hidden":!0}),s.jsxs("div",{className:"relative w-full max-w-2xl bg-panel border border-border rounded-lg shadow-2xl overflow-hidden",onClick:j=>j.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border",children:[s.jsx(wa,{className:"w-4 h-4 text-text-muted"}),s.jsx("input",{ref:d,type:"text",value:r,onChange:j=>l(j.target.value),placeholder:"Search projects, tasks, decisions, dead ends, notes...",className:"flex-1 bg-transparent text-text placeholder:text-text-dim outline-none text-sm"}),s.jsx("kbd",{className:"text-[10px] text-text-dim border border-border rounded px-1.5 py-0.5",children:"esc"})]}),s.jsx("div",{ref:x,className:"max-h-[60vh] overflow-y-auto",children:r.trim().length<2?s.jsx("div",{className:"px-4 py-6 text-center text-text-dim text-sm",children:"Type at least 2 characters to search."}):o&&w.length===0?s.jsx("div",{className:"px-4 py-6 text-center text-text-muted text-sm",children:"Searching..."}):w.length===0?s.jsxs("div",{className:"px-4 py-6 text-center text-text-muted text-sm",children:['No matches for "',r,'".']}):v.map(j=>{const y=Px[j.kind],m=y.icon;return s.jsxs("div",{className:"py-1",children:[s.jsxs("div",{className:"px-4 py-1.5 text-[10px] uppercase tracking-wider text-text-dim flex items-center gap-1.5",children:[s.jsx(m,{className:"w-3 h-3"}),y.label,s.jsxs("span",{className:"text-text-dim",children:["· ",j.items.length]})]}),j.items.map(c=>{const h=w.indexOf(c),k=h===f;return s.jsxs("button",{"data-cmd-idx":h,onMouseEnter:()=>p(h),onClick:()=>{n(c.href),t()},className:`w-full text-left px-4 py-2 flex flex-col gap-0.5 border-l-2 ${k?"bg-panel-2 border-accent":"border-transparent hover:bg-panel-2/60"}`,children:[s.jsx("span",{className:"text-sm text-text truncate",children:c.title}),s.jsx("span",{className:"text-[11px] text-text-muted truncate",children:c.subtitle})]},`${c.kind}-${c.id}`)})]},j.kind)})}),s.jsxs("div",{className:"px-4 py-2 border-t border-border text-[10px] text-text-dim flex items-center justify-between",children:[s.jsxs("span",{className:"flex items-center gap-3",children:[s.jsxs("span",{children:[s.jsx("kbd",{className:"border border-border rounded px-1 py-0.5",children:"↑"})," ",s.jsx("kbd",{className:"border border-border rounded px-1 py-0.5",children:"↓"})," navigate"]}),s.jsxs("span",{children:[s.jsx("kbd",{className:"border border-border rounded px-1 py-0.5",children:"↵"})," open"]}),s.jsxs("span",{children:[s.jsx("kbd",{className:"border border-border rounded px-1 py-0.5",children:"esc"})," close"]})]}),i&&s.jsxs("span",{children:[w.length," ",w.length===1?"result":"results"]})]})]})]}),document.body)}function Mx(){const[e,t]=g.useState(null),[n,r]=g.useState(null),[l,i]=g.useState(!1),[a,o]=g.useState(!1),u=Jt();return g.useEffect(()=>{i(!1)},[u.pathname]),g.useEffect(()=>{function f(d){(d.metaKey||d.ctrlKey)&&d.key.toLowerCase()==="k"&&(d.preventDefault(),o(w=>!w))}function p(){o(!0)}return window.addEventListener("keydown",f),window.addEventListener("cmd-palette:open",p),()=>{window.removeEventListener("keydown",f),window.removeEventListener("cmd-palette:open",p)}},[]),g.useEffect(()=>{let f=!1;return Id({sort:"active",include_archived:!0}).then(p=>{f||t(p)}).catch(p=>{f||r(p instanceof Error?p.message:String(p))}),()=>{f=!0}},[]),n?s.jsx("div",{className:"min-h-screen flex items-center justify-center text-danger",children:s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl mb-2",children:"Failed to load projects"}),s.jsx("pre",{className:"text-sm",children:n})]})}):e?s.jsxs("div",{className:"min-h-screen flex",children:[s.jsx("div",{className:"hidden md:block",children:s.jsx(Go,{projects:e})}),l&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"md:hidden fixed inset-0 bg-black/50 z-40",onClick:()=>i(!1)}),s.jsx("div",{className:"md:hidden fixed inset-y-0 left-0 z-50 shadow-2xl",children:s.jsx(Go,{projects:e})})]}),s.jsxs("main",{className:"flex-1 overflow-y-auto min-w-0",children:[s.jsxs("div",{className:"md:hidden sticky top-0 z-30 bg-bg/95 backdrop-blur border-b border-border px-4 py-3 flex items-center gap-3",children:[s.jsx("button",{onClick:()=>i(f=>!f),className:"text-text hover:text-accent","aria-label":l?"Close menu":"Open menu",children:l?s.jsx(Kh,{className:"w-5 h-5"}):s.jsx(Oh,{className:"w-5 h-5"})}),s.jsx("span",{className:"text-text font-semibold tracking-wider",children:"Shinobi 🥷"})]}),s.jsx("div",{className:"p-4 md:p-8",children:s.jsx(Cd,{context:{projects:e}})})]}),s.jsx(Lx,{open:a,onClose:()=>o(!1)})]}):s.jsx("div",{className:"min-h-screen flex items-center justify-center text-text-muted",children:"loading..."})}const Rx={default:"bg-border-2 text-text","status-todo":"bg-border text-text","status-in_progress":"bg-accent-2 text-white","status-done":"bg-text-dim text-text","priority-urgent":"bg-danger text-white","priority-high":"bg-orange text-bg","priority-medium":"bg-warning text-bg","priority-low":"bg-text-dim text-text-muted"};function le({children:e,variant:t="default",className:n}){return s.jsx("span",{className:_e("inline-block rounded text-[10px] font-medium uppercase tracking-wider px-1.5 py-0.5",Rx[t],n),children:e})}function Gs({priority:e}){return s.jsx(le,{variant:`priority-${e}`,children:e})}function Sa({status:e}){return s.jsx(le,{variant:`status-${e}`,children:e})}const Xo="shinobi.home.workspaceFilter",Zt="__all__",Jo="__none__";function qo({rows:e,dim:t=!1}){return s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Workspace"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Title"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Status"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Priority"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Type"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Target path"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Due"}),s.jsx("th",{className:"font-medium pb-2",children:"Created"})]})}),s.jsx("tbody",{className:t?"opacity-60":"",children:e.map(n=>s.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40",children:[s.jsx("td",{className:"py-2 pr-3",children:s.jsx(Na,{workspace:n.workspace})}),s.jsx("td",{className:"py-2 pr-3",children:s.jsx(X,{to:`/projects/${n.id}`,className:"text-text hover:text-accent font-medium",children:n.title})}),s.jsx("td",{className:"py-2 pr-3",children:s.jsx(Sa,{status:n.status})}),s.jsx("td",{className:"py-2 pr-3",children:s.jsx(Gs,{priority:n.priority})}),s.jsx("td",{className:"py-2 pr-3 text-text-muted",children:n.project_type??""}),s.jsx("td",{className:"py-2 pr-3 text-text-muted font-mono text-xs",children:n.target_path??""}),s.jsx("td",{className:"py-2 pr-3 text-text-muted",children:n.due_date??""}),s.jsx("td",{className:"py-2 text-text-muted text-xs",title:n.created_at,children:G(n.created_at)})]},n.id))})]})})}function Ox(){const{projects:e}=Fe(),[t,n]=g.useState(!1),[r,l]=g.useState(()=>typeof window>"u"?Zt:window.localStorage.getItem(Xo)??Zt),i=g.useMemo(()=>{const d=new Set;let x=!1;for(const v of e)v.workspace?d.add(v.workspace):x=!0;return{named:Array.from(d).sort((v,j)=>v.localeCompare(j)),hasNoWorkspace:x}},[e]);function a(d){return r===Zt?d:r===Jo?d.filter(x=>!x.workspace):d.filter(x=>x.workspace===r)}const o=a(e.filter(d=>!d.archived_at)),u=a(e.filter(d=>d.archived_at));function f(d){l(d),typeof window<"u"&&window.localStorage.setItem(Xo,d)}const p=i.named.length>1||i.named.length>=1&&i.hasNoWorkspace;return s.jsxs("div",{children:[s.jsxs("header",{className:"flex items-baseline justify-between border-b border-border pb-3 mb-6",children:[s.jsx("h1",{className:"text-2xl text-text",children:"Projects"}),s.jsxs("span",{className:"text-text-muted text-xs",children:[o.length," active · ",u.length," archived"]})]}),p&&s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("label",{htmlFor:"workspace-filter",className:"text-[11px] uppercase tracking-wider text-text-muted",children:"Workspace"}),s.jsxs("select",{id:"workspace-filter",value:r,onChange:d=>f(d.target.value),className:"bg-panel border border-border rounded px-2 py-1 text-sm text-text hover:border-accent/60 focus:outline-none focus:border-accent",children:[s.jsx("option",{value:Zt,children:"All workspaces"}),i.named.map(d=>s.jsx("option",{value:d,children:d},d)),i.hasNoWorkspace&&s.jsx("option",{value:Jo,children:"(no workspace)"})]}),r!==Zt&&s.jsx("button",{onClick:()=>f(Zt),className:"text-xs text-text-muted hover:text-text",children:"clear"})]}),e.length===0?s.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No projects yet. Create one via the ",s.jsx("code",{children:"create_project"})," MCP tool, then refresh."]}):o.length===0?s.jsx("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:"No active projects match this workspace filter."}):s.jsx(qo,{rows:o}),u.length>0&&s.jsxs("section",{className:"mt-8",children:[s.jsxs("button",{onClick:()=>n(d=>!d),className:"flex items-center gap-1.5 text-[11px] uppercase tracking-wider text-text-muted hover:text-text mb-3",children:[t?s.jsx(_h,{className:"w-3.5 h-3.5"}):s.jsx(Eh,{className:"w-3.5 h-3.5"}),s.jsx(Md,{className:"w-3.5 h-3.5"}),"Archived (",u.length,")"]}),t&&s.jsx(qo,{rows:u,dim:!0})]})]})}function zx({projectId:e,draftPendingCount:t}){const n=`/projects/${e}`,r=[{to:n,label:"Kanban",end:!0},{to:`${n}/subtasks`,label:"Subtasks"},{to:`${n}/decisions`,label:"Decisions"},{to:`${n}/decision-drafts`,label:"Drafts",badge:t&&t>0?s.jsx("span",{className:"ml-1 inline-block bg-warning text-bg text-[9px] font-bold px-1.5 py-0.5 rounded-full",children:t}):null},{to:`${n}/dead-ends`,label:"Dead Ends"},{to:`${n}/notes`,label:"Notes"},{to:`${n}/plans`,label:"Plans"},{to:`${n}/context`,label:"Context"},{to:`${n}/sessions`,label:"Sessions"},{to:`${n}/timeline`,label:"Timeline"},{to:`${n}/analytics`,label:"Analytics"}];return s.jsx("nav",{className:"flex gap-1 mb-4 border-b border-border overflow-x-auto scrollbar-thin",children:r.map(l=>s.jsxs(xh,{to:l.to,end:l.end,className:({isActive:i})=>_e("px-3.5 py-2 text-sm -mb-px border-b-2 whitespace-nowrap transition-colors flex items-center",i?"text-text border-accent":"text-text-muted border-transparent hover:text-text hover:border-border-2"),children:[l.label,l.badge]},l.to))})}function Ix(){const e=ya(),t=Number(e.id),[n,r]=g.useState(null),[l,i]=g.useState(null),a=g.useCallback(async()=>{try{const u=await qh(t);r(u)}catch(u){i(u instanceof Error?u.message:String(u))}},[t]);if(g.useEffect(()=>{Number.isFinite(t)&&(r(null),i(null),a())},[t,a]),l)return s.jsxs("div",{className:"text-danger",children:["Error: ",l]});if(!n)return s.jsx("div",{className:"text-text-muted",children:"loading..."});const{project:o}=n;return s.jsxs("div",{children:[s.jsxs("header",{className:"border-b border-border pb-3 mb-4",children:[s.jsx("h1",{className:"text-2xl text-text",children:o.title}),s.jsxs("div",{className:"mt-2 text-xs text-text-muted flex items-center gap-2 flex-wrap",children:[s.jsx(Na,{workspace:o.workspace}),s.jsx("span",{children:"·"}),s.jsx(Sa,{status:o.status}),s.jsx("span",{children:"·"}),s.jsx(Gs,{priority:o.priority}),o.due_date&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"·"}),s.jsxs("span",{children:["due ",o.due_date]})]}),o.target_path&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"·"}),s.jsxs("span",{className:"font-mono",children:["target ",o.target_path]})]}),o.recent_summary_at&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"·"}),s.jsxs("span",{children:["summary ",G(o.recent_summary_at)]})]})]})]}),s.jsx(zx,{projectId:t,draftPendingCount:n.draft_counts.pending}),s.jsx(Cd,{context:{snapshot:n,refresh:a}})]})}const $x=[{key:"todo",label:"Todo"},{key:"in_progress",label:"In Progress"},{key:"done",label:"Done"}];function Dx(){const{snapshot:e,refresh:t}=Fe(),{project:n,subtasks:r}=e,l={todo:[],in_progress:[],done:[]};for(const a of r)l[a.status].push(a);async function i(a,o){try{await ex(a,{status:o}),await t()}catch(u){alert("Transition failed: "+(u instanceof Error?u.message:String(u)))}}return s.jsxs(s.Fragment,{children:[n.description&&s.jsx("pre",{className:"bg-panel border border-border rounded p-3 mb-6 whitespace-pre-wrap text-xs font-mono text-text",children:n.description}),n.recent_summary_md&&s.jsxs("div",{className:"bg-panel border border-border border-l-4 border-l-accent rounded-md p-4 mb-6",children:[s.jsxs("div",{className:"text-[11px] uppercase tracking-wider text-text-muted mb-2",children:["Recent session summary",n.recent_summary_provider&&s.jsxs("span",{className:"text-text-dim normal-case ml-2 tracking-normal",children:["via ",n.recent_summary_provider]})]}),s.jsx("div",{className:"text-sm text-text whitespace-pre-wrap leading-relaxed",children:n.recent_summary_md})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:$x.map(a=>s.jsxs("div",{className:"bg-panel border border-border rounded-md p-3 min-h-[200px]",children:[s.jsxs("h3",{className:"text-[11px] uppercase tracking-wider text-text-muted mb-3",children:[a.label," (",l[a.key].length,")"]}),s.jsx("div",{className:"space-y-2",children:l[a.key].length===0?s.jsx("div",{className:"text-text-dim text-xs",children:"(empty)"}):l[a.key].map(o=>s.jsxs("div",{className:"bg-panel-2 border border-border rounded p-2.5 text-xs",children:[s.jsx("div",{className:"text-text font-medium mb-1",children:o.title}),s.jsxs("div",{className:"text-text-muted flex flex-wrap gap-2 items-center text-[11px]",children:[s.jsx(Gs,{priority:o.priority}),o.due_date&&s.jsxs("span",{children:["due ",o.due_date]}),o.depends_on&&o.depends_on.length>0&&s.jsxs("span",{children:["deps: ",o.depends_on.join(",")]}),o.claude_session_id&&s.jsx("span",{title:o.claude_session_id,children:"session"})]}),s.jsxs("div",{className:"flex gap-1.5 mt-2",children:[o.status!=="todo"&&s.jsxs(z,{size:"sm",variant:"ghost",onClick:()=>void i(o.id,"todo"),className:"flex items-center gap-1",children:[s.jsx(Vh,{className:"w-3 h-3"})," todo"]}),o.status!=="in_progress"&&s.jsxs(z,{size:"sm",variant:"ghost",onClick:()=>void i(o.id,"in_progress"),className:"flex items-center gap-1",children:[s.jsx(zh,{className:"w-3 h-3"})," in progress"]}),o.status!=="done"&&s.jsxs(z,{size:"sm",variant:"ghost",onClick:()=>void i(o.id,"done"),className:"flex items-center gap-1",children:[s.jsx(bh,{className:"w-3 h-3"})," done"]})]})]},o.id))})]},a.key))})]})}function Fx(){const{snapshot:e}=Fe(),{subtasks:t}=e;return t.length===0?s.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No subtasks. Use ",s.jsx("code",{children:"create_task"})," or ",s.jsx("code",{children:"bulk_create_tasks"})," to seed."]}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"font-medium pb-2 pr-3 w-12",children:"ID"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Title"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-28",children:"Status"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Priority"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Deps"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Due"}),s.jsx("th",{className:"font-medium pb-2 w-28",children:"Claimed"})]})}),s.jsx("tbody",{children:t.map(n=>s.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40 align-top",children:[s.jsx("td",{className:"py-2 pr-3 text-text-muted font-mono",children:n.id}),s.jsxs("td",{className:"py-2 pr-3",children:[s.jsx("div",{className:"text-text font-medium",children:n.title}),n.description&&s.jsx("div",{className:"text-text-muted text-xs mt-1",children:n.description.length>200?n.description.slice(0,200)+"…":n.description})]}),s.jsx("td",{className:"py-2 pr-3",children:s.jsx(Sa,{status:n.status})}),s.jsx("td",{className:"py-2 pr-3",children:s.jsx(Gs,{priority:n.priority})}),s.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:n.depends_on&&n.depends_on.length>0?n.depends_on.join(", "):""}),s.jsx("td",{className:"py-2 pr-3 text-text-muted",children:n.due_date??""}),s.jsx("td",{className:"py-2 text-text-muted text-xs",title:n.last_claimed_at??"",children:G(n.last_claimed_at)})]},n.id))})]})})}const Ax=["open","fix_now","fix_later","wontfix","fixed","false_positive"];function Ux(e){switch(e){case"open":return"bg-accent-2 text-white";case"fix_now":return"bg-danger text-white";case"fix_later":return"bg-orange text-bg";case"wontfix":return"bg-text-dim text-text";case"fixed":return"bg-success text-bg";case"false_positive":return"bg-text-dim text-text";default:return"bg-border-2 text-text"}}function Bx(){const{snapshot:e,refresh:t}=Fe(),{decisions:n,draft_counts:r,project:l}=e;async function i(o,u){try{await tx(o,u),await t()}catch(f){alert("Transition failed: "+(f instanceof Error?f.message:String(f)))}}const a=r.pending>0?s.jsxs("div",{className:"bg-panel border-l-4 border-l-warning rounded-md p-3 mb-4 flex items-center justify-between",children:[s.jsxs("span",{className:"text-sm",children:[s.jsxs("strong",{children:[r.pending," pending decision draft",r.pending>1?"s":""]})," ",s.jsx("span",{className:"text-text-muted",children:"extracted via LLM"})]}),s.jsx(X,{to:`/projects/${l.id}/decision-drafts`,className:"text-accent text-sm hover:underline",children:"Review →"})]}):null;return n.length===0?s.jsxs("div",{children:[a,s.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No decisions logged. Use ",s.jsx("code",{children:"log_decision"})," via MCP."]})]}):s.jsxs("div",{children:[a,s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"font-medium pb-2 pr-3 w-12",children:"ID"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Kind"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Summary + Rationale"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-44",children:"Status"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-40",children:"Files"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Tags"}),s.jsx("th",{className:"font-medium pb-2 w-24",children:"Logged"})]})}),s.jsx("tbody",{children:n.map(o=>s.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40 align-top",children:[s.jsx("td",{className:"py-3 pr-3 text-text-muted font-mono",children:o.id}),s.jsx("td",{className:"py-3 pr-3",children:s.jsx(le,{children:o.kind})}),s.jsxs("td",{className:"py-3 pr-3",children:[s.jsx("div",{className:"text-text font-medium",children:o.summary}),s.jsx("div",{className:"text-text-muted text-xs mt-1",children:o.rationale.length>300?o.rationale.slice(0,300)+"…":o.rationale}),o.alternatives_considered&&s.jsxs("div",{className:"text-text-dim text-xs mt-1",children:["alt: ",o.alternatives_considered.slice(0,150)]})]}),s.jsxs("td",{className:"py-3 pr-3",children:[s.jsx("span",{className:`inline-block rounded text-[10px] font-medium uppercase tracking-wider px-1.5 py-0.5 ${Ux(o.status)}`,children:o.status}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:Ax.filter(u=>u!==o.status).map(u=>s.jsx(z,{size:"sm",variant:"ghost",onClick:()=>void i(o.id,u),className:"text-[10px] px-1.5 py-0.5",children:u},u))})]}),s.jsx("td",{className:"py-3 pr-3 text-text-muted text-xs",children:(o.files_touched??[]).map(u=>s.jsx("div",{children:u},u))}),s.jsx("td",{className:"py-3 pr-3",children:(o.tags??[]).map(u=>s.jsx(le,{className:"mr-1 mb-1",children:u},u))}),s.jsx("td",{className:"py-3 text-text-muted text-xs",title:o.created_at,children:G(o.created_at)})]},o.id))})]})})]})}function Vx(){const{snapshot:e,refresh:t}=Fe(),n=e.project.id,[r,l]=g.useState(null),[i,a]=g.useState({pending:0,approved:0,rejected:0}),[o,u]=g.useState(null),[f,p]=g.useState(null),d=g.useCallback(async()=>{try{const v=await nx(n);l(v.drafts),a(v.counts)}catch(v){u(v instanceof Error?v.message:String(v))}},[n]);g.useEffect(()=>{d()},[d]);async function x(v,j){if(f===null){p(v);try{j==="approve"?await rx(v):await sx(v),await Promise.all([d(),t()])}catch(y){alert(`${j} failed: ${y instanceof Error?y.message:String(y)}`)}finally{p(null)}}}if(o)return s.jsxs("div",{className:"text-danger",children:["Error: ",o]});if(!r)return s.jsx("div",{className:"text-text-muted",children:"loading drafts..."});const w=(v,j,y)=>s.jsxs("div",{className:"bg-panel border border-border rounded p-3",children:[s.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted",children:v}),s.jsx("div",{className:`text-2xl mt-1 ${y}`,children:j})]});return s.jsxs("div",{children:[s.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-4",children:[w("Pending",i.pending,"text-warning"),w("Approved",i.approved,"text-success"),w("Rejected",i.rejected,"text-danger")]}),r.length===0?s.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No drafts. Drafts appear when the agent calls ",s.jsx("code",{children:"extract_decisions(text)"})," — LLM scans a transcript and proposes decisions for you to approve."]}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"font-medium pb-2 pr-3 w-12",children:"ID"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Kind"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Summary + Rationale"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Files"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-44",children:"Action"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-20",children:"Created"}),s.jsx("th",{className:"font-medium pb-2",children:"Extractor"})]})}),s.jsx("tbody",{children:r.map(v=>s.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40 align-top",children:[s.jsx("td",{className:"py-3 pr-3 text-text-muted font-mono",children:v.id}),s.jsx("td",{className:"py-3 pr-3",children:s.jsx(le,{children:v.kind})}),s.jsxs("td",{className:"py-3 pr-3",children:[s.jsx("div",{className:"text-text font-medium",children:v.summary}),s.jsx("div",{className:"text-text-muted text-xs mt-1",children:v.rationale}),v.alternatives_considered&&s.jsxs("div",{className:"text-text-dim text-xs mt-1",children:["alt: ",v.alternatives_considered]})]}),s.jsx("td",{className:"py-3 pr-3 text-text-muted text-xs",children:(v.files_touched??[]).map(j=>s.jsx("div",{children:j},j))}),s.jsx("td",{className:"py-3 pr-3",children:v.status==="pending"?s.jsxs("div",{className:"flex gap-1.5",children:[s.jsx(z,{size:"sm",variant:"primary",disabled:f===v.id,onClick:()=>void x(v.id,"approve"),children:"Approve"}),s.jsx(z,{size:"sm",variant:"default",disabled:f===v.id,onClick:()=>void x(v.id,"reject"),children:"Reject"})]}):v.status==="approved"?s.jsxs(le,{className:"bg-success text-bg",children:["approved ",v.approved_decision_id?`→ #${v.approved_decision_id}`:""]}):s.jsx(le,{className:"bg-danger text-white",children:"rejected"})}),s.jsx("td",{className:"py-3 pr-3 text-text-muted text-xs",children:G(v.created_at)}),s.jsx("td",{className:"py-3 text-text-dim text-[10px] font-mono",children:v.extractor_model??""})]},v.id))})]})})]})}function Wx(){const{snapshot:e}=Fe(),{dead_ends:t}=e;return t.length===0?s.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No dead ends logged. Use ",s.jsx("code",{children:"log_dead_end"})," when an approach fails."]}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"font-medium pb-2 pr-3 w-12",children:"ID"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Attempted"}),s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Why failed"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Files"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Flag"}),s.jsx("th",{className:"font-medium pb-2 w-24",children:"Logged"})]})}),s.jsx("tbody",{children:t.map(n=>s.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40 align-top",children:[s.jsx("td",{className:"py-3 pr-3 text-text-muted font-mono",children:n.id}),s.jsx("td",{className:"py-3 pr-3 text-text font-medium",children:n.attempted_approach}),s.jsx("td",{className:"py-3 pr-3 text-text-muted",children:n.failure_reason}),s.jsx("td",{className:"py-3 pr-3 text-text-muted text-xs",children:(n.files_involved??[]).map(r=>s.jsx("div",{children:r},r))}),s.jsx("td",{className:"py-3 pr-3",children:n.never_retry&&s.jsx(le,{className:"bg-danger text-white",children:"never retry"})}),s.jsx("td",{className:"py-3 text-text-muted text-xs",title:n.created_at,children:G(n.created_at)})]},n.id))})]})})}function Hx(){const{snapshot:e}=Fe(),{notes:t}=e;return t.length===0?s.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No notes yet. Use ",s.jsx("code",{children:"add_note"})," for stray observations."]}):s.jsx("div",{className:"space-y-6",children:t.map(n=>s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2 flex-wrap",children:[s.jsxs(le,{children:["note #",n.id]}),(n.tags??[]).map(r=>s.jsx(le,{children:r},r)),s.jsx("span",{className:"text-text-muted text-xs",children:G(n.created_at)}),n.audio_path&&s.jsx(le,{className:"bg-success text-bg",children:"audio"})]}),s.jsx("pre",{className:"bg-panel border border-border rounded p-3 text-xs font-mono text-text whitespace-pre-wrap",children:n.body}),n.audio_path&&s.jsx("audio",{controls:!0,className:"mt-2 w-full",src:n.audio_path}),n.files_touched&&n.files_touched.length>0&&s.jsxs("div",{className:"text-text-muted text-xs mt-1",children:["files: ",n.files_touched.join(", ")]})]},n.id))})}function Qx(){const{snapshot:e}=Fe(),{latest_plan:t,plan_history:n}=e;return t?s.jsxs("div",{children:[s.jsxs("section",{className:"mb-8",children:[s.jsxs("h3",{className:"text-sm text-text mb-2",children:["Latest plan — v",t.version]}),s.jsxs("div",{className:"text-text-muted text-xs mb-3",children:["saved ",G(t.created_at)]}),s.jsx("pre",{className:"bg-panel border border-border rounded p-4 text-xs font-mono text-text whitespace-pre-wrap overflow-x-auto",children:t.plan_md})]}),n.length>0&&s.jsxs("section",{children:[s.jsx("h3",{className:"text-sm text-text mb-3",children:"Version history"}),s.jsx("ul",{className:"space-y-1 text-sm",children:n.map(r=>s.jsxs("li",{className:"text-text-muted",children:[s.jsxs("span",{className:"text-text font-medium",children:["v",r.version]})," — ",r.created_at," (",r.plan_md_length," chars)"]},r.id))})]})]}):s.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No plans saved. Use ",s.jsx("code",{children:"save_plan"})," to persist an approved plan."]})}function en({title:e,children:t}){return s.jsxs("section",{className:"mb-6",children:[s.jsx("h3",{className:"text-sm text-text mb-2",children:e}),t]})}function Un(){return s.jsx("div",{className:"text-text-muted text-sm",children:"(none)"})}function Kx(){const{snapshot:e}=Fe(),t=e.context;if(!t)return s.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No context set. Use ",s.jsx("code",{children:"update_context"})," to record conventions / dont_touch / deploy_notes."]});const n=t.file_annotations??{},r=Object.entries(n);return s.jsxs("div",{children:[s.jsx(en,{title:"Conventions",children:t.conventions?s.jsx("pre",{className:"bg-panel border border-border rounded p-3 text-xs font-mono text-text whitespace-pre-wrap",children:t.conventions}):s.jsx(Un,{})}),s.jsx(en,{title:"Don't touch",children:t.dont_touch&&t.dont_touch.length>0?s.jsx("ul",{className:"list-disc list-inside text-sm text-text",children:t.dont_touch.map(l=>s.jsx("li",{children:l},l))}):s.jsx(Un,{})}),s.jsx(en,{title:"Test patterns",children:t.test_patterns?s.jsx("pre",{className:"bg-panel border border-border rounded p-3 text-xs font-mono text-text whitespace-pre-wrap",children:t.test_patterns}):s.jsx(Un,{})}),s.jsx(en,{title:"Deploy notes",children:t.deploy_notes?s.jsx("pre",{className:"bg-panel border border-border rounded p-3 text-xs font-mono text-text whitespace-pre-wrap",children:t.deploy_notes}):s.jsx(Un,{})}),s.jsx(en,{title:"File annotations",children:r.length>0?s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"pb-2 pr-3",children:"Path"}),s.jsx("th",{className:"pb-2",children:"Annotation"})]})}),s.jsx("tbody",{children:r.map(([l,i])=>s.jsxs("tr",{className:"border-b border-border/40 align-top",children:[s.jsx("td",{className:"py-2 pr-3 text-text font-mono text-xs",children:l}),s.jsx("td",{className:"py-2 text-text-muted",children:i})]},l))})]}):s.jsx(Un,{})}),s.jsx(en,{title:"Meta",children:s.jsxs("div",{className:"text-xs text-text-muted",children:["Last validated commit: ",t.last_validated_commit?s.jsx("code",{className:"text-text",children:t.last_validated_commit}):"(none)",s.jsx("br",{}),"Updated: ",t.updated_at]})})]})}function Yx(){const{snapshot:e}=Fe(),{activity:t}=e;return t.length===0?s.jsx("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:"No activity yet. Write paths (claim_task, log_decision, etc.) populate this timeline."}):s.jsx("div",{className:"space-y-px",children:t.map(n=>s.jsxs("div",{className:"grid grid-cols-[110px_160px_1fr_140px] gap-3 py-2 border-b border-border/40 items-baseline text-xs",children:[s.jsx("div",{className:"text-text-muted font-mono",title:n.created_at,children:G(n.created_at)}),s.jsx("div",{className:"text-accent",children:n.action_type}),s.jsxs("div",{className:"text-text flex flex-wrap items-center gap-2",children:[n.action_details&&s.jsx("span",{children:n.action_details}),n.entity_type&&s.jsxs(le,{children:[n.entity_type,"#",n.entity_id??"?"]}),n.ref_url&&s.jsxs("span",{className:"text-text-dim font-mono",children:[n.ref_url.slice(0,16),"…"]})]}),s.jsx("div",{className:"text-text-muted font-mono text-[11px]",children:n.session_id??""})]},n.id))})}function Zo(e){if(e<60)return`${e}s`;const t=Math.round(e/60);if(t<60)return`${t}m`;const n=Math.floor(t/60),r=t%60;return r===0?`${n}h`:`${n}h ${r}m`}function ne({label:e,value:t}){return s.jsxs("div",{className:"bg-panel border border-border rounded p-3",children:[s.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted",children:e}),s.jsx("div",{className:"text-2xl text-text mt-1",children:t})]})}function Gx(){const{snapshot:e}=Fe(),{subtasks:t,decisions:n,dead_ends:r,notes:l,sessions:i,activity:a,plan_history:o,draft_counts:u,project:f}=e,[p,d]=g.useState(null),[x,w]=g.useState(null),[v,j]=g.useState(!1),[y,m]=g.useState(null),c=()=>{Ko(f.id).then(d),Yo(f.id).then(w)};g.useEffect(()=>{let C=!1;return Ko(f.id).then(ie=>{C||d(ie)}),Yo(f.id).then(ie=>{C||w(ie)}),()=>{C=!0}},[f.id]);const h=async()=>{j(!0),m(null);try{const C=await yx({since_hours:720});m(`parsed ${C.parsed} transcripts, upserted ${C.upserted}, total scanned ≈ $${C.total_cost_usd.toFixed(2)}`),c()}catch(C){m("ingest failed: "+(C instanceof Error?C.message:String(C)))}finally{j(!1)}},k=new Map(t.map(C=>[C.id,C.title])),b={total:t.length,todo:t.filter(C=>C.status==="todo").length,in_progress:t.filter(C=>C.status==="in_progress").length,done:t.filter(C=>C.status==="done").length},N={total:n.length,open:n.filter(C=>C.status==="open").length,fixed:n.filter(C=>C.status==="fixed").length},_=Date.now(),E=a.filter(C=>{const ie=new Date(C.created_at.replace(" ","T")+"Z").getTime();return!isNaN(ie)&&_-ie<864e5}).length,F=new Map;for(const C of a)F.set(C.action_type,(F.get(C.action_type)??0)+1);const L=[...F.entries()].sort((C,ie)=>ie[1]-C[1]).slice(0,20);return s.jsxs("div",{children:[s.jsxs("section",{className:"mb-6",children:[s.jsx("h3",{className:"text-sm text-text mb-3",children:"Subtasks"}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[s.jsx(ne,{label:"total",value:b.total}),s.jsx(ne,{label:"todo",value:b.todo}),s.jsx(ne,{label:"in progress",value:b.in_progress}),s.jsx(ne,{label:"done",value:b.done})]})]}),s.jsxs("section",{className:"mb-6",children:[s.jsx("h3",{className:"text-sm text-text mb-3",children:"Memory"}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[s.jsx(ne,{label:"decisions",value:N.total}),s.jsx(ne,{label:"decisions open",value:N.open}),s.jsx(ne,{label:"decisions fixed",value:N.fixed}),s.jsx(ne,{label:"drafts pending",value:u.pending}),s.jsx(ne,{label:"drafts approved",value:u.approved}),s.jsx(ne,{label:"dead ends",value:r.length}),s.jsx(ne,{label:"notes",value:l.length}),s.jsx(ne,{label:"plan versions",value:o.length})]})]}),s.jsxs("section",{className:"mb-6",children:[s.jsx("h3",{className:"text-sm text-text mb-3",children:"Time on task"}),p===null?s.jsx("div",{className:"text-text-muted text-sm",children:"loading…"}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3 mb-4",children:[s.jsxs("div",{className:"bg-panel border border-border rounded p-3",children:[s.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted",children:"total time"}),s.jsx("div",{className:"text-2xl text-text mt-1",children:Zo(p.total_seconds)})]}),s.jsx(ne,{label:"sessions w/ subtask",value:p.session_count}),s.jsx(ne,{label:"tasks tracked",value:p.per_subtask.length})]}),p.per_subtask.length===0?s.jsx("div",{className:"text-text-muted text-sm",children:"(no time-tracked sessions — sessions only count toward a task when claude_session_id is linked at claim)"}):s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"pb-2 pr-3",children:"Task"}),s.jsx("th",{className:"pb-2 pr-3 text-right",children:"Duration"}),s.jsx("th",{className:"pb-2 pr-3 text-right",children:"Sessions"}),s.jsx("th",{className:"pb-2 text-right",children:"Last touched"})]})}),s.jsx("tbody",{children:p.per_subtask.slice(0,20).map(C=>s.jsxs("tr",{className:"border-b border-border/40",children:[s.jsx("td",{className:"py-1.5 pr-3 text-text",children:s.jsxs("a",{href:`#subtask-${C.subtask_id}`,className:"hover:underline",children:["#",C.subtask_id," ",k.get(C.subtask_id)??"(deleted)"]})}),s.jsx("td",{className:"py-1.5 pr-3 text-text text-right font-mono",children:Zo(C.total_seconds)}),s.jsxs("td",{className:"py-1.5 pr-3 text-text text-right",children:[C.session_count,C.open_sessions>0?s.jsxs("span",{className:"text-warning",children:[" (",C.open_sessions," open)"]}):null]}),s.jsx("td",{className:"py-1.5 text-text-muted text-right text-xs",children:C.last_session_at??"—"})]},C.subtask_id))})]})]})]}),s.jsxs("section",{className:"mb-6",children:[s.jsxs("div",{className:"flex items-baseline justify-between mb-3",children:[s.jsx("h3",{className:"text-sm text-text",children:"AI token cost"}),s.jsx("button",{onClick:()=>void h(),disabled:v,className:"text-[11px] uppercase tracking-wider text-accent hover:underline disabled:text-text-dim",children:v?"ingesting…":"ingest transcripts"})]}),y&&s.jsx("div",{className:"text-text-muted text-xs mb-3",children:y}),x===null?s.jsx("div",{className:"text-text-muted text-sm",children:"loading…"}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3 mb-4",children:[s.jsxs("div",{className:"bg-panel border border-border rounded p-3",children:[s.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted",children:"total cost"}),s.jsxs("div",{className:"text-2xl text-text mt-1",children:["$",x.total_cost_usd.toFixed(2)]})]}),s.jsx(ne,{label:"costed sessions",value:x.session_count}),s.jsx(ne,{label:"tasks with cost",value:x.per_subtask.length})]}),x.per_subtask.length===0?s.jsxs("div",{className:"text-text-muted text-sm",children:["(no cost data yet — click ",s.jsx("em",{children:"ingest transcripts"})," above to parse ",s.jsx("code",{children:"~/.claude/projects/"})," JSONL files)"]}):s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"pb-2 pr-3",children:"Task"}),s.jsx("th",{className:"pb-2 pr-3 text-right",children:"Cost (USD)"}),s.jsx("th",{className:"pb-2 pr-3 text-right",children:"Input tok"}),s.jsx("th",{className:"pb-2 pr-3 text-right",children:"Output tok"}),s.jsx("th",{className:"pb-2 text-right",children:"Models"})]})}),s.jsx("tbody",{children:x.per_subtask.slice(0,20).map(C=>s.jsxs("tr",{className:"border-b border-border/40",children:[s.jsxs("td",{className:"py-1.5 pr-3 text-text",children:["#",C.subtask_id," ",k.get(C.subtask_id)??"(deleted)"]}),s.jsxs("td",{className:"py-1.5 pr-3 text-text text-right font-mono",children:["$",C.total_cost_usd.toFixed(4)]}),s.jsx("td",{className:"py-1.5 pr-3 text-text-muted text-right font-mono text-xs",children:C.total_input_tokens.toLocaleString()}),s.jsx("td",{className:"py-1.5 pr-3 text-text-muted text-right font-mono text-xs",children:C.total_output_tokens.toLocaleString()}),s.jsx("td",{className:"py-1.5 text-text-muted text-right text-xs",children:C.by_model.map(ie=>ie.model.replace("claude-","")).join(", ")})]},C.subtask_id))})]})]})]}),s.jsxs("section",{className:"mb-6",children:[s.jsx("h3",{className:"text-sm text-text mb-3",children:"Activity"}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3 mb-4",children:[s.jsx(ne,{label:"sessions",value:i.length}),s.jsx(ne,{label:"events total",value:a.length}),s.jsx(ne,{label:"events 24h",value:E})]}),s.jsx("h3",{className:"text-sm text-text mb-3",children:"Recent action counts"}),L.length===0?s.jsx("div",{className:"text-text-muted text-sm",children:"(no activity)"}):s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"pb-2 pr-3",children:"Action"}),s.jsx("th",{className:"pb-2",children:"Count"})]})}),s.jsx("tbody",{children:L.map(([C,ie])=>s.jsxs("tr",{className:"border-b border-border/40",children:[s.jsx("td",{className:"py-1.5 pr-3 text-text font-mono text-xs",children:C}),s.jsx("td",{className:"py-1.5 text-text",children:ie})]},C))})]})]})]})}function Xx(){const{snapshot:e}=Fe(),{sessions:t}=e;return t.length===0?s.jsx("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:"No sessions yet for this project. Sessions appear when agent_bootstrap or claim_task is called with a session_id."}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Session ID"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Started"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Ended"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Duration"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-20",children:"Tool calls"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-20",children:"Files"}),s.jsx("th",{className:"font-medium pb-2",children:"Notes"})]})}),s.jsx("tbody",{children:t.map(n=>s.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40 align-top",children:[s.jsx("td",{className:"py-2 pr-3 text-text font-mono text-xs",children:s.jsx(X,{to:`/sessions/${encodeURIComponent(n.session_id)}`,className:"text-accent hover:underline",children:n.session_id})}),s.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:G(n.started_at)}),s.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:n.ended_at?G(n.ended_at):"active"}),s.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:n.duration_seconds?`${Math.floor(n.duration_seconds/60)}m`:""}),s.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:n.tool_calls_count}),s.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:n.files_touched_count}),s.jsx("td",{className:"py-2 text-text-muted text-xs",children:n.notes??""})]},n.session_id))})]})})}function Jx(){const[e,t]=g.useState(null),[n,r]=g.useState(null);return g.useEffect(()=>{lx(500).then(t).catch(l=>r(l instanceof Error?l.message:String(l)))},[]),n?s.jsxs("div",{className:"text-danger",children:["Error: ",n]}):e?s.jsxs("div",{children:[s.jsxs("header",{className:"border-b border-border pb-3 mb-6",children:[s.jsx("h1",{className:"text-2xl text-text",children:"All sessions"}),s.jsxs("div",{className:"text-text-muted text-xs mt-1",children:[e.length," session(s)"]})]}),e.length===0?s.jsx("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:"No sessions tracked yet."}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"font-medium pb-2 pr-3",children:"Session ID"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Project"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Started"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Ended"}),s.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Duration"}),s.jsx("th",{className:"font-medium pb-2 w-20",children:"Tool calls"})]})}),s.jsx("tbody",{children:e.map(l=>s.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40",children:[s.jsx("td",{className:"py-2 pr-3 text-text font-mono text-xs",children:s.jsx(X,{to:`/sessions/${encodeURIComponent(l.session_id)}`,className:"text-accent hover:underline",children:l.session_id})}),s.jsx("td",{className:"py-2 pr-3 text-text-muted",children:l.project_id?`#${l.project_id}`:""}),s.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:G(l.started_at)}),s.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:l.ended_at?G(l.ended_at):"active"}),s.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:l.duration_seconds?`${Math.floor(l.duration_seconds/60)}m`:""}),s.jsx("td",{className:"py-2 text-text-muted text-xs",children:l.tool_calls_count})]},l.session_id))})]})})]}):s.jsx("div",{className:"text-text-muted",children:"loading sessions..."})}function qx(){const{sessionId:e}=ya(),[t,n]=g.useState(null),[r,l]=g.useState(null);if(g.useEffect(()=>{e&&ix(e).then(n).catch(o=>l(o instanceof Error?o.message:String(o)))},[e]),r)return s.jsxs("div",{className:"text-danger",children:["Error: ",r]});if(!t)return s.jsx("div",{className:"text-text-muted",children:"loading session..."});const{session:i,activity:a}=t;return s.jsxs("div",{children:[s.jsxs("header",{className:"border-b border-border pb-3 mb-4",children:[s.jsx(X,{to:"/sessions",className:"text-accent text-xs hover:underline",children:"← all sessions"}),s.jsx("h1",{className:"text-2xl text-text mt-1 font-mono",children:i.session_id}),s.jsxs("div",{className:"text-text-muted text-xs mt-2 flex gap-3 flex-wrap",children:[s.jsxs("span",{children:["started ",i.started_at]}),i.ended_at&&s.jsxs("span",{children:["ended ",i.ended_at]}),i.duration_seconds!==null&&s.jsxs("span",{children:["duration ",Math.floor(i.duration_seconds/60),"m ",i.duration_seconds%60,"s"]}),s.jsxs("span",{children:[i.tool_calls_count," tool calls"]}),s.jsxs("span",{children:[i.files_touched_count," files touched"]})]}),i.notes&&s.jsx("pre",{className:"bg-panel border border-border rounded p-3 mt-3 text-xs font-mono text-text whitespace-pre-wrap",children:i.notes})]}),s.jsx("h2",{className:"text-sm text-text mb-3",children:"Activity"}),a.length===0?s.jsx("div",{className:"text-text-muted text-sm",children:"(no activity in this session)"}):s.jsx("div",{className:"space-y-px",children:a.map(o=>s.jsxs("div",{className:"grid grid-cols-[110px_160px_1fr] gap-3 py-2 border-b border-border/40 items-baseline text-xs",children:[s.jsx("div",{className:"text-text-muted font-mono",title:o.created_at,children:G(o.created_at)}),s.jsx("div",{className:"text-accent",children:o.action_type}),s.jsxs("div",{className:"text-text flex flex-wrap items-center gap-2",children:[o.action_details&&s.jsx("span",{children:o.action_details}),o.entity_type&&s.jsxs(le,{children:[o.entity_type,"#",o.entity_id??"?"]})]})]},o.id))})]})}const Zx={storage:"Storage",dashboard:"Dashboard",embedding:"Embedding (semantic recall)",llm:"LLM (extraction + summarization)",recall:"Recall mode",sync:"Sync"};function ev(){const[e,t]=g.useState(null),[n,r]=g.useState([]),[l,i]=g.useState({}),[a,o]=g.useState(null),u=g.useCallback(async()=>{try{const v=await ax();t(v.specs),r(v.values),i({})}catch(v){o({kind:"err",text:v instanceof Error?v.message:String(v)})}},[]);if(g.useEffect(()=>{u()},[u]),!e)return s.jsx("div",{className:"text-text-muted",children:"loading settings..."});const f=new Map(n.map(v=>[v.key,v])),p=new Map;for(const v of e)p.has(v.group)||p.set(v.group,[]),p.get(v.group).push(v);function d(v,j){i(y=>({...y,[v]:j}))}function x(v){i(j=>{const{[v]:y,...m}=j;return m})}async function w(){if(Object.keys(l).length===0){o({kind:"err",text:"no changes to save"});return}o({kind:"busy",text:"writing ~/.shinobi/.env ..."});try{const v=await ox(l);if(!v.ok)throw new Error(v.error??"unknown error");const j=Object.keys(l).filter(m=>{var c;return(c=e==null?void 0:e.find(h=>h.key===m))==null?void 0:c.requiresRestart}),y=`wrote ${v.written??0}, cleared ${v.cleared??0}${j.length>0?` (restart required: ${j.join(", ")})`:""}`;o({kind:"ok",text:y}),await u()}catch(v){o({kind:"err",text:v instanceof Error?v.message:String(v)})}}return s.jsxs("div",{className:"max-w-3xl",children:[s.jsxs("header",{className:"border-b border-border pb-3 mb-6 flex items-baseline justify-between",children:[s.jsx("h1",{className:"text-2xl text-text",children:"Settings"}),s.jsx("span",{className:"text-text-muted text-xs",children:"writes to ~/.shinobi/.env with backup"})]}),a&&s.jsxs("div",{className:`mb-4 px-4 py-2 rounded text-sm flex items-center gap-2 ${a.kind==="ok"?"bg-success/20 text-success border border-success/40":a.kind==="err"?"bg-danger/20 text-danger border border-danger/40":"bg-warning/20 text-warning border border-warning/40"}`,children:[a.kind==="ok"&&s.jsx(Rt,{className:"w-4 h-4"}),a.kind==="err"&&s.jsx(at,{className:"w-4 h-4"}),a.kind==="busy"&&s.jsx(Yt,{className:"w-4 h-4 animate-spin"}),a.text]}),[...p.entries()].map(([v,j])=>s.jsxs("section",{className:"mb-8",children:[s.jsx("h2",{className:"text-sm text-text mb-3 uppercase tracking-wider text-text-muted",children:Zx[v]}),s.jsx("div",{className:"space-y-3",children:j.map(y=>{const m=f.get(y.key),c=y.key in l,h=l[y.key];return s.jsxs("div",{className:"bg-panel border border-border rounded p-3",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-3 mb-1",children:[s.jsxs("div",{children:[s.jsxs("label",{className:"text-sm text-text font-medium",children:[y.label,y.requiresRestart&&s.jsx("span",{className:"ml-2 text-[10px] uppercase tracking-wider text-warning",children:"restart required"})]}),s.jsx("code",{className:"ml-2 text-[11px] text-text-muted font-mono",children:y.key})]}),(m==null?void 0:m.is_set)&&!c&&s.jsx("span",{className:"text-[10px] uppercase tracking-wider text-success",children:"set"}),c&&s.jsx("span",{className:"text-[10px] uppercase tracking-wider text-warning",children:"unsaved"})]}),s.jsx("p",{className:"text-xs text-text-muted mb-2",children:y.description}),s.jsxs("div",{className:"flex gap-2 items-center",children:[y.enumValues?s.jsxs("select",{value:c?h??"":(m==null?void 0:m.value)??"",onChange:k=>d(y.key,k.target.value||null),className:"bg-panel-2 border border-border rounded px-2 py-1 text-sm text-text font-mono flex-1",children:[s.jsx("option",{value:"",children:"(unset)"}),y.enumValues.map(k=>s.jsx("option",{value:k,children:k},k))]}):s.jsx("input",{type:y.secret?"password":"text",value:c?h??"":(m==null?void 0:m.value)??"",placeholder:m!=null&&m.is_set&&y.secret?"(secret set — type to replace)":y.placeholder??"(unset)",onChange:k=>d(y.key,k.target.value||null),className:"bg-panel-2 border border-border rounded px-2 py-1 text-sm text-text font-mono flex-1 placeholder:text-text-dim"}),c&&s.jsx(z,{size:"sm",variant:"ghost",onClick:()=>x(y.key),title:"discard change",children:s.jsx(Ih,{className:"w-3 h-3"})})]})]},y.key)})})]},v)),s.jsxs("div",{className:"sticky bottom-0 bg-bg/95 backdrop-blur border-t border-border py-3 -mx-8 px-8 flex justify-end gap-2",children:[s.jsx(z,{variant:"default",onClick:()=>i({}),disabled:Object.keys(l).length===0,children:"Discard all"}),s.jsxs(z,{variant:"primary",onClick:()=>void w(),disabled:Object.keys(l).length===0,children:["Save (",Object.keys(l).length," change",Object.keys(l).length===1?"":"s",")"]})]})]})}async function $d(e,t){const n=await fetch(e,t);if(!n.ok){const r=await n.text();throw new Error(`${(t==null?void 0:t.method)??"GET"} ${e} → ${n.status}: ${r.slice(0,200)}`)}return await n.json()}async function tv(e,t="recording.webm"){const n=new FormData;return n.append("audio",e,t),await(await fetch("/api/audio/transcribe",{method:"POST",body:n})).json()}function nv(e){return $d("/api/voice/save-note",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function rv(e){return $d("/api/voice/extract-decisions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function sv(e){const t=new FormData;return t.append("audio",e.file),t.append("project_id",String(e.project_id)),e.title&&t.append("title",e.title),e.session_id&&t.append("session_id",e.session_id),await(await fetch("/api/voice/meeting/process",{method:"POST",body:t})).json()}async function lv(e){var o;if(!((o=navigator.mediaDevices)!=null&&o.getUserMedia))throw new Error("mic API unavailable in this browser");const t=await navigator.mediaDevices.getUserMedia({audio:!0}),r=["audio/webm;codecs=opus","audio/webm","audio/mp4","audio/ogg;codecs=opus"].find(u=>MediaRecorder.isTypeSupported(u))??"",l=r?new MediaRecorder(t,{mimeType:r}):new MediaRecorder(t),i=[],a=Date.now();return l.addEventListener("dataavailable",u=>{u.data&&u.data.size>0&&i.push(u.data)}),l.addEventListener("stop",()=>{const u=new Blob(i,{type:l.mimeType||"audio/webm"});e(u,Date.now()-a),t.getTracks().forEach(f=>f.stop())}),l.start(),l}function iv(){const[e,t]=g.useState({kind:"idle"}),[n,r]=g.useState([]),[l,i]=g.useState(null),[a,o]=g.useState("voice"),[u,f]=g.useState(""),p=g.useRef(null),[d,x]=g.useState(0);g.useEffect(()=>{Id({sort:"active"}).then(N=>{r(N);const _=localStorage.getItem("voice-project-id");_&&N.some(E=>String(E.id)===_)&&i(Number(_))}).catch(()=>{})},[]),g.useEffect(()=>(e.kind==="recording"?p.current=window.setInterval(()=>x(N=>N+1),250):p.current!==null&&(clearInterval(p.current),p.current=null),()=>{p.current!==null&&clearInterval(p.current)}),[e.kind]);function w(N){i(N),N!==null?localStorage.setItem("voice-project-id",String(N)):localStorage.removeItem("voice-project-id")}async function v(){try{const N=await lv((_,E)=>{t({kind:"recorded",blob:_,durationMs:E})});t({kind:"recording",startedAt:Date.now(),recorder:N})}catch(N){t({kind:"error",message:N instanceof Error?N.message:String(N)})}}function j(){e.kind==="recording"&&e.recorder.stop()}function y(){t({kind:"idle"}),f("")}async function m(){if(e.kind==="recorded"){t({kind:"transcribing"});try{const N=e.blob.type.includes("mp4")?"mp4":e.blob.type.includes("ogg")?"ogg":"webm",_=await tv(e.blob,`recording.${N}`);if(!_.ok||!_.text){t({kind:"error",message:_.error??"transcription returned empty"});return}f(_.text),t({kind:"transcribed",blob:e.blob,text:_.text,provider:_.provider??"unknown",model:_.model??"unknown",durationMs:e.durationMs})}catch(N){t({kind:"error",message:N instanceof Error?N.message:String(N)})}}}async function c(){var N;if(!(e.kind!=="transcribed"||u.trim()==="")){t({kind:"saving"});try{const _=a.split(",").map(F=>F.trim()).filter(Boolean),E=await nv({project_id:l??void 0,text:u.trim(),tags:_.length>0?_:["voice"]});if(!E.ok){t({kind:"error",message:E.error??"save failed"});return}t({kind:"done",message:`note #${(N=E.note)==null?void 0:N.id} saved${l?` to project #${l}`:" to inbox"}`})}catch(_){t({kind:"error",message:_ instanceof Error?_.message:String(_)})}}}async function h(){if(e.kind!=="transcribed"||u.trim()===""||l===null){l===null&&t({kind:"error",message:"pick a project to extract decisions into"});return}t({kind:"saving"});try{const N=await rv({project_id:l,text:u.trim()});if(!N.ok){t({kind:"error",message:N.error??"extract failed"});return}t({kind:"done",message:`${N.drafts_extracted??0} draft(s) created via ${N.provider}:${N.model} — open project Drafts tab to review`})}catch(N){t({kind:"error",message:N instanceof Error?N.message:String(N)})}}function k(){t({kind:"idle"}),f("")}const b=e.kind==="recording"?Math.floor((Date.now()-e.startedAt)/1e3):0;return s.jsxs("div",{className:"max-w-2xl mx-auto",children:[s.jsxs("header",{className:"border-b border-border pb-3 mb-6",children:[s.jsxs("h1",{className:"text-2xl text-text flex items-center gap-2",children:[s.jsx(Ni,{className:"w-6 h-6 text-accent"})," Voice capture"]}),s.jsx("p",{className:"text-text-muted text-xs mt-1",children:"Record audio → Whisper transcribe → save as note or extract decisions into drafts for review."})]}),s.jsxs("div",{className:"bg-panel border border-border rounded-lg p-6 mb-4",children:[s.jsx("label",{className:"block text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Project"}),s.jsxs("select",{value:l??"",onChange:N=>w(N.target.value?Number(N.target.value):null),className:"w-full bg-panel-2 border border-border rounded px-3 py-2 text-sm text-text",children:[s.jsx("option",{value:"",children:"(inbox — no project)"}),n.map(N=>s.jsxs("option",{value:N.id,children:[N.workspace?`[${N.workspace}] `:"",N.title]},N.id))]}),s.jsxs("div",{className:"flex flex-col items-center my-8",children:[e.kind==="idle"&&s.jsx(z,{variant:"primary",onClick:()=>void v(),className:"w-32 h-32 rounded-full flex items-center justify-center text-base",children:s.jsx(Ni,{className:"w-12 h-12"})}),e.kind==="recording"&&s.jsxs(s.Fragment,{children:[s.jsx(z,{variant:"danger",onClick:j,className:"w-32 h-32 rounded-full flex items-center justify-center animate-pulse",children:s.jsx(Uh,{className:"w-12 h-12"})}),s.jsxs("div",{className:"mt-3 text-warning text-sm font-mono",children:["recording ",b,"s"]})]}),e.kind==="recorded"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-text text-sm",children:["recorded ",Math.floor(e.durationMs/1e3),"s"]}),s.jsx("audio",{controls:!0,className:"my-3",src:URL.createObjectURL(e.blob)}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(z,{variant:"default",onClick:y,children:s.jsx(jr,{className:"w-4 h-4"})}),s.jsx(z,{variant:"primary",onClick:()=>void m(),children:"Transcribe"})]})]}),e.kind==="transcribing"&&s.jsxs("div",{className:"text-warning text-sm flex items-center gap-2",children:[s.jsx(Yt,{className:"w-4 h-4 animate-spin"})," transcribing..."]}),e.kind==="transcribed"&&s.jsxs("div",{className:"w-full",children:[s.jsx("label",{className:"block text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Transcript (edit before saving)"}),s.jsx("textarea",{value:u,onChange:N=>f(N.target.value),rows:6,className:"w-full bg-panel-2 border border-border rounded px-3 py-2 text-sm text-text font-mono"}),s.jsxs("div",{className:"text-text-dim text-[10px] mt-1",children:["via ",e.provider,":",e.model," · ",Math.floor(e.durationMs/1e3),"s audio"]}),s.jsx("label",{className:"block text-[11px] uppercase tracking-wider text-text-muted mt-4 mb-2",children:"Tags (comma-separated, applied to note only)"}),s.jsx("input",{type:"text",value:a,onChange:N=>o(N.target.value),className:"w-full bg-panel-2 border border-border rounded px-3 py-2 text-sm text-text font-mono"}),s.jsxs("div",{className:"flex gap-2 mt-4 flex-wrap",children:[s.jsxs(z,{variant:"default",onClick:k,children:[s.jsx(jr,{className:"w-4 h-4 mr-1"})," Discard"]}),s.jsxs(z,{variant:"primary",onClick:()=>void c(),className:"flex items-center",children:[s.jsx($h,{className:"w-4 h-4 mr-1"})," Save as note"]}),s.jsxs(z,{variant:"primary",onClick:()=>void h(),disabled:l===null,className:"flex items-center",title:l===null?"pick a project first":"extract decisions to drafts",children:[s.jsx(Fh,{className:"w-4 h-4 mr-1"})," Extract decisions"]})]})]}),e.kind==="saving"&&s.jsxs("div",{className:"text-warning text-sm flex items-center gap-2",children:[s.jsx(Yt,{className:"w-4 h-4 animate-spin"})," saving..."]}),e.kind==="done"&&s.jsxs("div",{className:"text-success text-sm flex items-center gap-2 flex-col",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Rt,{className:"w-4 h-4"})," ",e.message]}),s.jsx(z,{variant:"primary",onClick:k,className:"mt-3",children:"Record another"})]}),e.kind==="error"&&s.jsxs("div",{className:"text-danger text-sm flex items-center gap-2 flex-col",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(at,{className:"w-4 h-4"})," ",e.message]}),s.jsx(z,{variant:"default",onClick:k,className:"mt-3",children:"Reset"})]})]})]}),s.jsx(av,{projects:n,defaultProjectId:l}),s.jsxs("div",{className:"text-text-muted text-xs mt-6",children:[s.jsxs("p",{children:["Requires a transcription provider: ",s.jsx("code",{children:"SHINOBI_TRANSCRIPTION_PROVIDER"})," in ",s.jsx(X,{to:"/settings",className:"text-accent underline",children:"Settings"})," (or canonical ",s.jsx("code",{children:"GROQ_API_KEY"})," / ",s.jsx("code",{children:"OPENAI_API_KEY"}),")."]}),s.jsx("p",{className:"mt-1",children:`Install as PWA on mobile via browser's "Add to home screen" — works offline for read-only.`})]})]})}function av({projects:e,defaultProjectId:t}){var y,m;const[n,r]=g.useState(null),[l,i]=g.useState(""),[a,o]=g.useState(t),[u,f]=g.useState(!1),[p,d]=g.useState(null),[x,w]=g.useState(null);g.useEffect(()=>{o(t)},[t]);async function v(){if(!n||a===null){w("pick an audio file and a project");return}f(!0),w(null),d(null);try{const c={file:n,project_id:a};l.trim()&&(c.title=l.trim());const h=await sv(c);if(!h.ok){w(h.error??"meeting processing failed");return}d(h)}catch(c){w(c instanceof Error?c.message:String(c))}finally{f(!1)}}function j(){r(null),i(""),d(null),w(null)}return s.jsxs("div",{className:"bg-panel border border-border rounded-lg p-6 mt-6",children:[s.jsxs("h2",{className:"text-sm text-text mb-2 flex items-center gap-2",children:[s.jsx(Hh,{className:"w-4 h-4 text-accent"})," Meeting capture (upload longer audio)"]}),s.jsxs("p",{className:"text-text-muted text-xs mb-4",children:["Upload a meeting recording (.mp3 / .m4a / .wav / .webm, max ~25 MB on Groq free tier). Whisper transcribes → transcript saved as a note tagged ",s.jsx("code",{children:"meeting"})," → decision extractor runs → review drafts on the project's Drafts tab."]}),s.jsx("label",{className:"block text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Project"}),s.jsxs("select",{value:a??"",onChange:c=>o(c.target.value?Number(c.target.value):null),className:"w-full bg-panel-2 border border-border rounded px-3 py-2 text-sm text-text mb-3",children:[s.jsx("option",{value:"",children:"(pick a project — required for meetings)"}),e.map(c=>s.jsxs("option",{value:c.id,children:[c.workspace?`[${c.workspace}] `:"",c.title]},c.id))]}),s.jsx("label",{className:"block text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Title (optional)"}),s.jsx("input",{type:"text",value:l,onChange:c=>i(c.target.value),placeholder:"e.g. Standup 2026-05-24",className:"w-full bg-panel-2 border border-border rounded px-3 py-2 text-sm text-text mb-3"}),s.jsx("label",{className:"block text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Audio file"}),s.jsx("input",{type:"file",accept:"audio/*,.mp3,.m4a,.wav,.webm,.ogg",onChange:c=>{var h;return r(((h=c.target.files)==null?void 0:h[0])??null)},className:"block w-full text-sm text-text-muted file:mr-3 file:py-1.5 file:px-3 file:rounded file:border-0 file:bg-accent file:text-bg file:cursor-pointer mb-3"}),n&&s.jsxs("div",{className:"text-text-dim text-[11px] mb-3",children:[n.name," · ",(n.size/1024/1024).toFixed(2)," MB",n.size>25*1024*1024&&s.jsx("span",{className:"text-warning ml-2",children:"⚠️ over 25 MB — Groq/OpenAI will reject. Pre-split with ffmpeg."})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(z,{variant:"primary",onClick:()=>void v(),disabled:u||!n||a===null,children:[u?s.jsx(Yt,{className:"w-4 h-4 mr-1 animate-spin"}):s.jsx(Wh,{className:"w-4 h-4 mr-1"}),u?"processing...":"Process meeting"]}),(p||x)&&s.jsx(z,{variant:"default",onClick:j,children:"Reset"})]}),x&&s.jsxs("div",{className:"mt-4 px-3 py-2 rounded text-sm flex items-center gap-2 bg-danger/20 text-danger border border-danger/40",children:[s.jsx(at,{className:"w-4 h-4"})," ",x]}),p&&s.jsxs("div",{className:"mt-4 px-3 py-2 rounded text-sm bg-success/20 text-success border border-success/40",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(Rt,{className:"w-4 h-4"})," Meeting processed"]}),s.jsxs("div",{className:"text-xs text-text grid grid-cols-[8rem_1fr] gap-y-1",children:[s.jsx("div",{className:"text-text-muted",children:"title"}),s.jsx("div",{children:p.title}),s.jsx("div",{className:"text-text-muted",children:"transcript"}),s.jsxs("div",{children:[(y=p.transcript_chars)==null?void 0:y.toLocaleString()," chars · ",((m=p.audio_duration_seconds)==null?void 0:m.toFixed(0))??"?","s audio · via ",p.transcription_provider,":",p.transcription_model]}),s.jsx("div",{className:"text-text-muted",children:"drafts extracted"}),s.jsxs("div",{children:[p.drafts_extracted??0," via ",p.extractor_provider,":",p.extractor_model]}),s.jsx("div",{className:"text-text-muted",children:"note id"}),s.jsxs("div",{children:["#",p.note_id]})]}),a!==null&&s.jsx(X,{to:`/projects/${a}/decision-drafts`,className:"inline-block mt-2 text-accent hover:underline text-xs",children:"→ Review drafts on project Drafts tab"})]})]})}const eu=4e3;function ov(){const[e,t]=g.useState(null),[n,r]=g.useState(null),[l,i]=g.useState(null),a=g.useCallback(async()=>{try{const d=await px();t(d),r(null)}catch(d){r(d instanceof Error?d.message:String(d))}},[]);g.useEffect(()=>{a();const d=setInterval(()=>void a(),eu);return()=>clearInterval(d)},[a]);async function o(d,x){i(d);try{await mx(d,x),await a()}catch(w){alert("respond failed: "+(w instanceof Error?w.message:String(w)))}finally{i(null)}}async function u(d){i(d);try{await hx(d),await a()}catch(x){alert("cancel failed: "+(x instanceof Error?x.message:String(x)))}finally{i(null)}}if(n)return s.jsxs("div",{className:"text-danger",children:["Error: ",n]});if(!e)return s.jsx("div",{className:"text-text-muted",children:"loading approvals..."});const f=e.filter(d=>d.status==="pending"),p=e.filter(d=>d.status!=="pending").slice(0,50);return s.jsxs("div",{className:"max-w-3xl",children:[s.jsxs("header",{className:"border-b border-border pb-3 mb-6 flex items-baseline justify-between",children:[s.jsx("h1",{className:"text-2xl text-text",children:"Approvals"}),s.jsxs("span",{className:"text-text-muted text-xs flex items-center gap-1",children:[s.jsx(Yt,{className:"w-3 h-3 animate-spin"}),"polling every ",eu/1e3,"s"]})]}),s.jsxs("section",{className:"mb-8",children:[s.jsxs("h2",{className:"text-sm text-text mb-3 uppercase tracking-wider text-text-muted",children:["Pending (",f.length,")"]}),f.length===0?s.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No pending approvals. Approvals appear when the agent calls ",s.jsx("code",{children:"request_approval"})," via MCP. They also fire web push to subscribed devices — see ",s.jsx(X,{to:"/push",className:"text-accent underline",children:"Push settings"}),"."]}):s.jsx("div",{className:"space-y-3",children:f.map(d=>s.jsxs("div",{id:`approval-${d.id}`,className:"bg-panel border border-warning/40 border-l-4 border-l-warning rounded-md p-4",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-3 mb-2",children:[s.jsxs("div",{className:"text-text-muted text-xs",children:["#",d.id,d.project_id&&s.jsxs(s.Fragment,{children:[" · project #",d.project_id]}),s.jsxs(s.Fragment,{children:[" · ",G(d.created_at)]})]}),s.jsx(le,{className:"bg-warning text-bg",children:"pending"})]}),s.jsx("div",{className:"text-text mb-3 whitespace-pre-wrap",children:d.prompt}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.options.map(x=>s.jsx(z,{variant:"primary",disabled:l===d.id,onClick:()=>void o(d.id,x),children:x},x)),s.jsx(z,{variant:"default",disabled:l===d.id,onClick:()=>void u(d.id),children:"Cancel"})]})]},d.id))})]}),s.jsxs("section",{children:[s.jsxs("h2",{className:"text-sm text-text mb-3 uppercase tracking-wider text-text-muted",children:["Recent (",p.length,")"]}),p.length===0?s.jsx("div",{className:"text-text-muted text-sm",children:"(none)"}):s.jsx("div",{className:"space-y-1.5",children:p.map(d=>s.jsxs("div",{className:"bg-panel border border-border rounded p-3 text-sm",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-3 mb-1",children:[s.jsxs("div",{className:"text-text-muted text-xs",children:["#",d.id,d.project_id&&s.jsxs(s.Fragment,{children:[" · project #",d.project_id]}),s.jsxs(s.Fragment,{children:[" · ",G(d.created_at)]})]}),d.status==="responded"?s.jsxs(le,{className:"bg-success text-bg",children:[s.jsx(Rt,{className:"w-3 h-3 inline mr-0.5"}),d.response_value]}):d.status==="expired"?s.jsx(le,{className:"bg-text-dim text-text",children:"expired"}):s.jsxs(le,{className:"bg-text-dim text-text",children:[s.jsx(at,{className:"w-3 h-3 inline mr-0.5"}),d.status]})]}),s.jsxs("div",{className:"text-text text-xs",children:[d.prompt.slice(0,200),d.prompt.length>200?"…":""]}),d.response_note&&s.jsxs("div",{className:"text-text-muted text-xs mt-1",children:["note: ",d.response_note]})]},d.id))})]})]})}function uv(e){const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),r=atob(n),l=new ArrayBuffer(r.length),i=new Uint8Array(l);for(let a=0;a<r.length;a++)i[a]=r.charCodeAt(a);return i}function cv(){const[e,t]=g.useState({kind:"loading"}),[n,r]=g.useState(null),[l,i]=g.useState(!1),a=g.useCallback(async()=>{try{const y=await cx();let m=null,c="default";const h="serviceWorker"in navigator&&"PushManager"in window;if(h){c=Notification.permission;const b=await(await navigator.serviceWorker.ready).pushManager.getSubscription();m=(b==null?void 0:b.endpoint)??null}t({kind:"ready",subscriptions:y,selfEndpoint:m,permission:c,supported:h})}catch(y){t({kind:"error",message:y instanceof Error?y.message:String(y)})}},[]);g.useEffect(()=>{a()},[a]);async function o(){if(e.kind==="ready"){i(!0);try{const{public_key:y}=await ux(),h=(await(await navigator.serviceWorker.ready).pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:uv(y)})).toJSON();await dx({endpoint:h.endpoint,keys:{p256dh:h.keys.p256dh,auth:h.keys.auth},device_label:navigator.userAgent.slice(0,60)}),r({kind:"ok",text:"subscribed — try Test push below"}),await a()}catch(y){r({kind:"err",text:y instanceof Error?y.message:String(y)})}finally{i(!1)}}}async function u(){i(!0);try{const m=await(await navigator.serviceWorker.ready).pushManager.getSubscription();if(m&&await m.unsubscribe(),e.kind==="ready"&&m){const c=e.subscriptions.find(h=>h.endpoint===m.endpoint);c&&await Qo(c.id)}r({kind:"ok",text:"unsubscribed"}),await a()}catch(y){r({kind:"err",text:y instanceof Error?y.message:String(y)})}finally{i(!1)}}async function f(){i(!0);try{const y=await fx();r({kind:"ok",text:`pushed to ${y.succeeded}/${y.total} (failed ${y.failed}, pruned ${y.pruned_endpoints.length})`}),await a()}catch(y){r({kind:"err",text:y instanceof Error?y.message:String(y)})}finally{i(!1)}}async function p(y){i(!0);try{await Qo(y),await a()}catch(m){r({kind:"err",text:m instanceof Error?m.message:String(m)})}finally{i(!1)}}if(e.kind==="loading")return s.jsx("div",{className:"text-text-muted",children:"loading push state..."});if(e.kind==="error")return s.jsxs("div",{className:"text-danger",children:["Error: ",e.message]});const{subscriptions:d,selfEndpoint:x,permission:w,supported:v}=e,j=x!==null;return s.jsxs("div",{className:"max-w-3xl",children:[s.jsxs("header",{className:"border-b border-border pb-3 mb-6",children:[s.jsxs("h1",{className:"text-2xl text-text flex items-center gap-2",children:[s.jsx(ki,{className:"w-6 h-6 text-accent"})," Push notifications"]}),s.jsxs("p",{className:"text-text-muted text-xs mt-1",children:["Subscribe this device to receive push alerts when the agent fires ",s.jsx("code",{children:"request_approval"})," from MCP. Tap action buttons in the notification to respond from anywhere."]})]}),n&&s.jsxs("div",{className:`mb-4 px-4 py-2 rounded text-sm flex items-center gap-2 ${n.kind==="ok"?"bg-success/20 text-success border border-success/40":"bg-danger/20 text-danger border border-danger/40"}`,children:[n.kind==="ok"?s.jsx(Rt,{className:"w-4 h-4"}):s.jsx(at,{className:"w-4 h-4"}),n.text]}),s.jsxs("section",{className:"bg-panel border border-border rounded-lg p-5 mb-6",children:[s.jsx("h2",{className:"text-sm text-text mb-3",children:"This device"}),v?w==="denied"?s.jsxs("div",{className:"text-danger text-sm flex items-center gap-2",children:[s.jsx(Wo,{className:"w-4 h-4"})," Notifications blocked at browser level. Enable in browser settings and refresh."]}):s.jsxs("div",{className:"flex flex-wrap gap-2 items-center",children:[s.jsxs("span",{className:"text-text-muted text-sm mr-2",children:["Status: ",j?s.jsx("span",{className:"text-success",children:"subscribed"}):s.jsx("span",{className:"text-text-dim",children:"not subscribed"})]}),j?s.jsxs(z,{variant:"default",onClick:()=>void u(),disabled:l,children:[s.jsx(Wo,{className:"w-4 h-4 mr-1"})," Unsubscribe"]}):s.jsxs(z,{variant:"primary",onClick:()=>void o(),disabled:l,children:[s.jsx(ki,{className:"w-4 h-4 mr-1"})," Subscribe this device"]}),s.jsxs(z,{variant:"default",onClick:()=>void f(),disabled:l||d.length===0,title:d.length===0?"no subscriptions to push to":"send test push to all subscribed devices",children:[s.jsx(ka,{className:"w-4 h-4 mr-1"})," Test push"]})]}):s.jsxs("div",{className:"text-warning text-sm flex items-center gap-2",children:[s.jsx(at,{className:"w-4 h-4"})," Push API not supported in this browser (try Chrome / Firefox / Edge on desktop, or Safari 16+ as PWA on iOS)."]})]}),s.jsxs("section",{children:[s.jsxs("h2",{className:"text-sm text-text mb-3",children:["All subscribed devices (",d.length,")"]}),d.length===0?s.jsx("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:"No devices subscribed yet."}):s.jsx("div",{className:"space-y-2",children:d.map(y=>s.jsxs("div",{className:"bg-panel border border-border rounded p-3 flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"text-xs flex-1 min-w-0",children:[s.jsx("div",{className:"text-text font-medium",children:y.device_label??"(unknown device)"}),s.jsxs("div",{className:"text-text-muted mt-1 font-mono break-all",children:[y.endpoint.slice(0,100),"…"]}),s.jsxs("div",{className:"text-text-dim text-[10px] mt-1",children:["added ",G(y.created_at),y.last_sent_at?` · last push ${G(y.last_sent_at)}`:"",y.last_error?` · last error: ${y.last_error.slice(0,80)}`:""]})]}),s.jsx(z,{variant:"ghost",onClick:()=>void p(y.id),disabled:l,title:"remove subscription",children:s.jsx(jr,{className:"w-3 h-3"})})]},y.id))})]})]})}const dv=3e3;function fv(){const[e,t]=g.useState(null),[n,r]=g.useState(null),[l,i]=g.useState(!1),[a,o]=g.useState(null),u=g.useCallback(async()=>{try{const d=await _x();t(d),r(null)}catch(d){r(d instanceof Error?d.message:String(d))}},[]);g.useEffect(()=>{u();const d=setInterval(()=>void u(),dv);return()=>clearInterval(d)},[u]);async function f(){i(!0);try{const d=await Ex();o({kind:d.ok?"ok":"err",text:d.ok?"sync-available broadcast sent to peers":d.error??"broadcast failed"})}catch(d){o({kind:"err",text:d instanceof Error?d.message:String(d)})}finally{i(!1)}}if(n)return s.jsxs("div",{className:"text-danger",children:["Error: ",n]});if(!e)return s.jsx("div",{className:"text-text-muted",children:"loading relay status..."});const p=e.url!==null&&e.workspace!==null;return s.jsxs("div",{className:"max-w-3xl",children:[s.jsxs("header",{className:"border-b border-border pb-3 mb-6",children:[s.jsxs("h1",{className:"text-2xl text-text flex items-center gap-2",children:[s.jsx(Od,{className:"w-6 h-6 text-accent"})," Multi-agent relay"]}),s.jsxs("p",{className:"text-text-muted text-xs mt-1",children:["Real-time fan-out across multiple machines / agents working on the same workspace. When one agent runs ",s.jsx("code",{children:"shinobi sync push"}),", all other connected agents auto-pull within ~1.5s. Backed by a Cloudflare Worker + Durable Object — see ",s.jsx("code",{children:"relay-worker/"}),"."]})]}),a&&s.jsxs("div",{className:`mb-4 px-4 py-2 rounded text-sm flex items-center gap-2 ${a.kind==="ok"?"bg-success/20 text-success border border-success/40":"bg-danger/20 text-danger border border-danger/40"}`,children:[a.kind==="ok"?s.jsx(Rt,{className:"w-4 h-4"}):s.jsx(at,{className:"w-4 h-4"}),a.text]}),p?s.jsxs(s.Fragment,{children:[s.jsxs("section",{className:"bg-panel border border-border rounded-lg p-5 mb-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h2",{className:"text-sm text-text flex items-center gap-2",children:e.connected?s.jsxs(s.Fragment,{children:[s.jsx(Qh,{className:"w-4 h-4 text-success"}),s.jsx("span",{className:"text-success",children:"Connected"})]}):s.jsxs(s.Fragment,{children:[s.jsx(Ho,{className:"w-4 h-4 text-warning"}),s.jsx("span",{className:"text-warning",children:"Disconnected"}),e.reconnect_attempts>0&&s.jsxs("span",{className:"text-text-muted text-xs",children:["— attempt #",e.reconnect_attempts]})]})}),s.jsxs(z,{variant:"default",onClick:()=>void u(),disabled:l,children:[s.jsx(ja,{className:"w-3.5 h-3.5 mr-1"})," Refresh"]})]}),s.jsxs("dl",{className:"text-sm grid grid-cols-[10rem_1fr] gap-y-1.5",children:[s.jsx("dt",{className:"text-text-muted",children:"Agent ID"}),s.jsx("dd",{className:"text-text font-mono text-xs",children:e.agent_id}),s.jsx("dt",{className:"text-text-muted",children:"Workspace"}),s.jsx("dd",{className:"text-text font-mono text-xs",children:e.workspace}),s.jsx("dt",{className:"text-text-muted",children:"Relay URL"}),s.jsx("dd",{className:"text-text font-mono text-xs break-all",children:e.url}),s.jsx("dt",{className:"text-text-muted",children:"Last event"}),s.jsx("dd",{className:"text-text text-xs",children:e.last_event_at?s.jsxs(s.Fragment,{children:[s.jsx(le,{className:"bg-accent/20 text-accent mr-2",children:e.last_event_type}),G(e.last_event_at)]}):s.jsx("span",{className:"text-text-dim",children:"none"})}),e.last_error&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{className:"text-danger",children:"Last error"}),s.jsx("dd",{className:"text-danger text-xs",children:e.last_error})]})]})]}),s.jsxs("section",{className:"bg-panel border border-border rounded-lg p-5",children:[s.jsx("h2",{className:"text-sm text-text mb-2",children:"Test broadcast"}),s.jsxs("p",{className:"text-text-muted text-xs mb-3",children:["Sends a ",s.jsx("code",{children:"sync-available"})," event to every other connected agent in this workspace. They will auto-pull the latest snapshot."]}),s.jsxs(z,{variant:"primary",onClick:()=>void f(),disabled:l||!e.connected,children:[s.jsx(ka,{className:"w-4 h-4 mr-1"})," Broadcast sync-available"]})]})]}):s.jsxs("div",{className:"bg-panel border border-dashed border-border rounded-lg p-6",children:[s.jsxs("h2",{className:"text-text mb-2 flex items-center gap-2",children:[s.jsx(Ho,{className:"w-4 h-4 text-text-muted"})," Relay not configured"]}),s.jsxs("p",{className:"text-text-muted text-sm mb-3",children:["Set ",s.jsx("code",{children:"SHINOBI_RELAY_URL"}),", ",s.jsx("code",{children:"SHINOBI_RELAY_TOKEN"}),", and ",s.jsx("code",{children:"SHINOBI_RELAY_WORKSPACE"})," in Settings to enable."]}),s.jsxs("ol",{className:"text-text-muted text-sm list-decimal pl-5 space-y-1",children:[s.jsxs("li",{children:["Deploy the Worker: ",s.jsx("code",{children:"cd relay-worker && npx wrangler deploy"})]}),s.jsxs("li",{children:["Set the secret: ",s.jsx("code",{children:"npx wrangler secret put SHINOBI_RELAY_TOKEN"})]}),s.jsxs("li",{children:["Configure each agent's ",s.jsx("code",{children:"~/.shinobi/.env"})," with matching URL/token/workspace and restart the dashboard."]})]})]})]})}function pv(){const[e,t]=g.useState(null),[n,r]=g.useState(null),[l,i]=g.useState(""),[a,o]=g.useState(!1),[u,f]=g.useState(null),[p,d]=g.useState(null),[x,w]=g.useState(null),v=g.useCallback(async()=>{try{const c=await jx();t(c),r(null)}catch(c){r(c instanceof Error?c.message:String(c))}},[]);g.useEffect(()=>{v()},[v]);async function j(){if(!l.trim()){f(null);return}o(!0);try{const c=await wx(l.trim());f(c.results)}catch(c){w({kind:"err",text:c instanceof Error?c.message:String(c)})}finally{o(!1)}}async function y(c){d(c);try{const h=await kx(c);w({kind:h.ok?"ok":"err",text:h.ok?`installed ${c} — restart dashboard to load tools`:(h.stderr||"install failed").slice(0,200)}),await v(),u&&await j()}catch(h){w({kind:"err",text:h instanceof Error?h.message:String(h)})}finally{d(null)}}async function m(c){d(c);try{const h=await Nx(c);w({kind:h.ok?"ok":"err",text:h.ok?`uninstalled ${c} — restart dashboard to drop tools`:(h.stderr||"uninstall failed").slice(0,200)}),await v(),u&&await j()}catch(h){w({kind:"err",text:h instanceof Error?h.message:String(h)})}finally{d(null)}}return n?s.jsxs("div",{className:"text-danger",children:["Error: ",n]}):e?s.jsxs("div",{className:"max-w-4xl",children:[s.jsxs("header",{className:"border-b border-border pb-3 mb-6",children:[s.jsxs("h1",{className:"text-2xl text-text flex items-center gap-2",children:[s.jsx(Rd,{className:"w-6 h-6 text-accent"})," Plugins"]}),s.jsxs("p",{className:"text-text-muted text-xs mt-1",children:["Extend Shinobi with community-maintained packages from npm. Install location: ",s.jsx("code",{children:e.install_prefix})]})]}),x&&s.jsxs("div",{className:`mb-4 px-4 py-2 rounded text-sm flex items-center gap-2 ${x.kind==="ok"?"bg-success/20 text-success border border-success/40":"bg-danger/20 text-danger border border-danger/40"}`,children:[x.kind==="ok"?s.jsx(Rt,{className:"w-4 h-4"}):s.jsx(at,{className:"w-4 h-4"}),x.text]}),s.jsxs("section",{className:"bg-panel border border-border rounded-lg p-5 mb-6",children:[s.jsx("h2",{className:"text-sm text-text mb-3",children:"Search npm registry"}),s.jsxs("div",{className:"flex gap-2 mb-3",children:[s.jsx("input",{type:"text",className:"flex-1 bg-bg border border-border rounded px-3 py-1.5 text-sm text-text",placeholder:"e.g. github, jira, time-tracking (looks under @shinobi/plugin-* and shinobi-plugin-*)",value:l,onChange:c=>i(c.target.value),onKeyDown:c=>{c.key==="Enter"&&j()}}),s.jsxs(z,{variant:"primary",onClick:()=>void j(),disabled:a,children:[s.jsx(wa,{className:"w-4 h-4 mr-1"})," Search"]})]}),u!==null&&(u.length===0?s.jsx("div",{className:"text-text-muted text-sm",children:"no matching plugins published yet"}):s.jsx("div",{className:"space-y-2",children:u.map(c=>s.jsxs("div",{className:"bg-bg border border-border rounded p-3 flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-baseline gap-2",children:[s.jsx("div",{className:"text-text font-medium",children:c.name}),s.jsxs("div",{className:"text-text-muted text-xs",children:["v",c.version,c.author?" · "+c.author:""]}),c.links.npm&&s.jsxs("a",{href:c.links.npm,target:"_blank",rel:"noreferrer",className:"text-accent text-xs hover:underline",children:["npm ",s.jsx(Ph,{className:"w-3 h-3 inline"})]})]}),s.jsx("div",{className:"text-text-muted text-xs mt-1",children:c.description||"(no description)"})]}),c.installed?s.jsxs(z,{variant:"default",onClick:()=>void m(c.name),disabled:p===c.name,children:[s.jsx(jr,{className:"w-3.5 h-3.5 mr-1"})," Uninstall"]}):s.jsxs(z,{variant:"primary",onClick:()=>void y(c.name),disabled:p===c.name,children:[s.jsx(Ch,{className:"w-3.5 h-3.5 mr-1"})," ",p===c.name?"installing…":"Install"]})]},c.name))}))]}),s.jsxs("section",{className:"mb-6",children:[s.jsxs("div",{className:"flex items-baseline justify-between mb-3",children:[s.jsxs("h2",{className:"text-sm text-text",children:["Installed (",e.installed.length,")"]}),s.jsxs("button",{onClick:()=>void v(),className:"text-[11px] uppercase tracking-wider text-accent hover:underline",children:[s.jsx(ja,{className:"w-3 h-3 inline mr-0.5"})," refresh"]})]}),e.installed.length===0?s.jsx("div",{className:"text-text-muted text-sm",children:"(no plugins installed yet)"}):s.jsx("div",{className:"space-y-2",children:e.installed.map(c=>s.jsxs("div",{className:"bg-panel border border-border rounded p-3 flex items-center justify-between gap-3",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"text-text font-medium",children:[c.name," ",s.jsxs("span",{className:"text-text-muted text-xs",children:["v",c.version]})]}),s.jsx("div",{className:"text-text-muted text-xs",children:c.description})]}),s.jsx(z,{variant:"ghost",onClick:()=>void m(c.name),disabled:p===c.name,title:"uninstall",children:s.jsx(jr,{className:"w-3.5 h-3.5"})})]},c.name))})]}),s.jsxs("section",{children:[s.jsxs("h2",{className:"text-sm text-text mb-3",children:["Loaded at last startup (",e.loaded.length,")"]}),e.loaded.length===0?s.jsx("div",{className:"text-text-muted text-sm",children:"(none yet — install + restart dashboard)"}):s.jsx("div",{className:"space-y-2",children:e.loaded.map(c=>s.jsxs("div",{className:"bg-panel border border-border rounded p-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("div",{className:"text-text font-medium",children:c.name}),s.jsx(le,{className:c.source==="user"?"bg-warning/30 text-warning":"bg-accent/30 text-accent",children:c.source})]}),s.jsx("div",{className:"text-text-muted text-xs font-mono break-all mt-1",children:c.module_path}),c.tools_registered.length>0&&s.jsxs("div",{className:"text-text-dim text-[11px] mt-2",children:["tools: ",c.tools_registered.join(", ")]}),c.error&&s.jsxs("div",{className:"text-danger text-xs mt-2",children:["error: ",c.error]})]},c.name))})]})]}):s.jsx("div",{className:"text-text-muted",children:"loading plugins..."})}function mv(){const[e,t]=g.useState(null),[n,r]=g.useState(null),[l,i]=g.useState(!1),[a,o]=g.useState(null),u=g.useCallback(async()=>{try{t(await Sx()),r(null)}catch(p){r(p instanceof Error?p.message:String(p))}},[]);g.useEffect(()=>{u()},[u]);async function f(){i(!0);try{const p=await bx();p.ok?o({kind:"ok",text:`sent ${p.sent}/${p.attempted} events to ${p.endpoint}`}):o({kind:"err",text:p.error??"flush failed"}),await u()}catch(p){o({kind:"err",text:p instanceof Error?p.message:String(p)})}finally{i(!1)}}return n?s.jsxs("div",{className:"text-danger",children:["Error: ",n]}):e?s.jsxs("div",{className:"max-w-3xl",children:[s.jsxs("header",{className:"border-b border-border pb-3 mb-6",children:[s.jsxs("h1",{className:"text-2xl text-text flex items-center gap-2",children:[s.jsx(Ld,{className:"w-6 h-6 text-accent"})," Telemetry"]}),s.jsx("p",{className:"text-text-muted text-xs mt-1",children:"Anonymous, opt-in usage stats. Everything below stays in your local SQLite buffer until you flush it to an endpoint. No project content, task titles, decision bodies, prompts, or usernames are ever recorded."})]}),a&&s.jsxs("div",{className:`mb-4 px-4 py-2 rounded text-sm flex items-center gap-2 ${a.kind==="ok"?"bg-success/20 text-success border border-success/40":"bg-danger/20 text-danger border border-danger/40"}`,children:[a.kind==="ok"?s.jsx(Rt,{className:"w-4 h-4"}):s.jsx(at,{className:"w-4 h-4"}),a.text]}),s.jsxs("section",{className:"bg-panel border border-border rounded-lg p-5 mb-6",children:[s.jsx("h2",{className:"text-sm text-text mb-3",children:"Status"}),s.jsxs("dl",{className:"text-sm grid grid-cols-[12rem_1fr] gap-y-1.5",children:[s.jsx("dt",{className:"text-text-muted",children:"Recording"}),s.jsx("dd",{className:e.enabled?"text-success":"text-text-dim",children:e.enabled?"ON (SHINOBI_TELEMETRY=on)":"OFF (default)"}),s.jsx("dt",{className:"text-text-muted",children:"Endpoint"}),s.jsx("dd",{className:"text-text",children:e.endpoint_configured?"configured":s.jsx("span",{className:"text-text-dim",children:"local-only (no SHINOBI_TELEMETRY_ENDPOINT)"})}),s.jsx("dt",{className:"text-text-muted",children:"Total events"}),s.jsx("dd",{className:"text-text",children:e.total_events.toLocaleString()}),s.jsx("dt",{className:"text-text-muted",children:"Unsent"}),s.jsx("dd",{className:"text-text",children:e.unsent_events.toLocaleString()}),s.jsx("dt",{className:"text-text-muted",children:"Events last 7d"}),s.jsx("dd",{className:"text-text",children:e.last_7d_count.toLocaleString()}),s.jsx("dt",{className:"text-text-muted",children:"Last recorded"}),s.jsx("dd",{className:"text-text-muted text-xs",children:e.last_recorded_at?`${G(e.last_recorded_at)} ago`:"never"}),s.jsx("dt",{className:"text-text-muted",children:"Last sent"}),s.jsx("dd",{className:"text-text-muted text-xs",children:e.last_sent_at?`${G(e.last_sent_at)} ago`:"never"})]}),s.jsxs("div",{className:"mt-4 flex gap-2",children:[s.jsxs(z,{variant:"default",onClick:()=>void u(),children:[s.jsx(ja,{className:"w-3.5 h-3.5 mr-1"})," Refresh"]}),s.jsxs(z,{variant:"primary",onClick:()=>void f(),disabled:l||!e.endpoint_configured||e.unsent_events===0,children:[s.jsx(ka,{className:"w-3.5 h-3.5 mr-1"})," Flush unsent"]})]})]}),s.jsxs("section",{className:"mb-6",children:[s.jsx("h2",{className:"text-sm text-text mb-3",children:"Counts by event type (top 30)"}),e.by_event_type.length===0?s.jsxs("div",{className:"text-text-muted text-sm",children:["(no events recorded yet",!e.enabled&&s.jsxs(s.Fragment,{children:[" — enable in ",s.jsx(X,{to:"/settings",className:"text-accent hover:underline",children:"Settings"})," and restart the dashboard)"]})]}):s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[s.jsx("th",{className:"pb-2 pr-3",children:"Event type"}),s.jsx("th",{className:"pb-2 text-right",children:"Count"})]})}),s.jsx("tbody",{children:e.by_event_type.map(p=>s.jsxs("tr",{className:"border-b border-border/40",children:[s.jsx("td",{className:"py-1.5 pr-3 text-text font-mono text-xs",children:p.event_type}),s.jsx("td",{className:"py-1.5 text-text text-right",children:p.count.toLocaleString()})]},p.event_type))})]})]}),s.jsxs("section",{className:"text-text-muted text-xs",children:[s.jsx("h2",{className:"text-text text-sm mb-2",children:"What is recorded"}),s.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[s.jsxs("li",{children:[s.jsx("code",{children:"tool_called"})," — MCP tool name + ok flag"]}),s.jsxs("li",{children:[s.jsx("code",{children:"view_hit"})," — dashboard route bucket (e.g. ",s.jsx("code",{children:"/projects/:tab"}),") + HTTP status. Project IDs are stripped."]})]}),s.jsx("h2",{className:"text-text text-sm mt-4 mb-2",children:"What is NEVER recorded"}),s.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[s.jsx("li",{children:"Project titles, task titles, decision bodies, notes, plans, prompts, model output, code snippets, file paths."}),s.jsx("li",{children:"IP addresses, usernames, machine IDs."}),s.jsxs("li",{children:["The contents of ",s.jsx("code",{children:"~/.shinobi/.env"}),", API keys, or any setting value."]})]})]})]}):s.jsx("div",{className:"text-text-muted",children:"loading telemetry..."})}function hv(){return s.jsxs("div",{className:"text-center py-16",children:[s.jsx("div",{className:"text-6xl mb-4",children:"🥷"}),s.jsx("h1",{className:"text-2xl text-text mb-2",children:"Not found"}),s.jsx("p",{className:"text-text-muted mb-4",children:"The page you're looking for doesn't exist."}),s.jsx(X,{to:"/",className:"text-accent hover:underline",children:"← Back to home"})]})}function xv(){return s.jsx(ph,{children:s.jsx(lh,{children:s.jsxs(V,{element:s.jsx(Mx,{}),children:[s.jsx(V,{path:"/",element:s.jsx(Ox,{})}),s.jsx(V,{path:"/settings",element:s.jsx(ev,{})}),s.jsx(V,{path:"/voice",element:s.jsx(iv,{})}),s.jsx(V,{path:"/approvals",element:s.jsx(ov,{})}),s.jsx(V,{path:"/push",element:s.jsx(cv,{})}),s.jsx(V,{path:"/relay",element:s.jsx(fv,{})}),s.jsx(V,{path:"/plugins",element:s.jsx(pv,{})}),s.jsx(V,{path:"/telemetry",element:s.jsx(mv,{})}),s.jsx(V,{path:"/sessions",element:s.jsx(Jx,{})}),s.jsx(V,{path:"/sessions/:sessionId",element:s.jsx(qx,{})}),s.jsxs(V,{path:"/projects/:id",element:s.jsx(Ix,{}),children:[s.jsx(V,{index:!0,element:s.jsx(Dx,{})}),s.jsx(V,{path:"subtasks",element:s.jsx(Fx,{})}),s.jsx(V,{path:"decisions",element:s.jsx(Bx,{})}),s.jsx(V,{path:"decision-drafts",element:s.jsx(Vx,{})}),s.jsx(V,{path:"dead-ends",element:s.jsx(Wx,{})}),s.jsx(V,{path:"notes",element:s.jsx(Hx,{})}),s.jsx(V,{path:"plans",element:s.jsx(Qx,{})}),s.jsx(V,{path:"context",element:s.jsx(Kx,{})}),s.jsx(V,{path:"sessions",element:s.jsx(Xx,{})}),s.jsx(V,{path:"timeline",element:s.jsx(Yx,{})}),s.jsx(V,{path:"analytics",element:s.jsx(Gx,{})})]}),s.jsx(V,{path:"*",element:s.jsx(hv,{})})]})})})}md(document.getElementById("root")).render(s.jsx(g.StrictMode,{children:s.jsx(xv,{})}));
|
|
288
|
+
//# sourceMappingURL=index-BiTX3zpZ.js.map
|