repoburg 1.3.199 → 1.3.202

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.
Files changed (136) hide show
  1. package/agent-pane/backend/data.db +0 -0
  2. package/agent-pane/backend/data.db-shm +0 -0
  3. package/agent-pane/backend/data.db-wal +0 -0
  4. package/agent-pane/backend/dist/index.js +1658 -277
  5. package/agent-pane/backend/src/claude/claude-provider.test.ts +393 -3
  6. package/agent-pane/backend/src/claude/claude-provider.ts +53 -50
  7. package/agent-pane/backend/src/db/index.ts +12 -0
  8. package/agent-pane/backend/src/index.ts +5 -2
  9. package/agent-pane/backend/src/integration/threads-claude-fork.test.ts +241 -0
  10. package/agent-pane/backend/src/providers/index.ts +3 -1
  11. package/agent-pane/backend/src/providers/runtime-provider.ts +6 -0
  12. package/agent-pane/backend/src/repoburg/action-mapping.test.ts +122 -0
  13. package/agent-pane/backend/src/repoburg/action-mapping.ts +294 -0
  14. package/agent-pane/backend/src/repoburg/agent-runtime-client.test.ts +271 -0
  15. package/agent-pane/backend/src/repoburg/agent-runtime-client.ts +285 -0
  16. package/agent-pane/backend/src/repoburg/backend-resolver.test.ts +356 -0
  17. package/agent-pane/backend/src/repoburg/backend-resolver.ts +261 -0
  18. package/agent-pane/backend/src/repoburg/repoburg-client.test.ts +180 -0
  19. package/agent-pane/backend/src/repoburg/repoburg-client.ts +194 -0
  20. package/agent-pane/backend/src/repoburg/repoburg-provider.test.ts +780 -0
  21. package/agent-pane/backend/src/repoburg/repoburg-provider.ts +471 -0
  22. package/agent-pane/backend/src/repoburg/turn-projector.test.ts +621 -0
  23. package/agent-pane/backend/src/repoburg/turn-projector.ts +637 -0
  24. package/agent-pane/backend/src/routes/providers.test.ts +18 -1
  25. package/agent-pane/backend/src/routes/providers.ts +19 -1
  26. package/agent-pane/backend/src/routes/sessions.test.ts +215 -1
  27. package/agent-pane/backend/src/routes/sessions.ts +82 -9
  28. package/agent-pane/backend/src/routes/threads.ts +21 -6
  29. package/agent-pane/backend/src/routes/turns.test.ts +45 -1
  30. package/agent-pane/frontend/dist/assets/index-CJxD4YmJ.js +370 -0
  31. package/agent-pane/frontend/dist/assets/{index-Dwwhx7YN.css → index-r-xwfOKQ.css} +1 -1
  32. package/agent-pane/frontend/dist/index.html +2 -2
  33. package/agent-pane/frontend/src/api/sessions.test.ts +1 -0
  34. package/agent-pane/frontend/src/api/websocket.test.ts +2 -2
  35. package/agent-pane/frontend/src/api/websocket.ts +3 -1
  36. package/agent-pane/frontend/src/components/AskUserItem.test.tsx +143 -0
  37. package/agent-pane/frontend/src/components/AskUserItem.tsx +207 -0
  38. package/agent-pane/frontend/src/components/CommentableText.test.tsx +196 -0
  39. package/agent-pane/frontend/src/components/CommentableText.tsx +109 -21
  40. package/agent-pane/frontend/src/components/IdeWorkspace.test.tsx +39 -0
  41. package/agent-pane/frontend/src/components/IdeWorkspace.tsx +28 -2
  42. package/agent-pane/frontend/src/components/ResizeHandle.tsx +29 -0
  43. package/agent-pane/frontend/src/components/TurnContent.test.tsx +79 -0
  44. package/agent-pane/frontend/src/components/TurnContent.tsx +49 -3
  45. package/agent-pane/frontend/src/components/panels/ThreadsPanel.tsx +35 -3
  46. package/agent-pane/frontend/src/components/panels/TurnsPanel.test.tsx +48 -0
  47. package/agent-pane/frontend/src/components/panels/TurnsPanel.tsx +7 -2
  48. package/agent-pane/frontend/src/constants/models.ts +37 -0
  49. package/agent-pane/frontend/src/hooks/useResizable.test.ts +97 -0
  50. package/agent-pane/frontend/src/hooks/useResizable.ts +75 -0
  51. package/agent-pane/frontend/src/store/store.test.ts +54 -0
  52. package/agent-pane/frontend/src/store/uiSlice.ts +50 -0
  53. package/agent-pane/frontend/src/store/wsSlice.ts +10 -3
  54. package/agent-pane/frontend/src/styles/app.css +26 -1
  55. package/agent-pane/frontend/src/test/component-helpers.ts +2 -0
  56. package/agent-pane/frontend/src/test/fixtures.ts +1 -0
  57. package/agent-pane/frontend/src/types/index.ts +2 -0
  58. package/agent-pane/frontend/src/utils/duration.test.ts +1 -0
  59. package/agent-pane/shared/types.ts +17 -0
  60. package/agent-pane-bug-repro-no-agent-reply.png +0 -0
  61. package/askuser-after-step5-postgres-selected.png +0 -0
  62. package/askuser-after-step7-answer-sent.png +0 -0
  63. package/askuser-card-visible.png +0 -0
  64. package/backend/dist/src/agent-runtime/agent-runtime-event-emitter.d.ts +36 -0
  65. package/backend/dist/src/agent-runtime/agent-runtime-event-emitter.js +199 -0
  66. package/backend/dist/src/agent-runtime/agent-runtime-event-emitter.js.map +1 -0
  67. package/backend/dist/src/agent-runtime/agent-runtime.controller.d.ts +11 -0
  68. package/backend/dist/src/agent-runtime/agent-runtime.controller.js +91 -0
  69. package/backend/dist/src/agent-runtime/agent-runtime.controller.js.map +1 -0
  70. package/backend/dist/src/agent-runtime/agent-runtime.module.d.ts +2 -0
  71. package/backend/dist/src/agent-runtime/agent-runtime.module.js +26 -0
  72. package/backend/dist/src/agent-runtime/agent-runtime.module.js.map +1 -0
  73. package/backend/dist/src/agent-runtime/agent-runtime.types.d.ts +92 -0
  74. package/backend/dist/src/agent-runtime/agent-runtime.types.js +3 -0
  75. package/backend/dist/src/agent-runtime/agent-runtime.types.js.map +1 -0
  76. package/backend/dist/src/app.controller.d.ts +1 -0
  77. package/backend/dist/src/app.module.js +4 -0
  78. package/backend/dist/src/app.module.js.map +1 -1
  79. package/backend/dist/src/app.service.d.ts +1 -0
  80. package/backend/dist/src/app.service.js +4 -1
  81. package/backend/dist/src/app.service.js.map +1 -1
  82. package/backend/dist/src/interactive-chat/chat.module.js +4 -0
  83. package/backend/dist/src/interactive-chat/chat.module.js.map +1 -1
  84. package/backend/dist/src/interactive-chat/chat.service.d.ts +7 -1
  85. package/backend/dist/src/interactive-chat/chat.service.js +54 -7
  86. package/backend/dist/src/interactive-chat/chat.service.js.map +1 -1
  87. package/backend/dist/src/llm-orchestration/action-handlers/invoke-subagent.handler.js +12 -1
  88. package/backend/dist/src/llm-orchestration/action-handlers/invoke-subagent.handler.js.map +1 -1
  89. package/backend/dist/src/llm-orchestration/hooks/frontend-notification.hook.d.ts +3 -1
  90. package/backend/dist/src/llm-orchestration/hooks/frontend-notification.hook.js +20 -2
  91. package/backend/dist/src/llm-orchestration/hooks/frontend-notification.hook.js.map +1 -1
  92. package/backend/dist/src/llm-orchestration/llm-orchestration.interfaces.d.ts +1 -0
  93. package/backend/dist/src/llm-orchestration/llm-orchestration.interfaces.js +1 -0
  94. package/backend/dist/src/llm-orchestration/llm-orchestration.interfaces.js.map +1 -1
  95. package/backend/dist/src/llm-orchestration/llm-orchestration.module.js +2 -0
  96. package/backend/dist/src/llm-orchestration/llm-orchestration.module.js.map +1 -1
  97. package/backend/dist/src/llm-orchestration/llm-turn-processor.service.d.ts +4 -1
  98. package/backend/dist/src/llm-orchestration/llm-turn-processor.service.js +37 -2
  99. package/backend/dist/src/llm-orchestration/llm-turn-processor.service.js.map +1 -1
  100. package/backend/dist/src/llm-provider/ollama-llm.provider.d.ts +1 -0
  101. package/backend/dist/src/llm-provider/ollama-llm.provider.js +19 -1
  102. package/backend/dist/src/llm-provider/ollama-llm.provider.js.map +1 -1
  103. package/backend/dist/src/llm-responses/llm-responses.module.js +4 -0
  104. package/backend/dist/src/llm-responses/llm-responses.module.js.map +1 -1
  105. package/backend/dist/src/llm-responses/llm-responses.service.d.ts +4 -1
  106. package/backend/dist/src/llm-responses/llm-responses.service.js +52 -2
  107. package/backend/dist/src/llm-responses/llm-responses.service.js.map +1 -1
  108. package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
  109. package/daemon/dist/api/services.js +4 -0
  110. package/daemon/dist/index.js +0 -0
  111. package/daemon/dist/serviceManager.js +30 -11
  112. package/daemon/dist/serviceManager.spec.js +26 -0
  113. package/daemon/dist/workspace-validation.js +63 -0
  114. package/daemon/dist/workspace-validation.spec.js +63 -0
  115. package/package.json +1 -1
  116. package/r2-step4-apple-banana.png +0 -0
  117. package/r2-step5-after-rewind-apple-last.png +0 -0
  118. package/r2-step7-apple-cherry.png +0 -0
  119. package/r2-step8-cherry-menu-no-restore.png +0 -0
  120. package/r3-step3-live-task-card-running.png +0 -0
  121. package/r3-step4-after-completion.png +0 -0
  122. package/r3-step5-persistence-after-reload.png +0 -0
  123. package/r3-step6-tasks-tab-card.png +0 -0
  124. package/reverify-answered-state-answer-sent.png +0 -0
  125. package/reverify-card-visible-after-completion.png +0 -0
  126. package/rewind-step3-apple-banana-turns.png +0 -0
  127. package/rewind-step5-ui-unchanged-after-confirmed-rewind.png +0 -0
  128. package/rewind-step6-apple-menu-no-restore.png +0 -0
  129. package/rewind-step7-final-turnlist-unchanged.png +0 -0
  130. package/rewind-step7-negative-error-toast.png +0 -0
  131. package/rewind-step7-negative-error-toast2.png +0 -0
  132. package/subagent-r2-step5-turn-after-reload-no-card.png +0 -0
  133. package/subagent-r2-step6-tasks-panel-card.png +0 -0
  134. package/subagent-step3-tasks-tab-done-card.png +0 -0
  135. package/subagent-step4-turn-stuck-no-cards.png +0 -0
  136. package/agent-pane/frontend/dist/assets/index-BYo-lnxm.js +0 -362
@@ -0,0 +1,370 @@
1
+ var Bh=Object.defineProperty;var Hh=(s,i,l)=>i in s?Bh(s,i,{enumerable:!0,configurable:!0,writable:!0,value:l}):s[i]=l;var Ge=(s,i,l)=>Hh(s,typeof i!="symbol"?i+"":i,l);(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))a(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&a(h)}).observe(document,{childList:!0,subtree:!0});function l(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function a(d){if(d.ep)return;d.ep=!0;const f=l(d);fetch(d.href,f)}})();function If(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Ca={exports:{}},cl={},ja={exports:{}},Ce={};/**
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 Od;function Wh(){if(Od)return Ce;Od=1;var s=Symbol.for("react.element"),i=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),S=Symbol.iterator;function k(E){return E===null||typeof E!="object"?null:(E=S&&E[S]||E["@@iterator"],typeof E=="function"?E:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,N={};function z(E,I,pe){this.props=E,this.context=I,this.refs=N,this.updater=pe||A}z.prototype.isReactComponent={},z.prototype.setState=function(E,I){if(typeof E!="object"&&typeof E!="function"&&E!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,E,I,"setState")},z.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function H(){}H.prototype=z.prototype;function V(E,I,pe){this.props=E,this.context=I,this.refs=N,this.updater=pe||A}var J=V.prototype=new H;J.constructor=V,D(J,z.prototype),J.isPureReactComponent=!0;var O=Array.isArray,ne=Object.prototype.hasOwnProperty,ce={current:null},oe={key:!0,ref:!0,__self:!0,__source:!0};function ae(E,I,pe){var ye,Ne={},Ee=null,Re=null;if(I!=null)for(ye in I.ref!==void 0&&(Re=I.ref),I.key!==void 0&&(Ee=""+I.key),I)ne.call(I,ye)&&!oe.hasOwnProperty(ye)&&(Ne[ye]=I[ye]);var Ie=arguments.length-2;if(Ie===1)Ne.children=pe;else if(1<Ie){for(var Be=Array(Ie),mt=0;mt<Ie;mt++)Be[mt]=arguments[mt+2];Ne.children=Be}if(E&&E.defaultProps)for(ye in Ie=E.defaultProps,Ie)Ne[ye]===void 0&&(Ne[ye]=Ie[ye]);return{$$typeof:s,type:E,key:Ee,ref:Re,props:Ne,_owner:ce.current}}function Te(E,I){return{$$typeof:s,type:E.type,key:I,ref:E.ref,props:E.props,_owner:E._owner}}function te(E){return typeof E=="object"&&E!==null&&E.$$typeof===s}function ve(E){var I={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(pe){return I[pe]})}var _e=/\/+/g;function je(E,I){return typeof E=="object"&&E!==null&&E.key!=null?ve(""+E.key):I.toString(36)}function de(E,I,pe,ye,Ne){var Ee=typeof E;(Ee==="undefined"||Ee==="boolean")&&(E=null);var Re=!1;if(E===null)Re=!0;else switch(Ee){case"string":case"number":Re=!0;break;case"object":switch(E.$$typeof){case s:case i:Re=!0}}if(Re)return Re=E,Ne=Ne(Re),E=ye===""?"."+je(Re,0):ye,O(Ne)?(pe="",E!=null&&(pe=E.replace(_e,"$&/")+"/"),de(Ne,I,pe,"",function(mt){return mt})):Ne!=null&&(te(Ne)&&(Ne=Te(Ne,pe+(!Ne.key||Re&&Re.key===Ne.key?"":(""+Ne.key).replace(_e,"$&/")+"/")+E)),I.push(Ne)),1;if(Re=0,ye=ye===""?".":ye+":",O(E))for(var Ie=0;Ie<E.length;Ie++){Ee=E[Ie];var Be=ye+je(Ee,Ie);Re+=de(Ee,I,pe,Be,Ne)}else if(Be=k(E),typeof Be=="function")for(E=Be.call(E),Ie=0;!(Ee=E.next()).done;)Ee=Ee.value,Be=ye+je(Ee,Ie++),Re+=de(Ee,I,pe,Be,Ne);else if(Ee==="object")throw I=String(E),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.");return Re}function M(E,I,pe){if(E==null)return E;var ye=[],Ne=0;return de(E,ye,"","",function(Ee){return I.call(pe,Ee,Ne++)}),ye}function Y(E){if(E._status===-1){var I=E._result;I=I(),I.then(function(pe){(E._status===0||E._status===-1)&&(E._status=1,E._result=pe)},function(pe){(E._status===0||E._status===-1)&&(E._status=2,E._result=pe)}),E._status===-1&&(E._status=0,E._result=I)}if(E._status===1)return E._result.default;throw E._result}var Z={current:null},$={transition:null},X={ReactCurrentDispatcher:Z,ReactCurrentBatchConfig:$,ReactCurrentOwner:ce};function G(){throw Error("act(...) is not supported in production builds of React.")}return Ce.Children={map:M,forEach:function(E,I,pe){M(E,function(){I.apply(this,arguments)},pe)},count:function(E){var I=0;return M(E,function(){I++}),I},toArray:function(E){return M(E,function(I){return I})||[]},only:function(E){if(!te(E))throw Error("React.Children.only expected to receive a single React element child.");return E}},Ce.Component=z,Ce.Fragment=l,Ce.Profiler=d,Ce.PureComponent=V,Ce.StrictMode=a,Ce.Suspense=y,Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=X,Ce.act=G,Ce.cloneElement=function(E,I,pe){if(E==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+E+".");var ye=D({},E.props),Ne=E.key,Ee=E.ref,Re=E._owner;if(I!=null){if(I.ref!==void 0&&(Ee=I.ref,Re=ce.current),I.key!==void 0&&(Ne=""+I.key),E.type&&E.type.defaultProps)var Ie=E.type.defaultProps;for(Be in I)ne.call(I,Be)&&!oe.hasOwnProperty(Be)&&(ye[Be]=I[Be]===void 0&&Ie!==void 0?Ie[Be]:I[Be])}var Be=arguments.length-2;if(Be===1)ye.children=pe;else if(1<Be){Ie=Array(Be);for(var mt=0;mt<Be;mt++)Ie[mt]=arguments[mt+2];ye.children=Ie}return{$$typeof:s,type:E.type,key:Ne,ref:Ee,props:ye,_owner:Re}},Ce.createContext=function(E){return E={$$typeof:h,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},E.Provider={$$typeof:f,_context:E},E.Consumer=E},Ce.createElement=ae,Ce.createFactory=function(E){var I=ae.bind(null,E);return I.type=E,I},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(E){return{$$typeof:m,render:E}},Ce.isValidElement=te,Ce.lazy=function(E){return{$$typeof:w,_payload:{_status:-1,_result:E},_init:Y}},Ce.memo=function(E,I){return{$$typeof:g,type:E,compare:I===void 0?null:I}},Ce.startTransition=function(E){var I=$.transition;$.transition={};try{E()}finally{$.transition=I}},Ce.unstable_act=G,Ce.useCallback=function(E,I){return Z.current.useCallback(E,I)},Ce.useContext=function(E){return Z.current.useContext(E)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(E){return Z.current.useDeferredValue(E)},Ce.useEffect=function(E,I){return Z.current.useEffect(E,I)},Ce.useId=function(){return Z.current.useId()},Ce.useImperativeHandle=function(E,I,pe){return Z.current.useImperativeHandle(E,I,pe)},Ce.useInsertionEffect=function(E,I){return Z.current.useInsertionEffect(E,I)},Ce.useLayoutEffect=function(E,I){return Z.current.useLayoutEffect(E,I)},Ce.useMemo=function(E,I){return Z.current.useMemo(E,I)},Ce.useReducer=function(E,I,pe){return Z.current.useReducer(E,I,pe)},Ce.useRef=function(E){return Z.current.useRef(E)},Ce.useState=function(E){return Z.current.useState(E)},Ce.useSyncExternalStore=function(E,I,pe){return Z.current.useSyncExternalStore(E,I,pe)},Ce.useTransition=function(){return Z.current.useTransition()},Ce.version="18.3.1",Ce}var $d;function nu(){return $d||($d=1,ja.exports=Wh()),ja.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 Fd;function Vh(){if(Fd)return cl;Fd=1;var s=nu(),i=Symbol.for("react.element"),l=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,d=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function h(m,y,g){var w,S={},k=null,A=null;g!==void 0&&(k=""+g),y.key!==void 0&&(k=""+y.key),y.ref!==void 0&&(A=y.ref);for(w in y)a.call(y,w)&&!f.hasOwnProperty(w)&&(S[w]=y[w]);if(m&&m.defaultProps)for(w in y=m.defaultProps,y)S[w]===void 0&&(S[w]=y[w]);return{$$typeof:i,type:m,key:k,ref:A,props:S,_owner:d.current}}return cl.Fragment=l,cl.jsx=h,cl.jsxs=h,cl}var Ud;function Gh(){return Ud||(Ud=1,Ca.exports=Vh()),Ca.exports}var u=Gh(),P=nu();const gl=If(P);var Ii={},Ra={exports:{}},Ft={},La={exports:{}},Aa={};/**
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 Bd;function qh(){return Bd||(Bd=1,(function(s){function i($,X){var G=$.length;$.push(X);e:for(;0<G;){var E=G-1>>>1,I=$[E];if(0<d(I,X))$[E]=X,$[G]=I,G=E;else break e}}function l($){return $.length===0?null:$[0]}function a($){if($.length===0)return null;var X=$[0],G=$.pop();if(G!==X){$[0]=G;e:for(var E=0,I=$.length,pe=I>>>1;E<pe;){var ye=2*(E+1)-1,Ne=$[ye],Ee=ye+1,Re=$[Ee];if(0>d(Ne,G))Ee<I&&0>d(Re,Ne)?($[E]=Re,$[Ee]=G,E=Ee):($[E]=Ne,$[ye]=G,E=ye);else if(Ee<I&&0>d(Re,G))$[E]=Re,$[Ee]=G,E=Ee;else break e}}return X}function d($,X){var G=$.sortIndex-X.sortIndex;return G!==0?G:$.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;s.unstable_now=function(){return f.now()}}else{var h=Date,m=h.now();s.unstable_now=function(){return h.now()-m}}var y=[],g=[],w=1,S=null,k=3,A=!1,D=!1,N=!1,z=typeof setTimeout=="function"?setTimeout:null,H=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function J($){for(var X=l(g);X!==null;){if(X.callback===null)a(g);else if(X.startTime<=$)a(g),X.sortIndex=X.expirationTime,i(y,X);else break;X=l(g)}}function O($){if(N=!1,J($),!D)if(l(y)!==null)D=!0,Y(ne);else{var X=l(g);X!==null&&Z(O,X.startTime-$)}}function ne($,X){D=!1,N&&(N=!1,H(ae),ae=-1),A=!0;var G=k;try{for(J(X),S=l(y);S!==null&&(!(S.expirationTime>X)||$&&!ve());){var E=S.callback;if(typeof E=="function"){S.callback=null,k=S.priorityLevel;var I=E(S.expirationTime<=X);X=s.unstable_now(),typeof I=="function"?S.callback=I:S===l(y)&&a(y),J(X)}else a(y);S=l(y)}if(S!==null)var pe=!0;else{var ye=l(g);ye!==null&&Z(O,ye.startTime-X),pe=!1}return pe}finally{S=null,k=G,A=!1}}var ce=!1,oe=null,ae=-1,Te=5,te=-1;function ve(){return!(s.unstable_now()-te<Te)}function _e(){if(oe!==null){var $=s.unstable_now();te=$;var X=!0;try{X=oe(!0,$)}finally{X?je():(ce=!1,oe=null)}}else ce=!1}var je;if(typeof V=="function")je=function(){V(_e)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,M=de.port2;de.port1.onmessage=_e,je=function(){M.postMessage(null)}}else je=function(){z(_e,0)};function Y($){oe=$,ce||(ce=!0,je())}function Z($,X){ae=z(function(){$(s.unstable_now())},X)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function($){$.callback=null},s.unstable_continueExecution=function(){D||A||(D=!0,Y(ne))},s.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Te=0<$?Math.floor(1e3/$):5},s.unstable_getCurrentPriorityLevel=function(){return k},s.unstable_getFirstCallbackNode=function(){return l(y)},s.unstable_next=function($){switch(k){case 1:case 2:case 3:var X=3;break;default:X=k}var G=k;k=X;try{return $()}finally{k=G}},s.unstable_pauseExecution=function(){},s.unstable_requestPaint=function(){},s.unstable_runWithPriority=function($,X){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var G=k;k=$;try{return X()}finally{k=G}},s.unstable_scheduleCallback=function($,X,G){var E=s.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?E+G:E):G=E,$){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=G+I,$={id:w++,callback:X,priorityLevel:$,startTime:G,expirationTime:I,sortIndex:-1},G>E?($.sortIndex=G,i(g,$),l(y)===null&&$===l(g)&&(N?(H(ae),ae=-1):N=!0,Z(O,G-E))):($.sortIndex=I,i(y,$),D||A||(D=!0,Y(ne))),$},s.unstable_shouldYield=ve,s.unstable_wrapCallback=function($){var X=k;return function(){var G=k;k=X;try{return $.apply(this,arguments)}finally{k=G}}}})(Aa)),Aa}var Hd;function Qh(){return Hd||(Hd=1,La.exports=qh()),La.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 Wd;function Kh(){if(Wd)return Ft;Wd=1;var s=nu(),i=Qh();function l(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 a=new Set,d={};function f(e,t){h(e,t),h(e+"Capture",t)}function h(e,t){for(d[e]=t,e=0;e<t.length;e++)a.add(t[e])}var m=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),y=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]*$/,w={},S={};function k(e){return y.call(S,e)?!0:y.call(w,e)?!1:g.test(e)?S[e]=!0:(w[e]=!0,!1)}function A(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 D(e,t,n,r){if(t===null||typeof t>"u"||A(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function N(e,t,n,r,o,c,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=c,this.removeEmptyString=p}var z={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){z[e]=new N(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];z[t]=new N(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){z[e]=new N(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){z[e]=new N(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){z[e]=new N(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){z[e]=new N(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){z[e]=new N(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){z[e]=new N(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){z[e]=new N(e,5,!1,e.toLowerCase(),null,!1,!1)});var H=/[\-:]([a-z])/g;function V(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(H,V);z[t]=new N(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(H,V);z[t]=new N(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(H,V);z[t]=new N(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){z[e]=new N(e,1,!1,e.toLowerCase(),null,!1,!1)}),z.xlinkHref=new N("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){z[e]=new N(e,1,!1,e.toLowerCase(),null,!0,!0)});function J(e,t,n,r){var o=z.hasOwnProperty(t)?z[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(D(t,n,o,r)&&(n=null),r||o===null?k(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var O=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ne=Symbol.for("react.element"),ce=Symbol.for("react.portal"),oe=Symbol.for("react.fragment"),ae=Symbol.for("react.strict_mode"),Te=Symbol.for("react.profiler"),te=Symbol.for("react.provider"),ve=Symbol.for("react.context"),_e=Symbol.for("react.forward_ref"),je=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),Z=Symbol.for("react.offscreen"),$=Symbol.iterator;function X(e){return e===null||typeof e!="object"?null:(e=$&&e[$]||e["@@iterator"],typeof e=="function"?e:null)}var G=Object.assign,E;function I(e){if(E===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);E=t&&t[1]||""}return`
34
+ `+E+e}var pe=!1;function ye(e,t){if(!e||pe)return"";pe=!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(L){var r=L}Reflect.construct(e,[],t)}else{try{t.call()}catch(L){r=L}e.call(t.prototype)}else{try{throw Error()}catch(L){r=L}e()}}catch(L){if(L&&r&&typeof L.stack=="string"){for(var o=L.stack.split(`
35
+ `),c=r.stack.split(`
36
+ `),p=o.length-1,x=c.length-1;1<=p&&0<=x&&o[p]!==c[x];)x--;for(;1<=p&&0<=x;p--,x--)if(o[p]!==c[x]){if(p!==1||x!==1)do if(p--,x--,0>x||o[p]!==c[x]){var T=`
37
+ `+o[p].replace(" at new "," at ");return e.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",e.displayName)),T}while(1<=p&&0<=x);break}}}finally{pe=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?I(e):""}function Ne(e){switch(e.tag){case 5:return I(e.type);case 16:return I("Lazy");case 13:return I("Suspense");case 19:return I("SuspenseList");case 0:case 2:case 15:return e=ye(e.type,!1),e;case 11:return e=ye(e.type.render,!1),e;case 1:return e=ye(e.type,!0),e;default:return""}}function Ee(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 oe:return"Fragment";case ce:return"Portal";case Te:return"Profiler";case ae:return"StrictMode";case je:return"Suspense";case de:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ve:return(e.displayName||"Context")+".Consumer";case te:return(e._context.displayName||"Context")+".Provider";case _e:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case M:return t=e.displayName||null,t!==null?t:Ee(e.type)||"Memo";case Y:t=e._payload,e=e._init;try{return Ee(e(t))}catch{}}return null}function Re(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 Ee(t);case 8:return t===ae?"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 Ie(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Be(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function mt(e){var t=Be(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,c=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(p){r=""+p,c.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 dn(e){e._valueTracker||(e._valueTracker=mt(e))}function Fe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Be(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function fn(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 be(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Un(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ie(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 We(e,t){t=t.checked,t!=null&&J(e,"checked",t,!1)}function Ut(e,t){We(e,t);var n=Ie(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")?At(e,t.type,n):t.hasOwnProperty("defaultValue")&&At(e,t.type,Ie(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function hr(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 At(e,t,n){(t!=="number"||fn(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var pn=Array.isArray;function b(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=""+Ie(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 he(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(l(91));return G({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function He(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(l(92));if(pn(n)){if(1<n.length)throw Error(l(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ie(n)}}function Ve(e,t){var n=Ie(t.value),r=Ie(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 ot(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function kt(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 It(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?kt(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var nn,mr=(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(nn=nn||document.createElement("div"),nn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=nn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function _n(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qt={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},Gr=["Webkit","ms","Moz","O"];Object.keys(Qt).forEach(function(e){Gr.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qt[t]=Qt[e]})});function gr(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Qt.hasOwnProperty(e)&&Qt[e]?(""+t).trim():t+"px"}function Es(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=gr(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var _l=G({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 qr(e,t){if(t){if(_l[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(l(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(l(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(l(61))}if(t.style!=null&&typeof t.style!="object")throw Error(l(62))}}function vr(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 Bn=null;function hn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Dt=null,mn=null,Nn=null;function Cs(e){if(e=Ks(e)){if(typeof Dt!="function")throw Error(l(280));var t=e.stateNode;t&&(t=ql(t),Dt(e.stateNode,e.type,t))}}function Qr(e){mn?Nn?Nn.push(e):Nn=[e]:mn=e}function js(){if(mn){var e=mn,t=Nn;if(Nn=mn=null,Cs(e),t)for(e=0;e<t.length;e++)Cs(t[e])}}function yr(e,t){return e(t)}function xr(){}var Pt=!1;function En(e,t,n){if(Pt)return e(t,n);Pt=!0;try{return yr(e,t,n)}finally{Pt=!1,(mn!==null||Nn!==null)&&(xr(),js())}}function Cn(e,t){var n=e.stateNode;if(n===null)return null;var r=ql(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(l(231,t,typeof n));return n}var kr=!1;if(m)try{var wr={};Object.defineProperty(wr,"passive",{get:function(){kr=!0}}),window.addEventListener("test",wr,wr),window.removeEventListener("test",wr,wr)}catch{kr=!1}function Nl(e,t,n,r,o,c,p,x,T){var L=Array.prototype.slice.call(arguments,3);try{t.apply(n,L)}catch(B){this.onError(B)}}var jn=!1,Sr=null,Hn=!1,Rs=null,Tr={onError:function(e){jn=!0,Sr=e}};function Qi(e,t,n,r,o,c,p,x,T){jn=!1,Sr=null,Nl.apply(Tr,arguments)}function Ki(e,t,n,r,o,c,p,x,T){if(Qi.apply(this,arguments),jn){if(jn){var L=Sr;jn=!1,Sr=null}else throw Error(l(198));Hn||(Hn=!0,Rs=L)}}function $e(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 Rn(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 El(e){if($e(e)!==e)throw Error(l(188))}function Cl(e){var t=e.alternate;if(!t){if(t=$e(e),t===null)throw Error(l(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var c=o.alternate;if(c===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===c.child){for(c=o.child;c;){if(c===n)return El(o),e;if(c===r)return El(o),t;c=c.sibling}throw Error(l(188))}if(n.return!==r.return)n=o,r=c;else{for(var p=!1,x=o.child;x;){if(x===n){p=!0,n=o,r=c;break}if(x===r){p=!0,r=o,n=c;break}x=x.sibling}if(!p){for(x=c.child;x;){if(x===n){p=!0,n=c,r=o;break}if(x===r){p=!0,r=c,n=o;break}x=x.sibling}if(!p)throw Error(l(189))}}if(n.alternate!==r)throw Error(l(190))}if(n.tag!==3)throw Error(l(188));return n.stateNode.current===n?e:t}function Kr(e){return e=Cl(e),e!==null?Ls(e):null}function Ls(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ls(e);if(t!==null)return t;e=e.sibling}return null}var As=i.unstable_scheduleCallback,jl=i.unstable_cancelCallback,Yi=i.unstable_shouldYield,Xi=i.unstable_requestPaint,Xe=i.unstable_now,gn=i.unstable_getCurrentPriorityLevel,Wn=i.unstable_ImmediatePriority,vn=i.unstable_UserBlockingPriority,Yr=i.unstable_NormalPriority,_r=i.unstable_LowPriority,Rl=i.unstable_IdlePriority,Nr=null,Bt=null;function Xr(e){if(Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(Nr,e,void 0,(e.current.flags&128)===128)}catch{}}var Et=Math.clz32?Math.clz32:Er,Zr=Math.log,Vn=Math.LN2;function Er(e){return e>>>=0,e===0?32:31-(Zr(e)/Vn|0)|0}var Ct=64,Jr=4194304;function Cr(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 jr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,c=e.pingedLanes,p=n&268435455;if(p!==0){var x=p&~o;x!==0?r=Cr(x):(c&=p,c!==0&&(r=Cr(c)))}else p=n&~o,p!==0?r=Cr(p):c!==0&&(r=Cr(c));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,c=t&-t,o>=c||o===16&&(c&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-Et(t),o=1<<n,r|=e[n],t&=~o;return r}function Ll(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 Al(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,c=e.pendingLanes;0<c;){var p=31-Et(c),x=1<<p,T=o[p];T===-1?((x&n)===0||(x&r)!==0)&&(o[p]=Ll(x,t)):T<=t&&(e.expiredLanes|=x),c&=~x}}function Is(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Ds(){var e=Ct;return Ct<<=1,(Ct&4194240)===0&&(Ct=64),e}function Ps(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Rr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Et(t),e[t]=n}function Il(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-Et(n),c=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~c}}function Gn(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Et(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var De=0;function q(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var v,C,F,le,fe,Se=!1,Pe=[],ze=null,Ze=null,Je=null,Ln=new Map,rt=new Map,qn=[],cp="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 wu(e,t){switch(e){case"focusin":case"focusout":ze=null;break;case"dragenter":case"dragleave":Ze=null;break;case"mouseover":case"mouseout":Je=null;break;case"pointerover":case"pointerout":Ln.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":rt.delete(t.pointerId)}}function Ms(e,t,n,r,o,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:c,targetContainers:[o]},t!==null&&(t=Ks(t),t!==null&&C(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function dp(e,t,n,r,o){switch(t){case"focusin":return ze=Ms(ze,e,t,n,r,o),!0;case"dragenter":return Ze=Ms(Ze,e,t,n,r,o),!0;case"mouseover":return Je=Ms(Je,e,t,n,r,o),!0;case"pointerover":var c=o.pointerId;return Ln.set(c,Ms(Ln.get(c)||null,e,t,n,r,o)),!0;case"gotpointercapture":return c=o.pointerId,rt.set(c,Ms(rt.get(c)||null,e,t,n,r,o)),!0}return!1}function Su(e){var t=Lr(e.target);if(t!==null){var n=$e(t);if(n!==null){if(t=n.tag,t===13){if(t=Rn(n),t!==null){e.blockedOn=t,fe(e.priority,function(){F(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 Dl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ji(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Bn=r,n.target.dispatchEvent(r),Bn=null}else return t=Ks(n),t!==null&&C(t),e.blockedOn=n,!1;t.shift()}return!0}function Tu(e,t,n){Dl(e)&&n.delete(t)}function fp(){Se=!1,ze!==null&&Dl(ze)&&(ze=null),Ze!==null&&Dl(Ze)&&(Ze=null),Je!==null&&Dl(Je)&&(Je=null),Ln.forEach(Tu),rt.forEach(Tu)}function bs(e,t){e.blockedOn===t&&(e.blockedOn=null,Se||(Se=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,fp)))}function zs(e){function t(o){return bs(o,e)}if(0<Pe.length){bs(Pe[0],e);for(var n=1;n<Pe.length;n++){var r=Pe[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ze!==null&&bs(ze,e),Ze!==null&&bs(Ze,e),Je!==null&&bs(Je,e),Ln.forEach(t),rt.forEach(t),n=0;n<qn.length;n++)r=qn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<qn.length&&(n=qn[0],n.blockedOn===null);)Su(n),n.blockedOn===null&&qn.shift()}var es=O.ReactCurrentBatchConfig,Pl=!0;function pp(e,t,n,r){var o=De,c=es.transition;es.transition=null;try{De=1,Zi(e,t,n,r)}finally{De=o,es.transition=c}}function hp(e,t,n,r){var o=De,c=es.transition;es.transition=null;try{De=4,Zi(e,t,n,r)}finally{De=o,es.transition=c}}function Zi(e,t,n,r){if(Pl){var o=Ji(e,t,n,r);if(o===null)vo(e,t,r,Ml,n),wu(e,r);else if(dp(o,e,t,n,r))r.stopPropagation();else if(wu(e,r),t&4&&-1<cp.indexOf(e)){for(;o!==null;){var c=Ks(o);if(c!==null&&v(c),c=Ji(e,t,n,r),c===null&&vo(e,t,r,Ml,n),c===o)break;o=c}o!==null&&r.stopPropagation()}else vo(e,t,r,null,n)}}var Ml=null;function Ji(e,t,n,r){if(Ml=null,e=hn(r),e=Lr(e),e!==null)if(t=$e(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Rn(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 Ml=e,null}function _u(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(gn()){case Wn:return 1;case vn:return 4;case Yr:case _r:return 16;case Rl:return 536870912;default:return 16}default:return 16}}var Qn=null,eo=null,bl=null;function Nu(){if(bl)return bl;var e,t=eo,n=t.length,r,o="value"in Qn?Qn.value:Qn.textContent,c=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[c-r];r++);return bl=o.slice(e,1<r?1-r:void 0)}function zl(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 Ol(){return!0}function Eu(){return!1}function Ht(e){function t(n,r,o,c,p){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=c,this.target=p,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(n=e[x],this[x]=n?n(c):c[x]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Ol:Eu,this.isPropagationStopped=Eu,this}return G(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=Ol)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ol)},persist:function(){},isPersistent:Ol}),t}var ts={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},to=Ht(ts),Os=G({},ts,{view:0,detail:0}),mp=Ht(Os),no,ro,$s,$l=G({},Os,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lo,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!==$s&&($s&&e.type==="mousemove"?(no=e.screenX-$s.screenX,ro=e.screenY-$s.screenY):ro=no=0,$s=e),no)},movementY:function(e){return"movementY"in e?e.movementY:ro}}),Cu=Ht($l),gp=G({},$l,{dataTransfer:0}),vp=Ht(gp),yp=G({},Os,{relatedTarget:0}),so=Ht(yp),xp=G({},ts,{animationName:0,elapsedTime:0,pseudoElement:0}),kp=Ht(xp),wp=G({},ts,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Sp=Ht(wp),Tp=G({},ts,{data:0}),ju=Ht(Tp),_p={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Np={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Ep={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ep[e])?!!t[e]:!1}function lo(){return Cp}var jp=G({},Os,{key:function(e){if(e.key){var t=_p[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=zl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Np[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lo,charCode:function(e){return e.type==="keypress"?zl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?zl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Rp=Ht(jp),Lp=G({},$l,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ru=Ht(Lp),Ap=G({},Os,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lo}),Ip=Ht(Ap),Dp=G({},ts,{propertyName:0,elapsedTime:0,pseudoElement:0}),Pp=Ht(Dp),Mp=G({},$l,{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}),bp=Ht(Mp),zp=[9,13,27,32],io=m&&"CompositionEvent"in window,Fs=null;m&&"documentMode"in document&&(Fs=document.documentMode);var Op=m&&"TextEvent"in window&&!Fs,Lu=m&&(!io||Fs&&8<Fs&&11>=Fs),Au=" ",Iu=!1;function Du(e,t){switch(e){case"keyup":return zp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ns=!1;function $p(e,t){switch(e){case"compositionend":return Pu(t);case"keypress":return t.which!==32?null:(Iu=!0,Au);case"textInput":return e=t.data,e===Au&&Iu?null:e;default:return null}}function Fp(e,t){if(ns)return e==="compositionend"||!io&&Du(e,t)?(e=Nu(),bl=eo=Qn=null,ns=!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 Lu&&t.locale!=="ko"?null:t.data;default:return null}}var Up={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 Mu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Up[e.type]:t==="textarea"}function bu(e,t,n,r){Qr(r),t=Wl(t,"onChange"),0<t.length&&(n=new to("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Us=null,Bs=null;function Bp(e){ec(e,0)}function Fl(e){var t=os(e);if(Fe(t))return e}function Hp(e,t){if(e==="change")return t}var zu=!1;if(m){var oo;if(m){var ao="oninput"in document;if(!ao){var Ou=document.createElement("div");Ou.setAttribute("oninput","return;"),ao=typeof Ou.oninput=="function"}oo=ao}else oo=!1;zu=oo&&(!document.documentMode||9<document.documentMode)}function $u(){Us&&(Us.detachEvent("onpropertychange",Fu),Bs=Us=null)}function Fu(e){if(e.propertyName==="value"&&Fl(Bs)){var t=[];bu(t,Bs,e,hn(e)),En(Bp,t)}}function Wp(e,t,n){e==="focusin"?($u(),Us=t,Bs=n,Us.attachEvent("onpropertychange",Fu)):e==="focusout"&&$u()}function Vp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Fl(Bs)}function Gp(e,t){if(e==="click")return Fl(t)}function qp(e,t){if(e==="input"||e==="change")return Fl(t)}function Qp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rn=typeof Object.is=="function"?Object.is:Qp;function Hs(e,t){if(rn(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(!y.call(t,o)||!rn(e[o],t[o]))return!1}return!0}function Uu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Bu(e,t){var n=Uu(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=Uu(n)}}function Hu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Wu(){for(var e=window,t=fn();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=fn(e.document)}return t}function uo(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 Kp(e){var t=Wu(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Hu(n.ownerDocument.documentElement,n)){if(r!==null&&uo(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,c=Math.min(r.start,o);r=r.end===void 0?c:Math.min(r.end,o),!e.extend&&c>r&&(o=r,r=c,c=o),o=Bu(n,c);var p=Bu(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(),c>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 Yp=m&&"documentMode"in document&&11>=document.documentMode,rs=null,co=null,Ws=null,fo=!1;function Vu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;fo||rs==null||rs!==fn(r)||(r=rs,"selectionStart"in r&&uo(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}),Ws&&Hs(Ws,r)||(Ws=r,r=Wl(co,"onSelect"),0<r.length&&(t=new to("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=rs)))}function Ul(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ss={animationend:Ul("Animation","AnimationEnd"),animationiteration:Ul("Animation","AnimationIteration"),animationstart:Ul("Animation","AnimationStart"),transitionend:Ul("Transition","TransitionEnd")},po={},Gu={};m&&(Gu=document.createElement("div").style,"AnimationEvent"in window||(delete ss.animationend.animation,delete ss.animationiteration.animation,delete ss.animationstart.animation),"TransitionEvent"in window||delete ss.transitionend.transition);function Bl(e){if(po[e])return po[e];if(!ss[e])return e;var t=ss[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Gu)return po[e]=t[n];return e}var qu=Bl("animationend"),Qu=Bl("animationiteration"),Ku=Bl("animationstart"),Yu=Bl("transitionend"),Xu=new Map,Zu="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 Kn(e,t){Xu.set(e,t),f(t,[e])}for(var ho=0;ho<Zu.length;ho++){var mo=Zu[ho],Xp=mo.toLowerCase(),Zp=mo[0].toUpperCase()+mo.slice(1);Kn(Xp,"on"+Zp)}Kn(qu,"onAnimationEnd"),Kn(Qu,"onAnimationIteration"),Kn(Ku,"onAnimationStart"),Kn("dblclick","onDoubleClick"),Kn("focusin","onFocus"),Kn("focusout","onBlur"),Kn(Yu,"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 Vs="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(" "),Jp=new Set("cancel close invalid load scroll toggle".split(" ").concat(Vs));function Ju(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Ki(r,t,void 0,e),e.currentTarget=null}function ec(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 c=void 0;if(t)for(var p=r.length-1;0<=p;p--){var x=r[p],T=x.instance,L=x.currentTarget;if(x=x.listener,T!==c&&o.isPropagationStopped())break e;Ju(o,x,L),c=T}else for(p=0;p<r.length;p++){if(x=r[p],T=x.instance,L=x.currentTarget,x=x.listener,T!==c&&o.isPropagationStopped())break e;Ju(o,x,L),c=T}}}if(Hn)throw e=Rs,Hn=!1,Rs=null,e}function Qe(e,t){var n=t[To];n===void 0&&(n=t[To]=new Set);var r=e+"__bubble";n.has(r)||(tc(t,e,2,!1),n.add(r))}function go(e,t,n){var r=0;t&&(r|=4),tc(n,e,r,t)}var Hl="_reactListening"+Math.random().toString(36).slice(2);function Gs(e){if(!e[Hl]){e[Hl]=!0,a.forEach(function(n){n!=="selectionchange"&&(Jp.has(n)||go(n,!1,e),go(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Hl]||(t[Hl]=!0,go("selectionchange",!1,t))}}function tc(e,t,n,r){switch(_u(t)){case 1:var o=pp;break;case 4:o=hp;break;default:o=Zi}n=o.bind(null,t,n,e),o=void 0,!kr||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 vo(e,t,n,r,o){var c=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 x=r.stateNode.containerInfo;if(x===o||x.nodeType===8&&x.parentNode===o)break;if(p===4)for(p=r.return;p!==null;){var T=p.tag;if((T===3||T===4)&&(T=p.stateNode.containerInfo,T===o||T.nodeType===8&&T.parentNode===o))return;p=p.return}for(;x!==null;){if(p=Lr(x),p===null)return;if(T=p.tag,T===5||T===6){r=c=p;continue e}x=x.parentNode}}r=r.return}En(function(){var L=c,B=hn(n),W=[];e:{var U=Xu.get(e);if(U!==void 0){var ee=to,se=e;switch(e){case"keypress":if(zl(n)===0)break e;case"keydown":case"keyup":ee=Rp;break;case"focusin":se="focus",ee=so;break;case"focusout":se="blur",ee=so;break;case"beforeblur":case"afterblur":ee=so;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":ee=Cu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=vp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=Ip;break;case qu:case Qu:case Ku:ee=kp;break;case Yu:ee=Pp;break;case"scroll":ee=mp;break;case"wheel":ee=bp;break;case"copy":case"cut":case"paste":ee=Sp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=Ru}var ie=(t&4)!==0,st=!ie&&e==="scroll",j=ie?U!==null?U+"Capture":null:U;ie=[];for(var _=L,R;_!==null;){R=_;var Q=R.stateNode;if(R.tag===5&&Q!==null&&(R=Q,j!==null&&(Q=Cn(_,j),Q!=null&&ie.push(qs(_,Q,R)))),st)break;_=_.return}0<ie.length&&(U=new ee(U,se,null,n,B),W.push({event:U,listeners:ie}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",ee=e==="mouseout"||e==="pointerout",U&&n!==Bn&&(se=n.relatedTarget||n.fromElement)&&(Lr(se)||se[An]))break e;if((ee||U)&&(U=B.window===B?B:(U=B.ownerDocument)?U.defaultView||U.parentWindow:window,ee?(se=n.relatedTarget||n.toElement,ee=L,se=se?Lr(se):null,se!==null&&(st=$e(se),se!==st||se.tag!==5&&se.tag!==6)&&(se=null)):(ee=null,se=L),ee!==se)){if(ie=Cu,Q="onMouseLeave",j="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(ie=Ru,Q="onPointerLeave",j="onPointerEnter",_="pointer"),st=ee==null?U:os(ee),R=se==null?U:os(se),U=new ie(Q,_+"leave",ee,n,B),U.target=st,U.relatedTarget=R,Q=null,Lr(B)===L&&(ie=new ie(j,_+"enter",se,n,B),ie.target=R,ie.relatedTarget=st,Q=ie),st=Q,ee&&se)t:{for(ie=ee,j=se,_=0,R=ie;R;R=ls(R))_++;for(R=0,Q=j;Q;Q=ls(Q))R++;for(;0<_-R;)ie=ls(ie),_--;for(;0<R-_;)j=ls(j),R--;for(;_--;){if(ie===j||j!==null&&ie===j.alternate)break t;ie=ls(ie),j=ls(j)}ie=null}else ie=null;ee!==null&&nc(W,U,ee,ie,!1),se!==null&&st!==null&&nc(W,st,se,ie,!0)}}e:{if(U=L?os(L):window,ee=U.nodeName&&U.nodeName.toLowerCase(),ee==="select"||ee==="input"&&U.type==="file")var ue=Hp;else if(Mu(U))if(zu)ue=qp;else{ue=Vp;var me=Wp}else(ee=U.nodeName)&&ee.toLowerCase()==="input"&&(U.type==="checkbox"||U.type==="radio")&&(ue=Gp);if(ue&&(ue=ue(e,L))){bu(W,ue,n,B);break e}me&&me(e,U,L),e==="focusout"&&(me=U._wrapperState)&&me.controlled&&U.type==="number"&&At(U,"number",U.value)}switch(me=L?os(L):window,e){case"focusin":(Mu(me)||me.contentEditable==="true")&&(rs=me,co=L,Ws=null);break;case"focusout":Ws=co=rs=null;break;case"mousedown":fo=!0;break;case"contextmenu":case"mouseup":case"dragend":fo=!1,Vu(W,n,B);break;case"selectionchange":if(Yp)break;case"keydown":case"keyup":Vu(W,n,B)}var ge;if(io)e:{switch(e){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else ns?Du(e,n)&&(ke="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(ke="onCompositionStart");ke&&(Lu&&n.locale!=="ko"&&(ns||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&ns&&(ge=Nu()):(Qn=B,eo="value"in Qn?Qn.value:Qn.textContent,ns=!0)),me=Wl(L,ke),0<me.length&&(ke=new ju(ke,e,null,n,B),W.push({event:ke,listeners:me}),ge?ke.data=ge:(ge=Pu(n),ge!==null&&(ke.data=ge)))),(ge=Op?$p(e,n):Fp(e,n))&&(L=Wl(L,"onBeforeInput"),0<L.length&&(B=new ju("onBeforeInput","beforeinput",null,n,B),W.push({event:B,listeners:L}),B.data=ge))}ec(W,t)})}function qs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,c=o.stateNode;o.tag===5&&c!==null&&(o=c,c=Cn(e,n),c!=null&&r.unshift(qs(e,c,o)),c=Cn(e,t),c!=null&&r.push(qs(e,c,o))),e=e.return}return r}function ls(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function nc(e,t,n,r,o){for(var c=t._reactName,p=[];n!==null&&n!==r;){var x=n,T=x.alternate,L=x.stateNode;if(T!==null&&T===r)break;x.tag===5&&L!==null&&(x=L,o?(T=Cn(n,c),T!=null&&p.unshift(qs(n,T,x))):o||(T=Cn(n,c),T!=null&&p.push(qs(n,T,x)))),n=n.return}p.length!==0&&e.push({event:t,listeners:p})}var eh=/\r\n?/g,th=/\u0000|\uFFFD/g;function rc(e){return(typeof e=="string"?e:""+e).replace(eh,`
38
+ `).replace(th,"")}function Vl(e,t,n){if(t=rc(t),rc(e)!==t&&n)throw Error(l(425))}function Gl(){}var yo=null,xo=null;function ko(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 wo=typeof setTimeout=="function"?setTimeout:void 0,nh=typeof clearTimeout=="function"?clearTimeout:void 0,sc=typeof Promise=="function"?Promise:void 0,rh=typeof queueMicrotask=="function"?queueMicrotask:typeof sc<"u"?function(e){return sc.resolve(null).then(e).catch(sh)}:wo;function sh(e){setTimeout(function(){throw e})}function So(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),zs(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);zs(t)}function Yn(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 lc(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 is=Math.random().toString(36).slice(2),yn="__reactFiber$"+is,Qs="__reactProps$"+is,An="__reactContainer$"+is,To="__reactEvents$"+is,lh="__reactListeners$"+is,ih="__reactHandles$"+is;function Lr(e){var t=e[yn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[An]||n[yn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=lc(e);e!==null;){if(n=e[yn])return n;e=lc(e)}return t}e=n,n=e.parentNode}return null}function Ks(e){return e=e[yn]||e[An],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function os(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(l(33))}function ql(e){return e[Qs]||null}var _o=[],as=-1;function Xn(e){return{current:e}}function Ke(e){0>as||(e.current=_o[as],_o[as]=null,as--)}function qe(e,t){as++,_o[as]=e.current,e.current=t}var Zn={},wt=Xn(Zn),Mt=Xn(!1),Ar=Zn;function us(e,t){var n=e.type.contextTypes;if(!n)return Zn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},c;for(c in n)o[c]=t[c];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function bt(e){return e=e.childContextTypes,e!=null}function Ql(){Ke(Mt),Ke(wt)}function ic(e,t,n){if(wt.current!==Zn)throw Error(l(168));qe(wt,t),qe(Mt,n)}function oc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(l(108,Re(e)||"Unknown",o));return G({},n,r)}function Kl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Zn,Ar=wt.current,qe(wt,e),qe(Mt,Mt.current),!0}function ac(e,t,n){var r=e.stateNode;if(!r)throw Error(l(169));n?(e=oc(e,t,Ar),r.__reactInternalMemoizedMergedChildContext=e,Ke(Mt),Ke(wt),qe(wt,e)):Ke(Mt),qe(Mt,n)}var In=null,Yl=!1,No=!1;function uc(e){In===null?In=[e]:In.push(e)}function oh(e){Yl=!0,uc(e)}function Jn(){if(!No&&In!==null){No=!0;var e=0,t=De;try{var n=In;for(De=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}In=null,Yl=!1}catch(o){throw In!==null&&(In=In.slice(e+1)),As(Wn,Jn),o}finally{De=t,No=!1}}return null}var cs=[],ds=0,Xl=null,Zl=0,Kt=[],Yt=0,Ir=null,Dn=1,Pn="";function Dr(e,t){cs[ds++]=Zl,cs[ds++]=Xl,Xl=e,Zl=t}function cc(e,t,n){Kt[Yt++]=Dn,Kt[Yt++]=Pn,Kt[Yt++]=Ir,Ir=e;var r=Dn;e=Pn;var o=32-Et(r)-1;r&=~(1<<o),n+=1;var c=32-Et(t)+o;if(30<c){var p=o-o%5;c=(r&(1<<p)-1).toString(32),r>>=p,o-=p,Dn=1<<32-Et(t)+o|n<<o|r,Pn=c+e}else Dn=1<<c|n<<o|r,Pn=e}function Eo(e){e.return!==null&&(Dr(e,1),cc(e,1,0))}function Co(e){for(;e===Xl;)Xl=cs[--ds],cs[ds]=null,Zl=cs[--ds],cs[ds]=null;for(;e===Ir;)Ir=Kt[--Yt],Kt[Yt]=null,Pn=Kt[--Yt],Kt[Yt]=null,Dn=Kt[--Yt],Kt[Yt]=null}var Wt=null,Vt=null,Ye=!1,sn=null;function dc(e,t){var n=en(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 fc(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,Wt=e,Vt=Yn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Wt=e,Vt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ir!==null?{id:Dn,overflow:Pn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=en(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Wt=e,Vt=null,!0):!1;default:return!1}}function jo(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ro(e){if(Ye){var t=Vt;if(t){var n=t;if(!fc(e,t)){if(jo(e))throw Error(l(418));t=Yn(n.nextSibling);var r=Wt;t&&fc(e,t)?dc(r,n):(e.flags=e.flags&-4097|2,Ye=!1,Wt=e)}}else{if(jo(e))throw Error(l(418));e.flags=e.flags&-4097|2,Ye=!1,Wt=e}}}function pc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Wt=e}function Jl(e){if(e!==Wt)return!1;if(!Ye)return pc(e),Ye=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ko(e.type,e.memoizedProps)),t&&(t=Vt)){if(jo(e))throw hc(),Error(l(418));for(;t;)dc(e,t),t=Yn(t.nextSibling)}if(pc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Vt=Yn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Vt=null}}else Vt=Wt?Yn(e.stateNode.nextSibling):null;return!0}function hc(){for(var e=Vt;e;)e=Yn(e.nextSibling)}function fs(){Vt=Wt=null,Ye=!1}function Lo(e){sn===null?sn=[e]:sn.push(e)}var ah=O.ReactCurrentBatchConfig;function Ys(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(l(309));var r=n.stateNode}if(!r)throw Error(l(147,e));var o=r,c=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===c?t.ref:(t=function(p){var x=o.refs;p===null?delete x[c]:x[c]=p},t._stringRef=c,t)}if(typeof e!="string")throw Error(l(284));if(!n._owner)throw Error(l(290,e))}return e}function ei(e,t){throw e=Object.prototype.toString.call(t),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function mc(e){var t=e._init;return t(e._payload)}function gc(e){function t(j,_){if(e){var R=j.deletions;R===null?(j.deletions=[_],j.flags|=16):R.push(_)}}function n(j,_){if(!e)return null;for(;_!==null;)t(j,_),_=_.sibling;return null}function r(j,_){for(j=new Map;_!==null;)_.key!==null?j.set(_.key,_):j.set(_.index,_),_=_.sibling;return j}function o(j,_){return j=or(j,_),j.index=0,j.sibling=null,j}function c(j,_,R){return j.index=R,e?(R=j.alternate,R!==null?(R=R.index,R<_?(j.flags|=2,_):R):(j.flags|=2,_)):(j.flags|=1048576,_)}function p(j){return e&&j.alternate===null&&(j.flags|=2),j}function x(j,_,R,Q){return _===null||_.tag!==6?(_=wa(R,j.mode,Q),_.return=j,_):(_=o(_,R),_.return=j,_)}function T(j,_,R,Q){var ue=R.type;return ue===oe?B(j,_,R.props.children,Q,R.key):_!==null&&(_.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===Y&&mc(ue)===_.type)?(Q=o(_,R.props),Q.ref=Ys(j,_,R),Q.return=j,Q):(Q=_i(R.type,R.key,R.props,null,j.mode,Q),Q.ref=Ys(j,_,R),Q.return=j,Q)}function L(j,_,R,Q){return _===null||_.tag!==4||_.stateNode.containerInfo!==R.containerInfo||_.stateNode.implementation!==R.implementation?(_=Sa(R,j.mode,Q),_.return=j,_):(_=o(_,R.children||[]),_.return=j,_)}function B(j,_,R,Q,ue){return _===null||_.tag!==7?(_=Ur(R,j.mode,Q,ue),_.return=j,_):(_=o(_,R),_.return=j,_)}function W(j,_,R){if(typeof _=="string"&&_!==""||typeof _=="number")return _=wa(""+_,j.mode,R),_.return=j,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case ne:return R=_i(_.type,_.key,_.props,null,j.mode,R),R.ref=Ys(j,null,_),R.return=j,R;case ce:return _=Sa(_,j.mode,R),_.return=j,_;case Y:var Q=_._init;return W(j,Q(_._payload),R)}if(pn(_)||X(_))return _=Ur(_,j.mode,R,null),_.return=j,_;ei(j,_)}return null}function U(j,_,R,Q){var ue=_!==null?_.key:null;if(typeof R=="string"&&R!==""||typeof R=="number")return ue!==null?null:x(j,_,""+R,Q);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case ne:return R.key===ue?T(j,_,R,Q):null;case ce:return R.key===ue?L(j,_,R,Q):null;case Y:return ue=R._init,U(j,_,ue(R._payload),Q)}if(pn(R)||X(R))return ue!==null?null:B(j,_,R,Q,null);ei(j,R)}return null}function ee(j,_,R,Q,ue){if(typeof Q=="string"&&Q!==""||typeof Q=="number")return j=j.get(R)||null,x(_,j,""+Q,ue);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case ne:return j=j.get(Q.key===null?R:Q.key)||null,T(_,j,Q,ue);case ce:return j=j.get(Q.key===null?R:Q.key)||null,L(_,j,Q,ue);case Y:var me=Q._init;return ee(j,_,R,me(Q._payload),ue)}if(pn(Q)||X(Q))return j=j.get(R)||null,B(_,j,Q,ue,null);ei(_,Q)}return null}function se(j,_,R,Q){for(var ue=null,me=null,ge=_,ke=_=0,ft=null;ge!==null&&ke<R.length;ke++){ge.index>ke?(ft=ge,ge=null):ft=ge.sibling;var Oe=U(j,ge,R[ke],Q);if(Oe===null){ge===null&&(ge=ft);break}e&&ge&&Oe.alternate===null&&t(j,ge),_=c(Oe,_,ke),me===null?ue=Oe:me.sibling=Oe,me=Oe,ge=ft}if(ke===R.length)return n(j,ge),Ye&&Dr(j,ke),ue;if(ge===null){for(;ke<R.length;ke++)ge=W(j,R[ke],Q),ge!==null&&(_=c(ge,_,ke),me===null?ue=ge:me.sibling=ge,me=ge);return Ye&&Dr(j,ke),ue}for(ge=r(j,ge);ke<R.length;ke++)ft=ee(ge,j,ke,R[ke],Q),ft!==null&&(e&&ft.alternate!==null&&ge.delete(ft.key===null?ke:ft.key),_=c(ft,_,ke),me===null?ue=ft:me.sibling=ft,me=ft);return e&&ge.forEach(function(ar){return t(j,ar)}),Ye&&Dr(j,ke),ue}function ie(j,_,R,Q){var ue=X(R);if(typeof ue!="function")throw Error(l(150));if(R=ue.call(R),R==null)throw Error(l(151));for(var me=ue=null,ge=_,ke=_=0,ft=null,Oe=R.next();ge!==null&&!Oe.done;ke++,Oe=R.next()){ge.index>ke?(ft=ge,ge=null):ft=ge.sibling;var ar=U(j,ge,Oe.value,Q);if(ar===null){ge===null&&(ge=ft);break}e&&ge&&ar.alternate===null&&t(j,ge),_=c(ar,_,ke),me===null?ue=ar:me.sibling=ar,me=ar,ge=ft}if(Oe.done)return n(j,ge),Ye&&Dr(j,ke),ue;if(ge===null){for(;!Oe.done;ke++,Oe=R.next())Oe=W(j,Oe.value,Q),Oe!==null&&(_=c(Oe,_,ke),me===null?ue=Oe:me.sibling=Oe,me=Oe);return Ye&&Dr(j,ke),ue}for(ge=r(j,ge);!Oe.done;ke++,Oe=R.next())Oe=ee(ge,j,ke,Oe.value,Q),Oe!==null&&(e&&Oe.alternate!==null&&ge.delete(Oe.key===null?ke:Oe.key),_=c(Oe,_,ke),me===null?ue=Oe:me.sibling=Oe,me=Oe);return e&&ge.forEach(function(Uh){return t(j,Uh)}),Ye&&Dr(j,ke),ue}function st(j,_,R,Q){if(typeof R=="object"&&R!==null&&R.type===oe&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case ne:e:{for(var ue=R.key,me=_;me!==null;){if(me.key===ue){if(ue=R.type,ue===oe){if(me.tag===7){n(j,me.sibling),_=o(me,R.props.children),_.return=j,j=_;break e}}else if(me.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===Y&&mc(ue)===me.type){n(j,me.sibling),_=o(me,R.props),_.ref=Ys(j,me,R),_.return=j,j=_;break e}n(j,me);break}else t(j,me);me=me.sibling}R.type===oe?(_=Ur(R.props.children,j.mode,Q,R.key),_.return=j,j=_):(Q=_i(R.type,R.key,R.props,null,j.mode,Q),Q.ref=Ys(j,_,R),Q.return=j,j=Q)}return p(j);case ce:e:{for(me=R.key;_!==null;){if(_.key===me)if(_.tag===4&&_.stateNode.containerInfo===R.containerInfo&&_.stateNode.implementation===R.implementation){n(j,_.sibling),_=o(_,R.children||[]),_.return=j,j=_;break e}else{n(j,_);break}else t(j,_);_=_.sibling}_=Sa(R,j.mode,Q),_.return=j,j=_}return p(j);case Y:return me=R._init,st(j,_,me(R._payload),Q)}if(pn(R))return se(j,_,R,Q);if(X(R))return ie(j,_,R,Q);ei(j,R)}return typeof R=="string"&&R!==""||typeof R=="number"?(R=""+R,_!==null&&_.tag===6?(n(j,_.sibling),_=o(_,R),_.return=j,j=_):(n(j,_),_=wa(R,j.mode,Q),_.return=j,j=_),p(j)):n(j,_)}return st}var ps=gc(!0),vc=gc(!1),ti=Xn(null),ni=null,hs=null,Ao=null;function Io(){Ao=hs=ni=null}function Do(e){var t=ti.current;Ke(ti),e._currentValue=t}function Po(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 ms(e,t){ni=e,Ao=hs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(zt=!0),e.firstContext=null)}function Xt(e){var t=e._currentValue;if(Ao!==e)if(e={context:e,memoizedValue:t,next:null},hs===null){if(ni===null)throw Error(l(308));hs=e,ni.dependencies={lanes:0,firstContext:e}}else hs=hs.next=e;return t}var Pr=null;function Mo(e){Pr===null?Pr=[e]:Pr.push(e)}function yc(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Mo(t)):(n.next=o.next,o.next=n),t.interleaved=n,Mn(e,r)}function Mn(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 er=!1;function bo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function bn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function tr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Me&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Mn(e,n)}return o=r.interleaved,o===null?(t.next=t,Mo(r)):(t.next=o.next,o.next=t),r.interleaved=t,Mn(e,n)}function ri(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,Gn(e,n)}}function kc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,c=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};c===null?o=c=p:c=c.next=p,n=n.next}while(n!==null);c===null?o=c=t:c=c.next=t}else o=c=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:c,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 si(e,t,n,r){var o=e.updateQueue;er=!1;var c=o.firstBaseUpdate,p=o.lastBaseUpdate,x=o.shared.pending;if(x!==null){o.shared.pending=null;var T=x,L=T.next;T.next=null,p===null?c=L:p.next=L,p=T;var B=e.alternate;B!==null&&(B=B.updateQueue,x=B.lastBaseUpdate,x!==p&&(x===null?B.firstBaseUpdate=L:x.next=L,B.lastBaseUpdate=T))}if(c!==null){var W=o.baseState;p=0,B=L=T=null,x=c;do{var U=x.lane,ee=x.eventTime;if((r&U)===U){B!==null&&(B=B.next={eventTime:ee,lane:0,tag:x.tag,payload:x.payload,callback:x.callback,next:null});e:{var se=e,ie=x;switch(U=t,ee=n,ie.tag){case 1:if(se=ie.payload,typeof se=="function"){W=se.call(ee,W,U);break e}W=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=ie.payload,U=typeof se=="function"?se.call(ee,W,U):se,U==null)break e;W=G({},W,U);break e;case 2:er=!0}}x.callback!==null&&x.lane!==0&&(e.flags|=64,U=o.effects,U===null?o.effects=[x]:U.push(x))}else ee={eventTime:ee,lane:U,tag:x.tag,payload:x.payload,callback:x.callback,next:null},B===null?(L=B=ee,T=W):B=B.next=ee,p|=U;if(x=x.next,x===null){if(x=o.shared.pending,x===null)break;U=x,x=U.next,U.next=null,o.lastBaseUpdate=U,o.shared.pending=null}}while(!0);if(B===null&&(T=W),o.baseState=T,o.firstBaseUpdate=L,o.lastBaseUpdate=B,t=o.shared.interleaved,t!==null){o=t;do p|=o.lane,o=o.next;while(o!==t)}else c===null&&(o.shared.lanes=0);zr|=p,e.lanes=p,e.memoizedState=W}}function wc(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(l(191,o));o.call(r)}}}var Xs={},xn=Xn(Xs),Zs=Xn(Xs),Js=Xn(Xs);function Mr(e){if(e===Xs)throw Error(l(174));return e}function zo(e,t){switch(qe(Js,t),qe(Zs,e),qe(xn,Xs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:It(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=It(t,e)}Ke(xn),qe(xn,t)}function gs(){Ke(xn),Ke(Zs),Ke(Js)}function Sc(e){Mr(Js.current);var t=Mr(xn.current),n=It(t,e.type);t!==n&&(qe(Zs,e),qe(xn,n))}function Oo(e){Zs.current===e&&(Ke(xn),Ke(Zs))}var et=Xn(0);function li(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 $o=[];function Fo(){for(var e=0;e<$o.length;e++)$o[e]._workInProgressVersionPrimary=null;$o.length=0}var ii=O.ReactCurrentDispatcher,Uo=O.ReactCurrentBatchConfig,br=0,tt=null,at=null,ct=null,oi=!1,el=!1,tl=0,uh=0;function St(){throw Error(l(321))}function Bo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!rn(e[n],t[n]))return!1;return!0}function Ho(e,t,n,r,o,c){if(br=c,tt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ii.current=e===null||e.memoizedState===null?ph:hh,e=n(r,o),el){c=0;do{if(el=!1,tl=0,25<=c)throw Error(l(301));c+=1,ct=at=null,t.updateQueue=null,ii.current=mh,e=n(r,o)}while(el)}if(ii.current=ci,t=at!==null&&at.next!==null,br=0,ct=at=tt=null,oi=!1,t)throw Error(l(300));return e}function Wo(){var e=tl!==0;return tl=0,e}function kn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?tt.memoizedState=ct=e:ct=ct.next=e,ct}function Zt(){if(at===null){var e=tt.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var t=ct===null?tt.memoizedState:ct.next;if(t!==null)ct=t,at=e;else{if(e===null)throw Error(l(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},ct===null?tt.memoizedState=ct=e:ct=ct.next=e}return ct}function nl(e,t){return typeof t=="function"?t(e):t}function Vo(e){var t=Zt(),n=t.queue;if(n===null)throw Error(l(311));n.lastRenderedReducer=e;var r=at,o=r.baseQueue,c=n.pending;if(c!==null){if(o!==null){var p=o.next;o.next=c.next,c.next=p}r.baseQueue=o=c,n.pending=null}if(o!==null){c=o.next,r=r.baseState;var x=p=null,T=null,L=c;do{var B=L.lane;if((br&B)===B)T!==null&&(T=T.next={lane:0,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),r=L.hasEagerState?L.eagerState:e(r,L.action);else{var W={lane:B,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null};T===null?(x=T=W,p=r):T=T.next=W,tt.lanes|=B,zr|=B}L=L.next}while(L!==null&&L!==c);T===null?p=r:T.next=x,rn(r,t.memoizedState)||(zt=!0),t.memoizedState=r,t.baseState=p,t.baseQueue=T,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do c=o.lane,tt.lanes|=c,zr|=c,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Go(e){var t=Zt(),n=t.queue;if(n===null)throw Error(l(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,c=t.memoizedState;if(o!==null){n.pending=null;var p=o=o.next;do c=e(c,p.action),p=p.next;while(p!==o);rn(c,t.memoizedState)||(zt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),n.lastRenderedState=c}return[c,r]}function Tc(){}function _c(e,t){var n=tt,r=Zt(),o=t(),c=!rn(r.memoizedState,o);if(c&&(r.memoizedState=o,zt=!0),r=r.queue,qo(Cc.bind(null,n,r,e),[e]),r.getSnapshot!==t||c||ct!==null&&ct.memoizedState.tag&1){if(n.flags|=2048,rl(9,Ec.bind(null,n,r,o,t),void 0,null),dt===null)throw Error(l(349));(br&30)!==0||Nc(n,t,o)}return o}function Nc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=tt.updateQueue,t===null?(t={lastEffect:null,stores:null},tt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ec(e,t,n,r){t.value=n,t.getSnapshot=r,jc(t)&&Rc(e)}function Cc(e,t,n){return n(function(){jc(t)&&Rc(e)})}function jc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!rn(e,n)}catch{return!0}}function Rc(e){var t=Mn(e,1);t!==null&&un(t,e,1,-1)}function Lc(e){var t=kn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:nl,lastRenderedState:e},t.queue=e,e=e.dispatch=fh.bind(null,tt,e),[t.memoizedState,e]}function rl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=tt.updateQueue,t===null?(t={lastEffect:null,stores:null},tt.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 Ac(){return Zt().memoizedState}function ai(e,t,n,r){var o=kn();tt.flags|=e,o.memoizedState=rl(1|t,n,void 0,r===void 0?null:r)}function ui(e,t,n,r){var o=Zt();r=r===void 0?null:r;var c=void 0;if(at!==null){var p=at.memoizedState;if(c=p.destroy,r!==null&&Bo(r,p.deps)){o.memoizedState=rl(t,n,c,r);return}}tt.flags|=e,o.memoizedState=rl(1|t,n,c,r)}function Ic(e,t){return ai(8390656,8,e,t)}function qo(e,t){return ui(2048,8,e,t)}function Dc(e,t){return ui(4,2,e,t)}function Pc(e,t){return ui(4,4,e,t)}function Mc(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 bc(e,t,n){return n=n!=null?n.concat([e]):null,ui(4,4,Mc.bind(null,t,e),n)}function Qo(){}function zc(e,t){var n=Zt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Oc(e,t){var n=Zt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function $c(e,t,n){return(br&21)===0?(e.baseState&&(e.baseState=!1,zt=!0),e.memoizedState=n):(rn(n,t)||(n=Ds(),tt.lanes|=n,zr|=n,e.baseState=!0),t)}function ch(e,t){var n=De;De=n!==0&&4>n?n:4,e(!0);var r=Uo.transition;Uo.transition={};try{e(!1),t()}finally{De=n,Uo.transition=r}}function Fc(){return Zt().memoizedState}function dh(e,t,n){var r=lr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Uc(e))Bc(t,n);else if(n=yc(e,t,n,r),n!==null){var o=Rt();un(n,e,r,o),Hc(n,t,r)}}function fh(e,t,n){var r=lr(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Uc(e))Bc(t,o);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var p=t.lastRenderedState,x=c(p,n);if(o.hasEagerState=!0,o.eagerState=x,rn(x,p)){var T=t.interleaved;T===null?(o.next=o,Mo(t)):(o.next=T.next,T.next=o),t.interleaved=o;return}}catch{}finally{}n=yc(e,t,o,r),n!==null&&(o=Rt(),un(n,e,r,o),Hc(n,t,r))}}function Uc(e){var t=e.alternate;return e===tt||t!==null&&t===tt}function Bc(e,t){el=oi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Hc(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gn(e,n)}}var ci={readContext:Xt,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useInsertionEffect:St,useLayoutEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useMutableSource:St,useSyncExternalStore:St,useId:St,unstable_isNewReconciler:!1},ph={readContext:Xt,useCallback:function(e,t){return kn().memoizedState=[e,t===void 0?null:t],e},useContext:Xt,useEffect:Ic,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ai(4194308,4,Mc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ai(4194308,4,e,t)},useInsertionEffect:function(e,t){return ai(4,2,e,t)},useMemo:function(e,t){var n=kn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=kn();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=dh.bind(null,tt,e),[r.memoizedState,e]},useRef:function(e){var t=kn();return e={current:e},t.memoizedState=e},useState:Lc,useDebugValue:Qo,useDeferredValue:function(e){return kn().memoizedState=e},useTransition:function(){var e=Lc(!1),t=e[0];return e=ch.bind(null,e[1]),kn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=tt,o=kn();if(Ye){if(n===void 0)throw Error(l(407));n=n()}else{if(n=t(),dt===null)throw Error(l(349));(br&30)!==0||Nc(r,t,n)}o.memoizedState=n;var c={value:n,getSnapshot:t};return o.queue=c,Ic(Cc.bind(null,r,c,e),[e]),r.flags|=2048,rl(9,Ec.bind(null,r,c,n,t),void 0,null),n},useId:function(){var e=kn(),t=dt.identifierPrefix;if(Ye){var n=Pn,r=Dn;n=(r&~(1<<32-Et(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=tl++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=uh++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},hh={readContext:Xt,useCallback:zc,useContext:Xt,useEffect:qo,useImperativeHandle:bc,useInsertionEffect:Dc,useLayoutEffect:Pc,useMemo:Oc,useReducer:Vo,useRef:Ac,useState:function(){return Vo(nl)},useDebugValue:Qo,useDeferredValue:function(e){var t=Zt();return $c(t,at.memoizedState,e)},useTransition:function(){var e=Vo(nl)[0],t=Zt().memoizedState;return[e,t]},useMutableSource:Tc,useSyncExternalStore:_c,useId:Fc,unstable_isNewReconciler:!1},mh={readContext:Xt,useCallback:zc,useContext:Xt,useEffect:qo,useImperativeHandle:bc,useInsertionEffect:Dc,useLayoutEffect:Pc,useMemo:Oc,useReducer:Go,useRef:Ac,useState:function(){return Go(nl)},useDebugValue:Qo,useDeferredValue:function(e){var t=Zt();return at===null?t.memoizedState=e:$c(t,at.memoizedState,e)},useTransition:function(){var e=Go(nl)[0],t=Zt().memoizedState;return[e,t]},useMutableSource:Tc,useSyncExternalStore:_c,useId:Fc,unstable_isNewReconciler:!1};function ln(e,t){if(e&&e.defaultProps){t=G({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ko(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:G({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var di={isMounted:function(e){return(e=e._reactInternals)?$e(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Rt(),o=lr(e),c=bn(r,o);c.payload=t,n!=null&&(c.callback=n),t=tr(e,c,o),t!==null&&(un(t,e,o,r),ri(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Rt(),o=lr(e),c=bn(r,o);c.tag=1,c.payload=t,n!=null&&(c.callback=n),t=tr(e,c,o),t!==null&&(un(t,e,o,r),ri(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Rt(),r=lr(e),o=bn(n,r);o.tag=2,t!=null&&(o.callback=t),t=tr(e,o,r),t!==null&&(un(t,e,r,n),ri(t,e,r))}};function Wc(e,t,n,r,o,c,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,c,p):t.prototype&&t.prototype.isPureReactComponent?!Hs(n,r)||!Hs(o,c):!0}function Vc(e,t,n){var r=!1,o=Zn,c=t.contextType;return typeof c=="object"&&c!==null?c=Xt(c):(o=bt(t)?Ar:wt.current,r=t.contextTypes,c=(r=r!=null)?us(e,o):Zn),t=new t(n,c),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=di,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=c),t}function Gc(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&&di.enqueueReplaceState(t,t.state,null)}function Yo(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},bo(e);var c=t.contextType;typeof c=="object"&&c!==null?o.context=Xt(c):(c=bt(t)?Ar:wt.current,o.context=us(e,c)),o.state=e.memoizedState,c=t.getDerivedStateFromProps,typeof c=="function"&&(Ko(e,t,c,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&&di.enqueueReplaceState(o,o.state,null),si(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function vs(e,t){try{var n="",r=t;do n+=Ne(r),r=r.return;while(r);var o=n}catch(c){o=`
39
+ Error generating stack: `+c.message+`
40
+ `+c.stack}return{value:e,source:t,stack:o,digest:null}}function Xo(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Zo(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var gh=typeof WeakMap=="function"?WeakMap:Map;function qc(e,t,n){n=bn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){yi||(yi=!0,pa=r),Zo(e,t)},n}function Qc(e,t,n){n=bn(-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(){Zo(e,t)}}var c=e.stateNode;return c!==null&&typeof c.componentDidCatch=="function"&&(n.callback=function(){Zo(e,t),typeof r!="function"&&(rr===null?rr=new Set([this]):rr.add(this));var p=t.stack;this.componentDidCatch(t.value,{componentStack:p!==null?p:""})}),n}function Kc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new gh;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=Lh.bind(null,e,t,n),t.then(e,e))}function Yc(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 Xc(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=bn(-1,1),t.tag=2,tr(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var vh=O.ReactCurrentOwner,zt=!1;function jt(e,t,n,r){t.child=e===null?vc(t,null,n,r):ps(t,e.child,n,r)}function Zc(e,t,n,r,o){n=n.render;var c=t.ref;return ms(t,o),r=Ho(e,t,n,r,c,o),n=Wo(),e!==null&&!zt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,zn(e,t,o)):(Ye&&n&&Eo(t),t.flags|=1,jt(e,t,r,o),t.child)}function Jc(e,t,n,r,o){if(e===null){var c=n.type;return typeof c=="function"&&!ka(c)&&c.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=c,ed(e,t,c,r,o)):(e=_i(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,(e.lanes&o)===0){var p=c.memoizedProps;if(n=n.compare,n=n!==null?n:Hs,n(p,r)&&e.ref===t.ref)return zn(e,t,o)}return t.flags|=1,e=or(c,r),e.ref=t.ref,e.return=t,t.child=e}function ed(e,t,n,r,o){if(e!==null){var c=e.memoizedProps;if(Hs(c,r)&&e.ref===t.ref)if(zt=!1,t.pendingProps=r=c,(e.lanes&o)!==0)(e.flags&131072)!==0&&(zt=!0);else return t.lanes=e.lanes,zn(e,t,o)}return Jo(e,t,n,r,o)}function td(e,t,n){var r=t.pendingProps,o=r.children,c=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},qe(xs,Gt),Gt|=n;else{if((n&1073741824)===0)return e=c!==null?c.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,qe(xs,Gt),Gt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=c!==null?c.baseLanes:n,qe(xs,Gt),Gt|=r}else c!==null?(r=c.baseLanes|n,t.memoizedState=null):r=n,qe(xs,Gt),Gt|=r;return jt(e,t,o,n),t.child}function nd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Jo(e,t,n,r,o){var c=bt(n)?Ar:wt.current;return c=us(t,c),ms(t,o),n=Ho(e,t,n,r,c,o),r=Wo(),e!==null&&!zt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,zn(e,t,o)):(Ye&&r&&Eo(t),t.flags|=1,jt(e,t,n,o),t.child)}function rd(e,t,n,r,o){if(bt(n)){var c=!0;Kl(t)}else c=!1;if(ms(t,o),t.stateNode===null)pi(e,t),Vc(t,n,r),Yo(t,n,r,o),r=!0;else if(e===null){var p=t.stateNode,x=t.memoizedProps;p.props=x;var T=p.context,L=n.contextType;typeof L=="object"&&L!==null?L=Xt(L):(L=bt(n)?Ar:wt.current,L=us(t,L));var B=n.getDerivedStateFromProps,W=typeof B=="function"||typeof p.getSnapshotBeforeUpdate=="function";W||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(x!==r||T!==L)&&Gc(t,p,r,L),er=!1;var U=t.memoizedState;p.state=U,si(t,r,p,o),T=t.memoizedState,x!==r||U!==T||Mt.current||er?(typeof B=="function"&&(Ko(t,n,B,r),T=t.memoizedState),(x=er||Wc(t,n,x,r,U,T,L))?(W||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=T),p.props=r,p.state=T,p.context=L,r=x):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{p=t.stateNode,xc(e,t),x=t.memoizedProps,L=t.type===t.elementType?x:ln(t.type,x),p.props=L,W=t.pendingProps,U=p.context,T=n.contextType,typeof T=="object"&&T!==null?T=Xt(T):(T=bt(n)?Ar:wt.current,T=us(t,T));var ee=n.getDerivedStateFromProps;(B=typeof ee=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(x!==W||U!==T)&&Gc(t,p,r,T),er=!1,U=t.memoizedState,p.state=U,si(t,r,p,o);var se=t.memoizedState;x!==W||U!==se||Mt.current||er?(typeof ee=="function"&&(Ko(t,n,ee,r),se=t.memoizedState),(L=er||Wc(t,n,L,r,U,se,T)||!1)?(B||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(r,se,T),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(r,se,T)),typeof p.componentDidUpdate=="function"&&(t.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof p.componentDidUpdate!="function"||x===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=se),p.props=r,p.state=se,p.context=T,r=L):(typeof p.componentDidUpdate!="function"||x===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),r=!1)}return ea(e,t,n,r,c,o)}function ea(e,t,n,r,o,c){nd(e,t);var p=(t.flags&128)!==0;if(!r&&!p)return o&&ac(t,n,!1),zn(e,t,c);r=t.stateNode,vh.current=t;var x=p&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&p?(t.child=ps(t,e.child,null,c),t.child=ps(t,null,x,c)):jt(e,t,x,c),t.memoizedState=r.state,o&&ac(t,n,!0),t.child}function sd(e){var t=e.stateNode;t.pendingContext?ic(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ic(e,t.context,!1),zo(e,t.containerInfo)}function ld(e,t,n,r,o){return fs(),Lo(o),t.flags|=256,jt(e,t,n,r),t.child}var ta={dehydrated:null,treeContext:null,retryLane:0};function na(e){return{baseLanes:e,cachePool:null,transitions:null}}function id(e,t,n){var r=t.pendingProps,o=et.current,c=!1,p=(t.flags&128)!==0,x;if((x=p)||(x=e!==null&&e.memoizedState===null?!1:(o&2)!==0),x?(c=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),qe(et,o&1),e===null)return Ro(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,c?(r=t.mode,c=t.child,p={mode:"hidden",children:p},(r&1)===0&&c!==null?(c.childLanes=0,c.pendingProps=p):c=Ni(p,r,0,null),e=Ur(e,r,n,null),c.return=t,e.return=t,c.sibling=e,t.child=c,t.child.memoizedState=na(n),t.memoizedState=ta,e):ra(t,p));if(o=e.memoizedState,o!==null&&(x=o.dehydrated,x!==null))return yh(e,t,p,r,x,o,n);if(c){c=r.fallback,p=t.mode,o=e.child,x=o.sibling;var T={mode:"hidden",children:r.children};return(p&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=T,t.deletions=null):(r=or(o,T),r.subtreeFlags=o.subtreeFlags&14680064),x!==null?c=or(x,c):(c=Ur(c,p,n,null),c.flags|=2),c.return=t,r.return=t,r.sibling=c,t.child=r,r=c,c=t.child,p=e.child.memoizedState,p=p===null?na(n):{baseLanes:p.baseLanes|n,cachePool:null,transitions:p.transitions},c.memoizedState=p,c.childLanes=e.childLanes&~n,t.memoizedState=ta,r}return c=e.child,e=c.sibling,r=or(c,{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 ra(e,t){return t=Ni({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function fi(e,t,n,r){return r!==null&&Lo(r),ps(t,e.child,null,n),e=ra(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function yh(e,t,n,r,o,c,p){if(n)return t.flags&256?(t.flags&=-257,r=Xo(Error(l(422))),fi(e,t,p,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(c=r.fallback,o=t.mode,r=Ni({mode:"visible",children:r.children},o,0,null),c=Ur(c,o,p,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,(t.mode&1)!==0&&ps(t,e.child,null,p),t.child.memoizedState=na(p),t.memoizedState=ta,c);if((t.mode&1)===0)return fi(e,t,p,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var x=r.dgst;return r=x,c=Error(l(419)),r=Xo(c,r,void 0),fi(e,t,p,r)}if(x=(p&e.childLanes)!==0,zt||x){if(r=dt,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!==c.retryLane&&(c.retryLane=o,Mn(e,o),un(r,e,o,-1))}return xa(),r=Xo(Error(l(421))),fi(e,t,p,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Ah.bind(null,e),o._reactRetry=t,null):(e=c.treeContext,Vt=Yn(o.nextSibling),Wt=t,Ye=!0,sn=null,e!==null&&(Kt[Yt++]=Dn,Kt[Yt++]=Pn,Kt[Yt++]=Ir,Dn=e.id,Pn=e.overflow,Ir=t),t=ra(t,r.children),t.flags|=4096,t)}function od(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Po(e.return,t,n)}function sa(e,t,n,r,o){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=r,c.tail=n,c.tailMode=o)}function ad(e,t,n){var r=t.pendingProps,o=r.revealOrder,c=r.tail;if(jt(e,t,r.children,n),r=et.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&&od(e,n,t);else if(e.tag===19)od(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(qe(et,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&&li(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),sa(t,!1,o,n,c);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&li(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}sa(t,!0,n,null,c);break;case"together":sa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function pi(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function zn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),zr|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(l(153));if(t.child!==null){for(e=t.child,n=or(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=or(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function xh(e,t,n){switch(t.tag){case 3:sd(t),fs();break;case 5:Sc(t);break;case 1:bt(t.type)&&Kl(t);break;case 4:zo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;qe(ti,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(qe(et,et.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?id(e,t,n):(qe(et,et.current&1),e=zn(e,t,n),e!==null?e.sibling:null);qe(et,et.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return ad(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),qe(et,et.current),r)break;return null;case 22:case 23:return t.lanes=0,td(e,t,n)}return zn(e,t,n)}var ud,la,cd,dd;ud=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}},la=function(){},cd=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Mr(xn.current);var c=null;switch(n){case"input":o=be(e,o),r=be(e,r),c=[];break;case"select":o=G({},o,{value:void 0}),r=G({},r,{value:void 0}),c=[];break;case"textarea":o=he(e,o),r=he(e,r),c=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Gl)}qr(n,r);var p;n=null;for(L in o)if(!r.hasOwnProperty(L)&&o.hasOwnProperty(L)&&o[L]!=null)if(L==="style"){var x=o[L];for(p in x)x.hasOwnProperty(p)&&(n||(n={}),n[p]="")}else L!=="dangerouslySetInnerHTML"&&L!=="children"&&L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&L!=="autoFocus"&&(d.hasOwnProperty(L)?c||(c=[]):(c=c||[]).push(L,null));for(L in r){var T=r[L];if(x=o!=null?o[L]:void 0,r.hasOwnProperty(L)&&T!==x&&(T!=null||x!=null))if(L==="style")if(x){for(p in x)!x.hasOwnProperty(p)||T&&T.hasOwnProperty(p)||(n||(n={}),n[p]="");for(p in T)T.hasOwnProperty(p)&&x[p]!==T[p]&&(n||(n={}),n[p]=T[p])}else n||(c||(c=[]),c.push(L,n)),n=T;else L==="dangerouslySetInnerHTML"?(T=T?T.__html:void 0,x=x?x.__html:void 0,T!=null&&x!==T&&(c=c||[]).push(L,T)):L==="children"?typeof T!="string"&&typeof T!="number"||(c=c||[]).push(L,""+T):L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&(d.hasOwnProperty(L)?(T!=null&&L==="onScroll"&&Qe("scroll",e),c||x===T||(c=[])):(c=c||[]).push(L,T))}n&&(c=c||[]).push("style",n);var L=c;(t.updateQueue=L)&&(t.flags|=4)}},dd=function(e,t,n,r){n!==r&&(t.flags|=4)};function sl(e,t){if(!Ye)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 Tt(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 kh(e,t,n){var r=t.pendingProps;switch(Co(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tt(t),null;case 1:return bt(t.type)&&Ql(),Tt(t),null;case 3:return r=t.stateNode,gs(),Ke(Mt),Ke(wt),Fo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Jl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,sn!==null&&(ga(sn),sn=null))),la(e,t),Tt(t),null;case 5:Oo(t);var o=Mr(Js.current);if(n=t.type,e!==null&&t.stateNode!=null)cd(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(l(166));return Tt(t),null}if(e=Mr(xn.current),Jl(t)){r=t.stateNode,n=t.type;var c=t.memoizedProps;switch(r[yn]=t,r[Qs]=c,e=(t.mode&1)!==0,n){case"dialog":Qe("cancel",r),Qe("close",r);break;case"iframe":case"object":case"embed":Qe("load",r);break;case"video":case"audio":for(o=0;o<Vs.length;o++)Qe(Vs[o],r);break;case"source":Qe("error",r);break;case"img":case"image":case"link":Qe("error",r),Qe("load",r);break;case"details":Qe("toggle",r);break;case"input":Un(r,c),Qe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!c.multiple},Qe("invalid",r);break;case"textarea":He(r,c),Qe("invalid",r)}qr(n,c),o=null;for(var p in c)if(c.hasOwnProperty(p)){var x=c[p];p==="children"?typeof x=="string"?r.textContent!==x&&(c.suppressHydrationWarning!==!0&&Vl(r.textContent,x,e),o=["children",x]):typeof x=="number"&&r.textContent!==""+x&&(c.suppressHydrationWarning!==!0&&Vl(r.textContent,x,e),o=["children",""+x]):d.hasOwnProperty(p)&&x!=null&&p==="onScroll"&&Qe("scroll",r)}switch(n){case"input":dn(r),hr(r,c,!0);break;case"textarea":dn(r),ot(r);break;case"select":case"option":break;default:typeof c.onClick=="function"&&(r.onclick=Gl)}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=kt(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[yn]=t,e[Qs]=r,ud(e,t,!1,!1),t.stateNode=e;e:{switch(p=vr(n,r),n){case"dialog":Qe("cancel",e),Qe("close",e),o=r;break;case"iframe":case"object":case"embed":Qe("load",e),o=r;break;case"video":case"audio":for(o=0;o<Vs.length;o++)Qe(Vs[o],e);o=r;break;case"source":Qe("error",e),o=r;break;case"img":case"image":case"link":Qe("error",e),Qe("load",e),o=r;break;case"details":Qe("toggle",e),o=r;break;case"input":Un(e,r),o=be(e,r),Qe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=G({},r,{value:void 0}),Qe("invalid",e);break;case"textarea":He(e,r),o=he(e,r),Qe("invalid",e);break;default:o=r}qr(n,o),x=o;for(c in x)if(x.hasOwnProperty(c)){var T=x[c];c==="style"?Es(e,T):c==="dangerouslySetInnerHTML"?(T=T?T.__html:void 0,T!=null&&mr(e,T)):c==="children"?typeof T=="string"?(n!=="textarea"||T!=="")&&_n(e,T):typeof T=="number"&&_n(e,""+T):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(d.hasOwnProperty(c)?T!=null&&c==="onScroll"&&Qe("scroll",e):T!=null&&J(e,c,T,p))}switch(n){case"input":dn(e),hr(e,r,!1);break;case"textarea":dn(e),ot(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ie(r.value));break;case"select":e.multiple=!!r.multiple,c=r.value,c!=null?b(e,!!r.multiple,c,!1):r.defaultValue!=null&&b(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Gl)}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 Tt(t),null;case 6:if(e&&t.stateNode!=null)dd(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(l(166));if(n=Mr(Js.current),Mr(xn.current),Jl(t)){if(r=t.stateNode,n=t.memoizedProps,r[yn]=t,(c=r.nodeValue!==n)&&(e=Wt,e!==null))switch(e.tag){case 3:Vl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Vl(r.nodeValue,n,(e.mode&1)!==0)}c&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[yn]=t,t.stateNode=r}return Tt(t),null;case 13:if(Ke(et),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ye&&Vt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)hc(),fs(),t.flags|=98560,c=!1;else if(c=Jl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!c)throw Error(l(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(l(317));c[yn]=t}else fs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Tt(t),c=!1}else sn!==null&&(ga(sn),sn=null),c=!0;if(!c)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||(et.current&1)!==0?ut===0&&(ut=3):xa())),t.updateQueue!==null&&(t.flags|=4),Tt(t),null);case 4:return gs(),la(e,t),e===null&&Gs(t.stateNode.containerInfo),Tt(t),null;case 10:return Do(t.type._context),Tt(t),null;case 17:return bt(t.type)&&Ql(),Tt(t),null;case 19:if(Ke(et),c=t.memoizedState,c===null)return Tt(t),null;if(r=(t.flags&128)!==0,p=c.rendering,p===null)if(r)sl(c,!1);else{if(ut!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(p=li(e),p!==null){for(t.flags|=128,sl(c,!1),r=p.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)c=n,e=r,c.flags&=14680066,p=c.alternate,p===null?(c.childLanes=0,c.lanes=e,c.child=null,c.subtreeFlags=0,c.memoizedProps=null,c.memoizedState=null,c.updateQueue=null,c.dependencies=null,c.stateNode=null):(c.childLanes=p.childLanes,c.lanes=p.lanes,c.child=p.child,c.subtreeFlags=0,c.deletions=null,c.memoizedProps=p.memoizedProps,c.memoizedState=p.memoizedState,c.updateQueue=p.updateQueue,c.type=p.type,e=p.dependencies,c.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return qe(et,et.current&1|2),t.child}e=e.sibling}c.tail!==null&&Xe()>ks&&(t.flags|=128,r=!0,sl(c,!1),t.lanes=4194304)}else{if(!r)if(e=li(p),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),sl(c,!0),c.tail===null&&c.tailMode==="hidden"&&!p.alternate&&!Ye)return Tt(t),null}else 2*Xe()-c.renderingStartTime>ks&&n!==1073741824&&(t.flags|=128,r=!0,sl(c,!1),t.lanes=4194304);c.isBackwards?(p.sibling=t.child,t.child=p):(n=c.last,n!==null?n.sibling=p:t.child=p,c.last=p)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=Xe(),t.sibling=null,n=et.current,qe(et,r?n&1|2:n&1),t):(Tt(t),null);case 22:case 23:return ya(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Gt&1073741824)!==0&&(Tt(t),t.subtreeFlags&6&&(t.flags|=8192)):Tt(t),null;case 24:return null;case 25:return null}throw Error(l(156,t.tag))}function wh(e,t){switch(Co(t),t.tag){case 1:return bt(t.type)&&Ql(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return gs(),Ke(Mt),Ke(wt),Fo(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Oo(t),null;case 13:if(Ke(et),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(l(340));fs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ke(et),null;case 4:return gs(),null;case 10:return Do(t.type._context),null;case 22:case 23:return ya(),null;case 24:return null;default:return null}}var hi=!1,_t=!1,Sh=typeof WeakSet=="function"?WeakSet:Set,re=null;function ys(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){nt(e,t,r)}else n.current=null}function ia(e,t,n){try{n()}catch(r){nt(e,t,r)}}var fd=!1;function Th(e,t){if(yo=Pl,e=Wu(),uo(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,c=r.focusNode;r=r.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var p=0,x=-1,T=-1,L=0,B=0,W=e,U=null;t:for(;;){for(var ee;W!==n||o!==0&&W.nodeType!==3||(x=p+o),W!==c||r!==0&&W.nodeType!==3||(T=p+r),W.nodeType===3&&(p+=W.nodeValue.length),(ee=W.firstChild)!==null;)U=W,W=ee;for(;;){if(W===e)break t;if(U===n&&++L===o&&(x=p),U===c&&++B===r&&(T=p),(ee=W.nextSibling)!==null)break;W=U,U=W.parentNode}W=ee}n=x===-1||T===-1?null:{start:x,end:T}}else n=null}n=n||{start:0,end:0}}else n=null;for(xo={focusedElem:e,selectionRange:n},Pl=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var se=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(se!==null){var ie=se.memoizedProps,st=se.memoizedState,j=t.stateNode,_=j.getSnapshotBeforeUpdate(t.elementType===t.type?ie:ln(t.type,ie),st);j.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var R=t.stateNode.containerInfo;R.nodeType===1?R.textContent="":R.nodeType===9&&R.documentElement&&R.removeChild(R.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(l(163))}}catch(Q){nt(t,t.return,Q)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return se=fd,fd=!1,se}function ll(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 c=o.destroy;o.destroy=void 0,c!==void 0&&ia(t,n,c)}o=o.next}while(o!==r)}}function mi(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 oa(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 pd(e){var t=e.alternate;t!==null&&(e.alternate=null,pd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yn],delete t[Qs],delete t[To],delete t[lh],delete t[ih])),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 hd(e){return e.tag===5||e.tag===3||e.tag===4}function md(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hd(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 aa(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=Gl));else if(r!==4&&(e=e.child,e!==null))for(aa(e,t,n),e=e.sibling;e!==null;)aa(e,t,n),e=e.sibling}function ua(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(ua(e,t,n),e=e.sibling;e!==null;)ua(e,t,n),e=e.sibling}var gt=null,on=!1;function nr(e,t,n){for(n=n.child;n!==null;)gd(e,t,n),n=n.sibling}function gd(e,t,n){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(Nr,n)}catch{}switch(n.tag){case 5:_t||ys(n,t);case 6:var r=gt,o=on;gt=null,nr(e,t,n),gt=r,on=o,gt!==null&&(on?(e=gt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):gt.removeChild(n.stateNode));break;case 18:gt!==null&&(on?(e=gt,n=n.stateNode,e.nodeType===8?So(e.parentNode,n):e.nodeType===1&&So(e,n),zs(e)):So(gt,n.stateNode));break;case 4:r=gt,o=on,gt=n.stateNode.containerInfo,on=!0,nr(e,t,n),gt=r,on=o;break;case 0:case 11:case 14:case 15:if(!_t&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var c=o,p=c.destroy;c=c.tag,p!==void 0&&((c&2)!==0||(c&4)!==0)&&ia(n,t,p),o=o.next}while(o!==r)}nr(e,t,n);break;case 1:if(!_t&&(ys(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(x){nt(n,t,x)}nr(e,t,n);break;case 21:nr(e,t,n);break;case 22:n.mode&1?(_t=(r=_t)||n.memoizedState!==null,nr(e,t,n),_t=r):nr(e,t,n);break;default:nr(e,t,n)}}function vd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Sh),t.forEach(function(r){var o=Ih.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function an(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var c=e,p=t,x=p;e:for(;x!==null;){switch(x.tag){case 5:gt=x.stateNode,on=!1;break e;case 3:gt=x.stateNode.containerInfo,on=!0;break e;case 4:gt=x.stateNode.containerInfo,on=!0;break e}x=x.return}if(gt===null)throw Error(l(160));gd(c,p,o),gt=null,on=!1;var T=o.alternate;T!==null&&(T.return=null),o.return=null}catch(L){nt(o,t,L)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)yd(t,e),t=t.sibling}function yd(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(an(t,e),wn(e),r&4){try{ll(3,e,e.return),mi(3,e)}catch(ie){nt(e,e.return,ie)}try{ll(5,e,e.return)}catch(ie){nt(e,e.return,ie)}}break;case 1:an(t,e),wn(e),r&512&&n!==null&&ys(n,n.return);break;case 5:if(an(t,e),wn(e),r&512&&n!==null&&ys(n,n.return),e.flags&32){var o=e.stateNode;try{_n(o,"")}catch(ie){nt(e,e.return,ie)}}if(r&4&&(o=e.stateNode,o!=null)){var c=e.memoizedProps,p=n!==null?n.memoizedProps:c,x=e.type,T=e.updateQueue;if(e.updateQueue=null,T!==null)try{x==="input"&&c.type==="radio"&&c.name!=null&&We(o,c),vr(x,p);var L=vr(x,c);for(p=0;p<T.length;p+=2){var B=T[p],W=T[p+1];B==="style"?Es(o,W):B==="dangerouslySetInnerHTML"?mr(o,W):B==="children"?_n(o,W):J(o,B,W,L)}switch(x){case"input":Ut(o,c);break;case"textarea":Ve(o,c);break;case"select":var U=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!c.multiple;var ee=c.value;ee!=null?b(o,!!c.multiple,ee,!1):U!==!!c.multiple&&(c.defaultValue!=null?b(o,!!c.multiple,c.defaultValue,!0):b(o,!!c.multiple,c.multiple?[]:"",!1))}o[Qs]=c}catch(ie){nt(e,e.return,ie)}}break;case 6:if(an(t,e),wn(e),r&4){if(e.stateNode===null)throw Error(l(162));o=e.stateNode,c=e.memoizedProps;try{o.nodeValue=c}catch(ie){nt(e,e.return,ie)}}break;case 3:if(an(t,e),wn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{zs(t.containerInfo)}catch(ie){nt(e,e.return,ie)}break;case 4:an(t,e),wn(e);break;case 13:an(t,e),wn(e),o=e.child,o.flags&8192&&(c=o.memoizedState!==null,o.stateNode.isHidden=c,!c||o.alternate!==null&&o.alternate.memoizedState!==null||(fa=Xe())),r&4&&vd(e);break;case 22:if(B=n!==null&&n.memoizedState!==null,e.mode&1?(_t=(L=_t)||B,an(t,e),_t=L):an(t,e),wn(e),r&8192){if(L=e.memoizedState!==null,(e.stateNode.isHidden=L)&&!B&&(e.mode&1)!==0)for(re=e,B=e.child;B!==null;){for(W=re=B;re!==null;){switch(U=re,ee=U.child,U.tag){case 0:case 11:case 14:case 15:ll(4,U,U.return);break;case 1:ys(U,U.return);var se=U.stateNode;if(typeof se.componentWillUnmount=="function"){r=U,n=U.return;try{t=r,se.props=t.memoizedProps,se.state=t.memoizedState,se.componentWillUnmount()}catch(ie){nt(r,n,ie)}}break;case 5:ys(U,U.return);break;case 22:if(U.memoizedState!==null){wd(W);continue}}ee!==null?(ee.return=U,re=ee):wd(W)}B=B.sibling}e:for(B=null,W=e;;){if(W.tag===5){if(B===null){B=W;try{o=W.stateNode,L?(c=o.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none"):(x=W.stateNode,T=W.memoizedProps.style,p=T!=null&&T.hasOwnProperty("display")?T.display:null,x.style.display=gr("display",p))}catch(ie){nt(e,e.return,ie)}}}else if(W.tag===6){if(B===null)try{W.stateNode.nodeValue=L?"":W.memoizedProps}catch(ie){nt(e,e.return,ie)}}else if((W.tag!==22&&W.tag!==23||W.memoizedState===null||W===e)&&W.child!==null){W.child.return=W,W=W.child;continue}if(W===e)break e;for(;W.sibling===null;){if(W.return===null||W.return===e)break e;B===W&&(B=null),W=W.return}B===W&&(B=null),W.sibling.return=W.return,W=W.sibling}}break;case 19:an(t,e),wn(e),r&4&&vd(e);break;case 21:break;default:an(t,e),wn(e)}}function wn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(hd(n)){var r=n;break e}n=n.return}throw Error(l(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(_n(o,""),r.flags&=-33);var c=md(e);ua(e,c,o);break;case 3:case 4:var p=r.stateNode.containerInfo,x=md(e);aa(e,x,p);break;default:throw Error(l(161))}}catch(T){nt(e,e.return,T)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _h(e,t,n){re=e,xd(e)}function xd(e,t,n){for(var r=(e.mode&1)!==0;re!==null;){var o=re,c=o.child;if(o.tag===22&&r){var p=o.memoizedState!==null||hi;if(!p){var x=o.alternate,T=x!==null&&x.memoizedState!==null||_t;x=hi;var L=_t;if(hi=p,(_t=T)&&!L)for(re=o;re!==null;)p=re,T=p.child,p.tag===22&&p.memoizedState!==null?Sd(o):T!==null?(T.return=p,re=T):Sd(o);for(;c!==null;)re=c,xd(c),c=c.sibling;re=o,hi=x,_t=L}kd(e)}else(o.subtreeFlags&8772)!==0&&c!==null?(c.return=o,re=c):kd(e)}}function kd(e){for(;re!==null;){var t=re;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:_t||mi(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!_t)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:ln(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var c=t.updateQueue;c!==null&&wc(t,c,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}wc(t,p,n)}break;case 5:var x=t.stateNode;if(n===null&&t.flags&4){n=x;var T=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":T.autoFocus&&n.focus();break;case"img":T.src&&(n.src=T.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var L=t.alternate;if(L!==null){var B=L.memoizedState;if(B!==null){var W=B.dehydrated;W!==null&&zs(W)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(l(163))}_t||t.flags&512&&oa(t)}catch(U){nt(t,t.return,U)}}if(t===e){re=null;break}if(n=t.sibling,n!==null){n.return=t.return,re=n;break}re=t.return}}function wd(e){for(;re!==null;){var t=re;if(t===e){re=null;break}var n=t.sibling;if(n!==null){n.return=t.return,re=n;break}re=t.return}}function Sd(e){for(;re!==null;){var t=re;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{mi(4,t)}catch(T){nt(t,n,T)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(T){nt(t,o,T)}}var c=t.return;try{oa(t)}catch(T){nt(t,c,T)}break;case 5:var p=t.return;try{oa(t)}catch(T){nt(t,p,T)}}}catch(T){nt(t,t.return,T)}if(t===e){re=null;break}var x=t.sibling;if(x!==null){x.return=t.return,re=x;break}re=t.return}}var Nh=Math.ceil,gi=O.ReactCurrentDispatcher,ca=O.ReactCurrentOwner,Jt=O.ReactCurrentBatchConfig,Me=0,dt=null,lt=null,vt=0,Gt=0,xs=Xn(0),ut=0,il=null,zr=0,vi=0,da=0,ol=null,Ot=null,fa=0,ks=1/0,On=null,yi=!1,pa=null,rr=null,xi=!1,sr=null,ki=0,al=0,ha=null,wi=-1,Si=0;function Rt(){return(Me&6)!==0?Xe():wi!==-1?wi:wi=Xe()}function lr(e){return(e.mode&1)===0?1:(Me&2)!==0&&vt!==0?vt&-vt:ah.transition!==null?(Si===0&&(Si=Ds()),Si):(e=De,e!==0||(e=window.event,e=e===void 0?16:_u(e.type)),e)}function un(e,t,n,r){if(50<al)throw al=0,ha=null,Error(l(185));Rr(e,n,r),((Me&2)===0||e!==dt)&&(e===dt&&((Me&2)===0&&(vi|=n),ut===4&&ir(e,vt)),$t(e,r),n===1&&Me===0&&(t.mode&1)===0&&(ks=Xe()+500,Yl&&Jn()))}function $t(e,t){var n=e.callbackNode;Al(e,t);var r=jr(e,e===dt?vt:0);if(r===0)n!==null&&jl(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&jl(n),t===1)e.tag===0?oh(_d.bind(null,e)):uc(_d.bind(null,e)),rh(function(){(Me&6)===0&&Jn()}),n=null;else{switch(q(r)){case 1:n=Wn;break;case 4:n=vn;break;case 16:n=Yr;break;case 536870912:n=Rl;break;default:n=Yr}n=Id(n,Td.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Td(e,t){if(wi=-1,Si=0,(Me&6)!==0)throw Error(l(327));var n=e.callbackNode;if(ws()&&e.callbackNode!==n)return null;var r=jr(e,e===dt?vt:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Ti(e,r);else{t=r;var o=Me;Me|=2;var c=Ed();(dt!==e||vt!==t)&&(On=null,ks=Xe()+500,$r(e,t));do try{jh();break}catch(x){Nd(e,x)}while(!0);Io(),gi.current=c,Me=o,lt!==null?t=0:(dt=null,vt=0,t=ut)}if(t!==0){if(t===2&&(o=Is(e),o!==0&&(r=o,t=ma(e,o))),t===1)throw n=il,$r(e,0),ir(e,r),$t(e,Xe()),n;if(t===6)ir(e,r);else{if(o=e.current.alternate,(r&30)===0&&!Eh(o)&&(t=Ti(e,r),t===2&&(c=Is(e),c!==0&&(r=c,t=ma(e,c))),t===1))throw n=il,$r(e,0),ir(e,r),$t(e,Xe()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(l(345));case 2:Fr(e,Ot,On);break;case 3:if(ir(e,r),(r&130023424)===r&&(t=fa+500-Xe(),10<t)){if(jr(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Rt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=wo(Fr.bind(null,e,Ot,On),t);break}Fr(e,Ot,On);break;case 4:if(ir(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var p=31-Et(r);c=1<<p,p=t[p],p>o&&(o=p),r&=~c}if(r=o,r=Xe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Nh(r/1960))-r,10<r){e.timeoutHandle=wo(Fr.bind(null,e,Ot,On),r);break}Fr(e,Ot,On);break;case 5:Fr(e,Ot,On);break;default:throw Error(l(329))}}}return $t(e,Xe()),e.callbackNode===n?Td.bind(null,e):null}function ma(e,t){var n=ol;return e.current.memoizedState.isDehydrated&&($r(e,t).flags|=256),e=Ti(e,t),e!==2&&(t=Ot,Ot=n,t!==null&&ga(t)),e}function ga(e){Ot===null?Ot=e:Ot.push.apply(Ot,e)}function Eh(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],c=o.getSnapshot;o=o.value;try{if(!rn(c(),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 ir(e,t){for(t&=~da,t&=~vi,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Et(t),r=1<<n;e[n]=-1,t&=~r}}function _d(e){if((Me&6)!==0)throw Error(l(327));ws();var t=jr(e,0);if((t&1)===0)return $t(e,Xe()),null;var n=Ti(e,t);if(e.tag!==0&&n===2){var r=Is(e);r!==0&&(t=r,n=ma(e,r))}if(n===1)throw n=il,$r(e,0),ir(e,t),$t(e,Xe()),n;if(n===6)throw Error(l(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Fr(e,Ot,On),$t(e,Xe()),null}function va(e,t){var n=Me;Me|=1;try{return e(t)}finally{Me=n,Me===0&&(ks=Xe()+500,Yl&&Jn())}}function Or(e){sr!==null&&sr.tag===0&&(Me&6)===0&&ws();var t=Me;Me|=1;var n=Jt.transition,r=De;try{if(Jt.transition=null,De=1,e)return e()}finally{De=r,Jt.transition=n,Me=t,(Me&6)===0&&Jn()}}function ya(){Gt=xs.current,Ke(xs)}function $r(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,nh(n)),lt!==null)for(n=lt.return;n!==null;){var r=n;switch(Co(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ql();break;case 3:gs(),Ke(Mt),Ke(wt),Fo();break;case 5:Oo(r);break;case 4:gs();break;case 13:Ke(et);break;case 19:Ke(et);break;case 10:Do(r.type._context);break;case 22:case 23:ya()}n=n.return}if(dt=e,lt=e=or(e.current,null),vt=Gt=t,ut=0,il=null,da=vi=zr=0,Ot=ol=null,Pr!==null){for(t=0;t<Pr.length;t++)if(n=Pr[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,c=n.pending;if(c!==null){var p=c.next;c.next=o,r.next=p}n.pending=r}Pr=null}return e}function Nd(e,t){do{var n=lt;try{if(Io(),ii.current=ci,oi){for(var r=tt.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}oi=!1}if(br=0,ct=at=tt=null,el=!1,tl=0,ca.current=null,n===null||n.return===null){ut=1,il=t,lt=null;break}e:{var c=e,p=n.return,x=n,T=t;if(t=vt,x.flags|=32768,T!==null&&typeof T=="object"&&typeof T.then=="function"){var L=T,B=x,W=B.tag;if((B.mode&1)===0&&(W===0||W===11||W===15)){var U=B.alternate;U?(B.updateQueue=U.updateQueue,B.memoizedState=U.memoizedState,B.lanes=U.lanes):(B.updateQueue=null,B.memoizedState=null)}var ee=Yc(p);if(ee!==null){ee.flags&=-257,Xc(ee,p,x,c,t),ee.mode&1&&Kc(c,L,t),t=ee,T=L;var se=t.updateQueue;if(se===null){var ie=new Set;ie.add(T),t.updateQueue=ie}else se.add(T);break e}else{if((t&1)===0){Kc(c,L,t),xa();break e}T=Error(l(426))}}else if(Ye&&x.mode&1){var st=Yc(p);if(st!==null){(st.flags&65536)===0&&(st.flags|=256),Xc(st,p,x,c,t),Lo(vs(T,x));break e}}c=T=vs(T,x),ut!==4&&(ut=2),ol===null?ol=[c]:ol.push(c),c=p;do{switch(c.tag){case 3:c.flags|=65536,t&=-t,c.lanes|=t;var j=qc(c,T,t);kc(c,j);break e;case 1:x=T;var _=c.type,R=c.stateNode;if((c.flags&128)===0&&(typeof _.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(rr===null||!rr.has(R)))){c.flags|=65536,t&=-t,c.lanes|=t;var Q=Qc(c,x,t);kc(c,Q);break e}}c=c.return}while(c!==null)}jd(n)}catch(ue){t=ue,lt===n&&n!==null&&(lt=n=n.return);continue}break}while(!0)}function Ed(){var e=gi.current;return gi.current=ci,e===null?ci:e}function xa(){(ut===0||ut===3||ut===2)&&(ut=4),dt===null||(zr&268435455)===0&&(vi&268435455)===0||ir(dt,vt)}function Ti(e,t){var n=Me;Me|=2;var r=Ed();(dt!==e||vt!==t)&&(On=null,$r(e,t));do try{Ch();break}catch(o){Nd(e,o)}while(!0);if(Io(),Me=n,gi.current=r,lt!==null)throw Error(l(261));return dt=null,vt=0,ut}function Ch(){for(;lt!==null;)Cd(lt)}function jh(){for(;lt!==null&&!Yi();)Cd(lt)}function Cd(e){var t=Ad(e.alternate,e,Gt);e.memoizedProps=e.pendingProps,t===null?jd(e):lt=t,ca.current=null}function jd(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=kh(n,t,Gt),n!==null){lt=n;return}}else{if(n=wh(n,t),n!==null){n.flags&=32767,lt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ut=6,lt=null;return}}if(t=t.sibling,t!==null){lt=t;return}lt=t=e}while(t!==null);ut===0&&(ut=5)}function Fr(e,t,n){var r=De,o=Jt.transition;try{Jt.transition=null,De=1,Rh(e,t,n,r)}finally{Jt.transition=o,De=r}return null}function Rh(e,t,n,r){do ws();while(sr!==null);if((Me&6)!==0)throw Error(l(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(l(177));e.callbackNode=null,e.callbackPriority=0;var c=n.lanes|n.childLanes;if(Il(e,c),e===dt&&(lt=dt=null,vt=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||xi||(xi=!0,Id(Yr,function(){return ws(),null})),c=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||c){c=Jt.transition,Jt.transition=null;var p=De;De=1;var x=Me;Me|=4,ca.current=null,Th(e,n),yd(n,e),Kp(xo),Pl=!!yo,xo=yo=null,e.current=n,_h(n),Xi(),Me=x,De=p,Jt.transition=c}else e.current=n;if(xi&&(xi=!1,sr=e,ki=o),c=e.pendingLanes,c===0&&(rr=null),Xr(n.stateNode),$t(e,Xe()),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(yi)throw yi=!1,e=pa,pa=null,e;return(ki&1)!==0&&e.tag!==0&&ws(),c=e.pendingLanes,(c&1)!==0?e===ha?al++:(al=0,ha=e):al=0,Jn(),null}function ws(){if(sr!==null){var e=q(ki),t=Jt.transition,n=De;try{if(Jt.transition=null,De=16>e?16:e,sr===null)var r=!1;else{if(e=sr,sr=null,ki=0,(Me&6)!==0)throw Error(l(331));var o=Me;for(Me|=4,re=e.current;re!==null;){var c=re,p=c.child;if((re.flags&16)!==0){var x=c.deletions;if(x!==null){for(var T=0;T<x.length;T++){var L=x[T];for(re=L;re!==null;){var B=re;switch(B.tag){case 0:case 11:case 15:ll(8,B,c)}var W=B.child;if(W!==null)W.return=B,re=W;else for(;re!==null;){B=re;var U=B.sibling,ee=B.return;if(pd(B),B===L){re=null;break}if(U!==null){U.return=ee,re=U;break}re=ee}}}var se=c.alternate;if(se!==null){var ie=se.child;if(ie!==null){se.child=null;do{var st=ie.sibling;ie.sibling=null,ie=st}while(ie!==null)}}re=c}}if((c.subtreeFlags&2064)!==0&&p!==null)p.return=c,re=p;else e:for(;re!==null;){if(c=re,(c.flags&2048)!==0)switch(c.tag){case 0:case 11:case 15:ll(9,c,c.return)}var j=c.sibling;if(j!==null){j.return=c.return,re=j;break e}re=c.return}}var _=e.current;for(re=_;re!==null;){p=re;var R=p.child;if((p.subtreeFlags&2064)!==0&&R!==null)R.return=p,re=R;else e:for(p=_;re!==null;){if(x=re,(x.flags&2048)!==0)try{switch(x.tag){case 0:case 11:case 15:mi(9,x)}}catch(ue){nt(x,x.return,ue)}if(x===p){re=null;break e}var Q=x.sibling;if(Q!==null){Q.return=x.return,re=Q;break e}re=x.return}}if(Me=o,Jn(),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(Nr,e)}catch{}r=!0}return r}finally{De=n,Jt.transition=t}}return!1}function Rd(e,t,n){t=vs(n,t),t=qc(e,t,1),e=tr(e,t,1),t=Rt(),e!==null&&(Rr(e,1,t),$t(e,t))}function nt(e,t,n){if(e.tag===3)Rd(e,e,n);else for(;t!==null;){if(t.tag===3){Rd(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(rr===null||!rr.has(r))){e=vs(n,e),e=Qc(t,e,1),t=tr(t,e,1),e=Rt(),t!==null&&(Rr(t,1,e),$t(t,e));break}}t=t.return}}function Lh(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Rt(),e.pingedLanes|=e.suspendedLanes&n,dt===e&&(vt&n)===n&&(ut===4||ut===3&&(vt&130023424)===vt&&500>Xe()-fa?$r(e,0):da|=n),$t(e,t)}function Ld(e,t){t===0&&((e.mode&1)===0?t=1:(t=Jr,Jr<<=1,(Jr&130023424)===0&&(Jr=4194304)));var n=Rt();e=Mn(e,t),e!==null&&(Rr(e,t,n),$t(e,n))}function Ah(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ld(e,n)}function Ih(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(l(314))}r!==null&&r.delete(t),Ld(e,n)}var Ad;Ad=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Mt.current)zt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return zt=!1,xh(e,t,n);zt=(e.flags&131072)!==0}else zt=!1,Ye&&(t.flags&1048576)!==0&&cc(t,Zl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;pi(e,t),e=t.pendingProps;var o=us(t,wt.current);ms(t,n),o=Ho(null,t,r,e,o,n);var c=Wo();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,bt(r)?(c=!0,Kl(t)):c=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,bo(t),o.updater=di,t.stateNode=o,o._reactInternals=t,Yo(t,r,e,n),t=ea(null,t,r,!0,c,n)):(t.tag=0,Ye&&c&&Eo(t),jt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(pi(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Ph(r),e=ln(r,e),o){case 0:t=Jo(null,t,r,e,n);break e;case 1:t=rd(null,t,r,e,n);break e;case 11:t=Zc(null,t,r,e,n);break e;case 14:t=Jc(null,t,r,ln(r.type,e),n);break e}throw Error(l(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ln(r,o),Jo(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ln(r,o),rd(e,t,r,o,n);case 3:e:{if(sd(t),e===null)throw Error(l(387));r=t.pendingProps,c=t.memoizedState,o=c.element,xc(e,t),si(t,r,null,n);var p=t.memoizedState;if(r=p.element,c.isDehydrated)if(c={element:r,isDehydrated:!1,cache:p.cache,pendingSuspenseBoundaries:p.pendingSuspenseBoundaries,transitions:p.transitions},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){o=vs(Error(l(423)),t),t=ld(e,t,r,n,o);break e}else if(r!==o){o=vs(Error(l(424)),t),t=ld(e,t,r,n,o);break e}else for(Vt=Yn(t.stateNode.containerInfo.firstChild),Wt=t,Ye=!0,sn=null,n=vc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(fs(),r===o){t=zn(e,t,n);break e}jt(e,t,r,n)}t=t.child}return t;case 5:return Sc(t),e===null&&Ro(t),r=t.type,o=t.pendingProps,c=e!==null?e.memoizedProps:null,p=o.children,ko(r,o)?p=null:c!==null&&ko(r,c)&&(t.flags|=32),nd(e,t),jt(e,t,p,n),t.child;case 6:return e===null&&Ro(t),null;case 13:return id(e,t,n);case 4:return zo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ps(t,null,r,n):jt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ln(r,o),Zc(e,t,r,o,n);case 7:return jt(e,t,t.pendingProps,n),t.child;case 8:return jt(e,t,t.pendingProps.children,n),t.child;case 12:return jt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,c=t.memoizedProps,p=o.value,qe(ti,r._currentValue),r._currentValue=p,c!==null)if(rn(c.value,p)){if(c.children===o.children&&!Mt.current){t=zn(e,t,n);break e}}else for(c=t.child,c!==null&&(c.return=t);c!==null;){var x=c.dependencies;if(x!==null){p=c.child;for(var T=x.firstContext;T!==null;){if(T.context===r){if(c.tag===1){T=bn(-1,n&-n),T.tag=2;var L=c.updateQueue;if(L!==null){L=L.shared;var B=L.pending;B===null?T.next=T:(T.next=B.next,B.next=T),L.pending=T}}c.lanes|=n,T=c.alternate,T!==null&&(T.lanes|=n),Po(c.return,n,t),x.lanes|=n;break}T=T.next}}else if(c.tag===10)p=c.type===t.type?null:c.child;else if(c.tag===18){if(p=c.return,p===null)throw Error(l(341));p.lanes|=n,x=p.alternate,x!==null&&(x.lanes|=n),Po(p,n,t),p=c.sibling}else p=c.child;if(p!==null)p.return=c;else for(p=c;p!==null;){if(p===t){p=null;break}if(c=p.sibling,c!==null){c.return=p.return,p=c;break}p=p.return}c=p}jt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ms(t,n),o=Xt(o),r=r(o),t.flags|=1,jt(e,t,r,n),t.child;case 14:return r=t.type,o=ln(r,t.pendingProps),o=ln(r.type,o),Jc(e,t,r,o,n);case 15:return ed(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ln(r,o),pi(e,t),t.tag=1,bt(r)?(e=!0,Kl(t)):e=!1,ms(t,n),Vc(t,r,o),Yo(t,r,o,n),ea(null,t,r,!0,e,n);case 19:return ad(e,t,n);case 22:return td(e,t,n)}throw Error(l(156,t.tag))};function Id(e,t){return As(e,t)}function Dh(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 en(e,t,n,r){return new Dh(e,t,n,r)}function ka(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ph(e){if(typeof e=="function")return ka(e)?1:0;if(e!=null){if(e=e.$$typeof,e===_e)return 11;if(e===M)return 14}return 2}function or(e,t){var n=e.alternate;return n===null?(n=en(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 _i(e,t,n,r,o,c){var p=2;if(r=e,typeof e=="function")ka(e)&&(p=1);else if(typeof e=="string")p=5;else e:switch(e){case oe:return Ur(n.children,o,c,t);case ae:p=8,o|=8;break;case Te:return e=en(12,n,t,o|2),e.elementType=Te,e.lanes=c,e;case je:return e=en(13,n,t,o),e.elementType=je,e.lanes=c,e;case de:return e=en(19,n,t,o),e.elementType=de,e.lanes=c,e;case Z:return Ni(n,o,c,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case te:p=10;break e;case ve:p=9;break e;case _e:p=11;break e;case M:p=14;break e;case Y:p=16,r=null;break e}throw Error(l(130,e==null?e:typeof e,""))}return t=en(p,n,t,o),t.elementType=e,t.type=r,t.lanes=c,t}function Ur(e,t,n,r){return e=en(7,e,r,t),e.lanes=n,e}function Ni(e,t,n,r){return e=en(22,e,r,t),e.elementType=Z,e.lanes=n,e.stateNode={isHidden:!1},e}function wa(e,t,n){return e=en(6,e,null,t),e.lanes=n,e}function Sa(e,t,n){return t=en(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Mh(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=Ps(0),this.expirationTimes=Ps(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ps(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Ta(e,t,n,r,o,c,p,x,T){return e=new Mh(e,t,n,x,T),t===1?(t=1,c===!0&&(t|=8)):t=0,c=en(3,null,null,t),e.current=c,c.stateNode=e,c.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},bo(c),e}function bh(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ce,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Dd(e){if(!e)return Zn;e=e._reactInternals;e:{if($e(e)!==e||e.tag!==1)throw Error(l(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(bt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(l(171))}if(e.tag===1){var n=e.type;if(bt(n))return oc(e,n,t)}return t}function Pd(e,t,n,r,o,c,p,x,T){return e=Ta(n,r,!0,e,o,c,p,x,T),e.context=Dd(null),n=e.current,r=Rt(),o=lr(n),c=bn(r,o),c.callback=t??null,tr(n,c,o),e.current.lanes=o,Rr(e,o,r),$t(e,r),e}function Ei(e,t,n,r){var o=t.current,c=Rt(),p=lr(o);return n=Dd(n),t.context===null?t.context=n:t.pendingContext=n,t=bn(c,p),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=tr(o,t,p),e!==null&&(un(e,o,p,c),ri(e,o,p)),p}function Ci(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 Md(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function _a(e,t){Md(e,t),(e=e.alternate)&&Md(e,t)}function zh(){return null}var bd=typeof reportError=="function"?reportError:function(e){console.error(e)};function Na(e){this._internalRoot=e}ji.prototype.render=Na.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(l(409));Ei(e,t,null,null)},ji.prototype.unmount=Na.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Or(function(){Ei(null,e,null,null)}),t[An]=null}};function ji(e){this._internalRoot=e}ji.prototype.unstable_scheduleHydration=function(e){if(e){var t=le();e={blockedOn:null,target:e,priority:t};for(var n=0;n<qn.length&&t!==0&&t<qn[n].priority;n++);qn.splice(n,0,e),n===0&&Su(e)}};function Ea(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ri(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function zd(){}function Oh(e,t,n,r,o){if(o){if(typeof r=="function"){var c=r;r=function(){var L=Ci(p);c.call(L)}}var p=Pd(t,r,e,0,null,!1,!1,"",zd);return e._reactRootContainer=p,e[An]=p.current,Gs(e.nodeType===8?e.parentNode:e),Or(),p}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var x=r;r=function(){var L=Ci(T);x.call(L)}}var T=Ta(e,0,!1,null,null,!1,!1,"",zd);return e._reactRootContainer=T,e[An]=T.current,Gs(e.nodeType===8?e.parentNode:e),Or(function(){Ei(t,T,n,r)}),T}function Li(e,t,n,r,o){var c=n._reactRootContainer;if(c){var p=c;if(typeof o=="function"){var x=o;o=function(){var T=Ci(p);x.call(T)}}Ei(t,p,e,o)}else p=Oh(n,t,e,o,r);return Ci(p)}v=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Cr(t.pendingLanes);n!==0&&(Gn(t,n|1),$t(t,Xe()),(Me&6)===0&&(ks=Xe()+500,Jn()))}break;case 13:Or(function(){var r=Mn(e,1);if(r!==null){var o=Rt();un(r,e,1,o)}}),_a(e,1)}},C=function(e){if(e.tag===13){var t=Mn(e,134217728);if(t!==null){var n=Rt();un(t,e,134217728,n)}_a(e,134217728)}},F=function(e){if(e.tag===13){var t=lr(e),n=Mn(e,t);if(n!==null){var r=Rt();un(n,e,t,r)}_a(e,t)}},le=function(){return De},fe=function(e,t){var n=De;try{return De=e,t()}finally{De=n}},Dt=function(e,t,n){switch(t){case"input":if(Ut(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=ql(r);if(!o)throw Error(l(90));Fe(r),Ut(r,o)}}}break;case"textarea":Ve(e,n);break;case"select":t=n.value,t!=null&&b(e,!!n.multiple,t,!1)}},yr=va,xr=Or;var $h={usingClientEntryPoint:!1,Events:[Ks,os,ql,Qr,js,va]},ul={findFiberByHostInstance:Lr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Fh={bundleType:ul.bundleType,version:ul.version,rendererPackageName:ul.rendererPackageName,rendererConfig:ul.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:O.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Kr(e),e===null?null:e.stateNode},findFiberByHostInstance:ul.findFiberByHostInstance||zh,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 Ai=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ai.isDisabled&&Ai.supportsFiber)try{Nr=Ai.inject(Fh),Bt=Ai}catch{}}return Ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$h,Ft.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ea(t))throw Error(l(200));return bh(e,t,null,n)},Ft.createRoot=function(e,t){if(!Ea(e))throw Error(l(299));var n=!1,r="",o=bd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Ta(e,1,!1,null,null,n,!1,r,o),e[An]=t.current,Gs(e.nodeType===8?e.parentNode:e),new Na(t)},Ft.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(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=Kr(t),e=e===null?null:e.stateNode,e},Ft.flushSync=function(e){return Or(e)},Ft.hydrate=function(e,t,n){if(!Ri(t))throw Error(l(200));return Li(null,e,t,!0,n)},Ft.hydrateRoot=function(e,t,n){if(!Ea(e))throw Error(l(405));var r=n!=null&&n.hydratedSources||null,o=!1,c="",p=bd;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(c=n.identifierPrefix),n.onRecoverableError!==void 0&&(p=n.onRecoverableError)),t=Pd(t,null,e,1,n??null,o,!1,c,p),e[An]=t.current,Gs(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 ji(t)},Ft.render=function(e,t,n){if(!Ri(t))throw Error(l(200));return Li(null,e,t,!1,n)},Ft.unmountComponentAtNode=function(e){if(!Ri(e))throw Error(l(40));return e._reactRootContainer?(Or(function(){Li(null,null,e,!1,function(){e._reactRootContainer=null,e[An]=null})}),!0):!1},Ft.unstable_batchedUpdates=va,Ft.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ri(n))throw Error(l(200));if(e==null||e._reactInternals===void 0)throw Error(l(38));return Li(e,t,n,!1,r)},Ft.version="18.3.1-next-f1338f8080-20240426",Ft}var Vd;function Yh(){if(Vd)return Ra.exports;Vd=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(i){console.error(i)}}return s(),Ra.exports=Kh(),Ra.exports}var Gd;function Xh(){if(Gd)return Ii;Gd=1;var s=Yh();return Ii.createRoot=s.createRoot,Ii.hydrateRoot=s.hydrateRoot,Ii}var Zh=Xh();const Jh=If(Zh),qd=s=>{let i;const l=new Set,a=(g,w)=>{const S=typeof g=="function"?g(i):g;if(!Object.is(S,i)){const k=i;i=w??(typeof S!="object"||S===null)?S:Object.assign({},i,S),l.forEach(A=>A(i,k))}},d=()=>i,m={setState:a,getState:d,getInitialState:()=>y,subscribe:g=>(l.add(g),()=>l.delete(g))},y=i=s(a,d,m);return m},em=(s=>s?qd(s):qd),tm=s=>s;function nm(s,i=tm){const l=gl.useSyncExternalStore(s.subscribe,gl.useCallback(()=>i(s.getState()),[s,i]),gl.useCallback(()=>i(s.getInitialState()),[s,i]));return gl.useDebugValue(l),l}const rm=s=>{const i=em(s),l=a=>nm(i,a);return Object.assign(l,i),l},sm=(s=>rm),lm="/api";async function Hi(s,i,l){const a=await fetch(`${lm}${i}`,{method:s,headers:l?{"Content-Type":"application/json"}:void 0,body:l?JSON.stringify(l):void 0});if(!a.ok)throw new Error(`${s} ${i} failed: ${a.status} ${a.statusText}`);return a.json()}function Wr(s){return Hi("GET",s)}function Tn(s,i){return Hi("POST",s,i)}function Df(s){return Hi("DELETE",s)}function fr(s,i){return Hi("PATCH",s,i)}function im(){return Wr("/sessions")}function Di(s){return Wr(`/sessions/${s}`)}function Pf(s){return Tn("/sessions",s)}function om(s){return Df(`/sessions/${s}`)}function am(s,i,l){return Tn(`/sessions/${s}/turns`,{user_prompt:i,...l!=null&&l.length?{attachments:l}:{}})}function um(s){return Tn(`/sessions/${s}/cancel`)}function cm(s,i){return fr(`/sessions/${s}`,{title:i})}function dm(s){return fr(`/sessions/${s}`,{lifecycle:"finished"})}function fm(s){return fr(`/sessions/${s}`,{lifecycle:"working"})}function Qd(s){return fr(`/sessions/${s}`,{has_unreviewed:0})}function pm(s,i,l,a){const d={model:i,model_reasoning_effort:l};return a!==void 0&&(d.runtime_type=a),fr(`/sessions/${s}`,d)}function hm(s,i){return fr(`/sessions/${s}`,{runtime_config:i})}function mm(s,i){return Tn(`/sessions/${s}/rewind`,{turn_id:i})}function gm(s){return Tn(`/sessions/${s}/restore`,{})}function vm(s,i,l){return Tn(`/sessions/${s}/branch`,{turn_id:i,title:l})}function Mf(){return Wr("/workspaces")}function ym(s,i){return Tn("/workspaces",{path:s,label:i})}function xm(s){return Tn("/workspaces/hide",{path:s})}async function km(){const s=await fetch("/api/pick-directory");if(s.status===204)return{cancelled:!0};if(!s.ok)throw new Error(`GET /api/pick-directory failed: ${s.status} ${s.statusText}`);return s.json()}const wm=(s,i)=>({sessions:[],sessionDetails:{},activeSessionId:null,openTabs:[],activeTurnIndex:0,submittingPrompt:null,restoredPrompt:null,quotedText:null,init:async()=>{try{const l=localStorage.getItem("agentpane:last-model-config");l&&s({lastModelConfig:JSON.parse(l)})}catch{}s({loading:!0,error:null});try{const[l,a]=await Promise.all([im(),Mf()]);s({sessions:l,workspaces:a,loading:!1}),l.length>0&&!i().activeSessionId&&await i().selectSession(l[0].id)}catch(l){s({loading:!1,error:l.message})}},selectSession:async l=>{if(i().sessionDetails[l]){const a=i().sessionDetails[l];s({activeSessionId:l,activeTurnIndex:a.turns.length>0?a.turns.length-1:0,activeRightTab:"turns",openTabs:i().openTabs.includes(l)?i().openTabs:[...i().openTabs,l]}),a.has_unreviewed===1&&(Qd(l).catch(()=>{}),s(d=>({sessions:d.sessions.map(f=>f.id===l?{...f,has_unreviewed:0}:f),sessionDetails:{...d.sessionDetails,[l]:{...a,has_unreviewed:0}}})));return}s({loading:!0,error:null});try{const a=await Di(l);s(d=>({sessionDetails:{...d.sessionDetails,[l]:a},activeSessionId:l,activeTurnIndex:a.turns.length>0?a.turns.length-1:0,activeRightTab:"turns",loading:!1})),a.has_unreviewed===1&&(Qd(l).catch(()=>{}),s(d=>({sessions:d.sessions.map(f=>f.id===l?{...f,has_unreviewed:0}:f),sessionDetails:{...d.sessionDetails,[l]:{...a,has_unreviewed:0}}})))}catch(a){s({loading:!1,error:a.message})}},closeTab:l=>{s(a=>{const d=a.openTabs.filter(f=>f!==l);if(a.activeSessionId===l&&d.length>0){const f=d[d.length-1],h=a.sessionDetails[f];return{openTabs:d,activeSessionId:f,activeTurnIndex:h&&h.turns.length>0?h.turns.length-1:0}}return{openTabs:d,activeSessionId:a.activeSessionId===l?null:a.activeSessionId}})},updateModelConfig:async(l,a,d)=>{const f=i().activeSessionId;if(f){s({error:null});try{const h=await pm(f,l,a,d),m={provider:h.runtime_type,model:h.model??"",reasoning:h.model_reasoning_effort??""};s({lastModelConfig:m}),localStorage.setItem("agentpane:last-model-config",JSON.stringify(m)),s(y=>({sessions:y.sessions.map(g=>g.id===f?h:g),sessionDetails:y.sessionDetails[f]?{...y.sessionDetails,[f]:{...y.sessionDetails[f],model:h.model,model_reasoning_effort:h.model_reasoning_effort,external_thread_id:h.external_thread_id}}:y.sessionDetails})),await i().refreshActiveSession()}catch(h){s({error:h.message}),i().addToast("error",`Failed to update model — ${h.message}`)}}},createSession:async l=>{s({error:null});try{const a=await Pf(l);s(f=>({sessions:[a,...f.sessions],showNewSessionDialog:!1}));const d={provider:a.runtime_type,model:a.model??"",reasoning:a.model_reasoning_effort??""};s({lastModelConfig:d}),localStorage.setItem("agentpane:last-model-config",JSON.stringify(d)),await i().selectSession(a.id),i().addLogEntry("INFO",`Session created — ${a.id.slice(0,8)}`),i().addToast("success",`Session created — ${a.title||a.id.slice(0,8)}`)}catch(a){s({error:a.message}),i().addToast("error",`Failed to create session — ${a.message}`)}},deleteSession:async l=>{var d;s({error:null});const a=(d=i().sessions.find(f=>f.id===l))==null?void 0:d.title;try{await om(l),s(f=>{const h={...f.sessionDetails};delete h[l];const m=f.openTabs.filter(w=>w!==l);let y=f.activeSessionId,g=f.activeTurnIndex;if(f.activeSessionId===l){y=m.length>0?m[m.length-1]:null;const w=y?h[y]:null;g=w&&w.turns.length>0?w.turns.length-1:0}return{sessions:f.sessions.filter(w=>w.id!==l),sessionDetails:h,openTabs:m,activeSessionId:y,activeTurnIndex:g}}),i().addLogEntry("INFO",`Session deleted — ${l.slice(0,8)}`),i().addToast("info",`Session "${a||l.slice(0,8)}" deleted`)}catch(f){s({error:f.message}),i().addToast("error",`Failed to delete session — ${f.message}`)}},renameSession:async(l,a)=>{s({error:null});try{const d=await cm(l,a.trim());s(f=>({sessions:f.sessions.map(h=>h.id===l?d:h),sessionDetails:f.sessionDetails[l]?{...f.sessionDetails,[l]:{...f.sessionDetails[l],title:d.title}}:f.sessionDetails}))}catch(d){s({error:d.message}),i().addToast("error",`Failed to rename session — ${d.message}`)}},markFinished:async l=>{s({error:null});try{const a=await dm(l);s(d=>({sessions:d.sessions.map(f=>f.id===l?a:f)})),i().addToast("info","Session marked as finished")}catch(a){s({error:a.message}),i().addToast("error",`Failed to mark as finished — ${a.message}`)}},reopenSession:async l=>{s({error:null});try{const a=await fm(l);s(d=>({sessions:d.sessions.map(f=>f.id===l?a:f)})),i().addToast("info","Session reopened")}catch(a){s({error:a.message}),i().addToast("error",`Failed to reopen session — ${a.message}`)}},submitPrompt:async(l,a)=>{const d=i().activeSessionId;if(d){s({error:null,submittingPrompt:l}),s(f=>{const h=f.sessionDetails[d];return h?{sessionDetails:{...f.sessionDetails,[d]:{...h,is_running:1,status:"running"}},sessions:f.sessions.map(m=>m.id===d?{...m,is_running:1,status:"running"}:m)}:{}});try{const f=await am(d,l,a);i().addLogEntry("INFO",`Turn submitted — "${l.slice(0,40)}"`),s(h=>{const m=h.sessionDetails[d];if(!m)return{submittingPrompt:null};const y={...f,items:[]};return{submittingPrompt:null,sessionDetails:{...h.sessionDetails,[d]:{...m,turns:[...m.turns,y]}},activeTurnIndex:m.turns.length}})}catch(f){s({submittingPrompt:null,error:f.message}),i().addLogEntry("ERROR",`Turn failed — ${f.message}`),i().addToast("error",`Failed to send prompt — ${f.message}`),s(h=>({sessionDetails:h.sessionDetails[d]?{...h.sessionDetails,[d]:{...h.sessionDetails[d],is_running:0,status:"active"}}:h.sessionDetails,sessions:h.sessions.map(m=>m.id===d?{...m,is_running:0,status:"active"}:m)}))}}},cancelTurn:async()=>{const l=i().activeSessionId;if(l)try{await um(l)}catch(a){s({error:a.message})}},rewindToTurn:async(l,a)=>{s({error:null});try{const d=await mm(l,a),f=await Di(l);s(h=>({sessionDetails:{...h.sessionDetails,[l]:f},sessions:h.sessions.map(m=>m.id===l?{...m,external_thread_id:d.external_thread_id,is_running:0,status:"active"}:m),activeTurnIndex:f.turns.length>0?f.turns.length-1:0})),i().addToast("info","Rewound to selected turn")}catch(d){s({error:d.message}),i().addToast("error",`Failed to rewind — ${d.message}`)}},restoreSession:async l=>{s({error:null});try{const a=await gm(l),d=await Di(l);s(f=>({sessionDetails:{...f.sessionDetails,[l]:d},sessions:f.sessions.map(h=>h.id===l?{...h,external_thread_id:a.external_thread_id,is_running:0,status:"active"}:h),activeTurnIndex:d.turns.length>0?d.turns.length-1:0})),i().addToast("info","Restored rewound session")}catch(a){s({error:a.message}),i().addToast("error",`Failed to restore — ${a.message}`)}},branchFromTurn:async(l,a,d)=>{s({error:null});try{const f=await vm(l,a,d);s(h=>({sessions:[f,...h.sessions]})),await i().selectSession(f.id),i().addToast("success","Branched from selected turn")}catch(f){s({error:f.message}),i().addToast("error",`Failed to branch — ${f.message}`)}},updateRuntimeConfig:async l=>{const a=i().activeSessionId;if(a){s({error:null});try{const d=await hm(a,JSON.stringify(l));s(f=>({sessions:f.sessions.map(h=>h.id===a?d:h),sessionDetails:f.sessionDetails[a]?{...f.sessionDetails,[a]:{...f.sessionDetails[a],runtime_config:d.runtime_config}}:f.sessionDetails}))}catch(d){s({error:d.message}),i().addToast("error",`Failed to update config — ${d.message}`)}}},refreshActiveSession:async()=>{const l=i().activeSessionId;if(l)try{const a=await Di(l);s(d=>({sessionDetails:{...d.sessionDetails,[l]:a},activeTurnIndex:a.turns.length>0?Math.min(d.activeTurnIndex,a.turns.length-1):0,sessions:d.sessions.map(f=>f.id===l?{...f,is_running:a.is_running,status:a.status}:f)}))}catch(a){s({error:a.message})}}}),Sm=(s,i)=>({workspaces:[],addWorkspace:async l=>{s({error:null});try{const a=await ym(l.trim());s(d=>({workspaces:[...d.workspaces,a]})),i().addToast("success",`Workspace added — ${a.path}`)}catch(a){i().addToast("error",`Failed to add workspace — ${a.message}`)}},removeWorkspace:async l=>{s({error:null});try{await xm(l);const a=await Mf();s({workspaces:a}),i().addToast("info","Workspace hidden")}catch(a){i().addToast("error",`Failed to hide workspace — ${a.message}`)}},createSessionInWorkspace:async l=>{s({error:null});try{const a=i().lastModelConfig,d=await Pf({cwd:l,runtime_type:(a==null?void 0:a.provider)??"codex",model:a==null?void 0:a.model,model_reasoning_effort:a==null?void 0:a.reasoning});s(f=>({sessions:[d,...f.sessions]})),await i().selectSession(d.id),i().addLogEntry("INFO",`Session created in ${l} — ${d.id.slice(0,8)}`),i().addToast("success",`Session created in ${l.split("/").pop()||l}`)}catch(a){s({error:a.message}),i().addToast("error",`Failed to create session — ${a.message}`)}},pickAndAddWorkspace:async()=>{try{const l=await km();if(l.cancelled||!l.path)return;await i().addWorkspace(l.path)}catch(l){i().addToast("error",`Failed to pick directory — ${l.message}`)}}}),Tm=(s,i)=>({wsConnected:!1,setWsConnected:l=>s({wsConnected:l}),onTurnStarted:(l,a)=>{i().addLogEntry("DEBUG",`turn:started — ${a.slice(0,8)}`),s(d=>{const f=d.sessionDetails[l];return f?{sessionDetails:{...d.sessionDetails,[l]:{...f,is_running:1,status:"running",turns:f.turns.map(h=>h.id===a?{...h,status:"running"}:h)}},sessions:d.sessions.map(h=>h.id===l?{...h,is_running:1,status:"running"}:h),activeTurnIndex:d.activeSessionId===l?f.turns.findIndex(h=>h.id===a):d.activeTurnIndex}:{}})},onItemStarted:(l,a,d)=>{i().addLogEntry("DEBUG",`item:started — ${d.type}`),s(f=>{const h=f.sessionDetails[l];return h?{sessionDetails:{...f.sessionDetails,[l]:Ia(h,a,d)}}:{}})},onItemUpdated:(l,a,d)=>{s(f=>{const h=f.sessionDetails[l];return h?{sessionDetails:{...f.sessionDetails,[l]:Ia(h,a,d)}}:{}})},onItemCompleted:(l,a,d)=>{if(i().addLogEntry("DEBUG",`item:completed — ${d.type}`),d.type==="background_task"&&(d.status==="completed"||d.status==="failed")){const f=d.data||{},h=f.task_type||"unknown",m=f.description||"background task",g=h==="local_agent"?"Subagent":h==="local_bash"?"Monitor":"Task";d.status==="completed"?i().addToast("success",`${g} completed: ${m}`):i().addToast("error",`${g} failed: ${m}`)}s(f=>{var g,w;const h=f.sessionDetails[l];if(!h)return{};const m=Ia(h,a,d);let y=m.turns;return d.type==="agent_message"&&((g=d.data)!=null&&g.text)&&(y=y.map(S=>S.id===a?{...S,agent_response:d.data.text}:S)),d.type==="reasoning"&&((w=d.data)!=null&&w.text)&&(y=y.map(S=>{if(S.id!==a)return S;const k=S.thoughts?S.thoughts+`
41
+ `+d.data.text:d.data.text;return{...S,thoughts:k}})),{sessionDetails:{...f.sessionDetails,[l]:{...m,turns:y}}}})},onItemDelta:(l,a,d,f)=>{s(h=>{const m=h.sessionDetails[l];return m?{sessionDetails:{...h.sessionDetails,[l]:_m(m,a,d,f)}}:{}})},onTurnCompleted:(l,a,d,f,h)=>{const m=(d==null?void 0:d.input_tokens)??0,y=(d==null?void 0:d.output_tokens)??0;i().addLogEntry("INFO",`turn:completed — ${m} in / ${y} out`),s(g=>{const w=g.sessionDetails[l];return w?{sessionDetails:{...g.sessionDetails,[l]:{...w,is_running:0,status:"active",has_unreviewed:f?1:w.has_unreviewed,turns:w.turns.map(S=>S.id===a?{...S,status:"completed",token_usage:d??S.token_usage??null,...h&&!S.agent_response?{agent_response:h}:{}}:S)}},sessions:g.sessions.map(S=>S.id===l?{...S,is_running:0,status:"active",has_unreviewed:f?1:S.has_unreviewed}:S)}:{}})},onTokenUsageUpdated:(l,a,d)=>{s(f=>{const h=f.sessionDetails[l];return h?{sessionDetails:{...f.sessionDetails,[l]:{...h,turns:h.turns.map(m=>m.id===a?{...m,token_usage:d}:m)}}}:{}})},onContextUsageUpdated:(l,a)=>{s(d=>{const f=d.sessionDetails[l];return f?{sessionDetails:{...d.sessionDetails,[l]:{...f,contextUsage:a}}}:{}})},onTurnFailed:(l,a,d)=>{i().addLogEntry("ERROR",`turn:failed — ${d}`),i().addToast("error",`Turn failed — ${d}`),s(f=>{const h=f.sessionDetails[l];if(!h)return{};const m=d.includes("cancelled")||d.includes("aborted"),y=m?"aborted":"failed";return{sessionDetails:{...f.sessionDetails,[l]:{...h,is_running:0,status:m?"active":"failed",turns:h.turns.map(g=>{if(g.id!==a)return g;const w=g.items.map(S=>S.status==="in_progress"?{...S,status:"failed"}:S);return{...g,status:y,error:d,items:w}})}},sessions:f.sessions.map(g=>g.id===l?{...g,is_running:0,status:m?"active":"failed"}:g)}})},onTurnCancelled:(l,a)=>{s(d=>{const f=d.sessionDetails[l];if(!f)return{};const h=f.turns.find(g=>g.id===a),m=(h==null?void 0:h.user_prompt)??null,y=f.turns.filter(g=>g.id!==a);return{restoredPrompt:m,sessionDetails:{...d.sessionDetails,[l]:{...f,is_running:0,status:"active",turns:y}},sessions:d.sessions.map(g=>g.id===l?{...g,is_running:0,status:"active"}:g),activeTurnIndex:y.length>0?Math.min(d.activeTurnIndex,y.length-1):0}})},onSessionTitle:(l,a)=>{s(d=>({sessions:d.sessions.map(f=>f.id===l?{...f,title:a}:f),sessionDetails:d.sessionDetails[l]?{...d.sessionDetails,[l]:{...d.sessionDetails[l],title:a}}:d.sessionDetails}))},onBackgroundTasksChanged:(l,a)=>{s(d=>{const f=d.sessionDetails[l];return f?{sessionDetails:{...d.sessionDetails,[l]:{...f,backgroundTasks:a}}}:{}})}});function Ia(s,i,l){return{...s,turns:s.turns.map(a=>{if(a.id!==i)return a;const d=a.items.findIndex(f=>f.external_item_id===l.external_item_id);if(d>=0){const f=[...a.items];return f[d]=l,{...a,items:f}}if(l.type==="agent_message"){const f=a.items.filter(h=>!(h.type==="agent_message"&&h.id.startsWith("delta-")));return{...a,items:[...f,l]}}return{...a,items:[...a.items,l]}})}}function _m(s,i,l,a){return{...s,turns:s.turns.map(d=>{var m;if(d.id!==i)return d;const f=d.items.findIndex(y=>y.external_item_id===l);if(f>=0){const y=d.items[f],w=(((m=y.data)==null?void 0:m.text)??"")+a,S=[...d.items];return S[f]={...y,data:{...y.data,text:w}},{...d,items:S,agent_response:w}}const h={id:`delta-${l}`,turn_id:i,external_item_id:l,type:"agent_message",data:{text:a},status:"in_progress",created_at:new Date().toISOString(),updated_at:new Date().toISOString()};return{...d,items:[...d.items,h],agent_response:a}})}}function Nm(s){return Wr(`/providers/${s}/models`)}const Fa=160,Ua=480,Em=240,Ba=220,Ha=600,Cm=300,Kd="agentpane:sidebar-width",Yd="agentpane:right-panel-width";function Xd(s,i,l,a){try{const d=localStorage.getItem(s);if(d==null)return a;const f=Number(d);return Number.isFinite(f)?Math.min(l,Math.max(i,f)):a}catch{return a}}const jm=(s,i)=>({activeRightTab:"turns",changesScope:"session",eventLog:[],loading:!1,error:null,showNewSessionDialog:!1,toasts:[],showCommandPalette:!1,selectedChangePath:null,lastModelConfig:null,models:[],modelsLoading:!1,showModelSelector:!1,sidebarWidth:Xd(Kd,Fa,Ua,Em),rightPanelWidth:Xd(Yd,Ba,Ha,Cm),setActiveTurnIndex:l=>s({activeTurnIndex:l}),switchRightTab:l=>s({activeRightTab:l}),setChangesScope:l=>s({changesScope:l}),setShowNewSessionDialog:l=>s({showNewSessionDialog:l}),setShowCommandPalette:l=>s({showCommandPalette:l}),setShowModelSelector:l=>s({showModelSelector:l}),setSelectedChangePath:l=>s({selectedChangePath:l}),setSidebarWidth:l=>{const a=Math.min(Ua,Math.max(Fa,Math.round(l)));s({sidebarWidth:a});try{localStorage.setItem(Kd,String(a))}catch{}},setRightPanelWidth:l=>{const a=Math.min(Ha,Math.max(Ba,Math.round(l)));s({rightPanelWidth:a});try{localStorage.setItem(Yd,String(a))}catch{}},addToast:(l,a,d,f)=>{const h=Math.random().toString(36).slice(2,9);s(m=>({toasts:[...m.toasts,{id:h,type:l,message:a,undoAction:d,undoLabel:f}]}))},removeToast:l=>{s(a=>({toasts:a.toasts.filter(d=>d.id!==l)}))},addLogEntry:(l,a)=>{const d=new Date().toLocaleTimeString("en-GB",{hour12:!1});s(f=>({eventLog:[...f.eventLog,{time:d,level:l,message:a}]}))},loadModels:async l=>{if(!i().modelsLoading){s({modelsLoading:!0,models:[]});try{const a=await Nm(l);s({models:a,modelsLoading:!1})}catch{s({modelsLoading:!1})}}}}),Rm=(s,i)=>({createThread:async(l,a)=>{try{await Tn(`/sessions/${l}/threads`,a),i().addLogEntry("INFO",`Thread created — "${a.message.slice(0,40)}"`)}catch(d){i().addToast("error",`Failed to create thread — ${d.message}`)}},followupThread:async(l,a,d)=>{try{await Tn(`/sessions/${l}/threads/${a}/followup`,{message:d}),i().addLogEntry("INFO",`Thread follow-up — "${d.slice(0,40)}"`)}catch(f){i().addToast("error",`Failed to send follow-up — ${f.message}`)}},resolveThread:async(l,a)=>{try{await fr(`/sessions/${l}/threads/${a}`,{status:"resolved"})}catch(d){i().addToast("error",`Failed to resolve thread — ${d.message}`)}},reopenThread:async(l,a)=>{try{await fr(`/sessions/${l}/threads/${a}`,{status:"open"})}catch(d){i().addToast("error",`Failed to reopen thread — ${d.message}`)}},deleteThread:async(l,a)=>{try{await Df(`/sessions/${l}/threads/${a}`)}catch(d){i().addToast("error",`Failed to delete thread — ${d.message}`)}},onThreadCreated:(l,a,d)=>{s(f=>{const h=f.sessionDetails[l];return h?{sessionDetails:{...f.sessionDetails,[l]:{...h,threads:[...h.threads??[],a],turns:[...h.turns,{...d,items:[]}]}}}:{}})},onThreadFollowup:(l,a,d)=>{s(f=>{const h=f.sessionDetails[l];return h?{sessionDetails:{...f.sessionDetails,[l]:{...h,turns:[...h.turns,{...d,items:[]}]}}}:{}})},onThreadResolved:(l,a,d)=>{s(f=>{const h=f.sessionDetails[l];if(!h)return{};const m=(h.threads??[]).map(y=>y.id===a?{...y,status:d,resolved_at:d==="resolved"?new Date().toISOString():null}:y);return{sessionDetails:{...f.sessionDetails,[l]:{...h,threads:m}}}})},onThreadDeleted:(l,a)=>{s(d=>{const f=d.sessionDetails[l];return f?{sessionDetails:{...d.sessionDetails,[l]:{...f,threads:(f.threads??[]).filter(h=>h.id!==a),turns:f.turns.filter(h=>h.thread_id!==a)}}}:{}})}}),K=sm()((...s)=>({...wm(...s),...Sm(...s),...Tm(...s),...jm(...s),...Rm(...s)}));function bf(s){switch(s){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 Lm(s,i){const l=new Date(s).getTime(),a=i?new Date(i).getTime():Date.now(),d=Math.max(0,Math.floor((a-l)/1e3));if(d<60)return`${d}s`;const f=Math.floor(d/60),h=d%60;if(f<60)return`${f}m ${h}s`;const m=Math.floor(f/60),y=f%60;return`${m}h ${y}m`}function Am(s,i,l=!1,a="working"){if(a==="finished")return"";if(i)return"running";if(l&&s!=="failed")return"queued";switch(s){case"failed":return"error";case"aborted":return"paused";default:return"paused"}}function Im(s,i,l=!1,a="working"){if(a==="finished")return"Finished";if(i)return"Running";if(l&&s!=="failed")return"Review Pending";switch(s){case"failed":return"Failed";case"aborted":return"Aborted";case"active":return"Idle";case"completed":return"Completed";case"running":return"Running";default:return s}}function ru(s){const i=s.is_running===1,l=s.lifecycle==="finished",a=bf(s.runtime_type);return{dot:Am(s.status,i,s.has_unreviewed===1,s.lifecycle),label:Im(s.status,i,s.has_unreviewed===1,s.lifecycle),iconClass:a.iconClass,iconText:a.iconText,isRunning:i,isFinished:l}}function su(s,i,l=!0){P.useEffect(()=>{if(!l)return;function a(d){s.current&&!s.current.contains(d.target)&&i()}return document.addEventListener("mousedown",a),document.addEventListener("touchstart",a),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("touchstart",a)}},[s,i,l])}function lu(s,i=!0){P.useEffect(()=>{if(!i)return;function l(a){a.key==="Escape"&&s()}return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[s,i])}function iu({status:s,size:i=6}){return u.jsx("span",{className:`status-dot ${s}`,style:i!==6?{width:i,height:i}:void 0})}function zf({iconClass:s,iconText:i,size:l=20}){return u.jsx("span",{className:`runtime-icon ${s}`,style:l!==20?{width:l,height:l,fontSize:l*.45}:void 0,children:i})}/**
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 Dm=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Of=(...s)=>s.filter((i,l,a)=>!!i&&i.trim()!==""&&a.indexOf(i)===l).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 Pm={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 Mm=P.forwardRef(({color:s="currentColor",size:i=24,strokeWidth:l=2,absoluteStrokeWidth:a,className:d="",children:f,iconNode:h,...m},y)=>P.createElement("svg",{ref:y,...Pm,width:i,height:i,stroke:s,strokeWidth:a?Number(l)*24/Number(i):l,className:Of("lucide",d),...m},[...h.map(([g,w])=>P.createElement(g,w)),...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 we=(s,i)=>{const l=P.forwardRef(({className:a,...d},f)=>P.createElement(Mm,{ref:f,iconNode:i,className:Of(`lucide-${Dm(s)}`,a),...d}));return l.displayName=`${s}`,l};/**
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 bm=we("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 Wa=we("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
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 zm=we("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
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 yl=we("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
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 Va=we("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
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 ou=we("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
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 au=we("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"}]]);/**
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=we("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
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 $f=we("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
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 $m=we("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
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 Ff=we("Cog",[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]]);/**
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 Zd=we("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"}]]);/**
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 Fm=we("CornerDownLeft",[["polyline",{points:"9 10 4 15 9 20",key:"r3jprv"}],["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}]]);/**
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 Um=we("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"}]]);/**
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 Bm=we("FilePlus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);/**
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 Uf=we("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
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 Hm=we("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"}]]);/**
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 Wm=we("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"}]]);/**
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=we("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"}]]);/**
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 Gm=we("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
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 qm=we("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"}]]);/**
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 Qm=we("ListTodo",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
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=we("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"}]]);/**
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 Ym=we("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"}]]);/**
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 Xm=we("MessageSquarePlus",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M9 10h6",key:"9gxzsh"}]]);/**
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 Zm=we("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
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 Jm=we("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
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 eg=we("Navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]]);/**
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 tg=we("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]);/**
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 ng=we("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"}]]);/**
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 rg=we("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
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 xl=we("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
222
+ * @license lucide-react v0.469.0 - ISC
223
+ *
224
+ * This source code is licensed under the ISC license.
225
+ * See the LICENSE file in the root directory of this source tree.
226
+ */const Bf=we("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
227
+ * @license lucide-react v0.469.0 - ISC
228
+ *
229
+ * This source code is licensed under the ISC license.
230
+ * See the LICENSE file in the root directory of this source tree.
231
+ */const sg=we("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"}]]);/**
232
+ * @license lucide-react v0.469.0 - ISC
233
+ *
234
+ * This source code is licensed under the ISC license.
235
+ * See the LICENSE file in the root directory of this source tree.
236
+ */const uu=we("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"}]]);/**
237
+ * @license lucide-react v0.469.0 - ISC
238
+ *
239
+ * This source code is licensed under the ISC license.
240
+ * See the LICENSE file in the root directory of this source tree.
241
+ */const Hf=we("SatelliteDish",[["path",{d:"M4 10a7.31 7.31 0 0 0 10 10Z",key:"1fzpp3"}],["path",{d:"m9 15 3-3",key:"88sc13"}],["path",{d:"M17 13a6 6 0 0 0-6-6",key:"15cc6u"}],["path",{d:"M21 13A10 10 0 0 0 11 3",key:"11nf8s"}]]);/**
242
+ * @license lucide-react v0.469.0 - ISC
243
+ *
244
+ * This source code is licensed under the ISC license.
245
+ * See the LICENSE file in the root directory of this source tree.
246
+ */const lg=we("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
247
+ * @license lucide-react v0.469.0 - ISC
248
+ *
249
+ * This source code is licensed under the ISC license.
250
+ * See the LICENSE file in the root directory of this source tree.
251
+ */const Wi=we("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"}]]);/**
252
+ * @license lucide-react v0.469.0 - ISC
253
+ *
254
+ * This source code is licensed under the ISC license.
255
+ * See the LICENSE file in the root directory of this source tree.
256
+ */const Vi=we("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
257
+ * @license lucide-react v0.469.0 - ISC
258
+ *
259
+ * This source code is licensed under the ISC license.
260
+ * See the LICENSE file in the root directory of this source tree.
261
+ */const Wf=we("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
262
+ * @license lucide-react v0.469.0 - ISC
263
+ *
264
+ * This source code is licensed under the ISC license.
265
+ * See the LICENSE file in the root directory of this source tree.
266
+ */const kl=we("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"}]]);/**
267
+ * @license lucide-react v0.469.0 - ISC
268
+ *
269
+ * This source code is licensed under the ISC license.
270
+ * See the LICENSE file in the root directory of this source tree.
271
+ */const ig=we("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"}]]);/**
272
+ * @license lucide-react v0.469.0 - ISC
273
+ *
274
+ * This source code is licensed under the ISC license.
275
+ * See the LICENSE file in the root directory of this source tree.
276
+ */const og=we("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"}]]);/**
277
+ * @license lucide-react v0.469.0 - ISC
278
+ *
279
+ * This source code is licensed under the ISC license.
280
+ * See the LICENSE file in the root directory of this source tree.
281
+ */const ag=we("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"}]]);/**
282
+ * @license lucide-react v0.469.0 - ISC
283
+ *
284
+ * This source code is licensed under the ISC license.
285
+ * See the LICENSE file in the root directory of this source tree.
286
+ */const ug=we("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"}]]);/**
287
+ * @license lucide-react v0.469.0 - ISC
288
+ *
289
+ * This source code is licensed under the ISC license.
290
+ * See the LICENSE file in the root directory of this source tree.
291
+ */const pr=we("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
292
+ * @license lucide-react v0.469.0 - ISC
293
+ *
294
+ * This source code is licensed under the ISC license.
295
+ * See the LICENSE file in the root directory of this source tree.
296
+ */const Jd=we("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 cg(s,i){const l=new Map;for(const h of i){const m=h.cwd||"(no directory)",y=l.get(m)??[];y.push(h),l.set(m,y)}const a=new Set,d=new Set(s.filter(h=>h.deleted===1).map(h=>h.path)),f=[];for(const h of s){if(h.deleted===1){a.add(h.path);continue}a.add(h.path),f.push({path:h.path,label:h.label||h.path.split("/").pop()||h.path,sessions:l.get(h.path)??[],workspace:h})}for(const[h,m]of l)a.has(h)||d.has(h)||f.push({path:h,label:h==="(no directory)"?"Other":h.split("/").pop()||h,sessions:m,workspace:null});return f}function dg(){const{sessions:s,workspaces:i,activeSessionId:l,selectSession:a,deleteSession:d,removeWorkspace:f,createSessionInWorkspace:h,pickAndAddWorkspace:m,renameSession:y,markFinished:g,reopenSession:w}=K(),[S,k]=P.useState(new Set),[A,D]=P.useState(new Set),[N,z]=P.useState(null),[H,V]=P.useState(null),[J,O]=P.useState(""),ne=P.useRef(null),ce=P.useRef(null);su(ne,()=>z(null),!!N),lu(()=>z(null),!!N);function oe(de){k(M=>{const Y=new Set(M);return Y.has(de)?Y.delete(de):Y.add(de),Y})}function ae(de){D(M=>{const Y=new Set(M);return Y.has(de)?Y.delete(de):Y.add(de),Y})}P.useEffect(()=>{H&&ce.current&&(ce.current.focus(),ce.current.select())},[H]);function Te(de,M){V(de),O(M||de.slice(0,8))}function te(){H&&y(H,J),V(null)}function ve(){V(null),O("")}const _e=cg(i,s);function je(de){const M=l===de.id,Y=ru(de);return u.jsxs("div",{className:`tree-item ${M?"active":""} ${Y.isFinished?"tree-item-finished":""}`,onClick:()=>a(de.id),onContextMenu:Z=>{Z.preventDefault(),z({x:Z.clientX,y:Z.clientY,type:"session",sessionId:de.id,sessionTitle:de.title,sessionLifecycle:de.lifecycle})},children:[u.jsx(zf,{iconClass:Y.iconClass,iconText:Y.iconText,size:16}),H===de.id?u.jsx("input",{ref:ce,className:"tree-rename-input",value:J,onChange:Z=>O(Z.target.value),onClick:Z=>Z.stopPropagation(),onKeyDown:Z=>{Z.key==="Enter"&&te(),Z.key==="Escape"&&ve()},onBlur:te}):u.jsx("span",{className:"tree-label",children:de.title||de.id.slice(0,8)}),Y.dot&&u.jsx(iu,{status:Y.dot})]},de.id)}return u.jsxs("div",{className:"ide-sidebar",children:[u.jsxs("div",{className:"sidebar-header",children:[u.jsx("span",{className:"sidebar-header-title",children:"Workspaces"}),u.jsx("button",{className:"sidebar-add",title:"Add workspace",onClick:()=>m(),children:u.jsx(xl,{size:14})})]}),_e.length===0?u.jsx("div",{className:"empty-state",style:{padding:"16px"},children:"No workspaces yet. Click + to add one."}):_e.map(de=>{const M=S.has(de.path),Y=de.sessions.filter(G=>G.lifecycle!=="finished"),Z=de.sessions.filter(G=>G.lifecycle==="finished"),$=`${de.path}:finished`,X=A.has($);return u.jsxs("div",{className:`tree-section ${M?"collapsed":""}`,children:[u.jsxs("div",{className:"tree-section-header",onClick:()=>oe(de.path),onContextMenu:G=>{G.preventDefault(),z({x:G.clientX,y:G.clientY,type:"workspace",path:de.path})},children:[u.jsx(Va,{size:9,className:"tree-chevron"}),u.jsx(Wm,{size:14}),u.jsx("span",{className:"tree-section-label",children:de.label}),u.jsx("button",{className:"tree-section-add",title:"New session in this workspace",onClick:G=>{G.stopPropagation(),h(de.path)},children:u.jsx(xl,{size:11})}),u.jsx("span",{className:"tree-count",children:de.sessions.length})]}),u.jsxs("div",{className:"tree-children",children:[Y.length===0&&Z.length===0?u.jsx("div",{className:"tree-empty",children:"No sessions"}):Y.map(je),Z.length>0&&u.jsxs("div",{className:`tree-subgroup ${X?"collapsed":""}`,children:[u.jsxs("div",{className:"tree-subgroup-header",onClick:()=>ae($),children:[u.jsx(Va,{size:8,className:"tree-chevron"}),u.jsx("span",{className:"tree-subgroup-label",children:"Finished"}),u.jsx("span",{className:"tree-subgroup-count",children:Z.length})]}),!X&&u.jsx("div",{className:"tree-subgroup-items",children:Z.map(je)})]})]})]},de.path)}),u.jsxs("div",{className:"sidebar-footer",onClick:()=>m(),children:[u.jsx(Hm,{size:14}),u.jsx("span",{children:"Add workspace"})]}),N&&u.jsxs("div",{ref:ne,className:"ctx-menu",style:{position:"fixed",left:N.x,top:N.y,zIndex:500},children:[N.type==="workspace"&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"ctx-menu-item",onClick:()=>{h(N.path),z(null)},children:[u.jsx(xl,{size:12})," New Session"]}),u.jsxs("div",{className:"ctx-menu-item ctx-danger",onClick:()=>{f(N.path),z(null)},children:[u.jsx(kl,{size:12})," Hide Workspace"]})]}),N.type==="session"&&u.jsx(u.Fragment,{children:N.sessionLifecycle!=="finished"?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"ctx-menu-item",onClick:()=>{Te(N.sessionId,N.sessionTitle??""),z(null)},children:[u.jsx(ng,{size:12})," Rename"]}),u.jsxs("div",{className:"ctx-menu-item",onClick:()=>{g(N.sessionId),z(null)},children:[u.jsx($f,{size:12})," Mark as Finished"]}),u.jsxs("div",{className:"ctx-menu-item ctx-danger",onClick:()=>{d(N.sessionId),z(null)},children:[u.jsx(kl,{size:12})," Delete Session"]})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"ctx-menu-item",onClick:()=>{w(N.sessionId),z(null)},children:[u.jsx(uu,{size:12})," Reopen"]}),u.jsxs("div",{className:"ctx-menu-item ctx-danger",onClick:()=>{d(N.sessionId),z(null)},children:[u.jsx(kl,{size:12})," Delete Session"]})]})})]})]})}function fg(){const s=K(h=>h.openTabs),i=K(h=>h.activeSessionId),l=K(h=>h.sessions),a=K(h=>h.selectSession),d=K(h=>h.closeTab),f=K(h=>h.setShowNewSessionDialog);return u.jsxs("div",{className:"ide-tabs",children:[s.map(h=>{const m=l.find(w=>w.id===h);if(!m)return null;const y=ru(m),g=i===h;return u.jsxs("div",{className:`ide-tab ${g?"active":""}`,onClick:()=>a(h),children:[u.jsx(zf,{iconClass:y.iconClass,iconText:y.iconText,size:14}),m.title||h.slice(0,8),y.dot&&u.jsx(iu,{status:y.dot}),u.jsx("span",{className:"ide-tab-close",onClick:w=>{w.stopPropagation(),d(h)},children:u.jsx(pr,{size:12})})]},h)}),u.jsx("div",{className:"ide-tab-add",title:"New Session",onClick:()=>f(!0),children:u.jsx(xl,{size:14})})]})}function cu(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Vr=cu();function Vf(s){Vr=s}var wl={exec:()=>null};function Ue(s,i=""){let l=typeof s=="string"?s:s.source;const a={replace:(d,f)=>{let h=typeof f=="string"?f:f.source;return h=h.replace(Lt.caret,"$1"),l=l.replace(d,h),a},getRegex:()=>new RegExp(l,i)};return a}var Lt={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:s=>new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,"i")},pg=/^(?:[ \t]*(?:\n|$))+/,hg=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,mg=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Tl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,gg=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,du=/(?:[*+-]|\d{1,9}[.)])/,Gf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,qf=Ue(Gf).replace(/bull/g,du).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(),vg=Ue(Gf).replace(/bull/g,du).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(),fu=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,yg=/^[^\n]+/,pu=/(?!\s*\])(?:\\.|[^\[\]\\])+/,xg=Ue(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",pu).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),kg=Ue(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,du).getRegex(),Gi="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",hu=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,wg=Ue("^ {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",hu).replace("tag",Gi).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Qf=Ue(fu).replace("hr",Tl).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",Gi).getRegex(),Sg=Ue(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Qf).getRegex(),mu={blockquote:Sg,code:hg,def:xg,fences:mg,heading:gg,hr:Tl,html:wg,lheading:qf,list:kg,newline:pg,paragraph:Qf,table:wl,text:yg},ef=Ue("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Tl).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",Gi).getRegex(),Tg={...mu,lheading:vg,table:ef,paragraph:Ue(fu).replace("hr",Tl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ef).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",Gi).getRegex()},_g={...mu,html:Ue(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",hu).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:wl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ue(fu).replace("hr",Tl).replace("heading",` *#{1,6} *[^
297
+ ]`).replace("lheading",qf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ng=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Eg=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Kf=/^( {2,}|\\)\n(?!\s*$)/,Cg=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,qi=/[\p{P}\p{S}]/u,gu=/[\s\p{P}\p{S}]/u,Yf=/[^\s\p{P}\p{S}]/u,jg=Ue(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,gu).getRegex(),Xf=/(?!~)[\p{P}\p{S}]/u,Rg=/(?!~)[\s\p{P}\p{S}]/u,Lg=/(?:[^\s\p{P}\p{S}]|~)/u,Ag=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Zf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Ig=Ue(Zf,"u").replace(/punct/g,qi).getRegex(),Dg=Ue(Zf,"u").replace(/punct/g,Xf).getRegex(),Jf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Pg=Ue(Jf,"gu").replace(/notPunctSpace/g,Yf).replace(/punctSpace/g,gu).replace(/punct/g,qi).getRegex(),Mg=Ue(Jf,"gu").replace(/notPunctSpace/g,Lg).replace(/punctSpace/g,Rg).replace(/punct/g,Xf).getRegex(),bg=Ue("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Yf).replace(/punctSpace/g,gu).replace(/punct/g,qi).getRegex(),zg=Ue(/\\(punct)/,"gu").replace(/punct/g,qi).getRegex(),Og=Ue(/^<(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(),$g=Ue(hu).replace("(?:-->|$)","-->").getRegex(),Fg=Ue("^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",$g).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$i=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ug=Ue(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",$i).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ep=Ue(/^!?\[(label)\]\[(ref)\]/).replace("label",$i).replace("ref",pu).getRegex(),tp=Ue(/^!?\[(ref)\](?:\[\])?/).replace("ref",pu).getRegex(),Bg=Ue("reflink|nolink(?!\\()","g").replace("reflink",ep).replace("nolink",tp).getRegex(),vu={_backpedal:wl,anyPunctuation:zg,autolink:Og,blockSkip:Ag,br:Kf,code:Eg,del:wl,emStrongLDelim:Ig,emStrongRDelimAst:Pg,emStrongRDelimUnd:bg,escape:Ng,link:Ug,nolink:tp,punctuation:jg,reflink:ep,reflinkSearch:Bg,tag:Fg,text:Cg,url:wl},Hg={...vu,link:Ue(/^!?\[(label)\]\((.*?)\)/).replace("label",$i).getRegex(),reflink:Ue(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$i).getRegex()},Ga={...vu,emStrongRDelimAst:Mg,emStrongLDelim:Dg,url:Ue(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},Wg={...Ga,br:Ue(Kf).replace("{2,}","*").getRegex(),text:Ue(Ga.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Pi={normal:mu,gfm:Tg,pedantic:_g},dl={normal:vu,gfm:Ga,breaks:Wg,pedantic:Hg},Vg={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},tf=s=>Vg[s];function Sn(s,i){if(i){if(Lt.escapeTest.test(s))return s.replace(Lt.escapeReplace,tf)}else if(Lt.escapeTestNoEncode.test(s))return s.replace(Lt.escapeReplaceNoEncode,tf);return s}function nf(s){try{s=encodeURI(s).replace(Lt.percentDecode,"%")}catch{return null}return s}function rf(s,i){var f;const l=s.replace(Lt.findPipe,(h,m,y)=>{let g=!1,w=m;for(;--w>=0&&y[w]==="\\";)g=!g;return g?"|":" |"}),a=l.split(Lt.splitPipe);let d=0;if(a[0].trim()||a.shift(),a.length>0&&!((f=a.at(-1))!=null&&f.trim())&&a.pop(),i)if(a.length>i)a.splice(i);else for(;a.length<i;)a.push("");for(;d<a.length;d++)a[d]=a[d].trim().replace(Lt.slashPipe,"|");return a}function fl(s,i,l){const a=s.length;if(a===0)return"";let d=0;for(;d<a&&s.charAt(a-d-1)===i;)d++;return s.slice(0,a-d)}function Gg(s,i){if(s.indexOf(i[1])===-1)return-1;let l=0;for(let a=0;a<s.length;a++)if(s[a]==="\\")a++;else if(s[a]===i[0])l++;else if(s[a]===i[1]&&(l--,l<0))return a;return l>0?-2:-1}function sf(s,i,l,a,d){const f=i.href,h=i.title||null,m=s[1].replace(d.other.outputLinkReplace,"$1");a.state.inLink=!0;const y={type:s[0].charAt(0)==="!"?"image":"link",raw:l,href:f,title:h,text:m,tokens:a.inlineTokens(m)};return a.state.inLink=!1,y}function qg(s,i,l){const a=s.match(l.other.indentCodeCompensation);if(a===null)return i;const d=a[1];return i.split(`
298
+ `).map(f=>{const h=f.match(l.other.beginningSpace);if(h===null)return f;const[m]=h;return m.length>=d.length?f.slice(d.length):f}).join(`
299
+ `)}var Fi=class{constructor(s){Ge(this,"options");Ge(this,"rules");Ge(this,"lexer");this.options=s||Vr}space(s){const i=this.rules.block.newline.exec(s);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(s){const i=this.rules.block.code.exec(s);if(i){const l=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?l:fl(l,`
300
+ `)}}}fences(s){const i=this.rules.block.fences.exec(s);if(i){const l=i[0],a=qg(l,i[3]||"",this.rules);return{type:"code",raw:l,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:a}}}heading(s){const i=this.rules.block.heading.exec(s);if(i){let l=i[2].trim();if(this.rules.other.endingHash.test(l)){const a=fl(l,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(l=a.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:l,tokens:this.lexer.inline(l)}}}hr(s){const i=this.rules.block.hr.exec(s);if(i)return{type:"hr",raw:fl(i[0],`
301
+ `)}}blockquote(s){const i=this.rules.block.blockquote.exec(s);if(i){let l=fl(i[0],`
302
+ `).split(`
303
+ `),a="",d="";const f=[];for(;l.length>0;){let h=!1;const m=[];let y;for(y=0;y<l.length;y++)if(this.rules.other.blockquoteStart.test(l[y]))m.push(l[y]),h=!0;else if(!h)m.push(l[y]);else break;l=l.slice(y);const g=m.join(`
304
+ `),w=g.replace(this.rules.other.blockquoteSetextReplace,`
305
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
306
+ ${g}`:g,d=d?`${d}
307
+ ${w}`:w;const S=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(w,f,!0),this.lexer.state.top=S,l.length===0)break;const k=f.at(-1);if((k==null?void 0:k.type)==="code")break;if((k==null?void 0:k.type)==="blockquote"){const A=k,D=A.raw+`
308
+ `+l.join(`
309
+ `),N=this.blockquote(D);f[f.length-1]=N,a=a.substring(0,a.length-A.raw.length)+N.raw,d=d.substring(0,d.length-A.text.length)+N.text;break}else if((k==null?void 0:k.type)==="list"){const A=k,D=A.raw+`
310
+ `+l.join(`
311
+ `),N=this.list(D);f[f.length-1]=N,a=a.substring(0,a.length-k.raw.length)+N.raw,d=d.substring(0,d.length-A.raw.length)+N.raw,l=D.substring(f.at(-1).raw.length).split(`
312
+ `);continue}}return{type:"blockquote",raw:a,tokens:f,text:d}}}list(s){let i=this.rules.block.list.exec(s);if(i){let l=i[1].trim();const a=l.length>1,d={type:"list",raw:"",ordered:a,start:a?+l.slice(0,-1):"",loose:!1,items:[]};l=a?`\\d{1,9}\\${l.slice(-1)}`:`\\${l}`,this.options.pedantic&&(l=a?l:"[*+-]");const f=this.rules.other.listItemRegex(l);let h=!1;for(;s;){let y=!1,g="",w="";if(!(i=f.exec(s))||this.rules.block.hr.test(s))break;g=i[0],s=s.substring(g.length);let S=i[2].split(`
313
+ `,1)[0].replace(this.rules.other.listReplaceTabs,H=>" ".repeat(3*H.length)),k=s.split(`
314
+ `,1)[0],A=!S.trim(),D=0;if(this.options.pedantic?(D=2,w=S.trimStart()):A?D=i[1].length+1:(D=i[2].search(this.rules.other.nonSpaceChar),D=D>4?1:D,w=S.slice(D),D+=i[1].length),A&&this.rules.other.blankLine.test(k)&&(g+=k+`
315
+ `,s=s.substring(k.length+1),y=!0),!y){const H=this.rules.other.nextBulletRegex(D),V=this.rules.other.hrRegex(D),J=this.rules.other.fencesBeginRegex(D),O=this.rules.other.headingBeginRegex(D),ne=this.rules.other.htmlBeginRegex(D);for(;s;){const ce=s.split(`
316
+ `,1)[0];let oe;if(k=ce,this.options.pedantic?(k=k.replace(this.rules.other.listReplaceNesting," "),oe=k):oe=k.replace(this.rules.other.tabCharGlobal," "),J.test(k)||O.test(k)||ne.test(k)||H.test(k)||V.test(k))break;if(oe.search(this.rules.other.nonSpaceChar)>=D||!k.trim())w+=`
317
+ `+oe.slice(D);else{if(A||S.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||J.test(S)||O.test(S)||V.test(S))break;w+=`
318
+ `+k}!A&&!k.trim()&&(A=!0),g+=ce+`
319
+ `,s=s.substring(ce.length+1),S=oe.slice(D)}}d.loose||(h?d.loose=!0:this.rules.other.doubleBlankLine.test(g)&&(h=!0));let N=null,z;this.options.gfm&&(N=this.rules.other.listIsTask.exec(w),N&&(z=N[0]!=="[ ] ",w=w.replace(this.rules.other.listReplaceTask,""))),d.items.push({type:"list_item",raw:g,task:!!N,checked:z,loose:!1,text:w,tokens:[]}),d.raw+=g}const m=d.items.at(-1);if(m)m.raw=m.raw.trimEnd(),m.text=m.text.trimEnd();else return;d.raw=d.raw.trimEnd();for(let y=0;y<d.items.length;y++)if(this.lexer.state.top=!1,d.items[y].tokens=this.lexer.blockTokens(d.items[y].text,[]),!d.loose){const g=d.items[y].tokens.filter(S=>S.type==="space"),w=g.length>0&&g.some(S=>this.rules.other.anyLine.test(S.raw));d.loose=w}if(d.loose)for(let y=0;y<d.items.length;y++)d.items[y].loose=!0;return d}}html(s){const i=this.rules.block.html.exec(s);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(s){const i=this.rules.block.def.exec(s);if(i){const l=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",d=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:l,raw:i[0],href:a,title:d}}}table(s){var h;const i=this.rules.block.table.exec(s);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;const l=rf(i[1]),a=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),d=(h=i[3])!=null&&h.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
320
+ `):[],f={type:"table",raw:i[0],header:[],align:[],rows:[]};if(l.length===a.length){for(const m of a)this.rules.other.tableAlignRight.test(m)?f.align.push("right"):this.rules.other.tableAlignCenter.test(m)?f.align.push("center"):this.rules.other.tableAlignLeft.test(m)?f.align.push("left"):f.align.push(null);for(let m=0;m<l.length;m++)f.header.push({text:l[m],tokens:this.lexer.inline(l[m]),header:!0,align:f.align[m]});for(const m of d)f.rows.push(rf(m,f.header.length).map((y,g)=>({text:y,tokens:this.lexer.inline(y),header:!1,align:f.align[g]})));return f}}lheading(s){const i=this.rules.block.lheading.exec(s);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(s){const i=this.rules.block.paragraph.exec(s);if(i){const l=i[1].charAt(i[1].length-1)===`
321
+ `?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:l,tokens:this.lexer.inline(l)}}}text(s){const i=this.rules.block.text.exec(s);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(s){const i=this.rules.inline.escape.exec(s);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(s){const i=this.rules.inline.tag.exec(s);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(s){const i=this.rules.inline.link.exec(s);if(i){const l=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(l)){if(!this.rules.other.endAngleBracket.test(l))return;const f=fl(l.slice(0,-1),"\\");if((l.length-f.length)%2===0)return}else{const f=Gg(i[2],"()");if(f===-2)return;if(f>-1){const m=(i[0].indexOf("!")===0?5:4)+i[1].length+f;i[2]=i[2].substring(0,f),i[0]=i[0].substring(0,m).trim(),i[3]=""}}let a=i[2],d="";if(this.options.pedantic){const f=this.rules.other.pedanticHrefTitle.exec(a);f&&(a=f[1],d=f[3])}else d=i[3]?i[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(l)?a=a.slice(1):a=a.slice(1,-1)),sf(i,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:d&&d.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(s,i){let l;if((l=this.rules.inline.reflink.exec(s))||(l=this.rules.inline.nolink.exec(s))){const a=(l[2]||l[1]).replace(this.rules.other.multipleSpaceGlobal," "),d=i[a.toLowerCase()];if(!d){const f=l[0].charAt(0);return{type:"text",raw:f,text:f}}return sf(l,d,l[0],this.lexer,this.rules)}}emStrong(s,i,l=""){let a=this.rules.inline.emStrongLDelim.exec(s);if(!a||a[3]&&l.match(this.rules.other.unicodeAlphaNumeric))return;if(!(a[1]||a[2]||"")||!l||this.rules.inline.punctuation.exec(l)){const f=[...a[0]].length-1;let h,m,y=f,g=0;const w=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(w.lastIndex=0,i=i.slice(-1*s.length+f);(a=w.exec(i))!=null;){if(h=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!h)continue;if(m=[...h].length,a[3]||a[4]){y+=m;continue}else if((a[5]||a[6])&&f%3&&!((f+m)%3)){g+=m;continue}if(y-=m,y>0)continue;m=Math.min(m,m+y+g);const S=[...a[0]][0].length,k=s.slice(0,f+a.index+S+m);if(Math.min(f,m)%2){const D=k.slice(1,-1);return{type:"em",raw:k,text:D,tokens:this.lexer.inlineTokens(D)}}const A=k.slice(2,-2);return{type:"strong",raw:k,text:A,tokens:this.lexer.inlineTokens(A)}}}}codespan(s){const i=this.rules.inline.code.exec(s);if(i){let l=i[2].replace(this.rules.other.newLineCharGlobal," ");const a=this.rules.other.nonSpaceChar.test(l),d=this.rules.other.startingSpaceChar.test(l)&&this.rules.other.endingSpaceChar.test(l);return a&&d&&(l=l.substring(1,l.length-1)),{type:"codespan",raw:i[0],text:l}}}br(s){const i=this.rules.inline.br.exec(s);if(i)return{type:"br",raw:i[0]}}del(s){const i=this.rules.inline.del.exec(s);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(s){const i=this.rules.inline.autolink.exec(s);if(i){let l,a;return i[2]==="@"?(l=i[1],a="mailto:"+l):(l=i[1],a=l),{type:"link",raw:i[0],text:l,href:a,tokens:[{type:"text",raw:l,text:l}]}}}url(s){var l;let i;if(i=this.rules.inline.url.exec(s)){let a,d;if(i[2]==="@")a=i[0],d="mailto:"+a;else{let f;do f=i[0],i[0]=((l=this.rules.inline._backpedal.exec(i[0]))==null?void 0:l[0])??"";while(f!==i[0]);a=i[0],i[1]==="www."?d="http://"+i[0]:d=i[0]}return{type:"link",raw:i[0],text:a,href:d,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(s){const i=this.rules.inline.text.exec(s);if(i){const l=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:l}}}},$n=class qa{constructor(i){Ge(this,"tokens");Ge(this,"options");Ge(this,"state");Ge(this,"tokenizer");Ge(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=i||Vr,this.options.tokenizer=this.options.tokenizer||new Fi,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 l={other:Lt,block:Pi.normal,inline:dl.normal};this.options.pedantic?(l.block=Pi.pedantic,l.inline=dl.pedantic):this.options.gfm&&(l.block=Pi.gfm,this.options.breaks?l.inline=dl.breaks:l.inline=dl.gfm),this.tokenizer.rules=l}static get rules(){return{block:Pi,inline:dl}}static lex(i,l){return new qa(l).lex(i)}static lexInline(i,l){return new qa(l).inlineTokens(i)}lex(i){i=i.replace(Lt.carriageReturn,`
322
+ `),this.blockTokens(i,this.tokens);for(let l=0;l<this.inlineQueue.length;l++){const a=this.inlineQueue[l];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,l=[],a=!1){var d,f,h;for(this.options.pedantic&&(i=i.replace(Lt.tabCharGlobal," ").replace(Lt.spaceLine,""));i;){let m;if((f=(d=this.options.extensions)==null?void 0:d.block)!=null&&f.some(g=>(m=g.call({lexer:this},i,l))?(i=i.substring(m.raw.length),l.push(m),!0):!1))continue;if(m=this.tokenizer.space(i)){i=i.substring(m.raw.length);const g=l.at(-1);m.raw.length===1&&g!==void 0?g.raw+=`
323
+ `:l.push(m);continue}if(m=this.tokenizer.code(i)){i=i.substring(m.raw.length);const g=l.at(-1);(g==null?void 0:g.type)==="paragraph"||(g==null?void 0:g.type)==="text"?(g.raw+=`
324
+ `+m.raw,g.text+=`
325
+ `+m.text,this.inlineQueue.at(-1).src=g.text):l.push(m);continue}if(m=this.tokenizer.fences(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.heading(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.hr(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.blockquote(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.list(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.html(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.def(i)){i=i.substring(m.raw.length);const g=l.at(-1);(g==null?void 0:g.type)==="paragraph"||(g==null?void 0:g.type)==="text"?(g.raw+=`
326
+ `+m.raw,g.text+=`
327
+ `+m.raw,this.inlineQueue.at(-1).src=g.text):this.tokens.links[m.tag]||(this.tokens.links[m.tag]={href:m.href,title:m.title});continue}if(m=this.tokenizer.table(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.lheading(i)){i=i.substring(m.raw.length),l.push(m);continue}let y=i;if((h=this.options.extensions)!=null&&h.startBlock){let g=1/0;const w=i.slice(1);let S;this.options.extensions.startBlock.forEach(k=>{S=k.call({lexer:this},w),typeof S=="number"&&S>=0&&(g=Math.min(g,S))}),g<1/0&&g>=0&&(y=i.substring(0,g+1))}if(this.state.top&&(m=this.tokenizer.paragraph(y))){const g=l.at(-1);a&&(g==null?void 0:g.type)==="paragraph"?(g.raw+=`
328
+ `+m.raw,g.text+=`
329
+ `+m.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=g.text):l.push(m),a=y.length!==i.length,i=i.substring(m.raw.length);continue}if(m=this.tokenizer.text(i)){i=i.substring(m.raw.length);const g=l.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=`
330
+ `+m.raw,g.text+=`
331
+ `+m.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=g.text):l.push(m);continue}if(i){const g="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return this.state.top=!0,l}inline(i,l=[]){return this.inlineQueue.push({src:i,tokens:l}),l}inlineTokens(i,l=[]){var m,y,g;let a=i,d=null;if(this.tokens.links){const w=Object.keys(this.tokens.links);if(w.length>0)for(;(d=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)w.includes(d[0].slice(d[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,d.index)+"["+"a".repeat(d[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(d=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,d.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(d=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,d.index)+"["+"a".repeat(d[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let f=!1,h="";for(;i;){f||(h=""),f=!1;let w;if((y=(m=this.options.extensions)==null?void 0:m.inline)!=null&&y.some(k=>(w=k.call({lexer:this},i,l))?(i=i.substring(w.raw.length),l.push(w),!0):!1))continue;if(w=this.tokenizer.escape(i)){i=i.substring(w.raw.length),l.push(w);continue}if(w=this.tokenizer.tag(i)){i=i.substring(w.raw.length),l.push(w);continue}if(w=this.tokenizer.link(i)){i=i.substring(w.raw.length),l.push(w);continue}if(w=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(w.raw.length);const k=l.at(-1);w.type==="text"&&(k==null?void 0:k.type)==="text"?(k.raw+=w.raw,k.text+=w.text):l.push(w);continue}if(w=this.tokenizer.emStrong(i,a,h)){i=i.substring(w.raw.length),l.push(w);continue}if(w=this.tokenizer.codespan(i)){i=i.substring(w.raw.length),l.push(w);continue}if(w=this.tokenizer.br(i)){i=i.substring(w.raw.length),l.push(w);continue}if(w=this.tokenizer.del(i)){i=i.substring(w.raw.length),l.push(w);continue}if(w=this.tokenizer.autolink(i)){i=i.substring(w.raw.length),l.push(w);continue}if(!this.state.inLink&&(w=this.tokenizer.url(i))){i=i.substring(w.raw.length),l.push(w);continue}let S=i;if((g=this.options.extensions)!=null&&g.startInline){let k=1/0;const A=i.slice(1);let D;this.options.extensions.startInline.forEach(N=>{D=N.call({lexer:this},A),typeof D=="number"&&D>=0&&(k=Math.min(k,D))}),k<1/0&&k>=0&&(S=i.substring(0,k+1))}if(w=this.tokenizer.inlineText(S)){i=i.substring(w.raw.length),w.raw.slice(-1)!=="_"&&(h=w.raw.slice(-1)),f=!0;const k=l.at(-1);(k==null?void 0:k.type)==="text"?(k.raw+=w.raw,k.text+=w.text):l.push(w);continue}if(i){const k="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(k);break}else throw new Error(k)}}return l}},Ui=class{constructor(s){Ge(this,"options");Ge(this,"parser");this.options=s||Vr}space(s){return""}code({text:s,lang:i,escaped:l}){var f;const a=(f=(i||"").match(Lt.notSpaceStart))==null?void 0:f[0],d=s.replace(Lt.endingNewline,"")+`
332
+ `;return a?'<pre><code class="language-'+Sn(a)+'">'+(l?d:Sn(d,!0))+`</code></pre>
333
+ `:"<pre><code>"+(l?d:Sn(d,!0))+`</code></pre>
334
+ `}blockquote({tokens:s}){return`<blockquote>
335
+ ${this.parser.parse(s)}</blockquote>
336
+ `}html({text:s}){return s}heading({tokens:s,depth:i}){return`<h${i}>${this.parser.parseInline(s)}</h${i}>
337
+ `}hr(s){return`<hr>
338
+ `}list(s){const i=s.ordered,l=s.start;let a="";for(let h=0;h<s.items.length;h++){const m=s.items[h];a+=this.listitem(m)}const d=i?"ol":"ul",f=i&&l!==1?' start="'+l+'"':"";return"<"+d+f+`>
339
+ `+a+"</"+d+`>
340
+ `}listitem(s){var l;let i="";if(s.task){const a=this.checkbox({checked:!!s.checked});s.loose?((l=s.tokens[0])==null?void 0:l.type)==="paragraph"?(s.tokens[0].text=a+" "+s.tokens[0].text,s.tokens[0].tokens&&s.tokens[0].tokens.length>0&&s.tokens[0].tokens[0].type==="text"&&(s.tokens[0].tokens[0].text=a+" "+Sn(s.tokens[0].tokens[0].text),s.tokens[0].tokens[0].escaped=!0)):s.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):i+=a+" "}return i+=this.parser.parse(s.tokens,!!s.loose),`<li>${i}</li>
341
+ `}checkbox({checked:s}){return"<input "+(s?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:s}){return`<p>${this.parser.parseInline(s)}</p>
342
+ `}table(s){let i="",l="";for(let d=0;d<s.header.length;d++)l+=this.tablecell(s.header[d]);i+=this.tablerow({text:l});let a="";for(let d=0;d<s.rows.length;d++){const f=s.rows[d];l="";for(let h=0;h<f.length;h++)l+=this.tablecell(f[h]);a+=this.tablerow({text:l})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
343
+ <thead>
344
+ `+i+`</thead>
345
+ `+a+`</table>
346
+ `}tablerow({text:s}){return`<tr>
347
+ ${s}</tr>
348
+ `}tablecell(s){const i=this.parser.parseInline(s.tokens),l=s.header?"th":"td";return(s.align?`<${l} align="${s.align}">`:`<${l}>`)+i+`</${l}>
349
+ `}strong({tokens:s}){return`<strong>${this.parser.parseInline(s)}</strong>`}em({tokens:s}){return`<em>${this.parser.parseInline(s)}</em>`}codespan({text:s}){return`<code>${Sn(s,!0)}</code>`}br(s){return"<br>"}del({tokens:s}){return`<del>${this.parser.parseInline(s)}</del>`}link({href:s,title:i,tokens:l}){const a=this.parser.parseInline(l),d=nf(s);if(d===null)return a;s=d;let f='<a href="'+s+'"';return i&&(f+=' title="'+Sn(i)+'"'),f+=">"+a+"</a>",f}image({href:s,title:i,text:l,tokens:a}){a&&(l=this.parser.parseInline(a,this.parser.textRenderer));const d=nf(s);if(d===null)return Sn(l);s=d;let f=`<img src="${s}" alt="${l}"`;return i&&(f+=` title="${Sn(i)}"`),f+=">",f}text(s){return"tokens"in s&&s.tokens?this.parser.parseInline(s.tokens):"escaped"in s&&s.escaped?s.text:Sn(s.text)}},yu=class{strong({text:s}){return s}em({text:s}){return s}codespan({text:s}){return s}del({text:s}){return s}html({text:s}){return s}text({text:s}){return s}link({text:s}){return""+s}image({text:s}){return""+s}br(){return""}},Fn=class Qa{constructor(i){Ge(this,"options");Ge(this,"renderer");Ge(this,"textRenderer");this.options=i||Vr,this.options.renderer=this.options.renderer||new Ui,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new yu}static parse(i,l){return new Qa(l).parse(i)}static parseInline(i,l){return new Qa(l).parseInline(i)}parse(i,l=!0){var d,f;let a="";for(let h=0;h<i.length;h++){const m=i[h];if((f=(d=this.options.extensions)==null?void 0:d.renderers)!=null&&f[m.type]){const g=m,w=this.options.extensions.renderers[g.type].call({parser:this},g);if(w!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(g.type)){a+=w||"";continue}}const y=m;switch(y.type){case"space":{a+=this.renderer.space(y);continue}case"hr":{a+=this.renderer.hr(y);continue}case"heading":{a+=this.renderer.heading(y);continue}case"code":{a+=this.renderer.code(y);continue}case"table":{a+=this.renderer.table(y);continue}case"blockquote":{a+=this.renderer.blockquote(y);continue}case"list":{a+=this.renderer.list(y);continue}case"html":{a+=this.renderer.html(y);continue}case"paragraph":{a+=this.renderer.paragraph(y);continue}case"text":{let g=y,w=this.renderer.text(g);for(;h+1<i.length&&i[h+1].type==="text";)g=i[++h],w+=`
350
+ `+this.renderer.text(g);l?a+=this.renderer.paragraph({type:"paragraph",raw:w,text:w,tokens:[{type:"text",raw:w,text:w,escaped:!0}]}):a+=w;continue}default:{const g='Token with "'+y.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw new Error(g)}}}return a}parseInline(i,l=this.renderer){var d,f;let a="";for(let h=0;h<i.length;h++){const m=i[h];if((f=(d=this.options.extensions)==null?void 0:d.renderers)!=null&&f[m.type]){const g=this.options.extensions.renderers[m.type].call({parser:this},m);if(g!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(m.type)){a+=g||"";continue}}const y=m;switch(y.type){case"escape":{a+=l.text(y);break}case"html":{a+=l.html(y);break}case"link":{a+=l.link(y);break}case"image":{a+=l.image(y);break}case"strong":{a+=l.strong(y);break}case"em":{a+=l.em(y);break}case"codespan":{a+=l.codespan(y);break}case"br":{a+=l.br(y);break}case"del":{a+=l.del(y);break}case"text":{a+=l.text(y);break}default:{const g='Token with "'+y.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw new Error(g)}}}return a}},$a,Oi=($a=class{constructor(s){Ge(this,"options");Ge(this,"block");this.options=s||Vr}preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}provideLexer(){return this.block?$n.lex:$n.lexInline}provideParser(){return this.block?Fn.parse:Fn.parseInline}},Ge($a,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),$a),Qg=class{constructor(...s){Ge(this,"defaults",cu());Ge(this,"options",this.setOptions);Ge(this,"parse",this.parseMarkdown(!0));Ge(this,"parseInline",this.parseMarkdown(!1));Ge(this,"Parser",Fn);Ge(this,"Renderer",Ui);Ge(this,"TextRenderer",yu);Ge(this,"Lexer",$n);Ge(this,"Tokenizer",Fi);Ge(this,"Hooks",Oi);this.use(...s)}walkTokens(s,i){var a,d;let l=[];for(const f of s)switch(l=l.concat(i.call(this,f)),f.type){case"table":{const h=f;for(const m of h.header)l=l.concat(this.walkTokens(m.tokens,i));for(const m of h.rows)for(const y of m)l=l.concat(this.walkTokens(y.tokens,i));break}case"list":{const h=f;l=l.concat(this.walkTokens(h.items,i));break}default:{const h=f;(d=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&d[h.type]?this.defaults.extensions.childTokens[h.type].forEach(m=>{const y=h[m].flat(1/0);l=l.concat(this.walkTokens(y,i))}):h.tokens&&(l=l.concat(this.walkTokens(h.tokens,i)))}}return l}use(...s){const i=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(l=>{const a={...l};if(a.async=this.defaults.async||a.async||!1,l.extensions&&(l.extensions.forEach(d=>{if(!d.name)throw new Error("extension name required");if("renderer"in d){const f=i.renderers[d.name];f?i.renderers[d.name]=function(...h){let m=d.renderer.apply(this,h);return m===!1&&(m=f.apply(this,h)),m}:i.renderers[d.name]=d.renderer}if("tokenizer"in d){if(!d.level||d.level!=="block"&&d.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const f=i[d.level];f?f.unshift(d.tokenizer):i[d.level]=[d.tokenizer],d.start&&(d.level==="block"?i.startBlock?i.startBlock.push(d.start):i.startBlock=[d.start]:d.level==="inline"&&(i.startInline?i.startInline.push(d.start):i.startInline=[d.start]))}"childTokens"in d&&d.childTokens&&(i.childTokens[d.name]=d.childTokens)}),a.extensions=i),l.renderer){const d=this.defaults.renderer||new Ui(this.defaults);for(const f in l.renderer){if(!(f in d))throw new Error(`renderer '${f}' does not exist`);if(["options","parser"].includes(f))continue;const h=f,m=l.renderer[h],y=d[h];d[h]=(...g)=>{let w=m.apply(d,g);return w===!1&&(w=y.apply(d,g)),w||""}}a.renderer=d}if(l.tokenizer){const d=this.defaults.tokenizer||new Fi(this.defaults);for(const f in l.tokenizer){if(!(f in d))throw new Error(`tokenizer '${f}' does not exist`);if(["options","rules","lexer"].includes(f))continue;const h=f,m=l.tokenizer[h],y=d[h];d[h]=(...g)=>{let w=m.apply(d,g);return w===!1&&(w=y.apply(d,g)),w}}a.tokenizer=d}if(l.hooks){const d=this.defaults.hooks||new Oi;for(const f in l.hooks){if(!(f in d))throw new Error(`hook '${f}' does not exist`);if(["options","block"].includes(f))continue;const h=f,m=l.hooks[h],y=d[h];Oi.passThroughHooks.has(f)?d[h]=g=>{if(this.defaults.async)return Promise.resolve(m.call(d,g)).then(S=>y.call(d,S));const w=m.call(d,g);return y.call(d,w)}:d[h]=(...g)=>{let w=m.apply(d,g);return w===!1&&(w=y.apply(d,g)),w}}a.hooks=d}if(l.walkTokens){const d=this.defaults.walkTokens,f=l.walkTokens;a.walkTokens=function(h){let m=[];return m.push(f.call(this,h)),d&&(m=m.concat(d.call(this,h))),m}}this.defaults={...this.defaults,...a}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,i){return $n.lex(s,i??this.defaults)}parser(s,i){return Fn.parse(s,i??this.defaults)}parseMarkdown(s){return(l,a)=>{const d={...a},f={...this.defaults,...d},h=this.onError(!!f.silent,!!f.async);if(this.defaults.async===!0&&d.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 l>"u"||l===null)return h(new Error("marked(): input parameter is undefined or null"));if(typeof l!="string")return h(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(l)+", string expected"));f.hooks&&(f.hooks.options=f,f.hooks.block=s);const m=f.hooks?f.hooks.provideLexer():s?$n.lex:$n.lexInline,y=f.hooks?f.hooks.provideParser():s?Fn.parse:Fn.parseInline;if(f.async)return Promise.resolve(f.hooks?f.hooks.preprocess(l):l).then(g=>m(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=>y(g,f)).then(g=>f.hooks?f.hooks.postprocess(g):g).catch(h);try{f.hooks&&(l=f.hooks.preprocess(l));let g=m(l,f);f.hooks&&(g=f.hooks.processAllTokens(g)),f.walkTokens&&this.walkTokens(g,f.walkTokens);let w=y(g,f);return f.hooks&&(w=f.hooks.postprocess(w)),w}catch(g){return h(g)}}}onError(s,i){return l=>{if(l.message+=`
351
+ Please report this to https://github.com/markedjs/marked.`,s){const a="<p>An error occurred:</p><pre>"+Sn(l.message+"",!0)+"</pre>";return i?Promise.resolve(a):a}if(i)return Promise.reject(l);throw l}}},Hr=new Qg;function Ae(s,i){return Hr.parse(s,i)}Ae.options=Ae.setOptions=function(s){return Hr.setOptions(s),Ae.defaults=Hr.defaults,Vf(Ae.defaults),Ae};Ae.getDefaults=cu;Ae.defaults=Vr;Ae.use=function(...s){return Hr.use(...s),Ae.defaults=Hr.defaults,Vf(Ae.defaults),Ae};Ae.walkTokens=function(s,i){return Hr.walkTokens(s,i)};Ae.parseInline=Hr.parseInline;Ae.Parser=Fn;Ae.parser=Fn.parse;Ae.Renderer=Ui;Ae.TextRenderer=yu;Ae.Lexer=$n;Ae.lexer=$n.lex;Ae.Tokenizer=Fi;Ae.Hooks=Oi;Ae.parse=Ae;Ae.options;Ae.setOptions;Ae.use;Ae.walkTokens;Ae.parseInline;Fn.parse;$n.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 lf(s,i){(i==null||i>s.length)&&(i=s.length);for(var l=0,a=Array(i);l<i;l++)a[l]=s[l];return a}function Kg(s){if(Array.isArray(s))return s}function Yg(s,i){var l=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(l!=null){var a,d,f,h,m=[],y=!0,g=!1;try{if(f=(l=l.call(s)).next,i!==0)for(;!(y=(a=f.call(l)).done)&&(m.push(a.value),m.length!==i);y=!0);}catch(w){g=!0,d=w}finally{try{if(!y&&l.return!=null&&(h=l.return(),Object(h)!==h))return}finally{if(g)throw d}}return m}}function Xg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
352
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zg(s,i){return Kg(s)||Yg(s,i)||Jg(s,i)||Xg()}function Jg(s,i){if(s){if(typeof s=="string")return lf(s,i);var l={}.toString.call(s).slice(8,-1);return l==="Object"&&s.constructor&&(l=s.constructor.name),l==="Map"||l==="Set"?Array.from(s):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?lf(s,i):void 0}}const np=Object.entries,of=Object.setPrototypeOf,ev=Object.isFrozen,tv=Object.getPrototypeOf,nv=Object.getOwnPropertyDescriptor;let yt=Object.freeze,xt=Object.seal,_s=Object.create,rp=typeof Reflect<"u"&&Reflect,Ka=rp.apply,Ya=rp.construct;yt||(yt=function(i){return i});xt||(xt=function(i){return i});Ka||(Ka=function(i,l){for(var a=arguments.length,d=new Array(a>2?a-2:0),f=2;f<a;f++)d[f-2]=arguments[f];return i.apply(l,d)});Ya||(Ya=function(i){for(var l=arguments.length,a=new Array(l>1?l-1:0),d=1;d<l;d++)a[d-1]=arguments[d];return new i(...a)});const Ss=it(Array.prototype.forEach),rv=it(Array.prototype.lastIndexOf),af=it(Array.prototype.pop),Ts=it(Array.prototype.push),sv=it(Array.prototype.splice),dr=Array.isArray,vl=it(String.prototype.toLowerCase),Da=it(String.prototype.toString),uf=it(String.prototype.match),pl=it(String.prototype.replace),cf=it(String.prototype.indexOf),lv=it(String.prototype.trim),iv=it(Number.prototype.toString),ov=it(Boolean.prototype.toString),df=typeof BigInt>"u"?null:it(BigInt.prototype.toString),ff=typeof Symbol>"u"?null:it(Symbol.prototype.toString),ht=it(Object.prototype.hasOwnProperty),hl=it(Object.prototype.toString),pt=it(RegExp.prototype.test),Br=av(TypeError);function it(s){return function(i){i instanceof RegExp&&(i.lastIndex=0);for(var l=arguments.length,a=new Array(l>1?l-1:0),d=1;d<l;d++)a[d-1]=arguments[d];return Ka(s,i,a)}}function av(s){return function(){for(var i=arguments.length,l=new Array(i),a=0;a<i;a++)l[a]=arguments[a];return Ya(s,l)}}function Le(s,i){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vl;if(of&&of(s,null),!dr(i))return s;let a=i.length;for(;a--;){let d=i[a];if(typeof d=="string"){const f=l(d);f!==d&&(ev(i)||(i[a]=f),d=f)}s[d]=!0}return s}function uv(s){for(let i=0;i<s.length;i++)ht(s,i)||(s[i]=null);return s}function Nt(s){const i=_s(null);for(const a of np(s)){var l=Zg(a,2);const d=l[0],f=l[1];ht(s,d)&&(dr(f)?i[d]=uv(f):f&&typeof f=="object"&&f.constructor===Object?i[d]=Nt(f):i[d]=f)}return i}function cv(s){switch(typeof s){case"string":return s;case"number":return iv(s);case"boolean":return ov(s);case"bigint":return df?df(s):"0";case"symbol":return ff?ff(s):"Symbol()";case"undefined":return hl(s);case"function":case"object":{if(s===null)return hl(s);const i=s,l=cn(i,"toString");if(typeof l=="function"){const a=l(i);return typeof a=="string"?a:hl(a)}return hl(s)}default:return hl(s)}}function cn(s,i){for(;s!==null;){const a=nv(s,i);if(a){if(a.get)return it(a.get);if(typeof a.value=="function")return it(a.value)}s=tv(s)}function l(){return null}return l}function dv(s){try{return pt(s,""),!0}catch{return!1}}const pf=yt(["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"]),Pa=yt(["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"]),Ma=yt(["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"]),fv=yt(["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"]),ba=yt(["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"]),pv=yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),hf=yt(["#text"]),mf=yt(["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"]),za=yt(["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"]),gf=yt(["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"]),Mi=yt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),hv=xt(/{{[\w\W]*|^[\w\W]*}}/g),mv=xt(/<%[\w\W]*|^[\w\W]*%>/g),gv=xt(/\${[\w\W]*/g),vv=xt(/^data-[\-\w.\u00B7-\uFFFF]+$/),yv=xt(/^aria-[\-\w]+$/),vf=xt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),xv=xt(/^(?:\w+script|data):/i),kv=xt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),wv=xt(/^html$/i),Sv=xt(/^[a-z][.\w]*(-[.\w]+)+$/i),yf=xt(/<[/\w!]/g),xf=xt(/<[/\w]/g),Tv=xt(/<\/no(script|embed|frames)/i),_v=xt(/\/>/i),qt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Nv=function(){return typeof window>"u"?null:window},Ev=function(i,l){if(typeof i!="object"||typeof i.createPolicy!="function")return null;let a=null;const d="data-tt-policy-suffix";l&&l.hasAttribute(d)&&(a=l.getAttribute(d));const f="dompurify"+(a?"#"+a:"");try{return i.createPolicy(f,{createHTML(h){return h},createScriptURL(h){return h}})}catch{return console.warn("TrustedTypes policy "+f+" could not be created."),null}},kf=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},ur=function(i,l,a,d){return ht(i,l)&&dr(i[l])?Le(d.base?Nt(d.base):{},i[l],d.transform):a};function sp(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Nv();const i=q=>sp(q);if(i.version="3.4.13",i.removed=[],!s||!s.document||s.document.nodeType!==qt.document||!s.Element)return i.isSupported=!1,i;let l=s.document;const a=l,d=a.currentScript;s.DocumentFragment;const f=s.HTMLTemplateElement,h=s.Node,m=s.Element,y=s.NodeFilter,g=s.NamedNodeMap;g===void 0&&(s.NamedNodeMap||s.MozNamedAttrMap),s.HTMLFormElement;const w=s.DOMParser,S=s.trustedTypes,k=m.prototype,A=cn(k,"cloneNode"),D=cn(k,"remove"),N=cn(k,"nextSibling"),z=cn(k,"childNodes"),H=cn(k,"parentNode"),V=cn(k,"shadowRoot"),J=cn(k,"attributes"),O=h&&h.prototype?cn(h.prototype,"nodeType"):null,ne=h&&h.prototype?cn(h.prototype,"nodeName"):null,ce=h&&h.prototype?cn(h.prototype,"ownerDocument"):null;if(typeof f=="function"){const q=l.createElement("template");q.content&&q.content.ownerDocument&&(l=q.content.ownerDocument)}let oe,ae="",Te,te=!1,ve=0;const _e=function(){if(ve>0)throw Br('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.')},je=function(v){_e(),ve++;try{return oe.createHTML(v)}finally{ve--}},de=function(v){_e(),ve++;try{return oe.createScriptURL(v)}finally{ve--}},M=function(){return te||(Te=Ev(S,d),te=!0),Te},Y=l,Z=Y.implementation,$=Y.createNodeIterator,X=Y.createDocumentFragment,G=Y.getElementsByTagName,E=a.importNode;let I=kf();i.isSupported=typeof np=="function"&&typeof H=="function"&&Z&&Z.createHTMLDocument!==void 0;const pe=hv,ye=mv,Ne=gv,Ee=vv,Re=yv,Ie=xv,Be=kv,mt=Sv;let dn=vf,Fe=null;const fn=Le({},[...pf,...Pa,...Ma,...ba,...hf]);let be=null;const Un=Le({},[...mf,...za,...gf,...Mi]);let We=Object.seal(_s(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}})),Ut=null,hr=null;const At=Object.seal(_s(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let pn=!0,b=!0,he=!1,He=!0,Ve=!1,ot=!0,kt=!1,It=!1,nn=null,mr=null,_n=!1,Qt=!1,Gr=!1,gr=!1,Es=!0,_l=!1;const qr="user-content-";let vr=!0,Bn=!1,hn={},Dt=null;const mn=Le({},["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 Nn=null;const Cs=Le({},["audio","video","img","source","image","track"]);let Qr=null;const js=Le({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),yr="http://www.w3.org/1998/Math/MathML",xr="http://www.w3.org/2000/svg",Pt="http://www.w3.org/1999/xhtml";let En=Pt,Cn=!1,kr=null;const wr=Le({},[yr,xr,Pt],Da),Nl=yt(["mi","mo","mn","ms","mtext"]);let jn=Le({},Nl);const Sr=yt(["annotation-xml"]);let Hn=Le({},Sr);const Rs=Le({},["title","style","font","a","script"]);let Tr=null;const Qi=["application/xhtml+xml","text/html"],Ki="text/html";let $e=null,Rn=null;const El=l.createElement("form"),Cl=function(v){return v instanceof RegExp||v instanceof Function},Kr=function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Rn&&Rn===v)return;(!v||typeof v!="object")&&(v={}),v=Nt(v),Tr=Qi.indexOf(v.PARSER_MEDIA_TYPE)===-1?Ki:v.PARSER_MEDIA_TYPE,$e=Tr==="application/xhtml+xml"?Da:vl,Fe=ur(v,"ALLOWED_TAGS",fn,{transform:$e}),be=ur(v,"ALLOWED_ATTR",Un,{transform:$e}),kr=ur(v,"ALLOWED_NAMESPACES",wr,{transform:Da}),Qr=ur(v,"ADD_URI_SAFE_ATTR",js,{transform:$e,base:js}),Nn=ur(v,"ADD_DATA_URI_TAGS",Cs,{transform:$e,base:Cs}),Dt=ur(v,"FORBID_CONTENTS",mn,{transform:$e}),Ut=ur(v,"FORBID_TAGS",Nt({}),{transform:$e}),hr=ur(v,"FORBID_ATTR",Nt({}),{transform:$e}),hn=ht(v,"USE_PROFILES")?v.USE_PROFILES&&typeof v.USE_PROFILES=="object"?Nt(v.USE_PROFILES):v.USE_PROFILES:!1,pn=v.ALLOW_ARIA_ATTR!==!1,b=v.ALLOW_DATA_ATTR!==!1,he=v.ALLOW_UNKNOWN_PROTOCOLS||!1,He=v.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ve=v.SAFE_FOR_TEMPLATES||!1,ot=v.SAFE_FOR_XML!==!1,kt=v.WHOLE_DOCUMENT||!1,Qt=v.RETURN_DOM||!1,Gr=v.RETURN_DOM_FRAGMENT||!1,gr=v.RETURN_TRUSTED_TYPE||!1,_n=v.FORCE_BODY||!1,Es=v.SANITIZE_DOM!==!1,_l=v.SANITIZE_NAMED_PROPS||!1,vr=v.KEEP_CONTENT!==!1,Bn=v.IN_PLACE||!1,dn=dv(v.ALLOWED_URI_REGEXP)?v.ALLOWED_URI_REGEXP:vf,En=typeof v.NAMESPACE=="string"?v.NAMESPACE:Pt,jn=ht(v,"MATHML_TEXT_INTEGRATION_POINTS")&&v.MATHML_TEXT_INTEGRATION_POINTS&&typeof v.MATHML_TEXT_INTEGRATION_POINTS=="object"?Nt(v.MATHML_TEXT_INTEGRATION_POINTS):Le({},Nl),Hn=ht(v,"HTML_INTEGRATION_POINTS")&&v.HTML_INTEGRATION_POINTS&&typeof v.HTML_INTEGRATION_POINTS=="object"?Nt(v.HTML_INTEGRATION_POINTS):Le({},Sr);const C=ht(v,"CUSTOM_ELEMENT_HANDLING")&&v.CUSTOM_ELEMENT_HANDLING&&typeof v.CUSTOM_ELEMENT_HANDLING=="object"?Nt(v.CUSTOM_ELEMENT_HANDLING):_s(null);if(We=_s(null),ht(C,"tagNameCheck")&&Cl(C.tagNameCheck)&&(We.tagNameCheck=C.tagNameCheck),ht(C,"attributeNameCheck")&&Cl(C.attributeNameCheck)&&(We.attributeNameCheck=C.attributeNameCheck),ht(C,"allowCustomizedBuiltInElements")&&typeof C.allowCustomizedBuiltInElements=="boolean"&&(We.allowCustomizedBuiltInElements=C.allowCustomizedBuiltInElements),xt(We),Ve&&(b=!1),Gr&&(Qt=!0),hn&&(Fe=Le({},hf),be=_s(null),hn.html===!0&&(Le(Fe,pf),Le(be,mf)),hn.svg===!0&&(Le(Fe,Pa),Le(be,za),Le(be,Mi)),hn.svgFilters===!0&&(Le(Fe,Ma),Le(be,za),Le(be,Mi)),hn.mathMl===!0&&(Le(Fe,ba),Le(be,gf),Le(be,Mi))),At.tagCheck=null,At.attributeCheck=null,ht(v,"ADD_TAGS")&&(typeof v.ADD_TAGS=="function"?At.tagCheck=v.ADD_TAGS:dr(v.ADD_TAGS)&&(Fe===fn&&(Fe=Nt(Fe)),Le(Fe,v.ADD_TAGS,$e))),ht(v,"ADD_ATTR")&&(typeof v.ADD_ATTR=="function"?At.attributeCheck=v.ADD_ATTR:dr(v.ADD_ATTR)&&(be===Un&&(be=Nt(be)),Le(be,v.ADD_ATTR,$e))),ht(v,"ADD_URI_SAFE_ATTR")&&dr(v.ADD_URI_SAFE_ATTR)&&Le(Qr,v.ADD_URI_SAFE_ATTR,$e),ht(v,"FORBID_CONTENTS")&&dr(v.FORBID_CONTENTS)&&(Dt===mn&&(Dt=Nt(Dt)),Le(Dt,v.FORBID_CONTENTS,$e)),ht(v,"ADD_FORBID_CONTENTS")&&dr(v.ADD_FORBID_CONTENTS)&&(Dt===mn&&(Dt=Nt(Dt)),Le(Dt,v.ADD_FORBID_CONTENTS,$e)),vr&&(Fe["#text"]=!0),kt&&Le(Fe,["html","head","body"]),Fe.table&&(Le(Fe,["tbody"]),delete Ut.tbody),v.TRUSTED_TYPES_POLICY){if(typeof v.TRUSTED_TYPES_POLICY.createHTML!="function")throw Br('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof v.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Br('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const F=oe;oe=v.TRUSTED_TYPES_POLICY;try{ae=je("")}catch(le){throw oe=F,le}}else v.TRUSTED_TYPES_POLICY===null?(oe=void 0,ae=""):(oe===void 0&&(oe=M()),oe&&typeof ae=="string"&&(ae=je("")));yt&&yt(v),Rn=v},Ls=Le({},[...Pa,...Ma,...fv]),As=Le({},[...ba,...pv]),jl=function(v,C,F){return C.namespaceURI===Pt?v==="svg":C.namespaceURI===yr?v==="svg"&&(F==="annotation-xml"||jn[F]):!!Ls[v]},Yi=function(v,C,F){return C.namespaceURI===Pt?v==="math":C.namespaceURI===xr?v==="math"&&Hn[F]:!!As[v]},Xi=function(v,C,F){return C.namespaceURI===xr&&!Hn[F]||C.namespaceURI===yr&&!jn[F]?!1:!As[v]&&(Rs[v]||!Ls[v])},Xe=function(v){let C=H(v);(!C||!C.tagName)&&(C={namespaceURI:En,tagName:"template"});const F=vl(v.tagName),le=vl(C.tagName);return kr[v.namespaceURI]?v.namespaceURI===xr?jl(F,C,le):v.namespaceURI===yr?Yi(F,C,le):v.namespaceURI===Pt?Xi(F,C,le):!!(Tr==="application/xhtml+xml"&&kr[v.namespaceURI]):!1},gn=function(v){Ts(i.removed,{element:v});try{H(v).removeChild(v)}catch{if(D(v),!H(v))throw Br("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Wn=function(v){_r(v);const C=z(v);if(C){const le=[];Ss(C,fe=>{Ts(le,fe)}),Ss(le,fe=>{try{D(fe)}catch{}})}const F=J(v);if(F)for(let le=F.length-1;le>=0;--le){const fe=F[le],Se=fe&&fe.name;if(typeof Se=="string")try{v.removeAttribute(Se)}catch{}}},vn=function(v,C){try{Ts(i.removed,{attribute:C.getAttributeNode(v),from:C})}catch{Ts(i.removed,{attribute:null,from:C})}if(C.removeAttribute(v),v==="is")if(Qt||Gr)try{gn(C)}catch{}else try{C.setAttribute(v,"")}catch{}},Yr=function(v){const C=J(v);if(C)for(let F=C.length-1;F>=0;--F){const le=C[F],fe=le&&le.name;if(!(typeof fe!="string"||be[$e(fe)]))try{v.removeAttribute(fe)}catch{}}},_r=function(v){const C=[v];for(;C.length>0;){const F=C.pop();(O?O(F):F.nodeType)===qt.element&&Yr(F);const fe=z(F);if(fe)for(let Se=fe.length-1;Se>=0;--Se)C.push(fe[Se])}},Rl=function(v){if(!ot)return;const C=[v];for(;C.length>0;){const F=C.pop(),le=O?O(F):F.nodeType;if(le===qt.processingInstruction||le===qt.comment&&pt(xf,F.data)){try{D(F)}catch{}continue}if(le===qt.element){const Se=F,Pe=$e(ne?ne(F):F.nodeName);try{Se.hasAttribute&&Se.hasAttribute("patchsrc")&&Se.removeAttribute("patchsrc"),Se.hasAttribute&&Se.hasAttribute("for")&&Pe!=="label"&&Pe!=="output"&&Se.removeAttribute("for")}catch{}}const fe=z(F);if(fe)for(let Se=fe.length-1;Se>=0;--Se)C.push(fe[Se])}},Nr=function(v){let C=null,F=null;if(_n)v="<remove></remove>"+v;else{const Se=uf(v,/^[\r\n\t ]+/);F=Se&&Se[0]}Tr==="application/xhtml+xml"&&En===Pt&&(v='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+v+"</body></html>");const le=oe?je(v):v;if(En===Pt)try{C=new w().parseFromString(le,Tr)}catch{}if(!C||!C.documentElement){C=Z.createDocument(En,"template",null);try{C.documentElement.innerHTML=Cn?ae:le}catch{}}const fe=C.body||C.documentElement;return v&&F&&fe.insertBefore(l.createTextNode(F),fe.childNodes[0]||null),En===Pt?G.call(C,kt?"html":"body")[0]:kt?C.documentElement:fe},Bt=function(v){const C=ce?ce(v):v.ownerDocument;return $.call(C||v,v,y.SHOW_ELEMENT|y.SHOW_COMMENT|y.SHOW_TEXT|y.SHOW_PROCESSING_INSTRUCTION|y.SHOW_CDATA_SECTION,null)},Xr=function(v){return v=pl(v,pe," "),v=pl(v,ye," "),v=pl(v,Ne," "),v},Et=function(v){var C;v.normalize();const F=ce?ce(v):v.ownerDocument,le=$.call(F||v,v,y.SHOW_TEXT|y.SHOW_COMMENT|y.SHOW_CDATA_SECTION|y.SHOW_PROCESSING_INSTRUCTION,null);let fe=le.nextNode();for(;fe;)fe.data=Xr(fe.data),fe=le.nextNode();const Se=(C=v.querySelectorAll)===null||C===void 0?void 0:C.call(v,"template");Se&&Ss(Se,Pe=>{Vn(Pe.content)&&Et(Pe.content)})},Zr=function(v){const C=ne?ne(v):null;return typeof C!="string"||$e(C)!=="form"?!1:typeof v.nodeName!="string"||typeof v.textContent!="string"||typeof v.removeChild!="function"||v.attributes!==J(v)||typeof v.removeAttribute!="function"||typeof v.setAttribute!="function"||typeof v.namespaceURI!="string"||typeof v.insertBefore!="function"||typeof v.hasChildNodes!="function"||v.nodeType!==O(v)||v.childNodes!==z(v)},Vn=function(v){if(!O||typeof v!="object"||v===null)return!1;try{return O(v)===qt.documentFragment}catch{return!1}},Er=function(v){if(!O||typeof v!="object"||v===null)return!1;try{return typeof O(v)=="number"}catch{return!1}};function Ct(q,v,C){q.length!==0&&Ss(q,F=>{F.call(i,v,C,Rn)})}const Jr=function(v,C){return!!(ot&&v.hasChildNodes()&&!Er(v.firstElementChild)&&pt(yf,v.textContent)&&pt(yf,v.innerHTML)||ot&&v.namespaceURI===Pt&&C==="style"&&Er(v.firstElementChild)||v.nodeType===qt.processingInstruction||ot&&v.nodeType===qt.comment&&pt(xf,v.data))},Cr=function(v,C,F){if(!Ut[C]&&Ds(C)&&(We.tagNameCheck instanceof RegExp&&pt(We.tagNameCheck,C)||We.tagNameCheck instanceof Function&&We.tagNameCheck(C)))return!1;if(vr&&!Dt[C]){const le=H(v),fe=z(v);if(fe&&le){const Se=fe.length;for(let Pe=Se-1;Pe>=0;--Pe){const ze=v===F?A(fe[Pe],!0):fe[Pe];le.insertBefore(ze,N(v))}}}return gn(v),!0},jr=function(v,C,F,le){return v.length===0?C:C===F||C===le?Nt(C):C},Ll=function(v,C){if(Ct(I.beforeSanitizeElements,v,null),v!==C&&H(v)===null)return Bn&&_r(v),!0;if(Zr(v))return gn(v),!0;const F=$e(ne?ne(v):v.nodeName);if(Fe=jr(I.uponSanitizeElement,Fe,fn,nn),Ct(I.uponSanitizeElement,v,{tagName:F,allowedTags:Fe}),v!==C&&H(v)===null)return Bn&&_r(v),!0;if(Jr(v,F))return gn(v),!0;if(Ut[F]||!(At.tagCheck instanceof Function&&At.tagCheck(F))&&!Fe[F]){const fe=Cr(v,F,C);return fe===!1&&Ct(I.afterSanitizeElements,v,null),fe}if((O?O(v):v.nodeType)===qt.element&&!Xe(v)||(F==="noscript"||F==="noembed"||F==="noframes")&&pt(Tv,v.innerHTML))return gn(v),!0;if(Ve&&v.nodeType===qt.text){const fe=Xr(v.textContent);v.textContent!==fe&&(Ts(i.removed,{element:v.cloneNode()}),v.textContent=fe)}return Ct(I.afterSanitizeElements,v,null),!1},Al=function(v,C,F){if(hr[C]||ot&&C==="patchsrc"||ot&&C==="for"&&v!=="label"&&v!=="output"||Es&&(C==="id"||C==="name")&&(F in l||F in El))return!1;const le=be[C]||At.attributeCheck instanceof Function&&At.attributeCheck(C,v);if(!(b&&pt(Ee,C))){if(!(pn&&pt(Re,C))){if(le){if(!Qr[C]){if(!pt(dn,pl(F,Be,""))){if(!((C==="src"||C==="xlink:href"||C==="href")&&v!=="script"&&cf(F,"data:")===0&&Nn[v])){if(!(he&&!pt(Ie,pl(F,Be,"")))){if(F)return!1}}}}}else if(!(Ds(v)&&(We.tagNameCheck instanceof RegExp&&pt(We.tagNameCheck,v)||We.tagNameCheck instanceof Function&&We.tagNameCheck(v))&&(We.attributeNameCheck instanceof RegExp&&pt(We.attributeNameCheck,C)||We.attributeNameCheck instanceof Function&&We.attributeNameCheck(C,v))||C==="is"&&We.allowCustomizedBuiltInElements&&(We.tagNameCheck instanceof RegExp&&pt(We.tagNameCheck,F)||We.tagNameCheck instanceof Function&&We.tagNameCheck(F))))return!1}}return!0},Is=Le({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ds=function(v){return!Is[vl(v)]&&pt(mt,v)},Ps=function(v,C,F,le){if(oe&&typeof S=="object"&&typeof S.getAttributeType=="function"&&!F)switch(S.getAttributeType(v,C)){case"TrustedHTML":return je(le);case"TrustedScriptURL":return de(le)}return le},Rr=function(v,C,F,le){try{F?v.setAttributeNS(F,C,le):v.setAttribute(C,le),Zr(v)?gn(v):af(i.removed)}catch{vn(C,v)}},Il=function(v){Ct(I.beforeSanitizeAttributes,v,null);const C=v.attributes;if(!C||Zr(v))return;be=jr(I.uponSanitizeAttribute,be,Un,mr);const F={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:be,forceKeepAttr:void 0};let le=C.length;const fe=$e(v.nodeName);for(;le--;){const Se=C[le],Pe=Se.name,ze=Se.namespaceURI,Ze=Se.value,Je=$e(Pe),Ln=Ze;let rt=Pe==="value"?Ln:lv(Ln);if(F.attrName=Je,F.attrValue=rt,F.keepAttr=!0,F.forceKeepAttr=void 0,Ct(I.uponSanitizeAttribute,v,F),rt=F.attrValue,_l&&(Je==="id"||Je==="name")&&cf(rt,qr)!==0&&(vn(Pe,v),rt=qr+rt),ot&&pt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,rt)){vn(Pe,v);continue}if(Je==="attributename"&&uf(rt,"href")){vn(Pe,v);continue}if(!F.forceKeepAttr){if(!F.keepAttr){vn(Pe,v);continue}if(!He&&pt(_v,rt)){vn(Pe,v);continue}if(Ve&&(rt=Xr(rt)),!Al(fe,Je,rt)){vn(Pe,v);continue}rt=Ps(fe,Je,ze,rt),rt!==Ln&&Rr(v,Pe,ze,rt)}}Ct(I.afterSanitizeAttributes,v,null)},Gn=function(v){let C=null;const F=Bt(v);for(Ct(I.beforeSanitizeShadowDOM,v,null);C=F.nextNode();)if(Ct(I.uponSanitizeShadowNode,C,null),Ll(C,v),Il(C),Vn(C.content)&&Gn(C.content),(O?O(C):C.nodeType)===qt.element){const fe=V(C);Vn(fe)&&(De(fe),Gn(fe))}Ct(I.afterSanitizeShadowDOM,v,null)},De=function(v){const C=[{node:v,shadow:null}];for(;C.length>0;){const F=C.pop();if(F.shadow){Gn(F.shadow);continue}const le=F.node,Se=(O?O(le):le.nodeType)===qt.element,Pe=z(le);if(Pe)for(let ze=Pe.length-1;ze>=0;--ze)C.push({node:Pe[ze],shadow:null});if(Se){const ze=ne?ne(le):null;if(typeof ze=="string"&&$e(ze)==="template"){const Ze=le.content;Vn(Ze)&&C.push({node:Ze,shadow:null})}}if(Se){const ze=V(le);Vn(ze)&&C.push({node:null,shadow:ze},{node:ze,shadow:null})}}};return i.sanitize=function(q){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=null,F=null,le=null,fe=null;if(Cn=!q,Cn&&(q="<!-->"),typeof q!="string"&&!Er(q)&&(q=cv(q),typeof q!="string"))throw Br("dirty is not a string, aborting");if(!i.isSupported)return q;It?(Fe=nn,be=mr):Kr(v),(I.uponSanitizeElement.length>0||I.uponSanitizeAttribute.length>0)&&(Fe=Nt(Fe)),I.uponSanitizeAttribute.length>0&&(be=Nt(be)),i.removed=[];const Se=Bn&&typeof q!="string"&&Er(q);if(Se){Rl(q);const Ze=ne?ne(q):q.nodeName;if(typeof Ze=="string"){const Je=$e(Ze);if(!Fe[Je]||Ut[Je])throw Wn(q),Br("root node is forbidden and cannot be sanitized in-place")}if(Zr(q))throw Wn(q),Br("root node is clobbered and cannot be sanitized in-place");try{De(q)}catch(Je){throw Wn(q),Je}}else if(Er(q))C=Nr("<!---->"),F=C.ownerDocument.importNode(q,!0),F.nodeType===qt.element&&F.nodeName==="BODY"||F.nodeName==="HTML"?C=F:C.appendChild(F),De(F);else{if(!Qt&&!Ve&&!kt&&q.indexOf("<")===-1)return oe&&gr?je(q):q;if(C=Nr(q),!C)return Qt?null:gr?ae:""}C&&_n&&gn(C.firstChild);const Pe=Se?q:C;try{const Ze=Bt(Pe);for(;le=Ze.nextNode();)Ll(le,Pe),Il(le),Vn(le.content)&&Gn(le.content)}catch(Ze){throw Se&&(Wn(q),Ss(i.removed,Je=>{Je.element&&_r(Je.element)})),Ze}if(Se)return Ss(i.removed,Ze=>{Ze.element&&_r(Ze.element)}),Ve&&Et(q),q;if(Qt){if(Ve&&Et(C),Gr)for(fe=X.call(C.ownerDocument);C.firstChild;)fe.appendChild(C.firstChild);else fe=C;return(be.shadowroot||be.shadowrootmode)&&(fe=E.call(a,fe,!0)),fe}let ze=kt?C.outerHTML:C.innerHTML;return kt&&Fe["!doctype"]&&C.ownerDocument&&C.ownerDocument.doctype&&C.ownerDocument.doctype.name&&pt(wv,C.ownerDocument.doctype.name)&&(ze="<!DOCTYPE "+C.ownerDocument.doctype.name+`>
353
+ `+ze),Ve&&(ze=Xr(ze)),oe&&gr?je(ze):ze},i.setConfig=function(){let q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Kr(q),It=!0,nn=Fe,mr=be},i.clearConfig=function(){Rn=null,It=!1,nn=null,mr=null,oe=Te,ae=""},i.isValidAttribute=function(q,v,C){Rn||Kr({});const F=$e(q),le=$e(v);return Al(F,le,C)},i.addHook=function(q,v){typeof v=="function"&&ht(I,q)&&Ts(I[q],v)},i.removeHook=function(q,v){if(ht(I,q)){if(v!==void 0){const C=rv(I[q],v);return C===-1?void 0:sv(I[q],C,1)[0]}return af(I[q])}},i.removeHooks=function(q){ht(I,q)&&(I[q]=[])},i.removeAllHooks=function(){I=kf()},i}var xu=sp();const Cv=new Set(["command_execution","file_change","mcp_tool_call","web_search"]);function wf(s){return Cv.has(s.type)}function jv({items:s,runtimeType:i,turn:l,threads:a=[]}){const[d,f]=P.useState(!1);if(s.length===0)return null;const h=s.length;return u.jsxs("div",{className:"tool-calls",children:[u.jsxs("div",{className:"tool-calls-header",onClick:()=>f(m=>!m),children:[u.jsx("span",{className:"tool-calls-icon",children:u.jsx(ug,{size:12})}),u.jsxs("span",{className:"tool-calls-summary",children:[h," tool call",h>1?"s":""]}),u.jsx(ou,{size:14,className:"tool-calls-chevron",style:{transform:d?"rotate(90deg)":"none"}})]}),d&&u.jsx("div",{className:"tool-calls-body",children:s.map(m=>u.jsx(cr,{item:m,runtimeType:i,turn:l,threads:a},m.id))})]})}Ae.setOptions({breaks:!0,gfm:!0});function Rv(s){const i=Ae.parse(s);return xu.sanitize(i)}function Sf(s,i){var d;const l=document.createTreeWalker(s,NodeFilter.SHOW_TEXT);let a=0;for(;l.nextNode();){const f=l.currentNode,h=((d=f.textContent)==null?void 0:d.length)??0;if(a+h>i)return{node:f,offset:i-a};a+=h}return null}function Lv(s,i){s.querySelectorAll("mark[data-thread-id]").forEach(l=>{const a=l.parentNode;if(!a)return;const d=document.createTextNode(l.textContent||"");a.replaceChild(d,l),a.normalize()});for(const l of i){const a=Sf(s,l.start_offset),d=Sf(s,l.end_offset);if(!a||!d)continue;const f=document.createRange();f.setStart(a.node,a.offset),f.setEnd(d.node,d.offset);const h=document.createElement("mark");h.setAttribute("data-thread-id",l.id),l.status==="resolved"&&h.classList.add("thread-mark-resolved");try{f.surroundContents(h)}catch{const m=f.extractContents();h.appendChild(m),f.insertNode(h)}}}function Av(s){const i=window.getSelection();if(!i||i.rangeCount===0)return null;const l=i.getRangeAt(0);if(l.collapsed||!s.contains(l.commonAncestorContainer))return null;const a=document.createRange();a.setStart(s,0),a.setEnd(l.startContainer,l.startOffset);const d=a.toString().length,f=l.toString();return{start:d,end:d+f.length,text:f}}function Iv({itemId:s,turnId:i,sessionId:l,content:a,threads:d}){const f=P.useRef(null),h=P.useRef(null),m=P.useRef(null),y=P.useRef(""),g=P.useRef(0),[w,S]=P.useState(!1),[k,A]=P.useState({x:0,y:0}),[D,N]=P.useState(!1),[z,H]=P.useState({x:0,y:0}),[V,J]=P.useState(""),[O,ne]=P.useState(null),{createThread:ce,switchRightTab:oe}=K(),ae=P.useCallback(()=>{var Y;if(!O)return;const M=`
354
+ \`\`\`QUOTE
355
+ ${O.text}
356
+ \`\`\`
357
+
358
+ `;K.setState({quotedText:M}),S(!1),ne(null),(Y=window.getSelection())==null||Y.removeAllRanges()},[O]),Te=d.filter(M=>M.item_id===s);P.useEffect(()=>{f.current&&Lv(f.current,Te)}),P.useEffect(()=>{y.current=V},[V]),P.useEffect(()=>{function M(Y){h.current&&!h.current.contains(Y.target)&&(S(!1),y.current.trim()||N(!1))}return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[]);const te=P.useCallback(()=>{S(!1),y.current.trim()||N(!1)},[]),ve=P.useCallback(()=>{const M=f.current;if(!M)return;const Y=Av(M);if(Y&&Y.text.trim().length>0){const Z=window.getSelection();if(Z&&Z.rangeCount>0&&Z.anchorNode&&Z.focusNode){const X=Z.getRangeAt(0).getBoundingClientRect(),G=28,E=6,I=170;let pe=!1;try{const Ee=document.createRange();Ee.setStart(Z.focusNode,Z.focusOffset),Ee.setEnd(Z.focusNode,Z.focusOffset);const Re=document.createRange();Re.setStart(Z.anchorNode,Z.anchorOffset),Re.setEnd(Z.anchorNode,Z.anchorOffset),pe=Re.compareBoundaryPoints(Range.START_TO_START,Ee)>0}catch{pe=!1}let ye=X.top-G-E;ye<8&&(ye=X.bottom+E);let Ne=pe?X.left-I:X.right;Ne=Math.max(8,Math.min(Ne,window.innerWidth-I-8)),A({x:Ne,y:ye}),S(!0),ne(Y)}}else S(!1)},[]);P.useEffect(()=>{function M(Y){const Z=Y.target;Z&&(Z.closest(".selection-actions")||Z.closest(".thread-create-popover"))||ve()}return document.addEventListener("mouseup",M),()=>document.removeEventListener("mouseup",M)},[ve]);const _e=P.useCallback(()=>{S(!1),N(!0),H({x:k.x,y:k.y})},[k]);P.useLayoutEffect(()=>{if(!D)return;const M=m.current;if(!M)return;const Y=M.offsetWidth,Z=M.offsetHeight,$=8;let X=k.x,G=k.y;X-Y<$&&(X=Y+$),X>window.innerWidth-$&&(X=window.innerWidth-$),G<$&&(G=$),G+Z>window.innerHeight-$&&(G=window.innerHeight-Z-$),H({x:X,y:G})},[D,k]);const je=P.useCallback(async()=>{var M;!O||!V.trim()||(await ce(l,{itemId:s,turnId:i,startOffset:O.start,endOffset:O.end,selectedText:O.text,message:V.trim()}),J(""),N(!1),ne(null),(M=window.getSelection())==null||M.removeAllRanges(),oe("threads"))},[O,V,ce,l,s,i,oe]),de=P.useCallback(M=>{const Y=M.target;if(Y.tagName==="MARK"&&Y.hasAttribute("data-thread-id")){M.preventDefault(),oe("threads");const Z=Y.getAttribute("data-thread-id");setTimeout(()=>{const $=document.getElementById(`thread-${Z}`);$&&($.scrollIntoView({behavior:"smooth",block:"center"}),$.classList.add("thread-card-highlighted"),setTimeout(()=>$.classList.remove("thread-card-highlighted"),1500))},100)}},[oe]);return u.jsxs("div",{style:{position:"relative"},ref:h,children:[u.jsx("div",{ref:f,dangerouslySetInnerHTML:{__html:Rv(a||"…")},onMouseDown:te,onClick:de}),w&&!D&&u.jsxs("div",{className:"selection-actions",style:{left:k.x,top:k.y},children:[u.jsxs("button",{className:"discuss-button",onClick:_e,title:"Start a discussion about this text",children:[u.jsx(Xm,{size:14}),u.jsx("span",{children:"Discuss"})]}),u.jsxs("button",{className:"discuss-button",onClick:ae,title:"Quote this text in your message",children:[u.jsx(Bf,{size:14}),u.jsx("span",{children:"Quote"})]})]}),D&&u.jsxs("div",{ref:m,className:"thread-create-popover",style:{left:z.x,top:z.y},children:[u.jsxs("div",{className:"thread-create-header",children:[u.jsxs("span",{className:"thread-create-quote",children:['"',O==null?void 0:O.text.slice(0,80),O&&O.text.length>80?"…":"",'"']}),u.jsx("button",{className:"thread-create-close",onClick:()=>{N(!1),ne(null)},children:u.jsx(pr,{size:14})})]}),u.jsx("textarea",{className:"thread-create-input",placeholder:"Ask about this text…",value:V,onChange:M=>J(M.target.value),autoFocus:!0,rows:2,onKeyDown:M=>{if(M.key==="Enter"&&(M.metaKey||M.ctrlKey)&&(M.preventDefault(),je()),M.key==="Escape")if(y.current.trim()){const Y=Date.now();g.current&&Y-g.current<400?(g.current=0,N(!1),ne(null)):g.current=Y}else N(!1),ne(null)}}),u.jsxs("div",{className:"thread-create-footer",children:[u.jsx("span",{className:"thread-create-hint",children:"⌘↵ to send · Esc to cancel"}),u.jsxs("button",{className:"thread-create-send",onClick:je,disabled:!V.trim(),children:[u.jsx(Wi,{size:13}),u.jsx("span",{children:"Send"})]})]})]})]})}const Bi=new Map,lp=new Set,Xa=new Set,Tf=new Map;function ip(){Xa.forEach(s=>s())}function op(s,i){return`${s}:${i}`}function Dv(s,i,l,a,d){var y;const f=op(i,l),h=Bi.get(s)??new Map,m=new Map(h);((y=m.get(f))==null?void 0:y.answer)===d?m.delete(f):m.set(f,{itemIndex:i,groupIndex:l,question:a,answer:d}),Bi.set(s,m),ip()}function Pv(s){Bi.delete(s),ip()}function Mv(s){lp.add(s),Pv(s)}function bv(s){const i=P.useCallback(l=>(Xa.add(l),()=>{Xa.delete(l)}),[]);return P.useSyncExternalStore(i,()=>Bi.get(s)??Tf,()=>Tf)}function zv(s){return[...s].sort((i,l)=>i.itemIndex-l.itemIndex||i.groupIndex-l.groupIndex).map(i=>`> ${i.question}
359
+ ${i.answer}`).join(`
360
+
361
+ `)}function Ov({item:s,turn:i}){var A;const l=s.data??{},a=P.useMemo(()=>Array.isArray(l.groups)?l.groups.filter(D=>!!D&&Array.isArray(D.selections)&&D.selections.length>0):[],[l.groups]),d=bv(i.id),f=K(D=>i.session_id?D.sessionDetails[i.session_id]:null),h=K(D=>D.activeSessionId),m=i.items.findIndex(D=>D.id===s.id),y=f?((A=f.turns[f.turns.length-1])==null?void 0:A.id)===i.id:!0,g=lp.has(i.id),w=g||(f==null?void 0:f.is_running)===1||!y||i.session_id!==h,S=(D,N,z)=>{w||Dv(i.id,m,D,N,z)},k=()=>{const D=[...d.values()];if(D.length===0)return;const N=zv(D);Mv(i.id),K.getState().submitPrompt(N)};return u.jsxs("div",{className:"render-content ask-user-card",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:u.jsx($m,{size:14})}),u.jsx("span",{className:"turn-header-title",children:"Question"}),g&&u.jsx("span",{className:"turn-header-meta",children:"answered"})]}),a.length>0?u.jsxs("div",{className:"ask-user-groups",children:[a.map((D,N)=>u.jsxs("div",{className:"ask-user-group",children:[D.question&&u.jsx("div",{className:"ask-user-question",children:D.question}),u.jsx("div",{className:"ask-user-options",children:D.selections.map(z=>{var V;const H=((V=d.get(op(m,N)))==null?void 0:V.answer)===z;return u.jsx("button",{type:"button",className:`ask-user-option ${H?"selected":""}`,disabled:w,onClick:()=>S(N,D.question,z),children:z},z)})})]},N)),w?g&&u.jsx("div",{className:"ask-user-submitted",children:"Answer sent"}):u.jsxs("button",{type:"button",className:"ask-user-send",disabled:d.size===0,onClick:k,children:[u.jsx(Wi,{size:12}),"Send"]})]}):l.question?u.jsx("p",{className:"user-message",children:l.question}):u.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic"},children:"Waiting for user response"})]})}Ae.setOptions({breaks:!0,gfm:!0});function $v({attachments:s}){const[i,l]=P.useState(null);return P.useEffect(()=>{if(!i)return;function a(d){d.key==="Escape"&&l(null)}return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[i]),!Array.isArray(s)||s.length===0?null:u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"attachment-pills",children:s.map((a,d)=>{const f=a.media_type.startsWith("image/"),h=`data:${a.media_type};base64,${a.data}`;return u.jsxs("span",{className:"attachment-pill",title:a.name,onClick:f?()=>l(h):void 0,style:f?{cursor:"pointer"}:void 0,children:[f?u.jsx("img",{src:h,alt:a.name,className:"attachment-pill-thumb"}):u.jsx(Uf,{size:12,className:"attachment-pill-icon"}),u.jsx("span",{className:"attachment-pill-name",children:a.name})]},d)})}),i&&u.jsx("div",{className:"image-preview-modal",onClick:()=>l(null),children:u.jsxs("div",{className:"image-preview-content",onClick:a=>a.stopPropagation(),children:[u.jsx("img",{src:i,alt:"preview"}),u.jsx("button",{className:"image-preview-close",onClick:()=>l(null),children:u.jsx(pr,{size:20})})]})})]})}function Fv(s){const i=Ae.parse(s);return xu.sanitize(i)}function _f(s){var i;return(i=s.data)!=null&&i.text?s.data.text:""}function Uv(s){const i=s.match(/^\/bin\/\w+\s+-\w+\s+"(.*)"$/s);return i?i[1]:s}const Nf=1e4;function Bv({item:s,runtimeType:i,turn:l,threads:a}){var m,y,g,w,S,k,A,D;const d=s.status==="in_progress",[f,h]=P.useState(!1);switch(s.type){case"agent_message":{const{iconClass:N,iconText:z}=bf(i??"codex");return u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:`turn-header-icon ${N}`,children:z}),u.jsx("span",{className:"turn-header-title",children:"Agent"}),d&&u.jsx("span",{className:"turn-header-meta",children:"writing…"})]}),u.jsx(Iv,{itemId:s.id,turnId:l.id,sessionId:l.session_id,content:_f(s)||"…",threads:a,runtimeType:i})]})}case"reasoning":return u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:u.jsx(zm,{size:14})}),u.jsx("span",{className:"turn-header-title",children:"Reasoning"})]}),u.jsx("div",{dangerouslySetInnerHTML:{__html:Fv(_f(s))}})]});case"command_execution":{const N=s.data||{},z=Uv(N.command||""),H=N.aggregated_output||"",V=N.exit_code,J=d?"running…":V!==null?`exit ${V}`:"",O=H.length>Nf,ne=O&&!f?H.slice(0,Nf)+`
362
+ … (truncated, click to expand)`:H;return u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:u.jsx(Wf,{size:14})}),u.jsx("span",{className:"turn-header-title",children:"Command"}),J&&u.jsx("span",{className:"turn-header-meta",children:J})]}),u.jsx("pre",{className:"cmd-block",children:u.jsx("code",{children:z})}),H&&u.jsxs(u.Fragment,{children:[u.jsx("pre",{className:"cmd-output",children:u.jsx("code",{children:ne})}),O&&u.jsx("button",{className:"cmd-output-toggle",onClick:()=>h(ce=>!ce),children:f?"Show less":`Show full output (${(H.length/1024).toFixed(0)}KB)`})]})]})}case"file_change":{const N=(m=s.data)==null?void 0:m.changes,z=Array.isArray(N)?N:[],H=`${z.length} file${z.length!==1?"s":""}`;return u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:u.jsx(Bm,{size:14})}),u.jsx("span",{className:"turn-header-title",children:"File Changes"}),u.jsx("span",{className:"turn-header-meta",children:H})]}),u.jsx("div",{className:"file-change-list",children:z.map((V,J)=>{const O=V.kind==="add"?"A":V.kind==="delete"?"D":"M",ne=V.kind==="add"?"fc-add":V.kind==="delete"?"fc-del":"fc-mod";return u.jsxs("div",{className:"file-change",children:[u.jsx("span",{className:`fc-status ${ne}`,children:O}),u.jsx("span",{className:"fc-name",children:V.path})]},J)})})]})}case"mcp_tool_call":{const N=s.data||{},z=N.tool||"mcp";if(z==="Agent"){const ae=N.arguments,Te=(ae==null?void 0:ae.description)||(ae==null?void 0:ae.prompt)||"Subagent",te=s.status==="failed",ve=d?"running…":te?"failed":"done";return u.jsxs("div",{className:"agent-call-card",children:[u.jsx("span",{className:"agent-call-icon",children:u.jsx(Wa,{size:14})}),u.jsx("span",{className:"agent-call-desc",children:Te}),u.jsx("span",{className:`agent-call-status ${d?"running":te?"failed":"done"}`,children:ve})]})}const H=N.server||"",V=N.arguments,J=N.result,O=N.error,ne=s.status==="failed"||!!O,ce=d?"running…":ne?"failed":"done",oe=((y=J==null?void 0:J.content)==null?void 0:y.filter(ae=>ae.type==="text").map(ae=>ae.text))??[];return u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:u.jsx(rg,{size:14})}),u.jsxs("span",{className:"turn-header-title",children:["MCP: ",z]}),H&&u.jsx("span",{className:"turn-header-meta",children:H}),u.jsx("span",{className:"turn-header-meta",style:ne?{color:"var(--red)"}:void 0,children:ce})]}),V&&Object.keys(V).length>0&&u.jsx("div",{className:"mcp-args",children:Object.entries(V).map(([ae,Te])=>u.jsxs("div",{className:"mcp-arg",children:[u.jsx("span",{className:"mcp-arg-key",children:ae}),ae==="code"?u.jsx("pre",{className:"cmd-block",children:u.jsx("code",{children:String(Te)})}):u.jsx("span",{className:"mcp-arg-value",children:typeof Te=="string"?Te:JSON.stringify(Te,null,2)})]},ae))}),oe.length>0&&oe.map((ae,Te)=>u.jsx("pre",{className:"cmd-output",children:u.jsx("code",{children:ae})},Te)),O&&u.jsx("pre",{className:"cmd-output",style:{color:"var(--red)"},children:u.jsx("code",{children:O})})]})}case"web_search":{const N=((g=s.data)==null?void 0:g.query)||"";return u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:u.jsx(lg,{size:14})}),u.jsx("span",{className:"turn-header-title",children:"Web Search"})]}),u.jsx("p",{className:"user-message",children:N})]})}case"todo_list":{const N=((w=s.data)==null?void 0:w.items)||[];return u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:u.jsx(Qm,{size:14})}),u.jsx("span",{className:"turn-header-title",children:"Todo List"})]}),u.jsx("ul",{className:"todo-list",children:N.map((z,H)=>u.jsxs("li",{className:z.completed?"todo-done":"todo-pending",children:[z.completed?u.jsx(yl,{size:14}):u.jsx(Vi,{size:14})," ",z.text]},H))})]})}case"ask_user":return u.jsx(Ov,{item:s,turn:l});case"background_task":{const N=s.data||{},z=N.task_type||"unknown",H=N.subagent_type||null,V=N.description||"",J=N.status||"running",O=N.last_tool_name||null,ne=N.token_count||null,ce=z==="local_agent",oe=z==="local_bash",ae=ce?Wa:oe?Hf:Ff,Te=ce?`Subagent${H?`: ${H}`:""}`:oe?"Monitor":"Background Task",te=J==="running"?"running…":J==="completed"?"done":J==="failed"?"failed":J==="stopped"?"stopped":J,ve=s.status==="failed"||J==="failed";return u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:u.jsx(ae,{size:14})}),u.jsx("span",{className:"turn-header-title",children:Te}),u.jsx("span",{className:"turn-header-meta",style:ve?{color:"var(--red)"}:void 0,children:te})]}),V&&u.jsx("p",{className:"user-message",style:{fontSize:"13px"},children:V}),O&&d&&u.jsxs("div",{className:"cmd-output",style:{color:"var(--text-3)",fontSize:"12px"},children:["last tool: ",O,ne!=null&&` · ${ne.toLocaleString()} tokens`]}),u.jsx("div",{className:"cmd-output",style:{color:"var(--text-muted)",fontSize:"11px"},children:"Output available in Tasks panel — click the status bar indicator or the Tasks tab."})]})}case"context_compaction":{const N=((S=s.data)==null?void 0:S.trigger)??"auto",z=((k=s.data)==null?void 0:k.pre_tokens)??0,H=((A=s.data)==null?void 0:A.post_tokens)??0,V=z>0?Math.round((1-H/z)*100):0,J=N==="manual"?"Context compacted (/compact)":"Context auto-compacted";return u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:u.jsx(Jm,{size:14})}),u.jsx("span",{className:"turn-header-title",children:J})]}),u.jsxs("div",{className:"cmd-output",style:{color:"var(--text-3)"},children:[z.toLocaleString()," → ",H.toLocaleString()," tokens (",V,"% reduction)"]})]})}case"error":{const N=((D=s.data)==null?void 0:D.message)||"Unknown error";return u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--red)",color:"#fff"},children:u.jsx(au,{size:14})}),u.jsx("span",{className:"turn-header-title",children:"Error"})]}),u.jsx("pre",{className:"cmd-output",style:{color:"var(--red)"},children:u.jsx("code",{children:N})})]})}default:return null}}const cr=P.memo(Bv);function Hv({turn:s,runtimeType:i,threads:l=[]}){const[a,d]=P.useState(!1);P.useEffect(()=>{const N=s.items.some(z=>z.type==="background_task"&&z.status==="in_progress");s.status==="running"||s.status==="pending"?d(!0):s.status==="completed"&&!N&&d(!1)},[s.status,s.items]);let f=-1;for(let N=s.items.length-1;N>=0;N--)if(s.items[N].type==="agent_message"){f=N;break}const h=f>=0,m=h?s.items.slice(0,f):s.items,y=!h&&s.status==="completed"&&s.agent_response?{id:`response-${s.id}`,turn_id:s.id,external_item_id:`response-${s.id}`,type:"agent_message",data:{text:s.agent_response},status:"completed",created_at:s.created_at,updated_at:s.updated_at}:null,w=m.filter(N=>{var z;return!(N.type==="reasoning"&&(!((z=N.data)!=null&&z.text)||N.data.text===""))}).filter(N=>!(N.type==="background_task"||N.type==="ask_user")),S=[];let k=null;for(const N of w)N.type==="agent_message"?(k&&S.push(k),k={agentMessage:N,toolItems:[],otherItems:[]}):(k||(k={agentMessage:null,toolItems:[],otherItems:[]}),wf(N)?k.toolItems.push(N):k.otherItems.push(N));k&&S.push(k);const A=w.filter(N=>wf(N)).length,D=A>0||w.length>0&&(s.status==="running"||s.status==="pending");return u.jsxs("div",{className:"turn-group",children:[u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--amber)",color:"#fff"},children:"U"}),u.jsx("span",{className:"turn-header-title",children:"You"})]}),u.jsx("p",{className:"user-message",children:s.user_prompt}),Array.isArray(s.attachments)&&s.attachments.length>0&&u.jsx($v,{attachments:s.attachments})]}),D&&u.jsxs("div",{className:"tool-calls",children:[u.jsxs("div",{className:"tool-calls-header",onClick:()=>d(N=>!N),children:[u.jsx("span",{className:"tool-calls-icon",children:u.jsx(qm,{size:12})}),u.jsx("span",{className:"tool-calls-summary",children:A>0?`${A} tool call${A>1?"s":""}`:"thinking…"}),u.jsx(ou,{size:14,className:"tool-calls-chevron",style:{transform:a?"rotate(90deg)":"none"}})]}),a&&u.jsx("div",{className:"tool-calls-body",children:S.map((N,z)=>u.jsxs("div",{className:"intermediate-segment",children:[N.agentMessage&&u.jsx(cr,{item:N.agentMessage,runtimeType:i,turn:s,threads:l}),N.otherItems.map(H=>u.jsx(cr,{item:H,runtimeType:i,turn:s,threads:l},H.id)),N.toolItems.length>0&&u.jsx(jv,{items:N.toolItems,runtimeType:i,turn:s,threads:l})]},z))})]}),s.items.filter(N=>N.type==="background_task").map(N=>u.jsx(cr,{item:N,runtimeType:i,turn:s,threads:l},`task-${N.id}`)),h&&u.jsx(cr,{item:s.items[f],runtimeType:i,turn:s,threads:l},s.items[f].id),y&&u.jsx(cr,{item:y,runtimeType:i,turn:s,threads:l},y.id),h&&s.items.slice(f+1).filter(N=>N.type!=="ask_user"&&N.type!=="background_task").map(N=>u.jsx(cr,{item:N,runtimeType:i,turn:s,threads:l},N.id)),s.items.filter(N=>N.type==="ask_user").map(N=>u.jsx(cr,{item:N,runtimeType:i,turn:s,threads:l},`ask-${N.id}`)),s.items.length===0&&!s.error&&(s.status==="pending"||s.status==="running")&&u.jsx("div",{className:"render-content",children:u.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic"},children:s.status==="running"?"Agent is thinking…":"Waiting to start…"})}),s.error&&u.jsx("div",{className:"render-content",children:u.jsx("pre",{className:"cmd-output",style:{color:"var(--red)"},children:u.jsx("code",{children:s.error})})})]})}const Wv=P.memo(Hv);function ap(s,i="session",l=0){const a=[];if(i==="session")s.forEach((f,h)=>Ef(f,h,a));else{const f=s[l];f&&Ef(f,l,a)}const d=new Map;for(const f of a)d.set(f.path,f);return Array.from(d.values())}function Ef(s,i,l){var a;for(const d of s.items)if(d.type==="file_change"&&((a=d.data)!=null&&a.changes)){const f=d.data.changes;for(const h of f)l.push({path:h.path,kind:h.kind,turnIdx:i})}}function Vv(){const{activeSessionId:s,sessionDetails:i,activeTurnIndex:l,activeRightTab:a,changesScope:d,submittingPrompt:f,loading:h,selectedChangePath:m,setSelectedChangePath:y}=K(),g=s?i[s]:null,w=(g==null?void 0:g.turns)??[],S=P.useRef(null);if(P.useEffect(()=>{S.current&&(S.current.scrollTop=S.current.scrollHeight)},[s,w.length]),P.useEffect(()=>{if(!m||a!=="changes")return;const k=setTimeout(()=>{const A=m.replace(/[^a-zA-Z0-9]/g,"-"),D=document.getElementById(`diff-${A}`);D&&(D.scrollIntoView({behavior:"smooth",block:"start"}),D.classList.add("diff-highlight"),setTimeout(()=>D.classList.remove("diff-highlight"),1500)),y(null)},50);return()=>clearTimeout(k)},[m,a,y]),a==="changes"){if(!g)return u.jsx("div",{className:"render-scroll",children:u.jsx("div",{className:"empty-state",children:"No session selected"})});const k=ap(w,d,l);return k.length===0?u.jsx("div",{className:"render-scroll",children:u.jsx("div",{className:"render-content",children:u.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic"},children:"No file changes in this scope."})})}):u.jsx("div",{className:"render-scroll",ref:S,children:u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{style:{marginBottom:"20px"},children:[u.jsx("span",{style:{fontSize:"16px",fontWeight:600,color:"var(--text)"},children:d==="session"?"All Session Changes":"Current Turn Changes"}),u.jsxs("span",{style:{fontSize:"12px",color:"var(--text-muted)",marginLeft:"8px"},children:[k.length," file",k.length>1?"s":""]})]}),k.map(A=>{const D=A.path.split("/").pop()||A.path,N=A.path.replace("/"+D,""),z=A.kind==="add"?"Added":A.kind==="delete"?"Deleted":"Modified",H=A.kind==="add"?"fc-add":A.kind==="delete"?"fc-del":"fc-mod",V=A.kind==="add"?"A":A.kind==="delete"?"D":"M",J=A.path.replace(/[^a-zA-Z0-9]/g,"-");return u.jsxs("div",{children:[u.jsxs("div",{className:"diff-file-header",id:`diff-${J}`,children:[u.jsx("span",{className:`diff-file-status ${H}`,children:V}),u.jsxs("span",{className:"diff-file-name",children:[N&&u.jsxs("span",{style:{color:"var(--text-muted)"},children:[N,"/"]}),D]}),u.jsx("span",{className:"diff-file-stats",children:u.jsx("span",{className:`diff-file-badge ${H}`,children:z})})]}),u.jsx("p",{style:{color:"var(--text-muted)",fontSize:"12px",fontStyle:"italic",padding:"8px 16px"},children:"Diff content not available (Codex SDK limitation)."})]},A.path)})]})})}return h&&!g?u.jsx("div",{className:"render-scroll",children:u.jsxs("div",{className:"skeleton-bars",children:[u.jsx("div",{className:"skeleton-bar"}),u.jsx("div",{className:"skeleton-bar"}),u.jsx("div",{className:"skeleton-bar"}),u.jsx("div",{className:"skeleton-bar"}),u.jsx("div",{className:"skeleton-bar"})]})}):g?u.jsxs("div",{className:"render-scroll",ref:S,children:[f&&u.jsx("div",{className:"turn-block",children:u.jsxs("div",{className:"turn-group",children:[u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--amber)",color:"#fff"},children:"U"}),u.jsx("span",{className:"turn-header-title",children:"You"})]}),u.jsx("p",{className:"user-message",children:f})]}),u.jsx("div",{className:"render-content",children:u.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic"},children:"Sending…"})})]})}),w.length===0&&!f&&u.jsx("div",{className:"empty-state",children:"No turns yet. Send a message below to start."}),w.filter(k=>!k.thread_id).map((k,A)=>u.jsx("div",{id:`turn-${A}`,className:"turn-block",children:u.jsx(Wv,{turn:k,runtimeType:g.runtime_type,threads:g.threads??[]})},k.id))]}):u.jsx("div",{className:"render-scroll",children:u.jsx("div",{className:"empty-state",children:"No session selected"})})}const Gv=P.memo(Vv),qv=[{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 Qv(s){return s.map(i=>({id:i.name,label:`/${i.name}`,hint:i.description,capability:null,insertAsText:!0}))}function Kv(s,i,l=[]){const a=[...qv,...Qv(l)],d=new Set;return a.filter(f=>!(d.has(f.label)||(d.add(f.label),f.capability&&!i[f.capability])||s&&!f.label.toLowerCase().includes(s.toLowerCase())))}function Yv({commands:s,selectedIndex:i,onSelect:l,onHover:a}){return u.jsxs("div",{className:"slash-popup",children:[u.jsx("div",{className:"slash-popup-header",children:"Commands"}),s.length===0&&u.jsx("div",{className:"slash-popup-empty",children:"No matching commands"}),s.map((d,f)=>u.jsxs("div",{className:`slash-popup-item ${f===i?"selected":""}`,onMouseEnter:()=>a(f),onClick:()=>l(d),children:[u.jsx("span",{className:"slash-popup-label",children:d.label}),u.jsx("span",{className:"slash-popup-hint",children:d.hint})]},d.id))]})}function Oa({title:s,options:i,currentValue:l,onSelect:a,onClose:d}){return u.jsxs("div",{className:"slash-popup",children:[u.jsxs("div",{className:"slash-popup-header",children:[u.jsx("button",{className:"slash-popup-back",onClick:d,children:"← Back"}),u.jsx("span",{children:s})]}),i.map(f=>u.jsxs("div",{className:`slash-popup-item ${f.value===l?"selected":""}`,onClick:()=>a(f.value),children:[u.jsxs("div",{className:"slash-popup-item-main",children:[u.jsx("span",{className:"slash-popup-label",children:f.label}),f.description&&u.jsx("span",{className:"slash-popup-hint",children:f.description})]}),f.value===l&&u.jsx("span",{className:"slash-popup-check",children:"✓"})]},f.value))]})}function Xv(){return Wr("/skills")}function Zv({filter:s,onSelect:i,onClose:l}){const[a,d]=P.useState([]),[f,h]=P.useState(!0),[m,y]=P.useState(0),g=P.useRef(null);P.useEffect(()=>{Xv().then(d).catch(()=>d([])).finally(()=>h(!1))},[]);const w=a.filter(S=>S.name.toLowerCase().includes(s.toLowerCase())||S.description.toLowerCase().includes(s.toLowerCase()));return P.useEffect(()=>{y(0)},[s]),P.useEffect(()=>{function S(k){k.key==="ArrowDown"?(k.preventDefault(),y(A=>Math.min(A+1,w.length-1))):k.key==="ArrowUp"?(k.preventDefault(),y(A=>Math.max(A-1,0))):k.key==="Enter"?(k.preventDefault(),w[m]&&i(w[m])):k.key==="Escape"&&(k.preventDefault(),l())}return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[w,m,i,l]),u.jsxs("div",{className:"slash-popup",ref:g,children:[u.jsxs("div",{className:"slash-popup-header",children:[u.jsx("button",{className:"slash-popup-back",onClick:l,children:"← Back"}),u.jsx("span",{children:"Skills"})]}),f&&u.jsx("div",{className:"slash-popup-empty",children:"Loading skills…"}),!f&&w.length===0&&u.jsx("div",{className:"slash-popup-empty",children:"No matching skills"}),w.map((S,k)=>u.jsxs("div",{className:`slash-popup-item ${k===m?"selected":""}`,onMouseEnter:()=>y(k),onClick:()=>i(S),children:[u.jsxs("div",{className:"slash-popup-item-main",children:[u.jsx("span",{className:"slash-popup-label",children:S.name}),S.description&&u.jsx("span",{className:"slash-popup-hint",children:S.description})]}),!!S.metadata.isSystem&&u.jsx("span",{className:"slash-popup-hint",children:"system"})]},S.id))]})}function Jv(){return Wr("/providers")}function ey(s){return Wr(`/providers/${s}/commands`)}const ty={dynamicModels:!1,skills:!1,plugins:!1,mcpServers:!1,imageAttachments:!1,sandbox:!1,webSearch:!1,networkAccess:!1,fileReferences:!1};function ny(s){const[i,l]=P.useState([]),[a,d]=P.useState(!0);P.useEffect(()=>{Jv().then(l).catch(()=>l([])).finally(()=>d(!1))},[]);const f=i.find(h=>h.id===s)??null;return{provider:f,capabilities:(f==null?void 0:f.capabilities)??ty,loading:a}}const bi=32,ml=200;function Cf(s){if(!s)return{};try{return JSON.parse(s)}catch{return{}}}function jf(s){return s<1024?`${s}B`:s<1024*1024?`${(s/1024).toFixed(1)}KB`:`${(s/(1024*1024)).toFixed(1)}MB`}let Rf=0;function ry(){return Rf+=1,`att-${Date.now()}-${Rf}`}function sy(){const[s,i]=P.useState(""),l=P.useRef(null),a=P.useRef(null),{submitPrompt:d,cancelTurn:f,updateRuntimeConfig:h,setShowModelSelector:m}=K(),y=K(b=>b.activeSessionId),g=K(b=>b.activeSessionId?b.sessionDetails[b.activeSessionId]:null),w=K(b=>b.restoredPrompt),S=K(b=>b.quotedText),k=(g==null?void 0:g.is_running)===1,A=!y,{capabilities:D}=ny(g==null?void 0:g.runtime_type),N=(g==null?void 0:g.runtime_type)??null,z=D.imageAttachments,[H,V]=P.useState([]),[J,O]=P.useState(!1),[ne,ce]=P.useState(null),[oe,ae]=P.useState([]);P.useEffect(()=>{if(!N){ae([]);return}let b=!1;return ey(N).then(he=>{b||ae(he)}).catch(()=>{b||ae([])}),()=>{b=!0}},[N]);const[Te,te]=P.useState(!1),[ve,_e]=P.useState(""),[je,de]=P.useState(0),[M,Y]=P.useState(void 0),[Z,$]=P.useState(!1),[X,G]=P.useState(""),[E,I]=P.useState([]),pe=Te?Kv(ve,D,oe):[];P.useEffect(()=>{w!==null&&(i(w),requestAnimationFrame(()=>{l.current&&(l.current.style.height="auto",l.current.style.height=Math.min(l.current.scrollHeight,ml)+"px")}),K.setState({restoredPrompt:null}))},[w]),P.useEffect(()=>{S!==null&&(i(b=>b+S),setTimeout(()=>{if(l.current){l.current.style.height="auto",l.current.style.height=Math.min(l.current.scrollHeight,ml)+"px",l.current.focus();const b=l.current.value.length;l.current.setSelectionRange(b,b)}},0),K.setState({quotedText:null}))},[S]),P.useEffect(()=>{if(!k)return;function b(he){he.key==="Escape"&&(he.preventDefault(),f())}return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[k,f]),P.useEffect(()=>{te(!1),Y(void 0),$(!1),I([]),V(b=>{for(const he of b)he.previewUrl&&URL.revokeObjectURL(he.previewUrl);return[]})},[y]),P.useEffect(()=>{if(!ne)return;function b(he){he.key==="Escape"&&(he.preventDefault(),ce(null))}return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[ne]);const ye=P.useCallback(b=>{if(!b)return;const he=Array.from(b);for(const He of he){const Ve=new FileReader;Ve.onload=()=>{const kt=Ve.result.split(",")[1]??"",It=He.type.startsWith("image/")?URL.createObjectURL(He):void 0;V(nn=>[...nn,{id:ry(),name:He.name,media_type:He.type||"application/octet-stream",data:kt,previewUrl:It,size:He.size}])},Ve.readAsDataURL(He)}},[]),Ne=P.useCallback(b=>{V(he=>{const He=he.find(Ve=>Ve.id===b);return He!=null&&He.previewUrl&&URL.revokeObjectURL(He.previewUrl),he.filter(Ve=>Ve.id!==b)})},[]),Ee=P.useCallback(b=>{b.preventDefault(),b.stopPropagation(),!(!z||k)&&O(!0)},[z,k]),Re=P.useCallback(b=>{b.preventDefault(),b.stopPropagation(),O(!1)},[]),Ie=P.useCallback(b=>{b.preventDefault(),b.stopPropagation(),O(!1),!(!z||k)&&ye(b.dataTransfer.files)},[z,k,ye]),Be=P.useCallback(b=>{var Ve;if(!z)return;const he=(Ve=b.clipboardData)==null?void 0:Ve.items;if(!he)return;const He=[];for(let ot=0;ot<he.length;ot++){const kt=he[ot];if(kt.type.startsWith("image/")){const It=kt.getAsFile();It&&He.push(It)}}He.length>0&&(b.preventDefault(),ye(He))},[z,ye]);function mt(){const b=l.current;b&&(b.style.height="auto",b.style.height=Math.min(b.scrollHeight,ml)+"px")}function dn(){const b=s.trim();if(!b||k)return;let he=b;E.length>0&&(he=`${E.map(ot=>`$${ot.name}`).join(" ")}
363
+
364
+ ${b}`);const He=H.map(({id:Ve,previewUrl:ot,size:kt,...It})=>It);i(""),I([]),l.current&&(l.current.style.height=bi+"px"),te(!1),Y(void 0),$(!1);for(const Ve of H)Ve.previewUrl&&URL.revokeObjectURL(Ve.previewUrl);V([]),d(he,He.length>0?He:void 0)}function Fe(b){if(b.insertAsText){const he=`/${b.id} `;i(he),te(!1),Y(void 0),requestAnimationFrame(()=>{if(l.current){l.current.focus();const He=he.length;l.current.setSelectionRange(He,He),l.current.style.height="auto",l.current.style.height=Math.min(l.current.scrollHeight,ml)+"px"}});return}b.subPopup?Y(b.subPopup):b.id==="skills"?($(!0),G(""),te(!1),i("")):b.id==="model"?(m(!0),te(!1),i("")):(te(!1),i(""))}function fn(b){I(he=>[...he,b]),$(!1),i(""),l.current&&(l.current.style.height=bi+"px")}function be(b){const he=Cf(g==null?void 0:g.runtime_config);M==="sandbox"?he.sandboxMode=b:M==="websearch"?he.webSearchMode=b:M==="network"&&(he.networkAccessEnabled=b==="true"),h(he),Y(void 0),te(!1),i(""),l.current&&(l.current.style.height=bi+"px")}function Un(b){if(Te&&!M){if(b.key==="ArrowDown"){b.preventDefault(),de(he=>Math.min(he+1,pe.length-1));return}if(b.key==="ArrowUp"){b.preventDefault(),de(he=>Math.max(he-1,0));return}if(b.key==="Enter"){b.preventDefault(),pe[je]&&Fe(pe[je]);return}if(b.key==="Escape"){b.preventDefault(),te(!1),i("");return}}if(M&&b.key==="Escape"){b.preventDefault(),Y(void 0);return}if(b.key==="Enter"&&(b.metaKey||b.ctrlKey)&&!k){b.preventDefault(),dn();return}b.key==="Escape"&&k&&(b.preventDefault(),f())}function We(b){const he=b.target.value;i(he),mt(),he.startsWith("/")&&!he.includes(" ")&&!k?(te(!0),_e(he.slice(1)),de(0)):(te(!1),Y(void 0)),he.startsWith("$")&&!k?($(!0),G(he.slice(1))):he.startsWith("$")||$(!1)}const Ut=Cf(g==null?void 0:g.runtime_config),hr=[{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"}],At=[{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"}],pn=[{value:"false",label:"Disabled",description:"No network access"},{value:"true",label:"Enabled",description:"Allow network access in sandbox"}];return u.jsxs("div",{className:`cmd-bar${J?" drag-over":""}`,onDragOver:Ee,onDragLeave:Re,onDrop:Ie,children:[Te&&!M&&u.jsx(Yv,{commands:pe,selectedIndex:je,onSelect:Fe,onHover:de}),Te&&M==="sandbox"&&u.jsx(Oa,{title:"Sandbox Mode",options:hr,currentValue:Ut.sandboxMode,onSelect:be,onClose:()=>Y(void 0)}),Te&&M==="websearch"&&u.jsx(Oa,{title:"Web Search",options:At,currentValue:Ut.webSearchMode,onSelect:be,onClose:()=>Y(void 0)}),Te&&M==="network"&&u.jsx(Oa,{title:"Network Access",options:pn,currentValue:Ut.networkAccessEnabled===!0?"true":"false",onSelect:be,onClose:()=>Y(void 0)}),Z&&u.jsx(Zv,{filter:X,onSelect:fn,onClose:()=>{$(!1),i("")}}),E.length>0&&u.jsx("div",{className:"skill-badges",children:E.map(b=>u.jsxs("span",{className:"skill-badge",children:["$",b.name,u.jsx("button",{className:"skill-badge-remove",onClick:()=>I(he=>he.filter(He=>He.id!==b.id)),children:"×"})]},b.id))}),H.length>0&&u.jsx("div",{className:"attachment-preview-area",children:H.map(b=>u.jsxs("div",{className:"attachment-chip",title:b.name,children:[b.previewUrl?u.jsx("img",{src:b.previewUrl,alt:b.name,className:"attachment-thumb",onClick:()=>ce(b),style:{cursor:"pointer"}}):u.jsx(Uf,{size:20,className:"attachment-file-icon"}),u.jsxs("div",{className:"attachment-info",children:[u.jsx("span",{className:"attachment-name",children:b.name}),u.jsx("span",{className:"attachment-size",children:jf(b.size)})]}),u.jsx("button",{className:"attachment-remove",onClick:()=>Ne(b.id),title:"Remove attachment",children:u.jsx(pr,{size:14})})]},b.id))}),z&&!k&&!A&&u.jsx("input",{ref:a,type:"file",multiple:!0,accept:"image/*,application/pdf,text/*,.ts,.js,.tsx,.jsx,.py,.go,.rs,.java,.c,.cpp,.h,.css,.html,.xml,.yml,.yaml,.toml,.ini,.sh,.sql",style:{display:"none"},onChange:b=>{ye(b.target.files),b.target.value=""}}),u.jsxs("div",{className:"cmd-input-row",children:[z&&!k&&!A&&u.jsx("button",{className:"attachment-clip-btn",onClick:()=>{var b;return(b=a.current)==null?void 0:b.click()},title:"Attach files",disabled:k,children:u.jsx(tg,{size:16})}),u.jsx("textarea",{ref:l,className:"cmd-textarea",placeholder:A?"Select or create a session…":k?"Agent is running…":"Type a message… Use / for commands",autoComplete:"off",value:s,disabled:k||A,rows:1,style:{minHeight:bi,maxHeight:ml},onChange:We,onKeyDown:Un,onPaste:Be}),k?u.jsx("button",{className:"cmd-stop-btn",onClick:()=>f(),title:"Stop (Esc)",children:u.jsx(Vi,{size:15})}):u.jsx("button",{className:"cmd-send-btn",onClick:dn,disabled:!s.trim()||A,title:"Send (⌘↵)",children:u.jsx(bm,{size:16})})]}),ne&&u.jsx("div",{className:"image-preview-modal",onClick:()=>ce(null),children:u.jsxs("div",{className:"image-preview-content",onClick:b=>b.stopPropagation(),children:[u.jsx("img",{src:ne.previewUrl,alt:ne.name}),u.jsxs("div",{className:"image-preview-info",children:[u.jsx("span",{children:ne.name}),u.jsx("span",{children:jf(ne.size)})]}),u.jsx("button",{className:"image-preview-close",onClick:()=>ce(null),children:u.jsx(pr,{size:20})})]})})]})}function ly(){const s=K(H=>H.activeSessionId),i=K(H=>H.sessionDetails),l=K(H=>H.activeTurnIndex),a=K(H=>H.setActiveTurnIndex),d=K(H=>H.rewindToTurn),f=K(H=>H.restoreSession),h=K(H=>H.branchFromTurn),m=s?i[s]:null,y=(m==null?void 0:m.turns)??[],g=(m==null?void 0:m.is_running)===1,w=!!(m!=null&&m.rewound_at_turn_id),S=(m==null?void 0:m.runtime_type)==="repoburg",k=S?"Rewind to this turn? Runtime history after this point is PERMANENTLY deleted and cannot be restored.":"Rewind to this turn? Hidden turns can be restored later.",[A,D]=P.useState(null),N=P.useRef(null);if(su(N,()=>D(null),!!A),lu(()=>D(null),!!A),y.length===0)return u.jsx("div",{className:"empty-state",children:"No turns yet"});function z(H){a(H),requestAnimationFrame(()=>{var V;(V=document.getElementById(`turn-${H}`))==null||V.scrollIntoView({behavior:"smooth",block:"start"})})}return u.jsxs("div",{className:"right-section",children:[u.jsx("div",{className:"right-section-title",children:"Conversation"}),y.map((H,V)=>{const J=V===l,O=H.user_prompt.length>50?H.user_prompt.slice(0,50)+"…":H.user_prompt,ne=H.status==="running"||H.status==="pending";return u.jsx("div",{children:u.jsxs("div",{className:`turn-item ${J?"active":""}`,onClick:()=>z(V),onContextMenu:ce=>{ce.preventDefault(),D({x:ce.clientX,y:ce.clientY,turnId:H.id,turnIndex:V,isLast:V===y.length-1,isSlashCommand:H.user_prompt.trimStart().startsWith("/")})},children:[u.jsx("span",{className:"turn-item-icon",style:{background:"var(--amber)",color:"#fff"},children:u.jsx(ag,{size:12})}),u.jsx("span",{className:"turn-item-label",children:O}),ne&&u.jsx("span",{className:"turn-item-status",children:"running…"})]})},H.id)}),A&&u.jsxs("div",{ref:N,className:"ctx-menu",style:{position:"fixed",left:A.x,top:A.y,zIndex:500},children:[u.jsxs("div",{className:`ctx-menu-item ${A.isLast||g||A.isSlashCommand?"ctx-disabled":""}`,onClick:()=>{A.isLast||g||A.isSlashCommand||(window.confirm(k)&&d(s,A.turnId),D(null))},children:[u.jsx(sg,{size:12})," Rewind to Here",A.isSlashCommand?" (slash command)":""]}),w&&!S&&u.jsxs("div",{className:"ctx-menu-item",onClick:()=>{f(s),D(null)},children:[u.jsx(uu,{size:12})," Restore Rewind"]}),u.jsxs("div",{className:"ctx-menu-item",onClick:()=>{h(s,A.turnId),D(null)},children:[u.jsx(Vm,{size:12})," Branch from Here"]})]})]})}function iy(){const{activeSessionId:s,sessionDetails:i,changesScope:l,setChangesScope:a,activeTurnIndex:d,setSelectedChangePath:f}=K(),h=s?i[s]:null,m=(h==null?void 0:h.turns)??[],y=ap(m,l,d);return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"changes-scope-toggle",children:[u.jsx("button",{className:`scope-btn ${l==="session"?"active":""}`,onClick:()=>a("session"),children:"Session"}),u.jsx("button",{className:`scope-btn ${l==="turngroup"?"active":""}`,onClick:()=>a("turngroup"),children:"Current Turn"})]}),y.length===0?u.jsx("div",{className:"empty-state",children:"No file changes in this scope"}):u.jsxs("div",{className:"right-section",children:[u.jsxs("div",{className:"right-section-title",children:["Changed Files (",y.length,")"]}),y.map(g=>{const w=g.kind==="add"?"fc-add":g.kind==="delete"?"fc-del":"fc-mod",S=g.kind==="add"?"A":g.kind==="delete"?"D":"M",k=g.path.split("/").pop()||g.path,A=g.path.replace("/"+k,"");return u.jsxs("div",{className:"file-change clickable",onClick:()=>f(g.path),children:[u.jsx("span",{className:`fc-status ${w}`,children:S}),u.jsxs("span",{className:"fc-name",children:[A&&u.jsxs("span",{style:{color:"var(--text-muted)"},children:[A,"/"]}),k]})]},g.path)})]})]})}const Lf=2e4;function oy(s){const i=[];return s.forEach((l,a)=>{var d;for(const f of l.items)if(f.type==="background_task"){if((((d=f.data)==null?void 0:d.task_type)||"unknown")==="local_agent")continue;i.push({item:f,turnIndex:a,turnPrompt:l.user_prompt})}}),i}function ay({entry:s}){const{item:i,turnIndex:l,turnPrompt:a}=s,d=i.data||{},f=d.task_type||"unknown",h=d.subagent_type||null,m=d.description||"",y=d.status||"running",g=d.summary||null,w=d.last_tool_name||null,S=d.token_count||null,k=d.output||"",A=i.status==="in_progress",D=f==="local_agent",N=f==="local_bash",z=D?Wa:N?Hf:Ff,H=D?`Subagent${h?`: ${h}`:""}`:N?"Monitor":"Background Task",V=y==="running"?"running…":y==="completed"?"done":y==="failed"?"failed":y==="stopped"?"stopped":y,J=i.status==="failed"||y==="failed",[O,ne]=P.useState(A),[ce,oe]=P.useState(!1),ae=P.useRef(null);P.useEffect(()=>{A&&ne(!0)},[A]),P.useEffect(()=>{O&&A&&ae.current&&(ae.current.scrollTop=ae.current.scrollHeight)},[O,A,k]);const Te=k.length>Lf,te=Te&&!ce?k.slice(0,Lf)+`
365
+ … (truncated, click to expand)`:k,ve=A?null:y==="completed"?u.jsx(yl,{size:12}):J?u.jsx(au,{size:12}):u.jsx(Vi,{size:12});return u.jsxs("div",{className:`task-card ${A?"task-running":""} ${J?"task-failed":""}`,children:[u.jsxs("div",{className:"task-card-header",onClick:()=>ne(_e=>!_e),style:{cursor:"pointer"},children:[u.jsx("span",{className:"task-card-icon",children:u.jsx(z,{size:14})}),u.jsx("span",{className:"task-card-type",children:H}),u.jsxs("span",{className:`task-card-status ${J?"task-status-failed":A?"task-status-running":"task-status-done"}`,children:[ve," ",V]}),u.jsx(ou,{size:14,className:"task-card-chevron",style:{transform:O?"rotate(90deg)":"none",marginLeft:"auto"}})]}),m&&u.jsx("div",{className:"task-card-desc",children:m}),A&&w&&u.jsxs("div",{className:"task-card-meta",children:["last tool: ",w,S!=null&&` · ${S.toLocaleString()} tokens`]}),O&&u.jsxs("div",{className:"task-card-body",children:[k?u.jsxs(u.Fragment,{children:[u.jsx("pre",{className:"cmd-output task-output",ref:ae,children:u.jsx("code",{children:te})}),Te&&u.jsx("button",{className:"cmd-output-toggle",onClick:()=>oe(_e=>!_e),children:ce?"Show less":`Show full output (${(k.length/1024).toFixed(0)}KB)`})]}):g?u.jsx("pre",{className:"cmd-output task-output",children:u.jsx("code",{children:g})}):A?u.jsx("div",{className:"task-card-placeholder",children:"Waiting for output…"}):u.jsx("div",{className:"task-card-placeholder",children:"No output captured."}),u.jsxs("div",{className:"task-card-context",title:a,children:["from turn ",l+1,": ",a.length>60?a.slice(0,60)+"…":a]})]})]})}const uy=P.memo(ay);function cy(){var g,w;const s=K(S=>S.activeSessionId),i=K(S=>S.sessionDetails),l=s?i[s]:null,a=(l==null?void 0:l.turns)??[],d=(l==null?void 0:l.backgroundTasks)??[],f=oy(a),h=[...f].sort((S,k)=>{const A=S.item.status==="in_progress",D=k.item.status==="in_progress";return A&&!D?-1:!A&&D?1:k.turnIndex-S.turnIndex}),m=new Map;for(const S of d)S.task_type==="local_bash"&&m.set(S.task_id,S.task_type);for(const S of f)if(S.item.status==="in_progress"){const k=((g=S.item.data)==null?void 0:g.task_id)??S.item.external_item_id,A=((w=S.item.data)==null?void 0:w.task_type)??"unknown";m.set(k,A)}const y=[...m.values()].filter(S=>S==="local_bash").length;return f.length===0?u.jsx("div",{className:"empty-state",children:"No background tasks yet"}):u.jsxs("div",{className:"right-section",children:[u.jsxs("div",{className:"right-section-title",children:["Background Tasks (",f.length,")",y>0&&u.jsxs("span",{className:"task-count-badge",style:{color:"var(--amber)"},children:[" ",y," running"]})]}),h.map(S=>u.jsx(uy,{entry:S},S.item.id))]})}const dy=P.memo(cy);Ae.setOptions({breaks:!0,gfm:!0});function fy(s){const i=Ae.parse(s);return xu.sanitize(i)}function py(s){var i;return(i=s.data)!=null&&i.text?s.data.text:""}function hy(s){const i=s.match(/^\[Quoting from your previous response\]:\n> .*\n\n([\s\S]*)$/);return i?i[1]:s}function my({turn:s}){const i=s.items.filter(a=>a.type==="agent_message"),l=hy(s.user_prompt);return u.jsxs("div",{className:"thread-card-turn",children:[u.jsx("div",{className:"thread-card-user-message",children:l}),i.map(a=>u.jsx("div",{className:"thread-card-ai-response",dangerouslySetInnerHTML:{__html:fy(py(a))}},a.id)),s.items.length===0&&(s.status==="pending"||s.status==="running")&&u.jsx("div",{className:"thread-card-pending",children:s.status==="running"?"AI is responding…":"Waiting…"})]})}function gy({thread:s,isRunning:i,threadTurns:l,onResolve:a,onReopen:d,onDelete:f,onFollowup:h,onLocate:m}){const[y,g]=P.useState(""),[w,S]=P.useState(!0),k=P.useRef(null),A=P.useRef(null),[D,N]=P.useState(!1),[z,H]=P.useState({x:0,y:0}),[V,J]=P.useState(""),O=28,ne=120;P.useEffect(()=>{const te=A.current;te&&(te.scrollTop=te.scrollHeight)},[l.length,w]);function ce(){const te=k.current;te&&(te.style.height="auto",te.style.height=Math.min(te.scrollHeight,ne)+"px")}const oe=P.useCallback(()=>{N(!1)},[]),ae=P.useCallback(()=>{const te=A.current;if(!te)return;const ve=window.getSelection();if(!ve||ve.rangeCount===0||ve.isCollapsed){N(!1);return}const _e=ve.getRangeAt(0);if(!te.contains(_e.commonAncestorContainer)){N(!1);return}const je=_e.commonAncestorContainer.nodeType===Node.TEXT_NODE?_e.commonAncestorContainer.parentElement:_e.commonAncestorContainer;if(!(je!=null&&je.closest(".thread-card-ai-response"))){N(!1);return}const de=ve.toString();if(!de.trim()){N(!1);return}const M=_e.getBoundingClientRect(),Y=28,Z=6,$=170;let X=!1;if(ve.anchorNode&&ve.focusNode)try{const I=document.createRange();I.setStart(ve.focusNode,ve.focusOffset),I.setEnd(ve.focusNode,ve.focusOffset);const pe=document.createRange();pe.setStart(ve.anchorNode,ve.anchorOffset),pe.setEnd(ve.anchorNode,ve.anchorOffset),X=pe.compareBoundaryPoints(Range.START_TO_START,I)>0}catch{X=!1}let G=M.top-Y-Z;G<8&&(G=M.bottom+Z);let E=X?M.left-$:M.right;E=Math.max(8,Math.min(E,window.innerWidth-$-8)),H({x:E,y:G}),J(de),N(!0)},[]);P.useEffect(()=>{function te(ve){const _e=ve.target;_e&&_e.closest(".selection-actions")||ae()}return document.addEventListener("mouseup",te),()=>document.removeEventListener("mouseup",te)},[ae]);const Te=P.useCallback(()=>{var ve;const te=`
366
+ \`\`\`QUOTE
367
+ ${V}
368
+ \`\`\`
369
+
370
+ `;g(_e=>_e+te),N(!1),J(""),(ve=window.getSelection())==null||ve.removeAllRanges(),setTimeout(()=>{if(k.current){k.current.style.height="auto",k.current.style.height=Math.min(k.current.scrollHeight,ne)+"px",k.current.focus();const _e=k.current.value.length;k.current.setSelectionRange(_e,_e)}},0)},[V]);return u.jsxs("div",{className:`thread-card ${s.status==="resolved"?"thread-resolved":""}`,id:`thread-${s.id}`,children:[u.jsxs("div",{className:"thread-card-header",onClick:()=>S(te=>!te),children:[u.jsxs("div",{className:"thread-card-quote",children:["“",s.selected_text.slice(0,100),s.selected_text.length>100?"…":"","”"]}),u.jsxs("div",{className:"thread-card-header-right",children:[u.jsx("button",{className:"thread-locate-btn",onClick:te=>{te.stopPropagation(),m()},title:"Scroll to text",children:u.jsx(eg,{size:12})}),u.jsx("span",{className:`thread-status-badge ${s.status==="open"?"thread-status-open":"thread-status-resolved"}`,children:s.status==="open"?"Open":"Resolved"})]})]}),w&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"thread-card-conversation",ref:A,onMouseDown:oe,children:[l.map(te=>u.jsx(my,{turn:te},te.id)),l.length===0&&u.jsx("div",{className:"thread-card-placeholder",children:"No messages yet."})]}),D&&u.jsx("div",{className:"selection-actions",style:{left:z.x,top:z.y},children:u.jsxs("button",{className:"discuss-button",onClick:Te,title:"Quote this text in your follow-up",children:[u.jsx(Bf,{size:14}),u.jsx("span",{children:"Quote"})]})}),s.status==="open"&&u.jsxs("div",{className:"thread-card-followup",children:[u.jsx("textarea",{ref:k,className:"thread-card-followup-input",placeholder:i?"Agent is running…":"Type a follow-up…",value:y,onChange:te=>{g(te.target.value),ce()},disabled:i,rows:1,style:{minHeight:O,maxHeight:ne},onKeyDown:te=>{te.key==="Enter"&&(te.metaKey||te.ctrlKey)&&!i&&y.trim()&&(te.preventDefault(),h(y.trim()),g(""),k.current&&(k.current.style.height=O+"px"))}}),u.jsx("button",{className:"thread-card-followup-send",disabled:i||!y.trim(),onClick:()=>{h(y.trim()),g("")},children:u.jsx(Wi,{size:13})})]}),u.jsxs("div",{className:"thread-card-actions",children:[s.status==="open"?u.jsxs("button",{className:"thread-action-btn",onClick:a,title:"Resolve thread",children:[u.jsx($f,{size:13})," Resolve"]}):u.jsxs("button",{className:"thread-action-btn",onClick:d,title:"Reopen thread",children:[u.jsx(uu,{size:13})," Reopen"]}),u.jsxs("button",{className:"thread-action-btn thread-action-danger",onClick:f,title:"Delete thread",children:[u.jsx(kl,{size:13})," Delete"]})]})]})]})}function vy(){const{activeSessionId:s,sessionDetails:i,followupThread:l,resolveThread:a,reopenThread:d,deleteThread:f,activeRightTab:h,switchRightTab:m}=K(),[y,g]=P.useState("open"),w=s?i[s]:null,S=(w==null?void 0:w.threads)??[],k=(w==null?void 0:w.turns)??[],A=(w==null?void 0:w.is_running)===1,D=S.filter(V=>y==="open"?V.status==="open":y==="resolved"?V.status==="resolved":!0),N=S.filter(V=>V.status==="open").length,z=S.filter(V=>V.status==="resolved").length;function H(V){h==="changes"&&m("turns"),setTimeout(()=>{const J=document.querySelector(`mark[data-thread-id="${V}"]`);J&&(J.scrollIntoView({behavior:"smooth",block:"center"}),J.classList.add("thread-mark-flash"),setTimeout(()=>J.classList.remove("thread-mark-flash"),1500))},h==="changes"?150:50)}return s?S.length===0?u.jsxs("div",{className:"empty-state",children:[u.jsx(Zm,{size:24,style:{opacity:.3,marginBottom:8}}),u.jsx("div",{children:"No threads yet."}),u.jsx("div",{style:{fontSize:"11px",marginTop:"4px"},children:"Select text in an agent response to start a discussion."})]}):u.jsxs("div",{children:[u.jsxs("div",{className:"thread-filter-tabs",children:[u.jsxs("button",{className:`thread-filter-tab ${y==="open"?"active":""}`,onClick:()=>g("open"),children:["Open (",N,")"]}),u.jsxs("button",{className:`thread-filter-tab ${y==="resolved"?"active":""}`,onClick:()=>g("resolved"),children:["Resolved (",z,")"]}),u.jsxs("button",{className:`thread-filter-tab ${y==="all"?"active":""}`,onClick:()=>g("all"),children:["All (",S.length,")"]})]}),D.length===0?u.jsxs("div",{className:"empty-state",style:{padding:"20px 0"},children:["No ",y," threads."]}):D.map(V=>u.jsx(gy,{thread:V,isRunning:A,threadTurns:k.filter(J=>J.thread_id===V.id),onResolve:()=>a(s,V.id),onReopen:()=>d(s,V.id),onDelete:()=>f(s,V.id),onFollowup:J=>l(s,V.id,J),onLocate:()=>H(V.id)},V.id))]}):u.jsx("div",{className:"empty-state",children:"No session selected"})}function yy(){var y,g;const{activeRightTab:s,switchRightTab:i,activeSessionId:l,sessionDetails:a}=K(),d=l?a[l]:null,f=((y=d==null?void 0:d.backgroundTasks)==null?void 0:y.length)??0,h=((g=d==null?void 0:d.threads)==null?void 0:g.filter(w=>w.status==="open").length)??0,m=[{id:"turns",label:"Turns"},{id:"changes",label:"Changes"},{id:"tasks",label:"Tasks",badge:f||void 0},{id:"threads",label:"Threads",badge:h||void 0}];return u.jsxs("div",{className:"ide-right",children:[u.jsx("div",{className:"right-tabs",children:m.map(w=>u.jsxs("div",{className:`right-tab ${s===w.id?"active":""}`,onClick:()=>i(w.id),children:[w.label,w.badge?u.jsx("span",{className:"right-tab-badge",children:w.badge}):null]},w.id))}),u.jsxs("div",{className:"right-content",children:[s==="turns"&&u.jsx(ly,{}),s==="changes"&&u.jsx(iy,{}),s==="tasks"&&u.jsx(dy,{}),s==="threads"&&u.jsx(vy,{})]})]})}const xe={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"}},Za=[{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:[xe.low,xe.medium,xe.high,xe.xhigh,xe.max,xe.ultra]},{slug:"gpt-5.6-terra",displayName:"GPT-5.6-Terra",description:"Balanced all-rounder for everyday work",defaultReasoning:"medium",reasoningLevels:[xe.low,xe.medium,xe.high,xe.xhigh,xe.max,xe.ultra]},{slug:"gpt-5.6-luna",displayName:"GPT-5.6-Luna",description:"Fast, affordable — clear, repeatable tasks",defaultReasoning:"medium",reasoningLevels:[xe.low,xe.medium,xe.high,xe.xhigh,xe.max]},{slug:"gpt-5.5",displayName:"GPT-5.5",description:"Previous-gen frontier model",defaultReasoning:"medium",reasoningLevels:[xe.low,xe.medium,xe.high,xe.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:[xe.low,xe.medium,xe.high,xe.xhigh,xe.max]},{slug:"claude-opus-5",displayName:"Claude Opus 5",description:"Deep reasoning for complex tasks",defaultReasoning:"medium",reasoningLevels:[xe.low,xe.medium,xe.high,xe.xhigh,xe.max]},{slug:"claude-fable-5",displayName:"Claude Fable 5",description:"Fast and efficient for simple tasks",defaultReasoning:"medium",reasoningLevels:[xe.low,xe.medium,xe.high,xe.xhigh,xe.max]}]},{id:"repoburg",label:"Repoburg",available:!0,models:[{slug:"ollama/glm-5.3:cloud",displayName:"GLM-5.3",description:"Ollama Cloud",defaultReasoning:"medium",reasoningLevels:[xe.low,xe.medium,xe.high]},{slug:"ollama/glm-5.3-flash:cloud",displayName:"GLM-5.3 Flash",description:"Ollama Cloud — fast",defaultReasoning:"medium",reasoningLevels:[xe.low,xe.medium,xe.high]},{slug:"ollama/minimax-m3:cloud",displayName:"MiniMax M3",description:"Ollama Cloud",defaultReasoning:"medium",reasoningLevels:[xe.low,xe.medium,xe.high]},{slug:"ollama/deepseek-v4-pro:cloud",displayName:"DeepSeek V4 Pro",description:"Ollama Cloud",defaultReasoning:"medium",reasoningLevels:[xe.low,xe.medium,xe.high]}]}];function xy(s){return Za.find(i=>i.id===s)}function ku(s){const i=xy(s);return(i==null?void 0:i.models)??[]}function up(s,i){return ku(s).find(l=>l.slug===i)}function Ja(s,i){var l;return((l=up(s,i))==null?void 0:l.reasoningLevels)??[]}function eu(s,i){var l;return(l=up(s,i))==null?void 0:l.defaultReasoning}function ky(){const{activeSessionId:s,sessions:i,updateModelConfig:l}=K(),a=K(M=>M.showModelSelector),d=K(M=>M.setShowModelSelector),f=i.find(M=>M.id===s),h=K(M=>M.models),m=K(M=>M.modelsLoading),y=K(M=>M.loadModels),[g,w]=P.useState(!1),S=P.useRef(null);if(su(S,()=>w(!1),g),lu(()=>w(!1),g),P.useEffect(()=>{a&&(w(!0),d(!1))},[a,d]),P.useEffect(()=>{f!=null&&f.runtime_type&&y(f.runtime_type)},[f==null?void 0:f.runtime_type,y]),!f)return null;const k=f.runtime_type,A=f.model??"",D=f.model_reasoning_effort??"",N=h.length>0?h:[],z=ku(k),V=[...N.length>0?N:z];if(A&&!V.some(M=>M.slug===A)){const M=z[0];V.unshift({slug:A,displayName:A,description:"Custom model",defaultReasoning:(M==null?void 0:M.defaultReasoning)??"medium",reasoningLevels:(M==null?void 0:M.reasoningLevels)??[]})}function J(M){return V.find(Y=>Y.slug===M)}function O(M){var Y;return N.length>0?((Y=J(M))==null?void 0:Y.reasoningLevels)??[]:Ja(k,M)}function ne(M){var Y;return N.length>0?(Y=J(M))==null?void 0:Y.defaultReasoning:eu(k,M)}const ce=Za.find(M=>M.id===k),oe=J(A),ae=A?O(A):[],Te=(ce==null?void 0:ce.label)??k,te=(oe==null?void 0:oe.displayName)??(A||"Default"),ve=ae.find(M=>M.effort===D),_e=(ve==null?void 0:ve.label)??(D||"Default");function je(M){var X;const Y=O(M),$=Y.some(G=>G.effort===D)?D:ne(M)??((X=Y[0])==null?void 0:X.effort)??"";l(M,$),w(!1)}function de(M){l(A,M),w(!1)}return u.jsxs("div",{className:"model-selector",ref:S,children:[u.jsxs("button",{className:"model-selector-btn",onClick:()=>w(!g),title:"Change model and thinking level",children:[u.jsx("span",{className:"model-selector-provider",children:Te}),u.jsx("span",{className:"model-selector-sep",children:"›"}),u.jsx("span",{className:"model-selector-model",children:te}),_e!=="Default"&&u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"model-selector-sep",children:"›"}),u.jsx("span",{className:"model-selector-reasoning",children:_e})]}),u.jsx(Va,{size:12,className:"model-selector-chevron"})]}),g&&u.jsxs("div",{className:"model-selector-popover",children:[u.jsxs("div",{className:"model-selector-column",children:[u.jsx("div",{className:"model-selector-col-header",children:"Provider"}),Za.map(M=>u.jsxs("div",{className:`model-selector-item ${M.id===k?"selected":""} ${M.available?"":"disabled"}`,onClick:()=>{if(M.available){if(M.id===k){w(!1);return}l("","",M.id)}},children:[u.jsx("span",{children:M.label}),!M.available&&u.jsxs("span",{className:"model-selector-coming-soon",children:[u.jsx(Ym,{size:10})," Soon"]}),M.id===k&&u.jsx(yl,{size:12})]},M.id))]}),u.jsxs("div",{className:"model-selector-column",children:[u.jsx("div",{className:"model-selector-col-header",children:"Model"}),m&&u.jsx("div",{className:"model-selector-empty",children:"Loading models…"}),!m&&V.length===0&&u.jsx("div",{className:"model-selector-empty",children:"No models available"}),V.map(M=>u.jsxs("div",{className:`model-selector-item ${M.slug===A?"selected":""}`,onClick:()=>je(M.slug),children:[u.jsxs("div",{className:"model-selector-item-main",children:[u.jsx("span",{className:"model-selector-item-name",children:M.displayName}),u.jsx("span",{className:"model-selector-item-desc",children:M.description})]}),M.slug===A&&u.jsx(yl,{size:12})]},M.slug))]}),u.jsxs("div",{className:"model-selector-column",children:[u.jsx("div",{className:"model-selector-col-header",children:"Thinking"}),ae.length===0&&u.jsx("div",{className:"model-selector-empty",children:"Select a model first"}),ae.map(M=>u.jsxs("div",{className:`model-selector-item ${M.effort===D?"selected":""}`,onClick:()=>de(M.effort),children:[u.jsx("span",{children:M.label}),M.effort===D&&u.jsx(yl,{size:12})]},M.effort))]})]})]})}function wy(s,i){if(!s||s.turns.length===0)return"—";const l=s.turns[0],a=s.turns[s.turns.length-1],d=i?null:a.updated_at;return Lm(l.created_at,d)}function zi(s){return s>=1e6?`${(s/1e6).toFixed(s%1e6===0?0:1)}M`:s>=1e3?`${Math.round(s/1e3)}K`:String(s)}function Sy(){var k,A;const s=K(D=>D.activeSessionId),i=K(D=>s?D.sessions.find(N=>N.id===s)??null:null),l=K(D=>s?D.sessionDetails[s]??null:null),a=K(D=>D.wsConnected),d=K(D=>D.switchRightTab),f=(l==null?void 0:l.contextUsage)??null;if(!i)return u.jsxs("div",{className:"ide-statusbar",children:[u.jsxs("div",{className:"sb-item",children:[u.jsx(Jd,{size:14})," AgentPane"]}),u.jsx("div",{className:"sb-divider",children:"|"}),u.jsxs("div",{className:"sb-item",title:a?"WebSocket connected":"WebSocket disconnected",children:[u.jsx("span",{className:`status-dot ${a?"done":"error"}`}),a?"Live":"Offline"]}),u.jsx("div",{className:"sb-spacer"}),u.jsxs("div",{className:"sb-item",children:[u.jsx(Zd,{size:14})," K"]})]});const h=ru(i),m=wy(l,h.isRunning),y=(l==null?void 0:l.backgroundTasks)??[],g=new Set,w=new Map;for(const D of y)g.add(D.task_id),w.set(D.task_id,D.task_type);for(const D of(l==null?void 0:l.turns)??[])for(const N of D.items)if(N.type==="background_task"&&N.status==="in_progress"){const z=((k=N.data)==null?void 0:k.task_id)??N.external_item_id,H=((A=N.data)==null?void 0:A.task_type)??"unknown";g.add(z),w.set(z,H)}const S=[...w.values()].filter(D=>D==="local_bash").length;return u.jsxs("div",{className:"ide-statusbar",children:[u.jsxs("div",{className:"sb-item",children:[u.jsx(Jd,{size:14})," AgentPane"]}),u.jsx("div",{className:"sb-divider",children:"|"}),u.jsx(ky,{}),S>0&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"sb-divider",children:"|"}),u.jsxs("div",{className:"sb-item",style:{color:"var(--amber)",cursor:"pointer"},title:`${S} Monitor task${S>1?"s":""} running — click to view`,onClick:()=>d("tasks"),children:[u.jsx(Wf,{size:14})," ",S]})]}),u.jsx("div",{className:"sb-spacer"}),u.jsxs("div",{className:"sb-item",title:a?"WebSocket connected":"WebSocket disconnected",children:[u.jsx("span",{className:`status-dot ${a?"done":"error"}`}),a?"Live":"Offline"]}),u.jsx("div",{className:"sb-divider",children:"|"}),u.jsxs("div",{className:"sb-item",style:i.status==="failed"?{color:"var(--red)"}:void 0,children:[u.jsx(iu,{status:h.dot})," ",h.label]}),f&&u.jsx(Ty,{usage:f}),u.jsx("div",{className:"sb-divider",children:"|"}),u.jsx("div",{className:"sb-item",children:m}),u.jsx("div",{className:"sb-divider",children:"|"}),u.jsxs("div",{className:"sb-item",children:[u.jsx(Zd,{size:14})," K"]})]})}function Ty({usage:s}){const i=s.percentage>=85?"var(--red)":s.percentage>=60?"var(--amber)":"var(--green)",l=`${zi(s.totalTokens)} / ${zi(s.contextWindow)} tokens`;return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"sb-divider",children:"|"}),u.jsx("div",{className:"sb-context",title:l,children:u.jsxs("span",{className:"sb-context-text",style:{color:i},children:[Math.round(s.percentage),"% / ",zi(s.totalTokens)," / ",zi(s.contextWindow)]})})]})}function _y({side:s,minWidth:i,maxWidth:l,getWidth:a,setWidth:d}){const[f,h]=P.useState(!1),m=P.useRef(0),y=P.useRef(0),g=P.useCallback(k=>{const A=k.clientX-m.current,D=s==="left"?y.current+A:y.current-A,N=Math.min(l,Math.max(i,D));d(N)},[s,i,l,d]),w=P.useCallback(()=>{window.removeEventListener("pointermove",g),window.removeEventListener("pointerup",w),document.body.classList.remove("is-resizing"),h(!1)},[g]);return{onPointerDown:P.useCallback(k=>{k.preventDefault(),k.stopPropagation(),m.current=k.clientX,y.current=a(),h(!0),document.body.classList.add("is-resizing"),window.addEventListener("pointermove",g),window.addEventListener("pointerup",w)},[a,g,w]),dragging:f}}function Af({side:s,minWidth:i,maxWidth:l,getWidth:a,setWidth:d}){const{onPointerDown:f,dragging:h}=_y({side:s,minWidth:i,maxWidth:l,getWidth:a,setWidth:d});return u.jsx("div",{className:`resize-handle ${s}${h?" dragging":""}`,onPointerDown:f,role:"separator","aria-orientation":"vertical","aria-label":`Resize ${s} panel`,"data-resizing":h?"":void 0})}function Ny(){const s=K(f=>f.sidebarWidth),i=K(f=>f.rightPanelWidth),l=K(f=>f.setSidebarWidth),a=K(f=>f.setRightPanelWidth),d=`${s}px 6px 1fr 6px ${i}px`;return u.jsxs("div",{className:"ide-root",children:[u.jsxs("div",{className:"ide-layout",style:{gridTemplateColumns:d},children:[u.jsx(dg,{}),u.jsx(Af,{side:"left",minWidth:Fa,maxWidth:Ua,getWidth:()=>K.getState().sidebarWidth,setWidth:l}),u.jsxs("div",{className:"ide-center",children:[u.jsx(fg,{}),u.jsx("div",{className:"ide-render",children:u.jsx(Gv,{})}),u.jsx(sy,{})]}),u.jsx(Af,{side:"right",minWidth:Ba,maxWidth:Ha,getWidth:()=>K.getState().rightPanelWidth,setWidth:a}),u.jsx(yy,{})]}),u.jsx(Sy,{})]})}function Ey(){const{showNewSessionDialog:s,setShowNewSessionDialog:i,createSession:l,lastModelConfig:a}=K(),d=(a==null?void 0:a.provider)??"codex",f=(a==null?void 0:a.model)??"",h=(a==null?void 0:a.reasoning)??"",[m,y]=P.useState(""),[g,w]=P.useState(f),[S,k]=P.useState(h),[A,D]=P.useState("");if(!s)return null;const N=ku(d),z=g?Ja(d,g):[];function H(){l({title:m.trim()||void 0,model:g||void 0,model_reasoning_effort:S||void 0,cwd:A.trim()||void 0,runtime_type:d}),y(""),D("")}function V(O){O.key==="Escape"&&i(!1)}function J(O){var oe;w(O);const ne=Ja(d,O);ne.some(ae=>ae.effort===S)||k(eu(d,O)??((oe=ne[0])==null?void 0:oe.effort)??"")}return u.jsx("div",{className:"dialog-overlay",onClick:()=>i(!1),children:u.jsxs("div",{className:"dialog",onClick:O=>O.stopPropagation(),onKeyDown:V,children:[u.jsxs("div",{className:"dialog-header",children:[u.jsx("span",{className:"dialog-title",children:"New Session"}),u.jsx("button",{className:"dialog-close",onClick:()=>i(!1),children:u.jsx(pr,{size:16})})]}),u.jsxs("div",{className:"dialog-body",children:[u.jsxs("label",{className:"dialog-label",children:["Title (optional)",u.jsx("input",{className:"dialog-input",type:"text",value:m,onChange:O=>y(O.target.value),placeholder:"e.g. refactor auth module",autoFocus:!0})]}),u.jsxs("label",{className:"dialog-label",children:["Model",u.jsxs("select",{className:"dialog-input dialog-select",value:g,onChange:O=>J(O.target.value),children:[u.jsx("option",{value:"",children:"Default (Codex picks)"}),N.map(O=>u.jsxs("option",{value:O.slug,children:[O.displayName," — ",O.description]},O.slug))]})]}),z.length>0&&u.jsxs("label",{className:"dialog-label",children:["Thinking Level",u.jsxs("select",{className:"dialog-input dialog-select",value:S,onChange:O=>k(O.target.value),children:[u.jsxs("option",{value:"",children:["Default (",eu(d,g),")"]}),z.map(O=>u.jsx("option",{value:O.effort,children:O.label},O.effort))]})]}),u.jsxs("label",{className:"dialog-label",children:["Working Directory (optional)",u.jsx("input",{className:"dialog-input",type:"text",value:A,onChange:O=>D(O.target.value),placeholder:"e.g. /Users/me/projects/my-app"})]})]}),u.jsxs("div",{className:"dialog-footer",children:[u.jsx("button",{className:"dialog-btn-cancel",onClick:()=>i(!1),children:"Cancel"}),u.jsx("button",{className:"dialog-btn-create",onClick:H,children:"Create"})]})]})})}function Cy(){const s=K(S=>S.showCommandPalette),i=K(S=>S.setShowCommandPalette),l=K(),[a,d]=P.useState(""),[f,h]=P.useState(0),m=P.useRef(null),y=P.useMemo(()=>{const S=l.activeSessionId?l.sessionDetails[l.activeSessionId]:null,k=(S==null?void 0:S.is_running)===1;return[{id:"new-session",label:"New Session",hint:"Create a new Codex session",icon:xl,action:()=>l.setShowNewSessionDialog(!0),available:!0},{id:"delete-session",label:"Delete Session",hint:"Delete the active session",icon:kl,action:()=>{l.activeSessionId&&l.deleteSession(l.activeSessionId)},available:!!l.activeSessionId},{id:"send-message",label:"Send Message",hint:"Focus the message input",icon:Wi,action:()=>{const A=document.querySelector(".cmd-input");A==null||A.focus()},available:!!l.activeSessionId&&!k},{id:"cancel-turn",label:"Cancel Turn",hint:"Cancel the running turn",icon:Vi,action:()=>l.cancelTurn(),available:k},{id:"tab-turns",label:"Switch to Turns Tab",hint:"View conversation timeline",icon:Km,action:()=>l.switchRightTab("turns"),available:!!l.activeSessionId},{id:"tab-changes",label:"Switch to Changes Tab",hint:"View file changes",icon:Um,action:()=>l.switchRightTab("changes"),available:!!l.activeSessionId},{id:"close-tab",label:"Close Tab",hint:"Close the active session tab",icon:pr,action:()=>{l.activeSessionId&&l.closeTab(l.activeSessionId)},available:!!l.activeSessionId}]},[l]),g=P.useMemo(()=>{const S=a.toLowerCase().trim(),k=y.filter(A=>A.available);return S?k.filter(A=>A.label.toLowerCase().includes(S)||A.hint.toLowerCase().includes(S)):k},[y,a]);P.useEffect(()=>{s&&(d(""),h(0),setTimeout(()=>{var S;return(S=m.current)==null?void 0:S.focus()},50))},[s]);function w(S){if(S.key==="ArrowDown")S.preventDefault(),h(k=>Math.min(k+1,g.length-1));else if(S.key==="ArrowUp")S.preventDefault(),h(k=>Math.max(k-1,0));else if(S.key==="Enter"){S.preventDefault();const k=g[f];k&&(k.action(),i(!1))}else S.key==="Escape"&&i(!1)}return s?u.jsx("div",{className:"palette-overlay",onClick:()=>i(!1),children:u.jsxs("div",{className:"palette",onClick:S=>S.stopPropagation(),children:[u.jsxs("div",{className:"palette-search",children:[u.jsx("input",{ref:m,type:"text",placeholder:"Type a command…",value:a,onChange:S=>{d(S.target.value),h(0)},onKeyDown:w}),u.jsx("span",{className:"palette-esc",children:"ESC"})]}),g.length===0?u.jsx("div",{className:"palette-empty",children:"No matching commands"}):u.jsx("div",{className:"palette-list",children:g.map((S,k)=>{const A=S.icon;return u.jsxs("div",{className:`palette-item ${k===f?"selected":""}`,onClick:()=>{S.action(),i(!1)},onMouseEnter:()=>h(k),children:[u.jsx("span",{className:"palette-item-icon",children:u.jsx(A,{size:16})}),u.jsx("span",{className:"palette-item-label",children:S.label}),u.jsx("span",{className:"palette-item-hint",children:S.hint}),k===f&&u.jsx(Fm,{size:12,className:"palette-item-enter"})]},S.id)})}),u.jsxs("div",{className:"palette-footer",children:[u.jsxs("span",{className:"palette-footer-hint",children:[u.jsx("span",{className:"kbd",children:"↑"}),u.jsx("span",{className:"kbd",children:"↓"})," Navigate"]}),u.jsxs("span",{className:"palette-footer-hint",children:[u.jsx("span",{className:"kbd",children:"↵"})," Select"]}),u.jsxs("span",{className:"palette-footer-hint",children:[u.jsx("span",{className:"kbd",children:"Esc"})," Close"]})]})]})}):null}const jy={success:Om,error:au,info:Gm,warn:ig},Ry=4e3;function Ly({toast:s}){const i=K(h=>h.removeToast),l=jy[s.type],a=P.useRef(null);P.useEffect(()=>{function h(){a.current=setTimeout(()=>i(s.id),Ry)}return h(),()=>{a.current&&clearTimeout(a.current)}},[s.id,i]);function d(){a.current&&(clearTimeout(a.current),a.current=null)}function f(){a.current=setTimeout(()=>i(s.id),2e3)}return u.jsxs("div",{className:`toast toast-${s.type}`,onMouseEnter:d,onMouseLeave:f,children:[u.jsx(l,{size:16}),u.jsx("span",{className:"toast-message",children:s.message}),s.undoAction&&u.jsxs("button",{className:"toast-undo",onClick:()=>{var h;(h=s.undoAction)==null||h.call(s),i(s.id)},children:[u.jsx(og,{size:12})," ",s.undoLabel||"Undo"]}),u.jsx("button",{className:"toast-close",onClick:()=>i(s.id),children:u.jsx(pr,{size:14})})]})}function Ay(){const s=K(i=>i.toasts);return s.length===0?null:u.jsx("div",{className:"toast-container",children:s.map(i=>u.jsx(Ly,{toast:i},i.id))})}let tn=null,Ns=null,Sl=1e3;const Iy=1e4;function Dy(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function tu(){tn&&(tn.readyState===WebSocket.OPEN||tn.readyState===WebSocket.CONNECTING)||(tn=new WebSocket(Dy()),tn.onopen=()=>{const s=Sl>1e3;if(Sl=1e3,K.getState().setWsConnected(!0),K.getState().addLogEntry("INFO","WebSocket connected"),s){const i=K.getState();i.activeSessionId&&(i.refreshActiveSession(),i.addToast("info","WebSocket reconnected — session state reconciled"))}},tn.onclose=()=>{K.getState().setWsConnected(!1),K.getState().addLogEntry("WARN","WebSocket disconnected"),K.getState().addToast("warn","WebSocket disconnected — reconnecting…"),My()},tn.onerror=()=>{},tn.onmessage=s=>{try{const i=JSON.parse(s.data),l=by[i.event];l&&l(i.data)}catch{}})}function Py(){Ns&&(clearTimeout(Ns),Ns=null),tn&&(tn.onclose=null,tn.close(),tn=null),K.getState().setWsConnected(!1)}function My(){Ns||(Ns=window.setTimeout(()=>{Ns=null,tu()},Sl),Sl=Math.min(Sl*2,Iy))}const by={"turn:started":s=>{const i=s;K.getState().onTurnStarted(i.sessionId,i.turnId)},"item:started":s=>{const i=s;K.getState().onItemStarted(i.sessionId,i.turnId,i.item)},"item:updated":s=>{const i=s;K.getState().onItemUpdated(i.sessionId,i.turnId,i.item)},"item:completed":s=>{const i=s;K.getState().onItemCompleted(i.sessionId,i.turnId,i.item)},"item:delta":s=>{const i=s;K.getState().onItemDelta(i.sessionId,i.turnId,i.itemId,i.delta)},"turn:completed":s=>{const i=s;K.getState().onTurnCompleted(i.sessionId,i.turnId,i.usage,i.hasUnreviewed,i.response??void 0)},"turn:tokenUsage":s=>{const i=s;K.getState().onTokenUsageUpdated(i.sessionId,i.turnId,i.usage)},"turn:contextUsage":s=>{const i=s,l={totalTokens:i.totalTokens,contextWindow:i.contextWindow,percentage:i.percentage};K.getState().onContextUsageUpdated(i.sessionId,l)},"turn:failed":s=>{const i=s;K.getState().onTurnFailed(i.sessionId,i.turnId,i.error)},"turn:cancelled":s=>{const i=s;K.getState().onTurnCancelled(i.sessionId,i.turnId)},"session:title":s=>{const i=s;K.getState().onSessionTitle(i.sessionId,i.title)},background_tasks:s=>{const i=s;K.getState().onBackgroundTasksChanged(i.sessionId,i.tasks)},"thread:created":s=>{const i=s;K.getState().onThreadCreated(i.sessionId,i.thread,i.turn)},"thread:followup":s=>{const i=s;K.getState().onThreadFollowup(i.sessionId,i.threadId,i.turn)},"thread:resolved":s=>{const i=s;K.getState().onThreadResolved(i.sessionId,i.threadId,i.status)},"thread:deleted":s=>{const i=s;K.getState().onThreadDeleted(i.sessionId,i.threadId)}};function zy(){const s=K(i=>i.init);return P.useEffect(()=>{s(),tu();function i(){if(document.visibilityState!=="visible")return;const l=K.getState(),a=l.activeSessionId;if(!a)return;const d=l.sessionDetails[a];l.wsConnected||tu(),d&&d.is_running===1&&(l.refreshActiveSession(),l.addLogEntry("INFO","Tab returned — reconciling session state"))}return document.addEventListener("visibilitychange",i),()=>{Py(),document.removeEventListener("visibilitychange",i)}},[s]),null}function Oy(){const s=K(d=>d.loading),i=K(d=>d.error),l=K(d=>d.sessions),a=K(d=>d.setShowCommandPalette);return P.useEffect(()=>{function d(f){(f.metaKey||f.ctrlKey)&&f.key==="k"&&(f.preventDefault(),a(!0))}return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[a]),u.jsxs(u.Fragment,{children:[u.jsx(zy,{}),s&&l.length===0?u.jsx("div",{className:"empty-state",children:"Loading sessions…"}):i&&l.length===0?u.jsxs("div",{className:"empty-state",children:["Error: ",i]}):u.jsxs(u.Fragment,{children:[u.jsx(Ny,{}),u.jsx(Ey,{}),u.jsx(Cy,{}),u.jsx(Ay,{})]})]})}Jh.createRoot(document.getElementById("root")).render(u.jsx(gl.StrictMode,{children:u.jsx(Oy,{})}));