teleton 0.8.4 → 0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -17
- package/dist/{bootstrap-NNEI3Z5H.js → bootstrap-PFBH6ALD.js} +11 -8
- package/dist/bridge-guards-HZTNH7IB.js +9 -0
- package/dist/{chunk-NH2CNRKJ.js → chunk-2UUGRY5B.js} +151 -159
- package/dist/{chunk-UMUONAD6.js → chunk-4MFN75ZK.js} +5941 -2716
- package/dist/{chunk-LC4TV3KL.js → chunk-4MG2AROG.js} +5 -7
- package/dist/{chunk-LZQOX6YY.js → chunk-6IFNQWIM.js} +7714 -8748
- package/dist/chunk-7KI25UJU.js +215 -0
- package/dist/chunk-AX5NBEHX.js +12 -0
- package/dist/{chunk-5LOHRZYY.js → chunk-BLUES3FJ.js} +80 -101
- package/dist/{chunk-CUE4UZXR.js → chunk-BT2I3ETV.js} +3 -3
- package/dist/chunk-CXTZPOTA.js +107 -0
- package/dist/{chunk-LVTKJQ7O.js → chunk-D3GT6YIY.js} +59 -7
- package/dist/chunk-EKCXKL5M.js +53 -0
- package/dist/{chunk-XDZDOKIF.js → chunk-F6S3L3OV.js} +3 -3
- package/dist/{chunk-C4NKJT2Z.js → chunk-J4WDJ7XS.js} +1 -1
- package/dist/{chunk-G7PCW63M.js → chunk-JYF2MM5I.js} +147 -113
- package/dist/{chunk-NVKBBTI6.js → chunk-K3QSIIMZ.js} +9 -6
- package/dist/{chunk-EYWNOHMJ.js → chunk-L653KKCR.js} +1 -0
- package/dist/chunk-OMQIAWEU.js +273 -0
- package/dist/chunk-PCT7GYBP.js +274 -0
- package/dist/chunk-QYZBWU2D.js +139 -0
- package/dist/{chunk-WTDAICGT.js → chunk-R6W4DJRK.js} +7 -7
- package/dist/{chunk-5SEMA47R.js → chunk-RILOEIK6.js} +1 -1
- package/dist/{chunk-6OOHHJ4N.js → chunk-TFTNZZDH.js} +20 -20
- package/dist/chunk-TTOZCZWE.js +96 -0
- package/dist/chunk-UJ54YT2T.js +12 -0
- package/dist/{chunk-GHMXWAXI.js → chunk-ULVL2W3D.js} +211 -445
- package/dist/{chunk-NQ6FZKCE.js → chunk-V3S3NXBQ.js} +3 -1
- package/dist/{chunk-H7MFXJZK.js → chunk-WSL4KIOI.js} +31 -26
- package/dist/{chunk-35MX4ZUI.js → chunk-Z5WY7BSB.js} +5 -5
- package/dist/{chunk-ALKAAG4O.js → chunk-ZGKE3OTA.js} +112 -49
- package/dist/{chunk-JROBTXWY.js → chunk-ZHRDETCX.js} +38 -4
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +272 -159
- package/dist/{client-5KD25NOP.js → client-S5UIK6OG.js} +10 -8
- package/dist/daily-logs-3WXGYAQF.js +25 -0
- package/dist/{get-my-gifts-Y7EN7RK4.js → get-my-gifts-3YSYM3LI.js} +3 -2
- package/dist/harden-permissions-PV5SGV5D.js +100 -0
- package/dist/index.d.ts +923 -0
- package/dist/index.js +29 -20
- package/dist/knowledge-RRWUIO3G.js +19 -0
- package/dist/{local-IHKJFQJS.js → local-MSZAXWUL.js} +3 -3
- package/dist/mcp-loader-OELDFR63.js +15 -0
- package/dist/{memory-QMJRM3XJ.js → memory-6U6HGRK2.js} +23 -12
- package/dist/memory-hook-T7Y235KY.js +19 -0
- package/dist/messages-KV5ADNJB.js +17 -0
- package/dist/{migrate-5VBAP52B.js → migrate-AX3HOKOO.js} +10 -7
- package/dist/{paths-XA2RJH4S.js → paths-WMVV7ZAJ.js} +1 -1
- package/dist/{server-WWGVDFPW.js → server-MFRYOGHR.js} +21 -23
- package/dist/{server-AJCOURH7.js → server-SFLCAZFR.js} +221 -27
- package/dist/{setup-server-VDY64CWW.js → setup-server-YWAPKZVE.js} +26 -26
- package/dist/{store-BY7S6IFN.js → store-PGHQASBC.js} +11 -8
- package/dist/{task-dependency-resolver-L6UUMTHK.js → task-dependency-resolver-YQKADDEU.js} +24 -10
- package/dist/{task-executor-XBNJLUCS.js → task-executor-LWAWD225.js} +4 -4
- package/dist/{tool-adapter-IVX2XQJE.js → tool-adapter-VKLUZSQS.js} +1 -1
- package/dist/{tool-index-FTERJSZK.js → tool-index-YEWDF5CK.js} +5 -5
- package/dist/{transcript-IM7G25OS.js → transcript-4Y3Z2BJ3.js} +3 -3
- package/dist/web/assets/Config-MNxA69ib.js +1 -0
- package/dist/web/assets/Conversations-Dk958paA.js +1 -0
- package/dist/web/assets/Dashboard-dM18fGOm.js +1 -0
- package/dist/web/assets/Hooks-D2griQnI.js +1 -0
- package/dist/web/assets/Mcp-CtWNzwsz.js +1 -0
- package/dist/web/assets/Memory-CfLwH45G.js +1 -0
- package/dist/web/assets/Plugins-3hoJprFo.js +1 -0
- package/dist/web/assets/SearchInput-CpcETdpE.js +1 -0
- package/dist/web/assets/Soul-BSxE73aK.js +1 -0
- package/dist/web/assets/Tasks-DkCkfu3A.js +1 -0
- package/dist/web/assets/TelegramSettingsPanel-BRzc5G6e.js +1 -0
- package/dist/web/assets/Tools-Du8B8Mb4.js +1 -0
- package/dist/web/assets/Wallet-BLILP2Gn.js +1 -0
- package/dist/web/assets/Workspace-qklcXpXV.js +1 -0
- package/dist/web/assets/index-BwEPTTKp.js +90 -0
- package/dist/web/assets/index-noejUsK7.css +1 -0
- package/dist/web/assets/{index.es-DitvF-9H.js → index.es-DdpKlnGb.js} +1 -1
- package/dist/web/assets/useToolManager-tdxkKn3H.js +1 -0
- package/dist/web/assets/utils-CnsbSMo4.js +1 -0
- package/dist/web/index.html +2 -2
- package/package.json +7 -12
- package/src/templates/HEARTBEAT.md +5 -0
- package/dist/memory-hook-VUNWZ3NY.js +0 -19
- package/dist/web/assets/index-BfYCdwLI.js +0 -80
- package/dist/web/assets/index-DmlyQVhR.css +0 -1
- package/dist/{chunk-WFTC3JJW.js → chunk-3NO7QU7W.js} +1 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-dM18fGOm.js","assets/TelegramSettingsPanel-BRzc5G6e.js","assets/Tools-Du8B8Mb4.js","assets/useToolManager-tdxkKn3H.js","assets/SearchInput-CpcETdpE.js","assets/Plugins-3hoJprFo.js","assets/Memory-CfLwH45G.js","assets/utils-CnsbSMo4.js","assets/Workspace-qklcXpXV.js","assets/Tasks-DkCkfu3A.js","assets/Config-MNxA69ib.js","assets/Conversations-Dk958paA.js","assets/Wallet-BLILP2Gn.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var hp=Object.defineProperty;var mp=(l,a,u)=>a in l?hp(l,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):l[a]=u;var Rt=(l,a,u)=>mp(l,typeof a!="symbol"?a+"":a,u);function gp(l,a){for(var u=0;u<a.length;u++){const d=a[u];if(typeof d!="string"&&!Array.isArray(d)){for(const m in d)if(m!=="default"&&!(m in l)){const g=Object.getOwnPropertyDescriptor(d,m);g&&Object.defineProperty(l,m,g.get?g:{enumerable:!0,get:()=>d[m]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))d(m);new MutationObserver(m=>{for(const g of m)if(g.type==="childList")for(const j of g.addedNodes)j.tagName==="LINK"&&j.rel==="modulepreload"&&d(j)}).observe(document,{childList:!0,subtree:!0});function u(m){const g={};return m.integrity&&(g.integrity=m.integrity),m.referrerPolicy&&(g.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?g.credentials="include":m.crossOrigin==="anonymous"?g.credentials="omit":g.credentials="same-origin",g}function d(m){if(m.ep)return;m.ep=!0;const g=u(m);fetch(m.href,g)}})();function vp(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var bi={exports:{}},Dr={},qi={exports:{}},ae={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react.production.min.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var mc;function yp(){if(mc)return ae;mc=1;var l=Symbol.for("react.element"),a=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),j=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),y=Symbol.iterator;function k(P){return P===null||typeof P!="object"?null:(P=y&&P[y]||P["@@iterator"],typeof P=="function"?P:null)}var I={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},L=Object.assign,N={};function E(P,O,ie){this.props=P,this.context=O,this.refs=N,this.updater=ie||I}E.prototype.isReactComponent={},E.prototype.setState=function(P,O){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,O,"setState")},E.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function W(){}W.prototype=E.prototype;function Y(P,O,ie){this.props=P,this.context=O,this.refs=N,this.updater=ie||I}var U=Y.prototype=new W;U.constructor=Y,L(U,E.prototype),U.isPureReactComponent=!0;var F=Array.isArray,X=Object.prototype.hasOwnProperty,te={current:null},we={key:!0,ref:!0,__self:!0,__source:!0};function me(P,O,ie){var se,de={},fe=null,Se=null;if(O!=null)for(se in O.ref!==void 0&&(Se=O.ref),O.key!==void 0&&(fe=""+O.key),O)X.call(O,se)&&!we.hasOwnProperty(se)&&(de[se]=O[se]);var ye=arguments.length-2;if(ye===1)de.children=ie;else if(1<ye){for(var Ne=Array(ye),st=0;st<ye;st++)Ne[st]=arguments[st+2];de.children=Ne}if(P&&P.defaultProps)for(se in ye=P.defaultProps,ye)de[se]===void 0&&(de[se]=ye[se]);return{$$typeof:l,type:P,key:fe,ref:Se,props:de,_owner:te.current}}function q(P,O){return{$$typeof:l,type:P.type,key:O,ref:P.ref,props:P.props,_owner:P._owner}}function Ie(P){return typeof P=="object"&&P!==null&&P.$$typeof===l}function Ee(P){var O={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(ie){return O[ie]})}var le=/\/+/g;function $(P,O){return typeof P=="object"&&P!==null&&P.key!=null?Ee(""+P.key):O.toString(36)}function ve(P,O,ie,se,de){var fe=typeof P;(fe==="undefined"||fe==="boolean")&&(P=null);var Se=!1;if(P===null)Se=!0;else switch(fe){case"string":case"number":Se=!0;break;case"object":switch(P.$$typeof){case l:case a:Se=!0}}if(Se)return Se=P,de=de(Se),P=se===""?"."+$(Se,0):se,F(de)?(ie="",P!=null&&(ie=P.replace(le,"$&/")+"/"),ve(de,O,ie,"",function(st){return st})):de!=null&&(Ie(de)&&(de=q(de,ie+(!de.key||Se&&Se.key===de.key?"":(""+de.key).replace(le,"$&/")+"/")+P)),O.push(de)),1;if(Se=0,se=se===""?".":se+":",F(P))for(var ye=0;ye<P.length;ye++){fe=P[ye];var Ne=se+$(fe,ye);Se+=ve(fe,O,ie,Ne,de)}else if(Ne=k(P),typeof Ne=="function")for(P=Ne.call(P),ye=0;!(fe=P.next()).done;)fe=fe.value,Ne=se+$(fe,ye++),Se+=ve(fe,O,ie,Ne,de);else if(fe==="object")throw O=String(P),Error("Objects are not valid as a React child (found: "+(O==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":O)+"). If you meant to render a collection of children, use an array instead.");return Se}function ge(P,O,ie){if(P==null)return P;var se=[],de=0;return ve(P,se,"","",function(fe){return O.call(ie,fe,de++)}),se}function ze(P){if(P._status===-1){var O=P._result;O=O(),O.then(function(ie){(P._status===0||P._status===-1)&&(P._status=1,P._result=ie)},function(ie){(P._status===0||P._status===-1)&&(P._status=2,P._result=ie)}),P._status===-1&&(P._status=0,P._result=O)}if(P._status===1)return P._result.default;throw P._result}var V={current:null},M={transition:null},b={ReactCurrentDispatcher:V,ReactCurrentBatchConfig:M,ReactCurrentOwner:te};function H(){throw Error("act(...) is not supported in production builds of React.")}return ae.Children={map:ge,forEach:function(P,O,ie){ge(P,function(){O.apply(this,arguments)},ie)},count:function(P){var O=0;return ge(P,function(){O++}),O},toArray:function(P){return ge(P,function(O){return O})||[]},only:function(P){if(!Ie(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},ae.Component=E,ae.Fragment=u,ae.Profiler=m,ae.PureComponent=Y,ae.StrictMode=d,ae.Suspense=f,ae.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=b,ae.act=H,ae.cloneElement=function(P,O,ie){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var se=L({},P.props),de=P.key,fe=P.ref,Se=P._owner;if(O!=null){if(O.ref!==void 0&&(fe=O.ref,Se=te.current),O.key!==void 0&&(de=""+O.key),P.type&&P.type.defaultProps)var ye=P.type.defaultProps;for(Ne in O)X.call(O,Ne)&&!we.hasOwnProperty(Ne)&&(se[Ne]=O[Ne]===void 0&&ye!==void 0?ye[Ne]:O[Ne])}var Ne=arguments.length-2;if(Ne===1)se.children=ie;else if(1<Ne){ye=Array(Ne);for(var st=0;st<Ne;st++)ye[st]=arguments[st+2];se.children=ye}return{$$typeof:l,type:P.type,key:de,ref:fe,props:se,_owner:Se}},ae.createContext=function(P){return P={$$typeof:j,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},P.Provider={$$typeof:g,_context:P},P.Consumer=P},ae.createElement=me,ae.createFactory=function(P){var O=me.bind(null,P);return O.type=P,O},ae.createRef=function(){return{current:null}},ae.forwardRef=function(P){return{$$typeof:C,render:P}},ae.isValidElement=Ie,ae.lazy=function(P){return{$$typeof:h,_payload:{_status:-1,_result:P},_init:ze}},ae.memo=function(P,O){return{$$typeof:p,type:P,compare:O===void 0?null:O}},ae.startTransition=function(P){var O=M.transition;M.transition={};try{P()}finally{M.transition=O}},ae.unstable_act=H,ae.useCallback=function(P,O){return V.current.useCallback(P,O)},ae.useContext=function(P){return V.current.useContext(P)},ae.useDebugValue=function(){},ae.useDeferredValue=function(P){return V.current.useDeferredValue(P)},ae.useEffect=function(P,O){return V.current.useEffect(P,O)},ae.useId=function(){return V.current.useId()},ae.useImperativeHandle=function(P,O,ie){return V.current.useImperativeHandle(P,O,ie)},ae.useInsertionEffect=function(P,O){return V.current.useInsertionEffect(P,O)},ae.useLayoutEffect=function(P,O){return V.current.useLayoutEffect(P,O)},ae.useMemo=function(P,O){return V.current.useMemo(P,O)},ae.useReducer=function(P,O,ie){return V.current.useReducer(P,O,ie)},ae.useRef=function(P){return V.current.useRef(P)},ae.useState=function(P){return V.current.useState(P)},ae.useSyncExternalStore=function(P,O,ie){return V.current.useSyncExternalStore(P,O,ie)},ae.useTransition=function(){return V.current.useTransition()},ae.version="18.3.1",ae}var gc;function ds(){return gc||(gc=1,qi.exports=yp()),qi.exports}/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react-jsx-runtime.production.min.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var vc;function xp(){if(vc)return Dr;vc=1;var l=ds(),a=Symbol.for("react.element"),u=Symbol.for("react.fragment"),d=Object.prototype.hasOwnProperty,m=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,g={key:!0,ref:!0,__self:!0,__source:!0};function j(C,f,p){var h,y={},k=null,I=null;p!==void 0&&(k=""+p),f.key!==void 0&&(k=""+f.key),f.ref!==void 0&&(I=f.ref);for(h in f)d.call(f,h)&&!g.hasOwnProperty(h)&&(y[h]=f[h]);if(C&&C.defaultProps)for(h in f=C.defaultProps,f)y[h]===void 0&&(y[h]=f[h]);return{$$typeof:a,type:C,key:k,ref:I,props:y,_owner:m.current}}return Dr.Fragment=u,Dr.jsx=j,Dr.jsxs=j,Dr}var yc;function wp(){return yc||(yc=1,bi.exports=xp()),bi.exports}var s=wp(),w=ds();const he=vp(w),Sp=gp({__proto__:null,default:he},[w]);var ql={},Zi={exports:{}},it={},es={exports:{}},ts={};/**
|
|
19
|
+
* @license React
|
|
20
|
+
* scheduler.production.min.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var xc;function kp(){return xc||(xc=1,(function(l){function a(M,b){var H=M.length;M.push(b);e:for(;0<H;){var P=H-1>>>1,O=M[P];if(0<m(O,b))M[P]=b,M[H]=O,H=P;else break e}}function u(M){return M.length===0?null:M[0]}function d(M){if(M.length===0)return null;var b=M[0],H=M.pop();if(H!==b){M[0]=H;e:for(var P=0,O=M.length,ie=O>>>1;P<ie;){var se=2*(P+1)-1,de=M[se],fe=se+1,Se=M[fe];if(0>m(de,H))fe<O&&0>m(Se,de)?(M[P]=Se,M[fe]=H,P=fe):(M[P]=de,M[se]=H,P=se);else if(fe<O&&0>m(Se,H))M[P]=Se,M[fe]=H,P=fe;else break e}}return b}function m(M,b){var H=M.sortIndex-b.sortIndex;return H!==0?H:M.id-b.id}if(typeof performance=="object"&&typeof performance.now=="function"){var g=performance;l.unstable_now=function(){return g.now()}}else{var j=Date,C=j.now();l.unstable_now=function(){return j.now()-C}}var f=[],p=[],h=1,y=null,k=3,I=!1,L=!1,N=!1,E=typeof setTimeout=="function"?setTimeout:null,W=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function U(M){for(var b=u(p);b!==null;){if(b.callback===null)d(p);else if(b.startTime<=M)d(p),b.sortIndex=b.expirationTime,a(f,b);else break;b=u(p)}}function F(M){if(N=!1,U(M),!L)if(u(f)!==null)L=!0,ze(X);else{var b=u(p);b!==null&&V(F,b.startTime-M)}}function X(M,b){L=!1,N&&(N=!1,W(me),me=-1),I=!0;var H=k;try{for(U(b),y=u(f);y!==null&&(!(y.expirationTime>b)||M&&!Ee());){var P=y.callback;if(typeof P=="function"){y.callback=null,k=y.priorityLevel;var O=P(y.expirationTime<=b);b=l.unstable_now(),typeof O=="function"?y.callback=O:y===u(f)&&d(f),U(b)}else d(f);y=u(f)}if(y!==null)var ie=!0;else{var se=u(p);se!==null&&V(F,se.startTime-b),ie=!1}return ie}finally{y=null,k=H,I=!1}}var te=!1,we=null,me=-1,q=5,Ie=-1;function Ee(){return!(l.unstable_now()-Ie<q)}function le(){if(we!==null){var M=l.unstable_now();Ie=M;var b=!0;try{b=we(!0,M)}finally{b?$():(te=!1,we=null)}}else te=!1}var $;if(typeof Y=="function")$=function(){Y(le)};else if(typeof MessageChannel<"u"){var ve=new MessageChannel,ge=ve.port2;ve.port1.onmessage=le,$=function(){ge.postMessage(null)}}else $=function(){E(le,0)};function ze(M){we=M,te||(te=!0,$())}function V(M,b){me=E(function(){M(l.unstable_now())},b)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(M){M.callback=null},l.unstable_continueExecution=function(){L||I||(L=!0,ze(X))},l.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<M?Math.floor(1e3/M):5},l.unstable_getCurrentPriorityLevel=function(){return k},l.unstable_getFirstCallbackNode=function(){return u(f)},l.unstable_next=function(M){switch(k){case 1:case 2:case 3:var b=3;break;default:b=k}var H=k;k=b;try{return M()}finally{k=H}},l.unstable_pauseExecution=function(){},l.unstable_requestPaint=function(){},l.unstable_runWithPriority=function(M,b){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var H=k;k=M;try{return b()}finally{k=H}},l.unstable_scheduleCallback=function(M,b,H){var P=l.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?P+H:P):H=P,M){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=H+O,M={id:h++,callback:b,priorityLevel:M,startTime:H,expirationTime:O,sortIndex:-1},H>P?(M.sortIndex=H,a(p,M),u(f)===null&&M===u(p)&&(N?(W(me),me=-1):N=!0,V(F,H-P))):(M.sortIndex=O,a(f,M),L||I||(L=!0,ze(X))),M},l.unstable_shouldYield=Ee,l.unstable_wrapCallback=function(M){var b=k;return function(){var H=k;k=b;try{return M.apply(this,arguments)}finally{k=H}}}})(ts)),ts}var wc;function Ep(){return wc||(wc=1,es.exports=kp()),es.exports}/**
|
|
27
|
+
* @license React
|
|
28
|
+
* react-dom.production.min.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var Sc;function jp(){if(Sc)return it;Sc=1;var l=ds(),a=Ep();function u(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 d=new Set,m={};function g(e,t){j(e,t),j(e+"Capture",t)}function j(e,t){for(m[e]=t,e=0;e<t.length;e++)d.add(t[e])}var C=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,p=/^[: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]*$/,h={},y={};function k(e){return f.call(y,e)?!0:f.call(h,e)?!1:p.test(e)?y[e]=!0:(h[e]=!0,!1)}function I(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 L(e,t,n,r){if(t===null||typeof t>"u"||I(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 N(e,t,n,r,o,i,c){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=c}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){E[e]=new N(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];E[t]=new N(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){E[e]=new N(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){E[e]=new N(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){E[e]=new N(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){E[e]=new N(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){E[e]=new N(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){E[e]=new N(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){E[e]=new N(e,5,!1,e.toLowerCase(),null,!1,!1)});var W=/[\-:]([a-z])/g;function Y(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(W,Y);E[t]=new N(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(W,Y);E[t]=new N(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(W,Y);E[t]=new N(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){E[e]=new N(e,1,!1,e.toLowerCase(),null,!1,!1)}),E.xlinkHref=new N("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){E[e]=new N(e,1,!1,e.toLowerCase(),null,!0,!0)});function U(e,t,n,r){var o=E.hasOwnProperty(t)?E[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(L(t,n,o,r)&&(n=null),r||o===null?k(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var F=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,X=Symbol.for("react.element"),te=Symbol.for("react.portal"),we=Symbol.for("react.fragment"),me=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),Ie=Symbol.for("react.provider"),Ee=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),ve=Symbol.for("react.suspense_list"),ge=Symbol.for("react.memo"),ze=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),M=Symbol.iterator;function b(e){return e===null||typeof e!="object"?null:(e=M&&e[M]||e["@@iterator"],typeof e=="function"?e:null)}var H=Object.assign,P;function O(e){if(P===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);P=t&&t[1]||""}return`
|
|
35
|
+
`+P+e}var ie=!1;function se(e,t){if(!e||ie)return"";ie=!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(R){var r=R}Reflect.construct(e,[],t)}else{try{t.call()}catch(R){r=R}e.call(t.prototype)}else{try{throw Error()}catch(R){r=R}e()}}catch(R){if(R&&r&&typeof R.stack=="string"){for(var o=R.stack.split(`
|
|
36
|
+
`),i=r.stack.split(`
|
|
37
|
+
`),c=o.length-1,v=i.length-1;1<=c&&0<=v&&o[c]!==i[v];)v--;for(;1<=c&&0<=v;c--,v--)if(o[c]!==i[v]){if(c!==1||v!==1)do if(c--,v--,0>v||o[c]!==i[v]){var x=`
|
|
38
|
+
`+o[c].replace(" at new "," at ");return e.displayName&&x.includes("<anonymous>")&&(x=x.replace("<anonymous>",e.displayName)),x}while(1<=c&&0<=v);break}}}finally{ie=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?O(e):""}function de(e){switch(e.tag){case 5:return O(e.type);case 16:return O("Lazy");case 13:return O("Suspense");case 19:return O("SuspenseList");case 0:case 2:case 15:return e=se(e.type,!1),e;case 11:return e=se(e.type.render,!1),e;case 1:return e=se(e.type,!0),e;default:return""}}function fe(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 we:return"Fragment";case te:return"Portal";case q:return"Profiler";case me:return"StrictMode";case $:return"Suspense";case ve:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ee:return(e.displayName||"Context")+".Consumer";case Ie:return(e._context.displayName||"Context")+".Provider";case le:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ge:return t=e.displayName||null,t!==null?t:fe(e.type)||"Memo";case ze:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}function Se(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 fe(t);case 8:return t===me?"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 ye(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ne(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function st(e){var t=Ne(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 o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(c){r=""+c,i.call(this,c)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(c){r=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $r(e){e._valueTracker||(e._valueTracker=st(e))}function Ss(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ne(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Vr(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 ro(e,t){var n=t.checked;return H({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ks(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ye(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 Es(e,t){t=t.checked,t!=null&&U(e,"checked",t,!1)}function lo(e,t){Es(e,t);var n=ye(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")?oo(e,t.type,n):t.hasOwnProperty("defaultValue")&&oo(e,t.type,ye(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function js(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 oo(e,t,n){(t!=="number"||Vr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var qn=Array.isArray;function jn(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ye(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function io(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(u(91));return H({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Cs(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(u(92));if(qn(n)){if(1<n.length)throw Error(u(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ye(n)}}function Ns(e,t){var n=ye(t.value),r=ye(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 Ps(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function _s(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 so(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?_s(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Hr,Ts=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Hr=Hr||document.createElement("div"),Hr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Hr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Zn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var er={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},vd=["Webkit","ms","Moz","O"];Object.keys(er).forEach(function(e){vd.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),er[t]=er[e]})});function Rs(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||er.hasOwnProperty(e)&&er[e]?(""+t).trim():t+"px"}function Ls(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Rs(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var yd=H({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 ao(e,t){if(t){if(yd[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(u(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(u(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(u(61))}if(t.style!=null&&typeof t.style!="object")throw Error(u(62))}}function uo(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 co=null;function fo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var po=null,Cn=null,Nn=null;function Is(e){if(e=kr(e)){if(typeof po!="function")throw Error(u(280));var t=e.stateNode;t&&(t=pl(t),po(e.stateNode,e.type,t))}}function Ms(e){Cn?Nn?Nn.push(e):Nn=[e]:Cn=e}function Os(){if(Cn){var e=Cn,t=Nn;if(Nn=Cn=null,Is(e),t)for(e=0;e<t.length;e++)Is(t[e])}}function As(e,t){return e(t)}function zs(){}var ho=!1;function Ds(e,t,n){if(ho)return e(t,n);ho=!0;try{return As(e,t,n)}finally{ho=!1,(Cn!==null||Nn!==null)&&(zs(),Os())}}function tr(e,t){var n=e.stateNode;if(n===null)return null;var r=pl(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(u(231,t,typeof n));return n}var mo=!1;if(C)try{var nr={};Object.defineProperty(nr,"passive",{get:function(){mo=!0}}),window.addEventListener("test",nr,nr),window.removeEventListener("test",nr,nr)}catch{mo=!1}function xd(e,t,n,r,o,i,c,v,x){var R=Array.prototype.slice.call(arguments,3);try{t.apply(n,R)}catch(z){this.onError(z)}}var rr=!1,Qr=null,Kr=!1,go=null,wd={onError:function(e){rr=!0,Qr=e}};function Sd(e,t,n,r,o,i,c,v,x){rr=!1,Qr=null,xd.apply(wd,arguments)}function kd(e,t,n,r,o,i,c,v,x){if(Sd.apply(this,arguments),rr){if(rr){var R=Qr;rr=!1,Qr=null}else throw Error(u(198));Kr||(Kr=!0,go=R)}}function un(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Us(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 Bs(e){if(un(e)!==e)throw Error(u(188))}function Ed(e){var t=e.alternate;if(!t){if(t=un(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Bs(o),e;if(i===r)return Bs(o),t;i=i.sibling}throw Error(u(188))}if(n.return!==r.return)n=o,r=i;else{for(var c=!1,v=o.child;v;){if(v===n){c=!0,n=o,r=i;break}if(v===r){c=!0,r=o,n=i;break}v=v.sibling}if(!c){for(v=i.child;v;){if(v===n){c=!0,n=i,r=o;break}if(v===r){c=!0,r=i,n=o;break}v=v.sibling}if(!c)throw Error(u(189))}}if(n.alternate!==r)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function Fs(e){return e=Ed(e),e!==null?Ws(e):null}function Ws(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ws(e);if(t!==null)return t;e=e.sibling}return null}var $s=a.unstable_scheduleCallback,Vs=a.unstable_cancelCallback,jd=a.unstable_shouldYield,Cd=a.unstable_requestPaint,Me=a.unstable_now,Nd=a.unstable_getCurrentPriorityLevel,vo=a.unstable_ImmediatePriority,Hs=a.unstable_UserBlockingPriority,Yr=a.unstable_NormalPriority,Pd=a.unstable_LowPriority,Qs=a.unstable_IdlePriority,Jr=null,Ct=null;function _d(e){if(Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(Jr,e,void 0,(e.current.flags&128)===128)}catch{}}var yt=Math.clz32?Math.clz32:Ld,Td=Math.log,Rd=Math.LN2;function Ld(e){return e>>>=0,e===0?32:31-(Td(e)/Rd|0)|0}var Gr=64,Xr=4194304;function lr(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 br(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,c=n&268435455;if(c!==0){var v=c&~o;v!==0?r=lr(v):(i&=c,i!==0&&(r=lr(i)))}else c=n&~o,c!==0?r=lr(c):i!==0&&(r=lr(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-yt(t),o=1<<n,r|=e[n],t&=~o;return r}function Id(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 Md(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var c=31-yt(i),v=1<<c,x=o[c];x===-1?((v&n)===0||(v&r)!==0)&&(o[c]=Id(v,t)):x<=t&&(e.expiredLanes|=v),i&=~v}}function yo(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Ks(){var e=Gr;return Gr<<=1,(Gr&4194240)===0&&(Gr=64),e}function xo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function or(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-yt(t),e[t]=n}function Od(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-yt(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function wo(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-yt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var xe=0;function Ys(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Js,So,Gs,Xs,bs,ko=!1,qr=[],Ft=null,Wt=null,$t=null,ir=new Map,sr=new Map,Vt=[],Ad="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 qs(e,t){switch(e){case"focusin":case"focusout":Ft=null;break;case"dragenter":case"dragleave":Wt=null;break;case"mouseover":case"mouseout":$t=null;break;case"pointerover":case"pointerout":ir.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":sr.delete(t.pointerId)}}function ar(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=kr(t),t!==null&&So(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function zd(e,t,n,r,o){switch(t){case"focusin":return Ft=ar(Ft,e,t,n,r,o),!0;case"dragenter":return Wt=ar(Wt,e,t,n,r,o),!0;case"mouseover":return $t=ar($t,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return ir.set(i,ar(ir.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,sr.set(i,ar(sr.get(i)||null,e,t,n,r,o)),!0}return!1}function Zs(e){var t=cn(e.target);if(t!==null){var n=un(t);if(n!==null){if(t=n.tag,t===13){if(t=Us(n),t!==null){e.blockedOn=t,bs(e.priority,function(){Gs(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 Zr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=jo(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);co=r,n.target.dispatchEvent(r),co=null}else return t=kr(n),t!==null&&So(t),e.blockedOn=n,!1;t.shift()}return!0}function ea(e,t,n){Zr(e)&&n.delete(t)}function Dd(){ko=!1,Ft!==null&&Zr(Ft)&&(Ft=null),Wt!==null&&Zr(Wt)&&(Wt=null),$t!==null&&Zr($t)&&($t=null),ir.forEach(ea),sr.forEach(ea)}function ur(e,t){e.blockedOn===t&&(e.blockedOn=null,ko||(ko=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,Dd)))}function cr(e){function t(o){return ur(o,e)}if(0<qr.length){ur(qr[0],e);for(var n=1;n<qr.length;n++){var r=qr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ft!==null&&ur(Ft,e),Wt!==null&&ur(Wt,e),$t!==null&&ur($t,e),ir.forEach(t),sr.forEach(t),n=0;n<Vt.length;n++)r=Vt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Vt.length&&(n=Vt[0],n.blockedOn===null);)Zs(n),n.blockedOn===null&&Vt.shift()}var Pn=F.ReactCurrentBatchConfig,el=!0;function Ud(e,t,n,r){var o=xe,i=Pn.transition;Pn.transition=null;try{xe=1,Eo(e,t,n,r)}finally{xe=o,Pn.transition=i}}function Bd(e,t,n,r){var o=xe,i=Pn.transition;Pn.transition=null;try{xe=4,Eo(e,t,n,r)}finally{xe=o,Pn.transition=i}}function Eo(e,t,n,r){if(el){var o=jo(e,t,n,r);if(o===null)Wo(e,t,r,tl,n),qs(e,r);else if(zd(o,e,t,n,r))r.stopPropagation();else if(qs(e,r),t&4&&-1<Ad.indexOf(e)){for(;o!==null;){var i=kr(o);if(i!==null&&Js(i),i=jo(e,t,n,r),i===null&&Wo(e,t,r,tl,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else Wo(e,t,r,null,n)}}var tl=null;function jo(e,t,n,r){if(tl=null,e=fo(r),e=cn(e),e!==null)if(t=un(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Us(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 tl=e,null}function ta(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(Nd()){case vo:return 1;case Hs:return 4;case Yr:case Pd:return 16;case Qs:return 536870912;default:return 16}default:return 16}}var Ht=null,Co=null,nl=null;function na(){if(nl)return nl;var e,t=Co,n=t.length,r,o="value"in Ht?Ht.value:Ht.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var c=n-e;for(r=1;r<=c&&t[n-r]===o[i-r];r++);return nl=o.slice(e,1<r?1-r:void 0)}function rl(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 ll(){return!0}function ra(){return!1}function at(e){function t(n,r,o,i,c){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=c,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(n=e[v],this[v]=n?n(i):i[v]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ll:ra,this.isPropagationStopped=ra,this}return H(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=ll)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ll)},persist:function(){},isPersistent:ll}),t}var _n={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},No=at(_n),dr=H({},_n,{view:0,detail:0}),Fd=at(dr),Po,_o,fr,ol=H({},dr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ro,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!==fr&&(fr&&e.type==="mousemove"?(Po=e.screenX-fr.screenX,_o=e.screenY-fr.screenY):_o=Po=0,fr=e),Po)},movementY:function(e){return"movementY"in e?e.movementY:_o}}),la=at(ol),Wd=H({},ol,{dataTransfer:0}),$d=at(Wd),Vd=H({},dr,{relatedTarget:0}),To=at(Vd),Hd=H({},_n,{animationName:0,elapsedTime:0,pseudoElement:0}),Qd=at(Hd),Kd=H({},_n,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Yd=at(Kd),Jd=H({},_n,{data:0}),oa=at(Jd),Gd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xd={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"},bd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=bd[e])?!!t[e]:!1}function Ro(){return qd}var Zd=H({},dr,{key:function(e){if(e.key){var t=Gd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=rl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Xd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ro,charCode:function(e){return e.type==="keypress"?rl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?rl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ef=at(Zd),tf=H({},ol,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ia=at(tf),nf=H({},dr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ro}),rf=at(nf),lf=H({},_n,{propertyName:0,elapsedTime:0,pseudoElement:0}),of=at(lf),sf=H({},ol,{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}),af=at(sf),uf=[9,13,27,32],Lo=C&&"CompositionEvent"in window,pr=null;C&&"documentMode"in document&&(pr=document.documentMode);var cf=C&&"TextEvent"in window&&!pr,sa=C&&(!Lo||pr&&8<pr&&11>=pr),aa=" ",ua=!1;function ca(e,t){switch(e){case"keyup":return uf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function da(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Tn=!1;function df(e,t){switch(e){case"compositionend":return da(t);case"keypress":return t.which!==32?null:(ua=!0,aa);case"textInput":return e=t.data,e===aa&&ua?null:e;default:return null}}function ff(e,t){if(Tn)return e==="compositionend"||!Lo&&ca(e,t)?(e=na(),nl=Co=Ht=null,Tn=!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 sa&&t.locale!=="ko"?null:t.data;default:return null}}var pf={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 fa(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!pf[e.type]:t==="textarea"}function pa(e,t,n,r){Ms(r),t=cl(t,"onChange"),0<t.length&&(n=new No("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var hr=null,mr=null;function hf(e){La(e,0)}function il(e){var t=On(e);if(Ss(t))return e}function mf(e,t){if(e==="change")return t}var ha=!1;if(C){var Io;if(C){var Mo="oninput"in document;if(!Mo){var ma=document.createElement("div");ma.setAttribute("oninput","return;"),Mo=typeof ma.oninput=="function"}Io=Mo}else Io=!1;ha=Io&&(!document.documentMode||9<document.documentMode)}function ga(){hr&&(hr.detachEvent("onpropertychange",va),mr=hr=null)}function va(e){if(e.propertyName==="value"&&il(mr)){var t=[];pa(t,mr,e,fo(e)),Ds(hf,t)}}function gf(e,t,n){e==="focusin"?(ga(),hr=t,mr=n,hr.attachEvent("onpropertychange",va)):e==="focusout"&&ga()}function vf(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return il(mr)}function yf(e,t){if(e==="click")return il(t)}function xf(e,t){if(e==="input"||e==="change")return il(t)}function wf(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xt=typeof Object.is=="function"?Object.is:wf;function gr(e,t){if(xt(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 o=n[r];if(!f.call(t,o)||!xt(e[o],t[o]))return!1}return!0}function ya(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xa(e,t){var n=ya(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=ya(n)}}function wa(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wa(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sa(){for(var e=window,t=Vr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vr(e.document)}return t}function Oo(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 Sf(e){var t=Sa(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&wa(n.ownerDocument.documentElement,n)){if(r!==null&&Oo(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 o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=xa(n,i);var c=xa(n,r);o&&c&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==c.node||e.focusOffset!==c.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(c.node,c.offset)):(t.setEnd(c.node,c.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 kf=C&&"documentMode"in document&&11>=document.documentMode,Rn=null,Ao=null,vr=null,zo=!1;function ka(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zo||Rn==null||Rn!==Vr(r)||(r=Rn,"selectionStart"in r&&Oo(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}),vr&&gr(vr,r)||(vr=r,r=cl(Ao,"onSelect"),0<r.length&&(t=new No("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Rn)))}function sl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ln={animationend:sl("Animation","AnimationEnd"),animationiteration:sl("Animation","AnimationIteration"),animationstart:sl("Animation","AnimationStart"),transitionend:sl("Transition","TransitionEnd")},Do={},Ea={};C&&(Ea=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 al(e){if(Do[e])return Do[e];if(!Ln[e])return e;var t=Ln[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ea)return Do[e]=t[n];return e}var ja=al("animationend"),Ca=al("animationiteration"),Na=al("animationstart"),Pa=al("transitionend"),_a=new Map,Ta="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 Qt(e,t){_a.set(e,t),g(t,[e])}for(var Uo=0;Uo<Ta.length;Uo++){var Bo=Ta[Uo],Ef=Bo.toLowerCase(),jf=Bo[0].toUpperCase()+Bo.slice(1);Qt(Ef,"on"+jf)}Qt(ja,"onAnimationEnd"),Qt(Ca,"onAnimationIteration"),Qt(Na,"onAnimationStart"),Qt("dblclick","onDoubleClick"),Qt("focusin","onFocus"),Qt("focusout","onBlur"),Qt(Pa,"onTransitionEnd"),j("onMouseEnter",["mouseout","mouseover"]),j("onMouseLeave",["mouseout","mouseover"]),j("onPointerEnter",["pointerout","pointerover"]),j("onPointerLeave",["pointerout","pointerover"]),g("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),g("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),g("onBeforeInput",["compositionend","keypress","textInput","paste"]),g("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),g("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),g("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yr="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(" "),Cf=new Set("cancel close invalid load scroll toggle".split(" ").concat(yr));function Ra(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,kd(r,t,void 0,e),e.currentTarget=null}function La(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var c=r.length-1;0<=c;c--){var v=r[c],x=v.instance,R=v.currentTarget;if(v=v.listener,x!==i&&o.isPropagationStopped())break e;Ra(o,v,R),i=x}else for(c=0;c<r.length;c++){if(v=r[c],x=v.instance,R=v.currentTarget,v=v.listener,x!==i&&o.isPropagationStopped())break e;Ra(o,v,R),i=x}}}if(Kr)throw e=go,Kr=!1,go=null,e}function je(e,t){var n=t[Yo];n===void 0&&(n=t[Yo]=new Set);var r=e+"__bubble";n.has(r)||(Ia(t,e,2,!1),n.add(r))}function Fo(e,t,n){var r=0;t&&(r|=4),Ia(n,e,r,t)}var ul="_reactListening"+Math.random().toString(36).slice(2);function xr(e){if(!e[ul]){e[ul]=!0,d.forEach(function(n){n!=="selectionchange"&&(Cf.has(n)||Fo(n,!1,e),Fo(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ul]||(t[ul]=!0,Fo("selectionchange",!1,t))}}function Ia(e,t,n,r){switch(ta(t)){case 1:var o=Ud;break;case 4:o=Bd;break;default:o=Eo}n=o.bind(null,t,n,e),o=void 0,!mo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Wo(e,t,n,r,o){var i=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var c=r.tag;if(c===3||c===4){var v=r.stateNode.containerInfo;if(v===o||v.nodeType===8&&v.parentNode===o)break;if(c===4)for(c=r.return;c!==null;){var x=c.tag;if((x===3||x===4)&&(x=c.stateNode.containerInfo,x===o||x.nodeType===8&&x.parentNode===o))return;c=c.return}for(;v!==null;){if(c=cn(v),c===null)return;if(x=c.tag,x===5||x===6){r=i=c;continue e}v=v.parentNode}}r=r.return}Ds(function(){var R=i,z=fo(n),D=[];e:{var A=_a.get(e);if(A!==void 0){var Q=No,J=e;switch(e){case"keypress":if(rl(n)===0)break e;case"keydown":case"keyup":Q=ef;break;case"focusin":J="focus",Q=To;break;case"focusout":J="blur",Q=To;break;case"beforeblur":case"afterblur":Q=To;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":Q=la;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Q=$d;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Q=rf;break;case ja:case Ca:case Na:Q=Qd;break;case Pa:Q=of;break;case"scroll":Q=Fd;break;case"wheel":Q=af;break;case"copy":case"cut":case"paste":Q=Yd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Q=ia}var G=(t&4)!==0,Oe=!G&&e==="scroll",_=G?A!==null?A+"Capture":null:A;G=[];for(var S=R,T;S!==null;){T=S;var B=T.stateNode;if(T.tag===5&&B!==null&&(T=B,_!==null&&(B=tr(S,_),B!=null&&G.push(wr(S,B,T)))),Oe)break;S=S.return}0<G.length&&(A=new Q(A,J,null,n,z),D.push({event:A,listeners:G}))}}if((t&7)===0){e:{if(A=e==="mouseover"||e==="pointerover",Q=e==="mouseout"||e==="pointerout",A&&n!==co&&(J=n.relatedTarget||n.fromElement)&&(cn(J)||J[Lt]))break e;if((Q||A)&&(A=z.window===z?z:(A=z.ownerDocument)?A.defaultView||A.parentWindow:window,Q?(J=n.relatedTarget||n.toElement,Q=R,J=J?cn(J):null,J!==null&&(Oe=un(J),J!==Oe||J.tag!==5&&J.tag!==6)&&(J=null)):(Q=null,J=R),Q!==J)){if(G=la,B="onMouseLeave",_="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(G=ia,B="onPointerLeave",_="onPointerEnter",S="pointer"),Oe=Q==null?A:On(Q),T=J==null?A:On(J),A=new G(B,S+"leave",Q,n,z),A.target=Oe,A.relatedTarget=T,B=null,cn(z)===R&&(G=new G(_,S+"enter",J,n,z),G.target=T,G.relatedTarget=Oe,B=G),Oe=B,Q&&J)t:{for(G=Q,_=J,S=0,T=G;T;T=In(T))S++;for(T=0,B=_;B;B=In(B))T++;for(;0<S-T;)G=In(G),S--;for(;0<T-S;)_=In(_),T--;for(;S--;){if(G===_||_!==null&&G===_.alternate)break t;G=In(G),_=In(_)}G=null}else G=null;Q!==null&&Ma(D,A,Q,G,!1),J!==null&&Oe!==null&&Ma(D,Oe,J,G,!0)}}e:{if(A=R?On(R):window,Q=A.nodeName&&A.nodeName.toLowerCase(),Q==="select"||Q==="input"&&A.type==="file")var Z=mf;else if(fa(A))if(ha)Z=xf;else{Z=vf;var ne=gf}else(Q=A.nodeName)&&Q.toLowerCase()==="input"&&(A.type==="checkbox"||A.type==="radio")&&(Z=yf);if(Z&&(Z=Z(e,R))){pa(D,Z,n,z);break e}ne&&ne(e,A,R),e==="focusout"&&(ne=A._wrapperState)&&ne.controlled&&A.type==="number"&&oo(A,"number",A.value)}switch(ne=R?On(R):window,e){case"focusin":(fa(ne)||ne.contentEditable==="true")&&(Rn=ne,Ao=R,vr=null);break;case"focusout":vr=Ao=Rn=null;break;case"mousedown":zo=!0;break;case"contextmenu":case"mouseup":case"dragend":zo=!1,ka(D,n,z);break;case"selectionchange":if(kf)break;case"keydown":case"keyup":ka(D,n,z)}var re;if(Lo)e:{switch(e){case"compositionstart":var oe="onCompositionStart";break e;case"compositionend":oe="onCompositionEnd";break e;case"compositionupdate":oe="onCompositionUpdate";break e}oe=void 0}else Tn?ca(e,n)&&(oe="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(oe="onCompositionStart");oe&&(sa&&n.locale!=="ko"&&(Tn||oe!=="onCompositionStart"?oe==="onCompositionEnd"&&Tn&&(re=na()):(Ht=z,Co="value"in Ht?Ht.value:Ht.textContent,Tn=!0)),ne=cl(R,oe),0<ne.length&&(oe=new oa(oe,e,null,n,z),D.push({event:oe,listeners:ne}),re?oe.data=re:(re=da(n),re!==null&&(oe.data=re)))),(re=cf?df(e,n):ff(e,n))&&(R=cl(R,"onBeforeInput"),0<R.length&&(z=new oa("onBeforeInput","beforeinput",null,n,z),D.push({event:z,listeners:R}),z.data=re))}La(D,t)})}function wr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function cl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=tr(e,n),i!=null&&r.unshift(wr(e,i,o)),i=tr(e,t),i!=null&&r.push(wr(e,i,o))),e=e.return}return r}function In(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ma(e,t,n,r,o){for(var i=t._reactName,c=[];n!==null&&n!==r;){var v=n,x=v.alternate,R=v.stateNode;if(x!==null&&x===r)break;v.tag===5&&R!==null&&(v=R,o?(x=tr(n,i),x!=null&&c.unshift(wr(n,x,v))):o||(x=tr(n,i),x!=null&&c.push(wr(n,x,v)))),n=n.return}c.length!==0&&e.push({event:t,listeners:c})}var Nf=/\r\n?/g,Pf=/\u0000|\uFFFD/g;function Oa(e){return(typeof e=="string"?e:""+e).replace(Nf,`
|
|
39
|
+
`).replace(Pf,"")}function dl(e,t,n){if(t=Oa(t),Oa(e)!==t&&n)throw Error(u(425))}function fl(){}var $o=null,Vo=null;function Ho(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 Qo=typeof setTimeout=="function"?setTimeout:void 0,_f=typeof clearTimeout=="function"?clearTimeout:void 0,Aa=typeof Promise=="function"?Promise:void 0,Tf=typeof queueMicrotask=="function"?queueMicrotask:typeof Aa<"u"?function(e){return Aa.resolve(null).then(e).catch(Rf)}:Qo;function Rf(e){setTimeout(function(){throw e})}function Ko(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),cr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);cr(t)}function Kt(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 za(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 Mn=Math.random().toString(36).slice(2),Nt="__reactFiber$"+Mn,Sr="__reactProps$"+Mn,Lt="__reactContainer$"+Mn,Yo="__reactEvents$"+Mn,Lf="__reactListeners$"+Mn,If="__reactHandles$"+Mn;function cn(e){var t=e[Nt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Lt]||n[Nt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=za(e);e!==null;){if(n=e[Nt])return n;e=za(e)}return t}e=n,n=e.parentNode}return null}function kr(e){return e=e[Nt]||e[Lt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function On(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(u(33))}function pl(e){return e[Sr]||null}var Jo=[],An=-1;function Yt(e){return{current:e}}function Ce(e){0>An||(e.current=Jo[An],Jo[An]=null,An--)}function ke(e,t){An++,Jo[An]=e.current,e.current=t}var Jt={},Ge=Yt(Jt),tt=Yt(!1),dn=Jt;function zn(e,t){var n=e.type.contextTypes;if(!n)return Jt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function nt(e){return e=e.childContextTypes,e!=null}function hl(){Ce(tt),Ce(Ge)}function Da(e,t,n){if(Ge.current!==Jt)throw Error(u(168));ke(Ge,t),ke(tt,n)}function Ua(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(u(108,Se(e)||"Unknown",o));return H({},n,r)}function ml(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Jt,dn=Ge.current,ke(Ge,e),ke(tt,tt.current),!0}function Ba(e,t,n){var r=e.stateNode;if(!r)throw Error(u(169));n?(e=Ua(e,t,dn),r.__reactInternalMemoizedMergedChildContext=e,Ce(tt),Ce(Ge),ke(Ge,e)):Ce(tt),ke(tt,n)}var It=null,gl=!1,Go=!1;function Fa(e){It===null?It=[e]:It.push(e)}function Mf(e){gl=!0,Fa(e)}function Gt(){if(!Go&&It!==null){Go=!0;var e=0,t=xe;try{var n=It;for(xe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}It=null,gl=!1}catch(o){throw It!==null&&(It=It.slice(e+1)),$s(vo,Gt),o}finally{xe=t,Go=!1}}return null}var Dn=[],Un=0,vl=null,yl=0,ft=[],pt=0,fn=null,Mt=1,Ot="";function pn(e,t){Dn[Un++]=yl,Dn[Un++]=vl,vl=e,yl=t}function Wa(e,t,n){ft[pt++]=Mt,ft[pt++]=Ot,ft[pt++]=fn,fn=e;var r=Mt;e=Ot;var o=32-yt(r)-1;r&=~(1<<o),n+=1;var i=32-yt(t)+o;if(30<i){var c=o-o%5;i=(r&(1<<c)-1).toString(32),r>>=c,o-=c,Mt=1<<32-yt(t)+o|n<<o|r,Ot=i+e}else Mt=1<<i|n<<o|r,Ot=e}function Xo(e){e.return!==null&&(pn(e,1),Wa(e,1,0))}function bo(e){for(;e===vl;)vl=Dn[--Un],Dn[Un]=null,yl=Dn[--Un],Dn[Un]=null;for(;e===fn;)fn=ft[--pt],ft[pt]=null,Ot=ft[--pt],ft[pt]=null,Mt=ft[--pt],ft[pt]=null}var ut=null,ct=null,Pe=!1,wt=null;function $a(e,t){var n=vt(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 Va(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ut=e,ct=Kt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ut=e,ct=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=fn!==null?{id:Mt,overflow:Ot}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=vt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ut=e,ct=null,!0):!1;default:return!1}}function qo(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Zo(e){if(Pe){var t=ct;if(t){var n=t;if(!Va(e,t)){if(qo(e))throw Error(u(418));t=Kt(n.nextSibling);var r=ut;t&&Va(e,t)?$a(r,n):(e.flags=e.flags&-4097|2,Pe=!1,ut=e)}}else{if(qo(e))throw Error(u(418));e.flags=e.flags&-4097|2,Pe=!1,ut=e}}}function Ha(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ut=e}function xl(e){if(e!==ut)return!1;if(!Pe)return Ha(e),Pe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ho(e.type,e.memoizedProps)),t&&(t=ct)){if(qo(e))throw Qa(),Error(u(418));for(;t;)$a(e,t),t=Kt(t.nextSibling)}if(Ha(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ct=Kt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ct=null}}else ct=ut?Kt(e.stateNode.nextSibling):null;return!0}function Qa(){for(var e=ct;e;)e=Kt(e.nextSibling)}function Bn(){ct=ut=null,Pe=!1}function ei(e){wt===null?wt=[e]:wt.push(e)}var Of=F.ReactCurrentBatchConfig;function Er(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(u(309));var r=n.stateNode}if(!r)throw Error(u(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(c){var v=o.refs;c===null?delete v[i]:v[i]=c},t._stringRef=i,t)}if(typeof e!="string")throw Error(u(284));if(!n._owner)throw Error(u(290,e))}return e}function wl(e,t){throw e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ka(e){var t=e._init;return t(e._payload)}function Ya(e){function t(_,S){if(e){var T=_.deletions;T===null?(_.deletions=[S],_.flags|=16):T.push(S)}}function n(_,S){if(!e)return null;for(;S!==null;)t(_,S),S=S.sibling;return null}function r(_,S){for(_=new Map;S!==null;)S.key!==null?_.set(S.key,S):_.set(S.index,S),S=S.sibling;return _}function o(_,S){return _=rn(_,S),_.index=0,_.sibling=null,_}function i(_,S,T){return _.index=T,e?(T=_.alternate,T!==null?(T=T.index,T<S?(_.flags|=2,S):T):(_.flags|=2,S)):(_.flags|=1048576,S)}function c(_){return e&&_.alternate===null&&(_.flags|=2),_}function v(_,S,T,B){return S===null||S.tag!==6?(S=Qi(T,_.mode,B),S.return=_,S):(S=o(S,T),S.return=_,S)}function x(_,S,T,B){var Z=T.type;return Z===we?z(_,S,T.props.children,B,T.key):S!==null&&(S.elementType===Z||typeof Z=="object"&&Z!==null&&Z.$$typeof===ze&&Ka(Z)===S.type)?(B=o(S,T.props),B.ref=Er(_,S,T),B.return=_,B):(B=Hl(T.type,T.key,T.props,null,_.mode,B),B.ref=Er(_,S,T),B.return=_,B)}function R(_,S,T,B){return S===null||S.tag!==4||S.stateNode.containerInfo!==T.containerInfo||S.stateNode.implementation!==T.implementation?(S=Ki(T,_.mode,B),S.return=_,S):(S=o(S,T.children||[]),S.return=_,S)}function z(_,S,T,B,Z){return S===null||S.tag!==7?(S=Sn(T,_.mode,B,Z),S.return=_,S):(S=o(S,T),S.return=_,S)}function D(_,S,T){if(typeof S=="string"&&S!==""||typeof S=="number")return S=Qi(""+S,_.mode,T),S.return=_,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case X:return T=Hl(S.type,S.key,S.props,null,_.mode,T),T.ref=Er(_,null,S),T.return=_,T;case te:return S=Ki(S,_.mode,T),S.return=_,S;case ze:var B=S._init;return D(_,B(S._payload),T)}if(qn(S)||b(S))return S=Sn(S,_.mode,T,null),S.return=_,S;wl(_,S)}return null}function A(_,S,T,B){var Z=S!==null?S.key:null;if(typeof T=="string"&&T!==""||typeof T=="number")return Z!==null?null:v(_,S,""+T,B);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case X:return T.key===Z?x(_,S,T,B):null;case te:return T.key===Z?R(_,S,T,B):null;case ze:return Z=T._init,A(_,S,Z(T._payload),B)}if(qn(T)||b(T))return Z!==null?null:z(_,S,T,B,null);wl(_,T)}return null}function Q(_,S,T,B,Z){if(typeof B=="string"&&B!==""||typeof B=="number")return _=_.get(T)||null,v(S,_,""+B,Z);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case X:return _=_.get(B.key===null?T:B.key)||null,x(S,_,B,Z);case te:return _=_.get(B.key===null?T:B.key)||null,R(S,_,B,Z);case ze:var ne=B._init;return Q(_,S,T,ne(B._payload),Z)}if(qn(B)||b(B))return _=_.get(T)||null,z(S,_,B,Z,null);wl(S,B)}return null}function J(_,S,T,B){for(var Z=null,ne=null,re=S,oe=S=0,He=null;re!==null&&oe<T.length;oe++){re.index>oe?(He=re,re=null):He=re.sibling;var pe=A(_,re,T[oe],B);if(pe===null){re===null&&(re=He);break}e&&re&&pe.alternate===null&&t(_,re),S=i(pe,S,oe),ne===null?Z=pe:ne.sibling=pe,ne=pe,re=He}if(oe===T.length)return n(_,re),Pe&&pn(_,oe),Z;if(re===null){for(;oe<T.length;oe++)re=D(_,T[oe],B),re!==null&&(S=i(re,S,oe),ne===null?Z=re:ne.sibling=re,ne=re);return Pe&&pn(_,oe),Z}for(re=r(_,re);oe<T.length;oe++)He=Q(re,_,oe,T[oe],B),He!==null&&(e&&He.alternate!==null&&re.delete(He.key===null?oe:He.key),S=i(He,S,oe),ne===null?Z=He:ne.sibling=He,ne=He);return e&&re.forEach(function(ln){return t(_,ln)}),Pe&&pn(_,oe),Z}function G(_,S,T,B){var Z=b(T);if(typeof Z!="function")throw Error(u(150));if(T=Z.call(T),T==null)throw Error(u(151));for(var ne=Z=null,re=S,oe=S=0,He=null,pe=T.next();re!==null&&!pe.done;oe++,pe=T.next()){re.index>oe?(He=re,re=null):He=re.sibling;var ln=A(_,re,pe.value,B);if(ln===null){re===null&&(re=He);break}e&&re&&ln.alternate===null&&t(_,re),S=i(ln,S,oe),ne===null?Z=ln:ne.sibling=ln,ne=ln,re=He}if(pe.done)return n(_,re),Pe&&pn(_,oe),Z;if(re===null){for(;!pe.done;oe++,pe=T.next())pe=D(_,pe.value,B),pe!==null&&(S=i(pe,S,oe),ne===null?Z=pe:ne.sibling=pe,ne=pe);return Pe&&pn(_,oe),Z}for(re=r(_,re);!pe.done;oe++,pe=T.next())pe=Q(re,_,oe,pe.value,B),pe!==null&&(e&&pe.alternate!==null&&re.delete(pe.key===null?oe:pe.key),S=i(pe,S,oe),ne===null?Z=pe:ne.sibling=pe,ne=pe);return e&&re.forEach(function(pp){return t(_,pp)}),Pe&&pn(_,oe),Z}function Oe(_,S,T,B){if(typeof T=="object"&&T!==null&&T.type===we&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case X:e:{for(var Z=T.key,ne=S;ne!==null;){if(ne.key===Z){if(Z=T.type,Z===we){if(ne.tag===7){n(_,ne.sibling),S=o(ne,T.props.children),S.return=_,_=S;break e}}else if(ne.elementType===Z||typeof Z=="object"&&Z!==null&&Z.$$typeof===ze&&Ka(Z)===ne.type){n(_,ne.sibling),S=o(ne,T.props),S.ref=Er(_,ne,T),S.return=_,_=S;break e}n(_,ne);break}else t(_,ne);ne=ne.sibling}T.type===we?(S=Sn(T.props.children,_.mode,B,T.key),S.return=_,_=S):(B=Hl(T.type,T.key,T.props,null,_.mode,B),B.ref=Er(_,S,T),B.return=_,_=B)}return c(_);case te:e:{for(ne=T.key;S!==null;){if(S.key===ne)if(S.tag===4&&S.stateNode.containerInfo===T.containerInfo&&S.stateNode.implementation===T.implementation){n(_,S.sibling),S=o(S,T.children||[]),S.return=_,_=S;break e}else{n(_,S);break}else t(_,S);S=S.sibling}S=Ki(T,_.mode,B),S.return=_,_=S}return c(_);case ze:return ne=T._init,Oe(_,S,ne(T._payload),B)}if(qn(T))return J(_,S,T,B);if(b(T))return G(_,S,T,B);wl(_,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,S!==null&&S.tag===6?(n(_,S.sibling),S=o(S,T),S.return=_,_=S):(n(_,S),S=Qi(T,_.mode,B),S.return=_,_=S),c(_)):n(_,S)}return Oe}var Fn=Ya(!0),Ja=Ya(!1),Sl=Yt(null),kl=null,Wn=null,ti=null;function ni(){ti=Wn=kl=null}function ri(e){var t=Sl.current;Ce(Sl),e._currentValue=t}function li(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 $n(e,t){kl=e,ti=Wn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(rt=!0),e.firstContext=null)}function ht(e){var t=e._currentValue;if(ti!==e)if(e={context:e,memoizedValue:t,next:null},Wn===null){if(kl===null)throw Error(u(308));Wn=e,kl.dependencies={lanes:0,firstContext:e}}else Wn=Wn.next=e;return t}var hn=null;function oi(e){hn===null?hn=[e]:hn.push(e)}function Ga(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,oi(t)):(n.next=o.next,o.next=n),t.interleaved=n,At(e,r)}function At(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 Xt=!1;function ii(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xa(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 zt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function bt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(ce&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,At(e,n)}return o=r.interleaved,o===null?(t.next=t,oi(r)):(t.next=o.next,o.next=t),r.interleaved=t,At(e,n)}function El(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,wo(e,n)}}function ba(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var c={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=c:i=i.next=c,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,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 jl(e,t,n,r){var o=e.updateQueue;Xt=!1;var i=o.firstBaseUpdate,c=o.lastBaseUpdate,v=o.shared.pending;if(v!==null){o.shared.pending=null;var x=v,R=x.next;x.next=null,c===null?i=R:c.next=R,c=x;var z=e.alternate;z!==null&&(z=z.updateQueue,v=z.lastBaseUpdate,v!==c&&(v===null?z.firstBaseUpdate=R:v.next=R,z.lastBaseUpdate=x))}if(i!==null){var D=o.baseState;c=0,z=R=x=null,v=i;do{var A=v.lane,Q=v.eventTime;if((r&A)===A){z!==null&&(z=z.next={eventTime:Q,lane:0,tag:v.tag,payload:v.payload,callback:v.callback,next:null});e:{var J=e,G=v;switch(A=t,Q=n,G.tag){case 1:if(J=G.payload,typeof J=="function"){D=J.call(Q,D,A);break e}D=J;break e;case 3:J.flags=J.flags&-65537|128;case 0:if(J=G.payload,A=typeof J=="function"?J.call(Q,D,A):J,A==null)break e;D=H({},D,A);break e;case 2:Xt=!0}}v.callback!==null&&v.lane!==0&&(e.flags|=64,A=o.effects,A===null?o.effects=[v]:A.push(v))}else Q={eventTime:Q,lane:A,tag:v.tag,payload:v.payload,callback:v.callback,next:null},z===null?(R=z=Q,x=D):z=z.next=Q,c|=A;if(v=v.next,v===null){if(v=o.shared.pending,v===null)break;A=v,v=A.next,A.next=null,o.lastBaseUpdate=A,o.shared.pending=null}}while(!0);if(z===null&&(x=D),o.baseState=x,o.firstBaseUpdate=R,o.lastBaseUpdate=z,t=o.shared.interleaved,t!==null){o=t;do c|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);vn|=c,e.lanes=c,e.memoizedState=D}}function qa(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(u(191,o));o.call(r)}}}var jr={},Pt=Yt(jr),Cr=Yt(jr),Nr=Yt(jr);function mn(e){if(e===jr)throw Error(u(174));return e}function si(e,t){switch(ke(Nr,t),ke(Cr,e),ke(Pt,jr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:so(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=so(t,e)}Ce(Pt),ke(Pt,t)}function Vn(){Ce(Pt),Ce(Cr),Ce(Nr)}function Za(e){mn(Nr.current);var t=mn(Pt.current),n=so(t,e.type);t!==n&&(ke(Cr,e),ke(Pt,n))}function ai(e){Cr.current===e&&(Ce(Pt),Ce(Cr))}var _e=Yt(0);function Cl(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)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ui=[];function ci(){for(var e=0;e<ui.length;e++)ui[e]._workInProgressVersionPrimary=null;ui.length=0}var Nl=F.ReactCurrentDispatcher,di=F.ReactCurrentBatchConfig,gn=0,Te=null,Ue=null,$e=null,Pl=!1,Pr=!1,_r=0,Af=0;function Xe(){throw Error(u(321))}function fi(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!xt(e[n],t[n]))return!1;return!0}function pi(e,t,n,r,o,i){if(gn=i,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Nl.current=e===null||e.memoizedState===null?Bf:Ff,e=n(r,o),Pr){i=0;do{if(Pr=!1,_r=0,25<=i)throw Error(u(301));i+=1,$e=Ue=null,t.updateQueue=null,Nl.current=Wf,e=n(r,o)}while(Pr)}if(Nl.current=Rl,t=Ue!==null&&Ue.next!==null,gn=0,$e=Ue=Te=null,Pl=!1,t)throw Error(u(300));return e}function hi(){var e=_r!==0;return _r=0,e}function _t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $e===null?Te.memoizedState=$e=e:$e=$e.next=e,$e}function mt(){if(Ue===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Ue.next;var t=$e===null?Te.memoizedState:$e.next;if(t!==null)$e=t,Ue=e;else{if(e===null)throw Error(u(310));Ue=e,e={memoizedState:Ue.memoizedState,baseState:Ue.baseState,baseQueue:Ue.baseQueue,queue:Ue.queue,next:null},$e===null?Te.memoizedState=$e=e:$e=$e.next=e}return $e}function Tr(e,t){return typeof t=="function"?t(e):t}function mi(e){var t=mt(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var r=Ue,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var c=o.next;o.next=i.next,i.next=c}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var v=c=null,x=null,R=i;do{var z=R.lane;if((gn&z)===z)x!==null&&(x=x.next={lane:0,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),r=R.hasEagerState?R.eagerState:e(r,R.action);else{var D={lane:z,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null};x===null?(v=x=D,c=r):x=x.next=D,Te.lanes|=z,vn|=z}R=R.next}while(R!==null&&R!==i);x===null?c=r:x.next=v,xt(r,t.memoizedState)||(rt=!0),t.memoizedState=r,t.baseState=c,t.baseQueue=x,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,Te.lanes|=i,vn|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function gi(e){var t=mt(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var c=o=o.next;do i=e(i,c.action),c=c.next;while(c!==o);xt(i,t.memoizedState)||(rt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function eu(){}function tu(e,t){var n=Te,r=mt(),o=t(),i=!xt(r.memoizedState,o);if(i&&(r.memoizedState=o,rt=!0),r=r.queue,vi(lu.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||$e!==null&&$e.memoizedState.tag&1){if(n.flags|=2048,Rr(9,ru.bind(null,n,r,o,t),void 0,null),Ve===null)throw Error(u(349));(gn&30)!==0||nu(n,t,o)}return o}function nu(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ru(e,t,n,r){t.value=n,t.getSnapshot=r,ou(t)&&iu(e)}function lu(e,t,n){return n(function(){ou(t)&&iu(e)})}function ou(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xt(e,n)}catch{return!0}}function iu(e){var t=At(e,1);t!==null&&jt(t,e,1,-1)}function su(e){var t=_t();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Tr,lastRenderedState:e},t.queue=e,e=e.dispatch=Uf.bind(null,Te,e),[t.memoizedState,e]}function Rr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.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 au(){return mt().memoizedState}function _l(e,t,n,r){var o=_t();Te.flags|=e,o.memoizedState=Rr(1|t,n,void 0,r===void 0?null:r)}function Tl(e,t,n,r){var o=mt();r=r===void 0?null:r;var i=void 0;if(Ue!==null){var c=Ue.memoizedState;if(i=c.destroy,r!==null&&fi(r,c.deps)){o.memoizedState=Rr(t,n,i,r);return}}Te.flags|=e,o.memoizedState=Rr(1|t,n,i,r)}function uu(e,t){return _l(8390656,8,e,t)}function vi(e,t){return Tl(2048,8,e,t)}function cu(e,t){return Tl(4,2,e,t)}function du(e,t){return Tl(4,4,e,t)}function fu(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 pu(e,t,n){return n=n!=null?n.concat([e]):null,Tl(4,4,fu.bind(null,t,e),n)}function yi(){}function hu(e,t){var n=mt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&fi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function mu(e,t){var n=mt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&fi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function gu(e,t,n){return(gn&21)===0?(e.baseState&&(e.baseState=!1,rt=!0),e.memoizedState=n):(xt(n,t)||(n=Ks(),Te.lanes|=n,vn|=n,e.baseState=!0),t)}function zf(e,t){var n=xe;xe=n!==0&&4>n?n:4,e(!0);var r=di.transition;di.transition={};try{e(!1),t()}finally{xe=n,di.transition=r}}function vu(){return mt().memoizedState}function Df(e,t,n){var r=tn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},yu(e))xu(t,n);else if(n=Ga(e,t,n,r),n!==null){var o=et();jt(n,e,r,o),wu(n,t,r)}}function Uf(e,t,n){var r=tn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(yu(e))xu(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var c=t.lastRenderedState,v=i(c,n);if(o.hasEagerState=!0,o.eagerState=v,xt(v,c)){var x=t.interleaved;x===null?(o.next=o,oi(t)):(o.next=x.next,x.next=o),t.interleaved=o;return}}catch{}finally{}n=Ga(e,t,o,r),n!==null&&(o=et(),jt(n,e,r,o),wu(n,t,r))}}function yu(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function xu(e,t){Pr=Pl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function wu(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wo(e,n)}}var Rl={readContext:ht,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useInsertionEffect:Xe,useLayoutEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useMutableSource:Xe,useSyncExternalStore:Xe,useId:Xe,unstable_isNewReconciler:!1},Bf={readContext:ht,useCallback:function(e,t){return _t().memoizedState=[e,t===void 0?null:t],e},useContext:ht,useEffect:uu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,_l(4194308,4,fu.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _l(4194308,4,e,t)},useInsertionEffect:function(e,t){return _l(4,2,e,t)},useMemo:function(e,t){var n=_t();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=_t();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=Df.bind(null,Te,e),[r.memoizedState,e]},useRef:function(e){var t=_t();return e={current:e},t.memoizedState=e},useState:su,useDebugValue:yi,useDeferredValue:function(e){return _t().memoizedState=e},useTransition:function(){var e=su(!1),t=e[0];return e=zf.bind(null,e[1]),_t().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Te,o=_t();if(Pe){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),Ve===null)throw Error(u(349));(gn&30)!==0||nu(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,uu(lu.bind(null,r,i,e),[e]),r.flags|=2048,Rr(9,ru.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=_t(),t=Ve.identifierPrefix;if(Pe){var n=Ot,r=Mt;n=(r&~(1<<32-yt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=_r++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Af++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Ff={readContext:ht,useCallback:hu,useContext:ht,useEffect:vi,useImperativeHandle:pu,useInsertionEffect:cu,useLayoutEffect:du,useMemo:mu,useReducer:mi,useRef:au,useState:function(){return mi(Tr)},useDebugValue:yi,useDeferredValue:function(e){var t=mt();return gu(t,Ue.memoizedState,e)},useTransition:function(){var e=mi(Tr)[0],t=mt().memoizedState;return[e,t]},useMutableSource:eu,useSyncExternalStore:tu,useId:vu,unstable_isNewReconciler:!1},Wf={readContext:ht,useCallback:hu,useContext:ht,useEffect:vi,useImperativeHandle:pu,useInsertionEffect:cu,useLayoutEffect:du,useMemo:mu,useReducer:gi,useRef:au,useState:function(){return gi(Tr)},useDebugValue:yi,useDeferredValue:function(e){var t=mt();return Ue===null?t.memoizedState=e:gu(t,Ue.memoizedState,e)},useTransition:function(){var e=gi(Tr)[0],t=mt().memoizedState;return[e,t]},useMutableSource:eu,useSyncExternalStore:tu,useId:vu,unstable_isNewReconciler:!1};function St(e,t){if(e&&e.defaultProps){t=H({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function xi(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:H({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ll={isMounted:function(e){return(e=e._reactInternals)?un(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=et(),o=tn(e),i=zt(r,o);i.payload=t,n!=null&&(i.callback=n),t=bt(e,i,o),t!==null&&(jt(t,e,o,r),El(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=et(),o=tn(e),i=zt(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=bt(e,i,o),t!==null&&(jt(t,e,o,r),El(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=et(),r=tn(e),o=zt(n,r);o.tag=2,t!=null&&(o.callback=t),t=bt(e,o,r),t!==null&&(jt(t,e,r,n),El(t,e,r))}};function Su(e,t,n,r,o,i,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,c):t.prototype&&t.prototype.isPureReactComponent?!gr(n,r)||!gr(o,i):!0}function ku(e,t,n){var r=!1,o=Jt,i=t.contextType;return typeof i=="object"&&i!==null?i=ht(i):(o=nt(t)?dn:Ge.current,r=t.contextTypes,i=(r=r!=null)?zn(e,o):Jt),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ll,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Eu(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&&Ll.enqueueReplaceState(t,t.state,null)}function wi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},ii(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=ht(i):(i=nt(t)?dn:Ge.current,o.context=zn(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(xi(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Ll.enqueueReplaceState(o,o.state,null),jl(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Hn(e,t){try{var n="",r=t;do n+=de(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
40
|
+
Error generating stack: `+i.message+`
|
|
41
|
+
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Si(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ki(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var $f=typeof WeakMap=="function"?WeakMap:Map;function ju(e,t,n){n=zt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ul||(Ul=!0,Di=r),ki(e,t)},n}function Cu(e,t,n){n=zt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){ki(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){ki(e,t),typeof r!="function"&&(Zt===null?Zt=new Set([this]):Zt.add(this));var c=t.stack;this.componentDidCatch(t.value,{componentStack:c!==null?c:""})}),n}function Nu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $f;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=np.bind(null,e,t,n),t.then(e,e))}function Pu(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 _u(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=zt(-1,1),t.tag=2,bt(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var Vf=F.ReactCurrentOwner,rt=!1;function Ze(e,t,n,r){t.child=e===null?Ja(t,null,n,r):Fn(t,e.child,n,r)}function Tu(e,t,n,r,o){n=n.render;var i=t.ref;return $n(t,o),r=pi(e,t,n,r,i,o),n=hi(),e!==null&&!rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Dt(e,t,o)):(Pe&&n&&Xo(t),t.flags|=1,Ze(e,t,r,o),t.child)}function Ru(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Hi(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Lu(e,t,i,r,o)):(e=Hl(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var c=i.memoizedProps;if(n=n.compare,n=n!==null?n:gr,n(c,r)&&e.ref===t.ref)return Dt(e,t,o)}return t.flags|=1,e=rn(i,r),e.ref=t.ref,e.return=t,t.child=e}function Lu(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(gr(i,r)&&e.ref===t.ref)if(rt=!1,t.pendingProps=r=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(rt=!0);else return t.lanes=e.lanes,Dt(e,t,o)}return Ei(e,t,n,r,o)}function Iu(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ke(Kn,dt),dt|=n;else{if((n&1073741824)===0)return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ke(Kn,dt),dt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ke(Kn,dt),dt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ke(Kn,dt),dt|=r;return Ze(e,t,o,n),t.child}function Mu(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ei(e,t,n,r,o){var i=nt(n)?dn:Ge.current;return i=zn(t,i),$n(t,o),n=pi(e,t,n,r,i,o),r=hi(),e!==null&&!rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Dt(e,t,o)):(Pe&&r&&Xo(t),t.flags|=1,Ze(e,t,n,o),t.child)}function Ou(e,t,n,r,o){if(nt(n)){var i=!0;ml(t)}else i=!1;if($n(t,o),t.stateNode===null)Ml(e,t),ku(t,n,r),wi(t,n,r,o),r=!0;else if(e===null){var c=t.stateNode,v=t.memoizedProps;c.props=v;var x=c.context,R=n.contextType;typeof R=="object"&&R!==null?R=ht(R):(R=nt(n)?dn:Ge.current,R=zn(t,R));var z=n.getDerivedStateFromProps,D=typeof z=="function"||typeof c.getSnapshotBeforeUpdate=="function";D||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(v!==r||x!==R)&&Eu(t,c,r,R),Xt=!1;var A=t.memoizedState;c.state=A,jl(t,r,c,o),x=t.memoizedState,v!==r||A!==x||tt.current||Xt?(typeof z=="function"&&(xi(t,n,z,r),x=t.memoizedState),(v=Xt||Su(t,n,v,r,A,x,R))?(D||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=x),c.props=r,c.state=x,c.context=R,r=v):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{c=t.stateNode,Xa(e,t),v=t.memoizedProps,R=t.type===t.elementType?v:St(t.type,v),c.props=R,D=t.pendingProps,A=c.context,x=n.contextType,typeof x=="object"&&x!==null?x=ht(x):(x=nt(n)?dn:Ge.current,x=zn(t,x));var Q=n.getDerivedStateFromProps;(z=typeof Q=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(v!==D||A!==x)&&Eu(t,c,r,x),Xt=!1,A=t.memoizedState,c.state=A,jl(t,r,c,o);var J=t.memoizedState;v!==D||A!==J||tt.current||Xt?(typeof Q=="function"&&(xi(t,n,Q,r),J=t.memoizedState),(R=Xt||Su(t,n,R,r,A,J,x)||!1)?(z||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(r,J,x),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(r,J,x)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||v===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=J),c.props=r,c.state=J,c.context=x,r=R):(typeof c.componentDidUpdate!="function"||v===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),r=!1)}return ji(e,t,n,r,i,o)}function ji(e,t,n,r,o,i){Mu(e,t);var c=(t.flags&128)!==0;if(!r&&!c)return o&&Ba(t,n,!1),Dt(e,t,i);r=t.stateNode,Vf.current=t;var v=c&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&c?(t.child=Fn(t,e.child,null,i),t.child=Fn(t,null,v,i)):Ze(e,t,v,i),t.memoizedState=r.state,o&&Ba(t,n,!0),t.child}function Au(e){var t=e.stateNode;t.pendingContext?Da(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Da(e,t.context,!1),si(e,t.containerInfo)}function zu(e,t,n,r,o){return Bn(),ei(o),t.flags|=256,Ze(e,t,n,r),t.child}var Ci={dehydrated:null,treeContext:null,retryLane:0};function Ni(e){return{baseLanes:e,cachePool:null,transitions:null}}function Du(e,t,n){var r=t.pendingProps,o=_e.current,i=!1,c=(t.flags&128)!==0,v;if((v=c)||(v=e!==null&&e.memoizedState===null?!1:(o&2)!==0),v?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ke(_e,o&1),e===null)return Zo(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(c=r.children,e=r.fallback,i?(r=t.mode,i=t.child,c={mode:"hidden",children:c},(r&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=c):i=Ql(c,r,0,null),e=Sn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Ni(n),t.memoizedState=Ci,e):Pi(t,c));if(o=e.memoizedState,o!==null&&(v=o.dehydrated,v!==null))return Hf(e,t,c,r,v,o,n);if(i){i=r.fallback,c=t.mode,o=e.child,v=o.sibling;var x={mode:"hidden",children:r.children};return(c&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=x,t.deletions=null):(r=rn(o,x),r.subtreeFlags=o.subtreeFlags&14680064),v!==null?i=rn(v,i):(i=Sn(i,c,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,c=e.child.memoizedState,c=c===null?Ni(n):{baseLanes:c.baseLanes|n,cachePool:null,transitions:c.transitions},i.memoizedState=c,i.childLanes=e.childLanes&~n,t.memoizedState=Ci,r}return i=e.child,e=i.sibling,r=rn(i,{mode:"visible",children:r.children}),(t.mode&1)===0&&(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 Pi(e,t){return t=Ql({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Il(e,t,n,r){return r!==null&&ei(r),Fn(t,e.child,null,n),e=Pi(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Hf(e,t,n,r,o,i,c){if(n)return t.flags&256?(t.flags&=-257,r=Si(Error(u(422))),Il(e,t,c,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Ql({mode:"visible",children:r.children},o,0,null),i=Sn(i,o,c,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&Fn(t,e.child,null,c),t.child.memoizedState=Ni(c),t.memoizedState=Ci,i);if((t.mode&1)===0)return Il(e,t,c,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var v=r.dgst;return r=v,i=Error(u(419)),r=Si(i,r,void 0),Il(e,t,c,r)}if(v=(c&e.childLanes)!==0,rt||v){if(r=Ve,r!==null){switch(c&-c){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|c))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,At(e,o),jt(r,e,o,-1))}return Vi(),r=Si(Error(u(421))),Il(e,t,c,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=rp.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,ct=Kt(o.nextSibling),ut=t,Pe=!0,wt=null,e!==null&&(ft[pt++]=Mt,ft[pt++]=Ot,ft[pt++]=fn,Mt=e.id,Ot=e.overflow,fn=t),t=Pi(t,r.children),t.flags|=4096,t)}function Uu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),li(e.return,t,n)}function _i(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Bu(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ze(e,t,r.children,n),r=_e.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Uu(e,n,t);else if(e.tag===19)Uu(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(ke(_e,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Cl(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),_i(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Cl(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}_i(t,!0,n,null,i);break;case"together":_i(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ml(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Dt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),vn|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=rn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=rn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Qf(e,t,n){switch(t.tag){case 3:Au(t),Bn();break;case 5:Za(t);break;case 1:nt(t.type)&&ml(t);break;case 4:si(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ke(Sl,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ke(_e,_e.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Du(e,t,n):(ke(_e,_e.current&1),e=Dt(e,t,n),e!==null?e.sibling:null);ke(_e,_e.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Bu(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ke(_e,_e.current),r)break;return null;case 22:case 23:return t.lanes=0,Iu(e,t,n)}return Dt(e,t,n)}var Fu,Ti,Wu,$u;Fu=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}},Ti=function(){},Wu=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,mn(Pt.current);var i=null;switch(n){case"input":o=ro(e,o),r=ro(e,r),i=[];break;case"select":o=H({},o,{value:void 0}),r=H({},r,{value:void 0}),i=[];break;case"textarea":o=io(e,o),r=io(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=fl)}ao(n,r);var c;n=null;for(R in o)if(!r.hasOwnProperty(R)&&o.hasOwnProperty(R)&&o[R]!=null)if(R==="style"){var v=o[R];for(c in v)v.hasOwnProperty(c)&&(n||(n={}),n[c]="")}else R!=="dangerouslySetInnerHTML"&&R!=="children"&&R!=="suppressContentEditableWarning"&&R!=="suppressHydrationWarning"&&R!=="autoFocus"&&(m.hasOwnProperty(R)?i||(i=[]):(i=i||[]).push(R,null));for(R in r){var x=r[R];if(v=o!=null?o[R]:void 0,r.hasOwnProperty(R)&&x!==v&&(x!=null||v!=null))if(R==="style")if(v){for(c in v)!v.hasOwnProperty(c)||x&&x.hasOwnProperty(c)||(n||(n={}),n[c]="");for(c in x)x.hasOwnProperty(c)&&v[c]!==x[c]&&(n||(n={}),n[c]=x[c])}else n||(i||(i=[]),i.push(R,n)),n=x;else R==="dangerouslySetInnerHTML"?(x=x?x.__html:void 0,v=v?v.__html:void 0,x!=null&&v!==x&&(i=i||[]).push(R,x)):R==="children"?typeof x!="string"&&typeof x!="number"||(i=i||[]).push(R,""+x):R!=="suppressContentEditableWarning"&&R!=="suppressHydrationWarning"&&(m.hasOwnProperty(R)?(x!=null&&R==="onScroll"&&je("scroll",e),i||v===x||(i=[])):(i=i||[]).push(R,x))}n&&(i=i||[]).push("style",n);var R=i;(t.updateQueue=R)&&(t.flags|=4)}},$u=function(e,t,n,r){n!==r&&(t.flags|=4)};function Lr(e,t){if(!Pe)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 be(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Kf(e,t,n){var r=t.pendingProps;switch(bo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return be(t),null;case 1:return nt(t.type)&&hl(),be(t),null;case 3:return r=t.stateNode,Vn(),Ce(tt),Ce(Ge),ci(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(xl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,wt!==null&&(Fi(wt),wt=null))),Ti(e,t),be(t),null;case 5:ai(t);var o=mn(Nr.current);if(n=t.type,e!==null&&t.stateNode!=null)Wu(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(u(166));return be(t),null}if(e=mn(Pt.current),xl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Nt]=t,r[Sr]=i,e=(t.mode&1)!==0,n){case"dialog":je("cancel",r),je("close",r);break;case"iframe":case"object":case"embed":je("load",r);break;case"video":case"audio":for(o=0;o<yr.length;o++)je(yr[o],r);break;case"source":je("error",r);break;case"img":case"image":case"link":je("error",r),je("load",r);break;case"details":je("toggle",r);break;case"input":ks(r,i),je("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},je("invalid",r);break;case"textarea":Cs(r,i),je("invalid",r)}ao(n,i),o=null;for(var c in i)if(i.hasOwnProperty(c)){var v=i[c];c==="children"?typeof v=="string"?r.textContent!==v&&(i.suppressHydrationWarning!==!0&&dl(r.textContent,v,e),o=["children",v]):typeof v=="number"&&r.textContent!==""+v&&(i.suppressHydrationWarning!==!0&&dl(r.textContent,v,e),o=["children",""+v]):m.hasOwnProperty(c)&&v!=null&&c==="onScroll"&&je("scroll",r)}switch(n){case"input":$r(r),js(r,i,!0);break;case"textarea":$r(r),Ps(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=fl)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=_s(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=c.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),n==="select"&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Nt]=t,e[Sr]=r,Fu(e,t,!1,!1),t.stateNode=e;e:{switch(c=uo(n,r),n){case"dialog":je("cancel",e),je("close",e),o=r;break;case"iframe":case"object":case"embed":je("load",e),o=r;break;case"video":case"audio":for(o=0;o<yr.length;o++)je(yr[o],e);o=r;break;case"source":je("error",e),o=r;break;case"img":case"image":case"link":je("error",e),je("load",e),o=r;break;case"details":je("toggle",e),o=r;break;case"input":ks(e,r),o=ro(e,r),je("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=H({},r,{value:void 0}),je("invalid",e);break;case"textarea":Cs(e,r),o=io(e,r),je("invalid",e);break;default:o=r}ao(n,o),v=o;for(i in v)if(v.hasOwnProperty(i)){var x=v[i];i==="style"?Ls(e,x):i==="dangerouslySetInnerHTML"?(x=x?x.__html:void 0,x!=null&&Ts(e,x)):i==="children"?typeof x=="string"?(n!=="textarea"||x!=="")&&Zn(e,x):typeof x=="number"&&Zn(e,""+x):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(m.hasOwnProperty(i)?x!=null&&i==="onScroll"&&je("scroll",e):x!=null&&U(e,i,x,c))}switch(n){case"input":$r(e),js(e,r,!1);break;case"textarea":$r(e),Ps(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ye(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?jn(e,!!r.multiple,i,!1):r.defaultValue!=null&&jn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=fl)}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 be(t),null;case 6:if(e&&t.stateNode!=null)$u(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(u(166));if(n=mn(Nr.current),mn(Pt.current),xl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Nt]=t,(i=r.nodeValue!==n)&&(e=ut,e!==null))switch(e.tag){case 3:dl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&dl(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Nt]=t,t.stateNode=r}return be(t),null;case 13:if(Ce(_e),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Pe&&ct!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Qa(),Bn(),t.flags|=98560,i=!1;else if(i=xl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(u(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(u(317));i[Nt]=t}else Bn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;be(t),i=!1}else wt!==null&&(Fi(wt),wt=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(_e.current&1)!==0?Be===0&&(Be=3):Vi())),t.updateQueue!==null&&(t.flags|=4),be(t),null);case 4:return Vn(),Ti(e,t),e===null&&xr(t.stateNode.containerInfo),be(t),null;case 10:return ri(t.type._context),be(t),null;case 17:return nt(t.type)&&hl(),be(t),null;case 19:if(Ce(_e),i=t.memoizedState,i===null)return be(t),null;if(r=(t.flags&128)!==0,c=i.rendering,c===null)if(r)Lr(i,!1);else{if(Be!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Cl(e),c!==null){for(t.flags|=128,Lr(i,!1),r=c.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,c=i.alternate,c===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=c.childLanes,i.lanes=c.lanes,i.child=c.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=c.memoizedProps,i.memoizedState=c.memoizedState,i.updateQueue=c.updateQueue,i.type=c.type,e=c.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ke(_e,_e.current&1|2),t.child}e=e.sibling}i.tail!==null&&Me()>Yn&&(t.flags|=128,r=!0,Lr(i,!1),t.lanes=4194304)}else{if(!r)if(e=Cl(c),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Lr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!c.alternate&&!Pe)return be(t),null}else 2*Me()-i.renderingStartTime>Yn&&n!==1073741824&&(t.flags|=128,r=!0,Lr(i,!1),t.lanes=4194304);i.isBackwards?(c.sibling=t.child,t.child=c):(n=i.last,n!==null?n.sibling=c:t.child=c,i.last=c)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Me(),t.sibling=null,n=_e.current,ke(_e,r?n&1|2:n&1),t):(be(t),null);case 22:case 23:return $i(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(dt&1073741824)!==0&&(be(t),t.subtreeFlags&6&&(t.flags|=8192)):be(t),null;case 24:return null;case 25:return null}throw Error(u(156,t.tag))}function Yf(e,t){switch(bo(t),t.tag){case 1:return nt(t.type)&&hl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vn(),Ce(tt),Ce(Ge),ci(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return ai(t),null;case 13:if(Ce(_e),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Bn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ce(_e),null;case 4:return Vn(),null;case 10:return ri(t.type._context),null;case 22:case 23:return $i(),null;case 24:return null;default:return null}}var Ol=!1,qe=!1,Jf=typeof WeakSet=="function"?WeakSet:Set,K=null;function Qn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Re(e,t,r)}else n.current=null}function Ri(e,t,n){try{n()}catch(r){Re(e,t,r)}}var Vu=!1;function Gf(e,t){if($o=el,e=Sa(),Oo(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 o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var c=0,v=-1,x=-1,R=0,z=0,D=e,A=null;t:for(;;){for(var Q;D!==n||o!==0&&D.nodeType!==3||(v=c+o),D!==i||r!==0&&D.nodeType!==3||(x=c+r),D.nodeType===3&&(c+=D.nodeValue.length),(Q=D.firstChild)!==null;)A=D,D=Q;for(;;){if(D===e)break t;if(A===n&&++R===o&&(v=c),A===i&&++z===r&&(x=c),(Q=D.nextSibling)!==null)break;D=A,A=D.parentNode}D=Q}n=v===-1||x===-1?null:{start:v,end:x}}else n=null}n=n||{start:0,end:0}}else n=null;for(Vo={focusedElem:e,selectionRange:n},el=!1,K=t;K!==null;)if(t=K,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,K=e;else for(;K!==null;){t=K;try{var J=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(J!==null){var G=J.memoizedProps,Oe=J.memoizedState,_=t.stateNode,S=_.getSnapshotBeforeUpdate(t.elementType===t.type?G:St(t.type,G),Oe);_.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(u(163))}}catch(B){Re(t,t.return,B)}if(e=t.sibling,e!==null){e.return=t.return,K=e;break}K=t.return}return J=Vu,Vu=!1,J}function Ir(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Ri(t,n,i)}o=o.next}while(o!==r)}}function Al(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 Li(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 Hu(e){var t=e.alternate;t!==null&&(e.alternate=null,Hu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Nt],delete t[Sr],delete t[Yo],delete t[Lf],delete t[If])),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 Qu(e){return e.tag===5||e.tag===3||e.tag===4}function Ku(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Qu(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 Ii(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=fl));else if(r!==4&&(e=e.child,e!==null))for(Ii(e,t,n),e=e.sibling;e!==null;)Ii(e,t,n),e=e.sibling}function Mi(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(Mi(e,t,n),e=e.sibling;e!==null;)Mi(e,t,n),e=e.sibling}var Qe=null,kt=!1;function qt(e,t,n){for(n=n.child;n!==null;)Yu(e,t,n),n=n.sibling}function Yu(e,t,n){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(Jr,n)}catch{}switch(n.tag){case 5:qe||Qn(n,t);case 6:var r=Qe,o=kt;Qe=null,qt(e,t,n),Qe=r,kt=o,Qe!==null&&(kt?(e=Qe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Qe.removeChild(n.stateNode));break;case 18:Qe!==null&&(kt?(e=Qe,n=n.stateNode,e.nodeType===8?Ko(e.parentNode,n):e.nodeType===1&&Ko(e,n),cr(e)):Ko(Qe,n.stateNode));break;case 4:r=Qe,o=kt,Qe=n.stateNode.containerInfo,kt=!0,qt(e,t,n),Qe=r,kt=o;break;case 0:case 11:case 14:case 15:if(!qe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,c=i.destroy;i=i.tag,c!==void 0&&((i&2)!==0||(i&4)!==0)&&Ri(n,t,c),o=o.next}while(o!==r)}qt(e,t,n);break;case 1:if(!qe&&(Qn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(v){Re(n,t,v)}qt(e,t,n);break;case 21:qt(e,t,n);break;case 22:n.mode&1?(qe=(r=qe)||n.memoizedState!==null,qt(e,t,n),qe=r):qt(e,t,n);break;default:qt(e,t,n)}}function Ju(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Jf),t.forEach(function(r){var o=lp.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Et(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,c=t,v=c;e:for(;v!==null;){switch(v.tag){case 5:Qe=v.stateNode,kt=!1;break e;case 3:Qe=v.stateNode.containerInfo,kt=!0;break e;case 4:Qe=v.stateNode.containerInfo,kt=!0;break e}v=v.return}if(Qe===null)throw Error(u(160));Yu(i,c,o),Qe=null,kt=!1;var x=o.alternate;x!==null&&(x.return=null),o.return=null}catch(R){Re(o,t,R)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Gu(t,e),t=t.sibling}function Gu(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Et(t,e),Tt(e),r&4){try{Ir(3,e,e.return),Al(3,e)}catch(G){Re(e,e.return,G)}try{Ir(5,e,e.return)}catch(G){Re(e,e.return,G)}}break;case 1:Et(t,e),Tt(e),r&512&&n!==null&&Qn(n,n.return);break;case 5:if(Et(t,e),Tt(e),r&512&&n!==null&&Qn(n,n.return),e.flags&32){var o=e.stateNode;try{Zn(o,"")}catch(G){Re(e,e.return,G)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,c=n!==null?n.memoizedProps:i,v=e.type,x=e.updateQueue;if(e.updateQueue=null,x!==null)try{v==="input"&&i.type==="radio"&&i.name!=null&&Es(o,i),uo(v,c);var R=uo(v,i);for(c=0;c<x.length;c+=2){var z=x[c],D=x[c+1];z==="style"?Ls(o,D):z==="dangerouslySetInnerHTML"?Ts(o,D):z==="children"?Zn(o,D):U(o,z,D,R)}switch(v){case"input":lo(o,i);break;case"textarea":Ns(o,i);break;case"select":var A=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var Q=i.value;Q!=null?jn(o,!!i.multiple,Q,!1):A!==!!i.multiple&&(i.defaultValue!=null?jn(o,!!i.multiple,i.defaultValue,!0):jn(o,!!i.multiple,i.multiple?[]:"",!1))}o[Sr]=i}catch(G){Re(e,e.return,G)}}break;case 6:if(Et(t,e),Tt(e),r&4){if(e.stateNode===null)throw Error(u(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(G){Re(e,e.return,G)}}break;case 3:if(Et(t,e),Tt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{cr(t.containerInfo)}catch(G){Re(e,e.return,G)}break;case 4:Et(t,e),Tt(e);break;case 13:Et(t,e),Tt(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(zi=Me())),r&4&&Ju(e);break;case 22:if(z=n!==null&&n.memoizedState!==null,e.mode&1?(qe=(R=qe)||z,Et(t,e),qe=R):Et(t,e),Tt(e),r&8192){if(R=e.memoizedState!==null,(e.stateNode.isHidden=R)&&!z&&(e.mode&1)!==0)for(K=e,z=e.child;z!==null;){for(D=K=z;K!==null;){switch(A=K,Q=A.child,A.tag){case 0:case 11:case 14:case 15:Ir(4,A,A.return);break;case 1:Qn(A,A.return);var J=A.stateNode;if(typeof J.componentWillUnmount=="function"){r=A,n=A.return;try{t=r,J.props=t.memoizedProps,J.state=t.memoizedState,J.componentWillUnmount()}catch(G){Re(r,n,G)}}break;case 5:Qn(A,A.return);break;case 22:if(A.memoizedState!==null){qu(D);continue}}Q!==null?(Q.return=A,K=Q):qu(D)}z=z.sibling}e:for(z=null,D=e;;){if(D.tag===5){if(z===null){z=D;try{o=D.stateNode,R?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(v=D.stateNode,x=D.memoizedProps.style,c=x!=null&&x.hasOwnProperty("display")?x.display:null,v.style.display=Rs("display",c))}catch(G){Re(e,e.return,G)}}}else if(D.tag===6){if(z===null)try{D.stateNode.nodeValue=R?"":D.memoizedProps}catch(G){Re(e,e.return,G)}}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;z===D&&(z=null),D=D.return}z===D&&(z=null),D.sibling.return=D.return,D=D.sibling}}break;case 19:Et(t,e),Tt(e),r&4&&Ju(e);break;case 21:break;default:Et(t,e),Tt(e)}}function Tt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Qu(n)){var r=n;break e}n=n.return}throw Error(u(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Zn(o,""),r.flags&=-33);var i=Ku(e);Mi(e,i,o);break;case 3:case 4:var c=r.stateNode.containerInfo,v=Ku(e);Ii(e,v,c);break;default:throw Error(u(161))}}catch(x){Re(e,e.return,x)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Xf(e,t,n){K=e,Xu(e)}function Xu(e,t,n){for(var r=(e.mode&1)!==0;K!==null;){var o=K,i=o.child;if(o.tag===22&&r){var c=o.memoizedState!==null||Ol;if(!c){var v=o.alternate,x=v!==null&&v.memoizedState!==null||qe;v=Ol;var R=qe;if(Ol=c,(qe=x)&&!R)for(K=o;K!==null;)c=K,x=c.child,c.tag===22&&c.memoizedState!==null?Zu(o):x!==null?(x.return=c,K=x):Zu(o);for(;i!==null;)K=i,Xu(i),i=i.sibling;K=o,Ol=v,qe=R}bu(e)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,K=i):bu(e)}}function bu(e){for(;K!==null;){var t=K;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:qe||Al(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!qe)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:St(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&qa(t,i,r);break;case 3:var c=t.updateQueue;if(c!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}qa(t,c,n)}break;case 5:var v=t.stateNode;if(n===null&&t.flags&4){n=v;var x=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":x.autoFocus&&n.focus();break;case"img":x.src&&(n.src=x.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var R=t.alternate;if(R!==null){var z=R.memoizedState;if(z!==null){var D=z.dehydrated;D!==null&&cr(D)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(u(163))}qe||t.flags&512&&Li(t)}catch(A){Re(t,t.return,A)}}if(t===e){K=null;break}if(n=t.sibling,n!==null){n.return=t.return,K=n;break}K=t.return}}function qu(e){for(;K!==null;){var t=K;if(t===e){K=null;break}var n=t.sibling;if(n!==null){n.return=t.return,K=n;break}K=t.return}}function Zu(e){for(;K!==null;){var t=K;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Al(4,t)}catch(x){Re(t,n,x)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(x){Re(t,o,x)}}var i=t.return;try{Li(t)}catch(x){Re(t,i,x)}break;case 5:var c=t.return;try{Li(t)}catch(x){Re(t,c,x)}}}catch(x){Re(t,t.return,x)}if(t===e){K=null;break}var v=t.sibling;if(v!==null){v.return=t.return,K=v;break}K=t.return}}var bf=Math.ceil,zl=F.ReactCurrentDispatcher,Oi=F.ReactCurrentOwner,gt=F.ReactCurrentBatchConfig,ce=0,Ve=null,De=null,Ke=0,dt=0,Kn=Yt(0),Be=0,Mr=null,vn=0,Dl=0,Ai=0,Or=null,lt=null,zi=0,Yn=1/0,Ut=null,Ul=!1,Di=null,Zt=null,Bl=!1,en=null,Fl=0,Ar=0,Ui=null,Wl=-1,$l=0;function et(){return(ce&6)!==0?Me():Wl!==-1?Wl:Wl=Me()}function tn(e){return(e.mode&1)===0?1:(ce&2)!==0&&Ke!==0?Ke&-Ke:Of.transition!==null?($l===0&&($l=Ks()),$l):(e=xe,e!==0||(e=window.event,e=e===void 0?16:ta(e.type)),e)}function jt(e,t,n,r){if(50<Ar)throw Ar=0,Ui=null,Error(u(185));or(e,n,r),((ce&2)===0||e!==Ve)&&(e===Ve&&((ce&2)===0&&(Dl|=n),Be===4&&nn(e,Ke)),ot(e,r),n===1&&ce===0&&(t.mode&1)===0&&(Yn=Me()+500,gl&&Gt()))}function ot(e,t){var n=e.callbackNode;Md(e,t);var r=br(e,e===Ve?Ke:0);if(r===0)n!==null&&Vs(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Vs(n),t===1)e.tag===0?Mf(tc.bind(null,e)):Fa(tc.bind(null,e)),Tf(function(){(ce&6)===0&&Gt()}),n=null;else{switch(Ys(r)){case 1:n=vo;break;case 4:n=Hs;break;case 16:n=Yr;break;case 536870912:n=Qs;break;default:n=Yr}n=uc(n,ec.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ec(e,t){if(Wl=-1,$l=0,(ce&6)!==0)throw Error(u(327));var n=e.callbackNode;if(Jn()&&e.callbackNode!==n)return null;var r=br(e,e===Ve?Ke:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Vl(e,r);else{t=r;var o=ce;ce|=2;var i=rc();(Ve!==e||Ke!==t)&&(Ut=null,Yn=Me()+500,xn(e,t));do try{ep();break}catch(v){nc(e,v)}while(!0);ni(),zl.current=i,ce=o,De!==null?t=0:(Ve=null,Ke=0,t=Be)}if(t!==0){if(t===2&&(o=yo(e),o!==0&&(r=o,t=Bi(e,o))),t===1)throw n=Mr,xn(e,0),nn(e,r),ot(e,Me()),n;if(t===6)nn(e,r);else{if(o=e.current.alternate,(r&30)===0&&!qf(o)&&(t=Vl(e,r),t===2&&(i=yo(e),i!==0&&(r=i,t=Bi(e,i))),t===1))throw n=Mr,xn(e,0),nn(e,r),ot(e,Me()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(u(345));case 2:wn(e,lt,Ut);break;case 3:if(nn(e,r),(r&130023424)===r&&(t=zi+500-Me(),10<t)){if(br(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){et(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Qo(wn.bind(null,e,lt,Ut),t);break}wn(e,lt,Ut);break;case 4:if(nn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var c=31-yt(r);i=1<<c,c=t[c],c>o&&(o=c),r&=~i}if(r=o,r=Me()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*bf(r/1960))-r,10<r){e.timeoutHandle=Qo(wn.bind(null,e,lt,Ut),r);break}wn(e,lt,Ut);break;case 5:wn(e,lt,Ut);break;default:throw Error(u(329))}}}return ot(e,Me()),e.callbackNode===n?ec.bind(null,e):null}function Bi(e,t){var n=Or;return e.current.memoizedState.isDehydrated&&(xn(e,t).flags|=256),e=Vl(e,t),e!==2&&(t=lt,lt=n,t!==null&&Fi(t)),e}function Fi(e){lt===null?lt=e:lt.push.apply(lt,e)}function qf(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 o=n[r],i=o.getSnapshot;o=o.value;try{if(!xt(i(),o))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 nn(e,t){for(t&=~Ai,t&=~Dl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-yt(t),r=1<<n;e[n]=-1,t&=~r}}function tc(e){if((ce&6)!==0)throw Error(u(327));Jn();var t=br(e,0);if((t&1)===0)return ot(e,Me()),null;var n=Vl(e,t);if(e.tag!==0&&n===2){var r=yo(e);r!==0&&(t=r,n=Bi(e,r))}if(n===1)throw n=Mr,xn(e,0),nn(e,t),ot(e,Me()),n;if(n===6)throw Error(u(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wn(e,lt,Ut),ot(e,Me()),null}function Wi(e,t){var n=ce;ce|=1;try{return e(t)}finally{ce=n,ce===0&&(Yn=Me()+500,gl&&Gt())}}function yn(e){en!==null&&en.tag===0&&(ce&6)===0&&Jn();var t=ce;ce|=1;var n=gt.transition,r=xe;try{if(gt.transition=null,xe=1,e)return e()}finally{xe=r,gt.transition=n,ce=t,(ce&6)===0&&Gt()}}function $i(){dt=Kn.current,Ce(Kn)}function xn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,_f(n)),De!==null)for(n=De.return;n!==null;){var r=n;switch(bo(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&hl();break;case 3:Vn(),Ce(tt),Ce(Ge),ci();break;case 5:ai(r);break;case 4:Vn();break;case 13:Ce(_e);break;case 19:Ce(_e);break;case 10:ri(r.type._context);break;case 22:case 23:$i()}n=n.return}if(Ve=e,De=e=rn(e.current,null),Ke=dt=t,Be=0,Mr=null,Ai=Dl=vn=0,lt=Or=null,hn!==null){for(t=0;t<hn.length;t++)if(n=hn[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var c=i.next;i.next=o,r.next=c}n.pending=r}hn=null}return e}function nc(e,t){do{var n=De;try{if(ni(),Nl.current=Rl,Pl){for(var r=Te.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Pl=!1}if(gn=0,$e=Ue=Te=null,Pr=!1,_r=0,Oi.current=null,n===null||n.return===null){Be=1,Mr=t,De=null;break}e:{var i=e,c=n.return,v=n,x=t;if(t=Ke,v.flags|=32768,x!==null&&typeof x=="object"&&typeof x.then=="function"){var R=x,z=v,D=z.tag;if((z.mode&1)===0&&(D===0||D===11||D===15)){var A=z.alternate;A?(z.updateQueue=A.updateQueue,z.memoizedState=A.memoizedState,z.lanes=A.lanes):(z.updateQueue=null,z.memoizedState=null)}var Q=Pu(c);if(Q!==null){Q.flags&=-257,_u(Q,c,v,i,t),Q.mode&1&&Nu(i,R,t),t=Q,x=R;var J=t.updateQueue;if(J===null){var G=new Set;G.add(x),t.updateQueue=G}else J.add(x);break e}else{if((t&1)===0){Nu(i,R,t),Vi();break e}x=Error(u(426))}}else if(Pe&&v.mode&1){var Oe=Pu(c);if(Oe!==null){(Oe.flags&65536)===0&&(Oe.flags|=256),_u(Oe,c,v,i,t),ei(Hn(x,v));break e}}i=x=Hn(x,v),Be!==4&&(Be=2),Or===null?Or=[i]:Or.push(i),i=c;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var _=ju(i,x,t);ba(i,_);break e;case 1:v=x;var S=i.type,T=i.stateNode;if((i.flags&128)===0&&(typeof S.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Zt===null||!Zt.has(T)))){i.flags|=65536,t&=-t,i.lanes|=t;var B=Cu(i,v,t);ba(i,B);break e}}i=i.return}while(i!==null)}oc(n)}catch(Z){t=Z,De===n&&n!==null&&(De=n=n.return);continue}break}while(!0)}function rc(){var e=zl.current;return zl.current=Rl,e===null?Rl:e}function Vi(){(Be===0||Be===3||Be===2)&&(Be=4),Ve===null||(vn&268435455)===0&&(Dl&268435455)===0||nn(Ve,Ke)}function Vl(e,t){var n=ce;ce|=2;var r=rc();(Ve!==e||Ke!==t)&&(Ut=null,xn(e,t));do try{Zf();break}catch(o){nc(e,o)}while(!0);if(ni(),ce=n,zl.current=r,De!==null)throw Error(u(261));return Ve=null,Ke=0,Be}function Zf(){for(;De!==null;)lc(De)}function ep(){for(;De!==null&&!jd();)lc(De)}function lc(e){var t=ac(e.alternate,e,dt);e.memoizedProps=e.pendingProps,t===null?oc(e):De=t,Oi.current=null}function oc(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=Kf(n,t,dt),n!==null){De=n;return}}else{if(n=Yf(n,t),n!==null){n.flags&=32767,De=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Be=6,De=null;return}}if(t=t.sibling,t!==null){De=t;return}De=t=e}while(t!==null);Be===0&&(Be=5)}function wn(e,t,n){var r=xe,o=gt.transition;try{gt.transition=null,xe=1,tp(e,t,n,r)}finally{gt.transition=o,xe=r}return null}function tp(e,t,n,r){do Jn();while(en!==null);if((ce&6)!==0)throw Error(u(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(u(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Od(e,i),e===Ve&&(De=Ve=null,Ke=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Bl||(Bl=!0,uc(Yr,function(){return Jn(),null})),i=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||i){i=gt.transition,gt.transition=null;var c=xe;xe=1;var v=ce;ce|=4,Oi.current=null,Gf(e,n),Gu(n,e),Sf(Vo),el=!!$o,Vo=$o=null,e.current=n,Xf(n),Cd(),ce=v,xe=c,gt.transition=i}else e.current=n;if(Bl&&(Bl=!1,en=e,Fl=o),i=e.pendingLanes,i===0&&(Zt=null),_d(n.stateNode),ot(e,Me()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Ul)throw Ul=!1,e=Di,Di=null,e;return(Fl&1)!==0&&e.tag!==0&&Jn(),i=e.pendingLanes,(i&1)!==0?e===Ui?Ar++:(Ar=0,Ui=e):Ar=0,Gt(),null}function Jn(){if(en!==null){var e=Ys(Fl),t=gt.transition,n=xe;try{if(gt.transition=null,xe=16>e?16:e,en===null)var r=!1;else{if(e=en,en=null,Fl=0,(ce&6)!==0)throw Error(u(331));var o=ce;for(ce|=4,K=e.current;K!==null;){var i=K,c=i.child;if((K.flags&16)!==0){var v=i.deletions;if(v!==null){for(var x=0;x<v.length;x++){var R=v[x];for(K=R;K!==null;){var z=K;switch(z.tag){case 0:case 11:case 15:Ir(8,z,i)}var D=z.child;if(D!==null)D.return=z,K=D;else for(;K!==null;){z=K;var A=z.sibling,Q=z.return;if(Hu(z),z===R){K=null;break}if(A!==null){A.return=Q,K=A;break}K=Q}}}var J=i.alternate;if(J!==null){var G=J.child;if(G!==null){J.child=null;do{var Oe=G.sibling;G.sibling=null,G=Oe}while(G!==null)}}K=i}}if((i.subtreeFlags&2064)!==0&&c!==null)c.return=i,K=c;else e:for(;K!==null;){if(i=K,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:Ir(9,i,i.return)}var _=i.sibling;if(_!==null){_.return=i.return,K=_;break e}K=i.return}}var S=e.current;for(K=S;K!==null;){c=K;var T=c.child;if((c.subtreeFlags&2064)!==0&&T!==null)T.return=c,K=T;else e:for(c=S;K!==null;){if(v=K,(v.flags&2048)!==0)try{switch(v.tag){case 0:case 11:case 15:Al(9,v)}}catch(Z){Re(v,v.return,Z)}if(v===c){K=null;break e}var B=v.sibling;if(B!==null){B.return=v.return,K=B;break e}K=v.return}}if(ce=o,Gt(),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(Jr,e)}catch{}r=!0}return r}finally{xe=n,gt.transition=t}}return!1}function ic(e,t,n){t=Hn(n,t),t=ju(e,t,1),e=bt(e,t,1),t=et(),e!==null&&(or(e,1,t),ot(e,t))}function Re(e,t,n){if(e.tag===3)ic(e,e,n);else for(;t!==null;){if(t.tag===3){ic(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Zt===null||!Zt.has(r))){e=Hn(n,e),e=Cu(t,e,1),t=bt(t,e,1),e=et(),t!==null&&(or(t,1,e),ot(t,e));break}}t=t.return}}function np(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=et(),e.pingedLanes|=e.suspendedLanes&n,Ve===e&&(Ke&n)===n&&(Be===4||Be===3&&(Ke&130023424)===Ke&&500>Me()-zi?xn(e,0):Ai|=n),ot(e,t)}function sc(e,t){t===0&&((e.mode&1)===0?t=1:(t=Xr,Xr<<=1,(Xr&130023424)===0&&(Xr=4194304)));var n=et();e=At(e,t),e!==null&&(or(e,t,n),ot(e,n))}function rp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),sc(e,n)}function lp(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(u(314))}r!==null&&r.delete(t),sc(e,n)}var ac;ac=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||tt.current)rt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return rt=!1,Qf(e,t,n);rt=(e.flags&131072)!==0}else rt=!1,Pe&&(t.flags&1048576)!==0&&Wa(t,yl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ml(e,t),e=t.pendingProps;var o=zn(t,Ge.current);$n(t,n),o=pi(null,t,r,e,o,n);var i=hi();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,nt(r)?(i=!0,ml(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,ii(t),o.updater=Ll,t.stateNode=o,o._reactInternals=t,wi(t,r,e,n),t=ji(null,t,r,!0,i,n)):(t.tag=0,Pe&&i&&Xo(t),Ze(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ml(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=ip(r),e=St(r,e),o){case 0:t=Ei(null,t,r,e,n);break e;case 1:t=Ou(null,t,r,e,n);break e;case 11:t=Tu(null,t,r,e,n);break e;case 14:t=Ru(null,t,r,St(r.type,e),n);break e}throw Error(u(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:St(r,o),Ei(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:St(r,o),Ou(e,t,r,o,n);case 3:e:{if(Au(t),e===null)throw Error(u(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Xa(e,t),jl(t,r,null,n);var c=t.memoizedState;if(r=c.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:c.cache,pendingSuspenseBoundaries:c.pendingSuspenseBoundaries,transitions:c.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Hn(Error(u(423)),t),t=zu(e,t,r,n,o);break e}else if(r!==o){o=Hn(Error(u(424)),t),t=zu(e,t,r,n,o);break e}else for(ct=Kt(t.stateNode.containerInfo.firstChild),ut=t,Pe=!0,wt=null,n=Ja(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Bn(),r===o){t=Dt(e,t,n);break e}Ze(e,t,r,n)}t=t.child}return t;case 5:return Za(t),e===null&&Zo(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,c=o.children,Ho(r,o)?c=null:i!==null&&Ho(r,i)&&(t.flags|=32),Mu(e,t),Ze(e,t,c,n),t.child;case 6:return e===null&&Zo(t),null;case 13:return Du(e,t,n);case 4:return si(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fn(t,null,r,n):Ze(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:St(r,o),Tu(e,t,r,o,n);case 7:return Ze(e,t,t.pendingProps,n),t.child;case 8:return Ze(e,t,t.pendingProps.children,n),t.child;case 12:return Ze(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,c=o.value,ke(Sl,r._currentValue),r._currentValue=c,i!==null)if(xt(i.value,c)){if(i.children===o.children&&!tt.current){t=Dt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var v=i.dependencies;if(v!==null){c=i.child;for(var x=v.firstContext;x!==null;){if(x.context===r){if(i.tag===1){x=zt(-1,n&-n),x.tag=2;var R=i.updateQueue;if(R!==null){R=R.shared;var z=R.pending;z===null?x.next=x:(x.next=z.next,z.next=x),R.pending=x}}i.lanes|=n,x=i.alternate,x!==null&&(x.lanes|=n),li(i.return,n,t),v.lanes|=n;break}x=x.next}}else if(i.tag===10)c=i.type===t.type?null:i.child;else if(i.tag===18){if(c=i.return,c===null)throw Error(u(341));c.lanes|=n,v=c.alternate,v!==null&&(v.lanes|=n),li(c,n,t),c=i.sibling}else c=i.child;if(c!==null)c.return=i;else for(c=i;c!==null;){if(c===t){c=null;break}if(i=c.sibling,i!==null){i.return=c.return,c=i;break}c=c.return}i=c}Ze(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,$n(t,n),o=ht(o),r=r(o),t.flags|=1,Ze(e,t,r,n),t.child;case 14:return r=t.type,o=St(r,t.pendingProps),o=St(r.type,o),Ru(e,t,r,o,n);case 15:return Lu(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:St(r,o),Ml(e,t),t.tag=1,nt(r)?(e=!0,ml(t)):e=!1,$n(t,n),ku(t,r,o),wi(t,r,o,n),ji(null,t,r,!0,e,n);case 19:return Bu(e,t,n);case 22:return Iu(e,t,n)}throw Error(u(156,t.tag))};function uc(e,t){return $s(e,t)}function op(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 vt(e,t,n,r){return new op(e,t,n,r)}function Hi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ip(e){if(typeof e=="function")return Hi(e)?1:0;if(e!=null){if(e=e.$$typeof,e===le)return 11;if(e===ge)return 14}return 2}function rn(e,t){var n=e.alternate;return n===null?(n=vt(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 Hl(e,t,n,r,o,i){var c=2;if(r=e,typeof e=="function")Hi(e)&&(c=1);else if(typeof e=="string")c=5;else e:switch(e){case we:return Sn(n.children,o,i,t);case me:c=8,o|=8;break;case q:return e=vt(12,n,t,o|2),e.elementType=q,e.lanes=i,e;case $:return e=vt(13,n,t,o),e.elementType=$,e.lanes=i,e;case ve:return e=vt(19,n,t,o),e.elementType=ve,e.lanes=i,e;case V:return Ql(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ie:c=10;break e;case Ee:c=9;break e;case le:c=11;break e;case ge:c=14;break e;case ze:c=16,r=null;break e}throw Error(u(130,e==null?e:typeof e,""))}return t=vt(c,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Sn(e,t,n,r){return e=vt(7,e,r,t),e.lanes=n,e}function Ql(e,t,n,r){return e=vt(22,e,r,t),e.elementType=V,e.lanes=n,e.stateNode={isHidden:!1},e}function Qi(e,t,n){return e=vt(6,e,null,t),e.lanes=n,e}function Ki(e,t,n){return t=vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function sp(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=xo(0),this.expirationTimes=xo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xo(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Yi(e,t,n,r,o,i,c,v,x){return e=new sp(e,t,n,v,x),t===1?(t=1,i===!0&&(t|=8)):t=0,i=vt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ii(i),e}function ap(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:te,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function cc(e){if(!e)return Jt;e=e._reactInternals;e:{if(un(e)!==e||e.tag!==1)throw Error(u(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(nt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(u(171))}if(e.tag===1){var n=e.type;if(nt(n))return Ua(e,n,t)}return t}function dc(e,t,n,r,o,i,c,v,x){return e=Yi(n,r,!0,e,o,i,c,v,x),e.context=cc(null),n=e.current,r=et(),o=tn(n),i=zt(r,o),i.callback=t??null,bt(n,i,o),e.current.lanes=o,or(e,o,r),ot(e,r),e}function Kl(e,t,n,r){var o=t.current,i=et(),c=tn(o);return n=cc(n),t.context===null?t.context=n:t.pendingContext=n,t=zt(i,c),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=bt(o,t,c),e!==null&&(jt(e,o,c,i),El(e,o,c)),c}function Yl(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 fc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ji(e,t){fc(e,t),(e=e.alternate)&&fc(e,t)}function up(){return null}var pc=typeof reportError=="function"?reportError:function(e){console.error(e)};function Gi(e){this._internalRoot=e}Jl.prototype.render=Gi.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));Kl(e,t,null,null)},Jl.prototype.unmount=Gi.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;yn(function(){Kl(null,e,null,null)}),t[Lt]=null}};function Jl(e){this._internalRoot=e}Jl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xs();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Vt.length&&t!==0&&t<Vt[n].priority;n++);Vt.splice(n,0,e),n===0&&Zs(e)}};function Xi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Gl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function hc(){}function cp(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var R=Yl(c);i.call(R)}}var c=dc(t,r,e,0,null,!1,!1,"",hc);return e._reactRootContainer=c,e[Lt]=c.current,xr(e.nodeType===8?e.parentNode:e),yn(),c}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var v=r;r=function(){var R=Yl(x);v.call(R)}}var x=Yi(e,0,!1,null,null,!1,!1,"",hc);return e._reactRootContainer=x,e[Lt]=x.current,xr(e.nodeType===8?e.parentNode:e),yn(function(){Kl(t,x,n,r)}),x}function Xl(e,t,n,r,o){var i=n._reactRootContainer;if(i){var c=i;if(typeof o=="function"){var v=o;o=function(){var x=Yl(c);v.call(x)}}Kl(t,c,e,o)}else c=cp(n,t,e,o,r);return Yl(c)}Js=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=lr(t.pendingLanes);n!==0&&(wo(t,n|1),ot(t,Me()),(ce&6)===0&&(Yn=Me()+500,Gt()))}break;case 13:yn(function(){var r=At(e,1);if(r!==null){var o=et();jt(r,e,1,o)}}),Ji(e,1)}},So=function(e){if(e.tag===13){var t=At(e,134217728);if(t!==null){var n=et();jt(t,e,134217728,n)}Ji(e,134217728)}},Gs=function(e){if(e.tag===13){var t=tn(e),n=At(e,t);if(n!==null){var r=et();jt(n,e,t,r)}Ji(e,t)}},Xs=function(){return xe},bs=function(e,t){var n=xe;try{return xe=e,t()}finally{xe=n}},po=function(e,t,n){switch(t){case"input":if(lo(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 o=pl(r);if(!o)throw Error(u(90));Ss(r),lo(r,o)}}}break;case"textarea":Ns(e,n);break;case"select":t=n.value,t!=null&&jn(e,!!n.multiple,t,!1)}},As=Wi,zs=yn;var dp={usingClientEntryPoint:!1,Events:[kr,On,pl,Ms,Os,Wi]},zr={findFiberByHostInstance:cn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},fp={bundleType:zr.bundleType,version:zr.version,rendererPackageName:zr.rendererPackageName,rendererConfig:zr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:F.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Fs(e),e===null?null:e.stateNode},findFiberByHostInstance:zr.findFiberByHostInstance||up,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 bl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bl.isDisabled&&bl.supportsFiber)try{Jr=bl.inject(fp),Ct=bl}catch{}}return it.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dp,it.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Xi(t))throw Error(u(200));return ap(e,t,null,n)},it.createRoot=function(e,t){if(!Xi(e))throw Error(u(299));var n=!1,r="",o=pc;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Yi(e,1,!1,null,null,n,!1,r,o),e[Lt]=t.current,xr(e.nodeType===8?e.parentNode:e),new Gi(t)},it.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(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=Fs(t),e=e===null?null:e.stateNode,e},it.flushSync=function(e){return yn(e)},it.hydrate=function(e,t,n){if(!Gl(t))throw Error(u(200));return Xl(null,e,t,!0,n)},it.hydrateRoot=function(e,t,n){if(!Xi(e))throw Error(u(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",c=pc;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(c=n.onRecoverableError)),t=dc(t,null,e,1,n??null,o,!1,i,c),e[Lt]=t.current,xr(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Jl(t)},it.render=function(e,t,n){if(!Gl(t))throw Error(u(200));return Xl(null,e,t,!1,n)},it.unmountComponentAtNode=function(e){if(!Gl(e))throw Error(u(40));return e._reactRootContainer?(yn(function(){Xl(null,null,e,!1,function(){e._reactRootContainer=null,e[Lt]=null})}),!0):!1},it.unstable_batchedUpdates=Wi,it.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Gl(n))throw Error(u(200));if(e==null||e._reactInternals===void 0)throw Error(u(38));return Xl(e,t,n,!1,r)},it.version="18.3.1-next-f1338f8080-20240426",it}var kc;function Wc(){if(kc)return Zi.exports;kc=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(a){console.error(a)}}return l(),Zi.exports=jp(),Zi.exports}var Ec;function Cp(){if(Ec)return ql;Ec=1;var l=Wc();return ql.createRoot=l.createRoot,ql.hydrateRoot=l.hydrateRoot,ql}var Np=Cp();const Pp="modulepreload",_p=function(l){return"/"+l},jc={},Je=function(a,u,d){let m=Promise.resolve();if(u&&u.length>0){let j=function(p){return Promise.all(p.map(h=>Promise.resolve(h).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const C=document.querySelector("meta[property=csp-nonce]"),f=(C==null?void 0:C.nonce)||(C==null?void 0:C.getAttribute("nonce"));m=j(u.map(p=>{if(p=_p(p),p in jc)return;jc[p]=!0;const h=p.endsWith(".css"),y=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${y}`))return;const k=document.createElement("link");if(k.rel=h?"stylesheet":Pp,h||(k.as="script"),k.crossOrigin="",k.href=p,f&&k.setAttribute("nonce",f),document.head.appendChild(k),h)return new Promise((I,L)=>{k.addEventListener("load",I),k.addEventListener("error",()=>L(new Error(`Unable to preload CSS for ${p}`)))})}))}function g(j){const C=new Event("vite:preloadError",{cancelable:!0});if(C.payload=j,window.dispatchEvent(C),!C.defaultPrevented)throw j}return m.then(j=>{for(const C of j||[])C.status==="rejected"&&g(C.reason);return a().catch(g)})};var Zl=Wc();/**
|
|
42
|
+
* @remix-run/router v1.23.2
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Remix Software Inc.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
48
|
+
*
|
|
49
|
+
* @license MIT
|
|
50
|
+
*/function Fr(){return Fr=Object.assign?Object.assign.bind():function(l){for(var a=1;a<arguments.length;a++){var u=arguments[a];for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(l[d]=u[d])}return l},Fr.apply(this,arguments)}var on;(function(l){l.Pop="POP",l.Push="PUSH",l.Replace="REPLACE"})(on||(on={}));const Cc="popstate";function Tp(l){l===void 0&&(l={});function a(d,m){let{pathname:g,search:j,hash:C}=d.location;return os("",{pathname:g,search:j,hash:C},m.state&&m.state.usr||null,m.state&&m.state.key||"default")}function u(d,m){return typeof m=="string"?m:eo(m)}return Lp(a,u,null,l)}function Ae(l,a){if(l===!1||l===null||typeof l>"u")throw new Error(a)}function fs(l,a){if(!l){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function Rp(){return Math.random().toString(36).substr(2,8)}function Nc(l,a){return{usr:l.state,key:l.key,idx:a}}function os(l,a,u,d){return u===void 0&&(u=null),Fr({pathname:typeof l=="string"?l:l.pathname,search:"",hash:""},typeof a=="string"?Xn(a):a,{state:u,key:a&&a.key||d||Rp()})}function eo(l){let{pathname:a="/",search:u="",hash:d=""}=l;return u&&u!=="?"&&(a+=u.charAt(0)==="?"?u:"?"+u),d&&d!=="#"&&(a+=d.charAt(0)==="#"?d:"#"+d),a}function Xn(l){let a={};if(l){let u=l.indexOf("#");u>=0&&(a.hash=l.substr(u),l=l.substr(0,u));let d=l.indexOf("?");d>=0&&(a.search=l.substr(d),l=l.substr(0,d)),l&&(a.pathname=l)}return a}function Lp(l,a,u,d){d===void 0&&(d={});let{window:m=document.defaultView,v5Compat:g=!1}=d,j=m.history,C=on.Pop,f=null,p=h();p==null&&(p=0,j.replaceState(Fr({},j.state,{idx:p}),""));function h(){return(j.state||{idx:null}).idx}function y(){C=on.Pop;let E=h(),W=E==null?null:E-p;p=E,f&&f({action:C,location:N.location,delta:W})}function k(E,W){C=on.Push;let Y=os(N.location,E,W);p=h()+1;let U=Nc(Y,p),F=N.createHref(Y);try{j.pushState(U,"",F)}catch(X){if(X instanceof DOMException&&X.name==="DataCloneError")throw X;m.location.assign(F)}g&&f&&f({action:C,location:N.location,delta:1})}function I(E,W){C=on.Replace;let Y=os(N.location,E,W);p=h();let U=Nc(Y,p),F=N.createHref(Y);j.replaceState(U,"",F),g&&f&&f({action:C,location:N.location,delta:0})}function L(E){let W=m.location.origin!=="null"?m.location.origin:m.location.href,Y=typeof E=="string"?E:eo(E);return Y=Y.replace(/ $/,"%20"),Ae(W,"No window.location.(origin|href) available to create URL for href: "+Y),new URL(Y,W)}let N={get action(){return C},get location(){return l(m,j)},listen(E){if(f)throw new Error("A history only accepts one active listener");return m.addEventListener(Cc,y),f=E,()=>{m.removeEventListener(Cc,y),f=null}},createHref(E){return a(m,E)},createURL:L,encodeLocation(E){let W=L(E);return{pathname:W.pathname,search:W.search,hash:W.hash}},push:k,replace:I,go(E){return j.go(E)}};return N}var Pc;(function(l){l.data="data",l.deferred="deferred",l.redirect="redirect",l.error="error"})(Pc||(Pc={}));function Ip(l,a,u){return u===void 0&&(u="/"),Mp(l,a,u)}function Mp(l,a,u,d){let m=typeof a=="string"?Xn(a):a,g=ps(m.pathname||"/",u);if(g==null)return null;let j=$c(l);Op(j);let C=null;for(let f=0;C==null&&f<j.length;++f){let p=Kp(g);C=Vp(j[f],p)}return C}function $c(l,a,u,d){a===void 0&&(a=[]),u===void 0&&(u=[]),d===void 0&&(d="");let m=(g,j,C)=>{let f={relativePath:C===void 0?g.path||"":C,caseSensitive:g.caseSensitive===!0,childrenIndex:j,route:g};f.relativePath.startsWith("/")&&(Ae(f.relativePath.startsWith(d),'Absolute route path "'+f.relativePath+'" nested under path '+('"'+d+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),f.relativePath=f.relativePath.slice(d.length));let p=sn([d,f.relativePath]),h=u.concat(f);g.children&&g.children.length>0&&(Ae(g.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),$c(g.children,a,h,p)),!(g.path==null&&!g.index)&&a.push({path:p,score:Wp(p,g.index),routesMeta:h})};return l.forEach((g,j)=>{var C;if(g.path===""||!((C=g.path)!=null&&C.includes("?")))m(g,j);else for(let f of Vc(g.path))m(g,j,f)}),a}function Vc(l){let a=l.split("/");if(a.length===0)return[];let[u,...d]=a,m=u.endsWith("?"),g=u.replace(/\?$/,"");if(d.length===0)return m?[g,""]:[g];let j=Vc(d.join("/")),C=[];return C.push(...j.map(f=>f===""?g:[g,f].join("/"))),m&&C.push(...j),C.map(f=>l.startsWith("/")&&f===""?"/":f)}function Op(l){l.sort((a,u)=>a.score!==u.score?u.score-a.score:$p(a.routesMeta.map(d=>d.childrenIndex),u.routesMeta.map(d=>d.childrenIndex)))}const Ap=/^:[\w-]+$/,zp=3,Dp=2,Up=1,Bp=10,Fp=-2,_c=l=>l==="*";function Wp(l,a){let u=l.split("/"),d=u.length;return u.some(_c)&&(d+=Fp),a&&(d+=Dp),u.filter(m=>!_c(m)).reduce((m,g)=>m+(Ap.test(g)?zp:g===""?Up:Bp),d)}function $p(l,a){return l.length===a.length&&l.slice(0,-1).every((d,m)=>d===a[m])?l[l.length-1]-a[a.length-1]:0}function Vp(l,a,u){let{routesMeta:d}=l,m={},g="/",j=[];for(let C=0;C<d.length;++C){let f=d[C],p=C===d.length-1,h=g==="/"?a:a.slice(g.length)||"/",y=Hp({path:f.relativePath,caseSensitive:f.caseSensitive,end:p},h),k=f.route;if(!y)return null;Object.assign(m,y.params),j.push({params:m,pathname:sn([g,y.pathname]),pathnameBase:bp(sn([g,y.pathnameBase])),route:k}),y.pathnameBase!=="/"&&(g=sn([g,y.pathnameBase]))}return j}function Hp(l,a){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[u,d]=Qp(l.path,l.caseSensitive,l.end),m=a.match(u);if(!m)return null;let g=m[0],j=g.replace(/(.)\/+$/,"$1"),C=m.slice(1);return{params:d.reduce((p,h,y)=>{let{paramName:k,isOptional:I}=h;if(k==="*"){let N=C[y]||"";j=g.slice(0,g.length-N.length).replace(/(.)\/+$/,"$1")}const L=C[y];return I&&!L?p[k]=void 0:p[k]=(L||"").replace(/%2F/g,"/"),p},{}),pathname:g,pathnameBase:j,pattern:l}}function Qp(l,a,u){a===void 0&&(a=!1),u===void 0&&(u=!0),fs(l==="*"||!l.endsWith("*")||l.endsWith("/*"),'Route path "'+l+'" will be treated as if it were '+('"'+l.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+l.replace(/\*$/,"/*")+'".'));let d=[],m="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(j,C,f)=>(d.push({paramName:C,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return l.endsWith("*")?(d.push({paramName:"*"}),m+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):u?m+="\\/*$":l!==""&&l!=="/"&&(m+="(?:(?=\\/|$))"),[new RegExp(m,a?void 0:"i"),d]}function Kp(l){try{return l.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return fs(!1,'The URL path "'+l+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+a+").")),l}}function ps(l,a){if(a==="/")return l;if(!l.toLowerCase().startsWith(a.toLowerCase()))return null;let u=a.endsWith("/")?a.length-1:a.length,d=l.charAt(u);return d&&d!=="/"?null:l.slice(u)||"/"}const Yp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Jp=l=>Yp.test(l);function Gp(l,a){a===void 0&&(a="/");let{pathname:u,search:d="",hash:m=""}=typeof l=="string"?Xn(l):l,g;if(u)if(Jp(u))g=u;else{if(u.includes("//")){let j=u;u=u.replace(/\/\/+/g,"/"),fs(!1,"Pathnames cannot have embedded double slashes - normalizing "+(j+" -> "+u))}u.startsWith("/")?g=Tc(u.substring(1),"/"):g=Tc(u,a)}else g=a;return{pathname:g,search:qp(d),hash:Zp(m)}}function Tc(l,a){let u=a.replace(/\/+$/,"").split("/");return l.split("/").forEach(m=>{m===".."?u.length>1&&u.pop():m!=="."&&u.push(m)}),u.length>1?u.join("/"):"/"}function ns(l,a,u,d){return"Cannot include a '"+l+"' character in a manually specified "+("`to."+a+"` field ["+JSON.stringify(d)+"]. Please separate it out to the ")+("`to."+u+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Xp(l){return l.filter((a,u)=>u===0||a.route.path&&a.route.path.length>0)}function hs(l,a){let u=Xp(l);return a?u.map((d,m)=>m===u.length-1?d.pathname:d.pathnameBase):u.map(d=>d.pathnameBase)}function ms(l,a,u,d){d===void 0&&(d=!1);let m;typeof l=="string"?m=Xn(l):(m=Fr({},l),Ae(!m.pathname||!m.pathname.includes("?"),ns("?","pathname","search",m)),Ae(!m.pathname||!m.pathname.includes("#"),ns("#","pathname","hash",m)),Ae(!m.search||!m.search.includes("#"),ns("#","search","hash",m)));let g=l===""||m.pathname==="",j=g?"/":m.pathname,C;if(j==null)C=u;else{let y=a.length-1;if(!d&&j.startsWith("..")){let k=j.split("/");for(;k[0]==="..";)k.shift(),y-=1;m.pathname=k.join("/")}C=y>=0?a[y]:"/"}let f=Gp(m,C),p=j&&j!=="/"&&j.endsWith("/"),h=(g||j===".")&&u.endsWith("/");return!f.pathname.endsWith("/")&&(p||h)&&(f.pathname+="/"),f}const sn=l=>l.join("/").replace(/\/\/+/g,"/"),bp=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),qp=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,Zp=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l;function eh(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}const Hc=["post","put","patch","delete"];new Set(Hc);const th=["get",...Hc];new Set(th);/**
|
|
51
|
+
* React Router v6.30.3
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) Remix Software Inc.
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the MIT license found in the
|
|
56
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
57
|
+
*
|
|
58
|
+
* @license MIT
|
|
59
|
+
*/function Wr(){return Wr=Object.assign?Object.assign.bind():function(l){for(var a=1;a<arguments.length;a++){var u=arguments[a];for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(l[d]=u[d])}return l},Wr.apply(this,arguments)}const gs=w.createContext(null),nh=w.createContext(null),an=w.createContext(null),no=w.createContext(null),Bt=w.createContext({outlet:null,matches:[],isDataRoute:!1}),Qc=w.createContext(null);function rh(l,a){let{relative:u}=a===void 0?{}:a;bn()||Ae(!1);let{basename:d,navigator:m}=w.useContext(an),{hash:g,pathname:j,search:C}=Yc(l,{relative:u}),f=j;return d!=="/"&&(f=j==="/"?d:sn([d,j])),m.createHref({pathname:f,search:C,hash:g})}function bn(){return w.useContext(no)!=null}function En(){return bn()||Ae(!1),w.useContext(no).location}function Kc(l){w.useContext(an).static||w.useLayoutEffect(l)}function vs(){let{isDataRoute:l}=w.useContext(Bt);return l?yh():lh()}function lh(){bn()||Ae(!1);let l=w.useContext(gs),{basename:a,future:u,navigator:d}=w.useContext(an),{matches:m}=w.useContext(Bt),{pathname:g}=En(),j=JSON.stringify(hs(m,u.v7_relativeSplatPath)),C=w.useRef(!1);return Kc(()=>{C.current=!0}),w.useCallback(function(p,h){if(h===void 0&&(h={}),!C.current)return;if(typeof p=="number"){d.go(p);return}let y=ms(p,JSON.parse(j),g,h.relative==="path");l==null&&a!=="/"&&(y.pathname=y.pathname==="/"?a:sn([a,y.pathname])),(h.replace?d.replace:d.push)(y,h.state,h)},[a,d,j,g,l])}const oh=w.createContext(null);function ih(l){let a=w.useContext(Bt).outlet;return a&&w.createElement(oh.Provider,{value:l},a)}function Yc(l,a){let{relative:u}=a===void 0?{}:a,{future:d}=w.useContext(an),{matches:m}=w.useContext(Bt),{pathname:g}=En(),j=JSON.stringify(hs(m,d.v7_relativeSplatPath));return w.useMemo(()=>ms(l,JSON.parse(j),g,u==="path"),[l,j,g,u])}function sh(l,a){return ah(l,a)}function ah(l,a,u,d){bn()||Ae(!1);let{navigator:m}=w.useContext(an),{matches:g}=w.useContext(Bt),j=g[g.length-1],C=j?j.params:{};j&&j.pathname;let f=j?j.pathnameBase:"/";j&&j.route;let p=En(),h;if(a){var y;let E=typeof a=="string"?Xn(a):a;f==="/"||(y=E.pathname)!=null&&y.startsWith(f)||Ae(!1),h=E}else h=p;let k=h.pathname||"/",I=k;if(f!=="/"){let E=f.replace(/^\//,"").split("/");I="/"+k.replace(/^\//,"").split("/").slice(E.length).join("/")}let L=Ip(l,{pathname:I}),N=ph(L&&L.map(E=>Object.assign({},E,{params:Object.assign({},C,E.params),pathname:sn([f,m.encodeLocation?m.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?f:sn([f,m.encodeLocation?m.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),g,u,d);return a&&N?w.createElement(no.Provider,{value:{location:Wr({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:on.Pop}},N):N}function uh(){let l=vh(),a=eh(l)?l.status+" "+l.statusText:l instanceof Error?l.message:JSON.stringify(l),u=l instanceof Error?l.stack:null,m={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},a),u?w.createElement("pre",{style:m},u):null,null)}const ch=w.createElement(uh,null);class dh extends w.Component{constructor(a){super(a),this.state={location:a.location,revalidation:a.revalidation,error:a.error}}static getDerivedStateFromError(a){return{error:a}}static getDerivedStateFromProps(a,u){return u.location!==a.location||u.revalidation!=="idle"&&a.revalidation==="idle"?{error:a.error,location:a.location,revalidation:a.revalidation}:{error:a.error!==void 0?a.error:u.error,location:u.location,revalidation:a.revalidation||u.revalidation}}componentDidCatch(a,u){console.error("React Router caught the following error during render",a,u)}render(){return this.state.error!==void 0?w.createElement(Bt.Provider,{value:this.props.routeContext},w.createElement(Qc.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function fh(l){let{routeContext:a,match:u,children:d}=l,m=w.useContext(gs);return m&&m.static&&m.staticContext&&(u.route.errorElement||u.route.ErrorBoundary)&&(m.staticContext._deepestRenderedBoundaryId=u.route.id),w.createElement(Bt.Provider,{value:a},d)}function ph(l,a,u,d){var m;if(a===void 0&&(a=[]),u===void 0&&(u=null),d===void 0&&(d=null),l==null){var g;if(!u)return null;if(u.errors)l=u.matches;else if((g=d)!=null&&g.v7_partialHydration&&a.length===0&&!u.initialized&&u.matches.length>0)l=u.matches;else return null}let j=l,C=(m=u)==null?void 0:m.errors;if(C!=null){let h=j.findIndex(y=>y.route.id&&(C==null?void 0:C[y.route.id])!==void 0);h>=0||Ae(!1),j=j.slice(0,Math.min(j.length,h+1))}let f=!1,p=-1;if(u&&d&&d.v7_partialHydration)for(let h=0;h<j.length;h++){let y=j[h];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(p=h),y.route.id){let{loaderData:k,errors:I}=u,L=y.route.loader&&k[y.route.id]===void 0&&(!I||I[y.route.id]===void 0);if(y.route.lazy||L){f=!0,p>=0?j=j.slice(0,p+1):j=[j[0]];break}}}return j.reduceRight((h,y,k)=>{let I,L=!1,N=null,E=null;u&&(I=C&&y.route.id?C[y.route.id]:void 0,N=y.route.errorElement||ch,f&&(p<0&&k===0?(xh("route-fallback"),L=!0,E=null):p===k&&(L=!0,E=y.route.hydrateFallbackElement||null)));let W=a.concat(j.slice(0,k+1)),Y=()=>{let U;return I?U=N:L?U=E:y.route.Component?U=w.createElement(y.route.Component,null):y.route.element?U=y.route.element:U=h,w.createElement(fh,{match:y,routeContext:{outlet:h,matches:W,isDataRoute:u!=null},children:U})};return u&&(y.route.ErrorBoundary||y.route.errorElement||k===0)?w.createElement(dh,{location:u.location,revalidation:u.revalidation,component:N,error:I,children:Y(),routeContext:{outlet:null,matches:W,isDataRoute:!0}}):Y()},null)}var Jc=(function(l){return l.UseBlocker="useBlocker",l.UseRevalidator="useRevalidator",l.UseNavigateStable="useNavigate",l})(Jc||{}),Gc=(function(l){return l.UseBlocker="useBlocker",l.UseLoaderData="useLoaderData",l.UseActionData="useActionData",l.UseRouteError="useRouteError",l.UseNavigation="useNavigation",l.UseRouteLoaderData="useRouteLoaderData",l.UseMatches="useMatches",l.UseRevalidator="useRevalidator",l.UseNavigateStable="useNavigate",l.UseRouteId="useRouteId",l})(Gc||{});function hh(l){let a=w.useContext(gs);return a||Ae(!1),a}function mh(l){let a=w.useContext(nh);return a||Ae(!1),a}function gh(l){let a=w.useContext(Bt);return a||Ae(!1),a}function Xc(l){let a=gh(),u=a.matches[a.matches.length-1];return u.route.id||Ae(!1),u.route.id}function vh(){var l;let a=w.useContext(Qc),u=mh(),d=Xc();return a!==void 0?a:(l=u.errors)==null?void 0:l[d]}function yh(){let{router:l}=hh(Jc.UseNavigateStable),a=Xc(Gc.UseNavigateStable),u=w.useRef(!1);return Kc(()=>{u.current=!0}),w.useCallback(function(m,g){g===void 0&&(g={}),u.current&&(typeof m=="number"?l.navigate(m):l.navigate(m,Wr({fromRouteId:a},g)))},[l,a])}const Rc={};function xh(l,a,u){Rc[l]||(Rc[l]=!0)}function wh(l,a){l==null||l.v7_startTransition,l==null||l.v7_relativeSplatPath}function Sh(l){let{to:a,replace:u,state:d,relative:m}=l;bn()||Ae(!1);let{future:g,static:j}=w.useContext(an),{matches:C}=w.useContext(Bt),{pathname:f}=En(),p=vs(),h=ms(a,hs(C,g.v7_relativeSplatPath),f,m==="path"),y=JSON.stringify(h);return w.useEffect(()=>p(JSON.parse(y),{replace:u,state:d,relative:m}),[p,y,m,u,d]),null}function bc(l){return ih(l.context)}function Ye(l){Ae(!1)}function kh(l){let{basename:a="/",children:u=null,location:d,navigationType:m=on.Pop,navigator:g,static:j=!1,future:C}=l;bn()&&Ae(!1);let f=a.replace(/^\/*/,"/"),p=w.useMemo(()=>({basename:f,navigator:g,static:j,future:Wr({v7_relativeSplatPath:!1},C)}),[f,C,g,j]);typeof d=="string"&&(d=Xn(d));let{pathname:h="/",search:y="",hash:k="",state:I=null,key:L="default"}=d,N=w.useMemo(()=>{let E=ps(h,f);return E==null?null:{location:{pathname:E,search:y,hash:k,state:I,key:L},navigationType:m}},[f,h,y,k,I,L,m]);return N==null?null:w.createElement(an.Provider,{value:p},w.createElement(no.Provider,{children:u,value:N}))}function qc(l){let{children:a,location:u}=l;return sh(is(a),u)}new Promise(()=>{});function is(l,a){a===void 0&&(a=[]);let u=[];return w.Children.forEach(l,(d,m)=>{if(!w.isValidElement(d))return;let g=[...a,m];if(d.type===w.Fragment){u.push.apply(u,is(d.props.children,g));return}d.type!==Ye&&Ae(!1),!d.props.index||!d.props.children||Ae(!1);let j={id:d.props.id||g.join("-"),caseSensitive:d.props.caseSensitive,element:d.props.element,Component:d.props.Component,index:d.props.index,path:d.props.path,loader:d.props.loader,action:d.props.action,errorElement:d.props.errorElement,ErrorBoundary:d.props.ErrorBoundary,hasErrorBoundary:d.props.ErrorBoundary!=null||d.props.errorElement!=null,shouldRevalidate:d.props.shouldRevalidate,handle:d.props.handle,lazy:d.props.lazy};d.props.children&&(j.children=is(d.props.children,g)),u.push(j)}),u}/**
|
|
60
|
+
* React Router DOM v6.30.3
|
|
61
|
+
*
|
|
62
|
+
* Copyright (c) Remix Software Inc.
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the MIT license found in the
|
|
65
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
66
|
+
*
|
|
67
|
+
* @license MIT
|
|
68
|
+
*/function ss(){return ss=Object.assign?Object.assign.bind():function(l){for(var a=1;a<arguments.length;a++){var u=arguments[a];for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(l[d]=u[d])}return l},ss.apply(this,arguments)}function Eh(l,a){if(l==null)return{};var u={},d=Object.keys(l),m,g;for(g=0;g<d.length;g++)m=d[g],!(a.indexOf(m)>=0)&&(u[m]=l[m]);return u}function jh(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function Ch(l,a){return l.button===0&&(!a||a==="_self")&&!jh(l)}function as(l){return l===void 0&&(l=""),new URLSearchParams(typeof l=="string"||Array.isArray(l)||l instanceof URLSearchParams?l:Object.keys(l).reduce((a,u)=>{let d=l[u];return a.concat(Array.isArray(d)?d.map(m=>[u,m]):[[u,d]])},[]))}function Nh(l,a){let u=as(l);return a&&a.forEach((d,m)=>{u.has(m)||a.getAll(m).forEach(g=>{u.append(m,g)})}),u}const Ph=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],_h="6";try{window.__reactRouterVersion=_h}catch{}const Th="startTransition",Lc=Sp[Th];function Zc(l){let{basename:a,children:u,future:d,window:m}=l,g=w.useRef();g.current==null&&(g.current=Tp({window:m,v5Compat:!0}));let j=g.current,[C,f]=w.useState({action:j.action,location:j.location}),{v7_startTransition:p}=d||{},h=w.useCallback(y=>{p&&Lc?Lc(()=>f(y)):f(y)},[f,p]);return w.useLayoutEffect(()=>j.listen(h),[j,h]),w.useEffect(()=>wh(d),[d]),w.createElement(kh,{basename:a,children:u,location:C.location,navigationType:C.action,navigator:j,future:d})}const Rh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Lh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ih=w.forwardRef(function(a,u){let{onClick:d,relative:m,reloadDocument:g,replace:j,state:C,target:f,to:p,preventScrollReset:h,viewTransition:y}=a,k=Eh(a,Ph),{basename:I}=w.useContext(an),L,N=!1;if(typeof p=="string"&&Lh.test(p)&&(L=p,Rh))try{let U=new URL(window.location.href),F=p.startsWith("//")?new URL(U.protocol+p):new URL(p),X=ps(F.pathname,I);F.origin===U.origin&&X!=null?p=X+F.search+F.hash:N=!0}catch{}let E=rh(p,{relative:m}),W=Mh(p,{replace:j,state:C,target:f,preventScrollReset:h,relative:m,viewTransition:y});function Y(U){d&&d(U),U.defaultPrevented||W(U)}return w.createElement("a",ss({},k,{href:L||E,onClick:N||g?d:Y,ref:u,target:f}))});var Ic;(function(l){l.UseScrollRestoration="useScrollRestoration",l.UseSubmit="useSubmit",l.UseSubmitFetcher="useSubmitFetcher",l.UseFetcher="useFetcher",l.useViewTransitionState="useViewTransitionState"})(Ic||(Ic={}));var Mc;(function(l){l.UseFetcher="useFetcher",l.UseFetchers="useFetchers",l.UseScrollRestoration="useScrollRestoration"})(Mc||(Mc={}));function Mh(l,a){let{target:u,replace:d,state:m,preventScrollReset:g,relative:j,viewTransition:C}=a===void 0?{}:a,f=vs(),p=En(),h=Yc(l,{relative:j});return w.useCallback(y=>{if(Ch(y,u)){y.preventDefault();let k=d!==void 0?d:eo(p)===eo(h);f(l,{replace:k,state:m,preventScrollReset:g,relative:j,viewTransition:C})}},[p,f,h,d,m,u,l,g,j,C])}function mg(l){let a=w.useRef(as(l)),u=w.useRef(!1),d=En(),m=w.useMemo(()=>Nh(d.search,u.current?null:a.current),[d.search]),g=vs(),j=w.useCallback((C,f)=>{const p=as(typeof C=="function"?C(m):C);u.current=!0,g("?"+p,f)},[g,m]);return[m,j]}const Oh=260,Ur=12;function ed({sidebar:l,children:a}){return s.jsxs("div",{className:"container",style:{position:"relative",alignItems:"stretch"},children:[s.jsxs("aside",{className:"sidebar",style:{width:`${Oh}px`,flexShrink:0,position:"sticky",top:`${Ur}px`,height:`calc(100vh - ${Ur*2}px)`,margin:`${Ur}px 0 ${Ur}px ${Ur}px`,borderRadius:"var(--radius-card)",background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRight:"none",padding:"20px 12px",overflowY:"auto",overflowX:"hidden"},children:[s.jsx("div",{className:"sidebar-brand",children:s.jsx("img",{src:"/logo_dark.png",alt:"Teleton",style:{height:"64px"}})}),l]}),s.jsx("main",{className:"main",style:{marginLeft:0},children:a??s.jsx(bc,{})})]})}const Ah="/api/agent/events",zh="/api/agent/status",Dh=5,Uh=3e4,Bh=3e3;function Fh(l){const a=Math.min(1e3*2**l,Uh),u=a*.3*Math.random();return a+u}function td(){const[l,a]=w.useState("stopped"),[u,d]=w.useState(null),m=w.useRef(!0),g=w.useRef(null),j=w.useRef(0),C=w.useRef(null),f=w.useRef(null),p=w.useRef(!1);return w.useEffect(()=>{m.current=!0;function h(E){if(m.current)try{const W=JSON.parse(E.data);a(W.state),d(W.error??null),j.current=0}catch{}}function y(){g.current&&(g.current.removeEventListener("status",h),g.current.close(),g.current=null)}function k(){f.current&&(clearInterval(f.current),f.current=null)}function I(){if(f.current)return;const E=async()=>{if(m.current)try{const W=await fetch(zh,{credentials:"include"});if(!W.ok)return;const Y=await W.json(),U=Y.data??Y;m.current&&(a(U.state),d(U.error??null))}catch{}};E(),f.current=setInterval(E,Bh)}function L(){if(!m.current)return;y();const E=new EventSource(Ah,{withCredentials:!0});g.current=E,E.addEventListener("status",h),E.addEventListener("open",()=>{j.current=0,p.current=!1,k()}),E.onerror=()=>{if(y(),!!m.current)if(j.current+=1,j.current<=Dh){const W=Fh(j.current-1);C.current=setTimeout(L,W)}else p.current=!0,I()}}function N(){document.hidden?(y(),k(),C.current&&(clearTimeout(C.current),C.current=null)):(j.current=0,p.current=!1,L())}return L(),document.addEventListener("visibilitychange",N),()=>{m.current=!1,y(),k(),C.current&&(clearTimeout(C.current),C.current=null),document.removeEventListener("visibilitychange",N)}},[]),{state:l,error:u}}const Oc="/api",Wh=3,$h=[1e3,2e3,4e3];function Vh(l){return l+l*.3*Math.random()}const Hh={stopped:{dot:"var(--text-tertiary)",label:"Stopped",pulse:!1},starting:{dot:"var(--warning)",label:"Starting...",pulse:!0},running:{dot:"var(--green)",label:"Running",pulse:!0},stopping:{dot:"var(--warning)",label:"Stopping...",pulse:!0},error:{dot:"var(--red)",label:"Error",pulse:!1}};function Qh(){const{state:l,error:a}=td(),d=Hh[a&&l==="stopped"?"error":l];return s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"0 4px"},children:[s.jsx("span",{style:{display:"inline-block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:d.dot,flexShrink:0}}),s.jsx("span",{style:{fontSize:"12px",fontWeight:600,color:"var(--text-primary)",letterSpacing:"0.1px"},children:d.label})]})}function Kh(){const{state:l,error:a}=td(),[u,d]=w.useState(!1),[m,g]=w.useState(!1),[j,C]=w.useState(null),[f,p]=w.useState(!1),h=w.useRef(null),y=w.useRef(null),k=a&&l==="stopped"?"error":l,I=w.useCallback(()=>{h.current&&(clearTimeout(h.current),h.current=null),p(!1)},[]),L=w.useCallback(async(F=0)=>{d(!0),C(null),y.current=new AbortController;try{const X=await fetch(`${Oc}/agent/start`,{method:"POST",credentials:"include",signal:AbortSignal.timeout(1e4)}),te=await X.json();if(!X.ok&&te.error)throw new Error(te.error)}catch(X){if(!h.current&&F<Wh){p(!0);const te=Vh($h[F]??4e3);h.current=setTimeout(()=>{h.current=null,L(F+1)},te),C(X instanceof Error?X.message:String(X)),d(!1);return}C(X instanceof Error?X.message:String(X)),p(!1)}finally{d(!1),y.current=null}},[]),N=w.useCallback(async()=>{g(!1),d(!0),C(null),I();try{const F=await fetch(`${Oc}/agent/stop`,{method:"POST",credentials:"include",signal:AbortSignal.timeout(1e4)}),X=await F.json();if(!F.ok&&X.error)throw new Error(X.error)}catch(F){C(F instanceof Error?F.message:String(F))}finally{d(!1)}},[I]),E=()=>{I(),L(0)},W=()=>{g(!0)},Y=k==="stopped"||k==="error",U=k==="running";return s.jsxs("div",{style:{padding:0,marginBottom:0},children:[Y&&!f&&s.jsx("button",{onClick:E,disabled:u,style:{width:"100%",background:"var(--green-dim)",color:"var(--green)",border:"1px solid var(--green-dim)",fontSize:"12px",padding:"6px 12px"},children:u?"Starting...":"Start Agent"}),U&&s.jsx("button",{onClick:W,disabled:u,className:"btn-danger",style:{width:"100%",fontSize:"12px",padding:"6px 12px"},children:u?"Stopping...":"Stop Agent"}),f&&s.jsx("div",{style:{fontSize:"11px",color:"var(--text-tertiary)",marginTop:"4px"},children:"Retrying..."}),j&&!f&&s.jsx("div",{style:{fontSize:"11px",color:"var(--red)",marginTop:"4px",lineHeight:"1.4",wordBreak:"break-word"},children:j}),m&&Zl.createPortal(s.jsx("div",{className:"modal-overlay",onClick:()=>g(!1),children:s.jsxs("div",{className:"modal",onClick:F=>F.stopPropagation(),style:{maxWidth:"360px"},children:[s.jsx("h2",{style:{fontSize:"15px",fontWeight:600,marginBottom:"8px"},children:"Stop Agent?"}),s.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)",marginBottom:"20px",lineHeight:"1.5"},children:"Active Telegram sessions will be interrupted."}),s.jsxs("div",{style:{display:"flex",gap:"8px",justifyContent:"flex-end"},children:[s.jsx("button",{className:"btn-ghost",onClick:()=>g(!1),style:{fontSize:"13px"},children:"Cancel"}),s.jsx("button",{className:"btn-danger",onClick:N,style:{fontSize:"13px"},children:"Stop"})]})]})}),document.body)]})}function Yh(){const[l,a]=w.useState(null),[u,d]=w.useState(!1),[m,g]=w.useState(null),[j,C]=w.useState(""),[f,p]=w.useState(!1),[h,y]=w.useState(null),[k,I]=w.useState(""),[L,N]=w.useState(""),[E,W]=w.useState(""),[Y,U]=w.useState(""),[F,X]=w.useState("");w.useEffect(()=>{fetch("/api/agent/mode",{credentials:"include"}).then(le=>le.json()).then(le=>a(le)).catch(()=>{})},[]);const te=()=>{g(null),C(""),y(null),I(""),N(""),W(""),U(""),X("")},we=async le=>{var $,ve,ge;if(!/^[0-9]+:[A-Za-z0-9_-]+$/.test(le)){I("Invalid format (expected id:hash)");return}p(!0),I("");try{const V=await(await fetch("/setup/validate/bot-token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:le})})).json();($=V.data)!=null&&$.valid?(y({username:((ve=V.data.bot)==null?void 0:ve.username)||"unknown"}),I("")):(I(((ge=V.data)==null?void 0:ge.error)||"Invalid token"),y(null))}catch{I("Validation failed")}finally{p(!1)}},me=async(le,$)=>{d(!0),X("");try{const ve=await fetch("/api/agent/mode",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({mode:le,...$})}),ge=await ve.json();if(!ve.ok){X(ge.error||"Switch failed");return}a({mode:le,canSwitchToBot:!0,canSwitchToUser:!0}),te()}catch{X("Network error")}finally{d(!1)}},q=le=>{if(!(!l||le===l.mode||u)){if(le==="bot"&&!l.canSwitchToBot){g("bot");return}if(le==="user"&&!l.canSwitchToUser){g("user");return}me(le)}},Ie=()=>{!j.trim()||!h||me("bot",{botToken:j})},Ee=()=>{const le=parseInt(L);!le||!E.trim()||!Y.trim()||me("user",{userCredentials:{apiId:le,apiHash:E,phone:Y}})};return l?s.jsxs("div",{style:{padding:"0 4px",marginBottom:"8px"},children:[s.jsxs("div",{className:"pill-bar",style:{display:"flex",width:"100%",marginBottom:0},children:[s.jsx("button",{type:"button",className:l.mode==="user"?"active":"",style:{flex:1},disabled:u,onClick:()=>q("user"),children:"User"}),s.jsx("button",{type:"button",className:l.mode==="bot"?"active":"",style:{flex:1},disabled:u,onClick:()=>q("bot"),children:"Bot"})]}),u&&s.jsx("div",{style:{fontSize:"11px",color:"var(--text-secondary)",marginTop:"4px"},children:"Restarting agent..."}),F&&!m&&s.jsx("div",{style:{fontSize:"11px",color:"var(--red)",marginTop:"4px",lineHeight:"1.3"},children:F}),m==="bot"&&Zl.createPortal(s.jsx("div",{className:"modal-overlay",onClick:te,children:s.jsxs("div",{className:"modal",onClick:le=>le.stopPropagation(),style:{maxWidth:"420px"},children:[s.jsx("h2",{style:{fontSize:"var(--font-lg)",fontWeight:600,marginBottom:"4px"},children:"Switch to Bot Mode"}),s.jsxs("p",{style:{fontSize:"var(--font-sm)",color:"var(--text-secondary)",marginBottom:"20px",lineHeight:"var(--leading-normal)"},children:["Enter your bot token from ",s.jsx("a",{href:"https://t.me/BotFather",target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent)"},children:"@BotFather"}),". Your existing config will be preserved."]}),s.jsxs("div",{className:"form-group",style:{marginBottom:"16px"},children:[s.jsx("label",{children:"Bot Token"}),s.jsxs("div",{style:{display:"flex",gap:"8px"},children:[s.jsx("input",{type:"password",value:j,onChange:le=>{C(le.target.value),y(null),I("")},placeholder:"123456:ABC-DEF...",style:{flex:1}}),s.jsx("button",{className:"btn-ghost",disabled:!j.trim()||f,onClick:()=>we(j),style:{whiteSpace:"nowrap",fontSize:"var(--font-sm)"},children:f?"Checking...":"Validate"})]}),h&&s.jsxs("div",{style:{fontSize:"var(--font-sm)",color:"var(--accent)",marginTop:"6px"},children:["@",h.username]}),k&&s.jsx("div",{style:{fontSize:"var(--font-sm)",color:"var(--red)",marginTop:"6px"},children:k})]}),s.jsxs("div",{style:{display:"flex",gap:"8px",justifyContent:"flex-end"},children:[s.jsx("button",{className:"btn-ghost",onClick:te,style:{fontSize:"var(--font-sm)"},children:"Cancel"}),s.jsx("button",{disabled:!h||u,onClick:Ie,style:{fontSize:"var(--font-sm)"},children:u?"Switching...":"Switch to Bot"})]})]})}),document.body),m==="user"&&Zl.createPortal(s.jsx("div",{className:"modal-overlay",onClick:te,children:s.jsxs("div",{className:"modal",onClick:le=>le.stopPropagation(),style:{maxWidth:"420px"},children:[s.jsx("h2",{style:{fontSize:"var(--font-lg)",fontWeight:600,marginBottom:"4px"},children:"Switch to User Mode"}),s.jsxs("p",{style:{fontSize:"var(--font-sm)",color:"var(--text-secondary)",marginBottom:"20px",lineHeight:"var(--leading-normal)"},children:["Get your credentials from"," ",s.jsx("a",{href:"https://my.telegram.org/apps",target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent)"},children:"my.telegram.org/apps"}),". Your bot config will be preserved."]}),s.jsxs("div",{className:"form-group",style:{marginBottom:"12px"},children:[s.jsx("label",{children:"API ID"}),s.jsx("input",{type:"text",inputMode:"numeric",value:L,onChange:le=>N(le.target.value.replace(/\D/g,"")),placeholder:"12345678",className:"w-full"})]}),s.jsxs("div",{className:"form-group",style:{marginBottom:"12px"},children:[s.jsx("label",{children:"API Hash"}),s.jsx("input",{type:"text",value:E,onChange:le=>W(le.target.value),placeholder:"0123456789abcdef...",className:"w-full"})]}),s.jsxs("div",{className:"form-group",style:{marginBottom:"16px"},children:[s.jsx("label",{children:"Phone Number"}),s.jsx("input",{type:"text",value:Y,onChange:le=>U(le.target.value),placeholder:"+1234567890",className:"w-full"})]}),F&&s.jsx("div",{style:{fontSize:"var(--font-sm)",color:"var(--red)",marginBottom:"12px"},children:F}),s.jsxs("div",{style:{display:"flex",gap:"8px",justifyContent:"flex-end"},children:[s.jsx("button",{className:"btn-ghost",onClick:te,style:{fontSize:"var(--font-sm)"},children:"Cancel"}),s.jsx("button",{disabled:!L||!E.trim()||!Y.trim()||u,onClick:Ee,style:{fontSize:"var(--font-sm)"},children:u?"Switching...":"Switch to User"})]})]})}),document.body)]}):null}const ys="/api";async function Fe(l,a){const u={"Content-Type":"application/json",...a==null?void 0:a.headers},d=await fetch(`${ys}${l}`,{...a,headers:u});if(!d.ok){const g=await d.json().catch(()=>({error:d.statusText}));throw new Error(g.error||`HTTP ${d.status}`)}const m=await d.json();return m.data!==void 0?m.data:m}async function ee(l,a){const u={"Content-Type":"application/json",...a==null?void 0:a.headers},d=await fetch(`${ys}${l}`,{...a,headers:u,credentials:"include"});if(!d.ok){const m=await d.json().catch(()=>({error:d.statusText}));throw new Error(m.error||`HTTP ${d.status}`)}return d.json()}async function Jh(){var l;try{const u=await(await fetch("/auth/check",{credentials:"include"})).json();return u.success&&((l=u.data)==null?void 0:l.authenticated)}catch{return!1}}async function Ac(l){try{return(await fetch("/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:l}),credentials:"include"})).ok}catch{return!1}}async function Gh(){await fetch("/auth/logout",{method:"POST",credentials:"include"}).catch(()=>{})}const Xh={async getStatus(){return ee("/status")},async getTools(){return ee("/tools")},async getMemoryStats(){return ee("/memory/stats")},async searchKnowledge(l,a=10){return ee(`/memory/search?q=${encodeURIComponent(l)}&limit=${a}`)},async getMemorySources(){return ee("/memory/sources")},async getSourceChunks(l){return ee(`/memory/sources/${encodeURIComponent(l)}`)},async getWallet(){return ee("/wallet")},async getWalletTransactions(){return ee("/wallet/transactions")},async getConversations(){return ee("/conversations")},async getConversationMessages(l,a=50,u=0){return ee(`/conversations/${encodeURIComponent(l)}/messages?limit=${a}&offset=${u}`)},async getSoulFile(l){return ee(`/soul/${l}`)},async updateSoulFile(l,a){return ee(`/soul/${l}`,{method:"PUT",body:JSON.stringify({content:a})})},async getPlugins(){return ee("/plugins")},async getPluginPriorities(){return ee("/plugins/priorities")},async setPluginPriority(l,a){return ee("/plugins/priorities",{method:"POST",body:JSON.stringify({pluginName:l,priority:a})})},async resetPluginPriority(l){return ee(`/plugins/priorities/${encodeURIComponent(l)}`,{method:"DELETE"})},async getToolRag(){return ee("/tools/rag")},async updateToolRag(l){return ee("/tools/rag",{method:"PUT",body:JSON.stringify(l)})},async getMcpServers(){return ee("/mcp")},async addMcpServer(l){return ee("/mcp",{method:"POST",body:JSON.stringify(l)})},async removeMcpServer(l){return ee(`/mcp/${encodeURIComponent(l)}`,{method:"DELETE"})},async updateToolConfig(l,a){return ee(`/tools/${l}`,{method:"PUT",body:JSON.stringify(a)})},async workspaceList(l="",a=!1){const u=new URLSearchParams;l&&u.set("path",l),a&&u.set("recursive","true");const d=u.toString();return ee(`/workspace${d?`?${d}`:""}`)},async workspaceRead(l){return ee(`/workspace/read?path=${encodeURIComponent(l)}`)},async workspaceWrite(l,a){return ee("/workspace/write",{method:"POST",body:JSON.stringify({path:l,content:a})})},async workspaceMkdir(l){return ee("/workspace/mkdir",{method:"POST",body:JSON.stringify({path:l})})},async workspaceDelete(l,a=!1){return ee("/workspace",{method:"DELETE",body:JSON.stringify({path:l,recursive:a})})},async workspaceRename(l,a){return ee("/workspace/rename",{method:"POST",body:JSON.stringify({from:l,to:a})})},async workspaceInfo(){return ee("/workspace/info")},workspaceRawUrl(l){return`/api/workspace/raw?path=${encodeURIComponent(l)}`},async tasksList(l){const a=l?`?status=${l}`:"";return ee(`/tasks${a}`)},async tasksGet(l){return ee(`/tasks/${l}`)},async tasksDelete(l){return ee(`/tasks/${l}`,{method:"DELETE"})},async tasksCancel(l){return ee(`/tasks/${l}/cancel`,{method:"POST"})},async tasksClean(l){return ee("/tasks/clean",{method:"POST",body:JSON.stringify({status:l})})},async tasksCleanDone(){return ee("/tasks/clean-done",{method:"POST"})},async getConfigKeys(){return ee("/config")},async setConfigKey(l,a){return ee(`/config/${l}`,{method:"PUT",body:JSON.stringify({value:a})})},async unsetConfigKey(l){return ee(`/config/${l}`,{method:"DELETE"})},async getModelsForProvider(l){return ee(`/config/models/${encodeURIComponent(l)}`)},async getProviderMeta(l){return ee(`/config/provider-meta/${encodeURIComponent(l)}`)},async validateApiKey(l,a){return ee("/config/validate-api-key",{method:"POST",body:JSON.stringify({provider:l,apiKey:a})})},async getMarketplace(l=!1){return ee(`/marketplace${l?"?refresh=true":""}`)},async installPlugin(l){return ee("/marketplace/install",{method:"POST",body:JSON.stringify({id:l})})},async uninstallPlugin(l){return ee("/marketplace/uninstall",{method:"POST",body:JSON.stringify({id:l})})},async updatePlugin(l){return ee("/marketplace/update",{method:"POST",body:JSON.stringify({id:l})})},async getPluginSecrets(l){return ee(`/marketplace/secrets/${encodeURIComponent(l)}`)},async setPluginSecret(l,a,u){return ee(`/marketplace/secrets/${encodeURIComponent(l)}/${encodeURIComponent(a)}`,{method:"PUT",body:JSON.stringify({value:u})})},async unsetPluginSecret(l,a){return ee(`/marketplace/secrets/${encodeURIComponent(l)}/${encodeURIComponent(a)}`,{method:"DELETE"})},async getBlocklist(){return ee("/hooks/blocklist")},async updateBlocklist(l){return ee("/hooks/blocklist",{method:"PUT",body:JSON.stringify(l)})},async getTriggers(){return ee("/hooks/triggers")},async createTrigger(l){return ee("/hooks/triggers",{method:"POST",body:JSON.stringify(l)})},async updateTrigger(l,a){return ee(`/hooks/triggers/${l}`,{method:"PUT",body:JSON.stringify(a)})},async deleteTrigger(l){return ee(`/hooks/triggers/${l}`,{method:"DELETE"})},async toggleTrigger(l,a){return ee(`/hooks/triggers/${l}/toggle`,{method:"PATCH",body:JSON.stringify({enabled:a})})},async getTonProxyStatus(){return ee("/ton-proxy")},async startTonProxy(){return ee("/ton-proxy/start",{method:"POST"})},async stopTonProxy(){return ee("/ton-proxy/stop",{method:"POST"})},async uninstallTonProxy(){return ee("/ton-proxy/uninstall",{method:"POST"})},connectLogs(l,a){const u=`${ys}/logs/stream`,d=new EventSource(u);return d.addEventListener("log",m=>{try{const g=JSON.parse(m.data);l(g)}catch(g){console.error("Failed to parse log entry:",g)}}),d.onerror=m=>{a==null||a(m)},()=>d.close()}},We={getStatus:()=>Fe("/setup/status"),getProviders:()=>Fe("/setup/providers"),getModels:l=>Fe(`/setup/models/${encodeURIComponent(l)}`),validateApiKey:(l,a)=>Fe("/setup/validate/api-key",{method:"POST",body:JSON.stringify({provider:l,apiKey:a})}),detectClaudeCodeKey:()=>Fe("/setup/detect-claude-code-key"),validateBotToken:l=>Fe("/setup/validate/bot-token",{method:"POST",body:JSON.stringify({token:l})}),initWorkspace:l=>Fe("/setup/workspace/init",{method:"POST",body:JSON.stringify({agentName:l})}),getWalletStatus:()=>Fe("/setup/wallet/status"),generateWallet:()=>Fe("/setup/wallet/generate",{method:"POST"}),importWallet:l=>Fe("/setup/wallet/import",{method:"POST",body:JSON.stringify({mnemonic:l})}),sendCode:(l,a,u)=>Fe("/setup/telegram/send-code",{method:"POST",body:JSON.stringify({apiId:l,apiHash:a,phone:u})}),verifyCode:(l,a)=>Fe("/setup/telegram/verify-code",{method:"POST",body:JSON.stringify({authSessionId:l,code:a})}),verifyPassword:(l,a)=>Fe("/setup/telegram/verify-password",{method:"POST",body:JSON.stringify({authSessionId:l,password:a})}),resendCode:l=>Fe("/setup/telegram/resend-code",{method:"POST",body:JSON.stringify({authSessionId:l})}),startQr:(l,a)=>Fe("/setup/telegram/qr-start",{method:"POST",body:JSON.stringify({apiId:l,apiHash:a})}),refreshQr:l=>Fe("/setup/telegram/qr-refresh",{method:"POST",body:JSON.stringify({authSessionId:l})}),cancelSession:l=>Fe("/setup/telegram/session",{method:"DELETE",body:JSON.stringify({authSessionId:l})}),saveConfig:l=>Fe("/setup/config/save",{method:"POST",body:JSON.stringify(l)}),launch:()=>Fe("/setup/launch",{method:"POST"}),pollHealth:async(l=3e4)=>{const a=Date.now(),u=1e3;for(await new Promise(d=>setTimeout(d,1500));Date.now()-a<l;){try{const d=await fetch("/auth/check",{signal:AbortSignal.timeout(2e3)});if(d.ok){const m=await d.json();if(m.success&&m.data&&!m.data.setup)return}}catch{}await new Promise(d=>setTimeout(d,u))}throw new Error("Agent did not start within the expected time")}};function bh(){return s.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1"}),s.jsx("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1"}),s.jsx("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1"}),s.jsx("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1"})]})}function qh(){return s.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})})}function Zh(){return s.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"}),s.jsx("line",{x1:"16",y1:"8",x2:"2",y2:"22"}),s.jsx("line",{x1:"17.5",y1:"15",x2:"9",y2:"15"})]})}function em(){return s.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})})}function tm(){return s.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),s.jsx("path",{d:"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"}),s.jsx("path",{d:"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"})]})}function nm(){return s.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function rm(){return s.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M21 12V7H5a2 2 0 0 1 0-4h14v4"}),s.jsx("path",{d:"M3 5v14a2 2 0 0 0 2 2h16v-5"}),s.jsx("path",{d:"M18 12a2 2 0 0 0 0 4h4v-4z"})]})}function lm(){return s.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})}function om(){return s.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("polyline",{points:"9 11 12 14 22 4"}),s.jsx("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"})]})}function im(){return s.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("rect",{x:"2",y:"2",width:"20",height:"8",rx:"2",ry:"2"}),s.jsx("rect",{x:"2",y:"14",width:"20",height:"8",rx:"2",ry:"2"}),s.jsx("line",{x1:"6",y1:"6",x2:"6.01",y2:"6"}),s.jsx("line",{x1:"6",y1:"18",x2:"6.01",y2:"18"})]})}function sm(){return s.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})}function am(){return s.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"3"}),s.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"})]})}const nd={display:"flex",alignItems:"center",gap:"10px",padding:"10px 16px",borderRadius:"var(--radius-md)",color:"var(--text-secondary)",textDecoration:"none",fontSize:"13px",fontWeight:500,transition:"background 0.18s ease, color 0.18s ease",cursor:"pointer"},um={...nd,color:"var(--text-primary)",background:"var(--border-glass)"},cm="nav-link-hover";function dm({to:l,active:a,icon:u,label:d}){return s.jsxs(Ih,{to:l,className:`${cm}${a?" active":""}`,style:a?um:nd,children:[u,d]})}function fm(){const a=En().pathname,u=async()=>{await Gh(),window.location.href="/"},d=[{to:"/",icon:s.jsx(bh,{}),label:"Dashboard"},{to:"/tools",icon:s.jsx(qh,{}),label:"Tools"},{to:"/plugins",icon:s.jsx(Zh,{}),label:"Plugins"},{to:"/soul",icon:s.jsx(em,{}),label:"Soul"},{to:"/memory",icon:s.jsx(tm,{}),label:"Memory"},{to:"/conversations",icon:s.jsx(nm,{}),label:"Chats"},{to:"/wallet",icon:s.jsx(rm,{}),label:"Wallet"},{to:"/workspace",icon:s.jsx(lm,{}),label:"Workspace"},{to:"/tasks",icon:s.jsx(om,{}),label:"Tasks"},{to:"/mcp",icon:s.jsx(im,{}),label:"MCP"},{to:"/hooks",icon:s.jsx(sm,{}),label:"Hooks"},{to:"/config",icon:s.jsx(am,{}),label:"Config"}];return s.jsxs(s.Fragment,{children:[s.jsx("style",{children:`
|
|
69
|
+
.nav-link-hover:hover:not(.active) {
|
|
70
|
+
color: var(--text-primary) !important;
|
|
71
|
+
background: var(--bg-glass-hover, rgba(255, 255, 255, 0.10)) !important;
|
|
72
|
+
}
|
|
73
|
+
.nav-link-hover svg {
|
|
74
|
+
flex-shrink: 0;
|
|
75
|
+
opacity: 0.7;
|
|
76
|
+
transition: opacity 0.18s ease;
|
|
77
|
+
}
|
|
78
|
+
.nav-link-hover.active svg,
|
|
79
|
+
.nav-link-hover:hover svg {
|
|
80
|
+
opacity: 1;
|
|
81
|
+
}
|
|
82
|
+
`}),s.jsx("nav",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:d.map(({to:m,icon:g,label:j})=>s.jsx(dm,{to:m,active:a===m,icon:g,label:j},m))}),s.jsxs("div",{style:{marginTop:"auto"},children:[s.jsx("div",{style:{marginBottom:"8px"},children:s.jsx(Qh,{})}),s.jsx(Yh,{}),s.jsx("div",{style:{margin:"8px 0",padding:"0 4px"},children:s.jsx(Kh,{})}),s.jsx("div",{style:{padding:"0 4px 14px"},children:s.jsx("button",{onClick:u,style:{width:"100%",opacity:.7,fontSize:"13px"},children:"Logout"})})]})]})}function pm(){return s.jsx(ed,{sidebar:s.jsx(fm,{})})}class rd extends w.Component{constructor(){super(...arguments);Rt(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(u){return{hasError:!0,error:u.message}}render(){return this.state.hasError?s.jsxs("div",{className:"card",style:{textAlign:"center",padding:"40px 20px"},children:[s.jsx("h2",{style:{color:"var(--red)",marginBottom:"8px"},children:"Something went wrong"}),s.jsx("p",{style:{color:"var(--text-secondary)",marginBottom:"16px"},children:this.state.error}),s.jsx("button",{onClick:()=>this.setState({hasError:!1,error:null}),children:"Try Again"})]}):this.props.children}}function hm({data:l,onChange:a}){const[u,d]=w.useState(null),[m,g]=w.useState(!0),[j,C]=w.useState(""),[f,p]=w.useState(!1);return w.useEffect(()=>{We.getStatus().then(h=>d(h)).catch(h=>C(h instanceof Error?h.message:String(h))).finally(()=>g(!1))},[]),s.jsxs("div",{className:"step-content",children:[s.jsx("h2",{className:"step-title",children:"Welcome to Teleton Setup"}),s.jsx("p",{className:"step-description",children:"Configure your autonomous Telegram agent in a few steps."}),s.jsxs("details",{className:"guide-dropdown",children:[s.jsx("summary",{children:"Security Notice"}),s.jsxs("div",{className:"guide-content",children:["This software is an autonomous AI agent that can:",s.jsxs("ul",{style:{margin:"8px 0 8px 20px"},children:[s.jsx("li",{children:"Send and receive Telegram messages on your behalf"}),s.jsx("li",{children:"Execute cryptocurrency transactions using your wallet"}),s.jsx("li",{children:"Access and store conversation data"}),s.jsx("li",{children:"Make decisions and take actions autonomously"})]}),"You are solely responsible for all actions taken by this agent. By proceeding, you acknowledge that you understand these risks and accept full responsibility for the agent's behavior.",s.jsx("br",{}),s.jsx("br",{}),s.jsx("strong",{children:"Never share your API keys, wallet mnemonics, or session files."})]})]}),s.jsxs("div",{className:"form-group",children:[s.jsx("label",{children:"Agent Name"}),s.jsx("input",{type:"text",value:l.agentName,onChange:h=>a({...l,agentName:h.target.value}),placeholder:"Nova",className:"w-full"}),s.jsx("div",{className:"helper-text",children:"Your agent's display name in conversations."})]}),s.jsxs("div",{className:"form-group",children:[s.jsx("label",{children:"Telegram Mode"}),s.jsxs("div",{style:{display:"flex",gap:"8px"},children:[s.jsx("button",{type:"button",className:l.telegramMode==="user"?"btn-active":"btn-ghost",onClick:()=>a({...l,telegramMode:"user"}),style:{flex:1},children:"User Account"}),s.jsx("button",{type:"button",className:l.telegramMode==="bot"?"btn-active":"btn-ghost",onClick:()=>a({...l,telegramMode:"bot"}),style:{flex:1},children:"Bot"})]}),s.jsx("div",{className:"helper-text",children:l.telegramMode==="user"?"Full access via your Telegram account (MTProto). Requires API ID, hash, and phone.":"Runs as a Telegram Bot (Bot API). Requires only a bot token. Some features are unavailable."})]}),(u==null?void 0:u.configExists)&&s.jsx("div",{className:"info-box",children:"Existing configuration detected. It will be overwritten when setup completes."}),j&&s.jsx("div",{className:"alert error",children:j}),m&&s.jsx("div",{className:"loading",children:"Checking workspace..."})]})}function mm({value:l,options:a,labels:u,onChange:d,style:m}){const[g,j]=w.useState(!1),[C,f]=w.useState(-1),[p,h]=w.useState(null),y=w.useRef(null),k=w.useRef(null),I=w.useRef(Math.random().toString(36).slice(2));w.useEffect(()=>{if(!g)return;const E=W=>{var F,X;const Y=W.target;((F=y.current)==null?void 0:F.contains(Y))||((X=k.current)==null?void 0:X.contains(Y))||j(!1)};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[g]),w.useEffect(()=>{if(g&&y.current){const E=y.current.getBoundingClientRect();h({top:E.bottom+4,left:E.left,width:E.width})}else h(null)},[g]),w.useEffect(()=>{if(g){const E=a.indexOf(l);f(E>=0?E:0)}},[g,a,l]),w.useEffect(()=>{if(!g||C<0||!k.current)return;const E=k.current.children[C];E==null||E.scrollIntoView({block:"nearest"})},[g,C]);const L=w.useCallback(E=>{if(!g){(E.key==="Enter"||E.key===" "||E.key==="ArrowDown")&&(E.preventDefault(),j(!0));return}switch(E.key){case"ArrowDown":E.preventDefault(),f(W=>(W+1)%a.length);break;case"ArrowUp":E.preventDefault(),f(W=>(W-1+a.length)%a.length);break;case"Enter":case" ":E.preventDefault(),C>=0&&C<a.length&&(d(a[C]),j(!1));break;case"Escape":E.preventDefault(),j(!1);break;case"Home":E.preventDefault(),f(0);break;case"End":E.preventDefault(),f(a.length-1);break}},[g,C,a,d]),N=`select-menu-${I.current}`;return s.jsxs("div",{ref:y,className:"custom-select",style:m,children:[s.jsxs("button",{type:"button",className:"custom-select-trigger",onClick:()=>j(!g),onKeyDown:L,"aria-haspopup":"listbox","aria-expanded":g,"aria-controls":g?N:void 0,children:[s.jsx("span",{children:u?u[a.indexOf(l)]??l:l}),s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:s.jsx("path",{d:"M6 9l6 6 6-6"})})]}),g&&p&&Zl.createPortal(s.jsx("div",{ref:k,id:N,className:"custom-select-menu",role:"listbox","aria-activedescendant":C>=0?`${N}-opt-${C}`:void 0,style:{position:"fixed",top:p.top,left:p.left,width:p.width},children:a.map((E,W)=>s.jsx("div",{id:`${N}-opt-${W}`,role:"option","aria-selected":E===l,className:`custom-select-option${E===l?" active":""}${W===C?" focused":""}`,onClick:()=>{d(E),j(!1)},onMouseEnter:()=>f(W),children:u?u[W]??E:E},E))}),document.body)]})}function gm({data:l,onChange:a}){const[u,d]=w.useState([]),[m,g]=w.useState(!0),[j,C]=w.useState(""),[f,p]=w.useState(null),[h,y]=w.useState(""),[k,I]=w.useState(!1),L=w.useRef(null),[N,E]=w.useState(null),[W,Y]=w.useState(!1),[U,F]=w.useState(!1),[X,te]=w.useState([]),[we,me]=w.useState(!1);w.useEffect(()=>{We.getProviders().then($=>d($)).catch($=>C($ instanceof Error?$.message:String($))).finally(()=>g(!1))},[]);const q=u.find($=>$.id===l.provider);w.useEffect(()=>{q!=null&&q.autoDetectsKey&&(Y(!0),E(null),F(!1),We.detectClaudeCodeKey().then($=>{E($),$.found&&a({...l,apiKey:""})}).catch(()=>E({found:!1,maskedKey:null,valid:!1})).finally(()=>Y(!1)))},[q==null?void 0:q.id]),w.useEffect(()=>{if(!l.provider||l.provider==="cocoon"||l.provider==="local"){te([]);return}me(!0),We.getModels(l.provider).then($=>{te($),!l.model&&$.length>0&&a({...l,model:$[0].value})}).catch(()=>te([])).finally(()=>me(!1))},[l.provider]);const Ie=$=>{a({...l,provider:$,apiKey:"",model:"",customModel:""}),p(null),y(""),E(null),F(!1),L.current&&clearTimeout(L.current)},Ee=async($,ve)=>{if(!(!ve||!$)){I(!0);try{const ge=await We.validateApiKey($,ve);p(ge.valid),y(ge.error||"")}catch{p(null),y("")}finally{I(!1)}}},le=$=>{a({...l,apiKey:$}),p(null),y(""),L.current&&clearTimeout(L.current),$.length>0&&l.provider&&(L.current=setTimeout(()=>Ee(l.provider,$),500))};return m?s.jsx("div",{className:"loading",children:"Loading providers..."}):j?s.jsx("div",{className:"alert error",children:j}):s.jsxs("div",{className:"step-content",children:[s.jsx("h2",{className:"step-title",children:"Choose Your LLM Provider"}),s.jsx("p",{className:"step-description",children:"This is the AI model that powers your agent's intelligence. Pick the one you have an API key for."}),s.jsx("div",{className:"provider-grid",children:u.map($=>s.jsxs("div",{className:`provider-card${l.provider===$.id?" selected":""}`,onClick:()=>Ie($.id),children:[s.jsx("h3",{children:$.displayName}),s.jsx("div",{className:"provider-meta",children:$.defaultModel}),($.toolLimit===null||$.id==="zai")&&s.jsx("span",{className:"badge always",style:{marginTop:"6px"},children:"Recommended"})]},$.id))}),q&&q.toolLimit!==null&&q.toolLimit<50&&s.jsxs("div",{className:"info-box",style:{marginTop:"16px"},children:["This provider has a ",q.toolLimit,"-tool limit, which may restrict some features."]}),q&&q.autoDetectsKey&&s.jsxs("div",{style:{marginTop:"16px"},children:[W&&s.jsxs("div",{className:"info-panel",children:[s.jsx("span",{className:"spinner sm"})," Detecting Claude Code credentials..."]}),!W&&(N==null?void 0:N.found)&&s.jsxs("div",{className:"info-panel",children:[s.jsx("div",{style:{marginBottom:"4px",color:"var(--accent)"},children:s.jsx("strong",{children:"Credentials auto-detected from Claude Code"})}),s.jsx("code",{style:{fontSize:"0.85em",opacity:.8},children:N.maskedKey}),s.jsx("div",{className:"helper-text",style:{marginTop:"6px"},children:"Token will auto-refresh when it expires. No configuration needed."})]}),!W&&N&&!N.found&&!U&&s.jsxs("div",{className:"info-panel",style:{borderColor:"var(--warning)"},children:[s.jsxs("div",{style:{marginBottom:"8px"},children:["Claude Code credentials not found. Make sure Claude Code is installed and authenticated (",s.jsx("code",{children:"claude login"}),")."]}),s.jsx("button",{className:"btn btn-sm",onClick:()=>F(!0),children:"Enter API key manually instead"})]}),!W&&U&&s.jsxs("div",{className:"form-group",style:{marginTop:"8px"},children:[s.jsx("label",{children:"API Key (fallback)"}),s.jsx("input",{type:"password",value:l.apiKey,onChange:$=>le($.target.value),placeholder:q.keyPrefix?`${q.keyPrefix}...`:"Enter API key",className:"w-full"}),k&&s.jsxs("div",{className:"helper-text",children:[s.jsx("span",{className:"spinner sm"})," Validating..."]}),!k&&f===!0&&s.jsx("div",{className:"helper-text success",children:"Key format looks valid."}),!k&&f===!1&&h&&s.jsx("div",{className:"helper-text error",children:h}),s.jsxs("div",{className:"helper-text",children:["Get your key at:"," ",s.jsx("a",{href:"https://console.anthropic.com/",target:"_blank",rel:"noopener noreferrer",children:"https://console.anthropic.com/"})]})]})]}),q&&q.requiresApiKey&&s.jsxs("div",{className:"form-group",style:{marginTop:"16px"},children:[s.jsx("label",{children:"API Key"}),s.jsx("input",{type:"password",value:l.apiKey,onChange:$=>le($.target.value),placeholder:q.keyPrefix?`${q.keyPrefix}...`:"Enter API key",className:"w-full"}),k&&s.jsxs("div",{className:"helper-text",children:[s.jsx("span",{className:"spinner sm"})," Validating..."]}),!k&&f===!0&&s.jsx("div",{className:"helper-text success",children:"Key format looks valid."}),!k&&f===!1&&h&&s.jsx("div",{className:"helper-text error",children:h}),q.consoleUrl&&s.jsxs("div",{className:"helper-text",children:["Get your key at:"," ",s.jsx("a",{href:q.consoleUrl,target:"_blank",rel:"noopener noreferrer",children:q.consoleUrl})]})]}),q&&!q.requiresApiKey&&q.id==="cocoon"&&s.jsxs("div",{style:{marginTop:"16px"},children:[s.jsx("div",{className:"info-panel",children:"Cocoon Network uses a local proxy. No API key required."}),s.jsxs("div",{className:"form-group",children:[s.jsx("label",{children:"Cocoon Proxy Port"}),s.jsx("input",{type:"number",value:l.cocoonPort,onChange:$=>a({...l,cocoonPort:parseInt($.target.value)||0}),min:1,max:65535,className:"w-full"}),s.jsx("div",{className:"helper-text",children:"Port where the Cocoon client proxy is running (1-65535)."})]})]}),q&&q.id==="local"&&s.jsxs("div",{style:{marginTop:"16px"},children:[s.jsx("div",{className:"info-panel",children:"Connect to any OpenAI-compatible server (Ollama, vLLM, LM Studio, llama.cpp). No API key required."}),s.jsxs("div",{className:"form-group",children:[s.jsx("label",{children:"Server URL"}),s.jsx("input",{type:"url",value:l.localUrl,onChange:$=>a({...l,localUrl:$.target.value}),placeholder:"http://localhost:11434/v1",className:"w-full"}),s.jsx("div",{className:"helper-text",children:"Ollama :11434 · vLLM :8000 · LM Studio :1234 · llama.cpp :8080"})]})]}),q&&q.id!=="cocoon"&&q.id!=="local"&&s.jsxs("div",{className:"form-group",style:{marginTop:"16px"},children:[s.jsx("label",{children:"Model"}),we?s.jsxs("div",{className:"text-muted",children:[s.jsx("span",{className:"spinner sm"})," Loading models..."]}):s.jsx(mm,{value:l.model,options:X.map($=>$.value),labels:X.map($=>$.isCustom?"Custom...":`${$.name} - ${$.description}`),onChange:$=>a({...l,model:$}),style:{width:"100%"}}),l.model==="__custom__"&&s.jsx("input",{type:"text",value:l.customModel,onChange:$=>a({...l,customModel:$.target.value}),placeholder:"Enter custom model ID",className:"w-full",style:{marginTop:"8px"}})]})]})}const vm=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),s.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),ym=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24"}),s.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]});function Br({value:l,onChange:a,placeholder:u,className:d,style:m}){const[g,j]=w.useState(!1);return s.jsxs("div",{className:"password-wrapper",style:m,children:[s.jsx("input",{type:g?"text":"password",value:l,onChange:a,placeholder:u,className:d,style:{flex:1,paddingRight:"32px"}}),l&&s.jsx("button",{type:"button",className:"eye-toggle",onClick:()=>j(!g),"aria-label":g?"Hide":"Show",children:g?s.jsx(ym,{}):s.jsx(vm,{})})]})}function xm({data:l,onChange:a}){return s.jsxs("div",{className:"step-content",children:[s.jsx("h2",{className:"step-title",children:"Telegram Credentials"}),s.jsx("p",{className:"step-description",children:"These credentials allow your agent to use your Telegram account to send and receive messages."}),s.jsxs("details",{className:"guide-dropdown",children:[s.jsx("summary",{children:"How to get these credentials"}),s.jsxs("div",{className:"guide-content",children:[s.jsxs("div",{className:"guide-section",children:[s.jsx("strong",{children:"API ID & API Hash"}),s.jsxs("ol",{children:[s.jsxs("li",{children:["Open ",s.jsx("a",{href:"https://my.telegram.org",target:"_blank",rel:"noopener noreferrer",children:"my.telegram.org"})," in your browser"]}),s.jsx("li",{children:"Log in with your phone number (the one linked to your Telegram account)"}),s.jsxs("li",{children:["Click ",s.jsx("strong",{children:"API development tools"})]}),s.jsx("li",{children:`If prompted, create a new app - the name and platform don't matter (e.g. "MyApp", Desktop)`}),s.jsxs("li",{children:["Copy ",s.jsx("strong",{children:"App api_id"})," (a number) and ",s.jsx("strong",{children:"App api_hash"})," (a hex string)"]})]})]}),l.authMode==="phone"&&s.jsxs("div",{className:"guide-section",children:[s.jsx("strong",{children:"Phone Number"}),s.jsx("p",{children:"The phone number linked to your Telegram account, with country code (e.g. +33612345678)."})]})]})]}),s.jsxs("div",{className:"form-group",children:[s.jsx("label",{children:"API ID"}),s.jsx("input",{type:"number",value:l.apiId||"",onChange:u=>a({...l,apiId:parseInt(u.target.value)||0}),placeholder:"12345678",className:"w-full"})]}),s.jsxs("div",{className:"form-group",children:[s.jsx("label",{children:"API Hash"}),s.jsx(Br,{value:l.apiHash,onChange:u=>a({...l,apiHash:u.target.value}),placeholder:"abcdef0123456789abcdef0123456789",className:"w-full"}),l.apiHash.length>0&&l.apiHash.length<10&&s.jsx("div",{className:"helper-text",children:"API Hash should be at least 10 characters."})]}),s.jsxs("div",{className:"form-group",children:[s.jsx("label",{children:"Login method"}),s.jsxs("div",{style:{display:"flex",gap:"4px",background:"var(--bg-glass)",borderRadius:"8px",padding:"4px"},children:[s.jsx("button",{type:"button",onClick:()=>a({...l,authMode:"qr",phone:""}),style:{flex:1,padding:"8px 16px",border:"none",cursor:"pointer",background:l.authMode==="qr"?"var(--accent)":"transparent",color:l.authMode==="qr"?"var(--text-on-accent)":"var(--text-secondary)",fontWeight:l.authMode==="qr"?600:400,transition:"all 0.2s"},children:"QR Code"}),s.jsx("button",{type:"button",onClick:()=>a({...l,authMode:"phone"}),style:{flex:1,padding:"8px 16px",border:"none",cursor:"pointer",background:l.authMode==="phone"?"var(--accent)":"transparent",color:l.authMode==="phone"?"var(--text-on-accent)":"var(--text-secondary)",fontWeight:l.authMode==="phone"?600:400,transition:"all 0.2s"},children:"Phone Number"})]}),s.jsx("div",{className:"text-muted",style:{fontSize:"0.85em",marginTop:"6px"},children:l.authMode==="qr"?"Scan a QR code with your Telegram app to connect instantly.":"Receive a verification code via SMS or Telegram app."})]}),l.authMode==="phone"&&s.jsxs("div",{className:"form-group",children:[s.jsx("label",{children:"Phone Number"}),s.jsx("input",{type:"text",value:l.phone,onChange:u=>a({...l,phone:u.target.value}),placeholder:"+33612345678",className:"w-full"}),l.phone.length>0&&!l.phone.startsWith("+")&&s.jsx("div",{className:"helper-text",children:'Phone number must start with "+"'})]})]})}function wm({value:l,onChange:a,min:u=-1/0,max:d=1/0,step:m=1,disabled:g}){return s.jsxs("div",{className:"stepper",children:[s.jsx("button",{type:"button",className:"stepper-btn",disabled:g||l<=u,onClick:()=>a(Math.max(u,+(l-m).toFixed(10))),children:"−"}),s.jsx("span",{className:"stepper-divider"}),s.jsx("button",{type:"button",className:"stepper-btn",disabled:g||l>=d,onClick:()=>a(Math.min(d,+(l+m).toFixed(10))),children:"+"})]})}function Sm({data:l,onChange:a}){const[u,d]=w.useState(!1),[m,g]=w.useState(null),[j,C]=w.useState(!1),[f,p]=w.useState(""),h=async()=>{if(l.botToken){d(!0),p(""),g(null),C(!1);try{const N=await We.validateBotToken(l.botToken);N.valid&&N.bot?(g(!0),a({...l,botUsername:N.bot.username})):N.networkError?C(!0):(g(!1),p(N.error||"Invalid bot token"))}catch(N){p(N instanceof Error?N.message:String(N))}finally{d(!1)}}},y=["admin-only","allowlist","open","disabled"],k=["Admin Only","Allowlist","Open","Disabled"],I={"admin-only":"Only admins can DM the agent.",allowlist:"Only users in the allowlist (+ admins) can DM the agent.",open:"Anyone can message the agent in DMs.",disabled:"All DMs are ignored."},L={"admin-only":"Only admins can trigger the agent in groups.",allowlist:"Agent only responds in groups explicitly allowed by admins.",open:"Agent responds in any group it's added to.",disabled:"All group messages are ignored."};return s.jsxs("div",{className:"step-content",children:[s.jsx("h2",{className:"step-title",children:"Configuration"}),s.jsx("p",{className:"step-description",children:"Configure your agent's behavior policies. Defaults are pre-filled, adjust what you need."}),s.jsxs("div",{className:"form-group",children:[s.jsx("label",{children:"Admin User ID"}),s.jsx("input",{type:"text",inputMode:"numeric",value:l.userId||"",onChange:N=>{const E=N.target.value.replace(/\D/g,"");a({...l,userId:parseInt(E)||0})},placeholder:"123456789",className:"w-full"}),s.jsxs("div",{className:"helper-text",children:["This account will have admin control over the agent in DMs and groups. Get your ID from ",s.jsx("a",{href:"https://t.me/userinfobot",target:"_blank",rel:"noopener noreferrer",children:"@userinfobot"})," on Telegram."]})]}),s.jsxs("div",{className:"form-group",children:[s.jsx("label",{children:"DM Policy"}),s.jsx("div",{className:"pill-bar",style:{display:"flex",width:"100%",marginBottom:0},children:y.map((N,E)=>s.jsx("button",{type:"button",className:l.dmPolicy===N?"active":"",style:{flex:1},onClick:()=>a({...l,dmPolicy:N}),children:k[E]},N))}),s.jsx("div",{className:"helper-text",children:I[l.dmPolicy]||""})]}),s.jsxs("div",{className:"form-group",children:[s.jsx("label",{children:"Group Policy"}),s.jsx("div",{className:"pill-bar",style:{display:"flex",width:"100%",marginBottom:0},children:y.map((N,E)=>s.jsx("button",{type:"button",className:l.groupPolicy===N?"active":"",style:{flex:1},onClick:()=>a({...l,groupPolicy:N}),children:k[E]},N))}),s.jsx("div",{className:"helper-text",children:L[l.groupPolicy]||""})]}),s.jsxs("div",{className:"form-group",children:[s.jsxs("div",{className:"card-toggle",children:[s.jsx("span",{children:"Require @mention in groups"}),s.jsxs("label",{className:"toggle",children:[s.jsx("input",{type:"checkbox",checked:l.requireMention,onChange:N=>a({...l,requireMention:N.target.checked})}),s.jsx("div",{className:"toggle-track"}),s.jsx("div",{className:"toggle-thumb"})]})]}),s.jsx("div",{className:"helper-text",children:"When enabled, the agent only responds when mentioned by name in group chats."})]}),s.jsxs("div",{className:"form-group",children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[s.jsx("label",{style:{margin:0},children:"Max Agentic Iterations"}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[s.jsx("span",{style:{fontSize:15,fontWeight:600,color:"var(--text-primary)",minWidth:20,textAlign:"center"},children:l.maxIterations}),s.jsx(wm,{value:l.maxIterations,onChange:N=>a({...l,maxIterations:N}),min:1,max:50})]})]}),s.jsx("div",{className:"helper-text",children:"Maximum tool-call loops per message (1-50). Higher values allow more complex tasks."})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:"var(--space-2xl)",marginBottom:"var(--space-lg)"},children:[s.jsx("h3",{className:"step-subtitle",style:{margin:0},children:"Coding Agent"}),s.jsxs("div",{className:"pill-bar",style:{marginBottom:0},children:[s.jsx("button",{type:"button",className:l.execMode==="off"?"active":"",onClick:()=>a({...l,execMode:"off"}),children:"Off"}),s.jsx("button",{type:"button",className:l.execMode==="yolo"?"active":"",onClick:()=>a({...l,execMode:"yolo"}),children:"On"})]})]}),s.jsx("h3",{className:"step-subtitle",children:"Optional API Keys"}),s.jsxs("div",{className:"module-list",children:[s.jsxs("div",{className:"module-item",children:[s.jsxs("div",{style:{marginBottom:"8px"},children:[s.jsx("strong",{style:{fontSize:"var(--font-md)"},children:"Bot Token"}),s.jsxs("span",{className:"module-desc",style:{marginLeft:"8px"},children:["(",l.telegramMode==="bot"?"required":"recommended",")"]})]}),s.jsx("p",{style:{fontSize:"var(--font-sm)",margin:"0 0 8px"},children:"Inline buttons and deals module."}),s.jsxs("div",{className:"form-row",style:{gap:"8px"},children:[s.jsx(Br,{value:l.botToken,onChange:N=>{a({...l,botToken:N.target.value,botUsername:""}),g(null),C(!1),p("")},placeholder:"123456:ABC-DEF...",style:{flex:1}}),s.jsx("button",{onClick:h,disabled:u||!l.botToken,type:"button",children:u?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spinner sm"})," Validating"]}):"Validate"})]}),m&&l.botUsername&&s.jsxs("div",{className:"alert success",children:["Bot verified: @",l.botUsername]}),j&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"info-box",children:"Could not reach Telegram API. Enter the bot username manually."}),s.jsxs("div",{className:"form-group",style:{marginTop:"8px",marginBottom:0},children:[s.jsx("label",{children:"Bot Username"}),s.jsx("input",{type:"text",value:l.botUsername,onChange:N=>a({...l,botUsername:N.target.value}),placeholder:"my_bot",className:"w-full"})]})]}),m===!1&&f&&s.jsx("div",{className:"alert error",children:f}),s.jsxs("div",{className:"helper-text",children:["Create a bot via ",s.jsx("a",{href:"https://t.me/BotFather",target:"_blank",rel:"noopener noreferrer",children:"@BotFather"})," on Telegram."]})]}),s.jsxs("div",{className:"module-item",children:[s.jsxs("div",{style:{marginBottom:"8px"},children:[s.jsx("strong",{style:{fontSize:"var(--font-md)"},children:"TonAPI Key"}),s.jsx("span",{className:"module-desc",style:{marginLeft:"8px"},children:"(recommended)"})]}),s.jsx("p",{style:{fontSize:"var(--font-sm)",margin:"0 0 8px"},children:"Blockchain data - jettons, NFTs, prices, transaction history. Free key: 5 req/s (vs 1)."}),s.jsx(Br,{value:l.tonapiKey,onChange:N=>a({...l,tonapiKey:N.target.value}),placeholder:"Your TonAPI key",className:"w-full"}),s.jsxs("div",{className:"helper-text",children:["Open ",s.jsx("a",{href:"https://t.me/tonapibot",target:"_blank",rel:"noopener noreferrer",children:"@tonapibot"})," on Telegram → mini app → generate server key."]})]}),s.jsxs("div",{className:"module-item",children:[s.jsxs("div",{style:{marginBottom:"8px"},children:[s.jsx("strong",{style:{fontSize:"var(--font-md)"},children:"TonCenter API Key"}),s.jsx("span",{className:"module-desc",style:{marginLeft:"8px"},children:"(optional)"})]}),s.jsx("p",{style:{fontSize:"var(--font-sm)",margin:"0 0 8px"},children:"Blockchain RPC - send transactions, check balances. Dedicated endpoint (vs ORBS fallback)."}),s.jsx(Br,{value:l.toncenterKey,onChange:N=>a({...l,toncenterKey:N.target.value}),placeholder:"Your TonCenter API key",className:"w-full"}),s.jsxs("div",{className:"helper-text",children:["Get a free key at ",s.jsx("a",{href:"https://toncenter.com",target:"_blank",rel:"noopener noreferrer",children:"toncenter.com"})," (instant, no signup)."]})]}),s.jsxs("div",{className:"module-item",children:[s.jsxs("div",{style:{marginBottom:"8px"},children:[s.jsx("strong",{style:{fontSize:"var(--font-md)"},children:"Web Search"}),s.jsx("span",{className:"module-desc",style:{marginLeft:"8px"},children:"(optional)"})]}),s.jsx("p",{style:{fontSize:"var(--font-sm)",margin:"0 0 8px"},children:"Web search for real-time info. Free tier: 1,000 req/month."}),s.jsx(Br,{value:l.tavilyKey,onChange:N=>a({...l,tavilyKey:N.target.value}),placeholder:"tvly-...",className:"w-full"}),s.jsxs("div",{className:"helper-text",children:["Get a free key at ",s.jsx("a",{href:"https://tavily.com",target:"_blank",rel:"noopener noreferrer",children:"tavily.com"}),"."]})]})]})]})}function zc({text:l}){const[a,u]=w.useState(!1),d=w.useCallback(()=>{navigator.clipboard.writeText(l).then(()=>{u(!0),setTimeout(()=>u(!1),2e3)})},[l]);return s.jsx("button",{type:"button",className:"btn-ghost btn-sm",onClick:d,style:{marginLeft:"8px"},children:a?"Copied":"Copy"})}function km({data:l,onChange:a}){const[u,d]=w.useState(null),[m,g]=w.useState(!0),[j,C]=w.useState(!1),[f,p]=w.useState(""),[h,y]=w.useState([]);w.useEffect(()=>{We.getWalletStatus().then(N=>{d(N),N.exists&&N.address&&a({...l,walletAddress:N.address,walletAction:"keep"})}).catch(N=>p(N instanceof Error?N.message:String(N))).finally(()=>g(!1))},[]);const k=async()=>{C(!0),p("");try{if(l.walletAction==="import"){const N=l.mnemonic.trim().split(/\s+/);if(N.length!==24){p("Mnemonic must be exactly 24 words."),C(!1);return}const E=await We.importWallet(l.mnemonic.trim());a({...l,walletAddress:E.address}),y(N)}else{const N=await We.generateWallet();a({...l,walletAddress:N.address}),y(N.mnemonic)}}catch(N){p(N instanceof Error?N.message:String(N))}finally{C(!1)}};if(m)return s.jsx("div",{className:"loading",children:"Checking wallet..."});const I=h.length>0,L=l.walletAction!=="keep"&&!I;return s.jsxs("div",{className:"step-content",children:[s.jsx("h2",{className:"step-title",children:"TON Wallet"}),s.jsx("p",{className:"step-description",children:"Your agent needs a TON wallet to send and receive crypto. You can create a new one or import an existing wallet."}),f&&s.jsx("div",{className:"alert error",children:f}),(u==null?void 0:u.exists)&&u.address&&!I&&s.jsxs("div",{className:"card",children:[s.jsx("div",{className:"helper-text",style:{marginTop:0,marginBottom:"4px"},children:"Current wallet"}),s.jsx("div",{className:"mono",style:{wordBreak:"break-all"},children:u.address})]}),!I&&s.jsx("div",{className:"form-group",children:(u!=null&&u.exists?["keep","generate","import"]:["generate","import"]).map(N=>s.jsxs("label",{className:"label-inline",style:{marginBottom:"8px"},children:[s.jsx("input",{type:"radio",name:"walletAction",value:N,checked:l.walletAction===N,onChange:()=>{a({...l,walletAction:N,mnemonic:"",mnemonicSaved:!1})}}),s.jsxs("span",{children:[N==="keep"&&"Keep existing wallet",N==="generate"&&"Generate new wallet",N==="import"&&"Import from mnemonic"]})]},N))}),l.walletAction==="import"&&!I&&s.jsxs("div",{className:"form-group",children:[s.jsx("label",{children:"Recovery Phrase (24 words)"}),s.jsx("textarea",{value:l.mnemonic,onChange:N=>a({...l,mnemonic:N.target.value}),placeholder:"word1 word2 word3 ... word24",className:"w-full mono",style:{minHeight:"80px"}})]}),L&&l.walletAction!=="keep"&&s.jsx("button",{onClick:k,disabled:j||l.walletAction==="import"&&l.mnemonic.trim().split(/\s+/).length!==24,type:"button",children:j?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spinner sm"})," Working..."]}):l.walletAction==="generate"?"Generate Wallet":"Import Wallet"}),I&&s.jsxs(s.Fragment,{children:[l.walletAddress&&s.jsxs("div",{className:"card",style:{marginBottom:"16px"},children:[s.jsx("div",{style:{color:"var(--text-secondary)",marginBottom:"4px"},children:"Wallet Address"}),s.jsxs("div",{className:"form-row",style:{alignItems:"center"},children:[s.jsx("span",{className:"mono",style:{fontWeight:600,fontSize:"14px",wordBreak:"break-all",color:"var(--text-primary)"},children:l.walletAddress}),s.jsx(zc,{text:l.walletAddress})]})]}),s.jsxs("div",{className:"warning-card",children:[s.jsx("strong",{children:"WRITE DOWN THESE 24 WORDS"}),s.jsx("br",{}),"This is your only way to recover your wallet. Store them securely offline. Never share them."]}),s.jsx("ol",{className:"mnemonic-grid",children:h.map((N,E)=>s.jsxs("li",{className:"mnemonic-word",children:[s.jsxs("span",{className:"num",children:[E+1,"."]}),N]},E))}),s.jsx("div",{className:"form-row",style:{justifyContent:"flex-end",marginBottom:"8px"},children:s.jsx(zc,{text:h.join(" ")})}),s.jsx("div",{className:"form-group",style:{marginTop:"16px"},children:s.jsxs("label",{className:"label-inline",style:{color:"var(--text-primary)"},children:[s.jsx("input",{type:"checkbox",checked:l.mnemonicSaved,onChange:N=>a({...l,mnemonicSaved:N.target.checked})}),s.jsx("span",{style:{fontWeight:500},children:"I have saved my recovery phrase"})]})})]})]})}var Em=Object.defineProperty,to=Object.getOwnPropertySymbols,ld=Object.prototype.hasOwnProperty,od=Object.prototype.propertyIsEnumerable,Dc=(l,a,u)=>a in l?Em(l,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):l[a]=u,us=(l,a)=>{for(var u in a||(a={}))ld.call(a,u)&&Dc(l,u,a[u]);if(to)for(var u of to(a))od.call(a,u)&&Dc(l,u,a[u]);return l},cs=(l,a)=>{var u={};for(var d in l)ld.call(l,d)&&a.indexOf(d)<0&&(u[d]=l[d]);if(l!=null&&to)for(var d of to(l))a.indexOf(d)<0&&od.call(l,d)&&(u[d]=l[d]);return u};/**
|
|
83
|
+
* @license QR Code generator library (TypeScript)
|
|
84
|
+
* Copyright (c) Project Nayuki.
|
|
85
|
+
* SPDX-License-Identifier: MIT
|
|
86
|
+
*/var kn;(l=>{const a=class ue{constructor(f,p,h,y){if(this.version=f,this.errorCorrectionLevel=p,this.modules=[],this.isFunction=[],f<ue.MIN_VERSION||f>ue.MAX_VERSION)throw new RangeError("Version value out of range");if(y<-1||y>7)throw new RangeError("Mask value out of range");this.size=f*4+17;let k=[];for(let L=0;L<this.size;L++)k.push(!1);for(let L=0;L<this.size;L++)this.modules.push(k.slice()),this.isFunction.push(k.slice());this.drawFunctionPatterns();const I=this.addEccAndInterleave(h);if(this.drawCodewords(I),y==-1){let L=1e9;for(let N=0;N<8;N++){this.applyMask(N),this.drawFormatBits(N);const E=this.getPenaltyScore();E<L&&(y=N,L=E),this.applyMask(N)}}m(0<=y&&y<=7),this.mask=y,this.applyMask(y),this.drawFormatBits(y),this.isFunction=[]}static encodeText(f,p){const h=l.QrSegment.makeSegments(f);return ue.encodeSegments(h,p)}static encodeBinary(f,p){const h=l.QrSegment.makeBytes(f);return ue.encodeSegments([h],p)}static encodeSegments(f,p,h=1,y=40,k=-1,I=!0){if(!(ue.MIN_VERSION<=h&&h<=y&&y<=ue.MAX_VERSION)||k<-1||k>7)throw new RangeError("Invalid value");let L,N;for(L=h;;L++){const U=ue.getNumDataCodewords(L,p)*8,F=j.getTotalBits(f,L);if(F<=U){N=F;break}if(L>=y)throw new RangeError("Data too long")}for(const U of[ue.Ecc.MEDIUM,ue.Ecc.QUARTILE,ue.Ecc.HIGH])I&&N<=ue.getNumDataCodewords(L,U)*8&&(p=U);let E=[];for(const U of f){u(U.mode.modeBits,4,E),u(U.numChars,U.mode.numCharCountBits(L),E);for(const F of U.getData())E.push(F)}m(E.length==N);const W=ue.getNumDataCodewords(L,p)*8;m(E.length<=W),u(0,Math.min(4,W-E.length),E),u(0,(8-E.length%8)%8,E),m(E.length%8==0);for(let U=236;E.length<W;U^=253)u(U,8,E);let Y=[];for(;Y.length*8<E.length;)Y.push(0);return E.forEach((U,F)=>Y[F>>>3]|=U<<7-(F&7)),new ue(L,p,Y,k)}getModule(f,p){return 0<=f&&f<this.size&&0<=p&&p<this.size&&this.modules[p][f]}getModules(){return this.modules}drawFunctionPatterns(){for(let h=0;h<this.size;h++)this.setFunctionModule(6,h,h%2==0),this.setFunctionModule(h,6,h%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const f=this.getAlignmentPatternPositions(),p=f.length;for(let h=0;h<p;h++)for(let y=0;y<p;y++)h==0&&y==0||h==0&&y==p-1||h==p-1&&y==0||this.drawAlignmentPattern(f[h],f[y]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(f){const p=this.errorCorrectionLevel.formatBits<<3|f;let h=p;for(let k=0;k<10;k++)h=h<<1^(h>>>9)*1335;const y=(p<<10|h)^21522;m(y>>>15==0);for(let k=0;k<=5;k++)this.setFunctionModule(8,k,d(y,k));this.setFunctionModule(8,7,d(y,6)),this.setFunctionModule(8,8,d(y,7)),this.setFunctionModule(7,8,d(y,8));for(let k=9;k<15;k++)this.setFunctionModule(14-k,8,d(y,k));for(let k=0;k<8;k++)this.setFunctionModule(this.size-1-k,8,d(y,k));for(let k=8;k<15;k++)this.setFunctionModule(8,this.size-15+k,d(y,k));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let f=this.version;for(let h=0;h<12;h++)f=f<<1^(f>>>11)*7973;const p=this.version<<12|f;m(p>>>18==0);for(let h=0;h<18;h++){const y=d(p,h),k=this.size-11+h%3,I=Math.floor(h/3);this.setFunctionModule(k,I,y),this.setFunctionModule(I,k,y)}}drawFinderPattern(f,p){for(let h=-4;h<=4;h++)for(let y=-4;y<=4;y++){const k=Math.max(Math.abs(y),Math.abs(h)),I=f+y,L=p+h;0<=I&&I<this.size&&0<=L&&L<this.size&&this.setFunctionModule(I,L,k!=2&&k!=4)}}drawAlignmentPattern(f,p){for(let h=-2;h<=2;h++)for(let y=-2;y<=2;y++)this.setFunctionModule(f+y,p+h,Math.max(Math.abs(y),Math.abs(h))!=1)}setFunctionModule(f,p,h){this.modules[p][f]=h,this.isFunction[p][f]=!0}addEccAndInterleave(f){const p=this.version,h=this.errorCorrectionLevel;if(f.length!=ue.getNumDataCodewords(p,h))throw new RangeError("Invalid argument");const y=ue.NUM_ERROR_CORRECTION_BLOCKS[h.ordinal][p],k=ue.ECC_CODEWORDS_PER_BLOCK[h.ordinal][p],I=Math.floor(ue.getNumRawDataModules(p)/8),L=y-I%y,N=Math.floor(I/y);let E=[];const W=ue.reedSolomonComputeDivisor(k);for(let U=0,F=0;U<y;U++){let X=f.slice(F,F+N-k+(U<L?0:1));F+=X.length;const te=ue.reedSolomonComputeRemainder(X,W);U<L&&X.push(0),E.push(X.concat(te))}let Y=[];for(let U=0;U<E[0].length;U++)E.forEach((F,X)=>{(U!=N-k||X>=L)&&Y.push(F[U])});return m(Y.length==I),Y}drawCodewords(f){if(f.length!=Math.floor(ue.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let p=0;for(let h=this.size-1;h>=1;h-=2){h==6&&(h=5);for(let y=0;y<this.size;y++)for(let k=0;k<2;k++){const I=h-k,N=(h+1&2)==0?this.size-1-y:y;!this.isFunction[N][I]&&p<f.length*8&&(this.modules[N][I]=d(f[p>>>3],7-(p&7)),p++)}}m(p==f.length*8)}applyMask(f){if(f<0||f>7)throw new RangeError("Mask value out of range");for(let p=0;p<this.size;p++)for(let h=0;h<this.size;h++){let y;switch(f){case 0:y=(h+p)%2==0;break;case 1:y=p%2==0;break;case 2:y=h%3==0;break;case 3:y=(h+p)%3==0;break;case 4:y=(Math.floor(h/3)+Math.floor(p/2))%2==0;break;case 5:y=h*p%2+h*p%3==0;break;case 6:y=(h*p%2+h*p%3)%2==0;break;case 7:y=((h+p)%2+h*p%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[p][h]&&y&&(this.modules[p][h]=!this.modules[p][h])}}getPenaltyScore(){let f=0;for(let k=0;k<this.size;k++){let I=!1,L=0,N=[0,0,0,0,0,0,0];for(let E=0;E<this.size;E++)this.modules[k][E]==I?(L++,L==5?f+=ue.PENALTY_N1:L>5&&f++):(this.finderPenaltyAddHistory(L,N),I||(f+=this.finderPenaltyCountPatterns(N)*ue.PENALTY_N3),I=this.modules[k][E],L=1);f+=this.finderPenaltyTerminateAndCount(I,L,N)*ue.PENALTY_N3}for(let k=0;k<this.size;k++){let I=!1,L=0,N=[0,0,0,0,0,0,0];for(let E=0;E<this.size;E++)this.modules[E][k]==I?(L++,L==5?f+=ue.PENALTY_N1:L>5&&f++):(this.finderPenaltyAddHistory(L,N),I||(f+=this.finderPenaltyCountPatterns(N)*ue.PENALTY_N3),I=this.modules[E][k],L=1);f+=this.finderPenaltyTerminateAndCount(I,L,N)*ue.PENALTY_N3}for(let k=0;k<this.size-1;k++)for(let I=0;I<this.size-1;I++){const L=this.modules[k][I];L==this.modules[k][I+1]&&L==this.modules[k+1][I]&&L==this.modules[k+1][I+1]&&(f+=ue.PENALTY_N2)}let p=0;for(const k of this.modules)p=k.reduce((I,L)=>I+(L?1:0),p);const h=this.size*this.size,y=Math.ceil(Math.abs(p*20-h*10)/h)-1;return m(0<=y&&y<=9),f+=y*ue.PENALTY_N4,m(0<=f&&f<=2568888),f}getAlignmentPatternPositions(){if(this.version==1)return[];{const f=Math.floor(this.version/7)+2,p=this.version==32?26:Math.ceil((this.version*4+4)/(f*2-2))*2;let h=[6];for(let y=this.size-7;h.length<f;y-=p)h.splice(1,0,y);return h}}static getNumRawDataModules(f){if(f<ue.MIN_VERSION||f>ue.MAX_VERSION)throw new RangeError("Version number out of range");let p=(16*f+128)*f+64;if(f>=2){const h=Math.floor(f/7)+2;p-=(25*h-10)*h-55,f>=7&&(p-=36)}return m(208<=p&&p<=29648),p}static getNumDataCodewords(f,p){return Math.floor(ue.getNumRawDataModules(f)/8)-ue.ECC_CODEWORDS_PER_BLOCK[p.ordinal][f]*ue.NUM_ERROR_CORRECTION_BLOCKS[p.ordinal][f]}static reedSolomonComputeDivisor(f){if(f<1||f>255)throw new RangeError("Degree out of range");let p=[];for(let y=0;y<f-1;y++)p.push(0);p.push(1);let h=1;for(let y=0;y<f;y++){for(let k=0;k<p.length;k++)p[k]=ue.reedSolomonMultiply(p[k],h),k+1<p.length&&(p[k]^=p[k+1]);h=ue.reedSolomonMultiply(h,2)}return p}static reedSolomonComputeRemainder(f,p){let h=p.map(y=>0);for(const y of f){const k=y^h.shift();h.push(0),p.forEach((I,L)=>h[L]^=ue.reedSolomonMultiply(I,k))}return h}static reedSolomonMultiply(f,p){if(f>>>8||p>>>8)throw new RangeError("Byte out of range");let h=0;for(let y=7;y>=0;y--)h=h<<1^(h>>>7)*285,h^=(p>>>y&1)*f;return m(h>>>8==0),h}finderPenaltyCountPatterns(f){const p=f[1];m(p<=this.size*3);const h=p>0&&f[2]==p&&f[3]==p*3&&f[4]==p&&f[5]==p;return(h&&f[0]>=p*4&&f[6]>=p?1:0)+(h&&f[6]>=p*4&&f[0]>=p?1:0)}finderPenaltyTerminateAndCount(f,p,h){return f&&(this.finderPenaltyAddHistory(p,h),p=0),p+=this.size,this.finderPenaltyAddHistory(p,h),this.finderPenaltyCountPatterns(h)}finderPenaltyAddHistory(f,p){p[0]==0&&(f+=this.size),p.pop(),p.unshift(f)}};a.MIN_VERSION=1,a.MAX_VERSION=40,a.PENALTY_N1=3,a.PENALTY_N2=3,a.PENALTY_N3=40,a.PENALTY_N4=10,a.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],a.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],l.QrCode=a;function u(C,f,p){if(f<0||f>31||C>>>f)throw new RangeError("Value out of range");for(let h=f-1;h>=0;h--)p.push(C>>>h&1)}function d(C,f){return(C>>>f&1)!=0}function m(C){if(!C)throw new Error("Assertion error")}const g=class Le{constructor(f,p,h){if(this.mode=f,this.numChars=p,this.bitData=h,p<0)throw new RangeError("Invalid argument");this.bitData=h.slice()}static makeBytes(f){let p=[];for(const h of f)u(h,8,p);return new Le(Le.Mode.BYTE,f.length,p)}static makeNumeric(f){if(!Le.isNumeric(f))throw new RangeError("String contains non-numeric characters");let p=[];for(let h=0;h<f.length;){const y=Math.min(f.length-h,3);u(parseInt(f.substring(h,h+y),10),y*3+1,p),h+=y}return new Le(Le.Mode.NUMERIC,f.length,p)}static makeAlphanumeric(f){if(!Le.isAlphanumeric(f))throw new RangeError("String contains unencodable characters in alphanumeric mode");let p=[],h;for(h=0;h+2<=f.length;h+=2){let y=Le.ALPHANUMERIC_CHARSET.indexOf(f.charAt(h))*45;y+=Le.ALPHANUMERIC_CHARSET.indexOf(f.charAt(h+1)),u(y,11,p)}return h<f.length&&u(Le.ALPHANUMERIC_CHARSET.indexOf(f.charAt(h)),6,p),new Le(Le.Mode.ALPHANUMERIC,f.length,p)}static makeSegments(f){return f==""?[]:Le.isNumeric(f)?[Le.makeNumeric(f)]:Le.isAlphanumeric(f)?[Le.makeAlphanumeric(f)]:[Le.makeBytes(Le.toUtf8ByteArray(f))]}static makeEci(f){let p=[];if(f<0)throw new RangeError("ECI assignment value out of range");if(f<128)u(f,8,p);else if(f<16384)u(2,2,p),u(f,14,p);else if(f<1e6)u(6,3,p),u(f,21,p);else throw new RangeError("ECI assignment value out of range");return new Le(Le.Mode.ECI,0,p)}static isNumeric(f){return Le.NUMERIC_REGEX.test(f)}static isAlphanumeric(f){return Le.ALPHANUMERIC_REGEX.test(f)}getData(){return this.bitData.slice()}static getTotalBits(f,p){let h=0;for(const y of f){const k=y.mode.numCharCountBits(p);if(y.numChars>=1<<k)return 1/0;h+=4+k+y.bitData.length}return h}static toUtf8ByteArray(f){f=encodeURI(f);let p=[];for(let h=0;h<f.length;h++)f.charAt(h)!="%"?p.push(f.charCodeAt(h)):(p.push(parseInt(f.substring(h+1,h+3),16)),h+=2);return p}};g.NUMERIC_REGEX=/^[0-9]*$/,g.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,g.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let j=g;l.QrSegment=g})(kn||(kn={}));(l=>{(a=>{const u=class{constructor(m,g){this.ordinal=m,this.formatBits=g}};u.LOW=new u(0,1),u.MEDIUM=new u(1,0),u.QUARTILE=new u(2,3),u.HIGH=new u(3,2),a.Ecc=u})(l.QrCode||(l.QrCode={}))})(kn||(kn={}));(l=>{(a=>{const u=class{constructor(m,g){this.modeBits=m,this.numBitsCharCount=g}numCharCountBits(m){return this.numBitsCharCount[Math.floor((m+7)/17)]}};u.NUMERIC=new u(1,[10,12,14]),u.ALPHANUMERIC=new u(2,[9,11,13]),u.BYTE=new u(4,[8,16,16]),u.KANJI=new u(8,[8,10,12]),u.ECI=new u(7,[0,0,0]),a.Mode=u})(l.QrSegment||(l.QrSegment={}))})(kn||(kn={}));var Gn=kn;/**
|
|
87
|
+
* @license qrcode.react
|
|
88
|
+
* Copyright (c) Paul O'Shannessy
|
|
89
|
+
* SPDX-License-Identifier: ISC
|
|
90
|
+
*/var jm={L:Gn.QrCode.Ecc.LOW,M:Gn.QrCode.Ecc.MEDIUM,Q:Gn.QrCode.Ecc.QUARTILE,H:Gn.QrCode.Ecc.HIGH},id=128,sd="L",ad="#FFFFFF",ud="#000000",cd=!1,dd=1,Cm=4,Nm=0,Pm=.1;function fd(l,a=0){const u=[];return l.forEach(function(d,m){let g=null;d.forEach(function(j,C){if(!j&&g!==null){u.push(`M${g+a} ${m+a}h${C-g}v1H${g+a}z`),g=null;return}if(C===d.length-1){if(!j)return;g===null?u.push(`M${C+a},${m+a} h1v1H${C+a}z`):u.push(`M${g+a},${m+a} h${C+1-g}v1H${g+a}z`);return}j&&g===null&&(g=C)})}),u.join("")}function pd(l,a){return l.slice().map((u,d)=>d<a.y||d>=a.y+a.h?u:u.map((m,g)=>g<a.x||g>=a.x+a.w?m:!1))}function _m(l,a,u,d){if(d==null)return null;const m=l.length+u*2,g=Math.floor(a*Pm),j=m/a,C=(d.width||g)*j,f=(d.height||g)*j,p=d.x==null?l.length/2-C/2:d.x*j,h=d.y==null?l.length/2-f/2:d.y*j,y=d.opacity==null?1:d.opacity;let k=null;if(d.excavate){let L=Math.floor(p),N=Math.floor(h),E=Math.ceil(C+p-L),W=Math.ceil(f+h-N);k={x:L,y:N,w:E,h:W}}const I=d.crossOrigin;return{x:p,y:h,h:f,w:C,excavation:k,opacity:y,crossOrigin:I}}function Tm(l,a){return a!=null?Math.max(Math.floor(a),0):l?Cm:Nm}function hd({value:l,level:a,minVersion:u,includeMargin:d,marginSize:m,imageSettings:g,size:j,boostLevel:C}){let f=he.useMemo(()=>{const L=(Array.isArray(l)?l:[l]).reduce((N,E)=>(N.push(...Gn.QrSegment.makeSegments(E)),N),[]);return Gn.QrCode.encodeSegments(L,jm[a],u,void 0,void 0,C)},[l,a,u,C]);const{cells:p,margin:h,numCells:y,calculatedImageSettings:k}=he.useMemo(()=>{let I=f.getModules();const L=Tm(d,m),N=I.length+L*2,E=_m(I,j,L,g);return{cells:I,margin:L,numCells:N,calculatedImageSettings:E}},[f,j,g,d,m]);return{qrcode:f,margin:h,cells:p,numCells:y,calculatedImageSettings:k}}var Rm=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),Lm=he.forwardRef(function(a,u){const d=a,{value:m,size:g=id,level:j=sd,bgColor:C=ad,fgColor:f=ud,includeMargin:p=cd,minVersion:h=dd,boostLevel:y,marginSize:k,imageSettings:I}=d,N=cs(d,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:E}=N,W=cs(N,["style"]),Y=I==null?void 0:I.src,U=he.useRef(null),F=he.useRef(null),X=he.useCallback(ve=>{U.current=ve,typeof u=="function"?u(ve):u&&(u.current=ve)},[u]),[te,we]=he.useState(!1),{margin:me,cells:q,numCells:Ie,calculatedImageSettings:Ee}=hd({value:m,level:j,minVersion:h,boostLevel:y,includeMargin:p,marginSize:k,imageSettings:I,size:g});he.useEffect(()=>{if(U.current!=null){const ve=U.current,ge=ve.getContext("2d");if(!ge)return;let ze=q;const V=F.current,M=Ee!=null&&V!==null&&V.complete&&V.naturalHeight!==0&&V.naturalWidth!==0;M&&Ee.excavation!=null&&(ze=pd(q,Ee.excavation));const b=window.devicePixelRatio||1;ve.height=ve.width=g*b;const H=g/Ie*b;ge.scale(H,H),ge.fillStyle=C,ge.fillRect(0,0,Ie,Ie),ge.fillStyle=f,Rm?ge.fill(new Path2D(fd(ze,me))):q.forEach(function(P,O){P.forEach(function(ie,se){ie&&ge.fillRect(se+me,O+me,1,1)})}),Ee&&(ge.globalAlpha=Ee.opacity),M&&ge.drawImage(V,Ee.x+me,Ee.y+me,Ee.w,Ee.h)}}),he.useEffect(()=>{we(!1)},[Y]);const le=us({height:g,width:g},E);let $=null;return Y!=null&&($=he.createElement("img",{src:Y,key:Y,style:{display:"none"},onLoad:()=>{we(!0)},ref:F,crossOrigin:Ee==null?void 0:Ee.crossOrigin})),he.createElement(he.Fragment,null,he.createElement("canvas",us({style:le,height:g,width:g,ref:X,role:"img"},W)),$)});Lm.displayName="QRCodeCanvas";var md=he.forwardRef(function(a,u){const d=a,{value:m,size:g=id,level:j=sd,bgColor:C=ad,fgColor:f=ud,includeMargin:p=cd,minVersion:h=dd,boostLevel:y,title:k,marginSize:I,imageSettings:L}=d,N=cs(d,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:E,cells:W,numCells:Y,calculatedImageSettings:U}=hd({value:m,level:j,minVersion:h,boostLevel:y,includeMargin:p,marginSize:I,imageSettings:L,size:g});let F=W,X=null;L!=null&&U!=null&&(U.excavation!=null&&(F=pd(W,U.excavation)),X=he.createElement("image",{href:L.src,height:U.h,width:U.w,x:U.x+E,y:U.y+E,preserveAspectRatio:"none",opacity:U.opacity,crossOrigin:U.crossOrigin}));const te=fd(F,E);return he.createElement("svg",us({height:g,width:g,viewBox:`0 0 ${Y} ${Y}`,ref:u,role:"img"},N),!!k&&he.createElement("title",null,k),he.createElement("path",{fill:C,d:`M0,0 h${Y}v${Y}H0z`,shapeRendering:"crispEdges"}),he.createElement("path",{fill:f,d:te,shapeRendering:"crispEdges"}),X)});md.displayName="QRCodeSVG";const Im=w.lazy(()=>Je(()=>import("./index.es-DdpKlnGb.js"),[])),Uc=()=>Je(()=>import("./run-DOrDowjK.js"),[]).then(l=>l.default),Mm=()=>Je(()=>import("./login-telegram-BP7CJDmx.js"),[]).then(l=>l.default);function rs({loader:l,size:a}){const[u,d]=w.useState(null);return w.useEffect(()=>{l().then(d)},[]),u?s.jsx(w.Suspense,{fallback:s.jsx("div",{style:{width:a,height:a,margin:"0 auto 16px"}}),children:s.jsx(Im,{animationData:u,loop:!0,style:{width:a,height:a,margin:"0 auto 16px"}})}):s.jsx("div",{style:{width:a,height:a,margin:"0 auto 16px"}})}function Om({data:l,onChange:a}){const[u,d]=w.useState("idle"),[m,g]=w.useState(!1),[j,C]=w.useState(""),[f,p]=w.useState(""),[h,y]=w.useState(""),[k,I]=w.useState(""),[L,N]=w.useState("sms"),[E,W]=w.useState(""),[Y,U]=w.useState(!1),[F,X]=w.useState(0),[te,we]=w.useState(""),me=w.useRef(null),q=w.useRef(null),Ie=l.authMode==="qr";w.useEffect(()=>{if(!(F<=0))return me.current=setInterval(()=>{X(V=>V<=1?(me.current&&clearInterval(me.current),0):V-1)},1e3),()=>{me.current&&clearInterval(me.current)}},[F>0]),w.useEffect(()=>{if(u!=="code_sent")return;const V=setTimeout(()=>U(!0),3e4);return()=>clearTimeout(V)},[u]),w.useEffect(()=>{l.telegramUser&&d("done")},[]),w.useEffect(()=>()=>{q.current&&clearInterval(q.current)},[]);const Ee=async()=>{var V;g(!0),C("");try{const M=await We.startQr(l.apiId,l.apiHash);a({...l,authSessionId:M.authSessionId}),we(M.token),d("qr_waiting"),le(M.authSessionId)}catch(M){const b=M instanceof Error?M.message:String(M);if(b.includes("FLOOD")||b.includes("Rate limited")){const H=parseInt(((V=b.match(/(\d+)/))==null?void 0:V[1])||"60");X(H)}C(b)}finally{g(!1)}},le=w.useCallback(V=>{q.current&&clearInterval(q.current),q.current=setInterval(async()=>{try{const M=await We.refreshQr(V);M.status==="authenticated"&&M.user?(q.current&&clearInterval(q.current),q.current=null,a({...l,telegramUser:{...M.user,username:M.user.username??""},skipConnect:!1}),d("done")):M.status==="2fa_required"?(q.current&&clearInterval(q.current),q.current=null,I(M.passwordHint||""),d("2fa")):M.status==="expired"?(q.current&&clearInterval(q.current),q.current=null,d("idle"),C("Session expired. Please try again.")):M.status==="waiting"&&M.token&&we(M.token)}catch{}},5e3)},[l,a]),$=async()=>{var V;g(!0),C("");try{const M=await We.sendCode(l.apiId,l.apiHash,l.phone);a({...l,authSessionId:M.authSessionId}),N(M.codeDelivery),M.fragmentUrl&&W(M.fragmentUrl),d("code_sent"),U(!1)}catch(M){const b=M instanceof Error?M.message:String(M);if(b.includes("FLOOD")){const H=parseInt(((V=b.match(/(\d+)/))==null?void 0:V[1])||"60");X(H)}C(b)}finally{g(!1)}},ve=async V=>{if(p(V),!(V.length<5)){g(!0),C("");try{const M=await We.verifyCode(l.authSessionId,V);M.status==="authenticated"&&M.user?(a({...l,telegramUser:{...M.user,username:M.user.username??""},skipConnect:!1}),d("done")):M.status==="2fa_required"&&(I(M.passwordHint||""),d("2fa"))}catch(M){C(M instanceof Error?M.message:String(M))}finally{g(!1)}}},ge=async()=>{g(!0),C("");try{const V=await We.verifyPassword(l.authSessionId,h);V.status==="authenticated"&&V.user&&(a({...l,telegramUser:{...V.user,username:V.user.username??""},skipConnect:!1}),d("done"))}catch(V){C(V instanceof Error?V.message:String(V))}finally{g(!1)}},ze=async()=>{g(!0),C("");try{const V=await We.resendCode(l.authSessionId);N(V.codeDelivery),V.fragmentUrl&&W(V.fragmentUrl),p(""),U(!1)}catch(V){C(V instanceof Error?V.message:String(V))}finally{g(!1)}};return s.jsxs("div",{className:"step-content",children:[s.jsx("h2",{className:"step-title",children:"Connect your Agent to Telegram"}),s.jsx("p",{className:"step-description",children:Ie?"Scan the QR code with your Telegram app to authenticate instantly.":"Authenticate with your Telegram account. This lets the agent send and receive messages as you."}),j&&s.jsx("div",{className:"alert error",children:j}),u==="idle"&&Ie&&s.jsxs("div",{className:"text-center",style:{padding:"20px 0"},children:[s.jsx(rs,{loader:Uc,size:200}),s.jsx("button",{onClick:Ee,disabled:m||F>0,type:"button",className:"btn-lg",children:m?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spinner sm"})," Connecting..."]}):F>0?`Wait ${F}s`:"Show QR Code"})]}),u==="qr_waiting"&&s.jsxs("div",{className:"text-center",style:{padding:"20px 0"},children:[s.jsx("div",{style:{display:"inline-block",padding:"16px",background:"#fff",borderRadius:"12px",marginBottom:"16px"},children:s.jsx(md,{value:`tg://login?token=${te}`,size:256,level:"M",marginSize:4,title:"Scan with Telegram to log in"})}),s.jsxs("div",{className:"text-muted",style:{marginBottom:"8px"},children:["Open ",s.jsx("strong",{children:"Telegram"})," on your phone"]}),s.jsx("div",{className:"text-muted",style:{marginBottom:"16px",fontSize:"0.9em"},children:"Settings → Devices → Link Desktop Device"}),s.jsxs("div",{className:"text-muted",style:{fontSize:"0.85em",opacity:.7},children:[s.jsx("span",{className:"spinner sm",style:{marginRight:"6px"}}),"Waiting for scan..."]})]}),u==="idle"&&!Ie&&s.jsxs("div",{className:"text-center",style:{padding:"20px 0"},children:[s.jsx(rs,{loader:Uc,size:200}),s.jsx("button",{onClick:$,disabled:m||F>0,type:"button",className:"btn-lg",children:m?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spinner sm"})," Connecting..."]}):F>0?`Wait ${F}s`:"Connect to Telegram"})]}),u==="code_sent"&&s.jsxs("div",{className:"text-center",style:{padding:"20px 0"},children:[s.jsx(rs,{loader:Mm,size:180}),L==="fragment"?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"info-panel",style:{textAlign:"left",marginBottom:"16px"},children:[s.jsx("strong",{children:"Anonymous number detected (+888)"}),s.jsx("p",{className:"text-muted",style:{margin:"8px 0"},children:'Your number is an anonymous number purchased on Fragment. To receive the login code, open Fragment.com, connect your TON wallet, and navigate to "My Assets" to find the code.'}),E&&s.jsxs("a",{href:E,target:"_blank",rel:"noopener noreferrer",className:"btn-lg btn-ghost",style:{display:"inline-flex",alignItems:"center",gap:"6px",marginTop:"4px"},children:["Open Fragment.com",s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),s.jsx("polyline",{points:"15 3 21 3 21 9"}),s.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})]})]}),s.jsx("div",{className:"text-muted",style:{marginBottom:"16px"},children:"Enter the code shown on Fragment"})]}):s.jsxs("div",{className:"text-muted",style:{marginBottom:"16px"},children:["Code sent via ",L==="app"?"Telegram app":"SMS"]}),s.jsx("div",{style:{display:"flex",justifyContent:"center",marginBottom:"16px"},children:s.jsx("input",{className:"code-input",type:"text",inputMode:"numeric",value:f,onChange:V=>{const M=V.target.value.replace(/\D/g,"").slice(0,5);ve(M)},placeholder:"12345",maxLength:5,autoFocus:!0,disabled:m})}),m&&s.jsxs("div",{className:"text-muted",children:[s.jsx("span",{className:"spinner sm"})," Verifying..."]}),Y&&!m&&s.jsx("button",{type:"button",className:"btn-ghost",onClick:ze,children:"Resend code"})]}),u==="2fa"&&s.jsxs("div",{style:{padding:"20px 0"},children:[s.jsx("div",{className:"text-muted text-center",style:{marginBottom:"12px"},children:"Two-factor authentication required"}),k&&s.jsxs("div",{className:"info-panel text-center",children:["Hint: ",k]}),s.jsxs("div",{className:"form-group",children:[s.jsx("label",{children:"Password"}),s.jsx("input",{type:"password",value:h,onChange:V=>y(V.target.value),onKeyDown:V=>V.key==="Enter"&&ge(),placeholder:"Enter your 2FA password",className:"w-full",autoFocus:!0})]}),s.jsx("button",{onClick:ge,disabled:m||!h,type:"button",children:m?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spinner sm"})," Verifying..."]}):"Submit"})]}),u==="done"&&l.telegramUser&&s.jsxs("div",{className:"alert success text-center",style:{padding:"20px"},children:["Connected as ",s.jsx("strong",{children:l.telegramUser.firstName}),l.telegramUser.username&&s.jsxs(s.Fragment,{children:[" (@",l.telegramUser.username,")"]})]})]})}const Bc=[{id:"welcome",label:"Welcome"},{id:"provider",label:"Provider"},{id:"config",label:"Config"},{id:"wallet",label:"Wallet"},{id:"telegram",label:"Telegram"},{id:"connect",label:"Connect"}],Am=new Set(["telegram","connect"]);function xs(l){return l==="bot"?Bc.filter(a=>!Am.has(a.id)):Bc}const zm={riskAccepted:!1,agentName:"Nova",provider:"",apiKey:"",cocoonPort:11435,localUrl:"http://localhost:11434/v1",apiId:0,apiHash:"",phone:"",userId:0,mode:"quick",telegramMode:"user",model:"",customModel:"",dmPolicy:"admin-only",groupPolicy:"admin-only",requireMention:!0,maxIterations:5,botToken:"",botUsername:"",tonapiKey:"",toncenterKey:"",tavilyKey:"",customizeThresholds:!1,buyMaxFloor:95,sellMinFloor:105,walletAction:"generate",mnemonic:"",walletAddress:"",mnemonicSaved:!1,authSessionId:"",telegramUser:null,authMode:"qr",skipConnect:!1,webuiEnabled:!1,execMode:"off"};function Dm(l,a){switch(l){case 0:return a.riskAccepted;case 1:if(!a.provider)return!1;if(a.provider==="cocoon")return a.cocoonPort>=1&&a.cocoonPort<=65535;if(a.provider==="local")try{return new URL(a.localUrl),!0}catch{return!1}return a.provider==="claude-code"?!0:a.apiKey.length>0;case 2:return a.provider!=="cocoon"&&a.provider!=="local"&&!(a.model==="__custom__"?a.customModel:a.model)||a.telegramMode==="bot"&&!a.botToken?!1:a.userId>0&&a.maxIterations>=1&&a.maxIterations<=50;case 3:return a.walletAction==="keep"?!0:a.walletAddress?a.mnemonicSaved:!1;case 4:return a.apiId<=0||a.apiHash.length<10?!1:a.authMode==="phone"?a.phone.startsWith("+"):!0;case 5:return a.telegramUser!==null||a.skipConnect;default:return!1}}const gd=w.createContext(null);function ws(){const l=w.useContext(gd);if(!l)throw new Error("useSetup must be used inside SetupProvider");return l}function Um({children:l}){const[a,u]=w.useState(0),[d,m]=w.useState(zm),[g,j]=w.useState(!1),[C,f]=w.useState(""),[p,h]=w.useState(!1),[y,k]=w.useState(!1),[I,L]=w.useState(""),N=xs(d.telegramMode),E=Dm(a,d),W=w.useCallback(()=>{E&&u(te=>Math.min(te+1,N.length-1))},[E,N.length]),Y=w.useCallback(()=>{u(te=>Math.max(te-1,0))},[]),U=w.useCallback(async()=>{j(!0),f("");try{const te=d.model==="__custom__"?d.customModel:d.model||void 0,we={agent:{provider:d.provider,...d.provider!=="cocoon"&&d.provider!=="local"&&d.apiKey?{api_key:d.apiKey}:{},...d.provider==="local"?{base_url:d.localUrl}:{},...te?{model:te}:{},max_agentic_iterations:d.maxIterations},telegram:{...d.telegramMode==="bot"?{mode:"bot"}:{},api_id:d.apiId,api_hash:d.apiHash,phone:d.phone,admin_ids:[d.userId],owner_id:d.userId,dm_policy:d.telegramMode==="bot"?"admin-only":d.dmPolicy,group_policy:d.groupPolicy,require_mention:d.telegramMode==="bot"?!0:d.requireMention,...d.botToken?{bot_token:d.botToken}:{},...d.botUsername?{bot_username:d.botUsername}:{}},...d.provider==="cocoon"?{cocoon:{port:d.cocoonPort}}:{},deals:{enabled:!!d.botToken,...d.customizeThresholds?{buy_max_floor_percent:d.buyMaxFloor,sell_min_floor_percent:d.sellMinFloor}:{}},...d.tonapiKey?{tonapi_key:d.tonapiKey}:{},...d.toncenterKey?{toncenter_api_key:d.toncenterKey}:{},...d.tavilyKey?{tavily_api_key:d.tavilyKey}:{},webui:{enabled:!0}};await We.saveConfig(we),h(!0)}catch(te){f(te instanceof Error?te.message:String(te))}finally{j(!1)}},[d]),F=w.useCallback(async()=>{k(!0),L("");try{const{token:te}=await We.launch();await We.pollHealth(3e4),window.location.href=`/auth/exchange?token=${encodeURIComponent(te)}`}catch(te){L(te instanceof Error?te.message:String(te))}finally{k(!1)}},[]),X=w.useRef(U);return X.current=U,w.useEffect(()=>{a===N.length-1&&d.telegramUser&&d.telegramMode==="user"&&!p&&!g&&X.current()},[a,N.length,d.telegramUser,d.telegramMode,p,g]),s.jsx(gd.Provider,{value:{step:a,data:d,loading:g,error:C,saved:p,launching:y,launchError:I,canAdvance:E,setData:m,next:W,prev:Y,handleSave:U,handleLaunch:F},children:l})}const Bm=w.lazy(()=>Je(()=>import("./index.es-DdpKlnGb.js"),[])),Fm=()=>Je(()=>import("./complete-fZLnb5Ot.js"),[]).then(l=>l.default);function Wm(){const[l,a]=w.useState(null);w.useEffect(()=>{Fm().then(a)},[]);const u=200;return l?s.jsx(w.Suspense,{fallback:s.jsx("div",{style:{width:u,height:u,margin:"0 auto 24px"}}),children:s.jsx(Bm,{animationData:l,loop:!0,style:{width:u,height:u,margin:"0 auto 24px"}})}):s.jsx("div",{style:{width:u,height:u,margin:"0 auto 24px"}})}function $m(){const{launching:l,launchError:a,handleLaunch:u}=ws();return s.jsxs("div",{className:"step-content text-center",style:{paddingTop:"40px"},children:[s.jsx(Wm,{}),s.jsx("h2",{style:{fontSize:"20px",fontWeight:600,letterSpacing:"-0.3px",marginBottom:"8px"},children:"Your Agent is ready"}),s.jsx("p",{style:{color:"var(--text-secondary)",fontSize:"14px",marginBottom:"32px"},children:"Configuration saved. Start your agent to begin."}),s.jsx("button",{onClick:u,disabled:l,className:"btn-lg",style:{minWidth:"200px"},children:l?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spinner sm"})," Starting..."]}):"Start Agent"}),l&&s.jsx("p",{className:"helper-text",style:{marginTop:"16px"},children:"Booting your agent... this may take a few seconds."}),a&&s.jsxs("div",{style:{marginTop:"20px"},children:[s.jsx("div",{className:"alert error",children:a}),s.jsx("p",{style:{color:"var(--text-secondary)",marginTop:"8px"},children:"Start manually:"}),s.jsx("code",{className:"code-block",style:{marginTop:"8px"},children:"teleton start"})]})]})}const Vm={welcome:hm,provider:gm,config:Sm,wallet:km,telegram:xm,connect:Om};function Hm(){const{step:l,data:a,loading:u,error:d,saved:m,canAdvance:g,setData:j,next:C,prev:f,handleSave:p}=ws(),[h,y]=w.useState(!1),k=xs(a.telegramMode);if(m)return s.jsx($m,{});const I=k[l],L=I?Vm[I.id]:void 0,N=l<k.length-1?k[l+1].label:"";return s.jsxs(s.Fragment,{children:[L&&s.jsx(L,{data:a,onChange:j}),d&&s.jsx("div",{className:"alert error",children:d}),s.jsxs("div",{className:"setup-nav",style:{alignItems:"center"},children:[l>0&&s.jsx("button",{className:"btn-ghost",onClick:f,type:"button",children:"Back"}),l===0&&s.jsxs("label",{className:"label-inline",style:{cursor:"pointer",margin:0},children:[s.jsx("input",{type:"checkbox",checked:a.riskAccepted,onChange:E=>{const W=E.target.checked;j({...a,riskAccepted:W}),W&&!h&&We.initWorkspace(a.agentName||void 0).then(()=>y(!0)).catch(()=>{})}}),s.jsx("span",{children:"I understand the risks and accept full responsibility"})]}),s.jsx("div",{style:{flex:1}}),l<k.length-1&&s.jsx("button",{onClick:C,disabled:!g||u,type:"button",children:u?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spinner sm"})," Next"]}):`Next: ${N}`}),l===k.length-1&&a.telegramMode==="bot"&&s.jsx("button",{onClick:p,disabled:!g||u,type:"button",children:u?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spinner sm"})," Saving..."]}):"Finish Setup"})]})]})}function Qm({steps:l,current:a}){return s.jsx("div",{className:"step-indicator",children:l.map((u,d)=>{const m=d<a,g=d===a,j=d===l.length-1;return s.jsxs("div",{className:"step-cell",style:j?{flex:"0 0 auto"}:void 0,children:[s.jsxs("div",{className:"step-cell-top",children:[s.jsx("div",{className:`step-dot${g?" active":""}${m?" completed":""}`,children:m?s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"20 6 9 17 4 12"})}):s.jsx("span",{children:d+1})}),!j&&s.jsx("div",{className:`step-line${m?" completed":""}`})]}),s.jsx("span",{className:`step-label${g?" active":""}${m?" completed":""}`,children:u.label})]},u.id)})})}function Km(){const{step:l,data:a}=ws(),u=xs(a.telegramMode);return s.jsx(Qm,{steps:u,current:l})}const Ym=[{label:"Dashboard",path:"/"},{label:"Tools",path:"/tools"},{label:"Plugins",path:"/plugins"},{label:"Soul",path:"/soul"},{label:"Memory",path:"/memory"},{label:"Logs",path:"/logs"},{label:"Workspace",path:"/workspace"},{label:"Tasks",path:"/tasks"},{label:"MCP",path:"/mcp"},{label:"Config",path:"/config"}];function Jm(){return s.jsx("nav",{children:Ym.map(l=>s.jsx("span",{className:"sidebar-link-disabled",children:l.label},l.path))})}function Gm(){return s.jsxs(s.Fragment,{children:[s.jsx(Km,{}),s.jsx(bc,{})]})}function Xm(){return s.jsx(Um,{children:s.jsx(ed,{sidebar:s.jsx(Jm,{}),children:s.jsx(Gm,{})})})}const Fc=2e3,ls=1e3,bm=3e4;class qm{constructor(){Rt(this,"logs",[]);Rt(this,"snapshot",[]);Rt(this,"listeners",new Set);Rt(this,"disconnect",null);Rt(this,"_connected",!1);Rt(this,"reconnectTimer",null);Rt(this,"reconnectDelay",ls);Rt(this,"shouldReconnect",!1)}connect(){this.disconnect||(this.shouldReconnect=!0,this.reconnectDelay=ls,this.doConnect())}doConnect(){this.disconnect||(this.disconnect=Xh.connectLogs(a=>{this.logs.push(a),this.logs.length>Fc&&(this.logs=this.logs.slice(-Fc)),this._connected=!0,this.reconnectDelay=ls,this.snapshot=[...this.logs],this.notify()},()=>{this._connected=!1,this.disconnect&&(this.disconnect(),this.disconnect=null),this.notify(),this.scheduleReconnect()}))}scheduleReconnect(){!this.shouldReconnect||this.reconnectTimer||(this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.shouldReconnect&&!this.disconnect&&this.doConnect()},this.reconnectDelay),this.reconnectDelay=Math.min(this.reconnectDelay*2,bm))}stop(){this.shouldReconnect=!1,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.disconnect&&(this.disconnect(),this.disconnect=null),this._connected=!1,this.notify()}getLogs(){return this.snapshot}isConnected(){return this._connected}clear(){this.logs=[],this.snapshot=[],this.notify()}subscribe(a){return this.listeners.add(a),()=>this.listeners.delete(a)}notify(){for(const a of this.listeners)a()}}const Zm=new qm,eg=he.lazy(()=>Je(()=>import("./Dashboard-dM18fGOm.js"),__vite__mapDeps([0,1])).then(l=>({default:l.Dashboard}))),tg=he.lazy(()=>Je(()=>import("./Tools-Du8B8Mb4.js"),__vite__mapDeps([2,3,4])).then(l=>({default:l.Tools}))),ng=he.lazy(()=>Je(()=>import("./Plugins-3hoJprFo.js"),__vite__mapDeps([5,3,4])).then(l=>({default:l.Plugins}))),rg=he.lazy(()=>Je(()=>import("./Soul-BSxE73aK.js"),[]).then(l=>({default:l.Soul}))),lg=he.lazy(()=>Je(()=>import("./Memory-CfLwH45G.js"),__vite__mapDeps([6,7])).then(l=>({default:l.Memory}))),og=he.lazy(()=>Je(()=>import("./Workspace-qklcXpXV.js"),__vite__mapDeps([8,7])).then(l=>({default:l.Workspace}))),ig=he.lazy(()=>Je(()=>import("./Tasks-DkCkfu3A.js"),__vite__mapDeps([9,7,4])).then(l=>({default:l.Tasks}))),sg=he.lazy(()=>Je(()=>import("./Mcp-CtWNzwsz.js"),[]).then(l=>({default:l.Mcp}))),ag=he.lazy(()=>Je(()=>import("./Config-MNxA69ib.js"),__vite__mapDeps([10,1])).then(l=>({default:l.Config}))),ug=he.lazy(()=>Je(()=>import("./Hooks-D2griQnI.js"),[]).then(l=>({default:l.Hooks}))),cg=he.lazy(()=>Je(()=>import("./Conversations-Dk958paA.js"),__vite__mapDeps([11,7])).then(l=>({default:l.Conversations}))),dg=he.lazy(()=>Je(()=>import("./Wallet-BLILP2Gn.js"),__vite__mapDeps([12,7])).then(l=>({default:l.Wallet})));function fg(){return window.location.pathname.startsWith("/setup")?s.jsx(Zc,{children:s.jsx(rd,{children:s.jsx(qc,{children:s.jsx(Ye,{path:"/setup",element:s.jsx(Xm,{}),children:s.jsx(Ye,{index:!0,element:s.jsx(Hm,{})})})})})}):s.jsx(pg,{})}function pg(){const[l,a]=w.useState(!1),[u,d]=w.useState(!0),[m,g]=w.useState(""),[j,C]=w.useState("");w.useEffect(()=>{const h=new URLSearchParams(window.location.search).get("token");if(window.location.pathname==="/auth/exchange"&&h){Ac(h).then(y=>{y?window.location.href="/":(d(!1),C("Token exchange failed"))});return}Jh().then(y=>{a(y),d(!1)})},[]),w.useEffect(()=>{l&&Zm.connect()},[l]);const f=async()=>{const p=m.trim();if(!p)return;C(""),await Ac(p)?a(!0):C("Invalid token")};return u?s.jsx("div",{className:"login-container",children:s.jsx("div",{className:"login-card",children:s.jsx("p",{children:"Loading..."})})}):l?s.jsx(Zc,{children:s.jsx(rd,{children:s.jsx(w.Suspense,{fallback:null,children:s.jsx(qc,{children:s.jsxs(Ye,{path:"/",element:s.jsx(pm,{}),children:[s.jsx(Ye,{index:!0,element:s.jsx(eg,{})}),s.jsx(Ye,{path:"tools",element:s.jsx(tg,{})}),s.jsx(Ye,{path:"plugins",element:s.jsx(ng,{})}),s.jsx(Ye,{path:"soul",element:s.jsx(rg,{})}),s.jsx(Ye,{path:"memory",element:s.jsx(lg,{})}),s.jsx(Ye,{path:"conversations",element:s.jsx(cg,{})}),s.jsx(Ye,{path:"wallet",element:s.jsx(dg,{})}),s.jsx(Ye,{path:"workspace",element:s.jsx(og,{})}),s.jsx(Ye,{path:"tasks",element:s.jsx(ig,{})}),s.jsx(Ye,{path:"mcp",element:s.jsx(sg,{})}),s.jsx(Ye,{path:"config",element:s.jsx(ag,{})}),s.jsx(Ye,{path:"hooks",element:s.jsx(ug,{})}),s.jsx(Ye,{path:"*",element:s.jsx(Sh,{to:"/",replace:!0})})]})})})})}):s.jsx("div",{className:"login-container",children:s.jsxs("div",{className:"login-card",children:[s.jsx("h1",{children:"Teleton"}),s.jsx("p",{children:"Enter your authentication token to access the dashboard."}),s.jsxs("div",{className:"form-group",children:[s.jsx("label",{children:"Token"}),s.jsx("input",{type:"password",value:m,onChange:p=>g(p.target.value),onKeyDown:p=>p.key==="Enter"&&f(),placeholder:"Paste token from config...",style:{width:"100%"}})]}),j&&s.jsx("div",{className:"alert error",style:{marginBottom:"1rem"},children:j}),s.jsx("button",{onClick:f,style:{width:"100%"},children:"Sign In"})]})})}Np.createRoot(document.getElementById("root")).render(s.jsx(w.StrictMode,{children:s.jsx(fg,{})}));export{he as R,mm as S,Xh as a,wm as b,vp as g,s as j,Zm as l,w as r,mg as u};
|