@vibe80/vibe80 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +132 -16
- package/bin/vibe80.js +1728 -16
- package/client/dist/assets/{DiffPanel-BKLnyIAZ.js → DiffPanel-BUJhQj_Q.js} +1 -1
- package/client/dist/assets/{ExplorerPanel-D3IbBsXz.js → ExplorerPanel-DugEeaO2.js} +1 -1
- package/client/dist/assets/{LogsPanel-BwJAFHRP.js → LogsPanel-BQrGxMu_.js} +1 -1
- package/client/dist/assets/{SettingsPanel-BfkchMnR.js → SettingsPanel-Ci2BdIYO.js} +1 -1
- package/client/dist/assets/{TerminalPanel-BQfMEm-u.js → TerminalPanel-C-T3t-6T.js} +1 -1
- package/client/dist/assets/index-cFi4LM0j.js +711 -0
- package/client/dist/assets/index-qNyFxUjK.css +32 -0
- package/client/dist/icon_square-512x512.png +0 -0
- package/client/dist/icon_square.svg +58 -0
- package/client/dist/index.html +3 -2
- package/client/dist/sw.js +1 -1
- package/client/index.html +1 -0
- package/client/public/icon_square-512x512.png +0 -0
- package/client/public/icon_square.svg +58 -0
- package/client/src/App.jsx +205 -2
- package/client/src/assets/vibe80_dark.png +0 -0
- package/client/src/assets/vibe80_light.png +0 -0
- package/client/src/components/Chat/ChatMessages.jsx +1 -1
- package/client/src/components/SessionGate/SessionGate.jsx +295 -91
- package/client/src/components/WorktreeTabs.css +11 -0
- package/client/src/components/WorktreeTabs.jsx +77 -47
- package/client/src/hooks/useChatSocket.js +8 -7
- package/client/src/hooks/useRepoBranchesModels.js +12 -6
- package/client/src/hooks/useWorktreeCloseConfirm.js +19 -7
- package/client/src/hooks/useWorktrees.js +3 -1
- package/client/src/index.css +26 -3
- package/client/src/locales/en.json +12 -1
- package/client/src/locales/fr.json +12 -1
- package/docs/api/openapi.json +1 -1
- package/package.json +2 -1
- package/server/scripts/rotate-workspace-secret.js +1 -1
- package/server/src/claudeClient.js +3 -3
- package/server/src/codexClient.js +3 -3
- package/server/src/config.js +6 -6
- package/server/src/index.js +14 -12
- package/server/src/middleware/auth.js +7 -7
- package/server/src/middleware/debug.js +36 -4
- package/server/src/providerLogger.js +2 -2
- package/server/src/routes/sessions.js +133 -21
- package/server/src/routes/workspaces.js +1 -1
- package/server/src/runAs.js +14 -14
- package/server/src/services/auth.js +3 -3
- package/server/src/services/session.js +182 -14
- package/server/src/services/workspace.js +86 -42
- package/server/src/storage/index.js +2 -2
- package/server/src/storage/redis.js +38 -36
- package/server/src/storage/sqlite.js +13 -13
- package/server/src/worktreeManager.js +87 -19
- package/server/tests/integration/routes/workspaces-routes.test.js +8 -8
- package/server/tests/setup/env.js +5 -5
- package/server/tests/unit/services/auth.test.js +3 -3
- package/client/dist/assets/index-BDQQz6SJ.css +0 -32
- package/client/dist/assets/index-D1UJw1oP.js +0 -711
|
@@ -0,0 +1,711 @@
|
|
|
1
|
+
function NE(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 hc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var w0={exports:{}},Yc={},b0={exports:{}},He={};/**
|
|
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 _a=Symbol.for("react.element"),RE=Symbol.for("react.portal"),OE=Symbol.for("react.fragment"),ME=Symbol.for("react.strict_mode"),jE=Symbol.for("react.profiler"),BE=Symbol.for("react.provider"),FE=Symbol.for("react.context"),zE=Symbol.for("react.forward_ref"),$E=Symbol.for("react.suspense"),UE=Symbol.for("react.memo"),HE=Symbol.for("react.lazy"),$g=Symbol.iterator;function WE(e){return e===null||typeof e!="object"?null:(e=$g&&e[$g]||e["@@iterator"],typeof e=="function"?e:null)}var S0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C0=Object.assign,k0={};function Ms(e,t,r){this.props=e,this.context=t,this.refs=k0,this.updater=r||S0}Ms.prototype.isReactComponent={};Ms.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")};Ms.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function x0(){}x0.prototype=Ms.prototype;function ep(e,t,r){this.props=e,this.context=t,this.refs=k0,this.updater=r||S0}var tp=ep.prototype=new x0;tp.constructor=ep;C0(tp,Ms.prototype);tp.isPureReactComponent=!0;var Ug=Array.isArray,E0=Object.prototype.hasOwnProperty,rp={current:null},A0={key:!0,ref:!0,__self:!0,__source:!0};function L0(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)E0.call(t,n)&&!A0.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:_a,type:e,key:s,ref:a,props:i,_owner:rp.current}}function VE(e,t){return{$$typeof:_a,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function np(e){return typeof e=="object"&&e!==null&&e.$$typeof===_a}function KE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Hg=/\/+/g;function uf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?KE(""+e.key):t.toString(36)}function Ul(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 _a:case RE:a=!0}}if(a)return a=e,i=i(a),e=n===""?"."+uf(a,0):n,Ug(i)?(r="",e!=null&&(r=e.replace(Hg,"$&/")+"/"),Ul(i,t,r,"",function(c){return c})):i!=null&&(np(i)&&(i=VE(i,r+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(Hg,"$&/")+"/")+e)),t.push(i)),1;if(a=0,n=n===""?".":n+":",Ug(e))for(var o=0;o<e.length;o++){s=e[o];var l=n+uf(s,o);a+=Ul(s,t,r,l,i)}else if(l=WE(e),typeof l=="function")for(e=l.call(e),o=0;!(s=e.next()).done;)s=s.value,l=n+uf(s,o++),a+=Ul(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 sl(e,t,r){if(e==null)return e;var n=[],i=0;return Ul(e,n,"","",function(s){return t.call(r,s,i++)}),n}function GE(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 $t={current:null},Hl={transition:null},qE={ReactCurrentDispatcher:$t,ReactCurrentBatchConfig:Hl,ReactCurrentOwner:rp};function P0(){throw Error("act(...) is not supported in production builds of React.")}He.Children={map:sl,forEach:function(e,t,r){sl(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return sl(e,function(){t++}),t},toArray:function(e){return sl(e,function(t){return t})||[]},only:function(e){if(!np(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};He.Component=Ms;He.Fragment=OE;He.Profiler=jE;He.PureComponent=ep;He.StrictMode=ME;He.Suspense=$E;He.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qE;He.act=P0;He.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=C0({},e.props),i=e.key,s=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,a=rp.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(l in t)E0.call(t,l)&&!A0.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:_a,type:e.type,key:i,ref:s,props:n,_owner:a}};He.createContext=function(e){return e={$$typeof:FE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:BE,_context:e},e.Consumer=e};He.createElement=L0;He.createFactory=function(e){var t=L0.bind(null,e);return t.type=e,t};He.createRef=function(){return{current:null}};He.forwardRef=function(e){return{$$typeof:zE,render:e}};He.isValidElement=np;He.lazy=function(e){return{$$typeof:HE,_payload:{_status:-1,_result:e},_init:GE}};He.memo=function(e,t){return{$$typeof:UE,type:e,compare:t===void 0?null:t}};He.startTransition=function(e){var t=Hl.transition;Hl.transition={};try{e()}finally{Hl.transition=t}};He.unstable_act=P0;He.useCallback=function(e,t){return $t.current.useCallback(e,t)};He.useContext=function(e){return $t.current.useContext(e)};He.useDebugValue=function(){};He.useDeferredValue=function(e){return $t.current.useDeferredValue(e)};He.useEffect=function(e,t){return $t.current.useEffect(e,t)};He.useId=function(){return $t.current.useId()};He.useImperativeHandle=function(e,t,r){return $t.current.useImperativeHandle(e,t,r)};He.useInsertionEffect=function(e,t){return $t.current.useInsertionEffect(e,t)};He.useLayoutEffect=function(e,t){return $t.current.useLayoutEffect(e,t)};He.useMemo=function(e,t){return $t.current.useMemo(e,t)};He.useReducer=function(e,t,r){return $t.current.useReducer(e,t,r)};He.useRef=function(e){return $t.current.useRef(e)};He.useState=function(e){return $t.current.useState(e)};He.useSyncExternalStore=function(e,t,r){return $t.current.useSyncExternalStore(e,t,r)};He.useTransition=function(){return $t.current.useTransition()};He.version="18.3.1";b0.exports=He;var k=b0.exports;const Jc=qc(k),ip=NE({__proto__:null,default:Jc},[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 YE=k,JE=Symbol.for("react.element"),XE=Symbol.for("react.fragment"),QE=Object.prototype.hasOwnProperty,ZE=YE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,e3={key:!0,ref:!0,__self:!0,__source:!0};function T0(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)QE.call(t,n)&&!e3.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:JE,type:e,key:s,ref:a,props:i,_owner:ZE.current}}Yc.Fragment=XE;Yc.jsx=T0;Yc.jsxs=T0;w0.exports=Yc;var x=w0.exports,D0={exports:{}},fr={},I0={exports:{}},N0={};/**
|
|
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(W,I){var L=W.length;W.push(I);e:for(;0<L;){var B=L-1>>>1,D=W[B];if(0<i(D,I))W[B]=I,W[L]=D,L=B;else break e}}function r(W){return W.length===0?null:W[0]}function n(W){if(W.length===0)return null;var I=W[0],L=W.pop();if(L!==I){W[0]=L;e:for(var B=0,D=W.length,P=D>>>1;B<P;){var $=2*(B+1)-1,Y=W[$],H=$+1,j=W[H];if(0>i(Y,L))H<D&&0>i(j,Y)?(W[B]=j,W[H]=L,B=H):(W[B]=Y,W[$]=L,B=$);else if(H<D&&0>i(j,L))W[B]=j,W[H]=L,B=H;else break e}}return I}function i(W,I){var L=W.sortIndex-I.sortIndex;return L!==0?L:W.id-I.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,v=!1,w=!1,_=!1,g=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(W){for(var I=r(c);I!==null;){if(I.callback===null)n(c);else if(I.startTime<=W)n(c),I.sortIndex=I.expirationTime,t(l,I);else break;I=r(c)}}function y(W){if(_=!1,p(W),!w)if(r(l)!==null)w=!0,q(S);else{var I=r(c);I!==null&&ee(y,I.startTime-W)}}function S(W,I){w=!1,_&&(_=!1,d(C),C=-1),v=!0;var L=m;try{for(p(I),u=r(l);u!==null&&(!(u.expirationTime>I)||W&&!O());){var B=u.callback;if(typeof B=="function"){u.callback=null,m=u.priorityLevel;var D=B(u.expirationTime<=I);I=e.unstable_now(),typeof D=="function"?u.callback=D:u===r(l)&&n(l),p(I)}else n(l);u=r(l)}if(u!==null)var P=!0;else{var $=r(c);$!==null&&ee(y,$.startTime-I),P=!1}return P}finally{u=null,m=L,v=!1}}var b=!1,E=null,C=-1,A=5,T=-1;function O(){return!(e.unstable_now()-T<A)}function R(){if(E!==null){var W=e.unstable_now();T=W;var I=!0;try{I=E(!0,W)}finally{I?M():(b=!1,E=null)}}else b=!1}var M;if(typeof f=="function")M=function(){f(R)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,U=z.port2;z.port1.onmessage=R,M=function(){U.postMessage(null)}}else M=function(){g(R,0)};function q(W){E=W,b||(b=!0,M())}function ee(W,I){C=g(function(){W(e.unstable_now())},I)}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(W){W.callback=null},e.unstable_continueExecution=function(){w||v||(w=!0,q(S))},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(W){switch(m){case 1:case 2:case 3:var I=3;break;default:I=m}var L=m;m=I;try{return W()}finally{m=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(W,I){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var L=m;m=W;try{return I()}finally{m=L}},e.unstable_scheduleCallback=function(W,I,L){var B=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?B+L:B):L=B,W){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=L+D,W={id:h++,callback:I,priorityLevel:W,startTime:L,expirationTime:D,sortIndex:-1},L>B?(W.sortIndex=L,t(c,W),r(l)===null&&W===r(c)&&(_?(d(C),C=-1):_=!0,ee(y,L-B))):(W.sortIndex=D,t(l,W),w||v||(w=!0,q(S))),W},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(W){var I=m;return function(){var L=m;m=I;try{return W.apply(this,arguments)}finally{m=L}}}})(N0);I0.exports=N0;var t3=I0.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 r3=k,ur=t3;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 R0=new Set,Wo={};function Ti(e,t){xs(e,t),xs(e+"Capture",t)}function xs(e,t){for(Wo[e]=t,e=0;e<t.length;e++)R0.add(t[e])}var cn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wh=Object.prototype.hasOwnProperty,n3=/^[: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]*$/,Wg={},Vg={};function i3(e){return wh.call(Vg,e)?!0:wh.call(Wg,e)?!1:n3.test(e)?Vg[e]=!0:(Wg[e]=!0,!1)}function s3(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 o3(e,t,r,n){if(t===null||typeof t>"u"||s3(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 Ut(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 Tt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Tt[e]=new Ut(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Tt[t]=new Ut(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Tt[e]=new Ut(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Tt[e]=new Ut(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){Tt[e]=new Ut(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Tt[e]=new Ut(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Tt[e]=new Ut(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Tt[e]=new Ut(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Tt[e]=new Ut(e,5,!1,e.toLowerCase(),null,!1,!1)});var sp=/[\-:]([a-z])/g;function op(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(sp,op);Tt[t]=new Ut(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(sp,op);Tt[t]=new Ut(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(sp,op);Tt[t]=new Ut(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Tt[e]=new Ut(e,1,!1,e.toLowerCase(),null,!1,!1)});Tt.xlinkHref=new Ut("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Tt[e]=new Ut(e,1,!1,e.toLowerCase(),null,!0,!0)});function ap(e,t,r,n){var i=Tt.hasOwnProperty(t)?Tt[t]:null;(i!==null?i.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(o3(t,r,i,n)&&(r=null),n||i===null?i3(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 gn=r3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ol=Symbol.for("react.element"),ns=Symbol.for("react.portal"),is=Symbol.for("react.fragment"),lp=Symbol.for("react.strict_mode"),bh=Symbol.for("react.profiler"),O0=Symbol.for("react.provider"),M0=Symbol.for("react.context"),cp=Symbol.for("react.forward_ref"),Sh=Symbol.for("react.suspense"),Ch=Symbol.for("react.suspense_list"),up=Symbol.for("react.memo"),Dn=Symbol.for("react.lazy"),j0=Symbol.for("react.offscreen"),Kg=Symbol.iterator;function lo(e){return e===null||typeof e!="object"?null:(e=Kg&&e[Kg]||e["@@iterator"],typeof e=="function"?e:null)}var ft=Object.assign,ff;function Co(e){if(ff===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);ff=t&&t[1]||""}return`
|
|
34
|
+
`+ff+e}var hf=!1;function df(e,t){if(!e||hf)return"";hf=!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{hf=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Co(e):""}function a3(e){switch(e.tag){case 5:return Co(e.type);case 16:return Co("Lazy");case 13:return Co("Suspense");case 19:return Co("SuspenseList");case 0:case 2:case 15:return e=df(e.type,!1),e;case 11:return e=df(e.type.render,!1),e;case 1:return e=df(e.type,!0),e;default:return""}}function kh(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 is:return"Fragment";case ns:return"Portal";case bh:return"Profiler";case lp:return"StrictMode";case Sh:return"Suspense";case Ch:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case M0:return(e.displayName||"Context")+".Consumer";case O0:return(e._context.displayName||"Context")+".Provider";case cp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case up:return t=e.displayName||null,t!==null?t:kh(e.type)||"Memo";case Dn:t=e._payload,e=e._init;try{return kh(e(t))}catch{}}return null}function l3(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 kh(t);case 8:return t===lp?"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 qn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function B0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function c3(e){var t=B0(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 al(e){e._valueTracker||(e._valueTracker=c3(e))}function F0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=B0(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function dc(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 xh(e,t){var r=t.checked;return ft({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Gg(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=qn(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 z0(e,t){t=t.checked,t!=null&&ap(e,"checked",t,!1)}function Eh(e,t){z0(e,t);var r=qn(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")?Ah(e,t.type,r):t.hasOwnProperty("defaultValue")&&Ah(e,t.type,qn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function qg(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 Ah(e,t,r){(t!=="number"||dc(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ko=Array.isArray;function gs(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=""+qn(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 Lh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(fe(91));return ft({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Yg(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(ko(r)){if(1<r.length)throw Error(fe(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:qn(r)}}function $0(e,t){var r=qn(t.value),n=qn(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 Jg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function U0(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 Ph(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?U0(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ll,H0=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(ll=ll||document.createElement("div"),ll.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ll.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Vo(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Po={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},u3=["Webkit","ms","Moz","O"];Object.keys(Po).forEach(function(e){u3.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Po[t]=Po[e]})});function W0(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Po.hasOwnProperty(e)&&Po[e]?(""+t).trim():t+"px"}function V0(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=W0(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var f3=ft({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 Th(e,t){if(t){if(f3[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 Dh(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 Ih=null;function fp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Nh=null,vs=null,_s=null;function Xg(e){if(e=ba(e)){if(typeof Nh!="function")throw Error(fe(280));var t=e.stateNode;t&&(t=tu(t),Nh(e.stateNode,e.type,t))}}function K0(e){vs?_s?_s.push(e):_s=[e]:vs=e}function G0(){if(vs){var e=vs,t=_s;if(_s=vs=null,Xg(e),t)for(e=0;e<t.length;e++)Xg(t[e])}}function q0(e,t){return e(t)}function Y0(){}var pf=!1;function J0(e,t,r){if(pf)return e(t,r);pf=!0;try{return q0(e,t,r)}finally{pf=!1,(vs!==null||_s!==null)&&(Y0(),G0())}}function Ko(e,t){var r=e.stateNode;if(r===null)return null;var n=tu(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 Rh=!1;if(cn)try{var co={};Object.defineProperty(co,"passive",{get:function(){Rh=!0}}),window.addEventListener("test",co,co),window.removeEventListener("test",co,co)}catch{Rh=!1}function h3(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 To=!1,pc=null,mc=!1,Oh=null,d3={onError:function(e){To=!0,pc=e}};function p3(e,t,r,n,i,s,a,o,l){To=!1,pc=null,h3.apply(d3,arguments)}function m3(e,t,r,n,i,s,a,o,l){if(p3.apply(this,arguments),To){if(To){var c=pc;To=!1,pc=null}else throw Error(fe(198));mc||(mc=!0,Oh=c)}}function Di(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 X0(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 Qg(e){if(Di(e)!==e)throw Error(fe(188))}function g3(e){var t=e.alternate;if(!t){if(t=Di(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 Qg(i),e;if(s===n)return Qg(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 Q0(e){return e=g3(e),e!==null?Z0(e):null}function Z0(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Z0(e);if(t!==null)return t;e=e.sibling}return null}var ey=ur.unstable_scheduleCallback,Zg=ur.unstable_cancelCallback,v3=ur.unstable_shouldYield,_3=ur.unstable_requestPaint,mt=ur.unstable_now,y3=ur.unstable_getCurrentPriorityLevel,hp=ur.unstable_ImmediatePriority,ty=ur.unstable_UserBlockingPriority,gc=ur.unstable_NormalPriority,w3=ur.unstable_LowPriority,ry=ur.unstable_IdlePriority,Xc=null,Vr=null;function b3(e){if(Vr&&typeof Vr.onCommitFiberRoot=="function")try{Vr.onCommitFiberRoot(Xc,e,void 0,(e.current.flags&128)===128)}catch{}}var Tr=Math.clz32?Math.clz32:k3,S3=Math.log,C3=Math.LN2;function k3(e){return e>>>=0,e===0?32:31-(S3(e)/C3|0)|0}var cl=64,ul=4194304;function xo(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 vc(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=xo(o):(s&=a,s!==0&&(n=xo(s)))}else a=r&~i,a!==0?n=xo(a):s!==0&&(n=xo(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-Tr(t),i=1<<r,n|=e[r],t&=~i;return n}function x3(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 E3(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-Tr(s),o=1<<a,l=i[a];l===-1?(!(o&r)||o&n)&&(i[a]=x3(o,t)):l<=t&&(e.expiredLanes|=o),s&=~o}}function Mh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ny(){var e=cl;return cl<<=1,!(cl&4194240)&&(cl=64),e}function mf(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function ya(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Tr(t),e[t]=r}function A3(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-Tr(r),s=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~s}}function dp(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Tr(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var Xe=0;function iy(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var sy,pp,oy,ay,ly,jh=!1,fl=[],jn=null,Bn=null,Fn=null,Go=new Map,qo=new Map,Nn=[],L3="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 ev(e,t){switch(e){case"focusin":case"focusout":jn=null;break;case"dragenter":case"dragleave":Bn=null;break;case"mouseover":case"mouseout":Fn=null;break;case"pointerover":case"pointerout":Go.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qo.delete(t.pointerId)}}function uo(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=ba(t),t!==null&&pp(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function P3(e,t,r,n,i){switch(t){case"focusin":return jn=uo(jn,e,t,r,n,i),!0;case"dragenter":return Bn=uo(Bn,e,t,r,n,i),!0;case"mouseover":return Fn=uo(Fn,e,t,r,n,i),!0;case"pointerover":var s=i.pointerId;return Go.set(s,uo(Go.get(s)||null,e,t,r,n,i)),!0;case"gotpointercapture":return s=i.pointerId,qo.set(s,uo(qo.get(s)||null,e,t,r,n,i)),!0}return!1}function cy(e){var t=di(e.target);if(t!==null){var r=Di(t);if(r!==null){if(t=r.tag,t===13){if(t=X0(r),t!==null){e.blockedOn=t,ly(e.priority,function(){oy(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 Wl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Bh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Ih=n,r.target.dispatchEvent(n),Ih=null}else return t=ba(r),t!==null&&pp(t),e.blockedOn=r,!1;t.shift()}return!0}function tv(e,t,r){Wl(e)&&r.delete(t)}function T3(){jh=!1,jn!==null&&Wl(jn)&&(jn=null),Bn!==null&&Wl(Bn)&&(Bn=null),Fn!==null&&Wl(Fn)&&(Fn=null),Go.forEach(tv),qo.forEach(tv)}function fo(e,t){e.blockedOn===t&&(e.blockedOn=null,jh||(jh=!0,ur.unstable_scheduleCallback(ur.unstable_NormalPriority,T3)))}function Yo(e){function t(i){return fo(i,e)}if(0<fl.length){fo(fl[0],e);for(var r=1;r<fl.length;r++){var n=fl[r];n.blockedOn===e&&(n.blockedOn=null)}}for(jn!==null&&fo(jn,e),Bn!==null&&fo(Bn,e),Fn!==null&&fo(Fn,e),Go.forEach(t),qo.forEach(t),r=0;r<Nn.length;r++)n=Nn[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Nn.length&&(r=Nn[0],r.blockedOn===null);)cy(r),r.blockedOn===null&&Nn.shift()}var ys=gn.ReactCurrentBatchConfig,_c=!0;function D3(e,t,r,n){var i=Xe,s=ys.transition;ys.transition=null;try{Xe=1,mp(e,t,r,n)}finally{Xe=i,ys.transition=s}}function I3(e,t,r,n){var i=Xe,s=ys.transition;ys.transition=null;try{Xe=4,mp(e,t,r,n)}finally{Xe=i,ys.transition=s}}function mp(e,t,r,n){if(_c){var i=Bh(e,t,r,n);if(i===null)xf(e,t,n,yc,r),ev(e,n);else if(P3(i,e,t,r,n))n.stopPropagation();else if(ev(e,n),t&4&&-1<L3.indexOf(e)){for(;i!==null;){var s=ba(i);if(s!==null&&sy(s),s=Bh(e,t,r,n),s===null&&xf(e,t,n,yc,r),s===i)break;i=s}i!==null&&n.stopPropagation()}else xf(e,t,n,null,r)}}var yc=null;function Bh(e,t,r,n){if(yc=null,e=fp(n),e=di(e),e!==null)if(t=Di(e),t===null)e=null;else if(r=t.tag,r===13){if(e=X0(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 yc=e,null}function uy(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(y3()){case hp:return 1;case ty:return 4;case gc:case w3:return 16;case ry:return 536870912;default:return 16}default:return 16}}var On=null,gp=null,Vl=null;function fy(){if(Vl)return Vl;var e,t=gp,r=t.length,n,i="value"in On?On.value:On.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 Vl=i.slice(e,1<n?1-n:void 0)}function Kl(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 hl(){return!0}function rv(){return!1}function hr(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)?hl:rv,this.isPropagationStopped=rv,this}return ft(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=hl)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=hl)},persist:function(){},isPersistent:hl}),t}var js={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vp=hr(js),wa=ft({},js,{view:0,detail:0}),N3=hr(wa),gf,vf,ho,Qc=ft({},wa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_p,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!==ho&&(ho&&e.type==="mousemove"?(gf=e.screenX-ho.screenX,vf=e.screenY-ho.screenY):vf=gf=0,ho=e),gf)},movementY:function(e){return"movementY"in e?e.movementY:vf}}),nv=hr(Qc),R3=ft({},Qc,{dataTransfer:0}),O3=hr(R3),M3=ft({},wa,{relatedTarget:0}),_f=hr(M3),j3=ft({},js,{animationName:0,elapsedTime:0,pseudoElement:0}),B3=hr(j3),F3=ft({},js,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),z3=hr(F3),$3=ft({},js,{data:0}),iv=hr($3),U3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},H3={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"},W3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function V3(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=W3[e])?!!t[e]:!1}function _p(){return V3}var K3=ft({},wa,{key:function(e){if(e.key){var t=U3[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Kl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?H3[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_p,charCode:function(e){return e.type==="keypress"?Kl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Kl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),G3=hr(K3),q3=ft({},Qc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sv=hr(q3),Y3=ft({},wa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_p}),J3=hr(Y3),X3=ft({},js,{propertyName:0,elapsedTime:0,pseudoElement:0}),Q3=hr(X3),Z3=ft({},Qc,{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}),e4=hr(Z3),t4=[9,13,27,32],yp=cn&&"CompositionEvent"in window,Do=null;cn&&"documentMode"in document&&(Do=document.documentMode);var r4=cn&&"TextEvent"in window&&!Do,hy=cn&&(!yp||Do&&8<Do&&11>=Do),ov=" ",av=!1;function dy(e,t){switch(e){case"keyup":return t4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function py(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ss=!1;function n4(e,t){switch(e){case"compositionend":return py(t);case"keypress":return t.which!==32?null:(av=!0,ov);case"textInput":return e=t.data,e===ov&&av?null:e;default:return null}}function i4(e,t){if(ss)return e==="compositionend"||!yp&&dy(e,t)?(e=fy(),Vl=gp=On=null,ss=!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 hy&&t.locale!=="ko"?null:t.data;default:return null}}var s4={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 lv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!s4[e.type]:t==="textarea"}function my(e,t,r,n){K0(n),t=wc(t,"onChange"),0<t.length&&(r=new vp("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Io=null,Jo=null;function o4(e){Ey(e,0)}function Zc(e){var t=ls(e);if(F0(t))return e}function a4(e,t){if(e==="change")return t}var gy=!1;if(cn){var yf;if(cn){var wf="oninput"in document;if(!wf){var cv=document.createElement("div");cv.setAttribute("oninput","return;"),wf=typeof cv.oninput=="function"}yf=wf}else yf=!1;gy=yf&&(!document.documentMode||9<document.documentMode)}function uv(){Io&&(Io.detachEvent("onpropertychange",vy),Jo=Io=null)}function vy(e){if(e.propertyName==="value"&&Zc(Jo)){var t=[];my(t,Jo,e,fp(e)),J0(o4,t)}}function l4(e,t,r){e==="focusin"?(uv(),Io=t,Jo=r,Io.attachEvent("onpropertychange",vy)):e==="focusout"&&uv()}function c4(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Zc(Jo)}function u4(e,t){if(e==="click")return Zc(t)}function f4(e,t){if(e==="input"||e==="change")return Zc(t)}function h4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Nr=typeof Object.is=="function"?Object.is:h4;function Xo(e,t){if(Nr(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(!wh.call(t,i)||!Nr(e[i],t[i]))return!1}return!0}function fv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hv(e,t){var r=fv(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=fv(r)}}function _y(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_y(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yy(){for(var e=window,t=dc();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=dc(e.document)}return t}function wp(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 d4(e){var t=yy(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&_y(r.ownerDocument.documentElement,r)){if(n!==null&&wp(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=hv(r,s);var a=hv(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 p4=cn&&"documentMode"in document&&11>=document.documentMode,os=null,Fh=null,No=null,zh=!1;function dv(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;zh||os==null||os!==dc(n)||(n=os,"selectionStart"in n&&wp(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}),No&&Xo(No,n)||(No=n,n=wc(Fh,"onSelect"),0<n.length&&(t=new vp("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=os)))}function dl(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var as={animationend:dl("Animation","AnimationEnd"),animationiteration:dl("Animation","AnimationIteration"),animationstart:dl("Animation","AnimationStart"),transitionend:dl("Transition","TransitionEnd")},bf={},wy={};cn&&(wy=document.createElement("div").style,"AnimationEvent"in window||(delete as.animationend.animation,delete as.animationiteration.animation,delete as.animationstart.animation),"TransitionEvent"in window||delete as.transitionend.transition);function eu(e){if(bf[e])return bf[e];if(!as[e])return e;var t=as[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in wy)return bf[e]=t[r];return e}var by=eu("animationend"),Sy=eu("animationiteration"),Cy=eu("animationstart"),ky=eu("transitionend"),xy=new Map,pv="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 ti(e,t){xy.set(e,t),Ti(t,[e])}for(var Sf=0;Sf<pv.length;Sf++){var Cf=pv[Sf],m4=Cf.toLowerCase(),g4=Cf[0].toUpperCase()+Cf.slice(1);ti(m4,"on"+g4)}ti(by,"onAnimationEnd");ti(Sy,"onAnimationIteration");ti(Cy,"onAnimationStart");ti("dblclick","onDoubleClick");ti("focusin","onFocus");ti("focusout","onBlur");ti(ky,"onTransitionEnd");xs("onMouseEnter",["mouseout","mouseover"]);xs("onMouseLeave",["mouseout","mouseover"]);xs("onPointerEnter",["pointerout","pointerover"]);xs("onPointerLeave",["pointerout","pointerover"]);Ti("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ti("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ti("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ti("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ti("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ti("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(" "),v4=new Set("cancel close invalid load scroll toggle".split(" ").concat(Eo));function mv(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,m3(n,t,void 0,e),e.currentTarget=null}function Ey(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;mv(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;mv(i,o,c),s=l}}}if(mc)throw e=Oh,mc=!1,Oh=null,e}function nt(e,t){var r=t[Vh];r===void 0&&(r=t[Vh]=new Set);var n=e+"__bubble";r.has(n)||(Ay(t,e,2,!1),r.add(n))}function kf(e,t,r){var n=0;t&&(n|=4),Ay(r,e,n,t)}var pl="_reactListening"+Math.random().toString(36).slice(2);function Qo(e){if(!e[pl]){e[pl]=!0,R0.forEach(function(r){r!=="selectionchange"&&(v4.has(r)||kf(r,!1,e),kf(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[pl]||(t[pl]=!0,kf("selectionchange",!1,t))}}function Ay(e,t,r,n){switch(uy(t)){case 1:var i=D3;break;case 4:i=I3;break;default:i=mp}r=i.bind(null,t,r,e),i=void 0,!Rh||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 xf(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=di(o),a===null)return;if(l=a.tag,l===5||l===6){n=s=a;continue e}o=o.parentNode}}n=n.return}J0(function(){var c=s,h=fp(r),u=[];e:{var m=xy.get(e);if(m!==void 0){var v=vp,w=e;switch(e){case"keypress":if(Kl(r)===0)break e;case"keydown":case"keyup":v=G3;break;case"focusin":w="focus",v=_f;break;case"focusout":w="blur",v=_f;break;case"beforeblur":case"afterblur":v=_f;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":v=nv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=O3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=J3;break;case by:case Sy:case Cy:v=B3;break;case ky:v=Q3;break;case"scroll":v=N3;break;case"wheel":v=e4;break;case"copy":case"cut":case"paste":v=z3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=sv}var _=(t&4)!==0,g=!_&&e==="scroll",d=_?m!==null?m+"Capture":null:m;_=[];for(var f=c,p;f!==null;){p=f;var y=p.stateNode;if(p.tag===5&&y!==null&&(p=y,d!==null&&(y=Ko(f,d),y!=null&&_.push(Zo(f,y,p)))),g)break;f=f.return}0<_.length&&(m=new v(m,w,null,r,h),u.push({event:m,listeners:_}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",m&&r!==Ih&&(w=r.relatedTarget||r.fromElement)&&(di(w)||w[un]))break e;if((v||m)&&(m=h.window===h?h:(m=h.ownerDocument)?m.defaultView||m.parentWindow:window,v?(w=r.relatedTarget||r.toElement,v=c,w=w?di(w):null,w!==null&&(g=Di(w),w!==g||w.tag!==5&&w.tag!==6)&&(w=null)):(v=null,w=c),v!==w)){if(_=nv,y="onMouseLeave",d="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(_=sv,y="onPointerLeave",d="onPointerEnter",f="pointer"),g=v==null?m:ls(v),p=w==null?m:ls(w),m=new _(y,f+"leave",v,r,h),m.target=g,m.relatedTarget=p,y=null,di(h)===c&&(_=new _(d,f+"enter",w,r,h),_.target=p,_.relatedTarget=g,y=_),g=y,v&&w)t:{for(_=v,d=w,f=0,p=_;p;p=Hi(p))f++;for(p=0,y=d;y;y=Hi(y))p++;for(;0<f-p;)_=Hi(_),f--;for(;0<p-f;)d=Hi(d),p--;for(;f--;){if(_===d||d!==null&&_===d.alternate)break t;_=Hi(_),d=Hi(d)}_=null}else _=null;v!==null&&gv(u,m,v,_,!1),w!==null&&g!==null&&gv(u,g,w,_,!0)}}e:{if(m=c?ls(c):window,v=m.nodeName&&m.nodeName.toLowerCase(),v==="select"||v==="input"&&m.type==="file")var S=a4;else if(lv(m))if(gy)S=f4;else{S=c4;var b=l4}else(v=m.nodeName)&&v.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(S=u4);if(S&&(S=S(e,c))){my(u,S,r,h);break e}b&&b(e,m,c),e==="focusout"&&(b=m._wrapperState)&&b.controlled&&m.type==="number"&&Ah(m,"number",m.value)}switch(b=c?ls(c):window,e){case"focusin":(lv(b)||b.contentEditable==="true")&&(os=b,Fh=c,No=null);break;case"focusout":No=Fh=os=null;break;case"mousedown":zh=!0;break;case"contextmenu":case"mouseup":case"dragend":zh=!1,dv(u,r,h);break;case"selectionchange":if(p4)break;case"keydown":case"keyup":dv(u,r,h)}var E;if(yp)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 ss?dy(e,r)&&(C="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(C="onCompositionStart");C&&(hy&&r.locale!=="ko"&&(ss||C!=="onCompositionStart"?C==="onCompositionEnd"&&ss&&(E=fy()):(On=h,gp="value"in On?On.value:On.textContent,ss=!0)),b=wc(c,C),0<b.length&&(C=new iv(C,e,null,r,h),u.push({event:C,listeners:b}),E?C.data=E:(E=py(r),E!==null&&(C.data=E)))),(E=r4?n4(e,r):i4(e,r))&&(c=wc(c,"onBeforeInput"),0<c.length&&(h=new iv("onBeforeInput","beforeinput",null,r,h),u.push({event:h,listeners:c}),h.data=E))}Ey(u,t)})}function Zo(e,t,r){return{instance:e,listener:t,currentTarget:r}}function wc(e,t){for(var r=t+"Capture",n=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Ko(e,r),s!=null&&n.unshift(Zo(e,s,i)),s=Ko(e,t),s!=null&&n.push(Zo(e,s,i))),e=e.return}return n}function Hi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function gv(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=Ko(r,s),l!=null&&a.unshift(Zo(r,l,o))):i||(l=Ko(r,s),l!=null&&a.push(Zo(r,l,o)))),r=r.return}a.length!==0&&e.push({event:t,listeners:a})}var _4=/\r\n?/g,y4=/\u0000|\uFFFD/g;function vv(e){return(typeof e=="string"?e:""+e).replace(_4,`
|
|
38
|
+
`).replace(y4,"")}function ml(e,t,r){if(t=vv(t),vv(e)!==t&&r)throw Error(fe(425))}function bc(){}var $h=null,Uh=null;function Hh(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 Wh=typeof setTimeout=="function"?setTimeout:void 0,w4=typeof clearTimeout=="function"?clearTimeout:void 0,_v=typeof Promise=="function"?Promise:void 0,b4=typeof queueMicrotask=="function"?queueMicrotask:typeof _v<"u"?function(e){return _v.resolve(null).then(e).catch(S4)}:Wh;function S4(e){setTimeout(function(){throw e})}function Ef(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),Yo(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);Yo(t)}function zn(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 yv(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 Bs=Math.random().toString(36).slice(2),Ur="__reactFiber$"+Bs,ea="__reactProps$"+Bs,un="__reactContainer$"+Bs,Vh="__reactEvents$"+Bs,C4="__reactListeners$"+Bs,k4="__reactHandles$"+Bs;function di(e){var t=e[Ur];if(t)return t;for(var r=e.parentNode;r;){if(t=r[un]||r[Ur]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=yv(e);e!==null;){if(r=e[Ur])return r;e=yv(e)}return t}e=r,r=e.parentNode}return null}function ba(e){return e=e[Ur]||e[un],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ls(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(fe(33))}function tu(e){return e[ea]||null}var Kh=[],cs=-1;function ri(e){return{current:e}}function st(e){0>cs||(e.current=Kh[cs],Kh[cs]=null,cs--)}function tt(e,t){cs++,Kh[cs]=e.current,e.current=t}var Yn={},Mt=ri(Yn),Yt=ri(!1),wi=Yn;function Es(e,t){var r=e.type.contextTypes;if(!r)return Yn;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 Jt(e){return e=e.childContextTypes,e!=null}function Sc(){st(Yt),st(Mt)}function wv(e,t,r){if(Mt.current!==Yn)throw Error(fe(168));tt(Mt,t),tt(Yt,r)}function Ly(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,l3(e)||"Unknown",i));return ft({},r,n)}function Cc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Yn,wi=Mt.current,tt(Mt,e),tt(Yt,Yt.current),!0}function bv(e,t,r){var n=e.stateNode;if(!n)throw Error(fe(169));r?(e=Ly(e,t,wi),n.__reactInternalMemoizedMergedChildContext=e,st(Yt),st(Mt),tt(Mt,e)):st(Yt),tt(Yt,r)}var nn=null,ru=!1,Af=!1;function Py(e){nn===null?nn=[e]:nn.push(e)}function x4(e){ru=!0,Py(e)}function ni(){if(!Af&&nn!==null){Af=!0;var e=0,t=Xe;try{var r=nn;for(Xe=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}nn=null,ru=!1}catch(i){throw nn!==null&&(nn=nn.slice(e+1)),ey(hp,ni),i}finally{Xe=t,Af=!1}}return null}var us=[],fs=0,kc=null,xc=0,gr=[],vr=0,bi=null,sn=1,on="";function ci(e,t){us[fs++]=xc,us[fs++]=kc,kc=e,xc=t}function Ty(e,t,r){gr[vr++]=sn,gr[vr++]=on,gr[vr++]=bi,bi=e;var n=sn;e=on;var i=32-Tr(n)-1;n&=~(1<<i),r+=1;var s=32-Tr(t)+i;if(30<s){var a=i-i%5;s=(n&(1<<a)-1).toString(32),n>>=a,i-=a,sn=1<<32-Tr(t)+i|r<<i|n,on=s+e}else sn=1<<s|r<<i|n,on=e}function bp(e){e.return!==null&&(ci(e,1),Ty(e,1,0))}function Sp(e){for(;e===kc;)kc=us[--fs],us[fs]=null,xc=us[--fs],us[fs]=null;for(;e===bi;)bi=gr[--vr],gr[vr]=null,on=gr[--vr],gr[vr]=null,sn=gr[--vr],gr[vr]=null}var lr=null,or=null,at=!1,Lr=null;function Dy(e,t){var r=yr(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 Sv(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,lr=e,or=zn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,lr=e,or=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=bi!==null?{id:sn,overflow:on}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=yr(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,lr=e,or=null,!0):!1;default:return!1}}function Gh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function qh(e){if(at){var t=or;if(t){var r=t;if(!Sv(e,t)){if(Gh(e))throw Error(fe(418));t=zn(r.nextSibling);var n=lr;t&&Sv(e,t)?Dy(n,r):(e.flags=e.flags&-4097|2,at=!1,lr=e)}}else{if(Gh(e))throw Error(fe(418));e.flags=e.flags&-4097|2,at=!1,lr=e}}}function Cv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;lr=e}function gl(e){if(e!==lr)return!1;if(!at)return Cv(e),at=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Hh(e.type,e.memoizedProps)),t&&(t=or)){if(Gh(e))throw Iy(),Error(fe(418));for(;t;)Dy(e,t),t=zn(t.nextSibling)}if(Cv(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){or=zn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}or=null}}else or=lr?zn(e.stateNode.nextSibling):null;return!0}function Iy(){for(var e=or;e;)e=zn(e.nextSibling)}function As(){or=lr=null,at=!1}function Cp(e){Lr===null?Lr=[e]:Lr.push(e)}var E4=gn.ReactCurrentBatchConfig;function po(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 vl(e,t){throw e=Object.prototype.toString.call(t),Error(fe(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function kv(e){var t=e._init;return t(e._payload)}function Ny(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=Wn(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,y){return f===null||f.tag!==6?(f=Rf(p,d.mode,y),f.return=d,f):(f=i(f,p),f.return=d,f)}function l(d,f,p,y){var S=p.type;return S===is?h(d,f,p.props.children,y,p.key):f!==null&&(f.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Dn&&kv(S)===f.type)?(y=i(f,p.props),y.ref=po(d,f,p),y.return=d,y):(y=Zl(p.type,p.key,p.props,null,d.mode,y),y.ref=po(d,f,p),y.return=d,y)}function c(d,f,p,y){return f===null||f.tag!==4||f.stateNode.containerInfo!==p.containerInfo||f.stateNode.implementation!==p.implementation?(f=Of(p,d.mode,y),f.return=d,f):(f=i(f,p.children||[]),f.return=d,f)}function h(d,f,p,y,S){return f===null||f.tag!==7?(f=yi(p,d.mode,y,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=Rf(""+f,d.mode,p),f.return=d,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case ol:return p=Zl(f.type,f.key,f.props,null,d.mode,p),p.ref=po(d,null,f),p.return=d,p;case ns:return f=Of(f,d.mode,p),f.return=d,f;case Dn:var y=f._init;return u(d,y(f._payload),p)}if(ko(f)||lo(f))return f=yi(f,d.mode,p,null),f.return=d,f;vl(d,f)}return null}function m(d,f,p,y){var S=f!==null?f.key:null;if(typeof p=="string"&&p!==""||typeof p=="number")return S!==null?null:o(d,f,""+p,y);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case ol:return p.key===S?l(d,f,p,y):null;case ns:return p.key===S?c(d,f,p,y):null;case Dn:return S=p._init,m(d,f,S(p._payload),y)}if(ko(p)||lo(p))return S!==null?null:h(d,f,p,y,null);vl(d,p)}return null}function v(d,f,p,y,S){if(typeof y=="string"&&y!==""||typeof y=="number")return d=d.get(p)||null,o(f,d,""+y,S);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case ol:return d=d.get(y.key===null?p:y.key)||null,l(f,d,y,S);case ns:return d=d.get(y.key===null?p:y.key)||null,c(f,d,y,S);case Dn:var b=y._init;return v(d,f,p,b(y._payload),S)}if(ko(y)||lo(y))return d=d.get(p)||null,h(f,d,y,S,null);vl(f,y)}return null}function w(d,f,p,y){for(var S=null,b=null,E=f,C=f=0,A=null;E!==null&&C<p.length;C++){E.index>C?(A=E,E=null):A=E.sibling;var T=m(d,E,p[C],y);if(T===null){E===null&&(E=A);break}e&&E&&T.alternate===null&&t(d,E),f=s(T,f,C),b===null?S=T:b.sibling=T,b=T,E=A}if(C===p.length)return r(d,E),at&&ci(d,C),S;if(E===null){for(;C<p.length;C++)E=u(d,p[C],y),E!==null&&(f=s(E,f,C),b===null?S=E:b.sibling=E,b=E);return at&&ci(d,C),S}for(E=n(d,E);C<p.length;C++)A=v(E,d,C,p[C],y),A!==null&&(e&&A.alternate!==null&&E.delete(A.key===null?C:A.key),f=s(A,f,C),b===null?S=A:b.sibling=A,b=A);return e&&E.forEach(function(O){return t(d,O)}),at&&ci(d,C),S}function _(d,f,p,y){var S=lo(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,E=f,C=f=0,A=null,T=p.next();E!==null&&!T.done;C++,T=p.next()){E.index>C?(A=E,E=null):A=E.sibling;var O=m(d,E,T.value,y);if(O===null){E===null&&(E=A);break}e&&E&&O.alternate===null&&t(d,E),f=s(O,f,C),b===null?S=O:b.sibling=O,b=O,E=A}if(T.done)return r(d,E),at&&ci(d,C),S;if(E===null){for(;!T.done;C++,T=p.next())T=u(d,T.value,y),T!==null&&(f=s(T,f,C),b===null?S=T:b.sibling=T,b=T);return at&&ci(d,C),S}for(E=n(d,E);!T.done;C++,T=p.next())T=v(E,d,C,T.value,y),T!==null&&(e&&T.alternate!==null&&E.delete(T.key===null?C:T.key),f=s(T,f,C),b===null?S=T:b.sibling=T,b=T);return e&&E.forEach(function(R){return t(d,R)}),at&&ci(d,C),S}function g(d,f,p,y){if(typeof p=="object"&&p!==null&&p.type===is&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case ol:e:{for(var S=p.key,b=f;b!==null;){if(b.key===S){if(S=p.type,S===is){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===Dn&&kv(S)===b.type){r(d,b.sibling),f=i(b,p.props),f.ref=po(d,b,p),f.return=d,d=f;break e}r(d,b);break}else t(d,b);b=b.sibling}p.type===is?(f=yi(p.props.children,d.mode,y,p.key),f.return=d,d=f):(y=Zl(p.type,p.key,p.props,null,d.mode,y),y.ref=po(d,f,p),y.return=d,d=y)}return a(d);case ns: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=Of(p,d.mode,y),f.return=d,d=f}return a(d);case Dn:return b=p._init,g(d,f,b(p._payload),y)}if(ko(p))return w(d,f,p,y);if(lo(p))return _(d,f,p,y);vl(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=Rf(p,d.mode,y),f.return=d,d=f),a(d)):r(d,f)}return g}var Ls=Ny(!0),Ry=Ny(!1),Ec=ri(null),Ac=null,hs=null,kp=null;function xp(){kp=hs=Ac=null}function Ep(e){var t=Ec.current;st(Ec),e._currentValue=t}function Yh(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 ws(e,t){Ac=e,kp=hs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(qt=!0),e.firstContext=null)}function br(e){var t=e._currentValue;if(kp!==e)if(e={context:e,memoizedValue:t,next:null},hs===null){if(Ac===null)throw Error(fe(308));hs=e,Ac.dependencies={lanes:0,firstContext:e}}else hs=hs.next=e;return t}var pi=null;function Ap(e){pi===null?pi=[e]:pi.push(e)}function Oy(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,Ap(t)):(r.next=i.next,i.next=r),t.interleaved=r,fn(e,n)}function fn(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 In=!1;function Lp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function My(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 an(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function $n(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Ye&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,fn(e,r)}return i=n.interleaved,i===null?(t.next=t,Ap(n)):(t.next=i.next,i.next=t),n.interleaved=t,fn(e,r)}function Gl(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,dp(e,r)}}function xv(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 Lc(e,t,r,n){var i=e.updateQueue;In=!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,v=o.eventTime;if((n&m)===m){h!==null&&(h=h.next={eventTime:v,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var w=e,_=o;switch(m=t,v=r,_.tag){case 1:if(w=_.payload,typeof w=="function"){u=w.call(v,u,m);break e}u=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=_.payload,m=typeof w=="function"?w.call(v,u,m):w,m==null)break e;u=ft({},u,m);break e;case 2:In=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,m=i.effects,m===null?i.effects=[o]:m.push(o))}else v={eventTime:v,lane:m,tag:o.tag,payload:o.payload,callback:o.callback,next:null},h===null?(c=h=v,l=u):h=h.next=v,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);Ci|=a,e.lanes=a,e.memoizedState=u}}function Ev(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 Sa={},Kr=ri(Sa),ta=ri(Sa),ra=ri(Sa);function mi(e){if(e===Sa)throw Error(fe(174));return e}function Pp(e,t){switch(tt(ra,t),tt(ta,e),tt(Kr,Sa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ph(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ph(t,e)}st(Kr),tt(Kr,t)}function Ps(){st(Kr),st(ta),st(ra)}function jy(e){mi(ra.current);var t=mi(Kr.current),r=Ph(t,e.type);t!==r&&(tt(ta,e),tt(Kr,r))}function Tp(e){ta.current===e&&(st(Kr),st(ta))}var ct=ri(0);function Pc(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 Lf=[];function Dp(){for(var e=0;e<Lf.length;e++)Lf[e]._workInProgressVersionPrimary=null;Lf.length=0}var ql=gn.ReactCurrentDispatcher,Pf=gn.ReactCurrentBatchConfig,Si=0,ut=null,St=null,xt=null,Tc=!1,Ro=!1,na=0,A4=0;function It(){throw Error(fe(321))}function Ip(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Nr(e[r],t[r]))return!1;return!0}function Np(e,t,r,n,i,s){if(Si=s,ut=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ql.current=e===null||e.memoizedState===null?D4:I4,e=r(n,i),Ro){s=0;do{if(Ro=!1,na=0,25<=s)throw Error(fe(301));s+=1,xt=St=null,t.updateQueue=null,ql.current=N4,e=r(n,i)}while(Ro)}if(ql.current=Dc,t=St!==null&&St.next!==null,Si=0,xt=St=ut=null,Tc=!1,t)throw Error(fe(300));return e}function Rp(){var e=na!==0;return na=0,e}function zr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?ut.memoizedState=xt=e:xt=xt.next=e,xt}function Sr(){if(St===null){var e=ut.alternate;e=e!==null?e.memoizedState:null}else e=St.next;var t=xt===null?ut.memoizedState:xt.next;if(t!==null)xt=t,St=e;else{if(e===null)throw Error(fe(310));St=e,e={memoizedState:St.memoizedState,baseState:St.baseState,baseQueue:St.baseQueue,queue:St.queue,next:null},xt===null?ut.memoizedState=xt=e:xt=xt.next=e}return xt}function ia(e,t){return typeof t=="function"?t(e):t}function Tf(e){var t=Sr(),r=t.queue;if(r===null)throw Error(fe(311));r.lastRenderedReducer=e;var n=St,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((Si&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,ut.lanes|=h,Ci|=h}c=c.next}while(c!==null&&c!==s);l===null?a=n:l.next=o,Nr(n,t.memoizedState)||(qt=!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,ut.lanes|=s,Ci|=s,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Df(e){var t=Sr(),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);Nr(s,t.memoizedState)||(qt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),r.lastRenderedState=s}return[s,n]}function By(){}function Fy(e,t){var r=ut,n=Sr(),i=t(),s=!Nr(n.memoizedState,i);if(s&&(n.memoizedState=i,qt=!0),n=n.queue,Op(Uy.bind(null,r,n,e),[e]),n.getSnapshot!==t||s||xt!==null&&xt.memoizedState.tag&1){if(r.flags|=2048,sa(9,$y.bind(null,r,n,i,t),void 0,null),Et===null)throw Error(fe(349));Si&30||zy(r,t,i)}return i}function zy(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ut.updateQueue,t===null?(t={lastEffect:null,stores:null},ut.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function $y(e,t,r,n){t.value=r,t.getSnapshot=n,Hy(t)&&Wy(e)}function Uy(e,t,r){return r(function(){Hy(t)&&Wy(e)})}function Hy(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Nr(e,r)}catch{return!0}}function Wy(e){var t=fn(e,1);t!==null&&Dr(t,e,1,-1)}function Av(e){var t=zr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:e},t.queue=e,e=e.dispatch=T4.bind(null,ut,e),[t.memoizedState,e]}function sa(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=ut.updateQueue,t===null?(t={lastEffect:null,stores:null},ut.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 Vy(){return Sr().memoizedState}function Yl(e,t,r,n){var i=zr();ut.flags|=e,i.memoizedState=sa(1|t,r,void 0,n===void 0?null:n)}function nu(e,t,r,n){var i=Sr();n=n===void 0?null:n;var s=void 0;if(St!==null){var a=St.memoizedState;if(s=a.destroy,n!==null&&Ip(n,a.deps)){i.memoizedState=sa(t,r,s,n);return}}ut.flags|=e,i.memoizedState=sa(1|t,r,s,n)}function Lv(e,t){return Yl(8390656,8,e,t)}function Op(e,t){return nu(2048,8,e,t)}function Ky(e,t){return nu(4,2,e,t)}function Gy(e,t){return nu(4,4,e,t)}function qy(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 Yy(e,t,r){return r=r!=null?r.concat([e]):null,nu(4,4,qy.bind(null,t,e),r)}function Mp(){}function Jy(e,t){var r=Sr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Ip(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function Xy(e,t){var r=Sr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Ip(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Qy(e,t,r){return Si&21?(Nr(r,t)||(r=ny(),ut.lanes|=r,Ci|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,qt=!0),e.memoizedState=r)}function L4(e,t){var r=Xe;Xe=r!==0&&4>r?r:4,e(!0);var n=Pf.transition;Pf.transition={};try{e(!1),t()}finally{Xe=r,Pf.transition=n}}function Zy(){return Sr().memoizedState}function P4(e,t,r){var n=Hn(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},ew(e))tw(t,r);else if(r=Oy(e,t,r,n),r!==null){var i=zt();Dr(r,e,n,i),rw(r,t,n)}}function T4(e,t,r){var n=Hn(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(ew(e))tw(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,Nr(o,a)){var l=t.interleaved;l===null?(i.next=i,Ap(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=Oy(e,t,i,n),r!==null&&(i=zt(),Dr(r,e,n,i),rw(r,t,n))}}function ew(e){var t=e.alternate;return e===ut||t!==null&&t===ut}function tw(e,t){Ro=Tc=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function rw(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,dp(e,r)}}var Dc={readContext:br,useCallback:It,useContext:It,useEffect:It,useImperativeHandle:It,useInsertionEffect:It,useLayoutEffect:It,useMemo:It,useReducer:It,useRef:It,useState:It,useDebugValue:It,useDeferredValue:It,useTransition:It,useMutableSource:It,useSyncExternalStore:It,useId:It,unstable_isNewReconciler:!1},D4={readContext:br,useCallback:function(e,t){return zr().memoizedState=[e,t===void 0?null:t],e},useContext:br,useEffect:Lv,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Yl(4194308,4,qy.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Yl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Yl(4,2,e,t)},useMemo:function(e,t){var r=zr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=zr();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=P4.bind(null,ut,e),[n.memoizedState,e]},useRef:function(e){var t=zr();return e={current:e},t.memoizedState=e},useState:Av,useDebugValue:Mp,useDeferredValue:function(e){return zr().memoizedState=e},useTransition:function(){var e=Av(!1),t=e[0];return e=L4.bind(null,e[1]),zr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ut,i=zr();if(at){if(r===void 0)throw Error(fe(407));r=r()}else{if(r=t(),Et===null)throw Error(fe(349));Si&30||zy(n,t,r)}i.memoizedState=r;var s={value:r,getSnapshot:t};return i.queue=s,Lv(Uy.bind(null,n,s,e),[e]),n.flags|=2048,sa(9,$y.bind(null,n,s,r,t),void 0,null),r},useId:function(){var e=zr(),t=Et.identifierPrefix;if(at){var r=on,n=sn;r=(n&~(1<<32-Tr(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=na++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=A4++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},I4={readContext:br,useCallback:Jy,useContext:br,useEffect:Op,useImperativeHandle:Yy,useInsertionEffect:Ky,useLayoutEffect:Gy,useMemo:Xy,useReducer:Tf,useRef:Vy,useState:function(){return Tf(ia)},useDebugValue:Mp,useDeferredValue:function(e){var t=Sr();return Qy(t,St.memoizedState,e)},useTransition:function(){var e=Tf(ia)[0],t=Sr().memoizedState;return[e,t]},useMutableSource:By,useSyncExternalStore:Fy,useId:Zy,unstable_isNewReconciler:!1},N4={readContext:br,useCallback:Jy,useContext:br,useEffect:Op,useImperativeHandle:Yy,useInsertionEffect:Ky,useLayoutEffect:Gy,useMemo:Xy,useReducer:Df,useRef:Vy,useState:function(){return Df(ia)},useDebugValue:Mp,useDeferredValue:function(e){var t=Sr();return St===null?t.memoizedState=e:Qy(t,St.memoizedState,e)},useTransition:function(){var e=Df(ia)[0],t=Sr().memoizedState;return[e,t]},useMutableSource:By,useSyncExternalStore:Fy,useId:Zy,unstable_isNewReconciler:!1};function Er(e,t){if(e&&e.defaultProps){t=ft({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Jh(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:ft({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var iu={isMounted:function(e){return(e=e._reactInternals)?Di(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=zt(),i=Hn(e),s=an(n,i);s.payload=t,r!=null&&(s.callback=r),t=$n(e,s,i),t!==null&&(Dr(t,e,i,n),Gl(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=zt(),i=Hn(e),s=an(n,i);s.tag=1,s.payload=t,r!=null&&(s.callback=r),t=$n(e,s,i),t!==null&&(Dr(t,e,i,n),Gl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=zt(),n=Hn(e),i=an(r,n);i.tag=2,t!=null&&(i.callback=t),t=$n(e,i,n),t!==null&&(Dr(t,e,n,r),Gl(t,e,n))}};function Pv(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?!Xo(r,n)||!Xo(i,s):!0}function nw(e,t,r){var n=!1,i=Yn,s=t.contextType;return typeof s=="object"&&s!==null?s=br(s):(i=Jt(t)?wi:Mt.current,n=t.contextTypes,s=(n=n!=null)?Es(e,i):Yn),t=new t(r,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=iu,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Tv(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&&iu.enqueueReplaceState(t,t.state,null)}function Xh(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},Lp(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=br(s):(s=Jt(t)?wi:Mt.current,i.context=Es(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Jh(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&&iu.enqueueReplaceState(i,i.state,null),Lc(e,r,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Ts(e,t){try{var r="",n=t;do r+=a3(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 If(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Qh(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var R4=typeof WeakMap=="function"?WeakMap:Map;function iw(e,t,r){r=an(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Nc||(Nc=!0,ld=n),Qh(e,t)},r}function sw(e,t,r){r=an(-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(){Qh(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){Qh(e,t),typeof n!="function"&&(Un===null?Un=new Set([this]):Un.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}function Dv(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new R4;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=q4.bind(null,e,t,r),t.then(e,e))}function Iv(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 Nv(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=an(-1,1),t.tag=2,$n(r,t,1))),r.lanes|=1),e)}var O4=gn.ReactCurrentOwner,qt=!1;function Bt(e,t,r,n){t.child=e===null?Ry(t,null,r,n):Ls(t,e.child,r,n)}function Rv(e,t,r,n,i){r=r.render;var s=t.ref;return ws(t,i),n=Np(e,t,r,n,s,i),r=Rp(),e!==null&&!qt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,hn(e,t,i)):(at&&r&&bp(t),t.flags|=1,Bt(e,t,n,i),t.child)}function Ov(e,t,r,n,i){if(e===null){var s=r.type;return typeof s=="function"&&!Wp(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=s,ow(e,t,s,n,i)):(e=Zl(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:Xo,r(a,n)&&e.ref===t.ref)return hn(e,t,i)}return t.flags|=1,e=Wn(s,n),e.ref=t.ref,e.return=t,t.child=e}function ow(e,t,r,n,i){if(e!==null){var s=e.memoizedProps;if(Xo(s,n)&&e.ref===t.ref)if(qt=!1,t.pendingProps=n=s,(e.lanes&i)!==0)e.flags&131072&&(qt=!0);else return t.lanes=e.lanes,hn(e,t,i)}return Zh(e,t,r,n,i)}function aw(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},tt(ps,sr),sr|=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,tt(ps,sr),sr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:r,tt(ps,sr),sr|=n}else s!==null?(n=s.baseLanes|r,t.memoizedState=null):n=r,tt(ps,sr),sr|=n;return Bt(e,t,i,r),t.child}function lw(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Zh(e,t,r,n,i){var s=Jt(r)?wi:Mt.current;return s=Es(t,s),ws(t,i),r=Np(e,t,r,n,s,i),n=Rp(),e!==null&&!qt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,hn(e,t,i)):(at&&n&&bp(t),t.flags|=1,Bt(e,t,r,i),t.child)}function Mv(e,t,r,n,i){if(Jt(r)){var s=!0;Cc(t)}else s=!1;if(ws(t,i),t.stateNode===null)Jl(e,t),nw(t,r,n),Xh(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=br(c):(c=Jt(r)?wi:Mt.current,c=Es(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)&&Tv(t,a,n,c),In=!1;var m=t.memoizedState;a.state=m,Lc(t,n,a,i),l=t.memoizedState,o!==n||m!==l||Yt.current||In?(typeof h=="function"&&(Jh(t,r,h,n),l=t.memoizedState),(o=In||Pv(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,My(e,t),o=t.memoizedProps,c=t.type===t.elementType?o:Er(t.type,o),a.props=c,u=t.pendingProps,m=a.context,l=r.contextType,typeof l=="object"&&l!==null?l=br(l):(l=Jt(r)?wi:Mt.current,l=Es(t,l));var v=r.getDerivedStateFromProps;(h=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==u||m!==l)&&Tv(t,a,n,l),In=!1,m=t.memoizedState,a.state=m,Lc(t,n,a,i);var w=t.memoizedState;o!==u||m!==w||Yt.current||In?(typeof v=="function"&&(Jh(t,r,v,n),w=t.memoizedState),(c=In||Pv(t,r,c,n,m,w,l)||!1)?(h||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,w,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,w,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=w),a.props=n,a.state=w,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 ed(e,t,r,n,s,i)}function ed(e,t,r,n,i,s){lw(e,t);var a=(t.flags&128)!==0;if(!n&&!a)return i&&bv(t,r,!1),hn(e,t,s);n=t.stateNode,O4.current=t;var o=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&a?(t.child=Ls(t,e.child,null,s),t.child=Ls(t,null,o,s)):Bt(e,t,o,s),t.memoizedState=n.state,i&&bv(t,r,!0),t.child}function cw(e){var t=e.stateNode;t.pendingContext?wv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&wv(e,t.context,!1),Pp(e,t.containerInfo)}function jv(e,t,r,n,i){return As(),Cp(i),t.flags|=256,Bt(e,t,r,n),t.child}var td={dehydrated:null,treeContext:null,retryLane:0};function rd(e){return{baseLanes:e,cachePool:null,transitions:null}}function uw(e,t,r){var n=t.pendingProps,i=ct.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),tt(ct,i&1),e===null)return qh(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=au(a,n,0,null),e=yi(e,n,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=rd(r),t.memoizedState=td,e):jp(t,a));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return M4(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=Wn(i,l),n.subtreeFlags=i.subtreeFlags&14680064),o!==null?s=Wn(o,s):(s=yi(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?rd(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~r,t.memoizedState=td,n}return s=e.child,e=s.sibling,n=Wn(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 jp(e,t){return t=au({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function _l(e,t,r,n){return n!==null&&Cp(n),Ls(t,e.child,null,r),e=jp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function M4(e,t,r,n,i,s,a){if(r)return t.flags&256?(t.flags&=-257,n=If(Error(fe(422))),_l(e,t,a,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=n.fallback,i=t.mode,n=au({mode:"visible",children:n.children},i,0,null),s=yi(s,i,a,null),s.flags|=2,n.return=t,s.return=t,n.sibling=s,t.child=n,t.mode&1&&Ls(t,e.child,null,a),t.child.memoizedState=rd(a),t.memoizedState=td,s);if(!(t.mode&1))return _l(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=If(s,n,void 0),_l(e,t,a,n)}if(o=(a&e.childLanes)!==0,qt||o){if(n=Et,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,fn(e,i),Dr(n,e,i,-1))}return Hp(),n=If(Error(fe(421))),_l(e,t,a,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Y4.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,or=zn(i.nextSibling),lr=t,at=!0,Lr=null,e!==null&&(gr[vr++]=sn,gr[vr++]=on,gr[vr++]=bi,sn=e.id,on=e.overflow,bi=t),t=jp(t,n.children),t.flags|=4096,t)}function Bv(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Yh(e.return,t,r)}function Nf(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 fw(e,t,r){var n=t.pendingProps,i=n.revealOrder,s=n.tail;if(Bt(e,t,n.children,r),n=ct.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&&Bv(e,r,t);else if(e.tag===19)Bv(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(tt(ct,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&&Pc(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),Nf(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&&Pc(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}Nf(t,!0,r,null,s);break;case"together":Nf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Jl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function hn(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Ci|=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=Wn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Wn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function j4(e,t,r){switch(t.tag){case 3:cw(t),As();break;case 5:jy(t);break;case 1:Jt(t.type)&&Cc(t);break;case 4:Pp(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;tt(Ec,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(tt(ct,ct.current&1),t.flags|=128,null):r&t.child.childLanes?uw(e,t,r):(tt(ct,ct.current&1),e=hn(e,t,r),e!==null?e.sibling:null);tt(ct,ct.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return fw(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),tt(ct,ct.current),n)break;return null;case 22:case 23:return t.lanes=0,aw(e,t,r)}return hn(e,t,r)}var hw,nd,dw,pw;hw=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}};nd=function(){};dw=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,mi(Kr.current);var s=null;switch(r){case"input":i=xh(e,i),n=xh(e,n),s=[];break;case"select":i=ft({},i,{value:void 0}),n=ft({},n,{value:void 0}),s=[];break;case"textarea":i=Lh(e,i),n=Lh(e,n),s=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=bc)}Th(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"&&(Wo.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"&&(Wo.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&nt("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)}};pw=function(e,t,r,n){r!==n&&(t.flags|=4)};function mo(e,t){if(!at)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 Nt(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 B4(e,t,r){var n=t.pendingProps;switch(Sp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nt(t),null;case 1:return Jt(t.type)&&Sc(),Nt(t),null;case 3:return n=t.stateNode,Ps(),st(Yt),st(Mt),Dp(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(gl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Lr!==null&&(fd(Lr),Lr=null))),nd(e,t),Nt(t),null;case 5:Tp(t);var i=mi(ra.current);if(r=t.type,e!==null&&t.stateNode!=null)dw(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 Nt(t),null}if(e=mi(Kr.current),gl(t)){n=t.stateNode,r=t.type;var s=t.memoizedProps;switch(n[Ur]=t,n[ea]=s,e=(t.mode&1)!==0,r){case"dialog":nt("cancel",n),nt("close",n);break;case"iframe":case"object":case"embed":nt("load",n);break;case"video":case"audio":for(i=0;i<Eo.length;i++)nt(Eo[i],n);break;case"source":nt("error",n);break;case"img":case"image":case"link":nt("error",n),nt("load",n);break;case"details":nt("toggle",n);break;case"input":Gg(n,s),nt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!s.multiple},nt("invalid",n);break;case"textarea":Yg(n,s),nt("invalid",n)}Th(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&&ml(n.textContent,o,e),i=["children",o]):typeof o=="number"&&n.textContent!==""+o&&(s.suppressHydrationWarning!==!0&&ml(n.textContent,o,e),i=["children",""+o]):Wo.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&nt("scroll",n)}switch(r){case"input":al(n),qg(n,s,!0);break;case"textarea":al(n),Jg(n);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(n.onclick=bc)}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=U0(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[Ur]=t,e[ea]=n,hw(e,t,!1,!1),t.stateNode=e;e:{switch(a=Dh(r,n),r){case"dialog":nt("cancel",e),nt("close",e),i=n;break;case"iframe":case"object":case"embed":nt("load",e),i=n;break;case"video":case"audio":for(i=0;i<Eo.length;i++)nt(Eo[i],e);i=n;break;case"source":nt("error",e),i=n;break;case"img":case"image":case"link":nt("error",e),nt("load",e),i=n;break;case"details":nt("toggle",e),i=n;break;case"input":Gg(e,n),i=xh(e,n),nt("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=ft({},n,{value:void 0}),nt("invalid",e);break;case"textarea":Yg(e,n),i=Lh(e,n),nt("invalid",e);break;default:i=n}Th(r,i),o=i;for(s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="style"?V0(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&H0(e,l)):s==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Vo(e,l):typeof l=="number"&&Vo(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Wo.hasOwnProperty(s)?l!=null&&s==="onScroll"&&nt("scroll",e):l!=null&&ap(e,s,l,a))}switch(r){case"input":al(e),qg(e,n,!1);break;case"textarea":al(e),Jg(e);break;case"option":n.value!=null&&e.setAttribute("value",""+qn(n.value));break;case"select":e.multiple=!!n.multiple,s=n.value,s!=null?gs(e,!!n.multiple,s,!1):n.defaultValue!=null&&gs(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=bc)}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 Nt(t),null;case 6:if(e&&t.stateNode!=null)pw(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(fe(166));if(r=mi(ra.current),mi(Kr.current),gl(t)){if(n=t.stateNode,r=t.memoizedProps,n[Ur]=t,(s=n.nodeValue!==r)&&(e=lr,e!==null))switch(e.tag){case 3:ml(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ml(n.nodeValue,r,(e.mode&1)!==0)}s&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Ur]=t,t.stateNode=n}return Nt(t),null;case 13:if(st(ct),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(at&&or!==null&&t.mode&1&&!(t.flags&128))Iy(),As(),t.flags|=98560,s=!1;else if(s=gl(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[Ur]=t}else As(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nt(t),s=!1}else Lr!==null&&(fd(Lr),Lr=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||ct.current&1?Ct===0&&(Ct=3):Hp())),t.updateQueue!==null&&(t.flags|=4),Nt(t),null);case 4:return Ps(),nd(e,t),e===null&&Qo(t.stateNode.containerInfo),Nt(t),null;case 10:return Ep(t.type._context),Nt(t),null;case 17:return Jt(t.type)&&Sc(),Nt(t),null;case 19:if(st(ct),s=t.memoizedState,s===null)return Nt(t),null;if(n=(t.flags&128)!==0,a=s.rendering,a===null)if(n)mo(s,!1);else{if(Ct!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Pc(e),a!==null){for(t.flags|=128,mo(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 tt(ct,ct.current&1|2),t.child}e=e.sibling}s.tail!==null&&mt()>Ds&&(t.flags|=128,n=!0,mo(s,!1),t.lanes=4194304)}else{if(!n)if(e=Pc(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),mo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!at)return Nt(t),null}else 2*mt()-s.renderingStartTime>Ds&&r!==1073741824&&(t.flags|=128,n=!0,mo(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=mt(),t.sibling=null,r=ct.current,tt(ct,n?r&1|2:r&1),t):(Nt(t),null);case 22:case 23:return Up(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?sr&1073741824&&(Nt(t),t.subtreeFlags&6&&(t.flags|=8192)):Nt(t),null;case 24:return null;case 25:return null}throw Error(fe(156,t.tag))}function F4(e,t){switch(Sp(t),t.tag){case 1:return Jt(t.type)&&Sc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ps(),st(Yt),st(Mt),Dp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Tp(t),null;case 13:if(st(ct),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(fe(340));As()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return st(ct),null;case 4:return Ps(),null;case 10:return Ep(t.type._context),null;case 22:case 23:return Up(),null;case 24:return null;default:return null}}var yl=!1,Rt=!1,z4=typeof WeakSet=="function"?WeakSet:Set,xe=null;function ds(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){dt(e,t,n)}else r.current=null}function id(e,t,r){try{r()}catch(n){dt(e,t,n)}}var Fv=!1;function $4(e,t){if($h=_c,e=yy(),wp(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 v;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),(v=u.firstChild)!==null;)m=u,u=v;for(;;){if(u===e)break t;if(m===r&&++c===i&&(o=a),m===s&&++h===n&&(l=a),(v=u.nextSibling)!==null)break;u=m,m=u.parentNode}u=v}r=o===-1||l===-1?null:{start:o,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Uh={focusedElem:e,selectionRange:r},_c=!1,xe=t;xe!==null;)if(t=xe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,xe=e;else for(;xe!==null;){t=xe;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var _=w.memoizedProps,g=w.memoizedState,d=t.stateNode,f=d.getSnapshotBeforeUpdate(t.elementType===t.type?_:Er(t.type,_),g);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(y){dt(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,xe=e;break}xe=t.return}return w=Fv,Fv=!1,w}function Oo(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&&id(t,r,s)}i=i.next}while(i!==n)}}function su(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 sd(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 mw(e){var t=e.alternate;t!==null&&(e.alternate=null,mw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ur],delete t[ea],delete t[Vh],delete t[C4],delete t[k4])),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 gw(e){return e.tag===5||e.tag===3||e.tag===4}function zv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gw(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 od(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=bc));else if(n!==4&&(e=e.child,e!==null))for(od(e,t,r),e=e.sibling;e!==null;)od(e,t,r),e=e.sibling}function ad(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(ad(e,t,r),e=e.sibling;e!==null;)ad(e,t,r),e=e.sibling}var Lt=null,Ar=!1;function An(e,t,r){for(r=r.child;r!==null;)vw(e,t,r),r=r.sibling}function vw(e,t,r){if(Vr&&typeof Vr.onCommitFiberUnmount=="function")try{Vr.onCommitFiberUnmount(Xc,r)}catch{}switch(r.tag){case 5:Rt||ds(r,t);case 6:var n=Lt,i=Ar;Lt=null,An(e,t,r),Lt=n,Ar=i,Lt!==null&&(Ar?(e=Lt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Lt.removeChild(r.stateNode));break;case 18:Lt!==null&&(Ar?(e=Lt,r=r.stateNode,e.nodeType===8?Ef(e.parentNode,r):e.nodeType===1&&Ef(e,r),Yo(e)):Ef(Lt,r.stateNode));break;case 4:n=Lt,i=Ar,Lt=r.stateNode.containerInfo,Ar=!0,An(e,t,r),Lt=n,Ar=i;break;case 0:case 11:case 14:case 15:if(!Rt&&(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)&&id(r,t,a),i=i.next}while(i!==n)}An(e,t,r);break;case 1:if(!Rt&&(ds(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(o){dt(r,t,o)}An(e,t,r);break;case 21:An(e,t,r);break;case 22:r.mode&1?(Rt=(n=Rt)||r.memoizedState!==null,An(e,t,r),Rt=n):An(e,t,r);break;default:An(e,t,r)}}function $v(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new z4),t.forEach(function(n){var i=J4.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function xr(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:Lt=o.stateNode,Ar=!1;break e;case 3:Lt=o.stateNode.containerInfo,Ar=!0;break e;case 4:Lt=o.stateNode.containerInfo,Ar=!0;break e}o=o.return}if(Lt===null)throw Error(fe(160));vw(s,a,i),Lt=null,Ar=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){dt(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)_w(t,e),t=t.sibling}function _w(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(xr(t,e),Fr(e),n&4){try{Oo(3,e,e.return),su(3,e)}catch(_){dt(e,e.return,_)}try{Oo(5,e,e.return)}catch(_){dt(e,e.return,_)}}break;case 1:xr(t,e),Fr(e),n&512&&r!==null&&ds(r,r.return);break;case 5:if(xr(t,e),Fr(e),n&512&&r!==null&&ds(r,r.return),e.flags&32){var i=e.stateNode;try{Vo(i,"")}catch(_){dt(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&&z0(i,s),Dh(o,a);var c=Dh(o,s);for(a=0;a<l.length;a+=2){var h=l[a],u=l[a+1];h==="style"?V0(i,u):h==="dangerouslySetInnerHTML"?H0(i,u):h==="children"?Vo(i,u):ap(i,h,u,c)}switch(o){case"input":Eh(i,s);break;case"textarea":$0(i,s);break;case"select":var m=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var v=s.value;v!=null?gs(i,!!s.multiple,v,!1):m!==!!s.multiple&&(s.defaultValue!=null?gs(i,!!s.multiple,s.defaultValue,!0):gs(i,!!s.multiple,s.multiple?[]:"",!1))}i[ea]=s}catch(_){dt(e,e.return,_)}}break;case 6:if(xr(t,e),Fr(e),n&4){if(e.stateNode===null)throw Error(fe(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(_){dt(e,e.return,_)}}break;case 3:if(xr(t,e),Fr(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Yo(t.containerInfo)}catch(_){dt(e,e.return,_)}break;case 4:xr(t,e),Fr(e);break;case 13:xr(t,e),Fr(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(zp=mt())),n&4&&$v(e);break;case 22:if(h=r!==null&&r.memoizedState!==null,e.mode&1?(Rt=(c=Rt)||h,xr(t,e),Rt=c):xr(t,e),Fr(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!h&&e.mode&1)for(xe=e,h=e.child;h!==null;){for(u=xe=h;xe!==null;){switch(m=xe,v=m.child,m.tag){case 0:case 11:case 14:case 15:Oo(4,m,m.return);break;case 1:ds(m,m.return);var w=m.stateNode;if(typeof w.componentWillUnmount=="function"){n=m,r=m.return;try{t=n,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(_){dt(n,r,_)}}break;case 5:ds(m,m.return);break;case 22:if(m.memoizedState!==null){Hv(u);continue}}v!==null?(v.return=m,xe=v):Hv(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=W0("display",a))}catch(_){dt(e,e.return,_)}}}else if(u.tag===6){if(h===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(_){dt(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:xr(t,e),Fr(e),n&4&&$v(e);break;case 21:break;default:xr(t,e),Fr(e)}}function Fr(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(gw(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&&(Vo(i,""),n.flags&=-33);var s=zv(e);ad(e,s,i);break;case 3:case 4:var a=n.stateNode.containerInfo,o=zv(e);od(e,o,a);break;default:throw Error(fe(161))}}catch(l){dt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function U4(e,t,r){xe=e,yw(e)}function yw(e,t,r){for(var n=(e.mode&1)!==0;xe!==null;){var i=xe,s=i.child;if(i.tag===22&&n){var a=i.memoizedState!==null||yl;if(!a){var o=i.alternate,l=o!==null&&o.memoizedState!==null||Rt;o=yl;var c=Rt;if(yl=a,(Rt=l)&&!c)for(xe=i;xe!==null;)a=xe,l=a.child,a.tag===22&&a.memoizedState!==null?Wv(i):l!==null?(l.return=a,xe=l):Wv(i);for(;s!==null;)xe=s,yw(s),s=s.sibling;xe=i,yl=o,Rt=c}Uv(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,xe=s):Uv(e)}}function Uv(e){for(;xe!==null;){var t=xe;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Rt||su(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Rt)if(r===null)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:Er(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Ev(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}Ev(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&&Yo(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(fe(163))}Rt||t.flags&512&&sd(t)}catch(m){dt(t,t.return,m)}}if(t===e){xe=null;break}if(r=t.sibling,r!==null){r.return=t.return,xe=r;break}xe=t.return}}function Hv(e){for(;xe!==null;){var t=xe;if(t===e){xe=null;break}var r=t.sibling;if(r!==null){r.return=t.return,xe=r;break}xe=t.return}}function Wv(e){for(;xe!==null;){var t=xe;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{su(4,t)}catch(l){dt(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var i=t.return;try{n.componentDidMount()}catch(l){dt(t,i,l)}}var s=t.return;try{sd(t)}catch(l){dt(t,s,l)}break;case 5:var a=t.return;try{sd(t)}catch(l){dt(t,a,l)}}}catch(l){dt(t,t.return,l)}if(t===e){xe=null;break}var o=t.sibling;if(o!==null){o.return=t.return,xe=o;break}xe=t.return}}var H4=Math.ceil,Ic=gn.ReactCurrentDispatcher,Bp=gn.ReactCurrentOwner,wr=gn.ReactCurrentBatchConfig,Ye=0,Et=null,wt=null,Pt=0,sr=0,ps=ri(0),Ct=0,oa=null,Ci=0,ou=0,Fp=0,Mo=null,Gt=null,zp=0,Ds=1/0,rn=null,Nc=!1,ld=null,Un=null,wl=!1,Mn=null,Rc=0,jo=0,cd=null,Xl=-1,Ql=0;function zt(){return Ye&6?mt():Xl!==-1?Xl:Xl=mt()}function Hn(e){return e.mode&1?Ye&2&&Pt!==0?Pt&-Pt:E4.transition!==null?(Ql===0&&(Ql=ny()),Ql):(e=Xe,e!==0||(e=window.event,e=e===void 0?16:uy(e.type)),e):1}function Dr(e,t,r,n){if(50<jo)throw jo=0,cd=null,Error(fe(185));ya(e,r,n),(!(Ye&2)||e!==Et)&&(e===Et&&(!(Ye&2)&&(ou|=r),Ct===4&&Rn(e,Pt)),Xt(e,n),r===1&&Ye===0&&!(t.mode&1)&&(Ds=mt()+500,ru&&ni()))}function Xt(e,t){var r=e.callbackNode;E3(e,t);var n=vc(e,e===Et?Pt:0);if(n===0)r!==null&&Zg(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Zg(r),t===1)e.tag===0?x4(Vv.bind(null,e)):Py(Vv.bind(null,e)),b4(function(){!(Ye&6)&&ni()}),r=null;else{switch(iy(n)){case 1:r=hp;break;case 4:r=ty;break;case 16:r=gc;break;case 536870912:r=ry;break;default:r=gc}r=Aw(r,ww.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function ww(e,t){if(Xl=-1,Ql=0,Ye&6)throw Error(fe(327));var r=e.callbackNode;if(bs()&&e.callbackNode!==r)return null;var n=vc(e,e===Et?Pt:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Oc(e,n);else{t=n;var i=Ye;Ye|=2;var s=Sw();(Et!==e||Pt!==t)&&(rn=null,Ds=mt()+500,_i(e,t));do try{K4();break}catch(o){bw(e,o)}while(!0);xp(),Ic.current=s,Ye=i,wt!==null?t=0:(Et=null,Pt=0,t=Ct)}if(t!==0){if(t===2&&(i=Mh(e),i!==0&&(n=i,t=ud(e,i))),t===1)throw r=oa,_i(e,0),Rn(e,n),Xt(e,mt()),r;if(t===6)Rn(e,n);else{if(i=e.current.alternate,!(n&30)&&!W4(i)&&(t=Oc(e,n),t===2&&(s=Mh(e),s!==0&&(n=s,t=ud(e,s))),t===1))throw r=oa,_i(e,0),Rn(e,n),Xt(e,mt()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(fe(345));case 2:ui(e,Gt,rn);break;case 3:if(Rn(e,n),(n&130023424)===n&&(t=zp+500-mt(),10<t)){if(vc(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){zt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Wh(ui.bind(null,e,Gt,rn),t);break}ui(e,Gt,rn);break;case 4:if(Rn(e,n),(n&4194240)===n)break;for(t=e.eventTimes,i=-1;0<n;){var a=31-Tr(n);s=1<<a,a=t[a],a>i&&(i=a),n&=~s}if(n=i,n=mt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*H4(n/1960))-n,10<n){e.timeoutHandle=Wh(ui.bind(null,e,Gt,rn),n);break}ui(e,Gt,rn);break;case 5:ui(e,Gt,rn);break;default:throw Error(fe(329))}}}return Xt(e,mt()),e.callbackNode===r?ww.bind(null,e):null}function ud(e,t){var r=Mo;return e.current.memoizedState.isDehydrated&&(_i(e,t).flags|=256),e=Oc(e,t),e!==2&&(t=Gt,Gt=r,t!==null&&fd(t)),e}function fd(e){Gt===null?Gt=e:Gt.push.apply(Gt,e)}function W4(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(!Nr(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 Rn(e,t){for(t&=~Fp,t&=~ou,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Tr(t),n=1<<r;e[r]=-1,t&=~n}}function Vv(e){if(Ye&6)throw Error(fe(327));bs();var t=vc(e,0);if(!(t&1))return Xt(e,mt()),null;var r=Oc(e,t);if(e.tag!==0&&r===2){var n=Mh(e);n!==0&&(t=n,r=ud(e,n))}if(r===1)throw r=oa,_i(e,0),Rn(e,t),Xt(e,mt()),r;if(r===6)throw Error(fe(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ui(e,Gt,rn),Xt(e,mt()),null}function $p(e,t){var r=Ye;Ye|=1;try{return e(t)}finally{Ye=r,Ye===0&&(Ds=mt()+500,ru&&ni())}}function ki(e){Mn!==null&&Mn.tag===0&&!(Ye&6)&&bs();var t=Ye;Ye|=1;var r=wr.transition,n=Xe;try{if(wr.transition=null,Xe=1,e)return e()}finally{Xe=n,wr.transition=r,Ye=t,!(Ye&6)&&ni()}}function Up(){sr=ps.current,st(ps)}function _i(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,w4(r)),wt!==null)for(r=wt.return;r!==null;){var n=r;switch(Sp(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Sc();break;case 3:Ps(),st(Yt),st(Mt),Dp();break;case 5:Tp(n);break;case 4:Ps();break;case 13:st(ct);break;case 19:st(ct);break;case 10:Ep(n.type._context);break;case 22:case 23:Up()}r=r.return}if(Et=e,wt=e=Wn(e.current,null),Pt=sr=t,Ct=0,oa=null,Fp=ou=Ci=0,Gt=Mo=null,pi!==null){for(t=0;t<pi.length;t++)if(r=pi[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}pi=null}return e}function bw(e,t){do{var r=wt;try{if(xp(),ql.current=Dc,Tc){for(var n=ut.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Tc=!1}if(Si=0,xt=St=ut=null,Ro=!1,na=0,Bp.current=null,r===null||r.return===null){Ct=1,oa=t,wt=null;break}e:{var s=e,a=r.return,o=r,l=t;if(t=Pt,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 v=Iv(a);if(v!==null){v.flags&=-257,Nv(v,a,o,s,t),v.mode&1&&Dv(s,c,t),t=v,l=c;var w=t.updateQueue;if(w===null){var _=new Set;_.add(l),t.updateQueue=_}else w.add(l);break e}else{if(!(t&1)){Dv(s,c,t),Hp();break e}l=Error(fe(426))}}else if(at&&o.mode&1){var g=Iv(a);if(g!==null){!(g.flags&65536)&&(g.flags|=256),Nv(g,a,o,s,t),Cp(Ts(l,o));break e}}s=l=Ts(l,o),Ct!==4&&(Ct=2),Mo===null?Mo=[s]:Mo.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var d=iw(s,l,t);xv(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"&&(Un===null||!Un.has(p)))){s.flags|=65536,t&=-t,s.lanes|=t;var y=sw(s,o,t);xv(s,y);break e}}s=s.return}while(s!==null)}kw(r)}catch(S){t=S,wt===r&&r!==null&&(wt=r=r.return);continue}break}while(!0)}function Sw(){var e=Ic.current;return Ic.current=Dc,e===null?Dc:e}function Hp(){(Ct===0||Ct===3||Ct===2)&&(Ct=4),Et===null||!(Ci&268435455)&&!(ou&268435455)||Rn(Et,Pt)}function Oc(e,t){var r=Ye;Ye|=2;var n=Sw();(Et!==e||Pt!==t)&&(rn=null,_i(e,t));do try{V4();break}catch(i){bw(e,i)}while(!0);if(xp(),Ye=r,Ic.current=n,wt!==null)throw Error(fe(261));return Et=null,Pt=0,Ct}function V4(){for(;wt!==null;)Cw(wt)}function K4(){for(;wt!==null&&!v3();)Cw(wt)}function Cw(e){var t=Ew(e.alternate,e,sr);e.memoizedProps=e.pendingProps,t===null?kw(e):wt=t,Bp.current=null}function kw(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,wt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ct=6,wt=null;return}}else if(r=B4(r,t,sr),r!==null){wt=r;return}if(t=t.sibling,t!==null){wt=t;return}wt=t=e}while(t!==null);Ct===0&&(Ct=5)}function ui(e,t,r){var n=Xe,i=wr.transition;try{wr.transition=null,Xe=1,G4(e,t,r,n)}finally{wr.transition=i,Xe=n}return null}function G4(e,t,r,n){do bs();while(Mn!==null);if(Ye&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(A3(e,s),e===Et&&(wt=Et=null,Pt=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||wl||(wl=!0,Aw(gc,function(){return bs(),null})),s=(r.flags&15990)!==0,r.subtreeFlags&15990||s){s=wr.transition,wr.transition=null;var a=Xe;Xe=1;var o=Ye;Ye|=4,Bp.current=null,$4(e,r),_w(r,e),d4(Uh),_c=!!$h,Uh=$h=null,e.current=r,U4(r),_3(),Ye=o,Xe=a,wr.transition=s}else e.current=r;if(wl&&(wl=!1,Mn=e,Rc=i),s=e.pendingLanes,s===0&&(Un=null),b3(r.stateNode),Xt(e,mt()),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(Nc)throw Nc=!1,e=ld,ld=null,e;return Rc&1&&e.tag!==0&&bs(),s=e.pendingLanes,s&1?e===cd?jo++:(jo=0,cd=e):jo=0,ni(),null}function bs(){if(Mn!==null){var e=iy(Rc),t=wr.transition,r=Xe;try{if(wr.transition=null,Xe=16>e?16:e,Mn===null)var n=!1;else{if(e=Mn,Mn=null,Rc=0,Ye&6)throw Error(fe(331));var i=Ye;for(Ye|=4,xe=e.current;xe!==null;){var s=xe,a=s.child;if(xe.flags&16){var o=s.deletions;if(o!==null){for(var l=0;l<o.length;l++){var c=o[l];for(xe=c;xe!==null;){var h=xe;switch(h.tag){case 0:case 11:case 15:Oo(8,h,s)}var u=h.child;if(u!==null)u.return=h,xe=u;else for(;xe!==null;){h=xe;var m=h.sibling,v=h.return;if(mw(h),h===c){xe=null;break}if(m!==null){m.return=v,xe=m;break}xe=v}}}var w=s.alternate;if(w!==null){var _=w.child;if(_!==null){w.child=null;do{var g=_.sibling;_.sibling=null,_=g}while(_!==null)}}xe=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,xe=a;else e:for(;xe!==null;){if(s=xe,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Oo(9,s,s.return)}var d=s.sibling;if(d!==null){d.return=s.return,xe=d;break e}xe=s.return}}var f=e.current;for(xe=f;xe!==null;){a=xe;var p=a.child;if(a.subtreeFlags&2064&&p!==null)p.return=a,xe=p;else e:for(a=f;xe!==null;){if(o=xe,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:su(9,o)}}catch(S){dt(o,o.return,S)}if(o===a){xe=null;break e}var y=o.sibling;if(y!==null){y.return=o.return,xe=y;break e}xe=o.return}}if(Ye=i,ni(),Vr&&typeof Vr.onPostCommitFiberRoot=="function")try{Vr.onPostCommitFiberRoot(Xc,e)}catch{}n=!0}return n}finally{Xe=r,wr.transition=t}}return!1}function Kv(e,t,r){t=Ts(r,t),t=iw(e,t,1),e=$n(e,t,1),t=zt(),e!==null&&(ya(e,1,t),Xt(e,t))}function dt(e,t,r){if(e.tag===3)Kv(e,e,r);else for(;t!==null;){if(t.tag===3){Kv(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Un===null||!Un.has(n))){e=Ts(r,e),e=sw(t,e,1),t=$n(t,e,1),e=zt(),t!==null&&(ya(t,1,e),Xt(t,e));break}}t=t.return}}function q4(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=zt(),e.pingedLanes|=e.suspendedLanes&r,Et===e&&(Pt&r)===r&&(Ct===4||Ct===3&&(Pt&130023424)===Pt&&500>mt()-zp?_i(e,0):Fp|=r),Xt(e,t)}function xw(e,t){t===0&&(e.mode&1?(t=ul,ul<<=1,!(ul&130023424)&&(ul=4194304)):t=1);var r=zt();e=fn(e,t),e!==null&&(ya(e,t,r),Xt(e,r))}function Y4(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),xw(e,r)}function J4(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),xw(e,r)}var Ew;Ew=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Yt.current)qt=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return qt=!1,j4(e,t,r);qt=!!(e.flags&131072)}else qt=!1,at&&t.flags&1048576&&Ty(t,xc,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Jl(e,t),e=t.pendingProps;var i=Es(t,Mt.current);ws(t,r),i=Np(null,t,n,e,i,r);var s=Rp();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,Jt(n)?(s=!0,Cc(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Lp(t),i.updater=iu,t.stateNode=i,i._reactInternals=t,Xh(t,n,e,r),t=ed(null,t,n,!0,s,r)):(t.tag=0,at&&s&&bp(t),Bt(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Jl(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=Q4(n),e=Er(n,e),i){case 0:t=Zh(null,t,n,e,r);break e;case 1:t=Mv(null,t,n,e,r);break e;case 11:t=Rv(null,t,n,e,r);break e;case 14:t=Ov(null,t,n,Er(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:Er(n,i),Zh(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Er(n,i),Mv(e,t,n,i,r);case 3:e:{if(cw(t),e===null)throw Error(fe(387));n=t.pendingProps,s=t.memoizedState,i=s.element,My(e,t),Lc(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=Ts(Error(fe(423)),t),t=jv(e,t,n,r,i);break e}else if(n!==i){i=Ts(Error(fe(424)),t),t=jv(e,t,n,r,i);break e}else for(or=zn(t.stateNode.containerInfo.firstChild),lr=t,at=!0,Lr=null,r=Ry(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(As(),n===i){t=hn(e,t,r);break e}Bt(e,t,n,r)}t=t.child}return t;case 5:return jy(t),e===null&&qh(t),n=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,Hh(n,i)?a=null:s!==null&&Hh(n,s)&&(t.flags|=32),lw(e,t),Bt(e,t,a,r),t.child;case 6:return e===null&&qh(t),null;case 13:return uw(e,t,r);case 4:return Pp(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ls(t,null,n,r):Bt(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Er(n,i),Rv(e,t,n,i,r);case 7:return Bt(e,t,t.pendingProps,r),t.child;case 8:return Bt(e,t,t.pendingProps.children,r),t.child;case 12:return Bt(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,tt(Ec,n._currentValue),n._currentValue=a,s!==null)if(Nr(s.value,a)){if(s.children===i.children&&!Yt.current){t=hn(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=an(-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),Yh(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),Yh(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}Bt(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,ws(t,r),i=br(i),n=n(i),t.flags|=1,Bt(e,t,n,r),t.child;case 14:return n=t.type,i=Er(n,t.pendingProps),i=Er(n.type,i),Ov(e,t,n,i,r);case 15:return ow(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Er(n,i),Jl(e,t),t.tag=1,Jt(n)?(e=!0,Cc(t)):e=!1,ws(t,r),nw(t,n,i),Xh(t,n,i,r),ed(null,t,n,!0,e,r);case 19:return fw(e,t,r);case 22:return aw(e,t,r)}throw Error(fe(156,t.tag))};function Aw(e,t){return ey(e,t)}function X4(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 yr(e,t,r,n){return new X4(e,t,r,n)}function Wp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Q4(e){if(typeof e=="function")return Wp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===cp)return 11;if(e===up)return 14}return 2}function Wn(e,t){var r=e.alternate;return r===null?(r=yr(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 Zl(e,t,r,n,i,s){var a=2;if(n=e,typeof e=="function")Wp(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case is:return yi(r.children,i,s,t);case lp:a=8,i|=8;break;case bh:return e=yr(12,r,t,i|2),e.elementType=bh,e.lanes=s,e;case Sh:return e=yr(13,r,t,i),e.elementType=Sh,e.lanes=s,e;case Ch:return e=yr(19,r,t,i),e.elementType=Ch,e.lanes=s,e;case j0:return au(r,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case O0:a=10;break e;case M0:a=9;break e;case cp:a=11;break e;case up:a=14;break e;case Dn:a=16,n=null;break e}throw Error(fe(130,e==null?e:typeof e,""))}return t=yr(a,r,t,i),t.elementType=e,t.type=n,t.lanes=s,t}function yi(e,t,r,n){return e=yr(7,e,n,t),e.lanes=r,e}function au(e,t,r,n){return e=yr(22,e,n,t),e.elementType=j0,e.lanes=r,e.stateNode={isHidden:!1},e}function Rf(e,t,r){return e=yr(6,e,null,t),e.lanes=r,e}function Of(e,t,r){return t=yr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Z4(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=mf(0),this.expirationTimes=mf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mf(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Vp(e,t,r,n,i,s,a,o,l){return e=new Z4(e,t,r,o,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=yr(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Lp(s),e}function eA(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ns,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Lw(e){if(!e)return Yn;e=e._reactInternals;e:{if(Di(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(Jt(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(Jt(r))return Ly(e,r,t)}return t}function Pw(e,t,r,n,i,s,a,o,l){return e=Vp(r,n,!0,e,i,s,a,o,l),e.context=Lw(null),r=e.current,n=zt(),i=Hn(r),s=an(n,i),s.callback=t??null,$n(r,s,i),e.current.lanes=i,ya(e,i,n),Xt(e,n),e}function lu(e,t,r,n){var i=t.current,s=zt(),a=Hn(i);return r=Lw(r),t.context===null?t.context=r:t.pendingContext=r,t=an(s,a),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=$n(i,t,a),e!==null&&(Dr(e,i,a,s),Gl(e,i,a)),a}function Mc(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 Gv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Kp(e,t){Gv(e,t),(e=e.alternate)&&Gv(e,t)}function tA(){return null}var Tw=typeof reportError=="function"?reportError:function(e){console.error(e)};function Gp(e){this._internalRoot=e}cu.prototype.render=Gp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(fe(409));lu(e,t,null,null)};cu.prototype.unmount=Gp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ki(function(){lu(null,e,null,null)}),t[un]=null}};function cu(e){this._internalRoot=e}cu.prototype.unstable_scheduleHydration=function(e){if(e){var t=ay();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Nn.length&&t!==0&&t<Nn[r].priority;r++);Nn.splice(r,0,e),r===0&&cy(e)}};function qp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function uu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function qv(){}function rA(e,t,r,n,i){if(i){if(typeof n=="function"){var s=n;n=function(){var c=Mc(a);s.call(c)}}var a=Pw(t,n,e,0,null,!1,!1,"",qv);return e._reactRootContainer=a,e[un]=a.current,Qo(e.nodeType===8?e.parentNode:e),ki(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var o=n;n=function(){var c=Mc(l);o.call(c)}}var l=Vp(e,0,!1,null,null,!1,!1,"",qv);return e._reactRootContainer=l,e[un]=l.current,Qo(e.nodeType===8?e.parentNode:e),ki(function(){lu(t,l,r,n)}),l}function fu(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=Mc(a);o.call(l)}}lu(t,a,e,i)}else a=rA(r,t,e,i,n);return Mc(a)}sy=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=xo(t.pendingLanes);r!==0&&(dp(t,r|1),Xt(t,mt()),!(Ye&6)&&(Ds=mt()+500,ni()))}break;case 13:ki(function(){var n=fn(e,1);if(n!==null){var i=zt();Dr(n,e,1,i)}}),Kp(e,1)}};pp=function(e){if(e.tag===13){var t=fn(e,134217728);if(t!==null){var r=zt();Dr(t,e,134217728,r)}Kp(e,134217728)}};oy=function(e){if(e.tag===13){var t=Hn(e),r=fn(e,t);if(r!==null){var n=zt();Dr(r,e,t,n)}Kp(e,t)}};ay=function(){return Xe};ly=function(e,t){var r=Xe;try{return Xe=e,t()}finally{Xe=r}};Nh=function(e,t,r){switch(t){case"input":if(Eh(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=tu(n);if(!i)throw Error(fe(90));F0(n),Eh(n,i)}}}break;case"textarea":$0(e,r);break;case"select":t=r.value,t!=null&&gs(e,!!r.multiple,t,!1)}};q0=$p;Y0=ki;var nA={usingClientEntryPoint:!1,Events:[ba,ls,tu,K0,G0,$p]},go={findFiberByHostInstance:di,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},iA={bundleType:go.bundleType,version:go.version,rendererPackageName:go.rendererPackageName,rendererConfig:go.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:gn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Q0(e),e===null?null:e.stateNode},findFiberByHostInstance:go.findFiberByHostInstance||tA,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bl.isDisabled&&bl.supportsFiber)try{Xc=bl.inject(iA),Vr=bl}catch{}}fr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nA;fr.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!qp(t))throw Error(fe(200));return eA(e,t,null,r)};fr.createRoot=function(e,t){if(!qp(e))throw Error(fe(299));var r=!1,n="",i=Tw;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Vp(e,1,!1,null,null,r,!1,n,i),e[un]=t.current,Qo(e.nodeType===8?e.parentNode:e),new Gp(t)};fr.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=Q0(t),e=e===null?null:e.stateNode,e};fr.flushSync=function(e){return ki(e)};fr.hydrate=function(e,t,r){if(!uu(t))throw Error(fe(200));return fu(null,e,t,!0,r)};fr.hydrateRoot=function(e,t,r){if(!qp(e))throw Error(fe(405));var n=r!=null&&r.hydratedSources||null,i=!1,s="",a=Tw;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),t=Pw(t,null,e,1,r??null,i,!1,s,a),e[un]=t.current,Qo(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 cu(t)};fr.render=function(e,t,r){if(!uu(t))throw Error(fe(200));return fu(null,e,t,!1,r)};fr.unmountComponentAtNode=function(e){if(!uu(e))throw Error(fe(40));return e._reactRootContainer?(ki(function(){fu(null,null,e,!1,function(){e._reactRootContainer=null,e[un]=null})}),!0):!1};fr.unstable_batchedUpdates=$p;fr.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!uu(r))throw Error(fe(200));if(e==null||e._reactInternals===void 0)throw Error(fe(38));return fu(e,t,r,!1,n)};fr.version="18.3.1-next-f1338f8080-20240426";function Dw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Dw)}catch(e){console.error(e)}}Dw(),D0.exports=fr;var Yp=D0.exports;const sA=qc(Yp);var Iw,Yv=Yp;Iw=Yv.createRoot,Yv.hydrateRoot;const oA="modulepreload",aA=function(e){return"/"+e},Jv={},Ii=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=aA(l),l in Jv)return;Jv[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":oA,c||(u.as="script"),u.crossOrigin="",u.href=l,o&&u.setAttribute("nonce",o),document.head.appendChild(u),c)return new Promise((m,v)=>{u.addEventListener("load",m),u.addEventListener("error",()=>v(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 lA(e={}){const{immediate:t=!1,onNeedRefresh:r,onOfflineReady:n,onRegistered:i,onRegisteredSW:s,onRegisterError:a}=e;let o,l;const c=async(u=!0)=>{await l};async function h(){if("serviceWorker"in navigator){if(o=await Ii(async()=>{const{Workbox:u}=await import("./workbox-window.prod.es5-vqzQaGvo.js");return{Workbox:u}},[]).then(({Workbox:u})=>new u("/sw.js",{scope:"/",type:"classic"})).catch(u=>{a==null||a(u)}),!o)return;o.addEventListener("activated",u=>{(u.isUpdate||u.isExternal)&&window.location.reload()}),o.addEventListener("installed",u=>{u.isUpdate||n==null||n()}),o.register({immediate:t}).then(u=>{s?s("/sw.js",u):i==null||i(u)}).catch(u=>{a==null||a(u)})}}return l=h(),c}function Xv(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 gt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xv(Object(r),!0).forEach(function(n){hd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hd(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 Is(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 Rr(e,t){return uA(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)||Jp(e,t)||hA()}function cA(e){return function(t){if(Array.isArray(t))return dd(t)}(e)||fA(e)||Jp(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 uA(e){if(Array.isArray(e))return e}function fA(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Jp(e,t){if(e){if(typeof e=="string")return dd(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)?dd(e,t):void 0}}function dd(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 hA(){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 dA(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Jp(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 Sl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ca(e,t){return e(t={exports:{}},t.exports),t.exports}var ar=Ca(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})()}),Vt={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:{}},Nw=k.createContext(Vt),pA=Nw.Provider,mA=function(){return k.useContext(Nw)},gA=Ca(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,v=s.split(`
|
|
48
|
+
`),w=v.length,_=0;_<w;){var g=v[_];if(g.indexOf("diff --git")===0){a={hunks:[],oldEndingNewLine:!0,newEndingNewLine:!0,oldPath:(h=n(g)).oldPath,newPath:h.newPath},u.push(a);var d,f=null;e:for(;d=v[++_];){var p=d.indexOf(" "),y=p>-1?d.slice(0,p):y;switch(y){case"diff":_--;break e;case"deleted":case"new":var S=d.slice(p+1);S.indexOf("file mode")===0&&(a[y==="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(" "),E=b[0].split("..");a.oldRevision=E[0],a.newRevision=E[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=y;break;case"---":var A=d.slice(p+1),T=v[++_].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(g.indexOf("Binary")===0)a.isBinary=!0,a.type=g.indexOf("/dev/null and")>=0?"add":g.indexOf("and /dev/null")>=0?"delete":"modify",m=2,a=null;else if(m===5)if(g.indexOf("@@")===0){var O=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(g);o={content:g,oldStart:O[1]-0,newStart:O[4]-0,oldLines:O[3]-0||1,newLines:O[6]-0||1,changes:[]},a.hunks.push(o),l=o.oldStart,c=o.newStart}else{var R=g.slice(0,1),M={content:g.slice(1)};switch(R){case"+":M.type="insert",M.isInsert=!0,M.lineNumber=c,c++;break;case"-":M.type="delete",M.isDelete=!0,M.lineNumber=l,l++;break;case" ":M.type="normal",M.isNormal=!0,M.oldLineNumber=l,M.newLineNumber=c,l++,c++;break;case"\\":var z=o.changes[o.changes.length-1];z.isDelete||(a.newEndingNewLine=!1),z.isInsert||(a.oldEndingNewLine=!1)}M.type&&o.changes.push(M)}_++}return u}};e.exports=i})()});function ka(e){return e.type==="insert"}function Vn(e){return e.type==="delete"}function aa(e){return e.type==="normal"}function vA(e,t){var r=t.nearbySequences==="zip"?function(n){var i=n.reduce(function(s,a,o){var l=Rr(s,3),c=l[0],h=l[1],u=l[2];return h?ka(a)&&u>=0?(c.splice(u+1,0,a),[c,a,u+2]):(c.push(a),[c,a,Vn(a)&&Vn(h)?u:o]):(c.push(a),[c,a,Vn(a)?o:-1])},[[],null,-1]);return Rr(i,1)[0]}(e.changes):e.changes;return gt(gt({},e),{},{isPlain:!1,changes:r})}function _A(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 gA.parse(r).map(function(n){return function(i,s){var a=i.hunks.map(function(o){return vA(o,s)});return gt(gt({},i),{},{hunks:a})}(n,t)})}function yA(e){return e[0]}function wA(e){return e[e.length-1]}function pd(e){return["".concat(e,"Start"),"".concat(e,"Lines")]}function la(e){return e==="old"?function(t){return ka(t)?-1:aa(t)?t.oldLineNumber:t.lineNumber}:function(t){return Vn(t)?-1:aa(t)?t.newLineNumber:t.lineNumber}}function Rw(e,t){return function(r,n){var i=r[e],s=i+r[t];return n>=i&&n<s}}function bA(e,t){return function(r,n,i){var s=r[e]+r[t],a=n[e];return i>=s&&i<a}}function Ow(e){var t=la(e),r=function(n){var i=Rr(pd(n),2),s=Rw(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 Xp(e){var t=e==="old"?"new":"old",r=Rr(pd(e),2),n=r[0],i=r[1],s=Rr(pd(t),2),a=s[0],o=s[1],l=la(e),c=la(t),h=Rw(n,i),u=bA(n,i);return function(m,v){var w=yA(m);if(v<w[n]){var _=w[n]-v;return w[a]-_}var g=wA(m);if(g[n]+g[i]<=v){var d=v-g[n]-g[i];return g[a]+g[o]+d}for(var f=0;f<m.length;f++){var p=m[f],y=m[f+1];if(h(p,v)){var S=p.changes.findIndex(function(O){return l(O)===v}),b=p.changes[S];if(aa(b))return c(b);var E=Vn(b)?S+1:S-1,C=p.changes[E];if(!C)return-1;var A=ka(b)?"delete":"insert";return C.type===A?c(C):-1}if(u(p,y,v)){var T=v-p[n]-p[i];return p[a]+p[o]+T}}throw new Error("Unexpected line position ".concat(v))}}var SA=function(){this.__data__=[],this.size=0},Mw=function(e,t){return e===t||e!=e&&t!=t},hu=function(e,t){for(var r=e.length;r--;)if(Mw(e[r][0],t))return r;return-1},CA=Array.prototype.splice,kA=function(e){var t=this.__data__,r=hu(t,e);return!(r<0)&&(r==t.length-1?t.pop():CA.call(t,r,1),--this.size,!0)},xA=function(e){var t=this.__data__,r=hu(t,e);return r<0?void 0:t[r][1]},EA=function(e){return hu(this.__data__,e)>-1},AA=function(e,t){var r=this.__data__,n=hu(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function Ji(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])}}Ji.prototype.clear=SA,Ji.prototype.delete=kA,Ji.prototype.get=xA,Ji.prototype.has=EA,Ji.prototype.set=AA;var du=Ji,LA=function(){this.__data__=new du,this.size=0},PA=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},TA=function(e){return this.__data__.get(e)},DA=function(e){return this.__data__.has(e)},jw=typeof Sl=="object"&&Sl&&Sl.Object===Object&&Sl,IA=typeof self=="object"&&self&&self.Object===Object&&self,vn=jw||IA||Function("return this")(),Gr=vn.Symbol,Bw=Object.prototype,NA=Bw.hasOwnProperty,RA=Bw.toString,vo=Gr?Gr.toStringTag:void 0,OA=function(e){var t=NA.call(e,vo),r=e[vo];try{e[vo]=void 0;var n=!0}catch{}var i=RA.call(e);return n&&(t?e[vo]=r:delete e[vo]),i},MA=Object.prototype.toString,jA=function(e){return MA.call(e)},Qv=Gr?Gr.toStringTag:void 0,Fs=function(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Qv&&Qv in Object(e)?OA(e):jA(e)},Qp=function(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")},Fw=function(e){if(!Qp(e))return!1;var t=Fs(e);return t=="[object Function]"||t=="[object GeneratorFunction]"||t=="[object AsyncFunction]"||t=="[object Proxy]"},Mf=vn["__core-js_shared__"],Zv=function(){var e=/[^.]+$/.exec(Mf&&Mf.keys&&Mf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),BA=function(e){return!!Zv&&Zv in e},FA=Function.prototype.toString,Ni=function(e){if(e!=null){try{return FA.call(e)}catch{}try{return e+""}catch{}}return""},zA=/^\[object .+?Constructor\]$/,$A=Function.prototype,UA=Object.prototype,HA=$A.toString,WA=UA.hasOwnProperty,VA=RegExp("^"+HA.call(WA).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),KA=function(e){return!(!Qp(e)||BA(e))&&(Fw(e)?VA:zA).test(Ni(e))},GA=function(e,t){return e==null?void 0:e[t]},Ri=function(e,t){var r=GA(e,t);return KA(r)?r:void 0},ca=Ri(vn,"Map"),ua=Ri(Object,"create"),qA=function(){this.__data__=ua?ua(null):{},this.size=0},YA=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},JA=Object.prototype.hasOwnProperty,XA=function(e){var t=this.__data__;if(ua){var r=t[e];return r==="__lodash_hash_undefined__"?void 0:r}return JA.call(t,e)?t[e]:void 0},QA=Object.prototype.hasOwnProperty,ZA=function(e){var t=this.__data__;return ua?t[e]!==void 0:QA.call(t,e)},e5=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ua&&t===void 0?"__lodash_hash_undefined__":t,this};function Xi(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])}}Xi.prototype.clear=qA,Xi.prototype.delete=YA,Xi.prototype.get=XA,Xi.prototype.has=ZA,Xi.prototype.set=e5;var e_=Xi,t5=function(){this.size=0,this.__data__={hash:new e_,map:new(ca||du),string:new e_}},r5=function(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null},pu=function(e,t){var r=e.__data__;return r5(t)?r[typeof t=="string"?"string":"hash"]:r.map},n5=function(e){var t=pu(this,e).delete(e);return this.size-=t?1:0,t},i5=function(e){return pu(this,e).get(e)},s5=function(e){return pu(this,e).has(e)},o5=function(e,t){var r=pu(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function Qi(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])}}Qi.prototype.clear=t5,Qi.prototype.delete=n5,Qi.prototype.get=i5,Qi.prototype.has=s5,Qi.prototype.set=o5;var mu=Qi,a5=function(e,t){var r=this.__data__;if(r instanceof du){var n=r.__data__;if(!ca||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new mu(n)}return r.set(e,t),this.size=r.size,this};function Zi(e){var t=this.__data__=new du(e);this.size=t.size}Zi.prototype.clear=LA,Zi.prototype.delete=PA,Zi.prototype.get=TA,Zi.prototype.has=DA,Zi.prototype.set=a5;var ec=Zi,l5=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},c5=function(e){return this.__data__.has(e)};function tc(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new mu;++t<r;)this.add(e[t])}tc.prototype.add=tc.prototype.push=l5,tc.prototype.has=c5;var u5=tc,f5=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},h5=function(e,t){return e.has(t)},zw=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,v=2&r?new u5:void 0;for(s.set(e,t),s.set(t,e);++u<o;){var w=e[u],_=t[u];if(n)var g=a?n(_,w,u,t,e,s):n(w,_,u,e,t,s);if(g!==void 0){if(g)continue;m=!1;break}if(v){if(!f5(t,function(d,f){if(!h5(v,f)&&(w===d||i(w,d,r,n,s)))return v.push(f)})){m=!1;break}}else if(w!==_&&!i(w,_,r,n,s)){m=!1;break}}return s.delete(e),s.delete(t),m},t_=vn.Uint8Array,d5=function(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r},p5=function(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r},r_=Gr?Gr.prototype:void 0,jf=r_?r_.valueOf:void 0,m5=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 t_(e),new t_(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Mw(+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=d5;case"[object Set]":var l=1&n;if(o||(o=p5),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=zw(o(e),o(t),n,i,s,a);return a.delete(e),h;case"[object Symbol]":if(jf)return jf.call(e)==jf.call(t)}return!1},g5=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e},dn=Array.isArray,v5=function(e,t,r){var n=t(e);return dn(e)?n:g5(n,r(e))},_5=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},y5=function(){return[]},w5=Object.prototype.propertyIsEnumerable,n_=Object.getOwnPropertySymbols,b5=n_?function(e){return e==null?[]:(e=Object(e),_5(n_(e),function(t){return w5.call(e,t)}))}:y5,S5=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n},Ns=function(e){return e!=null&&typeof e=="object"},i_=function(e){return Ns(e)&&Fs(e)=="[object Arguments]"},$w=Object.prototype,C5=$w.hasOwnProperty,k5=$w.propertyIsEnumerable,Uw=i_(function(){return arguments}())?i_:function(e){return Ns(e)&&C5.call(e,"callee")&&!k5.call(e,"callee")},x5=function(){return!1},md=Ca(function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,i=n&&n.exports===r?vn.Buffer:void 0,s=(i?i.isBuffer:void 0)||x5;e.exports=s}),E5=/^(?:0|[1-9]\d*)$/,Hw=function(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&(r=="number"||r!="symbol"&&E5.test(e))&&e>-1&&e%1==0&&e<t},Zp=function(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=9007199254740991},it={};it["[object Float32Array]"]=it["[object Float64Array]"]=it["[object Int8Array]"]=it["[object Int16Array]"]=it["[object Int32Array]"]=it["[object Uint8Array]"]=it["[object Uint8ClampedArray]"]=it["[object Uint16Array]"]=it["[object Uint32Array]"]=!0,it["[object Arguments]"]=it["[object Array]"]=it["[object ArrayBuffer]"]=it["[object Boolean]"]=it["[object DataView]"]=it["[object Date]"]=it["[object Error]"]=it["[object Function]"]=it["[object Map]"]=it["[object Number]"]=it["[object Object]"]=it["[object RegExp]"]=it["[object Set]"]=it["[object String]"]=it["[object WeakMap]"]=!1;var A5=function(e){return Ns(e)&&Zp(e.length)&&!!it[Fs(e)]},L5=function(e){return function(t){return e(t)}},s_=Ca(function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,i=n&&n.exports===r&&jw.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}),o_=s_&&s_.isTypedArray,Ww=o_?L5(o_):A5,P5=Object.prototype.hasOwnProperty,T5=function(e,t){var r=dn(e),n=!r&&Uw(e),i=!r&&!n&&md(e),s=!r&&!n&&!i&&Ww(e),a=r||n||i||s,o=a?S5(e.length,String):[],l=o.length;for(var c in e)!P5.call(e,c)||a&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Hw(c,l))||o.push(c);return o},D5=Object.prototype,I5=function(e){var t=e&&e.constructor;return e===(typeof t=="function"&&t.prototype||D5)},N5=function(e,t){return function(r){return e(t(r))}}(Object.keys,Object),R5=Object.prototype.hasOwnProperty,O5=function(e){if(!I5(e))return N5(e);var t=[];for(var r in Object(e))R5.call(e,r)&&r!="constructor"&&t.push(r);return t},M5=function(e){return e!=null&&Zp(e.length)&&!Fw(e)},em=function(e){return M5(e)?T5(e):O5(e)},a_=function(e){return v5(e,em,b5)},j5=Object.prototype.hasOwnProperty,B5=function(e,t,r,n,i,s){var a=1&r,o=a_(e),l=o.length;if(l!=a_(t).length&&!a)return!1;for(var c=l;c--;){var h=o[c];if(!(a?h in t:j5.call(t,h)))return!1}var u=s.get(e),m=s.get(t);if(u&&m)return u==t&&m==e;var v=!0;s.set(e,t),s.set(t,e);for(var w=a;++c<l;){var _=e[h=o[c]],g=t[h];if(n)var d=a?n(g,_,h,t,e,s):n(_,g,h,e,t,s);if(!(d===void 0?_===g||i(_,g,r,n,s):d)){v=!1;break}w||(w=h=="constructor")}if(v&&!w){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||(v=!1)}return s.delete(e),s.delete(t),v},gd=Ri(vn,"DataView"),vd=Ri(vn,"Promise"),_d=Ri(vn,"Set"),yd=Ri(vn,"WeakMap"),F5=Ni(gd),z5=Ni(ca),$5=Ni(vd),U5=Ni(_d),H5=Ni(yd),fi=Fs;(gd&&fi(new gd(new ArrayBuffer(1)))!="[object DataView]"||ca&&fi(new ca)!="[object Map]"||vd&&fi(vd.resolve())!="[object Promise]"||_d&&fi(new _d)!="[object Set]"||yd&&fi(new yd)!="[object WeakMap]")&&(fi=function(e){var t=Fs(e),r=t=="[object Object]"?e.constructor:void 0,n=r?Ni(r):"";if(n)switch(n){case F5:return"[object DataView]";case z5:return"[object Map]";case $5:return"[object Promise]";case U5:return"[object Set]";case H5:return"[object WeakMap]"}return t});var l_=fi,Cl="[object Object]",c_=Object.prototype.hasOwnProperty,W5=function(e,t,r,n,i,s){var a=dn(e),o=dn(t),l=a?"[object Array]":l_(e),c=o?"[object Array]":l_(t),h=(l=l=="[object Arguments]"?Cl:l)==Cl,u=(c=c=="[object Arguments]"?Cl:c)==Cl,m=l==c;if(m&&md(e)){if(!md(t))return!1;a=!0,h=!1}if(m&&!h)return s||(s=new ec),a||Ww(e)?zw(e,t,r,n,i,s):m5(e,t,l,r,n,i,s);if(!(1&r)){var v=h&&c_.call(e,"__wrapped__"),w=u&&c_.call(t,"__wrapped__");if(v||w){var _=v?e.value():e,g=w?t.value():t;return s||(s=new ec),i(_,g,r,n,s)}}return!!m&&(s||(s=new ec),B5(e,t,r,n,i,s))},Vw=function e(t,r,n,i,s){return t===r||(t==null||r==null||!Ns(t)&&!Ns(r)?t!=t&&r!=r:W5(t,r,n,i,e,s))},V5=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 ec,u;if(!(u===void 0?Vw(c,l,3,n,h):u))return!1}}return!0},Kw=function(e){return e==e&&!Qp(e)},K5=function(e){for(var t=em(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Kw(i)]}return t},Gw=function(e,t){return function(r){return r!=null&&r[e]===t&&(t!==void 0||e in Object(r))}},G5=function(e){var t=K5(e);return t.length==1&&t[0][2]?Gw(t[0][0],t[0][1]):function(r){return r===e||V5(r,e,t)}},tm=function(e){return typeof e=="symbol"||Ns(e)&&Fs(e)=="[object Symbol]"},q5=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Y5=/^\w*$/,rm=function(e,t){if(dn(e))return!1;var r=typeof e;return!(r!="number"&&r!="symbol"&&r!="boolean"&&e!=null&&!tm(e))||Y5.test(e)||!q5.test(e)||t!=null&&e in Object(t)};function nm(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(nm.Cache||mu),r}nm.Cache=mu;var J5=nm,X5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Q5=/\\(\\)?/g,Z5=function(e){var t=J5(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(X5,function(r,n,i,s){t.push(i?s.replace(Q5,"$1"):n||r)}),t}),eL=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},u_=Gr?Gr.prototype:void 0,f_=u_?u_.toString:void 0,tL=function e(t){if(typeof t=="string")return t;if(dn(t))return eL(t,e)+"";if(tm(t))return f_?f_.call(t):"";var r=t+"";return r=="0"&&1/t==-1/0?"-0":r},rL=function(e){return e==null?"":tL(e)},qw=function(e,t){return dn(e)?e:rm(e,t)?[e]:Z5(rL(e))},gu=function(e){if(typeof e=="string"||tm(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t},Yw=function(e,t){for(var r=0,n=(t=qw(t,e)).length;e!=null&&r<n;)e=e[gu(t[r++])];return r&&r==n?e:void 0},nL=function(e,t,r){var n=e==null?void 0:Yw(e,t);return n===void 0?r:n},iL=function(e,t){return e!=null&&t in Object(e)},sL=function(e,t,r){for(var n=-1,i=(t=qw(t,e)).length,s=!1;++n<i;){var a=gu(t[n]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++n!=i?s:!!(i=e==null?0:e.length)&&Zp(i)&&Hw(a,i)&&(dn(e)||Uw(e))},oL=function(e,t){return e!=null&&sL(e,t,iL)},aL=function(e,t){return rm(e)&&Kw(t)?Gw(gu(e),t):function(r){var n=nL(r,e);return n===void 0&&n===t?oL(r,e):Vw(t,n,3)}},lL=function(e){return e},cL=function(e){return function(t){return t==null?void 0:t[e]}},uL=function(e){return function(t){return Yw(t,e)}},fL=function(e){return rm(e)?cL(gu(e)):uL(e)},hL=function(e){return typeof e=="function"?e:e==null?lL:typeof e=="object"?dn(e)?aL(e[0],e[1]):G5(e):fL(e)};function Kn(e){if(!e)throw new Error("change is not provided");if(aa(e))return"N".concat(e.oldLineNumber);var t=ka(e)?"I":"D";return"".concat(t).concat(e.lineNumber)}Xp("old");var im=la("old"),sm=la("new");Ow("old");Ow("new");Xp("new");Xp("old");var h_=function(){try{var e=Ri(Object,"defineProperty");return e({},"",{}),e}catch{}}(),dL=function(e,t,r){t=="__proto__"&&h_?h_(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},pL=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}},mL=pL(),gL=function(e,t){return e&&mL(e,t,em)},Jw=function(e,t){var r={};return t=hL(t),gL(e,function(n,i,s){dL(r,i,t(n,i,s))}),r},vL=["changeKey","text","tokens","renderToken"],d_=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 x.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(ar(o||h))}};function _L(e){if(!Array.isArray(e))return!0;if(e.length>1)return!1;if(e.length===1){var t=Rr(e,1)[0];return t.type==="text"&&!t.value}return!0}function yL(e){var t=e.changeKey,r=e.text,n=e.tokens,i=e.renderToken,s=Is(e,vL),a=i?function(o,l){return i(o,d_,l)}:d_;return x.jsx("td",gt(gt({},s),{},{"data-change-key":t,children:n?_L(n)?" ":n.map(a):r||" "}))}var Xw=k.memo(yL);function Qw(e,t){return function(){var r=t==="old"?im(e):sm(e);return r===-1?void 0:r}}function Zw(e,t){return function(r){return e&&r?x.jsx("a",{href:t?"#"+t:void 0,children:r}):r}}function jc(e,t){return t?function(r){e(),t(r)}:e}function p_(e,t,r,n){return k.useMemo(function(){var i=Jw(e,function(s){return function(a){return s&&s(t,a)}});return i.onMouseEnter=jc(r,i.onMouseEnter),i.onMouseLeave=jc(n,i.onMouseLeave),i},[e,r,n,t])}function m_(e,t,r,n,i,s,a,o,l){var c={change:t,side:n,inHoverState:o,renderDefault:Qw(t,n),wrapInAnchor:Zw(i,s)};return x.jsx("td",gt(gt({className:e},a),{},{"data-change-key":r,children:l(c)}))}function wL(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,v=e.hideGutter,w=e.gutterAnchor,_=e.generateAnchorID,g=e.renderToken,d=e.renderGutter,f=i.type,p=i.content,y=Kn(i),S=(t=Rr(k.useState(!1),2),r=t[0],n=t[1],[r,k.useCallback(function(){return n(!0)},[]),k.useCallback(function(){return n(!1)},[])]),b=Rr(S,3),E=b[0],C=b[1],A=b[2],T=k.useMemo(function(){return{change:i}},[i]),O=p_(u,T,C,A),R=p_(m,T,C,A),M=_(i),z=l({changes:[i],defaultGenerate:function(){return o}}),U=ar("diff-gutter","diff-gutter-".concat(f),c,{"diff-gutter-selected":s}),q=ar("diff-code","diff-code-".concat(f),h,{"diff-code-selected":s});return x.jsxs("tr",{id:M,className:ar("diff-line",z),children:[!v&&m_(U,i,y,"old",w,M,O,E,d),!v&&m_(U,i,y,"new",w,M,O,E,d),x.jsx(Xw,gt({className:q,changeKey:y,text:p,tokens:a,renderToken:g},R))]})}var bL=k.memo(wL);function SL(e){var t=e.hideGutter,r=e.element;return x.jsx("tr",{className:"diff-widget",children:x.jsx("td",{colSpan:t?1:3,className:"diff-widget-content",children:r})})}var CL=["hideGutter","selectedChanges","tokens","lineClassName"],kL=["hunk","widgets","className"];function xL(e){var t=e.hunk,r=e.widgets,n=e.className,i=Is(e,kL),s=function(a,o){return a.reduce(function(l,c){var h=Kn(c);l.push(["change",h,c]);var u=o[h];return u&&l.push(["widget",h,u]),l},[])}(t.changes,r);return x.jsx("tbody",{className:ar("diff-hunk",n),children:s.map(function(a){return function(o,l){var c=Rr(o,3),h=c[0],u=c[1],m=c[2],v=l.hideGutter,w=l.selectedChanges,_=l.tokens,g=l.lineClassName,d=Is(l,CL);if(h==="change"){var f=Vn(m)?"old":"new",p=Vn(m)?im(m):sm(m),y=_?_[f][p-1]:null;return x.jsx(bL,gt({className:g,change:m,hideGutter:v,selected:w.includes(u),tokens:y},d),"change".concat(u))}return h==="widget"?x.jsx(SL,{hideGutter:v,element:m},"widget".concat(u)):null}(a,i)})})}var eb=0;function kl(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=Jw(n,function(o){return function(l){return o&&o({side:e,change:r},l)}});return a.onMouseEnter=jc(i,a.onMouseEnter),a.onMouseLeave=jc(s,a.onMouseLeave),a},[r,n,i,e,s])}function Bf(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,v=e.hover,w=e.renderToken,_=e.renderGutter;if(!t){var g=ar("diff-gutter","diff-gutter-omit",s),d=ar("diff-code","diff-code-omit",a);return[!m&&x.jsx("td",{className:g},"gutter"),x.jsx("td",{className:d},"code")]}var f=t.type,p=t.content,y=Kn(t),S=r===eb?"old":"new",b=gt({id:c||void 0,className:ar("diff-gutter","diff-gutter-".concat(f),hd({"diff-gutter-selected":n},"diff-line-hover-"+S,v),s),children:_({change:t,side:S,inHoverState:v,renderDefault:Qw(t,S),wrapInAnchor:Zw(h,u)})},o),E=ar("diff-code","diff-code-".concat(f),hd({"diff-code-selected":n},"diff-line-hover-"+S,v),a);return[!m&&x.jsx("td",gt(gt({},b),{},{"data-change-key":y}),"gutter"),x.jsx(Xw,gt({className:E,changeKey:y,text:p,tokens:i,renderToken:w},l),"code")]}function EL(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,v=e.hideGutter,w=e.generateAnchorID,_=e.generateLineClassName,g=e.gutterAnchor,d=e.renderToken,f=e.renderGutter,p=Rr(k.useState(""),2),y=p[0],S=p[1],b=kl("old",S,r,u),E=kl("new",S,n,u),C=kl("old",S,r,m),A=kl("new",S,n,m),T=r&&w(r),O=n&&w(n),R=_({changes:[r,n],defaultGenerate:function(){return t}}),M={monotonous:l,hideGutter:v,gutterClassName:c,codeClassName:h,gutterEvents:u,codeEvents:m,renderToken:d,renderGutter:f},z=gt(gt({},M),{},{change:r,side:eb,selected:i,tokens:a,gutterEvents:b,codeEvents:C,anchorID:T,gutterAnchor:g,gutterAnchorTarget:T,hover:y==="old"}),U=gt(gt({},M),{},{change:n,side:1,selected:s,tokens:o,gutterEvents:E,codeEvents:A,anchorID:r===n?null:O,gutterAnchor:g,gutterAnchorTarget:r===n?T:O,hover:y==="new"});if(l)return x.jsx("tr",{className:ar("diff-line",R),children:Bf(r?z:U)});var q=function(ee,W){return ee&&!W?"diff-line-old-only":!ee&&W?"diff-line-new-only":ee===W?"diff-line-normal":"diff-line-compare"}(r,n);return x.jsxs("tr",{className:ar("diff-line",q,R),children:[Bf(z),Bf(U)]})}var AL=k.memo(EL);function LL(e){var t=e.hideGutter,r=e.oldElement,n=e.newElement;return e.monotonous?x.jsx("tr",{className:"diff-widget",children:x.jsx("td",{colSpan:t?1:2,className:"diff-widget-content",children:r||n})}):r===n?x.jsx("tr",{className:"diff-widget",children:x.jsx("td",{colSpan:t?2:4,className:"diff-widget-content",children:r})}):x.jsxs("tr",{className:"diff-widget",children:[x.jsx("td",{colSpan:t?1:2,className:"diff-widget-content",children:r}),x.jsx("td",{colSpan:t?1:2,className:"diff-widget-content",children:n})]})}var PL=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],TL=["hunk","widgets","className"];function xl(e,t){return(e?Kn(e):"00")+(t?Kn(t):"00")}function DL(e){var t=e.hunk,r=e.widgets,n=e.className,i=Is(e,TL),s=function(a,o){for(var l=function(d){if(!d)return null;var f=Kn(d);return o[f]||null},c=[],h=0;h<a.length;h++){var u=a[h];if(aa(u))c.push(["change",xl(u,u),u,u]);else if(Vn(u)){var m=a[h+1];m&&ka(m)?(h+=1,c.push(["change",xl(u,m),u,m])):c.push(["change",xl(u,null),u,null])}else c.push(["change",xl(null,u),null,u]);var v=c[c.length-1],w=l(v[2]),_=l(v[3]);if(w||_){var g=v[1];c.push(["widget",g,w,_])}}return c}(t.changes,r);return x.jsx("tbody",{className:ar("diff-hunk",n),children:s.map(function(a){return function(o,l){var c=Rr(o,4),h=c[0],u=c[1],m=c[2],v=c[3],w=l.selectedChanges,_=l.monotonous,g=l.hideGutter,d=l.tokens,f=l.lineClassName,p=Is(l,PL);if(h==="change"){var y=!!m&&w.includes(Kn(m)),S=!!v&&w.includes(Kn(v)),b=m&&d?d.old[im(m)-1]:null,E=v&&d?d.new[sm(v)-1]:null;return x.jsx(AL,gt({className:f,oldChange:m,newChange:v,monotonous:_,hideGutter:g,oldSelected:y,newSelected:S,oldTokens:b,newTokens:E},p),"change".concat(u))}return h==="widget"?x.jsx(LL,{monotonous:_,hideGutter:g,oldElement:m,newElement:v},"widget".concat(u)):null}(a,i)})})}var IL=["gutterType","hunkClassName"];function NL(e){var t=e.hunk,r=mA(),n=r.gutterType,i=r.hunkClassName,s=Is(r,IL),a=n==="none",o=n==="anchor",l=s.viewType==="unified"?xL:DL;return x.jsx(l,gt(gt({},s),{},{hunk:t,hideGutter:a,gutterAnchor:o,className:i}))}function RL(){}function g_(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 x.jsx(NL,{hunk:t},function(r){return"-".concat(r.oldStart,",").concat(r.oldLines," +").concat(r.newStart,",").concat(r.newLines)}(t))})}function ML(e){var t=e.diffType,r=e.hunks,n=e.optimizeSelection,i=e.className,s=e.hunkClassName,a=s===void 0?Vt.hunkClassName:s,o=e.lineClassName,l=o===void 0?Vt.lineClassName:o,c=e.generateLineClassName,h=c===void 0?Vt.generateLineClassName:c,u=e.gutterClassName,m=u===void 0?Vt.gutterClassName:u,v=e.codeClassName,w=v===void 0?Vt.codeClassName:v,_=e.gutterType,g=_===void 0?Vt.gutterType:_,d=e.viewType,f=d===void 0?Vt.viewType:d,p=e.gutterEvents,y=p===void 0?Vt.gutterEvents:p,S=e.codeEvents,b=S===void 0?Vt.codeEvents:S,E=e.generateAnchorID,C=E===void 0?Vt.generateAnchorID:E,A=e.selectedChanges,T=A===void 0?Vt.selectedChanges:A,O=e.widgets,R=O===void 0?Vt.widgets:O,M=e.renderGutter,z=M===void 0?Vt.renderGutter:M,U=e.tokens,q=e.renderToken,ee=e.children,W=ee===void 0?OL:ee,I=k.useRef(null),L=k.useCallback(function(H){var j=H.target;if(H.button===0){var N=function(ge,ae){for(var Se=ge;Se&&Se!==document.documentElement&&!Se.classList.contains(ae);)Se=Se.parentElement;return Se===document.documentElement?null:Se}(j,"diff-code");if(N&&N.parentElement){var K=window.getSelection();K&&K.removeAllRanges();var V=cA(N.parentElement.children).indexOf(N);if(V===1||V===3){var X,re=dA(I.current?I.current.querySelectorAll(".diff-line"):[]);try{for(re.s();!(X=re.n()).done;){var ce=X.value.children;g_(ce[1],V===1),g_(ce[3],V===3)}}catch(ge){re.e(ge)}finally{re.f()}}}}},[]),B=g==="none",D=t==="add"||t==="delete",P=f==="split"&&!D&&n?L:RL,$=k.useMemo(function(){return x.jsxs("colgroup",f==="unified"?{children:[!B&&x.jsx("col",{className:"diff-gutter-col"}),!B&&x.jsx("col",{className:"diff-gutter-col"}),x.jsx("col",{})]}:D?{children:[!B&&x.jsx("col",{className:"diff-gutter-col"}),x.jsx("col",{})]}:{children:[!B&&x.jsx("col",{className:"diff-gutter-col"}),x.jsx("col",{}),!B&&x.jsx("col",{className:"diff-gutter-col"}),x.jsx("col",{})]})},[f,D,B]),Y=k.useMemo(function(){return{hunkClassName:a,lineClassName:l,generateLineClassName:h,gutterClassName:m,codeClassName:w,monotonous:D,hideGutter:B,viewType:f,gutterType:g,codeEvents:b,gutterEvents:y,generateAnchorID:C,selectedChanges:T,widgets:R,renderGutter:z,tokens:U,renderToken:q}},[w,b,C,m,y,g,B,a,l,h,D,z,q,T,U,f,R]);return x.jsx(pA,{value:Y,children:x.jsxs("table",{ref:I,className:ar("diff","diff-".concat(f),i),onMouseDown:P,children:[$,W(r)]})})}var a$=k.memo(ML);Gr&&Gr.isConcatSpreadable;var om=Ca(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],v=h[2],w=h[3],_=h[4],g=this.diff_main(u,v,i,s),d=this.diff_main(m,w,i,s);return g.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 v=this.diff_main(u,m,!1,i),w=v.length-1;w>=0;w--)o.splice(l,0,v[w]);l+=v.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 v=s-a,w=v%2!=0,_=0,g=0,d=0,f=0,p=0;p<o&&!(new Date().getTime()>i);p++){for(var y=-p+_;y<=p-g;y+=2){for(var S=l+y,b=(O=y==-p||y!=p&&h[S-1]<h[S+1]?h[S+1]:h[S-1]+1)-y;O<s&&b<a&&r.charAt(O)==n.charAt(b);)O++,b++;if(h[S]=O,O>s)g+=2;else if(b>a)_+=2;else if(w&&(A=l+v-y)>=0&&A<c&&u[A]!=-1&&O>=(C=s-u[A]))return this.diff_bisectSplit_(r,n,O,b,i)}for(var E=-p+d;E<=p-f;E+=2){for(var C,A=l+E,T=(C=E==-p||E!=p&&u[A-1]<u[A+1]?u[A+1]:u[A-1]+1)-E;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(!w&&(S=l+v-E)>=0&&S<c&&h[S]!=-1){var O;if(b=l+(O=h[S])-S,O>=(C=s-C))return this.diff_bisectSplit_(r,n,O,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,v=i.length;m<c.length-1;){(m=c.indexOf(`
|
|
52
|
+
`,u))==-1&&(m=c.length-1);var w=c.substring(u,m+1);(s.hasOwnProperty?s.hasOwnProperty(w):s[w]!==void 0)?h+=String.fromCharCode(s[w]):(v==o&&(w=c.substring(u),m=c.length),h+=String.fromCharCode(v),s[w]=v,i[v++]=w),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(_,g,d){for(var f,p,y,S,b=_.substring(d,d+Math.floor(_.length/4)),E=-1,C="";(E=g.indexOf(b,E+1))!=-1;){var A=a.diff_commonPrefix(_.substring(d),g.substring(E)),T=a.diff_commonSuffix(_.substring(0,d),g.substring(0,E));C.length<T+A&&(C=g.substring(E-T,E)+g.substring(E,E+A),f=_.substring(0,d-T),p=_.substring(d+A),y=g.substring(0,E-T),S=g.substring(E+A))}return 2*C.length>=_.length?[f,p,y,S,C]:null}var l,c,h,u,m,v=o(i,s,Math.ceil(i.length/4)),w=o(i,s,Math.ceil(i.length/2));return v||w?(l=w?v&&v[4].length>w[4].length?v:w:v,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],v=r[o][1],w=this.diff_commonOverlap_(m,v),_=this.diff_commonOverlap_(v,m);w>=_?(w>=m.length/2||w>=v.length/2)&&(r.splice(o,0,new t.Diff(0,v.substring(0,w))),r[o-1][1]=m.substring(0,m.length-w),r[o+1][1]=v.substring(w),o++):(_>=m.length/2||_>=v.length/2)&&(r.splice(o,0,new t.Diff(0,m.substring(0,_))),r[o-1][0]=1,r[o-1][1]=v.substring(0,v.length-_),r[o+1][0]=-1,r[o+1][1]=m.substring(_),o++),o++}o++}},t.prototype.diff_cleanupSemanticLossless=function(r){function n(_,g){if(!_||!g)return 6;var d=_.charAt(_.length-1),f=g.charAt(0),p=d.match(t.nonAlphaNumericRegex_),y=f.match(t.nonAlphaNumericRegex_),S=p&&d.match(t.whitespaceRegex_),b=y&&f.match(t.whitespaceRegex_),E=S&&d.match(t.linebreakRegex_),C=b&&f.match(t.linebreakRegex_),A=E&&_.match(t.blanklineEndRegex_),T=C&&g.match(t.blanklineStartRegex_);return A||T?5:E||C?4:p&&!S&&b?3:S||b?2:p||y?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,v=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 w=n(s,a)+n(a,o);w>=v&&(v=w,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,"&").replace(s,"<").replace(a,">").replace(o,"¶<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,E){var C=b/n.length,A=Math.abs(i-E);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 v,w=n.length+r.length,_=0;_<n.length;_++){for(h=0,u=w;h<u;)o(_,i+u)<=l?h=u:w=u,u=Math.floor((w-h)/2+h);w=u;var g=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>=g;p--){var y=s[r.charAt(p-1)];if(f[p]=_===0?(f[p+1]<<1|1)&y:(f[p+1]<<1|1)&y|(v[p+1]|v[p])<<1|1|v[p+1],f[p]&m){var S=o(_,p-1);if(S<=l){if(l=S,!((c=p-1)>i))break;g=Math.max(1,2*i-c)}}}if(o(_+1,i)>l)break;v=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,v=s,w=0;w<a.length;w++){var _=a[w][0],g=a[w][1];switch(c||_===0||(l.start1=h,l.start2=u),_){case 1:l.diffs[c++]=a[w],l.length2+=g.length,v=v.substring(0,u)+g+v.substring(u);break;case-1:l.length1+=g.length,l.diffs[c++]=a[w],v=v.substring(0,u)+v.substring(u+g.length);break;case 0:g.length<=2*this.Patch_Margin&&c&&a.length!=w+1?(l.diffs[c++]=a[w],l.length1+=g.length,l.length2+=g.length):g.length>=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,m),o.push(l),l=new t.patch_obj,c=0,m=v,h=u)}_!==1&&(h+=g.length),_!==-1&&(u+=g.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 v=this.diff_main(u,c,!1);if(u.length>this.Match_MaxBits&&this.diff_levenshtein(v)/u.length>this.Patch_DeleteThreshold)a[o]=!1;else{this.diff_cleanupSemanticLossless(v);for(var w,_=0,g=0;g<r[o].diffs.length;g++){var d=r[o].diffs[g];d[0]!==0&&(w=this.diff_xIndex(v,_)),d[0]===1?n=n.substring(0,l+w)+d[1]+n.substring(l+w):d[0]===-1&&(n=n.substring(0,l+w)+n.substring(l+this.diff_xIndex(v,_+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 v=this.diff_text1(s.diffs).substring(0,this.Patch_Margin);v!==""&&(c.length1+=v.length,c.length2+=v.length,c.diffs.length!==0&&c.diffs[c.diffs.length-1][0]===0?c.diffs[c.diffs.length-1][1]+=v:c.diffs.push(new t.Diff(0,v))),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});om.DIFF_EQUAL;om.DIFF_DELETE;om.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 wd(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 jL(e){if(Array.isArray(e))return e}function BL(e){if(Array.isArray(e))return wd(e)}function FL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zL(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,tb(n.key),n)}}function $L(e,t,r){return t&&zL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function rc(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=am(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 Fe(e,t,r){return(t=tb(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function HL(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 WL(){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 VL(){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 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 de(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){Fe(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 vu(e,t){return jL(e)||HL(e,t)||am(e,t)||WL()}function Or(e){return BL(e)||UL(e)||am(e)||VL()}function KL(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 tb(e){var t=KL(e,"string");return typeof t=="symbol"?t:t+""}function Bc(e){"@babel/helpers - typeof";return Bc=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},Bc(e)}function am(e,t){if(e){if(typeof e=="string")return wd(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)?wd(e,t):void 0}}var __=function(){},lm={},rb={},nb=null,ib={mark:__,measure:__};try{typeof window<"u"&&(lm=window),typeof document<"u"&&(rb=document),typeof MutationObserver<"u"&&(nb=MutationObserver),typeof performance<"u"&&(ib=performance)}catch{}var GL=lm.navigator||{},y_=GL.userAgent,w_=y_===void 0?"":y_,Jn=lm,ot=rb,b_=nb,El=ib;Jn.document;var _n=!!ot.documentElement&&!!ot.head&&typeof ot.addEventListener=="function"&&typeof ot.createElement=="function",sb=~w_.indexOf("MSIE")||~w_.indexOf("Trident/"),Ff,qL=/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)?[\-\ ]/,YL=/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,ob={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"}},JL={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},ab=["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"],Dt="classic",xa="duotone",lb="sharp",cb="sharp-duotone",ub="chisel",fb="etch",hb="jelly",db="jelly-duo",pb="jelly-fill",mb="notdog",gb="notdog-duo",vb="slab",_b="slab-press",yb="thumbprint",wb="utility",bb="utility-duo",Sb="utility-fill",Cb="whiteboard",XL="Classic",QL="Duotone",ZL="Sharp",eP="Sharp Duotone",tP="Chisel",rP="Etch",nP="Jelly",iP="Jelly Duo",sP="Jelly Fill",oP="Notdog",aP="Notdog Duo",lP="Slab",cP="Slab Press",uP="Thumbprint",fP="Utility",hP="Utility Duo",dP="Utility Fill",pP="Whiteboard",kb=[Dt,xa,lb,cb,ub,fb,hb,db,pb,mb,gb,vb,_b,yb,wb,bb,Sb,Cb];Ff={},Fe(Fe(Fe(Fe(Fe(Fe(Fe(Fe(Fe(Fe(Ff,Dt,XL),xa,QL),lb,ZL),cb,eP),ub,tP),fb,rP),hb,nP),db,iP),pb,sP),mb,oP),Fe(Fe(Fe(Fe(Fe(Fe(Fe(Fe(Ff,gb,aP),vb,lP),_b,cP),yb,uP),wb,fP),bb,hP),Sb,dP),Cb,pP);var mP={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"}},gP={"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"}},vP=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}]]),_P={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"}},xb=["fak","fa-kit","fakd","fa-kit-duotone"],S_={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},yP=["kit"],wP="kit",bP="kit-duotone",SP="Kit",CP="Kit Duotone";Fe(Fe({},wP,SP),bP,CP);var kP={kit:{"fa-kit":"fak"}},xP={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},EP={kit:{fak:"fa-kit"}},C_={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}},zf,Al={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},AP=["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"],LP="classic",PP="duotone",TP="sharp",DP="sharp-duotone",IP="chisel",NP="etch",RP="jelly",OP="jelly-duo",MP="jelly-fill",jP="notdog",BP="notdog-duo",FP="slab",zP="slab-press",$P="thumbprint",UP="utility",HP="utility-duo",WP="utility-fill",VP="whiteboard",KP="Classic",GP="Duotone",qP="Sharp",YP="Sharp Duotone",JP="Chisel",XP="Etch",QP="Jelly",ZP="Jelly Duo",eT="Jelly Fill",tT="Notdog",rT="Notdog Duo",nT="Slab",iT="Slab Press",sT="Thumbprint",oT="Utility",aT="Utility Duo",lT="Utility Fill",cT="Whiteboard";zf={},Fe(Fe(Fe(Fe(Fe(Fe(Fe(Fe(Fe(Fe(zf,LP,KP),PP,GP),TP,qP),DP,YP),IP,JP),NP,XP),RP,QP),OP,ZP),MP,eT),jP,tT),Fe(Fe(Fe(Fe(Fe(Fe(Fe(Fe(zf,BP,rT),FP,nT),zP,iT),$P,sT),UP,oT),HP,aT),WP,lT),VP,cT);var uT="kit",fT="kit-duotone",hT="Kit",dT="Kit Duotone";Fe(Fe({},uT,hT),fT,dT);var pT={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"}},mT={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"]},bd={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"}},gT=["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands","fa-semibold"],Eb=["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(AP,gT),vT=["solid","regular","light","thin","duotone","brands","semibold"],Ab=[1,2,3,4,5,6,7,8,9,10],_T=Ab.concat([11,12,13,14,15,16,17,18,19,20]),yT=["aw","fw","pull-left","pull-right"],wT=[].concat(Or(Object.keys(mT)),vT,yT,["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",Al.GROUP,Al.SWAP_OPACITY,Al.PRIMARY,Al.SECONDARY]).concat(Ab.map(function(e){return"".concat(e,"x")})).concat(_T.map(function(e){return"w-".concat(e)})),bT={"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"}},pn="___FONT_AWESOME___",Sd=16,Lb="fa",Pb="svg-inline--fa",xi="data-fa-i2svg",Cd="data-fa-pseudo-element",ST="data-fa-pseudo-element-pending",cm="data-prefix",um="data-icon",k_="fontawesome-i2svg",CT="async",kT=["HTML","HEAD","STYLE","SCRIPT"],Tb=["::before","::after",":before",":after"],Db=function(){try{return!0}catch{return!1}}();function Ea(e){return new Proxy(e,{get:function(r,n){return n in r?r[n]:r[Dt]}})}var Ib=de({},ob);Ib[Dt]=de(de(de(de({},{"fa-duotone":"duotone"}),ob[Dt]),S_.kit),S_["kit-duotone"]);var xT=Ea(Ib),kd=de({},_P);kd[Dt]=de(de(de(de({},{duotone:"fad"}),kd[Dt]),C_.kit),C_["kit-duotone"]);var x_=Ea(kd),xd=de({},bd);xd[Dt]=de(de({},xd[Dt]),EP.kit);var fm=Ea(xd),Ed=de({},pT);Ed[Dt]=de(de({},Ed[Dt]),kP.kit);Ea(Ed);var ET=qL,Nb="fa-layers-text",AT=YL,LT=de({},mP);Ea(LT);var PT=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],$f=JL,TT=[].concat(Or(yP),Or(wT)),Bo=Jn.FontAwesomeConfig||{};function DT(e){var t=ot.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function IT(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}if(ot&&typeof ot.querySelector=="function"){var NT=[["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"]];NT.forEach(function(e){var t=vu(e,2),r=t[0],n=t[1],i=IT(DT(r));i!=null&&(Bo[n]=i)})}var Rb={styleDefault:"solid",familyDefault:Dt,cssPrefix:Lb,replacementClass:Pb,autoReplaceSvg:!0,autoAddCss:!0,searchPseudoElements:!1,searchPseudoElementsWarnings:!0,searchPseudoElementsFullScan:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Bo.familyPrefix&&(Bo.cssPrefix=Bo.familyPrefix);var Rs=de(de({},Rb),Bo);Rs.autoReplaceSvg||(Rs.observeMutations=!1);var Pe={};Object.keys(Rb).forEach(function(e){Object.defineProperty(Pe,e,{enumerable:!0,set:function(r){Rs[e]=r,Fo.forEach(function(n){return n(Pe)})},get:function(){return Rs[e]}})});Object.defineProperty(Pe,"familyPrefix",{enumerable:!0,set:function(t){Rs.cssPrefix=t,Fo.forEach(function(r){return r(Pe)})},get:function(){return Rs.cssPrefix}});Jn.FontAwesomeConfig=Pe;var Fo=[];function RT(e){return Fo.push(e),function(){Fo.splice(Fo.indexOf(e),1)}}var Wi=Sd,Wr={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function OT(e){if(!(!e||!_n)){var t=ot.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var r=ot.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 ot.head.insertBefore(t,n),e}}var MT="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function E_(){for(var e=12,t="";e-- >0;)t+=MT[Math.random()*62|0];return t}function zs(e){for(var t=[],r=(e||[]).length>>>0;r--;)t[r]=e[r];return t}function hm(e){return e.classList?zs(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function Ob(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function jT(e){return Object.keys(e||{}).reduce(function(t,r){return t+"".concat(r,'="').concat(Ob(e[r]),'" ')},"").trim()}function _u(e){return Object.keys(e||{}).reduce(function(t,r){return t+"".concat(r,": ").concat(e[r].trim(),";")},"")}function dm(e){return e.size!==Wr.size||e.x!==Wr.x||e.y!==Wr.y||e.rotate!==Wr.rotate||e.flipX||e.flipY}function BT(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 FT(e){var t=e.transform,r=e.width,n=r===void 0?Sd:r,i=e.height,s=i===void 0?Sd:i,a="";return sb?a+="translate(".concat(t.x/Wi-n/2,"em, ").concat(t.y/Wi-s/2,"em) "):a+="translate(calc(-50% + ".concat(t.x/Wi,"em), calc(-50% + ").concat(t.y/Wi,"em)) "),a+="scale(".concat(t.size/Wi*(t.flipX?-1:1),", ").concat(t.size/Wi*(t.flipY?-1:1),") "),a+="rotate(".concat(t.rotate,"deg) "),a}var zT=`: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 Mb(){var e=Lb,t=Pb,r=Pe.cssPrefix,n=Pe.replacementClass,i=zT;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 A_=!1;function Uf(){Pe.autoAddCss&&!A_&&(OT(Mb()),A_=!0)}var $T={mixout:function(){return{dom:{css:Mb,insertCss:Uf}}},hooks:function(){return{beforeDOMElementCreation:function(){Uf()},beforeI2svg:function(){Uf()}}}},mn=Jn||{};mn[pn]||(mn[pn]={});mn[pn].styles||(mn[pn].styles={});mn[pn].hooks||(mn[pn].hooks={});mn[pn].shims||(mn[pn].shims=[]);var Pr=mn[pn],jb=[],Bb=function(){ot.removeEventListener("DOMContentLoaded",Bb),Fc=1,jb.map(function(t){return t()})},Fc=!1;_n&&(Fc=(ot.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(ot.readyState),Fc||ot.addEventListener("DOMContentLoaded",Bb));function UT(e){_n&&(Fc?setTimeout(e,0):jb.push(e))}function Aa(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"?Ob(e):"<".concat(t," ").concat(jT(n),">").concat(s.map(Aa).join(""),"</").concat(t,">")}function L_(e,t,r){if(e&&e[t]&&e[t][r])return{prefix:t,iconName:r,icon:e[t][r]}}var Hf=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 Fb(e){return Or(e).length!==1?null:e.codePointAt(0).toString(16)}function P_(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 Ad(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=r.skipHooks,i=n===void 0?!1:n,s=P_(t);typeof Pr.hooks.addPack=="function"&&!i?Pr.hooks.addPack(e,P_(t)):Pr.styles[e]=de(de({},Pr.styles[e]||{}),s),e==="fas"&&Ad("fa",t)}var fa=Pr.styles,HT=Pr.shims,zb=Object.keys(fm),WT=zb.reduce(function(e,t){return e[t]=Object.keys(fm[t]),e},{}),pm=null,$b={},Ub={},Hb={},Wb={},Vb={};function VT(e){return~TT.indexOf(e)}function KT(e,t){var r=t.split("-"),n=r[0],i=r.slice(1).join("-");return n===e&&i!==""&&!VT(i)?i:null}var Kb=function(){var t=function(s){return Hf(fa,function(a,o,l){return a[l]=Hf(o,s,{}),a},{})};$b=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}),Ub=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}),Vb=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 fa||Pe.autoFetchSvg,n=Hf(HT,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:{}});Hb=n.names,Wb=n.unicodes,pm=yu(Pe.styleDefault,{family:Pe.familyDefault})};RT(function(e){pm=yu(e.styleDefault,{family:Pe.familyDefault})});Kb();function mm(e,t){return($b[e]||{})[t]}function GT(e,t){return(Ub[e]||{})[t]}function gi(e,t){return(Vb[e]||{})[t]}function Gb(e){return Hb[e]||{prefix:null,iconName:null}}function qT(e){var t=Wb[e],r=mm("fas",e);return t||(r?{prefix:"fas",iconName:r}:null)||{prefix:null,iconName:null}}function Xn(){return pm}var qb=function(){return{prefix:null,iconName:null,rest:[]}};function YT(e){var t=Dt,r=zb.reduce(function(n,i){return n[i]="".concat(Pe.cssPrefix,"-").concat(i),n},{});return kb.forEach(function(n){(e.includes(r[n])||e.some(function(i){return WT[n].includes(i)}))&&(t=n)}),t}function yu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.family,n=r===void 0?Dt:r,i=xT[n][e];if(n===xa&&!e)return"fad";var s=x_[n][e]||x_[n][i],a=e in Pr.styles?e:null,o=s||a||null;return o}function JT(e){var t=[],r=null;return e.forEach(function(n){var i=KT(Pe.cssPrefix,n);i?r=i:n&&t.push(n)}),{iconName:r,rest:t}}function T_(e){return e.sort().filter(function(t,r,n){return n.indexOf(t)===r})}var D_=Eb.concat(xb);function wu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.skipLookups,n=r===void 0?!1:r,i=null,s=T_(e.filter(function(v){return D_.includes(v)})),a=T_(e.filter(function(v){return!D_.includes(v)})),o=s.filter(function(v){return i=v,!ab.includes(v)}),l=vu(o,1),c=l[0],h=c===void 0?null:c,u=YT(s),m=de(de({},JT(a)),{},{prefix:yu(h,{family:u})});return de(de(de({},m),eD({values:e,family:u,styles:fa,config:Pe,canonical:m,givenPrefix:i})),XT(n,i,m))}function XT(e,t,r){var n=r.prefix,i=r.iconName;if(e||!n||!i)return{prefix:n,iconName:i};var s=t==="fa"?Gb(i):{},a=gi(n,i);return i=s.iconName||a||i,n=s.prefix||n,n==="far"&&!fa.far&&fa.fas&&!Pe.autoFetchSvg&&(n="fas"),{prefix:n,iconName:i}}var QT=kb.filter(function(e){return e!==Dt||e!==xa}),ZT=Object.keys(bd).filter(function(e){return e!==Dt}).map(function(e){return Object.keys(bd[e])}).flat();function eD(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===xa,u=t.includes("fa-duotone")||t.includes("fad"),m=c.familyDefault==="duotone",v=n.prefix==="fad"||n.prefix==="fa-duotone";if(!h&&(u||m||v)&&(n.prefix="fad"),(t.includes("fa-brands")||t.includes("fab"))&&(n.prefix="fab"),!n.prefix&&QT.includes(r)){var w=Object.keys(o).find(function(g){return ZT.includes(g)});if(w||c.autoFetchSvg){var _=vP.get(r).defaultShortPrefixId;n.prefix=_,n.iconName=gi(n.prefix,n.iconName)||n.iconName}}return(n.prefix==="fa"||s==="fa")&&(n.prefix=Xn()||"fas"),n}var tD=function(){function e(){FL(this,e),this.definitions={}}return $L(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]=de(de({},r.definitions[o]||{}),a[o]),Ad(o,a[o]);var l=fm[Dt][o];l&&Ad(l,a[o]),Kb()})}},{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}}])}(),I_=[],ms={},Ss={},rD=Object.keys(Ss);function nD(e,t){var r=t.mixoutsTo;return I_=e,ms={},Object.keys(Ss).forEach(function(n){rD.indexOf(n)===-1&&delete Ss[n]}),I_.forEach(function(n){var i=n.mixout?n.mixout():{};if(Object.keys(i).forEach(function(a){typeof i[a]=="function"&&(r[a]=i[a]),Bc(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){ms[a]||(ms[a]=[]),ms[a].push(s[a])})}n.provides&&n.provides(Ss)}),r}function Ld(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=ms[e]||[];return s.forEach(function(a){t=a.apply(null,[t].concat(n))}),t}function Ei(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=ms[e]||[];i.forEach(function(s){s.apply(null,r)})}function Qn(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return Ss[e]?Ss[e].apply(null,t):void 0}function Pd(e){e.prefix==="fa"&&(e.prefix="fas");var t=e.iconName,r=e.prefix||Xn();if(t)return t=gi(r,t)||t,L_(Yb.definitions,r,t)||L_(Pr.styles,r,t)}var Yb=new tD,iD=function(){Pe.autoReplaceSvg=!1,Pe.observeMutations=!1,Ei("noAuto")},sD={i2svg:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return _n?(Ei("beforeI2svg",t),Qn("pseudoElements2svg",t),Qn("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;Pe.autoReplaceSvg===!1&&(Pe.autoReplaceSvg=!0),Pe.observeMutations=!0,UT(function(){aD({autoReplaceSvgRoot:r}),Ei("watch",t)})}},oD={icon:function(t){if(t===null)return null;if(Bc(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:gi(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=yu(t[0]);return{prefix:n,iconName:gi(n,r)||r}}if(typeof t=="string"&&(t.indexOf("".concat(Pe.cssPrefix,"-"))>-1||t.match(ET))){var i=wu(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||Xn(),iconName:gi(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var s=Xn();return{prefix:s,iconName:gi(s,t)||t}}}},dr={noAuto:iD,config:Pe,dom:sD,parse:oD,library:Yb,findIconDefinition:Pd,toHtml:Aa},aD=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.autoReplaceSvgRoot,n=r===void 0?ot:r;(Object.keys(Pr.styles).length>0||Pe.autoFetchSvg)&&_n&&Pe.autoReplaceSvg&&dr.dom.i2svg({node:n})};function bu(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(n){return Aa(n)})}}),Object.defineProperty(e,"node",{get:function(){if(_n){var n=ot.createElement("div");return n.innerHTML=e.html,n.children}}}),e}function lD(e){var t=e.children,r=e.main,n=e.mask,i=e.attributes,s=e.styles,a=e.transform;if(dm(a)&&r.found&&!n.found){var o=r.width,l=r.height,c={x:o/l/2,y:.5};i.style=_u(de(de({},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 cD(e){var t=e.prefix,r=e.iconName,n=e.children,i=e.attributes,s=e.symbol,a=s===!0?"".concat(t,"-").concat(Pe.cssPrefix,"-").concat(r):s;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:de(de({},i),{},{id:a}),children:n}]}]}function uD(e){var t=["aria-label","aria-labelledby","title","role"];return t.some(function(r){return r in e})}function gm(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,v=m.width,w=m.height,_=[Pe.replacementClass,s?"".concat(Pe.cssPrefix,"-").concat(s):""].filter(function(S){return c.classes.indexOf(S)===-1}).filter(function(S){return S!==""||!!S}).concat(c.classes).join(" "),g={children:[],attributes:de(de({},c.attributes),{},{"data-prefix":i,"data-icon":s,class:_,role:c.attributes.role||"img",viewBox:"0 0 ".concat(v," ").concat(w)})};!uD(c.attributes)&&!c.attributes["aria-hidden"]&&(g.attributes["aria-hidden"]="true"),u&&(g.attributes[xi]="");var d=de(de({},g),{},{prefix:i,iconName:s,main:r,mask:n,maskId:l,transform:a,symbol:o,styles:de({},c.styles)}),f=n.found&&r.found?Qn("generateAbstractMask",d)||{children:[],attributes:{}}:Qn("generateAbstractIcon",d)||{children:[],attributes:{}},p=f.children,y=f.attributes;return d.children=p,d.attributes=y,o?cD(d):lD(d)}function N_(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=de(de({},s.attributes),{},{class:s.classes.join(" ")});o&&(l[xi]="");var c=de({},s.styles);dm(i)&&(c.transform=FT({transform:i,width:r,height:n}),c["-webkit-transform"]=c.transform);var h=_u(c);h.length>0&&(l.style=h);var u=[];return u.push({tag:"span",attributes:l,children:[t]}),u}function fD(e){var t=e.content,r=e.extra,n=de(de({},r.attributes),{},{class:r.classes.join(" ")}),i=_u(r.styles);i.length>0&&(n.style=i);var s=[];return s.push({tag:"span",attributes:n,children:[t]}),s}var Wf=Pr.styles;function Td(e){var t=e[0],r=e[1],n=e.slice(4),i=vu(n,1),s=i[0],a=null;return Array.isArray(s)?a={tag:"g",attributes:{class:"".concat(Pe.cssPrefix,"-").concat($f.GROUP)},children:[{tag:"path",attributes:{class:"".concat(Pe.cssPrefix,"-").concat($f.SECONDARY),fill:"currentColor",d:s[0]}},{tag:"path",attributes:{class:"".concat(Pe.cssPrefix,"-").concat($f.PRIMARY),fill:"currentColor",d:s[1]}}]}:a={tag:"path",attributes:{fill:"currentColor",d:s}},{found:!0,width:t,height:r,icon:a}}var hD={found:!1,width:512,height:512};function dD(e,t){!Db&&!Pe.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function Dd(e,t){var r=t;return t==="fa"&&Pe.styleDefault!==null&&(t=Xn()),new Promise(function(n,i){if(r==="fa"){var s=Gb(e)||{};e=s.iconName||e,t=s.prefix||t}if(e&&t&&Wf[t]&&Wf[t][e]){var a=Wf[t][e];return n(Td(a))}dD(e,t),n(de(de({},hD),{},{icon:Pe.showMissingIcons&&e?Qn("missingIconAbstract")||{}:{}}))})}var R_=function(){},Id=Pe.measurePerformance&&El&&El.mark&&El.measure?El:{mark:R_,measure:R_},Ao='FA "7.1.0"',pD=function(t){return Id.mark("".concat(Ao," ").concat(t," begins")),function(){return Jb(t)}},Jb=function(t){Id.mark("".concat(Ao," ").concat(t," ends")),Id.measure("".concat(Ao," ").concat(t),"".concat(Ao," ").concat(t," begins"),"".concat(Ao," ").concat(t," ends"))},vm={begin:pD,end:Jb},nc=function(){};function O_(e){var t=e.getAttribute?e.getAttribute(xi):null;return typeof t=="string"}function mD(e){var t=e.getAttribute?e.getAttribute(cm):null,r=e.getAttribute?e.getAttribute(um):null;return t&&r}function gD(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(Pe.replacementClass)}function vD(){if(Pe.autoReplaceSvg===!0)return ic.replace;var e=ic[Pe.autoReplaceSvg];return e||ic.replace}function _D(e){return ot.createElementNS("http://www.w3.org/2000/svg",e)}function yD(e){return ot.createElement(e)}function Xb(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.ceFn,n=r===void 0?e.tag==="svg"?_D:yD:r;if(typeof e=="string")return ot.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(Xb(a,{ceFn:n}))}),i}function wD(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var ic={replace:function(t){var r=t[0];if(r.parentNode)if(t[1].forEach(function(i){r.parentNode.insertBefore(Xb(i),r)}),r.getAttribute(xi)===null&&Pe.keepOriginalSource){var n=ot.createComment(wD(r));r.parentNode.replaceChild(n,r)}else r.remove()},nest:function(t){var r=t[0],n=t[1];if(~hm(r).indexOf(Pe.replacementClass))return ic.replace(t);var i=new RegExp("".concat(Pe.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){var s=n[0].attributes.class.split(" ").reduce(function(o,l){return l===Pe.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 Aa(o)}).join(`
|
|
613
|
+
`);r.setAttribute(xi,""),r.innerHTML=a}};function M_(e){e()}function Qb(e,t){var r=typeof t=="function"?t:nc;if(e.length===0)r();else{var n=M_;Pe.mutateApproach===CT&&(n=Jn.requestAnimationFrame||M_),n(function(){var i=vD(),s=vm.begin("mutate");e.map(i),s(),r()})}}var _m=!1;function Zb(){_m=!0}function Nd(){_m=!1}var zc=null;function j_(e){if(b_&&Pe.observeMutations){var t=e.treeCallback,r=t===void 0?nc:t,n=e.nodeCallback,i=n===void 0?nc:n,s=e.pseudoElementsCallback,a=s===void 0?nc:s,o=e.observeMutationsRoot,l=o===void 0?ot:o;zc=new b_(function(c){if(!_m){var h=Xn();zs(c).forEach(function(u){if(u.type==="childList"&&u.addedNodes.length>0&&!O_(u.addedNodes[0])&&(Pe.searchPseudoElements&&a(u.target),r(u.target)),u.type==="attributes"&&u.target.parentNode&&Pe.searchPseudoElements&&a([u.target],!0),u.type==="attributes"&&O_(u.target)&&~PT.indexOf(u.attributeName))if(u.attributeName==="class"&&mD(u.target)){var m=wu(hm(u.target)),v=m.prefix,w=m.iconName;u.target.setAttribute(cm,v||h),w&&u.target.setAttribute(um,w)}else gD(u.target)&&i(u.target)})}}),_n&&zc.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function bD(){zc&&zc.disconnect()}function SD(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 CD(e){var t=e.getAttribute("data-prefix"),r=e.getAttribute("data-icon"),n=e.innerText!==void 0?e.innerText.trim():"",i=wu(hm(e));return i.prefix||(i.prefix=Xn()),t&&r&&(i.prefix=t,i.iconName=r),i.iconName&&i.prefix||(i.prefix&&n.length>0&&(i.iconName=GT(i.prefix,e.innerText)||mm(i.prefix,Fb(e.innerText))),!i.iconName&&Pe.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function kD(e){var t=zs(e.attributes).reduce(function(r,n){return r.name!=="class"&&r.name!=="style"&&(r[n.name]=n.value),r},{});return t}function xD(){return{iconName:null,prefix:null,transform:Wr,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function B_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},r=CD(e),n=r.iconName,i=r.prefix,s=r.rest,a=kD(e),o=Ld("parseNodeAttributes",{},e),l=t.styleParser?SD(e):[];return de({iconName:n,prefix:i,transform:Wr,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:s,styles:l,attributes:a}},o)}var ED=Pr.styles;function eS(e){var t=Pe.autoReplaceSvg==="nest"?B_(e,{styleParser:!1}):B_(e);return~t.extra.classes.indexOf(Nb)?Qn("generateLayersText",e,t):Qn("generateSvgReplacementMutation",e,t)}function AD(){return[].concat(Or(xb),Or(Eb))}function F_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!_n)return Promise.resolve();var r=ot.documentElement.classList,n=function(u){return r.add("".concat(k_,"-").concat(u))},i=function(u){return r.remove("".concat(k_,"-").concat(u))},s=Pe.autoFetchSvg?AD():ab.concat(Object.keys(ED));s.includes("fa")||s.push("fa");var a=[".".concat(Nb,":not([").concat(xi,"])")].concat(s.map(function(h){return".".concat(h,":not([").concat(xi,"])")})).join(", ");if(a.length===0)return Promise.resolve();var o=[];try{o=zs(e.querySelectorAll(a))}catch{}if(o.length>0)n("pending"),i("complete");else return Promise.resolve();var l=vm.begin("onTree"),c=o.reduce(function(h,u){try{var m=eS(u);m&&h.push(m)}catch(v){Db||v.name==="MissingIcon"&&console.error(v)}return h},[]);return new Promise(function(h,u){Promise.all(c).then(function(m){Qb(m,function(){n("active"),n("complete"),i("pending"),typeof t=="function"&&t(),l(),h()})}).catch(function(m){l(),u(m)})})}function LD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;eS(e).then(function(r){r&&Qb([r],t)})}function PD(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=(t||{}).icon?t:Pd(t||{}),i=r.mask;return i&&(i=(i||{}).icon?i:Pd(i||{})),e(n,de(de({},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?Wr: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,v=r.attributes,w=v===void 0?{}:v,_=r.styles,g=_===void 0?{}:_;if(t){var d=t.prefix,f=t.iconName,p=t.icon;return bu(de({type:"icon"},t),function(){return Ei("beforeDOMElementCreation",{iconDefinition:t,params:r}),gm({icons:{main:Td(p),mask:l?Td(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:d,iconName:f,transform:de(de({},Wr),i),symbol:a,maskId:h,extra:{attributes:w,styles:g,classes:m}})})}},DD={mixout:function(){return{icon:PD(TD)}},hooks:function(){return{mutationObserverCallbacks:function(r){return r.treeCallback=F_,r.nodeCallback=LD,r}}},provides:function(t){t.i2svg=function(r){var n=r.node,i=n===void 0?ot:n,s=r.callback,a=s===void 0?function(){}:s;return F_(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([Dd(i,s),l.iconName?Dd(l.iconName,l.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(v){var w=vu(v,2),_=w[0],g=w[1];u([r,gm({icons:{main:_,mask:g},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=_u(o);l.length>0&&(i.style=l);var c;return dm(a)&&(c=Qn("generateAbstractTransformGrouping",{main:s,transform:a,containerWidth:s.width,iconWidth:s.width})),n.push(c||s.icon),{children:n,attributes:i}}}},ID={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 bu({type:"layer"},function(){Ei("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(Pe.cssPrefix,"-layers")].concat(Or(s)).join(" ")},children:a}]})}}}},ND={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 bu({type:"counter",content:r},function(){return Ei("beforeDOMElementCreation",{content:r,params:n}),fD({content:r.toString(),extra:{attributes:o,styles:c,classes:["".concat(Pe.cssPrefix,"-layers-counter")].concat(Or(s))}})})}}}},RD={mixout:function(){return{text:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.transform,s=i===void 0?Wr: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 bu({type:"text",content:r},function(){return Ei("beforeDOMElementCreation",{content:r,params:n}),N_({content:r,transform:de(de({},Wr),s),extra:{attributes:c,styles:u,classes:["".concat(Pe.cssPrefix,"-layers-text")].concat(Or(o))}})})}}},provides:function(t){t.generateLayersText=function(r,n){var i=n.transform,s=n.extra,a=null,o=null;if(sb){var l=parseInt(getComputedStyle(r).fontSize,10),c=r.getBoundingClientRect();a=c.width/l,o=c.height/l}return Promise.resolve([r,N_({content:r.innerHTML,width:a,height:o,transform:i,extra:s,watchable:!0})])}}},tS=new RegExp('"',"ug"),z_=[1105920,1112319],$_=de(de(de(de({},{FontAwesome:{normal:"fas",400:"fas"}}),gP),bT),xP),Rd=Object.keys($_).reduce(function(e,t){return e[t.toLowerCase()]=$_[t],e},{}),OD=Object.keys(Rd).reduce(function(e,t){var r=Rd[t];return e[t]=r[900]||Or(Object.entries(r))[0][1],e},{});function MD(e){var t=e.replace(tS,"");return Fb(Or(t)[0]||"")}function jD(e){var t=e.getPropertyValue("font-feature-settings").includes("ss01"),r=e.getPropertyValue("content"),n=r.replace(tS,""),i=n.codePointAt(0),s=i>=z_[0]&&i<=z_[1],a=n.length===2?n[0]===n[1]:!1;return s||a||t}function BD(e,t){var r=e.replace(/^['"]|['"]$/g,"").toLowerCase(),n=parseInt(t),i=isNaN(n)?"normal":n;return(Rd[r]||{})[i]||OD[r]}function U_(e,t){var r="".concat(ST).concat(t.replace(":","-"));return new Promise(function(n,i){if(e.getAttribute(r)!==null)return n();var s=zs(e.children),a=s.filter(function(b){return b.getAttribute(Cd)===t})[0],o=Jn.getComputedStyle(e,t),l=o.getPropertyValue("font-family"),c=l.match(AT),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"),v=BD(l,h),w=MD(m),_=c[0].startsWith("FontAwesome"),g=jD(o),d=mm(v,w),f=d;if(_){var p=qT(w);p.iconName&&p.prefix&&(d=p.iconName,v=p.prefix)}if(d&&!g&&(!a||a.getAttribute(cm)!==v||a.getAttribute(um)!==f)){e.setAttribute(r,f),a&&e.removeChild(a);var y=xD(),S=y.extra;S.attributes[Cd]=t,Dd(d,v).then(function(b){var E=gm(de(de({},y),{},{icons:{main:b,mask:qb()},prefix:v,iconName:f,extra:S,watchable:!0})),C=ot.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(C,e.firstChild):e.appendChild(C),C.outerHTML=E.map(function(A){return Aa(A)}).join(`
|
|
614
|
+
`),e.removeAttribute(r),n()}).catch(i)}else n()}else n()})}function FD(e){return Promise.all([U_(e,"::before"),U_(e,"::after")])}function zD(e){return e.parentNode!==document.head&&!~kT.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(Cd)&&(!e.parentNode||e.parentNode.tagName!=="svg")}var $D=function(t){return!!t&&Tb.some(function(r){return t.includes(r)})},UD=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=rc(n),s;try{for(i.s();!(s=i.n()).done;){var a=s.value;if($D(a)){var o=Tb.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 H_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(_n){var r;if(t)r=e;else if(Pe.searchPseudoElementsFullScan)r=e.querySelectorAll("*");else{var n=new Set,i=rc(document.styleSheets),s;try{for(i.s();!(s=i.n()).done;){var a=s.value;try{var o=rc(a.cssRules),l;try{for(o.s();!(l=o.n()).done;){var c=l.value,h=UD(c.selectorText),u=rc(h),m;try{for(u.s();!(m=u.n()).done;){var v=m.value;n.add(v)}}catch(_){u.e(_)}finally{u.f()}}}catch(_){o.e(_)}finally{o.f()}}catch(_){Pe.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 w=Array.from(n).join(", ");try{r=e.querySelectorAll(w)}catch{}}return new Promise(function(_,g){var d=zs(r).filter(zD).map(FD),f=vm.begin("searchPseudoElements");Zb(),Promise.all(d).then(function(){f(),Nd(),_()}).catch(function(){f(),Nd(),g()})})}}var HD={hooks:function(){return{mutationObserverCallbacks:function(r){return r.pseudoElementsCallback=H_,r}}},provides:function(t){t.pseudoElements2svg=function(r){var n=r.node,i=n===void 0?ot:n;Pe.searchPseudoElements&&H_(i)}}},W_=!1,WD={mixout:function(){return{dom:{unwatch:function(){Zb(),W_=!0}}}},hooks:function(){return{bootstrap:function(){j_(Ld("mutationObserverCallbacks",{}))},noAuto:function(){bD()},watch:function(r){var n=r.observeMutationsRoot;W_?Nd():j_(Ld("mutationObserverCallbacks",{observeMutationsRoot:n}))}}}},V_=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)},VD={mixout:function(){return{parse:{transform:function(r){return V_(r)}}}},hooks:function(){return{parseNodeAttributes:function(r,n){var i=n.getAttribute("data-fa-transform");return i&&(r.transform=V_(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)")},v={outer:o,inner:u,path:m};return{tag:"g",attributes:de({},v.outer),children:[{tag:"g",attributes:de({},v.inner),children:[{tag:n.icon.tag,children:n.icon.children,attributes:de(de({},n.icon.attributes),v.path)}]}]}}}},Vf={x:0,y:0,width:"100%",height:"100%"};function K_(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 KD(e){return e.tag==="g"?e.children:[e]}var GD={hooks:function(){return{parseNodeAttributes:function(r,n){var i=n.getAttribute("data-fa-mask"),s=i?wu(i.split(" ").map(function(a){return a.trim()})):qb();return s.prefix||(s.prefix=Xn()),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,v=BT({transform:l,containerWidth:u,iconWidth:c}),w={tag:"rect",attributes:de(de({},Vf),{},{fill:"white"})},_=h.children?{children:h.children.map(K_)}:{},g={tag:"g",attributes:de({},v.inner),children:[K_(de({tag:h.tag,attributes:de(de({},h.attributes),v.path)},_))]},d={tag:"g",attributes:de({},v.outer),children:[g]},f="mask-".concat(o||E_()),p="clip-".concat(o||E_()),y={tag:"mask",attributes:de(de({},Vf),{},{id:f,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[w,d]},S={tag:"defs",children:[{tag:"clipPath",attributes:{id:p},children:KD(m)},y]};return n.push(S,{tag:"rect",attributes:de({fill:"currentColor","clip-path":"url(#".concat(p,")"),mask:"url(#".concat(f,")")},Vf)}),{children:n,attributes:i}}}},qD={provides:function(t){var r=!1;Jn.matchMedia&&(r=Jn.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:de(de({},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=de(de({},s),{},{attributeName:"opacity"}),o={tag:"circle",attributes:de(de({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return r||o.children.push({tag:"animate",attributes:de(de({},s),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:de(de({},a),{},{values:"1;0;1;1;0;1;"})}),n.push(o),n.push({tag:"path",attributes:de(de({},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:de(de({},a),{},{values:"1;0;0;0;0;1;"})}]}),r||n.push({tag:"path",attributes:de(de({},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:de(de({},a),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:n}}}},YD={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}}}},JD=[$T,DD,ID,ND,RD,HD,WD,VD,GD,qD,YD];nD(JD,{mixoutsTo:dr});dr.noAuto;var ha=dr.config;dr.library;dr.dom;var rS=dr.parse;dr.findIconDefinition;dr.toHtml;var XD=dr.icon;dr.layer;dr.text;dr.counter;function QD(e){return e=e-0,e===e}function nS(e){return QD(e)?e:(e=e.replace(/[_-]+(.)?/g,(t,r)=>r?r.toUpperCase():""),e.charAt(0).toLowerCase()+e.slice(1))}function ZD(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Vi=new Map,e6=1e3;function t6(e){if(Vi.has(e))return Vi.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=nS(l);t[h.startsWith("webkit")?ZD(h):h]=c}}}r=s+1}if(Vi.size===e6){const i=Vi.keys().next().value;i&&Vi.delete(i)}return Vi.set(e,t),t}function iS(e,t,r={}){if(typeof t=="string")return t;const n=(t.children||[]).map(h=>iS(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=t6(String(u));break}case h.startsWith("aria-"):case h.startsWith("data-"):{s[h.toLowerCase()]=u;break}default:s[nS(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 r6=iS.bind(null,Jc.createElement),G_=(e,t)=>{const r=k.useId();return e||(t?r:void 0)},n6=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)}},i6="searchPseudoElementsFullScan"in ha?"7.0.0":"6.0.0",s6=Number.parseInt(i6)>=7,zo="fa",en={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"},o6={left:"fa-pull-left",right:"fa-pull-right"},a6={90:"fa-rotate-90",180:"fa-rotate-180",270:"fa-rotate-270"},l6={"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"},tn={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 c6(e){const t=ha.cssPrefix||ha.familyPrefix||zo;return t===zo?e:e.replace(new RegExp(String.raw`(?<=^|\s)${zo}-`,"g"),`${t}-`)}function u6(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:v,size:w,rotation:_,pull:g,swapOpacity:d,rotateBy:f,widthAuto:p,className:y}=e,S=[];return y&&S.push(...y.split(" ")),t&&S.push(en.beat),r&&S.push(en.fade),n&&S.push(en.beatFade),i&&S.push(en.bounce),s&&S.push(en.shake),a&&S.push(en.spin),l&&S.push(en.spinReverse),o&&S.push(en.spinPulse),c&&S.push(en.pulse),h&&S.push(tn.fixedWidth),u&&S.push(tn.inverse),m&&S.push(tn.border),v===!0&&S.push(tn.flip),(v==="horizontal"||v==="both")&&S.push(tn.flipHorizontal),(v==="vertical"||v==="both")&&S.push(tn.flipVertical),w!=null&&S.push(l6[w]),_!=null&&_!==0&&S.push(a6[_]),g!=null&&S.push(o6[g]),d&&S.push(tn.swapOpacity),s6?(f&&S.push(tn.rotateBy),p&&S.push(tn.widthAuto),(ha.cssPrefix||ha.familyPrefix||zo)===zo?S:S.map(c6)):S}var f6=e=>typeof e=="object"&&"icon"in e&&!!e.icon;function q_(e){if(e)return f6(e)?e:rS.icon(e)}function h6(e){return Object.keys(e)}var Y_=new n6("FontAwesomeIcon"),sS={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},d6=new Set(Object.keys(sS)),ze=Jc.forwardRef((e,t)=>{const r={...sS,...e},{icon:n,mask:i,symbol:s,title:a,titleId:o,maskId:l,transform:c}=r,h=G_(l,!!i),u=G_(o,!!a),m=q_(n);if(!m)return Y_.error("Icon lookup is undefined",n),null;const v=u6(r),w=typeof c=="string"?rS.transform(c):c,_=q_(i),g=XD(m,{...v.length>0&&{classes:v},...w&&{transform:w},..._&&{mask:_},symbol:s,title:a,titleId:u,maskId:h});if(!g)return Y_.error("Could not find icon",m),null;const{abstract:d}=g,f={ref:t};for(const p of h6(r))d6.has(p)||(f[p]=r[p]);return r6(d[0],f)});ze.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 l$={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"]},p6={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"]},m6={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"]},g6={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M136.7 5.9L128 32 32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0-8.7-26.1C306.9-7.2 294.7-16 280.9-16L167.1-16c-13.8 0-26 8.8-30.4 21.9zM416 144L32 144 53.1 467.1C54.7 492.4 75.7 512 101 512L347 512c25.3 0 46.3-19.6 47.9-44.9L416 144z"]},v6={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"]},c$={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"]},_6={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"]},y6={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"]},w6={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"]},b6={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"]},S6={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"]},J_={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"]},ym={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"]},Od={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"]},C6={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"]},u$={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"]},Md={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"]},k6={prefix:"fas",iconName:"spinner",icon:[512,512,[],"f110","M208 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm0 416a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM48 208a48 48 0 1 1 0 96 48 48 0 1 1 0-96zm368 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM75 369.1A48 48 0 1 1 142.9 437 48 48 0 1 1 75 369.1zM75 75A48 48 0 1 1 142.9 142.9 48 48 0 1 1 75 75zM437 369.1A48 48 0 1 1 369.1 437 48 48 0 1 1 437 369.1z"]},X_={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"]},vi={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"]},Q_={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"]},x6={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"]},E6={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"]},A6={prefix:"fas",iconName:"comment-dots",icon:[512,512,[128172,62075,"commenting"],"f4ad","M256 480c141.4 0 256-107.5 256-240S397.4 0 256 0 0 107.5 0 240c0 54.3 19.2 104.3 51.6 144.5L2.8 476.8c-4.8 9-3.3 20 3.6 27.5s17.8 9.8 27.1 5.8l118.4-50.7C183.7 472.6 218.9 480 256 480zM128 208a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm128 0a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm96 32a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},L6={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"]},f$={prefix:"fas",iconName:"folder-plus",icon:[512,512,[],"f65e","M512 384c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l138.7 0c13.8 0 27.3 4.5 38.4 12.8l38.4 28.8c5.5 4.2 12.3 6.4 19.2 6.4L448 80c35.3 0 64 28.7 64 64l0 240zM256 160c-13.3 0-24 10.7-24 24l0 48-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l48 0 0 48c0 13.3 10.7 24 24 24s24-10.7 24-24l0-48 48 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-48c0-13.3-10.7-24-24-24z"]},P6={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"]},h$={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"]},$c={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"]},jd={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"]},d$={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"]},T6={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"]},D6={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"]},I6={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"]},N6={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 R6(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const O6=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,M6=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,j6={};function Z_(e,t){return(j6.jsx?M6:O6).test(e)}const B6=/[ \t\n\f\r]/g;function F6(e){return typeof e=="object"?e.type==="text"?e1(e.value):!1:e1(e)}function e1(e){return e.replace(B6,"")===""}class La{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}}La.prototype.normal={};La.prototype.property={};La.prototype.space=void 0;function oS(e,t){const r={},n={};for(const i of e)Object.assign(r,i.property),Object.assign(n,i.normal);return new La(r,n,t)}function Bd(e){return e.toLowerCase()}class Qt{constructor(t,r){this.attribute=r,this.property=t}}Qt.prototype.attribute="";Qt.prototype.booleanish=!1;Qt.prototype.boolean=!1;Qt.prototype.commaOrSpaceSeparated=!1;Qt.prototype.commaSeparated=!1;Qt.prototype.defined=!1;Qt.prototype.mustUseProperty=!1;Qt.prototype.number=!1;Qt.prototype.overloadedBoolean=!1;Qt.prototype.property="";Qt.prototype.spaceSeparated=!1;Qt.prototype.space=void 0;let z6=0;const Be=Oi(),yt=Oi(),Fd=Oi(),he=Oi(),et=Oi(),Cs=Oi(),ir=Oi();function Oi(){return 2**++z6}const zd=Object.freeze(Object.defineProperty({__proto__:null,boolean:Be,booleanish:yt,commaOrSpaceSeparated:ir,commaSeparated:Cs,number:he,overloadedBoolean:Fd,spaceSeparated:et},Symbol.toStringTag,{value:"Module"})),Kf=Object.keys(zd);class wm extends Qt{constructor(t,r,n,i){let s=-1;if(super(t,r),t1(this,"space",i),typeof n=="number")for(;++s<Kf.length;){const a=Kf[s];t1(this,Kf[s],(n&zd[a])===zd[a])}}}wm.prototype.defined=!0;function t1(e,t,r){r&&(e[t]=r)}function $s(e){const t={},r={};for(const[n,i]of Object.entries(e.properties)){const s=new wm(n,e.transform(e.attributes||{},n),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(s.mustUseProperty=!0),t[n]=s,r[Bd(n)]=n,r[Bd(s.attribute)]=n}return new La(t,r,e.space)}const aS=$s({properties:{ariaActiveDescendant:null,ariaAtomic:yt,ariaAutoComplete:null,ariaBusy:yt,ariaChecked:yt,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:et,ariaCurrent:null,ariaDescribedBy:et,ariaDetails:null,ariaDisabled:yt,ariaDropEffect:et,ariaErrorMessage:null,ariaExpanded:yt,ariaFlowTo:et,ariaGrabbed:yt,ariaHasPopup:null,ariaHidden:yt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:et,ariaLevel:he,ariaLive:null,ariaModal:yt,ariaMultiLine:yt,ariaMultiSelectable:yt,ariaOrientation:null,ariaOwns:et,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:yt,ariaReadOnly:yt,ariaRelevant:null,ariaRequired:yt,ariaRoleDescription:et,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:yt,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 lS(e,t){return t in e?e[t]:t}function cS(e,t){return lS(e,t.toLowerCase())}const $6=$s({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Cs,acceptCharset:et,accessKey:et,action:null,allow:null,allowFullScreen:Be,allowPaymentRequest:Be,allowUserMedia:Be,alt:null,as:null,async:Be,autoCapitalize:null,autoComplete:et,autoFocus:Be,autoPlay:Be,blocking:et,capture:null,charSet:null,checked:Be,cite:null,className:et,cols:he,colSpan:null,content:null,contentEditable:yt,controls:Be,controlsList:et,coords:he|Cs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Be,defer:Be,dir:null,dirName:null,disabled:Be,download:Fd,draggable:yt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Be,formTarget:null,headers:et,height:he,hidden:Fd,high:he,href:null,hrefLang:null,htmlFor:et,httpEquiv:et,id:null,imageSizes:null,imageSrcSet:null,inert:Be,inputMode:null,integrity:null,is:null,isMap:Be,itemId:null,itemProp:et,itemRef:et,itemScope:Be,itemType:et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Be,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:Be,muted:Be,name:null,nonce:null,noModule:Be,noValidate:Be,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:Be,optimum:he,pattern:null,ping:et,placeholder:null,playsInline:Be,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Be,referrerPolicy:null,rel:et,required:Be,reversed:Be,rows:he,rowSpan:he,sandbox:et,scope:null,scoped:Be,seamless:Be,selected:Be,shadowRootClonable:Be,shadowRootDelegatesFocus:Be,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:yt,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:Be,useMap:null,value:yt,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:et,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:Be,declare:Be,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:Be,noHref:Be,noShade:Be,noWrap:Be,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:yt,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:Be,disableRemotePlayback:Be,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:cS}),U6=$s({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:ir,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:et,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:Be,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:Cs,g2:Cs,glyphName:Cs,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:ir,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:et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ir,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ir,rev:ir,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ir,requiredFeatures:ir,requiredFonts:ir,requiredFormats:ir,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:ir,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:ir,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:ir,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:lS}),uS=$s({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()}}),fS=$s({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:cS}),hS=$s({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"},W6=/[A-Z]/g,r1=/-[a-z]/g,V6=/^data[-\w.:]+$/i;function K6(e,t){const r=Bd(t);let n=t,i=Qt;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&V6.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(r1,q6);n="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!r1.test(s)){let a=s.replace(W6,G6);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=wm}return new i(n,t)}function G6(e){return"-"+e.toLowerCase()}function q6(e){return e.charAt(1).toUpperCase()}const Y6=oS([aS,$6,uS,fS,hS],"html"),bm=oS([aS,U6,uS,fS,hS],"svg");function J6(e){return e.join(" ").trim()}var Sm={},n1=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,X6=/\n/g,Q6=/^\s*/,Z6=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,eI=/^:\s*/,tI=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,rI=/^[;\s]*/,nI=/^\s+|\s+$/g,iI=`
|
|
620
|
+
`,i1="/",s1="*",hi="",sI="comment",oI="declaration";function aI(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(w){var _=w.match(X6);_&&(r+=_.length);var g=w.lastIndexOf(iI);n=~g?w.length-g:n+w.length}function s(){var w={line:r,column:n};return function(_){return _.position=new a(w),c(),_}}function a(w){this.start=w,this.end={line:r,column:n},this.source=t.source}a.prototype.content=e;function o(w){var _=new Error(t.source+":"+r+":"+n+": "+w);if(_.reason=w,_.filename=t.source,_.line=r,_.column=n,_.source=e,!t.silent)throw _}function l(w){var _=w.exec(e);if(_){var g=_[0];return i(g),e=e.slice(g.length),_}}function c(){l(Q6)}function h(w){var _;for(w=w||[];_=u();)_!==!1&&w.push(_);return w}function u(){var w=s();if(!(i1!=e.charAt(0)||s1!=e.charAt(1))){for(var _=2;hi!=e.charAt(_)&&(s1!=e.charAt(_)||i1!=e.charAt(_+1));)++_;if(_+=2,hi===e.charAt(_-1))return o("End of comment missing");var g=e.slice(2,_-2);return n+=2,i(g),e=e.slice(_),n+=2,w({type:sI,comment:g})}}function m(){var w=s(),_=l(Z6);if(_){if(u(),!l(eI))return o("property missing ':'");var g=l(tI),d=w({type:oI,property:o1(_[0].replace(n1,hi)),value:g?o1(g[0].replace(n1,hi)):hi});return l(rI),d}}function v(){var w=[];h(w);for(var _;_=m();)_!==!1&&(w.push(_),h(w));return w}return c(),v()}function o1(e){return e?e.replace(nI,hi):hi}var lI=aI,cI=hc&&hc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sm,"__esModule",{value:!0});Sm.default=fI;const uI=cI(lI);function fI(e,t){let r=null;if(!e||typeof e!="string")return r;const n=(0,uI.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 Su={};Object.defineProperty(Su,"__esModule",{value:!0});Su.camelCase=void 0;var hI=/^--[a-zA-Z0-9_-]+$/,dI=/-([a-z])/g,pI=/^[^-]+$/,mI=/^-(webkit|moz|ms|o|khtml)-/,gI=/^-(ms)-/,vI=function(e){return!e||pI.test(e)||hI.test(e)},_I=function(e,t){return t.toUpperCase()},a1=function(e,t){return"".concat(t,"-")},yI=function(e,t){return t===void 0&&(t={}),vI(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(gI,a1):e=e.replace(mI,a1),e.replace(dI,_I))};Su.camelCase=yI;var wI=hc&&hc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},bI=wI(Sm),SI=Su;function $d(e,t){var r={};return!e||typeof e!="string"||(0,bI.default)(e,function(n,i){n&&i&&(r[(0,SI.camelCase)(n,t)]=i)}),r}$d.default=$d;var CI=$d;const kI=qc(CI),dS=pS("end"),Cm=pS("start");function pS(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 xI(e){const t=Cm(e),r=dS(e);if(t&&r)return{start:t,end:r}}function $o(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?l1(e.position):"start"in e||"end"in e?l1(e):"line"in e||"column"in e?Ud(e):""}function Ud(e){return c1(e&&e.line)+":"+c1(e&&e.column)}function l1(e){return Ud(e&&e.start)+"-"+Ud(e&&e.end)}function c1(e){return e&&typeof e=="number"?e:1}class jt 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=$o(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}}jt.prototype.file="";jt.prototype.name="";jt.prototype.reason="";jt.prototype.message="";jt.prototype.stack="";jt.prototype.column=void 0;jt.prototype.line=void 0;jt.prototype.ancestors=void 0;jt.prototype.cause=void 0;jt.prototype.fatal=void 0;jt.prototype.place=void 0;jt.prototype.ruleId=void 0;jt.prototype.source=void 0;const km={}.hasOwnProperty,EI=new Map,AI=/[A-Z]/g,LI=new Set(["table","tbody","thead","tfoot","tr"]),PI=new Set(["td","th"]),mS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function TI(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=BI(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=jI(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"?bm:Y6,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=gS(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function gS(e,t,r){if(t.type==="element")return DI(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return II(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return RI(e,t,r);if(t.type==="mdxjsEsm")return NI(e,t);if(t.type==="root")return OI(e,t,r);if(t.type==="text")return MI(e,t)}function DI(e,t,r){const n=e.schema;let i=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=bm,e.schema=i),e.ancestors.push(t);const s=_S(e,t.tagName,!1),a=FI(e,t);let o=Em(e,t);return LI.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!F6(l):!0})),vS(e,a,s,t),xm(a,o),e.ancestors.pop(),e.schema=n,e.create(t,s,a,r)}function II(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)}da(e,t.position)}function NI(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);da(e,t.position)}function RI(e,t,r){const n=e.schema;let i=n;t.name==="svg"&&n.space==="html"&&(i=bm,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:_S(e,t.name,!0),a=zI(e,t),o=Em(e,t);return vS(e,a,s,t),xm(a,o),e.ancestors.pop(),e.schema=n,e.create(t,s,a,r)}function OI(e,t,r){const n={};return xm(n,Em(e,t)),e.create(t,e.Fragment,n,r)}function MI(e,t){return t.value}function vS(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function xm(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function jI(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 BI(e,t){return r;function r(n,i,s,a){const o=Array.isArray(s.children),l=Cm(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 FI(e,t){const r={};let n,i;for(i in t.properties)if(i!=="children"&&km.call(t.properties,i)){const s=$I(e,i,t.properties[i]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&PI.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 zI(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 da(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 da(e,t.position);else s=n.value===null?!0:n.value;r[i]=s}return r}function Em(e,t){const r=[];let n=-1;const i=e.passKeys?new Map:EI;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=gS(e,s,a);o!==void 0&&r.push(o)}return r}function $I(e,t,r){const n=K6(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?R6(r):J6(r)),n.property==="style"){let i=typeof r=="object"?r:UI(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 UI(e,t){try{return kI(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const n=r,i=new jt("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=mS+"#cannot-parse-style-attribute",i}}function _S(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=Z_(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=Z_(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const i=n.value;return km.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(n);da(e)}function da(e,t){const r=new jt("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=mS+"#cannot-handle-mdx-estrees-without-createevaluater",r}function HI(e){const t={};let r;for(r in e)km.call(e,r)&&(t[WI(r)]=e[r]);return t}function WI(e){let t=e.replace(AI,VI);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function VI(e){return"-"+e.toLowerCase()}const Gf={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"]},KI={};function Am(e,t){const r=KI,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return yS(e,n,i)}function yS(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 u1(e.children,t,r)}return Array.isArray(e)?u1(e,t,r):""}function u1(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=yS(e[i],t,r);return n.join("")}function GI(e){return!!(e&&typeof e=="object")}const f1=document.createElement("i");function Lm(e){const t="&"+e+";";f1.innerHTML=t;const r=f1.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function cr(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 _r(e,t){return e.length>0?(cr(e,e.length,0,t),e):t}const h1={}.hasOwnProperty;function wS(e){const t={};let r=-1;for(;++r<e.length;)qI(t,e[r]);return t}function qI(e,t){let r;for(r in t){const i=(h1.call(e,r)?e[r]:void 0)||(e[r]={}),s=t[r];let a;if(s)for(a in s){h1.call(i,a)||(i[a]=[]);const o=s[a];YI(i[a],Array.isArray(o)?o:o?[o]:[])}}}function YI(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);cr(e,0,0,n)}function bS(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 Ir(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ft=ii(/[A-Za-z]/),Ot=ii(/[\dA-Za-z]/),JI=ii(/[#-'*+\--9=?A-Z^-~]/);function Uc(e){return e!==null&&(e<32||e===127)}const Hd=ii(/\d/),XI=ii(/[\dA-Fa-f]/),QI=ii(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function Ze(e){return e!==null&&(e<0||e===32)}function Ue(e){return e===-2||e===-1||e===32}const Cu=ii(new RegExp("\\p{P}|\\p{S}","u")),Ai=ii(/\s/);function ii(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Us(e){const t=[];let r=-1,n=0,i=0;for(;++r<e.length;){const s=e.charCodeAt(r);let a="";if(s===37&&Ot(e.charCodeAt(r+1))&&Ot(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 Ke(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(l){return Ue(l)?(e.enter(r),o(l)):t(l)}function o(l){return Ue(l)&&s++<i?(e.consume(l),o):(e.exit(r),t(l))}}const ZI={tokenize:eN};function eN(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"),Ke(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 De(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}const tN={tokenize:rN},d1={tokenize:nN};function rN(e){const t=this,r=[];let n=0,i,s,a;return o;function o(p){if(n<r.length){const y=r[n];return t.containerState=y[1],e.attempt(y[0].continuation,l,c)(p)}return c(p)}function l(p){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&f();const y=t.events.length;let S=y,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 E=y;for(;E<t.events.length;)t.events[E][1].end={...b},E++;return cr(t.events,S+1,0,t.events.slice(y)),t.events.length=E,c(p)}return o(p)}function c(p){if(n===r.length){if(!i)return m(p);if(i.currentConstruct&&i.currentConstruct.concrete)return w(p);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(d1,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,w(p)}function m(p){return t.containerState={},e.attempt(d1,v,w)(p)}function v(p){return n++,r.push([t.currentConstruct,t.containerState]),m(p)}function w(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){g(e.exit("chunkFlow"),!0),d(0),e.consume(p);return}return De(p)?(e.consume(p),g(e.exit("chunkFlow")),n=0,t.interrupt=void 0,o):(e.consume(p),_)}function g(p,y){const S=t.sliceStream(p);if(y&&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 E=t.events.length;let C=E,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=E;b<t.events.length;)t.events[b][1].end={...T},b++;cr(t.events,C+1,0,t.events.slice(E)),t.events.length=b}}function d(p){let y=r.length;for(;y-- >p;){const S=r[y];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 nN(e,t,r){return Ke(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Os(e){if(e===null||Ze(e)||Ai(e))return 1;if(Cu(e))return 2}function ku(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 Wd={name:"attention",resolveAll:iN,tokenize:sN};function iN(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};p1(u,-l),p1(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=_r(c,[["enter",e[n][1],t],["exit",e[n][1],t]])),c=_r(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),c=_r(c,ku(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),c=_r(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=_r(c,[["enter",e[r][1],t],["exit",e[r][1],t]])):h=0,cr(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 sN(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Os(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=Os(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 p1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const oN={name:"autolink",tokenize:aN};function aN(e,t,r){let n=0;return i;function i(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(v){return Ft(v)?(e.consume(v),a):v===64?r(v):c(v)}function a(v){return v===43||v===45||v===46||Ot(v)?(n=1,o(v)):c(v)}function o(v){return v===58?(e.consume(v),n=0,l):(v===43||v===45||v===46||Ot(v))&&n++<32?(e.consume(v),o):(n=0,c(v))}function l(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||Uc(v)?r(v):(e.consume(v),l)}function c(v){return v===64?(e.consume(v),h):JI(v)?(e.consume(v),c):r(v)}function h(v){return Ot(v)?u(v):r(v)}function u(v){return v===46?(e.consume(v),n=0,h):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):m(v)}function m(v){if((v===45||Ot(v))&&n++<63){const w=v===45?m:u;return e.consume(v),w}return r(v)}}const Pa={partial:!0,tokenize:lN};function lN(e,t,r){return n;function n(s){return Ue(s)?Ke(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||De(s)?t(s):r(s)}}const SS={continuation:{tokenize:uN},exit:fN,name:"blockQuote",tokenize:cN};function cN(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 Ue(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function uN(e,t,r){const n=this;return i;function i(a){return Ue(a)?Ke(e,s,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(SS,t,r)(a)}}function fN(e){e.exit("blockQuote")}const CS={name:"characterEscape",tokenize:hN};function hN(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 QI(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(s)}}const kS={name:"characterReference",tokenize:dN};function dN(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=Ot,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=XI,h):(e.enter("characterReferenceValue"),s=7,a=Hd,h(u))}function h(u){if(u===59&&i){const m=e.exit("characterReferenceValue");return a===Ot&&!Lm(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 m1={partial:!0,tokenize:mN},g1={concrete:!0,name:"codeFenced",tokenize:pN};function pN(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 E=n.events[n.events.length-1];return s=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[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"),Ue(b)?Ke(e,u,"whitespace")(b):u(b))}function u(b){return b===null||De(b)?(e.exit("codeFencedFence"),n.interrupt?t(b):e.check(m1,_,y)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||De(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(b)):Ue(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ke(e,v,"whitespace")(b)):b===96&&b===o?r(b):(e.consume(b),m)}function v(b){return b===null||De(b)?u(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(b))}function w(b){return b===null||De(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(b)):b===96&&b===o?r(b):(e.consume(b),w)}function _(b){return e.attempt(i,y,g)(b)}function g(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),d}function d(b){return s>0&&Ue(b)?Ke(e,f,"linePrefix",s+1)(b):f(b)}function f(b){return b===null||De(b)?e.check(m1,_,y)(b):(e.enter("codeFlowValue"),p(b))}function p(b){return b===null||De(b)?(e.exit("codeFlowValue"),f(b)):(e.consume(b),p)}function y(b){return e.exit("codeFenced"),t(b)}function S(b,E,C){let A=0;return T;function T(U){return b.enter("lineEnding"),b.consume(U),b.exit("lineEnding"),O}function O(U){return b.enter("codeFencedFence"),Ue(U)?Ke(b,R,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):R(U)}function R(U){return U===o?(b.enter("codeFencedFenceSequence"),M(U)):C(U)}function M(U){return U===o?(A++,b.consume(U),M):A>=a?(b.exit("codeFencedFenceSequence"),Ue(U)?Ke(b,z,"whitespace")(U):z(U)):C(U)}function z(U){return U===null||De(U)?(b.exit("codeFencedFence"),E(U)):C(U)}}}function mN(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 qf={name:"codeIndented",tokenize:vN},gN={partial:!0,tokenize:_N};function vN(e,t,r){const n=this;return i;function i(c){return e.enter("codeIndented"),Ke(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):De(c)?e.attempt(gN,a,l)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||De(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),o)}function l(c){return e.exit("codeIndented"),t(c)}}function _N(e,t,r){const n=this;return i;function i(a){return n.parser.lazy[n.now().line]?r(a):De(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Ke(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):De(a)?i(a):r(a)}}const yN={name:"codeText",previous:bN,resolve:wN,tokenize:SN};function wN(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 bN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function SN(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)):De(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||De(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 CN{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&&_o(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),_o(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),_o(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);_o(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);_o(this.left,r.reverse())}}}function _o(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 xS(e){const t={};let r=-1,n,i,s,a,o,l,c;const h=new CN(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,kN(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 cr(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!c}function kN(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,v=r,w=0,_=0;const g=[_];for(;v;){for(;e.get(++i)[1]!==v;);s.push(i),v._tokenizer||(h=n.sliceStream(v),v.next||h.push(null),u&&a.defineSkip(v.start),v._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(h),v._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),u=v,v=v.next}for(v=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,g.push(_),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(a.events=[],v?(v._tokenizer=void 0,v.previous=void 0):g.pop(),m=g.length;m--;){const d=o.slice(g[m],g[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[w+l[m][0]]=w+l[m][1],w+=l[m][1]-l[m][0]-1;return c}const xN={resolve:AN,tokenize:LN},EN={partial:!0,tokenize:PN};function AN(e){return xS(e),e}function LN(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):De(o)?e.check(EN,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 PN(e,t,r){const n=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ke(e,s,"linePrefix")}function s(a){if(a===null||De(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 ES(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||Uc(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"}),v(d))}function v(d){return d===62?(e.exit("chunkString"),e.exit(o),m(d)):d===null||d===60||De(d)?r(d):(e.consume(d),d===92?w:v)}function w(d){return d===60||d===62||d===92?(e.consume(d),v):v(d)}function _(d){return!h&&(d===null||d===41||Ze(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||Uc(d)?r(d):(e.consume(d),d===92?g:_)}function g(d){return d===40||d===41||d===92?(e.consume(d),_):_(d)}}function AS(e,t,r,n,i,s){const a=this;let o=0,l;return c;function c(v){return e.enter(n),e.enter(i),e.consume(v),e.exit(i),e.enter(s),h}function h(v){return o>999||v===null||v===91||v===93&&!l||v===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?r(v):v===93?(e.exit(s),e.enter(i),e.consume(v),e.exit(i),e.exit(n),t):De(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),u(v))}function u(v){return v===null||v===91||v===93||De(v)||o++>999?(e.exit("chunkString"),h(v)):(e.consume(v),l||(l=!Ue(v)),v===92?m:u)}function m(v){return v===91||v===92||v===93?(e.consume(v),o++,u):u(v)}}function LS(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):De(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Ke(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===a||m===null||De(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 Uo(e,t){let r;return n;function n(i){return De(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):Ue(i)?Ke(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}const TN={name:"definition",tokenize:IN},DN={partial:!0,tokenize:NN};function IN(e,t,r){const n=this;let i;return s;function s(v){return e.enter("definition"),a(v)}function a(v){return AS.call(n,e,o,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function o(v){return i=Ir(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),l):r(v)}function l(v){return Ze(v)?Uo(e,c)(v):c(v)}function c(v){return ES(e,h,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function h(v){return e.attempt(DN,u,u)(v)}function u(v){return Ue(v)?Ke(e,m,"whitespace")(v):m(v)}function m(v){return v===null||De(v)?(e.exit("definition"),n.parser.defined.push(i),t(v)):r(v)}}function NN(e,t,r){return n;function n(o){return Ze(o)?Uo(e,i)(o):r(o)}function i(o){return LS(e,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return Ue(o)?Ke(e,a,"whitespace")(o):a(o)}function a(o){return o===null||De(o)?t(o):r(o)}}const RN={name:"hardBreakEscape",tokenize:ON};function ON(e,t,r){return n;function n(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return De(s)?(e.exit("hardBreakEscape"),t(s)):r(s)}}const MN={name:"headingAtx",resolve:jN,tokenize:BN};function jN(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"},cr(e,n,r-n+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function BN(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||Ze(h)?(e.exit("atxHeadingSequence"),o(h)):r(h)}function o(h){return h===35?(e.enter("atxHeadingSequence"),l(h)):h===null||De(h)?(e.exit("atxHeading"),t(h)):Ue(h)?Ke(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||Ze(h)?(e.exit("atxHeadingText"),o(h)):(e.consume(h),c)}}const FN=["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"],v1=["pre","script","style","textarea"],zN={concrete:!0,name:"htmlFlow",resolveTo:HN,tokenize:WN},$N={partial:!0,tokenize:KN},UN={partial:!0,tokenize:VN};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 WN(e,t,r){const n=this;let i,s,a,o,l;return c;function c(P){return h(P)}function h(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),u}function u(P){return P===33?(e.consume(P),m):P===47?(e.consume(P),s=!0,_):P===63?(e.consume(P),i=3,n.interrupt?t:L):Ft(P)?(e.consume(P),a=String.fromCharCode(P),g):r(P)}function m(P){return P===45?(e.consume(P),i=2,v):P===91?(e.consume(P),i=5,o=0,w):Ft(P)?(e.consume(P),i=4,n.interrupt?t:L):r(P)}function v(P){return P===45?(e.consume(P),n.interrupt?t:L):r(P)}function w(P){const $="CDATA[";return P===$.charCodeAt(o++)?(e.consume(P),o===$.length?n.interrupt?t:R:w):r(P)}function _(P){return Ft(P)?(e.consume(P),a=String.fromCharCode(P),g):r(P)}function g(P){if(P===null||P===47||P===62||Ze(P)){const $=P===47,Y=a.toLowerCase();return!$&&!s&&v1.includes(Y)?(i=1,n.interrupt?t(P):R(P)):FN.includes(a.toLowerCase())?(i=6,$?(e.consume(P),d):n.interrupt?t(P):R(P)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(P):s?f(P):p(P))}return P===45||Ot(P)?(e.consume(P),a+=String.fromCharCode(P),g):r(P)}function d(P){return P===62?(e.consume(P),n.interrupt?t:R):r(P)}function f(P){return Ue(P)?(e.consume(P),f):T(P)}function p(P){return P===47?(e.consume(P),T):P===58||P===95||Ft(P)?(e.consume(P),y):Ue(P)?(e.consume(P),p):T(P)}function y(P){return P===45||P===46||P===58||P===95||Ot(P)?(e.consume(P),y):S(P)}function S(P){return P===61?(e.consume(P),b):Ue(P)?(e.consume(P),S):p(P)}function b(P){return P===null||P===60||P===61||P===62||P===96?r(P):P===34||P===39?(e.consume(P),l=P,E):Ue(P)?(e.consume(P),b):C(P)}function E(P){return P===l?(e.consume(P),l=null,A):P===null||De(P)?r(P):(e.consume(P),E)}function C(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||Ze(P)?S(P):(e.consume(P),C)}function A(P){return P===47||P===62||Ue(P)?p(P):r(P)}function T(P){return P===62?(e.consume(P),O):r(P)}function O(P){return P===null||De(P)?R(P):Ue(P)?(e.consume(P),O):r(P)}function R(P){return P===45&&i===2?(e.consume(P),q):P===60&&i===1?(e.consume(P),ee):P===62&&i===4?(e.consume(P),B):P===63&&i===3?(e.consume(P),L):P===93&&i===5?(e.consume(P),I):De(P)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check($N,D,M)(P)):P===null||De(P)?(e.exit("htmlFlowData"),M(P)):(e.consume(P),R)}function M(P){return e.check(UN,z,D)(P)}function z(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),U}function U(P){return P===null||De(P)?M(P):(e.enter("htmlFlowData"),R(P))}function q(P){return P===45?(e.consume(P),L):R(P)}function ee(P){return P===47?(e.consume(P),a="",W):R(P)}function W(P){if(P===62){const $=a.toLowerCase();return v1.includes($)?(e.consume(P),B):R(P)}return Ft(P)&&a.length<8?(e.consume(P),a+=String.fromCharCode(P),W):R(P)}function I(P){return P===93?(e.consume(P),L):R(P)}function L(P){return P===62?(e.consume(P),B):P===45&&i===2?(e.consume(P),L):R(P)}function B(P){return P===null||De(P)?(e.exit("htmlFlowData"),D(P)):(e.consume(P),B)}function D(P){return e.exit("htmlFlow"),t(P)}}function VN(e,t,r){const n=this;return i;function i(a){return De(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 KN(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Pa,t,r)}}const GN={name:"htmlText",tokenize:qN};function qN(e,t,r){const n=this;let i,s,a;return o;function o(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),l}function l(L){return L===33?(e.consume(L),c):L===47?(e.consume(L),S):L===63?(e.consume(L),p):Ft(L)?(e.consume(L),C):r(L)}function c(L){return L===45?(e.consume(L),h):L===91?(e.consume(L),s=0,w):Ft(L)?(e.consume(L),f):r(L)}function h(L){return L===45?(e.consume(L),v):r(L)}function u(L){return L===null?r(L):L===45?(e.consume(L),m):De(L)?(a=u,ee(L)):(e.consume(L),u)}function m(L){return L===45?(e.consume(L),v):u(L)}function v(L){return L===62?q(L):L===45?m(L):u(L)}function w(L){const B="CDATA[";return L===B.charCodeAt(s++)?(e.consume(L),s===B.length?_:w):r(L)}function _(L){return L===null?r(L):L===93?(e.consume(L),g):De(L)?(a=_,ee(L)):(e.consume(L),_)}function g(L){return L===93?(e.consume(L),d):_(L)}function d(L){return L===62?q(L):L===93?(e.consume(L),d):_(L)}function f(L){return L===null||L===62?q(L):De(L)?(a=f,ee(L)):(e.consume(L),f)}function p(L){return L===null?r(L):L===63?(e.consume(L),y):De(L)?(a=p,ee(L)):(e.consume(L),p)}function y(L){return L===62?q(L):p(L)}function S(L){return Ft(L)?(e.consume(L),b):r(L)}function b(L){return L===45||Ot(L)?(e.consume(L),b):E(L)}function E(L){return De(L)?(a=E,ee(L)):Ue(L)?(e.consume(L),E):q(L)}function C(L){return L===45||Ot(L)?(e.consume(L),C):L===47||L===62||Ze(L)?A(L):r(L)}function A(L){return L===47?(e.consume(L),q):L===58||L===95||Ft(L)?(e.consume(L),T):De(L)?(a=A,ee(L)):Ue(L)?(e.consume(L),A):q(L)}function T(L){return L===45||L===46||L===58||L===95||Ot(L)?(e.consume(L),T):O(L)}function O(L){return L===61?(e.consume(L),R):De(L)?(a=O,ee(L)):Ue(L)?(e.consume(L),O):A(L)}function R(L){return L===null||L===60||L===61||L===62||L===96?r(L):L===34||L===39?(e.consume(L),i=L,M):De(L)?(a=R,ee(L)):Ue(L)?(e.consume(L),R):(e.consume(L),z)}function M(L){return L===i?(e.consume(L),i=void 0,U):L===null?r(L):De(L)?(a=M,ee(L)):(e.consume(L),M)}function z(L){return L===null||L===34||L===39||L===60||L===61||L===96?r(L):L===47||L===62||Ze(L)?A(L):(e.consume(L),z)}function U(L){return L===47||L===62||Ze(L)?A(L):r(L)}function q(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):r(L)}function ee(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),W}function W(L){return Ue(L)?Ke(e,I,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):I(L)}function I(L){return e.enter("htmlTextData"),a(L)}}const Pm={name:"labelEnd",resolveAll:QN,resolveTo:ZN,tokenize:eR},YN={tokenize:tR},JN={tokenize:rR},XN={tokenize:nR};function QN(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&&cr(e,0,e.length,r),e}function ZN(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=_r(o,e.slice(s+1,s+n+3)),o=_r(o,[["enter",h,t]]),o=_r(o,ku(t.parser.constructs.insideSpan.null,e.slice(s+n+4,a-3),t)),o=_r(o,[["exit",h,t],e[a-2],e[a-1],["exit",c,t]]),o=_r(o,e.slice(a+1)),o=_r(o,[["exit",l,t]]),cr(e,s,e.length,o),e}function eR(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(Ir(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(YN,h,a?h:u)(m):m===91?e.attempt(JN,h,a?c:u)(m):a?h(m):u(m)}function c(m){return e.attempt(XN,h,u)(m)}function h(m){return t(m)}function u(m){return s._balanced=!0,r(m)}}function tR(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 Ze(u)?Uo(e,s)(u):s(u)}function s(u){return u===41?h(u):ES(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function a(u){return Ze(u)?Uo(e,l)(u):h(u)}function o(u){return r(u)}function l(u){return u===34||u===39||u===40?LS(e,c,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):h(u)}function c(u){return Ze(u)?Uo(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 rR(e,t,r){const n=this;return i;function i(o){return AS.call(n,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return n.parser.defined.includes(Ir(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(o):r(o)}function a(o){return r(o)}}function nR(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 iR={name:"labelStartImage",resolveAll:Pm.resolveAll,tokenize:sR};function sR(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 oR={name:"labelStartLink",resolveAll:Pm.resolveAll,tokenize:aR};function aR(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 Yf={name:"lineEnding",tokenize:lR};function lR(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Ke(e,t,"linePrefix")}}const sc={name:"thematicBreak",tokenize:cR};function cR(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||De(c))?(e.exit("thematicBreak"),t(c)):r(c)}function l(c){return c===i?(e.consume(c),n++,l):(e.exit("thematicBreakSequence"),Ue(c)?Ke(e,o,"whitespace")(c):o(c))}}const Kt={continuation:{tokenize:dR},exit:mR,name:"list",tokenize:hR},uR={partial:!0,tokenize:gR},fR={partial:!0,tokenize:pR};function hR(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(v){const w=n.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!n.containerState.marker||v===n.containerState.marker:Hd(v)){if(n.containerState.type||(n.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(sc,r,c)(v):c(v);if(!n.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(v)}return r(v)}function l(v){return Hd(v)&&++a<10?(e.consume(v),l):(!n.interrupt||a<2)&&(n.containerState.marker?v===n.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),c(v)):r(v)}function c(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||v,e.check(Pa,n.interrupt?r:h,e.attempt(uR,m,u))}function h(v){return n.containerState.initialBlankLine=!0,s++,m(v)}function u(v){return Ue(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),m):r(v)}function m(v){return n.containerState.size=s+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function dR(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Pa,i,s);function i(o){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Ke(e,t,"listItemIndent",n.containerState.size+1)(o)}function s(o){return n.containerState.furtherBlankLines||!Ue(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(fR,t,a)(o))}function a(o){return n.containerState._closeFlow=!0,n.interrupt=void 0,Ke(e,e.attempt(Kt,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function pR(e,t,r){const n=this;return Ke(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 mR(e){e.exit(this.containerState.type)}function gR(e,t,r){const n=this;return Ke(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!Ue(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):r(s)}}const _1={name:"setextUnderline",resolveTo:vR,tokenize:_R};function vR(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 _R(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"),Ue(c)?Ke(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||De(c)?(e.exit("setextHeadingLine"),t(c)):r(c)}}const yR={tokenize:wR};function wR(e){const t=this,r=e.attempt(Pa,n,e.attempt(this.parser.constructs.flowInitial,i,Ke(e,e.attempt(this.parser.constructs.flow,i,e.attempt(xN,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 bR={resolveAll:TS()},SR=PS("string"),CR=PS("text");function PS(e){return{resolveAll:TS(e==="text"?kR: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 v=u[m];if(!v.previous||v.previous.call(n,n.previous))return!0}return!1}}}function TS(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 kR(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 xR={42:Kt,43:Kt,45:Kt,48:Kt,49:Kt,50:Kt,51:Kt,52:Kt,53:Kt,54:Kt,55:Kt,56:Kt,57:Kt,62:SS},ER={91:TN},AR={[-2]:qf,[-1]:qf,32:qf},LR={35:MN,42:sc,45:[_1,sc],60:zN,61:_1,95:sc,96:g1,126:g1},PR={38:kS,92:CS},TR={[-5]:Yf,[-4]:Yf,[-3]:Yf,33:iR,38:kS,42:Wd,60:[oN,GN],91:oR,92:[RN,CS],93:Pm,95:Wd,96:yN},DR={null:[Wd,bR]},IR={null:[42,95]},NR={null:[]},RR=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:IR,contentInitial:ER,disable:NR,document:xR,flow:LR,flowInitial:AR,insideSpan:DR,string:PR,text:TR},Symbol.toStringTag,{value:"Module"}));function OR(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:E(S),check:E(b),consume:f,enter:p,exit:y,interrupt:E(b,{interrupt:!0})},c={code:null,containerState:{},defineSkip:_,events:[],now:w,parser:e,previous:null,sliceSerialize:m,sliceStream:v,write:u};let h=t.tokenize.call(c,l);return t.resolveAll&&s.push(t),c;function u(O){return a=_r(a,O),g(),a[a.length-1]!==null?[]:(C(t,0),c.events=ku(s,c.events,c),c.events)}function m(O,R){return jR(v(O),R)}function v(O){return MR(a,O)}function w(){const{_bufferIndex:O,_index:R,line:M,column:z,offset:U}=n;return{_bufferIndex:O,_index:R,line:M,column:z,offset:U}}function _(O){i[O.line]=O.column,T()}function g(){let O;for(;n._index<a.length;){const R=a[n._index];if(typeof R=="string")for(O=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===O&&n._bufferIndex<R.length;)d(R.charCodeAt(n._bufferIndex));else d(R)}}function d(O){h=h(O)}function f(O){De(O)?(n.line++,n.column=1,n.offset+=O===-3?2:1,T()):O!==-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=O}function p(O,R){const M=R||{};return M.type=O,M.start=w(),c.events.push(["enter",M,c]),o.push(M),M}function y(O){const R=o.pop();return R.end=w(),c.events.push(["exit",R,c]),R}function S(O,R){C(O,R.from)}function b(O,R){R.restore()}function E(O,R){return M;function M(z,U,q){let ee,W,I,L;return Array.isArray(z)?D(z):"tokenize"in z?D([z]):B(z);function B(H){return j;function j(N){const K=N!==null&&H[N],V=N!==null&&H.null,X=[...Array.isArray(K)?K:K?[K]:[],...Array.isArray(V)?V:V?[V]:[]];return D(X)(N)}}function D(H){return ee=H,W=0,H.length===0?q:P(H[W])}function P(H){return j;function j(N){return L=A(),I=H,H.partial||(c.currentConstruct=H),H.name&&c.parser.constructs.disable.null.includes(H.name)?Y():H.tokenize.call(R?Object.assign(Object.create(c),R):c,l,$,Y)(N)}}function $(H){return O(I,L),U}function Y(H){return L.restore(),++W<ee.length?P(ee[W]):q}}}function C(O,R){O.resolveAll&&!s.includes(O)&&s.push(O),O.resolve&&cr(c.events,R,c.events.length-R,O.resolve(c.events.slice(R),c)),O.resolveTo&&(c.events=O.resolveTo(c.events,c))}function A(){const O=w(),R=c.previous,M=c.currentConstruct,z=c.events.length,U=Array.from(o);return{from:z,restore:q};function q(){n=O,c.previous=R,c.currentConstruct=M,c.events.length=z,o=U,T()}}function T(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function MR(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 jR(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 BR(e){const n={constructs:wS([RR,...(e||{}).extensions||[]]),content:i(ZI),defined:[],document:i(tN),flow:i(yR),lazy:{},string:i(SR),text:i(CR)};return n;function i(s){return a;function a(o){return OR(n,s,o)}}}function FR(e){for(;!xS(e););return e}const y1=/[\0\t\n\r]/g;function zR(){let e=1,t="",r=!0,n;return i;function i(s,a,o){const l=[];let c,h,u,m,v;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(y1.lastIndex=u,c=y1.exec(s),m=c&&c.index!==void 0?c.index:s.length,v=s.charCodeAt(m),!c){t=s.slice(u);break}if(v===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),v){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 $R=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function UR(e){return e.replace($R,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 bS(r.slice(s?2:1),s?16:10)}return Lm(r)||e}const DS={}.hasOwnProperty;function WR(e,t,r){return typeof t!="string"&&(r=t,t=void 0),VR(r)(FR(BR(r).document().write(zR()(e,t,!0))))}function VR(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Ge),autolinkProtocol:A,autolinkEmail:A,atxHeading:s(ae),blockQuote:s(V),characterEscape:A,characterReference:A,codeFenced:s(X),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(X,a),codeText:s(re,a),codeTextData:A,data:A,codeFlowValue:A,definition:s(ce),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(ge),hardBreakEscape:s(Se),hardBreakTrailing:s(Se),htmlFlow:s(ye,a),htmlFlowData:A,htmlText:s(ye,a),htmlTextData:A,image:s(We),label:a,link:s(Ge),listItem:s(Ne),listItemValue:m,listOrdered:s(Re,u),listUnordered:s(Re),paragraph:s(qe),reference:P,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(ae),strong:s(Ce),thematicBreak:s(Ie)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:K,autolinkProtocol:N,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:Y,characterReferenceMarkerNumeric:Y,characterReferenceValue:H,characterReference:j,codeFenced:l(g),codeFencedFence:_,codeFencedFenceInfo:v,codeFencedFenceMeta:w,codeFlowValue:T,codeIndented:l(d),codeText:l(U),codeTextData:T,data:T,definition:l(),definitionDestinationString:y,definitionLabelString:f,definitionTitleString:p,emphasis:l(),hardBreakEscape:l(R),hardBreakTrailing:l(R),htmlFlow:l(M),htmlFlowData:T,htmlText:l(z),htmlTextData:T,image:l(ee),label:I,labelText:W,lineEnding:O,link:l(q),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:$,resourceDestinationString:L,resourceTitleString:B,resource:D,setextHeading:l(C),setextHeadingLineSequence:E,setextHeadingText:b,strong:l(),thematicBreak:l()}};IS(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(te){let oe={type:"root",children:[]};const F={stack:[oe],tokenStack:[],config:t,enter:o,exit:c,buffer:a,resume:h,data:r},me=[];let pe=-1;for(;++pe<te.length;)if(te[pe][1].type==="listOrdered"||te[pe][1].type==="listUnordered")if(te[pe][0]==="enter")me.push(pe);else{const Oe=me.pop();pe=i(te,Oe,pe)}for(pe=-1;++pe<te.length;){const Oe=t[te[pe][0]];DS.call(Oe,te[pe][1].type)&&Oe[te[pe][1].type].call(Object.assign({sliceSerialize:te[pe][2].sliceSerialize},F),te[pe][1])}if(F.tokenStack.length>0){const Oe=F.tokenStack[F.tokenStack.length-1];(Oe[1]||w1).call(F,void 0,Oe[0])}for(oe.position={start:Ln(te.length>0?te[0][1].start:{line:1,column:1,offset:0}),end:Ln(te.length>0?te[te.length-2][1].end:{line:1,column:1,offset:0})},pe=-1;++pe<t.transforms.length;)oe=t.transforms[pe](oe)||oe;return oe}function i(te,oe,F){let me=oe-1,pe=-1,Oe=!1,Ae,Te,ne,Me;for(;++me<=F;){const le=te[me];switch(le[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{le[0]==="enter"?pe++:pe--,Me=void 0;break}case"lineEndingBlank":{le[0]==="enter"&&(Ae&&!Me&&!pe&&!ne&&(ne=me),Me=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Me=void 0}if(!pe&&le[0]==="enter"&&le[1].type==="listItemPrefix"||pe===-1&&le[0]==="exit"&&(le[1].type==="listUnordered"||le[1].type==="listOrdered")){if(Ae){let G=me;for(Te=void 0;G--;){const J=te[G];if(J[1].type==="lineEnding"||J[1].type==="lineEndingBlank"){if(J[0]==="exit")continue;Te&&(te[Te][1].type="lineEndingBlank",Oe=!0),J[1].type="lineEnding",Te=G}else if(!(J[1].type==="linePrefix"||J[1].type==="blockQuotePrefix"||J[1].type==="blockQuotePrefixWhitespace"||J[1].type==="blockQuoteMarker"||J[1].type==="listItemIndent"))break}ne&&(!Te||ne<Te)&&(Ae._spread=!0),Ae.end=Object.assign({},Te?te[Te][1].start:le[1].end),te.splice(Te||me,0,["exit",Ae,le[2]]),me++,F++}if(le[1].type==="listItemPrefix"){const G={type:"listItem",_spread:!1,start:Object.assign({},le[1].start),end:void 0};Ae=G,te.splice(me,0,["enter",G,le[2]]),me++,F++,ne=void 0,Me=!0}}}return te[oe][1]._spread=Oe,F}function s(te,oe){return F;function F(me){o.call(this,te(me),me),oe&&oe.call(this,me)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(te,oe,F){this.stack[this.stack.length-1].children.push(te),this.stack.push(te),this.tokenStack.push([oe,F||void 0]),te.position={start:Ln(oe.start),end:void 0}}function l(te){return oe;function oe(F){te&&te.call(this,F),c.call(this,F)}}function c(te,oe){const F=this.stack.pop(),me=this.tokenStack.pop();if(me)me[0].type!==te.type&&(oe?oe.call(this,te,me[0]):(me[1]||w1).call(this,te,me[0]));else throw new Error("Cannot close `"+te.type+"` ("+$o({start:te.start,end:te.end})+"): it’s not open");F.position.end=Ln(te.end)}function h(){return Am(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function m(te){if(this.data.expectingFirstListItemValue){const oe=this.stack[this.stack.length-2];oe.start=Number.parseInt(this.sliceSerialize(te),10),this.data.expectingFirstListItemValue=void 0}}function v(){const te=this.resume(),oe=this.stack[this.stack.length-1];oe.lang=te}function w(){const te=this.resume(),oe=this.stack[this.stack.length-1];oe.meta=te}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const te=this.resume(),oe=this.stack[this.stack.length-1];oe.value=te.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function d(){const te=this.resume(),oe=this.stack[this.stack.length-1];oe.value=te.replace(/(\r?\n|\r)$/g,"")}function f(te){const oe=this.resume(),F=this.stack[this.stack.length-1];F.label=oe,F.identifier=Ir(this.sliceSerialize(te)).toLowerCase()}function p(){const te=this.resume(),oe=this.stack[this.stack.length-1];oe.title=te}function y(){const te=this.resume(),oe=this.stack[this.stack.length-1];oe.url=te}function S(te){const oe=this.stack[this.stack.length-1];if(!oe.depth){const F=this.sliceSerialize(te).length;oe.depth=F}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function E(te){const oe=this.stack[this.stack.length-1];oe.depth=this.sliceSerialize(te).codePointAt(0)===61?1:2}function C(){this.data.setextHeadingSlurpLineEnding=void 0}function A(te){const F=this.stack[this.stack.length-1].children;let me=F[F.length-1];(!me||me.type!=="text")&&(me=ke(),me.position={start:Ln(te.start),end:void 0},F.push(me)),this.stack.push(me)}function T(te){const oe=this.stack.pop();oe.value+=this.sliceSerialize(te),oe.position.end=Ln(te.end)}function O(te){const oe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const F=oe.children[oe.children.length-1];F.position.end=Ln(te.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(oe.type)&&(A.call(this,te),T.call(this,te))}function R(){this.data.atHardBreak=!0}function M(){const te=this.resume(),oe=this.stack[this.stack.length-1];oe.value=te}function z(){const te=this.resume(),oe=this.stack[this.stack.length-1];oe.value=te}function U(){const te=this.resume(),oe=this.stack[this.stack.length-1];oe.value=te}function q(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const oe=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=oe,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function ee(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const oe=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=oe,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function W(te){const oe=this.sliceSerialize(te),F=this.stack[this.stack.length-2];F.label=UR(oe),F.identifier=Ir(oe).toLowerCase()}function I(){const te=this.stack[this.stack.length-1],oe=this.resume(),F=this.stack[this.stack.length-1];if(this.data.inReference=!0,F.type==="link"){const me=te.children;F.children=me}else F.alt=oe}function L(){const te=this.resume(),oe=this.stack[this.stack.length-1];oe.url=te}function B(){const te=this.resume(),oe=this.stack[this.stack.length-1];oe.title=te}function D(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function $(te){const oe=this.resume(),F=this.stack[this.stack.length-1];F.label=oe,F.identifier=Ir(this.sliceSerialize(te)).toLowerCase(),this.data.referenceType="full"}function Y(te){this.data.characterReferenceType=te.type}function H(te){const oe=this.sliceSerialize(te),F=this.data.characterReferenceType;let me;F?(me=bS(oe,F==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):me=Lm(oe);const pe=this.stack[this.stack.length-1];pe.value+=me}function j(te){const oe=this.stack.pop();oe.position.end=Ln(te.end)}function N(te){T.call(this,te);const oe=this.stack[this.stack.length-1];oe.url=this.sliceSerialize(te)}function K(te){T.call(this,te);const oe=this.stack[this.stack.length-1];oe.url="mailto:"+this.sliceSerialize(te)}function V(){return{type:"blockquote",children:[]}}function X(){return{type:"code",lang:null,meta:null,value:""}}function re(){return{type:"inlineCode",value:""}}function ce(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ge(){return{type:"emphasis",children:[]}}function ae(){return{type:"heading",depth:0,children:[]}}function Se(){return{type:"break"}}function ye(){return{type:"html",value:""}}function We(){return{type:"image",title:null,url:"",alt:null}}function Ge(){return{type:"link",title:null,url:"",children:[]}}function Re(te){return{type:"list",ordered:te.type==="listOrdered",start:null,spread:te._spread,children:[]}}function Ne(te){return{type:"listItem",spread:te._spread,checked:null,children:[]}}function qe(){return{type:"paragraph",children:[]}}function Ce(){return{type:"strong",children:[]}}function ke(){return{type:"text",value:""}}function Ie(){return{type:"thematicBreak"}}}function Ln(e){return{line:e.line,column:e.column,offset:e.offset}}function IS(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?IS(e,n):KR(e,n)}}function KR(e,t){let r;for(r in t)if(DS.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 w1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+$o({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+$o({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+$o({start:t.start,end:t.end})+") is still open")}function GR(e){const t=this;t.parser=r;function r(n){return WR(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function qR(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 YR(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
623
|
+
`}]}function JR(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 XR(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function QR(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ZR(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),i=Us(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 eO(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 tO(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function NS(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 rO(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return NS(e,t);const i={src:Us(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 nO(e,t){const r={src:Us(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 iO(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 sO(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return NS(e,t);const i={href:Us(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 oO(e,t){const r={href:Us(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 aO(e,t,r){const n=e.all(t),i=r?lO(r):RS(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 lO(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=RS(r[n])}return t}function RS(e){const t=e.spread;return t??e.children.length>1}function cO(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 uO(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function fO(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function hO(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function dO(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=Cm(t.children[1]),l=dS(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 pO(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={},v=a?a[l]:void 0;v&&(m.align=v);let w={type:"element",tagName:s,properties:m,children:[]};u&&(w.children=e.all(u),e.patch(u,w),w=e.applyData(u,w)),c.push(w)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,h),e.applyData(t,h)}function mO(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const b1=9,S1=32;function gO(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),i=0;const s=[];for(;n;)s.push(C1(t.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return s.push(C1(t.slice(i),i>0,!1)),s.join("")}function C1(e,t,r){let n=0,i=e.length;if(t){let s=e.codePointAt(n);for(;s===b1||s===S1;)n++,s=e.codePointAt(n)}if(r){let s=e.codePointAt(i-1);for(;s===b1||s===S1;)i--,s=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}function vO(e,t){const r={type:"text",value:gO(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function _O(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const yO={blockquote:qR,break:YR,code:JR,delete:XR,emphasis:QR,footnoteReference:ZR,heading:eO,html:tO,imageReference:rO,image:nO,inlineCode:iO,linkReference:sO,link:oO,listItem:aO,list:cO,paragraph:uO,root:fO,strong:hO,table:dO,tableCell:mO,tableRow:pO,text:vO,thematicBreak:_O,toml:Ll,yaml:Ll,definition:Ll,footnoteDefinition:Ll};function Ll(){}const OS=-1,xu=0,Ho=1,Hc=2,Tm=3,Dm=4,Im=5,Nm=6,MS=7,jS=8,k1=typeof self=="object"?self:globalThis,wO=(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 xu:case OS:return r(a,i);case Ho:{const o=r([],i);for(const l of a)o.push(n(l));return o}case Hc:{const o=r({},i);for(const[l,c]of a)o[n(l)]=n(c);return o}case Tm:return r(new Date(a),i);case Dm:{const{source:o,flags:l}=a;return r(new RegExp(o,l),i)}case Im:{const o=r(new Map,i);for(const[l,c]of a)o.set(n(l),n(c));return o}case Nm:{const o=r(new Set,i);for(const l of a)o.add(n(l));return o}case MS:{const{name:o,message:l}=a;return r(new k1[o](l),i)}case jS: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 k1[s](a),i)};return n},x1=e=>wO(new Map,e)(0),Ki="",{toString:bO}={},{keys:SO}=Object,yo=e=>{const t=typeof e;if(t!=="object"||!e)return[xu,t];const r=bO.call(e).slice(8,-1);switch(r){case"Array":return[Ho,Ki];case"Object":return[Hc,Ki];case"Date":return[Tm,Ki];case"RegExp":return[Dm,Ki];case"Map":return[Im,Ki];case"Set":return[Nm,Ki];case"DataView":return[Ho,r]}return r.includes("Array")?[Ho,r]:r.includes("Error")?[MS,r]:[Hc,r]},Pl=([e,t])=>e===xu&&(t==="function"||t==="symbol"),CO=(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]=yo(a);switch(o){case xu:{let h=a;switch(l){case"bigint":o=jS,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);h=null;break;case"undefined":return i([OS],a)}return i([o,h],a)}case Ho:{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 Hc:{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 SO(a))(e||!Pl(yo(a[m])))&&h.push([s(m),s(a[m])]);return u}case Tm:return i([o,a.toISOString()],a);case Dm:{const{source:h,flags:u}=a;return i([o,{source:h,flags:u}],a)}case Im:{const h=[],u=i([o,h],a);for(const[m,v]of a)(e||!(Pl(yo(m))||Pl(yo(v))))&&h.push([s(m),s(v)]);return u}case Nm:{const h=[],u=i([o,h],a);for(const m of a)(e||!Pl(yo(m)))&&h.push(s(m));return u}}const{message:c}=a;return i([o,{name:l,message:c}],a)};return s},E1=(e,{json:t,lossy:r}={})=>{const n=[];return CO(!(t||r),!!t,new Map,n)(e),n},Wc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?x1(E1(e,t)):structuredClone(e):(e,t)=>x1(E1(e,t));function kO(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 xO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function EO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||kO,n=e.options.footnoteBackLabel||xO,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=Us(u.toLowerCase());let v=0;const w=[],_=e.footnoteCounts.get(u);for(;_!==void 0&&++v<=_;){w.length>0&&w.push({type:"text",value:" "});let f=typeof r=="string"?r:r(l,v);typeof f=="string"&&(f={type:"text",value:f}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,v),className:["data-footnote-backref"]},children:Array.isArray(f)?f:[f]})}const g=h[h.length-1];if(g&&g.type==="element"&&g.tagName==="p"){const f=g.children[g.children.length-1];f&&f.type==="text"?f.value+=" ":g.children.push({type:"text",value:" "}),g.children.push(...w)}else h.push(...w);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:{...Wc(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 Eu=function(e){if(e==null)return TO;if(typeof e=="function")return Au(e);if(typeof e=="object")return Array.isArray(e)?AO(e):LO(e);if(typeof e=="string")return PO(e);throw new Error("Expected function, string, or object as test")};function AO(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Eu(e[r]);return Au(n);function n(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function LO(e){const t=e;return Au(r);function r(n){const i=n;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function PO(e){return Au(t);function t(r){return r&&r.type===e}}function Au(e){return t;function t(r,n,i){return!!(DO(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function TO(){return!0}function DO(e){return e!==null&&typeof e=="object"&&"type"in e}const BS=[],IO=!0,Vd=!1,NO="skip";function FS(e,t,r,n){let i;typeof t=="function"&&typeof r!="function"?(n=r,r=t):i=t;const s=Eu(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 v=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(l.type+(v?"<"+v+">":""))+")"})}return m;function m(){let v=BS,w,_,g;if((!t||s(l,c,h[h.length-1]||void 0))&&(v=RO(r(l,h)),v[0]===Vd))return v;if("children"in l&&l.children){const d=l;if(d.children&&v[0]!==NO)for(_=(n?d.children.length:-1)+a,g=h.concat(d);_>-1&&_<d.children.length;){const f=d.children[_];if(w=o(f,_,g)(),w[0]===Vd)return w;_=typeof w[1]=="number"?w[1]:_+a}}return v}}}function RO(e){return Array.isArray(e)?e:typeof e=="number"?[IO,e]:e==null?BS:[e]}function Rm(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),FS(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 Kd={}.hasOwnProperty,OO={};function MO(e,t){const r=t||OO,n=new Map,i=new Map,s=new Map,a={...yO,...r.handlers},o={all:c,applyData:BO,definitionById:n,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:l,options:r,patch:jO,wrap:zO};return Rm(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,v=o.handlers[m];if(Kd.call(o.handlers,m)&&v)return v(o,h,u);if(o.options.passThrough&&o.options.passThrough.includes(m)){if("children"in h){const{children:_,...g}=h,d=Wc(g);return d.children=o.all(h),d}return Wc(h)}return(o.options.unknownHandler||FO)(o,h,u)}function c(h){const u=[];if("children"in h){const m=h.children;let v=-1;for(;++v<m.length;){const w=o.one(m[v],h);if(w){if(v&&m[v-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=A1(w.value)),!Array.isArray(w)&&w.type==="element")){const _=w.children[0];_&&_.type==="text"&&(_.value=A1(_.value))}Array.isArray(w)?u.push(...w):u.push(w)}}}return u}}function jO(e,t){e.position&&(t.position=xI(e))}function BO(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,Wc(s)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}function FO(e,t){const r=t.data||{},n="value"in t&&!(Kd.call(r,"hProperties")||Kd.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 zO(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 A1(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function L1(e,t){const r=MO(e,t),n=r.one(e,void 0),i=EO(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 $O(e,t){return e&&"run"in e?async function(r,n){const i=L1(r,{file:n,...t});await e.run(i,n)}:function(r,n){return L1(r,{file:n,...e||t})}}function P1(e){if(e)throw e}var oc=Object.prototype.hasOwnProperty,zS=Object.prototype.toString,T1=Object.defineProperty,D1=Object.getOwnPropertyDescriptor,I1=function(t){return typeof Array.isArray=="function"?Array.isArray(t):zS.call(t)==="[object Array]"},N1=function(t){if(!t||zS.call(t)!=="[object Object]")return!1;var r=oc.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&oc.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var i;for(i in t);return typeof i>"u"||oc.call(t,i)},R1=function(t,r){T1&&r.name==="__proto__"?T1(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},O1=function(t,r){if(r==="__proto__")if(oc.call(t,r)){if(D1)return D1(t,r).value}else return;return t[r]},UO=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=O1(o,r),i=O1(t,r),o!==i&&(h&&i&&(N1(i)||(s=I1(i)))?(s?(s=!1,a=n&&I1(n)?n:[]):a=n&&N1(n)?n:{},R1(o,{name:r,newValue:e(h,a,i)})):typeof i<"u"&&R1(o,{name:r,newValue:i}));return o};const Jf=qc(UO);function Gd(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?WO(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 WO(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 $r={basename:VO,dirname:KO,extname:GO,join:qO,sep:"/"};function VO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ta(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 KO(e){if(Ta(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){Ta(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 qO(...e){let t=-1,r;for(;++t<e.length;)Ta(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":YO(r)}function YO(e){Ta(e);const t=e.codePointAt(0)===47;let r=JO(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function JO(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 Ta(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const XO={cwd:QO};function QO(){return"/"}function qd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function ZO(e){if(typeof e=="string")e=new URL(e);else if(!qd(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 eM(e)}function eM(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 Xf=["history","path","basename","stem","extname","dirname"];class $S{constructor(t){let r;t?qd(t)?r={path:t}:typeof t=="string"||tM(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":XO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Xf.length;){const s=Xf[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)Xf.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?$r.basename(this.path):void 0}set basename(t){Zf(t,"basename"),Qf(t,"basename"),this.path=$r.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?$r.dirname(this.path):void 0}set dirname(t){M1(this.basename,"dirname"),this.path=$r.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?$r.extname(this.path):void 0}set extname(t){if(Qf(t,"extname"),M1(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=$r.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){qd(t)&&(t=ZO(t)),Zf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?$r.basename(this.path,this.extname):void 0}set stem(t){Zf(t,"stem"),Qf(t,"stem"),this.path=$r.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 jt(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 Qf(e,t){if(e&&e.includes($r.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+$r.sep+"`")}function Zf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function M1(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function tM(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rM=function(e){const n=this.constructor.prototype,i=n[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,n),s},nM={}.hasOwnProperty;class Om extends rM{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 Om;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(Jf(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(rh("data",this.frozen),this.namespace[t]=r,this):nM.call(this.namespace,t)&&this.namespace[t]||void 0:t?(rh("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=Tl(t),n=this.parser||this.Parser;return eh("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),eh("process",this.parser||this.Parser),th("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(s,a){const o=Tl(t),l=n.parse(o);n.run(l,o,function(h,u,m){if(h||!u||!m)return c(h);const v=u,w=n.stringify(v,m);oM(w)?m.value=w:m.result=w,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(),eh("processSync",this.parser||this.Parser),th("processSync",this.compiler||this.Compiler),this.process(t,i),B1("processSync","process",r),n;function i(s,a){r=!0,P1(s),n=a}}run(t,r,n){j1(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=Tl(r);i.run(t,l,c);function c(h,u,m){const v=u||t;h?o(h):a?a(v):n(void 0,v,m)}}}runSync(t,r){let n=!1,i;return this.run(t,r,s),B1("runSync","run",n),i;function s(a,o){P1(a),i=o,n=!0}}stringify(t,r){this.freeze();const n=Tl(r),i=this.compiler||this.Compiler;return th("stringify",i),j1(t),i(t,n)}use(t,...r){const n=this.attachers,i=this.namespace;if(rh("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=Jf(!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[v,...w]=h;const _=n[m][1];Gd(_)&&Gd(v)&&(v=Jf(!0,_,v)),n[m]=[c,v,...w]}}}}const iM=new Om().freeze();function eh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function th(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function rh(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 j1(e){if(!Gd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function B1(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Tl(e){return sM(e)?e:new $S(e)}function sM(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function oM(e){return typeof e=="string"||aM(e)}function aM(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const lM="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",F1=[],z1={allowDangerousHtml:!0},cM=/^(https?|ircs?|mailto|xmpp)$/i,uM=[{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 Dl(e){const t=fM(e),r=hM(e);return dM(t.runSync(t.parse(r),r),e)}function fM(e){const t=e.rehypePlugins||F1,r=e.remarkPlugins||F1,n=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...z1}:z1;return iM().use(GR).use(r).use($O,n).use(t)}function hM(e){const t=e.children||"",r=new $S;return typeof t=="string"&&(r.value=t),r}function dM(e,t){const r=t.allowedElements,n=t.allowElement,i=t.components,s=t.disallowedElements,a=t.skipHtml,o=t.unwrapDisallowed,l=t.urlTransform||pM;for(const h of uM)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+lM+h.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Rm(e,c),TI(e,{Fragment:x.Fragment,components:i,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.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 v;for(v in Gf)if(Object.hasOwn(Gf,v)&&Object.hasOwn(h.properties,v)){const w=h.properties[v],_=Gf[v];(_===null||_.includes(h.tagName))&&(h.properties[v]=l(String(w||""),v,h))}}if(h.type==="element"){let v=r?!r.includes(h.tagName):s?s.includes(h.tagName):!1;if(!v&&n&&typeof u=="number"&&(v=!n(h,u,m)),v&&m&&typeof u=="number")return o&&h.children?m.children.splice(u,1,...h.children):m.children.splice(u,1),u}}}function pM(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||cM.test(e.slice(0,t))?e:""}function $1(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 mM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function gM(e,t,r){const i=Eu((r||{}).ignore||[]),s=vM(t);let a=-1;for(;++a<s.length;)FS(e,"text",o);function o(c,h){let u=-1,m;for(;++u<h.length;){const v=h[u],w=m?m.children:void 0;if(i(v,w?w.indexOf(v):void 0,m))return;m=v}if(m)return l(c,h)}function l(c,h){const u=h[h.length-1],m=s[a][0],v=s[a][1];let w=0;const g=u.children.indexOf(c);let d=!1,f=[];m.lastIndex=0;let p=m.exec(c.value);for(;p;){const y=p.index,S={index:p.index,input:p.input,stack:[...h,c]};let b=v(...p,S);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?m.lastIndex=y+1:(w!==y&&f.push({type:"text",value:c.value.slice(w,y)}),Array.isArray(b)?f.push(...b):b&&f.push(b),w=y+p[0].length,d=!0),!m.global)break;p=m.exec(c.value)}return d?(w<c.value.length&&f.push({type:"text",value:c.value.slice(w)}),u.children.splice(g,1,...f)):f=[c],g+f.length}}function vM(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([_M(i[0]),yM(i[1])])}return t}function _M(e){return typeof e=="string"?new RegExp(mM(e),"g"):e}function yM(e){return typeof e=="function"?e:function(){return e}}const nh="phrasing",ih=["autolink","link","image","label"];function wM(){return{transforms:[AM],enter:{literalAutolink:SM,literalAutolinkEmail:sh,literalAutolinkHttp:sh,literalAutolinkWww:sh},exit:{literalAutolink:EM,literalAutolinkEmail:xM,literalAutolinkHttp:CM,literalAutolinkWww:kM}}}function bM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:nh,notInConstruct:ih},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:nh,notInConstruct:ih},{character:":",before:"[ps]",after:"\\/",inConstruct:nh,notInConstruct:ih}]}}function SM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function sh(e){this.config.enter.autolinkProtocol.call(this,e)}function CM(e){this.config.exit.autolinkProtocol.call(this,e)}function kM(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 xM(e){this.config.exit.autolinkEmail.call(this,e)}function EM(e){this.exit(e)}function AM(e){gM(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,LM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),PM]],{ignore:["link","linkReference"]})}function LM(e,t,r,n,i){let s="";if(!US(i)||(/^w/i.test(t)&&(r=t+r,t="",s="http://"),!TM(r)))return!1;const a=DM(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 PM(e,t,r,n){return!US(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function TM(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 DM(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=$1(e,"(");let s=$1(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 US(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Ai(r)||Cu(r))&&(!t||r!==47)}HS.peek=zM;function IM(){this.buffer()}function NM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function RM(){this.buffer()}function OM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function MM(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Ir(this.sliceSerialize(e)).toLowerCase(),r.label=t}function jM(e){this.exit(e)}function BM(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Ir(this.sliceSerialize(e)).toLowerCase(),r.label=t}function FM(e){this.exit(e)}function zM(){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 $M(){return{enter:{gfmFootnoteCallString:IM,gfmFootnoteCall:NM,gfmFootnoteDefinitionLabelString:RM,gfmFootnoteDefinition:OM},exit:{gfmFootnoteCallString:MM,gfmFootnoteCall:jM,gfmFootnoteDefinitionLabelString:BM,gfmFootnoteDefinition:FM}}}function UM(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?WS:HM))),c(),l}}function HM(e,t,r){return t===0?e:WS(e,t,r)}function WS(e,t,r){return(r?"":" ")+e}const WM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];VS.peek=YM;function VM(){return{canContainEols:["delete"],enter:{strikethrough:GM},exit:{strikethrough:qM}}}function KM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:WM}],handlers:{delete:VS}}}function GM(e){this.enter({type:"delete",children:[]},e)}function qM(e){this.exit(e)}function VS(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 YM(){return"~"}function JM(e){return e.length}function XM(e,t){const r=t||{},n=(r.align||[]).concat(),i=r.stringLength||JM,s=[],a=[],o=[],l=[];let c=0,h=-1;for(;++h<e.length;){const _=[],g=[];let d=-1;for(e[h].length>c&&(c=e[h].length);++d<e[h].length;){const f=QM(e[h][d]);if(r.alignDelimiters!==!1){const p=i(f);g[d]=p,(l[d]===void 0||p>l[d])&&(l[d]=p)}_.push(f)}a[h]=_,o[h]=g}let u=-1;if(typeof n=="object"&&"length"in n)for(;++u<c;)s[u]=U1(n[u]);else{const _=U1(n);for(;++u<c;)s[u]=_}u=-1;const m=[],v=[];for(;++u<c;){const _=s[u];let g="",d="";_===99?(g=":",d=":"):_===108?g=":":_===114&&(d=":");let f=r.alignDelimiters===!1?1:Math.max(1,l[u]-g.length-d.length);const p=g+"-".repeat(f)+d;r.alignDelimiters!==!1&&(f=g.length+f+d.length,f>l[u]&&(l[u]=f),v[u]=f),m[u]=p}a.splice(1,0,m),o.splice(1,0,v),h=-1;const w=[];for(;++h<a.length;){const _=a[h],g=o[h];u=-1;const d=[];for(;++u<c;){const f=_[u]||"";let p="",y="";if(r.alignDelimiters!==!1){const S=l[u]-(g[u]||0),b=s[u];b===114?p=" ".repeat(S):b===99?S%2?(p=" ".repeat(S/2+.5),y=" ".repeat(S/2-.5)):(p=" ".repeat(S/2),y=p):y=" ".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(y),r.padding!==!1&&d.push(" "),(r.delimiterEnd!==!1||u!==c-1)&&d.push("|")}w.push(r.delimiterEnd===!1?d.join("").replace(/ +$/,""):d.join(""))}return w.join(`
|
|
634
|
+
`)}function QM(e){return e==null?"":String(e)}function U1(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 ZM(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()),e8);return i(),a}function e8(e,t,r){return">"+(r?"":" ")+e}function t8(e,t){return H1(e,t.inConstruct,!0)&&!H1(e,t.notInConstruct,!1)}function H1(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 W1(e,t,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
|
|
635
|
+
`&&t8(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
|
|
636
|
+
`}function r8(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 n8(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 i8(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 s8(e,t,r,n){const i=i8(r),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(n8(e,r)){const u=r.enter("codeIndented"),m=r.indentLines(s,o8);return u(),m}const o=r.createTracker(n),l=i.repeat(Math.max(r8(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 o8(e,t,r){return(r?"":" ")+e}function Mm(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 a8(e,t,r,n){const i=Mm(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 l8(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 pa(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Vc(e,t,r){const n=Os(e),i=Os(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}}KS.peek=c8;function KS(e,t,r,n){const i=l8(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=Vc(n.before.charCodeAt(n.before.length-1),c,i);h.inside&&(l=pa(c)+l.slice(1));const u=l.charCodeAt(l.length-1),m=Vc(n.after.charCodeAt(0),u,i);m.inside&&(l=l.slice(0,-1)+pa(u));const v=a.move(i);return s(),r.attentionEncodeSurroundingInfo={after:m.outside,before:h.outside},o+l+v}function c8(e,t,r){return r.options.emphasis||"*"}function u8(e,t){let r=!1;return Rm(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,Vd}),!!((!e.depth||e.depth<3)&&Am(e)&&(t.options.setext||r))}function f8(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),s=r.createTracker(n);if(u8(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=pa(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,r.options.closeAtx&&(c+=" "+a),l(),o(),c}GS.peek=h8;function GS(e){return e.value||""}function h8(){return"<"}qS.peek=d8;function qS(e,t,r,n){const i=Mm(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 d8(){return"!"}YS.peek=p8;function YS(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 p8(){return"!"}JS.peek=m8;function JS(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 m8(){return"`"}function XS(e,t){const r=Am(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))}QS.peek=g8;function QS(e,t,r,n){const i=Mm(r),s=i==='"'?"Quote":"Apostrophe",a=r.createTracker(n);let o,l;if(XS(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 g8(e,t,r){return XS(e,r)?"<":"["}ZS.peek=v8;function ZS(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 v8(){return"["}function jm(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 _8(e){const t=jm(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 y8(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 eC(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 w8(e,t,r,n){const i=r.enter("list"),s=r.bulletCurrent;let a=e.ordered?y8(r):jm(r);const o=e.ordered?a==="."?")":".":_8(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),eC(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 b8(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 S8(e,t,r,n){const i=b8(r);let s=r.bulletCurrent||jm(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,v){return m?(v?"":" ".repeat(a))+u:(v?s:s+" ".repeat(a-s.length))+u}}function C8(e,t,r,n){const i=r.enter("paragraph"),s=r.enter("phrasing"),a=r.containerPhrasing(e,n);return s(),i(),a}const k8=Eu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function x8(e,t,r,n){return(e.children.some(function(a){return k8(a)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function E8(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}tC.peek=A8;function tC(e,t,r,n){const i=E8(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=Vc(n.before.charCodeAt(n.before.length-1),c,i);h.inside&&(l=pa(c)+l.slice(1));const u=l.charCodeAt(l.length-1),m=Vc(n.after.charCodeAt(0),u,i);m.inside&&(l=l.slice(0,-1)+pa(u));const v=a.move(i+i);return s(),r.attentionEncodeSurroundingInfo={after:m.outside,before:h.outside},o+l+v}function A8(e,t,r){return r.options.strong||"*"}function L8(e,t,r,n){return r.safe(e.value,n)}function P8(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 T8(e,t,r){const n=(eC(r)+(r.options.ruleSpaces?" ":"")).repeat(P8(r));return r.options.ruleSpaces?n.slice(0,-1):n}const rC={blockquote:ZM,break:W1,code:s8,definition:a8,emphasis:KS,hardBreak:W1,heading:f8,html:GS,image:qS,imageReference:YS,inlineCode:JS,link:QS,linkReference:ZS,list:w8,listItem:S8,paragraph:C8,root:x8,strong:tC,text:L8,thematicBreak:T8};function D8(){return{enter:{table:I8,tableData:V1,tableHeader:V1,tableRow:R8},exit:{codeText:O8,table:N8,tableData:oh,tableHeader:oh,tableRow:oh}}}function I8(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 N8(e){this.exit(e),this.data.inTable=void 0}function R8(e){this.enter({type:"tableRow",children:[]},e)}function oh(e){this.exit(e)}function V1(e){this.enter({type:"tableCell",children:[]},e)}function O8(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,M8));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function M8(e,t){return t==="|"?t:e}function j8(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(v,w,_,g){return c(h(v,_,g),v.align)}function o(v,w,_,g){const d=u(v,_,g),f=c([d]);return f.slice(0,f.indexOf(`
|
|
647
|
+
`))}function l(v,w,_,g){const d=_.enter("tableCell"),f=_.enter("phrasing"),p=_.containerPhrasing(v,{...g,before:s,after:s});return f(),d(),p}function c(v,w){return XM(v,{align:w,alignDelimiters:n,padding:r,stringLength:i})}function h(v,w,_){const g=v.children;let d=-1;const f=[],p=w.enter("table");for(;++d<g.length;)f[d]=u(g[d],w,_);return p(),f}function u(v,w,_){const g=v.children;let d=-1;const f=[],p=w.enter("tableRow");for(;++d<g.length;)f[d]=l(g[d],v,w,_);return p(),f}function m(v,w,_){let g=rC.inlineCode(v,w,_);return _.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function B8(){return{exit:{taskListCheckValueChecked:K1,taskListCheckValueUnchecked:K1,paragraph:z8}}}function F8(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:$8}}}function K1(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function z8(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 $8(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=rC.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 U8(){return[wM(),$M(),VM(),D8(),B8()]}function H8(e){return{extensions:[bM(),UM(e),KM(),j8(e),F8()]}}const W8={tokenize:J8,partial:!0},nC={tokenize:X8,partial:!0},iC={tokenize:Q8,partial:!0},sC={tokenize:Z8,partial:!0},V8={tokenize:ej,partial:!0},oC={name:"wwwAutolink",tokenize:q8,previous:lC},aC={name:"protocolAutolink",tokenize:Y8,previous:cC},yn={name:"emailAutolink",tokenize:G8,previous:uC},qr={};function K8(){return{text:qr}}let li=48;for(;li<123;)qr[li]=yn,li++,li===58?li=65:li===91&&(li=97);qr[43]=yn;qr[45]=yn;qr[46]=yn;qr[95]=yn;qr[72]=[yn,aC];qr[104]=[yn,aC];qr[87]=[yn,oC];qr[119]=[yn,oC];function G8(e,t,r){const n=this;let i,s;return a;function a(u){return!Yd(u)||!uC.call(n,n.previous)||Bm(n.events)?r(u):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(u))}function o(u){return Yd(u)?(e.consume(u),o):u===64?(e.consume(u),l):r(u)}function l(u){return u===46?e.check(V8,h,c)(u):u===45||u===95||Ot(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&&Ft(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(u)):r(u)}}function q8(e,t,r){const n=this;return i;function i(a){return a!==87&&a!==119||!lC.call(n,n.previous)||Bm(n.events)?r(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(W8,e.attempt(nC,e.attempt(iC,s),r),r)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function Y8(e,t,r){const n=this;let i="",s=!1;return a;function a(u){return(u===72||u===104)&&cC.call(n,n.previous)&&!Bm(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(u),e.consume(u),o):r(u)}function o(u){if(Ft(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||Uc(u)||Ze(u)||Ai(u)||Cu(u)?r(u):e.attempt(nC,e.attempt(iC,h),r)(u)}function h(u){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(u)}}function J8(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 X8(e,t,r){let n,i,s;return a;function a(c){return c===46||c===95?e.check(sC,l,o)(c):c===null||Ze(c)||Ai(c)||c!==45&&Cu(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 Q8(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(sC,t,s)(a):a===null||Ze(a)||Ai(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&n++,e.consume(a),i}}function Z8(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||Ze(o)||Ai(o)?t(o):r(o)}function i(o){return o===null||o===40||o===91||Ze(o)||Ai(o)?t(o):n(o)}function s(o){return Ft(o)?a(o):r(o)}function a(o){return o===59?(e.consume(o),n):Ft(o)?(e.consume(o),a):r(o)}}function ej(e,t,r){return n;function n(s){return e.consume(s),i}function i(s){return Ot(s)?r(s):t(s)}}function lC(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ze(e)}function cC(e){return!Ft(e)}function uC(e){return!(e===47||Yd(e))}function Yd(e){return e===43||e===45||e===46||e===95||Ot(e)}function Bm(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 tj={tokenize:cj,partial:!0};function rj(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:oj,continuation:{tokenize:aj},exit:lj}},text:{91:{name:"gfmFootnoteCall",tokenize:sj},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:nj,resolveTo:ij}}}}function nj(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=Ir(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 ij(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 sj(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||Ze(u))return r(u);if(u===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(Ir(n.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(u)}return Ze(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 oj(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s,a=0,o;return l;function l(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):r(w)}function h(w){if(a>999||w===93&&!o||w===null||w===91||Ze(w))return r(w);if(w===93){e.exit("chunkString");const _=e.exit("gfmFootnoteDefinitionLabelString");return s=Ir(n.sliceSerialize(_)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Ze(w)||(o=!0),a++,e.consume(w),w===92?u:h}function u(w){return w===91||w===92||w===93?(e.consume(w),a++,h):h(w)}function m(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),i.includes(s)||i.push(s),Ke(e,v,"gfmFootnoteDefinitionWhitespace")):r(w)}function v(w){return t(w)}}function aj(e,t,r){return e.check(Pa,t,e.attempt(tj,t,r))}function lj(e){e.exit("gfmFootnoteDefinition")}function cj(e,t,r){const n=this;return Ke(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 uj(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]],v=o.parser.constructs.insideSpan.null;v&&cr(m,m.length,0,ku(v,a.slice(c+1,l),o)),cr(m,m.length,0,[["exit",u,o],["enter",a[l][1],o],["exit",a[l][1],o],["exit",h,o]]),cr(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(w){return c===126&&h[h.length-1][1].type!=="characterEscape"?l(w):(a.enter("strikethroughSequenceTemporary"),v(w))}function v(w){const _=Os(c);if(w===126)return u>1?l(w):(a.consume(w),u++,v);if(u<2&&!r)return l(w);const g=a.exit("strikethroughSequenceTemporary"),d=Os(w);return g._open=!d||d===2&&!!_,g._close=!_||_===2&&!!d,o(w)}}}class fj{constructor(){this.map=[]}add(t,r,n){hj(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 hj(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 dj(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 pj(){return{flow:{null:{name:"table",tokenize:mj,resolveAll:gj}}}}function mj(e,t,r){const n=this;let i=0,s=0,a;return o;function o(T){let O=n.events.length-1;for(;O>-1;){const z=n.events[O][1].type;if(z==="lineEnding"||z==="linePrefix")O--;else break}const R=O>-1?n.events[O][1].type:null,M=R==="tableHead"||R==="tableRow"?b:l;return M===b&&n.parser.lazy[n.now().line]?r(T):M(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):De(T)?s>1?(s=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),v):r(T):Ue(T)?Ke(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||Ze(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 v(T){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(T):(e.enter("tableDelimiterRow"),a=!1,Ue(T)?Ke(e,w,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):w(T))}function w(T){return T===45||T===58?g(T):T===124?(a=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),_):S(T)}function _(T){return Ue(T)?Ke(e,g,"whitespace")(T):g(T)}function g(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||De(T)?y(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 Ue(T)?Ke(e,y,"whitespace")(T):y(T)}function y(T){return T===124?w(T):T===null||De(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"),E(T)}function E(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),E):T===null||De(T)?(e.exit("tableRow"),t(T)):Ue(T)?Ke(e,E,"whitespace")(T):(e.enter("data"),C(T))}function C(T){return T===null||T===124||Ze(T)?(e.exit("data"),E(T)):(e.consume(T),T===92?A:C)}function A(T){return T===92||T===124?(e.consume(T),C):C(T)}}function gj(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 fj;for(;++r<e.length;){const v=e[r],w=v[1];v[0]==="enter"?w.type==="tableHead"?(o=!1,l!==0&&(G1(m,t,l,c,h),h=void 0,l=0),c={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},m.add(r,0,[["enter",c,t]])):w.type==="tableRow"||w.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({},w.start),end:Object.assign({},w.end)},m.add(r,0,[["enter",h,t]])),i=w.type==="tableDelimiterRow"?2:h?3:1):i&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(n=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],u=Il(m,t,s,i,void 0,u),s=[0,0,0,0]),a[2]=r)):w.type==="tableCellDivider"&&(n?n=!1:(s[1]!==0&&(a[0]=a[1],u=Il(m,t,s,i,void 0,u)),s=a,a=[s[1],r,0,0])):w.type==="tableHead"?(o=!0,l=r):w.type==="tableRow"||w.type==="tableDelimiterRow"?(l=r,s[1]!==0?(a[0]=a[1],u=Il(m,t,s,i,r,u)):a[1]!==0&&(u=Il(m,t,a,i,r,u)),i=0):i&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(a[3]=r)}for(l!==0&&G1(m,t,l,c,h),m.consume(t.events),r=-1;++r<t.events.length;){const v=t.events[r];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=dj(t.events,r))}return e}function Il(e,t,r,n,i,s){const a=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",o="tableContent";r[0]!==0&&(s.end=Object.assign({},es(t.events,r[0])),e.add(r[0],0,[["exit",s,t]]));const l=es(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=es(t.events,r[2]),h=es(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]],v=t.events[r[3]];if(m[1].end=Object.assign({},v[1].end),m[1].type="chunkText",m[1].contentType="text",r[3]>r[2]+1){const w=r[2]+1,_=r[3]-r[2]-1;e.add(w,_,[])}}e.add(r[3]+1,0,[["exit",u,t]])}return i!==void 0&&(s.end=Object.assign({},es(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function G1(e,t,r,n,i){const s=[],a=es(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 es(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const vj={name:"tasklistCheck",tokenize:yj};function _j(){return{text:{91:vj}}}function yj(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 Ze(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 De(l)?t(l):Ue(l)?e.check({tokenize:wj},t,r)(l):r(l)}}function wj(e,t,r){return Ke(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function bj(e){return wS([K8(),rj(),uj(e),pj(),_j()])}const Sj={};function Nl(e){const t=this,r=e||Sj,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),s=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(bj(r)),s.push(U8()),a.push(H8(r))}const Cj=e=>{const t=String(e||"").split(/\r?\n/),r=[];let n=!1;for(let i=0;i<t.length;i+=1){const s=t[i],a=s.trim();if(a.startsWith("```")){n=!n;continue}if(n||!a)continue;const o=/^[:\-\s|]+$/.test(a)&&a.includes("|");a.startsWith("|")&&a.endsWith("|")||o||r.push({lineIndex:i,lineText:s})}return r};function kj({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:v,currentMessages:w,chatHistoryWindow:_,activeChatKey:g,setShowOlderMessagesByTab:d,showChatCommands:f,showToolResults:p,commandPanelOpen:y,setCommandPanelOpen:S,toolResultPanelOpen:b,setToolResultPanelOpen:E,renderMessageAttachments:C,currentProcessing:A,currentInteractionBlocked:T,currentActivity:O,extractVibe80Blocks:R,handleChoiceClick:M,choiceSelections:z,openVibe80Form:U,copyTextToClipboard:q,openFileInExplorer:ee,setInput:W,inputRef:I,markBacklogItemDone:L,setBacklogMessagePage:B,activeWorktreeId:D,BACKLOG_PAGE_SIZE:P,MAX_USER_DISPLAY_LENGTH:$,getTruncatedText:Y,annotationMode:H,scopedAnnotations:j,setAnnotationDraft:N,removeAnnotation:K,addOrFocusAnnotation:V}){return x.jsxs("main",{className:`chat ${t==="chat"?"":"is-hidden"}`,children:[x.jsx("div",{className:"chat-scroll",ref:r,children:x.jsx("div",{className:`chat-scroll-inner ${n?"has-meta":""}`,children:x.jsxs("div",{className:`chat-history-grid ${n?"has-meta":""} ${H?"has-annotations":""}`,children:[n&&x.jsx("div",{className:"chat-meta-rail",children:x.jsxs("div",{className:"chat-meta-card",children:[x.jsxs("div",{className:"chat-meta-section chat-meta-repo",children:[x.jsx("div",{className:"chat-meta-repo-title",children:x.jsx("span",{className:"chat-meta-repo-name",children:i})}),x.jsxs("div",{className:"chat-meta-repo-branch-line",children:[x.jsx("span",{className:"chat-meta-repo-icon","aria-hidden":"true",children:x.jsx(ze,{icon:p6})}),x.jsx("span",{className:"chat-meta-repo-branch",children:s})]}),x.jsxs("div",{className:"chat-meta-repo-commit",children:[x.jsx("span",{className:"chat-meta-hash",children:a}),x.jsx("span",{className:"chat-meta-message",children:(o==null?void 0:o.message)||""})]})]}),l&&x.jsxs("div",{className:"chat-meta-section chat-meta-provider",children:[x.jsx("span",{className:"chat-meta-provider-icon","aria-hidden":"true",children:x.jsx(ze,{icon:N6})}),x.jsx("span",{className:"chat-meta-provider-label",children:c}),x.jsx("span",{className:"chat-meta-provider-sep",children:"•"}),x.jsx("span",{className:"chat-meta-provider-model",children:h})]}),(u||m||v)&&x.jsxs("div",{className:"chat-meta-section chat-meta-permissions",children:[u&&x.jsxs("div",{className:"chat-meta-permission",children:[x.jsx("span",{className:"chat-meta-permission-icon is-internet","aria-hidden":"true",children:x.jsx(ze,{icon:P6})}),x.jsx("span",{children:e("Internet access enabled")})]}),m&&x.jsxs("div",{className:"chat-meta-permission",children:[x.jsx("span",{className:"chat-meta-permission-icon is-credentials","aria-hidden":"true",children:x.jsx(ze,{icon:m6})}),x.jsx("span",{children:e("Git credentials shared")})]}),v&&x.jsxs("span",{className:"chat-meta-task",children:[x.jsx("span",{className:"chat-meta-task-loader","aria-hidden":"true"}),x.jsx(Dl,{className:"chat-meta-task-text",remarkPlugins:[Nl],components:{p:({children:X})=>x.jsx("span",{children:X})},children:v})]})]})]})}),x.jsxs("div",{className:"chat-history",children:[w.length===0&&x.jsx("div",{className:"empty",children:x.jsx("p",{children:e("Send a message to start a session.")})}),_.hiddenCount>0&&x.jsx("button",{type:"button",className:"chat-history-reveal",onClick:()=>d(X=>({...X,[g]:!0})),children:e("View previous messages ({{count}})",{count:_.hiddenCount})}),_.visibleMessages.map(X=>{var ce,ge;if((X==null?void 0:X.groupType)==="commandExecution")return x.jsx("div",{className:"bubble command-execution",children:X.items.map(ae=>{const Se=e("Command: {{command}}",{command:ae.command||e("Command")}),ye=ae.status!=="completed",We=ae.isExpandable||!!ae.output,Ge=x.jsxs(x.Fragment,{children:[ye&&x.jsxs("span",{className:"loader command-execution-loader",title:e("Execution in progress"),children:[x.jsx("span",{className:"dot"}),x.jsx("span",{className:"dot"}),x.jsx("span",{className:"dot"})]}),x.jsx("span",{className:"command-execution-title",children:Se})]});return x.jsx("div",{children:We?x.jsxs("details",{className:"command-execution-panel",open:!!y[ae.id],onToggle:Re=>{const Ne=Re.currentTarget.open;S(qe=>({...qe,[ae.id]:Ne}))},children:[x.jsx("summary",{className:"command-execution-summary",children:Ge}),x.jsx("pre",{className:"command-execution-output",children:ae.output||""})]}):x.jsx("div",{className:"command-execution-summary is-static",children:Ge})},ae.id)})},X.id);if((X==null?void 0:X.groupType)==="toolResult")return x.jsx("div",{className:"bubble command-execution",children:X.items.map(ae=>{var te,oe,F,me,pe,Oe;const Se=(ae==null?void 0:ae.type)==="action_result",ye=((te=ae==null?void 0:ae.action)==null?void 0:te.request)||"",We=((oe=ae==null?void 0:ae.action)==null?void 0:oe.arg)||"",Ge=`${ye}${We?` ${We}`:""}`.trim(),Re=Se?e("User command : {{command}}",{command:Ge||e("Command")}):e("Tool: {{tool}}",{tool:((F=ae.toolResult)==null?void 0:F.name)||((me=ae.toolResult)==null?void 0:me.tool)||"Tool"}),Ne=Se?((pe=ae==null?void 0:ae.action)==null?void 0:pe.output)||ae.text||"":((Oe=ae.toolResult)==null?void 0:Oe.output)||ae.text||"",qe=!!Ne,Ce=x.jsxs("span",{className:"command-execution-title",children:[x.jsx("span",{className:"command-execution-tool-icon","aria-hidden":"true",children:x.jsx(ze,{icon:b6})}),x.jsx("span",{children:Re})]}),ke=`tool-${ae.id}`,Ie=Se?b[ke]!==!1:!!b[ke];return x.jsx("div",{children:qe?x.jsxs("details",{className:"command-execution-panel",open:Ie,onToggle:Ae=>{const Te=Ae.currentTarget.open;E(ne=>({...ne,[ke]:Te}))},children:[x.jsx("summary",{className:"command-execution-summary",children:Ce}),x.jsx("pre",{className:"command-execution-output",children:Ne})]}):x.jsx("div",{className:"command-execution-summary is-static",children:Ce})},ae.id)})},X.id);if((X==null?void 0:X.type)==="backlog_view"){const Se=(Array.isArray((ce=X.backlog)==null?void 0:ce.items)?X.backlog.items:[]).filter(Ce=>!(Ce!=null&&Ce.done)),ye=Math.max(1,Math.ceil(Se.length/P)),We=Number.isFinite((ge=X.backlog)==null?void 0:ge.page)?X.backlog.page:0,Ge=Math.min(Math.max(0,We),ye-1),Re=Ge*P,Ne=Se.slice(Re,Re+P),qe=D&&D!=="main"?D:"main";return x.jsx("div",{className:"bubble backlog",children:x.jsxs("details",{className:"command-execution-panel backlog-panel",open:!0,children:[x.jsx("summary",{className:"command-execution-summary",children:x.jsx("span",{className:"command-execution-title",children:e("Backlog")})}),x.jsxs("div",{className:"backlog-view",children:[Ne.length===0?x.jsx("div",{className:"backlog-empty",children:e("No pending tasks at the moment.")}):x.jsx("div",{className:"backlog-list",children:Ne.map(Ce=>x.jsxs("div",{className:"backlog-row",children:[x.jsx("input",{type:"checkbox",className:"backlog-checkbox",onChange:()=>L(Ce.id)}),x.jsx("button",{type:"button",className:"backlog-text",title:Ce.text,onClick:()=>{var ke;W(Ce.text||""),(ke=I.current)==null||ke.focus()},children:Ce.text})]},Ce.id))}),ye>1?x.jsxs("div",{className:"backlog-pagination",children:[x.jsx("button",{type:"button",className:"backlog-page-button",disabled:Ge===0,onClick:()=>B(qe,X.id,Math.max(0,Ge-1)),children:e("Previous")}),x.jsxs("span",{className:"backlog-page-status",children:[Ge+1," / ",ye]}),x.jsx("button",{type:"button",className:"backlog-page-button",disabled:Ge>=ye-1,onClick:()=>B(qe,X.id,Math.min(ye-1,Ge+1)),children:e("Next")})]}):null]})]})},X.id)}if(X.role==="user"&&(X.text||"").length>$){const ae=Y(X.text,$);return x.jsxs("div",{className:`bubble ${X.role}`,children:[x.jsx("div",{className:"plain-text",children:ae}),C(X.attachments)]},X.id)}return x.jsx("div",{className:`bubble ${X.role}`,children:(()=>{const ae=X.text||"",Se=ae.startsWith("⚠️"),ye=ae.replace(/^⚠️\s*/,""),{cleanedText:We,blocks:Ge,filerefs:Re}=R(Se?ye:ae,e),Ne=H&&X.role==="assistant",qe=x.jsx(Dl,{remarkPlugins:[Nl],components:{a:({node:Ce,...ke})=>x.jsx("a",{...ke,target:"_blank",rel:"noopener noreferrer"}),code:({node:Ce,inline:ke,className:Ie,children:te,...oe})=>{const me=(Array.isArray(te)?te.join(""):String(te)).replace(/\n$/,"");if(!ke)return x.jsx("code",{className:Ie,...oe,children:te});const pe=me.trim(),Oe=!!pe&&!pe.startsWith("/")&&!pe.startsWith("~")&&!/^[a-zA-Z]+:\/\//.test(pe)&&!pe.includes("\\")&&!pe.includes(" ")&&(pe.startsWith("./")||pe.startsWith("../")||pe.includes("/")||/^[\w.-]+$/.test(pe));return x.jsxs("span",{className:`inline-code${Oe?" inline-code--link":""}`,children:[Oe?x.jsx("button",{type:"button",className:"inline-code-link",onClick:Ae=>{var Te;Ae.preventDefault(),Ae.stopPropagation(),W(`/open ${pe}`),(Te=I.current)==null||Te.focus()},children:x.jsx("code",{className:Ie,...oe,children:me})}):x.jsx("code",{className:Ie,...oe,children:me}),x.jsx("button",{type:"button",className:"code-copy","aria-label":e("Copy code"),title:e("Copy"),onClick:Ae=>{Ae.preventDefault(),Ae.stopPropagation(),q(me)},children:x.jsx(ze,{icon:jd})})]})}},children:We});return x.jsxs(x.Fragment,{children:[Ne?x.jsx("div",{className:"annotation-line-source-list",children:Cj(We).map(Ce=>x.jsxs("div",{className:"annotation-line-source-row",children:[x.jsx("div",{className:"annotation-line-source-text",children:x.jsx(Dl,{remarkPlugins:[Nl],components:{p:({children:ke})=>x.jsx("span",{children:ke}),a:({node:ke,...Ie})=>x.jsx("a",{...Ie,target:"_blank",rel:"noopener noreferrer"})},children:Ce.lineText})}),x.jsx("button",{type:"button",className:"annotation-line-source-button","aria-label":e("Annotate line"),title:e("Annotate line"),onClick:()=>V({messageId:X.id,lineIndex:Ce.lineIndex,lineText:Ce.lineText}),children:x.jsx(ze,{icon:A6})})]},`${X.id}-${Ce.lineIndex}`))}):Se?x.jsxs("div",{className:"warning-message",children:[x.jsx("span",{className:"warning-icon","aria-hidden":"true",children:x.jsx(ze,{icon:L6})}),x.jsx("div",{className:"warning-body",children:qe})]}):qe,Re.length&&!(X!=null&&X.isStreaming)?x.jsx("ul",{className:"fileref-list",children:Re.map(Ce=>x.jsx("li",{className:"fileref-item",children:x.jsx("button",{type:"button",className:"fileref-link",onClick:ke=>{ke.preventDefault(),ke.stopPropagation(),ee(Ce)},children:Ce})},`${X.id}-fileref-${Ce}`))}):null,Ge.map((Ce,ke)=>{const Ie=`${X.id}-${ke}`;if(Ce.type==="form")return x.jsx("div",{className:"vibe80-form",children:x.jsx("button",{type:"button",className:"vibe80-form-button",onClick:()=>U(Ce,Ie),children:Ce.question||e("Open form")})},Ie);const te=z[Ie],oe=Ce.choices.map((pe,Oe)=>({choice:pe,choiceIndex:Oe})),F=te===void 0?oe:[oe.find(({choiceIndex:pe})=>pe===te),...oe.filter(({choiceIndex:pe})=>pe!==te)].filter(Boolean),me=Ce.type==="yesno";return x.jsxs("div",{className:`choices ${me?"is-inline":""}`,children:[Ce.question&&x.jsx("div",{className:"choices-question",children:Ce.question}),x.jsx("div",{className:`choices-list ${te!==void 0?"is-selected":""} ${me?"is-inline":""}`,children:F.map(({choice:pe,choiceIndex:Oe})=>{const Ae=te===Oe;return x.jsx("button",{type:"button",onClick:()=>M(pe,Ie,Oe),disabled:T,className:`choice-button ${Ae?"is-selected":te!==void 0?"is-muted":""}`,children:x.jsx(Dl,{remarkPlugins:[Nl],components:{p:({node:Te,...ne})=>x.jsx("span",{...ne}),a:({node:Te,...ne})=>x.jsx("a",{...ne,target:"_blank",rel:"noopener noreferrer"})},children:pe})},`${Ie}-${Oe}`)})})]},Ie)}),C(X.attachments)]})})()},X.id)})]}),H?x.jsx("div",{className:"chat-annotation-rail",children:x.jsxs("div",{className:"chat-annotation-card",children:[x.jsx("div",{className:"chat-annotation-title",children:e("Annotations")}),x.jsx("div",{className:"chat-annotation-subtitle",children:e("Only sent with the next message.")}),j.length===0?x.jsx("div",{className:"chat-annotation-empty",children:e("No annotations yet.")}):x.jsx("div",{className:"chat-annotation-list",children:j.map(X=>x.jsxs("div",{className:"chat-annotation-item",children:[x.jsxs("div",{className:"chat-annotation-quote",children:["> ",X.lineText]}),x.jsx("textarea",{className:"chat-annotation-input",value:X.annotationText,placeholder:e("Write annotation..."),rows:3,onChange:re=>N(X.annotationKey,re.target.value)}),x.jsx("button",{type:"button",className:"chat-annotation-remove",onClick:()=>K(X.annotationKey),children:e("Delete")})]},X.annotationKey))})]})}):null]})})}),A&&x.jsx("div",{className:"bubble assistant typing",children:x.jsxs("div",{className:"typing-indicator",children:[x.jsxs("div",{className:"loader",title:O||e("Processing..."),children:[x.jsx("span",{className:"dot"}),x.jsx("span",{className:"dot"}),x.jsx("span",{className:"dot"})]}),x.jsx("span",{className:"typing-text",children:O||e("Processing...")})]})})]})}var q1=1,xj=.9,Ej=.8,Aj=.17,ah=.1,lh=.999,Lj=.9999,Pj=.99,Tj=/[\\\/_+.#"@\[\(\{&]/,Dj=/[\\\/_+.#"@\[\(\{&]/g,Ij=/[\s-]/,fC=/[\s-]/g;function Jd(e,t,r,n,i,s,a){if(s===t.length)return i===e.length?q1:Pj;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,v,w;c>=0;)u=Jd(e,t,r,n,c+1,s+1,a),u>h&&(c===i?u*=q1:Tj.test(e.charAt(c-1))?(u*=Ej,v=e.slice(i,c-1).match(Dj),v&&i>0&&(u*=Math.pow(lh,v.length))):Ij.test(e.charAt(c-1))?(u*=xj,w=e.slice(i,c-1).match(fC),w&&i>0&&(u*=Math.pow(lh,w.length))):(u*=Aj,i>0&&(u*=Math.pow(lh,c-i))),e.charAt(c)!==t.charAt(s)&&(u*=Lj)),(u<ah&&r.charAt(c-1)===n.charAt(s+1)||n.charAt(s+1)===n.charAt(s)&&r.charAt(c-1)!==n.charAt(s))&&(m=Jd(e,t,r,n,c+1,s+2,a),m*ah>u&&(u=m*ah)),u>h&&(h=u),c=r.indexOf(l,c+1);return a[o]=h,h}function Y1(e){return e.toLowerCase().replace(fC," ")}function Nj(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Jd(e,t,Y1(e),Y1(t),0,0,{})}function Gn(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 J1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Zn(...e){return t=>{let r=!1;const n=e.map(i=>{const s=J1(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():J1(e[i],null)}}}}function Mi(...e){return k.useCallback(Zn(...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 x.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 Oj(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:v,...w}=u,_=((d=m==null?void 0:m[e])==null?void 0:d[l])||o,g=k.useMemo(()=>w,Object.values(w));return x.jsx(_.Provider,{value:g,children:v})};c.displayName=s+"Provider";function h(u,m){var _;const v=((_=m==null?void 0:m[e])==null?void 0:_[l])||o,w=k.useContext(v);if(w)return w;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,Mj(i,...t)]}function Mj(...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 ma=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},jj=ip[" useId ".trim().toString()]||(()=>{}),Bj=0;function ln(e){const[t,r]=k.useState(jj());return ma(()=>{r(n=>n??String(Bj++))},[e]),t?`radix-${t}`:""}var Fj=ip[" useInsertionEffect ".trim().toString()]||ma;function zj({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,s,a]=$j({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 $j({defaultProp:e,onChange:t}){const[r,n]=k.useState(e),i=k.useRef(r),s=k.useRef(t);return Fj(()=>{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 Da(e){const t=Hj(e),r=k.forwardRef((n,i)=>{const{children:s,...a}=n,o=k.Children.toArray(s),l=o.find(Vj);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 x.jsx(t,{...a,ref:i,children:k.isValidElement(c)?k.cloneElement(c,void 0,h):null})}return x.jsx(t,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function Hj(e){const t=k.forwardRef((r,n)=>{const{children:i,...s}=r;if(k.isValidElement(i)){const a=Gj(i),o=Kj(s,i.props);return i.type!==k.Fragment&&(o.ref=n?Zn(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 Wj=Symbol("radix.slottable");function Vj(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wj}function Kj(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 Gj(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 qj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],hC=qj.reduce((e,t)=>{const r=Da(`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),x.jsx(l,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Yj(e,t){e&&Yp.flushSync(()=>e.dispatchEvent(t))}function ga(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 Jj(e,t=globalThis==null?void 0:globalThis.document){const r=ga(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 Xj="DismissableLayer",Xd="dismissableLayer.update",Qj="dismissableLayer.pointerDownOutside",Zj="dismissableLayer.focusOutside",X1,dC=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),pC=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:o,...l}=e,c=k.useContext(dC),[h,u]=k.useState(null),m=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=k.useState({}),w=Mi(t,E=>u(E)),_=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),d=_.indexOf(g),f=h?_.indexOf(h):-1,p=c.layersWithOutsidePointerEventsDisabled.size>0,y=f>=d,S=r7(E=>{const C=E.target,A=[...c.branches].some(T=>T.contains(C));!y||A||(i==null||i(E),a==null||a(E),E.defaultPrevented||o==null||o())},m),b=n7(E=>{const C=E.target;[...c.branches].some(T=>T.contains(C))||(s==null||s(E),a==null||a(E),E.defaultPrevented||o==null||o())},m);return Jj(E=>{f===c.layers.size-1&&(n==null||n(E),!E.defaultPrevented&&o&&(E.preventDefault(),o()))},m),k.useEffect(()=>{if(h)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(X1=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(h)),c.layers.add(h),Q1(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=X1)}},[h,m,r,c]),k.useEffect(()=>()=>{h&&(c.layers.delete(h),c.layersWithOutsidePointerEventsDisabled.delete(h),Q1())},[h,c]),k.useEffect(()=>{const E=()=>v({});return document.addEventListener(Xd,E),()=>document.removeEventListener(Xd,E)},[]),x.jsx(hC.div,{...l,ref:w,style:{pointerEvents:p?y?"auto":"none":void 0,...e.style},onFocusCapture:Gn(e.onFocusCapture,b.onFocusCapture),onBlurCapture:Gn(e.onBlurCapture,b.onBlurCapture),onPointerDownCapture:Gn(e.onPointerDownCapture,S.onPointerDownCapture)})});pC.displayName=Xj;var e7="DismissableLayerBranch",t7=k.forwardRef((e,t)=>{const r=k.useContext(dC),n=k.useRef(null),i=Mi(t,n);return k.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),x.jsx(hC.div,{...e,ref:i})});t7.displayName=e7;function r7(e,t=globalThis==null?void 0:globalThis.document){const r=ga(e),n=k.useRef(!1),i=k.useRef(()=>{});return k.useEffect(()=>{const s=o=>{if(o.target&&!n.current){let l=function(){mC(Qj,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 n7(e,t=globalThis==null?void 0:globalThis.document){const r=ga(e),n=k.useRef(!1);return k.useEffect(()=>{const i=s=>{s.target&&!n.current&&mC(Zj,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 Q1(){const e=new CustomEvent(Xd);document.dispatchEvent(e)}function mC(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?Yj(i,s):i.dispatchEvent(s)}var i7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],s7=i7.reduce((e,t)=>{const r=Da(`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),x.jsx(l,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),ch="focusScope.autoFocusOnMount",uh="focusScope.autoFocusOnUnmount",Z1={bubbles:!1,cancelable:!0},o7="FocusScope",gC=k.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=e,[o,l]=k.useState(null),c=ga(i),h=ga(s),u=k.useRef(null),m=Mi(t,_=>l(_)),v=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(n){let _=function(p){if(v.paused||!o)return;const y=p.target;o.contains(y)?u.current=y:Tn(u.current,{select:!0})},g=function(p){if(v.paused||!o)return;const y=p.relatedTarget;y!==null&&(o.contains(y)||Tn(u.current,{select:!0}))},d=function(p){if(document.activeElement===document.body)for(const S of p)S.removedNodes.length>0&&Tn(o)};document.addEventListener("focusin",_),document.addEventListener("focusout",g);const f=new MutationObserver(d);return o&&f.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",g),f.disconnect()}}},[n,o,v.paused]),k.useEffect(()=>{if(o){t0.add(v);const _=document.activeElement;if(!o.contains(_)){const d=new CustomEvent(ch,Z1);o.addEventListener(ch,c),o.dispatchEvent(d),d.defaultPrevented||(a7(h7(vC(o)),{select:!0}),document.activeElement===_&&Tn(o))}return()=>{o.removeEventListener(ch,c),setTimeout(()=>{const d=new CustomEvent(uh,Z1);o.addEventListener(uh,h),o.dispatchEvent(d),d.defaultPrevented||Tn(_??document.body,{select:!0}),o.removeEventListener(uh,h),t0.remove(v)},0)}}},[o,c,h,v]);const w=k.useCallback(_=>{if(!r&&!n||v.paused)return;const g=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,d=document.activeElement;if(g&&d){const f=_.currentTarget,[p,y]=l7(f);p&&y?!_.shiftKey&&d===y?(_.preventDefault(),r&&Tn(p,{select:!0})):_.shiftKey&&d===p&&(_.preventDefault(),r&&Tn(y,{select:!0})):d===f&&_.preventDefault()}},[r,n,v.paused]);return x.jsx(s7.div,{tabIndex:-1,...a,ref:m,onKeyDown:w})});gC.displayName=o7;function a7(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Tn(n,{select:t}),document.activeElement!==r)return}function l7(e){const t=vC(e),r=e0(t,e),n=e0(t.reverse(),e);return[r,n]}function vC(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 e0(e,t){for(const r of e)if(!c7(r,{upTo:t}))return r}function c7(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 u7(e){return e instanceof HTMLInputElement&&"select"in e}function Tn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&u7(e)&&t&&e.select()}}var t0=f7();function f7(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=r0(e,t),e.unshift(t)},remove(t){var r;e=r0(e,t),(r=e[0])==null||r.resume()}}}function r0(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function h7(e){return e.filter(t=>t.tagName!=="A")}var d7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],p7=d7.reduce((e,t)=>{const r=Da(`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),x.jsx(l,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),m7="Portal",_C=k.forwardRef((e,t)=>{var o;const{container:r,...n}=e,[i,s]=k.useState(!1);ma(()=>s(!0),[]);const a=r||i&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?sA.createPortal(x.jsx(p7.div,{...n,ref:t}),a):null});_C.displayName=m7;function g7(e,t){return k.useReducer((r,n)=>t[r][n]??r,e)}var Lu=e=>{const{present:t,children:r}=e,n=v7(t),i=typeof r=="function"?r({present:n.isPresent}):k.Children.only(r),s=Mi(n.ref,_7(i));return typeof r=="function"||n.isPresent?k.cloneElement(i,{ref:s}):null};Lu.displayName="Presence";function v7(e){const[t,r]=k.useState(),n=k.useRef(null),i=k.useRef(e),s=k.useRef("none"),a=e?"mounted":"unmounted",[o,l]=g7(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const c=Rl(n.current);s.current=o==="mounted"?c:"none"},[o]),ma(()=>{const c=n.current,h=i.current;if(h!==e){const m=s.current,v=Rl(c);e?l("MOUNT"):v==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),ma(()=>{if(t){let c;const h=t.ownerDocument.defaultView??window,u=v=>{const _=Rl(n.current).includes(CSS.escape(v.animationName));if(v.target===t&&_&&(l("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=Rl(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 Rl(e){return(e==null?void 0:e.animationName)||"none"}function _7(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 y7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ia=y7.reduce((e,t)=>{const r=Da(`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),x.jsx(l,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),fh=0;function w7(){k.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??n0()),document.body.insertAdjacentElement("beforeend",e[1]??n0()),fh++,()=>{fh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),fh--}},[])}function n0(){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 Hr=function(){return Hr=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},Hr.apply(this,arguments)};function yC(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 b7(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 ac="right-scroll-bar-position",lc="width-before-scroll-bar",S7="with-scroll-bars-hidden",C7="--removed-body-scroll-bar-size";function hh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function k7(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 x7=typeof window<"u"?k.useLayoutEffect:k.useEffect,i0=new WeakMap;function E7(e,t){var r=k7(null,function(n){return e.forEach(function(i){return hh(i,n)})});return x7(function(){var n=i0.get(r);if(n){var i=new Set(n),s=new Set(e),a=r.current;i.forEach(function(o){s.has(o)||hh(o,null)}),s.forEach(function(o){i.has(o)||hh(o,a)})}i0.set(r,e)},[e]),r}function A7(e){return e}function L7(e,t){t===void 0&&(t=A7);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 P7(e){e===void 0&&(e={});var t=L7(null);return t.options=Hr({async:!0,ssr:!1},e),t}var wC=function(e){var t=e.sideCar,r=yC(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,Hr({},r))};wC.isSideCarExport=!0;function T7(e,t){return e.useMedium(t),wC}var bC=P7(),dh=function(){},Pu=k.forwardRef(function(e,t){var r=k.useRef(null),n=k.useState({onScrollCapture:dh,onWheelCapture:dh,onTouchMoveCapture:dh}),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,v=e.noRelative,w=e.noIsolation,_=e.inert,g=e.allowPinchZoom,d=e.as,f=d===void 0?"div":d,p=e.gapMode,y=yC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=m,b=E7([r,t]),E=Hr(Hr({},y),i);return k.createElement(k.Fragment,null,h&&k.createElement(S,{sideCar:bC,removeScrollBar:c,shards:u,noRelative:v,noIsolation:w,inert:_,setCallbacks:s,allowPinchZoom:!!g,lockRef:r,gapMode:p}),a?k.cloneElement(k.Children.only(o),Hr(Hr({},E),{ref:b})):k.createElement(f,Hr({},E,{className:l,ref:b}),o))});Pu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Pu.classNames={fullWidth:lc,zeroRight:ac};var D7=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function I7(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=D7();return t&&e.setAttribute("nonce",t),e}function N7(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function R7(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var O7=function(){var e=0,t=null;return{add:function(r){e==0&&(t=I7())&&(N7(t,r),R7(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},M7=function(){var e=O7();return function(t,r){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},SC=function(){var e=M7(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},j7={left:0,top:0,right:0,gap:0},ph=function(e){return parseInt(e||"",10)||0},B7=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[ph(r),ph(n),ph(i)]},F7=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return j7;var t=B7(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])}},z7=SC(),ks="data-scroll-locked",$7=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(S7,` {
|
|
649
|
+
overflow: hidden `).concat(n,`;
|
|
650
|
+
padding-right: `).concat(o,"px ").concat(n,`;
|
|
651
|
+
}
|
|
652
|
+
body[`).concat(ks,`] {
|
|
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(ac,` {
|
|
666
|
+
right: `).concat(o,"px ").concat(n,`;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
.`).concat(lc,` {
|
|
670
|
+
margin-right: `).concat(o,"px ").concat(n,`;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
.`).concat(ac," .").concat(ac,` {
|
|
674
|
+
right: 0 `).concat(n,`;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
.`).concat(lc," .").concat(lc,` {
|
|
678
|
+
margin-right: 0 `).concat(n,`;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
body[`).concat(ks,`] {
|
|
682
|
+
`).concat(C7,": ").concat(o,`px;
|
|
683
|
+
}
|
|
684
|
+
`)},s0=function(){var e=parseInt(document.body.getAttribute(ks)||"0",10);return isFinite(e)?e:0},U7=function(){k.useEffect(function(){return document.body.setAttribute(ks,(s0()+1).toString()),function(){var e=s0()-1;e<=0?document.body.removeAttribute(ks):document.body.setAttribute(ks,e.toString())}},[])},H7=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;U7();var s=k.useMemo(function(){return F7(i)},[i]);return k.createElement(z7,{styles:$7(s,!t,i,r?"":"!important")})},Qd=!1;if(typeof window<"u")try{var Ol=Object.defineProperty({},"passive",{get:function(){return Qd=!0,!0}});window.addEventListener("test",Ol,Ol),window.removeEventListener("test",Ol,Ol)}catch{Qd=!1}var Gi=Qd?{passive:!1}:!1,W7=function(e){return e.tagName==="TEXTAREA"},CC=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!W7(e)&&r[t]==="visible")},V7=function(e){return CC(e,"overflowY")},K7=function(e){return CC(e,"overflowX")},o0=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=kC(e,n);if(i){var s=xC(e,n),a=s[1],o=s[2];if(a>o)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},G7=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},q7=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},kC=function(e,t){return e==="v"?V7(t):K7(t)},xC=function(e,t){return e==="v"?G7(t):q7(t)},Y7=function(e,t){return e==="h"&&t==="rtl"?-1:1},J7=function(e,t,r,n,i){var s=Y7(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 v=xC(e,o),w=v[0],_=v[1],g=v[2],d=_-g-s*w;(w||d)&&kC(e,o)&&(u+=d,m+=w);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},Ml=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},X7=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Q7=function(e){return`
|
|
685
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
686
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
687
|
+
`)},Z7=0,qi=[];function eB(e){var t=k.useRef([]),r=k.useRef([0,0]),n=k.useRef(),i=k.useState(Z7++)[0],s=k.useState(SC)[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 _=b7([e.lockRef.current],(e.shards||[]).map(l0),!0).filter(Boolean);return _.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),_.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var o=k.useCallback(function(_,g){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!a.current.allowPinchZoom;var d=Ml(_),f=r.current,p="deltaX"in _?_.deltaX:f[0]-d[0],y="deltaY"in _?_.deltaY:f[1]-d[1],S,b=_.target,E=Math.abs(p)>Math.abs(y)?"h":"v";if("touches"in _&&E==="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 O=o0(E,b);if(!O)return!0;if(O?S=E:(S=E==="v"?"h":"v",O=o0(E,b)),!O)return!1;if(!n.current&&"changedTouches"in _&&(p||y)&&(n.current=S),!S)return!0;var R=n.current||S;return J7(R,g,_,R==="h"?p:y)},[]),l=k.useCallback(function(_){var g=_;if(!(!qi.length||qi[qi.length-1]!==s)){var d="deltaY"in g?a0(g):Ml(g),f=t.current.filter(function(S){return S.name===g.type&&(S.target===g.target||g.target===S.shadowParent)&&X7(S.delta,d)})[0];if(f&&f.should){g.cancelable&&g.preventDefault();return}if(!f){var p=(a.current.shards||[]).map(l0).filter(Boolean).filter(function(S){return S.contains(g.target)}),y=p.length>0?o(g,p[0]):!a.current.noIsolation;y&&g.cancelable&&g.preventDefault()}}},[]),c=k.useCallback(function(_,g,d,f){var p={name:_,delta:g,target:d,should:f,shadowParent:tB(d)};t.current.push(p),setTimeout(function(){t.current=t.current.filter(function(y){return y!==p})},1)},[]),h=k.useCallback(function(_){r.current=Ml(_),n.current=void 0},[]),u=k.useCallback(function(_){c(_.type,a0(_),_.target,o(_,e.lockRef.current))},[]),m=k.useCallback(function(_){c(_.type,Ml(_),_.target,o(_,e.lockRef.current))},[]);k.useEffect(function(){return qi.push(s),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Gi),document.addEventListener("touchmove",l,Gi),document.addEventListener("touchstart",h,Gi),function(){qi=qi.filter(function(_){return _!==s}),document.removeEventListener("wheel",l,Gi),document.removeEventListener("touchmove",l,Gi),document.removeEventListener("touchstart",h,Gi)}},[]);var v=e.removeScrollBar,w=e.inert;return k.createElement(k.Fragment,null,w?k.createElement(s,{styles:Q7(i)}):null,v?k.createElement(H7,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function tB(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const rB=T7(bC,eB);var EC=k.forwardRef(function(e,t){return k.createElement(Pu,Hr({},e,{ref:t,sideCar:rB}))});EC.classNames=Pu.classNames;var nB=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Yi=new WeakMap,jl=new WeakMap,Bl={},mh=0,AC=function(e){return e&&(e.host||AC(e.parentNode))},iB=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=AC(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})},sB=function(e,t,r,n){var i=iB(t,Array.isArray(e)?e:[e]);Bl[r]||(Bl[r]=new WeakMap);var s=Bl[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 v=m.getAttribute(n),w=v!==null&&v!=="false",_=(Yi.get(m)||0)+1,g=(s.get(m)||0)+1;Yi.set(m,_),s.set(m,g),a.push(m),_===1&&w&&jl.set(m,!0),g===1&&m.setAttribute(r,"true"),w||m.setAttribute(n,"true")}catch(d){console.error("aria-hidden: cannot operate on ",m,d)}})};return h(t),o.clear(),mh++,function(){a.forEach(function(u){var m=Yi.get(u)-1,v=s.get(u)-1;Yi.set(u,m),s.set(u,v),m||(jl.has(u)||u.removeAttribute(n),jl.delete(u)),v||u.removeAttribute(r)}),mh--,mh||(Yi=new WeakMap,Yi=new WeakMap,jl=new WeakMap,Bl={})}},oB=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=nB(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),sB(n,i,r,"aria-hidden")):function(){return null}},Tu="Dialog",[LC]=Oj(Tu),[aB,Mr]=LC(Tu),PC=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]=zj({prop:n,defaultProp:i??!1,onChange:s,caller:Tu});return x.jsx(aB,{scope:t,triggerRef:o,contentRef:l,contentId:ln(),titleId:ln(),descriptionId:ln(),open:c,onOpenChange:h,onOpenToggle:k.useCallback(()=>h(u=>!u),[h]),modal:a,children:r})};PC.displayName=Tu;var TC="DialogTrigger",lB=k.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Mr(TC,r),s=Mi(t,i.triggerRef);return x.jsx(Ia.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":$m(i.open),...n,ref:s,onClick:Gn(e.onClick,i.onOpenToggle)})});lB.displayName=TC;var Fm="DialogPortal",[cB,DC]=LC(Fm,{forceMount:void 0}),IC=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,s=Mr(Fm,t);return x.jsx(cB,{scope:t,forceMount:r,children:k.Children.map(n,a=>x.jsx(Lu,{present:r||s.open,children:x.jsx(_C,{asChild:!0,container:i,children:a})}))})};IC.displayName=Fm;var Kc="DialogOverlay",NC=k.forwardRef((e,t)=>{const r=DC(Kc,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,s=Mr(Kc,e.__scopeDialog);return s.modal?x.jsx(Lu,{present:n||s.open,children:x.jsx(fB,{...i,ref:t})}):null});NC.displayName=Kc;var uB=Da("DialogOverlay.RemoveScroll"),fB=k.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Mr(Kc,r);return x.jsx(EC,{as:uB,allowPinchZoom:!0,shards:[i.contentRef],children:x.jsx(Ia.div,{"data-state":$m(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Li="DialogContent",RC=k.forwardRef((e,t)=>{const r=DC(Li,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,s=Mr(Li,e.__scopeDialog);return x.jsx(Lu,{present:n||s.open,children:s.modal?x.jsx(hB,{...i,ref:t}):x.jsx(dB,{...i,ref:t})})});RC.displayName=Li;var hB=k.forwardRef((e,t)=>{const r=Mr(Li,e.__scopeDialog),n=k.useRef(null),i=Mi(t,r.contentRef,n);return k.useEffect(()=>{const s=n.current;if(s)return oB(s)},[]),x.jsx(OC,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Gn(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Gn(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&s.preventDefault()}),onFocusOutside:Gn(e.onFocusOutside,s=>s.preventDefault())})}),dB=k.forwardRef((e,t)=>{const r=Mr(Li,e.__scopeDialog),n=k.useRef(!1),i=k.useRef(!1);return x.jsx(OC,{...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()}})}),OC=k.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,...a}=e,o=Mr(Li,r),l=k.useRef(null),c=Mi(t,l);return w7(),x.jsxs(x.Fragment,{children:[x.jsx(gC,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s,children:x.jsx(pC,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":$m(o.open),...a,ref:c,onDismiss:()=>o.onOpenChange(!1)})}),x.jsxs(x.Fragment,{children:[x.jsx(vB,{titleId:o.titleId}),x.jsx(yB,{contentRef:l,descriptionId:o.descriptionId})]})]})}),zm="DialogTitle",pB=k.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Mr(zm,r);return x.jsx(Ia.h2,{id:i.titleId,...n,ref:t})});pB.displayName=zm;var MC="DialogDescription",mB=k.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Mr(MC,r);return x.jsx(Ia.p,{id:i.descriptionId,...n,ref:t})});mB.displayName=MC;var jC="DialogClose",gB=k.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Mr(jC,r);return x.jsx(Ia.button,{type:"button",...n,ref:t,onClick:Gn(e.onClick,()=>i.onOpenChange(!1))})});gB.displayName=jC;function $m(e){return e?"open":"closed"}var BC="DialogTitleWarning",[p$,FC]=Rj(BC,{contentName:Li,titleName:zm,docsSlug:"dialog"}),vB=({titleId:e})=>{const t=FC(BC),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},_B="DialogDescriptionWarning",yB=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${FC(_B).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},wB=PC,bB=IC,SB=NC,CB=RC,kB=Symbol.for("react.lazy"),Gc=ip[" use ".trim().toString()];function xB(e){return typeof e=="object"&&e!==null&&"then"in e}function zC(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===kB&&"_payload"in e&&xB(e._payload)}function EB(e){const t=AB(e),r=k.forwardRef((n,i)=>{let{children:s,...a}=n;zC(s)&&typeof Gc=="function"&&(s=Gc(s._payload));const o=k.Children.toArray(s),l=o.find(PB);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 x.jsx(t,{...a,ref:i,children:k.isValidElement(c)?k.cloneElement(c,void 0,h):null})}return x.jsx(t,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function AB(e){const t=k.forwardRef((r,n)=>{let{children:i,...s}=r;if(zC(i)&&typeof Gc=="function"&&(i=Gc(i._payload)),k.isValidElement(i)){const a=DB(i),o=TB(s,i.props);return i.type!==k.Fragment&&(o.ref=n?Zn(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 LB=Symbol("radix.slottable");function PB(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===LB}function TB(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 DB(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 IB=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],si=IB.reduce((e,t)=>{const r=EB(`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),x.jsx(l,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),wo='[cmdk-group=""]',gh='[cmdk-group-items=""]',NB='[cmdk-group-heading=""]',$C='[cmdk-item=""]',c0=`${$C}:not([aria-disabled="true"])`,Zd="cmdk-item-select",ts="data-value",RB=(e,t,r)=>Nj(e,t,r),UC=k.createContext(void 0),Na=()=>k.useContext(UC),HC=k.createContext(void 0),Um=()=>k.useContext(HC),WC=k.createContext(void 0),VC=k.forwardRef((e,t)=>{let r=rs(()=>{var D,P;return{search:"",value:(P=(D=e.value)!=null?D:e.defaultValue)!=null?P:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=rs(()=>new Set),i=rs(()=>new Map),s=rs(()=>new Map),a=rs(()=>new Set),o=qC(e),{label:l,children:c,value:h,onValueChange:u,filter:m,shouldFilter:v,loop:w,disablePointerSelection:_=!1,vimBindings:g=!0,...d}=e,f=ln(),p=ln(),y=ln(),S=k.useRef(null),b=WB();Pi(()=>{if(h!==void 0){let D=h.trim();r.current.value=D,E.emit()}},[h]),Pi(()=>{b(6,M)},[]);let E=k.useMemo(()=>({subscribe:D=>(a.current.add(D),()=>a.current.delete(D)),snapshot:()=>r.current,setState:(D,P,$)=>{var Y,H,j,N;if(!Object.is(r.current[D],P)){if(r.current[D]=P,D==="search")R(),T(),b(1,O);else if(D==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let K=document.getElementById(y);K?K.focus():(Y=document.getElementById(f))==null||Y.focus()}if(b(7,()=>{var K;r.current.selectedItemId=(K=z())==null?void 0:K.id,E.emit()}),$||b(5,M),((H=o.current)==null?void 0:H.value)!==void 0){let K=P??"";(N=(j=o.current).onValueChange)==null||N.call(j,K);return}}E.emit()}},emit:()=>{a.current.forEach(D=>D())}}),[]),C=k.useMemo(()=>({value:(D,P,$)=>{var Y;P!==((Y=s.current.get(D))==null?void 0:Y.value)&&(s.current.set(D,{value:P,keywords:$}),r.current.filtered.items.set(D,A(P,$)),b(2,()=>{T(),E.emit()}))},item:(D,P)=>(n.current.add(D),P&&(i.current.has(P)?i.current.get(P).add(D):i.current.set(P,new Set([D]))),b(3,()=>{R(),T(),r.current.value||O(),E.emit()}),()=>{s.current.delete(D),n.current.delete(D),r.current.filtered.items.delete(D);let $=z();b(4,()=>{R(),($==null?void 0:$.getAttribute("id"))===D&&O(),E.emit()})}),group:D=>(i.current.has(D)||i.current.set(D,new Set),()=>{s.current.delete(D),i.current.delete(D)}),filter:()=>o.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>o.current.disablePointerSelection,listId:f,inputId:y,labelId:p,listInnerRef:S}),[]);function A(D,P){var $,Y;let H=(Y=($=o.current)==null?void 0:$.filter)!=null?Y:RB;return D?H(D,r.current.search,P):0}function T(){if(!r.current.search||o.current.shouldFilter===!1)return;let D=r.current.filtered.items,P=[];r.current.filtered.groups.forEach(Y=>{let H=i.current.get(Y),j=0;H.forEach(N=>{let K=D.get(N);j=Math.max(K,j)}),P.push([Y,j])});let $=S.current;U().sort((Y,H)=>{var j,N;let K=Y.getAttribute("id"),V=H.getAttribute("id");return((j=D.get(V))!=null?j:0)-((N=D.get(K))!=null?N:0)}).forEach(Y=>{let H=Y.closest(gh);H?H.appendChild(Y.parentElement===H?Y:Y.closest(`${gh} > *`)):$.appendChild(Y.parentElement===$?Y:Y.closest(`${gh} > *`))}),P.sort((Y,H)=>H[1]-Y[1]).forEach(Y=>{var H;let j=(H=S.current)==null?void 0:H.querySelector(`${wo}[${ts}="${encodeURIComponent(Y[0])}"]`);j==null||j.parentElement.appendChild(j)})}function O(){let D=U().find($=>$.getAttribute("aria-disabled")!=="true"),P=D==null?void 0:D.getAttribute(ts);E.setState("value",P||void 0)}function R(){var D,P,$,Y;if(!r.current.search||o.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let H=0;for(let j of n.current){let N=(P=(D=s.current.get(j))==null?void 0:D.value)!=null?P:"",K=(Y=($=s.current.get(j))==null?void 0:$.keywords)!=null?Y:[],V=A(N,K);r.current.filtered.items.set(j,V),V>0&&H++}for(let[j,N]of i.current)for(let K of N)if(r.current.filtered.items.get(K)>0){r.current.filtered.groups.add(j);break}r.current.filtered.count=H}function M(){var D,P,$;let Y=z();Y&&(((D=Y.parentElement)==null?void 0:D.firstChild)===Y&&(($=(P=Y.closest(wo))==null?void 0:P.querySelector(NB))==null||$.scrollIntoView({block:"nearest"})),Y.scrollIntoView({block:"nearest"}))}function z(){var D;return(D=S.current)==null?void 0:D.querySelector(`${$C}[aria-selected="true"]`)}function U(){var D;return Array.from(((D=S.current)==null?void 0:D.querySelectorAll(c0))||[])}function q(D){let P=U()[D];P&&E.setState("value",P.getAttribute(ts))}function ee(D){var P;let $=z(),Y=U(),H=Y.findIndex(N=>N===$),j=Y[H+D];(P=o.current)!=null&&P.loop&&(j=H+D<0?Y[Y.length-1]:H+D===Y.length?Y[0]:Y[H+D]),j&&E.setState("value",j.getAttribute(ts))}function W(D){let P=z(),$=P==null?void 0:P.closest(wo),Y;for(;$&&!Y;)$=D>0?UB($,wo):HB($,wo),Y=$==null?void 0:$.querySelector(c0);Y?E.setState("value",Y.getAttribute(ts)):ee(D)}let I=()=>q(U().length-1),L=D=>{D.preventDefault(),D.metaKey?I():D.altKey?W(1):ee(1)},B=D=>{D.preventDefault(),D.metaKey?q(0):D.altKey?W(-1):ee(-1)};return k.createElement(si.div,{ref:t,tabIndex:-1,...d,"cmdk-root":"",onKeyDown:D=>{var P;(P=d.onKeyDown)==null||P.call(d,D);let $=D.nativeEvent.isComposing||D.keyCode===229;if(!(D.defaultPrevented||$))switch(D.key){case"n":case"j":{g&&D.ctrlKey&&L(D);break}case"ArrowDown":{L(D);break}case"p":case"k":{g&&D.ctrlKey&&B(D);break}case"ArrowUp":{B(D);break}case"Home":{D.preventDefault(),q(0);break}case"End":{D.preventDefault(),I();break}case"Enter":{D.preventDefault();let Y=z();if(Y){let H=new Event(Zd);Y.dispatchEvent(H)}}}}},k.createElement("label",{"cmdk-label":"",htmlFor:C.inputId,id:C.labelId,style:KB},l),Du(e,D=>k.createElement(HC.Provider,{value:E},k.createElement(UC.Provider,{value:C},D))))}),KC=k.forwardRef((e,t)=>{var r,n;let i=ln(),s=k.useRef(null),a=k.useContext(WC),o=Na(),l=qC(e),c=(n=(r=l.current)==null?void 0:r.forceMount)!=null?n:a==null?void 0:a.forceMount;Pi(()=>{if(!c)return o.item(i,a==null?void 0:a.id)},[c]);let h=YC(i,s,[e.value,e.children,s],e.keywords),u=Um(),m=ei(b=>b.value&&b.value===h.current),v=ei(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(Zd,w),()=>b.removeEventListener(Zd,w)},[v,e.onSelect,e.disabled]);function w(){var b,E;_(),(E=(b=l.current).onSelect)==null||E.call(b,h.current)}function _(){u.setState("value",h.current,!0)}if(!v)return null;let{disabled:g,value:d,onSelect:f,forceMount:p,keywords:y,...S}=e;return k.createElement(si.div,{ref:Zn(s,t),...S,id:i,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!m,"data-disabled":!!g,"data-selected":!!m,onPointerMove:g||o.getDisablePointerSelection()?void 0:_,onClick:g?void 0:w},e.children)}),OB=k.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:i,...s}=e,a=ln(),o=k.useRef(null),l=k.useRef(null),c=ln(),h=Na(),u=ei(v=>i||h.filter()===!1?!0:v.search?v.filtered.groups.has(a):!0);Pi(()=>h.group(a),[]),YC(a,o,[e.value,e.heading,l]);let m=k.useMemo(()=>({id:a,forceMount:i}),[i]);return k.createElement(si.div,{ref:Zn(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),Du(e,v=>k.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?c:void 0},k.createElement(WC.Provider,{value:m},v))))}),MB=k.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,i=k.useRef(null),s=ei(a=>!a.search);return!r&&!s?null:k.createElement(si.div,{ref:Zn(i,t),...n,"cmdk-separator":"",role:"separator"})}),jB=k.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,i=e.value!=null,s=Um(),a=ei(c=>c.search),o=ei(c=>c.selectedItemId),l=Na();return k.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),k.createElement(si.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=ei(c=>c.selectedItemId),l=Na();return k.useEffect(()=>{if(a.current&&s.current){let c=a.current,h=s.current,u,m=new ResizeObserver(()=>{u=requestAnimationFrame(()=>{let v=c.offsetHeight;h.style.setProperty("--cmdk-list-height",v.toFixed(1)+"px")})});return m.observe(c),()=>{cancelAnimationFrame(u),m.unobserve(c)}}},[]),k.createElement(si.div,{ref:Zn(s,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":o,"aria-label":n,id:l.listId},Du(e,c=>k.createElement("div",{ref:Zn(a,l.listInnerRef),"cmdk-list-sizer":""},c)))}),BB=k.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:i,contentClassName:s,container:a,...o}=e;return k.createElement(wB,{open:r,onOpenChange:n},k.createElement(bB,{container:a},k.createElement(SB,{"cmdk-overlay":"",className:i}),k.createElement(CB,{"aria-label":e.label,"cmdk-dialog":"",className:s},k.createElement(VC,{ref:t,...o}))))}),FB=k.forwardRef((e,t)=>ei(r=>r.filtered.count===0)?k.createElement(si.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),zB=k.forwardRef((e,t)=>{let{progress:r,children:n,label:i="Loading...",...s}=e;return k.createElement(si.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Du(e,a=>k.createElement("div",{"aria-hidden":!0},a)))}),$B=Object.assign(VC,{List:GC,Item:KC,Input:jB,Group:OB,Separator:MB,Dialog:BB,Empty:FB,Loading:zB});function UB(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function HB(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function qC(e){let t=k.useRef(e);return Pi(()=>{t.current=e}),t}var Pi=typeof window>"u"?k.useEffect:k.useLayoutEffect;function rs(e){let t=k.useRef();return t.current===void 0&&(t.current=e()),t}function ei(e){let t=Um(),r=()=>e(t.snapshot());return k.useSyncExternalStore(t.subscribe,r,r)}function YC(e,t,r,n=[]){let i=k.useRef(),s=Na();return Pi(()=>{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(ts,o),i.current=o}),i}var WB=()=>{let[e,t]=k.useState(),r=rs(()=>new Map);return Pi(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,i)=>{r.current.set(n,i),t({})}};function VB(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Du({asChild:e,children:t},r){return e&&k.isValidElement(t)?k.cloneElement(VB(t),{ref:t.ref},r(t.props.children)):r(t)}var KB={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function GB({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:v,filteredCommands:w,setInput:_,setCommandMenuOpen:g,setCommandQuery:d,inputRef:f,commandSelection:p,triggerAttachmentPicker:y,attachmentSession:S,attachmentsLoading:b,isMobileLayout:E,uploadInputRef:C,onUploadAttachments:A,input:T,handleInputChange:O,handleComposerKeyDown:R,onPasteAttachments:M,canInterrupt:z,interruptTurn:U,connected:q,modelSelectorVisible:ee,modelOptions:W,selectedModel:I,modelLoading:L,modelDisabled:B,modelError:D,onModelChange:P,isCodexReady:$,interactionBlocked:Y,attachmentsError:H}){return t!=="chat"?null:x.jsx("form",{className:`composer composer--sticky ${r?"is-dragging":""}`,onSubmit:n,onDragEnter:i,onDragOver:s,onDragLeave:a,onDrop:o,ref:l,children:x.jsxs("div",{className:"composer-inner",children:[c.length?x.jsx("div",{className:"composer-attachments","aria-label":e("Selected attachments"),children:c.map(j=>{const N=(j==null?void 0:j.name)||(j==null?void 0:j.path)||"",K=(j==null?void 0:j.path)||(j==null?void 0:j.name)||N,V=h(j,e),X=j!=null&&j.lineCount||j!=null&&j.lines?e("{{count}} lines",{count:j.lineCount||j.lines}):u(j==null?void 0:j.size,e);return x.jsxs("div",{className:"attachment-card",children:[x.jsxs("div",{className:"attachment-card-body",children:[x.jsx("div",{className:"attachment-card-title",children:N}),X?x.jsx("div",{className:"attachment-card-meta",children:X}):null]}),x.jsxs("div",{className:"attachment-card-footer",children:[x.jsx("span",{className:"attachment-card-type",children:V}),x.jsx("button",{type:"button",className:"attachment-card-remove","aria-label":e("Remove {{label}}",{label:N}),onClick:()=>m((j==null?void 0:j.path)||(j==null?void 0:j.name)),children:x.jsx(ze,{icon:vi})})]})]},K)})}):null,v&&x.jsx("div",{className:"composer-command-menu",children:x.jsx($B,{className:"command-menu",shouldFilter:!1,children:x.jsx(GC,{children:w.length?w.map(j=>x.jsxs(KC,{onSelect:()=>{var N;_(j.insert),g(!1),d(""),(N=f.current)==null||N.focus()},className:`command-item${j.id===p?" is-selected":""}`,children:[x.jsx("span",{className:"command-item-label",children:j.label}),x.jsx("span",{className:"command-item-desc",children:j.description})]},j.id)):x.jsx("div",{className:"command-empty",children:e("No commands found.")})})})}),x.jsxs("div",{className:"composer-main",children:[x.jsxs("button",{type:"button",className:"icon-button composer-attach-button","aria-label":e("Add attachment"),onClick:y,disabled:!S||b,children:["+",E?x.jsx("span",{className:"attachment-badge",children:c.length}):null]}),x.jsx("input",{ref:C,type:"file",multiple:!0,onChange:A,disabled:!S||b,className:"visually-hidden"}),x.jsx("textarea",{className:"composer-input",value:T,onChange:O,onKeyDown:R,onPaste:M,placeholder:e("Write your message…"),rows:1,ref:f}),ee?x.jsxs("select",{className:"composer-model-select",value:I||"",onChange:j=>P==null?void 0:P(j.target.value),disabled:B,"aria-label":e("Model"),title:D||e("Model"),children:[L?x.jsx("option",{value:"",children:e("Loading...")}):null,x.jsx("option",{value:"",children:e("Default model")}),(Array.isArray(W)?W:[]).map(j=>x.jsx("option",{value:j.model||"",children:j.displayName||j.model||""},j.id||j.model))]}):null,z?x.jsx("button",{type:"button",className:"primary stop-button",onClick:U,"aria-label":e("Stop"),title:e("Stop"),children:x.jsx("span",{className:"stop-icon",children:"⏹"})}):x.jsx("button",{type:"submit",className:"primary send-button",disabled:!q||!T.trim()||!$||Y,"aria-label":e("Send"),title:e("Send"),children:x.jsx("span",{className:"send-icon",children:"➤"})})]}),H&&x.jsx("div",{className:"attachments-error composer-attachments-error",children:H})]})})}function qB({t:e,activePane:t,handleViewSelect:r,handleDiffSelect:n,terminalEnabled:i,hasMessages:s,handleClearChat:a}){return t==="settings"?null:x.jsxs("div",{className:"chat-toolbar",role:"toolbar","aria-label":e("Chat tools"),children:[x.jsxs("div",{className:"chat-toolbar-group",children:[x.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:[x.jsx("span",{className:"chat-toolbar-icon-wrap","aria-hidden":"true",children:x.jsx("span",{className:"chat-toolbar-icon",children:x.jsx(ze,{icon:x6})})}),x.jsx("span",{className:"chat-toolbar-label",children:e("Messages")})]}),x.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:[x.jsx("span",{className:"chat-toolbar-icon-wrap","aria-hidden":"true",children:x.jsx("span",{className:"chat-toolbar-icon",children:x.jsx(ze,{icon:I6})})}),x.jsx("span",{className:"chat-toolbar-label",children:e("Diff")})]}),x.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:[x.jsx("span",{className:"chat-toolbar-icon-wrap","aria-hidden":"true",children:x.jsx("span",{className:"chat-toolbar-icon",children:x.jsx(ze,{icon:T6})})}),x.jsx("span",{className:"chat-toolbar-label",children:e("Explorer")})]}),x.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:!i,children:[x.jsx("span",{className:"chat-toolbar-icon-wrap","aria-hidden":"true",children:x.jsx("span",{className:"chat-toolbar-icon",children:x.jsx(ze,{icon:S6})})}),x.jsx("span",{className:"chat-toolbar-label",children:e("Terminal")})]})]}),x.jsx("div",{className:"chat-toolbar-divider"}),x.jsx("div",{className:"chat-toolbar-group",children:x.jsxs("button",{type:"button",className:"chat-toolbar-button is-danger",onClick:()=>a(),"aria-label":e("Clear"),title:e("Clear"),disabled:!s,children:[x.jsx("span",{className:"chat-toolbar-icon-wrap","aria-hidden":"true",children:x.jsx("span",{className:"chat-toolbar-icon","aria-hidden":"true",children:x.jsx(ze,{icon:w6})})}),x.jsx("span",{className:"chat-toolbar-label",children:e("Clear")})]})})]})}function YB({t:e,input:t,setInput:r,inputRef:n,handleSendMessageRef:i,attachmentSession:s,apiFetch:a,normalizeAttachments:o,setDraftAttachments:l,draftAttachments:c,setAttachmentsLoading:h,setAttachmentsError:u,showToast:m,uploadInputRef:v,attachmentsLoading:w,conversationRef:_,composerRef:g,isMobileLayout:d}){const[f,p]=k.useState(!1),[y,S]=k.useState(""),[b,E]=k.useState(null),[C,A]=k.useState(!1),T=k.useRef(0),O=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"},{id:"annotation",label:"/annotation",description:e("Toggle annotation mode (EXPERIMENTAL)"),insert:"/annotation on"}],[e]),R=k.useMemo(()=>{const H=y.trim().toLowerCase();return H?O.filter(j=>j.label.toLowerCase().includes(H)):O},[O,y]);k.useEffect(()=>{if(!f){E(null);return}if(!R.length){E(null);return}E(H=>R.some(j=>j.id===H)?H:R[0].id)},[f,R]);const M=k.useCallback(H=>{const{value:j}=H.target;r(j),j.startsWith("/")&&!j.includes(" ")?(p(!0),S(j.slice(1))):(p(!1),S("")),n.current&&(n.current.style.height="auto",n.current.style.height=`${n.current.scrollHeight}px`)},[n,r]),z=k.useCallback(H=>{var j,N;if(f){if(H.key==="Escape"){H.preventDefault(),p(!1);return}if(H.key==="ArrowDown"){if(H.preventDefault(),!R.length)return;const K=R.findIndex(X=>X.id===b),V=K===-1||K===R.length-1?0:K+1;E(R[V].id);return}if(H.key==="ArrowUp"){if(H.preventDefault(),!R.length)return;const K=R.findIndex(X=>X.id===b),V=K<=0?R.length-1:K-1;E(R[V].id);return}if(H.key==="Enter"&&!H.shiftKey&&b){H.preventDefault();const K=R.find(V=>V.id===b);K&&(r(K.insert),p(!1),S(""),(j=n.current)==null||j.focus());return}}H.isComposing||H.key==="Enter"&&!H.shiftKey&&(H.preventDefault(),(N=i.current)==null||N.call(i))},[f,R,b,i,n,r]);k.useEffect(()=>{n.current&&(n.current.style.height="auto",n.current.style.height=`${n.current.scrollHeight}px`)},[t,d,n]),k.useEffect(()=>{if(!_.current||!g.current)return;const H=()=>{if(!_.current||!g.current)return;const N=g.current.getBoundingClientRect(),K=d?12:16;_.current.style.setProperty("--composer-space",`${Math.ceil(N.height+K)}px`)};H();let j;return typeof ResizeObserver<"u"&&(j=new ResizeObserver(H),j.observe(g.current)),window.addEventListener("resize",H),()=>{window.removeEventListener("resize",H),j&&j.disconnect()}},[d,c.length,_,g]);const U=k.useCallback(async H=>{if(!(!H.length||!(s!=null&&s.sessionId)))try{h(!0),u("");const j=new FormData;H.forEach(X=>j.append("files",X));const N=await a(`/api/v1/sessions/${encodeURIComponent(s.sessionId)}/attachments/upload`,{method:"POST",body:j});if(!N.ok)throw new Error("Upload failed.");const K=await N.json(),V=o(K.files||[]);l(X=>[...X,...V])}catch(j){u(j.message||e("Unable to upload attachments."))}finally{h(!1)}},[a,s==null?void 0:s.sessionId,o,u,h,l,e]),q=k.useCallback(async()=>{var H;if(!(s!=null&&s.sessionId)){m(e("Session not found."),"error");return}if(!((H=navigator.mediaDevices)!=null&&H.getDisplayMedia)){m(e("Screenshot failed."),"error");return}try{const j=await navigator.mediaDevices.getDisplayMedia({video:{cursor:"never"},audio:!1}),N=document.createElement("video");N.srcObject=j,await new Promise(ge=>{N.onloadedmetadata=()=>ge()}),await N.play();const K=document.createElement("canvas");K.width=N.videoWidth||1,K.height=N.videoHeight||1;const V=K.getContext("2d");if(!V)throw new Error("Canvas unavailable");V.drawImage(N,0,0,K.width,K.height),j.getTracks().forEach(ge=>ge.stop());const X=await new Promise((ge,ae)=>{K.toBlob(Se=>Se?ge(Se):ae(new Error("Blob failed")),"image/png")}),re=`screenshot-${Date.now()}.png`,ce=new File([X],re,{type:"image/png"});await U([ce]),m(e("Screenshot captured."))}catch(j){m((j==null?void 0:j.message)||e("Screenshot failed."),"error")}},[s==null?void 0:s.sessionId,m,e,U]),ee=k.useCallback(async H=>{const j=Array.from(H.target.files||[]);await U(j),H.target.value=""},[U]),W=k.useCallback(async H=>{var K;if(!(s!=null&&s.sessionId))return;const N=Array.from(((K=H.clipboardData)==null?void 0:K.items)||[]).filter(V=>V.kind==="file").map(V=>V.getAsFile()).filter(Boolean);N.length&&(H.preventDefault(),await U(N))},[s==null?void 0:s.sessionId,U]),I=k.useCallback(H=>{var j,N;s!=null&&s.sessionId&&(N=(j=H.dataTransfer)==null?void 0:j.types)!=null&&N.includes("Files")&&H.preventDefault()},[s==null?void 0:s.sessionId]),L=k.useCallback(H=>{var j,N;s!=null&&s.sessionId&&(N=(j=H.dataTransfer)==null?void 0:j.types)!=null&&N.includes("Files")&&(H.preventDefault(),T.current+=1,A(!0))},[s==null?void 0:s.sessionId]),B=k.useCallback(H=>{var j,N;s!=null&&s.sessionId&&(N=(j=H.dataTransfer)==null?void 0:j.types)!=null&&N.includes("Files")&&(H.preventDefault(),T.current=Math.max(0,T.current-1),T.current===0&&A(!1))},[s==null?void 0:s.sessionId]),D=k.useCallback(async H=>{var N;if(!(s!=null&&s.sessionId))return;H.preventDefault(),H.stopPropagation(),T.current=0,A(!1);const j=Array.from(((N=H.dataTransfer)==null?void 0:N.files)||[]);j.length&&await U(j)},[s==null?void 0:s.sessionId,U]),P=k.useCallback(H=>{H&&l(j=>j.filter(N=>((N==null?void 0:N.path)||(N==null?void 0:N.name))!==H))},[l]),$=k.useCallback(()=>{!s||w||requestAnimationFrame(()=>{var H;(H=v.current)==null||H.click()})},[s,w,v]),Y=k.useCallback(H=>{var j;H.preventDefault(),(j=i.current)==null||j.call(i)},[i]);return{commandMenuOpen:f,setCommandMenuOpen:p,commandQuery:y,setCommandQuery:S,commandSelection:b,filteredCommands:R,isDraggingAttachments:C,handleInputChange:M,handleComposerKeyDown:z,onSubmit:Y,onUploadAttachments:ee,onPasteAttachments:W,onDragOverComposer:I,onDragEnterComposer:L,onDragLeaveComposer:B,onDropAttachments:D,removeDraftAttachment:P,triggerAttachmentPicker:$,captureScreenshot:q}}function JB({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:v,requestWorktreeMessages:w,applyWorktreesList:_,resyncSession:g,t:d,setStatus:f,setConnected:p,setAppServerReady:y,setHasMainWorktreeStatus:S,setMessages:b,setProcessing:E,setActivity:C,setCurrentTurnId:A,setMainTaskLabel:T,setModelLoading:O,setModelError:R,setModels:M,setProviderModelState:z,setSelectedModel:U,setSelectedReasoningEffort:q,setRepoDiff:ee,setRpcLogs:W,setWorktrees:I,setPaneByTab:L,setLogFilterByTab:B,setActiveWorktreeId:D,activeWorktreeIdRef:P,extractVibe80Task:$,extractFirstLine:Y,getItemActivityLabel:H,maybeNotify:j,normalizeAttachments:N,loadRepoLastCommit:K,loadWorktreeLastCommit:V,openAiLoginRequest:X,setOpenAiLoginRequest:re,connected:ce}){k.useEffect(()=>{if(!e||!t)return;let ge=!0,ae=null;const Se=()=>{n.current&&(clearTimeout(n.current),n.current=null)},ye=()=>{a.current&&(clearInterval(a.current),a.current=null)},We=()=>{ae&&(clearInterval(ae),ae=null)},Ge=()=>{ye(),o.current=Date.now(),a.current=setInterval(()=>{const ke=r.current;if(!ke||ke.readyState!==WebSocket.OPEN)return;if(document.hidden){o.current=Date.now();return}if(Date.now()-o.current>15e3){ke.close();return}ke.send(JSON.stringify({type:"ping"}))},1e4)},Re=()=>{We();const ke=()=>{const Ie=r.current;if(!Ie||Ie.readyState!==WebSocket.OPEN)return;const te=(P==null?void 0:P.current)||"main";Ie.send(JSON.stringify({type:"wake_up",worktreeId:te}))};ke(),ae=setInterval(ke,60*1e3)},Ne=()=>{if(!ge)return;const ke=Math.min(i.current+1,6);i.current=ke;const oe=Math.min(500*2**(ke-1),1e4),F=Math.floor(Math.random()*250);Se(),n.current=setTimeout(()=>{qe()},oe+F)},qe=()=>{if(!ge)return;f(d("Connecting..."));const ke=new WebSocket(`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/ws?session=${encodeURIComponent(e)}`);r.current=ke;let Ie=!1;const te=()=>r.current===ke;ke.addEventListener("open",()=>{te()&&ke.send(JSON.stringify({type:"auth",token:t}))}),ke.addEventListener("close",()=>{te()&&(p(!1),f(d("Disconnected")),y(!1),ye(),We(),s.current||Ne())}),ke.addEventListener("error",()=>{te()&&ke.close()}),ke.addEventListener("message",oe=>{var ne,Me,le;if(!te())return;let F;try{F=JSON.parse(oe.data)}catch{return}const me=typeof F.worktreeId=="string"?F.worktreeId:"",pe=me.length>0,Oe=me==="main",Ae=pe&&!Oe,Te=Oe||!pe;if(Te&&(F.type==="assistant_delta"||F.type==="command_execution_delta"||F.type==="command_execution_completed"||F.type==="item_started")&&(E(G=>G||!0),C(d("Processing..."))),F.type==="auth_ok"){if(!Ie){Ie=!0,i.current=0,Se(),p(!0),f(d("Connected")),Ge(),Re(),g(),m(),v();const G=r.current;if(G&&G.readyState===WebSocket.OPEN){const J=(P==null?void 0:P.current)||"main";G.send(JSON.stringify({type:"wake_up",worktreeId:J}))}}return}if(Ie){if(F.type==="pong"&&(o.current=Date.now()),F.type==="status"&&(f(F.message),F.provider==="codex"&&y(!1)),F.type==="ready"&&(f(d("Ready")),y(!0)),F.type==="provider_status"&&F.provider==="codex"&&y(F.status==="ready"),Te&&F.type==="assistant_delta"){if(typeof F.delta!="string")return;b(G=>{const J=[...G],Q=J.findIndex(ue=>(ue==null?void 0:ue.id)===F.itemId);if(Q===-1)return J.push({id:F.itemId,role:"assistant",text:F.delta,isStreaming:!0}),J;const ie={...J[Q]};return ie.text+=F.delta,ie.isStreaming=!0,J[Q]=ie,J})}if(Te&&F.type==="assistant_message"){if(typeof F.text!="string")return;const G=$(F.text);G&&T(G),j({id:F.itemId,text:F.text}),b(J=>{const Q=[...J],ie=Q.findIndex(ue=>(ue==null?void 0:ue.id)===F.itemId);return ie===-1?(Q.push({id:F.itemId,role:"assistant",text:F.text,isStreaming:!1}),Q):(Q[ie]={...Q[ie],text:F.text,isStreaming:!1},Q)})}if(Te&&F.type==="action_request"){if(!F.id)return;b(G=>{const J=[...G];return J.findIndex(ie=>(ie==null?void 0:ie.id)===F.id)===-1&&J.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}}),J})}if(Te&&F.type==="action_result"){if(!F.id)return;b(G=>{const J=[...G],Q=J.findIndex(ue=>(ue==null?void 0:ue.id)===F.id),ie={id:F.id,role:"assistant",type:"action_result",text:F.text||"",action:{request:F.request,arg:F.arg,status:F.status,output:F.output}};return Q===-1?J.push(ie):J[Q]={...J[Q],...ie},J}),(F.request==="run"||F.request==="git")&&K()}if(Te&&F.type==="backlog_view"){if(!F.id)return;b(G=>{const J=[...G];return J.findIndex(ie=>(ie==null?void 0:ie.id)===F.id)===-1&&J.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}}),J})}if(Te&&F.type==="command_execution_delta"){if(typeof F.delta!="string")return;b(G=>{const J=[...G],Q=c.get(F.itemId);if(Q===void 0){const ue={id:F.itemId,role:"commandExecution",command:d("Command"),output:F.delta,isExpandable:!0,status:"running"};return c.set(F.itemId,J.length),J.push(ue),J}const ie={...J[Q]};return ie.output=`${ie.output||""}${F.delta}`,ie.isExpandable=!0,J[Q]=ie,J})}if(Te&&F.type==="command_execution_completed"){const G=F.item,J=F.itemId||(G==null?void 0:G.id);if(!J)return;b(Q=>{var je;const ie=[...Q],ue=c.get(J),be=((je=G==null?void 0:G.commandActions)==null?void 0:je.command)||(G==null?void 0:G.command)||d("Command");if(ue===void 0){const rt={id:J,role:"commandExecution",command:be,output:(G==null?void 0:G.aggregatedOutput)||"",isExpandable:!0,status:"completed"};return c.set(J,ie.length),ie.push(rt),ie}const we={...ie[ue]};return we.command=be,we.output=(G==null?void 0:G.aggregatedOutput)||we.output||"",we.isExpandable=!0,we.status="completed",ie[ue]=we,ie})}if(Te&&F.type==="turn_error"&&(f(d("Error: {{message}}",{message:F.message})),A(null),T("")),Te&&F.type==="agent_reasoning"){const G=Y(F.text);G&&T(G)}if(Te&&F.type==="error"&&(f(F.message||d("Unexpected error")),O(!1),R(F.message||d("Unexpected error"))),Ae&&F.type==="error"&&I(G=>{const J=new Map(G),Q=J.get(me);return Q?(J.set(me,{...Q,modelLoading:!1,modelError:F.message||d("Unexpected error")}),J):G}),Te&&F.type==="turn_started"&&A(F.turnId||null),Te&&F.type==="turn_completed"){const G=((ne=F==null?void 0:F.turn)==null?void 0:ne.error)||(F==null?void 0:F.error)||null;if((G==null?void 0:G.codexErrorInfo)==="usageLimitExceeded"){const Q=`usage-limit-${F.turnId||((Me=F.turn)==null?void 0:Me.id)||Date.now()}`,ie=(typeof G=="string"?G:G==null?void 0:G.message)||d("Usage limit reached. Please try again later.");b(ue=>ue.some(be=>be.id===Q)?ue:[...ue,{id:Q,role:"assistant",text:`⚠️ ${ie}`}])}A(null),T(""),K()}if(Te&&F.type==="repo_diff"&&ee({status:F.status||"",diff:F.diff||""}),Te&&F.type==="model_list"){const G=Array.isArray(F.models)?F.models:[];M(G),F.provider&&z(Q=>({...Q,[F.provider]:{models:G,loading:!1,error:""}}));const J=G.find(Q=>Q.isDefault);J!=null&&J.model&&U(J.model),J!=null&&J.defaultReasoningEffort&&q(J.defaultReasoningEffort),O(!1),R("")}if(Ae&&F.type==="model_list"){const G=Array.isArray(F.models)?F.models:[];I(J=>{const Q=new Map(J),ie=Q.get(me);if(!ie)return J;const ue=G.find(we=>we.isDefault),be=ie.model||(ue==null?void 0:ue.model)||null;return Q.set(me,{...ie,models:G,model:be,modelLoading:!1,modelError:""}),Q})}if(Te&&F.type==="model_set"&&(U(F.model||""),F.reasoningEffort!==void 0&&q(F.reasoningEffort||""),O(!1),R("")),Ae&&F.type==="model_set"&&I(G=>{const J=new Map(G),Q=J.get(me);return Q?(J.set(me,{...Q,model:F.model||null,reasoningEffort:F.reasoningEffort??Q.reasoningEffort??null,modelLoading:!1,modelError:""}),J):G}),Te&&F.type==="rpc_log"){if(!h.current)return;F.entry&&W(G=>[...G,F.entry])}if(Te&&F.type==="session_sync"){if(!(F!=null&&F.session))return;const G=F.session;b((G.messages||[]).map((J,Q)=>({...J,id:(J==null?void 0:J.id)||`history-${Q}`,attachments:N((J==null?void 0:J.attachments)||[]),toolResult:J==null?void 0:J.toolResult}))),ee(G.repoDiff||{status:"",diff:""}),G.provider&&z(J=>({...J,[G.provider]:{models:G.models||[],loading:!1,error:""}}))}if(Te&&F.type==="worktrees_list"&&_(F.worktrees||[]),Te&&F.type==="worktree_messages_sync"){if(F.worktreeId==="main"){u(F.messages||[]);return}I(G=>{const J=new Map(G),Q=J.get(F.worktreeId);if(Q){const ie=(F.messages||[]).map((we,je)=>({...we,id:(we==null?void 0:we.id)||`history-${je}`,attachments:N((we==null?void 0:we.attachments)||[]),toolResult:we==null?void 0:we.toolResult})),ue=new Set(Q.messages.map(we=>we==null?void 0:we.id).filter(Boolean)),be=[...Q.messages];ie.forEach(we=>{we!=null&&we.id&&ue.has(we.id)||(we!=null&&we.id&&ue.add(we.id),be.push(we))}),J.set(F.worktreeId,{...Q,messages:be,status:F.status??Q.status})}return J})}if(F.type==="worktree_diff"&&I(G=>{const J=new Map(G),Q=J.get(F.worktreeId);return Q&&J.set(F.worktreeId,{...Q,diff:{status:F.status,diff:F.diff}}),J}),Ae&&(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 G=F.worktreeId;if((F.type==="assistant_delta"||F.type==="command_execution_delta"||F.type==="command_execution_completed"||F.type==="item_started")&&I(J=>{const Q=new Map(J),ie=Q.get(G);return ie&&ie.status==="ready"&&Q.set(G,{...ie,status:"processing"}),Q}),F.type==="turn_started"&&I(J=>{const Q=new Map(J),ie=Q.get(G);return ie&&Q.set(G,{...ie,currentTurnId:F.turnId,activity:d("Processing...")}),Q}),F.type==="action_request"){if(!F.id)return;I(J=>{const Q=new Map(J),ie=Q.get(G);return ie&&Q.set(G,{...ie,messages:[...ie.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}}]}),Q})}if(F.type==="action_result"){if(!F.id)return;I(J=>{const Q=new Map(J),ie=Q.get(G)||{id:G,name:G,branchName:"",provider:"codex",status:"processing",messages:[],models:[],modelLoading:!1,modelError:"",activity:"",currentTurnId:null};return ie.messages.some(ue=>(ue==null?void 0:ue.id)===F.id)?J:(Q.set(G,{...ie,messages:[...ie.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}}]}),Q)}),(F.request==="run"||F.request==="git")&&V(G)}if(F.type==="backlog_view"){if(!F.id)return;I(J=>{const Q=new Map(J),ie=Q.get(G);return ie&&Q.set(G,{...ie,messages:[...ie.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}}]}),Q})}if((F.type==="turn_completed"||F.type==="turn_error")&&I(J=>{const Q=new Map(J),ie=Q.get(G);return ie&&Q.set(G,{...ie,currentTurnId:null,activity:"",taskLabel:""}),Q}),F.type==="turn_completed"){const J=((le=F==null?void 0:F.turn)==null?void 0:le.error)||(F==null?void 0:F.error)||null;if((J==null?void 0:J.codexErrorInfo)==="usageLimitExceeded"){const ie=`usage-limit-${F.turnId||Date.now()}`,ue=(typeof J=="string"?J:J==null?void 0:J.message)||d("Usage limit reached. Please try again later.");I(be=>{const we=new Map(be),je=we.get(G);return!je||je.messages.some(rt=>rt.id===ie)?be:(we.set(G,{...je,messages:[...je.messages,{id:ie,role:"assistant",text:`⚠️ ${ue}`}]}),we)})}V(G)}if((F.type==="assistant_delta"||F.type==="assistant_message")&&(I(J=>{const Q=new Map(J),ie=Q.get(G);if(!ie)return J;const ue=[...ie.messages],be=ue.findIndex(we=>we.id===F.itemId);return F.type==="assistant_delta"?be===-1?ue.push({id:F.itemId,role:"assistant",text:F.delta||"",isStreaming:!0}):ue[be]={...ue[be],text:(ue[be].text||"")+(F.delta||""),isStreaming:!0}:be===-1?ue.push({id:F.itemId,role:"assistant",text:F.text||"",isStreaming:!1}):ue[be]={...ue[be],text:F.text||"",isStreaming:!1},Q.set(G,{...ie,messages:ue}),Q}),F.type==="assistant_message"&&typeof F.text=="string")){const J=$(F.text);J&&I(Q=>{const ie=new Map(Q),ue=ie.get(G);return ue?(ie.set(G,{...ue,taskLabel:J}),ie):Q})}(F.type==="command_execution_delta"||F.type==="command_execution_completed")&&I(J=>{var je,rt;const Q=new Map(J),ie=Q.get(G);if(!ie)return J;const ue=[...ie.messages],be=F.itemId||((je=F.item)==null?void 0:je.id),we=ue.findIndex(Ve=>Ve.id===be);if(F.type==="command_execution_delta")we===-1?ue.push({id:be,role:"commandExecution",command:d("Command"),output:F.delta||"",status:"running",isExpandable:!0}):ue[we]={...ue[we],output:(ue[we].output||"")+(F.delta||"")};else{const Ve=F.item,Cr=((rt=Ve==null?void 0:Ve.commandActions)==null?void 0:rt.command)||(Ve==null?void 0:Ve.command)||d("Command");we===-1?ue.push({id:be,role:"commandExecution",command:Cr,output:(Ve==null?void 0:Ve.aggregatedOutput)||"",status:"completed",isExpandable:!0}):ue[we]={...ue[we],command:Cr,output:(Ve==null?void 0:Ve.aggregatedOutput)||ue[we].output||"",status:"completed"}}return Q.set(G,{...ie,messages:ue}),Q})}if(F.type==="agent_reasoning"&&Ae){const G=Y(F.text);G&&I(J=>{const Q=new Map(J),ie=Q.get(F.worktreeId);return ie?(Q.set(F.worktreeId,{...ie,taskLabel:G}),Q):J})}if(F.type==="item_started"&&Ae){const G=H(F.item);if(!G)return;const J=F.worktreeId;I(Q=>{const ie=new Map(Q),ue=ie.get(J);return ue&&ie.set(J,{...ue,activity:G}),ie})}if(F.type==="worktree_created"&&(I(G=>{const J=new Map(G);return J.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}),J}),L(G=>({...G,[F.worktreeId]:G[F.worktreeId]||"chat"})),B(G=>({...G,[F.worktreeId]:G[F.worktreeId]||"all"})),D(F.worktreeId)),F.type==="worktree_ready"&&I(G=>{const J=new Map(G),Q=J.get(F.worktreeId);return Q&&J.set(F.worktreeId,{...Q,status:"ready"}),J}),F.type==="worktree_status"){if(F.worktreeId==="main"){if(!F.status)return;S==null||S(!0);const G=F.status;E(G==="processing"),C(G==="processing"?d("Processing..."):""),G!=="processing"&&T("");return}if(!F.status)return;I(G=>{const J=new Map(G),Q=J.get(F.worktreeId);return Q&&J.set(F.worktreeId,{...Q,status:F.status,error:F.error||null,...F.status==="processing"?{}:{activity:"",taskLabel:"",currentTurnId:null}}),J})}F.type==="worktree_removed"&&(I(G=>{const J=new Map(G);return J.delete(F.worktreeId),J}),L(G=>{const J={...G};return delete J[F.worktreeId],J}),B(G=>{const J={...G};return delete J[F.worktreeId],J}),P.current===F.worktreeId&&D("main")),F.type==="worktree_renamed"&&I(G=>{const J=new Map(G),Q=J.get(F.worktreeId);return Q&&J.set(F.worktreeId,{...Q,name:F.name}),J})}})};qe();const Ce=()=>{if(document.hidden||!ge)return;o.current=Date.now();const ke=r.current;if(ke&&ke.readyState===WebSocket.OPEN){ke.send(JSON.stringify({type:"ping"})),g(),m();const Ie=(P==null?void 0:P.current)||"main";ke.send(JSON.stringify({type:"wake_up",worktreeId:Ie}))}else Se(),i.current=0,qe()};return document.addEventListener("visibilitychange",Ce),()=>{ge=!1,s.current=!0,Se(),ye(),document.removeEventListener("visibilitychange",Ce),r.current&&r.current.close(),We(),s.current=!1}},[e,t,l,c,u,m,v,w,_,g,d]),k.useEffect(()=>{if(!e||!X||!ce)return;const ge=r.current;!ge||ge.readyState!==WebSocket.OPEN||(ge.send(JSON.stringify({type:"account_login_start",provider:"codex",params:X})),re(null))},[e,ce,X,re,r])}const cc="workspaceToken",uc="workspaceRefreshToken",fc="workspaceId",XB="workspace-auth",bo="workspaceRefreshLock",QB=15e3,ZB=5e3,u0=1500,e9="mono_auth_token",vh=()=>{try{return localStorage.getItem(cc)||""}catch{return""}},f0=()=>{try{return localStorage.getItem(uc)||""}catch{return""}},h0=()=>{try{return localStorage.getItem(fc)||""}catch{return""}},t9=()=>{const e=String(window.location.hash||"");if(!e||!e.startsWith("#"))return"";const t=e.slice(1);return(new URLSearchParams(t).get("mono_auth")||"").trim()},r9=()=>({codex:{enabled:!1,authType:"api_key",authValue:"",previousAuthType:"api_key"},claude:{enabled:!1,authType:"api_key",authValue:"",previousAuthType:"api_key"}}),n9=()=>({codex:!1,claude:!1}),d0=()=>({codex:"",claude:""});function i9({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(h0()),[v,w]=k.useState(""),[_,g]=k.useState(vh()),[d,f]=k.useState(f0()),[p,y]=k.useState(h0()),[S,b]=k.useState(null),[E,C]=k.useState(""),[A,T]=k.useState(!1),[O,R]=k.useState([]),[M,z]=k.useState(!1),[U,q]=k.useState(""),[ee,W]=k.useState(null),[I,L]=k.useState({id:!1,secret:!1}),[B,D]=k.useState(!1),[P,$]=k.useState(1),[Y,H]=k.useState(n9),[j,N]=k.useState(d0),[K,V]=k.useState(r9),[X,re]=k.useState(null),ce=k.useRef(`tab-${Math.random().toString(36).slice(2)}-${Date.now()}`),ge=k.useRef(_),ae=k.useRef(d),Se=k.useRef(null),ye=k.useRef(null),We=k.useRef([]),Ge=k.useRef({id:null,secret:null}),Re=k.useCallback(({token:le="",refreshToken:G=""}={})=>{typeof le=="string"&&(ge.current=le,g(le)),typeof G=="string"&&(ae.current=G,f(G))},[]),Ne=k.useCallback(le=>{We.current.splice(0).forEach(J=>{try{J(le||null)}catch{}})},[]),qe=k.useCallback((le=ZB)=>new Promise(G=>{const J=setTimeout(()=>{const ie=We.current.indexOf(Q);ie>=0&&We.current.splice(ie,1),G(null)},le),Q=ie=>{clearTimeout(J),G(ie||null)};We.current.push(Q)}),[]),Ce=k.useCallback((le,G={})=>{const J=ye.current;if(J)try{J.postMessage({type:le,sourceTabId:ce.current,...G})}catch{}},[]),ke=k.useCallback(()=>{const le=vh(),G=f0();return{token:le||ge.current||"",refreshToken:G||ae.current||""}},[]),Ie=k.useCallback(()=>{const le=Date.now(),G={owner:ce.current,expiresAt:le+QB};try{const J=localStorage.getItem(bo);if(J){const ue=JSON.parse(J);if(ue&&typeof ue.expiresAt=="number"&&ue.expiresAt>le&&ue.owner!==ce.current)return!1}localStorage.setItem(bo,JSON.stringify(G));const Q=localStorage.getItem(bo);if(!Q)return!1;const ie=JSON.parse(Q);return(ie==null?void 0:ie.owner)===ce.current}catch{return!0}},[]),te=k.useCallback(()=>{try{const le=localStorage.getItem(bo);if(!le)return;const G=JSON.parse(le);(G==null?void 0:G.owner)===ce.current&&localStorage.removeItem(bo)}catch{}},[]),oe=k.useCallback(()=>{Re({token:"",refreshToken:""}),y(""),m(""),w(""),b(null),C(""),h("existing"),R([]),q(""),z(!1),l(1),D(!1),i&&i("new"),Ce("workspace_left",{}),Ne(null)},[Re,Ce,Ne,i]),F=k.useCallback(async()=>{const le=ae.current||ke().refreshToken;if(!le)return null;if(Se.current)return Se.current;const G=(async()=>{let J=!1;try{if(J=Ie(),!J){const rt=await qe();if(rt)return rt;const Ve=ke();if(Ve.token&&Ve.token!==ge.current)return Re({token:Ve.token,refreshToken:Ve.refreshToken||ae.current}),Ve.token;if(J=Ie(),!J)return null}Ce("refresh_started",{at:Date.now()});const ie=ke().refreshToken||le;if(!ie)return null;const ue=await fetch("/api/v1/workspaces/refresh",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:ie})});if(!ue.ok){const rt=await qe(u0);if(rt)return rt;const Ve=ke();return Ve.token&&Ve.token!==ge.current?(Re({token:Ve.token,refreshToken:Ve.refreshToken||ae.current}),Ve.token):null}const be=await ue.json(),we=(be==null?void 0:be.workspaceToken)||"",je=(be==null?void 0:be.refreshToken)||"";return we&&je?(Re({token:we,refreshToken:je}),Ce("refresh_succeeded",{at:Date.now(),workspaceToken:we,refreshToken:je}),Ne(we),we):null}catch{const Q=await qe(u0);return Q||null}finally{J&&te(),Se.current=null}})();return Se.current=G,G},[Ie,Re,Ce,ke,Ne,te,qe]);k.useEffect(()=>{ge.current=_},[_]),k.useEffect(()=>{ae.current=d},[d]),k.useEffect(()=>{if(typeof BroadcastChannel!="function")return;const le=new BroadcastChannel(XB);ye.current=le;const G=J=>{const Q=J==null?void 0:J.data;!Q||Q.sourceTabId===ce.current||(Q.type==="refresh_succeeded"?(Re({token:Q.workspaceToken||"",refreshToken:Q.refreshToken||""}),Ne(Q.workspaceToken||null)):Q.type==="workspace_left"&&(Re({token:"",refreshToken:""}),y("")))};return le.addEventListener("message",G),()=>{le.removeEventListener("message",G),le.close(),ye.current=null}},[Re,Ne]),k.useEffect(()=>{const le=G=>{if(!(!G||!G.key)){if(G.key===cc){const J=G.newValue||"";ge.current=J,g(J),J&&Ne(J);return}if(G.key===uc){const J=G.newValue||"";ae.current=J,f(J);return}G.key===fc&&y(G.newValue||"")}};return window.addEventListener("storage",le),()=>{window.removeEventListener("storage",le)}},[Ne]);const me=k.useCallback(async(le,G={})=>{const J=new Headers(G.headers||{}),Q=ge.current||_;Q&&J.set("Authorization",`Bearer ${Q}`);const ie=await fetch(le,{...G,headers:J});if(ie.status!==401)return ie;const ue=await F();if(!ue){const we=ge.current||vh();if(we&&we!==Q){const je=new Headers(G.headers||{});return je.set("Authorization",`Bearer ${we}`),fetch(le,{...G,headers:je})}return oe(),ie}const be=new Headers(G.headers||{});return be.set("Authorization",`Bearer ${ue}`),fetch(le,{...G,headers:be})},[_,F,oe]);k.useEffect(()=>{let le=!1;return(async()=>{try{const J=await fetch("/api/v1/health");if(!J.ok)return;const Q=await J.json();!le&&(Q!=null&&Q.deploymentMode)&&re(Q.deploymentMode)}catch{}})(),()=>{le=!0}},[]),k.useEffect(()=>{const le=t9();if(!le)return;let G=!1;return(async()=>{try{const Q=await fetch("/api/v1/workspaces/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grantType:e9,monoAuthToken:le})});if(!Q.ok){const ue=await Q.json().catch(()=>null),be=(ue==null?void 0:ue.error)||e("Automatic mono-user authentication failed.");G||C(be);return}const ie=await Q.json();if(!(ie!=null&&ie.workspaceToken))return;G||(g(ie.workspaceToken||""),f(ie.refreshToken||""),y("default"),m("default"),l(4),C(""))}catch{G||C(e("Automatic mono-user authentication failed."))}finally{const Q=new URL(window.location.href);Q.hash.includes("mono_auth=")&&(Q.hash="",window.history.replaceState({},"",Q))}})(),()=>{G=!0}},[_,e,y,m,f,l,g,C]),k.useEffect(()=>{try{_?localStorage.setItem(cc,_):localStorage.removeItem(cc)}catch{}},[_]),k.useEffect(()=>{try{d?localStorage.setItem(uc,d):localStorage.removeItem(uc)}catch{}},[d]),k.useEffect(()=>{try{p?localStorage.setItem(fc,p):localStorage.removeItem(fc)}catch{}},[p]),k.useEffect(()=>{if(!_){l(1);return}l(le=>le>=3?le:4)},[_]);const pe=k.useCallback(async()=>{if(_){z(!0),q("");try{const le=await me("/api/v1/sessions");if(!le.ok){const Q=await le.json().catch(()=>null);throw new Error((Q==null?void 0:Q.error)||e("Unable to load sessions."))}const G=await le.json(),J=Array.isArray(G==null?void 0:G.sessions)?G.sessions:[];R(J)}catch(le){q(le.message||e("Unable to load sessions."))}finally{z(!1)}}},[me,_,oe,e]);k.useEffect(()=>{!_||o!==4||pe()},[o,_,pe]);const Oe=k.useCallback(async()=>{const le=(p||u||"").trim();if(le){T(!0),C("");try{const G=await me(`/api/v1/workspaces/${encodeURIComponent(le)}`);if(!G.ok){const ie=await G.json().catch(()=>null);throw new Error((ie==null?void 0:ie.error)||e("Unable to load providers."))}const J=await G.json(),Q=(J==null?void 0:J.providers)||{};V(ie=>{var ue,be,we,je,rt,Ve,Cr,wn,bn,Yr;return{codex:{...ie.codex,enabled:!!((ue=Q==null?void 0:Q.codex)!=null&&ue.enabled),authType:((we=(be=Q==null?void 0:Q.codex)==null?void 0:be.auth)==null?void 0:we.type)||"api_key",previousAuthType:((rt=(je=Q==null?void 0:Q.codex)==null?void 0:je.auth)==null?void 0:rt.type)||"api_key",authValue:""},claude:{...ie.claude,enabled:!!((Ve=Q==null?void 0:Q.claude)!=null&&Ve.enabled),authType:((wn=(Cr=Q==null?void 0:Q.claude)==null?void 0:Cr.auth)==null?void 0:wn.type)||"api_key",previousAuthType:((Yr=(bn=Q==null?void 0:Q.claude)==null?void 0:bn.auth)==null?void 0:Yr.type)||"api_key",authValue:""}}}),H(ie=>{var ue,be;return{...ie,codex:!!((ue=Q==null?void 0:Q.codex)!=null&&ue.enabled),claude:!!((be=Q==null?void 0:Q.claude)!=null&&be.enabled)}}),N(d0())}catch(G){C(G.message||e("Unable to load providers."))}finally{T(!1)}}},[me,oe,e,p,u]),Ae=async le=>{le.preventDefault(),C(""),T(!0);try{if(c==="existing"){const G=u.trim(),J=v.trim();if(!G||!J)throw new Error(e("Workspace ID and secret are required."));const Q=await me("/api/v1/workspaces/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspaceId:G,workspaceSecret:J})});if(!Q.ok){const ue=await Q.json().catch(()=>null);throw new Error((ue==null?void 0:ue.error)||e("Authentication failed."))}const ie=await Q.json();g(ie.workspaceToken||""),f(ie.refreshToken||""),y(G),l(4);return}D(!1),$(1),l(2)}catch(G){C(G.message||e("Workspace configuration failed."))}finally{T(!1)}},Te=async le=>{le.preventDefault(),C(""),T(!0);try{const G={};if(["codex","claude"].forEach(be=>{const we=K[be];if(!(we!=null&&we.enabled)){G[be]={enabled:!1};return}const je=(we.authValue||"").trim(),rt=a(be,we)||"api_key";if(B&&we.previousAuthType&&rt!==we.previousAuthType&&!je)throw new Error(e("Key required for {{provider}}.",{provider:be}));if(!B&&!je)throw new Error(e("Key required for {{provider}}.",{provider:be}));if(je){const Ve=rt==="auth_json_b64"&&t?t(je):je;G[be]={enabled:!0,auth:{type:rt,value:Ve}}}else G[be]={enabled:!0,auth:{type:rt}}}),Object.keys(G).length===0)throw new Error(e("Select at least one provider."));if(B){const be=(p||u||"").trim();if(!be)throw new Error(e("Workspace ID required."));const we=await me(`/api/v1/workspaces/${encodeURIComponent(be)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providers:G})});if(!we.ok){const je=await we.json().catch(()=>null);throw new Error((je==null?void 0:je.error)||e("Workspace update failed."))}await we.json().catch(()=>null),D(!1),l(4),s==null||s(e("AI providers updated."),"success");return}const J=await me("/api/v1/workspaces",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providers:G})});if(!J.ok){const be=await J.json().catch(()=>null);throw new Error((be==null?void 0:be.error)||e("Workspace creation failed."))}const Q=await J.json();b(Q),y(Q.workspaceId),m(Q.workspaceId);const ie=await me("/api/v1/workspaces/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspaceId:Q.workspaceId,workspaceSecret:Q.workspaceSecret})});if(!ie.ok){const be=await ie.json().catch(()=>null);throw new Error((be==null?void 0:be.error)||e("Authentication failed."))}const ue=await ie.json();g(ue.workspaceToken||""),f(ue.refreshToken||""),l(3)}catch(G){C(G.message||e("Workspace configuration failed."))}finally{T(!1)}},ne=k.useCallback((le,G)=>{if(!G)return;r&&r(G),L(Q=>({...Q,[le]:!0}));const J=Ge.current;J[le]&&clearTimeout(J[le]),J[le]=setTimeout(()=>{L(Q=>({...Q,[le]:!1})),J[le]=null},2e3)},[]);return k.useEffect(()=>()=>{Object.values(Ge.current||{}).forEach(le=>{le&&clearTimeout(le)})},[]),{apiFetch:me,deploymentMode:X,handleDeleteSession:async le=>{const G=le==null?void 0:le.sessionId;if(!G)return;const J=n==null?void 0:n((le==null?void 0:le.repoUrl)||""),Q=(le==null?void 0:le.name)||J||G;if(window.confirm(e('Supprimer la session "{{title}}" ? Cette action est irreversible.',{title:Q})))try{W(G),q("");const ue=await me(`/api/v1/sessions/${encodeURIComponent(G)}`,{method:"DELETE"});if(!ue.ok){let be="";try{const je=await ue.json();typeof(je==null?void 0:je.error)=="string"&&(be=je.error)}catch{}const we=be?`: ${be}`:"";throw new Error(e("Unable to delete the session{{suffix}}.",{suffix:we}))}await pe(),s==null||s(e('Session "{{title}}" supprimee.',{title:Q}),"success")}catch(ue){q(ue.message||e("Unable to delete the session."))}finally{W(null)}},handleLeaveWorkspace:oe,handleWorkspaceCopy:ne,handleWorkspaceProvidersSubmit:Te,handleWorkspaceSubmit:Ae,loadWorkspaceProviders:Oe,loadWorkspaceSessions:pe,providersBackStep:P,refreshWorkspaceToken:F,setProvidersBackStep:$,setWorkspaceAuthExpanded:H,setWorkspaceAuthFiles:N,setWorkspaceError:C,setWorkspaceId:y,setWorkspaceIdInput:m,setWorkspaceMode:h,setWorkspaceProviders:V,setWorkspaceProvidersEditing:D,setWorkspaceRefreshToken:f,setWorkspaceSecretInput:w,setWorkspaceStep:l,setWorkspaceToken:g,workspaceAuthExpanded:Y,workspaceAuthFiles:j,workspaceBusy:A,workspaceCopied:I,workspaceCreated:S,workspaceError:E,workspaceId:p,workspaceIdInput:u,workspaceMode:c,workspaceProviders:K,workspaceProvidersEditing:B,workspaceSecretInput:v,workspaceSessionDeletingId:ee,workspaceSessions:O,workspaceSessionsError:U,workspaceSessionsLoading:M,workspaceStep:o,workspaceToken:_}}function s9({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,v]=k.useState(new Map),w=k.useRef(new Map),[_,g]=k.useState("main"),d=k.useRef("main");k.useEffect(()=>{w.current=m},[m]),k.useEffect(()=>{d.current=_},[_]);const f=k.useCallback(R=>{var M;if(!Array.isArray(R))return null;for(let z=R.length-1;z>=0;z-=1)if((M=R[z])!=null&&M.id)return R[z].id;return null},[]),p=k.useCallback(async()=>{if(t)try{const R=await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees/main/messages`);if(!R.ok)return;const M=await R.json().catch(()=>({}));if(Array.isArray(M==null?void 0:M.messages)){const z=M.messages.map((U,q)=>({...U,id:(U==null?void 0:U.id)||`history-${q}`,attachments:s((U==null?void 0:U.attachments)||[]),toolResult:U==null?void 0:U.toolResult}));a(z)}}catch{}},[t,e,a,s]),y=k.useCallback(async R=>{if(!(!t||!R)){if(R==="main"){await p();return}try{const M=await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(R)}`);if(!M.ok)return;const z=await M.json().catch(()=>({})),U=await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(R)}/messages`);if(!U.ok)return;const q=await U.json().catch(()=>({}));if(!Array.isArray(q==null?void 0:q.messages))return;const ee=q.messages.map((W,I)=>({...W,id:(W==null?void 0:W.id)||`history-${I}`,attachments:s((W==null?void 0:W.attachments)||[]),toolResult:W==null?void 0:W.toolResult}));v(W=>{const I=new Map(W),L=I.get(R);return L&&I.set(R,{...L,messages:ee,status:z.status||L.status}),I})}catch{}}},[t,e,p,s]),S=k.useCallback(R=>{var q;const M=o==null?void 0:o.current;if(!M||M.readyState!==WebSocket.OPEN||!R)return;const z=w.current,U=f(R==="main"?i.current:(q=z.get(R))==null?void 0:q.messages);M.send(JSON.stringify({type:"worktree_messages_sync",worktreeId:R,lastSeenMessageId:U}))},[f,i,o]),b=k.useCallback(R=>{if(!Array.isArray(R))return;const M=new Map;R.forEach(z=>{M.set(z.id,{...z,status:(z==null?void 0:z.status)||"processing",messages:[],models:[],modelLoading:!1,modelError:"",activity:"",currentTurnId:null})}),v(M),l(z=>{const U={...z};return R.forEach(q=>{U[q.id]||(U[q.id]="chat")}),U}),c(z=>{const U={...z};return R.forEach(q=>{U[q.id]||(U[q.id]="all")}),U}),d.current!=="main"&&!R.some(z=>z.id===d.current)&&g("main")},[c,l]),E=k.useCallback(async()=>{if(t)try{const R=await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees`);if(!R.ok)return;const M=await R.json();b(M==null?void 0:M.worktrees)}catch{}},[t,e,b]),C=k.useCallback(R=>{if(!R)return;g(R);const M=o==null?void 0:o.current;M&&M.readyState===WebSocket.OPEN&&M.send(JSON.stringify({type:"wake_up",worktreeId:R})),y(R)},[y,o]),A=k.useCallback(async({context:R,name:M,provider:z,sourceWorktree:U,startingBranch:q,model:ee,reasoningEffort:W,internetAccess:I,denyGitCredentialsAccess:L})=>{if(!t)return h==null||h(u("Session not found."),"error"),!1;try{const B=await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:R==="fork"?"fork":"new",provider:R==="new"?r.includes(z)?z:n:void 0,sourceWorktree:R==="fork"?U||null:void 0,name:M||null,startingBranch:q||null,model:R==="new"?ee||null:void 0,reasoningEffort:R==="new"?W??null:void 0,internetAccess:!!I,denyGitCredentialsAccess:!!L})});if(!B.ok){const P=await B.json().catch(()=>null);throw new Error((P==null?void 0:P.error)||u("Failed to create parallel request."))}const D=await B.json();return v(P=>{const $=new Map(P);return $.set(D.worktreeId,{id:D.worktreeId,name:D.name,branchName:D.branchName,provider:D.provider,model:D.model||null,reasoningEffort:D.reasoningEffort||null,context:D.context||"new",sourceWorktreeId:D.sourceWorktreeId||null,internetAccess:!!D.internetAccess,denyGitCredentialsAccess:!!D.denyGitCredentialsAccess,status:D.status||"creating",color:D.color,messages:[],activity:"",currentTurnId:null}),$}),l(P=>({...P,[D.worktreeId]:P[D.worktreeId]||"chat"})),c(P=>({...P,[D.worktreeId]:P[D.worktreeId]||"all"})),g(D.worktreeId),E(),!0}catch(B){return h==null||h(B.message||u("Failed to create parallel request."),"error"),!1}},[e,t,r,n,E,c,l,h,u]),T=k.useCallback(async R=>{if(t)try{(await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(R)}`,{method:"DELETE"})).ok||console.error("Failed to close worktree")}catch(M){console.error("Error closing worktree:",M)}},[t,e]),O=k.useCallback(async(R,M)=>{if(t)try{(await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(R)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:M})})).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:y,requestWorktreeMessages:S,requestWorktreesList:E,renameWorktreeHandler:O,setActiveWorktreeId:g,setWorktrees:v,worktrees:m}}var JC={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,y,S){var b,E=arguments.length,C=E<3?p:S===null?S=Object.getOwnPropertyDescriptor(p,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,p,y,S);else for(var A=f.length-1;A>=0;A--)(b=f[A])&&(C=(E<3?b(C):E>3?b(p,y,C):b(p,y))||C);return E>3&&C&&Object.defineProperty(p,y,C),C},h=this&&this.__param||function(f,p){return function(y,S){p(y,S,f)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const u=l(9042),m=l(9924),v=l(844),w=l(4725),_=l(2585),g=l(3656);let d=o.AccessibilityManager=class extends v.Disposable{constructor(f,p,y,S){super(),this._terminal=f,this._coreBrowserService=y,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,g.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,v.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 y=this._terminal.buffer,S=y.lines.length.toString();for(let b=f;b<=p;b++){const E=y.lines.get(y.ydisp+b),C=[],A=(E==null?void 0:E.translateToString(!0,void 0,void 0,C))||"",T=(y.ydisp+b+1).toString(),O=this._rowElements[b];O&&(A.length===0?(O.innerText=" ",this._rowColumns.set(O,[0,1])):(O.textContent=A,this._rowColumns.set(O,C)),O.setAttribute("aria-posinset",T),O.setAttribute("aria-setsize",S))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(f,p){const y=f.target,S=this._rowElements[p===0?1:this._rowElements.length-2];if(y.getAttribute("aria-posinset")===(p===0?"1":`${this._terminal.buffer.lines.length}`)||f.relatedTarget!==S)return;let b,E;if(p===0?(b=y,E=this._rowElements.pop(),this._rowContainer.removeChild(E)):(b=this._rowElements.shift(),E=y,this._rowContainer.removeChild(b)),b.removeEventListener("focus",this._topBoundaryFocusListener),E.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},y={node:f.focusNode,offset:f.focusOffset};if((p.node.compareDocumentPosition(y.node)&Node.DOCUMENT_POSITION_PRECEDING||p.node===y.node&&p.offset>y.offset)&&([p,y]=[y,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(y.node.compareDocumentPosition(S)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(y={node:S,offset:((A=S.textContent)==null?void 0:A.length)??0}),!this._rowContainer.contains(y.node))return;const b=({node:T,offset:O})=>{const R=T instanceof Text?T.parentNode:T;let M=parseInt(R==null?void 0:R.getAttribute("aria-posinset"),10)-1;if(isNaN(M))return console.warn("row is invalid. Race condition?"),null;const z=this._rowColumns.get(R);if(!z)return console.warn("columns is null. Race condition?"),null;let U=O<z.length?z[O]:z.slice(-1)[0]+1;return U>=this._terminal.cols&&(++M,U=0),{row:M,column:U}},E=b(p),C=b(y);if(E&&C){if(E.row>C.row||E.row===C.row&&E.column>=C.column)throw new Error("invalid range");this._terminal.select(E.column,E.row,(C.row-E.row)*this._terminal.cols-E.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,w.ICoreBrowserService),h(3,w.IRenderService)],d)},3614:(a,o)=>{function l(m){return m.replace(/\r?\n/g,"\r")}function c(m,v){return v?"\x1B[200~"+m+"\x1B[201~":m}function h(m,v,w,_){m=c(m=l(m),w.decPrivateModes.bracketedPasteMode&&_.rawOptions.ignoreBracketedPasteMode!==!0),w.triggerDataEvent(m,!0),v.value=""}function u(m,v,w){const _=w.getBoundingClientRect(),g=m.clientX-_.left-10,d=m.clientY-_.top-10;v.style.width="20px",v.style.height="20px",v.style.left=`${g}px`,v.style.top=`${d}px`,v.style.zIndex="1000",v.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,v){m.clipboardData&&m.clipboardData.setData("text/plain",v.selectionText),m.preventDefault()},o.handlePasteEvent=function(m,v,w,_){m.stopPropagation(),m.clipboardData&&h(m.clipboardData.getData("text/plain"),v,w,_)},o.paste=h,o.moveTextAreaUnderMouseCursor=u,o.rightClickHandler=function(m,v,w,_,g){u(m,v,w),g&&_.rightClickSelect(m),v.value=_.selectionText,v.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,y){var S,b=arguments.length,E=b<3?f:y===null?y=Object.getOwnPropertyDescriptor(f,p):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(d,f,p,y);else for(var C=d.length-1;C>=0;C--)(S=d[C])&&(E=(b<3?S(E):b>3?S(f,p,E):S(f,p))||E);return b>3&&E&&Object.defineProperty(f,p,E),E},h=this&&this.__param||function(d,f){return function(p,y){f(p,y,d)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier=void 0;const u=l(3656),m=l(8460),v=l(844),w=l(2585),_=l(4725);let g=o.Linkifier=class extends v.Disposable{get currentLink(){return this._currentLink}constructor(d,f,p,y,S){super(),this._element=d,this._mouseService=f,this._renderService=p,this._bufferService=y,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,v.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,v.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 y=0;y<p.length;y++){const S=p[y];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 y,S;this._activeProviderReplies&&f||((y=this._activeProviderReplies)==null||y.forEach(b=>{b==null||b.forEach(E=>{E.link.dispose&&E.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=d.y);let p=!1;for(const[b,E]of this._linkProviderService.linkProviders.entries())f?(S=this._activeProviderReplies)!=null&&S.get(b)&&(p=this._checkLinkProviderResult(b,d,p)):E.provideLinks(d.y,C=>{var T,O;if(this._isMouseOut)return;const A=C==null?void 0:C.map(R=>({link:R}));(T=this._activeProviderReplies)==null||T.set(b,A),p=this._checkLinkProviderResult(b,d,p),((O=this._activeProviderReplies)==null?void 0:O.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(d.y,this._activeProviderReplies)})}_removeIntersectingLinks(d,f){const p=new Set;for(let y=0;y<f.size;y++){const S=f.get(y);if(S)for(let b=0;b<S.length;b++){const E=S[b],C=E.link.range.start.y<d?0:E.link.range.start.x,A=E.link.range.end.y>d?this._bufferService.cols:E.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 y=this._activeProviderReplies.get(d);let S=!1;for(let E=0;E<d;E++)this._activeProviderReplies.has(E)&&!this._activeProviderReplies.get(E)||(S=!0);if(!S&&y){const E=y.find(C=>this._linkAtPosition(C.link,f));E&&(p=!0,this._handleNewLink(E))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!p)for(let E=0;E<this._activeProviderReplies.size;E++){const C=(b=this._activeProviderReplies.get(E))==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,v.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,y;return(y=(p=this._currentLink)==null?void 0:p.state)==null?void 0:y.decorations.pointerCursor},set:p=>{var y;(y=this._currentLink)!=null&&y.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,y;return(y=(p=this._currentLink)==null?void 0:p.state)==null?void 0:y.decorations.underline},set:p=>{var y,S,b;(y=this._currentLink)!=null&&y.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 y=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>=y&&this._currentLink.link.range.end.y<=S&&(this._clearCurrentLink(y,S),this._lastMouseEvent)){const b=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);b&&this._askForLink(b,!1)}})))}_linkHover(d,f,p){var y;(y=this._currentLink)!=null&&y.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,y=this._bufferService.buffer.ydisp,S=this._createLinkUnderlineEvent(p.start.x-1,p.start.y-y-1,p.end.x,p.end.y-y-1,void 0);(f?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(S)}_linkLeave(d,f,p){var y;(y=this._currentLink)!=null&&y.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,y=d.range.end.y*this._bufferService.cols+d.range.end.x,S=f.y*this._bufferService.cols+f.x;return p<=S&&S<=y}_positionFromMouseEvent(d,f,p){const y=p.getCoords(d,f,this._bufferService.cols,this._bufferService.rows);if(y)return{x:y[0],y:y[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(d,f,p,y,S){return{x1:d,y1:f,x2:p,y2:y,cols:this._bufferService.cols,fg:S}}};o.Linkifier=g=c([h(1,_.IMouseService),h(2,_.IRenderService),h(3,w.IBufferService),h(4,_.ILinkProviderService)],g)},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(_,g,d,f){var p,y=arguments.length,S=y<3?g:f===null?f=Object.getOwnPropertyDescriptor(g,d):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(_,g,d,f);else for(var b=_.length-1;b>=0;b--)(p=_[b])&&(S=(y<3?p(S):y>3?p(g,d,S):p(g,d))||S);return y>3&&S&&Object.defineProperty(g,d,S),S},h=this&&this.__param||function(_,g){return function(d,f){g(d,f,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkProvider=void 0;const u=l(511),m=l(2585);let v=o.OscLinkProvider=class{constructor(_,g,d){this._bufferService=_,this._optionsService=g,this._oscLinkService=d}provideLinks(_,g){var A;const d=this._bufferService.buffer.lines.get(_-1);if(!d)return void g(void 0);const f=[],p=this._optionsService.rawOptions.linkHandler,y=new u.CellData,S=d.getTrimmedLength();let b=-1,E=-1,C=!1;for(let T=0;T<S;T++)if(E!==-1||d.hasContent(T)){if(d.loadCell(T,y),y.hasExtendedAttrs()&&y.extended.urlId){if(E===-1){E=T,b=y.extended.urlId;continue}C=y.extended.urlId!==b}else E!==-1&&(C=!0);if(C||E!==-1&&T===S-1){const O=(A=this._oscLinkService.getLinkData(b))==null?void 0:A.uri;if(O){const R={start:{x:E+1,y:_},end:{x:T+(C||T!==S-1?0:1),y:_}};let M=!1;if(!(p!=null&&p.allowNonHttpProtocols))try{const z=new URL(O);["http:","https:"].includes(z.protocol)||(M=!0)}catch{M=!0}M||f.push({text:O,range:R,activate:(z,U)=>p?p.activate(z,U,R):w(0,U),hover:(z,U)=>{var q;return(q=p==null?void 0:p.hover)==null?void 0:q.call(p,z,U,R)},leave:(z,U)=>{var q;return(q=p==null?void 0:p.leave)==null?void 0:q.call(p,z,U,R)}})}C=!1,y.hasExtendedAttrs()&&y.extended.urlId?(E=T,b=y.extended.urlId):(E=-1,b=-1)}}g(f)}};function w(_,g){if(confirm(`Do you want to navigate to ${g}?
|
|
694
|
+
|
|
695
|
+
WARNING: This link could potentially be dangerous`)){const d=window.open();if(d){try{d.opener=null}catch{}d.location.href=g}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=v=c([h(0,m.IBufferService),h(1,m.IOptionsService),h(2,m.IOscLinkService)],v)},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),v=l(3730),w=l(1680),_=l(3107),g=l(5744),d=l(2950),f=l(1296),p=l(428),y=l(4269),S=l(5114),b=l(8934),E=l(3230),C=l(9312),A=l(4725),T=l(6731),O=l(8055),R=l(8969),M=l(8460),z=l(844),U=l(6114),q=l(8437),ee=l(2584),W=l(7399),I=l(5941),L=l(9074),B=l(2585),D=l(5435),P=l(4567),$=l(779);class Y extends R.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(j={}){super(j),this.browser=U,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new z.MutableDisposable),this._onCursorMove=this.register(new M.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new M.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new M.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new M.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new M.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new M.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new M.EventEmitter),this._onBlur=this.register(new M.EventEmitter),this._onA11yCharEmitter=this.register(new M.EventEmitter),this._onA11yTabEmitter=this.register(new M.EventEmitter),this._onWillOpen=this.register(new M.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(B.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance($.LinkProviderService),this._instantiationService.setService(A.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(v.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((N,K)=>this.refresh(N,K))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(N=>this._reportWindowsOptions(N))),this.register(this._inputHandler.onColor(N=>this._handleColorEvent(N))),this.register((0,M.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,M.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,M.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,M.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(N=>this._afterResize(N.cols,N.rows))),this.register((0,z.toDisposable)(()=>{var N,K;this._customKeyEventHandler=void 0,(K=(N=this.element)==null?void 0:N.parentNode)==null||K.removeChild(this.element)}))}_handleColorEvent(j){if(this._themeService)for(const N of j){let K,V="";switch(N.index){case 256:K="foreground",V="10";break;case 257:K="background",V="11";break;case 258:K="cursor",V="12";break;default:K="ansi",V="4;"+N.index}switch(N.type){case 0:const X=O.color.toColorRGB(K==="ansi"?this._themeService.colors.ansi[N.index]:this._themeService.colors[K]);this.coreService.triggerDataEvent(`${ee.C0.ESC}]${V};${(0,I.toRgbString)(X)}${ee.C1_ESCAPED.ST}`);break;case 1:if(K==="ansi")this._themeService.modifyColors(re=>re.ansi[N.index]=O.channels.toColor(...N.color));else{const re=K;this._themeService.modifyColors(ce=>ce[re]=O.channels.toColor(...N.color))}break;case 2:this._themeService.restoreColor(N.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(j){j?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(P.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(j){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(ee.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var j;return(j=this.textarea)==null?void 0:j.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(ee.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 j=this.buffer.ybase+this.buffer.y,N=this.buffer.lines.get(j);if(!N)return;const K=Math.min(this.buffer.x,this.cols-1),V=this._renderService.dimensions.css.cell.height,X=N.getWidth(K),re=this._renderService.dimensions.css.cell.width*X,ce=this.buffer.y*this._renderService.dimensions.css.cell.height,ge=K*this._renderService.dimensions.css.cell.width;this.textarea.style.left=ge+"px",this.textarea.style.top=ce+"px",this.textarea.style.width=re+"px",this.textarea.style.height=V+"px",this.textarea.style.lineHeight=V+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,h.addDisposableDomListener)(this.element,"copy",N=>{this.hasSelection()&&(0,c.copyHandler)(N,this._selectionService)}));const j=N=>(0,c.handlePasteEvent)(N,this.textarea,this.coreService,this.optionsService);this.register((0,h.addDisposableDomListener)(this.textarea,"paste",j)),this.register((0,h.addDisposableDomListener)(this.element,"paste",j)),U.isFirefox?this.register((0,h.addDisposableDomListener)(this.element,"mousedown",N=>{N.button===2&&(0,c.rightClickHandler)(N,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,h.addDisposableDomListener)(this.element,"contextmenu",N=>{(0,c.rightClickHandler)(N,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),U.isLinux&&this.register((0,h.addDisposableDomListener)(this.element,"auxclick",N=>{N.button===1&&(0,c.moveTextAreaUnderMouseCursor)(N,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,h.addDisposableDomListener)(this.textarea,"keyup",j=>this._keyUp(j),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keydown",j=>this._keyDown(j),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keypress",j=>this._keyPress(j),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionupdate",j=>this._compositionHelper.compositionupdate(j))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,h.addDisposableDomListener)(this.textarea,"input",j=>this._inputEvent(j),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(j){var K;if(!j)throw new Error("Terminal requires a parent element.");if(j.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((K=this.element)==null?void 0:K.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=j.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"),j.appendChild(this.element);const N=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),N.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",V=>this.updateCursorStyle(V))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),N.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",m.promptLabel),U.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,j.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",V=>this._handleTextAreaFocus(V))),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(y.CharacterJoinerService),this._instantiationService.setService(A.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(E.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(A.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(V=>this._onRender.fire(V))),this.onResize(V=>this._renderService.resize(V.cols,V.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(N);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(w.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(V=>this.scrollLines(V.amount,V.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(V=>this.scrollLines(V.amount,V.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(V=>this._renderService.handleSelectionChanged(V.start,V.end,V.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(V=>{this.textarea.value=V,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(V=>{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",V=>this._selectionService.handleMouseDown(V))),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(P.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",V=>this._handleScreenReaderModeOptionChange(V))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(g.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",V=>{!this._overviewRulerRenderer&&V&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(g.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 j=this,N=this.element;function K(re){const ce=j._mouseService.getMouseReportCoords(re,j.screenElement);if(!ce)return!1;let ge,ae;switch(re.overrideType||re.type){case"mousemove":ae=32,re.buttons===void 0?(ge=3,re.button!==void 0&&(ge=re.button<3?re.button:3)):ge=1&re.buttons?0:4&re.buttons?1:2&re.buttons?2:3;break;case"mouseup":ae=0,ge=re.button<3?re.button:3;break;case"mousedown":ae=1,ge=re.button<3?re.button:3;break;case"wheel":if(j._customWheelEventHandler&&j._customWheelEventHandler(re)===!1||j.viewport.getLinesScrolled(re)===0)return!1;ae=re.deltaY<0?0:1,ge=4;break;default:return!1}return!(ae===void 0||ge===void 0||ge>4)&&j.coreMouseService.triggerMouseEvent({col:ce.col,row:ce.row,x:ce.x,y:ce.y,button:ge,action:ae,ctrl:re.ctrlKey,alt:re.altKey,shift:re.shiftKey})}const V={mouseup:null,wheel:null,mousedrag:null,mousemove:null},X={mouseup:re=>(K(re),re.buttons||(this._document.removeEventListener("mouseup",V.mouseup),V.mousedrag&&this._document.removeEventListener("mousemove",V.mousedrag)),this.cancel(re)),wheel:re=>(K(re),this.cancel(re,!0)),mousedrag:re=>{re.buttons&&K(re)},mousemove:re=>{re.buttons||K(re)}};this.register(this.coreMouseService.onProtocolChange(re=>{re?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(re)),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&re?V.mousemove||(N.addEventListener("mousemove",X.mousemove),V.mousemove=X.mousemove):(N.removeEventListener("mousemove",V.mousemove),V.mousemove=null),16&re?V.wheel||(N.addEventListener("wheel",X.wheel,{passive:!1}),V.wheel=X.wheel):(N.removeEventListener("wheel",V.wheel),V.wheel=null),2&re?V.mouseup||(V.mouseup=X.mouseup):(this._document.removeEventListener("mouseup",V.mouseup),V.mouseup=null),4&re?V.mousedrag||(V.mousedrag=X.mousedrag):(this._document.removeEventListener("mousemove",V.mousedrag),V.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,h.addDisposableDomListener)(N,"mousedown",re=>{if(re.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(re))return K(re),V.mouseup&&this._document.addEventListener("mouseup",V.mouseup),V.mousedrag&&this._document.addEventListener("mousemove",V.mousedrag),this.cancel(re)})),this.register((0,h.addDisposableDomListener)(N,"wheel",re=>{if(!V.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(re)===!1)return!1;if(!this.buffer.hasScrollback){const ce=this.viewport.getLinesScrolled(re);if(ce===0)return;const ge=ee.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(re.deltaY<0?"A":"B");let ae="";for(let Se=0;Se<Math.abs(ce);Se++)ae+=ge;return this.coreService.triggerDataEvent(ae,!0),this.cancel(re,!0)}return this.viewport.handleWheel(re)?this.cancel(re):void 0}},{passive:!1})),this.register((0,h.addDisposableDomListener)(N,"touchstart",re=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(re),this.cancel(re)},{passive:!0})),this.register((0,h.addDisposableDomListener)(N,"touchmove",re=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(re)?void 0:this.cancel(re)},{passive:!1}))}refresh(j,N){var K;(K=this._renderService)==null||K.refreshRows(j,N)}updateCursorStyle(j){var N;(N=this._selectionService)!=null&&N.shouldColumnSelect(j)?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(j,N,K=0){var V;K===1?(super.scrollLines(j,N,K),this.refresh(0,this.rows-1)):(V=this.viewport)==null||V.scrollLines(j)}paste(j){(0,c.paste)(j,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(j){this._customKeyEventHandler=j}attachCustomWheelEventHandler(j){this._customWheelEventHandler=j}registerLinkProvider(j){return this._linkProviderService.registerLinkProvider(j)}registerCharacterJoiner(j){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const N=this._characterJoinerService.register(j);return this.refresh(0,this.rows-1),N}deregisterCharacterJoiner(j){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(j)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(j){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+j)}registerDecoration(j){return this._decorationService.registerDecoration(j)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(j,N,K){this._selectionService.setSelection(j,N,K)}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 j;(j=this._selectionService)==null||j.clearSelection()}selectAll(){var j;(j=this._selectionService)==null||j.selectAll()}selectLines(j,N){var K;(K=this._selectionService)==null||K.selectLines(j,N)}_keyDown(j){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(j)===!1)return!1;const N=this.browser.isMac&&this.options.macOptionIsMeta&&j.altKey;if(!N&&!this._compositionHelper.keydown(j))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;N||j.key!=="Dead"&&j.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const K=(0,W.evaluateKeyboardEvent)(j,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(j),K.type===3||K.type===2){const V=this.rows-1;return this.scrollLines(K.type===2?-V:V),this.cancel(j,!0)}return K.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,j)||(K.cancel&&this.cancel(j,!0),!K.key||!!(j.key&&!j.ctrlKey&&!j.altKey&&!j.metaKey&&j.key.length===1&&j.key.charCodeAt(0)>=65&&j.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(K.key!==ee.C0.ETX&&K.key!==ee.C0.CR||(this.textarea.value=""),this._onKey.fire({key:K.key,domEvent:j}),this._showCursor(),this.coreService.triggerDataEvent(K.key,!0),!this.optionsService.rawOptions.screenReaderMode||j.altKey||j.ctrlKey?this.cancel(j,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(j,N){const K=j.isMac&&!this.options.macOptionIsMeta&&N.altKey&&!N.ctrlKey&&!N.metaKey||j.isWindows&&N.altKey&&N.ctrlKey&&!N.metaKey||j.isWindows&&N.getModifierState("AltGraph");return N.type==="keypress"?K:K&&(!N.keyCode||N.keyCode>47)}_keyUp(j){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(j)===!1||(function(N){return N.keyCode===16||N.keyCode===17||N.keyCode===18}(j)||this.focus(),this.updateCursorStyle(j),this._keyPressHandled=!1)}_keyPress(j){let N;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(j)===!1)return!1;if(this.cancel(j),j.charCode)N=j.charCode;else if(j.which===null||j.which===void 0)N=j.keyCode;else{if(j.which===0||j.charCode===0)return!1;N=j.which}return!(!N||(j.altKey||j.ctrlKey||j.metaKey)&&!this._isThirdLevelShift(this.browser,j)||(N=String.fromCharCode(N),this._onKey.fire({key:N,domEvent:j}),this._showCursor(),this.coreService.triggerDataEvent(N,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(j){if(j.data&&j.inputType==="insertText"&&(!j.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const N=j.data;return this.coreService.triggerDataEvent(N,!0),this.cancel(j),!0}return!1}resize(j,N){j!==this.cols||N!==this.rows?super.resize(j,N):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(j,N){var K,V;(K=this._charSizeService)==null||K.measure(),(V=this.viewport)==null||V.syncScrollArea(!0)}clear(){var j;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 N=1;N<this.rows;N++)this.buffer.lines.push(this.buffer.getBlankLine(q.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(j=this.viewport)==null||j.reset(),this.refresh(0,this.rows-1)}}reset(){var N,K;this.options.rows=this.rows,this.options.cols=this.cols;const j=this._customKeyEventHandler;this._setup(),super.reset(),(N=this._selectionService)==null||N.reset(),this._decorationService.reset(),(K=this.viewport)==null||K.reset(),this._customKeyEventHandler=j,this.refresh(0,this.rows-1)}clearTextureAtlas(){var j;(j=this._renderService)==null||j.clearTextureAtlas()}_reportFocus(){var j;(j=this.element)!=null&&j.classList.contains("focus")?this.coreService.triggerDataEvent(ee.C0.ESC+"[I"):this.coreService.triggerDataEvent(ee.C0.ESC+"[O")}_reportWindowsOptions(j){if(this._renderService)switch(j){case D.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const N=this._renderService.dimensions.css.canvas.width.toFixed(0),K=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${ee.C0.ESC}[4;${K};${N}t`);break;case D.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const V=this._renderService.dimensions.css.cell.width.toFixed(0),X=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${ee.C0.ESC}[6;${X};${V}t`)}}cancel(j,N){if(this.options.cancelEvents||N)return j.preventDefault(),j.stopPropagation(),!1}}o.Terminal=Y},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,v=this._debounceThresholdMS-m;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},v)}}_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,y){var S,b=arguments.length,E=b<3?f:y===null?y=Object.getOwnPropertyDescriptor(f,p):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(d,f,p,y);else for(var C=d.length-1;C>=0;C--)(S=d[C])&&(E=(b<3?S(E):b>3?S(f,p,E):S(f,p))||E);return b>3&&E&&Object.defineProperty(f,p,E),E},h=this&&this.__param||function(d,f){return function(p,y){f(p,y,d)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const u=l(3656),m=l(4725),v=l(8460),w=l(844),_=l(2585);let g=o.Viewport=class extends w.Disposable{constructor(d,f,p,y,S,b,E,C){super(),this._viewportElement=d,this._scrollArea=f,this._bufferService=p,this._optionsService=y,this._charSizeService=S,this._renderService=b,this._coreBrowserService=E,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 v.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,y="";const S=[],b=f??this._bufferService.buffer.lines.length,E=this._bufferService.buffer.lines;for(let A=d;A<b;A++){const T=E.get(A);if(!T)continue;const O=(C=E.get(A+1))==null?void 0:C.isWrapped;if(y+=T.translateToString(!O),!O||A===E.length-1){const R=document.createElement("div");R.textContent=y,S.push(R),y.length>0&&(p=R),y=""}}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=g=c([h(2,_.IBufferService),h(3,_.IOptionsService),h(4,m.ICharSizeService),h(5,m.IRenderService),h(6,m.ICoreBrowserService),h(7,m.IThemeService)],g)},3107:function(a,o,l){var c=this&&this.__decorate||function(_,g,d,f){var p,y=arguments.length,S=y<3?g:f===null?f=Object.getOwnPropertyDescriptor(g,d):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(_,g,d,f);else for(var b=_.length-1;b>=0;b--)(p=_[b])&&(S=(y<3?p(S):y>3?p(g,d,S):p(g,d))||S);return y>3&&S&&Object.defineProperty(g,d,S),S},h=this&&this.__param||function(_,g){return function(d,f){g(d,f,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;const u=l(4725),m=l(844),v=l(2585);let w=o.BufferDecorationRenderer=class extends m.Disposable{constructor(_,g,d,f,p){super(),this._screenElement=_,this._bufferService=g,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(y=>this._removeDecoration(y))),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 g=this._coreBrowserService.mainDocument.createElement("div");g.classList.add("xterm-decoration"),g.classList.toggle("xterm-decoration-top-layer",((f=_==null?void 0:_.options)==null?void 0:f.layer)==="top"),g.style.width=`${Math.round((_.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,g.style.height=(_.options.height||1)*this._renderService.dimensions.css.cell.height+"px",g.style.top=(_.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",g.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const d=_.options.x??0;return d&&d>this._bufferService.cols&&(g.style.display="none"),this._refreshXPosition(_,g),g}_refreshStyle(_){const g=_.marker.line-this._bufferService.buffers.active.ydisp;if(g<0||g>=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=g*this._renderService.dimensions.css.cell.height+"px",d.style.display=this._altBufferIsActive?"none":"block",_.onRenderEmitter.fire(d)}}_refreshXPosition(_,g=_.element){if(!g)return;const d=_.options.x??0;(_.options.anchor||"left")==="right"?g.style.right=d?d*this._renderService.dimensions.css.cell.width+"px":"":g.style.left=d?d*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(_){var g;(g=this._decorationElements.get(_))==null||g.remove(),this._decorationElements.delete(_),_.dispose()}};o.BufferDecorationRenderer=w=c([h(1,v.IBufferService),h(2,u.ICoreBrowserService),h(3,v.IDecorationService),h(4,u.IRenderService)],w)},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,y,S,b){var E,C=arguments.length,A=C<3?y:b===null?b=Object.getOwnPropertyDescriptor(y,S):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(p,y,S,b);else for(var T=p.length-1;T>=0;T--)(E=p[T])&&(A=(C<3?E(A):C>3?E(y,S,A):E(y,S))||A);return C>3&&A&&Object.defineProperty(y,S,A),A},h=this&&this.__param||function(p,y){return function(S,b){y(S,b,p)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const u=l(5871),m=l(4725),v=l(844),w=l(2585),_={full:0,left:0,center:0,right:0},g={full:0,left:0,center:0,right:0},d={full:0,left:0,center:0,right:0};let f=o.OverviewRulerRenderer=class extends v.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(p,y,S,b,E,C,A){var O;super(),this._viewportElement=p,this._screenElement=y,this._bufferService=S,this._decorationService=b,this._renderService=E,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(),(O=this._viewportElement.parentElement)==null||O.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,v.toDisposable)(()=>{var R;(R=this._canvas)==null||R.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),y=Math.ceil(this._canvas.width/3);g.full=this._canvas.width,g.left=p,g.center=y,g.right=p,this._refreshDrawHeightConstants(),d.full=0,d.left=0,d.center=g.left,d.right=g.left+g.center}_refreshDrawHeightConstants(){_.full=Math.round(2*this._coreBrowserService.dpr);const p=this._canvas.height/this._bufferService.buffer.lines.length,y=Math.round(Math.max(Math.min(p,12),6)*this._coreBrowserService.dpr);_.left=y,_.center=y,_.right=y}_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 y of this._decorationService.decorations)this._colorZoneStore.addDecoration(y);this._ctx.lineWidth=1;const p=this._colorZoneStore.zones;for(const y of p)y.position!=="full"&&this._renderColorZone(y);for(const y of p)y.position==="full"&&this._renderColorZone(y);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),g[p.position||"full"],Math.round((this._canvas.height-1)*((p.endBufferLine-p.startBufferLine)/this._bufferService.buffers.active.lines.length)+_[p.position||"full"]))}_queueRefresh(p,y){this._shouldUpdateDimensions=p||this._shouldUpdateDimensions,this._shouldUpdateAnchor=y||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};o.OverviewRulerRenderer=f=c([h(2,w.IBufferService),h(3,w.IDecorationService),h(4,m.IRenderService),h(5,w.IOptionsService),h(6,m.ICoreBrowserService)],f)},2950:function(a,o,l){var c=this&&this.__decorate||function(_,g,d,f){var p,y=arguments.length,S=y<3?g:f===null?f=Object.getOwnPropertyDescriptor(g,d):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(_,g,d,f);else for(var b=_.length-1;b>=0;b--)(p=_[b])&&(S=(y<3?p(S):y>3?p(g,d,S):p(g,d))||S);return y>3&&S&&Object.defineProperty(g,d,S),S},h=this&&this.__param||function(_,g){return function(d,f){g(d,f,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;const u=l(4725),m=l(2585),v=l(2584);let w=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(_,g,d,f,p,y){this._textarea=_,this._compositionView=g,this._bufferService=d,this._optionsService=f,this._coreService=p,this._renderService=y,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 g={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let d;this._isSendingComposition=!1,g.start+=this._dataAlreadySent.length,d=this._isComposing?this._textarea.value.substring(g.start,g.end):this._textarea.value.substring(g.start),d.length>0&&this._coreService.triggerDataEvent(d,!0)}},0)}else{this._isSendingComposition=!1;const g=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(g,!0)}}_handleAnyTextareaChanges(){const _=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const g=this._textarea.value,d=g.replace(_,"");this._dataAlreadySent=d,g.length>_.length?this._coreService.triggerDataEvent(d,!0):g.length<_.length?this._coreService.triggerDataEvent(`${v.C0.DEL}`,!0):g.length===_.length&&g!==_&&this._coreService.triggerDataEvent(g,!0)}},0)}updateCompositionElements(_){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const g=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=g*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 y=this._compositionView.getBoundingClientRect();this._textarea.style.left=p+"px",this._textarea.style.top=f+"px",this._textarea.style.width=Math.max(y.width,1)+"px",this._textarea.style.height=Math.max(y.height,1)+"px",this._textarea.style.lineHeight=y.height+"px"}_||setTimeout(()=>this.updateCompositionElements(!0),0)}}};o.CompositionHelper=w=c([h(2,m.IBufferService),h(3,m.IOptionsService),h(4,m.ICoreService),h(5,u.IRenderService)],w)},9806:(a,o)=>{function l(c,h,u){const m=u.getBoundingClientRect(),v=c.getComputedStyle(u),w=parseInt(v.getPropertyValue("padding-left")),_=parseInt(v.getPropertyValue("padding-top"));return[h.clientX-m.left-w,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,v,w,_,g,d){if(!w)return;const f=l(c,h,u);return f?(f[0]=Math.ceil((f[0]+(d?_/2:0))/_),f[1]=Math.ceil(f[1]/g),f[0]=Math.min(Math.max(f[0],1),m+(d?1:0)),f[1]=Math.min(Math.max(f[1],1),v),f):void 0}},9504:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const c=l(2584);function h(g,d,f,p){const y=g-u(g,f),S=d-u(d,f),b=Math.abs(y-S)-function(E,C,A){let T=0;const O=E-u(E,A),R=C-u(C,A);for(let M=0;M<Math.abs(O-R);M++){const z=m(E,C)==="A"?-1:1,U=A.buffer.lines.get(O+z*M);U!=null&&U.isWrapped&&T++}return T}(g,d,f);return _(b,w(m(g,d),p))}function u(g,d){let f=0,p=d.buffer.lines.get(g),y=p==null?void 0:p.isWrapped;for(;y&&g>=0&&g<d.rows;)f++,p=d.buffer.lines.get(--g),y=p==null?void 0:p.isWrapped;return f}function m(g,d){return g>d?"A":"B"}function v(g,d,f,p,y,S){let b=g,E=d,C="";for(;b!==f||E!==p;)b+=y?1:-1,y&&b>S.cols-1?(C+=S.buffer.translateBufferLineToString(E,!1,g,b),b=0,g=0,E++):!y&&b<0&&(C+=S.buffer.translateBufferLineToString(E,!1,0,g+1),b=S.cols-1,g=b,E--);return C+S.buffer.translateBufferLineToString(E,!1,g,b)}function w(g,d){const f=d?"O":"[";return c.C0.ESC+f+g}function _(g,d){g=Math.floor(g);let f="";for(let p=0;p<g;p++)f+=d;return f}o.moveToCellSequence=function(g,d,f,p){const y=f.buffer.x,S=f.buffer.y;if(!f.buffer.hasScrollback)return function(C,A,T,O,R,M){return h(A,O,R,M).length===0?"":_(v(C,A,C,A-u(A,R),!1,R).length,w("D",M))}(y,S,0,d,f,p)+h(S,d,f,p)+function(C,A,T,O,R,M){let z;z=h(A,O,R,M).length>0?O-u(O,R):A;const U=O,q=function(ee,W,I,L,B,D){let P;return P=h(I,L,B,D).length>0?L-u(L,B):W,ee<I&&P<=L||ee>=I&&P<L?"C":"D"}(C,A,T,O,R,M);return _(v(C,z,T,U,q==="C",R).length,w(q,M))}(y,S,g,d,f,p);let b;if(S===d)return b=y>g?"D":"C",_(Math.abs(y-g),w(b,p));b=S>d?"D":"C";const E=Math.abs(S-d);return _(function(C,A){return A.cols-C}(S>d?g:y,f)+(E-1)*f.cols+1+((S>d?y:g)-1),w(b,p))}},1296:function(a,o,l){var c=this&&this.__decorate||function(M,z,U,q){var ee,W=arguments.length,I=W<3?z:q===null?q=Object.getOwnPropertyDescriptor(z,U):q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(M,z,U,q);else for(var L=M.length-1;L>=0;L--)(ee=M[L])&&(I=(W<3?ee(I):W>3?ee(z,U,I):ee(z,U))||I);return W>3&&I&&Object.defineProperty(z,U,I),I},h=this&&this.__param||function(M,z){return function(U,q){z(U,q,M)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const u=l(3787),m=l(2550),v=l(2223),w=l(6171),_=l(6052),g=l(4725),d=l(8055),f=l(8460),p=l(844),y=l(2585),S="xterm-dom-renderer-owner-",b="xterm-rows",E="xterm-fg-",C="xterm-bg-",A="xterm-focus",T="xterm-selection";let O=1,R=o.DomRenderer=class extends p.Disposable{constructor(M,z,U,q,ee,W,I,L,B,D,P,$,Y){super(),this._terminal=M,this._document=z,this._element=U,this._screenElement=q,this._viewportElement=ee,this._helperContainer=W,this._linkifier2=I,this._charSizeService=B,this._optionsService=D,this._bufferService=P,this._coreBrowserService=$,this._themeService=Y,this._terminalClass=O++,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,w.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(H=>this._injectCss(H))),this._injectCss(this._themeService.colors),this._rowFactory=L.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(H=>this._handleLinkHover(H))),this.register(this._linkifier2.onHideLinkUnderline(H=>this._handleLinkLeave(H))),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 M=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*M,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*M),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/M),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/M),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 U of this._rowElements)U.style.width=`${this.dimensions.css.canvas.width}px`,U.style.height=`${this.dimensions.css.cell.height}px`,U.style.lineHeight=`${this.dimensions.css.cell.height}px`,U.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(M){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let z=`${this._terminalSelector} .${b} { color: ${M.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(M.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 U=`blink_underline_${this._terminalClass}`,q=`blink_bar_${this._terminalClass}`,ee=`blink_block_${this._terminalClass}`;z+=`@keyframes ${U} { 50% { border-bottom-style: hidden; }}`,z+=`@keyframes ${q} { 50% { box-shadow: none; }}`,z+=`@keyframes ${ee} { 0% { background-color: ${M.cursor.css}; color: ${M.cursorAccent.css}; } 50% { background-color: inherit; color: ${M.cursor.css}; }}`,z+=`${this._terminalSelector} .${b}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${U} 1s step-end infinite;}${this._terminalSelector} .${b}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${q} 1s step-end infinite;}${this._terminalSelector} .${b}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${ee} 1s step-end infinite;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-block { background-color: ${M.cursor.css}; color: ${M.cursorAccent.css};}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${M.cursor.css} !important; color: ${M.cursorAccent.css} !important;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${M.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${M.cursor.css} inset;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${M.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: ${M.selectionBackgroundOpaque.css};}${this._terminalSelector} .${T} div { position: absolute; background-color: ${M.selectionInactiveBackgroundOpaque.css};}`;for(const[W,I]of M.ansi.entries())z+=`${this._terminalSelector} .${E}${W} { color: ${I.css}; }${this._terminalSelector} .${E}${W}.xterm-dim { color: ${d.color.multiplyOpacity(I,.5).css}; }${this._terminalSelector} .${C}${W} { background-color: ${I.css}; }`;z+=`${this._terminalSelector} .${E}${v.INVERTED_DEFAULT_COLOR} { color: ${d.color.opaque(M.background).css}; }${this._terminalSelector} .${E}${v.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${d.color.multiplyOpacity(d.color.opaque(M.background),.5).css}; }${this._terminalSelector} .${C}${v.INVERTED_DEFAULT_COLOR} { background-color: ${M.foreground.css}; }`,this._themeStyleElement.textContent=z}_setDefaultSpacing(){const M=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${M}px`,this._rowFactory.defaultSpacing=M}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(M,z){for(let U=this._rowElements.length;U<=z;U++){const q=this._document.createElement("div");this._rowContainer.appendChild(q),this._rowElements.push(q)}for(;this._rowElements.length>z;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(M,z){this._refreshRowElements(M,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(M,z,U){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(M,z,U),this.renderRows(0,this._bufferService.rows-1),!M||!z)return;this._selectionRenderModel.update(this._terminal,M,z,U);const q=this._selectionRenderModel.viewportStartRow,ee=this._selectionRenderModel.viewportEndRow,W=this._selectionRenderModel.viewportCappedStartRow,I=this._selectionRenderModel.viewportCappedEndRow;if(W>=this._bufferService.rows||I<0)return;const L=this._document.createDocumentFragment();if(U){const B=M[0]>z[0];L.appendChild(this._createSelectionElement(W,B?z[0]:M[0],B?M[0]:z[0],I-W+1))}else{const B=q===W?M[0]:0,D=W===ee?z[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(W,B,D));const P=I-W-1;if(L.appendChild(this._createSelectionElement(W+1,0,this._bufferService.cols,P)),W!==I){const $=ee===I?z[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(I,0,$))}}this._selectionContainer.appendChild(L)}_createSelectionElement(M,z,U,q=1){const ee=this._document.createElement("div"),W=z*this.dimensions.css.cell.width;let I=this.dimensions.css.cell.width*(U-z);return W+I>this.dimensions.css.canvas.width&&(I=this.dimensions.css.canvas.width-W),ee.style.height=q*this.dimensions.css.cell.height+"px",ee.style.top=M*this.dimensions.css.cell.height+"px",ee.style.left=`${W}px`,ee.style.width=`${I}px`,ee}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 M of this._rowElements)M.replaceChildren()}renderRows(M,z){const U=this._bufferService.buffer,q=U.ybase+U.y,ee=Math.min(U.x,this._bufferService.cols-1),W=this._optionsService.rawOptions.cursorBlink,I=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let B=M;B<=z;B++){const D=B+U.ydisp,P=this._rowElements[B],$=U.lines.get(D);if(!P||!$)break;P.replaceChildren(...this._rowFactory.createRow($,D,D===q,I,L,ee,W,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${S}${this._terminalClass}`}_handleLinkHover(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!0)}_handleLinkLeave(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!1)}_setCellUnderline(M,z,U,q,ee,W){U<0&&(M=0),q<0&&(z=0);const I=this._bufferService.rows-1;U=Math.max(Math.min(U,I),0),q=Math.max(Math.min(q,I),0),ee=Math.min(ee,this._bufferService.cols);const L=this._bufferService.buffer,B=L.ybase+L.y,D=Math.min(L.x,ee-1),P=this._optionsService.rawOptions.cursorBlink,$=this._optionsService.rawOptions.cursorStyle,Y=this._optionsService.rawOptions.cursorInactiveStyle;for(let H=U;H<=q;++H){const j=H+L.ydisp,N=this._rowElements[H],K=L.lines.get(j);if(!N||!K)break;N.replaceChildren(...this._rowFactory.createRow(K,j,j===B,$,Y,D,P,this.dimensions.css.cell.width,this._widthCache,W?H===U?M:0:-1,W?(H===q?z:ee)-1:-1))}}};o.DomRenderer=R=c([h(7,y.IInstantiationService),h(8,g.ICharSizeService),h(9,y.IOptionsService),h(10,y.IBufferService),h(11,g.ICoreBrowserService),h(12,g.IThemeService)],R)},3787:function(a,o,l){var c=this&&this.__decorate||function(b,E,C,A){var T,O=arguments.length,R=O<3?E:A===null?A=Object.getOwnPropertyDescriptor(E,C):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(b,E,C,A);else for(var M=b.length-1;M>=0;M--)(T=b[M])&&(R=(O<3?T(R):O>3?T(E,C,R):T(E,C))||R);return O>3&&R&&Object.defineProperty(E,C,R),R},h=this&&this.__param||function(b,E){return function(C,A){E(C,A,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const u=l(2223),m=l(643),v=l(511),w=l(2585),_=l(8055),g=l(4725),d=l(4269),f=l(6171),p=l(3734);let y=o.DomRendererRowFactory=class{constructor(b,E,C,A,T,O,R){this._document=b,this._characterJoinerService=E,this._optionsService=C,this._coreBrowserService=A,this._coreService=T,this._decorationService=O,this._themeService=R,this._workCell=new v.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(b,E,C){this._selectionStart=b,this._selectionEnd=E,this._columnSelectMode=C}createRow(b,E,C,A,T,O,R,M,z,U,q){const ee=[],W=this._characterJoinerService.getJoinedCharacters(E),I=this._themeService.colors;let L,B=b.getNoBgTrimmedLength();C&&B<O+1&&(B=O+1);let D=0,P="",$=0,Y=0,H=0,j=!1,N=0,K=!1,V=0;const X=[],re=U!==-1&&q!==-1;for(let ce=0;ce<B;ce++){b.loadCell(ce,this._workCell);let ge=this._workCell.getWidth();if(ge===0)continue;let ae=!1,Se=ce,ye=this._workCell;if(W.length>0&&ce===W[0][0]){ae=!0;const Ae=W.shift();ye=new d.JoinedCellData(this._workCell,b.translateToString(!0,Ae[0],Ae[1]),Ae[1]-Ae[0]),Se=Ae[1]-1,ge=ye.getWidth()}const We=this._isCellInSelection(ce,E),Ge=C&&ce===O,Re=re&&ce>=U&&ce<=q;let Ne=!1;this._decorationService.forEachDecorationAtCell(ce,E,void 0,Ae=>{Ne=!0});let qe=ye.getChars()||m.WHITESPACE_CELL_CHAR;if(qe===" "&&(ye.isUnderline()||ye.isOverline())&&(qe=" "),V=ge*M-z.get(qe,ye.isBold(),ye.isItalic()),L){if(D&&(We&&K||!We&&!K&&ye.bg===$)&&(We&&K&&I.selectionForeground||ye.fg===Y)&&ye.extended.ext===H&&Re===j&&V===N&&!Ge&&!ae&&!Ne){ye.isInvisible()?P+=m.WHITESPACE_CELL_CHAR:P+=qe,D++;continue}D&&(L.textContent=P),L=this._document.createElement("span"),D=0,P=""}else L=this._document.createElement("span");if($=ye.bg,Y=ye.fg,H=ye.extended.ext,j=Re,N=V,K=We,ae&&O>=ce&&O<=Se&&(O=ce),!this._coreService.isCursorHidden&&Ge&&this._coreService.isCursorInitialized){if(X.push("xterm-cursor"),this._coreBrowserService.isFocused)R&&X.push("xterm-cursor-blink"),X.push(A==="bar"?"xterm-cursor-bar":A==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(T)switch(T){case"outline":X.push("xterm-cursor-outline");break;case"block":X.push("xterm-cursor-block");break;case"bar":X.push("xterm-cursor-bar");break;case"underline":X.push("xterm-cursor-underline")}}if(ye.isBold()&&X.push("xterm-bold"),ye.isItalic()&&X.push("xterm-italic"),ye.isDim()&&X.push("xterm-dim"),P=ye.isInvisible()?m.WHITESPACE_CELL_CHAR:ye.getChars()||m.WHITESPACE_CELL_CHAR,ye.isUnderline()&&(X.push(`xterm-underline-${ye.extended.underlineStyle}`),P===" "&&(P=" "),!ye.isUnderlineColorDefault()))if(ye.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${p.AttributeData.toColorRGB(ye.getUnderlineColor()).join(",")})`;else{let Ae=ye.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&ye.isBold()&&Ae<8&&(Ae+=8),L.style.textDecorationColor=I.ansi[Ae].css}ye.isOverline()&&(X.push("xterm-overline"),P===" "&&(P=" ")),ye.isStrikethrough()&&X.push("xterm-strikethrough"),Re&&(L.style.textDecoration="underline");let Ce=ye.getFgColor(),ke=ye.getFgColorMode(),Ie=ye.getBgColor(),te=ye.getBgColorMode();const oe=!!ye.isInverse();if(oe){const Ae=Ce;Ce=Ie,Ie=Ae;const Te=ke;ke=te,te=Te}let F,me,pe,Oe=!1;switch(this._decorationService.forEachDecorationAtCell(ce,E,void 0,Ae=>{Ae.options.layer!=="top"&&Oe||(Ae.backgroundColorRGB&&(te=50331648,Ie=Ae.backgroundColorRGB.rgba>>8&16777215,F=Ae.backgroundColorRGB),Ae.foregroundColorRGB&&(ke=50331648,Ce=Ae.foregroundColorRGB.rgba>>8&16777215,me=Ae.foregroundColorRGB),Oe=Ae.options.layer==="top")}),!Oe&&We&&(F=this._coreBrowserService.isFocused?I.selectionBackgroundOpaque:I.selectionInactiveBackgroundOpaque,Ie=F.rgba>>8&16777215,te=50331648,Oe=!0,I.selectionForeground&&(ke=50331648,Ce=I.selectionForeground.rgba>>8&16777215,me=I.selectionForeground)),Oe&&X.push("xterm-decoration-top"),te){case 16777216:case 33554432:pe=I.ansi[Ie],X.push(`xterm-bg-${Ie}`);break;case 50331648:pe=_.channels.toColor(Ie>>16,Ie>>8&255,255&Ie),this._addStyle(L,`background-color:#${S((Ie>>>0).toString(16),"0",6)}`);break;default:oe?(pe=I.foreground,X.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):pe=I.background}switch(F||ye.isDim()&&(F=_.color.multiplyOpacity(pe,.5)),ke){case 16777216:case 33554432:ye.isBold()&&Ce<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Ce+=8),this._applyMinimumContrast(L,pe,I.ansi[Ce],ye,F,void 0)||X.push(`xterm-fg-${Ce}`);break;case 50331648:const Ae=_.channels.toColor(Ce>>16&255,Ce>>8&255,255&Ce);this._applyMinimumContrast(L,pe,Ae,ye,F,me)||this._addStyle(L,`color:#${S(Ce.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,pe,I.foreground,ye,F,me)||oe&&X.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}X.length&&(L.className=X.join(" "),X.length=0),Ge||ae||Ne?L.textContent=P:D++,V!==this.defaultSpacing&&(L.style.letterSpacing=`${V}px`),ee.push(L),ce=Se}return L&&D&&(L.textContent=P),ee}_applyMinimumContrast(b,E,C,A,T,O){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,f.treatGlyphAsBackgroundColor)(A.getCode()))return!1;const R=this._getContrastCache(A);let M;if(T||O||(M=R.getColor(E.rgba,C.rgba)),M===void 0){const z=this._optionsService.rawOptions.minimumContrastRatio/(A.isDim()?2:1);M=_.color.ensureContrastRatio(T||E,O||C,z),R.setColor((T||E).rgba,(O||C).rgba,M??null)}return!!M&&(this._addStyle(b,`color:${M.css}`),!0)}_getContrastCache(b){return b.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(b,E){b.setAttribute("style",`${b.getAttribute("style")||""}${E};`)}_isCellInSelection(b,E){const C=this._selectionStart,A=this._selectionEnd;return!(!C||!A)&&(this._columnSelectMode?C[0]<=A[0]?b>=C[0]&&E>=C[1]&&b<A[0]&&E<=A[1]:b<C[0]&&E>=C[1]&&b>=A[0]&&E<=A[1]:E>C[1]&&E<A[1]||C[1]===A[1]&&E===C[1]&&b>=C[0]&&b<A[0]||C[1]<A[1]&&E===A[1]&&b<A[0]||C[1]<A[1]&&E===C[1]&&b>=C[0])}};function S(b,E,C){for(;b.length<C;)b=E+b;return b}o.DomRendererRowFactory=y=c([h(1,g.ICharacterJoinerService),h(2,w.IOptionsService),h(3,g.ICoreBrowserService),h(4,w.ICoreService),h(5,w.IDecorationService),h(6,g.IThemeService)],y)},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 v=l.createElement("span");v.classList.add("xterm-char-measure-element"),v.style.fontWeight="bold",v.style.fontStyle="italic",this._measureElements=[h,u,m,v],this._container.appendChild(h),this._container.appendChild(u),this._container.appendChild(m),this._container.appendChild(v),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 w=this._measure(l,0);return w>0&&(this._flat[u]=w),w}let m=l;c&&(m+="B"),h&&(m+="I");let v=this._holey.get(m);if(v===void 0){let w=0;c&&(w|=1),h&&(w|=2),v=this._measure(l,w),v>0&&this._holey.set(m,v)}return v}_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,v){return u===1&&m>Math.ceil(1.5*v)&&h!==void 0&&h>255&&!c(h)&&!l(h)&&!function(w){return 57344<=w&&w<=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,v=!1){if(this.selectionStart=u,this.selectionEnd=m,!u||!m||u[0]===m[0]&&u[1]===m[1])return void this.clear();const w=h.buffers.active.ydisp,_=u[1]-w,g=m[1]-w,d=Math.max(_,0),f=Math.min(g,h.rows-1);d>=h.rows||f<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=v,this.viewportStartRow=_,this.viewportEndRow=g,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,y,S){var b,E=arguments.length,C=E<3?p:S===null?S=Object.getOwnPropertyDescriptor(p,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,p,y,S);else for(var A=f.length-1;A>=0;A--)(b=f[A])&&(C=(E<3?b(C):E>3?b(p,y,C):b(p,y))||C);return E>3&&C&&Object.defineProperty(p,y,C),C},h=this&&this.__param||function(f,p){return function(y,S){p(y,S,f)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const u=l(2585),m=l(8460),v=l(844);let w=o.CharSizeService=class extends v.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(f,p,y){super(),this._optionsService=y,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 g(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=w=c([h(2,u.IOptionsService)],w);class _ extends v.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(p,y){p!==void 0&&p>0&&y!==void 0&&y>0&&(this._result.width=p,this._result.height=y)}}class g extends _{constructor(p,y,S){super(),this._document=p,this._parentElement=y,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 y=this._ctx.measureText("W");if(!("width"in y&&"fontBoundingBoxAscent"in y&&"fontBoundingBoxDescent"in y))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,y){var S,b=arguments.length,E=b<3?f:y===null?y=Object.getOwnPropertyDescriptor(f,p):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(d,f,p,y);else for(var C=d.length-1;C>=0;C--)(S=d[C])&&(E=(b<3?S(E):b>3?S(f,p,E):S(f,p))||E);return b>3&&E&&Object.defineProperty(f,p,E),E},h=this&&this.__param||function(d,f){return function(p,y){f(p,y,d)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const u=l(3734),m=l(643),v=l(511),w=l(2585);class _ extends u.AttributeData{constructor(f,p,y){super(),this.content=0,this.combinedData="",this.fg=f.fg,this.bg=f.bg,this.combinedData=p,this._width=y}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 g=o.CharacterJoinerService=class XC{constructor(f){this._bufferService=f,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new v.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 y=[],S=p.translateToString(!0);let b=0,E=0,C=0,A=p.getFg(0),T=p.getBg(0);for(let O=0;O<p.getTrimmedLength();O++)if(p.loadCell(O,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==A||this._workCell.bg!==T){if(O-b>1){const R=this._getJoinedRanges(S,C,E,p,b);for(let M=0;M<R.length;M++)y.push(R[M])}b=O,C=E,A=this._workCell.fg,T=this._workCell.bg}E+=this._workCell.getChars().length||m.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-b>1){const O=this._getJoinedRanges(S,C,E,p,b);for(let R=0;R<O.length;R++)y.push(O[R])}return y}_getJoinedRanges(f,p,y,S,b){const E=f.substring(p,y);let C=[];try{C=this._characterJoiners[0].handler(E)}catch(A){console.error(A)}for(let A=1;A<this._characterJoiners.length;A++)try{const T=this._characterJoiners[A].handler(E);for(let O=0;O<T.length;O++)XC._mergeRanges(C,T[O])}catch(T){console.error(T)}return this._stringRangesToCellRanges(C,S,b),C}_stringRangesToCellRanges(f,p,y){let S=0,b=!1,E=0,C=f[S];if(C){for(let A=y;A<this._bufferService.cols;A++){const T=p.getWidth(A),O=p.getString(A).length||m.WHITESPACE_CELL_CHAR.length;if(T!==0){if(!b&&C[0]<=E&&(C[0]=A,b=!0),C[1]<=E){if(C[1]=A,C=f[++S],!C)break;C[0]<=E?(C[0]=A,b=!0):b=!1}E+=O}}C&&(C[1]=this._bufferService.cols)}}static _mergeRanges(f,p){let y=!1;for(let S=0;S<f.length;S++){const b=f[S];if(y){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]),y=!0)}}return y?f[f.length-1][1]=p[1]:f.push(p),f}};o.CharacterJoinerService=g=c([h(0,w.IBufferService)],g)},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(_,g,d){super(),this._textarea=_,this._window=g,this.mainDocument=d,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new v(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 v 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 v=this.linkProviders.indexOf(m);v!==-1&&this.linkProviders.splice(v,1)}}}}o.LinkProviderService=h},8934:function(a,o,l){var c=this&&this.__decorate||function(w,_,g,d){var f,p=arguments.length,y=p<3?_:d===null?d=Object.getOwnPropertyDescriptor(_,g):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(w,_,g,d);else for(var S=w.length-1;S>=0;S--)(f=w[S])&&(y=(p<3?f(y):p>3?f(_,g,y):f(_,g))||y);return p>3&&y&&Object.defineProperty(_,g,y),y},h=this&&this.__param||function(w,_){return function(g,d){_(g,d,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const u=l(4725),m=l(9806);let v=o.MouseService=class{constructor(w,_){this._renderService=w,this._charSizeService=_}getCoords(w,_,g,d,f){return(0,m.getCoords)(window,w,_,g,d,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,f)}getMouseReportCoords(w,_){const g=(0,m.getCoordsRelativeToElement)(window,w,_);if(this._charSizeService.hasValidSize)return g[0]=Math.min(Math.max(g[0],0),this._renderService.dimensions.css.canvas.width-1),g[1]=Math.min(Math.max(g[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(g[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(g[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(g[0]),y:Math.floor(g[1])}}};o.MouseService=v=c([h(0,u.IRenderService),h(1,u.ICharSizeService)],v)},3230:function(a,o,l){var c=this&&this.__decorate||function(f,p,y,S){var b,E=arguments.length,C=E<3?p:S===null?S=Object.getOwnPropertyDescriptor(p,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,p,y,S);else for(var A=f.length-1;A>=0;A--)(b=f[A])&&(C=(E<3?b(C):E>3?b(p,y,C):b(p,y))||C);return E>3&&C&&Object.defineProperty(p,y,C),C},h=this&&this.__param||function(f,p){return function(y,S){p(y,S,f)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const u=l(6193),m=l(4725),v=l(8460),w=l(844),_=l(7226),g=l(2585);let d=o.RenderService=class extends w.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(f,p,y,S,b,E,C,A){super(),this._rowCount=f,this._charSizeService=S,this._renderer=this.register(new w.MutableDisposable),this._pausedResizeTask=new _.DebouncedIdleTask,this._observerDisposable=this.register(new w.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 v.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new v.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new v.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new v.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new u.RenderDebouncer((T,O)=>this._renderRows(T,O),C),this.register(this._renderDebouncer),this.register(C.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(E.onResize(()=>this._fullRefresh())),this.register(E.buffers.onBufferActivate(()=>{var T;return(T=this._renderer.value)==null?void 0:T.clear()})),this.register(y.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(b.onDecorationRegistered(()=>this._fullRefresh())),this.register(b.onDecorationRemoved(()=>this._fullRefresh())),this.register(y.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(E.cols,E.rows),this._fullRefresh()})),this.register(y.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(E.buffer.y,E.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 y=new f.IntersectionObserver(S=>this._handleIntersectionChange(S[S.length-1]),{threshold:0});y.observe(p),this._observerDisposable.value=(0,w.toDisposable)(()=>y.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,y=!1){this._isPaused?this._needsFullRefresh=!0:(y||(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 y;return(y=this._renderer.value)==null?void 0:y.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,y){var S;this._selectionState.start=f,this._selectionState.end=p,this._selectionState.columnSelectMode=y,(S=this._renderer.value)==null||S.handleSelectionChanged(f,p,y)}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,g.IOptionsService),h(3,m.ICharSizeService),h(4,g.IDecorationService),h(5,g.IBufferService),h(6,m.ICoreBrowserService),h(7,m.IThemeService)],d)},9312:function(a,o,l){var c=this&&this.__decorate||function(C,A,T,O){var R,M=arguments.length,z=M<3?A:O===null?O=Object.getOwnPropertyDescriptor(A,T):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(C,A,T,O);else for(var U=C.length-1;U>=0;U--)(R=C[U])&&(z=(M<3?R(z):M>3?R(A,T,z):R(A,T))||z);return M>3&&z&&Object.defineProperty(A,T,z),z},h=this&&this.__param||function(C,A){return function(T,O){A(T,O,C)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const u=l(9806),m=l(9504),v=l(456),w=l(4725),_=l(8460),g=l(844),d=l(6114),f=l(4841),p=l(511),y=l(2585),S=" ",b=new RegExp(S,"g");let E=o.SelectionService=class extends g.Disposable{constructor(C,A,T,O,R,M,z,U,q){super(),this._element=C,this._screenElement=A,this._linkifier=T,this._bufferService=O,this._coreService=R,this._mouseService=M,this._optionsService=z,this._renderService=U,this._coreBrowserService=q,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=ee=>this._handleMouseMove(ee),this._mouseUpListener=ee=>this._handleMouseUp(ee),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(ee=>this._handleTrim(ee)),this.register(this._bufferService.buffers.onBufferActivate(ee=>this._handleBufferActivate(ee))),this.enable(),this._model=new v.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,g.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,O=[];if(this._activeSelectionMode===3){if(C[0]===A[0])return"";const R=C[0]<A[0]?C[0]:A[0],M=C[0]<A[0]?A[0]:C[0];for(let z=C[1];z<=A[1];z++){const U=T.translateBufferLineToString(z,!0,R,M);O.push(U)}}else{const R=C[1]===A[1]?A[0]:void 0;O.push(T.translateBufferLineToString(C[1],!0,C[0],R));for(let M=C[1]+1;M<=A[1]-1;M++){const z=T.lines.get(M),U=T.translateBufferLineToString(M,!0);z!=null&&z.isWrapped?O[O.length-1]+=U:O.push(U)}if(C[1]!==A[1]){const M=T.lines.get(A[1]),z=T.translateBufferLineToString(A[1],!0,0,A[0]);M&&M.isWrapped?O[O.length-1]+=z:O.push(z)}}return O.map(R=>R.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,O=this._model.finalSelectionEnd;return!!(T&&O&&A)&&this._areCoordsInSelection(A,T,O)}isCellInSelection(C,A){const T=this._model.finalSelectionStart,O=this._model.finalSelectionEnd;return!(!T||!O)&&this._areCoordsInSelection([C,A],T,O)}_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 R,M;const T=(M=(R=this._linkifier.currentLink)==null?void 0:R.link)==null?void 0:M.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 O=this._getMouseBufferCoords(C);return!!O&&(this._selectWordAt(O,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 O=T.lines.get(this._model.selectionEnd[1]);O&&O.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 O=(0,m.moveToCellSequence)(T[0]-1,T[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(O,!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 O=0;A>=O;O++){const R=C.loadCell(O,this._workCell).getChars().length;this._workCell.getWidth()===0?T--:R>1&&A!==O&&(T+=R-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,O=!0){if(C[0]>=this._bufferService.cols)return;const R=this._bufferService.buffer,M=R.lines.get(C[1]);if(!M)return;const z=R.translateBufferLineToString(C[1],!1);let U=this._convertViewportColToCharacterIndex(M,C[0]),q=U;const ee=C[0]-U;let W=0,I=0,L=0,B=0;if(z.charAt(U)===" "){for(;U>0&&z.charAt(U-1)===" ";)U--;for(;q<z.length&&z.charAt(q+1)===" ";)q++}else{let $=C[0],Y=C[0];M.getWidth($)===0&&(W++,$--),M.getWidth(Y)===2&&(I++,Y++);const H=M.getString(Y).length;for(H>1&&(B+=H-1,q+=H-1);$>0&&U>0&&!this._isCharWordSeparator(M.loadCell($-1,this._workCell));){M.loadCell($-1,this._workCell);const j=this._workCell.getChars().length;this._workCell.getWidth()===0?(W++,$--):j>1&&(L+=j-1,U-=j-1),U--,$--}for(;Y<M.length&&q+1<z.length&&!this._isCharWordSeparator(M.loadCell(Y+1,this._workCell));){M.loadCell(Y+1,this._workCell);const j=this._workCell.getChars().length;this._workCell.getWidth()===2?(I++,Y++):j>1&&(B+=j-1,q+=j-1),q++,Y++}}q++;let D=U+ee-W+L,P=Math.min(this._bufferService.cols,q-U+W+I-L-B);if(A||z.slice(U,q).trim()!==""){if(T&&D===0&&M.getCodePoint(0)!==32){const $=R.lines.get(C[1]-1);if($&&M.isWrapped&&$.getCodePoint(this._bufferService.cols-1)!==32){const Y=this._getWordAt([this._bufferService.cols-1,C[1]-1],!1,!0,!1);if(Y){const H=this._bufferService.cols-Y.start;D-=H,P+=H}}}if(O&&D+P===this._bufferService.cols&&M.getCodePoint(this._bufferService.cols-1)!==32){const $=R.lines.get(C[1]+1);if($!=null&&$.isWrapped&&$.getCodePoint(0)!==32){const Y=this._getWordAt([0,C[1]+1],!1,!1,!0);Y&&(P+=Y.length)}}return{start:D,length:P}}}_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=E=c([h(3,y.IBufferService),h(4,y.ICoreService),h(5,w.IMouseService),h(6,y.IOptionsService),h(7,w.IRenderService),h(8,w.ICoreBrowserService)],E)},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(E,C,A,T){var O,R=arguments.length,M=R<3?C:T===null?T=Object.getOwnPropertyDescriptor(C,A):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(E,C,A,T);else for(var z=E.length-1;z>=0;z--)(O=E[z])&&(M=(R<3?O(M):R>3?O(C,A,M):O(C,A))||M);return R>3&&M&&Object.defineProperty(C,A,M),M},h=this&&this.__param||function(E,C){return function(A,T){C(A,T,E)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const u=l(7239),m=l(8055),v=l(8460),w=l(844),_=l(2585),g=m.css.toColor("#ffffff"),d=m.css.toColor("#000000"),f=m.css.toColor("#ffffff"),p=m.css.toColor("#000000"),y={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const E=[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],O=C[A/6%6|0],R=C[A%6];E.push({css:m.channels.toCss(T,O,R),rgba:m.channels.toRgba(T,O,R)})}for(let A=0;A<24;A++){const T=8+10*A;E.push({css:m.channels.toCss(T,T,T),rgba:m.channels.toRgba(T,T,T)})}return E})());let S=o.ThemeService=class extends w.Disposable{get colors(){return this._colors}constructor(E){super(),this._optionsService=E,this._contrastCache=new u.ColorContrastCache,this._halfContrastCache=new u.ColorContrastCache,this._onChangeColors=this.register(new v.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:g,background:d,cursor:f,cursorAccent:p,selectionForeground:void 0,selectionBackgroundTransparent:y,selectionBackgroundOpaque:m.color.blend(d,y),selectionInactiveBackgroundTransparent:y,selectionInactiveBackgroundOpaque:m.color.blend(d,y),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(E={}){const C=this._colors;if(C.foreground=b(E.foreground,g),C.background=b(E.background,d),C.cursor=b(E.cursor,f),C.cursorAccent=b(E.cursorAccent,p),C.selectionBackgroundTransparent=b(E.selectionBackground,y),C.selectionBackgroundOpaque=m.color.blend(C.background,C.selectionBackgroundTransparent),C.selectionInactiveBackgroundTransparent=b(E.selectionInactiveBackground,C.selectionBackgroundTransparent),C.selectionInactiveBackgroundOpaque=m.color.blend(C.background,C.selectionInactiveBackgroundTransparent),C.selectionForeground=E.selectionForeground?b(E.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(E.black,o.DEFAULT_ANSI_COLORS[0]),C.ansi[1]=b(E.red,o.DEFAULT_ANSI_COLORS[1]),C.ansi[2]=b(E.green,o.DEFAULT_ANSI_COLORS[2]),C.ansi[3]=b(E.yellow,o.DEFAULT_ANSI_COLORS[3]),C.ansi[4]=b(E.blue,o.DEFAULT_ANSI_COLORS[4]),C.ansi[5]=b(E.magenta,o.DEFAULT_ANSI_COLORS[5]),C.ansi[6]=b(E.cyan,o.DEFAULT_ANSI_COLORS[6]),C.ansi[7]=b(E.white,o.DEFAULT_ANSI_COLORS[7]),C.ansi[8]=b(E.brightBlack,o.DEFAULT_ANSI_COLORS[8]),C.ansi[9]=b(E.brightRed,o.DEFAULT_ANSI_COLORS[9]),C.ansi[10]=b(E.brightGreen,o.DEFAULT_ANSI_COLORS[10]),C.ansi[11]=b(E.brightYellow,o.DEFAULT_ANSI_COLORS[11]),C.ansi[12]=b(E.brightBlue,o.DEFAULT_ANSI_COLORS[12]),C.ansi[13]=b(E.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),C.ansi[14]=b(E.brightCyan,o.DEFAULT_ANSI_COLORS[14]),C.ansi[15]=b(E.brightWhite,o.DEFAULT_ANSI_COLORS[15]),E.extendedAnsi){const A=Math.min(C.ansi.length-16,E.extendedAnsi.length);for(let T=0;T<A;T++)C.ansi[T+16]=b(E.extendedAnsi[T],o.DEFAULT_ANSI_COLORS[T+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(E){this._restoreColor(E),this._onChangeColors.fire(this.colors)}_restoreColor(E){if(E!==void 0)switch(E){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[E]=this._restoreColors.ansi[E]}else for(let C=0;C<this._restoreColors.ansi.length;++C)this._colors.ansi[C]=this._restoreColors.ansi[C]}modifyColors(E){E(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(E,C){if(E!==void 0)try{return m.css.toColor(E)}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(v){super(),this._maxLength=v,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(v){if(this._maxLength===v)return;const w=new Array(v);for(let _=0;_<Math.min(v,this.length);_++)w[_]=this._array[this._getCyclicIndex(_)];this._array=w,this._maxLength=v,this._startIndex=0}get length(){return this._length}set length(v){if(v>this._length)for(let w=this._length;w<v;w++)this._array[w]=void 0;this._length=v}get(v){return this._array[this._getCyclicIndex(v)]}set(v,w){this._array[this._getCyclicIndex(v)]=w}push(v){this._array[this._getCyclicIndex(this._length)]=v,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(v,w,..._){if(w){for(let g=v;g<this._length-w;g++)this._array[this._getCyclicIndex(g)]=this._array[this._getCyclicIndex(g+w)];this._length-=w,this.onDeleteEmitter.fire({index:v,amount:w})}for(let g=this._length-1;g>=v;g--)this._array[this._getCyclicIndex(g+_.length)]=this._array[this._getCyclicIndex(g)];for(let g=0;g<_.length;g++)this._array[this._getCyclicIndex(v+g)]=_[g];if(_.length&&this.onInsertEmitter.fire({index:v,amount:_.length}),this._length+_.length>this._maxLength){const g=this._length+_.length-this._maxLength;this._startIndex+=g,this._length=this._maxLength,this.onTrimEmitter.fire(g)}else this._length+=_.length}trimStart(v){v>this._length&&(v=this._length),this._startIndex+=v,this._length-=v,this.onTrimEmitter.fire(v)}shiftElements(v,w,_){if(!(w<=0)){if(v<0||v>=this._length)throw new Error("start argument out of range");if(v+_<0)throw new Error("Cannot shift elements in list beyond index 0");if(_>0){for(let d=w-1;d>=0;d--)this.set(v+d+_,this.get(v+d));const g=v+w+_-this._length;if(g>0)for(this._length+=g;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let g=0;g<w;g++)this.set(v+g+_,this.get(v+g))}}_getCyclicIndex(v){return(this._startIndex+v)%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,v,w,_,g;function d(p){const y=p.toString(16);return y.length<2?"0"+y:y}function f(p,y){return p<y?(y+.05)/(p+.05):(p+.05)/(y+.05)}o.NULL_COLOR={css:"#00000000",rgba:0},function(p){p.toCss=function(y,S,b,E){return E!==void 0?`#${d(y)}${d(S)}${d(b)}${d(E)}`:`#${d(y)}${d(S)}${d(b)}`},p.toRgba=function(y,S,b,E=255){return(y<<24|S<<16|b<<8|E)>>>0},p.toColor=function(y,S,b,E){return{css:p.toCss(y,S,b,E),rgba:p.toRgba(y,S,b,E)}}}(m||(o.channels=m={})),function(p){function y(S,b){return u=Math.round(255*b),[l,c,h]=g.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 E=b.rgba>>24&255,C=b.rgba>>16&255,A=b.rgba>>8&255,T=S.rgba>>24&255,O=S.rgba>>16&255,R=S.rgba>>8&255;return l=T+Math.round((E-T)*u),c=O+Math.round((C-O)*u),h=R+Math.round((A-R)*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,E){const C=g.ensureContrastRatio(S.rgba,b.rgba,E);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]=g.toChannels(b),{css:m.toCss(l,c,h),rgba:b}},p.opacity=y,p.multiplyOpacity=function(S,b){return u=255&S.rgba,y(S,u*b/255)},p.toColorRGB=function(S){return[S.rgba>>24&255,S.rgba>>16&255,S.rgba>>8&255]}}(v||(o.color=v={})),function(p){let y,S;try{const b=document.createElement("canvas");b.width=1,b.height=1;const E=b.getContext("2d",{willReadFrequently:!0});E&&(y=E,y.globalCompositeOperation="copy",S=y.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 E=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(E)return l=parseInt(E[1]),c=parseInt(E[2]),h=parseInt(E[3]),u=Math.round(255*(E[5]===void 0?1:parseFloat(E[5]))),m.toColor(l,c,h,u);if(!y||!S)throw new Error("css.toColor: Unsupported css format");if(y.fillStyle=S,y.fillStyle=b,typeof y.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(y.fillRect(0,0,1,1),[l,c,h,u]=y.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}}}(w||(o.css=w={})),function(p){function y(S,b,E){const C=S/255,A=b/255,T=E/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 y(S>>16&255,S>>8&255,255&S)},p.relativeLuminance2=y}(_||(o.rgb=_={})),function(p){function y(b,E,C){const A=b>>24&255,T=b>>16&255,O=b>>8&255;let R=E>>24&255,M=E>>16&255,z=E>>8&255,U=f(_.relativeLuminance2(R,M,z),_.relativeLuminance2(A,T,O));for(;U<C&&(R>0||M>0||z>0);)R-=Math.max(0,Math.ceil(.1*R)),M-=Math.max(0,Math.ceil(.1*M)),z-=Math.max(0,Math.ceil(.1*z)),U=f(_.relativeLuminance2(R,M,z),_.relativeLuminance2(A,T,O));return(R<<24|M<<16|z<<8|255)>>>0}function S(b,E,C){const A=b>>24&255,T=b>>16&255,O=b>>8&255;let R=E>>24&255,M=E>>16&255,z=E>>8&255,U=f(_.relativeLuminance2(R,M,z),_.relativeLuminance2(A,T,O));for(;U<C&&(R<255||M<255||z<255);)R=Math.min(255,R+Math.ceil(.1*(255-R))),M=Math.min(255,M+Math.ceil(.1*(255-M))),z=Math.min(255,z+Math.ceil(.1*(255-z))),U=f(_.relativeLuminance2(R,M,z),_.relativeLuminance2(A,T,O));return(R<<24|M<<16|z<<8|255)>>>0}p.blend=function(b,E){if(u=(255&E)/255,u===1)return E;const C=E>>24&255,A=E>>16&255,T=E>>8&255,O=b>>24&255,R=b>>16&255,M=b>>8&255;return l=O+Math.round((C-O)*u),c=R+Math.round((A-R)*u),h=M+Math.round((T-M)*u),m.toRgba(l,c,h)},p.ensureContrastRatio=function(b,E,C){const A=_.relativeLuminance(b>>8),T=_.relativeLuminance(E>>8);if(f(A,T)<C){if(T<A){const M=y(b,E,C),z=f(A,_.relativeLuminance(M>>8));if(z<C){const U=S(b,E,C);return z>f(A,_.relativeLuminance(U>>8))?M:U}return M}const O=S(b,E,C),R=f(A,_.relativeLuminance(O>>8));if(R<C){const M=y(b,E,C);return R>f(A,_.relativeLuminance(M>>8))?O:M}return O}},p.reduceLuminance=y,p.increaseLuminance=S,p.toChannels=function(b){return[b>>24&255,b>>16&255,b>>8&255,255&b]}}(g||(o.rgba=g={})),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),v=l(744),w=l(7302),_=l(6975),g=l(8460),d=l(1753),f=l(1480),p=l(7994),y=l(9282),S=l(5435),b=l(5981),E=l(2660);let C=!1;class A extends c.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new g.EventEmitter),this._onScroll.event(O=>{var R;(R=this._onScrollApi)==null||R.fire(O.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(O){for(const R in O)this.optionsService.options[R]=O[R]}constructor(O){super(),this._windowsWrappingHeuristics=this.register(new c.MutableDisposable),this._onBinary=this.register(new g.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new g.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new g.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new g.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new g.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new g.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new w.OptionsService(O)),this._instantiationService.setService(h.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(v.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(E.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,g.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,g.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,g.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,g.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(R=>{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(R=>{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((R,M)=>this._inputHandler.parse(R,M))),this.register((0,g.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(O,R){this._writeBuffer.write(O,R)}writeSync(O,R){this._logService.logLevel<=h.LogLevelEnum.WARN&&!C&&(this._logService.warn("writeSync is unreliable and will be removed soon."),C=!0),this._writeBuffer.writeSync(O,R)}input(O,R=!0){this.coreService.triggerDataEvent(O,R)}resize(O,R){isNaN(O)||isNaN(R)||(O=Math.max(O,v.MINIMUM_COLS),R=Math.max(R,v.MINIMUM_ROWS),this._bufferService.resize(O,R))}scroll(O,R=!1){this._bufferService.scroll(O,R)}scrollLines(O,R,M){this._bufferService.scrollLines(O,R,M)}scrollPages(O){this.scrollLines(O*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(O){const R=O-this._bufferService.buffer.ydisp;R!==0&&this.scrollLines(R)}registerEscHandler(O,R){return this._inputHandler.registerEscHandler(O,R)}registerDcsHandler(O,R){return this._inputHandler.registerDcsHandler(O,R)}registerCsiHandler(O,R){return this._inputHandler.registerCsiHandler(O,R)}registerOscHandler(O,R){return this._inputHandler.registerOscHandler(O,R)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let O=!1;const R=this.optionsService.rawOptions.windowsPty;R&&R.buildNumber!==void 0&&R.buildNumber!==void 0?O=R.backend==="conpty"&&R.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(O=!0),O?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const O=[];O.push(this.onLineFeed(y.updateWindowsModeWrappedState.bind(null,this._bufferService))),O.push(this.registerCsiHandler({final:"H"},()=>((0,y.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,c.toDisposable)(()=>{for(const R of O)R.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(W,I,L,B){var D,P=arguments.length,$=P<3?I:B===null?B=Object.getOwnPropertyDescriptor(I,L):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(W,I,L,B);else for(var Y=W.length-1;Y>=0;Y--)(D=W[Y])&&($=(P<3?D($):P>3?D(I,L,$):D(I,L))||$);return P>3&&$&&Object.defineProperty(I,L,$),$},h=this&&this.__param||function(W,I){return function(L,B){I(L,B,W)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const u=l(2584),m=l(7116),v=l(2015),w=l(844),_=l(482),g=l(8437),d=l(8460),f=l(643),p=l(511),y=l(3734),S=l(2585),b=l(1480),E=l(6242),C=l(6351),A=l(5941),T={"(":0,")":1,"*":2,"+":3,"-":1,".":2},O=131072;function R(W,I){if(W>24)return I.setWinLines||!1;switch(W){case 1:return!!I.restoreWin;case 2:return!!I.minimizeWin;case 3:return!!I.setWinPosition;case 4:return!!I.setWinSizePixels;case 5:return!!I.raiseWin;case 6:return!!I.lowerWin;case 7:return!!I.refreshWin;case 8:return!!I.setWinSizeChars;case 9:return!!I.maximizeWin;case 10:return!!I.fullscreenWin;case 11:return!!I.getWinState;case 13:return!!I.getWinPosition;case 14:return!!I.getWinSizePixels;case 15:return!!I.getScreenSizePixels;case 16:return!!I.getCellSizePixels;case 18:return!!I.getWinSizeChars;case 19:return!!I.getScreenSizeChars;case 20:return!!I.getIconTitle;case 21:return!!I.getWinTitle;case 22:return!!I.pushTitle;case 23:return!!I.popTitle;case 24:return!!I.setWinLines}return!1}var M;(function(W){W[W.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",W[W.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(M||(o.WindowsOptionsReportType=M={}));let z=0;class U extends w.Disposable{getAttrData(){return this._curAttrData}constructor(I,L,B,D,P,$,Y,H,j=new v.EscapeSequenceParser){super(),this._bufferService=I,this._charsetService=L,this._coreService=B,this._logService=D,this._optionsService=P,this._oscLinkService=$,this._coreMouseService=Y,this._unicodeService=H,this._parser=j,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=g.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=g.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 q(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(N=>this._activeBuffer=N.activeBuffer)),this._parser.setCsiHandlerFallback((N,K)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(N),params:K.toArray()})}),this._parser.setEscHandlerFallback(N=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(N)})}),this._parser.setExecuteHandlerFallback(N=>{this._logService.debug("Unknown EXECUTE code: ",{code:N})}),this._parser.setOscHandlerFallback((N,K,V)=>{this._logService.debug("Unknown OSC code: ",{identifier:N,action:K,data:V})}),this._parser.setDcsHandlerFallback((N,K,V)=>{K==="HOOK"&&(V=V.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(N),action:K,payload:V})}),this._parser.setPrintHandler((N,K,V)=>this.print(N,K,V)),this._parser.registerCsiHandler({final:"@"},N=>this.insertChars(N)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},N=>this.scrollLeft(N)),this._parser.registerCsiHandler({final:"A"},N=>this.cursorUp(N)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},N=>this.scrollRight(N)),this._parser.registerCsiHandler({final:"B"},N=>this.cursorDown(N)),this._parser.registerCsiHandler({final:"C"},N=>this.cursorForward(N)),this._parser.registerCsiHandler({final:"D"},N=>this.cursorBackward(N)),this._parser.registerCsiHandler({final:"E"},N=>this.cursorNextLine(N)),this._parser.registerCsiHandler({final:"F"},N=>this.cursorPrecedingLine(N)),this._parser.registerCsiHandler({final:"G"},N=>this.cursorCharAbsolute(N)),this._parser.registerCsiHandler({final:"H"},N=>this.cursorPosition(N)),this._parser.registerCsiHandler({final:"I"},N=>this.cursorForwardTab(N)),this._parser.registerCsiHandler({final:"J"},N=>this.eraseInDisplay(N,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},N=>this.eraseInDisplay(N,!0)),this._parser.registerCsiHandler({final:"K"},N=>this.eraseInLine(N,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},N=>this.eraseInLine(N,!0)),this._parser.registerCsiHandler({final:"L"},N=>this.insertLines(N)),this._parser.registerCsiHandler({final:"M"},N=>this.deleteLines(N)),this._parser.registerCsiHandler({final:"P"},N=>this.deleteChars(N)),this._parser.registerCsiHandler({final:"S"},N=>this.scrollUp(N)),this._parser.registerCsiHandler({final:"T"},N=>this.scrollDown(N)),this._parser.registerCsiHandler({final:"X"},N=>this.eraseChars(N)),this._parser.registerCsiHandler({final:"Z"},N=>this.cursorBackwardTab(N)),this._parser.registerCsiHandler({final:"`"},N=>this.charPosAbsolute(N)),this._parser.registerCsiHandler({final:"a"},N=>this.hPositionRelative(N)),this._parser.registerCsiHandler({final:"b"},N=>this.repeatPrecedingCharacter(N)),this._parser.registerCsiHandler({final:"c"},N=>this.sendDeviceAttributesPrimary(N)),this._parser.registerCsiHandler({prefix:">",final:"c"},N=>this.sendDeviceAttributesSecondary(N)),this._parser.registerCsiHandler({final:"d"},N=>this.linePosAbsolute(N)),this._parser.registerCsiHandler({final:"e"},N=>this.vPositionRelative(N)),this._parser.registerCsiHandler({final:"f"},N=>this.hVPosition(N)),this._parser.registerCsiHandler({final:"g"},N=>this.tabClear(N)),this._parser.registerCsiHandler({final:"h"},N=>this.setMode(N)),this._parser.registerCsiHandler({prefix:"?",final:"h"},N=>this.setModePrivate(N)),this._parser.registerCsiHandler({final:"l"},N=>this.resetMode(N)),this._parser.registerCsiHandler({prefix:"?",final:"l"},N=>this.resetModePrivate(N)),this._parser.registerCsiHandler({final:"m"},N=>this.charAttributes(N)),this._parser.registerCsiHandler({final:"n"},N=>this.deviceStatus(N)),this._parser.registerCsiHandler({prefix:"?",final:"n"},N=>this.deviceStatusPrivate(N)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},N=>this.softReset(N)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},N=>this.setCursorStyle(N)),this._parser.registerCsiHandler({final:"r"},N=>this.setScrollRegion(N)),this._parser.registerCsiHandler({final:"s"},N=>this.saveCursor(N)),this._parser.registerCsiHandler({final:"t"},N=>this.windowOptions(N)),this._parser.registerCsiHandler({final:"u"},N=>this.restoreCursor(N)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},N=>this.insertColumns(N)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},N=>this.deleteColumns(N)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},N=>this.selectProtected(N)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},N=>this.requestMode(N,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},N=>this.requestMode(N,!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 E.OscHandler(N=>(this.setTitle(N),this.setIconName(N),!0))),this._parser.registerOscHandler(1,new E.OscHandler(N=>this.setIconName(N))),this._parser.registerOscHandler(2,new E.OscHandler(N=>this.setTitle(N))),this._parser.registerOscHandler(4,new E.OscHandler(N=>this.setOrReportIndexedColor(N))),this._parser.registerOscHandler(8,new E.OscHandler(N=>this.setHyperlink(N))),this._parser.registerOscHandler(10,new E.OscHandler(N=>this.setOrReportFgColor(N))),this._parser.registerOscHandler(11,new E.OscHandler(N=>this.setOrReportBgColor(N))),this._parser.registerOscHandler(12,new E.OscHandler(N=>this.setOrReportCursorColor(N))),this._parser.registerOscHandler(104,new E.OscHandler(N=>this.restoreIndexedColor(N))),this._parser.registerOscHandler(110,new E.OscHandler(N=>this.restoreFgColor(N))),this._parser.registerOscHandler(111,new E.OscHandler(N=>this.restoreBgColor(N))),this._parser.registerOscHandler(112,new E.OscHandler(N=>this.restoreCursorColor(N))),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 N in m.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:N},()=>this.selectCharset("("+N)),this._parser.registerEscHandler({intermediates:")",final:N},()=>this.selectCharset(")"+N)),this._parser.registerEscHandler({intermediates:"*",final:N},()=>this.selectCharset("*"+N)),this._parser.registerEscHandler({intermediates:"+",final:N},()=>this.selectCharset("+"+N)),this._parser.registerEscHandler({intermediates:"-",final:N},()=>this.selectCharset("-"+N)),this._parser.registerEscHandler({intermediates:".",final:N},()=>this.selectCharset("."+N)),this._parser.registerEscHandler({intermediates:"/",final:N},()=>this.selectCharset("/"+N));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(N=>(this._logService.error("Parsing error: ",N),N)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new C.DcsHandler((N,K)=>this.requestStatusString(N,K)))}_preserveStack(I,L,B,D){this._parseStack.paused=!0,this._parseStack.cursorStartX=I,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=B,this._parseStack.position=D}_logSlowResolvingAsync(I){this._logService.logLevel<=S.LogLevelEnum.WARN&&Promise.race([I,new Promise((L,B)=>setTimeout(()=>B("#SLOW_TIMEOUT"),5e3))]).catch(L=>{if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(I,L){let B,D=this._activeBuffer.x,P=this._activeBuffer.y,$=0;const Y=this._parseStack.paused;if(Y){if(B=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(B),B;D=this._parseStack.cursorStartX,P=this._parseStack.cursorStartY,this._parseStack.paused=!1,I.length>O&&($=this._parseStack.position+O)}if(this._logService.logLevel<=S.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof I=="string"?` "${I}"`:` "${Array.prototype.map.call(I,N=>String.fromCharCode(N)).join("")}"`),typeof I=="string"?I.split("").map(N=>N.charCodeAt(0)):I),this._parseBuffer.length<I.length&&this._parseBuffer.length<O&&(this._parseBuffer=new Uint32Array(Math.min(I.length,O))),Y||this._dirtyRowTracker.clearRange(),I.length>O)for(let N=$;N<I.length;N+=O){const K=N+O<I.length?N+O:I.length,V=typeof I=="string"?this._stringDecoder.decode(I.substring(N,K),this._parseBuffer):this._utf8Decoder.decode(I.subarray(N,K),this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,V))return this._preserveStack(D,P,V,N),this._logSlowResolvingAsync(B),B}else if(!Y){const N=typeof I=="string"?this._stringDecoder.decode(I,this._parseBuffer):this._utf8Decoder.decode(I,this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,N))return this._preserveStack(D,P,N,0),this._logSlowResolvingAsync(B),B}this._activeBuffer.x===D&&this._activeBuffer.y===P||this._onCursorMove.fire();const H=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),j=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);j<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(j,this._bufferService.rows-1),Math.min(H,this._bufferService.rows-1))}print(I,L,B){let D,P;const $=this._charsetService.charset,Y=this._optionsService.rawOptions.screenReaderMode,H=this._bufferService.cols,j=this._coreService.decPrivateModes.wraparound,N=this._coreService.modes.insertMode,K=this._curAttrData;let V=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&B-L>0&&V.getWidth(this._activeBuffer.x-1)===2&&V.setCellFromCodepoint(this._activeBuffer.x-1,0,1,K);let X=this._parser.precedingJoinState;for(let re=L;re<B;++re){if(D=I[re],D<127&&$){const Se=$[String.fromCharCode(D)];Se&&(D=Se.charCodeAt(0))}const ce=this._unicodeService.charProperties(D,X);P=b.UnicodeService.extractWidth(ce);const ge=b.UnicodeService.extractShouldJoin(ce),ae=ge?b.UnicodeService.extractWidth(X):0;if(X=ce,Y&&this._onA11yChar.fire((0,_.stringFromCodePoint)(D)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+P-ae>H){if(j){const Se=V;let ye=this._activeBuffer.x-ae;for(this._activeBuffer.x=ae,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),V=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),ae>0&&V instanceof g.BufferLine&&V.copyCellsFrom(Se,ye,0,ae,!1);ye<H;)Se.setCellFromCodepoint(ye++,0,1,K)}else if(this._activeBuffer.x=H-1,P===2)continue}if(ge&&this._activeBuffer.x){const Se=V.getWidth(this._activeBuffer.x-1)?1:2;V.addCodepointToCell(this._activeBuffer.x-Se,D,P);for(let ye=P-ae;--ye>=0;)V.setCellFromCodepoint(this._activeBuffer.x++,0,0,K)}else if(N&&(V.insertCells(this._activeBuffer.x,P-ae,this._activeBuffer.getNullCell(K)),V.getWidth(H-1)===2&&V.setCellFromCodepoint(H-1,f.NULL_CELL_CODE,f.NULL_CELL_WIDTH,K)),V.setCellFromCodepoint(this._activeBuffer.x++,D,P,K),P>0)for(;--P;)V.setCellFromCodepoint(this._activeBuffer.x++,0,0,K)}this._parser.precedingJoinState=X,this._activeBuffer.x<H&&B-L>0&&V.getWidth(this._activeBuffer.x)===0&&!V.hasContent(this._activeBuffer.x)&&V.setCellFromCodepoint(this._activeBuffer.x,0,1,K),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(I,L){return I.final!=="t"||I.prefix||I.intermediates?this._parser.registerCsiHandler(I,L):this._parser.registerCsiHandler(I,B=>!R(B.params[0],this._optionsService.rawOptions.windowOptions)||L(B))}registerDcsHandler(I,L){return this._parser.registerDcsHandler(I,new C.DcsHandler(L))}registerEscHandler(I,L){return this._parser.registerEscHandler(I,L)}registerOscHandler(I,L){return this._parser.registerOscHandler(I,new E.OscHandler(L))}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 I;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&&((I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&I.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);L.hasWidth(this._activeBuffer.x)&&!L.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const I=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-I),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(I=this._bufferService.cols-1){this._activeBuffer.x=Math.min(I,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(I,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=I,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=I,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(I,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+I,this._activeBuffer.y+L)}cursorUp(I){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,I.params[0]||1)):this._moveCursor(0,-(I.params[0]||1)),!0}cursorDown(I){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,I.params[0]||1)):this._moveCursor(0,I.params[0]||1),!0}cursorForward(I){return this._moveCursor(I.params[0]||1,0),!0}cursorBackward(I){return this._moveCursor(-(I.params[0]||1),0),!0}cursorNextLine(I){return this.cursorDown(I),this._activeBuffer.x=0,!0}cursorPrecedingLine(I){return this.cursorUp(I),this._activeBuffer.x=0,!0}cursorCharAbsolute(I){return this._setCursor((I.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(I){return this._setCursor(I.length>=2?(I.params[1]||1)-1:0,(I.params[0]||1)-1),!0}charPosAbsolute(I){return this._setCursor((I.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(I){return this._moveCursor(I.params[0]||1,0),!0}linePosAbsolute(I){return this._setCursor(this._activeBuffer.x,(I.params[0]||1)-1),!0}vPositionRelative(I){return this._moveCursor(0,I.params[0]||1),!0}hVPosition(I){return this.cursorPosition(I),!0}tabClear(I){const L=I.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(I){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=I.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(I){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=I.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(I){const L=I.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(I,L,B,D=!1,P=!1){const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);$.replaceCells(L,B,this._activeBuffer.getNullCell(this._eraseAttrData()),P),D&&($.isWrapped=!1)}_resetBufferLine(I,L=!1){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);B&&(B.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+I),B.isWrapped=!1)}eraseInDisplay(I,L=!1){let B;switch(this._restrictCursor(this._bufferService.cols),I.params[0]){case 0:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);B<this._bufferService.rows;B++)this._resetBufferLine(B,L);this._dirtyRowTracker.markDirty(B);break;case 1:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B,0,this._activeBuffer.x+1,!0,L),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(B+1).isWrapped=!1);B--;)this._resetBufferLine(B,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(B=this._bufferService.rows,this._dirtyRowTracker.markDirty(B-1);B--;)this._resetBufferLine(B,L);this._dirtyRowTracker.markDirty(0);break;case 3:const D=this._activeBuffer.lines.length-this._bufferService.rows;D>0&&(this._activeBuffer.lines.trimStart(D),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-D,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-D,0),this._onScroll.fire(0))}return!0}eraseInLine(I,L=!1){switch(this._restrictCursor(this._bufferService.cols),I.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,L);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,L)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(I){this._restrictCursor();let L=I.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=this._activeBuffer.ybase+this._activeBuffer.y,D=this._bufferService.rows-1-this._activeBuffer.scrollBottom,P=this._bufferService.rows-1+this._activeBuffer.ybase-D+1;for(;L--;)this._activeBuffer.lines.splice(P-1,1),this._activeBuffer.lines.splice(B,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(I){this._restrictCursor();let L=I.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=this._activeBuffer.ybase+this._activeBuffer.y;let D;for(D=this._bufferService.rows-1-this._activeBuffer.scrollBottom,D=this._bufferService.rows-1+this._activeBuffer.ybase-D;L--;)this._activeBuffer.lines.splice(B,1),this._activeBuffer.lines.splice(D,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(I){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.insertCells(this._activeBuffer.x,I.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(I){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.deleteCells(this._activeBuffer.x,I.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(I){let L=I.params[0]||1;for(;L--;)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(I){let L=I.params[0]||1;for(;L--;)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(g.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=I.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);D.deleteCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData())),D.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=I.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);D.insertCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData())),D.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=I.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);D.insertCells(this._activeBuffer.x,L,this._activeBuffer.getNullCell(this._eraseAttrData())),D.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=I.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);D.deleteCells(this._activeBuffer.x,L,this._activeBuffer.getNullCell(this._eraseAttrData())),D.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(I){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(I.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(I){const L=this._parser.precedingJoinState;if(!L)return!0;const B=I.params[0]||1,D=b.UnicodeService.extractWidth(L),P=this._activeBuffer.x-D,$=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(P),Y=new Uint32Array($.length*B);let H=0;for(let N=0;N<$.length;){const K=$.codePointAt(N)||0;Y[H++]=K,N+=K>65535?2:1}let j=H;for(let N=1;N<B;++N)Y.copyWithin(j,0,H),j+=H;return this.print(Y,0,j),!0}sendDeviceAttributesPrimary(I){return I.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(I){return I.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(I.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(I){return(this._optionsService.rawOptions.termName+"").indexOf(I)===0}setMode(I){for(let L=0;L<I.length;L++)switch(I.params[L]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(I){for(let L=0;L<I.length;L++)switch(I.params[L]){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(I){for(let L=0;L<I.length;L++)switch(I.params[L]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(I){for(let L=0;L<I.length;L++)switch(I.params[L]){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(),I.params[L]===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(I,L){const B=this._coreService.decPrivateModes,{activeProtocol:D,activeEncoding:P}=this._coreMouseService,$=this._coreService,{buffers:Y,cols:H}=this._bufferService,{active:j,alt:N}=Y,K=this._optionsService.rawOptions,V=ge=>ge?1:2,X=I.params[0];return re=X,ce=L?X===2?4:X===4?V($.modes.insertMode):X===12?3:X===20?V(K.convertEol):0:X===1?V(B.applicationCursorKeys):X===3?K.windowOptions.setWinLines?H===80?2:H===132?1:0:0:X===6?V(B.origin):X===7?V(B.wraparound):X===8?3:X===9?V(D==="X10"):X===12?V(K.cursorBlink):X===25?V(!$.isCursorHidden):X===45?V(B.reverseWraparound):X===66?V(B.applicationKeypad):X===67?4:X===1e3?V(D==="VT200"):X===1002?V(D==="DRAG"):X===1003?V(D==="ANY"):X===1004?V(B.sendFocus):X===1005?4:X===1006?V(P==="SGR"):X===1015?4:X===1016?V(P==="SGR_PIXELS"):X===1048?1:X===47||X===1047||X===1049?V(j===N):X===2004?V(B.bracketedPasteMode):0,$.triggerDataEvent(`${u.C0.ESC}[${L?"":"?"}${re};${ce}$y`),!0;var re,ce}_updateAttrColor(I,L,B,D,P){return L===2?(I|=50331648,I&=-16777216,I|=y.AttributeData.fromColorRGB([B,D,P])):L===5&&(I&=-50331904,I|=33554432|255&B),I}_extractColor(I,L,B){const D=[0,0,-1,0,0,0];let P=0,$=0;do{if(D[$+P]=I.params[L+$],I.hasSubParams(L+$)){const Y=I.getSubParams(L+$);let H=0;do D[1]===5&&(P=1),D[$+H+1+P]=Y[H];while(++H<Y.length&&H+$+1+P<D.length);break}if(D[1]===5&&$+P>=2||D[1]===2&&$+P>=5)break;D[1]&&(P=1)}while(++$+L<I.length&&$+P<D.length);for(let Y=2;Y<D.length;++Y)D[Y]===-1&&(D[Y]=0);switch(D[0]){case 38:B.fg=this._updateAttrColor(B.fg,D[1],D[3],D[4],D[5]);break;case 48:B.bg=this._updateAttrColor(B.bg,D[1],D[3],D[4],D[5]);break;case 58:B.extended=B.extended.clone(),B.extended.underlineColor=this._updateAttrColor(B.extended.underlineColor,D[1],D[3],D[4],D[5])}return $}_processUnderline(I,L){L.extended=L.extended.clone(),(!~I||I>5)&&(I=1),L.extended.underlineStyle=I,L.fg|=268435456,I===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(I){I.fg=g.DEFAULT_ATTR_DATA.fg,I.bg=g.DEFAULT_ATTR_DATA.bg,I.extended=I.extended.clone(),I.extended.underlineStyle=0,I.extended.underlineColor&=-67108864,I.updateExtended()}charAttributes(I){if(I.length===1&&I.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=I.length;let B;const D=this._curAttrData;for(let P=0;P<L;P++)B=I.params[P],B>=30&&B<=37?(D.fg&=-50331904,D.fg|=16777216|B-30):B>=40&&B<=47?(D.bg&=-50331904,D.bg|=16777216|B-40):B>=90&&B<=97?(D.fg&=-50331904,D.fg|=16777224|B-90):B>=100&&B<=107?(D.bg&=-50331904,D.bg|=16777224|B-100):B===0?this._processSGR0(D):B===1?D.fg|=134217728:B===3?D.bg|=67108864:B===4?(D.fg|=268435456,this._processUnderline(I.hasSubParams(P)?I.getSubParams(P)[0]:1,D)):B===5?D.fg|=536870912:B===7?D.fg|=67108864:B===8?D.fg|=1073741824:B===9?D.fg|=2147483648:B===2?D.bg|=134217728:B===21?this._processUnderline(2,D):B===22?(D.fg&=-134217729,D.bg&=-134217729):B===23?D.bg&=-67108865:B===24?(D.fg&=-268435457,this._processUnderline(0,D)):B===25?D.fg&=-536870913:B===27?D.fg&=-67108865:B===28?D.fg&=-1073741825:B===29?D.fg&=2147483647:B===39?(D.fg&=-67108864,D.fg|=16777215&g.DEFAULT_ATTR_DATA.fg):B===49?(D.bg&=-67108864,D.bg|=16777215&g.DEFAULT_ATTR_DATA.bg):B===38||B===48||B===58?P+=this._extractColor(I,P,D):B===53?D.bg|=1073741824:B===55?D.bg&=-1073741825:B===59?(D.extended=D.extended.clone(),D.extended.underlineColor=-1,D.updateExtended()):B===100?(D.fg&=-67108864,D.fg|=16777215&g.DEFAULT_ATTR_DATA.fg,D.bg&=-67108864,D.bg|=16777215&g.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",B);return!0}deviceStatus(I){switch(I.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${L};${B}R`)}return!0}deviceStatusPrivate(I){if(I.params[0]===6){const L=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${L};${B}R`)}return!0}softReset(I){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=g.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(I){const L=I.params[0]||1;switch(L){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 B=L%2==1;return this._optionsService.options.cursorBlink=B,!0}setScrollRegion(I){const L=I.params[0]||1;let B;return(I.length<2||(B=I.params[1])>this._bufferService.rows||B===0)&&(B=this._bufferService.rows),B>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=B-1,this._setCursor(0,0)),!0}windowOptions(I){if(!R(I.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=I.length>1?I.params[1]:0;switch(I.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(M.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(M.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:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(I){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(I){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(I){return this._windowTitle=I,this._onTitleChange.fire(I),!0}setIconName(I){return this._iconName=I,!0}setOrReportIndexedColor(I){const L=[],B=I.split(";");for(;B.length>1;){const D=B.shift(),P=B.shift();if(/^\d+$/.exec(D)){const $=parseInt(D);if(ee($))if(P==="?")L.push({type:0,index:$});else{const Y=(0,A.parseColor)(P);Y&&L.push({type:1,index:$,color:Y})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(I){const L=I.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(I,L){this._getCurrentLinkId()&&this._finishHyperlink();const B=I.split(":");let D;const P=B.findIndex($=>$.startsWith("id="));return P!==-1&&(D=B[P].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:D,uri:L}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(I,L){const B=I.split(";");for(let D=0;D<B.length&&!(L>=this._specialColors.length);++D,++L)if(B[D]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const P=(0,A.parseColor)(B[D]);P&&this._onColor.fire([{type:1,index:this._specialColors[L],color:P}])}return!0}setOrReportFgColor(I){return this._setOrReportSpecialColor(I,0)}setOrReportBgColor(I){return this._setOrReportSpecialColor(I,1)}setOrReportCursorColor(I){return this._setOrReportSpecialColor(I,2)}restoreIndexedColor(I){if(!I)return this._onColor.fire([{type:2}]),!0;const L=[],B=I.split(";");for(let D=0;D<B.length;++D)if(/^\d+$/.exec(B[D])){const P=parseInt(B[D]);ee(P)&&L.push({type:2,index:P})}return L.length&&this._onColor.fire(L),!0}restoreFgColor(I){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(I){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(I){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(I){return I.length!==2?(this.selectDefaultCharset(),!0):(I[0]==="/"||this._charsetService.setgCharset(T[I[0]],m.CHARSETS[I[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 I=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,I,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=g.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=g.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(I){return this._charsetService.setgLevel(I),!0}screenAlignmentPattern(){const I=new p.CellData;I.content=4194373,I.fg=this._curAttrData.fg,I.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L<this._bufferService.rows;++L){const B=this._activeBuffer.ybase+this._activeBuffer.y+L,D=this._activeBuffer.lines.get(B);D&&(D.fill(I),D.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(I,L){const B=this._bufferService.buffer,D=this._optionsService.rawOptions;return(P=>(this._coreService.triggerDataEvent(`${u.C0.ESC}${P}${u.C0.ESC}\\`),!0))(I==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:I==='"p'?'P1$r61;1"p':I==="r"?`P1$r${B.scrollTop+1};${B.scrollBottom+1}r`:I==="m"?"P1$r0m":I===" q"?`P1$r${{block:2,underline:4,bar:6}[D.cursorStyle]-(D.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(I,L){this._dirtyRowTracker.markRangeDirty(I,L)}}o.InputHandler=U;let q=class{constructor(W){this._bufferService=W,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(W){W<this.start?this.start=W:W>this.end&&(this.end=W)}markRangeDirty(W,I){W>I&&(z=W,W=I,I=z),W<this.start&&(this.start=W),I>this.end&&(this.end=I)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function ee(W){return 0<=W&&W<256}q=c([h(0,S.IBufferService)],q)},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,v){this._data.get(c,h)||this._data.set(c,h,new l),this._data.get(c,h).set(u,m,v)}get(c,h,u,m){var v;return(v=this._data.get(c,h))==null?void 0:v.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 v=this._getKey(this._array[m]);if(v>c)u=m-1;else{if(!(v<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(v){this._tasks.push(v),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(v){this._idleCallback=void 0;let w=0,_=0,g=v.timeRemaining(),d=0;for(;this._i<this._tasks.length;){if(w=Date.now(),this._tasks[this._i]()||this._i++,w=Math.max(1,Date.now()-w),_=Math.max(w,_),d=v.timeRemaining(),1.5*_>d)return g-w<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(g-w))}ms`),void this._start();g=d}this.clear()}}class u extends h{_requestCallback(v){return setTimeout(()=>v(this._createDeadline(16)))}_cancelCallback(v){clearTimeout(v)}_createDeadline(v){const w=Date.now()+v;return{timeRemaining:()=>Math.max(0,w-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),v=h.buffer.lines.get(h.buffer.ybase+h.buffer.y);v&&m&&(v.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),v=l(4634),w=l(511),_=l(643),g=l(4863),d=l(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(f,p,y){this._hasScrollback=f,this._optionsService=p,this._bufferService=y,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=w.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]),this._whitespaceCell=w.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 y=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,y);let E=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,y)):this.ybase>0&&this.lines.length<=this.ybase+this.y+E+1?(this.ybase--,E++,this.ydisp>0&&this.ydisp--):this.lines.push(new m.BufferLine(f,y)));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),E&&(this.y+=E),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 E=0;E<this.lines.length;E++)S+=+this.lines.get(E).resize(f,y);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 y=(0,v.reflowLargerGetLinesToRemove)(this.lines,this._cols,f,this.ybase+this.y,this.getNullCell(m.DEFAULT_ATTR_DATA));if(y.length>0){const S=(0,v.reflowLargerCreateNewLayout)(this.lines,y);(0,v.reflowLargerApplyNewLayout)(this.lines,S.layout),this._reflowLargerAdjustViewport(f,p,S.countRemoved)}}_reflowLargerAdjustViewport(f,p,y){const S=this.getNullCell(m.DEFAULT_ATTR_DATA);let b=y;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-y,0)}_reflowSmaller(f,p){const y=this.getNullCell(m.DEFAULT_ATTR_DATA),S=[];let b=0;for(let E=this.lines.length-1;E>=0;E--){let C=this.lines.get(E);if(!C||!C.isWrapped&&C.getTrimmedLength()<=f)continue;const A=[C];for(;C.isWrapped&&E>0;)C=this.lines.get(--E),A.unshift(C);const T=this.ybase+this.y;if(T>=E&&T<E+A.length)continue;const O=A[A.length-1].getTrimmedLength(),R=(0,v.reflowSmallerGetNewLineLengths)(A,this._cols,f),M=R.length-A.length;let z;z=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+M):Math.max(0,this.lines.length-this.lines.maxLength+M);const U=[];for(let B=0;B<M;B++){const D=this.getBlankLine(m.DEFAULT_ATTR_DATA,!0);U.push(D)}U.length>0&&(S.push({start:E+A.length+b,newLines:U}),b+=U.length),A.push(...U);let q=R.length-1,ee=R[q];ee===0&&(q--,ee=R[q]);let W=A.length-M-1,I=O;for(;W>=0;){const B=Math.min(I,ee);if(A[q]===void 0)break;if(A[q].copyCellsFrom(A[W],I-B,ee-B,B,!0),ee-=B,ee===0&&(q--,ee=R[q]),I-=B,I===0){W--;const D=Math.max(W,0);I=(0,v.getWrappedLineTrimmedLength)(A,D,this._cols)}}for(let B=0;B<A.length;B++)R[B]<f&&A[B].setCell(R[B],y);let L=M-z;for(;L-- >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+M,this.ybase+p-1)}if(S.length>0){const E=[],C=[];for(let q=0;q<this.lines.length;q++)C.push(this.lines.get(q));const A=this.lines.length;let T=A-1,O=0,R=S[O];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+b);let M=0;for(let q=Math.min(this.lines.maxLength-1,A+b-1);q>=0;q--)if(R&&R.start>T+M){for(let ee=R.newLines.length-1;ee>=0;ee--)this.lines.set(q--,R.newLines[ee]);q++,E.push({index:T+1,amount:R.newLines.length}),M+=R.newLines.length,R=S[++O]}else this.lines.set(q,C[T--]);let z=0;for(let q=E.length-1;q>=0;q--)E[q].index+=z,this.lines.onInsertEmitter.fire(E[q]),z+=E[q].amount;const U=Math.max(0,A+b-this.lines.maxLength);U>0&&this.lines.onTrimEmitter.fire(U)}}translateBufferLineToString(f,p,y=0,S){const b=this.lines.get(f);return b?b.translateToString(p,y,S):""}getWrappedRangeForLine(f){let p=f,y=f;for(;p>0&&this.lines.get(p).isWrapped;)p--;for(;y+1<this.lines.length&&this.lines.get(y+1).isWrapped;)y++;return{first:p,last:y}}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 g.Marker(f);return this.markers.push(p),p.register(this.lines.onTrim(y=>{p.line-=y,p.line<0&&p.dispose()})),p.register(this.lines.onInsert(y=>{p.line>=y.index&&(p.line+=y.amount)})),p.register(this.lines.onDelete(y=>{p.line>=y.index&&p.line<y.index+y.amount&&p.dispose(),p.line>y.index&&(p.line-=y.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 v=0;class w{constructor(g,d,f=!1){this.isWrapped=f,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*g);const p=d||h.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let y=0;y<g;++y)this.setCell(y,p);this.length=g}get(g){const d=this._data[3*g+0],f=2097151&d;return[this._data[3*g+1],2097152&d?this._combined[g]:f?(0,m.stringFromCodePoint)(f):"",d>>22,2097152&d?this._combined[g].charCodeAt(this._combined[g].length-1):f]}set(g,d){this._data[3*g+1]=d[u.CHAR_DATA_ATTR_INDEX],d[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[g]=d[1],this._data[3*g+0]=2097152|g|d[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*g+0]=d[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|d[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(g){return this._data[3*g+0]>>22}hasWidth(g){return 12582912&this._data[3*g+0]}getFg(g){return this._data[3*g+1]}getBg(g){return this._data[3*g+2]}hasContent(g){return 4194303&this._data[3*g+0]}getCodePoint(g){const d=this._data[3*g+0];return 2097152&d?this._combined[g].charCodeAt(this._combined[g].length-1):2097151&d}isCombined(g){return 2097152&this._data[3*g+0]}getString(g){const d=this._data[3*g+0];return 2097152&d?this._combined[g]:2097151&d?(0,m.stringFromCodePoint)(2097151&d):""}isProtected(g){return 536870912&this._data[3*g+2]}loadCell(g,d){return v=3*g,d.content=this._data[v+0],d.fg=this._data[v+1],d.bg=this._data[v+2],2097152&d.content&&(d.combinedData=this._combined[g]),268435456&d.bg&&(d.extended=this._extendedAttrs[g]),d}setCell(g,d){2097152&d.content&&(this._combined[g]=d.combinedData),268435456&d.bg&&(this._extendedAttrs[g]=d.extended),this._data[3*g+0]=d.content,this._data[3*g+1]=d.fg,this._data[3*g+2]=d.bg}setCellFromCodepoint(g,d,f,p){268435456&p.bg&&(this._extendedAttrs[g]=p.extended),this._data[3*g+0]=d|f<<22,this._data[3*g+1]=p.fg,this._data[3*g+2]=p.bg}addCodepointToCell(g,d,f){let p=this._data[3*g+0];2097152&p?this._combined[g]+=(0,m.stringFromCodePoint)(d):2097151&p?(this._combined[g]=(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*g+0]=p}insertCells(g,d,f){if((g%=this.length)&&this.getWidth(g-1)===2&&this.setCellFromCodepoint(g-1,0,1,f),d<this.length-g){const p=new h.CellData;for(let y=this.length-g-d-1;y>=0;--y)this.setCell(g+d+y,this.loadCell(g+y,p));for(let y=0;y<d;++y)this.setCell(g+y,f)}else for(let p=g;p<this.length;++p)this.setCell(p,f);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,f)}deleteCells(g,d,f){if(g%=this.length,d<this.length-g){const p=new h.CellData;for(let y=0;y<this.length-g-d;++y)this.setCell(g+y,this.loadCell(g+d+y,p));for(let y=this.length-d;y<this.length;++y)this.setCell(y,f)}else for(let p=g;p<this.length;++p)this.setCell(p,f);g&&this.getWidth(g-1)===2&&this.setCellFromCodepoint(g-1,0,1,f),this.getWidth(g)!==0||this.hasContent(g)||this.setCellFromCodepoint(g,0,1,f)}replaceCells(g,d,f,p=!1){if(p)for(g&&this.getWidth(g-1)===2&&!this.isProtected(g-1)&&this.setCellFromCodepoint(g-1,0,1,f),d<this.length&&this.getWidth(d-1)===2&&!this.isProtected(d)&&this.setCellFromCodepoint(d,0,1,f);g<d&&g<this.length;)this.isProtected(g)||this.setCell(g,f),g++;else for(g&&this.getWidth(g-1)===2&&this.setCellFromCodepoint(g-1,0,1,f),d<this.length&&this.getWidth(d-1)===2&&this.setCellFromCodepoint(d,0,1,f);g<d&&g<this.length;)this.setCell(g++,f)}resize(g,d){if(g===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const f=3*g;if(g>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<g;++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>=g&&delete this._combined[b]}const y=Object.keys(this._extendedAttrs);for(let S=0;S<y.length;S++){const b=parseInt(y[S],10);b>=g&&delete this._extendedAttrs[b]}}return this.length=g,4*f*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const g=new Uint32Array(this._data.length);return g.set(this._data),this._data=g,1}return 0}fill(g,d=!1){if(d)for(let f=0;f<this.length;++f)this.isProtected(f)||this.setCell(f,g);else{this._combined={},this._extendedAttrs={};for(let f=0;f<this.length;++f)this.setCell(f,g)}}copyFrom(g){this.length!==g.length?this._data=new Uint32Array(g._data):this._data.set(g._data),this.length=g.length,this._combined={};for(const d in g._combined)this._combined[d]=g._combined[d];this._extendedAttrs={};for(const d in g._extendedAttrs)this._extendedAttrs[d]=g._extendedAttrs[d];this.isWrapped=g.isWrapped}clone(){const g=new w(0);g._data=new Uint32Array(this._data),g.length=this.length;for(const d in this._combined)g._combined[d]=this._combined[d];for(const d in this._extendedAttrs)g._extendedAttrs[d]=this._extendedAttrs[d];return g.isWrapped=this.isWrapped,g}getTrimmedLength(){for(let g=this.length-1;g>=0;--g)if(4194303&this._data[3*g+0])return g+(this._data[3*g+0]>>22);return 0}getNoBgTrimmedLength(){for(let g=this.length-1;g>=0;--g)if(4194303&this._data[3*g+0]||50331648&this._data[3*g+2])return g+(this._data[3*g+0]>>22);return 0}copyCellsFrom(g,d,f,p,y){const S=g._data;if(y)for(let E=p-1;E>=0;E--){for(let C=0;C<3;C++)this._data[3*(f+E)+C]=S[3*(d+E)+C];268435456&S[3*(d+E)+2]&&(this._extendedAttrs[f+E]=g._extendedAttrs[d+E])}else for(let E=0;E<p;E++){for(let C=0;C<3;C++)this._data[3*(f+E)+C]=S[3*(d+E)+C];268435456&S[3*(d+E)+2]&&(this._extendedAttrs[f+E]=g._extendedAttrs[d+E])}const b=Object.keys(g._combined);for(let E=0;E<b.length;E++){const C=parseInt(b[E],10);C>=d&&(this._combined[C-d+f]=g._combined[C])}}translateToString(g,d,f,p){d=d??0,f=f??this.length,g&&(f=Math.min(f,this.getTrimmedLength())),p&&(p.length=0);let y="";for(;d<f;){const S=this._data[3*d+0],b=2097151&S,E=2097152&S?this._combined[d]:b?(0,m.stringFromCodePoint)(b):u.WHITESPACE_CELL_CHAR;if(y+=E,p)for(let C=0;C<E.length;++C)p.push(d);d+=S>>22||1}return p&&p.push(d),y}}o.BufferLine=w},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,v=c[h+1].getWidth(0)===2;return m&&v?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,v){const w=[];for(let _=0;_<c.length-1;_++){let g=_,d=c.get(++g);if(!d.isWrapped)continue;const f=[c.get(_)];for(;g<c.length&&d.isWrapped;)f.push(d),d=c.get(++g);if(m>=_&&m<g){_+=f.length-1;continue}let p=0,y=l(f,p,h),S=1,b=0;for(;S<f.length;){const C=l(f,S,h),A=C-b,T=u-y,O=Math.min(A,T);f[p].copyCellsFrom(f[S],b,y,O,!1),y+=O,y===u&&(p++,y=0),b+=O,b===C&&(S++,b=0),y===0&&p!==0&&f[p-1].getWidth(u-1)===2&&(f[p].copyCellsFrom(f[p-1],u-1,y++,1,!1),f[p-1].setCell(u-1,v))}f[p].replaceCells(y,u,v);let E=0;for(let C=f.length-1;C>0&&(C>p||f[C].getTrimmedLength()===0);C--)E++;E>0&&(w.push(_+f.length-E),w.push(E)),_+=f.length-1}return w},o.reflowLargerCreateNewLayout=function(c,h){const u=[];let m=0,v=h[m],w=0;for(let _=0;_<c.length;_++)if(v===_){const g=h[++m];c.onDeleteEmitter.fire({index:_-w,amount:g}),_+=g-1,w+=g,v=h[++m]}else u.push(_);return{layout:u,countRemoved:w}},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=[],v=c.map((d,f)=>l(c,f,h)).reduce((d,f)=>d+f);let w=0,_=0,g=0;for(;g<v;){if(v-g<u){m.push(v-g);break}w+=u;const d=l(c,_,h);w>d&&(w-=d,_++);const f=c[_].getWidth(w-1)===2;f&&w--;const p=f?u-1:u;m.push(p),g+=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(w,_){super(),this._optionsService=w,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(w){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(w),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(w,_){this._normal.resize(w,_),this._alt.resize(w,_),this.setupTabStops(w)}setupTabStops(w){this._normal.setupTabStops(w),this._alt.setupTabStops(w)}}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(w){const _=new m;return _.setFromCharData(w),_}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(w){this.fg=w[h.CHAR_DATA_ATTR_INDEX],this.bg=0;let _=!1;if(w[h.CHAR_DATA_CHAR_INDEX].length>2)_=!0;else if(w[h.CHAR_DATA_CHAR_INDEX].length===2){const g=w[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=g&&g<=56319){const d=w[h.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=d&&d<=57343?this.content=1024*(g-55296)+d-56320+65536|w[h.CHAR_DATA_WIDTH_INDEX]<<22:_=!0}else _=!0}else this.content=w[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[h.CHAR_DATA_WIDTH_INDEX]<<22;_&&(this.combinedData=w[h.CHAR_DATA_CHAR_INDEX],this.content=2097152|w[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(v){this.line=v,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(v){return this._disposables.push(v),v}}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,v,w){const _={type:0,cancel:!1,key:void 0},g=(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;g?(_.key=c.C0.ESC+"[1;"+(g+1)+"D",_.key===c.C0.ESC+"[1;3D"&&(_.key=c.C0.ESC+(v?"b":"[1;5D"))):_.key=m?c.C0.ESC+"OD":c.C0.ESC+"[D";break;case 39:if(u.metaKey)break;g?(_.key=c.C0.ESC+"[1;"+(g+1)+"C",_.key===c.C0.ESC+"[1;3C"&&(_.key=c.C0.ESC+(v?"f":"[1;5C"))):_.key=m?c.C0.ESC+"OC":c.C0.ESC+"[C";break;case 38:if(u.metaKey)break;g?(_.key=c.C0.ESC+"[1;"+(g+1)+"A",v||_.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;g?(_.key=c.C0.ESC+"[1;"+(g+1)+"B",v||_.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=g?c.C0.ESC+"[3;"+(g+1)+"~":c.C0.ESC+"[3~";break;case 36:_.key=g?c.C0.ESC+"[1;"+(g+1)+"H":m?c.C0.ESC+"OH":c.C0.ESC+"[H";break;case 35:_.key=g?c.C0.ESC+"[1;"+(g+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;"+(g+1)+"~":_.key=c.C0.ESC+"[5~";break;case 34:u.shiftKey?_.type=3:u.ctrlKey?_.key=c.C0.ESC+"[6;"+(g+1)+"~":_.key=c.C0.ESC+"[6~";break;case 112:_.key=g?c.C0.ESC+"[1;"+(g+1)+"P":c.C0.ESC+"OP";break;case 113:_.key=g?c.C0.ESC+"[1;"+(g+1)+"Q":c.C0.ESC+"OQ";break;case 114:_.key=g?c.C0.ESC+"[1;"+(g+1)+"R":c.C0.ESC+"OR";break;case 115:_.key=g?c.C0.ESC+"[1;"+(g+1)+"S":c.C0.ESC+"OS";break;case 116:_.key=g?c.C0.ESC+"[15;"+(g+1)+"~":c.C0.ESC+"[15~";break;case 117:_.key=g?c.C0.ESC+"[17;"+(g+1)+"~":c.C0.ESC+"[17~";break;case 118:_.key=g?c.C0.ESC+"[18;"+(g+1)+"~":c.C0.ESC+"[18~";break;case 119:_.key=g?c.C0.ESC+"[19;"+(g+1)+"~":c.C0.ESC+"[19~";break;case 120:_.key=g?c.C0.ESC+"[20;"+(g+1)+"~":c.C0.ESC+"[20~";break;case 121:_.key=g?c.C0.ESC+"[21;"+(g+1)+"~":c.C0.ESC+"[21~";break;case 122:_.key=g?c.C0.ESC+"[23;"+(g+1)+"~":c.C0.ESC+"[23~";break;case 123:_.key=g?c.C0.ESC+"[24;"+(g+1)+"~":c.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(v&&!w||!u.altKey||u.metaKey)!v||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 y=String.fromCharCode(p);u.shiftKey&&(y=y.toUpperCase()),_.key=c.C0.ESC+y}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 v=l[m];v>65535?(v-=65536,u+=String.fromCharCode(55296+(v>>10))+String.fromCharCode(v%1024+56320)):u+=String.fromCharCode(v)}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 v=l.charCodeAt(m++);56320<=v&&v<=57343?c[u++]=1024*(this._interim-55296)+v-56320+65536:(c[u++]=this._interim,c[u++]=v),this._interim=0}for(let v=m;v<h;++v){const w=l.charCodeAt(v);if(55296<=w&&w<=56319){if(++v>=h)return this._interim=w,u;const _=l.charCodeAt(v);56320<=_&&_<=57343?c[u++]=1024*(w-55296)+_-56320+65536:(c[u++]=w,c[u++]=_)}else w!==65279&&(c[u++]=w)}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,v,w,_=0,g=0,d=0;if(this.interim[0]){let y=!1,S=this.interim[0];S&=(224&S)==192?31:(240&S)==224?15:7;let b,E=0;for(;(b=63&this.interim[++E])&&E<4;)S<<=6,S|=b;const C=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,A=C-E;for(;d<A;){if(d>=h)return 0;if(b=l[d++],(192&b)!=128){d--,y=!0;break}this.interim[E++]=b,S<<=6,S|=63&b}y||(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&(v=l[p+2])||128&(w=l[p+3]));)c[_++]=u,c[_++]=m,c[_++]=v,c[_++]=w,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(g=(31&u)<<6|63&m,g<128){p--;continue}c[_++]=g}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(v=l[p++],(192&v)!=128){p--;continue}if(g=(15&u)<<12|(63&m)<<6|63&v,g<2048||g>=55296&&g<=57343||g===65279)continue;c[_++]=g}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(v=l[p++],(192&v)!=128){p--;continue}if(p>=h)return this.interim[0]=u,this.interim[1]=m,this.interim[2]=v,_;if(w=l[p++],(192&w)!=128){p--;continue}if(g=(7&u)<<18|(63&m)<<12|(63&v)<<6|63&w,g<65536||g>1114111)continue;c[_++]=g}}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 v=0;v<h.length;++v)m.fill(0,h[v][0],h[v][1]+1)}}wcwidth(v){return v<32?0:v<127?1:v<65536?m[v]:function(w,_){let g,d=0,f=_.length-1;if(w<_[0][0]||w>_[f][1])return!1;for(;f>=d;)if(g=d+f>>1,w>_[g][1])d=g+1;else{if(!(w<_[g][0]))return!0;f=g-1}return!1}(v,u)?0:v>=131072&&v<=196605||v>=196608&&v<=262141?2:1}charProperties(v,w){let _=this.wcwidth(v),g=_===0&&w!==0;if(g){const d=c.UnicodeService.extractWidth(w);d===0?g=!1:d>_&&(_=d)}return c.UnicodeService.createPropertyValue(0,_,g)}}},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(v){super(),this._action=v,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(v,w){if(w!==void 0&&this._syncCalls>w)return void(this._syncCalls=0);if(this._pendingData+=v.length,this._writeBuffer.push(v),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let _;for(this._isSyncWriting=!0;_=this._writeBuffer.shift();){this._action(_);const g=this._callbacks.shift();g&&g()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(v,w){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+=v.length,this._writeBuffer.push(v),this._callbacks.push(w),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=v.length,this._writeBuffer.push(v),this._callbacks.push(w)}_innerWrite(v=0,w=!0){const _=v||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const g=this._writeBuffer[this._bufferOffset],d=this._action(g,w);if(d){const p=y=>Date.now()-_>=12?setTimeout(()=>this._innerWrite(0,y)):this._innerWrite(_,y);return void d.catch(y=>(queueMicrotask(()=>{throw y}),Promise.resolve(!1))).then(p)}const f=this._callbacks[this._bufferOffset];if(f&&f(),this._bufferOffset++,this._pendingData-=g.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 v=u.toString(16),w=v.length<2?"0"+v:v;switch(m){case 4:return v[0];case 8:return w;case 12:return(w+w).slice(0,3);default:return w+w}}o.parseColor=function(u){if(!u)return;let m=u.toLowerCase();if(m.indexOf("rgb:")===0){m=m.slice(4);const v=l.exec(m);if(v){const w=v[1]?15:v[4]?255:v[7]?4095:65535;return[Math.round(parseInt(v[1]||v[4]||v[7]||v[10],16)/w*255),Math.round(parseInt(v[2]||v[5]||v[8]||v[11],16)/w*255),Math.round(parseInt(v[3]||v[6]||v[9]||v[12],16)/w*255)]}}else if(m.indexOf("#")===0&&(m=m.slice(1),c.exec(m)&&[3,6,9,12].includes(m.length))){const v=m.length/3,w=[0,0,0];for(let _=0;_<3;++_){const g=parseInt(m.slice(v*_,v*_+v),16);w[_]=v===1?g<<4:v===2?g:v===3?g>>4:g>>8}return w}},o.toRgbString=function(u,m=16){const[v,w,_]=u;return`rgb:${h(v,m)}/${h(w,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(w,_){this._handlers[w]===void 0&&(this._handlers[w]=[]);const g=this._handlers[w];return g.push(_),{dispose:()=>{const d=g.indexOf(_);d!==-1&&g.splice(d,1)}}}clearHandler(w){this._handlers[w]&&delete this._handlers[w]}setHandlerFallback(w){this._handlerFb=w}reset(){if(this._active.length)for(let w=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;w>=0;--w)this._active[w].unhook(!1);this._stack.paused=!1,this._active=m,this._ident=0}hook(w,_){if(this.reset(),this._ident=w,this._active=this._handlers[w]||m,this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].hook(_);else this._handlerFb(this._ident,"HOOK",_)}put(w,_,g){if(this._active.length)for(let d=this._active.length-1;d>=0;d--)this._active[d].put(w,_,g);else this._handlerFb(this._ident,"PUT",(0,c.utf32ToString)(w,_,g))}unhook(w,_=!0){if(this._active.length){let g=!1,d=this._active.length-1,f=!1;if(this._stack.paused&&(d=this._stack.loopPosition-1,g=_,f=this._stack.fallThrough,this._stack.paused=!1),!f&&g===!1){for(;d>=0&&(g=this._active[d].unhook(w),g!==!0);d--)if(g instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=d,this._stack.fallThrough=!1,g;d--}for(;d>=0;d--)if(g=this._active[d].unhook(!1),g instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=d,this._stack.fallThrough=!0,g}else this._handlerFb(this._ident,"UNHOOK",w);this._active=m,this._ident=0}};const v=new h.Params;v.addParam(0),o.DcsHandler=class{constructor(w){this._handler=w,this._data="",this._params=v,this._hitLimit=!1}hook(w){this._params=w.length>1||w.params[0]?w.clone():v,this._data="",this._hitLimit=!1}put(w,_,g){this._hitLimit||(this._data+=(0,c.utf32ToString)(w,_,g),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(w){let _=!1;if(this._hitLimit)_=!1;else if(w&&(_=this._handler(this._data,this._params),_ instanceof Promise))return _.then(g=>(this._params=v,this._data="",this._hitLimit=!1,g));return this._params=v,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 v{constructor(d){this.table=new Uint8Array(d)}setDefault(d,f){this.table.fill(d<<4|f)}add(d,f,p,y){this.table[f<<8|d]=p<<4|y}addMany(d,f,p,y){for(let S=0;S<d.length;S++)this.table[f<<8|d[S]]=p<<4|y}}o.TransitionTable=v;const w=160;o.VT500_TRANSITION_TABLE=function(){const g=new v(4095),d=Array.apply(null,Array(256)).map((E,C)=>C),f=(E,C)=>d.slice(E,C),p=f(32,127),y=f(0,24);y.push(25),y.push.apply(y,f(28,32));const S=f(0,14);let b;for(b in g.setDefault(1,0),g.addMany(p,0,2,0),S)g.addMany([24,26,153,154],b,3,0),g.addMany(f(128,144),b,3,0),g.addMany(f(144,152),b,3,0),g.add(156,b,0,0),g.add(27,b,11,1),g.add(157,b,4,8),g.addMany([152,158,159],b,0,7),g.add(155,b,11,3),g.add(144,b,11,9);return g.addMany(y,0,3,0),g.addMany(y,1,3,1),g.add(127,1,0,1),g.addMany(y,8,0,8),g.addMany(y,3,3,3),g.add(127,3,0,3),g.addMany(y,4,3,4),g.add(127,4,0,4),g.addMany(y,6,3,6),g.addMany(y,5,3,5),g.add(127,5,0,5),g.addMany(y,2,3,2),g.add(127,2,0,2),g.add(93,1,4,8),g.addMany(p,8,5,8),g.add(127,8,5,8),g.addMany([156,27,24,26,7],8,6,0),g.addMany(f(28,32),8,0,8),g.addMany([88,94,95],1,0,7),g.addMany(p,7,0,7),g.addMany(y,7,0,7),g.add(156,7,0,0),g.add(127,7,0,7),g.add(91,1,11,3),g.addMany(f(64,127),3,7,0),g.addMany(f(48,60),3,8,4),g.addMany([60,61,62,63],3,9,4),g.addMany(f(48,60),4,8,4),g.addMany(f(64,127),4,7,0),g.addMany([60,61,62,63],4,0,6),g.addMany(f(32,64),6,0,6),g.add(127,6,0,6),g.addMany(f(64,127),6,0,0),g.addMany(f(32,48),3,9,5),g.addMany(f(32,48),5,9,5),g.addMany(f(48,64),5,0,6),g.addMany(f(64,127),5,7,0),g.addMany(f(32,48),4,9,5),g.addMany(f(32,48),1,9,2),g.addMany(f(32,48),2,9,2),g.addMany(f(48,127),2,10,0),g.addMany(f(48,80),1,10,0),g.addMany(f(81,88),1,10,0),g.addMany([89,90,92],1,10,0),g.addMany(f(96,127),1,10,0),g.add(80,1,11,9),g.addMany(y,9,0,9),g.add(127,9,0,9),g.addMany(f(28,32),9,0,9),g.addMany(f(32,48),9,9,12),g.addMany(f(48,60),9,8,10),g.addMany([60,61,62,63],9,9,10),g.addMany(y,11,0,11),g.addMany(f(32,128),11,0,11),g.addMany(f(28,32),11,0,11),g.addMany(y,10,0,10),g.add(127,10,0,10),g.addMany(f(28,32),10,0,10),g.addMany(f(48,60),10,8,10),g.addMany([60,61,62,63],10,0,11),g.addMany(f(32,48),10,9,12),g.addMany(y,12,0,12),g.add(127,12,0,12),g.addMany(f(28,32),12,0,12),g.addMany(f(32,48),12,9,12),g.addMany(f(48,64),12,0,11),g.addMany(f(64,127),12,12,13),g.addMany(f(64,127),10,12,13),g.addMany(f(64,127),9,12,13),g.addMany(y,13,13,13),g.addMany(p,13,13,13),g.add(127,13,0,13),g.addMany([27,156,24,26],13,14,0),g.add(w,0,2,0),g.add(w,8,5,8),g.add(w,6,0,6),g.add(w,11,0,11),g.add(w,13,13,13),g}();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,y)=>{},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 y=d.final.charCodeAt(0);if(f[0]>y||y>f[1])throw new Error(`final must be in range ${f[0]} .. ${f[1]}`);return p<<=8,p|=y,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 y=this._escHandlers[p];return y.push(f),{dispose:()=>{const S=y.indexOf(f);S!==-1&&y.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 y=this._csiHandlers[p];return y.push(f),{dispose:()=>{const S=y.indexOf(f);S!==-1&&y.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,y,S){this._parseStack.state=d,this._parseStack.handlers=f,this._parseStack.handlerPos=p,this._parseStack.transition=y,this._parseStack.chunkPos=S}parse(d,f,p){let y,S=0,b=0,E=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,E=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&&(y=C[A](this._params),y!==!0);A--)if(y instanceof Promise)return this._parseStack.handlerPos=A,y}this._parseStack.handlers=[];break;case 4:if(p===!1&&A>-1){for(;A>=0&&(y=C[A](),y!==!0);A--)if(y instanceof Promise)return this._parseStack.handlerPos=A,y}this._parseStack.handlers=[];break;case 6:if(S=d[this._parseStack.chunkPos],y=this._dcsParser.unhook(S!==24&&S!==26,p),y)return y;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],y=this._oscParser.end(S!==24&&S!==26,p),y)return y;S===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,E=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let C=E;C<f;++C){switch(S=d[C],b=this._transitions.table[this.currentState<<8|(S<160?S:w)],b>>4){case 2:for(let M=C+1;;++M){if(M>=f||(S=d[M])<32||S>126&&S<w){this._printHandler(d,C,M),C=M-1;break}if(++M>=f||(S=d[M])<32||S>126&&S<w){this._printHandler(d,C,M),C=M-1;break}if(++M>=f||(S=d[M])<32||S>126&&S<w){this._printHandler(d,C,M),C=M-1;break}if(++M>=f||(S=d[M])<32||S>126&&S<w){this._printHandler(d,C,M),C=M-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&&(y=A[T](this._params),y!==!0);T--)if(y instanceof Promise)return this._preserveStack(3,A,T,b,C),y;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 O=this._escHandlers[this._collect<<8|S];let R=O?O.length-1:-1;for(;R>=0&&(y=O[R](),y!==!0);R--)if(y instanceof Promise)return this._preserveStack(4,O,R,b,C),y;R<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 M=C+1;;++M)if(M>=f||(S=d[M])===24||S===26||S===27||S>127&&S<w){this._dcsParser.put(d,C,M),C=M-1;break}break;case 14:if(y=this._dcsParser.unhook(S!==24&&S!==26),y)return this._preserveStack(6,[],0,b,C),y;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 M=C+1;;M++)if(M>=f||(S=d[M])<32||S>127&&S<w){this._oscParser.put(d,C,M),C=M-1;break}break;case 6:if(y=this._oscParser.end(S!==24&&S!==26),y)return this._preserveStack(5,[],0,b,C),y;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,v){this._handlers[m]===void 0&&(this._handlers[m]=[]);const w=this._handlers[m];return w.push(v),{dispose:()=>{const _=w.indexOf(v);_!==-1&&w.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,v,w){if(this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].put(m,v,w);else this._handlerFb(this._id,"PUT",(0,h.utf32ToString)(m,v,w))}start(){this.reset(),this._state=1}put(m,v,w){if(this._state!==3){if(this._state===1)for(;v<w;){const _=m[v++];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&&w-v>0&&this._put(m,v,w)}}end(m,v=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let w=!1,_=this._active.length-1,g=!1;if(this._stack.paused&&(_=this._stack.loopPosition-1,w=v,g=this._stack.fallThrough,this._stack.paused=!1),!g&&w===!1){for(;_>=0&&(w=this._active[_].end(m),w!==!0);_--)if(w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!1,w;_--}for(;_>=0;_--)if(w=this._active[_].end(!1),w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!0,w}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,v,w){this._hitLimit||(this._data+=(0,h.utf32ToString)(m,v,w),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(m){let v=!1;if(this._hitLimit)v=!1;else if(m&&(v=this._handler(this._data),v instanceof Promise))return v.then(w=>(this._data="",this._hitLimit=!1,w));return this._data="",this._hitLimit=!1,v}}},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 v=Array.isArray(u[0])?1:0;v<u.length;++v){const w=u[v];if(Array.isArray(w))for(let _=0;_<w.length;++_)m.addSubParam(w[_]);else m.addParam(w)}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 v=this._subParamsIdx[m]>>8,w=255&this._subParamsIdx[m];w-v>0&&u.push(Array.prototype.slice.call(this._subParams,v,w))}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,v=255&this._subParamsIdx[u];return v-m>0?this._subParams.subarray(m,v):null}getSubParamsAll(){const u={};for(let m=0;m<this.length;++m){const v=this._subParamsIdx[m]>>8,w=255&this._subParamsIdx[m];w-v>0&&(u[m]=this._subParams.slice(v,w))}return u}addDigit(u){let m;if(this._rejectDigits||!(m=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const v=this._digitIsSub?this._subParams:this.params,w=v[m-1];v[m-1]=~w?Math.min(10*w+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(w){super(),this._core=w,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(g,d,f,p){var y,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(g,d,f,p);else for(var E=g.length-1;E>=0;E--)(y=g[E])&&(b=(S<3?y(b):S>3?y(d,f,b):y(d,f))||b);return S>3&&b&&Object.defineProperty(d,f,b),b},h=this&&this.__param||function(g,d){return function(f,p){d(f,p,g)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;const u=l(8460),m=l(844),v=l(5295),w=l(2585);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;let _=o.BufferService=class extends m.Disposable{get buffer(){return this.buffers.active}constructor(g){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(g.rawOptions.cols||0,o.MINIMUM_COLS),this.rows=Math.max(g.rawOptions.rows||0,o.MINIMUM_ROWS),this.buffers=this.register(new v.BufferSet(g,this))}resize(g,d){this.cols=g,this.rows=d,this.buffers.resize(g,d),this._onResize.fire({cols:g,rows:d})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(g,d=!1){const f=this.buffer;let p;p=this._cachedBlankLine,p&&p.length===this.cols&&p.getFg(0)===g.fg&&p.getBg(0)===g.bg||(p=f.getBlankLine(g,d),this._cachedBlankLine=p),p.isWrapped=d;const y=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-y+1;f.lines.shiftElements(y+1,b-1,-1),f.lines.set(S,p.clone())}this.isUserScrolling||(f.ydisp=f.ybase),this._onScroll.fire(f.ydisp)}scrollLines(g,d,f){const p=this.buffer;if(g<0){if(p.ydisp===0)return;this.isUserScrolling=!0}else g+p.ydisp>=p.ybase&&(this.isUserScrolling=!1);const y=p.ydisp;p.ydisp=Math.max(Math.min(p.ydisp+g,p.ybase),0),y!==p.ydisp&&(d||this._onScroll.fire(p.ydisp))}};o.BufferService=_=c([h(0,w.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,y,S,b){var E,C=arguments.length,A=C<3?y:b===null?b=Object.getOwnPropertyDescriptor(y,S):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(p,y,S,b);else for(var T=p.length-1;T>=0;T--)(E=p[T])&&(A=(C<3?E(A):C>3?E(y,S,A):E(y,S))||A);return C>3&&A&&Object.defineProperty(y,S,A),A},h=this&&this.__param||function(p,y){return function(S,b){y(S,b,p)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;const u=l(2585),m=l(8460),v=l(844),w={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,y){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||y||(S|=3)),S}const g=String.fromCharCode,d={DEFAULT:p=>{const y=[_(p,!1)+32,p.col+32,p.row+32];return y[0]>255||y[1]>255||y[2]>255?"":`\x1B[M${g(y[0])}${g(y[1])}${g(y[2])}`},SGR:p=>{const y=p.action===0&&p.button!==4?"m":"M";return`\x1B[<${_(p,!0)};${p.col};${p.row}${y}`},SGR_PIXELS:p=>{const y=p.action===0&&p.button!==4?"m":"M";return`\x1B[<${_(p,!0)};${p.x};${p.y}${y}`}};let f=o.CoreMouseService=class extends v.Disposable{constructor(p,y){super(),this._bufferService=p,this._coreService=y,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(w))this.addProtocol(S,w[S]);for(const S of Object.keys(d))this.addEncoding(S,d[S]);this.reset()}addProtocol(p,y){this._protocols[p]=y}addEncoding(p,y){this._encodings[p]=y}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 y=this._encodings[this._activeEncoding](p);return y&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(y):this._coreService.triggerDataEvent(y,!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,y,S){if(S){if(p.x!==y.x||p.y!==y.y)return!1}else if(p.col!==y.col||p.row!==y.row)return!1;return p.button===y.button&&p.action===y.action&&p.ctrl===y.ctrl&&p.alt===y.alt&&p.shift===y.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,y,S){var b,E=arguments.length,C=E<3?p:S===null?S=Object.getOwnPropertyDescriptor(p,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,p,y,S);else for(var A=f.length-1;A>=0;A--)(b=f[A])&&(C=(E<3?b(C):E>3?b(p,y,C):b(p,y))||C);return E>3&&C&&Object.defineProperty(p,y,C),C},h=this&&this.__param||function(f,p){return function(y,S){p(y,S,f)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;const u=l(1439),m=l(8460),v=l(844),w=l(2585),_=Object.freeze({insertMode:!1}),g=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let d=o.CoreService=class extends v.Disposable{constructor(f,p,y){super(),this._bufferService=f,this._logService=p,this._optionsService=y,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)(g)}reset(){this.modes=(0,u.clone)(_),this.decPrivateModes=(0,u.clone)(g)}triggerDataEvent(f,p=!1){if(this._optionsService.rawOptions.disableStdin)return;const y=this._bufferService.buffer;p&&this._optionsService.rawOptions.scrollOnUserInput&&y.ybase!==y.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,w.IBufferService),h(1,w.ILogService),h(2,w.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 v=0,w=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 g(f);if(p){const y=p.marker.onDispose(()=>p.dispose());p.onDispose(()=>{p&&(this._decorations.delete(p)&&this._onDecorationRemoved.fire(p),y.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,y){let S=0,b=0;for(const E of this._decorations.getKeyIterator(p))S=E.options.x??0,b=S+(E.options.width??1),f>=S&&f<b&&(!y||(E.options.layer??"bottom")===y)&&(yield E)}forEachDecorationAtCell(f,p,y,S){this._decorations.forEachByKey(p,b=>{v=b.options.x??0,w=v+(b.options.width??1),f>=v&&f<w&&(!y||(b.options.layer??"bottom")===y)&&S(b)})}}o.DecorationService=_;class g 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(...v){this._entries=new Map;for(const[w,_]of v)this.set(w,_)}set(v,w){const _=this._entries.get(v);return this._entries.set(v,w),_}forEach(v){for(const[w,_]of this._entries.entries())v(w,_)}has(v){return this._entries.has(v)}get(v){return this._entries.get(v)}}o.ServiceCollection=u,o.InstantiationService=class{constructor(){this._services=new u,this._services.set(c.IInstantiationService,this)}setService(m,v){this._services.set(m,v)}getService(m){return this._services.get(m)}createInstance(m,...v){const w=(0,h.getServiceDependencies)(m).sort((d,f)=>d.index-f.index),_=[];for(const d of w){const f=this._services.get(d.id);if(!f)throw new Error(`[createInstance] ${m.name} depends on UNKNOWN service ${d.id}.`);_.push(f)}const g=w.length>0?w[0].index:v.length;if(v.length!==g)throw new Error(`[createInstance] First service dependency of ${m.name} at position ${g+1} conflicts with ${v.length} static arguments`);return new m(...v,..._)}}},7866:function(a,o,l){var c=this&&this.__decorate||function(g,d,f,p){var y,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(g,d,f,p);else for(var E=g.length-1;E>=0;E--)(y=g[E])&&(b=(S<3?y(b):S>3?y(d,f,b):y(d,f))||b);return S>3&&b&&Object.defineProperty(d,f,b),b},h=this&&this.__param||function(g,d){return function(f,p){d(f,p,g)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const u=l(844),m=l(2585),v={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 w,_=o.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(g){super(),this._optionsService=g,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),w=this}_updateLogLevel(){this._logLevel=v[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(g){for(let d=0;d<g.length;d++)typeof g[d]=="function"&&(g[d]=g[d]())}_log(g,d,f){this._evalLazyOptionalParams(f),g.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+d,...f)}trace(g,...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,g,d)}debug(g,...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,g,d)}info(g,...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,g,d)}warn(g,...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,g,d)}error(g,...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,g,d)}};o.LogService=_=c([h(0,m.IOptionsService)],_),o.setTraceLogger=function(g){w=g},o.traceCall=function(g,d,f){if(typeof f.value!="function")throw new Error("not supported");const p=f.value;f.value=function(...y){if(w.logLevel!==m.LogLevelEnum.TRACE)return p.apply(this,y);w.trace(`GlyphRenderer#${p.name}(${y.map(b=>JSON.stringify(b)).join(", ")})`);const S=p.apply(this,y);return w.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 v extends h.Disposable{constructor(_){super(),this._onOptionChange=this.register(new c.EventEmitter),this.onOptionChange=this._onOptionChange.event;const g={...o.DEFAULT_OPTIONS};for(const d in _)if(d in g)try{const f=_[d];g[d]=this._sanitizeAndValidateOption(d,f)}catch(f){console.error(f)}this.rawOptions=g,this.options={...g},this._setupOptions(),this.register((0,h.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(_,g){return this.onOptionChange(d=>{d===_&&g(this.rawOptions[_])})}onMultipleOptionChange(_,g){return this.onOptionChange(d=>{_.indexOf(d)!==-1&&g()})}_setupOptions(){const _=d=>{if(!(d in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${d}"`);return this.rawOptions[d]},g=(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:g.bind(this,d)};Object.defineProperty(this.options,d,f)}}_sanitizeAndValidateOption(_,g){switch(_){case"cursorStyle":if(g||(g=o.DEFAULT_OPTIONS[_]),!function(d){return d==="block"||d==="underline"||d==="bar"}(g))throw new Error(`"${g}" is not a valid value for ${_}`);break;case"wordSeparator":g||(g=o.DEFAULT_OPTIONS[_]);break;case"fontWeight":case"fontWeightBold":if(typeof g=="number"&&1<=g&&g<=1e3)break;g=m.includes(g)?g:o.DEFAULT_OPTIONS[_];break;case"cursorWidth":g=Math.floor(g);case"lineHeight":case"tabStopWidth":if(g<1)throw new Error(`${_} cannot be less than 1, value: ${g}`);break;case"minimumContrastRatio":g=Math.max(1,Math.min(21,Math.round(10*g)/10));break;case"scrollback":if((g=Math.min(g,4294967295))<0)throw new Error(`${_} cannot be less than 0, value: ${g}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(g<=0)throw new Error(`${_} cannot be less than or equal to 0, value: ${g}`);break;case"rows":case"cols":if(!g&&g!==0)throw new Error(`${_} must be numeric, value: ${g}`);break;case"windowsPty":g=g??{}}return g}}o.OptionsService=v},2660:function(a,o,l){var c=this&&this.__decorate||function(v,w,_,g){var d,f=arguments.length,p=f<3?w:g===null?g=Object.getOwnPropertyDescriptor(w,_):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(v,w,_,g);else for(var y=v.length-1;y>=0;y--)(d=v[y])&&(p=(f<3?d(p):f>3?d(w,_,p):d(w,_))||p);return f>3&&p&&Object.defineProperty(w,_,p),p},h=this&&this.__param||function(v,w){return function(_,g){w(_,g,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkService=void 0;const u=l(2585);let m=o.OscLinkService=class{constructor(v){this._bufferService=v,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(v){const w=this._bufferService.buffer;if(v.id===void 0){const y=w.addMarker(w.ybase+w.y),S={data:v,id:this._nextId++,lines:[y]};return y.onDispose(()=>this._removeMarkerFromLink(S,y)),this._dataByLinkId.set(S.id,S),S.id}const _=v,g=this._getEntryIdKey(_),d=this._entriesWithId.get(g);if(d)return this.addLineToLink(d.id,w.ybase+w.y),d.id;const f=w.addMarker(w.ybase+w.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(v,w){const _=this._dataByLinkId.get(v);if(_&&_.lines.every(g=>g.line!==w)){const g=this._bufferService.buffer.addMarker(w);_.lines.push(g),g.onDispose(()=>this._removeMarkerFromLink(_,g))}}getLinkData(v){var w;return(w=this._dataByLinkId.get(v))==null?void 0:w.data}_getEntryIdKey(v){return`${v.id};;${v.uri}`}_removeMarkerFromLink(v,w){const _=v.lines.indexOf(w);_!==-1&&(v.lines.splice(_,1),v.lines.length===0&&(v.data.id!==void 0&&this._entriesWithId.delete(v.key),this._dataByLinkId.delete(v.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,v,w){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(_,g,d){g[l]===g?g[c].push({id:_,index:d}):(g[c]=[{id:_,index:d}],g[l]=g)})(u,m,w)};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(v){return(1&v)!=0}static extractWidth(v){return v>>1&3}static extractCharKind(v){return v>>3}static createPropertyValue(v,w,_=!1){return(16777215&v)<<3|(3&w)<<1|(_?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new c.EventEmitter,this.onChange=this._onChange.event;const v=new h.UnicodeV6;this.register(v),this._active=v.version,this._activeProvider=v}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(v){if(!this._providers[v])throw new Error(`unknown Unicode version "${v}"`);this._active=v,this._activeProvider=this._providers[v],this._onChange.fire(v)}register(v){this._providers[v.version]=v}wcwidth(v){return this._activeProvider.wcwidth(v)}getStringCellWidth(v){let w=0,_=0;const g=v.length;for(let d=0;d<g;++d){let f=v.charCodeAt(d);if(55296<=f&&f<=56319){if(++d>=g)return w+this.wcwidth(f);const S=v.charCodeAt(d);56320<=S&&S<=57343?f=1024*(f-55296)+S-56320+65536:w+=this.wcwidth(S)}const p=this.charProperties(f,_);let y=u.extractWidth(p);u.extractShouldJoin(p)&&(y-=u.extractWidth(_)),w+=y,_=p}return w}charProperties(v,w){return this._activeProvider.charProperties(v,w)}}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),v=i(7090),w=["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=y=>this._core.options[y],p=(y,S)=>{this._checkReadonlyOptions(y),this._core.options[y]=S};for(const y in this._core.options){const S={get:f.bind(this,y),set:p.bind(this,y)};Object.defineProperty(this._publicOptions,y,S)}}_checkReadonlyOptions(d){if(w.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 v.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})())})(JC);var o9=JC.exports,QC={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})())})(QC);var a9=QC.exports;const l9=(e,t)=>{const r=new URLSearchParams;return e&&r.set("session",e),t&&r.set("worktreeId",t),`/terminal-ws?${r.toString()}`};function c9({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 v=k.useCallback(()=>{if(!n||!m)return;const w=r;if(!w)return;const _=t&&t!=="main"?t:null;if(c.current&&c.current.readyState<=WebSocket.OPEN&&l.current===w&&h.current===_)return;c.current&&c.current.close();const g=o.current;g&&g.reset();const d=new WebSocket(l9(w,_));c.current=d,l.current=w,h.current=_;let f=!1;d.addEventListener("open",()=>{d.send(JSON.stringify({type:"auth",token:m}))}),d.addEventListener("message",p=>{let y=null;try{y=JSON.parse(p.data)}catch{return}if(!(y!=null&&y.type))return;if(y.type==="auth_ok"){if(f)return;f=!0;const b=o.current,E=a.current;b&&E&&(E.fit(),d.send(JSON.stringify({type:"init",cols:b.cols,rows:b.rows})));return}if(!f)return;const S=o.current;if(S){if(y.type==="output"&&typeof y.data=="string"){S.write(y.data);return}y.type==="exit"&&S.write(`\r
|
|
700
|
+
[terminal exited ${y.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 w=u==="dark",_=new o9.Terminal({fontFamily:'"Space Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',fontSize:13,cursorBlink:!0,theme:{background:w?"#0f1110":"#fbf6ee",foreground:w?"#e6edf3":"#2a2418",cursor:w?"#e6edf3":"#2a2418",selection:w?"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 g=new a9.FitAddon;_.loadAddon(g),_.open(i.current),g.fit(),_.focus(),o.current=_,a.current=g,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 w=o.current;if(!w)return;const _=u==="dark"?{background:"#15120d",foreground:"#f2e9dc",cursor:"#f2e9dc"}:{background:"#fbf6ee",foreground:"#2a2418",cursor:"#2a2418"};typeof w.setOption=="function"?w.setOption("theme",_):w.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 w=u==="dark";o.current.setOption("theme",{background:w?"#0f1110":"#fbf6ee",foreground:w?"#e6edf3":"#2a2418",cursor:w?"#e6edf3":"#2a2418",selection:w?"rgba(255, 255, 255, 0.2)":"rgba(20, 19, 17, 0.15)"})}a.current&&requestAnimationFrame(()=>{const w=a.current,_=o.current;if(!w||!_)return;w.fit(),_.focus();const g=c.current;g&&g.readyState===WebSocket.OPEN&&g.send(JSON.stringify({type:"resize",cols:_.cols,rows:_.rows}))}),v()}},[e,v,n,a,o,c,u]),k.useEffect(()=>{const w=()=>{const _=o.current,g=a.current,d=c.current;!_||!g||(g.fit(),d&&d.readyState===WebSocket.OPEN&&d.send(JSON.stringify({type:"resize",cols:_.cols,rows:_.rows})))};return window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)},[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 u9({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(),v=u.createGain();m.type="sine",m.frequency.value=740,v.gain.value=1e-4,v.gain.exponentialRampToValueAtTime(.12,u.currentTime+.01),v.gain.exponentialRampToValueAtTime(1e-4,u.currentTime+.25),m.connect(v).connect(u.destination),m.start(),m.stop(u.currentTime+.26)},[i]),l=k.useCallback(h=>{if(!h)return"";let u=String(h);const m=u.match(/<!--\s*vibe80:/i);return typeof(m==null?void 0:m.index)=="number"&&(u=u.slice(0,m.index)),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 f9=100,h9=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 d9({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,v]=k.useState([]),[w,_]=k.useState(!1),[g,d]=k.useState(new Map),f=k.useMemo(()=>{if(n&&n!=="main"){const R=a.get(n);return(R==null?void 0:R.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]),y=k.useMemo(()=>(f.status||"").split(/\r?\n/).map(R=>R.trim()).filter(Boolean),[f.status]),S=k.useMemo(()=>y.map(h9).filter(Boolean),[y]),b=k.useMemo(()=>{const R=new Set,M=[];return S.forEach(z=>{if(z.code!=="??")return;const U=String(z.path||"").trim().replace(/\\/g,"/");!U||R.has(U)||(R.add(U),M.push(U))}),M},[S]),E=k.useMemo(()=>y.length>0||!!(f.diff||"").trim(),[y.length,f.diff]);k.useEffect(()=>{if(!t){v([]),_(!1);return}if(!b.length){v([]),_(!1);return}let R=!1;const M=n&&n!=="main"?n:"main";return(async()=>{_(!0);const U=[...b],q=new Set,ee=[];for(;U.length>0&&ee.length<f9&&!R;){const W=String(U.shift()||"").trim();if(!W||q.has(W))continue;if(q.add(W),!W.endsWith("/"))try{const L=await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(M)}/file?path=${encodeURIComponent(W)}`);if(L.ok){const B=await L.json().catch(()=>({}));ee.push({path:W,binary:!!(B!=null&&B.binary),content:(B==null?void 0:B.content)||"",truncated:!!(B!=null&&B.truncated),error:!1});continue}}catch{}try{const L=await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(M)}/browse?path=${encodeURIComponent(W)}`);if(!L.ok){ee.push({path:W,binary:!1,content:"",truncated:!1,error:!0});continue}const B=await L.json().catch(()=>({}));(Array.isArray(B==null?void 0:B.entries)?B.entries:[]).forEach(P=>{P!=null&&P.path&&U.push(P.path)})}catch{ee.push({path:W,binary:!1,content:"",truncated:!1,error:!0})}}R||(v(ee),_(!1))})(),()=>{R=!0}},[n,e,t,b]);const C=k.useCallback(async()=>{if(t)try{const R=await e(`/api/v1/sessions/${encodeURIComponent(t)}/last-commit`),M=await R.json().catch(()=>({}));if(!R.ok)throw new Error(M.error||o("Unable to load the latest commit."));const z=M.commit||{};u({branch:M.branch||"",sha:z.sha||"",message:z.message||""})}catch{u(null)}},[t,e,o]),A=k.useCallback(async R=>{if(!(!t||!R))try{const M=await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(R)}/commits?limit=1`),z=await M.json().catch(()=>({}));if(!M.ok)throw new Error(z.error||o("Unable to load the commit."));const U=Array.isArray(z.commits)?z.commits[0]:null;if(!(U!=null&&U.sha))return;d(q=>{const ee=new Map(q);return ee.set(R,{sha:U.sha,message:U.message||""}),ee})}catch{}},[t,e,o]),T=k.useCallback(async R=>{if(!(!t||!R))try{const M=await e(`/api/v1/sessions/${encodeURIComponent(t)}/worktrees/${encodeURIComponent(R)}/diff`);if(!M.ok)return;const z=await M.json();if(!z)return;s(U=>{const q=new Map(U),ee=q.get(R);return ee&&q.set(R,{...ee,diff:{status:z.status||"",diff:z.diff||""}}),q})}catch{}},[t,e,s]),O=k.useCallback(async()=>{if(t)try{const R=await e(`/api/v1/sessions/${encodeURIComponent(t)}/diff`);if(!R.ok)return;const M=await R.json();if(!M)return;c({status:M.status||"",diff:M.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:y,hasCurrentChanges:E,untrackedFilePanels:m,untrackedLoading:w,loadRepoLastCommit:C,loadWorktreeLastCommit:A,repoDiff:l,repoLastCommit:h,requestRepoDiff:O,requestWorktreeDiff:T,setRepoDiff:c,setRepoLastCommit:u,setWorktreeLastCommitById:d,worktreeLastCommitById:g}}function p9({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(""),[v,w]=k.useState(null),_=k.useCallback(d=>{if(!e)return"";const f=new URL(`/api/v1/sessions/${encodeURIComponent(e)}/attachments/file`,window.location.origin);return 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]),g=k.useCallback((d=[])=>{const f=r(d);return f.length?x.jsx("div",{className:"bubble-attachments",children:f.map(p=>{const y=i(p),S=_(p),b=(p==null?void 0:p.path)||(p==null?void 0:p.name)||y;return n(p)?x.jsxs("button",{type:"button",className:"attachment-card attachment-card--image",onClick:()=>S?w({url:S,name:y}):null,disabled:!S,children:[S?x.jsx("img",{src:S,alt:y||a("Attached image"),className:"attachment-thumb",loading:"lazy"}):x.jsx("div",{className:"attachment-thumb attachment-thumb--empty"}),x.jsx("span",{className:"attachment-name",children:y})]},b):S?x.jsxs("a",{className:"attachment-card",href:S,target:"_blank",rel:"noopener noreferrer",children:[x.jsx("span",{className:"attachment-icon","aria-hidden":"true",children:s}),x.jsx("span",{className:"attachment-name",children:y})]},b):x.jsxs("div",{className:"attachment-card",children:[x.jsx("span",{className:"attachment-icon","aria-hidden":"true",children:s}),x.jsx("span",{className:"attachment-name",children:y})]},b)})}):null},[i,_,n,r,a]);return k.useEffect(()=>{e||l([])},[e]),{attachmentPreview:v,attachmentsError:u,attachmentsLoading:c,draftAttachments:o,getAttachmentUrl:_,renderMessageAttachments:g,setAttachmentPreview:w,setAttachmentsError:m,setAttachmentsLoading:h,setDraftAttachments:l}}const p0=e=>{if(e==null||e==="")return null;const t=new Date(e);return Number.isFinite(t.getTime())?t.toISOString():null},m0=e=>!e||typeof e!="object"?e:{...e,createdAt:p0(e.createdAt),doneAt:p0(e.doneAt)};function m9({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[v,w]=k.useState([]),_=k.useMemo(()=>e?`backlog:${e}`:null,[e]);k.useEffect(()=>{if(_)try{const E=JSON.parse(localStorage.getItem(_)||"[]");w(Array.isArray(E)?E.map(m0).filter(Boolean):[])}catch{w([])}},[_]),k.useEffect(()=>{_&&localStorage.setItem(_,JSON.stringify(v))},[v,_]);const g=k.useCallback(E=>{s(C=>C.map(A=>{var R;if((A==null?void 0:A.type)!=="backlog_view")return A;const T=Array.isArray((R=A.backlog)==null?void 0:R.items)?A.backlog.items:[],O=E(T);return O===T?A:{...A,backlog:{...A.backlog||{},items:O}}})),a(C=>{const A=new Map(C);return A.forEach((T,O)=>{if(!Array.isArray(T==null?void 0:T.messages))return;let R=!1;const M=T.messages.map(z=>{var ee;if((z==null?void 0:z.type)!=="backlog_view")return z;const U=Array.isArray((ee=z.backlog)==null?void 0:ee.items)?z.backlog.items:[],q=E(U);return q===U?z:(R=!0,{...z,backlog:{...z.backlog||{},items:q}})});R&&A.set(O,{...T,messages:M})}),A})},[s,a]),d=k.useCallback((E,C,A)=>{if(E&&E!=="main"){a(T=>{const O=new Map(T),R=O.get(E);if(!R)return T;const M=R.messages.map(z=>(z==null?void 0:z.id)===C&&z.type==="backlog_view"?{...z,backlog:{...z.backlog||{},page:A}}:z);return O.set(E,{...R,messages:M}),O});return}s(T=>T.map(O=>(O==null?void 0:O.id)===C&&O.type==="backlog_view"?{...O,backlog:{...O.backlog||{},page:A}}:O))},[s,a]),f=k.useCallback(async E=>{if(!e){u==null||u(m("Session not found."),"error");return}try{const C=await t(`/api/v1/sessions/${encodeURIComponent(e)}/backlog-items/${encodeURIComponent(E)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({done:!0})});if(!C.ok){const O=await C.json().catch(()=>({}));throw new Error((O==null?void 0:O.error)||m("Unable to update backlog."))}const A=await C.json().catch(()=>({})),T=m0(A==null?void 0:A.item);g(O=>O.map(R=>(R==null?void 0:R.id)===E?{...R,...T,done:!0}:R))}catch(C){u==null||u(C.message||m("Unable to update backlog."),"error")}},[t,e,u,m,g]),p=k.useCallback(()=>{const E=l.trim();if(!E)return;const C={id:`backlog-${Date.now()}-${Math.random().toString(16).slice(2,8)}`,text:E,createdAt:new Date().toISOString(),attachments:c};w(A=>[C,...A]),i("")},[c,l,i]),y=k.useCallback(E=>{w(C=>C.filter(A=>A.id!==E))},[]),S=k.useCallback(E=>{var C;i(E.text||""),o(r(E.attachments||[])),(C=h==null?void 0:h.current)==null||C.focus()},[h,r,o,i]),b=k.useCallback(E=>{n(E.text||"",E.attachments||[]),y(E.id)},[y,n]);return{addToBacklog:p,backlog:v,markBacklogItemDone:f,removeFromBacklog:y,editBacklogItem:S,launchBacklogItem:b,setBacklog:w,setBacklogMessagePage:d,updateBacklogMessages:g}}function g9({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:v,requestRepoDiff:w,requestWorktreeDiff:_,sendMessage:g,sendWorktreeMessage:d,buildAnnotatedMessage:f,clearScopedAnnotations:p,setAnnotationMode:y,setCommandMenuOpen:S,setDraftAttachments:b,setInput:E,setMessages:C,setWorktrees:A,socketRef:T,t:O,showToast:R}){const M=k.useCallback((z,U)=>{const q=(z??c).trim();if(!q)return;const ee=q.match(/^\/annotation\s+(on|off)\s*$/i);if(ee){const I=ee[1].toLowerCase()==="on";y(I),R(O(I?"Annotation mode enabled.":"Annotation mode disabled."),"info"),E(""),b([]),S(!1);return}if(q.startsWith("/annotation")){R(O("Usage: /annotation on|off"),"info");return}if(h){R(O("Worktree is stopped. Wake it up before sending a message."),"info");return}if(e==="codex"&&!u){R(O("Codex is starting. Please wait."),"info");return}if(q==="/diff"||q.startsWith("/diff ")){l("diff"),t&&t!=="main"?_(t):w(),E(""),b([]),S(!1);return}if(q.startsWith("/backlog")){if(!i){R(O("Session not found."),"error");return}(async()=>{try{const I=await n(`/api/v1/sessions/${encodeURIComponent(i)}/backlog-items`);if(!I.ok){const $=await I.json().catch(()=>null);throw new Error(($==null?void 0:$.error)||O("Unable to load backlog."))}const L=await I.json().catch(()=>({})),B=Array.isArray(L==null?void 0:L.items)?L.items:[],P={id:`backlog-${Date.now()}-${Math.random().toString(16).slice(2,8)}`,role:"assistant",type:"backlog_view",text:"Backlog",backlog:{items:B,page:0}};m&&t?A($=>{const Y=new Map($),H=Y.get(t);return H&&Y.set(t,{...H,messages:[...H.messages||[],P]}),Y}):C($=>[...$,P])}catch(I){R(I.message||O("Unable to load backlog."),"error")}})(),E(""),b([]),S(!1);return}if(q.startsWith("/open")){const I=q.replace(/^\/open\s*/i,"").trim();if(!I){R(O("Path required."),"error");return}v(I).then(()=>{E(""),b([]),S(!1)}).catch(()=>null);return}if(q.startsWith("/todo")){const I=q.replace(/^\/todo\s*/i,"").trim();if(!I){R(O("Todo text required."),"error");return}if(!i){R(O("Session not found."),"error");return}(async()=>{try{const L=await n(`/api/v1/sessions/${encodeURIComponent(i)}/backlog-items`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:I})});if(!L.ok){const B=await L.json().catch(()=>null);throw new Error((B==null?void 0:B.error)||O("Unable to update backlog."))}R(O("Added to backlog."))}catch(L){R(L.message||O("Unable to update backlog."),"error")}})(),E(""),b([]),S(!1);return}if(q.startsWith("/run")){const I=q.replace(/^\/run\s*/i,"").trim();if(!I){R(O("Command required."),"error");return}if(!T.current||!a){R(O("Disconnected"),"error");return}const L=m&&t?t:null;T.current.send(JSON.stringify({type:"action_request",request:"run",arg:I,worktreeId:L||void 0})),E(""),b([]),S(!1);return}if(q.startsWith("/screenshot")){s().then(()=>{E(""),S(!1)}).catch(()=>null);return}if(q.startsWith("/git")){const I=q.replace(/^\/git\s*/i,"").trim();if(!I){R(O("Git command required."),"error");return}if(!T.current||!a){R(O("Disconnected"),"error");return}const L=m&&t?t:null;T.current.send(JSON.stringify({type:"action_request",request:"git",arg:I,worktreeId:L||void 0})),E(""),b([]),S(!1);return}const W=f?f(q):q;m&&t?d(t,q,U,W):g(q,U,W),p==null||p()},[e,t,n,i,f,s,p,a,l,c,h,u,m,v,w,_,g,d,y,S,b,E,R,T,O]);return k.useEffect(()=>{o.current=M},[M,o]),{handleSendMessage:M}}function v9({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,v]=k.useState(""),[w,_]=k.useState(!1),[g,d]=k.useState(""),[f,p]=k.useState({}),[y,S]=k.useState([]),[b,E]=k.useState(""),[C,A]=k.useState(""),[T,O]=k.useState(!1),[R,M]=k.useState(""),z=k.useRef(""),U=k.useCallback(async({background:B=!1}={})=>{if(t){B||(O(!0),M(""));try{const D=await e(`/api/v1/sessions/${encodeURIComponent(t)}/branches`),P=await D.json().catch(()=>({}));if(!D.ok)throw new Error(P.error||o("Unable to load branches."));S(Array.isArray(P.branches)?P.branches:[]),E(P.current||""),!z.current&&P.current&&(z.current=P.current,A(P.current))}catch(D){B||M(D.message||o("Unable to load branches."))}finally{B||O(!1)}}},[t,e,o]),q=k.useCallback(async B=>{if(!(!t||!B)){p(D=>({...D,[B]:{...(D==null?void 0:D[B])||{},loading:!0,error:""}}));try{const D=await e(`/api/v1/sessions/${encodeURIComponent(t)}/models?provider=${encodeURIComponent(B)}`),P=await D.json().catch(()=>({}));if(!D.ok)throw new Error(P.error||o("Unable to load models."));p($=>({...$,[B]:{models:Array.isArray(P.models)?P.models:[],loading:!1,error:""}}))}catch(D){p(P=>({...P,[B]:{...(P==null?void 0:P[B])||{},loading:!1,error:D.message||o("Unable to load models.")}}))}}},[t,e,o]);k.useEffect(()=>{if(!t){S([]),E(""),A(""),M(""),z.current="",p({});return}z.current="",A(""),p({}),U({background:!0})},[t,U]),k.useEffect(()=>{t&&(n==null||n())},[t,b,n]);const ee=k.useCallback(()=>{!a.current||r!=="codex"||(_(!0),d(""),a.current.send(JSON.stringify({type:"model_list"})))},[r,a]),W=k.useCallback(B=>{const D=B.target.value;u(D),a.current&&(_(!0),d(""),a.current.send(JSON.stringify({type:"model_set",model:D,reasoningEffort:m||null})))},[m,a]),I=k.useCallback(B=>{const D=B.target.value;v(D),a.current&&(_(!0),d(""),a.current.send(JSON.stringify({type:"model_set",model:h||null,reasoningEffort:D||null})))},[h,a]),L=k.useCallback(async B=>{!t||i||(M(o("Branch switching is no longer supported.")),s&&s(!1))},[t,i,s,o]);return{branches:y,branchError:R,branchLoading:T,currentBranch:b,defaultBranch:C,handleBranchSelect:L,handleModelChange:W,handleReasoningEffortChange:I,loadBranches:U,loadProviderModels:q,modelError:g,modelLoading:w,models:l,providerModelState:f,requestModelList:ee,selectedModel:h,selectedReasoningEffort:m,setBranches:S,setCurrentBranch:E,setDefaultBranch:A,setModelError:d,setModelLoading:_,setModels:c,setProviderModelState:p,setSelectedModel:u,setSelectedReasoningEffort:v}}const _9=()=>new URLSearchParams(window.location.search).get("session");function y9({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:v,sessionMode:w,sessionRequested:_,setSessionRequested:g,defaultInternetAccess:d,defaultDenyGitCredentialsAccess:f,attachmentSession:p,setAttachmentSession:y,setAttachmentsLoading:S,setAttachmentsError:b,setWorkspaceToken:E,setWorkspaceMode:C,setWorkspaceError:A,setOpenAiLoginPending:T,setOpenAiLoginRequest:O}){k.useEffect(()=>{const z=_9();if(!z||!r||p!=null&&p.sessionId)return;(async()=>{try{g(!0),b("");const q=await t(`/api/v1/sessions/${encodeURIComponent(z)}`);if(!q.ok)throw new Error(e("Session not found."));const ee=await q.json();y(ee)}catch(q){b(q.message||e("Unable to resume the session.")),g(!1)}})()},[r,p==null?void 0:p.sessionId,t,n,y,b,g,e]),k.useEffect(()=>{if(!i||p!=null&&p.sessionId||w!=="new")return;(async()=>{try{S(!0),b("");const U={repoUrl:i,defaultInternetAccess:d,defaultDenyGitCredentialsAccess:f},q=o.trim();q&&(U.name=q),l&&(U.auth=l);const ee=await t("/api/v1/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(U)});if(!ee.ok){let I="",L="";try{const P=await ee.json();typeof(P==null?void 0:P.error)=="string"?I=P.error:typeof(P==null?void 0:P.message)=="string"?I=P.message:typeof P=="string"&&(I=P),typeof(P==null?void 0:P.error_type)=="string"&&(L=P.error_type)}catch{try{I=await ee.text()}catch{I=""}}if(ee.status===401&&(L==="WORKSPACE_TOKEN_INVALID"||typeof I=="string"&&I.toLowerCase().includes("invalid workspace token"))){E(""),C("existing"),A(e("Invalid workspace token. Please sign in again.")),b("");return}const D=I?`: ${I}`:"";throw ee.status===401||ee.status===403?new Error(e("Git authentication failed{{suffix}}.",{suffix:D})):ee.status===404?new Error(e("Git repository not found{{suffix}}.",{suffix:D})):new Error(e("Impossible de creer la session de pieces jointes (HTTP {{status}}{{statusText}}){{suffix}}.",{status:ee.status,statusText:ee.statusText?` ${ee.statusText}`:"",suffix:D}))}const W=await ee.json();y(W)}catch(U){b(U.message||e("Unable to create the attachment session.")),T(!1),O(null)}finally{S(!1),g(!1)}})()},[i,l,p==null?void 0:p.sessionId,t,w,d,f,o,y,b,S,T,O,g,A,C,E,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 R=k.useCallback(async z=>{if(z)try{g(!0),b("");const U=await t(`/api/v1/sessions/${encodeURIComponent(z)}`);if(!U.ok)throw new Error(e("Session not found."));const q=await U.json();y(q)}catch(U){b(U.message||e("Unable to resume the session.")),g(!1)}},[t,y,b,g,e]),M=k.useCallback(z=>{z.preventDefault();const U=!!(p!=null&&p.sessionId),q=a.trim();if(!U&&!q){b("URL de depot git requise pour demarrer.");return}let ee=null;if(!U){if(h==="ssh"){const W=u.trim();if(!W){b("Cle SSH privee requise pour demarrer.");return}ee={type:"ssh",privateKey:W}}if(h==="http"){const W=m.trim();if(!W||!v){b(e("Username and password required."));return}ee={type:"http",username:W,password:v}}}b(""),U||(g(!0),c(ee),s(q))},[p==null?void 0:p.sessionId,h,v,m,a,b,c,s,g,u,e]);return{handleResumeSession:R,onRepoSubmit:M}}function w9({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(""),[v,w]=k.useState(null),_=(f,p)=>JSON.stringify({type:"vibe80_handoff",handoffToken:f,baseUrl:window.location.origin,expiresAt:p}),g=k.useCallback(async()=>{if(r){h(!0),m("");try{const f=await t("/api/v1/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(),y=p==null?void 0:p.handoffToken;if(!y)throw new Error(e("Invalid resume token."));const S=(p==null?void 0:p.expiresAt)??null,b=_(y,S),{default:E}=await Ii(async()=>{const{default:A}=await import("./browser-e3WgtMs-.js").then(T=>T.b);return{default:A}},[]),C=await E.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),w(null)},[]);return k.useEffect(()=>{if(!n||!o){w(null);return}const f=typeof o=="number"?o:new Date(o).getTime();if(!Number.isFinite(f)){w(null);return}const p=()=>{const S=f-Date.now(),b=Math.max(0,Math.ceil(S/1e3));w(b)};p();const y=setInterval(p,1e3);return()=>clearInterval(y)},[n,o]),{handoffOpen:n,handoffQrDataUrl:s,handoffExpiresAt:o,handoffLoading:c,handoffError:u,handoffRemaining:v,requestHandoffQr:g,closeHandoffQr:d}}function b9({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),[v,w]=k.useState(!1),[_,g]=k.useState(""),[d,f]=k.useState(""),p=k.useCallback(async()=>{var S,b,E,C;if(r){m(!0),g(""),f("");try{const A=await t(`/api/v1/sessions/${encodeURIComponent(r)}/git-identity`);if(!A.ok)throw new Error(e("Unable to load Git identity."));const T=await A.json(),O=((S=T==null?void 0:T.global)==null?void 0:S.name)||"",R=((b=T==null?void 0:T.global)==null?void 0:b.email)||"",M=((E=T==null?void 0:T.repo)==null?void 0:E.name)||"",z=((C=T==null?void 0:T.repo)==null?void 0:C.email)||"";l({name:O,email:R}),h({name:M,email:z}),i(M||O),a(z||R)}catch(A){g((A==null?void 0:A.message)||e("Error during loading."))}finally{m(!1)}}},[r,t,e]),y=k.useCallback(async()=>{var E,C;if(!r)return;const S=n.trim(),b=s.trim();if(!S||!b){g(e("Name and email required."));return}w(!0),g(""),f("");try{const A=await t(`/api/v1/sessions/${encodeURIComponent(r)}/git-identity`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:S,email:b})});if(!A.ok){const M=await A.json().catch(()=>({}));throw new Error((M==null?void 0:M.error)||e("Update failed."))}const T=await A.json().catch(()=>({})),O=((E=T==null?void 0:T.repo)==null?void 0:E.name)||S,R=((C=T==null?void 0:T.repo)==null?void 0:C.email)||b;h({name:O,email:R}),f(e("Repository Git identity updated."))}catch(A){g((A==null?void 0:A.message)||e("Update failed."))}finally{w(!1)}},[r,t,s,n,e]);return k.useEffect(()=>{r&&p()},[r,p]),{gitIdentityName:n,gitIdentityEmail:s,gitIdentityGlobal:o,gitIdentityRepo:c,gitIdentityLoading:u,gitIdentitySaving:v,gitIdentityError:_,gitIdentityMessage:d,setGitIdentityName:i,setGitIdentityEmail:a,loadGitIdentity:p,handleSaveGitIdentity:y}}function S9({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 v=k.useCallback((p,y)=>{var b;if(!((b=p==null?void 0:p.fields)!=null&&b.length))return;const S={};p.fields.forEach(E=>{var C;E.type==="checkbox"?S[E.id]=!!E.defaultChecked:E.type==="radio"||E.type==="select"?S[E.id]=((C=E.choices)==null?void 0:C[0])||"":S[E.id]=E.defaultValue||""}),h({...p,key:y}),m(S)},[]),w=k.useCallback(()=>{h(null),m({})},[]),_=k.useCallback((p,y)=>{m(S=>({...S,[p]:y}))},[]),g=k.useCallback(p=>{var b;const y=r,S=s;(b=i.current)==null||b.call(i,p,[]),n(y),a(S)},[s,i,r,a,n]),d=k.useCallback(p=>{if(p==null||p.preventDefault(),!c)return;const y=c.fields.map(S=>{let b=u[S.id];return S.type==="checkbox"&&(b=b?"1":"0"),b==null&&(b=""),`${S.id}=${b}`});g(y.join(`
|
|
704
|
+
`)),w()},[c,u,w,g]),f=k.useCallback((p,y,S)=>{var b;l(E=>({...E,[y]:S})),n(p),(b=i.current)==null||b.call(i,p)},[i,n]);return{choiceSelections:o,setChoiceSelections:l,activeForm:c,activeFormValues:u,openVibe80Form:v,closeVibe80Form:w,updateActiveFormValue:_,submitActiveForm:d,handleChoiceClick:f,setActiveForm:h,setActiveFormValues:m}}function C9({authMode:e,llmProvider:t,selectedProviders:r,openAiAuthMode:n,showChatCommands:i,showToolResults:s,notificationsEnabled:a,themeMode:o,repoHistory:l,debugMode:c,setLlmProvider:h,setOpenAiLoginError:u,setClaudeLoginError:m,AUTH_MODE_KEY:v,LLM_PROVIDER_KEY:w,LLM_PROVIDERS_KEY:_,OPENAI_AUTH_MODE_KEY:g,CHAT_COMMANDS_VISIBLE_KEY:d,TOOL_RESULTS_VISIBLE_KEY:f,NOTIFICATIONS_ENABLED_KEY:p,THEME_MODE_KEY:y,REPO_HISTORY_KEY:S,DEBUG_MODE_KEY:b}){k.useEffect(()=>{try{localStorage.setItem(v,e)}catch{}},[v,e]),k.useEffect(()=>{try{localStorage.setItem(w,t)}catch{}},[w,t]),k.useEffect(()=>{try{localStorage.setItem(_,JSON.stringify(r))}catch{}},[_,r]),k.useEffect(()=>{u(""),m("")},[t,m,u]),k.useEffect(()=>{if(r.includes(t))return;const E=r[0]||"codex";E!==t&&h(E)},[r,t,h]),k.useEffect(()=>{try{localStorage.setItem(g,n)}catch{}},[g,n]),k.useEffect(()=>{try{localStorage.setItem(d,i?"true":"false")}catch{}},[d,i]),k.useEffect(()=>{try{localStorage.setItem(f,s?"true":"false")}catch{}},[f,s]),k.useEffect(()=>{try{localStorage.setItem(p,a?"true":"false")}catch{}},[p,a]),k.useEffect(()=>{try{localStorage.setItem(y,o)}catch{}},[y,o]),k.useEffect(()=>{try{localStorage.setItem(S,JSON.stringify(l))}catch{}},[S,l]),k.useEffect(()=>{try{localStorage.setItem(b,c?"true":"false")}catch{}},[b,c])}function k9({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 x9({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 E9(){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 A9(){const[e,t]=k.useState({}),[r,n]=k.useState({});return{commandPanelOpen:e,setCommandPanelOpen:t,toolResultPanelOpen:r,setToolResultPanelOpen:n}}function L9({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(v=>({...v,[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 P9({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:v,setActivity:w,setDefaultDenyGitCredentialsAccess:_}){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),v(null),w(""),typeof _=="function"&&_(!1);const d=new URL(window.location.href);d.searchParams.delete("session"),window.history.replaceState({},"",d)},[w,e,s,a,v,o,n,l,r,u,t,c,h,i,_,m])}}function T9({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 D9({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 I9({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 N9({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 v=await t(`/api/v1/sessions/${encodeURIComponent(e)}`);if(!v.ok)return;const w=await v.json();if(w!=null&&w.defaultProvider&&w.defaultProvider!==r&&n(w.defaultProvider),Array.isArray(w==null?void 0:w.providers)&&w.providers.length){const _=w.providers.filter(g=>g==="codex"||g==="claude");_.length&&(i(_),s(_.includes("codex")),a(_.includes("claude")))}w!=null&&w.repoDiff&&o(w.repoDiff),typeof(w==null?void 0:w.rpcLogsEnabled)=="boolean"&&(l(w.rpcLogsEnabled),w.rpcLogsEnabled||c([])),Array.isArray(w==null?void 0:w.rpcLogs)&&(w==null?void 0:w.rpcLogsEnabled)!==!1&&c(w.rpcLogs),typeof(w==null?void 0:w.terminalEnabled)=="boolean"&&h(w.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 O9({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)=>({...u,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(v=>v==null?void 0:v.id).filter(Boolean)),m=[...h];for(const v of c){const w=v==null?void 0:v.id;w&&u.has(w)||(w&&u.add(w),m.push(v))}o(m)},[o,n]);return{applyMessages:o,mergeAndApplyMessages:l}}function M9({closeConfirm:e,setCloseConfirm:t,setActiveWorktreeId:r,activeWorktreeIdRef:n,closeWorktree:i}){const[s,a]=k.useState(!1),o=k.useCallback(h=>{!h||h==="main"||t({worktreeId:h})},[t]),l=k.useCallback(()=>{s||t(null)},[s,t]),c=k.useCallback(async()=>{if(!(!(e!=null&&e.worktreeId)||s)){a(!0);try{n.current===e.worktreeId&&r("main"),await i(e.worktreeId),t(null)}finally{a(!1)}}},[n,e,s,i,r,t]);return{openCloseConfirm:o,closeCloseConfirm:l,handleConfirmDelete:c,closeConfirmDeleting:s}}function j9({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 B9=e=>{const r=String(e||"").replace(/\\/g,"/").split("/").filter(Boolean);return r.length?r[r.length-1]:""},So=e=>{const r=String(e||"").replace(/\\/g,"/").split("/").filter(Boolean);return r.length<=1?"":r.slice(0,-1).join("/")},_h=(e,t)=>e?`${e}/${t}`:t,Fl=(e,t,r)=>!e||typeof e!="string"?e:e===t?r:e.startsWith(`${t}/`)?`${r}${e.slice(t.length)}`:e;function F9({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((D,P)=>{n($=>{const Y=$[D]||i;return{...$,[D]:{...i,...Y,...P}}})},[i,n]),v=k.useCallback((D,P)=>{if(!Array.isArray(D))return null;for(const $ of D){if(($==null?void 0:$.path)===P)return $;if(($==null?void 0:$.type)==="dir"&&Array.isArray($.children)){const Y=v($.children,P);if(Y)return Y}}return null},[]),w=k.useCallback((D,P,$)=>{if(!Array.isArray(D))return D;let Y=!1;const H=D.map(j=>{if(!j)return j;if(j.path===P)return Y=!0,{...j,children:$};if(j.type==="dir"&&j.children!=null){const N=w(j.children,P,$);if(N!==j.children)return Y=!0,{...j,children:N}}return j});return Y?H:D},[]),_=k.useCallback((D,P,$)=>{n(Y=>{const H=Y[D]||i,j=Array.isArray(H.tree)?H.tree:[],N=w(j,P,$);return N===j?Y:{...Y,[D]:{...i,...H,tree:N}}})},[i,n,w]),g=k.useCallback(async(D,P)=>{if(!e||!D)return[];const $=await t(`/api/v1/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(D)}/browse${P?`?path=${encodeURIComponent(P)}`:""}`);if(!$.ok)throw new Error("Failed to load directory");const Y=await $.json().catch(()=>({})),j=(Array.isArray(Y==null?void 0:Y.entries)?Y.entries:[]).map(N=>({...N,children:(N==null?void 0:N.type)==="dir"?(N==null?void 0:N.children)??null:void 0}));return P?_(D,P,j):m(D,{tree:j,loading:!1,error:"",treeTruncated:!1,treeTotal:j.length}),j},[e,t,_,m]),d=k.useCallback(D=>D?D.trim().replace(/\\/g,"/").replace(/^\.\/+/,"").replace(/\/+$/,"").replace(/\/+/g,"/"):"",[]),f=k.useCallback((D,P)=>{if(!P)return;const $=P.split("/").filter(Boolean),Y=[];let H="";$.forEach(j=>{H=H?`${H}/${j}`:j,Y.push(H)}),m(D,{expandedPaths:Y})},[m]),p=k.useCallback((D,P,$)=>{!D||!P||m(D,{selectedPath:P,selectedType:$||null})},[m]),y=k.useCallback(async(D,P=!1)=>{var Y;if(!e||!D)return;const $=s.current[D];if(!(!P&&($!=null&&$.tree)&&!($!=null&&$.error))&&!($!=null&&$.loading)){m(D,{loading:!0,error:""});try{if(await g(D,""),P){const H=Array.isArray((Y=s.current[D])==null?void 0:Y.expandedPaths)?s.current[D].expandedPaths:[],j=Array.from(new Set(H.filter(N=>typeof N=="string"&&N.length>0)));for(const N of j)await g(D,N)}}catch{m(D,{loading:!1,error:r("Unable to load the explorer.")})}}},[e,s,m,g,r]),S=k.useCallback(async(D,P=!1)=>{if(!e||!D)return;const $=s.current[D];if(!(!P&&($!=null&&$.statusLoaded)&&!($!=null&&$.statusError))&&!($!=null&&$.statusLoading)){m(D,{statusLoading:!0,statusError:""});try{const Y=await t(`/api/v1/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(D)}/status`);if(!Y.ok)throw new Error("Failed to load status");const H=await Y.json(),j=Array.isArray(H==null?void 0:H.entries)?H.entries:[],N={};j.forEach(K=>{!(K!=null&&K.path)||!(K!=null&&K.type)||(N[K.path]=K.type)}),m(D,{statusByPath:N,statusLoading:!1,statusError:"",statusLoaded:!0})}catch{m(D,{statusLoading:!1,statusError:r("Unable to load Git status."),statusLoaded:!1})}}},[e,s,m,t,r]),b=k.useCallback(async(D,P,$=!1)=>{var N;if(!e||!D||!P)return;const Y=s.current[D]||i,H=Array.isArray(Y.openTabPaths)?Y.openTabPaths:[],j=(N=Y.filesByPath)==null?void 0:N[P];if(n(K=>{var ae;const V=K[D]||i,X=Array.isArray(V.openTabPaths)?V.openTabPaths:[],re=X.includes(P)?X:[...X,P],ce=((ae=V.filesByPath)==null?void 0:ae[P])||{},ge=$||ce.content==null;return{...K,[D]:{...i,...V,openTabPaths:re,activeFilePath:P,selectedPath:P,selectedType:"file",editMode:!0,filesByPath:{...V.filesByPath||{},[P]:{...ce,path:P,loading:ge,error:"",saveError:"",saving:!1,binary:ge?!1:!!ce.binary}}}}}),!(!$&&H.includes(P)&&(j==null?void 0:j.content)!=null))try{const K=await t(`/api/v1/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(D)}/file?path=${encodeURIComponent(P)}`);if(!K.ok)throw new Error("Failed to load file");const V=await K.json(),X=(V==null?void 0:V.content)||"";n(re=>{var ae;const ce=re[D]||i,ge=((ae=ce.filesByPath)==null?void 0:ae[P])||{};return{...re,[D]:{...i,...ce,filesByPath:{...ce.filesByPath||{},[P]:{...ge,path:P,content:X,draftContent:X,loading:!1,error:"",truncated:!!(V!=null&&V.truncated),binary:!!(V!=null&&V.binary),isDirty:!1}}}}})}catch{n(K=>{var re;const V=K[D]||i,X=((re=V.filesByPath)==null?void 0:re[P])||{};return{...K,[D]:{...i,...V,filesByPath:{...V.filesByPath||{},[P]:{...X,path:P,loading:!1,error:r("Unable to load the file.")}}}}})}},[e,i,s,n,r,t]),E=k.useCallback(D=>{var $;if(!D)return;const P=a||"main";o("explorer"),y(P),S(P),($=u.current)==null||$.call(u,P,D)},[a,o,y,S,u]),C=k.useCallback(async D=>{var K,V,X,re,ce,ge;const P=a||"main";if(!e){l(r("Session not found."),"error");return}const $=d(D);if(!$){l(r("Path required."),"error");return}let Y=(K=s.current[P])==null?void 0:K.tree;if(!Array.isArray(Y)||Y.length===0)try{await g(P,""),Y=(V=s.current[P])==null?void 0:V.tree}catch{l(r("Unable to load directory."),"error");return}const H=$.split("/").filter(Boolean);let j="",N=null;for(const ae of H){const Se=j?`${j}/${ae}`:ae;if(N=v(Y,Se),!N){l(r("Path not found."),"error");return}if(N.type==="dir"&&N.children===null)try{if(await g(P,N.path),Y=(X=s.current[P])==null?void 0:X.tree,N=v(Y,Se),!N){l(r("Path not found."),"error");return}}catch{l(r("Unable to load directory."),"error");return}j=Se}if(!N){l(r("Path not found."),"error");return}o("explorer"),(re=c.current)==null||re.call(c,P),(ce=h.current)==null||ce.call(h,P),p(P,N.path,N.type),N.type==="dir"?f(P,N.path):(ge=u.current)==null||ge.call(u,P,N.path)},[a,e,o,c,h,d,g,v,u,p,f,s,l,r]),A=k.useCallback((D,P)=>{if(!D||!P)return;const $=s.current[D]||i,H=!new Set($.expandedPaths||[]).has(P);n(j=>{const N=j[D]||i,K=new Set(N.expandedPaths||[]);return K.has(P)?K.delete(P):K.add(P),{...j,[D]:{...i,...N,expandedPaths:Array.from(K)}}}),H&&g(D,P).catch(()=>{m(D,{error:r("Unable to load the explorer.")})})},[s,i,n,g,m,r]),T=k.useCallback((D,P,$)=>{var H,j,N,K;if(!D)return;const Y=P||((j=(H=s.current)==null?void 0:H[D])==null?void 0:j.activeFilePath)||((K=(N=s.current)==null?void 0:N[D])==null?void 0:K.selectedPath);Y&&n(V=>{var ge;const X=V[D]||i,re=(ge=X.filesByPath)==null?void 0:ge[Y];if(!re)return V;const ce=$??"";return{...V,[D]:{...i,...X,filesByPath:{...X.filesByPath||{},[Y]:{...re,draftContent:ce,isDirty:ce!==(re.content||""),saveError:""}}}}})},[s,i,n]),O=k.useCallback(async(D,P)=>{var j,N;if(!e||!D)return;const $=(j=s.current)==null?void 0:j[D],Y=P||($==null?void 0:$.activeFilePath)||($==null?void 0:$.selectedPath),H=Y?(N=$==null?void 0:$.filesByPath)==null?void 0:N[Y]:null;if(!(!Y||!H||H.binary)){n(K=>{var re;const V=K[D]||i,X=(re=V.filesByPath)==null?void 0:re[Y];return X?{...K,[D]:{...i,...V,filesByPath:{...V.filesByPath||{},[Y]:{...X,saving:!0,saveError:""}}}}:K});try{if(!(await t(`/api/v1/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(D)}/file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:Y,content:H.draftContent||""})})).ok)throw new Error("Failed to save file");n(V=>{var ce;const X=V[D]||i,re=(ce=X.filesByPath)==null?void 0:ce[Y];return re?{...V,[D]:{...i,...X,filesByPath:{...X.filesByPath||{},[Y]:{...re,content:re.draftContent||"",saving:!1,saveError:"",isDirty:!1}}}}:V}),S(D,!0)}catch{n(K=>{var re;const V=K[D]||i,X=(re=V.filesByPath)==null?void 0:re[Y];return X?{...K,[D]:{...i,...V,filesByPath:{...V.filesByPath||{},[Y]:{...X,saving:!1,saveError:r("Unable to save the file.")}}}}:K})}}},[e,s,i,n,S,t,r]),R=k.useCallback((D,P)=>{!D||!P||m(D,{activeFilePath:P,selectedPath:P,selectedType:"file"})},[m]),M=k.useCallback((D,P)=>{var j,N;if(!D||!P)return;const $=((j=s.current)==null?void 0:j[D])||i;if(!(Array.isArray($.openTabPaths)?$.openTabPaths:[]).includes(P))return;const H=(N=$.filesByPath)==null?void 0:N[P];H!=null&&H.isDirty&&!window.confirm(r("You have unsaved changes. Continue without saving?"))||n(K=>{const V=K[D]||i,X=Array.isArray(V.openTabPaths)?V.openTabPaths:[],re=X.indexOf(P);if(re<0)return K;const ce=X.filter(Se=>Se!==P),ge={...V.filesByPath||{}};delete ge[P];let ae=V.activeFilePath||null;return ae===P&&(ae=ce[re-1]||ce[re]||ce[ce.length-1]||null),{...K,[D]:{...i,...V,openTabPaths:ce,filesByPath:ge,activeFilePath:ae,selectedPath:ae,selectedType:ae?"file":null,editMode:!!ae}}})},[s,i,n,r]),z=k.useCallback(D=>{var Y;if(!D)return!1;const $=(((Y=s.current)==null?void 0:Y[D])||i).selectedPath;return $?(m(D,{renamingPath:$,renameDraft:B9($)}),!0):!1},[s,i,m]),U=k.useCallback(D=>{D&&m(D,{renamingPath:null,renameDraft:""})},[m]),q=k.useCallback((D,P)=>{D&&m(D,{renameDraft:P??""})},[m]),ee=k.useCallback(async D=>{var j;if(!e||!D)return!1;const P=((j=s.current)==null?void 0:j[D])||i,$=P.renamingPath,Y=(P.renameDraft||"").trim();if(!$||!Y)return U(D),!1;if(Y.includes("/"))return l(r("Path required."),"error"),!1;const H=_h(So($),Y);if(!H||H===$)return U(D),!1;try{if(!(await t(`/api/v1/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(D)}/file/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fromPath:$,toPath:H})})).ok)throw new Error("Failed to rename path");return n(K=>{const V=K[D]||i,X=Array.from(new Set((V.openTabPaths||[]).map(ce=>Fl(ce,$,H)))),re={};return Object.entries(V.filesByPath||{}).forEach(([ce,ge])=>{re[Fl(ce,$,H)]=ge}),{...K,[D]:{...i,...V,openTabPaths:X,filesByPath:re,activeFilePath:Fl(V.activeFilePath,$,H),selectedPath:Fl(V.selectedPath,$,H),renamingPath:null,renameDraft:""}}}),await y(D,!0),await S(D,!0),l(r("Renamed."),"success"),!0}catch{return l(r("Unable to rename."),"error"),!1}},[e,s,i,n,t,y,S,U,l,r]),W=k.useCallback(async(D,P)=>{var V;if(!e||!D)return!1;const $=d(P||"");if(!$)return l(r("Path required."),"error"),!1;const Y=((V=s.current)==null?void 0:V[D])||i,H=Y.selectedPath||"",j=Y.selectedType||null,N=j==="dir"?H:j==="file"?So(H):"",K=_h(N,$);try{if(!(await t(`/api/v1/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(D)}/file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:K,content:""})})).ok)throw new Error("Failed to create file");return await y(D,!0),await S(D,!0),await b(D,K,!0),l(r("File created."),"success"),!0}catch{return l(r("Unable to create file."),"error"),!1}},[e,s,i,d,y,S,b,t,l,r]),I=k.useCallback(async(D,P)=>{var V;if(!e||!D)return!1;const $=d(P||"");if(!$)return l(r("Path required."),"error"),!1;const Y=((V=s.current)==null?void 0:V[D])||i,H=Y.selectedPath||"",j=Y.selectedType||null,N=j==="dir"?H:j==="file"?So(H):"",K=_h(N,$);try{if(!(await t(`/api/v1/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(D)}/folder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:K})})).ok)throw new Error("Failed to create folder");return await y(D,!0),await S(D,!0),l(r("Folder created."),"success"),!0}catch{return l(r("Unable to create folder."),"error"),!1}},[e,d,s,i,t,y,S,l,r]),L=k.useCallback(async D=>{var H;if(!e||!D)return!1;const $=(((H=s.current)==null?void 0:H[D])||i).selectedPath||"";if(!$||!window.confirm(r('Delete "{{path}}"? This action is irreversible.',{path:$})))return!1;m(D,{deletingPath:$});try{if(!(await t(`/api/v1/sessions/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(D)}/file/delete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:$})})).ok)throw new Error("Failed to delete path");return n(N=>{const K=N[D]||i,V=(K.openTabPaths||[]).filter(ce=>ce!==$&&!ce.startsWith(`${$}/`)),X={};Object.entries(K.filesByPath||{}).forEach(([ce,ge])=>{ce===$||ce.startsWith(`${$}/`)||(X[ce]=ge)});const re=K.activeFilePath===$||String(K.activeFilePath||"").startsWith(`${$}/`)?V[V.length-1]||null:K.activeFilePath;return{...N,[D]:{...i,...K,openTabPaths:V,filesByPath:X,activeFilePath:re,selectedPath:So($)||re,selectedType:So($)?"dir":re?"file":null,renamingPath:null,renameDraft:"",deletingPath:null}}}),await y(D,!0),await S(D,!0),l(r("Deleted."),"success"),!0}catch{return m(D,{deletingPath:null}),l(r("Unable to delete."),"error"),!1}},[e,s,i,n,m,y,S,t,l,r]),B=k.useCallback((D,P)=>{D&&m(D,{editMode:P})},[m]);return k.useEffect(()=>{c.current=y},[y,c]),k.useEffect(()=>{h.current=S},[S,h]),k.useEffect(()=>{u.current=b},[b,u]),{updateExplorerState:m,selectExplorerNode:p,openPathInExplorer:C,requestExplorerTree:y,requestExplorerStatus:S,loadExplorerFile:b,openFileInExplorer:E,setActiveExplorerFile:R,closeExplorerFile:M,toggleExplorerDir:A,toggleExplorerEditMode:B,updateExplorerDraft:T,saveExplorerFile:O,startExplorerRename:z,cancelExplorerRename:U,updateExplorerRenameDraft:q,submitExplorerRename:ee,createExplorerFile:W,createExplorerFolder:I,deleteExplorerSelection:L}}function z9({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(v=>{!t.current||t.current.readyState!==WebSocket.OPEN||r.includes(v)&&(v===n||i||s||(a(!0),o(h("Switching to {{provider}}...",{provider:v})),t.current.send(JSON.stringify({type:"switch_provider",provider:v}))))},[r,n,s,i,a,o,t,h]),m=k.useCallback(v=>{e||l(w=>{const _=w.includes(v),g=_?w.filter(d=>d!==v):[...w,v];if(!_)c(v);else if(v===n){const d=g[0]||v;d!==n&&c(d)}return g})},[e,n,c,l]);return{handleProviderSwitch:u,toggleProviderSelection:m}}function $9({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 v=Array.isArray(e)?e:[];if(!v.length)return;h(!1);const w=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")}: ${_}`,""];v.forEach(p=>{var b,E,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)||((E=p.toolResult)==null?void 0:E.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 y=p.role==="user"?s("Username"):s("Assistant");d.push(`## ${y}`),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(w,"md"),f,"text/markdown");return}const g={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:v.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(w,"json"),JSON.stringify(g,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:v}){const w=k.useCallback((d,f,p)=>{const y=(d??e).trim();if(!y||!i.current||!s)return;const S=(p??y).trim();if(!S)return;v==null||v();const b=a(f??o),E=b.map(T=>T==null?void 0:T.path).filter(Boolean),C=E.length>0?`;; attachments: ${JSON.stringify(E)}`:"",A=`${S}${C}`;r(T=>[...T,{id:`user-${Date.now()}`,role:"user",text:y,attachments:b}]),c==null||c(!0),h==null||h(u||"Processing..."),i.current.send(JSON.stringify({type:"worktree_send_message",worktreeId:"main",text:A,displayText:y,attachments:b})),t(""),n([])},[s,o,e,a,n,t,r,i]),_=k.useCallback(d=>{m.current&&m.current(d,[])},[m]),g=k.useCallback((d,f,p,y)=>{const S=(f??e).trim();if(!S||!i.current||!s||!d)return;const b=(y??S).trim();if(!b)return;const E=a(p??o),C=E.map(O=>O==null?void 0:O.path).filter(Boolean),A=C.length>0?`;; attachments: ${JSON.stringify(C)}`:"",T=`${b}${A}`;l(O=>{const R=new Map(O);if(d==="main")return R;const M=R.get(d);if(M){const z=[...M.messages,{id:`user-${Date.now()}`,role:"user",text:S,attachments:E}];R.set(d,{...M,messages:z,status:"processing"})}return R}),d==="main"&&(c==null||c(!0),h==null||h(u||"Processing...")),i.current.send(JSON.stringify({type:"worktree_send_message",worktreeId:d,text:T,displayText:S,attachments:E})),t(""),n([])},[s,o,e,a,n,t,l,i]);return{sendMessage:w,sendCommitMessage:_,sendWorktreeMessage:g}}function H9({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:v}){return{handleClearChat:k.useCallback(async()=>{if(t(!1),e!=="main"){if(r(_=>{const g=new Map(_),d=g.get(e);return d&&g.set(e,{...d,messages:[]}),g}),n.current=null,i)try{await s(`/api/v1/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/v1/sessions/${encodeURIComponent(i)}/clear`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:v})})}catch{}},[e,s,i,h,l,v,o,c,u,a,m,t,r,n])}}const W9="Rename",V9="Stopped",K9="Annotations",G9="Valider",q9={"Provider cannot be disabled: active sessions use it.":"Provider cannot be disabled: active sessions use it.","New file":"New file",Rename:W9,"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.","New folder":"New folder","Folder path":"Folder path","e.g. src/new-folder":"e.g. src/new-folder","Folder created.":"Folder created.","Unable to create folder.":"Unable to create folder.","Deleted.":"Deleted.",'Delete "{{path}}"? This action is irreversible.':'Delete "{{path}}"? This action is irreversible.',Stopped:V9,"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.","User command : {{command}}":"User command : {{command}}","Toggle annotation mode":"Toggle annotation mode","Toggle annotation mode (EXPERIMENTAL)":"Toggle annotation mode (EXPERIMENTAL)","Annotation mode enabled.":"Annotation mode enabled.","Annotation mode disabled.":"Annotation mode disabled.","Usage: /annotation on|off":"Usage: /annotation on|off","Annotate line":"Annotate line",Annotations:K9,"Only sent with the next message.":"Only sent with the next message.","No annotations yet.":"No annotations yet.","Write annotation...":"Write annotation...","Configure session":"Configurer la session","Keep current credentials":"Conserver les identifiants actuels","Session name":"Nom de la session","Session name is required.":"Le nom de session est requis.","Session updated.":"Session mise a jour.","Failed to update session.":"Echec de la mise a jour de la session.","Private SSH key is required.":"La cle SSH privee est requise.",Validate:G9,"Keep unchanged":"Conserver tel quel","Update & Resume":"Mettre a jour et reprendre","Updating...":"Mise a jour..."},Y9="Tout",J9="api_key",X9="Assistant",Q9="Pièces jointes",Z9="auth_json_b64",eF="Revenir",tF="Backlog",rF="Annuler",nF="Claude",iF="Clear",sF="Cloner",oF="Fermer",aF="Codex",lF="Commande",cF="Commit",uF="Termine",fF="Connecte",hF="Continuer",dF="Copier",pF="Créer",mF="Creation",gF="Supprimer",vF="Diff",_F="Deconnecte",yF="Éditer",wF="Anglais",bF="Explorateur",SF="Exporter",CF="FILE",kF="Formulaire",xF="Français",EF="Langue",AF="Lancer",LF="Logs",PF="Main",TF="Markdown",DF="Messages",IF="Modele",NF="Non",RF="Suivant",OF="Aucune",MF="Notifications",jF="Aperçu",BF="Precedent",FF="Provider",zF="Pret",$F="Reasoning",UF="Rafraichir",HF="Renommer",WF="Arrete",VF="Regenerer",KF="Reprendre",GF="Sauver",qF="Secret",YF="Envoyer",JF="Session",XF="Paramètres",QF="setup_token",ZF="Stdin",ez="stdin",tz="Stdout",rz="stdout",nz="Stop",iz="Onglet",sz="Terminal",oz="Tool",az="Annotations",lz="Utilisateur",cz="workspaceSecret",uz="Worktree",fz="Oui",hz="Valider",dz={"-----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:Y9,"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:J9,"Applying changes...":"Application de modifications...",Assistant:X9,"Attached image":"Image jointe","Added to backlog.":"Ajouté au backlog.",Attachments:Q9,"Auth {{provider}}":"Auth {{provider}}",auth_json_b64:Z9,"Authentication failed.":"Echec de l'authentification.",Back:eF,"Back to previous view":"Revenir à la vue précédente",Backlog:tF,"Show backlog":"Afficher le backlog","Binary file not displayed.":"Fichier binaire non affiche.",Cancel:rF,"Chat history":"Historique du chat","Chat tools":"Outils du chat",Claude:nF,Clear:iF,Clone:sF,"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:oF,"Close panel":"Fermer le panneau","Close the worktree?":"Fermer le worktree ?",Codex:aF,"Codex (OpenAI)":"Codex (OpenAI)",Command:lF,"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:cF,"Commit & Push":"Commit & Push",Completed:uF,"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:fF,"Connecting...":"Connexion...",Continue:hF,"Continue on mobile":"Continuer sur mobile",Copy:dF,"Copy code":"Copier le code","Copy workspace ID":"Copier le workspace ID","Copy workspace secret":"Copier le workspace secret",Create:pF,"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:mF,"Dark mode":"Mode sombre","Debug mode":"Mode débug","Default model":"Modele par defaut","Default reasoning":"Reasoning par defaut",Delete:gF,'Delete session "{{title}}"? This action is irreversible.':'Supprimer la session "{{title}}" ? Cette action est irreversible.',"Delete worktree":"Supprimer le worktree","Deleting...":"Suppression...",Diff:vF,Disconnected:_F,"e.g. refactor-auth":"ex: refactor-auth",Edit:yF,"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:wF,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:bF,Export:SF,FILE:CF,"File truncated for display.":"Fichier tronque pour l'affichage.",Form:kF,French:xF,"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","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:EF,"Last activity: {{date}}":"Derniere activite: {{date}}",Launch:AF,"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:LF,Main:PF,Markdown:TF,"Merge into {{branch}}":"Merge vers {{branch}}",Messages:DF,Model:IF,"Name (optional)":"Nom (optionnel)","Name and email required.":"Nom et email requis.","New message":"Nouveau message","New file":"Nouveau fichier","New folder":"Nouveau dossier","New worktree":"Nouveau worktree","New session":"Nouvelle session",No:NF,"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:RF,"No tasks":"Aucune tâche",None:OF,"Not set":"Non défini",Notifications:MF,"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:jF,"Private SSH key (not recommended)":"Cle SSH privee (non recommande)",Previous:BF,"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:FF,"QR code":"QR code","QR code expired":"QR code expire","QR code unavailable.":"QR code indisponible.",Ready:zF,Reasoning:$F,"Reasoning...":"Raisonnement...",Refresh:UF,Rename:HF,"Renamed.":"Renomme.",Stopped:WF,Regenerate:VF,"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:KF,"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:GF,"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:qF,"Select a branch":"Selectionner une branche","Select a file in the tree.":"Selectionnez un fichier dans l'arborescence.","File path":"Chemin du fichier","Folder path":"Chemin du dossier","e.g. src/new-file.ts":"ex: src/nouveau-fichier.ts","e.g. src/new-folder":"ex: src/nouveau-dossier","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:YF,"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:JF,'Session "{{title}}" deleted.':'Session "{{title}}" supprimee.',"Session name (optional)":"Nom de la session (optionnel)","Session not found.":"Session introuvable.",Settings:XF,setup_token:QF,"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.","Source branch":"Branche source","Start a session to open the terminal.":"Demarrez une session pour ouvrir le terminal.",Stdin:ZF,stdin:ez,Stdout:tz,stdout:rz,Stop:nz,"Switching to {{provider}}...":"Basculement vers {{provider}}...",Tab:iz,Terminal:sz,"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:oz,"Tool result":"Tool result","Tool: {{tool}}":"Outil: {{tool}}","User command : {{command}}":"Commande utilisateur : {{command}}","Toggle annotation mode":"Activer le mode annotation","Toggle annotation mode (EXPERIMENTAL)":"Activer le mode annotation (EXPERIMENTAL)","Annotation mode enabled.":"Mode annotation activé.","Annotation mode disabled.":"Mode annotation désactivé.","Usage: /annotation on|off":"Usage : /annotation on|off","Annotate line":"Annoter la ligne",Annotations:az,"Only sent with the next message.":"Envoyées uniquement avec le prochain message.","No annotations yet.":"Pas encore d'annotations.","Write annotation...":"Écrire une annotation...","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 create folder.":"Impossible de creer le dossier.","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:lz,"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:cz,Worktree:uz,"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.","Folder created.":"Dossier cree.","Deleted.":"Supprime.",'Delete "{{path}}"? This action is irreversible.':'Supprimer "{{path}}" ? Cette action est irreversible.',"Write your message…":"Écris ton message…",Yes:fz,"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","Configure session":"Configurer la session","Keep current credentials":"Conserver les identifiants actuels","Session name":"Nom de la session","Session name is required.":"Le nom de session est requis.","Session updated.":"Session mise a jour.","Failed to update session.":"Echec de la mise a jour de la session.","Private SSH key is required.":"La cle SSH privee est requise.",Validate:hz,"Keep unchanged":"Conserver tel quel","Update & Resume":"Mettre a jour et reprendre","Updating...":"Mise a jour..."},ZC="uiLanguage",pz={en:q9||{},fr:dz||{}},mz=()=>{try{const e=localStorage.getItem(ZC);if(e==="fr"||e==="en")return e}catch{}return"en"},gz=(e,t)=>t?e.replace(/\{\{(\w+)\}\}/g,(r,n)=>Object.prototype.hasOwnProperty.call(t,n)?String(t[n]):r):e,ek=(e,t,r)=>{const i=(pz[e]||{})[t]||t;return gz(i,r)},tk=k.createContext({language:"en",setLanguage:()=>{},t:(e,t)=>ek("en",e,t),locale:"en-US"}),vz=({children:e})=>{const[t,r]=k.useState(mz);k.useEffect(()=>{try{localStorage.setItem(ZC,t)}catch{}},[t]);const n=t==="fr"?"fr-FR":"en-US",i=k.useCallback((a,o)=>ek(t,a,o),[t]),s=k.useMemo(()=>({language:t,setLanguage:r,t:i,locale:n}),[t,i,n]);return x.jsx(tk.Provider,{value:s,children:e})},rk=()=>k.useContext(tk),g0={creating:v6,ready:J_,processing:_6,stopped:J_,completed:Md,error:vi},v0={creating:"#9ca3af",ready:"#10b981",processing:"#f59e0b",stopped:"#ef4444",completed:"#3b82f6",error:"#ef4444"};function _z({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:v,deploymentMode:w,onRefreshBranches:_,providerModelState:g,onRequestProviderModels:d,disabled:f,isMobile:p}){var Ae,Te;const{t:y}=rk(),[S,b]=k.useState(!1),[E,C]=k.useState(null),[A,T]=k.useState(""),[O,R]=k.useState(""),[M,z]=k.useState(""),U=k.useMemo(()=>Array.isArray(o)&&o.length?o:[a||"codex"],[o,a]),[q,ee]=k.useState(U[0]),[W,I]=k.useState("new"),[L,B]=k.useState("main"),[D,P]=k.useState(""),[$,Y]=k.useState(""),[H,j]=k.useState(!1),[N,K]=k.useState(!!m),[V,X]=k.useState(typeof v=="boolean"?v:!0),re=k.useMemo(()=>({creating:y("Creating"),ready:y("Ready"),processing:y("In progress"),stopped:y("Stopped"),completed:y("Completed"),error:y("Error")}),[y]),ce=k.useRef(null),ge=k.useRef(null);k.useEffect(()=>{E&&ce.current&&(ce.current.focus(),ce.current.select())},[E]),k.useEffect(()=>{S&&ge.current&&ge.current.focus()},[S]),k.useEffect(()=>{if(S&&(K(!!m),X(typeof v=="boolean"?v:!0),M||z(c||""),!(l!=null&&l.length)&&_&&!h&&_(),W==="new"&&d)){const ne=(g==null?void 0:g[q])||{};!ne.loading&&!(ne.models||[]).length&&d(q)}},[S,M,c,l,m,v,_,h,W,q,d]),k.useEffect(()=>{U.includes(q)||ee(U[0])},[U,q]),k.useEffect(()=>{if(W==="new"&&d){const ne=(g==null?void 0:g[q])||{};!ne.loading&&!(ne.models||[]).length&&d(q)}W==="new"&&(P(""),Y(""))},[W,q,d]);const ae=(g==null?void 0:g[q])||{},Se=Array.isArray(ae.models)?ae.models:[],ye=k.useMemo(()=>Array.isArray(l)?l.map(ne=>ne.trim()).filter(Boolean):[],[l]),We=(M||c||"").trim(),Ge=!!We&&ye.includes(We),Re=k.useMemo(()=>Se.find(ne=>ne.isDefault)||null,[Se]),Ne=k.useMemo(()=>Se.find(ne=>ne.model===D)||null,[Se,D]),qe=W==="new"&&q==="codex"&&(((Ae=Ne==null?void 0:Ne.supportedReasoningEfforts)==null?void 0:Ae.length)||0)>0;k.useEffect(()=>{W==="new"&&(!D&&(Re!=null&&Re.model)&&P(Re.model),q==="codex"&&!$&&(Re!=null&&Re.defaultReasoningEffort)&&Y(Re.defaultReasoningEffort),q!=="codex"&&$&&Y(""))},[W,q,D,$,Re]),k.useEffect(()=>{var Me;if(W!=="new"||q!=="codex"){$&&Y("");return}if(!((Me=Ne==null?void 0:Ne.supportedReasoningEfforts)!=null&&Me.length)){$&&Y("");return}!Ne.supportedReasoningEfforts.some(le=>le.reasoningEffort===$)&&$&&Y("")},[W,q,Ne,$]);const Ce=async()=>{if(!H){j(!0);try{let ne=!0;if(n&&(ne=await n({context:W,name:O.trim()||null,provider:q,sourceWorktree:W==="fork"?L:null,startingBranch:We||null,model:W==="new"&&D||null,reasoningEffort:W==="new"&&$||null,internetAccess:N,denyGitCredentialsAccess:V})),!ne)return;R(""),I("new"),ee(U[0]),B("main"),z(c||""),P(""),Y(""),K(!!m),X(typeof v=="boolean"?v:!0),b(!1)}finally{j(!1)}}},ke=ne=>{C(ne.id),T(ne.name)},Ie=()=>{E&&A.trim()&&s&&s(E,A.trim()),C(null),T("")},te=ne=>{ne.key==="Enter"?Ie():ne.key==="Escape"&&(C(null),T(""))},oe=ne=>{H||(ne.key==="Enter"?Ce():ne.key==="Escape"&&b(!1))},F=(Array.isArray(e)?e:Array.from(((Te=e==null?void 0:e.values)==null?void 0:Te.call(e))||[])).slice().sort((ne,Me)=>{if((ne==null?void 0:ne.id)==="main"&&(Me==null?void 0:Me.id)!=="main")return-1;if((Me==null?void 0:Me.id)==="main"&&(ne==null?void 0:ne.id)!=="main")return 1;const le=ne!=null&&ne.createdAt?new Date(ne.createdAt).getTime():0,G=Me!=null&&Me.createdAt?new Date(Me.createdAt).getTime():0;return le-G}),me=F.map(ne=>({id:ne.id,label:ne.id==="main"?"main":ne.name||ne.branchName||ne.id,provider:ne.provider||ne.id==="main"&&a||null})),pe=me.find(ne=>ne.id===L),Oe=W==="fork"&&(pe==null?void 0:pe.provider)==="claude";return k.useEffect(()=>{var Me;if(!me.length)return;if(!me.some(le=>le.id===L)){const le=((Me=me.find(G=>G.id==="main"))==null?void 0:Me.id)||me[0].id;B(le)}},[L,me]),x.jsxs("div",{className:"worktree-tabs-container",children:[x.jsx("div",{className:"worktree-tabs",children:p?x.jsxs("div",{className:"worktree-tabs-select",children:[x.jsx("select",{className:"worktree-select",value:t,onChange:ne=>!f&&(r==null?void 0:r(ne.target.value)),"aria-label":y("Select a branch"),disabled:f,children:F.map(ne=>x.jsx("option",{value:ne.id,children:ne.name},ne.id))}),x.jsx("button",{className:"worktree-tab-add",onClick:()=>b(!0),disabled:f||F.length>=10,title:y("New worktree"),"aria-label":y("New worktree"),children:x.jsx(ze,{icon:$c})})]}):x.jsxs(x.Fragment,{children:[F.map(ne=>x.jsxs("div",{className:`worktree-tab ${t===ne.id?"active":""}`,onClick:()=>!f&&(r==null?void 0:r(ne.id)),style:{"--tab-accent":ne.color||"#3b82f6"},children:[x.jsx("span",{className:`worktree-status ${ne.status==="processing"?"pulse":""}`,style:{color:v0[ne.status]||v0.ready},title:re[ne.status]||ne.status,children:x.jsx(ze,{icon:g0[ne.status]||g0.ready})}),E===ne.id&&ne.id!=="main"?x.jsx("input",{ref:ce,className:"worktree-tab-edit",value:A,onChange:Me=>T(Me.target.value),onBlur:Ie,onKeyDown:te,onClick:Me=>Me.stopPropagation()}):x.jsx("span",{className:"worktree-tab-name",onDoubleClick:Me=>{Me.stopPropagation(),ne.id!=="main"&&ke(ne)},title:ne.id==="main"?ne.name:`${ne.name||ne.branchName} (${ne.branchName||"main"})`,children:ne.id==="main"?ne.name:ne.name||ne.branchName}),ne.id!=="main"&&x.jsx("button",{className:"worktree-tab-close",onClick:Me=>{Me.stopPropagation(),i==null||i(ne.id)},title:y("Close"),children:x.jsx(ze,{icon:vi})})]},ne.id)),x.jsx("button",{className:"worktree-tab-add",onClick:()=>b(!0),disabled:f||F.length>=10,title:y("New worktree"),children:x.jsx(ze,{icon:$c})})]})}),S&&x.jsx("div",{className:"worktree-create-dialog-overlay",onClick:()=>{H||b(!1)},children:x.jsxs("div",{className:`worktree-create-dialog ${H?"is-submitting":""}`,onClick:ne=>ne.stopPropagation(),children:[x.jsx("h3",{children:y("New worktree")}),x.jsxs("fieldset",{className:"worktree-create-form",disabled:H,children:[x.jsxs("div",{className:"worktree-create-grid",children:[x.jsxs("div",{className:"worktree-create-field",children:[x.jsx("label",{children:y("Name (optional)")}),x.jsx("input",{ref:ge,type:"text",placeholder:y("e.g. refactor-auth"),value:O,onChange:ne=>R(ne.target.value),onKeyDown:oe})]}),x.jsxs("div",{className:"worktree-create-field",children:[x.jsx("label",{children:y("Source branch")}),x.jsx("input",{type:"text",list:"worktree-branch-options",placeholder:c||"main",value:M,onChange:ne=>z(ne.target.value),onKeyDown:oe}),x.jsx("datalist",{id:"worktree-branch-options",children:ye.map(ne=>x.jsx("option",{value:ne},ne))}),!Ge&&x.jsx("div",{className:"worktree-field-error",children:y("Select a valid remote branch.")}),u&&x.jsx("div",{className:"worktree-field-error",children:u})]}),x.jsxs("div",{className:"worktree-create-field",children:[x.jsx("label",{children:y("Context")}),x.jsxs("select",{value:W,onChange:ne=>I(ne.target.value==="fork"?"fork":"new"),children:[x.jsx("option",{value:"new",children:y("New")}),x.jsx("option",{value:"fork",children:y("Fork")})]})]}),W==="new"?x.jsxs("div",{className:"worktree-create-field",children:[x.jsx("label",{children:y("Provider")}),x.jsxs("select",{value:q,onChange:ne=>ee(ne.target.value),disabled:U.length<=1,children:[U.includes("codex")&&x.jsx("option",{value:"codex",children:y("Codex (OpenAI)")}),U.includes("claude")&&x.jsx("option",{value:"claude",children:y("Claude")})]})]}):x.jsxs("div",{className:"worktree-create-field",children:[x.jsx("label",{children:y("Source worktree")}),x.jsx("select",{value:L,onChange:ne=>B(ne.target.value||"main"),children:me.map(ne=>x.jsx("option",{value:ne.id,children:ne.label},ne.id))})]}),Oe&&x.jsx("div",{className:"worktree-create-field is-full",children:x.jsx("div",{className:"worktree-warning-bubble",children:y("Claude Code does not natively support forked sessions with directory changes. This feature is experimental.")})}),W==="new"&&(q==="codex"||q==="claude")&&x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:`worktree-create-field ${qe?"":"is-full"}`,children:[x.jsx("label",{children:y("Model")}),x.jsxs("select",{value:D,onChange:ne=>P(ne.target.value),disabled:ae.loading||Se.length===0,children:[x.jsx("option",{value:"",children:y("Default model")}),Se.map(ne=>x.jsx("option",{value:ne.model,children:ne.displayName||ne.model},ne.id))]}),ae.error&&x.jsx("div",{className:"worktree-field-error",children:ae.error})]}),qe&&x.jsxs("div",{className:"worktree-create-field",children:[x.jsx("label",{children:y("Reasoning")}),x.jsxs("select",{value:$,onChange:ne=>Y(ne.target.value),disabled:ae.loading||!Ne,children:[x.jsx("option",{value:"",children:y("Default reasoning")}),((Ne==null?void 0:Ne.supportedReasoningEfforts)||[]).map(ne=>x.jsx("option",{value:ne.reasoningEffort,children:ne.reasoningEffort},ne.reasoningEffort))]})]})]}),x.jsx("div",{className:"worktree-create-field worktree-toggle-field",children:x.jsxs("label",{className:"worktree-toggle",children:[x.jsx("input",{type:"checkbox",checked:N,onChange:ne=>{const Me=ne.target.checked;K(Me),Me||X(!1)}}),x.jsx("span",{children:y("Internet access")})]})}),N&&w!=="mono_user"&&x.jsx("div",{className:"worktree-create-field worktree-toggle-field",children:x.jsxs("label",{className:"worktree-toggle",children:[x.jsx("input",{type:"checkbox",checked:V,onChange:ne=>X(ne.target.checked)}),x.jsx("span",{children:y("Deny git credentials access")})]})})]}),x.jsxs("div",{className:"worktree-create-actions",children:[x.jsx("button",{className:"worktree-btn-cancel",onClick:()=>b(!1),children:y("Cancel")}),x.jsx("button",{className:"worktree-btn-create",onClick:()=>void Ce(),disabled:!Ge||W==="fork"&&!L,children:y(H?"Creating...":"Create")})]})]})]})})]})}function yz({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:v,branchError:w,defaultInternetAccess:_,defaultDenyGitCredentialsAccess:g,deploymentMode:d,loadBranches:f,providerModelState:p,loadProviderModels:y,connected:S,isMobileLayout:b,requestHandoffQr:E,attachmentSession:C,handoffLoading:A,handleOpenSettings:T,handleLeaveSession:O}){return x.jsxs("header",{className:"header",children:[x.jsxs("div",{className:"topbar-left",children:[x.jsx("div",{className:"topbar-spacer"}),x.jsx("div",{className:"topbar-brand",children:x.jsx("img",{className:"brand-logo",src:t,alt:"vibe80"})}),x.jsx("div",{className:"topbar-tabs",children:x.jsx(_z,{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:v,branchError:w,defaultInternetAccess:_,defaultDenyGitCredentialsAccess:g,deploymentMode:d,onRefreshBranches:f,providerModelState:p,onRequestProviderModels:y,disabled:!S,isMobile:b})})]}),x.jsxs("div",{className:"topbar-right",children:[x.jsx("button",{type:"button",className:"icon-button","aria-label":e("Resume on mobile"),title:e("Resume on mobile"),onClick:E,disabled:!(C!=null&&C.sessionId)||A,children:x.jsx(ze,{icon:D6})}),x.jsx("button",{type:"button",className:"icon-button","aria-label":e("Open settings"),onClick:T,children:x.jsx(ze,{icon:ym})}),x.jsx("button",{type:"button",className:"icon-button","aria-label":e("Leave session"),onClick:O,children:x.jsx(ze,{icon:Od})})]})]})}function wz({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:v,workspaceSecretInput:w,setWorkspaceSecretInput:_,workspaceError:g,handleWorkspaceProvidersSubmit:d,workspaceProvider:f,workspaceAuthExpanded:p,setWorkspaceAuthExpanded:y,setWorkspaceProviders:S,providerAuthOptions:b,getProviderAuthType:E,workspaceAuthFiles:C,setWorkspaceAuthFiles:A,sessionMode:T,setSessionMode:O,setSessionRequested:R,setAttachmentsError:M,loadWorkspaceSessions:z,deploymentMode:U,handleLeaveWorkspace:q,workspaceSessionsLoading:ee,workspaceSessions:W,workspaceSessionsError:I,workspaceSessionDeletingId:L,workspaceSessionConfigId:B,sessionConfigTarget:D,workspaceSessionUpdatingId:P,workspaceSessionConfigError:$,handleResumeSession:Y,openSessionConfigure:H,closeSessionConfigure:j,handleUpdateAndResumeSession:N,handleDeleteSession:K,locale:V,extractRepoName:X,getTruncatedText:re,isCloning:ce,repoDisplay:ge,onRepoSubmit:ae,sessionNameInput:Se,setSessionNameInput:ye,repoInput:We,setRepoInput:Ge,repoHistory:Re,authMode:Ne,setAuthMode:qe,sshKeyInput:Ce,setSshKeyInput:ke,httpUsername:Ie,setHttpUsername:te,httpPassword:oe,setHttpPassword:F,defaultInternetAccess:me,setDefaultInternetAccess:pe,defaultDenyGitCredentialsAccess:Oe,setDefaultDenyGitCredentialsAccess:Ae,sessionConfigAuthMode:Te,setSessionConfigAuthMode:ne,sessionConfigSshKey:Me,setSessionConfigSshKey:le,sessionConfigHttpUsername:G,setSessionConfigHttpUsername:J,sessionConfigHttpPassword:Q,setSessionConfigHttpPassword:ie,sessionConfigInternetAccess:ue,setSessionConfigInternetAccess:be,sessionConfigDenyGitCredentialsAccess:we,setSessionConfigDenyGitCredentialsAccess:je,attachmentsError:rt,sessionRequested:Ve,workspaceBusy:Cr,workspaceProvidersEditing:wn,providersBackStep:bn,setWorkspaceStep:Yr,setWorkspaceProvidersEditing:Ra,setWorkspaceError:Iu,setProvidersBackStep:Oa,loadWorkspaceProviders:Nu,workspaceCreated:Zt,workspaceId:Hs,workspaceCopied:ji,handleWorkspaceCopy:Bi,infoContent:oi,toast:Sn}){var Jr;return x.jsxs("div",{className:"session-gate session-fullscreen",children:[x.jsxs("div",{className:"session-layout session-layout--fullscreen",children:[x.jsxs("div",{className:"session-shell",children:[x.jsxs("div",{className:"session-header",children:[x.jsx("img",{className:"brand-logo",src:t,alt:"vibe80"}),x.jsx("h1",{children:e(a?"Login required":s?"Start a session":i?"Workspace created":n?"Configure AI providers":"Configure the workspace")}),o?x.jsx("p",{className:"session-hint",children:o}):null]}),x.jsxs("div",{className:"session-body",children:[r&&x.jsxs(x.Fragment,{children:[x.jsxs("form",{id:"workspace-form",className:"session-form",onSubmit:u,children:[x.jsxs("div",{className:"session-workspace-options",children:[x.jsxs("button",{type:"button",className:`session-workspace-option ${l==="existing"?"is-selected":""}`,onClick:()=>c("existing"),disabled:h,"aria-pressed":l==="existing",children:[x.jsx("span",{className:"session-workspace-icon is-join","aria-hidden":"true",children:x.jsx(ze,{icon:X_})}),x.jsxs("span",{className:"session-workspace-option-text",children:[x.jsx("span",{className:"session-workspace-option-title",children:e("Join a workspace")}),x.jsx("span",{className:"session-workspace-option-subtitle",children:e("Access an existing space with your credentials")})]})]}),x.jsxs("button",{type:"button",className:`session-workspace-option ${l==="new"?"is-selected":""}`,onClick:()=>c("new"),disabled:h,"aria-pressed":l==="new",children:[x.jsx("span",{className:"session-workspace-icon is-create","aria-hidden":"true",children:x.jsx(ze,{icon:$c})}),x.jsxs("span",{className:"session-workspace-option-text",children:[x.jsx("span",{className:"session-workspace-option-title",children:e("Create a workspace")}),x.jsx("span",{className:"session-workspace-option-subtitle",children:e("Create a new space for you or your team")})]})]})]}),x.jsx("div",{className:`session-panel ${l==="existing"?"is-visible":"is-hidden"}`,"aria-hidden":l!=="existing",children:x.jsxs("div",{className:"session-workspace-form",children:[x.jsxs("div",{className:"session-workspace-form-labels",children:[x.jsx("span",{children:e("Workspace ID")}),x.jsx("span",{children:e("Secret")})]}),x.jsxs("div",{className:"session-workspace-form-grid",children:[x.jsx("input",{type:"text",placeholder:e("workspaceId (e.g. w...)"),value:m,onChange:_e=>v(_e.target.value),disabled:h,spellCheck:!1}),x.jsx("input",{type:"password",placeholder:e("workspaceSecret"),value:w,onChange:_e=>_(_e.target.value),disabled:h,autoComplete:"off"})]})]})})]}),g&&x.jsx("div",{className:"attachments-error",children:g})]}),n&&x.jsxs(x.Fragment,{children:[x.jsx("form",{id:"providers-form",className:"session-form",onSubmit:d,children:x.jsx("div",{className:"session-auth-options session-auth-accordion",children:["codex","claude"].map(_e=>{const Ht=f(_e),Xr=e(_e==="codex"?"Codex":"Claude"),Ws=!!p[_e],er=!!Ht.enabled,tr=wn&&Array.isArray(W)&&W.some(pt=>(Array.isArray(pt.providers)&&pt.providers.length?pt.providers:pt.activeProvider?[pt.activeProvider]:[]).includes(_e)),jr=h||tr&&er;return x.jsxs("div",{className:"session-auth-card",children:[x.jsx("div",{className:"session-auth-header",children:x.jsxs("label",{className:"session-auth-option",children:[x.jsx("input",{type:"checkbox",checked:er,onChange:()=>{if(tr&&er)return;const pt=!er;y(lt=>({...lt,[_e]:pt})),S(lt=>({...lt,[_e]:{...lt[_e],enabled:pt}}))},disabled:jr,title:tr&&er?e("Provider cannot be disabled: active sessions use it."):void 0}),Xr]})}),er&&Ws?x.jsxs("div",{className:"session-auth-grid",children:[x.jsx("select",{value:E(_e,Ht),onChange:pt=>S(lt=>({...lt,[_e]:{...lt[_e],authType:pt.target.value,authValue:""}})),disabled:h,children:(b[_e]||[]).map(pt=>x.jsx("option",{value:pt,children:e(pt)},pt))}),E(_e,Ht)==="auth_json_b64"?x.jsxs("div",{className:"session-auth-file",children:[x.jsx("input",{type:"file",accept:"application/json,.json",onChange:async pt=>{var rr;const lt=(rr=pt.target.files)==null?void 0:rr[0];if(!lt)return;const Ma=await lt.text();S(Fi=>({...Fi,[_e]:{...Fi[_e],authValue:Ma}})),A(Fi=>({...Fi,[_e]:lt.name})),pt.target.value=""},disabled:h}),C[_e]?x.jsx("span",{className:"session-auth-file-name",children:C[_e]}):null]}):x.jsx("input",{type:"password",placeholder:e("Key or token"),value:Ht.authValue,onChange:pt=>S(lt=>({...lt,[_e]:{...lt[_e],authValue:pt.target.value}})),disabled:h,autoComplete:"off"})]}):null]},_e)})})}),g&&x.jsx("div",{className:"attachments-error",children:g})]}),i&&x.jsx(x.Fragment,{children:x.jsxs("div",{className:"workspace-created-card",children:[x.jsxs("div",{className:"workspace-created-row",children:[x.jsx("span",{className:"workspace-created-label",children:e("Workspace ID")}),x.jsx("span",{className:"workspace-created-value",children:(Zt==null?void 0:Zt.workspaceId)||Hs}),x.jsx("button",{type:"button",className:"workspace-created-copy",onClick:()=>Bi("id",(Zt==null?void 0:Zt.workspaceId)||Hs||""),"aria-label":e("Copy workspace ID"),children:x.jsx(ze,{icon:ji.id?Md:jd})})]}),x.jsxs("div",{className:"workspace-created-row",children:[x.jsx("span",{className:"workspace-created-label",children:e("Workspace Secret")}),x.jsx("span",{className:"workspace-created-value",children:(Zt==null?void 0:Zt.workspaceSecret)||""}),x.jsx("button",{type:"button",className:"workspace-created-copy",onClick:()=>Bi("secret",(Zt==null?void 0:Zt.workspaceSecret)||""),"aria-label":e("Copy workspace secret"),children:x.jsx(ze,{icon:ji.secret?Md:jd})})]})]})}),s&&x.jsxs("div",{className:"session-step",children:[x.jsxs("div",{className:"session-workspace-toggle",children:[x.jsxs("button",{type:"button",className:`session-workspace-option is-compact ${T==="new"?"is-selected":""}`,onClick:()=>{O("new"),R(!1),M("")},disabled:h,"aria-pressed":T==="new",children:[x.jsx("span",{className:"session-workspace-icon is-create","aria-hidden":"true",children:x.jsx(ze,{icon:$c})}),x.jsx("span",{className:"session-workspace-option-title",children:e("New session")})]}),x.jsxs("button",{type:"button",className:`session-workspace-option is-compact ${T==="existing"?"is-selected":""}`,onClick:()=>{O("existing"),R(!1),M(""),z()},disabled:h,"aria-pressed":T==="existing",children:[x.jsx("span",{className:"session-workspace-icon is-join","aria-hidden":"true",children:x.jsx(ze,{icon:X_})}),x.jsx("span",{className:"session-workspace-option-title",children:e("Resume an existing session")})]}),U!=="mono_user"&&x.jsxs("button",{type:"button",className:"session-workspace-option is-compact",onClick:q,children:[x.jsx("span",{className:"session-workspace-icon is-leave","aria-hidden":"true",children:x.jsx(ze,{icon:Od})}),x.jsx("span",{className:"session-workspace-option-title",children:e("Leave workspace")})]})]}),x.jsx("div",{className:`session-panel ${T==="existing"?"is-visible":"is-hidden"}`,"aria-hidden":T!=="existing",children:B?x.jsxs("div",{className:"session-form session-form--compact",children:[x.jsx("div",{className:"session-auth-title",children:e("Configure session")}),x.jsxs("div",{className:"session-form-row is-compact-grid",children:[x.jsx("input",{type:"text",placeholder:e("Session name"),value:(D==null?void 0:D.name)||"",disabled:!0}),x.jsx("div",{className:"session-repo-field",children:x.jsx("input",{type:"text",placeholder:e("git@gitea.devops:my-org/my-repo.git"),value:(D==null?void 0:D.repoUrl)||"",disabled:!0})})]}),x.jsxs("div",{className:"session-auth",children:[x.jsx("div",{className:"session-auth-title",children:e("Repository authentication (optional)")}),x.jsx("div",{className:"session-auth-options",children:x.jsxs("select",{value:Te,onChange:_e=>ne(_e.target.value),disabled:h||!!P,children:[x.jsx("option",{value:"keep",children:e("Keep unchanged")}),x.jsx("option",{value:"none",children:e("None")}),x.jsx("option",{value:"ssh",children:e("Private SSH key (not recommended)")}),x.jsx("option",{value:"http",children:e("Username + password")})]})}),Te==="ssh"?x.jsx("textarea",{className:"session-auth-textarea",placeholder:e("-----BEGIN OPENSSH PRIVATE KEY-----"),value:Me,onChange:_e=>le(_e.target.value),disabled:h||!!P,rows:6,spellCheck:!1}):null,Te==="http"?x.jsxs("div",{className:"session-auth-grid",children:[x.jsx("input",{type:"text",placeholder:e("Username"),value:G,onChange:_e=>J(_e.target.value),disabled:h||!!P,autoComplete:"username"}),x.jsx("input",{type:"password",placeholder:e("Password or PAT"),value:Q,onChange:_e=>ie(_e.target.value),disabled:h||!!P,autoComplete:"current-password"})]}):null]}),x.jsxs("div",{className:"session-auth session-auth-compact",children:[x.jsx("div",{className:"session-auth-title",children:e("Permissions")}),x.jsxs("div",{className:"session-auth-options session-auth-options--compact",children:[x.jsxs("label",{className:"session-auth-option",children:[x.jsx("input",{type:"checkbox",checked:ue,onChange:_e=>{const Ht=_e.target.checked;be(Ht),Ht||je(!1)},disabled:h||!!P}),e("Internet access")]}),ue&&U!=="mono_user"?x.jsxs("label",{className:"session-auth-option",children:[x.jsx("input",{type:"checkbox",checked:we,onChange:_e=>je(_e.target.checked),disabled:h||!!P}),e("Deny git credentials access")]}):null]})]}),$?x.jsx("div",{className:"attachments-error",children:$}):null]}):x.jsxs("div",{className:"session-auth",children:[x.jsx("div",{className:"session-auth-title",children:e("Existing sessions")}),ee?x.jsx("div",{className:"session-auth-hint",children:e("Loading sessions...")}):W.length===0?x.jsx("div",{className:"session-auth-hint",children:e("No sessions available.")}):x.jsx("ul",{className:"session-list",children:W.map(_e=>{const Ht=X(_e.repoUrl),Xr=_e.name||Ht||_e.sessionId,Ws=_e.repoUrl?re(_e.repoUrl,72):_e.sessionId,er=_e.lastActivityAt?new Date(_e.lastActivityAt).toLocaleString(V):_e.createdAt?new Date(_e.createdAt).toLocaleString(V):"",tr=L===_e.sessionId,jr=P===_e.sessionId;return x.jsx("li",{className:"session-item",children:x.jsxs("div",{className:"session-item-row",children:[x.jsxs("div",{className:"session-item-meta",children:[x.jsx("div",{className:"session-item-title",children:Xr}),x.jsx("div",{className:"session-item-sub",children:Ws}),er&&x.jsx("div",{className:"session-item-sub",children:e("Last activity: {{date}}",{date:er})})]}),x.jsxs("div",{className:"session-item-actions",children:[x.jsx("button",{type:"button",className:"session-list-button session-list-icon-button",onClick:()=>Y(_e.sessionId),disabled:h||tr,title:e("Resume"),"aria-label":e("Resume"),children:x.jsx(ze,{icon:Od})}),x.jsx("button",{type:"button",className:"session-list-button session-list-icon-button",onClick:()=>H(_e),disabled:h||tr||jr,title:e("Configure session"),"aria-label":e("Configure session"),children:x.jsx(ze,{icon:ym})}),x.jsx("button",{type:"button",className:"session-list-button session-list-icon-button is-danger",onClick:()=>K(_e),disabled:h||tr,title:e(tr?"Deleting...":"Delete"),"aria-label":e(tr?"Deleting...":"Delete"),children:x.jsx(ze,{icon:tr?k6:g6,spin:tr})})]})]})},_e.sessionId)})}),I&&x.jsx("div",{className:"attachments-error",children:I})]})}),x.jsx("div",{className:`session-panel ${T==="new"?"is-visible":"is-hidden"}`,"aria-hidden":T!=="new",children:ce?x.jsxs("div",{className:"session-hint",children:[e("Cloning repository..."),ge&&x.jsx("div",{className:"session-meta",children:ge})]}):x.jsxs("form",{id:"repo-form",className:"session-form session-form--compact",onSubmit:ae,children:[x.jsxs("div",{className:"session-form-row is-compact-grid",children:[x.jsx("input",{type:"text",placeholder:e("Session name (optional)"),value:Se,onChange:_e=>ye(_e.target.value),disabled:h}),x.jsxs("div",{className:"session-repo-field",children:[x.jsx("input",{type:"text",placeholder:e("git@gitea.devops:my-org/my-repo.git"),value:We,onChange:_e=>{Ge(_e.target.value)},disabled:h,required:!0,list:Re.length>0?"repo-history":void 0}),Re.length>0&&x.jsx("datalist",{id:"repo-history",children:Re.map(_e=>x.jsx("option",{value:_e,children:re(_e,72)},_e))})]})]}),x.jsxs("div",{className:"session-auth",children:[x.jsx("div",{className:"session-auth-title",children:e("Repository authentication (optional)")}),x.jsx("div",{className:"session-auth-options",children:x.jsxs("select",{value:Ne,onChange:_e=>qe(_e.target.value),disabled:h,children:[x.jsx("option",{value:"none",children:e("None")}),x.jsx("option",{value:"ssh",children:e("Private SSH key (not recommended)")}),x.jsx("option",{value:"http",children:e("Username + password")})]})}),Ne==="ssh"&&x.jsx(x.Fragment,{children:x.jsx("textarea",{className:"session-auth-textarea",placeholder:e("-----BEGIN OPENSSH PRIVATE KEY-----"),value:Ce,onChange:_e=>ke(_e.target.value),disabled:h,rows:6,spellCheck:!1})}),Ne==="http"&&x.jsx(x.Fragment,{children:x.jsxs("div",{className:"session-auth-grid",children:[x.jsx("input",{type:"text",placeholder:e("Username"),value:Ie,onChange:_e=>te(_e.target.value),disabled:h,autoComplete:"username"}),x.jsx("input",{type:"password",placeholder:e("Password or PAT"),value:oe,onChange:_e=>F(_e.target.value),disabled:h,autoComplete:"current-password"})]})})]}),x.jsxs("div",{className:"session-auth session-auth-compact",children:[x.jsx("div",{className:"session-auth-title",children:e("Permissions")}),x.jsxs("div",{className:"session-auth-options session-auth-options--compact",children:[x.jsxs("label",{className:"session-auth-option",children:[x.jsx("input",{type:"checkbox",checked:me,onChange:_e=>{const Ht=_e.target.checked;pe(Ht),Ht||Ae(!1)},disabled:h}),e("Internet access")]}),me&&U!=="mono_user"&&x.jsxs("label",{className:"session-auth-option",children:[x.jsx("input",{type:"checkbox",checked:Oe,onChange:_e=>Ae(_e.target.checked),disabled:h}),e("Deny git credentials access")]})]})]})]})}),rt&&x.jsx("div",{className:"attachments-error",children:rt})]}),a&&x.jsxs("div",{className:"session-step",children:[x.jsxs("div",{className:"session-auth",children:[x.jsx("div",{className:"session-auth-title",children:e("Login required")}),x.jsx("div",{className:"session-auth-hint",children:e("Please use the console generated URL to login")})]}),g&&x.jsx("div",{className:"attachments-error",children:g})]})]}),x.jsx("div",{className:"session-footer",children:a?null:r?x.jsx("button",{type:"submit",form:"workspace-form",className:"session-button primary",disabled:h,children:e(Cr?"Validating...":"Continue")}):n?x.jsxs(x.Fragment,{children:[x.jsx("button",{type:"button",className:"session-button secondary",onClick:()=>{if(bn===4){Ra(!1),Yr(4);return}Yr(1)},disabled:h,children:e("Back")}),x.jsx("button",{type:"submit",form:"providers-form",className:"session-button primary",disabled:h,children:e(Cr?"Validating...":wn?"Save":"Continue")})]}):i?x.jsx("button",{type:"button",className:"session-button primary",onClick:()=>Yr(4),disabled:h,children:e("Continue")}):s?T==="existing"?x.jsxs(x.Fragment,{children:[x.jsx("button",{type:"button",className:"session-button secondary",disabled:h,onClick:B?j:()=>{Ra(!0),Iu(""),Oa(4),Nu(),z(),Yr(2)},children:e(B?"Cancel":"AI providers")}),B?x.jsx("button",{type:"button",className:"session-button primary",disabled:h||!!P,onClick:N,children:e(P?"Updating...":"Update & Resume")}):null]}):x.jsxs(x.Fragment,{children:[x.jsx("button",{type:"button",className:"session-button secondary",disabled:h,onClick:()=>{Ra(!0),Iu(""),Oa(4),Nu(),z(),Yr(2)},children:e("AI providers")}),x.jsx("button",{type:"submit",form:"repo-form",className:"session-button primary",disabled:h,children:e(Ve?"Loading...":"Clone")})]}):null})]}),x.jsx("aside",{className:"session-info",children:x.jsxs("div",{className:"session-info-card",children:[x.jsxs("div",{className:"session-info-title",children:[x.jsx("span",{className:"session-info-icon","aria-hidden":"true",children:"ℹ️"}),oi.title]}),(Jr=oi.paragraphs)==null?void 0:Jr.map(_e=>x.jsx("p",{children:_e},_e)),oi.setupLink?x.jsx("p",{children:x.jsx("a",{className:"session-info-link",href:"https://vibe80.io/docs/workspace-session-setup",target:"_blank",rel:"noreferrer",children:e("Click here to learn more.")})}):null,oi.securityLink?x.jsxs("p",{children:[e("Vibe80 strictly controls access to resources (Git credentials and internet) using sandboxing. "),x.jsx("a",{className:"session-info-link",href:"https://vibe80.io/docs/sandboxing",target:"_blank",rel:"noreferrer",children:e("Click here to learn more.")})]}):null]})})]}),Sn&&x.jsx("div",{className:"toast-container",children:x.jsx("div",{className:`toast is-${Sn.type||"success"}`,children:Sn.message})})]})}const bz="/assets/vibe80_dark-D7OVPKcU.svg",Sz="/assets/vibe80_light-BJK37ybI.svg",Cz=k.lazy(()=>Ii(()=>import("./ExplorerPanel-DugEeaO2.js"),[])),kz=k.lazy(()=>Ii(()=>import("./DiffPanel-BUJhQj_Q.js"),[])),xz=k.lazy(()=>Ii(()=>import("./TerminalPanel-C-T3t-6T.js"),[])),Ez=k.lazy(()=>Ii(()=>import("./SettingsPanel-Ci2BdIYO.js"),[])),Az=k.lazy(()=>Ii(()=>import("./LogsPanel-BQrGxMu_.js"),[])),Lz=()=>new URLSearchParams(window.location.search).get("session"),Pz=()=>new URLSearchParams(window.location.search).get("repository"),yh=()=>{if(Lz())return"";const t=Pz();return(t?t.trim():"")||""},Tz=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)}},nk={codex:["api_key","auth_json_b64"],claude:["api_key","setup_token"]},_0=(e,t)=>{const r=nk[e]||[];return r.length?r.includes(t==null?void 0:t.authType)?t.authType:r[0]:(t==null?void 0:t.authType)||"api_key"},ik=e=>{const t=e==null?void 0:e.trim();return t?t.startsWith("{")&&t.endsWith("}")?t.slice(1,-1).trim():t:""},Dz=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):[],Iz=(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 v=String(m||"").trim();return v?(a.push(v),`\`${v.replace(/`/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=ik(h[2]||h[4]),v=h[3]||"";if(!u){s.push({type:"yesno",question:m,choices:[t("Yes"),t("No")]});continue}if(u==="choices"){const _=v.split(/\r?\n/).map(g=>g.trim()).filter(Boolean);_.length&&s.push({type:"choices",question:m,choices:_});continue}const w=Dz(v);w.length&&s.push({type:"form",question:m,fields:w})}return s.length?(l+=o.slice(c),{cleanedText:l.trim(),blocks:s,filerefs:a}):{cleanedText:o,blocks:[],filerefs:a}},Nz=e=>{const t=/<!--\s*vibe80:task\s*([^>]*)-->/g,r=String(e||"");let n="",i;for(;(i=t.exec(r))!==null;){const s=ik(i[1]);s&&(n=s)}return n},Rz=e=>{const t=String(e||"");return t?t.split(/\r?\n/)[0].trim():""},y0=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)},Oz=1024,Mz=5,jz=140,Bz=60,sk="repoHistory",ok="authMode",ak="openAiAuthMode",lk="llmProvider",ck="llmProviders",uk="chatCommandsVisible",fk="toolResultsVisible",hk="notificationsEnabled",dk="themeMode",pk="debugMode",Fz=10,zz=new Set(["png","jpg","jpeg","gif","webp","bmp","svg","avif"]),zl=(e,t)=>e?e.length<=t?e:`${e.slice(0,t)}…`:"",va=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""},$z=(e,t=r=>r)=>{const r=va(e);if(!r||!r.includes("."))return t("FILE");const n=r.split(".").pop();return n?n.toUpperCase():t("FILE")},Uz=(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)})},Pn=e=>Array.isArray(e)?e.map(t=>{if(!t)return null;if(typeof t=="string")return{name:va(t),path:t};if(typeof t=="object"){const r=t.name||va(t.path);return{...t,name:r}}return null}).filter(Boolean):[],Hz=e=>{var n;const t=va(e);if(!t||!t.includes("."))return!1;const r=(n=t.split(".").pop())==null?void 0:n.toLowerCase();return zz.has(r)},Wz=()=>{try{const e=localStorage.getItem(sk);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[]}},Vz=()=>{try{const e=localStorage.getItem(ok);if(e==="ssh"||e==="http"||e==="none")return e}catch{}return"none"},Kz=()=>{try{const e=localStorage.getItem(ak);if(e==="apiKey"||e==="authFile")return e}catch{}return"apiKey"},Gz=()=>{try{const e=localStorage.getItem(uk);if(e==="true"||e==="false")return e==="true"}catch{}return!0},qz=()=>{try{const e=localStorage.getItem(fk);if(e==="true"||e==="false")return e==="true"}catch{}return!1},Yz=()=>{try{const e=localStorage.getItem(hk);if(e==="true"||e==="false")return e==="true"}catch{}return!0},Jz=()=>{try{const e=localStorage.getItem(dk);if(e==="light"||e==="dark")return e}catch{}return"light"},Xz=()=>{try{const e=localStorage.getItem(pk);if(e==="true"||e==="false")return e==="true"}catch{}return!1},Lo=()=>{try{const e=localStorage.getItem(lk);if(e==="codex"||e==="claude")return e}catch{}return"codex"},Qz=()=>{try{const e=localStorage.getItem(ck);if(!e)return[Lo()];const t=JSON.parse(e);if(!Array.isArray(t))return[Lo()];const r=t.filter(n=>n==="codex"||n==="claude");return r.length?r:[Lo()]}catch{}return[Lo()]},Zz=(e,t)=>{const r=t.trim();if(!r)return e;const n=[r,...e.filter(i=>i!==r)].slice(0,Fz);return n.length===e.length&&n.every((i,s)=>i===e[s])?e:n},e$=(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)},t$=(e,t)=>{const r=e||"chat",n=new Date().toISOString().replace(/[:.]/g,"-");return`${r}-${n}.${t}`},$l=e=>{if(!e)return"";const n=e.trim().replace(/\/+$/,"").split(/[?#]/)[0].match(/([^/:]+)$/);return n?n[1]:""},r$=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"}},n$=(e,t=r=>r)=>e==="codex"?t("Codex"):e==="claude"?t("Claude"):e||"";function i$(){const{t:e,language:t,setLanguage:r,locale:n}=rk(),[i,s]=k.useState([]),[a,o]=k.useState(""),[l,c]=k.useState(()=>e("Connecting...")),[h,u]=k.useState(!1),[m,v]=k.useState(!1),[w,_]=k.useState(""),[g,d]=k.useState(!1),[f,p]=k.useState(null),[y,S]=k.useState(yh),[b,E]=k.useState(yh),[C,A]=k.useState(""),[T,O]=k.useState(null),[R,M]=k.useState(Vz),[z,U]=k.useState(""),[q,ee]=k.useState(""),[W,I]=k.useState(""),[L,B]=k.useState(""),[D,P]=k.useState("keep"),[$,Y]=k.useState(""),[H,j]=k.useState(""),[N,K]=k.useState(""),[V,X]=k.useState(!0),[re,ce]=k.useState(!1),[ge,ae]=k.useState(null),[Se,ye]=k.useState(""),[We,Ge]=k.useState("new"),[Re,Ne]=k.useState(!1),[qe,Ce]=k.useState({}),[ke,Ie]=k.useState(!0),[te,oe]=k.useState(!1),[F,me]=k.useState(null),[pe,Oe]=k.useState(Lo),[Ae,Te]=k.useState(Qz),[ne,Me]=k.useState(!1),[le,G]=k.useState(Kz),[J,Q]=k.useState(null),[ie,ue]=k.useState(""),[be,we]=k.useState(""),[je,rt]=k.useState(!1),[Ve,Cr]=k.useState(null),[wn,bn]=k.useState(!1),[Yr,Ra]=k.useState(null),[Iu,Oa]=k.useState(""),[Nu,Zt]=k.useState(!1),[Hs,ji]=k.useState(!1),[Bi,oi]=k.useState(!1),[Sn,Jr]=k.useState(()=>!!yh()),[_e,Ht]=k.useState(Gz),[Xr,Ws]=k.useState(qz),[er,tr]=k.useState(Yz),[jr,pt]=k.useState(Jz),lt=k.useRef(null),Ma=k.useRef(null),rr=k.useCallback((Z,se="success")=>{me({message:Z,type:se}),lt.current&&clearTimeout(lt.current),lt.current=setTimeout(()=>{me(null),lt.current=null},3e3)},[]);k.useEffect(()=>()=>{lt.current&&(clearTimeout(lt.current),lt.current=null)},[]);const[Fi,Vs]=k.useState({main:"chat"}),ja=k.useRef(null),Ba=k.useRef(null),mk=k.useRef(null),gk=k.useRef(null),Hm=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:[]}),[]),[Ru,Ou]=k.useState({}),[vk,Fa]=k.useState(null),[_k,Ks]=k.useState([]),[Mu,ju]=k.useState(!0),[yk,Gs]=k.useState({main:"all"}),[Wm,Vm]=k.useState(!1),[Km,Bu]=k.useState(null),[za,Gm]=k.useState(!0),qm=k.useRef({}),[wk,Fu]=k.useState(""),bk=k.useRef(new Map),Sk=Z=>{var se;if(!(Z!=null&&Z.type))return"";if(Z.type==="commandExecution"){const ve=((se=Z.commandActions)==null?void 0:se.command)||Z.command||e("Command");return e("Command: {{command}}",{command:ve})}return Z.type==="fileChange"?e("Applying changes..."):Z.type==="mcpToolCall"?e("Tool: {{tool}}",{tool:Z.tool}):Z.type==="reasoning"?e("Reasoning..."):Z.type==="agentMessage"?e("Generating response..."):""},{commandPanelOpen:Ck,setCommandPanelOpen:qs,toolResultPanelOpen:kk,setToolResultPanelOpen:Ys}=A9(),[Ym,xk]=k.useState(()=>Wz()),[Jm,s$]=k.useState(()=>Xz()),pr=k.useRef(null),Xm=k.useRef(!0),$a=k.useRef(null),Ua=k.useRef(null),Qm=k.useRef(null),{setToolbarExportOpen:zu}=E9(),Zm=k.useRef(null),eg=k.useRef(null),tg=k.useRef(null),Ek=k.useRef(null),Ak=k.useRef(null),Lk=k.useRef(null),Pk=k.useRef(null),Tk=k.useRef(null),Dk=k.useRef(null),Ik=k.useRef(null),Nk=k.useRef(0),Rk=k.useRef(!1),Ok=k.useRef(null),Mk=k.useRef(0),Ha=k.useRef([]),{apiFetch:At,deploymentMode:$u,handleDeleteSession:jk,handleLeaveWorkspace:rg,handleWorkspaceCopy:Bk,handleWorkspaceProvidersSubmit:Fk,handleWorkspaceSubmit:zk,loadWorkspaceProviders:$k,loadWorkspaceSessions:Uu,providersBackStep:Uk,setProvidersBackStep:Hk,setWorkspaceAuthExpanded:Wk,setWorkspaceAuthFiles:Vk,setWorkspaceError:ng,setWorkspaceIdInput:Kk,setWorkspaceMode:ig,setWorkspaceProviders:Gk,setWorkspaceProvidersEditing:qk,setWorkspaceSecretInput:Yk,setWorkspaceStep:Jk,setWorkspaceToken:Xk,workspaceAuthExpanded:Qk,workspaceAuthFiles:Zk,workspaceBusy:sg,workspaceCopied:e2,workspaceCreated:t2,workspaceError:r2,workspaceId:n2,workspaceIdInput:i2,workspaceMode:s2,workspaceProviders:o2,workspaceProvidersEditing:a2,workspaceSecretInput:l2,workspaceSessionDeletingId:c2,workspaceSessions:Wa,workspaceSessionsError:u2,workspaceSessionsLoading:f2,workspaceStep:Va,workspaceToken:Qr}=i9({t:e,encodeBase64:Tz,copyTextToClipboard:y0,extractRepoName:$l,setSessionMode:Ge,showToast:rr,getProviderAuthType:_0}),{handoffOpen:h2,handoffQrDataUrl:og,handoffLoading:Hu,handoffError:ag,handoffRemaining:Wu,requestHandoffQr:lg,closeHandoffQr:cg}=w9({t:e,apiFetch:At,attachmentSessionId:f==null?void 0:f.sessionId}),{gitIdentityName:d2,gitIdentityEmail:p2,gitIdentityGlobal:m2,gitIdentityRepo:g2,gitIdentityLoading:v2,gitIdentitySaving:_2,gitIdentityError:y2,gitIdentityMessage:w2,setGitIdentityName:b2,setGitIdentityEmail:S2,handleSaveGitIdentity:C2}=b9({t:e,apiFetch:At,attachmentSessionId:f==null?void 0:f.sessionId}),zi=k.useMemo(()=>new Map,[]),Js=k.useMemo(()=>new Map,[]),Xs=k.useMemo(()=>$l(f==null?void 0:f.repoUrl),[f==null?void 0:f.repoUrl]),ug=jr==="dark"?bz:Sz,fg=k.useMemo(()=>{const Z=[];return wn&&Z.push("codex"),Hs&&Z.push("claude"),Z},[wn,Hs]),Qs=k.useMemo(()=>Ae.filter(Z=>fg.includes(Z)),[Ae,fg]);k.useEffect(()=>{Ha.current=i},[i]),k.useEffect(()=>{qm.current=Ru},[Ru]),k.useEffect(()=>{Xm.current=Mu},[Mu]);const{attachmentPreview:Zs,attachmentsError:hg,attachmentsLoading:dg,draftAttachments:eo,renderMessageAttachments:k2,setAttachmentPreview:pg,setAttachmentsError:$i,setAttachmentsLoading:Vu,setDraftAttachments:to}=p9({attachmentSessionId:f==null?void 0:f.sessionId,workspaceToken:Qr,normalizeAttachments:Pn,isImageAttachment:Hz,getAttachmentName:va,attachmentIcon:x.jsx(ze,{icon:C6}),t:e}),mg=k.useMemo(()=>f!=null&&f.sessionId?`choices:${f.sessionId}`:null,[f==null?void 0:f.sessionId,At]),{choiceSelections:x2,setChoiceSelections:E2,activeForm:Ka,activeFormValues:gg,openVibe80Form:A2,closeVibe80Form:Ku,updateActiveFormValue:ro,submitActiveForm:L2,handleChoiceClick:P2}=S9({choicesKey:mg,input:a,setInput:o,handleSendMessageRef:ja,draftAttachments:eo,setDraftAttachments:to});C9({authMode:R,llmProvider:pe,selectedProviders:Ae,openAiAuthMode:le,showChatCommands:_e,showToolResults:Xr,notificationsEnabled:er,themeMode:jr,repoHistory:Ym,debugMode:Jm,setLlmProvider:Oe,setOpenAiLoginError:we,setClaudeLoginError:Oa,AUTH_MODE_KEY:ok,LLM_PROVIDER_KEY:lk,LLM_PROVIDERS_KEY:ck,OPENAI_AUTH_MODE_KEY:ak,CHAT_COMMANDS_VISIBLE_KEY:uk,TOOL_RESULTS_VISIBLE_KEY:fk,NOTIFICATIONS_ENABLED_KEY:hk,THEME_MODE_KEY:dk,REPO_HISTORY_KEY:sk,DEBUG_MODE_KEY:pk}),k.useMemo(()=>{const Z=[];return(i||[]).forEach(se=>{if((se==null?void 0:se.role)==="commandExecution"){const ve=Z[Z.length-1];(ve==null?void 0:ve.groupType)==="commandExecution"?ve.items.push(se):Z.push({groupType:"commandExecution",id:`command-group-${se.id}`,items:[se]});return}Z.push(se)}),Z},[i]);const{isMobileLayout:Cn}=k9({themeMode:jr,setSideOpen:Vm}),{applyMessages:T2,mergeAndApplyMessages:D2}=O9({normalizeAttachments:Pn,messageIndex:zi,commandIndex:Js,messagesRef:Ha,setMessages:s,setCommandPanelOpen:qs,setToolResultPanelOpen:Ys}),{activeWorktreeId:Je,activeWorktreeIdRef:vg,applyWorktreesList:I2,closeWorktree:N2,createWorktree:R2,handleSelectWorktree:O2,loadMainWorktreeSnapshot:Gu,requestWorktreeMessages:M2,requestWorktreesList:j2,renameWorktreeHandler:B2,setActiveWorktreeId:Ga,setWorktrees:nr,worktrees:qa}=s9({apiFetch:At,attachmentSessionId:f==null?void 0:f.sessionId,availableProviders:Qs,llmProvider:pe,messagesRef:Ha,normalizeAttachments:Pn,applyMessages:T2,socketRef:pr,setPaneByTab:Vs,setLogFilterByTab:Gs,showToast:rr,t:e}),{logFilter:F2,setLogFilter:z2,scopedRpcLogs:$2,filteredRpcLogs:U2}=x9({rpcLogs:_k,activeWorktreeId:Je,locale:n,logFilterByTab:yk,setLogFilterByTab:Gs}),{ensureNotificationPermission:H2,maybeNotify:W2,lastNotifiedIdRef:V2}=u9({notificationsEnabled:er,t:e}),Ya=k.useRef(()=>{}),K2=k.useCallback((...Z)=>{var se;return(se=Ya.current)==null?void 0:se.call(Ya,...Z)},[]),{branches:G2,branchError:q2,branchLoading:Y2,currentBranch:Ui,defaultBranch:J2,loadBranches:X2,loadProviderModels:Q2,modelError:Z2,modelLoading:ex,models:_g,providerModelState:tx,selectedModel:rx,selectedReasoningEffort:yg,setModelError:no,setModelLoading:io,setModels:nx,setProviderModelState:ix,setSelectedModel:qu,setSelectedReasoningEffort:sx}=v9({apiFetch:At,attachmentSessionId:f==null?void 0:f.sessionId,llmProvider:pe,loadRepoLastCommit:K2,processing:h,socketRef:pr,t:e}),{currentDiff:ox,diffFiles:ax,diffStatusLines:lx,hasCurrentChanges:cx,untrackedFilePanels:ux,untrackedLoading:fx,loadRepoLastCommit:so,loadWorktreeLastCommit:Yu,repoLastCommit:Ja,requestRepoDiff:Xa,requestWorktreeDiff:Qa,setRepoDiff:Za,setRepoLastCommit:Ju,setWorktreeLastCommitById:Xu,worktreeLastCommitById:Qu}=d9({apiFetch:At,attachmentSessionId:f==null?void 0:f.sessionId,currentBranch:Ui,activeWorktreeId:Je,parseDiff:_A,setWorktrees:nr,worktrees:qa,t:e});k.useEffect(()=>{Ya.current=so},[so]);const Qe=Je&&Je!=="main",Ee=Qe?qa.get(Je):null,Zr=Qe?Ee==null?void 0:Ee.provider:pe,wg=Qe?Ee==null?void 0:Ee.model:rx,mr=Je||"main",vt=k.useMemo(()=>{const Z=f==null?void 0:f.sessionId;return Z?`${Z}::${mr}`:null},[f==null?void 0:f.sessionId,mr]),Zu=k.useMemo(()=>{if(!vt)return[];const Z=qe[vt]||{};return Object.values(Z).sort((se,ve)=>se.messageId!==ve.messageId?String(se.messageId||"").localeCompare(String(ve.messageId||"")):(se.lineIndex||0)-(ve.lineIndex||0))},[vt,qe]),hx=k.useCallback((Z,se)=>{!vt||!Z||Ce(ve=>{const Le=ve[vt];return!Le||!Le[Z]?ve:{...ve,[vt]:{...Le,[Z]:{...Le[Z],annotationText:se}}}})},[vt]),dx=k.useCallback(Z=>{!vt||!Z||Ce(se=>{const ve=se[vt];if(!ve||!ve[Z])return se;const Le={...ve};if(delete Le[Z],Object.keys(Le).length===0){const $e={...se};return delete $e[vt],$e}return{...se,[vt]:Le}})},[vt]),px=k.useCallback(({messageId:Z,lineIndex:se,lineText:ve})=>{if(!vt||!Z)return;const Le=`${Z}:${se}`;Ce($e=>{const ht=$e[vt]||{},kr=ht[Le];return{...$e,[vt]:{...ht,[Le]:{annotationKey:Le,messageId:Z,lineIndex:se,lineText:ve||"",annotationText:(kr==null?void 0:kr.annotationText)||""}}}})},[vt]),mx=k.useCallback(()=>{vt&&Ce(Z=>{if(!Z[vt])return Z;const se={...Z};return delete se[vt],se})},[vt]),gx=k.useCallback(Z=>{const se=String(Z||"").trim();if(!se)return"";const ve=Zu.filter($e=>{var ht;return(ht=$e==null?void 0:$e.annotationText)==null?void 0:ht.trim()}).map($e=>({lineText:$e.lineText||"",annotationText:$e.annotationText.trim()}));return ve.length===0?se:`${ve.map($e=>`> ${$e.lineText}
|
|
707
|
+
${$e.annotationText}`).join(`
|
|
708
|
+
|
|
709
|
+
`)}
|
|
710
|
+
|
|
711
|
+
${se}`},[Zu]),bg=Qe?Array.isArray(Ee==null?void 0:Ee.models)?Ee.models:[]:Array.isArray(_g)?_g:[],Sg=Qe?!!(Ee!=null&&Ee.modelLoading):!!ex,vx=Qe?(Ee==null?void 0:Ee.modelError)||"":Z2,ai=Qe&&!Ee?[]:Ee?Ee.messages:i,_x=Array.isArray(ai)&&ai.length>0,bt=Fi[Je]||"chat",Cg=Ru[Je]||Hm,{handleResumeSession:yx,onRepoSubmit:wx}=y9({t:e,apiFetch:At,workspaceToken:Qr,handleLeaveWorkspace:rg,repoUrl:y,setRepoUrl:S,repoInput:b,sessionNameInput:C,repoAuth:T,setRepoAuth:O,authMode:R,sshKeyInput:z,httpUsername:q,httpPassword:W,sessionMode:We,sessionRequested:Sn,setSessionRequested:Jr,defaultInternetAccess:ke,defaultDenyGitCredentialsAccess:te,attachmentSession:f,setAttachmentSession:p,setAttachmentsLoading:Vu,setAttachmentsError:$i,setWorkspaceToken:Xk,setWorkspaceMode:ig,setWorkspaceError:ng,setOpenAiLoginPending:rt,setOpenAiLoginRequest:Cr}),ef=Cg.statusByPath||{},kt=k.useMemo(()=>Array.isArray(Wa)&&Wa.find(Z=>(Z==null?void 0:Z.sessionId)===L)||null,[Wa,L]),bx=k.useCallback(Z=>{const se=(Z==null?void 0:Z.sessionId)||"";se&&(ye(""),B(se),P("keep"),Y(""),j(""),K(""),X(typeof(Z==null?void 0:Z.defaultInternetAccess)=="boolean"?Z.defaultInternetAccess:!0),ce(typeof(Z==null?void 0:Z.defaultDenyGitCredentialsAccess)=="boolean"?Z.defaultDenyGitCredentialsAccess:!0))},[]),tf=k.useCallback(()=>{ge||(B(""),ye(""),P("keep"),Y(""),j(""),K(""))},[ge]),kg=k.useCallback(async()=>{if(!(kt!=null&&kt.sessionId))return;const Z=kt.sessionId,se={};if(V!==!!(kt!=null&&kt.defaultInternetAccess)&&(se.defaultInternetAccess=V),re!==!!(kt!=null&&kt.defaultDenyGitCredentialsAccess)&&(se.defaultDenyGitCredentialsAccess=re),D!=="keep")if(D==="ssh"){const ve=$.trim();if(!ve){ye(e("Private SSH key is required."));return}se.auth={type:"ssh",privateKey:ve}}else if(D==="http"){const ve=H.trim();if(!ve||!N){ye(e("Username and password required."));return}se.auth={type:"http",username:ve,password:N}}else se.auth={type:"none"};if(!Object.keys(se).length){tf();return}try{ae(Z),ye("");const ve=await At(`/api/v1/sessions/${encodeURIComponent(Z)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(se)});if(!ve.ok){const Le=await ve.json().catch(()=>null);throw new Error((Le==null?void 0:Le.error)||e("Failed to update session."))}return await ve.json().catch(()=>null),await Uu(),rr==null||rr(e("Session updated."),"success"),P("keep"),Y(""),j(""),K(""),{ok:!0,sessionId:Z}}catch(ve){return ye(ve.message||e("Failed to update session.")),{ok:!1,sessionId:Z}}finally{ae(null)}},[At,tf,Uu,D,re,N,H,V,$,kt,rr,e]),Sx=k.useCallback(async()=>{const Z=(kt==null?void 0:kt.sessionId)||"";if(!Z)return;const se=await kg();if(se!=null&&se.ok)try{Jr(!0),$i("");const ve=await At(`/api/v1/sessions/${encodeURIComponent(Z)}`);if(!ve.ok){const $e=await ve.json().catch(()=>null);throw new Error(($e==null?void 0:$e.error)||e("Unable to resume the session."))}const Le=await ve.json();p(Le),B("")}catch(ve){ye((ve==null?void 0:ve.message)||e("Unable to resume the session.")),Jr(!1)}},[At,kg,kt==null?void 0:kt.sessionId,p,$i,Jr,e]),Cx=k.useMemo(()=>{const Z={},se=(ve,Le)=>{if(!ve)return;const $e=Z[ve];if($e!=="untracked"){if(Le==="untracked"){Z[ve]="untracked";return}$e||(Z[ve]=Le)}};return Object.entries(ef).forEach(([ve,Le])=>{if(!ve)return;const $e=ve.split("/").filter(Boolean);if(!($e.length<=1))for(let ht=0;ht<$e.length-1;ht+=1){const kr=$e.slice(0,ht+1).join("/");se(kr,Le)}}),Z},[ef]),{resyncSession:kx}=N9({attachmentSessionId:f==null?void 0:f.sessionId,apiFetch:At,llmProvider:pe,setLlmProvider:Oe,setSelectedProviders:Te,setOpenAiReady:bn,setClaudeReady:ji,setRepoDiff:Za,setRpcLogsEnabled:ju,setRpcLogs:Ks,setTerminalEnabled:Gm,loadMainWorktreeSnapshot:Gu}),{requestMessageSync:xx}=R9({socketRef:pr,messagesRef:Ha});JB({attachmentSessionId:f==null?void 0:f.sessionId,workspaceToken:Qr,socketRef:pr,reconnectTimerRef:Ik,reconnectAttemptRef:Nk,closingRef:Rk,pingIntervalRef:Ok,lastPongRef:Mk,messageIndex:zi,commandIndex:Js,rpcLogsEnabledRef:Xm,mergeAndApplyMessages:D2,requestMessageSync:xx,requestWorktreesList:j2,requestWorktreeMessages:M2,applyWorktreesList:I2,resyncSession:kx,t:e,setStatus:c,setConnected:d,setAppServerReady:oi,setHasMainWorktreeStatus:v,setMessages:s,setProcessing:u,setActivity:_,setCurrentTurnId:Fa,setMainTaskLabel:Fu,setModelLoading:io,setModelError:no,setModels:nx,setProviderModelState:ix,setSelectedModel:qu,setSelectedReasoningEffort:sx,setRepoDiff:Za,setRpcLogs:Ks,setWorktrees:nr,setPaneByTab:Vs,setLogFilterByTab:Gs,setActiveWorktreeId:Ga,activeWorktreeIdRef:vg,extractVibe80Task:Nz,extractFirstLine:Rz,getItemActivityLabel:Sk,maybeNotify:W2,normalizeAttachments:Pn,loadRepoLastCommit:so,loadWorktreeLastCommit:Yu,openAiLoginRequest:Ve,setOpenAiLoginRequest:Cr,connected:g});const xg=k.useCallback((Z="main")=>{const se=pr.current;!se||se.readyState!==WebSocket.OPEN||(Z==="main"?(io(!0),no("")):nr(ve=>{const Le=new Map(ve),$e=Le.get(Z);return $e?(Le.set(Z,{...$e,modelLoading:!0,modelError:""}),Le):ve}),se.send(JSON.stringify({type:"model_list",worktreeId:Z})))},[no,io,nr,pr]),Ex=k.useCallback(Z=>{const se=pr.current;if(!se||se.readyState!==WebSocket.OPEN)return;const ve=Z||null;mr==="main"?(qu(ve||""),io(!0),no("")):nr(Le=>{const $e=new Map(Le),ht=$e.get(mr);return ht?($e.set(mr,{...ht,model:ve,modelLoading:!0,modelError:""}),$e):Le}),se.send(JSON.stringify({type:"model_set",worktreeId:mr,model:ve,reasoningEffort:mr==="main"?yg||null:(Ee==null?void 0:Ee.reasoningEffort)??null}))},[mr,Ee==null?void 0:Ee.reasoningEffort,yg,no,io,qu,nr,pr]);c9({activePane:bt,activeWorktreeId:Je,attachmentSessionId:f==null?void 0:f.sessionId,terminalEnabled:za,terminalContainerRef:tg,terminalDisposableRef:Lk,terminalFitRef:Ak,terminalRef:Ek,terminalSessionRef:Tk,terminalSocketRef:Pk,terminalWorktreeRef:Dk,themeMode:jr,workspaceToken:Qr}),k.useEffect(()=>{typeof(f==null?void 0:f.terminalEnabled)=="boolean"&&Gm(f.terminalEnabled)},[f==null?void 0:f.terminalEnabled]),k.useEffect(()=>{oi(!1)},[f==null?void 0:f.sessionId]),k.useEffect(()=>{!g||!(f!=null&&f.sessionId)||Zr!=="codex"&&Zr!=="claude"||Qe&&(Ee==null?void 0:Ee.status)!=="ready"||!Qe&&Zr==="codex"&&!Bi||xg(mr)},[mr,Ee==null?void 0:Ee.status,Zr,Bi,f==null?void 0:f.sessionId,g,Qe,xg]),k.useEffect(()=>{if(!(f!=null&&f.sessionId))return;Gu(),Za(f.repoDiff||{status:"",diff:""});const Z=typeof f.rpcLogsEnabled=="boolean"?f.rpcLogsEnabled:!0;ju(Z),Ks(Z?f.rpcLogs||[]:[]),c(e("Connecting...")),d(!1),v(!1)},[f==null?void 0:f.sessionId,Gu,zi,e]),k.useEffect(()=>{if(f!=null&&f.sessionId){const Z=(f==null?void 0:f.name)||Xs||e("Session");document.title=`vibe80 - ${Z}`}else document.title="vibe80"},[f==null?void 0:f.sessionId,f==null?void 0:f.name,Xs,e]),k.useEffect(()=>{typeof(f==null?void 0:f.defaultInternetAccess)=="boolean"&&Ie(f.defaultInternetAccess)},[f==null?void 0:f.defaultInternetAccess]),k.useEffect(()=>{typeof(f==null?void 0:f.defaultDenyGitCredentialsAccess)=="boolean"&&oe(f.defaultDenyGitCredentialsAccess)},[f==null?void 0:f.defaultDenyGitCredentialsAccess]),k.useEffect(()=>{if(!(f!=null&&f.defaultProvider)&&!(f!=null&&f.providers))return;const Z=Array.isArray(f.providers)?f.providers.filter(se=>se==="codex"||se==="claude"):[];Z.length?(Te(Z),bn(Z.includes("codex")),ji(Z.includes("claude"))):f.defaultProvider&&(Te([f.defaultProvider]),bn(f.defaultProvider==="codex"),ji(f.defaultProvider==="claude")),f.defaultProvider&&f.defaultProvider!==pe&&Oe(f.defaultProvider)},[f==null?void 0:f.defaultProvider,f==null?void 0:f.providers]),k.useEffect(()=>{f!=null&&f.repoUrl&&xk(Z=>Zz(Z,f.repoUrl))},[f==null?void 0:f.repoUrl]),z9({attachmentSessionId:f==null?void 0:f.sessionId,socketRef:pr,availableProviders:Qs,llmProvider:pe,providerSwitching:ne,processing:h,setProviderSwitching:Me,setStatus:c,setSelectedProviders:Te,setLlmProvider:Oe,t:e});const{commandMenuOpen:Ax,setCommandMenuOpen:Eg,setCommandQuery:Lx,commandSelection:Px,filteredCommands:Tx,isDraggingAttachments:Dx,handleInputChange:Ix,handleComposerKeyDown:Nx,onSubmit:Rx,onUploadAttachments:Ox,onPasteAttachments:Mx,onDragOverComposer:jx,onDragEnterComposer:Bx,onDragLeaveComposer:Fx,onDropAttachments:zx,removeDraftAttachment:$x,triggerAttachmentPicker:Ux,captureScreenshot:Hx}=YB({t:e,input:a,setInput:o,inputRef:Ua,handleSendMessageRef:ja,attachmentSession:f,apiFetch:At,normalizeAttachments:Pn,setDraftAttachments:to,draftAttachments:eo,setAttachmentsLoading:Vu,setAttachmentsError:$i,showToast:rr,uploadInputRef:Qm,attachmentsLoading:dg,conversationRef:Zm,composerRef:eg,isMobileLayout:Cn}),{sendMessage:Ag,sendCommitMessage:Wx,sendWorktreeMessage:Vx}=U9({input:a,setInput:o,setMessages:s,setDraftAttachments:to,socketRef:pr,connected:g,normalizeAttachments:Pn,draftAttachments:eo,setWorktrees:nr,setProcessing:u,setActivity:_,processingLabel:e("Processing..."),handleSendMessageRef:ja,ensureNotificationPermission:H2}),{openCloseConfirm:Kx,closeCloseConfirm:rf,handleConfirmDelete:Gx,closeConfirmDeleting:el}=M9({closeConfirm:Km,setCloseConfirm:Bu,setActiveWorktreeId:Ga,activeWorktreeIdRef:vg,closeWorktree:N2});k.useEffect(()=>{$a.current&&($a.current.scrollTop=$a.current.scrollHeight)},[ai,h,Je]);const qx=k.useMemo(()=>{const Z={id:"main",name:Ui||"Main",branchName:Ui||"main",provider:pe,status:h?"processing":g?m?"ready":"processing":"creating",color:"#6b7280",messages:i},se=Array.from(qa.values());return[Z,...se]},[Ui,pe,h,g,m,i,qa]),Yx=k.useMemo(()=>{const Z=[];return(ai||[]).forEach(se=>{if((se==null?void 0:se.role)==="commandExecution"){if(!_e)return;const ve=Z[Z.length-1];(ve==null?void 0:ve.groupType)==="commandExecution"?ve.items.push(se):Z.push({groupType:"commandExecution",id:`command-group-${se.id}`,items:[se]});return}if((se==null?void 0:se.role)==="tool_result"){if(!Xr)return;const ve=Z[Z.length-1];(ve==null?void 0:ve.groupType)==="toolResult"?ve.items.push(se):Z.push({groupType:"toolResult",id:`tool-result-group-${se.id}`,items:[se]});return}if((se==null?void 0:se.type)==="action_result"){const ve=Z[Z.length-1];(ve==null?void 0:ve.groupType)==="toolResult"?ve.items.push(se):Z.push({groupType:"toolResult",id:`tool-result-group-${se.id}`,items:[se]});return}Z.push(se)}),Z},[ai,_e,Xr]),{setShowOlderMessagesByTab:nf,collapsedMessages:Jx}=I9({activeChatKey:mr,displayedGroupedMessages:Yx,CHAT_COLLAPSE_THRESHOLD:jz,CHAT_COLLAPSE_VISIBLE:Bz});k.useEffect(()=>{const Z=(f==null?void 0:f.sessionId)||null;Ma.current!==Z&&(Ma.current=Z,s([]),zi.clear(),Js.clear(),nr(new Map),Ga("main"),Vs({main:"chat"}),Gs({main:"all"}),Ou({}),nf({}),qs({}),Ys({}),Ju(null),Xu(new Map),Fa(null),Fu(""),_(""),Bu(null),Ce({}))},[f==null?void 0:f.sessionId,Js,zi,Ga,_,Bu,qs,Fa,Ou,Gs,Fu,s,Ce,Vs,Ju,nf,Ys,Xu,nr]);const kn=Qe?Qu.get(Je):Ja,Lg=Qe?(Ee==null?void 0:Ee.branchName)||(Ee==null?void 0:Ee.name)||"":Ui||(Ja==null?void 0:Ja.branch)||"",Pg=typeof(kn==null?void 0:kn.sha)=="string"?kn.sha.slice(0,7):"",Xx=Qe?!!(Ee!=null&&Ee.internetAccess):!!ke,Qx=Qe?(Ee==null?void 0:Ee.denyGitCredentialsAccess)===!1:te===!1,Tg=n$(Zr,e),Dg=wg||e("Default model"),Zx=!!(Tg&&Dg),eE=Xs||e("Repository"),tE=!Cn&&bt==="chat"&&!!(Lg&&Pg&&(kn!=null&&kn.message)),rE=(Ee==null?void 0:Ee.status)==="processing",Ig=(Ee==null?void 0:Ee.status)==="stopped",oo=Qe?rE:h,ao=oo||Qe&&Ig,nE=Qe?(Ee==null?void 0:Ee.activity)||"":w,iE=oo?Qe?Ee==null?void 0:Ee.taskLabel:wk:"",Ng=Qe?Ee==null?void 0:Ee.currentTurnId:vk,sE=oo&&!!Ng,Rg=Zr!=="codex"?!0:Qe?(Ee==null?void 0:Ee.status)==="ready":Bi,oE=Zr==="codex"||Zr==="claude",aE=!g||ao||Sg||!bg.length,lE=wg||"",{handleViewSelect:tl,handleOpenSettings:Og,handleSettingsBack:cE}=L9({activePane:bt,activeWorktreeId:Je,debugMode:Jm,rpcLogsEnabled:Mu,terminalEnabled:za,setPaneByTab:Vs,setToolbarExportOpen:zu,lastPaneByTabRef:bk}),{addToBacklog:uE,backlog:rl,editBacklogItem:fE,launchBacklogItem:hE,markBacklogItemDone:dE,removeFromBacklog:pE,setBacklogMessagePage:mE}=m9({attachmentSessionId:f==null?void 0:f.sessionId,apiFetch:At,normalizeAttachments:Pn,sendMessage:Ag,setInput:o,setMessages:s,setWorktrees:nr,setDraftAttachments:to,input:a,draftAttachments:eo,inputRef:Ua,showToast:rr,t:e}),{interruptTurn:gE}=T9({activeWorktreeId:Je,isInWorktree:Qe,currentTurnIdForActive:Ng,socketRef:pr,setWorktrees:nr,setActivity:_}),{handleLeaveSession:sf}=P9({setAttachmentSession:p,setRepoUrl:S,setRepoInput:E,setRepoAuth:O,setSessionRequested:Jr,setAttachmentsError:$i,setAttachmentsLoading:Vu,setMessages:s,setRepoDiff:Za,setRpcLogs:Ks,setRpcLogsEnabled:ju,setRepoLastCommit:Ju,setWorktreeLastCommitById:Xu,setCurrentTurnId:Fa,setActivity:_,setDefaultDenyGitCredentialsAccess:oe});k.useEffect(()=>{!Qr&&(f!=null&&f.sessionId)&&sf()},[Qr,f==null?void 0:f.sessionId,sf]);const{handleDiffSelect:vE}=D9({activeWorktreeId:Je,handleViewSelect:tl,requestWorktreeDiff:Qa,requestRepoDiff:Xa}),{openPathInExplorer:_E,requestExplorerTree:of,requestExplorerStatus:af,openFileInExplorer:yE,setActiveExplorerFile:wE,closeExplorerFile:bE,selectExplorerNode:Mg,toggleExplorerDir:SE,updateExplorerDraft:CE,saveExplorerFile:kE,startExplorerRename:xE,cancelExplorerRename:jg,updateExplorerRenameDraft:Bg,submitExplorerRename:nl,createExplorerFile:EE,createExplorerFolder:AE,deleteExplorerSelection:LE}=F9({attachmentSessionId:f==null?void 0:f.sessionId,apiFetch:At,t:e,setExplorerByTab:Ou,explorerDefaultState:Hm,explorerRef:qm,activeWorktreeId:Je,handleViewSelect:tl,showToast:rr,requestExplorerTreeRef:mk,requestExplorerStatusRef:gk,loadExplorerFileRef:Ba});g9({activeProvider:Zr,activeWorktreeId:Je,addToBacklog:uE,apiFetch:At,attachmentSessionId:f==null?void 0:f.sessionId,captureScreenshot:Hx,connected:g,handleSendMessageRef:ja,handleViewSelect:tl,input:a,isWorktreeStopped:Ig,isCodexReady:Rg,isInWorktree:Qe,openPathInExplorer:_E,requestRepoDiff:Xa,requestWorktreeDiff:Qa,sendMessage:Ag,sendWorktreeMessage:Vx,buildAnnotatedMessage:gx,clearScopedAnnotations:mx,setAnnotationMode:Ne,setCommandMenuOpen:Eg,setDraftAttachments:to,setInput:o,setMessages:s,setWorktrees:nr,socketRef:pr,showToast:rr,t:e});const{handleClearRpcLogs:PE}=j9({activeWorktreeId:Je,setRpcLogs:Ks});k.useEffect(()=>{bt==="diff"&&(Je&&Je!=="main"?Qa(Je):Xa())},[bt,Je,Xa,Qa]),k.useEffect(()=>{if(bt!=="explorer")return;const Z=Je||"main";of(Z,!0),af(Z,!0)},[bt,Je,of,af]),k.useEffect(()=>{if(!(!(f!=null&&f.sessionId)||Cn||bt!=="chat")){if(Qe&&Je){Qu.has(Je)||Yu(Je);return}so()}},[f==null?void 0:f.sessionId,Cn,bt,Qe,Je,Qu,Yu,so]),$9({currentMessages:ai,attachmentRepoUrl:f==null?void 0:f.repoUrl,repoUrl:y,isInWorktree:Qe,activeWorktree:Ee,t:e,normalizeAttachments:Pn,downloadTextFile:e$,formatExportName:t$,extractRepoName:$l,setToolbarExportOpen:zu});const{handleClearChat:TE}=H9({activeWorktreeId:Je,setToolbarExportOpen:zu,setWorktrees:nr,lastNotifiedIdRef:V2,attachmentSessionId:f==null?void 0:f.sessionId,apiFetch:At,setMessages:s,messageIndex:zi,commandIndex:Js,setChoiceSelections:E2,choicesKey:mg,setCommandPanelOpen:qs,setToolResultPanelOpen:Ys,llmProvider:pe});if(f!=null&&f.sessionId,Qs.length>1&&Qs.find(Z=>Z!==pe),!(f!=null&&f.sessionId)){const se=We==="new"&&Sn&&!!y,ve=zl(y,72),Le=sg||Sn,$e=il=>o2[il]||{},ht=$u==="mono_user"&&!Qr,kr=!ht&&Va===1,xn=!ht&&Va===2,En=Va===3&&Qr,_t=Va===4&&Qr,lf=ht?e("Please use the console generated URL to login"):xn?e("Configure AI providers for this workspace."):En?e("Workspace created hint"):null,cf=ht?{title:e("Login required"),paragraphs:[e("Please use the console generated URL to login")]}:xn?{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).")],setupLink:!0}:En?{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.")]}:_t?{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 x.jsx(wz,{t:e,brandLogo:ug,showStep1:kr,showStep2:xn,showStep3:En,showStep4:_t,showMonoLoginRequired:ht,headerHint:lf,workspaceMode:s2,setWorkspaceMode:ig,formDisabled:Le,handleWorkspaceSubmit:zk,workspaceIdInput:i2,setWorkspaceIdInput:Kk,workspaceSecretInput:l2,setWorkspaceSecretInput:Yk,workspaceError:r2,handleWorkspaceProvidersSubmit:Fk,workspaceProvider:$e,workspaceAuthExpanded:Qk,setWorkspaceAuthExpanded:Wk,setWorkspaceProviders:Gk,providerAuthOptions:nk,getProviderAuthType:_0,workspaceAuthFiles:Zk,setWorkspaceAuthFiles:Vk,sessionMode:We,setSessionMode:Ge,setSessionRequested:Jr,setAttachmentsError:$i,loadWorkspaceSessions:Uu,deploymentMode:$u,handleLeaveWorkspace:rg,workspaceSessionsLoading:f2,workspaceSessions:Wa,workspaceSessionsError:u2,workspaceSessionDeletingId:c2,workspaceSessionConfigId:L,sessionConfigTarget:kt,workspaceSessionUpdatingId:ge,workspaceSessionConfigError:Se,handleResumeSession:yx,openSessionConfigure:bx,closeSessionConfigure:tf,handleUpdateAndResumeSession:Sx,handleDeleteSession:jk,locale:n,extractRepoName:$l,getTruncatedText:zl,isCloning:se,repoDisplay:ve,onRepoSubmit:wx,sessionNameInput:C,setSessionNameInput:A,repoInput:b,setRepoInput:E,repoHistory:Ym,authMode:R,setAuthMode:M,sshKeyInput:z,setSshKeyInput:U,httpUsername:q,setHttpUsername:ee,httpPassword:W,setHttpPassword:I,defaultInternetAccess:ke,setDefaultInternetAccess:Ie,defaultDenyGitCredentialsAccess:te,setDefaultDenyGitCredentialsAccess:oe,sessionConfigAuthMode:D,setSessionConfigAuthMode:P,sessionConfigSshKey:$,setSessionConfigSshKey:Y,sessionConfigHttpUsername:H,setSessionConfigHttpUsername:j,sessionConfigHttpPassword:N,setSessionConfigHttpPassword:K,sessionConfigInternetAccess:V,setSessionConfigInternetAccess:X,sessionConfigDenyGitCredentialsAccess:re,setSessionConfigDenyGitCredentialsAccess:ce,attachmentsError:hg,sessionRequested:Sn,workspaceBusy:sg,workspaceProvidersEditing:a2,providersBackStep:Uk,setWorkspaceStep:Jk,setWorkspaceProvidersEditing:qk,setWorkspaceError:ng,setProvidersBackStep:Hk,loadWorkspaceProviders:$k,workspaceCreated:t2,workspaceId:n2,workspaceCopied:e2,handleWorkspaceCopy:Bk,infoContent:cf,toast:F})}const Fg=(Z,se,ve,Le,$e,ht,kr,xn,En)=>!Array.isArray(Z)||Z.length===0?null:x.jsx("ul",{className:"explorer-tree-list",children:Z.map(_t=>{if(_t.type==="dir"){const Wt=ve.has(_t.path),DE=Le===_t.path&&$e==="dir",IE=ht===_t.path,zg=(En==null?void 0:En[_t.path])||"";return x.jsxs("li",{className:`explorer-tree-item is-dir ${DE?"is-selected":""} ${zg?`is-${zg}`:""}`,children:[x.jsxs("div",{className:"explorer-tree-entry",children:[x.jsx("button",{type:"button",className:"explorer-tree-caret-button",onClick:Br=>{Br.stopPropagation(),SE(se,_t.path)},children:x.jsx("span",{className:"explorer-tree-caret","aria-hidden":"true",children:x.jsx(ze,{icon:Wt?E6:y6})})}),IE?x.jsx("div",{className:"explorer-tree-toggle is-renaming",children:x.jsx("input",{className:"explorer-tree-rename-input",value:kr||"",autoFocus:!0,onClick:Br=>Br.stopPropagation(),onChange:Br=>Bg(se,Br.target.value),onBlur:()=>{nl(se)},onKeyDown:Br=>{Br.key==="Enter"?(Br.preventDefault(),nl(se)):Br.key==="Escape"&&(Br.preventDefault(),jg(se))}})}):x.jsx("button",{type:"button",className:"explorer-tree-toggle",onClick:()=>Mg(se,_t.path,"dir"),children:x.jsx("span",{className:"explorer-tree-name",children:_t.name})})]}),Wt?Fg(_t.children||[],se,ve,Le,$e,ht,kr,xn,En):null]},_t.path)}const lf=Le===_t.path&&$e==="file",cf=ht===_t.path,il=(xn==null?void 0:xn[_t.path])||"";return x.jsx("li",{className:`explorer-tree-item is-file ${lf?"is-selected":""} ${il?`is-${il}`:""}`,children:cf?x.jsxs("div",{className:"explorer-tree-file is-renaming",children:[x.jsx("span",{className:"explorer-tree-icon","aria-hidden":"true",children:x.jsx(ze,{icon:Q_})}),x.jsx("input",{className:"explorer-tree-rename-input",value:kr||"",autoFocus:!0,onClick:Wt=>Wt.stopPropagation(),onChange:Wt=>Bg(se,Wt.target.value),onBlur:()=>{nl(se)},onKeyDown:Wt=>{Wt.key==="Enter"?(Wt.preventDefault(),nl(se)):Wt.key==="Escape"&&(Wt.preventDefault(),jg(se))}})]}):x.jsxs("button",{type:"button",className:"explorer-tree-file",onClick:()=>{var Wt;Mg(se,_t.path,"file"),(Wt=Ba.current)==null||Wt.call(Ba,se,_t.path)},children:[x.jsx("span",{className:"explorer-tree-icon","aria-hidden":"true",children:x.jsx(ze,{icon:Q_})}),x.jsx("span",{className:"explorer-tree-name",children:_t.name})]})},_t.path)})});return x.jsxs("div",{className:"app",children:[x.jsx(yz,{t:e,brandLogo:ug,allTabs:qx,activeWorktreeId:Je,handleSelectWorktree:O2,createWorktree:R2,openCloseConfirm:Kx,renameWorktreeHandler:B2,llmProvider:pe,availableProviders:Qs,branches:G2,defaultBranch:J2,currentBranch:Ui,branchLoading:Y2,branchError:q2,defaultInternetAccess:ke,defaultDenyGitCredentialsAccess:te,deploymentMode:$u,loadBranches:X2,providerModelState:tx,loadProviderModels:Q2,connected:g,isMobileLayout:Cn,requestHandoffQr:lg,attachmentSession:f,handoffLoading:Hu,handleOpenSettings:Og,handleLeaveSession:sf}),x.jsxs("div",{className:`layout ${Wm?"is-side-open":"is-side-collapsed"} ${Cn?"is-mobile":""}`,children:[Cn&&Wm?x.jsx("button",{type:"button",className:"side-backdrop","aria-label":e("Close panel"),onClick:()=>Vm(!1)}):null,x.jsxs("aside",{className:"side",children:[x.jsx("div",{className:"side-body",children:x.jsxs("section",{className:"backlog",children:[x.jsxs("div",{className:"panel-header",children:[x.jsx("div",{className:"panel-title",children:e("Backlog")}),x.jsx("div",{className:"panel-subtitle",children:rl.length===0?e("No tasks"):e("{{count}} item(s)",{count:rl.length})})]}),rl.length===0?x.jsx("div",{className:"backlog-empty",children:e("No pending tasks at the moment.")}):x.jsx("ul",{className:"backlog-list",children:rl.map(Z=>{var se;return x.jsxs("li",{className:"backlog-item",children:[x.jsx("div",{className:"backlog-text",children:zl(Z.text,180)}),x.jsxs("div",{className:"backlog-actions",children:[x.jsx("button",{type:"button",className:"ghost",onClick:()=>fE(Z),children:e("Edit")}),x.jsx("button",{type:"button",onClick:()=>hE(Z),disabled:!g,children:e("Launch")}),x.jsx("button",{type:"button",className:"ghost",onClick:()=>pE(Z.id),children:e("Delete")})]}),(se=Z.attachments)!=null&&se.length?x.jsx("div",{className:"backlog-meta",children:e("{{count}} attachment(s)",{count:Z.attachments.length})}):null]},Z.id)})})]})}),x.jsx("div",{className:"side-footer",children:x.jsxs("button",{type:"button",className:`side-footer-button ${bt==="settings"?"is-active":""}`,onClick:Og,"aria-pressed":bt==="settings",children:[x.jsx("span",{className:"side-footer-icon","aria-hidden":"true",children:x.jsx(ze,{icon:ym})}),e("Settings")]})})]}),x.jsxs("section",{className:"conversation is-chat-narrow",ref:Zm,children:[x.jsxs("div",{className:"pane-stack",children:[x.jsx(qB,{t:e,activePane:bt,handleViewSelect:tl,handleDiffSelect:vE,terminalEnabled:za,hasMessages:_x,handleClearChat:TE}),x.jsx(kj,{t:e,activePane:bt,listRef:$a,showChatInfoPanel:tE,repoTitle:eE,activeBranchLabel:Lg,shortSha:Pg,activeCommit:kn,showProviderMeta:Zx,activeProviderLabel:Tg,activeModelLabel:Dg,showInternetAccess:Xx,showGitCredentialsShared:Qx,activeTaskLabel:iE,currentMessages:ai,chatHistoryWindow:Jx,activeChatKey:mr,setShowOlderMessagesByTab:nf,showChatCommands:_e,showToolResults:Xr,commandPanelOpen:Ck,setCommandPanelOpen:qs,toolResultPanelOpen:kk,setToolResultPanelOpen:Ys,renderMessageAttachments:k2,currentProcessing:oo,currentInteractionBlocked:ao,currentActivity:nE,extractVibe80Blocks:Iz,handleChoiceClick:P2,choiceSelections:x2,openVibe80Form:A2,copyTextToClipboard:y0,openFileInExplorer:yE,setInput:o,inputRef:Ua,markBacklogItemDone:dE,setBacklogMessagePage:mE,activeWorktreeId:Je,BACKLOG_PAGE_SIZE:Mz,MAX_USER_DISPLAY_LENGTH:Oz,getTruncatedText:zl,annotationMode:Re,scopedAnnotations:Zu,setAnnotationDraft:hx,removeAnnotation:dx,addOrFocusAnnotation:px}),x.jsx(k.Suspense,{fallback:null,children:x.jsx(kz,{t:e,activePane:bt,isInWorktree:Qe,diffStatusLines:lx,connected:g,currentProcessing:oo,hasCurrentChanges:cx,sendCommitMessage:Wx,diffFiles:ax,currentDiff:ox,untrackedFilePanels:ux,untrackedLoading:fx})}),x.jsx(k.Suspense,{fallback:null,children:x.jsx(Cz,{t:e,activePane:bt,repoName:Xs,activeWorktree:Ee,isInWorktree:Qe,activeWorktreeId:Je,attachmentSession:f,requestExplorerTree:of,requestExplorerStatus:af,activeExplorer:Cg,renderExplorerNodes:Fg,explorerStatusByPath:ef,explorerDirStatus:Cx,saveExplorerFile:kE,updateExplorerDraft:CE,setActiveExplorerFile:wE,closeExplorerFile:bE,startExplorerRename:xE,createExplorerFile:EE,createExplorerFolder:AE,deleteExplorerSelection:LE,getLanguageForPath:r$,themeMode:jr})}),x.jsx(k.Suspense,{fallback:null,children:x.jsx(xz,{t:e,terminalEnabled:za,activePane:bt,repoName:Xs,activeWorktree:Ee,isInWorktree:Qe,terminalContainerRef:tg,attachmentSession:f})}),x.jsx(k.Suspense,{fallback:null,children:x.jsx(Az,{t:e,activePane:bt,filteredRpcLogs:U2,logFilter:F2,setLogFilter:z2,scopedRpcLogs:$2,handleClearRpcLogs:PE})}),x.jsx(k.Suspense,{fallback:null,children:x.jsx(Ez,{t:e,activePane:bt,handleSettingsBack:cE,language:t,setLanguage:r,showChatCommands:_e,setShowChatCommands:Ht,showToolResults:Xr,setShowToolResults:Ws,notificationsEnabled:er,setNotificationsEnabled:tr,themeMode:jr,setThemeMode:pt,gitIdentityName:d2,setGitIdentityName:b2,gitIdentityEmail:p2,setGitIdentityEmail:S2,gitIdentityGlobal:m2,gitIdentityRepo:g2,gitIdentityLoading:v2,gitIdentitySaving:_2,gitIdentityError:y2,gitIdentityMessage:w2,handleSaveGitIdentity:C2,attachmentSession:f})})]}),x.jsx(GB,{t:e,activePane:bt,isDraggingAttachments:Dx,onSubmit:Rx,onDragEnterComposer:Bx,onDragOverComposer:jx,onDragLeaveComposer:Fx,onDropAttachments:zx,composerRef:eg,draftAttachments:eo,getAttachmentExtension:$z,formatAttachmentSize:Uz,removeDraftAttachment:$x,commandMenuOpen:Ax,filteredCommands:Tx,setInput:o,setCommandMenuOpen:Eg,setCommandQuery:Lx,inputRef:Ua,commandSelection:Px,triggerAttachmentPicker:Ux,attachmentSession:f,attachmentsLoading:dg,isMobileLayout:Cn,uploadInputRef:Qm,onUploadAttachments:Ox,input:a,handleInputChange:Ix,handleComposerKeyDown:Nx,onPasteAttachments:Mx,canInterrupt:sE,interruptTurn:gE,connected:g,modelSelectorVisible:oE,modelOptions:bg,selectedModel:lE,modelLoading:Sg,modelDisabled:aE,modelError:vx,onModelChange:Ex,isCodexReady:Rg,interactionBlocked:ao,attachmentsError:hg})]})]}),Ka?x.jsx("div",{className:"vibe80-form-overlay",role:"dialog","aria-modal":"true",onClick:Ku,children:x.jsxs("div",{className:"vibe80-form-dialog",onClick:Z=>Z.stopPropagation(),children:[x.jsxs("div",{className:"vibe80-form-header",children:[x.jsx("div",{className:"vibe80-form-title",children:Ka.question||e("Form")}),x.jsx("button",{type:"button",className:"vibe80-form-close","aria-label":e("Close"),onClick:Ku,children:x.jsx(ze,{icon:vi})})]}),x.jsxs("form",{className:"vibe80-form-body",onSubmit:Z=>{if(ao){Z.preventDefault();return}L2(Z)},children:[Ka.fields.map(Z=>{const se=`vibe80-${Ka.key}-${Z.id}`,ve=gg[Z.id]??"";return Z.type==="checkbox"?x.jsx("div",{className:"vibe80-form-field",children:x.jsxs("label",{className:"vibe80-form-checkbox",children:[x.jsx("input",{type:"checkbox",checked:!!gg[Z.id],onChange:Le=>ro(Z.id,Le.target.checked)}),x.jsx("span",{children:Z.label})]})},Z.id):Z.type==="textarea"?x.jsxs("div",{className:"vibe80-form-field",children:[x.jsx("label",{className:"vibe80-form-label",htmlFor:se,children:Z.label}),x.jsx("textarea",{id:se,className:"vibe80-form-input",rows:4,value:ve,onChange:Le=>ro(Z.id,Le.target.value)})]},Z.id):Z.type==="radio"?x.jsxs("div",{className:"vibe80-form-field",children:[x.jsx("div",{className:"vibe80-form-label",children:Z.label}),x.jsx("div",{className:"vibe80-form-options",children:(Z.choices||[]).length?Z.choices.map(Le=>x.jsxs("label",{className:"vibe80-form-option",children:[x.jsx("input",{type:"radio",name:se,value:Le,checked:ve===Le,onChange:()=>ro(Z.id,Le)}),x.jsx("span",{children:Le})]},`${Z.id}-${Le}`)):x.jsx("div",{className:"vibe80-form-empty",children:e("No options.")})})]},Z.id):Z.type==="select"?x.jsxs("div",{className:"vibe80-form-field",children:[x.jsx("label",{className:"vibe80-form-label",htmlFor:se,children:Z.label}),x.jsx("select",{id:se,className:"vibe80-form-input vibe80-form-select",value:ve,onChange:Le=>ro(Z.id,Le.target.value),children:(Z.choices||[]).length?Z.choices.map(Le=>x.jsx("option",{value:Le,children:Le},`${Z.id}-${Le}`)):x.jsx("option",{value:"",children:e("No options")})})]},Z.id):x.jsxs("div",{className:"vibe80-form-field",children:[x.jsx("label",{className:"vibe80-form-label",htmlFor:se,children:Z.label}),x.jsx("input",{id:se,className:"vibe80-form-input",type:"text",value:ve,onChange:Le=>ro(Z.id,Le.target.value)})]},Z.id)}),x.jsxs("div",{className:"vibe80-form-actions",children:[x.jsx("button",{type:"button",className:"vibe80-form-cancel",onClick:Ku,children:e("Cancel")}),x.jsx("button",{type:"submit",className:"vibe80-form-submit",disabled:ao,children:e("Send")})]})]})]})}):null,h2?x.jsx("div",{className:"handoff-modal-overlay",role:"dialog","aria-modal":"true",onClick:cg,children:x.jsxs("div",{className:"handoff-modal",onClick:Z=>Z.stopPropagation(),children:[x.jsxs("div",{className:"handoff-modal-header",children:[x.jsx("div",{className:"handoff-modal-title",children:e("Continue on mobile")}),x.jsx("button",{type:"button",className:"handoff-modal-close","aria-label":e("Close"),onClick:cg,children:x.jsx(ze,{icon:vi})})]}),x.jsxs("div",{className:"handoff-modal-body",children:[x.jsx("p",{className:"handoff-modal-text",children:e("Scan this QR code in the Android app to resume the current session.")}),ag?x.jsx("div",{className:"handoff-modal-error",children:ag}):null,og?x.jsx("div",{className:"handoff-modal-qr",children:x.jsx("img",{src:og,alt:e("QR code")})}):x.jsx("div",{className:"handoff-modal-placeholder",children:e(Hu?"Generating QR code...":"QR code unavailable.")}),typeof Wu=="number"?x.jsx("div",{className:"handoff-modal-meta",children:Wu>0?e("Expires in {{seconds}}s",{seconds:Wu}):e("QR code expired")}):null,x.jsx("div",{className:"handoff-modal-actions",children:x.jsx("button",{type:"button",className:"session-button",onClick:lg,disabled:Hu,children:e("Regenerate")})})]})]})}):null,Km?x.jsx("div",{className:"worktree-close-confirm-overlay",role:"dialog","aria-modal":"true",onClick:el?void 0:rf,children:x.jsxs("div",{className:"worktree-close-confirm-dialog",onClick:Z=>Z.stopPropagation(),children:[x.jsxs("div",{className:"worktree-close-confirm-header",children:[x.jsx("div",{className:"worktree-close-confirm-title",children:e("Close the worktree?")}),x.jsx("button",{type:"button",className:"worktree-close-confirm-close","aria-label":e("Close"),onClick:rf,disabled:el,children:x.jsx(ze,{icon:vi})})]}),x.jsx("div",{className:"worktree-close-confirm-body",children:e("All changes will be lost. What would you like to do?")}),x.jsxs("div",{className:"worktree-close-confirm-actions",children:[x.jsx("button",{type:"button",className:"worktree-close-confirm-cancel",onClick:rf,disabled:el,children:e("Cancel")}),x.jsx("button",{type:"button",className:"worktree-close-confirm-delete",onClick:Gx,disabled:el,children:e("Delete worktree")})]})]})}):null,Zs?x.jsxs("div",{className:"attachment-modal",role:"dialog","aria-modal":"true",onClick:()=>pg(null),children:[x.jsx("button",{type:"button",className:"attachment-modal-close","aria-label":e("Close"),onClick:()=>pg(null),children:x.jsx(ze,{icon:vi})}),x.jsxs("div",{className:"attachment-modal-body",onClick:Z=>Z.stopPropagation(),children:[x.jsx("img",{src:Zs.url,alt:Zs.name||e("Preview")}),Zs.name?x.jsx("div",{className:"attachment-modal-name",children:Zs.name}):null]})]}):null]})}lA({immediate:!0});Iw(document.getElementById("root")).render(x.jsx(Jc.StrictMode,{children:x.jsx(vz,{children:x.jsx(i$,{})})}));export{ze as F,NL as H,Jc as W,f$ as a,c$ as b,u$ as c,d$ as d,h$ as e,l$ as f,a$ as i,x as j,k as r};
|