repoburg 1.3.188 → 1.3.196
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/agent-pane/.prettierignore +5 -0
- package/agent-pane/.prettierrc +8 -0
- package/agent-pane/backend/coverage/base.css +224 -0
- package/agent-pane/backend/coverage/block-navigation.js +87 -0
- package/agent-pane/backend/coverage/clover.xml +887 -0
- package/agent-pane/backend/coverage/coverage-final.json +10 -0
- package/agent-pane/backend/coverage/favicon.png +0 -0
- package/agent-pane/backend/coverage/index.html +176 -0
- package/agent-pane/backend/coverage/prettify.css +1 -0
- package/agent-pane/backend/coverage/prettify.js +2 -0
- package/agent-pane/backend/coverage/sort-arrow-sprite.png +0 -0
- package/agent-pane/backend/coverage/sorter.js +210 -0
- package/agent-pane/backend/coverage/src/codex/codex-provider.ts.html +1402 -0
- package/agent-pane/backend/coverage/src/codex/index.html +131 -0
- package/agent-pane/backend/coverage/src/codex/item-mapper.ts.html +331 -0
- package/agent-pane/backend/coverage/src/db/index.html +131 -0
- package/agent-pane/backend/coverage/src/db/index.ts.html +436 -0
- package/agent-pane/backend/coverage/src/db/schema.ts.html +175 -0
- package/agent-pane/backend/coverage/src/index.html +116 -0
- package/agent-pane/backend/coverage/src/index.ts.html +262 -0
- package/agent-pane/backend/coverage/src/routes/index.html +146 -0
- package/agent-pane/backend/coverage/src/routes/sessions.ts.html +991 -0
- package/agent-pane/backend/coverage/src/routes/turns.ts.html +256 -0
- package/agent-pane/backend/coverage/src/routes/workspaces.ts.html +406 -0
- package/agent-pane/backend/coverage/src/ws/index.html +116 -0
- package/agent-pane/backend/coverage/src/ws/index.ts.html +238 -0
- package/agent-pane/backend/data.db +0 -0
- package/agent-pane/backend/data.db-shm +0 -0
- package/agent-pane/backend/data.db-wal +0 -0
- package/agent-pane/backend/dist/index.js +70869 -0
- package/agent-pane/backend/package-lock.json +4529 -1013
- package/agent-pane/backend/package.json +10 -6
- package/agent-pane/backend/src/claude/claude-message-mapper.test.ts +163 -0
- package/agent-pane/backend/src/claude/claude-message-mapper.ts +154 -0
- package/agent-pane/backend/src/claude/claude-provider.test.ts +65 -0
- package/agent-pane/backend/src/claude/claude-provider.ts +482 -0
- package/agent-pane/backend/src/claude/claude-types.ts +33 -0
- package/agent-pane/backend/src/codex/app-server-client.test.ts +183 -0
- package/agent-pane/backend/src/codex/app-server-client.ts +225 -0
- package/agent-pane/backend/src/codex/app-server-types.ts +259 -0
- package/agent-pane/backend/src/codex/codex-provider-runtime-config.test.ts +56 -0
- package/agent-pane/backend/src/codex/codex-provider.test.ts +60 -0
- package/agent-pane/backend/src/codex/codex-provider.ts +521 -265
- package/agent-pane/backend/src/codex/item-mapper.test.ts +221 -0
- package/agent-pane/backend/src/codex/item-mapper.ts +35 -8
- package/agent-pane/backend/src/codex/shared-app-server.ts +25 -0
- package/agent-pane/backend/src/db/index.test.ts +125 -0
- package/agent-pane/backend/src/db/index.ts +39 -8
- package/agent-pane/backend/src/db/schema.ts +28 -74
- package/agent-pane/backend/src/index.ts +29 -2
- package/agent-pane/backend/src/integration/__fixtures__/cancel-turn.json +29 -0
- package/agent-pane/backend/src/integration/__fixtures__/delta-streaming.json +40 -0
- package/agent-pane/backend/src/integration/__fixtures__/failed-turn.json +16 -0
- package/agent-pane/backend/src/integration/__fixtures__/mcp-tool-call.json +60 -0
- package/agent-pane/backend/src/integration/__fixtures__/missing-item-started.json +34 -0
- package/agent-pane/backend/src/integration/__fixtures__/multi-item-turn.json +85 -0
- package/agent-pane/backend/src/integration/__fixtures__/multi-turn.json +48 -0
- package/agent-pane/backend/src/integration/__fixtures__/simple-turn.json +35 -0
- package/agent-pane/backend/src/integration/delta-streaming.test.ts +130 -0
- package/agent-pane/backend/src/integration/helpers/app-server-mock.ts +272 -0
- package/agent-pane/backend/src/integration/helpers/test-app.ts +108 -0
- package/agent-pane/backend/src/integration/helpers/ws-capture.ts +64 -0
- package/agent-pane/backend/src/integration/item-lifecycle.test.ts +133 -0
- package/agent-pane/backend/src/integration/mcp-tool-call.test.ts +102 -0
- package/agent-pane/backend/src/integration/missing-item-started.test.ts +91 -0
- package/agent-pane/backend/src/integration/multi-turn.test.ts +121 -0
- package/agent-pane/backend/src/integration/session-operations.test.ts +168 -0
- package/agent-pane/backend/src/integration/title-generation.test.ts +109 -0
- package/agent-pane/backend/src/integration/turn-cancel.test.ts +111 -0
- package/agent-pane/backend/src/integration/turn-failure.test.ts +97 -0
- package/agent-pane/backend/src/integration/turn-lifecycle.test.ts +141 -0
- package/agent-pane/backend/src/providers/index.ts +14 -0
- package/agent-pane/backend/src/providers/registry.test.ts +92 -0
- package/agent-pane/backend/src/providers/registry.ts +43 -0
- package/agent-pane/backend/src/providers/runtime-provider.ts +25 -0
- package/agent-pane/backend/src/routes/files.ts +31 -0
- package/agent-pane/backend/src/routes/mcp.ts +33 -0
- package/agent-pane/backend/src/routes/models.test.ts +92 -0
- package/agent-pane/backend/src/routes/models.ts +16 -0
- package/agent-pane/backend/src/routes/plugins.ts +40 -0
- package/agent-pane/backend/src/routes/providers.test.ts +69 -0
- package/agent-pane/backend/src/routes/providers.ts +57 -0
- package/agent-pane/backend/src/routes/sessions.test.ts +424 -0
- package/agent-pane/backend/src/routes/sessions.ts +295 -42
- package/agent-pane/backend/src/routes/skills.test.ts +114 -0
- package/agent-pane/backend/src/routes/skills.ts +70 -0
- package/agent-pane/backend/src/routes/turns.test.ts +152 -0
- package/agent-pane/backend/src/routes/turns.ts +36 -16
- package/agent-pane/backend/src/routes/workspaces.test.ts +197 -0
- package/agent-pane/backend/src/routes/workspaces.ts +73 -55
- package/agent-pane/backend/src/ws/index.test.ts +107 -0
- package/agent-pane/backend/src/ws/index.ts +19 -11
- package/agent-pane/backend/tsconfig.json +4 -2
- package/agent-pane/backend/vitest.config.ts +20 -0
- package/agent-pane/eslint.config.js +33 -0
- package/agent-pane/frontend/coverage/base.css +224 -0
- package/agent-pane/frontend/coverage/block-navigation.js +87 -0
- package/agent-pane/frontend/coverage/clover.xml +2962 -0
- package/agent-pane/frontend/coverage/coverage-final.json +37 -0
- package/agent-pane/frontend/coverage/favicon.png +0 -0
- package/agent-pane/frontend/coverage/index.html +251 -0
- package/agent-pane/frontend/coverage/prettify.css +1 -0
- package/agent-pane/frontend/coverage/prettify.js +2 -0
- package/agent-pane/frontend/coverage/sort-arrow-sprite.png +0 -0
- package/agent-pane/frontend/coverage/sorter.js +210 -0
- package/agent-pane/frontend/coverage/src/App.tsx.html +217 -0
- package/agent-pane/frontend/coverage/src/AppInitializer.tsx.html +223 -0
- package/agent-pane/frontend/coverage/src/api/client.ts.html +187 -0
- package/agent-pane/frontend/coverage/src/api/index.html +161 -0
- package/agent-pane/frontend/coverage/src/api/sessions.ts.html +316 -0
- package/agent-pane/frontend/coverage/src/api/websocket.ts.html +544 -0
- package/agent-pane/frontend/coverage/src/api/workspaces.ts.html +199 -0
- package/agent-pane/frontend/coverage/src/components/CollapsibleToolCalls.tsx.html +226 -0
- package/agent-pane/frontend/coverage/src/components/CommandInputBar.tsx.html +382 -0
- package/agent-pane/frontend/coverage/src/components/CommandPalette.tsx.html +715 -0
- package/agent-pane/frontend/coverage/src/components/IdeWorkspace.tsx.html +160 -0
- package/agent-pane/frontend/coverage/src/components/ModelSelector.tsx.html +478 -0
- package/agent-pane/frontend/coverage/src/components/NewSessionDialog.tsx.html +472 -0
- package/agent-pane/frontend/coverage/src/components/RenderArea.tsx.html +574 -0
- package/agent-pane/frontend/coverage/src/components/RightPanel.tsx.html +205 -0
- package/agent-pane/frontend/coverage/src/components/RuntimeIcon.tsx.html +133 -0
- package/agent-pane/frontend/coverage/src/components/SessionTabs.tsx.html +217 -0
- package/agent-pane/frontend/coverage/src/components/StatusBar.tsx.html +271 -0
- package/agent-pane/frontend/coverage/src/components/StatusDot.tsx.html +109 -0
- package/agent-pane/frontend/coverage/src/components/Toast.tsx.html +313 -0
- package/agent-pane/frontend/coverage/src/components/TurnContent.tsx.html +1216 -0
- package/agent-pane/frontend/coverage/src/components/WorkspaceSidebar.tsx.html +1138 -0
- package/agent-pane/frontend/coverage/src/components/index.html +326 -0
- package/agent-pane/frontend/coverage/src/components/panels/ChangesPanel.tsx.html +247 -0
- package/agent-pane/frontend/coverage/src/components/panels/LogsPanel.tsx.html +160 -0
- package/agent-pane/frontend/coverage/src/components/panels/MetricsPanel.tsx.html +427 -0
- package/agent-pane/frontend/coverage/src/components/panels/TurnsPanel.tsx.html +397 -0
- package/agent-pane/frontend/coverage/src/components/panels/index.html +161 -0
- package/agent-pane/frontend/coverage/src/constants/index.html +116 -0
- package/agent-pane/frontend/coverage/src/constants/models.ts.html +406 -0
- package/agent-pane/frontend/coverage/src/hooks/index.html +146 -0
- package/agent-pane/frontend/coverage/src/hooks/useEscapeKey.ts.html +124 -0
- package/agent-pane/frontend/coverage/src/hooks/useOutsideClick.ts.html +142 -0
- package/agent-pane/frontend/coverage/src/hooks/useSessionStatus.ts.html +187 -0
- package/agent-pane/frontend/coverage/src/index.html +146 -0
- package/agent-pane/frontend/coverage/src/main.tsx.html +115 -0
- package/agent-pane/frontend/coverage/src/store/index.html +116 -0
- package/agent-pane/frontend/coverage/src/store/store.ts.html +2404 -0
- package/agent-pane/frontend/coverage/src/test/component-helpers.ts.html +190 -0
- package/agent-pane/frontend/coverage/src/test/fixtures.ts.html +367 -0
- package/agent-pane/frontend/coverage/src/test/index.html +131 -0
- package/agent-pane/frontend/coverage/src/types/index.html +116 -0
- package/agent-pane/frontend/coverage/src/types/index.ts.html +466 -0
- package/agent-pane/frontend/coverage/src/utils/changes.ts.html +202 -0
- package/agent-pane/frontend/coverage/src/utils/duration.ts.html +127 -0
- package/agent-pane/frontend/coverage/src/utils/index.html +131 -0
- package/agent-pane/frontend/dist/assets/index-Bg0PF2aV.css +1 -0
- package/agent-pane/frontend/dist/assets/index-BlybeX5e.js +281 -0
- package/agent-pane/frontend/dist/index.html +19 -0
- package/agent-pane/frontend/package-lock.json +2434 -213
- package/agent-pane/frontend/package.json +10 -3
- package/agent-pane/frontend/src/App.test.tsx +74 -0
- package/agent-pane/frontend/src/App.tsx +1 -1
- package/agent-pane/frontend/src/AppInitializer.test.tsx +142 -0
- package/agent-pane/frontend/src/AppInitializer.tsx +1 -1
- package/agent-pane/frontend/src/api/client.test.ts +126 -0
- package/agent-pane/frontend/src/api/client.ts +22 -29
- package/agent-pane/frontend/src/api/models.ts +7 -0
- package/agent-pane/frontend/src/api/providers.ts +12 -0
- package/agent-pane/frontend/src/api/sessions.test.ts +241 -0
- package/agent-pane/frontend/src/api/sessions.ts +43 -1
- package/agent-pane/frontend/src/api/skills.ts +12 -0
- package/agent-pane/frontend/src/api/websocket.test.ts +288 -0
- package/agent-pane/frontend/src/api/websocket.ts +27 -2
- package/agent-pane/frontend/src/api/workspaces.test.ts +112 -0
- package/agent-pane/frontend/src/api/workspaces.ts +17 -3
- package/agent-pane/frontend/src/components/CollapsibleToolCalls.test.tsx +49 -0
- package/agent-pane/frontend/src/components/CollapsibleToolCalls.tsx +2 -5
- package/agent-pane/frontend/src/components/CommandInputBar.test.tsx +133 -0
- package/agent-pane/frontend/src/components/CommandInputBar.tsx +296 -17
- package/agent-pane/frontend/src/components/CommandPalette.test.tsx +230 -0
- package/agent-pane/frontend/src/components/CommandPalette.tsx +26 -23
- package/agent-pane/frontend/src/components/IdeWorkspace.tsx +1 -1
- package/agent-pane/frontend/src/components/ModelSelector.test.tsx +129 -0
- package/agent-pane/frontend/src/components/ModelSelector.tsx +191 -0
- package/agent-pane/frontend/src/components/NewSessionDialog.test.tsx +95 -0
- package/agent-pane/frontend/src/components/NewSessionDialog.tsx +58 -13
- package/agent-pane/frontend/src/components/RenderArea.test.tsx +160 -0
- package/agent-pane/frontend/src/components/RenderArea.tsx +18 -25
- package/agent-pane/frontend/src/components/RightPanel.test.tsx +43 -0
- package/agent-pane/frontend/src/components/RightPanel.tsx +1 -1
- package/agent-pane/frontend/src/components/RuntimeIcon.test.tsx +32 -0
- package/agent-pane/frontend/src/components/RuntimeIcon.tsx +1 -1
- package/agent-pane/frontend/src/components/SessionTabs.test.tsx +72 -0
- package/agent-pane/frontend/src/components/SessionTabs.tsx +12 -12
- package/agent-pane/frontend/src/components/StatusBar.test.tsx +56 -0
- package/agent-pane/frontend/src/components/StatusBar.tsx +25 -31
- package/agent-pane/frontend/src/components/StatusDot.test.tsx +25 -0
- package/agent-pane/frontend/src/components/StatusDot.tsx +2 -7
- package/agent-pane/frontend/src/components/Toast.test.tsx +79 -0
- package/agent-pane/frontend/src/components/Toast.tsx +2 -6
- package/agent-pane/frontend/src/components/TurnContent.test.tsx +287 -0
- package/agent-pane/frontend/src/components/TurnContent.tsx +107 -24
- package/agent-pane/frontend/src/components/WorkspaceSidebar.test.tsx +297 -0
- package/agent-pane/frontend/src/components/WorkspaceSidebar.tsx +33 -32
- package/agent-pane/frontend/src/components/input/OptionSubPopup.tsx +32 -0
- package/agent-pane/frontend/src/components/input/SkillMentionPopup.test.tsx +63 -0
- package/agent-pane/frontend/src/components/input/SkillMentionPopup.tsx +78 -0
- package/agent-pane/frontend/src/components/input/SlashPopup.test.tsx +96 -0
- package/agent-pane/frontend/src/components/input/SlashPopup.tsx +63 -0
- package/agent-pane/frontend/src/components/panels/ChangesPanel.test.tsx +61 -0
- package/agent-pane/frontend/src/components/panels/ChangesPanel.tsx +12 -39
- package/agent-pane/frontend/src/components/panels/LogsPanel.test.tsx +58 -0
- package/agent-pane/frontend/src/components/panels/LogsPanel.tsx +1 -1
- package/agent-pane/frontend/src/components/panels/MetricsPanel.test.tsx +71 -0
- package/agent-pane/frontend/src/components/panels/MetricsPanel.tsx +63 -31
- package/agent-pane/frontend/src/components/panels/TurnsPanel.test.tsx +83 -0
- package/agent-pane/frontend/src/components/panels/TurnsPanel.tsx +66 -7
- package/agent-pane/frontend/src/constants/models.test.ts +97 -0
- package/agent-pane/frontend/src/constants/models.ts +129 -0
- package/agent-pane/frontend/src/hooks/useEscapeKey.test.ts +42 -0
- package/agent-pane/frontend/src/hooks/useEscapeKey.ts +13 -0
- package/agent-pane/frontend/src/hooks/useOutsideClick.test.ts +92 -0
- package/agent-pane/frontend/src/hooks/useOutsideClick.ts +19 -0
- package/agent-pane/frontend/src/hooks/useProvider.ts +44 -0
- package/agent-pane/frontend/src/hooks/useSessionStatus.test.ts +114 -0
- package/agent-pane/frontend/src/hooks/useSessionStatus.ts +34 -0
- package/agent-pane/frontend/src/main.test.tsx +37 -0
- package/agent-pane/frontend/src/main.tsx +1 -1
- package/agent-pane/frontend/src/store/sessionSlice.ts +417 -0
- package/agent-pane/frontend/src/store/store.test.ts +1284 -0
- package/agent-pane/frontend/src/store/store.ts +16 -617
- package/agent-pane/frontend/src/store/uiSlice.ts +83 -0
- package/agent-pane/frontend/src/store/workspaceSlice.ts +77 -0
- package/agent-pane/frontend/src/store/wsSlice.ts +292 -0
- package/agent-pane/frontend/src/styles/app.css +113 -7
- package/agent-pane/frontend/src/test/component-helpers.ts +36 -0
- package/agent-pane/frontend/src/test/fixtures.ts +96 -0
- package/agent-pane/frontend/src/test-setup.ts +5 -0
- package/agent-pane/frontend/src/types/index.test.ts +128 -0
- package/agent-pane/frontend/src/types/index.ts +80 -104
- package/agent-pane/frontend/src/utils/changes.test.ts +81 -0
- package/agent-pane/frontend/src/utils/changes.ts +39 -0
- package/agent-pane/frontend/src/utils/duration.test.ts +71 -0
- package/agent-pane/frontend/src/utils/duration.ts +14 -0
- package/agent-pane/frontend/tsconfig.json +4 -1
- package/agent-pane/frontend/vite.config.ts +6 -0
- package/agent-pane/frontend/vitest.config.ts +29 -0
- package/agent-pane/package-lock.json +1527 -0
- package/agent-pane/package.json +19 -0
- package/agent-pane/shared/provider-types.ts +53 -0
- package/agent-pane/shared/types.ts +107 -0
- package/agentpane-branch-session.png +0 -0
- package/agentpane-expanded-all.png +0 -0
- package/agentpane-fixed-rendering.png +0 -0
- package/agentpane-focus-check.png +0 -0
- package/agentpane-initial.png +0 -0
- package/agentpane-mcp-detail.png +0 -0
- package/agentpane-no-focus-ring.png +0 -0
- package/agentpane-soft-focus.png +0 -0
- package/backend/dist/src/llm-provider/ollama-llm.provider.js +1 -0
- package/backend/dist/src/llm-provider/ollama-llm.provider.js.map +1 -1
- package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
- package/data.db +0 -0
- package/empty-state.png +0 -0
- package/frontend-home.png +0 -0
- package/model-selector-open.png +0 -0
- package/package.json +1 -1
- package/slash-popup-working.png +0 -0
- package/agent-pane/frontend/src/components/DiffViewer.tsx +0 -27
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
var dh=Object.defineProperty;var fh=(l,s,i)=>s in l?dh(l,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):l[s]=i;var Oe=(l,s,i)=>fh(l,typeof s!="symbol"?s+"":s,i);(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))u(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&u(h)}).observe(document,{childList:!0,subtree:!0});function i(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function u(c){if(c.ep)return;c.ep=!0;const f=i(c);fetch(c.href,f)}})();function uf(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Sa={exports:{}},al={},Ta={exports:{}},me={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var _d;function ph(){if(_d)return me;_d=1;var l=Symbol.for("react.element"),s=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),h=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),C=Symbol.iterator;function _(T){return T===null||typeof T!="object"?null:(T=C&&T[C]||T["@@iterator"],typeof T=="function"?T:null)}var I={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,H={};function Y(T,L,z){this.props=T,this.context=L,this.refs=H,this.updater=z||I}Y.prototype.isReactComponent={},Y.prototype.setState=function(T,L){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,L,"setState")},Y.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function pe(){}pe.prototype=Y.prototype;function de(T,L,z){this.props=T,this.context=L,this.refs=H,this.updater=z||I}var ae=de.prototype=new pe;ae.constructor=de,O(ae,Y.prototype),ae.isPureReactComponent=!0;var W=Array.isArray,xe=Object.prototype.hasOwnProperty,he={current:null},ue={key:!0,ref:!0,__self:!0,__source:!0};function Ce(T,L,z){var Q,ge={},ve=null,De=null;if(L!=null)for(Q in L.ref!==void 0&&(De=L.ref),L.key!==void 0&&(ve=""+L.key),L)xe.call(L,Q)&&!ue.hasOwnProperty(Q)&&(ge[Q]=L[Q]);var je=arguments.length-2;if(je===1)ge.children=z;else if(1<je){for(var Me=Array(je),xt=0;xt<je;xt++)Me[xt]=arguments[xt+2];ge.children=Me}if(T&&T.defaultProps)for(Q in je=T.defaultProps,je)ge[Q]===void 0&&(ge[Q]=je[Q]);return{$$typeof:l,type:T,key:ve,ref:De,props:ge,_owner:he.current}}function Xe(T,L){return{$$typeof:l,type:T.type,key:L,ref:T.ref,props:T.props,_owner:T._owner}}function Ye(T){return typeof T=="object"&&T!==null&&T.$$typeof===l}function Be(T){var L={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(z){return L[z]})}var Ze=/\/+/g;function Ae(T,L){return typeof T=="object"&&T!==null&&T.key!=null?Be(""+T.key):L.toString(36)}function ie(T,L,z,Q,ge){var ve=typeof T;(ve==="undefined"||ve==="boolean")&&(T=null);var De=!1;if(T===null)De=!0;else switch(ve){case"string":case"number":De=!0;break;case"object":switch(T.$$typeof){case l:case s:De=!0}}if(De)return De=T,ge=ge(De),T=Q===""?"."+Ae(De,0):Q,W(ge)?(z="",T!=null&&(z=T.replace(Ze,"$&/")+"/"),ie(ge,L,z,"",function(xt){return xt})):ge!=null&&(Ye(ge)&&(ge=Xe(ge,z+(!ge.key||De&&De.key===ge.key?"":(""+ge.key).replace(Ze,"$&/")+"/")+T)),L.push(ge)),1;if(De=0,Q=Q===""?".":Q+":",W(T))for(var je=0;je<T.length;je++){ve=T[je];var Me=Q+Ae(ve,je);De+=ie(ve,L,z,Me,ge)}else if(Me=_(T),typeof Me=="function")for(T=Me.call(T),je=0;!(ve=T.next()).done;)ve=ve.value,Me=Q+Ae(ve,je++),De+=ie(ve,L,z,Me,ge);else if(ve==="object")throw L=String(T),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.");return De}function F(T,L,z){if(T==null)return T;var Q=[],ge=0;return ie(T,Q,"","",function(ve){return L.call(z,ve,ge++)}),Q}function re(T){if(T._status===-1){var L=T._result;L=L(),L.then(function(z){(T._status===0||T._status===-1)&&(T._status=1,T._result=z)},function(z){(T._status===0||T._status===-1)&&(T._status=2,T._result=z)}),T._status===-1&&(T._status=0,T._result=L)}if(T._status===1)return T._result.default;throw T._result}var fe={current:null},U={transition:null},ee={ReactCurrentDispatcher:fe,ReactCurrentBatchConfig:U,ReactCurrentOwner:he};function B(){throw Error("act(...) is not supported in production builds of React.")}return me.Children={map:F,forEach:function(T,L,z){F(T,function(){L.apply(this,arguments)},z)},count:function(T){var L=0;return F(T,function(){L++}),L},toArray:function(T){return F(T,function(L){return L})||[]},only:function(T){if(!Ye(T))throw Error("React.Children.only expected to receive a single React element child.");return T}},me.Component=Y,me.Fragment=i,me.Profiler=c,me.PureComponent=de,me.StrictMode=u,me.Suspense=k,me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ee,me.act=B,me.cloneElement=function(T,L,z){if(T==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+T+".");var Q=O({},T.props),ge=T.key,ve=T.ref,De=T._owner;if(L!=null){if(L.ref!==void 0&&(ve=L.ref,De=he.current),L.key!==void 0&&(ge=""+L.key),T.type&&T.type.defaultProps)var je=T.type.defaultProps;for(Me in L)xe.call(L,Me)&&!ue.hasOwnProperty(Me)&&(Q[Me]=L[Me]===void 0&&je!==void 0?je[Me]:L[Me])}var Me=arguments.length-2;if(Me===1)Q.children=z;else if(1<Me){je=Array(Me);for(var xt=0;xt<Me;xt++)je[xt]=arguments[xt+2];Q.children=je}return{$$typeof:l,type:T.type,key:ge,ref:ve,props:Q,_owner:De}},me.createContext=function(T){return T={$$typeof:h,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},T.Provider={$$typeof:f,_context:T},T.Consumer=T},me.createElement=Ce,me.createFactory=function(T){var L=Ce.bind(null,T);return L.type=T,L},me.createRef=function(){return{current:null}},me.forwardRef=function(T){return{$$typeof:v,render:T}},me.isValidElement=Ye,me.lazy=function(T){return{$$typeof:x,_payload:{_status:-1,_result:T},_init:re}},me.memo=function(T,L){return{$$typeof:g,type:T,compare:L===void 0?null:L}},me.startTransition=function(T){var L=U.transition;U.transition={};try{T()}finally{U.transition=L}},me.unstable_act=B,me.useCallback=function(T,L){return fe.current.useCallback(T,L)},me.useContext=function(T){return fe.current.useContext(T)},me.useDebugValue=function(){},me.useDeferredValue=function(T){return fe.current.useDeferredValue(T)},me.useEffect=function(T,L){return fe.current.useEffect(T,L)},me.useId=function(){return fe.current.useId()},me.useImperativeHandle=function(T,L,z){return fe.current.useImperativeHandle(T,L,z)},me.useInsertionEffect=function(T,L){return fe.current.useInsertionEffect(T,L)},me.useLayoutEffect=function(T,L){return fe.current.useLayoutEffect(T,L)},me.useMemo=function(T,L){return fe.current.useMemo(T,L)},me.useReducer=function(T,L,z){return fe.current.useReducer(T,L,z)},me.useRef=function(T){return fe.current.useRef(T)},me.useState=function(T){return fe.current.useState(T)},me.useSyncExternalStore=function(T,L,z){return fe.current.useSyncExternalStore(T,L,z)},me.useTransition=function(){return fe.current.useTransition()},me.version="18.3.1",me}var Nd;function Ka(){return Nd||(Nd=1,Ta.exports=ph()),Ta.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Ed;function hh(){if(Ed)return al;Ed=1;var l=Ka(),s=Symbol.for("react.element"),i=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,c=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function h(v,k,g){var x,C={},_=null,I=null;g!==void 0&&(_=""+g),k.key!==void 0&&(_=""+k.key),k.ref!==void 0&&(I=k.ref);for(x in k)u.call(k,x)&&!f.hasOwnProperty(x)&&(C[x]=k[x]);if(v&&v.defaultProps)for(x in k=v.defaultProps,k)C[x]===void 0&&(C[x]=k[x]);return{$$typeof:s,type:v,key:_,ref:I,props:C,_owner:c.current}}return al.Fragment=i,al.jsx=h,al.jsxs=h,al}var Cd;function mh(){return Cd||(Cd=1,Sa.exports=hh()),Sa.exports}var d=mh(),G=Ka();const pl=uf(G);var ji={},_a={exports:{}},At={},Na={exports:{}},Ea={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var jd;function gh(){return jd||(jd=1,(function(l){function s(U,ee){var B=U.length;U.push(ee);e:for(;0<B;){var T=B-1>>>1,L=U[T];if(0<c(L,ee))U[T]=ee,U[B]=L,B=T;else break e}}function i(U){return U.length===0?null:U[0]}function u(U){if(U.length===0)return null;var ee=U[0],B=U.pop();if(B!==ee){U[0]=B;e:for(var T=0,L=U.length,z=L>>>1;T<z;){var Q=2*(T+1)-1,ge=U[Q],ve=Q+1,De=U[ve];if(0>c(ge,B))ve<L&&0>c(De,ge)?(U[T]=De,U[ve]=B,T=ve):(U[T]=ge,U[Q]=B,T=Q);else if(ve<L&&0>c(De,B))U[T]=De,U[ve]=B,T=ve;else break e}}return ee}function c(U,ee){var B=U.sortIndex-ee.sortIndex;return B!==0?B:U.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;l.unstable_now=function(){return f.now()}}else{var h=Date,v=h.now();l.unstable_now=function(){return h.now()-v}}var k=[],g=[],x=1,C=null,_=3,I=!1,O=!1,H=!1,Y=typeof setTimeout=="function"?setTimeout:null,pe=typeof clearTimeout=="function"?clearTimeout:null,de=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function ae(U){for(var ee=i(g);ee!==null;){if(ee.callback===null)u(g);else if(ee.startTime<=U)u(g),ee.sortIndex=ee.expirationTime,s(k,ee);else break;ee=i(g)}}function W(U){if(H=!1,ae(U),!O)if(i(k)!==null)O=!0,re(xe);else{var ee=i(g);ee!==null&&fe(W,ee.startTime-U)}}function xe(U,ee){O=!1,H&&(H=!1,pe(Ce),Ce=-1),I=!0;var B=_;try{for(ae(ee),C=i(k);C!==null&&(!(C.expirationTime>ee)||U&&!Be());){var T=C.callback;if(typeof T=="function"){C.callback=null,_=C.priorityLevel;var L=T(C.expirationTime<=ee);ee=l.unstable_now(),typeof L=="function"?C.callback=L:C===i(k)&&u(k),ae(ee)}else u(k);C=i(k)}if(C!==null)var z=!0;else{var Q=i(g);Q!==null&&fe(W,Q.startTime-ee),z=!1}return z}finally{C=null,_=B,I=!1}}var he=!1,ue=null,Ce=-1,Xe=5,Ye=-1;function Be(){return!(l.unstable_now()-Ye<Xe)}function Ze(){if(ue!==null){var U=l.unstable_now();Ye=U;var ee=!0;try{ee=ue(!0,U)}finally{ee?Ae():(he=!1,ue=null)}}else he=!1}var Ae;if(typeof de=="function")Ae=function(){de(Ze)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,F=ie.port2;ie.port1.onmessage=Ze,Ae=function(){F.postMessage(null)}}else Ae=function(){Y(Ze,0)};function re(U){ue=U,he||(he=!0,Ae())}function fe(U,ee){Ce=Y(function(){U(l.unstable_now())},ee)}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(U){U.callback=null},l.unstable_continueExecution=function(){O||I||(O=!0,re(xe))},l.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Xe=0<U?Math.floor(1e3/U):5},l.unstable_getCurrentPriorityLevel=function(){return _},l.unstable_getFirstCallbackNode=function(){return i(k)},l.unstable_next=function(U){switch(_){case 1:case 2:case 3:var ee=3;break;default:ee=_}var B=_;_=ee;try{return U()}finally{_=B}},l.unstable_pauseExecution=function(){},l.unstable_requestPaint=function(){},l.unstable_runWithPriority=function(U,ee){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var B=_;_=U;try{return ee()}finally{_=B}},l.unstable_scheduleCallback=function(U,ee,B){var T=l.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?T+B:T):B=T,U){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=B+L,U={id:x++,callback:ee,priorityLevel:U,startTime:B,expirationTime:L,sortIndex:-1},B>T?(U.sortIndex=B,s(g,U),i(k)===null&&U===i(g)&&(H?(pe(Ce),Ce=-1):H=!0,fe(W,B-T))):(U.sortIndex=L,s(k,U),O||I||(O=!0,re(xe))),U},l.unstable_shouldYield=Be,l.unstable_wrapCallback=function(U){var ee=_;return function(){var B=_;_=ee;try{return U.apply(this,arguments)}finally{_=B}}}})(Ea)),Ea}var Rd;function vh(){return Rd||(Rd=1,Na.exports=gh()),Na.exports}/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Ld;function yh(){if(Ld)return At;Ld=1;var l=Ka(),s=vh();function i(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 u=new Set,c={};function f(e,t){h(e,t),h(e+"Capture",t)}function h(e,t){for(c[e]=t,e=0;e<t.length;e++)u.add(t[e])}var v=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),k=Object.prototype.hasOwnProperty,g=/^[: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]*$/,x={},C={};function _(e){return k.call(C,e)?!0:k.call(x,e)?!1:g.test(e)?C[e]=!0:(x[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 O(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 H(e,t,n,r,o,a,p){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=a,this.removeEmptyString=p}var Y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Y[e]=new H(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Y[t]=new H(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Y[e]=new H(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Y[e]=new H(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){Y[e]=new H(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){Y[e]=new H(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){Y[e]=new H(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){Y[e]=new H(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){Y[e]=new H(e,5,!1,e.toLowerCase(),null,!1,!1)});var pe=/[\-:]([a-z])/g;function de(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(pe,de);Y[t]=new H(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(pe,de);Y[t]=new H(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(pe,de);Y[t]=new H(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){Y[e]=new H(e,1,!1,e.toLowerCase(),null,!1,!1)}),Y.xlinkHref=new H("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){Y[e]=new H(e,1,!1,e.toLowerCase(),null,!0,!0)});function ae(e,t,n,r){var o=Y.hasOwnProperty(t)?Y[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(O(t,n,o,r)&&(n=null),r||o===null?_(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 W=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,xe=Symbol.for("react.element"),he=Symbol.for("react.portal"),ue=Symbol.for("react.fragment"),Ce=Symbol.for("react.strict_mode"),Xe=Symbol.for("react.profiler"),Ye=Symbol.for("react.provider"),Be=Symbol.for("react.context"),Ze=Symbol.for("react.forward_ref"),Ae=Symbol.for("react.suspense"),ie=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),re=Symbol.for("react.lazy"),fe=Symbol.for("react.offscreen"),U=Symbol.iterator;function ee(e){return e===null||typeof e!="object"?null:(e=U&&e[U]||e["@@iterator"],typeof e=="function"?e:null)}var B=Object.assign,T;function L(e){if(T===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);T=t&&t[1]||""}return`
|
|
34
|
+
`+T+e}var z=!1;function Q(e,t){if(!e||z)return"";z=!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(`
|
|
35
|
+
`),a=r.stack.split(`
|
|
36
|
+
`),p=o.length-1,y=a.length-1;1<=p&&0<=y&&o[p]!==a[y];)y--;for(;1<=p&&0<=y;p--,y--)if(o[p]!==a[y]){if(p!==1||y!==1)do if(p--,y--,0>y||o[p]!==a[y]){var w=`
|
|
37
|
+
`+o[p].replace(" at new "," at ");return e.displayName&&w.includes("<anonymous>")&&(w=w.replace("<anonymous>",e.displayName)),w}while(1<=p&&0<=y);break}}}finally{z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?L(e):""}function ge(e){switch(e.tag){case 5:return L(e.type);case 16:return L("Lazy");case 13:return L("Suspense");case 19:return L("SuspenseList");case 0:case 2:case 15:return e=Q(e.type,!1),e;case 11:return e=Q(e.type.render,!1),e;case 1:return e=Q(e.type,!0),e;default:return""}}function ve(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 ue:return"Fragment";case he:return"Portal";case Xe:return"Profiler";case Ce:return"StrictMode";case Ae:return"Suspense";case ie:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Be:return(e.displayName||"Context")+".Consumer";case Ye:return(e._context.displayName||"Context")+".Provider";case Ze:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case F:return t=e.displayName||null,t!==null?t:ve(e.type)||"Memo";case re:t=e._payload,e=e._init;try{return ve(e(t))}catch{}}return null}function De(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 ve(t);case 8:return t===Ce?"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 je(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Me(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xt(e){var t=Me(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,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(p){r=""+p,a.call(this,p)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(p){r=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function lr(e){e._valueTracker||(e._valueTracker=xt(e))}function ze(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Me(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Pn(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 Pe(e,t){var n=t.checked;return B({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function br(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=je(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 $e(e,t){t=t.checked,t!=null&&ae(e,"checked",t,!1)}function mn(e,t){$e(e,t);var n=je(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")?$t(e,t.type,n):t.hasOwnProperty("defaultValue")&&$t(e,t.type,je(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ss(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 $t(e,t,n){(t!=="number"||Pn(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Mn=Array.isArray;function rn(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=""+je(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 $r(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(i(91));return B({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ts(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(i(92));if(Mn(n)){if(1<n.length)throw Error(i(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:je(n)}}function Kt(e,t){var n=je(t.value),r=je(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 Yt(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function sn(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 ir(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?sn(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var gn,or=(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(gn=gn||document.createElement("div"),gn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=gn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function vn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ft={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},Fr=["Webkit","ms","Moz","O"];Object.keys(Ft).forEach(function(e){Fr.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ft[t]=Ft[e]})});function ar(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ft.hasOwnProperty(e)&&Ft[e]?(""+t).trim():t+"px"}function _s(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=ar(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var kl=B({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 Ur(e,t){if(t){if(kl[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(i(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(i(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(t.style!=null&&typeof t.style!="object")throw Error(i(62))}}function ur(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 zn=null;function ln(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Nt=null,on=null,yn=null;function Ns(e){if(e=Qs(e)){if(typeof Nt!="function")throw Error(i(280));var t=e.stateNode;t&&(t=Hl(t),Nt(e.stateNode,e.type,t))}}function Br(e){on?yn?yn.push(e):yn=[e]:on=e}function Es(){if(on){var e=on,t=yn;if(yn=on=null,Ns(e),t)for(e=0;e<t.length;e++)Ns(t[e])}}function cr(e,t){return e(t)}function dr(){}var Et=!1;function xn(e,t,n){if(Et)return e(t,n);Et=!0;try{return cr(e,t,n)}finally{Et=!1,(on!==null||yn!==null)&&(dr(),Es())}}function kn(e,t){var n=e.stateNode;if(n===null)return null;var r=Hl(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(i(231,t,typeof n));return n}var fr=!1;if(v)try{var pr={};Object.defineProperty(pr,"passive",{get:function(){fr=!0}}),window.addEventListener("test",pr,pr),window.removeEventListener("test",pr,pr)}catch{fr=!1}function wl(e,t,n,r,o,a,p,y,w){var R=Array.prototype.slice.call(arguments,3);try{t.apply(n,R)}catch(P){this.onError(P)}}var wn=!1,hr=null,On=!1,Cs=null,mr={onError:function(e){wn=!0,hr=e}};function Hi(e,t,n,r,o,a,p,y,w){wn=!1,hr=null,wl.apply(mr,arguments)}function Wi(e,t,n,r,o,a,p,y,w){if(Hi.apply(this,arguments),wn){if(wn){var R=hr;wn=!1,hr=null}else throw Error(i(198));On||(On=!0,Cs=R)}}function Re(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 Sn(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 Sl(e){if(Re(e)!==e)throw Error(i(188))}function Tl(e){var t=e.alternate;if(!t){if(t=Re(e),t===null)throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var a=o.alternate;if(a===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===n)return Sl(o),e;if(a===r)return Sl(o),t;a=a.sibling}throw Error(i(188))}if(n.return!==r.return)n=o,r=a;else{for(var p=!1,y=o.child;y;){if(y===n){p=!0,n=o,r=a;break}if(y===r){p=!0,r=o,n=a;break}y=y.sibling}if(!p){for(y=a.child;y;){if(y===n){p=!0,n=a,r=o;break}if(y===r){p=!0,r=a,n=o;break}y=y.sibling}if(!p)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function Hr(e){return e=Tl(e),e!==null?js(e):null}function js(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=js(e);if(t!==null)return t;e=e.sibling}return null}var Rs=s.unstable_scheduleCallback,_l=s.unstable_cancelCallback,Vi=s.unstable_shouldYield,Gi=s.unstable_requestPaint,We=s.unstable_now,an=s.unstable_getCurrentPriorityLevel,bn=s.unstable_ImmediatePriority,un=s.unstable_UserBlockingPriority,Wr=s.unstable_NormalPriority,gr=s.unstable_LowPriority,Nl=s.unstable_IdlePriority,vr=null,Dt=null;function Vr(e){if(Dt&&typeof Dt.onCommitFiberRoot=="function")try{Dt.onCommitFiberRoot(vr,e,void 0,(e.current.flags&128)===128)}catch{}}var kt=Math.clz32?Math.clz32:yr,Gr=Math.log,$n=Math.LN2;function yr(e){return e>>>=0,e===0?32:31-(Gr(e)/$n|0)|0}var wt=64,Qr=4194304;function xr(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 kr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,a=e.pingedLanes,p=n&268435455;if(p!==0){var y=p&~o;y!==0?r=xr(y):(a&=p,a!==0&&(r=xr(a)))}else p=n&~o,p!==0?r=xr(p):a!==0&&(r=xr(a));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,a=t&-t,o>=a||o===16&&(a&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-kt(t),o=1<<n,r|=e[n],t&=~o;return r}function El(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 Cl(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var p=31-kt(a),y=1<<p,w=o[p];w===-1?((y&n)===0||(y&r)!==0)&&(o[p]=El(y,t)):w<=t&&(e.expiredLanes|=y),a&=~y}}function Ls(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Is(){var e=wt;return wt<<=1,(wt&4194240)===0&&(wt=64),e}function As(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function wr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-kt(t),e[t]=n}function jl(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-kt(n),a=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~a}}function Fn(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-kt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var we=0;function b(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var m,N,A,Z,ne,ce=!1,Se=[],_e=null,Ve=null,Ge=null,Tn=new Map,Je=new Map,Un=[],Df="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ou(e,t){switch(e){case"focusin":case"focusout":_e=null;break;case"dragenter":case"dragleave":Ve=null;break;case"mouseover":case"mouseout":Ge=null;break;case"pointerover":case"pointerout":Tn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Je.delete(t.pointerId)}}function Ds(e,t,n,r,o,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[o]},t!==null&&(t=Qs(t),t!==null&&N(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Pf(e,t,n,r,o){switch(t){case"focusin":return _e=Ds(_e,e,t,n,r,o),!0;case"dragenter":return Ve=Ds(Ve,e,t,n,r,o),!0;case"mouseover":return Ge=Ds(Ge,e,t,n,r,o),!0;case"pointerover":var a=o.pointerId;return Tn.set(a,Ds(Tn.get(a)||null,e,t,n,r,o)),!0;case"gotpointercapture":return a=o.pointerId,Je.set(a,Ds(Je.get(a)||null,e,t,n,r,o)),!0}return!1}function au(e){var t=Sr(e.target);if(t!==null){var n=Re(t);if(n!==null){if(t=n.tag,t===13){if(t=Sn(n),t!==null){e.blockedOn=t,ne(e.priority,function(){A(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 Rl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ki(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);zn=r,n.target.dispatchEvent(r),zn=null}else return t=Qs(n),t!==null&&N(t),e.blockedOn=n,!1;t.shift()}return!0}function uu(e,t,n){Rl(e)&&n.delete(t)}function Mf(){ce=!1,_e!==null&&Rl(_e)&&(_e=null),Ve!==null&&Rl(Ve)&&(Ve=null),Ge!==null&&Rl(Ge)&&(Ge=null),Tn.forEach(uu),Je.forEach(uu)}function Ps(e,t){e.blockedOn===t&&(e.blockedOn=null,ce||(ce=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Mf)))}function Ms(e){function t(o){return Ps(o,e)}if(0<Se.length){Ps(Se[0],e);for(var n=1;n<Se.length;n++){var r=Se[n];r.blockedOn===e&&(r.blockedOn=null)}}for(_e!==null&&Ps(_e,e),Ve!==null&&Ps(Ve,e),Ge!==null&&Ps(Ge,e),Tn.forEach(t),Je.forEach(t),n=0;n<Un.length;n++)r=Un[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Un.length&&(n=Un[0],n.blockedOn===null);)au(n),n.blockedOn===null&&Un.shift()}var Kr=W.ReactCurrentBatchConfig,Ll=!0;function zf(e,t,n,r){var o=we,a=Kr.transition;Kr.transition=null;try{we=1,Qi(e,t,n,r)}finally{we=o,Kr.transition=a}}function Of(e,t,n,r){var o=we,a=Kr.transition;Kr.transition=null;try{we=4,Qi(e,t,n,r)}finally{we=o,Kr.transition=a}}function Qi(e,t,n,r){if(Ll){var o=Ki(e,t,n,r);if(o===null)fo(e,t,r,Il,n),ou(e,r);else if(Pf(o,e,t,n,r))r.stopPropagation();else if(ou(e,r),t&4&&-1<Df.indexOf(e)){for(;o!==null;){var a=Qs(o);if(a!==null&&m(a),a=Ki(e,t,n,r),a===null&&fo(e,t,r,Il,n),a===o)break;o=a}o!==null&&r.stopPropagation()}else fo(e,t,r,null,n)}}var Il=null;function Ki(e,t,n,r){if(Il=null,e=ln(r),e=Sr(e),e!==null)if(t=Re(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Sn(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 Il=e,null}function cu(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(an()){case bn:return 1;case un:return 4;case Wr:case gr:return 16;case Nl:return 536870912;default:return 16}default:return 16}}var Bn=null,Yi=null,Al=null;function du(){if(Al)return Al;var e,t=Yi,n=t.length,r,o="value"in Bn?Bn.value:Bn.textContent,a=o.length;for(e=0;e<n&&t[e]===o[e];e++);var p=n-e;for(r=1;r<=p&&t[n-r]===o[a-r];r++);return Al=o.slice(e,1<r?1-r:void 0)}function Dl(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 Pl(){return!0}function fu(){return!1}function Pt(e){function t(n,r,o,a,p){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=a,this.target=p,this.currentTarget=null;for(var y in e)e.hasOwnProperty(y)&&(n=e[y],this[y]=n?n(a):a[y]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Pl:fu,this.isPropagationStopped=fu,this}return B(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=Pl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Pl)},persist:function(){},isPersistent:Pl}),t}var Yr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qi=Pt(Yr),zs=B({},Yr,{view:0,detail:0}),bf=Pt(zs),Xi,Zi,Os,Ml=B({},zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:eo,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!==Os&&(Os&&e.type==="mousemove"?(Xi=e.screenX-Os.screenX,Zi=e.screenY-Os.screenY):Zi=Xi=0,Os=e),Xi)},movementY:function(e){return"movementY"in e?e.movementY:Zi}}),pu=Pt(Ml),$f=B({},Ml,{dataTransfer:0}),Ff=Pt($f),Uf=B({},zs,{relatedTarget:0}),Ji=Pt(Uf),Bf=B({},Yr,{animationName:0,elapsedTime:0,pseudoElement:0}),Hf=Pt(Bf),Wf=B({},Yr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Vf=Pt(Wf),Gf=B({},Yr,{data:0}),hu=Pt(Gf),Qf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Kf={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"},Yf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yf[e])?!!t[e]:!1}function eo(){return qf}var Xf=B({},zs,{key:function(e){if(e.key){var t=Qf[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Dl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Kf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:eo,charCode:function(e){return e.type==="keypress"?Dl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Dl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Zf=Pt(Xf),Jf=B({},Ml,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mu=Pt(Jf),ep=B({},zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:eo}),tp=Pt(ep),np=B({},Yr,{propertyName:0,elapsedTime:0,pseudoElement:0}),rp=Pt(np),sp=B({},Ml,{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}),lp=Pt(sp),ip=[9,13,27,32],to=v&&"CompositionEvent"in window,bs=null;v&&"documentMode"in document&&(bs=document.documentMode);var op=v&&"TextEvent"in window&&!bs,gu=v&&(!to||bs&&8<bs&&11>=bs),vu=" ",yu=!1;function xu(e,t){switch(e){case"keyup":return ip.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ku(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qr=!1;function ap(e,t){switch(e){case"compositionend":return ku(t);case"keypress":return t.which!==32?null:(yu=!0,vu);case"textInput":return e=t.data,e===vu&&yu?null:e;default:return null}}function up(e,t){if(qr)return e==="compositionend"||!to&&xu(e,t)?(e=du(),Al=Yi=Bn=null,qr=!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 gu&&t.locale!=="ko"?null:t.data;default:return null}}var cp={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 wu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!cp[e.type]:t==="textarea"}function Su(e,t,n,r){Br(r),t=Fl(t,"onChange"),0<t.length&&(n=new qi("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var $s=null,Fs=null;function dp(e){Fu(e,0)}function zl(e){var t=ts(e);if(ze(t))return e}function fp(e,t){if(e==="change")return t}var Tu=!1;if(v){var no;if(v){var ro="oninput"in document;if(!ro){var _u=document.createElement("div");_u.setAttribute("oninput","return;"),ro=typeof _u.oninput=="function"}no=ro}else no=!1;Tu=no&&(!document.documentMode||9<document.documentMode)}function Nu(){$s&&($s.detachEvent("onpropertychange",Eu),Fs=$s=null)}function Eu(e){if(e.propertyName==="value"&&zl(Fs)){var t=[];Su(t,Fs,e,ln(e)),xn(dp,t)}}function pp(e,t,n){e==="focusin"?(Nu(),$s=t,Fs=n,$s.attachEvent("onpropertychange",Eu)):e==="focusout"&&Nu()}function hp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zl(Fs)}function mp(e,t){if(e==="click")return zl(t)}function gp(e,t){if(e==="input"||e==="change")return zl(t)}function vp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qt=typeof Object.is=="function"?Object.is:vp;function Us(e,t){if(qt(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(!k.call(t,o)||!qt(e[o],t[o]))return!1}return!0}function Cu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ju(e,t){var n=Cu(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=Cu(n)}}function Ru(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ru(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lu(){for(var e=window,t=Pn();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Pn(e.document)}return t}function so(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 yp(e){var t=Lu(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ru(n.ownerDocument.documentElement,n)){if(r!==null&&so(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,a=Math.min(r.start,o);r=r.end===void 0?a:Math.min(r.end,o),!e.extend&&a>r&&(o=r,r=a,a=o),o=ju(n,a);var p=ju(n,r);o&&p&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==p.node||e.focusOffset!==p.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(p.node,p.offset)):(t.setEnd(p.node,p.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 xp=v&&"documentMode"in document&&11>=document.documentMode,Xr=null,lo=null,Bs=null,io=!1;function Iu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;io||Xr==null||Xr!==Pn(r)||(r=Xr,"selectionStart"in r&&so(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}),Bs&&Us(Bs,r)||(Bs=r,r=Fl(lo,"onSelect"),0<r.length&&(t=new qi("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Xr)))}function Ol(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Zr={animationend:Ol("Animation","AnimationEnd"),animationiteration:Ol("Animation","AnimationIteration"),animationstart:Ol("Animation","AnimationStart"),transitionend:Ol("Transition","TransitionEnd")},oo={},Au={};v&&(Au=document.createElement("div").style,"AnimationEvent"in window||(delete Zr.animationend.animation,delete Zr.animationiteration.animation,delete Zr.animationstart.animation),"TransitionEvent"in window||delete Zr.transitionend.transition);function bl(e){if(oo[e])return oo[e];if(!Zr[e])return e;var t=Zr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Au)return oo[e]=t[n];return e}var Du=bl("animationend"),Pu=bl("animationiteration"),Mu=bl("animationstart"),zu=bl("transitionend"),Ou=new Map,bu="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 Hn(e,t){Ou.set(e,t),f(t,[e])}for(var ao=0;ao<bu.length;ao++){var uo=bu[ao],kp=uo.toLowerCase(),wp=uo[0].toUpperCase()+uo.slice(1);Hn(kp,"on"+wp)}Hn(Du,"onAnimationEnd"),Hn(Pu,"onAnimationIteration"),Hn(Mu,"onAnimationStart"),Hn("dblclick","onDoubleClick"),Hn("focusin","onFocus"),Hn("focusout","onBlur"),Hn(zu,"onTransitionEnd"),h("onMouseEnter",["mouseout","mouseover"]),h("onMouseLeave",["mouseout","mouseover"]),h("onPointerEnter",["pointerout","pointerover"]),h("onPointerLeave",["pointerout","pointerover"]),f("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),f("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),f("onBeforeInput",["compositionend","keypress","textInput","paste"]),f("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),f("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),f("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hs="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Sp=new Set("cancel close invalid load scroll toggle".split(" ").concat(Hs));function $u(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Wi(r,t,void 0,e),e.currentTarget=null}function Fu(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 a=void 0;if(t)for(var p=r.length-1;0<=p;p--){var y=r[p],w=y.instance,R=y.currentTarget;if(y=y.listener,w!==a&&o.isPropagationStopped())break e;$u(o,y,R),a=w}else for(p=0;p<r.length;p++){if(y=r[p],w=y.instance,R=y.currentTarget,y=y.listener,w!==a&&o.isPropagationStopped())break e;$u(o,y,R),a=w}}}if(On)throw e=Cs,On=!1,Cs=null,e}function Fe(e,t){var n=t[yo];n===void 0&&(n=t[yo]=new Set);var r=e+"__bubble";n.has(r)||(Uu(t,e,2,!1),n.add(r))}function co(e,t,n){var r=0;t&&(r|=4),Uu(n,e,r,t)}var $l="_reactListening"+Math.random().toString(36).slice(2);function Ws(e){if(!e[$l]){e[$l]=!0,u.forEach(function(n){n!=="selectionchange"&&(Sp.has(n)||co(n,!1,e),co(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$l]||(t[$l]=!0,co("selectionchange",!1,t))}}function Uu(e,t,n,r){switch(cu(t)){case 1:var o=zf;break;case 4:o=Of;break;default:o=Qi}n=o.bind(null,t,n,e),o=void 0,!fr||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 fo(e,t,n,r,o){var a=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var p=r.tag;if(p===3||p===4){var y=r.stateNode.containerInfo;if(y===o||y.nodeType===8&&y.parentNode===o)break;if(p===4)for(p=r.return;p!==null;){var w=p.tag;if((w===3||w===4)&&(w=p.stateNode.containerInfo,w===o||w.nodeType===8&&w.parentNode===o))return;p=p.return}for(;y!==null;){if(p=Sr(y),p===null)return;if(w=p.tag,w===5||w===6){r=a=p;continue e}y=y.parentNode}}r=r.return}xn(function(){var R=a,P=ln(n),M=[];e:{var D=Ou.get(e);if(D!==void 0){var V=qi,q=e;switch(e){case"keypress":if(Dl(n)===0)break e;case"keydown":case"keyup":V=Zf;break;case"focusin":q="focus",V=Ji;break;case"focusout":q="blur",V=Ji;break;case"beforeblur":case"afterblur":V=Ji;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":V=pu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=Ff;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=tp;break;case Du:case Pu:case Mu:V=Hf;break;case zu:V=rp;break;case"scroll":V=bf;break;case"wheel":V=lp;break;case"copy":case"cut":case"paste":V=Vf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=mu}var J=(t&4)!==0,et=!J&&e==="scroll",E=J?D!==null?D+"Capture":null:D;J=[];for(var S=R,j;S!==null;){j=S;var $=j.stateNode;if(j.tag===5&&$!==null&&(j=$,E!==null&&($=kn(S,E),$!=null&&J.push(Vs(S,$,j)))),et)break;S=S.return}0<J.length&&(D=new V(D,q,null,n,P),M.push({event:D,listeners:J}))}}if((t&7)===0){e:{if(D=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",D&&n!==zn&&(q=n.relatedTarget||n.fromElement)&&(Sr(q)||q[_n]))break e;if((V||D)&&(D=P.window===P?P:(D=P.ownerDocument)?D.defaultView||D.parentWindow:window,V?(q=n.relatedTarget||n.toElement,V=R,q=q?Sr(q):null,q!==null&&(et=Re(q),q!==et||q.tag!==5&&q.tag!==6)&&(q=null)):(V=null,q=R),V!==q)){if(J=pu,$="onMouseLeave",E="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(J=mu,$="onPointerLeave",E="onPointerEnter",S="pointer"),et=V==null?D:ts(V),j=q==null?D:ts(q),D=new J($,S+"leave",V,n,P),D.target=et,D.relatedTarget=j,$=null,Sr(P)===R&&(J=new J(E,S+"enter",q,n,P),J.target=j,J.relatedTarget=et,$=J),et=$,V&&q)t:{for(J=V,E=q,S=0,j=J;j;j=Jr(j))S++;for(j=0,$=E;$;$=Jr($))j++;for(;0<S-j;)J=Jr(J),S--;for(;0<j-S;)E=Jr(E),j--;for(;S--;){if(J===E||E!==null&&J===E.alternate)break t;J=Jr(J),E=Jr(E)}J=null}else J=null;V!==null&&Bu(M,D,V,J,!1),q!==null&&et!==null&&Bu(M,et,q,J,!0)}}e:{if(D=R?ts(R):window,V=D.nodeName&&D.nodeName.toLowerCase(),V==="select"||V==="input"&&D.type==="file")var te=fp;else if(wu(D))if(Tu)te=gp;else{te=hp;var se=pp}else(V=D.nodeName)&&V.toLowerCase()==="input"&&(D.type==="checkbox"||D.type==="radio")&&(te=mp);if(te&&(te=te(e,R))){Su(M,te,n,P);break e}se&&se(e,D,R),e==="focusout"&&(se=D._wrapperState)&&se.controlled&&D.type==="number"&&$t(D,"number",D.value)}switch(se=R?ts(R):window,e){case"focusin":(wu(se)||se.contentEditable==="true")&&(Xr=se,lo=R,Bs=null);break;case"focusout":Bs=lo=Xr=null;break;case"mousedown":io=!0;break;case"contextmenu":case"mouseup":case"dragend":io=!1,Iu(M,n,P);break;case"selectionchange":if(xp)break;case"keydown":case"keyup":Iu(M,n,P)}var le;if(to)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 qr?xu(e,n)&&(oe="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(oe="onCompositionStart");oe&&(gu&&n.locale!=="ko"&&(qr||oe!=="onCompositionStart"?oe==="onCompositionEnd"&&qr&&(le=du()):(Bn=P,Yi="value"in Bn?Bn.value:Bn.textContent,qr=!0)),se=Fl(R,oe),0<se.length&&(oe=new hu(oe,e,null,n,P),M.push({event:oe,listeners:se}),le?oe.data=le:(le=ku(n),le!==null&&(oe.data=le)))),(le=op?ap(e,n):up(e,n))&&(R=Fl(R,"onBeforeInput"),0<R.length&&(P=new hu("onBeforeInput","beforeinput",null,n,P),M.push({event:P,listeners:R}),P.data=le))}Fu(M,t)})}function Vs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,a=o.stateNode;o.tag===5&&a!==null&&(o=a,a=kn(e,n),a!=null&&r.unshift(Vs(e,a,o)),a=kn(e,t),a!=null&&r.push(Vs(e,a,o))),e=e.return}return r}function Jr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Bu(e,t,n,r,o){for(var a=t._reactName,p=[];n!==null&&n!==r;){var y=n,w=y.alternate,R=y.stateNode;if(w!==null&&w===r)break;y.tag===5&&R!==null&&(y=R,o?(w=kn(n,a),w!=null&&p.unshift(Vs(n,w,y))):o||(w=kn(n,a),w!=null&&p.push(Vs(n,w,y)))),n=n.return}p.length!==0&&e.push({event:t,listeners:p})}var Tp=/\r\n?/g,_p=/\u0000|\uFFFD/g;function Hu(e){return(typeof e=="string"?e:""+e).replace(Tp,`
|
|
38
|
+
`).replace(_p,"")}function Ul(e,t,n){if(t=Hu(t),Hu(e)!==t&&n)throw Error(i(425))}function Bl(){}var po=null,ho=null;function mo(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 go=typeof setTimeout=="function"?setTimeout:void 0,Np=typeof clearTimeout=="function"?clearTimeout:void 0,Wu=typeof Promise=="function"?Promise:void 0,Ep=typeof queueMicrotask=="function"?queueMicrotask:typeof Wu<"u"?function(e){return Wu.resolve(null).then(e).catch(Cp)}:go;function Cp(e){setTimeout(function(){throw e})}function vo(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),Ms(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Ms(t)}function Wn(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 Vu(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 es=Math.random().toString(36).slice(2),cn="__reactFiber$"+es,Gs="__reactProps$"+es,_n="__reactContainer$"+es,yo="__reactEvents$"+es,jp="__reactListeners$"+es,Rp="__reactHandles$"+es;function Sr(e){var t=e[cn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[_n]||n[cn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Vu(e);e!==null;){if(n=e[cn])return n;e=Vu(e)}return t}e=n,n=e.parentNode}return null}function Qs(e){return e=e[cn]||e[_n],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ts(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(i(33))}function Hl(e){return e[Gs]||null}var xo=[],ns=-1;function Vn(e){return{current:e}}function Ue(e){0>ns||(e.current=xo[ns],xo[ns]=null,ns--)}function be(e,t){ns++,xo[ns]=e.current,e.current=t}var Gn={},ht=Vn(Gn),Ct=Vn(!1),Tr=Gn;function rs(e,t){var n=e.type.contextTypes;if(!n)return Gn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},a;for(a in n)o[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function jt(e){return e=e.childContextTypes,e!=null}function Wl(){Ue(Ct),Ue(ht)}function Gu(e,t,n){if(ht.current!==Gn)throw Error(i(168));be(ht,t),be(Ct,n)}function Qu(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(i(108,De(e)||"Unknown",o));return B({},n,r)}function Vl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gn,Tr=ht.current,be(ht,e),be(Ct,Ct.current),!0}function Ku(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=Qu(e,t,Tr),r.__reactInternalMemoizedMergedChildContext=e,Ue(Ct),Ue(ht),be(ht,e)):Ue(Ct),be(Ct,n)}var Nn=null,Gl=!1,ko=!1;function Yu(e){Nn===null?Nn=[e]:Nn.push(e)}function Lp(e){Gl=!0,Yu(e)}function Qn(){if(!ko&&Nn!==null){ko=!0;var e=0,t=we;try{var n=Nn;for(we=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Nn=null,Gl=!1}catch(o){throw Nn!==null&&(Nn=Nn.slice(e+1)),Rs(bn,Qn),o}finally{we=t,ko=!1}}return null}var ss=[],ls=0,Ql=null,Kl=0,Ut=[],Bt=0,_r=null,En=1,Cn="";function Nr(e,t){ss[ls++]=Kl,ss[ls++]=Ql,Ql=e,Kl=t}function qu(e,t,n){Ut[Bt++]=En,Ut[Bt++]=Cn,Ut[Bt++]=_r,_r=e;var r=En;e=Cn;var o=32-kt(r)-1;r&=~(1<<o),n+=1;var a=32-kt(t)+o;if(30<a){var p=o-o%5;a=(r&(1<<p)-1).toString(32),r>>=p,o-=p,En=1<<32-kt(t)+o|n<<o|r,Cn=a+e}else En=1<<a|n<<o|r,Cn=e}function wo(e){e.return!==null&&(Nr(e,1),qu(e,1,0))}function So(e){for(;e===Ql;)Ql=ss[--ls],ss[ls]=null,Kl=ss[--ls],ss[ls]=null;for(;e===_r;)_r=Ut[--Bt],Ut[Bt]=null,Cn=Ut[--Bt],Ut[Bt]=null,En=Ut[--Bt],Ut[Bt]=null}var Mt=null,zt=null,He=!1,Xt=null;function Xu(e,t){var n=Gt(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 Zu(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,Mt=e,zt=Wn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Mt=e,zt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=_r!==null?{id:En,overflow:Cn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Gt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Mt=e,zt=null,!0):!1;default:return!1}}function To(e){return(e.mode&1)!==0&&(e.flags&128)===0}function _o(e){if(He){var t=zt;if(t){var n=t;if(!Zu(e,t)){if(To(e))throw Error(i(418));t=Wn(n.nextSibling);var r=Mt;t&&Zu(e,t)?Xu(r,n):(e.flags=e.flags&-4097|2,He=!1,Mt=e)}}else{if(To(e))throw Error(i(418));e.flags=e.flags&-4097|2,He=!1,Mt=e}}}function Ju(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Mt=e}function Yl(e){if(e!==Mt)return!1;if(!He)return Ju(e),He=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!mo(e.type,e.memoizedProps)),t&&(t=zt)){if(To(e))throw ec(),Error(i(418));for(;t;)Xu(e,t),t=Wn(t.nextSibling)}if(Ju(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){zt=Wn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}zt=null}}else zt=Mt?Wn(e.stateNode.nextSibling):null;return!0}function ec(){for(var e=zt;e;)e=Wn(e.nextSibling)}function is(){zt=Mt=null,He=!1}function No(e){Xt===null?Xt=[e]:Xt.push(e)}var Ip=W.ReactCurrentBatchConfig;function Ks(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(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var o=r,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(p){var y=o.refs;p===null?delete y[a]:y[a]=p},t._stringRef=a,t)}if(typeof e!="string")throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function ql(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function tc(e){var t=e._init;return t(e._payload)}function nc(e){function t(E,S){if(e){var j=E.deletions;j===null?(E.deletions=[S],E.flags|=16):j.push(S)}}function n(E,S){if(!e)return null;for(;S!==null;)t(E,S),S=S.sibling;return null}function r(E,S){for(E=new Map;S!==null;)S.key!==null?E.set(S.key,S):E.set(S.index,S),S=S.sibling;return E}function o(E,S){return E=tr(E,S),E.index=0,E.sibling=null,E}function a(E,S,j){return E.index=j,e?(j=E.alternate,j!==null?(j=j.index,j<S?(E.flags|=2,S):j):(E.flags|=2,S)):(E.flags|=1048576,S)}function p(E){return e&&E.alternate===null&&(E.flags|=2),E}function y(E,S,j,$){return S===null||S.tag!==6?(S=ga(j,E.mode,$),S.return=E,S):(S=o(S,j),S.return=E,S)}function w(E,S,j,$){var te=j.type;return te===ue?P(E,S,j.props.children,$,j.key):S!==null&&(S.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===re&&tc(te)===S.type)?($=o(S,j.props),$.ref=Ks(E,S,j),$.return=E,$):($=ki(j.type,j.key,j.props,null,E.mode,$),$.ref=Ks(E,S,j),$.return=E,$)}function R(E,S,j,$){return S===null||S.tag!==4||S.stateNode.containerInfo!==j.containerInfo||S.stateNode.implementation!==j.implementation?(S=va(j,E.mode,$),S.return=E,S):(S=o(S,j.children||[]),S.return=E,S)}function P(E,S,j,$,te){return S===null||S.tag!==7?(S=Dr(j,E.mode,$,te),S.return=E,S):(S=o(S,j),S.return=E,S)}function M(E,S,j){if(typeof S=="string"&&S!==""||typeof S=="number")return S=ga(""+S,E.mode,j),S.return=E,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case xe:return j=ki(S.type,S.key,S.props,null,E.mode,j),j.ref=Ks(E,null,S),j.return=E,j;case he:return S=va(S,E.mode,j),S.return=E,S;case re:var $=S._init;return M(E,$(S._payload),j)}if(Mn(S)||ee(S))return S=Dr(S,E.mode,j,null),S.return=E,S;ql(E,S)}return null}function D(E,S,j,$){var te=S!==null?S.key:null;if(typeof j=="string"&&j!==""||typeof j=="number")return te!==null?null:y(E,S,""+j,$);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case xe:return j.key===te?w(E,S,j,$):null;case he:return j.key===te?R(E,S,j,$):null;case re:return te=j._init,D(E,S,te(j._payload),$)}if(Mn(j)||ee(j))return te!==null?null:P(E,S,j,$,null);ql(E,j)}return null}function V(E,S,j,$,te){if(typeof $=="string"&&$!==""||typeof $=="number")return E=E.get(j)||null,y(S,E,""+$,te);if(typeof $=="object"&&$!==null){switch($.$$typeof){case xe:return E=E.get($.key===null?j:$.key)||null,w(S,E,$,te);case he:return E=E.get($.key===null?j:$.key)||null,R(S,E,$,te);case re:var se=$._init;return V(E,S,j,se($._payload),te)}if(Mn($)||ee($))return E=E.get(j)||null,P(S,E,$,te,null);ql(S,$)}return null}function q(E,S,j,$){for(var te=null,se=null,le=S,oe=S=0,ot=null;le!==null&&oe<j.length;oe++){le.index>oe?(ot=le,le=null):ot=le.sibling;var Ne=D(E,le,j[oe],$);if(Ne===null){le===null&&(le=ot);break}e&&le&&Ne.alternate===null&&t(E,le),S=a(Ne,S,oe),se===null?te=Ne:se.sibling=Ne,se=Ne,le=ot}if(oe===j.length)return n(E,le),He&&Nr(E,oe),te;if(le===null){for(;oe<j.length;oe++)le=M(E,j[oe],$),le!==null&&(S=a(le,S,oe),se===null?te=le:se.sibling=le,se=le);return He&&Nr(E,oe),te}for(le=r(E,le);oe<j.length;oe++)ot=V(le,E,oe,j[oe],$),ot!==null&&(e&&ot.alternate!==null&&le.delete(ot.key===null?oe:ot.key),S=a(ot,S,oe),se===null?te=ot:se.sibling=ot,se=ot);return e&&le.forEach(function(nr){return t(E,nr)}),He&&Nr(E,oe),te}function J(E,S,j,$){var te=ee(j);if(typeof te!="function")throw Error(i(150));if(j=te.call(j),j==null)throw Error(i(151));for(var se=te=null,le=S,oe=S=0,ot=null,Ne=j.next();le!==null&&!Ne.done;oe++,Ne=j.next()){le.index>oe?(ot=le,le=null):ot=le.sibling;var nr=D(E,le,Ne.value,$);if(nr===null){le===null&&(le=ot);break}e&&le&&nr.alternate===null&&t(E,le),S=a(nr,S,oe),se===null?te=nr:se.sibling=nr,se=nr,le=ot}if(Ne.done)return n(E,le),He&&Nr(E,oe),te;if(le===null){for(;!Ne.done;oe++,Ne=j.next())Ne=M(E,Ne.value,$),Ne!==null&&(S=a(Ne,S,oe),se===null?te=Ne:se.sibling=Ne,se=Ne);return He&&Nr(E,oe),te}for(le=r(E,le);!Ne.done;oe++,Ne=j.next())Ne=V(le,E,oe,Ne.value,$),Ne!==null&&(e&&Ne.alternate!==null&&le.delete(Ne.key===null?oe:Ne.key),S=a(Ne,S,oe),se===null?te=Ne:se.sibling=Ne,se=Ne);return e&&le.forEach(function(ch){return t(E,ch)}),He&&Nr(E,oe),te}function et(E,S,j,$){if(typeof j=="object"&&j!==null&&j.type===ue&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case xe:e:{for(var te=j.key,se=S;se!==null;){if(se.key===te){if(te=j.type,te===ue){if(se.tag===7){n(E,se.sibling),S=o(se,j.props.children),S.return=E,E=S;break e}}else if(se.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===re&&tc(te)===se.type){n(E,se.sibling),S=o(se,j.props),S.ref=Ks(E,se,j),S.return=E,E=S;break e}n(E,se);break}else t(E,se);se=se.sibling}j.type===ue?(S=Dr(j.props.children,E.mode,$,j.key),S.return=E,E=S):($=ki(j.type,j.key,j.props,null,E.mode,$),$.ref=Ks(E,S,j),$.return=E,E=$)}return p(E);case he:e:{for(se=j.key;S!==null;){if(S.key===se)if(S.tag===4&&S.stateNode.containerInfo===j.containerInfo&&S.stateNode.implementation===j.implementation){n(E,S.sibling),S=o(S,j.children||[]),S.return=E,E=S;break e}else{n(E,S);break}else t(E,S);S=S.sibling}S=va(j,E.mode,$),S.return=E,E=S}return p(E);case re:return se=j._init,et(E,S,se(j._payload),$)}if(Mn(j))return q(E,S,j,$);if(ee(j))return J(E,S,j,$);ql(E,j)}return typeof j=="string"&&j!==""||typeof j=="number"?(j=""+j,S!==null&&S.tag===6?(n(E,S.sibling),S=o(S,j),S.return=E,E=S):(n(E,S),S=ga(j,E.mode,$),S.return=E,E=S),p(E)):n(E,S)}return et}var os=nc(!0),rc=nc(!1),Xl=Vn(null),Zl=null,as=null,Eo=null;function Co(){Eo=as=Zl=null}function jo(e){var t=Xl.current;Ue(Xl),e._currentValue=t}function Ro(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 us(e,t){Zl=e,Eo=as=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(Eo!==e)if(e={context:e,memoizedValue:t,next:null},as===null){if(Zl===null)throw Error(i(308));as=e,Zl.dependencies={lanes:0,firstContext:e}}else as=as.next=e;return t}var Er=null;function Lo(e){Er===null?Er=[e]:Er.push(e)}function sc(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Lo(t)):(n.next=o.next,o.next=n),t.interleaved=n,jn(e,r)}function jn(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 Kn=!1;function Io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Rn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Yn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Te&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,jn(e,n)}return o=r.interleaved,o===null?(t.next=t,Lo(r)):(t.next=o.next,o.next=t),r.interleaved=t,jn(e,n)}function Jl(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,Fn(e,n)}}function ic(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var p={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?o=a=p:a=a.next=p,n=n.next}while(n!==null);a===null?o=a=t:a=a.next=t}else o=a=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:a,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 ei(e,t,n,r){var o=e.updateQueue;Kn=!1;var a=o.firstBaseUpdate,p=o.lastBaseUpdate,y=o.shared.pending;if(y!==null){o.shared.pending=null;var w=y,R=w.next;w.next=null,p===null?a=R:p.next=R,p=w;var P=e.alternate;P!==null&&(P=P.updateQueue,y=P.lastBaseUpdate,y!==p&&(y===null?P.firstBaseUpdate=R:y.next=R,P.lastBaseUpdate=w))}if(a!==null){var M=o.baseState;p=0,P=R=w=null,y=a;do{var D=y.lane,V=y.eventTime;if((r&D)===D){P!==null&&(P=P.next={eventTime:V,lane:0,tag:y.tag,payload:y.payload,callback:y.callback,next:null});e:{var q=e,J=y;switch(D=t,V=n,J.tag){case 1:if(q=J.payload,typeof q=="function"){M=q.call(V,M,D);break e}M=q;break e;case 3:q.flags=q.flags&-65537|128;case 0:if(q=J.payload,D=typeof q=="function"?q.call(V,M,D):q,D==null)break e;M=B({},M,D);break e;case 2:Kn=!0}}y.callback!==null&&y.lane!==0&&(e.flags|=64,D=o.effects,D===null?o.effects=[y]:D.push(y))}else V={eventTime:V,lane:D,tag:y.tag,payload:y.payload,callback:y.callback,next:null},P===null?(R=P=V,w=M):P=P.next=V,p|=D;if(y=y.next,y===null){if(y=o.shared.pending,y===null)break;D=y,y=D.next,D.next=null,o.lastBaseUpdate=D,o.shared.pending=null}}while(!0);if(P===null&&(w=M),o.baseState=w,o.firstBaseUpdate=R,o.lastBaseUpdate=P,t=o.shared.interleaved,t!==null){o=t;do p|=o.lane,o=o.next;while(o!==t)}else a===null&&(o.shared.lanes=0);Rr|=p,e.lanes=p,e.memoizedState=M}}function oc(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(i(191,o));o.call(r)}}}var Ys={},dn=Vn(Ys),qs=Vn(Ys),Xs=Vn(Ys);function Cr(e){if(e===Ys)throw Error(i(174));return e}function Ao(e,t){switch(be(Xs,t),be(qs,e),be(dn,Ys),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ir(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ir(t,e)}Ue(dn),be(dn,t)}function cs(){Ue(dn),Ue(qs),Ue(Xs)}function ac(e){Cr(Xs.current);var t=Cr(dn.current),n=ir(t,e.type);t!==n&&(be(qs,e),be(dn,n))}function Do(e){qs.current===e&&(Ue(dn),Ue(qs))}var Qe=Vn(0);function ti(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 Po=[];function Mo(){for(var e=0;e<Po.length;e++)Po[e]._workInProgressVersionPrimary=null;Po.length=0}var ni=W.ReactCurrentDispatcher,zo=W.ReactCurrentBatchConfig,jr=0,Ke=null,rt=null,lt=null,ri=!1,Zs=!1,Js=0,Ap=0;function mt(){throw Error(i(321))}function Oo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!qt(e[n],t[n]))return!1;return!0}function bo(e,t,n,r,o,a){if(jr=a,Ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ni.current=e===null||e.memoizedState===null?zp:Op,e=n(r,o),Zs){a=0;do{if(Zs=!1,Js=0,25<=a)throw Error(i(301));a+=1,lt=rt=null,t.updateQueue=null,ni.current=bp,e=n(r,o)}while(Zs)}if(ni.current=ii,t=rt!==null&&rt.next!==null,jr=0,lt=rt=Ke=null,ri=!1,t)throw Error(i(300));return e}function $o(){var e=Js!==0;return Js=0,e}function fn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?Ke.memoizedState=lt=e:lt=lt.next=e,lt}function Wt(){if(rt===null){var e=Ke.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=lt===null?Ke.memoizedState:lt.next;if(t!==null)lt=t,rt=e;else{if(e===null)throw Error(i(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},lt===null?Ke.memoizedState=lt=e:lt=lt.next=e}return lt}function el(e,t){return typeof t=="function"?t(e):t}function Fo(e){var t=Wt(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=rt,o=r.baseQueue,a=n.pending;if(a!==null){if(o!==null){var p=o.next;o.next=a.next,a.next=p}r.baseQueue=o=a,n.pending=null}if(o!==null){a=o.next,r=r.baseState;var y=p=null,w=null,R=a;do{var P=R.lane;if((jr&P)===P)w!==null&&(w=w.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 M={lane:P,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null};w===null?(y=w=M,p=r):w=w.next=M,Ke.lanes|=P,Rr|=P}R=R.next}while(R!==null&&R!==a);w===null?p=r:w.next=y,qt(r,t.memoizedState)||(Rt=!0),t.memoizedState=r,t.baseState=p,t.baseQueue=w,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do a=o.lane,Ke.lanes|=a,Rr|=a,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Uo(e){var t=Wt(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,a=t.memoizedState;if(o!==null){n.pending=null;var p=o=o.next;do a=e(a,p.action),p=p.next;while(p!==o);qt(a,t.memoizedState)||(Rt=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function uc(){}function cc(e,t){var n=Ke,r=Wt(),o=t(),a=!qt(r.memoizedState,o);if(a&&(r.memoizedState=o,Rt=!0),r=r.queue,Bo(pc.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||lt!==null&<.memoizedState.tag&1){if(n.flags|=2048,tl(9,fc.bind(null,n,r,o,t),void 0,null),it===null)throw Error(i(349));(jr&30)!==0||dc(n,t,o)}return o}function dc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function fc(e,t,n,r){t.value=n,t.getSnapshot=r,hc(t)&&mc(e)}function pc(e,t,n){return n(function(){hc(t)&&mc(e)})}function hc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!qt(e,n)}catch{return!0}}function mc(e){var t=jn(e,1);t!==null&&tn(t,e,1,-1)}function gc(e){var t=fn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:el,lastRenderedState:e},t.queue=e,e=e.dispatch=Mp.bind(null,Ke,e),[t.memoizedState,e]}function tl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.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 vc(){return Wt().memoizedState}function si(e,t,n,r){var o=fn();Ke.flags|=e,o.memoizedState=tl(1|t,n,void 0,r===void 0?null:r)}function li(e,t,n,r){var o=Wt();r=r===void 0?null:r;var a=void 0;if(rt!==null){var p=rt.memoizedState;if(a=p.destroy,r!==null&&Oo(r,p.deps)){o.memoizedState=tl(t,n,a,r);return}}Ke.flags|=e,o.memoizedState=tl(1|t,n,a,r)}function yc(e,t){return si(8390656,8,e,t)}function Bo(e,t){return li(2048,8,e,t)}function xc(e,t){return li(4,2,e,t)}function kc(e,t){return li(4,4,e,t)}function wc(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 Sc(e,t,n){return n=n!=null?n.concat([e]):null,li(4,4,wc.bind(null,t,e),n)}function Ho(){}function Tc(e,t){var n=Wt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Oo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _c(e,t){var n=Wt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Oo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Nc(e,t,n){return(jr&21)===0?(e.baseState&&(e.baseState=!1,Rt=!0),e.memoizedState=n):(qt(n,t)||(n=Is(),Ke.lanes|=n,Rr|=n,e.baseState=!0),t)}function Dp(e,t){var n=we;we=n!==0&&4>n?n:4,e(!0);var r=zo.transition;zo.transition={};try{e(!1),t()}finally{we=n,zo.transition=r}}function Ec(){return Wt().memoizedState}function Pp(e,t,n){var r=Jn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Cc(e))jc(t,n);else if(n=sc(e,t,n,r),n!==null){var o=Tt();tn(n,e,r,o),Rc(n,t,r)}}function Mp(e,t,n){var r=Jn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cc(e))jc(t,o);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var p=t.lastRenderedState,y=a(p,n);if(o.hasEagerState=!0,o.eagerState=y,qt(y,p)){var w=t.interleaved;w===null?(o.next=o,Lo(t)):(o.next=w.next,w.next=o),t.interleaved=o;return}}catch{}finally{}n=sc(e,t,o,r),n!==null&&(o=Tt(),tn(n,e,r,o),Rc(n,t,r))}}function Cc(e){var t=e.alternate;return e===Ke||t!==null&&t===Ke}function jc(e,t){Zs=ri=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rc(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Fn(e,n)}}var ii={readContext:Ht,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useInsertionEffect:mt,useLayoutEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useMutableSource:mt,useSyncExternalStore:mt,useId:mt,unstable_isNewReconciler:!1},zp={readContext:Ht,useCallback:function(e,t){return fn().memoizedState=[e,t===void 0?null:t],e},useContext:Ht,useEffect:yc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,si(4194308,4,wc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return si(4194308,4,e,t)},useInsertionEffect:function(e,t){return si(4,2,e,t)},useMemo:function(e,t){var n=fn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=fn();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=Pp.bind(null,Ke,e),[r.memoizedState,e]},useRef:function(e){var t=fn();return e={current:e},t.memoizedState=e},useState:gc,useDebugValue:Ho,useDeferredValue:function(e){return fn().memoizedState=e},useTransition:function(){var e=gc(!1),t=e[0];return e=Dp.bind(null,e[1]),fn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ke,o=fn();if(He){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),it===null)throw Error(i(349));(jr&30)!==0||dc(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,yc(pc.bind(null,r,a,e),[e]),r.flags|=2048,tl(9,fc.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=fn(),t=it.identifierPrefix;if(He){var n=Cn,r=En;n=(r&~(1<<32-kt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Js++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Ap++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Op={readContext:Ht,useCallback:Tc,useContext:Ht,useEffect:Bo,useImperativeHandle:Sc,useInsertionEffect:xc,useLayoutEffect:kc,useMemo:_c,useReducer:Fo,useRef:vc,useState:function(){return Fo(el)},useDebugValue:Ho,useDeferredValue:function(e){var t=Wt();return Nc(t,rt.memoizedState,e)},useTransition:function(){var e=Fo(el)[0],t=Wt().memoizedState;return[e,t]},useMutableSource:uc,useSyncExternalStore:cc,useId:Ec,unstable_isNewReconciler:!1},bp={readContext:Ht,useCallback:Tc,useContext:Ht,useEffect:Bo,useImperativeHandle:Sc,useInsertionEffect:xc,useLayoutEffect:kc,useMemo:_c,useReducer:Uo,useRef:vc,useState:function(){return Uo(el)},useDebugValue:Ho,useDeferredValue:function(e){var t=Wt();return rt===null?t.memoizedState=e:Nc(t,rt.memoizedState,e)},useTransition:function(){var e=Uo(el)[0],t=Wt().memoizedState;return[e,t]},useMutableSource:uc,useSyncExternalStore:cc,useId:Ec,unstable_isNewReconciler:!1};function Zt(e,t){if(e&&e.defaultProps){t=B({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Wo(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:B({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var oi={isMounted:function(e){return(e=e._reactInternals)?Re(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Tt(),o=Jn(e),a=Rn(r,o);a.payload=t,n!=null&&(a.callback=n),t=Yn(e,a,o),t!==null&&(tn(t,e,o,r),Jl(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Tt(),o=Jn(e),a=Rn(r,o);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=Yn(e,a,o),t!==null&&(tn(t,e,o,r),Jl(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Tt(),r=Jn(e),o=Rn(n,r);o.tag=2,t!=null&&(o.callback=t),t=Yn(e,o,r),t!==null&&(tn(t,e,r,n),Jl(t,e,r))}};function Lc(e,t,n,r,o,a,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,p):t.prototype&&t.prototype.isPureReactComponent?!Us(n,r)||!Us(o,a):!0}function Ic(e,t,n){var r=!1,o=Gn,a=t.contextType;return typeof a=="object"&&a!==null?a=Ht(a):(o=jt(t)?Tr:ht.current,r=t.contextTypes,a=(r=r!=null)?rs(e,o):Gn),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=oi,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ac(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&&oi.enqueueReplaceState(t,t.state,null)}function Vo(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Io(e);var a=t.contextType;typeof a=="object"&&a!==null?o.context=Ht(a):(a=jt(t)?Tr:ht.current,o.context=rs(e,a)),o.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Wo(e,t,a,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&&oi.enqueueReplaceState(o,o.state,null),ei(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function ds(e,t){try{var n="",r=t;do n+=ge(r),r=r.return;while(r);var o=n}catch(a){o=`
|
|
39
|
+
Error generating stack: `+a.message+`
|
|
40
|
+
`+a.stack}return{value:e,source:t,stack:o,digest:null}}function Go(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Qo(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var $p=typeof WeakMap=="function"?WeakMap:Map;function Dc(e,t,n){n=Rn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){hi||(hi=!0,aa=r),Qo(e,t)},n}function Pc(e,t,n){n=Rn(-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(){Qo(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){Qo(e,t),typeof r!="function"&&(Xn===null?Xn=new Set([this]):Xn.add(this));var p=t.stack;this.componentDidCatch(t.value,{componentStack:p!==null?p:""})}),n}function Mc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $p;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=Jp.bind(null,e,t,n),t.then(e,e))}function zc(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 Oc(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=Rn(-1,1),t.tag=2,Yn(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var Fp=W.ReactCurrentOwner,Rt=!1;function St(e,t,n,r){t.child=e===null?rc(t,null,n,r):os(t,e.child,n,r)}function bc(e,t,n,r,o){n=n.render;var a=t.ref;return us(t,o),r=bo(e,t,n,r,a,o),n=$o(),e!==null&&!Rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ln(e,t,o)):(He&&n&&wo(t),t.flags|=1,St(e,t,r,o),t.child)}function $c(e,t,n,r,o){if(e===null){var a=n.type;return typeof a=="function"&&!ma(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Fc(e,t,a,r,o)):(e=ki(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&o)===0){var p=a.memoizedProps;if(n=n.compare,n=n!==null?n:Us,n(p,r)&&e.ref===t.ref)return Ln(e,t,o)}return t.flags|=1,e=tr(a,r),e.ref=t.ref,e.return=t,t.child=e}function Fc(e,t,n,r,o){if(e!==null){var a=e.memoizedProps;if(Us(a,r)&&e.ref===t.ref)if(Rt=!1,t.pendingProps=r=a,(e.lanes&o)!==0)(e.flags&131072)!==0&&(Rt=!0);else return t.lanes=e.lanes,Ln(e,t,o)}return Ko(e,t,n,r,o)}function Uc(e,t,n){var r=t.pendingProps,o=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},be(ps,Ot),Ot|=n;else{if((n&1073741824)===0)return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,be(ps,Ot),Ot|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,be(ps,Ot),Ot|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,be(ps,Ot),Ot|=r;return St(e,t,o,n),t.child}function Bc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ko(e,t,n,r,o){var a=jt(n)?Tr:ht.current;return a=rs(t,a),us(t,o),n=bo(e,t,n,r,a,o),r=$o(),e!==null&&!Rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ln(e,t,o)):(He&&r&&wo(t),t.flags|=1,St(e,t,n,o),t.child)}function Hc(e,t,n,r,o){if(jt(n)){var a=!0;Vl(t)}else a=!1;if(us(t,o),t.stateNode===null)ui(e,t),Ic(t,n,r),Vo(t,n,r,o),r=!0;else if(e===null){var p=t.stateNode,y=t.memoizedProps;p.props=y;var w=p.context,R=n.contextType;typeof R=="object"&&R!==null?R=Ht(R):(R=jt(n)?Tr:ht.current,R=rs(t,R));var P=n.getDerivedStateFromProps,M=typeof P=="function"||typeof p.getSnapshotBeforeUpdate=="function";M||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(y!==r||w!==R)&&Ac(t,p,r,R),Kn=!1;var D=t.memoizedState;p.state=D,ei(t,r,p,o),w=t.memoizedState,y!==r||D!==w||Ct.current||Kn?(typeof P=="function"&&(Wo(t,n,P,r),w=t.memoizedState),(y=Kn||Lc(t,n,y,r,D,w,R))?(M||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(t.flags|=4194308)):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=w),p.props=r,p.state=w,p.context=R,r=y):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{p=t.stateNode,lc(e,t),y=t.memoizedProps,R=t.type===t.elementType?y:Zt(t.type,y),p.props=R,M=t.pendingProps,D=p.context,w=n.contextType,typeof w=="object"&&w!==null?w=Ht(w):(w=jt(n)?Tr:ht.current,w=rs(t,w));var V=n.getDerivedStateFromProps;(P=typeof V=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(y!==M||D!==w)&&Ac(t,p,r,w),Kn=!1,D=t.memoizedState,p.state=D,ei(t,r,p,o);var q=t.memoizedState;y!==M||D!==q||Ct.current||Kn?(typeof V=="function"&&(Wo(t,n,V,r),q=t.memoizedState),(R=Kn||Lc(t,n,R,r,D,q,w)||!1)?(P||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(r,q,w),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(r,q,w)),typeof p.componentDidUpdate=="function"&&(t.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof p.componentDidUpdate!="function"||y===e.memoizedProps&&D===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&D===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=q),p.props=r,p.state=q,p.context=w,r=R):(typeof p.componentDidUpdate!="function"||y===e.memoizedProps&&D===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&D===e.memoizedState||(t.flags|=1024),r=!1)}return Yo(e,t,n,r,a,o)}function Yo(e,t,n,r,o,a){Bc(e,t);var p=(t.flags&128)!==0;if(!r&&!p)return o&&Ku(t,n,!1),Ln(e,t,a);r=t.stateNode,Fp.current=t;var y=p&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&p?(t.child=os(t,e.child,null,a),t.child=os(t,null,y,a)):St(e,t,y,a),t.memoizedState=r.state,o&&Ku(t,n,!0),t.child}function Wc(e){var t=e.stateNode;t.pendingContext?Gu(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Gu(e,t.context,!1),Ao(e,t.containerInfo)}function Vc(e,t,n,r,o){return is(),No(o),t.flags|=256,St(e,t,n,r),t.child}var qo={dehydrated:null,treeContext:null,retryLane:0};function Xo(e){return{baseLanes:e,cachePool:null,transitions:null}}function Gc(e,t,n){var r=t.pendingProps,o=Qe.current,a=!1,p=(t.flags&128)!==0,y;if((y=p)||(y=e!==null&&e.memoizedState===null?!1:(o&2)!==0),y?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),be(Qe,o&1),e===null)return _o(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):(p=r.children,e=r.fallback,a?(r=t.mode,a=t.child,p={mode:"hidden",children:p},(r&1)===0&&a!==null?(a.childLanes=0,a.pendingProps=p):a=wi(p,r,0,null),e=Dr(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Xo(n),t.memoizedState=qo,e):Zo(t,p));if(o=e.memoizedState,o!==null&&(y=o.dehydrated,y!==null))return Up(e,t,p,r,y,o,n);if(a){a=r.fallback,p=t.mode,o=e.child,y=o.sibling;var w={mode:"hidden",children:r.children};return(p&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=w,t.deletions=null):(r=tr(o,w),r.subtreeFlags=o.subtreeFlags&14680064),y!==null?a=tr(y,a):(a=Dr(a,p,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,p=e.child.memoizedState,p=p===null?Xo(n):{baseLanes:p.baseLanes|n,cachePool:null,transitions:p.transitions},a.memoizedState=p,a.childLanes=e.childLanes&~n,t.memoizedState=qo,r}return a=e.child,e=a.sibling,r=tr(a,{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 Zo(e,t){return t=wi({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ai(e,t,n,r){return r!==null&&No(r),os(t,e.child,null,n),e=Zo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Up(e,t,n,r,o,a,p){if(n)return t.flags&256?(t.flags&=-257,r=Go(Error(i(422))),ai(e,t,p,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,o=t.mode,r=wi({mode:"visible",children:r.children},o,0,null),a=Dr(a,o,p,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,(t.mode&1)!==0&&os(t,e.child,null,p),t.child.memoizedState=Xo(p),t.memoizedState=qo,a);if((t.mode&1)===0)return ai(e,t,p,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var y=r.dgst;return r=y,a=Error(i(419)),r=Go(a,r,void 0),ai(e,t,p,r)}if(y=(p&e.childLanes)!==0,Rt||y){if(r=it,r!==null){switch(p&-p){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|p))!==0?0:o,o!==0&&o!==a.retryLane&&(a.retryLane=o,jn(e,o),tn(r,e,o,-1))}return ha(),r=Go(Error(i(421))),ai(e,t,p,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=eh.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,zt=Wn(o.nextSibling),Mt=t,He=!0,Xt=null,e!==null&&(Ut[Bt++]=En,Ut[Bt++]=Cn,Ut[Bt++]=_r,En=e.id,Cn=e.overflow,_r=t),t=Zo(t,r.children),t.flags|=4096,t)}function Qc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ro(e.return,t,n)}function Jo(e,t,n,r,o){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o)}function Kc(e,t,n){var r=t.pendingProps,o=r.revealOrder,a=r.tail;if(St(e,t,r.children,n),r=Qe.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&&Qc(e,n,t);else if(e.tag===19)Qc(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(be(Qe,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&&ti(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Jo(t,!1,o,n,a);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&ti(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Jo(t,!0,n,null,a);break;case"together":Jo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ui(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ln(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Rr|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=tr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=tr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Bp(e,t,n){switch(t.tag){case 3:Wc(t),is();break;case 5:ac(t);break;case 1:jt(t.type)&&Vl(t);break;case 4:Ao(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;be(Xl,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(be(Qe,Qe.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Gc(e,t,n):(be(Qe,Qe.current&1),e=Ln(e,t,n),e!==null?e.sibling:null);be(Qe,Qe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Kc(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),be(Qe,Qe.current),r)break;return null;case 22:case 23:return t.lanes=0,Uc(e,t,n)}return Ln(e,t,n)}var Yc,ea,qc,Xc;Yc=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}},ea=function(){},qc=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Cr(dn.current);var a=null;switch(n){case"input":o=Pe(e,o),r=Pe(e,r),a=[];break;case"select":o=B({},o,{value:void 0}),r=B({},r,{value:void 0}),a=[];break;case"textarea":o=$r(e,o),r=$r(e,r),a=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Bl)}Ur(n,r);var p;n=null;for(R in o)if(!r.hasOwnProperty(R)&&o.hasOwnProperty(R)&&o[R]!=null)if(R==="style"){var y=o[R];for(p in y)y.hasOwnProperty(p)&&(n||(n={}),n[p]="")}else R!=="dangerouslySetInnerHTML"&&R!=="children"&&R!=="suppressContentEditableWarning"&&R!=="suppressHydrationWarning"&&R!=="autoFocus"&&(c.hasOwnProperty(R)?a||(a=[]):(a=a||[]).push(R,null));for(R in r){var w=r[R];if(y=o!=null?o[R]:void 0,r.hasOwnProperty(R)&&w!==y&&(w!=null||y!=null))if(R==="style")if(y){for(p in y)!y.hasOwnProperty(p)||w&&w.hasOwnProperty(p)||(n||(n={}),n[p]="");for(p in w)w.hasOwnProperty(p)&&y[p]!==w[p]&&(n||(n={}),n[p]=w[p])}else n||(a||(a=[]),a.push(R,n)),n=w;else R==="dangerouslySetInnerHTML"?(w=w?w.__html:void 0,y=y?y.__html:void 0,w!=null&&y!==w&&(a=a||[]).push(R,w)):R==="children"?typeof w!="string"&&typeof w!="number"||(a=a||[]).push(R,""+w):R!=="suppressContentEditableWarning"&&R!=="suppressHydrationWarning"&&(c.hasOwnProperty(R)?(w!=null&&R==="onScroll"&&Fe("scroll",e),a||y===w||(a=[])):(a=a||[]).push(R,w))}n&&(a=a||[]).push("style",n);var R=a;(t.updateQueue=R)&&(t.flags|=4)}},Xc=function(e,t,n,r){n!==r&&(t.flags|=4)};function nl(e,t){if(!He)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 gt(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 Hp(e,t,n){var r=t.pendingProps;switch(So(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gt(t),null;case 1:return jt(t.type)&&Wl(),gt(t),null;case 3:return r=t.stateNode,cs(),Ue(Ct),Ue(ht),Mo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Yl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xt!==null&&(da(Xt),Xt=null))),ea(e,t),gt(t),null;case 5:Do(t);var o=Cr(Xs.current);if(n=t.type,e!==null&&t.stateNode!=null)qc(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(i(166));return gt(t),null}if(e=Cr(dn.current),Yl(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[cn]=t,r[Gs]=a,e=(t.mode&1)!==0,n){case"dialog":Fe("cancel",r),Fe("close",r);break;case"iframe":case"object":case"embed":Fe("load",r);break;case"video":case"audio":for(o=0;o<Hs.length;o++)Fe(Hs[o],r);break;case"source":Fe("error",r);break;case"img":case"image":case"link":Fe("error",r),Fe("load",r);break;case"details":Fe("toggle",r);break;case"input":br(r,a),Fe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Fe("invalid",r);break;case"textarea":Ts(r,a),Fe("invalid",r)}Ur(n,a),o=null;for(var p in a)if(a.hasOwnProperty(p)){var y=a[p];p==="children"?typeof y=="string"?r.textContent!==y&&(a.suppressHydrationWarning!==!0&&Ul(r.textContent,y,e),o=["children",y]):typeof y=="number"&&r.textContent!==""+y&&(a.suppressHydrationWarning!==!0&&Ul(r.textContent,y,e),o=["children",""+y]):c.hasOwnProperty(p)&&y!=null&&p==="onScroll"&&Fe("scroll",r)}switch(n){case"input":lr(r),Ss(r,a,!0);break;case"textarea":lr(r),Yt(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=Bl)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{p=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=sn(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=p.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=p.createElement(n,{is:r.is}):(e=p.createElement(n),n==="select"&&(p=e,r.multiple?p.multiple=!0:r.size&&(p.size=r.size))):e=p.createElementNS(e,n),e[cn]=t,e[Gs]=r,Yc(e,t,!1,!1),t.stateNode=e;e:{switch(p=ur(n,r),n){case"dialog":Fe("cancel",e),Fe("close",e),o=r;break;case"iframe":case"object":case"embed":Fe("load",e),o=r;break;case"video":case"audio":for(o=0;o<Hs.length;o++)Fe(Hs[o],e);o=r;break;case"source":Fe("error",e),o=r;break;case"img":case"image":case"link":Fe("error",e),Fe("load",e),o=r;break;case"details":Fe("toggle",e),o=r;break;case"input":br(e,r),o=Pe(e,r),Fe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=B({},r,{value:void 0}),Fe("invalid",e);break;case"textarea":Ts(e,r),o=$r(e,r),Fe("invalid",e);break;default:o=r}Ur(n,o),y=o;for(a in y)if(y.hasOwnProperty(a)){var w=y[a];a==="style"?_s(e,w):a==="dangerouslySetInnerHTML"?(w=w?w.__html:void 0,w!=null&&or(e,w)):a==="children"?typeof w=="string"?(n!=="textarea"||w!=="")&&vn(e,w):typeof w=="number"&&vn(e,""+w):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(c.hasOwnProperty(a)?w!=null&&a==="onScroll"&&Fe("scroll",e):w!=null&&ae(e,a,w,p))}switch(n){case"input":lr(e),Ss(e,r,!1);break;case"textarea":lr(e),Yt(e);break;case"option":r.value!=null&&e.setAttribute("value",""+je(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?rn(e,!!r.multiple,a,!1):r.defaultValue!=null&&rn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Bl)}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 gt(t),null;case 6:if(e&&t.stateNode!=null)Xc(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(i(166));if(n=Cr(Xs.current),Cr(dn.current),Yl(t)){if(r=t.stateNode,n=t.memoizedProps,r[cn]=t,(a=r.nodeValue!==n)&&(e=Mt,e!==null))switch(e.tag){case 3:Ul(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ul(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[cn]=t,t.stateNode=r}return gt(t),null;case 13:if(Ue(Qe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(He&&zt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)ec(),is(),t.flags|=98560,a=!1;else if(a=Yl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(i(317));a[cn]=t}else is(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;gt(t),a=!1}else Xt!==null&&(da(Xt),Xt=null),a=!0;if(!a)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||(Qe.current&1)!==0?st===0&&(st=3):ha())),t.updateQueue!==null&&(t.flags|=4),gt(t),null);case 4:return cs(),ea(e,t),e===null&&Ws(t.stateNode.containerInfo),gt(t),null;case 10:return jo(t.type._context),gt(t),null;case 17:return jt(t.type)&&Wl(),gt(t),null;case 19:if(Ue(Qe),a=t.memoizedState,a===null)return gt(t),null;if(r=(t.flags&128)!==0,p=a.rendering,p===null)if(r)nl(a,!1);else{if(st!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(p=ti(e),p!==null){for(t.flags|=128,nl(a,!1),r=p.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,p=a.alternate,p===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=p.childLanes,a.lanes=p.lanes,a.child=p.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=p.memoizedProps,a.memoizedState=p.memoizedState,a.updateQueue=p.updateQueue,a.type=p.type,e=p.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return be(Qe,Qe.current&1|2),t.child}e=e.sibling}a.tail!==null&&We()>hs&&(t.flags|=128,r=!0,nl(a,!1),t.lanes=4194304)}else{if(!r)if(e=ti(p),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),nl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!p.alternate&&!He)return gt(t),null}else 2*We()-a.renderingStartTime>hs&&n!==1073741824&&(t.flags|=128,r=!0,nl(a,!1),t.lanes=4194304);a.isBackwards?(p.sibling=t.child,t.child=p):(n=a.last,n!==null?n.sibling=p:t.child=p,a.last=p)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=We(),t.sibling=null,n=Qe.current,be(Qe,r?n&1|2:n&1),t):(gt(t),null);case 22:case 23:return pa(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Ot&1073741824)!==0&&(gt(t),t.subtreeFlags&6&&(t.flags|=8192)):gt(t),null;case 24:return null;case 25:return null}throw Error(i(156,t.tag))}function Wp(e,t){switch(So(t),t.tag){case 1:return jt(t.type)&&Wl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return cs(),Ue(Ct),Ue(ht),Mo(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Do(t),null;case 13:if(Ue(Qe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));is()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ue(Qe),null;case 4:return cs(),null;case 10:return jo(t.type._context),null;case 22:case 23:return pa(),null;case 24:return null;default:return null}}var ci=!1,vt=!1,Vp=typeof WeakSet=="function"?WeakSet:Set,K=null;function fs(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){qe(e,t,r)}else n.current=null}function ta(e,t,n){try{n()}catch(r){qe(e,t,r)}}var Zc=!1;function Gp(e,t){if(po=Ll,e=Lu(),so(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,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var p=0,y=-1,w=-1,R=0,P=0,M=e,D=null;t:for(;;){for(var V;M!==n||o!==0&&M.nodeType!==3||(y=p+o),M!==a||r!==0&&M.nodeType!==3||(w=p+r),M.nodeType===3&&(p+=M.nodeValue.length),(V=M.firstChild)!==null;)D=M,M=V;for(;;){if(M===e)break t;if(D===n&&++R===o&&(y=p),D===a&&++P===r&&(w=p),(V=M.nextSibling)!==null)break;M=D,D=M.parentNode}M=V}n=y===-1||w===-1?null:{start:y,end:w}}else n=null}n=n||{start:0,end:0}}else n=null;for(ho={focusedElem:e,selectionRange:n},Ll=!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 q=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(q!==null){var J=q.memoizedProps,et=q.memoizedState,E=t.stateNode,S=E.getSnapshotBeforeUpdate(t.elementType===t.type?J:Zt(t.type,J),et);E.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var j=t.stateNode.containerInfo;j.nodeType===1?j.textContent="":j.nodeType===9&&j.documentElement&&j.removeChild(j.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch($){qe(t,t.return,$)}if(e=t.sibling,e!==null){e.return=t.return,K=e;break}K=t.return}return q=Zc,Zc=!1,q}function rl(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 a=o.destroy;o.destroy=void 0,a!==void 0&&ta(t,n,a)}o=o.next}while(o!==r)}}function di(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 na(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 Jc(e){var t=e.alternate;t!==null&&(e.alternate=null,Jc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[cn],delete t[Gs],delete t[yo],delete t[jp],delete t[Rp])),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 ed(e){return e.tag===5||e.tag===3||e.tag===4}function td(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ed(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 ra(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=Bl));else if(r!==4&&(e=e.child,e!==null))for(ra(e,t,n),e=e.sibling;e!==null;)ra(e,t,n),e=e.sibling}function sa(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(sa(e,t,n),e=e.sibling;e!==null;)sa(e,t,n),e=e.sibling}var ct=null,Jt=!1;function qn(e,t,n){for(n=n.child;n!==null;)nd(e,t,n),n=n.sibling}function nd(e,t,n){if(Dt&&typeof Dt.onCommitFiberUnmount=="function")try{Dt.onCommitFiberUnmount(vr,n)}catch{}switch(n.tag){case 5:vt||fs(n,t);case 6:var r=ct,o=Jt;ct=null,qn(e,t,n),ct=r,Jt=o,ct!==null&&(Jt?(e=ct,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ct.removeChild(n.stateNode));break;case 18:ct!==null&&(Jt?(e=ct,n=n.stateNode,e.nodeType===8?vo(e.parentNode,n):e.nodeType===1&&vo(e,n),Ms(e)):vo(ct,n.stateNode));break;case 4:r=ct,o=Jt,ct=n.stateNode.containerInfo,Jt=!0,qn(e,t,n),ct=r,Jt=o;break;case 0:case 11:case 14:case 15:if(!vt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var a=o,p=a.destroy;a=a.tag,p!==void 0&&((a&2)!==0||(a&4)!==0)&&ta(n,t,p),o=o.next}while(o!==r)}qn(e,t,n);break;case 1:if(!vt&&(fs(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(y){qe(n,t,y)}qn(e,t,n);break;case 21:qn(e,t,n);break;case 22:n.mode&1?(vt=(r=vt)||n.memoizedState!==null,qn(e,t,n),vt=r):qn(e,t,n);break;default:qn(e,t,n)}}function rd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Vp),t.forEach(function(r){var o=th.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function en(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var a=e,p=t,y=p;e:for(;y!==null;){switch(y.tag){case 5:ct=y.stateNode,Jt=!1;break e;case 3:ct=y.stateNode.containerInfo,Jt=!0;break e;case 4:ct=y.stateNode.containerInfo,Jt=!0;break e}y=y.return}if(ct===null)throw Error(i(160));nd(a,p,o),ct=null,Jt=!1;var w=o.alternate;w!==null&&(w.return=null),o.return=null}catch(R){qe(o,t,R)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)sd(t,e),t=t.sibling}function sd(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(en(t,e),pn(e),r&4){try{rl(3,e,e.return),di(3,e)}catch(J){qe(e,e.return,J)}try{rl(5,e,e.return)}catch(J){qe(e,e.return,J)}}break;case 1:en(t,e),pn(e),r&512&&n!==null&&fs(n,n.return);break;case 5:if(en(t,e),pn(e),r&512&&n!==null&&fs(n,n.return),e.flags&32){var o=e.stateNode;try{vn(o,"")}catch(J){qe(e,e.return,J)}}if(r&4&&(o=e.stateNode,o!=null)){var a=e.memoizedProps,p=n!==null?n.memoizedProps:a,y=e.type,w=e.updateQueue;if(e.updateQueue=null,w!==null)try{y==="input"&&a.type==="radio"&&a.name!=null&&$e(o,a),ur(y,p);var R=ur(y,a);for(p=0;p<w.length;p+=2){var P=w[p],M=w[p+1];P==="style"?_s(o,M):P==="dangerouslySetInnerHTML"?or(o,M):P==="children"?vn(o,M):ae(o,P,M,R)}switch(y){case"input":mn(o,a);break;case"textarea":Kt(o,a);break;case"select":var D=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var V=a.value;V!=null?rn(o,!!a.multiple,V,!1):D!==!!a.multiple&&(a.defaultValue!=null?rn(o,!!a.multiple,a.defaultValue,!0):rn(o,!!a.multiple,a.multiple?[]:"",!1))}o[Gs]=a}catch(J){qe(e,e.return,J)}}break;case 6:if(en(t,e),pn(e),r&4){if(e.stateNode===null)throw Error(i(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(J){qe(e,e.return,J)}}break;case 3:if(en(t,e),pn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ms(t.containerInfo)}catch(J){qe(e,e.return,J)}break;case 4:en(t,e),pn(e);break;case 13:en(t,e),pn(e),o=e.child,o.flags&8192&&(a=o.memoizedState!==null,o.stateNode.isHidden=a,!a||o.alternate!==null&&o.alternate.memoizedState!==null||(oa=We())),r&4&&rd(e);break;case 22:if(P=n!==null&&n.memoizedState!==null,e.mode&1?(vt=(R=vt)||P,en(t,e),vt=R):en(t,e),pn(e),r&8192){if(R=e.memoizedState!==null,(e.stateNode.isHidden=R)&&!P&&(e.mode&1)!==0)for(K=e,P=e.child;P!==null;){for(M=K=P;K!==null;){switch(D=K,V=D.child,D.tag){case 0:case 11:case 14:case 15:rl(4,D,D.return);break;case 1:fs(D,D.return);var q=D.stateNode;if(typeof q.componentWillUnmount=="function"){r=D,n=D.return;try{t=r,q.props=t.memoizedProps,q.state=t.memoizedState,q.componentWillUnmount()}catch(J){qe(r,n,J)}}break;case 5:fs(D,D.return);break;case 22:if(D.memoizedState!==null){od(M);continue}}V!==null?(V.return=D,K=V):od(M)}P=P.sibling}e:for(P=null,M=e;;){if(M.tag===5){if(P===null){P=M;try{o=M.stateNode,R?(a=o.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(y=M.stateNode,w=M.memoizedProps.style,p=w!=null&&w.hasOwnProperty("display")?w.display:null,y.style.display=ar("display",p))}catch(J){qe(e,e.return,J)}}}else if(M.tag===6){if(P===null)try{M.stateNode.nodeValue=R?"":M.memoizedProps}catch(J){qe(e,e.return,J)}}else if((M.tag!==22&&M.tag!==23||M.memoizedState===null||M===e)&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===e)break e;for(;M.sibling===null;){if(M.return===null||M.return===e)break e;P===M&&(P=null),M=M.return}P===M&&(P=null),M.sibling.return=M.return,M=M.sibling}}break;case 19:en(t,e),pn(e),r&4&&rd(e);break;case 21:break;default:en(t,e),pn(e)}}function pn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(ed(n)){var r=n;break e}n=n.return}throw Error(i(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(vn(o,""),r.flags&=-33);var a=td(e);sa(e,a,o);break;case 3:case 4:var p=r.stateNode.containerInfo,y=td(e);ra(e,y,p);break;default:throw Error(i(161))}}catch(w){qe(e,e.return,w)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Qp(e,t,n){K=e,ld(e)}function ld(e,t,n){for(var r=(e.mode&1)!==0;K!==null;){var o=K,a=o.child;if(o.tag===22&&r){var p=o.memoizedState!==null||ci;if(!p){var y=o.alternate,w=y!==null&&y.memoizedState!==null||vt;y=ci;var R=vt;if(ci=p,(vt=w)&&!R)for(K=o;K!==null;)p=K,w=p.child,p.tag===22&&p.memoizedState!==null?ad(o):w!==null?(w.return=p,K=w):ad(o);for(;a!==null;)K=a,ld(a),a=a.sibling;K=o,ci=y,vt=R}id(e)}else(o.subtreeFlags&8772)!==0&&a!==null?(a.return=o,K=a):id(e)}}function id(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:vt||di(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!vt)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Zt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&oc(t,a,r);break;case 3:var p=t.updateQueue;if(p!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}oc(t,p,n)}break;case 5:var y=t.stateNode;if(n===null&&t.flags&4){n=y;var w=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":w.autoFocus&&n.focus();break;case"img":w.src&&(n.src=w.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 P=R.memoizedState;if(P!==null){var M=P.dehydrated;M!==null&&Ms(M)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}vt||t.flags&512&&na(t)}catch(D){qe(t,t.return,D)}}if(t===e){K=null;break}if(n=t.sibling,n!==null){n.return=t.return,K=n;break}K=t.return}}function od(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 ad(e){for(;K!==null;){var t=K;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{di(4,t)}catch(w){qe(t,n,w)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(w){qe(t,o,w)}}var a=t.return;try{na(t)}catch(w){qe(t,a,w)}break;case 5:var p=t.return;try{na(t)}catch(w){qe(t,p,w)}}}catch(w){qe(t,t.return,w)}if(t===e){K=null;break}var y=t.sibling;if(y!==null){y.return=t.return,K=y;break}K=t.return}}var Kp=Math.ceil,fi=W.ReactCurrentDispatcher,la=W.ReactCurrentOwner,Vt=W.ReactCurrentBatchConfig,Te=0,it=null,tt=null,dt=0,Ot=0,ps=Vn(0),st=0,sl=null,Rr=0,pi=0,ia=0,ll=null,Lt=null,oa=0,hs=1/0,In=null,hi=!1,aa=null,Xn=null,mi=!1,Zn=null,gi=0,il=0,ua=null,vi=-1,yi=0;function Tt(){return(Te&6)!==0?We():vi!==-1?vi:vi=We()}function Jn(e){return(e.mode&1)===0?1:(Te&2)!==0&&dt!==0?dt&-dt:Ip.transition!==null?(yi===0&&(yi=Is()),yi):(e=we,e!==0||(e=window.event,e=e===void 0?16:cu(e.type)),e)}function tn(e,t,n,r){if(50<il)throw il=0,ua=null,Error(i(185));wr(e,n,r),((Te&2)===0||e!==it)&&(e===it&&((Te&2)===0&&(pi|=n),st===4&&er(e,dt)),It(e,r),n===1&&Te===0&&(t.mode&1)===0&&(hs=We()+500,Gl&&Qn()))}function It(e,t){var n=e.callbackNode;Cl(e,t);var r=kr(e,e===it?dt:0);if(r===0)n!==null&&_l(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&_l(n),t===1)e.tag===0?Lp(cd.bind(null,e)):Yu(cd.bind(null,e)),Ep(function(){(Te&6)===0&&Qn()}),n=null;else{switch(b(r)){case 1:n=bn;break;case 4:n=un;break;case 16:n=Wr;break;case 536870912:n=Nl;break;default:n=Wr}n=yd(n,ud.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ud(e,t){if(vi=-1,yi=0,(Te&6)!==0)throw Error(i(327));var n=e.callbackNode;if(ms()&&e.callbackNode!==n)return null;var r=kr(e,e===it?dt:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=xi(e,r);else{t=r;var o=Te;Te|=2;var a=fd();(it!==e||dt!==t)&&(In=null,hs=We()+500,Ir(e,t));do try{Xp();break}catch(y){dd(e,y)}while(!0);Co(),fi.current=a,Te=o,tt!==null?t=0:(it=null,dt=0,t=st)}if(t!==0){if(t===2&&(o=Ls(e),o!==0&&(r=o,t=ca(e,o))),t===1)throw n=sl,Ir(e,0),er(e,r),It(e,We()),n;if(t===6)er(e,r);else{if(o=e.current.alternate,(r&30)===0&&!Yp(o)&&(t=xi(e,r),t===2&&(a=Ls(e),a!==0&&(r=a,t=ca(e,a))),t===1))throw n=sl,Ir(e,0),er(e,r),It(e,We()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(i(345));case 2:Ar(e,Lt,In);break;case 3:if(er(e,r),(r&130023424)===r&&(t=oa+500-We(),10<t)){if(kr(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Tt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=go(Ar.bind(null,e,Lt,In),t);break}Ar(e,Lt,In);break;case 4:if(er(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var p=31-kt(r);a=1<<p,p=t[p],p>o&&(o=p),r&=~a}if(r=o,r=We()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Kp(r/1960))-r,10<r){e.timeoutHandle=go(Ar.bind(null,e,Lt,In),r);break}Ar(e,Lt,In);break;case 5:Ar(e,Lt,In);break;default:throw Error(i(329))}}}return It(e,We()),e.callbackNode===n?ud.bind(null,e):null}function ca(e,t){var n=ll;return e.current.memoizedState.isDehydrated&&(Ir(e,t).flags|=256),e=xi(e,t),e!==2&&(t=Lt,Lt=n,t!==null&&da(t)),e}function da(e){Lt===null?Lt=e:Lt.push.apply(Lt,e)}function Yp(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],a=o.getSnapshot;o=o.value;try{if(!qt(a(),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 er(e,t){for(t&=~ia,t&=~pi,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-kt(t),r=1<<n;e[n]=-1,t&=~r}}function cd(e){if((Te&6)!==0)throw Error(i(327));ms();var t=kr(e,0);if((t&1)===0)return It(e,We()),null;var n=xi(e,t);if(e.tag!==0&&n===2){var r=Ls(e);r!==0&&(t=r,n=ca(e,r))}if(n===1)throw n=sl,Ir(e,0),er(e,t),It(e,We()),n;if(n===6)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ar(e,Lt,In),It(e,We()),null}function fa(e,t){var n=Te;Te|=1;try{return e(t)}finally{Te=n,Te===0&&(hs=We()+500,Gl&&Qn())}}function Lr(e){Zn!==null&&Zn.tag===0&&(Te&6)===0&&ms();var t=Te;Te|=1;var n=Vt.transition,r=we;try{if(Vt.transition=null,we=1,e)return e()}finally{we=r,Vt.transition=n,Te=t,(Te&6)===0&&Qn()}}function pa(){Ot=ps.current,Ue(ps)}function Ir(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Np(n)),tt!==null)for(n=tt.return;n!==null;){var r=n;switch(So(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Wl();break;case 3:cs(),Ue(Ct),Ue(ht),Mo();break;case 5:Do(r);break;case 4:cs();break;case 13:Ue(Qe);break;case 19:Ue(Qe);break;case 10:jo(r.type._context);break;case 22:case 23:pa()}n=n.return}if(it=e,tt=e=tr(e.current,null),dt=Ot=t,st=0,sl=null,ia=pi=Rr=0,Lt=ll=null,Er!==null){for(t=0;t<Er.length;t++)if(n=Er[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,a=n.pending;if(a!==null){var p=a.next;a.next=o,r.next=p}n.pending=r}Er=null}return e}function dd(e,t){do{var n=tt;try{if(Co(),ni.current=ii,ri){for(var r=Ke.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}ri=!1}if(jr=0,lt=rt=Ke=null,Zs=!1,Js=0,la.current=null,n===null||n.return===null){st=1,sl=t,tt=null;break}e:{var a=e,p=n.return,y=n,w=t;if(t=dt,y.flags|=32768,w!==null&&typeof w=="object"&&typeof w.then=="function"){var R=w,P=y,M=P.tag;if((P.mode&1)===0&&(M===0||M===11||M===15)){var D=P.alternate;D?(P.updateQueue=D.updateQueue,P.memoizedState=D.memoizedState,P.lanes=D.lanes):(P.updateQueue=null,P.memoizedState=null)}var V=zc(p);if(V!==null){V.flags&=-257,Oc(V,p,y,a,t),V.mode&1&&Mc(a,R,t),t=V,w=R;var q=t.updateQueue;if(q===null){var J=new Set;J.add(w),t.updateQueue=J}else q.add(w);break e}else{if((t&1)===0){Mc(a,R,t),ha();break e}w=Error(i(426))}}else if(He&&y.mode&1){var et=zc(p);if(et!==null){(et.flags&65536)===0&&(et.flags|=256),Oc(et,p,y,a,t),No(ds(w,y));break e}}a=w=ds(w,y),st!==4&&(st=2),ll===null?ll=[a]:ll.push(a),a=p;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var E=Dc(a,w,t);ic(a,E);break e;case 1:y=w;var S=a.type,j=a.stateNode;if((a.flags&128)===0&&(typeof S.getDerivedStateFromError=="function"||j!==null&&typeof j.componentDidCatch=="function"&&(Xn===null||!Xn.has(j)))){a.flags|=65536,t&=-t,a.lanes|=t;var $=Pc(a,y,t);ic(a,$);break e}}a=a.return}while(a!==null)}hd(n)}catch(te){t=te,tt===n&&n!==null&&(tt=n=n.return);continue}break}while(!0)}function fd(){var e=fi.current;return fi.current=ii,e===null?ii:e}function ha(){(st===0||st===3||st===2)&&(st=4),it===null||(Rr&268435455)===0&&(pi&268435455)===0||er(it,dt)}function xi(e,t){var n=Te;Te|=2;var r=fd();(it!==e||dt!==t)&&(In=null,Ir(e,t));do try{qp();break}catch(o){dd(e,o)}while(!0);if(Co(),Te=n,fi.current=r,tt!==null)throw Error(i(261));return it=null,dt=0,st}function qp(){for(;tt!==null;)pd(tt)}function Xp(){for(;tt!==null&&!Vi();)pd(tt)}function pd(e){var t=vd(e.alternate,e,Ot);e.memoizedProps=e.pendingProps,t===null?hd(e):tt=t,la.current=null}function hd(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=Hp(n,t,Ot),n!==null){tt=n;return}}else{if(n=Wp(n,t),n!==null){n.flags&=32767,tt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{st=6,tt=null;return}}if(t=t.sibling,t!==null){tt=t;return}tt=t=e}while(t!==null);st===0&&(st=5)}function Ar(e,t,n){var r=we,o=Vt.transition;try{Vt.transition=null,we=1,Zp(e,t,n,r)}finally{Vt.transition=o,we=r}return null}function Zp(e,t,n,r){do ms();while(Zn!==null);if((Te&6)!==0)throw Error(i(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(i(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(jl(e,a),e===it&&(tt=it=null,dt=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||mi||(mi=!0,yd(Wr,function(){return ms(),null})),a=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||a){a=Vt.transition,Vt.transition=null;var p=we;we=1;var y=Te;Te|=4,la.current=null,Gp(e,n),sd(n,e),yp(ho),Ll=!!po,ho=po=null,e.current=n,Qp(n),Gi(),Te=y,we=p,Vt.transition=a}else e.current=n;if(mi&&(mi=!1,Zn=e,gi=o),a=e.pendingLanes,a===0&&(Xn=null),Vr(n.stateNode),It(e,We()),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(hi)throw hi=!1,e=aa,aa=null,e;return(gi&1)!==0&&e.tag!==0&&ms(),a=e.pendingLanes,(a&1)!==0?e===ua?il++:(il=0,ua=e):il=0,Qn(),null}function ms(){if(Zn!==null){var e=b(gi),t=Vt.transition,n=we;try{if(Vt.transition=null,we=16>e?16:e,Zn===null)var r=!1;else{if(e=Zn,Zn=null,gi=0,(Te&6)!==0)throw Error(i(331));var o=Te;for(Te|=4,K=e.current;K!==null;){var a=K,p=a.child;if((K.flags&16)!==0){var y=a.deletions;if(y!==null){for(var w=0;w<y.length;w++){var R=y[w];for(K=R;K!==null;){var P=K;switch(P.tag){case 0:case 11:case 15:rl(8,P,a)}var M=P.child;if(M!==null)M.return=P,K=M;else for(;K!==null;){P=K;var D=P.sibling,V=P.return;if(Jc(P),P===R){K=null;break}if(D!==null){D.return=V,K=D;break}K=V}}}var q=a.alternate;if(q!==null){var J=q.child;if(J!==null){q.child=null;do{var et=J.sibling;J.sibling=null,J=et}while(J!==null)}}K=a}}if((a.subtreeFlags&2064)!==0&&p!==null)p.return=a,K=p;else e:for(;K!==null;){if(a=K,(a.flags&2048)!==0)switch(a.tag){case 0:case 11:case 15:rl(9,a,a.return)}var E=a.sibling;if(E!==null){E.return=a.return,K=E;break e}K=a.return}}var S=e.current;for(K=S;K!==null;){p=K;var j=p.child;if((p.subtreeFlags&2064)!==0&&j!==null)j.return=p,K=j;else e:for(p=S;K!==null;){if(y=K,(y.flags&2048)!==0)try{switch(y.tag){case 0:case 11:case 15:di(9,y)}}catch(te){qe(y,y.return,te)}if(y===p){K=null;break e}var $=y.sibling;if($!==null){$.return=y.return,K=$;break e}K=y.return}}if(Te=o,Qn(),Dt&&typeof Dt.onPostCommitFiberRoot=="function")try{Dt.onPostCommitFiberRoot(vr,e)}catch{}r=!0}return r}finally{we=n,Vt.transition=t}}return!1}function md(e,t,n){t=ds(n,t),t=Dc(e,t,1),e=Yn(e,t,1),t=Tt(),e!==null&&(wr(e,1,t),It(e,t))}function qe(e,t,n){if(e.tag===3)md(e,e,n);else for(;t!==null;){if(t.tag===3){md(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Xn===null||!Xn.has(r))){e=ds(n,e),e=Pc(t,e,1),t=Yn(t,e,1),e=Tt(),t!==null&&(wr(t,1,e),It(t,e));break}}t=t.return}}function Jp(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Tt(),e.pingedLanes|=e.suspendedLanes&n,it===e&&(dt&n)===n&&(st===4||st===3&&(dt&130023424)===dt&&500>We()-oa?Ir(e,0):ia|=n),It(e,t)}function gd(e,t){t===0&&((e.mode&1)===0?t=1:(t=Qr,Qr<<=1,(Qr&130023424)===0&&(Qr=4194304)));var n=Tt();e=jn(e,t),e!==null&&(wr(e,t,n),It(e,n))}function eh(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gd(e,n)}function th(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(i(314))}r!==null&&r.delete(t),gd(e,n)}var vd;vd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ct.current)Rt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Rt=!1,Bp(e,t,n);Rt=(e.flags&131072)!==0}else Rt=!1,He&&(t.flags&1048576)!==0&&qu(t,Kl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ui(e,t),e=t.pendingProps;var o=rs(t,ht.current);us(t,n),o=bo(null,t,r,e,o,n);var a=$o();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,jt(r)?(a=!0,Vl(t)):a=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Io(t),o.updater=oi,t.stateNode=o,o._reactInternals=t,Vo(t,r,e,n),t=Yo(null,t,r,!0,a,n)):(t.tag=0,He&&a&&wo(t),St(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ui(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=rh(r),e=Zt(r,e),o){case 0:t=Ko(null,t,r,e,n);break e;case 1:t=Hc(null,t,r,e,n);break e;case 11:t=bc(null,t,r,e,n);break e;case 14:t=$c(null,t,r,Zt(r.type,e),n);break e}throw Error(i(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zt(r,o),Ko(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zt(r,o),Hc(e,t,r,o,n);case 3:e:{if(Wc(t),e===null)throw Error(i(387));r=t.pendingProps,a=t.memoizedState,o=a.element,lc(e,t),ei(t,r,null,n);var p=t.memoizedState;if(r=p.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:p.cache,pendingSuspenseBoundaries:p.pendingSuspenseBoundaries,transitions:p.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){o=ds(Error(i(423)),t),t=Vc(e,t,r,n,o);break e}else if(r!==o){o=ds(Error(i(424)),t),t=Vc(e,t,r,n,o);break e}else for(zt=Wn(t.stateNode.containerInfo.firstChild),Mt=t,He=!0,Xt=null,n=rc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(is(),r===o){t=Ln(e,t,n);break e}St(e,t,r,n)}t=t.child}return t;case 5:return ac(t),e===null&&_o(t),r=t.type,o=t.pendingProps,a=e!==null?e.memoizedProps:null,p=o.children,mo(r,o)?p=null:a!==null&&mo(r,a)&&(t.flags|=32),Bc(e,t),St(e,t,p,n),t.child;case 6:return e===null&&_o(t),null;case 13:return Gc(e,t,n);case 4:return Ao(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=os(t,null,r,n):St(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zt(r,o),bc(e,t,r,o,n);case 7:return St(e,t,t.pendingProps,n),t.child;case 8:return St(e,t,t.pendingProps.children,n),t.child;case 12:return St(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,a=t.memoizedProps,p=o.value,be(Xl,r._currentValue),r._currentValue=p,a!==null)if(qt(a.value,p)){if(a.children===o.children&&!Ct.current){t=Ln(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var y=a.dependencies;if(y!==null){p=a.child;for(var w=y.firstContext;w!==null;){if(w.context===r){if(a.tag===1){w=Rn(-1,n&-n),w.tag=2;var R=a.updateQueue;if(R!==null){R=R.shared;var P=R.pending;P===null?w.next=w:(w.next=P.next,P.next=w),R.pending=w}}a.lanes|=n,w=a.alternate,w!==null&&(w.lanes|=n),Ro(a.return,n,t),y.lanes|=n;break}w=w.next}}else if(a.tag===10)p=a.type===t.type?null:a.child;else if(a.tag===18){if(p=a.return,p===null)throw Error(i(341));p.lanes|=n,y=p.alternate,y!==null&&(y.lanes|=n),Ro(p,n,t),p=a.sibling}else p=a.child;if(p!==null)p.return=a;else for(p=a;p!==null;){if(p===t){p=null;break}if(a=p.sibling,a!==null){a.return=p.return,p=a;break}p=p.return}a=p}St(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,us(t,n),o=Ht(o),r=r(o),t.flags|=1,St(e,t,r,n),t.child;case 14:return r=t.type,o=Zt(r,t.pendingProps),o=Zt(r.type,o),$c(e,t,r,o,n);case 15:return Fc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zt(r,o),ui(e,t),t.tag=1,jt(r)?(e=!0,Vl(t)):e=!1,us(t,n),Ic(t,r,o),Vo(t,r,o,n),Yo(null,t,r,!0,e,n);case 19:return Kc(e,t,n);case 22:return Uc(e,t,n)}throw Error(i(156,t.tag))};function yd(e,t){return Rs(e,t)}function nh(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 Gt(e,t,n,r){return new nh(e,t,n,r)}function ma(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rh(e){if(typeof e=="function")return ma(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ze)return 11;if(e===F)return 14}return 2}function tr(e,t){var n=e.alternate;return n===null?(n=Gt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ki(e,t,n,r,o,a){var p=2;if(r=e,typeof e=="function")ma(e)&&(p=1);else if(typeof e=="string")p=5;else e:switch(e){case ue:return Dr(n.children,o,a,t);case Ce:p=8,o|=8;break;case Xe:return e=Gt(12,n,t,o|2),e.elementType=Xe,e.lanes=a,e;case Ae:return e=Gt(13,n,t,o),e.elementType=Ae,e.lanes=a,e;case ie:return e=Gt(19,n,t,o),e.elementType=ie,e.lanes=a,e;case fe:return wi(n,o,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ye:p=10;break e;case Be:p=9;break e;case Ze:p=11;break e;case F:p=14;break e;case re:p=16,r=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return t=Gt(p,n,t,o),t.elementType=e,t.type=r,t.lanes=a,t}function Dr(e,t,n,r){return e=Gt(7,e,r,t),e.lanes=n,e}function wi(e,t,n,r){return e=Gt(22,e,r,t),e.elementType=fe,e.lanes=n,e.stateNode={isHidden:!1},e}function ga(e,t,n){return e=Gt(6,e,null,t),e.lanes=n,e}function va(e,t,n){return t=Gt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function sh(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=As(0),this.expirationTimes=As(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=As(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function ya(e,t,n,r,o,a,p,y,w){return e=new sh(e,t,n,y,w),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Gt(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Io(a),e}function lh(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:he,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function xd(e){if(!e)return Gn;e=e._reactInternals;e:{if(Re(e)!==e||e.tag!==1)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(jt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(i(171))}if(e.tag===1){var n=e.type;if(jt(n))return Qu(e,n,t)}return t}function kd(e,t,n,r,o,a,p,y,w){return e=ya(n,r,!0,e,o,a,p,y,w),e.context=xd(null),n=e.current,r=Tt(),o=Jn(n),a=Rn(r,o),a.callback=t??null,Yn(n,a,o),e.current.lanes=o,wr(e,o,r),It(e,r),e}function Si(e,t,n,r){var o=t.current,a=Tt(),p=Jn(o);return n=xd(n),t.context===null?t.context=n:t.pendingContext=n,t=Rn(a,p),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Yn(o,t,p),e!==null&&(tn(e,o,p,a),Jl(e,o,p)),p}function Ti(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 wd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function xa(e,t){wd(e,t),(e=e.alternate)&&wd(e,t)}function ih(){return null}var Sd=typeof reportError=="function"?reportError:function(e){console.error(e)};function ka(e){this._internalRoot=e}_i.prototype.render=ka.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));Si(e,t,null,null)},_i.prototype.unmount=ka.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Lr(function(){Si(null,e,null,null)}),t[_n]=null}};function _i(e){this._internalRoot=e}_i.prototype.unstable_scheduleHydration=function(e){if(e){var t=Z();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Un.length&&t!==0&&t<Un[n].priority;n++);Un.splice(n,0,e),n===0&&au(e)}};function wa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ni(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Td(){}function oh(e,t,n,r,o){if(o){if(typeof r=="function"){var a=r;r=function(){var R=Ti(p);a.call(R)}}var p=kd(t,r,e,0,null,!1,!1,"",Td);return e._reactRootContainer=p,e[_n]=p.current,Ws(e.nodeType===8?e.parentNode:e),Lr(),p}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var y=r;r=function(){var R=Ti(w);y.call(R)}}var w=ya(e,0,!1,null,null,!1,!1,"",Td);return e._reactRootContainer=w,e[_n]=w.current,Ws(e.nodeType===8?e.parentNode:e),Lr(function(){Si(t,w,n,r)}),w}function Ei(e,t,n,r,o){var a=n._reactRootContainer;if(a){var p=a;if(typeof o=="function"){var y=o;o=function(){var w=Ti(p);y.call(w)}}Si(t,p,e,o)}else p=oh(n,t,e,o,r);return Ti(p)}m=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=xr(t.pendingLanes);n!==0&&(Fn(t,n|1),It(t,We()),(Te&6)===0&&(hs=We()+500,Qn()))}break;case 13:Lr(function(){var r=jn(e,1);if(r!==null){var o=Tt();tn(r,e,1,o)}}),xa(e,1)}},N=function(e){if(e.tag===13){var t=jn(e,134217728);if(t!==null){var n=Tt();tn(t,e,134217728,n)}xa(e,134217728)}},A=function(e){if(e.tag===13){var t=Jn(e),n=jn(e,t);if(n!==null){var r=Tt();tn(n,e,t,r)}xa(e,t)}},Z=function(){return we},ne=function(e,t){var n=we;try{return we=e,t()}finally{we=n}},Nt=function(e,t,n){switch(t){case"input":if(mn(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=Hl(r);if(!o)throw Error(i(90));ze(r),mn(r,o)}}}break;case"textarea":Kt(e,n);break;case"select":t=n.value,t!=null&&rn(e,!!n.multiple,t,!1)}},cr=fa,dr=Lr;var ah={usingClientEntryPoint:!1,Events:[Qs,ts,Hl,Br,Es,fa]},ol={findFiberByHostInstance:Sr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},uh={bundleType:ol.bundleType,version:ol.version,rendererPackageName:ol.rendererPackageName,rendererConfig:ol.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:W.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Hr(e),e===null?null:e.stateNode},findFiberByHostInstance:ol.findFiberByHostInstance||ih,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 Ci=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ci.isDisabled&&Ci.supportsFiber)try{vr=Ci.inject(uh),Dt=Ci}catch{}}return At.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ah,At.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wa(t))throw Error(i(200));return lh(e,t,null,n)},At.createRoot=function(e,t){if(!wa(e))throw Error(i(299));var n=!1,r="",o=Sd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=ya(e,1,!1,null,null,n,!1,r,o),e[_n]=t.current,Ws(e.nodeType===8?e.parentNode:e),new ka(t)},At.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(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=Hr(t),e=e===null?null:e.stateNode,e},At.flushSync=function(e){return Lr(e)},At.hydrate=function(e,t,n){if(!Ni(t))throw Error(i(200));return Ei(null,e,t,!0,n)},At.hydrateRoot=function(e,t,n){if(!wa(e))throw Error(i(405));var r=n!=null&&n.hydratedSources||null,o=!1,a="",p=Sd;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(p=n.onRecoverableError)),t=kd(t,null,e,1,n??null,o,!1,a,p),e[_n]=t.current,Ws(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 _i(t)},At.render=function(e,t,n){if(!Ni(t))throw Error(i(200));return Ei(null,e,t,!1,n)},At.unmountComponentAtNode=function(e){if(!Ni(e))throw Error(i(40));return e._reactRootContainer?(Lr(function(){Ei(null,null,e,!1,function(){e._reactRootContainer=null,e[_n]=null})}),!0):!1},At.unstable_batchedUpdates=fa,At.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ni(n))throw Error(i(200));if(e==null||e._reactInternals===void 0)throw Error(i(38));return Ei(e,t,n,!1,r)},At.version="18.3.1-next-f1338f8080-20240426",At}var Id;function xh(){if(Id)return _a.exports;Id=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(s){console.error(s)}}return l(),_a.exports=yh(),_a.exports}var Ad;function kh(){if(Ad)return ji;Ad=1;var l=xh();return ji.createRoot=l.createRoot,ji.hydrateRoot=l.hydrateRoot,ji}var wh=kh();const Sh=uf(wh),Dd=l=>{let s;const i=new Set,u=(g,x)=>{const C=typeof g=="function"?g(s):g;if(!Object.is(C,s)){const _=s;s=x??(typeof C!="object"||C===null)?C:Object.assign({},s,C),i.forEach(I=>I(s,_))}},c=()=>s,v={setState:u,getState:c,getInitialState:()=>k,subscribe:g=>(i.add(g),()=>i.delete(g))},k=s=l(u,c,v);return v},Th=(l=>l?Dd(l):Dd),_h=l=>l;function Nh(l,s=_h){const i=pl.useSyncExternalStore(l.subscribe,pl.useCallback(()=>s(l.getState()),[l,s]),pl.useCallback(()=>s(l.getInitialState()),[l,s]));return pl.useDebugValue(i),i}const Eh=l=>{const s=Th(l),i=u=>Nh(s,u);return Object.assign(i,s),i},Ch=(l=>Eh),jh="/api";async function Oi(l,s,i){const u=await fetch(`${jh}${s}`,{method:l,headers:i?{"Content-Type":"application/json"}:void 0,body:i?JSON.stringify(i):void 0});if(!u.ok)throw new Error(`${l} ${s} failed: ${u.status} ${u.statusText}`);return u.json()}function ks(l){return Oi("GET",l)}function zr(l,s){return Oi("POST",l,s)}function Rh(l){return Oi("DELETE",l)}function ws(l,s){return Oi("PATCH",l,s)}function Lh(){return ks("/sessions")}function Ca(l){return ks(`/sessions/${l}`)}function cf(l){return zr("/sessions",l)}function Ih(l){return Rh(`/sessions/${l}`)}function Ah(l,s){return zr(`/sessions/${l}/turns`,{user_prompt:s})}function Dh(l){return zr(`/sessions/${l}/cancel`)}function Ph(l,s){return ws(`/sessions/${l}`,{title:s})}function Mh(l){return ws(`/sessions/${l}`,{lifecycle:"finished"})}function zh(l){return ws(`/sessions/${l}`,{lifecycle:"working"})}function Pd(l){return ws(`/sessions/${l}`,{has_unreviewed:0})}function Oh(l,s,i,u){const c={model:s,model_reasoning_effort:i};return u!==void 0&&(c.runtime_type=u),ws(`/sessions/${l}`,c)}function bh(l,s){return ws(`/sessions/${l}`,{runtime_config:s})}function $h(l,s){return zr(`/sessions/${l}/rewind`,{turn_id:s})}function Fh(l,s,i){return zr(`/sessions/${l}/branch`,{turn_id:s,title:i})}function df(){return ks("/workspaces")}function Uh(l,s){return zr("/workspaces",{path:l,label:s})}function Bh(l){return zr("/workspaces/hide",{path:l})}async function Hh(){const l=await fetch("/api/pick-directory");if(l.status===204)return{cancelled:!0};if(!l.ok)throw new Error(`GET /api/pick-directory failed: ${l.status} ${l.statusText}`);return l.json()}const Wh=(l,s)=>({sessions:[],sessionDetails:{},activeSessionId:null,openTabs:[],activeTurnIndex:0,submittingPrompt:null,restoredPrompt:null,init:async()=>{try{const i=localStorage.getItem("agentpane:last-model-config");i&&l({lastModelConfig:JSON.parse(i)})}catch{}l({loading:!0,error:null});try{const[i,u]=await Promise.all([Lh(),df()]);l({sessions:i,workspaces:u,loading:!1}),i.length>0&&!s().activeSessionId&&await s().selectSession(i[0].id)}catch(i){l({loading:!1,error:i.message})}},selectSession:async i=>{if(s().sessionDetails[i]){const u=s().sessionDetails[i];l({activeSessionId:i,activeTurnIndex:u.turns.length>0?u.turns.length-1:0,activeRightTab:"turns",openTabs:s().openTabs.includes(i)?s().openTabs:[...s().openTabs,i]}),u.has_unreviewed===1&&(Pd(i).catch(()=>{}),l(c=>({sessions:c.sessions.map(f=>f.id===i?{...f,has_unreviewed:0}:f),sessionDetails:{...c.sessionDetails,[i]:{...u,has_unreviewed:0}}})));return}l({loading:!0,error:null});try{const u=await Ca(i);l(c=>({sessionDetails:{...c.sessionDetails,[i]:u},activeSessionId:i,activeTurnIndex:u.turns.length>0?u.turns.length-1:0,activeRightTab:"turns",loading:!1})),u.has_unreviewed===1&&(Pd(i).catch(()=>{}),l(c=>({sessions:c.sessions.map(f=>f.id===i?{...f,has_unreviewed:0}:f),sessionDetails:{...c.sessionDetails,[i]:{...u,has_unreviewed:0}}})))}catch(u){l({loading:!1,error:u.message})}},closeTab:i=>{l(u=>{const c=u.openTabs.filter(f=>f!==i);if(u.activeSessionId===i&&c.length>0){const f=c[c.length-1],h=u.sessionDetails[f];return{openTabs:c,activeSessionId:f,activeTurnIndex:h&&h.turns.length>0?h.turns.length-1:0}}return{openTabs:c,activeSessionId:u.activeSessionId===i?null:u.activeSessionId}})},updateModelConfig:async(i,u,c)=>{const f=s().activeSessionId;if(f){l({error:null});try{const h=await Oh(f,i,u,c),v={provider:h.runtime_type,model:h.model??"",reasoning:h.model_reasoning_effort??""};l({lastModelConfig:v}),localStorage.setItem("agentpane:last-model-config",JSON.stringify(v)),l(k=>({sessions:k.sessions.map(g=>g.id===f?h:g),sessionDetails:k.sessionDetails[f]?{...k.sessionDetails,[f]:{...k.sessionDetails[f],model:h.model,model_reasoning_effort:h.model_reasoning_effort,external_thread_id:h.external_thread_id}}:k.sessionDetails})),await s().refreshActiveSession()}catch(h){l({error:h.message}),s().addToast("error",`Failed to update model — ${h.message}`)}}},createSession:async i=>{l({error:null});try{const u=await cf(i);l(f=>({sessions:[u,...f.sessions],showNewSessionDialog:!1}));const c={provider:u.runtime_type,model:u.model??"",reasoning:u.model_reasoning_effort??""};l({lastModelConfig:c}),localStorage.setItem("agentpane:last-model-config",JSON.stringify(c)),await s().selectSession(u.id),s().addLogEntry("INFO",`Session created — ${u.id.slice(0,8)}`),s().addToast("success",`Session created — ${u.title||u.id.slice(0,8)}`)}catch(u){l({error:u.message}),s().addToast("error",`Failed to create session — ${u.message}`)}},deleteSession:async i=>{var c;l({error:null});const u=(c=s().sessions.find(f=>f.id===i))==null?void 0:c.title;try{await Ih(i),l(f=>{const h={...f.sessionDetails};delete h[i];const v=f.openTabs.filter(x=>x!==i);let k=f.activeSessionId,g=f.activeTurnIndex;if(f.activeSessionId===i){k=v.length>0?v[v.length-1]:null;const x=k?h[k]:null;g=x&&x.turns.length>0?x.turns.length-1:0}return{sessions:f.sessions.filter(x=>x.id!==i),sessionDetails:h,openTabs:v,activeSessionId:k,activeTurnIndex:g}}),s().addLogEntry("INFO",`Session deleted — ${i.slice(0,8)}`),s().addToast("info",`Session "${u||i.slice(0,8)}" deleted`)}catch(f){l({error:f.message}),s().addToast("error",`Failed to delete session — ${f.message}`)}},renameSession:async(i,u)=>{l({error:null});try{const c=await Ph(i,u.trim());l(f=>({sessions:f.sessions.map(h=>h.id===i?c:h),sessionDetails:f.sessionDetails[i]?{...f.sessionDetails,[i]:{...f.sessionDetails[i],title:c.title}}:f.sessionDetails}))}catch(c){l({error:c.message}),s().addToast("error",`Failed to rename session — ${c.message}`)}},markFinished:async i=>{l({error:null});try{const u=await Mh(i);l(c=>({sessions:c.sessions.map(f=>f.id===i?u:f)})),s().addToast("info","Session marked as finished")}catch(u){l({error:u.message}),s().addToast("error",`Failed to mark as finished — ${u.message}`)}},reopenSession:async i=>{l({error:null});try{const u=await zh(i);l(c=>({sessions:c.sessions.map(f=>f.id===i?u:f)})),s().addToast("info","Session reopened")}catch(u){l({error:u.message}),s().addToast("error",`Failed to reopen session — ${u.message}`)}},submitPrompt:async i=>{const u=s().activeSessionId;if(u){l({error:null,submittingPrompt:i}),l(c=>{const f=c.sessionDetails[u];return f?{sessionDetails:{...c.sessionDetails,[u]:{...f,is_running:1,status:"running"}},sessions:c.sessions.map(h=>h.id===u?{...h,is_running:1,status:"running"}:h)}:{}});try{const c=await Ah(u,i);s().addLogEntry("INFO",`Turn submitted — "${i.slice(0,40)}"`),l(f=>{const h=f.sessionDetails[u];if(!h)return{submittingPrompt:null};const v={...c,items:[]};return{submittingPrompt:null,sessionDetails:{...f.sessionDetails,[u]:{...h,turns:[...h.turns,v]}},activeTurnIndex:h.turns.length}})}catch(c){l({submittingPrompt:null,error:c.message}),s().addLogEntry("ERROR",`Turn failed — ${c.message}`),s().addToast("error",`Failed to send prompt — ${c.message}`),l(f=>({sessionDetails:f.sessionDetails[u]?{...f.sessionDetails,[u]:{...f.sessionDetails[u],is_running:0,status:"active"}}:f.sessionDetails,sessions:f.sessions.map(h=>h.id===u?{...h,is_running:0,status:"active"}:h)}))}}},cancelTurn:async()=>{const i=s().activeSessionId;if(i)try{await Dh(i)}catch(u){l({error:u.message})}},rewindToTurn:async(i,u)=>{l({error:null});try{await $h(i,u);const c=await Ca(i);l(f=>({sessionDetails:{...f.sessionDetails,[i]:c},sessions:f.sessions.map(h=>h.id===i?{...h,external_thread_id:null,is_running:0,status:"active"}:h),activeTurnIndex:c.turns.length>0?c.turns.length-1:0})),s().addToast("info","Rewound to selected turn")}catch(c){l({error:c.message}),s().addToast("error",`Failed to rewind — ${c.message}`)}},branchFromTurn:async(i,u,c)=>{l({error:null});try{const f=await Fh(i,u,c);l(h=>({sessions:[f,...h.sessions]})),await s().selectSession(f.id),s().addToast("success","Branched from selected turn")}catch(f){l({error:f.message}),s().addToast("error",`Failed to branch — ${f.message}`)}},updateRuntimeConfig:async i=>{const u=s().activeSessionId;if(u){l({error:null});try{const c=await bh(u,JSON.stringify(i));l(f=>({sessions:f.sessions.map(h=>h.id===u?c:h),sessionDetails:f.sessionDetails[u]?{...f.sessionDetails,[u]:{...f.sessionDetails[u],runtime_config:c.runtime_config}}:f.sessionDetails}))}catch(c){l({error:c.message}),s().addToast("error",`Failed to update config — ${c.message}`)}}},refreshActiveSession:async()=>{const i=s().activeSessionId;if(i)try{const u=await Ca(i);l(c=>({sessionDetails:{...c.sessionDetails,[i]:u},activeTurnIndex:u.turns.length>0?Math.min(c.activeTurnIndex,u.turns.length-1):0,sessions:c.sessions.map(f=>f.id===i?{...f,is_running:u.is_running,status:u.status}:f)}))}catch(u){l({error:u.message})}}}),Vh=(l,s)=>({workspaces:[],addWorkspace:async i=>{l({error:null});try{const u=await Uh(i.trim());l(c=>({workspaces:[...c.workspaces,u]})),s().addToast("success",`Workspace added — ${u.path}`)}catch(u){s().addToast("error",`Failed to add workspace — ${u.message}`)}},removeWorkspace:async i=>{l({error:null});try{await Bh(i);const u=await df();l({workspaces:u}),s().addToast("info","Workspace hidden")}catch(u){s().addToast("error",`Failed to hide workspace — ${u.message}`)}},createSessionInWorkspace:async i=>{l({error:null});try{const u=s().lastModelConfig,c=await cf({cwd:i,runtime_type:(u==null?void 0:u.provider)??"codex",model:u==null?void 0:u.model,model_reasoning_effort:u==null?void 0:u.reasoning});l(f=>({sessions:[c,...f.sessions]})),await s().selectSession(c.id),s().addLogEntry("INFO",`Session created in ${i} — ${c.id.slice(0,8)}`),s().addToast("success",`Session created in ${i.split("/").pop()||i}`)}catch(u){l({error:u.message}),s().addToast("error",`Failed to create session — ${u.message}`)}},pickAndAddWorkspace:async()=>{try{const i=await Hh();if(i.cancelled||!i.path)return;await s().addWorkspace(i.path)}catch(i){s().addToast("error",`Failed to pick directory — ${i.message}`)}}}),Gh=(l,s)=>({wsConnected:!1,setWsConnected:i=>l({wsConnected:i}),onTurnStarted:(i,u)=>{s().addLogEntry("DEBUG",`turn:started — ${u.slice(0,8)}`),l(c=>{const f=c.sessionDetails[i];return f?{sessionDetails:{...c.sessionDetails,[i]:{...f,is_running:1,status:"running",turns:f.turns.map(h=>h.id===u?{...h,status:"running"}:h)}},sessions:c.sessions.map(h=>h.id===i?{...h,is_running:1,status:"running"}:h),activeTurnIndex:c.activeSessionId===i?f.turns.findIndex(h=>h.id===u):c.activeTurnIndex}:{}})},onItemStarted:(i,u,c)=>{s().addLogEntry("DEBUG",`item:started — ${c.type}`),l(f=>{const h=f.sessionDetails[i];return h?{sessionDetails:{...f.sessionDetails,[i]:ja(h,u,c)}}:{}})},onItemUpdated:(i,u,c)=>{l(f=>{const h=f.sessionDetails[i];return h?{sessionDetails:{...f.sessionDetails,[i]:ja(h,u,c)}}:{}})},onItemCompleted:(i,u,c)=>{s().addLogEntry("DEBUG",`item:completed — ${c.type}`),l(f=>{var g,x;const h=f.sessionDetails[i];if(!h)return{};const v=ja(h,u,c);let k=v.turns;return c.type==="agent_message"&&((g=c.data)!=null&&g.text)&&(k=k.map(C=>C.id===u?{...C,agent_response:c.data.text}:C)),c.type==="reasoning"&&((x=c.data)!=null&&x.text)&&(k=k.map(C=>{if(C.id!==u)return C;const _=C.thoughts?C.thoughts+`
|
|
41
|
+
`+c.data.text:c.data.text;return{...C,thoughts:_}})),{sessionDetails:{...f.sessionDetails,[i]:{...v,turns:k}}}})},onItemDelta:(i,u,c,f)=>{l(h=>{const v=h.sessionDetails[i];return v?{sessionDetails:{...h.sessionDetails,[i]:Qh(v,u,c,f)}}:{}})},onTurnCompleted:(i,u,c,f)=>{const h=(c==null?void 0:c.input_tokens)??0,v=(c==null?void 0:c.output_tokens)??0;s().addLogEntry("INFO",`turn:completed — ${h} in / ${v} out`),l(k=>{const g=k.sessionDetails[i];return g?{sessionDetails:{...k.sessionDetails,[i]:{...g,is_running:0,status:"active",has_unreviewed:f?1:g.has_unreviewed,turns:g.turns.map(x=>x.id===u?{...x,status:"completed",token_usage:c??x.token_usage??null}:x)}},sessions:k.sessions.map(x=>x.id===i?{...x,is_running:0,status:"active",has_unreviewed:f?1:x.has_unreviewed}:x)}:{}})},onTokenUsageUpdated:(i,u,c)=>{l(f=>{const h=f.sessionDetails[i];return h?{sessionDetails:{...f.sessionDetails,[i]:{...h,turns:h.turns.map(v=>v.id===u?{...v,token_usage:c}:v)}}}:{}})},onTurnFailed:(i,u,c)=>{s().addLogEntry("ERROR",`turn:failed — ${c}`),s().addToast("error",`Turn failed — ${c}`),l(f=>{const h=f.sessionDetails[i];if(!h)return{};const v=c.includes("cancelled")||c.includes("aborted"),k=v?"aborted":"failed";return{sessionDetails:{...f.sessionDetails,[i]:{...h,is_running:0,status:v?"active":"failed",turns:h.turns.map(g=>g.id===u?{...g,status:k,error:c}:g)}},sessions:f.sessions.map(g=>g.id===i?{...g,is_running:0,status:v?"active":"failed"}:g)}})},onTurnCancelled:(i,u)=>{l(c=>{const f=c.sessionDetails[i];if(!f)return{};const h=f.turns.find(g=>g.id===u),v=(h==null?void 0:h.user_prompt)??null,k=f.turns.filter(g=>g.id!==u);return{restoredPrompt:v,sessionDetails:{...c.sessionDetails,[i]:{...f,is_running:0,status:"active",turns:k}},sessions:c.sessions.map(g=>g.id===i?{...g,is_running:0,status:"active"}:g),activeTurnIndex:k.length>0?Math.min(c.activeTurnIndex,k.length-1):0}})},onSessionTitle:(i,u)=>{l(c=>({sessions:c.sessions.map(f=>f.id===i?{...f,title:u}:f),sessionDetails:c.sessionDetails[i]?{...c.sessionDetails,[i]:{...c.sessionDetails[i],title:u}}:c.sessionDetails}))}});function ja(l,s,i){return{...l,turns:l.turns.map(u=>{if(u.id!==s)return u;const c=u.items.findIndex(f=>f.external_item_id===i.external_item_id);if(c>=0){const f=[...u.items];return f[c]={...i,id:f[c].id},{...u,items:f}}return{...u,items:[...u.items,i]}})}}function Qh(l,s,i,u){return{...l,turns:l.turns.map(c=>{var v;if(c.id!==s)return c;const f=c.items.findIndex(k=>k.external_item_id===i);if(f>=0){const k=c.items[f],x=(((v=k.data)==null?void 0:v.text)??"")+u,C=[...c.items];return C[f]={...k,data:{...k.data,text:x}},{...c,items:C,agent_response:x}}const h={id:`delta-${i}`,turn_id:s,external_item_id:i,type:"agent_message",data:{text:u},status:"in_progress",created_at:new Date().toISOString(),updated_at:new Date().toISOString()};return{...c,items:[...c.items,h],agent_response:u}})}}function Kh(l){return ks(`/providers/${l}/models`)}const Yh=(l,s)=>({activeRightTab:"turns",changesScope:"session",eventLog:[],loading:!1,error:null,showNewSessionDialog:!1,toasts:[],showCommandPalette:!1,selectedChangePath:null,lastModelConfig:null,models:[],modelsLoading:!1,showModelSelector:!1,setActiveTurnIndex:i=>l({activeTurnIndex:i}),switchRightTab:i=>l({activeRightTab:i}),setChangesScope:i=>l({changesScope:i}),setShowNewSessionDialog:i=>l({showNewSessionDialog:i}),setShowCommandPalette:i=>l({showCommandPalette:i}),setShowModelSelector:i=>l({showModelSelector:i}),setSelectedChangePath:i=>l({selectedChangePath:i}),addToast:(i,u,c,f)=>{const h=Math.random().toString(36).slice(2,9);l(v=>({toasts:[...v.toasts,{id:h,type:i,message:u,undoAction:c,undoLabel:f}]}))},removeToast:i=>{l(u=>({toasts:u.toasts.filter(c=>c.id!==i)}))},addLogEntry:(i,u)=>{const c=new Date().toLocaleTimeString("en-GB",{hour12:!1});l(f=>({eventLog:[...f.eventLog,{time:c,level:i,message:u}]}))},loadModels:async i=>{if(!s().modelsLoading){l({modelsLoading:!0,models:[]});try{const u=await Kh(i);l({models:u,modelsLoading:!1})}catch{l({modelsLoading:!1})}}}}),X=Ch()((...l)=>({...Wh(...l),...Vh(...l),...Gh(...l),...Yh(...l)}));function qh(l){switch(l){case"claude":return{iconClass:"ic-claude",iconText:"CL"};case"codex":return{iconClass:"ic-codex",iconText:"CX"};case"repoburg":return{iconClass:"ic-repoburg",iconText:"RB"};case"cursor":return{iconClass:"ic-cursor",iconText:"CR"};default:return{iconClass:"ic-codex",iconText:"CX"}}}function Xh(l,s){const i=new Date(l).getTime(),u=s?new Date(s).getTime():Date.now(),c=Math.max(0,Math.floor((u-i)/1e3));if(c<60)return`${c}s`;const f=Math.floor(c/60),h=c%60;if(f<60)return`${f}m ${h}s`;const v=Math.floor(f/60),k=f%60;return`${v}h ${k}m`}function Zh(l,s,i=!1,u="working"){if(u==="finished")return"";if(s)return"running";if(i&&l!=="failed")return"queued";switch(l){case"failed":return"error";case"aborted":return"paused";default:return"paused"}}function Jh(l,s,i=!1,u="working"){if(u==="finished")return"Finished";if(s)return"Running";if(i&&l!=="failed")return"Review Pending";switch(l){case"failed":return"Failed";case"aborted":return"Aborted";case"active":return"Idle";case"completed":return"Completed";case"running":return"Running";default:return l}}function bi(l){const s=l.is_running===1,i=l.lifecycle==="finished",u=qh(l.runtime_type);return{dot:Zh(l.status,s,l.has_unreviewed===1,l.lifecycle),label:Jh(l.status,s,l.has_unreviewed===1,l.lifecycle),iconClass:u.iconClass,iconText:u.iconText,isRunning:s,isFinished:i}}function Ya(l,s,i=!0){G.useEffect(()=>{if(!i)return;function u(c){l.current&&!l.current.contains(c.target)&&s()}return document.addEventListener("mousedown",u),document.addEventListener("touchstart",u),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("touchstart",u)}},[l,s,i])}function qa(l,s=!0){G.useEffect(()=>{if(!s)return;function i(u){u.key==="Escape"&&l()}return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[l,s])}function $i({status:l,size:s=6}){return d.jsx("span",{className:`status-dot ${l}`,style:s!==6?{width:s,height:s}:void 0})}function ff({iconClass:l,iconText:s,size:i=20}){return d.jsx("span",{className:`runtime-icon ${l}`,style:i!==20?{width:i,height:i,fontSize:i*.45}:void 0,children:s})}/**
|
|
42
|
+
* @license lucide-react v0.469.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const em=l=>l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),pf=(...l)=>l.filter((s,i,u)=>!!s&&s.trim()!==""&&u.indexOf(s)===i).join(" ").trim();/**
|
|
47
|
+
* @license lucide-react v0.469.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/var tm={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
52
|
+
* @license lucide-react v0.469.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const nm=G.forwardRef(({color:l="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:u,className:c="",children:f,iconNode:h,...v},k)=>G.createElement("svg",{ref:k,...tm,width:s,height:s,stroke:l,strokeWidth:u?Number(i)*24/Number(s):i,className:pf("lucide",c),...v},[...h.map(([g,x])=>G.createElement(g,x)),...Array.isArray(f)?f:[f]]));/**
|
|
57
|
+
* @license lucide-react v0.469.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/const Ee=(l,s)=>{const i=G.forwardRef(({className:u,...c},f)=>G.createElement(nm,{ref:f,iconNode:s,className:pf(`lucide-${em(l)}`,u),...c}));return i.displayName=`${l}`,i};/**
|
|
62
|
+
* @license lucide-react v0.469.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const rm=Ee("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
67
|
+
* @license lucide-react v0.469.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const sm=Ee("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
|
|
72
|
+
* @license lucide-react v0.469.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const Ra=Ee("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
77
|
+
* @license lucide-react v0.469.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const ba=Ee("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
82
|
+
* @license lucide-react v0.469.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const hf=Ee("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
87
|
+
* @license lucide-react v0.469.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const lm=Ee("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
92
|
+
* @license lucide-react v0.469.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const im=Ee("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
97
|
+
* @license lucide-react v0.469.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const om=Ee("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
102
|
+
* @license lucide-react v0.469.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const Md=Ee("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
|
|
107
|
+
* @license lucide-react v0.469.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const am=Ee("CornerDownLeft",[["polyline",{points:"9 10 4 15 9 20",key:"r3jprv"}],["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}]]);/**
|
|
112
|
+
* @license lucide-react v0.469.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const um=Ee("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);/**
|
|
117
|
+
* @license lucide-react v0.469.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const cm=Ee("FolderPlus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
122
|
+
* @license lucide-react v0.469.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const dm=Ee("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
127
|
+
* @license lucide-react v0.469.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const fm=Ee("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
132
|
+
* @license lucide-react v0.469.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const pm=Ee("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
137
|
+
* @license lucide-react v0.469.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const hm=Ee("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
|
|
142
|
+
* @license lucide-react v0.469.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const mm=Ee("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
|
|
147
|
+
* @license lucide-react v0.469.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const gm=Ee("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
152
|
+
* @license lucide-react v0.469.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const vm=Ee("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
|
|
157
|
+
* @license lucide-react v0.469.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const gl=Ee("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
162
|
+
* @license lucide-react v0.469.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const ym=Ee("Rewind",[["polygon",{points:"11 19 2 12 11 5 11 19",key:"14yba5"}],["polygon",{points:"22 19 13 12 22 5 22 19",key:"1pi1cj"}]]);/**
|
|
167
|
+
* @license lucide-react v0.469.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const xm=Ee("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
172
|
+
* @license lucide-react v0.469.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const km=Ee("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
|
|
177
|
+
* @license lucide-react v0.469.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const wm=Ee("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
182
|
+
* @license lucide-react v0.469.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const mf=Ee("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
187
|
+
* @license lucide-react v0.469.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const Ai=Ee("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
192
|
+
* @license lucide-react v0.469.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const Sm=Ee("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
197
|
+
* @license lucide-react v0.469.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const Tm=Ee("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/**
|
|
202
|
+
* @license lucide-react v0.469.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const _m=Ee("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
|
207
|
+
* @license lucide-react v0.469.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const Nm=Ee("Wrench",[["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",key:"cbrjhi"}]]);/**
|
|
212
|
+
* @license lucide-react v0.469.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const Fi=Ee("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
217
|
+
* @license lucide-react v0.469.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const zd=Ee("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function Em(l,s){const i=new Map;for(const h of s){const v=h.cwd||"(no directory)",k=i.get(v)??[];k.push(h),i.set(v,k)}const u=new Set,c=new Set(l.filter(h=>h.deleted===1).map(h=>h.path)),f=[];for(const h of l){if(h.deleted===1){u.add(h.path);continue}u.add(h.path),f.push({path:h.path,label:h.label||h.path.split("/").pop()||h.path,sessions:i.get(h.path)??[],workspace:h})}for(const[h,v]of i)u.has(h)||c.has(h)||f.push({path:h,label:h==="(no directory)"?"Other":h.split("/").pop()||h,sessions:v,workspace:null});return f}function Cm(){const{sessions:l,workspaces:s,activeSessionId:i,selectSession:u,deleteSession:c,removeWorkspace:f,createSessionInWorkspace:h,pickAndAddWorkspace:v,renameSession:k,markFinished:g,reopenSession:x}=X(),[C,_]=G.useState(new Set),[I,O]=G.useState(new Set),[H,Y]=G.useState(null),[pe,de]=G.useState(null),[ae,W]=G.useState(""),xe=G.useRef(null),he=G.useRef(null);Ya(xe,()=>Y(null),!!H),qa(()=>Y(null),!!H);function ue(ie){_(F=>{const re=new Set(F);return re.has(ie)?re.delete(ie):re.add(ie),re})}function Ce(ie){O(F=>{const re=new Set(F);return re.has(ie)?re.delete(ie):re.add(ie),re})}G.useEffect(()=>{pe&&he.current&&(he.current.focus(),he.current.select())},[pe]);function Xe(ie,F){de(ie),W(F||ie.slice(0,8))}function Ye(){pe&&k(pe,ae),de(null)}function Be(){de(null),W("")}const Ze=Em(s,l);function Ae(ie){const F=i===ie.id,re=bi(ie);return d.jsxs("div",{className:`tree-item ${F?"active":""} ${re.isFinished?"tree-item-finished":""}`,onClick:()=>u(ie.id),onContextMenu:fe=>{fe.preventDefault(),Y({x:fe.clientX,y:fe.clientY,type:"session",sessionId:ie.id,sessionTitle:ie.title,sessionLifecycle:ie.lifecycle})},children:[d.jsx(ff,{iconClass:re.iconClass,iconText:re.iconText,size:16}),pe===ie.id?d.jsx("input",{ref:he,className:"tree-rename-input",value:ae,onChange:fe=>W(fe.target.value),onClick:fe=>fe.stopPropagation(),onKeyDown:fe=>{fe.key==="Enter"&&Ye(),fe.key==="Escape"&&Be()},onBlur:Ye}):d.jsx("span",{className:"tree-label",children:ie.title||ie.id.slice(0,8)}),re.dot&&d.jsx($i,{status:re.dot})]},ie.id)}return d.jsxs("div",{className:"ide-sidebar",children:[d.jsxs("div",{className:"sidebar-header",children:[d.jsx("span",{className:"sidebar-header-title",children:"Workspaces"}),d.jsx("button",{className:"sidebar-add",title:"Add workspace",onClick:()=>v(),children:d.jsx(gl,{size:14})})]}),Ze.length===0?d.jsx("div",{className:"empty-state",style:{padding:"16px"},children:"No workspaces yet. Click + to add one."}):Ze.map(ie=>{const F=C.has(ie.path),re=ie.sessions.filter(B=>B.lifecycle!=="finished"),fe=ie.sessions.filter(B=>B.lifecycle==="finished"),U=`${ie.path}:finished`,ee=I.has(U);return d.jsxs("div",{className:`tree-section ${F?"collapsed":""}`,children:[d.jsxs("div",{className:"tree-section-header",onClick:()=>ue(ie.path),onContextMenu:B=>{B.preventDefault(),Y({x:B.clientX,y:B.clientY,type:"workspace",path:ie.path})},children:[d.jsx(ba,{size:9,className:"tree-chevron"}),d.jsx(dm,{size:14}),d.jsx("span",{className:"tree-section-label",children:ie.label}),d.jsx("button",{className:"tree-section-add",title:"New session in this workspace",onClick:B=>{B.stopPropagation(),h(ie.path)},children:d.jsx(gl,{size:11})}),d.jsx("span",{className:"tree-count",children:ie.sessions.length})]}),d.jsxs("div",{className:"tree-children",children:[re.length===0&&fe.length===0?d.jsx("div",{className:"tree-empty",children:"No sessions"}):re.map(Ae),fe.length>0&&d.jsxs("div",{className:`tree-subgroup ${ee?"collapsed":""}`,children:[d.jsxs("div",{className:"tree-subgroup-header",onClick:()=>Ce(U),children:[d.jsx(ba,{size:8,className:"tree-chevron"}),d.jsx("span",{className:"tree-subgroup-label",children:"Finished"}),d.jsx("span",{className:"tree-subgroup-count",children:fe.length})]}),!ee&&d.jsx("div",{className:"tree-subgroup-items",children:fe.map(Ae)})]})]})]},ie.path)}),d.jsxs("div",{className:"sidebar-footer",onClick:()=>v(),children:[d.jsx(cm,{size:14}),d.jsx("span",{children:"Add workspace"})]}),H&&d.jsxs("div",{ref:xe,className:"ctx-menu",style:{position:"fixed",left:H.x,top:H.y,zIndex:500},children:[H.type==="workspace"&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"ctx-menu-item",onClick:()=>{h(H.path),Y(null)},children:[d.jsx(gl,{size:12})," New Session"]}),d.jsxs("div",{className:"ctx-menu-item ctx-danger",onClick:()=>{f(H.path),Y(null)},children:[d.jsx(Ai,{size:12})," Hide Workspace"]})]}),H.type==="session"&&d.jsx(d.Fragment,{children:H.sessionLifecycle!=="finished"?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"ctx-menu-item",onClick:()=>{Xe(H.sessionId,H.sessionTitle??""),Y(null)},children:[d.jsx(vm,{size:12})," Rename"]}),d.jsxs("div",{className:"ctx-menu-item",onClick:()=>{g(H.sessionId),Y(null)},children:[d.jsx(om,{size:12})," Mark as Finished"]}),d.jsxs("div",{className:"ctx-menu-item ctx-danger",onClick:()=>{c(H.sessionId),Y(null)},children:[d.jsx(Ai,{size:12})," Delete Session"]})]}):d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"ctx-menu-item",onClick:()=>{x(H.sessionId),Y(null)},children:[d.jsx(xm,{size:12})," Reopen"]}),d.jsxs("div",{className:"ctx-menu-item ctx-danger",onClick:()=>{c(H.sessionId),Y(null)},children:[d.jsx(Ai,{size:12})," Delete Session"]})]})})]})]})}function jm(){const l=X(h=>h.openTabs),s=X(h=>h.activeSessionId),i=X(h=>h.sessions),u=X(h=>h.selectSession),c=X(h=>h.closeTab),f=X(h=>h.setShowNewSessionDialog);return d.jsxs("div",{className:"ide-tabs",children:[l.map(h=>{const v=i.find(x=>x.id===h);if(!v)return null;const k=bi(v),g=s===h;return d.jsxs("div",{className:`ide-tab ${g?"active":""}`,onClick:()=>u(h),children:[d.jsx(ff,{iconClass:k.iconClass,iconText:k.iconText,size:14}),v.title||h.slice(0,8),k.dot&&d.jsx($i,{status:k.dot}),d.jsx("span",{className:"ide-tab-close",onClick:x=>{x.stopPropagation(),c(h)},children:d.jsx(Fi,{size:12})})]},h)}),d.jsx("div",{className:"ide-tab-add",title:"New Session",onClick:()=>f(!0),children:d.jsx(gl,{size:14})})]})}function Xa(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Or=Xa();function gf(l){Or=l}var vl={exec:()=>null};function Ie(l,s=""){let i=typeof l=="string"?l:l.source;const u={replace:(c,f)=>{let h=typeof f=="string"?f:f.source;return h=h.replace(_t.caret,"$1"),i=i.replace(c,h),u},getRegex:()=>new RegExp(i,s)};return u}var _t={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:l=>new RegExp(`^( {0,3}${l})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:l=>new RegExp(`^ {0,${Math.min(3,l-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:l=>new RegExp(`^ {0,${Math.min(3,l-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:l=>new RegExp(`^ {0,${Math.min(3,l-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:l=>new RegExp(`^ {0,${Math.min(3,l-1)}}#`),htmlBeginRegex:l=>new RegExp(`^ {0,${Math.min(3,l-1)}}<(?:[a-z].*>|!--)`,"i")},Rm=/^(?:[ \t]*(?:\n|$))+/,Lm=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Im=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,xl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Am=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Za=/(?:[*+-]|\d{1,9}[.)])/,vf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,yf=Ie(vf).replace(/bull/g,Za).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Dm=Ie(vf).replace(/bull/g,Za).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ja=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Pm=/^[^\n]+/,eu=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Mm=Ie(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",eu).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),zm=Ie(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Za).getRegex(),Ui="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",tu=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Om=Ie("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",tu).replace("tag",Ui).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xf=Ie(Ja).replace("hr",xl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ui).getRegex(),bm=Ie(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",xf).getRegex(),nu={blockquote:bm,code:Lm,def:Mm,fences:Im,heading:Am,hr:xl,html:Om,lheading:yf,list:zm,newline:Rm,paragraph:xf,table:vl,text:Pm},Od=Ie("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",xl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ui).getRegex(),$m={...nu,lheading:Dm,table:Od,paragraph:Ie(Ja).replace("hr",xl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Od).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ui).getRegex()},Fm={...nu,html:Ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",tu).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:vl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ie(Ja).replace("hr",xl).replace("heading",` *#{1,6} *[^
|
|
222
|
+
]`).replace("lheading",yf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Um=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Bm=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,kf=/^( {2,}|\\)\n(?!\s*$)/,Hm=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Bi=/[\p{P}\p{S}]/u,ru=/[\s\p{P}\p{S}]/u,wf=/[^\s\p{P}\p{S}]/u,Wm=Ie(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ru).getRegex(),Sf=/(?!~)[\p{P}\p{S}]/u,Vm=/(?!~)[\s\p{P}\p{S}]/u,Gm=/(?:[^\s\p{P}\p{S}]|~)/u,Qm=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Tf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Km=Ie(Tf,"u").replace(/punct/g,Bi).getRegex(),Ym=Ie(Tf,"u").replace(/punct/g,Sf).getRegex(),_f="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",qm=Ie(_f,"gu").replace(/notPunctSpace/g,wf).replace(/punctSpace/g,ru).replace(/punct/g,Bi).getRegex(),Xm=Ie(_f,"gu").replace(/notPunctSpace/g,Gm).replace(/punctSpace/g,Vm).replace(/punct/g,Sf).getRegex(),Zm=Ie("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,wf).replace(/punctSpace/g,ru).replace(/punct/g,Bi).getRegex(),Jm=Ie(/\\(punct)/,"gu").replace(/punct/g,Bi).getRegex(),eg=Ie(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),tg=Ie(tu).replace("(?:-->|$)","-->").getRegex(),ng=Ie("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",tg).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Pi=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,rg=Ie(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Pi).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Nf=Ie(/^!?\[(label)\]\[(ref)\]/).replace("label",Pi).replace("ref",eu).getRegex(),Ef=Ie(/^!?\[(ref)\](?:\[\])?/).replace("ref",eu).getRegex(),sg=Ie("reflink|nolink(?!\\()","g").replace("reflink",Nf).replace("nolink",Ef).getRegex(),su={_backpedal:vl,anyPunctuation:Jm,autolink:eg,blockSkip:Qm,br:kf,code:Bm,del:vl,emStrongLDelim:Km,emStrongRDelimAst:qm,emStrongRDelimUnd:Zm,escape:Um,link:rg,nolink:Ef,punctuation:Wm,reflink:Nf,reflinkSearch:sg,tag:ng,text:Hm,url:vl},lg={...su,link:Ie(/^!?\[(label)\]\((.*?)\)/).replace("label",Pi).getRegex(),reflink:Ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Pi).getRegex()},$a={...su,emStrongRDelimAst:Xm,emStrongLDelim:Ym,url:Ie(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},ig={...$a,br:Ie(kf).replace("{2,}","*").getRegex(),text:Ie($a.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ri={normal:nu,gfm:$m,pedantic:Fm},ul={normal:su,gfm:$a,breaks:ig,pedantic:lg},og={"&":"&","<":"<",">":">",'"':""","'":"'"},bd=l=>og[l];function hn(l,s){if(s){if(_t.escapeTest.test(l))return l.replace(_t.escapeReplace,bd)}else if(_t.escapeTestNoEncode.test(l))return l.replace(_t.escapeReplaceNoEncode,bd);return l}function $d(l){try{l=encodeURI(l).replace(_t.percentDecode,"%")}catch{return null}return l}function Fd(l,s){var f;const i=l.replace(_t.findPipe,(h,v,k)=>{let g=!1,x=v;for(;--x>=0&&k[x]==="\\";)g=!g;return g?"|":" |"}),u=i.split(_t.splitPipe);let c=0;if(u[0].trim()||u.shift(),u.length>0&&!((f=u.at(-1))!=null&&f.trim())&&u.pop(),s)if(u.length>s)u.splice(s);else for(;u.length<s;)u.push("");for(;c<u.length;c++)u[c]=u[c].trim().replace(_t.slashPipe,"|");return u}function cl(l,s,i){const u=l.length;if(u===0)return"";let c=0;for(;c<u&&l.charAt(u-c-1)===s;)c++;return l.slice(0,u-c)}function ag(l,s){if(l.indexOf(s[1])===-1)return-1;let i=0;for(let u=0;u<l.length;u++)if(l[u]==="\\")u++;else if(l[u]===s[0])i++;else if(l[u]===s[1]&&(i--,i<0))return u;return i>0?-2:-1}function Ud(l,s,i,u,c){const f=s.href,h=s.title||null,v=l[1].replace(c.other.outputLinkReplace,"$1");u.state.inLink=!0;const k={type:l[0].charAt(0)==="!"?"image":"link",raw:i,href:f,title:h,text:v,tokens:u.inlineTokens(v)};return u.state.inLink=!1,k}function ug(l,s,i){const u=l.match(i.other.indentCodeCompensation);if(u===null)return s;const c=u[1];return s.split(`
|
|
223
|
+
`).map(f=>{const h=f.match(i.other.beginningSpace);if(h===null)return f;const[v]=h;return v.length>=c.length?f.slice(c.length):f}).join(`
|
|
224
|
+
`)}var Mi=class{constructor(l){Oe(this,"options");Oe(this,"rules");Oe(this,"lexer");this.options=l||Or}space(l){const s=this.rules.block.newline.exec(l);if(s&&s[0].length>0)return{type:"space",raw:s[0]}}code(l){const s=this.rules.block.code.exec(l);if(s){const i=s[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:s[0],codeBlockStyle:"indented",text:this.options.pedantic?i:cl(i,`
|
|
225
|
+
`)}}}fences(l){const s=this.rules.block.fences.exec(l);if(s){const i=s[0],u=ug(i,s[3]||"",this.rules);return{type:"code",raw:i,lang:s[2]?s[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):s[2],text:u}}}heading(l){const s=this.rules.block.heading.exec(l);if(s){let i=s[2].trim();if(this.rules.other.endingHash.test(i)){const u=cl(i,"#");(this.options.pedantic||!u||this.rules.other.endingSpaceChar.test(u))&&(i=u.trim())}return{type:"heading",raw:s[0],depth:s[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(l){const s=this.rules.block.hr.exec(l);if(s)return{type:"hr",raw:cl(s[0],`
|
|
226
|
+
`)}}blockquote(l){const s=this.rules.block.blockquote.exec(l);if(s){let i=cl(s[0],`
|
|
227
|
+
`).split(`
|
|
228
|
+
`),u="",c="";const f=[];for(;i.length>0;){let h=!1;const v=[];let k;for(k=0;k<i.length;k++)if(this.rules.other.blockquoteStart.test(i[k]))v.push(i[k]),h=!0;else if(!h)v.push(i[k]);else break;i=i.slice(k);const g=v.join(`
|
|
229
|
+
`),x=g.replace(this.rules.other.blockquoteSetextReplace,`
|
|
230
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");u=u?`${u}
|
|
231
|
+
${g}`:g,c=c?`${c}
|
|
232
|
+
${x}`:x;const C=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(x,f,!0),this.lexer.state.top=C,i.length===0)break;const _=f.at(-1);if((_==null?void 0:_.type)==="code")break;if((_==null?void 0:_.type)==="blockquote"){const I=_,O=I.raw+`
|
|
233
|
+
`+i.join(`
|
|
234
|
+
`),H=this.blockquote(O);f[f.length-1]=H,u=u.substring(0,u.length-I.raw.length)+H.raw,c=c.substring(0,c.length-I.text.length)+H.text;break}else if((_==null?void 0:_.type)==="list"){const I=_,O=I.raw+`
|
|
235
|
+
`+i.join(`
|
|
236
|
+
`),H=this.list(O);f[f.length-1]=H,u=u.substring(0,u.length-_.raw.length)+H.raw,c=c.substring(0,c.length-I.raw.length)+H.raw,i=O.substring(f.at(-1).raw.length).split(`
|
|
237
|
+
`);continue}}return{type:"blockquote",raw:u,tokens:f,text:c}}}list(l){let s=this.rules.block.list.exec(l);if(s){let i=s[1].trim();const u=i.length>1,c={type:"list",raw:"",ordered:u,start:u?+i.slice(0,-1):"",loose:!1,items:[]};i=u?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=u?i:"[*+-]");const f=this.rules.other.listItemRegex(i);let h=!1;for(;l;){let k=!1,g="",x="";if(!(s=f.exec(l))||this.rules.block.hr.test(l))break;g=s[0],l=l.substring(g.length);let C=s[2].split(`
|
|
238
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,pe=>" ".repeat(3*pe.length)),_=l.split(`
|
|
239
|
+
`,1)[0],I=!C.trim(),O=0;if(this.options.pedantic?(O=2,x=C.trimStart()):I?O=s[1].length+1:(O=s[2].search(this.rules.other.nonSpaceChar),O=O>4?1:O,x=C.slice(O),O+=s[1].length),I&&this.rules.other.blankLine.test(_)&&(g+=_+`
|
|
240
|
+
`,l=l.substring(_.length+1),k=!0),!k){const pe=this.rules.other.nextBulletRegex(O),de=this.rules.other.hrRegex(O),ae=this.rules.other.fencesBeginRegex(O),W=this.rules.other.headingBeginRegex(O),xe=this.rules.other.htmlBeginRegex(O);for(;l;){const he=l.split(`
|
|
241
|
+
`,1)[0];let ue;if(_=he,this.options.pedantic?(_=_.replace(this.rules.other.listReplaceNesting," "),ue=_):ue=_.replace(this.rules.other.tabCharGlobal," "),ae.test(_)||W.test(_)||xe.test(_)||pe.test(_)||de.test(_))break;if(ue.search(this.rules.other.nonSpaceChar)>=O||!_.trim())x+=`
|
|
242
|
+
`+ue.slice(O);else{if(I||C.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||ae.test(C)||W.test(C)||de.test(C))break;x+=`
|
|
243
|
+
`+_}!I&&!_.trim()&&(I=!0),g+=he+`
|
|
244
|
+
`,l=l.substring(he.length+1),C=ue.slice(O)}}c.loose||(h?c.loose=!0:this.rules.other.doubleBlankLine.test(g)&&(h=!0));let H=null,Y;this.options.gfm&&(H=this.rules.other.listIsTask.exec(x),H&&(Y=H[0]!=="[ ] ",x=x.replace(this.rules.other.listReplaceTask,""))),c.items.push({type:"list_item",raw:g,task:!!H,checked:Y,loose:!1,text:x,tokens:[]}),c.raw+=g}const v=c.items.at(-1);if(v)v.raw=v.raw.trimEnd(),v.text=v.text.trimEnd();else return;c.raw=c.raw.trimEnd();for(let k=0;k<c.items.length;k++)if(this.lexer.state.top=!1,c.items[k].tokens=this.lexer.blockTokens(c.items[k].text,[]),!c.loose){const g=c.items[k].tokens.filter(C=>C.type==="space"),x=g.length>0&&g.some(C=>this.rules.other.anyLine.test(C.raw));c.loose=x}if(c.loose)for(let k=0;k<c.items.length;k++)c.items[k].loose=!0;return c}}html(l){const s=this.rules.block.html.exec(l);if(s)return{type:"html",block:!0,raw:s[0],pre:s[1]==="pre"||s[1]==="script"||s[1]==="style",text:s[0]}}def(l){const s=this.rules.block.def.exec(l);if(s){const i=s[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),u=s[2]?s[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",c=s[3]?s[3].substring(1,s[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):s[3];return{type:"def",tag:i,raw:s[0],href:u,title:c}}}table(l){var h;const s=this.rules.block.table.exec(l);if(!s||!this.rules.other.tableDelimiter.test(s[2]))return;const i=Fd(s[1]),u=s[2].replace(this.rules.other.tableAlignChars,"").split("|"),c=(h=s[3])!=null&&h.trim()?s[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
245
|
+
`):[],f={type:"table",raw:s[0],header:[],align:[],rows:[]};if(i.length===u.length){for(const v of u)this.rules.other.tableAlignRight.test(v)?f.align.push("right"):this.rules.other.tableAlignCenter.test(v)?f.align.push("center"):this.rules.other.tableAlignLeft.test(v)?f.align.push("left"):f.align.push(null);for(let v=0;v<i.length;v++)f.header.push({text:i[v],tokens:this.lexer.inline(i[v]),header:!0,align:f.align[v]});for(const v of c)f.rows.push(Fd(v,f.header.length).map((k,g)=>({text:k,tokens:this.lexer.inline(k),header:!1,align:f.align[g]})));return f}}lheading(l){const s=this.rules.block.lheading.exec(l);if(s)return{type:"heading",raw:s[0],depth:s[2].charAt(0)==="="?1:2,text:s[1],tokens:this.lexer.inline(s[1])}}paragraph(l){const s=this.rules.block.paragraph.exec(l);if(s){const i=s[1].charAt(s[1].length-1)===`
|
|
246
|
+
`?s[1].slice(0,-1):s[1];return{type:"paragraph",raw:s[0],text:i,tokens:this.lexer.inline(i)}}}text(l){const s=this.rules.block.text.exec(l);if(s)return{type:"text",raw:s[0],text:s[0],tokens:this.lexer.inline(s[0])}}escape(l){const s=this.rules.inline.escape.exec(l);if(s)return{type:"escape",raw:s[0],text:s[1]}}tag(l){const s=this.rules.inline.tag.exec(l);if(s)return!this.lexer.state.inLink&&this.rules.other.startATag.test(s[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(s[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(s[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(s[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:s[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:s[0]}}link(l){const s=this.rules.inline.link.exec(l);if(s){const i=s[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;const f=cl(i.slice(0,-1),"\\");if((i.length-f.length)%2===0)return}else{const f=ag(s[2],"()");if(f===-2)return;if(f>-1){const v=(s[0].indexOf("!")===0?5:4)+s[1].length+f;s[2]=s[2].substring(0,f),s[0]=s[0].substring(0,v).trim(),s[3]=""}}let u=s[2],c="";if(this.options.pedantic){const f=this.rules.other.pedanticHrefTitle.exec(u);f&&(u=f[1],c=f[3])}else c=s[3]?s[3].slice(1,-1):"";return u=u.trim(),this.rules.other.startAngleBracket.test(u)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?u=u.slice(1):u=u.slice(1,-1)),Ud(s,{href:u&&u.replace(this.rules.inline.anyPunctuation,"$1"),title:c&&c.replace(this.rules.inline.anyPunctuation,"$1")},s[0],this.lexer,this.rules)}}reflink(l,s){let i;if((i=this.rules.inline.reflink.exec(l))||(i=this.rules.inline.nolink.exec(l))){const u=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),c=s[u.toLowerCase()];if(!c){const f=i[0].charAt(0);return{type:"text",raw:f,text:f}}return Ud(i,c,i[0],this.lexer,this.rules)}}emStrong(l,s,i=""){let u=this.rules.inline.emStrongLDelim.exec(l);if(!u||u[3]&&i.match(this.rules.other.unicodeAlphaNumeric))return;if(!(u[1]||u[2]||"")||!i||this.rules.inline.punctuation.exec(i)){const f=[...u[0]].length-1;let h,v,k=f,g=0;const x=u[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(x.lastIndex=0,s=s.slice(-1*l.length+f);(u=x.exec(s))!=null;){if(h=u[1]||u[2]||u[3]||u[4]||u[5]||u[6],!h)continue;if(v=[...h].length,u[3]||u[4]){k+=v;continue}else if((u[5]||u[6])&&f%3&&!((f+v)%3)){g+=v;continue}if(k-=v,k>0)continue;v=Math.min(v,v+k+g);const C=[...u[0]][0].length,_=l.slice(0,f+u.index+C+v);if(Math.min(f,v)%2){const O=_.slice(1,-1);return{type:"em",raw:_,text:O,tokens:this.lexer.inlineTokens(O)}}const I=_.slice(2,-2);return{type:"strong",raw:_,text:I,tokens:this.lexer.inlineTokens(I)}}}}codespan(l){const s=this.rules.inline.code.exec(l);if(s){let i=s[2].replace(this.rules.other.newLineCharGlobal," ");const u=this.rules.other.nonSpaceChar.test(i),c=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return u&&c&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:s[0],text:i}}}br(l){const s=this.rules.inline.br.exec(l);if(s)return{type:"br",raw:s[0]}}del(l){const s=this.rules.inline.del.exec(l);if(s)return{type:"del",raw:s[0],text:s[2],tokens:this.lexer.inlineTokens(s[2])}}autolink(l){const s=this.rules.inline.autolink.exec(l);if(s){let i,u;return s[2]==="@"?(i=s[1],u="mailto:"+i):(i=s[1],u=i),{type:"link",raw:s[0],text:i,href:u,tokens:[{type:"text",raw:i,text:i}]}}}url(l){var i;let s;if(s=this.rules.inline.url.exec(l)){let u,c;if(s[2]==="@")u=s[0],c="mailto:"+u;else{let f;do f=s[0],s[0]=((i=this.rules.inline._backpedal.exec(s[0]))==null?void 0:i[0])??"";while(f!==s[0]);u=s[0],s[1]==="www."?c="http://"+s[0]:c=s[0]}return{type:"link",raw:s[0],text:u,href:c,tokens:[{type:"text",raw:u,text:u}]}}}inlineText(l){const s=this.rules.inline.text.exec(l);if(s){const i=this.lexer.state.inRawBlock;return{type:"text",raw:s[0],text:s[0],escaped:i}}}},An=class Fa{constructor(s){Oe(this,"tokens");Oe(this,"options");Oe(this,"state");Oe(this,"tokenizer");Oe(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=s||Or,this.options.tokenizer=this.options.tokenizer||new Mi,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const i={other:_t,block:Ri.normal,inline:ul.normal};this.options.pedantic?(i.block=Ri.pedantic,i.inline=ul.pedantic):this.options.gfm&&(i.block=Ri.gfm,this.options.breaks?i.inline=ul.breaks:i.inline=ul.gfm),this.tokenizer.rules=i}static get rules(){return{block:Ri,inline:ul}}static lex(s,i){return new Fa(i).lex(s)}static lexInline(s,i){return new Fa(i).inlineTokens(s)}lex(s){s=s.replace(_t.carriageReturn,`
|
|
247
|
+
`),this.blockTokens(s,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){const u=this.inlineQueue[i];this.inlineTokens(u.src,u.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(s,i=[],u=!1){var c,f,h;for(this.options.pedantic&&(s=s.replace(_t.tabCharGlobal," ").replace(_t.spaceLine,""));s;){let v;if((f=(c=this.options.extensions)==null?void 0:c.block)!=null&&f.some(g=>(v=g.call({lexer:this},s,i))?(s=s.substring(v.raw.length),i.push(v),!0):!1))continue;if(v=this.tokenizer.space(s)){s=s.substring(v.raw.length);const g=i.at(-1);v.raw.length===1&&g!==void 0?g.raw+=`
|
|
248
|
+
`:i.push(v);continue}if(v=this.tokenizer.code(s)){s=s.substring(v.raw.length);const g=i.at(-1);(g==null?void 0:g.type)==="paragraph"||(g==null?void 0:g.type)==="text"?(g.raw+=`
|
|
249
|
+
`+v.raw,g.text+=`
|
|
250
|
+
`+v.text,this.inlineQueue.at(-1).src=g.text):i.push(v);continue}if(v=this.tokenizer.fences(s)){s=s.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.heading(s)){s=s.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.hr(s)){s=s.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.blockquote(s)){s=s.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.list(s)){s=s.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.html(s)){s=s.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.def(s)){s=s.substring(v.raw.length);const g=i.at(-1);(g==null?void 0:g.type)==="paragraph"||(g==null?void 0:g.type)==="text"?(g.raw+=`
|
|
251
|
+
`+v.raw,g.text+=`
|
|
252
|
+
`+v.raw,this.inlineQueue.at(-1).src=g.text):this.tokens.links[v.tag]||(this.tokens.links[v.tag]={href:v.href,title:v.title});continue}if(v=this.tokenizer.table(s)){s=s.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.lheading(s)){s=s.substring(v.raw.length),i.push(v);continue}let k=s;if((h=this.options.extensions)!=null&&h.startBlock){let g=1/0;const x=s.slice(1);let C;this.options.extensions.startBlock.forEach(_=>{C=_.call({lexer:this},x),typeof C=="number"&&C>=0&&(g=Math.min(g,C))}),g<1/0&&g>=0&&(k=s.substring(0,g+1))}if(this.state.top&&(v=this.tokenizer.paragraph(k))){const g=i.at(-1);u&&(g==null?void 0:g.type)==="paragraph"?(g.raw+=`
|
|
253
|
+
`+v.raw,g.text+=`
|
|
254
|
+
`+v.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=g.text):i.push(v),u=k.length!==s.length,s=s.substring(v.raw.length);continue}if(v=this.tokenizer.text(s)){s=s.substring(v.raw.length);const g=i.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=`
|
|
255
|
+
`+v.raw,g.text+=`
|
|
256
|
+
`+v.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=g.text):i.push(v);continue}if(s){const g="Infinite loop on byte: "+s.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return this.state.top=!0,i}inline(s,i=[]){return this.inlineQueue.push({src:s,tokens:i}),i}inlineTokens(s,i=[]){var v,k,g;let u=s,c=null;if(this.tokens.links){const x=Object.keys(this.tokens.links);if(x.length>0)for(;(c=this.tokenizer.rules.inline.reflinkSearch.exec(u))!=null;)x.includes(c[0].slice(c[0].lastIndexOf("[")+1,-1))&&(u=u.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(c=this.tokenizer.rules.inline.anyPunctuation.exec(u))!=null;)u=u.slice(0,c.index)+"++"+u.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(c=this.tokenizer.rules.inline.blockSkip.exec(u))!=null;)u=u.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let f=!1,h="";for(;s;){f||(h=""),f=!1;let x;if((k=(v=this.options.extensions)==null?void 0:v.inline)!=null&&k.some(_=>(x=_.call({lexer:this},s,i))?(s=s.substring(x.raw.length),i.push(x),!0):!1))continue;if(x=this.tokenizer.escape(s)){s=s.substring(x.raw.length),i.push(x);continue}if(x=this.tokenizer.tag(s)){s=s.substring(x.raw.length),i.push(x);continue}if(x=this.tokenizer.link(s)){s=s.substring(x.raw.length),i.push(x);continue}if(x=this.tokenizer.reflink(s,this.tokens.links)){s=s.substring(x.raw.length);const _=i.at(-1);x.type==="text"&&(_==null?void 0:_.type)==="text"?(_.raw+=x.raw,_.text+=x.text):i.push(x);continue}if(x=this.tokenizer.emStrong(s,u,h)){s=s.substring(x.raw.length),i.push(x);continue}if(x=this.tokenizer.codespan(s)){s=s.substring(x.raw.length),i.push(x);continue}if(x=this.tokenizer.br(s)){s=s.substring(x.raw.length),i.push(x);continue}if(x=this.tokenizer.del(s)){s=s.substring(x.raw.length),i.push(x);continue}if(x=this.tokenizer.autolink(s)){s=s.substring(x.raw.length),i.push(x);continue}if(!this.state.inLink&&(x=this.tokenizer.url(s))){s=s.substring(x.raw.length),i.push(x);continue}let C=s;if((g=this.options.extensions)!=null&&g.startInline){let _=1/0;const I=s.slice(1);let O;this.options.extensions.startInline.forEach(H=>{O=H.call({lexer:this},I),typeof O=="number"&&O>=0&&(_=Math.min(_,O))}),_<1/0&&_>=0&&(C=s.substring(0,_+1))}if(x=this.tokenizer.inlineText(C)){s=s.substring(x.raw.length),x.raw.slice(-1)!=="_"&&(h=x.raw.slice(-1)),f=!0;const _=i.at(-1);(_==null?void 0:_.type)==="text"?(_.raw+=x.raw,_.text+=x.text):i.push(x);continue}if(s){const _="Infinite loop on byte: "+s.charCodeAt(0);if(this.options.silent){console.error(_);break}else throw new Error(_)}}return i}},zi=class{constructor(l){Oe(this,"options");Oe(this,"parser");this.options=l||Or}space(l){return""}code({text:l,lang:s,escaped:i}){var f;const u=(f=(s||"").match(_t.notSpaceStart))==null?void 0:f[0],c=l.replace(_t.endingNewline,"")+`
|
|
257
|
+
`;return u?'<pre><code class="language-'+hn(u)+'">'+(i?c:hn(c,!0))+`</code></pre>
|
|
258
|
+
`:"<pre><code>"+(i?c:hn(c,!0))+`</code></pre>
|
|
259
|
+
`}blockquote({tokens:l}){return`<blockquote>
|
|
260
|
+
${this.parser.parse(l)}</blockquote>
|
|
261
|
+
`}html({text:l}){return l}heading({tokens:l,depth:s}){return`<h${s}>${this.parser.parseInline(l)}</h${s}>
|
|
262
|
+
`}hr(l){return`<hr>
|
|
263
|
+
`}list(l){const s=l.ordered,i=l.start;let u="";for(let h=0;h<l.items.length;h++){const v=l.items[h];u+=this.listitem(v)}const c=s?"ol":"ul",f=s&&i!==1?' start="'+i+'"':"";return"<"+c+f+`>
|
|
264
|
+
`+u+"</"+c+`>
|
|
265
|
+
`}listitem(l){var i;let s="";if(l.task){const u=this.checkbox({checked:!!l.checked});l.loose?((i=l.tokens[0])==null?void 0:i.type)==="paragraph"?(l.tokens[0].text=u+" "+l.tokens[0].text,l.tokens[0].tokens&&l.tokens[0].tokens.length>0&&l.tokens[0].tokens[0].type==="text"&&(l.tokens[0].tokens[0].text=u+" "+hn(l.tokens[0].tokens[0].text),l.tokens[0].tokens[0].escaped=!0)):l.tokens.unshift({type:"text",raw:u+" ",text:u+" ",escaped:!0}):s+=u+" "}return s+=this.parser.parse(l.tokens,!!l.loose),`<li>${s}</li>
|
|
266
|
+
`}checkbox({checked:l}){return"<input "+(l?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:l}){return`<p>${this.parser.parseInline(l)}</p>
|
|
267
|
+
`}table(l){let s="",i="";for(let c=0;c<l.header.length;c++)i+=this.tablecell(l.header[c]);s+=this.tablerow({text:i});let u="";for(let c=0;c<l.rows.length;c++){const f=l.rows[c];i="";for(let h=0;h<f.length;h++)i+=this.tablecell(f[h]);u+=this.tablerow({text:i})}return u&&(u=`<tbody>${u}</tbody>`),`<table>
|
|
268
|
+
<thead>
|
|
269
|
+
`+s+`</thead>
|
|
270
|
+
`+u+`</table>
|
|
271
|
+
`}tablerow({text:l}){return`<tr>
|
|
272
|
+
${l}</tr>
|
|
273
|
+
`}tablecell(l){const s=this.parser.parseInline(l.tokens),i=l.header?"th":"td";return(l.align?`<${i} align="${l.align}">`:`<${i}>`)+s+`</${i}>
|
|
274
|
+
`}strong({tokens:l}){return`<strong>${this.parser.parseInline(l)}</strong>`}em({tokens:l}){return`<em>${this.parser.parseInline(l)}</em>`}codespan({text:l}){return`<code>${hn(l,!0)}</code>`}br(l){return"<br>"}del({tokens:l}){return`<del>${this.parser.parseInline(l)}</del>`}link({href:l,title:s,tokens:i}){const u=this.parser.parseInline(i),c=$d(l);if(c===null)return u;l=c;let f='<a href="'+l+'"';return s&&(f+=' title="'+hn(s)+'"'),f+=">"+u+"</a>",f}image({href:l,title:s,text:i,tokens:u}){u&&(i=this.parser.parseInline(u,this.parser.textRenderer));const c=$d(l);if(c===null)return hn(i);l=c;let f=`<img src="${l}" alt="${i}"`;return s&&(f+=` title="${hn(s)}"`),f+=">",f}text(l){return"tokens"in l&&l.tokens?this.parser.parseInline(l.tokens):"escaped"in l&&l.escaped?l.text:hn(l.text)}},lu=class{strong({text:l}){return l}em({text:l}){return l}codespan({text:l}){return l}del({text:l}){return l}html({text:l}){return l}text({text:l}){return l}link({text:l}){return""+l}image({text:l}){return""+l}br(){return""}},Dn=class Ua{constructor(s){Oe(this,"options");Oe(this,"renderer");Oe(this,"textRenderer");this.options=s||Or,this.options.renderer=this.options.renderer||new zi,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new lu}static parse(s,i){return new Ua(i).parse(s)}static parseInline(s,i){return new Ua(i).parseInline(s)}parse(s,i=!0){var c,f;let u="";for(let h=0;h<s.length;h++){const v=s[h];if((f=(c=this.options.extensions)==null?void 0:c.renderers)!=null&&f[v.type]){const g=v,x=this.options.extensions.renderers[g.type].call({parser:this},g);if(x!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(g.type)){u+=x||"";continue}}const k=v;switch(k.type){case"space":{u+=this.renderer.space(k);continue}case"hr":{u+=this.renderer.hr(k);continue}case"heading":{u+=this.renderer.heading(k);continue}case"code":{u+=this.renderer.code(k);continue}case"table":{u+=this.renderer.table(k);continue}case"blockquote":{u+=this.renderer.blockquote(k);continue}case"list":{u+=this.renderer.list(k);continue}case"html":{u+=this.renderer.html(k);continue}case"paragraph":{u+=this.renderer.paragraph(k);continue}case"text":{let g=k,x=this.renderer.text(g);for(;h+1<s.length&&s[h+1].type==="text";)g=s[++h],x+=`
|
|
275
|
+
`+this.renderer.text(g);i?u+=this.renderer.paragraph({type:"paragraph",raw:x,text:x,tokens:[{type:"text",raw:x,text:x,escaped:!0}]}):u+=x;continue}default:{const g='Token with "'+k.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw new Error(g)}}}return u}parseInline(s,i=this.renderer){var c,f;let u="";for(let h=0;h<s.length;h++){const v=s[h];if((f=(c=this.options.extensions)==null?void 0:c.renderers)!=null&&f[v.type]){const g=this.options.extensions.renderers[v.type].call({parser:this},v);if(g!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(v.type)){u+=g||"";continue}}const k=v;switch(k.type){case"escape":{u+=i.text(k);break}case"html":{u+=i.html(k);break}case"link":{u+=i.link(k);break}case"image":{u+=i.image(k);break}case"strong":{u+=i.strong(k);break}case"em":{u+=i.em(k);break}case"codespan":{u+=i.codespan(k);break}case"br":{u+=i.br(k);break}case"del":{u+=i.del(k);break}case"text":{u+=i.text(k);break}default:{const g='Token with "'+k.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw new Error(g)}}}return u}},Oa,Di=(Oa=class{constructor(l){Oe(this,"options");Oe(this,"block");this.options=l||Or}preprocess(l){return l}postprocess(l){return l}processAllTokens(l){return l}provideLexer(){return this.block?An.lex:An.lexInline}provideParser(){return this.block?Dn.parse:Dn.parseInline}},Oe(Oa,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Oa),cg=class{constructor(...l){Oe(this,"defaults",Xa());Oe(this,"options",this.setOptions);Oe(this,"parse",this.parseMarkdown(!0));Oe(this,"parseInline",this.parseMarkdown(!1));Oe(this,"Parser",Dn);Oe(this,"Renderer",zi);Oe(this,"TextRenderer",lu);Oe(this,"Lexer",An);Oe(this,"Tokenizer",Mi);Oe(this,"Hooks",Di);this.use(...l)}walkTokens(l,s){var u,c;let i=[];for(const f of l)switch(i=i.concat(s.call(this,f)),f.type){case"table":{const h=f;for(const v of h.header)i=i.concat(this.walkTokens(v.tokens,s));for(const v of h.rows)for(const k of v)i=i.concat(this.walkTokens(k.tokens,s));break}case"list":{const h=f;i=i.concat(this.walkTokens(h.items,s));break}default:{const h=f;(c=(u=this.defaults.extensions)==null?void 0:u.childTokens)!=null&&c[h.type]?this.defaults.extensions.childTokens[h.type].forEach(v=>{const k=h[v].flat(1/0);i=i.concat(this.walkTokens(k,s))}):h.tokens&&(i=i.concat(this.walkTokens(h.tokens,s)))}}return i}use(...l){const s=this.defaults.extensions||{renderers:{},childTokens:{}};return l.forEach(i=>{const u={...i};if(u.async=this.defaults.async||u.async||!1,i.extensions&&(i.extensions.forEach(c=>{if(!c.name)throw new Error("extension name required");if("renderer"in c){const f=s.renderers[c.name];f?s.renderers[c.name]=function(...h){let v=c.renderer.apply(this,h);return v===!1&&(v=f.apply(this,h)),v}:s.renderers[c.name]=c.renderer}if("tokenizer"in c){if(!c.level||c.level!=="block"&&c.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const f=s[c.level];f?f.unshift(c.tokenizer):s[c.level]=[c.tokenizer],c.start&&(c.level==="block"?s.startBlock?s.startBlock.push(c.start):s.startBlock=[c.start]:c.level==="inline"&&(s.startInline?s.startInline.push(c.start):s.startInline=[c.start]))}"childTokens"in c&&c.childTokens&&(s.childTokens[c.name]=c.childTokens)}),u.extensions=s),i.renderer){const c=this.defaults.renderer||new zi(this.defaults);for(const f in i.renderer){if(!(f in c))throw new Error(`renderer '${f}' does not exist`);if(["options","parser"].includes(f))continue;const h=f,v=i.renderer[h],k=c[h];c[h]=(...g)=>{let x=v.apply(c,g);return x===!1&&(x=k.apply(c,g)),x||""}}u.renderer=c}if(i.tokenizer){const c=this.defaults.tokenizer||new Mi(this.defaults);for(const f in i.tokenizer){if(!(f in c))throw new Error(`tokenizer '${f}' does not exist`);if(["options","rules","lexer"].includes(f))continue;const h=f,v=i.tokenizer[h],k=c[h];c[h]=(...g)=>{let x=v.apply(c,g);return x===!1&&(x=k.apply(c,g)),x}}u.tokenizer=c}if(i.hooks){const c=this.defaults.hooks||new Di;for(const f in i.hooks){if(!(f in c))throw new Error(`hook '${f}' does not exist`);if(["options","block"].includes(f))continue;const h=f,v=i.hooks[h],k=c[h];Di.passThroughHooks.has(f)?c[h]=g=>{if(this.defaults.async)return Promise.resolve(v.call(c,g)).then(C=>k.call(c,C));const x=v.call(c,g);return k.call(c,x)}:c[h]=(...g)=>{let x=v.apply(c,g);return x===!1&&(x=k.apply(c,g)),x}}u.hooks=c}if(i.walkTokens){const c=this.defaults.walkTokens,f=i.walkTokens;u.walkTokens=function(h){let v=[];return v.push(f.call(this,h)),c&&(v=v.concat(c.call(this,h))),v}}this.defaults={...this.defaults,...u}}),this}setOptions(l){return this.defaults={...this.defaults,...l},this}lexer(l,s){return An.lex(l,s??this.defaults)}parser(l,s){return Dn.parse(l,s??this.defaults)}parseMarkdown(l){return(i,u)=>{const c={...u},f={...this.defaults,...c},h=this.onError(!!f.silent,!!f.async);if(this.defaults.async===!0&&c.async===!1)return h(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return h(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return h(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));f.hooks&&(f.hooks.options=f,f.hooks.block=l);const v=f.hooks?f.hooks.provideLexer():l?An.lex:An.lexInline,k=f.hooks?f.hooks.provideParser():l?Dn.parse:Dn.parseInline;if(f.async)return Promise.resolve(f.hooks?f.hooks.preprocess(i):i).then(g=>v(g,f)).then(g=>f.hooks?f.hooks.processAllTokens(g):g).then(g=>f.walkTokens?Promise.all(this.walkTokens(g,f.walkTokens)).then(()=>g):g).then(g=>k(g,f)).then(g=>f.hooks?f.hooks.postprocess(g):g).catch(h);try{f.hooks&&(i=f.hooks.preprocess(i));let g=v(i,f);f.hooks&&(g=f.hooks.processAllTokens(g)),f.walkTokens&&this.walkTokens(g,f.walkTokens);let x=k(g,f);return f.hooks&&(x=f.hooks.postprocess(x)),x}catch(g){return h(g)}}}onError(l,s){return i=>{if(i.message+=`
|
|
276
|
+
Please report this to https://github.com/markedjs/marked.`,l){const u="<p>An error occurred:</p><pre>"+hn(i.message+"",!0)+"</pre>";return s?Promise.resolve(u):u}if(s)return Promise.reject(i);throw i}}},Mr=new cg;function Le(l,s){return Mr.parse(l,s)}Le.options=Le.setOptions=function(l){return Mr.setOptions(l),Le.defaults=Mr.defaults,gf(Le.defaults),Le};Le.getDefaults=Xa;Le.defaults=Or;Le.use=function(...l){return Mr.use(...l),Le.defaults=Mr.defaults,gf(Le.defaults),Le};Le.walkTokens=function(l,s){return Mr.walkTokens(l,s)};Le.parseInline=Mr.parseInline;Le.Parser=Dn;Le.parser=Dn.parse;Le.Renderer=zi;Le.TextRenderer=lu;Le.Lexer=An;Le.lexer=An.lex;Le.Tokenizer=Mi;Le.Hooks=Di;Le.parse=Le;Le.options;Le.setOptions;Le.use;Le.walkTokens;Le.parseInline;Dn.parse;An.lex;/*! @license DOMPurify 3.4.13 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.13/LICENSE */function Bd(l,s){(s==null||s>l.length)&&(s=l.length);for(var i=0,u=Array(s);i<s;i++)u[i]=l[i];return u}function dg(l){if(Array.isArray(l))return l}function fg(l,s){var i=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(i!=null){var u,c,f,h,v=[],k=!0,g=!1;try{if(f=(i=i.call(l)).next,s!==0)for(;!(k=(u=f.call(i)).done)&&(v.push(u.value),v.length!==s);k=!0);}catch(x){g=!0,c=x}finally{try{if(!k&&i.return!=null&&(h=i.return(),Object(h)!==h))return}finally{if(g)throw c}}return v}}function pg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
277
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hg(l,s){return dg(l)||fg(l,s)||mg(l,s)||pg()}function mg(l,s){if(l){if(typeof l=="string")return Bd(l,s);var i={}.toString.call(l).slice(8,-1);return i==="Object"&&l.constructor&&(i=l.constructor.name),i==="Map"||i==="Set"?Array.from(l):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Bd(l,s):void 0}}const Cf=Object.entries,Hd=Object.setPrototypeOf,gg=Object.isFrozen,vg=Object.getPrototypeOf,yg=Object.getOwnPropertyDescriptor;let ft=Object.freeze,pt=Object.seal,ys=Object.create,jf=typeof Reflect<"u"&&Reflect,Ba=jf.apply,Ha=jf.construct;ft||(ft=function(s){return s});pt||(pt=function(s){return s});Ba||(Ba=function(s,i){for(var u=arguments.length,c=new Array(u>2?u-2:0),f=2;f<u;f++)c[f-2]=arguments[f];return s.apply(i,c)});Ha||(Ha=function(s){for(var i=arguments.length,u=new Array(i>1?i-1:0),c=1;c<i;c++)u[c-1]=arguments[c];return new s(...u)});const gs=nt(Array.prototype.forEach),xg=nt(Array.prototype.lastIndexOf),Wd=nt(Array.prototype.pop),vs=nt(Array.prototype.push),kg=nt(Array.prototype.splice),sr=Array.isArray,hl=nt(String.prototype.toLowerCase),La=nt(String.prototype.toString),Vd=nt(String.prototype.match),dl=nt(String.prototype.replace),Gd=nt(String.prototype.indexOf),wg=nt(String.prototype.trim),Sg=nt(Number.prototype.toString),Tg=nt(Boolean.prototype.toString),Qd=typeof BigInt>"u"?null:nt(BigInt.prototype.toString),Kd=typeof Symbol>"u"?null:nt(Symbol.prototype.toString),ut=nt(Object.prototype.hasOwnProperty),fl=nt(Object.prototype.toString),at=nt(RegExp.prototype.test),Pr=_g(TypeError);function nt(l){return function(s){s instanceof RegExp&&(s.lastIndex=0);for(var i=arguments.length,u=new Array(i>1?i-1:0),c=1;c<i;c++)u[c-1]=arguments[c];return Ba(l,s,u)}}function _g(l){return function(){for(var s=arguments.length,i=new Array(s),u=0;u<s;u++)i[u]=arguments[u];return Ha(l,i)}}function ke(l,s){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:hl;if(Hd&&Hd(l,null),!sr(s))return l;let u=s.length;for(;u--;){let c=s[u];if(typeof c=="string"){const f=i(c);f!==c&&(gg(s)||(s[u]=f),c=f)}l[c]=!0}return l}function Ng(l){for(let s=0;s<l.length;s++)ut(l,s)||(l[s]=null);return l}function yt(l){const s=ys(null);for(const u of Cf(l)){var i=hg(u,2);const c=i[0],f=i[1];ut(l,c)&&(sr(f)?s[c]=Ng(f):f&&typeof f=="object"&&f.constructor===Object?s[c]=yt(f):s[c]=f)}return s}function Eg(l){switch(typeof l){case"string":return l;case"number":return Sg(l);case"boolean":return Tg(l);case"bigint":return Qd?Qd(l):"0";case"symbol":return Kd?Kd(l):"Symbol()";case"undefined":return fl(l);case"function":case"object":{if(l===null)return fl(l);const s=l,i=nn(s,"toString");if(typeof i=="function"){const u=i(s);return typeof u=="string"?u:fl(u)}return fl(l)}default:return fl(l)}}function nn(l,s){for(;l!==null;){const u=yg(l,s);if(u){if(u.get)return nt(u.get);if(typeof u.value=="function")return nt(u.value)}l=vg(l)}function i(){return null}return i}function Cg(l){try{return at(l,""),!0}catch{return!1}}const Yd=ft(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ia=ft(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Aa=ft(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),jg=ft(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Da=ft(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Rg=ft(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),qd=ft(["#text"]),Xd=ft(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Pa=ft(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Zd=ft(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Li=ft(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Lg=pt(/{{[\w\W]*|^[\w\W]*}}/g),Ig=pt(/<%[\w\W]*|^[\w\W]*%>/g),Ag=pt(/\${[\w\W]*/g),Dg=pt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Pg=pt(/^aria-[\-\w]+$/),Jd=pt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Mg=pt(/^(?:\w+script|data):/i),zg=pt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Og=pt(/^html$/i),bg=pt(/^[a-z][.\w]*(-[.\w]+)+$/i),ef=pt(/<[/\w!]/g),tf=pt(/<[/\w]/g),$g=pt(/<\/no(script|embed|frames)/i),Fg=pt(/\/>/i),bt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ug=function(){return typeof window>"u"?null:window},Bg=function(s,i){if(typeof s!="object"||typeof s.createPolicy!="function")return null;let u=null;const c="data-tt-policy-suffix";i&&i.hasAttribute(c)&&(u=i.getAttribute(c));const f="dompurify"+(u?"#"+u:"");try{return s.createPolicy(f,{createHTML(h){return h},createScriptURL(h){return h}})}catch{return console.warn("TrustedTypes policy "+f+" could not be created."),null}},nf=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},rr=function(s,i,u,c){return ut(s,i)&&sr(s[i])?ke(c.base?yt(c.base):{},s[i],c.transform):u};function Rf(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ug();const s=b=>Rf(b);if(s.version="3.4.13",s.removed=[],!l||!l.document||l.document.nodeType!==bt.document||!l.Element)return s.isSupported=!1,s;let i=l.document;const u=i,c=u.currentScript;l.DocumentFragment;const f=l.HTMLTemplateElement,h=l.Node,v=l.Element,k=l.NodeFilter,g=l.NamedNodeMap;g===void 0&&(l.NamedNodeMap||l.MozNamedAttrMap),l.HTMLFormElement;const x=l.DOMParser,C=l.trustedTypes,_=v.prototype,I=nn(_,"cloneNode"),O=nn(_,"remove"),H=nn(_,"nextSibling"),Y=nn(_,"childNodes"),pe=nn(_,"parentNode"),de=nn(_,"shadowRoot"),ae=nn(_,"attributes"),W=h&&h.prototype?nn(h.prototype,"nodeType"):null,xe=h&&h.prototype?nn(h.prototype,"nodeName"):null,he=h&&h.prototype?nn(h.prototype,"ownerDocument"):null;if(typeof f=="function"){const b=i.createElement("template");b.content&&b.content.ownerDocument&&(i=b.content.ownerDocument)}let ue,Ce="",Xe,Ye=!1,Be=0;const Ze=function(){if(Be>0)throw Pr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Ae=function(m){Ze(),Be++;try{return ue.createHTML(m)}finally{Be--}},ie=function(m){Ze(),Be++;try{return ue.createScriptURL(m)}finally{Be--}},F=function(){return Ye||(Xe=Bg(C,c),Ye=!0),Xe},re=i,fe=re.implementation,U=re.createNodeIterator,ee=re.createDocumentFragment,B=re.getElementsByTagName,T=u.importNode;let L=nf();s.isSupported=typeof Cf=="function"&&typeof pe=="function"&&fe&&fe.createHTMLDocument!==void 0;const z=Lg,Q=Ig,ge=Ag,ve=Dg,De=Pg,je=Mg,Me=zg,xt=bg;let lr=Jd,ze=null;const Pn=ke({},[...Yd,...Ia,...Aa,...Da,...qd]);let Pe=null;const br=ke({},[...Xd,...Pa,...Zd,...Li]);let $e=Object.seal(ys(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),mn=null,Ss=null;const $t=Object.seal(ys(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Mn=!0,rn=!0,$r=!1,Ts=!0,Kt=!1,Yt=!0,sn=!1,ir=!1,gn=null,or=null,vn=!1,Ft=!1,Fr=!1,ar=!1,_s=!0,kl=!1;const Ur="user-content-";let ur=!0,zn=!1,ln={},Nt=null;const on=ke({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let yn=null;const Ns=ke({},["audio","video","img","source","image","track"]);let Br=null;const Es=ke({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),cr="http://www.w3.org/1998/Math/MathML",dr="http://www.w3.org/2000/svg",Et="http://www.w3.org/1999/xhtml";let xn=Et,kn=!1,fr=null;const pr=ke({},[cr,dr,Et],La),wl=ft(["mi","mo","mn","ms","mtext"]);let wn=ke({},wl);const hr=ft(["annotation-xml"]);let On=ke({},hr);const Cs=ke({},["title","style","font","a","script"]);let mr=null;const Hi=["application/xhtml+xml","text/html"],Wi="text/html";let Re=null,Sn=null;const Sl=i.createElement("form"),Tl=function(m){return m instanceof RegExp||m instanceof Function},Hr=function(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Sn&&Sn===m)return;(!m||typeof m!="object")&&(m={}),m=yt(m),mr=Hi.indexOf(m.PARSER_MEDIA_TYPE)===-1?Wi:m.PARSER_MEDIA_TYPE,Re=mr==="application/xhtml+xml"?La:hl,ze=rr(m,"ALLOWED_TAGS",Pn,{transform:Re}),Pe=rr(m,"ALLOWED_ATTR",br,{transform:Re}),fr=rr(m,"ALLOWED_NAMESPACES",pr,{transform:La}),Br=rr(m,"ADD_URI_SAFE_ATTR",Es,{transform:Re,base:Es}),yn=rr(m,"ADD_DATA_URI_TAGS",Ns,{transform:Re,base:Ns}),Nt=rr(m,"FORBID_CONTENTS",on,{transform:Re}),mn=rr(m,"FORBID_TAGS",yt({}),{transform:Re}),Ss=rr(m,"FORBID_ATTR",yt({}),{transform:Re}),ln=ut(m,"USE_PROFILES")?m.USE_PROFILES&&typeof m.USE_PROFILES=="object"?yt(m.USE_PROFILES):m.USE_PROFILES:!1,Mn=m.ALLOW_ARIA_ATTR!==!1,rn=m.ALLOW_DATA_ATTR!==!1,$r=m.ALLOW_UNKNOWN_PROTOCOLS||!1,Ts=m.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Kt=m.SAFE_FOR_TEMPLATES||!1,Yt=m.SAFE_FOR_XML!==!1,sn=m.WHOLE_DOCUMENT||!1,Ft=m.RETURN_DOM||!1,Fr=m.RETURN_DOM_FRAGMENT||!1,ar=m.RETURN_TRUSTED_TYPE||!1,vn=m.FORCE_BODY||!1,_s=m.SANITIZE_DOM!==!1,kl=m.SANITIZE_NAMED_PROPS||!1,ur=m.KEEP_CONTENT!==!1,zn=m.IN_PLACE||!1,lr=Cg(m.ALLOWED_URI_REGEXP)?m.ALLOWED_URI_REGEXP:Jd,xn=typeof m.NAMESPACE=="string"?m.NAMESPACE:Et,wn=ut(m,"MATHML_TEXT_INTEGRATION_POINTS")&&m.MATHML_TEXT_INTEGRATION_POINTS&&typeof m.MATHML_TEXT_INTEGRATION_POINTS=="object"?yt(m.MATHML_TEXT_INTEGRATION_POINTS):ke({},wl),On=ut(m,"HTML_INTEGRATION_POINTS")&&m.HTML_INTEGRATION_POINTS&&typeof m.HTML_INTEGRATION_POINTS=="object"?yt(m.HTML_INTEGRATION_POINTS):ke({},hr);const N=ut(m,"CUSTOM_ELEMENT_HANDLING")&&m.CUSTOM_ELEMENT_HANDLING&&typeof m.CUSTOM_ELEMENT_HANDLING=="object"?yt(m.CUSTOM_ELEMENT_HANDLING):ys(null);if($e=ys(null),ut(N,"tagNameCheck")&&Tl(N.tagNameCheck)&&($e.tagNameCheck=N.tagNameCheck),ut(N,"attributeNameCheck")&&Tl(N.attributeNameCheck)&&($e.attributeNameCheck=N.attributeNameCheck),ut(N,"allowCustomizedBuiltInElements")&&typeof N.allowCustomizedBuiltInElements=="boolean"&&($e.allowCustomizedBuiltInElements=N.allowCustomizedBuiltInElements),pt($e),Kt&&(rn=!1),Fr&&(Ft=!0),ln&&(ze=ke({},qd),Pe=ys(null),ln.html===!0&&(ke(ze,Yd),ke(Pe,Xd)),ln.svg===!0&&(ke(ze,Ia),ke(Pe,Pa),ke(Pe,Li)),ln.svgFilters===!0&&(ke(ze,Aa),ke(Pe,Pa),ke(Pe,Li)),ln.mathMl===!0&&(ke(ze,Da),ke(Pe,Zd),ke(Pe,Li))),$t.tagCheck=null,$t.attributeCheck=null,ut(m,"ADD_TAGS")&&(typeof m.ADD_TAGS=="function"?$t.tagCheck=m.ADD_TAGS:sr(m.ADD_TAGS)&&(ze===Pn&&(ze=yt(ze)),ke(ze,m.ADD_TAGS,Re))),ut(m,"ADD_ATTR")&&(typeof m.ADD_ATTR=="function"?$t.attributeCheck=m.ADD_ATTR:sr(m.ADD_ATTR)&&(Pe===br&&(Pe=yt(Pe)),ke(Pe,m.ADD_ATTR,Re))),ut(m,"ADD_URI_SAFE_ATTR")&&sr(m.ADD_URI_SAFE_ATTR)&&ke(Br,m.ADD_URI_SAFE_ATTR,Re),ut(m,"FORBID_CONTENTS")&&sr(m.FORBID_CONTENTS)&&(Nt===on&&(Nt=yt(Nt)),ke(Nt,m.FORBID_CONTENTS,Re)),ut(m,"ADD_FORBID_CONTENTS")&&sr(m.ADD_FORBID_CONTENTS)&&(Nt===on&&(Nt=yt(Nt)),ke(Nt,m.ADD_FORBID_CONTENTS,Re)),ur&&(ze["#text"]=!0),sn&&ke(ze,["html","head","body"]),ze.table&&(ke(ze,["tbody"]),delete mn.tbody),m.TRUSTED_TYPES_POLICY){if(typeof m.TRUSTED_TYPES_POLICY.createHTML!="function")throw Pr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof m.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Pr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const A=ue;ue=m.TRUSTED_TYPES_POLICY;try{Ce=Ae("")}catch(Z){throw ue=A,Z}}else m.TRUSTED_TYPES_POLICY===null?(ue=void 0,Ce=""):(ue===void 0&&(ue=F()),ue&&typeof Ce=="string"&&(Ce=Ae("")));ft&&ft(m),Sn=m},js=ke({},[...Ia,...Aa,...jg]),Rs=ke({},[...Da,...Rg]),_l=function(m,N,A){return N.namespaceURI===Et?m==="svg":N.namespaceURI===cr?m==="svg"&&(A==="annotation-xml"||wn[A]):!!js[m]},Vi=function(m,N,A){return N.namespaceURI===Et?m==="math":N.namespaceURI===dr?m==="math"&&On[A]:!!Rs[m]},Gi=function(m,N,A){return N.namespaceURI===dr&&!On[A]||N.namespaceURI===cr&&!wn[A]?!1:!Rs[m]&&(Cs[m]||!js[m])},We=function(m){let N=pe(m);(!N||!N.tagName)&&(N={namespaceURI:xn,tagName:"template"});const A=hl(m.tagName),Z=hl(N.tagName);return fr[m.namespaceURI]?m.namespaceURI===dr?_l(A,N,Z):m.namespaceURI===cr?Vi(A,N,Z):m.namespaceURI===Et?Gi(A,N,Z):!!(mr==="application/xhtml+xml"&&fr[m.namespaceURI]):!1},an=function(m){vs(s.removed,{element:m});try{pe(m).removeChild(m)}catch{if(O(m),!pe(m))throw Pr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},bn=function(m){gr(m);const N=Y(m);if(N){const Z=[];gs(N,ne=>{vs(Z,ne)}),gs(Z,ne=>{try{O(ne)}catch{}})}const A=ae(m);if(A)for(let Z=A.length-1;Z>=0;--Z){const ne=A[Z],ce=ne&&ne.name;if(typeof ce=="string")try{m.removeAttribute(ce)}catch{}}},un=function(m,N){try{vs(s.removed,{attribute:N.getAttributeNode(m),from:N})}catch{vs(s.removed,{attribute:null,from:N})}if(N.removeAttribute(m),m==="is")if(Ft||Fr)try{an(N)}catch{}else try{N.setAttribute(m,"")}catch{}},Wr=function(m){const N=ae(m);if(N)for(let A=N.length-1;A>=0;--A){const Z=N[A],ne=Z&&Z.name;if(!(typeof ne!="string"||Pe[Re(ne)]))try{m.removeAttribute(ne)}catch{}}},gr=function(m){const N=[m];for(;N.length>0;){const A=N.pop();(W?W(A):A.nodeType)===bt.element&&Wr(A);const ne=Y(A);if(ne)for(let ce=ne.length-1;ce>=0;--ce)N.push(ne[ce])}},Nl=function(m){if(!Yt)return;const N=[m];for(;N.length>0;){const A=N.pop(),Z=W?W(A):A.nodeType;if(Z===bt.processingInstruction||Z===bt.comment&&at(tf,A.data)){try{O(A)}catch{}continue}if(Z===bt.element){const ce=A,Se=Re(xe?xe(A):A.nodeName);try{ce.hasAttribute&&ce.hasAttribute("patchsrc")&&ce.removeAttribute("patchsrc"),ce.hasAttribute&&ce.hasAttribute("for")&&Se!=="label"&&Se!=="output"&&ce.removeAttribute("for")}catch{}}const ne=Y(A);if(ne)for(let ce=ne.length-1;ce>=0;--ce)N.push(ne[ce])}},vr=function(m){let N=null,A=null;if(vn)m="<remove></remove>"+m;else{const ce=Vd(m,/^[\r\n\t ]+/);A=ce&&ce[0]}mr==="application/xhtml+xml"&&xn===Et&&(m='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+m+"</body></html>");const Z=ue?Ae(m):m;if(xn===Et)try{N=new x().parseFromString(Z,mr)}catch{}if(!N||!N.documentElement){N=fe.createDocument(xn,"template",null);try{N.documentElement.innerHTML=kn?Ce:Z}catch{}}const ne=N.body||N.documentElement;return m&&A&&ne.insertBefore(i.createTextNode(A),ne.childNodes[0]||null),xn===Et?B.call(N,sn?"html":"body")[0]:sn?N.documentElement:ne},Dt=function(m){const N=he?he(m):m.ownerDocument;return U.call(N||m,m,k.SHOW_ELEMENT|k.SHOW_COMMENT|k.SHOW_TEXT|k.SHOW_PROCESSING_INSTRUCTION|k.SHOW_CDATA_SECTION,null)},Vr=function(m){return m=dl(m,z," "),m=dl(m,Q," "),m=dl(m,ge," "),m},kt=function(m){var N;m.normalize();const A=he?he(m):m.ownerDocument,Z=U.call(A||m,m,k.SHOW_TEXT|k.SHOW_COMMENT|k.SHOW_CDATA_SECTION|k.SHOW_PROCESSING_INSTRUCTION,null);let ne=Z.nextNode();for(;ne;)ne.data=Vr(ne.data),ne=Z.nextNode();const ce=(N=m.querySelectorAll)===null||N===void 0?void 0:N.call(m,"template");ce&&gs(ce,Se=>{$n(Se.content)&&kt(Se.content)})},Gr=function(m){const N=xe?xe(m):null;return typeof N!="string"||Re(N)!=="form"?!1:typeof m.nodeName!="string"||typeof m.textContent!="string"||typeof m.removeChild!="function"||m.attributes!==ae(m)||typeof m.removeAttribute!="function"||typeof m.setAttribute!="function"||typeof m.namespaceURI!="string"||typeof m.insertBefore!="function"||typeof m.hasChildNodes!="function"||m.nodeType!==W(m)||m.childNodes!==Y(m)},$n=function(m){if(!W||typeof m!="object"||m===null)return!1;try{return W(m)===bt.documentFragment}catch{return!1}},yr=function(m){if(!W||typeof m!="object"||m===null)return!1;try{return typeof W(m)=="number"}catch{return!1}};function wt(b,m,N){b.length!==0&&gs(b,A=>{A.call(s,m,N,Sn)})}const Qr=function(m,N){return!!(Yt&&m.hasChildNodes()&&!yr(m.firstElementChild)&&at(ef,m.textContent)&&at(ef,m.innerHTML)||Yt&&m.namespaceURI===Et&&N==="style"&&yr(m.firstElementChild)||m.nodeType===bt.processingInstruction||Yt&&m.nodeType===bt.comment&&at(tf,m.data))},xr=function(m,N,A){if(!mn[N]&&Is(N)&&($e.tagNameCheck instanceof RegExp&&at($e.tagNameCheck,N)||$e.tagNameCheck instanceof Function&&$e.tagNameCheck(N)))return!1;if(ur&&!Nt[N]){const Z=pe(m),ne=Y(m);if(ne&&Z){const ce=ne.length;for(let Se=ce-1;Se>=0;--Se){const _e=m===A?I(ne[Se],!0):ne[Se];Z.insertBefore(_e,H(m))}}}return an(m),!0},kr=function(m,N,A,Z){return m.length===0?N:N===A||N===Z?yt(N):N},El=function(m,N){if(wt(L.beforeSanitizeElements,m,null),m!==N&&pe(m)===null)return zn&&gr(m),!0;if(Gr(m))return an(m),!0;const A=Re(xe?xe(m):m.nodeName);if(ze=kr(L.uponSanitizeElement,ze,Pn,gn),wt(L.uponSanitizeElement,m,{tagName:A,allowedTags:ze}),m!==N&&pe(m)===null)return zn&&gr(m),!0;if(Qr(m,A))return an(m),!0;if(mn[A]||!($t.tagCheck instanceof Function&&$t.tagCheck(A))&&!ze[A]){const ne=xr(m,A,N);return ne===!1&&wt(L.afterSanitizeElements,m,null),ne}if((W?W(m):m.nodeType)===bt.element&&!We(m)||(A==="noscript"||A==="noembed"||A==="noframes")&&at($g,m.innerHTML))return an(m),!0;if(Kt&&m.nodeType===bt.text){const ne=Vr(m.textContent);m.textContent!==ne&&(vs(s.removed,{element:m.cloneNode()}),m.textContent=ne)}return wt(L.afterSanitizeElements,m,null),!1},Cl=function(m,N,A){if(Ss[N]||Yt&&N==="patchsrc"||Yt&&N==="for"&&m!=="label"&&m!=="output"||_s&&(N==="id"||N==="name")&&(A in i||A in Sl))return!1;const Z=Pe[N]||$t.attributeCheck instanceof Function&&$t.attributeCheck(N,m);if(!(rn&&at(ve,N))){if(!(Mn&&at(De,N))){if(Z){if(!Br[N]){if(!at(lr,dl(A,Me,""))){if(!((N==="src"||N==="xlink:href"||N==="href")&&m!=="script"&&Gd(A,"data:")===0&&yn[m])){if(!($r&&!at(je,dl(A,Me,"")))){if(A)return!1}}}}}else if(!(Is(m)&&($e.tagNameCheck instanceof RegExp&&at($e.tagNameCheck,m)||$e.tagNameCheck instanceof Function&&$e.tagNameCheck(m))&&($e.attributeNameCheck instanceof RegExp&&at($e.attributeNameCheck,N)||$e.attributeNameCheck instanceof Function&&$e.attributeNameCheck(N,m))||N==="is"&&$e.allowCustomizedBuiltInElements&&($e.tagNameCheck instanceof RegExp&&at($e.tagNameCheck,A)||$e.tagNameCheck instanceof Function&&$e.tagNameCheck(A))))return!1}}return!0},Ls=ke({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Is=function(m){return!Ls[hl(m)]&&at(xt,m)},As=function(m,N,A,Z){if(ue&&typeof C=="object"&&typeof C.getAttributeType=="function"&&!A)switch(C.getAttributeType(m,N)){case"TrustedHTML":return Ae(Z);case"TrustedScriptURL":return ie(Z)}return Z},wr=function(m,N,A,Z){try{A?m.setAttributeNS(A,N,Z):m.setAttribute(N,Z),Gr(m)?an(m):Wd(s.removed)}catch{un(N,m)}},jl=function(m){wt(L.beforeSanitizeAttributes,m,null);const N=m.attributes;if(!N||Gr(m))return;Pe=kr(L.uponSanitizeAttribute,Pe,br,or);const A={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Pe,forceKeepAttr:void 0};let Z=N.length;const ne=Re(m.nodeName);for(;Z--;){const ce=N[Z],Se=ce.name,_e=ce.namespaceURI,Ve=ce.value,Ge=Re(Se),Tn=Ve;let Je=Se==="value"?Tn:wg(Tn);if(A.attrName=Ge,A.attrValue=Je,A.keepAttr=!0,A.forceKeepAttr=void 0,wt(L.uponSanitizeAttribute,m,A),Je=A.attrValue,kl&&(Ge==="id"||Ge==="name")&&Gd(Je,Ur)!==0&&(un(Se,m),Je=Ur+Je),Yt&&at(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Je)){un(Se,m);continue}if(Ge==="attributename"&&Vd(Je,"href")){un(Se,m);continue}if(!A.forceKeepAttr){if(!A.keepAttr){un(Se,m);continue}if(!Ts&&at(Fg,Je)){un(Se,m);continue}if(Kt&&(Je=Vr(Je)),!Cl(ne,Ge,Je)){un(Se,m);continue}Je=As(ne,Ge,_e,Je),Je!==Tn&&wr(m,Se,_e,Je)}}wt(L.afterSanitizeAttributes,m,null)},Fn=function(m){let N=null;const A=Dt(m);for(wt(L.beforeSanitizeShadowDOM,m,null);N=A.nextNode();)if(wt(L.uponSanitizeShadowNode,N,null),El(N,m),jl(N),$n(N.content)&&Fn(N.content),(W?W(N):N.nodeType)===bt.element){const ne=de(N);$n(ne)&&(we(ne),Fn(ne))}wt(L.afterSanitizeShadowDOM,m,null)},we=function(m){const N=[{node:m,shadow:null}];for(;N.length>0;){const A=N.pop();if(A.shadow){Fn(A.shadow);continue}const Z=A.node,ce=(W?W(Z):Z.nodeType)===bt.element,Se=Y(Z);if(Se)for(let _e=Se.length-1;_e>=0;--_e)N.push({node:Se[_e],shadow:null});if(ce){const _e=xe?xe(Z):null;if(typeof _e=="string"&&Re(_e)==="template"){const Ve=Z.content;$n(Ve)&&N.push({node:Ve,shadow:null})}}if(ce){const _e=de(Z);$n(_e)&&N.push({node:null,shadow:_e},{node:_e,shadow:null})}}};return s.sanitize=function(b){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},N=null,A=null,Z=null,ne=null;if(kn=!b,kn&&(b="<!-->"),typeof b!="string"&&!yr(b)&&(b=Eg(b),typeof b!="string"))throw Pr("dirty is not a string, aborting");if(!s.isSupported)return b;ir?(ze=gn,Pe=or):Hr(m),(L.uponSanitizeElement.length>0||L.uponSanitizeAttribute.length>0)&&(ze=yt(ze)),L.uponSanitizeAttribute.length>0&&(Pe=yt(Pe)),s.removed=[];const ce=zn&&typeof b!="string"&&yr(b);if(ce){Nl(b);const Ve=xe?xe(b):b.nodeName;if(typeof Ve=="string"){const Ge=Re(Ve);if(!ze[Ge]||mn[Ge])throw bn(b),Pr("root node is forbidden and cannot be sanitized in-place")}if(Gr(b))throw bn(b),Pr("root node is clobbered and cannot be sanitized in-place");try{we(b)}catch(Ge){throw bn(b),Ge}}else if(yr(b))N=vr("<!---->"),A=N.ownerDocument.importNode(b,!0),A.nodeType===bt.element&&A.nodeName==="BODY"||A.nodeName==="HTML"?N=A:N.appendChild(A),we(A);else{if(!Ft&&!Kt&&!sn&&b.indexOf("<")===-1)return ue&&ar?Ae(b):b;if(N=vr(b),!N)return Ft?null:ar?Ce:""}N&&vn&&an(N.firstChild);const Se=ce?b:N;try{const Ve=Dt(Se);for(;Z=Ve.nextNode();)El(Z,Se),jl(Z),$n(Z.content)&&Fn(Z.content)}catch(Ve){throw ce&&(bn(b),gs(s.removed,Ge=>{Ge.element&&gr(Ge.element)})),Ve}if(ce)return gs(s.removed,Ve=>{Ve.element&&gr(Ve.element)}),Kt&&kt(b),b;if(Ft){if(Kt&&kt(N),Fr)for(ne=ee.call(N.ownerDocument);N.firstChild;)ne.appendChild(N.firstChild);else ne=N;return(Pe.shadowroot||Pe.shadowrootmode)&&(ne=T.call(u,ne,!0)),ne}let _e=sn?N.outerHTML:N.innerHTML;return sn&&ze["!doctype"]&&N.ownerDocument&&N.ownerDocument.doctype&&N.ownerDocument.doctype.name&&at(Og,N.ownerDocument.doctype.name)&&(_e="<!DOCTYPE "+N.ownerDocument.doctype.name+`>
|
|
278
|
+
`+_e),Kt&&(_e=Vr(_e)),ue&&ar?Ae(_e):_e},s.setConfig=function(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Hr(b),ir=!0,gn=ze,or=Pe},s.clearConfig=function(){Sn=null,ir=!1,gn=null,or=null,ue=Xe,Ce=""},s.isValidAttribute=function(b,m,N){Sn||Hr({});const A=Re(b),Z=Re(m);return Cl(A,Z,N)},s.addHook=function(b,m){typeof m=="function"&&ut(L,b)&&vs(L[b],m)},s.removeHook=function(b,m){if(ut(L,b)){if(m!==void 0){const N=xg(L[b],m);return N===-1?void 0:kg(L[b],N,1)[0]}return Wd(L[b])}},s.removeHooks=function(b){ut(L,b)&&(L[b]=[])},s.removeAllHooks=function(){L=nf()},s}var Hg=Rf();const Wg=new Set(["command_execution","file_change","mcp_tool_call","web_search"]);function Vg(l){return Wg.has(l.type)}function Gg({items:l}){const[s,i]=G.useState(!1);if(l.length===0)return null;const u=l.length;return d.jsxs("div",{className:"tool-calls",children:[d.jsxs("div",{className:"tool-calls-header",onClick:()=>i(c=>!c),children:[d.jsx("span",{className:"tool-calls-icon",children:d.jsx(Nm,{size:12})}),d.jsxs("span",{className:"tool-calls-summary",children:[u," tool call",u>1?"s":""]}),d.jsx(hf,{size:14,className:"tool-calls-chevron",style:{transform:s?"rotate(90deg)":"none"}})]}),s&&d.jsx("div",{className:"tool-calls-body",children:l.map(c=>d.jsx(ml,{item:c},c.id))})]})}Le.setOptions({breaks:!0,gfm:!0});function rf(l){const s=Le.parse(l);return Hg.sanitize(s)}function sf(l){var s;return(s=l.data)!=null&&s.text?l.data.text:""}function Qg(l){const s=l.match(/^\/bin\/\w+\s+-\w+\s+"(.*)"$/s);return s?s[1]:l}const lf=1e4;function Kg({item:l}){var c,f,h,v,k;const s=l.status==="in_progress",[i,u]=G.useState(!1);switch(l.type){case"agent_message":return d.jsxs("div",{className:"render-content",children:[d.jsxs("div",{className:"turn-header",children:[d.jsx("span",{className:"turn-header-icon ic-codex",children:"CX"}),d.jsx("span",{className:"turn-header-title",children:"Agent"}),s&&d.jsx("span",{className:"turn-header-meta",children:"writing…"})]}),d.jsx("div",{dangerouslySetInnerHTML:{__html:rf(sf(l)||"…")}})]});case"reasoning":return d.jsxs("div",{className:"render-content",children:[d.jsxs("div",{className:"turn-header",children:[d.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:"💭"}),d.jsx("span",{className:"turn-header-title",children:"Reasoning"})]}),d.jsx("div",{dangerouslySetInnerHTML:{__html:rf(sf(l))}})]});case"command_execution":{const g=l.data||{},x=Qg(g.command||""),C=g.aggregated_output||"",_=g.exit_code,I=s?"running…":_!==null?`exit ${_}`:"",O=C.length>lf,H=O&&!i?C.slice(0,lf)+`
|
|
279
|
+
… (truncated, click to expand)`:C;return d.jsxs("div",{className:"render-content",children:[d.jsxs("div",{className:"turn-header",children:[d.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:"🔧"}),d.jsx("span",{className:"turn-header-title",children:"Command"}),I&&d.jsx("span",{className:"turn-header-meta",children:I})]}),d.jsx("pre",{className:"cmd-block",children:d.jsx("code",{children:x})}),C&&d.jsxs(d.Fragment,{children:[d.jsx("pre",{className:"cmd-output",children:d.jsx("code",{children:H})}),O&&d.jsx("button",{className:"cmd-output-toggle",onClick:()=>u(Y=>!Y),children:i?"Show less":`Show full output (${(C.length/1024).toFixed(0)}KB)`})]})]})}case"file_change":{const g=((c=l.data)==null?void 0:c.changes)||[],x=`${g.length} file${g.length!==1?"s":""}`;return d.jsxs("div",{className:"render-content",children:[d.jsxs("div",{className:"turn-header",children:[d.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:"📁"}),d.jsx("span",{className:"turn-header-title",children:"File Changes"}),d.jsx("span",{className:"turn-header-meta",children:x})]}),d.jsx("div",{className:"file-change-list",children:g.map((C,_)=>{const I=C.kind==="add"?"A":C.kind==="delete"?"D":"M",O=C.kind==="add"?"fc-add":C.kind==="delete"?"fc-del":"fc-mod";return d.jsxs("div",{className:"file-change",children:[d.jsx("span",{className:`fc-status ${O}`,children:I}),d.jsx("span",{className:"fc-name",children:C.path})]},_)})})]})}case"mcp_tool_call":{const g=l.data||{},x=g.tool||"mcp",C=g.server||"",_=g.arguments,I=g.result,O=g.error,H=l.status==="failed"||!!O,Y=s?"running…":H?"failed":"done",pe=((f=I==null?void 0:I.content)==null?void 0:f.filter(de=>de.type==="text").map(de=>de.text))??[];return d.jsxs("div",{className:"render-content",children:[d.jsxs("div",{className:"turn-header",children:[d.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:"🔌"}),d.jsxs("span",{className:"turn-header-title",children:["MCP: ",x]}),C&&d.jsx("span",{className:"turn-header-meta",children:C}),d.jsx("span",{className:"turn-header-meta",style:H?{color:"var(--red)"}:void 0,children:Y})]}),_&&Object.keys(_).length>0&&d.jsx("div",{className:"mcp-args",children:Object.entries(_).map(([de,ae])=>d.jsxs("div",{className:"mcp-arg",children:[d.jsx("span",{className:"mcp-arg-key",children:de}),de==="code"?d.jsx("pre",{className:"cmd-block",children:d.jsx("code",{children:String(ae)})}):d.jsx("span",{className:"mcp-arg-value",children:typeof ae=="string"?ae:JSON.stringify(ae,null,2)})]},de))}),pe.length>0&&pe.map((de,ae)=>d.jsx("pre",{className:"cmd-output",children:d.jsx("code",{children:de})},ae)),O&&d.jsx("pre",{className:"cmd-output",style:{color:"var(--red)"},children:d.jsx("code",{children:O})})]})}case"web_search":{const g=((h=l.data)==null?void 0:h.query)||"";return d.jsxs("div",{className:"render-content",children:[d.jsxs("div",{className:"turn-header",children:[d.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:"🔍"}),d.jsx("span",{className:"turn-header-title",children:"Web Search"})]}),d.jsx("p",{className:"user-message",children:g})]})}case"todo_list":{const g=((v=l.data)==null?void 0:v.items)||[];return d.jsxs("div",{className:"render-content",children:[d.jsxs("div",{className:"turn-header",children:[d.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:"📋"}),d.jsx("span",{className:"turn-header-title",children:"Todo List"})]}),d.jsx("ul",{className:"todo-list",children:g.map((x,C)=>d.jsxs("li",{className:x.completed?"todo-done":"todo-pending",children:[x.completed?"✅":"⬜"," ",x.text]},C))})]})}case"error":{const g=((k=l.data)==null?void 0:k.message)||"Unknown error";return d.jsxs("div",{className:"render-content",children:[d.jsxs("div",{className:"turn-header",children:[d.jsx("span",{className:"turn-header-icon",style:{background:"var(--red)",color:"#fff"},children:"!"}),d.jsx("span",{className:"turn-header-title",children:"Error"})]}),d.jsx("pre",{className:"cmd-output",style:{color:"var(--red)"},children:d.jsx("code",{children:g})})]})}default:return null}}const ml=G.memo(Kg);function Yg({turn:l}){const[s,i]=G.useState(!1);G.useEffect(()=>{l.status==="running"||l.status==="pending"?i(!0):l.status==="completed"&&i(!1)},[l.status]);let u=-1;for(let g=l.items.length-1;g>=0;g--)if(l.items[g].type==="agent_message"){u=g;break}const c=u>=0,f=c?l.items.slice(0,u):l.items,h=[];let v=null;for(const g of f)g.type==="agent_message"?(v&&h.push(v),v={agentMessage:g,toolItems:[],otherItems:[]}):(v||(v={agentMessage:null,toolItems:[],otherItems:[]}),Vg(g)?v.toolItems.push(g):v.otherItems.push(g));v&&h.push(v);const k=f.length;return d.jsxs("div",{className:"turn-group",children:[d.jsxs("div",{className:"render-content",children:[d.jsxs("div",{className:"turn-header",children:[d.jsx("span",{className:"turn-header-icon",style:{background:"var(--amber)",color:"#fff"},children:"U"}),d.jsx("span",{className:"turn-header-title",children:"You"})]}),d.jsx("p",{className:"user-message",children:l.user_prompt})]}),k>0&&d.jsxs("div",{className:"tool-calls",children:[d.jsxs("div",{className:"tool-calls-header",onClick:()=>i(g=>!g),children:[d.jsx("span",{className:"tool-calls-icon",children:d.jsx(hm,{size:12})}),d.jsxs("span",{className:"tool-calls-summary",children:[k," intermediate step",k>1?"s":""]}),d.jsx(hf,{size:14,className:"tool-calls-chevron",style:{transform:s?"rotate(90deg)":"none"}})]}),s&&d.jsx("div",{className:"tool-calls-body",children:h.map((g,x)=>d.jsxs("div",{className:"intermediate-segment",children:[g.agentMessage&&d.jsx(ml,{item:g.agentMessage}),g.otherItems.map(C=>d.jsx(ml,{item:C},C.id)),g.toolItems.length>0&&d.jsx(Gg,{items:g.toolItems})]},x))})]}),c&&d.jsx(ml,{item:l.items[u]},l.items[u].id),c&&l.items.slice(u+1).map(g=>d.jsx(ml,{item:g},g.id)),l.items.length===0&&!l.error&&(l.status==="pending"||l.status==="running")&&d.jsx("div",{className:"render-content",children:d.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic"},children:l.status==="running"?"Agent is thinking…":"Waiting to start…"})}),l.error&&d.jsx("div",{className:"render-content",children:d.jsx("pre",{className:"cmd-output",style:{color:"var(--red)"},children:d.jsx("code",{children:l.error})})})]})}const qg=G.memo(Yg);function Lf(l,s="session",i=0){const u=[];if(s==="session")l.forEach((f,h)=>of(f,h,u));else{const f=l[i];f&&of(f,i,u)}const c=new Map;for(const f of u)c.set(f.path,f);return Array.from(c.values())}function of(l,s,i){var u;for(const c of l.items)if(c.type==="file_change"&&((u=c.data)!=null&&u.changes)){const f=c.data.changes;for(const h of f)i.push({path:h.path,kind:h.kind,turnIdx:s})}}function Xg(){const{activeSessionId:l,sessionDetails:s,activeTurnIndex:i,activeRightTab:u,changesScope:c,submittingPrompt:f,loading:h,selectedChangePath:v,setSelectedChangePath:k}=X(),g=l?s[l]:null,x=(g==null?void 0:g.turns)??[],C=G.useRef(null);if(G.useEffect(()=>{if(!v||u!=="changes")return;const _=setTimeout(()=>{const I=v.replace(/[^a-zA-Z0-9]/g,"-"),O=document.getElementById(`diff-${I}`);O&&(O.scrollIntoView({behavior:"smooth",block:"start"}),O.classList.add("diff-highlight"),setTimeout(()=>O.classList.remove("diff-highlight"),1500)),k(null)},50);return()=>clearTimeout(_)},[v,u,k]),u==="changes"){if(!g)return d.jsx("div",{className:"render-scroll",children:d.jsx("div",{className:"empty-state",children:"No session selected"})});const _=Lf(x,c,i);return _.length===0?d.jsx("div",{className:"render-scroll",children:d.jsx("div",{className:"render-content",children:d.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic"},children:"No file changes in this scope."})})}):d.jsx("div",{className:"render-scroll",ref:C,children:d.jsxs("div",{className:"render-content",children:[d.jsxs("div",{style:{marginBottom:"20px"},children:[d.jsx("span",{style:{fontSize:"16px",fontWeight:600,color:"var(--text)"},children:c==="session"?"All Session Changes":"Current Turn Changes"}),d.jsxs("span",{style:{fontSize:"12px",color:"var(--text-muted)",marginLeft:"8px"},children:[_.length," file",_.length>1?"s":""]})]}),_.map(I=>{const O=I.path.split("/").pop()||I.path,H=I.path.replace("/"+O,""),Y=I.kind==="add"?"Added":I.kind==="delete"?"Deleted":"Modified",pe=I.kind==="add"?"fc-add":I.kind==="delete"?"fc-del":"fc-mod",de=I.kind==="add"?"A":I.kind==="delete"?"D":"M",ae=I.path.replace(/[^a-zA-Z0-9]/g,"-");return d.jsxs("div",{children:[d.jsxs("div",{className:"diff-file-header",id:`diff-${ae}`,children:[d.jsx("span",{className:`diff-file-status ${pe}`,children:de}),d.jsxs("span",{className:"diff-file-name",children:[H&&d.jsxs("span",{style:{color:"var(--text-muted)"},children:[H,"/"]}),O]}),d.jsx("span",{className:"diff-file-stats",children:d.jsx("span",{className:`diff-file-badge ${pe}`,children:Y})})]}),d.jsx("p",{style:{color:"var(--text-muted)",fontSize:"12px",fontStyle:"italic",padding:"8px 16px"},children:"Diff content not available (Codex SDK limitation)."})]},I.path)})]})})}return h&&!g?d.jsx("div",{className:"render-scroll",children:d.jsxs("div",{className:"skeleton-bars",children:[d.jsx("div",{className:"skeleton-bar"}),d.jsx("div",{className:"skeleton-bar"}),d.jsx("div",{className:"skeleton-bar"}),d.jsx("div",{className:"skeleton-bar"}),d.jsx("div",{className:"skeleton-bar"})]})}):g?d.jsxs("div",{className:"render-scroll",ref:C,children:[f&&d.jsx("div",{className:"turn-block",children:d.jsxs("div",{className:"turn-group",children:[d.jsxs("div",{className:"render-content",children:[d.jsxs("div",{className:"turn-header",children:[d.jsx("span",{className:"turn-header-icon",style:{background:"var(--amber)",color:"#fff"},children:"U"}),d.jsx("span",{className:"turn-header-title",children:"You"})]}),d.jsx("p",{className:"user-message",children:f})]}),d.jsx("div",{className:"render-content",children:d.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic"},children:"Sending…"})})]})}),x.length===0&&!f&&d.jsx("div",{className:"empty-state",children:"No turns yet. Send a message below to start."}),x.map((_,I)=>d.jsx("div",{id:`turn-${I}`,className:"turn-block",children:d.jsx(qg,{turn:_})},_.id))]}):d.jsx("div",{className:"render-scroll",children:d.jsx("div",{className:"empty-state",children:"No session selected"})})}const Zg=G.memo(Xg),Jg=[{id:"model",label:"/model",hint:"Change model",capability:"dynamicModels"},{id:"sandbox",label:"/sandbox",hint:"Sandbox mode",capability:"sandbox",subPopup:"sandbox"},{id:"websearch",label:"/websearch",hint:"Web search mode",capability:"webSearch",subPopup:"websearch"},{id:"network",label:"/network",hint:"Network access",capability:"networkAccess",subPopup:"network"},{id:"skills",label:"/skills",hint:"Browse skills",capability:"skills"},{id:"plugins",label:"/plugins",hint:"Browse plugins",capability:"plugins"},{id:"mcp",label:"/mcp",hint:"Browse MCP servers",capability:"mcpServers"}];function ev(l,s){return Jg.filter(i=>!(i.capability&&!s[i.capability]||l&&!i.label.toLowerCase().includes(l.toLowerCase())))}function tv({commands:l,selectedIndex:s,onSelect:i,onHover:u}){return d.jsxs("div",{className:"slash-popup",children:[d.jsx("div",{className:"slash-popup-header",children:"Commands"}),l.length===0&&d.jsx("div",{className:"slash-popup-empty",children:"No matching commands"}),l.map((c,f)=>d.jsxs("div",{className:`slash-popup-item ${f===s?"selected":""}`,onMouseEnter:()=>u(f),onClick:()=>i(c),children:[d.jsx("span",{className:"slash-popup-label",children:c.label}),d.jsx("span",{className:"slash-popup-hint",children:c.hint})]},c.id))]})}function Ma({title:l,options:s,currentValue:i,onSelect:u,onClose:c}){return d.jsxs("div",{className:"slash-popup",children:[d.jsxs("div",{className:"slash-popup-header",children:[d.jsx("button",{className:"slash-popup-back",onClick:c,children:"← Back"}),d.jsx("span",{children:l})]}),s.map(f=>d.jsxs("div",{className:`slash-popup-item ${f.value===i?"selected":""}`,onClick:()=>u(f.value),children:[d.jsxs("div",{className:"slash-popup-item-main",children:[d.jsx("span",{className:"slash-popup-label",children:f.label}),f.description&&d.jsx("span",{className:"slash-popup-hint",children:f.description})]}),f.value===i&&d.jsx("span",{className:"slash-popup-check",children:"✓"})]},f.value))]})}function nv(){return ks("/skills")}function rv({filter:l,onSelect:s,onClose:i}){const[u,c]=G.useState([]),[f,h]=G.useState(!0),[v,k]=G.useState(0),g=G.useRef(null);G.useEffect(()=>{nv().then(c).catch(()=>c([])).finally(()=>h(!1))},[]);const x=u.filter(C=>C.name.toLowerCase().includes(l.toLowerCase())||C.description.toLowerCase().includes(l.toLowerCase()));return G.useEffect(()=>{k(0)},[l]),G.useEffect(()=>{function C(_){_.key==="ArrowDown"?(_.preventDefault(),k(I=>Math.min(I+1,x.length-1))):_.key==="ArrowUp"?(_.preventDefault(),k(I=>Math.max(I-1,0))):_.key==="Enter"?(_.preventDefault(),x[v]&&s(x[v])):_.key==="Escape"&&(_.preventDefault(),i())}return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[x,v,s,i]),d.jsxs("div",{className:"slash-popup",ref:g,children:[d.jsxs("div",{className:"slash-popup-header",children:[d.jsx("button",{className:"slash-popup-back",onClick:i,children:"← Back"}),d.jsx("span",{children:"Skills"})]}),f&&d.jsx("div",{className:"slash-popup-empty",children:"Loading skills…"}),!f&&x.length===0&&d.jsx("div",{className:"slash-popup-empty",children:"No matching skills"}),x.map((C,_)=>d.jsxs("div",{className:`slash-popup-item ${_===v?"selected":""}`,onMouseEnter:()=>k(_),onClick:()=>s(C),children:[d.jsxs("div",{className:"slash-popup-item-main",children:[d.jsx("span",{className:"slash-popup-label",children:C.name}),C.description&&d.jsx("span",{className:"slash-popup-hint",children:C.description})]}),!!C.metadata.isSystem&&d.jsx("span",{className:"slash-popup-hint",children:"system"})]},C.id))]})}function sv(){return ks("/providers")}const lv={dynamicModels:!1,skills:!1,plugins:!1,mcpServers:!1,imageAttachments:!1,sandbox:!1,webSearch:!1,networkAccess:!1,fileReferences:!1};function iv(l){const[s,i]=G.useState([]),[u,c]=G.useState(!0);G.useEffect(()=>{sv().then(i).catch(()=>i([])).finally(()=>c(!1))},[]);const f=s.find(h=>h.id===l)??null;return{provider:f,capabilities:(f==null?void 0:f.capabilities)??lv,loading:u}}const Ii=32,za=200;function af(l){if(!l)return{};try{return JSON.parse(l)}catch{return{}}}function ov(){const[l,s]=G.useState(""),i=G.useRef(null),{submitPrompt:u,cancelTurn:c,updateRuntimeConfig:f,setShowModelSelector:h}=X(),v=X(z=>z.activeSessionId),k=X(z=>z.activeSessionId?z.sessionDetails[z.activeSessionId]:null),g=X(z=>z.restoredPrompt),x=(k==null?void 0:k.is_running)===1,C=!v,{capabilities:_}=iv(k==null?void 0:k.runtime_type),[I,O]=G.useState(!1),[H,Y]=G.useState(""),[pe,de]=G.useState(0),[ae,W]=G.useState(void 0),[xe,he]=G.useState(!1),[ue,Ce]=G.useState(""),[Xe,Ye]=G.useState([]),Be=I?ev(H,_):[];G.useEffect(()=>{g!==null&&(s(g),requestAnimationFrame(()=>{i.current&&(i.current.style.height="auto",i.current.style.height=Math.min(i.current.scrollHeight,za)+"px")}),X.setState({restoredPrompt:null}))},[g]),G.useEffect(()=>{if(!x)return;function z(Q){Q.key==="Escape"&&(Q.preventDefault(),c())}return window.addEventListener("keydown",z),()=>window.removeEventListener("keydown",z)},[x,c]),G.useEffect(()=>{O(!1),W(void 0),he(!1),Ye([])},[v]);function Ze(){const z=i.current;z&&(z.style.height="auto",z.style.height=Math.min(z.scrollHeight,za)+"px")}function Ae(){const z=l.trim();if(!z||x)return;let Q=z;Xe.length>0&&(Q=`${Xe.map(ve=>`$${ve.name}`).join(" ")}
|
|
280
|
+
|
|
281
|
+
${z}`),s(""),Ye([]),i.current&&(i.current.style.height=Ii+"px"),O(!1),W(void 0),he(!1),u(Q)}function ie(z){z.subPopup?W(z.subPopup):z.id==="skills"?(he(!0),Ce(""),O(!1),s("")):z.id==="model"?(h(!0),O(!1),s("")):(O(!1),s(""))}function F(z){Ye(Q=>[...Q,z]),he(!1),s(""),i.current&&(i.current.style.height=Ii+"px")}function re(z){const Q=af(k==null?void 0:k.runtime_config);ae==="sandbox"?Q.sandboxMode=z:ae==="websearch"?Q.webSearchMode=z:ae==="network"&&(Q.networkAccessEnabled=z==="true"),f(Q),W(void 0),O(!1),s(""),i.current&&(i.current.style.height=Ii+"px")}function fe(z){if(I&&!ae){if(z.key==="ArrowDown"){z.preventDefault(),de(Q=>Math.min(Q+1,Be.length-1));return}if(z.key==="ArrowUp"){z.preventDefault(),de(Q=>Math.max(Q-1,0));return}if(z.key==="Enter"){z.preventDefault(),Be[pe]&&ie(Be[pe]);return}if(z.key==="Escape"){z.preventDefault(),O(!1),s("");return}}if(ae&&z.key==="Escape"){z.preventDefault(),W(void 0);return}if(z.key==="Enter"&&(z.metaKey||z.ctrlKey)&&!x){z.preventDefault(),Ae();return}z.key==="Escape"&&x&&(z.preventDefault(),c())}function U(z){const Q=z.target.value;s(Q),Ze(),Q.startsWith("/")&&!Q.includes(" ")&&!x?(O(!0),Y(Q.slice(1)),de(0)):(O(!1),W(void 0)),Q.startsWith("$")&&!x?(he(!0),Ce(Q.slice(1))):Q.startsWith("$")||he(!1)}const ee=af(k==null?void 0:k.runtime_config),B=[{value:"read-only",label:"Read Only",description:"Agent can only read files"},{value:"workspace-write",label:"Workspace Write",description:"Agent can read and write in workspace"},{value:"danger-full-access",label:"Danger Full Access",description:"Agent has unrestricted access"}],T=[{value:"disabled",label:"Disabled",description:"No web search"},{value:"cached",label:"Cached",description:"Use cached search results"},{value:"live",label:"Live",description:"Perform live web searches"}],L=[{value:"false",label:"Disabled",description:"No network access"},{value:"true",label:"Enabled",description:"Allow network access in sandbox"}];return d.jsxs("div",{className:"cmd-bar",children:[I&&!ae&&d.jsx(tv,{commands:Be,selectedIndex:pe,onSelect:ie,onHover:de}),I&&ae==="sandbox"&&d.jsx(Ma,{title:"Sandbox Mode",options:B,currentValue:ee.sandboxMode,onSelect:re,onClose:()=>W(void 0)}),I&&ae==="websearch"&&d.jsx(Ma,{title:"Web Search",options:T,currentValue:ee.webSearchMode,onSelect:re,onClose:()=>W(void 0)}),I&&ae==="network"&&d.jsx(Ma,{title:"Network Access",options:L,currentValue:ee.networkAccessEnabled===!0?"true":"false",onSelect:re,onClose:()=>W(void 0)}),xe&&d.jsx(rv,{filter:ue,onSelect:F,onClose:()=>{he(!1),s("")}}),Xe.length>0&&d.jsx("div",{className:"skill-badges",children:Xe.map(z=>d.jsxs("span",{className:"skill-badge",children:["$",z.name,d.jsx("button",{className:"skill-badge-remove",onClick:()=>Ye(Q=>Q.filter(ge=>ge.id!==z.id)),children:"×"})]},z.id))}),d.jsx("textarea",{ref:i,className:"cmd-textarea",placeholder:C?"Select or create a session…":x?"Agent is running…":"Type a message… Use / for commands",autoComplete:"off",value:l,disabled:x||C,rows:1,style:{minHeight:Ii,maxHeight:za},onChange:U,onKeyDown:fe}),x?d.jsx("button",{className:"cmd-stop-btn",onClick:()=>c(),title:"Stop (Esc)",children:d.jsx(mf,{size:15})}):d.jsx("button",{className:"cmd-send-btn",onClick:Ae,disabled:!l.trim()||C,title:"Send (⌘↵)",children:d.jsx(rm,{size:16})})]})}function av(){const l=X(I=>I.activeSessionId),s=X(I=>I.sessionDetails),i=X(I=>I.activeTurnIndex),u=X(I=>I.setActiveTurnIndex),c=X(I=>I.rewindToTurn),f=X(I=>I.branchFromTurn),h=l?s[l]:null,v=(h==null?void 0:h.turns)??[],k=(h==null?void 0:h.is_running)===1,[g,x]=G.useState(null),C=G.useRef(null);if(Ya(C,()=>x(null),!!g),qa(()=>x(null),!!g),v.length===0)return d.jsx("div",{className:"empty-state",children:"No turns yet"});function _(I){u(I),requestAnimationFrame(()=>{var O;(O=document.getElementById(`turn-${I}`))==null||O.scrollIntoView({behavior:"smooth",block:"start"})})}return d.jsxs("div",{className:"right-section",children:[d.jsx("div",{className:"right-section-title",children:"Conversation"}),v.map((I,O)=>{const H=O===i,Y=I.user_prompt.length>50?I.user_prompt.slice(0,50)+"…":I.user_prompt;return d.jsxs("div",{className:`turn-item ${H?"active":""}`,onClick:()=>_(O),onContextMenu:pe=>{pe.preventDefault(),x({x:pe.clientX,y:pe.clientY,turnId:I.id,turnIndex:O,isLast:O===v.length-1})},children:[d.jsx("span",{className:"turn-item-icon",style:{background:"var(--amber)",color:"#fff"},children:d.jsx(_m,{size:12})}),d.jsx("span",{className:"turn-item-label",children:Y})]},I.id)}),g&&d.jsxs("div",{ref:C,className:"ctx-menu",style:{position:"fixed",left:g.x,top:g.y,zIndex:500},children:[d.jsxs("div",{className:`ctx-menu-item ${g.isLast||k?"ctx-disabled":""}`,onClick:()=>{g.isLast||k||(c(l,g.turnId),x(null))},children:[d.jsx(ym,{size:12})," Rewind to Here"]}),d.jsxs("div",{className:"ctx-menu-item",onClick:()=>{f(l,g.turnId),x(null)},children:[d.jsx(fm,{size:12})," Branch from Here"]})]})]})}function If(l,s){if(!l||l.turns.length===0)return"—";const i=l.turns[0],u=l.turns[l.turns.length-1],c=s?null:u.updated_at;return Xh(i.created_at,c)}function uv(){const l=X(x=>x.activeSessionId),s=X(x=>l?x.sessions.find(C=>C.id===l)??null:null),i=X(x=>l?x.sessionDetails[l]??null:null);if(!s)return d.jsx("div",{className:"empty-state",children:"No session selected"});const u=bi(s),c=If(i,u.isRunning);let f=0,h=0,v=0;if(i)for(const x of i.turns)x.token_usage&&(f+=x.token_usage.input_tokens,h+=x.token_usage.output_tokens,v+=x.token_usage.reasoning_output_tokens);const k=(i==null?void 0:i.turns.length)??0,g=s.cwd?s.cwd.split("/").pop()||s.cwd:"—";return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"right-section",children:[d.jsx("div",{className:"right-section-title",children:"Session"}),d.jsxs("div",{className:"metric-row",children:[d.jsx("span",{className:"metric-label",children:"Runtime"}),d.jsx("span",{className:"metric-val",children:"Codex"})]}),d.jsxs("div",{className:"metric-row",children:[d.jsx("span",{className:"metric-label",children:"Model"}),d.jsx("span",{className:"metric-val",children:s.model||"default"})]}),d.jsxs("div",{className:"metric-row",children:[d.jsx("span",{className:"metric-label",children:"Repo"}),d.jsx("span",{className:"metric-val",title:s.cwd||void 0,children:g})]}),d.jsxs("div",{className:"metric-row",children:[d.jsx("span",{className:"metric-label",children:"Turns"}),d.jsx("span",{className:"metric-val",children:k})]}),d.jsxs("div",{className:"metric-row",children:[d.jsx("span",{className:"metric-label",children:"Duration"}),d.jsx("span",{className:"metric-val",children:c})]}),d.jsxs("div",{className:"metric-row",children:[d.jsx("span",{className:"metric-label",children:"Status"}),d.jsx("span",{className:"metric-val",children:d.jsxs("span",{className:"badge badge-running",children:[d.jsx($i,{status:u.dot,size:5})," ",u.label]})})]})]}),d.jsxs("div",{className:"right-section",children:[d.jsx("div",{className:"right-section-title",children:"Resources"}),d.jsxs("div",{className:"metric-row",children:[d.jsx("span",{className:"metric-label",children:"Tokens In"}),d.jsx("span",{className:"metric-val",children:f.toLocaleString()})]}),d.jsxs("div",{className:"metric-row",children:[d.jsx("span",{className:"metric-label",children:"Tokens Out"}),d.jsx("span",{className:"metric-val",children:h.toLocaleString()})]}),v>0&&d.jsxs("div",{className:"metric-row",children:[d.jsx("span",{className:"metric-label",children:"Reasoning"}),d.jsx("span",{className:"metric-val",children:v.toLocaleString()})]}),d.jsxs("div",{className:"metric-row",children:[d.jsx("span",{className:"metric-label",children:"Cost"}),d.jsx("span",{className:"metric-val",style:{color:"var(--amber)"},children:"—"})]})]}),d.jsxs("div",{className:"right-section",children:[d.jsx("div",{className:"right-section-title",children:"Metadata"}),d.jsxs("div",{className:"metric-row",children:[d.jsx("span",{className:"metric-label",children:"Created"}),d.jsx("span",{className:"metric-val",style:{fontSize:"11px"},children:new Date(s.created_at).toLocaleString()})]}),d.jsxs("div",{className:"metric-row",children:[d.jsx("span",{className:"metric-label",children:"Thread ID"}),d.jsx("span",{className:"metric-val",style:{fontSize:"10px",color:"var(--text-muted)"},children:s.external_thread_id?s.external_thread_id.slice(0,16)+"…":"—"})]})]})]})}function cv(){const{activeSessionId:l,sessionDetails:s,changesScope:i,setChangesScope:u,activeTurnIndex:c,setSelectedChangePath:f}=X(),h=l?s[l]:null,v=(h==null?void 0:h.turns)??[],k=Lf(v,i,c);return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"changes-scope-toggle",children:[d.jsx("button",{className:`scope-btn ${i==="session"?"active":""}`,onClick:()=>u("session"),children:"Session"}),d.jsx("button",{className:`scope-btn ${i==="turngroup"?"active":""}`,onClick:()=>u("turngroup"),children:"Current Turn"})]}),k.length===0?d.jsx("div",{className:"empty-state",children:"No file changes in this scope"}):d.jsxs("div",{className:"right-section",children:[d.jsxs("div",{className:"right-section-title",children:["Changed Files (",k.length,")"]}),k.map(g=>{const x=g.kind==="add"?"fc-add":g.kind==="delete"?"fc-del":"fc-mod",C=g.kind==="add"?"A":g.kind==="delete"?"D":"M",_=g.path.split("/").pop()||g.path,I=g.path.replace("/"+_,"");return d.jsxs("div",{className:"file-change clickable",onClick:()=>f(g.path),children:[d.jsx("span",{className:`fc-status ${x}`,children:C}),d.jsxs("span",{className:"fc-name",children:[I&&d.jsxs("span",{style:{color:"var(--text-muted)"},children:[I,"/"]}),_]})]},g.path)})]})]})}function dv(){const l=X(i=>i.eventLog);if(l.length===0)return d.jsx("div",{className:"empty-state",children:"No events logged yet"});const s=[...l].reverse();return d.jsxs("div",{className:"right-section",children:[d.jsx("div",{className:"right-section-title",children:"Event Log"}),s.map((i,u)=>d.jsxs("div",{className:"log-entry",children:[d.jsx("span",{className:"log-time",children:i.time}),d.jsx("span",{className:`log-level log-${i.level.toLowerCase()}`,children:i.level}),d.jsx("span",{className:"log-msg",children:i.message})]},u))]})}const fv=[{id:"turns",label:"Turns"},{id:"metrics",label:"Metrics"},{id:"changes",label:"Changes"},{id:"logs",label:"Logs"}];function pv(){const{activeRightTab:l,switchRightTab:s}=X();return d.jsxs("div",{className:"ide-right",children:[d.jsx("div",{className:"right-tabs",children:fv.map(i=>d.jsx("div",{className:`right-tab ${l===i.id?"active":""}`,onClick:()=>s(i.id),children:i.label},i.id))}),d.jsxs("div",{className:"right-content",children:[l==="turns"&&d.jsx(av,{}),l==="metrics"&&d.jsx(uv,{}),l==="changes"&&d.jsx(cv,{}),l==="logs"&&d.jsx(dv,{})]})]})}const ye={low:{effort:"low",label:"Low"},medium:{effort:"medium",label:"Medium"},high:{effort:"high",label:"High"},xhigh:{effort:"xhigh",label:"Extra High"},max:{effort:"max",label:"Max"},ultra:{effort:"ultra",label:"Ultra"}},Wa=[{id:"codex",label:"Codex",available:!0,models:[{slug:"gpt-5.6-sol",displayName:"GPT-5.6-Sol",description:"Flagship — complex, open-ended work",defaultReasoning:"low",reasoningLevels:[ye.low,ye.medium,ye.high,ye.xhigh,ye.max,ye.ultra]},{slug:"gpt-5.6-terra",displayName:"GPT-5.6-Terra",description:"Balanced all-rounder for everyday work",defaultReasoning:"medium",reasoningLevels:[ye.low,ye.medium,ye.high,ye.xhigh,ye.max,ye.ultra]},{slug:"gpt-5.6-luna",displayName:"GPT-5.6-Luna",description:"Fast, affordable — clear, repeatable tasks",defaultReasoning:"medium",reasoningLevels:[ye.low,ye.medium,ye.high,ye.xhigh,ye.max]},{slug:"gpt-5.5",displayName:"GPT-5.5",description:"Previous-gen frontier model",defaultReasoning:"medium",reasoningLevels:[ye.low,ye.medium,ye.high,ye.xhigh]}]},{id:"claude",label:"Claude",available:!0,models:[{slug:"claude-sonnet-5",displayName:"Claude Sonnet 5",description:"Balanced all-rounder for everyday work",defaultReasoning:"medium",reasoningLevels:[ye.low,ye.medium,ye.high,ye.xhigh,ye.max]},{slug:"claude-opus-5",displayName:"Claude Opus 5",description:"Deep reasoning for complex tasks",defaultReasoning:"medium",reasoningLevels:[ye.low,ye.medium,ye.high,ye.xhigh,ye.max]},{slug:"claude-fable-5",displayName:"Claude Fable 5",description:"Fast and efficient for simple tasks",defaultReasoning:"medium",reasoningLevels:[ye.low,ye.medium,ye.high,ye.xhigh,ye.max]}]}];function hv(l){return Wa.find(s=>s.id===l)}function iu(l){const s=hv(l);return(s==null?void 0:s.models)??[]}function Af(l,s){return iu(l).find(i=>i.slug===s)}function Va(l,s){var i;return((i=Af(l,s))==null?void 0:i.reasoningLevels)??[]}function Ga(l,s){var i;return(i=Af(l,s))==null?void 0:i.defaultReasoning}function mv(){const{activeSessionId:l,sessions:s,updateModelConfig:i}=X(),u=X(F=>F.showModelSelector),c=X(F=>F.setShowModelSelector),f=s.find(F=>F.id===l),h=X(F=>F.models),v=X(F=>F.modelsLoading),k=X(F=>F.loadModels),[g,x]=G.useState(!1),C=G.useRef(null);if(Ya(C,()=>x(!1),g),qa(()=>x(!1),g),G.useEffect(()=>{u&&(x(!0),c(!1))},[u,c]),G.useEffect(()=>{f!=null&&f.runtime_type&&k(f.runtime_type)},[f==null?void 0:f.runtime_type,k]),!f)return null;const _=f.runtime_type,I=f.model??"",O=f.model_reasoning_effort??"",H=h.length>0?h:[],Y=iu(_),de=[...H.length>0?H:Y];if(I&&!de.some(F=>F.slug===I)){const F=Y[0];de.unshift({slug:I,displayName:I,description:"Custom model",defaultReasoning:(F==null?void 0:F.defaultReasoning)??"medium",reasoningLevels:(F==null?void 0:F.reasoningLevels)??[]})}function ae(F){return de.find(re=>re.slug===F)}function W(F){var re;return H.length>0?((re=ae(F))==null?void 0:re.reasoningLevels)??[]:Va(_,F)}function xe(F){var re;return H.length>0?(re=ae(F))==null?void 0:re.defaultReasoning:Ga(_,F)}const he=Wa.find(F=>F.id===_),ue=ae(I),Ce=I?W(I):[],Xe=(he==null?void 0:he.label)??_,Ye=(ue==null?void 0:ue.displayName)??(I||"Default"),Be=Ce.find(F=>F.effort===O),Ze=(Be==null?void 0:Be.label)??(O||"Default");function Ae(F){var ee;const re=W(F),U=re.some(B=>B.effort===O)?O:xe(F)??((ee=re[0])==null?void 0:ee.effort)??"";i(F,U),x(!1)}function ie(F){i(I,F),x(!1)}return d.jsxs("div",{className:"model-selector",ref:C,children:[d.jsxs("button",{className:"model-selector-btn",onClick:()=>x(!g),title:"Change model and thinking level",children:[d.jsx("span",{className:"model-selector-provider",children:Xe}),d.jsx("span",{className:"model-selector-sep",children:"›"}),d.jsx("span",{className:"model-selector-model",children:Ye}),Ze!=="Default"&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"model-selector-sep",children:"›"}),d.jsx("span",{className:"model-selector-reasoning",children:Ze})]}),d.jsx(ba,{size:12,className:"model-selector-chevron"})]}),g&&d.jsxs("div",{className:"model-selector-popover",children:[d.jsxs("div",{className:"model-selector-column",children:[d.jsx("div",{className:"model-selector-col-header",children:"Provider"}),Wa.map(F=>d.jsxs("div",{className:`model-selector-item ${F.id===_?"selected":""} ${F.available?"":"disabled"}`,onClick:()=>{if(F.available){if(F.id===_){x(!1);return}i("","",F.id)}},children:[d.jsx("span",{children:F.label}),!F.available&&d.jsxs("span",{className:"model-selector-coming-soon",children:[d.jsx(gm,{size:10})," Soon"]}),F.id===_&&d.jsx(Ra,{size:12})]},F.id))]}),d.jsxs("div",{className:"model-selector-column",children:[d.jsx("div",{className:"model-selector-col-header",children:"Model"}),v&&d.jsx("div",{className:"model-selector-empty",children:"Loading models…"}),!v&&de.length===0&&d.jsx("div",{className:"model-selector-empty",children:"No models available"}),de.map(F=>d.jsxs("div",{className:`model-selector-item ${F.slug===I?"selected":""}`,onClick:()=>Ae(F.slug),children:[d.jsxs("div",{className:"model-selector-item-main",children:[d.jsx("span",{className:"model-selector-item-name",children:F.displayName}),d.jsx("span",{className:"model-selector-item-desc",children:F.description})]}),F.slug===I&&d.jsx(Ra,{size:12})]},F.slug))]}),d.jsxs("div",{className:"model-selector-column",children:[d.jsx("div",{className:"model-selector-col-header",children:"Thinking"}),Ce.length===0&&d.jsx("div",{className:"model-selector-empty",children:"Select a model first"}),Ce.map(F=>d.jsxs("div",{className:`model-selector-item ${F.effort===O?"selected":""}`,onClick:()=>ie(F.effort),children:[d.jsx("span",{children:F.label}),F.effort===O&&d.jsx(Ra,{size:12})]},F.effort))]})]})]})}function gv(){const l=X(h=>h.activeSessionId),s=X(h=>l?h.sessions.find(v=>v.id===l)??null:null),i=X(h=>l?h.sessionDetails[l]??null:null),u=X(h=>h.wsConnected);if(!s)return d.jsxs("div",{className:"ide-statusbar",children:[d.jsxs("div",{className:"sb-item",children:[d.jsx(zd,{size:14})," AgentPane"]}),d.jsx("div",{className:"sb-divider",children:"|"}),d.jsxs("div",{className:"sb-item",title:u?"WebSocket connected":"WebSocket disconnected",children:[d.jsx("span",{className:`status-dot ${u?"done":"error"}`}),u?"Live":"Offline"]}),d.jsx("div",{className:"sb-spacer"}),d.jsxs("div",{className:"sb-item",children:[d.jsx(Md,{size:14})," K"]})]});const c=bi(s),f=If(i,c.isRunning);return d.jsxs("div",{className:"ide-statusbar",children:[d.jsxs("div",{className:"sb-item",children:[d.jsx(zd,{size:14})," AgentPane"]}),d.jsx("div",{className:"sb-divider",children:"|"}),d.jsx(mv,{}),d.jsx("div",{className:"sb-spacer"}),d.jsxs("div",{className:"sb-item",title:u?"WebSocket connected":"WebSocket disconnected",children:[d.jsx("span",{className:`status-dot ${u?"done":"error"}`}),u?"Live":"Offline"]}),d.jsx("div",{className:"sb-divider",children:"|"}),d.jsxs("div",{className:"sb-item",style:s.status==="failed"?{color:"var(--red)"}:void 0,children:[d.jsx($i,{status:c.dot})," ",c.label]}),d.jsx("div",{className:"sb-divider",children:"|"}),d.jsx("div",{className:"sb-item",children:f}),d.jsx("div",{className:"sb-divider",children:"|"}),d.jsxs("div",{className:"sb-item",children:[d.jsx(Md,{size:14})," K"]})]})}function vv(){return d.jsxs("div",{className:"ide-root",children:[d.jsxs("div",{className:"ide-layout",children:[d.jsx(Cm,{}),d.jsxs("div",{className:"ide-center",children:[d.jsx(jm,{}),d.jsx("div",{className:"ide-render",children:d.jsx(Zg,{})}),d.jsx(ov,{})]}),d.jsx(pv,{})]}),d.jsx(gv,{})]})}function yv(){const{showNewSessionDialog:l,setShowNewSessionDialog:s,createSession:i,lastModelConfig:u}=X(),c=(u==null?void 0:u.provider)??"codex",f=(u==null?void 0:u.model)??"",h=(u==null?void 0:u.reasoning)??"",[v,k]=G.useState(""),[g,x]=G.useState(f),[C,_]=G.useState(h),[I,O]=G.useState("");if(!l)return null;const H=iu(c),Y=g?Va(c,g):[];function pe(){i({title:v.trim()||void 0,model:g||void 0,model_reasoning_effort:C||void 0,cwd:I.trim()||void 0,runtime_type:c}),k(""),O("")}function de(W){W.key==="Escape"&&s(!1)}function ae(W){var ue;x(W);const xe=Va(c,W);xe.some(Ce=>Ce.effort===C)||_(Ga(c,W)??((ue=xe[0])==null?void 0:ue.effort)??"")}return d.jsx("div",{className:"dialog-overlay",onClick:()=>s(!1),children:d.jsxs("div",{className:"dialog",onClick:W=>W.stopPropagation(),onKeyDown:de,children:[d.jsxs("div",{className:"dialog-header",children:[d.jsx("span",{className:"dialog-title",children:"New Session"}),d.jsx("button",{className:"dialog-close",onClick:()=>s(!1),children:d.jsx(Fi,{size:16})})]}),d.jsxs("div",{className:"dialog-body",children:[d.jsxs("label",{className:"dialog-label",children:["Title (optional)",d.jsx("input",{className:"dialog-input",type:"text",value:v,onChange:W=>k(W.target.value),placeholder:"e.g. refactor auth module",autoFocus:!0})]}),d.jsxs("label",{className:"dialog-label",children:["Model",d.jsxs("select",{className:"dialog-input dialog-select",value:g,onChange:W=>ae(W.target.value),children:[d.jsx("option",{value:"",children:"Default (Codex picks)"}),H.map(W=>d.jsxs("option",{value:W.slug,children:[W.displayName," — ",W.description]},W.slug))]})]}),Y.length>0&&d.jsxs("label",{className:"dialog-label",children:["Thinking Level",d.jsxs("select",{className:"dialog-input dialog-select",value:C,onChange:W=>_(W.target.value),children:[d.jsxs("option",{value:"",children:["Default (",Ga(c,g),")"]}),Y.map(W=>d.jsx("option",{value:W.effort,children:W.label},W.effort))]})]}),d.jsxs("label",{className:"dialog-label",children:["Working Directory (optional)",d.jsx("input",{className:"dialog-input",type:"text",value:I,onChange:W=>O(W.target.value),placeholder:"e.g. /Users/me/projects/my-app"})]})]}),d.jsxs("div",{className:"dialog-footer",children:[d.jsx("button",{className:"dialog-btn-cancel",onClick:()=>s(!1),children:"Cancel"}),d.jsx("button",{className:"dialog-btn-create",onClick:pe,children:"Create"})]})]})})}function xv(){const l=X(C=>C.showCommandPalette),s=X(C=>C.setShowCommandPalette),i=X(),[u,c]=G.useState(""),[f,h]=G.useState(0),v=G.useRef(null),k=G.useMemo(()=>{const C=i.activeSessionId?i.sessionDetails[i.activeSessionId]:null,_=(C==null?void 0:C.is_running)===1;return[{id:"new-session",label:"New Session",hint:"Create a new Codex session",icon:gl,action:()=>i.setShowNewSessionDialog(!0),available:!0},{id:"delete-session",label:"Delete Session",hint:"Delete the active session",icon:Ai,action:()=>{i.activeSessionId&&i.deleteSession(i.activeSessionId)},available:!!i.activeSessionId},{id:"send-message",label:"Send Message",hint:"Focus the message input",icon:wm,action:()=>{const I=document.querySelector(".cmd-input");I==null||I.focus()},available:!!i.activeSessionId&&!_},{id:"cancel-turn",label:"Cancel Turn",hint:"Cancel the running turn",icon:mf,action:()=>i.cancelTurn(),available:_},{id:"tab-turns",label:"Switch to Turns Tab",hint:"View conversation timeline",icon:mm,action:()=>i.switchRightTab("turns"),available:!!i.activeSessionId},{id:"tab-metrics",label:"Switch to Metrics Tab",hint:"View token usage and session info",icon:sm,action:()=>i.switchRightTab("metrics"),available:!!i.activeSessionId},{id:"tab-changes",label:"Switch to Changes Tab",hint:"View file changes",icon:um,action:()=>i.switchRightTab("changes"),available:!!i.activeSessionId},{id:"tab-logs",label:"Switch to Logs Tab",hint:"View event log",icon:km,action:()=>i.switchRightTab("logs"),available:!!i.activeSessionId},{id:"close-tab",label:"Close Tab",hint:"Close the active session tab",icon:Fi,action:()=>{i.activeSessionId&&i.closeTab(i.activeSessionId)},available:!!i.activeSessionId}]},[i]),g=G.useMemo(()=>{const C=u.toLowerCase().trim(),_=k.filter(I=>I.available);return C?_.filter(I=>I.label.toLowerCase().includes(C)||I.hint.toLowerCase().includes(C)):_},[k,u]);G.useEffect(()=>{l&&(c(""),h(0),setTimeout(()=>{var C;return(C=v.current)==null?void 0:C.focus()},50))},[l]);function x(C){if(C.key==="ArrowDown")C.preventDefault(),h(_=>Math.min(_+1,g.length-1));else if(C.key==="ArrowUp")C.preventDefault(),h(_=>Math.max(_-1,0));else if(C.key==="Enter"){C.preventDefault();const _=g[f];_&&(_.action(),s(!1))}else C.key==="Escape"&&s(!1)}return l?d.jsx("div",{className:"palette-overlay",onClick:()=>s(!1),children:d.jsxs("div",{className:"palette",onClick:C=>C.stopPropagation(),children:[d.jsxs("div",{className:"palette-search",children:[d.jsx("input",{ref:v,type:"text",placeholder:"Type a command…",value:u,onChange:C=>{c(C.target.value),h(0)},onKeyDown:x}),d.jsx("span",{className:"palette-esc",children:"ESC"})]}),g.length===0?d.jsx("div",{className:"palette-empty",children:"No matching commands"}):d.jsx("div",{className:"palette-list",children:g.map((C,_)=>{const I=C.icon;return d.jsxs("div",{className:`palette-item ${_===f?"selected":""}`,onClick:()=>{C.action(),s(!1)},onMouseEnter:()=>h(_),children:[d.jsx("span",{className:"palette-item-icon",children:d.jsx(I,{size:16})}),d.jsx("span",{className:"palette-item-label",children:C.label}),d.jsx("span",{className:"palette-item-hint",children:C.hint}),_===f&&d.jsx(am,{size:12,className:"palette-item-enter"})]},C.id)})}),d.jsxs("div",{className:"palette-footer",children:[d.jsxs("span",{className:"palette-footer-hint",children:[d.jsx("span",{className:"kbd",children:"↑"}),d.jsx("span",{className:"kbd",children:"↓"})," Navigate"]}),d.jsxs("span",{className:"palette-footer-hint",children:[d.jsx("span",{className:"kbd",children:"↵"})," Select"]}),d.jsxs("span",{className:"palette-footer-hint",children:[d.jsx("span",{className:"kbd",children:"Esc"})," Close"]})]})]})}):null}const kv={success:im,error:lm,info:pm,warn:Sm},wv=4e3;function Sv({toast:l}){const s=X(h=>h.removeToast),i=kv[l.type],u=G.useRef(null);G.useEffect(()=>{function h(){u.current=setTimeout(()=>s(l.id),wv)}return h(),()=>{u.current&&clearTimeout(u.current)}},[l.id,s]);function c(){u.current&&(clearTimeout(u.current),u.current=null)}function f(){u.current=setTimeout(()=>s(l.id),2e3)}return d.jsxs("div",{className:`toast toast-${l.type}`,onMouseEnter:c,onMouseLeave:f,children:[d.jsx(i,{size:16}),d.jsx("span",{className:"toast-message",children:l.message}),l.undoAction&&d.jsxs("button",{className:"toast-undo",onClick:()=>{var h;(h=l.undoAction)==null||h.call(l),s(l.id)},children:[d.jsx(Tm,{size:12})," ",l.undoLabel||"Undo"]}),d.jsx("button",{className:"toast-close",onClick:()=>s(l.id),children:d.jsx(Fi,{size:14})})]})}function Tv(){const l=X(s=>s.toasts);return l.length===0?null:d.jsx("div",{className:"toast-container",children:l.map(s=>d.jsx(Sv,{toast:s},s.id))})}let Qt=null,xs=null,yl=1e3;const _v=1e4;function Nv(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function Qa(){Qt&&(Qt.readyState===WebSocket.OPEN||Qt.readyState===WebSocket.CONNECTING)||(Qt=new WebSocket(Nv()),Qt.onopen=()=>{const l=yl>1e3;if(yl=1e3,X.getState().setWsConnected(!0),X.getState().addLogEntry("INFO","WebSocket connected"),l){const s=X.getState();s.activeSessionId&&(s.refreshActiveSession(),s.addToast("info","WebSocket reconnected — session state reconciled"))}},Qt.onclose=()=>{X.getState().setWsConnected(!1),X.getState().addLogEntry("WARN","WebSocket disconnected"),X.getState().addToast("warn","WebSocket disconnected — reconnecting…"),Cv()},Qt.onerror=()=>{},Qt.onmessage=l=>{try{const s=JSON.parse(l.data),i=jv[s.event];i&&i(s.data)}catch{}})}function Ev(){xs&&(clearTimeout(xs),xs=null),Qt&&(Qt.onclose=null,Qt.close(),Qt=null),X.getState().setWsConnected(!1)}function Cv(){xs||(xs=window.setTimeout(()=>{xs=null,Qa()},yl),yl=Math.min(yl*2,_v))}const jv={"turn:started":l=>{const s=l;X.getState().onTurnStarted(s.sessionId,s.turnId)},"item:started":l=>{const s=l;X.getState().onItemStarted(s.sessionId,s.turnId,s.item)},"item:updated":l=>{const s=l;X.getState().onItemUpdated(s.sessionId,s.turnId,s.item)},"item:completed":l=>{const s=l;X.getState().onItemCompleted(s.sessionId,s.turnId,s.item)},"item:delta":l=>{const s=l;X.getState().onItemDelta(s.sessionId,s.turnId,s.itemId,s.delta)},"turn:completed":l=>{const s=l;X.getState().onTurnCompleted(s.sessionId,s.turnId,s.usage,s.hasUnreviewed)},"turn:tokenUsage":l=>{const s=l;X.getState().onTokenUsageUpdated(s.sessionId,s.turnId,s.usage)},"turn:failed":l=>{const s=l;X.getState().onTurnFailed(s.sessionId,s.turnId,s.error)},"turn:cancelled":l=>{const s=l;X.getState().onTurnCancelled(s.sessionId,s.turnId)},"session:title":l=>{const s=l;X.getState().onSessionTitle(s.sessionId,s.title)}};function Rv(){const l=X(s=>s.init);return G.useEffect(()=>{l(),Qa();function s(){if(document.visibilityState!=="visible")return;const i=X.getState(),u=i.activeSessionId;if(!u)return;const c=i.sessionDetails[u];i.wsConnected||Qa(),c&&c.is_running===1&&(i.refreshActiveSession(),i.addLogEntry("INFO","Tab returned — reconciling session state"))}return document.addEventListener("visibilitychange",s),()=>{Ev(),document.removeEventListener("visibilitychange",s)}},[l]),null}function Lv(){const l=X(c=>c.loading),s=X(c=>c.error),i=X(c=>c.sessions),u=X(c=>c.setShowCommandPalette);return G.useEffect(()=>{function c(f){(f.metaKey||f.ctrlKey)&&f.key==="k"&&(f.preventDefault(),u(!0))}return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[u]),d.jsxs(d.Fragment,{children:[d.jsx(Rv,{}),l&&i.length===0?d.jsx("div",{className:"empty-state",children:"Loading sessions…"}):s&&i.length===0?d.jsxs("div",{className:"empty-state",children:["Error: ",s]}):d.jsxs(d.Fragment,{children:[d.jsx(vv,{}),d.jsx(yv,{}),d.jsx(xv,{}),d.jsx(Tv,{})]})]})}Sh.createRoot(document.getElementById("root")).render(d.jsx(pl.StrictMode,{children:d.jsx(Lv,{})}));
|