@jait/gateway 0.1.472 → 0.1.473
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/dist/tools/ssh-tools.d.ts +2 -0
- package/dist/tools/ssh-tools.d.ts.map +1 -1
- package/dist/tools/ssh-tools.js +63 -5
- package/dist/tools/ssh-tools.js.map +1 -1
- package/package.json +1 -1
- package/web-dist/assets/{_basePickBy-WPSiXDuV.js → _basePickBy-C1wfA8iF.js} +1 -1
- package/web-dist/assets/{_baseUniq-CZiacepn.js → _baseUniq-DxhWbSL7.js} +1 -1
- package/web-dist/assets/{arc-DGbJAqoN.js → arc-C9lvxA3E.js} +1 -1
- package/web-dist/assets/{architectureDiagram-2XIMDMQ5-DeurLCSO.js → architectureDiagram-2XIMDMQ5-DxVU-vpN.js} +1 -1
- package/web-dist/assets/{blockDiagram-WCTKOSBZ-Do_eYvv6.js → blockDiagram-WCTKOSBZ-DGBqv5l2.js} +1 -1
- package/web-dist/assets/{c4Diagram-IC4MRINW-CoeJ8t1f.js → c4Diagram-IC4MRINW-Cf8c5jXg.js} +1 -1
- package/web-dist/assets/channel-Bqna6gR5.js +1 -0
- package/web-dist/assets/{chunk-4BX2VUAB-m20pZVBE.js → chunk-4BX2VUAB-DYcHHNDl.js} +1 -1
- package/web-dist/assets/{chunk-55IACEB6-D5vj8Z0E.js → chunk-55IACEB6-C4LDbul_.js} +1 -1
- package/web-dist/assets/{chunk-FMBD7UC4-D_AfXKhY.js → chunk-FMBD7UC4-j9ZgnwDK.js} +1 -1
- package/web-dist/assets/{chunk-JSJVCQXG-p7_1wgol.js → chunk-JSJVCQXG-B3Qq48cB.js} +1 -1
- package/web-dist/assets/{chunk-KX2RTZJC-bQTGJMIA.js → chunk-KX2RTZJC-CP23u3nc.js} +1 -1
- package/web-dist/assets/{chunk-NQ4KR5QH-D_BSfs6V.js → chunk-NQ4KR5QH-bFMjfksP.js} +1 -1
- package/web-dist/assets/{chunk-QZHKN3VN-FLWDcBKP.js → chunk-QZHKN3VN-SJjB1Esb.js} +1 -1
- package/web-dist/assets/{chunk-WL4C6EOR-DFk6yvv8.js → chunk-WL4C6EOR-Cagh8RYq.js} +1 -1
- package/web-dist/assets/classDiagram-VBA2DB6C-OzZ-EBVj.js +1 -0
- package/web-dist/assets/classDiagram-v2-RAHNMMFH-OzZ-EBVj.js +1 -0
- package/web-dist/assets/clone-JyFPLMNC.js +1 -0
- package/web-dist/assets/{cose-bilkent-S5V4N54A-Cybl7_7S.js → cose-bilkent-S5V4N54A-DQsBLyzP.js} +1 -1
- package/web-dist/assets/{dagre-KLK3FWXG-DUUc59A3.js → dagre-KLK3FWXG-a-J-tfqX.js} +1 -1
- package/web-dist/assets/{diagram-E7M64L7V-DeqG8be1.js → diagram-E7M64L7V-C7j2FaQG.js} +1 -1
- package/web-dist/assets/{diagram-IFDJBPK2-DkfGN0vP.js → diagram-IFDJBPK2-Dt48LKW8.js} +1 -1
- package/web-dist/assets/{diagram-P4PSJMXO-CMXtxWUN.js → diagram-P4PSJMXO-CHMK8LtK.js} +1 -1
- package/web-dist/assets/{erDiagram-INFDFZHY-C7w5NSjx.js → erDiagram-INFDFZHY-BS497K0J.js} +1 -1
- package/web-dist/assets/{flowDiagram-PKNHOUZH-BY7ORpwh.js → flowDiagram-PKNHOUZH-BhdVbyZ5.js} +1 -1
- package/web-dist/assets/{ganttDiagram-A5KZAMGK-CKBTYagf.js → ganttDiagram-A5KZAMGK-CigF0hJ4.js} +1 -1
- package/web-dist/assets/{gitGraphDiagram-K3NZZRJ6-DL5Ta5YV.js → gitGraphDiagram-K3NZZRJ6-CU8jR_v6.js} +1 -1
- package/web-dist/assets/{graph-DY-bJILm.js → graph-Df2EJf7d.js} +1 -1
- package/web-dist/assets/{index-CRLdm-EG.js → index-BE5grzzd.js} +5 -5
- package/web-dist/assets/{index-CJcdsvDp.js → index-B_Mskjqg.js} +1 -1
- package/web-dist/assets/{index-Dyv540Xj.js → index-CZ9J2iaw.js} +1 -1
- package/web-dist/assets/{infoDiagram-LFFYTUFH-ChKdikaa.js → infoDiagram-LFFYTUFH-Cl18HlXA.js} +1 -1
- package/web-dist/assets/{ishikawaDiagram-PHBUUO56-NOsFfrFI.js → ishikawaDiagram-PHBUUO56-BMbd97Es.js} +1 -1
- package/web-dist/assets/{journeyDiagram-4ABVD52K-ClIzAE7a.js → journeyDiagram-4ABVD52K-DEkWNmWg.js} +1 -1
- package/web-dist/assets/{kanban-definition-K7BYSVSG-DClYlWEV.js → kanban-definition-K7BYSVSG-CXUgFjg3.js} +1 -1
- package/web-dist/assets/{layout-BeZbz0rT.js → layout-CrfCfHxK.js} +1 -1
- package/web-dist/assets/{linear-BsU_KAFM.js → linear-ARCghwzQ.js} +1 -1
- package/web-dist/assets/{mindmap-definition-YRQLILUH-bdz9qpw4.js → mindmap-definition-YRQLILUH-D-ZRDTbe.js} +1 -1
- package/web-dist/assets/{pieDiagram-SKSYHLDU-Ccs-T4lR.js → pieDiagram-SKSYHLDU-BcDIj2Di.js} +1 -1
- package/web-dist/assets/{quadrantDiagram-337W2JSQ-D2gNfNmj.js → quadrantDiagram-337W2JSQ-pbuABeJN.js} +1 -1
- package/web-dist/assets/{requirementDiagram-Z7DCOOCP-DLX5EPiz.js → requirementDiagram-Z7DCOOCP-Pqrwb664.js} +1 -1
- package/web-dist/assets/{sankeyDiagram-WA2Y5GQK-TZGkWva3.js → sankeyDiagram-WA2Y5GQK-CEnHfHkb.js} +1 -1
- package/web-dist/assets/{sequenceDiagram-2WXFIKYE-5hQOHGic.js → sequenceDiagram-2WXFIKYE-D7Putei8.js} +1 -1
- package/web-dist/assets/{stateDiagram-RAJIS63D-hlhpvWCT.js → stateDiagram-RAJIS63D-C6hNGHCZ.js} +1 -1
- package/web-dist/assets/stateDiagram-v2-FVOUBMTO-FG63mBNv.js +1 -0
- package/web-dist/assets/{timeline-definition-YZTLITO2-DE9vxNYF.js → timeline-definition-YZTLITO2-CfTZOmEa.js} +1 -1
- package/web-dist/assets/{treemap-KZPCXAKY-DsnW2UwF.js → treemap-KZPCXAKY-BGFkFIHT.js} +1 -1
- package/web-dist/assets/{vennDiagram-LZ73GAT5-C2EdLnxP.js → vennDiagram-LZ73GAT5-DHevRYGi.js} +1 -1
- package/web-dist/assets/{xychartDiagram-JWTSCODW-DHYZgXj6.js → xychartDiagram-JWTSCODW-DhR49i8Y.js} +1 -1
- package/web-dist/index.html +1 -1
- package/web-dist/assets/channel--8h-Ni6m.js +0 -1
- package/web-dist/assets/classDiagram-VBA2DB6C-D6tM3UXh.js +0 -1
- package/web-dist/assets/classDiagram-v2-RAHNMMFH-D6tM3UXh.js +0 -1
- package/web-dist/assets/clone-DFuW_ri-.js +0 -1
- package/web-dist/assets/stateDiagram-v2-FVOUBMTO-Dh0Z7kcZ.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./angular-html-DA-rfuFy.js","./html-pp8916En.js","./javascript-wDzz0qaB.js","./css-CLj8gQPS.js","./angular-ts-BrjP3tb8.js","./scss-D5BDwBP9.js","./astro-HNnZUWAn.js","./json-Cp-IABpG.js","./typescript-BPQ3VLAy.js","./postcss-CXtECtnM.js","./tsx-COt5Ahok.js","./blade-BjGOyj-B.js","./html-derivative-DlHx6ybY.js","./xml-sdJ4AIDG.js","./java-CylS5w8V.js","./sql-BLtJtn59.js","./coffee-Ch7k5sss.js","./cpp-CofmeUqb.js","./regexp-CDVJQ6XC.js","./glsl-DplSGwfg.js","./c-BIGW1oBm.js","./graphql-ChdNCCLP.js","./jsx-g9-lgVsj.js","./haml-D5jkg6IW.js","./handlebars-BpdQsYii.js","./yaml-Buea-lGh.js","./http-jrhK8wxY.js","./shellscript-Yzrsuije.js","./hurl-irOxFIW8.js","./csv-fuZLfV_i.js","./jinja-f2NsQr07.js","./jison-wvAkD_A8.js","./julia-CxzCAyBv.js","./python-B6aJPvgy.js","./r-Dspwwk_N.js","./marko-DjSrsDqO.js","./less-B1dDrJ26.js","./mdc-DTYItulj.js","./markdown-Cvjx9yec.js","./php-R6g_5hLQ.js","./pug-DKIMFp6K.js","./svelte-Cy7k_4gC.js","./ts-tags-DQrlYJgV.js","./vue-D2xRrEX4.js","./vue-html-AaS7Mt5G.js","./vue-vine-BoDAl6tE.js","./stylus-BEDo0Tqx.js","./dagre-KLK3FWXG-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./angular-html-DA-rfuFy.js","./html-pp8916En.js","./javascript-wDzz0qaB.js","./css-CLj8gQPS.js","./angular-ts-BrjP3tb8.js","./scss-D5BDwBP9.js","./astro-HNnZUWAn.js","./json-Cp-IABpG.js","./typescript-BPQ3VLAy.js","./postcss-CXtECtnM.js","./tsx-COt5Ahok.js","./blade-BjGOyj-B.js","./html-derivative-DlHx6ybY.js","./xml-sdJ4AIDG.js","./java-CylS5w8V.js","./sql-BLtJtn59.js","./coffee-Ch7k5sss.js","./cpp-CofmeUqb.js","./regexp-CDVJQ6XC.js","./glsl-DplSGwfg.js","./c-BIGW1oBm.js","./graphql-ChdNCCLP.js","./jsx-g9-lgVsj.js","./haml-D5jkg6IW.js","./handlebars-BpdQsYii.js","./yaml-Buea-lGh.js","./http-jrhK8wxY.js","./shellscript-Yzrsuije.js","./hurl-irOxFIW8.js","./csv-fuZLfV_i.js","./jinja-f2NsQr07.js","./jison-wvAkD_A8.js","./julia-CxzCAyBv.js","./python-B6aJPvgy.js","./r-Dspwwk_N.js","./marko-DjSrsDqO.js","./less-B1dDrJ26.js","./mdc-DTYItulj.js","./markdown-Cvjx9yec.js","./php-R6g_5hLQ.js","./pug-DKIMFp6K.js","./svelte-Cy7k_4gC.js","./ts-tags-DQrlYJgV.js","./vue-D2xRrEX4.js","./vue-html-AaS7Mt5G.js","./vue-vine-BoDAl6tE.js","./stylus-BEDo0Tqx.js","./dagre-KLK3FWXG-a-J-tfqX.js","./graph-Df2EJf7d.js","./_baseUniq-DxhWbSL7.js","./layout-CrfCfHxK.js","./_basePickBy-C1wfA8iF.js","./clone-JyFPLMNC.js","./cose-bilkent-S5V4N54A-DQsBLyzP.js","./cytoscape.esm-BQaXIfA_.js","./c4Diagram-IC4MRINW-Cf8c5jXg.js","./chunk-JSJVCQXG-B3Qq48cB.js","./flowDiagram-PKNHOUZH-BhdVbyZ5.js","./chunk-FMBD7UC4-j9ZgnwDK.js","./chunk-55IACEB6-C4LDbul_.js","./chunk-KX2RTZJC-CP23u3nc.js","./channel-Bqna6gR5.js","./erDiagram-INFDFZHY-BS497K0J.js","./gitGraphDiagram-K3NZZRJ6-CU8jR_v6.js","./chunk-4BX2VUAB-DYcHHNDl.js","./chunk-QZHKN3VN-SJjB1Esb.js","./treemap-KZPCXAKY-BGFkFIHT.js","./ganttDiagram-A5KZAMGK-CigF0hJ4.js","./linear-ARCghwzQ.js","./defaultLocale-DX6XiGOO.js","./infoDiagram-LFFYTUFH-Cl18HlXA.js","./pieDiagram-SKSYHLDU-BcDIj2Di.js","./arc-C9lvxA3E.js","./quadrantDiagram-337W2JSQ-pbuABeJN.js","./xychartDiagram-JWTSCODW-DhR49i8Y.js","./requirementDiagram-Z7DCOOCP-Pqrwb664.js","./sequenceDiagram-2WXFIKYE-D7Putei8.js","./classDiagram-VBA2DB6C-OzZ-EBVj.js","./chunk-WL4C6EOR-Cagh8RYq.js","./classDiagram-v2-RAHNMMFH-OzZ-EBVj.js","./stateDiagram-RAJIS63D-C6hNGHCZ.js","./chunk-NQ4KR5QH-bFMjfksP.js","./stateDiagram-v2-FVOUBMTO-FG63mBNv.js","./journeyDiagram-4ABVD52K-DEkWNmWg.js","./timeline-definition-YZTLITO2-CfTZOmEa.js","./mindmap-definition-YRQLILUH-D-ZRDTbe.js","./kanban-definition-K7BYSVSG-CXUgFjg3.js","./diagram-P4PSJMXO-CHMK8LtK.js","./diagram-IFDJBPK2-Dt48LKW8.js","./blockDiagram-WCTKOSBZ-DGBqv5l2.js","./architectureDiagram-2XIMDMQ5-DxVU-vpN.js","./diagram-E7M64L7V-C7j2FaQG.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var Rfe=Object.defineProperty;var Pfe=(e,r,n)=>r in e?Rfe(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n;var Ge=(e,r,n)=>Pfe(e,typeof r!="symbol"?r+"":r,n);function Lfe(e,r){for(var n=0;n<r.length;n++){const i=r[n];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(i,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function py(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Zvt(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var r=e.default;if(typeof r=="function"){var n=function i(){return this instanceof i?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};n.prototype=r.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:function(){return e[i]}})}),n}var K6={exports:{}},wb={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.js
|
|
@@ -922,7 +922,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
922
922
|
monaco.config({ paths: { vs: '...' } })
|
|
923
923
|
|
|
924
924
|
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
925
|
-
`},lF=b$e(k$e)(Gee),C$e={config:w$e},j$e=function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return function(s){return n.reduceRight(function(o,a){return a(o)},s)}};function Kee(e,r){return Object.keys(r).forEach(function(n){r[n]instanceof Object&&e[n]&&Object.assign(r[n],Kee(e[n],r[n]))}),sF(sF({},e),r)}var N$e={type:"cancelation",msg:"operation is manually canceled"};function RE(e){var r=!1,n=new Promise(function(i,s){e.then(function(o){return r?s(N$e):i(o)}),e.catch(s)});return n.cancel=function(){return r=!0},n}var T$e=["monaco"],E$e=v$e.create({config:x$e,isInitialized:!1,resolve:null,reject:null,monaco:null}),Yee=e$e(E$e,2),nk=Yee[0],_N=Yee[1];function A$e(e){var r=C$e.config(e),n=r.monaco,i=ZLe(r,T$e);_N(function(s){return{config:Kee(s.config,i),monaco:n}})}function O$e(){var e=nk(function(r){var n=r.monaco,i=r.isInitialized,s=r.resolve;return{monaco:n,isInitialized:i,resolve:s}});if(!e.isInitialized){if(_N({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),RE(PE);if(window.monaco&&window.monaco.editor)return Xee(window.monaco),e.resolve(window.monaco),RE(PE);j$e(M$e,P$e)(L$e)}return RE(PE)}function M$e(e){return document.body.appendChild(e)}function R$e(e){var r=document.createElement("script");return e&&(r.src=e),r}function P$e(e){var r=nk(function(i){var s=i.config,o=i.reject;return{config:s,reject:o}}),n=R$e("".concat(r.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=r.reject,n}function L$e(){var e=nk(function(n){var i=n.config,s=n.resolve,o=n.reject;return{config:i,resolve:s,reject:o}}),r=window.require;r.config(e.config),r(["vs/editor/editor.main"],function(n){var i=n.m||n;Xee(i),e.resolve(i)},function(n){e.reject(n)})}function Xee(e){nk().monaco||_N({monaco:e})}function $$e(){return nk(function(e){var r=e.monaco;return r})}var PE=new Promise(function(e,r){return _N({resolve:e,reject:r})}),wN={config:A$e,init:O$e,__getMonacoInstance:$$e};const Jee=Object.freeze(JSON.parse('{"colors":{"actionBar.toggledBackground":"#383a49","activityBarBadge.background":"#007ACC","checkbox.border":"#6B6B6B","editor.background":"#1E1E1E","editor.foreground":"#D4D4D4","editor.inactiveSelectionBackground":"#3A3D41","editor.selectionHighlightBackground":"#ADD6FF26","editorIndentGuide.activeBackground1":"#707070","editorIndentGuide.background1":"#404040","input.placeholderForeground":"#A6A6A6","list.activeSelectionIconForeground":"#FFF","list.dropBackground":"#383B3D","menu.background":"#252526","menu.border":"#454545","menu.foreground":"#CCCCCC","menu.selectionBackground":"#0078d4","menu.separatorBackground":"#454545","ports.iconRunningProcessForeground":"#369432","sideBarSectionHeader.background":"#0000","sideBarSectionHeader.border":"#ccc3","sideBarTitle.foreground":"#BBBBBB","statusBarItem.remoteBackground":"#16825D","statusBarItem.remoteForeground":"#FFF","tab.lastPinnedBorder":"#ccc3","tab.selectedBackground":"#222222","tab.selectedForeground":"#ffffffa0","terminal.inactiveSelectionBackground":"#3A3D41","widget.border":"#303031"},"displayName":"Dark Plus","name":"dark-plus","semanticHighlighting":true,"semanticTokenColors":{"customLiteral":"#DCDCAA","newOperator":"#C586C0","numberLiteral":"#b5cea8","stringLiteral":"#ce9178"},"tokenColors":[{"scope":["meta.embedded","source.groovy.embedded","string meta.image.inline.markdown","variable.legacy.builtin.python"],"settings":{"foreground":"#D4D4D4"}},{"scope":"emphasis","settings":{"fontStyle":"italic"}},{"scope":"strong","settings":{"fontStyle":"bold"}},{"scope":"header","settings":{"foreground":"#000080"}},{"scope":"comment","settings":{"foreground":"#6A9955"}},{"scope":"constant.language","settings":{"foreground":"#569cd6"}},{"scope":["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],"settings":{"foreground":"#b5cea8"}},{"scope":"constant.regexp","settings":{"foreground":"#646695"}},{"scope":"entity.name.tag","settings":{"foreground":"#569cd6"}},{"scope":["entity.name.tag.css","entity.name.tag.less"],"settings":{"foreground":"#d7ba7d"}},{"scope":"entity.other.attribute-name","settings":{"foreground":"#9cdcfe"}},{"scope":["entity.other.attribute-name.class.css","source.css entity.other.attribute-name.class","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.parent.less","source.css entity.other.attribute-name.pseudo-class","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],"settings":{"foreground":"#d7ba7d"}},{"scope":"invalid","settings":{"foreground":"#f44747"}},{"scope":"markup.underline","settings":{"fontStyle":"underline"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#569cd6"}},{"scope":"markup.heading","settings":{"fontStyle":"bold","foreground":"#569cd6"}},{"scope":"markup.italic","settings":{"fontStyle":"italic"}},{"scope":"markup.strikethrough","settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inserted","settings":{"foreground":"#b5cea8"}},{"scope":"markup.deleted","settings":{"foreground":"#ce9178"}},{"scope":"markup.changed","settings":{"foreground":"#569cd6"}},{"scope":"punctuation.definition.quote.begin.markdown","settings":{"foreground":"#6A9955"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#6796e6"}},{"scope":"markup.inline.raw","settings":{"foreground":"#ce9178"}},{"scope":"punctuation.definition.tag","settings":{"foreground":"#808080"}},{"scope":["meta.preprocessor","entity.name.function.preprocessor"],"settings":{"foreground":"#569cd6"}},{"scope":"meta.preprocessor.string","settings":{"foreground":"#ce9178"}},{"scope":"meta.preprocessor.numeric","settings":{"foreground":"#b5cea8"}},{"scope":"meta.structure.dictionary.key.python","settings":{"foreground":"#9cdcfe"}},{"scope":"meta.diff.header","settings":{"foreground":"#569cd6"}},{"scope":"storage","settings":{"foreground":"#569cd6"}},{"scope":"storage.type","settings":{"foreground":"#569cd6"}},{"scope":["storage.modifier","keyword.operator.noexcept"],"settings":{"foreground":"#569cd6"}},{"scope":["string","meta.embedded.assembly"],"settings":{"foreground":"#ce9178"}},{"scope":"string.tag","settings":{"foreground":"#ce9178"}},{"scope":"string.value","settings":{"foreground":"#ce9178"}},{"scope":"string.regexp","settings":{"foreground":"#d16969"}},{"scope":["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],"settings":{"foreground":"#569cd6"}},{"scope":["meta.template.expression"],"settings":{"foreground":"#d4d4d4"}},{"scope":["support.type.vendored.property-name","support.type.property-name","source.css variable","source.coffee.embedded"],"settings":{"foreground":"#9cdcfe"}},{"scope":"keyword","settings":{"foreground":"#569cd6"}},{"scope":"keyword.control","settings":{"foreground":"#569cd6"}},{"scope":"keyword.operator","settings":{"foreground":"#d4d4d4"}},{"scope":["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],"settings":{"foreground":"#569cd6"}},{"scope":"keyword.other.unit","settings":{"foreground":"#b5cea8"}},{"scope":["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],"settings":{"foreground":"#569cd6"}},{"scope":"support.function.git-rebase","settings":{"foreground":"#9cdcfe"}},{"scope":"constant.sha.git-rebase","settings":{"foreground":"#b5cea8"}},{"scope":["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],"settings":{"foreground":"#d4d4d4"}},{"scope":"variable.language","settings":{"foreground":"#569cd6"}},{"scope":["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],"settings":{"foreground":"#DCDCAA"}},{"scope":["support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],"settings":{"foreground":"#4EC9B0"}},{"scope":["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class","punctuation.separator.namespace.ruby"],"settings":{"foreground":"#4EC9B0"}},{"scope":["keyword.control","source.cpp keyword.operator.new","keyword.operator.delete","keyword.other.using","keyword.other.directive.using","keyword.other.operator","entity.name.operator"],"settings":{"foreground":"#C586C0"}},{"scope":["variable","meta.definition.variable.name","support.variable","entity.name.variable","constant.other.placeholder"],"settings":{"foreground":"#9CDCFE"}},{"scope":["variable.other.constant","variable.other.enummember"],"settings":{"foreground":"#4FC1FF"}},{"scope":["meta.object-literal.key"],"settings":{"foreground":"#9CDCFE"}},{"scope":["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],"settings":{"foreground":"#CE9178"}},{"scope":["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],"settings":{"foreground":"#CE9178"}},{"scope":["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],"settings":{"foreground":"#d16969"}},{"scope":["keyword.operator.or.regexp","keyword.control.anchor.regexp"],"settings":{"foreground":"#DCDCAA"}},{"scope":"keyword.operator.quantifier.regexp","settings":{"foreground":"#d7ba7d"}},{"scope":["constant.character","constant.other.option"],"settings":{"foreground":"#569cd6"}},{"scope":"constant.character.escape","settings":{"foreground":"#d7ba7d"}},{"scope":"entity.name.label","settings":{"foreground":"#C8C8C8"}}],"type":"dark"}')),D$e=Object.freeze(Object.defineProperty({__proto__:null,default:Jee},Symbol.toStringTag,{value:"Module"})),I$e=["editor theme","vscode theme","monaco theme","workbench colors"],LE=new Set,$w="dark-plus",cF=new WeakSet,uF=Jee,B$e={"editor.background":"#0B0C0E","editorGutter.background":"#0B0C0E","editorStickyScroll.background":"#0B0C0E","editorStickyScrollGutter.background":"#0B0C0E","minimap.background":"#0B0C0E","editor.lineHighlightBackground":"#151922","editorWidget.background":"#16181D","editorHoverWidget.background":"#16181D","editorWidget.border":"#363B44","editorHoverWidget.border":"#363B44","editorGroupHeader.tabsBackground":"#0B0C0E"},z$e={base:"vs-dark",inherit:!1,rules:[...Qee(uF.tokenColors??[]),...G$e()],colors:{...ete(uF.colors??{}),...B$e}};function F$e(){return I$e}function Zee(e){var r,n;(n=(r=e==null?void 0:e.editor)==null?void 0:r.defineTheme)==null||n.call(r,$w,z$e)}function H$e(e){!e||typeof e!="object"||cF.has(e)||(cF.add(e),Promise.all([nt(()=>import("./index-Dyv540Xj.js"),[],import.meta.url),nt(()=>import("./index-CJcdsvDp.js"),[],import.meta.url)]).then(async([{shikiToMonaco:r},{createHighlighter:n}])=>{var l,d,u;const i=e.languages,s=new Set(((l=i==null?void 0:i.getLanguages)==null?void 0:l.call(i).map(h=>h.id))??[]);for(const h of["javascript","typescript","json","css","html","markdown","python","yaml","diff"])s.has(h)||((d=i==null?void 0:i.register)==null||d.call(i,{id:h}),s.add(h));const o=await n({themes:["dark-plus"],langs:["javascript","typescript","jsx","tsx","json","css","html","markdown","python","yaml","diff"]});r(o,e),Zee(e);const a=e.editor;typeof document<"u"&&document.documentElement.dataset.monacoTheme===$w&&((u=a==null?void 0:a.setTheme)==null||u.call(a,$w))}).catch(r=>{console.error("Failed to initialize Shiki Monaco Dark Plus theme:",r)}))}function W$e(e){var a;const r=U$e(e.text),n=ete(r.colors??{}),i=Y$e(r,n),s=((a=r.name)==null?void 0:a.trim())||e.sourceLabel.trim()||"Imported Theme",o=`jait-vscode-${rDe(s)}-${e.id}`;return{id:e.id,name:s,sourceLabel:e.sourceLabel,importedAt:e.importedAt??new Date().toISOString(),colorMode:i,monacoThemeName:o,monacoThemeData:{base:i==="dark"?"vs-dark":"vs",inherit:!0,rules:Qee(r.tokenColors??[]),colors:n},cssVariables:K$e(n),rawColors:n,hasInclude:typeof r.include=="string"&&r.include.trim().length>0}}function U$e(e){const r=tDe(eDe(e)),n=JSON.parse(r);if(!n||typeof n!="object"||Array.isArray(n))throw new Error("Theme file must contain a JSON object.");return n}function V$e(e,r){var n;!r||!((n=e==null?void 0:e.editor)!=null&&n.defineTheme)||e.editor.defineTheme(r.monacoThemeName,r.monacoThemeData)}function q$e(e){if(typeof document>"u")return;const r=document.documentElement;r.classList.toggle("dark",e.colorMode==="dark"),r.dataset.monacoTheme=e.monacoThemeName;for(const n of LE)r.style.removeProperty(n);if(LE.clear(),!!e.theme)for(const[n,i]of Object.entries(e.theme.cssVariables))r.style.setProperty(n,i),LE.add(n)}function Qee(e){var n;const r=[];for(const i of e){const s=i.settings??{},o=X$e(i.scope);if(o.length===0)continue;const a=hF(s.foreground),l=hF(s.background),d=((n=s.fontStyle)==null?void 0:n.trim())||void 0;for(const u of o)r.push({token:u,foreground:a,background:l,fontStyle:d})}return r}function G$e(){return[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"F44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"comment",foreground:"6A9955"},{token:"constant",foreground:"569CD6"},{token:"number",foreground:"B5CEA8"},{token:"regexp",foreground:"D16969"},{token:"string",foreground:"CE9178"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.operator",foreground:"D4D4D4"},{token:"keyword.operator.new",foreground:"C586C0"},{token:"operator",foreground:"D4D4D4"},{token:"type",foreground:"4EC9B0"},{token:"type.identifier",foreground:"4EC9B0"},{token:"class",foreground:"4EC9B0"},{token:"interface",foreground:"4EC9B0"},{token:"enum",foreground:"4EC9B0"},{token:"namespace",foreground:"4EC9B0"},{token:"identifier",foreground:"9CDCFE"},{token:"identifier.function",foreground:"DCDCAA"},{token:"function",foreground:"DCDCAA"},{token:"member",foreground:"DCDCAA"},{token:"method",foreground:"DCDCAA"},{token:"property",foreground:"9CDCFE"},{token:"variable",foreground:"9CDCFE"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"parameter",foreground:"9CDCFE"},{token:"delimiter",foreground:"D4D4D4"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"}]}function K$e(e){const r={},n=oi(e,["editor.background","sideBar.background","panel.background"]),i=oi(e,["editor.foreground","foreground"]),s=oi(e,["sideBar.background","panel.background","editorWidget.background"]),o=oi(e,["panel.background","tab.inactiveBackground","editorGroupHeader.tabsBackground"]),a=oi(e,["list.hoverBackground","tab.activeBackground","editor.lineHighlightBackground"]),l=oi(e,["button.background","focusBorder","textLink.foreground"]),d=oi(e,["widget.border","panel.border","sideBar.border","contrastBorder"]);Ti(r,"--background",n),Ti(r,"--foreground",i),Ti(r,"--card",s),Ti(r,"--card-foreground",oi(e,["sideBar.foreground","foreground"])??i),Ti(r,"--popover",oi(e,["editorWidget.background","panel.background"])??s),Ti(r,"--popover-foreground",oi(e,["editorWidget.foreground","foreground"])??i),Ti(r,"--primary",l),Ti(r,"--primary-foreground",dF(l)),Ti(r,"--secondary",oi(e,["tab.inactiveBackground","panel.background"])??o),Ti(r,"--secondary-foreground",oi(e,["tab.inactiveForeground","foreground"])??i),Ti(r,"--muted",o),Ti(r,"--muted-foreground",oi(e,["descriptionForeground","input.placeholderForeground","disabledForeground"])),Ti(r,"--accent",a),Ti(r,"--accent-foreground",oi(e,["list.activeSelectionForeground","foreground"])??i),Ti(r,"--destructive",oi(e,["inputValidation.errorBackground","errorForeground","list.errorForeground"])),Ti(r,"--destructive-foreground",dF(oi(e,["inputValidation.errorBackground","errorForeground"]))),Ti(r,"--border",d),Ti(r,"--input",oi(e,["input.background","editorWidget.background","dropdown.background"])??d),Ti(r,"--ring",oi(e,["focusBorder","button.background","textLink.foreground"])??l),Ti(r,"--scrollbar-track",oi(e,["editor.background","sideBar.background","panel.background"])??n),Ti(r,"--scrollbar-thumb",oi(e,["scrollbarSlider.background","scrollbar.shadow"])),Ti(r,"--scrollbar-thumb-hover",oi(e,["scrollbarSlider.hoverBackground","scrollbarSlider.activeBackground","scrollbarSlider.background"])),Ti(r,"--toast-bg",oi(e,["notifications.background","editorWidget.background","panel.background"])??s,!0),Ti(r,"--toast-border",oi(e,["notifications.border","widget.border","panel.border"])??d,!0),Ti(r,"--toast-success-accent",oi(e,["testing.iconPassed","terminal.ansiGreen"])),Ti(r,"--toast-info-accent",oi(e,["textLink.foreground","focusBorder"])??l),Ti(r,"--toast-warning-accent",oi(e,["editorWarning.foreground","terminal.ansiYellow"])),Ti(r,"--toast-error-accent",oi(e,["editorError.foreground","terminal.ansiRed"]));const u=oi(e,["editorGroupHeader.tabsBackground","tab.inactiveBackground","sideBar.background"]);u&&(r["--tab-bg"]=u);const h=oi(e,["activityBarBadge.background","button.background","focusBorder"]),p=oi(e,["textLink.foreground","terminal.ansiBlue"]),g=oi(e,["editorWarning.foreground","terminal.ansiYellow"]),v=oi(e,["terminal.ansiMagenta","badge.background"]);return h&&(r["--ctx-system"]=h),p&&(r["--ctx-history"]=p),g&&(r["--ctx-tool-results"]=g),v&&(r["--ctx-tools"]=v),r}function Ti(e,r,n,i=!1){if(!n)return;const s=J$e(n,i);s&&(e[r]=s)}function dF(e){const r=U9(e);return r?(.2126*r.r+.7152*r.g+.0722*r.b)/255>.55?"0 0% 7%":"0 0% 100%":null}function Y$e(e,r){if(e.type==="light"||e.type==="hc-light")return"light";if(e.type==="dark"||e.type==="hc-dark")return"dark";const n=U9(r["editor.background"]??r["sideBar.background"]??"");return n&&(.2126*n.r+.7152*n.g+.0722*n.b)/255>.55?"light":"dark"}function ete(e){const r={};for(const[n,i]of Object.entries(e))typeof i=="string"&&i.trim()&&(r[n]=i.trim());return r}function X$e(e){return Array.isArray(e)?e.flatMap(r=>r.split(",")).map(r=>r.trim()).filter(Boolean):typeof e!="string"?[]:e.split(",").map(r=>r.trim()).filter(Boolean)}function hF(e){if(!e)return;const r=e.trim();if(r.startsWith("#"))return tte(r).slice(1)}function oi(e,r){for(const n of r){const i=e[n];if(typeof i=="string"&&i.trim())return i.trim()}return null}function J$e(e,r=!1){const n=U9(e);if(!n)return null;const i=n.r/255,s=n.g/255,o=n.b/255,a=Math.max(i,s,o),l=Math.min(i,s,o),d=a-l,u=(a+l)/2;let h=0;d!==0&&(a===i?h=(s-o)/d%6:a===s?h=(o-i)/d+2:h=(i-s)/d+4,h*=60),h<0&&(h+=360);const p=d===0?0:d/(1-Math.abs(2*u-1)),g=`${Math.round(h)} ${Math.round(p*100)}% ${Math.round(u*100)}%`;return r&&n.a<1?`${g} / ${Number(n.a.toFixed(3))}`:g}function U9(e){if(!e)return null;const r=e.trim();if(!r)return null;if(r.startsWith("#"))return Z$e(r);const n=r.match(/^rgba?\(([^)]+)\)$/i);if(!n)return null;const i=n[1].split(",").map(d=>d.trim());if(i.length<3)return null;const s=$E(i[0]),o=$E(i[1]),a=$E(i[2]),l=i[3]==null?1:Q$e(i[3]);return s==null||o==null||a==null||l==null?null:{r:s,g:o,b:a,a:l}}function Z$e(e){const r=tte(e).slice(1);return r.length===6?{r:Number.parseInt(r.slice(0,2),16),g:Number.parseInt(r.slice(2,4),16),b:Number.parseInt(r.slice(4,6),16),a:1}:r.length===8?{r:Number.parseInt(r.slice(0,2),16),g:Number.parseInt(r.slice(2,4),16),b:Number.parseInt(r.slice(4,6),16),a:Number.parseInt(r.slice(6,8),16)/255}:null}function $E(e){if(e.endsWith("%")){const n=Number.parseFloat(e.slice(0,-1));return Number.isFinite(n)?fF(Math.round(n/100*255)):null}const r=Number.parseFloat(e);return Number.isFinite(r)?fF(Math.round(r)):null}function Q$e(e){const r=Number.parseFloat(e);return Number.isFinite(r)?Math.max(0,Math.min(1,r)):null}function fF(e){return Math.max(0,Math.min(255,e))}function tte(e){const r=e.trim().slice(1);return r.length===3||r.length===4?`#${r.split("").map(n=>`${n}${n}`).join("").toLowerCase()}`:`#${r.toLowerCase()}`}function eDe(e){let r="",n=!1,i=!1,s=!1,o=!1;for(let a=0;a<e.length;a+=1){const l=e[a],d=e[a+1];if(i){l===`
|
|
925
|
+
`},lF=b$e(k$e)(Gee),C$e={config:w$e},j$e=function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return function(s){return n.reduceRight(function(o,a){return a(o)},s)}};function Kee(e,r){return Object.keys(r).forEach(function(n){r[n]instanceof Object&&e[n]&&Object.assign(r[n],Kee(e[n],r[n]))}),sF(sF({},e),r)}var N$e={type:"cancelation",msg:"operation is manually canceled"};function RE(e){var r=!1,n=new Promise(function(i,s){e.then(function(o){return r?s(N$e):i(o)}),e.catch(s)});return n.cancel=function(){return r=!0},n}var T$e=["monaco"],E$e=v$e.create({config:x$e,isInitialized:!1,resolve:null,reject:null,monaco:null}),Yee=e$e(E$e,2),nk=Yee[0],_N=Yee[1];function A$e(e){var r=C$e.config(e),n=r.monaco,i=ZLe(r,T$e);_N(function(s){return{config:Kee(s.config,i),monaco:n}})}function O$e(){var e=nk(function(r){var n=r.monaco,i=r.isInitialized,s=r.resolve;return{monaco:n,isInitialized:i,resolve:s}});if(!e.isInitialized){if(_N({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),RE(PE);if(window.monaco&&window.monaco.editor)return Xee(window.monaco),e.resolve(window.monaco),RE(PE);j$e(M$e,P$e)(L$e)}return RE(PE)}function M$e(e){return document.body.appendChild(e)}function R$e(e){var r=document.createElement("script");return e&&(r.src=e),r}function P$e(e){var r=nk(function(i){var s=i.config,o=i.reject;return{config:s,reject:o}}),n=R$e("".concat(r.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=r.reject,n}function L$e(){var e=nk(function(n){var i=n.config,s=n.resolve,o=n.reject;return{config:i,resolve:s,reject:o}}),r=window.require;r.config(e.config),r(["vs/editor/editor.main"],function(n){var i=n.m||n;Xee(i),e.resolve(i)},function(n){e.reject(n)})}function Xee(e){nk().monaco||_N({monaco:e})}function $$e(){return nk(function(e){var r=e.monaco;return r})}var PE=new Promise(function(e,r){return _N({resolve:e,reject:r})}),wN={config:A$e,init:O$e,__getMonacoInstance:$$e};const Jee=Object.freeze(JSON.parse('{"colors":{"actionBar.toggledBackground":"#383a49","activityBarBadge.background":"#007ACC","checkbox.border":"#6B6B6B","editor.background":"#1E1E1E","editor.foreground":"#D4D4D4","editor.inactiveSelectionBackground":"#3A3D41","editor.selectionHighlightBackground":"#ADD6FF26","editorIndentGuide.activeBackground1":"#707070","editorIndentGuide.background1":"#404040","input.placeholderForeground":"#A6A6A6","list.activeSelectionIconForeground":"#FFF","list.dropBackground":"#383B3D","menu.background":"#252526","menu.border":"#454545","menu.foreground":"#CCCCCC","menu.selectionBackground":"#0078d4","menu.separatorBackground":"#454545","ports.iconRunningProcessForeground":"#369432","sideBarSectionHeader.background":"#0000","sideBarSectionHeader.border":"#ccc3","sideBarTitle.foreground":"#BBBBBB","statusBarItem.remoteBackground":"#16825D","statusBarItem.remoteForeground":"#FFF","tab.lastPinnedBorder":"#ccc3","tab.selectedBackground":"#222222","tab.selectedForeground":"#ffffffa0","terminal.inactiveSelectionBackground":"#3A3D41","widget.border":"#303031"},"displayName":"Dark Plus","name":"dark-plus","semanticHighlighting":true,"semanticTokenColors":{"customLiteral":"#DCDCAA","newOperator":"#C586C0","numberLiteral":"#b5cea8","stringLiteral":"#ce9178"},"tokenColors":[{"scope":["meta.embedded","source.groovy.embedded","string meta.image.inline.markdown","variable.legacy.builtin.python"],"settings":{"foreground":"#D4D4D4"}},{"scope":"emphasis","settings":{"fontStyle":"italic"}},{"scope":"strong","settings":{"fontStyle":"bold"}},{"scope":"header","settings":{"foreground":"#000080"}},{"scope":"comment","settings":{"foreground":"#6A9955"}},{"scope":"constant.language","settings":{"foreground":"#569cd6"}},{"scope":["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],"settings":{"foreground":"#b5cea8"}},{"scope":"constant.regexp","settings":{"foreground":"#646695"}},{"scope":"entity.name.tag","settings":{"foreground":"#569cd6"}},{"scope":["entity.name.tag.css","entity.name.tag.less"],"settings":{"foreground":"#d7ba7d"}},{"scope":"entity.other.attribute-name","settings":{"foreground":"#9cdcfe"}},{"scope":["entity.other.attribute-name.class.css","source.css entity.other.attribute-name.class","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.parent.less","source.css entity.other.attribute-name.pseudo-class","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],"settings":{"foreground":"#d7ba7d"}},{"scope":"invalid","settings":{"foreground":"#f44747"}},{"scope":"markup.underline","settings":{"fontStyle":"underline"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#569cd6"}},{"scope":"markup.heading","settings":{"fontStyle":"bold","foreground":"#569cd6"}},{"scope":"markup.italic","settings":{"fontStyle":"italic"}},{"scope":"markup.strikethrough","settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inserted","settings":{"foreground":"#b5cea8"}},{"scope":"markup.deleted","settings":{"foreground":"#ce9178"}},{"scope":"markup.changed","settings":{"foreground":"#569cd6"}},{"scope":"punctuation.definition.quote.begin.markdown","settings":{"foreground":"#6A9955"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#6796e6"}},{"scope":"markup.inline.raw","settings":{"foreground":"#ce9178"}},{"scope":"punctuation.definition.tag","settings":{"foreground":"#808080"}},{"scope":["meta.preprocessor","entity.name.function.preprocessor"],"settings":{"foreground":"#569cd6"}},{"scope":"meta.preprocessor.string","settings":{"foreground":"#ce9178"}},{"scope":"meta.preprocessor.numeric","settings":{"foreground":"#b5cea8"}},{"scope":"meta.structure.dictionary.key.python","settings":{"foreground":"#9cdcfe"}},{"scope":"meta.diff.header","settings":{"foreground":"#569cd6"}},{"scope":"storage","settings":{"foreground":"#569cd6"}},{"scope":"storage.type","settings":{"foreground":"#569cd6"}},{"scope":["storage.modifier","keyword.operator.noexcept"],"settings":{"foreground":"#569cd6"}},{"scope":["string","meta.embedded.assembly"],"settings":{"foreground":"#ce9178"}},{"scope":"string.tag","settings":{"foreground":"#ce9178"}},{"scope":"string.value","settings":{"foreground":"#ce9178"}},{"scope":"string.regexp","settings":{"foreground":"#d16969"}},{"scope":["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],"settings":{"foreground":"#569cd6"}},{"scope":["meta.template.expression"],"settings":{"foreground":"#d4d4d4"}},{"scope":["support.type.vendored.property-name","support.type.property-name","source.css variable","source.coffee.embedded"],"settings":{"foreground":"#9cdcfe"}},{"scope":"keyword","settings":{"foreground":"#569cd6"}},{"scope":"keyword.control","settings":{"foreground":"#569cd6"}},{"scope":"keyword.operator","settings":{"foreground":"#d4d4d4"}},{"scope":["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],"settings":{"foreground":"#569cd6"}},{"scope":"keyword.other.unit","settings":{"foreground":"#b5cea8"}},{"scope":["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],"settings":{"foreground":"#569cd6"}},{"scope":"support.function.git-rebase","settings":{"foreground":"#9cdcfe"}},{"scope":"constant.sha.git-rebase","settings":{"foreground":"#b5cea8"}},{"scope":["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],"settings":{"foreground":"#d4d4d4"}},{"scope":"variable.language","settings":{"foreground":"#569cd6"}},{"scope":["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],"settings":{"foreground":"#DCDCAA"}},{"scope":["support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],"settings":{"foreground":"#4EC9B0"}},{"scope":["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class","punctuation.separator.namespace.ruby"],"settings":{"foreground":"#4EC9B0"}},{"scope":["keyword.control","source.cpp keyword.operator.new","keyword.operator.delete","keyword.other.using","keyword.other.directive.using","keyword.other.operator","entity.name.operator"],"settings":{"foreground":"#C586C0"}},{"scope":["variable","meta.definition.variable.name","support.variable","entity.name.variable","constant.other.placeholder"],"settings":{"foreground":"#9CDCFE"}},{"scope":["variable.other.constant","variable.other.enummember"],"settings":{"foreground":"#4FC1FF"}},{"scope":["meta.object-literal.key"],"settings":{"foreground":"#9CDCFE"}},{"scope":["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],"settings":{"foreground":"#CE9178"}},{"scope":["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],"settings":{"foreground":"#CE9178"}},{"scope":["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],"settings":{"foreground":"#d16969"}},{"scope":["keyword.operator.or.regexp","keyword.control.anchor.regexp"],"settings":{"foreground":"#DCDCAA"}},{"scope":"keyword.operator.quantifier.regexp","settings":{"foreground":"#d7ba7d"}},{"scope":["constant.character","constant.other.option"],"settings":{"foreground":"#569cd6"}},{"scope":"constant.character.escape","settings":{"foreground":"#d7ba7d"}},{"scope":"entity.name.label","settings":{"foreground":"#C8C8C8"}}],"type":"dark"}')),D$e=Object.freeze(Object.defineProperty({__proto__:null,default:Jee},Symbol.toStringTag,{value:"Module"})),I$e=["editor theme","vscode theme","monaco theme","workbench colors"],LE=new Set,$w="dark-plus",cF=new WeakSet,uF=Jee,B$e={"editor.background":"#0B0C0E","editorGutter.background":"#0B0C0E","editorStickyScroll.background":"#0B0C0E","editorStickyScrollGutter.background":"#0B0C0E","minimap.background":"#0B0C0E","editor.lineHighlightBackground":"#151922","editorWidget.background":"#16181D","editorHoverWidget.background":"#16181D","editorWidget.border":"#363B44","editorHoverWidget.border":"#363B44","editorGroupHeader.tabsBackground":"#0B0C0E"},z$e={base:"vs-dark",inherit:!1,rules:[...Qee(uF.tokenColors??[]),...G$e()],colors:{...ete(uF.colors??{}),...B$e}};function F$e(){return I$e}function Zee(e){var r,n;(n=(r=e==null?void 0:e.editor)==null?void 0:r.defineTheme)==null||n.call(r,$w,z$e)}function H$e(e){!e||typeof e!="object"||cF.has(e)||(cF.add(e),Promise.all([nt(()=>import("./index-CZ9J2iaw.js"),[],import.meta.url),nt(()=>import("./index-B_Mskjqg.js"),[],import.meta.url)]).then(async([{shikiToMonaco:r},{createHighlighter:n}])=>{var l,d,u;const i=e.languages,s=new Set(((l=i==null?void 0:i.getLanguages)==null?void 0:l.call(i).map(h=>h.id))??[]);for(const h of["javascript","typescript","json","css","html","markdown","python","yaml","diff"])s.has(h)||((d=i==null?void 0:i.register)==null||d.call(i,{id:h}),s.add(h));const o=await n({themes:["dark-plus"],langs:["javascript","typescript","jsx","tsx","json","css","html","markdown","python","yaml","diff"]});r(o,e),Zee(e);const a=e.editor;typeof document<"u"&&document.documentElement.dataset.monacoTheme===$w&&((u=a==null?void 0:a.setTheme)==null||u.call(a,$w))}).catch(r=>{console.error("Failed to initialize Shiki Monaco Dark Plus theme:",r)}))}function W$e(e){var a;const r=U$e(e.text),n=ete(r.colors??{}),i=Y$e(r,n),s=((a=r.name)==null?void 0:a.trim())||e.sourceLabel.trim()||"Imported Theme",o=`jait-vscode-${rDe(s)}-${e.id}`;return{id:e.id,name:s,sourceLabel:e.sourceLabel,importedAt:e.importedAt??new Date().toISOString(),colorMode:i,monacoThemeName:o,monacoThemeData:{base:i==="dark"?"vs-dark":"vs",inherit:!0,rules:Qee(r.tokenColors??[]),colors:n},cssVariables:K$e(n),rawColors:n,hasInclude:typeof r.include=="string"&&r.include.trim().length>0}}function U$e(e){const r=tDe(eDe(e)),n=JSON.parse(r);if(!n||typeof n!="object"||Array.isArray(n))throw new Error("Theme file must contain a JSON object.");return n}function V$e(e,r){var n;!r||!((n=e==null?void 0:e.editor)!=null&&n.defineTheme)||e.editor.defineTheme(r.monacoThemeName,r.monacoThemeData)}function q$e(e){if(typeof document>"u")return;const r=document.documentElement;r.classList.toggle("dark",e.colorMode==="dark"),r.dataset.monacoTheme=e.monacoThemeName;for(const n of LE)r.style.removeProperty(n);if(LE.clear(),!!e.theme)for(const[n,i]of Object.entries(e.theme.cssVariables))r.style.setProperty(n,i),LE.add(n)}function Qee(e){var n;const r=[];for(const i of e){const s=i.settings??{},o=X$e(i.scope);if(o.length===0)continue;const a=hF(s.foreground),l=hF(s.background),d=((n=s.fontStyle)==null?void 0:n.trim())||void 0;for(const u of o)r.push({token:u,foreground:a,background:l,fontStyle:d})}return r}function G$e(){return[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"F44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"comment",foreground:"6A9955"},{token:"constant",foreground:"569CD6"},{token:"number",foreground:"B5CEA8"},{token:"regexp",foreground:"D16969"},{token:"string",foreground:"CE9178"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.operator",foreground:"D4D4D4"},{token:"keyword.operator.new",foreground:"C586C0"},{token:"operator",foreground:"D4D4D4"},{token:"type",foreground:"4EC9B0"},{token:"type.identifier",foreground:"4EC9B0"},{token:"class",foreground:"4EC9B0"},{token:"interface",foreground:"4EC9B0"},{token:"enum",foreground:"4EC9B0"},{token:"namespace",foreground:"4EC9B0"},{token:"identifier",foreground:"9CDCFE"},{token:"identifier.function",foreground:"DCDCAA"},{token:"function",foreground:"DCDCAA"},{token:"member",foreground:"DCDCAA"},{token:"method",foreground:"DCDCAA"},{token:"property",foreground:"9CDCFE"},{token:"variable",foreground:"9CDCFE"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"parameter",foreground:"9CDCFE"},{token:"delimiter",foreground:"D4D4D4"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"}]}function K$e(e){const r={},n=oi(e,["editor.background","sideBar.background","panel.background"]),i=oi(e,["editor.foreground","foreground"]),s=oi(e,["sideBar.background","panel.background","editorWidget.background"]),o=oi(e,["panel.background","tab.inactiveBackground","editorGroupHeader.tabsBackground"]),a=oi(e,["list.hoverBackground","tab.activeBackground","editor.lineHighlightBackground"]),l=oi(e,["button.background","focusBorder","textLink.foreground"]),d=oi(e,["widget.border","panel.border","sideBar.border","contrastBorder"]);Ti(r,"--background",n),Ti(r,"--foreground",i),Ti(r,"--card",s),Ti(r,"--card-foreground",oi(e,["sideBar.foreground","foreground"])??i),Ti(r,"--popover",oi(e,["editorWidget.background","panel.background"])??s),Ti(r,"--popover-foreground",oi(e,["editorWidget.foreground","foreground"])??i),Ti(r,"--primary",l),Ti(r,"--primary-foreground",dF(l)),Ti(r,"--secondary",oi(e,["tab.inactiveBackground","panel.background"])??o),Ti(r,"--secondary-foreground",oi(e,["tab.inactiveForeground","foreground"])??i),Ti(r,"--muted",o),Ti(r,"--muted-foreground",oi(e,["descriptionForeground","input.placeholderForeground","disabledForeground"])),Ti(r,"--accent",a),Ti(r,"--accent-foreground",oi(e,["list.activeSelectionForeground","foreground"])??i),Ti(r,"--destructive",oi(e,["inputValidation.errorBackground","errorForeground","list.errorForeground"])),Ti(r,"--destructive-foreground",dF(oi(e,["inputValidation.errorBackground","errorForeground"]))),Ti(r,"--border",d),Ti(r,"--input",oi(e,["input.background","editorWidget.background","dropdown.background"])??d),Ti(r,"--ring",oi(e,["focusBorder","button.background","textLink.foreground"])??l),Ti(r,"--scrollbar-track",oi(e,["editor.background","sideBar.background","panel.background"])??n),Ti(r,"--scrollbar-thumb",oi(e,["scrollbarSlider.background","scrollbar.shadow"])),Ti(r,"--scrollbar-thumb-hover",oi(e,["scrollbarSlider.hoverBackground","scrollbarSlider.activeBackground","scrollbarSlider.background"])),Ti(r,"--toast-bg",oi(e,["notifications.background","editorWidget.background","panel.background"])??s,!0),Ti(r,"--toast-border",oi(e,["notifications.border","widget.border","panel.border"])??d,!0),Ti(r,"--toast-success-accent",oi(e,["testing.iconPassed","terminal.ansiGreen"])),Ti(r,"--toast-info-accent",oi(e,["textLink.foreground","focusBorder"])??l),Ti(r,"--toast-warning-accent",oi(e,["editorWarning.foreground","terminal.ansiYellow"])),Ti(r,"--toast-error-accent",oi(e,["editorError.foreground","terminal.ansiRed"]));const u=oi(e,["editorGroupHeader.tabsBackground","tab.inactiveBackground","sideBar.background"]);u&&(r["--tab-bg"]=u);const h=oi(e,["activityBarBadge.background","button.background","focusBorder"]),p=oi(e,["textLink.foreground","terminal.ansiBlue"]),g=oi(e,["editorWarning.foreground","terminal.ansiYellow"]),v=oi(e,["terminal.ansiMagenta","badge.background"]);return h&&(r["--ctx-system"]=h),p&&(r["--ctx-history"]=p),g&&(r["--ctx-tool-results"]=g),v&&(r["--ctx-tools"]=v),r}function Ti(e,r,n,i=!1){if(!n)return;const s=J$e(n,i);s&&(e[r]=s)}function dF(e){const r=U9(e);return r?(.2126*r.r+.7152*r.g+.0722*r.b)/255>.55?"0 0% 7%":"0 0% 100%":null}function Y$e(e,r){if(e.type==="light"||e.type==="hc-light")return"light";if(e.type==="dark"||e.type==="hc-dark")return"dark";const n=U9(r["editor.background"]??r["sideBar.background"]??"");return n&&(.2126*n.r+.7152*n.g+.0722*n.b)/255>.55?"light":"dark"}function ete(e){const r={};for(const[n,i]of Object.entries(e))typeof i=="string"&&i.trim()&&(r[n]=i.trim());return r}function X$e(e){return Array.isArray(e)?e.flatMap(r=>r.split(",")).map(r=>r.trim()).filter(Boolean):typeof e!="string"?[]:e.split(",").map(r=>r.trim()).filter(Boolean)}function hF(e){if(!e)return;const r=e.trim();if(r.startsWith("#"))return tte(r).slice(1)}function oi(e,r){for(const n of r){const i=e[n];if(typeof i=="string"&&i.trim())return i.trim()}return null}function J$e(e,r=!1){const n=U9(e);if(!n)return null;const i=n.r/255,s=n.g/255,o=n.b/255,a=Math.max(i,s,o),l=Math.min(i,s,o),d=a-l,u=(a+l)/2;let h=0;d!==0&&(a===i?h=(s-o)/d%6:a===s?h=(o-i)/d+2:h=(i-s)/d+4,h*=60),h<0&&(h+=360);const p=d===0?0:d/(1-Math.abs(2*u-1)),g=`${Math.round(h)} ${Math.round(p*100)}% ${Math.round(u*100)}%`;return r&&n.a<1?`${g} / ${Number(n.a.toFixed(3))}`:g}function U9(e){if(!e)return null;const r=e.trim();if(!r)return null;if(r.startsWith("#"))return Z$e(r);const n=r.match(/^rgba?\(([^)]+)\)$/i);if(!n)return null;const i=n[1].split(",").map(d=>d.trim());if(i.length<3)return null;const s=$E(i[0]),o=$E(i[1]),a=$E(i[2]),l=i[3]==null?1:Q$e(i[3]);return s==null||o==null||a==null||l==null?null:{r:s,g:o,b:a,a:l}}function Z$e(e){const r=tte(e).slice(1);return r.length===6?{r:Number.parseInt(r.slice(0,2),16),g:Number.parseInt(r.slice(2,4),16),b:Number.parseInt(r.slice(4,6),16),a:1}:r.length===8?{r:Number.parseInt(r.slice(0,2),16),g:Number.parseInt(r.slice(2,4),16),b:Number.parseInt(r.slice(4,6),16),a:Number.parseInt(r.slice(6,8),16)/255}:null}function $E(e){if(e.endsWith("%")){const n=Number.parseFloat(e.slice(0,-1));return Number.isFinite(n)?fF(Math.round(n/100*255)):null}const r=Number.parseFloat(e);return Number.isFinite(r)?fF(Math.round(r)):null}function Q$e(e){const r=Number.parseFloat(e);return Number.isFinite(r)?Math.max(0,Math.min(1,r)):null}function fF(e){return Math.max(0,Math.min(255,e))}function tte(e){const r=e.trim().slice(1);return r.length===3||r.length===4?`#${r.split("").map(n=>`${n}${n}`).join("").toLowerCase()}`:`#${r.toLowerCase()}`}function eDe(e){let r="",n=!1,i=!1,s=!1,o=!1;for(let a=0;a<e.length;a+=1){const l=e[a],d=e[a+1];if(i){l===`
|
|
926
926
|
`&&(i=!1,r+=l);continue}if(s){l==="*"&&d==="/"&&(s=!1,a+=1);continue}if(n){r+=l,o?o=!1:l==="\\"?o=!0:l==='"'&&(n=!1);continue}if(l==='"'){n=!0,r+=l;continue}if(l==="/"&&d==="/"){i=!0,a+=1;continue}if(l==="/"&&d==="*"){s=!0,a+=1;continue}r+=l}return r}function tDe(e){return e.replace(/,\s*([}\]])/g,"$1")}function rDe(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40)||"theme"}function pF(){if(typeof document>"u")return"vs";const e=document.documentElement;return e.dataset.monacoTheme??(e.classList.contains("dark")?$w:"vs")}function ik(){const[e,r]=y.useState(pF);return y.useEffect(()=>{if(typeof document>"u")return;const n=document.documentElement,i=()=>r(pF());i();const s=new MutationObserver(i);return s.observe(n,{attributes:!0,attributeFilter:["class","data-monaco-theme"]}),()=>s.disconnect()},[]),e}const V9="jait:vscode-theme-store",o5=new Set;let Qd=nte(),mF=!1;function rte(){if(typeof window>"u")return null;try{return window.localStorage}catch{return null}}function nte(){const e=rte();if(!e)return{importedThemes:[],activeThemeId:null};let r=null;try{r=e.getItem(V9)}catch{return{importedThemes:[],activeThemeId:null}}if(!r)return{importedThemes:[],activeThemeId:null};try{const n=JSON.parse(r),i=Array.isArray(n.importedThemes)?n.importedThemes.filter(o=>!!(o&&typeof o.id=="string"&&typeof o.monacoThemeName=="string")):[],s=typeof n.activeThemeId=="string"?n.activeThemeId:null;return{importedThemes:i,activeThemeId:i.some(o=>o.id===s)?s:null}}catch{return{importedThemes:[],activeThemeId:null}}}function q9(e){Qd=e;const r=rte();if(r)try{r.setItem(V9,JSON.stringify(e))}catch{}for(const n of o5)n()}function nDe(e){return!mF&&typeof window<"u"&&(mF=!0,window.addEventListener("storage",r=>{if(r.key===V9){Qd=nte();for(const n of o5)n()}})),o5.add(e),()=>o5.delete(e)}function gF(){return Qd}function ite(){const e=y.useSyncExternalStore(nDe,gF,gF);return{...e,activeTheme:e.importedThemes.find(r=>r.id===e.activeThemeId)??null}}function ste(){return Qd.importedThemes.find(e=>e.id===Qd.activeThemeId)??null}function iDe(e,r){const n=`${Date.now().toString(36)}-${aDe(e+r)}`,i=W$e({id:n,sourceLabel:e,text:r});return q9({importedThemes:[...Qd.importedThemes.filter(s=>s.id!==n),i],activeThemeId:n}),i}function gj(e){q9({...Qd,activeThemeId:e&&Qd.importedThemes.some(r=>r.id===e)?e:null})}function sDe(e){q9({importedThemes:Qd.importedThemes.filter(r=>r.id!==e),activeThemeId:Qd.activeThemeId===e?null:Qd.activeThemeId})}function oDe(e){Zee(e);const r=ste();r?V$e(e,r):H$e(e)}function fc(e,r){var n,i;oDe(e),r&&((i=(n=e==null?void 0:e.editor)==null?void 0:n.setTheme)==null||i.call(n,r))}function aDe(e){let r=0;for(let n=0;n<e.length;n+=1)r=(r<<5)-r+e.charCodeAt(n)|0;return Math.abs(r).toString(36)}function k1(e,r){return Math.max(1,e||r||1)}function Dw({original:e,modified:r,language:n,modelKey:i,className:s,editorClassName:o,renderSideBySide:a=!1,emptyMessage:l="Files are identical.",options:d}){const u=y.useRef(null),h=y.useRef(null),p=y.useRef(null),g=y.useRef(null),v=y.useRef({original:null,modified:null}),[b,_]=y.useState(!1),[w,S]=y.useState([]),[C,j]=y.useState(0),E=ik(),A=y.useRef(E);y.useEffect(()=>{A.current=E},[E]);const N=y.useMemo(()=>`inmemory://jait-diff/${encodeURIComponent(i??`${n}:${e.length}:${r.length}`)}`,[n,i,r.length,e.length]),P=y.useMemo(()=>({readOnly:!0,renderSideBySide:a,minimap:{enabled:!1},"semanticHighlighting.enabled":!0,fontSize:13,automaticLayout:!0,scrollBeyondLastLine:!1,renderOverviewRuler:!0,ignoreTrimWhitespace:!1,...d}),[d,a]),H=y.useCallback(()=>{var D;const B=h.current;if(!B)return;const W=((D=B.getLineChanges)==null?void 0:D.call(B))??[];S(W.map(O=>({originalStartLineNumber:O.originalStartLineNumber,originalEndLineNumber:O.originalEndLineNumber,modifiedStartLineNumber:O.modifiedStartLineNumber,modifiedEndLineNumber:O.modifiedEndLineNumber})))},[]);y.useEffect(()=>{let B=!1;const W=wN.init();return W.then(D=>{if(B||!u.current)return;p.current=D,fc(D,A.current);const O=D.editor.createDiffEditor(u.current,{automaticLayout:!0,...P});h.current=O,g.current=O.onDidUpdateDiff(()=>H()),_(!0),H()}).catch(D=>{!B&&(D==null?void 0:D.type)!=="cancelation"&&console.error("Monaco initialization: error:",D)}),()=>{var I,R,$,U,Y,z;B=!0,(I=g.current)==null||I.dispose(),g.current=null;const D=h.current,O=v.current;try{D==null||D.setModel(null)}catch{}(R=D==null?void 0:D.dispose)==null||R.call(D),(U=($=O.original)==null?void 0:$.dispose)==null||U.call($),(z=(Y=O.modified)==null?void 0:Y.dispose)==null||z.call(Y),v.current={original:null,modified:null},h.current=null,p.current=null,_(!1),W.cancel()}},[H]),y.useEffect(()=>{j(0)},[e,r,n]),y.useEffect(()=>{var U,Y;const B=h.current,W=p.current;if(!b||!B||!W)return;const D=v.current,O=W.Uri.parse(`${N}.original`),I=W.Uri.parse(`${N}.modified`);(U=W.editor.getModel(O))==null||U.dispose(),(Y=W.editor.getModel(I))==null||Y.dispose();const R=W.editor.createModel(e,n,O),$=W.editor.createModel(r,n,I);return B.setModel({original:R,modified:$}),v.current={original:R,modified:$},H(),()=>{var z,V,Q,q;try{B.setModel(null)}catch{}(V=(z=D.original)==null?void 0:z.dispose)==null||V.call(z),(q=(Q=D.modified)==null?void 0:Q.dispose)==null||q.call(Q),R.dispose(),$.dispose(),(v.current.original===R||v.current.modified===$)&&(v.current={original:null,modified:null})}},[b,n,N,r,e,H]),y.useEffect(()=>{const B=p.current;B&&fc(B,E)},[E]),y.useEffect(()=>{var B,W;(W=(B=h.current)==null?void 0:B.updateOptions)==null||W.call(B,P)},[P]),y.useEffect(()=>{w.length!==0&&j(B=>Math.min(B,w.length-1))},[w]),y.useEffect(()=>{const B=h.current;if(!B||w.length===0)return;const W=w[C];if(!W)return;const D=B.getModifiedEditor(),O=B.getOriginalEditor();try{W.modifiedStartLineNumber>0||W.modifiedEndLineNumber>0?D.revealLineInCenter(k1(W.modifiedStartLineNumber,W.modifiedEndLineNumber)):O.revealLineInCenter(k1(W.originalStartLineNumber,W.originalEndLineNumber))}catch{}},[C,w]),y.useEffect(()=>{const B=h.current,W=p.current;if(!B||!W||w.length===0)return;const D=w[C];if(!D)return;const O=[];(D.originalStartLineNumber>0||D.originalEndLineNumber>0)&&O.push({editor:B.getOriginalEditor(),range:new W.Range(k1(D.originalStartLineNumber,D.originalEndLineNumber),1,k1(D.originalEndLineNumber,D.originalStartLineNumber),1)}),(D.modifiedStartLineNumber>0||D.modifiedEndLineNumber>0)&&O.push({editor:B.getModifiedEditor(),range:new W.Range(k1(D.modifiedStartLineNumber,D.modifiedEndLineNumber),1,k1(D.modifiedEndLineNumber,D.modifiedStartLineNumber),1)});const I=O.map(({editor:R,range:$})=>R.deltaDecorations([],[{range:$,options:{isWholeLine:!0,className:"diff-change-active"}}]));return()=>{var R;for(let $=0;$<O.length;$++)try{(R=O[$])==null||R.editor.deltaDecorations(I[$]??[],[])}catch{}}},[C,w]);const K=y.useCallback(()=>{j(B=>Math.max(B-1,0))},[]),F=y.useCallback(()=>{j(B=>Math.min(B+1,w.length-1))},[w.length]);return c.jsxs("div",{className:Ae("relative min-h-0",s),children:[c.jsx("div",{className:Ae("h-full min-h-0",o),children:c.jsx("div",{ref:u,className:"h-full min-h-0"})}),!b&&c.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-sm text-muted-foreground",children:"Loading diff..."}),w.length>1&&c.jsxs("div",{className:"absolute right-3 top-1/2 z-10 flex -translate-y-1/2 flex-col gap-1.5",children:[c.jsx(_e,{size:"sm",variant:"secondary",className:"h-9 w-9 rounded-full border bg-background/90 p-0 shadow-lg backdrop-blur-sm hover:bg-background",onClick:K,disabled:C===0,title:"Previous change",children:c.jsx(pR,{className:"h-5 w-5"})}),c.jsxs("span",{className:"text-center font-medium tabular-nums text-2xs text-muted-foreground",children:[C+1,"/",w.length]}),c.jsx(_e,{size:"sm",variant:"secondary",className:"h-9 w-9 rounded-full border bg-background/90 p-0 shadow-lg backdrop-blur-sm hover:bg-background",onClick:F,disabled:C===w.length-1,title:"Next change",children:c.jsx(Ml,{className:"h-5 w-5"})})]}),w.length===0&&e===r&&b&&c.jsx("div",{className:"pointer-events-none absolute inset-x-3 bottom-3 rounded-md border bg-background/90 px-3 py-2 text-center text-xs text-muted-foreground shadow-sm",children:l}),c.jsx("style",{children:`
|
|
927
927
|
.diff-change-active { outline: 1px solid rgba(99, 102, 241, 0.5); outline-offset: -1px; }
|
|
928
928
|
`})]})}var lDe={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},DE=lDe,cDe={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},uDe=cDe;function dDe({children:e}){return zt.createElement("div",{style:uDe.container},e)}var hDe=dDe,fDe=hDe;function pDe({width:e,height:r,isEditorReady:n,loading:i,_ref:s,className:o,wrapperProps:a}){return zt.createElement("section",{style:{...DE.wrapper,width:e,height:r},...a},!n&&zt.createElement(fDe,null,i),zt.createElement("div",{ref:s,style:{...DE.fullWidth,...!n&&DE.hide},className:o}))}var mDe=pDe,ote=y.memo(mDe);function gDe(e){y.useEffect(e,[])}var ate=gDe;function yDe(e,r,n=!0){let i=y.useRef(!0);y.useEffect(i.current||!n?()=>{i.current=!1}:e,r)}var Yc=yDe;function i2(){}function G1(e,r,n,i){return vDe(e,i)||xDe(e,r,n,i)}function vDe(e,r){return e.editor.getModel(lte(e,r))}function xDe(e,r,n,i){return e.editor.createModel(r,n,i?lte(e,i):void 0)}function lte(e,r){return e.Uri.parse(r)}function bDe({original:e,modified:r,language:n,originalLanguage:i,modifiedLanguage:s,originalModelPath:o,modifiedModelPath:a,keepCurrentOriginalModel:l=!1,keepCurrentModifiedModel:d=!1,theme:u="light",loading:h="Loading...",options:p={},height:g="100%",width:v="100%",className:b,wrapperProps:_={},beforeMount:w=i2,onMount:S=i2}){let[C,j]=y.useState(!1),[E,A]=y.useState(!0),N=y.useRef(null),P=y.useRef(null),H=y.useRef(null),K=y.useRef(S),F=y.useRef(w),B=y.useRef(!1);ate(()=>{let I=wN.init();return I.then(R=>(P.current=R)&&A(!1)).catch(R=>(R==null?void 0:R.type)!=="cancelation"&&console.error("Monaco initialization: error:",R)),()=>N.current?O():I.cancel()}),Yc(()=>{if(N.current&&P.current){let I=N.current.getOriginalEditor(),R=G1(P.current,e||"",i||n||"text",o||"");R!==I.getModel()&&I.setModel(R)}},[o],C),Yc(()=>{if(N.current&&P.current){let I=N.current.getModifiedEditor(),R=G1(P.current,r||"",s||n||"text",a||"");R!==I.getModel()&&I.setModel(R)}},[a],C),Yc(()=>{let I=N.current.getModifiedEditor();I.getOption(P.current.editor.EditorOption.readOnly)?I.setValue(r||""):r!==I.getValue()&&(I.executeEdits("",[{range:I.getModel().getFullModelRange(),text:r||"",forceMoveMarkers:!0}]),I.pushUndoStop())},[r],C),Yc(()=>{var I,R;(R=(I=N.current)==null?void 0:I.getModel())==null||R.original.setValue(e||"")},[e],C),Yc(()=>{let{original:I,modified:R}=N.current.getModel();P.current.editor.setModelLanguage(I,i||n||"text"),P.current.editor.setModelLanguage(R,s||n||"text")},[n,i,s],C),Yc(()=>{var I;(I=P.current)==null||I.editor.setTheme(u)},[u],C),Yc(()=>{var I;(I=N.current)==null||I.updateOptions(p)},[p],C);let W=y.useCallback(()=>{var $;if(!P.current)return;F.current(P.current);let I=G1(P.current,e||"",i||n||"text",o||""),R=G1(P.current,r||"",s||n||"text",a||"");($=N.current)==null||$.setModel({original:I,modified:R})},[n,r,s,e,i,o,a]),D=y.useCallback(()=>{var I;!B.current&&H.current&&(N.current=P.current.editor.createDiffEditor(H.current,{automaticLayout:!0,...p}),W(),(I=P.current)==null||I.editor.setTheme(u),j(!0),B.current=!0)},[p,u,W]);y.useEffect(()=>{C&&K.current(N.current,P.current)},[C]),y.useEffect(()=>{!E&&!C&&D()},[E,C,D]);function O(){var R,$,U,Y;let I=(R=N.current)==null?void 0:R.getModel();l||(($=I==null?void 0:I.original)==null||$.dispose()),d||((U=I==null?void 0:I.modified)==null||U.dispose()),(Y=N.current)==null||Y.dispose()}return zt.createElement(ote,{width:v,height:g,isEditorReady:C,loading:h,_ref:H,className:b,wrapperProps:_})}var _De=bDe,wDe=y.memo(_De);function SDe(e){let r=y.useRef();return y.useEffect(()=>{r.current=e},[e]),r.current}var kDe=SDe,JC=new Map;function CDe({defaultValue:e,defaultLanguage:r,defaultPath:n,value:i,language:s,path:o,theme:a="light",line:l,loading:d="Loading...",options:u={},overrideServices:h={},saveViewState:p=!0,keepCurrentModel:g=!1,width:v="100%",height:b="100%",className:_,wrapperProps:w={},beforeMount:S=i2,onMount:C=i2,onChange:j,onValidate:E=i2}){let[A,N]=y.useState(!1),[P,H]=y.useState(!0),K=y.useRef(null),F=y.useRef(null),B=y.useRef(null),W=y.useRef(C),D=y.useRef(S),O=y.useRef(),I=y.useRef(i),R=kDe(o),$=y.useRef(!1),U=y.useRef(!1);ate(()=>{let V=wN.init();return V.then(Q=>(K.current=Q)&&H(!1)).catch(Q=>(Q==null?void 0:Q.type)!=="cancelation"&&console.error("Monaco initialization: error:",Q)),()=>F.current?z():V.cancel()}),Yc(()=>{var Q,q,re,ee;let V=G1(K.current,e||i||"",r||s||"",o||n||"");V!==((Q=F.current)==null?void 0:Q.getModel())&&(p&&JC.set(R,(q=F.current)==null?void 0:q.saveViewState()),(re=F.current)==null||re.setModel(V),p&&((ee=F.current)==null||ee.restoreViewState(JC.get(o))))},[o],A),Yc(()=>{var V;(V=F.current)==null||V.updateOptions(u)},[u],A),Yc(()=>{!F.current||i===void 0||(F.current.getOption(K.current.editor.EditorOption.readOnly)?F.current.setValue(i):i!==F.current.getValue()&&(U.current=!0,F.current.executeEdits("",[{range:F.current.getModel().getFullModelRange(),text:i,forceMoveMarkers:!0}]),F.current.pushUndoStop(),U.current=!1))},[i],A),Yc(()=>{var Q,q;let V=(Q=F.current)==null?void 0:Q.getModel();V&&s&&((q=K.current)==null||q.editor.setModelLanguage(V,s))},[s],A),Yc(()=>{var V;l!==void 0&&((V=F.current)==null||V.revealLine(l))},[l],A),Yc(()=>{var V;(V=K.current)==null||V.editor.setTheme(a)},[a],A);let Y=y.useCallback(()=>{var V;if(!(!B.current||!K.current)&&!$.current){D.current(K.current);let Q=o||n,q=G1(K.current,i||e||"",r||s||"",Q||"");F.current=(V=K.current)==null?void 0:V.editor.create(B.current,{model:q,automaticLayout:!0,...u},h),p&&F.current.restoreViewState(JC.get(Q)),K.current.editor.setTheme(a),l!==void 0&&F.current.revealLine(l),N(!0),$.current=!0}},[e,r,n,i,s,o,u,h,p,a,l]);y.useEffect(()=>{A&&W.current(F.current,K.current)},[A]),y.useEffect(()=>{!P&&!A&&Y()},[P,A,Y]),I.current=i,y.useEffect(()=>{var V,Q;A&&j&&((V=O.current)==null||V.dispose(),O.current=(Q=F.current)==null?void 0:Q.onDidChangeModelContent(q=>{U.current||j(F.current.getValue(),q)}))},[A,j]),y.useEffect(()=>{if(A){let V=K.current.editor.onDidChangeMarkers(Q=>{var re;let q=(re=F.current.getModel())==null?void 0:re.uri;if(q&&Q.find(ee=>ee.path===q.path)){let ee=K.current.editor.getModelMarkers({resource:q});E==null||E(ee)}});return()=>{V==null||V.dispose()}}return()=>{}},[A,E]);function z(){var V,Q;(V=O.current)==null||V.dispose(),g?p&&JC.set(o,F.current.saveViewState()):(Q=F.current.getModel())==null||Q.dispose(),F.current.dispose()}return zt.createElement(ote,{width:v,height:b,isEditorReady:A,loading:d,_ref:B,className:_,wrapperProps:w})}var jDe=CDe,NDe=y.memo(jDe),sk=NDe;const TDe=Kn();function EDe(){return qm()}function ADe(e=!1){const r={};e&&(r["Content-Type"]="application/json");const n=EDe();return n&&(r.Authorization=`Bearer ${n}`),r}async function Gi(e,r){const n=await fetch(`${TDe}/api/git/${e}`,{method:"POST",headers:ADe(!0),body:JSON.stringify(r)});if(!n.ok){const i=await n.json().catch(()=>({}));throw new Error(i.error||`Git ${e} failed: ${n.statusText}`)}return n.json()}const $s={status(e,r){return Gi("status",{cwd:e,...r?{branch:r}:{}})},listBranches(e){return Gi("branches",{cwd:e})},pull(e){return Gi("pull",{cwd:e})},sync(e){return Gi("sync",{cwd:e})},fetch(e,r=!1){return Gi("fetch",{cwd:e,all:r})},runStackedAction(e,r,n){return Gi("run-stacked-action",{cwd:e,action:r,...n!=null&&n.commitMessage?{commitMessage:n.commitMessage}:{},...n!=null&&n.featureBranch?{featureBranch:!0}:{},...n!=null&&n.baseBranch?{baseBranch:n.baseBranch}:{}})},checkout(e,r){return Gi("checkout",{cwd:e,branch:r})},createBranch(e,r,n){return Gi("create-branch",{cwd:e,branch:r,baseBranch:n})},discard(e,r){return Gi("discard",{cwd:e,paths:r})},stage(e,r){return Gi("stage",{cwd:e,paths:r})},unstage(e,r){return Gi("unstage",{cwd:e,paths:r})},init(e){return Gi("init",{cwd:e})},diff(e){return Gi("diff",{cwd:e})},diffStats(e,r,n){return Gi("diff-stats",{cwd:e,...r?{baseBranch:r}:{},...n?{branch:n}:{}})},fileDiffs(e,r,n){return Gi("file-diffs",{cwd:e,...r?{baseBranch:r}:{},...n?{branch:n}:{}}).then(i=>i.files)},createWorktree(e,r,n,i){return Gi("create-worktree",{cwd:e,baseBranch:r,newBranch:n,...i?{path:i}:{}})},removeWorktree(e,r,n=!1){return Gi("remove-worktree",{cwd:e,path:r,force:n})},ghStatus(e){return Gi("gh-status",{...e?{cwd:e}:{}})},ghAuth(e,r){return Gi("gh-auth",{token:e,...r?{cwd:r}:{}})},forgeStatus(e,r){return Gi("forge-status",{...e?{cwd:e}:{},...r?{remoteUrl:r}:{}})},forgeAuth(e,r,n){return Gi("forge-auth",{token:e,...r?{cwd:r}:{},...n?{remoteUrl:n}:{}})},forgePrChecks(e,r,n){return Gi("forge-pr-checks",{cwd:e,branch:r,...n?{remoteUrl:n}:{}})},identity(e){return Gi("identity",{cwd:e})},setIdentity(e,r,n){return Gi("identity",{cwd:e,name:r,email:n})},prChecks(e,r){return Gi("pr-checks",{cwd:e,branch:r})},generateCommitMessage(e,r,n){return Gi("generate-commit-message",{cwd:e,...r?{provider:r}:{},...n?{model:n}:{}})}};var cte=Object.defineProperty,X=(e,r)=>cte(e,"name",{value:r,configurable:!0}),ODe=(e,r)=>{for(var n in r)cte(e,n,{get:r[n],enumerable:!0})},Qf={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Ot={trace:X((...e)=>{},"trace"),debug:X((...e)=>{},"debug"),info:X((...e)=>{},"info"),warn:X((...e)=>{},"warn"),error:X((...e)=>{},"error"),fatal:X((...e)=>{},"fatal")},G9=X(function(e="fatal"){let r=Qf.fatal;typeof e=="string"?e.toLowerCase()in Qf&&(r=Qf[e]):typeof e=="number"&&(r=e),Ot.trace=()=>{},Ot.debug=()=>{},Ot.info=()=>{},Ot.warn=()=>{},Ot.error=()=>{},Ot.fatal=()=>{},r<=Qf.fatal&&(Ot.fatal=console.error?console.error.bind(console,Ou("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Ou("FATAL"))),r<=Qf.error&&(Ot.error=console.error?console.error.bind(console,Ou("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Ou("ERROR"))),r<=Qf.warn&&(Ot.warn=console.warn?console.warn.bind(console,Ou("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Ou("WARN"))),r<=Qf.info&&(Ot.info=console.info?console.info.bind(console,Ou("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Ou("INFO"))),r<=Qf.debug&&(Ot.debug=console.debug?console.debug.bind(console,Ou("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ou("DEBUG"))),r<=Qf.trace&&(Ot.trace=console.debug?console.debug.bind(console,Ou("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ou("TRACE")))},"setLogLevel"),Ou=X(e=>`%c${Z8e().format("ss.SSS")} : ${e} : `,"format");const a5={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const r=e/255;return e>.03928?Math.pow((r+.055)/1.055,2.4):r/12.92},hue2rgb:(e,r,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(r-e)*6*n:n<1/2?r:n<2/3?e+(r-e)*(2/3-n)*6:e),hsl2rgb:({h:e,s:r,l:n},i)=>{if(!r)return n*2.55;e/=360,r/=100,n/=100;const s=n<.5?n*(1+r):n+r-n*r,o=2*n-s;switch(i){case"r":return a5.hue2rgb(o,s,e+1/3)*255;case"g":return a5.hue2rgb(o,s,e)*255;case"b":return a5.hue2rgb(o,s,e-1/3)*255}},rgb2hsl:({r:e,g:r,b:n},i)=>{e/=255,r/=255,n/=255;const s=Math.max(e,r,n),o=Math.min(e,r,n),a=(s+o)/2;if(i==="l")return a*100;if(s===o)return 0;const l=s-o,d=a>.5?l/(2-s-o):l/(s+o);if(i==="s")return d*100;switch(s){case e:return((r-n)/l+(r<n?6:0))*60;case r:return((n-e)/l+2)*60;case n:return((e-r)/l+4)*60;default:return-1}}},MDe={clamp:(e,r,n)=>r>n?Math.min(r,Math.max(n,e)):Math.min(n,Math.max(r,e)),round:e=>Math.round(e*1e10)/1e10},RDe={dec2hex:e=>{const r=Math.round(e).toString(16);return r.length>1?r:`0${r}`}},bn={channel:a5,lang:MDe,unit:RDe},$m={};for(let e=0;e<=255;e++)$m[e]=bn.unit.dec2hex(e);const Ga={ALL:0,RGB:1,HSL:2};class PDe{constructor(){this.type=Ga.ALL}get(){return this.type}set(r){if(this.type&&this.type!==r)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=r}reset(){this.type=Ga.ALL}is(r){return this.type===r}}class LDe{constructor(r,n){this.color=n,this.changed=!1,this.data=r,this.type=new PDe}set(r,n){return this.color=n,this.changed=!1,this.data=r,this.type.type=Ga.ALL,this}_ensureHSL(){const r=this.data,{h:n,s:i,l:s}=r;n===void 0&&(r.h=bn.channel.rgb2hsl(r,"h")),i===void 0&&(r.s=bn.channel.rgb2hsl(r,"s")),s===void 0&&(r.l=bn.channel.rgb2hsl(r,"l"))}_ensureRGB(){const r=this.data,{r:n,g:i,b:s}=r;n===void 0&&(r.r=bn.channel.hsl2rgb(r,"r")),i===void 0&&(r.g=bn.channel.hsl2rgb(r,"g")),s===void 0&&(r.b=bn.channel.hsl2rgb(r,"b"))}get r(){const r=this.data,n=r.r;return!this.type.is(Ga.HSL)&&n!==void 0?n:(this._ensureHSL(),bn.channel.hsl2rgb(r,"r"))}get g(){const r=this.data,n=r.g;return!this.type.is(Ga.HSL)&&n!==void 0?n:(this._ensureHSL(),bn.channel.hsl2rgb(r,"g"))}get b(){const r=this.data,n=r.b;return!this.type.is(Ga.HSL)&&n!==void 0?n:(this._ensureHSL(),bn.channel.hsl2rgb(r,"b"))}get h(){const r=this.data,n=r.h;return!this.type.is(Ga.RGB)&&n!==void 0?n:(this._ensureRGB(),bn.channel.rgb2hsl(r,"h"))}get s(){const r=this.data,n=r.s;return!this.type.is(Ga.RGB)&&n!==void 0?n:(this._ensureRGB(),bn.channel.rgb2hsl(r,"s"))}get l(){const r=this.data,n=r.l;return!this.type.is(Ga.RGB)&&n!==void 0?n:(this._ensureRGB(),bn.channel.rgb2hsl(r,"l"))}get a(){return this.data.a}set r(r){this.type.set(Ga.RGB),this.changed=!0,this.data.r=r}set g(r){this.type.set(Ga.RGB),this.changed=!0,this.data.g=r}set b(r){this.type.set(Ga.RGB),this.changed=!0,this.data.b=r}set h(r){this.type.set(Ga.HSL),this.changed=!0,this.data.h=r}set s(r){this.type.set(Ga.HSL),this.changed=!0,this.data.s=r}set l(r){this.type.set(Ga.HSL),this.changed=!0,this.data.l=r}set a(r){this.changed=!0,this.data.a=r}}const SN=new LDe({r:0,g:0,b:0,a:0},"transparent"),ov={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const r=e.match(ov.re);if(!r)return;const n=r[1],i=parseInt(n,16),s=n.length,o=s%4===0,a=s>4,l=a?1:17,d=a?8:4,u=o?0:-1,h=a?255:15;return SN.set({r:(i>>d*(u+3)&h)*l,g:(i>>d*(u+2)&h)*l,b:(i>>d*(u+1)&h)*l,a:o?(i&h)*l/255:1},e)},stringify:e=>{const{r,g:n,b:i,a:s}=e;return s<1?`#${$m[Math.round(r)]}${$m[Math.round(n)]}${$m[Math.round(i)]}${$m[Math.round(s*255)]}`:`#${$m[Math.round(r)]}${$m[Math.round(n)]}${$m[Math.round(i)]}`}},O0={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const r=e.match(O0.hueRe);if(r){const[,n,i]=r;switch(i){case"grad":return bn.channel.clamp.h(parseFloat(n)*.9);case"rad":return bn.channel.clamp.h(parseFloat(n)*180/Math.PI);case"turn":return bn.channel.clamp.h(parseFloat(n)*360)}}return bn.channel.clamp.h(parseFloat(e))},parse:e=>{const r=e.charCodeAt(0);if(r!==104&&r!==72)return;const n=e.match(O0.re);if(!n)return;const[,i,s,o,a,l]=n;return SN.set({h:O0._hue2deg(i),s:bn.channel.clamp.s(parseFloat(s)),l:bn.channel.clamp.l(parseFloat(o)),a:a?bn.channel.clamp.a(l?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:r,s:n,l:i,a:s}=e;return s<1?`hsla(${bn.lang.round(r)}, ${bn.lang.round(n)}%, ${bn.lang.round(i)}%, ${s})`:`hsl(${bn.lang.round(r)}, ${bn.lang.round(n)}%, ${bn.lang.round(i)}%)`}},s2={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const r=s2.colors[e];if(r)return ov.parse(r)},stringify:e=>{const r=ov.stringify(e);for(const n in s2.colors)if(s2.colors[n]===r)return n}},E_={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const r=e.charCodeAt(0);if(r!==114&&r!==82)return;const n=e.match(E_.re);if(!n)return;const[,i,s,o,a,l,d,u,h]=n;return SN.set({r:bn.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:bn.channel.clamp.g(a?parseFloat(o)*2.55:parseFloat(o)),b:bn.channel.clamp.b(d?parseFloat(l)*2.55:parseFloat(l)),a:u?bn.channel.clamp.a(h?parseFloat(u)/100:parseFloat(u)):1},e)},stringify:e=>{const{r,g:n,b:i,a:s}=e;return s<1?`rgba(${bn.lang.round(r)}, ${bn.lang.round(n)}, ${bn.lang.round(i)}, ${bn.lang.round(s)})`:`rgb(${bn.lang.round(r)}, ${bn.lang.round(n)}, ${bn.lang.round(i)})`}},cf={format:{keyword:s2,hex:ov,rgb:E_,rgba:E_,hsl:O0,hsla:O0},parse:e=>{if(typeof e!="string")return e;const r=ov.parse(e)||E_.parse(e)||O0.parse(e)||s2.parse(e);if(r)return r;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Ga.HSL)||e.data.r===void 0?O0.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?E_.stringify(e):ov.stringify(e)},ute=(e,r)=>{const n=cf.parse(e);for(const i in r)n[i]=bn.channel.clamp[i](r[i]);return cf.stringify(n)},o2=(e,r,n=0,i=1)=>{if(typeof e!="number")return ute(e,{a:r});const s=SN.set({r:bn.channel.clamp.r(e),g:bn.channel.clamp.g(r),b:bn.channel.clamp.b(n),a:bn.channel.clamp.a(i)});return cf.stringify(s)},$De=e=>{const{r,g:n,b:i}=cf.parse(e),s=.2126*bn.channel.toLinear(r)+.7152*bn.channel.toLinear(n)+.0722*bn.channel.toLinear(i);return bn.lang.round(s)},DDe=e=>$De(e)>=.5,ok=e=>!DDe(e),dte=(e,r,n)=>{const i=cf.parse(e),s=i[r],o=bn.channel.clamp[r](s+n);return s!==o&&(i[r]=o),cf.stringify(i)},Nr=(e,r)=>dte(e,"l",r),Zr=(e,r)=>dte(e,"l",-r),De=(e,r)=>{const n=cf.parse(e),i={};for(const s in r)r[s]&&(i[s]=n[s]+r[s]);return ute(e,i)},IDe=(e,r,n=50)=>{const{r:i,g:s,b:o,a}=cf.parse(e),{r:l,g:d,b:u,a:h}=cf.parse(r),p=n/100,g=p*2-1,v=a-h,_=((g*v===-1?g:(g+v)/(1+g*v))+1)/2,w=1-_,S=i*_+l*w,C=s*_+d*w,j=o*_+u*w,E=a*p+h*(1-p);return o2(S,C,j,E)},ar=(e,r=100)=>{const n=cf.parse(e);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,IDe(n,e,r)};/*! @license DOMPurify 3.3.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.2/LICENSE */const{entries:hte,setPrototypeOf:yF,isFrozen:BDe,getPrototypeOf:zDe,getOwnPropertyDescriptor:FDe}=Object;let{freeze:Al,seal:nd,create:l5}=Object,{apply:oO,construct:aO}=typeof Reflect<"u"&&Reflect;Al||(Al=function(r){return r});nd||(nd=function(r){return r});oO||(oO=function(r,n){for(var i=arguments.length,s=new Array(i>2?i-2:0),o=2;o<i;o++)s[o-2]=arguments[o];return r.apply(n,s)});aO||(aO=function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];return new r(...i)});const ZC=Ol(Array.prototype.forEach),HDe=Ol(Array.prototype.lastIndexOf),vF=Ol(Array.prototype.pop),Db=Ol(Array.prototype.push),WDe=Ol(Array.prototype.splice),c5=Ol(String.prototype.toLowerCase),IE=Ol(String.prototype.toString),BE=Ol(String.prototype.match),Ib=Ol(String.prototype.replace),UDe=Ol(String.prototype.indexOf),VDe=Ol(String.prototype.trim),Gc=Ol(Object.prototype.hasOwnProperty),xl=Ol(RegExp.prototype.test),Bb=qDe(TypeError);function Ol(e){return function(r){r instanceof RegExp&&(r.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];return oO(e,r,i)}}function qDe(e){return function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return aO(e,n)}}function In(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:c5;yF&&yF(e,null);let i=r.length;for(;i--;){let s=r[i];if(typeof s=="string"){const o=n(s);o!==s&&(BDe(r)||(r[i]=o),s=o)}e[s]=!0}return e}function GDe(e){for(let r=0;r<e.length;r++)Gc(e,r)||(e[r]=null);return e}function Fh(e){const r=l5(null);for(const[n,i]of hte(e))Gc(e,n)&&(Array.isArray(i)?r[n]=GDe(i):i&&typeof i=="object"&&i.constructor===Object?r[n]=Fh(i):r[n]=i);return r}function zb(e,r){for(;e!==null;){const i=FDe(e,r);if(i){if(i.get)return Ol(i.get);if(typeof i.value=="function")return Ol(i.value)}e=zDe(e)}function n(){return null}return n}const xF=Al(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),zE=Al(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),FE=Al(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),KDe=Al(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),HE=Al(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),YDe=Al(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),bF=Al(["#text"]),_F=Al(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),WE=Al(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),wF=Al(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),QC=Al(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),XDe=nd(/\{\{[\w\W]*|[\w\W]*\}\}/gm),JDe=nd(/<%[\w\W]*|[\w\W]*%>/gm),ZDe=nd(/\$\{[\w\W]*/gm),QDe=nd(/^data-[\-\w.\u00B7-\uFFFF]+$/),eIe=nd(/^aria-[\-\w]+$/),fte=nd(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tIe=nd(/^(?:\w+script|data):/i),rIe=nd(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),pte=nd(/^html$/i),nIe=nd(/^[a-z][.\w]*(-[.\w]+)+$/i);var SF=Object.freeze({__proto__:null,ARIA_ATTR:eIe,ATTR_WHITESPACE:rIe,CUSTOM_ELEMENT:nIe,DATA_ATTR:QDe,DOCTYPE_NAME:pte,ERB_EXPR:JDe,IS_ALLOWED_URI:fte,IS_SCRIPT_OR_DATA:tIe,MUSTACHE_EXPR:XDe,TMPLIT_EXPR:ZDe});const Fb={element:1,text:3,progressingInstruction:7,comment:8,document:9},iIe=function(){return typeof window>"u"?null:window},sIe=function(r,n){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(i=n.getAttribute(s));const o="dompurify"+(i?"#"+i:"");try{return r.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},kF=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function mte(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:iIe();const r=Ke=>mte(Ke);if(r.version="3.3.2",r.removed=[],!e||!e.document||e.document.nodeType!==Fb.document||!e.Element)return r.isSupported=!1,r;let{document:n}=e;const i=n,s=i.currentScript,{DocumentFragment:o,HTMLTemplateElement:a,Node:l,Element:d,NodeFilter:u,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:p,DOMParser:g,trustedTypes:v}=e,b=d.prototype,_=zb(b,"cloneNode"),w=zb(b,"remove"),S=zb(b,"nextSibling"),C=zb(b,"childNodes"),j=zb(b,"parentNode");if(typeof a=="function"){const Ke=n.createElement("template");Ke.content&&Ke.content.ownerDocument&&(n=Ke.content.ownerDocument)}let E,A="";const{implementation:N,createNodeIterator:P,createDocumentFragment:H,getElementsByTagName:K}=n,{importNode:F}=i;let B=kF();r.isSupported=typeof hte=="function"&&typeof j=="function"&&N&&N.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:W,ERB_EXPR:D,TMPLIT_EXPR:O,DATA_ATTR:I,ARIA_ATTR:R,IS_SCRIPT_OR_DATA:$,ATTR_WHITESPACE:U,CUSTOM_ELEMENT:Y}=SF;let{IS_ALLOWED_URI:z}=SF,V=null;const Q=In({},[...xF,...zE,...FE,...HE,...bF]);let q=null;const re=In({},[..._F,...WE,...wF,...QC]);let ee=Object.seal(l5(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ne=null,ae=null;const te=Object.seal(l5(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ue=!0,he=!0,we=!1,pe=!0,qe=!1,se=!0,it=!1,Ye=!1,ht=!1,Vt=!1,Nt=!1,Xt=!1,Wt=!0,gt=!1;const Re="user-content-";let kt=!0,Pt=!1,Ne={},Be=null;const Qe=In({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let lt=null;const yt=In({},["audio","video","img","source","image","track"]);let Tt=null;const dr=In({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",je="http://www.w3.org/2000/svg",be="http://www.w3.org/1999/xhtml";let Ie=be,at=!1,Ve=null;const Mt=In({},[$e,je,be],IE);let It=In({},["mi","mo","mn","ms","mtext"]),tr=In({},["annotation-xml"]);const rr=In({},["title","style","font","a","script"]);let Ut=null;const Se=["application/xhtml+xml","text/html"],Fe="text/html";let et=null,St=null;const Xe=n.createElement("form"),Lt=function(me){return me instanceof RegExp||me instanceof Function},Et=function(){let me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(St&&St===me)){if((!me||typeof me!="object")&&(me={}),me=Fh(me),Ut=Se.indexOf(me.PARSER_MEDIA_TYPE)===-1?Fe:me.PARSER_MEDIA_TYPE,et=Ut==="application/xhtml+xml"?IE:c5,V=Gc(me,"ALLOWED_TAGS")?In({},me.ALLOWED_TAGS,et):Q,q=Gc(me,"ALLOWED_ATTR")?In({},me.ALLOWED_ATTR,et):re,Ve=Gc(me,"ALLOWED_NAMESPACES")?In({},me.ALLOWED_NAMESPACES,IE):Mt,Tt=Gc(me,"ADD_URI_SAFE_ATTR")?In(Fh(dr),me.ADD_URI_SAFE_ATTR,et):dr,lt=Gc(me,"ADD_DATA_URI_TAGS")?In(Fh(yt),me.ADD_DATA_URI_TAGS,et):yt,Be=Gc(me,"FORBID_CONTENTS")?In({},me.FORBID_CONTENTS,et):Qe,ne=Gc(me,"FORBID_TAGS")?In({},me.FORBID_TAGS,et):Fh({}),ae=Gc(me,"FORBID_ATTR")?In({},me.FORBID_ATTR,et):Fh({}),Ne=Gc(me,"USE_PROFILES")?me.USE_PROFILES:!1,ue=me.ALLOW_ARIA_ATTR!==!1,he=me.ALLOW_DATA_ATTR!==!1,we=me.ALLOW_UNKNOWN_PROTOCOLS||!1,pe=me.ALLOW_SELF_CLOSE_IN_ATTR!==!1,qe=me.SAFE_FOR_TEMPLATES||!1,se=me.SAFE_FOR_XML!==!1,it=me.WHOLE_DOCUMENT||!1,Vt=me.RETURN_DOM||!1,Nt=me.RETURN_DOM_FRAGMENT||!1,Xt=me.RETURN_TRUSTED_TYPE||!1,ht=me.FORCE_BODY||!1,Wt=me.SANITIZE_DOM!==!1,gt=me.SANITIZE_NAMED_PROPS||!1,kt=me.KEEP_CONTENT!==!1,Pt=me.IN_PLACE||!1,z=me.ALLOWED_URI_REGEXP||fte,Ie=me.NAMESPACE||be,It=me.MATHML_TEXT_INTEGRATION_POINTS||It,tr=me.HTML_INTEGRATION_POINTS||tr,ee=me.CUSTOM_ELEMENT_HANDLING||{},me.CUSTOM_ELEMENT_HANDLING&&Lt(me.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ee.tagNameCheck=me.CUSTOM_ELEMENT_HANDLING.tagNameCheck),me.CUSTOM_ELEMENT_HANDLING&&Lt(me.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ee.attributeNameCheck=me.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),me.CUSTOM_ELEMENT_HANDLING&&typeof me.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ee.allowCustomizedBuiltInElements=me.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),qe&&(he=!1),Nt&&(Vt=!0),Ne&&(V=In({},bF),q=l5(null),Ne.html===!0&&(In(V,xF),In(q,_F)),Ne.svg===!0&&(In(V,zE),In(q,WE),In(q,QC)),Ne.svgFilters===!0&&(In(V,FE),In(q,WE),In(q,QC)),Ne.mathMl===!0&&(In(V,HE),In(q,wF),In(q,QC))),Gc(me,"ADD_TAGS")||(te.tagCheck=null),Gc(me,"ADD_ATTR")||(te.attributeCheck=null),me.ADD_TAGS&&(typeof me.ADD_TAGS=="function"?te.tagCheck=me.ADD_TAGS:(V===Q&&(V=Fh(V)),In(V,me.ADD_TAGS,et))),me.ADD_ATTR&&(typeof me.ADD_ATTR=="function"?te.attributeCheck=me.ADD_ATTR:(q===re&&(q=Fh(q)),In(q,me.ADD_ATTR,et))),me.ADD_URI_SAFE_ATTR&&In(Tt,me.ADD_URI_SAFE_ATTR,et),me.FORBID_CONTENTS&&(Be===Qe&&(Be=Fh(Be)),In(Be,me.FORBID_CONTENTS,et)),me.ADD_FORBID_CONTENTS&&(Be===Qe&&(Be=Fh(Be)),In(Be,me.ADD_FORBID_CONTENTS,et)),kt&&(V["#text"]=!0),it&&In(V,["html","head","body"]),V.table&&(In(V,["tbody"]),delete ne.tbody),me.TRUSTED_TYPES_POLICY){if(typeof me.TRUSTED_TYPES_POLICY.createHTML!="function")throw Bb('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof me.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Bb('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=me.TRUSTED_TYPES_POLICY,A=E.createHTML("")}else E===void 0&&(E=sIe(v,s)),E!==null&&typeof A=="string"&&(A=E.createHTML(""));Al&&Al(me),St=me}},Ft=In({},[...zE,...FE,...KDe]),ye=In({},[...HE,...YDe]),st=function(me){let dt=j(me);(!dt||!dt.tagName)&&(dt={namespaceURI:Ie,tagName:"template"});const wt=c5(me.tagName),fr=c5(dt.tagName);return Ve[me.namespaceURI]?me.namespaceURI===je?dt.namespaceURI===be?wt==="svg":dt.namespaceURI===$e?wt==="svg"&&(fr==="annotation-xml"||It[fr]):!!Ft[wt]:me.namespaceURI===$e?dt.namespaceURI===be?wt==="math":dt.namespaceURI===je?wt==="math"&&tr[fr]:!!ye[wt]:me.namespaceURI===be?dt.namespaceURI===je&&!tr[fr]||dt.namespaceURI===$e&&!It[fr]?!1:!ye[wt]&&(rr[wt]||!Ft[wt]):!!(Ut==="application/xhtml+xml"&&Ve[me.namespaceURI]):!1},ir=function(me){Db(r.removed,{element:me});try{j(me).removeChild(me)}catch{w(me)}},At=function(me,dt){try{Db(r.removed,{attribute:dt.getAttributeNode(me),from:dt})}catch{Db(r.removed,{attribute:null,from:dt})}if(dt.removeAttribute(me),me==="is")if(Vt||Nt)try{ir(dt)}catch{}else try{dt.setAttribute(me,"")}catch{}},hr=function(me){let dt=null,wt=null;if(ht)me="<remove></remove>"+me;else{const Vr=BE(me,/^[\r\n\t ]+/);wt=Vr&&Vr[0]}Ut==="application/xhtml+xml"&&Ie===be&&(me='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+me+"</body></html>");const fr=E?E.createHTML(me):me;if(Ie===be)try{dt=new g().parseFromString(fr,Ut)}catch{}if(!dt||!dt.documentElement){dt=N.createDocument(Ie,"template",null);try{dt.documentElement.innerHTML=at?A:fr}catch{}}const vr=dt.body||dt.documentElement;return me&&wt&&vr.insertBefore(n.createTextNode(wt),vr.childNodes[0]||null),Ie===be?K.call(dt,it?"html":"body")[0]:it?dt.documentElement:vr},Ur=function(me){return P.call(me.ownerDocument||me,me,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},br=function(me){return me instanceof p&&(typeof me.nodeName!="string"||typeof me.textContent!="string"||typeof me.removeChild!="function"||!(me.attributes instanceof h)||typeof me.removeAttribute!="function"||typeof me.setAttribute!="function"||typeof me.namespaceURI!="string"||typeof me.insertBefore!="function"||typeof me.hasChildNodes!="function")},Mr=function(me){return typeof l=="function"&&me instanceof l};function mt(Ke,me,dt){ZC(Ke,wt=>{wt.call(r,me,dt,St)})}const or=function(me){let dt=null;if(mt(B.beforeSanitizeElements,me,null),br(me))return ir(me),!0;const wt=et(me.nodeName);if(mt(B.uponSanitizeElement,me,{tagName:wt,allowedTags:V}),se&&me.hasChildNodes()&&!Mr(me.firstElementChild)&&xl(/<[/\w!]/g,me.innerHTML)&&xl(/<[/\w!]/g,me.textContent)||me.nodeType===Fb.progressingInstruction||se&&me.nodeType===Fb.comment&&xl(/<[/\w]/g,me.data))return ir(me),!0;if(!(te.tagCheck instanceof Function&&te.tagCheck(wt))&&(!V[wt]||ne[wt])){if(!ne[wt]&&xt(wt)&&(ee.tagNameCheck instanceof RegExp&&xl(ee.tagNameCheck,wt)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck(wt)))return!1;if(kt&&!Be[wt]){const fr=j(me)||me.parentNode,vr=C(me)||me.childNodes;if(vr&&fr){const Vr=vr.length;for(let Hn=Vr-1;Hn>=0;--Hn){const Mi=_(vr[Hn],!0);Mi.__removalCount=(me.__removalCount||0)+1,fr.insertBefore(Mi,S(me))}}}return ir(me),!0}return me instanceof d&&!st(me)||(wt==="noscript"||wt==="noembed"||wt==="noframes")&&xl(/<\/no(script|embed|frames)/i,me.innerHTML)?(ir(me),!0):(qe&&me.nodeType===Fb.text&&(dt=me.textContent,ZC([W,D,O],fr=>{dt=Ib(dt,fr," ")}),me.textContent!==dt&&(Db(r.removed,{element:me.cloneNode()}),me.textContent=dt)),mt(B.afterSanitizeElements,me,null),!1)},xe=function(me,dt,wt){if(ae[dt]||Wt&&(dt==="id"||dt==="name")&&(wt in n||wt in Xe))return!1;if(!(he&&!ae[dt]&&xl(I,dt))){if(!(ue&&xl(R,dt))){if(!(te.attributeCheck instanceof Function&&te.attributeCheck(dt,me))){if(!q[dt]||ae[dt]){if(!(xt(me)&&(ee.tagNameCheck instanceof RegExp&&xl(ee.tagNameCheck,me)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck(me))&&(ee.attributeNameCheck instanceof RegExp&&xl(ee.attributeNameCheck,dt)||ee.attributeNameCheck instanceof Function&&ee.attributeNameCheck(dt,me))||dt==="is"&&ee.allowCustomizedBuiltInElements&&(ee.tagNameCheck instanceof RegExp&&xl(ee.tagNameCheck,wt)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck(wt))))return!1}else if(!Tt[dt]){if(!xl(z,Ib(wt,U,""))){if(!((dt==="src"||dt==="xlink:href"||dt==="href")&&me!=="script"&&UDe(wt,"data:")===0&<[me])){if(!(we&&!xl($,Ib(wt,U,"")))){if(wt)return!1}}}}}}}return!0},xt=function(me){return me!=="annotation-xml"&&BE(me,Y)},Je=function(me){mt(B.beforeSanitizeAttributes,me,null);const{attributes:dt}=me;if(!dt||br(me))return;const wt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q,forceKeepAttr:void 0};let fr=dt.length;for(;fr--;){const vr=dt[fr],{name:Vr,namespaceURI:Hn,value:Mi}=vr,Ri=et(Vr),Hi=Mi;let He=Vr==="value"?Hi:VDe(Hi);if(wt.attrName=Ri,wt.attrValue=He,wt.keepAttr=!0,wt.forceKeepAttr=void 0,mt(B.uponSanitizeAttribute,me,wt),He=wt.attrValue,gt&&(Ri==="id"||Ri==="name")&&(At(Vr,me),He=Re+He),se&&xl(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,He)){At(Vr,me);continue}if(Ri==="attributename"&&BE(He,"href")){At(Vr,me);continue}if(wt.forceKeepAttr)continue;if(!wt.keepAttr){At(Vr,me);continue}if(!pe&&xl(/\/>/i,He)){At(Vr,me);continue}qe&&ZC([W,D,O],Kt=>{He=Ib(He,Kt," ")});const ze=et(me.nodeName);if(!xe(ze,Ri,He)){At(Vr,me);continue}if(E&&typeof v=="object"&&typeof v.getAttributeType=="function"&&!Hn)switch(v.getAttributeType(ze,Ri)){case"TrustedHTML":{He=E.createHTML(He);break}case"TrustedScriptURL":{He=E.createScriptURL(He);break}}if(He!==Hi)try{Hn?me.setAttributeNS(Hn,Vr,He):me.setAttribute(Vr,He),br(me)?ir(me):vF(r.removed)}catch{At(Vr,me)}}mt(B.afterSanitizeAttributes,me,null)},Rt=function Ke(me){let dt=null;const wt=Ur(me);for(mt(B.beforeSanitizeShadowDOM,me,null);dt=wt.nextNode();)mt(B.uponSanitizeShadowNode,dt,null),or(dt),Je(dt),dt.content instanceof o&&Ke(dt.content);mt(B.afterSanitizeShadowDOM,me,null)};return r.sanitize=function(Ke){let me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},dt=null,wt=null,fr=null,vr=null;if(at=!Ke,at&&(Ke="<!-->"),typeof Ke!="string"&&!Mr(Ke))if(typeof Ke.toString=="function"){if(Ke=Ke.toString(),typeof Ke!="string")throw Bb("dirty is not a string, aborting")}else throw Bb("toString is not a function");if(!r.isSupported)return Ke;if(Ye||Et(me),r.removed=[],typeof Ke=="string"&&(Pt=!1),Pt){if(Ke.nodeName){const Mi=et(Ke.nodeName);if(!V[Mi]||ne[Mi])throw Bb("root node is forbidden and cannot be sanitized in-place")}}else if(Ke instanceof l)dt=hr("<!---->"),wt=dt.ownerDocument.importNode(Ke,!0),wt.nodeType===Fb.element&&wt.nodeName==="BODY"||wt.nodeName==="HTML"?dt=wt:dt.appendChild(wt);else{if(!Vt&&!qe&&!it&&Ke.indexOf("<")===-1)return E&&Xt?E.createHTML(Ke):Ke;if(dt=hr(Ke),!dt)return Vt?null:Xt?A:""}dt&&ht&&ir(dt.firstChild);const Vr=Ur(Pt?Ke:dt);for(;fr=Vr.nextNode();)or(fr),Je(fr),fr.content instanceof o&&Rt(fr.content);if(Pt)return Ke;if(Vt){if(Nt)for(vr=H.call(dt.ownerDocument);dt.firstChild;)vr.appendChild(dt.firstChild);else vr=dt;return(q.shadowroot||q.shadowrootmode)&&(vr=F.call(i,vr,!0)),vr}let Hn=it?dt.outerHTML:dt.innerHTML;return it&&V["!doctype"]&&dt.ownerDocument&&dt.ownerDocument.doctype&&dt.ownerDocument.doctype.name&&xl(pte,dt.ownerDocument.doctype.name)&&(Hn="<!DOCTYPE "+dt.ownerDocument.doctype.name+`>
|
|
@@ -1167,8 +1167,8 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
|
|
|
1167
1167
|
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,o=Math.abs(i-n.x),a=e.width/2;let l=n.x<r.x?a-o:a+o;const d=e.height/2,u=Math.abs(r.y-n.y),h=Math.abs(r.x-n.x);if(Math.abs(s-r.y)*a>Math.abs(i-r.x)*d){let p=n.y<r.y?r.y-d-s:s-d-r.y;l=h*p/u;const g={x:n.x<r.x?n.x+l:n.x-h+l,y:n.y<r.y?n.y+u-p:n.y-u+p};return l===0&&(g.x=r.x,g.y=r.y),h===0&&(g.x=r.x),u===0&&(g.y=r.y),Ot.debug(`abc89 top/bottom calc, Q ${u}, q ${p}, R ${h}, r ${l}`,g),g}else{n.x<r.x?l=r.x-a-i:l=i-a-r.x;let p=u*l/h,g=n.x<r.x?n.x+h-l:n.x-h+l,v=n.y<r.y?n.y+p:n.y-p;return Ot.debug(`sides calc abc89, Q ${u}, q ${p}, R ${h}, r ${l}`,{_x:g,_y:v}),l===0&&(g=r.x,v=r.y),h===0&&(g=r.x),u===0&&(v=r.y),{x:g,y:v}}},"intersection"),qH=X((e,r)=>{Ot.warn("abc88 cutPathAtIntersect",e,r);let n=[],i=e[0],s=!1;return e.forEach(o=>{if(Ot.info("abc88 checking point",o,r),!kYe(r,o)&&!s){const a=CYe(r,i,o);Ot.debug("abc88 inside",o,i,a),Ot.debug("abc88 intersection",a,r);let l=!1;n.forEach(d=>{l=l||d.x===a.x&&d.y===a.y}),n.some(d=>d.x===a.x&&d.y===a.y)?Ot.warn("abc88 no intersect",a,n):n.push(a),s=!0}else Ot.warn("abc88 outside",o,i),i=o,s||n.push(o)}),Ot.debug("returning points",n),n},"cutPathAtIntersect");function $oe(e){const r=[],n=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],o=e[i],a=e[i+1];(s.x===o.x&&o.y===a.y&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-s.y)>5||s.y===o.y&&o.x===a.x&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-a.y)>5)&&(r.push(o),n.push(i))}return{cornerPoints:r,cornerPointPositions:n}}X($oe,"extractCornerPoints");var GH=X(function(e,r,n){const i=r.x-e.x,s=r.y-e.y,o=Math.sqrt(i*i+s*s),a=n/o;return{x:r.x-a*i,y:r.y-a*s}},"findAdjacentPoint"),jYe=X(function(e){const{cornerPointPositions:r}=$oe(e),n=[];for(let i=0;i<e.length;i++)if(r.includes(i)){const s=e[i-1],o=e[i+1],a=e[i],l=GH(s,a,5),d=GH(o,a,5),u=d.x-l.x,h=d.y-l.y;n.push(l);const p=Math.sqrt(2)*2;let g={x:a.x,y:a.y};if(Math.abs(o.x-s.x)>10&&Math.abs(o.y-s.y)>=10){Ot.debug("Corner point fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));const v=5;a.x===l.x?g={x:u<0?l.x-v+p:l.x+v-p,y:h<0?l.y-p:l.y+p}:g={x:u<0?l.x-p:l.x+p,y:h<0?l.y-v+p:l.y+v-p}}else Ot.debug("Corner point skipping fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));n.push(g,d)}else n.push(e[i]);return n},"fixCorners"),NYe=X((e,r,n)=>{const i=e-r-n,s=2,o=2,a=s+o,l=Math.floor(i/a),d=Array(l).fill(`${s} ${o}`).join(" ");return`0 ${r} ${d} ${n}`},"generateDashArray"),TYe=X(function(e,r,n,i,s,o,a,l=!1){var R;const{handDrawnSeed:d}=hi();let u=r.points,h=!1;const p=s;var g=o;const v=[];for(const $ in r.cssCompiledStyles)$ie($)||v.push(r.cssCompiledStyles[$]);Ot.debug("UIO intersect check",r.points,g.x,p.x),g.intersect&&p.intersect&&!l&&(u=u.slice(1,r.points.length-1),u.unshift(p.intersect(u[0])),Ot.debug("Last point UIO",r.start,"-->",r.end,u[u.length-1],g,g.intersect(u[u.length-1])),u.push(g.intersect(u[u.length-1])));const b=btoa(JSON.stringify(u));r.toCluster&&(Ot.info("to cluster abc88",n.get(r.toCluster)),u=qH(r.points,n.get(r.toCluster).node),h=!0),r.fromCluster&&(Ot.debug("from cluster abc88",n.get(r.fromCluster),JSON.stringify(u,null,2)),u=qH(u.reverse(),n.get(r.fromCluster).node).reverse(),h=!0);let _=u.filter($=>!Number.isNaN($.y));const w=_Ye(r.curve);w!=="rounded"&&(_=jYe(_));let S=c2;switch(w){case"linear":S=c2;break;case"basis":S=SO;break;case"cardinal":S=gre;break;case"bumpX":S=dre;break;case"bumpY":S=hre;break;case"catmullRom":S=vre;break;case"monotoneX":S=kre;break;case"monotoneY":S=Cre;break;case"natural":S=Nre;break;case"step":S=Tre;break;case"stepAfter":S=Are;break;case"stepBefore":S=Ere;break;case"rounded":S=c2;break;default:S=SO}const{x:C,y:j}=kUe(r),E=eWe().x(C).y(j).curve(S);let A;switch(r.thickness){case"normal":A="edge-thickness-normal";break;case"thick":A="edge-thickness-thick";break;case"invisible":A="edge-thickness-invisible";break;default:A="edge-thickness-normal"}switch(r.pattern){case"solid":A+=" edge-pattern-solid";break;case"dotted":A+=" edge-pattern-dotted";break;case"dashed":A+=" edge-pattern-dashed";break;default:A+=" edge-pattern-solid"}let N,P=w==="rounded"?Doe(Ioe(_,r),5):E(_);const H=Array.isArray(r.style)?r.style:[r.style];let K=H.find($=>$==null?void 0:$.startsWith("stroke:")),F="";r.animate&&(F="edge-animation-fast"),r.animation&&(F="edge-animation-"+r.animation);let B=!1;if(r.look==="handDrawn"){const $=Or.svg(e);Object.assign([],_);const U=$.path(P,{roughness:.3,seed:d});A+=" transition",N=sn(U).select("path").attr("id",r.id).attr("class"," "+A+(r.classes?" "+r.classes:"")+(F?" "+F:"")).attr("style",H?H.reduce((z,V)=>z+";"+V,""):"");let Y=N.attr("d");N.attr("d",Y),e.node().appendChild(N.node())}else{const $=v.join(";"),U=H?H.reduce((re,ee)=>re+ee+";",""):"",Y=($?$+";"+U+";":U)+";"+(H?H.reduce((re,ee)=>re+";"+ee,""):"");N=e.append("path").attr("d",P).attr("id",r.id).attr("class"," "+A+(r.classes?" "+r.classes:"")+(F?" "+F:"")).attr("style",Y),K=(R=Y.match(/stroke:([^;]+)/))==null?void 0:R[1],B=r.animate===!0||!!r.animation||$.includes("animation");const z=N.node(),V=typeof z.getTotalLength=="function"?z.getTotalLength():0,Q=lH[r.arrowTypeStart]||0,q=lH[r.arrowTypeEnd]||0;if(r.look==="neo"&&!B){const ee=`stroke-dasharray: ${r.pattern==="dotted"||r.pattern==="dashed"?NYe(V,Q,q):`0 ${Q} ${V-Q-q} ${q}`}; stroke-dashoffset: 0;`;N.attr("style",ee+N.attr("style"))}}N.attr("data-edge",!0),N.attr("data-et","edge"),N.attr("data-id",r.id),N.attr("data-points",b),r.showPoints&&_.forEach($=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",$.x).attr("cy",$.y)});let W="";(hi().flowchart.arrowMarkerAbsolute||hi().state.arrowMarkerAbsolute)&&(W=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,W=W.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),Ot.info("arrowTypeStart",r.arrowTypeStart),Ot.info("arrowTypeEnd",r.arrowTypeEnd),xYe(N,r,W,a,i,K);const D=Math.floor(u.length/2),O=u[D];Hd.isLabelCoordinateInPath(O,N.attr("d"))||(h=!0);let I={};return h&&(I.updatedPath=u),I.originalPath=r.points,I},"insertEdge");function Doe(e,r){if(e.length<2)return"";let n="";const i=e.length,s=1e-5;for(let o=0;o<i;o++){const a=e[o],l=e[o-1],d=e[o+1];if(o===0)n+=`M${a.x},${a.y}`;else if(o===i-1)n+=`L${a.x},${a.y}`;else{const u=a.x-l.x,h=a.y-l.y,p=d.x-a.x,g=d.y-a.y,v=Math.hypot(u,h),b=Math.hypot(p,g);if(v<s||b<s){n+=`L${a.x},${a.y}`;continue}const _=u/v,w=h/v,S=p/b,C=g/b,j=_*S+w*C,E=Math.max(-1,Math.min(1,j)),A=Math.acos(E);if(A<s||Math.abs(Math.PI-A)<s){n+=`L${a.x},${a.y}`;continue}const N=Math.min(r/Math.sin(A/2),v/2,b/2),P=a.x-_*N,H=a.y-w*N,K=a.x+S*N,F=a.y+C*N;n+=`L${P},${H}`,n+=`Q${a.x},${a.y} ${K},${F}`}}return n}X(Doe,"generateRoundedPath");function JO(e,r){if(!e||!r)return{angle:0,deltaX:0,deltaY:0};const n=r.x-e.x,i=r.y-e.y;return{angle:Math.atan2(i,n),deltaX:n,deltaY:i}}X(JO,"calculateDeltaAndAngle");function Ioe(e,r){const n=e.map(s=>({...s}));if(e.length>=2&&Ka[r.arrowTypeStart]){const s=Ka[r.arrowTypeStart],o=e[0],a=e[1],{angle:l}=JO(o,a),d=s*Math.cos(l),u=s*Math.sin(l);n[0].x=o.x+d,n[0].y=o.y+u}const i=e.length;if(i>=2&&Ka[r.arrowTypeEnd]){const s=Ka[r.arrowTypeEnd],o=e[i-1],a=e[i-2],{angle:l}=JO(a,o),d=s*Math.cos(l),u=s*Math.sin(l);n[i-1].x=o.x-d,n[i-1].y=o.y-u}return n}X(Ioe,"applyMarkerOffsetsToPoints");var EYe=X((e,r,n,i)=>{r.forEach(s=>{VYe[s](e,n,i)})},"insertMarkers"),AYe=X((e,r,n)=>{Ot.trace("Making markers for ",n),e.append("defs").append("marker").attr("id",n+"_"+r+"-extensionStart").attr("class","marker extension "+r).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",n+"_"+r+"-extensionEnd").attr("class","marker extension "+r).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),OYe=X((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-compositionStart").attr("class","marker composition "+r).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",n+"_"+r+"-compositionEnd").attr("class","marker composition "+r).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),MYe=X((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-aggregationStart").attr("class","marker aggregation "+r).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",n+"_"+r+"-aggregationEnd").attr("class","marker aggregation "+r).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),RYe=X((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-dependencyStart").attr("class","marker dependency "+r).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",n+"_"+r+"-dependencyEnd").attr("class","marker dependency "+r).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),PYe=X((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-lollipopStart").attr("class","marker lollipop "+r).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",n+"_"+r+"-lollipopEnd").attr("class","marker lollipop "+r).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),LYe=X((e,r,n)=>{e.append("marker").attr("id",n+"_"+r+"-pointEnd").attr("class","marker "+r).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",n+"_"+r+"-pointStart").attr("class","marker "+r).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),$Ye=X((e,r,n)=>{e.append("marker").attr("id",n+"_"+r+"-circleEnd").attr("class","marker "+r).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",n+"_"+r+"-circleStart").attr("class","marker "+r).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),DYe=X((e,r,n)=>{e.append("marker").attr("id",n+"_"+r+"-crossEnd").attr("class","marker cross "+r).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",n+"_"+r+"-crossStart").attr("class","marker cross "+r).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),IYe=X((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),BYe=X((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-onlyOneStart").attr("class","marker onlyOne "+r).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",n+"_"+r+"-onlyOneEnd").attr("class","marker onlyOne "+r).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),zYe=X((e,r,n)=>{const i=e.append("defs").append("marker").attr("id",n+"_"+r+"-zeroOrOneStart").attr("class","marker zeroOrOne "+r).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",n+"_"+r+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+r).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),FYe=X((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-oneOrMoreStart").attr("class","marker oneOrMore "+r).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",n+"_"+r+"-oneOrMoreEnd").attr("class","marker oneOrMore "+r).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),HYe=X((e,r,n)=>{const i=e.append("defs").append("marker").attr("id",n+"_"+r+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+r).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",n+"_"+r+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+r).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),WYe=X((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
1168
1168
|
L20,10
|
|
1169
1169
|
M20,10
|
|
1170
|
-
L0,20`)},"requirement_arrow"),UYe=X((e,r,n)=>{const i=e.append("defs").append("marker").attr("id",n+"_"+r+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),VYe={extension:AYe,composition:OYe,aggregation:MYe,dependency:RYe,lollipop:PYe,point:LYe,circle:$Ye,cross:DYe,barb:IYe,only_one:BYe,zero_or_one:zYe,one_or_more:FYe,zero_or_more:HYe,requirement_arrow:WYe,requirement_contains:UYe},qYe=EYe,GYe={common:lk,getConfig:tl,insertCluster:QKe,insertEdge:TYe,insertEdgeLabel:wYe,insertMarkers:qYe,insertNode:Loe,interpolateToCurve:NP,labelHelper:un,log:Ot,positionEdgeLabel:SYe},Jw={},Boe=X(e=>{for(const r of e)Jw[r.name]=r},"registerLayoutLoaders"),KYe=X(()=>{Boe([{name:"dagre",loader:X(async()=>await nt(()=>import("./dagre-KLK3FWXG-
|
|
1171
|
-
`);const i=gWe(r),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Ote(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${n}`)},"draw"),nae={draw:_Je},wJe=nae,SJe={db:{},renderer:nae,parser:{parse:X(()=>{},"parse")}},kJe=SJe,iae="flowchart-elk",CJe=X((e,r={})=>{var n;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((n=r==null?void 0:r.flowchart)==null?void 0:n.defaultRenderer)==="elk"?(r.layout="elk",!0):!1},"detector"),jJe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./flowDiagram-PKNHOUZH-
|
|
1170
|
+
L0,20`)},"requirement_arrow"),UYe=X((e,r,n)=>{const i=e.append("defs").append("marker").attr("id",n+"_"+r+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),VYe={extension:AYe,composition:OYe,aggregation:MYe,dependency:RYe,lollipop:PYe,point:LYe,circle:$Ye,cross:DYe,barb:IYe,only_one:BYe,zero_or_one:zYe,one_or_more:FYe,zero_or_more:HYe,requirement_arrow:WYe,requirement_contains:UYe},qYe=EYe,GYe={common:lk,getConfig:tl,insertCluster:QKe,insertEdge:TYe,insertEdgeLabel:wYe,insertMarkers:qYe,insertNode:Loe,interpolateToCurve:NP,labelHelper:un,log:Ot,positionEdgeLabel:SYe},Jw={},Boe=X(e=>{for(const r of e)Jw[r.name]=r},"registerLayoutLoaders"),KYe=X(()=>{Boe([{name:"dagre",loader:X(async()=>await nt(()=>import("./dagre-KLK3FWXG-a-J-tfqX.js"),__vite__mapDeps([47,48,49,50,51,52]),import.meta.url),"loader")},{name:"cose-bilkent",loader:X(async()=>await nt(()=>import("./cose-bilkent-S5V4N54A-DQsBLyzP.js"),__vite__mapDeps([53,54]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");KYe();var Xxt=X(async(e,r)=>{if(!(e.layoutAlgorithm in Jw))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const n=Jw[e.layoutAlgorithm];return(await n.loader()).render(e,r,GYe,{algorithm:n.algorithm})},"render"),Jxt=X((e="",{fallback:r="dagre"}={})=>{if(e in Jw)return e;if(r in Jw)return Ot.warn(`Layout algorithm ${e} is not registered. Using ${r} as fallback.`),r;throw new Error(`Both layout algorithms ${e} and ${r} are not registered.`)},"getRegisteredLayoutAlgorithm"),YYe=mie(Object.keys,Object),XYe=Object.prototype,JYe=XYe.hasOwnProperty;function ZYe(e){if(!DN(e))return YYe(e);var r=[];for(var n in Object(e))JYe.call(e,n)&&n!="constructor"&&r.push(n);return r}var ZO=Cy(hh,"DataView"),QO=Cy(hh,"Promise"),e7=Cy(hh,"Set"),t7=Cy(hh,"WeakMap"),KH="[object Map]",QYe="[object Object]",YH="[object Promise]",XH="[object Set]",JH="[object WeakMap]",ZH="[object DataView]",eXe=ky(ZO),tXe=ky(Yw),rXe=ky(QO),nXe=ky(e7),iXe=ky(t7),S0=Sy;(ZO&&S0(new ZO(new ArrayBuffer(1)))!=ZH||Yw&&S0(new Yw)!=KH||QO&&S0(QO.resolve())!=YH||e7&&S0(new e7)!=XH||t7&&S0(new t7)!=JH)&&(S0=function(e){var r=Sy(e),n=r==QYe?e.constructor:void 0,i=n?ky(n):"";if(i)switch(i){case eXe:return ZH;case tXe:return KH;case rXe:return YH;case nXe:return XH;case iXe:return JH}return r});var sXe="[object Map]",oXe="[object Set]",aXe=Object.prototype,lXe=aXe.hasOwnProperty;function QH(e){if(e==null)return!0;if(IN(e)&&(zj(e)||typeof e=="string"||typeof e.splice=="function"||CP(e)||jP(e)||Bj(e)))return!e.length;var r=S0(e);if(r==sXe||r==oXe)return!e.size;if(DN(e))return!ZYe(e).length;for(var n in e)if(lXe.call(e,n))return!1;return!0}var zoe="c4",cXe=X(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),uXe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./c4Diagram-IC4MRINW-Cf8c5jXg.js");return{diagram:r}},__vite__mapDeps([55,56]),import.meta.url);return{id:zoe,diagram:e}},"loader"),dXe={id:zoe,detector:cXe,loader:uXe},hXe=dXe,Foe="flowchart",fXe=X((e,r)=>{var n,i;return((n=r==null?void 0:r.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"||((i=r==null?void 0:r.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),pXe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./flowDiagram-PKNHOUZH-BhdVbyZ5.js");return{diagram:r}},__vite__mapDeps([57,58,56,59,60,61]),import.meta.url);return{id:Foe,diagram:e}},"loader"),mXe={id:Foe,detector:fXe,loader:pXe},gXe=mXe,Hoe="flowchart-v2",yXe=X((e,r)=>{var n,i,s;return((n=r==null?void 0:r.flowchart)==null?void 0:n.defaultRenderer)==="dagre-d3"?!1:(((i=r==null?void 0:r.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(r.layout="elk"),/^\s*graph/.test(e)&&((s=r==null?void 0:r.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),vXe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./flowDiagram-PKNHOUZH-BhdVbyZ5.js");return{diagram:r}},__vite__mapDeps([57,58,56,59,60,61]),import.meta.url);return{id:Hoe,diagram:e}},"loader"),xXe={id:Hoe,detector:yXe,loader:vXe},bXe=xXe,Woe="er",_Xe=X(e=>/^\s*erDiagram/.test(e),"detector"),wXe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./erDiagram-INFDFZHY-BS497K0J.js");return{diagram:r}},__vite__mapDeps([62,59,60,61]),import.meta.url);return{id:Woe,diagram:e}},"loader"),SXe={id:Woe,detector:_Xe,loader:wXe},kXe=SXe,Uoe="gitGraph",CXe=X(e=>/^\s*gitGraph/.test(e),"detector"),jXe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./gitGraphDiagram-K3NZZRJ6-CU8jR_v6.js");return{diagram:r}},__vite__mapDeps([63,64,65,66,49,51,52]),import.meta.url);return{id:Uoe,diagram:e}},"loader"),NXe={id:Uoe,detector:CXe,loader:jXe},TXe=NXe,Voe="gantt",EXe=X(e=>/^\s*gantt/.test(e),"detector"),AXe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./ganttDiagram-A5KZAMGK-CigF0hJ4.js");return{diagram:r}},__vite__mapDeps([67,68,69]),import.meta.url);return{id:Voe,diagram:e}},"loader"),OXe={id:Voe,detector:EXe,loader:AXe},MXe=OXe,qoe="info",RXe=X(e=>/^\s*info/.test(e),"detector"),PXe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./infoDiagram-LFFYTUFH-Cl18HlXA.js");return{diagram:r}},__vite__mapDeps([70,66,49,51,52]),import.meta.url);return{id:qoe,diagram:e}},"loader"),LXe={id:qoe,detector:RXe,loader:PXe},Goe="pie",$Xe=X(e=>/^\s*pie/.test(e),"detector"),DXe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./pieDiagram-SKSYHLDU-BcDIj2Di.js");return{diagram:r}},__vite__mapDeps([71,64,66,49,51,52,72]),import.meta.url);return{id:Goe,diagram:e}},"loader"),IXe={id:Goe,detector:$Xe,loader:DXe},Koe="quadrantChart",BXe=X(e=>/^\s*quadrantChart/.test(e),"detector"),zXe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./quadrantDiagram-337W2JSQ-pbuABeJN.js");return{diagram:r}},__vite__mapDeps([73,68,69]),import.meta.url);return{id:Koe,diagram:e}},"loader"),FXe={id:Koe,detector:BXe,loader:zXe},HXe=FXe,Yoe="xychart",WXe=X(e=>/^\s*xychart(-beta)?/.test(e),"detector"),UXe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./xychartDiagram-JWTSCODW-DhR49i8Y.js");return{diagram:r}},__vite__mapDeps([74,68,69]),import.meta.url);return{id:Yoe,diagram:e}},"loader"),VXe={id:Yoe,detector:WXe,loader:UXe},qXe=VXe,Xoe="requirement",GXe=X(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),KXe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./requirementDiagram-Z7DCOOCP-Pqrwb664.js");return{diagram:r}},__vite__mapDeps([75,59,60]),import.meta.url);return{id:Xoe,diagram:e}},"loader"),YXe={id:Xoe,detector:GXe,loader:KXe},XXe=YXe,Joe="sequence",JXe=X(e=>/^\s*sequenceDiagram/.test(e),"detector"),ZXe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./sequenceDiagram-2WXFIKYE-D7Putei8.js");return{diagram:r}},__vite__mapDeps([76,56,65]),import.meta.url);return{id:Joe,diagram:e}},"loader"),QXe={id:Joe,detector:JXe,loader:ZXe},eJe=QXe,Zoe="class",tJe=X((e,r)=>{var n;return((n=r==null?void 0:r.class)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),rJe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./classDiagram-VBA2DB6C-OzZ-EBVj.js");return{diagram:r}},__vite__mapDeps([77,78,58,56,59,60]),import.meta.url);return{id:Zoe,diagram:e}},"loader"),nJe={id:Zoe,detector:tJe,loader:rJe},iJe=nJe,Qoe="classDiagram",sJe=X((e,r)=>{var n;return/^\s*classDiagram/.test(e)&&((n=r==null?void 0:r.class)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),oJe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./classDiagram-v2-RAHNMMFH-OzZ-EBVj.js");return{diagram:r}},__vite__mapDeps([79,78,58,56,59,60]),import.meta.url);return{id:Qoe,diagram:e}},"loader"),aJe={id:Qoe,detector:sJe,loader:oJe},lJe=aJe,eae="state",cJe=X((e,r)=>{var n;return((n=r==null?void 0:r.state)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),uJe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./stateDiagram-RAJIS63D-C6hNGHCZ.js");return{diagram:r}},__vite__mapDeps([80,81,59,60,48,49,50,51]),import.meta.url);return{id:eae,diagram:e}},"loader"),dJe={id:eae,detector:cJe,loader:uJe},hJe=dJe,tae="stateDiagram",fJe=X((e,r)=>{var n;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((n=r==null?void 0:r.state)==null?void 0:n.defaultRenderer)==="dagre-wrapper")},"detector"),pJe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./stateDiagram-v2-FVOUBMTO-FG63mBNv.js");return{diagram:r}},__vite__mapDeps([82,81,59,60]),import.meta.url);return{id:tae,diagram:e}},"loader"),mJe={id:tae,detector:fJe,loader:pJe},gJe=mJe,rae="journey",yJe=X(e=>/^\s*journey/.test(e),"detector"),vJe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./journeyDiagram-4ABVD52K-DEkWNmWg.js");return{diagram:r}},__vite__mapDeps([83,58,56,72]),import.meta.url);return{id:rae,diagram:e}},"loader"),xJe={id:rae,detector:yJe,loader:vJe},bJe=xJe,_Je=X((e,r,n)=>{Ot.debug(`rendering svg for syntax error
|
|
1171
|
+
`);const i=gWe(r),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Ote(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${n}`)},"draw"),nae={draw:_Je},wJe=nae,SJe={db:{},renderer:nae,parser:{parse:X(()=>{},"parse")}},kJe=SJe,iae="flowchart-elk",CJe=X((e,r={})=>{var n;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((n=r==null?void 0:r.flowchart)==null?void 0:n.defaultRenderer)==="elk"?(r.layout="elk",!0):!1},"detector"),jJe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./flowDiagram-PKNHOUZH-BhdVbyZ5.js");return{diagram:r}},__vite__mapDeps([57,58,56,59,60,61]),import.meta.url);return{id:iae,diagram:e}},"loader"),NJe={id:iae,detector:CJe,loader:jJe},TJe=NJe,sae="timeline",EJe=X(e=>/^\s*timeline/.test(e),"detector"),AJe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./timeline-definition-YZTLITO2-CfTZOmEa.js");return{diagram:r}},__vite__mapDeps([84,72]),import.meta.url);return{id:sae,diagram:e}},"loader"),OJe={id:sae,detector:EJe,loader:AJe},MJe=OJe,oae="mindmap",RJe=X(e=>/^\s*mindmap/.test(e),"detector"),PJe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./mindmap-definition-YRQLILUH-D-ZRDTbe.js");return{diagram:r}},__vite__mapDeps([85,59,60]),import.meta.url);return{id:oae,diagram:e}},"loader"),LJe={id:oae,detector:RJe,loader:PJe},$Je=LJe,aae="kanban",DJe=X(e=>/^\s*kanban/.test(e),"detector"),IJe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./kanban-definition-K7BYSVSG-CXUgFjg3.js");return{diagram:r}},__vite__mapDeps([86,58]),import.meta.url);return{id:aae,diagram:e}},"loader"),BJe={id:aae,detector:DJe,loader:IJe},zJe=BJe,lae="sankey",FJe=X(e=>/^\s*sankey(-beta)?/.test(e),"detector"),HJe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./sankeyDiagram-WA2Y5GQK-CEnHfHkb.js");return{diagram:r}},[],import.meta.url);return{id:lae,diagram:e}},"loader"),WJe={id:lae,detector:FJe,loader:HJe},UJe=WJe,cae="packet",VJe=X(e=>/^\s*packet(-beta)?/.test(e),"detector"),qJe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./diagram-P4PSJMXO-CHMK8LtK.js");return{diagram:r}},__vite__mapDeps([87,64,66,49,51,52]),import.meta.url);return{id:cae,diagram:e}},"loader"),GJe={id:cae,detector:VJe,loader:qJe},uae="radar",KJe=X(e=>/^\s*radar-beta/.test(e),"detector"),YJe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./diagram-IFDJBPK2-Dt48LKW8.js");return{diagram:r}},__vite__mapDeps([88,64,66,49,51,52]),import.meta.url);return{id:uae,diagram:e}},"loader"),XJe={id:uae,detector:KJe,loader:YJe},dae="block",JJe=X(e=>/^\s*block(-beta)?/.test(e),"detector"),ZJe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./blockDiagram-WCTKOSBZ-DGBqv5l2.js");return{diagram:r}},__vite__mapDeps([89,58,52,49,48,61]),import.meta.url);return{id:dae,diagram:e}},"loader"),QJe={id:dae,detector:JJe,loader:ZJe},eZe=QJe,hae="architecture",tZe=X(e=>/^\s*architecture/.test(e),"detector"),rZe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./architectureDiagram-2XIMDMQ5-DxVU-vpN.js");return{diagram:r}},__vite__mapDeps([90,64,66,49,51,52,54]),import.meta.url);return{id:hae,diagram:e}},"loader"),nZe={id:hae,detector:tZe,loader:rZe},iZe=nZe,fae="ishikawa",sZe=X(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),oZe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./ishikawaDiagram-PHBUUO56-BMbd97Es.js");return{diagram:r}},[],import.meta.url);return{id:fae,diagram:e}},"loader"),aZe={id:fae,detector:sZe,loader:oZe},pae="venn",lZe=X(e=>/^\s*venn-beta/.test(e),"detector"),cZe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./vennDiagram-LZ73GAT5-DHevRYGi.js");return{diagram:r}},[],import.meta.url);return{id:pae,diagram:e}},"loader"),uZe={id:pae,detector:lZe,loader:cZe},dZe=uZe,mae="treemap",hZe=X(e=>/^\s*treemap/.test(e),"detector"),fZe=X(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:r}=await import("./diagram-E7M64L7V-C7j2FaQG.js");return{diagram:r}},__vite__mapDeps([91,60,64,66,49,51,52,69]),import.meta.url);return{id:mae,diagram:e}},"loader"),pZe={id:mae,detector:hZe,loader:fZe},eW=!1,qN=X(()=>{eW||(eW=!0,_j("error",kJe,e=>e.toLowerCase().trim()==="error"),_j("---",{db:{clear:X(()=>{},"clear")},styles:{},renderer:{draw:X(()=>{},"draw")},parser:{parse:X(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:X(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),lO(TJe,$Je,iZe),lO(hXe,zJe,lJe,iJe,kXe,MXe,LXe,IXe,XXe,eJe,bXe,gXe,MJe,TXe,gJe,hJe,bJe,HXe,UJe,GJe,qXe,eZe,XJe,aZe,pZe,dZe))},"addDiagrams"),mZe=X(async()=>{Ot.debug("Loading registered diagrams");const r=(await Promise.allSettled(Object.entries(ty).map(async([n,{detector:i,loader:s}])=>{if(s)try{hO(n)}catch{try{const{diagram:o,id:a}=await s();_j(a,o,i)}catch(o){throw Ot.error(`Failed to load external diagram with key ${n}. Removing from detectors.`),delete ty[n],o}}}))).filter(n=>n.status==="rejected");if(r.length>0){Ot.error(`Failed to load ${r.length} external diagrams`);for(const n of r)Ot.error(n);throw new Error(`Failed to load ${r.length} external diagrams`)}},"loadRegisteredDiagrams"),gZe="graphics-document document";function gae(e,r){e.attr("role",gZe),r!==""&&e.attr("aria-roledescription",r)}X(gae,"setA11yDiagramInfo");function yae(e,r,n,i){if(e.insert!==void 0){if(n){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(n)}if(r){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(r)}}}X(yae,"addSVGa11yTitleDescription");var V0,r7=(V0=class{constructor(r,n,i,s,o){this.type=r,this.text=n,this.db=i,this.parser=s,this.renderer=o}static async fromText(r,n={}){var u,h;const i=tl(),s=K9(r,i);r=xGe(r)+`
|
|
1172
1172
|
`;try{hO(s)}catch{const p=aIe(s);if(!p)throw new yte(`Diagram ${s} not found.`);const{id:g,diagram:v}=await p();_j(g,v)}const{db:o,parser:a,renderer:l,init:d}=hO(s);return a.parser&&(a.parser.yy=o),(u=o.clear)==null||u.call(o),d==null||d(i),n.title&&((h=o.setDiagramTitle)==null||h.call(o,n.title)),await a.parse(r),new V0(s,r,o,a,l)}async render(r,n){await this.renderer.draw(this.text,r,n,this)}getParser(){return this.parser}getType(){return this.type}},X(V0,"Diagram"),V0),tW=[],yZe=X(()=>{tW.forEach(e=>{e()}),tW=[]},"attachFunctions"),vZe=X(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function vae(e){const r=e.match(gte);if(!r)return{text:e,metadata:{}};let n=SUe(r[1],{schema:wUe})??{};n=typeof n=="object"&&!Array.isArray(n)?n:{};const i={};return n.displayMode&&(i.displayMode=n.displayMode.toString()),n.title&&(i.title=n.title.toString()),n.config&&(i.config=n.config),{text:e.slice(r[0].length),metadata:i}}X(vae,"extractFrontMatter");var xZe=X(e=>e.replace(/\r\n?/g,`
|
|
1173
1173
|
`).replace(/<(\w+)([^>]*)>/g,(r,n,i)=>"<"+n+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),bZe=X(e=>{const{text:r,metadata:n}=vae(e),{displayMode:i,title:s,config:o={}}=n;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:s,config:o,text:r}},"processFrontmatter"),_Ze=X(e=>{const r=Hd.detectInit(e)??{},n=Hd.detectDirective(e,"wrap");return Array.isArray(n)?r.wrap=n.some(({type:i})=>i==="wrap"):(n==null?void 0:n.type)==="wrap"&&(r.wrap=!0),{text:oGe(e),directive:r}},"processDirectives");function KP(e){const r=xZe(e),n=bZe(r),i=_Ze(n.text),s=MP(n.config,i.directive);return e=vZe(i.text),{code:e,title:n.title,config:s}}X(KP,"preprocessDiagram");function xae(e){const r=new TextEncoder().encode(e),n=Array.from(r,i=>String.fromCodePoint(i)).join("");return btoa(n)}X(xae,"toBase64");var wZe=5e4,SZe="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",kZe="sandbox",CZe="loose",jZe="http://www.w3.org/2000/svg",NZe="http://www.w3.org/1999/xlink",TZe="http://www.w3.org/1999/xhtml",EZe="100%",AZe="100%",OZe="border:0;margin:0;",MZe="margin:0",RZe="allow-top-navigation-by-user-activation allow-popups",PZe='The "iframe" tag is not supported by your browser.',LZe=["foreignobject"],$Ze=["dominant-baseline"];function YP(e){const r=KP(e);return xj(),SIe(r.config??{}),r}X(YP,"processAndSetConfigs");async function bae(e,r){qN();try{const{code:n,config:i}=YP(e);return{diagramType:(await wae(n)).type,config:i}}catch(n){if(r!=null&&r.suppressErrors)return!1;throw n}}X(bae,"parse");var rW=X((e,r,n=[])=>`
|
|
1174
1174
|
.${e} ${r} { ${n.join(" !important; ")} !important; }`,"cssImportantStyles"),DZe=X((e,r=new Map)=>{let n="";if(e.themeCSS!==void 0&&(n+=`
|
|
@@ -1478,7 +1478,7 @@ void mainImage(out vec4 fragColor, in vec2 fragCoord) {
|
|
|
1478
1478
|
float alpha = line * uMix;
|
|
1479
1479
|
|
|
1480
1480
|
fragColor = vec4(color * uMix, alpha);
|
|
1481
|
-
}`;function Ehe({color:e="#1FD5F9",colorShift:r=.05,lineWidth:n=2,blur:i=.5,uniformsRef:s,ref:o,className:a,...l}){const d=y.useMemo(()=>The(e),[e]);return y.useEffect(()=>{const u=s.current;u&&(u.uLineWidth.value=n,u.uSmoothing.value=i,u.uColor.value=d??[0,.7,1],u.uColorShift.value=r)},[s,d,r,n,i]),c.jsx("div",{ref:o,className:a,...l,children:c.jsx(Ugt,{fs:nvt,devicePixelRatio:Math.min(globalThis.devicePixelRatio??1,1.5),uniforms:s.current,style:{width:"100%",height:"100%"}})})}Ehe.displayName="WaveShader";const ivt=R4(["aspect-square"],{variants:{size:{icon:"h-[24px]",sm:"h-[56px]",md:"h-[112px]",lg:"h-[224px]",xl:"h-[448px]"}},defaultVariants:{size:"lg"}});function svt({size:e="lg",state:r="speaking",color:n,colorShift:i=.05,lineWidth:s,blur:o,className:a,ref:l,...d}){const u=y.useMemo(()=>{if(s!==void 0)return s;switch(e){case"icon":case"sm":return 2;default:return 1}},[s,e]),{speed:h,amplitude:p,frequency:g,opacity:v}=rvt({state:r}),b=y.useRef({uSpeed:{type:"1f",value:h.get()},uAmplitude:{type:"1f",value:p.get()},uFrequency:{type:"1f",value:g.get()},uMix:{type:"1f",value:v.get()},uLineWidth:{type:"1f",value:u},uSmoothing:{type:"1f",value:.5},uColor:{type:"3fv",value:[0,.7,1]},uColorShift:{type:"1f",value:i}});return y.useEffect(()=>{const _=[h.on("change",w=>{b.current.uSpeed.value=w}),p.on("change",w=>{b.current.uAmplitude.value=w}),g.on("change",w=>{b.current.uFrequency.value=w}),v.on("change",w=>{b.current.uMix.value=w})];return()=>{for(const w of _)w()}},[h,p,g,v]),c.jsx(Ehe,{ref:l,"data-lk-state":r,color:n,colorShift:i,lineWidth:u,blur:o,uniformsRef:b,className:Ae(ivt({size:e}),"mask-[linear-gradient(90deg,transparent_0%,black_20%,black_80%,transparent_100%)]",a),...d})}function ovt(e,r){return`${e??""}::${r??""}`}function avt({viewMode:e,sendTarget:r,projectId:n,projectRepoId:i,repositories:s,lastAppliedKey:o}){if(e!=="developer"||r!=="thread")return null;const a=ovt(n,i);return o===a?null:i?s.some(l=>l.id===i)?{nextAppliedKey:a,repoId:i}:null:{nextAppliedKey:a,repoId:null}}const Ahe=16,lvt=280,cvt=200;function E4(e,r,n){return Math.min(Math.max(e,r),n)}function F3({size:e,viewport:r,margin:n=Ahe}){const i=Math.max(220,r.width-n*2),s=Math.max(160,r.height-n*2),o=Math.min(lvt,i),a=Math.min(cvt,s);return{w:E4(e.w,o,i),h:E4(e.h,a,s)}}function Z_({position:e,size:r,viewport:n}){return{x:E4(e.x,0,Math.max(0,n.width-r.w)),y:E4(e.y,0,Math.max(0,n.height-r.h))}}function uvt({size:e,viewport:r,margin:n=Ahe}){return Z_({position:{x:r.width-e.w-n,y:r.height-e.h-n},size:e,viewport:r})}function YL(e){return e.status==="running"}function dvt(e){return{disableSendTargetSelector:e.isLoadingHistory,showTodoList:!e.developerChatHydrating&&e.todoCount>0}}function hvt(e){return e.viewMode!=="developer"||e.currentView!=="chat"||e.requiresAuthGate?!1:e.authLoading||e.projectsLoading?!0:e.activeSessionId?e.isLoadingHistory||e.loadingChatMode||e.loadingProviderRuntimeMode||e.loadingCliModels||e.loadingChatView:!1}const Ohe=new Set(["ssh.run","run.ssh","ssh.session.start"]),fvt=new Set([...Ohe,"elevated.run","terminal.run","jait.terminal","execute"]);function JG(e){return Ohe.has(e)}function ZG(e){const r=e.replace(/^functions\./,""),n=r.match(/^[^/]+\/(.+)$/);if(n!=null&&n[1])return tu(n[1]);const i=r.match(/^mcp\.[^.]+\.(.+)$/);if(i!=null&&i[1])return tu(i[1]);const s=r.match(/^mcp__[^.]+\.(.+)$/);if(s!=null&&s[1])return tu(s[1]);const o=r.match(/^mcp__[^_]+__(.+)$/);return o!=null&&o[1]?tu(o[1].replace(/^\./,"")):null}function Z1(e){return e?fvt.has(e.requestedBy??"")||e.title==="SSH password"||e.title==="Administrator password"||e.title==="Terminal input required":!1}function pvt(e){return!!(e&&!Z1(e))}function mvt(e,r,n){if(!Z1(e))return!1;const i=tu(r),s=ZG(r);if(e!=null&&e.requestedBy&&(e.requestedBy===r||e.requestedBy===i||e.requestedBy===s))return!0;if((r==="mcp-tool"||i.startsWith("mcp."))&&n){const a=KN(ru(r,n)),l=a.title?ZG(a.title)??tu(a.title):"";if(e!=null&&e.requestedBy&&e.requestedBy===l)return!0;if((e==null?void 0:e.title)==="SSH password")return JG(l);if((e==null?void 0:e.title)==="Terminal input required")return l==="terminal.run"||l==="jait.terminal"||l==="execute"}const o=s??i;return(e==null?void 0:e.title)==="SSH password"?JG(o):(e==null?void 0:e.title)==="Administrator password"?o==="elevated.run":(e==null?void 0:e.title)==="Terminal input required"?o==="terminal.run"||o==="jait.terminal"||o==="execute":!1}function Mhe(e){return Array.isArray(e)?e:[]}function gvt(e,r){const n=Mhe(r);return e.length>0&&n.length===0?e:n}function yvt(e){return e.length>0?e:null}function QG(e,r){return r?e.tree?{tree:!0,editor:!1}:e.editor?B0("editor"):OS():!e.tree&&!e.editor?{tree:!1,editor:!0}:e}function OS(){return{tree:!1,editor:!1}}function B0(e){return e==="tree"?{tree:!0,editor:!1}:{tree:!1,editor:!0}}function vvt(e="background"){return e==="editor"?B0("editor"):OS()}function eK(e,r){const n=r==="tree"?e.tree:e.editor,i=r==="tree"?e.editor:e.tree;return n&&!i?OS():B0(r)}function Rhe(e){return e.showTerminal?"terminal":e.showProject?e.showProjectEditor?"editor":e.showProjectTree?e.treeTab:null:null}function Pm(e,r){return Rhe(e)===r}function tK(e){return!!e&&/[\p{L}\p{N}]/u.test(e)}function xvt(e){return e==="'"||e==="’"}function bvt(e){var r;return((r=e.match(/[\p{L}\p{N}'’]+$/u))==null?void 0:r[0])??""}function tR(e){return e.replace(/\s+/g," ").trim()}function _vt(e,r,n){if(n>=3)return!0;const i=e[e.length-n-1],s=r[n];if(n===2&&tK(i)&&s&&!tK(s)&&!/\s/.test(s))return!0;const o=bvt(e);return n===1&&o.length===1&&xvt(s)}function wvt(e,r){const n=Math.min(e.length,r.length,240);for(let i=n;i>0;i--)if(_vt(e,r,i)&&e.endsWith(r.slice(0,i)))return i;return 0}function Svt(e,r){const n=tR(e),i=tR(r);if(!i)return n;if(!n)return i;if(n.endsWith(i))return n;if(i.startsWith(n))return i;const s=wvt(n,i);return s>0?`${n}${i.slice(s)}`.trim():`${n} ${i}`}const ui=Kn(),Phe=by(),Lhe=28,rR=.05,$he="jait.viewMode";function fv(e){return e.replace(/\\/g,"/").replace(/\/+$/,"")}function kvt(e,r){const n=fv(e);if(!r)return n;const i=fv(r);return n.startsWith(`${i}/`)?n.slice(i.length+1):n}function Cvt(e,r){const n=new Map;if(!e)return n;const i=(s,o,a)=>{const l=fv(s),d=n.get(l)??{insertions:0,deletions:0};n.set(l,{insertions:d.insertions+o,deletions:d.deletions+a})};for(const s of[...e.index.files,...e.workingTree.files])i(s.path,s.insertions,s.deletions),r&&i(`${fv(r)}/${fv(s.path)}`,s.insertions,s.deletions);return n}function jvt(e,r,n){const i=Cvt(r,n);return i.size===0?e:e.map(s=>{const o=fv(s.path),a=kvt(s.path,n),l=i.get(o)??i.get(a);return l?{...s,...l}:s})}function Nvt(e,r){return e.length!==r.length?!1:e.every((n,i)=>{const s=r[i];return s&&n.path===s.path&&n.name===s.name&&n.kind===s.kind})}function Tvt(e,r){return(e==null?void 0:e.surfaceId)===(r==null?void 0:r.surfaceId)&&(e==null?void 0:e.projectRoot)===(r==null?void 0:r.projectRoot)&&((e==null?void 0:e.nodeId)??"gateway")===((r==null?void 0:r.nodeId)??"gateway")}function Evt(e,r){const n=r.panel?{open:r.panel.open,remotePath:r.panel.remotePath,nodeId:r.panel.nodeId}:null;return JSON.stringify({projectId:e,panel:n,tabs:r.tabs,layout:r.layout,terminal:r.terminal,preview:r.preview})}function rK(e,r){return JSON.stringify(e??null)===JSON.stringify(r??null)}function nK(){return typeof window>"u"?"developer":window.localStorage.getItem($he)==="manager"?"manager":"developer"}function Avt({requestId:e,onMount:r,children:n}){return y.useEffect(()=>{r(e)},[e,r]),c.jsx(c.Fragment,{children:n})}const Ovt=500;function Mvt({token:e,sessionId:r}){const[n,i]=y.useState([]),[s,o]=y.useState(""),[a,l]=y.useState(!1),[d,u]=y.useState(!1),[h,p]=y.useState(!1),[g,v]=y.useState(null),[b,_]=y.useState(!1),w=n[0]??null,S=Z1(w);y.useEffect(()=>{if(v(null),_(!1),!w||!Z1(w))return;const B=setTimeout(()=>_(!0),Ovt);return()=>clearTimeout(B)},[w==null?void 0:w.id]);const C=y.useCallback(B=>{v(B)},[]),j=y.useCallback((B=!1)=>{const W={};return e&&(W.Authorization=`Bearer ${e}`),B&&(W["Content-Type"]="application/json"),W},[e]),E=y.useCallback(async()=>{if(e)try{const B=await fetch(`${ui}/api/secrets/requests`,{headers:j(),credentials:"include"});if(!B.ok)return;const W=await B.json();i(W.requests.filter(D=>!r||D.sessionId===r||Z1(D)))}catch{}},[j,r,e]);y.useEffect(()=>{if(!e)return;E();const B=new WebSocket(`${Phe}?token=${encodeURIComponent(e)}`);return B.onmessage=W=>{try{const D=JSON.parse(W.data);if(D.type==="secret.requested"){const O=D.payload;(!r||O.sessionId===r||Z1(O))&&i(I=>[O,...I.filter(R=>R.id!==O.id)])}if(D.type==="secret.resolved"){const O=D.payload;O.id&&(i(I=>I.filter(R=>R.id!==O.id)),o(""),l(!1))}}catch{}},()=>B.close()},[E,r,e]);const A=y.useCallback(async()=>{if(!(!w||!s)){u(!0);try{if(!(await fetch(`${ui}/api/secrets/requests/${w.id}/submit`,{method:"POST",headers:j(!0),credentials:"include",body:JSON.stringify({value:s,remember:w.rememberable?a:!1})})).ok)throw new Error("Failed to submit secret");i(W=>W.filter(D=>D.id!==w.id)),o(""),l(!1)}catch(B){An.error(B instanceof Error?B.message:"Failed to submit secret")}finally{u(!1)}}},[w,j,a,s]),N=y.useCallback(async()=>{if(w){u(!0);try{await fetch(`${ui}/api/secrets/requests/${w.id}/cancel`,{method:"POST",headers:j(),credentials:"include"}),i(B=>B.filter(W=>W.id!==w.id)),o(""),l(!1)}finally{u(!1)}}},[w,j]),P=w?c.jsx(Rvt,{request:w,value:s,onValueChange:o,submitting:d,showPassword:h,onShowPasswordChange:p,remember:a,onRememberChange:l,onSubmit:A,onCancel:N,showTitle:S}):null,H=w?g===w.id:!1,F=!!w&&(pvt(w)||S&&b&&!H)&&w?c.jsx(El,{open:!0,onOpenChange:B=>{B||N()},children:c.jsxs(il,{children:[c.jsxs(pc,{children:[c.jsx(sl,{children:w.title}),c.jsx(td,{children:"Enter the secret to continue."})]}),P]})}):null;return{activeRequest:w,renderInline:S,form:P,dialog:F,markInlineMounted:C}}function Rvt({request:e,value:r,onValueChange:n,submitting:i,showPassword:s,onShowPasswordChange:o,remember:a,onRememberChange:l,onSubmit:d,onCancel:u,showTitle:h=!1}){return c.jsxs("div",{className:"space-y-2.5",children:[h&&c.jsxs("div",{className:"space-y-0.5",children:[c.jsx("p",{className:"text-[13px] font-medium leading-4 text-foreground",children:e.title}),c.jsx("p",{className:"text-[11px] leading-4 text-muted-foreground",children:"This prompt is attached to the running tool call."})]}),c.jsx("div",{children:c.jsxs("p",{className:"text-xs leading-5 text-muted-foreground",children:[e.prompt??"Enter the secret to continue."," ",c.jsx("span",{className:"hidden sm:inline",children:"The value goes directly to the local gateway and is not sent to the model."})]})}),c.jsxs("div",{className:"space-y-1",children:[c.jsx(di,{className:"text-xs",htmlFor:`secret-input-${e.id}`,children:"Secret"}),c.jsxs("div",{className:"relative",children:[c.jsx(Pn,{id:`secret-input-${e.id}`,type:s?"text":"password",autoComplete:"current-password",placeholder:"Password",value:r,onChange:p=>n(p.target.value),onKeyDown:p=>{p.key==="Enter"&&d()},className:"h-9 pr-10 text-sm",autoFocus:!0}),c.jsx("button",{type:"button",tabIndex:-1,className:"absolute inset-y-0 right-0 flex w-9 items-center justify-center text-muted-foreground transition-colors hover:text-foreground",onMouseDown:p=>p.preventDefault(),onClick:()=>o(p=>!p),children:s?c.jsx(Dd,{className:"h-4 w-4"}):c.jsx(Xh,{className:"h-4 w-4"})})]})]}),e.rememberable&&c.jsxs("label",{className:"flex cursor-pointer items-center gap-2 rounded-md border border-border/70 px-2.5 py-2 text-xs text-muted-foreground",children:[c.jsx("input",{type:"checkbox",className:"h-4 w-4 accent-primary",checked:a,onChange:p=>l(p.target.checked)}),c.jsxs("span",{className:"min-w-0 flex-1",children:["Remember for ",e.rememberLabel||e.prompt||e.title]})]}),c.jsxs("div",{className:"flex justify-end gap-1.5",children:[c.jsx(_e,{className:"h-8 px-3 text-xs",variant:"ghost",onClick:()=>void u(),disabled:i,children:"Cancel"}),c.jsx(_e,{className:"h-8 px-3 text-xs",onClick:()=>void d(),disabled:i||!r,children:"Submit"})]})]})}function Pvt({token:e,sessionId:r}){const[n,i]=y.useState([]),[s,o]=y.useState({}),[a,l]=y.useState(!1),d=n[0]??null,u=y.useCallback((_=!1)=>{const w={};return e&&(w.Authorization=`Bearer ${e}`),_&&(w["Content-Type"]="application/json"),w},[e]),h=y.useCallback(async()=>{if(e)try{const _=await fetch(`${ui}/api/user-questions/requests`,{headers:u(),credentials:"include"});if(!_.ok)return;const w=await _.json();i(w.requests.filter(S=>!r||S.sessionId===r))}catch{}},[u,r,e]);y.useEffect(()=>{if(!e)return;h();const _=new WebSocket(`${Phe}?token=${encodeURIComponent(e)}`);return _.onmessage=w=>{try{const S=JSON.parse(w.data);if(S.type==="user-question.requested"){const C=S.payload;(!r||C.sessionId===r)&&i(j=>[C,...j.filter(E=>E.id!==C.id)])}if(S.type==="user-question.resolved"){const C=S.payload;C.id&&(i(j=>j.filter(E=>E.id!==C.id)),o({}))}}catch{}},()=>_.close()},[h,r,e]),y.useEffect(()=>{if(!d){o({});return}o(Object.fromEntries(d.questions.map(_=>[_.id,{selected:[],freeText:null,skipped:!1}])))},[d]);const p=y.useCallback(async()=>{if(d){l(!0);try{if(!(await fetch(`${ui}/api/user-questions/requests/${d.id}/submit`,{method:"POST",headers:u(!0),credentials:"include",body:JSON.stringify({answers:s})})).ok)throw new Error("Failed to submit answers");i(w=>w.filter(S=>S.id!==d.id)),o({})}catch(_){An.error(_ instanceof Error?_.message:"Failed to submit answers")}finally{l(!1)}}},[d,s,u]),g=y.useCallback(async()=>{if(d){l(!0);try{await fetch(`${ui}/api/user-questions/requests/${d.id}/cancel`,{method:"POST",headers:u(),credentials:"include"}),i(_=>_.filter(w=>w.id!==d.id)),o({})}finally{l(!1)}}},[d,u]),v=y.useCallback((_,w)=>{o(S=>({...S,[_]:{...S[_]??{selected:[],freeText:null,skipped:!1},...w}}))},[]),b=d?c.jsx(El,{open:!0,onOpenChange:_=>{_||g()},children:c.jsxs(il,{className:"max-w-lg",children:[c.jsxs(pc,{children:[c.jsx(sl,{children:d.title}),c.jsx(td,{children:"Jait needs your input to continue."})]}),c.jsx(Lvt,{request:d,answers:s,submitting:a,onAnswerChange:v,onSubmit:p,onCancel:g})]})}):null;return{activeRequest:d,dialog:b}}function Lvt({request:e,answers:r,submitting:n,onAnswerChange:i,onSubmit:s,onCancel:o}){const a=e.questions.some(l=>{var u;const d=r[l.id];return(d==null?void 0:d.skipped)||!!((u=d==null?void 0:d.freeText)!=null&&u.trim())||((d==null?void 0:d.selected.length)??0)>0});return c.jsxs("div",{className:"space-y-4",children:[e.questions.map(l=>{var u;const d=r[l.id]??{selected:[],freeText:null};return c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx("p",{className:"text-sm font-medium leading-5 text-foreground",children:l.header}),c.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:l.question})]}),(u=l.options)!=null&&u.length?c.jsx("div",{className:"space-y-1",children:l.options.map(h=>{const p=d.selected.includes(h.label);return c.jsxs("label",{className:"flex cursor-pointer items-start gap-2 rounded-md border border-border/70 px-2.5 py-2 text-xs",children:[c.jsx("input",{type:l.multiSelect?"checkbox":"radio",name:`user-question-${e.id}-${l.id}`,className:"mt-0.5 h-4 w-4 accent-primary",checked:p,onChange:g=>{const v=l.multiSelect?g.target.checked?[...d.selected,h.label]:d.selected.filter(b=>b!==h.label):[h.label];i(l.id,{selected:v,skipped:!1})}}),c.jsxs("span",{className:"min-w-0 flex-1",children:[c.jsx("span",{className:"font-medium text-foreground",children:h.label}),h.recommended&&c.jsx("span",{className:"ml-1 text-primary",children:"Recommended"}),h.description&&c.jsx("span",{className:"block text-muted-foreground",children:h.description})]})]},h.label)})}):null,l.allowFreeformInput!==!1&&c.jsx(jp,{value:d.freeText??"",placeholder:"Type an answer...",className:"min-h-20 text-sm",onChange:h=>i(l.id,{freeText:h.target.value,skipped:!1})})]},l.id)}),c.jsxs("div",{className:"flex justify-end gap-1.5",children:[c.jsx(_e,{className:"h-8 px-3 text-xs",variant:"ghost",onClick:()=>void o(),disabled:n,children:"Cancel"}),c.jsx(_e,{className:"h-8 px-3 text-xs",onClick:()=>void s(),disabled:n||!a,children:"Submit"})]})]})}function $vt(e){const r=(e==null?void 0:e.trim())??"";return!r||r==="New Chat"||r.startsWith("Session ")}function lA(e){const r=e.replace(/\r/g,`
|
|
1481
|
+
}`;function Ehe({color:e="#1FD5F9",colorShift:r=.05,lineWidth:n=2,blur:i=.5,uniformsRef:s,ref:o,className:a,...l}){const d=y.useMemo(()=>The(e),[e]);return y.useEffect(()=>{const u=s.current;u&&(u.uLineWidth.value=n,u.uSmoothing.value=i,u.uColor.value=d??[0,.7,1],u.uColorShift.value=r)},[s,d,r,n,i]),c.jsx("div",{ref:o,className:a,...l,children:c.jsx(Ugt,{fs:nvt,devicePixelRatio:Math.min(globalThis.devicePixelRatio??1,1.5),uniforms:s.current,style:{width:"100%",height:"100%"}})})}Ehe.displayName="WaveShader";const ivt=R4(["aspect-square"],{variants:{size:{icon:"h-[24px]",sm:"h-[56px]",md:"h-[112px]",lg:"h-[224px]",xl:"h-[448px]"}},defaultVariants:{size:"lg"}});function svt({size:e="lg",state:r="speaking",color:n,colorShift:i=.05,lineWidth:s,blur:o,className:a,ref:l,...d}){const u=y.useMemo(()=>{if(s!==void 0)return s;switch(e){case"icon":case"sm":return 2;default:return 1}},[s,e]),{speed:h,amplitude:p,frequency:g,opacity:v}=rvt({state:r}),b=y.useRef({uSpeed:{type:"1f",value:h.get()},uAmplitude:{type:"1f",value:p.get()},uFrequency:{type:"1f",value:g.get()},uMix:{type:"1f",value:v.get()},uLineWidth:{type:"1f",value:u},uSmoothing:{type:"1f",value:.5},uColor:{type:"3fv",value:[0,.7,1]},uColorShift:{type:"1f",value:i}});return y.useEffect(()=>{const _=[h.on("change",w=>{b.current.uSpeed.value=w}),p.on("change",w=>{b.current.uAmplitude.value=w}),g.on("change",w=>{b.current.uFrequency.value=w}),v.on("change",w=>{b.current.uMix.value=w})];return()=>{for(const w of _)w()}},[h,p,g,v]),c.jsx(Ehe,{ref:l,"data-lk-state":r,color:n,colorShift:i,lineWidth:u,blur:o,uniformsRef:b,className:Ae(ivt({size:e}),"mask-[linear-gradient(90deg,transparent_0%,black_20%,black_80%,transparent_100%)]",a),...d})}function ovt(e,r){return`${e??""}::${r??""}`}function avt({viewMode:e,sendTarget:r,projectId:n,projectRepoId:i,repositories:s,lastAppliedKey:o}){if(e!=="developer"||r!=="thread")return null;const a=ovt(n,i);return o===a?null:i?s.some(l=>l.id===i)?{nextAppliedKey:a,repoId:i}:null:{nextAppliedKey:a,repoId:null}}const Ahe=16,lvt=280,cvt=200;function E4(e,r,n){return Math.min(Math.max(e,r),n)}function F3({size:e,viewport:r,margin:n=Ahe}){const i=Math.max(220,r.width-n*2),s=Math.max(160,r.height-n*2),o=Math.min(lvt,i),a=Math.min(cvt,s);return{w:E4(e.w,o,i),h:E4(e.h,a,s)}}function Z_({position:e,size:r,viewport:n}){return{x:E4(e.x,0,Math.max(0,n.width-r.w)),y:E4(e.y,0,Math.max(0,n.height-r.h))}}function uvt({size:e,viewport:r,margin:n=Ahe}){return Z_({position:{x:r.width-e.w-n,y:r.height-e.h-n},size:e,viewport:r})}function YL(e){return e.status==="running"}function dvt(e){return{disableSendTargetSelector:e.isLoadingHistory,showTodoList:!e.developerChatHydrating&&e.todoCount>0}}function hvt(e){return e.viewMode!=="developer"||e.currentView!=="chat"||e.requiresAuthGate?!1:e.authLoading||e.projectsLoading?!0:e.activeSessionId?e.isLoadingHistory||e.loadingChatMode||e.loadingProviderRuntimeMode||e.loadingCliModels||e.loadingChatView:!1}const Ohe=new Set(["ssh.run","run.ssh","ssh.session.start"]),fvt=new Set([...Ohe,"elevated.run","terminal.run","jait.terminal","execute"]);function JG(e){return Ohe.has(e)}function ZG(e){const r=e.replace(/^functions\./,""),n=r.match(/^[^/]+\/(.+)$/);if(n!=null&&n[1])return tu(n[1]);const i=r.match(/^mcp\.[^.]+\.(.+)$/);if(i!=null&&i[1])return tu(i[1]);const s=r.match(/^mcp__[^.]+\.(.+)$/);if(s!=null&&s[1])return tu(s[1]);const o=r.match(/^mcp__[^_]+__(.+)$/);return o!=null&&o[1]?tu(o[1].replace(/^\./,"")):null}function Z1(e){return e?fvt.has(e.requestedBy??"")||e.title==="SSH password"||e.title==="Administrator password"||e.title==="Terminal input required":!1}function pvt(e){return!!(e&&!Z1(e))}function mvt(e,r,n){if(!Z1(e))return!1;const i=tu(r),s=ZG(r);if(e!=null&&e.requestedBy&&(e.requestedBy===r||e.requestedBy===i||e.requestedBy===s))return!0;if((r==="mcp-tool"||i.startsWith("mcp."))&&n){const a=KN(ru(r,n)),l=a.title?ZG(a.title)??tu(a.title):"";if(e!=null&&e.requestedBy&&e.requestedBy===l)return!0;if((e==null?void 0:e.title)==="SSH password")return JG(l);if((e==null?void 0:e.title)==="Terminal input required")return l==="terminal.run"||l==="jait.terminal"||l==="execute"}const o=s??i;return(e==null?void 0:e.title)==="SSH password"?JG(o):(e==null?void 0:e.title)==="Administrator password"?o==="elevated.run":(e==null?void 0:e.title)==="Terminal input required"?o==="terminal.run"||o==="jait.terminal"||o==="execute":!1}function Mhe(e){return Array.isArray(e)?e:[]}function gvt(e,r){const n=Mhe(r);return e.length>0&&n.length===0?e:n}function yvt(e){return e.length>0?e:null}function QG(e,r){return r?e.tree?{tree:!0,editor:!1}:e.editor?B0("editor"):OS():!e.tree&&!e.editor?{tree:!1,editor:!0}:e}function OS(){return{tree:!1,editor:!1}}function B0(e){return e==="tree"?{tree:!0,editor:!1}:{tree:!1,editor:!0}}function vvt(e="background"){return e==="editor"?B0("editor"):OS()}function eK(e,r){const n=r==="tree"?e.tree:e.editor,i=r==="tree"?e.editor:e.tree;return n&&!i?OS():B0(r)}function Rhe(e){return e.showTerminal?"terminal":e.showProject?e.showProjectEditor?"editor":e.showProjectTree?e.treeTab:null:null}function Pm(e,r){return Rhe(e)===r}function tK(e){return!!e&&/[\p{L}\p{N}]/u.test(e)}function xvt(e){return e==="'"||e==="’"}function bvt(e){var r;return((r=e.match(/[\p{L}\p{N}'’]+$/u))==null?void 0:r[0])??""}function tR(e){return e.replace(/\s+/g," ").trim()}function _vt(e,r,n){if(n>=3)return!0;const i=e[e.length-n-1],s=r[n];if(n===2&&tK(i)&&s&&!tK(s)&&!/\s/.test(s))return!0;const o=bvt(e);return n===1&&o.length===1&&xvt(s)}function wvt(e,r){const n=Math.min(e.length,r.length,240);for(let i=n;i>0;i--)if(_vt(e,r,i)&&e.endsWith(r.slice(0,i)))return i;return 0}function Svt(e,r){const n=tR(e),i=tR(r);if(!i)return n;if(!n)return i;if(n.endsWith(i))return n;if(i.startsWith(n))return i;const s=wvt(n,i);return s>0?`${n}${i.slice(s)}`.trim():`${n} ${i}`}const ui=Kn(),Phe=by(),Lhe=28,rR=.05,$he="jait.viewMode";function fv(e){return e.replace(/\\/g,"/").replace(/\/+$/,"")}function kvt(e,r){const n=fv(e);if(!r)return n;const i=fv(r);return n.startsWith(`${i}/`)?n.slice(i.length+1):n}function Cvt(e,r){const n=new Map;if(!e)return n;const i=(s,o,a)=>{const l=fv(s),d=n.get(l)??{insertions:0,deletions:0};n.set(l,{insertions:d.insertions+o,deletions:d.deletions+a})};for(const s of[...e.index.files,...e.workingTree.files])i(s.path,s.insertions,s.deletions),r&&i(`${fv(r)}/${fv(s.path)}`,s.insertions,s.deletions);return n}function jvt(e,r,n){const i=Cvt(r,n);return i.size===0?e:e.map(s=>{const o=fv(s.path),a=kvt(s.path,n),l=i.get(o)??i.get(a);return l?{...s,...l}:s})}function Nvt(e,r){return e.length!==r.length?!1:e.every((n,i)=>{const s=r[i];return s&&n.path===s.path&&n.name===s.name&&n.kind===s.kind})}function Tvt(e,r){return(e==null?void 0:e.surfaceId)===(r==null?void 0:r.surfaceId)&&(e==null?void 0:e.projectRoot)===(r==null?void 0:r.projectRoot)&&((e==null?void 0:e.nodeId)??"gateway")===((r==null?void 0:r.nodeId)??"gateway")}function Evt(e,r){const n=r.panel?{open:r.panel.open,remotePath:r.panel.remotePath,nodeId:r.panel.nodeId}:null;return JSON.stringify({projectId:e,panel:n,tabs:r.tabs,layout:r.layout,terminal:r.terminal,preview:r.preview})}function rK(e,r){return JSON.stringify(e??null)===JSON.stringify(r??null)}function nK(){return typeof window>"u"?"developer":window.localStorage.getItem($he)==="manager"?"manager":"developer"}function Avt({requestId:e,onMount:r,children:n}){return y.useEffect(()=>{r(e)},[e,r]),c.jsx(c.Fragment,{children:n})}const Ovt=500;function Mvt({token:e,sessionId:r}){const[n,i]=y.useState([]),[s,o]=y.useState(""),[a,l]=y.useState(!1),[d,u]=y.useState(!1),[h,p]=y.useState(!1),[g,v]=y.useState(null),[b,_]=y.useState(!1),w=n[0]??null,S=Z1(w);y.useEffect(()=>{if(v(null),_(!1),!w||!Z1(w))return;const B=setTimeout(()=>_(!0),Ovt);return()=>clearTimeout(B)},[w==null?void 0:w.id]);const C=y.useCallback(B=>{v(B)},[]),j=y.useCallback((B=!1)=>{const W={};return e&&(W.Authorization=`Bearer ${e}`),B&&(W["Content-Type"]="application/json"),W},[e]),E=y.useCallback(async()=>{if(e)try{const B=await fetch(`${ui}/api/secrets/requests`,{headers:j(),credentials:"include"});if(!B.ok)return;const W=await B.json();i(W.requests.filter(D=>!r||D.sessionId===r||Z1(D)))}catch{}},[j,r,e]);y.useEffect(()=>{if(!e)return;E();const B=new WebSocket(`${Phe}?token=${encodeURIComponent(e)}`);return B.onmessage=W=>{try{const D=JSON.parse(W.data);if(D.type==="secret.requested"){const O=D.payload;(!r||O.sessionId===r||Z1(O))&&i(I=>[O,...I.filter(R=>R.id!==O.id)])}if(D.type==="secret.resolved"){const O=D.payload;O.id&&(i(I=>I.filter(R=>R.id!==O.id)),o(""),l(!1))}}catch{}},()=>B.close()},[E,r,e]);const A=y.useCallback(async()=>{if(!(!w||!s)){u(!0);try{if(!(await fetch(`${ui}/api/secrets/requests/${w.id}/submit`,{method:"POST",headers:j(!0),credentials:"include",body:JSON.stringify({value:s,remember:w.rememberable?a:!1})})).ok)throw new Error("Failed to submit secret");i(W=>W.filter(D=>D.id!==w.id)),o(""),l(!1)}catch(B){An.error(B instanceof Error?B.message:"Failed to submit secret")}finally{u(!1)}}},[w,j,a,s]),N=y.useCallback(async()=>{if(w){u(!0);try{await fetch(`${ui}/api/secrets/requests/${w.id}/cancel`,{method:"POST",headers:j(),credentials:"include"}),i(B=>B.filter(W=>W.id!==w.id)),o(""),l(!1)}finally{u(!1)}}},[w,j]),P=w?c.jsx(Rvt,{request:w,value:s,onValueChange:o,submitting:d,showPassword:h,onShowPasswordChange:p,remember:a,onRememberChange:l,onSubmit:A,onCancel:N,showTitle:S}):null,H=w?g===w.id:!1,F=!!w&&(pvt(w)||S&&b&&!H)&&w?c.jsx(El,{open:!0,onOpenChange:B=>{B||N()},children:c.jsxs(il,{children:[c.jsxs(pc,{children:[c.jsx(sl,{children:w.title}),c.jsx(td,{children:"Enter the secret to continue."})]}),P]})}):null;return{activeRequest:w,renderInline:S,form:P,dialog:F,markInlineMounted:C}}function Rvt({request:e,value:r,onValueChange:n,submitting:i,showPassword:s,onShowPasswordChange:o,remember:a,onRememberChange:l,onSubmit:d,onCancel:u,showTitle:h=!1}){return c.jsxs("div",{className:"space-y-2.5",children:[h&&c.jsxs("div",{className:"space-y-0.5",children:[c.jsx("p",{className:"text-[13px] font-medium leading-4 text-foreground",children:e.title}),c.jsx("p",{className:"text-[11px] leading-4 text-muted-foreground",children:"This prompt is attached to the running tool call."})]}),c.jsx("div",{children:c.jsxs("p",{className:"text-xs leading-5 text-muted-foreground",children:[e.prompt??"Enter the secret to continue."," ",c.jsx("span",{className:"hidden sm:inline",children:"The value goes directly to the local gateway and is not sent to the model."})]})}),c.jsxs("div",{className:"space-y-1",children:[c.jsx(di,{className:"text-xs",htmlFor:`secret-input-${e.id}`,children:"Secret"}),c.jsxs("div",{className:"relative",children:[c.jsx(Pn,{id:`secret-input-${e.id}`,type:s?"text":"password",autoComplete:"current-password",placeholder:"Password",value:r,onChange:p=>n(p.target.value),onKeyDown:p=>{p.key==="Enter"&&d()},className:"h-9 pr-10 text-sm",autoFocus:!0}),c.jsx("button",{type:"button",tabIndex:-1,className:"absolute inset-y-0 right-0 flex w-9 items-center justify-center text-muted-foreground transition-colors hover:text-foreground",onMouseDown:p=>p.preventDefault(),onClick:()=>o(p=>!p),children:s?c.jsx(Dd,{className:"h-4 w-4"}):c.jsx(Xh,{className:"h-4 w-4"})})]})]}),e.rememberable&&c.jsxs("label",{className:"flex cursor-pointer items-center gap-2 rounded-md border border-border/70 px-2.5 py-2 text-xs text-muted-foreground",children:[c.jsx("input",{type:"checkbox",className:"h-4 w-4 accent-primary",checked:a,onChange:p=>l(p.target.checked)}),c.jsxs("span",{className:"min-w-0 flex-1",children:["Remember for ",e.rememberLabel||e.prompt||e.title]})]}),c.jsxs("div",{className:"flex justify-end gap-1.5",children:[c.jsx(_e,{className:"h-8 px-3 text-xs",variant:"ghost",onClick:()=>void u(),disabled:i,children:"Cancel"}),c.jsx(_e,{className:"h-8 px-3 text-xs",onClick:()=>void d(),disabled:i||!r,children:"Submit"})]})]})}function Pvt({token:e,sessionId:r}){const[n,i]=y.useState([]),[s,o]=y.useState({}),[a,l]=y.useState(!1),d=n[0]??null,u=y.useCallback((_=!1)=>{const w={};return e&&(w.Authorization=`Bearer ${e}`),_&&(w["Content-Type"]="application/json"),w},[e]),h=y.useCallback(async()=>{if(e)try{const _=await fetch(`${ui}/api/user-questions/requests`,{headers:u(),credentials:"include"});if(!_.ok)return;const w=await _.json();i(w.requests)}catch{}},[u,r,e]);y.useEffect(()=>{if(!e)return;h();const _=new WebSocket(`${Phe}?token=${encodeURIComponent(e)}`);return _.onmessage=w=>{try{const S=JSON.parse(w.data);if(S.type==="user-question.requested"){const C=S.payload;i(j=>[C,...j.filter(E=>E.id!==C.id)])}if(S.type==="user-question.resolved"){const C=S.payload;C.id&&(i(j=>j.filter(E=>E.id!==C.id)),o({}))}}catch{}},()=>_.close()},[h,r,e]),y.useEffect(()=>{if(!d){o({});return}o(Object.fromEntries(d.questions.map(_=>[_.id,{selected:[],freeText:null,skipped:!1}])))},[d]);const p=y.useCallback(async()=>{if(d){l(!0);try{if(!(await fetch(`${ui}/api/user-questions/requests/${d.id}/submit`,{method:"POST",headers:u(!0),credentials:"include",body:JSON.stringify({answers:s})})).ok)throw new Error("Failed to submit answers");i(w=>w.filter(S=>S.id!==d.id)),o({})}catch(_){An.error(_ instanceof Error?_.message:"Failed to submit answers")}finally{l(!1)}}},[d,s,u]),g=y.useCallback(async()=>{if(d){l(!0);try{await fetch(`${ui}/api/user-questions/requests/${d.id}/cancel`,{method:"POST",headers:u(),credentials:"include"}),i(_=>_.filter(w=>w.id!==d.id)),o({})}finally{l(!1)}}},[d,u]),v=y.useCallback((_,w)=>{o(S=>({...S,[_]:{...S[_]??{selected:[],freeText:null,skipped:!1},...w}}))},[]),b=d?c.jsx(El,{open:!0,onOpenChange:_=>{_||g()},children:c.jsxs(il,{className:"max-w-lg",children:[c.jsxs(pc,{children:[c.jsx(sl,{children:d.title}),c.jsx(td,{children:"Jait needs your input to continue."})]}),c.jsx(Lvt,{request:d,answers:s,submitting:a,onAnswerChange:v,onSubmit:p,onCancel:g})]})}):null;return{activeRequest:d,dialog:b}}function Lvt({request:e,answers:r,submitting:n,onAnswerChange:i,onSubmit:s,onCancel:o}){const a=e.questions.some(l=>{var u;const d=r[l.id];return(d==null?void 0:d.skipped)||!!((u=d==null?void 0:d.freeText)!=null&&u.trim())||((d==null?void 0:d.selected.length)??0)>0});return c.jsxs("div",{className:"space-y-4",children:[e.questions.map(l=>{var u;const d=r[l.id]??{selected:[],freeText:null};return c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"space-y-0.5",children:[c.jsx("p",{className:"text-sm font-medium leading-5 text-foreground",children:l.header}),c.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:l.question})]}),(u=l.options)!=null&&u.length?c.jsx("div",{className:"space-y-1",children:l.options.map(h=>{const p=d.selected.includes(h.label);return c.jsxs("label",{className:"flex cursor-pointer items-start gap-2 rounded-md border border-border/70 px-2.5 py-2 text-xs",children:[c.jsx("input",{type:l.multiSelect?"checkbox":"radio",name:`user-question-${e.id}-${l.id}`,className:"mt-0.5 h-4 w-4 accent-primary",checked:p,onChange:g=>{const v=l.multiSelect?g.target.checked?[...d.selected,h.label]:d.selected.filter(b=>b!==h.label):[h.label];i(l.id,{selected:v,skipped:!1})}}),c.jsxs("span",{className:"min-w-0 flex-1",children:[c.jsx("span",{className:"font-medium text-foreground",children:h.label}),h.recommended&&c.jsx("span",{className:"ml-1 text-primary",children:"Recommended"}),h.description&&c.jsx("span",{className:"block text-muted-foreground",children:h.description})]})]},h.label)})}):null,l.allowFreeformInput!==!1&&c.jsx(jp,{value:d.freeText??"",placeholder:"Type an answer...",className:"min-h-20 text-sm",onChange:h=>i(l.id,{freeText:h.target.value,skipped:!1})})]},l.id)}),c.jsxs("div",{className:"flex justify-end gap-1.5",children:[c.jsx(_e,{className:"h-8 px-3 text-xs",variant:"ghost",onClick:()=>void o(),disabled:n,children:"Cancel"}),c.jsx(_e,{className:"h-8 px-3 text-xs",onClick:()=>void s(),disabled:n||!a,children:"Submit"})]})]})}function $vt(e){const r=(e==null?void 0:e.trim())??"";return!r||r==="New Chat"||r.startsWith("Session ")}function lA(e){const r=e.replace(/\r/g,`
|
|
1482
1482
|
`).split(`
|
|
1483
1483
|
`).map(i=>i.trim()).find(Boolean)??"";if(!r)return"";const n=r.replace(/\s+/g," ").trim();return n.length>80?`${n.slice(0,77).trimEnd()}...`:n}function H3(e,r){const n=[...e??[]];for(const i of r??[])i.mimeType.startsWith("image/")&&n.push({type:"image",name:i.name,mimeType:i.mimeType,data:i.data});return n.length>0?n:void 0}function cA(){return Array.from({length:Lhe},()=>rR)}function Dvt(e,r=220){var s,o;const n=e.replace(/```[\s\S]*?```/g," code omitted ").replace(/`([^`]+)`/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[#>*_~-]+/g," ").replace(/\s+/g," ").trim();if(!n)return"";const i=((o=(s=n.match(/[^.!?]+[.!?]/))==null?void 0:s[0])==null?void 0:o.trim())??n;return i.length<=r?i:`${i.slice(0,r-1).trimEnd()}…`}function uA(e){const r=(e==null?void 0:e.trim())||"";return r&&r!=="__preview__"?r:null}function W3(e,r){return typeof e!="string"?r:e.trim()||r}function Ivt(e,r,n){return[{type:"file",path:e.path,name:e.name,...e.kind?{kind:e.kind}:{},lineRange:{startLine:r,endLine:n}}]}function Bvt(e,r,n,i){const s=Math.max(1,r.split(/\r?\n/).length),o=n&&i&&i>=n?{startLine:n,endLine:i}:{startLine:1,endLine:s};return[{type:"terminal",terminalId:e.terminalId,name:e.name,...e.projectRoot?{projectRoot:e.projectRoot}:{},lineRange:o,selectedText:r.trim()}]}function zvt(e){var s,o,a;const r=((s=e.name)==null?void 0:s.trim())||((o=e.text)==null?void 0:o.trim())||((a=e.placeholder)==null?void 0:a.trim())||"unnamed element";return[{type:"text",text:`${[`Selected preview element: ${e.role??e.tagName??"element"} "${r}"`,e.selector?`Selector: ${e.selector}`:null,e.placeholder?`Placeholder: ${e.placeholder}`:null,e.value?`Value: ${e.value}`:null].filter(Boolean).join(`
|
|
1484
1484
|
`)}
|