@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.
@@ -1,263 +0,0 @@
1
- function Id(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)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(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function Dd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var eu={exports:{}},Ts={},tu={exports:{}},z={};/**
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"),$d=Symbol.for("react.portal"),Fd=Symbol.for("react.fragment"),Ad=Symbol.for("react.strict_mode"),Ud=Symbol.for("react.profiler"),Bd=Symbol.for("react.provider"),Wd=Symbol.for("react.context"),Vd=Symbol.for("react.forward_ref"),Hd=Symbol.for("react.suspense"),Qd=Symbol.for("react.memo"),Kd=Symbol.for("react.lazy"),_a=Symbol.iterator;function Yd(e){return e===null||typeof e!="object"?null:(e=_a&&e[_a]||e["@@iterator"],typeof e=="function"?e:null)}var nu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ru=Object.assign,su={};function Cn(e,t,n){this.props=e,this.context=t,this.refs=su,this.updater=n||nu}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 lu(){}lu.prototype=Cn.prototype;function Si(e,t,n){this.props=e,this.context=t,this.refs=su,this.updater=n||nu}var _i=Si.prototype=new lu;_i.constructor=Si;ru(_i,Cn.prototype);_i.isPureReactComponent=!0;var ba=Array.isArray,iu=Object.prototype.hasOwnProperty,bi={current:null},au={key:!0,ref:!0,__self:!0,__source:!0};function ou(e,t,n){var r,s={},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)iu.call(t,r)&&!au.hasOwnProperty(r)&&(s[r]=t[r]);var o=arguments.length-2;if(o===1)s.children=n;else if(1<o){for(var u=Array(o),f=0;f<o;f++)u[f]=arguments[f+2];s.children=u}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)s[r]===void 0&&(s[r]=o[r]);return{$$typeof:wr,type:e,key:i,ref:a,props:s,_owner:bi.current}}function Gd(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 Xd(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ea=/\/+/g;function qs(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Xd(""+e.key):t.toString(36)}function Qr(e,t,n,r,s){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 $d:a=!0}}if(a)return a=e,s=s(a),e=r===""?"."+qs(a,0):r,ba(s)?(n="",e!=null&&(n=e.replace(Ea,"$&/")+"/"),Qr(s,t,n,"",function(f){return f})):s!=null&&(Ei(s)&&(s=Gd(s,n+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(Ea,"$&/")+"/")+e)),t.push(s)),1;if(a=0,r=r===""?".":r+":",ba(e))for(var o=0;o<e.length;o++){i=e[o];var u=r+qs(i,o);a+=Qr(i,t,n,u,s)}else if(u=Yd(e),typeof u=="function")for(e=u.call(e),o=0;!(i=e.next()).done;)i=i.value,u=r+qs(i,o++),a+=Qr(i,t,n,u,s);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=[],s=0;return Qr(e,r,"","",function(i){return t.call(n,i,s++)}),r}function Jd(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},Zd={ReactCurrentDispatcher:ye,ReactCurrentBatchConfig:Kr,ReactCurrentOwner:bi};function uu(){throw Error("act(...) is not supported in production builds of React.")}z.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}};z.Component=Cn;z.Fragment=Fd;z.Profiler=Ud;z.PureComponent=Si;z.StrictMode=Ad;z.Suspense=Hd;z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zd;z.act=uu;z.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=ru({},e.props),s=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=bi.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(u in t)iu.call(t,u)&&!au.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:s,ref:i,props:r,_owner:a}};z.createContext=function(e){return e={$$typeof:Wd,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Bd,_context:e},e.Consumer=e};z.createElement=ou;z.createFactory=function(e){var t=ou.bind(null,e);return t.type=e,t};z.createRef=function(){return{current:null}};z.forwardRef=function(e){return{$$typeof:Vd,render:e}};z.isValidElement=Ei;z.lazy=function(e){return{$$typeof:Kd,_payload:{_status:-1,_result:e},_init:Jd}};z.memo=function(e,t){return{$$typeof:Qd,type:e,compare:t===void 0?null:t}};z.startTransition=function(e){var t=Kr.transition;Kr.transition={};try{e()}finally{Kr.transition=t}};z.unstable_act=uu;z.useCallback=function(e,t){return ye.current.useCallback(e,t)};z.useContext=function(e){return ye.current.useContext(e)};z.useDebugValue=function(){};z.useDeferredValue=function(e){return ye.current.useDeferredValue(e)};z.useEffect=function(e,t){return ye.current.useEffect(e,t)};z.useId=function(){return ye.current.useId()};z.useImperativeHandle=function(e,t,n){return ye.current.useImperativeHandle(e,t,n)};z.useInsertionEffect=function(e,t){return ye.current.useInsertionEffect(e,t)};z.useLayoutEffect=function(e,t){return ye.current.useLayoutEffect(e,t)};z.useMemo=function(e,t){return ye.current.useMemo(e,t)};z.useReducer=function(e,t,n){return ye.current.useReducer(e,t,n)};z.useRef=function(e){return ye.current.useRef(e)};z.useState=function(e){return ye.current.useState(e)};z.useSyncExternalStore=function(e,t,n){return ye.current.useSyncExternalStore(e,t,n)};z.useTransition=function(){return ye.current.useTransition()};z.version="18.3.1";tu.exports=z;var v=tu.exports;const qd=Dd(v),ef=Id({__proto__:null,default:qd},[v]);/**
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 tf=v,nf=Symbol.for("react.element"),rf=Symbol.for("react.fragment"),sf=Object.prototype.hasOwnProperty,lf=tf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,af={key:!0,ref:!0,__self:!0,__source:!0};function cu(e,t,n){var r,s={},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)sf.call(t,r)&&!af.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:nf,type:e,key:i,ref:a,props:s,_owner:lf.current}}Ts.Fragment=rf;Ts.jsx=cu;Ts.jsxs=cu;eu.exports=Ts;var l=eu.exports,du={exports:{}},Le={},fu={exports:{}},pu={};/**
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,R){var M=T.length;T.push(R);e:for(;0<M;){var q=M-1>>>1,ae=T[q];if(0<s(ae,R))T[q]=R,T[M]=ae,M=q;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var R=T[0],M=T.pop();if(M!==R){T[0]=M;e:for(var q=0,ae=T.length,Er=ae>>>1;q<Er;){var Ot=2*(q+1)-1,Zs=T[Ot],zt=Ot+1,Cr=T[zt];if(0>s(Zs,M))zt<ae&&0>s(Cr,Zs)?(T[q]=Cr,T[zt]=M,q=zt):(T[q]=Zs,T[Ot]=M,q=Ot);else if(zt<ae&&0>s(Cr,M))T[q]=Cr,T[zt]=M,q=zt;else break e}}return R}function s(T,R){var M=T.sortIndex-R.sortIndex;return M!==0?M:T.id-R.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=[],h=1,d=null,x=3,N=!1,g=!1,w=!1,y=typeof setTimeout=="function"?setTimeout:null,p=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 m(T){for(var R=n(f);R!==null;){if(R.callback===null)r(f);else if(R.startTime<=T)r(f),R.sortIndex=R.expirationTime,t(u,R);else break;R=n(f)}}function j(T){if(w=!1,m(T),!g)if(n(u)!==null)g=!0,Xs(_);else{var R=n(f);R!==null&&Js(j,R.startTime-T)}}function _(T,R){g=!1,w&&(w=!1,p(E),E=-1),N=!0;var M=x;try{for(m(R),d=n(u);d!==null&&(!(d.expirationTime>R)||T&&!C());){var q=d.callback;if(typeof q=="function"){d.callback=null,x=d.priorityLevel;var ae=q(d.expirationTime<=R);R=e.unstable_now(),typeof ae=="function"?d.callback=ae:d===n(u)&&r(u),m(R)}else r(u);d=n(u)}if(d!==null)var Er=!0;else{var Ot=n(f);Ot!==null&&Js(j,Ot.startTime-R),Er=!1}return Er}finally{d=null,x=M,N=!1}}var k=!1,b=null,E=-1,F=5,L=-1;function C(){return!(e.unstable_now()-L<F)}function ie(){if(b!==null){var T=e.unstable_now();L=T;var R=!0;try{R=b(!0,T)}finally{R?Rn():(k=!1,b=null)}}else k=!1}var Rn;if(typeof c=="function")Rn=function(){c(ie)};else if(typeof MessageChannel<"u"){var Sa=new MessageChannel,zd=Sa.port2;Sa.port1.onmessage=ie,Rn=function(){zd.postMessage(null)}}else Rn=function(){y(ie,0)};function Xs(T){b=T,k||(k=!0,Rn())}function Js(T,R){E=y(function(){T(e.unstable_now())},R)}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(){g||N||(g=!0,Xs(_))},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 R=3;break;default:R=x}var M=x;x=R;try{return T()}finally{x=M}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,R){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var M=x;x=T;try{return R()}finally{x=M}},e.unstable_scheduleCallback=function(T,R,M){var q=e.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?q+M:q):M=q,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=M+ae,T={id:h++,callback:R,priorityLevel:T,startTime:M,expirationTime:ae,sortIndex:-1},M>q?(T.sortIndex=M,t(f,T),n(u)===null&&T===n(f)&&(w?(p(E),E=-1):w=!0,Js(j,M-q))):(T.sortIndex=ae,t(u,T),g||N||(g=!0,Xs(_))),T},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(T){var R=x;return function(){var M=x;x=R;try{return T.apply(this,arguments)}finally{x=M}}}})(pu);fu.exports=pu;var of=fu.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 uf=v,Te=of;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 mu=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++)mu.add(t[e])}var rt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bl=Object.prototype.hasOwnProperty,cf=/^[: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]*$/,Ca={},Pa={};function df(e){return bl.call(Pa,e)?!0:bl.call(Ca,e)?!1:cf.test(e)?Pa[e]=!0:(Ca[e]=!0,!1)}function ff(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 pf(e,t,n,r){if(t===null||typeof t>"u"||ff(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,s,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=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 s=fe.hasOwnProperty(t)?fe[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(pf(t,n,s,r)&&(n=null),r||s===null?df(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var ot=uf.__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"),hu=Symbol.for("react.provider"),xu=Symbol.for("react.context"),Ri=Symbol.for("react.forward_ref"),Cl=Symbol.for("react.suspense"),Pl=Symbol.for("react.suspense_list"),Mi=Symbol.for("react.memo"),dt=Symbol.for("react.lazy"),gu=Symbol.for("react.offscreen"),Ta=Symbol.iterator;function Mn(e){return e===null||typeof e!="object"?null:(e=Ta&&e[Ta]||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 s=f.stack.split(`
35
- `),i=r.stack.split(`
36
- `),a=s.length-1,o=i.length-1;1<=a&&0<=o&&s[a]!==i[o];)o--;for(;1<=a&&0<=o;a--,o--)if(s[a]!==i[o]){if(a!==1||o!==1)do if(a--,o--,0>o||s[a]!==i[o]){var u=`
37
- `+s[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 mf(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 xu:return(e.displayName||"Context")+".Consumer";case hu:return(e._context.displayName||"Context")+".Provider";case Ri:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Mi: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 hf(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 vu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xf(e){var t=vu(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.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=xf(e))}function yu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=vu(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 La(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 ju(e,t){t=t.checked,t!=null&&Ti(e,"checked",t,!1)}function Rl(e,t){ju(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")?Ml(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ml(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 Ml(e,t,n){(t!=="number"||ss(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Wn=Array.isArray;function mn(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Et(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function 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 Ma(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(Wn(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 wu(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 Oa(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 Rr,ku=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Rr=Rr||document.createElement("div"),Rr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Rr.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},gf=["Webkit","ms","Moz","O"];Object.keys(Qn).forEach(function(e){gf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qn[t]=Qn[e]})});function Su(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,s=Su(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var vf=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(vf[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 Dl(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 $l=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 za(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 bu(e){hn?xn?xn.push(e):xn=[e]:hn=e}function Eu(){if(hn){var e=hn,t=xn;if(xn=hn=null,za(e),t)for(e=0;e<t.length;e++)za(t[e])}}function Cu(e,t){return e(t)}function Pu(){}var rl=!1;function Tu(e,t,n){if(rl)return e(t,n);rl=!0;try{return Cu(e,t,n)}finally{rl=!1,(hn!==null||xn!==null)&&(Pu(),Eu())}}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 yf(e,t,n,r,s,i,a,o,u){var f=Array.prototype.slice.call(arguments,3);try{t.apply(n,f)}catch(h){this.onError(h)}}var Kn=!1,ls=null,is=!1,Ul=null,jf={onError:function(e){Kn=!0,ls=e}};function wf(e,t,n,r,s,i,a,o,u){Kn=!1,ls=null,yf.apply(jf,arguments)}function Nf(e,t,n,r,s,i,a,o,u){if(wf.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 Lu(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 Ia(e){if(Xt(e)!==e)throw Error(S(188))}function kf(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 s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return Ia(s),e;if(i===r)return Ia(s),t;i=i.sibling}throw Error(S(188))}if(n.return!==r.return)n=s,r=i;else{for(var a=!1,o=s.child;o;){if(o===n){a=!0,n=s,r=i;break}if(o===r){a=!0,r=s,n=i;break}o=o.sibling}if(!a){for(o=i.child;o;){if(o===n){a=!0,n=i,r=s;break}if(o===r){a=!0,r=i,n=s;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=kf(e),e!==null?Mu(e):null}function Mu(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Mu(e);if(t!==null)return t;e=e.sibling}return null}var Ou=Te.unstable_scheduleCallback,Da=Te.unstable_cancelCallback,Sf=Te.unstable_shouldYield,_f=Te.unstable_requestPaint,ee=Te.unstable_now,bf=Te.unstable_getCurrentPriorityLevel,zi=Te.unstable_ImmediatePriority,zu=Te.unstable_UserBlockingPriority,as=Te.unstable_NormalPriority,Ef=Te.unstable_LowPriority,Iu=Te.unstable_IdlePriority,Ls=null,Xe=null;function Cf(e){if(Xe&&typeof Xe.onCommitFiberRoot=="function")try{Xe.onCommitFiberRoot(Ls,e,void 0,(e.current.flags&128)===128)}catch{}}var Ve=Math.clz32?Math.clz32:Lf,Pf=Math.log,Tf=Math.LN2;function Lf(e){return e>>>=0,e===0?32:31-(Pf(e)/Tf|0)|0}var Mr=64,Or=4194304;function Vn(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,s=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var o=a&~s;o!==0?r=Vn(o):(i&=a,i!==0&&(r=Vn(i)))}else a=n&~s,a!==0?r=Vn(a):i!==0&&(r=Vn(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===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-Ve(t),s=1<<n,r|=e[n],t&=~s;return r}function Rf(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 Mf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-Ve(i),o=1<<a,u=s[a];u===-1?(!(o&n)||o&r)&&(s[a]=Rf(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=Mr;return Mr<<=1,!(Mr&4194240)&&(Mr=64),e}function sl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Nr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ve(t),e[t]=n}function Of(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-Ve(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function Ii(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ve(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var A=0;function $u(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Fu,Di,Au,Uu,Bu,Wl=!1,zr=[],vt=null,yt=null,jt=null,sr=new Map,lr=new Map,pt=[],zf="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 $a(e,t){switch(e){case"focusin":case"focusout":vt=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,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Sr(t),t!==null&&Di(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function If(e,t,n,r,s){switch(t){case"focusin":return vt=zn(vt,e,t,n,r,s),!0;case"dragenter":return yt=zn(yt,e,t,n,r,s),!0;case"mouseover":return jt=zn(jt,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return sr.set(i,zn(sr.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,lr.set(i,zn(lr.get(i)||null,e,t,n,r,s)),!0}return!1}function Wu(e){var t=$t(e.target);if(t!==null){var n=Xt(t);if(n!==null){if(t=n.tag,t===13){if(t=Lu(n),t!==null){e.blockedOn=t,Bu(e.priority,function(){Au(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=Vl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);$l=r,n.target.dispatchEvent(r),$l=null}else return t=Sr(n),t!==null&&Di(t),e.blockedOn=n,!1;t.shift()}return!0}function Fa(e,t,n){Yr(e)&&n.delete(t)}function Df(){Wl=!1,vt!==null&&Yr(vt)&&(vt=null),yt!==null&&Yr(yt)&&(yt=null),jt!==null&&Yr(jt)&&(jt=null),sr.forEach(Fa),lr.forEach(Fa)}function In(e,t){e.blockedOn===t&&(e.blockedOn=null,Wl||(Wl=!0,Te.unstable_scheduleCallback(Te.unstable_NormalPriority,Df)))}function ir(e){function t(s){return In(s,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(vt!==null&&In(vt,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 gn=ot.ReactCurrentBatchConfig,us=!0;function $f(e,t,n,r){var s=A,i=gn.transition;gn.transition=null;try{A=1,$i(e,t,n,r)}finally{A=s,gn.transition=i}}function Ff(e,t,n,r){var s=A,i=gn.transition;gn.transition=null;try{A=4,$i(e,t,n,r)}finally{A=s,gn.transition=i}}function $i(e,t,n,r){if(us){var s=Vl(e,t,n,r);if(s===null)ml(e,t,r,cs,n),$a(e,r);else if(If(s,e,t,n,r))r.stopPropagation();else if($a(e,r),t&4&&-1<zf.indexOf(e)){for(;s!==null;){var i=Sr(s);if(i!==null&&Fu(i),i=Vl(e,t,n,r),i===null&&ml(e,t,r,cs,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else ml(e,t,r,null,n)}}var cs=null;function Vl(e,t,n,r){if(cs=null,e=Oi(r),e=$t(e),e!==null)if(t=Xt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Lu(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 Vu(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(bf()){case zi:return 1;case zu:return 4;case as:case Ef:return 16;case Iu:return 536870912;default:return 16}default:return 16}}var ht=null,Fi=null,Gr=null;function Hu(){if(Gr)return Gr;var e,t=Fi,n=t.length,r,s="value"in ht?ht.value:ht.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===s[i-r];r++);return Gr=s.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 Aa(){return!1}function Re(e){function t(n,r,s,i,a){this._reactName=n,this._targetInst=s,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:Aa,this.isPropagationStopped=Aa,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=Re(Pn),kr=Y({},Pn,{view:0,detail:0}),Af=Re(kr),ll,il,Dn,Rs=Y({},kr,{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!==Dn&&(Dn&&e.type==="mousemove"?(ll=e.screenX-Dn.screenX,il=e.screenY-Dn.screenY):il=ll=0,Dn=e),ll)},movementY:function(e){return"movementY"in e?e.movementY:il}}),Ua=Re(Rs),Uf=Y({},Rs,{dataTransfer:0}),Bf=Re(Uf),Wf=Y({},kr,{relatedTarget:0}),al=Re(Wf),Vf=Y({},Pn,{animationName:0,elapsedTime:0,pseudoElement:0}),Hf=Re(Vf),Qf=Y({},Pn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Kf=Re(Qf),Yf=Y({},Pn,{data:0}),Ba=Re(Yf),Gf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xf={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"},Jf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Zf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Jf[e])?!!t[e]:!1}function Ui(){return Zf}var qf=Y({},kr,{key:function(e){if(e.key){var t=Gf[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"?Xf[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}}),ep=Re(qf),tp=Y({},Rs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wa=Re(tp),np=Y({},kr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ui}),rp=Re(np),sp=Y({},Pn,{propertyName:0,elapsedTime:0,pseudoElement:0}),lp=Re(sp),ip=Y({},Rs,{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}),ap=Re(ip),op=[9,13,27,32],Bi=rt&&"CompositionEvent"in window,Yn=null;rt&&"documentMode"in document&&(Yn=document.documentMode);var up=rt&&"TextEvent"in window&&!Yn,Qu=rt&&(!Bi||Yn&&8<Yn&&11>=Yn),Va=" ",Ha=!1;function Ku(e,t){switch(e){case"keyup":return op.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var rn=!1;function cp(e,t){switch(e){case"compositionend":return Yu(t);case"keypress":return t.which!==32?null:(Ha=!0,Va);case"textInput":return e=t.data,e===Va&&Ha?null:e;default:return null}}function dp(e,t){if(rn)return e==="compositionend"||!Bi&&Ku(e,t)?(e=Hu(),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 Qu&&t.locale!=="ko"?null:t.data;default:return null}}var fp={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 Qa(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fp[e.type]:t==="textarea"}function Gu(e,t,n,r){bu(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 pp(e){ic(e,0)}function Ms(e){var t=an(e);if(yu(t))return e}function mp(e,t){if(e==="change")return t}var Xu=!1;if(rt){var ol;if(rt){var ul="oninput"in document;if(!ul){var Ka=document.createElement("div");Ka.setAttribute("oninput","return;"),ul=typeof Ka.oninput=="function"}ol=ul}else ol=!1;Xu=ol&&(!document.documentMode||9<document.documentMode)}function Ya(){Gn&&(Gn.detachEvent("onpropertychange",Ju),ar=Gn=null)}function Ju(e){if(e.propertyName==="value"&&Ms(ar)){var t=[];Gu(t,ar,e,Oi(e)),Tu(pp,t)}}function hp(e,t,n){e==="focusin"?(Ya(),Gn=t,ar=n,Gn.attachEvent("onpropertychange",Ju)):e==="focusout"&&Ya()}function xp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ms(ar)}function gp(e,t){if(e==="click")return Ms(t)}function vp(e,t){if(e==="input"||e==="change")return Ms(t)}function yp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qe=typeof Object.is=="function"?Object.is:yp;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 s=n[r];if(!bl.call(t,s)||!Qe(e[s],t[s]))return!1}return!0}function Ga(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xa(e,t){var n=Ga(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=Ga(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 qu(){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 Wi(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 jp(e){var t=qu(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Zu(n.ownerDocument.documentElement,n)){if(r!==null&&Wi(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=Xa(n,i);var a=Xa(n,r);s&&a&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(s.node,s.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 wp=rt&&"documentMode"in document&&11>=document.documentMode,sn=null,Hl=null,Xn=null,Ql=!1;function Ja(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&&Wi(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 Dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ln={animationend:Dr("Animation","AnimationEnd"),animationiteration:Dr("Animation","AnimationIteration"),animationstart:Dr("Animation","AnimationStart"),transitionend:Dr("Transition","TransitionEnd")},cl={},ec={};rt&&(ec=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 ec)return cl[e]=t[n];return e}var tc=Os("animationend"),nc=Os("animationiteration"),rc=Os("animationstart"),sc=Os("transitionend"),lc=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){lc.set(e,t),Gt(t,[e])}for(var dl=0;dl<Za.length;dl++){var fl=Za[dl],Np=fl.toLowerCase(),kp=fl[0].toUpperCase()+fl.slice(1);Pt(Np,"on"+kp)}Pt(tc,"onAnimationEnd");Pt(nc,"onAnimationIteration");Pt(rc,"onAnimationStart");Pt("dblclick","onDoubleClick");Pt("focusin","onFocus");Pt("focusout","onBlur");Pt(sc,"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(" "),Sp=new Set("cancel close invalid load scroll toggle".split(" ").concat(Hn));function qa(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Nf(r,t,void 0,e),e.currentTarget=null}function ic(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var 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&&s.isPropagationStopped())break e;qa(s,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&&s.isPropagationStopped())break e;qa(s,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)||(ac(t,e,2,!1),n.add(r))}function pl(e,t,n){var r=0;t&&(r|=4),ac(n,e,r,t)}var $r="_reactListening"+Math.random().toString(36).slice(2);function ur(e){if(!e[$r]){e[$r]=!0,mu.forEach(function(n){n!=="selectionchange"&&(Sp.has(n)||pl(n,!1,e),pl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$r]||(t[$r]=!0,pl("selectionchange",!1,t))}}function ac(e,t,n,r){switch(Vu(t)){case 1:var s=$f;break;case 4:s=Ff;break;default:s=$i}n=s.bind(null,t,n,e),s=void 0,!Al||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function ml(e,t,n,r,s){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===s||o.nodeType===8&&o.parentNode===s)break;if(a===4)for(a=r.return;a!==null;){var u=a.tag;if((u===3||u===4)&&(u=a.stateNode.containerInfo,u===s||u.nodeType===8&&u.parentNode===s))return;a=a.return}for(;o!==null;){if(a=$t(o),a===null)return;if(u=a.tag,u===5||u===6){r=i=a;continue e}o=o.parentNode}}r=r.return}Tu(function(){var f=i,h=Oi(n),d=[];e:{var x=lc.get(e);if(x!==void 0){var N=Ai,g=e;switch(e){case"keypress":if(Xr(n)===0)break e;case"keydown":case"keyup":N=ep;break;case"focusin":g="focus",N=al;break;case"focusout":g="blur",N=al;break;case"beforeblur":case"afterblur":N=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":N=Ua;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":N=Bf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":N=rp;break;case tc:case nc:case rc:N=Hf;break;case sc:N=lp;break;case"scroll":N=Af;break;case"wheel":N=ap;break;case"copy":case"cut":case"paste":N=Kf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":N=Wa}var w=(t&4)!==0,y=!w&&e==="scroll",p=w?x!==null?x+"Capture":null:x;w=[];for(var c=f,m;c!==null;){m=c;var j=m.stateNode;if(m.tag===5&&j!==null&&(m=j,p!==null&&(j=rr(c,p),j!=null&&w.push(cr(c,j,m)))),y)break;c=c.return}0<w.length&&(x=new N(x,g,null,n,h),d.push({event:x,listeners:w}))}}if(!(t&7)){e:{if(x=e==="mouseover"||e==="pointerover",N=e==="mouseout"||e==="pointerout",x&&n!==$l&&(g=n.relatedTarget||n.fromElement)&&($t(g)||g[st]))break e;if((N||x)&&(x=h.window===h?h:(x=h.ownerDocument)?x.defaultView||x.parentWindow:window,N?(g=n.relatedTarget||n.toElement,N=f,g=g?$t(g):null,g!==null&&(y=Xt(g),g!==y||g.tag!==5&&g.tag!==6)&&(g=null)):(N=null,g=f),N!==g)){if(w=Ua,j="onMouseLeave",p="onMouseEnter",c="mouse",(e==="pointerout"||e==="pointerover")&&(w=Wa,j="onPointerLeave",p="onPointerEnter",c="pointer"),y=N==null?x:an(N),m=g==null?x:an(g),x=new w(j,c+"leave",N,n,h),x.target=y,x.relatedTarget=m,j=null,$t(h)===f&&(w=new w(p,c+"enter",g,n,h),w.target=m,w.relatedTarget=y,j=w),y=j,N&&g)t:{for(w=N,p=g,c=0,m=w;m;m=Zt(m))c++;for(m=0,j=p;j;j=Zt(j))m++;for(;0<c-m;)w=Zt(w),c--;for(;0<m-c;)p=Zt(p),m--;for(;c--;){if(w===p||p!==null&&w===p.alternate)break t;w=Zt(w),p=Zt(p)}w=null}else w=null;N!==null&&eo(d,x,N,w,!1),g!==null&&y!==null&&eo(d,y,g,w,!0)}}e:{if(x=f?an(f):window,N=x.nodeName&&x.nodeName.toLowerCase(),N==="select"||N==="input"&&x.type==="file")var _=mp;else if(Qa(x))if(Xu)_=vp;else{_=xp;var k=hp}else(N=x.nodeName)&&N.toLowerCase()==="input"&&(x.type==="checkbox"||x.type==="radio")&&(_=gp);if(_&&(_=_(e,f))){Gu(d,_,n,h);break e}k&&k(e,x,f),e==="focusout"&&(k=x._wrapperState)&&k.controlled&&x.type==="number"&&Ml(x,"number",x.value)}switch(k=f?an(f):window,e){case"focusin":(Qa(k)||k.contentEditable==="true")&&(sn=k,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,Ja(d,n,h);break;case"selectionchange":if(wp)break;case"keydown":case"keyup":Ja(d,n,h)}var b;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?Ku(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(Qu&&n.locale!=="ko"&&(rn||E!=="onCompositionStart"?E==="onCompositionEnd"&&rn&&(b=Hu()):(ht=h,Fi="value"in ht?ht.value:ht.textContent,rn=!0)),k=ds(f,E),0<k.length&&(E=new Ba(E,e,null,n,h),d.push({event:E,listeners:k}),b?E.data=b:(b=Yu(n),b!==null&&(E.data=b)))),(b=up?cp(e,n):dp(e,n))&&(f=ds(f,"onBeforeInput"),0<f.length&&(h=new Ba("onBeforeInput","beforeinput",null,n,h),d.push({event:h,listeners:f}),h.data=b))}ic(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 s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=rr(e,n),i!=null&&r.unshift(cr(e,i,s)),i=rr(e,t),i!=null&&r.push(cr(e,i,s))),e=e.return}return r}function Zt(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function eo(e,t,n,r,s){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,s?(u=rr(n,i),u!=null&&a.unshift(cr(n,u,o))):s||(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 _p=/\r\n?/g,bp=/\u0000|\uFFFD/g;function to(e){return(typeof e=="string"?e:""+e).replace(_p,`
38
- `).replace(bp,"")}function Fr(e,t,n){if(t=to(t),to(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,Ep=typeof clearTimeout=="function"?clearTimeout:void 0,no=typeof Promise=="function"?Promise:void 0,Cp=typeof queueMicrotask=="function"?queueMicrotask:typeof no<"u"?function(e){return no.resolve(null).then(e).catch(Pp)}:Xl;function Pp(e){setTimeout(function(){throw e})}function hl(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),ir(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}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 ro(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,Tp="__reactListeners$"+Tn,Lp="__reactHandles$"+Tn;function $t(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=ro(e);e!==null;){if(n=e[Ge])return n;e=ro(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 Zl=[],on=-1;function Tt(e){return{current:e}}function V(e){0>on||(e.current=Zl[on],Zl[on]=null,on--)}function U(e,t){on++,Zl[on]=e.current,e.current=t}var Ct={},xe=Tt(Ct),ke=Tt(!1),Wt=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 s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Se(e){return e=e.childContextTypes,e!=null}function ps(){V(ke),V(xe)}function so(e,t,n){if(xe.current!==Ct)throw Error(S(168));U(xe,t),U(ke,n)}function oc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(S(108,hf(e)||"Unknown",s));return Y({},n,r)}function ms(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ct,Wt=xe.current,U(xe,e),U(ke,ke.current),!0}function lo(e,t,n){var r=e.stateNode;if(!r)throw Error(S(169));n?(e=oc(e,t,Wt),r.__reactInternalMemoizedMergedChildContext=e,V(ke),V(xe),U(xe,e)):V(ke),U(ke,n)}var qe=null,Is=!1,xl=!1;function uc(e){qe===null?qe=[e]:qe.push(e)}function Rp(e){Is=!0,uc(e)}function Lt(){if(!xl&&qe!==null){xl=!0;var e=0,t=A;try{var n=qe;for(A=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}qe=null,Is=!1}catch(s){throw qe!==null&&(qe=qe.slice(e+1)),Ou(zi,Lt),s}finally{A=t,xl=!1}}return null}var un=[],cn=0,hs=null,xs=0,Me=[],Oe=0,Vt=null,et=1,tt="";function It(e,t){un[cn++]=xs,un[cn++]=hs,hs=e,xs=t}function cc(e,t,n){Me[Oe++]=et,Me[Oe++]=tt,Me[Oe++]=Vt,Vt=e;var r=et;e=tt;var s=32-Ve(r)-1;r&=~(1<<s),n+=1;var i=32-Ve(t)+s;if(30<i){var a=s-s%5;i=(r&(1<<a)-1).toString(32),r>>=a,s-=a,et=1<<32-Ve(t)+s|n<<s|r,tt=i+e}else et=1<<i|n<<s|r,tt=e}function Vi(e){e.return!==null&&(It(e,1),cc(e,1,0))}function Hi(e){for(;e===hs;)hs=un[--cn],un[cn]=null,xs=un[--cn],un[cn]=null;for(;e===Vt;)Vt=Me[--Oe],Me[Oe]=null,tt=Me[--Oe],Me[Oe]=null,et=Me[--Oe],Me[Oe]=null}var Pe=null,Ce=null,H=!1,We=null;function dc(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 io(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=Vt!==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 ql(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ei(e){if(H){var t=Ce;if(t){var n=t;if(!io(e,t)){if(ql(e))throw Error(S(418));t=wt(n.nextSibling);var r=Pe;t&&io(e,t)?dc(r,n):(e.flags=e.flags&-4097|2,H=!1,Pe=e)}}else{if(ql(e))throw Error(S(418));e.flags=e.flags&-4097|2,H=!1,Pe=e}}}function ao(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 ao(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(ql(e))throw fc(),Error(S(418));for(;t;)dc(e,t),t=wt(t.nextSibling)}if(ao(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 fc(){for(var e=Ce;e;)e=wt(e.nextSibling)}function Nn(){Ce=Pe=null,H=!1}function Qi(e){We===null?We=[e]:We.push(e)}var Mp=ot.ReactCurrentBatchConfig;function $n(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 s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var o=s.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 oo(e){var t=e._init;return t(e._payload)}function pc(e){function t(p,c){if(e){var m=p.deletions;m===null?(p.deletions=[c],p.flags|=16):m.push(c)}}function n(p,c){if(!e)return null;for(;c!==null;)t(p,c),c=c.sibling;return null}function r(p,c){for(p=new Map;c!==null;)c.key!==null?p.set(c.key,c):p.set(c.index,c),c=c.sibling;return p}function s(p,c){return p=_t(p,c),p.index=0,p.sibling=null,p}function i(p,c,m){return p.index=m,e?(m=p.alternate,m!==null?(m=m.index,m<c?(p.flags|=2,c):m):(p.flags|=2,c)):(p.flags|=1048576,c)}function a(p){return e&&p.alternate===null&&(p.flags|=2),p}function o(p,c,m,j){return c===null||c.tag!==6?(c=kl(m,p.mode,j),c.return=p,c):(c=s(c,m),c.return=p,c)}function u(p,c,m,j){var _=m.type;return _===nn?h(p,c,m.props.children,j,m.key):c!==null&&(c.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===dt&&oo(_)===c.type)?(j=s(c,m.props),j.ref=$n(p,c,m),j.return=p,j):(j=rs(m.type,m.key,m.props,null,p.mode,j),j.ref=$n(p,c,m),j.return=p,j)}function f(p,c,m,j){return c===null||c.tag!==4||c.stateNode.containerInfo!==m.containerInfo||c.stateNode.implementation!==m.implementation?(c=Sl(m,p.mode,j),c.return=p,c):(c=s(c,m.children||[]),c.return=p,c)}function h(p,c,m,j,_){return c===null||c.tag!==7?(c=Bt(m,p.mode,j,_),c.return=p,c):(c=s(c,m),c.return=p,c)}function d(p,c,m){if(typeof c=="string"&&c!==""||typeof c=="number")return c=kl(""+c,p.mode,m),c.return=p,c;if(typeof c=="object"&&c!==null){switch(c.$$typeof){case Tr:return m=rs(c.type,c.key,c.props,null,p.mode,m),m.ref=$n(p,null,c),m.return=p,m;case tn:return c=Sl(c,p.mode,m),c.return=p,c;case dt:var j=c._init;return d(p,j(c._payload),m)}if(Wn(c)||Mn(c))return c=Bt(c,p.mode,m,null),c.return=p,c;Ur(p,c)}return null}function x(p,c,m,j){var _=c!==null?c.key:null;if(typeof m=="string"&&m!==""||typeof m=="number")return _!==null?null:o(p,c,""+m,j);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Tr:return m.key===_?u(p,c,m,j):null;case tn:return m.key===_?f(p,c,m,j):null;case dt:return _=m._init,x(p,c,_(m._payload),j)}if(Wn(m)||Mn(m))return _!==null?null:h(p,c,m,j,null);Ur(p,m)}return null}function N(p,c,m,j,_){if(typeof j=="string"&&j!==""||typeof j=="number")return p=p.get(m)||null,o(c,p,""+j,_);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Tr:return p=p.get(j.key===null?m:j.key)||null,u(c,p,j,_);case tn:return p=p.get(j.key===null?m:j.key)||null,f(c,p,j,_);case dt:var k=j._init;return N(p,c,m,k(j._payload),_)}if(Wn(j)||Mn(j))return p=p.get(m)||null,h(c,p,j,_,null);Ur(c,j)}return null}function g(p,c,m,j){for(var _=null,k=null,b=c,E=c=0,F=null;b!==null&&E<m.length;E++){b.index>E?(F=b,b=null):F=b.sibling;var L=x(p,b,m[E],j);if(L===null){b===null&&(b=F);break}e&&b&&L.alternate===null&&t(p,b),c=i(L,c,E),k===null?_=L:k.sibling=L,k=L,b=F}if(E===m.length)return n(p,b),H&&It(p,E),_;if(b===null){for(;E<m.length;E++)b=d(p,m[E],j),b!==null&&(c=i(b,c,E),k===null?_=b:k.sibling=b,k=b);return H&&It(p,E),_}for(b=r(p,b);E<m.length;E++)F=N(b,p,E,m[E],j),F!==null&&(e&&F.alternate!==null&&b.delete(F.key===null?E:F.key),c=i(F,c,E),k===null?_=F:k.sibling=F,k=F);return e&&b.forEach(function(C){return t(p,C)}),H&&It(p,E),_}function w(p,c,m,j){var _=Mn(m);if(typeof _!="function")throw Error(S(150));if(m=_.call(m),m==null)throw Error(S(151));for(var k=_=null,b=c,E=c=0,F=null,L=m.next();b!==null&&!L.done;E++,L=m.next()){b.index>E?(F=b,b=null):F=b.sibling;var C=x(p,b,L.value,j);if(C===null){b===null&&(b=F);break}e&&b&&C.alternate===null&&t(p,b),c=i(C,c,E),k===null?_=C:k.sibling=C,k=C,b=F}if(L.done)return n(p,b),H&&It(p,E),_;if(b===null){for(;!L.done;E++,L=m.next())L=d(p,L.value,j),L!==null&&(c=i(L,c,E),k===null?_=L:k.sibling=L,k=L);return H&&It(p,E),_}for(b=r(p,b);!L.done;E++,L=m.next())L=N(b,p,E,L.value,j),L!==null&&(e&&L.alternate!==null&&b.delete(L.key===null?E:L.key),c=i(L,c,E),k===null?_=L:k.sibling=L,k=L);return e&&b.forEach(function(ie){return t(p,ie)}),H&&It(p,E),_}function y(p,c,m,j){if(typeof m=="object"&&m!==null&&m.type===nn&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Tr:e:{for(var _=m.key,k=c;k!==null;){if(k.key===_){if(_=m.type,_===nn){if(k.tag===7){n(p,k.sibling),c=s(k,m.props.children),c.return=p,p=c;break e}}else if(k.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===dt&&oo(_)===k.type){n(p,k.sibling),c=s(k,m.props),c.ref=$n(p,k,m),c.return=p,p=c;break e}n(p,k);break}else t(p,k);k=k.sibling}m.type===nn?(c=Bt(m.props.children,p.mode,j,m.key),c.return=p,p=c):(j=rs(m.type,m.key,m.props,null,p.mode,j),j.ref=$n(p,c,m),j.return=p,p=j)}return a(p);case tn:e:{for(k=m.key;c!==null;){if(c.key===k)if(c.tag===4&&c.stateNode.containerInfo===m.containerInfo&&c.stateNode.implementation===m.implementation){n(p,c.sibling),c=s(c,m.children||[]),c.return=p,p=c;break e}else{n(p,c);break}else t(p,c);c=c.sibling}c=Sl(m,p.mode,j),c.return=p,p=c}return a(p);case dt:return k=m._init,y(p,c,k(m._payload),j)}if(Wn(m))return g(p,c,m,j);if(Mn(m))return w(p,c,m,j);Ur(p,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,c!==null&&c.tag===6?(n(p,c.sibling),c=s(c,m),c.return=p,p=c):(n(p,c),c=kl(m,p.mode,j),c.return=p,p=c),a(p)):n(p,c)}return y}var kn=pc(!0),mc=pc(!1),gs=Tt(null),vs=null,dn=null,Ki=null;function Yi(){Ki=dn=vs=null}function Gi(e){var t=gs.current;V(gs),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 vn(e,t){vs=e,Ki=dn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ne=!0),e.firstContext=null)}function De(e){var t=e._currentValue;if(Ki!==e)if(e={context:e,memoizedValue:t,next:null},dn===null){if(vs===null)throw Error(S(308));dn=e,vs.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 hc(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Xi(t)):(n.next=s.next,s.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 xc(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 Nt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,D&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,lt(e,n)}return s=r.interleaved,s===null?(t.next=t,Xi(r)):(t.next=s.next,s.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 uo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=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?s=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,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 s=e.updateQueue;ft=!1;var i=s.firstBaseUpdate,a=s.lastBaseUpdate,o=s.shared.pending;if(o!==null){s.shared.pending=null;var u=o,f=u.next;u.next=null,a===null?i=f:a.next=f,a=u;var h=e.alternate;h!==null&&(h=h.updateQueue,o=h.lastBaseUpdate,o!==a&&(o===null?h.firstBaseUpdate=f:o.next=f,h.lastBaseUpdate=u))}if(i!==null){var d=s.baseState;a=0,h=f=u=null,o=i;do{var x=o.lane,N=o.eventTime;if((r&x)===x){h!==null&&(h=h.next={eventTime:N,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var g=e,w=o;switch(x=t,N=n,w.tag){case 1:if(g=w.payload,typeof g=="function"){d=g.call(N,d,x);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=w.payload,x=typeof g=="function"?g.call(N,d,x):g,x==null)break e;d=Y({},d,x);break e;case 2:ft=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,x=s.effects,x===null?s.effects=[o]:x.push(o))}else N={eventTime:N,lane:x,tag:o.tag,payload:o.payload,callback:o.callback,next:null},h===null?(f=h=N,u=d):h=h.next=N,a|=x;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;x=o,o=x.next,x.next=null,s.lastBaseUpdate=x,s.shared.pending=null}}while(!0);if(h===null&&(u=d),s.baseState=u,s.firstBaseUpdate=f,s.lastBaseUpdate=h,t=s.shared.interleaved,t!==null){s=t;do a|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Qt|=a,e.lanes=a,e.memoizedState=d}}function co(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(S(191,s));s.call(r)}}}var _r={},Je=Tt(_r),fr=Tt(_r),pr=Tt(_r);function At(e){if(e===_r)throw Error(S(174));return e}function Zi(e,t){switch(U(pr,t),U(fr,e),U(Je,_r),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)}V(Je),U(Je,t)}function Sn(){V(Je),V(fr),V(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 qi(e){fr.current===e&&(V(Je),V(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 gl=[];function ea(){for(var e=0;e<gl.length;e++)gl[e]._workInProgressVersionPrimary=null;gl.length=0}var Zr=ot.ReactCurrentDispatcher,vl=ot.ReactCurrentBatchConfig,Ht=0,K=null,re=null,oe=null,ws=!1,Jn=!1,mr=0,Op=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,s,i){if(Ht=i,K=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Zr.current=e===null||e.memoizedState===null?$p:Fp,e=n(r,s),Jn){i=0;do{if(Jn=!1,mr=0,25<=i)throw Error(S(301));i+=1,oe=re=null,t.updateQueue=null,Zr.current=Ap,e=n(r,s)}while(Jn)}if(Zr.current=Ns,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 $e(){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=$e(),n=t.queue;if(n===null)throw Error(S(311));n.lastRenderedReducer=e;var r=re,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var a=s.next;s.next=i.next,i.next=a}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var o=a=null,u=null,f=i;do{var h=f.lane;if((Ht&h)===h)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:h,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};u===null?(o=u=d,a=r):u=u.next=d,K.lanes|=h,Qt|=h}f=f.next}while(f!==null&&f!==i);u===null?a=r:u.next=o,Qe(r,t.memoizedState)||(Ne=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,K.lanes|=i,Qt|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function jl(e){var t=$e(),n=t.queue;if(n===null)throw Error(S(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var a=s=s.next;do i=e(i,a.action),a=a.next;while(a!==s);Qe(i,t.memoizedState)||(Ne=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function vc(){}function yc(e,t){var n=K,r=$e(),s=t(),i=!Qe(r.memoizedState,s);if(i&&(r.memoizedState=s,Ne=!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,wc.bind(null,n,r,s,t),void 0,null),ue===null)throw Error(S(349));Ht&30||jc(n,t,s)}return s}function jc(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 wc(e,t,n,r){t.value=n,t.getSnapshot=r,kc(t)&&Sc(e)}function Nc(e,t,n){return n(function(){kc(t)&&Sc(e)})}function kc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qe(e,n)}catch{return!0}}function Sc(e){var t=lt(e,1);t!==null&&He(t,e,1,-1)}function fo(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=Dp.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 $e().memoizedState}function qr(e,t,n,r){var s=Ye();K.flags|=e,s.memoizedState=xr(1|t,n,void 0,r===void 0?null:r)}function Ds(e,t,n,r){var s=$e();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)){s.memoizedState=xr(t,n,i,r);return}}K.flags|=e,s.memoizedState=xr(1|t,n,i,r)}function po(e,t){return qr(8390656,8,e,t)}function sa(e,t){return Ds(2048,8,e,t)}function bc(e,t){return Ds(4,2,e,t)}function Ec(e,t){return Ds(4,4,e,t)}function Cc(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 Pc(e,t,n){return n=n!=null?n.concat([e]):null,Ds(4,4,Cc.bind(null,t,e),n)}function la(){}function Tc(e,t){var n=$e();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 Lc(e,t){var n=$e();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,Ne=!0),e.memoizedState=n)}function zp(e,t){var n=A;A=n!==0&&4>n?n:4,e(!0);var r=vl.transition;vl.transition={};try{e(!1),t()}finally{A=n,vl.transition=r}}function Mc(){return $e().memoizedState}function Ip(e,t,n){var r=St(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Oc(e))zc(t,n);else if(n=hc(e,t,n,r),n!==null){var s=ve();He(n,e,r,s),Ic(n,t,r)}}function Dp(e,t,n){var r=St(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Oc(e))zc(t,s);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(s.hasEagerState=!0,s.eagerState=o,Qe(o,a)){var u=t.interleaved;u===null?(s.next=s,Xi(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}n=hc(e,t,s,r),n!==null&&(s=ve(),He(n,e,r,s),Ic(n,t,r))}}function Oc(e){var t=e.alternate;return e===K||t!==null&&t===K}function zc(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 Ic(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ii(e,n)}}var Ns={readContext:De,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},$p={readContext:De,useCallback:function(e,t){return Ye().memoizedState=[e,t===void 0?null:t],e},useContext:De,useEffect:po,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,qr(4194308,4,Cc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return qr(4194308,4,e,t)},useInsertionEffect:function(e,t){return qr(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=Ip.bind(null,K,e),[r.memoizedState,e]},useRef:function(e){var t=Ye();return e={current:e},t.memoizedState=e},useState:fo,useDebugValue:la,useDeferredValue:function(e){return Ye().memoizedState=e},useTransition:function(){var e=fo(!1),t=e[0];return e=zp.bind(null,e[1]),Ye().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=K,s=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||jc(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,po(Nc.bind(null,r,i,e),[e]),r.flags|=2048,xr(9,wc.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-Ve(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=mr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Op++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Fp={readContext:De,useCallback:Tc,useContext:De,useEffect:sa,useImperativeHandle:Pc,useInsertionEffect:bc,useLayoutEffect:Ec,useMemo:Lc,useReducer:yl,useRef:_c,useState:function(){return yl(hr)},useDebugValue:la,useDeferredValue:function(e){var t=$e();return Rc(t,re.memoizedState,e)},useTransition:function(){var e=yl(hr)[0],t=$e().memoizedState;return[e,t]},useMutableSource:vc,useSyncExternalStore:yc,useId:Mc,unstable_isNewReconciler:!1},Ap={readContext:De,useCallback:Tc,useContext:De,useEffect:sa,useImperativeHandle:Pc,useInsertionEffect:bc,useLayoutEffect:Ec,useMemo:Lc,useReducer:jl,useRef:_c,useState:function(){return jl(hr)},useDebugValue:la,useDeferredValue:function(e){var t=$e();return re===null?t.memoizedState=e:Rc(t,re.memoizedState,e)},useTransition:function(){var e=jl(hr)[0],t=$e().memoizedState;return[e,t]},useMutableSource:vc,useSyncExternalStore:yc,useId:Mc,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 $s={isMounted:function(e){return(e=e._reactInternals)?Xt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ve(),s=St(e),i=nt(r,s);i.payload=t,n!=null&&(i.callback=n),t=Nt(e,i,s),t!==null&&(He(t,e,s,r),Jr(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ve(),s=St(e),i=nt(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Nt(e,i,s),t!==null&&(He(t,e,s,r),Jr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ve(),r=St(e),s=nt(n,r);s.tag=2,t!=null&&(s.callback=t),t=Nt(e,s,r),t!==null&&(He(t,e,r,n),Jr(t,e,r))}};function mo(e,t,n,r,s,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!or(n,r)||!or(s,i):!0}function Dc(e,t,n){var r=!1,s=Ct,i=t.contextType;return typeof i=="object"&&i!==null?i=De(i):(s=Se(t)?Wt:xe.current,r=t.contextTypes,i=(r=r!=null)?wn(e,s):Ct),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=$s,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function ho(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&&$s.enqueueReplaceState(t,t.state,null)}function ri(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Ji(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=De(i):(i=Se(t)?Wt:xe.current,s.context=wn(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ni(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&$s.enqueueReplaceState(s,s.state,null),ys(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function _n(e,t){try{var n="",r=t;do n+=mf(r),r=r.return;while(r);var s=n}catch(i){s=`
39
- Error generating stack: `+i.message+`
40
- `+i.stack}return{value:e,source:t,stack:s,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 Up=typeof WeakMap=="function"?WeakMap:Map;function $c(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 Fc(e,t,n){n=nt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){si(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){si(e,t),typeof r!="function"&&(kt===null?kt=new Set([this]):kt.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function xo(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Up;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=tm.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 vo(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=nt(-1,1),t.tag=2,Nt(n,t,1))),n.lanes|=1),e)}var Bp=ot.ReactCurrentOwner,Ne=!1;function ge(e,t,n,r){t.child=e===null?mc(t,null,n,r):kn(t,e.child,n,r)}function yo(e,t,n,r,s){n=n.render;var i=t.ref;return vn(t,s),r=na(e,t,n,r,i,s),n=ra(),e!==null&&!Ne?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,it(e,t,s)):(H&&n&&Vi(t),t.flags|=1,ge(e,t,r,s),t.child)}function jo(e,t,n,r,s){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,Ac(e,t,i,r,s)):(e=rs(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:or,n(a,r)&&e.ref===t.ref)return it(e,t,s)}return t.flags|=1,e=_t(i,r),e.ref=t.ref,e.return=t,t.child=e}function Ac(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(or(i,r)&&e.ref===t.ref)if(Ne=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Ne=!0);else return t.lanes=e.lanes,it(e,t,s)}return li(e,t,n,r,s)}function Uc(e,t,n){var r=t.pendingProps,s=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 ge(e,t,s,n),t.child}function Bc(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,s){var i=Se(n)?Wt:xe.current;return i=wn(t,i),vn(t,s),n=na(e,t,n,r,i,s),r=ra(),e!==null&&!Ne?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,it(e,t,s)):(H&&r&&Vi(t),t.flags|=1,ge(e,t,n,s),t.child)}function wo(e,t,n,r,s){if(Se(n)){var i=!0;ms(t)}else i=!1;if(vn(t,s),t.stateNode===null)es(e,t),Dc(t,n,r),ri(t,n,r,s),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=De(f):(f=Se(n)?Wt:xe.current,f=wn(t,f));var h=n.getDerivedStateFromProps,d=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==r||u!==f)&&ho(t,a,r,f),ft=!1;var x=t.memoizedState;a.state=x,ys(t,r,a,s),u=t.memoizedState,o!==r||x!==u||ke.current||ft?(typeof h=="function"&&(ni(t,n,h,r),u=t.memoizedState),(o=ft||mo(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,xc(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=De(u):(u=Se(n)?Wt:xe.current,u=wn(t,u));var N=n.getDerivedStateFromProps;(h=typeof N=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==d||x!==u)&&ho(t,a,r,u),ft=!1,x=t.memoizedState,a.state=x,ys(t,r,a,s);var g=t.memoizedState;o!==d||x!==g||ke.current||ft?(typeof N=="function"&&(ni(t,n,N,r),g=t.memoizedState),(f=ft||mo(t,n,f,r,x,g,u)||!1)?(h||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,g,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,g,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=g),a.props=r,a.state=g,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,s)}function ii(e,t,n,r,s,i){Bc(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return s&&lo(t,n,!1),it(e,t,i);r=t.stateNode,Bp.current=t;var o=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=kn(t,e.child,null,i),t.child=kn(t,null,o,i)):ge(e,t,o,i),t.memoizedState=r.state,s&&lo(t,n,!0),t.child}function Wc(e){var t=e.stateNode;t.pendingContext?so(e,t.pendingContext,t.pendingContext!==t.context):t.context&&so(e,t.context,!1),Zi(e,t.containerInfo)}function No(e,t,n,r,s){return Nn(),Qi(s),t.flags|=256,ge(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 Vc(e,t,n){var r=t.pendingProps,s=Q.current,i=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(s&2)!==0),o?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),U(Q,s&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(s=e.memoizedState,s!==null&&(o=s.dehydrated,o!==null))return Wp(e,t,a,r,o,s,n);if(i){i=r.fallback,a=t.mode,s=e.child,o=s.sibling;var u={mode:"hidden",children:r.children};return!(a&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=_t(s,u),r.subtreeFlags=s.subtreeFlags&14680064),o!==null?i=_t(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=_t(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),kn(t,e.child,null,n),e=ia(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Wp(e,t,n,r,s,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,s=t.mode,r=Us({mode:"visible",children:r.children},s,0,null),i=Bt(i,s,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&kn(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(s.data==="$!"){if(r=s.nextSibling&&s.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,Ne||o){if(r=ue,r!==null){switch(a&-a){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|a)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,lt(e,s),He(r,e,s,-1))}return fa(),r=wl(Error(S(421))),Br(e,t,a,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=nm.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Ce=wt(s.nextSibling),Pe=t,H=!0,We=null,e!==null&&(Me[Oe++]=et,Me[Oe++]=tt,Me[Oe++]=Vt,et=e.id,tt=e.overflow,Vt=t),t=ia(t,r.children),t.flags|=4096,t)}function ko(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ti(e.return,t,n)}function Nl(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function Hc(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(ge(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&&ko(e,n,t);else if(e.tag===19)ko(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(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&js(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Nl(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&js(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Nl(t,!0,n,null,i);break;case"together":Nl(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=_t(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=_t(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Vp(e,t,n){switch(t.tag){case 3:Wc(t),Nn();break;case 5:gc(t);break;case 1:Se(t.type)&&ms(t);break;case 4:Zi(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;U(gs,r._currentValue),r._currentValue=s;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?Vc(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 Hc(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),U(Q,Q.current),r)break;return null;case 22:case 23:return t.lanes=0,Uc(e,t,n)}return it(e,t,n)}var Qc,ui,Kc,Yc;Qc=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(){};Kc=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,At(Je.current);var i=null;switch(n){case"input":s=Ll(e,s),r=Ll(e,r),i=[];break;case"select":s=Y({},s,{value:void 0}),r=Y({},r,{value:void 0}),i=[];break;case"textarea":s=Ol(e,s),r=Ol(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=fs)}Il(n,r);var a;n=null;for(f in s)if(!r.hasOwnProperty(f)&&s.hasOwnProperty(f)&&s[f]!=null)if(f==="style"){var o=s[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=s!=null?s[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)}};Yc=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 s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Hp(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(),V(ke),V(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,We!==null&&(gi(We),We=null))),ui(e,t),me(t),null;case 5:qi(t);var s=At(pr.current);if(n=t.type,e!==null&&t.stateNode!=null)Kc(e,t,n,r,s),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(s=0;s<Hn.length;s++)B(Hn[s],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":La(r,i),B("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},B("invalid",r);break;case"textarea":Ma(r,i),B("invalid",r)}Il(n,i),s=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),s=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(i.suppressHydrationWarning!==!0&&Fr(r.textContent,o,e),s=["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),Oa(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=fs)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=s.nodeType===9?s:s.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,Qc(e,t,!1,!1),t.stateNode=e;e:{switch(a=Dl(n,r),n){case"dialog":B("cancel",e),B("close",e),s=r;break;case"iframe":case"object":case"embed":B("load",e),s=r;break;case"video":case"audio":for(s=0;s<Hn.length;s++)B(Hn[s],e);s=r;break;case"source":B("error",e),s=r;break;case"img":case"image":case"link":B("error",e),B("load",e),s=r;break;case"details":B("toggle",e),s=r;break;case"input":La(e,r),s=Ll(e,r),B("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Y({},r,{value:void 0}),B("invalid",e);break;case"textarea":Ma(e,r),s=Ol(e,r),B("invalid",e);break;default:s=r}Il(n,s),o=s;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&&ku(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),Oa(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 s.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)Yc(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(V(Q),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(H&&Ce!==null&&t.mode&1&&!(t.flags&128))fc(),Nn(),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 Nn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;me(t),i=!1}else We!==null&&(gi(We),We=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(V(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()>bn&&(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>bn&&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 Qp(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(),V(ke),V(xe),ea(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return qi(t),null;case 13:if(V(Q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(S(340));Nn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(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 Wr=!1,he=!1,Kp=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 So=!1;function Yp(e,t){if(Kl=us,e=qu(),Wi(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,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,h=0,d=e,x=null;t:for(;;){for(var N;d!==n||s!==0&&d.nodeType!==3||(o=a+s),d!==i||r!==0&&d.nodeType!==3||(u=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(N=d.firstChild)!==null;)x=d,d=N;for(;;){if(d===e)break t;if(x===n&&++f===s&&(o=a),x===i&&++h===r&&(u=a),(N=d.nextSibling)!==null)break;d=x,x=d.parentNode}d=N}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 g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var w=g.memoizedProps,y=g.memoizedState,p=t.stateNode,c=p.getSnapshotBeforeUpdate(t.elementType===t.type?w:Ue(t.type,w),y);p.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(S(163))}}catch(j){J(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,P=e;break}P=t.return}return g=So,So=!1,g}function Zn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&ci(t,n,i)}s=s.next}while(s!==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 Gc(e){var t=e.alternate;t!==null&&(e.alternate=null,Gc(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[Tp],delete t[Lp])),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 Xc(e){return e.tag===5||e.tag===3||e.tag===4}function _o(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(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;)Jc(e,t,n),n=n.sibling}function Jc(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,s=Be;ce=null,ct(e,t,n),ce=r,Be=s,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,s=Be,ce=n.stateNode.containerInfo,Be=!0,ct(e,t,n),ce=r,Be=s;break;case 0:case 11:case 14:case 15:if(!he&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&ci(n,t,a),s=s.next}while(s!==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 bo(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Kp),t.forEach(function(r){var s=rm.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Ae(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=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));Jc(i,a,s),ce=null,Be=!1;var u=s.alternate;u!==null&&(u.return=null),s.return=null}catch(f){J(s,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{Zn(3,e,e.return),Fs(3,e)}catch(w){J(e,e.return,w)}try{Zn(5,e,e.return)}catch(w){J(e,e.return,w)}}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 s=e.stateNode;try{nr(s,"")}catch(w){J(e,e.return,w)}}if(r&4&&(s=e.stateNode,s!=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&&ju(s,i),Dl(o,a);var f=Dl(o,i);for(a=0;a<u.length;a+=2){var h=u[a],d=u[a+1];h==="style"?_u(s,d):h==="dangerouslySetInnerHTML"?ku(s,d):h==="children"?nr(s,d):Ti(s,h,d,f)}switch(o){case"input":Rl(s,i);break;case"textarea":wu(s,i);break;case"select":var x=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var N=i.value;N!=null?mn(s,!!i.multiple,N,!1):x!==!!i.multiple&&(i.defaultValue!=null?mn(s,!!i.multiple,i.defaultValue,!0):mn(s,!!i.multiple,i.multiple?[]:"",!1))}s[dr]=i}catch(w){J(e,e.return,w)}}break;case 6:if(Ae(t,e),Ke(e),r&4){if(e.stateNode===null)throw Error(S(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(w){J(e,e.return,w)}}break;case 3:if(Ae(t,e),Ke(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ir(t.containerInfo)}catch(w){J(e,e.return,w)}break;case 4:Ae(t,e),Ke(e);break;case 13:Ae(t,e),Ke(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(ua=ee())),r&4&&bo(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(he=(f=he)||h,Ae(t,e),he=f):Ae(t,e),Ke(e),r&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!h&&e.mode&1)for(P=e,h=e.child;h!==null;){for(d=P=h;P!==null;){switch(x=P,N=x.child,x.tag){case 0:case 11:case 14:case 15:Zn(4,x,x.return);break;case 1:fn(x,x.return);var g=x.stateNode;if(typeof g.componentWillUnmount=="function"){r=x,n=x.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(w){J(r,n,w)}}break;case 5:fn(x,x.return);break;case 22:if(x.memoizedState!==null){Co(d);continue}}N!==null?(N.return=x,P=N):Co(d)}h=h.sibling}e:for(h=null,d=e;;){if(d.tag===5){if(h===null){h=d;try{s=d.stateNode,f?(i=s.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=Su("display",a))}catch(w){J(e,e.return,w)}}}else if(d.tag===6){if(h===null)try{d.stateNode.nodeValue=f?"":d.memoizedProps}catch(w){J(e,e.return,w)}}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;h===d&&(h=null),d=d.return}h===d&&(h=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Ae(t,e),Ke(e),r&4&&bo(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(Xc(n)){var r=n;break e}n=n.return}throw Error(S(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(nr(s,""),r.flags&=-33);var i=_o(e);pi(e,i,s);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 Gp(e,t,n){P=e,qc(e)}function qc(e,t,n){for(var r=(e.mode&1)!==0;P!==null;){var s=P,i=s.child;if(s.tag===22&&r){var a=s.memoizedState!==null||Wr;if(!a){var o=s.alternate,u=o!==null&&o.memoizedState!==null||he;o=Wr;var f=he;if(Wr=a,(he=u)&&!f)for(P=s;P!==null;)a=P,u=a.child,a.tag===22&&a.memoizedState!==null?Po(s):u!==null?(u.return=a,P=u):Po(s);for(;i!==null;)P=i,qc(i),i=i.sibling;P=s,Wr=o,he=f}Eo(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,P=i):Eo(e)}}function Eo(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 s=t.elementType===t.type?n.memoizedProps:Ue(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&co(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}co(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 h=f.memoizedState;if(h!==null){var d=h.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 Co(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 Po(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 s=t.return;try{r.componentDidMount()}catch(u){J(t,s,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 Xp=Math.ceil,ks=ot.ReactCurrentDispatcher,aa=ot.ReactCurrentOwner,Ie=ot.ReactCurrentBatchConfig,D=0,ue=null,te=null,de=0,Ee=0,pn=Tt(0),se=0,gr=null,Qt=0,As=0,oa=0,qn=null,we=null,ua=0,bn=1/0,Ze=null,Ss=!1,mi=null,kt=null,Vr=!1,xt=null,_s=0,er=0,hi=null,ts=-1,ns=0;function ve(){return D&6?ee():ts!==-1?ts:ts=ee()}function St(e){return e.mode&1?D&2&&de!==0?de&-de:Mp.transition!==null?(ns===0&&(ns=Du()),ns):(e=A,e!==0||(e=window.event,e=e===void 0?16:Vu(e.type)),e):1}function He(e,t,n,r){if(50<er)throw er=0,hi=null,Error(S(185));Nr(e,n,r),(!(D&2)||e!==ue)&&(e===ue&&(!(D&2)&&(As|=n),se===4&&mt(e,de)),_e(e,r),n===1&&D===0&&!(t.mode&1)&&(bn=ee()+500,Is&&Lt()))}function _e(e,t){var n=e.callbackNode;Mf(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?Rp(To.bind(null,e)):uc(To.bind(null,e)),Cp(function(){!(D&6)&&Lt()}),n=null;else{switch($u(r)){case 1:n=zi;break;case 4:n=zu;break;case 16:n=as;break;case 536870912:n=Iu;break;default:n=as}n=ad(n,ed.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ed(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=bs(e,r);else{t=r;var s=D;D|=2;var i=nd();(ue!==e||de!==t)&&(Ze=null,bn=ee()+500,Ut(e,t));do try{qp();break}catch(o){td(e,o)}while(!0);Yi(),ks.current=i,D=s,te!==null?t=0:(ue=null,de=0,t=se)}if(t!==0){if(t===2&&(s=Bl(e),s!==0&&(r=s,t=xi(e,s))),t===1)throw n=gr,Ut(e,0),mt(e,r),_e(e,ee()),n;if(t===6)mt(e,r);else{if(s=e.current.alternate,!(r&30)&&!Jp(s)&&(t=bs(e,r),t===2&&(i=Bl(e),i!==0&&(r=i,t=xi(e,i))),t===1))throw n=gr,Ut(e,0),mt(e,r),_e(e,ee()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(S(345));case 2:Dt(e,we,Ze);break;case 3:if(mt(e,r),(r&130023424)===r&&(t=ua+500-ee(),10<t)){if(os(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){ve(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Xl(Dt.bind(null,e,we,Ze),t);break}Dt(e,we,Ze);break;case 4:if(mt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var a=31-Ve(r);i=1<<a,a=t[a],a>s&&(s=a),r&=~i}if(r=s,r=ee()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Xp(r/1960))-r,10<r){e.timeoutHandle=Xl(Dt.bind(null,e,we,Ze),r);break}Dt(e,we,Ze);break;case 5:Dt(e,we,Ze);break;default:throw Error(S(329))}}}return _e(e,ee()),e.callbackNode===n?ed.bind(null,e):null}function xi(e,t){var n=qn;return e.current.memoizedState.isDehydrated&&(Ut(e,t).flags|=256),e=bs(e,t),e!==2&&(t=we,we=n,t!==null&&gi(t)),e}function gi(e){we===null?we=e:we.push.apply(we,e)}function Jp(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!Qe(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function mt(e,t){for(t&=~oa,t&=~As,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ve(t),r=1<<n;e[n]=-1,t&=~r}}function To(e){if(D&6)throw Error(S(327));yn();var t=os(e,0);if(!(t&1))return _e(e,ee()),null;var n=bs(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=gr,Ut(e,0),mt(e,t),_e(e,ee()),n;if(n===6)throw Error(S(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Dt(e,we,Ze),_e(e,ee()),null}function ca(e,t){var n=D;D|=1;try{return e(t)}finally{D=n,D===0&&(bn=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,V(pn)}function Ut(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Ep(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(),V(ke),V(xe),ea();break;case 5:qi(r);break;case 4:Sn();break;case 13:V(Q);break;case 19:V(Q);break;case 10:Gi(r.type._context);break;case 22:case 23:da()}n=n.return}if(ue=e,te=e=_t(e.current,null),de=Ee=t,se=0,gr=null,oa=As=Qt=0,we=qn=null,Ft!==null){for(t=0;t<Ft.length;t++)if(n=Ft[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var a=i.next;i.next=s,r.next=a}n.pending=r}Ft=null}return e}function td(e,t){do{var n=te;try{if(Yi(),Zr.current=Ns,ws){for(var r=K.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.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,gr=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,h=o,d=h.tag;if(!(h.mode&1)&&(d===0||d===11||d===15)){var x=h.alternate;x?(h.updateQueue=x.updateQueue,h.memoizedState=x.memoizedState,h.lanes=x.lanes):(h.updateQueue=null,h.memoizedState=null)}var N=go(a);if(N!==null){N.flags&=-257,vo(N,a,o,i,t),N.mode&1&&xo(i,f,t),t=N,u=f;var g=t.updateQueue;if(g===null){var w=new Set;w.add(u),t.updateQueue=w}else g.add(u);break e}else{if(!(t&1)){xo(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),vo(y,a,o,i,t),Qi(_n(u,o));break e}}i=u=_n(u,o),se!==4&&(se=2),qn===null?qn=[i]:qn.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var p=$c(i,u,t);uo(i,p);break e;case 1:o=u;var c=i.type,m=i.stateNode;if(!(i.flags&128)&&(typeof c.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(kt===null||!kt.has(m)))){i.flags|=65536,t&=-t,i.lanes|=t;var j=Fc(i,o,t);uo(i,j);break e}}i=i.return}while(i!==null)}sd(n)}catch(_){t=_,te===n&&n!==null&&(te=n=n.return);continue}break}while(!0)}function nd(){var e=ks.current;return ks.current=Ns,e===null?Ns:e}function fa(){(se===0||se===3||se===2)&&(se=4),ue===null||!(Qt&268435455)&&!(As&268435455)||mt(ue,de)}function bs(e,t){var n=D;D|=2;var r=nd();(ue!==e||de!==t)&&(Ze=null,Ut(e,t));do try{Zp();break}catch(s){td(e,s)}while(!0);if(Yi(),D=n,ks.current=r,te!==null)throw Error(S(261));return ue=null,de=0,se}function Zp(){for(;te!==null;)rd(te)}function qp(){for(;te!==null&&!Sf();)rd(te)}function rd(e){var t=id(e.alternate,e,Ee);e.memoizedProps=e.pendingProps,t===null?sd(e):te=t,aa.current=null}function sd(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Qp(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=Hp(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 Dt(e,t,n){var r=A,s=Ie.transition;try{Ie.transition=null,A=1,em(e,t,n,r)}finally{Ie.transition=s,A=r}return null}function em(e,t,n,r){do yn();while(xt!==null);if(D&6)throw Error(S(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(S(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Of(e,i),e===ue&&(te=ue=null,de=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Vr||(Vr=!0,ad(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,Yp(e,n),Zc(n,e),jp(Yl),us=!!Kl,Yl=Kl=null,e.current=n,Gp(n),_f(),D=o,A=a,Ie.transition=i}else e.current=n;if(Vr&&(Vr=!1,xt=e,_s=s),i=e.pendingLanes,i===0&&(kt=null),Cf(n.stateNode),_e(e,ee()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Ss)throw Ss=!1,e=mi,mi=null,e;return _s&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=$u(_s),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,_s=0,D&6)throw Error(S(331));var s=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 h=P;switch(h.tag){case 0:case 11:case 15:Zn(8,h,i)}var d=h.child;if(d!==null)d.return=h,P=d;else for(;P!==null;){h=P;var x=h.sibling,N=h.return;if(Gc(h),h===f){P=null;break}if(x!==null){x.return=N,P=x;break}P=N}}}var g=i.alternate;if(g!==null){var w=g.child;if(w!==null){g.child=null;do{var y=w.sibling;w.sibling=null,w=y}while(w!==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:Zn(9,i,i.return)}var p=i.sibling;if(p!==null){p.return=i.return,P=p;break e}P=i.return}}var c=e.current;for(P=c;P!==null;){a=P;var m=a.child;if(a.subtreeFlags&2064&&m!==null)m.return=a,P=m;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(_){J(o,o.return,_)}if(o===a){P=null;break e}var j=o.sibling;if(j!==null){j.return=o.return,P=j;break e}P=o.return}}if(D=s,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 Lo(e,t,n){t=_n(n,t),t=$c(e,t,1),e=Nt(e,t,1),t=ve(),e!==null&&(Nr(e,1,t),_e(e,t))}function J(e,t,n){if(e.tag===3)Lo(e,e,n);else for(;t!==null;){if(t.tag===3){Lo(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(kt===null||!kt.has(r))){e=_n(n,e),e=Fc(t,e,1),t=Nt(t,e,1),e=ve(),t!==null&&(Nr(t,1,e),_e(t,e));break}}t=t.return}}function tm(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ve(),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),_e(e,t)}function ld(e,t){t===0&&(e.mode&1?(t=Or,Or<<=1,!(Or&130023424)&&(Or=4194304)):t=1);var n=ve();e=lt(e,t),e!==null&&(Nr(e,t,n),_e(e,n))}function nm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ld(e,n)}function rm(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(S(314))}r!==null&&r.delete(t),ld(e,n)}var id;id=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ke.current)Ne=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ne=!1,Vp(e,t,n);Ne=!!(e.flags&131072)}else Ne=!1,H&&t.flags&1048576&&cc(t,xs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;es(e,t),e=t.pendingProps;var s=wn(t,xe.current);vn(t,n),s=na(null,t,r,e,s,n);var i=ra();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Se(r)?(i=!0,ms(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Ji(t),s.updater=$s,t.stateNode=s,s._reactInternals=t,ri(t,r,e,n),t=ii(null,t,r,!0,i,n)):(t.tag=0,H&&i&&Vi(t),ge(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(es(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=lm(r),e=Ue(r,e),s){case 0:t=li(null,t,r,e,n);break e;case 1:t=wo(null,t,r,e,n);break e;case 11:t=yo(null,t,r,e,n);break e;case 14:t=jo(null,t,r,Ue(r.type,e),n);break e}throw Error(S(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ue(r,s),li(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ue(r,s),wo(e,t,r,s,n);case 3:e:{if(Wc(t),e===null)throw Error(S(387));r=t.pendingProps,i=t.memoizedState,s=i.element,xc(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){s=_n(Error(S(423)),t),t=No(e,t,r,n,s);break e}else if(r!==s){s=_n(Error(S(424)),t),t=No(e,t,r,n,s);break e}else for(Ce=wt(t.stateNode.containerInfo.firstChild),Pe=t,H=!0,We=null,n=mc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Nn(),r===s){t=it(e,t,n);break e}ge(e,t,r,n)}t=t.child}return t;case 5:return gc(t),e===null&&ei(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,a=s.children,Gl(r,s)?a=null:i!==null&&Gl(r,i)&&(t.flags|=32),Bc(e,t),ge(e,t,a,n),t.child;case 6:return e===null&&ei(t),null;case 13:return Vc(e,t,n);case 4:return Zi(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=kn(t,null,r,n):ge(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ue(r,s),yo(e,t,r,s,n);case 7:return ge(e,t,t.pendingProps,n),t.child;case 8:return ge(e,t,t.pendingProps.children,n),t.child;case 12:return ge(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,a=s.value,U(gs,r._currentValue),r._currentValue=a,i!==null)if(Qe(i.value,a)){if(i.children===s.children&&!ke.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 h=f.pending;h===null?u.next=u:(u.next=h.next,h.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}ge(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,vn(t,n),s=De(s),r=r(s),t.flags|=1,ge(e,t,r,n),t.child;case 14:return r=t.type,s=Ue(r,t.pendingProps),s=Ue(r.type,s),jo(e,t,r,s,n);case 15:return Ac(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ue(r,s),es(e,t),t.tag=1,Se(r)?(e=!0,ms(t)):e=!1,vn(t,n),Dc(t,r,s),ri(t,r,s,n),ii(null,t,r,!0,e,n);case 19:return Hc(e,t,n);case 22:return Uc(e,t,n)}throw Error(S(156,t.tag))};function ad(e,t){return Ou(e,t)}function sm(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 sm(e,t,n,r)}function pa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lm(e){if(typeof e=="function")return pa(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ri)return 11;if(e===Mi)return 14}return 2}function _t(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,s,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,s,i,t);case Li:a=8,s|=8;break;case El:return e=ze(12,n,t,s|2),e.elementType=El,e.lanes=i,e;case Cl:return e=ze(13,n,t,s),e.elementType=Cl,e.lanes=i,e;case Pl:return e=ze(19,n,t,s),e.elementType=Pl,e.lanes=i,e;case gu:return Us(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case hu:a=10;break e;case xu:a=9;break e;case Ri:a=11;break e;case Mi: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,s),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 kl(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 im(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=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=s,this.mutableSourceEagerHydrationData=null}function ma(e,t,n,r,s,i,a,o,u){return e=new im(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 am(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 od(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 oc(e,n,t)}return t}function ud(e,t,n,r,s,i,a,o,u){return e=ma(n,r,!0,e,s,i,a,o,u),e.context=od(null),n=e.current,r=ve(),s=St(n),i=nt(r,s),i.callback=t??null,Nt(n,i,s),e.current.lanes=s,Nr(e,s,r),_e(e,r),e}function Bs(e,t,n,r){var s=t.current,i=ve(),a=St(s);return n=od(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=Nt(s,t,a),e!==null&&(He(e,s,a,i),Jr(e,s,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 om(){return null}var cd=typeof reportError=="function"?reportError:function(e){console.error(e)};function xa(e){this._internalRoot=e}Ws.prototype.render=xa.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(S(409));Bs(e,t,null,null)};Ws.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 Ws(e){this._internalRoot=e}Ws.prototype.unstable_scheduleHydration=function(e){if(e){var t=Uu();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 ga(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Vs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Mo(){}function um(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var f=Es(a);i.call(f)}}var a=ud(t,r,e,0,null,!1,!1,"",Mo);return e._reactRootContainer=a,e[st]=a.current,ur(e.nodeType===8?e.parentNode:e),Kt(),a}for(;s=e.lastChild;)e.removeChild(s);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,"",Mo);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,s){var i=n._reactRootContainer;if(i){var a=i;if(typeof s=="function"){var o=s;s=function(){var u=Es(a);o.call(u)}}Bs(t,a,e,s)}else a=um(n,t,e,s,r);return Es(a)}Fu=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Vn(t.pendingLanes);n!==0&&(Ii(t,n|1),_e(t,ee()),!(D&6)&&(bn=ee()+500,Lt()))}break;case 13:Kt(function(){var r=lt(e,1);if(r!==null){var s=ve();He(r,e,1,s)}}),ha(e,1)}};Di=function(e){if(e.tag===13){var t=lt(e,134217728);if(t!==null){var n=ve();He(t,e,134217728,n)}ha(e,134217728)}};Au=function(e){if(e.tag===13){var t=St(e),n=lt(e,t);if(n!==null){var r=ve();He(n,e,t,r)}ha(e,t)}};Uu=function(){return A};Bu=function(e,t){var n=A;try{return A=e,t()}finally{A=n}};Fl=function(e,t,n){switch(t){case"input":if(Rl(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=zs(r);if(!s)throw Error(S(90));yu(r),Rl(r,s)}}}break;case"textarea":wu(e,n);break;case"select":t=n.value,t!=null&&mn(e,!!n.multiple,t,!1)}};Cu=ca;Pu=Kt;var cm={usingClientEntryPoint:!1,Events:[Sr,an,zs,bu,Eu,ca]},An={findFiberByHostInstance:$t,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},dm={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||om,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(dm),Xe=Hr}catch{}}Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cm;Le.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ga(t))throw Error(S(200));return am(e,t,null,n)};Le.createRoot=function(e,t){if(!ga(e))throw Error(S(299));var n=!1,r="",s=cd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=ma(e,1,!1,null,null,n,!1,r,s),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(!Vs(t))throw Error(S(200));return Hs(null,e,t,!0,n)};Le.hydrateRoot=function(e,t,n){if(!ga(e))throw Error(S(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",a=cd;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=ud(t,null,e,1,n??null,s,!1,i,a),e[st]=t.current,ur(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Ws(t)};Le.render=function(e,t,n){if(!Vs(t))throw Error(S(200));return Hs(null,e,t,!1,n)};Le.unmountComponentAtNode=function(e){if(!Vs(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(!Vs(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 dd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(dd)}catch(e){console.error(e)}}dd(),du.exports=Le;var fm=du.exports,fd,Oo=fm;fd=Oo.createRoot,Oo.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 vr(){return vr=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},vr.apply(this,arguments)}var gt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(gt||(gt={}));const zo="popstate";function pm(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:a,hash:o}=r.location;return vi("",{pathname:i,search:a,hash:o},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Cs(s)}return hm(t,n,null,e)}function Z(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function va(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function mm(){return Math.random().toString(36).substr(2,8)}function Io(e,t){return{usr:e.state,key:e.key,idx:t}}function vi(e,t,n,r){return n===void 0&&(n=null),vr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ln(t):t,{state:n,key:t&&t.key||r||mm()})}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 hm(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,a=s.history,o=gt.Pop,u=null,f=h();f==null&&(f=0,a.replaceState(vr({},a.state,{idx:f}),""));function h(){return(a.state||{idx:null}).idx}function d(){o=gt.Pop;let y=h(),p=y==null?null:y-f;f=y,u&&u({action:o,location:w.location,delta:p})}function x(y,p){o=gt.Push;let c=vi(w.location,y,p);f=h()+1;let m=Io(c,f),j=w.createHref(c);try{a.pushState(m,"",j)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;s.location.assign(j)}i&&u&&u({action:o,location:w.location,delta:1})}function N(y,p){o=gt.Replace;let c=vi(w.location,y,p);f=h();let m=Io(c,f),j=w.createHref(c);a.replaceState(m,"",j),i&&u&&u({action:o,location:w.location,delta:0})}function g(y){let p=s.location.origin!=="null"?s.location.origin:s.location.href,c=typeof y=="string"?y:Cs(y);return c=c.replace(/ $/,"%20"),Z(p,"No window.location.(origin|href) available to create URL for href: "+c),new URL(c,p)}let w={get action(){return o},get location(){return e(s,a)},listen(y){if(u)throw new Error("A history only accepts one active listener");return s.addEventListener(zo,d),u=y,()=>{s.removeEventListener(zo,d),u=null}},createHref(y){return t(s,y)},createURL:g,encodeLocation(y){let p=g(y);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:x,replace:N,go(y){return a.go(y)}};return w}var Do;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Do||(Do={}));function xm(e,t,n){return n===void 0&&(n="/"),gm(e,t,n)}function gm(e,t,n,r){let s=typeof t=="string"?Ln(t):t,i=En(s.pathname||"/",n);if(i==null)return null;let a=pd(e);vm(a);let o=null;for(let u=0;o==null&&u<a.length;++u){let f=Pm(i);o=Em(a[u],f)}return o}function pd(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,a,o)=>{let u={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};u.relativePath.startsWith("/")&&(Z(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=bt([r,u.relativePath]),h=n.concat(u);i.children&&i.children.length>0&&(Z(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),pd(i.children,t,h,f)),!(i.path==null&&!i.index)&&t.push({path:f,score:_m(f,i.index),routesMeta:h})};return e.forEach((i,a)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))s(i,a);else for(let u of md(i.path))s(i,a,u)}),t}function md(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let a=md(r.join("/")),o=[];return o.push(...a.map(u=>u===""?i:[i,u].join("/"))),s&&o.push(...a),o.map(u=>e.startsWith("/")&&u===""?"/":u)}function vm(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:bm(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const ym=/^:[\w-]+$/,jm=3,wm=2,Nm=1,km=10,Sm=-2,$o=e=>e==="*";function _m(e,t){let n=e.split("/"),r=n.length;return n.some($o)&&(r+=Sm),t&&(r+=wm),n.filter(s=>!$o(s)).reduce((s,i)=>s+(ym.test(i)?jm:i===""?Nm:km),r)}function bm(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function Em(e,t,n){let{routesMeta:r}=e,s={},i="/",a=[];for(let o=0;o<r.length;++o){let u=r[o],f=o===r.length-1,h=i==="/"?t:t.slice(i.length)||"/",d=yi({path:u.relativePath,caseSensitive:u.caseSensitive,end:f},h),x=u.route;if(!d)return null;Object.assign(s,d.params),a.push({params:s,pathname:bt([i,d.pathname]),pathnameBase:Om(bt([i,d.pathnameBase])),route:x}),d.pathnameBase!=="/"&&(i=bt([i,d.pathnameBase]))}return a}function yi(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Cm(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],a=i.replace(/(.)\/+$/,"$1"),o=s.slice(1);return{params:r.reduce((f,h,d)=>{let{paramName:x,isOptional:N}=h;if(x==="*"){let w=o[d]||"";a=i.slice(0,i.length-w.length).replace(/(.)\/+$/,"$1")}const g=o[d];return N&&!g?f[x]=void 0:f[x]=(g||"").replace(/%2F/g,"/"),f},{}),pathname:i,pathnameBase:a,pattern:e}}function Cm(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),va(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,u)=>(r.push({paramName:o,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function Pm(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return va(!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 Tm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Lm=e=>Tm.test(e);function Rm(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Ln(e):e,i;if(n)if(Lm(n))i=n;else{if(n.includes("//")){let a=n;n=n.replace(/\/\/+/g,"/"),va(!1,"Pathnames cannot have embedded double slashes - normalizing "+(a+" -> "+n))}n.startsWith("/")?i=Fo(n.substring(1),"/"):i=Fo(n,t)}else i=t;return{pathname:i,search:zm(r),hash:Im(s)}}function Fo(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function _l(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 Mm(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function hd(e,t){let n=Mm(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function xd(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Ln(e):(s=vr({},e),Z(!s.pathname||!s.pathname.includes("?"),_l("?","pathname","search",s)),Z(!s.pathname||!s.pathname.includes("#"),_l("#","pathname","hash",s)),Z(!s.search||!s.search.includes("#"),_l("#","search","hash",s)));let i=e===""||s.pathname==="",a=i?"/":s.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;s.pathname=x.join("/")}o=d>=0?t[d]:"/"}let u=Rm(s,o),f=a&&a!=="/"&&a.endsWith("/"),h=(i||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(f||h)&&(u.pathname+="/"),u}const bt=e=>e.join("/").replace(/\/\/+/g,"/"),Om=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),zm=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Im=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Dm(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const gd=["post","put","patch","delete"];new Set(gd);const $m=["get",...gd];new Set($m);/**
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=v.createContext(null),vd=v.createContext(null),Rt=v.createContext(null),Ks=v.createContext(null),ut=v.createContext({outlet:null,matches:[],isDataRoute:!1}),yd=v.createContext(null);function Fm(e,t){let{relative:n}=t===void 0?{}:t;br()||Z(!1);let{basename:r,navigator:s}=v.useContext(Rt),{hash:i,pathname:a,search:o}=Ys(e,{relative:n}),u=a;return r!=="/"&&(u=a==="/"?r:bt([r,a])),s.createHref({pathname:u,search:o,hash:i})}function br(){return v.useContext(Ks)!=null}function Jt(){return br()||Z(!1),v.useContext(Ks).location}function jd(e){v.useContext(Rt).static||v.useLayoutEffect(e)}function Am(){let{isDataRoute:e}=v.useContext(ut);return e?eh():Um()}function Um(){br()||Z(!1);let e=v.useContext(Qs),{basename:t,future:n,navigator:r}=v.useContext(Rt),{matches:s}=v.useContext(ut),{pathname:i}=Jt(),a=JSON.stringify(hd(s,n.v7_relativeSplatPath)),o=v.useRef(!1);return jd(()=>{o.current=!0}),v.useCallback(function(f,h){if(h===void 0&&(h={}),!o.current)return;if(typeof f=="number"){r.go(f);return}let d=xd(f,JSON.parse(a),i,h.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:bt([t,d.pathname])),(h.replace?r.replace:r.push)(d,h.state,h)},[t,r,a,i,e])}const wd=v.createContext(null);function Fe(){return v.useContext(wd)}function Bm(e){let t=v.useContext(ut).outlet;return t&&v.createElement(wd.Provider,{value:e},t)}function ya(){let{matches:e}=v.useContext(ut),t=e[e.length-1];return t?t.params:{}}function Ys(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(Rt),{matches:s}=v.useContext(ut),{pathname:i}=Jt(),a=JSON.stringify(hd(s,r.v7_relativeSplatPath));return v.useMemo(()=>xd(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function Wm(e,t){return Vm(e,t)}function Vm(e,t,n,r){br()||Z(!1);let{navigator:s}=v.useContext(Rt),{matches:i}=v.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(),h;if(t){var d;let y=typeof t=="string"?Ln(t):t;u==="/"||(d=y.pathname)!=null&&d.startsWith(u)||Z(!1),h=y}else h=f;let x=h.pathname||"/",N=x;if(u!=="/"){let y=u.replace(/^\//,"").split("/");N="/"+x.replace(/^\//,"").split("/").slice(y.length).join("/")}let g=xm(e,{pathname:N}),w=Gm(g&&g.map(y=>Object.assign({},y,{params:Object.assign({},o,y.params),pathname:bt([u,s.encodeLocation?s.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?u:bt([u,s.encodeLocation?s.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n,r);return t&&w?v.createElement(Ks.Provider,{value:{location:yr({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:gt.Pop}},w):w}function Hm(){let e=qm(),t=Dm(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:s},n):null,null)}const Qm=v.createElement(Hm,null);class Km extends v.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?v.createElement(ut.Provider,{value:this.props.routeContext},v.createElement(yd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ym(e){let{routeContext:t,match:n,children:r}=e,s=v.useContext(Qs);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(ut.Provider,{value:t},r)}function Gm(e,t,n,r){var s;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=(s=n)==null?void 0:s.errors;if(o!=null){let h=a.findIndex(d=>d.route.id&&(o==null?void 0:o[d.route.id])!==void 0);h>=0||Z(!1),a=a.slice(0,Math.min(a.length,h+1))}let u=!1,f=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h<a.length;h++){let d=a[h];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(f=h),d.route.id){let{loaderData:x,errors:N}=n,g=d.route.loader&&x[d.route.id]===void 0&&(!N||N[d.route.id]===void 0);if(d.route.lazy||g){u=!0,f>=0?a=a.slice(0,f+1):a=[a[0]];break}}}return a.reduceRight((h,d,x)=>{let N,g=!1,w=null,y=null;n&&(N=o&&d.route.id?o[d.route.id]:void 0,w=d.route.errorElement||Qm,u&&(f<0&&x===0?(th("route-fallback"),g=!0,y=null):f===x&&(g=!0,y=d.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,x+1)),c=()=>{let m;return N?m=w:g?m=y:d.route.Component?m=v.createElement(d.route.Component,null):d.route.element?m=d.route.element:m=h,v.createElement(Ym,{match:d,routeContext:{outlet:h,matches:p,isDataRoute:n!=null},children:m})};return n&&(d.route.ErrorBoundary||d.route.errorElement||x===0)?v.createElement(Km,{location:n.location,revalidation:n.revalidation,component:w,error:N,children:c(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):c()},null)}var Nd=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Nd||{}),kd=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}(kd||{});function Xm(e){let t=v.useContext(Qs);return t||Z(!1),t}function Jm(e){let t=v.useContext(vd);return t||Z(!1),t}function Zm(e){let t=v.useContext(ut);return t||Z(!1),t}function Sd(e){let t=Zm(),n=t.matches[t.matches.length-1];return n.route.id||Z(!1),n.route.id}function qm(){var e;let t=v.useContext(yd),n=Jm(),r=Sd();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function eh(){let{router:e}=Xm(Nd.UseNavigateStable),t=Sd(kd.UseNavigateStable),n=v.useRef(!1);return jd(()=>{n.current=!0}),v.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,yr({fromRouteId:t},i)))},[e,t])}const Ao={};function th(e,t,n){Ao[e]||(Ao[e]=!0)}function nh(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function _d(e){return Bm(e.context)}function W(e){Z(!1)}function rh(e){let{basename:t="/",children:n=null,location:r,navigationType:s=gt.Pop,navigator:i,static:a=!1,future:o}=e;br()&&Z(!1);let u=t.replace(/^\/*/,"/"),f=v.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:h="/",search:d="",hash:x="",state:N=null,key:g="default"}=r,w=v.useMemo(()=>{let y=En(h,u);return y==null?null:{location:{pathname:y,search:d,hash:x,state:N,key:g},navigationType:s}},[u,h,d,x,N,g,s]);return w==null?null:v.createElement(Rt.Provider,{value:f},v.createElement(Ks.Provider,{children:n,value:w}))}function sh(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 v.Children.forEach(e,(r,s)=>{if(!v.isValidElement(r))return;let i=[...t,s];if(r.type===v.Fragment){n.push.apply(n,ji(r.props.children,i));return}r.type!==W&&Z(!1),!r.props.index||!r.props.children||Z(!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 bd(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function lh(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ih(e,t){return e.button===0&&(!t||t==="_self")&&!lh(e)}const ah=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],oh=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],uh="6";try{window.__reactRouterVersion=uh}catch{}const ch=v.createContext({isTransitioning:!1}),dh="startTransition",Uo=ef[dh];function fh(e){let{basename:t,children:n,future:r,window:s}=e,i=v.useRef();i.current==null&&(i.current=pm({window:s,v5Compat:!0}));let a=i.current,[o,u]=v.useState({action:a.action,location:a.location}),{v7_startTransition:f}=r||{},h=v.useCallback(d=>{f&&Uo?Uo(()=>u(d)):u(d)},[u,f]);return v.useLayoutEffect(()=>a.listen(h),[a,h]),v.useEffect(()=>nh(r),[r]),v.createElement(rh,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:a,future:r})}const ph=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,X=v.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:a,state:o,target:u,to:f,preventScrollReset:h,viewTransition:d}=t,x=bd(t,ah),{basename:N}=v.useContext(Rt),g,w=!1;if(typeof f=="string"&&mh.test(f)&&(g=f,ph))try{let m=new URL(window.location.href),j=f.startsWith("//")?new URL(m.protocol+f):new URL(f),_=En(j.pathname,N);j.origin===m.origin&&_!=null?f=_+j.search+j.hash:w=!0}catch{}let y=Fm(f,{relative:s}),p=gh(f,{replace:a,state:o,target:u,preventScrollReset:h,relative:s,viewTransition:d});function c(m){r&&r(m),m.defaultPrevented||p(m)}return v.createElement("a",Ps({},x,{href:g||y,onClick:w||i?r:c,ref:n,target:u}))}),hh=v.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:i="",end:a=!1,style:o,to:u,viewTransition:f,children:h}=t,d=bd(t,oh),x=Ys(u,{relative:d.relative}),N=Jt(),g=v.useContext(vd),{navigator:w,basename:y}=v.useContext(Rt),p=g!=null&&vh(x)&&f===!0,c=w.encodeLocation?w.encodeLocation(x).pathname:x.pathname,m=N.pathname,j=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;s||(m=m.toLowerCase(),j=j?j.toLowerCase():null,c=c.toLowerCase()),j&&y&&(j=En(j,y)||j);const _=c!=="/"&&c.endsWith("/")?c.length-1:c.length;let k=m===c||!a&&m.startsWith(c)&&m.charAt(_)==="/",b=j!=null&&(j===c||!a&&j.startsWith(c)&&j.charAt(c.length)==="/"),E={isActive:k,isPending:b,isTransitioning:p},F=k?r:void 0,L;typeof i=="function"?L=i(E):L=[i,k?"active":null,b?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let C=typeof o=="function"?o(E):o;return v.createElement(X,Ps({},d,{"aria-current":F,className:L,ref:n,style:C,to:u,viewTransition:f}),typeof h=="function"?h(E):h)});var wi;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(wi||(wi={}));var Bo;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Bo||(Bo={}));function xh(e){let t=v.useContext(Qs);return t||Z(!1),t}function gh(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:a,viewTransition:o}=t===void 0?{}:t,u=Am(),f=Jt(),h=Ys(e,{relative:a});return v.useCallback(d=>{if(ih(d,n)){d.preventDefault();let x=r!==void 0?r:Cs(f)===Cs(h);u(e,{replace:x,state:s,preventScrollReset:i,relative:a,viewTransition:o})}},[f,u,h,r,s,n,e,i,a,o])}function vh(e,t){t===void 0&&(t={});let n=v.useContext(ch);n==null&&Z(!1);let{basename:r}=xh(wi.useViewTransitionState),s=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(s.pathname,a)!=null||yi(s.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 yh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ed=(...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 jh={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 wh=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...o},u)=>v.createElement("svg",{ref:u,...jh,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ed("lucide",s),...o},[...a.map(([f,h])=>v.createElement(f,h)),...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 I=(e,t)=>{const n=v.forwardRef(({className:r,...s},i)=>v.createElement(wh,{ref:i,iconNode:t,className:Ed(`lucide-${yh(e)}`,r),...s}));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 Cd=I("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 Pd=I("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=I("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 kh=I("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=I("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 Ni=I("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 Sh=I("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=I("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 bh=I("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=I("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 Mt=I("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 Eh=I("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 Ch=I("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 Yt=I("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
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 Ph=I("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"}]]);/**
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 ki=I("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"}]]);/**
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 Td=I("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"}]]);/**
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 Th=I("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
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 Ld=I("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"}]]);/**
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 ja=I("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"}]]);/**
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 Lh=I("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"}]]);/**
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 Rh=I("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"}]]);/**
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 Mh=I("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
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 wa=I("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"}]]);/**
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 Oh=I("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"}]]);/**
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 zh=I("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"}]]);/**
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 Ih=I("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"}]]);/**
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 Dh=I("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
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 jr=I("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"}]]);/**
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 $h=I("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"}]]);/**
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 Fh=I("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"}]]);/**
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 Ah=I("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"}]]);/**
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 Vo=I("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"}]]);/**
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 Uh=I("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"}]]);/**
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 Bh=I("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Rd(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Rd(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function be(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Rd(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 s=r/60;if(s<24)return`${Math.floor(s)}h ago`;const i=s/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 Wh(e){return e?e.toLowerCase().replace(/[^a-z0-9]+/g,"-"):"none"}function Vh(e){switch(Wh(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 l.jsx("span",{className:be("inline-block rounded text-[10px] font-medium lowercase tracking-wider px-1.5 py-0.5",Vh(e)),children:e??"(no workspace)"})}const Hh={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"},Qh={sm:"text-xs px-2 py-1",md:"text-sm px-3 py-1.5"},O=v.forwardRef(({variant:e="default",size:t="md",className:n,...r},s)=>l.jsx("button",{ref:s,className:be("border rounded transition-colors font-medium cursor-pointer disabled:opacity-50 disabled:cursor-wait",Hh[e],Qh[t],n),...r}));O.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 Md(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 Kh(e){return $(`/api/projects/${e}/snapshot`)}function Yh(e,t){return $(`/api/subtasks/${e}`,{method:"PATCH",body:JSON.stringify(t)})}function Gh(e,t){return $(`/api/decisions/${e}/status`,{method:"PATCH",body:JSON.stringify({status:t})})}function Xh(e){return $(`/api/projects/${e}/decision-drafts`)}function Jh(e){return $(`/api/decision-drafts/${e}/approve`,{method:"POST",body:"{}"})}function Zh(e){return $(`/api/decision-drafts/${e}/reject`,{method:"POST",body:"{}"})}function qh(e=200){return $(`/api/sessions?limit=${e}`)}function ex(e){return $(`/api/sessions/${encodeURIComponent(e)}`)}function tx(){return $("/api/settings")}function nx(e){return $("/api/settings",{method:"POST",body:JSON.stringify({patch:e})})}function rx(){return $("/api/push/vapid-key")}function sx(){return $("/api/push/subscriptions")}function lx(e){return $("/api/push/subscribe",{method:"POST",body:JSON.stringify(e)})}function Ho(e){return $(`/api/push/subscriptions/${e}`,{method:"DELETE"})}function ix(){return $("/api/push/test",{method:"POST"})}function ax(e){return $("/api/approvals")}function ox(e,t,n){return $(`/api/approvals/${e}/respond`,{method:"POST",body:JSON.stringify({value:t,note:n})})}function ux(e){return $(`/api/approvals/${e}/cancel`,{method:"POST",body:"{}"})}function cx(){return $("/api/sync/status")}function dx(){return $("/api/sync/push",{method:"POST"})}function fx(){return $("/api/sync/pull",{method:"POST"})}function Qo(e){return $(`/api/projects/${e}/time-stats`)}function Ko(e){return $(`/api/projects/${e}/cost-stats`)}function px(e={}){return $("/api/cost/ingest",{method:"POST",body:JSON.stringify(e)})}function mx(){return $("/api/plugins")}function hx(e){return $("/api/plugins/search",{method:"POST",body:JSON.stringify({query:e})})}function xx(e){return $("/api/plugins/install",{method:"POST",body:JSON.stringify({pkg:e})})}function gx(e){return $(`/api/plugins/${encodeURIComponent(e)}`,{method:"DELETE"})}function vx(){return $("/api/telemetry/summary")}function yx(){return $("/api/telemetry/flush",{method:"POST",body:"{}"})}function jx(){return $("/api/relay/status")}function wx(){return $("/api/relay/broadcast-sync",{method:"POST",body:"{}"})}function Nx(){const[e,t]=v.useState(null),[n,r]=v.useState({kind:"idle"});v.useEffect(()=>{s()},[]);async function s(){try{t(await cx())}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 dx():await fx();if(!u.ok)throw new Error(u.error??"unknown error");r({kind:"ok",op:o,elapsedMs:u.elapsed_ms??0}),await s(),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 l.jsxs("div",{className:"bg-panel border border-border rounded-md p-3 mt-4",children:[l.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Sync"}),l.jsxs("div",{className:"space-y-1 text-xs font-mono",children:[e!=null&&e.configured&&a?l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:["push: ",l.jsx("span",{className:a.last_push_at?"text-success":"text-text-muted",children:G(a.last_push_at)||"never"})]}),l.jsxs("div",{children:["pull: ",l.jsx("span",{className:a.last_pull_at?"text-success":"text-text-muted",children:G(a.last_pull_at)||"never"})]}),l.jsxs("div",{className:"text-text-dim text-[10px] break-all",children:[a.repo_path,l.jsx("br",{}),"(branch: ",a.branch,")"]})]}):l.jsx("div",{className:"text-text-muted",children:"not configured"}),n.kind==="ok"&&l.jsxs("div",{className:"text-success",children:[n.op," OK (",n.elapsedMs,"ms)"]}),n.kind==="err"&&l.jsx("div",{className:"text-danger break-all",children:n.message})]}),l.jsxs("div",{className:"flex gap-1.5 mt-3",children:[l.jsxs(O,{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"?l.jsx(Yt,{className:"w-3 h-3 animate-spin"}):l.jsx(Nh,{className:"w-3 h-3"}),"Pull"]}),l.jsxs(O,{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"?l.jsx(Yt,{className:"w-3 h-3 animate-spin"}):l.jsx(kh,{className:"w-3 h-3"}),"Push"]})]})]})}function Yo({projects:e}){const t=Jt(),n=ya(),r=n.id?Number(n.id):null,s=e.filter(o=>!o.archived_at),i=e.filter(o=>o.archived_at),a=new Map;for(const o of s){const u=o.workspace??"(no workspace)";a.has(u)||a.set(u,[]),a.get(u).push(o)}return l.jsxs("aside",{className:"bg-panel-2 border-r border-border w-64 flex-shrink-0 overflow-y-auto scrollbar-thin p-4",children:[l.jsx(X,{to:"/",className:"block text-lg font-bold tracking-wider mb-4 text-text",children:"Shinobi 🥷"}),l.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Workspace"}),l.jsxs("ul",{className:"mb-4",children:[l.jsx("li",{children:l.jsx(X,{to:"/sessions",className:be("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"})}),l.jsx("li",{children:l.jsxs(X,{to:"/voice",className:be("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:[l.jsx(ki,{className:"w-3.5 h-3.5"})," Voice capture"]})}),l.jsx("li",{children:l.jsxs(X,{to:"/approvals",className:be("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:[l.jsx(Ih,{className:"w-3.5 h-3.5"})," Approvals"]})}),l.jsx("li",{children:l.jsxs(X,{to:"/push",className:be("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:[l.jsx(Ni,{className:"w-3.5 h-3.5"})," Push"]})}),l.jsx("li",{children:l.jsxs(X,{to:"/relay",className:be("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:[l.jsx(Ld,{className:"w-3.5 h-3.5"})," Relay"]})}),l.jsx("li",{children:l.jsxs(X,{to:"/plugins",className:be("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:[l.jsx(Td,{className:"w-3.5 h-3.5"})," Plugins"]})}),l.jsx("li",{children:l.jsxs(X,{to:"/telemetry",className:be("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:[l.jsx(Cd,{className:"w-3.5 h-3.5"})," Telemetry"]})}),l.jsx("li",{children:l.jsxs(X,{to:"/settings",className:be("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:[l.jsx(Oh,{className:"w-3.5 h-3.5"})," Settings"]})})]}),l.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Projects"}),a.size===0?l.jsx("div",{className:"text-text-muted text-sm italic",children:"(none)"}):[...a.entries()].map(([o,u])=>l.jsxs("div",{className:"mb-3",children:[l.jsxs("div",{className:"flex items-center gap-1.5 mt-3 mb-1 text-[10px] uppercase tracking-wider text-text-muted",children:[l.jsx(Na,{workspace:o==="(no workspace)"?null:o}),l.jsx("span",{children:u.length})]}),l.jsx("ul",{children:u.map(f=>l.jsx("li",{children:l.jsx(X,{to:`/projects/${f.id}`,className:be("block px-2 py-1.5 rounded text-sm transition-colors",r===f.id?"bg-border text-text":"text-text hover:bg-panel"),children:f.title})},f.id))})]},o)),i.length>0&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-[11px] uppercase tracking-wider text-text-muted mt-4 mb-2 flex items-center gap-1.5",children:[l.jsx(Pd,{className:"w-3 h-3"}),"Archived"]}),l.jsx("ul",{children:i.map(o=>l.jsx("li",{children:l.jsx(X,{to:`/projects/${o.id}`,className:"block px-2 py-1.5 rounded text-sm text-text-dim hover:bg-panel",children:o.title})},o.id))})]}),l.jsx(Nx,{})]})}function kx(){const[e,t]=v.useState(null),[n,r]=v.useState(null),[s,i]=v.useState(!1),a=Jt();return v.useEffect(()=>{i(!1)},[a.pathname]),v.useEffect(()=>{let o=!1;return Md({sort:"active",include_archived:!0}).then(u=>{o||t(u)}).catch(u=>{o||r(u instanceof Error?u.message:String(u))}),()=>{o=!0}},[]),n?l.jsx("div",{className:"min-h-screen flex items-center justify-center text-danger",children:l.jsxs("div",{children:[l.jsx("h1",{className:"text-xl mb-2",children:"Failed to load projects"}),l.jsx("pre",{className:"text-sm",children:n})]})}):e?l.jsxs("div",{className:"min-h-screen flex",children:[l.jsx("div",{className:"hidden md:block",children:l.jsx(Yo,{projects:e})}),s&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"md:hidden fixed inset-0 bg-black/50 z-40",onClick:()=>i(!1)}),l.jsx("div",{className:"md:hidden fixed inset-y-0 left-0 z-50 shadow-2xl",children:l.jsx(Yo,{projects:e})})]}),l.jsxs("main",{className:"flex-1 overflow-y-auto min-w-0",children:[l.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:[l.jsx("button",{onClick:()=>i(o=>!o),className:"text-text hover:text-accent","aria-label":s?"Close menu":"Open menu",children:s?l.jsx(Bh,{className:"w-5 h-5"}):l.jsx(Ph,{className:"w-5 h-5"})}),l.jsx("span",{className:"text-text font-semibold tracking-wider",children:"Shinobi 🥷"})]}),l.jsx("div",{className:"p-4 md:p-8",children:l.jsx(_d,{context:{projects:e}})})]})]}):l.jsx("div",{className:"min-h-screen flex items-center justify-center text-text-muted",children:"loading..."})}const Sx={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 l.jsx("span",{className:be("inline-block rounded text-[10px] font-medium uppercase tracking-wider px-1.5 py-0.5",Sx[t],n),children:e})}function Gs({priority:e}){return l.jsx(le,{variant:`priority-${e}`,children:e})}function ka({status:e}){return l.jsx(le,{variant:`status-${e}`,children:e})}const Go="shinobi.home.workspaceFilter",qt="__all__",Xo="__none__";function Jo({rows:e,dim:t=!1}){return l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[l.jsx("th",{className:"font-medium pb-2 pr-3",children:"Workspace"}),l.jsx("th",{className:"font-medium pb-2 pr-3",children:"Title"}),l.jsx("th",{className:"font-medium pb-2 pr-3",children:"Status"}),l.jsx("th",{className:"font-medium pb-2 pr-3",children:"Priority"}),l.jsx("th",{className:"font-medium pb-2 pr-3",children:"Type"}),l.jsx("th",{className:"font-medium pb-2 pr-3",children:"Target path"}),l.jsx("th",{className:"font-medium pb-2 pr-3",children:"Due"}),l.jsx("th",{className:"font-medium pb-2",children:"Created"})]})}),l.jsx("tbody",{className:t?"opacity-60":"",children:e.map(n=>l.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40",children:[l.jsx("td",{className:"py-2 pr-3",children:l.jsx(Na,{workspace:n.workspace})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsx(X,{to:`/projects/${n.id}`,className:"text-text hover:text-accent font-medium",children:n.title})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsx(ka,{status:n.status})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsx(Gs,{priority:n.priority})}),l.jsx("td",{className:"py-2 pr-3 text-text-muted",children:n.project_type??""}),l.jsx("td",{className:"py-2 pr-3 text-text-muted font-mono text-xs",children:n.target_path??""}),l.jsx("td",{className:"py-2 pr-3 text-text-muted",children:n.due_date??""}),l.jsx("td",{className:"py-2 text-text-muted text-xs",title:n.created_at,children:G(n.created_at)})]},n.id))})]})})}function _x(){const{projects:e}=Fe(),[t,n]=v.useState(!1),[r,s]=v.useState(()=>typeof window>"u"?qt:window.localStorage.getItem(Go)??qt),i=v.useMemo(()=>{const d=new Set;let x=!1;for(const g of e)g.workspace?d.add(g.workspace):x=!0;return{named:Array.from(d).sort((g,w)=>g.localeCompare(w)),hasNoWorkspace:x}},[e]);function a(d){return r===qt?d:r===Xo?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){s(d),typeof window<"u"&&window.localStorage.setItem(Go,d)}const h=i.named.length>1||i.named.length>=1&&i.hasNoWorkspace;return l.jsxs("div",{children:[l.jsxs("header",{className:"flex items-baseline justify-between border-b border-border pb-3 mb-6",children:[l.jsx("h1",{className:"text-2xl text-text",children:"Projects"}),l.jsxs("span",{className:"text-text-muted text-xs",children:[o.length," active · ",u.length," archived"]})]}),h&&l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx("label",{htmlFor:"workspace-filter",className:"text-[11px] uppercase tracking-wider text-text-muted",children:"Workspace"}),l.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:[l.jsx("option",{value:qt,children:"All workspaces"}),i.named.map(d=>l.jsx("option",{value:d,children:d},d)),i.hasNoWorkspace&&l.jsx("option",{value:Xo,children:"(no workspace)"})]}),r!==qt&&l.jsx("button",{onClick:()=>f(qt),className:"text-xs text-text-muted hover:text-text",children:"clear"})]}),e.length===0?l.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 ",l.jsx("code",{children:"create_project"})," MCP tool, then refresh."]}):o.length===0?l.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."}):l.jsx(Jo,{rows:o}),u.length>0&&l.jsxs("section",{className:"mt-8",children:[l.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?l.jsx(_h,{className:"w-3.5 h-3.5"}):l.jsx(bh,{className:"w-3.5 h-3.5"}),l.jsx(Pd,{className:"w-3.5 h-3.5"}),"Archived (",u.length,")"]}),t&&l.jsx(Jo,{rows:u,dim:!0})]})]})}function bx({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?l.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 l.jsx("nav",{className:"flex gap-1 mb-4 border-b border-border overflow-x-auto scrollbar-thin",children:r.map(s=>l.jsxs(hh,{to:s.to,end:s.end,className:({isActive:i})=>be("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:[s.label,s.badge]},s.to))})}function Ex(){const e=ya(),t=Number(e.id),[n,r]=v.useState(null),[s,i]=v.useState(null),a=v.useCallback(async()=>{try{const u=await Kh(t);r(u)}catch(u){i(u instanceof Error?u.message:String(u))}},[t]);if(v.useEffect(()=>{Number.isFinite(t)&&(r(null),i(null),a())},[t,a]),s)return l.jsxs("div",{className:"text-danger",children:["Error: ",s]});if(!n)return l.jsx("div",{className:"text-text-muted",children:"loading..."});const{project:o}=n;return l.jsxs("div",{children:[l.jsxs("header",{className:"border-b border-border pb-3 mb-4",children:[l.jsx("h1",{className:"text-2xl text-text",children:o.title}),l.jsxs("div",{className:"mt-2 text-xs text-text-muted flex items-center gap-2 flex-wrap",children:[l.jsx(Na,{workspace:o.workspace}),l.jsx("span",{children:"·"}),l.jsx(ka,{status:o.status}),l.jsx("span",{children:"·"}),l.jsx(Gs,{priority:o.priority}),o.due_date&&l.jsxs(l.Fragment,{children:[l.jsx("span",{children:"·"}),l.jsxs("span",{children:["due ",o.due_date]})]}),o.target_path&&l.jsxs(l.Fragment,{children:[l.jsx("span",{children:"·"}),l.jsxs("span",{className:"font-mono",children:["target ",o.target_path]})]}),o.recent_summary_at&&l.jsxs(l.Fragment,{children:[l.jsx("span",{children:"·"}),l.jsxs("span",{children:["summary ",G(o.recent_summary_at)]})]})]})]}),l.jsx(bx,{projectId:t,draftPendingCount:n.draft_counts.pending}),l.jsx(_d,{context:{snapshot:n,refresh:a}})]})}const Cx=[{key:"todo",label:"Todo"},{key:"in_progress",label:"In Progress"},{key:"done",label:"Done"}];function Px(){const{snapshot:e,refresh:t}=Fe(),{project:n,subtasks:r}=e,s={todo:[],in_progress:[],done:[]};for(const a of r)s[a.status].push(a);async function i(a,o){try{await Yh(a,{status:o}),await t()}catch(u){alert("Transition failed: "+(u instanceof Error?u.message:String(u)))}}return l.jsxs(l.Fragment,{children:[n.description&&l.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&&l.jsxs("div",{className:"bg-panel border border-border border-l-4 border-l-accent rounded-md p-4 mb-6",children:[l.jsxs("div",{className:"text-[11px] uppercase tracking-wider text-text-muted mb-2",children:["Recent session summary",n.recent_summary_provider&&l.jsxs("span",{className:"text-text-dim normal-case ml-2 tracking-normal",children:["via ",n.recent_summary_provider]})]}),l.jsx("div",{className:"text-sm text-text whitespace-pre-wrap leading-relaxed",children:n.recent_summary_md})]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:Cx.map(a=>l.jsxs("div",{className:"bg-panel border border-border rounded-md p-3 min-h-[200px]",children:[l.jsxs("h3",{className:"text-[11px] uppercase tracking-wider text-text-muted mb-3",children:[a.label," (",s[a.key].length,")"]}),l.jsx("div",{className:"space-y-2",children:s[a.key].length===0?l.jsx("div",{className:"text-text-dim text-xs",children:"(empty)"}):s[a.key].map(o=>l.jsxs("div",{className:"bg-panel-2 border border-border rounded p-2.5 text-xs",children:[l.jsx("div",{className:"text-text font-medium mb-1",children:o.title}),l.jsxs("div",{className:"text-text-muted flex flex-wrap gap-2 items-center text-[11px]",children:[l.jsx(Gs,{priority:o.priority}),o.due_date&&l.jsxs("span",{children:["due ",o.due_date]}),o.depends_on&&o.depends_on.length>0&&l.jsxs("span",{children:["deps: ",o.depends_on.join(",")]}),o.claude_session_id&&l.jsx("span",{title:o.claude_session_id,children:"session"})]}),l.jsxs("div",{className:"flex gap-1.5 mt-2",children:[o.status!=="todo"&&l.jsxs(O,{size:"sm",variant:"ghost",onClick:()=>void i(o.id,"todo"),className:"flex items-center gap-1",children:[l.jsx($h,{className:"w-3 h-3"})," todo"]}),o.status!=="in_progress"&&l.jsxs(O,{size:"sm",variant:"ghost",onClick:()=>void i(o.id,"in_progress"),className:"flex items-center gap-1",children:[l.jsx(Th,{className:"w-3 h-3"})," in progress"]}),o.status!=="done"&&l.jsxs(O,{size:"sm",variant:"ghost",onClick:()=>void i(o.id,"done"),className:"flex items-center gap-1",children:[l.jsx(Sh,{className:"w-3 h-3"})," done"]})]})]},o.id))})]},a.key))})]})}function Tx(){const{snapshot:e}=Fe(),{subtasks:t}=e;return t.length===0?l.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No subtasks. Use ",l.jsx("code",{children:"create_task"})," or ",l.jsx("code",{children:"bulk_create_tasks"})," to seed."]}):l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[l.jsx("th",{className:"font-medium pb-2 pr-3 w-12",children:"ID"}),l.jsx("th",{className:"font-medium pb-2 pr-3",children:"Title"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-28",children:"Status"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Priority"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Deps"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Due"}),l.jsx("th",{className:"font-medium pb-2 w-28",children:"Claimed"})]})}),l.jsx("tbody",{children:t.map(n=>l.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40 align-top",children:[l.jsx("td",{className:"py-2 pr-3 text-text-muted font-mono",children:n.id}),l.jsxs("td",{className:"py-2 pr-3",children:[l.jsx("div",{className:"text-text font-medium",children:n.title}),n.description&&l.jsx("div",{className:"text-text-muted text-xs mt-1",children:n.description.length>200?n.description.slice(0,200)+"…":n.description})]}),l.jsx("td",{className:"py-2 pr-3",children:l.jsx(ka,{status:n.status})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsx(Gs,{priority:n.priority})}),l.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(", "):""}),l.jsx("td",{className:"py-2 pr-3 text-text-muted",children:n.due_date??""}),l.jsx("td",{className:"py-2 text-text-muted text-xs",title:n.last_claimed_at??"",children:G(n.last_claimed_at)})]},n.id))})]})})}const Lx=["open","fix_now","fix_later","wontfix","fixed","false_positive"];function Rx(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 Mx(){const{snapshot:e,refresh:t}=Fe(),{decisions:n,draft_counts:r,project:s}=e;async function i(o,u){try{await Gh(o,u),await t()}catch(f){alert("Transition failed: "+(f instanceof Error?f.message:String(f)))}}const a=r.pending>0?l.jsxs("div",{className:"bg-panel border-l-4 border-l-warning rounded-md p-3 mb-4 flex items-center justify-between",children:[l.jsxs("span",{className:"text-sm",children:[l.jsxs("strong",{children:[r.pending," pending decision draft",r.pending>1?"s":""]})," ",l.jsx("span",{className:"text-text-muted",children:"extracted via LLM"})]}),l.jsx(X,{to:`/projects/${s.id}/decision-drafts`,className:"text-accent text-sm hover:underline",children:"Review →"})]}):null;return n.length===0?l.jsxs("div",{children:[a,l.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No decisions logged. Use ",l.jsx("code",{children:"log_decision"})," via MCP."]})]}):l.jsxs("div",{children:[a,l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[l.jsx("th",{className:"font-medium pb-2 pr-3 w-12",children:"ID"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Kind"}),l.jsx("th",{className:"font-medium pb-2 pr-3",children:"Summary + Rationale"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-44",children:"Status"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-40",children:"Files"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Tags"}),l.jsx("th",{className:"font-medium pb-2 w-24",children:"Logged"})]})}),l.jsx("tbody",{children:n.map(o=>l.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40 align-top",children:[l.jsx("td",{className:"py-3 pr-3 text-text-muted font-mono",children:o.id}),l.jsx("td",{className:"py-3 pr-3",children:l.jsx(le,{children:o.kind})}),l.jsxs("td",{className:"py-3 pr-3",children:[l.jsx("div",{className:"text-text font-medium",children:o.summary}),l.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&&l.jsxs("div",{className:"text-text-dim text-xs mt-1",children:["alt: ",o.alternatives_considered.slice(0,150)]})]}),l.jsxs("td",{className:"py-3 pr-3",children:[l.jsx("span",{className:`inline-block rounded text-[10px] font-medium uppercase tracking-wider px-1.5 py-0.5 ${Rx(o.status)}`,children:o.status}),l.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:Lx.filter(u=>u!==o.status).map(u=>l.jsx(O,{size:"sm",variant:"ghost",onClick:()=>void i(o.id,u),className:"text-[10px] px-1.5 py-0.5",children:u},u))})]}),l.jsx("td",{className:"py-3 pr-3 text-text-muted text-xs",children:(o.files_touched??[]).map(u=>l.jsx("div",{children:u},u))}),l.jsx("td",{className:"py-3 pr-3",children:(o.tags??[]).map(u=>l.jsx(le,{className:"mr-1 mb-1",children:u},u))}),l.jsx("td",{className:"py-3 text-text-muted text-xs",title:o.created_at,children:G(o.created_at)})]},o.id))})]})})]})}function Ox(){const{snapshot:e,refresh:t}=Fe(),n=e.project.id,[r,s]=v.useState(null),[i,a]=v.useState({pending:0,approved:0,rejected:0}),[o,u]=v.useState(null),[f,h]=v.useState(null),d=v.useCallback(async()=>{try{const g=await Xh(n);s(g.drafts),a(g.counts)}catch(g){u(g instanceof Error?g.message:String(g))}},[n]);v.useEffect(()=>{d()},[d]);async function x(g,w){if(f===null){h(g);try{w==="approve"?await Jh(g):await Zh(g),await Promise.all([d(),t()])}catch(y){alert(`${w} failed: ${y instanceof Error?y.message:String(y)}`)}finally{h(null)}}}if(o)return l.jsxs("div",{className:"text-danger",children:["Error: ",o]});if(!r)return l.jsx("div",{className:"text-text-muted",children:"loading drafts..."});const N=(g,w,y)=>l.jsxs("div",{className:"bg-panel border border-border rounded p-3",children:[l.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted",children:g}),l.jsx("div",{className:`text-2xl mt-1 ${y}`,children:w})]});return l.jsxs("div",{children:[l.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-4",children:[N("Pending",i.pending,"text-warning"),N("Approved",i.approved,"text-success"),N("Rejected",i.rejected,"text-danger")]}),r.length===0?l.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 ",l.jsx("code",{children:"extract_decisions(text)"})," — LLM scans a transcript and proposes decisions for you to approve."]}):l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[l.jsx("th",{className:"font-medium pb-2 pr-3 w-12",children:"ID"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Kind"}),l.jsx("th",{className:"font-medium pb-2 pr-3",children:"Summary + Rationale"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Files"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-44",children:"Action"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-20",children:"Created"}),l.jsx("th",{className:"font-medium pb-2",children:"Extractor"})]})}),l.jsx("tbody",{children:r.map(g=>l.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40 align-top",children:[l.jsx("td",{className:"py-3 pr-3 text-text-muted font-mono",children:g.id}),l.jsx("td",{className:"py-3 pr-3",children:l.jsx(le,{children:g.kind})}),l.jsxs("td",{className:"py-3 pr-3",children:[l.jsx("div",{className:"text-text font-medium",children:g.summary}),l.jsx("div",{className:"text-text-muted text-xs mt-1",children:g.rationale}),g.alternatives_considered&&l.jsxs("div",{className:"text-text-dim text-xs mt-1",children:["alt: ",g.alternatives_considered]})]}),l.jsx("td",{className:"py-3 pr-3 text-text-muted text-xs",children:(g.files_touched??[]).map(w=>l.jsx("div",{children:w},w))}),l.jsx("td",{className:"py-3 pr-3",children:g.status==="pending"?l.jsxs("div",{className:"flex gap-1.5",children:[l.jsx(O,{size:"sm",variant:"primary",disabled:f===g.id,onClick:()=>void x(g.id,"approve"),children:"Approve"}),l.jsx(O,{size:"sm",variant:"default",disabled:f===g.id,onClick:()=>void x(g.id,"reject"),children:"Reject"})]}):g.status==="approved"?l.jsxs(le,{className:"bg-success text-bg",children:["approved ",g.approved_decision_id?`→ #${g.approved_decision_id}`:""]}):l.jsx(le,{className:"bg-danger text-white",children:"rejected"})}),l.jsx("td",{className:"py-3 pr-3 text-text-muted text-xs",children:G(g.created_at)}),l.jsx("td",{className:"py-3 text-text-dim text-[10px] font-mono",children:g.extractor_model??""})]},g.id))})]})})]})}function zx(){const{snapshot:e}=Fe(),{dead_ends:t}=e;return t.length===0?l.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No dead ends logged. Use ",l.jsx("code",{children:"log_dead_end"})," when an approach fails."]}):l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[l.jsx("th",{className:"font-medium pb-2 pr-3 w-12",children:"ID"}),l.jsx("th",{className:"font-medium pb-2 pr-3",children:"Attempted"}),l.jsx("th",{className:"font-medium pb-2 pr-3",children:"Why failed"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Files"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Flag"}),l.jsx("th",{className:"font-medium pb-2 w-24",children:"Logged"})]})}),l.jsx("tbody",{children:t.map(n=>l.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40 align-top",children:[l.jsx("td",{className:"py-3 pr-3 text-text-muted font-mono",children:n.id}),l.jsx("td",{className:"py-3 pr-3 text-text font-medium",children:n.attempted_approach}),l.jsx("td",{className:"py-3 pr-3 text-text-muted",children:n.failure_reason}),l.jsx("td",{className:"py-3 pr-3 text-text-muted text-xs",children:(n.files_involved??[]).map(r=>l.jsx("div",{children:r},r))}),l.jsx("td",{className:"py-3 pr-3",children:n.never_retry&&l.jsx(le,{className:"bg-danger text-white",children:"never retry"})}),l.jsx("td",{className:"py-3 text-text-muted text-xs",title:n.created_at,children:G(n.created_at)})]},n.id))})]})})}function Ix(){const{snapshot:e}=Fe(),{notes:t}=e;return t.length===0?l.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No notes yet. Use ",l.jsx("code",{children:"add_note"})," for stray observations."]}):l.jsx("div",{className:"space-y-6",children:t.map(n=>l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2 flex-wrap",children:[l.jsxs(le,{children:["note #",n.id]}),(n.tags??[]).map(r=>l.jsx(le,{children:r},r)),l.jsx("span",{className:"text-text-muted text-xs",children:G(n.created_at)}),n.audio_path&&l.jsx(le,{className:"bg-success text-bg",children:"audio"})]}),l.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&&l.jsx("audio",{controls:!0,className:"mt-2 w-full",src:n.audio_path}),n.files_touched&&n.files_touched.length>0&&l.jsxs("div",{className:"text-text-muted text-xs mt-1",children:["files: ",n.files_touched.join(", ")]})]},n.id))})}function Dx(){const{snapshot:e}=Fe(),{latest_plan:t,plan_history:n}=e;return t?l.jsxs("div",{children:[l.jsxs("section",{className:"mb-8",children:[l.jsxs("h3",{className:"text-sm text-text mb-2",children:["Latest plan — v",t.version]}),l.jsxs("div",{className:"text-text-muted text-xs mb-3",children:["saved ",G(t.created_at)]}),l.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&&l.jsxs("section",{children:[l.jsx("h3",{className:"text-sm text-text mb-3",children:"Version history"}),l.jsx("ul",{className:"space-y-1 text-sm",children:n.map(r=>l.jsxs("li",{className:"text-text-muted",children:[l.jsxs("span",{className:"text-text font-medium",children:["v",r.version]})," — ",r.created_at," (",r.plan_md_length," chars)"]},r.id))})]})]}):l.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No plans saved. Use ",l.jsx("code",{children:"save_plan"})," to persist an approved plan."]})}function en({title:e,children:t}){return l.jsxs("section",{className:"mb-6",children:[l.jsx("h3",{className:"text-sm text-text mb-2",children:e}),t]})}function Un(){return l.jsx("div",{className:"text-text-muted text-sm",children:"(none)"})}function $x(){const{snapshot:e}=Fe(),t=e.context;if(!t)return l.jsxs("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:["No context set. Use ",l.jsx("code",{children:"update_context"})," to record conventions / dont_touch / deploy_notes."]});const n=t.file_annotations??{},r=Object.entries(n);return l.jsxs("div",{children:[l.jsx(en,{title:"Conventions",children:t.conventions?l.jsx("pre",{className:"bg-panel border border-border rounded p-3 text-xs font-mono text-text whitespace-pre-wrap",children:t.conventions}):l.jsx(Un,{})}),l.jsx(en,{title:"Don't touch",children:t.dont_touch&&t.dont_touch.length>0?l.jsx("ul",{className:"list-disc list-inside text-sm text-text",children:t.dont_touch.map(s=>l.jsx("li",{children:s},s))}):l.jsx(Un,{})}),l.jsx(en,{title:"Test patterns",children:t.test_patterns?l.jsx("pre",{className:"bg-panel border border-border rounded p-3 text-xs font-mono text-text whitespace-pre-wrap",children:t.test_patterns}):l.jsx(Un,{})}),l.jsx(en,{title:"Deploy notes",children:t.deploy_notes?l.jsx("pre",{className:"bg-panel border border-border rounded p-3 text-xs font-mono text-text whitespace-pre-wrap",children:t.deploy_notes}):l.jsx(Un,{})}),l.jsx(en,{title:"File annotations",children:r.length>0?l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[l.jsx("th",{className:"pb-2 pr-3",children:"Path"}),l.jsx("th",{className:"pb-2",children:"Annotation"})]})}),l.jsx("tbody",{children:r.map(([s,i])=>l.jsxs("tr",{className:"border-b border-border/40 align-top",children:[l.jsx("td",{className:"py-2 pr-3 text-text font-mono text-xs",children:s}),l.jsx("td",{className:"py-2 text-text-muted",children:i})]},s))})]}):l.jsx(Un,{})}),l.jsx(en,{title:"Meta",children:l.jsxs("div",{className:"text-xs text-text-muted",children:["Last validated commit: ",t.last_validated_commit?l.jsx("code",{className:"text-text",children:t.last_validated_commit}):"(none)",l.jsx("br",{}),"Updated: ",t.updated_at]})})]})}function Fx(){const{snapshot:e}=Fe(),{activity:t}=e;return t.length===0?l.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."}):l.jsx("div",{className:"space-y-px",children:t.map(n=>l.jsxs("div",{className:"grid grid-cols-[110px_160px_1fr_140px] gap-3 py-2 border-b border-border/40 items-baseline text-xs",children:[l.jsx("div",{className:"text-text-muted font-mono",title:n.created_at,children:G(n.created_at)}),l.jsx("div",{className:"text-accent",children:n.action_type}),l.jsxs("div",{className:"text-text flex flex-wrap items-center gap-2",children:[n.action_details&&l.jsx("span",{children:n.action_details}),n.entity_type&&l.jsxs(le,{children:[n.entity_type,"#",n.entity_id??"?"]}),n.ref_url&&l.jsxs("span",{className:"text-text-dim font-mono",children:[n.ref_url.slice(0,16),"…"]})]}),l.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 l.jsxs("div",{className:"bg-panel border border-border rounded p-3",children:[l.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted",children:e}),l.jsx("div",{className:"text-2xl text-text mt-1",children:t})]})}function Ax(){const{snapshot:e}=Fe(),{subtasks:t,decisions:n,dead_ends:r,notes:s,sessions:i,activity:a,plan_history:o,draft_counts:u,project:f}=e,[h,d]=v.useState(null),[x,N]=v.useState(null),[g,w]=v.useState(!1),[y,p]=v.useState(null),c=()=>{Qo(f.id).then(d),Ko(f.id).then(N)};v.useEffect(()=>{let C=!1;return Qo(f.id).then(ie=>{C||d(ie)}),Ko(f.id).then(ie=>{C||N(ie)}),()=>{C=!0}},[f.id]);const m=async()=>{w(!0),p(null);try{const C=await px({since_hours:720});p(`parsed ${C.parsed} transcripts, upserted ${C.upserted}, total scanned ≈ $${C.total_cost_usd.toFixed(2)}`),c()}catch(C){p("ingest failed: "+(C instanceof Error?C.message:String(C)))}finally{w(!1)}},j=new Map(t.map(C=>[C.id,C.title])),_={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},k={total:n.length,open:n.filter(C=>C.status==="open").length,fixed:n.filter(C=>C.status==="fixed").length},b=Date.now(),E=a.filter(C=>{const ie=new Date(C.created_at.replace(" ","T")+"Z").getTime();return!isNaN(ie)&&b-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 l.jsxs("div",{children:[l.jsxs("section",{className:"mb-6",children:[l.jsx("h3",{className:"text-sm text-text mb-3",children:"Subtasks"}),l.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[l.jsx(ne,{label:"total",value:_.total}),l.jsx(ne,{label:"todo",value:_.todo}),l.jsx(ne,{label:"in progress",value:_.in_progress}),l.jsx(ne,{label:"done",value:_.done})]})]}),l.jsxs("section",{className:"mb-6",children:[l.jsx("h3",{className:"text-sm text-text mb-3",children:"Memory"}),l.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[l.jsx(ne,{label:"decisions",value:k.total}),l.jsx(ne,{label:"decisions open",value:k.open}),l.jsx(ne,{label:"decisions fixed",value:k.fixed}),l.jsx(ne,{label:"drafts pending",value:u.pending}),l.jsx(ne,{label:"drafts approved",value:u.approved}),l.jsx(ne,{label:"dead ends",value:r.length}),l.jsx(ne,{label:"notes",value:s.length}),l.jsx(ne,{label:"plan versions",value:o.length})]})]}),l.jsxs("section",{className:"mb-6",children:[l.jsx("h3",{className:"text-sm text-text mb-3",children:"Time on task"}),h===null?l.jsx("div",{className:"text-text-muted text-sm",children:"loading…"}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3 mb-4",children:[l.jsxs("div",{className:"bg-panel border border-border rounded p-3",children:[l.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted",children:"total time"}),l.jsx("div",{className:"text-2xl text-text mt-1",children:Zo(h.total_seconds)})]}),l.jsx(ne,{label:"sessions w/ subtask",value:h.session_count}),l.jsx(ne,{label:"tasks tracked",value:h.per_subtask.length})]}),h.per_subtask.length===0?l.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)"}):l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[l.jsx("th",{className:"pb-2 pr-3",children:"Task"}),l.jsx("th",{className:"pb-2 pr-3 text-right",children:"Duration"}),l.jsx("th",{className:"pb-2 pr-3 text-right",children:"Sessions"}),l.jsx("th",{className:"pb-2 text-right",children:"Last touched"})]})}),l.jsx("tbody",{children:h.per_subtask.slice(0,20).map(C=>l.jsxs("tr",{className:"border-b border-border/40",children:[l.jsx("td",{className:"py-1.5 pr-3 text-text",children:l.jsxs("a",{href:`#subtask-${C.subtask_id}`,className:"hover:underline",children:["#",C.subtask_id," ",j.get(C.subtask_id)??"(deleted)"]})}),l.jsx("td",{className:"py-1.5 pr-3 text-text text-right font-mono",children:Zo(C.total_seconds)}),l.jsxs("td",{className:"py-1.5 pr-3 text-text text-right",children:[C.session_count,C.open_sessions>0?l.jsxs("span",{className:"text-warning",children:[" (",C.open_sessions," open)"]}):null]}),l.jsx("td",{className:"py-1.5 text-text-muted text-right text-xs",children:C.last_session_at??"—"})]},C.subtask_id))})]})]})]}),l.jsxs("section",{className:"mb-6",children:[l.jsxs("div",{className:"flex items-baseline justify-between mb-3",children:[l.jsx("h3",{className:"text-sm text-text",children:"AI token cost"}),l.jsx("button",{onClick:()=>void m(),disabled:g,className:"text-[11px] uppercase tracking-wider text-accent hover:underline disabled:text-text-dim",children:g?"ingesting…":"ingest transcripts"})]}),y&&l.jsx("div",{className:"text-text-muted text-xs mb-3",children:y}),x===null?l.jsx("div",{className:"text-text-muted text-sm",children:"loading…"}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3 mb-4",children:[l.jsxs("div",{className:"bg-panel border border-border rounded p-3",children:[l.jsx("div",{className:"text-[11px] uppercase tracking-wider text-text-muted",children:"total cost"}),l.jsxs("div",{className:"text-2xl text-text mt-1",children:["$",x.total_cost_usd.toFixed(2)]})]}),l.jsx(ne,{label:"costed sessions",value:x.session_count}),l.jsx(ne,{label:"tasks with cost",value:x.per_subtask.length})]}),x.per_subtask.length===0?l.jsxs("div",{className:"text-text-muted text-sm",children:["(no cost data yet — click ",l.jsx("em",{children:"ingest transcripts"})," above to parse ",l.jsx("code",{children:"~/.claude/projects/"})," JSONL files)"]}):l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[l.jsx("th",{className:"pb-2 pr-3",children:"Task"}),l.jsx("th",{className:"pb-2 pr-3 text-right",children:"Cost (USD)"}),l.jsx("th",{className:"pb-2 pr-3 text-right",children:"Input tok"}),l.jsx("th",{className:"pb-2 pr-3 text-right",children:"Output tok"}),l.jsx("th",{className:"pb-2 text-right",children:"Models"})]})}),l.jsx("tbody",{children:x.per_subtask.slice(0,20).map(C=>l.jsxs("tr",{className:"border-b border-border/40",children:[l.jsxs("td",{className:"py-1.5 pr-3 text-text",children:["#",C.subtask_id," ",j.get(C.subtask_id)??"(deleted)"]}),l.jsxs("td",{className:"py-1.5 pr-3 text-text text-right font-mono",children:["$",C.total_cost_usd.toFixed(4)]}),l.jsx("td",{className:"py-1.5 pr-3 text-text-muted text-right font-mono text-xs",children:C.total_input_tokens.toLocaleString()}),l.jsx("td",{className:"py-1.5 pr-3 text-text-muted text-right font-mono text-xs",children:C.total_output_tokens.toLocaleString()}),l.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))})]})]})]}),l.jsxs("section",{className:"mb-6",children:[l.jsx("h3",{className:"text-sm text-text mb-3",children:"Activity"}),l.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3 mb-4",children:[l.jsx(ne,{label:"sessions",value:i.length}),l.jsx(ne,{label:"events total",value:a.length}),l.jsx(ne,{label:"events 24h",value:E})]}),l.jsx("h3",{className:"text-sm text-text mb-3",children:"Recent action counts"}),L.length===0?l.jsx("div",{className:"text-text-muted text-sm",children:"(no activity)"}):l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[l.jsx("th",{className:"pb-2 pr-3",children:"Action"}),l.jsx("th",{className:"pb-2",children:"Count"})]})}),l.jsx("tbody",{children:L.map(([C,ie])=>l.jsxs("tr",{className:"border-b border-border/40",children:[l.jsx("td",{className:"py-1.5 pr-3 text-text font-mono text-xs",children:C}),l.jsx("td",{className:"py-1.5 text-text",children:ie})]},C))})]})]})]})}function Ux(){const{snapshot:e}=Fe(),{sessions:t}=e;return t.length===0?l.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."}):l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[l.jsx("th",{className:"font-medium pb-2 pr-3",children:"Session ID"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Started"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Ended"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Duration"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-20",children:"Tool calls"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-20",children:"Files"}),l.jsx("th",{className:"font-medium pb-2",children:"Notes"})]})}),l.jsx("tbody",{children:t.map(n=>l.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40 align-top",children:[l.jsx("td",{className:"py-2 pr-3 text-text font-mono text-xs",children:l.jsx(X,{to:`/sessions/${encodeURIComponent(n.session_id)}`,className:"text-accent hover:underline",children:n.session_id})}),l.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:G(n.started_at)}),l.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:n.ended_at?G(n.ended_at):"active"}),l.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:n.duration_seconds?`${Math.floor(n.duration_seconds/60)}m`:""}),l.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:n.tool_calls_count}),l.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:n.files_touched_count}),l.jsx("td",{className:"py-2 text-text-muted text-xs",children:n.notes??""})]},n.session_id))})]})})}function Bx(){const[e,t]=v.useState(null),[n,r]=v.useState(null);return v.useEffect(()=>{qh(500).then(t).catch(s=>r(s instanceof Error?s.message:String(s)))},[]),n?l.jsxs("div",{className:"text-danger",children:["Error: ",n]}):e?l.jsxs("div",{children:[l.jsxs("header",{className:"border-b border-border pb-3 mb-6",children:[l.jsx("h1",{className:"text-2xl text-text",children:"All sessions"}),l.jsxs("div",{className:"text-text-muted text-xs mt-1",children:[e.length," session(s)"]})]}),e.length===0?l.jsx("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:"No sessions tracked yet."}):l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[l.jsx("th",{className:"font-medium pb-2 pr-3",children:"Session ID"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Project"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Started"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-32",children:"Ended"}),l.jsx("th",{className:"font-medium pb-2 pr-3 w-24",children:"Duration"}),l.jsx("th",{className:"font-medium pb-2 w-20",children:"Tool calls"})]})}),l.jsx("tbody",{children:e.map(s=>l.jsxs("tr",{className:"border-b border-border/40 hover:bg-panel/40",children:[l.jsx("td",{className:"py-2 pr-3 text-text font-mono text-xs",children:l.jsx(X,{to:`/sessions/${encodeURIComponent(s.session_id)}`,className:"text-accent hover:underline",children:s.session_id})}),l.jsx("td",{className:"py-2 pr-3 text-text-muted",children:s.project_id?`#${s.project_id}`:""}),l.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:G(s.started_at)}),l.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:s.ended_at?G(s.ended_at):"active"}),l.jsx("td",{className:"py-2 pr-3 text-text-muted text-xs",children:s.duration_seconds?`${Math.floor(s.duration_seconds/60)}m`:""}),l.jsx("td",{className:"py-2 text-text-muted text-xs",children:s.tool_calls_count})]},s.session_id))})]})})]}):l.jsx("div",{className:"text-text-muted",children:"loading sessions..."})}function Wx(){const{sessionId:e}=ya(),[t,n]=v.useState(null),[r,s]=v.useState(null);if(v.useEffect(()=>{e&&ex(e).then(n).catch(o=>s(o instanceof Error?o.message:String(o)))},[e]),r)return l.jsxs("div",{className:"text-danger",children:["Error: ",r]});if(!t)return l.jsx("div",{className:"text-text-muted",children:"loading session..."});const{session:i,activity:a}=t;return l.jsxs("div",{children:[l.jsxs("header",{className:"border-b border-border pb-3 mb-4",children:[l.jsx(X,{to:"/sessions",className:"text-accent text-xs hover:underline",children:"← all sessions"}),l.jsx("h1",{className:"text-2xl text-text mt-1 font-mono",children:i.session_id}),l.jsxs("div",{className:"text-text-muted text-xs mt-2 flex gap-3 flex-wrap",children:[l.jsxs("span",{children:["started ",i.started_at]}),i.ended_at&&l.jsxs("span",{children:["ended ",i.ended_at]}),i.duration_seconds!==null&&l.jsxs("span",{children:["duration ",Math.floor(i.duration_seconds/60),"m ",i.duration_seconds%60,"s"]}),l.jsxs("span",{children:[i.tool_calls_count," tool calls"]}),l.jsxs("span",{children:[i.files_touched_count," files touched"]})]}),i.notes&&l.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})]}),l.jsx("h2",{className:"text-sm text-text mb-3",children:"Activity"}),a.length===0?l.jsx("div",{className:"text-text-muted text-sm",children:"(no activity in this session)"}):l.jsx("div",{className:"space-y-px",children:a.map(o=>l.jsxs("div",{className:"grid grid-cols-[110px_160px_1fr] gap-3 py-2 border-b border-border/40 items-baseline text-xs",children:[l.jsx("div",{className:"text-text-muted font-mono",title:o.created_at,children:G(o.created_at)}),l.jsx("div",{className:"text-accent",children:o.action_type}),l.jsxs("div",{className:"text-text flex flex-wrap items-center gap-2",children:[o.action_details&&l.jsx("span",{children:o.action_details}),o.entity_type&&l.jsxs(le,{children:[o.entity_type,"#",o.entity_id??"?"]})]})]},o.id))})]})}const Vx={storage:"Storage",dashboard:"Dashboard",embedding:"Embedding (semantic recall)",llm:"LLM (extraction + summarization)",recall:"Recall mode",sync:"Sync"};function Hx(){const[e,t]=v.useState(null),[n,r]=v.useState([]),[s,i]=v.useState({}),[a,o]=v.useState(null),u=v.useCallback(async()=>{try{const g=await tx();t(g.specs),r(g.values),i({})}catch(g){o({kind:"err",text:g instanceof Error?g.message:String(g)})}},[]);if(v.useEffect(()=>{u()},[u]),!e)return l.jsx("div",{className:"text-text-muted",children:"loading settings..."});const f=new Map(n.map(g=>[g.key,g])),h=new Map;for(const g of e)h.has(g.group)||h.set(g.group,[]),h.get(g.group).push(g);function d(g,w){i(y=>({...y,[g]:w}))}function x(g){i(w=>{const{[g]:y,...p}=w;return p})}async function N(){if(Object.keys(s).length===0){o({kind:"err",text:"no changes to save"});return}o({kind:"busy",text:"writing ~/.shinobi/.env ..."});try{const g=await nx(s);if(!g.ok)throw new Error(g.error??"unknown error");const w=Object.keys(s).filter(p=>{var c;return(c=e==null?void 0:e.find(m=>m.key===p))==null?void 0:c.requiresRestart}),y=`wrote ${g.written??0}, cleared ${g.cleared??0}${w.length>0?` (restart required: ${w.join(", ")})`:""}`;o({kind:"ok",text:y}),await u()}catch(g){o({kind:"err",text:g instanceof Error?g.message:String(g)})}}return l.jsxs("div",{className:"max-w-3xl",children:[l.jsxs("header",{className:"border-b border-border pb-3 mb-6 flex items-baseline justify-between",children:[l.jsx("h1",{className:"text-2xl text-text",children:"Settings"}),l.jsx("span",{className:"text-text-muted text-xs",children:"writes to ~/.shinobi/.env with backup"})]}),a&&l.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"&&l.jsx(Mt,{className:"w-4 h-4"}),a.kind==="err"&&l.jsx(at,{className:"w-4 h-4"}),a.kind==="busy"&&l.jsx(Yt,{className:"w-4 h-4 animate-spin"}),a.text]}),[...h.entries()].map(([g,w])=>l.jsxs("section",{className:"mb-8",children:[l.jsx("h2",{className:"text-sm text-text mb-3 uppercase tracking-wider text-text-muted",children:Vx[g]}),l.jsx("div",{className:"space-y-3",children:w.map(y=>{const p=f.get(y.key),c=y.key in s,m=s[y.key];return l.jsxs("div",{className:"bg-panel border border-border rounded p-3",children:[l.jsxs("div",{className:"flex items-baseline justify-between gap-3 mb-1",children:[l.jsxs("div",{children:[l.jsxs("label",{className:"text-sm text-text font-medium",children:[y.label,y.requiresRestart&&l.jsx("span",{className:"ml-2 text-[10px] uppercase tracking-wider text-warning",children:"restart required"})]}),l.jsx("code",{className:"ml-2 text-[11px] text-text-muted font-mono",children:y.key})]}),(p==null?void 0:p.is_set)&&!c&&l.jsx("span",{className:"text-[10px] uppercase tracking-wider text-success",children:"set"}),c&&l.jsx("span",{className:"text-[10px] uppercase tracking-wider text-warning",children:"unsaved"})]}),l.jsx("p",{className:"text-xs text-text-muted mb-2",children:y.description}),l.jsxs("div",{className:"flex gap-2 items-center",children:[y.enumValues?l.jsxs("select",{value:c?m??"":(p==null?void 0:p.value)??"",onChange:j=>d(y.key,j.target.value||null),className:"bg-panel-2 border border-border rounded px-2 py-1 text-sm text-text font-mono flex-1",children:[l.jsx("option",{value:"",children:"(unset)"}),y.enumValues.map(j=>l.jsx("option",{value:j,children:j},j))]}):l.jsx("input",{type:y.secret?"password":"text",value:c?m??"":(p==null?void 0:p.value)??"",placeholder:p!=null&&p.is_set&&y.secret?"(secret set — type to replace)":y.placeholder??"(unset)",onChange:j=>d(y.key,j.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&&l.jsx(O,{size:"sm",variant:"ghost",onClick:()=>x(y.key),title:"discard change",children:l.jsx(Lh,{className:"w-3 h-3"})})]})]},y.key)})})]},g)),l.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:[l.jsx(O,{variant:"default",onClick:()=>i({}),disabled:Object.keys(s).length===0,children:"Discard all"}),l.jsxs(O,{variant:"primary",onClick:()=>void N(),disabled:Object.keys(s).length===0,children:["Save (",Object.keys(s).length," change",Object.keys(s).length===1?"":"s",")"]})]})]})}async function Od(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 Qx(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 Kx(e){return Od("/api/voice/save-note",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function Yx(e){return Od("/api/voice/extract-decisions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function Gx(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 Xx(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))??"",s=r?new MediaRecorder(t,{mimeType:r}):new MediaRecorder(t),i=[],a=Date.now();return s.addEventListener("dataavailable",u=>{u.data&&u.data.size>0&&i.push(u.data)}),s.addEventListener("stop",()=>{const u=new Blob(i,{type:s.mimeType||"audio/webm"});e(u,Date.now()-a),t.getTracks().forEach(f=>f.stop())}),s.start(),s}function Jx(){const[e,t]=v.useState({kind:"idle"}),[n,r]=v.useState([]),[s,i]=v.useState(null),[a,o]=v.useState("voice"),[u,f]=v.useState(""),h=v.useRef(null),[d,x]=v.useState(0);v.useEffect(()=>{Md({sort:"active"}).then(k=>{r(k);const b=localStorage.getItem("voice-project-id");b&&k.some(E=>String(E.id)===b)&&i(Number(b))}).catch(()=>{})},[]),v.useEffect(()=>(e.kind==="recording"?h.current=window.setInterval(()=>x(k=>k+1),250):h.current!==null&&(clearInterval(h.current),h.current=null),()=>{h.current!==null&&clearInterval(h.current)}),[e.kind]);function N(k){i(k),k!==null?localStorage.setItem("voice-project-id",String(k)):localStorage.removeItem("voice-project-id")}async function g(){try{const k=await Xx((b,E)=>{t({kind:"recorded",blob:b,durationMs:E})});t({kind:"recording",startedAt:Date.now(),recorder:k})}catch(k){t({kind:"error",message:k instanceof Error?k.message:String(k)})}}function w(){e.kind==="recording"&&e.recorder.stop()}function y(){t({kind:"idle"}),f("")}async function p(){if(e.kind==="recorded"){t({kind:"transcribing"});try{const k=e.blob.type.includes("mp4")?"mp4":e.blob.type.includes("ogg")?"ogg":"webm",b=await Qx(e.blob,`recording.${k}`);if(!b.ok||!b.text){t({kind:"error",message:b.error??"transcription returned empty"});return}f(b.text),t({kind:"transcribed",blob:e.blob,text:b.text,provider:b.provider??"unknown",model:b.model??"unknown",durationMs:e.durationMs})}catch(k){t({kind:"error",message:k instanceof Error?k.message:String(k)})}}}async function c(){var k;if(!(e.kind!=="transcribed"||u.trim()==="")){t({kind:"saving"});try{const b=a.split(",").map(F=>F.trim()).filter(Boolean),E=await Kx({project_id:s??void 0,text:u.trim(),tags:b.length>0?b:["voice"]});if(!E.ok){t({kind:"error",message:E.error??"save failed"});return}t({kind:"done",message:`note #${(k=E.note)==null?void 0:k.id} saved${s?` to project #${s}`:" to inbox"}`})}catch(b){t({kind:"error",message:b instanceof Error?b.message:String(b)})}}}async function m(){if(e.kind!=="transcribed"||u.trim()===""||s===null){s===null&&t({kind:"error",message:"pick a project to extract decisions into"});return}t({kind:"saving"});try{const k=await Yx({project_id:s,text:u.trim()});if(!k.ok){t({kind:"error",message:k.error??"extract failed"});return}t({kind:"done",message:`${k.drafts_extracted??0} draft(s) created via ${k.provider}:${k.model} — open project Drafts tab to review`})}catch(k){t({kind:"error",message:k instanceof Error?k.message:String(k)})}}function j(){t({kind:"idle"}),f("")}const _=e.kind==="recording"?Math.floor((Date.now()-e.startedAt)/1e3):0;return l.jsxs("div",{className:"max-w-2xl mx-auto",children:[l.jsxs("header",{className:"border-b border-border pb-3 mb-6",children:[l.jsxs("h1",{className:"text-2xl text-text flex items-center gap-2",children:[l.jsx(ki,{className:"w-6 h-6 text-accent"})," Voice capture"]}),l.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."})]}),l.jsxs("div",{className:"bg-panel border border-border rounded-lg p-6 mb-4",children:[l.jsx("label",{className:"block text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Project"}),l.jsxs("select",{value:s??"",onChange:k=>N(k.target.value?Number(k.target.value):null),className:"w-full bg-panel-2 border border-border rounded px-3 py-2 text-sm text-text",children:[l.jsx("option",{value:"",children:"(inbox — no project)"}),n.map(k=>l.jsxs("option",{value:k.id,children:[k.workspace?`[${k.workspace}] `:"",k.title]},k.id))]}),l.jsxs("div",{className:"flex flex-col items-center my-8",children:[e.kind==="idle"&&l.jsx(O,{variant:"primary",onClick:()=>void g(),className:"w-32 h-32 rounded-full flex items-center justify-center text-base",children:l.jsx(ki,{className:"w-12 h-12"})}),e.kind==="recording"&&l.jsxs(l.Fragment,{children:[l.jsx(O,{variant:"danger",onClick:w,className:"w-32 h-32 rounded-full flex items-center justify-center animate-pulse",children:l.jsx(Dh,{className:"w-12 h-12"})}),l.jsxs("div",{className:"mt-3 text-warning text-sm font-mono",children:["recording ",_,"s"]})]}),e.kind==="recorded"&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-text text-sm",children:["recorded ",Math.floor(e.durationMs/1e3),"s"]}),l.jsx("audio",{controls:!0,className:"my-3",src:URL.createObjectURL(e.blob)}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(O,{variant:"default",onClick:y,children:l.jsx(jr,{className:"w-4 h-4"})}),l.jsx(O,{variant:"primary",onClick:()=>void p(),children:"Transcribe"})]})]}),e.kind==="transcribing"&&l.jsxs("div",{className:"text-warning text-sm flex items-center gap-2",children:[l.jsx(Yt,{className:"w-4 h-4 animate-spin"})," transcribing..."]}),e.kind==="transcribed"&&l.jsxs("div",{className:"w-full",children:[l.jsx("label",{className:"block text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Transcript (edit before saving)"}),l.jsx("textarea",{value:u,onChange:k=>f(k.target.value),rows:6,className:"w-full bg-panel-2 border border-border rounded px-3 py-2 text-sm text-text font-mono"}),l.jsxs("div",{className:"text-text-dim text-[10px] mt-1",children:["via ",e.provider,":",e.model," · ",Math.floor(e.durationMs/1e3),"s audio"]}),l.jsx("label",{className:"block text-[11px] uppercase tracking-wider text-text-muted mt-4 mb-2",children:"Tags (comma-separated, applied to note only)"}),l.jsx("input",{type:"text",value:a,onChange:k=>o(k.target.value),className:"w-full bg-panel-2 border border-border rounded px-3 py-2 text-sm text-text font-mono"}),l.jsxs("div",{className:"flex gap-2 mt-4 flex-wrap",children:[l.jsxs(O,{variant:"default",onClick:j,children:[l.jsx(jr,{className:"w-4 h-4 mr-1"})," Discard"]}),l.jsxs(O,{variant:"primary",onClick:()=>void c(),className:"flex items-center",children:[l.jsx(Rh,{className:"w-4 h-4 mr-1"})," Save as note"]}),l.jsxs(O,{variant:"primary",onClick:()=>void m(),disabled:s===null,className:"flex items-center",title:s===null?"pick a project first":"extract decisions to drafts",children:[l.jsx(zh,{className:"w-4 h-4 mr-1"})," Extract decisions"]})]})]}),e.kind==="saving"&&l.jsxs("div",{className:"text-warning text-sm flex items-center gap-2",children:[l.jsx(Yt,{className:"w-4 h-4 animate-spin"})," saving..."]}),e.kind==="done"&&l.jsxs("div",{className:"text-success text-sm flex items-center gap-2 flex-col",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Mt,{className:"w-4 h-4"})," ",e.message]}),l.jsx(O,{variant:"primary",onClick:j,className:"mt-3",children:"Record another"})]}),e.kind==="error"&&l.jsxs("div",{className:"text-danger text-sm flex items-center gap-2 flex-col",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(at,{className:"w-4 h-4"})," ",e.message]}),l.jsx(O,{variant:"default",onClick:j,className:"mt-3",children:"Reset"})]})]})]}),l.jsx(Zx,{projects:n,defaultProjectId:s}),l.jsxs("div",{className:"text-text-muted text-xs mt-6",children:[l.jsxs("p",{children:["Requires a transcription provider: ",l.jsx("code",{children:"SHINOBI_TRANSCRIPTION_PROVIDER"})," in ",l.jsx(X,{to:"/settings",className:"text-accent underline",children:"Settings"})," (or canonical ",l.jsx("code",{children:"GROQ_API_KEY"})," / ",l.jsx("code",{children:"OPENAI_API_KEY"}),")."]}),l.jsx("p",{className:"mt-1",children:`Install as PWA on mobile via browser's "Add to home screen" — works offline for read-only.`})]})]})}function Zx({projects:e,defaultProjectId:t}){var y,p;const[n,r]=v.useState(null),[s,i]=v.useState(""),[a,o]=v.useState(t),[u,f]=v.useState(!1),[h,d]=v.useState(null),[x,N]=v.useState(null);v.useEffect(()=>{o(t)},[t]);async function g(){if(!n||a===null){N("pick an audio file and a project");return}f(!0),N(null),d(null);try{const c={file:n,project_id:a};s.trim()&&(c.title=s.trim());const m=await Gx(c);if(!m.ok){N(m.error??"meeting processing failed");return}d(m)}catch(c){N(c instanceof Error?c.message:String(c))}finally{f(!1)}}function w(){r(null),i(""),d(null),N(null)}return l.jsxs("div",{className:"bg-panel border border-border rounded-lg p-6 mt-6",children:[l.jsxs("h2",{className:"text-sm text-text mb-2 flex items-center gap-2",children:[l.jsx(Ah,{className:"w-4 h-4 text-accent"})," Meeting capture (upload longer audio)"]}),l.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 ",l.jsx("code",{children:"meeting"})," → decision extractor runs → review drafts on the project's Drafts tab."]}),l.jsx("label",{className:"block text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Project"}),l.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:[l.jsx("option",{value:"",children:"(pick a project — required for meetings)"}),e.map(c=>l.jsxs("option",{value:c.id,children:[c.workspace?`[${c.workspace}] `:"",c.title]},c.id))]}),l.jsx("label",{className:"block text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Title (optional)"}),l.jsx("input",{type:"text",value:s,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"}),l.jsx("label",{className:"block text-[11px] uppercase tracking-wider text-text-muted mb-2",children:"Audio file"}),l.jsx("input",{type:"file",accept:"audio/*,.mp3,.m4a,.wav,.webm,.ogg",onChange:c=>{var m;return r(((m=c.target.files)==null?void 0:m[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&&l.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&&l.jsx("span",{className:"text-warning ml-2",children:"⚠️ over 25 MB — Groq/OpenAI will reject. Pre-split with ffmpeg."})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs(O,{variant:"primary",onClick:()=>void g(),disabled:u||!n||a===null,children:[u?l.jsx(Yt,{className:"w-4 h-4 mr-1 animate-spin"}):l.jsx(Fh,{className:"w-4 h-4 mr-1"}),u?"processing...":"Process meeting"]}),(h||x)&&l.jsx(O,{variant:"default",onClick:w,children:"Reset"})]}),x&&l.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:[l.jsx(at,{className:"w-4 h-4"})," ",x]}),h&&l.jsxs("div",{className:"mt-4 px-3 py-2 rounded text-sm bg-success/20 text-success border border-success/40",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx(Mt,{className:"w-4 h-4"})," Meeting processed"]}),l.jsxs("div",{className:"text-xs text-text grid grid-cols-[8rem_1fr] gap-y-1",children:[l.jsx("div",{className:"text-text-muted",children:"title"}),l.jsx("div",{children:h.title}),l.jsx("div",{className:"text-text-muted",children:"transcript"}),l.jsxs("div",{children:[(y=h.transcript_chars)==null?void 0:y.toLocaleString()," chars · ",((p=h.audio_duration_seconds)==null?void 0:p.toFixed(0))??"?","s audio · via ",h.transcription_provider,":",h.transcription_model]}),l.jsx("div",{className:"text-text-muted",children:"drafts extracted"}),l.jsxs("div",{children:[h.drafts_extracted??0," via ",h.extractor_provider,":",h.extractor_model]}),l.jsx("div",{className:"text-text-muted",children:"note id"}),l.jsxs("div",{children:["#",h.note_id]})]}),a!==null&&l.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 qo=4e3;function qx(){const[e,t]=v.useState(null),[n,r]=v.useState(null),[s,i]=v.useState(null),a=v.useCallback(async()=>{try{const d=await ax();t(d),r(null)}catch(d){r(d instanceof Error?d.message:String(d))}},[]);v.useEffect(()=>{a();const d=setInterval(()=>void a(),qo);return()=>clearInterval(d)},[a]);async function o(d,x){i(d);try{await ox(d,x),await a()}catch(N){alert("respond failed: "+(N instanceof Error?N.message:String(N)))}finally{i(null)}}async function u(d){i(d);try{await ux(d),await a()}catch(x){alert("cancel failed: "+(x instanceof Error?x.message:String(x)))}finally{i(null)}}if(n)return l.jsxs("div",{className:"text-danger",children:["Error: ",n]});if(!e)return l.jsx("div",{className:"text-text-muted",children:"loading approvals..."});const f=e.filter(d=>d.status==="pending"),h=e.filter(d=>d.status!=="pending").slice(0,50);return l.jsxs("div",{className:"max-w-3xl",children:[l.jsxs("header",{className:"border-b border-border pb-3 mb-6 flex items-baseline justify-between",children:[l.jsx("h1",{className:"text-2xl text-text",children:"Approvals"}),l.jsxs("span",{className:"text-text-muted text-xs flex items-center gap-1",children:[l.jsx(Yt,{className:"w-3 h-3 animate-spin"}),"polling every ",qo/1e3,"s"]})]}),l.jsxs("section",{className:"mb-8",children:[l.jsxs("h2",{className:"text-sm text-text mb-3 uppercase tracking-wider text-text-muted",children:["Pending (",f.length,")"]}),f.length===0?l.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 ",l.jsx("code",{children:"request_approval"})," via MCP. They also fire web push to subscribed devices — see ",l.jsx(X,{to:"/push",className:"text-accent underline",children:"Push settings"}),"."]}):l.jsx("div",{className:"space-y-3",children:f.map(d=>l.jsxs("div",{id:`approval-${d.id}`,className:"bg-panel border border-warning/40 border-l-4 border-l-warning rounded-md p-4",children:[l.jsxs("div",{className:"flex items-baseline justify-between gap-3 mb-2",children:[l.jsxs("div",{className:"text-text-muted text-xs",children:["#",d.id,d.project_id&&l.jsxs(l.Fragment,{children:[" · project #",d.project_id]}),l.jsxs(l.Fragment,{children:[" · ",G(d.created_at)]})]}),l.jsx(le,{className:"bg-warning text-bg",children:"pending"})]}),l.jsx("div",{className:"text-text mb-3 whitespace-pre-wrap",children:d.prompt}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.options.map(x=>l.jsx(O,{variant:"primary",disabled:s===d.id,onClick:()=>void o(d.id,x),children:x},x)),l.jsx(O,{variant:"default",disabled:s===d.id,onClick:()=>void u(d.id),children:"Cancel"})]})]},d.id))})]}),l.jsxs("section",{children:[l.jsxs("h2",{className:"text-sm text-text mb-3 uppercase tracking-wider text-text-muted",children:["Recent (",h.length,")"]}),h.length===0?l.jsx("div",{className:"text-text-muted text-sm",children:"(none)"}):l.jsx("div",{className:"space-y-1.5",children:h.map(d=>l.jsxs("div",{className:"bg-panel border border-border rounded p-3 text-sm",children:[l.jsxs("div",{className:"flex items-baseline justify-between gap-3 mb-1",children:[l.jsxs("div",{className:"text-text-muted text-xs",children:["#",d.id,d.project_id&&l.jsxs(l.Fragment,{children:[" · project #",d.project_id]}),l.jsxs(l.Fragment,{children:[" · ",G(d.created_at)]})]}),d.status==="responded"?l.jsxs(le,{className:"bg-success text-bg",children:[l.jsx(Mt,{className:"w-3 h-3 inline mr-0.5"}),d.response_value]}):d.status==="expired"?l.jsx(le,{className:"bg-text-dim text-text",children:"expired"}):l.jsxs(le,{className:"bg-text-dim text-text",children:[l.jsx(at,{className:"w-3 h-3 inline mr-0.5"}),d.status]})]}),l.jsxs("div",{className:"text-text text-xs",children:[d.prompt.slice(0,200),d.prompt.length>200?"…":""]}),d.response_note&&l.jsxs("div",{className:"text-text-muted text-xs mt-1",children:["note: ",d.response_note]})]},d.id))})]})]})}function eg(e){const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),r=atob(n),s=new ArrayBuffer(r.length),i=new Uint8Array(s);for(let a=0;a<r.length;a++)i[a]=r.charCodeAt(a);return i}function tg(){const[e,t]=v.useState({kind:"loading"}),[n,r]=v.useState(null),[s,i]=v.useState(!1),a=v.useCallback(async()=>{try{const y=await sx();let p=null,c="default";const m="serviceWorker"in navigator&&"PushManager"in window;if(m){c=Notification.permission;const _=await(await navigator.serviceWorker.ready).pushManager.getSubscription();p=(_==null?void 0:_.endpoint)??null}t({kind:"ready",subscriptions:y,selfEndpoint:p,permission:c,supported:m})}catch(y){t({kind:"error",message:y instanceof Error?y.message:String(y)})}},[]);v.useEffect(()=>{a()},[a]);async function o(){if(e.kind==="ready"){i(!0);try{const{public_key:y}=await rx(),m=(await(await navigator.serviceWorker.ready).pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:eg(y)})).toJSON();await lx({endpoint:m.endpoint,keys:{p256dh:m.keys.p256dh,auth:m.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 p=await(await navigator.serviceWorker.ready).pushManager.getSubscription();if(p&&await p.unsubscribe(),e.kind==="ready"&&p){const c=e.subscriptions.find(m=>m.endpoint===p.endpoint);c&&await Ho(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 ix();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 h(y){i(!0);try{await Ho(y),await a()}catch(p){r({kind:"err",text:p instanceof Error?p.message:String(p)})}finally{i(!1)}}if(e.kind==="loading")return l.jsx("div",{className:"text-text-muted",children:"loading push state..."});if(e.kind==="error")return l.jsxs("div",{className:"text-danger",children:["Error: ",e.message]});const{subscriptions:d,selfEndpoint:x,permission:N,supported:g}=e,w=x!==null;return l.jsxs("div",{className:"max-w-3xl",children:[l.jsxs("header",{className:"border-b border-border pb-3 mb-6",children:[l.jsxs("h1",{className:"text-2xl text-text flex items-center gap-2",children:[l.jsx(Ni,{className:"w-6 h-6 text-accent"})," Push notifications"]}),l.jsxs("p",{className:"text-text-muted text-xs mt-1",children:["Subscribe this device to receive push alerts when the agent fires ",l.jsx("code",{children:"request_approval"})," from MCP. Tap action buttons in the notification to respond from anywhere."]})]}),n&&l.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"?l.jsx(Mt,{className:"w-4 h-4"}):l.jsx(at,{className:"w-4 h-4"}),n.text]}),l.jsxs("section",{className:"bg-panel border border-border rounded-lg p-5 mb-6",children:[l.jsx("h2",{className:"text-sm text-text mb-3",children:"This device"}),g?N==="denied"?l.jsxs("div",{className:"text-danger text-sm flex items-center gap-2",children:[l.jsx(Wo,{className:"w-4 h-4"})," Notifications blocked at browser level. Enable in browser settings and refresh."]}):l.jsxs("div",{className:"flex flex-wrap gap-2 items-center",children:[l.jsxs("span",{className:"text-text-muted text-sm mr-2",children:["Status: ",w?l.jsx("span",{className:"text-success",children:"subscribed"}):l.jsx("span",{className:"text-text-dim",children:"not subscribed"})]}),w?l.jsxs(O,{variant:"default",onClick:()=>void u(),disabled:s,children:[l.jsx(Wo,{className:"w-4 h-4 mr-1"})," Unsubscribe"]}):l.jsxs(O,{variant:"primary",onClick:()=>void o(),disabled:s,children:[l.jsx(Ni,{className:"w-4 h-4 mr-1"})," Subscribe this device"]}),l.jsxs(O,{variant:"default",onClick:()=>void f(),disabled:s||d.length===0,title:d.length===0?"no subscriptions to push to":"send test push to all subscribed devices",children:[l.jsx(wa,{className:"w-4 h-4 mr-1"})," Test push"]})]}):l.jsxs("div",{className:"text-warning text-sm flex items-center gap-2",children:[l.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)."]})]}),l.jsxs("section",{children:[l.jsxs("h2",{className:"text-sm text-text mb-3",children:["All subscribed devices (",d.length,")"]}),d.length===0?l.jsx("div",{className:"bg-panel border border-dashed border-border rounded p-6 text-center text-text-muted",children:"No devices subscribed yet."}):l.jsx("div",{className:"space-y-2",children:d.map(y=>l.jsxs("div",{className:"bg-panel border border-border rounded p-3 flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"text-xs flex-1 min-w-0",children:[l.jsx("div",{className:"text-text font-medium",children:y.device_label??"(unknown device)"}),l.jsxs("div",{className:"text-text-muted mt-1 font-mono break-all",children:[y.endpoint.slice(0,100),"…"]}),l.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)}`:""]})]}),l.jsx(O,{variant:"ghost",onClick:()=>void h(y.id),disabled:s,title:"remove subscription",children:l.jsx(jr,{className:"w-3 h-3"})})]},y.id))})]})]})}const ng=3e3;function rg(){const[e,t]=v.useState(null),[n,r]=v.useState(null),[s,i]=v.useState(!1),[a,o]=v.useState(null),u=v.useCallback(async()=>{try{const d=await jx();t(d),r(null)}catch(d){r(d instanceof Error?d.message:String(d))}},[]);v.useEffect(()=>{u();const d=setInterval(()=>void u(),ng);return()=>clearInterval(d)},[u]);async function f(){i(!0);try{const d=await wx();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 l.jsxs("div",{className:"text-danger",children:["Error: ",n]});if(!e)return l.jsx("div",{className:"text-text-muted",children:"loading relay status..."});const h=e.url!==null&&e.workspace!==null;return l.jsxs("div",{className:"max-w-3xl",children:[l.jsxs("header",{className:"border-b border-border pb-3 mb-6",children:[l.jsxs("h1",{className:"text-2xl text-text flex items-center gap-2",children:[l.jsx(Ld,{className:"w-6 h-6 text-accent"})," Multi-agent relay"]}),l.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 ",l.jsx("code",{children:"shinobi sync push"}),", all other connected agents auto-pull within ~1.5s. Backed by a Cloudflare Worker + Durable Object — see ",l.jsx("code",{children:"relay-worker/"}),"."]})]}),a&&l.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"?l.jsx(Mt,{className:"w-4 h-4"}):l.jsx(at,{className:"w-4 h-4"}),a.text]}),h?l.jsxs(l.Fragment,{children:[l.jsxs("section",{className:"bg-panel border border-border rounded-lg p-5 mb-4",children:[l.jsxs("div",{className:"flex items-center justify-between mb-3",children:[l.jsx("h2",{className:"text-sm text-text flex items-center gap-2",children:e.connected?l.jsxs(l.Fragment,{children:[l.jsx(Uh,{className:"w-4 h-4 text-success"}),l.jsx("span",{className:"text-success",children:"Connected"})]}):l.jsxs(l.Fragment,{children:[l.jsx(Vo,{className:"w-4 h-4 text-warning"}),l.jsx("span",{className:"text-warning",children:"Disconnected"}),e.reconnect_attempts>0&&l.jsxs("span",{className:"text-text-muted text-xs",children:["— attempt #",e.reconnect_attempts]})]})}),l.jsxs(O,{variant:"default",onClick:()=>void u(),disabled:s,children:[l.jsx(ja,{className:"w-3.5 h-3.5 mr-1"})," Refresh"]})]}),l.jsxs("dl",{className:"text-sm grid grid-cols-[10rem_1fr] gap-y-1.5",children:[l.jsx("dt",{className:"text-text-muted",children:"Agent ID"}),l.jsx("dd",{className:"text-text font-mono text-xs",children:e.agent_id}),l.jsx("dt",{className:"text-text-muted",children:"Workspace"}),l.jsx("dd",{className:"text-text font-mono text-xs",children:e.workspace}),l.jsx("dt",{className:"text-text-muted",children:"Relay URL"}),l.jsx("dd",{className:"text-text font-mono text-xs break-all",children:e.url}),l.jsx("dt",{className:"text-text-muted",children:"Last event"}),l.jsx("dd",{className:"text-text text-xs",children:e.last_event_at?l.jsxs(l.Fragment,{children:[l.jsx(le,{className:"bg-accent/20 text-accent mr-2",children:e.last_event_type}),G(e.last_event_at)]}):l.jsx("span",{className:"text-text-dim",children:"none"})}),e.last_error&&l.jsxs(l.Fragment,{children:[l.jsx("dt",{className:"text-danger",children:"Last error"}),l.jsx("dd",{className:"text-danger text-xs",children:e.last_error})]})]})]}),l.jsxs("section",{className:"bg-panel border border-border rounded-lg p-5",children:[l.jsx("h2",{className:"text-sm text-text mb-2",children:"Test broadcast"}),l.jsxs("p",{className:"text-text-muted text-xs mb-3",children:["Sends a ",l.jsx("code",{children:"sync-available"})," event to every other connected agent in this workspace. They will auto-pull the latest snapshot."]}),l.jsxs(O,{variant:"primary",onClick:()=>void f(),disabled:s||!e.connected,children:[l.jsx(wa,{className:"w-4 h-4 mr-1"})," Broadcast sync-available"]})]})]}):l.jsxs("div",{className:"bg-panel border border-dashed border-border rounded-lg p-6",children:[l.jsxs("h2",{className:"text-text mb-2 flex items-center gap-2",children:[l.jsx(Vo,{className:"w-4 h-4 text-text-muted"})," Relay not configured"]}),l.jsxs("p",{className:"text-text-muted text-sm mb-3",children:["Set ",l.jsx("code",{children:"SHINOBI_RELAY_URL"}),", ",l.jsx("code",{children:"SHINOBI_RELAY_TOKEN"}),", and ",l.jsx("code",{children:"SHINOBI_RELAY_WORKSPACE"})," in Settings to enable."]}),l.jsxs("ol",{className:"text-text-muted text-sm list-decimal pl-5 space-y-1",children:[l.jsxs("li",{children:["Deploy the Worker: ",l.jsx("code",{children:"cd relay-worker && npx wrangler deploy"})]}),l.jsxs("li",{children:["Set the secret: ",l.jsx("code",{children:"npx wrangler secret put SHINOBI_RELAY_TOKEN"})]}),l.jsxs("li",{children:["Configure each agent's ",l.jsx("code",{children:"~/.shinobi/.env"})," with matching URL/token/workspace and restart the dashboard."]})]})]})]})}function sg(){const[e,t]=v.useState(null),[n,r]=v.useState(null),[s,i]=v.useState(""),[a,o]=v.useState(!1),[u,f]=v.useState(null),[h,d]=v.useState(null),[x,N]=v.useState(null),g=v.useCallback(async()=>{try{const c=await mx();t(c),r(null)}catch(c){r(c instanceof Error?c.message:String(c))}},[]);v.useEffect(()=>{g()},[g]);async function w(){if(!s.trim()){f(null);return}o(!0);try{const c=await hx(s.trim());f(c.results)}catch(c){N({kind:"err",text:c instanceof Error?c.message:String(c)})}finally{o(!1)}}async function y(c){d(c);try{const m=await xx(c);N({kind:m.ok?"ok":"err",text:m.ok?`installed ${c} — restart dashboard to load tools`:(m.stderr||"install failed").slice(0,200)}),await g(),u&&await w()}catch(m){N({kind:"err",text:m instanceof Error?m.message:String(m)})}finally{d(null)}}async function p(c){d(c);try{const m=await gx(c);N({kind:m.ok?"ok":"err",text:m.ok?`uninstalled ${c} — restart dashboard to drop tools`:(m.stderr||"uninstall failed").slice(0,200)}),await g(),u&&await w()}catch(m){N({kind:"err",text:m instanceof Error?m.message:String(m)})}finally{d(null)}}return n?l.jsxs("div",{className:"text-danger",children:["Error: ",n]}):e?l.jsxs("div",{className:"max-w-4xl",children:[l.jsxs("header",{className:"border-b border-border pb-3 mb-6",children:[l.jsxs("h1",{className:"text-2xl text-text flex items-center gap-2",children:[l.jsx(Td,{className:"w-6 h-6 text-accent"})," Plugins"]}),l.jsxs("p",{className:"text-text-muted text-xs mt-1",children:["Extend Shinobi with community-maintained packages from npm. Install location: ",l.jsx("code",{children:e.install_prefix})]})]}),x&&l.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"?l.jsx(Mt,{className:"w-4 h-4"}):l.jsx(at,{className:"w-4 h-4"}),x.text]}),l.jsxs("section",{className:"bg-panel border border-border rounded-lg p-5 mb-6",children:[l.jsx("h2",{className:"text-sm text-text mb-3",children:"Search npm registry"}),l.jsxs("div",{className:"flex gap-2 mb-3",children:[l.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:s,onChange:c=>i(c.target.value),onKeyDown:c=>{c.key==="Enter"&&w()}}),l.jsxs(O,{variant:"primary",onClick:()=>void w(),disabled:a,children:[l.jsx(Mh,{className:"w-4 h-4 mr-1"})," Search"]})]}),u!==null&&(u.length===0?l.jsx("div",{className:"text-text-muted text-sm",children:"no matching plugins published yet"}):l.jsx("div",{className:"space-y-2",children:u.map(c=>l.jsxs("div",{className:"bg-bg border border-border rounded p-3 flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-baseline gap-2",children:[l.jsx("div",{className:"text-text font-medium",children:c.name}),l.jsxs("div",{className:"text-text-muted text-xs",children:["v",c.version,c.author?" · "+c.author:""]}),c.links.npm&&l.jsxs("a",{href:c.links.npm,target:"_blank",rel:"noreferrer",className:"text-accent text-xs hover:underline",children:["npm ",l.jsx(Ch,{className:"w-3 h-3 inline"})]})]}),l.jsx("div",{className:"text-text-muted text-xs mt-1",children:c.description||"(no description)"})]}),c.installed?l.jsxs(O,{variant:"default",onClick:()=>void p(c.name),disabled:h===c.name,children:[l.jsx(jr,{className:"w-3.5 h-3.5 mr-1"})," Uninstall"]}):l.jsxs(O,{variant:"primary",onClick:()=>void y(c.name),disabled:h===c.name,children:[l.jsx(Eh,{className:"w-3.5 h-3.5 mr-1"})," ",h===c.name?"installing…":"Install"]})]},c.name))}))]}),l.jsxs("section",{className:"mb-6",children:[l.jsxs("div",{className:"flex items-baseline justify-between mb-3",children:[l.jsxs("h2",{className:"text-sm text-text",children:["Installed (",e.installed.length,")"]}),l.jsxs("button",{onClick:()=>void g(),className:"text-[11px] uppercase tracking-wider text-accent hover:underline",children:[l.jsx(ja,{className:"w-3 h-3 inline mr-0.5"})," refresh"]})]}),e.installed.length===0?l.jsx("div",{className:"text-text-muted text-sm",children:"(no plugins installed yet)"}):l.jsx("div",{className:"space-y-2",children:e.installed.map(c=>l.jsxs("div",{className:"bg-panel border border-border rounded p-3 flex items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"text-text font-medium",children:[c.name," ",l.jsxs("span",{className:"text-text-muted text-xs",children:["v",c.version]})]}),l.jsx("div",{className:"text-text-muted text-xs",children:c.description})]}),l.jsx(O,{variant:"ghost",onClick:()=>void p(c.name),disabled:h===c.name,title:"uninstall",children:l.jsx(jr,{className:"w-3.5 h-3.5"})})]},c.name))})]}),l.jsxs("section",{children:[l.jsxs("h2",{className:"text-sm text-text mb-3",children:["Loaded at last startup (",e.loaded.length,")"]}),e.loaded.length===0?l.jsx("div",{className:"text-text-muted text-sm",children:"(none yet — install + restart dashboard)"}):l.jsx("div",{className:"space-y-2",children:e.loaded.map(c=>l.jsxs("div",{className:"bg-panel border border-border rounded p-3",children:[l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsx("div",{className:"text-text font-medium",children:c.name}),l.jsx(le,{className:c.source==="user"?"bg-warning/30 text-warning":"bg-accent/30 text-accent",children:c.source})]}),l.jsx("div",{className:"text-text-muted text-xs font-mono break-all mt-1",children:c.module_path}),c.tools_registered.length>0&&l.jsxs("div",{className:"text-text-dim text-[11px] mt-2",children:["tools: ",c.tools_registered.join(", ")]}),c.error&&l.jsxs("div",{className:"text-danger text-xs mt-2",children:["error: ",c.error]})]},c.name))})]})]}):l.jsx("div",{className:"text-text-muted",children:"loading plugins..."})}function lg(){const[e,t]=v.useState(null),[n,r]=v.useState(null),[s,i]=v.useState(!1),[a,o]=v.useState(null),u=v.useCallback(async()=>{try{t(await vx()),r(null)}catch(h){r(h instanceof Error?h.message:String(h))}},[]);v.useEffect(()=>{u()},[u]);async function f(){i(!0);try{const h=await yx();h.ok?o({kind:"ok",text:`sent ${h.sent}/${h.attempted} events to ${h.endpoint}`}):o({kind:"err",text:h.error??"flush failed"}),await u()}catch(h){o({kind:"err",text:h instanceof Error?h.message:String(h)})}finally{i(!1)}}return n?l.jsxs("div",{className:"text-danger",children:["Error: ",n]}):e?l.jsxs("div",{className:"max-w-3xl",children:[l.jsxs("header",{className:"border-b border-border pb-3 mb-6",children:[l.jsxs("h1",{className:"text-2xl text-text flex items-center gap-2",children:[l.jsx(Cd,{className:"w-6 h-6 text-accent"})," Telemetry"]}),l.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&&l.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"?l.jsx(Mt,{className:"w-4 h-4"}):l.jsx(at,{className:"w-4 h-4"}),a.text]}),l.jsxs("section",{className:"bg-panel border border-border rounded-lg p-5 mb-6",children:[l.jsx("h2",{className:"text-sm text-text mb-3",children:"Status"}),l.jsxs("dl",{className:"text-sm grid grid-cols-[12rem_1fr] gap-y-1.5",children:[l.jsx("dt",{className:"text-text-muted",children:"Recording"}),l.jsx("dd",{className:e.enabled?"text-success":"text-text-dim",children:e.enabled?"ON (SHINOBI_TELEMETRY=on)":"OFF (default)"}),l.jsx("dt",{className:"text-text-muted",children:"Endpoint"}),l.jsx("dd",{className:"text-text",children:e.endpoint_configured?"configured":l.jsx("span",{className:"text-text-dim",children:"local-only (no SHINOBI_TELEMETRY_ENDPOINT)"})}),l.jsx("dt",{className:"text-text-muted",children:"Total events"}),l.jsx("dd",{className:"text-text",children:e.total_events.toLocaleString()}),l.jsx("dt",{className:"text-text-muted",children:"Unsent"}),l.jsx("dd",{className:"text-text",children:e.unsent_events.toLocaleString()}),l.jsx("dt",{className:"text-text-muted",children:"Events last 7d"}),l.jsx("dd",{className:"text-text",children:e.last_7d_count.toLocaleString()}),l.jsx("dt",{className:"text-text-muted",children:"Last recorded"}),l.jsx("dd",{className:"text-text-muted text-xs",children:e.last_recorded_at?`${G(e.last_recorded_at)} ago`:"never"}),l.jsx("dt",{className:"text-text-muted",children:"Last sent"}),l.jsx("dd",{className:"text-text-muted text-xs",children:e.last_sent_at?`${G(e.last_sent_at)} ago`:"never"})]}),l.jsxs("div",{className:"mt-4 flex gap-2",children:[l.jsxs(O,{variant:"default",onClick:()=>void u(),children:[l.jsx(ja,{className:"w-3.5 h-3.5 mr-1"})," Refresh"]}),l.jsxs(O,{variant:"primary",onClick:()=>void f(),disabled:s||!e.endpoint_configured||e.unsent_events===0,children:[l.jsx(wa,{className:"w-3.5 h-3.5 mr-1"})," Flush unsent"]})]})]}),l.jsxs("section",{className:"mb-6",children:[l.jsx("h2",{className:"text-sm text-text mb-3",children:"Counts by event type (top 30)"}),e.by_event_type.length===0?l.jsxs("div",{className:"text-text-muted text-sm",children:["(no events recorded yet",!e.enabled&&l.jsxs(l.Fragment,{children:[" — enable in ",l.jsx(X,{to:"/settings",className:"text-accent hover:underline",children:"Settings"})," and restart the dashboard)"]})]}):l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-text-muted text-left",children:[l.jsx("th",{className:"pb-2 pr-3",children:"Event type"}),l.jsx("th",{className:"pb-2 text-right",children:"Count"})]})}),l.jsx("tbody",{children:e.by_event_type.map(h=>l.jsxs("tr",{className:"border-b border-border/40",children:[l.jsx("td",{className:"py-1.5 pr-3 text-text font-mono text-xs",children:h.event_type}),l.jsx("td",{className:"py-1.5 text-text text-right",children:h.count.toLocaleString()})]},h.event_type))})]})]}),l.jsxs("section",{className:"text-text-muted text-xs",children:[l.jsx("h2",{className:"text-text text-sm mb-2",children:"What is recorded"}),l.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[l.jsxs("li",{children:[l.jsx("code",{children:"tool_called"})," — MCP tool name + ok flag"]}),l.jsxs("li",{children:[l.jsx("code",{children:"view_hit"})," — dashboard route bucket (e.g. ",l.jsx("code",{children:"/projects/:tab"}),") + HTTP status. Project IDs are stripped."]})]}),l.jsx("h2",{className:"text-text text-sm mt-4 mb-2",children:"What is NEVER recorded"}),l.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[l.jsx("li",{children:"Project titles, task titles, decision bodies, notes, plans, prompts, model output, code snippets, file paths."}),l.jsx("li",{children:"IP addresses, usernames, machine IDs."}),l.jsxs("li",{children:["The contents of ",l.jsx("code",{children:"~/.shinobi/.env"}),", API keys, or any setting value."]})]})]})]}):l.jsx("div",{className:"text-text-muted",children:"loading telemetry..."})}function ig(){return l.jsxs("div",{className:"text-center py-16",children:[l.jsx("div",{className:"text-6xl mb-4",children:"🥷"}),l.jsx("h1",{className:"text-2xl text-text mb-2",children:"Not found"}),l.jsx("p",{className:"text-text-muted mb-4",children:"The page you're looking for doesn't exist."}),l.jsx(X,{to:"/",className:"text-accent hover:underline",children:"← Back to home"})]})}function ag(){return l.jsx(fh,{children:l.jsx(sh,{children:l.jsxs(W,{element:l.jsx(kx,{}),children:[l.jsx(W,{path:"/",element:l.jsx(_x,{})}),l.jsx(W,{path:"/settings",element:l.jsx(Hx,{})}),l.jsx(W,{path:"/voice",element:l.jsx(Jx,{})}),l.jsx(W,{path:"/approvals",element:l.jsx(qx,{})}),l.jsx(W,{path:"/push",element:l.jsx(tg,{})}),l.jsx(W,{path:"/relay",element:l.jsx(rg,{})}),l.jsx(W,{path:"/plugins",element:l.jsx(sg,{})}),l.jsx(W,{path:"/telemetry",element:l.jsx(lg,{})}),l.jsx(W,{path:"/sessions",element:l.jsx(Bx,{})}),l.jsx(W,{path:"/sessions/:sessionId",element:l.jsx(Wx,{})}),l.jsxs(W,{path:"/projects/:id",element:l.jsx(Ex,{}),children:[l.jsx(W,{index:!0,element:l.jsx(Px,{})}),l.jsx(W,{path:"subtasks",element:l.jsx(Tx,{})}),l.jsx(W,{path:"decisions",element:l.jsx(Mx,{})}),l.jsx(W,{path:"decision-drafts",element:l.jsx(Ox,{})}),l.jsx(W,{path:"dead-ends",element:l.jsx(zx,{})}),l.jsx(W,{path:"notes",element:l.jsx(Ix,{})}),l.jsx(W,{path:"plans",element:l.jsx(Dx,{})}),l.jsx(W,{path:"context",element:l.jsx($x,{})}),l.jsx(W,{path:"sessions",element:l.jsx(Ux,{})}),l.jsx(W,{path:"timeline",element:l.jsx(Fx,{})}),l.jsx(W,{path:"analytics",element:l.jsx(Ax,{})})]}),l.jsx(W,{path:"*",element:l.jsx(ig,{})})]})})})}fd(document.getElementById("root")).render(l.jsx(v.StrictMode,{children:l.jsx(ag,{})}));
263
- //# sourceMappingURL=index-Rnhs9802.js.map