@vibe80/vibe80 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +52 -0
  3. package/bin/vibe80.js +176 -0
  4. package/client/dist/assets/DiffPanel-C_IGzKI5.js +1 -0
  5. package/client/dist/assets/ExplorerPanel-BtlyAT00.js +11 -0
  6. package/client/dist/assets/LogsPanel-BW79JWzR.js +1 -0
  7. package/client/dist/assets/SettingsPanel-b9B7ygP_.js +1 -0
  8. package/client/dist/assets/TerminalPanel-C3fc1HbK.js +1 -0
  9. package/client/dist/assets/browser-e3WgtMs-.js +8 -0
  10. package/client/dist/assets/index-CgqGyssr.css +32 -0
  11. package/client/dist/assets/index-DnwKjoj7.js +706 -0
  12. package/client/dist/assets/vibe80_dark-D7OVPKcU.svg +51 -0
  13. package/client/dist/assets/vibe80_light-BJK37ybI.svg +50 -0
  14. package/client/dist/favicon.ico +0 -0
  15. package/client/dist/favicon.png +0 -0
  16. package/client/dist/favicon.svg +35 -0
  17. package/client/dist/index.html +14 -0
  18. package/client/index.html +16 -0
  19. package/client/package.json +34 -0
  20. package/client/public/favicon.ico +0 -0
  21. package/client/public/favicon.png +0 -0
  22. package/client/public/favicon.svg +35 -0
  23. package/client/public/pwa-192x192.png +0 -0
  24. package/client/public/pwa-512x512.png +0 -0
  25. package/client/src/App.jsx +3131 -0
  26. package/client/src/assets/logo_small.png +0 -0
  27. package/client/src/assets/vibe80_dark.svg +51 -0
  28. package/client/src/assets/vibe80_light.svg +50 -0
  29. package/client/src/components/Chat/ChatComposer.jsx +228 -0
  30. package/client/src/components/Chat/ChatMessages.jsx +811 -0
  31. package/client/src/components/Chat/ChatToolbar.jsx +109 -0
  32. package/client/src/components/Chat/useChatComposer.js +462 -0
  33. package/client/src/components/Diff/DiffPanel.jsx +129 -0
  34. package/client/src/components/Explorer/ExplorerPanel.jsx +449 -0
  35. package/client/src/components/Logs/LogsPanel.jsx +80 -0
  36. package/client/src/components/SessionGate/SessionGate.jsx +874 -0
  37. package/client/src/components/Settings/SettingsPanel.jsx +212 -0
  38. package/client/src/components/Terminal/TerminalPanel.jsx +39 -0
  39. package/client/src/components/Topbar/Topbar.jsx +101 -0
  40. package/client/src/components/WorktreeTabs.css +419 -0
  41. package/client/src/components/WorktreeTabs.jsx +604 -0
  42. package/client/src/hooks/useAttachments.jsx +125 -0
  43. package/client/src/hooks/useBacklog.js +254 -0
  44. package/client/src/hooks/useChatClear.js +90 -0
  45. package/client/src/hooks/useChatCollapse.js +42 -0
  46. package/client/src/hooks/useChatCommands.js +294 -0
  47. package/client/src/hooks/useChatExport.js +144 -0
  48. package/client/src/hooks/useChatMessagesState.js +69 -0
  49. package/client/src/hooks/useChatSend.js +158 -0
  50. package/client/src/hooks/useChatSocket.js +1239 -0
  51. package/client/src/hooks/useDiffNavigation.js +19 -0
  52. package/client/src/hooks/useExplorerActions.js +1184 -0
  53. package/client/src/hooks/useGitIdentity.js +114 -0
  54. package/client/src/hooks/useLayoutMode.js +31 -0
  55. package/client/src/hooks/useLocalPreferences.js +131 -0
  56. package/client/src/hooks/useMessageSync.js +30 -0
  57. package/client/src/hooks/useNotifications.js +132 -0
  58. package/client/src/hooks/usePaneNavigation.js +67 -0
  59. package/client/src/hooks/usePanelState.js +13 -0
  60. package/client/src/hooks/useProviderSelection.js +70 -0
  61. package/client/src/hooks/useRepoBranchesModels.js +218 -0
  62. package/client/src/hooks/useRepoStatus.js +350 -0
  63. package/client/src/hooks/useRpcLogActions.js +19 -0
  64. package/client/src/hooks/useRpcLogView.js +58 -0
  65. package/client/src/hooks/useSessionHandoff.js +97 -0
  66. package/client/src/hooks/useSessionLifecycle.js +287 -0
  67. package/client/src/hooks/useSessionReset.js +63 -0
  68. package/client/src/hooks/useSessionResync.js +77 -0
  69. package/client/src/hooks/useTerminalSession.js +328 -0
  70. package/client/src/hooks/useToolbarExport.js +27 -0
  71. package/client/src/hooks/useTurnInterrupt.js +43 -0
  72. package/client/src/hooks/useVibe80Forms.js +128 -0
  73. package/client/src/hooks/useWorkspaceAuth.js +932 -0
  74. package/client/src/hooks/useWorktreeCloseConfirm.js +46 -0
  75. package/client/src/hooks/useWorktrees.js +396 -0
  76. package/client/src/i18n.jsx +87 -0
  77. package/client/src/index.css +5147 -0
  78. package/client/src/locales/en.json +37 -0
  79. package/client/src/locales/fr.json +321 -0
  80. package/client/src/main.jsx +16 -0
  81. package/client/vite.config.js +62 -0
  82. package/docs/api/asyncapi.json +1511 -0
  83. package/docs/api/openapi.json +3242 -0
  84. package/git_hooks/prepare-commit-msg +35 -0
  85. package/package.json +36 -0
  86. package/server/package.json +29 -0
  87. package/server/scripts/rotate-workspace-secret.js +101 -0
  88. package/server/src/claudeClient.js +454 -0
  89. package/server/src/clientEvents.js +594 -0
  90. package/server/src/clientFactory.js +164 -0
  91. package/server/src/codexClient.js +468 -0
  92. package/server/src/config.js +27 -0
  93. package/server/src/helpers.js +138 -0
  94. package/server/src/index.js +1641 -0
  95. package/server/src/middleware/auth.js +93 -0
  96. package/server/src/middleware/debug.js +89 -0
  97. package/server/src/middleware/errorTypes.js +60 -0
  98. package/server/src/providerLogger.js +60 -0
  99. package/server/src/routes/files.js +114 -0
  100. package/server/src/routes/git.js +183 -0
  101. package/server/src/routes/health.js +13 -0
  102. package/server/src/routes/sessions.js +407 -0
  103. package/server/src/routes/workspaces.js +296 -0
  104. package/server/src/routes/worktrees.js +993 -0
  105. package/server/src/runAs.js +458 -0
  106. package/server/src/runtimeStore.js +32 -0
  107. package/server/src/services/auth.js +157 -0
  108. package/server/src/services/claudeThreadDirectory.js +33 -0
  109. package/server/src/services/session.js +918 -0
  110. package/server/src/services/workspace.js +858 -0
  111. package/server/src/storage/index.js +17 -0
  112. package/server/src/storage/redis.js +412 -0
  113. package/server/src/storage/sqlite.js +649 -0
  114. package/server/src/worktreeManager.js +717 -0
  115. package/server/tests/README.md +13 -0
  116. package/server/tests/factories/workspaceFactory.js +13 -0
  117. package/server/tests/fixtures/workspaceCredentials.json +4 -0
  118. package/server/tests/integration/routes/workspaces-routes.test.js +626 -0
  119. package/server/tests/setup/env.js +9 -0
  120. package/server/tests/unit/helpers.test.js +95 -0
  121. package/server/tests/unit/services/auth.test.js +181 -0
  122. package/server/tests/unit/services/workspace.test.js +115 -0
  123. package/server/vitest.config.js +23 -0
@@ -0,0 +1,706 @@
1
+ function sE(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var jl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $0={exports:{}},wc={},H0={exports:{}},Be={};/**
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 Go=Symbol.for("react.element"),oE=Symbol.for("react.portal"),aE=Symbol.for("react.fragment"),lE=Symbol.for("react.strict_mode"),cE=Symbol.for("react.profiler"),uE=Symbol.for("react.provider"),fE=Symbol.for("react.context"),hE=Symbol.for("react.forward_ref"),dE=Symbol.for("react.suspense"),pE=Symbol.for("react.memo"),mE=Symbol.for("react.lazy"),lg=Symbol.iterator;function gE(e){return e===null||typeof e!="object"?null:(e=lg&&e[lg]||e["@@iterator"],typeof e=="function"?e:null)}var U0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},W0=Object.assign,V0={};function _s(e,t,r){this.props=e,this.context=t,this.refs=V0,this.updater=r||U0}_s.prototype.isReactComponent={};_s.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};_s.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function K0(){}K0.prototype=_s.prototype;function vd(e,t,r){this.props=e,this.context=t,this.refs=V0,this.updater=r||U0}var _d=vd.prototype=new K0;_d.constructor=vd;W0(_d,_s.prototype);_d.isPureReactComponent=!0;var cg=Array.isArray,G0=Object.prototype.hasOwnProperty,yd={current:null},q0={key:!0,ref:!0,__self:!0,__source:!0};function Y0(e,t,r){var n,i={},s=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(s=""+t.key),t)G0.call(t,n)&&!q0.hasOwnProperty(n)&&(i[n]=t[n]);var o=arguments.length-2;if(o===1)i.children=r;else if(1<o){for(var l=Array(o),c=0;c<o;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(n in o=e.defaultProps,o)i[n]===void 0&&(i[n]=o[n]);return{$$typeof:Go,type:e,key:s,ref:a,props:i,_owner:yd.current}}function vE(e,t){return{$$typeof:Go,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function wd(e){return typeof e=="object"&&e!==null&&e.$$typeof===Go}function _E(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var ug=/\/+/g;function xu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?_E(""+e.key):t.toString(36)}function dl(e,t,r,n,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Go:case oE:a=!0}}if(a)return a=e,i=i(a),e=n===""?"."+xu(a,0):n,cg(i)?(r="",e!=null&&(r=e.replace(ug,"$&/")+"/"),dl(i,t,r,"",function(c){return c})):i!=null&&(wd(i)&&(i=vE(i,r+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(ug,"$&/")+"/")+e)),t.push(i)),1;if(a=0,n=n===""?".":n+":",cg(e))for(var o=0;o<e.length;o++){s=e[o];var l=n+xu(s,o);a+=dl(s,t,r,l,i)}else if(l=gE(e),typeof l=="function")for(e=l.call(e),o=0;!(s=e.next()).done;)s=s.value,l=n+xu(s,o++),a+=dl(s,t,r,l,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Da(e,t,r){if(e==null)return e;var n=[],i=0;return dl(e,n,"","",function(s){return t.call(r,s,i++)}),n}function yE(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ft={current:null},pl={transition:null},wE={ReactCurrentDispatcher:Ft,ReactCurrentBatchConfig:pl,ReactCurrentOwner:yd};function J0(){throw Error("act(...) is not supported in production builds of React.")}Be.Children={map:Da,forEach:function(e,t,r){Da(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Da(e,function(){t++}),t},toArray:function(e){return Da(e,function(t){return t})||[]},only:function(e){if(!wd(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Be.Component=_s;Be.Fragment=aE;Be.Profiler=cE;Be.PureComponent=vd;Be.StrictMode=lE;Be.Suspense=dE;Be.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=wE;Be.act=J0;Be.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=W0({},e.props),i=e.key,s=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,a=yd.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(l in t)G0.call(t,l)&&!q0.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&o!==void 0?o[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){o=Array(l);for(var c=0;c<l;c++)o[c]=arguments[c+2];n.children=o}return{$$typeof:Go,type:e.type,key:i,ref:s,props:n,_owner:a}};Be.createContext=function(e){return e={$$typeof:fE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:uE,_context:e},e.Consumer=e};Be.createElement=Y0;Be.createFactory=function(e){var t=Y0.bind(null,e);return t.type=e,t};Be.createRef=function(){return{current:null}};Be.forwardRef=function(e){return{$$typeof:hE,render:e}};Be.isValidElement=wd;Be.lazy=function(e){return{$$typeof:mE,_payload:{_status:-1,_result:e},_init:yE}};Be.memo=function(e,t){return{$$typeof:pE,type:e,compare:t===void 0?null:t}};Be.startTransition=function(e){var t=pl.transition;pl.transition={};try{e()}finally{pl.transition=t}};Be.unstable_act=J0;Be.useCallback=function(e,t){return Ft.current.useCallback(e,t)};Be.useContext=function(e){return Ft.current.useContext(e)};Be.useDebugValue=function(){};Be.useDeferredValue=function(e){return Ft.current.useDeferredValue(e)};Be.useEffect=function(e,t){return Ft.current.useEffect(e,t)};Be.useId=function(){return Ft.current.useId()};Be.useImperativeHandle=function(e,t,r){return Ft.current.useImperativeHandle(e,t,r)};Be.useInsertionEffect=function(e,t){return Ft.current.useInsertionEffect(e,t)};Be.useLayoutEffect=function(e,t){return Ft.current.useLayoutEffect(e,t)};Be.useMemo=function(e,t){return Ft.current.useMemo(e,t)};Be.useReducer=function(e,t,r){return Ft.current.useReducer(e,t,r)};Be.useRef=function(e){return Ft.current.useRef(e)};Be.useState=function(e){return Ft.current.useState(e)};Be.useSyncExternalStore=function(e,t,r){return Ft.current.useSyncExternalStore(e,t,r)};Be.useTransition=function(){return Ft.current.useTransition()};Be.version="18.3.1";H0.exports=Be;var k=H0.exports;const bc=yc(k),bd=sE({__proto__:null,default:bc},[k]);/**
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 bE=k,SE=Symbol.for("react.element"),CE=Symbol.for("react.fragment"),kE=Object.prototype.hasOwnProperty,xE=bE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,EE={key:!0,ref:!0,__self:!0,__source:!0};function X0(e,t,r){var n,i={},s=null,a=null;r!==void 0&&(s=""+r),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)kE.call(t,n)&&!EE.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:SE,type:e,key:s,ref:a,props:i,_owner:xE.current}}wc.Fragment=CE;wc.jsx=X0;wc.jsxs=X0;$0.exports=wc;var E=$0.exports,Q0={exports:{}},ir={},Z0={exports:{}},e1={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */(function(e){function t(V,N){var P=V.length;V.push(N);e:for(;0<P;){var R=P-1>>>1,I=V[R];if(0<i(I,N))V[R]=N,V[P]=I,P=R;else break e}}function r(V){return V.length===0?null:V[0]}function n(V){if(V.length===0)return null;var N=V[0],P=V.pop();if(P!==N){V[0]=P;e:for(var R=0,I=V.length,L=I>>>1;R<L;){var W=2*(R+1)-1,J=V[W],G=W+1,B=V[G];if(0>i(J,P))G<I&&0>i(B,J)?(V[R]=B,V[G]=P,R=G):(V[R]=J,V[W]=P,R=W);else if(G<I&&0>i(B,P))V[R]=B,V[G]=P,R=G;else break e}}return N}function i(V,N){var P=V.sortIndex-N.sortIndex;return P!==0?P:V.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var l=[],c=[],h=1,u=null,m=3,g=!1,y=!1,_=!1,v=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(V){for(var N=r(c);N!==null;){if(N.callback===null)n(c);else if(N.startTime<=V)n(c),N.sortIndex=N.expirationTime,t(l,N);else break;N=r(c)}}function w(V){if(_=!1,p(V),!y)if(r(l)!==null)y=!0,Y(S);else{var N=r(c);N!==null&&X(w,N.startTime-V)}}function S(V,N){y=!1,_&&(_=!1,d(C),C=-1),g=!0;var P=m;try{for(p(N),u=r(l);u!==null&&(!(u.expirationTime>N)||V&&!j());){var R=u.callback;if(typeof R=="function"){u.callback=null,m=u.priorityLevel;var I=R(u.expirationTime<=N);N=e.unstable_now(),typeof I=="function"?u.callback=I:u===r(l)&&n(l),p(N)}else n(l);u=r(l)}if(u!==null)var L=!0;else{var W=r(c);W!==null&&X(w,W.startTime-N),L=!1}return L}finally{u=null,m=P,g=!1}}var b=!1,x=null,C=-1,A=5,T=-1;function j(){return!(e.unstable_now()-T<A)}function M(){if(x!==null){var V=e.unstable_now();T=V;var N=!0;try{N=x(!0,V)}finally{N?O():(b=!1,x=null)}}else b=!1}var O;if(typeof f=="function")O=function(){f(M)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,$=z.port2;z.port1.onmessage=M,O=function(){$.postMessage(null)}}else O=function(){v(M,0)};function Y(V){x=V,b||(b=!0,O())}function X(V,N){C=v(function(){V(e.unstable_now())},N)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(V){V.callback=null},e.unstable_continueExecution=function(){y||g||(y=!0,Y(S))},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(V){switch(m){case 1:case 2:case 3:var N=3;break;default:N=m}var P=m;m=N;try{return V()}finally{m=P}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(V,N){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var P=m;m=V;try{return N()}finally{m=P}},e.unstable_scheduleCallback=function(V,N,P){var R=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?R+P:R):P=R,V){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=P+I,V={id:h++,callback:N,priorityLevel:V,startTime:P,expirationTime:I,sortIndex:-1},P>R?(V.sortIndex=P,t(c,V),r(l)===null&&V===r(c)&&(_?(d(C),C=-1):_=!0,X(w,P-R))):(V.sortIndex=I,t(l,V),y||g||(y=!0,Y(S))),V},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(V){var N=m;return function(){var P=m;m=N;try{return V.apply(this,arguments)}finally{m=P}}}})(e1);Z0.exports=e1;var AE=Z0.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 LE=k,nr=AE;function fe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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 t1=new Set,yo={};function vi(e,t){as(e,t),as(e+"Capture",t)}function as(e,t){for(yo[e]=t,e=0;e<t.length;e++)t1.add(t[e])}var Xr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jf=Object.prototype.hasOwnProperty,PE=/^[: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]*$/,fg={},hg={};function TE(e){return jf.call(hg,e)?!0:jf.call(fg,e)?!1:PE.test(e)?hg[e]=!0:(fg[e]=!0,!1)}function DE(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function IE(e,t,r,n){if(t===null||typeof t>"u"||DE(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.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 zt(e,t,r,n,i,s,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=a}var Et={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Et[e]=new zt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Et[t]=new zt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Et[e]=new zt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Et[e]=new zt(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){Et[e]=new zt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Et[e]=new zt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Et[e]=new zt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Et[e]=new zt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Et[e]=new zt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Sd=/[\-:]([a-z])/g;function Cd(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(Sd,Cd);Et[t]=new zt(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(Sd,Cd);Et[t]=new zt(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(Sd,Cd);Et[t]=new zt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Et[e]=new zt(e,1,!1,e.toLowerCase(),null,!1,!1)});Et.xlinkHref=new zt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Et[e]=new zt(e,1,!1,e.toLowerCase(),null,!0,!0)});function kd(e,t,r,n){var i=Et.hasOwnProperty(t)?Et[t]:null;(i!==null?i.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(IE(t,r,i,n)&&(r=null),n||i===null?TE(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=r===null?i.type===3?!1:"":r:(t=i.attributeName,n=i.attributeNamespace,r===null?e.removeAttribute(t):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var sn=LE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ia=Symbol.for("react.element"),Fi=Symbol.for("react.portal"),zi=Symbol.for("react.fragment"),xd=Symbol.for("react.strict_mode"),Bf=Symbol.for("react.profiler"),r1=Symbol.for("react.provider"),n1=Symbol.for("react.context"),Ed=Symbol.for("react.forward_ref"),Ff=Symbol.for("react.suspense"),zf=Symbol.for("react.suspense_list"),Ad=Symbol.for("react.memo"),vn=Symbol.for("react.lazy"),i1=Symbol.for("react.offscreen"),dg=Symbol.iterator;function Bs(e){return e===null||typeof e!="object"?null:(e=dg&&e[dg]||e["@@iterator"],typeof e=="function"?e:null)}var ct=Object.assign,Eu;function Xs(e){if(Eu===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Eu=t&&t[1]||""}return`
34
+ `+Eu+e}var Au=!1;function Lu(e,t){if(!e||Au)return"";Au=!0;var r=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(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var i=c.stack.split(`
35
+ `),s=n.stack.split(`
36
+ `),a=i.length-1,o=s.length-1;1<=a&&0<=o&&i[a]!==s[o];)o--;for(;1<=a&&0<=o;a--,o--)if(i[a]!==s[o]){if(a!==1||o!==1)do if(a--,o--,0>o||i[a]!==s[o]){var l=`
37
+ `+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=o);break}}}finally{Au=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Xs(e):""}function NE(e){switch(e.tag){case 5:return Xs(e.type);case 16:return Xs("Lazy");case 13:return Xs("Suspense");case 19:return Xs("SuspenseList");case 0:case 2:case 15:return e=Lu(e.type,!1),e;case 11:return e=Lu(e.type.render,!1),e;case 1:return e=Lu(e.type,!0),e;default:return""}}function $f(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 zi:return"Fragment";case Fi:return"Portal";case Bf:return"Profiler";case xd:return"StrictMode";case Ff:return"Suspense";case zf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case n1:return(e.displayName||"Context")+".Consumer";case r1:return(e._context.displayName||"Context")+".Provider";case Ed:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ad:return t=e.displayName||null,t!==null?t:$f(e.type)||"Memo";case vn:t=e._payload,e=e._init;try{return $f(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 $f(t);case 8:return t===xd?"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 Rn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function s1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function OE(e){var t=s1(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,s.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Na(e){e._valueTracker||(e._valueTracker=OE(e))}function o1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=s1(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Bl(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 Hf(e,t){var r=t.checked;return ct({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function pg(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Rn(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function a1(e,t){t=t.checked,t!=null&&kd(e,"checked",t,!1)}function Uf(e,t){a1(e,t);var r=Rn(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Wf(e,t.type,r):t.hasOwnProperty("defaultValue")&&Wf(e,t.type,Rn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function mg(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Wf(e,t,r){(t!=="number"||Bl(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Qs=Array.isArray;function Qi(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Rn(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Vf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(fe(91));return ct({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function gg(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(fe(92));if(Qs(r)){if(1<r.length)throw Error(fe(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Rn(r)}}function l1(e,t){var r=Rn(t.value),n=Rn(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function vg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function c1(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 Kf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?c1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ra,u1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,i){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ra=Ra||document.createElement("div"),Ra.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ra.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function wo(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var no={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},ME=["Webkit","ms","Moz","O"];Object.keys(no).forEach(function(e){ME.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),no[t]=no[e]})});function f1(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||no.hasOwnProperty(e)&&no[e]?(""+t).trim():t+"px"}function h1(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=f1(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var jE=ct({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 Gf(e,t){if(t){if(jE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(fe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(fe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(fe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(fe(62))}}function qf(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 Yf=null;function Ld(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jf=null,Zi=null,es=null;function _g(e){if(e=Jo(e)){if(typeof Jf!="function")throw Error(fe(280));var t=e.stateNode;t&&(t=Ec(t),Jf(e.stateNode,e.type,t))}}function d1(e){Zi?es?es.push(e):es=[e]:Zi=e}function p1(){if(Zi){var e=Zi,t=es;if(es=Zi=null,_g(e),t)for(e=0;e<t.length;e++)_g(t[e])}}function m1(e,t){return e(t)}function g1(){}var Pu=!1;function v1(e,t,r){if(Pu)return e(t,r);Pu=!0;try{return m1(e,t,r)}finally{Pu=!1,(Zi!==null||es!==null)&&(g1(),p1())}}function bo(e,t){var r=e.stateNode;if(r===null)return null;var n=Ec(r);if(n===null)return null;r=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(fe(231,t,typeof r));return r}var Xf=!1;if(Xr)try{var Fs={};Object.defineProperty(Fs,"passive",{get:function(){Xf=!0}}),window.addEventListener("test",Fs,Fs),window.removeEventListener("test",Fs,Fs)}catch{Xf=!1}function BE(e,t,r,n,i,s,a,o,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(h){this.onError(h)}}var io=!1,Fl=null,zl=!1,Qf=null,FE={onError:function(e){io=!0,Fl=e}};function zE(e,t,r,n,i,s,a,o,l){io=!1,Fl=null,BE.apply(FE,arguments)}function $E(e,t,r,n,i,s,a,o,l){if(zE.apply(this,arguments),io){if(io){var c=Fl;io=!1,Fl=null}else throw Error(fe(198));zl||(zl=!0,Qf=c)}}function _i(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function _1(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 yg(e){if(_i(e)!==e)throw Error(fe(188))}function HE(e){var t=e.alternate;if(!t){if(t=_i(e),t===null)throw Error(fe(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(i===null)break;var s=i.alternate;if(s===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===r)return yg(i),e;if(s===n)return yg(i),t;s=s.sibling}throw Error(fe(188))}if(r.return!==n.return)r=i,n=s;else{for(var a=!1,o=i.child;o;){if(o===r){a=!0,r=i,n=s;break}if(o===n){a=!0,n=i,r=s;break}o=o.sibling}if(!a){for(o=s.child;o;){if(o===r){a=!0,r=s,n=i;break}if(o===n){a=!0,n=s,r=i;break}o=o.sibling}if(!a)throw Error(fe(189))}}if(r.alternate!==n)throw Error(fe(190))}if(r.tag!==3)throw Error(fe(188));return r.stateNode.current===r?e:t}function y1(e){return e=HE(e),e!==null?w1(e):null}function w1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=w1(e);if(t!==null)return t;e=e.sibling}return null}var b1=nr.unstable_scheduleCallback,wg=nr.unstable_cancelCallback,UE=nr.unstable_shouldYield,WE=nr.unstable_requestPaint,ht=nr.unstable_now,VE=nr.unstable_getCurrentPriorityLevel,Pd=nr.unstable_ImmediatePriority,S1=nr.unstable_UserBlockingPriority,$l=nr.unstable_NormalPriority,KE=nr.unstable_LowPriority,C1=nr.unstable_IdlePriority,Sc=null,Mr=null;function GE(e){if(Mr&&typeof Mr.onCommitFiberRoot=="function")try{Mr.onCommitFiberRoot(Sc,e,void 0,(e.current.flags&128)===128)}catch{}}var br=Math.clz32?Math.clz32:JE,qE=Math.log,YE=Math.LN2;function JE(e){return e>>>=0,e===0?32:31-(qE(e)/YE|0)|0}var Oa=64,Ma=4194304;function Zs(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 Hl(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,s=e.pingedLanes,a=r&268435455;if(a!==0){var o=a&~i;o!==0?n=Zs(o):(s&=a,s!==0&&(n=Zs(s)))}else a=r&~i,a!==0?n=Zs(a):s!==0&&(n=Zs(s));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-br(t),i=1<<r,n|=e[r],t&=~i;return n}function XE(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 QE(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-br(s),o=1<<a,l=i[a];l===-1?(!(o&r)||o&n)&&(i[a]=XE(o,t)):l<=t&&(e.expiredLanes|=o),s&=~o}}function Zf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function k1(){var e=Oa;return Oa<<=1,!(Oa&4194240)&&(Oa=64),e}function Tu(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function qo(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-br(t),e[t]=r}function ZE(e,t){var r=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 n=e.eventTimes;for(e=e.expirationTimes;0<r;){var i=31-br(r),s=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~s}}function Td(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-br(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var Je=0;function x1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var E1,Dd,A1,L1,P1,eh=!1,ja=[],Cn=null,kn=null,xn=null,So=new Map,Co=new Map,yn=[],e3="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 bg(e,t){switch(e){case"focusin":case"focusout":Cn=null;break;case"dragenter":case"dragleave":kn=null;break;case"mouseover":case"mouseout":xn=null;break;case"pointerover":case"pointerout":So.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Co.delete(t.pointerId)}}function zs(e,t,r,n,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Jo(t),t!==null&&Dd(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function t3(e,t,r,n,i){switch(t){case"focusin":return Cn=zs(Cn,e,t,r,n,i),!0;case"dragenter":return kn=zs(kn,e,t,r,n,i),!0;case"mouseover":return xn=zs(xn,e,t,r,n,i),!0;case"pointerover":var s=i.pointerId;return So.set(s,zs(So.get(s)||null,e,t,r,n,i)),!0;case"gotpointercapture":return s=i.pointerId,Co.set(s,zs(Co.get(s)||null,e,t,r,n,i)),!0}return!1}function T1(e){var t=ei(e.target);if(t!==null){var r=_i(t);if(r!==null){if(t=r.tag,t===13){if(t=_1(r),t!==null){e.blockedOn=t,P1(e.priority,function(){A1(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ml(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=th(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Yf=n,r.target.dispatchEvent(n),Yf=null}else return t=Jo(r),t!==null&&Dd(t),e.blockedOn=r,!1;t.shift()}return!0}function Sg(e,t,r){ml(e)&&r.delete(t)}function r3(){eh=!1,Cn!==null&&ml(Cn)&&(Cn=null),kn!==null&&ml(kn)&&(kn=null),xn!==null&&ml(xn)&&(xn=null),So.forEach(Sg),Co.forEach(Sg)}function $s(e,t){e.blockedOn===t&&(e.blockedOn=null,eh||(eh=!0,nr.unstable_scheduleCallback(nr.unstable_NormalPriority,r3)))}function ko(e){function t(i){return $s(i,e)}if(0<ja.length){$s(ja[0],e);for(var r=1;r<ja.length;r++){var n=ja[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Cn!==null&&$s(Cn,e),kn!==null&&$s(kn,e),xn!==null&&$s(xn,e),So.forEach(t),Co.forEach(t),r=0;r<yn.length;r++)n=yn[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<yn.length&&(r=yn[0],r.blockedOn===null);)T1(r),r.blockedOn===null&&yn.shift()}var ts=sn.ReactCurrentBatchConfig,Ul=!0;function n3(e,t,r,n){var i=Je,s=ts.transition;ts.transition=null;try{Je=1,Id(e,t,r,n)}finally{Je=i,ts.transition=s}}function i3(e,t,r,n){var i=Je,s=ts.transition;ts.transition=null;try{Je=4,Id(e,t,r,n)}finally{Je=i,ts.transition=s}}function Id(e,t,r,n){if(Ul){var i=th(e,t,r,n);if(i===null)zu(e,t,n,Wl,r),bg(e,n);else if(t3(i,e,t,r,n))n.stopPropagation();else if(bg(e,n),t&4&&-1<e3.indexOf(e)){for(;i!==null;){var s=Jo(i);if(s!==null&&E1(s),s=th(e,t,r,n),s===null&&zu(e,t,n,Wl,r),s===i)break;i=s}i!==null&&n.stopPropagation()}else zu(e,t,n,null,r)}}var Wl=null;function th(e,t,r,n){if(Wl=null,e=Ld(n),e=ei(e),e!==null)if(t=_i(e),t===null)e=null;else if(r=t.tag,r===13){if(e=_1(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Wl=e,null}function D1(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(VE()){case Pd:return 1;case S1:return 4;case $l:case KE:return 16;case C1:return 536870912;default:return 16}default:return 16}}var bn=null,Nd=null,gl=null;function I1(){if(gl)return gl;var e,t=Nd,r=t.length,n,i="value"in bn?bn.value:bn.textContent,s=i.length;for(e=0;e<r&&t[e]===i[e];e++);var a=r-e;for(n=1;n<=a&&t[r-n]===i[s-n];n++);return gl=i.slice(e,1<n?1-n:void 0)}function vl(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 Ba(){return!0}function Cg(){return!1}function sr(e){function t(r,n,i,s,a){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(r=e[o],this[o]=r?r(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Ba:Cg,this.isPropagationStopped=Cg,this}return ct(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Ba)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ba)},persist:function(){},isPersistent:Ba}),t}var ys={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rd=sr(ys),Yo=ct({},ys,{view:0,detail:0}),s3=sr(Yo),Du,Iu,Hs,Cc=ct({},Yo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Od,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!==Hs&&(Hs&&e.type==="mousemove"?(Du=e.screenX-Hs.screenX,Iu=e.screenY-Hs.screenY):Iu=Du=0,Hs=e),Du)},movementY:function(e){return"movementY"in e?e.movementY:Iu}}),kg=sr(Cc),o3=ct({},Cc,{dataTransfer:0}),a3=sr(o3),l3=ct({},Yo,{relatedTarget:0}),Nu=sr(l3),c3=ct({},ys,{animationName:0,elapsedTime:0,pseudoElement:0}),u3=sr(c3),f3=ct({},ys,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),h3=sr(f3),d3=ct({},ys,{data:0}),xg=sr(d3),p3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},m3={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"},g3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function v3(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=g3[e])?!!t[e]:!1}function Od(){return v3}var _3=ct({},Yo,{key:function(e){if(e.key){var t=p3[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=vl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?m3[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Od,charCode:function(e){return e.type==="keypress"?vl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?vl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),y3=sr(_3),w3=ct({},Cc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Eg=sr(w3),b3=ct({},Yo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Od}),S3=sr(b3),C3=ct({},ys,{propertyName:0,elapsedTime:0,pseudoElement:0}),k3=sr(C3),x3=ct({},Cc,{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}),E3=sr(x3),A3=[9,13,27,32],Md=Xr&&"CompositionEvent"in window,so=null;Xr&&"documentMode"in document&&(so=document.documentMode);var L3=Xr&&"TextEvent"in window&&!so,N1=Xr&&(!Md||so&&8<so&&11>=so),Ag=" ",Lg=!1;function R1(e,t){switch(e){case"keyup":return A3.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function O1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $i=!1;function P3(e,t){switch(e){case"compositionend":return O1(t);case"keypress":return t.which!==32?null:(Lg=!0,Ag);case"textInput":return e=t.data,e===Ag&&Lg?null:e;default:return null}}function T3(e,t){if($i)return e==="compositionend"||!Md&&R1(e,t)?(e=I1(),gl=Nd=bn=null,$i=!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 N1&&t.locale!=="ko"?null:t.data;default:return null}}var D3={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 Pg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!D3[e.type]:t==="textarea"}function M1(e,t,r,n){d1(n),t=Vl(t,"onChange"),0<t.length&&(r=new Rd("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var oo=null,xo=null;function I3(e){G1(e,0)}function kc(e){var t=Wi(e);if(o1(t))return e}function N3(e,t){if(e==="change")return t}var j1=!1;if(Xr){var Ru;if(Xr){var Ou="oninput"in document;if(!Ou){var Tg=document.createElement("div");Tg.setAttribute("oninput","return;"),Ou=typeof Tg.oninput=="function"}Ru=Ou}else Ru=!1;j1=Ru&&(!document.documentMode||9<document.documentMode)}function Dg(){oo&&(oo.detachEvent("onpropertychange",B1),xo=oo=null)}function B1(e){if(e.propertyName==="value"&&kc(xo)){var t=[];M1(t,xo,e,Ld(e)),v1(I3,t)}}function R3(e,t,r){e==="focusin"?(Dg(),oo=t,xo=r,oo.attachEvent("onpropertychange",B1)):e==="focusout"&&Dg()}function O3(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return kc(xo)}function M3(e,t){if(e==="click")return kc(t)}function j3(e,t){if(e==="input"||e==="change")return kc(t)}function B3(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kr=typeof Object.is=="function"?Object.is:B3;function Eo(e,t){if(kr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!jf.call(t,i)||!kr(e[i],t[i]))return!1}return!0}function Ig(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ng(e,t){var r=Ig(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Ig(r)}}function F1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?F1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function z1(){for(var e=window,t=Bl();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Bl(e.document)}return t}function jd(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 F3(e){var t=z1(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&F1(r.ownerDocument.documentElement,r)){if(n!==null&&jd(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!e.extend&&s>n&&(i=n,n=s,s=i),i=Ng(r,s);var a=Ng(r,n);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var z3=Xr&&"documentMode"in document&&11>=document.documentMode,Hi=null,rh=null,ao=null,nh=!1;function Rg(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;nh||Hi==null||Hi!==Bl(n)||(n=Hi,"selectionStart"in n&&jd(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),ao&&Eo(ao,n)||(ao=n,n=Vl(rh,"onSelect"),0<n.length&&(t=new Rd("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Hi)))}function Fa(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Ui={animationend:Fa("Animation","AnimationEnd"),animationiteration:Fa("Animation","AnimationIteration"),animationstart:Fa("Animation","AnimationStart"),transitionend:Fa("Transition","TransitionEnd")},Mu={},$1={};Xr&&($1=document.createElement("div").style,"AnimationEvent"in window||(delete Ui.animationend.animation,delete Ui.animationiteration.animation,delete Ui.animationstart.animation),"TransitionEvent"in window||delete Ui.transitionend.transition);function xc(e){if(Mu[e])return Mu[e];if(!Ui[e])return e;var t=Ui[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in $1)return Mu[e]=t[r];return e}var H1=xc("animationend"),U1=xc("animationiteration"),W1=xc("animationstart"),V1=xc("transitionend"),K1=new Map,Og="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 $n(e,t){K1.set(e,t),vi(t,[e])}for(var ju=0;ju<Og.length;ju++){var Bu=Og[ju],$3=Bu.toLowerCase(),H3=Bu[0].toUpperCase()+Bu.slice(1);$n($3,"on"+H3)}$n(H1,"onAnimationEnd");$n(U1,"onAnimationIteration");$n(W1,"onAnimationStart");$n("dblclick","onDoubleClick");$n("focusin","onFocus");$n("focusout","onBlur");$n(V1,"onTransitionEnd");as("onMouseEnter",["mouseout","mouseover"]);as("onMouseLeave",["mouseout","mouseover"]);as("onPointerEnter",["pointerout","pointerover"]);as("onPointerLeave",["pointerout","pointerover"]);vi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));vi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));vi("onBeforeInput",["compositionend","keypress","textInput","paste"]);vi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));vi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));vi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var eo="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(" "),U3=new Set("cancel close invalid load scroll toggle".split(" ").concat(eo));function Mg(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,$E(n,t,void 0,e),e.currentTarget=null}function G1(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var s=void 0;if(t)for(var a=n.length-1;0<=a;a--){var o=n[a],l=o.instance,c=o.currentTarget;if(o=o.listener,l!==s&&i.isPropagationStopped())break e;Mg(i,o,c),s=l}else for(a=0;a<n.length;a++){if(o=n[a],l=o.instance,c=o.currentTarget,o=o.listener,l!==s&&i.isPropagationStopped())break e;Mg(i,o,c),s=l}}}if(zl)throw e=Qf,zl=!1,Qf=null,e}function tt(e,t){var r=t[lh];r===void 0&&(r=t[lh]=new Set);var n=e+"__bubble";r.has(n)||(q1(t,e,2,!1),r.add(n))}function Fu(e,t,r){var n=0;t&&(n|=4),q1(r,e,n,t)}var za="_reactListening"+Math.random().toString(36).slice(2);function Ao(e){if(!e[za]){e[za]=!0,t1.forEach(function(r){r!=="selectionchange"&&(U3.has(r)||Fu(r,!1,e),Fu(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[za]||(t[za]=!0,Fu("selectionchange",!1,t))}}function q1(e,t,r,n){switch(D1(t)){case 1:var i=n3;break;case 4:i=i3;break;default:i=Id}r=i.bind(null,t,r,e),i=void 0,!Xf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):i!==void 0?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function zu(e,t,r,n,i){var s=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var o=n.stateNode.containerInfo;if(o===i||o.nodeType===8&&o.parentNode===i)break;if(a===4)for(a=n.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;o!==null;){if(a=ei(o),a===null)return;if(l=a.tag,l===5||l===6){n=s=a;continue e}o=o.parentNode}}n=n.return}v1(function(){var c=s,h=Ld(r),u=[];e:{var m=K1.get(e);if(m!==void 0){var g=Rd,y=e;switch(e){case"keypress":if(vl(r)===0)break e;case"keydown":case"keyup":g=y3;break;case"focusin":y="focus",g=Nu;break;case"focusout":y="blur",g=Nu;break;case"beforeblur":case"afterblur":g=Nu;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=kg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=a3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=S3;break;case H1:case U1:case W1:g=u3;break;case V1:g=k3;break;case"scroll":g=s3;break;case"wheel":g=E3;break;case"copy":case"cut":case"paste":g=h3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=Eg}var _=(t&4)!==0,v=!_&&e==="scroll",d=_?m!==null?m+"Capture":null:m;_=[];for(var f=c,p;f!==null;){p=f;var w=p.stateNode;if(p.tag===5&&w!==null&&(p=w,d!==null&&(w=bo(f,d),w!=null&&_.push(Lo(f,w,p)))),v)break;f=f.return}0<_.length&&(m=new g(m,y,null,r,h),u.push({event:m,listeners:_}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",m&&r!==Yf&&(y=r.relatedTarget||r.fromElement)&&(ei(y)||y[Qr]))break e;if((g||m)&&(m=h.window===h?h:(m=h.ownerDocument)?m.defaultView||m.parentWindow:window,g?(y=r.relatedTarget||r.toElement,g=c,y=y?ei(y):null,y!==null&&(v=_i(y),y!==v||y.tag!==5&&y.tag!==6)&&(y=null)):(g=null,y=c),g!==y)){if(_=kg,w="onMouseLeave",d="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(_=Eg,w="onPointerLeave",d="onPointerEnter",f="pointer"),v=g==null?m:Wi(g),p=y==null?m:Wi(y),m=new _(w,f+"leave",g,r,h),m.target=v,m.relatedTarget=p,w=null,ei(h)===c&&(_=new _(d,f+"enter",y,r,h),_.target=p,_.relatedTarget=v,w=_),v=w,g&&y)t:{for(_=g,d=y,f=0,p=_;p;p=xi(p))f++;for(p=0,w=d;w;w=xi(w))p++;for(;0<f-p;)_=xi(_),f--;for(;0<p-f;)d=xi(d),p--;for(;f--;){if(_===d||d!==null&&_===d.alternate)break t;_=xi(_),d=xi(d)}_=null}else _=null;g!==null&&jg(u,m,g,_,!1),y!==null&&v!==null&&jg(u,v,y,_,!0)}}e:{if(m=c?Wi(c):window,g=m.nodeName&&m.nodeName.toLowerCase(),g==="select"||g==="input"&&m.type==="file")var S=N3;else if(Pg(m))if(j1)S=j3;else{S=O3;var b=R3}else(g=m.nodeName)&&g.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(S=M3);if(S&&(S=S(e,c))){M1(u,S,r,h);break e}b&&b(e,m,c),e==="focusout"&&(b=m._wrapperState)&&b.controlled&&m.type==="number"&&Wf(m,"number",m.value)}switch(b=c?Wi(c):window,e){case"focusin":(Pg(b)||b.contentEditable==="true")&&(Hi=b,rh=c,ao=null);break;case"focusout":ao=rh=Hi=null;break;case"mousedown":nh=!0;break;case"contextmenu":case"mouseup":case"dragend":nh=!1,Rg(u,r,h);break;case"selectionchange":if(z3)break;case"keydown":case"keyup":Rg(u,r,h)}var x;if(Md)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else $i?R1(e,r)&&(C="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(C="onCompositionStart");C&&(N1&&r.locale!=="ko"&&($i||C!=="onCompositionStart"?C==="onCompositionEnd"&&$i&&(x=I1()):(bn=h,Nd="value"in bn?bn.value:bn.textContent,$i=!0)),b=Vl(c,C),0<b.length&&(C=new xg(C,e,null,r,h),u.push({event:C,listeners:b}),x?C.data=x:(x=O1(r),x!==null&&(C.data=x)))),(x=L3?P3(e,r):T3(e,r))&&(c=Vl(c,"onBeforeInput"),0<c.length&&(h=new xg("onBeforeInput","beforeinput",null,r,h),u.push({event:h,listeners:c}),h.data=x))}G1(u,t)})}function Lo(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Vl(e,t){for(var r=t+"Capture",n=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=bo(e,r),s!=null&&n.unshift(Lo(e,s,i)),s=bo(e,t),s!=null&&n.push(Lo(e,s,i))),e=e.return}return n}function xi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function jg(e,t,r,n,i){for(var s=t._reactName,a=[];r!==null&&r!==n;){var o=r,l=o.alternate,c=o.stateNode;if(l!==null&&l===n)break;o.tag===5&&c!==null&&(o=c,i?(l=bo(r,s),l!=null&&a.unshift(Lo(r,l,o))):i||(l=bo(r,s),l!=null&&a.push(Lo(r,l,o)))),r=r.return}a.length!==0&&e.push({event:t,listeners:a})}var W3=/\r\n?/g,V3=/\u0000|\uFFFD/g;function Bg(e){return(typeof e=="string"?e:""+e).replace(W3,`
38
+ `).replace(V3,"")}function $a(e,t,r){if(t=Bg(t),Bg(e)!==t&&r)throw Error(fe(425))}function Kl(){}var ih=null,sh=null;function oh(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 ah=typeof setTimeout=="function"?setTimeout:void 0,K3=typeof clearTimeout=="function"?clearTimeout:void 0,Fg=typeof Promise=="function"?Promise:void 0,G3=typeof queueMicrotask=="function"?queueMicrotask:typeof Fg<"u"?function(e){return Fg.resolve(null).then(e).catch(q3)}:ah;function q3(e){setTimeout(function(){throw e})}function $u(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){e.removeChild(i),ko(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);ko(t)}function En(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 zg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var ws=Math.random().toString(36).slice(2),Nr="__reactFiber$"+ws,Po="__reactProps$"+ws,Qr="__reactContainer$"+ws,lh="__reactEvents$"+ws,Y3="__reactListeners$"+ws,J3="__reactHandles$"+ws;function ei(e){var t=e[Nr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Qr]||r[Nr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=zg(e);e!==null;){if(r=e[Nr])return r;e=zg(e)}return t}e=r,r=e.parentNode}return null}function Jo(e){return e=e[Nr]||e[Qr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Wi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(fe(33))}function Ec(e){return e[Po]||null}var ch=[],Vi=-1;function Hn(e){return{current:e}}function nt(e){0>Vi||(e.current=ch[Vi],ch[Vi]=null,Vi--)}function et(e,t){Vi++,ch[Vi]=e.current,e.current=t}var On={},Rt=Hn(On),Kt=Hn(!1),ai=On;function ls(e,t){var r=e.type.contextTypes;if(!r)return On;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=t[s];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Gt(e){return e=e.childContextTypes,e!=null}function Gl(){nt(Kt),nt(Rt)}function $g(e,t,r){if(Rt.current!==On)throw Error(fe(168));et(Rt,t),et(Kt,r)}function Y1(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(fe(108,RE(e)||"Unknown",i));return ct({},r,n)}function ql(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||On,ai=Rt.current,et(Rt,e),et(Kt,Kt.current),!0}function Hg(e,t,r){var n=e.stateNode;if(!n)throw Error(fe(169));r?(e=Y1(e,t,ai),n.__reactInternalMemoizedMergedChildContext=e,nt(Kt),nt(Rt),et(Rt,e)):nt(Kt),et(Kt,r)}var Kr=null,Ac=!1,Hu=!1;function J1(e){Kr===null?Kr=[e]:Kr.push(e)}function X3(e){Ac=!0,J1(e)}function Un(){if(!Hu&&Kr!==null){Hu=!0;var e=0,t=Je;try{var r=Kr;for(Je=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Kr=null,Ac=!1}catch(i){throw Kr!==null&&(Kr=Kr.slice(e+1)),b1(Pd,Un),i}finally{Je=t,Hu=!1}}return null}var Ki=[],Gi=0,Yl=null,Jl=0,lr=[],cr=0,li=null,Gr=1,qr="";function Jn(e,t){Ki[Gi++]=Jl,Ki[Gi++]=Yl,Yl=e,Jl=t}function X1(e,t,r){lr[cr++]=Gr,lr[cr++]=qr,lr[cr++]=li,li=e;var n=Gr;e=qr;var i=32-br(n)-1;n&=~(1<<i),r+=1;var s=32-br(t)+i;if(30<s){var a=i-i%5;s=(n&(1<<a)-1).toString(32),n>>=a,i-=a,Gr=1<<32-br(t)+i|r<<i|n,qr=s+e}else Gr=1<<s|r<<i|n,qr=e}function Bd(e){e.return!==null&&(Jn(e,1),X1(e,1,0))}function Fd(e){for(;e===Yl;)Yl=Ki[--Gi],Ki[Gi]=null,Jl=Ki[--Gi],Ki[Gi]=null;for(;e===li;)li=lr[--cr],lr[cr]=null,qr=lr[--cr],lr[cr]=null,Gr=lr[--cr],lr[cr]=null}var tr=null,Zt=null,st=!1,yr=null;function Q1(e,t){var r=fr(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Ug(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,tr=e,Zt=En(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,tr=e,Zt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=li!==null?{id:Gr,overflow:qr}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=fr(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,tr=e,Zt=null,!0):!1;default:return!1}}function uh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function fh(e){if(st){var t=Zt;if(t){var r=t;if(!Ug(e,t)){if(uh(e))throw Error(fe(418));t=En(r.nextSibling);var n=tr;t&&Ug(e,t)?Q1(n,r):(e.flags=e.flags&-4097|2,st=!1,tr=e)}}else{if(uh(e))throw Error(fe(418));e.flags=e.flags&-4097|2,st=!1,tr=e}}}function Wg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;tr=e}function Ha(e){if(e!==tr)return!1;if(!st)return Wg(e),st=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!oh(e.type,e.memoizedProps)),t&&(t=Zt)){if(uh(e))throw Z1(),Error(fe(418));for(;t;)Q1(e,t),t=En(t.nextSibling)}if(Wg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(fe(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Zt=En(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Zt=null}}else Zt=tr?En(e.stateNode.nextSibling):null;return!0}function Z1(){for(var e=Zt;e;)e=En(e.nextSibling)}function cs(){Zt=tr=null,st=!1}function zd(e){yr===null?yr=[e]:yr.push(e)}var Q3=sn.ReactCurrentBatchConfig;function Us(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(fe(309));var n=r.stateNode}if(!n)throw Error(fe(147,e));var i=n,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(a){var o=i.refs;a===null?delete o[s]:o[s]=a},t._stringRef=s,t)}if(typeof e!="string")throw Error(fe(284));if(!r._owner)throw Error(fe(290,e))}return e}function Ua(e,t){throw e=Object.prototype.toString.call(t),Error(fe(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Vg(e){var t=e._init;return t(e._payload)}function ey(e){function t(d,f){if(e){var p=d.deletions;p===null?(d.deletions=[f],d.flags|=16):p.push(f)}}function r(d,f){if(!e)return null;for(;f!==null;)t(d,f),f=f.sibling;return null}function n(d,f){for(d=new Map;f!==null;)f.key!==null?d.set(f.key,f):d.set(f.index,f),f=f.sibling;return d}function i(d,f){return d=Tn(d,f),d.index=0,d.sibling=null,d}function s(d,f,p){return d.index=p,e?(p=d.alternate,p!==null?(p=p.index,p<f?(d.flags|=2,f):p):(d.flags|=2,f)):(d.flags|=1048576,f)}function a(d){return e&&d.alternate===null&&(d.flags|=2),d}function o(d,f,p,w){return f===null||f.tag!==6?(f=Yu(p,d.mode,w),f.return=d,f):(f=i(f,p),f.return=d,f)}function l(d,f,p,w){var S=p.type;return S===zi?h(d,f,p.props.children,w,p.key):f!==null&&(f.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===vn&&Vg(S)===f.type)?(w=i(f,p.props),w.ref=Us(d,f,p),w.return=d,w):(w=kl(p.type,p.key,p.props,null,d.mode,w),w.ref=Us(d,f,p),w.return=d,w)}function c(d,f,p,w){return f===null||f.tag!==4||f.stateNode.containerInfo!==p.containerInfo||f.stateNode.implementation!==p.implementation?(f=Ju(p,d.mode,w),f.return=d,f):(f=i(f,p.children||[]),f.return=d,f)}function h(d,f,p,w,S){return f===null||f.tag!==7?(f=oi(p,d.mode,w,S),f.return=d,f):(f=i(f,p),f.return=d,f)}function u(d,f,p){if(typeof f=="string"&&f!==""||typeof f=="number")return f=Yu(""+f,d.mode,p),f.return=d,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case Ia:return p=kl(f.type,f.key,f.props,null,d.mode,p),p.ref=Us(d,null,f),p.return=d,p;case Fi:return f=Ju(f,d.mode,p),f.return=d,f;case vn:var w=f._init;return u(d,w(f._payload),p)}if(Qs(f)||Bs(f))return f=oi(f,d.mode,p,null),f.return=d,f;Ua(d,f)}return null}function m(d,f,p,w){var S=f!==null?f.key:null;if(typeof p=="string"&&p!==""||typeof p=="number")return S!==null?null:o(d,f,""+p,w);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Ia:return p.key===S?l(d,f,p,w):null;case Fi:return p.key===S?c(d,f,p,w):null;case vn:return S=p._init,m(d,f,S(p._payload),w)}if(Qs(p)||Bs(p))return S!==null?null:h(d,f,p,w,null);Ua(d,p)}return null}function g(d,f,p,w,S){if(typeof w=="string"&&w!==""||typeof w=="number")return d=d.get(p)||null,o(f,d,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Ia:return d=d.get(w.key===null?p:w.key)||null,l(f,d,w,S);case Fi:return d=d.get(w.key===null?p:w.key)||null,c(f,d,w,S);case vn:var b=w._init;return g(d,f,p,b(w._payload),S)}if(Qs(w)||Bs(w))return d=d.get(p)||null,h(f,d,w,S,null);Ua(f,w)}return null}function y(d,f,p,w){for(var S=null,b=null,x=f,C=f=0,A=null;x!==null&&C<p.length;C++){x.index>C?(A=x,x=null):A=x.sibling;var T=m(d,x,p[C],w);if(T===null){x===null&&(x=A);break}e&&x&&T.alternate===null&&t(d,x),f=s(T,f,C),b===null?S=T:b.sibling=T,b=T,x=A}if(C===p.length)return r(d,x),st&&Jn(d,C),S;if(x===null){for(;C<p.length;C++)x=u(d,p[C],w),x!==null&&(f=s(x,f,C),b===null?S=x:b.sibling=x,b=x);return st&&Jn(d,C),S}for(x=n(d,x);C<p.length;C++)A=g(x,d,C,p[C],w),A!==null&&(e&&A.alternate!==null&&x.delete(A.key===null?C:A.key),f=s(A,f,C),b===null?S=A:b.sibling=A,b=A);return e&&x.forEach(function(j){return t(d,j)}),st&&Jn(d,C),S}function _(d,f,p,w){var S=Bs(p);if(typeof S!="function")throw Error(fe(150));if(p=S.call(p),p==null)throw Error(fe(151));for(var b=S=null,x=f,C=f=0,A=null,T=p.next();x!==null&&!T.done;C++,T=p.next()){x.index>C?(A=x,x=null):A=x.sibling;var j=m(d,x,T.value,w);if(j===null){x===null&&(x=A);break}e&&x&&j.alternate===null&&t(d,x),f=s(j,f,C),b===null?S=j:b.sibling=j,b=j,x=A}if(T.done)return r(d,x),st&&Jn(d,C),S;if(x===null){for(;!T.done;C++,T=p.next())T=u(d,T.value,w),T!==null&&(f=s(T,f,C),b===null?S=T:b.sibling=T,b=T);return st&&Jn(d,C),S}for(x=n(d,x);!T.done;C++,T=p.next())T=g(x,d,C,T.value,w),T!==null&&(e&&T.alternate!==null&&x.delete(T.key===null?C:T.key),f=s(T,f,C),b===null?S=T:b.sibling=T,b=T);return e&&x.forEach(function(M){return t(d,M)}),st&&Jn(d,C),S}function v(d,f,p,w){if(typeof p=="object"&&p!==null&&p.type===zi&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Ia:e:{for(var S=p.key,b=f;b!==null;){if(b.key===S){if(S=p.type,S===zi){if(b.tag===7){r(d,b.sibling),f=i(b,p.props.children),f.return=d,d=f;break e}}else if(b.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===vn&&Vg(S)===b.type){r(d,b.sibling),f=i(b,p.props),f.ref=Us(d,b,p),f.return=d,d=f;break e}r(d,b);break}else t(d,b);b=b.sibling}p.type===zi?(f=oi(p.props.children,d.mode,w,p.key),f.return=d,d=f):(w=kl(p.type,p.key,p.props,null,d.mode,w),w.ref=Us(d,f,p),w.return=d,d=w)}return a(d);case Fi:e:{for(b=p.key;f!==null;){if(f.key===b)if(f.tag===4&&f.stateNode.containerInfo===p.containerInfo&&f.stateNode.implementation===p.implementation){r(d,f.sibling),f=i(f,p.children||[]),f.return=d,d=f;break e}else{r(d,f);break}else t(d,f);f=f.sibling}f=Ju(p,d.mode,w),f.return=d,d=f}return a(d);case vn:return b=p._init,v(d,f,b(p._payload),w)}if(Qs(p))return y(d,f,p,w);if(Bs(p))return _(d,f,p,w);Ua(d,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,f!==null&&f.tag===6?(r(d,f.sibling),f=i(f,p),f.return=d,d=f):(r(d,f),f=Yu(p,d.mode,w),f.return=d,d=f),a(d)):r(d,f)}return v}var us=ey(!0),ty=ey(!1),Xl=Hn(null),Ql=null,qi=null,$d=null;function Hd(){$d=qi=Ql=null}function Ud(e){var t=Xl.current;nt(Xl),e._currentValue=t}function hh(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function rs(e,t){Ql=e,$d=qi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Vt=!0),e.firstContext=null)}function dr(e){var t=e._currentValue;if($d!==e)if(e={context:e,memoizedValue:t,next:null},qi===null){if(Ql===null)throw Error(fe(308));qi=e,Ql.dependencies={lanes:0,firstContext:e}}else qi=qi.next=e;return t}var ti=null;function Wd(e){ti===null?ti=[e]:ti.push(e)}function ry(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,Wd(t)):(r.next=i.next,i.next=r),t.interleaved=r,Zr(e,n)}function Zr(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var _n=!1;function Vd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ny(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 Yr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function An(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Ue&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Zr(e,r)}return i=n.interleaved,i===null?(t.next=t,Wd(n)):(t.next=i.next,i.next=t),n.interleaved=t,Zr(e,r)}function _l(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Td(e,r)}}function Kg(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=a:s=s.next=a,r=r.next}while(r!==null);s===null?i=s=t:s=s.next=t}else i=s=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Zl(e,t,r,n){var i=e.updateQueue;_n=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var l=o,c=l.next;l.next=null,a===null?s=c:a.next=c,a=l;var h=e.alternate;h!==null&&(h=h.updateQueue,o=h.lastBaseUpdate,o!==a&&(o===null?h.firstBaseUpdate=c:o.next=c,h.lastBaseUpdate=l))}if(s!==null){var u=i.baseState;a=0,h=c=l=null,o=s;do{var m=o.lane,g=o.eventTime;if((n&m)===m){h!==null&&(h=h.next={eventTime:g,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var y=e,_=o;switch(m=t,g=r,_.tag){case 1:if(y=_.payload,typeof y=="function"){u=y.call(g,u,m);break e}u=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=_.payload,m=typeof y=="function"?y.call(g,u,m):y,m==null)break e;u=ct({},u,m);break e;case 2:_n=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,m=i.effects,m===null?i.effects=[o]:m.push(o))}else g={eventTime:g,lane:m,tag:o.tag,payload:o.payload,callback:o.callback,next:null},h===null?(c=h=g,l=u):h=h.next=g,a|=m;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;m=o,o=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(!0);if(h===null&&(l=u),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=h,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);ui|=a,e.lanes=a,e.memoizedState=u}}function Gg(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(fe(191,i));i.call(n)}}}var Xo={},jr=Hn(Xo),To=Hn(Xo),Do=Hn(Xo);function ri(e){if(e===Xo)throw Error(fe(174));return e}function Kd(e,t){switch(et(Do,t),et(To,e),et(jr,Xo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Kf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Kf(t,e)}nt(jr),et(jr,t)}function fs(){nt(jr),nt(To),nt(Do)}function iy(e){ri(Do.current);var t=ri(jr.current),r=Kf(t,e.type);t!==r&&(et(To,e),et(jr,r))}function Gd(e){To.current===e&&(nt(jr),nt(To))}var at=Hn(0);function ec(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Uu=[];function qd(){for(var e=0;e<Uu.length;e++)Uu[e]._workInProgressVersionPrimary=null;Uu.length=0}var yl=sn.ReactCurrentDispatcher,Wu=sn.ReactCurrentBatchConfig,ci=0,lt=null,yt=null,St=null,tc=!1,lo=!1,Io=0,Z3=0;function Tt(){throw Error(fe(321))}function Yd(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!kr(e[r],t[r]))return!1;return!0}function Jd(e,t,r,n,i,s){if(ci=s,lt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,yl.current=e===null||e.memoizedState===null?n4:i4,e=r(n,i),lo){s=0;do{if(lo=!1,Io=0,25<=s)throw Error(fe(301));s+=1,St=yt=null,t.updateQueue=null,yl.current=s4,e=r(n,i)}while(lo)}if(yl.current=rc,t=yt!==null&&yt.next!==null,ci=0,St=yt=lt=null,tc=!1,t)throw Error(fe(300));return e}function Xd(){var e=Io!==0;return Io=0,e}function Dr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return St===null?lt.memoizedState=St=e:St=St.next=e,St}function pr(){if(yt===null){var e=lt.alternate;e=e!==null?e.memoizedState:null}else e=yt.next;var t=St===null?lt.memoizedState:St.next;if(t!==null)St=t,yt=e;else{if(e===null)throw Error(fe(310));yt=e,e={memoizedState:yt.memoizedState,baseState:yt.baseState,baseQueue:yt.baseQueue,queue:yt.queue,next:null},St===null?lt.memoizedState=St=e:St=St.next=e}return St}function No(e,t){return typeof t=="function"?t(e):t}function Vu(e){var t=pr(),r=t.queue;if(r===null)throw Error(fe(311));r.lastRenderedReducer=e;var n=yt,i=n.baseQueue,s=r.pending;if(s!==null){if(i!==null){var a=i.next;i.next=s.next,s.next=a}n.baseQueue=i=s,r.pending=null}if(i!==null){s=i.next,n=n.baseState;var o=a=null,l=null,c=s;do{var h=c.lane;if((ci&h)===h)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var u={lane:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(o=l=u,a=n):l=l.next=u,lt.lanes|=h,ui|=h}c=c.next}while(c!==null&&c!==s);l===null?a=n:l.next=o,kr(n,t.memoizedState)||(Vt=!0),t.memoizedState=n,t.baseState=a,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){i=e;do s=i.lane,lt.lanes|=s,ui|=s,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Ku(e){var t=pr(),r=t.queue;if(r===null)throw Error(fe(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,s=t.memoizedState;if(i!==null){r.pending=null;var a=i=i.next;do s=e(s,a.action),a=a.next;while(a!==i);kr(s,t.memoizedState)||(Vt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),r.lastRenderedState=s}return[s,n]}function sy(){}function oy(e,t){var r=lt,n=pr(),i=t(),s=!kr(n.memoizedState,i);if(s&&(n.memoizedState=i,Vt=!0),n=n.queue,Qd(cy.bind(null,r,n,e),[e]),n.getSnapshot!==t||s||St!==null&&St.memoizedState.tag&1){if(r.flags|=2048,Ro(9,ly.bind(null,r,n,i,t),void 0,null),Ct===null)throw Error(fe(349));ci&30||ay(r,t,i)}return i}function ay(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=lt.updateQueue,t===null?(t={lastEffect:null,stores:null},lt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function ly(e,t,r,n){t.value=r,t.getSnapshot=n,uy(t)&&fy(e)}function cy(e,t,r){return r(function(){uy(t)&&fy(e)})}function uy(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!kr(e,r)}catch{return!0}}function fy(e){var t=Zr(e,1);t!==null&&Sr(t,e,1,-1)}function qg(e){var t=Dr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:e},t.queue=e,e=e.dispatch=r4.bind(null,lt,e),[t.memoizedState,e]}function Ro(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=lt.updateQueue,t===null?(t={lastEffect:null,stores:null},lt.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function hy(){return pr().memoizedState}function wl(e,t,r,n){var i=Dr();lt.flags|=e,i.memoizedState=Ro(1|t,r,void 0,n===void 0?null:n)}function Lc(e,t,r,n){var i=pr();n=n===void 0?null:n;var s=void 0;if(yt!==null){var a=yt.memoizedState;if(s=a.destroy,n!==null&&Yd(n,a.deps)){i.memoizedState=Ro(t,r,s,n);return}}lt.flags|=e,i.memoizedState=Ro(1|t,r,s,n)}function Yg(e,t){return wl(8390656,8,e,t)}function Qd(e,t){return Lc(2048,8,e,t)}function dy(e,t){return Lc(4,2,e,t)}function py(e,t){return Lc(4,4,e,t)}function my(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 gy(e,t,r){return r=r!=null?r.concat([e]):null,Lc(4,4,my.bind(null,t,e),r)}function Zd(){}function vy(e,t){var r=pr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Yd(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function _y(e,t){var r=pr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Yd(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function yy(e,t,r){return ci&21?(kr(r,t)||(r=k1(),lt.lanes|=r,ui|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Vt=!0),e.memoizedState=r)}function e4(e,t){var r=Je;Je=r!==0&&4>r?r:4,e(!0);var n=Wu.transition;Wu.transition={};try{e(!1),t()}finally{Je=r,Wu.transition=n}}function wy(){return pr().memoizedState}function t4(e,t,r){var n=Pn(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},by(e))Sy(t,r);else if(r=ry(e,t,r,n),r!==null){var i=Bt();Sr(r,e,n,i),Cy(r,t,n)}}function r4(e,t,r){var n=Pn(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(by(e))Sy(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,o=s(a,r);if(i.hasEagerState=!0,i.eagerState=o,kr(o,a)){var l=t.interleaved;l===null?(i.next=i,Wd(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=ry(e,t,i,n),r!==null&&(i=Bt(),Sr(r,e,n,i),Cy(r,t,n))}}function by(e){var t=e.alternate;return e===lt||t!==null&&t===lt}function Sy(e,t){lo=tc=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Cy(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Td(e,r)}}var rc={readContext:dr,useCallback:Tt,useContext:Tt,useEffect:Tt,useImperativeHandle:Tt,useInsertionEffect:Tt,useLayoutEffect:Tt,useMemo:Tt,useReducer:Tt,useRef:Tt,useState:Tt,useDebugValue:Tt,useDeferredValue:Tt,useTransition:Tt,useMutableSource:Tt,useSyncExternalStore:Tt,useId:Tt,unstable_isNewReconciler:!1},n4={readContext:dr,useCallback:function(e,t){return Dr().memoizedState=[e,t===void 0?null:t],e},useContext:dr,useEffect:Yg,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,wl(4194308,4,my.bind(null,t,e),r)},useLayoutEffect:function(e,t){return wl(4194308,4,e,t)},useInsertionEffect:function(e,t){return wl(4,2,e,t)},useMemo:function(e,t){var r=Dr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Dr();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=t4.bind(null,lt,e),[n.memoizedState,e]},useRef:function(e){var t=Dr();return e={current:e},t.memoizedState=e},useState:qg,useDebugValue:Zd,useDeferredValue:function(e){return Dr().memoizedState=e},useTransition:function(){var e=qg(!1),t=e[0];return e=e4.bind(null,e[1]),Dr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=lt,i=Dr();if(st){if(r===void 0)throw Error(fe(407));r=r()}else{if(r=t(),Ct===null)throw Error(fe(349));ci&30||ay(n,t,r)}i.memoizedState=r;var s={value:r,getSnapshot:t};return i.queue=s,Yg(cy.bind(null,n,s,e),[e]),n.flags|=2048,Ro(9,ly.bind(null,n,s,r,t),void 0,null),r},useId:function(){var e=Dr(),t=Ct.identifierPrefix;if(st){var r=qr,n=Gr;r=(n&~(1<<32-br(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Io++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Z3++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},i4={readContext:dr,useCallback:vy,useContext:dr,useEffect:Qd,useImperativeHandle:gy,useInsertionEffect:dy,useLayoutEffect:py,useMemo:_y,useReducer:Vu,useRef:hy,useState:function(){return Vu(No)},useDebugValue:Zd,useDeferredValue:function(e){var t=pr();return yy(t,yt.memoizedState,e)},useTransition:function(){var e=Vu(No)[0],t=pr().memoizedState;return[e,t]},useMutableSource:sy,useSyncExternalStore:oy,useId:wy,unstable_isNewReconciler:!1},s4={readContext:dr,useCallback:vy,useContext:dr,useEffect:Qd,useImperativeHandle:gy,useInsertionEffect:dy,useLayoutEffect:py,useMemo:_y,useReducer:Ku,useRef:hy,useState:function(){return Ku(No)},useDebugValue:Zd,useDeferredValue:function(e){var t=pr();return yt===null?t.memoizedState=e:yy(t,yt.memoizedState,e)},useTransition:function(){var e=Ku(No)[0],t=pr().memoizedState;return[e,t]},useMutableSource:sy,useSyncExternalStore:oy,useId:wy,unstable_isNewReconciler:!1};function vr(e,t){if(e&&e.defaultProps){t=ct({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function dh(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:ct({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Pc={isMounted:function(e){return(e=e._reactInternals)?_i(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Bt(),i=Pn(e),s=Yr(n,i);s.payload=t,r!=null&&(s.callback=r),t=An(e,s,i),t!==null&&(Sr(t,e,i,n),_l(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Bt(),i=Pn(e),s=Yr(n,i);s.tag=1,s.payload=t,r!=null&&(s.callback=r),t=An(e,s,i),t!==null&&(Sr(t,e,i,n),_l(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Bt(),n=Pn(e),i=Yr(r,n);i.tag=2,t!=null&&(i.callback=t),t=An(e,i,n),t!==null&&(Sr(t,e,n,r),_l(t,e,n))}};function Jg(e,t,r,n,i,s,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,s,a):t.prototype&&t.prototype.isPureReactComponent?!Eo(r,n)||!Eo(i,s):!0}function ky(e,t,r){var n=!1,i=On,s=t.contextType;return typeof s=="object"&&s!==null?s=dr(s):(i=Gt(t)?ai:Rt.current,n=t.contextTypes,s=(n=n!=null)?ls(e,i):On),t=new t(r,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Pc,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Xg(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&Pc.enqueueReplaceState(t,t.state,null)}function ph(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},Vd(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=dr(s):(s=Gt(t)?ai:Rt.current,i.context=ls(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(dh(e,t,s,r),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Pc.enqueueReplaceState(i,i.state,null),Zl(e,r,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function hs(e,t){try{var r="",n=t;do r+=NE(n),n=n.return;while(n);var i=r}catch(s){i=`
39
+ Error generating stack: `+s.message+`
40
+ `+s.stack}return{value:e,source:t,stack:i,digest:null}}function Gu(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function mh(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var o4=typeof WeakMap=="function"?WeakMap:Map;function xy(e,t,r){r=Yr(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){ic||(ic=!0,xh=n),mh(e,t)},r}function Ey(e,t,r){r=Yr(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){mh(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){mh(e,t),typeof n!="function"&&(Ln===null?Ln=new Set([this]):Ln.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}function Qg(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new o4;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=w4.bind(null,e,t,r),t.then(e,e))}function Zg(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 ev(e,t,r,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Yr(-1,1),t.tag=2,An(r,t,1))),r.lanes|=1),e)}var a4=sn.ReactCurrentOwner,Vt=!1;function Mt(e,t,r,n){t.child=e===null?ty(t,null,r,n):us(t,e.child,r,n)}function tv(e,t,r,n,i){r=r.render;var s=t.ref;return rs(t,i),n=Jd(e,t,r,n,s,i),r=Xd(),e!==null&&!Vt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,en(e,t,i)):(st&&r&&Bd(t),t.flags|=1,Mt(e,t,n,i),t.child)}function rv(e,t,r,n,i){if(e===null){var s=r.type;return typeof s=="function"&&!ap(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=s,Ay(e,t,s,n,i)):(e=kl(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var a=s.memoizedProps;if(r=r.compare,r=r!==null?r:Eo,r(a,n)&&e.ref===t.ref)return en(e,t,i)}return t.flags|=1,e=Tn(s,n),e.ref=t.ref,e.return=t,t.child=e}function Ay(e,t,r,n,i){if(e!==null){var s=e.memoizedProps;if(Eo(s,n)&&e.ref===t.ref)if(Vt=!1,t.pendingProps=n=s,(e.lanes&i)!==0)e.flags&131072&&(Vt=!0);else return t.lanes=e.lanes,en(e,t,i)}return gh(e,t,r,n,i)}function Ly(e,t,r){var n=t.pendingProps,i=n.children,s=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},et(Ji,Qt),Qt|=r;else{if(!(r&1073741824))return e=s!==null?s.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,et(Ji,Qt),Qt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:r,et(Ji,Qt),Qt|=n}else s!==null?(n=s.baseLanes|r,t.memoizedState=null):n=r,et(Ji,Qt),Qt|=n;return Mt(e,t,i,r),t.child}function Py(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function gh(e,t,r,n,i){var s=Gt(r)?ai:Rt.current;return s=ls(t,s),rs(t,i),r=Jd(e,t,r,n,s,i),n=Xd(),e!==null&&!Vt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,en(e,t,i)):(st&&n&&Bd(t),t.flags|=1,Mt(e,t,r,i),t.child)}function nv(e,t,r,n,i){if(Gt(r)){var s=!0;ql(t)}else s=!1;if(rs(t,i),t.stateNode===null)bl(e,t),ky(t,r,n),ph(t,r,n,i),n=!0;else if(e===null){var a=t.stateNode,o=t.memoizedProps;a.props=o;var l=a.context,c=r.contextType;typeof c=="object"&&c!==null?c=dr(c):(c=Gt(r)?ai:Rt.current,c=ls(t,c));var h=r.getDerivedStateFromProps,u=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function";u||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==n||l!==c)&&Xg(t,a,n,c),_n=!1;var m=t.memoizedState;a.state=m,Zl(t,n,a,i),l=t.memoizedState,o!==n||m!==l||Kt.current||_n?(typeof h=="function"&&(dh(t,r,h,n),l=t.memoizedState),(o=_n||Jg(t,r,o,n,m,l,c))?(u||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),a.props=n,a.state=l,a.context=c,n=o):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,ny(e,t),o=t.memoizedProps,c=t.type===t.elementType?o:vr(t.type,o),a.props=c,u=t.pendingProps,m=a.context,l=r.contextType,typeof l=="object"&&l!==null?l=dr(l):(l=Gt(r)?ai:Rt.current,l=ls(t,l));var g=r.getDerivedStateFromProps;(h=typeof g=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==u||m!==l)&&Xg(t,a,n,l),_n=!1,m=t.memoizedState,a.state=m,Zl(t,n,a,i);var y=t.memoizedState;o!==u||m!==y||Kt.current||_n?(typeof g=="function"&&(dh(t,r,g,n),y=t.memoizedState),(c=_n||Jg(t,r,c,n,m,y,l)||!1)?(h||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,y,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,y,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=y),a.props=n,a.state=y,a.context=l,n=c):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),n=!1)}return vh(e,t,r,n,s,i)}function vh(e,t,r,n,i,s){Py(e,t);var a=(t.flags&128)!==0;if(!n&&!a)return i&&Hg(t,r,!1),en(e,t,s);n=t.stateNode,a4.current=t;var o=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&a?(t.child=us(t,e.child,null,s),t.child=us(t,null,o,s)):Mt(e,t,o,s),t.memoizedState=n.state,i&&Hg(t,r,!0),t.child}function Ty(e){var t=e.stateNode;t.pendingContext?$g(e,t.pendingContext,t.pendingContext!==t.context):t.context&&$g(e,t.context,!1),Kd(e,t.containerInfo)}function iv(e,t,r,n,i){return cs(),zd(i),t.flags|=256,Mt(e,t,r,n),t.child}var _h={dehydrated:null,treeContext:null,retryLane:0};function yh(e){return{baseLanes:e,cachePool:null,transitions:null}}function Dy(e,t,r){var n=t.pendingProps,i=at.current,s=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),et(at,i&1),e===null)return fh(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=n.children,e=n.fallback,s?(n=t.mode,s=t.child,a={mode:"hidden",children:a},!(n&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=Ic(a,n,0,null),e=oi(e,n,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=yh(r),t.memoizedState=_h,e):ep(t,a));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return l4(e,t,a,n,o,i,r);if(s){s=n.fallback,a=t.mode,i=e.child,o=i.sibling;var l={mode:"hidden",children:n.children};return!(a&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=Tn(i,l),n.subtreeFlags=i.subtreeFlags&14680064),o!==null?s=Tn(o,s):(s=oi(s,a,r,null),s.flags|=2),s.return=t,n.return=t,n.sibling=s,t.child=n,n=s,s=t.child,a=e.child.memoizedState,a=a===null?yh(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~r,t.memoizedState=_h,n}return s=e.child,e=s.sibling,n=Tn(s,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function ep(e,t){return t=Ic({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Wa(e,t,r,n){return n!==null&&zd(n),us(t,e.child,null,r),e=ep(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function l4(e,t,r,n,i,s,a){if(r)return t.flags&256?(t.flags&=-257,n=Gu(Error(fe(422))),Wa(e,t,a,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=n.fallback,i=t.mode,n=Ic({mode:"visible",children:n.children},i,0,null),s=oi(s,i,a,null),s.flags|=2,n.return=t,s.return=t,n.sibling=s,t.child=n,t.mode&1&&us(t,e.child,null,a),t.child.memoizedState=yh(a),t.memoizedState=_h,s);if(!(t.mode&1))return Wa(e,t,a,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var o=n.dgst;return n=o,s=Error(fe(419)),n=Gu(s,n,void 0),Wa(e,t,a,n)}if(o=(a&e.childLanes)!==0,Vt||o){if(n=Ct,n!==null){switch(a&-a){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Zr(e,i),Sr(n,e,i,-1))}return op(),n=Gu(Error(fe(421))),Wa(e,t,a,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=b4.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Zt=En(i.nextSibling),tr=t,st=!0,yr=null,e!==null&&(lr[cr++]=Gr,lr[cr++]=qr,lr[cr++]=li,Gr=e.id,qr=e.overflow,li=t),t=ep(t,n.children),t.flags|=4096,t)}function sv(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),hh(e.return,t,r)}function qu(e,t,r,n,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=r,s.tailMode=i)}function Iy(e,t,r){var n=t.pendingProps,i=n.revealOrder,s=n.tail;if(Mt(e,t,n.children,r),n=at.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sv(e,r,t);else if(e.tag===19)sv(e,r,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}n&=1}if(et(at,n),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&ec(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),qu(t,!1,i,r,s);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ec(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}qu(t,!0,r,null,s);break;case"together":qu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function bl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function en(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),ui|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(fe(153));if(t.child!==null){for(e=t.child,r=Tn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Tn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function c4(e,t,r){switch(t.tag){case 3:Ty(t),cs();break;case 5:iy(t);break;case 1:Gt(t.type)&&ql(t);break;case 4:Kd(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;et(Xl,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(et(at,at.current&1),t.flags|=128,null):r&t.child.childLanes?Dy(e,t,r):(et(at,at.current&1),e=en(e,t,r),e!==null?e.sibling:null);et(at,at.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return Iy(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),et(at,at.current),n)break;return null;case 22:case 23:return t.lanes=0,Ly(e,t,r)}return en(e,t,r)}var Ny,wh,Ry,Oy;Ny=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};wh=function(){};Ry=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,ri(jr.current);var s=null;switch(r){case"input":i=Hf(e,i),n=Hf(e,n),s=[];break;case"select":i=ct({},i,{value:void 0}),n=ct({},n,{value:void 0}),s=[];break;case"textarea":i=Vf(e,i),n=Vf(e,n),s=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Kl)}Gf(r,n);var a;r=null;for(c in i)if(!n.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var o=i[c];for(a in o)o.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(yo.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in n){var l=n[c];if(o=i!=null?i[c]:void 0,n.hasOwnProperty(c)&&l!==o&&(l!=null||o!=null))if(c==="style")if(o){for(a in o)!o.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in l)l.hasOwnProperty(a)&&o[a]!==l[a]&&(r||(r={}),r[a]=l[a])}else r||(s||(s=[]),s.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,o=o?o.__html:void 0,l!=null&&o!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(yo.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&tt("scroll",e),s||o===l||(s=[])):(s=s||[]).push(c,l))}r&&(s=s||[]).push("style",r);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Oy=function(e,t,r,n){r!==n&&(t.flags|=4)};function Ws(e,t){if(!st)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Dt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function u4(e,t,r){var n=t.pendingProps;switch(Fd(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Dt(t),null;case 1:return Gt(t.type)&&Gl(),Dt(t),null;case 3:return n=t.stateNode,fs(),nt(Kt),nt(Rt),qd(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ha(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,yr!==null&&(Lh(yr),yr=null))),wh(e,t),Dt(t),null;case 5:Gd(t);var i=ri(Do.current);if(r=t.type,e!==null&&t.stateNode!=null)Ry(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(fe(166));return Dt(t),null}if(e=ri(jr.current),Ha(t)){n=t.stateNode,r=t.type;var s=t.memoizedProps;switch(n[Nr]=t,n[Po]=s,e=(t.mode&1)!==0,r){case"dialog":tt("cancel",n),tt("close",n);break;case"iframe":case"object":case"embed":tt("load",n);break;case"video":case"audio":for(i=0;i<eo.length;i++)tt(eo[i],n);break;case"source":tt("error",n);break;case"img":case"image":case"link":tt("error",n),tt("load",n);break;case"details":tt("toggle",n);break;case"input":pg(n,s),tt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!s.multiple},tt("invalid",n);break;case"textarea":gg(n,s),tt("invalid",n)}Gf(r,s),i=null;for(var a in s)if(s.hasOwnProperty(a)){var o=s[a];a==="children"?typeof o=="string"?n.textContent!==o&&(s.suppressHydrationWarning!==!0&&$a(n.textContent,o,e),i=["children",o]):typeof o=="number"&&n.textContent!==""+o&&(s.suppressHydrationWarning!==!0&&$a(n.textContent,o,e),i=["children",""+o]):yo.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&tt("scroll",n)}switch(r){case"input":Na(n),mg(n,s,!0);break;case"textarea":Na(n),vg(n);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(n.onclick=Kl)}n=i,t.updateQueue=n,n!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=c1(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[Nr]=t,e[Po]=n,Ny(e,t,!1,!1),t.stateNode=e;e:{switch(a=qf(r,n),r){case"dialog":tt("cancel",e),tt("close",e),i=n;break;case"iframe":case"object":case"embed":tt("load",e),i=n;break;case"video":case"audio":for(i=0;i<eo.length;i++)tt(eo[i],e);i=n;break;case"source":tt("error",e),i=n;break;case"img":case"image":case"link":tt("error",e),tt("load",e),i=n;break;case"details":tt("toggle",e),i=n;break;case"input":pg(e,n),i=Hf(e,n),tt("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=ct({},n,{value:void 0}),tt("invalid",e);break;case"textarea":gg(e,n),i=Vf(e,n),tt("invalid",e);break;default:i=n}Gf(r,i),o=i;for(s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="style"?h1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&u1(e,l)):s==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&wo(e,l):typeof l=="number"&&wo(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(yo.hasOwnProperty(s)?l!=null&&s==="onScroll"&&tt("scroll",e):l!=null&&kd(e,s,l,a))}switch(r){case"input":Na(e),mg(e,n,!1);break;case"textarea":Na(e),vg(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Rn(n.value));break;case"select":e.multiple=!!n.multiple,s=n.value,s!=null?Qi(e,!!n.multiple,s,!1):n.defaultValue!=null&&Qi(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Kl)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Dt(t),null;case 6:if(e&&t.stateNode!=null)Oy(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(fe(166));if(r=ri(Do.current),ri(jr.current),Ha(t)){if(n=t.stateNode,r=t.memoizedProps,n[Nr]=t,(s=n.nodeValue!==r)&&(e=tr,e!==null))switch(e.tag){case 3:$a(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&$a(n.nodeValue,r,(e.mode&1)!==0)}s&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Nr]=t,t.stateNode=n}return Dt(t),null;case 13:if(nt(at),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(st&&Zt!==null&&t.mode&1&&!(t.flags&128))Z1(),cs(),t.flags|=98560,s=!1;else if(s=Ha(t),n!==null&&n.dehydrated!==null){if(e===null){if(!s)throw Error(fe(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(fe(317));s[Nr]=t}else cs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Dt(t),s=!1}else yr!==null&&(Lh(yr),yr=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||at.current&1?wt===0&&(wt=3):op())),t.updateQueue!==null&&(t.flags|=4),Dt(t),null);case 4:return fs(),wh(e,t),e===null&&Ao(t.stateNode.containerInfo),Dt(t),null;case 10:return Ud(t.type._context),Dt(t),null;case 17:return Gt(t.type)&&Gl(),Dt(t),null;case 19:if(nt(at),s=t.memoizedState,s===null)return Dt(t),null;if(n=(t.flags&128)!==0,a=s.rendering,a===null)if(n)Ws(s,!1);else{if(wt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=ec(e),a!==null){for(t.flags|=128,Ws(s,!1),n=a.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)s=r,e=n,s.flags&=14680066,a=s.alternate,a===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=a.childLanes,s.lanes=a.lanes,s.child=a.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=a.memoizedProps,s.memoizedState=a.memoizedState,s.updateQueue=a.updateQueue,s.type=a.type,e=a.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return et(at,at.current&1|2),t.child}e=e.sibling}s.tail!==null&&ht()>ds&&(t.flags|=128,n=!0,Ws(s,!1),t.lanes=4194304)}else{if(!n)if(e=ec(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ws(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!st)return Dt(t),null}else 2*ht()-s.renderingStartTime>ds&&r!==1073741824&&(t.flags|=128,n=!0,Ws(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(r=s.last,r!==null?r.sibling=a:t.child=a,s.last=a)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ht(),t.sibling=null,r=at.current,et(at,n?r&1|2:r&1),t):(Dt(t),null);case 22:case 23:return sp(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Qt&1073741824&&(Dt(t),t.subtreeFlags&6&&(t.flags|=8192)):Dt(t),null;case 24:return null;case 25:return null}throw Error(fe(156,t.tag))}function f4(e,t){switch(Fd(t),t.tag){case 1:return Gt(t.type)&&Gl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fs(),nt(Kt),nt(Rt),qd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Gd(t),null;case 13:if(nt(at),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(fe(340));cs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return nt(at),null;case 4:return fs(),null;case 10:return Ud(t.type._context),null;case 22:case 23:return sp(),null;case 24:return null;default:return null}}var Va=!1,It=!1,h4=typeof WeakSet=="function"?WeakSet:Set,be=null;function Yi(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ft(e,t,n)}else r.current=null}function bh(e,t,r){try{r()}catch(n){ft(e,t,n)}}var ov=!1;function d4(e,t){if(ih=Ul,e=z1(),jd(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var a=0,o=-1,l=-1,c=0,h=0,u=e,m=null;t:for(;;){for(var g;u!==r||i!==0&&u.nodeType!==3||(o=a+i),u!==s||n!==0&&u.nodeType!==3||(l=a+n),u.nodeType===3&&(a+=u.nodeValue.length),(g=u.firstChild)!==null;)m=u,u=g;for(;;){if(u===e)break t;if(m===r&&++c===i&&(o=a),m===s&&++h===n&&(l=a),(g=u.nextSibling)!==null)break;u=m,m=u.parentNode}u=g}r=o===-1||l===-1?null:{start:o,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(sh={focusedElem:e,selectionRange:r},Ul=!1,be=t;be!==null;)if(t=be,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,be=e;else for(;be!==null;){t=be;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,v=y.memoizedState,d=t.stateNode,f=d.getSnapshotBeforeUpdate(t.elementType===t.type?_:vr(t.type,_),v);d.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(fe(163))}}catch(w){ft(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,be=e;break}be=t.return}return y=ov,ov=!1,y}function co(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&bh(t,r,s)}i=i.next}while(i!==n)}}function Tc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Sh(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function My(e){var t=e.alternate;t!==null&&(e.alternate=null,My(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Nr],delete t[Po],delete t[lh],delete t[Y3],delete t[J3])),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 jy(e){return e.tag===5||e.tag===3||e.tag===4}function av(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jy(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 Ch(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Kl));else if(n!==4&&(e=e.child,e!==null))for(Ch(e,t,r),e=e.sibling;e!==null;)Ch(e,t,r),e=e.sibling}function kh(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(kh(e,t,r),e=e.sibling;e!==null;)kh(e,t,r),e=e.sibling}var kt=null,_r=!1;function dn(e,t,r){for(r=r.child;r!==null;)By(e,t,r),r=r.sibling}function By(e,t,r){if(Mr&&typeof Mr.onCommitFiberUnmount=="function")try{Mr.onCommitFiberUnmount(Sc,r)}catch{}switch(r.tag){case 5:It||Yi(r,t);case 6:var n=kt,i=_r;kt=null,dn(e,t,r),kt=n,_r=i,kt!==null&&(_r?(e=kt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):kt.removeChild(r.stateNode));break;case 18:kt!==null&&(_r?(e=kt,r=r.stateNode,e.nodeType===8?$u(e.parentNode,r):e.nodeType===1&&$u(e,r),ko(e)):$u(kt,r.stateNode));break;case 4:n=kt,i=_r,kt=r.stateNode.containerInfo,_r=!0,dn(e,t,r),kt=n,_r=i;break;case 0:case 11:case 14:case 15:if(!It&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&bh(r,t,a),i=i.next}while(i!==n)}dn(e,t,r);break;case 1:if(!It&&(Yi(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(o){ft(r,t,o)}dn(e,t,r);break;case 21:dn(e,t,r);break;case 22:r.mode&1?(It=(n=It)||r.memoizedState!==null,dn(e,t,r),It=n):dn(e,t,r);break;default:dn(e,t,r)}}function lv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new h4),t.forEach(function(n){var i=S4.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function gr(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var s=e,a=t,o=a;e:for(;o!==null;){switch(o.tag){case 5:kt=o.stateNode,_r=!1;break e;case 3:kt=o.stateNode.containerInfo,_r=!0;break e;case 4:kt=o.stateNode.containerInfo,_r=!0;break e}o=o.return}if(kt===null)throw Error(fe(160));By(s,a,i),kt=null,_r=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){ft(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Fy(t,e),t=t.sibling}function Fy(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gr(t,e),Tr(e),n&4){try{co(3,e,e.return),Tc(3,e)}catch(_){ft(e,e.return,_)}try{co(5,e,e.return)}catch(_){ft(e,e.return,_)}}break;case 1:gr(t,e),Tr(e),n&512&&r!==null&&Yi(r,r.return);break;case 5:if(gr(t,e),Tr(e),n&512&&r!==null&&Yi(r,r.return),e.flags&32){var i=e.stateNode;try{wo(i,"")}catch(_){ft(e,e.return,_)}}if(n&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,a=r!==null?r.memoizedProps:s,o=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{o==="input"&&s.type==="radio"&&s.name!=null&&a1(i,s),qf(o,a);var c=qf(o,s);for(a=0;a<l.length;a+=2){var h=l[a],u=l[a+1];h==="style"?h1(i,u):h==="dangerouslySetInnerHTML"?u1(i,u):h==="children"?wo(i,u):kd(i,h,u,c)}switch(o){case"input":Uf(i,s);break;case"textarea":l1(i,s);break;case"select":var m=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var g=s.value;g!=null?Qi(i,!!s.multiple,g,!1):m!==!!s.multiple&&(s.defaultValue!=null?Qi(i,!!s.multiple,s.defaultValue,!0):Qi(i,!!s.multiple,s.multiple?[]:"",!1))}i[Po]=s}catch(_){ft(e,e.return,_)}}break;case 6:if(gr(t,e),Tr(e),n&4){if(e.stateNode===null)throw Error(fe(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(_){ft(e,e.return,_)}}break;case 3:if(gr(t,e),Tr(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{ko(t.containerInfo)}catch(_){ft(e,e.return,_)}break;case 4:gr(t,e),Tr(e);break;case 13:gr(t,e),Tr(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(np=ht())),n&4&&lv(e);break;case 22:if(h=r!==null&&r.memoizedState!==null,e.mode&1?(It=(c=It)||h,gr(t,e),It=c):gr(t,e),Tr(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!h&&e.mode&1)for(be=e,h=e.child;h!==null;){for(u=be=h;be!==null;){switch(m=be,g=m.child,m.tag){case 0:case 11:case 14:case 15:co(4,m,m.return);break;case 1:Yi(m,m.return);var y=m.stateNode;if(typeof y.componentWillUnmount=="function"){n=m,r=m.return;try{t=n,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(_){ft(n,r,_)}}break;case 5:Yi(m,m.return);break;case 22:if(m.memoizedState!==null){uv(u);continue}}g!==null?(g.return=m,be=g):uv(u)}h=h.sibling}e:for(h=null,u=e;;){if(u.tag===5){if(h===null){h=u;try{i=u.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(o=u.stateNode,l=u.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,o.style.display=f1("display",a))}catch(_){ft(e,e.return,_)}}}else if(u.tag===6){if(h===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(_){ft(e,e.return,_)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;h===u&&(h=null),u=u.return}h===u&&(h=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:gr(t,e),Tr(e),n&4&&lv(e);break;case 21:break;default:gr(t,e),Tr(e)}}function Tr(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(jy(r)){var n=r;break e}r=r.return}throw Error(fe(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(wo(i,""),n.flags&=-33);var s=av(e);kh(e,s,i);break;case 3:case 4:var a=n.stateNode.containerInfo,o=av(e);Ch(e,o,a);break;default:throw Error(fe(161))}}catch(l){ft(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function p4(e,t,r){be=e,zy(e)}function zy(e,t,r){for(var n=(e.mode&1)!==0;be!==null;){var i=be,s=i.child;if(i.tag===22&&n){var a=i.memoizedState!==null||Va;if(!a){var o=i.alternate,l=o!==null&&o.memoizedState!==null||It;o=Va;var c=It;if(Va=a,(It=l)&&!c)for(be=i;be!==null;)a=be,l=a.child,a.tag===22&&a.memoizedState!==null?fv(i):l!==null?(l.return=a,be=l):fv(i);for(;s!==null;)be=s,zy(s),s=s.sibling;be=i,Va=o,It=c}cv(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,be=s):cv(e)}}function cv(e){for(;be!==null;){var t=be;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:It||Tc(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!It)if(r===null)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:vr(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Gg(t,s,n);break;case 3:var a=t.updateQueue;if(a!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Gg(t,a,r)}break;case 5:var o=t.stateNode;if(r===null&&t.flags&4){r=o;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var h=c.memoizedState;if(h!==null){var u=h.dehydrated;u!==null&&ko(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(fe(163))}It||t.flags&512&&Sh(t)}catch(m){ft(t,t.return,m)}}if(t===e){be=null;break}if(r=t.sibling,r!==null){r.return=t.return,be=r;break}be=t.return}}function uv(e){for(;be!==null;){var t=be;if(t===e){be=null;break}var r=t.sibling;if(r!==null){r.return=t.return,be=r;break}be=t.return}}function fv(e){for(;be!==null;){var t=be;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Tc(4,t)}catch(l){ft(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var i=t.return;try{n.componentDidMount()}catch(l){ft(t,i,l)}}var s=t.return;try{Sh(t)}catch(l){ft(t,s,l)}break;case 5:var a=t.return;try{Sh(t)}catch(l){ft(t,a,l)}}}catch(l){ft(t,t.return,l)}if(t===e){be=null;break}var o=t.sibling;if(o!==null){o.return=t.return,be=o;break}be=t.return}}var m4=Math.ceil,nc=sn.ReactCurrentDispatcher,tp=sn.ReactCurrentOwner,hr=sn.ReactCurrentBatchConfig,Ue=0,Ct=null,gt=null,xt=0,Qt=0,Ji=Hn(0),wt=0,Oo=null,ui=0,Dc=0,rp=0,uo=null,Wt=null,np=0,ds=1/0,Vr=null,ic=!1,xh=null,Ln=null,Ka=!1,Sn=null,sc=0,fo=0,Eh=null,Sl=-1,Cl=0;function Bt(){return Ue&6?ht():Sl!==-1?Sl:Sl=ht()}function Pn(e){return e.mode&1?Ue&2&&xt!==0?xt&-xt:Q3.transition!==null?(Cl===0&&(Cl=k1()),Cl):(e=Je,e!==0||(e=window.event,e=e===void 0?16:D1(e.type)),e):1}function Sr(e,t,r,n){if(50<fo)throw fo=0,Eh=null,Error(fe(185));qo(e,r,n),(!(Ue&2)||e!==Ct)&&(e===Ct&&(!(Ue&2)&&(Dc|=r),wt===4&&wn(e,xt)),qt(e,n),r===1&&Ue===0&&!(t.mode&1)&&(ds=ht()+500,Ac&&Un()))}function qt(e,t){var r=e.callbackNode;QE(e,t);var n=Hl(e,e===Ct?xt:0);if(n===0)r!==null&&wg(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&wg(r),t===1)e.tag===0?X3(hv.bind(null,e)):J1(hv.bind(null,e)),G3(function(){!(Ue&6)&&Un()}),r=null;else{switch(x1(n)){case 1:r=Pd;break;case 4:r=S1;break;case 16:r=$l;break;case 536870912:r=C1;break;default:r=$l}r=qy(r,$y.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function $y(e,t){if(Sl=-1,Cl=0,Ue&6)throw Error(fe(327));var r=e.callbackNode;if(ns()&&e.callbackNode!==r)return null;var n=Hl(e,e===Ct?xt:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=oc(e,n);else{t=n;var i=Ue;Ue|=2;var s=Uy();(Ct!==e||xt!==t)&&(Vr=null,ds=ht()+500,si(e,t));do try{_4();break}catch(o){Hy(e,o)}while(!0);Hd(),nc.current=s,Ue=i,gt!==null?t=0:(Ct=null,xt=0,t=wt)}if(t!==0){if(t===2&&(i=Zf(e),i!==0&&(n=i,t=Ah(e,i))),t===1)throw r=Oo,si(e,0),wn(e,n),qt(e,ht()),r;if(t===6)wn(e,n);else{if(i=e.current.alternate,!(n&30)&&!g4(i)&&(t=oc(e,n),t===2&&(s=Zf(e),s!==0&&(n=s,t=Ah(e,s))),t===1))throw r=Oo,si(e,0),wn(e,n),qt(e,ht()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(fe(345));case 2:Xn(e,Wt,Vr);break;case 3:if(wn(e,n),(n&130023424)===n&&(t=np+500-ht(),10<t)){if(Hl(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){Bt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ah(Xn.bind(null,e,Wt,Vr),t);break}Xn(e,Wt,Vr);break;case 4:if(wn(e,n),(n&4194240)===n)break;for(t=e.eventTimes,i=-1;0<n;){var a=31-br(n);s=1<<a,a=t[a],a>i&&(i=a),n&=~s}if(n=i,n=ht()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*m4(n/1960))-n,10<n){e.timeoutHandle=ah(Xn.bind(null,e,Wt,Vr),n);break}Xn(e,Wt,Vr);break;case 5:Xn(e,Wt,Vr);break;default:throw Error(fe(329))}}}return qt(e,ht()),e.callbackNode===r?$y.bind(null,e):null}function Ah(e,t){var r=uo;return e.current.memoizedState.isDehydrated&&(si(e,t).flags|=256),e=oc(e,t),e!==2&&(t=Wt,Wt=r,t!==null&&Lh(t)),e}function Lh(e){Wt===null?Wt=e:Wt.push.apply(Wt,e)}function g4(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],s=i.getSnapshot;i=i.value;try{if(!kr(s(),i))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 wn(e,t){for(t&=~rp,t&=~Dc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-br(t),n=1<<r;e[r]=-1,t&=~n}}function hv(e){if(Ue&6)throw Error(fe(327));ns();var t=Hl(e,0);if(!(t&1))return qt(e,ht()),null;var r=oc(e,t);if(e.tag!==0&&r===2){var n=Zf(e);n!==0&&(t=n,r=Ah(e,n))}if(r===1)throw r=Oo,si(e,0),wn(e,t),qt(e,ht()),r;if(r===6)throw Error(fe(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Xn(e,Wt,Vr),qt(e,ht()),null}function ip(e,t){var r=Ue;Ue|=1;try{return e(t)}finally{Ue=r,Ue===0&&(ds=ht()+500,Ac&&Un())}}function fi(e){Sn!==null&&Sn.tag===0&&!(Ue&6)&&ns();var t=Ue;Ue|=1;var r=hr.transition,n=Je;try{if(hr.transition=null,Je=1,e)return e()}finally{Je=n,hr.transition=r,Ue=t,!(Ue&6)&&Un()}}function sp(){Qt=Ji.current,nt(Ji)}function si(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,K3(r)),gt!==null)for(r=gt.return;r!==null;){var n=r;switch(Fd(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Gl();break;case 3:fs(),nt(Kt),nt(Rt),qd();break;case 5:Gd(n);break;case 4:fs();break;case 13:nt(at);break;case 19:nt(at);break;case 10:Ud(n.type._context);break;case 22:case 23:sp()}r=r.return}if(Ct=e,gt=e=Tn(e.current,null),xt=Qt=t,wt=0,Oo=null,rp=Dc=ui=0,Wt=uo=null,ti!==null){for(t=0;t<ti.length;t++)if(r=ti[t],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,s=r.pending;if(s!==null){var a=s.next;s.next=i,n.next=a}r.pending=n}ti=null}return e}function Hy(e,t){do{var r=gt;try{if(Hd(),yl.current=rc,tc){for(var n=lt.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}tc=!1}if(ci=0,St=yt=lt=null,lo=!1,Io=0,tp.current=null,r===null||r.return===null){wt=1,Oo=t,gt=null;break}e:{var s=e,a=r.return,o=r,l=t;if(t=xt,o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,h=o,u=h.tag;if(!(h.mode&1)&&(u===0||u===11||u===15)){var m=h.alternate;m?(h.updateQueue=m.updateQueue,h.memoizedState=m.memoizedState,h.lanes=m.lanes):(h.updateQueue=null,h.memoizedState=null)}var g=Zg(a);if(g!==null){g.flags&=-257,ev(g,a,o,s,t),g.mode&1&&Qg(s,c,t),t=g,l=c;var y=t.updateQueue;if(y===null){var _=new Set;_.add(l),t.updateQueue=_}else y.add(l);break e}else{if(!(t&1)){Qg(s,c,t),op();break e}l=Error(fe(426))}}else if(st&&o.mode&1){var v=Zg(a);if(v!==null){!(v.flags&65536)&&(v.flags|=256),ev(v,a,o,s,t),zd(hs(l,o));break e}}s=l=hs(l,o),wt!==4&&(wt=2),uo===null?uo=[s]:uo.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var d=xy(s,l,t);Kg(s,d);break e;case 1:o=l;var f=s.type,p=s.stateNode;if(!(s.flags&128)&&(typeof f.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Ln===null||!Ln.has(p)))){s.flags|=65536,t&=-t,s.lanes|=t;var w=Ey(s,o,t);Kg(s,w);break e}}s=s.return}while(s!==null)}Vy(r)}catch(S){t=S,gt===r&&r!==null&&(gt=r=r.return);continue}break}while(!0)}function Uy(){var e=nc.current;return nc.current=rc,e===null?rc:e}function op(){(wt===0||wt===3||wt===2)&&(wt=4),Ct===null||!(ui&268435455)&&!(Dc&268435455)||wn(Ct,xt)}function oc(e,t){var r=Ue;Ue|=2;var n=Uy();(Ct!==e||xt!==t)&&(Vr=null,si(e,t));do try{v4();break}catch(i){Hy(e,i)}while(!0);if(Hd(),Ue=r,nc.current=n,gt!==null)throw Error(fe(261));return Ct=null,xt=0,wt}function v4(){for(;gt!==null;)Wy(gt)}function _4(){for(;gt!==null&&!UE();)Wy(gt)}function Wy(e){var t=Gy(e.alternate,e,Qt);e.memoizedProps=e.pendingProps,t===null?Vy(e):gt=t,tp.current=null}function Vy(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=f4(r,t),r!==null){r.flags&=32767,gt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{wt=6,gt=null;return}}else if(r=u4(r,t,Qt),r!==null){gt=r;return}if(t=t.sibling,t!==null){gt=t;return}gt=t=e}while(t!==null);wt===0&&(wt=5)}function Xn(e,t,r){var n=Je,i=hr.transition;try{hr.transition=null,Je=1,y4(e,t,r,n)}finally{hr.transition=i,Je=n}return null}function y4(e,t,r,n){do ns();while(Sn!==null);if(Ue&6)throw Error(fe(327));r=e.finishedWork;var i=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(fe(177));e.callbackNode=null,e.callbackPriority=0;var s=r.lanes|r.childLanes;if(ZE(e,s),e===Ct&&(gt=Ct=null,xt=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Ka||(Ka=!0,qy($l,function(){return ns(),null})),s=(r.flags&15990)!==0,r.subtreeFlags&15990||s){s=hr.transition,hr.transition=null;var a=Je;Je=1;var o=Ue;Ue|=4,tp.current=null,d4(e,r),Fy(r,e),F3(sh),Ul=!!ih,sh=ih=null,e.current=r,p4(r),WE(),Ue=o,Je=a,hr.transition=s}else e.current=r;if(Ka&&(Ka=!1,Sn=e,sc=i),s=e.pendingLanes,s===0&&(Ln=null),GE(r.stateNode),qt(e,ht()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)i=t[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(ic)throw ic=!1,e=xh,xh=null,e;return sc&1&&e.tag!==0&&ns(),s=e.pendingLanes,s&1?e===Eh?fo++:(fo=0,Eh=e):fo=0,Un(),null}function ns(){if(Sn!==null){var e=x1(sc),t=hr.transition,r=Je;try{if(hr.transition=null,Je=16>e?16:e,Sn===null)var n=!1;else{if(e=Sn,Sn=null,sc=0,Ue&6)throw Error(fe(331));var i=Ue;for(Ue|=4,be=e.current;be!==null;){var s=be,a=s.child;if(be.flags&16){var o=s.deletions;if(o!==null){for(var l=0;l<o.length;l++){var c=o[l];for(be=c;be!==null;){var h=be;switch(h.tag){case 0:case 11:case 15:co(8,h,s)}var u=h.child;if(u!==null)u.return=h,be=u;else for(;be!==null;){h=be;var m=h.sibling,g=h.return;if(My(h),h===c){be=null;break}if(m!==null){m.return=g,be=m;break}be=g}}}var y=s.alternate;if(y!==null){var _=y.child;if(_!==null){y.child=null;do{var v=_.sibling;_.sibling=null,_=v}while(_!==null)}}be=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,be=a;else e:for(;be!==null;){if(s=be,s.flags&2048)switch(s.tag){case 0:case 11:case 15:co(9,s,s.return)}var d=s.sibling;if(d!==null){d.return=s.return,be=d;break e}be=s.return}}var f=e.current;for(be=f;be!==null;){a=be;var p=a.child;if(a.subtreeFlags&2064&&p!==null)p.return=a,be=p;else e:for(a=f;be!==null;){if(o=be,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:Tc(9,o)}}catch(S){ft(o,o.return,S)}if(o===a){be=null;break e}var w=o.sibling;if(w!==null){w.return=o.return,be=w;break e}be=o.return}}if(Ue=i,Un(),Mr&&typeof Mr.onPostCommitFiberRoot=="function")try{Mr.onPostCommitFiberRoot(Sc,e)}catch{}n=!0}return n}finally{Je=r,hr.transition=t}}return!1}function dv(e,t,r){t=hs(r,t),t=xy(e,t,1),e=An(e,t,1),t=Bt(),e!==null&&(qo(e,1,t),qt(e,t))}function ft(e,t,r){if(e.tag===3)dv(e,e,r);else for(;t!==null;){if(t.tag===3){dv(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Ln===null||!Ln.has(n))){e=hs(r,e),e=Ey(t,e,1),t=An(t,e,1),e=Bt(),t!==null&&(qo(t,1,e),qt(t,e));break}}t=t.return}}function w4(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Bt(),e.pingedLanes|=e.suspendedLanes&r,Ct===e&&(xt&r)===r&&(wt===4||wt===3&&(xt&130023424)===xt&&500>ht()-np?si(e,0):rp|=r),qt(e,t)}function Ky(e,t){t===0&&(e.mode&1?(t=Ma,Ma<<=1,!(Ma&130023424)&&(Ma=4194304)):t=1);var r=Bt();e=Zr(e,t),e!==null&&(qo(e,t,r),qt(e,r))}function b4(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Ky(e,r)}function S4(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(fe(314))}n!==null&&n.delete(t),Ky(e,r)}var Gy;Gy=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Kt.current)Vt=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Vt=!1,c4(e,t,r);Vt=!!(e.flags&131072)}else Vt=!1,st&&t.flags&1048576&&X1(t,Jl,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;bl(e,t),e=t.pendingProps;var i=ls(t,Rt.current);rs(t,r),i=Jd(null,t,n,e,i,r);var s=Xd();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Gt(n)?(s=!0,ql(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Vd(t),i.updater=Pc,t.stateNode=i,i._reactInternals=t,ph(t,n,e,r),t=vh(null,t,n,!0,s,r)):(t.tag=0,st&&s&&Bd(t),Mt(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(bl(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=k4(n),e=vr(n,e),i){case 0:t=gh(null,t,n,e,r);break e;case 1:t=nv(null,t,n,e,r);break e;case 11:t=tv(null,t,n,e,r);break e;case 14:t=rv(null,t,n,vr(n.type,e),r);break e}throw Error(fe(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:vr(n,i),gh(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:vr(n,i),nv(e,t,n,i,r);case 3:e:{if(Ty(t),e===null)throw Error(fe(387));n=t.pendingProps,s=t.memoizedState,i=s.element,ny(e,t),Zl(t,n,null,r);var a=t.memoizedState;if(n=a.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=hs(Error(fe(423)),t),t=iv(e,t,n,r,i);break e}else if(n!==i){i=hs(Error(fe(424)),t),t=iv(e,t,n,r,i);break e}else for(Zt=En(t.stateNode.containerInfo.firstChild),tr=t,st=!0,yr=null,r=ty(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(cs(),n===i){t=en(e,t,r);break e}Mt(e,t,n,r)}t=t.child}return t;case 5:return iy(t),e===null&&fh(t),n=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,oh(n,i)?a=null:s!==null&&oh(n,s)&&(t.flags|=32),Py(e,t),Mt(e,t,a,r),t.child;case 6:return e===null&&fh(t),null;case 13:return Dy(e,t,r);case 4:return Kd(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=us(t,null,n,r):Mt(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:vr(n,i),tv(e,t,n,i,r);case 7:return Mt(e,t,t.pendingProps,r),t.child;case 8:return Mt(e,t,t.pendingProps.children,r),t.child;case 12:return Mt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,et(Xl,n._currentValue),n._currentValue=a,s!==null)if(kr(s.value,a)){if(s.children===i.children&&!Kt.current){t=en(e,t,r);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var o=s.dependencies;if(o!==null){a=s.child;for(var l=o.firstContext;l!==null;){if(l.context===n){if(s.tag===1){l=Yr(-1,r&-r),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?l.next=l:(l.next=h.next,h.next=l),c.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),hh(s.return,r,t),o.lanes|=r;break}l=l.next}}else if(s.tag===10)a=s.type===t.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(fe(341));a.lanes|=r,o=a.alternate,o!==null&&(o.lanes|=r),hh(a,r,t),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===t){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}Mt(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,rs(t,r),i=dr(i),n=n(i),t.flags|=1,Mt(e,t,n,r),t.child;case 14:return n=t.type,i=vr(n,t.pendingProps),i=vr(n.type,i),rv(e,t,n,i,r);case 15:return Ay(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:vr(n,i),bl(e,t),t.tag=1,Gt(n)?(e=!0,ql(t)):e=!1,rs(t,r),ky(t,n,i),ph(t,n,i,r),vh(null,t,n,!0,e,r);case 19:return Iy(e,t,r);case 22:return Ly(e,t,r)}throw Error(fe(156,t.tag))};function qy(e,t){return b1(e,t)}function C4(e,t,r,n){this.tag=e,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fr(e,t,r,n){return new C4(e,t,r,n)}function ap(e){return e=e.prototype,!(!e||!e.isReactComponent)}function k4(e){if(typeof e=="function")return ap(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ed)return 11;if(e===Ad)return 14}return 2}function Tn(e,t){var r=e.alternate;return r===null?(r=fr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function kl(e,t,r,n,i,s){var a=2;if(n=e,typeof e=="function")ap(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case zi:return oi(r.children,i,s,t);case xd:a=8,i|=8;break;case Bf:return e=fr(12,r,t,i|2),e.elementType=Bf,e.lanes=s,e;case Ff:return e=fr(13,r,t,i),e.elementType=Ff,e.lanes=s,e;case zf:return e=fr(19,r,t,i),e.elementType=zf,e.lanes=s,e;case i1:return Ic(r,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case r1:a=10;break e;case n1:a=9;break e;case Ed:a=11;break e;case Ad:a=14;break e;case vn:a=16,n=null;break e}throw Error(fe(130,e==null?e:typeof e,""))}return t=fr(a,r,t,i),t.elementType=e,t.type=n,t.lanes=s,t}function oi(e,t,r,n){return e=fr(7,e,n,t),e.lanes=r,e}function Ic(e,t,r,n){return e=fr(22,e,n,t),e.elementType=i1,e.lanes=r,e.stateNode={isHidden:!1},e}function Yu(e,t,r){return e=fr(6,e,null,t),e.lanes=r,e}function Ju(e,t,r){return t=fr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function x4(e,t,r,n,i){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=Tu(0),this.expirationTimes=Tu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tu(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function lp(e,t,r,n,i,s,a,o,l){return e=new x4(e,t,r,o,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=fr(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vd(s),e}function E4(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Fi,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Yy(e){if(!e)return On;e=e._reactInternals;e:{if(_i(e)!==e||e.tag!==1)throw Error(fe(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Gt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(fe(171))}if(e.tag===1){var r=e.type;if(Gt(r))return Y1(e,r,t)}return t}function Jy(e,t,r,n,i,s,a,o,l){return e=lp(r,n,!0,e,i,s,a,o,l),e.context=Yy(null),r=e.current,n=Bt(),i=Pn(r),s=Yr(n,i),s.callback=t??null,An(r,s,i),e.current.lanes=i,qo(e,i,n),qt(e,n),e}function Nc(e,t,r,n){var i=t.current,s=Bt(),a=Pn(i);return r=Yy(r),t.context===null?t.context=r:t.pendingContext=r,t=Yr(s,a),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=An(i,t,a),e!==null&&(Sr(e,i,a,s),_l(e,i,a)),a}function ac(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 pv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function cp(e,t){pv(e,t),(e=e.alternate)&&pv(e,t)}function A4(){return null}var Xy=typeof reportError=="function"?reportError:function(e){console.error(e)};function up(e){this._internalRoot=e}Rc.prototype.render=up.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(fe(409));Nc(e,t,null,null)};Rc.prototype.unmount=up.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fi(function(){Nc(null,e,null,null)}),t[Qr]=null}};function Rc(e){this._internalRoot=e}Rc.prototype.unstable_scheduleHydration=function(e){if(e){var t=L1();e={blockedOn:null,target:e,priority:t};for(var r=0;r<yn.length&&t!==0&&t<yn[r].priority;r++);yn.splice(r,0,e),r===0&&T1(e)}};function fp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Oc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function mv(){}function L4(e,t,r,n,i){if(i){if(typeof n=="function"){var s=n;n=function(){var c=ac(a);s.call(c)}}var a=Jy(t,n,e,0,null,!1,!1,"",mv);return e._reactRootContainer=a,e[Qr]=a.current,Ao(e.nodeType===8?e.parentNode:e),fi(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var o=n;n=function(){var c=ac(l);o.call(c)}}var l=lp(e,0,!1,null,null,!1,!1,"",mv);return e._reactRootContainer=l,e[Qr]=l.current,Ao(e.nodeType===8?e.parentNode:e),fi(function(){Nc(t,l,r,n)}),l}function Mc(e,t,r,n,i){var s=r._reactRootContainer;if(s){var a=s;if(typeof i=="function"){var o=i;i=function(){var l=ac(a);o.call(l)}}Nc(t,a,e,i)}else a=L4(r,t,e,i,n);return ac(a)}E1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Zs(t.pendingLanes);r!==0&&(Td(t,r|1),qt(t,ht()),!(Ue&6)&&(ds=ht()+500,Un()))}break;case 13:fi(function(){var n=Zr(e,1);if(n!==null){var i=Bt();Sr(n,e,1,i)}}),cp(e,1)}};Dd=function(e){if(e.tag===13){var t=Zr(e,134217728);if(t!==null){var r=Bt();Sr(t,e,134217728,r)}cp(e,134217728)}};A1=function(e){if(e.tag===13){var t=Pn(e),r=Zr(e,t);if(r!==null){var n=Bt();Sr(r,e,t,n)}cp(e,t)}};L1=function(){return Je};P1=function(e,t){var r=Je;try{return Je=e,t()}finally{Je=r}};Jf=function(e,t,r){switch(t){case"input":if(Uf(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var i=Ec(n);if(!i)throw Error(fe(90));o1(n),Uf(n,i)}}}break;case"textarea":l1(e,r);break;case"select":t=r.value,t!=null&&Qi(e,!!r.multiple,t,!1)}};m1=ip;g1=fi;var P4={usingClientEntryPoint:!1,Events:[Jo,Wi,Ec,d1,p1,ip]},Vs={findFiberByHostInstance:ei,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},T4={bundleType:Vs.bundleType,version:Vs.version,rendererPackageName:Vs.rendererPackageName,rendererConfig:Vs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:sn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=y1(e),e===null?null:e.stateNode},findFiberByHostInstance:Vs.findFiberByHostInstance||A4,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 Ga=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ga.isDisabled&&Ga.supportsFiber)try{Sc=Ga.inject(T4),Mr=Ga}catch{}}ir.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P4;ir.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!fp(t))throw Error(fe(200));return E4(e,t,null,r)};ir.createRoot=function(e,t){if(!fp(e))throw Error(fe(299));var r=!1,n="",i=Xy;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=lp(e,1,!1,null,null,r,!1,n,i),e[Qr]=t.current,Ao(e.nodeType===8?e.parentNode:e),new up(t)};ir.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(fe(188)):(e=Object.keys(e).join(","),Error(fe(268,e)));return e=y1(t),e=e===null?null:e.stateNode,e};ir.flushSync=function(e){return fi(e)};ir.hydrate=function(e,t,r){if(!Oc(t))throw Error(fe(200));return Mc(null,e,t,!0,r)};ir.hydrateRoot=function(e,t,r){if(!fp(e))throw Error(fe(405));var n=r!=null&&r.hydratedSources||null,i=!1,s="",a=Xy;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),t=Jy(t,null,e,1,r??null,i,!1,s,a),e[Qr]=t.current,Ao(e),n)for(e=0;e<n.length;e++)r=n[e],i=r._getVersion,i=i(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new Rc(t)};ir.render=function(e,t,r){if(!Oc(t))throw Error(fe(200));return Mc(null,e,t,!1,r)};ir.unmountComponentAtNode=function(e){if(!Oc(e))throw Error(fe(40));return e._reactRootContainer?(fi(function(){Mc(null,null,e,!1,function(){e._reactRootContainer=null,e[Qr]=null})}),!0):!1};ir.unstable_batchedUpdates=ip;ir.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Oc(r))throw Error(fe(200));if(e==null||e._reactInternals===void 0)throw Error(fe(38));return Mc(e,t,r,!1,n)};ir.version="18.3.1-next-f1338f8080-20240426";function Qy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Qy)}catch(e){console.error(e)}}Qy(),Q0.exports=ir;var hp=Q0.exports;const D4=yc(hp);var Zy,gv=hp;Zy=gv.createRoot,gv.hydrateRoot;const I4="modulepreload",N4=function(e){return"/"+e},vv={},bs=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),o=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=Promise.allSettled(r.map(l=>{if(l=N4(l),l in vv)return;vv[l]=!0;const c=l.endsWith(".css"),h=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${h}`))return;const u=document.createElement("link");if(u.rel=c?"stylesheet":I4,c||(u.as="script"),u.crossOrigin="",u.href=l,o&&u.setAttribute("nonce",o),document.head.appendChild(u),c)return new Promise((m,g)=>{u.addEventListener("load",m),u.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return i.then(a=>{for(const o of a||[])o.status==="rejected"&&s(o.reason);return t().catch(s)})};function _v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_v(Object(r),!0).forEach(function(n){Ph(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_v(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ph(e,t,r){return(t=function(n){var i=function(s,a){if(typeof s!="object"||s===null)return s;var o=s[Symbol.toPrimitive];if(o!==void 0){var l=o.call(s,a);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(s)}(n,"string");return typeof i=="symbol"?i:String(i)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ps(e,t){if(e==null)return{};var r,n,i=function(a,o){if(a==null)return{};var l,c,h={},u=Object.keys(a);for(c=0;c<u.length;c++)l=u[c],o.indexOf(l)>=0||(h[l]=a[l]);return h}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function xr(e,t){return O4(e)||function(r,n){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var s,a,o,l,c=[],h=!0,u=!1;try{if(o=(i=i.call(r)).next,n===0){if(Object(i)!==i)return;h=!1}else for(;!(h=(s=o.call(i)).done)&&(c.push(s.value),c.length!==n);h=!0);}catch(m){u=!0,a=m}finally{try{if(!h&&i.return!=null&&(l=i.return(),Object(l)!==l))return}finally{if(u)throw a}}return c}}(e,t)||dp(e,t)||j4()}function R4(e){return function(t){if(Array.isArray(t))return Th(t)}(e)||M4(e)||dp(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
41
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function O4(e){if(Array.isArray(e))return e}function M4(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dp(e,t){if(e){if(typeof e=="string")return Th(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Th(e,t):void 0}}function Th(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function j4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
42
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B4(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=dp(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
43
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var l=r.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{a||r.return==null||r.return()}finally{if(o)throw s}}}}var qa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qo(e,t){return e(t={exports:{}},t.exports),t.exports}var er=Qo(function(e){/*!
44
+ Copyright (c) 2018 Jed Watson.
45
+ Licensed under the MIT License (MIT), see
46
+ http://jedwatson.github.io/classnames
47
+ */(function(){var t={}.hasOwnProperty;function r(){for(var n=[],i=0;i<arguments.length;i++){var s=arguments[i];if(s){var a=typeof s;if(a==="string"||a==="number")n.push(s);else if(Array.isArray(s)){if(s.length){var o=r.apply(null,s);o&&n.push(o)}}else if(a==="object"){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){n.push(s.toString());continue}for(var l in s)t.call(s,l)&&s[l]&&n.push(l)}}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}),Ht={hunkClassName:"",lineClassName:"",gutterClassName:"",codeClassName:"",monotonous:!1,gutterType:"default",viewType:"split",widgets:{},hideGutter:!1,selectedChanges:[],generateAnchorID:function(){},generateLineClassName:function(){},renderGutter:function(e){var t=e.renderDefault;return(0,e.wrapInAnchor)(t())},codeEvents:{},gutterEvents:{}},ew=k.createContext(Ht),F4=ew.Provider,z4=function(){return k.useContext(ew)},$4=Qo(function(e,t){(function(r){function n(s){var a=s.slice(11),o=null,l=null;switch(a.indexOf('"')){case-1:o=(u=a.split(" "))[0].slice(2),l=u[1].slice(2);break;case 0:var c=a.indexOf('"',2);o=a.slice(3,c);var h=a.indexOf('"',c+1);l=h<0?a.slice(c+4):a.slice(h+3,-1);break;default:var u;o=(u=a.split(" "))[0].slice(2),l=u[1].slice(3,-1)}return{oldPath:o,newPath:l}}var i={parse:function(s){for(var a,o,l,c,h,u=[],m=2,g=s.split(`
48
+ `),y=g.length,_=0;_<y;){var v=g[_];if(v.indexOf("diff --git")===0){a={hunks:[],oldEndingNewLine:!0,newEndingNewLine:!0,oldPath:(h=n(v)).oldPath,newPath:h.newPath},u.push(a);var d,f=null;e:for(;d=g[++_];){var p=d.indexOf(" "),w=p>-1?d.slice(0,p):w;switch(w){case"diff":_--;break e;case"deleted":case"new":var S=d.slice(p+1);S.indexOf("file mode")===0&&(a[w==="new"?"newMode":"oldMode"]=S.slice(10));break;case"similarity":a.similarity=parseInt(d.split(" ")[2],10);break;case"index":var b=d.slice(p+1).split(" "),x=b[0].split("..");a.oldRevision=x[0],a.newRevision=x[1],b[1]&&(a.oldMode=a.newMode=b[1]);break;case"copy":case"rename":var C=d.slice(p+1);C.indexOf("from")===0?a.oldPath=C.slice(5):a.newPath=C.slice(3),f=w;break;case"---":var A=d.slice(p+1),T=g[++_].slice(4);A==="/dev/null"?(T=T.slice(2),f="add"):T==="/dev/null"?(A=A.slice(2),f="delete"):(f="modify",A=A.slice(2),T=T.slice(2)),A&&(a.oldPath=A),T&&(a.newPath=T),m=5;break e}}a.type=f||"modify"}else if(v.indexOf("Binary")===0)a.isBinary=!0,a.type=v.indexOf("/dev/null and")>=0?"add":v.indexOf("and /dev/null")>=0?"delete":"modify",m=2,a=null;else if(m===5)if(v.indexOf("@@")===0){var j=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(v);o={content:v,oldStart:j[1]-0,newStart:j[4]-0,oldLines:j[3]-0||1,newLines:j[6]-0||1,changes:[]},a.hunks.push(o),l=o.oldStart,c=o.newStart}else{var M=v.slice(0,1),O={content:v.slice(1)};switch(M){case"+":O.type="insert",O.isInsert=!0,O.lineNumber=c,c++;break;case"-":O.type="delete",O.isDelete=!0,O.lineNumber=l,l++;break;case" ":O.type="normal",O.isNormal=!0,O.oldLineNumber=l,O.newLineNumber=c,l++,c++;break;case"\\":var z=o.changes[o.changes.length-1];z.isDelete||(a.newEndingNewLine=!1),z.isInsert||(a.oldEndingNewLine=!1)}O.type&&o.changes.push(O)}_++}return u}};e.exports=i})()});function Zo(e){return e.type==="insert"}function Dn(e){return e.type==="delete"}function Mo(e){return e.type==="normal"}function H4(e,t){var r=t.nearbySequences==="zip"?function(n){var i=n.reduce(function(s,a,o){var l=xr(s,3),c=l[0],h=l[1],u=l[2];return h?Zo(a)&&u>=0?(c.splice(u+1,0,a),[c,a,u+2]):(c.push(a),[c,a,Dn(a)&&Dn(h)?u:o]):(c.push(a),[c,a,Dn(a)?o:-1])},[[],null,-1]);return xr(i,1)[0]}(e.changes):e.changes;return dt(dt({},e),{},{isPlain:!1,changes:r})}function U4(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=function(n){if(n.startsWith("diff --git"))return n;var i=n.indexOf(`
49
+ `),s=n.indexOf(`
50
+ `,i+1),a=n.slice(0,i),o=n.slice(i+1,s),l=a.split(" ").slice(1,-3).join(" "),c=o.split(" ").slice(1,-3).join(" ");return["diff --git a/".concat(l," b/").concat(c),"index 1111111..2222222 100644","--- a/".concat(l),"+++ b/".concat(c),n.slice(s+1)].join(`
51
+ `)}(e.trimStart());return $4.parse(r).map(function(n){return function(i,s){var a=i.hunks.map(function(o){return H4(o,s)});return dt(dt({},i),{},{hunks:a})}(n,t)})}function W4(e){return e[0]}function V4(e){return e[e.length-1]}function Dh(e){return["".concat(e,"Start"),"".concat(e,"Lines")]}function jo(e){return e==="old"?function(t){return Zo(t)?-1:Mo(t)?t.oldLineNumber:t.lineNumber}:function(t){return Dn(t)?-1:Mo(t)?t.newLineNumber:t.lineNumber}}function tw(e,t){return function(r,n){var i=r[e],s=i+r[t];return n>=i&&n<s}}function K4(e,t){return function(r,n,i){var s=r[e]+r[t],a=n[e];return i>=s&&i<a}}function rw(e){var t=jo(e),r=function(n){var i=xr(Dh(n),2),s=tw(i[0],i[1]);return function(a,o){return a.find(function(l){return s(l,o)})}}(e);return function(n,i){var s=r(n,i);if(s)return s.changes.find(function(a){return t(a)===i})}}function pp(e){var t=e==="old"?"new":"old",r=xr(Dh(e),2),n=r[0],i=r[1],s=xr(Dh(t),2),a=s[0],o=s[1],l=jo(e),c=jo(t),h=tw(n,i),u=K4(n,i);return function(m,g){var y=W4(m);if(g<y[n]){var _=y[n]-g;return y[a]-_}var v=V4(m);if(v[n]+v[i]<=g){var d=g-v[n]-v[i];return v[a]+v[o]+d}for(var f=0;f<m.length;f++){var p=m[f],w=m[f+1];if(h(p,g)){var S=p.changes.findIndex(function(j){return l(j)===g}),b=p.changes[S];if(Mo(b))return c(b);var x=Dn(b)?S+1:S-1,C=p.changes[x];if(!C)return-1;var A=Zo(b)?"delete":"insert";return C.type===A?c(C):-1}if(u(p,w,g)){var T=g-p[n]-p[i];return p[a]+p[o]+T}}throw new Error("Unexpected line position ".concat(g))}}var G4=function(){this.__data__=[],this.size=0},nw=function(e,t){return e===t||e!=e&&t!=t},jc=function(e,t){for(var r=e.length;r--;)if(nw(e[r][0],t))return r;return-1},q4=Array.prototype.splice,Y4=function(e){var t=this.__data__,r=jc(t,e);return!(r<0)&&(r==t.length-1?t.pop():q4.call(t,r,1),--this.size,!0)},J4=function(e){var t=this.__data__,r=jc(t,e);return r<0?void 0:t[r][1]},X4=function(e){return jc(this.__data__,e)>-1},Q4=function(e,t){var r=this.__data__,n=jc(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function Ii(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ii.prototype.clear=G4,Ii.prototype.delete=Y4,Ii.prototype.get=J4,Ii.prototype.has=X4,Ii.prototype.set=Q4;var Bc=Ii,Z4=function(){this.__data__=new Bc,this.size=0},eA=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},tA=function(e){return this.__data__.get(e)},rA=function(e){return this.__data__.has(e)},iw=typeof qa=="object"&&qa&&qa.Object===Object&&qa,nA=typeof self=="object"&&self&&self.Object===Object&&self,on=iw||nA||Function("return this")(),Br=on.Symbol,sw=Object.prototype,iA=sw.hasOwnProperty,sA=sw.toString,Ks=Br?Br.toStringTag:void 0,oA=function(e){var t=iA.call(e,Ks),r=e[Ks];try{e[Ks]=void 0;var n=!0}catch{}var i=sA.call(e);return n&&(t?e[Ks]=r:delete e[Ks]),i},aA=Object.prototype.toString,lA=function(e){return aA.call(e)},yv=Br?Br.toStringTag:void 0,Ss=function(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":yv&&yv in Object(e)?oA(e):lA(e)},mp=function(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")},ow=function(e){if(!mp(e))return!1;var t=Ss(e);return t=="[object Function]"||t=="[object GeneratorFunction]"||t=="[object AsyncFunction]"||t=="[object Proxy]"},Xu=on["__core-js_shared__"],wv=function(){var e=/[^.]+$/.exec(Xu&&Xu.keys&&Xu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),cA=function(e){return!!wv&&wv in e},uA=Function.prototype.toString,yi=function(e){if(e!=null){try{return uA.call(e)}catch{}try{return e+""}catch{}}return""},fA=/^\[object .+?Constructor\]$/,hA=Function.prototype,dA=Object.prototype,pA=hA.toString,mA=dA.hasOwnProperty,gA=RegExp("^"+pA.call(mA).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vA=function(e){return!(!mp(e)||cA(e))&&(ow(e)?gA:fA).test(yi(e))},_A=function(e,t){return e==null?void 0:e[t]},wi=function(e,t){var r=_A(e,t);return vA(r)?r:void 0},Bo=wi(on,"Map"),Fo=wi(Object,"create"),yA=function(){this.__data__=Fo?Fo(null):{},this.size=0},wA=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},bA=Object.prototype.hasOwnProperty,SA=function(e){var t=this.__data__;if(Fo){var r=t[e];return r==="__lodash_hash_undefined__"?void 0:r}return bA.call(t,e)?t[e]:void 0},CA=Object.prototype.hasOwnProperty,kA=function(e){var t=this.__data__;return Fo?t[e]!==void 0:CA.call(t,e)},xA=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Fo&&t===void 0?"__lodash_hash_undefined__":t,this};function Ni(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ni.prototype.clear=yA,Ni.prototype.delete=wA,Ni.prototype.get=SA,Ni.prototype.has=kA,Ni.prototype.set=xA;var bv=Ni,EA=function(){this.size=0,this.__data__={hash:new bv,map:new(Bo||Bc),string:new bv}},AA=function(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null},Fc=function(e,t){var r=e.__data__;return AA(t)?r[typeof t=="string"?"string":"hash"]:r.map},LA=function(e){var t=Fc(this,e).delete(e);return this.size-=t?1:0,t},PA=function(e){return Fc(this,e).get(e)},TA=function(e){return Fc(this,e).has(e)},DA=function(e,t){var r=Fc(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function Ri(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ri.prototype.clear=EA,Ri.prototype.delete=LA,Ri.prototype.get=PA,Ri.prototype.has=TA,Ri.prototype.set=DA;var zc=Ri,IA=function(e,t){var r=this.__data__;if(r instanceof Bc){var n=r.__data__;if(!Bo||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new zc(n)}return r.set(e,t),this.size=r.size,this};function Oi(e){var t=this.__data__=new Bc(e);this.size=t.size}Oi.prototype.clear=Z4,Oi.prototype.delete=eA,Oi.prototype.get=tA,Oi.prototype.has=rA,Oi.prototype.set=IA;var xl=Oi,NA=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},RA=function(e){return this.__data__.has(e)};function El(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new zc;++t<r;)this.add(e[t])}El.prototype.add=El.prototype.push=NA,El.prototype.has=RA;var OA=El,MA=function(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1},jA=function(e,t){return e.has(t)},aw=function(e,t,r,n,i,s){var a=1&r,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var c=s.get(e),h=s.get(t);if(c&&h)return c==t&&h==e;var u=-1,m=!0,g=2&r?new OA:void 0;for(s.set(e,t),s.set(t,e);++u<o;){var y=e[u],_=t[u];if(n)var v=a?n(_,y,u,t,e,s):n(y,_,u,e,t,s);if(v!==void 0){if(v)continue;m=!1;break}if(g){if(!MA(t,function(d,f){if(!jA(g,f)&&(y===d||i(y,d,r,n,s)))return g.push(f)})){m=!1;break}}else if(y!==_&&!i(y,_,r,n,s)){m=!1;break}}return s.delete(e),s.delete(t),m},Sv=on.Uint8Array,BA=function(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r},FA=function(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r},Cv=Br?Br.prototype:void 0,Qu=Cv?Cv.valueOf:void 0,zA=function(e,t,r,n,i,s,a){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!s(new Sv(e),new Sv(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return nw(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var o=BA;case"[object Set]":var l=1&n;if(o||(o=FA),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;n|=2,a.set(e,t);var h=aw(o(e),o(t),n,i,s,a);return a.delete(e),h;case"[object Symbol]":if(Qu)return Qu.call(e)==Qu.call(t)}return!1},$A=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e},tn=Array.isArray,HA=function(e,t,r){var n=t(e);return tn(e)?n:$A(n,r(e))},UA=function(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s},WA=function(){return[]},VA=Object.prototype.propertyIsEnumerable,kv=Object.getOwnPropertySymbols,KA=kv?function(e){return e==null?[]:(e=Object(e),UA(kv(e),function(t){return VA.call(e,t)}))}:WA,GA=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n},ms=function(e){return e!=null&&typeof e=="object"},xv=function(e){return ms(e)&&Ss(e)=="[object Arguments]"},lw=Object.prototype,qA=lw.hasOwnProperty,YA=lw.propertyIsEnumerable,cw=xv(function(){return arguments}())?xv:function(e){return ms(e)&&qA.call(e,"callee")&&!YA.call(e,"callee")},JA=function(){return!1},Ih=Qo(function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,i=n&&n.exports===r?on.Buffer:void 0,s=(i?i.isBuffer:void 0)||JA;e.exports=s}),XA=/^(?:0|[1-9]\d*)$/,uw=function(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&(r=="number"||r!="symbol"&&XA.test(e))&&e>-1&&e%1==0&&e<t},gp=function(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=9007199254740991},rt={};rt["[object Float32Array]"]=rt["[object Float64Array]"]=rt["[object Int8Array]"]=rt["[object Int16Array]"]=rt["[object Int32Array]"]=rt["[object Uint8Array]"]=rt["[object Uint8ClampedArray]"]=rt["[object Uint16Array]"]=rt["[object Uint32Array]"]=!0,rt["[object Arguments]"]=rt["[object Array]"]=rt["[object ArrayBuffer]"]=rt["[object Boolean]"]=rt["[object DataView]"]=rt["[object Date]"]=rt["[object Error]"]=rt["[object Function]"]=rt["[object Map]"]=rt["[object Number]"]=rt["[object Object]"]=rt["[object RegExp]"]=rt["[object Set]"]=rt["[object String]"]=rt["[object WeakMap]"]=!1;var QA=function(e){return ms(e)&&gp(e.length)&&!!rt[Ss(e)]},ZA=function(e){return function(t){return e(t)}},Ev=Qo(function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,i=n&&n.exports===r&&iw.process,s=function(){try{var a=n&&n.require&&n.require("util").types;return a||i&&i.binding&&i.binding("util")}catch{}}();e.exports=s}),Av=Ev&&Ev.isTypedArray,fw=Av?ZA(Av):QA,e5=Object.prototype.hasOwnProperty,t5=function(e,t){var r=tn(e),n=!r&&cw(e),i=!r&&!n&&Ih(e),s=!r&&!n&&!i&&fw(e),a=r||n||i||s,o=a?GA(e.length,String):[],l=o.length;for(var c in e)!e5.call(e,c)||a&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||uw(c,l))||o.push(c);return o},r5=Object.prototype,n5=function(e){var t=e&&e.constructor;return e===(typeof t=="function"&&t.prototype||r5)},i5=function(e,t){return function(r){return e(t(r))}}(Object.keys,Object),s5=Object.prototype.hasOwnProperty,o5=function(e){if(!n5(e))return i5(e);var t=[];for(var r in Object(e))s5.call(e,r)&&r!="constructor"&&t.push(r);return t},a5=function(e){return e!=null&&gp(e.length)&&!ow(e)},vp=function(e){return a5(e)?t5(e):o5(e)},Lv=function(e){return HA(e,vp,KA)},l5=Object.prototype.hasOwnProperty,c5=function(e,t,r,n,i,s){var a=1&r,o=Lv(e),l=o.length;if(l!=Lv(t).length&&!a)return!1;for(var c=l;c--;){var h=o[c];if(!(a?h in t:l5.call(t,h)))return!1}var u=s.get(e),m=s.get(t);if(u&&m)return u==t&&m==e;var g=!0;s.set(e,t),s.set(t,e);for(var y=a;++c<l;){var _=e[h=o[c]],v=t[h];if(n)var d=a?n(v,_,h,t,e,s):n(_,v,h,e,t,s);if(!(d===void 0?_===v||i(_,v,r,n,s):d)){g=!1;break}y||(y=h=="constructor")}if(g&&!y){var f=e.constructor,p=t.constructor;f==p||!("constructor"in e)||!("constructor"in t)||typeof f=="function"&&f instanceof f&&typeof p=="function"&&p instanceof p||(g=!1)}return s.delete(e),s.delete(t),g},Nh=wi(on,"DataView"),Rh=wi(on,"Promise"),Oh=wi(on,"Set"),Mh=wi(on,"WeakMap"),u5=yi(Nh),f5=yi(Bo),h5=yi(Rh),d5=yi(Oh),p5=yi(Mh),Qn=Ss;(Nh&&Qn(new Nh(new ArrayBuffer(1)))!="[object DataView]"||Bo&&Qn(new Bo)!="[object Map]"||Rh&&Qn(Rh.resolve())!="[object Promise]"||Oh&&Qn(new Oh)!="[object Set]"||Mh&&Qn(new Mh)!="[object WeakMap]")&&(Qn=function(e){var t=Ss(e),r=t=="[object Object]"?e.constructor:void 0,n=r?yi(r):"";if(n)switch(n){case u5:return"[object DataView]";case f5:return"[object Map]";case h5:return"[object Promise]";case d5:return"[object Set]";case p5:return"[object WeakMap]"}return t});var Pv=Qn,Ya="[object Object]",Tv=Object.prototype.hasOwnProperty,m5=function(e,t,r,n,i,s){var a=tn(e),o=tn(t),l=a?"[object Array]":Pv(e),c=o?"[object Array]":Pv(t),h=(l=l=="[object Arguments]"?Ya:l)==Ya,u=(c=c=="[object Arguments]"?Ya:c)==Ya,m=l==c;if(m&&Ih(e)){if(!Ih(t))return!1;a=!0,h=!1}if(m&&!h)return s||(s=new xl),a||fw(e)?aw(e,t,r,n,i,s):zA(e,t,l,r,n,i,s);if(!(1&r)){var g=h&&Tv.call(e,"__wrapped__"),y=u&&Tv.call(t,"__wrapped__");if(g||y){var _=g?e.value():e,v=y?t.value():t;return s||(s=new xl),i(_,v,r,n,s)}}return!!m&&(s||(s=new xl),c5(e,t,r,n,i,s))},hw=function e(t,r,n,i,s){return t===r||(t==null||r==null||!ms(t)&&!ms(r)?t!=t&&r!=r:m5(t,r,n,i,e,s))},g5=function(e,t,r,n){var i=r.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var a=r[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<s;){var o=(a=r[i])[0],l=e[o],c=a[1];if(a[2]){if(l===void 0&&!(o in e))return!1}else{var h=new xl,u;if(!(u===void 0?hw(c,l,3,n,h):u))return!1}}return!0},dw=function(e){return e==e&&!mp(e)},v5=function(e){for(var t=vp(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,dw(i)]}return t},pw=function(e,t){return function(r){return r!=null&&r[e]===t&&(t!==void 0||e in Object(r))}},_5=function(e){var t=v5(e);return t.length==1&&t[0][2]?pw(t[0][0],t[0][1]):function(r){return r===e||g5(r,e,t)}},_p=function(e){return typeof e=="symbol"||ms(e)&&Ss(e)=="[object Symbol]"},y5=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,w5=/^\w*$/,yp=function(e,t){if(tn(e))return!1;var r=typeof e;return!(r!="number"&&r!="symbol"&&r!="boolean"&&e!=null&&!_p(e))||w5.test(e)||!y5.test(e)||t!=null&&e in Object(t)};function wp(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(wp.Cache||zc),r}wp.Cache=zc;var b5=wp,S5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,C5=/\\(\\)?/g,k5=function(e){var t=b5(e,function(n){return r.size===500&&r.clear(),n}),r=t.cache;return t}(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(S5,function(r,n,i,s){t.push(i?s.replace(C5,"$1"):n||r)}),t}),x5=function(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i},Dv=Br?Br.prototype:void 0,Iv=Dv?Dv.toString:void 0,E5=function e(t){if(typeof t=="string")return t;if(tn(t))return x5(t,e)+"";if(_p(t))return Iv?Iv.call(t):"";var r=t+"";return r=="0"&&1/t==-1/0?"-0":r},A5=function(e){return e==null?"":E5(e)},mw=function(e,t){return tn(e)?e:yp(e,t)?[e]:k5(A5(e))},$c=function(e){if(typeof e=="string"||_p(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t},gw=function(e,t){for(var r=0,n=(t=mw(t,e)).length;e!=null&&r<n;)e=e[$c(t[r++])];return r&&r==n?e:void 0},L5=function(e,t,r){var n=e==null?void 0:gw(e,t);return n===void 0?r:n},P5=function(e,t){return e!=null&&t in Object(e)},T5=function(e,t,r){for(var n=-1,i=(t=mw(t,e)).length,s=!1;++n<i;){var a=$c(t[n]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++n!=i?s:!!(i=e==null?0:e.length)&&gp(i)&&uw(a,i)&&(tn(e)||cw(e))},D5=function(e,t){return e!=null&&T5(e,t,P5)},I5=function(e,t){return yp(e)&&dw(t)?pw($c(e),t):function(r){var n=L5(r,e);return n===void 0&&n===t?D5(r,e):hw(t,n,3)}},N5=function(e){return e},R5=function(e){return function(t){return t==null?void 0:t[e]}},O5=function(e){return function(t){return gw(t,e)}},M5=function(e){return yp(e)?R5($c(e)):O5(e)},j5=function(e){return typeof e=="function"?e:e==null?N5:typeof e=="object"?tn(e)?I5(e[0],e[1]):_5(e):M5(e)};function In(e){if(!e)throw new Error("change is not provided");if(Mo(e))return"N".concat(e.oldLineNumber);var t=Zo(e)?"I":"D";return"".concat(t).concat(e.lineNumber)}pp("old");var bp=jo("old"),Sp=jo("new");rw("old");rw("new");pp("new");pp("old");var Nv=function(){try{var e=wi(Object,"defineProperty");return e({},"",{}),e}catch{}}(),B5=function(e,t,r){t=="__proto__"&&Nv?Nv(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},F5=function(e){return function(t,r,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var l=a[++i];if(r(s[l],l,s)===!1)break}return t}},z5=F5(),$5=function(e,t){return e&&z5(e,t,vp)},vw=function(e,t){var r={};return t=j5(t),$5(e,function(n,i,s){B5(r,i,t(n,i,s))}),r},H5=["changeKey","text","tokens","renderToken"],Rv=function e(t,r){var n=t.type,i=t.value,s=t.markType,a=t.properties,o=t.className,l=t.children,c=function(u){return E.jsx("span",{className:u,children:i||l&&l.map(e)},r)};switch(n){case"text":return i;case"mark":return c("diff-code-mark diff-code-mark-".concat(s));case"edit":return c("diff-code-edit");default:var h=a&&a.className;return c(er(o||h))}};function U5(e){if(!Array.isArray(e))return!0;if(e.length>1)return!1;if(e.length===1){var t=xr(e,1)[0];return t.type==="text"&&!t.value}return!0}function W5(e){var t=e.changeKey,r=e.text,n=e.tokens,i=e.renderToken,s=ps(e,H5),a=i?function(o,l){return i(o,Rv,l)}:Rv;return E.jsx("td",dt(dt({},s),{},{"data-change-key":t,children:n?U5(n)?" ":n.map(a):r||" "}))}var _w=k.memo(W5);function yw(e,t){return function(){var r=t==="old"?bp(e):Sp(e);return r===-1?void 0:r}}function ww(e,t){return function(r){return e&&r?E.jsx("a",{href:t?"#"+t:void 0,children:r}):r}}function lc(e,t){return t?function(r){e(),t(r)}:e}function Ov(e,t,r,n){return k.useMemo(function(){var i=vw(e,function(s){return function(a){return s&&s(t,a)}});return i.onMouseEnter=lc(r,i.onMouseEnter),i.onMouseLeave=lc(n,i.onMouseLeave),i},[e,r,n,t])}function Mv(e,t,r,n,i,s,a,o,l){var c={change:t,side:n,inHoverState:o,renderDefault:yw(t,n),wrapInAnchor:ww(i,s)};return E.jsx("td",dt(dt({className:e},a),{},{"data-change-key":r,children:l(c)}))}function V5(e){var t,r,n,i=e.change,s=e.selected,a=e.tokens,o=e.className,l=e.generateLineClassName,c=e.gutterClassName,h=e.codeClassName,u=e.gutterEvents,m=e.codeEvents,g=e.hideGutter,y=e.gutterAnchor,_=e.generateAnchorID,v=e.renderToken,d=e.renderGutter,f=i.type,p=i.content,w=In(i),S=(t=xr(k.useState(!1),2),r=t[0],n=t[1],[r,k.useCallback(function(){return n(!0)},[]),k.useCallback(function(){return n(!1)},[])]),b=xr(S,3),x=b[0],C=b[1],A=b[2],T=k.useMemo(function(){return{change:i}},[i]),j=Ov(u,T,C,A),M=Ov(m,T,C,A),O=_(i),z=l({changes:[i],defaultGenerate:function(){return o}}),$=er("diff-gutter","diff-gutter-".concat(f),c,{"diff-gutter-selected":s}),Y=er("diff-code","diff-code-".concat(f),h,{"diff-code-selected":s});return E.jsxs("tr",{id:O,className:er("diff-line",z),children:[!g&&Mv($,i,w,"old",y,O,j,x,d),!g&&Mv($,i,w,"new",y,O,j,x,d),E.jsx(_w,dt({className:Y,changeKey:w,text:p,tokens:a,renderToken:v},M))]})}var K5=k.memo(V5);function G5(e){var t=e.hideGutter,r=e.element;return E.jsx("tr",{className:"diff-widget",children:E.jsx("td",{colSpan:t?1:3,className:"diff-widget-content",children:r})})}var q5=["hideGutter","selectedChanges","tokens","lineClassName"],Y5=["hunk","widgets","className"];function J5(e){var t=e.hunk,r=e.widgets,n=e.className,i=ps(e,Y5),s=function(a,o){return a.reduce(function(l,c){var h=In(c);l.push(["change",h,c]);var u=o[h];return u&&l.push(["widget",h,u]),l},[])}(t.changes,r);return E.jsx("tbody",{className:er("diff-hunk",n),children:s.map(function(a){return function(o,l){var c=xr(o,3),h=c[0],u=c[1],m=c[2],g=l.hideGutter,y=l.selectedChanges,_=l.tokens,v=l.lineClassName,d=ps(l,q5);if(h==="change"){var f=Dn(m)?"old":"new",p=Dn(m)?bp(m):Sp(m),w=_?_[f][p-1]:null;return E.jsx(K5,dt({className:v,change:m,hideGutter:g,selected:y.includes(u),tokens:w},d),"change".concat(u))}return h==="widget"?E.jsx(G5,{hideGutter:g,element:m},"widget".concat(u)):null}(a,i)})})}var bw=0;function Ja(e,t,r,n){var i=k.useCallback(function(){return t(e)},[e,t]),s=k.useCallback(function(){return t("")},[t]);return k.useMemo(function(){var a=vw(n,function(o){return function(l){return o&&o({side:e,change:r},l)}});return a.onMouseEnter=lc(i,a.onMouseEnter),a.onMouseLeave=lc(s,a.onMouseLeave),a},[r,n,i,e,s])}function Zu(e){var t=e.change,r=e.side,n=e.selected,i=e.tokens,s=e.gutterClassName,a=e.codeClassName,o=e.gutterEvents,l=e.codeEvents,c=e.anchorID,h=e.gutterAnchor,u=e.gutterAnchorTarget,m=e.hideGutter,g=e.hover,y=e.renderToken,_=e.renderGutter;if(!t){var v=er("diff-gutter","diff-gutter-omit",s),d=er("diff-code","diff-code-omit",a);return[!m&&E.jsx("td",{className:v},"gutter"),E.jsx("td",{className:d},"code")]}var f=t.type,p=t.content,w=In(t),S=r===bw?"old":"new",b=dt({id:c||void 0,className:er("diff-gutter","diff-gutter-".concat(f),Ph({"diff-gutter-selected":n},"diff-line-hover-"+S,g),s),children:_({change:t,side:S,inHoverState:g,renderDefault:yw(t,S),wrapInAnchor:ww(h,u)})},o),x=er("diff-code","diff-code-".concat(f),Ph({"diff-code-selected":n},"diff-line-hover-"+S,g),a);return[!m&&E.jsx("td",dt(dt({},b),{},{"data-change-key":w}),"gutter"),E.jsx(_w,dt({className:x,changeKey:w,text:p,tokens:i,renderToken:y},l),"code")]}function X5(e){var t=e.className,r=e.oldChange,n=e.newChange,i=e.oldSelected,s=e.newSelected,a=e.oldTokens,o=e.newTokens,l=e.monotonous,c=e.gutterClassName,h=e.codeClassName,u=e.gutterEvents,m=e.codeEvents,g=e.hideGutter,y=e.generateAnchorID,_=e.generateLineClassName,v=e.gutterAnchor,d=e.renderToken,f=e.renderGutter,p=xr(k.useState(""),2),w=p[0],S=p[1],b=Ja("old",S,r,u),x=Ja("new",S,n,u),C=Ja("old",S,r,m),A=Ja("new",S,n,m),T=r&&y(r),j=n&&y(n),M=_({changes:[r,n],defaultGenerate:function(){return t}}),O={monotonous:l,hideGutter:g,gutterClassName:c,codeClassName:h,gutterEvents:u,codeEvents:m,renderToken:d,renderGutter:f},z=dt(dt({},O),{},{change:r,side:bw,selected:i,tokens:a,gutterEvents:b,codeEvents:C,anchorID:T,gutterAnchor:v,gutterAnchorTarget:T,hover:w==="old"}),$=dt(dt({},O),{},{change:n,side:1,selected:s,tokens:o,gutterEvents:x,codeEvents:A,anchorID:r===n?null:j,gutterAnchor:v,gutterAnchorTarget:r===n?T:j,hover:w==="new"});if(l)return E.jsx("tr",{className:er("diff-line",M),children:Zu(r?z:$)});var Y=function(X,V){return X&&!V?"diff-line-old-only":!X&&V?"diff-line-new-only":X===V?"diff-line-normal":"diff-line-compare"}(r,n);return E.jsxs("tr",{className:er("diff-line",Y,M),children:[Zu(z),Zu($)]})}var Q5=k.memo(X5);function Z5(e){var t=e.hideGutter,r=e.oldElement,n=e.newElement;return e.monotonous?E.jsx("tr",{className:"diff-widget",children:E.jsx("td",{colSpan:t?1:2,className:"diff-widget-content",children:r||n})}):r===n?E.jsx("tr",{className:"diff-widget",children:E.jsx("td",{colSpan:t?2:4,className:"diff-widget-content",children:r})}):E.jsxs("tr",{className:"diff-widget",children:[E.jsx("td",{colSpan:t?1:2,className:"diff-widget-content",children:r}),E.jsx("td",{colSpan:t?1:2,className:"diff-widget-content",children:n})]})}var eL=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],tL=["hunk","widgets","className"];function Xa(e,t){return(e?In(e):"00")+(t?In(t):"00")}function rL(e){var t=e.hunk,r=e.widgets,n=e.className,i=ps(e,tL),s=function(a,o){for(var l=function(d){if(!d)return null;var f=In(d);return o[f]||null},c=[],h=0;h<a.length;h++){var u=a[h];if(Mo(u))c.push(["change",Xa(u,u),u,u]);else if(Dn(u)){var m=a[h+1];m&&Zo(m)?(h+=1,c.push(["change",Xa(u,m),u,m])):c.push(["change",Xa(u,null),u,null])}else c.push(["change",Xa(null,u),null,u]);var g=c[c.length-1],y=l(g[2]),_=l(g[3]);if(y||_){var v=g[1];c.push(["widget",v,y,_])}}return c}(t.changes,r);return E.jsx("tbody",{className:er("diff-hunk",n),children:s.map(function(a){return function(o,l){var c=xr(o,4),h=c[0],u=c[1],m=c[2],g=c[3],y=l.selectedChanges,_=l.monotonous,v=l.hideGutter,d=l.tokens,f=l.lineClassName,p=ps(l,eL);if(h==="change"){var w=!!m&&y.includes(In(m)),S=!!g&&y.includes(In(g)),b=m&&d?d.old[bp(m)-1]:null,x=g&&d?d.new[Sp(g)-1]:null;return E.jsx(Q5,dt({className:f,oldChange:m,newChange:g,monotonous:_,hideGutter:v,oldSelected:w,newSelected:S,oldTokens:b,newTokens:x},p),"change".concat(u))}return h==="widget"?E.jsx(Z5,{monotonous:_,hideGutter:v,oldElement:m,newElement:g},"widget".concat(u)):null}(a,i)})})}var nL=["gutterType","hunkClassName"];function iL(e){var t=e.hunk,r=z4(),n=r.gutterType,i=r.hunkClassName,s=ps(r,nL),a=n==="none",o=n==="anchor",l=s.viewType==="unified"?J5:rL;return E.jsx(l,dt(dt({},s),{},{hunk:t,hideGutter:a,gutterAnchor:o,className:i}))}function sL(){}function jv(e,t){var r=t?"auto":"none";e instanceof HTMLElement&&e.style.userSelect!==r&&(e.style.userSelect=r)}function oL(e){return e.map(function(t){return E.jsx(iL,{hunk:t},function(r){return"-".concat(r.oldStart,",").concat(r.oldLines," +").concat(r.newStart,",").concat(r.newLines)}(t))})}function aL(e){var t=e.diffType,r=e.hunks,n=e.optimizeSelection,i=e.className,s=e.hunkClassName,a=s===void 0?Ht.hunkClassName:s,o=e.lineClassName,l=o===void 0?Ht.lineClassName:o,c=e.generateLineClassName,h=c===void 0?Ht.generateLineClassName:c,u=e.gutterClassName,m=u===void 0?Ht.gutterClassName:u,g=e.codeClassName,y=g===void 0?Ht.codeClassName:g,_=e.gutterType,v=_===void 0?Ht.gutterType:_,d=e.viewType,f=d===void 0?Ht.viewType:d,p=e.gutterEvents,w=p===void 0?Ht.gutterEvents:p,S=e.codeEvents,b=S===void 0?Ht.codeEvents:S,x=e.generateAnchorID,C=x===void 0?Ht.generateAnchorID:x,A=e.selectedChanges,T=A===void 0?Ht.selectedChanges:A,j=e.widgets,M=j===void 0?Ht.widgets:j,O=e.renderGutter,z=O===void 0?Ht.renderGutter:O,$=e.tokens,Y=e.renderToken,X=e.children,V=X===void 0?oL:X,N=k.useRef(null),P=k.useCallback(function(G){var B=G.target;if(G.button===0){var D=function(ge,ve){for(var Ee=ge;Ee&&Ee!==document.documentElement&&!Ee.classList.contains(ve);)Ee=Ee.parentElement;return Ee===document.documentElement?null:Ee}(B,"diff-code");if(D&&D.parentElement){var U=window.getSelection();U&&U.removeAllRanges();var H=R4(D.parentElement.children).indexOf(D);if(H===1||H===3){var ee,Z=B4(N.current?N.current.querySelectorAll(".diff-line"):[]);try{for(Z.s();!(ee=Z.n()).done;){var de=ee.value.children;jv(de[1],H===1),jv(de[3],H===3)}}catch(ge){Z.e(ge)}finally{Z.f()}}}}},[]),R=v==="none",I=t==="add"||t==="delete",L=f==="split"&&!I&&n?P:sL,W=k.useMemo(function(){return E.jsxs("colgroup",f==="unified"?{children:[!R&&E.jsx("col",{className:"diff-gutter-col"}),!R&&E.jsx("col",{className:"diff-gutter-col"}),E.jsx("col",{})]}:I?{children:[!R&&E.jsx("col",{className:"diff-gutter-col"}),E.jsx("col",{})]}:{children:[!R&&E.jsx("col",{className:"diff-gutter-col"}),E.jsx("col",{}),!R&&E.jsx("col",{className:"diff-gutter-col"}),E.jsx("col",{})]})},[f,I,R]),J=k.useMemo(function(){return{hunkClassName:a,lineClassName:l,generateLineClassName:h,gutterClassName:m,codeClassName:y,monotonous:I,hideGutter:R,viewType:f,gutterType:v,codeEvents:b,gutterEvents:w,generateAnchorID:C,selectedChanges:T,widgets:M,renderGutter:z,tokens:$,renderToken:Y}},[y,b,C,m,w,v,R,a,l,h,I,z,Y,T,$,f,M]);return E.jsx(F4,{value:J,children:E.jsxs("table",{ref:N,className:er("diff","diff-".concat(f),i),onMouseDown:L,children:[W,V(r)]})})}var xz=k.memo(aL);Br&&Br.isConcatSpreadable;var Cp=Qo(function(e){var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32};t.Diff=function(r,n){return[r,n]},t.prototype.diff_main=function(r,n,i,s){s===void 0&&(s=this.Diff_Timeout<=0?Number.MAX_VALUE:new Date().getTime()+1e3*this.Diff_Timeout);var a=s;if(r==null||n==null)throw new Error("Null input. (diff_main)");if(r==n)return r?[new t.Diff(0,r)]:[];i===void 0&&(i=!0);var o=i,l=this.diff_commonPrefix(r,n),c=r.substring(0,l);r=r.substring(l),n=n.substring(l),l=this.diff_commonSuffix(r,n);var h=r.substring(r.length-l);r=r.substring(0,r.length-l),n=n.substring(0,n.length-l);var u=this.diff_compute_(r,n,o,a);return c&&u.unshift(new t.Diff(0,c)),h&&u.push(new t.Diff(0,h)),this.diff_cleanupMerge(u),u},t.prototype.diff_compute_=function(r,n,i,s){var a;if(!r)return[new t.Diff(1,n)];if(!n)return[new t.Diff(-1,r)];var o=r.length>n.length?r:n,l=r.length>n.length?n:r,c=o.indexOf(l);if(c!=-1)return a=[new t.Diff(1,o.substring(0,c)),new t.Diff(0,l),new t.Diff(1,o.substring(c+l.length))],r.length>n.length&&(a[0][0]=a[2][0]=-1),a;if(l.length==1)return[new t.Diff(-1,r),new t.Diff(1,n)];var h=this.diff_halfMatch_(r,n);if(h){var u=h[0],m=h[1],g=h[2],y=h[3],_=h[4],v=this.diff_main(u,g,i,s),d=this.diff_main(m,y,i,s);return v.concat([new t.Diff(0,_)],d)}return i&&r.length>100&&n.length>100?this.diff_lineMode_(r,n,s):this.diff_bisect_(r,n,s)},t.prototype.diff_lineMode_=function(r,n,i){var s=this.diff_linesToChars_(r,n);r=s.chars1,n=s.chars2;var a=s.lineArray,o=this.diff_main(r,n,!1,i);this.diff_charsToLines_(o,a),this.diff_cleanupSemantic(o),o.push(new t.Diff(0,""));for(var l=0,c=0,h=0,u="",m="";l<o.length;){switch(o[l][0]){case 1:h++,m+=o[l][1];break;case-1:c++,u+=o[l][1];break;case 0:if(c>=1&&h>=1){o.splice(l-c-h,c+h),l=l-c-h;for(var g=this.diff_main(u,m,!1,i),y=g.length-1;y>=0;y--)o.splice(l,0,g[y]);l+=g.length}h=0,c=0,u="",m=""}l++}return o.pop(),o},t.prototype.diff_bisect_=function(r,n,i){for(var s=r.length,a=n.length,o=Math.ceil((s+a)/2),l=o,c=2*o,h=new Array(c),u=new Array(c),m=0;m<c;m++)h[m]=-1,u[m]=-1;h[l+1]=0,u[l+1]=0;for(var g=s-a,y=g%2!=0,_=0,v=0,d=0,f=0,p=0;p<o&&!(new Date().getTime()>i);p++){for(var w=-p+_;w<=p-v;w+=2){for(var S=l+w,b=(j=w==-p||w!=p&&h[S-1]<h[S+1]?h[S+1]:h[S-1]+1)-w;j<s&&b<a&&r.charAt(j)==n.charAt(b);)j++,b++;if(h[S]=j,j>s)v+=2;else if(b>a)_+=2;else if(y&&(A=l+g-w)>=0&&A<c&&u[A]!=-1&&j>=(C=s-u[A]))return this.diff_bisectSplit_(r,n,j,b,i)}for(var x=-p+d;x<=p-f;x+=2){for(var C,A=l+x,T=(C=x==-p||x!=p&&u[A-1]<u[A+1]?u[A+1]:u[A-1]+1)-x;C<s&&T<a&&r.charAt(s-C-1)==n.charAt(a-T-1);)C++,T++;if(u[A]=C,C>s)f+=2;else if(T>a)d+=2;else if(!y&&(S=l+g-x)>=0&&S<c&&h[S]!=-1){var j;if(b=l+(j=h[S])-S,j>=(C=s-C))return this.diff_bisectSplit_(r,n,j,b,i)}}}return[new t.Diff(-1,r),new t.Diff(1,n)]},t.prototype.diff_bisectSplit_=function(r,n,i,s,a){var o=r.substring(0,i),l=n.substring(0,s),c=r.substring(i),h=n.substring(s),u=this.diff_main(o,l,!1,a),m=this.diff_main(c,h,!1,a);return u.concat(m)},t.prototype.diff_linesToChars_=function(r,n){var i=[],s={};function a(c){for(var h="",u=0,m=-1,g=i.length;m<c.length-1;){(m=c.indexOf(`
52
+ `,u))==-1&&(m=c.length-1);var y=c.substring(u,m+1);(s.hasOwnProperty?s.hasOwnProperty(y):s[y]!==void 0)?h+=String.fromCharCode(s[y]):(g==o&&(y=c.substring(u),m=c.length),h+=String.fromCharCode(g),s[y]=g,i[g++]=y),u=m+1}return h}i[0]="";var o=4e4,l=a(r);return o=65535,{chars1:l,chars2:a(n),lineArray:i}},t.prototype.diff_charsToLines_=function(r,n){for(var i=0;i<r.length;i++){for(var s=r[i][1],a=[],o=0;o<s.length;o++)a[o]=n[s.charCodeAt(o)];r[i][1]=a.join("")}},t.prototype.diff_commonPrefix=function(r,n){if(!r||!n||r.charAt(0)!=n.charAt(0))return 0;for(var i=0,s=Math.min(r.length,n.length),a=s,o=0;i<a;)r.substring(o,a)==n.substring(o,a)?o=i=a:s=a,a=Math.floor((s-i)/2+i);return a},t.prototype.diff_commonSuffix=function(r,n){if(!r||!n||r.charAt(r.length-1)!=n.charAt(n.length-1))return 0;for(var i=0,s=Math.min(r.length,n.length),a=s,o=0;i<a;)r.substring(r.length-a,r.length-o)==n.substring(n.length-a,n.length-o)?o=i=a:s=a,a=Math.floor((s-i)/2+i);return a},t.prototype.diff_commonOverlap_=function(r,n){var i=r.length,s=n.length;if(i==0||s==0)return 0;i>s?r=r.substring(i-s):i<s&&(n=n.substring(0,i));var a=Math.min(i,s);if(r==n)return a;for(var o=0,l=1;;){var c=r.substring(a-l),h=n.indexOf(c);if(h==-1)return o;l+=h,h!=0&&r.substring(a-l)!=n.substring(0,l)||(o=l,l++)}},t.prototype.diff_halfMatch_=function(r,n){if(this.Diff_Timeout<=0)return null;var i=r.length>n.length?r:n,s=r.length>n.length?n:r;if(i.length<4||2*s.length<i.length)return null;var a=this;function o(_,v,d){for(var f,p,w,S,b=_.substring(d,d+Math.floor(_.length/4)),x=-1,C="";(x=v.indexOf(b,x+1))!=-1;){var A=a.diff_commonPrefix(_.substring(d),v.substring(x)),T=a.diff_commonSuffix(_.substring(0,d),v.substring(0,x));C.length<T+A&&(C=v.substring(x-T,x)+v.substring(x,x+A),f=_.substring(0,d-T),p=_.substring(d+A),w=v.substring(0,x-T),S=v.substring(x+A))}return 2*C.length>=_.length?[f,p,w,S,C]:null}var l,c,h,u,m,g=o(i,s,Math.ceil(i.length/4)),y=o(i,s,Math.ceil(i.length/2));return g||y?(l=y?g&&g[4].length>y[4].length?g:y:g,r.length>n.length?(c=l[0],h=l[1],u=l[2],m=l[3]):(u=l[0],m=l[1],c=l[2],h=l[3]),[c,h,u,m,l[4]]):null},t.prototype.diff_cleanupSemantic=function(r){for(var n=!1,i=[],s=0,a=null,o=0,l=0,c=0,h=0,u=0;o<r.length;)r[o][0]==0?(i[s++]=o,l=h,c=u,h=0,u=0,a=r[o][1]):(r[o][0]==1?h+=r[o][1].length:u+=r[o][1].length,a&&a.length<=Math.max(l,c)&&a.length<=Math.max(h,u)&&(r.splice(i[s-1],0,new t.Diff(-1,a)),r[i[s-1]+1][0]=1,s--,o=--s>0?i[s-1]:-1,l=0,c=0,h=0,u=0,a=null,n=!0)),o++;for(n&&this.diff_cleanupMerge(r),this.diff_cleanupSemanticLossless(r),o=1;o<r.length;){if(r[o-1][0]==-1&&r[o][0]==1){var m=r[o-1][1],g=r[o][1],y=this.diff_commonOverlap_(m,g),_=this.diff_commonOverlap_(g,m);y>=_?(y>=m.length/2||y>=g.length/2)&&(r.splice(o,0,new t.Diff(0,g.substring(0,y))),r[o-1][1]=m.substring(0,m.length-y),r[o+1][1]=g.substring(y),o++):(_>=m.length/2||_>=g.length/2)&&(r.splice(o,0,new t.Diff(0,m.substring(0,_))),r[o-1][0]=1,r[o-1][1]=g.substring(0,g.length-_),r[o+1][0]=-1,r[o+1][1]=m.substring(_),o++),o++}o++}},t.prototype.diff_cleanupSemanticLossless=function(r){function n(_,v){if(!_||!v)return 6;var d=_.charAt(_.length-1),f=v.charAt(0),p=d.match(t.nonAlphaNumericRegex_),w=f.match(t.nonAlphaNumericRegex_),S=p&&d.match(t.whitespaceRegex_),b=w&&f.match(t.whitespaceRegex_),x=S&&d.match(t.linebreakRegex_),C=b&&f.match(t.linebreakRegex_),A=x&&_.match(t.blanklineEndRegex_),T=C&&v.match(t.blanklineStartRegex_);return A||T?5:x||C?4:p&&!S&&b?3:S||b?2:p||w?1:0}for(var i=1;i<r.length-1;){if(r[i-1][0]==0&&r[i+1][0]==0){var s=r[i-1][1],a=r[i][1],o=r[i+1][1],l=this.diff_commonSuffix(s,a);if(l){var c=a.substring(a.length-l);s=s.substring(0,s.length-l),a=c+a.substring(0,a.length-l),o=c+o}for(var h=s,u=a,m=o,g=n(s,a)+n(a,o);a.charAt(0)===o.charAt(0);){s+=a.charAt(0),a=a.substring(1)+o.charAt(0),o=o.substring(1);var y=n(s,a)+n(a,o);y>=g&&(g=y,h=s,u=a,m=o)}r[i-1][1]!=h&&(h?r[i-1][1]=h:(r.splice(i-1,1),i--),r[i][1]=u,m?r[i+1][1]=m:(r.splice(i+1,1),i--))}i++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(r){for(var n=!1,i=[],s=0,a=null,o=0,l=!1,c=!1,h=!1,u=!1;o<r.length;)r[o][0]==0?(r[o][1].length<this.Diff_EditCost&&(h||u)?(i[s++]=o,l=h,c=u,a=r[o][1]):(s=0,a=null),h=u=!1):(r[o][0]==-1?u=!0:h=!0,a&&(l&&c&&h&&u||a.length<this.Diff_EditCost/2&&l+c+h+u==3)&&(r.splice(i[s-1],0,new t.Diff(-1,a)),r[i[s-1]+1][0]=1,s--,a=null,l&&c?(h=u=!0,s=0):(o=--s>0?i[s-1]:-1,h=u=!1),n=!0)),o++;n&&this.diff_cleanupMerge(r)},t.prototype.diff_cleanupMerge=function(r){r.push(new t.Diff(0,""));for(var n,i=0,s=0,a=0,o="",l="";i<r.length;)switch(r[i][0]){case 1:a++,l+=r[i][1],i++;break;case-1:s++,o+=r[i][1],i++;break;case 0:s+a>1?(s!==0&&a!==0&&((n=this.diff_commonPrefix(l,o))!==0&&(i-s-a>0&&r[i-s-a-1][0]==0?r[i-s-a-1][1]+=l.substring(0,n):(r.splice(0,0,new t.Diff(0,l.substring(0,n))),i++),l=l.substring(n),o=o.substring(n)),(n=this.diff_commonSuffix(l,o))!==0&&(r[i][1]=l.substring(l.length-n)+r[i][1],l=l.substring(0,l.length-n),o=o.substring(0,o.length-n))),i-=s+a,r.splice(i,s+a),o.length&&(r.splice(i,0,new t.Diff(-1,o)),i++),l.length&&(r.splice(i,0,new t.Diff(1,l)),i++),i++):i!==0&&r[i-1][0]==0?(r[i-1][1]+=r[i][1],r.splice(i,1)):i++,a=0,s=0,o="",l=""}r[r.length-1][1]===""&&r.pop();var c=!1;for(i=1;i<r.length-1;)r[i-1][0]==0&&r[i+1][0]==0&&(r[i][1].substring(r[i][1].length-r[i-1][1].length)==r[i-1][1]?(r[i][1]=r[i-1][1]+r[i][1].substring(0,r[i][1].length-r[i-1][1].length),r[i+1][1]=r[i-1][1]+r[i+1][1],r.splice(i-1,1),c=!0):r[i][1].substring(0,r[i+1][1].length)==r[i+1][1]&&(r[i-1][1]+=r[i+1][1],r[i][1]=r[i][1].substring(r[i+1][1].length)+r[i+1][1],r.splice(i+1,1),c=!0)),i++;c&&this.diff_cleanupMerge(r)},t.prototype.diff_xIndex=function(r,n){var i,s=0,a=0,o=0,l=0;for(i=0;i<r.length&&(r[i][0]!==1&&(s+=r[i][1].length),r[i][0]!==-1&&(a+=r[i][1].length),!(s>n));i++)o=s,l=a;return r.length!=i&&r[i][0]===-1?l:l+(n-o)},t.prototype.diff_prettyHtml=function(r){for(var n=[],i=/&/g,s=/</g,a=/>/g,o=/\n/g,l=0;l<r.length;l++){var c=r[l][0],h=r[l][1].replace(i,"&amp;").replace(s,"&lt;").replace(a,"&gt;").replace(o,"&para;<br>");switch(c){case 1:n[l]='<ins style="background:#e6ffe6;">'+h+"</ins>";break;case-1:n[l]='<del style="background:#ffe6e6;">'+h+"</del>";break;case 0:n[l]="<span>"+h+"</span>"}}return n.join("")},t.prototype.diff_text1=function(r){for(var n=[],i=0;i<r.length;i++)r[i][0]!==1&&(n[i]=r[i][1]);return n.join("")},t.prototype.diff_text2=function(r){for(var n=[],i=0;i<r.length;i++)r[i][0]!==-1&&(n[i]=r[i][1]);return n.join("")},t.prototype.diff_levenshtein=function(r){for(var n=0,i=0,s=0,a=0;a<r.length;a++){var o=r[a][0],l=r[a][1];switch(o){case 1:i+=l.length;break;case-1:s+=l.length;break;case 0:n+=Math.max(i,s),i=0,s=0}}return n+=Math.max(i,s)},t.prototype.diff_toDelta=function(r){for(var n=[],i=0;i<r.length;i++)switch(r[i][0]){case 1:n[i]="+"+encodeURI(r[i][1]);break;case-1:n[i]="-"+r[i][1].length;break;case 0:n[i]="="+r[i][1].length}return n.join(" ").replace(/%20/g," ")},t.prototype.diff_fromDelta=function(r,n){for(var i=[],s=0,a=0,o=n.split(/\t/g),l=0;l<o.length;l++){var c=o[l].substring(1);switch(o[l].charAt(0)){case"+":try{i[s++]=new t.Diff(1,decodeURI(c))}catch{throw new Error("Illegal escape in diff_fromDelta: "+c)}break;case"-":case"=":var h=parseInt(c,10);if(isNaN(h)||h<0)throw new Error("Invalid number in diff_fromDelta: "+c);var u=r.substring(a,a+=h);o[l].charAt(0)=="="?i[s++]=new t.Diff(0,u):i[s++]=new t.Diff(-1,u);break;default:if(o[l])throw new Error("Invalid diff operation in diff_fromDelta: "+o[l])}}if(a!=r.length)throw new Error("Delta length ("+a+") does not equal source text length ("+r.length+").");return i},t.prototype.match_main=function(r,n,i){if(r==null||n==null||i==null)throw new Error("Null input. (match_main)");return i=Math.max(0,Math.min(i,r.length)),r==n?0:r.length?r.substring(i,i+n.length)==n?i:this.match_bitap_(r,n,i):-1},t.prototype.match_bitap_=function(r,n,i){if(n.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var s=this.match_alphabet_(n),a=this;function o(b,x){var C=b/n.length,A=Math.abs(i-x);return a.Match_Distance?C+A/a.Match_Distance:A?1:C}var l=this.Match_Threshold,c=r.indexOf(n,i);c!=-1&&(l=Math.min(o(0,c),l),(c=r.lastIndexOf(n,i+n.length))!=-1&&(l=Math.min(o(0,c),l)));var h,u,m=1<<n.length-1;c=-1;for(var g,y=n.length+r.length,_=0;_<n.length;_++){for(h=0,u=y;h<u;)o(_,i+u)<=l?h=u:y=u,u=Math.floor((y-h)/2+h);y=u;var v=Math.max(1,i-u+1),d=Math.min(i+u,r.length)+n.length,f=Array(d+2);f[d+1]=(1<<_)-1;for(var p=d;p>=v;p--){var w=s[r.charAt(p-1)];if(f[p]=_===0?(f[p+1]<<1|1)&w:(f[p+1]<<1|1)&w|(g[p+1]|g[p])<<1|1|g[p+1],f[p]&m){var S=o(_,p-1);if(S<=l){if(l=S,!((c=p-1)>i))break;v=Math.max(1,2*i-c)}}}if(o(_+1,i)>l)break;g=f}return c},t.prototype.match_alphabet_=function(r){for(var n={},i=0;i<r.length;i++)n[r.charAt(i)]=0;for(i=0;i<r.length;i++)n[r.charAt(i)]|=1<<r.length-i-1;return n},t.prototype.patch_addContext_=function(r,n){if(n.length!=0){if(r.start2===null)throw Error("patch not initialized");for(var i=n.substring(r.start2,r.start2+r.length1),s=0;n.indexOf(i)!=n.lastIndexOf(i)&&i.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)s+=this.Patch_Margin,i=n.substring(r.start2-s,r.start2+r.length1+s);s+=this.Patch_Margin;var a=n.substring(r.start2-s,r.start2);a&&r.diffs.unshift(new t.Diff(0,a));var o=n.substring(r.start2+r.length1,r.start2+r.length1+s);o&&r.diffs.push(new t.Diff(0,o)),r.start1-=a.length,r.start2-=a.length,r.length1+=a.length+o.length,r.length2+=a.length+o.length}},t.prototype.patch_make=function(r,n,i){var s,a;if(typeof r=="string"&&typeof n=="string"&&i===void 0)s=r,(a=this.diff_main(s,n,!0)).length>2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(r&&typeof r=="object"&&n===void 0&&i===void 0)a=r,s=this.diff_text1(a);else if(typeof r=="string"&&n&&typeof n=="object"&&i===void 0)s=r,a=n;else{if(typeof r!="string"||typeof n!="string"||!i||typeof i!="object")throw new Error("Unknown call format to patch_make.");s=r,a=i}if(a.length===0)return[];for(var o=[],l=new t.patch_obj,c=0,h=0,u=0,m=s,g=s,y=0;y<a.length;y++){var _=a[y][0],v=a[y][1];switch(c||_===0||(l.start1=h,l.start2=u),_){case 1:l.diffs[c++]=a[y],l.length2+=v.length,g=g.substring(0,u)+v+g.substring(u);break;case-1:l.length1+=v.length,l.diffs[c++]=a[y],g=g.substring(0,u)+g.substring(u+v.length);break;case 0:v.length<=2*this.Patch_Margin&&c&&a.length!=y+1?(l.diffs[c++]=a[y],l.length1+=v.length,l.length2+=v.length):v.length>=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,m),o.push(l),l=new t.patch_obj,c=0,m=g,h=u)}_!==1&&(h+=v.length),_!==-1&&(u+=v.length)}return c&&(this.patch_addContext_(l,m),o.push(l)),o},t.prototype.patch_deepCopy=function(r){for(var n=[],i=0;i<r.length;i++){var s=r[i],a=new t.patch_obj;a.diffs=[];for(var o=0;o<s.diffs.length;o++)a.diffs[o]=new t.Diff(s.diffs[o][0],s.diffs[o][1]);a.start1=s.start1,a.start2=s.start2,a.length1=s.length1,a.length2=s.length2,n[i]=a}return n},t.prototype.patch_apply=function(r,n){if(r.length==0)return[n,[]];r=this.patch_deepCopy(r);var i=this.patch_addPadding(r);n=i+n+i,this.patch_splitMax(r);for(var s=0,a=[],o=0;o<r.length;o++){var l,c,h=r[o].start2+s,u=this.diff_text1(r[o].diffs),m=-1;if(u.length>this.Match_MaxBits?(l=this.match_main(n,u.substring(0,this.Match_MaxBits),h))!=-1&&((m=this.match_main(n,u.substring(u.length-this.Match_MaxBits),h+u.length-this.Match_MaxBits))==-1||l>=m)&&(l=-1):l=this.match_main(n,u,h),l==-1)a[o]=!1,s-=r[o].length2-r[o].length1;else if(a[o]=!0,s=l-h,u==(c=m==-1?n.substring(l,l+u.length):n.substring(l,m+this.Match_MaxBits)))n=n.substring(0,l)+this.diff_text2(r[o].diffs)+n.substring(l+u.length);else{var g=this.diff_main(u,c,!1);if(u.length>this.Match_MaxBits&&this.diff_levenshtein(g)/u.length>this.Patch_DeleteThreshold)a[o]=!1;else{this.diff_cleanupSemanticLossless(g);for(var y,_=0,v=0;v<r[o].diffs.length;v++){var d=r[o].diffs[v];d[0]!==0&&(y=this.diff_xIndex(g,_)),d[0]===1?n=n.substring(0,l+y)+d[1]+n.substring(l+y):d[0]===-1&&(n=n.substring(0,l+y)+n.substring(l+this.diff_xIndex(g,_+d[1].length))),d[0]!==-1&&(_+=d[1].length)}}}}return[n=n.substring(i.length,n.length-i.length),a]},t.prototype.patch_addPadding=function(r){for(var n=this.Patch_Margin,i="",s=1;s<=n;s++)i+=String.fromCharCode(s);for(s=0;s<r.length;s++)r[s].start1+=n,r[s].start2+=n;var a=r[0],o=a.diffs;if(o.length==0||o[0][0]!=0)o.unshift(new t.Diff(0,i)),a.start1-=n,a.start2-=n,a.length1+=n,a.length2+=n;else if(n>o[0][1].length){var l=n-o[0][1].length;o[0][1]=i.substring(o[0][1].length)+o[0][1],a.start1-=l,a.start2-=l,a.length1+=l,a.length2+=l}return(o=(a=r[r.length-1]).diffs).length==0||o[o.length-1][0]!=0?(o.push(new t.Diff(0,i)),a.length1+=n,a.length2+=n):n>o[o.length-1][1].length&&(l=n-o[o.length-1][1].length,o[o.length-1][1]+=i.substring(0,l),a.length1+=l,a.length2+=l),i},t.prototype.patch_splitMax=function(r){for(var n=this.Match_MaxBits,i=0;i<r.length;i++)if(!(r[i].length1<=n)){var s=r[i];r.splice(i--,1);for(var a=s.start1,o=s.start2,l="";s.diffs.length!==0;){var c=new t.patch_obj,h=!0;for(c.start1=a-l.length,c.start2=o-l.length,l!==""&&(c.length1=c.length2=l.length,c.diffs.push(new t.Diff(0,l)));s.diffs.length!==0&&c.length1<n-this.Patch_Margin;){var u=s.diffs[0][0],m=s.diffs[0][1];u===1?(c.length2+=m.length,o+=m.length,c.diffs.push(s.diffs.shift()),h=!1):u===-1&&c.diffs.length==1&&c.diffs[0][0]==0&&m.length>2*n?(c.length1+=m.length,a+=m.length,h=!1,c.diffs.push(new t.Diff(u,m)),s.diffs.shift()):(m=m.substring(0,n-c.length1-this.Patch_Margin),c.length1+=m.length,a+=m.length,u===0?(c.length2+=m.length,o+=m.length):h=!1,c.diffs.push(new t.Diff(u,m)),m==s.diffs[0][1]?s.diffs.shift():s.diffs[0][1]=s.diffs[0][1].substring(m.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var g=this.diff_text1(s.diffs).substring(0,this.Patch_Margin);g!==""&&(c.length1+=g.length,c.length2+=g.length,c.diffs.length!==0&&c.diffs[c.diffs.length-1][0]===0?c.diffs[c.diffs.length-1][1]+=g:c.diffs.push(new t.Diff(0,g))),h||r.splice(++i,0,c)}}},t.prototype.patch_toText=function(r){for(var n=[],i=0;i<r.length;i++)n[i]=r[i];return n.join("")},t.prototype.patch_fromText=function(r){var n=[];if(!r)return n;for(var i=r.split(`
53
+ `),s=0,a=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;s<i.length;){var o=i[s].match(a);if(!o)throw new Error("Invalid patch string: "+i[s]);var l=new t.patch_obj;for(n.push(l),l.start1=parseInt(o[1],10),o[2]===""?(l.start1--,l.length1=1):o[2]=="0"?l.length1=0:(l.start1--,l.length1=parseInt(o[2],10)),l.start2=parseInt(o[3],10),o[4]===""?(l.start2--,l.length2=1):o[4]=="0"?l.length2=0:(l.start2--,l.length2=parseInt(o[4],10)),s++;s<i.length;){var c=i[s].charAt(0);try{var h=decodeURI(i[s].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+h)}if(c=="-")l.diffs.push(new t.Diff(-1,h));else if(c=="+")l.diffs.push(new t.Diff(1,h));else if(c==" ")l.diffs.push(new t.Diff(0,h));else{if(c=="@")break;if(c!=="")throw new Error('Invalid patch mode "'+c+'" in: '+h)}s++}}return n},(t.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0}).prototype.toString=function(){for(var r,n=["@@ -"+(this.length1===0?this.start1+",0":this.length1==1?this.start1+1:this.start1+1+","+this.length1)+" +"+(this.length2===0?this.start2+",0":this.length2==1?this.start2+1:this.start2+1+","+this.length2)+` @@
54
+ `],i=0;i<this.diffs.length;i++){switch(this.diffs[i][0]){case 1:r="+";break;case-1:r="-";break;case 0:r=" "}n[i+1]=r+encodeURI(this.diffs[i][1])+`
55
+ `}return n.join("").replace(/%20/g," ")},e.exports=t,e.exports.diff_match_patch=t,e.exports.DIFF_DELETE=-1,e.exports.DIFF_INSERT=1,e.exports.DIFF_EQUAL=0});Cp.DIFF_EQUAL;Cp.DIFF_DELETE;Cp.DIFF_INSERT;/*!
56
+ * Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com
57
+ * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
58
+ * Copyright 2025 Fonticons, Inc.
59
+ */function jh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function lL(e){if(Array.isArray(e))return e}function cL(e){if(Array.isArray(e))return jh(e)}function uL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fL(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sw(n.key),n)}}function hL(e,t,r){return t&&fL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Al(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=kp(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
60
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var l=r.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{a||r.return==null||r.return()}finally{if(o)throw s}}}}function Ie(e,t,r){return(t=Sw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pL(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,a,o=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(h){c=!0,i=h}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return o}}function mL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
61
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
62
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bv(Object(r),!0).forEach(function(n){Ie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hc(e,t){return lL(e)||pL(e,t)||kp(e,t)||mL()}function Er(e){return cL(e)||dL(e)||kp(e)||gL()}function vL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sw(e){var t=vL(e,"string");return typeof t=="symbol"?t:t+""}function cc(e){"@babel/helpers - typeof";return cc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cc(e)}function kp(e,t){if(e){if(typeof e=="string")return jh(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?jh(e,t):void 0}}var Fv=function(){},xp={},Cw={},kw=null,xw={mark:Fv,measure:Fv};try{typeof window<"u"&&(xp=window),typeof document<"u"&&(Cw=document),typeof MutationObserver<"u"&&(kw=MutationObserver),typeof performance<"u"&&(xw=performance)}catch{}var _L=xp.navigator||{},zv=_L.userAgent,$v=zv===void 0?"":zv,Mn=xp,it=Cw,Hv=kw,Qa=xw;Mn.document;var an=!!it.documentElement&&!!it.head&&typeof it.addEventListener=="function"&&typeof it.createElement=="function",Ew=~$v.indexOf("MSIE")||~$v.indexOf("Trident/"),ef,yL=/fa(k|kd|s|r|l|t|d|dr|dl|dt|b|slr|slpr|wsb|tl|ns|nds|es|jr|jfr|jdr|usb|ufsb|udsb|cr|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,wL=/Font ?Awesome ?([567 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit|Notdog Duo|Notdog|Chisel|Etch|Thumbprint|Jelly Fill|Jelly Duo|Jelly|Utility|Utility Fill|Utility Duo|Slab Press|Slab|Whiteboard)?.*/i,Aw={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"},slab:{"fa-regular":"regular",faslr:"regular"},"slab-press":{"fa-regular":"regular",faslpr:"regular"},thumbprint:{"fa-light":"light",fatl:"light"},whiteboard:{"fa-semibold":"semibold",fawsb:"semibold"},notdog:{"fa-solid":"solid",fans:"solid"},"notdog-duo":{"fa-solid":"solid",fands:"solid"},etch:{"fa-solid":"solid",faes:"solid"},jelly:{"fa-regular":"regular",fajr:"regular"},"jelly-fill":{"fa-regular":"regular",fajfr:"regular"},"jelly-duo":{"fa-regular":"regular",fajdr:"regular"},chisel:{"fa-regular":"regular",facr:"regular"},utility:{"fa-semibold":"semibold",fausb:"semibold"},"utility-duo":{"fa-semibold":"semibold",faudsb:"semibold"},"utility-fill":{"fa-semibold":"semibold",faufsb:"semibold"}},bL={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},Lw=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],At="classic",ea="duotone",Pw="sharp",Tw="sharp-duotone",Dw="chisel",Iw="etch",Nw="jelly",Rw="jelly-duo",Ow="jelly-fill",Mw="notdog",jw="notdog-duo",Bw="slab",Fw="slab-press",zw="thumbprint",$w="utility",Hw="utility-duo",Uw="utility-fill",Ww="whiteboard",SL="Classic",CL="Duotone",kL="Sharp",xL="Sharp Duotone",EL="Chisel",AL="Etch",LL="Jelly",PL="Jelly Duo",TL="Jelly Fill",DL="Notdog",IL="Notdog Duo",NL="Slab",RL="Slab Press",OL="Thumbprint",ML="Utility",jL="Utility Duo",BL="Utility Fill",FL="Whiteboard",Vw=[At,ea,Pw,Tw,Dw,Iw,Nw,Rw,Ow,Mw,jw,Bw,Fw,zw,$w,Hw,Uw,Ww];ef={},Ie(Ie(Ie(Ie(Ie(Ie(Ie(Ie(Ie(Ie(ef,At,SL),ea,CL),Pw,kL),Tw,xL),Dw,EL),Iw,AL),Nw,LL),Rw,PL),Ow,TL),Mw,DL),Ie(Ie(Ie(Ie(Ie(Ie(Ie(Ie(ef,jw,IL),Bw,NL),Fw,RL),zw,OL),$w,ML),Hw,jL),Uw,BL),Ww,FL);var zL={classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"},slab:{400:"faslr"},"slab-press":{400:"faslpr"},whiteboard:{600:"fawsb"},thumbprint:{300:"fatl"},notdog:{900:"fans"},"notdog-duo":{900:"fands"},etch:{900:"faes"},chisel:{400:"facr"},jelly:{400:"fajr"},"jelly-fill":{400:"fajfr"},"jelly-duo":{400:"fajdr"},utility:{600:"fausb"},"utility-duo":{600:"faudsb"},"utility-fill":{600:"faufsb"}},$L={"Font Awesome 7 Free":{900:"fas",400:"far"},"Font Awesome 7 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 7 Brands":{400:"fab",normal:"fab"},"Font Awesome 7 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 7 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 7 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"},"Font Awesome 7 Jelly":{400:"fajr",normal:"fajr"},"Font Awesome 7 Jelly Fill":{400:"fajfr",normal:"fajfr"},"Font Awesome 7 Jelly Duo":{400:"fajdr",normal:"fajdr"},"Font Awesome 7 Slab":{400:"faslr",normal:"faslr"},"Font Awesome 7 Slab Press":{400:"faslpr",normal:"faslpr"},"Font Awesome 7 Thumbprint":{300:"fatl",normal:"fatl"},"Font Awesome 7 Notdog":{900:"fans",normal:"fans"},"Font Awesome 7 Notdog Duo":{900:"fands",normal:"fands"},"Font Awesome 7 Etch":{900:"faes",normal:"faes"},"Font Awesome 7 Chisel":{400:"facr",normal:"facr"},"Font Awesome 7 Whiteboard":{600:"fawsb",normal:"fawsb"},"Font Awesome 7 Utility":{600:"fausb",normal:"fausb"},"Font Awesome 7 Utility Duo":{600:"faudsb",normal:"faudsb"},"Font Awesome 7 Utility Fill":{600:"faufsb",normal:"faufsb"}},HL=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["chisel",{defaultShortPrefixId:"facr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["etch",{defaultShortPrefixId:"faes",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["jelly",{defaultShortPrefixId:"fajr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-duo",{defaultShortPrefixId:"fajdr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-fill",{defaultShortPrefixId:"fajfr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["notdog",{defaultShortPrefixId:"fans",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["notdog-duo",{defaultShortPrefixId:"fands",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["slab",{defaultShortPrefixId:"faslr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["slab-press",{defaultShortPrefixId:"faslpr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["thumbprint",{defaultShortPrefixId:"fatl",defaultStyleId:"light",styleIds:["light"],futureStyleIds:[],defaultFontWeight:300}],["utility",{defaultShortPrefixId:"fausb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-duo",{defaultShortPrefixId:"faudsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-fill",{defaultShortPrefixId:"faufsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["whiteboard",{defaultShortPrefixId:"fawsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}]]),UL={chisel:{regular:"facr"},classic:{brands:"fab",light:"fal",regular:"far",solid:"fas",thin:"fat"},duotone:{light:"fadl",regular:"fadr",solid:"fad",thin:"fadt"},etch:{solid:"faes"},jelly:{regular:"fajr"},"jelly-duo":{regular:"fajdr"},"jelly-fill":{regular:"fajfr"},notdog:{solid:"fans"},"notdog-duo":{solid:"fands"},sharp:{light:"fasl",regular:"fasr",solid:"fass",thin:"fast"},"sharp-duotone":{light:"fasdl",regular:"fasdr",solid:"fasds",thin:"fasdt"},slab:{regular:"faslr"},"slab-press":{regular:"faslpr"},thumbprint:{light:"fatl"},utility:{semibold:"fausb"},"utility-duo":{semibold:"faudsb"},"utility-fill":{semibold:"faufsb"},whiteboard:{semibold:"fawsb"}},Kw=["fak","fa-kit","fakd","fa-kit-duotone"],Uv={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},WL=["kit"],VL="kit",KL="kit-duotone",GL="Kit",qL="Kit Duotone";Ie(Ie({},VL,GL),KL,qL);var YL={kit:{"fa-kit":"fak"}},JL={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},XL={kit:{fak:"fa-kit"}},Wv={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}},tf,Za={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},QL=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],ZL="classic",eP="duotone",tP="sharp",rP="sharp-duotone",nP="chisel",iP="etch",sP="jelly",oP="jelly-duo",aP="jelly-fill",lP="notdog",cP="notdog-duo",uP="slab",fP="slab-press",hP="thumbprint",dP="utility",pP="utility-duo",mP="utility-fill",gP="whiteboard",vP="Classic",_P="Duotone",yP="Sharp",wP="Sharp Duotone",bP="Chisel",SP="Etch",CP="Jelly",kP="Jelly Duo",xP="Jelly Fill",EP="Notdog",AP="Notdog Duo",LP="Slab",PP="Slab Press",TP="Thumbprint",DP="Utility",IP="Utility Duo",NP="Utility Fill",RP="Whiteboard";tf={},Ie(Ie(Ie(Ie(Ie(Ie(Ie(Ie(Ie(Ie(tf,ZL,vP),eP,_P),tP,yP),rP,wP),nP,bP),iP,SP),sP,CP),oP,kP),aP,xP),lP,EP),Ie(Ie(Ie(Ie(Ie(Ie(Ie(Ie(tf,cP,AP),uP,LP),fP,PP),hP,TP),dP,DP),pP,IP),mP,NP),gP,RP);var OP="kit",MP="kit-duotone",jP="Kit",BP="Kit Duotone";Ie(Ie({},OP,jP),MP,BP);var FP={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"},slab:{"fa-regular":"faslr"},"slab-press":{"fa-regular":"faslpr"},whiteboard:{"fa-semibold":"fawsb"},thumbprint:{"fa-light":"fatl"},notdog:{"fa-solid":"fans"},"notdog-duo":{"fa-solid":"fands"},etch:{"fa-solid":"faes"},jelly:{"fa-regular":"fajr"},"jelly-fill":{"fa-regular":"fajfr"},"jelly-duo":{"fa-regular":"fajdr"},chisel:{"fa-regular":"facr"},utility:{"fa-semibold":"fausb"},"utility-duo":{"fa-semibold":"faudsb"},"utility-fill":{"fa-semibold":"faufsb"}},zP={classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"],slab:["faslr"],"slab-press":["faslpr"],whiteboard:["fawsb"],thumbprint:["fatl"],notdog:["fans"],"notdog-duo":["fands"],etch:["faes"],jelly:["fajr"],"jelly-fill":["fajfr"],"jelly-duo":["fajdr"],chisel:["facr"],utility:["fausb"],"utility-duo":["faudsb"],"utility-fill":["faufsb"]},Bh={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"},slab:{faslr:"fa-regular"},"slab-press":{faslpr:"fa-regular"},whiteboard:{fawsb:"fa-semibold"},thumbprint:{fatl:"fa-light"},notdog:{fans:"fa-solid"},"notdog-duo":{fands:"fa-solid"},etch:{faes:"fa-solid"},jelly:{fajr:"fa-regular"},"jelly-fill":{fajfr:"fa-regular"},"jelly-duo":{fajdr:"fa-regular"},chisel:{facr:"fa-regular"},utility:{fausb:"fa-semibold"},"utility-duo":{faudsb:"fa-semibold"},"utility-fill":{faufsb:"fa-semibold"}},$P=["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands","fa-semibold"],Gw=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt","faslr","faslpr","fawsb","fatl","fans","fands","faes","fajr","fajfr","fajdr","facr","fausb","faudsb","faufsb"].concat(QL,$P),HP=["solid","regular","light","thin","duotone","brands","semibold"],qw=[1,2,3,4,5,6,7,8,9,10],UP=qw.concat([11,12,13,14,15,16,17,18,19,20]),WP=["aw","fw","pull-left","pull-right"],VP=[].concat(Er(Object.keys(zP)),HP,WP,["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","inverse","layers","layers-bottom-left","layers-bottom-right","layers-counter","layers-text","layers-top-left","layers-top-right","li","pull-end","pull-start","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul","width-auto","width-fixed",Za.GROUP,Za.SWAP_OPACITY,Za.PRIMARY,Za.SECONDARY]).concat(qw.map(function(e){return"".concat(e,"x")})).concat(UP.map(function(e){return"w-".concat(e)})),KP={"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}},rn="___FONT_AWESOME___",Fh=16,Yw="fa",Jw="svg-inline--fa",hi="data-fa-i2svg",zh="data-fa-pseudo-element",GP="data-fa-pseudo-element-pending",Ep="data-prefix",Ap="data-icon",Vv="fontawesome-i2svg",qP="async",YP=["HTML","HEAD","STYLE","SCRIPT"],Xw=["::before","::after",":before",":after"],Qw=function(){try{return!0}catch{return!1}}();function ta(e){return new Proxy(e,{get:function(r,n){return n in r?r[n]:r[At]}})}var Zw=pe({},Aw);Zw[At]=pe(pe(pe(pe({},{"fa-duotone":"duotone"}),Aw[At]),Uv.kit),Uv["kit-duotone"]);var JP=ta(Zw),$h=pe({},UL);$h[At]=pe(pe(pe(pe({},{duotone:"fad"}),$h[At]),Wv.kit),Wv["kit-duotone"]);var Kv=ta($h),Hh=pe({},Bh);Hh[At]=pe(pe({},Hh[At]),XL.kit);var Lp=ta(Hh),Uh=pe({},FP);Uh[At]=pe(pe({},Uh[At]),YL.kit);ta(Uh);var XP=yL,eb="fa-layers-text",QP=wL,ZP=pe({},zL);ta(ZP);var eT=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],rf=bL,tT=[].concat(Er(WL),Er(VP)),ho=Mn.FontAwesomeConfig||{};function rT(e){var t=it.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function nT(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}if(it&&typeof it.querySelector=="function"){var iT=[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-search-pseudo-elements","searchPseudoElements"],["data-search-pseudo-elements-warnings","searchPseudoElementsWarnings"],["data-search-pseudo-elements-full-scan","searchPseudoElementsFullScan"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]];iT.forEach(function(e){var t=Hc(e,2),r=t[0],n=t[1],i=nT(rT(r));i!=null&&(ho[n]=i)})}var tb={styleDefault:"solid",familyDefault:At,cssPrefix:Yw,replacementClass:Jw,autoReplaceSvg:!0,autoAddCss:!0,searchPseudoElements:!1,searchPseudoElementsWarnings:!0,searchPseudoElementsFullScan:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};ho.familyPrefix&&(ho.cssPrefix=ho.familyPrefix);var gs=pe(pe({},tb),ho);gs.autoReplaceSvg||(gs.observeMutations=!1);var xe={};Object.keys(tb).forEach(function(e){Object.defineProperty(xe,e,{enumerable:!0,set:function(r){gs[e]=r,po.forEach(function(n){return n(xe)})},get:function(){return gs[e]}})});Object.defineProperty(xe,"familyPrefix",{enumerable:!0,set:function(t){gs.cssPrefix=t,po.forEach(function(r){return r(xe)})},get:function(){return gs.cssPrefix}});Mn.FontAwesomeConfig=xe;var po=[];function sT(e){return po.push(e),function(){po.splice(po.indexOf(e),1)}}var Ei=Fh,Or={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function oT(e){if(!(!e||!an)){var t=it.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var r=it.head.childNodes,n=null,i=r.length-1;i>-1;i--){var s=r[i],a=(s.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(n=s)}return it.head.insertBefore(t,n),e}}var aT="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Gv(){for(var e=12,t="";e-- >0;)t+=aT[Math.random()*62|0];return t}function Cs(e){for(var t=[],r=(e||[]).length>>>0;r--;)t[r]=e[r];return t}function Pp(e){return e.classList?Cs(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function rb(e){return"".concat(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function lT(e){return Object.keys(e||{}).reduce(function(t,r){return t+"".concat(r,'="').concat(rb(e[r]),'" ')},"").trim()}function Uc(e){return Object.keys(e||{}).reduce(function(t,r){return t+"".concat(r,": ").concat(e[r].trim(),";")},"")}function Tp(e){return e.size!==Or.size||e.x!==Or.x||e.y!==Or.y||e.rotate!==Or.rotate||e.flipX||e.flipY}function cT(e){var t=e.transform,r=e.containerWidth,n=e.iconWidth,i={transform:"translate(".concat(r/2," 256)")},s="translate(".concat(t.x*32,", ").concat(t.y*32,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),o="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(s," ").concat(a," ").concat(o)},c={transform:"translate(".concat(n/2*-1," -256)")};return{outer:i,inner:l,path:c}}function uT(e){var t=e.transform,r=e.width,n=r===void 0?Fh:r,i=e.height,s=i===void 0?Fh:i,a="";return Ew?a+="translate(".concat(t.x/Ei-n/2,"em, ").concat(t.y/Ei-s/2,"em) "):a+="translate(calc(-50% + ".concat(t.x/Ei,"em), calc(-50% + ").concat(t.y/Ei,"em)) "),a+="scale(".concat(t.size/Ei*(t.flipX?-1:1),", ").concat(t.size/Ei*(t.flipY?-1:1),") "),a+="rotate(".concat(t.rotate,"deg) "),a}var fT=`:root, :host {
63
+ --fa-font-solid: normal 900 1em/1 "Font Awesome 7 Free";
64
+ --fa-font-regular: normal 400 1em/1 "Font Awesome 7 Free";
65
+ --fa-font-light: normal 300 1em/1 "Font Awesome 7 Pro";
66
+ --fa-font-thin: normal 100 1em/1 "Font Awesome 7 Pro";
67
+ --fa-font-duotone: normal 900 1em/1 "Font Awesome 7 Duotone";
68
+ --fa-font-duotone-regular: normal 400 1em/1 "Font Awesome 7 Duotone";
69
+ --fa-font-duotone-light: normal 300 1em/1 "Font Awesome 7 Duotone";
70
+ --fa-font-duotone-thin: normal 100 1em/1 "Font Awesome 7 Duotone";
71
+ --fa-font-brands: normal 400 1em/1 "Font Awesome 7 Brands";
72
+ --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 7 Sharp";
73
+ --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 7 Sharp";
74
+ --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 7 Sharp";
75
+ --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 7 Sharp";
76
+ --fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 7 Sharp Duotone";
77
+ --fa-font-sharp-duotone-regular: normal 400 1em/1 "Font Awesome 7 Sharp Duotone";
78
+ --fa-font-sharp-duotone-light: normal 300 1em/1 "Font Awesome 7 Sharp Duotone";
79
+ --fa-font-sharp-duotone-thin: normal 100 1em/1 "Font Awesome 7 Sharp Duotone";
80
+ --fa-font-slab-regular: normal 400 1em/1 "Font Awesome 7 Slab";
81
+ --fa-font-slab-press-regular: normal 400 1em/1 "Font Awesome 7 Slab Press";
82
+ --fa-font-whiteboard-semibold: normal 600 1em/1 "Font Awesome 7 Whiteboard";
83
+ --fa-font-thumbprint-light: normal 300 1em/1 "Font Awesome 7 Thumbprint";
84
+ --fa-font-notdog-solid: normal 900 1em/1 "Font Awesome 7 Notdog";
85
+ --fa-font-notdog-duo-solid: normal 900 1em/1 "Font Awesome 7 Notdog Duo";
86
+ --fa-font-etch-solid: normal 900 1em/1 "Font Awesome 7 Etch";
87
+ --fa-font-jelly-regular: normal 400 1em/1 "Font Awesome 7 Jelly";
88
+ --fa-font-jelly-fill-regular: normal 400 1em/1 "Font Awesome 7 Jelly Fill";
89
+ --fa-font-jelly-duo-regular: normal 400 1em/1 "Font Awesome 7 Jelly Duo";
90
+ --fa-font-chisel-regular: normal 400 1em/1 "Font Awesome 7 Chisel";
91
+ --fa-font-utility-semibold: normal 600 1em/1 "Font Awesome 7 Utility";
92
+ --fa-font-utility-duo-semibold: normal 600 1em/1 "Font Awesome 7 Utility Duo";
93
+ --fa-font-utility-fill-semibold: normal 600 1em/1 "Font Awesome 7 Utility Fill";
94
+ }
95
+
96
+ .svg-inline--fa {
97
+ box-sizing: content-box;
98
+ display: var(--fa-display, inline-block);
99
+ height: 1em;
100
+ overflow: visible;
101
+ vertical-align: -0.125em;
102
+ width: var(--fa-width, 1.25em);
103
+ }
104
+ .svg-inline--fa.fa-2xs {
105
+ vertical-align: 0.1em;
106
+ }
107
+ .svg-inline--fa.fa-xs {
108
+ vertical-align: 0em;
109
+ }
110
+ .svg-inline--fa.fa-sm {
111
+ vertical-align: -0.0714285714em;
112
+ }
113
+ .svg-inline--fa.fa-lg {
114
+ vertical-align: -0.2em;
115
+ }
116
+ .svg-inline--fa.fa-xl {
117
+ vertical-align: -0.25em;
118
+ }
119
+ .svg-inline--fa.fa-2xl {
120
+ vertical-align: -0.3125em;
121
+ }
122
+ .svg-inline--fa.fa-pull-left,
123
+ .svg-inline--fa .fa-pull-start {
124
+ float: inline-start;
125
+ margin-inline-end: var(--fa-pull-margin, 0.3em);
126
+ }
127
+ .svg-inline--fa.fa-pull-right,
128
+ .svg-inline--fa .fa-pull-end {
129
+ float: inline-end;
130
+ margin-inline-start: var(--fa-pull-margin, 0.3em);
131
+ }
132
+ .svg-inline--fa.fa-li {
133
+ width: var(--fa-li-width, 2em);
134
+ inset-inline-start: calc(-1 * var(--fa-li-width, 2em));
135
+ inset-block-start: 0.25em; /* syncing vertical alignment with Web Font rendering */
136
+ }
137
+
138
+ .fa-layers-counter, .fa-layers-text {
139
+ display: inline-block;
140
+ position: absolute;
141
+ text-align: center;
142
+ }
143
+
144
+ .fa-layers {
145
+ display: inline-block;
146
+ height: 1em;
147
+ position: relative;
148
+ text-align: center;
149
+ vertical-align: -0.125em;
150
+ width: var(--fa-width, 1.25em);
151
+ }
152
+ .fa-layers .svg-inline--fa {
153
+ inset: 0;
154
+ margin: auto;
155
+ position: absolute;
156
+ transform-origin: center center;
157
+ }
158
+
159
+ .fa-layers-text {
160
+ left: 50%;
161
+ top: 50%;
162
+ transform: translate(-50%, -50%);
163
+ transform-origin: center center;
164
+ }
165
+
166
+ .fa-layers-counter {
167
+ background-color: var(--fa-counter-background-color, #ff253a);
168
+ border-radius: var(--fa-counter-border-radius, 1em);
169
+ box-sizing: border-box;
170
+ color: var(--fa-inverse, #fff);
171
+ line-height: var(--fa-counter-line-height, 1);
172
+ max-width: var(--fa-counter-max-width, 5em);
173
+ min-width: var(--fa-counter-min-width, 1.5em);
174
+ overflow: hidden;
175
+ padding: var(--fa-counter-padding, 0.25em 0.5em);
176
+ right: var(--fa-right, 0);
177
+ text-overflow: ellipsis;
178
+ top: var(--fa-top, 0);
179
+ transform: scale(var(--fa-counter-scale, 0.25));
180
+ transform-origin: top right;
181
+ }
182
+
183
+ .fa-layers-bottom-right {
184
+ bottom: var(--fa-bottom, 0);
185
+ right: var(--fa-right, 0);
186
+ top: auto;
187
+ transform: scale(var(--fa-layers-scale, 0.25));
188
+ transform-origin: bottom right;
189
+ }
190
+
191
+ .fa-layers-bottom-left {
192
+ bottom: var(--fa-bottom, 0);
193
+ left: var(--fa-left, 0);
194
+ right: auto;
195
+ top: auto;
196
+ transform: scale(var(--fa-layers-scale, 0.25));
197
+ transform-origin: bottom left;
198
+ }
199
+
200
+ .fa-layers-top-right {
201
+ top: var(--fa-top, 0);
202
+ right: var(--fa-right, 0);
203
+ transform: scale(var(--fa-layers-scale, 0.25));
204
+ transform-origin: top right;
205
+ }
206
+
207
+ .fa-layers-top-left {
208
+ left: var(--fa-left, 0);
209
+ right: auto;
210
+ top: var(--fa-top, 0);
211
+ transform: scale(var(--fa-layers-scale, 0.25));
212
+ transform-origin: top left;
213
+ }
214
+
215
+ .fa-1x {
216
+ font-size: 1em;
217
+ }
218
+
219
+ .fa-2x {
220
+ font-size: 2em;
221
+ }
222
+
223
+ .fa-3x {
224
+ font-size: 3em;
225
+ }
226
+
227
+ .fa-4x {
228
+ font-size: 4em;
229
+ }
230
+
231
+ .fa-5x {
232
+ font-size: 5em;
233
+ }
234
+
235
+ .fa-6x {
236
+ font-size: 6em;
237
+ }
238
+
239
+ .fa-7x {
240
+ font-size: 7em;
241
+ }
242
+
243
+ .fa-8x {
244
+ font-size: 8em;
245
+ }
246
+
247
+ .fa-9x {
248
+ font-size: 9em;
249
+ }
250
+
251
+ .fa-10x {
252
+ font-size: 10em;
253
+ }
254
+
255
+ .fa-2xs {
256
+ font-size: calc(10 / 16 * 1em); /* converts a 10px size into an em-based value that's relative to the scale's 16px base */
257
+ line-height: calc(1 / 10 * 1em); /* sets the line-height of the icon back to that of it's parent */
258
+ vertical-align: calc((6 / 10 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
259
+ }
260
+
261
+ .fa-xs {
262
+ font-size: calc(12 / 16 * 1em); /* converts a 12px size into an em-based value that's relative to the scale's 16px base */
263
+ line-height: calc(1 / 12 * 1em); /* sets the line-height of the icon back to that of it's parent */
264
+ vertical-align: calc((6 / 12 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
265
+ }
266
+
267
+ .fa-sm {
268
+ font-size: calc(14 / 16 * 1em); /* converts a 14px size into an em-based value that's relative to the scale's 16px base */
269
+ line-height: calc(1 / 14 * 1em); /* sets the line-height of the icon back to that of it's parent */
270
+ vertical-align: calc((6 / 14 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
271
+ }
272
+
273
+ .fa-lg {
274
+ font-size: calc(20 / 16 * 1em); /* converts a 20px size into an em-based value that's relative to the scale's 16px base */
275
+ line-height: calc(1 / 20 * 1em); /* sets the line-height of the icon back to that of it's parent */
276
+ vertical-align: calc((6 / 20 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
277
+ }
278
+
279
+ .fa-xl {
280
+ font-size: calc(24 / 16 * 1em); /* converts a 24px size into an em-based value that's relative to the scale's 16px base */
281
+ line-height: calc(1 / 24 * 1em); /* sets the line-height of the icon back to that of it's parent */
282
+ vertical-align: calc((6 / 24 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
283
+ }
284
+
285
+ .fa-2xl {
286
+ font-size: calc(32 / 16 * 1em); /* converts a 32px size into an em-based value that's relative to the scale's 16px base */
287
+ line-height: calc(1 / 32 * 1em); /* sets the line-height of the icon back to that of it's parent */
288
+ vertical-align: calc((6 / 32 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
289
+ }
290
+
291
+ .fa-width-auto {
292
+ --fa-width: auto;
293
+ }
294
+
295
+ .fa-fw,
296
+ .fa-width-fixed {
297
+ --fa-width: 1.25em;
298
+ }
299
+
300
+ .fa-ul {
301
+ list-style-type: none;
302
+ margin-inline-start: var(--fa-li-margin, 2.5em);
303
+ padding-inline-start: 0;
304
+ }
305
+ .fa-ul > li {
306
+ position: relative;
307
+ }
308
+
309
+ .fa-li {
310
+ inset-inline-start: calc(-1 * var(--fa-li-width, 2em));
311
+ position: absolute;
312
+ text-align: center;
313
+ width: var(--fa-li-width, 2em);
314
+ line-height: inherit;
315
+ }
316
+
317
+ /* Heads Up: Bordered Icons will not be supported in the future!
318
+ - This feature will be deprecated in the next major release of Font Awesome (v8)!
319
+ - You may continue to use it in this version *v7), but it will not be supported in Font Awesome v8.
320
+ */
321
+ /* Notes:
322
+ * --@{v.$css-prefix}-border-width = 1/16 by default (to render as ~1px based on a 16px default font-size)
323
+ * --@{v.$css-prefix}-border-padding =
324
+ ** 3/16 for vertical padding (to give ~2px of vertical whitespace around an icon considering it's vertical alignment)
325
+ ** 4/16 for horizontal padding (to give ~4px of horizontal whitespace around an icon)
326
+ */
327
+ .fa-border {
328
+ border-color: var(--fa-border-color, #eee);
329
+ border-radius: var(--fa-border-radius, 0.1em);
330
+ border-style: var(--fa-border-style, solid);
331
+ border-width: var(--fa-border-width, 0.0625em);
332
+ box-sizing: var(--fa-border-box-sizing, content-box);
333
+ padding: var(--fa-border-padding, 0.1875em 0.25em);
334
+ }
335
+
336
+ .fa-pull-left,
337
+ .fa-pull-start {
338
+ float: inline-start;
339
+ margin-inline-end: var(--fa-pull-margin, 0.3em);
340
+ }
341
+
342
+ .fa-pull-right,
343
+ .fa-pull-end {
344
+ float: inline-end;
345
+ margin-inline-start: var(--fa-pull-margin, 0.3em);
346
+ }
347
+
348
+ .fa-beat {
349
+ animation-name: fa-beat;
350
+ animation-delay: var(--fa-animation-delay, 0s);
351
+ animation-direction: var(--fa-animation-direction, normal);
352
+ animation-duration: var(--fa-animation-duration, 1s);
353
+ animation-iteration-count: var(--fa-animation-iteration-count, infinite);
354
+ animation-timing-function: var(--fa-animation-timing, ease-in-out);
355
+ }
356
+
357
+ .fa-bounce {
358
+ animation-name: fa-bounce;
359
+ animation-delay: var(--fa-animation-delay, 0s);
360
+ animation-direction: var(--fa-animation-direction, normal);
361
+ animation-duration: var(--fa-animation-duration, 1s);
362
+ animation-iteration-count: var(--fa-animation-iteration-count, infinite);
363
+ animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));
364
+ }
365
+
366
+ .fa-fade {
367
+ animation-name: fa-fade;
368
+ animation-delay: var(--fa-animation-delay, 0s);
369
+ animation-direction: var(--fa-animation-direction, normal);
370
+ animation-duration: var(--fa-animation-duration, 1s);
371
+ animation-iteration-count: var(--fa-animation-iteration-count, infinite);
372
+ animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
373
+ }
374
+
375
+ .fa-beat-fade {
376
+ animation-name: fa-beat-fade;
377
+ animation-delay: var(--fa-animation-delay, 0s);
378
+ animation-direction: var(--fa-animation-direction, normal);
379
+ animation-duration: var(--fa-animation-duration, 1s);
380
+ animation-iteration-count: var(--fa-animation-iteration-count, infinite);
381
+ animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
382
+ }
383
+
384
+ .fa-flip {
385
+ animation-name: fa-flip;
386
+ animation-delay: var(--fa-animation-delay, 0s);
387
+ animation-direction: var(--fa-animation-direction, normal);
388
+ animation-duration: var(--fa-animation-duration, 1s);
389
+ animation-iteration-count: var(--fa-animation-iteration-count, infinite);
390
+ animation-timing-function: var(--fa-animation-timing, ease-in-out);
391
+ }
392
+
393
+ .fa-shake {
394
+ animation-name: fa-shake;
395
+ animation-delay: var(--fa-animation-delay, 0s);
396
+ animation-direction: var(--fa-animation-direction, normal);
397
+ animation-duration: var(--fa-animation-duration, 1s);
398
+ animation-iteration-count: var(--fa-animation-iteration-count, infinite);
399
+ animation-timing-function: var(--fa-animation-timing, linear);
400
+ }
401
+
402
+ .fa-spin {
403
+ animation-name: fa-spin;
404
+ animation-delay: var(--fa-animation-delay, 0s);
405
+ animation-direction: var(--fa-animation-direction, normal);
406
+ animation-duration: var(--fa-animation-duration, 2s);
407
+ animation-iteration-count: var(--fa-animation-iteration-count, infinite);
408
+ animation-timing-function: var(--fa-animation-timing, linear);
409
+ }
410
+
411
+ .fa-spin-reverse {
412
+ --fa-animation-direction: reverse;
413
+ }
414
+
415
+ .fa-pulse,
416
+ .fa-spin-pulse {
417
+ animation-name: fa-spin;
418
+ animation-direction: var(--fa-animation-direction, normal);
419
+ animation-duration: var(--fa-animation-duration, 1s);
420
+ animation-iteration-count: var(--fa-animation-iteration-count, infinite);
421
+ animation-timing-function: var(--fa-animation-timing, steps(8));
422
+ }
423
+
424
+ @media (prefers-reduced-motion: reduce) {
425
+ .fa-beat,
426
+ .fa-bounce,
427
+ .fa-fade,
428
+ .fa-beat-fade,
429
+ .fa-flip,
430
+ .fa-pulse,
431
+ .fa-shake,
432
+ .fa-spin,
433
+ .fa-spin-pulse {
434
+ animation: none !important;
435
+ transition: none !important;
436
+ }
437
+ }
438
+ @keyframes fa-beat {
439
+ 0%, 90% {
440
+ transform: scale(1);
441
+ }
442
+ 45% {
443
+ transform: scale(var(--fa-beat-scale, 1.25));
444
+ }
445
+ }
446
+ @keyframes fa-bounce {
447
+ 0% {
448
+ transform: scale(1, 1) translateY(0);
449
+ }
450
+ 10% {
451
+ transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
452
+ }
453
+ 30% {
454
+ transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
455
+ }
456
+ 50% {
457
+ transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
458
+ }
459
+ 57% {
460
+ transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
461
+ }
462
+ 64% {
463
+ transform: scale(1, 1) translateY(0);
464
+ }
465
+ 100% {
466
+ transform: scale(1, 1) translateY(0);
467
+ }
468
+ }
469
+ @keyframes fa-fade {
470
+ 50% {
471
+ opacity: var(--fa-fade-opacity, 0.4);
472
+ }
473
+ }
474
+ @keyframes fa-beat-fade {
475
+ 0%, 100% {
476
+ opacity: var(--fa-beat-fade-opacity, 0.4);
477
+ transform: scale(1);
478
+ }
479
+ 50% {
480
+ opacity: 1;
481
+ transform: scale(var(--fa-beat-fade-scale, 1.125));
482
+ }
483
+ }
484
+ @keyframes fa-flip {
485
+ 50% {
486
+ transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
487
+ }
488
+ }
489
+ @keyframes fa-shake {
490
+ 0% {
491
+ transform: rotate(-15deg);
492
+ }
493
+ 4% {
494
+ transform: rotate(15deg);
495
+ }
496
+ 8%, 24% {
497
+ transform: rotate(-18deg);
498
+ }
499
+ 12%, 28% {
500
+ transform: rotate(18deg);
501
+ }
502
+ 16% {
503
+ transform: rotate(-22deg);
504
+ }
505
+ 20% {
506
+ transform: rotate(22deg);
507
+ }
508
+ 32% {
509
+ transform: rotate(-12deg);
510
+ }
511
+ 36% {
512
+ transform: rotate(12deg);
513
+ }
514
+ 40%, 100% {
515
+ transform: rotate(0deg);
516
+ }
517
+ }
518
+ @keyframes fa-spin {
519
+ 0% {
520
+ transform: rotate(0deg);
521
+ }
522
+ 100% {
523
+ transform: rotate(360deg);
524
+ }
525
+ }
526
+ .fa-rotate-90 {
527
+ transform: rotate(90deg);
528
+ }
529
+
530
+ .fa-rotate-180 {
531
+ transform: rotate(180deg);
532
+ }
533
+
534
+ .fa-rotate-270 {
535
+ transform: rotate(270deg);
536
+ }
537
+
538
+ .fa-flip-horizontal {
539
+ transform: scale(-1, 1);
540
+ }
541
+
542
+ .fa-flip-vertical {
543
+ transform: scale(1, -1);
544
+ }
545
+
546
+ .fa-flip-both,
547
+ .fa-flip-horizontal.fa-flip-vertical {
548
+ transform: scale(-1, -1);
549
+ }
550
+
551
+ .fa-rotate-by {
552
+ transform: rotate(var(--fa-rotate-angle, 0));
553
+ }
554
+
555
+ .svg-inline--fa .fa-primary {
556
+ fill: var(--fa-primary-color, currentColor);
557
+ opacity: var(--fa-primary-opacity, 1);
558
+ }
559
+
560
+ .svg-inline--fa .fa-secondary {
561
+ fill: var(--fa-secondary-color, currentColor);
562
+ opacity: var(--fa-secondary-opacity, 0.4);
563
+ }
564
+
565
+ .svg-inline--fa.fa-swap-opacity .fa-primary {
566
+ opacity: var(--fa-secondary-opacity, 0.4);
567
+ }
568
+
569
+ .svg-inline--fa.fa-swap-opacity .fa-secondary {
570
+ opacity: var(--fa-primary-opacity, 1);
571
+ }
572
+
573
+ .svg-inline--fa mask .fa-primary,
574
+ .svg-inline--fa mask .fa-secondary {
575
+ fill: black;
576
+ }
577
+
578
+ .svg-inline--fa.fa-inverse {
579
+ fill: var(--fa-inverse, #fff);
580
+ }
581
+
582
+ .fa-stack {
583
+ display: inline-block;
584
+ height: 2em;
585
+ line-height: 2em;
586
+ position: relative;
587
+ vertical-align: middle;
588
+ width: 2.5em;
589
+ }
590
+
591
+ .fa-inverse {
592
+ color: var(--fa-inverse, #fff);
593
+ }
594
+
595
+ .svg-inline--fa.fa-stack-1x {
596
+ --fa-width: 1.25em;
597
+ height: 1em;
598
+ width: var(--fa-width);
599
+ }
600
+ .svg-inline--fa.fa-stack-2x {
601
+ --fa-width: 2.5em;
602
+ height: 2em;
603
+ width: var(--fa-width);
604
+ }
605
+
606
+ .fa-stack-1x,
607
+ .fa-stack-2x {
608
+ inset: 0;
609
+ margin: auto;
610
+ position: absolute;
611
+ z-index: var(--fa-stack-z-index, auto);
612
+ }`;function nb(){var e=Yw,t=Jw,r=xe.cssPrefix,n=xe.replacementClass,i=fT;if(r!==e||n!==t){var s=new RegExp("\\.".concat(e,"\\-"),"g"),a=new RegExp("\\--".concat(e,"\\-"),"g"),o=new RegExp("\\.".concat(t),"g");i=i.replace(s,".".concat(r,"-")).replace(a,"--".concat(r,"-")).replace(o,".".concat(n))}return i}var qv=!1;function nf(){xe.autoAddCss&&!qv&&(oT(nb()),qv=!0)}var hT={mixout:function(){return{dom:{css:nb,insertCss:nf}}},hooks:function(){return{beforeDOMElementCreation:function(){nf()},beforeI2svg:function(){nf()}}}},nn=Mn||{};nn[rn]||(nn[rn]={});nn[rn].styles||(nn[rn].styles={});nn[rn].hooks||(nn[rn].hooks={});nn[rn].shims||(nn[rn].shims=[]);var wr=nn[rn],ib=[],sb=function(){it.removeEventListener("DOMContentLoaded",sb),uc=1,ib.map(function(t){return t()})},uc=!1;an&&(uc=(it.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(it.readyState),uc||it.addEventListener("DOMContentLoaded",sb));function dT(e){an&&(uc?setTimeout(e,0):ib.push(e))}function ra(e){var t=e.tag,r=e.attributes,n=r===void 0?{}:r,i=e.children,s=i===void 0?[]:i;return typeof e=="string"?rb(e):"<".concat(t," ").concat(lT(n),">").concat(s.map(ra).join(""),"</").concat(t,">")}function Yv(e,t,r){if(e&&e[t]&&e[t][r])return{prefix:t,iconName:r,icon:e[t][r]}}var sf=function(t,r,n,i){var s=Object.keys(t),a=s.length,o=r,l,c,h;for(n===void 0?(l=1,h=t[s[0]]):(l=0,h=n);l<a;l++)c=s[l],h=o(h,t[c],c,t);return h};function ob(e){return Er(e).length!==1?null:e.codePointAt(0).toString(16)}function Jv(e){return Object.keys(e).reduce(function(t,r){var n=e[r],i=!!n.icon;return i?t[n.iconName]=n.icon:t[r]=n,t},{})}function Wh(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=r.skipHooks,i=n===void 0?!1:n,s=Jv(t);typeof wr.hooks.addPack=="function"&&!i?wr.hooks.addPack(e,Jv(t)):wr.styles[e]=pe(pe({},wr.styles[e]||{}),s),e==="fas"&&Wh("fa",t)}var zo=wr.styles,pT=wr.shims,ab=Object.keys(Lp),mT=ab.reduce(function(e,t){return e[t]=Object.keys(Lp[t]),e},{}),Dp=null,lb={},cb={},ub={},fb={},hb={};function gT(e){return~tT.indexOf(e)}function vT(e,t){var r=t.split("-"),n=r[0],i=r.slice(1).join("-");return n===e&&i!==""&&!gT(i)?i:null}var db=function(){var t=function(s){return sf(zo,function(a,o,l){return a[l]=sf(o,s,{}),a},{})};lb=t(function(i,s,a){if(s[3]&&(i[s[3]]=a),s[2]){var o=s[2].filter(function(l){return typeof l=="number"});o.forEach(function(l){i[l.toString(16)]=a})}return i}),cb=t(function(i,s,a){if(i[a]=a,s[2]){var o=s[2].filter(function(l){return typeof l=="string"});o.forEach(function(l){i[l]=a})}return i}),hb=t(function(i,s,a){var o=s[2];return i[a]=a,o.forEach(function(l){i[l]=a}),i});var r="far"in zo||xe.autoFetchSvg,n=sf(pT,function(i,s){var a=s[0],o=s[1],l=s[2];return o==="far"&&!r&&(o="fas"),typeof a=="string"&&(i.names[a]={prefix:o,iconName:l}),typeof a=="number"&&(i.unicodes[a.toString(16)]={prefix:o,iconName:l}),i},{names:{},unicodes:{}});ub=n.names,fb=n.unicodes,Dp=Wc(xe.styleDefault,{family:xe.familyDefault})};sT(function(e){Dp=Wc(e.styleDefault,{family:xe.familyDefault})});db();function Ip(e,t){return(lb[e]||{})[t]}function _T(e,t){return(cb[e]||{})[t]}function ni(e,t){return(hb[e]||{})[t]}function pb(e){return ub[e]||{prefix:null,iconName:null}}function yT(e){var t=fb[e],r=Ip("fas",e);return t||(r?{prefix:"fas",iconName:r}:null)||{prefix:null,iconName:null}}function jn(){return Dp}var mb=function(){return{prefix:null,iconName:null,rest:[]}};function wT(e){var t=At,r=ab.reduce(function(n,i){return n[i]="".concat(xe.cssPrefix,"-").concat(i),n},{});return Vw.forEach(function(n){(e.includes(r[n])||e.some(function(i){return mT[n].includes(i)}))&&(t=n)}),t}function Wc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.family,n=r===void 0?At:r,i=JP[n][e];if(n===ea&&!e)return"fad";var s=Kv[n][e]||Kv[n][i],a=e in wr.styles?e:null,o=s||a||null;return o}function bT(e){var t=[],r=null;return e.forEach(function(n){var i=vT(xe.cssPrefix,n);i?r=i:n&&t.push(n)}),{iconName:r,rest:t}}function Xv(e){return e.sort().filter(function(t,r,n){return n.indexOf(t)===r})}var Qv=Gw.concat(Kw);function Vc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.skipLookups,n=r===void 0?!1:r,i=null,s=Xv(e.filter(function(g){return Qv.includes(g)})),a=Xv(e.filter(function(g){return!Qv.includes(g)})),o=s.filter(function(g){return i=g,!Lw.includes(g)}),l=Hc(o,1),c=l[0],h=c===void 0?null:c,u=wT(s),m=pe(pe({},bT(a)),{},{prefix:Wc(h,{family:u})});return pe(pe(pe({},m),xT({values:e,family:u,styles:zo,config:xe,canonical:m,givenPrefix:i})),ST(n,i,m))}function ST(e,t,r){var n=r.prefix,i=r.iconName;if(e||!n||!i)return{prefix:n,iconName:i};var s=t==="fa"?pb(i):{},a=ni(n,i);return i=s.iconName||a||i,n=s.prefix||n,n==="far"&&!zo.far&&zo.fas&&!xe.autoFetchSvg&&(n="fas"),{prefix:n,iconName:i}}var CT=Vw.filter(function(e){return e!==At||e!==ea}),kT=Object.keys(Bh).filter(function(e){return e!==At}).map(function(e){return Object.keys(Bh[e])}).flat();function xT(e){var t=e.values,r=e.family,n=e.canonical,i=e.givenPrefix,s=i===void 0?"":i,a=e.styles,o=a===void 0?{}:a,l=e.config,c=l===void 0?{}:l,h=r===ea,u=t.includes("fa-duotone")||t.includes("fad"),m=c.familyDefault==="duotone",g=n.prefix==="fad"||n.prefix==="fa-duotone";if(!h&&(u||m||g)&&(n.prefix="fad"),(t.includes("fa-brands")||t.includes("fab"))&&(n.prefix="fab"),!n.prefix&&CT.includes(r)){var y=Object.keys(o).find(function(v){return kT.includes(v)});if(y||c.autoFetchSvg){var _=HL.get(r).defaultShortPrefixId;n.prefix=_,n.iconName=ni(n.prefix,n.iconName)||n.iconName}}return(n.prefix==="fa"||s==="fa")&&(n.prefix=jn()||"fas"),n}var ET=function(){function e(){uL(this,e),this.definitions={}}return hL(e,[{key:"add",value:function(){for(var r=this,n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];var a=i.reduce(this._pullDefinitions,{});Object.keys(a).forEach(function(o){r.definitions[o]=pe(pe({},r.definitions[o]||{}),a[o]),Wh(o,a[o]);var l=Lp[At][o];l&&Wh(l,a[o]),db()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(r,n){var i=n.prefix&&n.iconName&&n.icon?{0:n}:n;return Object.keys(i).map(function(s){var a=i[s],o=a.prefix,l=a.iconName,c=a.icon,h=c[2];r[o]||(r[o]={}),h.length>0&&h.forEach(function(u){typeof u=="string"&&(r[o][u]=c)}),r[o][l]=c}),r}}])}(),Zv=[],Xi={},is={},AT=Object.keys(is);function LT(e,t){var r=t.mixoutsTo;return Zv=e,Xi={},Object.keys(is).forEach(function(n){AT.indexOf(n)===-1&&delete is[n]}),Zv.forEach(function(n){var i=n.mixout?n.mixout():{};if(Object.keys(i).forEach(function(a){typeof i[a]=="function"&&(r[a]=i[a]),cc(i[a])==="object"&&Object.keys(i[a]).forEach(function(o){r[a]||(r[a]={}),r[a][o]=i[a][o]})}),n.hooks){var s=n.hooks();Object.keys(s).forEach(function(a){Xi[a]||(Xi[a]=[]),Xi[a].push(s[a])})}n.provides&&n.provides(is)}),r}function Vh(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];var s=Xi[e]||[];return s.forEach(function(a){t=a.apply(null,[t].concat(n))}),t}function di(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=Xi[e]||[];i.forEach(function(s){s.apply(null,r)})}function Bn(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return is[e]?is[e].apply(null,t):void 0}function Kh(e){e.prefix==="fa"&&(e.prefix="fas");var t=e.iconName,r=e.prefix||jn();if(t)return t=ni(r,t)||t,Yv(gb.definitions,r,t)||Yv(wr.styles,r,t)}var gb=new ET,PT=function(){xe.autoReplaceSvg=!1,xe.observeMutations=!1,di("noAuto")},TT={i2svg:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return an?(di("beforeI2svg",t),Bn("pseudoElements2svg",t),Bn("i2svg",t)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.autoReplaceSvgRoot;xe.autoReplaceSvg===!1&&(xe.autoReplaceSvg=!0),xe.observeMutations=!0,dT(function(){IT({autoReplaceSvgRoot:r}),di("watch",t)})}},DT={icon:function(t){if(t===null)return null;if(cc(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:ni(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){var r=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],n=Wc(t[0]);return{prefix:n,iconName:ni(n,r)||r}}if(typeof t=="string"&&(t.indexOf("".concat(xe.cssPrefix,"-"))>-1||t.match(XP))){var i=Vc(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||jn(),iconName:ni(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var s=jn();return{prefix:s,iconName:ni(s,t)||t}}}},or={noAuto:PT,config:xe,dom:TT,parse:DT,library:gb,findIconDefinition:Kh,toHtml:ra},IT=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.autoReplaceSvgRoot,n=r===void 0?it:r;(Object.keys(wr.styles).length>0||xe.autoFetchSvg)&&an&&xe.autoReplaceSvg&&or.dom.i2svg({node:n})};function Kc(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(n){return ra(n)})}}),Object.defineProperty(e,"node",{get:function(){if(an){var n=it.createElement("div");return n.innerHTML=e.html,n.children}}}),e}function NT(e){var t=e.children,r=e.main,n=e.mask,i=e.attributes,s=e.styles,a=e.transform;if(Tp(a)&&r.found&&!n.found){var o=r.width,l=r.height,c={x:o/l/2,y:.5};i.style=Uc(pe(pe({},s),{},{"transform-origin":"".concat(c.x+a.x/16,"em ").concat(c.y+a.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function RT(e){var t=e.prefix,r=e.iconName,n=e.children,i=e.attributes,s=e.symbol,a=s===!0?"".concat(t,"-").concat(xe.cssPrefix,"-").concat(r):s;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:pe(pe({},i),{},{id:a}),children:n}]}]}function OT(e){var t=["aria-label","aria-labelledby","title","role"];return t.some(function(r){return r in e})}function Np(e){var t=e.icons,r=t.main,n=t.mask,i=e.prefix,s=e.iconName,a=e.transform,o=e.symbol,l=e.maskId,c=e.extra,h=e.watchable,u=h===void 0?!1:h,m=n.found?n:r,g=m.width,y=m.height,_=[xe.replacementClass,s?"".concat(xe.cssPrefix,"-").concat(s):""].filter(function(S){return c.classes.indexOf(S)===-1}).filter(function(S){return S!==""||!!S}).concat(c.classes).join(" "),v={children:[],attributes:pe(pe({},c.attributes),{},{"data-prefix":i,"data-icon":s,class:_,role:c.attributes.role||"img",viewBox:"0 0 ".concat(g," ").concat(y)})};!OT(c.attributes)&&!c.attributes["aria-hidden"]&&(v.attributes["aria-hidden"]="true"),u&&(v.attributes[hi]="");var d=pe(pe({},v),{},{prefix:i,iconName:s,main:r,mask:n,maskId:l,transform:a,symbol:o,styles:pe({},c.styles)}),f=n.found&&r.found?Bn("generateAbstractMask",d)||{children:[],attributes:{}}:Bn("generateAbstractIcon",d)||{children:[],attributes:{}},p=f.children,w=f.attributes;return d.children=p,d.attributes=w,o?RT(d):NT(d)}function e_(e){var t=e.content,r=e.width,n=e.height,i=e.transform,s=e.extra,a=e.watchable,o=a===void 0?!1:a,l=pe(pe({},s.attributes),{},{class:s.classes.join(" ")});o&&(l[hi]="");var c=pe({},s.styles);Tp(i)&&(c.transform=uT({transform:i,width:r,height:n}),c["-webkit-transform"]=c.transform);var h=Uc(c);h.length>0&&(l.style=h);var u=[];return u.push({tag:"span",attributes:l,children:[t]}),u}function MT(e){var t=e.content,r=e.extra,n=pe(pe({},r.attributes),{},{class:r.classes.join(" ")}),i=Uc(r.styles);i.length>0&&(n.style=i);var s=[];return s.push({tag:"span",attributes:n,children:[t]}),s}var of=wr.styles;function Gh(e){var t=e[0],r=e[1],n=e.slice(4),i=Hc(n,1),s=i[0],a=null;return Array.isArray(s)?a={tag:"g",attributes:{class:"".concat(xe.cssPrefix,"-").concat(rf.GROUP)},children:[{tag:"path",attributes:{class:"".concat(xe.cssPrefix,"-").concat(rf.SECONDARY),fill:"currentColor",d:s[0]}},{tag:"path",attributes:{class:"".concat(xe.cssPrefix,"-").concat(rf.PRIMARY),fill:"currentColor",d:s[1]}}]}:a={tag:"path",attributes:{fill:"currentColor",d:s}},{found:!0,width:t,height:r,icon:a}}var jT={found:!1,width:512,height:512};function BT(e,t){!Qw&&!xe.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function qh(e,t){var r=t;return t==="fa"&&xe.styleDefault!==null&&(t=jn()),new Promise(function(n,i){if(r==="fa"){var s=pb(e)||{};e=s.iconName||e,t=s.prefix||t}if(e&&t&&of[t]&&of[t][e]){var a=of[t][e];return n(Gh(a))}BT(e,t),n(pe(pe({},jT),{},{icon:xe.showMissingIcons&&e?Bn("missingIconAbstract")||{}:{}}))})}var t_=function(){},Yh=xe.measurePerformance&&Qa&&Qa.mark&&Qa.measure?Qa:{mark:t_,measure:t_},to='FA "7.1.0"',FT=function(t){return Yh.mark("".concat(to," ").concat(t," begins")),function(){return vb(t)}},vb=function(t){Yh.mark("".concat(to," ").concat(t," ends")),Yh.measure("".concat(to," ").concat(t),"".concat(to," ").concat(t," begins"),"".concat(to," ").concat(t," ends"))},Rp={begin:FT,end:vb},Ll=function(){};function r_(e){var t=e.getAttribute?e.getAttribute(hi):null;return typeof t=="string"}function zT(e){var t=e.getAttribute?e.getAttribute(Ep):null,r=e.getAttribute?e.getAttribute(Ap):null;return t&&r}function $T(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(xe.replacementClass)}function HT(){if(xe.autoReplaceSvg===!0)return Pl.replace;var e=Pl[xe.autoReplaceSvg];return e||Pl.replace}function UT(e){return it.createElementNS("http://www.w3.org/2000/svg",e)}function WT(e){return it.createElement(e)}function _b(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.ceFn,n=r===void 0?e.tag==="svg"?UT:WT:r;if(typeof e=="string")return it.createTextNode(e);var i=n(e.tag);Object.keys(e.attributes||[]).forEach(function(a){i.setAttribute(a,e.attributes[a])});var s=e.children||[];return s.forEach(function(a){i.appendChild(_b(a,{ceFn:n}))}),i}function VT(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var Pl={replace:function(t){var r=t[0];if(r.parentNode)if(t[1].forEach(function(i){r.parentNode.insertBefore(_b(i),r)}),r.getAttribute(hi)===null&&xe.keepOriginalSource){var n=it.createComment(VT(r));r.parentNode.replaceChild(n,r)}else r.remove()},nest:function(t){var r=t[0],n=t[1];if(~Pp(r).indexOf(xe.replacementClass))return Pl.replace(t);var i=new RegExp("".concat(xe.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){var s=n[0].attributes.class.split(" ").reduce(function(o,l){return l===xe.replacementClass||l.match(i)?o.toSvg.push(l):o.toNode.push(l),o},{toNode:[],toSvg:[]});n[0].attributes.class=s.toSvg.join(" "),s.toNode.length===0?r.removeAttribute("class"):r.setAttribute("class",s.toNode.join(" "))}var a=n.map(function(o){return ra(o)}).join(`
613
+ `);r.setAttribute(hi,""),r.innerHTML=a}};function n_(e){e()}function yb(e,t){var r=typeof t=="function"?t:Ll;if(e.length===0)r();else{var n=n_;xe.mutateApproach===qP&&(n=Mn.requestAnimationFrame||n_),n(function(){var i=HT(),s=Rp.begin("mutate");e.map(i),s(),r()})}}var Op=!1;function wb(){Op=!0}function Jh(){Op=!1}var fc=null;function i_(e){if(Hv&&xe.observeMutations){var t=e.treeCallback,r=t===void 0?Ll:t,n=e.nodeCallback,i=n===void 0?Ll:n,s=e.pseudoElementsCallback,a=s===void 0?Ll:s,o=e.observeMutationsRoot,l=o===void 0?it:o;fc=new Hv(function(c){if(!Op){var h=jn();Cs(c).forEach(function(u){if(u.type==="childList"&&u.addedNodes.length>0&&!r_(u.addedNodes[0])&&(xe.searchPseudoElements&&a(u.target),r(u.target)),u.type==="attributes"&&u.target.parentNode&&xe.searchPseudoElements&&a([u.target],!0),u.type==="attributes"&&r_(u.target)&&~eT.indexOf(u.attributeName))if(u.attributeName==="class"&&zT(u.target)){var m=Vc(Pp(u.target)),g=m.prefix,y=m.iconName;u.target.setAttribute(Ep,g||h),y&&u.target.setAttribute(Ap,y)}else $T(u.target)&&i(u.target)})}}),an&&fc.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function KT(){fc&&fc.disconnect()}function GT(e){var t=e.getAttribute("style"),r=[];return t&&(r=t.split(";").reduce(function(n,i){var s=i.split(":"),a=s[0],o=s.slice(1);return a&&o.length>0&&(n[a]=o.join(":").trim()),n},{})),r}function qT(e){var t=e.getAttribute("data-prefix"),r=e.getAttribute("data-icon"),n=e.innerText!==void 0?e.innerText.trim():"",i=Vc(Pp(e));return i.prefix||(i.prefix=jn()),t&&r&&(i.prefix=t,i.iconName=r),i.iconName&&i.prefix||(i.prefix&&n.length>0&&(i.iconName=_T(i.prefix,e.innerText)||Ip(i.prefix,ob(e.innerText))),!i.iconName&&xe.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function YT(e){var t=Cs(e.attributes).reduce(function(r,n){return r.name!=="class"&&r.name!=="style"&&(r[n.name]=n.value),r},{});return t}function JT(){return{iconName:null,prefix:null,transform:Or,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function s_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},r=qT(e),n=r.iconName,i=r.prefix,s=r.rest,a=YT(e),o=Vh("parseNodeAttributes",{},e),l=t.styleParser?GT(e):[];return pe({iconName:n,prefix:i,transform:Or,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:s,styles:l,attributes:a}},o)}var XT=wr.styles;function bb(e){var t=xe.autoReplaceSvg==="nest"?s_(e,{styleParser:!1}):s_(e);return~t.extra.classes.indexOf(eb)?Bn("generateLayersText",e,t):Bn("generateSvgReplacementMutation",e,t)}function QT(){return[].concat(Er(Kw),Er(Gw))}function o_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!an)return Promise.resolve();var r=it.documentElement.classList,n=function(u){return r.add("".concat(Vv,"-").concat(u))},i=function(u){return r.remove("".concat(Vv,"-").concat(u))},s=xe.autoFetchSvg?QT():Lw.concat(Object.keys(XT));s.includes("fa")||s.push("fa");var a=[".".concat(eb,":not([").concat(hi,"])")].concat(s.map(function(h){return".".concat(h,":not([").concat(hi,"])")})).join(", ");if(a.length===0)return Promise.resolve();var o=[];try{o=Cs(e.querySelectorAll(a))}catch{}if(o.length>0)n("pending"),i("complete");else return Promise.resolve();var l=Rp.begin("onTree"),c=o.reduce(function(h,u){try{var m=bb(u);m&&h.push(m)}catch(g){Qw||g.name==="MissingIcon"&&console.error(g)}return h},[]);return new Promise(function(h,u){Promise.all(c).then(function(m){yb(m,function(){n("active"),n("complete"),i("pending"),typeof t=="function"&&t(),l(),h()})}).catch(function(m){l(),u(m)})})}function ZT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;bb(e).then(function(r){r&&yb([r],t)})}function eD(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=(t||{}).icon?t:Kh(t||{}),i=r.mask;return i&&(i=(i||{}).icon?i:Kh(i||{})),e(n,pe(pe({},r),{},{mask:i}))}}var tD=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.transform,i=n===void 0?Or:n,s=r.symbol,a=s===void 0?!1:s,o=r.mask,l=o===void 0?null:o,c=r.maskId,h=c===void 0?null:c,u=r.classes,m=u===void 0?[]:u,g=r.attributes,y=g===void 0?{}:g,_=r.styles,v=_===void 0?{}:_;if(t){var d=t.prefix,f=t.iconName,p=t.icon;return Kc(pe({type:"icon"},t),function(){return di("beforeDOMElementCreation",{iconDefinition:t,params:r}),Np({icons:{main:Gh(p),mask:l?Gh(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:d,iconName:f,transform:pe(pe({},Or),i),symbol:a,maskId:h,extra:{attributes:y,styles:v,classes:m}})})}},rD={mixout:function(){return{icon:eD(tD)}},hooks:function(){return{mutationObserverCallbacks:function(r){return r.treeCallback=o_,r.nodeCallback=ZT,r}}},provides:function(t){t.i2svg=function(r){var n=r.node,i=n===void 0?it:n,s=r.callback,a=s===void 0?function(){}:s;return o_(i,a)},t.generateSvgReplacementMutation=function(r,n){var i=n.iconName,s=n.prefix,a=n.transform,o=n.symbol,l=n.mask,c=n.maskId,h=n.extra;return new Promise(function(u,m){Promise.all([qh(i,s),l.iconName?qh(l.iconName,l.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(g){var y=Hc(g,2),_=y[0],v=y[1];u([r,Np({icons:{main:_,mask:v},prefix:s,iconName:i,transform:a,symbol:o,maskId:c,extra:h,watchable:!0})])}).catch(m)})},t.generateAbstractIcon=function(r){var n=r.children,i=r.attributes,s=r.main,a=r.transform,o=r.styles,l=Uc(o);l.length>0&&(i.style=l);var c;return Tp(a)&&(c=Bn("generateAbstractTransformGrouping",{main:s,transform:a,containerWidth:s.width,iconWidth:s.width})),n.push(c||s.icon),{children:n,attributes:i}}}},nD={mixout:function(){return{layer:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.classes,s=i===void 0?[]:i;return Kc({type:"layer"},function(){di("beforeDOMElementCreation",{assembler:r,params:n});var a=[];return r(function(o){Array.isArray(o)?o.map(function(l){a=a.concat(l.abstract)}):a=a.concat(o.abstract)}),[{tag:"span",attributes:{class:["".concat(xe.cssPrefix,"-layers")].concat(Er(s)).join(" ")},children:a}]})}}}},iD={mixout:function(){return{counter:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};n.title;var i=n.classes,s=i===void 0?[]:i,a=n.attributes,o=a===void 0?{}:a,l=n.styles,c=l===void 0?{}:l;return Kc({type:"counter",content:r},function(){return di("beforeDOMElementCreation",{content:r,params:n}),MT({content:r.toString(),extra:{attributes:o,styles:c,classes:["".concat(xe.cssPrefix,"-layers-counter")].concat(Er(s))}})})}}}},sD={mixout:function(){return{text:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.transform,s=i===void 0?Or:i,a=n.classes,o=a===void 0?[]:a,l=n.attributes,c=l===void 0?{}:l,h=n.styles,u=h===void 0?{}:h;return Kc({type:"text",content:r},function(){return di("beforeDOMElementCreation",{content:r,params:n}),e_({content:r,transform:pe(pe({},Or),s),extra:{attributes:c,styles:u,classes:["".concat(xe.cssPrefix,"-layers-text")].concat(Er(o))}})})}}},provides:function(t){t.generateLayersText=function(r,n){var i=n.transform,s=n.extra,a=null,o=null;if(Ew){var l=parseInt(getComputedStyle(r).fontSize,10),c=r.getBoundingClientRect();a=c.width/l,o=c.height/l}return Promise.resolve([r,e_({content:r.innerHTML,width:a,height:o,transform:i,extra:s,watchable:!0})])}}},Sb=new RegExp('"',"ug"),a_=[1105920,1112319],l_=pe(pe(pe(pe({},{FontAwesome:{normal:"fas",400:"fas"}}),$L),KP),JL),Xh=Object.keys(l_).reduce(function(e,t){return e[t.toLowerCase()]=l_[t],e},{}),oD=Object.keys(Xh).reduce(function(e,t){var r=Xh[t];return e[t]=r[900]||Er(Object.entries(r))[0][1],e},{});function aD(e){var t=e.replace(Sb,"");return ob(Er(t)[0]||"")}function lD(e){var t=e.getPropertyValue("font-feature-settings").includes("ss01"),r=e.getPropertyValue("content"),n=r.replace(Sb,""),i=n.codePointAt(0),s=i>=a_[0]&&i<=a_[1],a=n.length===2?n[0]===n[1]:!1;return s||a||t}function cD(e,t){var r=e.replace(/^['"]|['"]$/g,"").toLowerCase(),n=parseInt(t),i=isNaN(n)?"normal":n;return(Xh[r]||{})[i]||oD[r]}function c_(e,t){var r="".concat(GP).concat(t.replace(":","-"));return new Promise(function(n,i){if(e.getAttribute(r)!==null)return n();var s=Cs(e.children),a=s.filter(function(b){return b.getAttribute(zh)===t})[0],o=Mn.getComputedStyle(e,t),l=o.getPropertyValue("font-family"),c=l.match(QP),h=o.getPropertyValue("font-weight"),u=o.getPropertyValue("content");if(a&&!c)return e.removeChild(a),n();if(c&&u!=="none"&&u!==""){var m=o.getPropertyValue("content"),g=cD(l,h),y=aD(m),_=c[0].startsWith("FontAwesome"),v=lD(o),d=Ip(g,y),f=d;if(_){var p=yT(y);p.iconName&&p.prefix&&(d=p.iconName,g=p.prefix)}if(d&&!v&&(!a||a.getAttribute(Ep)!==g||a.getAttribute(Ap)!==f)){e.setAttribute(r,f),a&&e.removeChild(a);var w=JT(),S=w.extra;S.attributes[zh]=t,qh(d,g).then(function(b){var x=Np(pe(pe({},w),{},{icons:{main:b,mask:mb()},prefix:g,iconName:f,extra:S,watchable:!0})),C=it.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(C,e.firstChild):e.appendChild(C),C.outerHTML=x.map(function(A){return ra(A)}).join(`
614
+ `),e.removeAttribute(r),n()}).catch(i)}else n()}else n()})}function uD(e){return Promise.all([c_(e,"::before"),c_(e,"::after")])}function fD(e){return e.parentNode!==document.head&&!~YP.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(zh)&&(!e.parentNode||e.parentNode.tagName!=="svg")}var hD=function(t){return!!t&&Xw.some(function(r){return t.includes(r)})},dD=function(t){if(!t)return[];var r=new Set,n=t.split(/,(?![^()]*\))/).map(function(l){return l.trim()});n=n.flatMap(function(l){return l.includes("(")?l:l.split(",").map(function(c){return c.trim()})});var i=Al(n),s;try{for(i.s();!(s=i.n()).done;){var a=s.value;if(hD(a)){var o=Xw.reduce(function(l,c){return l.replace(c,"")},a);o!==""&&o!=="*"&&r.add(o)}}}catch(l){i.e(l)}finally{i.f()}return r};function u_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(an){var r;if(t)r=e;else if(xe.searchPseudoElementsFullScan)r=e.querySelectorAll("*");else{var n=new Set,i=Al(document.styleSheets),s;try{for(i.s();!(s=i.n()).done;){var a=s.value;try{var o=Al(a.cssRules),l;try{for(o.s();!(l=o.n()).done;){var c=l.value,h=dD(c.selectorText),u=Al(h),m;try{for(u.s();!(m=u.n()).done;){var g=m.value;n.add(g)}}catch(_){u.e(_)}finally{u.f()}}}catch(_){o.e(_)}finally{o.f()}}catch(_){xe.searchPseudoElementsWarnings&&console.warn("Font Awesome: cannot parse stylesheet: ".concat(a.href," (").concat(_.message,`)
615
+ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered as SVG icons. Add crossorigin="anonymous" to the <link>, enable searchPseudoElementsFullScan for slower but more thorough DOM parsing, or suppress this warning by setting searchPseudoElementsWarnings to false.`))}}}catch(_){i.e(_)}finally{i.f()}if(!n.size)return;var y=Array.from(n).join(", ");try{r=e.querySelectorAll(y)}catch{}}return new Promise(function(_,v){var d=Cs(r).filter(fD).map(uD),f=Rp.begin("searchPseudoElements");wb(),Promise.all(d).then(function(){f(),Jh(),_()}).catch(function(){f(),Jh(),v()})})}}var pD={hooks:function(){return{mutationObserverCallbacks:function(r){return r.pseudoElementsCallback=u_,r}}},provides:function(t){t.pseudoElements2svg=function(r){var n=r.node,i=n===void 0?it:n;xe.searchPseudoElements&&u_(i)}}},f_=!1,mD={mixout:function(){return{dom:{unwatch:function(){wb(),f_=!0}}}},hooks:function(){return{bootstrap:function(){i_(Vh("mutationObserverCallbacks",{}))},noAuto:function(){KT()},watch:function(r){var n=r.observeMutationsRoot;f_?Jh():i_(Vh("mutationObserverCallbacks",{observeMutationsRoot:n}))}}}},h_=function(t){var r={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(n,i){var s=i.toLowerCase().split("-"),a=s[0],o=s.slice(1).join("-");if(a&&o==="h")return n.flipX=!0,n;if(a&&o==="v")return n.flipY=!0,n;if(o=parseFloat(o),isNaN(o))return n;switch(a){case"grow":n.size=n.size+o;break;case"shrink":n.size=n.size-o;break;case"left":n.x=n.x-o;break;case"right":n.x=n.x+o;break;case"up":n.y=n.y-o;break;case"down":n.y=n.y+o;break;case"rotate":n.rotate=n.rotate+o;break}return n},r)},gD={mixout:function(){return{parse:{transform:function(r){return h_(r)}}}},hooks:function(){return{parseNodeAttributes:function(r,n){var i=n.getAttribute("data-fa-transform");return i&&(r.transform=h_(i)),r}}},provides:function(t){t.generateAbstractTransformGrouping=function(r){var n=r.main,i=r.transform,s=r.containerWidth,a=r.iconWidth,o={transform:"translate(".concat(s/2," 256)")},l="translate(".concat(i.x*32,", ").concat(i.y*32,") "),c="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),h="rotate(".concat(i.rotate," 0 0)"),u={transform:"".concat(l," ").concat(c," ").concat(h)},m={transform:"translate(".concat(a/2*-1," -256)")},g={outer:o,inner:u,path:m};return{tag:"g",attributes:pe({},g.outer),children:[{tag:"g",attributes:pe({},g.inner),children:[{tag:n.icon.tag,children:n.icon.children,attributes:pe(pe({},n.icon.attributes),g.path)}]}]}}}},af={x:0,y:0,width:"100%",height:"100%"};function d_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function vD(e){return e.tag==="g"?e.children:[e]}var _D={hooks:function(){return{parseNodeAttributes:function(r,n){var i=n.getAttribute("data-fa-mask"),s=i?Vc(i.split(" ").map(function(a){return a.trim()})):mb();return s.prefix||(s.prefix=jn()),r.mask=s,r.maskId=n.getAttribute("data-fa-mask-id"),r}}},provides:function(t){t.generateAbstractMask=function(r){var n=r.children,i=r.attributes,s=r.main,a=r.mask,o=r.maskId,l=r.transform,c=s.width,h=s.icon,u=a.width,m=a.icon,g=cT({transform:l,containerWidth:u,iconWidth:c}),y={tag:"rect",attributes:pe(pe({},af),{},{fill:"white"})},_=h.children?{children:h.children.map(d_)}:{},v={tag:"g",attributes:pe({},g.inner),children:[d_(pe({tag:h.tag,attributes:pe(pe({},h.attributes),g.path)},_))]},d={tag:"g",attributes:pe({},g.outer),children:[v]},f="mask-".concat(o||Gv()),p="clip-".concat(o||Gv()),w={tag:"mask",attributes:pe(pe({},af),{},{id:f,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[y,d]},S={tag:"defs",children:[{tag:"clipPath",attributes:{id:p},children:vD(m)},w]};return n.push(S,{tag:"rect",attributes:pe({fill:"currentColor","clip-path":"url(#".concat(p,")"),mask:"url(#".concat(f,")")},af)}),{children:n,attributes:i}}}},yD={provides:function(t){var r=!1;Mn.matchMedia&&(r=Mn.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var n=[],i={fill:"currentColor"},s={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};n.push({tag:"path",attributes:pe(pe({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var a=pe(pe({},s),{},{attributeName:"opacity"}),o={tag:"circle",attributes:pe(pe({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return r||o.children.push({tag:"animate",attributes:pe(pe({},s),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:pe(pe({},a),{},{values:"1;0;1;1;0;1;"})}),n.push(o),n.push({tag:"path",attributes:pe(pe({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:r?[]:[{tag:"animate",attributes:pe(pe({},a),{},{values:"1;0;0;0;0;1;"})}]}),r||n.push({tag:"path",attributes:pe(pe({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:pe(pe({},a),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:n}}}},wD={hooks:function(){return{parseNodeAttributes:function(r,n){var i=n.getAttribute("data-fa-symbol"),s=i===null?!1:i===""?!0:i;return r.symbol=s,r}}}},bD=[hT,rD,nD,iD,sD,pD,mD,gD,_D,yD,wD];LT(bD,{mixoutsTo:or});or.noAuto;var $o=or.config;or.library;or.dom;var Cb=or.parse;or.findIconDefinition;or.toHtml;var SD=or.icon;or.layer;or.text;or.counter;function CD(e){return e=e-0,e===e}function kb(e){return CD(e)?e:(e=e.replace(/[_-]+(.)?/g,(t,r)=>r?r.toUpperCase():""),e.charAt(0).toLowerCase()+e.slice(1))}function kD(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Ai=new Map,xD=1e3;function ED(e){if(Ai.has(e))return Ai.get(e);const t={};let r=0;const n=e.length;for(;r<n;){const i=e.indexOf(";",r),s=i===-1?n:i,a=e.slice(r,s).trim();if(a){const o=a.indexOf(":");if(o>0){const l=a.slice(0,o).trim(),c=a.slice(o+1).trim();if(l&&c){const h=kb(l);t[h.startsWith("webkit")?kD(h):h]=c}}}r=s+1}if(Ai.size===xD){const i=Ai.keys().next().value;i&&Ai.delete(i)}return Ai.set(e,t),t}function xb(e,t,r={}){if(typeof t=="string")return t;const n=(t.children||[]).map(h=>xb(e,h)),i=t.attributes||{},s={};for(const[h,u]of Object.entries(i))switch(!0){case h==="class":{s.className=u;break}case h==="style":{s.style=ED(String(u));break}case h.startsWith("aria-"):case h.startsWith("data-"):{s[h.toLowerCase()]=u;break}default:s[kb(h)]=u}const{style:a,role:o,"aria-label":l,...c}=r;return a&&(s.style=s.style?{...s.style,...a}:a),o&&(s.role=o),l&&(s["aria-label"]=l,s["aria-hidden"]="false"),e(t.tag,{...c,...s},...n)}var AD=xb.bind(null,bc.createElement),p_=(e,t)=>{const r=k.useId();return e||(t?r:void 0)},LD=class{constructor(e="react-fontawesome"){this.enabled=!1;let t=!1;try{t=typeof process<"u"&&!1}catch{}this.scope=e,this.enabled=t}log(...e){this.enabled&&console.log(`[${this.scope}]`,...e)}warn(...e){this.enabled&&console.warn(`[${this.scope}]`,...e)}error(...e){this.enabled&&console.error(`[${this.scope}]`,...e)}},PD="searchPseudoElementsFullScan"in $o?"7.0.0":"6.0.0",TD=Number.parseInt(PD)>=7,mo="fa",Ur={beat:"fa-beat",fade:"fa-fade",beatFade:"fa-beat-fade",bounce:"fa-bounce",shake:"fa-shake",spin:"fa-spin",spinPulse:"fa-spin-pulse",spinReverse:"fa-spin-reverse",pulse:"fa-pulse"},DD={left:"fa-pull-left",right:"fa-pull-right"},ID={90:"fa-rotate-90",180:"fa-rotate-180",270:"fa-rotate-270"},ND={"2xs":"fa-2xs",xs:"fa-xs",sm:"fa-sm",lg:"fa-lg",xl:"fa-xl","2xl":"fa-2xl","1x":"fa-1x","2x":"fa-2x","3x":"fa-3x","4x":"fa-4x","5x":"fa-5x","6x":"fa-6x","7x":"fa-7x","8x":"fa-8x","9x":"fa-9x","10x":"fa-10x"},Wr={border:"fa-border",fixedWidth:"fa-fw",flip:"fa-flip",flipHorizontal:"fa-flip-horizontal",flipVertical:"fa-flip-vertical",inverse:"fa-inverse",rotateBy:"fa-rotate-by",swapOpacity:"fa-swap-opacity",widthAuto:"fa-width-auto"};function RD(e){const t=$o.cssPrefix||$o.familyPrefix||mo;return t===mo?e:e.replace(new RegExp(String.raw`(?<=^|\s)${mo}-`,"g"),`${t}-`)}function OD(e){const{beat:t,fade:r,beatFade:n,bounce:i,shake:s,spin:a,spinPulse:o,spinReverse:l,pulse:c,fixedWidth:h,inverse:u,border:m,flip:g,size:y,rotation:_,pull:v,swapOpacity:d,rotateBy:f,widthAuto:p,className:w}=e,S=[];return w&&S.push(...w.split(" ")),t&&S.push(Ur.beat),r&&S.push(Ur.fade),n&&S.push(Ur.beatFade),i&&S.push(Ur.bounce),s&&S.push(Ur.shake),a&&S.push(Ur.spin),l&&S.push(Ur.spinReverse),o&&S.push(Ur.spinPulse),c&&S.push(Ur.pulse),h&&S.push(Wr.fixedWidth),u&&S.push(Wr.inverse),m&&S.push(Wr.border),g===!0&&S.push(Wr.flip),(g==="horizontal"||g==="both")&&S.push(Wr.flipHorizontal),(g==="vertical"||g==="both")&&S.push(Wr.flipVertical),y!=null&&S.push(ND[y]),_!=null&&_!==0&&S.push(ID[_]),v!=null&&S.push(DD[v]),d&&S.push(Wr.swapOpacity),TD?(f&&S.push(Wr.rotateBy),p&&S.push(Wr.widthAuto),($o.cssPrefix||$o.familyPrefix||mo)===mo?S:S.map(RD)):S}var MD=e=>typeof e=="object"&&"icon"in e&&!!e.icon;function m_(e){if(e)return MD(e)?e:Cb.icon(e)}function jD(e){return Object.keys(e)}var g_=new LD("FontAwesomeIcon"),Eb={border:!1,className:"",mask:void 0,maskId:void 0,fixedWidth:!1,inverse:!1,flip:!1,icon:void 0,listItem:!1,pull:void 0,pulse:!1,rotation:void 0,rotateBy:!1,size:void 0,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:void 0,transform:void 0,swapOpacity:!1,widthAuto:!1},BD=new Set(Object.keys(Eb)),Ne=bc.forwardRef((e,t)=>{const r={...Eb,...e},{icon:n,mask:i,symbol:s,title:a,titleId:o,maskId:l,transform:c}=r,h=p_(l,!!i),u=p_(o,!!a),m=m_(n);if(!m)return g_.error("Icon lookup is undefined",n),null;const g=OD(r),y=typeof c=="string"?Cb.transform(c):c,_=m_(i),v=SD(m,{...g.length>0&&{classes:g},...y&&{transform:y},..._&&{mask:_},symbol:s,title:a,titleId:u,maskId:h});if(!v)return g_.error("Could not find icon",m),null;const{abstract:d}=v,f={ref:t};for(const p of jD(r))BD.has(p)||(f[p]=r[p]);return AD(d[0],f)});Ne.displayName="FontAwesomeIcon";/*!
616
+ * Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com
617
+ * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
618
+ * Copyright 2025 Fonticons, Inc.
619
+ */var Ez={prefix:"fas",iconName:"file-circle-plus",icon:[576,512,[58606],"e494","M96 0C60.7 0 32 28.7 32 64l0 384c0 35.3 28.7 64 64 64l180 0c-22.7-31.5-36-70.2-36-112 0-100.6 77.4-183.2 176-191.3l0-38.1c0-17-6.7-33.3-18.7-45.3L290.7 18.7C278.7 6.7 262.5 0 245.5 0L96 0zM357.5 176L264 176c-13.3 0-24-10.7-24-24L240 58.5 357.5 176zM432 544a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm16-208l0 48 48 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-48 0 0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48-48 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l48 0 0-48c0-8.8 7.2-16 16-16s16 7.2 16 16z"]},FD={prefix:"fas",iconName:"code-branch",icon:[448,512,[],"f126","M80 104a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm80-24c0 32.8-19.7 61-48 73.3l0 70.7 176 0c26.5 0 48-21.5 48-48l0-22.7c-28.3-12.3-48-40.5-48-73.3 0-44.2 35.8-80 80-80s80 35.8 80 80c0 32.8-19.7 61-48 73.3l0 22.7c0 61.9-50.1 112-112 112l-176 0 0 70.7c28.3 12.3 48 40.5 48 73.3 0 44.2-35.8 80-80 80S0 476.2 0 432c0-32.8 19.7-61 48-73.3l0-205.3C19.7 141 0 112.8 0 80 0 35.8 35.8 0 80 0s80 35.8 80 80zm232 0a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zM80 456a24 24 0 1 0 0-48 24 24 0 1 0 0 48z"]},zD={prefix:"fas",iconName:"key",icon:[512,512,[128273],"f084","M336 352c97.2 0 176-78.8 176-176S433.2 0 336 0 160 78.8 160 176c0 18.7 2.9 36.8 8.3 53.7L7 391c-4.5 4.5-7 10.6-7 17l0 80c0 13.3 10.7 24 24 24l80 0c13.3 0 24-10.7 24-24l0-40 40 0c13.3 0 24-10.7 24-24l0-40 40 0c6.4 0 12.5-2.5 17-7l33.3-33.3c16.9 5.4 35 8.3 53.7 8.3zM376 96a40 40 0 1 1 0 80 40 40 0 1 1 0-80z"]},$D={prefix:"fas",iconName:"circle-notch",icon:[512,512,[],"f1ce","M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8-79.3 23.6-137.1 97.1-137.1 184.1 0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256 512 397.4 397.4 512 256 512S0 397.4 0 256c0-116 77.1-213.9 182.9-245.4 16.9-5 34.8 4.6 39.8 21.5z"]},Az={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L368 46.1 465.9 144 490.3 119.6c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L432 177.9 334.1 80 172.4 241.7zM96 64C43 64 0 107 0 160L0 416c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 64z"]},HD={prefix:"fas",iconName:"circle-half-stroke",icon:[512,512,[9680,"adjust"],"f042","M448 256c0-106-86-192-192-192l0 384c106 0 192-86 192-192zM0 256a256 256 0 1 1 512 0 256 256 0 1 1 -512 0z"]},UD={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},WD={prefix:"fas",iconName:"broom",icon:[576,512,[129529],"f51a","M566.6 54.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192-34.7-34.7c-4.2-4.2-10-6.6-16-6.6-12.5 0-22.6 10.1-22.6 22.6l0 29.1 108.3 108.3 29.1 0c12.5 0 22.6-10.1 22.6-22.6 0-6-2.4-11.8-6.6-16l-34.7-34.7 192-192zM341.1 353.4L222.6 234.9c-42.7-3.7-85.2 11.7-115.8 42.3l-8 8c-22.3 22.3-34.8 52.5-34.8 84 0 6.8 7.1 11.2 13.2 8.2l51.1-25.5c5-2.5 9.5 4.1 5.4 7.9L7.3 473.4C2.7 477.6 0 483.6 0 489.9 0 502.1 9.9 512 22.1 512l173.3 0c38.8 0 75.9-15.4 103.4-42.8 30.6-30.6 45.9-73.1 42.3-115.8z"]},VD={prefix:"fas",iconName:"code",icon:[576,512,[],"f121","M360.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm64.6 136.1c-12.5 12.5-12.5 32.8 0 45.3l73.4 73.4-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3l-96-96c-12.5-12.5-32.8-12.5-45.3 0zm-274.7 0c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 150.6 182.6c12.5-12.5 12.5-32.8 0-45.3z"]},KD={prefix:"fas",iconName:"terminal",icon:[512,512,[],"f120","M9.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L146.7 256 9.4 118.6zM224 384l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z"]},v_={prefix:"fas",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M0 256a256 256 0 1 1 512 0 256 256 0 1 1 -512 0z"]},Ab={prefix:"fas",iconName:"gear",icon:[512,512,[9881,"cog"],"f013","M195.1 9.5C198.1-5.3 211.2-16 226.4-16l59.8 0c15.2 0 28.3 10.7 31.3 25.5L332 79.5c14.1 6 27.3 13.7 39.3 22.8l67.8-22.5c14.4-4.8 30.2 1.2 37.8 14.4l29.9 51.8c7.6 13.2 4.9 29.8-6.5 39.9L447 233.3c.9 7.4 1.3 15 1.3 22.7s-.5 15.3-1.3 22.7l53.4 47.5c11.4 10.1 14 26.8 6.5 39.9l-29.9 51.8c-7.6 13.1-23.4 19.2-37.8 14.4l-67.8-22.5c-12.1 9.1-25.3 16.7-39.3 22.8l-14.4 69.9c-3.1 14.9-16.2 25.5-31.3 25.5l-59.8 0c-15.2 0-28.3-10.7-31.3-25.5l-14.4-69.9c-14.1-6-27.2-13.7-39.3-22.8L73.5 432.3c-14.4 4.8-30.2-1.2-37.8-14.4L5.8 366.1c-7.6-13.2-4.9-29.8 6.5-39.9l53.4-47.5c-.9-7.4-1.3-15-1.3-22.7s.5-15.3 1.3-22.7L12.3 185.8c-11.4-10.1-14-26.8-6.5-39.9L35.7 94.1c7.6-13.2 23.4-19.2 37.8-14.4l67.8 22.5c12.1-9.1 25.3-16.7 39.3-22.8L195.1 9.5zM256.3 336a80 80 0 1 0 -.6-160 80 80 0 1 0 .6 160z"]},Lb={prefix:"fas",iconName:"right-from-bracket",icon:[512,512,["sign-out-alt"],"f2f5","M505 273c9.4-9.4 9.4-24.6 0-33.9L361 95c-6.9-6.9-17.2-8.9-26.2-5.2S320 102.3 320 112l0 80-112 0c-26.5 0-48 21.5-48 48l0 32c0 26.5 21.5 48 48 48l112 0 0 80c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2L505 273zM160 96c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 32C43 32 0 75 0 128L0 384c0 53 43 96 96 96l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l64 0z"]},GD={prefix:"fas",iconName:"paperclip",icon:[512,512,[128206],"f0c6","M224.6 12.8c56.2-56.2 147.4-56.2 203.6 0s56.2 147.4 0 203.6l-164 164c-34.4 34.4-90.1 34.4-124.5 0s-34.4-90.1 0-124.5L292.5 103.3c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3L185 301.3c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l164-164c31.2-31.2 31.2-81.9 0-113.1s-81.9-31.2-113.1 0l-164 164c-53.1 53.1-53.1 139.2 0 192.3s139.2 53.1 192.3 0L428.3 284.3c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3L343.4 459.6c-78.1 78.1-204.7 78.1-282.8 0s-78.1-204.7 0-282.8l164-164z"]},Lz={prefix:"fas",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M136.7 5.9C141.1-7.2 153.3-16 167.1-16l113.9 0c13.8 0 26 8.8 30.4 21.9L320 32 416 32c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l96 0 8.7-26.1zM32 144l384 0 0 304c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-304zm88 64c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24zm104 0c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24zm104 0c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24z"]},Qh={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z"]},__={prefix:"fas",iconName:"user",icon:[448,512,[128100,62144,62470,"user-alt","user-large"],"f007","M224 248a120 120 0 1 0 0-240 120 120 0 1 0 0 240zm-29.7 56C95.8 304 16 383.8 16 482.3 16 498.7 29.3 512 45.7 512l356.6 0c16.4 0 29.7-13.3 29.7-29.7 0-98.5-79.8-178.3-178.3-178.3l-59.4 0z"]},ii={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},Zh={prefix:"fas",iconName:"file-lines",icon:[384,512,[128441,128462,61686,"file-alt","file-text"],"f15c","M0 64C0 28.7 28.7 0 64 0L213.5 0c17 0 33.3 6.7 45.3 18.7L365.3 125.3c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zm208-5.5l0 93.5c0 13.3 10.7 24 24 24L325.5 176 208 58.5zM120 256c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z"]},qD={prefix:"fas",iconName:"comments",icon:[576,512,[128490,61670],"f086","M384 144c0 97.2-86 176-192 176-26.7 0-52.1-5-75.2-14L35.2 349.2c-9.3 4.9-20.7 3.2-28.2-4.2s-9.2-18.9-4.2-28.2l35.6-67.2C14.3 220.2 0 183.6 0 144 0 46.8 86-32 192-32S384 46.8 384 144zm0 368c-94.1 0-172.4-62.1-188.8-144 120-1.5 224.3-86.9 235.8-202.7 83.3 19.2 145 88.3 145 170.7 0 39.6-14.3 76.2-38.4 105.6l35.6 67.2c4.9 9.3 3.2 20.7-4.2 28.2s-18.9 9.2-28.2 4.2L459.2 498c-23.1 9-48.5 14-75.2 14z"]},YD={prefix:"fas",iconName:"chevron-down",icon:[448,512,[],"f078","M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},JD={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M256 0c14.7 0 28.2 8.1 35.2 21l216 400c6.7 12.4 6.4 27.4-.8 39.5S486.1 480 472 480L40 480c-14.1 0-27.2-7.4-34.4-19.5s-7.5-27.1-.8-39.5l216-400c7-12.9 20.5-21 35.2-21zm0 352a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.5 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},XD={prefix:"fas",iconName:"download",icon:[448,512,[],"f019","M256 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 210.7-41.4-41.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 242.7 256 32zM64 320c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-46.9 0-56.6 56.6c-31.2 31.2-81.9 31.2-113.1 0L110.9 320 64 320zm304 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"]},QD={prefix:"fas",iconName:"tower-broadcast",icon:[576,512,["broadcast-tower"],"f519","M87.9 11.5c-11.3-6.9-26.1-3.2-33 8.1-24.8 41-39 89.1-39 140.4s14.2 99.4 39 140.4c6.9 11.3 21.6 15 33 8.1s15-21.6 8.1-33C75.7 241.9 64 202.3 64 160S75.7 78.1 96.1 44.4c6.9-11.3 3.2-26.1-8.1-33zm400.1 0c-11.3 6.9-15 21.6-8.1 33 20.4 33.7 32.1 73.3 32.1 115.6s-11.7 81.9-32.1 115.6c-6.9 11.3-3.2 26.1 8.1 33s26.1 3.2 33-8.1c24.8-41 39-89.1 39-140.4S545.8 60.6 521 19.6c-6.9-11.3-21.6-15-33-8.1zM320 215.4c19.1-11.1 32-31.7 32-55.4 0-35.3-28.7-64-64-64s-64 28.7-64 64c0 23.7 12.9 44.4 32 55.4L256 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-264.6zM180.2 91c7.2-11.2 3.9-26-7.2-33.2s-26-3.9-33.2 7.2c-17.6 27.4-27.8 60-27.8 95s10.2 67.6 27.8 95c7.2 11.2 22 14.4 33.2 7.2s14.4-22 7.2-33.2c-12.8-19.9-20.2-43.6-20.2-69s7.4-49.1 20.2-69zM436.2 65c-7.2-11.2-22-14.4-33.2-7.2s-14.4 22-7.2 33.2c12.8 19.9 20.2 43.6 20.2 69s-7.4 49.1-20.2 69c-7.2 11.2-3.9 26 7.2 33.2s26 3.9 33.2-7.2c17.6-27.4 27.8-60 27.8-95s-10.2-67.6-27.8-95z"]},Pz={prefix:"fas",iconName:"arrow-left",icon:[512,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 288 480 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-370.7 0 105.4-105.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},hc={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 160-160 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0 0 160c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160 160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0 0-160z"]},ed={prefix:"fas",iconName:"copy",icon:[448,512,[],"f0c5","M192 0c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-200.6c0-17.4-7.1-34.1-19.7-46.2L370.6 17.8C358.7 6.4 342.8 0 326.3 0L192 0zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-16-64 0 0 16-192 0 0-256 16 0 0-64-16 0z"]},Tz={prefix:"fas",iconName:"arrows-rotate",icon:[512,512,[128472,"refresh","sync"],"f021","M65.9 228.5c13.3-93 93.4-164.5 190.1-164.5 53 0 101 21.5 135.8 56.2 .2 .2 .4 .4 .6 .6l7.6 7.2-47.9 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-128c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 53.4-11.3-10.7C390.5 28.6 326.5 0 256 0 127 0 20.3 95.4 2.6 219.5 .1 237 12.2 253.2 29.7 255.7s33.7-9.7 36.2-27.1zm443.5 64c2.5-17.5-9.7-33.7-27.1-36.2s-33.7 9.7-36.2 27.1c-13.3 93-93.4 164.5-190.1 164.5-53 0-101-21.5-135.8-56.2-.2-.2-.4-.4-.6-.6l-7.6-7.2 47.9 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 320c-8.5 0-16.7 3.4-22.7 9.5S-.1 343.7 0 352.3l1 127c.1 17.7 14.6 31.9 32.3 31.7S65.2 496.4 65 478.7l-.4-51.5 10.7 10.1c46.3 46.1 110.2 74.7 180.7 74.7 129 0 235.7-95.4 253.4-219.5z"]},ZD={prefix:"fas",iconName:"folder-tree",icon:[576,512,[],"f802","M48 24C48 10.7 37.3 0 24 0S0 10.7 0 24L0 392c0 30.9 25.1 56 56 56l184 0 0-48-184 0c-4.4 0-8-3.6-8-8l0-232 192 0 0-48-192 0 0-88zM336 224l192 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48l-82.7 0c-8.5 0-16.6-3.4-22.6-9.4l-8.6-8.6c-9-9-21.2-14.1-33.9-14.1L336 0c-26.5 0-48 21.5-48 48l0 128c0 26.5 21.5 48 48 48zm0 288l192 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48l-82.7 0c-8.5 0-16.6-3.4-22.6-9.4l-8.6-8.6c-9-9-21.2-14.1-33.9-14.1L336 288c-26.5 0-48 21.5-48 48l0 128c0 26.5 21.5 48 48 48z"]},e6={prefix:"fas",iconName:"qrcode",icon:[448,512,[],"f029","M64 160l64 0 0-64-64 0 0 64zM0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48L0 80zM64 416l64 0 0-64-64 0 0 64zM0 336c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96zM320 96l0 64 64 0 0-64-64 0zM304 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96c0-26.5 21.5-48 48-48zM288 352a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm0 64c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm96 32c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm32-96a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm-32 32a32 32 0 1 1 -64 0 32 32 0 1 1 64 0z"]},t6={prefix:"fas",iconName:"code-compare",icon:[512,512,[],"e13a","M198.8 1.8c9-3.7 19.3-1.7 26.2 5.2l56 56c9.4 9.4 9.4 24.6 0 33.9l-56 56c-6.9 6.9-17.2 8.9-26.2 5.2S184 145.7 184 136l0-24-24 0c-17.7 0-32 14.3-32 32l0 214.7c28.3 12.3 48 40.5 48 73.3 0 44.2-35.8 80-80 80s-80-35.8-80-80c0-32.8 19.7-61 48-73.3L64 144c0-53 43-96 96-96l24 0 0-24c0-9.7 5.8-18.5 14.8-22.2zM392 80a24 24 0 1 0 48 0 24 24 0 1 0 -48 0zm-8 73.3c-28.3-12.3-48-40.5-48-73.3 0-44.2 35.8-80 80-80s80 35.8 80 80c0 32.8-19.7 61-48 73.3L448 368c0 53-43 96-96 96l-24 0 0 24c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-56-56c-9.4-9.4-9.4-24.6 0-33.9l56-56c6.9-6.9 17.2-8.9 26.2-5.2S328 366.3 328 376l0 24 24 0c17.7 0 32-14.3 32-32l0-214.7zM72 432a24 24 0 1 0 48 0 24 24 0 1 0 -48 0z"]},r6={prefix:"fas",iconName:"dice",icon:[512,512,[127922],"f522","M141.4 2.3C103-8 63.5 14.8 53.3 53.2L2.5 242.7C-7.8 281.1 15 320.6 53.4 330.9l189.5 50.8c38.4 10.3 77.9-12.5 88.2-50.9l50.8-189.5c10.3-38.4-12.5-77.9-50.9-88.2L141.4 2.3zm23 205.7a32 32 0 1 1 55.4-32 32 32 0 1 1 -55.4 32zM79.2 220.3a32 32 0 1 1 32 55.4 32 32 0 1 1 -32-55.4zm185 96.4a32 32 0 1 1 -32-55.4 32 32 0 1 1 32 55.4zm9-208.4a32 32 0 1 1 32 55.4 32 32 0 1 1 -32-55.4zm-121 14.4a32 32 0 1 1 -32-55.4 32 32 0 1 1 32 55.4zM418 192L377.4 343.2c-17.2 64-83 102-147 84.9l-38.3-10.3 0 30.2c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-192c0-35.3-28.7-64-64-64L418 192z"]};function n6(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const i6=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,s6=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,o6={};function y_(e,t){return(o6.jsx?s6:i6).test(e)}const a6=/[ \t\n\f\r]/g;function l6(e){return typeof e=="object"?e.type==="text"?w_(e.value):!1:w_(e)}function w_(e){return e.replace(a6,"")===""}class na{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}}na.prototype.normal={};na.prototype.property={};na.prototype.space=void 0;function Pb(e,t){const r={},n={};for(const i of e)Object.assign(r,i.property),Object.assign(n,i.normal);return new na(r,n,t)}function td(e){return e.toLowerCase()}class Yt{constructor(t,r){this.attribute=r,this.property=t}}Yt.prototype.attribute="";Yt.prototype.booleanish=!1;Yt.prototype.boolean=!1;Yt.prototype.commaOrSpaceSeparated=!1;Yt.prototype.commaSeparated=!1;Yt.prototype.defined=!1;Yt.prototype.mustUseProperty=!1;Yt.prototype.number=!1;Yt.prototype.overloadedBoolean=!1;Yt.prototype.property="";Yt.prototype.spaceSeparated=!1;Yt.prototype.space=void 0;let c6=0;const De=bi(),mt=bi(),rd=bi(),he=bi(),Ze=bi(),ss=bi(),Xt=bi();function bi(){return 2**++c6}const nd=Object.freeze(Object.defineProperty({__proto__:null,boolean:De,booleanish:mt,commaOrSpaceSeparated:Xt,commaSeparated:ss,number:he,overloadedBoolean:rd,spaceSeparated:Ze},Symbol.toStringTag,{value:"Module"})),lf=Object.keys(nd);class Mp extends Yt{constructor(t,r,n,i){let s=-1;if(super(t,r),b_(this,"space",i),typeof n=="number")for(;++s<lf.length;){const a=lf[s];b_(this,lf[s],(n&nd[a])===nd[a])}}}Mp.prototype.defined=!0;function b_(e,t,r){r&&(e[t]=r)}function ks(e){const t={},r={};for(const[n,i]of Object.entries(e.properties)){const s=new Mp(n,e.transform(e.attributes||{},n),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(s.mustUseProperty=!0),t[n]=s,r[td(n)]=n,r[td(s.attribute)]=n}return new na(t,r,e.space)}const Tb=ks({properties:{ariaActiveDescendant:null,ariaAtomic:mt,ariaAutoComplete:null,ariaBusy:mt,ariaChecked:mt,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:Ze,ariaCurrent:null,ariaDescribedBy:Ze,ariaDetails:null,ariaDisabled:mt,ariaDropEffect:Ze,ariaErrorMessage:null,ariaExpanded:mt,ariaFlowTo:Ze,ariaGrabbed:mt,ariaHasPopup:null,ariaHidden:mt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ze,ariaLevel:he,ariaLive:null,ariaModal:mt,ariaMultiLine:mt,ariaMultiSelectable:mt,ariaOrientation:null,ariaOwns:Ze,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:mt,ariaReadOnly:mt,ariaRelevant:null,ariaRequired:mt,ariaRoleDescription:Ze,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:mt,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Db(e,t){return t in e?e[t]:t}function Ib(e,t){return Db(e,t.toLowerCase())}const u6=ks({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ss,acceptCharset:Ze,accessKey:Ze,action:null,allow:null,allowFullScreen:De,allowPaymentRequest:De,allowUserMedia:De,alt:null,as:null,async:De,autoCapitalize:null,autoComplete:Ze,autoFocus:De,autoPlay:De,blocking:Ze,capture:null,charSet:null,checked:De,cite:null,className:Ze,cols:he,colSpan:null,content:null,contentEditable:mt,controls:De,controlsList:Ze,coords:he|ss,crossOrigin:null,data:null,dateTime:null,decoding:null,default:De,defer:De,dir:null,dirName:null,disabled:De,download:rd,draggable:mt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:De,formTarget:null,headers:Ze,height:he,hidden:rd,high:he,href:null,hrefLang:null,htmlFor:Ze,httpEquiv:Ze,id:null,imageSizes:null,imageSrcSet:null,inert:De,inputMode:null,integrity:null,is:null,isMap:De,itemId:null,itemProp:Ze,itemRef:Ze,itemScope:De,itemType:Ze,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:De,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:De,muted:De,name:null,nonce:null,noModule:De,noValidate:De,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:De,optimum:he,pattern:null,ping:Ze,placeholder:null,playsInline:De,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:De,referrerPolicy:null,rel:Ze,required:De,reversed:De,rows:he,rowSpan:he,sandbox:Ze,scope:null,scoped:De,seamless:De,selected:De,shadowRootClonable:De,shadowRootDelegatesFocus:De,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:mt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:De,useMap:null,value:mt,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ze,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:De,declare:De,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:De,noHref:De,noShade:De,noWrap:De,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:mt,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:De,disableRemotePlayback:De,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:Ib}),f6=ks({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Xt,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:Ze,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:De,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ss,g2:ss,glyphName:ss,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:Xt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:he,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ze,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Xt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Xt,rev:Xt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Xt,requiredFeatures:Xt,requiredFonts:Xt,requiredFormats:Xt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:Xt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Xt,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Xt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Db}),Nb=ks({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Rb=ks({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ib}),Ob=ks({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),h6={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},d6=/[A-Z]/g,S_=/-[a-z]/g,p6=/^data[-\w.:]+$/i;function m6(e,t){const r=td(t);let n=t,i=Yt;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&p6.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(S_,v6);n="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!S_.test(s)){let a=s.replace(d6,g6);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Mp}return new i(n,t)}function g6(e){return"-"+e.toLowerCase()}function v6(e){return e.charAt(1).toUpperCase()}const _6=Pb([Tb,u6,Nb,Rb,Ob],"html"),jp=Pb([Tb,f6,Nb,Rb,Ob],"svg");function y6(e){return e.join(" ").trim()}var Bp={},C_=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,w6=/\n/g,b6=/^\s*/,S6=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,C6=/^:\s*/,k6=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,x6=/^[;\s]*/,E6=/^\s+|\s+$/g,A6=`
620
+ `,k_="/",x_="*",Zn="",L6="comment",P6="declaration";function T6(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(y){var _=y.match(w6);_&&(r+=_.length);var v=y.lastIndexOf(A6);n=~v?y.length-v:n+y.length}function s(){var y={line:r,column:n};return function(_){return _.position=new a(y),c(),_}}function a(y){this.start=y,this.end={line:r,column:n},this.source=t.source}a.prototype.content=e;function o(y){var _=new Error(t.source+":"+r+":"+n+": "+y);if(_.reason=y,_.filename=t.source,_.line=r,_.column=n,_.source=e,!t.silent)throw _}function l(y){var _=y.exec(e);if(_){var v=_[0];return i(v),e=e.slice(v.length),_}}function c(){l(b6)}function h(y){var _;for(y=y||[];_=u();)_!==!1&&y.push(_);return y}function u(){var y=s();if(!(k_!=e.charAt(0)||x_!=e.charAt(1))){for(var _=2;Zn!=e.charAt(_)&&(x_!=e.charAt(_)||k_!=e.charAt(_+1));)++_;if(_+=2,Zn===e.charAt(_-1))return o("End of comment missing");var v=e.slice(2,_-2);return n+=2,i(v),e=e.slice(_),n+=2,y({type:L6,comment:v})}}function m(){var y=s(),_=l(S6);if(_){if(u(),!l(C6))return o("property missing ':'");var v=l(k6),d=y({type:P6,property:E_(_[0].replace(C_,Zn)),value:v?E_(v[0].replace(C_,Zn)):Zn});return l(x6),d}}function g(){var y=[];h(y);for(var _;_=m();)_!==!1&&(y.push(_),h(y));return y}return c(),g()}function E_(e){return e?e.replace(E6,Zn):Zn}var D6=T6,I6=jl&&jl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Bp,"__esModule",{value:!0});Bp.default=R6;const N6=I6(D6);function R6(e,t){let r=null;if(!e||typeof e!="string")return r;const n=(0,N6.default)(e),i=typeof t=="function";return n.forEach(s=>{if(s.type!=="declaration")return;const{property:a,value:o}=s;i?t(a,o,s):o&&(r=r||{},r[a]=o)}),r}var Gc={};Object.defineProperty(Gc,"__esModule",{value:!0});Gc.camelCase=void 0;var O6=/^--[a-zA-Z0-9_-]+$/,M6=/-([a-z])/g,j6=/^[^-]+$/,B6=/^-(webkit|moz|ms|o|khtml)-/,F6=/^-(ms)-/,z6=function(e){return!e||j6.test(e)||O6.test(e)},$6=function(e,t){return t.toUpperCase()},A_=function(e,t){return"".concat(t,"-")},H6=function(e,t){return t===void 0&&(t={}),z6(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(F6,A_):e=e.replace(B6,A_),e.replace(M6,$6))};Gc.camelCase=H6;var U6=jl&&jl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},W6=U6(Bp),V6=Gc;function id(e,t){var r={};return!e||typeof e!="string"||(0,W6.default)(e,function(n,i){n&&i&&(r[(0,V6.camelCase)(n,t)]=i)}),r}id.default=id;var K6=id;const G6=yc(K6),Mb=jb("end"),Fp=jb("start");function jb(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function q6(e){const t=Fp(e),r=Mb(e);if(t&&r)return{start:t,end:r}}function go(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?L_(e.position):"start"in e||"end"in e?L_(e):"line"in e||"column"in e?sd(e):""}function sd(e){return P_(e&&e.line)+":"+P_(e&&e.column)}function L_(e){return sd(e&&e.start)+"-"+sd(e&&e.end)}function P_(e){return e&&typeof e=="number"?e:1}class Ot extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",s={},a=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?s.ruleId=n:(s.source=n.slice(0,l),s.ruleId=n.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=go(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ot.prototype.file="";Ot.prototype.name="";Ot.prototype.reason="";Ot.prototype.message="";Ot.prototype.stack="";Ot.prototype.column=void 0;Ot.prototype.line=void 0;Ot.prototype.ancestors=void 0;Ot.prototype.cause=void 0;Ot.prototype.fatal=void 0;Ot.prototype.place=void 0;Ot.prototype.ruleId=void 0;Ot.prototype.source=void 0;const zp={}.hasOwnProperty,Y6=new Map,J6=/[A-Z]/g,X6=new Set(["table","tbody","thead","tfoot","tr"]),Q6=new Set(["td","th"]),Bb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Z6(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=aI(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=oI(r,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?jp:_6,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Fb(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Fb(e,t,r){if(t.type==="element")return eI(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return tI(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return nI(e,t,r);if(t.type==="mdxjsEsm")return rI(e,t);if(t.type==="root")return iI(e,t,r);if(t.type==="text")return sI(e,t)}function eI(e,t,r){const n=e.schema;let i=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=jp,e.schema=i),e.ancestors.push(t);const s=$b(e,t.tagName,!1),a=lI(e,t);let o=Hp(e,t);return X6.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!l6(l):!0})),zb(e,a,s,t),$p(a,o),e.ancestors.pop(),e.schema=n,e.create(t,s,a,r)}function tI(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Ho(e,t.position)}function rI(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ho(e,t.position)}function nI(e,t,r){const n=e.schema;let i=n;t.name==="svg"&&n.space==="html"&&(i=jp,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:$b(e,t.name,!0),a=cI(e,t),o=Hp(e,t);return zb(e,a,s,t),$p(a,o),e.ancestors.pop(),e.schema=n,e.create(t,s,a,r)}function iI(e,t,r){const n={};return $p(n,Hp(e,t)),e.create(t,e.Fragment,n,r)}function sI(e,t){return t.value}function zb(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function $p(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function oI(e,t,r){return n;function n(i,s,a,o){const c=Array.isArray(a.children)?r:t;return o?c(s,a,o):c(s,a)}}function aI(e,t){return r;function r(n,i,s,a){const o=Array.isArray(s.children),l=Fp(n);return t(i,s,a,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function lI(e,t){const r={};let n,i;for(i in t.properties)if(i!=="children"&&zp.call(t.properties,i)){const s=uI(e,i,t.properties[i]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&Q6.has(t.tagName)?n=o:r[a]=o}}if(n){const s=r.style||(r.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function cI(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const s=n.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(r,e.evaluater.evaluateExpression(o.argument))}else Ho(e,t.position);else{const i=n.name;let s;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const o=n.value.data.estree.body[0];o.type,s=e.evaluater.evaluateExpression(o.expression)}else Ho(e,t.position);else s=n.value===null?!0:n.value;r[i]=s}return r}function Hp(e,t){const r=[];let n=-1;const i=e.passKeys?new Map:Y6;for(;++n<t.children.length;){const s=t.children[n];let a;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const c=i.get(l)||0;a=l+"-"+c,i.set(l,c+1)}}const o=Fb(e,s,a);o!==void 0&&r.push(o)}return r}function uI(e,t,r){const n=m6(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?n6(r):y6(r)),n.property==="style"){let i=typeof r=="object"?r:fI(e,String(r));return e.stylePropertyNameCase==="css"&&(i=hI(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&n.space?h6[n.property]||n.property:n.attribute,r]}}function fI(e,t){try{return G6(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const n=r,i=new Ot("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Bb+"#cannot-parse-style-attribute",i}}function $b(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const o=y_(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}n=a}else n=y_(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const i=n.value;return zp.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(n);Ho(e)}function Ho(e,t){const r=new Ot("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Bb+"#cannot-handle-mdx-estrees-without-createevaluater",r}function hI(e){const t={};let r;for(r in e)zp.call(e,r)&&(t[dI(r)]=e[r]);return t}function dI(e){let t=e.replace(J6,pI);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function pI(e){return"-"+e.toLowerCase()}const cf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},mI={};function Up(e,t){const r=mI,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Hb(e,n,i)}function Hb(e,t,r){if(gI(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return T_(e.children,t,r)}return Array.isArray(e)?T_(e,t,r):""}function T_(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=Hb(e[i],t,r);return n.join("")}function gI(e){return!!(e&&typeof e=="object")}const D_=document.createElement("i");function Wp(e){const t="&"+e+";";D_.innerHTML=t;const r=D_.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function rr(e,t,r,n){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)a=Array.from(n),a.unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);s<n.length;)a=n.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function ur(e,t){return e.length>0?(rr(e,e.length,0,t),e):t}const I_={}.hasOwnProperty;function Ub(e){const t={};let r=-1;for(;++r<e.length;)vI(t,e[r]);return t}function vI(e,t){let r;for(r in t){const i=(I_.call(e,r)?e[r]:void 0)||(e[r]={}),s=t[r];let a;if(s)for(a in s){I_.call(i,a)||(i[a]=[]);const o=s[a];_I(i[a],Array.isArray(o)?o:o?[o]:[])}}}function _I(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);rr(e,0,0,n)}function Wb(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Cr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const jt=Wn(/[A-Za-z]/),Nt=Wn(/[\dA-Za-z]/),yI=Wn(/[#-'*+\--9=?A-Z^-~]/);function dc(e){return e!==null&&(e<32||e===127)}const od=Wn(/\d/),wI=Wn(/[\dA-Fa-f]/),bI=Wn(/[!-/:-@[-`{-~]/);function Le(e){return e!==null&&e<-2}function Qe(e){return e!==null&&(e<0||e===32)}function je(e){return e===-2||e===-1||e===32}const qc=Wn(new RegExp("\\p{P}|\\p{S}","u")),pi=Wn(/\s/);function Wn(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function xs(e){const t=[];let r=-1,n=0,i=0;for(;++r<e.length;){const s=e.charCodeAt(r);let a="";if(s===37&&Nt(e.charCodeAt(r+1))&&Nt(e.charCodeAt(r+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const o=e.charCodeAt(r+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(n,r),encodeURIComponent(a)),n=r+i+1,a=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function He(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(l){return je(l)?(e.enter(r),o(l)):t(l)}function o(l){return je(l)&&s++<i?(e.consume(l),o):(e.exit(r),t(l))}}const SI={tokenize:CI};function CI(e){const t=e.attempt(this.parser.constructs.contentInitial,n,i);let r;return t;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),He(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const l=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return Le(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}const kI={tokenize:xI},N_={tokenize:EI};function xI(e){const t=this,r=[];let n=0,i,s,a;return o;function o(p){if(n<r.length){const w=r[n];return t.containerState=w[1],e.attempt(w[0].continuation,l,c)(p)}return c(p)}function l(p){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&f();const w=t.events.length;let S=w,b;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){b=t.events[S][1].end;break}d(n);let x=w;for(;x<t.events.length;)t.events[x][1].end={...b},x++;return rr(t.events,S+1,0,t.events.slice(w)),t.events.length=x,c(p)}return o(p)}function c(p){if(n===r.length){if(!i)return m(p);if(i.currentConstruct&&i.currentConstruct.concrete)return y(p);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(N_,h,u)(p)}function h(p){return i&&f(),d(n),m(p)}function u(p){return t.parser.lazy[t.now().line]=n!==r.length,a=t.now().offset,y(p)}function m(p){return t.containerState={},e.attempt(N_,g,y)(p)}function g(p){return n++,r.push([t.currentConstruct,t.containerState]),m(p)}function y(p){if(p===null){i&&f(),d(0),e.consume(p);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),_(p)}function _(p){if(p===null){v(e.exit("chunkFlow"),!0),d(0),e.consume(p);return}return Le(p)?(e.consume(p),v(e.exit("chunkFlow")),n=0,t.interrupt=void 0,o):(e.consume(p),_)}function v(p,w){const S=t.sliceStream(p);if(w&&S.push(null),p.previous=s,s&&(s.next=p),s=p,i.defineSkip(p.start),i.write(S),t.parser.lazy[p.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<a&&(!i.events[b][1].end||i.events[b][1].end.offset>a))return;const x=t.events.length;let C=x,A,T;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){if(A){T=t.events[C][1].end;break}A=!0}for(d(n),b=x;b<t.events.length;)t.events[b][1].end={...T},b++;rr(t.events,C+1,0,t.events.slice(x)),t.events.length=b}}function d(p){let w=r.length;for(;w-- >p;){const S=r[w];t.containerState=S[1],S[0].exit.call(t,e)}r.length=p}function f(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function EI(e,t,r){return He(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function vs(e){if(e===null||Qe(e)||pi(e))return 1;if(qc(e))return 2}function Yc(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!n.includes(s)&&(t=s(t,r),n.push(s))}return t}const ad={name:"attention",resolveAll:AI,tokenize:LI};function AI(e,t){let r=-1,n,i,s,a,o,l,c,h;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const u={...e[n][1].end},m={...e[r][1].start};R_(u,-l),R_(m,l),a={type:l>1?"strongSequence":"emphasisSequence",start:u,end:{...e[n][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:m},s={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[n][1].end={...a.start},e[r][1].start={...o.end},c=[],e[n][1].end.offset-e[n][1].start.offset&&(c=ur(c,[["enter",e[n][1],t],["exit",e[n][1],t]])),c=ur(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),c=ur(c,Yc(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),c=ur(c,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(h=2,c=ur(c,[["enter",e[r][1],t],["exit",e[r][1],t]])):h=0,rr(e,n-1,r-n+3,c),r=n+c.length-h-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function LI(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=vs(n);let s;return a;function a(l){return s=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===s)return e.consume(l),o;const c=e.exit("attentionSequence"),h=vs(l),u=!h||h===2&&i||r.includes(l),m=!i||i===2&&h||r.includes(n);return c._open=!!(s===42?u:u&&(i||!m)),c._close=!!(s===42?m:m&&(h||!u)),t(l)}}function R_(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const PI={name:"autolink",tokenize:TI};function TI(e,t,r){let n=0;return i;function i(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(g){return jt(g)?(e.consume(g),a):g===64?r(g):c(g)}function a(g){return g===43||g===45||g===46||Nt(g)?(n=1,o(g)):c(g)}function o(g){return g===58?(e.consume(g),n=0,l):(g===43||g===45||g===46||Nt(g))&&n++<32?(e.consume(g),o):(n=0,c(g))}function l(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):g===null||g===32||g===60||dc(g)?r(g):(e.consume(g),l)}function c(g){return g===64?(e.consume(g),h):yI(g)?(e.consume(g),c):r(g)}function h(g){return Nt(g)?u(g):r(g)}function u(g){return g===46?(e.consume(g),n=0,h):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):m(g)}function m(g){if((g===45||Nt(g))&&n++<63){const y=g===45?m:u;return e.consume(g),y}return r(g)}}const ia={partial:!0,tokenize:DI};function DI(e,t,r){return n;function n(s){return je(s)?He(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||Le(s)?t(s):r(s)}}const Vb={continuation:{tokenize:NI},exit:RI,name:"blockQuote",tokenize:II};function II(e,t,r){const n=this;return i;function i(a){if(a===62){const o=n.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return r(a)}function s(a){return je(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function NI(e,t,r){const n=this;return i;function i(a){return je(a)?He(e,s,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(Vb,t,r)(a)}}function RI(e){e.exit("blockQuote")}const Kb={name:"characterEscape",tokenize:OI};function OI(e,t,r){return n;function n(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return bI(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(s)}}const Gb={name:"characterReference",tokenize:MI};function MI(e,t,r){const n=this;let i=0,s,a;return o;function o(u){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),l}function l(u){return u===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(u),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),s=31,a=Nt,h(u))}function c(u){return u===88||u===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(u),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=wI,h):(e.enter("characterReferenceValue"),s=7,a=od,h(u))}function h(u){if(u===59&&i){const m=e.exit("characterReferenceValue");return a===Nt&&!Wp(n.sliceSerialize(m))?r(u):(e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(u)&&i++<s?(e.consume(u),h):r(u)}}const O_={partial:!0,tokenize:BI},M_={concrete:!0,name:"codeFenced",tokenize:jI};function jI(e,t,r){const n=this,i={partial:!0,tokenize:S};let s=0,a=0,o;return l;function l(b){return c(b)}function c(b){const x=n.events[n.events.length-1];return s=x&&x[1].type==="linePrefix"?x[2].sliceSerialize(x[1],!0).length:0,o=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(b)}function h(b){return b===o?(a++,e.consume(b),h):a<3?r(b):(e.exit("codeFencedFenceSequence"),je(b)?He(e,u,"whitespace")(b):u(b))}function u(b){return b===null||Le(b)?(e.exit("codeFencedFence"),n.interrupt?t(b):e.check(O_,_,w)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||Le(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(b)):je(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),He(e,g,"whitespace")(b)):b===96&&b===o?r(b):(e.consume(b),m)}function g(b){return b===null||Le(b)?u(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||Le(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(b)):b===96&&b===o?r(b):(e.consume(b),y)}function _(b){return e.attempt(i,w,v)(b)}function v(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),d}function d(b){return s>0&&je(b)?He(e,f,"linePrefix",s+1)(b):f(b)}function f(b){return b===null||Le(b)?e.check(O_,_,w)(b):(e.enter("codeFlowValue"),p(b))}function p(b){return b===null||Le(b)?(e.exit("codeFlowValue"),f(b)):(e.consume(b),p)}function w(b){return e.exit("codeFenced"),t(b)}function S(b,x,C){let A=0;return T;function T($){return b.enter("lineEnding"),b.consume($),b.exit("lineEnding"),j}function j($){return b.enter("codeFencedFence"),je($)?He(b,M,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):M($)}function M($){return $===o?(b.enter("codeFencedFenceSequence"),O($)):C($)}function O($){return $===o?(A++,b.consume($),O):A>=a?(b.exit("codeFencedFenceSequence"),je($)?He(b,z,"whitespace")($):z($)):C($)}function z($){return $===null||Le($)?(b.exit("codeFencedFence"),x($)):C($)}}}function BI(e,t,r){const n=this;return i;function i(a){return a===null?r(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}const uf={name:"codeIndented",tokenize:zI},FI={partial:!0,tokenize:$I};function zI(e,t,r){const n=this;return i;function i(c){return e.enter("codeIndented"),He(e,s,"linePrefix",5)(c)}function s(c){const h=n.events[n.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(c):r(c)}function a(c){return c===null?l(c):Le(c)?e.attempt(FI,a,l)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||Le(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),o)}function l(c){return e.exit("codeIndented"),t(c)}}function $I(e,t,r){const n=this;return i;function i(a){return n.parser.lazy[n.now().line]?r(a):Le(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):He(e,s,"linePrefix",5)(a)}function s(a){const o=n.events[n.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):Le(a)?i(a):r(a)}}const HI={name:"codeText",previous:WI,resolve:UI,tokenize:VI};function UI(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="codeTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function WI(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function VI(e,t,r){let n=0,i,s;return a;function a(u){return e.enter("codeText"),e.enter("codeTextSequence"),o(u)}function o(u){return u===96?(e.consume(u),n++,o):(e.exit("codeTextSequence"),l(u))}function l(u){return u===null?r(u):u===32?(e.enter("space"),e.consume(u),e.exit("space"),l):u===96?(s=e.enter("codeTextSequence"),i=0,h(u)):Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(u))}function c(u){return u===null||u===32||u===96||Le(u)?(e.exit("codeTextData"),l(u)):(e.consume(u),c)}function h(u){return u===96?(e.consume(u),i++,h):i===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(u)):(s.type="codeTextData",c(u))}}class KI{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){const i=r||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&Gs(this.left,n),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Gs(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Gs(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);Gs(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Gs(this.left,r.reverse())}}}function Gs(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function qb(e){const t={};let r=-1,n,i,s,a,o,l,c;const h=new KI(e);for(;++r<h.length;){for(;r in t;)r=t[r];if(n=h.get(r),r&&n[1].type==="chunkFlow"&&h.get(r-1)[1].type==="listItemPrefix"&&(l=n[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,GI(h,r)),r=t[r],c=!0);else if(n[1]._container){for(s=r,i=void 0;s--;)if(a=h.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(n[1].end={...h.get(i)[1].start},o=h.slice(i,r),o.unshift(n),h.splice(i,r-i+1,o))}}return rr(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!c}function GI(e,t){const r=e.get(t)[1],n=e.get(t)[2];let i=t-1;const s=[];let a=r._tokenizer;a||(a=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,l=[],c={};let h,u,m=-1,g=r,y=0,_=0;const v=[_];for(;g;){for(;e.get(++i)[1]!==g;);s.push(i),g._tokenizer||(h=n.sliceStream(g),g.next||h.push(null),u&&a.defineSkip(g.start),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(h),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),u=g,g=g.next}for(g=r;++m<o.length;)o[m][0]==="exit"&&o[m-1][0]==="enter"&&o[m][1].type===o[m-1][1].type&&o[m][1].start.line!==o[m][1].end.line&&(_=m+1,v.push(_),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(a.events=[],g?(g._tokenizer=void 0,g.previous=void 0):v.pop(),m=v.length;m--;){const d=o.slice(v[m],v[m+1]),f=s.pop();l.push([f,f+d.length-1]),e.splice(f,2,d)}for(l.reverse(),m=-1;++m<l.length;)c[y+l[m][0]]=y+l[m][1],y+=l[m][1]-l[m][0]-1;return c}const qI={resolve:JI,tokenize:XI},YI={partial:!0,tokenize:QI};function JI(e){return qb(e),e}function XI(e,t){let r;return n;function n(o){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):Le(o)?e.check(YI,a,s)(o):(e.consume(o),i)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function QI(e,t,r){const n=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),He(e,s,"linePrefix")}function s(a){if(a===null||Le(a))return r(a);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(n.parser.constructs.flow,r,t)(a)}}function Yb(e,t,r,n,i,s,a,o,l){const c=l||Number.POSITIVE_INFINITY;let h=0;return u;function u(d){return d===60?(e.enter(n),e.enter(i),e.enter(s),e.consume(d),e.exit(s),m):d===null||d===32||d===41||dc(d)?r(d):(e.enter(n),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),_(d))}function m(d){return d===62?(e.enter(s),e.consume(d),e.exit(s),e.exit(i),e.exit(n),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),g(d))}function g(d){return d===62?(e.exit("chunkString"),e.exit(o),m(d)):d===null||d===60||Le(d)?r(d):(e.consume(d),d===92?y:g)}function y(d){return d===60||d===62||d===92?(e.consume(d),g):g(d)}function _(d){return!h&&(d===null||d===41||Qe(d))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(n),t(d)):h<c&&d===40?(e.consume(d),h++,_):d===41?(e.consume(d),h--,_):d===null||d===32||d===40||dc(d)?r(d):(e.consume(d),d===92?v:_)}function v(d){return d===40||d===41||d===92?(e.consume(d),_):_(d)}}function Jb(e,t,r,n,i,s){const a=this;let o=0,l;return c;function c(g){return e.enter(n),e.enter(i),e.consume(g),e.exit(i),e.enter(s),h}function h(g){return o>999||g===null||g===91||g===93&&!l||g===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?r(g):g===93?(e.exit(s),e.enter(i),e.consume(g),e.exit(i),e.exit(n),t):Le(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),u(g))}function u(g){return g===null||g===91||g===93||Le(g)||o++>999?(e.exit("chunkString"),h(g)):(e.consume(g),l||(l=!je(g)),g===92?m:u)}function m(g){return g===91||g===92||g===93?(e.consume(g),o++,u):u(g)}}function Xb(e,t,r,n,i,s){let a;return o;function o(m){return m===34||m===39||m===40?(e.enter(n),e.enter(i),e.consume(m),e.exit(i),a=m===40?41:m,l):r(m)}function l(m){return m===a?(e.enter(i),e.consume(m),e.exit(i),e.exit(n),t):(e.enter(s),c(m))}function c(m){return m===a?(e.exit(s),l(a)):m===null?r(m):Le(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),He(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===a||m===null||Le(m)?(e.exit("chunkString"),c(m)):(e.consume(m),m===92?u:h)}function u(m){return m===a||m===92?(e.consume(m),h):h(m)}}function vo(e,t){let r;return n;function n(i){return Le(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):je(i)?He(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}const ZI={name:"definition",tokenize:tN},eN={partial:!0,tokenize:rN};function tN(e,t,r){const n=this;let i;return s;function s(g){return e.enter("definition"),a(g)}function a(g){return Jb.call(n,e,o,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function o(g){return i=Cr(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),l):r(g)}function l(g){return Qe(g)?vo(e,c)(g):c(g)}function c(g){return Yb(e,h,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function h(g){return e.attempt(eN,u,u)(g)}function u(g){return je(g)?He(e,m,"whitespace")(g):m(g)}function m(g){return g===null||Le(g)?(e.exit("definition"),n.parser.defined.push(i),t(g)):r(g)}}function rN(e,t,r){return n;function n(o){return Qe(o)?vo(e,i)(o):r(o)}function i(o){return Xb(e,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return je(o)?He(e,a,"whitespace")(o):a(o)}function a(o){return o===null||Le(o)?t(o):r(o)}}const nN={name:"hardBreakEscape",tokenize:iN};function iN(e,t,r){return n;function n(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return Le(s)?(e.exit("hardBreakEscape"),t(s)):r(s)}}const sN={name:"headingAtx",resolve:oN,tokenize:aN};function oN(e,t){let r=e.length-2,n=3,i,s;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},s={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},rr(e,n,r-n+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function aN(e,t,r){let n=0;return i;function i(h){return e.enter("atxHeading"),s(h)}function s(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&n++<6?(e.consume(h),a):h===null||Qe(h)?(e.exit("atxHeadingSequence"),o(h)):r(h)}function o(h){return h===35?(e.enter("atxHeadingSequence"),l(h)):h===null||Le(h)?(e.exit("atxHeading"),t(h)):je(h)?He(e,o,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function l(h){return h===35?(e.consume(h),l):(e.exit("atxHeadingSequence"),o(h))}function c(h){return h===null||h===35||Qe(h)?(e.exit("atxHeadingText"),o(h)):(e.consume(h),c)}}const lN=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],j_=["pre","script","style","textarea"],cN={concrete:!0,name:"htmlFlow",resolveTo:hN,tokenize:dN},uN={partial:!0,tokenize:mN},fN={partial:!0,tokenize:pN};function hN(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function dN(e,t,r){const n=this;let i,s,a,o,l;return c;function c(L){return h(L)}function h(L){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(L),u}function u(L){return L===33?(e.consume(L),m):L===47?(e.consume(L),s=!0,_):L===63?(e.consume(L),i=3,n.interrupt?t:P):jt(L)?(e.consume(L),a=String.fromCharCode(L),v):r(L)}function m(L){return L===45?(e.consume(L),i=2,g):L===91?(e.consume(L),i=5,o=0,y):jt(L)?(e.consume(L),i=4,n.interrupt?t:P):r(L)}function g(L){return L===45?(e.consume(L),n.interrupt?t:P):r(L)}function y(L){const W="CDATA[";return L===W.charCodeAt(o++)?(e.consume(L),o===W.length?n.interrupt?t:M:y):r(L)}function _(L){return jt(L)?(e.consume(L),a=String.fromCharCode(L),v):r(L)}function v(L){if(L===null||L===47||L===62||Qe(L)){const W=L===47,J=a.toLowerCase();return!W&&!s&&j_.includes(J)?(i=1,n.interrupt?t(L):M(L)):lN.includes(a.toLowerCase())?(i=6,W?(e.consume(L),d):n.interrupt?t(L):M(L)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(L):s?f(L):p(L))}return L===45||Nt(L)?(e.consume(L),a+=String.fromCharCode(L),v):r(L)}function d(L){return L===62?(e.consume(L),n.interrupt?t:M):r(L)}function f(L){return je(L)?(e.consume(L),f):T(L)}function p(L){return L===47?(e.consume(L),T):L===58||L===95||jt(L)?(e.consume(L),w):je(L)?(e.consume(L),p):T(L)}function w(L){return L===45||L===46||L===58||L===95||Nt(L)?(e.consume(L),w):S(L)}function S(L){return L===61?(e.consume(L),b):je(L)?(e.consume(L),S):p(L)}function b(L){return L===null||L===60||L===61||L===62||L===96?r(L):L===34||L===39?(e.consume(L),l=L,x):je(L)?(e.consume(L),b):C(L)}function x(L){return L===l?(e.consume(L),l=null,A):L===null||Le(L)?r(L):(e.consume(L),x)}function C(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||Qe(L)?S(L):(e.consume(L),C)}function A(L){return L===47||L===62||je(L)?p(L):r(L)}function T(L){return L===62?(e.consume(L),j):r(L)}function j(L){return L===null||Le(L)?M(L):je(L)?(e.consume(L),j):r(L)}function M(L){return L===45&&i===2?(e.consume(L),Y):L===60&&i===1?(e.consume(L),X):L===62&&i===4?(e.consume(L),R):L===63&&i===3?(e.consume(L),P):L===93&&i===5?(e.consume(L),N):Le(L)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(uN,I,O)(L)):L===null||Le(L)?(e.exit("htmlFlowData"),O(L)):(e.consume(L),M)}function O(L){return e.check(fN,z,I)(L)}function z(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),$}function $(L){return L===null||Le(L)?O(L):(e.enter("htmlFlowData"),M(L))}function Y(L){return L===45?(e.consume(L),P):M(L)}function X(L){return L===47?(e.consume(L),a="",V):M(L)}function V(L){if(L===62){const W=a.toLowerCase();return j_.includes(W)?(e.consume(L),R):M(L)}return jt(L)&&a.length<8?(e.consume(L),a+=String.fromCharCode(L),V):M(L)}function N(L){return L===93?(e.consume(L),P):M(L)}function P(L){return L===62?(e.consume(L),R):L===45&&i===2?(e.consume(L),P):M(L)}function R(L){return L===null||Le(L)?(e.exit("htmlFlowData"),I(L)):(e.consume(L),R)}function I(L){return e.exit("htmlFlow"),t(L)}}function pN(e,t,r){const n=this;return i;function i(a){return Le(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):r(a)}function s(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}function mN(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ia,t,r)}}const gN={name:"htmlText",tokenize:vN};function vN(e,t,r){const n=this;let i,s,a;return o;function o(P){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(P),l}function l(P){return P===33?(e.consume(P),c):P===47?(e.consume(P),S):P===63?(e.consume(P),p):jt(P)?(e.consume(P),C):r(P)}function c(P){return P===45?(e.consume(P),h):P===91?(e.consume(P),s=0,y):jt(P)?(e.consume(P),f):r(P)}function h(P){return P===45?(e.consume(P),g):r(P)}function u(P){return P===null?r(P):P===45?(e.consume(P),m):Le(P)?(a=u,X(P)):(e.consume(P),u)}function m(P){return P===45?(e.consume(P),g):u(P)}function g(P){return P===62?Y(P):P===45?m(P):u(P)}function y(P){const R="CDATA[";return P===R.charCodeAt(s++)?(e.consume(P),s===R.length?_:y):r(P)}function _(P){return P===null?r(P):P===93?(e.consume(P),v):Le(P)?(a=_,X(P)):(e.consume(P),_)}function v(P){return P===93?(e.consume(P),d):_(P)}function d(P){return P===62?Y(P):P===93?(e.consume(P),d):_(P)}function f(P){return P===null||P===62?Y(P):Le(P)?(a=f,X(P)):(e.consume(P),f)}function p(P){return P===null?r(P):P===63?(e.consume(P),w):Le(P)?(a=p,X(P)):(e.consume(P),p)}function w(P){return P===62?Y(P):p(P)}function S(P){return jt(P)?(e.consume(P),b):r(P)}function b(P){return P===45||Nt(P)?(e.consume(P),b):x(P)}function x(P){return Le(P)?(a=x,X(P)):je(P)?(e.consume(P),x):Y(P)}function C(P){return P===45||Nt(P)?(e.consume(P),C):P===47||P===62||Qe(P)?A(P):r(P)}function A(P){return P===47?(e.consume(P),Y):P===58||P===95||jt(P)?(e.consume(P),T):Le(P)?(a=A,X(P)):je(P)?(e.consume(P),A):Y(P)}function T(P){return P===45||P===46||P===58||P===95||Nt(P)?(e.consume(P),T):j(P)}function j(P){return P===61?(e.consume(P),M):Le(P)?(a=j,X(P)):je(P)?(e.consume(P),j):A(P)}function M(P){return P===null||P===60||P===61||P===62||P===96?r(P):P===34||P===39?(e.consume(P),i=P,O):Le(P)?(a=M,X(P)):je(P)?(e.consume(P),M):(e.consume(P),z)}function O(P){return P===i?(e.consume(P),i=void 0,$):P===null?r(P):Le(P)?(a=O,X(P)):(e.consume(P),O)}function z(P){return P===null||P===34||P===39||P===60||P===61||P===96?r(P):P===47||P===62||Qe(P)?A(P):(e.consume(P),z)}function $(P){return P===47||P===62||Qe(P)?A(P):r(P)}function Y(P){return P===62?(e.consume(P),e.exit("htmlTextData"),e.exit("htmlText"),t):r(P)}function X(P){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),V}function V(P){return je(P)?He(e,N,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):N(P)}function N(P){return e.enter("htmlTextData"),a(P)}}const Vp={name:"labelEnd",resolveAll:bN,resolveTo:SN,tokenize:CN},_N={tokenize:kN},yN={tokenize:xN},wN={tokenize:EN};function bN(e){let t=-1;const r=[];for(;++t<e.length;){const n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){const i=n.type==="labelImage"?4:2;n.type="data",t+=i}}return e.length!==r.length&&rr(e,0,e.length,r),e}function SN(e,t){let r=e.length,n=0,i,s,a,o;for(;r--;)if(i=e[r][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(a=r);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},h={type:"labelText",start:{...e[s+n+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=ur(o,e.slice(s+1,s+n+3)),o=ur(o,[["enter",h,t]]),o=ur(o,Yc(t.parser.constructs.insideSpan.null,e.slice(s+n+4,a-3),t)),o=ur(o,[["exit",h,t],e[a-2],e[a-1],["exit",c,t]]),o=ur(o,e.slice(a+1)),o=ur(o,[["exit",l,t]]),rr(e,s,e.length,o),e}function CN(e,t,r){const n=this;let i=n.events.length,s,a;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){s=n.events[i][1];break}return o;function o(m){return s?s._inactive?u(m):(a=n.parser.defined.includes(Cr(n.sliceSerialize({start:s.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),l):r(m)}function l(m){return m===40?e.attempt(_N,h,a?h:u)(m):m===91?e.attempt(yN,h,a?c:u)(m):a?h(m):u(m)}function c(m){return e.attempt(wN,h,u)(m)}function h(m){return t(m)}function u(m){return s._balanced=!0,r(m)}}function kN(e,t,r){return n;function n(u){return e.enter("resource"),e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),i}function i(u){return Qe(u)?vo(e,s)(u):s(u)}function s(u){return u===41?h(u):Yb(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function a(u){return Qe(u)?vo(e,l)(u):h(u)}function o(u){return r(u)}function l(u){return u===34||u===39||u===40?Xb(e,c,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):h(u)}function c(u){return Qe(u)?vo(e,h)(u):h(u)}function h(u){return u===41?(e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),e.exit("resource"),t):r(u)}}function xN(e,t,r){const n=this;return i;function i(o){return Jb.call(n,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return n.parser.defined.includes(Cr(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(o):r(o)}function a(o){return r(o)}}function EN(e,t,r){return n;function n(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):r(s)}}const AN={name:"labelStartImage",resolveAll:Vp.resolveAll,tokenize:LN};function LN(e,t,r){const n=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),s}function s(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):r(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(o):t(o)}}const PN={name:"labelStartLink",resolveAll:Vp.resolveAll,tokenize:TN};function TN(e,t,r){const n=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):t(a)}}const ff={name:"lineEnding",tokenize:DN};function DN(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),He(e,t,"linePrefix")}}const Tl={name:"thematicBreak",tokenize:IN};function IN(e,t,r){let n=0,i;return s;function s(c){return e.enter("thematicBreak"),a(c)}function a(c){return i=c,o(c)}function o(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):n>=3&&(c===null||Le(c))?(e.exit("thematicBreak"),t(c)):r(c)}function l(c){return c===i?(e.consume(c),n++,l):(e.exit("thematicBreakSequence"),je(c)?He(e,o,"whitespace")(c):o(c))}}const Ut={continuation:{tokenize:MN},exit:BN,name:"list",tokenize:ON},NN={partial:!0,tokenize:FN},RN={partial:!0,tokenize:jN};function ON(e,t,r){const n=this,i=n.events[n.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(g){const y=n.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!n.containerState.marker||g===n.containerState.marker:od(g)){if(n.containerState.type||(n.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(Tl,r,c)(g):c(g);if(!n.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(g)}return r(g)}function l(g){return od(g)&&++a<10?(e.consume(g),l):(!n.interrupt||a<2)&&(n.containerState.marker?g===n.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),c(g)):r(g)}function c(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||g,e.check(ia,n.interrupt?r:h,e.attempt(NN,m,u))}function h(g){return n.containerState.initialBlankLine=!0,s++,m(g)}function u(g){return je(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),m):r(g)}function m(g){return n.containerState.size=s+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function MN(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(ia,i,s);function i(o){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,He(e,t,"listItemIndent",n.containerState.size+1)(o)}function s(o){return n.containerState.furtherBlankLines||!je(o)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(o)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(RN,t,a)(o))}function a(o){return n.containerState._closeFlow=!0,n.interrupt=void 0,He(e,e.attempt(Ut,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function jN(e,t,r){const n=this;return He(e,i,"listItemIndent",n.containerState.size+1);function i(s){const a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?t(s):r(s)}}function BN(e){e.exit(this.containerState.type)}function FN(e,t,r){const n=this;return He(e,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=n.events[n.events.length-1];return!je(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):r(s)}}const B_={name:"setextUnderline",resolveTo:zN,tokenize:$N};function zN(e,t){let r=e.length,n,i,s;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(i=r)}else e[r][1].type==="content"&&e.splice(r,1),!s&&e[r][1].type==="definition"&&(s=r);const a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[n][1],t]),e[n][1].end={...e[s][1].end}):e[n][1]=a,e.push(["exit",a,t]),e}function $N(e,t,r){const n=this;let i;return s;function s(c){let h=n.events.length,u;for(;h--;)if(n.events[h][1].type!=="lineEnding"&&n.events[h][1].type!=="linePrefix"&&n.events[h][1].type!=="content"){u=n.events[h][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||u)?(e.enter("setextHeadingLine"),i=c,a(c)):r(c)}function a(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===i?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),je(c)?He(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Le(c)?(e.exit("setextHeadingLine"),t(c)):r(c)}}const HN={tokenize:UN};function UN(e){const t=this,r=e.attempt(ia,n,e.attempt(this.parser.constructs.flowInitial,i,He(e,e.attempt(this.parser.constructs.flow,i,e.attempt(qI,i)),"linePrefix")));return r;function n(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const WN={resolveAll:Zb()},VN=Qb("string"),KN=Qb("text");function Qb(e){return{resolveAll:Zb(e==="text"?GN:void 0),tokenize:t};function t(r){const n=this,i=this.parser.constructs[e],s=r.attempt(i,a,o);return a;function a(h){return c(h)?s(h):o(h)}function o(h){if(h===null){r.consume(h);return}return r.enter("data"),r.consume(h),l}function l(h){return c(h)?(r.exit("data"),s(h)):(r.consume(h),l)}function c(h){if(h===null)return!0;const u=i[h];let m=-1;if(u)for(;++m<u.length;){const g=u[m];if(!g.previous||g.previous.call(n,n.previous))return!0}return!1}}}function Zb(e){return t;function t(r,n){let i=-1,s;for(;++i<=r.length;)s===void 0?r[i]&&r[i][1].type==="data"&&(s=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==s+2&&(r[s][1].end=r[i-1][1].end,r.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(r,n):r}}function GN(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],i=t.sliceStream(n);let s=i.length,a=-1,o=0,l;for(;s--;){const c=i[s];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(c===-2)l=!0,o++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(o=0),o){const c={type:r===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:n.start._bufferIndex+a,_index:n.start._index+s,line:n.end.line,column:n.end.column-o,offset:n.end.offset-o},end:{...n.end}};n.end={...c.start},n.start.offset===n.end.offset?Object.assign(n,c):(e.splice(r,0,["enter",c,t],["exit",c,t]),r+=2)}r++}return e}const qN={42:Ut,43:Ut,45:Ut,48:Ut,49:Ut,50:Ut,51:Ut,52:Ut,53:Ut,54:Ut,55:Ut,56:Ut,57:Ut,62:Vb},YN={91:ZI},JN={[-2]:uf,[-1]:uf,32:uf},XN={35:sN,42:Tl,45:[B_,Tl],60:cN,61:B_,95:Tl,96:M_,126:M_},QN={38:Gb,92:Kb},ZN={[-5]:ff,[-4]:ff,[-3]:ff,33:AN,38:Gb,42:ad,60:[PI,gN],91:PN,92:[nN,Kb],93:Vp,95:ad,96:HI},eR={null:[ad,WN]},tR={null:[42,95]},rR={null:[]},nR=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:tR,contentInitial:YN,disable:rR,document:qN,flow:XN,flowInitial:JN,insideSpan:eR,string:QN,text:ZN},Symbol.toStringTag,{value:"Module"}));function iR(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const i={},s=[];let a=[],o=[];const l={attempt:x(S),check:x(b),consume:f,enter:p,exit:w,interrupt:x(b,{interrupt:!0})},c={code:null,containerState:{},defineSkip:_,events:[],now:y,parser:e,previous:null,sliceSerialize:m,sliceStream:g,write:u};let h=t.tokenize.call(c,l);return t.resolveAll&&s.push(t),c;function u(j){return a=ur(a,j),v(),a[a.length-1]!==null?[]:(C(t,0),c.events=Yc(s,c.events,c),c.events)}function m(j,M){return oR(g(j),M)}function g(j){return sR(a,j)}function y(){const{_bufferIndex:j,_index:M,line:O,column:z,offset:$}=n;return{_bufferIndex:j,_index:M,line:O,column:z,offset:$}}function _(j){i[j.line]=j.column,T()}function v(){let j;for(;n._index<a.length;){const M=a[n._index];if(typeof M=="string")for(j=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===j&&n._bufferIndex<M.length;)d(M.charCodeAt(n._bufferIndex));else d(M)}}function d(j){h=h(j)}function f(j){Le(j)?(n.line++,n.column=1,n.offset+=j===-3?2:1,T()):j!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===a[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=j}function p(j,M){const O=M||{};return O.type=j,O.start=y(),c.events.push(["enter",O,c]),o.push(O),O}function w(j){const M=o.pop();return M.end=y(),c.events.push(["exit",M,c]),M}function S(j,M){C(j,M.from)}function b(j,M){M.restore()}function x(j,M){return O;function O(z,$,Y){let X,V,N,P;return Array.isArray(z)?I(z):"tokenize"in z?I([z]):R(z);function R(G){return B;function B(D){const U=D!==null&&G[D],H=D!==null&&G.null,ee=[...Array.isArray(U)?U:U?[U]:[],...Array.isArray(H)?H:H?[H]:[]];return I(ee)(D)}}function I(G){return X=G,V=0,G.length===0?Y:L(G[V])}function L(G){return B;function B(D){return P=A(),N=G,G.partial||(c.currentConstruct=G),G.name&&c.parser.constructs.disable.null.includes(G.name)?J():G.tokenize.call(M?Object.assign(Object.create(c),M):c,l,W,J)(D)}}function W(G){return j(N,P),$}function J(G){return P.restore(),++V<X.length?L(X[V]):Y}}}function C(j,M){j.resolveAll&&!s.includes(j)&&s.push(j),j.resolve&&rr(c.events,M,c.events.length-M,j.resolve(c.events.slice(M),c)),j.resolveTo&&(c.events=j.resolveTo(c.events,c))}function A(){const j=y(),M=c.previous,O=c.currentConstruct,z=c.events.length,$=Array.from(o);return{from:z,restore:Y};function Y(){n=j,c.previous=M,c.currentConstruct=O,c.events.length=z,o=$,T()}}function T(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function sR(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(r===i)a=[e[r].slice(n,s)];else{if(a=e.slice(r,i),n>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(n):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function oR(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const s=e[r];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
621
+ `;break}case-3:{a=`\r
622
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,n.push(a)}return n.join("")}function aR(e){const n={constructs:Ub([nR,...(e||{}).extensions||[]]),content:i(SI),defined:[],document:i(kI),flow:i(HN),lazy:{},string:i(VN),text:i(KN)};return n;function i(s){return a;function a(o){return iR(n,s,o)}}}function lR(e){for(;!qb(e););return e}const F_=/[\0\t\n\r]/g;function cR(){let e=1,t="",r=!0,n;return i;function i(s,a,o){const l=[];let c,h,u,m,g;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),u=0,t="",r&&(s.charCodeAt(0)===65279&&u++,r=void 0);u<s.length;){if(F_.lastIndex=u,c=F_.exec(s),m=c&&c.index!==void 0?c.index:s.length,g=s.charCodeAt(m),!c){t=s.slice(u);break}if(g===10&&u===m&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),u<m&&(l.push(s.slice(u,m)),e+=m-u),g){case 0:{l.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,l.push(-2);e++<h;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:n=!0,e=1}u=m+1}return o&&(n&&l.push(-5),t&&l.push(t),l.push(null)),l}}const uR=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function fR(e){return e.replace(uR,hR)}function hR(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const i=r.charCodeAt(1),s=i===120||i===88;return Wb(r.slice(s?2:1),s?16:10)}return Wp(r)||e}const eS={}.hasOwnProperty;function dR(e,t,r){return typeof t!="string"&&(r=t,t=void 0),pR(r)(lR(aR(r).document().write(cR()(e,t,!0))))}function pR(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Fe),autolinkProtocol:A,autolinkEmail:A,atxHeading:s(ve),blockQuote:s(H),characterEscape:A,characterReference:A,codeFenced:s(ee),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(ee,a),codeText:s(Z,a),codeTextData:A,data:A,codeFlowValue:A,definition:s(de),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(ge),hardBreakEscape:s(Ee),hardBreakTrailing:s(Ee),htmlFlow:s(ue,a),htmlFlowData:A,htmlText:s(ue,a),htmlTextData:A,image:s(Ae),label:a,link:s(Fe),listItem:s(We),listItemValue:m,listOrdered:s(Re,u),listUnordered:s(Re),paragraph:s(ot),reference:L,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(ve),strong:s(Oe),thematicBreak:s(Ce)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:U,autolinkProtocol:D,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:J,characterReferenceMarkerNumeric:J,characterReferenceValue:G,characterReference:B,codeFenced:l(v),codeFencedFence:_,codeFencedFenceInfo:g,codeFencedFenceMeta:y,codeFlowValue:T,codeIndented:l(d),codeText:l($),codeTextData:T,data:T,definition:l(),definitionDestinationString:w,definitionLabelString:f,definitionTitleString:p,emphasis:l(),hardBreakEscape:l(M),hardBreakTrailing:l(M),htmlFlow:l(O),htmlFlowData:T,htmlText:l(z),htmlTextData:T,image:l(X),label:N,labelText:V,lineEnding:j,link:l(Y),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:W,resourceDestinationString:P,resourceTitleString:R,resource:I,setextHeading:l(C),setextHeadingLineSequence:x,setextHeadingText:b,strong:l(),thematicBreak:l()}};tS(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(Q){let oe={type:"root",children:[]};const ye={stack:[oe],tokenStack:[],config:t,enter:o,exit:c,buffer:a,resume:h,data:r},F=[];let ke=-1;for(;++ke<Q.length;)if(Q[ke][1].type==="listOrdered"||Q[ke][1].type==="listUnordered")if(Q[ke][0]==="enter")F.push(ke);else{const re=F.pop();ke=i(Q,re,ke)}for(ke=-1;++ke<Q.length;){const re=t[Q[ke][0]];eS.call(re,Q[ke][1].type)&&re[Q[ke][1].type].call(Object.assign({sliceSerialize:Q[ke][2].sliceSerialize},ye),Q[ke][1])}if(ye.tokenStack.length>0){const re=ye.tokenStack[ye.tokenStack.length-1];(re[1]||z_).call(ye,void 0,re[0])}for(oe.position={start:pn(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:pn(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},ke=-1;++ke<t.transforms.length;)oe=t.transforms[ke](oe)||oe;return oe}function i(Q,oe,ye){let F=oe-1,ke=-1,re=!1,we,Ve,Me,Lt;for(;++F<=ye;){const ae=Q[F];switch(ae[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ae[0]==="enter"?ke++:ke--,Lt=void 0;break}case"lineEndingBlank":{ae[0]==="enter"&&(we&&!Lt&&!ke&&!Me&&(Me=F),Lt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Lt=void 0}if(!ke&&ae[0]==="enter"&&ae[1].type==="listItemPrefix"||ke===-1&&ae[0]==="exit"&&(ae[1].type==="listUnordered"||ae[1].type==="listOrdered")){if(we){let ce=F;for(Ve=void 0;ce--;){const q=Q[ce];if(q[1].type==="lineEnding"||q[1].type==="lineEndingBlank"){if(q[0]==="exit")continue;Ve&&(Q[Ve][1].type="lineEndingBlank",re=!0),q[1].type="lineEnding",Ve=ce}else if(!(q[1].type==="linePrefix"||q[1].type==="blockQuotePrefix"||q[1].type==="blockQuotePrefixWhitespace"||q[1].type==="blockQuoteMarker"||q[1].type==="listItemIndent"))break}Me&&(!Ve||Me<Ve)&&(we._spread=!0),we.end=Object.assign({},Ve?Q[Ve][1].start:ae[1].end),Q.splice(Ve||F,0,["exit",we,ae[2]]),F++,ye++}if(ae[1].type==="listItemPrefix"){const ce={type:"listItem",_spread:!1,start:Object.assign({},ae[1].start),end:void 0};we=ce,Q.splice(F,0,["enter",ce,ae[2]]),F++,ye++,Me=void 0,Lt=!0}}}return Q[oe][1]._spread=re,ye}function s(Q,oe){return ye;function ye(F){o.call(this,Q(F),F),oe&&oe.call(this,F)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(Q,oe,ye){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([oe,ye||void 0]),Q.position={start:pn(oe.start),end:void 0}}function l(Q){return oe;function oe(ye){Q&&Q.call(this,ye),c.call(this,ye)}}function c(Q,oe){const ye=this.stack.pop(),F=this.tokenStack.pop();if(F)F[0].type!==Q.type&&(oe?oe.call(this,Q,F[0]):(F[1]||z_).call(this,Q,F[0]));else throw new Error("Cannot close `"+Q.type+"` ("+go({start:Q.start,end:Q.end})+"): it’s not open");ye.position.end=pn(Q.end)}function h(){return Up(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function m(Q){if(this.data.expectingFirstListItemValue){const oe=this.stack[this.stack.length-2];oe.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function g(){const Q=this.resume(),oe=this.stack[this.stack.length-1];oe.lang=Q}function y(){const Q=this.resume(),oe=this.stack[this.stack.length-1];oe.meta=Q}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const Q=this.resume(),oe=this.stack[this.stack.length-1];oe.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function d(){const Q=this.resume(),oe=this.stack[this.stack.length-1];oe.value=Q.replace(/(\r?\n|\r)$/g,"")}function f(Q){const oe=this.resume(),ye=this.stack[this.stack.length-1];ye.label=oe,ye.identifier=Cr(this.sliceSerialize(Q)).toLowerCase()}function p(){const Q=this.resume(),oe=this.stack[this.stack.length-1];oe.title=Q}function w(){const Q=this.resume(),oe=this.stack[this.stack.length-1];oe.url=Q}function S(Q){const oe=this.stack[this.stack.length-1];if(!oe.depth){const ye=this.sliceSerialize(Q).length;oe.depth=ye}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function x(Q){const oe=this.stack[this.stack.length-1];oe.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function C(){this.data.setextHeadingSlurpLineEnding=void 0}function A(Q){const ye=this.stack[this.stack.length-1].children;let F=ye[ye.length-1];(!F||F.type!=="text")&&(F=Pe(),F.position={start:pn(Q.start),end:void 0},ye.push(F)),this.stack.push(F)}function T(Q){const oe=this.stack.pop();oe.value+=this.sliceSerialize(Q),oe.position.end=pn(Q.end)}function j(Q){const oe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ye=oe.children[oe.children.length-1];ye.position.end=pn(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(oe.type)&&(A.call(this,Q),T.call(this,Q))}function M(){this.data.atHardBreak=!0}function O(){const Q=this.resume(),oe=this.stack[this.stack.length-1];oe.value=Q}function z(){const Q=this.resume(),oe=this.stack[this.stack.length-1];oe.value=Q}function $(){const Q=this.resume(),oe=this.stack[this.stack.length-1];oe.value=Q}function Y(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const oe=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=oe,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function X(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const oe=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=oe,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function V(Q){const oe=this.sliceSerialize(Q),ye=this.stack[this.stack.length-2];ye.label=fR(oe),ye.identifier=Cr(oe).toLowerCase()}function N(){const Q=this.stack[this.stack.length-1],oe=this.resume(),ye=this.stack[this.stack.length-1];if(this.data.inReference=!0,ye.type==="link"){const F=Q.children;ye.children=F}else ye.alt=oe}function P(){const Q=this.resume(),oe=this.stack[this.stack.length-1];oe.url=Q}function R(){const Q=this.resume(),oe=this.stack[this.stack.length-1];oe.title=Q}function I(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function W(Q){const oe=this.resume(),ye=this.stack[this.stack.length-1];ye.label=oe,ye.identifier=Cr(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function J(Q){this.data.characterReferenceType=Q.type}function G(Q){const oe=this.sliceSerialize(Q),ye=this.data.characterReferenceType;let F;ye?(F=Wb(oe,ye==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):F=Wp(oe);const ke=this.stack[this.stack.length-1];ke.value+=F}function B(Q){const oe=this.stack.pop();oe.position.end=pn(Q.end)}function D(Q){T.call(this,Q);const oe=this.stack[this.stack.length-1];oe.url=this.sliceSerialize(Q)}function U(Q){T.call(this,Q);const oe=this.stack[this.stack.length-1];oe.url="mailto:"+this.sliceSerialize(Q)}function H(){return{type:"blockquote",children:[]}}function ee(){return{type:"code",lang:null,meta:null,value:""}}function Z(){return{type:"inlineCode",value:""}}function de(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ge(){return{type:"emphasis",children:[]}}function ve(){return{type:"heading",depth:0,children:[]}}function Ee(){return{type:"break"}}function ue(){return{type:"html",value:""}}function Ae(){return{type:"image",title:null,url:"",alt:null}}function Fe(){return{type:"link",title:null,url:"",children:[]}}function Re(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function We(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function ot(){return{type:"paragraph",children:[]}}function Oe(){return{type:"strong",children:[]}}function Pe(){return{type:"text",value:""}}function Ce(){return{type:"thematicBreak"}}}function pn(e){return{line:e.line,column:e.column,offset:e.offset}}function tS(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?tS(e,n):mR(e,n)}}function mR(e,t){let r;for(r in t)if(eS.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function z_(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+go({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+go({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+go({start:t.start,end:t.end})+") is still open")}function gR(e){const t=this;t.parser=r;function r(n){return dR(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function vR(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function _R(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
623
+ `}]}function yR(e,t){const r=t.value?t.value+`
624
+ `:"",n={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(n.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function wR(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function bR(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function SR(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),i=xs(n.toLowerCase()),s=e.footnoteOrder.indexOf(n);let a,o=e.footnoteCounts.get(n);o===void 0?(o=0,e.footnoteOrder.push(n),a=e.footnoteOrder.length):a=s+1,o+=1,e.footnoteCounts.set(n,o);const l={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function CR(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function kR(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function rS(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=n:i.push({type:"text",value:n}),i}function xR(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return rS(e,t);const i={src:xs(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function ER(e,t){const r={src:xs(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function AR(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function LR(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return rS(e,t);const i={href:xs(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function PR(e,t){const r={href:xs(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function TR(e,t,r){const n=e.all(t),i=r?DR(r):nS(t),s={},a=[];if(typeof t.checked=="boolean"){const h=n[0];let u;h&&h.type==="element"&&h.tagName==="p"?u=h:(u={type:"element",tagName:"p",properties:{},children:[]},n.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<n.length;){const h=n[o];(i||o!==0||h.type!=="element"||h.tagName!=="p")&&a.push({type:"text",value:`
625
+ `}),h.type==="element"&&h.tagName==="p"&&!i?a.push(...h.children):a.push(h)}const l=n[n.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
626
+ `});const c={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,c),e.applyData(t,c)}function DR(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n<r.length;)t=nS(r[n])}return t}function nS(e){const t=e.spread;return t??e.children.length>1}function IR(e,t){const r={},n=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++i<n.length;){const a=n[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,s),e.applyData(t,s)}function NR(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function RR(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function OR(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function MR(e,t){const r=e.all(t),n=r.shift(),i=[];if(n){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],a),i.push(a)}if(r.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},o=Fp(t.children[1]),l=Mb(t.children[t.children.length-1]);o&&l&&(a.position={start:o,end:l}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function jR(e,t,r){const n=r?r.children:void 0,s=(n?n.indexOf(t):1)===0?"th":"td",a=r&&r.type==="table"?r.align:void 0,o=a?a.length:t.children.length;let l=-1;const c=[];for(;++l<o;){const u=t.children[l],m={},g=a?a[l]:void 0;g&&(m.align=g);let y={type:"element",tagName:s,properties:m,children:[]};u&&(y.children=e.all(u),e.patch(u,y),y=e.applyData(u,y)),c.push(y)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,h),e.applyData(t,h)}function BR(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const $_=9,H_=32;function FR(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),i=0;const s=[];for(;n;)s.push(U_(t.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return s.push(U_(t.slice(i),i>0,!1)),s.join("")}function U_(e,t,r){let n=0,i=e.length;if(t){let s=e.codePointAt(n);for(;s===$_||s===H_;)n++,s=e.codePointAt(n)}if(r){let s=e.codePointAt(i-1);for(;s===$_||s===H_;)i--,s=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}function zR(e,t){const r={type:"text",value:FR(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function $R(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const HR={blockquote:vR,break:_R,code:yR,delete:wR,emphasis:bR,footnoteReference:SR,heading:CR,html:kR,imageReference:xR,image:ER,inlineCode:AR,linkReference:LR,link:PR,listItem:TR,list:IR,paragraph:NR,root:RR,strong:OR,table:MR,tableCell:BR,tableRow:jR,text:zR,thematicBreak:$R,toml:el,yaml:el,definition:el,footnoteDefinition:el};function el(){}const iS=-1,Jc=0,_o=1,pc=2,Kp=3,Gp=4,qp=5,Yp=6,sS=7,oS=8,W_=typeof self=="object"?self:globalThis,UR=(e,t)=>{const r=(i,s)=>(e.set(s,i),i),n=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case Jc:case iS:return r(a,i);case _o:{const o=r([],i);for(const l of a)o.push(n(l));return o}case pc:{const o=r({},i);for(const[l,c]of a)o[n(l)]=n(c);return o}case Kp:return r(new Date(a),i);case Gp:{const{source:o,flags:l}=a;return r(new RegExp(o,l),i)}case qp:{const o=r(new Map,i);for(const[l,c]of a)o.set(n(l),n(c));return o}case Yp:{const o=r(new Set,i);for(const l of a)o.add(n(l));return o}case sS:{const{name:o,message:l}=a;return r(new W_[o](l),i)}case oS:return r(BigInt(a),i);case"BigInt":return r(Object(BigInt(a)),i);case"ArrayBuffer":return r(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return r(new DataView(o),a)}}return r(new W_[s](a),i)};return n},V_=e=>UR(new Map,e)(0),Li="",{toString:WR}={},{keys:VR}=Object,qs=e=>{const t=typeof e;if(t!=="object"||!e)return[Jc,t];const r=WR.call(e).slice(8,-1);switch(r){case"Array":return[_o,Li];case"Object":return[pc,Li];case"Date":return[Kp,Li];case"RegExp":return[Gp,Li];case"Map":return[qp,Li];case"Set":return[Yp,Li];case"DataView":return[_o,r]}return r.includes("Array")?[_o,r]:r.includes("Error")?[sS,r]:[pc,r]},tl=([e,t])=>e===Jc&&(t==="function"||t==="symbol"),KR=(e,t,r,n)=>{const i=(a,o)=>{const l=n.push(a)-1;return r.set(o,l),l},s=a=>{if(r.has(a))return r.get(a);let[o,l]=qs(a);switch(o){case Jc:{let h=a;switch(l){case"bigint":o=oS,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);h=null;break;case"undefined":return i([iS],a)}return i([o,h],a)}case _o:{if(l){let m=a;return l==="DataView"?m=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(m=new Uint8Array(a)),i([l,[...m]],a)}const h=[],u=i([o,h],a);for(const m of a)h.push(s(m));return u}case pc:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const h=[],u=i([o,h],a);for(const m of VR(a))(e||!tl(qs(a[m])))&&h.push([s(m),s(a[m])]);return u}case Kp:return i([o,a.toISOString()],a);case Gp:{const{source:h,flags:u}=a;return i([o,{source:h,flags:u}],a)}case qp:{const h=[],u=i([o,h],a);for(const[m,g]of a)(e||!(tl(qs(m))||tl(qs(g))))&&h.push([s(m),s(g)]);return u}case Yp:{const h=[],u=i([o,h],a);for(const m of a)(e||!tl(qs(m)))&&h.push(s(m));return u}}const{message:c}=a;return i([o,{name:l,message:c}],a)};return s},K_=(e,{json:t,lossy:r}={})=>{const n=[];return KR(!(t||r),!!t,new Map,n)(e),n},mc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?V_(K_(e,t)):structuredClone(e):(e,t)=>V_(K_(e,t));function GR(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function qR(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function YR(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||GR,n=e.options.footnoteBackLabel||qR,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const h=e.all(c),u=String(c.identifier).toUpperCase(),m=xs(u.toLowerCase());let g=0;const y=[],_=e.footnoteCounts.get(u);for(;_!==void 0&&++g<=_;){y.length>0&&y.push({type:"text",value:" "});let f=typeof r=="string"?r:r(l,g);typeof f=="string"&&(f={type:"text",value:f}),y.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,g),className:["data-footnote-backref"]},children:Array.isArray(f)?f:[f]})}const v=h[h.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const f=v.children[v.children.length-1];f&&f.type==="text"?f.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...y)}else h.push(...y);const d={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(h,!0)};e.patch(c,d),o.push(d)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...mc(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
627
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
628
+ `}]}}const Xc=function(e){if(e==null)return ZR;if(typeof e=="function")return Qc(e);if(typeof e=="object")return Array.isArray(e)?JR(e):XR(e);if(typeof e=="string")return QR(e);throw new Error("Expected function, string, or object as test")};function JR(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Xc(e[r]);return Qc(n);function n(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function XR(e){const t=e;return Qc(r);function r(n){const i=n;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function QR(e){return Qc(t);function t(r){return r&&r.type===e}}function Qc(e){return t;function t(r,n,i){return!!(eO(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function ZR(){return!0}function eO(e){return e!==null&&typeof e=="object"&&"type"in e}const aS=[],tO=!0,ld=!1,rO="skip";function lS(e,t,r,n){let i;typeof t=="function"&&typeof r!="function"?(n=r,r=t):i=t;const s=Xc(i),a=n?-1:1;o(e,void 0,[])();function o(l,c,h){const u=l&&typeof l=="object"?l:{};if(typeof u.type=="string"){const g=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(l.type+(g?"<"+g+">":""))+")"})}return m;function m(){let g=aS,y,_,v;if((!t||s(l,c,h[h.length-1]||void 0))&&(g=nO(r(l,h)),g[0]===ld))return g;if("children"in l&&l.children){const d=l;if(d.children&&g[0]!==rO)for(_=(n?d.children.length:-1)+a,v=h.concat(d);_>-1&&_<d.children.length;){const f=d.children[_];if(y=o(f,_,v)(),y[0]===ld)return y;_=typeof y[1]=="number"?y[1]:_+a}}return g}}}function nO(e){return Array.isArray(e)?e:typeof e=="number"?[tO,e]:e==null?aS:[e]}function Jp(e,t,r,n){let i,s,a;typeof t=="function"&&typeof r!="function"?(s=void 0,a=t,i=r):(s=t,a=r,i=n),lS(e,s,o,i);function o(l,c){const h=c[c.length-1],u=h?h.children.indexOf(l):void 0;return a(l,u,h)}}const cd={}.hasOwnProperty,iO={};function sO(e,t){const r=t||iO,n=new Map,i=new Map,s=new Map,a={...HR,...r.handlers},o={all:c,applyData:aO,definitionById:n,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:l,options:r,patch:oO,wrap:cO};return Jp(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const u=h.type==="definition"?n:i,m=String(h.identifier).toUpperCase();u.has(m)||u.set(m,h)}}),o;function l(h,u){const m=h.type,g=o.handlers[m];if(cd.call(o.handlers,m)&&g)return g(o,h,u);if(o.options.passThrough&&o.options.passThrough.includes(m)){if("children"in h){const{children:_,...v}=h,d=mc(v);return d.children=o.all(h),d}return mc(h)}return(o.options.unknownHandler||lO)(o,h,u)}function c(h){const u=[];if("children"in h){const m=h.children;let g=-1;for(;++g<m.length;){const y=o.one(m[g],h);if(y){if(g&&m[g-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=G_(y.value)),!Array.isArray(y)&&y.type==="element")){const _=y.children[0];_&&_.type==="text"&&(_.value=G_(_.value))}Array.isArray(y)?u.push(...y):u.push(y)}}}return u}}function oO(e,t){e.position&&(t.position=q6(e))}function aO(e,t){let r=t;if(e&&e.data){const n=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{const a="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:a}}r.type==="element"&&s&&Object.assign(r.properties,mc(s)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}function lO(e,t){const r=t.data||{},n="value"in t&&!(cd.call(r,"hProperties")||cd.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cO(e,t){const r=[];let n=-1;for(t&&r.push({type:"text",value:`
629
+ `});++n<e.length;)n&&r.push({type:"text",value:`
630
+ `}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:`
631
+ `}),r}function G_(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function q_(e,t){const r=sO(e,t),n=r.one(e,void 0),i=YR(r),s=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
632
+ `},i),s}function uO(e,t){return e&&"run"in e?async function(r,n){const i=q_(r,{file:n,...t});await e.run(i,n)}:function(r,n){return q_(r,{file:n,...e||t})}}function Y_(e){if(e)throw e}var Dl=Object.prototype.hasOwnProperty,cS=Object.prototype.toString,J_=Object.defineProperty,X_=Object.getOwnPropertyDescriptor,Q_=function(t){return typeof Array.isArray=="function"?Array.isArray(t):cS.call(t)==="[object Array]"},Z_=function(t){if(!t||cS.call(t)!=="[object Object]")return!1;var r=Dl.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&Dl.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var i;for(i in t);return typeof i>"u"||Dl.call(t,i)},e0=function(t,r){J_&&r.name==="__proto__"?J_(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},t0=function(t,r){if(r==="__proto__")if(Dl.call(t,r)){if(X_)return X_(t,r).value}else return;return t[r]},fO=function e(){var t,r,n,i,s,a,o=arguments[0],l=1,c=arguments.length,h=!1;for(typeof o=="boolean"&&(h=o,o=arguments[1]||{},l=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});l<c;++l)if(t=arguments[l],t!=null)for(r in t)n=t0(o,r),i=t0(t,r),o!==i&&(h&&i&&(Z_(i)||(s=Q_(i)))?(s?(s=!1,a=n&&Q_(n)?n:[]):a=n&&Z_(n)?n:{},e0(o,{name:r,newValue:e(h,a,i)})):typeof i<"u"&&e0(o,{name:r,newValue:i}));return o};const hf=yc(fO);function ud(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function hO(){const e=[],t={run:r,use:n};return t;function r(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...i);function o(l,...c){const h=e[++s];let u=-1;if(l){a(l);return}for(;++u<i.length;)(c[u]===null||c[u]===void 0)&&(c[u]=i[u]);i=c,h?dO(h,o)(...c):a(null,...c)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function dO(e,t){let r;return n;function n(...a){const o=e.length>a.length;let l;o&&a.push(i);try{l=e.apply(this,a)}catch(c){const h=c;if(o&&r)throw h;return i(h)}o||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(a,...o){r||(r=!0,t(a,...o))}function s(a){i(null,a)}}const Ir={basename:pO,dirname:mO,extname:gO,join:vO,sep:"/"};function pO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');sa(e);let r=0,n=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){r=i+1;break}}else n<0&&(s=!0,n=i+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let a=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){r=i+1;break}}else a<0&&(s=!0,a=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(n=i):(o=-1,n=a));return r===n?n=a:n<0&&(n=e.length),e.slice(r,n)}function mO(e){if(sa(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function gO(e){sa(e);let t=e.length,r=-1,n=0,i=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){n=t+1;break}continue}r<0&&(a=!0,r=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||r<0||s===0||s===1&&i===r-1&&i===n+1?"":e.slice(i,r)}function vO(...e){let t=-1,r;for(;++t<e.length;)sa(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":_O(r)}function _O(e){sa(e);const t=e.codePointAt(0)===47;let r=yO(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function yO(e,t){let r="",n=0,i=-1,s=0,a=-1,o,l;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),i=a,s=0;continue}}else if(r.length>0){r="",n=0,i=a,s=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(i+1,a):r=e.slice(i+1,a),n=a-i-1;i=a,s=0}else o===46&&s>-1?s++:s=-1}return r}function sa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const wO={cwd:bO};function bO(){return"/"}function fd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function SO(e){if(typeof e=="string")e=new URL(e);else if(!fd(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return CO(e)}function CO(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const n=t.codePointAt(r+2);if(n===70||n===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const df=["history","path","basename","stem","extname","dirname"];class uS{constructor(t){let r;t?fd(t)?r={path:t}:typeof t=="string"||kO(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":wO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<df.length;){const s=df[n];s in r&&r[s]!==void 0&&r[s]!==null&&(this[s]=s==="history"?[...r[s]]:r[s])}let i;for(i in r)df.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?Ir.basename(this.path):void 0}set basename(t){mf(t,"basename"),pf(t,"basename"),this.path=Ir.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ir.dirname(this.path):void 0}set dirname(t){r0(this.basename,"dirname"),this.path=Ir.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ir.extname(this.path):void 0}set extname(t){if(pf(t,"extname"),r0(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ir.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){fd(t)&&(t=SO(t)),mf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ir.basename(this.path,this.extname):void 0}set stem(t){mf(t,"stem"),pf(t,"stem"),this.path=Ir.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){const i=this.message(t,r,n);throw i.fatal=!0,i}info(t,r,n){const i=this.message(t,r,n);return i.fatal=void 0,i}message(t,r,n){const i=new Ot(t,r,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function pf(e,t){if(e&&e.includes(Ir.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ir.sep+"`")}function mf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function r0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function kO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const xO=function(e){const n=this.constructor.prototype,i=n[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,n),s},EO={}.hasOwnProperty;class Xp extends xO{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=hO()}copy(){const t=new Xp;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(hf(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(_f("data",this.frozen),this.namespace[t]=r,this):EO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(_f("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const i=r.call(t,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=rl(t),n=this.parser||this.Parser;return gf("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),gf("process",this.parser||this.Parser),vf("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(s,a){const o=rl(t),l=n.parse(o);n.run(l,o,function(h,u,m){if(h||!u||!m)return c(h);const g=u,y=n.stringify(g,m);PO(y)?m.value=y:m.result=y,c(h,m)});function c(h,u){h||!u?a(h):s?s(u):r(void 0,u)}}}processSync(t){let r=!1,n;return this.freeze(),gf("processSync",this.parser||this.Parser),vf("processSync",this.compiler||this.Compiler),this.process(t,i),i0("processSync","process",r),n;function i(s,a){r=!0,Y_(s),n=a}}run(t,r,n){n0(t),this.freeze();const i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?s(void 0,n):new Promise(s);function s(a,o){const l=rl(r);i.run(t,l,c);function c(h,u,m){const g=u||t;h?o(h):a?a(g):n(void 0,g,m)}}}runSync(t,r){let n=!1,i;return this.run(t,r,s),i0("runSync","run",n),i;function s(a,o){Y_(a),i=o,n=!0}}stringify(t,r){this.freeze();const n=rl(r),i=this.compiler||this.Compiler;return vf("stringify",i),n0(t),i(t,n)}use(t,...r){const n=this.attachers,i=this.namespace;if(_f("use",this.frozen),t!=null)if(typeof t=="function")l(t,r);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[h,...u]=c;l(h,u)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(c.plugins),c.settings&&(i.settings=hf(!0,i.settings,c.settings))}function o(c){let h=-1;if(c!=null)if(Array.isArray(c))for(;++h<c.length;){const u=c[h];s(u)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,h){let u=-1,m=-1;for(;++u<n.length;)if(n[u][0]===c){m=u;break}if(m===-1)n.push([c,...h]);else if(h.length>0){let[g,...y]=h;const _=n[m][1];ud(_)&&ud(g)&&(g=hf(!0,_,g)),n[m]=[c,g,...y]}}}}const AO=new Xp().freeze();function gf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function vf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function _f(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function n0(e){if(!ud(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function i0(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function rl(e){return LO(e)?e:new uS(e)}function LO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function PO(e){return typeof e=="string"||TO(e)}function TO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const DO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",s0=[],o0={allowDangerousHtml:!0},IO=/^(https?|ircs?|mailto|xmpp)$/i,NO=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function yf(e){const t=RO(e),r=OO(e);return MO(t.runSync(t.parse(r),r),e)}function RO(e){const t=e.rehypePlugins||s0,r=e.remarkPlugins||s0,n=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...o0}:o0;return AO().use(gR).use(r).use(uO,n).use(t)}function OO(e){const t=e.children||"",r=new uS;return typeof t=="string"&&(r.value=t),r}function MO(e,t){const r=t.allowedElements,n=t.allowElement,i=t.components,s=t.disallowedElements,a=t.skipHtml,o=t.unwrapDisallowed,l=t.urlTransform||jO;for(const h of NO)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+DO+h.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Jp(e,c),Z6(e,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function c(h,u,m){if(h.type==="raw"&&m&&typeof u=="number")return a?m.children.splice(u,1):m.children[u]={type:"text",value:h.value},u;if(h.type==="element"){let g;for(g in cf)if(Object.hasOwn(cf,g)&&Object.hasOwn(h.properties,g)){const y=h.properties[g],_=cf[g];(_===null||_.includes(h.tagName))&&(h.properties[g]=l(String(y||""),g,h))}}if(h.type==="element"){let g=r?!r.includes(h.tagName):s?s.includes(h.tagName):!1;if(!g&&n&&typeof u=="number"&&(g=!n(h,u,m)),g&&m&&typeof u=="number")return o&&h.children?m.children.splice(u,1,...h.children):m.children.splice(u,1),u}}}function jO(e){const t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||r!==-1&&t>r||n!==-1&&t>n||IO.test(e.slice(0,t))?e:""}function a0(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;i!==-1;)n++,i=r.indexOf(t,i+t.length);return n}function BO(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function FO(e,t,r){const i=Xc((r||{}).ignore||[]),s=zO(t);let a=-1;for(;++a<s.length;)lS(e,"text",o);function o(c,h){let u=-1,m;for(;++u<h.length;){const g=h[u],y=m?m.children:void 0;if(i(g,y?y.indexOf(g):void 0,m))return;m=g}if(m)return l(c,h)}function l(c,h){const u=h[h.length-1],m=s[a][0],g=s[a][1];let y=0;const v=u.children.indexOf(c);let d=!1,f=[];m.lastIndex=0;let p=m.exec(c.value);for(;p;){const w=p.index,S={index:p.index,input:p.input,stack:[...h,c]};let b=g(...p,S);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?m.lastIndex=w+1:(y!==w&&f.push({type:"text",value:c.value.slice(y,w)}),Array.isArray(b)?f.push(...b):b&&f.push(b),y=w+p[0].length,d=!0),!m.global)break;p=m.exec(c.value)}return d?(y<c.value.length&&f.push({type:"text",value:c.value.slice(y)}),u.children.splice(v,1,...f)):f=[c],v+f.length}}function zO(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let n=-1;for(;++n<r.length;){const i=r[n];t.push([$O(i[0]),HO(i[1])])}return t}function $O(e){return typeof e=="string"?new RegExp(BO(e),"g"):e}function HO(e){return typeof e=="function"?e:function(){return e}}const wf="phrasing",bf=["autolink","link","image","label"];function UO(){return{transforms:[JO],enter:{literalAutolink:VO,literalAutolinkEmail:Sf,literalAutolinkHttp:Sf,literalAutolinkWww:Sf},exit:{literalAutolink:YO,literalAutolinkEmail:qO,literalAutolinkHttp:KO,literalAutolinkWww:GO}}}function WO(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:wf,notInConstruct:bf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:wf,notInConstruct:bf},{character:":",before:"[ps]",after:"\\/",inConstruct:wf,notInConstruct:bf}]}}function VO(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Sf(e){this.config.enter.autolinkProtocol.call(this,e)}function KO(e){this.config.exit.autolinkProtocol.call(this,e)}function GO(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function qO(e){this.config.exit.autolinkEmail.call(this,e)}function YO(e){this.exit(e)}function JO(e){FO(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,XO],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),QO]],{ignore:["link","linkReference"]})}function XO(e,t,r,n,i){let s="";if(!fS(i)||(/^w/i.test(t)&&(r=t+r,t="",s="http://"),!ZO(r)))return!1;const a=eM(r+n);if(!a[0])return!1;const o={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function QO(e,t,r,n){return!fS(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function ZO(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function eM(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const i=a0(e,"(");let s=a0(e,")");for(;n!==-1&&i>s;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),s++;return[e,r]}function fS(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||pi(r)||qc(r))&&(!t||r!==47)}hS.peek=cM;function tM(){this.buffer()}function rM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function nM(){this.buffer()}function iM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function sM(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Cr(this.sliceSerialize(e)).toLowerCase(),r.label=t}function oM(e){this.exit(e)}function aM(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Cr(this.sliceSerialize(e)).toLowerCase(),r.label=t}function lM(e){this.exit(e)}function cM(){return"["}function hS(e,t,r,n){const i=r.createTracker(n);let s=i.move("[^");const a=r.enter("footnoteReference"),o=r.enter("reference");return s+=i.move(r.safe(r.associationId(e),{after:"]",before:s})),o(),a(),s+=i.move("]"),s}function uM(){return{enter:{gfmFootnoteCallString:tM,gfmFootnoteCall:rM,gfmFootnoteDefinitionLabelString:nM,gfmFootnoteDefinition:iM},exit:{gfmFootnoteCallString:sM,gfmFootnoteCall:oM,gfmFootnoteDefinitionLabelString:aM,gfmFootnoteDefinition:lM}}}function fM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:hS},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,s,a){const o=s.createTracker(a);let l=o.move("[^");const c=s.enter("footnoteDefinition"),h=s.enter("label");return l+=o.move(s.safe(s.associationId(n),{before:l,after:"]"})),h(),l+=o.move("]:"),n.children&&n.children.length>0&&(o.shift(4),l+=o.move((t?`
633
+ `:" ")+s.indentLines(s.containerFlow(n,o.current()),t?dS:hM))),c(),l}}function hM(e,t,r){return t===0?e:dS(e,t,r)}function dS(e,t,r){return(r?"":" ")+e}const dM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];pS.peek=_M;function pM(){return{canContainEols:["delete"],enter:{strikethrough:gM},exit:{strikethrough:vM}}}function mM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:dM}],handlers:{delete:pS}}}function gM(e){this.enter({type:"delete",children:[]},e)}function vM(e){this.exit(e)}function pS(e,t,r,n){const i=r.createTracker(n),s=r.enter("strikethrough");let a=i.move("~~");return a+=r.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function _M(){return"~"}function yM(e){return e.length}function wM(e,t){const r=t||{},n=(r.align||[]).concat(),i=r.stringLength||yM,s=[],a=[],o=[],l=[];let c=0,h=-1;for(;++h<e.length;){const _=[],v=[];let d=-1;for(e[h].length>c&&(c=e[h].length);++d<e[h].length;){const f=bM(e[h][d]);if(r.alignDelimiters!==!1){const p=i(f);v[d]=p,(l[d]===void 0||p>l[d])&&(l[d]=p)}_.push(f)}a[h]=_,o[h]=v}let u=-1;if(typeof n=="object"&&"length"in n)for(;++u<c;)s[u]=l0(n[u]);else{const _=l0(n);for(;++u<c;)s[u]=_}u=-1;const m=[],g=[];for(;++u<c;){const _=s[u];let v="",d="";_===99?(v=":",d=":"):_===108?v=":":_===114&&(d=":");let f=r.alignDelimiters===!1?1:Math.max(1,l[u]-v.length-d.length);const p=v+"-".repeat(f)+d;r.alignDelimiters!==!1&&(f=v.length+f+d.length,f>l[u]&&(l[u]=f),g[u]=f),m[u]=p}a.splice(1,0,m),o.splice(1,0,g),h=-1;const y=[];for(;++h<a.length;){const _=a[h],v=o[h];u=-1;const d=[];for(;++u<c;){const f=_[u]||"";let p="",w="";if(r.alignDelimiters!==!1){const S=l[u]-(v[u]||0),b=s[u];b===114?p=" ".repeat(S):b===99?S%2?(p=" ".repeat(S/2+.5),w=" ".repeat(S/2-.5)):(p=" ".repeat(S/2),w=p):w=" ".repeat(S)}r.delimiterStart!==!1&&!u&&d.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&f==="")&&(r.delimiterStart!==!1||u)&&d.push(" "),r.alignDelimiters!==!1&&d.push(p),d.push(f),r.alignDelimiters!==!1&&d.push(w),r.padding!==!1&&d.push(" "),(r.delimiterEnd!==!1||u!==c-1)&&d.push("|")}y.push(r.delimiterEnd===!1?d.join("").replace(/ +$/,""):d.join(""))}return y.join(`
634
+ `)}function bM(e){return e==null?"":String(e)}function l0(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function SM(e,t,r,n){const i=r.enter("blockquote"),s=r.createTracker(n);s.move("> "),s.shift(2);const a=r.indentLines(r.containerFlow(e,s.current()),CM);return i(),a}function CM(e,t,r){return">"+(r?"":" ")+e}function kM(e,t){return c0(e,t.inConstruct,!0)&&!c0(e,t.notInConstruct,!1)}function c0(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function u0(e,t,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
635
+ `&&kM(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
636
+ `}function xM(e,t){const r=String(e);let n=r.indexOf(t),i=n,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++s>a&&(a=s):s=1,i=n+t.length,n=r.indexOf(t,i);return a}function EM(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function AM(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function LM(e,t,r,n){const i=AM(r),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(EM(e,r)){const u=r.enter("codeIndented"),m=r.indentLines(s,PM);return u(),m}const o=r.createTracker(n),l=i.repeat(Math.max(xM(s,i)+1,3)),c=r.enter("codeFenced");let h=o.move(l);if(e.lang){const u=r.enter(`codeFencedLang${a}`);h+=o.move(r.safe(e.lang,{before:h,after:" ",encode:["`"],...o.current()})),u()}if(e.lang&&e.meta){const u=r.enter(`codeFencedMeta${a}`);h+=o.move(" "),h+=o.move(r.safe(e.meta,{before:h,after:`
637
+ `,encode:["`"],...o.current()})),u()}return h+=o.move(`
638
+ `),s&&(h+=o.move(s+`
639
+ `)),h+=o.move(l),c(),h}function PM(e,t,r){return(r?"":" ")+e}function Qp(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function TM(e,t,r,n){const i=Qp(r),s=i==='"'?"Quote":"Apostrophe",a=r.enter("definition");let o=r.enter("label");const l=r.createTracker(n);let c=l.move("[");return c+=l.move(r.safe(r.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(r.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=r.enter("destinationRaw"),c+=l.move(r.safe(e.url,{before:c,after:e.title?" ":`
640
+ `,...l.current()}))),o(),e.title&&(o=r.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(r.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),o()),a(),c}function DM(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Uo(e){return"&#x"+e.toString(16).toUpperCase()+";"}function gc(e,t,r){const n=vs(e),i=vs(t);return n===void 0?i===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}mS.peek=IM;function mS(e,t,r,n){const i=DM(r),s=r.enter("emphasis"),a=r.createTracker(n),o=a.move(i);let l=a.move(r.containerPhrasing(e,{after:i,before:o,...a.current()}));const c=l.charCodeAt(0),h=gc(n.before.charCodeAt(n.before.length-1),c,i);h.inside&&(l=Uo(c)+l.slice(1));const u=l.charCodeAt(l.length-1),m=gc(n.after.charCodeAt(0),u,i);m.inside&&(l=l.slice(0,-1)+Uo(u));const g=a.move(i);return s(),r.attentionEncodeSurroundingInfo={after:m.outside,before:h.outside},o+l+g}function IM(e,t,r){return r.options.emphasis||"*"}function NM(e,t){let r=!1;return Jp(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,ld}),!!((!e.depth||e.depth<3)&&Up(e)&&(t.options.setext||r))}function RM(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),s=r.createTracker(n);if(NM(e,r)){const h=r.enter("headingSetext"),u=r.enter("phrasing"),m=r.containerPhrasing(e,{...s.current(),before:`
641
+ `,after:`
642
+ `});return u(),h(),m+`
643
+ `+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
644
+ `))+1))}const a="#".repeat(i),o=r.enter("headingAtx"),l=r.enter("phrasing");s.move(a+" ");let c=r.containerPhrasing(e,{before:"# ",after:`
645
+ `,...s.current()});return/^[\t ]/.test(c)&&(c=Uo(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,r.options.closeAtx&&(c+=" "+a),l(),o(),c}gS.peek=OM;function gS(e){return e.value||""}function OM(){return"<"}vS.peek=MM;function vS(e,t,r,n){const i=Qp(r),s=i==='"'?"Quote":"Apostrophe",a=r.enter("image");let o=r.enter("label");const l=r.createTracker(n);let c=l.move("![");return c+=l.move(r.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(r.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=r.enter("destinationRaw"),c+=l.move(r.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=r.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(r.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),o()),c+=l.move(")"),a(),c}function MM(){return"!"}_S.peek=jM;function _S(e,t,r,n){const i=e.referenceType,s=r.enter("imageReference");let a=r.enter("label");const o=r.createTracker(n);let l=o.move("![");const c=r.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),a();const h=r.stack;r.stack=[],a=r.enter("reference");const u=r.safe(r.associationId(e),{before:l,after:"]",...o.current()});return a(),r.stack=h,s(),i==="full"||!c||c!==u?l+=o.move(u+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function jM(){return"!"}yS.peek=BM;function yS(e,t,r){let n=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++s<r.unsafe.length;){const a=r.unsafe[s],o=r.compilePattern(a);let l;if(a.atBreak)for(;l=o.exec(n);){let c=l.index;n.charCodeAt(c)===10&&n.charCodeAt(c-1)===13&&c--,n=n.slice(0,c)+" "+n.slice(l.index+1)}}return i+n+i}function BM(){return"`"}function wS(e,t){const r=Up(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}bS.peek=FM;function bS(e,t,r,n){const i=Qp(r),s=i==='"'?"Quote":"Apostrophe",a=r.createTracker(n);let o,l;if(wS(e,r)){const h=r.stack;r.stack=[],o=r.enter("autolink");let u=a.move("<");return u+=a.move(r.containerPhrasing(e,{before:u,after:">",...a.current()})),u+=a.move(">"),o(),r.stack=h,u}o=r.enter("link"),l=r.enter("label");let c=a.move("[");return c+=a.move(r.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=r.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(r.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=r.enter("destinationRaw"),c+=a.move(r.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=r.enter(`title${s}`),c+=a.move(" "+i),c+=a.move(r.safe(e.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),c+=a.move(")"),o(),c}function FM(e,t,r){return wS(e,r)?"<":"["}SS.peek=zM;function SS(e,t,r,n){const i=e.referenceType,s=r.enter("linkReference");let a=r.enter("label");const o=r.createTracker(n);let l=o.move("[");const c=r.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),a();const h=r.stack;r.stack=[],a=r.enter("reference");const u=r.safe(r.associationId(e),{before:l,after:"]",...o.current()});return a(),r.stack=h,s(),i==="full"||!c||c!==u?l+=o.move(u+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function zM(){return"["}function Zp(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function $M(e){const t=Zp(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function HM(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function CS(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function UM(e,t,r,n){const i=r.enter("list"),s=r.bulletCurrent;let a=e.ordered?HM(r):Zp(r);const o=e.ordered?a==="."?")":".":$M(r);let l=t&&r.bulletLastUsed?a===r.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&h&&(!h.children||!h.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(l=!0),CS(r)===a&&h){let u=-1;for(;++u<e.children.length;){const m=e.children[u];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=o),r.bulletCurrent=a;const c=r.containerFlow(e,n);return r.bulletLastUsed=a,r.bulletCurrent=s,i(),c}function WM(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function VM(e,t,r,n){const i=WM(r);let s=r.bulletCurrent||Zp(r);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=r.createTracker(n);o.move(s+" ".repeat(a-s.length)),o.shift(a);const l=r.enter("listItem"),c=r.indentLines(r.containerFlow(e,o.current()),h);return l(),c;function h(u,m,g){return m?(g?"":" ".repeat(a))+u:(g?s:s+" ".repeat(a-s.length))+u}}function KM(e,t,r,n){const i=r.enter("paragraph"),s=r.enter("phrasing"),a=r.containerPhrasing(e,n);return s(),i(),a}const GM=Xc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function qM(e,t,r,n){return(e.children.some(function(a){return GM(a)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function YM(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}kS.peek=JM;function kS(e,t,r,n){const i=YM(r),s=r.enter("strong"),a=r.createTracker(n),o=a.move(i+i);let l=a.move(r.containerPhrasing(e,{after:i,before:o,...a.current()}));const c=l.charCodeAt(0),h=gc(n.before.charCodeAt(n.before.length-1),c,i);h.inside&&(l=Uo(c)+l.slice(1));const u=l.charCodeAt(l.length-1),m=gc(n.after.charCodeAt(0),u,i);m.inside&&(l=l.slice(0,-1)+Uo(u));const g=a.move(i+i);return s(),r.attentionEncodeSurroundingInfo={after:m.outside,before:h.outside},o+l+g}function JM(e,t,r){return r.options.strong||"*"}function XM(e,t,r,n){return r.safe(e.value,n)}function QM(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ZM(e,t,r){const n=(CS(r)+(r.options.ruleSpaces?" ":"")).repeat(QM(r));return r.options.ruleSpaces?n.slice(0,-1):n}const xS={blockquote:SM,break:u0,code:LM,definition:TM,emphasis:mS,hardBreak:u0,heading:RM,html:gS,image:vS,imageReference:_S,inlineCode:yS,link:bS,linkReference:SS,list:UM,listItem:VM,paragraph:KM,root:qM,strong:kS,text:XM,thematicBreak:ZM};function e8(){return{enter:{table:t8,tableData:f0,tableHeader:f0,tableRow:n8},exit:{codeText:i8,table:r8,tableData:Cf,tableHeader:Cf,tableRow:Cf}}}function t8(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function r8(e){this.exit(e),this.data.inTable=void 0}function n8(e){this.enter({type:"tableRow",children:[]},e)}function Cf(e){this.exit(e)}function f0(e){this.enter({type:"tableCell",children:[]},e)}function i8(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,s8));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function s8(e,t){return t==="|"?t:e}function o8(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,s=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
646
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:a,tableCell:l,tableRow:o}};function a(g,y,_,v){return c(h(g,_,v),g.align)}function o(g,y,_,v){const d=u(g,_,v),f=c([d]);return f.slice(0,f.indexOf(`
647
+ `))}function l(g,y,_,v){const d=_.enter("tableCell"),f=_.enter("phrasing"),p=_.containerPhrasing(g,{...v,before:s,after:s});return f(),d(),p}function c(g,y){return wM(g,{align:y,alignDelimiters:n,padding:r,stringLength:i})}function h(g,y,_){const v=g.children;let d=-1;const f=[],p=y.enter("table");for(;++d<v.length;)f[d]=u(v[d],y,_);return p(),f}function u(g,y,_){const v=g.children;let d=-1;const f=[],p=y.enter("tableRow");for(;++d<v.length;)f[d]=l(v[d],g,y,_);return p(),f}function m(g,y,_){let v=xS.inlineCode(g,y,_);return _.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function a8(){return{exit:{taskListCheckValueChecked:h0,taskListCheckValueUnchecked:h0,paragraph:c8}}}function l8(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:u8}}}function h0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function c8(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.type==="text"){const i=t.children;let s=-1,a;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){a=o;break}}a===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function u8(e,t,r,n){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=r.createTracker(n);s&&o.move(a);let l=xS.listItem(e,t,r,{...n,...o.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(h){return h+a}}function f8(){return[UO(),uM(),pM(),e8(),a8()]}function h8(e){return{extensions:[WO(),fM(e),mM(),o8(e),l8()]}}const d8={tokenize:y8,partial:!0},ES={tokenize:w8,partial:!0},AS={tokenize:b8,partial:!0},LS={tokenize:S8,partial:!0},p8={tokenize:C8,partial:!0},PS={name:"wwwAutolink",tokenize:v8,previous:DS},TS={name:"protocolAutolink",tokenize:_8,previous:IS},ln={name:"emailAutolink",tokenize:g8,previous:NS},Fr={};function m8(){return{text:Fr}}let Yn=48;for(;Yn<123;)Fr[Yn]=ln,Yn++,Yn===58?Yn=65:Yn===91&&(Yn=97);Fr[43]=ln;Fr[45]=ln;Fr[46]=ln;Fr[95]=ln;Fr[72]=[ln,TS];Fr[104]=[ln,TS];Fr[87]=[ln,PS];Fr[119]=[ln,PS];function g8(e,t,r){const n=this;let i,s;return a;function a(u){return!hd(u)||!NS.call(n,n.previous)||em(n.events)?r(u):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(u))}function o(u){return hd(u)?(e.consume(u),o):u===64?(e.consume(u),l):r(u)}function l(u){return u===46?e.check(p8,h,c)(u):u===45||u===95||Nt(u)?(s=!0,e.consume(u),l):h(u)}function c(u){return e.consume(u),i=!0,l}function h(u){return s&&i&&jt(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(u)):r(u)}}function v8(e,t,r){const n=this;return i;function i(a){return a!==87&&a!==119||!DS.call(n,n.previous)||em(n.events)?r(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(d8,e.attempt(ES,e.attempt(AS,s),r),r)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function _8(e,t,r){const n=this;let i="",s=!1;return a;function a(u){return(u===72||u===104)&&IS.call(n,n.previous)&&!em(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(u),e.consume(u),o):r(u)}function o(u){if(jt(u)&&i.length<5)return i+=String.fromCodePoint(u),e.consume(u),o;if(u===58){const m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(u),l}return r(u)}function l(u){return u===47?(e.consume(u),s?c:(s=!0,l)):r(u)}function c(u){return u===null||dc(u)||Qe(u)||pi(u)||qc(u)?r(u):e.attempt(ES,e.attempt(AS,h),r)(u)}function h(u){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(u)}}function y8(e,t,r){let n=0;return i;function i(a){return(a===87||a===119)&&n<3?(n++,e.consume(a),i):a===46&&n===3?(e.consume(a),s):r(a)}function s(a){return a===null?r(a):t(a)}}function w8(e,t,r){let n,i,s;return a;function a(c){return c===46||c===95?e.check(LS,l,o)(c):c===null||Qe(c)||pi(c)||c!==45&&qc(c)?l(c):(s=!0,e.consume(c),a)}function o(c){return c===95?n=!0:(i=n,n=void 0),e.consume(c),a}function l(c){return i||n||!s?r(c):t(c)}}function b8(e,t){let r=0,n=0;return i;function i(a){return a===40?(r++,e.consume(a),i):a===41&&n<r?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(LS,t,s)(a):a===null||Qe(a)||pi(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&n++,e.consume(a),i}}function S8(e,t,r){return n;function n(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),n):o===38?(e.consume(o),s):o===93?(e.consume(o),i):o===60||o===null||Qe(o)||pi(o)?t(o):r(o)}function i(o){return o===null||o===40||o===91||Qe(o)||pi(o)?t(o):n(o)}function s(o){return jt(o)?a(o):r(o)}function a(o){return o===59?(e.consume(o),n):jt(o)?(e.consume(o),a):r(o)}}function C8(e,t,r){return n;function n(s){return e.consume(s),i}function i(s){return Nt(s)?r(s):t(s)}}function DS(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Qe(e)}function IS(e){return!jt(e)}function NS(e){return!(e===47||hd(e))}function hd(e){return e===43||e===45||e===46||e===95||Nt(e)}function em(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const k8={tokenize:I8,partial:!0};function x8(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:P8,continuation:{tokenize:T8},exit:D8}},text:{91:{name:"gfmFootnoteCall",tokenize:L8},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:E8,resolveTo:A8}}}}function E8(e,t,r){const n=this;let i=n.events.length;const s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a;for(;i--;){const l=n.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!a||!a._balanced)return r(l);const c=Cr(n.sliceSerialize({start:a.end,end:n.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?r(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function A8(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...o),e}function L8(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s=0,a;return o;function o(u){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),l}function l(u){return u!==94?r(u):(e.enter("gfmFootnoteCallMarker"),e.consume(u),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(u){if(s>999||u===93&&!a||u===null||u===91||Qe(u))return r(u);if(u===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(Cr(n.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(u)}return Qe(u)||(a=!0),s++,e.consume(u),u===92?h:c}function h(u){return u===91||u===92||u===93?(e.consume(u),s++,c):c(u)}}function P8(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s,a=0,o;return l;function l(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):r(y)}function h(y){if(a>999||y===93&&!o||y===null||y===91||Qe(y))return r(y);if(y===93){e.exit("chunkString");const _=e.exit("gfmFootnoteDefinitionLabelString");return s=Cr(n.sliceSerialize(_)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Qe(y)||(o=!0),a++,e.consume(y),y===92?u:h}function u(y){return y===91||y===92||y===93?(e.consume(y),a++,h):h(y)}function m(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),i.includes(s)||i.push(s),He(e,g,"gfmFootnoteDefinitionWhitespace")):r(y)}function g(y){return t(y)}}function T8(e,t,r){return e.check(ia,t,e.attempt(k8,t,r))}function D8(e){e.exit("gfmFootnoteDefinition")}function I8(e,t,r){const n=this;return He(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=n.events[n.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):r(s)}}function N8(e){let r=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:s,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(a,o){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},u={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},m=[["enter",h,o],["enter",a[c][1],o],["exit",a[c][1],o],["enter",u,o]],g=o.parser.constructs.insideSpan.null;g&&rr(m,m.length,0,Yc(g,a.slice(c+1,l),o)),rr(m,m.length,0,[["exit",u,o],["enter",a[l][1],o],["exit",a[l][1],o],["exit",h,o]]),rr(a,c-1,l-c+3,m),l=c+m.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function s(a,o,l){const c=this.previous,h=this.events;let u=0;return m;function m(y){return c===126&&h[h.length-1][1].type!=="characterEscape"?l(y):(a.enter("strikethroughSequenceTemporary"),g(y))}function g(y){const _=vs(c);if(y===126)return u>1?l(y):(a.consume(y),u++,g);if(u<2&&!r)return l(y);const v=a.exit("strikethroughSequenceTemporary"),d=vs(y);return v._open=!d||d===2&&!!_,v._close=!_||_===2&&!!d,o(y)}}}class R8{constructor(){this.map=[]}add(t,r,n){O8(this,t,r,n)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push(t.slice()),t.length=0;let i=n.pop();for(;i;){for(const s of i)t.push(s);i=n.pop()}this.map.length=0}}function O8(e,t,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=r,e.map[i][2].push(...n);return}i+=1}e.map.push([t,r,n])}}function M8(e,t){let r=!1;const n=[];for(;t<e.length;){const i=e[t];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=n.length-1;n[s]=n[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function j8(){return{flow:{null:{name:"table",tokenize:B8,resolveAll:F8}}}}function B8(e,t,r){const n=this;let i=0,s=0,a;return o;function o(T){let j=n.events.length-1;for(;j>-1;){const z=n.events[j][1].type;if(z==="lineEnding"||z==="linePrefix")j--;else break}const M=j>-1?n.events[j][1].type:null,O=M==="tableHead"||M==="tableRow"?b:l;return O===b&&n.parser.lazy[n.now().line]?r(T):O(T)}function l(T){return e.enter("tableHead"),e.enter("tableRow"),c(T)}function c(T){return T===124||(a=!0,s+=1),h(T)}function h(T){return T===null?r(T):Le(T)?s>1?(s=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),g):r(T):je(T)?He(e,h,"whitespace")(T):(s+=1,a&&(a=!1,i+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),u(T)))}function u(T){return T===null||T===124||Qe(T)?(e.exit("data"),h(T)):(e.consume(T),T===92?m:u)}function m(T){return T===92||T===124?(e.consume(T),u):u(T)}function g(T){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(T):(e.enter("tableDelimiterRow"),a=!1,je(T)?He(e,y,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):y(T))}function y(T){return T===45||T===58?v(T):T===124?(a=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),_):S(T)}function _(T){return je(T)?He(e,v,"whitespace")(T):v(T)}function v(T){return T===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),d):T===45?(s+=1,d(T)):T===null||Le(T)?w(T):S(T)}function d(T){return T===45?(e.enter("tableDelimiterFiller"),f(T)):S(T)}function f(T){return T===45?(e.consume(T),f):T===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),p):(e.exit("tableDelimiterFiller"),p(T))}function p(T){return je(T)?He(e,w,"whitespace")(T):w(T)}function w(T){return T===124?y(T):T===null||Le(T)?!a||i!==s?S(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):S(T)}function S(T){return r(T)}function b(T){return e.enter("tableRow"),x(T)}function x(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),x):T===null||Le(T)?(e.exit("tableRow"),t(T)):je(T)?He(e,x,"whitespace")(T):(e.enter("data"),C(T))}function C(T){return T===null||T===124||Qe(T)?(e.exit("data"),x(T)):(e.consume(T),T===92?A:C)}function A(T){return T===92||T===124?(e.consume(T),C):C(T)}}function F8(e,t){let r=-1,n=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,c,h,u;const m=new R8;for(;++r<e.length;){const g=e[r],y=g[1];g[0]==="enter"?y.type==="tableHead"?(o=!1,l!==0&&(d0(m,t,l,c,h),h=void 0,l=0),c={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},m.add(r,0,[["enter",c,t]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(n=!0,u=void 0,s=[0,0,0,0],a=[0,r+1,0,0],o&&(o=!1,h={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},m.add(r,0,[["enter",h,t]])),i=y.type==="tableDelimiterRow"?2:h?3:1):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(n=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],u=nl(m,t,s,i,void 0,u),s=[0,0,0,0]),a[2]=r)):y.type==="tableCellDivider"&&(n?n=!1:(s[1]!==0&&(a[0]=a[1],u=nl(m,t,s,i,void 0,u)),s=a,a=[s[1],r,0,0])):y.type==="tableHead"?(o=!0,l=r):y.type==="tableRow"||y.type==="tableDelimiterRow"?(l=r,s[1]!==0?(a[0]=a[1],u=nl(m,t,s,i,r,u)):a[1]!==0&&(u=nl(m,t,a,i,r,u)),i=0):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(a[3]=r)}for(l!==0&&d0(m,t,l,c,h),m.consume(t.events),r=-1;++r<t.events.length;){const g=t.events[r];g[0]==="enter"&&g[1].type==="table"&&(g[1]._align=M8(t.events,r))}return e}function nl(e,t,r,n,i,s){const a=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",o="tableContent";r[0]!==0&&(s.end=Object.assign({},Mi(t.events,r[0])),e.add(r[0],0,[["exit",s,t]]));const l=Mi(t.events,r[1]);if(s={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(r[1],0,[["enter",s,t]]),r[2]!==0){const c=Mi(t.events,r[2]),h=Mi(t.events,r[3]),u={type:o,start:Object.assign({},c),end:Object.assign({},h)};if(e.add(r[2],0,[["enter",u,t]]),n!==2){const m=t.events[r[2]],g=t.events[r[3]];if(m[1].end=Object.assign({},g[1].end),m[1].type="chunkText",m[1].contentType="text",r[3]>r[2]+1){const y=r[2]+1,_=r[3]-r[2]-1;e.add(y,_,[])}}e.add(r[3]+1,0,[["exit",u,t]])}return i!==void 0&&(s.end=Object.assign({},Mi(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function d0(e,t,r,n,i){const s=[],a=Mi(t.events,r);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),n.end=Object.assign({},a),s.push(["exit",n,t]),e.add(r+1,0,s)}function Mi(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const z8={name:"tasklistCheck",tokenize:H8};function $8(){return{text:{91:z8}}}function H8(e,t,r){const n=this;return i;function i(l){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return Qe(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):r(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):r(l)}function o(l){return Le(l)?t(l):je(l)?e.check({tokenize:U8},t,r)(l):r(l)}}function U8(e,t,r){return He(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function W8(e){return Ub([m8(),x8(),N8(e),j8(),$8()])}const V8={};function kf(e){const t=this,r=e||V8,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),s=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(W8(r)),s.push(f8()),a.push(h8(r))}function K8({t:e,activePane:t,listRef:r,showChatInfoPanel:n,repoTitle:i,activeBranchLabel:s,shortSha:a,activeCommit:o,showProviderMeta:l,activeProviderLabel:c,activeModelLabel:h,showInternetAccess:u,showGitCredentialsShared:m,activeTaskLabel:g,currentMessages:y,chatHistoryWindow:_,activeChatKey:v,setShowOlderMessagesByTab:d,showChatCommands:f,showToolResults:p,commandPanelOpen:w,setCommandPanelOpen:S,toolResultPanelOpen:b,setToolResultPanelOpen:x,renderMessageAttachments:C,currentProcessing:A,currentInteractionBlocked:T,currentActivity:j,extractVibe80Blocks:M,handleChoiceClick:O,choiceSelections:z,openVibe80Form:$,copyTextToClipboard:Y,openFileInExplorer:X,setInput:V,inputRef:N,markBacklogItemDone:P,setBacklogMessagePage:R,activeWorktreeId:I,BACKLOG_PAGE_SIZE:L,MAX_USER_DISPLAY_LENGTH:W,getTruncatedText:J}){return E.jsxs("main",{className:`chat ${t==="chat"?"":"is-hidden"}`,children:[E.jsx("div",{className:"chat-scroll",ref:r,children:E.jsx("div",{className:`chat-scroll-inner ${n?"has-meta":""}`,children:E.jsxs("div",{className:`chat-history-grid ${n?"has-meta":""}`,children:[n&&E.jsx("div",{className:"chat-meta-rail",children:E.jsxs("div",{className:"chat-meta-card",children:[E.jsxs("div",{className:"chat-meta-section chat-meta-repo",children:[E.jsx("div",{className:"chat-meta-repo-title",children:E.jsx("span",{className:"chat-meta-repo-name",children:i})}),E.jsxs("div",{className:"chat-meta-repo-branch-line",children:[E.jsx("span",{className:"chat-meta-repo-icon","aria-hidden":"true",children:E.jsx(Ne,{icon:FD})}),E.jsx("span",{className:"chat-meta-repo-branch",children:s})]}),E.jsxs("div",{className:"chat-meta-repo-commit",children:[E.jsx("span",{className:"chat-meta-hash",children:a}),E.jsx("span",{className:"chat-meta-message",children:(o==null?void 0:o.message)||""})]})]}),l&&E.jsxs("div",{className:"chat-meta-section chat-meta-provider",children:[E.jsx("span",{className:"chat-meta-provider-icon","aria-hidden":"true",children:E.jsx(Ne,{icon:r6})}),E.jsx("span",{className:"chat-meta-provider-label",children:c}),E.jsx("span",{className:"chat-meta-provider-sep",children:"•"}),E.jsx("span",{className:"chat-meta-provider-model",children:h})]}),(u||m||g)&&E.jsxs("div",{className:"chat-meta-section chat-meta-permissions",children:[u&&E.jsxs("div",{className:"chat-meta-permission",children:[E.jsx("span",{className:"chat-meta-permission-icon is-internet","aria-hidden":"true",children:E.jsx(Ne,{icon:QD})}),E.jsx("span",{children:e("Internet access enabled")})]}),m&&E.jsxs("div",{className:"chat-meta-permission",children:[E.jsx("span",{className:"chat-meta-permission-icon is-credentials","aria-hidden":"true",children:E.jsx(Ne,{icon:zD})}),E.jsx("span",{children:e("Git credentials shared")})]}),g&&E.jsxs("span",{className:"chat-meta-task",children:[E.jsx("span",{className:"chat-meta-task-loader","aria-hidden":"true"}),E.jsx(yf,{className:"chat-meta-task-text",remarkPlugins:[kf],components:{p:({children:G})=>E.jsx("span",{children:G})},children:g})]})]})]})}),E.jsxs("div",{className:"chat-history",children:[y.length===0&&E.jsx("div",{className:"empty",children:E.jsx("p",{children:e("Send a message to start a session.")})}),_.hiddenCount>0&&E.jsx("button",{type:"button",className:"chat-history-reveal",onClick:()=>d(G=>({...G,[v]:!0})),children:e("View previous messages ({{count}})",{count:_.hiddenCount})}),_.visibleMessages.map(G=>{var D,U;if((G==null?void 0:G.groupType)==="commandExecution")return E.jsx("div",{className:"bubble command-execution",children:G.items.map(H=>{const ee=e("Command: {{command}}",{command:H.command||e("Command")}),Z=H.status!=="completed",de=H.isExpandable||!!H.output,ge=E.jsxs(E.Fragment,{children:[Z&&E.jsxs("span",{className:"loader command-execution-loader",title:e("Execution in progress"),children:[E.jsx("span",{className:"dot"}),E.jsx("span",{className:"dot"}),E.jsx("span",{className:"dot"})]}),E.jsx("span",{className:"command-execution-title",children:ee})]});return E.jsx("div",{children:de?E.jsxs("details",{className:"command-execution-panel",open:!!w[H.id],onToggle:ve=>{const Ee=ve.currentTarget.open;S(ue=>({...ue,[H.id]:Ee}))},children:[E.jsx("summary",{className:"command-execution-summary",children:ge}),E.jsx("pre",{className:"command-execution-output",children:H.output||""})]}):E.jsx("div",{className:"command-execution-summary is-static",children:ge})},H.id)})},G.id);if((G==null?void 0:G.groupType)==="toolResult")return E.jsx("div",{className:"bubble command-execution",children:G.items.map(H=>{var Ee,ue,Ae;const ee=e("Tool: {{tool}}",{tool:((Ee=H.toolResult)==null?void 0:Ee.name)||((ue=H.toolResult)==null?void 0:ue.tool)||"Tool"}),Z=((Ae=H.toolResult)==null?void 0:Ae.output)||H.text||"",de=!!Z,ge=E.jsxs("span",{className:"command-execution-title",children:[E.jsx("span",{className:"command-execution-tool-icon","aria-hidden":"true",children:E.jsx(Ne,{icon:VD})}),E.jsx("span",{children:ee})]}),ve=`tool-${H.id}`;return E.jsx("div",{children:de?E.jsxs("details",{className:"command-execution-panel",open:!!b[ve],onToggle:Fe=>{const Re=Fe.currentTarget.open;x(We=>({...We,[ve]:Re}))},children:[E.jsx("summary",{className:"command-execution-summary",children:ge}),E.jsx("pre",{className:"command-execution-output",children:Z})]}):E.jsx("div",{className:"command-execution-summary is-static",children:ge})},H.id)})},G.id);if((G==null?void 0:G.type)==="backlog_view"){const ee=(Array.isArray((D=G.backlog)==null?void 0:D.items)?G.backlog.items:[]).filter(Ae=>!(Ae!=null&&Ae.done)),Z=Math.max(1,Math.ceil(ee.length/L)),de=Number.isFinite((U=G.backlog)==null?void 0:U.page)?G.backlog.page:0,ge=Math.min(Math.max(0,de),Z-1),ve=ge*L,Ee=ee.slice(ve,ve+L),ue=I&&I!=="main"?I:"main";return E.jsx("div",{className:"bubble backlog",children:E.jsxs("details",{className:"command-execution-panel backlog-panel",open:!0,children:[E.jsx("summary",{className:"command-execution-summary",children:E.jsx("span",{className:"command-execution-title",children:e("Backlog")})}),E.jsxs("div",{className:"backlog-view",children:[Ee.length===0?E.jsx("div",{className:"backlog-empty",children:e("No pending tasks at the moment.")}):E.jsx("div",{className:"backlog-list",children:Ee.map(Ae=>E.jsxs("div",{className:"backlog-row",children:[E.jsx("input",{type:"checkbox",className:"backlog-checkbox",onChange:()=>P(Ae.id)}),E.jsx("button",{type:"button",className:"backlog-text",title:Ae.text,onClick:()=>{var Fe;V(Ae.text||""),(Fe=N.current)==null||Fe.focus()},children:Ae.text})]},Ae.id))}),Z>1?E.jsxs("div",{className:"backlog-pagination",children:[E.jsx("button",{type:"button",className:"backlog-page-button",disabled:ge===0,onClick:()=>R(ue,G.id,Math.max(0,ge-1)),children:e("Previous")}),E.jsxs("span",{className:"backlog-page-status",children:[ge+1," / ",Z]}),E.jsx("button",{type:"button",className:"backlog-page-button",disabled:ge>=Z-1,onClick:()=>R(ue,G.id,Math.min(Z-1,ge+1)),children:e("Next")})]}):null]})]})},G.id)}if(G.role==="user"&&(G.text||"").length>W){const H=J(G.text,W);return E.jsxs("div",{className:`bubble ${G.role}`,children:[E.jsx("div",{className:"plain-text",children:H}),C(G.attachments)]},G.id)}return E.jsx("div",{className:`bubble ${G.role}`,children:(()=>{const H=G.text||"",ee=H.startsWith("⚠️"),Z=H.replace(/^⚠️\s*/,""),{cleanedText:de,blocks:ge,filerefs:ve}=M(ee?Z:H,e),Ee=E.jsx(yf,{remarkPlugins:[kf],components:{a:({node:ue,...Ae})=>E.jsx("a",{...Ae,target:"_blank",rel:"noopener noreferrer"}),code:({node:ue,inline:Ae,className:Fe,children:Re,...We})=>{const Oe=(Array.isArray(Re)?Re.join(""):String(Re)).replace(/\n$/,"");if(!Ae)return E.jsx("code",{className:Fe,...We,children:Re});const Pe=Oe.trim(),Ce=!!Pe&&!Pe.startsWith("/")&&!Pe.startsWith("~")&&!/^[a-zA-Z]+:\/\//.test(Pe)&&!Pe.includes("\\")&&!Pe.includes(" ")&&(Pe.startsWith("./")||Pe.startsWith("../")||Pe.includes("/")||/^[\w.-]+$/.test(Pe));return E.jsxs("span",{className:`inline-code${Ce?" inline-code--link":""}`,children:[Ce?E.jsx("button",{type:"button",className:"inline-code-link",onClick:Q=>{var oe;Q.preventDefault(),Q.stopPropagation(),V(`/open ${Pe}`),(oe=N.current)==null||oe.focus()},children:E.jsx("code",{className:Fe,...We,children:Oe})}):E.jsx("code",{className:Fe,...We,children:Oe}),E.jsx("button",{type:"button",className:"code-copy","aria-label":e("Copy code"),title:e("Copy"),onClick:Q=>{Q.preventDefault(),Q.stopPropagation(),Y(Oe)},children:E.jsx(Ne,{icon:ed})})]})}},children:de});return E.jsxs(E.Fragment,{children:[ee?E.jsxs("div",{className:"warning-message",children:[E.jsx("span",{className:"warning-icon","aria-hidden":"true",children:E.jsx(Ne,{icon:JD})}),E.jsx("div",{className:"warning-body",children:Ee})]}):Ee,ve.length?E.jsx("ul",{className:"fileref-list",children:ve.map(ue=>E.jsx("li",{className:"fileref-item",children:E.jsx("button",{type:"button",className:"fileref-link",onClick:Ae=>{Ae.preventDefault(),Ae.stopPropagation(),X(ue)},children:ue})},`${G.id}-fileref-${ue}`))}):null,ge.map((ue,Ae)=>{const Fe=`${G.id}-${Ae}`;if(ue.type==="form")return E.jsx("div",{className:"vibe80-form",children:E.jsx("button",{type:"button",className:"vibe80-form-button",onClick:()=>$(ue,Fe),children:ue.question||e("Open form")})},Fe);const Re=z[Fe],We=ue.choices.map((Pe,Ce)=>({choice:Pe,choiceIndex:Ce})),ot=Re===void 0?We:[We.find(({choiceIndex:Pe})=>Pe===Re),...We.filter(({choiceIndex:Pe})=>Pe!==Re)].filter(Boolean),Oe=ue.type==="yesno";return E.jsxs("div",{className:`choices ${Oe?"is-inline":""}`,children:[ue.question&&E.jsx("div",{className:"choices-question",children:ue.question}),E.jsx("div",{className:`choices-list ${Re!==void 0?"is-selected":""} ${Oe?"is-inline":""}`,children:ot.map(({choice:Pe,choiceIndex:Ce})=>{const Q=Re===Ce;return E.jsx("button",{type:"button",onClick:()=>O(Pe,Fe,Ce),disabled:T,className:`choice-button ${Q?"is-selected":Re!==void 0?"is-muted":""}`,children:E.jsx(yf,{remarkPlugins:[kf],components:{p:({node:oe,...ye})=>E.jsx("span",{...ye}),a:({node:oe,...ye})=>E.jsx("a",{...ye,target:"_blank",rel:"noopener noreferrer"})},children:Pe})},`${Fe}-${Ce}`)})})]},Fe)}),C(G.attachments)]})})()},G.id)})]})]})})}),A&&E.jsx("div",{className:"bubble assistant typing",children:E.jsxs("div",{className:"typing-indicator",children:[E.jsxs("div",{className:"loader",title:j||e("Processing..."),children:[E.jsx("span",{className:"dot"}),E.jsx("span",{className:"dot"}),E.jsx("span",{className:"dot"})]}),E.jsx("span",{className:"typing-text",children:j||e("Processing...")})]})})]})}var p0=1,G8=.9,q8=.8,Y8=.17,xf=.1,Ef=.999,J8=.9999,X8=.99,Q8=/[\\\/_+.#"@\[\(\{&]/,Z8=/[\\\/_+.#"@\[\(\{&]/g,ej=/[\s-]/,RS=/[\s-]/g;function dd(e,t,r,n,i,s,a){if(s===t.length)return i===e.length?p0:X8;var o=`${i},${s}`;if(a[o]!==void 0)return a[o];for(var l=n.charAt(s),c=r.indexOf(l,i),h=0,u,m,g,y;c>=0;)u=dd(e,t,r,n,c+1,s+1,a),u>h&&(c===i?u*=p0:Q8.test(e.charAt(c-1))?(u*=q8,g=e.slice(i,c-1).match(Z8),g&&i>0&&(u*=Math.pow(Ef,g.length))):ej.test(e.charAt(c-1))?(u*=G8,y=e.slice(i,c-1).match(RS),y&&i>0&&(u*=Math.pow(Ef,y.length))):(u*=Y8,i>0&&(u*=Math.pow(Ef,c-i))),e.charAt(c)!==t.charAt(s)&&(u*=J8)),(u<xf&&r.charAt(c-1)===n.charAt(s+1)||n.charAt(s+1)===n.charAt(s)&&r.charAt(c-1)!==n.charAt(s))&&(m=dd(e,t,r,n,c+1,s+2,a),m*xf>u&&(u=m*xf)),u>h&&(h=u),c=r.indexOf(l,c+1);return a[o]=h,h}function m0(e){return e.toLowerCase().replace(RS," ")}function tj(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,dd(e,t,m0(e),m0(t),0,0,{})}function Nn(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function g0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Fn(...e){return t=>{let r=!1;const n=e.map(i=>{const s=g0(i,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let i=0;i<n.length;i++){const s=n[i];typeof s=="function"?s():g0(e[i],null)}}}}function Si(...e){return k.useCallback(Fn(...e),e)}function rj(e,t){const r=k.createContext(t),n=s=>{const{children:a,...o}=s,l=k.useMemo(()=>o,Object.values(o));return E.jsx(r.Provider,{value:l,children:a})};n.displayName=e+"Provider";function i(s){const a=k.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,i]}function nj(e,t=[]){let r=[];function n(s,a){const o=k.createContext(a),l=r.length;r=[...r,a];const c=u=>{var d;const{scope:m,children:g,...y}=u,_=((d=m==null?void 0:m[e])==null?void 0:d[l])||o,v=k.useMemo(()=>y,Object.values(y));return E.jsx(_.Provider,{value:v,children:g})};c.displayName=s+"Provider";function h(u,m){var _;const g=((_=m==null?void 0:m[e])==null?void 0:_[l])||o,y=k.useContext(g);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${u}\` must be used within \`${s}\``)}return[c,h]}const i=()=>{const s=r.map(a=>k.createContext(a));return function(o){const l=(o==null?void 0:o[e])||s;return k.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])}};return i.scopeName=e,[n,ij(i,...t)]}function ij(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=n.reduce((o,{useScope:l,scopeName:c})=>{const u=l(s)[`__scope${c}`];return{...o,...u}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}var Wo=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},sj=bd[" useId ".trim().toString()]||(()=>{}),oj=0;function Jr(e){const[t,r]=k.useState(sj());return Wo(()=>{r(n=>n??String(oj++))},[e]),t?`radix-${t}`:""}var aj=bd[" useInsertionEffect ".trim().toString()]||Wo;function lj({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,s,a]=cj({defaultProp:t,onChange:r}),o=e!==void 0,l=o?e:i;{const h=k.useRef(e!==void 0);k.useEffect(()=>{const u=h.current;u!==o&&console.warn(`${n} is changing from ${u?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=o},[o,n])}const c=k.useCallback(h=>{var u;if(o){const m=uj(h)?h(e):h;m!==e&&((u=a.current)==null||u.call(a,m))}else s(h)},[o,e,s,a]);return[l,c]}function cj({defaultProp:e,onChange:t}){const[r,n]=k.useState(e),i=k.useRef(r),s=k.useRef(t);return aj(()=>{s.current=t},[t]),k.useEffect(()=>{var a;i.current!==r&&((a=s.current)==null||a.call(s,r),i.current=r)},[r,i]),[r,n,s]}function uj(e){return typeof e=="function"}function oa(e){const t=fj(e),r=k.forwardRef((n,i)=>{const{children:s,...a}=n,o=k.Children.toArray(s),l=o.find(dj);if(l){const c=l.props.children,h=o.map(u=>u===l?k.Children.count(c)>1?k.Children.only(null):k.isValidElement(c)?c.props.children:null:u);return E.jsx(t,{...a,ref:i,children:k.isValidElement(c)?k.cloneElement(c,void 0,h):null})}return E.jsx(t,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function fj(e){const t=k.forwardRef((r,n)=>{const{children:i,...s}=r;if(k.isValidElement(i)){const a=mj(i),o=pj(s,i.props);return i.type!==k.Fragment&&(o.ref=n?Fn(n,a):a),k.cloneElement(i,o)}return k.Children.count(i)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hj=Symbol("radix.slottable");function dj(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hj}function pj(e,t){const r={...t};for(const n in t){const i=e[n],s=t[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...o)=>{const l=s(...o);return i(...o),l}:i&&(r[n]=i):n==="style"?r[n]={...i,...s}:n==="className"&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function mj(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var gj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],OS=gj.reduce((e,t)=>{const r=oa(`Primitive.${t}`),n=k.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function vj(e,t){e&&hp.flushSync(()=>e.dispatchEvent(t))}function Vo(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function _j(e,t=globalThis==null?void 0:globalThis.document){const r=Vo(e);k.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var yj="DismissableLayer",pd="dismissableLayer.update",wj="dismissableLayer.pointerDownOutside",bj="dismissableLayer.focusOutside",v0,MS=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jS=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:o,...l}=e,c=k.useContext(MS),[h,u]=k.useState(null),m=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=k.useState({}),y=Si(t,x=>u(x)),_=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),d=_.indexOf(v),f=h?_.indexOf(h):-1,p=c.layersWithOutsidePointerEventsDisabled.size>0,w=f>=d,S=kj(x=>{const C=x.target,A=[...c.branches].some(T=>T.contains(C));!w||A||(i==null||i(x),a==null||a(x),x.defaultPrevented||o==null||o())},m),b=xj(x=>{const C=x.target;[...c.branches].some(T=>T.contains(C))||(s==null||s(x),a==null||a(x),x.defaultPrevented||o==null||o())},m);return _j(x=>{f===c.layers.size-1&&(n==null||n(x),!x.defaultPrevented&&o&&(x.preventDefault(),o()))},m),k.useEffect(()=>{if(h)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(v0=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(h)),c.layers.add(h),_0(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=v0)}},[h,m,r,c]),k.useEffect(()=>()=>{h&&(c.layers.delete(h),c.layersWithOutsidePointerEventsDisabled.delete(h),_0())},[h,c]),k.useEffect(()=>{const x=()=>g({});return document.addEventListener(pd,x),()=>document.removeEventListener(pd,x)},[]),E.jsx(OS.div,{...l,ref:y,style:{pointerEvents:p?w?"auto":"none":void 0,...e.style},onFocusCapture:Nn(e.onFocusCapture,b.onFocusCapture),onBlurCapture:Nn(e.onBlurCapture,b.onBlurCapture),onPointerDownCapture:Nn(e.onPointerDownCapture,S.onPointerDownCapture)})});jS.displayName=yj;var Sj="DismissableLayerBranch",Cj=k.forwardRef((e,t)=>{const r=k.useContext(MS),n=k.useRef(null),i=Si(t,n);return k.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),E.jsx(OS.div,{...e,ref:i})});Cj.displayName=Sj;function kj(e,t=globalThis==null?void 0:globalThis.document){const r=Vo(e),n=k.useRef(!1),i=k.useRef(()=>{});return k.useEffect(()=>{const s=o=>{if(o.target&&!n.current){let l=function(){BS(wj,r,c,{discrete:!0})};const c={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function xj(e,t=globalThis==null?void 0:globalThis.document){const r=Vo(e),n=k.useRef(!1);return k.useEffect(()=>{const i=s=>{s.target&&!n.current&&BS(bj,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function _0(){const e=new CustomEvent(pd);document.dispatchEvent(e)}function BS(e,t,r,{discrete:n}){const i=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?vj(i,s):i.dispatchEvent(s)}var Ej=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Aj=Ej.reduce((e,t)=>{const r=oa(`Primitive.${t}`),n=k.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Af="focusScope.autoFocusOnMount",Lf="focusScope.autoFocusOnUnmount",y0={bubbles:!1,cancelable:!0},Lj="FocusScope",FS=k.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=e,[o,l]=k.useState(null),c=Vo(i),h=Vo(s),u=k.useRef(null),m=Si(t,_=>l(_)),g=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(n){let _=function(p){if(g.paused||!o)return;const w=p.target;o.contains(w)?u.current=w:gn(u.current,{select:!0})},v=function(p){if(g.paused||!o)return;const w=p.relatedTarget;w!==null&&(o.contains(w)||gn(u.current,{select:!0}))},d=function(p){if(document.activeElement===document.body)for(const S of p)S.removedNodes.length>0&&gn(o)};document.addEventListener("focusin",_),document.addEventListener("focusout",v);const f=new MutationObserver(d);return o&&f.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",v),f.disconnect()}}},[n,o,g.paused]),k.useEffect(()=>{if(o){b0.add(g);const _=document.activeElement;if(!o.contains(_)){const d=new CustomEvent(Af,y0);o.addEventListener(Af,c),o.dispatchEvent(d),d.defaultPrevented||(Pj(Rj(zS(o)),{select:!0}),document.activeElement===_&&gn(o))}return()=>{o.removeEventListener(Af,c),setTimeout(()=>{const d=new CustomEvent(Lf,y0);o.addEventListener(Lf,h),o.dispatchEvent(d),d.defaultPrevented||gn(_??document.body,{select:!0}),o.removeEventListener(Lf,h),b0.remove(g)},0)}}},[o,c,h,g]);const y=k.useCallback(_=>{if(!r&&!n||g.paused)return;const v=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,d=document.activeElement;if(v&&d){const f=_.currentTarget,[p,w]=Tj(f);p&&w?!_.shiftKey&&d===w?(_.preventDefault(),r&&gn(p,{select:!0})):_.shiftKey&&d===p&&(_.preventDefault(),r&&gn(w,{select:!0})):d===f&&_.preventDefault()}},[r,n,g.paused]);return E.jsx(Aj.div,{tabIndex:-1,...a,ref:m,onKeyDown:y})});FS.displayName=Lj;function Pj(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(gn(n,{select:t}),document.activeElement!==r)return}function Tj(e){const t=zS(e),r=w0(t,e),n=w0(t.reverse(),e);return[r,n]}function zS(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function w0(e,t){for(const r of e)if(!Dj(r,{upTo:t}))return r}function Dj(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ij(e){return e instanceof HTMLInputElement&&"select"in e}function gn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Ij(e)&&t&&e.select()}}var b0=Nj();function Nj(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=S0(e,t),e.unshift(t)},remove(t){var r;e=S0(e,t),(r=e[0])==null||r.resume()}}}function S0(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Rj(e){return e.filter(t=>t.tagName!=="A")}var Oj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Mj=Oj.reduce((e,t)=>{const r=oa(`Primitive.${t}`),n=k.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),jj="Portal",$S=k.forwardRef((e,t)=>{var o;const{container:r,...n}=e,[i,s]=k.useState(!1);Wo(()=>s(!0),[]);const a=r||i&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?D4.createPortal(E.jsx(Mj.div,{...n,ref:t}),a):null});$S.displayName=jj;function Bj(e,t){return k.useReducer((r,n)=>t[r][n]??r,e)}var Zc=e=>{const{present:t,children:r}=e,n=Fj(t),i=typeof r=="function"?r({present:n.isPresent}):k.Children.only(r),s=Si(n.ref,zj(i));return typeof r=="function"||n.isPresent?k.cloneElement(i,{ref:s}):null};Zc.displayName="Presence";function Fj(e){const[t,r]=k.useState(),n=k.useRef(null),i=k.useRef(e),s=k.useRef("none"),a=e?"mounted":"unmounted",[o,l]=Bj(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const c=il(n.current);s.current=o==="mounted"?c:"none"},[o]),Wo(()=>{const c=n.current,h=i.current;if(h!==e){const m=s.current,g=il(c);e?l("MOUNT"):g==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(h&&m!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Wo(()=>{if(t){let c;const h=t.ownerDocument.defaultView??window,u=g=>{const _=il(n.current).includes(CSS.escape(g.animationName));if(g.target===t&&_&&(l("ANIMATION_END"),!i.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},m=g=>{g.target===t&&(s.current=il(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{h.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:k.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function il(e){return(e==null?void 0:e.animationName)||"none"}function zj(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var $j=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],aa=$j.reduce((e,t)=>{const r=oa(`Primitive.${t}`),n=k.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Pf=0;function Hj(){k.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??C0()),document.body.insertAdjacentElement("beforeend",e[1]??C0()),Pf++,()=>{Pf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Pf--}},[])}function C0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Rr=function(){return Rr=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},Rr.apply(this,arguments)};function HS(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Uj(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}var Il="right-scroll-bar-position",Nl="width-before-scroll-bar",Wj="with-scroll-bars-hidden",Vj="--removed-body-scroll-bar-size";function Tf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Kj(e,t){var r=k.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}var Gj=typeof window<"u"?k.useLayoutEffect:k.useEffect,k0=new WeakMap;function qj(e,t){var r=Kj(null,function(n){return e.forEach(function(i){return Tf(i,n)})});return Gj(function(){var n=k0.get(r);if(n){var i=new Set(n),s=new Set(e),a=r.current;i.forEach(function(o){s.has(o)||Tf(o,null)}),s.forEach(function(o){i.has(o)||Tf(o,a)})}k0.set(r,e)},[e]),r}function Yj(e){return e}function Jj(e,t){t===void 0&&(t=Yj);var r=[],n=!1,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var a=t(s,n);return r.push(a),function(){r=r.filter(function(o){return o!==a})}},assignSyncMedium:function(s){for(n=!0;r.length;){var a=r;r=[],a.forEach(s)}r={push:function(o){return s(o)},filter:function(){return r}}},assignMedium:function(s){n=!0;var a=[];if(r.length){var o=r;r=[],o.forEach(s),a=r}var l=function(){var h=a;a=[],h.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(h){a.push(h),c()},filter:function(h){return a=a.filter(h),r}}}};return i}function Xj(e){e===void 0&&(e={});var t=Jj(null);return t.options=Rr({async:!0,ssr:!1},e),t}var US=function(e){var t=e.sideCar,r=HS(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return k.createElement(n,Rr({},r))};US.isSideCarExport=!0;function Qj(e,t){return e.useMedium(t),US}var WS=Xj(),Df=function(){},eu=k.forwardRef(function(e,t){var r=k.useRef(null),n=k.useState({onScrollCapture:Df,onWheelCapture:Df,onTouchMoveCapture:Df}),i=n[0],s=n[1],a=e.forwardProps,o=e.children,l=e.className,c=e.removeScrollBar,h=e.enabled,u=e.shards,m=e.sideCar,g=e.noRelative,y=e.noIsolation,_=e.inert,v=e.allowPinchZoom,d=e.as,f=d===void 0?"div":d,p=e.gapMode,w=HS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=m,b=qj([r,t]),x=Rr(Rr({},w),i);return k.createElement(k.Fragment,null,h&&k.createElement(S,{sideCar:WS,removeScrollBar:c,shards:u,noRelative:g,noIsolation:y,inert:_,setCallbacks:s,allowPinchZoom:!!v,lockRef:r,gapMode:p}),a?k.cloneElement(k.Children.only(o),Rr(Rr({},x),{ref:b})):k.createElement(f,Rr({},x,{className:l,ref:b}),o))});eu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};eu.classNames={fullWidth:Nl,zeroRight:Il};var Zj=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function eB(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Zj();return t&&e.setAttribute("nonce",t),e}function tB(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function rB(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var nB=function(){var e=0,t=null;return{add:function(r){e==0&&(t=eB())&&(tB(t,r),rB(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},iB=function(){var e=nB();return function(t,r){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},VS=function(){var e=iB(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},sB={left:0,top:0,right:0,gap:0},If=function(e){return parseInt(e||"",10)||0},oB=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[If(r),If(n),If(i)]},aB=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return sB;var t=oB(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},lB=VS(),os="data-scroll-locked",cB=function(e,t,r,n){var i=e.left,s=e.top,a=e.right,o=e.gap;return r===void 0&&(r="margin"),`
648
+ .`.concat(Wj,` {
649
+ overflow: hidden `).concat(n,`;
650
+ padding-right: `).concat(o,"px ").concat(n,`;
651
+ }
652
+ body[`).concat(os,`] {
653
+ overflow: hidden `).concat(n,`;
654
+ overscroll-behavior: contain;
655
+ `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
656
+ padding-left: `.concat(i,`px;
657
+ padding-top: `).concat(s,`px;
658
+ padding-right: `).concat(a,`px;
659
+ margin-left:0;
660
+ margin-top:0;
661
+ margin-right: `).concat(o,"px ").concat(n,`;
662
+ `),r==="padding"&&"padding-right: ".concat(o,"px ").concat(n,";")].filter(Boolean).join(""),`
663
+ }
664
+
665
+ .`).concat(Il,` {
666
+ right: `).concat(o,"px ").concat(n,`;
667
+ }
668
+
669
+ .`).concat(Nl,` {
670
+ margin-right: `).concat(o,"px ").concat(n,`;
671
+ }
672
+
673
+ .`).concat(Il," .").concat(Il,` {
674
+ right: 0 `).concat(n,`;
675
+ }
676
+
677
+ .`).concat(Nl," .").concat(Nl,` {
678
+ margin-right: 0 `).concat(n,`;
679
+ }
680
+
681
+ body[`).concat(os,`] {
682
+ `).concat(Vj,": ").concat(o,`px;
683
+ }
684
+ `)},x0=function(){var e=parseInt(document.body.getAttribute(os)||"0",10);return isFinite(e)?e:0},uB=function(){k.useEffect(function(){return document.body.setAttribute(os,(x0()+1).toString()),function(){var e=x0()-1;e<=0?document.body.removeAttribute(os):document.body.setAttribute(os,e.toString())}},[])},fB=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;uB();var s=k.useMemo(function(){return aB(i)},[i]);return k.createElement(lB,{styles:cB(s,!t,i,r?"":"!important")})},md=!1;if(typeof window<"u")try{var sl=Object.defineProperty({},"passive",{get:function(){return md=!0,!0}});window.addEventListener("test",sl,sl),window.removeEventListener("test",sl,sl)}catch{md=!1}var Pi=md?{passive:!1}:!1,hB=function(e){return e.tagName==="TEXTAREA"},KS=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!hB(e)&&r[t]==="visible")},dB=function(e){return KS(e,"overflowY")},pB=function(e){return KS(e,"overflowX")},E0=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=GS(e,n);if(i){var s=qS(e,n),a=s[1],o=s[2];if(a>o)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},mB=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},gB=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},GS=function(e,t){return e==="v"?dB(t):pB(t)},qS=function(e,t){return e==="v"?mB(t):gB(t)},vB=function(e,t){return e==="h"&&t==="rtl"?-1:1},_B=function(e,t,r,n,i){var s=vB(e,window.getComputedStyle(t).direction),a=s*n,o=r.target,l=t.contains(o),c=!1,h=a>0,u=0,m=0;do{if(!o)break;var g=qS(e,o),y=g[0],_=g[1],v=g[2],d=_-v-s*y;(y||d)&&GS(e,o)&&(u+=d,m+=y);var f=o.parentNode;o=f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE?f.host:f}while(!l&&o!==document.body||l&&(t.contains(o)||t===o));return(h&&Math.abs(u)<1||!h&&Math.abs(m)<1)&&(c=!0),c},ol=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},A0=function(e){return[e.deltaX,e.deltaY]},L0=function(e){return e&&"current"in e?e.current:e},yB=function(e,t){return e[0]===t[0]&&e[1]===t[1]},wB=function(e){return`
685
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
686
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
687
+ `)},bB=0,Ti=[];function SB(e){var t=k.useRef([]),r=k.useRef([0,0]),n=k.useRef(),i=k.useState(bB++)[0],s=k.useState(VS)[0],a=k.useRef(e);k.useEffect(function(){a.current=e},[e]),k.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var _=Uj([e.lockRef.current],(e.shards||[]).map(L0),!0).filter(Boolean);return _.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),_.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var o=k.useCallback(function(_,v){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!a.current.allowPinchZoom;var d=ol(_),f=r.current,p="deltaX"in _?_.deltaX:f[0]-d[0],w="deltaY"in _?_.deltaY:f[1]-d[1],S,b=_.target,x=Math.abs(p)>Math.abs(w)?"h":"v";if("touches"in _&&x==="h"&&b.type==="range")return!1;var C=window.getSelection(),A=C&&C.anchorNode,T=A?A===b||A.contains(b):!1;if(T)return!1;var j=E0(x,b);if(!j)return!0;if(j?S=x:(S=x==="v"?"h":"v",j=E0(x,b)),!j)return!1;if(!n.current&&"changedTouches"in _&&(p||w)&&(n.current=S),!S)return!0;var M=n.current||S;return _B(M,v,_,M==="h"?p:w)},[]),l=k.useCallback(function(_){var v=_;if(!(!Ti.length||Ti[Ti.length-1]!==s)){var d="deltaY"in v?A0(v):ol(v),f=t.current.filter(function(S){return S.name===v.type&&(S.target===v.target||v.target===S.shadowParent)&&yB(S.delta,d)})[0];if(f&&f.should){v.cancelable&&v.preventDefault();return}if(!f){var p=(a.current.shards||[]).map(L0).filter(Boolean).filter(function(S){return S.contains(v.target)}),w=p.length>0?o(v,p[0]):!a.current.noIsolation;w&&v.cancelable&&v.preventDefault()}}},[]),c=k.useCallback(function(_,v,d,f){var p={name:_,delta:v,target:d,should:f,shadowParent:CB(d)};t.current.push(p),setTimeout(function(){t.current=t.current.filter(function(w){return w!==p})},1)},[]),h=k.useCallback(function(_){r.current=ol(_),n.current=void 0},[]),u=k.useCallback(function(_){c(_.type,A0(_),_.target,o(_,e.lockRef.current))},[]),m=k.useCallback(function(_){c(_.type,ol(_),_.target,o(_,e.lockRef.current))},[]);k.useEffect(function(){return Ti.push(s),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Pi),document.addEventListener("touchmove",l,Pi),document.addEventListener("touchstart",h,Pi),function(){Ti=Ti.filter(function(_){return _!==s}),document.removeEventListener("wheel",l,Pi),document.removeEventListener("touchmove",l,Pi),document.removeEventListener("touchstart",h,Pi)}},[]);var g=e.removeScrollBar,y=e.inert;return k.createElement(k.Fragment,null,y?k.createElement(s,{styles:wB(i)}):null,g?k.createElement(fB,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function CB(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const kB=Qj(WS,SB);var YS=k.forwardRef(function(e,t){return k.createElement(eu,Rr({},e,{ref:t,sideCar:kB}))});YS.classNames=eu.classNames;var xB=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Di=new WeakMap,al=new WeakMap,ll={},Nf=0,JS=function(e){return e&&(e.host||JS(e.parentNode))},EB=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=JS(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},AB=function(e,t,r,n){var i=EB(t,Array.isArray(e)?e:[e]);ll[r]||(ll[r]=new WeakMap);var s=ll[r],a=[],o=new Set,l=new Set(i),c=function(u){!u||o.has(u)||(o.add(u),c(u.parentNode))};i.forEach(c);var h=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(m){if(o.has(m))h(m);else try{var g=m.getAttribute(n),y=g!==null&&g!=="false",_=(Di.get(m)||0)+1,v=(s.get(m)||0)+1;Di.set(m,_),s.set(m,v),a.push(m),_===1&&y&&al.set(m,!0),v===1&&m.setAttribute(r,"true"),y||m.setAttribute(n,"true")}catch(d){console.error("aria-hidden: cannot operate on ",m,d)}})};return h(t),o.clear(),Nf++,function(){a.forEach(function(u){var m=Di.get(u)-1,g=s.get(u)-1;Di.set(u,m),s.set(u,g),m||(al.has(u)||u.removeAttribute(n),al.delete(u)),g||u.removeAttribute(r)}),Nf--,Nf||(Di=new WeakMap,Di=new WeakMap,al=new WeakMap,ll={})}},LB=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=xB(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),AB(n,i,r,"aria-hidden")):function(){return null}},tu="Dialog",[XS]=nj(tu),[PB,Ar]=XS(tu),QS=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,o=k.useRef(null),l=k.useRef(null),[c,h]=lj({prop:n,defaultProp:i??!1,onChange:s,caller:tu});return E.jsx(PB,{scope:t,triggerRef:o,contentRef:l,contentId:Jr(),titleId:Jr(),descriptionId:Jr(),open:c,onOpenChange:h,onOpenToggle:k.useCallback(()=>h(u=>!u),[h]),modal:a,children:r})};QS.displayName=tu;var ZS="DialogTrigger",TB=k.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Ar(ZS,r),s=Si(t,i.triggerRef);return E.jsx(aa.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":nm(i.open),...n,ref:s,onClick:Nn(e.onClick,i.onOpenToggle)})});TB.displayName=ZS;var tm="DialogPortal",[DB,eC]=XS(tm,{forceMount:void 0}),tC=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,s=Ar(tm,t);return E.jsx(DB,{scope:t,forceMount:r,children:k.Children.map(n,a=>E.jsx(Zc,{present:r||s.open,children:E.jsx($S,{asChild:!0,container:i,children:a})}))})};tC.displayName=tm;var vc="DialogOverlay",rC=k.forwardRef((e,t)=>{const r=eC(vc,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,s=Ar(vc,e.__scopeDialog);return s.modal?E.jsx(Zc,{present:n||s.open,children:E.jsx(NB,{...i,ref:t})}):null});rC.displayName=vc;var IB=oa("DialogOverlay.RemoveScroll"),NB=k.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Ar(vc,r);return E.jsx(YS,{as:IB,allowPinchZoom:!0,shards:[i.contentRef],children:E.jsx(aa.div,{"data-state":nm(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),mi="DialogContent",nC=k.forwardRef((e,t)=>{const r=eC(mi,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,s=Ar(mi,e.__scopeDialog);return E.jsx(Zc,{present:n||s.open,children:s.modal?E.jsx(RB,{...i,ref:t}):E.jsx(OB,{...i,ref:t})})});nC.displayName=mi;var RB=k.forwardRef((e,t)=>{const r=Ar(mi,e.__scopeDialog),n=k.useRef(null),i=Si(t,r.contentRef,n);return k.useEffect(()=>{const s=n.current;if(s)return LB(s)},[]),E.jsx(iC,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Nn(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Nn(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&s.preventDefault()}),onFocusOutside:Nn(e.onFocusOutside,s=>s.preventDefault())})}),OB=k.forwardRef((e,t)=>{const r=Ar(mi,e.__scopeDialog),n=k.useRef(!1),i=k.useRef(!1);return E.jsx(iC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,o;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(n.current||(o=r.triggerRef.current)==null||o.focus(),s.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:s=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;((c=r.triggerRef.current)==null?void 0:c.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),iC=k.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,...a}=e,o=Ar(mi,r),l=k.useRef(null),c=Si(t,l);return Hj(),E.jsxs(E.Fragment,{children:[E.jsx(FS,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s,children:E.jsx(jS,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":nm(o.open),...a,ref:c,onDismiss:()=>o.onOpenChange(!1)})}),E.jsxs(E.Fragment,{children:[E.jsx(FB,{titleId:o.titleId}),E.jsx($B,{contentRef:l,descriptionId:o.descriptionId})]})]})}),rm="DialogTitle",MB=k.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Ar(rm,r);return E.jsx(aa.h2,{id:i.titleId,...n,ref:t})});MB.displayName=rm;var sC="DialogDescription",jB=k.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Ar(sC,r);return E.jsx(aa.p,{id:i.descriptionId,...n,ref:t})});jB.displayName=sC;var oC="DialogClose",BB=k.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Ar(oC,r);return E.jsx(aa.button,{type:"button",...n,ref:t,onClick:Nn(e.onClick,()=>i.onOpenChange(!1))})});BB.displayName=oC;function nm(e){return e?"open":"closed"}var aC="DialogTitleWarning",[Dz,lC]=rj(aC,{contentName:mi,titleName:rm,docsSlug:"dialog"}),FB=({titleId:e})=>{const t=lC(aC),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
688
+
689
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
690
+
691
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return k.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},zB="DialogDescriptionWarning",$B=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lC(zB).contentName}}.`;return k.useEffect(()=>{var s;const i=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},HB=QS,UB=tC,WB=rC,VB=nC,KB=Symbol.for("react.lazy"),_c=bd[" use ".trim().toString()];function GB(e){return typeof e=="object"&&e!==null&&"then"in e}function cC(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===KB&&"_payload"in e&&GB(e._payload)}function qB(e){const t=YB(e),r=k.forwardRef((n,i)=>{let{children:s,...a}=n;cC(s)&&typeof _c=="function"&&(s=_c(s._payload));const o=k.Children.toArray(s),l=o.find(XB);if(l){const c=l.props.children,h=o.map(u=>u===l?k.Children.count(c)>1?k.Children.only(null):k.isValidElement(c)?c.props.children:null:u);return E.jsx(t,{...a,ref:i,children:k.isValidElement(c)?k.cloneElement(c,void 0,h):null})}return E.jsx(t,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function YB(e){const t=k.forwardRef((r,n)=>{let{children:i,...s}=r;if(cC(i)&&typeof _c=="function"&&(i=_c(i._payload)),k.isValidElement(i)){const a=ZB(i),o=QB(s,i.props);return i.type!==k.Fragment&&(o.ref=n?Fn(n,a):a),k.cloneElement(i,o)}return k.Children.count(i)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var JB=Symbol("radix.slottable");function XB(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===JB}function QB(e,t){const r={...t};for(const n in t){const i=e[n],s=t[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...o)=>{const l=s(...o);return i(...o),l}:i&&(r[n]=i):n==="style"?r[n]={...i,...s}:n==="className"&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function ZB(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var e7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Vn=e7.reduce((e,t)=>{const r=qB(`Primitive.${t}`),n=k.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Ys='[cmdk-group=""]',Rf='[cmdk-group-items=""]',t7='[cmdk-group-heading=""]',uC='[cmdk-item=""]',P0=`${uC}:not([aria-disabled="true"])`,gd="cmdk-item-select",ji="data-value",r7=(e,t,r)=>tj(e,t,r),fC=k.createContext(void 0),la=()=>k.useContext(fC),hC=k.createContext(void 0),im=()=>k.useContext(hC),dC=k.createContext(void 0),pC=k.forwardRef((e,t)=>{let r=Bi(()=>{var I,L;return{search:"",value:(L=(I=e.value)!=null?I:e.defaultValue)!=null?L:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=Bi(()=>new Set),i=Bi(()=>new Map),s=Bi(()=>new Map),a=Bi(()=>new Set),o=vC(e),{label:l,children:c,value:h,onValueChange:u,filter:m,shouldFilter:g,loop:y,disablePointerSelection:_=!1,vimBindings:v=!0,...d}=e,f=Jr(),p=Jr(),w=Jr(),S=k.useRef(null),b=h7();gi(()=>{if(h!==void 0){let I=h.trim();r.current.value=I,x.emit()}},[h]),gi(()=>{b(6,O)},[]);let x=k.useMemo(()=>({subscribe:I=>(a.current.add(I),()=>a.current.delete(I)),snapshot:()=>r.current,setState:(I,L,W)=>{var J,G,B,D;if(!Object.is(r.current[I],L)){if(r.current[I]=L,I==="search")M(),T(),b(1,j);else if(I==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let U=document.getElementById(w);U?U.focus():(J=document.getElementById(f))==null||J.focus()}if(b(7,()=>{var U;r.current.selectedItemId=(U=z())==null?void 0:U.id,x.emit()}),W||b(5,O),((G=o.current)==null?void 0:G.value)!==void 0){let U=L??"";(D=(B=o.current).onValueChange)==null||D.call(B,U);return}}x.emit()}},emit:()=>{a.current.forEach(I=>I())}}),[]),C=k.useMemo(()=>({value:(I,L,W)=>{var J;L!==((J=s.current.get(I))==null?void 0:J.value)&&(s.current.set(I,{value:L,keywords:W}),r.current.filtered.items.set(I,A(L,W)),b(2,()=>{T(),x.emit()}))},item:(I,L)=>(n.current.add(I),L&&(i.current.has(L)?i.current.get(L).add(I):i.current.set(L,new Set([I]))),b(3,()=>{M(),T(),r.current.value||j(),x.emit()}),()=>{s.current.delete(I),n.current.delete(I),r.current.filtered.items.delete(I);let W=z();b(4,()=>{M(),(W==null?void 0:W.getAttribute("id"))===I&&j(),x.emit()})}),group:I=>(i.current.has(I)||i.current.set(I,new Set),()=>{s.current.delete(I),i.current.delete(I)}),filter:()=>o.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>o.current.disablePointerSelection,listId:f,inputId:w,labelId:p,listInnerRef:S}),[]);function A(I,L){var W,J;let G=(J=(W=o.current)==null?void 0:W.filter)!=null?J:r7;return I?G(I,r.current.search,L):0}function T(){if(!r.current.search||o.current.shouldFilter===!1)return;let I=r.current.filtered.items,L=[];r.current.filtered.groups.forEach(J=>{let G=i.current.get(J),B=0;G.forEach(D=>{let U=I.get(D);B=Math.max(U,B)}),L.push([J,B])});let W=S.current;$().sort((J,G)=>{var B,D;let U=J.getAttribute("id"),H=G.getAttribute("id");return((B=I.get(H))!=null?B:0)-((D=I.get(U))!=null?D:0)}).forEach(J=>{let G=J.closest(Rf);G?G.appendChild(J.parentElement===G?J:J.closest(`${Rf} > *`)):W.appendChild(J.parentElement===W?J:J.closest(`${Rf} > *`))}),L.sort((J,G)=>G[1]-J[1]).forEach(J=>{var G;let B=(G=S.current)==null?void 0:G.querySelector(`${Ys}[${ji}="${encodeURIComponent(J[0])}"]`);B==null||B.parentElement.appendChild(B)})}function j(){let I=$().find(W=>W.getAttribute("aria-disabled")!=="true"),L=I==null?void 0:I.getAttribute(ji);x.setState("value",L||void 0)}function M(){var I,L,W,J;if(!r.current.search||o.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let G=0;for(let B of n.current){let D=(L=(I=s.current.get(B))==null?void 0:I.value)!=null?L:"",U=(J=(W=s.current.get(B))==null?void 0:W.keywords)!=null?J:[],H=A(D,U);r.current.filtered.items.set(B,H),H>0&&G++}for(let[B,D]of i.current)for(let U of D)if(r.current.filtered.items.get(U)>0){r.current.filtered.groups.add(B);break}r.current.filtered.count=G}function O(){var I,L,W;let J=z();J&&(((I=J.parentElement)==null?void 0:I.firstChild)===J&&((W=(L=J.closest(Ys))==null?void 0:L.querySelector(t7))==null||W.scrollIntoView({block:"nearest"})),J.scrollIntoView({block:"nearest"}))}function z(){var I;return(I=S.current)==null?void 0:I.querySelector(`${uC}[aria-selected="true"]`)}function $(){var I;return Array.from(((I=S.current)==null?void 0:I.querySelectorAll(P0))||[])}function Y(I){let L=$()[I];L&&x.setState("value",L.getAttribute(ji))}function X(I){var L;let W=z(),J=$(),G=J.findIndex(D=>D===W),B=J[G+I];(L=o.current)!=null&&L.loop&&(B=G+I<0?J[J.length-1]:G+I===J.length?J[0]:J[G+I]),B&&x.setState("value",B.getAttribute(ji))}function V(I){let L=z(),W=L==null?void 0:L.closest(Ys),J;for(;W&&!J;)W=I>0?u7(W,Ys):f7(W,Ys),J=W==null?void 0:W.querySelector(P0);J?x.setState("value",J.getAttribute(ji)):X(I)}let N=()=>Y($().length-1),P=I=>{I.preventDefault(),I.metaKey?N():I.altKey?V(1):X(1)},R=I=>{I.preventDefault(),I.metaKey?Y(0):I.altKey?V(-1):X(-1)};return k.createElement(Vn.div,{ref:t,tabIndex:-1,...d,"cmdk-root":"",onKeyDown:I=>{var L;(L=d.onKeyDown)==null||L.call(d,I);let W=I.nativeEvent.isComposing||I.keyCode===229;if(!(I.defaultPrevented||W))switch(I.key){case"n":case"j":{v&&I.ctrlKey&&P(I);break}case"ArrowDown":{P(I);break}case"p":case"k":{v&&I.ctrlKey&&R(I);break}case"ArrowUp":{R(I);break}case"Home":{I.preventDefault(),Y(0);break}case"End":{I.preventDefault(),N();break}case"Enter":{I.preventDefault();let J=z();if(J){let G=new Event(gd);J.dispatchEvent(G)}}}}},k.createElement("label",{"cmdk-label":"",htmlFor:C.inputId,id:C.labelId,style:p7},l),ru(e,I=>k.createElement(hC.Provider,{value:x},k.createElement(fC.Provider,{value:C},I))))}),mC=k.forwardRef((e,t)=>{var r,n;let i=Jr(),s=k.useRef(null),a=k.useContext(dC),o=la(),l=vC(e),c=(n=(r=l.current)==null?void 0:r.forceMount)!=null?n:a==null?void 0:a.forceMount;gi(()=>{if(!c)return o.item(i,a==null?void 0:a.id)},[c]);let h=_C(i,s,[e.value,e.children,s],e.keywords),u=im(),m=zn(b=>b.value&&b.value===h.current),g=zn(b=>c||o.filter()===!1?!0:b.search?b.filtered.items.get(i)>0:!0);k.useEffect(()=>{let b=s.current;if(!(!b||e.disabled))return b.addEventListener(gd,y),()=>b.removeEventListener(gd,y)},[g,e.onSelect,e.disabled]);function y(){var b,x;_(),(x=(b=l.current).onSelect)==null||x.call(b,h.current)}function _(){u.setState("value",h.current,!0)}if(!g)return null;let{disabled:v,value:d,onSelect:f,forceMount:p,keywords:w,...S}=e;return k.createElement(Vn.div,{ref:Fn(s,t),...S,id:i,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!m,"data-disabled":!!v,"data-selected":!!m,onPointerMove:v||o.getDisablePointerSelection()?void 0:_,onClick:v?void 0:y},e.children)}),n7=k.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:i,...s}=e,a=Jr(),o=k.useRef(null),l=k.useRef(null),c=Jr(),h=la(),u=zn(g=>i||h.filter()===!1?!0:g.search?g.filtered.groups.has(a):!0);gi(()=>h.group(a),[]),_C(a,o,[e.value,e.heading,l]);let m=k.useMemo(()=>({id:a,forceMount:i}),[i]);return k.createElement(Vn.div,{ref:Fn(o,t),...s,"cmdk-group":"",role:"presentation",hidden:u?void 0:!0},r&&k.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},r),ru(e,g=>k.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?c:void 0},k.createElement(dC.Provider,{value:m},g))))}),i7=k.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,i=k.useRef(null),s=zn(a=>!a.search);return!r&&!s?null:k.createElement(Vn.div,{ref:Fn(i,t),...n,"cmdk-separator":"",role:"separator"})}),s7=k.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,i=e.value!=null,s=im(),a=zn(c=>c.search),o=zn(c=>c.selectedItemId),l=la();return k.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),k.createElement(Vn.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":o,id:l.inputId,type:"text",value:i?e.value:a,onChange:c=>{i||s.setState("search",c.target.value),r==null||r(c.target.value)}})}),gC=k.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...i}=e,s=k.useRef(null),a=k.useRef(null),o=zn(c=>c.selectedItemId),l=la();return k.useEffect(()=>{if(a.current&&s.current){let c=a.current,h=s.current,u,m=new ResizeObserver(()=>{u=requestAnimationFrame(()=>{let g=c.offsetHeight;h.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return m.observe(c),()=>{cancelAnimationFrame(u),m.unobserve(c)}}},[]),k.createElement(Vn.div,{ref:Fn(s,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":o,"aria-label":n,id:l.listId},ru(e,c=>k.createElement("div",{ref:Fn(a,l.listInnerRef),"cmdk-list-sizer":""},c)))}),o7=k.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:i,contentClassName:s,container:a,...o}=e;return k.createElement(HB,{open:r,onOpenChange:n},k.createElement(UB,{container:a},k.createElement(WB,{"cmdk-overlay":"",className:i}),k.createElement(VB,{"aria-label":e.label,"cmdk-dialog":"",className:s},k.createElement(pC,{ref:t,...o}))))}),a7=k.forwardRef((e,t)=>zn(r=>r.filtered.count===0)?k.createElement(Vn.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),l7=k.forwardRef((e,t)=>{let{progress:r,children:n,label:i="Loading...",...s}=e;return k.createElement(Vn.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},ru(e,a=>k.createElement("div",{"aria-hidden":!0},a)))}),c7=Object.assign(pC,{List:gC,Item:mC,Input:s7,Group:n7,Separator:i7,Dialog:o7,Empty:a7,Loading:l7});function u7(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function f7(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function vC(e){let t=k.useRef(e);return gi(()=>{t.current=e}),t}var gi=typeof window>"u"?k.useEffect:k.useLayoutEffect;function Bi(e){let t=k.useRef();return t.current===void 0&&(t.current=e()),t}function zn(e){let t=im(),r=()=>e(t.snapshot());return k.useSyncExternalStore(t.subscribe,r,r)}function _C(e,t,r,n=[]){let i=k.useRef(),s=la();return gi(()=>{var a;let o=(()=>{var c;for(let h of r){if(typeof h=="string")return h.trim();if(typeof h=="object"&&"current"in h)return h.current?(c=h.current.textContent)==null?void 0:c.trim():i.current}})(),l=n.map(c=>c.trim());s.value(e,o,l),(a=t.current)==null||a.setAttribute(ji,o),i.current=o}),i}var h7=()=>{let[e,t]=k.useState(),r=Bi(()=>new Map);return gi(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,i)=>{r.current.set(n,i),t({})}};function d7(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function ru({asChild:e,children:t},r){return e&&k.isValidElement(t)?k.cloneElement(d7(t),{ref:t.ref},r(t.props.children)):r(t)}var p7={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function m7({t:e,activePane:t,isDraggingAttachments:r,onSubmit:n,onDragEnterComposer:i,onDragOverComposer:s,onDragLeaveComposer:a,onDropAttachments:o,composerRef:l,draftAttachments:c,getAttachmentExtension:h,formatAttachmentSize:u,removeDraftAttachment:m,commandMenuOpen:g,filteredCommands:y,setInput:_,setCommandMenuOpen:v,setCommandQuery:d,inputRef:f,commandSelection:p,triggerAttachmentPicker:w,attachmentSession:S,attachmentsLoading:b,isMobileLayout:x,uploadInputRef:C,onUploadAttachments:A,input:T,handleInputChange:j,handleComposerKeyDown:M,onPasteAttachments:O,composerInputMode:z,canInterrupt:$,interruptTurn:Y,connected:X,modelSelectorVisible:V,modelOptions:N,selectedModel:P,modelLoading:R,modelDisabled:I,modelError:L,onModelChange:W,isCodexReady:J,interactionBlocked:G,attachmentsError:B}){return t!=="chat"?null:E.jsx("form",{className:`composer composer--sticky ${r?"is-dragging":""}`,onSubmit:n,onDragEnter:i,onDragOver:s,onDragLeave:a,onDrop:o,ref:l,children:E.jsxs("div",{className:"composer-inner",children:[c.length?E.jsx("div",{className:"composer-attachments","aria-label":e("Selected attachments"),children:c.map(D=>{const U=(D==null?void 0:D.name)||(D==null?void 0:D.path)||"",H=(D==null?void 0:D.path)||(D==null?void 0:D.name)||U,ee=h(D,e),Z=D!=null&&D.lineCount||D!=null&&D.lines?e("{{count}} lines",{count:D.lineCount||D.lines}):u(D==null?void 0:D.size,e);return E.jsxs("div",{className:"attachment-card",children:[E.jsxs("div",{className:"attachment-card-body",children:[E.jsx("div",{className:"attachment-card-title",children:U}),Z?E.jsx("div",{className:"attachment-card-meta",children:Z}):null]}),E.jsxs("div",{className:"attachment-card-footer",children:[E.jsx("span",{className:"attachment-card-type",children:ee}),E.jsx("button",{type:"button",className:"attachment-card-remove","aria-label":e("Remove {{label}}",{label:U}),onClick:()=>m((D==null?void 0:D.path)||(D==null?void 0:D.name)),children:E.jsx(Ne,{icon:ii})})]})]},H)})}):null,g&&E.jsx("div",{className:"composer-command-menu",children:E.jsx(c7,{className:"command-menu",shouldFilter:!1,children:E.jsx(gC,{children:y.length?y.map(D=>E.jsxs(mC,{onSelect:()=>{var U;_(D.insert),v(!1),d(""),(U=f.current)==null||U.focus()},className:`command-item${D.id===p?" is-selected":""}`,children:[E.jsx("span",{className:"command-item-label",children:D.label}),E.jsx("span",{className:"command-item-desc",children:D.description})]},D.id)):E.jsx("div",{className:"command-empty",children:e("No commands found.")})})})}),E.jsxs("div",{className:"composer-main",children:[E.jsxs("button",{type:"button",className:"icon-button composer-attach-button","aria-label":e("Add attachment"),onClick:w,disabled:!S||b,children:["+",x?E.jsx("span",{className:"attachment-badge",children:c.length}):null]}),E.jsx("input",{ref:C,type:"file",multiple:!0,onChange:A,disabled:!S||b,className:"visually-hidden"}),E.jsx("textarea",{className:`composer-input ${z==="single"?"is-single":"is-multi"}`,value:T,onChange:j,onKeyDown:M,onPaste:O,placeholder:e("Write your message…"),rows:z==="single"?1:2,ref:f}),V?E.jsxs("select",{className:"composer-model-select",value:P||"",onChange:D=>W==null?void 0:W(D.target.value),disabled:I,"aria-label":e("Model"),title:L||e("Model"),children:[R?E.jsx("option",{value:"",children:e("Loading...")}):null,E.jsx("option",{value:"",children:e("Default model")}),(Array.isArray(N)?N:[]).map(D=>E.jsx("option",{value:D.model||"",children:D.displayName||D.model||""},D.id||D.model))]}):null,$?E.jsx("button",{type:"button",className:"primary stop-button",onClick:Y,"aria-label":e("Stop"),title:e("Stop"),children:E.jsx("span",{className:"stop-icon",children:"⏹"})}):E.jsx("button",{type:"submit",className:"primary send-button",disabled:!X||!T.trim()||!J||G,"aria-label":e("Send"),title:e("Send"),children:E.jsx("span",{className:"send-icon",children:"➤"})})]}),B&&E.jsx("div",{className:"attachments-error composer-attachments-error",children:B})]})})}function g7({t:e,activePane:t,handleViewSelect:r,handleDiffSelect:n,debugMode:i,rpcLogsEnabled:s,terminalEnabled:a,toolbarExportOpen:o,setToolbarExportOpen:l,toolbarExportRef:c,handleExportChat:h,hasMessages:u,handleClearChat:m}){return t==="settings"?null:E.jsxs("div",{className:"chat-toolbar",role:"toolbar","aria-label":e("Chat tools"),children:[E.jsxs("div",{className:"chat-toolbar-group",children:[E.jsxs("button",{type:"button",className:`chat-toolbar-button ${t==="chat"?"is-active":""}`,onClick:()=>r("chat"),"aria-pressed":t==="chat","aria-label":e("Messages"),title:e("Messages"),children:[E.jsx("span",{className:"chat-toolbar-icon-wrap","aria-hidden":"true",children:E.jsx("span",{className:"chat-toolbar-icon",children:E.jsx(Ne,{icon:qD})})}),E.jsx("span",{className:"chat-toolbar-label",children:e("Messages")})]}),E.jsxs("button",{type:"button",className:`chat-toolbar-button ${t==="diff"?"is-active":""}`,onClick:n,"aria-pressed":t==="diff","aria-label":e("Diff"),title:e("Diff"),children:[E.jsx("span",{className:"chat-toolbar-icon-wrap","aria-hidden":"true",children:E.jsx("span",{className:"chat-toolbar-icon",children:E.jsx(Ne,{icon:t6})})}),E.jsx("span",{className:"chat-toolbar-label",children:e("Diff")})]}),E.jsxs("button",{type:"button",className:`chat-toolbar-button ${t==="explorer"?"is-active":""}`,onClick:()=>r("explorer"),"aria-pressed":t==="explorer","aria-label":e("Explorer"),title:e("Explorer"),children:[E.jsx("span",{className:"chat-toolbar-icon-wrap","aria-hidden":"true",children:E.jsx("span",{className:"chat-toolbar-icon",children:E.jsx(Ne,{icon:ZD})})}),E.jsx("span",{className:"chat-toolbar-label",children:e("Explorer")})]}),E.jsxs("button",{type:"button",className:`chat-toolbar-button ${t==="terminal"?"is-active":""}`,onClick:()=>r("terminal"),"aria-pressed":t==="terminal","aria-label":e("Terminal"),title:e("Terminal"),disabled:!a,children:[E.jsx("span",{className:"chat-toolbar-icon-wrap","aria-hidden":"true",children:E.jsx("span",{className:"chat-toolbar-icon",children:E.jsx(Ne,{icon:KD})})}),E.jsx("span",{className:"chat-toolbar-label",children:e("Terminal")})]}),E.jsxs("button",{type:"button",className:`chat-toolbar-button ${t==="logs"?"is-active":""}`,onClick:()=>r("logs"),"aria-pressed":t==="logs","aria-label":e("Logs"),title:e("Logs"),disabled:!i||!s,children:[E.jsx("span",{className:"chat-toolbar-icon-wrap","aria-hidden":"true",children:E.jsx("span",{className:"chat-toolbar-icon","aria-hidden":"true",children:E.jsx(Ne,{icon:Zh})})}),E.jsx("span",{className:"chat-toolbar-label",children:e("Logs")})]})]}),E.jsx("div",{className:"chat-toolbar-divider"}),E.jsxs("div",{className:"chat-toolbar-group",children:[E.jsxs("div",{className:"chat-toolbar-item",ref:c,children:[E.jsxs("button",{type:"button",className:`chat-toolbar-button ${o?"is-open":""}`,onClick:()=>{u&&l(g=>!g)},"aria-expanded":o,"aria-label":e("Export"),title:e("Export"),disabled:!u,children:[E.jsx("span",{className:"chat-toolbar-icon-wrap","aria-hidden":"true",children:E.jsx("span",{className:"chat-toolbar-icon",children:E.jsx(Ne,{icon:XD})})}),E.jsx("span",{className:"chat-toolbar-label",children:e("Export")})]}),o&&E.jsxs("div",{className:"chat-toolbar-menu",children:[E.jsx("button",{type:"button",className:"chat-toolbar-menu-item",onClick:()=>h("markdown"),disabled:!u,children:e("Markdown")}),E.jsx("button",{type:"button",className:"chat-toolbar-menu-item",onClick:()=>h("json"),disabled:!u,children:e("JSON")})]})]}),E.jsxs("button",{type:"button",className:"chat-toolbar-button is-danger",onClick:()=>m(),"aria-label":e("Clear"),title:e("Clear"),disabled:!u,children:[E.jsx("span",{className:"chat-toolbar-icon-wrap","aria-hidden":"true",children:E.jsx("span",{className:"chat-toolbar-icon","aria-hidden":"true",children:E.jsx(Ne,{icon:WD})})}),E.jsx("span",{className:"chat-toolbar-label",children:e("Clear")})]})]})]})}function v7({t:e,input:t,setInput:r,inputRef:n,composerInputMode:i,handleSendMessageRef:s,attachmentSession:a,apiFetch:o,normalizeAttachments:l,setDraftAttachments:c,draftAttachments:h,setAttachmentsLoading:u,setAttachmentsError:m,showToast:g,uploadInputRef:y,attachmentsLoading:_,conversationRef:v,composerRef:d,isMobileLayout:f}){const[p,w]=k.useState(!1),[S,b]=k.useState(""),[x,C]=k.useState(null),[A,T]=k.useState(!1),j=k.useRef(0),M=k.useMemo(()=>[{id:"todo",label:"/todo",description:e("Add to backlog"),insert:"/todo "},{id:"backlog",label:"/backlog",description:e("Show backlog"),insert:"/backlog"},{id:"open",label:"/open",description:e("Open path"),insert:"/open "},{id:"run",label:"/run",description:e("Run shell command"),insert:"/run "},{id:"screenshot",label:"/screenshot",description:e("Capture screenshot"),insert:"/screenshot"},{id:"git",label:"/git",description:e("Run git command"),insert:"/git "},{id:"diff",label:"/diff",description:e("Open diff view"),insert:"/diff"}],[e]),O=k.useMemo(()=>{const B=S.trim().toLowerCase();return B?M.filter(D=>D.label.toLowerCase().includes(B)):M},[M,S]);k.useEffect(()=>{if(!p){C(null);return}if(!O.length){C(null);return}C(B=>O.some(D=>D.id===B)?B:O[0].id)},[p,O]);const z=k.useCallback(B=>{const{value:D}=B.target;r(D),D.startsWith("/")&&!D.includes(" ")?(w(!0),b(D.slice(1))):(w(!1),b("")),n.current&&(n.current.style.height="auto",n.current.style.height=`${n.current.scrollHeight}px`)},[n,r]),$=k.useCallback(B=>{var D,U;if(i==="single"){if(p){if(B.key==="Escape"){B.preventDefault(),w(!1);return}if(B.key==="ArrowDown"){if(B.preventDefault(),!O.length)return;const H=O.findIndex(Z=>Z.id===x),ee=H===-1||H===O.length-1?0:H+1;C(O[ee].id);return}if(B.key==="ArrowUp"){if(B.preventDefault(),!O.length)return;const H=O.findIndex(Z=>Z.id===x),ee=H<=0?O.length-1:H-1;C(O[ee].id);return}if(B.key==="Enter"&&!B.shiftKey&&x){B.preventDefault();const H=O.find(ee=>ee.id===x);H&&(r(H.insert),w(!1),b(""),(D=n.current)==null||D.focus());return}}B.isComposing||B.key==="Enter"&&!B.shiftKey&&(B.preventDefault(),(U=s.current)==null||U.call(s))}},[i,p,O,x,s,n,r]);k.useEffect(()=>{n.current&&(n.current.style.height="auto",n.current.style.height=`${n.current.scrollHeight}px`)},[t,f,n]),k.useEffect(()=>{if(!v.current||!d.current)return;const B=()=>{if(!v.current||!d.current)return;const U=d.current.getBoundingClientRect(),H=f?12:16;v.current.style.setProperty("--composer-space",`${Math.ceil(U.height+H)}px`)};B();let D;return typeof ResizeObserver<"u"&&(D=new ResizeObserver(B),D.observe(d.current)),window.addEventListener("resize",B),()=>{window.removeEventListener("resize",B),D&&D.disconnect()}},[f,h.length,v,d]);const Y=k.useCallback(async B=>{if(!(!B.length||!(a!=null&&a.sessionId)))try{u(!0),m("");const D=new FormData;B.forEach(Z=>D.append("files",Z));const U=await o(`/api/attachments/upload?session=${encodeURIComponent(a.sessionId)}`,{method:"POST",body:D});if(!U.ok)throw new Error("Upload failed.");const H=await U.json(),ee=l(H.files||[]);c(Z=>[...Z,...ee])}catch(D){m(D.message||e("Unable to upload attachments."))}finally{u(!1)}},[o,a==null?void 0:a.sessionId,l,m,u,c,e]),X=k.useCallback(async()=>{var B;if(!(a!=null&&a.sessionId)){g(e("Session not found."),"error");return}if(!((B=navigator.mediaDevices)!=null&&B.getDisplayMedia)){g(e("Screenshot failed."),"error");return}try{const D=await navigator.mediaDevices.getDisplayMedia({video:{cursor:"never"},audio:!1}),U=document.createElement("video");U.srcObject=D,await new Promise(ve=>{U.onloadedmetadata=()=>ve()}),await U.play();const H=document.createElement("canvas");H.width=U.videoWidth||1,H.height=U.videoHeight||1;const ee=H.getContext("2d");if(!ee)throw new Error("Canvas unavailable");ee.drawImage(U,0,0,H.width,H.height),D.getTracks().forEach(ve=>ve.stop());const Z=await new Promise((ve,Ee)=>{H.toBlob(ue=>ue?ve(ue):Ee(new Error("Blob failed")),"image/png")}),de=`screenshot-${Date.now()}.png`,ge=new File([Z],de,{type:"image/png"});await Y([ge]),g(e("Screenshot captured."))}catch(D){g((D==null?void 0:D.message)||e("Screenshot failed."),"error")}},[a==null?void 0:a.sessionId,g,e,Y]),V=k.useCallback(async B=>{const D=Array.from(B.target.files||[]);await Y(D),B.target.value=""},[Y]),N=k.useCallback(async B=>{var H;if(!(a!=null&&a.sessionId))return;const U=Array.from(((H=B.clipboardData)==null?void 0:H.items)||[]).filter(ee=>ee.kind==="file").map(ee=>ee.getAsFile()).filter(Boolean);U.length&&(B.preventDefault(),await Y(U))},[a==null?void 0:a.sessionId,Y]),P=k.useCallback(B=>{var D,U;a!=null&&a.sessionId&&(U=(D=B.dataTransfer)==null?void 0:D.types)!=null&&U.includes("Files")&&B.preventDefault()},[a==null?void 0:a.sessionId]),R=k.useCallback(B=>{var D,U;a!=null&&a.sessionId&&(U=(D=B.dataTransfer)==null?void 0:D.types)!=null&&U.includes("Files")&&(B.preventDefault(),j.current+=1,T(!0))},[a==null?void 0:a.sessionId]),I=k.useCallback(B=>{var D,U;a!=null&&a.sessionId&&(U=(D=B.dataTransfer)==null?void 0:D.types)!=null&&U.includes("Files")&&(B.preventDefault(),j.current=Math.max(0,j.current-1),j.current===0&&T(!1))},[a==null?void 0:a.sessionId]),L=k.useCallback(async B=>{var U;if(!(a!=null&&a.sessionId))return;B.preventDefault(),B.stopPropagation(),j.current=0,T(!1);const D=Array.from(((U=B.dataTransfer)==null?void 0:U.files)||[]);D.length&&await Y(D)},[a==null?void 0:a.sessionId,Y]),W=k.useCallback(B=>{B&&c(D=>D.filter(U=>((U==null?void 0:U.path)||(U==null?void 0:U.name))!==B))},[c]),J=k.useCallback(()=>{!a||_||requestAnimationFrame(()=>{var B;(B=y.current)==null||B.click()})},[a,_,y]),G=k.useCallback(B=>{var D;B.preventDefault(),(D=s.current)==null||D.call(s)},[s]);return{commandMenuOpen:p,setCommandMenuOpen:w,commandQuery:S,setCommandQuery:b,commandSelection:x,filteredCommands:O,isDraggingAttachments:A,handleInputChange:z,handleComposerKeyDown:$,onSubmit:G,onUploadAttachments:V,onPasteAttachments:N,onDragOverComposer:P,onDragEnterComposer:R,onDragLeaveComposer:I,onDropAttachments:L,removeDraftAttachment:W,triggerAttachmentPicker:J,captureScreenshot:X}}function _7({attachmentSessionId:e,workspaceToken:t,socketRef:r,reconnectTimerRef:n,reconnectAttemptRef:i,closingRef:s,pingIntervalRef:a,lastPongRef:o,messageIndex:l,commandIndex:c,rpcLogsEnabledRef:h,mergeAndApplyMessages:u,requestMessageSync:m,requestWorktreesList:g,requestWorktreeMessages:y,applyWorktreesList:_,resyncSession:v,t:d,setStatus:f,setConnected:p,setAppServerReady:w,setHasMainWorktreeStatus:S,setMessages:b,setProcessing:x,setActivity:C,setCurrentTurnId:A,setMainTaskLabel:T,setModelLoading:j,setModelError:M,setModels:O,setProviderModelState:z,setSelectedModel:$,setSelectedReasoningEffort:Y,setRepoDiff:X,setRpcLogs:V,setWorktrees:N,setPaneByTab:P,setLogFilterByTab:R,setActiveWorktreeId:I,activeWorktreeIdRef:L,extractVibe80Task:W,extractFirstLine:J,getItemActivityLabel:G,maybeNotify:B,normalizeAttachments:D,loadRepoLastCommit:U,loadBranches:H,loadWorktreeLastCommit:ee,openAiLoginRequest:Z,setOpenAiLoginRequest:de,connected:ge}){k.useEffect(()=>{if(!e||!t)return;let ve=!0,Ee=null;const ue=()=>{n.current&&(clearTimeout(n.current),n.current=null)},Ae=()=>{a.current&&(clearInterval(a.current),a.current=null)},Fe=()=>{Ee&&(clearInterval(Ee),Ee=null)},Re=()=>{Ae(),o.current=Date.now(),a.current=setInterval(()=>{const Ce=r.current;if(!Ce||Ce.readyState!==WebSocket.OPEN)return;if(document.hidden){o.current=Date.now();return}if(Date.now()-o.current>15e3){Ce.close();return}Ce.send(JSON.stringify({type:"ping"}))},1e4)},We=()=>{Fe();const Ce=()=>{const Q=r.current;if(!Q||Q.readyState!==WebSocket.OPEN)return;const oe=(L==null?void 0:L.current)||"main";Q.send(JSON.stringify({type:"wake_up",worktreeId:oe}))};Ce(),Ee=setInterval(Ce,60*1e3)},ot=()=>{if(!ve)return;const Ce=Math.min(i.current+1,6);i.current=Ce;const ye=Math.min(500*2**(Ce-1),1e4),F=Math.floor(Math.random()*250);ue(),n.current=setTimeout(()=>{Oe()},ye+F)},Oe=()=>{if(!ve)return;f(d("Connecting..."));const Ce=new WebSocket(`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/ws?session=${encodeURIComponent(e)}`);r.current=Ce;let Q=!1;const oe=()=>r.current===Ce;Ce.addEventListener("open",()=>{oe()&&Ce.send(JSON.stringify({type:"auth",token:t}))}),Ce.addEventListener("close",()=>{oe()&&(p(!1),f(d("Disconnected")),w(!1),Ae(),Fe(),s.current||ot())}),Ce.addEventListener("error",()=>{oe()&&Ce.close()}),Ce.addEventListener("message",ye=>{var Lt,ae,ce;if(!oe())return;let F;try{F=JSON.parse(ye.data)}catch{return}const ke=typeof F.worktreeId=="string"?F.worktreeId:"",re=ke.length>0,we=ke==="main",Ve=re&&!we,Me=we||!re;if(Me&&(F.type==="assistant_delta"||F.type==="command_execution_delta"||F.type==="command_execution_completed"||F.type==="item_started")&&(x(q=>q||!0),C(d("Processing..."))),F.type==="auth_ok"){if(!Q){Q=!0,i.current=0,ue(),p(!0),f(d("Connected")),Re(),We(),v(),m(),g();const q=r.current;if(q&&q.readyState===WebSocket.OPEN){const K=(L==null?void 0:L.current)||"main";q.send(JSON.stringify({type:"wake_up",worktreeId:K}))}}return}if(Q){if(F.type==="pong"&&(o.current=Date.now()),F.type==="status"&&(f(F.message),F.provider==="codex"&&w(!1)),F.type==="ready"&&(f(d("Ready")),w(!0)),F.type==="provider_status"&&F.provider==="codex"&&w(F.status==="ready"),Me&&F.type==="assistant_delta"){if(typeof F.delta!="string")return;b(q=>{const K=[...q],te=K.findIndex(le=>(le==null?void 0:le.id)===F.itemId);if(te===-1)return K.push({id:F.itemId,role:"assistant",text:F.delta}),K;const ne={...K[te]};return ne.text+=F.delta,K[te]=ne,K})}if(Me&&F.type==="assistant_message"){if(typeof F.text!="string")return;const q=W(F.text);q&&T(q),B({id:F.itemId,text:F.text}),b(K=>{const te=[...K],ne=te.findIndex(le=>(le==null?void 0:le.id)===F.itemId);return ne===-1?(te.push({id:F.itemId,role:"assistant",text:F.text}),te):(te[ne]={...te[ne],text:F.text},te)})}if(Me&&F.type==="action_request"){if(!F.id)return;b(q=>{const K=[...q];return K.findIndex(ne=>(ne==null?void 0:ne.id)===F.id)===-1&&K.push({id:F.id,role:"user",type:"action_request",text:F.text||`/${F.request||"run"} ${F.arg||""}`.trim(),action:{request:F.request,arg:F.arg}}),K})}if(Me&&F.type==="action_result"){if(!F.id)return;b(q=>{var ne;const K=[...q],te=K.findIndex(le=>(le==null?void 0:le.id)===F.id);return te!==-1&&((ne=K[te])==null?void 0:ne.type)==="action_result"||K.push({id:F.id,role:"assistant",type:"action_result",text:F.text||"",action:{request:F.request,arg:F.arg,status:F.status,output:F.output}}),K}),(F.request==="run"||F.request==="git")&&(U(),typeof H=="function"&&H())}if(Me&&F.type==="backlog_view"){if(!F.id)return;b(q=>{const K=[...q];return K.findIndex(ne=>(ne==null?void 0:ne.id)===F.id)===-1&&K.push({id:F.id,role:"assistant",type:"backlog_view",text:F.text||"Backlog",backlog:{items:Array.isArray(F.items)?F.items:[],page:Number.isFinite(F.page)?F.page:0}}),K})}if(Me&&F.type==="command_execution_delta"){if(typeof F.delta!="string")return;b(q=>{const K=[...q],te=c.get(F.itemId);if(te===void 0){const le={id:F.itemId,role:"commandExecution",command:d("Command"),output:F.delta,isExpandable:!0,status:"running"};return c.set(F.itemId,K.length),K.push(le),K}const ne={...K[te]};return ne.output=`${ne.output||""}${F.delta}`,ne.isExpandable=!0,K[te]=ne,K})}if(Me&&F.type==="command_execution_completed"){const q=F.item,K=F.itemId||(q==null?void 0:q.id);if(!K)return;b(te=>{var Ke;const ne=[...te],le=c.get(K),se=((Ke=q==null?void 0:q.commandActions)==null?void 0:Ke.command)||(q==null?void 0:q.command)||d("Command");if(le===void 0){const $e={id:K,role:"commandExecution",command:se,output:(q==null?void 0:q.aggregatedOutput)||"",isExpandable:!0,status:"completed"};return c.set(K,ne.length),ne.push($e),ne}const me={...ne[le]};return me.command=se,me.output=(q==null?void 0:q.aggregatedOutput)||me.output||"",me.isExpandable=!0,me.status="completed",ne[le]=me,ne})}if(Me&&F.type==="turn_error"&&(f(d("Error: {{message}}",{message:F.message})),A(null),T("")),Me&&F.type==="agent_reasoning"){const q=J(F.text);q&&T(q)}if(Me&&F.type==="error"&&(f(F.message||d("Unexpected error")),j(!1),M(F.message||d("Unexpected error"))),Ve&&F.type==="error"&&N(q=>{const K=new Map(q),te=K.get(ke);return te?(K.set(ke,{...te,modelLoading:!1,modelError:F.message||d("Unexpected error")}),K):q}),Me&&F.type==="turn_started"&&A(F.turnId||null),Me&&F.type==="turn_completed"){const q=((Lt=F==null?void 0:F.turn)==null?void 0:Lt.error)||(F==null?void 0:F.error)||null;if((q==null?void 0:q.codexErrorInfo)==="usageLimitExceeded"){const te=`usage-limit-${F.turnId||((ae=F.turn)==null?void 0:ae.id)||Date.now()}`,ne=(typeof q=="string"?q:q==null?void 0:q.message)||d("Usage limit reached. Please try again later.");b(le=>le.some(se=>se.id===te)?le:[...le,{id:te,role:"assistant",text:`⚠️ ${ne}`}])}A(null),T(""),U()}if(Me&&F.type==="repo_diff"&&X({status:F.status||"",diff:F.diff||""}),Me&&F.type==="model_list"){const q=Array.isArray(F.models)?F.models:[];O(q),F.provider&&z(te=>({...te,[F.provider]:{models:q,loading:!1,error:""}}));const K=q.find(te=>te.isDefault);K!=null&&K.model&&$(K.model),K!=null&&K.defaultReasoningEffort&&Y(K.defaultReasoningEffort),j(!1),M("")}if(Ve&&F.type==="model_list"){const q=Array.isArray(F.models)?F.models:[];N(K=>{const te=new Map(K),ne=te.get(ke);if(!ne)return K;const le=q.find(me=>me.isDefault),se=ne.model||(le==null?void 0:le.model)||null;return te.set(ke,{...ne,models:q,model:se,modelLoading:!1,modelError:""}),te})}if(Me&&F.type==="model_set"&&($(F.model||""),F.reasoningEffort!==void 0&&Y(F.reasoningEffort||""),j(!1),M("")),Ve&&F.type==="model_set"&&N(q=>{const K=new Map(q),te=K.get(ke);return te?(K.set(ke,{...te,model:F.model||null,reasoningEffort:F.reasoningEffort??te.reasoningEffort??null,modelLoading:!1,modelError:""}),K):q}),Me&&F.type==="rpc_log"){if(!h.current)return;F.entry&&V(q=>[...q,F.entry])}if(Me&&F.type==="session_sync"){if(!(F!=null&&F.session))return;const q=F.session;b((q.messages||[]).map((K,te)=>({...K,id:(K==null?void 0:K.id)||`history-${te}`,attachments:D((K==null?void 0:K.attachments)||[]),toolResult:K==null?void 0:K.toolResult}))),X(q.repoDiff||{status:"",diff:""}),q.provider&&z(K=>({...K,[q.provider]:{models:q.models||[],loading:!1,error:""}}))}if(Me&&F.type==="worktrees_list"&&_(F.worktrees||[]),Me&&F.type==="worktree_messages_sync"){if(F.worktreeId==="main"){u(F.messages||[]);return}N(q=>{const K=new Map(q),te=K.get(F.worktreeId);if(te){const ne=(F.messages||[]).map((me,Ke)=>({...me,id:(me==null?void 0:me.id)||`history-${Ke}`,attachments:D((me==null?void 0:me.attachments)||[]),toolResult:me==null?void 0:me.toolResult})),le=new Set(te.messages.map(me=>me==null?void 0:me.id).filter(Boolean)),se=[...te.messages];ne.forEach(me=>{me!=null&&me.id&&le.has(me.id)||(me!=null&&me.id&&le.add(me.id),se.push(me))}),K.set(F.worktreeId,{...te,messages:se,status:F.status??te.status})}return K})}if(F.type==="worktree_diff"&&N(q=>{const K=new Map(q),te=K.get(F.worktreeId);return te&&K.set(F.worktreeId,{...te,diff:{status:F.status,diff:F.diff}}),K}),Ve&&(F.type==="assistant_delta"||F.type==="assistant_message"||F.type==="action_request"||F.type==="action_result"||F.type==="backlog_view"||F.type==="command_execution_delta"||F.type==="command_execution_completed"||F.type==="turn_started"||F.type==="turn_completed"||F.type==="turn_error")){const q=F.worktreeId;if((F.type==="assistant_delta"||F.type==="command_execution_delta"||F.type==="command_execution_completed"||F.type==="item_started")&&N(K=>{const te=new Map(K),ne=te.get(q);return ne&&ne.status==="ready"&&te.set(q,{...ne,status:"processing"}),te}),F.type==="turn_started"&&N(K=>{const te=new Map(K),ne=te.get(q);return ne&&te.set(q,{...ne,currentTurnId:F.turnId,activity:d("Processing...")}),te}),F.type==="action_request"){if(!F.id)return;N(K=>{const te=new Map(K),ne=te.get(q);return ne&&te.set(q,{...ne,messages:[...ne.messages,{id:F.id,role:"user",type:"action_request",text:F.text||`/${F.request||"run"} ${F.arg||""}`.trim(),action:{request:F.request,arg:F.arg}}]}),te})}if(F.type==="action_result"){if(!F.id)return;N(K=>{const te=new Map(K),ne=te.get(q);return ne&&te.set(q,{...ne,messages:[...ne.messages,{id:F.id,role:"assistant",type:"action_result",text:F.text||"",action:{request:F.request,arg:F.arg,status:F.status,output:F.output}}]}),te}),(F.request==="run"||F.request==="git")&&(ee(q),typeof H=="function"&&q==="main"&&H())}if(F.type==="backlog_view"){if(!F.id)return;N(K=>{const te=new Map(K),ne=te.get(q);return ne&&te.set(q,{...ne,messages:[...ne.messages,{id:F.id,role:"assistant",type:"backlog_view",text:F.text||"Backlog",backlog:{items:Array.isArray(F.items)?F.items:[],page:Number.isFinite(F.page)?F.page:0}}]}),te})}if((F.type==="turn_completed"||F.type==="turn_error")&&N(K=>{const te=new Map(K),ne=te.get(q);return ne&&te.set(q,{...ne,currentTurnId:null,activity:"",taskLabel:""}),te}),F.type==="turn_completed"){const K=((ce=F==null?void 0:F.turn)==null?void 0:ce.error)||(F==null?void 0:F.error)||null;if((K==null?void 0:K.codexErrorInfo)==="usageLimitExceeded"){const ne=`usage-limit-${F.turnId||Date.now()}`,le=(typeof K=="string"?K:K==null?void 0:K.message)||d("Usage limit reached. Please try again later.");N(se=>{const me=new Map(se),Ke=me.get(q);return!Ke||Ke.messages.some($e=>$e.id===ne)?se:(me.set(q,{...Ke,messages:[...Ke.messages,{id:ne,role:"assistant",text:`⚠️ ${le}`}]}),me)})}ee(q)}if((F.type==="assistant_delta"||F.type==="assistant_message")&&(N(K=>{const te=new Map(K),ne=te.get(q);if(!ne)return K;const le=[...ne.messages],se=le.findIndex(me=>me.id===F.itemId);return F.type==="assistant_delta"?se===-1?le.push({id:F.itemId,role:"assistant",text:F.delta||""}):le[se]={...le[se],text:(le[se].text||"")+(F.delta||"")}:se===-1?le.push({id:F.itemId,role:"assistant",text:F.text||""}):le[se]={...le[se],text:F.text||""},te.set(q,{...ne,messages:le}),te}),F.type==="assistant_message"&&typeof F.text=="string")){const K=W(F.text);K&&N(te=>{const ne=new Map(te),le=ne.get(q);return le?(ne.set(q,{...le,taskLabel:K}),ne):te})}(F.type==="command_execution_delta"||F.type==="command_execution_completed")&&N(K=>{var Ke,$e;const te=new Map(K),ne=te.get(q);if(!ne)return K;const le=[...ne.messages],se=F.itemId||((Ke=F.item)==null?void 0:Ke.id),me=le.findIndex(Ye=>Ye.id===se);if(F.type==="command_execution_delta")me===-1?le.push({id:se,role:"commandExecution",command:d("Command"),output:F.delta||"",status:"running",isExpandable:!0}):le[me]={...le[me],output:(le[me].output||"")+(F.delta||"")};else{const Ye=F.item,bt=(($e=Ye==null?void 0:Ye.commandActions)==null?void 0:$e.command)||(Ye==null?void 0:Ye.command)||d("Command");me===-1?le.push({id:se,role:"commandExecution",command:bt,output:(Ye==null?void 0:Ye.aggregatedOutput)||"",status:"completed",isExpandable:!0}):le[me]={...le[me],command:bt,output:(Ye==null?void 0:Ye.aggregatedOutput)||le[me].output||"",status:"completed"}}return te.set(q,{...ne,messages:le}),te})}if(F.type==="agent_reasoning"&&Ve){const q=J(F.text);q&&N(K=>{const te=new Map(K),ne=te.get(F.worktreeId);return ne?(te.set(F.worktreeId,{...ne,taskLabel:q}),te):K})}if(F.type==="item_started"&&Ve){const q=G(F.item);if(!q)return;const K=F.worktreeId;N(te=>{const ne=new Map(te),le=ne.get(K);return le&&ne.set(K,{...le,activity:q}),ne})}if(F.type==="worktree_created"&&(N(q=>{const K=new Map(q);return K.set(F.worktreeId,{id:F.worktreeId,name:F.name,branchName:F.branchName,provider:F.provider,model:F.model||null,reasoningEffort:F.reasoningEffort||null,internetAccess:!!F.internetAccess,denyGitCredentialsAccess:typeof F.denyGitCredentialsAccess=="boolean"?F.denyGitCredentialsAccess:!0,status:F.status||"creating",color:F.color,models:[],modelLoading:!1,modelError:"",messages:[],activity:"",currentTurnId:null}),K}),P(q=>({...q,[F.worktreeId]:q[F.worktreeId]||"chat"})),R(q=>({...q,[F.worktreeId]:q[F.worktreeId]||"all"})),I(F.worktreeId)),F.type==="worktree_ready"&&N(q=>{const K=new Map(q),te=K.get(F.worktreeId);return te&&K.set(F.worktreeId,{...te,status:"ready"}),K}),F.type==="worktree_status"){if(F.worktreeId==="main"){if(!F.status)return;S==null||S(!0);const q=F.status;x(q==="processing"),C(q==="processing"?d("Processing..."):""),q!=="processing"&&T("");return}if(!F.status)return;N(q=>{const K=new Map(q),te=K.get(F.worktreeId);return te&&K.set(F.worktreeId,{...te,status:F.status,error:F.error||null,...F.status==="processing"?{}:{activity:"",taskLabel:"",currentTurnId:null}}),K})}F.type==="worktree_removed"&&(N(q=>{const K=new Map(q);return K.delete(F.worktreeId),K}),P(q=>{const K={...q};return delete K[F.worktreeId],K}),R(q=>{const K={...q};return delete K[F.worktreeId],K}),L.current===F.worktreeId&&I("main")),F.type==="worktree_renamed"&&N(q=>{const K=new Map(q),te=K.get(F.worktreeId);return te&&K.set(F.worktreeId,{...te,name:F.name}),K})}})};Oe();const Pe=()=>{if(document.hidden||!ve)return;o.current=Date.now();const Ce=r.current;if(Ce&&Ce.readyState===WebSocket.OPEN){Ce.send(JSON.stringify({type:"ping"})),v(),m();const Q=(L==null?void 0:L.current)||"main";Ce.send(JSON.stringify({type:"wake_up",worktreeId:Q}))}else ue(),i.current=0,Oe()};return document.addEventListener("visibilitychange",Pe),()=>{ve=!1,s.current=!0,ue(),Ae(),document.removeEventListener("visibilitychange",Pe),r.current&&r.current.close(),Fe(),s.current=!1}},[e,t,l,c,u,m,g,y,_,v,d]),k.useEffect(()=>{if(!e||!Z||!ge)return;const ve=r.current;!ve||ve.readyState!==WebSocket.OPEN||(ve.send(JSON.stringify({type:"account_login_start",provider:"codex",params:Z})),de(null))},[e,ge,Z,de,r])}const Rl="workspaceToken",Ol="workspaceRefreshToken",Ml="workspaceId",y7="workspace-auth",Js="workspaceRefreshLock",w7=15e3,b7=5e3,T0=1500,S7="mono_auth_token",Of=()=>{try{return localStorage.getItem(Rl)||""}catch{return""}},D0=()=>{try{return localStorage.getItem(Ol)||""}catch{return""}},I0=()=>{try{return localStorage.getItem(Ml)||""}catch{return""}},C7=()=>{const e=String(window.location.hash||"");if(!e||!e.startsWith("#"))return"";const t=e.slice(1);return(new URLSearchParams(t).get("mono_auth")||"").trim()},k7=()=>({codex:{enabled:!1,authType:"api_key",authValue:"",previousAuthType:"api_key"},claude:{enabled:!1,authType:"api_key",authValue:"",previousAuthType:"api_key"}}),x7=()=>({codex:!1,claude:!1}),N0=()=>({codex:"",claude:""});function E7({t:e,encodeBase64:t,copyTextToClipboard:r,extractRepoName:n,setSessionMode:i,showToast:s,getProviderAuthType:a}){const[o,l]=k.useState(1),[c,h]=k.useState("existing"),[u,m]=k.useState(I0()),[g,y]=k.useState(""),[_,v]=k.useState(Of()),[d,f]=k.useState(D0()),[p,w]=k.useState(I0()),[S,b]=k.useState(null),[x,C]=k.useState(""),[A,T]=k.useState(!1),[j,M]=k.useState([]),[O,z]=k.useState(!1),[$,Y]=k.useState(""),[X,V]=k.useState(null),[N,P]=k.useState({id:!1,secret:!1}),[R,I]=k.useState(!1),[L,W]=k.useState(1),[J,G]=k.useState(x7),[B,D]=k.useState(N0),[U,H]=k.useState(k7),[ee,Z]=k.useState(null),de=k.useRef(`tab-${Math.random().toString(36).slice(2)}-${Date.now()}`),ge=k.useRef(_),ve=k.useRef(d),Ee=k.useRef(null),ue=k.useRef(null),Ae=k.useRef([]),Fe=k.useRef({id:null,secret:null}),Re=k.useCallback(({token:ae="",refreshToken:ce=""}={})=>{typeof ae=="string"&&(ge.current=ae,v(ae)),typeof ce=="string"&&(ve.current=ce,f(ce))},[]),We=k.useCallback(ae=>{Ae.current.splice(0).forEach(q=>{try{q(ae||null)}catch{}})},[]),ot=k.useCallback((ae=b7)=>new Promise(ce=>{const q=setTimeout(()=>{const te=Ae.current.indexOf(K);te>=0&&Ae.current.splice(te,1),ce(null)},ae),K=te=>{clearTimeout(q),ce(te||null)};Ae.current.push(K)}),[]),Oe=k.useCallback((ae,ce={})=>{const q=ue.current;if(q)try{q.postMessage({type:ae,sourceTabId:de.current,...ce})}catch{}},[]),Pe=k.useCallback(()=>{const ae=Of(),ce=D0();return{token:ae||ge.current||"",refreshToken:ce||ve.current||""}},[]),Ce=k.useCallback(()=>{const ae=Date.now(),ce={owner:de.current,expiresAt:ae+w7};try{const q=localStorage.getItem(Js);if(q){const ne=JSON.parse(q);if(ne&&typeof ne.expiresAt=="number"&&ne.expiresAt>ae&&ne.owner!==de.current)return!1}localStorage.setItem(Js,JSON.stringify(ce));const K=localStorage.getItem(Js);if(!K)return!1;const te=JSON.parse(K);return(te==null?void 0:te.owner)===de.current}catch{return!0}},[]),Q=k.useCallback(()=>{try{const ae=localStorage.getItem(Js);if(!ae)return;const ce=JSON.parse(ae);(ce==null?void 0:ce.owner)===de.current&&localStorage.removeItem(Js)}catch{}},[]),oe=k.useCallback(()=>{Re({token:"",refreshToken:""}),w(""),m(""),y(""),b(null),C(""),h("existing"),M([]),Y(""),z(!1),l(1),I(!1),i&&i("new"),Oe("workspace_left",{}),We(null)},[Re,Oe,We,i]),ye=k.useCallback(async()=>{const ae=ve.current||Pe().refreshToken;if(!ae)return null;if(Ee.current)return Ee.current;const ce=(async()=>{let q=!1;try{if(q=Ce(),!q){const Ke=await ot();if(Ke)return Ke;const $e=Pe();if($e.token&&$e.token!==ge.current)return Re({token:$e.token,refreshToken:$e.refreshToken||ve.current}),$e.token;if(q=Ce(),!q)return null}Oe("refresh_started",{at:Date.now()});const te=Pe().refreshToken||ae;if(!te)return null;const ne=await fetch("/api/workspaces/refresh",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:te})});if(!ne.ok){const Ke=await ot(T0);if(Ke)return Ke;const $e=Pe();return $e.token&&$e.token!==ge.current?(Re({token:$e.token,refreshToken:$e.refreshToken||ve.current}),$e.token):null}const le=await ne.json(),se=(le==null?void 0:le.workspaceToken)||"",me=(le==null?void 0:le.refreshToken)||"";return se&&me?(Re({token:se,refreshToken:me}),Oe("refresh_succeeded",{at:Date.now(),workspaceToken:se,refreshToken:me}),We(se),se):null}catch{const K=await ot(T0);return K||null}finally{q&&Q(),Ee.current=null}})();return Ee.current=ce,ce},[Ce,Re,Oe,Pe,We,Q,ot]);k.useEffect(()=>{ge.current=_},[_]),k.useEffect(()=>{ve.current=d},[d]),k.useEffect(()=>{if(typeof BroadcastChannel!="function")return;const ae=new BroadcastChannel(y7);ue.current=ae;const ce=q=>{const K=q==null?void 0:q.data;!K||K.sourceTabId===de.current||(K.type==="refresh_succeeded"?(Re({token:K.workspaceToken||"",refreshToken:K.refreshToken||""}),We(K.workspaceToken||null)):K.type==="workspace_left"&&(Re({token:"",refreshToken:""}),w("")))};return ae.addEventListener("message",ce),()=>{ae.removeEventListener("message",ce),ae.close(),ue.current=null}},[Re,We]),k.useEffect(()=>{const ae=ce=>{if(!(!ce||!ce.key)){if(ce.key===Rl){const q=ce.newValue||"";ge.current=q,v(q),q&&We(q);return}if(ce.key===Ol){const q=ce.newValue||"";ve.current=q,f(q);return}ce.key===Ml&&w(ce.newValue||"")}};return window.addEventListener("storage",ae),()=>{window.removeEventListener("storage",ae)}},[We]);const F=k.useCallback(async(ae,ce={})=>{const q=new Headers(ce.headers||{}),K=ge.current||_;K&&q.set("Authorization",`Bearer ${K}`);const te=await fetch(ae,{...ce,headers:q});if(te.status!==401)return te;const ne=await ye();if(!ne){const se=ge.current||Of();if(se&&se!==K){const me=new Headers(ce.headers||{});return me.set("Authorization",`Bearer ${se}`),fetch(ae,{...ce,headers:me})}return te}const le=new Headers(ce.headers||{});return le.set("Authorization",`Bearer ${ne}`),fetch(ae,{...ce,headers:le})},[_,ye]);k.useEffect(()=>{let ae=!1;return(async()=>{try{const q=await fetch("/api/health");if(!q.ok)return;const K=await q.json();!ae&&(K!=null&&K.deploymentMode)&&Z(K.deploymentMode)}catch{}})(),()=>{ae=!0}},[]),k.useEffect(()=>{const ae=C7();if(!ae)return;let ce=!1;return(async()=>{try{const K=await fetch("/api/workspaces/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grantType:S7,monoAuthToken:ae})});if(!K.ok){const ne=await K.json().catch(()=>null),le=(ne==null?void 0:ne.error)||e("Automatic mono-user authentication failed.");ce||C(le);return}const te=await K.json();if(!(te!=null&&te.workspaceToken))return;ce||(v(te.workspaceToken||""),f(te.refreshToken||""),w("default"),m("default"),l(4),C(""))}catch{ce||C(e("Automatic mono-user authentication failed."))}finally{const K=new URL(window.location.href);K.hash.includes("mono_auth=")&&(K.hash="",window.history.replaceState({},"",K))}})(),()=>{ce=!0}},[_,e,w,m,f,l,v,C]),k.useEffect(()=>{try{_?localStorage.setItem(Rl,_):localStorage.removeItem(Rl)}catch{}},[_]),k.useEffect(()=>{try{d?localStorage.setItem(Ol,d):localStorage.removeItem(Ol)}catch{}},[d]),k.useEffect(()=>{try{p?localStorage.setItem(Ml,p):localStorage.removeItem(Ml)}catch{}},[p]),k.useEffect(()=>{if(!_){l(1);return}l(ae=>ae>=3?ae:4)},[_]);const ke=k.useCallback(async()=>{if(_){z(!0),Y("");try{const ae=await F("/api/sessions");if(!ae.ok){const K=await ae.json().catch(()=>null);throw new Error((K==null?void 0:K.error)||e("Unable to load sessions."))}const ce=await ae.json(),q=Array.isArray(ce==null?void 0:ce.sessions)?ce.sessions:[];M(q)}catch(ae){Y(ae.message||e("Unable to load sessions."))}finally{z(!1)}}},[F,_,oe,e]);k.useEffect(()=>{!_||o!==4||ke()},[o,_,ke]);const re=k.useCallback(async()=>{const ae=(p||u||"").trim();if(ae){T(!0),C("");try{const ce=await F(`/api/workspaces/${encodeURIComponent(ae)}`);if(!ce.ok){const te=await ce.json().catch(()=>null);throw new Error((te==null?void 0:te.error)||e("Unable to load providers."))}const q=await ce.json(),K=(q==null?void 0:q.providers)||{};H(te=>{var ne,le,se,me,Ke,$e,Ye,bt,Ci,qe;return{codex:{...te.codex,enabled:!!((ne=K==null?void 0:K.codex)!=null&&ne.enabled),authType:((se=(le=K==null?void 0:K.codex)==null?void 0:le.auth)==null?void 0:se.type)||"api_key",previousAuthType:((Ke=(me=K==null?void 0:K.codex)==null?void 0:me.auth)==null?void 0:Ke.type)||"api_key",authValue:""},claude:{...te.claude,enabled:!!(($e=K==null?void 0:K.claude)!=null&&$e.enabled),authType:((bt=(Ye=K==null?void 0:K.claude)==null?void 0:Ye.auth)==null?void 0:bt.type)||"api_key",previousAuthType:((qe=(Ci=K==null?void 0:K.claude)==null?void 0:Ci.auth)==null?void 0:qe.type)||"api_key",authValue:""}}}),G(te=>{var ne,le;return{...te,codex:!!((ne=K==null?void 0:K.codex)!=null&&ne.enabled),claude:!!((le=K==null?void 0:K.claude)!=null&&le.enabled)}}),D(N0())}catch(ce){C(ce.message||e("Unable to load providers."))}finally{T(!1)}}},[F,oe,e,p,u]),we=async ae=>{ae.preventDefault(),C(""),T(!0);try{if(c==="existing"){const ce=u.trim(),q=g.trim();if(!ce||!q)throw new Error(e("Workspace ID and secret are required."));const K=await F("/api/workspaces/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspaceId:ce,workspaceSecret:q})});if(!K.ok){const ne=await K.json().catch(()=>null);throw new Error((ne==null?void 0:ne.error)||e("Authentication failed."))}const te=await K.json();v(te.workspaceToken||""),f(te.refreshToken||""),w(ce),l(4);return}I(!1),W(1),l(2)}catch(ce){C(ce.message||e("Workspace configuration failed."))}finally{T(!1)}},Ve=async ae=>{ae.preventDefault(),C(""),T(!0);try{const ce={};if(["codex","claude"].forEach(le=>{const se=U[le];if(!(se!=null&&se.enabled)){ce[le]={enabled:!1};return}const me=(se.authValue||"").trim(),Ke=a(le,se)||"api_key";if(R&&se.previousAuthType&&Ke!==se.previousAuthType&&!me)throw new Error(e("Key required for {{provider}}.",{provider:le}));if(!R&&!me)throw new Error(e("Key required for {{provider}}.",{provider:le}));if(me){const $e=Ke==="auth_json_b64"&&t?t(me):me;ce[le]={enabled:!0,auth:{type:Ke,value:$e}}}else ce[le]={enabled:!0,auth:{type:Ke}}}),Object.keys(ce).length===0)throw new Error(e("Select at least one provider."));if(R){const le=(p||u||"").trim();if(!le)throw new Error(e("Workspace ID required."));const se=await F(`/api/workspaces/${encodeURIComponent(le)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providers:ce})});if(!se.ok){const me=await se.json().catch(()=>null);throw new Error((me==null?void 0:me.error)||e("Workspace update failed."))}await se.json().catch(()=>null),I(!1),l(4),s==null||s(e("AI providers updated."),"success");return}const q=await F("/api/workspaces",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providers:ce})});if(!q.ok){const le=await q.json().catch(()=>null);throw new Error((le==null?void 0:le.error)||e("Workspace creation failed."))}const K=await q.json();b(K),w(K.workspaceId),m(K.workspaceId);const te=await F("/api/workspaces/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspaceId:K.workspaceId,workspaceSecret:K.workspaceSecret})});if(!te.ok){const le=await te.json().catch(()=>null);throw new Error((le==null?void 0:le.error)||e("Authentication failed."))}const ne=await te.json();v(ne.workspaceToken||""),f(ne.refreshToken||""),l(3)}catch(ce){C(ce.message||e("Workspace configuration failed."))}finally{T(!1)}},Me=k.useCallback((ae,ce)=>{if(!ce)return;r&&r(ce),P(K=>({...K,[ae]:!0}));const q=Fe.current;q[ae]&&clearTimeout(q[ae]),q[ae]=setTimeout(()=>{P(K=>({...K,[ae]:!1})),q[ae]=null},2e3)},[]);return k.useEffect(()=>()=>{Object.values(Fe.current||{}).forEach(ae=>{ae&&clearTimeout(ae)})},[]),{apiFetch:F,deploymentMode:ee,handleDeleteSession:async ae=>{const ce=ae==null?void 0:ae.sessionId;if(!ce)return;const q=n==null?void 0:n((ae==null?void 0:ae.repoUrl)||""),K=(ae==null?void 0:ae.name)||q||ce;if(window.confirm(e('Supprimer la session "{{title}}" ? Cette action est irreversible.',{title:K})))try{V(ce),Y("");const ne=await F(`/api/sessions/${encodeURIComponent(ce)}`,{method:"DELETE"});if(!ne.ok){let le="";try{const me=await ne.json();typeof(me==null?void 0:me.error)=="string"&&(le=me.error)}catch{}const se=le?`: ${le}`:"";throw new Error(e("Unable to delete the session{{suffix}}.",{suffix:se}))}await ke(),s==null||s(e('Session "{{title}}" supprimee.',{title:K}),"success")}catch(ne){Y(ne.message||e("Unable to delete the session."))}finally{V(null)}},handleLeaveWorkspace:oe,handleWorkspaceCopy:Me,handleWorkspaceProvidersSubmit:Ve,handleWorkspaceSubmit:we,loadWorkspaceProviders:re,loadWorkspaceSessions:ke,providersBackStep:L,refreshWorkspaceToken:ye,setProvidersBackStep:W,setWorkspaceAuthExpanded:G,setWorkspaceAuthFiles:D,setWorkspaceError:C,setWorkspaceId:w,setWorkspaceIdInput:m,setWorkspaceMode:h,setWorkspaceProviders:H,setWorkspaceProvidersEditing:I,setWorkspaceRefreshToken:f,setWorkspaceSecretInput:y,setWorkspaceStep:l,setWorkspaceToken:v,workspaceAuthExpanded:J,workspaceAuthFiles:B,workspaceBusy:A,workspaceCopied:N,workspaceCreated:S,workspaceError:x,workspaceId:p,workspaceIdInput:u,workspaceMode:c,workspaceProviders:U,workspaceProvidersEditing:R,workspaceSecretInput:g,workspaceSessionDeletingId:X,workspaceSessions:j,workspaceSessionsError:$,workspaceSessionsLoading:O,workspaceStep:o,workspaceToken:_}}function A7({apiFetch:e,attachmentSessionId:t,availableProviders:r,llmProvider:n,messagesRef:i,normalizeAttachments:s,applyMessages:a,socketRef:o,setPaneByTab:l,setLogFilterByTab:c,showToast:h,t:u}){const[m,g]=k.useState(new Map),y=k.useRef(new Map),[_,v]=k.useState("main"),d=k.useRef("main");k.useEffect(()=>{y.current=m},[m]),k.useEffect(()=>{d.current=_},[_]);const f=k.useCallback(M=>{var O;if(!Array.isArray(M))return null;for(let z=M.length-1;z>=0;z-=1)if((O=M[z])!=null&&O.id)return M[z].id;return null},[]),p=k.useCallback(async()=>{if(t)try{const M=await e(`/api/sessions/${encodeURIComponent(t)}/worktrees/main/messages`);if(!M.ok)return;const O=await M.json().catch(()=>({}));if(Array.isArray(O==null?void 0:O.messages)){const z=O.messages.map(($,Y)=>({...$,id:($==null?void 0:$.id)||`history-${Y}`,attachments:s(($==null?void 0:$.attachments)||[]),toolResult:$==null?void 0:$.toolResult}));a(z)}}catch{}},[t,e,a,s]),w=k.useCallback(async M=>{if(!(!t||!M)){if(M==="main"){await p();return}try{const O=await e(`/api/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(M)}`);if(!O.ok)return;const z=await O.json().catch(()=>({})),$=await e(`/api/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(M)}/messages`);if(!$.ok)return;const Y=await $.json().catch(()=>({}));if(!Array.isArray(Y==null?void 0:Y.messages))return;const X=Y.messages.map((V,N)=>({...V,id:(V==null?void 0:V.id)||`history-${N}`,attachments:s((V==null?void 0:V.attachments)||[]),toolResult:V==null?void 0:V.toolResult}));g(V=>{const N=new Map(V),P=N.get(M);return P&&N.set(M,{...P,messages:X,status:z.status||P.status}),N})}catch{}}},[t,e,p,s]),S=k.useCallback(M=>{var Y;const O=o==null?void 0:o.current;if(!O||O.readyState!==WebSocket.OPEN||!M)return;const z=y.current,$=f(M==="main"?i.current:(Y=z.get(M))==null?void 0:Y.messages);O.send(JSON.stringify({type:"worktree_messages_sync",worktreeId:M,lastSeenMessageId:$}))},[f,i,o]),b=k.useCallback(M=>{if(!Array.isArray(M))return;const O=new Map;M.forEach(z=>{O.set(z.id,{...z,status:(z==null?void 0:z.status)||"processing",messages:[],models:[],modelLoading:!1,modelError:"",activity:"",currentTurnId:null})}),g(O),l(z=>{const $={...z};return M.forEach(Y=>{$[Y.id]||($[Y.id]="chat")}),$}),c(z=>{const $={...z};return M.forEach(Y=>{$[Y.id]||($[Y.id]="all")}),$}),d.current!=="main"&&!M.some(z=>z.id===d.current)&&v("main")},[c,l]),x=k.useCallback(async()=>{if(t)try{const M=await e(`/api/sessions/${encodeURIComponent(t)}/worktrees`);if(!M.ok)return;const O=await M.json();b(O==null?void 0:O.worktrees)}catch{}},[t,e,b]),C=k.useCallback(M=>{if(!M)return;v(M);const O=o==null?void 0:o.current;O&&O.readyState===WebSocket.OPEN&&O.send(JSON.stringify({type:"wake_up",worktreeId:M})),w(M)},[w,o]),A=k.useCallback(async({context:M,name:O,provider:z,sourceWorktree:$,startingBranch:Y,model:X,reasoningEffort:V,internetAccess:N,denyGitCredentialsAccess:P})=>{if(!t){h==null||h(u("Session not found."),"error");return}try{const R=await e(`/api/sessions/${encodeURIComponent(t)}/worktrees`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:M==="fork"?"fork":"new",provider:M==="new"?r.includes(z)?z:n:void 0,sourceWorktree:M==="fork"?$||null:void 0,name:O||null,startingBranch:Y||null,model:M==="new"?X||null:void 0,reasoningEffort:M==="new"?V??null:void 0,internetAccess:!!N,denyGitCredentialsAccess:!!P})});if(!R.ok){const L=await R.json().catch(()=>null);throw new Error((L==null?void 0:L.error)||u("Failed to create parallel request."))}const I=await R.json();g(L=>{const W=new Map(L);return W.set(I.worktreeId,{id:I.worktreeId,name:I.name,branchName:I.branchName,provider:I.provider,model:I.model||null,reasoningEffort:I.reasoningEffort||null,context:I.context||"new",sourceWorktreeId:I.sourceWorktreeId||null,internetAccess:!!I.internetAccess,denyGitCredentialsAccess:!!I.denyGitCredentialsAccess,status:I.status||"creating",color:I.color,messages:[],activity:"",currentTurnId:null}),W}),l(L=>({...L,[I.worktreeId]:L[I.worktreeId]||"chat"})),c(L=>({...L,[I.worktreeId]:L[I.worktreeId]||"all"})),v(I.worktreeId),x()}catch(R){h==null||h(R.message||u("Failed to create parallel request."),"error")}},[e,t,r,n,x,c,l,h,u]),T=k.useCallback(async M=>{if(t)try{(await e(`/api/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(M)}`,{method:"DELETE"})).ok||console.error("Failed to close worktree")}catch(O){console.error("Error closing worktree:",O)}},[t,e]),j=k.useCallback(async(M,O)=>{if(t)try{(await e(`/api/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(M)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:O})})).ok||console.error("Failed to rename worktree")}catch(z){console.error("Error renaming worktree:",z)}},[t,e]);return{activeWorktreeId:_,activeWorktreeIdRef:d,applyWorktreesList:b,closeWorktree:T,createWorktree:A,handleSelectWorktree:C,loadMainWorktreeSnapshot:p,loadWorktreeSnapshot:w,requestWorktreeMessages:S,requestWorktreesList:x,renameWorktreeHandler:j,setActiveWorktreeId:v,setWorktrees:g,worktrees:m}}var yC={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(globalThis,()=>(()=>{var r={4567:function(a,o,l){var c=this&&this.__decorate||function(f,p,w,S){var b,x=arguments.length,C=x<3?p:S===null?S=Object.getOwnPropertyDescriptor(p,w):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,p,w,S);else for(var A=f.length-1;A>=0;A--)(b=f[A])&&(C=(x<3?b(C):x>3?b(p,w,C):b(p,w))||C);return x>3&&C&&Object.defineProperty(p,w,C),C},h=this&&this.__param||function(f,p){return function(w,S){p(w,S,f)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const u=l(9042),m=l(9924),g=l(844),y=l(4725),_=l(2585),v=l(3656);let d=o.AccessibilityManager=class extends g.Disposable{constructor(f,p,w,S){super(),this._terminal=f,this._coreBrowserService=w,this._renderService=S,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let b=0;b<this._terminal.rows;b++)this._rowElements[b]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[b]);if(this._topBoundaryFocusListener=b=>this._handleBoundaryFocus(b,0),this._bottomBoundaryFocusListener=b=>this._handleBoundaryFocus(b,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new m.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(b=>this._handleResize(b.rows))),this.register(this._terminal.onRender(b=>this._refreshRows(b.start,b.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(b=>this._handleChar(b))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
692
+ `))),this.register(this._terminal.onA11yTab(b=>this._handleTab(b))),this.register(this._terminal.onKey(b=>this._handleKey(b.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,v.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,g.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(f){for(let p=0;p<f;p++)this._handleChar(" ")}_handleChar(f){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==f&&(this._charsToAnnounce+=f):this._charsToAnnounce+=f,f===`
693
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(f){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(f)||this._charsToConsume.push(f)}_refreshRows(f,p){this._liveRegionDebouncer.refresh(f,p,this._terminal.rows)}_renderRows(f,p){const w=this._terminal.buffer,S=w.lines.length.toString();for(let b=f;b<=p;b++){const x=w.lines.get(w.ydisp+b),C=[],A=(x==null?void 0:x.translateToString(!0,void 0,void 0,C))||"",T=(w.ydisp+b+1).toString(),j=this._rowElements[b];j&&(A.length===0?(j.innerText=" ",this._rowColumns.set(j,[0,1])):(j.textContent=A,this._rowColumns.set(j,C)),j.setAttribute("aria-posinset",T),j.setAttribute("aria-setsize",S))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(f,p){const w=f.target,S=this._rowElements[p===0?1:this._rowElements.length-2];if(w.getAttribute("aria-posinset")===(p===0?"1":`${this._terminal.buffer.lines.length}`)||f.relatedTarget!==S)return;let b,x;if(p===0?(b=w,x=this._rowElements.pop(),this._rowContainer.removeChild(x)):(b=this._rowElements.shift(),x=w,this._rowContainer.removeChild(b)),b.removeEventListener("focus",this._topBoundaryFocusListener),x.removeEventListener("focus",this._bottomBoundaryFocusListener),p===0){const C=this._createAccessibilityTreeNode();this._rowElements.unshift(C),this._rowContainer.insertAdjacentElement("afterbegin",C)}else{const C=this._createAccessibilityTreeNode();this._rowElements.push(C),this._rowContainer.appendChild(C)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(p===0?-1:1),this._rowElements[p===0?1:this._rowElements.length-2].focus(),f.preventDefault(),f.stopImmediatePropagation()}_handleSelectionChange(){var A;if(this._rowElements.length===0)return;const f=document.getSelection();if(!f)return;if(f.isCollapsed)return void(this._rowContainer.contains(f.anchorNode)&&this._terminal.clearSelection());if(!f.anchorNode||!f.focusNode)return void console.error("anchorNode and/or focusNode are null");let p={node:f.anchorNode,offset:f.anchorOffset},w={node:f.focusNode,offset:f.focusOffset};if((p.node.compareDocumentPosition(w.node)&Node.DOCUMENT_POSITION_PRECEDING||p.node===w.node&&p.offset>w.offset)&&([p,w]=[w,p]),p.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(p={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(p.node))return;const S=this._rowElements.slice(-1)[0];if(w.node.compareDocumentPosition(S)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(w={node:S,offset:((A=S.textContent)==null?void 0:A.length)??0}),!this._rowContainer.contains(w.node))return;const b=({node:T,offset:j})=>{const M=T instanceof Text?T.parentNode:T;let O=parseInt(M==null?void 0:M.getAttribute("aria-posinset"),10)-1;if(isNaN(O))return console.warn("row is invalid. Race condition?"),null;const z=this._rowColumns.get(M);if(!z)return console.warn("columns is null. Race condition?"),null;let $=j<z.length?z[j]:z.slice(-1)[0]+1;return $>=this._terminal.cols&&(++O,$=0),{row:O,column:$}},x=b(p),C=b(w);if(x&&C){if(x.row>C.row||x.row===C.row&&x.column>=C.column)throw new Error("invalid range");this._terminal.select(x.column,x.row,(C.row-x.row)*this._terminal.cols-x.column+C.column)}}_handleResize(f){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let p=this._rowContainer.children.length;p<this._terminal.rows;p++)this._rowElements[p]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[p]);for(;this._rowElements.length>f;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const f=this._coreBrowserService.mainDocument.createElement("div");return f.setAttribute("role","listitem"),f.tabIndex=-1,this._refreshRowDimensions(f),f}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let f=0;f<this._terminal.rows;f++)this._refreshRowDimensions(this._rowElements[f])}}_refreshRowDimensions(f){f.style.height=`${this._renderService.dimensions.css.cell.height}px`}};o.AccessibilityManager=d=c([h(1,_.IInstantiationService),h(2,y.ICoreBrowserService),h(3,y.IRenderService)],d)},3614:(a,o)=>{function l(m){return m.replace(/\r?\n/g,"\r")}function c(m,g){return g?"\x1B[200~"+m+"\x1B[201~":m}function h(m,g,y,_){m=c(m=l(m),y.decPrivateModes.bracketedPasteMode&&_.rawOptions.ignoreBracketedPasteMode!==!0),y.triggerDataEvent(m,!0),g.value=""}function u(m,g,y){const _=y.getBoundingClientRect(),v=m.clientX-_.left-10,d=m.clientY-_.top-10;g.style.width="20px",g.style.height="20px",g.style.left=`${v}px`,g.style.top=`${d}px`,g.style.zIndex="1000",g.focus()}Object.defineProperty(o,"__esModule",{value:!0}),o.rightClickHandler=o.moveTextAreaUnderMouseCursor=o.paste=o.handlePasteEvent=o.copyHandler=o.bracketTextForPaste=o.prepareTextForTerminal=void 0,o.prepareTextForTerminal=l,o.bracketTextForPaste=c,o.copyHandler=function(m,g){m.clipboardData&&m.clipboardData.setData("text/plain",g.selectionText),m.preventDefault()},o.handlePasteEvent=function(m,g,y,_){m.stopPropagation(),m.clipboardData&&h(m.clipboardData.getData("text/plain"),g,y,_)},o.paste=h,o.moveTextAreaUnderMouseCursor=u,o.rightClickHandler=function(m,g,y,_,v){u(m,g,y),v&&_.rightClickSelect(m),g.value=_.selectionText,g.select()}},7239:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;const c=l(1505);o.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(h,u,m){this._css.set(h,u,m)}getCss(h,u){return this._css.get(h,u)}setColor(h,u,m){this._color.set(h,u,m)}getColor(h,u){return this._color.get(h,u)}clear(){this._color.clear(),this._css.clear()}}},3656:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(l,c,h,u){l.addEventListener(c,h,u);let m=!1;return{dispose:()=>{m||(m=!0,l.removeEventListener(c,h,u))}}}},3551:function(a,o,l){var c=this&&this.__decorate||function(d,f,p,w){var S,b=arguments.length,x=b<3?f:w===null?w=Object.getOwnPropertyDescriptor(f,p):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(d,f,p,w);else for(var C=d.length-1;C>=0;C--)(S=d[C])&&(x=(b<3?S(x):b>3?S(f,p,x):S(f,p))||x);return b>3&&x&&Object.defineProperty(f,p,x),x},h=this&&this.__param||function(d,f){return function(p,w){f(p,w,d)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier=void 0;const u=l(3656),m=l(8460),g=l(844),y=l(2585),_=l(4725);let v=o.Linkifier=class extends g.Disposable{get currentLink(){return this._currentLink}constructor(d,f,p,w,S){super(),this._element=d,this._mouseService=f,this._renderService=p,this._bufferService=w,this._linkProviderService=S,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new m.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new m.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,g.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,g.toDisposable)(()=>{var b;this._lastMouseEvent=void 0,(b=this._activeProviderReplies)==null||b.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,u.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,u.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(d){this._lastMouseEvent=d;const f=this._positionFromMouseEvent(d,this._element,this._mouseService);if(!f)return;this._isMouseOut=!1;const p=d.composedPath();for(let w=0;w<p.length;w++){const S=p[w];if(S.classList.contains("xterm"))break;if(S.classList.contains("xterm-hover"))return}this._lastBufferCell&&f.x===this._lastBufferCell.x&&f.y===this._lastBufferCell.y||(this._handleHover(f),this._lastBufferCell=f)}_handleHover(d){if(this._activeLine!==d.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(d,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,d)||(this._clearCurrentLink(),this._askForLink(d,!0))}_askForLink(d,f){var w,S;this._activeProviderReplies&&f||((w=this._activeProviderReplies)==null||w.forEach(b=>{b==null||b.forEach(x=>{x.link.dispose&&x.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=d.y);let p=!1;for(const[b,x]of this._linkProviderService.linkProviders.entries())f?(S=this._activeProviderReplies)!=null&&S.get(b)&&(p=this._checkLinkProviderResult(b,d,p)):x.provideLinks(d.y,C=>{var T,j;if(this._isMouseOut)return;const A=C==null?void 0:C.map(M=>({link:M}));(T=this._activeProviderReplies)==null||T.set(b,A),p=this._checkLinkProviderResult(b,d,p),((j=this._activeProviderReplies)==null?void 0:j.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(d.y,this._activeProviderReplies)})}_removeIntersectingLinks(d,f){const p=new Set;for(let w=0;w<f.size;w++){const S=f.get(w);if(S)for(let b=0;b<S.length;b++){const x=S[b],C=x.link.range.start.y<d?0:x.link.range.start.x,A=x.link.range.end.y>d?this._bufferService.cols:x.link.range.end.x;for(let T=C;T<=A;T++){if(p.has(T)){S.splice(b--,1);break}p.add(T)}}}}_checkLinkProviderResult(d,f,p){var b;if(!this._activeProviderReplies)return p;const w=this._activeProviderReplies.get(d);let S=!1;for(let x=0;x<d;x++)this._activeProviderReplies.has(x)&&!this._activeProviderReplies.get(x)||(S=!0);if(!S&&w){const x=w.find(C=>this._linkAtPosition(C.link,f));x&&(p=!0,this._handleNewLink(x))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!p)for(let x=0;x<this._activeProviderReplies.size;x++){const C=(b=this._activeProviderReplies.get(x))==null?void 0:b.find(A=>this._linkAtPosition(A.link,f));if(C){p=!0,this._handleNewLink(C);break}}return p}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(d){if(!this._currentLink)return;const f=this._positionFromMouseEvent(d,this._element,this._mouseService);f&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,f)&&this._currentLink.link.activate(d,this._currentLink.link.text)}_clearCurrentLink(d,f){this._currentLink&&this._lastMouseEvent&&(!d||!f||this._currentLink.link.range.start.y>=d&&this._currentLink.link.range.end.y<=f)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,g.disposeArray)(this._linkCacheDisposables))}_handleNewLink(d){if(!this._lastMouseEvent)return;const f=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);f&&this._linkAtPosition(d.link,f)&&(this._currentLink=d,this._currentLink.state={decorations:{underline:d.link.decorations===void 0||d.link.decorations.underline,pointerCursor:d.link.decorations===void 0||d.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,d.link,this._lastMouseEvent),d.link.decorations={},Object.defineProperties(d.link.decorations,{pointerCursor:{get:()=>{var p,w;return(w=(p=this._currentLink)==null?void 0:p.state)==null?void 0:w.decorations.pointerCursor},set:p=>{var w;(w=this._currentLink)!=null&&w.state&&this._currentLink.state.decorations.pointerCursor!==p&&(this._currentLink.state.decorations.pointerCursor=p,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",p))}},underline:{get:()=>{var p,w;return(w=(p=this._currentLink)==null?void 0:p.state)==null?void 0:w.decorations.underline},set:p=>{var w,S,b;(w=this._currentLink)!=null&&w.state&&((b=(S=this._currentLink)==null?void 0:S.state)==null?void 0:b.decorations.underline)!==p&&(this._currentLink.state.decorations.underline=p,this._currentLink.state.isHovered&&this._fireUnderlineEvent(d.link,p))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(p=>{if(!this._currentLink)return;const w=p.start===0?0:p.start+1+this._bufferService.buffer.ydisp,S=this._bufferService.buffer.ydisp+1+p.end;if(this._currentLink.link.range.start.y>=w&&this._currentLink.link.range.end.y<=S&&(this._clearCurrentLink(w,S),this._lastMouseEvent)){const b=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);b&&this._askForLink(b,!1)}})))}_linkHover(d,f,p){var w;(w=this._currentLink)!=null&&w.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(f,!0),this._currentLink.state.decorations.pointerCursor&&d.classList.add("xterm-cursor-pointer")),f.hover&&f.hover(p,f.text)}_fireUnderlineEvent(d,f){const p=d.range,w=this._bufferService.buffer.ydisp,S=this._createLinkUnderlineEvent(p.start.x-1,p.start.y-w-1,p.end.x,p.end.y-w-1,void 0);(f?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(S)}_linkLeave(d,f,p){var w;(w=this._currentLink)!=null&&w.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(f,!1),this._currentLink.state.decorations.pointerCursor&&d.classList.remove("xterm-cursor-pointer")),f.leave&&f.leave(p,f.text)}_linkAtPosition(d,f){const p=d.range.start.y*this._bufferService.cols+d.range.start.x,w=d.range.end.y*this._bufferService.cols+d.range.end.x,S=f.y*this._bufferService.cols+f.x;return p<=S&&S<=w}_positionFromMouseEvent(d,f,p){const w=p.getCoords(d,f,this._bufferService.cols,this._bufferService.rows);if(w)return{x:w[0],y:w[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(d,f,p,w,S){return{x1:d,y1:f,x2:p,y2:w,cols:this._bufferService.cols,fg:S}}};o.Linkifier=v=c([h(1,_.IMouseService),h(2,_.IRenderService),h(3,y.IBufferService),h(4,_.ILinkProviderService)],v)},9042:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.tooMuchOutput=o.promptLabel=void 0,o.promptLabel="Terminal input",o.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(a,o,l){var c=this&&this.__decorate||function(_,v,d,f){var p,w=arguments.length,S=w<3?v:f===null?f=Object.getOwnPropertyDescriptor(v,d):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(_,v,d,f);else for(var b=_.length-1;b>=0;b--)(p=_[b])&&(S=(w<3?p(S):w>3?p(v,d,S):p(v,d))||S);return w>3&&S&&Object.defineProperty(v,d,S),S},h=this&&this.__param||function(_,v){return function(d,f){v(d,f,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkProvider=void 0;const u=l(511),m=l(2585);let g=o.OscLinkProvider=class{constructor(_,v,d){this._bufferService=_,this._optionsService=v,this._oscLinkService=d}provideLinks(_,v){var A;const d=this._bufferService.buffer.lines.get(_-1);if(!d)return void v(void 0);const f=[],p=this._optionsService.rawOptions.linkHandler,w=new u.CellData,S=d.getTrimmedLength();let b=-1,x=-1,C=!1;for(let T=0;T<S;T++)if(x!==-1||d.hasContent(T)){if(d.loadCell(T,w),w.hasExtendedAttrs()&&w.extended.urlId){if(x===-1){x=T,b=w.extended.urlId;continue}C=w.extended.urlId!==b}else x!==-1&&(C=!0);if(C||x!==-1&&T===S-1){const j=(A=this._oscLinkService.getLinkData(b))==null?void 0:A.uri;if(j){const M={start:{x:x+1,y:_},end:{x:T+(C||T!==S-1?0:1),y:_}};let O=!1;if(!(p!=null&&p.allowNonHttpProtocols))try{const z=new URL(j);["http:","https:"].includes(z.protocol)||(O=!0)}catch{O=!0}O||f.push({text:j,range:M,activate:(z,$)=>p?p.activate(z,$,M):y(0,$),hover:(z,$)=>{var Y;return(Y=p==null?void 0:p.hover)==null?void 0:Y.call(p,z,$,M)},leave:(z,$)=>{var Y;return(Y=p==null?void 0:p.leave)==null?void 0:Y.call(p,z,$,M)}})}C=!1,w.hasExtendedAttrs()&&w.extended.urlId?(x=T,b=w.extended.urlId):(x=-1,b=-1)}}v(f)}};function y(_,v){if(confirm(`Do you want to navigate to ${v}?
694
+
695
+ WARNING: This link could potentially be dangerous`)){const d=window.open();if(d){try{d.opener=null}catch{}d.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=g=c([h(0,m.IBufferService),h(1,m.IOptionsService),h(2,m.IOscLinkService)],g)},6193:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0,o.RenderDebouncer=class{constructor(l,c){this._renderCallback=l,this._coreBrowserService=c,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(l){return this._refreshCallbacks.push(l),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(l,c,h){this._rowCount=h,l=l!==void 0?l:0,c=c!==void 0?c:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,l):l,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,c):c,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const l=Math.max(this._rowStart,0),c=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(l,c),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const l of this._refreshCallbacks)l(0);this._refreshCallbacks=[]}}},3236:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const c=l(3614),h=l(3656),u=l(3551),m=l(9042),g=l(3730),y=l(1680),_=l(3107),v=l(5744),d=l(2950),f=l(1296),p=l(428),w=l(4269),S=l(5114),b=l(8934),x=l(3230),C=l(9312),A=l(4725),T=l(6731),j=l(8055),M=l(8969),O=l(8460),z=l(844),$=l(6114),Y=l(8437),X=l(2584),V=l(7399),N=l(5941),P=l(9074),R=l(2585),I=l(5435),L=l(4567),W=l(779);class J extends M.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(B={}){super(B),this.browser=$,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new z.MutableDisposable),this._onCursorMove=this.register(new O.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new O.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new O.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new O.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new O.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new O.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new O.EventEmitter),this._onBlur=this.register(new O.EventEmitter),this._onA11yCharEmitter=this.register(new O.EventEmitter),this._onA11yTabEmitter=this.register(new O.EventEmitter),this._onWillOpen=this.register(new O.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(P.DecorationService),this._instantiationService.setService(R.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(W.LinkProviderService),this._instantiationService.setService(A.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(g.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((D,U)=>this.refresh(D,U))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(D=>this._reportWindowsOptions(D))),this.register(this._inputHandler.onColor(D=>this._handleColorEvent(D))),this.register((0,O.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,O.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,O.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,O.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(D=>this._afterResize(D.cols,D.rows))),this.register((0,z.toDisposable)(()=>{var D,U;this._customKeyEventHandler=void 0,(U=(D=this.element)==null?void 0:D.parentNode)==null||U.removeChild(this.element)}))}_handleColorEvent(B){if(this._themeService)for(const D of B){let U,H="";switch(D.index){case 256:U="foreground",H="10";break;case 257:U="background",H="11";break;case 258:U="cursor",H="12";break;default:U="ansi",H="4;"+D.index}switch(D.type){case 0:const ee=j.color.toColorRGB(U==="ansi"?this._themeService.colors.ansi[D.index]:this._themeService.colors[U]);this.coreService.triggerDataEvent(`${X.C0.ESC}]${H};${(0,N.toRgbString)(ee)}${X.C1_ESCAPED.ST}`);break;case 1:if(U==="ansi")this._themeService.modifyColors(Z=>Z.ansi[D.index]=j.channels.toColor(...D.color));else{const Z=U;this._themeService.modifyColors(de=>de[Z]=j.channels.toColor(...D.color))}break;case 2:this._themeService.restoreColor(D.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(B){B?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(L.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(B){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(X.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var B;return(B=this.textarea)==null?void 0:B.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(X.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const B=this.buffer.ybase+this.buffer.y,D=this.buffer.lines.get(B);if(!D)return;const U=Math.min(this.buffer.x,this.cols-1),H=this._renderService.dimensions.css.cell.height,ee=D.getWidth(U),Z=this._renderService.dimensions.css.cell.width*ee,de=this.buffer.y*this._renderService.dimensions.css.cell.height,ge=U*this._renderService.dimensions.css.cell.width;this.textarea.style.left=ge+"px",this.textarea.style.top=de+"px",this.textarea.style.width=Z+"px",this.textarea.style.height=H+"px",this.textarea.style.lineHeight=H+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,h.addDisposableDomListener)(this.element,"copy",D=>{this.hasSelection()&&(0,c.copyHandler)(D,this._selectionService)}));const B=D=>(0,c.handlePasteEvent)(D,this.textarea,this.coreService,this.optionsService);this.register((0,h.addDisposableDomListener)(this.textarea,"paste",B)),this.register((0,h.addDisposableDomListener)(this.element,"paste",B)),$.isFirefox?this.register((0,h.addDisposableDomListener)(this.element,"mousedown",D=>{D.button===2&&(0,c.rightClickHandler)(D,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,h.addDisposableDomListener)(this.element,"contextmenu",D=>{(0,c.rightClickHandler)(D,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),$.isLinux&&this.register((0,h.addDisposableDomListener)(this.element,"auxclick",D=>{D.button===1&&(0,c.moveTextAreaUnderMouseCursor)(D,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,h.addDisposableDomListener)(this.textarea,"keyup",B=>this._keyUp(B),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keydown",B=>this._keyDown(B),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keypress",B=>this._keyPress(B),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionupdate",B=>this._compositionHelper.compositionupdate(B))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,h.addDisposableDomListener)(this.textarea,"input",B=>this._inputEvent(B),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(B){var U;if(!B)throw new Error("Terminal requires a parent element.");if(B.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((U=this.element)==null?void 0:U.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=B.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),B.appendChild(this.element);const D=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),D.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,h.addDisposableDomListener)(this.screenElement,"mousemove",H=>this.updateCursorStyle(H))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),D.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",m.promptLabel),$.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(S.CoreBrowserService,this.textarea,B.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(A.ICoreBrowserService,this._coreBrowserService),this.register((0,h.addDisposableDomListener)(this.textarea,"focus",H=>this._handleTextAreaFocus(H))),this.register((0,h.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(p.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(A.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(T.ThemeService),this._instantiationService.setService(A.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(w.CharacterJoinerService),this._instantiationService.setService(A.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(x.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(A.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(H=>this._onRender.fire(H))),this.onResize(H=>this._renderService.resize(H.cols,H.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(d.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(b.MouseService),this._instantiationService.setService(A.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(u.Linkifier,this.screenElement)),this.element.appendChild(D);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(y.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(H=>this.scrollLines(H.amount,H.suppressScrollEvent,1)),this.register(this._inputHandler.onRequestSyncScrollBar(()=>this.viewport.syncScrollArea())),this.register(this.viewport),this.register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this.register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this.register(this.onBlur(()=>this._renderService.handleBlur())),this.register(this.onFocus(()=>this._renderService.handleFocus())),this.register(this._renderService.onDimensionsChange(()=>this.viewport.syncScrollArea())),this._selectionService=this.register(this._instantiationService.createInstance(C.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(A.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(H=>this.scrollLines(H.amount,H.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(H=>this._renderService.handleSelectionChanged(H.start,H.end,H.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(H=>{this.textarea.value=H,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(H=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(_.BufferDecorationRenderer,this.screenElement)),this.register((0,h.addDisposableDomListener)(this.element,"mousedown",H=>this._selectionService.handleMouseDown(H))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(L.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",H=>this._handleScreenReaderModeOptionChange(H))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",H=>{!this._overviewRulerRenderer&&H&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(f.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const B=this,D=this.element;function U(Z){const de=B._mouseService.getMouseReportCoords(Z,B.screenElement);if(!de)return!1;let ge,ve;switch(Z.overrideType||Z.type){case"mousemove":ve=32,Z.buttons===void 0?(ge=3,Z.button!==void 0&&(ge=Z.button<3?Z.button:3)):ge=1&Z.buttons?0:4&Z.buttons?1:2&Z.buttons?2:3;break;case"mouseup":ve=0,ge=Z.button<3?Z.button:3;break;case"mousedown":ve=1,ge=Z.button<3?Z.button:3;break;case"wheel":if(B._customWheelEventHandler&&B._customWheelEventHandler(Z)===!1||B.viewport.getLinesScrolled(Z)===0)return!1;ve=Z.deltaY<0?0:1,ge=4;break;default:return!1}return!(ve===void 0||ge===void 0||ge>4)&&B.coreMouseService.triggerMouseEvent({col:de.col,row:de.row,x:de.x,y:de.y,button:ge,action:ve,ctrl:Z.ctrlKey,alt:Z.altKey,shift:Z.shiftKey})}const H={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ee={mouseup:Z=>(U(Z),Z.buttons||(this._document.removeEventListener("mouseup",H.mouseup),H.mousedrag&&this._document.removeEventListener("mousemove",H.mousedrag)),this.cancel(Z)),wheel:Z=>(U(Z),this.cancel(Z,!0)),mousedrag:Z=>{Z.buttons&&U(Z)},mousemove:Z=>{Z.buttons||U(Z)}};this.register(this.coreMouseService.onProtocolChange(Z=>{Z?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(Z)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&Z?H.mousemove||(D.addEventListener("mousemove",ee.mousemove),H.mousemove=ee.mousemove):(D.removeEventListener("mousemove",H.mousemove),H.mousemove=null),16&Z?H.wheel||(D.addEventListener("wheel",ee.wheel,{passive:!1}),H.wheel=ee.wheel):(D.removeEventListener("wheel",H.wheel),H.wheel=null),2&Z?H.mouseup||(H.mouseup=ee.mouseup):(this._document.removeEventListener("mouseup",H.mouseup),H.mouseup=null),4&Z?H.mousedrag||(H.mousedrag=ee.mousedrag):(this._document.removeEventListener("mousemove",H.mousedrag),H.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,h.addDisposableDomListener)(D,"mousedown",Z=>{if(Z.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(Z))return U(Z),H.mouseup&&this._document.addEventListener("mouseup",H.mouseup),H.mousedrag&&this._document.addEventListener("mousemove",H.mousedrag),this.cancel(Z)})),this.register((0,h.addDisposableDomListener)(D,"wheel",Z=>{if(!H.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(Z)===!1)return!1;if(!this.buffer.hasScrollback){const de=this.viewport.getLinesScrolled(Z);if(de===0)return;const ge=X.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Z.deltaY<0?"A":"B");let ve="";for(let Ee=0;Ee<Math.abs(de);Ee++)ve+=ge;return this.coreService.triggerDataEvent(ve,!0),this.cancel(Z,!0)}return this.viewport.handleWheel(Z)?this.cancel(Z):void 0}},{passive:!1})),this.register((0,h.addDisposableDomListener)(D,"touchstart",Z=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(Z),this.cancel(Z)},{passive:!0})),this.register((0,h.addDisposableDomListener)(D,"touchmove",Z=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(Z)?void 0:this.cancel(Z)},{passive:!1}))}refresh(B,D){var U;(U=this._renderService)==null||U.refreshRows(B,D)}updateCursorStyle(B){var D;(D=this._selectionService)!=null&&D.shouldColumnSelect(B)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(B,D,U=0){var H;U===1?(super.scrollLines(B,D,U),this.refresh(0,this.rows-1)):(H=this.viewport)==null||H.scrollLines(B)}paste(B){(0,c.paste)(B,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(B){this._customKeyEventHandler=B}attachCustomWheelEventHandler(B){this._customWheelEventHandler=B}registerLinkProvider(B){return this._linkProviderService.registerLinkProvider(B)}registerCharacterJoiner(B){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const D=this._characterJoinerService.register(B);return this.refresh(0,this.rows-1),D}deregisterCharacterJoiner(B){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(B)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(B){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+B)}registerDecoration(B){return this._decorationService.registerDecoration(B)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(B,D,U){this._selectionService.setSelection(B,D,U)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var B;(B=this._selectionService)==null||B.clearSelection()}selectAll(){var B;(B=this._selectionService)==null||B.selectAll()}selectLines(B,D){var U;(U=this._selectionService)==null||U.selectLines(B,D)}_keyDown(B){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(B)===!1)return!1;const D=this.browser.isMac&&this.options.macOptionIsMeta&&B.altKey;if(!D&&!this._compositionHelper.keydown(B))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;D||B.key!=="Dead"&&B.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const U=(0,V.evaluateKeyboardEvent)(B,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(B),U.type===3||U.type===2){const H=this.rows-1;return this.scrollLines(U.type===2?-H:H),this.cancel(B,!0)}return U.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,B)||(U.cancel&&this.cancel(B,!0),!U.key||!!(B.key&&!B.ctrlKey&&!B.altKey&&!B.metaKey&&B.key.length===1&&B.key.charCodeAt(0)>=65&&B.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(U.key!==X.C0.ETX&&U.key!==X.C0.CR||(this.textarea.value=""),this._onKey.fire({key:U.key,domEvent:B}),this._showCursor(),this.coreService.triggerDataEvent(U.key,!0),!this.optionsService.rawOptions.screenReaderMode||B.altKey||B.ctrlKey?this.cancel(B,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(B,D){const U=B.isMac&&!this.options.macOptionIsMeta&&D.altKey&&!D.ctrlKey&&!D.metaKey||B.isWindows&&D.altKey&&D.ctrlKey&&!D.metaKey||B.isWindows&&D.getModifierState("AltGraph");return D.type==="keypress"?U:U&&(!D.keyCode||D.keyCode>47)}_keyUp(B){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(B)===!1||(function(D){return D.keyCode===16||D.keyCode===17||D.keyCode===18}(B)||this.focus(),this.updateCursorStyle(B),this._keyPressHandled=!1)}_keyPress(B){let D;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(B)===!1)return!1;if(this.cancel(B),B.charCode)D=B.charCode;else if(B.which===null||B.which===void 0)D=B.keyCode;else{if(B.which===0||B.charCode===0)return!1;D=B.which}return!(!D||(B.altKey||B.ctrlKey||B.metaKey)&&!this._isThirdLevelShift(this.browser,B)||(D=String.fromCharCode(D),this._onKey.fire({key:D,domEvent:B}),this._showCursor(),this.coreService.triggerDataEvent(D,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(B){if(B.data&&B.inputType==="insertText"&&(!B.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const D=B.data;return this.coreService.triggerDataEvent(D,!0),this.cancel(B),!0}return!1}resize(B,D){B!==this.cols||D!==this.rows?super.resize(B,D):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(B,D){var U,H;(U=this._charSizeService)==null||U.measure(),(H=this.viewport)==null||H.syncScrollArea(!0)}clear(){var B;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let D=1;D<this.rows;D++)this.buffer.lines.push(this.buffer.getBlankLine(Y.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(B=this.viewport)==null||B.reset(),this.refresh(0,this.rows-1)}}reset(){var D,U;this.options.rows=this.rows,this.options.cols=this.cols;const B=this._customKeyEventHandler;this._setup(),super.reset(),(D=this._selectionService)==null||D.reset(),this._decorationService.reset(),(U=this.viewport)==null||U.reset(),this._customKeyEventHandler=B,this.refresh(0,this.rows-1)}clearTextureAtlas(){var B;(B=this._renderService)==null||B.clearTextureAtlas()}_reportFocus(){var B;(B=this.element)!=null&&B.classList.contains("focus")?this.coreService.triggerDataEvent(X.C0.ESC+"[I"):this.coreService.triggerDataEvent(X.C0.ESC+"[O")}_reportWindowsOptions(B){if(this._renderService)switch(B){case I.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const D=this._renderService.dimensions.css.canvas.width.toFixed(0),U=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${X.C0.ESC}[4;${U};${D}t`);break;case I.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const H=this._renderService.dimensions.css.cell.width.toFixed(0),ee=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${X.C0.ESC}[6;${ee};${H}t`)}}cancel(B,D){if(this.options.cancelEvents||D)return B.preventDefault(),B.stopPropagation(),!1}}o.Terminal=J},9924:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0,o.TimeBasedDebouncer=class{constructor(l,c=1e3){this._renderCallback=l,this._debounceThresholdMS=c,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(l,c,h){this._rowCount=h,l=l!==void 0?l:0,c=c!==void 0?c:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,l):l,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,c):c;const u=Date.now();if(u-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=u,this._innerRefresh();else if(!this._additionalRefreshRequested){const m=u-this._lastRefreshMs,g=this._debounceThresholdMS-m;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},g)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const l=Math.max(this._rowStart,0),c=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(l,c)}}},1680:function(a,o,l){var c=this&&this.__decorate||function(d,f,p,w){var S,b=arguments.length,x=b<3?f:w===null?w=Object.getOwnPropertyDescriptor(f,p):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(d,f,p,w);else for(var C=d.length-1;C>=0;C--)(S=d[C])&&(x=(b<3?S(x):b>3?S(f,p,x):S(f,p))||x);return b>3&&x&&Object.defineProperty(f,p,x),x},h=this&&this.__param||function(d,f){return function(p,w){f(p,w,d)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const u=l(3656),m=l(4725),g=l(8460),y=l(844),_=l(2585);let v=o.Viewport=class extends y.Disposable{constructor(d,f,p,w,S,b,x,C){super(),this._viewportElement=d,this._scrollArea=f,this._bufferService=p,this._optionsService=w,this._charSizeService=S,this._renderService=b,this._coreBrowserService=x,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new g.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,u.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(A=>this._activeBuffer=A.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(A=>this._renderDimensions=A)),this._handleThemeChange(C.colors),this.register(C.onChangeColors(A=>this._handleThemeChange(A))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(d){this._viewportElement.style.backgroundColor=d.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame(()=>this.syncScrollArea())}_refresh(d){if(d)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const f=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==f&&(this._lastRecordedBufferHeight=f,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const d=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==d&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=d),this._refreshAnimationFrame=null}syncScrollArea(d=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(d);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(d)}_handleScroll(d){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const f=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:f,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const d=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(d*(this._smoothScrollState.target-this._smoothScrollState.origin)),d<1?this._coreBrowserService.window.requestAnimationFrame(()=>this._smoothScroll()):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(d,f){const p=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(f<0&&this._viewportElement.scrollTop!==0||f>0&&p<this._lastRecordedBufferHeight)||(d.cancelable&&d.preventDefault(),!1)}handleWheel(d){const f=this._getPixelsScrolled(d);return f!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+f:this._smoothScrollState.target+=f,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=f,this._bubbleScroll(d,f))}scrollLines(d){if(d!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const f=d*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+f,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:d,suppressScrollEvent:!1})}_getPixelsScrolled(d){if(d.deltaY===0||d.shiftKey)return 0;let f=this._applyScrollModifier(d.deltaY,d);return d.deltaMode===WheelEvent.DOM_DELTA_LINE?f*=this._currentRowHeight:d.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(f*=this._currentRowHeight*this._bufferService.rows),f}getBufferElements(d,f){var C;let p,w="";const S=[],b=f??this._bufferService.buffer.lines.length,x=this._bufferService.buffer.lines;for(let A=d;A<b;A++){const T=x.get(A);if(!T)continue;const j=(C=x.get(A+1))==null?void 0:C.isWrapped;if(w+=T.translateToString(!j),!j||A===x.length-1){const M=document.createElement("div");M.textContent=w,S.push(M),w.length>0&&(p=M),w=""}}return{bufferElements:S,cursorElement:p}}getLinesScrolled(d){if(d.deltaY===0||d.shiftKey)return 0;let f=this._applyScrollModifier(d.deltaY,d);return d.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(f/=this._currentRowHeight+0,this._wheelPartialScroll+=f,f=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):d.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(f*=this._bufferService.rows),f}_applyScrollModifier(d,f){const p=this._optionsService.rawOptions.fastScrollModifier;return p==="alt"&&f.altKey||p==="ctrl"&&f.ctrlKey||p==="shift"&&f.shiftKey?d*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:d*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(d){this._lastTouchY=d.touches[0].pageY}handleTouchMove(d){const f=this._lastTouchY-d.touches[0].pageY;return this._lastTouchY=d.touches[0].pageY,f!==0&&(this._viewportElement.scrollTop+=f,this._bubbleScroll(d,f))}};o.Viewport=v=c([h(2,_.IBufferService),h(3,_.IOptionsService),h(4,m.ICharSizeService),h(5,m.IRenderService),h(6,m.ICoreBrowserService),h(7,m.IThemeService)],v)},3107:function(a,o,l){var c=this&&this.__decorate||function(_,v,d,f){var p,w=arguments.length,S=w<3?v:f===null?f=Object.getOwnPropertyDescriptor(v,d):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(_,v,d,f);else for(var b=_.length-1;b>=0;b--)(p=_[b])&&(S=(w<3?p(S):w>3?p(v,d,S):p(v,d))||S);return w>3&&S&&Object.defineProperty(v,d,S),S},h=this&&this.__param||function(_,v){return function(d,f){v(d,f,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;const u=l(4725),m=l(844),g=l(2585);let y=o.BufferDecorationRenderer=class extends m.Disposable{constructor(_,v,d,f,p){super(),this._screenElement=_,this._bufferService=v,this._coreBrowserService=d,this._decorationService=f,this._renderService=p,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this.register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this.register(this._decorationService.onDecorationRemoved(w=>this._removeDecoration(w))),this.register((0,m.toDisposable)(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(const _ of this._decorationService.decorations)this._renderDecoration(_);this._dimensionsChanged=!1}_renderDecoration(_){this._refreshStyle(_),this._dimensionsChanged&&this._refreshXPosition(_)}_createElement(_){var f;const v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((f=_==null?void 0:_.options)==null?void 0:f.layer)==="top"),v.style.width=`${Math.round((_.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,v.style.height=(_.options.height||1)*this._renderService.dimensions.css.cell.height+"px",v.style.top=(_.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",v.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const d=_.options.x??0;return d&&d>this._bufferService.cols&&(v.style.display="none"),this._refreshXPosition(_,v),v}_refreshStyle(_){const v=_.marker.line-this._bufferService.buffers.active.ydisp;if(v<0||v>=this._bufferService.rows)_.element&&(_.element.style.display="none",_.onRenderEmitter.fire(_.element));else{let d=this._decorationElements.get(_);d||(d=this._createElement(_),_.element=d,this._decorationElements.set(_,d),this._container.appendChild(d),_.onDispose(()=>{this._decorationElements.delete(_),d.remove()})),d.style.top=v*this._renderService.dimensions.css.cell.height+"px",d.style.display=this._altBufferIsActive?"none":"block",_.onRenderEmitter.fire(d)}}_refreshXPosition(_,v=_.element){if(!v)return;const d=_.options.x??0;(_.options.anchor||"left")==="right"?v.style.right=d?d*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=d?d*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(_){var v;(v=this._decorationElements.get(_))==null||v.remove(),this._decorationElements.delete(_),_.dispose()}};o.BufferDecorationRenderer=y=c([h(1,g.IBufferService),h(2,u.ICoreBrowserService),h(3,g.IDecorationService),h(4,u.IRenderService)],y)},5871:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorZoneStore=void 0,o.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(l){if(l.options.overviewRulerOptions){for(const c of this._zones)if(c.color===l.options.overviewRulerOptions.color&&c.position===l.options.overviewRulerOptions.position){if(this._lineIntersectsZone(c,l.marker.line))return;if(this._lineAdjacentToZone(c,l.marker.line,l.options.overviewRulerOptions.position))return void this._addLineToZone(c,l.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=l.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=l.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=l.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=l.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:l.options.overviewRulerOptions.color,position:l.options.overviewRulerOptions.position,startBufferLine:l.marker.line,endBufferLine:l.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(l){this._linePadding=l}_lineIntersectsZone(l,c){return c>=l.startBufferLine&&c<=l.endBufferLine}_lineAdjacentToZone(l,c,h){return c>=l.startBufferLine-this._linePadding[h||"full"]&&c<=l.endBufferLine+this._linePadding[h||"full"]}_addLineToZone(l,c){l.startBufferLine=Math.min(l.startBufferLine,c),l.endBufferLine=Math.max(l.endBufferLine,c)}}},5744:function(a,o,l){var c=this&&this.__decorate||function(p,w,S,b){var x,C=arguments.length,A=C<3?w:b===null?b=Object.getOwnPropertyDescriptor(w,S):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(p,w,S,b);else for(var T=p.length-1;T>=0;T--)(x=p[T])&&(A=(C<3?x(A):C>3?x(w,S,A):x(w,S))||A);return C>3&&A&&Object.defineProperty(w,S,A),A},h=this&&this.__param||function(p,w){return function(S,b){w(S,b,p)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const u=l(5871),m=l(4725),g=l(844),y=l(2585),_={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0},d={full:0,left:0,center:0,right:0};let f=o.OverviewRulerRenderer=class extends g.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(p,w,S,b,x,C,A){var j;super(),this._viewportElement=p,this._screenElement=w,this._bufferService=S,this._decorationService=b,this._renderService=x,this._optionsService=C,this._coreBrowserService=A,this._colorZoneStore=new u.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(j=this._viewportElement.parentElement)==null||j.insertBefore(this._canvas,this._viewportElement);const T=this._canvas.getContext("2d");if(!T)throw new Error("Ctx cannot be null");this._ctx=T,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,g.toDisposable)(()=>{var M;(M=this._canvas)==null||M.remove()}))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this.register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0)))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this.register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())}))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender(()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",()=>this._queueRefresh(!0))),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._queueRefresh(!0)}_refreshDrawConstants(){const p=Math.floor(this._canvas.width/3),w=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=p,v.center=w,v.right=p,this._refreshDrawHeightConstants(),d.full=0,d.left=0,d.center=v.left,d.right=v.left+v.center}_refreshDrawHeightConstants(){_.full=Math.round(2*this._coreBrowserService.dpr);const p=this._canvas.height/this._bufferService.buffer.lines.length,w=Math.round(Math.max(Math.min(p,12),6)*this._coreBrowserService.dpr);_.left=w,_.center=w,_.right=w}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const w of this._decorationService.decorations)this._colorZoneStore.addDecoration(w);this._ctx.lineWidth=1;const p=this._colorZoneStore.zones;for(const w of p)w.position!=="full"&&this._renderColorZone(w);for(const w of p)w.position==="full"&&this._renderColorZone(w);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(p){this._ctx.fillStyle=p.color,this._ctx.fillRect(d[p.position||"full"],Math.round((this._canvas.height-1)*(p.startBufferLine/this._bufferService.buffers.active.lines.length)-_[p.position||"full"]/2),v[p.position||"full"],Math.round((this._canvas.height-1)*((p.endBufferLine-p.startBufferLine)/this._bufferService.buffers.active.lines.length)+_[p.position||"full"]))}_queueRefresh(p,w){this._shouldUpdateDimensions=p||this._shouldUpdateDimensions,this._shouldUpdateAnchor=w||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};o.OverviewRulerRenderer=f=c([h(2,y.IBufferService),h(3,y.IDecorationService),h(4,m.IRenderService),h(5,y.IOptionsService),h(6,m.ICoreBrowserService)],f)},2950:function(a,o,l){var c=this&&this.__decorate||function(_,v,d,f){var p,w=arguments.length,S=w<3?v:f===null?f=Object.getOwnPropertyDescriptor(v,d):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(_,v,d,f);else for(var b=_.length-1;b>=0;b--)(p=_[b])&&(S=(w<3?p(S):w>3?p(v,d,S):p(v,d))||S);return w>3&&S&&Object.defineProperty(v,d,S),S},h=this&&this.__param||function(_,v){return function(d,f){v(d,f,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;const u=l(4725),m=l(2585),g=l(2584);let y=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(_,v,d,f,p,w){this._textarea=_,this._compositionView=v,this._bufferService=d,this._optionsService=f,this._coreService=p,this._renderService=w,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(_){this._compositionView.textContent=_.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(_){if(this._isComposing||this._isSendingComposition){if(_.keyCode===229||_.keyCode===16||_.keyCode===17||_.keyCode===18)return!1;this._finalizeComposition(!1)}return _.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(_){if(this._compositionView.classList.remove("active"),this._isComposing=!1,_){const v={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let d;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,d=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),d.length>0&&this._coreService.triggerDataEvent(d,!0)}},0)}else{this._isSendingComposition=!1;const v=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(v,!0)}}_handleAnyTextareaChanges(){const _=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const v=this._textarea.value,d=v.replace(_,"");this._dataAlreadySent=d,v.length>_.length?this._coreService.triggerDataEvent(d,!0):v.length<_.length?this._coreService.triggerDataEvent(`${g.C0.DEL}`,!0):v.length===_.length&&v!==_&&this._coreService.triggerDataEvent(v,!0)}},0)}updateCompositionElements(_){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const v=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),d=this._renderService.dimensions.css.cell.height,f=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,p=v*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=p+"px",this._compositionView.style.top=f+"px",this._compositionView.style.height=d+"px",this._compositionView.style.lineHeight=d+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const w=this._compositionView.getBoundingClientRect();this._textarea.style.left=p+"px",this._textarea.style.top=f+"px",this._textarea.style.width=Math.max(w.width,1)+"px",this._textarea.style.height=Math.max(w.height,1)+"px",this._textarea.style.lineHeight=w.height+"px"}_||setTimeout(()=>this.updateCompositionElements(!0),0)}}};o.CompositionHelper=y=c([h(2,m.IBufferService),h(3,m.IOptionsService),h(4,m.ICoreService),h(5,u.IRenderService)],y)},9806:(a,o)=>{function l(c,h,u){const m=u.getBoundingClientRect(),g=c.getComputedStyle(u),y=parseInt(g.getPropertyValue("padding-left")),_=parseInt(g.getPropertyValue("padding-top"));return[h.clientX-m.left-y,h.clientY-m.top-_]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=l,o.getCoords=function(c,h,u,m,g,y,_,v,d){if(!y)return;const f=l(c,h,u);return f?(f[0]=Math.ceil((f[0]+(d?_/2:0))/_),f[1]=Math.ceil(f[1]/v),f[0]=Math.min(Math.max(f[0],1),m+(d?1:0)),f[1]=Math.min(Math.max(f[1],1),g),f):void 0}},9504:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const c=l(2584);function h(v,d,f,p){const w=v-u(v,f),S=d-u(d,f),b=Math.abs(w-S)-function(x,C,A){let T=0;const j=x-u(x,A),M=C-u(C,A);for(let O=0;O<Math.abs(j-M);O++){const z=m(x,C)==="A"?-1:1,$=A.buffer.lines.get(j+z*O);$!=null&&$.isWrapped&&T++}return T}(v,d,f);return _(b,y(m(v,d),p))}function u(v,d){let f=0,p=d.buffer.lines.get(v),w=p==null?void 0:p.isWrapped;for(;w&&v>=0&&v<d.rows;)f++,p=d.buffer.lines.get(--v),w=p==null?void 0:p.isWrapped;return f}function m(v,d){return v>d?"A":"B"}function g(v,d,f,p,w,S){let b=v,x=d,C="";for(;b!==f||x!==p;)b+=w?1:-1,w&&b>S.cols-1?(C+=S.buffer.translateBufferLineToString(x,!1,v,b),b=0,v=0,x++):!w&&b<0&&(C+=S.buffer.translateBufferLineToString(x,!1,0,v+1),b=S.cols-1,v=b,x--);return C+S.buffer.translateBufferLineToString(x,!1,v,b)}function y(v,d){const f=d?"O":"[";return c.C0.ESC+f+v}function _(v,d){v=Math.floor(v);let f="";for(let p=0;p<v;p++)f+=d;return f}o.moveToCellSequence=function(v,d,f,p){const w=f.buffer.x,S=f.buffer.y;if(!f.buffer.hasScrollback)return function(C,A,T,j,M,O){return h(A,j,M,O).length===0?"":_(g(C,A,C,A-u(A,M),!1,M).length,y("D",O))}(w,S,0,d,f,p)+h(S,d,f,p)+function(C,A,T,j,M,O){let z;z=h(A,j,M,O).length>0?j-u(j,M):A;const $=j,Y=function(X,V,N,P,R,I){let L;return L=h(N,P,R,I).length>0?P-u(P,R):V,X<N&&L<=P||X>=N&&L<P?"C":"D"}(C,A,T,j,M,O);return _(g(C,z,T,$,Y==="C",M).length,y(Y,O))}(w,S,v,d,f,p);let b;if(S===d)return b=w>v?"D":"C",_(Math.abs(w-v),y(b,p));b=S>d?"D":"C";const x=Math.abs(S-d);return _(function(C,A){return A.cols-C}(S>d?v:w,f)+(x-1)*f.cols+1+((S>d?w:v)-1),y(b,p))}},1296:function(a,o,l){var c=this&&this.__decorate||function(O,z,$,Y){var X,V=arguments.length,N=V<3?z:Y===null?Y=Object.getOwnPropertyDescriptor(z,$):Y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(O,z,$,Y);else for(var P=O.length-1;P>=0;P--)(X=O[P])&&(N=(V<3?X(N):V>3?X(z,$,N):X(z,$))||N);return V>3&&N&&Object.defineProperty(z,$,N),N},h=this&&this.__param||function(O,z){return function($,Y){z($,Y,O)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const u=l(3787),m=l(2550),g=l(2223),y=l(6171),_=l(6052),v=l(4725),d=l(8055),f=l(8460),p=l(844),w=l(2585),S="xterm-dom-renderer-owner-",b="xterm-rows",x="xterm-fg-",C="xterm-bg-",A="xterm-focus",T="xterm-selection";let j=1,M=o.DomRenderer=class extends p.Disposable{constructor(O,z,$,Y,X,V,N,P,R,I,L,W,J){super(),this._terminal=O,this._document=z,this._element=$,this._screenElement=Y,this._viewportElement=X,this._helperContainer=V,this._linkifier2=N,this._charSizeService=R,this._optionsService=I,this._bufferService=L,this._coreBrowserService=W,this._themeService=J,this._terminalClass=j++,this._rowElements=[],this._selectionRenderModel=(0,_.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new f.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(b),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(T),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,y.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(G=>this._injectCss(G))),this._injectCss(this._themeService.colors),this._rowFactory=P.createInstance(u.DomRendererRowFactory,document),this._element.classList.add(S+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(G=>this._handleLinkHover(G))),this.register(this._linkifier2.onHideLinkUnderline(G=>this._handleLinkLeave(G))),this.register((0,p.toDisposable)(()=>{this._element.classList.remove(S+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new m.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const O=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*O,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*O),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/O),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/O),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const $ of this._rowElements)$.style.width=`${this.dimensions.css.canvas.width}px`,$.style.height=`${this.dimensions.css.cell.height}px`,$.style.lineHeight=`${this.dimensions.css.cell.height}px`,$.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const z=`${this._terminalSelector} .${b} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=z,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(O){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let z=`${this._terminalSelector} .${b} { color: ${O.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;z+=`${this._terminalSelector} .${b} .xterm-dim { color: ${d.color.multiplyOpacity(O.foreground,.5).css};}`,z+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const $=`blink_underline_${this._terminalClass}`,Y=`blink_bar_${this._terminalClass}`,X=`blink_block_${this._terminalClass}`;z+=`@keyframes ${$} { 50% { border-bottom-style: hidden; }}`,z+=`@keyframes ${Y} { 50% { box-shadow: none; }}`,z+=`@keyframes ${X} { 0% { background-color: ${O.cursor.css}; color: ${O.cursorAccent.css}; } 50% { background-color: inherit; color: ${O.cursor.css}; }}`,z+=`${this._terminalSelector} .${b}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${$} 1s step-end infinite;}${this._terminalSelector} .${b}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${b}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${X} 1s step-end infinite;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-block { background-color: ${O.cursor.css}; color: ${O.cursorAccent.css};}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${O.cursor.css} !important; color: ${O.cursorAccent.css} !important;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${O.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${O.cursor.css} inset;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${O.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,z+=`${this._terminalSelector} .${T} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${T} div { position: absolute; background-color: ${O.selectionBackgroundOpaque.css};}${this._terminalSelector} .${T} div { position: absolute; background-color: ${O.selectionInactiveBackgroundOpaque.css};}`;for(const[V,N]of O.ansi.entries())z+=`${this._terminalSelector} .${x}${V} { color: ${N.css}; }${this._terminalSelector} .${x}${V}.xterm-dim { color: ${d.color.multiplyOpacity(N,.5).css}; }${this._terminalSelector} .${C}${V} { background-color: ${N.css}; }`;z+=`${this._terminalSelector} .${x}${g.INVERTED_DEFAULT_COLOR} { color: ${d.color.opaque(O.background).css}; }${this._terminalSelector} .${x}${g.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${d.color.multiplyOpacity(d.color.opaque(O.background),.5).css}; }${this._terminalSelector} .${C}${g.INVERTED_DEFAULT_COLOR} { background-color: ${O.foreground.css}; }`,this._themeStyleElement.textContent=z}_setDefaultSpacing(){const O=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${O}px`,this._rowFactory.defaultSpacing=O}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(O,z){for(let $=this._rowElements.length;$<=z;$++){const Y=this._document.createElement("div");this._rowContainer.appendChild(Y),this._rowElements.push(Y)}for(;this._rowElements.length>z;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(O,z){this._refreshRowElements(O,z),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(A),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(A),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(O,z,$){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(O,z,$),this.renderRows(0,this._bufferService.rows-1),!O||!z)return;this._selectionRenderModel.update(this._terminal,O,z,$);const Y=this._selectionRenderModel.viewportStartRow,X=this._selectionRenderModel.viewportEndRow,V=this._selectionRenderModel.viewportCappedStartRow,N=this._selectionRenderModel.viewportCappedEndRow;if(V>=this._bufferService.rows||N<0)return;const P=this._document.createDocumentFragment();if($){const R=O[0]>z[0];P.appendChild(this._createSelectionElement(V,R?z[0]:O[0],R?O[0]:z[0],N-V+1))}else{const R=Y===V?O[0]:0,I=V===X?z[0]:this._bufferService.cols;P.appendChild(this._createSelectionElement(V,R,I));const L=N-V-1;if(P.appendChild(this._createSelectionElement(V+1,0,this._bufferService.cols,L)),V!==N){const W=X===N?z[0]:this._bufferService.cols;P.appendChild(this._createSelectionElement(N,0,W))}}this._selectionContainer.appendChild(P)}_createSelectionElement(O,z,$,Y=1){const X=this._document.createElement("div"),V=z*this.dimensions.css.cell.width;let N=this.dimensions.css.cell.width*($-z);return V+N>this.dimensions.css.canvas.width&&(N=this.dimensions.css.canvas.width-V),X.style.height=Y*this.dimensions.css.cell.height+"px",X.style.top=O*this.dimensions.css.cell.height+"px",X.style.left=`${V}px`,X.style.width=`${N}px`,X}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const O of this._rowElements)O.replaceChildren()}renderRows(O,z){const $=this._bufferService.buffer,Y=$.ybase+$.y,X=Math.min($.x,this._bufferService.cols-1),V=this._optionsService.rawOptions.cursorBlink,N=this._optionsService.rawOptions.cursorStyle,P=this._optionsService.rawOptions.cursorInactiveStyle;for(let R=O;R<=z;R++){const I=R+$.ydisp,L=this._rowElements[R],W=$.lines.get(I);if(!L||!W)break;L.replaceChildren(...this._rowFactory.createRow(W,I,I===Y,N,P,X,V,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${S}${this._terminalClass}`}_handleLinkHover(O){this._setCellUnderline(O.x1,O.x2,O.y1,O.y2,O.cols,!0)}_handleLinkLeave(O){this._setCellUnderline(O.x1,O.x2,O.y1,O.y2,O.cols,!1)}_setCellUnderline(O,z,$,Y,X,V){$<0&&(O=0),Y<0&&(z=0);const N=this._bufferService.rows-1;$=Math.max(Math.min($,N),0),Y=Math.max(Math.min(Y,N),0),X=Math.min(X,this._bufferService.cols);const P=this._bufferService.buffer,R=P.ybase+P.y,I=Math.min(P.x,X-1),L=this._optionsService.rawOptions.cursorBlink,W=this._optionsService.rawOptions.cursorStyle,J=this._optionsService.rawOptions.cursorInactiveStyle;for(let G=$;G<=Y;++G){const B=G+P.ydisp,D=this._rowElements[G],U=P.lines.get(B);if(!D||!U)break;D.replaceChildren(...this._rowFactory.createRow(U,B,B===R,W,J,I,L,this.dimensions.css.cell.width,this._widthCache,V?G===$?O:0:-1,V?(G===Y?z:X)-1:-1))}}};o.DomRenderer=M=c([h(7,w.IInstantiationService),h(8,v.ICharSizeService),h(9,w.IOptionsService),h(10,w.IBufferService),h(11,v.ICoreBrowserService),h(12,v.IThemeService)],M)},3787:function(a,o,l){var c=this&&this.__decorate||function(b,x,C,A){var T,j=arguments.length,M=j<3?x:A===null?A=Object.getOwnPropertyDescriptor(x,C):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,x,C,A);else for(var O=b.length-1;O>=0;O--)(T=b[O])&&(M=(j<3?T(M):j>3?T(x,C,M):T(x,C))||M);return j>3&&M&&Object.defineProperty(x,C,M),M},h=this&&this.__param||function(b,x){return function(C,A){x(C,A,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const u=l(2223),m=l(643),g=l(511),y=l(2585),_=l(8055),v=l(4725),d=l(4269),f=l(6171),p=l(3734);let w=o.DomRendererRowFactory=class{constructor(b,x,C,A,T,j,M){this._document=b,this._characterJoinerService=x,this._optionsService=C,this._coreBrowserService=A,this._coreService=T,this._decorationService=j,this._themeService=M,this._workCell=new g.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(b,x,C){this._selectionStart=b,this._selectionEnd=x,this._columnSelectMode=C}createRow(b,x,C,A,T,j,M,O,z,$,Y){const X=[],V=this._characterJoinerService.getJoinedCharacters(x),N=this._themeService.colors;let P,R=b.getNoBgTrimmedLength();C&&R<j+1&&(R=j+1);let I=0,L="",W=0,J=0,G=0,B=!1,D=0,U=!1,H=0;const ee=[],Z=$!==-1&&Y!==-1;for(let de=0;de<R;de++){b.loadCell(de,this._workCell);let ge=this._workCell.getWidth();if(ge===0)continue;let ve=!1,Ee=de,ue=this._workCell;if(V.length>0&&de===V[0][0]){ve=!0;const we=V.shift();ue=new d.JoinedCellData(this._workCell,b.translateToString(!0,we[0],we[1]),we[1]-we[0]),Ee=we[1]-1,ge=ue.getWidth()}const Ae=this._isCellInSelection(de,x),Fe=C&&de===j,Re=Z&&de>=$&&de<=Y;let We=!1;this._decorationService.forEachDecorationAtCell(de,x,void 0,we=>{We=!0});let ot=ue.getChars()||m.WHITESPACE_CELL_CHAR;if(ot===" "&&(ue.isUnderline()||ue.isOverline())&&(ot=" "),H=ge*O-z.get(ot,ue.isBold(),ue.isItalic()),P){if(I&&(Ae&&U||!Ae&&!U&&ue.bg===W)&&(Ae&&U&&N.selectionForeground||ue.fg===J)&&ue.extended.ext===G&&Re===B&&H===D&&!Fe&&!ve&&!We){ue.isInvisible()?L+=m.WHITESPACE_CELL_CHAR:L+=ot,I++;continue}I&&(P.textContent=L),P=this._document.createElement("span"),I=0,L=""}else P=this._document.createElement("span");if(W=ue.bg,J=ue.fg,G=ue.extended.ext,B=Re,D=H,U=Ae,ve&&j>=de&&j<=Ee&&(j=de),!this._coreService.isCursorHidden&&Fe&&this._coreService.isCursorInitialized){if(ee.push("xterm-cursor"),this._coreBrowserService.isFocused)M&&ee.push("xterm-cursor-blink"),ee.push(A==="bar"?"xterm-cursor-bar":A==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(T)switch(T){case"outline":ee.push("xterm-cursor-outline");break;case"block":ee.push("xterm-cursor-block");break;case"bar":ee.push("xterm-cursor-bar");break;case"underline":ee.push("xterm-cursor-underline")}}if(ue.isBold()&&ee.push("xterm-bold"),ue.isItalic()&&ee.push("xterm-italic"),ue.isDim()&&ee.push("xterm-dim"),L=ue.isInvisible()?m.WHITESPACE_CELL_CHAR:ue.getChars()||m.WHITESPACE_CELL_CHAR,ue.isUnderline()&&(ee.push(`xterm-underline-${ue.extended.underlineStyle}`),L===" "&&(L=" "),!ue.isUnderlineColorDefault()))if(ue.isUnderlineColorRGB())P.style.textDecorationColor=`rgb(${p.AttributeData.toColorRGB(ue.getUnderlineColor()).join(",")})`;else{let we=ue.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&ue.isBold()&&we<8&&(we+=8),P.style.textDecorationColor=N.ansi[we].css}ue.isOverline()&&(ee.push("xterm-overline"),L===" "&&(L=" ")),ue.isStrikethrough()&&ee.push("xterm-strikethrough"),Re&&(P.style.textDecoration="underline");let Oe=ue.getFgColor(),Pe=ue.getFgColorMode(),Ce=ue.getBgColor(),Q=ue.getBgColorMode();const oe=!!ue.isInverse();if(oe){const we=Oe;Oe=Ce,Ce=we;const Ve=Pe;Pe=Q,Q=Ve}let ye,F,ke,re=!1;switch(this._decorationService.forEachDecorationAtCell(de,x,void 0,we=>{we.options.layer!=="top"&&re||(we.backgroundColorRGB&&(Q=50331648,Ce=we.backgroundColorRGB.rgba>>8&16777215,ye=we.backgroundColorRGB),we.foregroundColorRGB&&(Pe=50331648,Oe=we.foregroundColorRGB.rgba>>8&16777215,F=we.foregroundColorRGB),re=we.options.layer==="top")}),!re&&Ae&&(ye=this._coreBrowserService.isFocused?N.selectionBackgroundOpaque:N.selectionInactiveBackgroundOpaque,Ce=ye.rgba>>8&16777215,Q=50331648,re=!0,N.selectionForeground&&(Pe=50331648,Oe=N.selectionForeground.rgba>>8&16777215,F=N.selectionForeground)),re&&ee.push("xterm-decoration-top"),Q){case 16777216:case 33554432:ke=N.ansi[Ce],ee.push(`xterm-bg-${Ce}`);break;case 50331648:ke=_.channels.toColor(Ce>>16,Ce>>8&255,255&Ce),this._addStyle(P,`background-color:#${S((Ce>>>0).toString(16),"0",6)}`);break;default:oe?(ke=N.foreground,ee.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):ke=N.background}switch(ye||ue.isDim()&&(ye=_.color.multiplyOpacity(ke,.5)),Pe){case 16777216:case 33554432:ue.isBold()&&Oe<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Oe+=8),this._applyMinimumContrast(P,ke,N.ansi[Oe],ue,ye,void 0)||ee.push(`xterm-fg-${Oe}`);break;case 50331648:const we=_.channels.toColor(Oe>>16&255,Oe>>8&255,255&Oe);this._applyMinimumContrast(P,ke,we,ue,ye,F)||this._addStyle(P,`color:#${S(Oe.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(P,ke,N.foreground,ue,ye,F)||oe&&ee.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}ee.length&&(P.className=ee.join(" "),ee.length=0),Fe||ve||We?P.textContent=L:I++,H!==this.defaultSpacing&&(P.style.letterSpacing=`${H}px`),X.push(P),de=Ee}return P&&I&&(P.textContent=L),X}_applyMinimumContrast(b,x,C,A,T,j){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,f.treatGlyphAsBackgroundColor)(A.getCode()))return!1;const M=this._getContrastCache(A);let O;if(T||j||(O=M.getColor(x.rgba,C.rgba)),O===void 0){const z=this._optionsService.rawOptions.minimumContrastRatio/(A.isDim()?2:1);O=_.color.ensureContrastRatio(T||x,j||C,z),M.setColor((T||x).rgba,(j||C).rgba,O??null)}return!!O&&(this._addStyle(b,`color:${O.css}`),!0)}_getContrastCache(b){return b.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(b,x){b.setAttribute("style",`${b.getAttribute("style")||""}${x};`)}_isCellInSelection(b,x){const C=this._selectionStart,A=this._selectionEnd;return!(!C||!A)&&(this._columnSelectMode?C[0]<=A[0]?b>=C[0]&&x>=C[1]&&b<A[0]&&x<=A[1]:b<C[0]&&x>=C[1]&&b>=A[0]&&x<=A[1]:x>C[1]&&x<A[1]||C[1]===A[1]&&x===C[1]&&b>=C[0]&&b<A[0]||C[1]<A[1]&&x===A[1]&&b<A[0]||C[1]<A[1]&&x===C[1]&&b>=C[0])}};function S(b,x,C){for(;b.length<C;)b=x+b;return b}o.DomRendererRowFactory=w=c([h(1,v.ICharacterJoinerService),h(2,y.IOptionsService),h(3,v.ICoreBrowserService),h(4,y.ICoreService),h(5,y.IDecorationService),h(6,v.IThemeService)],w)},2550:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WidthCache=void 0,o.WidthCache=class{constructor(l,c){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=l.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const h=l.createElement("span");h.classList.add("xterm-char-measure-element");const u=l.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontWeight="bold";const m=l.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontStyle="italic";const g=l.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontWeight="bold",g.style.fontStyle="italic",this._measureElements=[h,u,m,g],this._container.appendChild(h),this._container.appendChild(u),this._container.appendChild(m),this._container.appendChild(g),c.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(l,c,h,u){l===this._font&&c===this._fontSize&&h===this._weight&&u===this._weightBold||(this._font=l,this._fontSize=c,this._weight=h,this._weightBold=u,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${h}`,this._measureElements[1].style.fontWeight=`${u}`,this._measureElements[2].style.fontWeight=`${h}`,this._measureElements[3].style.fontWeight=`${u}`,this.clear())}get(l,c,h){let u=0;if(!c&&!h&&l.length===1&&(u=l.charCodeAt(0))<256){if(this._flat[u]!==-9999)return this._flat[u];const y=this._measure(l,0);return y>0&&(this._flat[u]=y),y}let m=l;c&&(m+="B"),h&&(m+="I");let g=this._holey.get(m);if(g===void 0){let y=0;c&&(y|=1),h&&(y|=2),g=this._measure(l,y),g>0&&this._holey.set(m,g)}return g}_measure(l,c){const h=this._measureElements[c];return h.textContent=l.repeat(32),h.offsetWidth/32}}},2223:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const c=l(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=c.isFirefox||c.isLegacyEdge?"bottom":"ideographic"},6171:(a,o)=>{function l(h){return 57508<=h&&h<=57558}function c(h){return h>=128512&&h<=128591||h>=127744&&h<=128511||h>=128640&&h<=128767||h>=9728&&h<=9983||h>=9984&&h<=10175||h>=65024&&h<=65039||h>=129280&&h<=129535||h>=127462&&h<=127487}Object.defineProperty(o,"__esModule",{value:!0}),o.computeNextVariantOffset=o.createRenderDimensions=o.treatGlyphAsBackgroundColor=o.allowRescaling=o.isEmoji=o.isRestrictedPowerlineGlyph=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(h){if(!h)throw new Error("value must not be falsy");return h},o.isPowerlineGlyph=l,o.isRestrictedPowerlineGlyph=function(h){return 57520<=h&&h<=57527},o.isEmoji=c,o.allowRescaling=function(h,u,m,g){return u===1&&m>Math.ceil(1.5*g)&&h!==void 0&&h>255&&!c(h)&&!l(h)&&!function(y){return 57344<=y&&y<=63743}(h)},o.treatGlyphAsBackgroundColor=function(h){return l(h)||function(u){return 9472<=u&&u<=9631}(h)},o.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},o.computeNextVariantOffset=function(h,u,m=0){return(h-(2*Math.round(u)-m))%(2*Math.round(u))}},6052:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createSelectionRenderModel=void 0;class l{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(h,u,m,g=!1){if(this.selectionStart=u,this.selectionEnd=m,!u||!m||u[0]===m[0]&&u[1]===m[1])return void this.clear();const y=h.buffers.active.ydisp,_=u[1]-y,v=m[1]-y,d=Math.max(_,0),f=Math.min(v,h.rows-1);d>=h.rows||f<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=g,this.viewportStartRow=_,this.viewportEndRow=v,this.viewportCappedStartRow=d,this.viewportCappedEndRow=f,this.startCol=u[0],this.endCol=m[0])}isCellSelected(h,u,m){return!!this.hasSelection&&(m-=h.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&m>=this.viewportCappedStartRow&&u<this.endCol&&m<=this.viewportCappedEndRow:u<this.startCol&&m>=this.viewportCappedStartRow&&u>=this.endCol&&m<=this.viewportCappedEndRow:m>this.viewportStartRow&&m<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&m===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportStartRow&&u>=this.startCol)}}o.createSelectionRenderModel=function(){return new l}},456:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0,o.SelectionModel=class{constructor(l){this._bufferService=l,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const l=this.selectionStart[0]+this.selectionStartLength;return l>this._bufferService.cols?l%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)-1]:[l%this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)]:[l,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const l=this.selectionStart[0]+this.selectionStartLength;return l>this._bufferService.cols?[l%this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)]:[Math.max(l,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const l=this.selectionStart,c=this.selectionEnd;return!(!l||!c)&&(l[1]>c[1]||l[1]===c[1]&&l[0]>c[0])}handleTrim(l){return this.selectionStart&&(this.selectionStart[1]-=l),this.selectionEnd&&(this.selectionEnd[1]-=l),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(a,o,l){var c=this&&this.__decorate||function(f,p,w,S){var b,x=arguments.length,C=x<3?p:S===null?S=Object.getOwnPropertyDescriptor(p,w):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,p,w,S);else for(var A=f.length-1;A>=0;A--)(b=f[A])&&(C=(x<3?b(C):x>3?b(p,w,C):b(p,w))||C);return x>3&&C&&Object.defineProperty(p,w,C),C},h=this&&this.__param||function(f,p){return function(w,S){p(w,S,f)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const u=l(2585),m=l(8460),g=l(844);let y=o.CharSizeService=class extends g.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(f,p,w){super(),this._optionsService=w,this.width=0,this.height=0,this._onCharSizeChange=this.register(new m.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new d(this._optionsService))}catch{this._measureStrategy=this.register(new v(f,p,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){const f=this._measureStrategy.measure();f.width===this.width&&f.height===this.height||(this.width=f.width,this.height=f.height,this._onCharSizeChange.fire())}};o.CharSizeService=y=c([h(2,u.IOptionsService)],y);class _ extends g.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(p,w){p!==void 0&&p>0&&w!==void 0&&w>0&&(this._result.width=p,this._result.height=w)}}class v extends _{constructor(p,w,S){super(),this._document=p,this._parentElement=w,this._optionsService=S,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class d extends _{constructor(p){super(),this._optionsService=p,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const w=this._ctx.measureText("W");if(!("width"in w&&"fontBoundingBoxAscent"in w&&"fontBoundingBoxDescent"in w))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const p=this._ctx.measureText("W");return this._validateAndSet(p.width,p.fontBoundingBoxAscent+p.fontBoundingBoxDescent),this._result}}},4269:function(a,o,l){var c=this&&this.__decorate||function(d,f,p,w){var S,b=arguments.length,x=b<3?f:w===null?w=Object.getOwnPropertyDescriptor(f,p):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(d,f,p,w);else for(var C=d.length-1;C>=0;C--)(S=d[C])&&(x=(b<3?S(x):b>3?S(f,p,x):S(f,p))||x);return b>3&&x&&Object.defineProperty(f,p,x),x},h=this&&this.__param||function(d,f){return function(p,w){f(p,w,d)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const u=l(3734),m=l(643),g=l(511),y=l(2585);class _ extends u.AttributeData{constructor(f,p,w){super(),this.content=0,this.combinedData="",this.fg=f.fg,this.bg=f.bg,this.combinedData=p,this._width=w}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(f){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=_;let v=o.CharacterJoinerService=class wC{constructor(f){this._bufferService=f,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new g.CellData}register(f){const p={id:this._nextCharacterJoinerId++,handler:f};return this._characterJoiners.push(p),p.id}deregister(f){for(let p=0;p<this._characterJoiners.length;p++)if(this._characterJoiners[p].id===f)return this._characterJoiners.splice(p,1),!0;return!1}getJoinedCharacters(f){if(this._characterJoiners.length===0)return[];const p=this._bufferService.buffer.lines.get(f);if(!p||p.length===0)return[];const w=[],S=p.translateToString(!0);let b=0,x=0,C=0,A=p.getFg(0),T=p.getBg(0);for(let j=0;j<p.getTrimmedLength();j++)if(p.loadCell(j,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==A||this._workCell.bg!==T){if(j-b>1){const M=this._getJoinedRanges(S,C,x,p,b);for(let O=0;O<M.length;O++)w.push(M[O])}b=j,C=x,A=this._workCell.fg,T=this._workCell.bg}x+=this._workCell.getChars().length||m.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-b>1){const j=this._getJoinedRanges(S,C,x,p,b);for(let M=0;M<j.length;M++)w.push(j[M])}return w}_getJoinedRanges(f,p,w,S,b){const x=f.substring(p,w);let C=[];try{C=this._characterJoiners[0].handler(x)}catch(A){console.error(A)}for(let A=1;A<this._characterJoiners.length;A++)try{const T=this._characterJoiners[A].handler(x);for(let j=0;j<T.length;j++)wC._mergeRanges(C,T[j])}catch(T){console.error(T)}return this._stringRangesToCellRanges(C,S,b),C}_stringRangesToCellRanges(f,p,w){let S=0,b=!1,x=0,C=f[S];if(C){for(let A=w;A<this._bufferService.cols;A++){const T=p.getWidth(A),j=p.getString(A).length||m.WHITESPACE_CELL_CHAR.length;if(T!==0){if(!b&&C[0]<=x&&(C[0]=A,b=!0),C[1]<=x){if(C[1]=A,C=f[++S],!C)break;C[0]<=x?(C[0]=A,b=!0):b=!1}x+=j}}C&&(C[1]=this._bufferService.cols)}}static _mergeRanges(f,p){let w=!1;for(let S=0;S<f.length;S++){const b=f[S];if(w){if(p[1]<=b[0])return f[S-1][1]=p[1],f;if(p[1]<=b[1])return f[S-1][1]=Math.max(p[1],b[1]),f.splice(S,1),f;f.splice(S,1),S--}else{if(p[1]<=b[0])return f.splice(S,0,p),f;if(p[1]<=b[1])return b[0]=Math.min(p[0],b[0]),f;p[0]<b[1]&&(b[0]=Math.min(p[0],b[0]),w=!0)}}return w?f[f.length-1][1]=p[1]:f.push(p),f}};o.CharacterJoinerService=v=c([h(0,y.IBufferService)],v)},5114:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const c=l(844),h=l(8460),u=l(3656);class m extends c.Disposable{constructor(_,v,d){super(),this._textarea=_,this._window=v,this.mainDocument=d,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new g(this._window),this._onDprChange=this.register(new h.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new h.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(f=>this._screenDprMonitor.setWindow(f))),this.register((0,h.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",()=>this._isFocused=!0),this._textarea.addEventListener("blur",()=>this._isFocused=!1)}get window(){return this._window}set window(_){this._window!==_&&(this._window=_,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}}o.CoreBrowserService=m;class g extends c.Disposable{constructor(_){super(),this._parentWindow=_,this._windowResizeListener=this.register(new c.MutableDisposable),this._onDprChange=this.register(new h.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,c.toDisposable)(()=>this.clearListener()))}setWindow(_){this._parentWindow=_,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,u.addDisposableDomListener)(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var _;this._outerListener&&((_=this._resolutionMediaMatchList)==null||_.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LinkProviderService=void 0;const c=l(844);class h extends c.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,c.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(m){return this.linkProviders.push(m),{dispose:()=>{const g=this.linkProviders.indexOf(m);g!==-1&&this.linkProviders.splice(g,1)}}}}o.LinkProviderService=h},8934:function(a,o,l){var c=this&&this.__decorate||function(y,_,v,d){var f,p=arguments.length,w=p<3?_:d===null?d=Object.getOwnPropertyDescriptor(_,v):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(y,_,v,d);else for(var S=y.length-1;S>=0;S--)(f=y[S])&&(w=(p<3?f(w):p>3?f(_,v,w):f(_,v))||w);return p>3&&w&&Object.defineProperty(_,v,w),w},h=this&&this.__param||function(y,_){return function(v,d){_(v,d,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const u=l(4725),m=l(9806);let g=o.MouseService=class{constructor(y,_){this._renderService=y,this._charSizeService=_}getCoords(y,_,v,d,f){return(0,m.getCoords)(window,y,_,v,d,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,f)}getMouseReportCoords(y,_){const v=(0,m.getCoordsRelativeToElement)(window,y,_);if(this._charSizeService.hasValidSize)return v[0]=Math.min(Math.max(v[0],0),this._renderService.dimensions.css.canvas.width-1),v[1]=Math.min(Math.max(v[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(v[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(v[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(v[0]),y:Math.floor(v[1])}}};o.MouseService=g=c([h(0,u.IRenderService),h(1,u.ICharSizeService)],g)},3230:function(a,o,l){var c=this&&this.__decorate||function(f,p,w,S){var b,x=arguments.length,C=x<3?p:S===null?S=Object.getOwnPropertyDescriptor(p,w):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,p,w,S);else for(var A=f.length-1;A>=0;A--)(b=f[A])&&(C=(x<3?b(C):x>3?b(p,w,C):b(p,w))||C);return x>3&&C&&Object.defineProperty(p,w,C),C},h=this&&this.__param||function(f,p){return function(w,S){p(w,S,f)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const u=l(6193),m=l(4725),g=l(8460),y=l(844),_=l(7226),v=l(2585);let d=o.RenderService=class extends y.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(f,p,w,S,b,x,C,A){super(),this._rowCount=f,this._charSizeService=S,this._renderer=this.register(new y.MutableDisposable),this._pausedResizeTask=new _.DebouncedIdleTask,this._observerDisposable=this.register(new y.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new g.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new g.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new g.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new g.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new u.RenderDebouncer((T,j)=>this._renderRows(T,j),C),this.register(this._renderDebouncer),this.register(C.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(x.onResize(()=>this._fullRefresh())),this.register(x.buffers.onBufferActivate(()=>{var T;return(T=this._renderer.value)==null?void 0:T.clear()})),this.register(w.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(b.onDecorationRegistered(()=>this._fullRefresh())),this.register(b.onDecorationRemoved(()=>this._fullRefresh())),this.register(w.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(x.cols,x.rows),this._fullRefresh()})),this.register(w.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(x.buffer.y,x.buffer.y,!0))),this.register(A.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(C.window,p),this.register(C.onWindowChange(T=>this._registerIntersectionObserver(T,p)))}_registerIntersectionObserver(f,p){if("IntersectionObserver"in f){const w=new f.IntersectionObserver(S=>this._handleIntersectionChange(S[S.length-1]),{threshold:0});w.observe(p),this._observerDisposable.value=(0,y.toDisposable)(()=>w.disconnect())}}_handleIntersectionChange(f){this._isPaused=f.isIntersecting===void 0?f.intersectionRatio===0:!f.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(f,p,w=!1){this._isPaused?this._needsFullRefresh=!0:(w||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(f,p,this._rowCount))}_renderRows(f,p){this._renderer.value&&(f=Math.min(f,this._rowCount-1),p=Math.min(p,this._rowCount-1),this._renderer.value.renderRows(f,p),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:f,end:p}),this._onRender.fire({start:f,end:p}),this._isNextRenderRedrawOnly=!0)}resize(f,p){this._rowCount=p,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(f){this._renderer.value=f,this._renderer.value&&(this._renderer.value.onRequestRedraw(p=>this.refreshRows(p.start,p.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(f){return this._renderDebouncer.addRefreshCallback(f)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var f,p;this._renderer.value&&((p=(f=this._renderer.value).clearTextureAtlas)==null||p.call(f),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(f,p){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var w;return(w=this._renderer.value)==null?void 0:w.handleResize(f,p)}):this._renderer.value.handleResize(f,p),this._fullRefresh())}handleCharSizeChanged(){var f;(f=this._renderer.value)==null||f.handleCharSizeChanged()}handleBlur(){var f;(f=this._renderer.value)==null||f.handleBlur()}handleFocus(){var f;(f=this._renderer.value)==null||f.handleFocus()}handleSelectionChanged(f,p,w){var S;this._selectionState.start=f,this._selectionState.end=p,this._selectionState.columnSelectMode=w,(S=this._renderer.value)==null||S.handleSelectionChanged(f,p,w)}handleCursorMove(){var f;(f=this._renderer.value)==null||f.handleCursorMove()}clear(){var f;(f=this._renderer.value)==null||f.clear()}};o.RenderService=d=c([h(2,v.IOptionsService),h(3,m.ICharSizeService),h(4,v.IDecorationService),h(5,v.IBufferService),h(6,m.ICoreBrowserService),h(7,m.IThemeService)],d)},9312:function(a,o,l){var c=this&&this.__decorate||function(C,A,T,j){var M,O=arguments.length,z=O<3?A:j===null?j=Object.getOwnPropertyDescriptor(A,T):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(C,A,T,j);else for(var $=C.length-1;$>=0;$--)(M=C[$])&&(z=(O<3?M(z):O>3?M(A,T,z):M(A,T))||z);return O>3&&z&&Object.defineProperty(A,T,z),z},h=this&&this.__param||function(C,A){return function(T,j){A(T,j,C)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const u=l(9806),m=l(9504),g=l(456),y=l(4725),_=l(8460),v=l(844),d=l(6114),f=l(4841),p=l(511),w=l(2585),S=" ",b=new RegExp(S,"g");let x=o.SelectionService=class extends v.Disposable{constructor(C,A,T,j,M,O,z,$,Y){super(),this._element=C,this._screenElement=A,this._linkifier=T,this._bufferService=j,this._coreService=M,this._mouseService=O,this._optionsService=z,this._renderService=$,this._coreBrowserService=Y,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new p.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new _.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new _.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new _.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new _.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=X=>this._handleMouseMove(X),this._mouseUpListener=X=>this._handleMouseUp(X),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(X=>this._handleTrim(X)),this.register(this._bufferService.buffers.onBufferActivate(X=>this._handleBufferActivate(X))),this.enable(),this._model=new g.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,v.toDisposable)(()=>{this._removeMouseDownListeners()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const C=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;return!(!C||!A||C[0]===A[0]&&C[1]===A[1])}get selectionText(){const C=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;if(!C||!A)return"";const T=this._bufferService.buffer,j=[];if(this._activeSelectionMode===3){if(C[0]===A[0])return"";const M=C[0]<A[0]?C[0]:A[0],O=C[0]<A[0]?A[0]:C[0];for(let z=C[1];z<=A[1];z++){const $=T.translateBufferLineToString(z,!0,M,O);j.push($)}}else{const M=C[1]===A[1]?A[0]:void 0;j.push(T.translateBufferLineToString(C[1],!0,C[0],M));for(let O=C[1]+1;O<=A[1]-1;O++){const z=T.lines.get(O),$=T.translateBufferLineToString(O,!0);z!=null&&z.isWrapped?j[j.length-1]+=$:j.push($)}if(C[1]!==A[1]){const O=T.lines.get(A[1]),z=T.translateBufferLineToString(A[1],!0,0,A[0]);O&&O.isWrapped?j[j.length-1]+=z:j.push(z)}}return j.map(M=>M.replace(b," ")).join(d.isWindows?`\r
696
+ `:`
697
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(C){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),d.isLinux&&C&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(C){const A=this._getMouseBufferCoords(C),T=this._model.finalSelectionStart,j=this._model.finalSelectionEnd;return!!(T&&j&&A)&&this._areCoordsInSelection(A,T,j)}isCellInSelection(C,A){const T=this._model.finalSelectionStart,j=this._model.finalSelectionEnd;return!(!T||!j)&&this._areCoordsInSelection([C,A],T,j)}_areCoordsInSelection(C,A,T){return C[1]>A[1]&&C[1]<T[1]||A[1]===T[1]&&C[1]===A[1]&&C[0]>=A[0]&&C[0]<T[0]||A[1]<T[1]&&C[1]===T[1]&&C[0]<T[0]||A[1]<T[1]&&C[1]===A[1]&&C[0]>=A[0]}_selectWordAtCursor(C,A){var M,O;const T=(O=(M=this._linkifier.currentLink)==null?void 0:M.link)==null?void 0:O.range;if(T)return this._model.selectionStart=[T.start.x-1,T.start.y-1],this._model.selectionStartLength=(0,f.getRangeLength)(T,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const j=this._getMouseBufferCoords(C);return!!j&&(this._selectWordAt(j,A),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(C,A){this._model.clearSelection(),C=Math.max(C,0),A=Math.min(A,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,C],this._model.selectionEnd=[this._bufferService.cols,A],this.refresh(),this._onSelectionChange.fire()}_handleTrim(C){this._model.handleTrim(C)&&this.refresh()}_getMouseBufferCoords(C){const A=this._mouseService.getCoords(C,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(A)return A[0]--,A[1]--,A[1]+=this._bufferService.buffer.ydisp,A}_getMouseEventScrollAmount(C){let A=(0,u.getCoordsRelativeToElement)(this._coreBrowserService.window,C,this._screenElement)[1];const T=this._renderService.dimensions.css.canvas.height;return A>=0&&A<=T?0:(A>T&&(A-=T),A=Math.min(Math.max(A,-50),50),A/=50,A/Math.abs(A)+Math.round(14*A))}shouldForceSelection(C){return d.isMac?C.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:C.shiftKey}handleMouseDown(C){if(this._mouseDownTimeStamp=C.timeStamp,(C.button!==2||!this.hasSelection)&&C.button===0){if(!this._enabled){if(!this.shouldForceSelection(C))return;C.stopPropagation()}C.preventDefault(),this._dragScrollAmount=0,this._enabled&&C.shiftKey?this._handleIncrementalClick(C):C.detail===1?this._handleSingleClick(C):C.detail===2?this._handleDoubleClick(C):C.detail===3&&this._handleTripleClick(C),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(C){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(C))}_handleSingleClick(C){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(C)?3:0,this._model.selectionStart=this._getMouseBufferCoords(C),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const A=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);A&&A.length!==this._model.selectionStart[0]&&A.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(C){this._selectWordAtCursor(C,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(C){const A=this._getMouseBufferCoords(C);A&&(this._activeSelectionMode=2,this._selectLineAt(A[1]))}shouldColumnSelect(C){return C.altKey&&!(d.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(C){if(C.stopImmediatePropagation(),!this._model.selectionStart)return;const A=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(C),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(C),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const T=this._bufferService.buffer;if(this._model.selectionEnd[1]<T.lines.length){const j=T.lines.get(this._model.selectionEnd[1]);j&&j.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}A&&A[0]===this._model.selectionEnd[0]&&A[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const C=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(C.ydisp+this._bufferService.rows,C.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=C.ydisp),this.refresh()}}_handleMouseUp(C){const A=C.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&A<500&&C.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const T=this._mouseService.getCoords(C,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(T&&T[0]!==void 0&&T[1]!==void 0){const j=(0,m.moveToCellSequence)(T[0]-1,T[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(j,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const C=this._model.finalSelectionStart,A=this._model.finalSelectionEnd,T=!(!C||!A||C[0]===A[0]&&C[1]===A[1]);T?C&&A&&(this._oldSelectionStart&&this._oldSelectionEnd&&C[0]===this._oldSelectionStart[0]&&C[1]===this._oldSelectionStart[1]&&A[0]===this._oldSelectionEnd[0]&&A[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(C,A,T)):this._oldHasSelection&&this._fireOnSelectionChange(C,A,T)}_fireOnSelectionChange(C,A,T){this._oldSelectionStart=C,this._oldSelectionEnd=A,this._oldHasSelection=T,this._onSelectionChange.fire()}_handleBufferActivate(C){this.clearSelection(),this._trimListener.dispose(),this._trimListener=C.activeBuffer.lines.onTrim(A=>this._handleTrim(A))}_convertViewportColToCharacterIndex(C,A){let T=A;for(let j=0;A>=j;j++){const M=C.loadCell(j,this._workCell).getChars().length;this._workCell.getWidth()===0?T--:M>1&&A!==j&&(T+=M-1)}return T}setSelection(C,A,T){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[C,A],this._model.selectionStartLength=T,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(C){this._isClickInSelection(C)||(this._selectWordAtCursor(C,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(C,A,T=!0,j=!0){if(C[0]>=this._bufferService.cols)return;const M=this._bufferService.buffer,O=M.lines.get(C[1]);if(!O)return;const z=M.translateBufferLineToString(C[1],!1);let $=this._convertViewportColToCharacterIndex(O,C[0]),Y=$;const X=C[0]-$;let V=0,N=0,P=0,R=0;if(z.charAt($)===" "){for(;$>0&&z.charAt($-1)===" ";)$--;for(;Y<z.length&&z.charAt(Y+1)===" ";)Y++}else{let W=C[0],J=C[0];O.getWidth(W)===0&&(V++,W--),O.getWidth(J)===2&&(N++,J++);const G=O.getString(J).length;for(G>1&&(R+=G-1,Y+=G-1);W>0&&$>0&&!this._isCharWordSeparator(O.loadCell(W-1,this._workCell));){O.loadCell(W-1,this._workCell);const B=this._workCell.getChars().length;this._workCell.getWidth()===0?(V++,W--):B>1&&(P+=B-1,$-=B-1),$--,W--}for(;J<O.length&&Y+1<z.length&&!this._isCharWordSeparator(O.loadCell(J+1,this._workCell));){O.loadCell(J+1,this._workCell);const B=this._workCell.getChars().length;this._workCell.getWidth()===2?(N++,J++):B>1&&(R+=B-1,Y+=B-1),Y++,J++}}Y++;let I=$+X-V+P,L=Math.min(this._bufferService.cols,Y-$+V+N-P-R);if(A||z.slice($,Y).trim()!==""){if(T&&I===0&&O.getCodePoint(0)!==32){const W=M.lines.get(C[1]-1);if(W&&O.isWrapped&&W.getCodePoint(this._bufferService.cols-1)!==32){const J=this._getWordAt([this._bufferService.cols-1,C[1]-1],!1,!0,!1);if(J){const G=this._bufferService.cols-J.start;I-=G,L+=G}}}if(j&&I+L===this._bufferService.cols&&O.getCodePoint(this._bufferService.cols-1)!==32){const W=M.lines.get(C[1]+1);if(W!=null&&W.isWrapped&&W.getCodePoint(0)!==32){const J=this._getWordAt([0,C[1]+1],!1,!1,!0);J&&(L+=J.length)}}return{start:I,length:L}}}_selectWordAt(C,A){const T=this._getWordAt(C,A);if(T){for(;T.start<0;)T.start+=this._bufferService.cols,C[1]--;this._model.selectionStart=[T.start,C[1]],this._model.selectionStartLength=T.length}}_selectToWordAt(C){const A=this._getWordAt(C,!0);if(A){let T=C[1];for(;A.start<0;)A.start+=this._bufferService.cols,T--;if(!this._model.areSelectionValuesReversed())for(;A.start+A.length>this._bufferService.cols;)A.length-=this._bufferService.cols,T++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?A.start:A.start+A.length,T]}}_isCharWordSeparator(C){return C.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(C.getChars())>=0}_selectLineAt(C){const A=this._bufferService.buffer.getWrappedRangeForLine(C),T={start:{x:0,y:A.first},end:{x:this._bufferService.cols-1,y:A.last}};this._model.selectionStart=[0,A.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,f.getRangeLength)(T,this._bufferService.cols)}};o.SelectionService=x=c([h(3,w.IBufferService),h(4,w.ICoreService),h(5,y.IMouseService),h(6,w.IOptionsService),h(7,y.IRenderService),h(8,y.ICoreBrowserService)],x)},4725:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ILinkProviderService=o.IThemeService=o.ICharacterJoinerService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;const c=l(8343);o.ICharSizeService=(0,c.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,c.createDecorator)("CoreBrowserService"),o.IMouseService=(0,c.createDecorator)("MouseService"),o.IRenderService=(0,c.createDecorator)("RenderService"),o.ISelectionService=(0,c.createDecorator)("SelectionService"),o.ICharacterJoinerService=(0,c.createDecorator)("CharacterJoinerService"),o.IThemeService=(0,c.createDecorator)("ThemeService"),o.ILinkProviderService=(0,c.createDecorator)("LinkProviderService")},6731:function(a,o,l){var c=this&&this.__decorate||function(x,C,A,T){var j,M=arguments.length,O=M<3?C:T===null?T=Object.getOwnPropertyDescriptor(C,A):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(x,C,A,T);else for(var z=x.length-1;z>=0;z--)(j=x[z])&&(O=(M<3?j(O):M>3?j(C,A,O):j(C,A))||O);return M>3&&O&&Object.defineProperty(C,A,O),O},h=this&&this.__param||function(x,C){return function(A,T){C(A,T,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const u=l(7239),m=l(8055),g=l(8460),y=l(844),_=l(2585),v=m.css.toColor("#ffffff"),d=m.css.toColor("#000000"),f=m.css.toColor("#ffffff"),p=m.css.toColor("#000000"),w={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const x=[m.css.toColor("#2e3436"),m.css.toColor("#cc0000"),m.css.toColor("#4e9a06"),m.css.toColor("#c4a000"),m.css.toColor("#3465a4"),m.css.toColor("#75507b"),m.css.toColor("#06989a"),m.css.toColor("#d3d7cf"),m.css.toColor("#555753"),m.css.toColor("#ef2929"),m.css.toColor("#8ae234"),m.css.toColor("#fce94f"),m.css.toColor("#729fcf"),m.css.toColor("#ad7fa8"),m.css.toColor("#34e2e2"),m.css.toColor("#eeeeec")],C=[0,95,135,175,215,255];for(let A=0;A<216;A++){const T=C[A/36%6|0],j=C[A/6%6|0],M=C[A%6];x.push({css:m.channels.toCss(T,j,M),rgba:m.channels.toRgba(T,j,M)})}for(let A=0;A<24;A++){const T=8+10*A;x.push({css:m.channels.toCss(T,T,T),rgba:m.channels.toRgba(T,T,T)})}return x})());let S=o.ThemeService=class extends y.Disposable{get colors(){return this._colors}constructor(x){super(),this._optionsService=x,this._contrastCache=new u.ColorContrastCache,this._halfContrastCache=new u.ColorContrastCache,this._onChangeColors=this.register(new g.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:v,background:d,cursor:f,cursorAccent:p,selectionForeground:void 0,selectionBackgroundTransparent:w,selectionBackgroundOpaque:m.color.blend(d,w),selectionInactiveBackgroundTransparent:w,selectionInactiveBackgroundOpaque:m.color.blend(d,w),ansi:o.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this.register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}_setTheme(x={}){const C=this._colors;if(C.foreground=b(x.foreground,v),C.background=b(x.background,d),C.cursor=b(x.cursor,f),C.cursorAccent=b(x.cursorAccent,p),C.selectionBackgroundTransparent=b(x.selectionBackground,w),C.selectionBackgroundOpaque=m.color.blend(C.background,C.selectionBackgroundTransparent),C.selectionInactiveBackgroundTransparent=b(x.selectionInactiveBackground,C.selectionBackgroundTransparent),C.selectionInactiveBackgroundOpaque=m.color.blend(C.background,C.selectionInactiveBackgroundTransparent),C.selectionForeground=x.selectionForeground?b(x.selectionForeground,m.NULL_COLOR):void 0,C.selectionForeground===m.NULL_COLOR&&(C.selectionForeground=void 0),m.color.isOpaque(C.selectionBackgroundTransparent)&&(C.selectionBackgroundTransparent=m.color.opacity(C.selectionBackgroundTransparent,.3)),m.color.isOpaque(C.selectionInactiveBackgroundTransparent)&&(C.selectionInactiveBackgroundTransparent=m.color.opacity(C.selectionInactiveBackgroundTransparent,.3)),C.ansi=o.DEFAULT_ANSI_COLORS.slice(),C.ansi[0]=b(x.black,o.DEFAULT_ANSI_COLORS[0]),C.ansi[1]=b(x.red,o.DEFAULT_ANSI_COLORS[1]),C.ansi[2]=b(x.green,o.DEFAULT_ANSI_COLORS[2]),C.ansi[3]=b(x.yellow,o.DEFAULT_ANSI_COLORS[3]),C.ansi[4]=b(x.blue,o.DEFAULT_ANSI_COLORS[4]),C.ansi[5]=b(x.magenta,o.DEFAULT_ANSI_COLORS[5]),C.ansi[6]=b(x.cyan,o.DEFAULT_ANSI_COLORS[6]),C.ansi[7]=b(x.white,o.DEFAULT_ANSI_COLORS[7]),C.ansi[8]=b(x.brightBlack,o.DEFAULT_ANSI_COLORS[8]),C.ansi[9]=b(x.brightRed,o.DEFAULT_ANSI_COLORS[9]),C.ansi[10]=b(x.brightGreen,o.DEFAULT_ANSI_COLORS[10]),C.ansi[11]=b(x.brightYellow,o.DEFAULT_ANSI_COLORS[11]),C.ansi[12]=b(x.brightBlue,o.DEFAULT_ANSI_COLORS[12]),C.ansi[13]=b(x.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),C.ansi[14]=b(x.brightCyan,o.DEFAULT_ANSI_COLORS[14]),C.ansi[15]=b(x.brightWhite,o.DEFAULT_ANSI_COLORS[15]),x.extendedAnsi){const A=Math.min(C.ansi.length-16,x.extendedAnsi.length);for(let T=0;T<A;T++)C.ansi[T+16]=b(x.extendedAnsi[T],o.DEFAULT_ANSI_COLORS[T+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(x){this._restoreColor(x),this._onChangeColors.fire(this.colors)}_restoreColor(x){if(x!==void 0)switch(x){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[x]=this._restoreColors.ansi[x]}else for(let C=0;C<this._restoreColors.ansi.length;++C)this._colors.ansi[C]=this._restoreColors.ansi[C]}modifyColors(x){x(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function b(x,C){if(x!==void 0)try{return m.css.toColor(x)}catch{}return C}o.ThemeService=S=c([h(0,_.IOptionsService)],S)},6349:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const c=l(8460),h=l(844);class u extends h.Disposable{constructor(g){super(),this._maxLength=g,this.onDeleteEmitter=this.register(new c.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new c.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new c.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(g){if(this._maxLength===g)return;const y=new Array(g);for(let _=0;_<Math.min(g,this.length);_++)y[_]=this._array[this._getCyclicIndex(_)];this._array=y,this._maxLength=g,this._startIndex=0}get length(){return this._length}set length(g){if(g>this._length)for(let y=this._length;y<g;y++)this._array[y]=void 0;this._length=g}get(g){return this._array[this._getCyclicIndex(g)]}set(g,y){this._array[this._getCyclicIndex(g)]=y}push(g){this._array[this._getCyclicIndex(this._length)]=g,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(g,y,..._){if(y){for(let v=g;v<this._length-y;v++)this._array[this._getCyclicIndex(v)]=this._array[this._getCyclicIndex(v+y)];this._length-=y,this.onDeleteEmitter.fire({index:g,amount:y})}for(let v=this._length-1;v>=g;v--)this._array[this._getCyclicIndex(v+_.length)]=this._array[this._getCyclicIndex(v)];for(let v=0;v<_.length;v++)this._array[this._getCyclicIndex(g+v)]=_[v];if(_.length&&this.onInsertEmitter.fire({index:g,amount:_.length}),this._length+_.length>this._maxLength){const v=this._length+_.length-this._maxLength;this._startIndex+=v,this._length=this._maxLength,this.onTrimEmitter.fire(v)}else this._length+=_.length}trimStart(g){g>this._length&&(g=this._length),this._startIndex+=g,this._length-=g,this.onTrimEmitter.fire(g)}shiftElements(g,y,_){if(!(y<=0)){if(g<0||g>=this._length)throw new Error("start argument out of range");if(g+_<0)throw new Error("Cannot shift elements in list beyond index 0");if(_>0){for(let d=y-1;d>=0;d--)this.set(g+d+_,this.get(g+d));const v=g+y+_-this._length;if(v>0)for(this._length+=v;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let v=0;v<y;v++)this.set(g+v+_,this.get(g+v))}}_getCyclicIndex(g){return(this._startIndex+g)%this._maxLength}}o.CircularList=u},1439:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function l(c,h=5){if(typeof c!="object")return c;const u=Array.isArray(c)?[]:{};for(const m in c)u[m]=h<=1?c[m]:c[m]&&l(c[m],h-1);return u}},8055:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=o.NULL_COLOR=void 0;let l=0,c=0,h=0,u=0;var m,g,y,_,v;function d(p){const w=p.toString(16);return w.length<2?"0"+w:w}function f(p,w){return p<w?(w+.05)/(p+.05):(p+.05)/(w+.05)}o.NULL_COLOR={css:"#00000000",rgba:0},function(p){p.toCss=function(w,S,b,x){return x!==void 0?`#${d(w)}${d(S)}${d(b)}${d(x)}`:`#${d(w)}${d(S)}${d(b)}`},p.toRgba=function(w,S,b,x=255){return(w<<24|S<<16|b<<8|x)>>>0},p.toColor=function(w,S,b,x){return{css:p.toCss(w,S,b,x),rgba:p.toRgba(w,S,b,x)}}}(m||(o.channels=m={})),function(p){function w(S,b){return u=Math.round(255*b),[l,c,h]=v.toChannels(S.rgba),{css:m.toCss(l,c,h,u),rgba:m.toRgba(l,c,h,u)}}p.blend=function(S,b){if(u=(255&b.rgba)/255,u===1)return{css:b.css,rgba:b.rgba};const x=b.rgba>>24&255,C=b.rgba>>16&255,A=b.rgba>>8&255,T=S.rgba>>24&255,j=S.rgba>>16&255,M=S.rgba>>8&255;return l=T+Math.round((x-T)*u),c=j+Math.round((C-j)*u),h=M+Math.round((A-M)*u),{css:m.toCss(l,c,h),rgba:m.toRgba(l,c,h)}},p.isOpaque=function(S){return(255&S.rgba)==255},p.ensureContrastRatio=function(S,b,x){const C=v.ensureContrastRatio(S.rgba,b.rgba,x);if(C)return m.toColor(C>>24&255,C>>16&255,C>>8&255)},p.opaque=function(S){const b=(255|S.rgba)>>>0;return[l,c,h]=v.toChannels(b),{css:m.toCss(l,c,h),rgba:b}},p.opacity=w,p.multiplyOpacity=function(S,b){return u=255&S.rgba,w(S,u*b/255)},p.toColorRGB=function(S){return[S.rgba>>24&255,S.rgba>>16&255,S.rgba>>8&255]}}(g||(o.color=g={})),function(p){let w,S;try{const b=document.createElement("canvas");b.width=1,b.height=1;const x=b.getContext("2d",{willReadFrequently:!0});x&&(w=x,w.globalCompositeOperation="copy",S=w.createLinearGradient(0,0,1,1))}catch{}p.toColor=function(b){if(b.match(/#[\da-f]{3,8}/i))switch(b.length){case 4:return l=parseInt(b.slice(1,2).repeat(2),16),c=parseInt(b.slice(2,3).repeat(2),16),h=parseInt(b.slice(3,4).repeat(2),16),m.toColor(l,c,h);case 5:return l=parseInt(b.slice(1,2).repeat(2),16),c=parseInt(b.slice(2,3).repeat(2),16),h=parseInt(b.slice(3,4).repeat(2),16),u=parseInt(b.slice(4,5).repeat(2),16),m.toColor(l,c,h,u);case 7:return{css:b,rgba:(parseInt(b.slice(1),16)<<8|255)>>>0};case 9:return{css:b,rgba:parseInt(b.slice(1),16)>>>0}}const x=b.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(x)return l=parseInt(x[1]),c=parseInt(x[2]),h=parseInt(x[3]),u=Math.round(255*(x[5]===void 0?1:parseFloat(x[5]))),m.toColor(l,c,h,u);if(!w||!S)throw new Error("css.toColor: Unsupported css format");if(w.fillStyle=S,w.fillStyle=b,typeof w.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(w.fillRect(0,0,1,1),[l,c,h,u]=w.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(l,c,h,u),css:b}}}(y||(o.css=y={})),function(p){function w(S,b,x){const C=S/255,A=b/255,T=x/255;return .2126*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.7152*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))+.0722*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))}p.relativeLuminance=function(S){return w(S>>16&255,S>>8&255,255&S)},p.relativeLuminance2=w}(_||(o.rgb=_={})),function(p){function w(b,x,C){const A=b>>24&255,T=b>>16&255,j=b>>8&255;let M=x>>24&255,O=x>>16&255,z=x>>8&255,$=f(_.relativeLuminance2(M,O,z),_.relativeLuminance2(A,T,j));for(;$<C&&(M>0||O>0||z>0);)M-=Math.max(0,Math.ceil(.1*M)),O-=Math.max(0,Math.ceil(.1*O)),z-=Math.max(0,Math.ceil(.1*z)),$=f(_.relativeLuminance2(M,O,z),_.relativeLuminance2(A,T,j));return(M<<24|O<<16|z<<8|255)>>>0}function S(b,x,C){const A=b>>24&255,T=b>>16&255,j=b>>8&255;let M=x>>24&255,O=x>>16&255,z=x>>8&255,$=f(_.relativeLuminance2(M,O,z),_.relativeLuminance2(A,T,j));for(;$<C&&(M<255||O<255||z<255);)M=Math.min(255,M+Math.ceil(.1*(255-M))),O=Math.min(255,O+Math.ceil(.1*(255-O))),z=Math.min(255,z+Math.ceil(.1*(255-z))),$=f(_.relativeLuminance2(M,O,z),_.relativeLuminance2(A,T,j));return(M<<24|O<<16|z<<8|255)>>>0}p.blend=function(b,x){if(u=(255&x)/255,u===1)return x;const C=x>>24&255,A=x>>16&255,T=x>>8&255,j=b>>24&255,M=b>>16&255,O=b>>8&255;return l=j+Math.round((C-j)*u),c=M+Math.round((A-M)*u),h=O+Math.round((T-O)*u),m.toRgba(l,c,h)},p.ensureContrastRatio=function(b,x,C){const A=_.relativeLuminance(b>>8),T=_.relativeLuminance(x>>8);if(f(A,T)<C){if(T<A){const O=w(b,x,C),z=f(A,_.relativeLuminance(O>>8));if(z<C){const $=S(b,x,C);return z>f(A,_.relativeLuminance($>>8))?O:$}return O}const j=S(b,x,C),M=f(A,_.relativeLuminance(j>>8));if(M<C){const O=w(b,x,C);return M>f(A,_.relativeLuminance(O>>8))?j:O}return j}},p.reduceLuminance=w,p.increaseLuminance=S,p.toChannels=function(b){return[b>>24&255,b>>16&255,b>>8&255,255&b]}}(v||(o.rgba=v={})),o.toPaddedHex=d,o.contrastRatio=f},8969:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const c=l(844),h=l(2585),u=l(4348),m=l(7866),g=l(744),y=l(7302),_=l(6975),v=l(8460),d=l(1753),f=l(1480),p=l(7994),w=l(9282),S=l(5435),b=l(5981),x=l(2660);let C=!1;class A extends c.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event(j=>{var M;(M=this._onScrollApi)==null||M.fire(j.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(j){for(const M in j)this.optionsService.options[M]=j[M]}constructor(j){super(),this._windowsWrappingHeuristics=this.register(new c.MutableDisposable),this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new v.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new v.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new v.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new y.OptionsService(j)),this._instantiationService.setService(h.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(g.BufferService)),this._instantiationService.setService(h.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(m.LogService)),this._instantiationService.setService(h.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(_.CoreService)),this._instantiationService.setService(h.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(d.CoreMouseService)),this._instantiationService.setService(h.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(f.UnicodeService)),this._instantiationService.setService(h.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(p.CharsetService),this._instantiationService.setService(h.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(x.OscLinkService),this._instantiationService.setService(h.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new S.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,v.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,v.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,v.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,v.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom())),this.register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this.register(this._bufferService.onScroll(M=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this.register(this._inputHandler.onScroll(M=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this.register(new b.WriteBuffer((M,O)=>this._inputHandler.parse(M,O))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(j,M){this._writeBuffer.write(j,M)}writeSync(j,M){this._logService.logLevel<=h.LogLevelEnum.WARN&&!C&&(this._logService.warn("writeSync is unreliable and will be removed soon."),C=!0),this._writeBuffer.writeSync(j,M)}input(j,M=!0){this.coreService.triggerDataEvent(j,M)}resize(j,M){isNaN(j)||isNaN(M)||(j=Math.max(j,g.MINIMUM_COLS),M=Math.max(M,g.MINIMUM_ROWS),this._bufferService.resize(j,M))}scroll(j,M=!1){this._bufferService.scroll(j,M)}scrollLines(j,M,O){this._bufferService.scrollLines(j,M,O)}scrollPages(j){this.scrollLines(j*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(j){const M=j-this._bufferService.buffer.ydisp;M!==0&&this.scrollLines(M)}registerEscHandler(j,M){return this._inputHandler.registerEscHandler(j,M)}registerDcsHandler(j,M){return this._inputHandler.registerDcsHandler(j,M)}registerCsiHandler(j,M){return this._inputHandler.registerCsiHandler(j,M)}registerOscHandler(j,M){return this._inputHandler.registerOscHandler(j,M)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let j=!1;const M=this.optionsService.rawOptions.windowsPty;M&&M.buildNumber!==void 0&&M.buildNumber!==void 0?j=M.backend==="conpty"&&M.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(j=!0),j?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const j=[];j.push(this.onLineFeed(w.updateWindowsModeWrappedState.bind(null,this._bufferService))),j.push(this.registerCsiHandler({final:"H"},()=>((0,w.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,c.toDisposable)(()=>{for(const M of j)M.dispose()})}}}o.CoreTerminal=A},8460:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.runAndSubscribe=o.forwardEvent=o.EventEmitter=void 0,o.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=l=>(this._listeners.push(l),{dispose:()=>{if(!this._disposed){for(let c=0;c<this._listeners.length;c++)if(this._listeners[c]===l)return void this._listeners.splice(c,1)}}})),this._event}fire(l,c){const h=[];for(let u=0;u<this._listeners.length;u++)h.push(this._listeners[u]);for(let u=0;u<h.length;u++)h[u].call(void 0,l,c)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},o.forwardEvent=function(l,c){return l(h=>c.fire(h))},o.runAndSubscribe=function(l,c){return c(void 0),l(h=>c(h))}},5435:function(a,o,l){var c=this&&this.__decorate||function(V,N,P,R){var I,L=arguments.length,W=L<3?N:R===null?R=Object.getOwnPropertyDescriptor(N,P):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(V,N,P,R);else for(var J=V.length-1;J>=0;J--)(I=V[J])&&(W=(L<3?I(W):L>3?I(N,P,W):I(N,P))||W);return L>3&&W&&Object.defineProperty(N,P,W),W},h=this&&this.__param||function(V,N){return function(P,R){N(P,R,V)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const u=l(2584),m=l(7116),g=l(2015),y=l(844),_=l(482),v=l(8437),d=l(8460),f=l(643),p=l(511),w=l(3734),S=l(2585),b=l(1480),x=l(6242),C=l(6351),A=l(5941),T={"(":0,")":1,"*":2,"+":3,"-":1,".":2},j=131072;function M(V,N){if(V>24)return N.setWinLines||!1;switch(V){case 1:return!!N.restoreWin;case 2:return!!N.minimizeWin;case 3:return!!N.setWinPosition;case 4:return!!N.setWinSizePixels;case 5:return!!N.raiseWin;case 6:return!!N.lowerWin;case 7:return!!N.refreshWin;case 8:return!!N.setWinSizeChars;case 9:return!!N.maximizeWin;case 10:return!!N.fullscreenWin;case 11:return!!N.getWinState;case 13:return!!N.getWinPosition;case 14:return!!N.getWinSizePixels;case 15:return!!N.getScreenSizePixels;case 16:return!!N.getCellSizePixels;case 18:return!!N.getWinSizeChars;case 19:return!!N.getScreenSizeChars;case 20:return!!N.getIconTitle;case 21:return!!N.getWinTitle;case 22:return!!N.pushTitle;case 23:return!!N.popTitle;case 24:return!!N.setWinLines}return!1}var O;(function(V){V[V.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",V[V.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(O||(o.WindowsOptionsReportType=O={}));let z=0;class $ extends y.Disposable{getAttrData(){return this._curAttrData}constructor(N,P,R,I,L,W,J,G,B=new g.EscapeSequenceParser){super(),this._bufferService=N,this._charsetService=P,this._coreService=R,this._logService=I,this._optionsService=L,this._oscLinkService=W,this._coreMouseService=J,this._unicodeService=G,this._parser=B,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new _.StringToUtf32,this._utf8Decoder=new _.Utf8ToUtf32,this._workCell=new p.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new d.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new d.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new d.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new d.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new d.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new d.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new d.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new d.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new d.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new d.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new d.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new d.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new d.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new Y(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(D=>this._activeBuffer=D.activeBuffer)),this._parser.setCsiHandlerFallback((D,U)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(D),params:U.toArray()})}),this._parser.setEscHandlerFallback(D=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(D)})}),this._parser.setExecuteHandlerFallback(D=>{this._logService.debug("Unknown EXECUTE code: ",{code:D})}),this._parser.setOscHandlerFallback((D,U,H)=>{this._logService.debug("Unknown OSC code: ",{identifier:D,action:U,data:H})}),this._parser.setDcsHandlerFallback((D,U,H)=>{U==="HOOK"&&(H=H.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(D),action:U,payload:H})}),this._parser.setPrintHandler((D,U,H)=>this.print(D,U,H)),this._parser.registerCsiHandler({final:"@"},D=>this.insertChars(D)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},D=>this.scrollLeft(D)),this._parser.registerCsiHandler({final:"A"},D=>this.cursorUp(D)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},D=>this.scrollRight(D)),this._parser.registerCsiHandler({final:"B"},D=>this.cursorDown(D)),this._parser.registerCsiHandler({final:"C"},D=>this.cursorForward(D)),this._parser.registerCsiHandler({final:"D"},D=>this.cursorBackward(D)),this._parser.registerCsiHandler({final:"E"},D=>this.cursorNextLine(D)),this._parser.registerCsiHandler({final:"F"},D=>this.cursorPrecedingLine(D)),this._parser.registerCsiHandler({final:"G"},D=>this.cursorCharAbsolute(D)),this._parser.registerCsiHandler({final:"H"},D=>this.cursorPosition(D)),this._parser.registerCsiHandler({final:"I"},D=>this.cursorForwardTab(D)),this._parser.registerCsiHandler({final:"J"},D=>this.eraseInDisplay(D,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},D=>this.eraseInDisplay(D,!0)),this._parser.registerCsiHandler({final:"K"},D=>this.eraseInLine(D,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},D=>this.eraseInLine(D,!0)),this._parser.registerCsiHandler({final:"L"},D=>this.insertLines(D)),this._parser.registerCsiHandler({final:"M"},D=>this.deleteLines(D)),this._parser.registerCsiHandler({final:"P"},D=>this.deleteChars(D)),this._parser.registerCsiHandler({final:"S"},D=>this.scrollUp(D)),this._parser.registerCsiHandler({final:"T"},D=>this.scrollDown(D)),this._parser.registerCsiHandler({final:"X"},D=>this.eraseChars(D)),this._parser.registerCsiHandler({final:"Z"},D=>this.cursorBackwardTab(D)),this._parser.registerCsiHandler({final:"`"},D=>this.charPosAbsolute(D)),this._parser.registerCsiHandler({final:"a"},D=>this.hPositionRelative(D)),this._parser.registerCsiHandler({final:"b"},D=>this.repeatPrecedingCharacter(D)),this._parser.registerCsiHandler({final:"c"},D=>this.sendDeviceAttributesPrimary(D)),this._parser.registerCsiHandler({prefix:">",final:"c"},D=>this.sendDeviceAttributesSecondary(D)),this._parser.registerCsiHandler({final:"d"},D=>this.linePosAbsolute(D)),this._parser.registerCsiHandler({final:"e"},D=>this.vPositionRelative(D)),this._parser.registerCsiHandler({final:"f"},D=>this.hVPosition(D)),this._parser.registerCsiHandler({final:"g"},D=>this.tabClear(D)),this._parser.registerCsiHandler({final:"h"},D=>this.setMode(D)),this._parser.registerCsiHandler({prefix:"?",final:"h"},D=>this.setModePrivate(D)),this._parser.registerCsiHandler({final:"l"},D=>this.resetMode(D)),this._parser.registerCsiHandler({prefix:"?",final:"l"},D=>this.resetModePrivate(D)),this._parser.registerCsiHandler({final:"m"},D=>this.charAttributes(D)),this._parser.registerCsiHandler({final:"n"},D=>this.deviceStatus(D)),this._parser.registerCsiHandler({prefix:"?",final:"n"},D=>this.deviceStatusPrivate(D)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},D=>this.softReset(D)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},D=>this.setCursorStyle(D)),this._parser.registerCsiHandler({final:"r"},D=>this.setScrollRegion(D)),this._parser.registerCsiHandler({final:"s"},D=>this.saveCursor(D)),this._parser.registerCsiHandler({final:"t"},D=>this.windowOptions(D)),this._parser.registerCsiHandler({final:"u"},D=>this.restoreCursor(D)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},D=>this.insertColumns(D)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},D=>this.deleteColumns(D)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},D=>this.selectProtected(D)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},D=>this.requestMode(D,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},D=>this.requestMode(D,!1)),this._parser.setExecuteHandler(u.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(u.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(u.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(u.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(u.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(u.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(u.C1.IND,()=>this.index()),this._parser.setExecuteHandler(u.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(u.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new x.OscHandler(D=>(this.setTitle(D),this.setIconName(D),!0))),this._parser.registerOscHandler(1,new x.OscHandler(D=>this.setIconName(D))),this._parser.registerOscHandler(2,new x.OscHandler(D=>this.setTitle(D))),this._parser.registerOscHandler(4,new x.OscHandler(D=>this.setOrReportIndexedColor(D))),this._parser.registerOscHandler(8,new x.OscHandler(D=>this.setHyperlink(D))),this._parser.registerOscHandler(10,new x.OscHandler(D=>this.setOrReportFgColor(D))),this._parser.registerOscHandler(11,new x.OscHandler(D=>this.setOrReportBgColor(D))),this._parser.registerOscHandler(12,new x.OscHandler(D=>this.setOrReportCursorColor(D))),this._parser.registerOscHandler(104,new x.OscHandler(D=>this.restoreIndexedColor(D))),this._parser.registerOscHandler(110,new x.OscHandler(D=>this.restoreFgColor(D))),this._parser.registerOscHandler(111,new x.OscHandler(D=>this.restoreBgColor(D))),this._parser.registerOscHandler(112,new x.OscHandler(D=>this.restoreCursorColor(D))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(const D in m.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:D},()=>this.selectCharset("("+D)),this._parser.registerEscHandler({intermediates:")",final:D},()=>this.selectCharset(")"+D)),this._parser.registerEscHandler({intermediates:"*",final:D},()=>this.selectCharset("*"+D)),this._parser.registerEscHandler({intermediates:"+",final:D},()=>this.selectCharset("+"+D)),this._parser.registerEscHandler({intermediates:"-",final:D},()=>this.selectCharset("-"+D)),this._parser.registerEscHandler({intermediates:".",final:D},()=>this.selectCharset("."+D)),this._parser.registerEscHandler({intermediates:"/",final:D},()=>this.selectCharset("/"+D));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(D=>(this._logService.error("Parsing error: ",D),D)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new C.DcsHandler((D,U)=>this.requestStatusString(D,U)))}_preserveStack(N,P,R,I){this._parseStack.paused=!0,this._parseStack.cursorStartX=N,this._parseStack.cursorStartY=P,this._parseStack.decodedLength=R,this._parseStack.position=I}_logSlowResolvingAsync(N){this._logService.logLevel<=S.LogLevelEnum.WARN&&Promise.race([N,new Promise((P,R)=>setTimeout(()=>R("#SLOW_TIMEOUT"),5e3))]).catch(P=>{if(P!=="#SLOW_TIMEOUT")throw P;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(N,P){let R,I=this._activeBuffer.x,L=this._activeBuffer.y,W=0;const J=this._parseStack.paused;if(J){if(R=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,P))return this._logSlowResolvingAsync(R),R;I=this._parseStack.cursorStartX,L=this._parseStack.cursorStartY,this._parseStack.paused=!1,N.length>j&&(W=this._parseStack.position+j)}if(this._logService.logLevel<=S.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof N=="string"?` "${N}"`:` "${Array.prototype.map.call(N,D=>String.fromCharCode(D)).join("")}"`),typeof N=="string"?N.split("").map(D=>D.charCodeAt(0)):N),this._parseBuffer.length<N.length&&this._parseBuffer.length<j&&(this._parseBuffer=new Uint32Array(Math.min(N.length,j))),J||this._dirtyRowTracker.clearRange(),N.length>j)for(let D=W;D<N.length;D+=j){const U=D+j<N.length?D+j:N.length,H=typeof N=="string"?this._stringDecoder.decode(N.substring(D,U),this._parseBuffer):this._utf8Decoder.decode(N.subarray(D,U),this._parseBuffer);if(R=this._parser.parse(this._parseBuffer,H))return this._preserveStack(I,L,H,D),this._logSlowResolvingAsync(R),R}else if(!J){const D=typeof N=="string"?this._stringDecoder.decode(N,this._parseBuffer):this._utf8Decoder.decode(N,this._parseBuffer);if(R=this._parser.parse(this._parseBuffer,D))return this._preserveStack(I,L,D,0),this._logSlowResolvingAsync(R),R}this._activeBuffer.x===I&&this._activeBuffer.y===L||this._onCursorMove.fire();const G=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),B=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);B<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(B,this._bufferService.rows-1),Math.min(G,this._bufferService.rows-1))}print(N,P,R){let I,L;const W=this._charsetService.charset,J=this._optionsService.rawOptions.screenReaderMode,G=this._bufferService.cols,B=this._coreService.decPrivateModes.wraparound,D=this._coreService.modes.insertMode,U=this._curAttrData;let H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&R-P>0&&H.getWidth(this._activeBuffer.x-1)===2&&H.setCellFromCodepoint(this._activeBuffer.x-1,0,1,U);let ee=this._parser.precedingJoinState;for(let Z=P;Z<R;++Z){if(I=N[Z],I<127&&W){const Ee=W[String.fromCharCode(I)];Ee&&(I=Ee.charCodeAt(0))}const de=this._unicodeService.charProperties(I,ee);L=b.UnicodeService.extractWidth(de);const ge=b.UnicodeService.extractShouldJoin(de),ve=ge?b.UnicodeService.extractWidth(ee):0;if(ee=de,J&&this._onA11yChar.fire((0,_.stringFromCodePoint)(I)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+L-ve>G){if(B){const Ee=H;let ue=this._activeBuffer.x-ve;for(this._activeBuffer.x=ve,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),ve>0&&H instanceof v.BufferLine&&H.copyCellsFrom(Ee,ue,0,ve,!1);ue<G;)Ee.setCellFromCodepoint(ue++,0,1,U)}else if(this._activeBuffer.x=G-1,L===2)continue}if(ge&&this._activeBuffer.x){const Ee=H.getWidth(this._activeBuffer.x-1)?1:2;H.addCodepointToCell(this._activeBuffer.x-Ee,I,L);for(let ue=L-ve;--ue>=0;)H.setCellFromCodepoint(this._activeBuffer.x++,0,0,U)}else if(D&&(H.insertCells(this._activeBuffer.x,L-ve,this._activeBuffer.getNullCell(U)),H.getWidth(G-1)===2&&H.setCellFromCodepoint(G-1,f.NULL_CELL_CODE,f.NULL_CELL_WIDTH,U)),H.setCellFromCodepoint(this._activeBuffer.x++,I,L,U),L>0)for(;--L;)H.setCellFromCodepoint(this._activeBuffer.x++,0,0,U)}this._parser.precedingJoinState=ee,this._activeBuffer.x<G&&R-P>0&&H.getWidth(this._activeBuffer.x)===0&&!H.hasContent(this._activeBuffer.x)&&H.setCellFromCodepoint(this._activeBuffer.x,0,1,U),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(N,P){return N.final!=="t"||N.prefix||N.intermediates?this._parser.registerCsiHandler(N,P):this._parser.registerCsiHandler(N,R=>!M(R.params[0],this._optionsService.rawOptions.windowOptions)||P(R))}registerDcsHandler(N,P){return this._parser.registerDcsHandler(N,new C.DcsHandler(P))}registerEscHandler(N,P){return this._parser.registerEscHandler(N,P)}registerOscHandler(N,P){return this._parser.registerOscHandler(N,new x.OscHandler(P))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var N;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((N=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&N.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);P.hasWidth(this._activeBuffer.x)&&!P.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const N=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-N),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(N=this._bufferService.cols-1){this._activeBuffer.x=Math.min(N,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(N,P){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=N,this._activeBuffer.y=this._activeBuffer.scrollTop+P):(this._activeBuffer.x=N,this._activeBuffer.y=P),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(N,P){this._restrictCursor(),this._setCursor(this._activeBuffer.x+N,this._activeBuffer.y+P)}cursorUp(N){const P=this._activeBuffer.y-this._activeBuffer.scrollTop;return P>=0?this._moveCursor(0,-Math.min(P,N.params[0]||1)):this._moveCursor(0,-(N.params[0]||1)),!0}cursorDown(N){const P=this._activeBuffer.scrollBottom-this._activeBuffer.y;return P>=0?this._moveCursor(0,Math.min(P,N.params[0]||1)):this._moveCursor(0,N.params[0]||1),!0}cursorForward(N){return this._moveCursor(N.params[0]||1,0),!0}cursorBackward(N){return this._moveCursor(-(N.params[0]||1),0),!0}cursorNextLine(N){return this.cursorDown(N),this._activeBuffer.x=0,!0}cursorPrecedingLine(N){return this.cursorUp(N),this._activeBuffer.x=0,!0}cursorCharAbsolute(N){return this._setCursor((N.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(N){return this._setCursor(N.length>=2?(N.params[1]||1)-1:0,(N.params[0]||1)-1),!0}charPosAbsolute(N){return this._setCursor((N.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(N){return this._moveCursor(N.params[0]||1,0),!0}linePosAbsolute(N){return this._setCursor(this._activeBuffer.x,(N.params[0]||1)-1),!0}vPositionRelative(N){return this._moveCursor(0,N.params[0]||1),!0}hVPosition(N){return this.cursorPosition(N),!0}tabClear(N){const P=N.params[0];return P===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:P===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(N){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let P=N.params[0]||1;for(;P--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(N){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let P=N.params[0]||1;for(;P--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(N){const P=N.params[0];return P===1&&(this._curAttrData.bg|=536870912),P!==2&&P!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(N,P,R,I=!1,L=!1){const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+N);W.replaceCells(P,R,this._activeBuffer.getNullCell(this._eraseAttrData()),L),I&&(W.isWrapped=!1)}_resetBufferLine(N,P=!1){const R=this._activeBuffer.lines.get(this._activeBuffer.ybase+N);R&&(R.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),P),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+N),R.isWrapped=!1)}eraseInDisplay(N,P=!1){let R;switch(this._restrictCursor(this._bufferService.cols),N.params[0]){case 0:for(R=this._activeBuffer.y,this._dirtyRowTracker.markDirty(R),this._eraseInBufferLine(R++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,P);R<this._bufferService.rows;R++)this._resetBufferLine(R,P);this._dirtyRowTracker.markDirty(R);break;case 1:for(R=this._activeBuffer.y,this._dirtyRowTracker.markDirty(R),this._eraseInBufferLine(R,0,this._activeBuffer.x+1,!0,P),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(R+1).isWrapped=!1);R--;)this._resetBufferLine(R,P);this._dirtyRowTracker.markDirty(0);break;case 2:for(R=this._bufferService.rows,this._dirtyRowTracker.markDirty(R-1);R--;)this._resetBufferLine(R,P);this._dirtyRowTracker.markDirty(0);break;case 3:const I=this._activeBuffer.lines.length-this._bufferService.rows;I>0&&(this._activeBuffer.lines.trimStart(I),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-I,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-I,0),this._onScroll.fire(0))}return!0}eraseInLine(N,P=!1){switch(this._restrictCursor(this._bufferService.cols),N.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,P);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,P);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,P)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(N){this._restrictCursor();let P=N.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const R=this._activeBuffer.ybase+this._activeBuffer.y,I=this._bufferService.rows-1-this._activeBuffer.scrollBottom,L=this._bufferService.rows-1+this._activeBuffer.ybase-I+1;for(;P--;)this._activeBuffer.lines.splice(L-1,1),this._activeBuffer.lines.splice(R,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(N){this._restrictCursor();let P=N.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const R=this._activeBuffer.ybase+this._activeBuffer.y;let I;for(I=this._bufferService.rows-1-this._activeBuffer.scrollBottom,I=this._bufferService.rows-1+this._activeBuffer.ybase-I;P--;)this._activeBuffer.lines.splice(R,1),this._activeBuffer.lines.splice(I,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(N){this._restrictCursor();const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return P&&(P.insertCells(this._activeBuffer.x,N.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(N){this._restrictCursor();const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return P&&(P.deleteCells(this._activeBuffer.x,N.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(N){let P=N.params[0]||1;for(;P--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(N){let P=N.params[0]||1;for(;P--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(v.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(N){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const P=N.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);I.deleteCells(0,P,this._activeBuffer.getNullCell(this._eraseAttrData())),I.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(N){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const P=N.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);I.insertCells(0,P,this._activeBuffer.getNullCell(this._eraseAttrData())),I.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(N){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const P=N.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);I.insertCells(this._activeBuffer.x,P,this._activeBuffer.getNullCell(this._eraseAttrData())),I.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(N){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const P=N.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);I.deleteCells(this._activeBuffer.x,P,this._activeBuffer.getNullCell(this._eraseAttrData())),I.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(N){this._restrictCursor();const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return P&&(P.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(N.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(N){const P=this._parser.precedingJoinState;if(!P)return!0;const R=N.params[0]||1,I=b.UnicodeService.extractWidth(P),L=this._activeBuffer.x-I,W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(L),J=new Uint32Array(W.length*R);let G=0;for(let D=0;D<W.length;){const U=W.codePointAt(D)||0;J[G++]=U,D+=U>65535?2:1}let B=G;for(let D=1;D<R;++D)J.copyWithin(B,0,G),B+=G;return this.print(J,0,B),!0}sendDeviceAttributesPrimary(N){return N.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(u.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(u.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(N){return N.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(u.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(u.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(N.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(N){return(this._optionsService.rawOptions.termName+"").indexOf(N)===0}setMode(N){for(let P=0;P<N.length;P++)switch(N.params[P]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(N){for(let P=0;P<N.length;P++)switch(N.params[P]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),this._charsetService.setgCharset(1,m.DEFAULT_CHARSET),this._charsetService.setgCharset(2,m.DEFAULT_CHARSET),this._charsetService.setgCharset(3,m.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(N){for(let P=0;P<N.length;P++)switch(N.params[P]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(N){for(let P=0;P<N.length;P++)switch(N.params[P]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),N.params[P]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(N,P){const R=this._coreService.decPrivateModes,{activeProtocol:I,activeEncoding:L}=this._coreMouseService,W=this._coreService,{buffers:J,cols:G}=this._bufferService,{active:B,alt:D}=J,U=this._optionsService.rawOptions,H=ge=>ge?1:2,ee=N.params[0];return Z=ee,de=P?ee===2?4:ee===4?H(W.modes.insertMode):ee===12?3:ee===20?H(U.convertEol):0:ee===1?H(R.applicationCursorKeys):ee===3?U.windowOptions.setWinLines?G===80?2:G===132?1:0:0:ee===6?H(R.origin):ee===7?H(R.wraparound):ee===8?3:ee===9?H(I==="X10"):ee===12?H(U.cursorBlink):ee===25?H(!W.isCursorHidden):ee===45?H(R.reverseWraparound):ee===66?H(R.applicationKeypad):ee===67?4:ee===1e3?H(I==="VT200"):ee===1002?H(I==="DRAG"):ee===1003?H(I==="ANY"):ee===1004?H(R.sendFocus):ee===1005?4:ee===1006?H(L==="SGR"):ee===1015?4:ee===1016?H(L==="SGR_PIXELS"):ee===1048?1:ee===47||ee===1047||ee===1049?H(B===D):ee===2004?H(R.bracketedPasteMode):0,W.triggerDataEvent(`${u.C0.ESC}[${P?"":"?"}${Z};${de}$y`),!0;var Z,de}_updateAttrColor(N,P,R,I,L){return P===2?(N|=50331648,N&=-16777216,N|=w.AttributeData.fromColorRGB([R,I,L])):P===5&&(N&=-50331904,N|=33554432|255&R),N}_extractColor(N,P,R){const I=[0,0,-1,0,0,0];let L=0,W=0;do{if(I[W+L]=N.params[P+W],N.hasSubParams(P+W)){const J=N.getSubParams(P+W);let G=0;do I[1]===5&&(L=1),I[W+G+1+L]=J[G];while(++G<J.length&&G+W+1+L<I.length);break}if(I[1]===5&&W+L>=2||I[1]===2&&W+L>=5)break;I[1]&&(L=1)}while(++W+P<N.length&&W+L<I.length);for(let J=2;J<I.length;++J)I[J]===-1&&(I[J]=0);switch(I[0]){case 38:R.fg=this._updateAttrColor(R.fg,I[1],I[3],I[4],I[5]);break;case 48:R.bg=this._updateAttrColor(R.bg,I[1],I[3],I[4],I[5]);break;case 58:R.extended=R.extended.clone(),R.extended.underlineColor=this._updateAttrColor(R.extended.underlineColor,I[1],I[3],I[4],I[5])}return W}_processUnderline(N,P){P.extended=P.extended.clone(),(!~N||N>5)&&(N=1),P.extended.underlineStyle=N,P.fg|=268435456,N===0&&(P.fg&=-268435457),P.updateExtended()}_processSGR0(N){N.fg=v.DEFAULT_ATTR_DATA.fg,N.bg=v.DEFAULT_ATTR_DATA.bg,N.extended=N.extended.clone(),N.extended.underlineStyle=0,N.extended.underlineColor&=-67108864,N.updateExtended()}charAttributes(N){if(N.length===1&&N.params[0]===0)return this._processSGR0(this._curAttrData),!0;const P=N.length;let R;const I=this._curAttrData;for(let L=0;L<P;L++)R=N.params[L],R>=30&&R<=37?(I.fg&=-50331904,I.fg|=16777216|R-30):R>=40&&R<=47?(I.bg&=-50331904,I.bg|=16777216|R-40):R>=90&&R<=97?(I.fg&=-50331904,I.fg|=16777224|R-90):R>=100&&R<=107?(I.bg&=-50331904,I.bg|=16777224|R-100):R===0?this._processSGR0(I):R===1?I.fg|=134217728:R===3?I.bg|=67108864:R===4?(I.fg|=268435456,this._processUnderline(N.hasSubParams(L)?N.getSubParams(L)[0]:1,I)):R===5?I.fg|=536870912:R===7?I.fg|=67108864:R===8?I.fg|=1073741824:R===9?I.fg|=2147483648:R===2?I.bg|=134217728:R===21?this._processUnderline(2,I):R===22?(I.fg&=-134217729,I.bg&=-134217729):R===23?I.bg&=-67108865:R===24?(I.fg&=-268435457,this._processUnderline(0,I)):R===25?I.fg&=-536870913:R===27?I.fg&=-67108865:R===28?I.fg&=-1073741825:R===29?I.fg&=2147483647:R===39?(I.fg&=-67108864,I.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):R===49?(I.bg&=-67108864,I.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):R===38||R===48||R===58?L+=this._extractColor(N,L,I):R===53?I.bg|=1073741824:R===55?I.bg&=-1073741825:R===59?(I.extended=I.extended.clone(),I.extended.underlineColor=-1,I.updateExtended()):R===100?(I.fg&=-67108864,I.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,I.bg&=-67108864,I.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",R);return!0}deviceStatus(N){switch(N.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:const P=this._activeBuffer.y+1,R=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${P};${R}R`)}return!0}deviceStatusPrivate(N){if(N.params[0]===6){const P=this._activeBuffer.y+1,R=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${P};${R}R`)}return!0}softReset(N){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(N){const P=N.params[0]||1;switch(P){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const R=P%2==1;return this._optionsService.options.cursorBlink=R,!0}setScrollRegion(N){const P=N.params[0]||1;let R;return(N.length<2||(R=N.params[1])>this._bufferService.rows||R===0)&&(R=this._bufferService.rows),R>P&&(this._activeBuffer.scrollTop=P-1,this._activeBuffer.scrollBottom=R-1,this._setCursor(0,0)),!0}windowOptions(N){if(!M(N.params[0],this._optionsService.rawOptions.windowOptions))return!0;const P=N.length>1?N.params[1]:0;switch(N.params[0]){case 14:P!==2&&this._onRequestWindowsOptionsReport.fire(O.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(O.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${u.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:P!==0&&P!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),P!==0&&P!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:P!==0&&P!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),P!==0&&P!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(N){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(N){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(N){return this._windowTitle=N,this._onTitleChange.fire(N),!0}setIconName(N){return this._iconName=N,!0}setOrReportIndexedColor(N){const P=[],R=N.split(";");for(;R.length>1;){const I=R.shift(),L=R.shift();if(/^\d+$/.exec(I)){const W=parseInt(I);if(X(W))if(L==="?")P.push({type:0,index:W});else{const J=(0,A.parseColor)(L);J&&P.push({type:1,index:W,color:J})}}}return P.length&&this._onColor.fire(P),!0}setHyperlink(N){const P=N.split(";");return!(P.length<2)&&(P[1]?this._createHyperlink(P[0],P[1]):!P[0]&&this._finishHyperlink())}_createHyperlink(N,P){this._getCurrentLinkId()&&this._finishHyperlink();const R=N.split(":");let I;const L=R.findIndex(W=>W.startsWith("id="));return L!==-1&&(I=R[L].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:I,uri:P}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(N,P){const R=N.split(";");for(let I=0;I<R.length&&!(P>=this._specialColors.length);++I,++P)if(R[I]==="?")this._onColor.fire([{type:0,index:this._specialColors[P]}]);else{const L=(0,A.parseColor)(R[I]);L&&this._onColor.fire([{type:1,index:this._specialColors[P],color:L}])}return!0}setOrReportFgColor(N){return this._setOrReportSpecialColor(N,0)}setOrReportBgColor(N){return this._setOrReportSpecialColor(N,1)}setOrReportCursorColor(N){return this._setOrReportSpecialColor(N,2)}restoreIndexedColor(N){if(!N)return this._onColor.fire([{type:2}]),!0;const P=[],R=N.split(";");for(let I=0;I<R.length;++I)if(/^\d+$/.exec(R[I])){const L=parseInt(R[I]);X(L)&&P.push({type:2,index:L})}return P.length&&this._onColor.fire(P),!0}restoreFgColor(N){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(N){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(N){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),!0}selectCharset(N){return N.length!==2?(this.selectDefaultCharset(),!0):(N[0]==="/"||this._charsetService.setgCharset(T[N[0]],m.CHARSETS[N[1]]||m.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const N=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,N,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(N){return this._charsetService.setgLevel(N),!0}screenAlignmentPattern(){const N=new p.CellData;N.content=4194373,N.fg=this._curAttrData.fg,N.bg=this._curAttrData.bg,this._setCursor(0,0);for(let P=0;P<this._bufferService.rows;++P){const R=this._activeBuffer.ybase+this._activeBuffer.y+P,I=this._activeBuffer.lines.get(R);I&&(I.fill(N),I.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(N,P){const R=this._bufferService.buffer,I=this._optionsService.rawOptions;return(L=>(this._coreService.triggerDataEvent(`${u.C0.ESC}${L}${u.C0.ESC}\\`),!0))(N==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:N==='"p'?'P1$r61;1"p':N==="r"?`P1$r${R.scrollTop+1};${R.scrollBottom+1}r`:N==="m"?"P1$r0m":N===" q"?`P1$r${{block:2,underline:4,bar:6}[I.cursorStyle]-(I.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(N,P){this._dirtyRowTracker.markRangeDirty(N,P)}}o.InputHandler=$;let Y=class{constructor(V){this._bufferService=V,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(V){V<this.start?this.start=V:V>this.end&&(this.end=V)}markRangeDirty(V,N){V>N&&(z=V,V=N,N=z),V<this.start&&(this.start=V),N>this.end&&(this.end=N)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function X(V){return 0<=V&&V<256}Y=c([h(0,S.IBufferService)],Y)},844:(a,o)=>{function l(c){for(const h of c)h.dispose();c.length=0}Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.toDisposable=o.MutableDisposable=o.Disposable=void 0,o.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const c of this._disposables)c.dispose();this._disposables.length=0}register(c){return this._disposables.push(c),c}unregister(c){const h=this._disposables.indexOf(c);h!==-1&&this._disposables.splice(h,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(c){var h;this._isDisposed||c===this._value||((h=this._value)==null||h.dispose(),this._value=c)}clear(){this.value=void 0}dispose(){var c;this._isDisposed=!0,(c=this._value)==null||c.dispose(),this._value=void 0}},o.toDisposable=function(c){return{dispose:c}},o.disposeArray=l,o.getDisposeArrayDisposable=function(c){return{dispose:()=>l(c)}}},1505:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class l{constructor(){this._data={}}set(h,u,m){this._data[h]||(this._data[h]={}),this._data[h][u]=m}get(h,u){return this._data[h]?this._data[h][u]:void 0}clear(){this._data={}}}o.TwoKeyMap=l,o.FourKeyMap=class{constructor(){this._data=new l}set(c,h,u,m,g){this._data.get(c,h)||this._data.set(c,h,new l),this._data.get(c,h).set(u,m,g)}get(c,h,u,m){var g;return(g=this._data.get(c,h))==null?void 0:g.get(u,m)}clear(){this._data.clear()}}},6114:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isChromeOS=o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.getSafariVersion=o.isSafari=o.isLegacyEdge=o.isFirefox=o.isNode=void 0,o.isNode=typeof process<"u"&&"title"in process;const l=o.isNode?"node":navigator.userAgent,c=o.isNode?"node":navigator.platform;o.isFirefox=l.includes("Firefox"),o.isLegacyEdge=l.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(l),o.getSafariVersion=function(){if(!o.isSafari)return 0;const h=l.match(/Version\/(\d+)/);return h===null||h.length<2?0:parseInt(h[1])},o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(c),o.isIpad=c==="iPad",o.isIphone=c==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(c),o.isLinux=c.indexOf("Linux")>=0,o.isChromeOS=/\bCrOS\b/.test(l)},6106:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let l=0;o.SortedList=class{constructor(c){this._getKey=c,this._array=[]}clear(){this._array.length=0}insert(c){this._array.length!==0?(l=this._search(this._getKey(c)),this._array.splice(l,0,c)):this._array.push(c)}delete(c){if(this._array.length===0)return!1;const h=this._getKey(c);if(h===void 0||(l=this._search(h),l===-1)||this._getKey(this._array[l])!==h)return!1;do if(this._array[l]===c)return this._array.splice(l,1),!0;while(++l<this._array.length&&this._getKey(this._array[l])===h);return!1}*getKeyIterator(c){if(this._array.length!==0&&(l=this._search(c),!(l<0||l>=this._array.length)&&this._getKey(this._array[l])===c))do yield this._array[l];while(++l<this._array.length&&this._getKey(this._array[l])===c)}forEachByKey(c,h){if(this._array.length!==0&&(l=this._search(c),!(l<0||l>=this._array.length)&&this._getKey(this._array[l])===c))do h(this._array[l]);while(++l<this._array.length&&this._getKey(this._array[l])===c)}values(){return[...this._array].values()}_search(c){let h=0,u=this._array.length-1;for(;u>=h;){let m=h+u>>1;const g=this._getKey(this._array[m]);if(g>c)u=m-1;else{if(!(g<c)){for(;m>0&&this._getKey(this._array[m-1])===c;)m--;return m}h=m+1}}return h}}},7226:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const c=l(6114);class h{constructor(){this._tasks=[],this._i=0}enqueue(g){this._tasks.push(g),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(g){this._idleCallback=void 0;let y=0,_=0,v=g.timeRemaining(),d=0;for(;this._i<this._tasks.length;){if(y=Date.now(),this._tasks[this._i]()||this._i++,y=Math.max(1,Date.now()-y),_=Math.max(y,_),d=g.timeRemaining(),1.5*_>d)return v-y<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-y))}ms`),void this._start();v=d}this.clear()}}class u extends h{_requestCallback(g){return setTimeout(()=>g(this._createDeadline(16)))}_cancelCallback(g){clearTimeout(g)}_createDeadline(g){const y=Date.now()+g;return{timeRemaining:()=>Math.max(0,y-Date.now())}}}o.PriorityTaskQueue=u,o.IdleTaskQueue=!c.isNode&&"requestIdleCallback"in window?class extends h{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:u,o.DebouncedIdleTask=class{constructor(){this._queue=new o.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},9282:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const c=l(643);o.updateWindowsModeWrappedState=function(h){const u=h.buffer.lines.get(h.buffer.ybase+h.buffer.y-1),m=u==null?void 0:u.get(h.cols-1),g=h.buffer.lines.get(h.buffer.ybase+h.buffer.y);g&&m&&(g.isWrapped=m[c.CHAR_DATA_CODE_INDEX]!==c.NULL_CELL_CODE&&m[c.CHAR_DATA_CODE_INDEX]!==c.WHITESPACE_CELL_CODE)}},3734:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;class l{constructor(){this.fg=0,this.bg=0,this.extended=new c}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){const u=new l;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}o.AttributeData=l;class c{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){const u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,m=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=m}clone(){return new c(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}o.ExtendedAttrs=c},9092:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const c=l(6349),h=l(7226),u=l(3734),m=l(8437),g=l(4634),y=l(511),_=l(643),v=l(4863),d=l(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(f,p,w){this._hasScrollback=f,this._optionsService=p,this._bufferService=w,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=m.DEFAULT_ATTR_DATA.clone(),this.savedCharset=d.DEFAULT_CHARSET,this.markers=[],this._nullCell=y.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]),this._whitespaceCell=y.CellData.fromCharData([0,_.WHITESPACE_CELL_CHAR,_.WHITESPACE_CELL_WIDTH,_.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new h.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(f){return f?(this._nullCell.fg=f.fg,this._nullCell.bg=f.bg,this._nullCell.extended=f.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new u.ExtendedAttrs),this._nullCell}getWhitespaceCell(f){return f?(this._whitespaceCell.fg=f.fg,this._whitespaceCell.bg=f.bg,this._whitespaceCell.extended=f.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new u.ExtendedAttrs),this._whitespaceCell}getBlankLine(f,p){return new m.BufferLine(this._bufferService.cols,this.getNullCell(f),p)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const f=this.ybase+this.y-this.ydisp;return f>=0&&f<this._rows}_getCorrectBufferLength(f){if(!this._hasScrollback)return f;const p=f+this._optionsService.rawOptions.scrollback;return p>o.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:p}fillViewportRows(f){if(this.lines.length===0){f===void 0&&(f=m.DEFAULT_ATTR_DATA);let p=this._rows;for(;p--;)this.lines.push(this.getBlankLine(f))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(f,p){const w=this.getNullCell(m.DEFAULT_ATTR_DATA);let S=0;const b=this._getCorrectBufferLength(p);if(b>this.lines.maxLength&&(this.lines.maxLength=b),this.lines.length>0){if(this._cols<f)for(let C=0;C<this.lines.length;C++)S+=+this.lines.get(C).resize(f,w);let x=0;if(this._rows<p)for(let C=this._rows;C<p;C++)this.lines.length<p+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new m.BufferLine(f,w)):this.ybase>0&&this.lines.length<=this.ybase+this.y+x+1?(this.ybase--,x++,this.ydisp>0&&this.ydisp--):this.lines.push(new m.BufferLine(f,w)));else for(let C=this._rows;C>p;C--)this.lines.length>p+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(b<this.lines.maxLength){const C=this.lines.length-b;C>0&&(this.lines.trimStart(C),this.ybase=Math.max(this.ybase-C,0),this.ydisp=Math.max(this.ydisp-C,0),this.savedY=Math.max(this.savedY-C,0)),this.lines.maxLength=b}this.x=Math.min(this.x,f-1),this.y=Math.min(this.y,p-1),x&&(this.y+=x),this.savedX=Math.min(this.savedX,f-1),this.scrollTop=0}if(this.scrollBottom=p-1,this._isReflowEnabled&&(this._reflow(f,p),this._cols>f))for(let x=0;x<this.lines.length;x++)S+=+this.lines.get(x).resize(f,w);this._cols=f,this._rows=p,this._memoryCleanupQueue.clear(),S>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let f=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,f=!1);let p=0;for(;this._memoryCleanupPosition<this.lines.length;)if(p+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),p>100)return!0;return f}get _isReflowEnabled(){const f=this._optionsService.rawOptions.windowsPty;return f&&f.buildNumber?this._hasScrollback&&f.backend==="conpty"&&f.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(f,p){this._cols!==f&&(f>this._cols?this._reflowLarger(f,p):this._reflowSmaller(f,p))}_reflowLarger(f,p){const w=(0,g.reflowLargerGetLinesToRemove)(this.lines,this._cols,f,this.ybase+this.y,this.getNullCell(m.DEFAULT_ATTR_DATA));if(w.length>0){const S=(0,g.reflowLargerCreateNewLayout)(this.lines,w);(0,g.reflowLargerApplyNewLayout)(this.lines,S.layout),this._reflowLargerAdjustViewport(f,p,S.countRemoved)}}_reflowLargerAdjustViewport(f,p,w){const S=this.getNullCell(m.DEFAULT_ATTR_DATA);let b=w;for(;b-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<p&&this.lines.push(new m.BufferLine(f,S))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-w,0)}_reflowSmaller(f,p){const w=this.getNullCell(m.DEFAULT_ATTR_DATA),S=[];let b=0;for(let x=this.lines.length-1;x>=0;x--){let C=this.lines.get(x);if(!C||!C.isWrapped&&C.getTrimmedLength()<=f)continue;const A=[C];for(;C.isWrapped&&x>0;)C=this.lines.get(--x),A.unshift(C);const T=this.ybase+this.y;if(T>=x&&T<x+A.length)continue;const j=A[A.length-1].getTrimmedLength(),M=(0,g.reflowSmallerGetNewLineLengths)(A,this._cols,f),O=M.length-A.length;let z;z=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+O):Math.max(0,this.lines.length-this.lines.maxLength+O);const $=[];for(let R=0;R<O;R++){const I=this.getBlankLine(m.DEFAULT_ATTR_DATA,!0);$.push(I)}$.length>0&&(S.push({start:x+A.length+b,newLines:$}),b+=$.length),A.push(...$);let Y=M.length-1,X=M[Y];X===0&&(Y--,X=M[Y]);let V=A.length-O-1,N=j;for(;V>=0;){const R=Math.min(N,X);if(A[Y]===void 0)break;if(A[Y].copyCellsFrom(A[V],N-R,X-R,R,!0),X-=R,X===0&&(Y--,X=M[Y]),N-=R,N===0){V--;const I=Math.max(V,0);N=(0,g.getWrappedLineTrimmedLength)(A,I,this._cols)}}for(let R=0;R<A.length;R++)M[R]<f&&A[R].setCell(M[R],w);let P=O-z;for(;P-- >0;)this.ybase===0?this.y<p-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+b)-p&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+O,this.ybase+p-1)}if(S.length>0){const x=[],C=[];for(let Y=0;Y<this.lines.length;Y++)C.push(this.lines.get(Y));const A=this.lines.length;let T=A-1,j=0,M=S[j];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+b);let O=0;for(let Y=Math.min(this.lines.maxLength-1,A+b-1);Y>=0;Y--)if(M&&M.start>T+O){for(let X=M.newLines.length-1;X>=0;X--)this.lines.set(Y--,M.newLines[X]);Y++,x.push({index:T+1,amount:M.newLines.length}),O+=M.newLines.length,M=S[++j]}else this.lines.set(Y,C[T--]);let z=0;for(let Y=x.length-1;Y>=0;Y--)x[Y].index+=z,this.lines.onInsertEmitter.fire(x[Y]),z+=x[Y].amount;const $=Math.max(0,A+b-this.lines.maxLength);$>0&&this.lines.onTrimEmitter.fire($)}}translateBufferLineToString(f,p,w=0,S){const b=this.lines.get(f);return b?b.translateToString(p,w,S):""}getWrappedRangeForLine(f){let p=f,w=f;for(;p>0&&this.lines.get(p).isWrapped;)p--;for(;w+1<this.lines.length&&this.lines.get(w+1).isWrapped;)w++;return{first:p,last:w}}setupTabStops(f){for(f!=null?this.tabs[f]||(f=this.prevStop(f)):(this.tabs={},f=0);f<this._cols;f+=this._optionsService.rawOptions.tabStopWidth)this.tabs[f]=!0}prevStop(f){for(f==null&&(f=this.x);!this.tabs[--f]&&f>0;);return f>=this._cols?this._cols-1:f<0?0:f}nextStop(f){for(f==null&&(f=this.x);!this.tabs[++f]&&f<this._cols;);return f>=this._cols?this._cols-1:f<0?0:f}clearMarkers(f){this._isClearing=!0;for(let p=0;p<this.markers.length;p++)this.markers[p].line===f&&(this.markers[p].dispose(),this.markers.splice(p--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let f=0;f<this.markers.length;f++)this.markers[f].dispose(),this.markers.splice(f--,1);this._isClearing=!1}addMarker(f){const p=new v.Marker(f);return this.markers.push(p),p.register(this.lines.onTrim(w=>{p.line-=w,p.line<0&&p.dispose()})),p.register(this.lines.onInsert(w=>{p.line>=w.index&&(p.line+=w.amount)})),p.register(this.lines.onDelete(w=>{p.line>=w.index&&p.line<w.index+w.amount&&p.dispose(),p.line>w.index&&(p.line-=w.amount)})),p.register(p.onDispose(()=>this._removeMarker(p))),p}_removeMarker(f){this._isClearing||this.markers.splice(this.markers.indexOf(f),1)}}},8437:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const c=l(3734),h=l(511),u=l(643),m=l(482);o.DEFAULT_ATTR_DATA=Object.freeze(new c.AttributeData);let g=0;class y{constructor(v,d,f=!1){this.isWrapped=f,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const p=d||h.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let w=0;w<v;++w)this.setCell(w,p);this.length=v}get(v){const d=this._data[3*v+0],f=2097151&d;return[this._data[3*v+1],2097152&d?this._combined[v]:f?(0,m.stringFromCodePoint)(f):"",d>>22,2097152&d?this._combined[v].charCodeAt(this._combined[v].length-1):f]}set(v,d){this._data[3*v+1]=d[u.CHAR_DATA_ATTR_INDEX],d[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=d[1],this._data[3*v+0]=2097152|v|d[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=d[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|d[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(v){return this._data[3*v+0]>>22}hasWidth(v){return 12582912&this._data[3*v+0]}getFg(v){return this._data[3*v+1]}getBg(v){return this._data[3*v+2]}hasContent(v){return 4194303&this._data[3*v+0]}getCodePoint(v){const d=this._data[3*v+0];return 2097152&d?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&d}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const d=this._data[3*v+0];return 2097152&d?this._combined[v]:2097151&d?(0,m.stringFromCodePoint)(2097151&d):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,d){return g=3*v,d.content=this._data[g+0],d.fg=this._data[g+1],d.bg=this._data[g+2],2097152&d.content&&(d.combinedData=this._combined[v]),268435456&d.bg&&(d.extended=this._extendedAttrs[v]),d}setCell(v,d){2097152&d.content&&(this._combined[v]=d.combinedData),268435456&d.bg&&(this._extendedAttrs[v]=d.extended),this._data[3*v+0]=d.content,this._data[3*v+1]=d.fg,this._data[3*v+2]=d.bg}setCellFromCodepoint(v,d,f,p){268435456&p.bg&&(this._extendedAttrs[v]=p.extended),this._data[3*v+0]=d|f<<22,this._data[3*v+1]=p.fg,this._data[3*v+2]=p.bg}addCodepointToCell(v,d,f){let p=this._data[3*v+0];2097152&p?this._combined[v]+=(0,m.stringFromCodePoint)(d):2097151&p?(this._combined[v]=(0,m.stringFromCodePoint)(2097151&p)+(0,m.stringFromCodePoint)(d),p&=-2097152,p|=2097152):p=d|4194304,f&&(p&=-12582913,p|=f<<22),this._data[3*v+0]=p}insertCells(v,d,f){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,f),d<this.length-v){const p=new h.CellData;for(let w=this.length-v-d-1;w>=0;--w)this.setCell(v+d+w,this.loadCell(v+w,p));for(let w=0;w<d;++w)this.setCell(v+w,f)}else for(let p=v;p<this.length;++p)this.setCell(p,f);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,f)}deleteCells(v,d,f){if(v%=this.length,d<this.length-v){const p=new h.CellData;for(let w=0;w<this.length-v-d;++w)this.setCell(v+w,this.loadCell(v+d+w,p));for(let w=this.length-d;w<this.length;++w)this.setCell(w,f)}else for(let p=v;p<this.length;++p)this.setCell(p,f);v&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,f),this.getWidth(v)!==0||this.hasContent(v)||this.setCellFromCodepoint(v,0,1,f)}replaceCells(v,d,f,p=!1){if(p)for(v&&this.getWidth(v-1)===2&&!this.isProtected(v-1)&&this.setCellFromCodepoint(v-1,0,1,f),d<this.length&&this.getWidth(d-1)===2&&!this.isProtected(d)&&this.setCellFromCodepoint(d,0,1,f);v<d&&v<this.length;)this.isProtected(v)||this.setCell(v,f),v++;else for(v&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,f),d<this.length&&this.getWidth(d-1)===2&&this.setCellFromCodepoint(d,0,1,f);v<d&&v<this.length;)this.setCell(v++,f)}resize(v,d){if(v===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const f=3*v;if(v>this.length){if(this._data.buffer.byteLength>=4*f)this._data=new Uint32Array(this._data.buffer,0,f);else{const p=new Uint32Array(f);p.set(this._data),this._data=p}for(let p=this.length;p<v;++p)this.setCell(p,d)}else{this._data=this._data.subarray(0,f);const p=Object.keys(this._combined);for(let S=0;S<p.length;S++){const b=parseInt(p[S],10);b>=v&&delete this._combined[b]}const w=Object.keys(this._extendedAttrs);for(let S=0;S<w.length;S++){const b=parseInt(w[S],10);b>=v&&delete this._extendedAttrs[b]}}return this.length=v,4*f*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const v=new Uint32Array(this._data.length);return v.set(this._data),this._data=v,1}return 0}fill(v,d=!1){if(d)for(let f=0;f<this.length;++f)this.isProtected(f)||this.setCell(f,v);else{this._combined={},this._extendedAttrs={};for(let f=0;f<this.length;++f)this.setCell(f,v)}}copyFrom(v){this.length!==v.length?this._data=new Uint32Array(v._data):this._data.set(v._data),this.length=v.length,this._combined={};for(const d in v._combined)this._combined[d]=v._combined[d];this._extendedAttrs={};for(const d in v._extendedAttrs)this._extendedAttrs[d]=v._extendedAttrs[d];this.isWrapped=v.isWrapped}clone(){const v=new y(0);v._data=new Uint32Array(this._data),v.length=this.length;for(const d in this._combined)v._combined[d]=this._combined[d];for(const d in this._extendedAttrs)v._extendedAttrs[d]=this._extendedAttrs[d];return v.isWrapped=this.isWrapped,v}getTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0])return v+(this._data[3*v+0]>>22);return 0}getNoBgTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0]||50331648&this._data[3*v+2])return v+(this._data[3*v+0]>>22);return 0}copyCellsFrom(v,d,f,p,w){const S=v._data;if(w)for(let x=p-1;x>=0;x--){for(let C=0;C<3;C++)this._data[3*(f+x)+C]=S[3*(d+x)+C];268435456&S[3*(d+x)+2]&&(this._extendedAttrs[f+x]=v._extendedAttrs[d+x])}else for(let x=0;x<p;x++){for(let C=0;C<3;C++)this._data[3*(f+x)+C]=S[3*(d+x)+C];268435456&S[3*(d+x)+2]&&(this._extendedAttrs[f+x]=v._extendedAttrs[d+x])}const b=Object.keys(v._combined);for(let x=0;x<b.length;x++){const C=parseInt(b[x],10);C>=d&&(this._combined[C-d+f]=v._combined[C])}}translateToString(v,d,f,p){d=d??0,f=f??this.length,v&&(f=Math.min(f,this.getTrimmedLength())),p&&(p.length=0);let w="";for(;d<f;){const S=this._data[3*d+0],b=2097151&S,x=2097152&S?this._combined[d]:b?(0,m.stringFromCodePoint)(b):u.WHITESPACE_CELL_CHAR;if(w+=x,p)for(let C=0;C<x.length;++C)p.push(d);d+=S>>22||1}return p&&p.push(d),w}}o.BufferLine=y},4841:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(l,c){if(l.start.y>l.end.y)throw new Error(`Buffer range end (${l.end.x}, ${l.end.y}) cannot be before start (${l.start.x}, ${l.start.y})`);return c*(l.end.y-l.start.y)+(l.end.x-l.start.x+1)}},4634:(a,o)=>{function l(c,h,u){if(h===c.length-1)return c[h].getTrimmedLength();const m=!c[h].hasContent(u-1)&&c[h].getWidth(u-1)===1,g=c[h+1].getWidth(0)===2;return m&&g?u-1:u}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(c,h,u,m,g){const y=[];for(let _=0;_<c.length-1;_++){let v=_,d=c.get(++v);if(!d.isWrapped)continue;const f=[c.get(_)];for(;v<c.length&&d.isWrapped;)f.push(d),d=c.get(++v);if(m>=_&&m<v){_+=f.length-1;continue}let p=0,w=l(f,p,h),S=1,b=0;for(;S<f.length;){const C=l(f,S,h),A=C-b,T=u-w,j=Math.min(A,T);f[p].copyCellsFrom(f[S],b,w,j,!1),w+=j,w===u&&(p++,w=0),b+=j,b===C&&(S++,b=0),w===0&&p!==0&&f[p-1].getWidth(u-1)===2&&(f[p].copyCellsFrom(f[p-1],u-1,w++,1,!1),f[p-1].setCell(u-1,g))}f[p].replaceCells(w,u,g);let x=0;for(let C=f.length-1;C>0&&(C>p||f[C].getTrimmedLength()===0);C--)x++;x>0&&(y.push(_+f.length-x),y.push(x)),_+=f.length-1}return y},o.reflowLargerCreateNewLayout=function(c,h){const u=[];let m=0,g=h[m],y=0;for(let _=0;_<c.length;_++)if(g===_){const v=h[++m];c.onDeleteEmitter.fire({index:_-y,amount:v}),_+=v-1,y+=v,g=h[++m]}else u.push(_);return{layout:u,countRemoved:y}},o.reflowLargerApplyNewLayout=function(c,h){const u=[];for(let m=0;m<h.length;m++)u.push(c.get(h[m]));for(let m=0;m<u.length;m++)c.set(m,u[m]);c.length=h.length},o.reflowSmallerGetNewLineLengths=function(c,h,u){const m=[],g=c.map((d,f)=>l(c,f,h)).reduce((d,f)=>d+f);let y=0,_=0,v=0;for(;v<g;){if(g-v<u){m.push(g-v);break}y+=u;const d=l(c,_,h);y>d&&(y-=d,_++);const f=c[_].getWidth(y-1)===2;f&&y--;const p=f?u-1:u;m.push(p),v+=p}return m},o.getWrappedLineTrimmedLength=l},5295:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const c=l(8460),h=l(844),u=l(9092);class m extends h.Disposable{constructor(y,_){super(),this._optionsService=y,this._bufferService=_,this._onBufferActivate=this.register(new c.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new u.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new u.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(y){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(y),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(y,_){this._normal.resize(y,_),this._alt.resize(y,_),this.setupTabStops(y)}setupTabStops(y){this._normal.setupTabStops(y),this._alt.setupTabStops(y)}}o.BufferSet=m},511:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const c=l(482),h=l(643),u=l(3734);class m extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(y){const _=new m;return _.setFromCharData(y),_}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,c.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(y){this.fg=y[h.CHAR_DATA_ATTR_INDEX],this.bg=0;let _=!1;if(y[h.CHAR_DATA_CHAR_INDEX].length>2)_=!0;else if(y[h.CHAR_DATA_CHAR_INDEX].length===2){const v=y[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const d=y[h.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=d&&d<=57343?this.content=1024*(v-55296)+d-56320+65536|y[h.CHAR_DATA_WIDTH_INDEX]<<22:_=!0}else _=!0}else this.content=y[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|y[h.CHAR_DATA_WIDTH_INDEX]<<22;_&&(this.combinedData=y[h.CHAR_DATA_CHAR_INDEX],this.content=2097152|y[h.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.CellData=m},643:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_EXT=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=0,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.DEFAULT_EXT=0,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},4863:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const c=l(8460),h=l(844);class u{get id(){return this._id}constructor(g){this.line=g,this.isDisposed=!1,this._disposables=[],this._id=u._nextId++,this._onDispose=this.register(new c.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,h.disposeArray)(this._disposables),this._disposables.length=0)}register(g){return this._disposables.push(g),g}}o.Marker=u,u._nextId=1},7116:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},o.CHARSETS.A={"#":"£"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},o.CHARSETS.C=o.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},o.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},o.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},o.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},o.CHARSETS.E=o.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},o.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},o.CHARSETS.H=o.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(a,o)=>{var l,c,h;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=`
698
+ `,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL=""}(l||(o.C0=l={})),function(u){u.PAD="€",u.HOP="",u.BPH="‚",u.NBH="ƒ",u.IND="„",u.NEL="…",u.SSA="†",u.ESA="‡",u.HTS="ˆ",u.HTJ="‰",u.VTS="Š",u.PLD="‹",u.PLU="Œ",u.RI="",u.SS2="Ž",u.SS3="",u.DCS="",u.PU1="‘",u.PU2="’",u.STS="“",u.CCH="”",u.MW="•",u.SPA="–",u.EPA="—",u.SOS="˜",u.SGCI="™",u.SCI="š",u.CSI="›",u.ST="œ",u.OSC="",u.PM="ž",u.APC="Ÿ"}(c||(o.C1=c={})),function(u){u.ST=`${l.ESC}\\`}(h||(o.C1_ESCAPED=h={}))},7399:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const c=l(2584),h={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};o.evaluateKeyboardEvent=function(u,m,g,y){const _={type:0,cancel:!1,key:void 0},v=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?_.key=m?c.C0.ESC+"OA":c.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?_.key=m?c.C0.ESC+"OD":c.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?_.key=m?c.C0.ESC+"OC":c.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(_.key=m?c.C0.ESC+"OB":c.C0.ESC+"[B");break;case 8:_.key=u.ctrlKey?"\b":c.C0.DEL,u.altKey&&(_.key=c.C0.ESC+_.key);break;case 9:if(u.shiftKey){_.key=c.C0.ESC+"[Z";break}_.key=c.C0.HT,_.cancel=!0;break;case 13:_.key=u.altKey?c.C0.ESC+c.C0.CR:c.C0.CR,_.cancel=!0;break;case 27:_.key=c.C0.ESC,u.altKey&&(_.key=c.C0.ESC+c.C0.ESC),_.cancel=!0;break;case 37:if(u.metaKey)break;v?(_.key=c.C0.ESC+"[1;"+(v+1)+"D",_.key===c.C0.ESC+"[1;3D"&&(_.key=c.C0.ESC+(g?"b":"[1;5D"))):_.key=m?c.C0.ESC+"OD":c.C0.ESC+"[D";break;case 39:if(u.metaKey)break;v?(_.key=c.C0.ESC+"[1;"+(v+1)+"C",_.key===c.C0.ESC+"[1;3C"&&(_.key=c.C0.ESC+(g?"f":"[1;5C"))):_.key=m?c.C0.ESC+"OC":c.C0.ESC+"[C";break;case 38:if(u.metaKey)break;v?(_.key=c.C0.ESC+"[1;"+(v+1)+"A",g||_.key!==c.C0.ESC+"[1;3A"||(_.key=c.C0.ESC+"[1;5A")):_.key=m?c.C0.ESC+"OA":c.C0.ESC+"[A";break;case 40:if(u.metaKey)break;v?(_.key=c.C0.ESC+"[1;"+(v+1)+"B",g||_.key!==c.C0.ESC+"[1;3B"||(_.key=c.C0.ESC+"[1;5B")):_.key=m?c.C0.ESC+"OB":c.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(_.key=c.C0.ESC+"[2~");break;case 46:_.key=v?c.C0.ESC+"[3;"+(v+1)+"~":c.C0.ESC+"[3~";break;case 36:_.key=v?c.C0.ESC+"[1;"+(v+1)+"H":m?c.C0.ESC+"OH":c.C0.ESC+"[H";break;case 35:_.key=v?c.C0.ESC+"[1;"+(v+1)+"F":m?c.C0.ESC+"OF":c.C0.ESC+"[F";break;case 33:u.shiftKey?_.type=2:u.ctrlKey?_.key=c.C0.ESC+"[5;"+(v+1)+"~":_.key=c.C0.ESC+"[5~";break;case 34:u.shiftKey?_.type=3:u.ctrlKey?_.key=c.C0.ESC+"[6;"+(v+1)+"~":_.key=c.C0.ESC+"[6~";break;case 112:_.key=v?c.C0.ESC+"[1;"+(v+1)+"P":c.C0.ESC+"OP";break;case 113:_.key=v?c.C0.ESC+"[1;"+(v+1)+"Q":c.C0.ESC+"OQ";break;case 114:_.key=v?c.C0.ESC+"[1;"+(v+1)+"R":c.C0.ESC+"OR";break;case 115:_.key=v?c.C0.ESC+"[1;"+(v+1)+"S":c.C0.ESC+"OS";break;case 116:_.key=v?c.C0.ESC+"[15;"+(v+1)+"~":c.C0.ESC+"[15~";break;case 117:_.key=v?c.C0.ESC+"[17;"+(v+1)+"~":c.C0.ESC+"[17~";break;case 118:_.key=v?c.C0.ESC+"[18;"+(v+1)+"~":c.C0.ESC+"[18~";break;case 119:_.key=v?c.C0.ESC+"[19;"+(v+1)+"~":c.C0.ESC+"[19~";break;case 120:_.key=v?c.C0.ESC+"[20;"+(v+1)+"~":c.C0.ESC+"[20~";break;case 121:_.key=v?c.C0.ESC+"[21;"+(v+1)+"~":c.C0.ESC+"[21~";break;case 122:_.key=v?c.C0.ESC+"[23;"+(v+1)+"~":c.C0.ESC+"[23~";break;case 123:_.key=v?c.C0.ESC+"[24;"+(v+1)+"~":c.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(g&&!y||!u.altKey||u.metaKey)!g||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?_.key=u.key:u.key&&u.ctrlKey&&(u.key==="_"&&(_.key=c.C0.US),u.key==="@"&&(_.key=c.C0.NUL)):u.keyCode===65&&(_.type=1);else{const d=h[u.keyCode],f=d==null?void 0:d[u.shiftKey?1:0];if(f)_.key=c.C0.ESC+f;else if(u.keyCode>=65&&u.keyCode<=90){const p=u.ctrlKey?u.keyCode-64:u.keyCode+32;let w=String.fromCharCode(p);u.shiftKey&&(w=w.toUpperCase()),_.key=c.C0.ESC+w}else if(u.keyCode===32)_.key=c.C0.ESC+(u.ctrlKey?c.C0.NUL:" ");else if(u.key==="Dead"&&u.code.startsWith("Key")){let p=u.code.slice(3,4);u.shiftKey||(p=p.toLowerCase()),_.key=c.C0.ESC+p,_.cancel=!0}}else u.keyCode>=65&&u.keyCode<=90?_.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?_.key=c.C0.NUL:u.keyCode>=51&&u.keyCode<=55?_.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?_.key=c.C0.DEL:u.keyCode===219?_.key=c.C0.ESC:u.keyCode===220?_.key=c.C0.FS:u.keyCode===221&&(_.key=c.C0.GS)}return _}},482:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(l){return l>65535?(l-=65536,String.fromCharCode(55296+(l>>10))+String.fromCharCode(l%1024+56320)):String.fromCharCode(l)},o.utf32ToString=function(l,c=0,h=l.length){let u="";for(let m=c;m<h;++m){let g=l[m];g>65535?(g-=65536,u+=String.fromCharCode(55296+(g>>10))+String.fromCharCode(g%1024+56320)):u+=String.fromCharCode(g)}return u},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(l,c){const h=l.length;if(!h)return 0;let u=0,m=0;if(this._interim){const g=l.charCodeAt(m++);56320<=g&&g<=57343?c[u++]=1024*(this._interim-55296)+g-56320+65536:(c[u++]=this._interim,c[u++]=g),this._interim=0}for(let g=m;g<h;++g){const y=l.charCodeAt(g);if(55296<=y&&y<=56319){if(++g>=h)return this._interim=y,u;const _=l.charCodeAt(g);56320<=_&&_<=57343?c[u++]=1024*(y-55296)+_-56320+65536:(c[u++]=y,c[u++]=_)}else y!==65279&&(c[u++]=y)}return u}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(l,c){const h=l.length;if(!h)return 0;let u,m,g,y,_=0,v=0,d=0;if(this.interim[0]){let w=!1,S=this.interim[0];S&=(224&S)==192?31:(240&S)==224?15:7;let b,x=0;for(;(b=63&this.interim[++x])&&x<4;)S<<=6,S|=b;const C=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,A=C-x;for(;d<A;){if(d>=h)return 0;if(b=l[d++],(192&b)!=128){d--,w=!0;break}this.interim[x++]=b,S<<=6,S|=63&b}w||(C===2?S<128?d--:c[_++]=S:C===3?S<2048||S>=55296&&S<=57343||S===65279||(c[_++]=S):S<65536||S>1114111||(c[_++]=S)),this.interim.fill(0)}const f=h-4;let p=d;for(;p<h;){for(;!(!(p<f)||128&(u=l[p])||128&(m=l[p+1])||128&(g=l[p+2])||128&(y=l[p+3]));)c[_++]=u,c[_++]=m,c[_++]=g,c[_++]=y,p+=4;if(u=l[p++],u<128)c[_++]=u;else if((224&u)==192){if(p>=h)return this.interim[0]=u,_;if(m=l[p++],(192&m)!=128){p--;continue}if(v=(31&u)<<6|63&m,v<128){p--;continue}c[_++]=v}else if((240&u)==224){if(p>=h)return this.interim[0]=u,_;if(m=l[p++],(192&m)!=128){p--;continue}if(p>=h)return this.interim[0]=u,this.interim[1]=m,_;if(g=l[p++],(192&g)!=128){p--;continue}if(v=(15&u)<<12|(63&m)<<6|63&g,v<2048||v>=55296&&v<=57343||v===65279)continue;c[_++]=v}else if((248&u)==240){if(p>=h)return this.interim[0]=u,_;if(m=l[p++],(192&m)!=128){p--;continue}if(p>=h)return this.interim[0]=u,this.interim[1]=m,_;if(g=l[p++],(192&g)!=128){p--;continue}if(p>=h)return this.interim[0]=u,this.interim[1]=m,this.interim[2]=g,_;if(y=l[p++],(192&y)!=128){p--;continue}if(v=(7&u)<<18|(63&m)<<12|(63&g)<<6|63&y,v<65536||v>1114111)continue;c[_++]=v}}return _}}},225:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;const c=l(1480),h=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],u=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let m;o.UnicodeV6=class{constructor(){if(this.version="6",!m){m=new Uint8Array(65536),m.fill(1),m[0]=0,m.fill(0,1,32),m.fill(0,127,160),m.fill(2,4352,4448),m[9001]=2,m[9002]=2,m.fill(2,11904,42192),m[12351]=1,m.fill(2,44032,55204),m.fill(2,63744,64256),m.fill(2,65040,65050),m.fill(2,65072,65136),m.fill(2,65280,65377),m.fill(2,65504,65511);for(let g=0;g<h.length;++g)m.fill(0,h[g][0],h[g][1]+1)}}wcwidth(g){return g<32?0:g<127?1:g<65536?m[g]:function(y,_){let v,d=0,f=_.length-1;if(y<_[0][0]||y>_[f][1])return!1;for(;f>=d;)if(v=d+f>>1,y>_[v][1])d=v+1;else{if(!(y<_[v][0]))return!0;f=v-1}return!1}(g,u)?0:g>=131072&&g<=196605||g>=196608&&g<=262141?2:1}charProperties(g,y){let _=this.wcwidth(g),v=_===0&&y!==0;if(v){const d=c.UnicodeService.extractWidth(y);d===0?v=!1:d>_&&(_=d)}return c.UnicodeService.createPropertyValue(0,_,v)}}},5981:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;const c=l(8460),h=l(844);class u extends h.Disposable{constructor(g){super(),this._action=g,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new c.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(g,y){if(y!==void 0&&this._syncCalls>y)return void(this._syncCalls=0);if(this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let _;for(this._isSyncWriting=!0;_=this._writeBuffer.shift();){this._action(_);const v=this._callbacks.shift();v&&v()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(g,y){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(y),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(y)}_innerWrite(g=0,y=!0){const _=g||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const v=this._writeBuffer[this._bufferOffset],d=this._action(v,y);if(d){const p=w=>Date.now()-_>=12?setTimeout(()=>this._innerWrite(0,w)):this._innerWrite(_,w);return void d.catch(w=>(queueMicrotask(()=>{throw w}),Promise.resolve(!1))).then(p)}const f=this._callbacks[this._bufferOffset];if(f&&f(),this._bufferOffset++,this._pendingData-=v.length,Date.now()-_>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}o.WriteBuffer=u},5941:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;const l=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,c=/^[\da-f]+$/;function h(u,m){const g=u.toString(16),y=g.length<2?"0"+g:g;switch(m){case 4:return g[0];case 8:return y;case 12:return(y+y).slice(0,3);default:return y+y}}o.parseColor=function(u){if(!u)return;let m=u.toLowerCase();if(m.indexOf("rgb:")===0){m=m.slice(4);const g=l.exec(m);if(g){const y=g[1]?15:g[4]?255:g[7]?4095:65535;return[Math.round(parseInt(g[1]||g[4]||g[7]||g[10],16)/y*255),Math.round(parseInt(g[2]||g[5]||g[8]||g[11],16)/y*255),Math.round(parseInt(g[3]||g[6]||g[9]||g[12],16)/y*255)]}}else if(m.indexOf("#")===0&&(m=m.slice(1),c.exec(m)&&[3,6,9,12].includes(m.length))){const g=m.length/3,y=[0,0,0];for(let _=0;_<3;++_){const v=parseInt(m.slice(g*_,g*_+g),16);y[_]=g===1?v<<4:g===2?v:g===3?v>>4:v>>8}return y}},o.toRgbString=function(u,m=16){const[g,y,_]=u;return`rgb:${h(g,m)}/${h(y,m)}/${h(_,m)}`}},5770:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;const c=l(482),h=l(8742),u=l(5770),m=[];o.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=m,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=m}registerHandler(y,_){this._handlers[y]===void 0&&(this._handlers[y]=[]);const v=this._handlers[y];return v.push(_),{dispose:()=>{const d=v.indexOf(_);d!==-1&&v.splice(d,1)}}}clearHandler(y){this._handlers[y]&&delete this._handlers[y]}setHandlerFallback(y){this._handlerFb=y}reset(){if(this._active.length)for(let y=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;y>=0;--y)this._active[y].unhook(!1);this._stack.paused=!1,this._active=m,this._ident=0}hook(y,_){if(this.reset(),this._ident=y,this._active=this._handlers[y]||m,this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].hook(_);else this._handlerFb(this._ident,"HOOK",_)}put(y,_,v){if(this._active.length)for(let d=this._active.length-1;d>=0;d--)this._active[d].put(y,_,v);else this._handlerFb(this._ident,"PUT",(0,c.utf32ToString)(y,_,v))}unhook(y,_=!0){if(this._active.length){let v=!1,d=this._active.length-1,f=!1;if(this._stack.paused&&(d=this._stack.loopPosition-1,v=_,f=this._stack.fallThrough,this._stack.paused=!1),!f&&v===!1){for(;d>=0&&(v=this._active[d].unhook(y),v!==!0);d--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=d,this._stack.fallThrough=!1,v;d--}for(;d>=0;d--)if(v=this._active[d].unhook(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=d,this._stack.fallThrough=!0,v}else this._handlerFb(this._ident,"UNHOOK",y);this._active=m,this._ident=0}};const g=new h.Params;g.addParam(0),o.DcsHandler=class{constructor(y){this._handler=y,this._data="",this._params=g,this._hitLimit=!1}hook(y){this._params=y.length>1||y.params[0]?y.clone():g,this._data="",this._hitLimit=!1}put(y,_,v){this._hitLimit||(this._data+=(0,c.utf32ToString)(y,_,v),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(y){let _=!1;if(this._hitLimit)_=!1;else if(y&&(_=this._handler(this._data,this._params),_ instanceof Promise))return _.then(v=>(this._params=g,this._data="",this._hitLimit=!1,v));return this._params=g,this._data="",this._hitLimit=!1,_}}},2015:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;const c=l(844),h=l(8742),u=l(6242),m=l(6351);class g{constructor(d){this.table=new Uint8Array(d)}setDefault(d,f){this.table.fill(d<<4|f)}add(d,f,p,w){this.table[f<<8|d]=p<<4|w}addMany(d,f,p,w){for(let S=0;S<d.length;S++)this.table[f<<8|d[S]]=p<<4|w}}o.TransitionTable=g;const y=160;o.VT500_TRANSITION_TABLE=function(){const v=new g(4095),d=Array.apply(null,Array(256)).map((x,C)=>C),f=(x,C)=>d.slice(x,C),p=f(32,127),w=f(0,24);w.push(25),w.push.apply(w,f(28,32));const S=f(0,14);let b;for(b in v.setDefault(1,0),v.addMany(p,0,2,0),S)v.addMany([24,26,153,154],b,3,0),v.addMany(f(128,144),b,3,0),v.addMany(f(144,152),b,3,0),v.add(156,b,0,0),v.add(27,b,11,1),v.add(157,b,4,8),v.addMany([152,158,159],b,0,7),v.add(155,b,11,3),v.add(144,b,11,9);return v.addMany(w,0,3,0),v.addMany(w,1,3,1),v.add(127,1,0,1),v.addMany(w,8,0,8),v.addMany(w,3,3,3),v.add(127,3,0,3),v.addMany(w,4,3,4),v.add(127,4,0,4),v.addMany(w,6,3,6),v.addMany(w,5,3,5),v.add(127,5,0,5),v.addMany(w,2,3,2),v.add(127,2,0,2),v.add(93,1,4,8),v.addMany(p,8,5,8),v.add(127,8,5,8),v.addMany([156,27,24,26,7],8,6,0),v.addMany(f(28,32),8,0,8),v.addMany([88,94,95],1,0,7),v.addMany(p,7,0,7),v.addMany(w,7,0,7),v.add(156,7,0,0),v.add(127,7,0,7),v.add(91,1,11,3),v.addMany(f(64,127),3,7,0),v.addMany(f(48,60),3,8,4),v.addMany([60,61,62,63],3,9,4),v.addMany(f(48,60),4,8,4),v.addMany(f(64,127),4,7,0),v.addMany([60,61,62,63],4,0,6),v.addMany(f(32,64),6,0,6),v.add(127,6,0,6),v.addMany(f(64,127),6,0,0),v.addMany(f(32,48),3,9,5),v.addMany(f(32,48),5,9,5),v.addMany(f(48,64),5,0,6),v.addMany(f(64,127),5,7,0),v.addMany(f(32,48),4,9,5),v.addMany(f(32,48),1,9,2),v.addMany(f(32,48),2,9,2),v.addMany(f(48,127),2,10,0),v.addMany(f(48,80),1,10,0),v.addMany(f(81,88),1,10,0),v.addMany([89,90,92],1,10,0),v.addMany(f(96,127),1,10,0),v.add(80,1,11,9),v.addMany(w,9,0,9),v.add(127,9,0,9),v.addMany(f(28,32),9,0,9),v.addMany(f(32,48),9,9,12),v.addMany(f(48,60),9,8,10),v.addMany([60,61,62,63],9,9,10),v.addMany(w,11,0,11),v.addMany(f(32,128),11,0,11),v.addMany(f(28,32),11,0,11),v.addMany(w,10,0,10),v.add(127,10,0,10),v.addMany(f(28,32),10,0,10),v.addMany(f(48,60),10,8,10),v.addMany([60,61,62,63],10,0,11),v.addMany(f(32,48),10,9,12),v.addMany(w,12,0,12),v.add(127,12,0,12),v.addMany(f(28,32),12,0,12),v.addMany(f(32,48),12,9,12),v.addMany(f(48,64),12,0,11),v.addMany(f(64,127),12,12,13),v.addMany(f(64,127),10,12,13),v.addMany(f(64,127),9,12,13),v.addMany(w,13,13,13),v.addMany(p,13,13,13),v.add(127,13,0,13),v.addMany([27,156,24,26],13,14,0),v.add(y,0,2,0),v.add(y,8,5,8),v.add(y,6,0,6),v.add(y,11,0,11),v.add(y,13,13,13),v}();class _ extends c.Disposable{constructor(d=o.VT500_TRANSITION_TABLE){super(),this._transitions=d,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new h.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(f,p,w)=>{},this._executeHandlerFb=f=>{},this._csiHandlerFb=(f,p)=>{},this._escHandlerFb=f=>{},this._errorHandlerFb=f=>f,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,c.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new u.OscParser),this._dcsParser=this.register(new m.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(d,f=[64,126]){let p=0;if(d.prefix){if(d.prefix.length>1)throw new Error("only one byte as prefix supported");if(p=d.prefix.charCodeAt(0),p&&60>p||p>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(d.intermediates){if(d.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let S=0;S<d.intermediates.length;++S){const b=d.intermediates.charCodeAt(S);if(32>b||b>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");p<<=8,p|=b}}if(d.final.length!==1)throw new Error("final must be a single byte");const w=d.final.charCodeAt(0);if(f[0]>w||w>f[1])throw new Error(`final must be in range ${f[0]} .. ${f[1]}`);return p<<=8,p|=w,p}identToString(d){const f=[];for(;d;)f.push(String.fromCharCode(255&d)),d>>=8;return f.reverse().join("")}setPrintHandler(d){this._printHandler=d}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(d,f){const p=this._identifier(d,[48,126]);this._escHandlers[p]===void 0&&(this._escHandlers[p]=[]);const w=this._escHandlers[p];return w.push(f),{dispose:()=>{const S=w.indexOf(f);S!==-1&&w.splice(S,1)}}}clearEscHandler(d){this._escHandlers[this._identifier(d,[48,126])]&&delete this._escHandlers[this._identifier(d,[48,126])]}setEscHandlerFallback(d){this._escHandlerFb=d}setExecuteHandler(d,f){this._executeHandlers[d.charCodeAt(0)]=f}clearExecuteHandler(d){this._executeHandlers[d.charCodeAt(0)]&&delete this._executeHandlers[d.charCodeAt(0)]}setExecuteHandlerFallback(d){this._executeHandlerFb=d}registerCsiHandler(d,f){const p=this._identifier(d);this._csiHandlers[p]===void 0&&(this._csiHandlers[p]=[]);const w=this._csiHandlers[p];return w.push(f),{dispose:()=>{const S=w.indexOf(f);S!==-1&&w.splice(S,1)}}}clearCsiHandler(d){this._csiHandlers[this._identifier(d)]&&delete this._csiHandlers[this._identifier(d)]}setCsiHandlerFallback(d){this._csiHandlerFb=d}registerDcsHandler(d,f){return this._dcsParser.registerHandler(this._identifier(d),f)}clearDcsHandler(d){this._dcsParser.clearHandler(this._identifier(d))}setDcsHandlerFallback(d){this._dcsParser.setHandlerFallback(d)}registerOscHandler(d,f){return this._oscParser.registerHandler(d,f)}clearOscHandler(d){this._oscParser.clearHandler(d)}setOscHandlerFallback(d){this._oscParser.setHandlerFallback(d)}setErrorHandler(d){this._errorHandler=d}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(d,f,p,w,S){this._parseStack.state=d,this._parseStack.handlers=f,this._parseStack.handlerPos=p,this._parseStack.transition=w,this._parseStack.chunkPos=S}parse(d,f,p){let w,S=0,b=0,x=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,x=this._parseStack.chunkPos+1;else{if(p===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const C=this._parseStack.handlers;let A=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(p===!1&&A>-1){for(;A>=0&&(w=C[A](this._params),w!==!0);A--)if(w instanceof Promise)return this._parseStack.handlerPos=A,w}this._parseStack.handlers=[];break;case 4:if(p===!1&&A>-1){for(;A>=0&&(w=C[A](),w!==!0);A--)if(w instanceof Promise)return this._parseStack.handlerPos=A,w}this._parseStack.handlers=[];break;case 6:if(S=d[this._parseStack.chunkPos],w=this._dcsParser.unhook(S!==24&&S!==26,p),w)return w;S===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(S=d[this._parseStack.chunkPos],w=this._oscParser.end(S!==24&&S!==26,p),w)return w;S===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,x=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let C=x;C<f;++C){switch(S=d[C],b=this._transitions.table[this.currentState<<8|(S<160?S:y)],b>>4){case 2:for(let O=C+1;;++O){if(O>=f||(S=d[O])<32||S>126&&S<y){this._printHandler(d,C,O),C=O-1;break}if(++O>=f||(S=d[O])<32||S>126&&S<y){this._printHandler(d,C,O),C=O-1;break}if(++O>=f||(S=d[O])<32||S>126&&S<y){this._printHandler(d,C,O),C=O-1;break}if(++O>=f||(S=d[O])<32||S>126&&S<y){this._printHandler(d,C,O),C=O-1;break}}break;case 3:this._executeHandlers[S]?this._executeHandlers[S]():this._executeHandlerFb(S),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:C,code:S,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const A=this._csiHandlers[this._collect<<8|S];let T=A?A.length-1:-1;for(;T>=0&&(w=A[T](this._params),w!==!0);T--)if(w instanceof Promise)return this._preserveStack(3,A,T,b,C),w;T<0&&this._csiHandlerFb(this._collect<<8|S,this._params),this.precedingJoinState=0;break;case 8:do switch(S){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(S-48)}while(++C<f&&(S=d[C])>47&&S<60);C--;break;case 9:this._collect<<=8,this._collect|=S;break;case 10:const j=this._escHandlers[this._collect<<8|S];let M=j?j.length-1:-1;for(;M>=0&&(w=j[M](),w!==!0);M--)if(w instanceof Promise)return this._preserveStack(4,j,M,b,C),w;M<0&&this._escHandlerFb(this._collect<<8|S),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|S,this._params);break;case 13:for(let O=C+1;;++O)if(O>=f||(S=d[O])===24||S===26||S===27||S>127&&S<y){this._dcsParser.put(d,C,O),C=O-1;break}break;case 14:if(w=this._dcsParser.unhook(S!==24&&S!==26),w)return this._preserveStack(6,[],0,b,C),w;S===27&&(b|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let O=C+1;;O++)if(O>=f||(S=d[O])<32||S>127&&S<y){this._oscParser.put(d,C,O),C=O-1;break}break;case 6:if(w=this._oscParser.end(S!==24&&S!==26),w)return this._preserveStack(5,[],0,b,C),w;S===27&&(b|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&b}}}o.EscapeSequenceParser=_},6242:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const c=l(5770),h=l(482),u=[];o.OscParser=class{constructor(){this._state=0,this._active=u,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(m,g){this._handlers[m]===void 0&&(this._handlers[m]=[]);const y=this._handlers[m];return y.push(g),{dispose:()=>{const _=y.indexOf(g);_!==-1&&y.splice(_,1)}}}clearHandler(m){this._handlers[m]&&delete this._handlers[m]}setHandlerFallback(m){this._handlerFb=m}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=u}reset(){if(this._state===2)for(let m=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;m>=0;--m)this._active[m].end(!1);this._stack.paused=!1,this._active=u,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||u,this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].start();else this._handlerFb(this._id,"START")}_put(m,g,y){if(this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].put(m,g,y);else this._handlerFb(this._id,"PUT",(0,h.utf32ToString)(m,g,y))}start(){this.reset(),this._state=1}put(m,g,y){if(this._state!==3){if(this._state===1)for(;g<y;){const _=m[g++];if(_===59){this._state=2,this._start();break}if(_<48||57<_)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+_-48}this._state===2&&y-g>0&&this._put(m,g,y)}}end(m,g=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let y=!1,_=this._active.length-1,v=!1;if(this._stack.paused&&(_=this._stack.loopPosition-1,y=g,v=this._stack.fallThrough,this._stack.paused=!1),!v&&y===!1){for(;_>=0&&(y=this._active[_].end(m),y!==!0);_--)if(y instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!1,y;_--}for(;_>=0;_--)if(y=this._active[_].end(!1),y instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!0,y}else this._handlerFb(this._id,"END",m);this._active=u,this._id=-1,this._state=0}}},o.OscHandler=class{constructor(m){this._handler=m,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(m,g,y){this._hitLimit||(this._data+=(0,h.utf32ToString)(m,g,y),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(m){let g=!1;if(this._hitLimit)g=!1;else if(m&&(g=this._handler(this._data),g instanceof Promise))return g.then(y=>(this._data="",this._hitLimit=!1,y));return this._data="",this._hitLimit=!1,g}}},8742:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;const l=2147483647;class c{static fromArray(u){const m=new c;if(!u.length)return m;for(let g=Array.isArray(u[0])?1:0;g<u.length;++g){const y=u[g];if(Array.isArray(y))for(let _=0;_<y.length;++_)m.addSubParam(y[_]);else m.addParam(y)}return m}constructor(u=32,m=32){if(this.maxLength=u,this.maxSubParamsLength=m,m>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(m),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const u=new c(this.maxLength,this.maxSubParamsLength);return u.params.set(this.params),u.length=this.length,u._subParams.set(this._subParams),u._subParamsLength=this._subParamsLength,u._subParamsIdx.set(this._subParamsIdx),u._rejectDigits=this._rejectDigits,u._rejectSubDigits=this._rejectSubDigits,u._digitIsSub=this._digitIsSub,u}toArray(){const u=[];for(let m=0;m<this.length;++m){u.push(this.params[m]);const g=this._subParamsIdx[m]>>8,y=255&this._subParamsIdx[m];y-g>0&&u.push(Array.prototype.slice.call(this._subParams,g,y))}return u}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(u){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=u>l?l:u}}addSubParam(u){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=u>l?l:u,this._subParamsIdx[this.length-1]++}}hasSubParams(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0}getSubParams(u){const m=this._subParamsIdx[u]>>8,g=255&this._subParamsIdx[u];return g-m>0?this._subParams.subarray(m,g):null}getSubParamsAll(){const u={};for(let m=0;m<this.length;++m){const g=this._subParamsIdx[m]>>8,y=255&this._subParamsIdx[m];y-g>0&&(u[m]=this._subParams.slice(g,y))}return u}addDigit(u){let m;if(this._rejectDigits||!(m=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const g=this._digitIsSub?this._subParams:this.params,y=g[m-1];g[m-1]=~y?Math.min(10*y+u,l):u}}o.Params=c},5741:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0,o.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let l=this._addons.length-1;l>=0;l--)this._addons[l].instance.dispose()}loadAddon(l,c){const h={instance:c,dispose:c.dispose,isDisposed:!1};this._addons.push(h),c.dispose=()=>this._wrappedAddonDispose(h),c.activate(l)}_wrappedAddonDispose(l){if(l.isDisposed)return;let c=-1;for(let h=0;h<this._addons.length;h++)if(this._addons[h]===l){c=h;break}if(c===-1)throw new Error("Could not dispose an addon that has not been loaded");l.isDisposed=!0,l.dispose.apply(l.instance),this._addons.splice(c,1)}}},8771:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const c=l(3785),h=l(511);o.BufferApiView=class{constructor(u,m){this._buffer=u,this.type=m}init(u){return this._buffer=u,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(u){const m=this._buffer.lines.get(u);if(m)return new c.BufferLineApiView(m)}getNullCell(){return new h.CellData}}},3785:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const c=l(511);o.BufferLineApiView=class{constructor(h){this._line=h}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(h,u){if(!(h<0||h>=this._line.length))return u?(this._line.loadCell(h,u),u):this._line.loadCell(h,new c.CellData)}translateToString(h,u,m){return this._line.translateToString(h,u,m)}}},8285:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const c=l(8771),h=l(8460),u=l(844);class m extends u.Disposable{constructor(y){super(),this._core=y,this._onBufferChange=this.register(new h.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new c.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new c.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}o.BufferNamespaceApi=m},7975:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0,o.ParserApi=class{constructor(l){this._core=l}registerCsiHandler(l,c){return this._core.registerCsiHandler(l,h=>c(h.toArray()))}addCsiHandler(l,c){return this.registerCsiHandler(l,c)}registerDcsHandler(l,c){return this._core.registerDcsHandler(l,(h,u)=>c(h,u.toArray()))}addDcsHandler(l,c){return this.registerDcsHandler(l,c)}registerEscHandler(l,c){return this._core.registerEscHandler(l,c)}addEscHandler(l,c){return this.registerEscHandler(l,c)}registerOscHandler(l,c){return this._core.registerOscHandler(l,c)}addOscHandler(l,c){return this.registerOscHandler(l,c)}}},7090:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0,o.UnicodeApi=class{constructor(l){this._core=l}register(l){this._core.unicodeService.register(l)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(l){this._core.unicodeService.activeVersion=l}}},744:function(a,o,l){var c=this&&this.__decorate||function(v,d,f,p){var w,S=arguments.length,b=S<3?d:p===null?p=Object.getOwnPropertyDescriptor(d,f):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(v,d,f,p);else for(var x=v.length-1;x>=0;x--)(w=v[x])&&(b=(S<3?w(b):S>3?w(d,f,b):w(d,f))||b);return S>3&&b&&Object.defineProperty(d,f,b),b},h=this&&this.__param||function(v,d){return function(f,p){d(f,p,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;const u=l(8460),m=l(844),g=l(5295),y=l(2585);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;let _=o.BufferService=class extends m.Disposable{get buffer(){return this.buffers.active}constructor(v){super(),this.isUserScrolling=!1,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new u.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(v.rawOptions.cols||0,o.MINIMUM_COLS),this.rows=Math.max(v.rawOptions.rows||0,o.MINIMUM_ROWS),this.buffers=this.register(new g.BufferSet(v,this))}resize(v,d){this.cols=v,this.rows=d,this.buffers.resize(v,d),this._onResize.fire({cols:v,rows:d})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(v,d=!1){const f=this.buffer;let p;p=this._cachedBlankLine,p&&p.length===this.cols&&p.getFg(0)===v.fg&&p.getBg(0)===v.bg||(p=f.getBlankLine(v,d),this._cachedBlankLine=p),p.isWrapped=d;const w=f.ybase+f.scrollTop,S=f.ybase+f.scrollBottom;if(f.scrollTop===0){const b=f.lines.isFull;S===f.lines.length-1?b?f.lines.recycle().copyFrom(p):f.lines.push(p.clone()):f.lines.splice(S+1,0,p.clone()),b?this.isUserScrolling&&(f.ydisp=Math.max(f.ydisp-1,0)):(f.ybase++,this.isUserScrolling||f.ydisp++)}else{const b=S-w+1;f.lines.shiftElements(w+1,b-1,-1),f.lines.set(S,p.clone())}this.isUserScrolling||(f.ydisp=f.ybase),this._onScroll.fire(f.ydisp)}scrollLines(v,d,f){const p=this.buffer;if(v<0){if(p.ydisp===0)return;this.isUserScrolling=!0}else v+p.ydisp>=p.ybase&&(this.isUserScrolling=!1);const w=p.ydisp;p.ydisp=Math.max(Math.min(p.ydisp+v,p.ybase),0),w!==p.ydisp&&(d||this._onScroll.fire(p.ydisp))}};o.BufferService=_=c([h(0,y.IOptionsService)],_)},7994:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0,o.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(l){this.glevel=l,this.charset=this._charsets[l]}setgCharset(l,c){this._charsets[l]=c,this.glevel===l&&(this.charset=c)}}},1753:function(a,o,l){var c=this&&this.__decorate||function(p,w,S,b){var x,C=arguments.length,A=C<3?w:b===null?b=Object.getOwnPropertyDescriptor(w,S):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(p,w,S,b);else for(var T=p.length-1;T>=0;T--)(x=p[T])&&(A=(C<3?x(A):C>3?x(w,S,A):x(w,S))||A);return C>3&&A&&Object.defineProperty(w,S,A),A},h=this&&this.__param||function(p,w){return function(S,b){w(S,b,p)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;const u=l(2585),m=l(8460),g=l(844),y={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:p=>p.button!==4&&p.action===1&&(p.ctrl=!1,p.alt=!1,p.shift=!1,!0)},VT200:{events:19,restrict:p=>p.action!==32},DRAG:{events:23,restrict:p=>p.action!==32||p.button!==3},ANY:{events:31,restrict:p=>!0}};function _(p,w){let S=(p.ctrl?16:0)|(p.shift?4:0)|(p.alt?8:0);return p.button===4?(S|=64,S|=p.action):(S|=3&p.button,4&p.button&&(S|=64),8&p.button&&(S|=128),p.action===32?S|=32:p.action!==0||w||(S|=3)),S}const v=String.fromCharCode,d={DEFAULT:p=>{const w=[_(p,!1)+32,p.col+32,p.row+32];return w[0]>255||w[1]>255||w[2]>255?"":`\x1B[M${v(w[0])}${v(w[1])}${v(w[2])}`},SGR:p=>{const w=p.action===0&&p.button!==4?"m":"M";return`\x1B[<${_(p,!0)};${p.col};${p.row}${w}`},SGR_PIXELS:p=>{const w=p.action===0&&p.button!==4?"m":"M";return`\x1B[<${_(p,!0)};${p.x};${p.y}${w}`}};let f=o.CoreMouseService=class extends g.Disposable{constructor(p,w){super(),this._bufferService=p,this._coreService=w,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new m.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const S of Object.keys(y))this.addProtocol(S,y[S]);for(const S of Object.keys(d))this.addEncoding(S,d[S]);this.reset()}addProtocol(p,w){this._protocols[p]=w}addEncoding(p,w){this._encodings[p]=w}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(p){if(!this._protocols[p])throw new Error(`unknown protocol "${p}"`);this._activeProtocol=p,this._onProtocolChange.fire(this._protocols[p].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(p){if(!this._encodings[p])throw new Error(`unknown encoding "${p}"`);this._activeEncoding=p}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(p){if(p.col<0||p.col>=this._bufferService.cols||p.row<0||p.row>=this._bufferService.rows||p.button===4&&p.action===32||p.button===3&&p.action!==32||p.button!==4&&(p.action===2||p.action===3)||(p.col++,p.row++,p.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,p,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(p))return!1;const w=this._encodings[this._activeEncoding](p);return w&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(w):this._coreService.triggerDataEvent(w,!0)),this._lastEvent=p,!0}explainEvents(p){return{down:!!(1&p),up:!!(2&p),drag:!!(4&p),move:!!(8&p),wheel:!!(16&p)}}_equalEvents(p,w,S){if(S){if(p.x!==w.x||p.y!==w.y)return!1}else if(p.col!==w.col||p.row!==w.row)return!1;return p.button===w.button&&p.action===w.action&&p.ctrl===w.ctrl&&p.alt===w.alt&&p.shift===w.shift}};o.CoreMouseService=f=c([h(0,u.IBufferService),h(1,u.ICoreService)],f)},6975:function(a,o,l){var c=this&&this.__decorate||function(f,p,w,S){var b,x=arguments.length,C=x<3?p:S===null?S=Object.getOwnPropertyDescriptor(p,w):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,p,w,S);else for(var A=f.length-1;A>=0;A--)(b=f[A])&&(C=(x<3?b(C):x>3?b(p,w,C):b(p,w))||C);return x>3&&C&&Object.defineProperty(p,w,C),C},h=this&&this.__param||function(f,p){return function(w,S){p(w,S,f)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;const u=l(1439),m=l(8460),g=l(844),y=l(2585),_=Object.freeze({insertMode:!1}),v=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let d=o.CoreService=class extends g.Disposable{constructor(f,p,w){super(),this._bufferService=f,this._logService=p,this._optionsService=w,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new m.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new m.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new m.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new m.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,u.clone)(_),this.decPrivateModes=(0,u.clone)(v)}reset(){this.modes=(0,u.clone)(_),this.decPrivateModes=(0,u.clone)(v)}triggerDataEvent(f,p=!1){if(this._optionsService.rawOptions.disableStdin)return;const w=this._bufferService.buffer;p&&this._optionsService.rawOptions.scrollOnUserInput&&w.ybase!==w.ydisp&&this._onRequestScrollToBottom.fire(),p&&this._onUserInput.fire(),this._logService.debug(`sending data "${f}"`,()=>f.split("").map(S=>S.charCodeAt(0))),this._onData.fire(f)}triggerBinaryEvent(f){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${f}"`,()=>f.split("").map(p=>p.charCodeAt(0))),this._onBinary.fire(f))}};o.CoreService=d=c([h(0,y.IBufferService),h(1,y.ILogService),h(2,y.IOptionsService)],d)},9074:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const c=l(8055),h=l(8460),u=l(844),m=l(6106);let g=0,y=0;class _ extends u.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new m.SortedList(f=>f==null?void 0:f.marker.line),this._onDecorationRegistered=this.register(new h.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new h.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,u.toDisposable)(()=>this.reset()))}registerDecoration(f){if(f.marker.isDisposed)return;const p=new v(f);if(p){const w=p.marker.onDispose(()=>p.dispose());p.onDispose(()=>{p&&(this._decorations.delete(p)&&this._onDecorationRemoved.fire(p),w.dispose())}),this._decorations.insert(p),this._onDecorationRegistered.fire(p)}return p}reset(){for(const f of this._decorations.values())f.dispose();this._decorations.clear()}*getDecorationsAtCell(f,p,w){let S=0,b=0;for(const x of this._decorations.getKeyIterator(p))S=x.options.x??0,b=S+(x.options.width??1),f>=S&&f<b&&(!w||(x.options.layer??"bottom")===w)&&(yield x)}forEachDecorationAtCell(f,p,w,S){this._decorations.forEachByKey(p,b=>{g=b.options.x??0,y=g+(b.options.width??1),f>=g&&f<y&&(!w||(b.options.layer??"bottom")===w)&&S(b)})}}o.DecorationService=_;class v extends u.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=c.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=c.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(f){super(),this.options=f,this.onRenderEmitter=this.register(new h.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new h.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=f.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const c=l(2585),h=l(8343);class u{constructor(...g){this._entries=new Map;for(const[y,_]of g)this.set(y,_)}set(g,y){const _=this._entries.get(g);return this._entries.set(g,y),_}forEach(g){for(const[y,_]of this._entries.entries())g(y,_)}has(g){return this._entries.has(g)}get(g){return this._entries.get(g)}}o.ServiceCollection=u,o.InstantiationService=class{constructor(){this._services=new u,this._services.set(c.IInstantiationService,this)}setService(m,g){this._services.set(m,g)}getService(m){return this._services.get(m)}createInstance(m,...g){const y=(0,h.getServiceDependencies)(m).sort((d,f)=>d.index-f.index),_=[];for(const d of y){const f=this._services.get(d.id);if(!f)throw new Error(`[createInstance] ${m.name} depends on UNKNOWN service ${d.id}.`);_.push(f)}const v=y.length>0?y[0].index:g.length;if(g.length!==v)throw new Error(`[createInstance] First service dependency of ${m.name} at position ${v+1} conflicts with ${g.length} static arguments`);return new m(...g,..._)}}},7866:function(a,o,l){var c=this&&this.__decorate||function(v,d,f,p){var w,S=arguments.length,b=S<3?d:p===null?p=Object.getOwnPropertyDescriptor(d,f):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(v,d,f,p);else for(var x=v.length-1;x>=0;x--)(w=v[x])&&(b=(S<3?w(b):S>3?w(d,f,b):w(d,f))||b);return S>3&&b&&Object.defineProperty(d,f,b),b},h=this&&this.__param||function(v,d){return function(f,p){d(f,p,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const u=l(844),m=l(2585),g={trace:m.LogLevelEnum.TRACE,debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF};let y,_=o.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),y=this}_updateLogLevel(){this._logLevel=g[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(v){for(let d=0;d<v.length;d++)typeof v[d]=="function"&&(v[d]=v[d]())}_log(v,d,f){this._evalLazyOptionalParams(f),v.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+d,...f)}trace(v,...d){var f;this._logLevel<=m.LogLevelEnum.TRACE&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.trace.bind(this._optionsService.options.logger))??console.log,v,d)}debug(v,...d){var f;this._logLevel<=m.LogLevelEnum.DEBUG&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.debug.bind(this._optionsService.options.logger))??console.log,v,d)}info(v,...d){var f;this._logLevel<=m.LogLevelEnum.INFO&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.info.bind(this._optionsService.options.logger))??console.info,v,d)}warn(v,...d){var f;this._logLevel<=m.LogLevelEnum.WARN&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.warn.bind(this._optionsService.options.logger))??console.warn,v,d)}error(v,...d){var f;this._logLevel<=m.LogLevelEnum.ERROR&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.error.bind(this._optionsService.options.logger))??console.error,v,d)}};o.LogService=_=c([h(0,m.IOptionsService)],_),o.setTraceLogger=function(v){y=v},o.traceCall=function(v,d,f){if(typeof f.value!="function")throw new Error("not supported");const p=f.value;f.value=function(...w){if(y.logLevel!==m.LogLevelEnum.TRACE)return p.apply(this,w);y.trace(`GlyphRenderer#${p.name}(${w.map(b=>JSON.stringify(b)).join(", ")})`);const S=p.apply(this,w);return y.trace(`GlyphRenderer#${p.name} return`,S),S}}},7302:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=void 0;const c=l(8460),h=l(844),u=l(6114);o.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:u.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const m=["normal","bold","100","200","300","400","500","600","700","800","900"];class g extends h.Disposable{constructor(_){super(),this._onOptionChange=this.register(new c.EventEmitter),this.onOptionChange=this._onOptionChange.event;const v={...o.DEFAULT_OPTIONS};for(const d in _)if(d in v)try{const f=_[d];v[d]=this._sanitizeAndValidateOption(d,f)}catch(f){console.error(f)}this.rawOptions=v,this.options={...v},this._setupOptions(),this.register((0,h.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(_,v){return this.onOptionChange(d=>{d===_&&v(this.rawOptions[_])})}onMultipleOptionChange(_,v){return this.onOptionChange(d=>{_.indexOf(d)!==-1&&v()})}_setupOptions(){const _=d=>{if(!(d in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${d}"`);return this.rawOptions[d]},v=(d,f)=>{if(!(d in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${d}"`);f=this._sanitizeAndValidateOption(d,f),this.rawOptions[d]!==f&&(this.rawOptions[d]=f,this._onOptionChange.fire(d))};for(const d in this.rawOptions){const f={get:_.bind(this,d),set:v.bind(this,d)};Object.defineProperty(this.options,d,f)}}_sanitizeAndValidateOption(_,v){switch(_){case"cursorStyle":if(v||(v=o.DEFAULT_OPTIONS[_]),!function(d){return d==="block"||d==="underline"||d==="bar"}(v))throw new Error(`"${v}" is not a valid value for ${_}`);break;case"wordSeparator":v||(v=o.DEFAULT_OPTIONS[_]);break;case"fontWeight":case"fontWeightBold":if(typeof v=="number"&&1<=v&&v<=1e3)break;v=m.includes(v)?v:o.DEFAULT_OPTIONS[_];break;case"cursorWidth":v=Math.floor(v);case"lineHeight":case"tabStopWidth":if(v<1)throw new Error(`${_} cannot be less than 1, value: ${v}`);break;case"minimumContrastRatio":v=Math.max(1,Math.min(21,Math.round(10*v)/10));break;case"scrollback":if((v=Math.min(v,4294967295))<0)throw new Error(`${_} cannot be less than 0, value: ${v}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(v<=0)throw new Error(`${_} cannot be less than or equal to 0, value: ${v}`);break;case"rows":case"cols":if(!v&&v!==0)throw new Error(`${_} must be numeric, value: ${v}`);break;case"windowsPty":v=v??{}}return v}}o.OptionsService=g},2660:function(a,o,l){var c=this&&this.__decorate||function(g,y,_,v){var d,f=arguments.length,p=f<3?y:v===null?v=Object.getOwnPropertyDescriptor(y,_):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(g,y,_,v);else for(var w=g.length-1;w>=0;w--)(d=g[w])&&(p=(f<3?d(p):f>3?d(y,_,p):d(y,_))||p);return f>3&&p&&Object.defineProperty(y,_,p),p},h=this&&this.__param||function(g,y){return function(_,v){y(_,v,g)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkService=void 0;const u=l(2585);let m=o.OscLinkService=class{constructor(g){this._bufferService=g,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(g){const y=this._bufferService.buffer;if(g.id===void 0){const w=y.addMarker(y.ybase+y.y),S={data:g,id:this._nextId++,lines:[w]};return w.onDispose(()=>this._removeMarkerFromLink(S,w)),this._dataByLinkId.set(S.id,S),S.id}const _=g,v=this._getEntryIdKey(_),d=this._entriesWithId.get(v);if(d)return this.addLineToLink(d.id,y.ybase+y.y),d.id;const f=y.addMarker(y.ybase+y.y),p={id:this._nextId++,key:this._getEntryIdKey(_),data:_,lines:[f]};return f.onDispose(()=>this._removeMarkerFromLink(p,f)),this._entriesWithId.set(p.key,p),this._dataByLinkId.set(p.id,p),p.id}addLineToLink(g,y){const _=this._dataByLinkId.get(g);if(_&&_.lines.every(v=>v.line!==y)){const v=this._bufferService.buffer.addMarker(y);_.lines.push(v),v.onDispose(()=>this._removeMarkerFromLink(_,v))}}getLinkData(g){var y;return(y=this._dataByLinkId.get(g))==null?void 0:y.data}_getEntryIdKey(g){return`${g.id};;${g.uri}`}_removeMarkerFromLink(g,y){const _=g.lines.indexOf(y);_!==-1&&(g.lines.splice(_,1),g.lines.length===0&&(g.data.id!==void 0&&this._entriesWithId.delete(g.key),this._dataByLinkId.delete(g.id)))}};o.OscLinkService=m=c([h(0,u.IBufferService)],m)},8343:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const l="di$target",c="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(h){return h[c]||[]},o.createDecorator=function(h){if(o.serviceRegistry.has(h))return o.serviceRegistry.get(h);const u=function(m,g,y){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(_,v,d){v[l]===v?v[c].push({id:_,index:d}):(v[c]=[{id:_,index:d}],v[l]=v)})(u,m,y)};return u.toString=()=>h,o.serviceRegistry.set(h,u),u}},2585:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.IUnicodeService=o.IOscLinkService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;const c=l(8343);var h;o.IBufferService=(0,c.createDecorator)("BufferService"),o.ICoreMouseService=(0,c.createDecorator)("CoreMouseService"),o.ICoreService=(0,c.createDecorator)("CoreService"),o.ICharsetService=(0,c.createDecorator)("CharsetService"),o.IInstantiationService=(0,c.createDecorator)("InstantiationService"),function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"}(h||(o.LogLevelEnum=h={})),o.ILogService=(0,c.createDecorator)("LogService"),o.IOptionsService=(0,c.createDecorator)("OptionsService"),o.IOscLinkService=(0,c.createDecorator)("OscLinkService"),o.IUnicodeService=(0,c.createDecorator)("UnicodeService"),o.IDecorationService=(0,c.createDecorator)("DecorationService")},1480:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;const c=l(8460),h=l(225);class u{static extractShouldJoin(g){return(1&g)!=0}static extractWidth(g){return g>>1&3}static extractCharKind(g){return g>>3}static createPropertyValue(g,y,_=!1){return(16777215&g)<<3|(3&y)<<1|(_?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new c.EventEmitter,this.onChange=this._onChange.event;const g=new h.UnicodeV6;this.register(g),this._active=g.version,this._activeProvider=g}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(g){if(!this._providers[g])throw new Error(`unknown Unicode version "${g}"`);this._active=g,this._activeProvider=this._providers[g],this._onChange.fire(g)}register(g){this._providers[g.version]=g}wcwidth(g){return this._activeProvider.wcwidth(g)}getStringCellWidth(g){let y=0,_=0;const v=g.length;for(let d=0;d<v;++d){let f=g.charCodeAt(d);if(55296<=f&&f<=56319){if(++d>=v)return y+this.wcwidth(f);const S=g.charCodeAt(d);56320<=S&&S<=57343?f=1024*(f-55296)+S-56320+65536:y+=this.wcwidth(S)}const p=this.charProperties(f,_);let w=u.extractWidth(p);u.extractShouldJoin(p)&&(w-=u.extractWidth(_)),y+=w,_=p}return y}charProperties(g,y){return this._activeProvider.charProperties(g,y)}}o.UnicodeService=u}},n={};function i(a){var o=n[a];if(o!==void 0)return o.exports;var l=n[a]={exports:{}};return r[a].call(l.exports,l,l.exports,i),l.exports}var s={};return(()=>{var a=s;Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const o=i(9042),l=i(3236),c=i(844),h=i(5741),u=i(8285),m=i(7975),g=i(7090),y=["cols","rows"];class _ extends c.Disposable{constructor(d){super(),this._core=this.register(new l.Terminal(d)),this._addonManager=this.register(new h.AddonManager),this._publicOptions={...this._core.options};const f=w=>this._core.options[w],p=(w,S)=>{this._checkReadonlyOptions(w),this._core.options[w]=S};for(const w in this._core.options){const S={get:f.bind(this,w),set:p.bind(this,w)};Object.defineProperty(this._publicOptions,w,S)}}_checkReadonlyOptions(d){if(y.includes(d))throw new Error(`Option "${d}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new m.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new g.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new u.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const d=this._core.coreService.decPrivateModes;let f="none";switch(this._core.coreMouseService.activeProtocol){case"X10":f="x10";break;case"VT200":f="vt200";break;case"DRAG":f="drag";break;case"ANY":f="any"}return{applicationCursorKeysMode:d.applicationCursorKeys,applicationKeypadMode:d.applicationKeypad,bracketedPasteMode:d.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:f,originMode:d.origin,reverseWraparoundMode:d.reverseWraparound,sendFocusMode:d.sendFocus,wraparoundMode:d.wraparound}}get options(){return this._publicOptions}set options(d){for(const f in d)this._publicOptions[f]=d[f]}blur(){this._core.blur()}focus(){this._core.focus()}input(d,f=!0){this._core.input(d,f)}resize(d,f){this._verifyIntegers(d,f),this._core.resize(d,f)}open(d){this._core.open(d)}attachCustomKeyEventHandler(d){this._core.attachCustomKeyEventHandler(d)}attachCustomWheelEventHandler(d){this._core.attachCustomWheelEventHandler(d)}registerLinkProvider(d){return this._core.registerLinkProvider(d)}registerCharacterJoiner(d){return this._checkProposedApi(),this._core.registerCharacterJoiner(d)}deregisterCharacterJoiner(d){this._checkProposedApi(),this._core.deregisterCharacterJoiner(d)}registerMarker(d=0){return this._verifyIntegers(d),this._core.registerMarker(d)}registerDecoration(d){return this._checkProposedApi(),this._verifyPositiveIntegers(d.x??0,d.width??0,d.height??0),this._core.registerDecoration(d)}hasSelection(){return this._core.hasSelection()}select(d,f,p){this._verifyIntegers(d,f,p),this._core.select(d,f,p)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(d,f){this._verifyIntegers(d,f),this._core.selectLines(d,f)}dispose(){super.dispose()}scrollLines(d){this._verifyIntegers(d),this._core.scrollLines(d)}scrollPages(d){this._verifyIntegers(d),this._core.scrollPages(d)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(d){this._verifyIntegers(d),this._core.scrollToLine(d)}clear(){this._core.clear()}write(d,f){this._core.write(d,f)}writeln(d,f){this._core.write(d),this._core.write(`\r
699
+ `,f)}paste(d){this._core.paste(d)}refresh(d,f){this._verifyIntegers(d,f),this._core.refresh(d,f)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(d){this._addonManager.loadAddon(this,d)}static get strings(){return o}_verifyIntegers(...d){for(const f of d)if(f===1/0||isNaN(f)||f%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...d){for(const f of d)if(f&&(f===1/0||isNaN(f)||f%1!=0||f<0))throw new Error("This API only accepts positive integers")}}a.Terminal=_})(),s})())})(yC);var L7=yC.exports,bC={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(self,()=>(()=>{var r={};return(()=>{var n=r;Object.defineProperty(n,"__esModule",{value:!0}),n.FitAddon=void 0,n.FitAddon=class{activate(i){this._terminal=i}dispose(){}fit(){const i=this.proposeDimensions();if(!i||!this._terminal||isNaN(i.cols)||isNaN(i.rows))return;const s=this._terminal._core;this._terminal.rows===i.rows&&this._terminal.cols===i.cols||(s._renderService.clear(),this._terminal.resize(i.cols,i.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const i=this._terminal._core,s=i._renderService.dimensions;if(s.css.cell.width===0||s.css.cell.height===0)return;const a=this._terminal.options.scrollback===0?0:i.viewport.scrollBarWidth,o=window.getComputedStyle(this._terminal.element.parentElement),l=parseInt(o.getPropertyValue("height")),c=Math.max(0,parseInt(o.getPropertyValue("width"))),h=window.getComputedStyle(this._terminal.element),u=l-(parseInt(h.getPropertyValue("padding-top"))+parseInt(h.getPropertyValue("padding-bottom"))),m=c-(parseInt(h.getPropertyValue("padding-right"))+parseInt(h.getPropertyValue("padding-left")))-a;return{cols:Math.max(2,Math.floor(m/s.css.cell.width)),rows:Math.max(1,Math.floor(u/s.css.cell.height))}}}})(),r})())})(bC);var P7=bC.exports;const T7=(e,t)=>{const r=new URLSearchParams;return e&&r.set("session",e),t&&r.set("worktreeId",t),`/api/terminal/ws?${r.toString()}`};function D7({activePane:e,activeWorktreeId:t,attachmentSessionId:r,terminalEnabled:n,terminalContainerRef:i,terminalDisposableRef:s,terminalFitRef:a,terminalRef:o,terminalSessionRef:l,terminalSocketRef:c,terminalWorktreeRef:h,themeMode:u,workspaceToken:m}){const g=k.useCallback(()=>{if(!n||!m)return;const y=r;if(!y)return;const _=t&&t!=="main"?t:null;if(c.current&&c.current.readyState<=WebSocket.OPEN&&l.current===y&&h.current===_)return;c.current&&c.current.close();const v=o.current;v&&v.reset();const d=new WebSocket(T7(y,_));c.current=d,l.current=y,h.current=_;let f=!1;d.addEventListener("open",()=>{d.send(JSON.stringify({type:"auth",token:m}))}),d.addEventListener("message",p=>{let w=null;try{w=JSON.parse(p.data)}catch{return}if(!(w!=null&&w.type))return;if(w.type==="auth_ok"){if(f)return;f=!0;const b=o.current,x=a.current;b&&x&&(x.fit(),d.send(JSON.stringify({type:"init",cols:b.cols,rows:b.rows})));return}if(!f)return;const S=o.current;if(S){if(w.type==="output"&&typeof w.data=="string"){S.write(w.data);return}w.type==="exit"&&S.write(`\r
700
+ [terminal exited ${w.code}]\r
701
+ `)}}),d.addEventListener("close",()=>{const p=o.current;p&&p.write(`\r
702
+ [terminal disconnected]\r
703
+ `)})},[t,r,n,a,o,l,c,h,m]);k.useEffect(()=>{if(!n||e!=="terminal"||!i.current||o.current)return;const y=u==="dark",_=new L7.Terminal({fontFamily:'"Space Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',fontSize:13,cursorBlink:!0,theme:{background:y?"#0f1110":"#fbf6ee",foreground:y?"#e6edf3":"#2a2418",cursor:y?"#e6edf3":"#2a2418",selection:y?"rgba(255, 255, 255, 0.2)":"rgba(20, 19, 17, 0.15)"}});typeof _.setOption!="function"&&(_.setOption=(d,f)=>{if(d&&typeof d=="object"){_.options=d;return}_.options={[d]:f}});const v=new P7.FitAddon;_.loadAddon(v),_.open(i.current),v.fit(),_.focus(),o.current=_,a.current=v,s.current=_.onData(d=>{const f=c.current;f&&f.readyState===WebSocket.OPEN&&f.send(JSON.stringify({type:"input",data:d}))})},[e,i,s,n,a,o,c,u]),k.useEffect(()=>{const y=o.current;if(!y)return;const _=u==="dark"?{background:"#15120d",foreground:"#f2e9dc",cursor:"#f2e9dc"}:{background:"#fbf6ee",foreground:"#2a2418",cursor:"#2a2418"};typeof y.setOption=="function"?y.setOption("theme",_):y.options={theme:_}},[o,u]),k.useEffect(()=>()=>{s.current&&(s.current.dispose(),s.current=null),o.current&&(o.current.dispose(),o.current=null),a.current=null},[s,a,o]),k.useEffect(()=>{if(e==="terminal"&&n){if(o.current){const y=u==="dark";o.current.setOption("theme",{background:y?"#0f1110":"#fbf6ee",foreground:y?"#e6edf3":"#2a2418",cursor:y?"#e6edf3":"#2a2418",selection:y?"rgba(255, 255, 255, 0.2)":"rgba(20, 19, 17, 0.15)"})}a.current&&requestAnimationFrame(()=>{const y=a.current,_=o.current;if(!y||!_)return;y.fit(),_.focus();const v=c.current;v&&v.readyState===WebSocket.OPEN&&v.send(JSON.stringify({type:"resize",cols:_.cols,rows:_.rows}))}),g()}},[e,g,n,a,o,c,u]),k.useEffect(()=>{const y=()=>{const _=o.current,v=a.current,d=c.current;!_||!v||(v.fit(),d&&d.readyState===WebSocket.OPEN&&d.send(JSON.stringify({type:"resize",cols:_.cols,rows:_.rows})))};return window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[a,o,c]),k.useEffect(()=>{!r&&c.current&&(c.current.close(),c.current=null,l.current=null,h.current=null)},[r,l,c,h]),k.useEffect(()=>{n||(c.current&&(c.current.close(),c.current=null),l.current=null,h.current=null,s.current&&(s.current.dispose(),s.current=null),o.current&&(o.current.dispose(),o.current=null),a.current=null)},[s,n,a,o,l,c,h])}function I7({notificationsEnabled:e,t}){const r=k.useRef(null),n=k.useRef(null),i=e,s=k.useCallback(async()=>{if(!("Notification"in window))return"unsupported";if(Notification.permission==="default")try{return await Notification.requestPermission()}catch{return Notification.permission}return Notification.permission},[]),a=k.useCallback(()=>{const h=window.AudioContext||window.webkitAudioContext;if(!h)return;let u=n.current;u||(u=new h,n.current=u),u.state==="suspended"&&u.resume().catch(()=>{})},[]),o=k.useCallback(()=>{if(!i)return;const h=window.AudioContext||window.webkitAudioContext;if(!h)return;let u=n.current;u||(u=new h,n.current=u),u.state==="suspended"&&u.resume().catch(()=>{});const m=u.createOscillator(),g=u.createGain();m.type="sine",m.frequency.value=740,g.gain.value=1e-4,g.gain.exponentialRampToValueAtTime(.12,u.currentTime+.01),g.gain.exponentialRampToValueAtTime(1e-4,u.currentTime+.25),m.connect(g).connect(u.destination),m.start(),m.stop(u.currentTime+.26)},[i]),l=k.useCallback(h=>{if(!h)return"";let u=String(h);return u=u.replace(/```([\s\S]*?)```/g,"$1"),u=u.replace(/`([^`]+)`/g,"$1"),u=u.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,"$1"),u=u.replace(/\[([^\]]+)\]\(([^)]+)\)/g,"$1"),u=u.replace(/^\s{0,3}#{1,6}\s+/gm,""),u=u.replace(/^\s{0,3}>\s?/gm,""),u=u.replace(/^\s{0,3}[-*+]\s+/gm,""),u=u.replace(/^\s{0,3}\d+\.\s+/gm,""),u=u.replace(/[*_~]{1,3}/g,""),u=u.replace(/\s+/g," ").trim(),u},[]),c=k.useCallback(h=>{if(!e||!("Notification"in window)||Notification.permission!=="granted"||!(h!=null&&h.id)||r.current===h.id||!document.hidden)return;r.current=h.id;const u=l(h.text||"").slice(0,180);try{new Notification(t("New message"),{body:u})}catch{}o()},[e,o,l,t]);return k.useEffect(()=>{e&&(s(),a())},[s,a,e]),{ensureNotificationPermission:s,maybeNotify:c,lastNotifiedIdRef:r}}const N7=100,R7=e=>{var i;const t=String(e||"").trim();if(!t)return null;const r=t.slice(0,2);let n=t.slice(3).trim();if(!r||!n)return null;if((r.startsWith("R")||r.startsWith("C"))&&n.includes(" -> ")&&(n=((i=n.split(" -> ").pop())==null?void 0:i.trim())||n),n.startsWith('"')&&n.endsWith('"'))try{n=JSON.parse(n)}catch{}return{code:r,path:n}};function O7({apiFetch:e,attachmentSessionId:t,currentBranch:r,activeWorktreeId:n,parseDiff:i,setWorktrees:s,worktrees:a,t:o}){const[l,c]=k.useState({status:"",diff:""}),[h,u]=k.useState(null),[m,g]=k.useState([]),[y,_]=k.useState(!1),[v,d]=k.useState(new Map),f=k.useMemo(()=>{if(n&&n!=="main"){const M=a.get(n);return(M==null?void 0:M.diff)||{status:"",diff:""}}return l},[n,a,l]),p=k.useMemo(()=>{if(!f.diff)return[];try{return i(f.diff)}catch{return[]}},[f.diff,i]),w=k.useMemo(()=>(f.status||"").split(/\r?\n/).map(M=>M.trim()).filter(Boolean),[f.status]),S=k.useMemo(()=>w.map(R7).filter(Boolean),[w]),b=k.useMemo(()=>{const M=new Set,O=[];return S.forEach(z=>{if(z.code!=="??")return;const $=String(z.path||"").trim().replace(/\\/g,"/");!$||M.has($)||(M.add($),O.push($))}),O},[S]),x=k.useMemo(()=>w.length>0||!!(f.diff||"").trim(),[w.length,f.diff]);k.useEffect(()=>{if(!t){g([]),_(!1);return}if(!b.length){g([]),_(!1);return}let M=!1;const O=n&&n!=="main"?n:"main";return(async()=>{_(!0);const $=[...b],Y=new Set,X=[];for(;$.length>0&&X.length<N7&&!M;){const V=String($.shift()||"").trim();if(!V||Y.has(V))continue;if(Y.add(V),!V.endsWith("/"))try{const P=await e(`/api/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(O)}/file?path=${encodeURIComponent(V)}`);if(P.ok){const R=await P.json().catch(()=>({}));X.push({path:V,binary:!!(R!=null&&R.binary),content:(R==null?void 0:R.content)||"",truncated:!!(R!=null&&R.truncated),error:!1});continue}}catch{}try{const P=await e(`/api/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(O)}/browse?path=${encodeURIComponent(V)}`);if(!P.ok){X.push({path:V,binary:!1,content:"",truncated:!1,error:!0});continue}const R=await P.json().catch(()=>({}));(Array.isArray(R==null?void 0:R.entries)?R.entries:[]).forEach(L=>{L!=null&&L.path&&$.push(L.path)})}catch{X.push({path:V,binary:!1,content:"",truncated:!1,error:!0})}}M||(g(X),_(!1))})(),()=>{M=!0}},[n,e,t,b]);const C=k.useCallback(async()=>{if(t)try{const M=await e(`/api/sessions/${encodeURIComponent(t)}/last-commit`),O=await M.json().catch(()=>({}));if(!M.ok)throw new Error(O.error||o("Unable to load the latest commit."));const z=O.commit||{};u({branch:O.branch||"",sha:z.sha||"",message:z.message||""})}catch{u(null)}},[t,e,o]),A=k.useCallback(async M=>{if(!(!t||!M))try{const O=await e(`/api/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(M)}/commits?limit=1`),z=await O.json().catch(()=>({}));if(!O.ok)throw new Error(z.error||o("Unable to load the commit."));const $=Array.isArray(z.commits)?z.commits[0]:null;if(!($!=null&&$.sha))return;d(Y=>{const X=new Map(Y);return X.set(M,{sha:$.sha,message:$.message||""}),X})}catch{}},[t,e,o]),T=k.useCallback(async M=>{if(!(!t||!M))try{const O=await e(`/api/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(M)}/diff`);if(!O.ok)return;const z=await O.json();if(!z)return;s($=>{const Y=new Map($),X=Y.get(M);return X&&Y.set(M,{...X,diff:{status:z.status||"",diff:z.diff||""}}),Y})}catch{}},[t,e,s]),j=k.useCallback(async()=>{if(t)try{const M=await e(`/api/sessions/${encodeURIComponent(t)}/diff`);if(!M.ok)return;const O=await M.json();if(!O)return;c({status:O.status||"",diff:O.diff||""})}catch{}},[t,e]);return k.useEffect(()=>{if(!t){u(null),d(new Map);return}C()},[t,C]),k.useEffect(()=>{t&&C()},[t,r,C]),{currentDiff:f,diffFiles:p,diffStatusLines:w,hasCurrentChanges:x,untrackedFilePanels:m,untrackedLoading:y,loadRepoLastCommit:C,loadWorktreeLastCommit:A,repoDiff:l,repoLastCommit:h,requestRepoDiff:j,requestWorktreeDiff:T,setRepoDiff:c,setRepoLastCommit:u,setWorktreeLastCommitById:d,worktreeLastCommitById:v}}function M7({attachmentSessionId:e,workspaceToken:t,normalizeAttachments:r,isImageAttachment:n,getAttachmentName:i,attachmentIcon:s,t:a}){const[o,l]=k.useState([]),[c,h]=k.useState(!1),[u,m]=k.useState(""),[g,y]=k.useState(null),_=k.useCallback(d=>{if(!e)return"";const f=new URL("/api/attachments/file",window.location.origin);return f.searchParams.set("session",e),t&&f.searchParams.set("token",t),d!=null&&d.path?f.searchParams.set("path",d.path):d!=null&&d.name&&f.searchParams.set("name",d.name),f.toString()},[e,t]),v=k.useCallback((d=[])=>{const f=r(d);return f.length?E.jsx("div",{className:"bubble-attachments",children:f.map(p=>{const w=i(p),S=_(p),b=(p==null?void 0:p.path)||(p==null?void 0:p.name)||w;return n(p)?E.jsxs("button",{type:"button",className:"attachment-card attachment-card--image",onClick:()=>S?y({url:S,name:w}):null,disabled:!S,children:[S?E.jsx("img",{src:S,alt:w||a("Attached image"),className:"attachment-thumb",loading:"lazy"}):E.jsx("div",{className:"attachment-thumb attachment-thumb--empty"}),E.jsx("span",{className:"attachment-name",children:w})]},b):S?E.jsxs("a",{className:"attachment-card",href:S,target:"_blank",rel:"noopener noreferrer",children:[E.jsx("span",{className:"attachment-icon","aria-hidden":"true",children:s}),E.jsx("span",{className:"attachment-name",children:w})]},b):E.jsxs("div",{className:"attachment-card",children:[E.jsx("span",{className:"attachment-icon","aria-hidden":"true",children:s}),E.jsx("span",{className:"attachment-name",children:w})]},b)})}):null},[i,_,n,r,a]);return k.useEffect(()=>{e||l([])},[e]),{attachmentPreview:g,attachmentsError:u,attachmentsLoading:c,draftAttachments:o,getAttachmentUrl:_,renderMessageAttachments:v,setAttachmentPreview:y,setAttachmentsError:m,setAttachmentsLoading:h,setDraftAttachments:l}}const R0=e=>{if(e==null||e==="")return null;const t=new Date(e);return Number.isFinite(t.getTime())?t.toISOString():null},O0=e=>!e||typeof e!="object"?e:{...e,createdAt:R0(e.createdAt),doneAt:R0(e.doneAt)};function j7({attachmentSessionId:e,apiFetch:t,normalizeAttachments:r,sendMessage:n,setInput:i,setMessages:s,setWorktrees:a,setDraftAttachments:o,input:l,draftAttachments:c,inputRef:h,showToast:u,t:m}){const[g,y]=k.useState([]),_=k.useMemo(()=>e?`backlog:${e}`:null,[e]);k.useEffect(()=>{if(_)try{const x=JSON.parse(localStorage.getItem(_)||"[]");y(Array.isArray(x)?x.map(O0).filter(Boolean):[])}catch{y([])}},[_]),k.useEffect(()=>{_&&localStorage.setItem(_,JSON.stringify(g))},[g,_]);const v=k.useCallback(x=>{s(C=>C.map(A=>{var M;if((A==null?void 0:A.type)!=="backlog_view")return A;const T=Array.isArray((M=A.backlog)==null?void 0:M.items)?A.backlog.items:[],j=x(T);return j===T?A:{...A,backlog:{...A.backlog||{},items:j}}})),a(C=>{const A=new Map(C);return A.forEach((T,j)=>{if(!Array.isArray(T==null?void 0:T.messages))return;let M=!1;const O=T.messages.map(z=>{var X;if((z==null?void 0:z.type)!=="backlog_view")return z;const $=Array.isArray((X=z.backlog)==null?void 0:X.items)?z.backlog.items:[],Y=x($);return Y===$?z:(M=!0,{...z,backlog:{...z.backlog||{},items:Y}})});M&&A.set(j,{...T,messages:O})}),A})},[s,a]),d=k.useCallback((x,C,A)=>{if(x&&x!=="main"){a(T=>{const j=new Map(T),M=j.get(x);if(!M)return T;const O=M.messages.map(z=>(z==null?void 0:z.id)===C&&z.type==="backlog_view"?{...z,backlog:{...z.backlog||{},page:A}}:z);return j.set(x,{...M,messages:O}),j});return}s(T=>T.map(j=>(j==null?void 0:j.id)===C&&j.type==="backlog_view"?{...j,backlog:{...j.backlog||{},page:A}}:j))},[s,a]),f=k.useCallback(async x=>{if(!e){u==null||u(m("Session not found."),"error");return}try{const C=await t(`/api/sessions/${encodeURIComponent(e)}/backlog-items/${encodeURIComponent(x)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({done:!0})});if(!C.ok){const j=await C.json().catch(()=>({}));throw new Error((j==null?void 0:j.error)||m("Unable to update backlog."))}const A=await C.json().catch(()=>({})),T=O0(A==null?void 0:A.item);v(j=>j.map(M=>(M==null?void 0:M.id)===x?{...M,...T,done:!0}:M))}catch(C){u==null||u(C.message||m("Unable to update backlog."),"error")}},[t,e,u,m,v]),p=k.useCallback(()=>{const x=l.trim();if(!x)return;const C={id:`backlog-${Date.now()}-${Math.random().toString(16).slice(2,8)}`,text:x,createdAt:new Date().toISOString(),attachments:c};y(A=>[C,...A]),i("")},[c,l,i]),w=k.useCallback(x=>{y(C=>C.filter(A=>A.id!==x))},[]),S=k.useCallback(x=>{var C;i(x.text||""),o(r(x.attachments||[])),(C=h==null?void 0:h.current)==null||C.focus()},[h,r,o,i]),b=k.useCallback(x=>{n(x.text||"",x.attachments||[]),w(x.id)},[w,n]);return{addToBacklog:p,backlog:g,markBacklogItemDone:f,removeFromBacklog:w,editBacklogItem:S,launchBacklogItem:b,setBacklog:y,setBacklogMessagePage:d,updateBacklogMessages:v}}function B7({activeProvider:e,activeWorktreeId:t,addToBacklog:r,apiFetch:n,attachmentSessionId:i,captureScreenshot:s,connected:a,handleSendMessageRef:o,handleViewSelect:l,input:c,isWorktreeStopped:h,isCodexReady:u,isInWorktree:m,openPathInExplorer:g,requestRepoDiff:y,requestWorktreeDiff:_,sendMessage:v,sendWorktreeMessage:d,setCommandMenuOpen:f,setDraftAttachments:p,setInput:w,setMessages:S,setWorktrees:b,socketRef:x,t:C,showToast:A}){const T=k.useCallback((j,M)=>{const O=(j??c).trim();if(O){if(h){A(C("Worktree is stopped. Wake it up before sending a message."),"info");return}if(e==="codex"&&!u){A(C("Codex is starting. Please wait."),"info");return}if(O==="/diff"||O.startsWith("/diff ")){l("diff"),t&&t!=="main"?_(t):y(),w(""),p([]),f(!1);return}if(O.startsWith("/backlog")){if(!i){A(C("Session not found."),"error");return}(async()=>{try{const z=await n(`/api/sessions/${encodeURIComponent(i)}/backlog-items`);if(!z.ok){const N=await z.json().catch(()=>null);throw new Error((N==null?void 0:N.error)||C("Unable to load backlog."))}const $=await z.json().catch(()=>({})),Y=Array.isArray($==null?void 0:$.items)?$.items:[],V={id:`backlog-${Date.now()}-${Math.random().toString(16).slice(2,8)}`,role:"assistant",type:"backlog_view",text:"Backlog",backlog:{items:Y,page:0}};m&&t?b(N=>{const P=new Map(N),R=P.get(t);return R&&P.set(t,{...R,messages:[...R.messages||[],V]}),P}):S(N=>[...N,V])}catch(z){A(z.message||C("Unable to load backlog."),"error")}})(),w(""),p([]),f(!1);return}if(O.startsWith("/open")){const z=O.replace(/^\/open\s*/i,"").trim();if(!z){A(C("Path required."),"error");return}g(z).then(()=>{w(""),p([]),f(!1)}).catch(()=>null);return}if(O.startsWith("/todo")){const z=O.replace(/^\/todo\s*/i,"").trim();if(!z){A(C("Todo text required."),"error");return}if(!i){A(C("Session not found."),"error");return}(async()=>{try{const $=await n(`/api/sessions/${encodeURIComponent(i)}/backlog-items`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:z})});if(!$.ok){const Y=await $.json().catch(()=>null);throw new Error((Y==null?void 0:Y.error)||C("Unable to update backlog."))}A(C("Added to backlog."))}catch($){A($.message||C("Unable to update backlog."),"error")}})(),w(""),p([]),f(!1);return}if(O.startsWith("/run")){const z=O.replace(/^\/run\s*/i,"").trim();if(!z){A(C("Command required."),"error");return}if(!x.current||!a){A(C("Disconnected"),"error");return}const $=m&&t?t:null;x.current.send(JSON.stringify({type:"action_request",request:"run",arg:z,worktreeId:$||void 0})),w(""),p([]),f(!1);return}if(O.startsWith("/screenshot")){s().then(()=>{w(""),f(!1)}).catch(()=>null);return}if(O.startsWith("/git")){const z=O.replace(/^\/git\s*/i,"").trim();if(!z){A(C("Git command required."),"error");return}if(!x.current||!a){A(C("Disconnected"),"error");return}const $=m&&t?t:null;x.current.send(JSON.stringify({type:"action_request",request:"git",arg:z,worktreeId:$||void 0})),w(""),p([]),f(!1);return}m&&t?d(t,j,M):v(j,M)}},[e,t,n,i,s,a,l,c,h,u,m,g,y,_,v,d,f,p,w,A,x,C]);return k.useEffect(()=>{o.current=T},[T,o]),{handleSendMessage:T}}function F7({apiFetch:e,attachmentSessionId:t,llmProvider:r,loadRepoLastCommit:n,processing:i,setBranchMenuOpen:s,socketRef:a,t:o}){const[l,c]=k.useState([]),[h,u]=k.useState(""),[m,g]=k.useState(""),[y,_]=k.useState(!1),[v,d]=k.useState(""),[f,p]=k.useState({}),[w,S]=k.useState([]),[b,x]=k.useState(""),[C,A]=k.useState(""),[T,j]=k.useState(!1),[M,O]=k.useState(""),z=k.useRef(""),$=k.useCallback(async()=>{if(t){j(!0),O("");try{const R=await e(`/api/branches?session=${encodeURIComponent(t)}`),I=await R.json().catch(()=>({}));if(!R.ok)throw new Error(I.error||o("Unable to load branches."));S(Array.isArray(I.branches)?I.branches:[]),x(I.current||""),!z.current&&I.current&&(z.current=I.current,A(I.current))}catch(R){O(R.message||o("Unable to load branches."))}finally{j(!1)}}},[t,e,o]),Y=k.useCallback(async R=>{if(!(!t||!R)){p(I=>({...I,[R]:{...(I==null?void 0:I[R])||{},loading:!0,error:""}}));try{const I=await e(`/api/models?session=${encodeURIComponent(t)}&provider=${encodeURIComponent(R)}`),L=await I.json().catch(()=>({}));if(!I.ok)throw new Error(L.error||o("Unable to load models."));p(W=>({...W,[R]:{models:Array.isArray(L.models)?L.models:[],loading:!1,error:""}}))}catch(I){p(L=>({...L,[R]:{...(L==null?void 0:L[R])||{},loading:!1,error:I.message||o("Unable to load models.")}}))}}},[t,e,o]);k.useEffect(()=>{if(!t){S([]),x(""),A(""),O(""),z.current="",p({});return}z.current="",A(""),p({}),$()},[t,$]),k.useEffect(()=>{t&&(n==null||n())},[t,b,n]);const X=k.useCallback(()=>{!a.current||r!=="codex"||(_(!0),d(""),a.current.send(JSON.stringify({type:"model_list"})))},[r,a]),V=k.useCallback(R=>{const I=R.target.value;u(I),a.current&&(_(!0),d(""),a.current.send(JSON.stringify({type:"model_set",model:I,reasoningEffort:m||null})))},[m,a]),N=k.useCallback(R=>{const I=R.target.value;g(I),a.current&&(_(!0),d(""),a.current.send(JSON.stringify({type:"model_set",model:h||null,reasoningEffort:I||null})))},[h,a]),P=k.useCallback(async R=>{if(!(!t||i)){j(!0),O("");try{const I=await e("/api/branches/switch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:t,branch:R})}),L=await I.json().catch(()=>({}));if(!I.ok)throw new Error(L.error||o("Unable to change branch."));S(Array.isArray(L.branches)?L.branches:[]),x(L.current||""),await(n==null?void 0:n()),s&&s(!1)}catch(I){O(I.message||o("Unable to change branch."))}finally{j(!1)}}},[t,e,n,i,s,o]);return{branches:w,branchError:M,branchLoading:T,currentBranch:b,defaultBranch:C,handleBranchSelect:P,handleModelChange:V,handleReasoningEffortChange:N,loadBranches:$,loadProviderModels:Y,modelError:v,modelLoading:y,models:l,providerModelState:f,requestModelList:X,selectedModel:h,selectedReasoningEffort:m,setBranches:S,setCurrentBranch:x,setDefaultBranch:A,setModelError:d,setModelLoading:_,setModels:c,setProviderModelState:p,setSelectedModel:u,setSelectedReasoningEffort:g}}const z7=()=>new URLSearchParams(window.location.search).get("session");function $7({t:e,apiFetch:t,workspaceToken:r,handleLeaveWorkspace:n,repoUrl:i,setRepoUrl:s,repoInput:a,sessionNameInput:o,repoAuth:l,setRepoAuth:c,authMode:h,sshKeyInput:u,httpUsername:m,httpPassword:g,sessionMode:y,sessionRequested:_,setSessionRequested:v,defaultInternetAccess:d,defaultDenyGitCredentialsAccess:f,attachmentSession:p,setAttachmentSession:w,setAttachmentsLoading:S,setAttachmentsError:b,setWorkspaceToken:x,setWorkspaceMode:C,setWorkspaceError:A,setOpenAiLoginPending:T,setOpenAiLoginRequest:j}){k.useEffect(()=>{const z=z7();if(!z||!r||p!=null&&p.sessionId)return;(async()=>{try{v(!0),b("");const Y=await t(`/api/sessions/${encodeURIComponent(z)}`);if(!Y.ok)throw new Error(e("Session not found."));const X=await Y.json();w(X)}catch(Y){b(Y.message||e("Unable to resume the session.")),v(!1)}})()},[r,p==null?void 0:p.sessionId,t,n,w,b,v,e]),k.useEffect(()=>{if(!i||p!=null&&p.sessionId||y!=="new")return;(async()=>{try{S(!0),b("");const $={repoUrl:i,defaultInternetAccess:d,defaultDenyGitCredentialsAccess:f},Y=o.trim();Y&&($.name=Y),l&&($.auth=l);const X=await t("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)});if(!X.ok){let N="",P="";try{const L=await X.json();typeof(L==null?void 0:L.error)=="string"?N=L.error:typeof(L==null?void 0:L.message)=="string"?N=L.message:typeof L=="string"&&(N=L),typeof(L==null?void 0:L.error_type)=="string"&&(P=L.error_type)}catch{try{N=await X.text()}catch{N=""}}if(X.status===401&&(P==="WORKSPACE_TOKEN_INVALID"||typeof N=="string"&&N.toLowerCase().includes("invalid workspace token"))){x(""),C("existing"),A(e("Invalid workspace token. Please sign in again.")),b("");return}const I=N?`: ${N}`:"";throw X.status===401||X.status===403?new Error(e("Git authentication failed{{suffix}}.",{suffix:I})):X.status===404?new Error(e("Git repository not found{{suffix}}.",{suffix:I})):new Error(e("Impossible de creer la session de pieces jointes (HTTP {{status}}{{statusText}}){{suffix}}.",{status:X.status,statusText:X.statusText?` ${X.statusText}`:"",suffix:I}))}const V=await X.json();w(V)}catch($){b($.message||e("Unable to create the attachment session.")),T(!1),j(null)}finally{S(!1),v(!1)}})()},[i,l,p==null?void 0:p.sessionId,t,y,d,f,o,w,b,S,T,j,v,A,C,x,e]),k.useEffect(()=>{if(!(p!=null&&p.sessionId))return;const z=new URL(window.location.href);z.searchParams.set("session",p.sessionId),window.history.replaceState({},"",z)},[p==null?void 0:p.sessionId]);const M=k.useCallback(async z=>{if(z)try{v(!0),b("");const $=await t(`/api/sessions/${encodeURIComponent(z)}`);if(!$.ok)throw new Error(e("Session not found."));const Y=await $.json();w(Y)}catch($){b($.message||e("Unable to resume the session.")),v(!1)}},[t,w,b,v,e]),O=k.useCallback(z=>{z.preventDefault();const $=!!(p!=null&&p.sessionId),Y=a.trim();if(!$&&!Y){b("URL de depot git requise pour demarrer.");return}let X=null;if(!$){if(h==="ssh"){const V=u.trim();if(!V){b("Cle SSH privee requise pour demarrer.");return}X={type:"ssh",privateKey:V}}if(h==="http"){const V=m.trim();if(!V||!g){b(e("Username and password required."));return}X={type:"http",username:V,password:g}}}b(""),$||(v(!0),c(X),s(Y))},[p==null?void 0:p.sessionId,h,g,m,a,b,c,s,v,u,e]);return{handleResumeSession:M,onRepoSubmit:O}}function H7({t:e,apiFetch:t,attachmentSessionId:r}){const[n,i]=k.useState(!1),[s,a]=k.useState(""),[o,l]=k.useState(null),[c,h]=k.useState(!1),[u,m]=k.useState(""),[g,y]=k.useState(null),_=(f,p)=>JSON.stringify({type:"vibe80_handoff",handoffToken:f,baseUrl:window.location.origin,expiresAt:p}),v=k.useCallback(async()=>{if(r){h(!0),m("");try{const f=await t("/api/sessions/handoff",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:r})});if(!f.ok){const A=await f.json().catch(()=>({}));throw new Error((A==null?void 0:A.error)||e("Unable to generate the QR code."))}const p=await f.json(),w=p==null?void 0:p.handoffToken;if(!w)throw new Error(e("Invalid resume token."));const S=(p==null?void 0:p.expiresAt)??null,b=_(w,S),{default:x}=await bs(async()=>{const{default:A}=await import("./browser-e3WgtMs-.js").then(T=>T.b);return{default:A}},[]),C=await x.toDataURL(b,{width:260,margin:1});a(C),l(S),i(!0)}catch(f){m((f==null?void 0:f.message)||e("Error during generation."))}finally{h(!1)}}},[r,t,e]),d=k.useCallback(()=>{i(!1),m(""),a(""),l(null),y(null)},[]);return k.useEffect(()=>{if(!n||!o){y(null);return}const f=typeof o=="number"?o:new Date(o).getTime();if(!Number.isFinite(f)){y(null);return}const p=()=>{const S=f-Date.now(),b=Math.max(0,Math.ceil(S/1e3));y(b)};p();const w=setInterval(p,1e3);return()=>clearInterval(w)},[n,o]),{handoffOpen:n,handoffQrDataUrl:s,handoffExpiresAt:o,handoffLoading:c,handoffError:u,handoffRemaining:g,requestHandoffQr:v,closeHandoffQr:d}}function U7({t:e,apiFetch:t,attachmentSessionId:r}){const[n,i]=k.useState(""),[s,a]=k.useState(""),[o,l]=k.useState({name:"",email:""}),[c,h]=k.useState({name:"",email:""}),[u,m]=k.useState(!1),[g,y]=k.useState(!1),[_,v]=k.useState(""),[d,f]=k.useState(""),p=k.useCallback(async()=>{var S,b,x,C;if(r){m(!0),v(""),f("");try{const A=await t(`/api/sessions/${encodeURIComponent(r)}/git-identity`);if(!A.ok)throw new Error(e("Unable to load Git identity."));const T=await A.json(),j=((S=T==null?void 0:T.global)==null?void 0:S.name)||"",M=((b=T==null?void 0:T.global)==null?void 0:b.email)||"",O=((x=T==null?void 0:T.repo)==null?void 0:x.name)||"",z=((C=T==null?void 0:T.repo)==null?void 0:C.email)||"";l({name:j,email:M}),h({name:O,email:z}),i(O||j),a(z||M)}catch(A){v((A==null?void 0:A.message)||e("Error during loading."))}finally{m(!1)}}},[r,t,e]),w=k.useCallback(async()=>{var x,C;if(!r)return;const S=n.trim(),b=s.trim();if(!S||!b){v(e("Name and email required."));return}y(!0),v(""),f("");try{const A=await t(`/api/sessions/${encodeURIComponent(r)}/git-identity`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:S,email:b})});if(!A.ok){const O=await A.json().catch(()=>({}));throw new Error((O==null?void 0:O.error)||e("Update failed."))}const T=await A.json().catch(()=>({})),j=((x=T==null?void 0:T.repo)==null?void 0:x.name)||S,M=((C=T==null?void 0:T.repo)==null?void 0:C.email)||b;h({name:j,email:M}),f(e("Repository Git identity updated."))}catch(A){v((A==null?void 0:A.message)||e("Update failed."))}finally{y(!1)}},[r,t,s,n,e]);return k.useEffect(()=>{r&&p()},[r,p]),{gitIdentityName:n,gitIdentityEmail:s,gitIdentityGlobal:o,gitIdentityRepo:c,gitIdentityLoading:u,gitIdentitySaving:g,gitIdentityError:_,gitIdentityMessage:d,setGitIdentityName:i,setGitIdentityEmail:a,loadGitIdentity:p,handleSaveGitIdentity:w}}function W7({t:e,choicesKey:t,input:r,setInput:n,handleSendMessageRef:i,draftAttachments:s,setDraftAttachments:a}){const[o,l]=k.useState({}),[c,h]=k.useState(null),[u,m]=k.useState({});k.useEffect(()=>{if(!t){l({});return}try{const p=JSON.parse(localStorage.getItem(t)||"{}");l(p&&typeof p=="object"&&!Array.isArray(p)?p:{})}catch{l({})}},[t]),k.useEffect(()=>{t&&localStorage.setItem(t,JSON.stringify(o))},[o,t]);const g=k.useCallback((p,w)=>{var b;if(!((b=p==null?void 0:p.fields)!=null&&b.length))return;const S={};p.fields.forEach(x=>{var C;x.type==="checkbox"?S[x.id]=!!x.defaultChecked:x.type==="radio"||x.type==="select"?S[x.id]=((C=x.choices)==null?void 0:C[0])||"":S[x.id]=x.defaultValue||""}),h({...p,key:w}),m(S)},[]),y=k.useCallback(()=>{h(null),m({})},[]),_=k.useCallback((p,w)=>{m(S=>({...S,[p]:w}))},[]),v=k.useCallback(p=>{var b;const w=r,S=s;(b=i.current)==null||b.call(i,p,[]),n(w),a(S)},[s,i,r,a,n]),d=k.useCallback(p=>{if(p==null||p.preventDefault(),!c)return;const w=c.fields.map(S=>{let b=u[S.id];return S.type==="checkbox"&&(b=b?"1":"0"),b==null&&(b=""),`${S.id}=${b}`});v(w.join(`
704
+ `)),y()},[c,u,y,v]),f=k.useCallback((p,w,S)=>{var b;l(x=>({...x,[w]:S})),n(p),(b=i.current)==null||b.call(i,p)},[i,n]);return{choiceSelections:o,setChoiceSelections:l,activeForm:c,activeFormValues:u,openVibe80Form:g,closeVibe80Form:y,updateActiveFormValue:_,submitActiveForm:d,handleChoiceClick:f,setActiveForm:h,setActiveFormValues:m}}function V7({authMode:e,llmProvider:t,selectedProviders:r,openAiAuthMode:n,showChatCommands:i,showToolResults:s,notificationsEnabled:a,themeMode:o,composerInputMode:l,repoHistory:c,debugMode:h,setLlmProvider:u,setOpenAiLoginError:m,setClaudeLoginError:g,AUTH_MODE_KEY:y,LLM_PROVIDER_KEY:_,LLM_PROVIDERS_KEY:v,OPENAI_AUTH_MODE_KEY:d,CHAT_COMMANDS_VISIBLE_KEY:f,TOOL_RESULTS_VISIBLE_KEY:p,NOTIFICATIONS_ENABLED_KEY:w,THEME_MODE_KEY:S,COMPOSER_INPUT_MODE_KEY:b,REPO_HISTORY_KEY:x,DEBUG_MODE_KEY:C}){k.useEffect(()=>{try{localStorage.setItem(y,e)}catch{}},[y,e]),k.useEffect(()=>{try{localStorage.setItem(_,t)}catch{}},[_,t]),k.useEffect(()=>{try{localStorage.setItem(v,JSON.stringify(r))}catch{}},[v,r]),k.useEffect(()=>{m(""),g("")},[t,g,m]),k.useEffect(()=>{if(r.includes(t))return;const A=r[0]||"codex";A!==t&&u(A)},[r,t,u]),k.useEffect(()=>{try{localStorage.setItem(d,n)}catch{}},[d,n]),k.useEffect(()=>{try{localStorage.setItem(f,i?"true":"false")}catch{}},[f,i]),k.useEffect(()=>{try{localStorage.setItem(p,s?"true":"false")}catch{}},[p,s]),k.useEffect(()=>{try{localStorage.setItem(w,a?"true":"false")}catch{}},[w,a]),k.useEffect(()=>{try{localStorage.setItem(S,o)}catch{}},[S,o]),k.useEffect(()=>{try{localStorage.setItem(b,l)}catch{}},[b,l]),k.useEffect(()=>{try{localStorage.setItem(x,JSON.stringify(c))}catch{}},[x,c]),k.useEffect(()=>{try{localStorage.setItem(C,h?"true":"false")}catch{}},[C,h])}function K7({themeMode:e,setSideOpen:t}){const[r,n]=k.useState(()=>window.matchMedia("(max-width: 1024px)").matches);return k.useEffect(()=>{const i=window.matchMedia("(max-width: 1024px)"),s=()=>n(i.matches);return s(),i.addEventListener?(i.addEventListener("change",s),()=>i.removeEventListener("change",s)):(i.addListener(s),()=>i.removeListener(s))},[]),k.useEffect(()=>{document.documentElement.dataset.theme=e},[e]),k.useEffect(()=>{r&&t(!1)},[r,t]),{isMobileLayout:r}}function G7({rpcLogs:e,activeWorktreeId:t,locale:r,logFilterByTab:n,setLogFilterByTab:i}){const s=n[t]||"all",a=k.useCallback(h=>{const u=t||"main";i(m=>({...m,[u]:h}))},[t]),o=k.useMemo(()=>t&&t!=="main"?(e||[]).filter(h=>(h==null?void 0:h.worktreeId)===t):(e||[]).filter(h=>!(h!=null&&h.worktreeId)),[e,t]),l=k.useMemo(()=>o.map(h=>({...h,timeLabel:h!=null&&h.timestamp?new Date(h.timestamp).toLocaleTimeString(r):""})),[o,r]),c=k.useMemo(()=>s==="stdin"?l.filter(h=>h.direction==="stdin"):s==="stdout"?l.filter(h=>h.direction==="stdout"):l,[l,s]);return{logFilterByTab:n,setLogFilterByTab:i,logFilter:s,setLogFilter:a,scopedRpcLogs:o,formattedRpcLogs:l,filteredRpcLogs:c}}function q7(){const[e,t]=k.useState(!1),r=k.useRef(null);return k.useEffect(()=>{if(!e)return;const n=i=>{var a;const s=i.target;(a=r.current)!=null&&a.contains(s)||t(!1)};return document.addEventListener("pointerdown",n),()=>document.removeEventListener("pointerdown",n)},[e]),{toolbarExportOpen:e,setToolbarExportOpen:t,toolbarExportRef:r}}function Y7(){const[e,t]=k.useState({}),[r,n]=k.useState({});return{commandPanelOpen:e,setCommandPanelOpen:t,toolResultPanelOpen:r,setToolResultPanelOpen:n}}function J7({activePane:e,activeWorktreeId:t,debugMode:r,rpcLogsEnabled:n,terminalEnabled:i,setPaneByTab:s,setToolbarExportOpen:a,lastPaneByTabRef:o}){const l=k.useCallback(u=>{if((!r||!n)&&u==="logs"||!i&&u==="terminal")return;const m=t||"main";s(g=>({...g,[m]:u})),a(!1)},[t,r,n,s,a,i]),c=k.useCallback(()=>{if(e!=="settings"){const u=t||"main";o.current.set(u,e)}l("settings")},[e,t,l,o]),h=k.useCallback(()=>{const u=t||"main",m=o.current.get(u);l(m&&m!=="settings"?m:"chat")},[t,l,o]);return k.useEffect(()=>{(!r||!n)&&e==="logs"&&l("chat")},[e,r,l,n]),k.useEffect(()=>{!i&&e==="terminal"&&l("chat")},[e,l,i]),{handleViewSelect:l,handleOpenSettings:c,handleSettingsBack:h}}function X7({setAttachmentSession:e,setRepoUrl:t,setRepoInput:r,setRepoAuth:n,setSessionRequested:i,setAttachmentsError:s,setAttachmentsLoading:a,setMessages:o,setRepoDiff:l,setRpcLogs:c,setRpcLogsEnabled:h,setRepoLastCommit:u,setWorktreeLastCommitById:m,setCurrentTurnId:g,setActivity:y}){return{handleLeaveSession:k.useCallback(()=>{e(null),t(""),r(""),n(null),i(!1),s(""),a(!1),o([]),l({status:"",diff:""}),c([]),h(!0),u(null),m(new Map),g(null),y("");const v=new URL(window.location.href);v.searchParams.delete("session"),window.history.replaceState({},"",v)},[y,e,s,a,g,o,n,l,r,u,t,c,h,i,m])}}function Q7({activeWorktreeId:e,isInWorktree:t,currentTurnIdForActive:r,socketRef:n,setWorktrees:i,setActivity:s}){return{interruptTurn:k.useCallback(()=>{if(!r||!n.current)return;const o={type:"turn_interrupt",turnId:r,worktreeId:t&&e?e:void 0};if(n.current.send(JSON.stringify(o)),t&&e){i(l=>{const c=new Map(l),h=c.get(e);return h&&c.set(e,{...h,activity:"Interruption..."}),c});return}s("Interruption...")},[e,r,t,s,i,n])}}function Z7({activeWorktreeId:e,handleViewSelect:t,requestWorktreeDiff:r,requestRepoDiff:n}){return{handleDiffSelect:k.useCallback(()=>{t("diff"),e&&e!=="main"?r(e):n()},[e,t,n,r])}}function e9({activeChatKey:e,displayedGroupedMessages:t,CHAT_COLLAPSE_THRESHOLD:r,CHAT_COLLAPSE_VISIBLE:n}){const[i,s]=k.useState({}),a=!!i[e],o=k.useMemo(()=>{const l=t.length;if(!(!a&&l>r))return{visibleMessages:t,hiddenCount:0,isCollapsed:!1};const h=t.slice(Math.max(0,l-n));return{visibleMessages:h,hiddenCount:Math.max(0,l-h.length),isCollapsed:!0}},[t,a,r,n]);return{showOlderMessagesByTab:i,setShowOlderMessagesByTab:s,showOlderMessages:a,collapsedMessages:o}}function t9({attachmentSessionId:e,apiFetch:t,llmProvider:r,setLlmProvider:n,setSelectedProviders:i,setOpenAiReady:s,setClaudeReady:a,setRepoDiff:o,setRpcLogsEnabled:l,setRpcLogs:c,setTerminalEnabled:h,loadMainWorktreeSnapshot:u}){return{resyncSession:k.useCallback(async()=>{if(e)try{const g=await t(`/api/sessions/${encodeURIComponent(e)}`);if(!g.ok)return;const y=await g.json();if(y!=null&&y.defaultProvider&&y.defaultProvider!==r&&n(y.defaultProvider),Array.isArray(y==null?void 0:y.providers)&&y.providers.length){const _=y.providers.filter(v=>v==="codex"||v==="claude");_.length&&(i(_),s(_.includes("codex")),a(_.includes("claude")))}y!=null&&y.repoDiff&&o(y.repoDiff),typeof(y==null?void 0:y.rpcLogsEnabled)=="boolean"&&(l(y.rpcLogsEnabled),y.rpcLogsEnabled||c([])),Array.isArray(y==null?void 0:y.rpcLogs)&&(y==null?void 0:y.rpcLogsEnabled)!==!1&&c(y.rpcLogs),typeof(y==null?void 0:y.terminalEnabled)=="boolean"&&h(y.terminalEnabled),u()}catch{}},[e,t,r,u,a,n,s,o,c,l,i,h])}}function r9({socketRef:e,messagesRef:t}){return{requestMessageSync:k.useCallback(()=>{const n=e.current;if(!n||n.readyState!==WebSocket.OPEN)return;const i=(()=>{var s;if(!Array.isArray(t.current))return null;for(let a=t.current.length-1;a>=0;a-=1)if((s=t.current[a])!=null&&s.id)return t.current[a].id;return null})();n.send(JSON.stringify({type:"worktree_messages_sync",worktreeId:"main",lastSeenMessageId:i}))},[t,e])}}function n9({normalizeAttachments:e,messageIndex:t,commandIndex:r,messagesRef:n,setMessages:i,setCommandPanelOpen:s,setToolResultPanelOpen:a}){const o=k.useCallback((c=[])=>{const h=c.map((u,m)=>({id:u.id||`history-${m}`,role:u.role,text:u.text,toolResult:u.toolResult,attachments:e(u.attachments||[])}));t.clear(),r.clear(),h.forEach((u,m)=>{u.role==="assistant"&&t.set(u.id,m)}),i(h),s({}),a({})},[r,t,e,s,i,a]),l=k.useCallback((c=[])=>{if(!Array.isArray(c)||c.length===0)return;const h=Array.isArray(n.current)?n.current:[],u=new Set(h.map(g=>g==null?void 0:g.id).filter(Boolean)),m=[...h];for(const g of c){const y=g==null?void 0:g.id;y&&u.has(y)||(y&&u.add(y),m.push(g))}o(m)},[o,n]);return{applyMessages:o,mergeAndApplyMessages:l}}function i9({closeConfirm:e,setCloseConfirm:t,setActiveWorktreeId:r,activeWorktreeIdRef:n,closeWorktree:i,sendWorktreeMessage:s,mergeTargetBranch:a,t:o}){const l=k.useCallback(m=>{!m||m==="main"||t({worktreeId:m})},[t]),c=k.useCallback(()=>{t(null)},[t]),h=k.useCallback(()=>{e!=null&&e.worktreeId&&(s(e.worktreeId,o("Merge into {{branch}}",{branch:a}),[]),t(null))},[e,a,s,t,o]),u=k.useCallback(async()=>{e!=null&&e.worktreeId&&(n.current===e.worktreeId&&r("main"),await i(e.worktreeId),t(null))},[n,e,i,r,t]);return{openCloseConfirm:l,closeCloseConfirm:c,handleConfirmMerge:h,handleConfirmDelete:u}}function s9({activeWorktreeId:e,setRpcLogs:t}){return{handleClearRpcLogs:k.useCallback(()=>{t(n=>e&&e!=="main"?n.filter(i=>(i==null?void 0:i.worktreeId)!==e):n.filter(i=>!!(i!=null&&i.worktreeId)))},[e,t])}}const o9=e=>{const r=String(e||"").replace(/\\/g,"/").split("/").filter(Boolean);return r.length?r[r.length-1]:""},cl=e=>{const r=String(e||"").replace(/\\/g,"/").split("/").filter(Boolean);return r.length<=1?"":r.slice(0,-1).join("/")},M0=(e,t)=>e?`${e}/${t}`:t,ul=(e,t,r)=>!e||typeof e!="string"?e:e===t?r:e.startsWith(`${t}/`)?`${r}${e.slice(t.length)}`:e;function a9({attachmentSessionId:e,apiFetch:t,t:r,setExplorerByTab:n,explorerDefaultState:i,explorerRef:s,activeWorktreeId:a,handleViewSelect:o,showToast:l,requestExplorerTreeRef:c,requestExplorerStatusRef:h,loadExplorerFileRef:u}){const m=k.useCallback((R,I)=>{n(L=>{const W=L[R]||i;return{...L,[R]:{...i,...W,...I}}})},[i,n]),g=k.useCallback((R,I)=>{if(!Array.isArray(R))return null;for(const L of R){if((L==null?void 0:L.path)===I)return L;if((L==null?void 0:L.type)==="dir"&&Array.isArray(L.children)){const W=g(L.children,I);if(W)return W}}return null},[]),y=k.useCallback((R,I,L)=>{if(!Array.isArray(R))return R;let W=!1;const J=R.map(G=>{if(!G)return G;if(G.path===I)return W=!0,{...G,children:L};if(G.type==="dir"&&G.children!=null){const B=y(G.children,I,L);if(B!==G.children)return W=!0,{...G,children:B}}return G});return W?J:R},[]),_=k.useCallback((R,I,L)=>{n(W=>{const J=W[R]||i,G=Array.isArray(J.tree)?J.tree:[],B=y(G,I,L);return B===G?W:{...W,[R]:{...i,...J,tree:B}}})},[i,n,y]),v=k.useCallback(async(R,I)=>{if(!e||!R)return[];const L=await t(`/api/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(R)}/browse${I?`?path=${encodeURIComponent(I)}`:""}`);if(!L.ok)throw new Error("Failed to load directory");const W=await L.json().catch(()=>({})),G=(Array.isArray(W==null?void 0:W.entries)?W.entries:[]).map(B=>({...B,children:(B==null?void 0:B.type)==="dir"?(B==null?void 0:B.children)??null:void 0}));return I?_(R,I,G):m(R,{tree:G,loading:!1,error:"",treeTruncated:!1,treeTotal:G.length}),G},[e,t,_,m]),d=k.useCallback(R=>R?R.trim().replace(/\\/g,"/").replace(/^\.\/+/,"").replace(/\/+$/,"").replace(/\/+/g,"/"):"",[]),f=k.useCallback((R,I)=>{if(!I)return;const L=I.split("/").filter(Boolean),W=[];let J="";L.forEach(G=>{J=J?`${J}/${G}`:G,W.push(J)}),m(R,{expandedPaths:W})},[m]),p=k.useCallback((R,I,L)=>{!R||!I||m(R,{selectedPath:I,selectedType:L||null})},[m]),w=k.useCallback(async(R,I=!1)=>{var W;if(!e||!R)return;const L=s.current[R];if(!(!I&&(L!=null&&L.tree)&&!(L!=null&&L.error))&&!(L!=null&&L.loading)){m(R,{loading:!0,error:""});try{if(await v(R,""),I){const J=Array.isArray((W=s.current[R])==null?void 0:W.expandedPaths)?s.current[R].expandedPaths:[],G=Array.from(new Set(J.filter(B=>typeof B=="string"&&B.length>0)));for(const B of G)await v(R,B)}}catch{m(R,{loading:!1,error:r("Unable to load the explorer.")})}}},[e,s,m,v,r]),S=k.useCallback(async(R,I=!1)=>{if(!e||!R)return;const L=s.current[R];if(!(!I&&(L!=null&&L.statusLoaded)&&!(L!=null&&L.statusError))&&!(L!=null&&L.statusLoading)){m(R,{statusLoading:!0,statusError:""});try{const W=await t(`/api/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(R)}/status`);if(!W.ok)throw new Error("Failed to load status");const J=await W.json(),G=Array.isArray(J==null?void 0:J.entries)?J.entries:[],B={};G.forEach(D=>{!(D!=null&&D.path)||!(D!=null&&D.type)||(B[D.path]=D.type)}),m(R,{statusByPath:B,statusLoading:!1,statusError:"",statusLoaded:!0})}catch{m(R,{statusLoading:!1,statusError:r("Unable to load Git status."),statusLoaded:!1})}}},[e,s,m,t,r]),b=k.useCallback(async(R,I,L=!1)=>{var B;if(!e||!R||!I)return;const W=s.current[R]||i,J=Array.isArray(W.openTabPaths)?W.openTabPaths:[],G=(B=W.filesByPath)==null?void 0:B[I];if(n(D=>{var ge;const U=D[R]||i,H=Array.isArray(U.openTabPaths)?U.openTabPaths:[],ee=H.includes(I)?H:[...H,I],Z=((ge=U.filesByPath)==null?void 0:ge[I])||{},de=L||Z.content==null;return{...D,[R]:{...i,...U,openTabPaths:ee,activeFilePath:I,selectedPath:I,selectedType:"file",editMode:!0,filesByPath:{...U.filesByPath||{},[I]:{...Z,path:I,loading:de,error:"",saveError:"",saving:!1,binary:de?!1:!!Z.binary}}}}}),!(!L&&J.includes(I)&&(G==null?void 0:G.content)!=null))try{const D=await t(`/api/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(R)}/file?path=${encodeURIComponent(I)}`);if(!D.ok)throw new Error("Failed to load file");const U=await D.json(),H=(U==null?void 0:U.content)||"";n(ee=>{var ge;const Z=ee[R]||i,de=((ge=Z.filesByPath)==null?void 0:ge[I])||{};return{...ee,[R]:{...i,...Z,filesByPath:{...Z.filesByPath||{},[I]:{...de,path:I,content:H,draftContent:H,loading:!1,error:"",truncated:!!(U!=null&&U.truncated),binary:!!(U!=null&&U.binary),isDirty:!1}}}}})}catch{n(D=>{var ee;const U=D[R]||i,H=((ee=U.filesByPath)==null?void 0:ee[I])||{};return{...D,[R]:{...i,...U,filesByPath:{...U.filesByPath||{},[I]:{...H,path:I,loading:!1,error:r("Unable to load the file.")}}}}})}},[e,i,s,n,r,t]),x=k.useCallback(R=>{var L;if(!R)return;const I=a||"main";o("explorer"),w(I),S(I),(L=u.current)==null||L.call(u,I,R)},[a,o,w,S,u]),C=k.useCallback(async R=>{var D,U,H,ee,Z,de;const I=a||"main";if(!e){l(r("Session not found."),"error");return}const L=d(R);if(!L){l(r("Path required."),"error");return}let W=(D=s.current[I])==null?void 0:D.tree;if(!Array.isArray(W)||W.length===0)try{await v(I,""),W=(U=s.current[I])==null?void 0:U.tree}catch{l(r("Unable to load directory."),"error");return}const J=L.split("/").filter(Boolean);let G="",B=null;for(const ge of J){const ve=G?`${G}/${ge}`:ge;if(B=g(W,ve),!B){l(r("Path not found."),"error");return}if(B.type==="dir"&&B.children===null)try{if(await v(I,B.path),W=(H=s.current[I])==null?void 0:H.tree,B=g(W,ve),!B){l(r("Path not found."),"error");return}}catch{l(r("Unable to load directory."),"error");return}G=ve}if(!B){l(r("Path not found."),"error");return}o("explorer"),(ee=c.current)==null||ee.call(c,I),(Z=h.current)==null||Z.call(h,I),p(I,B.path,B.type),B.type==="dir"?f(I,B.path):(de=u.current)==null||de.call(u,I,B.path)},[a,e,o,c,h,d,v,g,u,p,f,s,l,r]),A=k.useCallback((R,I)=>{if(!R||!I)return;const L=s.current[R]||i,J=!new Set(L.expandedPaths||[]).has(I);n(G=>{const B=G[R]||i,D=new Set(B.expandedPaths||[]);return D.has(I)?D.delete(I):D.add(I),{...G,[R]:{...i,...B,expandedPaths:Array.from(D)}}}),J&&v(R,I).catch(()=>{m(R,{error:r("Unable to load the explorer.")})})},[s,i,n,v,m,r]),T=k.useCallback((R,I,L)=>{var J,G,B,D;if(!R)return;const W=I||((G=(J=s.current)==null?void 0:J[R])==null?void 0:G.activeFilePath)||((D=(B=s.current)==null?void 0:B[R])==null?void 0:D.selectedPath);W&&n(U=>{var de;const H=U[R]||i,ee=(de=H.filesByPath)==null?void 0:de[W];if(!ee)return U;const Z=L??"";return{...U,[R]:{...i,...H,filesByPath:{...H.filesByPath||{},[W]:{...ee,draftContent:Z,isDirty:Z!==(ee.content||""),saveError:""}}}}})},[s,i,n]),j=k.useCallback(async(R,I)=>{var G,B;if(!e||!R)return;const L=(G=s.current)==null?void 0:G[R],W=I||(L==null?void 0:L.activeFilePath)||(L==null?void 0:L.selectedPath),J=W?(B=L==null?void 0:L.filesByPath)==null?void 0:B[W]:null;if(!(!W||!J||J.binary)){n(D=>{var ee;const U=D[R]||i,H=(ee=U.filesByPath)==null?void 0:ee[W];return H?{...D,[R]:{...i,...U,filesByPath:{...U.filesByPath||{},[W]:{...H,saving:!0,saveError:""}}}}:D});try{if(!(await t(`/api/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(R)}/file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:W,content:J.draftContent||""})})).ok)throw new Error("Failed to save file");n(U=>{var Z;const H=U[R]||i,ee=(Z=H.filesByPath)==null?void 0:Z[W];return ee?{...U,[R]:{...i,...H,filesByPath:{...H.filesByPath||{},[W]:{...ee,content:ee.draftContent||"",saving:!1,saveError:"",isDirty:!1}}}}:U}),S(R,!0)}catch{n(D=>{var ee;const U=D[R]||i,H=(ee=U.filesByPath)==null?void 0:ee[W];return H?{...D,[R]:{...i,...U,filesByPath:{...U.filesByPath||{},[W]:{...H,saving:!1,saveError:r("Unable to save the file.")}}}}:D})}}},[e,s,i,n,S,t,r]),M=k.useCallback((R,I)=>{!R||!I||m(R,{activeFilePath:I,selectedPath:I,selectedType:"file"})},[m]),O=k.useCallback((R,I)=>{var G,B;if(!R||!I)return;const L=((G=s.current)==null?void 0:G[R])||i;if(!(Array.isArray(L.openTabPaths)?L.openTabPaths:[]).includes(I))return;const J=(B=L.filesByPath)==null?void 0:B[I];J!=null&&J.isDirty&&!window.confirm(r("You have unsaved changes. Continue without saving?"))||n(D=>{const U=D[R]||i,H=Array.isArray(U.openTabPaths)?U.openTabPaths:[],ee=H.indexOf(I);if(ee<0)return D;const Z=H.filter(ve=>ve!==I),de={...U.filesByPath||{}};delete de[I];let ge=U.activeFilePath||null;return ge===I&&(ge=Z[ee-1]||Z[ee]||Z[Z.length-1]||null),{...D,[R]:{...i,...U,openTabPaths:Z,filesByPath:de,activeFilePath:ge,selectedPath:ge,selectedType:ge?"file":null,editMode:!!ge}}})},[s,i,n,r]),z=k.useCallback(R=>{var W;if(!R)return!1;const L=(((W=s.current)==null?void 0:W[R])||i).selectedPath;return L?(m(R,{renamingPath:L,renameDraft:o9(L)}),!0):!1},[s,i,m]),$=k.useCallback(R=>{R&&m(R,{renamingPath:null,renameDraft:""})},[m]),Y=k.useCallback((R,I)=>{R&&m(R,{renameDraft:I??""})},[m]),X=k.useCallback(async R=>{var G;if(!e||!R)return!1;const I=((G=s.current)==null?void 0:G[R])||i,L=I.renamingPath,W=(I.renameDraft||"").trim();if(!L||!W)return $(R),!1;if(W.includes("/"))return l(r("Path required."),"error"),!1;const J=M0(cl(L),W);if(!J||J===L)return $(R),!1;try{if(!(await t(`/api/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(R)}/file/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fromPath:L,toPath:J})})).ok)throw new Error("Failed to rename path");return n(D=>{const U=D[R]||i,H=Array.from(new Set((U.openTabPaths||[]).map(Z=>ul(Z,L,J)))),ee={};return Object.entries(U.filesByPath||{}).forEach(([Z,de])=>{ee[ul(Z,L,J)]=de}),{...D,[R]:{...i,...U,openTabPaths:H,filesByPath:ee,activeFilePath:ul(U.activeFilePath,L,J),selectedPath:ul(U.selectedPath,L,J),renamingPath:null,renameDraft:""}}}),await w(R,!0),await S(R,!0),l(r("Renamed."),"success"),!0}catch{return l(r("Unable to rename."),"error"),!1}},[e,s,i,n,t,w,S,$,l,r]),V=k.useCallback(async(R,I)=>{var U;if(!e||!R)return!1;const L=d(I||"");if(!L)return l(r("Path required."),"error"),!1;const W=((U=s.current)==null?void 0:U[R])||i,J=W.selectedPath||"",G=W.selectedType||null,B=G==="dir"?J:G==="file"?cl(J):"",D=M0(B,L);try{if(!(await t(`/api/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(R)}/file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:D,content:""})})).ok)throw new Error("Failed to create file");return await w(R,!0),await S(R,!0),await b(R,D,!0),l(r("File created."),"success"),!0}catch{return l(r("Unable to create file."),"error"),!1}},[e,s,i,d,w,S,b,t,l,r]),N=k.useCallback(async R=>{var J;if(!e||!R)return!1;const L=(((J=s.current)==null?void 0:J[R])||i).selectedPath||"";if(!L||!window.confirm(r('Delete "{{path}}"? This action is irreversible.',{path:L})))return!1;m(R,{deletingPath:L});try{if(!(await t(`/api/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(R)}/file/delete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:L})})).ok)throw new Error("Failed to delete path");return n(B=>{const D=B[R]||i,U=(D.openTabPaths||[]).filter(Z=>Z!==L&&!Z.startsWith(`${L}/`)),H={};Object.entries(D.filesByPath||{}).forEach(([Z,de])=>{Z===L||Z.startsWith(`${L}/`)||(H[Z]=de)});const ee=D.activeFilePath===L||String(D.activeFilePath||"").startsWith(`${L}/`)?U[U.length-1]||null:D.activeFilePath;return{...B,[R]:{...i,...D,openTabPaths:U,filesByPath:H,activeFilePath:ee,selectedPath:cl(L)||ee,selectedType:cl(L)?"dir":ee?"file":null,renamingPath:null,renameDraft:"",deletingPath:null}}}),await w(R,!0),await S(R,!0),l(r("Deleted."),"success"),!0}catch{return m(R,{deletingPath:null}),l(r("Unable to delete."),"error"),!1}},[e,s,i,n,m,w,S,t,l,r]),P=k.useCallback((R,I)=>{R&&m(R,{editMode:I})},[m]);return k.useEffect(()=>{c.current=w},[w,c]),k.useEffect(()=>{h.current=S},[S,h]),k.useEffect(()=>{u.current=b},[b,u]),{updateExplorerState:m,selectExplorerNode:p,openPathInExplorer:C,requestExplorerTree:w,requestExplorerStatus:S,loadExplorerFile:b,openFileInExplorer:x,setActiveExplorerFile:M,closeExplorerFile:O,toggleExplorerDir:A,toggleExplorerEditMode:P,updateExplorerDraft:T,saveExplorerFile:j,startExplorerRename:z,cancelExplorerRename:$,updateExplorerRenameDraft:Y,submitExplorerRename:X,createExplorerFile:V,deleteExplorerSelection:N}}function l9({attachmentSessionId:e,socketRef:t,availableProviders:r,llmProvider:n,providerSwitching:i,processing:s,setProviderSwitching:a,setStatus:o,setSelectedProviders:l,setLlmProvider:c,t:h}){const u=k.useCallback(g=>{!t.current||t.current.readyState!==WebSocket.OPEN||r.includes(g)&&(g===n||i||s||(a(!0),o(h("Switching to {{provider}}...",{provider:g})),t.current.send(JSON.stringify({type:"switch_provider",provider:g}))))},[r,n,s,i,a,o,t,h]),m=k.useCallback(g=>{e||l(y=>{const _=y.includes(g),v=_?y.filter(d=>d!==g):[...y,g];if(!_)c(g);else if(g===n){const d=v[0]||g;d!==n&&c(d)}return v})},[e,n,c,l]);return{handleProviderSwitch:u,toggleProviderSelection:m}}function c9({currentMessages:e,attachmentRepoUrl:t,repoUrl:r,isInWorktree:n,activeWorktree:i,t:s,normalizeAttachments:a,downloadTextFile:o,formatExportName:l,extractRepoName:c,setToolbarExportOpen:h}){return{handleExportChat:k.useCallback(m=>{h(!1);const g=Array.isArray(e)?e:[];if(!g.length)return;h(!1);const y=c(t||r||""),_=n&&i?`${i.name||s("Worktree")} (${i.branchName||i.id})`:s("Main");if(m==="markdown"){const d=[`# ${s("Chat history")}`,"",`${s("Export")}: ${new Date().toISOString()}`,`${s("Tab")}: ${_}`,""];g.forEach(p=>{var b,x,C;if(p.role==="commandExecution"){d.push(`## ${s("Command")}`),d.push(`\`${p.command||s("Command")}\``),p.output&&(d.push("```"),d.push(p.output),d.push("```")),d.push("");return}if(p.role==="tool_result"){const A=((b=p.toolResult)==null?void 0:b.name)||((x=p.toolResult)==null?void 0:x.tool)||s("Tool"),T=((C=p.toolResult)==null?void 0:C.output)||p.text||"";d.push(`## ${s("Tool result")}`),d.push(`\`${A}\``),T&&(d.push("```"),d.push(T),d.push("```")),d.push("");return}const w=p.role==="user"?s("Username"):s("Assistant");d.push(`## ${w}`),d.push(p.text||"");const S=a(p.attachments||[]).map(A=>(A==null?void 0:A.name)||(A==null?void 0:A.path)).filter(Boolean);S.length&&d.push(`${s("Attachments")}: ${S.join(", ")}`),d.push("")});const f=d.join(`
705
+ `).trim()+`
706
+ `;o(l(y,"md"),f,"text/markdown");return}const v={exportedAt:new Date().toISOString(),repoUrl:t||r||"",tab:{type:n?"worktree":"main",worktreeId:(i==null?void 0:i.id)||null,worktreeName:(i==null?void 0:i.name)||null,branchName:(i==null?void 0:i.branchName)||null},messages:g.map(d=>d.role==="commandExecution"?{id:d.id,role:d.role,command:d.command||"",output:d.output||"",status:d.status||""}:d.role==="tool_result"?{id:d.id,role:d.role,text:d.text||"",toolResult:d.toolResult||null}:{id:d.id,role:d.role,text:d.text||"",attachments:a(d.attachments||[])})};o(l(y,"json"),JSON.stringify(v,null,2),"application/json")},[i,t,e,o,c,l,n,a,r,h,s])}}function u9({input:e,setInput:t,setMessages:r,setDraftAttachments:n,socketRef:i,connected:s,normalizeAttachments:a,draftAttachments:o,setWorktrees:l,setProcessing:c,setActivity:h,processingLabel:u,handleSendMessageRef:m,ensureNotificationPermission:g}){const y=k.useCallback((d,f)=>{const p=(d??e).trim();if(!p||!i.current||!s)return;g==null||g();const w=a(f??o),S=w.map(A=>A==null?void 0:A.path).filter(Boolean),b=S.length>0?`;; attachments: ${JSON.stringify(S)}`:"",x=p,C=`${x}${b}`;r(A=>[...A,{id:`user-${Date.now()}`,role:"user",text:x,attachments:w}]),c==null||c(!0),h==null||h(u||"Processing..."),i.current.send(JSON.stringify({type:"worktree_send_message",worktreeId:"main",text:C,displayText:x,attachments:w})),t(""),n([])},[s,o,e,a,n,t,r,i]),_=k.useCallback(d=>{m.current&&m.current(d,[])},[m]),v=k.useCallback((d,f,p)=>{const w=(f??e).trim();if(!w||!i.current||!s||!d)return;const S=a(p??o),b=S.map(T=>T==null?void 0:T.path).filter(Boolean),x=b.length>0?`;; attachments: ${JSON.stringify(b)}`:"",C=w,A=`${C}${x}`;l(T=>{const j=new Map(T);if(d==="main")return j;const M=j.get(d);if(M){const O=[...M.messages,{id:`user-${Date.now()}`,role:"user",text:C,attachments:S}];j.set(d,{...M,messages:O,status:"processing"})}return j}),d==="main"&&(c==null||c(!0),h==null||h(u||"Processing...")),i.current.send(JSON.stringify({type:"worktree_send_message",worktreeId:d,text:A,displayText:C,attachments:S})),t(""),n([])},[s,o,e,a,n,t,l,i]);return{sendMessage:y,sendCommitMessage:_,sendWorktreeMessage:v}}function f9({activeWorktreeId:e,setToolbarExportOpen:t,setWorktrees:r,lastNotifiedIdRef:n,attachmentSessionId:i,apiFetch:s,setMessages:a,messageIndex:o,commandIndex:l,setChoiceSelections:c,choicesKey:h,setCommandPanelOpen:u,setToolResultPanelOpen:m,llmProvider:g}){return{handleClearChat:k.useCallback(async()=>{if(t(!1),e!=="main"){if(r(_=>{const v=new Map(_),d=v.get(e);return d&&v.set(e,{...d,messages:[]}),v}),n.current=null,i)try{await s(`/api/sessions/${encodeURIComponent(i)}/clear`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({worktreeId:e})})}catch{}return}if(a([]),o.clear(),l.clear(),c({}),h&&localStorage.removeItem(h),u({}),m({}),n.current=null,i)try{await s(`/api/sessions/${encodeURIComponent(i)}/clear`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:g})})}catch{}},[e,s,i,h,l,g,o,c,u,a,m,t,r,n])}}const h9="Rename",d9="Stopped",p9={"Provider cannot be disabled: active sessions use it.":"Provider cannot be disabled: active sessions use it.","New file":"New file",Rename:h9,"File path":"File path","e.g. src/new-file.ts":"e.g. src/new-file.ts","Unable to rename.":"Unable to rename.","Unable to create file.":"Unable to create file.","Unable to delete.":"Unable to delete.","Renamed.":"Renamed.","File created.":"File created.","Deleted.":"Deleted.",'Delete "{{path}}"? This action is irreversible.':'Delete "{{path}}"? This action is irreversible.',Stopped:d9,"New worktree":"New worktree","Worktree is stopped. Wake it up before sending a message.":"Worktree is stopped. Wake it up before sending a message.","Claude Code does not natively support forked sessions with directory changes. This feature is experimental.":"Claude Code does not natively support forked sessions with directory changes. This feature is experimental.","binary data":"binary data","Loading untracked files...":"Loading untracked files...","Unable to load file.":"Unable to load file."},m9="Tout",g9="api_key",v9="Assistant",_9="Pièces jointes",y9="auth_json_b64",w9="Revenir",b9="Backlog",S9="Annuler",C9="Claude",k9="Clear",x9="Cloner",E9="Fermer",A9="Codex",L9="Commande",P9="Commit",T9="Termine",D9="Connecte",I9="Continuer",N9="Copier",R9="Créer",O9="Creation",M9="Supprimer",j9="Diff",B9="Deconnecte",F9="Éditer",z9="Anglais",$9="Explorateur",H9="Exporter",U9="FILE",W9="Formulaire",V9="Français",K9="Langue",G9="Lancer",q9="Logs",Y9="Main",J9="Markdown",X9="Messages",Q9="Modele",Z9="Non",eF="Suivant",tF="Aucune",rF="Notifications",nF="Aperçu",iF="Precedent",sF="Provider",oF="Pret",aF="Reasoning",lF="Rafraichir",cF="Renommer",uF="Arrete",fF="Regenerer",hF="Reprendre",dF="Sauver",pF="Secret",mF="Envoyer",gF="Session",vF="Paramètres",_F="setup_token",yF="Stdin",wF="stdin",bF="Stdout",SF="stdout",CF="Stop",kF="Onglet",xF="Terminal",EF="Tool",AF="Utilisateur",LF="workspaceSecret",PF="Worktree",TF="Oui",DF={"-----BEGIN OPENSSH PRIVATE KEY-----":"-----BEGIN OPENSSH PRIVATE KEY-----","Access an existing space with your credentials":"Accedez a un espace existant avec vos identifiants","Add to backlog":"Ajouter au backlog","Add attachment":"Ajouter une pièce jointe","AI providers":"Providers IA","AI providers (required)":"Providers IA (obligatoire)","AI providers updated.":"Providers IA mis a jour.",All:m9,"All changes will be lost. What would you like to do?":"Toutes les modifications seront perdues. Que souhaitez-vous faire ?","Allow default internet access for this session.":"Autoriser l'accès internet par defaut pour cette session.","Allow sharing the Git folder for the main branch by default.":"Autoriser le partage du dossier Git pour la branche principale par defaut.",api_key:g9,"Applying changes...":"Application de modifications...",Assistant:v9,"Attached image":"Image jointe","Added to backlog.":"Ajouté au backlog.",Attachments:_9,"Auth {{provider}}":"Auth {{provider}}",auth_json_b64:y9,"Authentication failed.":"Echec de l'authentification.",Back:w9,"Back to previous view":"Revenir à la vue précédente",Backlog:b9,"Show backlog":"Afficher le backlog","Binary file not displayed.":"Fichier binaire non affiche.",Cancel:S9,"Chat history":"Historique du chat","Chat tools":"Outils du chat","Choose a single or multi-line input.":"Choisissez un champ de saisie mono ou multiligne.",Claude:C9,Clear:k9,Clone:x9,"Clone a repository to start a new session":"Cloner un depot pour demarrer une nouvelle session","Start a session":"Démarrer une session","Click here to learn more.":"Cliquez ici pour en savoir plus.","Cloning repository...":"Clonage du depot...",Close:E9,"Close panel":"Fermer le panneau","Close the worktree?":"Fermer le worktree ?",Codex:A9,"Codex (OpenAI)":"Codex (OpenAI)",Command:L9,"Command required.":"Commande requise.","Capture screenshot":"Capturer une capture d'ecran","Screenshot failed.":"Echec de la capture d'ecran.","Screenshot captured.":"Capture d'ecran ajoutee.","Git command required.":"Commande git requise.","Command: {{command}}":"Commande: {{command}}",Commit:P9,"Commit & Push":"Commit & Push",Completed:T9,"Configure AI providers":"Configurer les providers IA","Configure AI providers for this workspace.":"Configurez les providers IA pour ce workspace.","Configure the workspace":"Configurer le workspace",Connected:D9,"Connecting...":"Connexion...",Continue:I9,"Continue on mobile":"Continuer sur mobile",Copy:N9,"Copy code":"Copier le code","Copy workspace ID":"Copier le workspace ID","Copy workspace secret":"Copier le workspace secret",Create:R9,"Create a new space for you or your team":"Creez un nouvel espace pour vous ou votre equipe","Create a workspace":"Creer un workspace",Creating:O9,"Dark mode":"Mode sombre","Debug mode":"Mode débug","Default model":"Modele par defaut","Default reasoning":"Reasoning par defaut",Delete:M9,'Delete session "{{title}}"? This action is irreversible.':'Supprimer la session "{{title}}" ? Cette action est irreversible.',"Delete worktree":"Supprimer le worktree","Deleting...":"Suppression...",Diff:j9,Disconnected:B9,"e.g. refactor-auth":"ex: refactor-auth",Edit:F9,"Enable access to logs and Markdown/JSON export.":"Active l'accès aux logs et à l'export Markdown/JSON.","Enable the dark theme for the interface.":"Active le thème sombre pour l'interface.",English:z9,Error:"Erreur","Error during generation.":"Erreur lors de la generation.","Error during loading.":"Erreur lors du chargement.","Error: {{message}}":"Erreur: {{message}}","Execution in progress":"Execution en cours","Existing sessions":"Sessions existantes","Expires in {{seconds}}s":"Expire dans {{seconds}}s",Explorer:$9,Export:H9,FILE:U9,"File truncated for display.":"Fichier tronque pour l'affichage.",Form:W9,French:V9,"Full name":"Nom complet","Generating QR code...":"Generation du QR code...","Generating response...":"Generation de reponse...","Git authentication failed{{suffix}}.":"Echec d'authentification Git{{suffix}}.","Git identity for this repository":"Identité Git pour ce dépôt","Git repository not found{{suffix}}.":"Depot Git introuvable{{suffix}}.","git@gitea.devops:my-org/my-repo.git":"git@gitea.devops:mon-org/mon-repo.git","Global values: {{name}} / {{email}}.":"Valeurs globales: {{name}} / {{email}}.","In progress":"En cours","Input style":"Style de l'input","Internet access":"Internet access","Internet access enabled":"Accès internet activé","Invalid resume token.":"Token de reprise invalide.","Invalid workspace token. Please sign in again.":"Token workspace invalide. Merci de vous reconnecter.","Join a workspace":"Rejoindre un workspace",JSON:"JSON","JSON credentials":"JSON credentials","JSON-RPC":"JSON-RPC","Key or token":"Cle ou token","Key required for {{provider}}.":"Cle requise pour {{provider}}.",Language:K9,"Last activity: {{date}}":"Derniere activite: {{date}}",Launch:G9,"Leave session":"Quitter la session","Leave workspace":"Quitter le workspace","List truncated after {{count}} entries.":"Liste tronquee apres {{count}} entrees.","Loading sessions...":"Chargement des sessions...","Loading...":"Chargement...",Logs:q9,Main:Y9,Markdown:J9,"Merge into {{branch}}":"Merge vers {{branch}}",Messages:X9,Model:Q9,"Multi-line":"Multiligne","Name (optional)":"Nom (optionnel)","Name and email required.":"Nom et email requis.","New message":"Nouveau message","New file":"Nouveau fichier","New worktree":"Nouveau worktree","New session":"Nouvelle session",No:Z9,"No changes detected.":"Aucun changement detecte.","No file found.":"Aucun fichier trouve.","No file selected":"Aucun fichier selectionne","binary data":"données binaires","Loading untracked files...":"Chargement des fichiers non suivis...","Unable to load file.":"Impossible de charger le fichier.","Claude Code does not natively support forked sessions with directory changes. This feature is experimental.":"Claude Code ne supporte pas nativement les sessions forkées avec changement de répertoire, cette feature est expérimentale.","No logs yet.":"Aucun log pour le moment.","No options":"Aucune option","No options.":"Aucune option.","No pending tasks at the moment.":"Aucune tâche en attente pour le moment.","No repository-specific values.":"Aucune valeur spécifique au dépôt.","No sessions available.":"Aucune session disponible.","No commands found.":"Aucune commande trouvée.",Next:eF,"No tasks":"Aucune tâche",None:tF,"Not set":"Non défini",Notifications:rF,"Open form":"Ouvrir le formulaire","Open path":"Ouvrir un chemin","Open settings":"Ouvrir les paramètres","Open diff view":"Ouvrir la vue diff","Run shell command":"Executer une commande shell","Run git command":"Executer une commande git","OpenAI authentication failed.":"Echec de l'authentification OpenAI.","Password or PAT":"Mot de passe ou PAT","Path required.":"Le chemin est requis.","Path not found.":"Chemin introuvable.",Preview:nF,"Private SSH key (not recommended)":"Cle SSH privee (non recommande)",Previous:iF,"Processing...":"Traitement en cours...","Provide user.name and user.email for repository commits.":"Renseignez user.name et user.email pour les commits du dépôt.",Provider:sF,"QR code":"QR code","QR code expired":"QR code expire","QR code unavailable.":"QR code indisponible.",Ready:oF,Reasoning:aF,"Reasoning...":"Raisonnement...",Refresh:lF,Rename:cF,"Renamed.":"Renomme.",Stopped:uF,Regenerate:fF,"Remove {{label}}":"Retirer {{label}}","Repository authentication (optional)":"Authentification depot (optionnelle)","Repository diff":"Diff du repository","Repository Git identity updated.":"Identité Git du dépôt mise à jour.","Repository values: {{name}} / {{email}}.":"Valeurs du dépôt: {{name}} / {{email}}.",Resume:hF,"Resume an already configured worktree":"Reprendre un worktree deja configure","Resume an existing session":"Reprendre une session existante","Resume on mobile":"Reprendre sur mobile",Save:dF,"Saving...":"Sauvegarde...","Scan this QR code in the Android app to resume the current session.":"Scannez ce QR code dans l'application Android pour reprendre la session en cours.",Secret:pF,"Select a branch":"Selectionner une branche","Select a file in the tree.":"Selectionnez un fichier dans l'arborescence.","File path":"Chemin du fichier","e.g. src/new-file.ts":"ex: src/nouveau-fichier.ts","Select a language":"Selectionner une langue","Select a valid remote branch.":"Selectionnez une branche distante valide.","Select an existing workspace or create a new one.":"Selectionnez un workspace existant ou creez-en un nouveau.","Select at least one provider.":"Selectionnez au moins un provider.","Selected attachments":"Pièces sélectionnées",Send:mF,"Send 'Commit & Push' in chat":"Envoyer 'Commit & Push' dans le chat","Send 'Commit' in chat":"Envoyer 'Commit' dans le chat","Send a message to start a session.":"Envoyez un message pour demarrer une session.",Session:gF,'Session "{{title}}" deleted.':'Session "{{title}}" supprimee.',"Session name (optional)":"Nom de la session (optionnel)","Session not found.":"Session introuvable.",Settings:vF,setup_token:_F,"Deny git credentials access":"Refuser l'accès aux identifiants Git","Provider cannot be disabled: active sessions use it.":"Impossible de désactiver ce provider : des sessions l'utilisent.","Show a notification and sound when a new message arrives.":"Affiche une notification et un son quand un nouveau message arrive.","Show commands in chat":"Afficher les commandes dans le chat","Show executed command blocks in the conversation.":"Affiche les blocs de commandes exécutées dans la conversation.","Show tool results in chat":"Afficher les tool results dans le chat","Show tool_result blocks in the conversation.":"Affiche les blocs tool_result dans la conversation.","Single line":"Monoligne","Source branch":"Branche source","Start a session to open the terminal.":"Demarrez une session pour ouvrir le terminal.",Stdin:yF,stdin:wF,Stdout:bF,stdout:SF,Stop:CF,"Switching to {{provider}}...":"Basculement vers {{provider}}...",Tab:kF,Terminal:xF,"The key is stored in ~/.ssh for cloning.":"La cle est stockee dans ~/.ssh pour le clonage.","The password can be replaced by a PAT.":"Le mot de passe peut etre remplace par un PAT.","These settings are stored in your browser.":"Ces réglages sont stockés dans votre navigateur.","Vibe80 can run Codex or Claude Code. To continue, provide your Anthropic and/or OpenAI credentials. If you use pay-as-you-go billing, supply an API key.":"Vibe80 peut piloter Codex ou Claude Code. Pour continuer, fournissez vos identifiants Anthropic et/ou OpenAI. Si vous utilisez une facturation a l'usage, fournissez une API key.","For subscription plans, use auth.json from the Codex CLI login (ChatGPT) or a long-lived token from `claude setup-token` (Claude).":"Pour les abonnements, utilisez auth.json apres login Codex en CLI (ChatGPT) ou un token longue duree via `claude setup-token` (Claude).","Vibe80 opens Git-based work sessions. Even in a secure environment, we recommend short-lived and revocable PATs or keys.":"Vibe80 ouvre des sessions de travail basees sur des depots Git. Meme dans un environnement securise, nous recommandons des jetons PAT/cles ephemeres et revocables.","Vibe80 strictly controls access to resources (Git credentials and internet) using sandboxing. ":"Vibe80 controle strictement l'acces aux ressources (identifiants Git et internet) via le sandboxing. ","A workspace is an isolated, secured environment accessible only with credentials. It lets you reuse AI credentials for all future sessions.":"Un workspace est un espace isole et securise, accessible uniquement avec des identifiants. Il permet de reutiliser vos identifiants IA pour toutes vos futures sessions.","You can create multiple workspaces to separate teams, projects, or security boundaries.":"Vous pouvez creer plusieurs workspaces pour separer equipes, projets ou perimetres de securite.",Tool:EF,"Tool result":"Tool result","Tool: {{tool}}":"Outil: {{tool}}","Todo text required.":"Texte de la todo requis.","Unable to change branch.":"Impossible de changer de branche.","Unable to create the attachment session (HTTP {{status}}{{statusText}}){{suffix}}.":"Impossible de creer la session de pieces jointes (HTTP {{status}}{{statusText}}){{suffix}}.","Unable to create the attachment session.":"Impossible de creer la session de pieces jointes.","Unable to delete the session.":"Impossible de supprimer la session.","Unable to delete the session{{suffix}}.":"Impossible de supprimer la session{{suffix}}.","Unable to generate the QR code.":"Impossible de generer le QR code.","Unable to load branches.":"Impossible de charger les branches.","Unable to load Git identity.":"Impossible de charger l'identité Git.","Unable to load Git status.":"Impossible de charger le statut Git.","Unable to load models.":"Impossible de charger les modeles.","Unable to load sessions.":"Impossible de charger les sessions.","Unable to load the commit.":"Impossible de charger le commit.","Unable to load the explorer.":"Impossible de charger l'explorateur.","Unable to load the file.":"Impossible de charger le fichier.","Unable to load tree.":"Impossible de charger l'arborescence.","Unable to load the latest commit.":"Impossible de charger le dernier commit.","Unable to resume the session.":"Impossible de reprendre la session.","Unable to rename.":"Impossible de renommer.","Unable to delete.":"Impossible de supprimer.","Unable to save the file.":"Impossible d'enregistrer le fichier.","Unable to create file.":"Impossible de creer le fichier.","Unable to upload attachments.":"Impossible d'uploader les pieces jointes.","Unable to update backlog.":"Impossible de mettre à jour le backlog.","Unexpected error":"Erreur inattendue","Update failed.":"Echec de la mise à jour.","Usage limit reached. Please try again later.":"Limite d'usage atteinte. Merci de reessayer plus tard.","User settings":"Paramètres utilisateur","user.email":"user.email","user.name":"user.name",Username:AF,"Username + password":"Identifiant + mot de passe","Username and password required.":"Identifiant et mot de passe requis.","Validating...":"Validation...","View previous messages ({{count}})":"Voir les messages precedents ({{count}})","Workspace configuration failed.":"Echec de la configuration du workspace.","Workspace created":"Workspace cree","Workspace created hint":"Votre workspace a ete cree avec succes. Gardez ces identifiants scrupuleusement pour un futur acces.","Workspace creation failed.":"Echec de creation du workspace.","Workspace ID":"Workspace ID","Workspace ID and secret are required.":"Workspace ID et secret requis.","Workspace ID required.":"Workspace ID requis.","Workspace Secret":"Workspace Secret","Workspace update failed.":"Echec de mise a jour du workspace.","workspaceId (e.g. w...)":"workspaceId (ex: w...)",workspaceSecret:LF,Worktree:PF,"Worktree diff":"Diff du worktree","Worktree is stopped. Wake it up before sending a message.":"Le worktree est arrete. Relancez-le avant d'envoyer un message.","File created.":"Fichier cree.","Deleted.":"Supprime.",'Delete "{{path}}"? This action is irreversible.':'Supprimer "{{path}}" ? Cette action est irreversible.',"Write your message…":"Écris ton message…",Yes:TF,"You have unsaved changes. Continue without saving?":"Vous avez des modifications non sauvegardees. Continuer sans sauvegarder ?","your.email@example.com":"ton.email@exemple.com","{{count}} attachment(s)":"{{count}} pièce(s) jointe(s)","{{count}} B":"{{count}} o","{{count}} files modified":"{{count}} fichiers modifies","{{count}} item(s)":"{{count}} élément(s)","{{count}} KB":"{{count}} Ko","{{count}} lines":"{{count}} lignes","{{count}} MB":"{{count}} Mo"},SC="uiLanguage",IF={en:p9||{},fr:DF||{}},NF=()=>{try{const e=localStorage.getItem(SC);if(e==="fr"||e==="en")return e}catch{}return"en"},RF=(e,t)=>t?e.replace(/\{\{(\w+)\}\}/g,(r,n)=>Object.prototype.hasOwnProperty.call(t,n)?String(t[n]):r):e,CC=(e,t,r)=>{const i=(IF[e]||{})[t]||t;return RF(i,r)},kC=k.createContext({language:"en",setLanguage:()=>{},t:(e,t)=>CC("en",e,t),locale:"en-US"}),OF=({children:e})=>{const[t,r]=k.useState(NF);k.useEffect(()=>{try{localStorage.setItem(SC,t)}catch{}},[t]);const n=t==="fr"?"fr-FR":"en-US",i=k.useCallback((a,o)=>CC(t,a,o),[t]),s=k.useMemo(()=>({language:t,setLanguage:r,t:i,locale:n}),[t,i,n]);return E.jsx(kC.Provider,{value:s,children:e})},xC=()=>k.useContext(kC),j0={creating:$D,ready:v_,processing:HD,stopped:v_,completed:Qh,error:ii},B0={creating:"#9ca3af",ready:"#10b981",processing:"#f59e0b",stopped:"#ef4444",completed:"#3b82f6",error:"#ef4444"};function MF({worktrees:e,activeWorktreeId:t,onSelect:r,onCreate:n,onClose:i,onRename:s,provider:a,providers:o,branches:l,defaultBranch:c,branchLoading:h,branchError:u,defaultInternetAccess:m,defaultDenyGitCredentialsAccess:g,onRefreshBranches:y,providerModelState:_,onRequestProviderModels:v,disabled:d,isMobile:f}){var F,ke;const{t:p}=xC(),[w,S]=k.useState(!1),[b,x]=k.useState(null),[C,A]=k.useState(""),[T,j]=k.useState(""),[M,O]=k.useState(""),z=k.useMemo(()=>Array.isArray(o)&&o.length?o:[a||"codex"],[o,a]),[$,Y]=k.useState(z[0]),[X,V]=k.useState("new"),[N,P]=k.useState("main"),[R,I]=k.useState(""),[L,W]=k.useState(""),[J,G]=k.useState(!!m),[B,D]=k.useState(typeof g=="boolean"?g:!0),U=k.useMemo(()=>({creating:p("Creating"),ready:p("Ready"),processing:p("In progress"),stopped:p("Stopped"),completed:p("Completed"),error:p("Error")}),[p]),H=k.useRef(null),ee=k.useRef(null);k.useEffect(()=>{b&&H.current&&(H.current.focus(),H.current.select())},[b]),k.useEffect(()=>{w&&ee.current&&ee.current.focus()},[w]),k.useEffect(()=>{if(w&&(G(!!m),D(typeof g=="boolean"?g:!0),M||O(c||""),!(l!=null&&l.length)&&y&&!h&&y(),X==="new"&&v)){const re=(_==null?void 0:_[$])||{};!re.loading&&!(re.models||[]).length&&v($)}},[w,M,c,l,m,g,y,h,X,$,v]),k.useEffect(()=>{z.includes($)||Y(z[0])},[z,$]),k.useEffect(()=>{if(X==="new"&&v){const re=(_==null?void 0:_[$])||{};!re.loading&&!(re.models||[]).length&&v($)}X==="new"&&(I(""),W(""))},[X,$,v]);const Z=(_==null?void 0:_[$])||{},de=Array.isArray(Z.models)?Z.models:[],ge=k.useMemo(()=>Array.isArray(l)?l.map(re=>re.trim()).filter(Boolean):[],[l]),ve=(M||c||"").trim(),Ee=!!ve&&ge.includes(ve),ue=k.useMemo(()=>de.find(re=>re.isDefault)||null,[de]),Ae=k.useMemo(()=>de.find(re=>re.model===R)||null,[de,R]),Fe=X==="new"&&$==="codex"&&(((F=Ae==null?void 0:Ae.supportedReasoningEfforts)==null?void 0:F.length)||0)>0;k.useEffect(()=>{X==="new"&&(!R&&(ue!=null&&ue.model)&&I(ue.model),$==="codex"&&!L&&(ue!=null&&ue.defaultReasoningEffort)&&W(ue.defaultReasoningEffort),$!=="codex"&&L&&W(""))},[X,$,R,L,ue]),k.useEffect(()=>{var we;if(X!=="new"||$!=="codex"){L&&W("");return}if(!((we=Ae==null?void 0:Ae.supportedReasoningEfforts)!=null&&we.length)){L&&W("");return}!Ae.supportedReasoningEfforts.some(Ve=>Ve.reasoningEffort===L)&&L&&W("")},[X,$,Ae,L]);const Re=()=>{n&&n({context:X,name:T.trim()||null,provider:$,sourceWorktree:X==="fork"?N:null,startingBranch:ve||null,model:X==="new"&&R||null,reasoningEffort:X==="new"&&L||null,internetAccess:J,denyGitCredentialsAccess:B}),j(""),V("new"),Y(z[0]),P("main"),O(c||""),I(""),W(""),G(!!m),D(typeof g=="boolean"?g:!0),S(!1)},We=re=>{x(re.id),A(re.name)},ot=()=>{b&&C.trim()&&s&&s(b,C.trim()),x(null),A("")},Oe=re=>{re.key==="Enter"?ot():re.key==="Escape"&&(x(null),A(""))},Pe=re=>{re.key==="Enter"?Re():re.key==="Escape"&&S(!1)},Ce=(Array.isArray(e)?e:Array.from(((ke=e==null?void 0:e.values)==null?void 0:ke.call(e))||[])).slice().sort((re,we)=>{if((re==null?void 0:re.id)==="main"&&(we==null?void 0:we.id)!=="main")return-1;if((we==null?void 0:we.id)==="main"&&(re==null?void 0:re.id)!=="main")return 1;const Ve=re!=null&&re.createdAt?new Date(re.createdAt).getTime():0,Me=we!=null&&we.createdAt?new Date(we.createdAt).getTime():0;return Ve-Me}),Q=Ce.map(re=>({id:re.id,label:re.id==="main"?"main":re.name||re.branchName||re.id,provider:re.provider||re.id==="main"&&a||null})),oe=Q.find(re=>re.id===N),ye=X==="fork"&&(oe==null?void 0:oe.provider)==="claude";return k.useEffect(()=>{var we;if(!Q.length)return;if(!Q.some(Ve=>Ve.id===N)){const Ve=((we=Q.find(Me=>Me.id==="main"))==null?void 0:we.id)||Q[0].id;P(Ve)}},[N,Q]),E.jsxs("div",{className:"worktree-tabs-container",children:[E.jsx("div",{className:"worktree-tabs",children:f?E.jsxs("div",{className:"worktree-tabs-select",children:[E.jsx("select",{className:"worktree-select",value:t,onChange:re=>!d&&(r==null?void 0:r(re.target.value)),"aria-label":p("Select a branch"),disabled:d,children:Ce.map(re=>E.jsx("option",{value:re.id,children:re.name},re.id))}),E.jsx("button",{className:"worktree-tab-add",onClick:()=>S(!0),disabled:d||Ce.length>=10,title:p("New worktree"),"aria-label":p("New worktree"),children:E.jsx(Ne,{icon:hc})})]}):E.jsxs(E.Fragment,{children:[Ce.map(re=>E.jsxs("div",{className:`worktree-tab ${t===re.id?"active":""}`,onClick:()=>!d&&(r==null?void 0:r(re.id)),style:{"--tab-accent":re.color||"#3b82f6"},children:[E.jsx("span",{className:`worktree-status ${re.status==="processing"?"pulse":""}`,style:{color:B0[re.status]||B0.ready},title:U[re.status]||re.status,children:E.jsx(Ne,{icon:j0[re.status]||j0.ready})}),b===re.id&&re.id!=="main"?E.jsx("input",{ref:H,className:"worktree-tab-edit",value:C,onChange:we=>A(we.target.value),onBlur:ot,onKeyDown:Oe,onClick:we=>we.stopPropagation()}):E.jsx("span",{className:"worktree-tab-name",onDoubleClick:we=>{we.stopPropagation(),re.id!=="main"&&We(re)},title:re.id==="main"?re.name:`${re.name||re.branchName} (${re.branchName||"main"})`,children:re.id==="main"?re.name:re.name||re.branchName}),re.id!=="main"&&E.jsx("button",{className:"worktree-tab-close",onClick:we=>{we.stopPropagation(),i==null||i(re.id)},title:p("Close"),children:E.jsx(Ne,{icon:ii})})]},re.id)),E.jsx("button",{className:"worktree-tab-add",onClick:()=>S(!0),disabled:d||Ce.length>=10,title:p("New worktree"),children:E.jsx(Ne,{icon:hc})})]})}),w&&E.jsx("div",{className:"worktree-create-dialog-overlay",onClick:()=>S(!1),children:E.jsxs("div",{className:"worktree-create-dialog",onClick:re=>re.stopPropagation(),children:[E.jsx("h3",{children:p("New worktree")}),E.jsxs("div",{className:"worktree-create-grid",children:[E.jsxs("div",{className:"worktree-create-field",children:[E.jsx("label",{children:p("Name (optional)")}),E.jsx("input",{ref:ee,type:"text",placeholder:p("e.g. refactor-auth"),value:T,onChange:re=>j(re.target.value),onKeyDown:Pe})]}),E.jsxs("div",{className:"worktree-create-field",children:[E.jsx("label",{children:p("Source branch")}),E.jsx("input",{type:"text",list:"worktree-branch-options",placeholder:c||"main",value:M,onChange:re=>O(re.target.value),onKeyDown:Pe}),E.jsx("datalist",{id:"worktree-branch-options",children:ge.map(re=>E.jsx("option",{value:re},re))}),!Ee&&E.jsx("div",{className:"worktree-field-error",children:p("Select a valid remote branch.")}),u&&E.jsx("div",{className:"worktree-field-error",children:u})]}),E.jsxs("div",{className:"worktree-create-field",children:[E.jsx("label",{children:p("Context")}),E.jsxs("select",{value:X,onChange:re=>V(re.target.value==="fork"?"fork":"new"),children:[E.jsx("option",{value:"new",children:p("New")}),E.jsx("option",{value:"fork",children:p("Fork")})]})]}),X==="new"?E.jsxs("div",{className:"worktree-create-field",children:[E.jsx("label",{children:p("Provider")}),E.jsxs("select",{value:$,onChange:re=>Y(re.target.value),disabled:z.length<=1,children:[z.includes("codex")&&E.jsx("option",{value:"codex",children:p("Codex (OpenAI)")}),z.includes("claude")&&E.jsx("option",{value:"claude",children:p("Claude")})]})]}):E.jsxs("div",{className:"worktree-create-field",children:[E.jsx("label",{children:p("Source worktree")}),E.jsx("select",{value:N,onChange:re=>P(re.target.value||"main"),children:Q.map(re=>E.jsx("option",{value:re.id,children:re.label},re.id))})]}),ye&&E.jsx("div",{className:"worktree-create-field is-full",children:E.jsx("div",{className:"worktree-warning-bubble",children:p("Claude Code does not natively support forked sessions with directory changes. This feature is experimental.")})}),X==="new"&&($==="codex"||$==="claude")&&E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:`worktree-create-field ${Fe?"":"is-full"}`,children:[E.jsx("label",{children:p("Model")}),E.jsxs("select",{value:R,onChange:re=>I(re.target.value),disabled:Z.loading||de.length===0,children:[E.jsx("option",{value:"",children:p("Default model")}),de.map(re=>E.jsx("option",{value:re.model,children:re.displayName||re.model},re.id))]}),Z.error&&E.jsx("div",{className:"worktree-field-error",children:Z.error})]}),Fe&&E.jsxs("div",{className:"worktree-create-field",children:[E.jsx("label",{children:p("Reasoning")}),E.jsxs("select",{value:L,onChange:re=>W(re.target.value),disabled:Z.loading||!Ae,children:[E.jsx("option",{value:"",children:p("Default reasoning")}),((Ae==null?void 0:Ae.supportedReasoningEfforts)||[]).map(re=>E.jsx("option",{value:re.reasoningEffort,children:re.reasoningEffort},re.reasoningEffort))]})]})]}),E.jsx("div",{className:"worktree-create-field worktree-toggle-field",children:E.jsxs("label",{className:"worktree-toggle",children:[E.jsx("input",{type:"checkbox",checked:J,onChange:re=>{const we=re.target.checked;G(we),we||D(!1)}}),E.jsx("span",{children:p("Internet access")})]})}),J&&E.jsx("div",{className:"worktree-create-field worktree-toggle-field",children:E.jsxs("label",{className:"worktree-toggle",children:[E.jsx("input",{type:"checkbox",checked:B,onChange:re=>D(re.target.checked)}),E.jsx("span",{children:p("Deny git credentials access")})]})})]}),E.jsxs("div",{className:"worktree-create-actions",children:[E.jsx("button",{className:"worktree-btn-cancel",onClick:()=>S(!1),children:p("Cancel")}),E.jsx("button",{className:"worktree-btn-create",onClick:Re,disabled:!Ee||X==="fork"&&!N,children:p("Create")})]})]})})]})}function jF({t:e,brandLogo:t,allTabs:r,activeWorktreeId:n,handleSelectWorktree:i,createWorktree:s,openCloseConfirm:a,renameWorktreeHandler:o,llmProvider:l,availableProviders:c,branches:h,defaultBranch:u,currentBranch:m,branchLoading:g,branchError:y,defaultInternetAccess:_,defaultDenyGitCredentialsAccess:v,loadBranches:d,providerModelState:f,loadProviderModels:p,connected:w,isMobileLayout:S,requestHandoffQr:b,attachmentSession:x,handoffLoading:C,handleOpenSettings:A,handleLeaveSession:T}){return E.jsxs("header",{className:"header",children:[E.jsxs("div",{className:"topbar-left",children:[E.jsx("div",{className:"topbar-spacer"}),E.jsx("div",{className:"topbar-brand",children:E.jsx("img",{className:"brand-logo",src:t,alt:"vibe80"})}),E.jsx("div",{className:"topbar-tabs",children:E.jsx(MF,{worktrees:r,activeWorktreeId:n,onSelect:i,onCreate:s,onClose:a,onRename:o,provider:l,providers:c.length?c:[l],branches:h,defaultBranch:u||m,branchLoading:g,branchError:y,defaultInternetAccess:_,defaultDenyGitCredentialsAccess:v,onRefreshBranches:d,providerModelState:f,onRequestProviderModels:p,disabled:!w,isMobile:S})})]}),E.jsxs("div",{className:"topbar-right",children:[E.jsx("button",{type:"button",className:"icon-button","aria-label":e("Resume on mobile"),title:e("Resume on mobile"),onClick:b,disabled:!(x!=null&&x.sessionId)||C,children:E.jsx(Ne,{icon:e6})}),E.jsx("button",{type:"button",className:"icon-button","aria-label":e("Open settings"),onClick:A,children:E.jsx(Ne,{icon:Ab})}),E.jsx("button",{type:"button",className:"icon-button","aria-label":e("Leave session"),onClick:T,children:E.jsx(Ne,{icon:Lb})})]})]})}function BF({t:e,brandLogo:t,showStep1:r,showStep2:n,showStep3:i,showStep4:s,showMonoLoginRequired:a,headerHint:o,workspaceMode:l,setWorkspaceMode:c,formDisabled:h,handleWorkspaceSubmit:u,workspaceIdInput:m,setWorkspaceIdInput:g,workspaceSecretInput:y,setWorkspaceSecretInput:_,workspaceError:v,handleWorkspaceProvidersSubmit:d,workspaceProvider:f,workspaceAuthExpanded:p,setWorkspaceAuthExpanded:w,setWorkspaceProviders:S,providerAuthOptions:b,getProviderAuthType:x,workspaceAuthFiles:C,setWorkspaceAuthFiles:A,sessionMode:T,setSessionMode:j,setSessionRequested:M,setAttachmentsError:O,loadWorkspaceSessions:z,deploymentMode:$,handleLeaveWorkspace:Y,workspaceSessionsLoading:X,workspaceSessions:V,workspaceSessionsError:N,workspaceSessionDeletingId:P,handleResumeSession:R,handleDeleteSession:I,locale:L,extractRepoName:W,getTruncatedText:J,isCloning:G,repoDisplay:B,onRepoSubmit:D,sessionNameInput:U,setSessionNameInput:H,repoInput:ee,setRepoInput:Z,repoHistory:de,authMode:ge,setAuthMode:ve,sshKeyInput:Ee,setSshKeyInput:ue,httpUsername:Ae,setHttpUsername:Fe,httpPassword:Re,setHttpPassword:We,defaultInternetAccess:ot,setDefaultInternetAccess:Oe,defaultDenyGitCredentialsAccess:Pe,setDefaultDenyGitCredentialsAccess:Ce,attachmentsError:Q,sessionRequested:oe,workspaceBusy:ye,workspaceProvidersEditing:F,providersBackStep:ke,setWorkspaceStep:re,setWorkspaceProvidersEditing:we,setWorkspaceError:Ve,setProvidersBackStep:Me,loadWorkspaceProviders:Lt,workspaceCreated:ae,workspaceId:ce,workspaceCopied:q,handleWorkspaceCopy:K,infoContent:te,toast:ne}){var le;return E.jsxs("div",{className:"session-gate session-fullscreen",children:[E.jsxs("div",{className:"session-layout session-layout--fullscreen",children:[E.jsxs("div",{className:"session-shell",children:[E.jsxs("div",{className:"session-header",children:[E.jsx("img",{className:"brand-logo",src:t,alt:"vibe80"}),E.jsx("h1",{children:e(a?"Login required":s?"Start a session":i?"Workspace created":n?"Configure AI providers":"Configure the workspace")}),o?E.jsx("p",{className:"session-hint",children:o}):null]}),E.jsxs("div",{className:"session-body",children:[r&&E.jsxs(E.Fragment,{children:[E.jsxs("form",{id:"workspace-form",className:"session-form",onSubmit:u,children:[E.jsxs("div",{className:"session-workspace-options",children:[E.jsxs("button",{type:"button",className:`session-workspace-option ${l==="existing"?"is-selected":""}`,onClick:()=>c("existing"),disabled:h,"aria-pressed":l==="existing",children:[E.jsx("span",{className:"session-workspace-icon is-join","aria-hidden":"true",children:E.jsx(Ne,{icon:__})}),E.jsxs("span",{className:"session-workspace-option-text",children:[E.jsx("span",{className:"session-workspace-option-title",children:e("Join a workspace")}),E.jsx("span",{className:"session-workspace-option-subtitle",children:e("Access an existing space with your credentials")})]})]}),E.jsxs("button",{type:"button",className:`session-workspace-option ${l==="new"?"is-selected":""}`,onClick:()=>c("new"),disabled:h,"aria-pressed":l==="new",children:[E.jsx("span",{className:"session-workspace-icon is-create","aria-hidden":"true",children:E.jsx(Ne,{icon:hc})}),E.jsxs("span",{className:"session-workspace-option-text",children:[E.jsx("span",{className:"session-workspace-option-title",children:e("Create a workspace")}),E.jsx("span",{className:"session-workspace-option-subtitle",children:e("Create a new space for you or your team")})]})]})]}),E.jsx("div",{className:`session-panel ${l==="existing"?"is-visible":"is-hidden"}`,"aria-hidden":l!=="existing",children:E.jsxs("div",{className:"session-workspace-form",children:[E.jsxs("div",{className:"session-workspace-form-labels",children:[E.jsx("span",{children:e("Workspace ID")}),E.jsx("span",{children:e("Secret")})]}),E.jsxs("div",{className:"session-workspace-form-grid",children:[E.jsx("input",{type:"text",placeholder:e("workspaceId (e.g. w...)"),value:m,onChange:se=>g(se.target.value),disabled:h,spellCheck:!1}),E.jsx("input",{type:"password",placeholder:e("workspaceSecret"),value:y,onChange:se=>_(se.target.value),disabled:h,autoComplete:"off"})]})]})})]}),v&&E.jsx("div",{className:"attachments-error",children:v})]}),n&&E.jsxs(E.Fragment,{children:[E.jsx("form",{id:"providers-form",className:"session-form",onSubmit:d,children:E.jsx("div",{className:"session-auth-options session-auth-accordion",children:["codex","claude"].map(se=>{const me=f(se),Ke=e(se==="codex"?"Codex":"Claude"),$e=!!p[se],Ye=!!me.enabled,bt=F&&Array.isArray(V)&&V.some(qe=>(Array.isArray(qe.providers)&&qe.providers.length?qe.providers:qe.activeProvider?[qe.activeProvider]:[]).includes(se)),Ci=h||bt&&Ye;return E.jsxs("div",{className:"session-auth-card",children:[E.jsx("div",{className:"session-auth-header",children:E.jsxs("label",{className:"session-auth-option",children:[E.jsx("input",{type:"checkbox",checked:Ye,onChange:()=>{if(bt&&Ye)return;const qe=!Ye;w(ut=>({...ut,[se]:qe})),S(ut=>({...ut,[se]:{...ut[se],enabled:qe}}))},disabled:Ci,title:bt&&Ye?e("Provider cannot be disabled: active sessions use it."):void 0}),Ke]})}),Ye&&$e?E.jsxs("div",{className:"session-auth-grid",children:[E.jsx("select",{value:x(se,me),onChange:qe=>S(ut=>({...ut,[se]:{...ut[se],authType:qe.target.value,authValue:""}})),disabled:h,children:(b[se]||[]).map(qe=>E.jsx("option",{value:qe,children:e(qe)},qe))}),x(se,me)==="auth_json_b64"?E.jsxs("div",{className:"session-auth-file",children:[E.jsx("input",{type:"file",accept:"application/json,.json",onChange:async qe=>{var ki;const ut=(ki=qe.target.files)==null?void 0:ki[0];if(!ut)return;const nu=await ut.text();S(zr=>({...zr,[se]:{...zr[se],authValue:nu}})),A(zr=>({...zr,[se]:ut.name})),qe.target.value=""},disabled:h}),C[se]?E.jsx("span",{className:"session-auth-file-name",children:C[se]}):null]}):E.jsx("input",{type:"password",placeholder:e("Key or token"),value:me.authValue,onChange:qe=>S(ut=>({...ut,[se]:{...ut[se],authValue:qe.target.value}})),disabled:h,autoComplete:"off"})]}):null]},se)})})}),v&&E.jsx("div",{className:"attachments-error",children:v})]}),i&&E.jsx(E.Fragment,{children:E.jsxs("div",{className:"workspace-created-card",children:[E.jsxs("div",{className:"workspace-created-row",children:[E.jsx("span",{className:"workspace-created-label",children:e("Workspace ID")}),E.jsx("span",{className:"workspace-created-value",children:(ae==null?void 0:ae.workspaceId)||ce}),E.jsx("button",{type:"button",className:"workspace-created-copy",onClick:()=>K("id",(ae==null?void 0:ae.workspaceId)||ce||""),"aria-label":e("Copy workspace ID"),children:E.jsx(Ne,{icon:q.id?Qh:ed})})]}),E.jsxs("div",{className:"workspace-created-row",children:[E.jsx("span",{className:"workspace-created-label",children:e("Workspace Secret")}),E.jsx("span",{className:"workspace-created-value",children:(ae==null?void 0:ae.workspaceSecret)||""}),E.jsx("button",{type:"button",className:"workspace-created-copy",onClick:()=>K("secret",(ae==null?void 0:ae.workspaceSecret)||""),"aria-label":e("Copy workspace secret"),children:E.jsx(Ne,{icon:q.secret?Qh:ed})})]})]})}),s&&E.jsxs("div",{className:"session-step",children:[E.jsxs("div",{className:"session-workspace-toggle",children:[E.jsxs("button",{type:"button",className:`session-workspace-option is-compact ${T==="new"?"is-selected":""}`,onClick:()=>{j("new"),M(!1),O("")},disabled:h,"aria-pressed":T==="new",children:[E.jsx("span",{className:"session-workspace-icon is-create","aria-hidden":"true",children:E.jsx(Ne,{icon:hc})}),E.jsx("span",{className:"session-workspace-option-title",children:e("New session")})]}),E.jsxs("button",{type:"button",className:`session-workspace-option is-compact ${T==="existing"?"is-selected":""}`,onClick:()=>{j("existing"),M(!1),O(""),z()},disabled:h,"aria-pressed":T==="existing",children:[E.jsx("span",{className:"session-workspace-icon is-join","aria-hidden":"true",children:E.jsx(Ne,{icon:__})}),E.jsx("span",{className:"session-workspace-option-title",children:e("Resume an existing session")})]}),$!=="mono_user"&&E.jsxs("button",{type:"button",className:"session-workspace-option is-compact",onClick:Y,children:[E.jsx("span",{className:"session-workspace-icon is-leave","aria-hidden":"true",children:E.jsx(Ne,{icon:Lb})}),E.jsx("span",{className:"session-workspace-option-title",children:e("Leave workspace")})]})]}),E.jsx("div",{className:`session-panel ${T==="existing"?"is-visible":"is-hidden"}`,"aria-hidden":T!=="existing",children:E.jsxs("div",{className:"session-auth",children:[E.jsx("div",{className:"session-auth-title",children:e("Existing sessions")}),X?E.jsx("div",{className:"session-auth-hint",children:e("Loading sessions...")}):V.length===0?E.jsx("div",{className:"session-auth-hint",children:e("No sessions available.")}):E.jsx("ul",{className:"session-list",children:V.map(se=>{const me=W(se.repoUrl),Ke=se.name||me||se.sessionId,$e=se.repoUrl?J(se.repoUrl,72):se.sessionId,Ye=se.lastActivityAt?new Date(se.lastActivityAt).toLocaleString(L):se.createdAt?new Date(se.createdAt).toLocaleString(L):"",bt=P===se.sessionId;return E.jsxs("li",{className:"session-item",children:[E.jsxs("div",{className:"session-item-meta",children:[E.jsx("div",{className:"session-item-title",children:Ke}),E.jsx("div",{className:"session-item-sub",children:$e}),Ye&&E.jsx("div",{className:"session-item-sub",children:e("Last activity: {{date}}",{date:Ye})})]}),E.jsxs("div",{className:"session-item-actions",children:[E.jsx("button",{type:"button",className:"session-list-button",onClick:()=>R(se.sessionId),disabled:h||bt,children:e("Resume")}),E.jsx("button",{type:"button",className:"session-list-button is-danger",onClick:()=>I(se),disabled:h||bt,children:e(bt?"Deleting...":"Delete")})]})]},se.sessionId)})}),N&&E.jsx("div",{className:"attachments-error",children:N})]})}),E.jsx("div",{className:`session-panel ${T==="new"?"is-visible":"is-hidden"}`,"aria-hidden":T!=="new",children:G?E.jsxs("div",{className:"session-hint",children:[e("Cloning repository..."),B&&E.jsx("div",{className:"session-meta",children:B})]}):E.jsxs("form",{id:"repo-form",className:"session-form session-form--compact",onSubmit:D,children:[E.jsxs("div",{className:"session-form-row is-compact-grid",children:[E.jsx("input",{type:"text",placeholder:e("Session name (optional)"),value:U,onChange:se=>H(se.target.value),disabled:h}),E.jsxs("div",{className:"session-repo-field",children:[E.jsx("input",{type:"text",placeholder:e("git@gitea.devops:my-org/my-repo.git"),value:ee,onChange:se=>{Z(se.target.value)},disabled:h,required:!0,list:de.length>0?"repo-history":void 0}),de.length>0&&E.jsx("datalist",{id:"repo-history",children:de.map(se=>E.jsx("option",{value:se,children:J(se,72)},se))})]})]}),E.jsxs("div",{className:"session-auth",children:[E.jsx("div",{className:"session-auth-title",children:e("Repository authentication (optional)")}),E.jsx("div",{className:"session-auth-options",children:E.jsxs("select",{value:ge,onChange:se=>ve(se.target.value),disabled:h,children:[E.jsx("option",{value:"none",children:e("None")}),E.jsx("option",{value:"ssh",children:e("Private SSH key (not recommended)")}),E.jsx("option",{value:"http",children:e("Username + password")})]})}),ge==="ssh"&&E.jsx(E.Fragment,{children:E.jsx("textarea",{className:"session-auth-textarea",placeholder:e("-----BEGIN OPENSSH PRIVATE KEY-----"),value:Ee,onChange:se=>ue(se.target.value),disabled:h,rows:6,spellCheck:!1})}),ge==="http"&&E.jsx(E.Fragment,{children:E.jsxs("div",{className:"session-auth-grid",children:[E.jsx("input",{type:"text",placeholder:e("Username"),value:Ae,onChange:se=>Fe(se.target.value),disabled:h,autoComplete:"username"}),E.jsx("input",{type:"password",placeholder:e("Password or PAT"),value:Re,onChange:se=>We(se.target.value),disabled:h,autoComplete:"current-password"})]})})]}),E.jsxs("div",{className:"session-auth session-auth-compact",children:[E.jsx("div",{className:"session-auth-title",children:e("Permissions")}),E.jsxs("div",{className:"session-auth-options session-auth-options--compact",children:[E.jsxs("label",{className:"session-auth-option",children:[E.jsx("input",{type:"checkbox",checked:ot,onChange:se=>{const me=se.target.checked;Oe(me),me||Ce(!1)},disabled:h}),e("Internet access")]}),ot&&E.jsxs("label",{className:"session-auth-option",children:[E.jsx("input",{type:"checkbox",checked:Pe,onChange:se=>Ce(se.target.checked),disabled:h}),e("Deny git credentials access")]})]})]})]})}),Q&&E.jsx("div",{className:"attachments-error",children:Q})]}),a&&E.jsxs("div",{className:"session-step",children:[E.jsxs("div",{className:"session-auth",children:[E.jsx("div",{className:"session-auth-title",children:e("Login required")}),E.jsx("div",{className:"session-auth-hint",children:e("Please use the console generated URL to login")})]}),v&&E.jsx("div",{className:"attachments-error",children:v})]})]}),E.jsx("div",{className:"session-footer",children:a?null:r?E.jsx("button",{type:"submit",form:"workspace-form",className:"session-button primary",disabled:h,children:e(ye?"Validating...":"Continue")}):n?E.jsxs(E.Fragment,{children:[E.jsx("button",{type:"button",className:"session-button secondary",onClick:()=>{if(ke===4){we(!1),re(4);return}re(1)},disabled:h,children:e("Back")}),E.jsx("button",{type:"submit",form:"providers-form",className:"session-button primary",disabled:h,children:e(ye?"Validating...":F?"Save":"Continue")})]}):i?E.jsx("button",{type:"button",className:"session-button primary",onClick:()=>re(4),disabled:h,children:e("Continue")}):s?T==="existing"?E.jsx("button",{type:"button",className:"session-button secondary session-footer-full",disabled:h,onClick:()=>{we(!0),Ve(""),Me(4),Lt(),z(),re(2)},children:e("AI providers")}):E.jsxs(E.Fragment,{children:[E.jsx("button",{type:"button",className:"session-button secondary",disabled:h,onClick:()=>{we(!0),Ve(""),Me(4),Lt(),z(),re(2)},children:e("AI providers")}),E.jsx("button",{type:"submit",form:"repo-form",className:"session-button primary",disabled:h,children:e(oe?"Loading...":"Clone")})]}):null})]}),E.jsx("aside",{className:"session-info",children:E.jsxs("div",{className:"session-info-card",children:[E.jsxs("div",{className:"session-info-title",children:[E.jsx("span",{className:"session-info-icon","aria-hidden":"true",children:"ℹ️"}),te.title]}),(le=te.paragraphs)==null?void 0:le.map(se=>E.jsx("p",{children:se},se)),te.securityLink?E.jsxs("p",{children:[e("Vibe80 strictly controls access to resources (Git credentials and internet) using sandboxing. "),E.jsx("a",{className:"session-info-link",href:"https://vibe80.ai/security",target:"_blank",rel:"noreferrer",children:e("Click here to learn more.")})]}):null]})})]}),ne&&E.jsx("div",{className:"toast-container",children:E.jsx("div",{className:`toast is-${ne.type||"success"}`,children:ne.message})})]})}const FF="/assets/vibe80_dark-D7OVPKcU.svg",zF="/assets/vibe80_light-BJK37ybI.svg",$F=k.lazy(()=>bs(()=>import("./ExplorerPanel-BtlyAT00.js"),[])),HF=k.lazy(()=>bs(()=>import("./DiffPanel-C_IGzKI5.js"),[])),UF=k.lazy(()=>bs(()=>import("./TerminalPanel-C3fc1HbK.js"),[])),WF=k.lazy(()=>bs(()=>import("./SettingsPanel-b9B7ygP_.js"),[])),VF=k.lazy(()=>bs(()=>import("./LogsPanel-BW79JWzR.js"),[])),KF=()=>new URLSearchParams(window.location.search).get("session"),GF=()=>new URLSearchParams(window.location.search).get("repository"),Mf=()=>{if(KF())return"";const t=GF();return(t?t.trim():"")||""},qF=e=>{if(!e)return"";try{const t=new TextEncoder().encode(e);let r="";return t.forEach(n=>{r+=String.fromCharCode(n)}),btoa(r)}catch{return btoa(e)}},EC={codex:["api_key","auth_json_b64"],claude:["api_key","setup_token"]},F0=(e,t)=>{const r=EC[e]||[];return r.length?r.includes(t==null?void 0:t.authType)?t.authType:r[0]:(t==null?void 0:t.authType)||"api_key"},AC=e=>{const t=e==null?void 0:e.trim();return t?t.startsWith("{")&&t.endsWith("}")?t.slice(1,-1).trim():t:""},YF=e=>e?e.split(/\r?\n/).map(t=>t.trim()).filter(Boolean).map(t=>{const r=t.split("::"),[n,i,s,...a]=r,o=(n||"").trim().toLowerCase(),l=(i||"").trim(),c=(s||"").trim();if(!o||!l||!c)return null;if(o==="radio"||o==="select"){const h=a.map(u=>u.trim()).filter(Boolean);return{type:o,id:l,label:c,choices:h}}if(o==="checkbox"){const u=a.join("::").trim()==="1";return{type:o,id:l,label:c,defaultChecked:u}}if(o==="input"||o==="textarea"){const h=a.join("::").trim();return{type:o,id:l,label:c,defaultValue:h}}return null}).filter(Boolean):[],JF=(e,t=r=>r)=>{const r=/<!--\s*vibe80:(choices|form)\s*([^>]*)-->([\s\S]*?)<!--\s*\/vibe80:\1\s*-->|<!--\s*vibe80:yesno\s*([^>]*)-->/g,n=/<!--\s*vibe80:fileref\s+([^>]+?)\s*-->/g,i=/<!--\s*vibe80:task\s*[^>]*-->/g,s=[],a=[],o=String(e||"").replace(n,(u,m)=>{const g=String(m||"").trim();return g&&a.push(g),""}).replace(i,"");let l="",c=0,h;for(;(h=r.exec(o))!==null;){l+=o.slice(c,h.index),c=h.index+h[0].length;const u=h[1],m=AC(h[2]||h[4]),g=h[3]||"";if(!u){s.push({type:"yesno",question:m,choices:[t("Yes"),t("No")]});continue}if(u==="choices"){const _=g.split(/\r?\n/).map(v=>v.trim()).filter(Boolean);_.length&&s.push({type:"choices",question:m,choices:_});continue}const y=YF(g);y.length&&s.push({type:"form",question:m,fields:y})}return s.length?(l+=o.slice(c),{cleanedText:l.trim(),blocks:s,filerefs:a}):{cleanedText:o,blocks:[],filerefs:a}},XF=e=>{const t=/<!--\s*vibe80:task\s*([^>]*)-->/g,r=String(e||"");let n="",i;for(;(i=t.exec(r))!==null;){const s=AC(i[1]);s&&(n=s)}return n},QF=e=>{const t=String(e||"");return t?t.split(/\r?\n/)[0].trim():""},z0=async e=>{var r;if(!e)return;if((r=navigator==null?void 0:navigator.clipboard)!=null&&r.writeText)try{await navigator.clipboard.writeText(e);return}catch{}const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)},ZF=1024,ez=5,tz=140,rz=60,LC="repoHistory",PC="authMode",TC="openAiAuthMode",DC="llmProvider",IC="llmProviders",NC="chatCommandsVisible",RC="toolResultsVisible",OC="notificationsEnabled",MC="themeMode",jC="composerInputMode",BC="debugMode",nz=10,iz=new Set(["png","jpg","jpeg","gif","webp","bmp","svg","avif"]),fl=(e,t)=>e?e.length<=t?e:`${e.slice(0,t)}…`:"",Ko=e=>{if(!e)return"";if(typeof e=="string"){const t=e.split("/");return t[t.length-1]||e}if(e.name)return e.name;if(e.path){const t=e.path.split("/");return t[t.length-1]||e.path}return""},sz=(e,t=r=>r)=>{const r=Ko(e);if(!r||!r.includes("."))return t("FILE");const n=r.split(".").pop();return n?n.toUpperCase():t("FILE")},oz=(e,t=r=>r)=>{if(!Number.isFinite(e))return"";if(e<1024)return t("{{count}} B",{count:e});const r=e/1024;if(r<1024)return t("{{count}} KB",{count:Math.round(r)});const n=r/1024;return t("{{count}} MB",{count:n.toFixed(1)})},mn=e=>Array.isArray(e)?e.map(t=>{if(!t)return null;if(typeof t=="string")return{name:Ko(t),path:t};if(typeof t=="object"){const r=t.name||Ko(t.path);return{...t,name:r}}return null}).filter(Boolean):[],az=e=>{var n;const t=Ko(e);if(!t||!t.includes("."))return!1;const r=(n=t.split(".").pop())==null?void 0:n.toLowerCase();return iz.has(r)},lz=()=>{try{const e=localStorage.getItem(LC);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(r=>typeof r=="string").map(r=>r.trim()).filter(Boolean):[]}catch{return[]}},cz=()=>{try{const e=localStorage.getItem(PC);if(e==="ssh"||e==="http"||e==="none")return e}catch{}return"none"},uz=()=>{try{const e=localStorage.getItem(TC);if(e==="apiKey"||e==="authFile")return e}catch{}return"apiKey"},fz=()=>{try{const e=localStorage.getItem(NC);if(e==="true"||e==="false")return e==="true"}catch{}return!0},hz=()=>{try{const e=localStorage.getItem(RC);if(e==="true"||e==="false")return e==="true"}catch{}return!1},dz=()=>{try{const e=localStorage.getItem(OC);if(e==="true"||e==="false")return e==="true"}catch{}return!0},pz=()=>{try{const e=localStorage.getItem(MC);if(e==="light"||e==="dark")return e}catch{}return"light"},mz=()=>{try{const e=localStorage.getItem(jC);if(e==="single"||e==="multi")return e}catch{}return"single"},gz=()=>{try{const e=localStorage.getItem(BC);if(e==="true"||e==="false")return e==="true"}catch{}return!1},ro=()=>{try{const e=localStorage.getItem(DC);if(e==="codex"||e==="claude")return e}catch{}return"codex"},vz=()=>{try{const e=localStorage.getItem(IC);if(!e)return[ro()];const t=JSON.parse(e);if(!Array.isArray(t))return[ro()];const r=t.filter(n=>n==="codex"||n==="claude");return r.length?r:[ro()]}catch{}return[ro()]},_z=(e,t)=>{const r=t.trim();if(!r)return e;const n=[r,...e.filter(i=>i!==r)].slice(0,nz);return n.length===e.length&&n.every((i,s)=>i===e[s])?e:n},yz=(e,t,r)=>{const n=new Blob([t],{type:r}),i=URL.createObjectURL(n),s=document.createElement("a");s.href=i,s.download=e,document.body.appendChild(s),s.click(),s.remove(),URL.revokeObjectURL(i)},wz=(e,t)=>{const r=e||"chat",n=new Date().toISOString().replace(/[:.]/g,"-");return`${r}-${n}.${t}`},hl=e=>{if(!e)return"";const n=e.trim().replace(/\/+$/,"").split(/[?#]/)[0].match(/([^/:]+)$/);return n?n[1]:""},bz=e=>{if(!e)return"plaintext";if((e.split("/").pop()||"").toLowerCase()==="dockerfile")return"dockerfile";const r=e.toLowerCase().match(/\.([a-z0-9]+)$/);switch(r?r[1]:""){case"js":case"cjs":case"mjs":return"javascript";case"jsx":return"javascript";case"ts":return"typescript";case"tsx":return"typescript";case"json":return"json";case"md":case"markdown":return"markdown";case"css":return"css";case"scss":return"scss";case"less":return"less";case"html":case"htm":return"html";case"yml":case"yaml":return"yaml";case"sh":case"bash":case"zsh":return"shell";case"py":return"python";case"go":return"go";case"java":return"java";case"c":return"c";case"cc":case"cpp":case"cxx":case"hpp":case"h":return"cpp";case"rs":return"rust";case"rb":return"ruby";case"php":return"php";case"sql":return"sql";case"toml":return"toml";case"xml":return"xml";case"dockerfile":return"dockerfile";default:return"plaintext"}},Sz=(e,t=r=>r)=>e==="codex"?t("Codex"):e==="claude"?t("Claude"):e||"";function Cz(){const{t:e,language:t,setLanguage:r,locale:n}=xC(),[i,s]=k.useState([]),[a,o]=k.useState(""),[l,c]=k.useState(()=>e("Connecting...")),[h,u]=k.useState(!1),[m,g]=k.useState(!1),[y,_]=k.useState(""),[v,d]=k.useState(!1),[f,p]=k.useState(null),[w,S]=k.useState(Mf),[b,x]=k.useState(Mf),[C,A]=k.useState(""),[T,j]=k.useState(null),[M,O]=k.useState(cz),[z,$]=k.useState(""),[Y,X]=k.useState(""),[V,N]=k.useState(""),[P,R]=k.useState("new"),[I,L]=k.useState(!0),[W,J]=k.useState(!1),[G,B]=k.useState(null),[D,U]=k.useState(ro),[H,ee]=k.useState(vz),[Z,de]=k.useState(!1),[ge,ve]=k.useState(uz),[Ee,ue]=k.useState(null),[Ae,Fe]=k.useState(""),[Re,We]=k.useState(""),[ot,Oe]=k.useState(!1),[Pe,Ce]=k.useState(null),[Q,oe]=k.useState(!1),[ye,F]=k.useState(null),[ke,re]=k.useState(""),[we,Ve]=k.useState(!1),[Me,Lt]=k.useState(!1),[ae,ce]=k.useState(!1),[q,K]=k.useState(()=>!!Mf()),[te,ne]=k.useState(fz),[le,se]=k.useState(hz),[me,Ke]=k.useState(dz),[$e,Ye]=k.useState(pz),[bt,Ci]=k.useState(mz),qe=k.useRef(null),ut=k.useCallback((ie,_e="success")=>{B({message:ie,type:_e}),qe.current&&clearTimeout(qe.current),qe.current=setTimeout(()=>{B(null),qe.current=null},3e3)},[]);k.useEffect(()=>()=>{qe.current&&(clearTimeout(qe.current),qe.current=null)},[]);const[nu,ki]=k.useState({main:"chat"}),zr=k.useRef(null),ca=k.useRef(null),FC=k.useRef(null),zC=k.useRef(null),sm=k.useMemo(()=>({tree:null,loading:!1,error:"",treeTruncated:!1,treeTotal:0,openTabPaths:[],activeFilePath:null,filesByPath:{},selectedPath:null,selectedType:null,renamingPath:null,renameDraft:"",deletingPath:null,fileContent:"",draftContent:"",fileLoading:!1,fileSaving:!1,fileError:"",fileSaveError:"",fileTruncated:!1,fileBinary:!1,editMode:!1,isDirty:!1,statusByPath:{},statusLoading:!1,statusError:"",statusLoaded:!1,expandedPaths:[]}),[]),[iu,$C]=k.useState({}),[HC,om]=k.useState(null),[UC,Es]=k.useState([]),[ua,su]=k.useState(!0),[WC,ou]=k.useState({main:"all"}),[am,lm]=k.useState(!1),[cm,VC]=k.useState(null),[fa,um]=k.useState(!0),fm=k.useRef({}),[KC,GC]=k.useState(""),qC=k.useRef(new Map),YC=ie=>{var _e;if(!(ie!=null&&ie.type))return"";if(ie.type==="commandExecution"){const Te=((_e=ie.commandActions)==null?void 0:_e.command)||ie.command||e("Command");return e("Command: {{command}}",{command:Te})}return ie.type==="fileChange"?e("Applying changes..."):ie.type==="mcpToolCall"?e("Tool: {{tool}}",{tool:ie.tool}):ie.type==="reasoning"?e("Reasoning..."):ie.type==="agentMessage"?e("Generating response..."):""},{commandPanelOpen:JC,setCommandPanelOpen:au,toolResultPanelOpen:XC,setToolResultPanelOpen:lu}=Y7(),[hm,QC]=k.useState(()=>lz()),[ha,ZC]=k.useState(()=>gz()),ar=k.useRef(null),dm=k.useRef(!0),da=k.useRef(null),pa=k.useRef(null),pm=k.useRef(null),{toolbarExportOpen:ek,setToolbarExportOpen:ma,toolbarExportRef:tk}=q7(),mm=k.useRef(null),gm=k.useRef(null),vm=k.useRef(null),rk=k.useRef(null),nk=k.useRef(null),ik=k.useRef(null),sk=k.useRef(null),ok=k.useRef(null),ak=k.useRef(null),lk=k.useRef(null),ck=k.useRef(0),uk=k.useRef(!1),fk=k.useRef(null),hk=k.useRef(0),ga=k.useRef([]),{apiFetch:Jt,deploymentMode:_m,handleDeleteSession:dk,handleLeaveWorkspace:ym,handleWorkspaceCopy:pk,handleWorkspaceProvidersSubmit:mk,handleWorkspaceSubmit:gk,loadWorkspaceProviders:vk,loadWorkspaceSessions:_k,providersBackStep:yk,setProvidersBackStep:wk,setWorkspaceAuthExpanded:bk,setWorkspaceAuthFiles:Sk,setWorkspaceError:wm,setWorkspaceIdInput:Ck,setWorkspaceMode:bm,setWorkspaceProviders:kk,setWorkspaceProvidersEditing:xk,setWorkspaceSecretInput:Ek,setWorkspaceStep:Ak,setWorkspaceToken:Lk,workspaceAuthExpanded:Pk,workspaceAuthFiles:Tk,workspaceBusy:Sm,workspaceCopied:Dk,workspaceCreated:Ik,workspaceError:Nk,workspaceId:Rk,workspaceIdInput:Ok,workspaceMode:Mk,workspaceProviders:jk,workspaceProvidersEditing:Bk,workspaceSecretInput:Fk,workspaceSessionDeletingId:zk,workspaceSessions:$k,workspaceSessionsError:Hk,workspaceSessionsLoading:Uk,workspaceStep:va,workspaceToken:$r}=E7({t:e,encodeBase64:qF,copyTextToClipboard:z0,extractRepoName:hl,setSessionMode:R,showToast:ut,getProviderAuthType:F0}),{handoffOpen:Wk,handoffQrDataUrl:Cm,handoffLoading:cu,handoffError:km,handoffRemaining:uu,requestHandoffQr:xm,closeHandoffQr:Em}=H7({t:e,apiFetch:Jt,attachmentSessionId:f==null?void 0:f.sessionId}),{gitIdentityName:Vk,gitIdentityEmail:Kk,gitIdentityGlobal:Gk,gitIdentityRepo:qk,gitIdentityLoading:Yk,gitIdentitySaving:Jk,gitIdentityError:Xk,gitIdentityMessage:Qk,setGitIdentityName:Zk,setGitIdentityEmail:e2,handleSaveGitIdentity:t2}=U7({t:e,apiFetch:Jt,attachmentSessionId:f==null?void 0:f.sessionId}),_a=k.useMemo(()=>new Map,[]),fu=k.useMemo(()=>new Map,[]),As=k.useMemo(()=>hl(f==null?void 0:f.repoUrl),[f==null?void 0:f.repoUrl]),Am=$e==="dark"?FF:zF,Lm=k.useMemo(()=>{const ie=[];return Q&&ie.push("codex"),Me&&ie.push("claude"),ie},[Q,Me]),Ls=k.useMemo(()=>H.filter(ie=>Lm.includes(ie)),[H,Lm]);k.useEffect(()=>{ga.current=i},[i]),k.useEffect(()=>{fm.current=iu},[iu]),k.useEffect(()=>{dm.current=ua},[ua]);const{attachmentPreview:Ps,attachmentsError:Pm,attachmentsLoading:Tm,draftAttachments:Ts,renderMessageAttachments:r2,setAttachmentPreview:Dm,setAttachmentsError:ya,setAttachmentsLoading:hu,setDraftAttachments:Ds}=M7({attachmentSessionId:f==null?void 0:f.sessionId,workspaceToken:$r,normalizeAttachments:mn,isImageAttachment:az,getAttachmentName:Ko,attachmentIcon:E.jsx(Ne,{icon:GD}),t:e}),Im=k.useMemo(()=>f!=null&&f.sessionId?`choices:${f.sessionId}`:null,[f==null?void 0:f.sessionId,Jt]),{choiceSelections:n2,setChoiceSelections:i2,activeForm:wa,activeFormValues:Nm,openVibe80Form:s2,closeVibe80Form:du,updateActiveFormValue:Is,submitActiveForm:o2,handleChoiceClick:a2}=W7({choicesKey:Im,input:a,setInput:o,handleSendMessageRef:zr,draftAttachments:Ts,setDraftAttachments:Ds});V7({authMode:M,llmProvider:D,selectedProviders:H,openAiAuthMode:ge,showChatCommands:te,showToolResults:le,notificationsEnabled:me,themeMode:$e,composerInputMode:bt,repoHistory:hm,debugMode:ha,setLlmProvider:U,setOpenAiLoginError:We,setClaudeLoginError:re,AUTH_MODE_KEY:PC,LLM_PROVIDER_KEY:DC,LLM_PROVIDERS_KEY:IC,OPENAI_AUTH_MODE_KEY:TC,CHAT_COMMANDS_VISIBLE_KEY:NC,TOOL_RESULTS_VISIBLE_KEY:RC,NOTIFICATIONS_ENABLED_KEY:OC,THEME_MODE_KEY:MC,COMPOSER_INPUT_MODE_KEY:jC,REPO_HISTORY_KEY:LC,DEBUG_MODE_KEY:BC}),k.useMemo(()=>{const ie=[];return(i||[]).forEach(_e=>{if((_e==null?void 0:_e.role)==="commandExecution"){const Te=ie[ie.length-1];(Te==null?void 0:Te.groupType)==="commandExecution"?Te.items.push(_e):ie.push({groupType:"commandExecution",id:`command-group-${_e.id}`,items:[_e]});return}ie.push(_e)}),ie},[i]);const{isMobileLayout:cn}=K7({themeMode:$e,setSideOpen:lm}),{applyMessages:l2,mergeAndApplyMessages:c2}=n9({normalizeAttachments:mn,messageIndex:_a,commandIndex:fu,messagesRef:ga,setMessages:s,setCommandPanelOpen:au,setToolResultPanelOpen:lu}),{activeWorktreeId:Ge,activeWorktreeIdRef:Rm,applyWorktreesList:u2,closeWorktree:f2,createWorktree:h2,handleSelectWorktree:d2,loadMainWorktreeSnapshot:pu,requestWorktreeMessages:p2,requestWorktreesList:m2,renameWorktreeHandler:g2,setActiveWorktreeId:Om,setWorktrees:mr,worktrees:ba}=A7({apiFetch:Jt,attachmentSessionId:f==null?void 0:f.sessionId,availableProviders:Ls,llmProvider:D,messagesRef:ga,normalizeAttachments:mn,applyMessages:l2,socketRef:ar,setPaneByTab:ki,setLogFilterByTab:ou,showToast:ut,t:e}),{logFilter:v2,setLogFilter:_2,scopedRpcLogs:y2,filteredRpcLogs:w2}=G7({rpcLogs:UC,activeWorktreeId:Ge,locale:n,logFilterByTab:WC,setLogFilterByTab:ou}),{ensureNotificationPermission:b2,maybeNotify:S2,lastNotifiedIdRef:C2}=I7({notificationsEnabled:me,t:e}),Sa=k.useRef(()=>{}),k2=k.useCallback((...ie)=>{var _e;return(_e=Sa.current)==null?void 0:_e.call(Sa,...ie)},[]),{branches:x2,branchError:E2,branchLoading:A2,currentBranch:Kn,defaultBranch:Mm,loadBranches:jm,loadProviderModels:L2,modelError:P2,modelLoading:T2,models:Bm,providerModelState:D2,selectedModel:I2,selectedReasoningEffort:Fm,setModelError:Ns,setModelLoading:Rs,setModels:N2,setProviderModelState:R2,setSelectedModel:mu,setSelectedReasoningEffort:O2}=F7({apiFetch:Jt,attachmentSessionId:f==null?void 0:f.sessionId,llmProvider:D,loadRepoLastCommit:k2,processing:h,socketRef:ar,t:e}),{currentDiff:M2,diffFiles:j2,diffStatusLines:B2,hasCurrentChanges:F2,untrackedFilePanels:z2,untrackedLoading:$2,loadRepoLastCommit:Os,loadWorktreeLastCommit:gu,repoLastCommit:Ca,requestRepoDiff:ka,requestWorktreeDiff:xa,setRepoDiff:Ea,setRepoLastCommit:H2,setWorktreeLastCommitById:U2,worktreeLastCommitById:vu}=O7({apiFetch:Jt,attachmentSessionId:f==null?void 0:f.sessionId,currentBranch:Kn,activeWorktreeId:Ge,parseDiff:U4,setWorktrees:mr,worktrees:ba,t:e});k.useEffect(()=>{Sa.current=Os},[Os]);const Xe=Ge&&Ge!=="main",Se=Xe?ba.get(Ge):null,Hr=Xe?Se==null?void 0:Se.provider:D,zm=Xe?Se==null?void 0:Se.model:I2,Lr=Ge||"main",$m=Xe?Array.isArray(Se==null?void 0:Se.models)?Se.models:[]:Array.isArray(Bm)?Bm:[],Hm=Xe?!!(Se!=null&&Se.modelLoading):!!T2,W2=Xe?(Se==null?void 0:Se.modelError)||"":P2,Gn=Xe&&!Se?[]:Se?Se.messages:i,V2=Array.isArray(Gn)&&Gn.length>0,vt=nu[Ge]||"chat",Um=iu[Ge]||sm,{handleResumeSession:K2,onRepoSubmit:G2}=$7({t:e,apiFetch:Jt,workspaceToken:$r,handleLeaveWorkspace:ym,repoUrl:w,setRepoUrl:S,repoInput:b,sessionNameInput:C,repoAuth:T,setRepoAuth:j,authMode:M,sshKeyInput:z,httpUsername:Y,httpPassword:V,sessionMode:P,sessionRequested:q,setSessionRequested:K,defaultInternetAccess:I,defaultDenyGitCredentialsAccess:W,attachmentSession:f,setAttachmentSession:p,setAttachmentsLoading:hu,setAttachmentsError:ya,setWorkspaceToken:Lk,setWorkspaceMode:bm,setWorkspaceError:wm,setOpenAiLoginPending:Oe,setOpenAiLoginRequest:Ce}),_u=Um.statusByPath||{},q2=k.useMemo(()=>{const ie={},_e=(Te,ze)=>{if(!Te)return;const _t=ie[Te];if(_t!=="untracked"){if(ze==="untracked"){ie[Te]="untracked";return}_t||(ie[Te]=ze)}};return Object.entries(_u).forEach(([Te,ze])=>{if(!Te)return;const _t=Te.split("/").filter(Boolean);if(!(_t.length<=1))for(let Pt=0;Pt<_t.length-1;Pt+=1){const qn=_t.slice(0,Pt+1).join("/");_e(qn,ze)}}),ie},[_u]),{resyncSession:Y2}=t9({attachmentSessionId:f==null?void 0:f.sessionId,apiFetch:Jt,llmProvider:D,setLlmProvider:U,setSelectedProviders:ee,setOpenAiReady:oe,setClaudeReady:Lt,setRepoDiff:Ea,setRpcLogsEnabled:su,setRpcLogs:Es,setTerminalEnabled:um,loadMainWorktreeSnapshot:pu}),{requestMessageSync:J2}=r9({socketRef:ar,messagesRef:ga});_7({attachmentSessionId:f==null?void 0:f.sessionId,workspaceToken:$r,socketRef:ar,reconnectTimerRef:lk,reconnectAttemptRef:ck,closingRef:uk,pingIntervalRef:fk,lastPongRef:hk,messageIndex:_a,commandIndex:fu,rpcLogsEnabledRef:dm,mergeAndApplyMessages:c2,requestMessageSync:J2,requestWorktreesList:m2,requestWorktreeMessages:p2,applyWorktreesList:u2,resyncSession:Y2,t:e,setStatus:c,setConnected:d,setAppServerReady:ce,setHasMainWorktreeStatus:g,setMessages:s,setProcessing:u,setActivity:_,setCurrentTurnId:om,setMainTaskLabel:GC,setModelLoading:Rs,setModelError:Ns,setModels:N2,setProviderModelState:R2,setSelectedModel:mu,setSelectedReasoningEffort:O2,setRepoDiff:Ea,setRpcLogs:Es,setWorktrees:mr,setPaneByTab:ki,setLogFilterByTab:ou,setActiveWorktreeId:Om,activeWorktreeIdRef:Rm,extractVibe80Task:XF,extractFirstLine:QF,getItemActivityLabel:YC,maybeNotify:S2,normalizeAttachments:mn,loadRepoLastCommit:Os,loadBranches:jm,loadWorktreeLastCommit:gu,openAiLoginRequest:Pe,setOpenAiLoginRequest:Ce,connected:v});const Wm=k.useCallback((ie="main")=>{const _e=ar.current;!_e||_e.readyState!==WebSocket.OPEN||(ie==="main"?(Rs(!0),Ns("")):mr(Te=>{const ze=new Map(Te),_t=ze.get(ie);return _t?(ze.set(ie,{..._t,modelLoading:!0,modelError:""}),ze):Te}),_e.send(JSON.stringify({type:"model_list",worktreeId:ie})))},[Ns,Rs,mr,ar]),X2=k.useCallback(ie=>{const _e=ar.current;if(!_e||_e.readyState!==WebSocket.OPEN)return;const Te=ie||null;Lr==="main"?(mu(Te||""),Rs(!0),Ns("")):mr(ze=>{const _t=new Map(ze),Pt=_t.get(Lr);return Pt?(_t.set(Lr,{...Pt,model:Te,modelLoading:!0,modelError:""}),_t):ze}),_e.send(JSON.stringify({type:"model_set",worktreeId:Lr,model:Te,reasoningEffort:Lr==="main"?Fm||null:(Se==null?void 0:Se.reasoningEffort)??null}))},[Lr,Se==null?void 0:Se.reasoningEffort,Fm,Ns,Rs,mu,mr,ar]);D7({activePane:vt,activeWorktreeId:Ge,attachmentSessionId:f==null?void 0:f.sessionId,terminalEnabled:fa,terminalContainerRef:vm,terminalDisposableRef:ik,terminalFitRef:nk,terminalRef:rk,terminalSessionRef:ok,terminalSocketRef:sk,terminalWorktreeRef:ak,themeMode:$e,workspaceToken:$r}),k.useEffect(()=>{typeof(f==null?void 0:f.terminalEnabled)=="boolean"&&um(f.terminalEnabled)},[f==null?void 0:f.terminalEnabled]),k.useEffect(()=>{ce(!1)},[f==null?void 0:f.sessionId]),k.useEffect(()=>{!v||!(f!=null&&f.sessionId)||Hr!=="codex"&&Hr!=="claude"||Xe&&(Se==null?void 0:Se.status)!=="ready"||!Xe&&Hr==="codex"&&!ae||Wm(Lr)},[Lr,Se==null?void 0:Se.status,Hr,ae,f==null?void 0:f.sessionId,v,Xe,Wm]),k.useEffect(()=>{if(!(f!=null&&f.sessionId))return;pu(),Ea(f.repoDiff||{status:"",diff:""});const ie=typeof f.rpcLogsEnabled=="boolean"?f.rpcLogsEnabled:!0;su(ie),Es(ie?f.rpcLogs||[]:[]),c(e("Connecting...")),d(!1),g(!1)},[f==null?void 0:f.sessionId,pu,_a,e]),k.useEffect(()=>{if(f!=null&&f.sessionId){const ie=(f==null?void 0:f.name)||As||e("Session");document.title=`vibe80 - ${ie}`}else document.title="vibe80"},[f==null?void 0:f.sessionId,f==null?void 0:f.name,As,e]),k.useEffect(()=>{typeof(f==null?void 0:f.defaultInternetAccess)=="boolean"&&L(f.defaultInternetAccess)},[f==null?void 0:f.defaultInternetAccess]),k.useEffect(()=>{typeof(f==null?void 0:f.defaultDenyGitCredentialsAccess)=="boolean"&&J(f.defaultDenyGitCredentialsAccess)},[f==null?void 0:f.defaultDenyGitCredentialsAccess]),k.useEffect(()=>{if(!(f!=null&&f.defaultProvider)&&!(f!=null&&f.providers))return;const ie=Array.isArray(f.providers)?f.providers.filter(_e=>_e==="codex"||_e==="claude"):[];ie.length?(ee(ie),oe(ie.includes("codex")),Lt(ie.includes("claude"))):f.defaultProvider&&(ee([f.defaultProvider]),oe(f.defaultProvider==="codex"),Lt(f.defaultProvider==="claude")),f.defaultProvider&&f.defaultProvider!==D&&U(f.defaultProvider)},[f==null?void 0:f.defaultProvider,f==null?void 0:f.providers]),k.useEffect(()=>{f!=null&&f.repoUrl&&QC(ie=>_z(ie,f.repoUrl))},[f==null?void 0:f.repoUrl]),l9({attachmentSessionId:f==null?void 0:f.sessionId,socketRef:ar,availableProviders:Ls,llmProvider:D,providerSwitching:Z,processing:h,setProviderSwitching:de,setStatus:c,setSelectedProviders:ee,setLlmProvider:U,t:e});const{commandMenuOpen:Q2,setCommandMenuOpen:Vm,setCommandQuery:Z2,commandSelection:ex,filteredCommands:tx,isDraggingAttachments:rx,handleInputChange:nx,handleComposerKeyDown:ix,onSubmit:sx,onUploadAttachments:ox,onPasteAttachments:ax,onDragOverComposer:lx,onDragEnterComposer:cx,onDragLeaveComposer:ux,onDropAttachments:fx,removeDraftAttachment:hx,triggerAttachmentPicker:dx,captureScreenshot:px}=v7({t:e,input:a,setInput:o,inputRef:pa,composerInputMode:bt,handleSendMessageRef:zr,attachmentSession:f,apiFetch:Jt,normalizeAttachments:mn,setDraftAttachments:Ds,draftAttachments:Ts,setAttachmentsLoading:hu,setAttachmentsError:ya,showToast:ut,uploadInputRef:pm,attachmentsLoading:Tm,conversationRef:mm,composerRef:gm,isMobileLayout:cn}),{sendMessage:Km,sendCommitMessage:mx,sendWorktreeMessage:Gm}=u9({input:a,setInput:o,setMessages:s,setDraftAttachments:Ds,socketRef:ar,connected:v,normalizeAttachments:mn,draftAttachments:Ts,setWorktrees:mr,setProcessing:u,setActivity:_,processingLabel:e("Processing..."),handleSendMessageRef:zr,ensureNotificationPermission:b2}),qm=Mm||Kn||"main",{openCloseConfirm:gx,closeCloseConfirm:yu,handleConfirmMerge:vx,handleConfirmDelete:_x}=i9({closeConfirm:cm,setCloseConfirm:VC,setActiveWorktreeId:Om,activeWorktreeIdRef:Rm,closeWorktree:f2,sendWorktreeMessage:Gm,mergeTargetBranch:qm,t:e});k.useEffect(()=>{da.current&&(da.current.scrollTop=da.current.scrollHeight)},[Gn,h,Ge]);const yx=k.useMemo(()=>{const ie={id:"main",name:Kn||"Main",branchName:Kn||"main",provider:D,status:h?"processing":v?m?"ready":"processing":"creating",color:"#6b7280",messages:i},_e=Array.from(ba.values());return[ie,..._e]},[Kn,D,h,v,m,i,ba]),wx=k.useMemo(()=>{const ie=[];return(Gn||[]).forEach(_e=>{if((_e==null?void 0:_e.role)==="commandExecution"){if(!te)return;const Te=ie[ie.length-1];(Te==null?void 0:Te.groupType)==="commandExecution"?Te.items.push(_e):ie.push({groupType:"commandExecution",id:`command-group-${_e.id}`,items:[_e]});return}if((_e==null?void 0:_e.role)==="tool_result"){if(!le)return;const Te=ie[ie.length-1];(Te==null?void 0:Te.groupType)==="toolResult"?Te.items.push(_e):ie.push({groupType:"toolResult",id:`tool-result-group-${_e.id}`,items:[_e]});return}ie.push(_e)}),ie},[Gn,te,le]),{setShowOlderMessagesByTab:bx,collapsedMessages:Sx}=e9({activeChatKey:Lr,displayedGroupedMessages:wx,CHAT_COLLAPSE_THRESHOLD:tz,CHAT_COLLAPSE_VISIBLE:rz}),un=Xe?vu.get(Ge):Ca,Ym=Xe?(Se==null?void 0:Se.branchName)||(Se==null?void 0:Se.name)||"":Kn||(Ca==null?void 0:Ca.branch)||"",Jm=typeof(un==null?void 0:un.sha)=="string"?un.sha.slice(0,7):"",Cx=Xe?!!(Se!=null&&Se.internetAccess):!!I,kx=Xe?(Se==null?void 0:Se.denyGitCredentialsAccess)===!1:W===!1,Xm=Sz(Hr,e),Qm=zm||e("Default model"),xx=!!(Xm&&Qm),Ex=As||e("Repository"),Ax=!cn&&vt==="chat"&&!!(Ym&&Jm&&(un!=null&&un.message)),Lx=(Se==null?void 0:Se.status)==="processing",Zm=(Se==null?void 0:Se.status)==="stopped",Ms=Xe?Lx:h,js=Ms||Xe&&Zm,Px=Xe?(Se==null?void 0:Se.activity)||"":y,Tx=Ms?Xe?Se==null?void 0:Se.taskLabel:KC:"",eg=Xe?Se==null?void 0:Se.currentTurnId:HC,Dx=Ms&&!!eg,tg=Hr!=="codex"?!0:Xe?(Se==null?void 0:Se.status)==="ready":ae,Ix=Hr==="codex"||Hr==="claude",Nx=!v||js||Hm||!$m.length,Rx=zm||"",{handleViewSelect:Aa,handleOpenSettings:rg,handleSettingsBack:Ox}=J7({activePane:vt,activeWorktreeId:Ge,debugMode:ha,rpcLogsEnabled:ua,terminalEnabled:fa,setPaneByTab:ki,setToolbarExportOpen:ma,lastPaneByTabRef:qC}),{addToBacklog:Mx,backlog:La,editBacklogItem:jx,launchBacklogItem:Bx,markBacklogItemDone:Fx,removeFromBacklog:zx,setBacklogMessagePage:$x}=j7({attachmentSessionId:f==null?void 0:f.sessionId,apiFetch:Jt,normalizeAttachments:mn,sendMessage:Km,setInput:o,setMessages:s,setWorktrees:mr,setDraftAttachments:Ds,input:a,draftAttachments:Ts,inputRef:pa,showToast:ut,t:e}),{interruptTurn:Hx}=Q7({activeWorktreeId:Ge,isInWorktree:Xe,currentTurnIdForActive:eg,socketRef:ar,setWorktrees:mr,setActivity:_}),{handleLeaveSession:wu}=X7({setAttachmentSession:p,setRepoUrl:S,setRepoInput:x,setRepoAuth:j,setSessionRequested:K,setAttachmentsError:ya,setAttachmentsLoading:hu,setMessages:s,setRepoDiff:Ea,setRpcLogs:Es,setRpcLogsEnabled:su,setRepoLastCommit:H2,setWorktreeLastCommitById:U2,setCurrentTurnId:om,setActivity:_});k.useEffect(()=>{!$r&&(f!=null&&f.sessionId)&&wu()},[$r,f==null?void 0:f.sessionId,wu]);const{handleDiffSelect:Ux}=Z7({activeWorktreeId:Ge,handleViewSelect:Aa,requestWorktreeDiff:xa,requestRepoDiff:ka}),{openPathInExplorer:Wx,requestExplorerTree:bu,requestExplorerStatus:Su,openFileInExplorer:Vx,setActiveExplorerFile:Kx,closeExplorerFile:Gx,selectExplorerNode:ng,toggleExplorerDir:qx,updateExplorerDraft:Yx,saveExplorerFile:Jx,startExplorerRename:Xx,cancelExplorerRename:ig,updateExplorerRenameDraft:sg,submitExplorerRename:Pa,createExplorerFile:Qx,deleteExplorerSelection:Zx}=a9({attachmentSessionId:f==null?void 0:f.sessionId,apiFetch:Jt,t:e,setExplorerByTab:$C,explorerDefaultState:sm,explorerRef:fm,activeWorktreeId:Ge,handleViewSelect:Aa,showToast:ut,requestExplorerTreeRef:FC,requestExplorerStatusRef:zC,loadExplorerFileRef:ca});B7({activeProvider:Hr,activeWorktreeId:Ge,addToBacklog:Mx,apiFetch:Jt,attachmentSessionId:f==null?void 0:f.sessionId,captureScreenshot:px,connected:v,handleSendMessageRef:zr,handleViewSelect:Aa,input:a,isWorktreeStopped:Zm,isCodexReady:tg,isInWorktree:Xe,openPathInExplorer:Wx,requestRepoDiff:ka,requestWorktreeDiff:xa,sendMessage:Km,sendWorktreeMessage:Gm,setCommandMenuOpen:Vm,setDraftAttachments:Ds,setInput:o,setMessages:s,setWorktrees:mr,socketRef:ar,showToast:ut,t:e});const{handleClearRpcLogs:eE}=s9({activeWorktreeId:Ge,setRpcLogs:Es});k.useEffect(()=>{vt==="diff"&&(Ge&&Ge!=="main"?xa(Ge):ka())},[vt,Ge,ka,xa]),k.useEffect(()=>{if(vt!=="explorer")return;const ie=Ge||"main";bu(ie,!0),Su(ie,!0)},[vt,Ge,bu,Su]),k.useEffect(()=>{if(!(!(f!=null&&f.sessionId)||cn||vt!=="chat")){if(Xe&&Ge){vu.has(Ge)||gu(Ge);return}Os()}},[f==null?void 0:f.sessionId,cn,vt,Xe,Ge,vu,gu,Os]);const{handleExportChat:tE}=c9({currentMessages:Gn,attachmentRepoUrl:f==null?void 0:f.repoUrl,repoUrl:w,isInWorktree:Xe,activeWorktree:Se,t:e,normalizeAttachments:mn,downloadTextFile:yz,formatExportName:wz,extractRepoName:hl,setToolbarExportOpen:ma}),{handleClearChat:rE}=f9({activeWorktreeId:Ge,setToolbarExportOpen:ma,setWorktrees:mr,lastNotifiedIdRef:C2,attachmentSessionId:f==null?void 0:f.sessionId,apiFetch:Jt,setMessages:s,messageIndex:_a,commandIndex:fu,setChoiceSelections:i2,choicesKey:Im,setCommandPanelOpen:au,setToolResultPanelOpen:lu,llmProvider:D});if(f!=null&&f.sessionId,Ls.length>1&&Ls.find(ie=>ie!==D),!(f!=null&&f.sessionId)){const _e=P==="new"&&q&&!!w,Te=fl(w,72),ze=Sm||q,_t=Ta=>jk[Ta]||{},Pt=_m==="mono_user"&&!$r,qn=!Pt&&va===1,fn=!Pt&&va===2,hn=va===3&&$r,pt=va===4&&$r,Cu=Pt?e("Please use the console generated URL to login"):fn?e("Configure AI providers for this workspace."):hn?e("Workspace created hint"):null,ku=Pt?{title:e("Login required"),paragraphs:[e("Please use the console generated URL to login")]}:fn?{title:e("Configure AI providers"),paragraphs:[e("Vibe80 can run Codex or Claude Code. To continue, provide your Anthropic and/or OpenAI credentials. If you use pay-as-you-go billing, supply an API key."),e("For subscription plans, use auth.json from the Codex CLI login (ChatGPT) or a long-lived token from `claude setup-token` (Claude).")]}:hn?{title:e("Workspace credentials"),paragraphs:[e("Please keep your workspace credentials (Workspace ID and Workspace Secret) for future access. We do not have a user identification mechanism; your Workspace ID is your only identifier.")]}:pt?{title:e("Start a session"),paragraphs:[e("Vibe80 opens Git-based work sessions. Even in a secure environment, we recommend short-lived and revocable PATs or keys.")],securityLink:!0}:{title:e("Configure the workspace"),paragraphs:[e("A workspace is an isolated, secured environment accessible only with credentials. It lets you reuse AI credentials for all future sessions."),e("You can create multiple workspaces to separate teams, projects, or security boundaries.")]};return E.jsx(BF,{t:e,brandLogo:Am,showStep1:qn,showStep2:fn,showStep3:hn,showStep4:pt,showMonoLoginRequired:Pt,headerHint:Cu,workspaceMode:Mk,setWorkspaceMode:bm,formDisabled:ze,handleWorkspaceSubmit:gk,workspaceIdInput:Ok,setWorkspaceIdInput:Ck,workspaceSecretInput:Fk,setWorkspaceSecretInput:Ek,workspaceError:Nk,handleWorkspaceProvidersSubmit:mk,workspaceProvider:_t,workspaceAuthExpanded:Pk,setWorkspaceAuthExpanded:bk,setWorkspaceProviders:kk,providerAuthOptions:EC,getProviderAuthType:F0,workspaceAuthFiles:Tk,setWorkspaceAuthFiles:Sk,sessionMode:P,setSessionMode:R,setSessionRequested:K,setAttachmentsError:ya,loadWorkspaceSessions:_k,deploymentMode:_m,handleLeaveWorkspace:ym,workspaceSessionsLoading:Uk,workspaceSessions:$k,workspaceSessionsError:Hk,workspaceSessionDeletingId:zk,handleResumeSession:K2,handleDeleteSession:dk,locale:n,extractRepoName:hl,getTruncatedText:fl,isCloning:_e,repoDisplay:Te,onRepoSubmit:G2,sessionNameInput:C,setSessionNameInput:A,repoInput:b,setRepoInput:x,repoHistory:hm,authMode:M,setAuthMode:O,sshKeyInput:z,setSshKeyInput:$,httpUsername:Y,setHttpUsername:X,httpPassword:V,setHttpPassword:N,defaultInternetAccess:I,setDefaultInternetAccess:L,defaultDenyGitCredentialsAccess:W,setDefaultDenyGitCredentialsAccess:J,attachmentsError:Pm,sessionRequested:q,workspaceBusy:Sm,workspaceProvidersEditing:Bk,providersBackStep:yk,setWorkspaceStep:Ak,setWorkspaceProvidersEditing:xk,setWorkspaceError:wm,setProvidersBackStep:wk,loadWorkspaceProviders:vk,workspaceCreated:Ik,workspaceId:Rk,workspaceCopied:Dk,handleWorkspaceCopy:pk,infoContent:ku,toast:G})}const og=(ie,_e,Te,ze,_t,Pt,qn,fn,hn)=>!Array.isArray(ie)||ie.length===0?null:E.jsx("ul",{className:"explorer-tree-list",children:ie.map(pt=>{if(pt.type==="dir"){const $t=Te.has(pt.path),nE=ze===pt.path&&_t==="dir",iE=Pt===pt.path,ag=(hn==null?void 0:hn[pt.path])||"";return E.jsxs("li",{className:`explorer-tree-item is-dir ${nE?"is-selected":""} ${ag?`is-${ag}`:""}`,children:[E.jsxs("div",{className:"explorer-tree-entry",children:[E.jsx("button",{type:"button",className:"explorer-tree-caret-button",onClick:Pr=>{Pr.stopPropagation(),qx(_e,pt.path)},children:E.jsx("span",{className:"explorer-tree-caret","aria-hidden":"true",children:E.jsx(Ne,{icon:$t?YD:UD})})}),iE?E.jsx("div",{className:"explorer-tree-toggle is-renaming",children:E.jsx("input",{className:"explorer-tree-rename-input",value:qn||"",autoFocus:!0,onClick:Pr=>Pr.stopPropagation(),onChange:Pr=>sg(_e,Pr.target.value),onBlur:()=>{Pa(_e)},onKeyDown:Pr=>{Pr.key==="Enter"?(Pr.preventDefault(),Pa(_e)):Pr.key==="Escape"&&(Pr.preventDefault(),ig(_e))}})}):E.jsx("button",{type:"button",className:"explorer-tree-toggle",onClick:()=>ng(_e,pt.path,"dir"),children:E.jsx("span",{className:"explorer-tree-name",children:pt.name})})]}),$t?og(pt.children||[],_e,Te,ze,_t,Pt,qn,fn,hn):null]},pt.path)}const Cu=ze===pt.path&&_t==="file",ku=Pt===pt.path,Ta=(fn==null?void 0:fn[pt.path])||"";return E.jsx("li",{className:`explorer-tree-item is-file ${Cu?"is-selected":""} ${Ta?`is-${Ta}`:""}`,children:ku?E.jsxs("div",{className:"explorer-tree-file is-renaming",children:[E.jsx("span",{className:"explorer-tree-icon","aria-hidden":"true",children:E.jsx(Ne,{icon:Zh})}),E.jsx("input",{className:"explorer-tree-rename-input",value:qn||"",autoFocus:!0,onClick:$t=>$t.stopPropagation(),onChange:$t=>sg(_e,$t.target.value),onBlur:()=>{Pa(_e)},onKeyDown:$t=>{$t.key==="Enter"?($t.preventDefault(),Pa(_e)):$t.key==="Escape"&&($t.preventDefault(),ig(_e))}})]}):E.jsxs("button",{type:"button",className:"explorer-tree-file",onClick:()=>{var $t;ng(_e,pt.path,"file"),($t=ca.current)==null||$t.call(ca,_e,pt.path)},children:[E.jsx("span",{className:"explorer-tree-icon","aria-hidden":"true",children:E.jsx(Ne,{icon:Zh})}),E.jsx("span",{className:"explorer-tree-name",children:pt.name})]})},pt.path)})});return E.jsxs("div",{className:"app",children:[E.jsx(jF,{t:e,brandLogo:Am,allTabs:yx,activeWorktreeId:Ge,handleSelectWorktree:d2,createWorktree:h2,openCloseConfirm:gx,renameWorktreeHandler:g2,llmProvider:D,availableProviders:Ls,branches:x2,defaultBranch:Mm,currentBranch:Kn,branchLoading:A2,branchError:E2,defaultInternetAccess:I,defaultDenyGitCredentialsAccess:W,loadBranches:jm,providerModelState:D2,loadProviderModels:L2,connected:v,isMobileLayout:cn,requestHandoffQr:xm,attachmentSession:f,handoffLoading:cu,handleOpenSettings:rg,handleLeaveSession:wu}),E.jsxs("div",{className:`layout ${am?"is-side-open":"is-side-collapsed"} ${cn?"is-mobile":""}`,children:[cn&&am?E.jsx("button",{type:"button",className:"side-backdrop","aria-label":e("Close panel"),onClick:()=>lm(!1)}):null,E.jsxs("aside",{className:"side",children:[E.jsx("div",{className:"side-body",children:E.jsxs("section",{className:"backlog",children:[E.jsxs("div",{className:"panel-header",children:[E.jsx("div",{className:"panel-title",children:e("Backlog")}),E.jsx("div",{className:"panel-subtitle",children:La.length===0?e("No tasks"):e("{{count}} item(s)",{count:La.length})})]}),La.length===0?E.jsx("div",{className:"backlog-empty",children:e("No pending tasks at the moment.")}):E.jsx("ul",{className:"backlog-list",children:La.map(ie=>{var _e;return E.jsxs("li",{className:"backlog-item",children:[E.jsx("div",{className:"backlog-text",children:fl(ie.text,180)}),E.jsxs("div",{className:"backlog-actions",children:[E.jsx("button",{type:"button",className:"ghost",onClick:()=>jx(ie),children:e("Edit")}),E.jsx("button",{type:"button",onClick:()=>Bx(ie),disabled:!v,children:e("Launch")}),E.jsx("button",{type:"button",className:"ghost",onClick:()=>zx(ie.id),children:e("Delete")})]}),(_e=ie.attachments)!=null&&_e.length?E.jsx("div",{className:"backlog-meta",children:e("{{count}} attachment(s)",{count:ie.attachments.length})}):null]},ie.id)})})]})}),E.jsx("div",{className:"side-footer",children:E.jsxs("button",{type:"button",className:`side-footer-button ${vt==="settings"?"is-active":""}`,onClick:rg,"aria-pressed":vt==="settings",children:[E.jsx("span",{className:"side-footer-icon","aria-hidden":"true",children:E.jsx(Ne,{icon:Ab})}),e("Settings")]})})]}),E.jsxs("section",{className:"conversation is-chat-narrow",ref:mm,children:[E.jsxs("div",{className:"pane-stack",children:[E.jsx(g7,{t:e,activePane:vt,handleViewSelect:Aa,handleDiffSelect:Ux,debugMode:ha,rpcLogsEnabled:ua,terminalEnabled:fa,toolbarExportOpen:ek,setToolbarExportOpen:ma,toolbarExportRef:tk,handleExportChat:tE,hasMessages:V2,handleClearChat:rE}),E.jsx(K8,{t:e,activePane:vt,listRef:da,showChatInfoPanel:Ax,repoTitle:Ex,activeBranchLabel:Ym,shortSha:Jm,activeCommit:un,showProviderMeta:xx,activeProviderLabel:Xm,activeModelLabel:Qm,showInternetAccess:Cx,showGitCredentialsShared:kx,activeTaskLabel:Tx,currentMessages:Gn,chatHistoryWindow:Sx,activeChatKey:Lr,setShowOlderMessagesByTab:bx,showChatCommands:te,showToolResults:le,commandPanelOpen:JC,setCommandPanelOpen:au,toolResultPanelOpen:XC,setToolResultPanelOpen:lu,renderMessageAttachments:r2,currentProcessing:Ms,currentInteractionBlocked:js,currentActivity:Px,extractVibe80Blocks:JF,handleChoiceClick:a2,choiceSelections:n2,openVibe80Form:s2,copyTextToClipboard:z0,openFileInExplorer:Vx,setInput:o,inputRef:pa,markBacklogItemDone:Fx,setBacklogMessagePage:$x,activeWorktreeId:Ge,BACKLOG_PAGE_SIZE:ez,MAX_USER_DISPLAY_LENGTH:ZF,getTruncatedText:fl}),E.jsx(k.Suspense,{fallback:null,children:E.jsx(HF,{t:e,activePane:vt,isInWorktree:Xe,diffStatusLines:B2,connected:v,currentProcessing:Ms,hasCurrentChanges:F2,sendCommitMessage:mx,diffFiles:j2,currentDiff:M2,untrackedFilePanels:z2,untrackedLoading:$2})}),E.jsx(k.Suspense,{fallback:null,children:E.jsx($F,{t:e,activePane:vt,repoName:As,activeWorktree:Se,isInWorktree:Xe,activeWorktreeId:Ge,attachmentSession:f,requestExplorerTree:bu,requestExplorerStatus:Su,activeExplorer:Um,renderExplorerNodes:og,explorerStatusByPath:_u,explorerDirStatus:q2,saveExplorerFile:Jx,updateExplorerDraft:Yx,setActiveExplorerFile:Kx,closeExplorerFile:Gx,startExplorerRename:Xx,createExplorerFile:Qx,deleteExplorerSelection:Zx,getLanguageForPath:bz,themeMode:$e})}),E.jsx(k.Suspense,{fallback:null,children:E.jsx(UF,{t:e,terminalEnabled:fa,activePane:vt,repoName:As,activeWorktree:Se,isInWorktree:Xe,terminalContainerRef:vm,attachmentSession:f})}),E.jsx(k.Suspense,{fallback:null,children:E.jsx(VF,{t:e,activePane:vt,filteredRpcLogs:w2,logFilter:v2,setLogFilter:_2,scopedRpcLogs:y2,handleClearRpcLogs:eE})}),E.jsx(k.Suspense,{fallback:null,children:E.jsx(WF,{t:e,activePane:vt,handleSettingsBack:Ox,language:t,setLanguage:r,showChatCommands:te,setShowChatCommands:ne,showToolResults:le,setShowToolResults:se,notificationsEnabled:me,setNotificationsEnabled:Ke,themeMode:$e,setThemeMode:Ye,composerInputMode:bt,setComposerInputMode:Ci,debugMode:ha,setDebugMode:ZC,gitIdentityName:Vk,setGitIdentityName:Zk,gitIdentityEmail:Kk,setGitIdentityEmail:e2,gitIdentityGlobal:Gk,gitIdentityRepo:qk,gitIdentityLoading:Yk,gitIdentitySaving:Jk,gitIdentityError:Xk,gitIdentityMessage:Qk,handleSaveGitIdentity:t2,attachmentSession:f})})]}),E.jsx(m7,{t:e,activePane:vt,isDraggingAttachments:rx,onSubmit:sx,onDragEnterComposer:cx,onDragOverComposer:lx,onDragLeaveComposer:ux,onDropAttachments:fx,composerRef:gm,draftAttachments:Ts,getAttachmentExtension:sz,formatAttachmentSize:oz,removeDraftAttachment:hx,commandMenuOpen:Q2,filteredCommands:tx,setInput:o,setCommandMenuOpen:Vm,setCommandQuery:Z2,inputRef:pa,commandSelection:ex,triggerAttachmentPicker:dx,attachmentSession:f,attachmentsLoading:Tm,isMobileLayout:cn,uploadInputRef:pm,onUploadAttachments:ox,input:a,handleInputChange:nx,handleComposerKeyDown:ix,onPasteAttachments:ax,composerInputMode:bt,canInterrupt:Dx,interruptTurn:Hx,connected:v,modelSelectorVisible:Ix,modelOptions:$m,selectedModel:Rx,modelLoading:Hm,modelDisabled:Nx,modelError:W2,onModelChange:X2,isCodexReady:tg,interactionBlocked:js,attachmentsError:Pm})]})]}),wa?E.jsx("div",{className:"vibe80-form-overlay",role:"dialog","aria-modal":"true",onClick:du,children:E.jsxs("div",{className:"vibe80-form-dialog",onClick:ie=>ie.stopPropagation(),children:[E.jsxs("div",{className:"vibe80-form-header",children:[E.jsx("div",{className:"vibe80-form-title",children:wa.question||e("Form")}),E.jsx("button",{type:"button",className:"vibe80-form-close","aria-label":e("Close"),onClick:du,children:E.jsx(Ne,{icon:ii})})]}),E.jsxs("form",{className:"vibe80-form-body",onSubmit:ie=>{if(js){ie.preventDefault();return}o2(ie)},children:[wa.fields.map(ie=>{const _e=`vibe80-${wa.key}-${ie.id}`,Te=Nm[ie.id]??"";return ie.type==="checkbox"?E.jsx("div",{className:"vibe80-form-field",children:E.jsxs("label",{className:"vibe80-form-checkbox",children:[E.jsx("input",{type:"checkbox",checked:!!Nm[ie.id],onChange:ze=>Is(ie.id,ze.target.checked)}),E.jsx("span",{children:ie.label})]})},ie.id):ie.type==="textarea"?E.jsxs("div",{className:"vibe80-form-field",children:[E.jsx("label",{className:"vibe80-form-label",htmlFor:_e,children:ie.label}),E.jsx("textarea",{id:_e,className:"vibe80-form-input",rows:4,value:Te,onChange:ze=>Is(ie.id,ze.target.value)})]},ie.id):ie.type==="radio"?E.jsxs("div",{className:"vibe80-form-field",children:[E.jsx("div",{className:"vibe80-form-label",children:ie.label}),E.jsx("div",{className:"vibe80-form-options",children:(ie.choices||[]).length?ie.choices.map(ze=>E.jsxs("label",{className:"vibe80-form-option",children:[E.jsx("input",{type:"radio",name:_e,value:ze,checked:Te===ze,onChange:()=>Is(ie.id,ze)}),E.jsx("span",{children:ze})]},`${ie.id}-${ze}`)):E.jsx("div",{className:"vibe80-form-empty",children:e("No options.")})})]},ie.id):ie.type==="select"?E.jsxs("div",{className:"vibe80-form-field",children:[E.jsx("label",{className:"vibe80-form-label",htmlFor:_e,children:ie.label}),E.jsx("select",{id:_e,className:"vibe80-form-input vibe80-form-select",value:Te,onChange:ze=>Is(ie.id,ze.target.value),children:(ie.choices||[]).length?ie.choices.map(ze=>E.jsx("option",{value:ze,children:ze},`${ie.id}-${ze}`)):E.jsx("option",{value:"",children:e("No options")})})]},ie.id):E.jsxs("div",{className:"vibe80-form-field",children:[E.jsx("label",{className:"vibe80-form-label",htmlFor:_e,children:ie.label}),E.jsx("input",{id:_e,className:"vibe80-form-input",type:"text",value:Te,onChange:ze=>Is(ie.id,ze.target.value)})]},ie.id)}),E.jsxs("div",{className:"vibe80-form-actions",children:[E.jsx("button",{type:"button",className:"vibe80-form-cancel",onClick:du,children:e("Cancel")}),E.jsx("button",{type:"submit",className:"vibe80-form-submit",disabled:js,children:e("Send")})]})]})]})}):null,Wk?E.jsx("div",{className:"handoff-modal-overlay",role:"dialog","aria-modal":"true",onClick:Em,children:E.jsxs("div",{className:"handoff-modal",onClick:ie=>ie.stopPropagation(),children:[E.jsxs("div",{className:"handoff-modal-header",children:[E.jsx("div",{className:"handoff-modal-title",children:e("Continue on mobile")}),E.jsx("button",{type:"button",className:"handoff-modal-close","aria-label":e("Close"),onClick:Em,children:E.jsx(Ne,{icon:ii})})]}),E.jsxs("div",{className:"handoff-modal-body",children:[E.jsx("p",{className:"handoff-modal-text",children:e("Scan this QR code in the Android app to resume the current session.")}),km?E.jsx("div",{className:"handoff-modal-error",children:km}):null,Cm?E.jsx("div",{className:"handoff-modal-qr",children:E.jsx("img",{src:Cm,alt:e("QR code")})}):E.jsx("div",{className:"handoff-modal-placeholder",children:e(cu?"Generating QR code...":"QR code unavailable.")}),typeof uu=="number"?E.jsx("div",{className:"handoff-modal-meta",children:uu>0?e("Expires in {{seconds}}s",{seconds:uu}):e("QR code expired")}):null,E.jsx("div",{className:"handoff-modal-actions",children:E.jsx("button",{type:"button",className:"session-button",onClick:xm,disabled:cu,children:e("Regenerate")})})]})]})}):null,cm?E.jsx("div",{className:"worktree-close-confirm-overlay",role:"dialog","aria-modal":"true",onClick:yu,children:E.jsxs("div",{className:"worktree-close-confirm-dialog",onClick:ie=>ie.stopPropagation(),children:[E.jsxs("div",{className:"worktree-close-confirm-header",children:[E.jsx("div",{className:"worktree-close-confirm-title",children:e("Close the worktree?")}),E.jsx("button",{type:"button",className:"worktree-close-confirm-close","aria-label":e("Close"),onClick:yu,children:E.jsx(Ne,{icon:ii})})]}),E.jsx("div",{className:"worktree-close-confirm-body",children:e("All changes will be lost. What would you like to do?")}),E.jsxs("div",{className:"worktree-close-confirm-actions",children:[E.jsx("button",{type:"button",className:"worktree-close-confirm-cancel",onClick:yu,children:e("Cancel")}),E.jsx("button",{type:"button",className:"worktree-close-confirm-merge",onClick:vx,children:e("Merge into {{branch}}",{branch:qm})}),E.jsx("button",{type:"button",className:"worktree-close-confirm-delete",onClick:_x,children:e("Delete worktree")})]})]})}):null,Ps?E.jsxs("div",{className:"attachment-modal",role:"dialog","aria-modal":"true",onClick:()=>Dm(null),children:[E.jsx("button",{type:"button",className:"attachment-modal-close","aria-label":e("Close"),onClick:()=>Dm(null),children:E.jsx(Ne,{icon:ii})}),E.jsxs("div",{className:"attachment-modal-body",onClick:ie=>ie.stopPropagation(),children:[E.jsx("img",{src:Ps.url,alt:Ps.name||e("Preview")}),Ps.name?E.jsx("div",{className:"attachment-modal-name",children:Ps.name}):null]})]}):null]})}Zy(document.getElementById("root")).render(E.jsx(bc.StrictMode,{children:E.jsx(OF,{children:E.jsx(Cz,{})})}));export{Ne as F,iL as H,bc as W,Az as a,Lz as b,Tz as c,Pz as d,Ez as f,xz as i,E as j,k as r};