@imenam/mcp-feature-analyzer 1.0.32 → 1.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/src/core/review-actions.d.ts +4 -1
- package/dist/src/core/review-actions.js +6 -2
- package/gui/dist/assets/{angular-html-CCsi6pU-.js → angular-html-C_Umbo_o.js} +1 -1
- package/gui/dist/assets/{angular-ts-D3b0p2ec.js → angular-ts-BS5NFEKQ.js} +1 -1
- package/gui/dist/assets/{apl-B_lcYoHG.js → apl-BXNp6RaU.js} +1 -1
- package/gui/dist/assets/{astro-C8m0ax-G.js → astro-1di0oIiS.js} +1 -1
- package/gui/dist/assets/{blade-BTaoP0KJ.js → blade-bFPOELdA.js} +1 -1
- package/gui/dist/assets/{c-SDXfbR0a.js → c-BLZ_xWbb.js} +1 -1
- package/gui/dist/assets/{chapel-CvA97ZeU.js → chapel-C_HSM6Pq.js} +1 -1
- package/gui/dist/assets/{cobol-CVtUeO01.js → cobol-DXoz67hJ.js} +1 -1
- package/gui/dist/assets/{coffee-hRo5RQ8B.js → coffee-DlhFbGsO.js} +1 -1
- package/gui/dist/assets/{cpp-BxoU2Hxs.js → cpp-BaCMyKr2.js} +1 -1
- package/gui/dist/assets/{crystal-CcX36hHQ.js → crystal-CJURYNNT.js} +1 -1
- package/gui/dist/assets/{css-CxWhmvIC.js → css-CX_LiCz_.js} +1 -1
- package/gui/dist/assets/{edge-QJOy4xlO.js → edge-CTUGxEgV.js} +1 -1
- package/gui/dist/assets/{elixir-C9LrWwAh.js → elixir-CQwEci3v.js} +1 -1
- package/gui/dist/assets/{elm-BR3U0yD_.js → elm-BkLKshkr.js} +1 -1
- package/gui/dist/assets/{erb-CiOJpaDo.js → erb-1YN1e0vJ.js} +1 -1
- package/gui/dist/assets/{git-rebase-BYl4P3ox.js → git-rebase-BKS3kIrK.js} +1 -1
- package/gui/dist/assets/{glimmer-js-Blh2OVv1.js → glimmer-js-CcF_d66k.js} +1 -1
- package/gui/dist/assets/{glimmer-ts-DXr9mcSj.js → glimmer-ts-CY0XDie9.js} +1 -1
- package/gui/dist/assets/{glsl-CnZQZULb.js → glsl-DccBV_n0.js} +1 -1
- package/gui/dist/assets/{graphql-8Rdi2_E3.js → graphql-C2PFH9th.js} +1 -1
- package/gui/dist/assets/{hack-CKSTrDJQ.js → hack-BCI4tEad.js} +1 -1
- package/gui/dist/assets/{haml-BXUwL6Gi.js → haml-QnmUImKG.js} +1 -1
- package/gui/dist/assets/{handlebars-CoB9_4Wu.js → handlebars-CPd4ATQH.js} +1 -1
- package/gui/dist/assets/{html-B6C5qCrz.js → html-BgGOZsTs.js} +1 -1
- package/gui/dist/assets/{html-derivative-Bk9jovvn.js → html-derivative-DtSxVTSr.js} +1 -1
- package/gui/dist/assets/{http-BjGXUZ-r.js → http-VJ1JqsCP.js} +1 -1
- package/gui/dist/assets/{hurl-DTlVMspc.js → hurl-Byqf3Q4J.js} +1 -1
- package/gui/dist/assets/index-BG2CQy-I.css +1 -0
- package/gui/dist/assets/{index-dM30WmvE.js → index-D1uZtbvJ.js} +4 -4
- package/gui/dist/assets/{java-Bh1jVWfi.js → java-B_nJOiTG.js} +1 -1
- package/gui/dist/assets/{javascript-CAp5Mnzl.js → javascript-DffeUEnj.js} +1 -1
- package/gui/dist/assets/{jinja-rB-QNUyu.js → jinja-M0zKdCfa.js} +1 -1
- package/gui/dist/assets/{jison-VA6AlkMv.js → jison-BT0-M0gS.js} +1 -1
- package/gui/dist/assets/{json-D_3nkZlx.js → json-DmyuI1nx.js} +1 -1
- package/gui/dist/assets/{jsx-vCtnSopd.js → jsx-rE32VeXB.js} +1 -1
- package/gui/dist/assets/{julia-DzWcxIlS.js → julia-DjyTg-6t.js} +1 -1
- package/gui/dist/assets/{just-Cib470fM.js → just-CK65S3r8.js} +1 -1
- package/gui/dist/assets/{latex-B9Rt9Nm7.js → latex-94zewxls.js} +1 -1
- package/gui/dist/assets/{liquid-CpUpBdB-.js → liquid-Dl0qLBwx.js} +1 -1
- package/gui/dist/assets/{lua-ABZXQo7L.js → lua-CjD63HfG.js} +1 -1
- package/gui/dist/assets/{marko-BqS1ITvl.js → marko-CBzovuJ1.js} +1 -1
- package/gui/dist/assets/{mdc-BU5NTqUw.js → mdc-B89wcoMe.js} +1 -1
- package/gui/dist/assets/{nginx-CPJvj-oD.js → nginx-BtCSV7rr.js} +1 -1
- package/gui/dist/assets/{nim-DP5c8JP-.js → nim-BT2sttEd.js} +1 -1
- package/gui/dist/assets/{org-z8oygnoy.js → org-DyhV0u0R.js} +1 -1
- package/gui/dist/assets/{perl-BOKTfCaa.js → perl-B0H1z4iL.js} +1 -1
- package/gui/dist/assets/{php-Bxp7SLwc.js → php-BPT4W6n1.js} +1 -1
- package/gui/dist/assets/{pug-YbOie-Gt.js → pug-BoCt7RDl.js} +1 -1
- package/gui/dist/assets/{qml-BoW83Fyx.js → qml-Cb4Cd08W.js} +1 -1
- package/gui/dist/assets/{r-BOTGEI5j.js → r-fe_4bIGN.js} +1 -1
- package/gui/dist/assets/{razor-Ci4nB3jF.js → razor-dDhRcZ_O.js} +1 -1
- package/gui/dist/assets/{regexp-BumEaKrn.js → regexp-B7rcDdRa.js} +1 -1
- package/gui/dist/assets/{rst-DtqBiJDu.js → rst-DjeWGJRw.js} +1 -1
- package/gui/dist/assets/{ruby-D1kPpSHI.js → ruby-Dx3POAAI.js} +1 -1
- package/gui/dist/assets/{sas-14YEmckC.js → sas-CZOq7qCQ.js} +1 -1
- package/gui/dist/assets/{scss-DFjEDCH3.js → scss-DhFtC8D4.js} +1 -1
- package/gui/dist/assets/{shellscript-DPod_v0w.js → shellscript-Djdriz3m.js} +1 -1
- package/gui/dist/assets/{shellsession-tu7P7CZw.js → shellsession-Dkak5s2P.js} +1 -1
- package/gui/dist/assets/{soy-CGE1c2SC.js → soy-CqlitY2w.js} +1 -1
- package/gui/dist/assets/{sql-CaS7isii.js → sql-BrLHRKP1.js} +1 -1
- package/gui/dist/assets/{stata-Q1HKOyRT.js → stata-CZpBofQo.js} +1 -1
- package/gui/dist/assets/{surrealql-BtSPewz7.js → surrealql-DI5AQTqZ.js} +1 -1
- package/gui/dist/assets/{svelte-U6EZswjv.js → svelte-U4k0rBt4.js} +1 -1
- package/gui/dist/assets/{templ-Dv6Hh6ZK.js → templ-jjK4_r-Y.js} +1 -1
- package/gui/dist/assets/{tex-FNxy8pwc.js → tex-BwNS-MeE.js} +1 -1
- package/gui/dist/assets/{ts-tags-QwSPCwFk.js → ts-tags-CJ1vUXbL.js} +1 -1
- package/gui/dist/assets/{tsx-DD4r3epl.js → tsx-BwmOEMnR.js} +1 -1
- package/gui/dist/assets/{twig-CF2Q5rKi.js → twig-hj02oBmU.js} +1 -1
- package/gui/dist/assets/{typescript-BH94Wa6R.js → typescript-BnHEhDG5.js} +1 -1
- package/gui/dist/assets/{typst-FVLFkJ8V.js → typst-9zNH6XOp.js} +1 -1
- package/gui/dist/assets/{vue-html-BK18RzGS.js → vue-html-unwCMN4c.js} +1 -1
- package/gui/dist/assets/{vue-vine-Ca-3XU_O.js → vue-vine-C-RiGvWN.js} +1 -1
- package/gui/dist/assets/{vue-CgIy39RZ.js → vue-wqTzy8u9.js} +1 -1
- package/gui/dist/assets/{xml-CrlmnYy6.js → xml-2pQenJRT.js} +1 -1
- package/gui/dist/assets/{xsl-CTdshCNA.js → xsl-B_MbLqZj.js} +1 -1
- package/gui/dist/assets/{yaml-DVKeB6J_.js → yaml-COm5VSZw.js} +1 -1
- package/gui/dist/index.html +2 -2
- package/package.json +1 -1
- package/gui/dist/assets/index-Cr9HJaGX.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./angular-html-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./angular-html-C_Umbo_o.js","./html-BgGOZsTs.js","./javascript-DffeUEnj.js","./css-CX_LiCz_.js","./angular-ts-BS5NFEKQ.js","./scss-DhFtC8D4.js","./apl-BXNp6RaU.js","./xml-2pQenJRT.js","./java-B_nJOiTG.js","./json-DmyuI1nx.js","./astro-1di0oIiS.js","./typescript-BnHEhDG5.js","./postcss-BXeXVLqQ.js","./tsx-BwmOEMnR.js","./blade-bFPOELdA.js","./html-derivative-DtSxVTSr.js","./sql-BrLHRKP1.js","./bsl-_VjlB9mv.js","./sdbl-bTVj8UrX.js","./cairo-DLTphjLi.js","./python-gzcpVVnB.js","./chapel-C_HSM6Pq.js","./c-BLZ_xWbb.js","./cobol-DXoz67hJ.js","./coffee-DlhFbGsO.js","./cpp-BaCMyKr2.js","./regexp-B7rcDdRa.js","./glsl-DccBV_n0.js","./crystal-CJURYNNT.js","./shellscript-Djdriz3m.js","./edge-CTUGxEgV.js","./elixir-CQwEci3v.js","./elm-BkLKshkr.js","./erb-1YN1e0vJ.js","./ruby-Dx3POAAI.js","./haml-QnmUImKG.js","./graphql-C2PFH9th.js","./jsx-rE32VeXB.js","./lua-CjD63HfG.js","./yaml-COm5VSZw.js","./erlang-Cphh6RMH.js","./markdown-BYOwaDjH.js","./fortran-fixed-form-DEKoE2YW.js","./fortran-free-form-CYNrtFtB.js","./fsharp-D13ZGOAj.js","./gdresource-xMC7jr7x.js","./gdshader-CBce3t8t.js","./gdscript-DYvRD3hg.js","./git-commit-BSykSTBG.js","./diff-woXpYk--.js","./git-rebase-BKS3kIrK.js","./glimmer-js-CcF_d66k.js","./glimmer-ts-CY0XDie9.js","./hack-BCI4tEad.js","./handlebars-CPd4ATQH.js","./http-VJ1JqsCP.js","./hurl-Byqf3Q4J.js","./csv-Dx-8-gkx.js","./hxml-Dcm88srW.js","./haxe-C8oCnwJJ.js","./jinja-M0zKdCfa.js","./jison-BT0-M0gS.js","./julia-DjyTg-6t.js","./r-fe_4bIGN.js","./just-CK65S3r8.js","./perl-B0H1z4iL.js","./latex-94zewxls.js","./tex-BwNS-MeE.js","./liquid-Dl0qLBwx.js","./marko-CBzovuJ1.js","./less-DVTAwKKz.js","./mdc-B89wcoMe.js","./nextflow-CSgcYZcx.js","./nextflow-groovy-D7IRt6Pp.js","./nginx-BtCSV7rr.js","./nim-BT2sttEd.js","./org-DyhV0u0R.js","./clojure-DqKBuwfJ.js","./csharp-dmMxLVLW.js","./dart-CHZY9Xhz.js","./docker-IyjqRm3v.js","./go-rLFTqkRN.js","./groovy-CacY0gHj.js","./ini-B5eOa1yu.js","./make-Dixweg8N.js","./objective-c-D1A_Heim.js","./ocaml-O90oeIOV.js","./php-BPT4W6n1.js","./vb-DOwzaHZ0.js","./raku-B3gFvitq.js","./rust-DpiIf5JO.js","./scala-BiFt_7mu.js","./zig-CMLA9XwU.js","./xsl-B_MbLqZj.js","./pug-BoCt7RDl.js","./qml-Cb4Cd08W.js","./razor-dDhRcZ_O.js","./rst-DjeWGJRw.js","./cmake-Bj61d0ZC.js","./sas-CZOq7qCQ.js","./shaderlab-TOUzSsQk.js","./hlsl-Cvrh5tZx.js","./shellsession-Dkak5s2P.js","./soy-CqlitY2w.js","./sparql-D_iOobhT.js","./turtle-ByJddavk.js","./stata-CZpBofQo.js","./surrealql-DI5AQTqZ.js","./svelte-U4k0rBt4.js","./templ-jjK4_r-Y.js","./ts-tags-CJ1vUXbL.js","./twig-hj02oBmU.js","./typst-9zNH6XOp.js","./bat-qdxAdBWQ.js","./bibtex-Ci_nEsc7.js","./jsonc-CYpm1nAK.js","./log-BNLmms1o.js","./powershell-QtSnmXcu.js","./swift-CyEgAFGc.js","./system-verilog-Dh5ihWbf.js","./verilog-B2gwz-sJ.js","./vue-wqTzy8u9.js","./vue-html-unwCMN4c.js","./vue-vine-C-RiGvWN.js","./stylus-B6D30XZt.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},ee=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function te(e,t){return E(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function O(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function ne(e,t){return typeof e==`object`&&e&&e.key!=null?O(``+e.key):t.toString(36)}function re(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ie(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ie(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ne(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),ie(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=te(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ne(a,u),c+=ie(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ne(a,u++),c+=ie(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ie(re(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ae(e,t,n){if(e==null)return e;var r=[],i=0;return ie(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function oe(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var se=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function ce(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,se)}catch(e){se(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function le(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else ce(le.bind(null,e))}var A={map:ae,forEach:function(e,t,n){ae(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ae(e,function(){t++}),t},toArray:function(e){return ae(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=A,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=le,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!ee.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)ee.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:oe}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ce,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,te());else{var t=n(l);t!==null&&k(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function ee(){return g?!0:!(e.unstable_now()-T<w)}function E(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ee());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&k(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?te():S=!1}}}var te;if(typeof y==`function`)te=function(){y(E)};else if(typeof MessageChannel<`u`){var D=new MessageChannel,O=D.port2;D.port1.onmessage=E,te=function(){O.postMessage(null)}}else te=function(){_(E,0)};function k(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,k(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,te()))),r},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.0`})),h=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function m(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&m(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function ee(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var E=Object.assign,te=Symbol.for(`react.element`),D=Symbol.for(`react.transitional.element`),O=Symbol.for(`react.portal`),k=Symbol.for(`react.fragment`),ne=Symbol.for(`react.strict_mode`),re=Symbol.for(`react.profiler`),ie=Symbol.for(`react.consumer`),ae=Symbol.for(`react.context`),oe=Symbol.for(`react.forward_ref`),se=Symbol.for(`react.suspense`),ce=Symbol.for(`react.suspense_list`),le=Symbol.for(`react.memo`),A=Symbol.for(`react.lazy`),ue=Symbol.for(`react.activity`),de=Symbol.for(`react.legacy_hidden`),fe=Symbol.for(`react.memo_cache_sentinel`),pe=Symbol.for(`react.view_transition`),me=Symbol.for(`react.recoverable`),he=Symbol.iterator;function ge(e){return typeof e!=`object`||!e?null:(e=he&&e[he]||e[`@@iterator`],typeof e==`function`?e:null)}var _e=Symbol.for(`react.client.reference`);function ve(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===_e?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case k:return`Fragment`;case re:return`Profiler`;case ne:return`StrictMode`;case se:return`Suspense`;case ce:return`SuspenseList`;case ue:return`Activity`;case pe:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case O:return`Portal`;case ae:return e.displayName||`Context`;case ie:return(e._context.displayName||`Context`)+`.Consumer`;case oe:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case le:return t=e.displayName||null,t===null?ve(e.type)||`Memo`:t;case A:t=e._payload,e=e._init;try{return ve(e(t))}catch{}}return null}var ye=Array.isArray,j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,be={pending:!1,data:null,method:null,action:null},xe=[],Se=-1;function Ce(e){return{current:e}}function we(e){0>Se||(e.current=xe[Se],xe[Se]=null,Se--)}function N(e,t){Se++,xe[Se]=e.current,e.current=t}var Te=Ce(null),Ee=Ce(null),De=Ce(null),Oe=Ce(null);function ke(e,t){switch(N(De,t),N(Ee,e),N(Te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?pp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=pp(t),e=mp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}we(Te),N(Te,e)}function Ae(){we(Te),we(Ee),we(De)}function je(e){var t=e.memoizedState;t!==null&&(uh._currentValue=t.memoizedState,N(Oe,e)),t=Te.current;var n=mp(t,e.type);t!==n&&(N(Ee,e),N(Te,n))}function Me(e){Ee.current===e&&(we(Te),we(Ee)),Oe.current===e&&(we(Oe),uh._currentValue=be)}var Ne,Pe;function Fe(e){if(Ne===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ne=t&&t[1]||``,Pe=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+Ne+e+Pe}var Ie=!1;function Le(e,t){if(!e||Ie)return``;Ie=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
@@ -69,7 +69,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
69
69
|
`);return[`${e}. [Reviewer note] ${n}${r}`,...i.map(e=>e===``?``:`${rm}${e}`)]}function um(e,t,n){let r=new Set(e.map(e=>e.id)),i=t.filter(e=>!r.has(e));if(i.length>0)throw Error(`Unknown ${n} id(s): ${i.join(`, `)}.`);let a=new Set(t);return e.filter(e=>a.has(e.id))}function dm(e,t){let n=kl(um(e.findings,t.findingIds,`finding`)),r=um(e.notes,t.noteIds,`note`),i=[`Review feedback on "${e.title}" (${om(e)}).`];if(e.overview!==null&&i.push(`Feature objective: ${e.overview.objective}`),t.decision!==null&&i.push(nm[t.decision]),i.push(``),n.length===0&&r.length===0)return i.push(`No points to address.`),i.join(`
|
|
70
70
|
`);i.push(`Address the following points:`);let a=1;for(let e of n)i.push(``,...cm(a++,e));for(let e of r)i.push(``,...lm(a++,e));return i.join(`
|
|
71
71
|
`)}function fm(e){return dm(e,{findingIds:e.findings.filter(e=>e.status===`open`).map(e=>e.id),noteIds:[],decision:null})}var pm=5;function mm({analysis:e}){let t=H(e=>e.copy),n=kl(e.findings.filter(e=>e.status===`open`)),r=Gc.map(e=>({severity:e,count:n.filter(t=>t.severity===e).length}));return(0,O.jsxs)(O.Fragment,{children:[e.overview&&(0,O.jsxs)(`section`,{className:`card overview-card`,children:[(0,O.jsxs)(`h2`,{className:`card-title`,children:[(0,O.jsx)(U,{name:`focus`,color:`#8b97ff`}),`Vue d'ensemble`]}),(0,O.jsx)(`h3`,{className:`overview-label`,children:`Objectif`}),(0,O.jsx)(`p`,{className:`overview-text`,children:e.overview.objective}),(0,O.jsx)(`h3`,{className:`overview-label`,children:`Approche`}),(0,O.jsx)(`p`,{className:`overview-text`,children:e.overview.approach}),e.overview.attentionPoints.length>0&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`h3`,{className:`overview-label`,children:`Points d'attention`}),(0,O.jsx)(`ul`,{className:`summary-list overview-points`,children:e.overview.attentionPoints.map((e,t)=>(0,O.jsx)(`li`,{children:e},t))})]})]}),(0,O.jsxs)(`section`,{className:`card summary-card`,children:[(0,O.jsxs)(`h2`,{className:`card-title`,children:[(0,O.jsx)(U,{name:`sparkles`,color:`#b18cff`}),`Ce que l'agent a fait`]}),e.summary.length>0?(0,O.jsx)(`ul`,{className:`summary-list`,children:e.summary.map((e,t)=>(0,O.jsx)(`li`,{children:e},t))}):(0,O.jsx)(`p`,{className:`empty-text`,children:`L'agent n'a pas encore rédigé de résumé (outil update_analysis).`})]}),e.request&&(0,O.jsxs)(`section`,{className:`card request-card`,children:[(0,O.jsxs)(`h2`,{className:`card-title`,children:[(0,O.jsx)(U,{name:`message-square`,color:`#9aa1b1`}),`Demande initiale`,e.request.source&&(0,O.jsx)(`span`,{className:`request-source mono`,children:e.request.source})]}),(0,O.jsx)(`p`,{className:`request-text`,children:e.request.text})]}),(0,O.jsxs)(`div`,{className:`section-head`,children:[(0,O.jsx)(`h2`,{className:`section-title`,children:`Constats ouverts`}),(0,O.jsx)(`div`,{className:`pill-row`,title:`Constats ouverts par gravité, exigences manquantes comprises`,children:r.filter(({count:e})=>e>0).map(({severity:e,count:t})=>(0,O.jsx)(`span`,{className:`pill`,style:{color:Du[e].color,background:Du[e].background},children:qu(e,t)},e))}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsxs)(`button`,{type:`button`,className:`button button-secondary button-medium`,disabled:n.length===0,title:n.length===0?`Aucun constat ouvert à transmettre.`:`Tous les constats ouverts, du plus grave au moins grave.`,onClick:()=>void t(fm(e),`Prompt des constats ouverts copié dans le presse-papiers.`),children:[(0,O.jsx)(U,{name:`bot`,color:`#b18cff`}),`Copier le prompt pour l'agent`]})]}),(0,O.jsxs)(`section`,{className:`card list-card`,children:[n.length===0?(0,O.jsx)(`p`,{className:`list-empty`,children:e.findings.length===0?`L'agent n'a relevé aucun constat.`:`Aucun constat ouvert : tous sont ignorés ou obsolètes.`}):n.slice(0,pm).map(t=>(0,O.jsx)(Qp,{analysis:e,finding:t},t.id)),e.findings.length>0&&(0,O.jsxs)(`a`,{className:`list-footer-link`,href:w.feature(e.id,`findings`),children:[`Voir les `,e.findings.length,` constats, tous statuts confondus`]})]})]})}var hm={summary:`Résumé`,files:`Fichiers`,findings:`Constats`,diagrams:`Schémas`};function gm(e,t){if(t===`files`)return{count:e.files.length,title:W(e.files.length,`fichier modifié`,`fichiers modifiés`)};if(t===`findings`){let t=e.findings.filter(e=>e.status===`open`).length;return{count:t,title:`${W(t,`constat ouvert`,`constats ouverts`)}, exigences manquantes comprises · ${e.findings.length} au total`}}return t===`diagrams`?{count:e.diagrams.length,title:W(e.diagrams.length,`schéma`)}:null}function _m(e){return e.mode===`branch`?`${Fu.branch} ${Qu(e)} vers ${Zu(e.base)}`:`${Fu.working_tree} par rapport à HEAD`}function vm({analysis:e,links:t,tab:n}){let r=K(e),i=Ud(e);return(0,O.jsxs)(`div`,{className:`page`,children:[(0,O.jsxs)(`div`,{className:`page-head`,children:[(0,O.jsxs)(`div`,{className:`page-head-text`,children:[(0,O.jsx)(`h1`,{className:`page-title`,children:e.title}),(0,O.jsxs)(`p`,{className:`page-meta`,children:[(0,O.jsxs)(`span`,{children:[_m(e),` · produite `,Hu(e.snapshotAt),` · `,W(e.files.length,`fichier`)]}),(0,O.jsxs)(`span`,{className:`count-add mono`,children:[`+`,r.additions]}),(0,O.jsxs)(`span`,{className:`count-del mono`,children:[`−`,r.deletions]})]})]}),(0,O.jsx)(`button`,{type:`button`,className:`button button-primary button-large`,disabled:i===null,title:i===null?`L'analyse ne contient aucun fichier modifié.`:void 0,onClick:()=>i&&T(w.review(e.id,i)),children:`Commencer la revue`})]}),t&&(0,O.jsx)(Pd,{analysisId:e.id,links:t}),(0,O.jsx)(`nav`,{className:`tabs`,"aria-label":`Sections de l'analyse`,children:b.map(t=>{let r=gm(e,t);return(0,O.jsxs)(`a`,{href:w.feature(e.id,t),className:`tab${t===n?` is-active`:``}`,title:r?.title,children:[hm[t],r!==null&&(0,O.jsx)(`span`,{className:`tab-count`,children:r.count})]},t)})}),(0,O.jsxs)(`div`,{className:`tab-panel`,children:[n===`summary`&&(0,O.jsx)(mm,{analysis:e}),n===`files`&&(0,O.jsx)(Zd,{analysis:e}),n===`findings`&&(0,O.jsx)(em,{analysis:e}),n===`diagrams`&&(0,O.jsx)(Jp,{analysis:e})]})]})}var ym={approve:{icon:`circle-check`,color:`#3fb950`,description:`La feature peut être fusionnée`},request_changes:{icon:`pencil`,color:`#e3a33b`,description:`L'agent reprend son travail`},reject:{icon:`circle-x`,color:`#f0625a`,description:`La feature est abandonnée`}};function bm(e){let t=kl(e.findings.filter(e=>e.status===`open`)).map(e=>({key:`f:${e.id}`,finding:e})),n=e.notes.filter(e=>e.question===null).map(e=>({key:`n:${e.id}`,note:e}));return[...t,...n]}function xm(e){let t=e.review;if(t.state===`submitted`){let n=new Set([...t.selectedFindingIds.map(e=>`f:${e}`),...t.selectedNoteIds.map(e=>`n:${e}`)]);return new Set(bm(e).map(e=>e.key).filter(e=>!n.has(e)))}let n=t.previousSubmission;return n?new Set([...n.excludedFindingIds.map(e=>`f:${e}`),...n.excludedNoteIds.map(e=>`n:${e}`)]):new Set}function Sm({analysis:e}){let t=H(e=>e.copy),n=H(e=>e.submitReview),r=H(e=>e.notify),i=H(e=>e.saving),a=H(t=>vu(t,e.id)===!0),o=bm(e),[s,c]=(0,v.useState)(()=>e.review.decision??e.review.previousSubmission?.decision??(o.length>0?`request_changes`:`approve`)),[l,u]=(0,v.useState)(()=>xm(e)),d=o.filter(e=>!l.has(e.key)),f=d.flatMap(e=>e.finding?[e.finding.id]:[]),p=d.flatMap(e=>e.note?[e.note.id]:[]),m=dm(e,{findingIds:f,noteIds:p,decision:s}),h=e.files.filter(e=>e.reviewed).length,g=e.review,_=e=>{let t=new Set(l);t.has(e)?t.delete(e):t.add(e),u(t)},y=async()=>{await n(s,f,p)&&r(`info`,a?`Retour enregistré : l'agent à l'écoute vient d'en être notifié.`:`Retour enregistré : l'agent le lit avec l'outil get_review_feedback.`)},b=Ud(e);return(0,O.jsxs)(`div`,{className:`page page-narrow`,children:[(0,O.jsx)(`h1`,{className:`page-title page-title-small`,children:`Terminer la revue`}),(0,O.jsxs)(`p`,{className:`page-meta`,children:[h,` / `,W(e.files.length,`fichier revu`,`fichiers revus`),` · `,W(f.length,`constat ouvert`,`constats ouverts`),` et`,` `,W(p.length,`remarque`),` à transmettre`]}),g.state===`submitted`&&g.submittedAt&&g.decision&&(0,O.jsxs)(`div`,{className:`submitted-banner`,children:[(0,O.jsx)(U,{name:`circle-check`,color:`#3fb950`,size:16}),(0,O.jsxs)(`span`,{children:[`Retour enregistré le `,Uu(g.submittedAt),` · décision « `,Iu[g.decision],` ».`,` `,g.processed?`${Gu(g.processed)}.`:g.decision===`approve`?`Approuvée : rien à traiter pour l'agent.`:`L'agent le lit avec l'outil get_review_feedback ; il n'est pas encore traité.`,` `,`Un nouvel enregistrement le remplace.`]})]}),g.state===`pending`&&g.previousSubmission&&(0,O.jsxs)(`div`,{className:`submitted-banner is-reopened`,children:[(0,O.jsx)(U,{name:`pencil`,color:`#e3a33b`,size:16}),(0,O.jsxs)(`span`,{children:[`Revue modifiée depuis le retour du `,Uu(g.previousSubmission.submittedAt),` : l'agent ne le traite plus. Enregistrez-la à nouveau pour qu'il traite la nouvelle version ; il verra ce qui a changé.`]})]}),(0,O.jsx)(`h2`,{className:`field-label`,children:`Décision`}),(0,O.jsx)(`div`,{className:`decisions`,role:`radiogroup`,"aria-label":`Décision`,children:el.map(e=>(0,O.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":s===e,className:`decision${s===e?` is-selected`:``}`,onClick:()=>c(e),children:[(0,O.jsx)(U,{name:ym[e].icon,color:ym[e].color,size:16}),(0,O.jsxs)(`span`,{className:`decision-text`,children:[(0,O.jsx)(`span`,{className:`decision-title`,children:Iu[e]}),(0,O.jsx)(`span`,{className:`decision-description`,children:ym[e].description})]})]},e))}),(0,O.jsxs)(`div`,{className:`field-head`,children:[(0,O.jsx)(`h2`,{className:`field-label`,children:`Points à transmettre`}),(0,O.jsxs)(`span`,{className:`field-meta`,children:[d.length,` sur `,o.length,` sélectionnés`]})]}),(0,O.jsxs)(`div`,{className:`card points`,children:[o.length===0&&(0,O.jsx)(`p`,{className:`list-empty`,children:`Aucun constat ouvert ni remarque : le retour ne contiendra que la décision.`}),o.map(t=>{let n=!l.has(t.key);return(0,O.jsxs)(`label`,{className:`point${n?``:` is-excluded`}`,children:[(0,O.jsx)(`input`,{type:`checkbox`,className:`visually-hidden`,checked:n,onChange:()=>_(t.key)}),(0,O.jsx)(U,{name:n?`square-check`:`square`,color:n?`#8b97ff`:`#646b7b`,size:16}),t.finding?(0,O.jsx)(md,{severity:t.finding.severity}):(0,O.jsx)(hd,{}),(0,O.jsx)(`span`,{className:`point-title`,children:t.finding?t.finding.title:t.note.text}),(0,O.jsx)(`span`,{className:`point-location mono`,children:t.finding?ed(t.finding,e.request):G(t.note)})]},t.key)})]}),(0,O.jsx)(`h2`,{className:`field-label`,children:`Prompt pour l'agent`}),(0,O.jsxs)(`div`,{className:`prompt-box`,children:[(0,O.jsx)(`pre`,{className:`prompt-text`,children:m}),(0,O.jsx)(`button`,{type:`button`,className:`icon-button prompt-copy`,title:`Copier le prompt`,"aria-label":`Copier le prompt`,onClick:()=>void t(m,`Prompt copié dans le presse-papiers.`),children:(0,O.jsx)(U,{name:`copy`,color:`#9aa1b1`})})]}),(0,O.jsxs)(`footer`,{className:`finish-footer`,children:[(0,O.jsx)(U,{name:`info`,color:`#646b7b`}),(0,O.jsx)(`span`,{className:`finish-hint`,children:`L'agent récupère ce retour avec l'outil get_review_feedback.`}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsx)(`button`,{type:`button`,className:`button button-secondary button-medium`,onClick:()=>T(b?w.review(e.id,b):w.feature(e.id)),children:`Retour à la revue`}),(0,O.jsxs)(`button`,{type:`button`,className:`button button-primary button-medium`,disabled:i,onClick:()=>void y(),children:[(0,O.jsx)(U,{name:`save`,color:`#ffffff`}),`Enregistrer le retour`]})]})]})}var Cm={to_review:{label:`À relire`,icon:`eye`,empty:`Aucune revue à faire : toutes les analyses sont soumises.`},to_process:{label:`À traiter par l'agent`,icon:`hourglass`,empty:`Aucun retour n'attend l'agent.`},processed:{label:`Traitées par l'agent`,icon:`clipboard-check`,empty:`Aucun retour traité par l'agent à vérifier.`},approved:{label:`Approuvées`,icon:`circle-check`,empty:`Aucune analyse approuvée.`},all:{label:`Toutes`,icon:`list`,empty:`Aucune analyse.`}};function wm({counts:e}){let t=H(e=>e.homeFilter),n=H(e=>e.setHomeFilter);return(0,O.jsx)(`nav`,{className:`home-filters`,"aria-label":`Filtrer les analyses`,children:q.map(r=>{let i=r===t;return(0,O.jsxs)(`button`,{type:`button`,className:`home-filter${i?` is-active`:``}${r===`all`?` is-all`:``}`,"aria-pressed":i,onClick:()=>n(r),children:[(0,O.jsx)(U,{name:Cm[r].icon,size:16,color:`#9aa1b1`}),(0,O.jsx)(`span`,{className:`home-filter-label`,children:Cm[r].label}),(0,O.jsx)(`span`,{className:`home-filter-count`,children:e[r]})]},r)})})}function Tm({analysis:e}){let t=e.progress.processed;if(!t)return null;let n=t.by===`user`?`du relecteur`:`de l'agent`;return(0,O.jsxs)(`span`,{className:`home-row-processing`,children:[(0,O.jsx)(U,{name:`corner-down-right`,size:12,color:Ru.color}),t.note===null?Wu(t):`Note ${n} : ${t.note}`,` · le `,Uu(t.at)]})}function Em({analysis:e}){let{followedBy:t,followUpOf:n}=e;return(0,O.jsxs)(O.Fragment,{children:[t&&(0,O.jsxs)(`span`,{className:`home-row-follow`,children:[(0,O.jsx)(`span`,{children:`Nouvelle revue disponible :`}),(0,O.jsx)(Ad,{link:t,direction:`next`,small:!0}),(0,O.jsx)(Cd,{progress:t.progress,small:!0})]}),n&&(0,O.jsxs)(`span`,{className:`home-row-follow`,children:[(0,O.jsx)(`span`,{children:`Revue faisant suite à :`}),(0,O.jsx)(Ad,{link:n,direction:`previous`,small:!0}),(0,O.jsxs)(`span`,{className:`home-row-follow-round`,children:[`tour `,e.round]})]})]})}function Dm({analysis:e}){let t=H(e=>e.markProcessed),n=H(e=>e.saving),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(``),s=(0,v.useRef)(null),c=(0,v.useId)();(0,v.useEffect)(()=>{if(!r)return;let e=e=>{s.current?.contains(e.target)||i(!1)},t=e=>{e.key===`Escape`&&i(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[r]);let l=async()=>{let n=a.trim();await t(e,n===``?null:n)&&(i(!1),o(``))};return(0,O.jsxs)(`div`,{className:`mark-processed${r?` is-open`:``}`,ref:s,children:[(0,O.jsxs)(`button`,{type:`button`,className:`button button-secondary mark-processed-button`,"aria-expanded":r,"aria-haspopup":`dialog`,onClick:()=>i(!r),children:[(0,O.jsx)(U,{name:`check`,size:14,color:Ru.color}),`Marquer comme traité`]}),r&&(0,O.jsxs)(`div`,{className:`mark-processed-panel`,role:`dialog`,"aria-label":`Marquer le retour comme traité`,children:[(0,O.jsx)(`p`,{className:`mark-processed-title`,children:`Marquer le retour comme traité`}),(0,O.jsx)(`label`,{className:`mark-processed-label`,htmlFor:c,children:`Note pour l'historique (facultative)`}),(0,O.jsx)(`input`,{id:c,className:`mark-processed-input`,autoFocus:!0,value:a,placeholder:`ex. corrigé par 12785d6e3 et 1ff5baaad`,onChange:e=>o(e.target.value),onKeyDown:e=>{e.key===`Enter`&&l()}}),(0,O.jsxs)(`div`,{className:`mark-processed-actions`,children:[(0,O.jsx)(`button`,{type:`button`,className:`link-button muted`,onClick:()=>i(!1),children:`Annuler`}),(0,O.jsx)(`button`,{type:`button`,className:`button mark-processed-confirm`,disabled:n,onClick:()=>void l(),children:`Marquer comme traité`})]})]})]})}function Om({analysis:e,markable:t}){let{reviewedFiles:n,totalFiles:r}=e.progress,i=od(e);return(0,O.jsxs)(`div`,{className:`home-row`,children:[(0,O.jsxs)(`span`,{className:`home-row-body`,children:[(0,O.jsxs)(`span`,{className:`home-row-head`,children:[(0,O.jsx)(`a`,{className:`home-row-title home-row-link`,href:w.feature(e.id),children:e.title}),t&&(0,O.jsx)(Dm,{analysis:e})]}),(0,O.jsxs)(`span`,{className:`home-row-details`,children:[(0,O.jsxs)(`span`,{className:`home-row-meta`,children:[(0,O.jsx)(`span`,{className:`mono`,children:$u(e)}),(0,O.jsxs)(`span`,{children:[`· `,Hu(e.updatedAt)]})]}),(0,O.jsxs)(`span`,{className:`home-row-progress`,title:`${n} fichier(s) revu(s) sur ${r}`,children:[(0,O.jsx)(`span`,{className:`home-row-progress-bar`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":n,children:(0,O.jsx)(`span`,{className:`progress-fill`,style:{width:`${sd(e)}%`}})}),(0,O.jsxs)(`span`,{className:`home-row-progress-label mono`,children:[n,`/`,r]})]}),(0,O.jsx)(`span`,{className:`home-row-findings`,children:i.length===0?(0,O.jsx)(`span`,{className:`home-row-none`,children:`Aucun constat ouvert`}):i.map(({severity:e,count:t})=>(0,O.jsx)(yd,{severity:e,count:t,title:`${Yu(e,t)}, exigences manquantes comprises`},e))}),(0,O.jsx)(`span`,{className:`home-row-state`,children:(0,O.jsx)(Cd,{progress:e.progress})})]}),(0,O.jsx)(Tm,{analysis:e}),(0,O.jsx)(Em,{analysis:e})]}),(0,O.jsx)(U,{name:`chevron-right`,color:`#646b7b`})]})}function km({group:e}){let t=H(e=>e.homeFilter),n=H(t=>t.collapsedProjects.has(e.project)),r=H(e=>e.toggleProject);return(0,O.jsxs)(`section`,{className:`home-project`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`home-project-head`,"aria-expanded":!n,onClick:()=>r(e.project),children:[(0,O.jsx)(U,{name:n?`chevron-right`:`chevron-down`,color:`#646b7b`}),(0,O.jsx)(U,{name:`folder`,color:`#8b97ff`}),(0,O.jsx)(`span`,{className:`home-project-name`,children:e.project}),(0,O.jsx)(`span`,{className:`home-project-total`,children:W(e.analyses.length,`analyse`)}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsx)(`span`,{className:`home-project-counts`,children:e.counts.map(({state:e,count:t})=>(0,O.jsxs)(`span`,{className:`pill pill-small`,style:{color:Lu[e].color,background:Lu[e].background},children:[Lu[e].label,` · `,t]},e))})]}),!n&&(0,O.jsx)(`div`,{className:`home-project-list`,children:e.analyses.map(e=>(0,O.jsx)(Om,{analysis:e,markable:t===`to_process`&&e.progress.toProcess},e.id))})]})}function Am(){let e=H(e=>e.analyses),t=H(e=>e.unreadable),n=H(e=>e.listError),r=H(e=>e.homeFilter),i=H(e=>e.setHomeFilter);if(n)return(0,O.jsx)(`div`,{className:`empty-state`,children:(0,O.jsx)(`div`,{className:`empty-card`,children:(0,O.jsx)(`p`,{className:`error-text`,children:n})})});if(e===null)return(0,O.jsx)(`div`,{className:`empty-state`,children:(0,O.jsx)(`div`,{className:`empty-card`,children:(0,O.jsx)(`p`,{children:`Chargement des analyses…`})})});if(e.length===0&&t.length===0)return(0,O.jsx)(`div`,{className:`empty-state`,children:(0,O.jsxs)(`div`,{className:`empty-card`,children:[(0,O.jsx)(`h1`,{className:`empty-title`,children:`Aucune analyse à revoir`}),(0,O.jsxs)(`p`,{children:[`L'agent crée une analyse avec l'outil `,(0,O.jsx)(`code`,{children:`create_analysis`}),` une fois la feature développée. Elle apparaîtra ici automatiquement.`]})]})});let a=ad(rd(e,r)),o=new Set(e.map(e=>e.project)).size,s=id(e);return(0,O.jsxs)(`div`,{className:`page page-home`,children:[(0,O.jsx)(`div`,{className:`home-head`,children:(0,O.jsxs)(`div`,{className:`page-head-text`,children:[(0,O.jsx)(`h1`,{className:`page-title`,children:`Analyses`}),(0,O.jsxs)(`p`,{className:`page-meta`,children:[W(e.length,`analyse`),` · `,W(o,`projet`),` · `,s.to_review,` à relire`]})]})}),(0,O.jsxs)(`div`,{className:`home-layout`,children:[(0,O.jsx)(wm,{counts:s}),(0,O.jsxs)(`div`,{className:`home-projects`,children:[a.length===0&&e.length>0&&(0,O.jsxs)(`div`,{className:`card home-empty`,children:[(0,O.jsx)(`p`,{children:Cm[r].empty}),(0,O.jsx)(`button`,{type:`button`,className:`link-button accent`,onClick:()=>i(`all`),children:`Afficher toutes les analyses`})]}),a.map(e=>(0,O.jsx)(km,{group:e},e.project)),t.length>0&&(0,O.jsxs)(`section`,{className:`home-project`,children:[(0,O.jsxs)(`h2`,{className:`home-project-head is-static`,children:[(0,O.jsx)(U,{name:`triangle-alert`,color:`#f0625a`}),(0,O.jsx)(`span`,{className:`home-project-name`,children:`Analyses illisibles`})]}),(0,O.jsx)(`div`,{className:`home-project-list`,children:t.map(e=>(0,O.jsx)(`div`,{className:`home-row is-unreadable`,children:(0,O.jsxs)(`span`,{className:`home-row-body`,children:[(0,O.jsx)(`span`,{className:`home-row-title mono`,children:e.id}),(0,O.jsx)(`span`,{className:`home-row-meta error-text`,children:e.error})]})},e.id))})]})]})]})]})}function jm(e,t){return t===1?`${e}`:`${e},${t}`}function Mm(e,t,n,r){let i=r.filter(e=>e.type!==`add`).length,a=r.filter(e=>e.type!==`del`).length,o=e.header.replace(/^@@[^@]*@@/,``);return{header:`@@ -${jm(t,i)} +${jm(n,a)} @@${o}`,oldStart:t,oldLines:i,newStart:n,newLines:a,lines:r}}function Nm(e){let t=e.lines.findIndex(e=>e.type!==`context`);return t===-1?e.lines.length:t}function Pm(e,t){if(e.newContent===null)return null;let n=Al(e.newContent),r=new Set,i=[],a=0,o=0;e.hunks.forEach((s,c)=>{let l=s.newLines===0?s.newStart+1:s.newStart,u=l+s.newLines-1,d=e.hunks[c+1],f=d===void 0?n.length+1:d.newLines===0?d.newStart+1:d.newStart,p=Math.max(0,t[c]??0),m=l-1-o,h=f-1-u,g=Math.min(p,m),_=Math.min(p,h),v=a+s.oldLines-s.newLines,y=(e,t)=>(r.add(e),{type:`context`,oldNo:e+t,newNo:e,text:n[e-1]}),b=g===0&&_===0?s:Mm(s,(s.oldLines===0?s.oldStart+1:s.oldStart)-g,l-g,[...Array.from({length:g},(e,t)=>y(l-g+t,a)),...s.lines,...Array.from({length:_},(e,t)=>y(u+1+t,v))]);i.push({hunk:b,above:g,below:_,canGrow:g<m||_<h,joinsPrevious:c>0&&g===m}),a=v,o=u+_});let s=[];i.forEach((e,t)=>{e.joinsPrevious?s[s.length-1].push(t):s.push([t])});let c=s.map(e=>{if(e.length===1)return i[e[0]].hunk;let t=i[e[0]].hunk;return Mm(t,t.oldLines===0?t.oldStart+1:t.oldStart,t.newLines===0?t.newStart+1:t.newStart,e.flatMap(e=>i[e].hunk.lines))}),l=s.map(t=>({context:Nm(e.hunks[t[0]])+i[t[0]].above,members:t,canShrink:t.some(e=>i[e].above>0||i[e].below>0),canGrow:t.some(e=>i[e].canGrow)}));return{fileDiff:{...e,hunks:c},hunks:l,extras:i.map(e=>Math.max(e.above,e.below)),added:r}}function Fm(e,t,n){let r=[...e.extras];for(let i of e.hunks[t].members)r[i]=Math.max(0,r[i]+n*5);return r}var Im={context:` `,add:`+`,del:`-`};function Lm(e){return e.mode===`branch`?`branch ${e.base}...${e.head}`:`working tree changes against HEAD`}function Rm(e,t){return t===0?null:jl(e,e+t-1)}function zm(e){let t=1;for(let n of e.lines)t=Math.max(t,String(n.oldNo??``).length,String(n.newNo??``).length);let n=e=>String(e??``).padStart(t);return[e.header,...e.lines.map(e=>`${n(e.oldNo)} | ${n(e.newNo)} ${Im[e.type]} ${e.text}`)]}function Bm(e,t,n){let r=Rm(n.newStart,n.newLines),i=Rm(n.oldStart,n.oldLines),a=[`- File: ${t.path}${t.oldPath===null?``:` (renamed from ${t.oldPath})`}`,r===null?`- New side: no line (the section only removes code).`:`- New side (code after the feature): lines ${r}`,i===null?`- Old side: no line (the section only adds code).`:`- Old side (code before the feature): lines ${i}`];return[`Explain a section of code in the feature analysis "${e.title}" (analysis_id: "${e.id}", project "${e.project}").`,`Repository: ${e.repoPath} — ${Lm(e)}.`,``,`Section to explain:`,...a,``,`Code of the section, as frozen in the analysis (columns: old line | new line, then + added, - removed, or a space for context):`,"```",...zm(n),"```",``,`What to do:`,`1. Read this code and what surrounds it (get_diff with analysis_id "${e.id}" and path "${t.path}", and the repository) until you understand what it does and how it works.`,`2. Record your explanations in the feature analyzer with add_explanations (analysis_id "${e.id}", path "${t.path}"): one explanation per meaningful block of the section, covering it from its first to its last line. Use "side": "new" with new-side line numbers for added or kept code, and "side": "old" with old-side line numbers for removed code.`,`3. In each explanation, say what the code does (inputs, outputs, effects), then how it works, step by step in the order of the code; name the key variables and the edge cases it handles. For removed code, say what it did and what replaces it. Describe, do not judge.`,`4. If an explanation of the analysis already covers these lines (see get_analysis), rewrite it with update_explanation instead of adding a duplicate.`,`5. Then tell me in a few lines which explanations you recorded.`].join(`
|
|
72
|
-
`)}function Vm(e){return`${e===0?0:1},${e}`}function Hm(e){if(e.newContent===null)return null;let t=Al(e.newContent),n=[],r=1,i=0,a=e=>{for(;r<=e;r++)n.push({type:`context`,oldNo:r+i,newNo:r,text:t[r-1]})};for(let t of e.hunks)a(t.newLines===0?t.newStart:t.newStart-1),n.push(...t.lines),r+=t.newLines,i+=t.oldLines-t.newLines;a(t.length);let o=t.length+i,s={header:`@@ -${Vm(o)} +${Vm(t.length)} @@`,oldStart:o===0?0:1,oldLines:o,newStart:t.length===0?0:1,newLines:t.length,lines:n};return{path:e.path,hunks:[s],newContent:e.newContent}}function Um({anchorText:e,suggestion:t}){let n=Al(e),r=Al(t);return(0,O.jsxs)(`div`,{className:`fix`,children:[n.map((e,t)=>(0,O.jsxs)(`div`,{className:`fix-line is-del`,children:[(0,O.jsx)(`span`,{className:`fix-marker`,children:`−`}),(0,O.jsx)(`span`,{className:`fix-code`,children:e})]},`del-${t}`)),r.map((e,t)=>(0,O.jsxs)(`div`,{className:`fix-line is-add`,children:[(0,O.jsx)(`span`,{className:`fix-marker`,children:`+`}),(0,O.jsx)(`span`,{className:`fix-code`,children:e})]},`add-${t}`)),r.length===0&&(0,O.jsx)(`div`,{className:`fix-empty`,children:`Les lignes visées sont supprimées.`})]})}function Wm({analysis:e,finding:t,onAddNote:n}){let r=H(e=>e.setFindingStatus),i=H(e=>e.copy),a=H(e=>e.saving),o=t.location;return(0,O.jsxs)(`article`,{className:`finding-card is-${t.status}`,id:`finding-${t.id}`,children:[(0,O.jsxs)(`header`,{className:`finding-head`,children:[(0,O.jsx)(md,{severity:t.severity}),(0,O.jsx)(`h3`,{className:`finding-title`,children:t.title}),(0,O.jsx)(vd,{kind:t.kind}),(0,O.jsx)(_d,{status:t.status}),o&&(0,O.jsx)(`span`,{className:`finding-lines mono`,children:td(o.startLine,o.endLine)})]}),t.body.trim()!==``&&(0,O.jsx)(`p`,{className:`finding-body`,children:t.body}),t.status===`outdated`&&(0,O.jsx)(`p`,{className:`finding-outdated`,children:`Les lignes visées ont changé depuis la rédaction de ce constat : l'agent doit le réancrer avec update_finding.`}),t.suggestion!==null&&t.anchorText!==null&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`div`,{className:`finding-section-title`,children:`Correctif proposé`}),(0,O.jsx)(Um,{anchorText:t.anchorText,suggestion:t.suggestion})]}),(0,O.jsxs)(`footer`,{className:`finding-actions`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`button button-secondary`,onClick:()=>void i(dm(e,{findingIds:[t.id],noteIds:[],decision:null}),`Prompt du constat copié dans le presse-papiers.`),children:[(0,O.jsx)(U,{name:`bot`,color:`#b18cff`}),`Copier le prompt pour l'agent`]}),t.status===`open`&&(0,O.jsx)(`button`,{type:`button`,className:`link-button muted`,disabled:a,onClick:()=>void r(t.id,`ignored`),children:`Ignorer`}),t.status===`ignored`&&(0,O.jsx)(`button`,{type:`button`,className:`link-button muted`,disabled:a,onClick:()=>void r(t.id,`open`),children:`Rouvrir`}),(0,O.jsx)(`span`,{className:`spacer`}),n&&(0,O.jsx)(`button`,{type:`button`,className:`link-button accent`,onClick:n,children:`Ajouter une remarque`})]})]})}function Gm({note:e}){return e.question===null?(0,O.jsx)(qm,{note:e}):(0,O.jsx)(Ym,{note:e,question:e.question})}function Km(e){return e.location?.line?`ligne ${e.location.line}`:`fichier entier`}function qm({note:e}){let t=H(e=>e.updateNote),n=H(e=>e.deleteNote),r=H(e=>e.saving),[i,a]=(0,v.useState)(!1),o=Km(e);return i?(0,O.jsx)(Zm,{id:`note-edit-${e.id}`,label:`Modifier la remarque (${o})`,initialText:e.text,submitLabel:`Enregistrer la modification`,onSubmit:n=>n===e.text?Promise.resolve(!0):t(e.id,n),onClose:()=>a(!1)}):(0,O.jsxs)(`div`,{className:`note-card`,children:[(0,O.jsxs)(`div`,{className:`note-head`,children:[(0,O.jsx)(hd,{fixed:!1}),(0,O.jsxs)(`span`,{className:`note-meta`,title:`${o} · ${Uu(e.createdAt)}`,children:[o,` · `,Ku(e.createdAt)]}),(0,O.jsxs)(`button`,{type:`button`,className:`link-button muted`,disabled:r,onClick:()=>a(!0),children:[(0,O.jsx)(U,{name:`pencil`,size:13}),`Modifier`]}),(0,O.jsxs)(`button`,{type:`button`,className:`link-button muted`,disabled:r,onClick:()=>void n(e.id),children:[(0,O.jsx)(U,{name:`trash`,size:13}),`Supprimer`]})]}),(0,O.jsx)(`p`,{className:`note-text`,children:e.text})]})}function Jm({question:e}){return e.answer===null?(0,O.jsxs)(`span`,{className:`question-status is-waiting`,title:`Envoyée le ${Uu(e.askedAt)}`,children:[(0,O.jsx)(U,{name:`loader-circle`,size:13}),`Agent notifié`]}):(0,O.jsxs)(`span`,{className:`question-status is-answered`,title:`Réponse reçue le ${Uu(e.answer.at)}`,children:[(0,O.jsx)(`span`,{className:`question-status-dot`,"aria-hidden":`true`}),`Réponse reçue`]})}function Ym({note:e,question:t}){let n=H(e=>e.markAnswerSeen),[r,i]=(0,v.useState)(!1),a=Km(e),o=t.answer;return(0,O.jsxs)(`div`,{className:`note-card is-question${r?` is-open`:``}`,children:[(0,O.jsxs)(`div`,{className:`note-head`,children:[(0,O.jsx)(gd,{fixed:!1}),(0,O.jsxs)(`span`,{className:`note-meta`,title:`${a} · ${Uu(t.askedAt)}`,children:[a,` · `,Ku(t.askedAt)]}),(0,O.jsx)(Jm,{question:t})]}),(0,O.jsx)(`p`,{className:`note-text`,children:e.text}),o!==null&&!r&&(0,O.jsxs)(`button`,{type:`button`,className:`answer-toggle`,onClick:()=>{i(!0),t.answerSeenAt===null&&n(e.id)},children:[(0,O.jsx)(U,{name:`messages-square`,size:14}),`Voir la réponse`]}),o!==null&&r&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`answer-block`,children:[(0,O.jsxs)(`div`,{className:`answer-head`,children:[(0,O.jsx)(U,{name:`bot`,size:14,color:`#b18cff`}),`Agent · `,Ku(o.at)]}),(0,O.jsx)(`p`,{className:`answer-text`,children:o.text})]}),(0,O.jsxs)(`button`,{type:`button`,className:`link-button accent answer-hide`,onClick:()=>i(!1),children:[(0,O.jsx)(U,{name:`chevron-up`,size:14}),`Masquer la réponse`]})]})]})}function Xm({path:e,line:t,findingId:n,onClose:r}){let i=H(e=>e.addNote);return(0,O.jsx)(Zm,{id:`note-${t??`file`}`,label:t===null?`Remarque sur le fichier`:`Remarque sur la ligne ${t}`,initialText:``,submitLabel:`Enregistrer`,onSubmit:r=>i(e,t,r,n,!1),onAsk:r=>i(e,t,r,n,!0),onClose:r})}function Zm({id:e,label:t,initialText:n,submitLabel:r,onSubmit:i,onAsk:a,onClose:o}){let s=H(e=>e.saving),[c,l]=(0,v.useState)(n),u=(0,v.useRef)(null);(0,v.useEffect)(()=>u.current?.focus(),[]);let d=async e=>{c.trim()!==``&&await e(c.trim())&&o()},f=c.trim()===``;return(0,O.jsxs)(`form`,{className:`note-composer`,onSubmit:e=>{e.preventDefault(),d(i)},children:[(0,O.jsx)(`label`,{className:`note-composer-label`,htmlFor:e,children:t}),(0,O.jsx)(`textarea`,{id:e,ref:u,rows:3,value:c,placeholder:`Ce que l'agent doit revoir…`,onChange:e=>l(e.target.value),onFocus:e=>e.currentTarget.setSelectionRange(e.currentTarget.value.length,e.currentTarget.value.length),onKeyDown:e=>{e.key===`Escape`&&o(),e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),d(e.shiftKey&&a?a:i))}}),a?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:`hint`,children:`Ctrl + Entrée : enregistrer · Ctrl + Maj + Entrée : envoyer`}),(0,O.jsxs)(`div`,{className:`note-composer-actions`,children:[(0,O.jsx)(`button`,{type:`button`,className:`button button-ghost`,onClick:o,children:`Annuler`}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsxs)(`button`,{type:`button`,className:`button button-ask button-small`,disabled:s||f,title:`La question part tout de suite à l'agent et reste dans la revue avec sa réponse.`,onClick:()=>void d(a),children:[(0,O.jsx)(U,{name:`send`,size:13}),`Envoyer à l'agent`]}),(0,O.jsx)(`button`,{type:`submit`,className:`button button-primary button-small`,disabled:s||f,children:r})]})]}):(0,O.jsxs)(`div`,{className:`note-composer-actions`,children:[(0,O.jsx)(`span`,{className:`hint`,children:`Ctrl + Entrée pour enregistrer · Échap pour annuler`}),(0,O.jsx)(`button`,{type:`button`,className:`button button-ghost`,onClick:o,children:`Annuler`}),(0,O.jsx)(`button`,{type:`submit`,className:`button button-primary button-small`,disabled:s||f,children:r})]})]})}var Qm=4;function $m(e){let t=0;for(let n of e)if(n===` `)t++;else if(n===` `)t+=Qm-t%Qm;else break;return t}function eh(e){let t=[],n=[],r=-1,i=e=>{r>e.start&&t.push({start:e.start,end:r})};for(e.forEach((e,t)=>{if(e===null||e.trim()===``)return;let a=$m(e);for(;n.length>0&&n[n.length-1].indent>=a;)i(n.pop());n.push({start:t,indent:a}),r=t});n.length>0;)i(n.pop());t.sort((e,t)=>e.start-t.start);let a=[],o=[];for(let e of t){for(;o.length>0&&a[o[o.length-1]].end<e.start;)o.pop();let t=o.length>0?o[o.length-1]:null;a.push({...e,parent:t,depth:t===null?0:a[t].depth+1}),o.push(a.length-1)}return a}function th(e,t){let n=new Set;for(let r of t){let t=e[r];for(let e=t.start+1;e<=t.end;e++)n.add(e)}return n}function nh(e,t,n){for(let r=e[t].parent;r!==null;r=e[r].parent)if(r===n)return!0;return!1}function rh(e,t,n,r){for(let i=e[t].parent;i!==null&&i!==n;i=e[i].parent)if(r.has(i))return!0;return!1}function ih(e,t,n){let r=new Set(n),i=e.map((e,t)=>t).filter(n=>nh(e,n,t));if(n.has(t)){r.delete(t);for(let e of i)r.delete(e);return r}let a=i.filter(r=>!n.has(r)&&!rh(e,r,t,n));if(a.length===0)return r.add(t),r;let o=Math.max(...a.map(t=>e[t].depth));for(let t of a)e[t].depth===o&&r.add(t);return r}function ah({entry:e,small:t}){let n=Du[e.finding.severity];return(0,O.jsx)(`span`,{className:`finding-number${t?` is-small`:``}`,style:{color:n.color,background:n.background,borderColor:n.color},"aria-label":`Constat ${e.number}`,children:e.number})}function oh(e,t){return e===`applied`?t?`Correctif appliqué dans le code`:`Appliquer le correctif dans le code`:t?`Correctif affiché dans le code`:`Afficher le correctif dans le code`}function sh({analysis:e,entry:t,fix:n,mode:r,onToggleFix:i,onAddNote:a,highlighted:o}){let s=H(e=>e.setFindingStatus),c=H(e=>e.copy),l=H(e=>e.saving),{finding:u}=t,d=Du[u.severity],f=n.state===`shown`,p=r===`off`||n.state===`blocked`;return(0,O.jsxs)(`article`,{className:`margin-card is-${u.status}${f?` is-fix-shown`:``}${o?` is-target`:``}`,id:`finding-${u.id}`,"data-finding-card":u.id,style:{"--severity":d.color},children:[(0,O.jsxs)(`header`,{className:`margin-card-head`,children:[(0,O.jsx)(ah,{entry:t}),(0,O.jsx)(`span`,{className:`pill pill-small margin-card-severity`,style:{color:d.color,background:d.background},children:d.label}),(0,O.jsx)(vd,{kind:u.kind}),(0,O.jsx)(_d,{status:u.status}),(0,O.jsxs)(`span`,{className:`margin-card-lines mono`,children:[`l. `,jl(t.startLine,t.endLine,`–`)]})]}),(0,O.jsx)(`h3`,{className:`margin-card-title`,children:u.title}),u.body.trim()!==``&&(0,O.jsx)(`p`,{className:`margin-card-body`,children:u.body}),u.status===`outdated`&&(0,O.jsx)(`p`,{className:`finding-outdated`,children:`Les lignes visées ont changé depuis la rédaction de ce constat : l'agent doit le réancrer avec update_finding.`}),(n.state===`shown`||n.state===`hidden`||n.state===`blocked`)&&(0,O.jsxs)(`label`,{className:`fix-toggle${f?` is-on`:``}${p?` is-disabled`:``}`,children:[(0,O.jsx)(`input`,{type:`checkbox`,className:`visually-hidden`,checked:f,disabled:p,onChange:e=>i(e.target.checked)}),(0,O.jsx)(`span`,{className:`switch`,"aria-hidden":`true`}),oh(r,f)]}),r===`off`&&n.state===`hidden`&&(0,O.jsx)(`p`,{className:`margin-card-hint`,children:`Choisissez « Avant / après » ou « Code corrigé » pour afficher le correctif.`}),n.state===`blocked`&&(0,O.jsx)(`p`,{className:`margin-card-hint`,children:r===`applied`?`Ses lignes recouvrent le correctif du constat ${n.blockedBy} : retirez-le pour appliquer celui-ci dans le code.`:`Ses lignes recouvrent le correctif du constat ${n.blockedBy} : masquez-le pour afficher celui-ci dans le code.`}),n.state===`outside`&&u.suggestion!==null&&u.anchorText!==null&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{className:`margin-card-hint`,children:`Les lignes visées ne sont pas toutes affichées dans le diff : voici le correctif proposé.`}),(0,O.jsx)(Um,{anchorText:u.anchorText,suggestion:u.suggestion})]}),(0,O.jsxs)(`footer`,{className:`margin-card-actions`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`margin-button`,onClick:()=>void c(dm(e,{findingIds:[u.id],noteIds:[],decision:null}),`Prompt du constat copié dans le presse-papiers.`),children:[(0,O.jsx)(U,{name:`bot`,color:`#b18cff`}),`Copier le prompt`]}),u.status===`open`&&(0,O.jsxs)(`button`,{type:`button`,className:`margin-button`,disabled:l,onClick:()=>void s(u.id,`ignored`),children:[(0,O.jsx)(U,{name:`eye-off`,color:`#9aa1b1`}),`Ignorer`]}),u.status===`ignored`&&(0,O.jsxs)(`button`,{type:`button`,className:`margin-button`,disabled:l,onClick:()=>void s(u.id,`open`),children:[(0,O.jsx)(U,{name:`rotate-ccw`,color:`#9aa1b1`}),`Rouvrir`]}),a&&(0,O.jsxs)(`button`,{type:`button`,className:`margin-button`,onClick:a,children:[(0,O.jsx)(U,{name:`message-square`,color:`#9aa1b1`}),`Remarque`]})]})]})}function ch({label:e,options:t,value:n,onChange:r,disabled:i,trigger:a}){let[o,s]=(0,v.useState)(null),c=o!==null,l=(0,v.useRef)(null),u=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(!c)return;let e=()=>s(null),t=t=>{l.current?.contains(t.target)||e()},n=t=>{t.key===`Escape`&&e()};return document.addEventListener(`mousedown`,t),document.addEventListener(`keydown`,n),document.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{document.removeEventListener(`mousedown`,t),document.removeEventListener(`keydown`,n),document.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[c]);let d=()=>{let e=u.current?.getBoundingClientRect();s(c||!e?null:{top:e.bottom+6,right:window.innerWidth-e.right})},f=a??t[n];return(0,O.jsxs)(`div`,{className:`option-menu`,ref:l,children:[(0,O.jsxs)(`button`,{ref:u,type:`button`,className:`option-menu-button${c?` is-open`:``}`,"aria-haspopup":`listbox`,"aria-expanded":c,title:e,onClick:d,children:[(0,O.jsx)(U,{name:f.icon,color:c?`#c3caff`:`#9aa1b1`}),(0,O.jsx)(`span`,{className:`option-menu-value`,children:f.label}),(0,O.jsx)(U,{name:c?`chevron-up`:`chevron-down`,size:12,color:c?`#9aa1b1`:`#646b7b`})]}),o&&(0,O.jsxs)(`div`,{className:`option-menu-list`,role:`listbox`,"aria-label":e,style:o,children:[(0,O.jsx)(`div`,{className:`option-menu-title`,children:e}),Object.keys(t).map(e=>{let a=t[e],o=i?.[e],c=e===n;return(0,O.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":c,className:`option-menu-item${c?` is-selected`:``}`,disabled:o!==void 0,onClick:()=>{s(null),r(e)},children:[(0,O.jsx)(U,{name:a.icon,color:c?`#c3caff`:`#9aa1b1`}),(0,O.jsxs)(`span`,{className:`option-menu-item-text`,children:[(0,O.jsx)(`span`,{className:`option-menu-item-label`,children:a.label}),(0,O.jsx)(`span`,{className:`option-menu-item-description`,children:o??a.description})]}),c&&(0,O.jsx)(U,{name:`check`,color:`#c3caff`})]},e)})]})]})}var lh=4,uh=6;function dh(e,t){let n=e.getBoundingClientRect();return{top:n.top+t,bottom:n.bottom}}function fh(e){if(e.kind===`note`)return{color:Ou.color,title:`Remarque · ligne ${e.line}`,detail:null};let{finding:t,number:n}=e.entry;return{color:Du[t.severity].color,title:`Constat ${n} · ${Du[t.severity].label}`,detail:t.title}}function ph({model:e,rowsRef:t,scrollRef:n,toolbarHeight:r}){let i=(0,v.useRef)(null),a=(0,v.useRef)(!1),[o,s]=(0,v.useState)(0),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(null);(0,v.useLayoutEffect)(()=>{let e=t.current;if(!e)return;let n=()=>{let t=e.offsetHeight,n=e.querySelectorAll(`:scope > .hunk > :not(.hunk-header)`);if(t===0||n.length===0)return p(null);let r=Array.from(n,e=>e.offsetTop/t),i=n[n.length-1];p([...r,(i.offsetTop+i.offsetHeight)/t])};n();let r=new ResizeObserver(n);return r.observe(e),()=>r.disconnect()},[t,e]),(0,v.useEffect)(()=>{let e=n.current,i=t.current;if(!e||!i)return;let a=()=>{let t=dh(e,r),n=i.getBoundingClientRect();if(s(Math.max(Math.min(t.bottom-t.top,n.height),0)),n.height===0)return l(null);let a=Math.max(t.top,n.top),o=Math.min(t.bottom,n.bottom);l({top:(a-n.top)/n.height,height:Math.max(o-a,0)/n.height})};a(),e.addEventListener(`scroll`,a,{passive:!0});let o=new ResizeObserver(a);return o.observe(e),o.observe(i),()=>{e.removeEventListener(`scroll`,a),o.disconnect()}},[n,t,r]);let m=e=>{let a=n.current,o=t.current,s=i.current;if(!a||!o||!s)return;let c=s.getBoundingClientRect(),l=Math.min(Math.max((e-c.top)/c.height,0),1),u=dh(a,r),d=o.getBoundingClientRect();a.scrollTop+=d.top+l*d.height-(u.top+u.bottom)/2},h=e=>{e.button===0&&(a.current=!0,e.currentTarget.setPointerCapture(e.pointerId),d(null),m(e.clientY))},g=e=>{a.current&&m(e.clientY)},_=()=>{a.current=!1},y=(e,t)=>{a.current||d({top:lh+e*(o-8),...t})},b=e=>f?.[e]??0;return(0,O.jsx)(`div`,{className:`diff-minimap`,children:(0,O.jsxs)(`div`,{className:`diff-minimap-track`,style:{top:r,height:o},children:[(0,O.jsxs)(`div`,{ref:i,className:`diff-minimap-inner`,"aria-hidden":`true`,onPointerDown:h,onPointerMove:g,onPointerUp:_,onPointerCancel:_,onPointerLeave:()=>d(null),children:[(0,O.jsx)(`div`,{className:`minimap-lane is-changes`,children:f&&e.changes.map((e,t)=>(0,O.jsx)(`span`,{className:`minimap-change is-${e.kind}`,style:{top:`${b(e.start)*100}%`,height:`${(b(e.end)-b(e.start))*100}%`},onPointerEnter:()=>y(b(e.start),{color:mh(e.kind),title:e.label,detail:null})},t))}),(0,O.jsx)(`div`,{className:`minimap-lane is-dots`,children:f&&e.dots.map(e=>(0,O.jsx)(`span`,{className:`minimap-dot is-${e.kind}${e.kind===`finding`&&e.entry.finding.status!==`open`?` is-muted`:``}`,style:{top:`${b(e.row)*100}%`,"--dot":fh(e).color},onPointerEnter:()=>y(b(e.row),fh(e))},e.kind===`note`?`note-${e.line}`:e.entry.finding.id))}),c&&(0,O.jsx)(`div`,{className:`minimap-view`,style:{top:`${c.top*100}%`,height:`${c.height*100}%`}})]}),u&&(0,O.jsxs)(`div`,{className:`minimap-tooltip`,style:u.top>o/2?{bottom:o-u.top-uh}:{top:u.top-uh},children:[(0,O.jsxs)(`span`,{className:`minimap-tooltip-title`,children:[(0,O.jsx)(`span`,{className:`minimap-tooltip-swatch`,style:{background:u.color}}),u.title]}),u.detail&&(0,O.jsx)(`span`,{className:`minimap-tooltip-detail`,children:u.detail})]})]})})}function mh(e){switch(e){case`add`:return`var(--add)`;case`del`:return`var(--del)`;case`mod`:return`linear-gradient(90deg, var(--del) 50%, var(--add) 50%)`;case`reindent`:return`var(--accent-soft)`}}var hh=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function gh(e){return _h(e)}function _h(e){return Array.isArray(e)?vh(e):e instanceof RegExp?e:typeof e==`object`?yh(e):e}function vh(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=_h(e[n]);return t}function yh(e){let t={};for(let n in e)t[n]=_h(e[n]);return t}function bh(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function xh(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?xh(e.substring(0,e.length-1)):e.substr(~t+1)}var Sh=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Ch=class{static hasCaptures(e){return e!==null&&(Sh.lastIndex=0,Sh.test(e))}static replaceCaptures(e,t,n){return e.replace(Sh,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function wh(e,t){return e<t?-1:+(e>t)}function Th(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=wh(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Eh(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Dh(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Oh=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},kh=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Ph(e),t)}static createFromParsedTheme(e,t){return Lh(e,t)}_cachedMatchRoot=new Oh(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>jh(e.parent,t.parentScopes));return n?new Nh(n.fontStyle,n.foreground,n.background):null}},Ah=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function jh(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Mh(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Mh(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Nh=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Ph(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&Eh(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Eh(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new Fh(l,u,e,o,s,c)}}return n}var Fh=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},Ih=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(Ih||{});function Lh(e,t){e.sort((e,t)=>{let n=wh(e.scope,t.scope);return n!==0||(n=Th(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new Rh(t),o=new Nh(n,a.getId(r),a.getId(i)),s=new Vh(new Bh(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new kh(a,o,s)}var Rh=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},zh=Object.freeze([]),Bh=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||zh,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},Vh=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),Bh.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null)this._mainRule.acceptOverwrite(e,n,r,i);else{for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(Th(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Bh(e,t,n,r,i))}}},Hh=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Wh(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c|0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function Uh(e){return e}function Wh(e){return e}function Gh(e,t){let n=[],r=qh(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(Kh(i)){let e=[];do e.push(i),i=r.next();while(Kh(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function Kh(e){return!!e&&!!e.match(/[\w\.:]+/)}function qh(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Jh(e){typeof e.dispose==`function`&&e.dispose()}var Yh=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Xh=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Zh=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Qh=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Yh(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Zh;for(let n of e)$h(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Yh){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function $h(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof Yh?tg({baseGrammar:a,selfGrammar:i},r):eg(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new Yh(e))}function eg(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];ng([r],t,n)}}function tg(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&ng(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&ng(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function ng(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?bh({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&ng(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=cg(i);switch(a.kind){case 0:tg({...t,selfGrammar:t.baseGrammar},n);break;case 1:tg(t,n);break;case 2:eg(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?eg(a.ruleName,i,n):tg(i,n)}else a.kind===4?n.add(new Xh(a.scopeName,a.ruleName)):n.add(new Yh(a.scopeName))}}}var rg=class{kind=0},ig=class{kind=1},ag=class{constructor(e){this.ruleName=e}kind=2},og=class{constructor(e){this.scopeName=e}kind=3},sg=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function cg(e){if(e===`$base`)return new rg;if(e===`$self`)return new ig;let t=e.indexOf(`#`);return t===-1?new og(e):t===0?new ag(e.substring(1)):new sg(e.substring(0,t),e.substring(t+1))}var lg=/\\(\d+)/,ug=/\\(\d+)/g,dg=-1,fg=-2;function pg(e){return e}function mg(e){return e}var hg=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Ch.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Ch.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${xh(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Ch.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Ch.replaceCaptures(this._contentName,e,t)}},gg=class extends hg{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},_g=class extends hg{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Sg(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Cg,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},vg=class extends hg{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Cg,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},yg=class extends hg{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Sg(i,this.id),this.beginCaptures=a,this._end=new Sg(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Cg;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},bg=class extends hg{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Sg(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Sg(o,fg),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Cg;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Cg,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},xg=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new gg(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new _g(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=bh({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new vg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new bg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new yg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=cg(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof vg||e instanceof yg||e instanceof bg)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Sg=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&lg.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return ug.lastIndex=0,this.source.replace(ug,(e,t)=>Dh(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Cg=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new wg(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new wg(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},wg=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
72
|
+
`)}function Vm(e){return`${e===0?0:1},${e}`}function Hm(e){if(e.newContent===null)return null;let t=Al(e.newContent),n=[],r=1,i=0,a=e=>{for(;r<=e;r++)n.push({type:`context`,oldNo:r+i,newNo:r,text:t[r-1]})};for(let t of e.hunks)a(t.newLines===0?t.newStart:t.newStart-1),n.push(...t.lines),r+=t.newLines,i+=t.oldLines-t.newLines;a(t.length);let o=t.length+i,s={header:`@@ -${Vm(o)} +${Vm(t.length)} @@`,oldStart:o===0?0:1,oldLines:o,newStart:t.length===0?0:1,newLines:t.length,lines:n};return{path:e.path,hunks:[s],newContent:e.newContent}}function Um({anchorText:e,suggestion:t}){let n=Al(e),r=Al(t);return(0,O.jsxs)(`div`,{className:`fix`,children:[n.map((e,t)=>(0,O.jsxs)(`div`,{className:`fix-line is-del`,children:[(0,O.jsx)(`span`,{className:`fix-marker`,children:`−`}),(0,O.jsx)(`span`,{className:`fix-code`,children:e})]},`del-${t}`)),r.map((e,t)=>(0,O.jsxs)(`div`,{className:`fix-line is-add`,children:[(0,O.jsx)(`span`,{className:`fix-marker`,children:`+`}),(0,O.jsx)(`span`,{className:`fix-code`,children:e})]},`add-${t}`)),r.length===0&&(0,O.jsx)(`div`,{className:`fix-empty`,children:`Les lignes visées sont supprimées.`})]})}function Wm({analysis:e,finding:t,onAddNote:n}){let r=H(e=>e.setFindingStatus),i=H(e=>e.copy),a=H(e=>e.saving),o=t.location;return(0,O.jsxs)(`article`,{className:`finding-card is-${t.status}`,id:`finding-${t.id}`,children:[(0,O.jsxs)(`header`,{className:`finding-head`,children:[(0,O.jsx)(md,{severity:t.severity}),(0,O.jsx)(`h3`,{className:`finding-title`,children:t.title}),(0,O.jsx)(vd,{kind:t.kind}),(0,O.jsx)(_d,{status:t.status}),o&&(0,O.jsx)(`span`,{className:`finding-lines mono`,children:td(o.startLine,o.endLine)})]}),t.body.trim()!==``&&(0,O.jsx)(`p`,{className:`finding-body`,children:t.body}),t.status===`outdated`&&(0,O.jsx)(`p`,{className:`finding-outdated`,children:`Les lignes visées ont changé depuis la rédaction de ce constat : l'agent doit le réancrer avec update_finding.`}),t.suggestion!==null&&t.anchorText!==null&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`div`,{className:`finding-section-title`,children:`Correctif proposé`}),(0,O.jsx)(Um,{anchorText:t.anchorText,suggestion:t.suggestion})]}),(0,O.jsxs)(`footer`,{className:`finding-actions`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`button button-secondary`,onClick:()=>void i(dm(e,{findingIds:[t.id],noteIds:[],decision:null}),`Prompt du constat copié dans le presse-papiers.`),children:[(0,O.jsx)(U,{name:`bot`,color:`#b18cff`}),`Copier le prompt pour l'agent`]}),t.status===`open`&&(0,O.jsx)(`button`,{type:`button`,className:`link-button muted`,disabled:a,onClick:()=>void r(t.id,`ignored`),children:`Ignorer`}),t.status===`ignored`&&(0,O.jsx)(`button`,{type:`button`,className:`link-button muted`,disabled:a,onClick:()=>void r(t.id,`open`),children:`Rouvrir`}),(0,O.jsx)(`span`,{className:`spacer`}),n&&(0,O.jsx)(`button`,{type:`button`,className:`link-button accent`,onClick:n,children:`Ajouter une remarque`})]})]})}function Gm({note:e}){return e.question===null?(0,O.jsx)(qm,{note:e}):(0,O.jsx)(Ym,{note:e,question:e.question})}function Km(e){return e.location?.line?`ligne ${e.location.line}`:`fichier entier`}function qm({note:e}){let t=H(e=>e.updateNote),n=H(e=>e.deleteNote),r=H(e=>e.saving),[i,a]=(0,v.useState)(!1),o=Km(e);return i?(0,O.jsx)(Zm,{id:`note-edit-${e.id}`,label:`Modifier la remarque (${o})`,initialText:e.text,submitLabel:`Enregistrer la modification`,onSubmit:n=>n===e.text?Promise.resolve(!0):t(e.id,n),onClose:()=>a(!1)}):(0,O.jsxs)(`div`,{className:`note-card`,children:[(0,O.jsxs)(`div`,{className:`note-head`,children:[(0,O.jsx)(hd,{fixed:!1}),(0,O.jsxs)(`span`,{className:`note-meta`,title:`${o} · ${Uu(e.createdAt)}`,children:[o,` · `,Ku(e.createdAt)]}),(0,O.jsxs)(`button`,{type:`button`,className:`link-button muted`,disabled:r,onClick:()=>a(!0),children:[(0,O.jsx)(U,{name:`pencil`,size:13}),`Modifier`]}),(0,O.jsxs)(`button`,{type:`button`,className:`link-button muted`,disabled:r,onClick:()=>void n(e.id),children:[(0,O.jsx)(U,{name:`trash`,size:13}),`Supprimer`]})]}),(0,O.jsx)(`p`,{className:`note-text`,children:e.text})]})}function Jm({question:e}){return e.answer===null?(0,O.jsxs)(`span`,{className:`question-status is-waiting`,title:`Envoyée le ${Uu(e.askedAt)}`,children:[(0,O.jsx)(U,{name:`loader-circle`,size:13}),`Agent notifié`]}):(0,O.jsxs)(`span`,{className:`question-status is-answered`,title:`Réponse reçue le ${Uu(e.answer.at)}`,children:[(0,O.jsx)(`span`,{className:`question-status-dot`,"aria-hidden":`true`}),`Réponse reçue`]})}function Ym({note:e,question:t}){let n=H(e=>e.markAnswerSeen),r=H(e=>e.deleteNote),i=H(e=>e.saving),[a,o]=(0,v.useState)(!1),s=Km(e),c=t.answer;return(0,O.jsxs)(`div`,{className:`note-card is-question${a?` is-open`:``}`,children:[(0,O.jsxs)(`div`,{className:`note-head`,children:[(0,O.jsx)(gd,{fixed:!1}),(0,O.jsxs)(`span`,{className:`note-meta`,title:`${s} · ${Uu(t.askedAt)}`,children:[s,` · `,Ku(t.askedAt)]}),(0,O.jsx)(Jm,{question:t}),(0,O.jsx)(`button`,{type:`button`,className:`link-button muted question-delete`,disabled:i,title:`Supprimer la question et sa réponse`,"aria-label":`Supprimer la question et sa réponse`,onClick:()=>void r(e.id),children:(0,O.jsx)(U,{name:`trash`,size:13})})]}),(0,O.jsx)(`p`,{className:`note-text`,children:e.text}),c!==null&&!a&&(0,O.jsxs)(`button`,{type:`button`,className:`answer-toggle`,onClick:()=>{o(!0),t.answerSeenAt===null&&n(e.id)},children:[(0,O.jsx)(U,{name:`messages-square`,size:14}),`Voir la réponse`]}),c!==null&&a&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`answer-block`,children:[(0,O.jsxs)(`div`,{className:`answer-head`,children:[(0,O.jsx)(U,{name:`bot`,size:14,color:`#b18cff`}),`Agent · `,Ku(c.at)]}),(0,O.jsx)(`p`,{className:`answer-text`,children:c.text})]}),(0,O.jsxs)(`button`,{type:`button`,className:`link-button accent answer-hide`,onClick:()=>o(!1),children:[(0,O.jsx)(U,{name:`chevron-up`,size:14}),`Masquer la réponse`]})]})]})}function Xm({path:e,line:t,findingId:n,onClose:r}){let i=H(e=>e.addNote);return(0,O.jsx)(Zm,{id:`note-${t??`file`}`,label:t===null?`Remarque sur le fichier`:`Remarque sur la ligne ${t}`,initialText:``,submitLabel:`Enregistrer`,onSubmit:r=>i(e,t,r,n,!1),onAsk:r=>i(e,t,r,n,!0),onClose:r})}function Zm({id:e,label:t,initialText:n,submitLabel:r,onSubmit:i,onAsk:a,onClose:o}){let s=H(e=>e.saving),[c,l]=(0,v.useState)(n),u=(0,v.useRef)(null);(0,v.useEffect)(()=>u.current?.focus(),[]);let d=async e=>{c.trim()!==``&&await e(c.trim())&&o()},f=c.trim()===``;return(0,O.jsxs)(`form`,{className:`note-composer`,onSubmit:e=>{e.preventDefault(),d(i)},children:[(0,O.jsx)(`label`,{className:`note-composer-label`,htmlFor:e,children:t}),(0,O.jsx)(`textarea`,{id:e,ref:u,rows:3,value:c,placeholder:`Ce que l'agent doit revoir…`,onChange:e=>l(e.target.value),onFocus:e=>e.currentTarget.setSelectionRange(e.currentTarget.value.length,e.currentTarget.value.length),onKeyDown:e=>{e.key===`Escape`&&o(),e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),d(e.shiftKey&&a?a:i))}}),a?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:`hint`,children:`Ctrl + Entrée : enregistrer · Ctrl + Maj + Entrée : envoyer`}),(0,O.jsxs)(`div`,{className:`note-composer-actions`,children:[(0,O.jsx)(`button`,{type:`button`,className:`button button-ghost`,onClick:o,children:`Annuler`}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsxs)(`button`,{type:`button`,className:`button button-ask button-small`,disabled:s||f,title:`La question part tout de suite à l'agent et reste dans la revue avec sa réponse.`,onClick:()=>void d(a),children:[(0,O.jsx)(U,{name:`send`,size:13}),`Envoyer à l'agent`]}),(0,O.jsx)(`button`,{type:`submit`,className:`button button-primary button-small`,disabled:s||f,children:r})]})]}):(0,O.jsxs)(`div`,{className:`note-composer-actions`,children:[(0,O.jsx)(`span`,{className:`hint`,children:`Ctrl + Entrée pour enregistrer · Échap pour annuler`}),(0,O.jsx)(`button`,{type:`button`,className:`button button-ghost`,onClick:o,children:`Annuler`}),(0,O.jsx)(`button`,{type:`submit`,className:`button button-primary button-small`,disabled:s||f,children:r})]})]})}var Qm=4;function $m(e){let t=0;for(let n of e)if(n===` `)t++;else if(n===` `)t+=Qm-t%Qm;else break;return t}function eh(e){let t=[],n=[],r=-1,i=e=>{r>e.start&&t.push({start:e.start,end:r})};for(e.forEach((e,t)=>{if(e===null||e.trim()===``)return;let a=$m(e);for(;n.length>0&&n[n.length-1].indent>=a;)i(n.pop());n.push({start:t,indent:a}),r=t});n.length>0;)i(n.pop());t.sort((e,t)=>e.start-t.start);let a=[],o=[];for(let e of t){for(;o.length>0&&a[o[o.length-1]].end<e.start;)o.pop();let t=o.length>0?o[o.length-1]:null;a.push({...e,parent:t,depth:t===null?0:a[t].depth+1}),o.push(a.length-1)}return a}function th(e,t){let n=new Set;for(let r of t){let t=e[r];for(let e=t.start+1;e<=t.end;e++)n.add(e)}return n}function nh(e,t,n){for(let r=e[t].parent;r!==null;r=e[r].parent)if(r===n)return!0;return!1}function rh(e,t,n,r){for(let i=e[t].parent;i!==null&&i!==n;i=e[i].parent)if(r.has(i))return!0;return!1}function ih(e,t,n){let r=new Set(n),i=e.map((e,t)=>t).filter(n=>nh(e,n,t));if(n.has(t)){r.delete(t);for(let e of i)r.delete(e);return r}let a=i.filter(r=>!n.has(r)&&!rh(e,r,t,n));if(a.length===0)return r.add(t),r;let o=Math.max(...a.map(t=>e[t].depth));for(let t of a)e[t].depth===o&&r.add(t);return r}function ah({entry:e,small:t}){let n=Du[e.finding.severity];return(0,O.jsx)(`span`,{className:`finding-number${t?` is-small`:``}`,style:{color:n.color,background:n.background,borderColor:n.color},"aria-label":`Constat ${e.number}`,children:e.number})}function oh(e,t){return e===`applied`?t?`Correctif appliqué dans le code`:`Appliquer le correctif dans le code`:t?`Correctif affiché dans le code`:`Afficher le correctif dans le code`}function sh({analysis:e,entry:t,fix:n,mode:r,onToggleFix:i,onAddNote:a,highlighted:o}){let s=H(e=>e.setFindingStatus),c=H(e=>e.copy),l=H(e=>e.saving),{finding:u}=t,d=Du[u.severity],f=n.state===`shown`,p=r===`off`||n.state===`blocked`;return(0,O.jsxs)(`article`,{className:`margin-card is-${u.status}${f?` is-fix-shown`:``}${o?` is-target`:``}`,id:`finding-${u.id}`,"data-finding-card":u.id,style:{"--severity":d.color},children:[(0,O.jsxs)(`header`,{className:`margin-card-head`,children:[(0,O.jsx)(ah,{entry:t}),(0,O.jsx)(`span`,{className:`pill pill-small margin-card-severity`,style:{color:d.color,background:d.background},children:d.label}),(0,O.jsx)(vd,{kind:u.kind}),(0,O.jsx)(_d,{status:u.status}),(0,O.jsxs)(`span`,{className:`margin-card-lines mono`,children:[`l. `,jl(t.startLine,t.endLine,`–`)]})]}),(0,O.jsx)(`h3`,{className:`margin-card-title`,children:u.title}),u.body.trim()!==``&&(0,O.jsx)(`p`,{className:`margin-card-body`,children:u.body}),u.status===`outdated`&&(0,O.jsx)(`p`,{className:`finding-outdated`,children:`Les lignes visées ont changé depuis la rédaction de ce constat : l'agent doit le réancrer avec update_finding.`}),(n.state===`shown`||n.state===`hidden`||n.state===`blocked`)&&(0,O.jsxs)(`label`,{className:`fix-toggle${f?` is-on`:``}${p?` is-disabled`:``}`,children:[(0,O.jsx)(`input`,{type:`checkbox`,className:`visually-hidden`,checked:f,disabled:p,onChange:e=>i(e.target.checked)}),(0,O.jsx)(`span`,{className:`switch`,"aria-hidden":`true`}),oh(r,f)]}),r===`off`&&n.state===`hidden`&&(0,O.jsx)(`p`,{className:`margin-card-hint`,children:`Choisissez « Avant / après » ou « Code corrigé » pour afficher le correctif.`}),n.state===`blocked`&&(0,O.jsx)(`p`,{className:`margin-card-hint`,children:r===`applied`?`Ses lignes recouvrent le correctif du constat ${n.blockedBy} : retirez-le pour appliquer celui-ci dans le code.`:`Ses lignes recouvrent le correctif du constat ${n.blockedBy} : masquez-le pour afficher celui-ci dans le code.`}),n.state===`outside`&&u.suggestion!==null&&u.anchorText!==null&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{className:`margin-card-hint`,children:`Les lignes visées ne sont pas toutes affichées dans le diff : voici le correctif proposé.`}),(0,O.jsx)(Um,{anchorText:u.anchorText,suggestion:u.suggestion})]}),(0,O.jsxs)(`footer`,{className:`margin-card-actions`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`margin-button`,onClick:()=>void c(dm(e,{findingIds:[u.id],noteIds:[],decision:null}),`Prompt du constat copié dans le presse-papiers.`),children:[(0,O.jsx)(U,{name:`bot`,color:`#b18cff`}),`Copier le prompt`]}),u.status===`open`&&(0,O.jsxs)(`button`,{type:`button`,className:`margin-button`,disabled:l,onClick:()=>void s(u.id,`ignored`),children:[(0,O.jsx)(U,{name:`eye-off`,color:`#9aa1b1`}),`Ignorer`]}),u.status===`ignored`&&(0,O.jsxs)(`button`,{type:`button`,className:`margin-button`,disabled:l,onClick:()=>void s(u.id,`open`),children:[(0,O.jsx)(U,{name:`rotate-ccw`,color:`#9aa1b1`}),`Rouvrir`]}),a&&(0,O.jsxs)(`button`,{type:`button`,className:`margin-button`,onClick:a,children:[(0,O.jsx)(U,{name:`message-square`,color:`#9aa1b1`}),`Remarque`]})]})]})}function ch({label:e,options:t,value:n,onChange:r,disabled:i,trigger:a}){let[o,s]=(0,v.useState)(null),c=o!==null,l=(0,v.useRef)(null),u=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(!c)return;let e=()=>s(null),t=t=>{l.current?.contains(t.target)||e()},n=t=>{t.key===`Escape`&&e()};return document.addEventListener(`mousedown`,t),document.addEventListener(`keydown`,n),document.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{document.removeEventListener(`mousedown`,t),document.removeEventListener(`keydown`,n),document.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[c]);let d=()=>{let e=u.current?.getBoundingClientRect();s(c||!e?null:{top:e.bottom+6,right:window.innerWidth-e.right})},f=a??t[n];return(0,O.jsxs)(`div`,{className:`option-menu`,ref:l,children:[(0,O.jsxs)(`button`,{ref:u,type:`button`,className:`option-menu-button${c?` is-open`:``}`,"aria-haspopup":`listbox`,"aria-expanded":c,title:e,onClick:d,children:[(0,O.jsx)(U,{name:f.icon,color:c?`#c3caff`:`#9aa1b1`}),(0,O.jsx)(`span`,{className:`option-menu-value`,children:f.label}),(0,O.jsx)(U,{name:c?`chevron-up`:`chevron-down`,size:12,color:c?`#9aa1b1`:`#646b7b`})]}),o&&(0,O.jsxs)(`div`,{className:`option-menu-list`,role:`listbox`,"aria-label":e,style:o,children:[(0,O.jsx)(`div`,{className:`option-menu-title`,children:e}),Object.keys(t).map(e=>{let a=t[e],o=i?.[e],c=e===n;return(0,O.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":c,className:`option-menu-item${c?` is-selected`:``}`,disabled:o!==void 0,onClick:()=>{s(null),r(e)},children:[(0,O.jsx)(U,{name:a.icon,color:c?`#c3caff`:`#9aa1b1`}),(0,O.jsxs)(`span`,{className:`option-menu-item-text`,children:[(0,O.jsx)(`span`,{className:`option-menu-item-label`,children:a.label}),(0,O.jsx)(`span`,{className:`option-menu-item-description`,children:o??a.description})]}),c&&(0,O.jsx)(U,{name:`check`,color:`#c3caff`})]},e)})]})]})}var lh=4,uh=6;function dh(e,t){let n=e.getBoundingClientRect();return{top:n.top+t,bottom:n.bottom}}function fh(e){if(e.kind===`note`)return{color:Ou.color,title:`Remarque · ligne ${e.line}`,detail:null};let{finding:t,number:n}=e.entry;return{color:Du[t.severity].color,title:`Constat ${n} · ${Du[t.severity].label}`,detail:t.title}}function ph({model:e,rowsRef:t,scrollRef:n,toolbarHeight:r}){let i=(0,v.useRef)(null),a=(0,v.useRef)(!1),[o,s]=(0,v.useState)(0),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(null);(0,v.useLayoutEffect)(()=>{let e=t.current;if(!e)return;let n=()=>{let t=e.offsetHeight,n=e.querySelectorAll(`:scope > .hunk > :not(.hunk-header)`);if(t===0||n.length===0)return p(null);let r=Array.from(n,e=>e.offsetTop/t),i=n[n.length-1];p([...r,(i.offsetTop+i.offsetHeight)/t])};n();let r=new ResizeObserver(n);return r.observe(e),()=>r.disconnect()},[t,e]),(0,v.useEffect)(()=>{let e=n.current,i=t.current;if(!e||!i)return;let a=()=>{let t=dh(e,r),n=i.getBoundingClientRect();if(s(Math.max(Math.min(t.bottom-t.top,n.height),0)),n.height===0)return l(null);let a=Math.max(t.top,n.top),o=Math.min(t.bottom,n.bottom);l({top:(a-n.top)/n.height,height:Math.max(o-a,0)/n.height})};a(),e.addEventListener(`scroll`,a,{passive:!0});let o=new ResizeObserver(a);return o.observe(e),o.observe(i),()=>{e.removeEventListener(`scroll`,a),o.disconnect()}},[n,t,r]);let m=e=>{let a=n.current,o=t.current,s=i.current;if(!a||!o||!s)return;let c=s.getBoundingClientRect(),l=Math.min(Math.max((e-c.top)/c.height,0),1),u=dh(a,r),d=o.getBoundingClientRect();a.scrollTop+=d.top+l*d.height-(u.top+u.bottom)/2},h=e=>{e.button===0&&(a.current=!0,e.currentTarget.setPointerCapture(e.pointerId),d(null),m(e.clientY))},g=e=>{a.current&&m(e.clientY)},_=()=>{a.current=!1},y=(e,t)=>{a.current||d({top:lh+e*(o-8),...t})},b=e=>f?.[e]??0;return(0,O.jsx)(`div`,{className:`diff-minimap`,children:(0,O.jsxs)(`div`,{className:`diff-minimap-track`,style:{top:r,height:o},children:[(0,O.jsxs)(`div`,{ref:i,className:`diff-minimap-inner`,"aria-hidden":`true`,onPointerDown:h,onPointerMove:g,onPointerUp:_,onPointerCancel:_,onPointerLeave:()=>d(null),children:[(0,O.jsx)(`div`,{className:`minimap-lane is-changes`,children:f&&e.changes.map((e,t)=>(0,O.jsx)(`span`,{className:`minimap-change is-${e.kind}`,style:{top:`${b(e.start)*100}%`,height:`${(b(e.end)-b(e.start))*100}%`},onPointerEnter:()=>y(b(e.start),{color:mh(e.kind),title:e.label,detail:null})},t))}),(0,O.jsx)(`div`,{className:`minimap-lane is-dots`,children:f&&e.dots.map(e=>(0,O.jsx)(`span`,{className:`minimap-dot is-${e.kind}${e.kind===`finding`&&e.entry.finding.status!==`open`?` is-muted`:``}`,style:{top:`${b(e.row)*100}%`,"--dot":fh(e).color},onPointerEnter:()=>y(b(e.row),fh(e))},e.kind===`note`?`note-${e.line}`:e.entry.finding.id))}),c&&(0,O.jsx)(`div`,{className:`minimap-view`,style:{top:`${c.top*100}%`,height:`${c.height*100}%`}})]}),u&&(0,O.jsxs)(`div`,{className:`minimap-tooltip`,style:u.top>o/2?{bottom:o-u.top-uh}:{top:u.top-uh},children:[(0,O.jsxs)(`span`,{className:`minimap-tooltip-title`,children:[(0,O.jsx)(`span`,{className:`minimap-tooltip-swatch`,style:{background:u.color}}),u.title]}),u.detail&&(0,O.jsx)(`span`,{className:`minimap-tooltip-detail`,children:u.detail})]})]})})}function mh(e){switch(e){case`add`:return`var(--add)`;case`del`:return`var(--del)`;case`mod`:return`linear-gradient(90deg, var(--del) 50%, var(--add) 50%)`;case`reindent`:return`var(--accent-soft)`}}var hh=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function gh(e){return _h(e)}function _h(e){return Array.isArray(e)?vh(e):e instanceof RegExp?e:typeof e==`object`?yh(e):e}function vh(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=_h(e[n]);return t}function yh(e){let t={};for(let n in e)t[n]=_h(e[n]);return t}function bh(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function xh(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?xh(e.substring(0,e.length-1)):e.substr(~t+1)}var Sh=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Ch=class{static hasCaptures(e){return e!==null&&(Sh.lastIndex=0,Sh.test(e))}static replaceCaptures(e,t,n){return e.replace(Sh,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function wh(e,t){return e<t?-1:+(e>t)}function Th(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=wh(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Eh(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Dh(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Oh=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},kh=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Ph(e),t)}static createFromParsedTheme(e,t){return Lh(e,t)}_cachedMatchRoot=new Oh(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>jh(e.parent,t.parentScopes));return n?new Nh(n.fontStyle,n.foreground,n.background):null}},Ah=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function jh(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Mh(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Mh(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Nh=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Ph(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&Eh(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Eh(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new Fh(l,u,e,o,s,c)}}return n}var Fh=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},Ih=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(Ih||{});function Lh(e,t){e.sort((e,t)=>{let n=wh(e.scope,t.scope);return n!==0||(n=Th(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new Rh(t),o=new Nh(n,a.getId(r),a.getId(i)),s=new Vh(new Bh(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new kh(a,o,s)}var Rh=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},zh=Object.freeze([]),Bh=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||zh,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},Vh=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),Bh.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null)this._mainRule.acceptOverwrite(e,n,r,i);else{for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(Th(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Bh(e,t,n,r,i))}}},Hh=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Wh(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c|0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function Uh(e){return e}function Wh(e){return e}function Gh(e,t){let n=[],r=qh(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(Kh(i)){let e=[];do e.push(i),i=r.next();while(Kh(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function Kh(e){return!!e&&!!e.match(/[\w\.:]+/)}function qh(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Jh(e){typeof e.dispose==`function`&&e.dispose()}var Yh=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Xh=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Zh=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Qh=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Yh(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Zh;for(let n of e)$h(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Yh){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function $h(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof Yh?tg({baseGrammar:a,selfGrammar:i},r):eg(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new Yh(e))}function eg(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];ng([r],t,n)}}function tg(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&ng(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&ng(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function ng(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?bh({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&ng(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=cg(i);switch(a.kind){case 0:tg({...t,selfGrammar:t.baseGrammar},n);break;case 1:tg(t,n);break;case 2:eg(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?eg(a.ruleName,i,n):tg(i,n)}else a.kind===4?n.add(new Xh(a.scopeName,a.ruleName)):n.add(new Yh(a.scopeName))}}}var rg=class{kind=0},ig=class{kind=1},ag=class{constructor(e){this.ruleName=e}kind=2},og=class{constructor(e){this.scopeName=e}kind=3},sg=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function cg(e){if(e===`$base`)return new rg;if(e===`$self`)return new ig;let t=e.indexOf(`#`);return t===-1?new og(e):t===0?new ag(e.substring(1)):new sg(e.substring(0,t),e.substring(t+1))}var lg=/\\(\d+)/,ug=/\\(\d+)/g,dg=-1,fg=-2;function pg(e){return e}function mg(e){return e}var hg=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Ch.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Ch.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${xh(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Ch.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Ch.replaceCaptures(this._contentName,e,t)}},gg=class extends hg{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},_g=class extends hg{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Sg(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Cg,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},vg=class extends hg{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Cg,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},yg=class extends hg{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Sg(i,this.id),this.beginCaptures=a,this._end=new Sg(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Cg;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},bg=class extends hg{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Sg(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Sg(o,fg),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Cg;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Cg,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},xg=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new gg(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new _g(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=bh({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new vg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new bg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new yg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=cg(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof vg||e instanceof yg||e instanceof bg)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Sg=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&lg.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return ug.lastIndex=0,this.source.replace(ug,(e,t)=>Dh(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Cg=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new wg(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new wg(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},wg=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
73
73
|
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Tg=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Eg=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Tg(e,8),this._embeddedLanguagesMatcher=new Dg(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Tg(0,0);_getBasicScopeAttributes=new Oh(e=>new Tg(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Dg=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>Dh(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var Og=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function kg(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Ag(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new Og(i,!0);f()}return new Og(i,!1);function f(){let o=jg(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===dg){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),Ig(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof yg){let r=o;Ig(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof bg){let r=o;Ig(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(Ig(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function Ag(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof bg&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=Fg(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==fg){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),Ig(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function jg(e,t,n,r,i,a){let o=Mg(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=Ng(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function Mg(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=Pg(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Ng(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=Pg(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function Pg(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function Fg(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Ig(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));kg(e,p,n&&d.start===0,d.start,f,i,!1,0),Jh(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new Lg(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var Lg=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Rg(e,t,n,r,i,a,o,s){return new Hg(e,t,n,r,i,a,o,s)}function zg(e,t,n,r,i){let a=Gh(t,Bg),o=xg.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function Bg(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(Vg(t[r],e))return n=r+1,!0;return!1})}function Vg(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var Hg=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new Eg(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Ug(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=Gh(e,Bg);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)zg(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&zg(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(pg(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[mg(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Ug(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=xg.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Gg.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=Hh.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?Wg.createRootAndLookUpScopeName(a,r,this):Wg.createRoot(`unknown`,r),t=new Gg(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
74
74
|
`;let a=this.createOnigString(e),o=a.content.length,s=new qg(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=kg(this,a,i,0,t,s,!0,r);return Jh(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Ug(e,t){return e=gh(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Wg=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=Ah.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Ah(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Ah(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(1)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),Hh.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},Gg=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?Wg.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(1)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:mg(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=Wg.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,pg(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Wg.fromExtension(r,n.contentNameScopesList))}},Kg=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):Gh(e,Bg).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>Gh(e,Bg).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},qg=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=Hh.set(n,0,Uh(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=Hh.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},Jg=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,Rg(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},Yg=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Jg(kh.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(kh.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new Kg(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new Qh(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},Xg=Gg.NULL;function Zg(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function Qg(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function $g(e){return Array.isArray(e)?e:[e]}async function e_(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function t_(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function n_(e){return e===`ansi`||t_(e)}function r_(e){return e===`none`}function i_(e){return r_(e)}var a_=/(\r?\n)/g;function o_(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(a_),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var s_={light:`#333333`,dark:`#bbbbbb`},c_={light:`#fffffe`,dark:`#1e1e1e`},l_=`__shiki_resolved`;function u_(e){if(e?.[l_])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?s_.light:s_.dark,n||=t.type===`light`?c_.light:c_.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,l_,{enumerable:!1,writable:!1,value:!0}),t}async function d_(e){return[...new Set((await Promise.all(e.filter(e=>!n_(e)).map(async e=>await e_(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function f_(e){return(await Promise.all(e.map(async e=>i_(e)?null:u_(await e_(e))))).filter(e=>!!e)}function p_(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new hh(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var m_=class extends Yg{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=u_(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=kh.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=p_(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._syncRegistry?._grammars?.get(e.scopeName)?.dispose(),this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new hh(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},h_=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).includes(e.scopeName)||this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},g_=0;function __(e){g_+=1,e.warnings!==!1&&g_>=10&&g_%10==0&&console.warn(`[Shiki] ${g_} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new hh("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(u_),i=new m_(new h_(e.engine,n),r,n,e.langAlias),a;function o(t){return p_(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new hh(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new hh(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await d_(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await f_(e))}function g(){if(t)throw new hh(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--g_)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function v_(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([f_(e.themes||[]),d_(e.langs||[]),e.engine]);return __({...e,themes:t,langs:n,engine:r})}var y_=new WeakMap;function b_(e,t){y_.set(e,t)}function x_(e){return y_.get(e)}var S_=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries($g(n).map(e=>[e,Xg])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return C_(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function C_(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function w_(e,t){if(!(e instanceof S_))throw new hh(`Invalid grammar state`);return e.getInternalStack(t)}var T_=/,/,E_=/ /;function D_(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(t_(e.resolveLangAlias(n.lang||`text`))||r_(r))return o_(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new hh(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new hh(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return k_(t,o,i,a,n)}function O_(...e){if(e.length===2)return x_(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(t_(i)||r_(a))throw new hh(`Plain language does not have grammar state`);if(i===`ansi`)throw new hh(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new S_(A_(n,c,o,s,r).stateStack,c.name,o.name)}function k_(e,t,n,r,i){let a=A_(e,t,n,r,i),o=new S_(a.stateStack,t.name,n.name);return b_(a.tokens,o),a.tokens}function A_(e,t,n,r,i){let a=Zg(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=o_(e),u=i.grammarState?w_(i.grammarState,n.name)??Xg:i.grammarContextCode==null?Xg:A_(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,d=[],f=[];for(let e=0,i=l.length;e<i;e++){let[i,p]=l[e];if(i===``){d=[],f.push([]);continue}if(o>0&&i.length>=o){d=[],f.push([{content:i,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;c&&c!==`tokenType`&&(m=t.tokenizeLine(i,u,s),h=m.tokens,g=0);let _=t.tokenizeLine2(i,u,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:i.length;if(t===o)continue;let s=_.tokens[2*e+1],l=Qg(r[Hh.getForeground(s)],a),u=Hh.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=Hh.getTokenType(s);else if(c){let e=[];if(c!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(T_).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(E_))})}f.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=i.substring(t.startIndex,t.endIndex);r+=n.length,f.explanation.push({content:n,scopes:c===`scopeName`?j_(t.scopes):M_(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function j_(e){return e.map(e=>({scopeName:e}))}function M_(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:F_(e,i,t.slice(0,r))}}return n}function N_(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function P_(e,t,n){if(!N_(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)N_(e[r],n[i])&&--r,--i;return r===-1}function F_(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(P_(e,t,n)){r.push(a);break}return r}function I_(e,t,n,r=D_){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:x_(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=L_(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new S_(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&b_(s,c),s}function L_(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var R_=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],z_=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};z_.prototype.normal={},z_.prototype.property={},z_.prototype.space=void 0;function B_(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new z_(n,r,t)}function V_(e){return e.toLowerCase()}var H_=class{constructor(e,t){this.attribute=t,this.property=e}};H_.prototype.attribute=``,H_.prototype.booleanish=!1,H_.prototype.boolean=!1,H_.prototype.commaOrSpaceSeparated=!1,H_.prototype.commaSeparated=!1,H_.prototype.defined=!1,H_.prototype.mustUseProperty=!1,H_.prototype.number=!1,H_.prototype.overloadedBoolean=!1,H_.prototype.property=``,H_.prototype.spaceSeparated=!1,H_.prototype.space=void 0;var U_=s({boolean:()=>Z,booleanish:()=>G_,commaOrSpaceSeparated:()=>Y_,commaSeparated:()=>J_,number:()=>Q,overloadedBoolean:()=>K_,spaceSeparated:()=>q_}),W_=0,Z=X_(),G_=X_(),K_=X_(),Q=X_(),q_=X_(),J_=X_(),Y_=X_();function X_(){return 2**++W_}var Z_=Object.keys(U_),Q_=class extends H_{constructor(e,t,n,r){let i=-1;if(super(e,t),$_(this,`space`,r),typeof n==`number`)for(;++i<Z_.length;){let e=Z_[i];$_(this,Z_[i],(n&U_[e])===U_[e])}}};Q_.prototype.defined=!0;function $_(e,t,n){n&&(e[t]=n)}function ev(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Q_(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[V_(r)]=r,n[V_(a.attribute)]=r}return new z_(t,n,e.space)}var tv=ev({properties:{ariaActiveDescendant:null,ariaAtomic:G_,ariaAutoComplete:null,ariaBusy:G_,ariaChecked:G_,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:q_,ariaCurrent:null,ariaDescribedBy:q_,ariaDetails:null,ariaDisabled:G_,ariaDropEffect:q_,ariaErrorMessage:null,ariaExpanded:G_,ariaFlowTo:q_,ariaGrabbed:G_,ariaHasPopup:null,ariaHidden:G_,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:q_,ariaLevel:Q,ariaLive:null,ariaModal:G_,ariaMultiLine:G_,ariaMultiSelectable:G_,ariaOrientation:null,ariaOwns:q_,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:G_,ariaReadOnly:G_,ariaRelevant:null,ariaRequired:G_,ariaRoleDescription:q_,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:G_,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function nv(e,t){return t in e?e[t]:t}function rv(e,t){return nv(e,t.toLowerCase())}var iv=ev({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:J_,acceptCharset:q_,accessKey:q_,action:null,allow:null,allowFullScreen:Z,allowPaymentRequest:Z,allowUserMedia:Z,alpha:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:q_,autoFocus:Z,autoPlay:Z,blocking:q_,capture:null,charSet:null,checked:Z,cite:null,className:q_,closedBy:null,colorSpace:null,cols:Q,colSpan:Q,command:null,commandFor:null,content:null,contentEditable:G_,controls:Z,controlsList:q_,coords:Q|J_,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:K_,draggable:G_,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:q_,height:Q,hidden:K_,high:Q,href:null,hrefLang:null,htmlFor:q_,httpEquiv:q_,id:null,imageSizes:null,imageSrcSet:null,inert:Z,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:q_,itemRef:q_,itemScope:Z,itemType:q_,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Z,optimum:Q,pattern:null,ping:q_,placeholder:null,playsInline:Z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:q_,required:Z,reversed:Z,rows:Q,rowSpan:Q,sandbox:q_,scope:null,scoped:Z,seamless:Z,selected:Z,shadowRootClonable:Z,shadowRootCustomElementRegistry:Z,shadowRootDelegatesFocus:Z,shadowRootMode:null,shadowRootSerializable:Z,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:G_,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:Z,useMap:null,value:G_,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:q_,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:G_,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Z,disablePictureInPicture:Z,disableRemotePlayback:Z,exportParts:J_,part:q_,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:rv}),av=ev({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Y_,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:q_,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:Z,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:J_,g2:J_,glyphName:J_,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:Y_,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:q_,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Y_,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Y_,rev:Y_,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Y_,requiredFeatures:Y_,requiredFonts:Y_,requiredFormats:Y_,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:Y_,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Y_,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Y_,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:nv}),ov=ev({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),sv=ev({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:rv}),cv=ev({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),lv=/[A-Z]/g,uv=/-[a-z]/g,dv=/^data[-\w.:]+$/i;function fv(e,t){let n=V_(t),r=t,i=H_;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&dv.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(uv,mv);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!uv.test(e)){let n=e.replace(lv,pv);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Q_}return new i(r,t)}function pv(e){return`-`+e.toLowerCase()}function mv(e){return e.charAt(1).toUpperCase()}var hv=B_([tv,iv,ov,sv,cv],`html`),gv=B_([tv,av,ov,sv,cv],`svg`),_v={}.hasOwnProperty;function vv(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&_v.call(t,e)){let n=String(t[e]);i=_v.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var yv=/["&'<>`]/g,bv=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,xv=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Sv=/[|\\{}()[\]^$+*?.]/g,Cv=new WeakMap;function wv(e,t){return e=e.replace(t.subset?Tv(t.subset):yv,r),t.subset||t.escapeOnly?e:e.replace(bv,n).replace(xv,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function Tv(e){let t=Cv.get(e);return t||(t=Ev(e),Cv.set(e,t)),t}function Ev(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Sv,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var Dv=/[\dA-Fa-f]/;function Ov(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!Dv.test(String.fromCharCode(t))?r:r+`;`}var kv=/\d/;function Av(e,t,n){let r=`&#`+String(e);return n&&t&&!kv.test(String.fromCharCode(t))?r:r+`;`}var jv=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),Mv={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},Nv=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],Pv={}.hasOwnProperty,Fv={},Iv;for(Iv in Mv)Pv.call(Mv,Iv)&&(Fv[Mv[Iv]]=Iv);var Lv=/[^\dA-Za-z]/;function Rv(e,t,n,r){let i=String.fromCharCode(e);if(Pv.call(Fv,i)){let e=Fv[i],a=`&`+e;return n&&jv.includes(e)&&!Nv.includes(e)&&(!r||t&&t!==61&&Lv.test(String.fromCharCode(t)))?a:a+`;`}return``}function zv(e,t,n){let r=Ov(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Rv(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=Av(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Bv(e,t){return wv(e,Object.assign({format:zv},t))}var Vv=/^>|^->|<!--|-->|--!>|<!-$/g,Hv=[`>`],Uv=[`<`,`>`];function Wv(e,t,n,r){return r.settings.bogusComments?`<?`+Bv(e.value,Object.assign({},r.settings.characterReferences,{subset:Hv}))+`>`:`<!--`+e.value.replace(Vv,i)+`-->`;function i(e){return Bv(e,Object.assign({},r.settings.characterReferences,{subset:Uv}))}}function Gv(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function Kv(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function qv(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function Jv(e){return e.join(` `).trim()}var Yv=/[ \t\n\f\r]/g;function Xv(e){return typeof e==`object`?e.type===`text`&&Zv(e.value):Zv(e)}function Zv(e){return e.replace(Yv,``)===``}var Qv=ty(1),$v=ty(-1),ey=[];function ty(e){return t;function t(t,n,r){let i=t?t.children:ey,a=(n||0)+e,o=i[a];if(!r)for(;o&&Xv(o);)a+=e,o=i[a];return o}}var ny={}.hasOwnProperty;function ry(e){return t;function t(t,n,r){return ny.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var iy=ry({body:sy,caption:ay,colgroup:ay,dd:dy,dt:uy,head:ay,html:oy,li:ly,optgroup:py,option:my,p:cy,rp:fy,rt:fy,tbody:gy,td:yy,tfoot:_y,th:yy,thead:hy,tr:vy});function ay(e,t,n){let r=Qv(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&Xv(r.value.charAt(0)))}function oy(e,t,n){let r=Qv(n,t);return!r||r.type!==`comment`}function sy(e,t,n){let r=Qv(n,t);return!r||r.type!==`comment`}function cy(e,t,n){let r=Qv(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||n.type!==`element`||n.tagName!==`a`&&n.tagName!==`audio`&&n.tagName!==`del`&&n.tagName!==`ins`&&n.tagName!==`map`&&n.tagName!==`noscript`&&n.tagName!==`video`}function ly(e,t,n){let r=Qv(n,t);return!r||r.type===`element`&&r.tagName===`li`}function uy(e,t,n){let r=Qv(n,t);return!(!r||r.type!==`element`||r.tagName!==`dt`&&r.tagName!==`dd`)}function dy(e,t,n){let r=Qv(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function fy(e,t,n){let r=Qv(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function py(e,t,n){let r=Qv(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function my(e,t,n){let r=Qv(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function hy(e,t,n){let r=Qv(n,t);return!(!r||r.type!==`element`||r.tagName!==`tbody`&&r.tagName!==`tfoot`)}function gy(e,t,n){let r=Qv(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function _y(e,t,n){return!Qv(n,t)}function vy(e,t,n){let r=Qv(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function yy(e,t,n){let r=Qv(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var by=ry({body:Cy,colgroup:wy,head:Sy,html:xy,tbody:Ty});function xy(e){let t=Qv(e,-1);return!t||t.type!==`comment`}function Sy(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function Cy(e){let t=Qv(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&Xv(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function wy(e,t,n){let r=$v(n,t),i=Qv(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&iy(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function Ty(e,t,n){let r=$v(n,t),i=Qv(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&iy(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Ey={name:[[`
|
|
75
75
|
\f\r &/=>`.split(``),`
|
|
@@ -80,8 +80,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
80
80
|
\f\r "&'<=>\``.split(``)],[`\0
|
|
81
81
|
\f\r "&'<=>\``.split(``),`\0
|
|
82
82
|
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function Dy(e,t,n,r){let i=r.schema,a=i.space!==`svg`&&r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=gv);let l=Oy(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),!l&&a&&by(e,t,n)||(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),o||a&&iy(e,t,n)||s.push(`</`+e.tagName+`>`),s.join(``)}function Oy(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=ky(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function ky(e,t,n){let r=fv(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=Bv(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Ey.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?qv:Jv)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=Bv(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Ey.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&Kv(n,o)>Kv(n,e.alternative)&&(o=e.alternative),s=o+Bv(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?Ey.single:Ey.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var Ay=[`<`,`&`];function jy(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Bv(e.value,Object.assign({},r.settings.characterReferences,{subset:Ay}))}function My(e,t,n,r){return r.settings.allowDangerousHtml?e.value:jy(e,t,n,r)}function Ny(e,t,n,r){return r.all(e)}var Py=vv(`type`,{invalid:Fy,unknown:Iy,handlers:{comment:Wv,doctype:Gv,element:Dy,raw:My,root:Ny,text:jy}});function Fy(e){throw Error("Expected node, not `"+e+"`")}function Iy(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var Ly={},Ry={},zy=[];function By(e,t){let n=t||Ly,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Vy,all:Hy,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||R_,characterReferences:n.characterReferences||Ry,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?gv:hv,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function Vy(e,t,n){return Py(e,t,n,this)}function Hy(e){let t=[],n=e&&e.children||zy,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var Uy=/\s+/g;function Wy(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(Uy)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(Uy);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function Gy(e){let t=o_(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t.at(-1).length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}var Ky=[`color`,`background-color`];function qy(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function Jy(e,t){let n=0,r=e.length;for(;n<r;){let i=n+(r-n>>1);e[i]<=t?n=i+1:r=i}return n}function Yy(e,t){let n=[...t instanceof Set?t:new Set(t)].sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=e.offset+e.content.length,r=Jy(n,e.offset),i=r;for(;i<n.length&&n[i]<t;)i++;if(r===i)return e;let a=n.slice(r,i);for(let t=0;t<a.length;t++)a[t]-=e.offset;return qy(e,a)})):e}function Xy(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>Zy(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&Ky.includes(a)){if(r===`light-dark()`&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new hh('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let u=o[e][a]||`inherit`,d=o[r][a]||`inherit`;c[a]=`light-dark(${u}, ${d})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s}else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function Zy(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&Ih.Italic&&(t[`font-style`]=`italic`),e.fontStyle&Ih.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&Ih.Underline&&n.push(`underline`),e.fontStyle&Ih.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function Qy(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function $y(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=Gy(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new hh(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}{let t=n.lines[e.line];if(t===void 0)throw new hh(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new hh(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));eb(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return Yy(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=[...e.children].filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new hh(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=tb(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new hh(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new hh(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&Wy(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function eb(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new hh(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new hh(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function tb(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(tb).join(``):``}var nb=[$y()];function rb(e){let t=ib(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...nb]}function ib(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var ab=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],ob={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function sb(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function cb(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function lb(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r)){if(r===0)t.push({type:`resetAll`});else if(r<=9)ob[r]&&t.push({type:`setDecoration`,value:ob[r]});else if(r<=29){let e=ob[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:ab[r-30]}});else if(r===38){let n=cb(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:ab[r-40]}});else if(r===48){let n=cb(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:ab[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:ab[r-100+8]}})}}return t}function ub(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=sb(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=lb(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var db={black:`#000000`,red:`#bb0000`,green:`#00bb00`,yellow:`#bbbb00`,blue:`#0000bb`,magenta:`#ff00ff`,cyan:`#00bbbb`,white:`#eeeeee`,brightBlack:`#555555`,brightRed:`#ff5555`,brightGreen:`#00ff00`,brightYellow:`#ffff55`,brightBlue:`#5555ff`,brightMagenta:`#ff55ff`,brightCyan:`#55ffff`,brightWhite:`#ffffff`};function fb(e=db){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<ab.length;e++)r.push(t(ab[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var pb=/#([0-9a-f]{3,8})/i,mb=/var\((--[\w-]+-ansi-[\w-]+)\)/,hb={black:`#000000`,red:`#cd3131`,green:`#0DBC79`,yellow:`#E5E510`,blue:`#2472C8`,magenta:`#BC3FBC`,cyan:`#11A8CD`,white:`#E5E5E5`,brightBlack:`#666666`,brightRed:`#F14C4C`,brightGreen:`#23D18B`,brightYellow:`#F5F543`,brightBlue:`#3B8EEA`,brightMagenta:`#D670D6`,brightCyan:`#29B8DB`,brightWhite:`#FFFFFF`};function gb(e,t,n){let r=Zg(e,n),i=o_(t),a=fb(Object.fromEntries(ab.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||hb[t]]}))),o=ub();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=Qg(i,r),o=Qg(o,r),n.decorations.has(`dim`)&&(i=_b(i));let s=Ih.None;return n.decorations.has(`bold`)&&(s|=Ih.Bold),n.decorations.has(`italic`)&&(s|=Ih.Italic),n.decorations.has(`underline`)&&(s|=Ih.Underline),n.decorations.has(`strikethrough`)&&(s|=Ih.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function _b(e){let t=e.match(pb);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}if(e.length===6)return`#${e}80`;if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(mb);return n?`var(${n[1]}-dim)`:e}function vb(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!t_(r)&&!r_(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return gb(r,t,n)}return D_(e,t,n)}function yb(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new hh("`themes` option must not be empty");let p=I_(e,t,n,vb);if(c=x_(p),l&&l!==`light-dark()`&&!f.some(e=>e.color===l))throw new hh(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>Xy(e,h,u,l,d))),c&&b_(a,c);let g=f.map(e=>Zg(e.theme,n));i=bb(f,m,g,u,l,`fg`,d),r=bb(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=Zg(n.theme,n);a=vb(e,t,n);let l=e.getTheme(n.theme);r=Qg(l.bg,s),i=Qg(l.fg,s),o=l.name,c=x_(a)}else throw new hh("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function bb(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=Qg(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===`light-dark()`&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new hh('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Qg(t[r][a],n[r])||`inherit`}, ${Qg(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}var xb=/^\s+$/,Sb=/^(\s*)(.*?)(\s*)$/;function Cb(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>Cb(e,t,n),codeToTokens:(t,n)=>yb(e,t,n)}){let i=t;for(let e of rb(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=yb(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=Tb(a):d===`never`&&(a=Eb(a)),f&&(a=Db(a));let p={...r,get source(){return i}};for(let e of rb(n))a=e.tokens?.call(p,a)||a;return wb(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function wb(e,t,n,r=x_(e)){let i=rb(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(l.style=t.rootStyle==null?`background-color:${t.bg};color:${t.fg}`:t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:Wy,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
|
|
83
|
-
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=Qy(a.htmlStyle||Zy(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&b_(m,r),m}function Tb(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&Ih.Underline||i.fontStyle&Ih.Strikethrough));o&&xb.test(i.content)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function Eb(e){return e.map(e=>e.flatMap(e=>{if(xb.test(e.content))return e;let t=e.content.match(Sb);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function Db(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t.at(-1),r=Qy(e.htmlStyle||Zy(e)),i=Qy(n.htmlStyle||Zy(n)),a=e.fontStyle&&(e.fontStyle&Ih.Underline||e.fontStyle&Ih.Strikethrough),o=n.fontStyle&&(n.fontStyle&Ih.Underline||n.fontStyle&Ih.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var Ob=By;function kb(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>Cb(e,t,n),codeToTokens:(t,n)=>yb(e,t,n)},i=Ob(Cb(e,t,n,r));for(let e of rb(n))i=e.postprocess?.call(r,i,n)||i;return i}async function Ab(e){let t=await v_(e);return{getLastGrammarState:(...e)=>O_(t,...e),codeToTokensBase:(e,n)=>vb(t,e,n),codeToTokensWithThemes:(e,n)=>I_(t,e,n),codeToTokens:(e,n)=>yb(t,e,n),codeToHast:(e,n)=>Cb(t,e,n),codeToHtml:(e,n)=>kb(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}var jb=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Mb(){return 2147483648}function Nb(){return typeof performance<`u`?performance.now():Date.now()}var Pb=(e,t)=>e+(t-e%t)%t;async function Fb(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=Mb();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,Pb(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:Nb,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var Ib=Object.defineProperty,Lb=(e,t,n)=>t in e?Ib(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rb=(e,t,n)=>Lb(e,typeof t==`symbol`?t:t+``,n),zb=null;function Bb(e){throw new jb(e.UTF8ToString(e.getLastOnigError()))}var Vb=class e{constructor(t){Rb(this,`utf16Length`),Rb(this,`utf8Length`),Rb(this,`utf16Value`),Rb(this,`utf8Value`),Rb(this,`utf16OffsetToUtf8`),Rb(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Hb=class e{constructor(t){if(Rb(this,`id`,++e.LAST_ID),Rb(this,`_onigBinding`),Rb(this,`content`),Rb(this,`utf16Length`),Rb(this,`utf8Length`),Rb(this,`utf16OffsetToUtf8`),Rb(this,`utf8OffsetToUtf16`),Rb(this,`ptr`),!zb)throw new jb(`Must invoke loadWasm first.`);this._onigBinding=zb,this.content=t;let n=new Vb(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=zb.omalloc(1e4),e._sharedPtrInUse=!0,zb.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(zb)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Rb(Hb,`LAST_ID`,0),Rb(Hb,`_sharedPtr`,0),Rb(Hb,`_sharedPtrInUse`,!1);var Ub=Hb,Wb=class{constructor(e){if(Rb(this,`_onigBinding`),Rb(this,`_ptr`),!zb)throw new jb(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Vb(e[r]);t[r]=i.createString(zb),n[r]=i.utf8Length}let r=zb.omalloc(4*e.length);zb.HEAPU32.set(t,r/4);let i=zb.omalloc(4*e.length);zb.HEAPU32.set(n,i/4);let a=zb.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)zb.ofree(t[n]);zb.ofree(i),zb.ofree(r),a===0&&Bb(zb),this._onigBinding=zb,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new Ub(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function Gb(e){return typeof e.instantiator==`function`}function Kb(e){return typeof e.default==`function`}function qb(e){return e.data!==void 0}function Jb(e){return typeof Response<`u`&&e instanceof Response}function Yb(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var Xb;function Zb(e){if(Xb)return Xb;async function t(){zb=await Fb(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Gb(n)?n=await n.instantiator(t):Kb(n)?n=await n.default(t):(qb(n)&&(n=n.data),Jb(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await $b(n)(t):await ex(n)(t):Yb(n)||n instanceof WebAssembly.Module?n=await Qb(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Qb(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Xb=t(),Xb}function Qb(e){return t=>WebAssembly.instantiate(e,t)}function $b(e){return t=>WebAssembly.instantiateStreaming(e,t)}function ex(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function tx(e){return e&&await Zb(e),{createScanner(e){return new Wb(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Ub(e)}}}var nx=`modulepreload`,rx=function(e,t){return new URL(e,t).href},ix={},ax=function(e){return e.pathname.endsWith(`.css`)},ox=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},$=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=rx(t,n);let r=s(t),i=ax(r);return ox(ix,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:nx,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},sx=[{id:`abap`,name:`ABAP`,import:(()=>$(()=>import(`./abap-CLvhMVsD.js`),[],import.meta.url))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>$(()=>import(`./actionscript-3-Cs6JJXT5.js`),[],import.meta.url))},{id:`ada`,name:`Ada`,import:(()=>$(()=>import(`./ada-X3Y2mlq2.js`),[],import.meta.url))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>$(()=>import(`./ahk-DwADkxyd.js`),[],import.meta.url))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>$(()=>import(`./ahk2-_6rzW9BS.js`),[],import.meta.url))},{id:`angular-html`,name:`Angular HTML`,import:(()=>$(()=>import(`./angular-html-CCsi6pU-.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3]),import.meta.url))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>$(()=>import(`./angular-ts-D3b0p2ec.js`),__vite__mapDeps([4,0,1,2,3,5]),import.meta.url))},{id:`apache`,name:`Apache Conf`,import:(()=>$(()=>import(`./apache-U0d_L8uA.js`),[],import.meta.url))},{id:`apex`,name:`Apex`,import:(()=>$(()=>import(`./apex-KFGFyKwG.js`),[],import.meta.url))},{id:`apl`,name:`APL`,import:(()=>$(()=>import(`./apl-B_lcYoHG.js`),__vite__mapDeps([6,2,3,1,7,8,9]),import.meta.url))},{id:`applescript`,name:`AppleScript`,import:(()=>$(()=>import(`./applescript-CCn79oCD.js`),[],import.meta.url))},{id:`ara`,name:`Ara`,import:(()=>$(()=>import(`./ara-4CJ0cIlV.js`),[],import.meta.url))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>$(()=>import(`./asciidoc-SCjQUq34.js`),[],import.meta.url))},{id:`asm`,name:`Assembly`,import:(()=>$(()=>import(`./asm-Cmm7eHzH.js`),[],import.meta.url))},{id:`astro`,name:`Astro`,import:(()=>$(()=>import(`./astro-C8m0ax-G.js`),__vite__mapDeps([10,2,3,9,11,12,13]),import.meta.url))},{id:`awk`,name:`AWK`,import:(()=>$(()=>import(`./awk-BWXHIvNe.js`),[],import.meta.url))},{id:`ballerina`,name:`Ballerina`,import:(()=>$(()=>import(`./ballerina-B7ZEbQpA.js`),[],import.meta.url))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>$(()=>import(`./bat-qdxAdBWQ.js`),[],import.meta.url))},{id:`beancount`,name:`Beancount`,import:(()=>$(()=>import(`./beancount-C2IN4Vk8.js`),[],import.meta.url))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>$(()=>import(`./berry-DKpUyyne.js`),[],import.meta.url))},{id:`bibtex`,name:`BibTeX`,import:(()=>$(()=>import(`./bibtex-Ci_nEsc7.js`),[],import.meta.url))},{id:`bicep`,name:`Bicep`,import:(()=>$(()=>import(`./bicep-CUHmPFLl.js`),[],import.meta.url))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>$(()=>import(`./bird2-CYIUgYqB.js`),[],import.meta.url))},{id:`blade`,name:`Blade`,import:(()=>$(()=>import(`./blade-BTaoP0KJ.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16]),import.meta.url))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>$(()=>import(`./bsl-_VjlB9mv.js`),__vite__mapDeps([17,18]),import.meta.url))},{id:`c`,name:`C`,import:(()=>$(()=>import(`./c-SDXfbR0a.js`).then(e=>e.n),[],import.meta.url))},{id:`c3`,name:`C3`,import:(()=>$(()=>import(`./c3-D0apG41V.js`),[],import.meta.url))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>$(()=>import(`./cadence-CQ2zXKGN.js`),[],import.meta.url))},{id:`cairo`,name:`Cairo`,import:(()=>$(()=>import(`./cairo-DLTphjLi.js`),__vite__mapDeps([19,20]),import.meta.url))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>$(()=>import(`./chapel-CvA97ZeU.js`),__vite__mapDeps([21,22]),import.meta.url))},{id:`clarity`,name:`Clarity`,import:(()=>$(()=>import(`./clarity-CtfBBspg.js`),[],import.meta.url))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>$(()=>import(`./clojure-DqKBuwfJ.js`),[],import.meta.url))},{id:`cmake`,name:`CMake`,import:(()=>$(()=>import(`./cmake-Bj61d0ZC.js`),[],import.meta.url))},{id:`cobol`,name:`COBOL`,import:(()=>$(()=>import(`./cobol-CVtUeO01.js`),__vite__mapDeps([23,1,2,3,8]),import.meta.url))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>$(()=>import(`./codeowners-C8r90Shi.js`),[],import.meta.url))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>$(()=>import(`./codeql-oeQT6MSM.js`),[],import.meta.url))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>$(()=>import(`./coffee-hRo5RQ8B.js`),__vite__mapDeps([24,2]),import.meta.url))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>$(()=>import(`./common-lisp-Cv5bFMCO.js`),[],import.meta.url))},{id:`coq`,name:`Rocq`,import:(()=>$(()=>import(`./coq-CGaSfhwR.js`),[],import.meta.url))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>$(()=>import(`./cpp-BxoU2Hxs.js`).then(e=>e.n),__vite__mapDeps([25,26,27,22]),import.meta.url))},{id:`crystal`,name:`Crystal`,import:(()=>$(()=>import(`./crystal-CcX36hHQ.js`),__vite__mapDeps([28,2,3,1,16,22,29]),import.meta.url))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>$(()=>import(`./csharp-dmMxLVLW.js`),[],import.meta.url))},{id:`css`,name:`CSS`,import:(()=>$(()=>import(`./css-CxWhmvIC.js`).then(e=>e.n),[],import.meta.url))},{id:`csv`,name:`CSV`,import:(()=>$(()=>import(`./csv-Dx-8-gkx.js`),[],import.meta.url))},{id:`cue`,name:`CUE`,import:(()=>$(()=>import(`./cue-CE9AQfxI.js`),[],import.meta.url))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>$(()=>import(`./cypher-ClKdZ_lG.js`),[],import.meta.url))},{id:`d`,name:`D`,import:(()=>$(()=>import(`./d-qD-0Kul2.js`),[],import.meta.url))},{id:`dart`,name:`Dart`,import:(()=>$(()=>import(`./dart-CHZY9Xhz.js`),[],import.meta.url))},{id:`dax`,name:`DAX`,import:(()=>$(()=>import(`./dax-BkyTk9wS.js`),[],import.meta.url))},{id:`desktop`,name:`Desktop`,import:(()=>$(()=>import(`./desktop-Dlh5hvp9.js`),[],import.meta.url))},{id:`diff`,name:`Diff`,import:(()=>$(()=>import(`./diff-woXpYk--.js`),[],import.meta.url))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>$(()=>import(`./docker-IyjqRm3v.js`),[],import.meta.url))},{id:`dotenv`,name:`dotEnv`,import:(()=>$(()=>import(`./dotenv-CuH5my32.js`),[],import.meta.url))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>$(()=>import(`./dream-maker-DW3nJb8Q.js`),[],import.meta.url))},{id:`edge`,name:`Edge`,import:(()=>$(()=>import(`./edge-QJOy4xlO.js`),__vite__mapDeps([30,1,2,3,11,15]),import.meta.url))},{id:`elixir`,name:`Elixir`,import:(()=>$(()=>import(`./elixir-C9LrWwAh.js`),__vite__mapDeps([31,1,2,3]),import.meta.url))},{id:`elm`,name:`Elm`,import:(()=>$(()=>import(`./elm-BR3U0yD_.js`),__vite__mapDeps([32,27,22]),import.meta.url))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>$(()=>import(`./emacs-lisp-DR2vtWaj.js`),[],import.meta.url))},{id:`erb`,name:`ERB`,import:(()=>$(()=>import(`./erb-CiOJpaDo.js`),__vite__mapDeps([33,1,2,3,34,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39]),import.meta.url))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>$(()=>import(`./erlang-Cphh6RMH.js`),__vite__mapDeps([40,41]),import.meta.url))},{id:`fennel`,name:`Fennel`,import:(()=>$(()=>import(`./fennel-DQxkIbk2.js`),[],import.meta.url))},{id:`fish`,name:`Fish`,import:(()=>$(()=>import(`./fish-BJitypiv.js`),[],import.meta.url))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>$(()=>import(`./fluent-C03EYrpw.js`),[],import.meta.url))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>$(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),__vite__mapDeps([42,43]),import.meta.url))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>$(()=>import(`./fortran-free-form-CYNrtFtB.js`),[],import.meta.url))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>$(()=>import(`./fsharp-D13ZGOAj.js`),__vite__mapDeps([44,41]),import.meta.url))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>$(()=>import(`./gdresource-xMC7jr7x.js`),__vite__mapDeps([45,46,47]),import.meta.url))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>$(()=>import(`./gdscript-DYvRD3hg.js`),[],import.meta.url))},{id:`gdshader`,name:`GDShader`,import:(()=>$(()=>import(`./gdshader-CBce3t8t.js`),[],import.meta.url))},{id:`genie`,name:`Genie`,import:(()=>$(()=>import(`./genie-CV2tkWYe.js`),[],import.meta.url))},{id:`gherkin`,name:`Gherkin`,import:(()=>$(()=>import(`./gherkin-DExj1W_8.js`),[],import.meta.url))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>$(()=>import(`./git-commit-BSykSTBG.js`),__vite__mapDeps([48,49]),import.meta.url))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>$(()=>import(`./git-rebase-BYl4P3ox.js`),__vite__mapDeps([50,29]),import.meta.url))},{id:`gleam`,name:`Gleam`,import:(()=>$(()=>import(`./gleam-CSRkHgEL.js`),[],import.meta.url))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>$(()=>import(`./glimmer-js-Blh2OVv1.js`),__vite__mapDeps([51,2,3,1,11]),import.meta.url))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>$(()=>import(`./glimmer-ts-DXr9mcSj.js`),__vite__mapDeps([52,2,3,1,11]),import.meta.url))},{id:`glsl`,name:`GLSL`,import:(()=>$(()=>import(`./glsl-CnZQZULb.js`).then(e=>e.n),__vite__mapDeps([27,22]),import.meta.url))},{id:`gn`,name:`GN`,import:(()=>$(()=>import(`./gn-CAXYAgV-.js`),[],import.meta.url))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>$(()=>import(`./gnuplot-7GGW24-e.js`),[],import.meta.url))},{id:`go`,name:`Go`,import:(()=>$(()=>import(`./go-rLFTqkRN.js`),[],import.meta.url))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>$(()=>import(`./graphql-8Rdi2_E3.js`).then(e=>e.n),__vite__mapDeps([36,2,11,13,37]),import.meta.url))},{id:`groovy`,name:`Groovy`,import:(()=>$(()=>import(`./groovy-CacY0gHj.js`),[],import.meta.url))},{id:`hack`,name:`Hack`,import:(()=>$(()=>import(`./hack-CKSTrDJQ.js`),__vite__mapDeps([53,1,2,3,16]),import.meta.url))},{id:`haml`,name:`Ruby Haml`,import:(()=>$(()=>import(`./haml-BXUwL6Gi.js`).then(e=>e.n),__vite__mapDeps([35,2,3]),import.meta.url))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>$(()=>import(`./handlebars-CoB9_4Wu.js`),__vite__mapDeps([54,2,3,1,39]),import.meta.url))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>$(()=>import(`./haskell-D8IpX4py.js`),[],import.meta.url))},{id:`haxe`,name:`Haxe`,import:(()=>$(()=>import(`./haxe-C8oCnwJJ.js`),[],import.meta.url))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>$(()=>import(`./hcl-Dh228itO.js`),[],import.meta.url))},{id:`hjson`,name:`Hjson`,import:(()=>$(()=>import(`./hjson-CxZEssPk.js`),[],import.meta.url))},{id:`hlsl`,name:`HLSL`,import:(()=>$(()=>import(`./hlsl-Cvrh5tZx.js`),[],import.meta.url))},{id:`html`,name:`HTML`,import:(()=>$(()=>import(`./html-B6C5qCrz.js`).then(e=>e.n),__vite__mapDeps([1,2,3]),import.meta.url))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>$(()=>import(`./html-derivative-Bk9jovvn.js`),__vite__mapDeps([15,1,2,3]),import.meta.url))},{id:`http`,name:`HTTP`,import:(()=>$(()=>import(`./http-BjGXUZ-r.js`),__vite__mapDeps([55,7,8,9,29,36,2,11,13,37]),import.meta.url))},{id:`hurl`,name:`Hurl`,import:(()=>$(()=>import(`./hurl-DTlVMspc.js`),__vite__mapDeps([56,7,8,57,36,2,11,13,37]),import.meta.url))},{id:`hxml`,name:`HXML`,import:(()=>$(()=>import(`./hxml-Dcm88srW.js`),__vite__mapDeps([58,59]),import.meta.url))},{id:`hy`,name:`Hy`,import:(()=>$(()=>import(`./hy-CZbG8q4J.js`),[],import.meta.url))},{id:`imba`,name:`Imba`,import:(()=>$(()=>import(`./imba-DsUTQ-LC.js`),[],import.meta.url))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>$(()=>import(`./ini-B5eOa1yu.js`),[],import.meta.url))},{id:`java`,name:`Java`,import:(()=>$(()=>import(`./java-Bh1jVWfi.js`).then(e=>e.n),[],import.meta.url))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>$(()=>import(`./javascript-CAp5Mnzl.js`).then(e=>e.n),[],import.meta.url))},{id:`jinja`,name:`Jinja`,import:(()=>$(()=>import(`./jinja-rB-QNUyu.js`),__vite__mapDeps([60,1,2,3]),import.meta.url))},{id:`jison`,name:`Jison`,import:(()=>$(()=>import(`./jison-VA6AlkMv.js`),__vite__mapDeps([61,2]),import.meta.url))},{id:`json`,name:`JSON`,import:(()=>$(()=>import(`./json-D_3nkZlx.js`).then(e=>e.n),[],import.meta.url))},{id:`json5`,name:`JSON5`,import:(()=>$(()=>import(`./json5-BR5RXkoi.js`),[],import.meta.url))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>$(()=>import(`./jsonc-CYpm1nAK.js`),[],import.meta.url))},{id:`jsonl`,name:`JSON Lines`,import:(()=>$(()=>import(`./jsonl-CmCQp5Yx.js`),[],import.meta.url))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>$(()=>import(`./jsonnet-CJTPZ8u_.js`),[],import.meta.url))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>$(()=>import(`./jssm-DXw9l8Rf.js`),[],import.meta.url))},{id:`jsx`,name:`JSX`,import:(()=>$(()=>import(`./jsx-vCtnSopd.js`).then(e=>e.n),[],import.meta.url))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>$(()=>import(`./julia-DzWcxIlS.js`),__vite__mapDeps([62,2,16,20,25,26,27,22,63]),import.meta.url))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>$(()=>import(`./just-Cib470fM.js`),__vite__mapDeps([64,2,11,20,29,34,3,1,7,8,16,22,25,26,27,35,36,13,37,38,39,65]),import.meta.url))},{id:`kdl`,name:`KDL`,import:(()=>$(()=>import(`./kdl-CsD5j6eV.js`),[],import.meta.url))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>$(()=>import(`./kotlin-DhhofPvG.js`),[],import.meta.url))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>$(()=>import(`./kusto-C7mF5XQf.js`),[],import.meta.url))},{id:`latex`,name:`LaTeX`,import:(()=>$(()=>import(`./latex-B9Rt9Nm7.js`),__vite__mapDeps([66,67,63]),import.meta.url))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>$(()=>import(`./lean-CewbzKMR.js`),[],import.meta.url))},{id:`less`,name:`Less`,import:(()=>$(()=>import(`./less-DVTAwKKz.js`),[],import.meta.url))},{id:`liquid`,name:`Liquid`,import:(()=>$(()=>import(`./liquid-CpUpBdB-.js`),__vite__mapDeps([68,2,3,1,9]),import.meta.url))},{id:`llvm`,name:`LLVM IR`,import:(()=>$(()=>import(`./llvm-DqHOMS-s.js`),[],import.meta.url))},{id:`log`,name:`Log file`,import:(()=>$(()=>import(`./log-BNLmms1o.js`),[],import.meta.url))},{id:`logo`,name:`Logo`,import:(()=>$(()=>import(`./logo-Cluzi2Zq.js`),[],import.meta.url))},{id:`lua`,name:`Lua`,import:(()=>$(()=>import(`./lua-ABZXQo7L.js`).then(e=>e.n),__vite__mapDeps([38,22]),import.meta.url))},{id:`luau`,name:`Luau`,import:(()=>$(()=>import(`./luau-VGWVLoqX.js`),[],import.meta.url))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>$(()=>import(`./make-Dixweg8N.js`),[],import.meta.url))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>$(()=>import(`./markdown-BYOwaDjH.js`),[],import.meta.url))},{id:`marko`,name:`Marko`,import:(()=>$(()=>import(`./marko-BqS1ITvl.js`),__vite__mapDeps([69,3,5,11,70]),import.meta.url))},{id:`matlab`,name:`MATLAB`,import:(()=>$(()=>import(`./matlab-D7qyCx1q.js`),[],import.meta.url))},{id:`mdc`,name:`MDC`,import:(()=>$(()=>import(`./mdc-BU5NTqUw.js`),__vite__mapDeps([71,15,1,2,3,39,41]),import.meta.url))},{id:`mdx`,name:`MDX`,import:(()=>$(()=>import(`./mdx-DQZ5AkYe.js`),[],import.meta.url))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>$(()=>import(`./mermaid-BxpfTIzt.js`),[],import.meta.url))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>$(()=>import(`./mipsasm-BMqwQI7S.js`),[],import.meta.url))},{id:`mojo`,name:`Mojo`,import:(()=>$(()=>import(`./mojo-fg40_ntQ.js`),[],import.meta.url))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>$(()=>import(`./moonbit-D9W784E_.js`),[],import.meta.url))},{id:`move`,name:`Move`,import:(()=>$(()=>import(`./move-BYnGhZoM.js`),[],import.meta.url))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>$(()=>import(`./narrat-_X_XdTYD.js`),[],import.meta.url))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>$(()=>import(`./nextflow-CSgcYZcx.js`),__vite__mapDeps([72,73]),import.meta.url))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>$(()=>import(`./nextflow-groovy-D7IRt6Pp.js`),[],import.meta.url))},{id:`nginx`,name:`Nginx`,import:(()=>$(()=>import(`./nginx-CPJvj-oD.js`),__vite__mapDeps([74,38,22]),import.meta.url))},{id:`nim`,name:`Nim`,import:(()=>$(()=>import(`./nim-DP5c8JP-.js`),__vite__mapDeps([75,2,3,1,7,8,22,27,41]),import.meta.url))},{id:`nix`,name:`Nix`,import:(()=>$(()=>import(`./nix-IvuFDN5E.js`),[],import.meta.url))},{id:`nsis`,name:`NSIS`,import:(()=>$(()=>import(`./nsis-CjNLYCLg.js`),[],import.meta.url))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>$(()=>import(`./nushell--0fT3PI1.js`),[],import.meta.url))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>$(()=>import(`./objective-c-D1A_Heim.js`),[],import.meta.url))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>$(()=>import(`./objective-cpp-BsSzOQcm.js`),[],import.meta.url))},{id:`ocaml`,name:`OCaml`,import:(()=>$(()=>import(`./ocaml-O90oeIOV.js`),[],import.meta.url))},{id:`odin`,name:`Odin`,import:(()=>$(()=>import(`./odin-B1RWQWA5.js`),[],import.meta.url))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>$(()=>import(`./openscad-BUDT5pXO.js`),[],import.meta.url))},{id:`org`,name:`Org Markup`,import:(()=>$(()=>import(`./org-z8oygnoy.js`),__vite__mapDeps([76,2,3,1,5,8,7,9,11,13,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,48,50,81,82,83,63,65,66,67,70,84,75,85,86,87,88,89,90,91,92,93]),import.meta.url))},{id:`pascal`,name:`Pascal`,import:(()=>$(()=>import(`./pascal-4ZHwLPI5.js`),[],import.meta.url))},{id:`perl`,name:`Perl`,import:(()=>$(()=>import(`./perl-BOKTfCaa.js`),__vite__mapDeps([65,2,3,1,7,8,16]),import.meta.url))},{id:`php`,name:`PHP`,import:(()=>$(()=>import(`./php-Bxp7SLwc.js`),__vite__mapDeps([87,2,3,1,7,8,9,16]),import.meta.url))},{id:`pkl`,name:`Pkl`,import:(()=>$(()=>import(`./pkl-ot-7Btpt.js`),[],import.meta.url))},{id:`plsql`,name:`PL/SQL`,import:(()=>$(()=>import(`./plsql-DGHpHOYJ.js`),[],import.meta.url))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>$(()=>import(`./po-BiJDBrnU.js`),[],import.meta.url))},{id:`polar`,name:`Polar`,import:(()=>$(()=>import(`./polar-C7UOKdEL.js`),[],import.meta.url))},{id:`postcss`,name:`PostCSS`,import:(()=>$(()=>import(`./postcss-BXeXVLqQ.js`),[],import.meta.url))},{id:`powerquery`,name:`PowerQuery`,import:(()=>$(()=>import(`./powerquery-DNMTfnFr.js`),[],import.meta.url))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>$(()=>import(`./powershell-QtSnmXcu.js`),[],import.meta.url))},{id:`prisma`,name:`Prisma`,import:(()=>$(()=>import(`./prisma-DMgNhnYS.js`),[],import.meta.url))},{id:`prolog`,name:`Prolog`,import:(()=>$(()=>import(`./prolog-iXnhIJG7.js`),[],import.meta.url))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>$(()=>import(`./proto-DB4EqR-F.js`),[],import.meta.url))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>$(()=>import(`./pug-YbOie-Gt.js`),__vite__mapDeps([94,2,3,1]),import.meta.url))},{id:`puppet`,name:`Puppet`,import:(()=>$(()=>import(`./puppet-CDv2pdJW.js`),[],import.meta.url))},{id:`purescript`,name:`PureScript`,import:(()=>$(()=>import(`./purescript-9MfHhQsQ.js`),[],import.meta.url))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>$(()=>import(`./python-gzcpVVnB.js`),[],import.meta.url))},{id:`qml`,name:`QML`,import:(()=>$(()=>import(`./qml-BoW83Fyx.js`),__vite__mapDeps([95,2]),import.meta.url))},{id:`qmldir`,name:`QML Directory`,import:(()=>$(()=>import(`./qmldir-DCQb3MpD.js`),[],import.meta.url))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>$(()=>import(`./qss-Fe1Jh2GI.js`),[],import.meta.url))},{id:`r`,name:`R`,import:(()=>$(()=>import(`./r-BOTGEI5j.js`).then(e=>e.n),[],import.meta.url))},{id:`racket`,name:`Racket`,import:(()=>$(()=>import(`./racket-DcIDlBhZ.js`),[],import.meta.url))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>$(()=>import(`./raku-B3gFvitq.js`),[],import.meta.url))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>$(()=>import(`./razor-Ci4nB3jF.js`),__vite__mapDeps([96,1,2,3,78]),import.meta.url))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>$(()=>import(`./rbs-C0MpOrj4.js`),[],import.meta.url))},{id:`reg`,name:`Windows Registry Script`,import:(()=>$(()=>import(`./reg-CRGYupPL.js`),[],import.meta.url))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>$(()=>import(`./regexp-BumEaKrn.js`).then(e=>e.n),[],import.meta.url))},{id:`rel`,name:`Rel`,import:(()=>$(()=>import(`./rel-BtDbiS_P.js`),[],import.meta.url))},{id:`riscv`,name:`RISC-V`,import:(()=>$(()=>import(`./riscv-Ckw8ddFX.js`),[],import.meta.url))},{id:`ron`,name:`RON`,import:(()=>$(()=>import(`./ron-VUp2lXgN.js`),[],import.meta.url))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>$(()=>import(`./rosmsg-CAekHB0j.js`),[],import.meta.url))},{id:`rst`,name:`reStructuredText`,import:(()=>$(()=>import(`./rst-DtqBiJDu.js`),__vite__mapDeps([97,2,15,1,3,20,98,25,26,27,22,29,39,34,7,8,16,35,36,11,13,37,38]),import.meta.url))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>$(()=>import(`./ruby-D1kPpSHI.js`),__vite__mapDeps([34,2,3,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39]),import.meta.url))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>$(()=>import(`./rust-DpiIf5JO.js`),[],import.meta.url))},{id:`sas`,name:`SAS`,import:(()=>$(()=>import(`./sas-14YEmckC.js`),__vite__mapDeps([99,16]),import.meta.url))},{id:`sass`,name:`Sass`,import:(()=>$(()=>import(`./sass-DXrisJhu.js`),[],import.meta.url))},{id:`scala`,name:`Scala`,import:(()=>$(()=>import(`./scala-BiFt_7mu.js`),[],import.meta.url))},{id:`scheme`,name:`Scheme`,import:(()=>$(()=>import(`./scheme-DQCgrYNe.js`),[],import.meta.url))},{id:`scss`,name:`SCSS`,import:(()=>$(()=>import(`./scss-DFjEDCH3.js`).then(e=>e.n),__vite__mapDeps([5,3]),import.meta.url))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>$(()=>import(`./sdbl-bTVj8UrX.js`),[],import.meta.url))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>$(()=>import(`./shaderlab-TOUzSsQk.js`),__vite__mapDeps([100,101]),import.meta.url))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>$(()=>import(`./shellscript-DPod_v0w.js`).then(e=>e.n),[],import.meta.url))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>$(()=>import(`./shellsession-tu7P7CZw.js`),__vite__mapDeps([102,29]),import.meta.url))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>$(()=>import(`./smalltalk-BHpQb5nM.js`),[],import.meta.url))},{id:`smithy`,name:`Smithy`,import:(()=>$(()=>import(`./smithy-Dgaz7aur.js`),[],import.meta.url))},{id:`solidity`,name:`Solidity`,import:(()=>$(()=>import(`./solidity-Bj7E1mRn.js`),[],import.meta.url))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>$(()=>import(`./soy-CGE1c2SC.js`),__vite__mapDeps([103,1,2,3]),import.meta.url))},{id:`sparql`,name:`SPARQL`,import:(()=>$(()=>import(`./sparql-D_iOobhT.js`),__vite__mapDeps([104,105]),import.meta.url))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>$(()=>import(`./splunk-BC2Px7Mm.js`),[],import.meta.url))},{id:`sql`,name:`SQL`,import:(()=>$(()=>import(`./sql-CaS7isii.js`).then(e=>e.n),[],import.meta.url))},{id:`ssh-config`,name:`SSH Config`,import:(()=>$(()=>import(`./ssh-config-BgfXC-Er.js`),[],import.meta.url))},{id:`stata`,name:`Stata`,import:(()=>$(()=>import(`./stata-Q1HKOyRT.js`),__vite__mapDeps([106,16]),import.meta.url))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>$(()=>import(`./stylus-B6D30XZt.js`),[],import.meta.url))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>$(()=>import(`./surrealql-BtSPewz7.js`),__vite__mapDeps([107,2]),import.meta.url))},{id:`svelte`,name:`Svelte`,import:(()=>$(()=>import(`./svelte-U6EZswjv.js`),__vite__mapDeps([108,2,3,11,12]),import.meta.url))},{id:`swift`,name:`Swift`,import:(()=>$(()=>import(`./swift-CyEgAFGc.js`),[],import.meta.url))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>$(()=>import(`./system-verilog-Dh5ihWbf.js`),[],import.meta.url))},{id:`systemd`,name:`Systemd Units`,import:(()=>$(()=>import(`./systemd-BxMlprV5.js`),[],import.meta.url))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>$(()=>import(`./talonscript-CohzipZa.js`),[],import.meta.url))},{id:`tasl`,name:`Tasl`,import:(()=>$(()=>import(`./tasl-DMoTqEGO.js`),[],import.meta.url))},{id:`tcl`,name:`Tcl`,import:(()=>$(()=>import(`./tcl-CZd0xW_V.js`),[],import.meta.url))},{id:`templ`,name:`Templ`,import:(()=>$(()=>import(`./templ-Dv6Hh6ZK.js`),__vite__mapDeps([109,2,3,81]),import.meta.url))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>$(()=>import(`./terraform-DswuEJGm.js`),[],import.meta.url))},{id:`tex`,name:`TeX`,import:(()=>$(()=>import(`./tex-FNxy8pwc.js`).then(e=>e.n),__vite__mapDeps([67,63]),import.meta.url))},{id:`toml`,name:`TOML`,import:(()=>$(()=>import(`./toml-CcmNWLt0.js`),[],import.meta.url))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>$(()=>import(`./ts-tags-QwSPCwFk.js`),__vite__mapDeps([110,2,3,1,7,8,11,16,27,22]),import.meta.url))},{id:`tsv`,name:`TSV`,import:(()=>$(()=>import(`./tsv-sltzmVWM.js`),[],import.meta.url))},{id:`tsx`,name:`TSX`,import:(()=>$(()=>import(`./tsx-DD4r3epl.js`).then(e=>e.n),[],import.meta.url))},{id:`turtle`,name:`Turtle`,import:(()=>$(()=>import(`./turtle-ByJddavk.js`),[],import.meta.url))},{id:`twig`,name:`Twig`,import:(()=>$(()=>import(`./twig-CF2Q5rKi.js`),__vite__mapDeps([111,2,3,5,20,34,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39,87,9]),import.meta.url))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>$(()=>import(`./typescript-BH94Wa6R.js`).then(e=>e.n),[],import.meta.url))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>$(()=>import(`./typespec-BGhR2SqG.js`),[],import.meta.url))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>$(()=>import(`./typst-FVLFkJ8V.js`),__vite__mapDeps([112,2,3,1,5,8,7,9,11,13,113,114,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,44,48,50,81,82,54,83,115,63,62,65,66,67,70,116,84,85,87,88,89,90,91,93,117,94,118,119,111,120]),import.meta.url))},{id:`v`,name:`V`,import:(()=>$(()=>import(`./v-DBj4K9d_.js`),[],import.meta.url))},{id:`vala`,name:`Vala`,import:(()=>$(()=>import(`./vala-zf12oZj6.js`),[],import.meta.url))},{id:`vb`,name:`Visual Basic`,import:(()=>$(()=>import(`./vb-DOwzaHZ0.js`),[],import.meta.url))},{id:`verilog`,name:`Verilog`,import:(()=>$(()=>import(`./verilog-B2gwz-sJ.js`),[],import.meta.url))},{id:`vhdl`,name:`VHDL`,import:(()=>$(()=>import(`./vhdl-BroJfC0k.js`),[],import.meta.url))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>$(()=>import(`./viml-DvXPmvsu.js`),[],import.meta.url))},{id:`vue`,name:`Vue`,import:(()=>$(()=>import(`./vue-CgIy39RZ.js`),__vite__mapDeps([121,2,3,1,9,11,15]),import.meta.url))},{id:`vue-html`,name:`Vue HTML`,import:(()=>$(()=>import(`./vue-html-BK18RzGS.js`),__vite__mapDeps([122,2]),import.meta.url))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>$(()=>import(`./vue-vine-Ca-3XU_O.js`),__vite__mapDeps([123,2,3,5,12,70,124]),import.meta.url))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>$(()=>import(`./vyper-CgoNMtux.js`),[],import.meta.url))},{id:`wasm`,name:`WebAssembly`,import:(()=>$(()=>import(`./wasm-ByWQv1Qj.js`),[],import.meta.url))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>$(()=>import(`./wenyan-C8pVoKbM.js`),[],import.meta.url))},{id:`wgsl`,name:`WGSL`,import:(()=>$(()=>import(`./wgsl-BsKzXJz4.js`),[],import.meta.url))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>$(()=>import(`./wikitext-ClFFjSW2.js`),[],import.meta.url))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>$(()=>import(`./wit-DdvCle-K.js`),[],import.meta.url))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>$(()=>import(`./wolfram-DLL8P-h_.js`),[],import.meta.url))},{id:`xml`,name:`XML`,import:(()=>$(()=>import(`./xml-CrlmnYy6.js`).then(e=>e.n),__vite__mapDeps([7,8]),import.meta.url))},{id:`xsl`,name:`XSL`,import:(()=>$(()=>import(`./xsl-CTdshCNA.js`),__vite__mapDeps([93,7,8]),import.meta.url))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>$(()=>import(`./yaml-DVKeB6J_.js`).then(e=>e.n),[],import.meta.url))},{id:`zenscript`,name:`ZenScript`,import:(()=>$(()=>import(`./zenscript-BnlCZFoB.js`),[],import.meta.url))},{id:`zig`,name:`Zig`,import:(()=>$(()=>import(`./zig-CMLA9XwU.js`),[],import.meta.url))}],cx=Object.fromEntries(sx.map(e=>[e.id,e.import])),lx=Object.fromEntries(sx.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),ux={...cx,...lx},dx=`github-dark-default`,fx={h:`c`,hh:`cpp`,hpp:`cpp`,hxx:`cpp`,cc:`cpp`,cxx:`cpp`,htm:`html`,svg:`xml`,pl:`perl`,ex:`elixir`,exs:`elixir`,makefile:`make`,dockerfile:`dockerfile`},px=new Map;for(let e of sx)for(let t of[e.id,...e.aliases??[]])px.set(t.toLowerCase(),e.id);for(let[e,t]of Object.entries(fx))px.set(e,t);function mx(e){let t=e.slice(e.lastIndexOf(`/`)+1).toLowerCase(),n=t.lastIndexOf(`.`),r=n===-1?t:t.slice(n+1);return px.get(r)??px.get(t)??null}var hx=null;function gx(){return hx??=Ab({themes:[$(()=>import(`./github-dark-default-DXG-b-1a.js`),[],import.meta.url)],langs:[],engine:tx($(()=>import(`./wasm-BnjxR4X6.js`),[],import.meta.url))}),hx}async function _x(e){let t=await gx();return t.getLoadedLanguages().includes(e)||await t.loadLanguage(ux[e]),n=>n.length===0?[]:t.codeToTokensBase(n.join(`
|
|
83
|
+
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=Qy(a.htmlStyle||Zy(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&b_(m,r),m}function Tb(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&Ih.Underline||i.fontStyle&Ih.Strikethrough));o&&xb.test(i.content)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function Eb(e){return e.map(e=>e.flatMap(e=>{if(xb.test(e.content))return e;let t=e.content.match(Sb);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function Db(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t.at(-1),r=Qy(e.htmlStyle||Zy(e)),i=Qy(n.htmlStyle||Zy(n)),a=e.fontStyle&&(e.fontStyle&Ih.Underline||e.fontStyle&Ih.Strikethrough),o=n.fontStyle&&(n.fontStyle&Ih.Underline||n.fontStyle&Ih.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var Ob=By;function kb(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>Cb(e,t,n),codeToTokens:(t,n)=>yb(e,t,n)},i=Ob(Cb(e,t,n,r));for(let e of rb(n))i=e.postprocess?.call(r,i,n)||i;return i}async function Ab(e){let t=await v_(e);return{getLastGrammarState:(...e)=>O_(t,...e),codeToTokensBase:(e,n)=>vb(t,e,n),codeToTokensWithThemes:(e,n)=>I_(t,e,n),codeToTokens:(e,n)=>yb(t,e,n),codeToHast:(e,n)=>Cb(t,e,n),codeToHtml:(e,n)=>kb(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}var jb=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Mb(){return 2147483648}function Nb(){return typeof performance<`u`?performance.now():Date.now()}var Pb=(e,t)=>e+(t-e%t)%t;async function Fb(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=Mb();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,Pb(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:Nb,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var Ib=Object.defineProperty,Lb=(e,t,n)=>t in e?Ib(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rb=(e,t,n)=>Lb(e,typeof t==`symbol`?t:t+``,n),zb=null;function Bb(e){throw new jb(e.UTF8ToString(e.getLastOnigError()))}var Vb=class e{constructor(t){Rb(this,`utf16Length`),Rb(this,`utf8Length`),Rb(this,`utf16Value`),Rb(this,`utf8Value`),Rb(this,`utf16OffsetToUtf8`),Rb(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Hb=class e{constructor(t){if(Rb(this,`id`,++e.LAST_ID),Rb(this,`_onigBinding`),Rb(this,`content`),Rb(this,`utf16Length`),Rb(this,`utf8Length`),Rb(this,`utf16OffsetToUtf8`),Rb(this,`utf8OffsetToUtf16`),Rb(this,`ptr`),!zb)throw new jb(`Must invoke loadWasm first.`);this._onigBinding=zb,this.content=t;let n=new Vb(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=zb.omalloc(1e4),e._sharedPtrInUse=!0,zb.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(zb)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Rb(Hb,`LAST_ID`,0),Rb(Hb,`_sharedPtr`,0),Rb(Hb,`_sharedPtrInUse`,!1);var Ub=Hb,Wb=class{constructor(e){if(Rb(this,`_onigBinding`),Rb(this,`_ptr`),!zb)throw new jb(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Vb(e[r]);t[r]=i.createString(zb),n[r]=i.utf8Length}let r=zb.omalloc(4*e.length);zb.HEAPU32.set(t,r/4);let i=zb.omalloc(4*e.length);zb.HEAPU32.set(n,i/4);let a=zb.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)zb.ofree(t[n]);zb.ofree(i),zb.ofree(r),a===0&&Bb(zb),this._onigBinding=zb,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new Ub(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function Gb(e){return typeof e.instantiator==`function`}function Kb(e){return typeof e.default==`function`}function qb(e){return e.data!==void 0}function Jb(e){return typeof Response<`u`&&e instanceof Response}function Yb(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var Xb;function Zb(e){if(Xb)return Xb;async function t(){zb=await Fb(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Gb(n)?n=await n.instantiator(t):Kb(n)?n=await n.default(t):(qb(n)&&(n=n.data),Jb(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await $b(n)(t):await ex(n)(t):Yb(n)||n instanceof WebAssembly.Module?n=await Qb(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Qb(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Xb=t(),Xb}function Qb(e){return t=>WebAssembly.instantiate(e,t)}function $b(e){return t=>WebAssembly.instantiateStreaming(e,t)}function ex(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function tx(e){return e&&await Zb(e),{createScanner(e){return new Wb(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Ub(e)}}}var nx=`modulepreload`,rx=function(e,t){return new URL(e,t).href},ix={},ax=function(e){return e.pathname.endsWith(`.css`)},ox=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},$=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=rx(t,n);let r=s(t),i=ax(r);return ox(ix,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:nx,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},sx=[{id:`abap`,name:`ABAP`,import:(()=>$(()=>import(`./abap-CLvhMVsD.js`),[],import.meta.url))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>$(()=>import(`./actionscript-3-Cs6JJXT5.js`),[],import.meta.url))},{id:`ada`,name:`Ada`,import:(()=>$(()=>import(`./ada-X3Y2mlq2.js`),[],import.meta.url))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>$(()=>import(`./ahk-DwADkxyd.js`),[],import.meta.url))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>$(()=>import(`./ahk2-_6rzW9BS.js`),[],import.meta.url))},{id:`angular-html`,name:`Angular HTML`,import:(()=>$(()=>import(`./angular-html-C_Umbo_o.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3]),import.meta.url))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>$(()=>import(`./angular-ts-BS5NFEKQ.js`),__vite__mapDeps([4,0,1,2,3,5]),import.meta.url))},{id:`apache`,name:`Apache Conf`,import:(()=>$(()=>import(`./apache-U0d_L8uA.js`),[],import.meta.url))},{id:`apex`,name:`Apex`,import:(()=>$(()=>import(`./apex-KFGFyKwG.js`),[],import.meta.url))},{id:`apl`,name:`APL`,import:(()=>$(()=>import(`./apl-BXNp6RaU.js`),__vite__mapDeps([6,2,3,1,7,8,9]),import.meta.url))},{id:`applescript`,name:`AppleScript`,import:(()=>$(()=>import(`./applescript-CCn79oCD.js`),[],import.meta.url))},{id:`ara`,name:`Ara`,import:(()=>$(()=>import(`./ara-4CJ0cIlV.js`),[],import.meta.url))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>$(()=>import(`./asciidoc-SCjQUq34.js`),[],import.meta.url))},{id:`asm`,name:`Assembly`,import:(()=>$(()=>import(`./asm-Cmm7eHzH.js`),[],import.meta.url))},{id:`astro`,name:`Astro`,import:(()=>$(()=>import(`./astro-1di0oIiS.js`),__vite__mapDeps([10,2,3,9,11,12,13]),import.meta.url))},{id:`awk`,name:`AWK`,import:(()=>$(()=>import(`./awk-BWXHIvNe.js`),[],import.meta.url))},{id:`ballerina`,name:`Ballerina`,import:(()=>$(()=>import(`./ballerina-B7ZEbQpA.js`),[],import.meta.url))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>$(()=>import(`./bat-qdxAdBWQ.js`),[],import.meta.url))},{id:`beancount`,name:`Beancount`,import:(()=>$(()=>import(`./beancount-C2IN4Vk8.js`),[],import.meta.url))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>$(()=>import(`./berry-DKpUyyne.js`),[],import.meta.url))},{id:`bibtex`,name:`BibTeX`,import:(()=>$(()=>import(`./bibtex-Ci_nEsc7.js`),[],import.meta.url))},{id:`bicep`,name:`Bicep`,import:(()=>$(()=>import(`./bicep-CUHmPFLl.js`),[],import.meta.url))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>$(()=>import(`./bird2-CYIUgYqB.js`),[],import.meta.url))},{id:`blade`,name:`Blade`,import:(()=>$(()=>import(`./blade-bFPOELdA.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16]),import.meta.url))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>$(()=>import(`./bsl-_VjlB9mv.js`),__vite__mapDeps([17,18]),import.meta.url))},{id:`c`,name:`C`,import:(()=>$(()=>import(`./c-BLZ_xWbb.js`).then(e=>e.n),[],import.meta.url))},{id:`c3`,name:`C3`,import:(()=>$(()=>import(`./c3-D0apG41V.js`),[],import.meta.url))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>$(()=>import(`./cadence-CQ2zXKGN.js`),[],import.meta.url))},{id:`cairo`,name:`Cairo`,import:(()=>$(()=>import(`./cairo-DLTphjLi.js`),__vite__mapDeps([19,20]),import.meta.url))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>$(()=>import(`./chapel-C_HSM6Pq.js`),__vite__mapDeps([21,22]),import.meta.url))},{id:`clarity`,name:`Clarity`,import:(()=>$(()=>import(`./clarity-CtfBBspg.js`),[],import.meta.url))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>$(()=>import(`./clojure-DqKBuwfJ.js`),[],import.meta.url))},{id:`cmake`,name:`CMake`,import:(()=>$(()=>import(`./cmake-Bj61d0ZC.js`),[],import.meta.url))},{id:`cobol`,name:`COBOL`,import:(()=>$(()=>import(`./cobol-DXoz67hJ.js`),__vite__mapDeps([23,1,2,3,8]),import.meta.url))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>$(()=>import(`./codeowners-C8r90Shi.js`),[],import.meta.url))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>$(()=>import(`./codeql-oeQT6MSM.js`),[],import.meta.url))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>$(()=>import(`./coffee-DlhFbGsO.js`),__vite__mapDeps([24,2]),import.meta.url))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>$(()=>import(`./common-lisp-Cv5bFMCO.js`),[],import.meta.url))},{id:`coq`,name:`Rocq`,import:(()=>$(()=>import(`./coq-CGaSfhwR.js`),[],import.meta.url))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>$(()=>import(`./cpp-BaCMyKr2.js`).then(e=>e.n),__vite__mapDeps([25,26,27,22]),import.meta.url))},{id:`crystal`,name:`Crystal`,import:(()=>$(()=>import(`./crystal-CJURYNNT.js`),__vite__mapDeps([28,2,3,1,16,22,29]),import.meta.url))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>$(()=>import(`./csharp-dmMxLVLW.js`),[],import.meta.url))},{id:`css`,name:`CSS`,import:(()=>$(()=>import(`./css-CX_LiCz_.js`).then(e=>e.n),[],import.meta.url))},{id:`csv`,name:`CSV`,import:(()=>$(()=>import(`./csv-Dx-8-gkx.js`),[],import.meta.url))},{id:`cue`,name:`CUE`,import:(()=>$(()=>import(`./cue-CE9AQfxI.js`),[],import.meta.url))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>$(()=>import(`./cypher-ClKdZ_lG.js`),[],import.meta.url))},{id:`d`,name:`D`,import:(()=>$(()=>import(`./d-qD-0Kul2.js`),[],import.meta.url))},{id:`dart`,name:`Dart`,import:(()=>$(()=>import(`./dart-CHZY9Xhz.js`),[],import.meta.url))},{id:`dax`,name:`DAX`,import:(()=>$(()=>import(`./dax-BkyTk9wS.js`),[],import.meta.url))},{id:`desktop`,name:`Desktop`,import:(()=>$(()=>import(`./desktop-Dlh5hvp9.js`),[],import.meta.url))},{id:`diff`,name:`Diff`,import:(()=>$(()=>import(`./diff-woXpYk--.js`),[],import.meta.url))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>$(()=>import(`./docker-IyjqRm3v.js`),[],import.meta.url))},{id:`dotenv`,name:`dotEnv`,import:(()=>$(()=>import(`./dotenv-CuH5my32.js`),[],import.meta.url))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>$(()=>import(`./dream-maker-DW3nJb8Q.js`),[],import.meta.url))},{id:`edge`,name:`Edge`,import:(()=>$(()=>import(`./edge-CTUGxEgV.js`),__vite__mapDeps([30,1,2,3,11,15]),import.meta.url))},{id:`elixir`,name:`Elixir`,import:(()=>$(()=>import(`./elixir-CQwEci3v.js`),__vite__mapDeps([31,1,2,3]),import.meta.url))},{id:`elm`,name:`Elm`,import:(()=>$(()=>import(`./elm-BkLKshkr.js`),__vite__mapDeps([32,27,22]),import.meta.url))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>$(()=>import(`./emacs-lisp-DR2vtWaj.js`),[],import.meta.url))},{id:`erb`,name:`ERB`,import:(()=>$(()=>import(`./erb-1YN1e0vJ.js`),__vite__mapDeps([33,1,2,3,34,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39]),import.meta.url))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>$(()=>import(`./erlang-Cphh6RMH.js`),__vite__mapDeps([40,41]),import.meta.url))},{id:`fennel`,name:`Fennel`,import:(()=>$(()=>import(`./fennel-DQxkIbk2.js`),[],import.meta.url))},{id:`fish`,name:`Fish`,import:(()=>$(()=>import(`./fish-BJitypiv.js`),[],import.meta.url))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>$(()=>import(`./fluent-C03EYrpw.js`),[],import.meta.url))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>$(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),__vite__mapDeps([42,43]),import.meta.url))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>$(()=>import(`./fortran-free-form-CYNrtFtB.js`),[],import.meta.url))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>$(()=>import(`./fsharp-D13ZGOAj.js`),__vite__mapDeps([44,41]),import.meta.url))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>$(()=>import(`./gdresource-xMC7jr7x.js`),__vite__mapDeps([45,46,47]),import.meta.url))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>$(()=>import(`./gdscript-DYvRD3hg.js`),[],import.meta.url))},{id:`gdshader`,name:`GDShader`,import:(()=>$(()=>import(`./gdshader-CBce3t8t.js`),[],import.meta.url))},{id:`genie`,name:`Genie`,import:(()=>$(()=>import(`./genie-CV2tkWYe.js`),[],import.meta.url))},{id:`gherkin`,name:`Gherkin`,import:(()=>$(()=>import(`./gherkin-DExj1W_8.js`),[],import.meta.url))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>$(()=>import(`./git-commit-BSykSTBG.js`),__vite__mapDeps([48,49]),import.meta.url))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>$(()=>import(`./git-rebase-BKS3kIrK.js`),__vite__mapDeps([50,29]),import.meta.url))},{id:`gleam`,name:`Gleam`,import:(()=>$(()=>import(`./gleam-CSRkHgEL.js`),[],import.meta.url))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>$(()=>import(`./glimmer-js-CcF_d66k.js`),__vite__mapDeps([51,2,3,1,11]),import.meta.url))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>$(()=>import(`./glimmer-ts-CY0XDie9.js`),__vite__mapDeps([52,2,3,1,11]),import.meta.url))},{id:`glsl`,name:`GLSL`,import:(()=>$(()=>import(`./glsl-DccBV_n0.js`).then(e=>e.n),__vite__mapDeps([27,22]),import.meta.url))},{id:`gn`,name:`GN`,import:(()=>$(()=>import(`./gn-CAXYAgV-.js`),[],import.meta.url))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>$(()=>import(`./gnuplot-7GGW24-e.js`),[],import.meta.url))},{id:`go`,name:`Go`,import:(()=>$(()=>import(`./go-rLFTqkRN.js`),[],import.meta.url))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>$(()=>import(`./graphql-C2PFH9th.js`).then(e=>e.n),__vite__mapDeps([36,2,11,13,37]),import.meta.url))},{id:`groovy`,name:`Groovy`,import:(()=>$(()=>import(`./groovy-CacY0gHj.js`),[],import.meta.url))},{id:`hack`,name:`Hack`,import:(()=>$(()=>import(`./hack-BCI4tEad.js`),__vite__mapDeps([53,1,2,3,16]),import.meta.url))},{id:`haml`,name:`Ruby Haml`,import:(()=>$(()=>import(`./haml-QnmUImKG.js`).then(e=>e.n),__vite__mapDeps([35,2,3]),import.meta.url))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>$(()=>import(`./handlebars-CPd4ATQH.js`),__vite__mapDeps([54,2,3,1,39]),import.meta.url))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>$(()=>import(`./haskell-D8IpX4py.js`),[],import.meta.url))},{id:`haxe`,name:`Haxe`,import:(()=>$(()=>import(`./haxe-C8oCnwJJ.js`),[],import.meta.url))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>$(()=>import(`./hcl-Dh228itO.js`),[],import.meta.url))},{id:`hjson`,name:`Hjson`,import:(()=>$(()=>import(`./hjson-CxZEssPk.js`),[],import.meta.url))},{id:`hlsl`,name:`HLSL`,import:(()=>$(()=>import(`./hlsl-Cvrh5tZx.js`),[],import.meta.url))},{id:`html`,name:`HTML`,import:(()=>$(()=>import(`./html-BgGOZsTs.js`).then(e=>e.n),__vite__mapDeps([1,2,3]),import.meta.url))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>$(()=>import(`./html-derivative-DtSxVTSr.js`),__vite__mapDeps([15,1,2,3]),import.meta.url))},{id:`http`,name:`HTTP`,import:(()=>$(()=>import(`./http-VJ1JqsCP.js`),__vite__mapDeps([55,7,8,9,29,36,2,11,13,37]),import.meta.url))},{id:`hurl`,name:`Hurl`,import:(()=>$(()=>import(`./hurl-Byqf3Q4J.js`),__vite__mapDeps([56,7,8,57,36,2,11,13,37]),import.meta.url))},{id:`hxml`,name:`HXML`,import:(()=>$(()=>import(`./hxml-Dcm88srW.js`),__vite__mapDeps([58,59]),import.meta.url))},{id:`hy`,name:`Hy`,import:(()=>$(()=>import(`./hy-CZbG8q4J.js`),[],import.meta.url))},{id:`imba`,name:`Imba`,import:(()=>$(()=>import(`./imba-DsUTQ-LC.js`),[],import.meta.url))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>$(()=>import(`./ini-B5eOa1yu.js`),[],import.meta.url))},{id:`java`,name:`Java`,import:(()=>$(()=>import(`./java-B_nJOiTG.js`).then(e=>e.n),[],import.meta.url))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>$(()=>import(`./javascript-DffeUEnj.js`).then(e=>e.n),[],import.meta.url))},{id:`jinja`,name:`Jinja`,import:(()=>$(()=>import(`./jinja-M0zKdCfa.js`),__vite__mapDeps([60,1,2,3]),import.meta.url))},{id:`jison`,name:`Jison`,import:(()=>$(()=>import(`./jison-BT0-M0gS.js`),__vite__mapDeps([61,2]),import.meta.url))},{id:`json`,name:`JSON`,import:(()=>$(()=>import(`./json-DmyuI1nx.js`).then(e=>e.n),[],import.meta.url))},{id:`json5`,name:`JSON5`,import:(()=>$(()=>import(`./json5-BR5RXkoi.js`),[],import.meta.url))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>$(()=>import(`./jsonc-CYpm1nAK.js`),[],import.meta.url))},{id:`jsonl`,name:`JSON Lines`,import:(()=>$(()=>import(`./jsonl-CmCQp5Yx.js`),[],import.meta.url))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>$(()=>import(`./jsonnet-CJTPZ8u_.js`),[],import.meta.url))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>$(()=>import(`./jssm-DXw9l8Rf.js`),[],import.meta.url))},{id:`jsx`,name:`JSX`,import:(()=>$(()=>import(`./jsx-rE32VeXB.js`).then(e=>e.n),[],import.meta.url))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>$(()=>import(`./julia-DjyTg-6t.js`),__vite__mapDeps([62,2,16,20,25,26,27,22,63]),import.meta.url))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>$(()=>import(`./just-CK65S3r8.js`),__vite__mapDeps([64,2,11,20,29,34,3,1,7,8,16,22,25,26,27,35,36,13,37,38,39,65]),import.meta.url))},{id:`kdl`,name:`KDL`,import:(()=>$(()=>import(`./kdl-CsD5j6eV.js`),[],import.meta.url))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>$(()=>import(`./kotlin-DhhofPvG.js`),[],import.meta.url))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>$(()=>import(`./kusto-C7mF5XQf.js`),[],import.meta.url))},{id:`latex`,name:`LaTeX`,import:(()=>$(()=>import(`./latex-94zewxls.js`),__vite__mapDeps([66,67,63]),import.meta.url))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>$(()=>import(`./lean-CewbzKMR.js`),[],import.meta.url))},{id:`less`,name:`Less`,import:(()=>$(()=>import(`./less-DVTAwKKz.js`),[],import.meta.url))},{id:`liquid`,name:`Liquid`,import:(()=>$(()=>import(`./liquid-Dl0qLBwx.js`),__vite__mapDeps([68,2,3,1,9]),import.meta.url))},{id:`llvm`,name:`LLVM IR`,import:(()=>$(()=>import(`./llvm-DqHOMS-s.js`),[],import.meta.url))},{id:`log`,name:`Log file`,import:(()=>$(()=>import(`./log-BNLmms1o.js`),[],import.meta.url))},{id:`logo`,name:`Logo`,import:(()=>$(()=>import(`./logo-Cluzi2Zq.js`),[],import.meta.url))},{id:`lua`,name:`Lua`,import:(()=>$(()=>import(`./lua-CjD63HfG.js`).then(e=>e.n),__vite__mapDeps([38,22]),import.meta.url))},{id:`luau`,name:`Luau`,import:(()=>$(()=>import(`./luau-VGWVLoqX.js`),[],import.meta.url))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>$(()=>import(`./make-Dixweg8N.js`),[],import.meta.url))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>$(()=>import(`./markdown-BYOwaDjH.js`),[],import.meta.url))},{id:`marko`,name:`Marko`,import:(()=>$(()=>import(`./marko-CBzovuJ1.js`),__vite__mapDeps([69,3,5,11,70]),import.meta.url))},{id:`matlab`,name:`MATLAB`,import:(()=>$(()=>import(`./matlab-D7qyCx1q.js`),[],import.meta.url))},{id:`mdc`,name:`MDC`,import:(()=>$(()=>import(`./mdc-B89wcoMe.js`),__vite__mapDeps([71,15,1,2,3,39,41]),import.meta.url))},{id:`mdx`,name:`MDX`,import:(()=>$(()=>import(`./mdx-DQZ5AkYe.js`),[],import.meta.url))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>$(()=>import(`./mermaid-BxpfTIzt.js`),[],import.meta.url))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>$(()=>import(`./mipsasm-BMqwQI7S.js`),[],import.meta.url))},{id:`mojo`,name:`Mojo`,import:(()=>$(()=>import(`./mojo-fg40_ntQ.js`),[],import.meta.url))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>$(()=>import(`./moonbit-D9W784E_.js`),[],import.meta.url))},{id:`move`,name:`Move`,import:(()=>$(()=>import(`./move-BYnGhZoM.js`),[],import.meta.url))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>$(()=>import(`./narrat-_X_XdTYD.js`),[],import.meta.url))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>$(()=>import(`./nextflow-CSgcYZcx.js`),__vite__mapDeps([72,73]),import.meta.url))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>$(()=>import(`./nextflow-groovy-D7IRt6Pp.js`),[],import.meta.url))},{id:`nginx`,name:`Nginx`,import:(()=>$(()=>import(`./nginx-BtCSV7rr.js`),__vite__mapDeps([74,38,22]),import.meta.url))},{id:`nim`,name:`Nim`,import:(()=>$(()=>import(`./nim-BT2sttEd.js`),__vite__mapDeps([75,2,3,1,7,8,22,27,41]),import.meta.url))},{id:`nix`,name:`Nix`,import:(()=>$(()=>import(`./nix-IvuFDN5E.js`),[],import.meta.url))},{id:`nsis`,name:`NSIS`,import:(()=>$(()=>import(`./nsis-CjNLYCLg.js`),[],import.meta.url))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>$(()=>import(`./nushell--0fT3PI1.js`),[],import.meta.url))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>$(()=>import(`./objective-c-D1A_Heim.js`),[],import.meta.url))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>$(()=>import(`./objective-cpp-BsSzOQcm.js`),[],import.meta.url))},{id:`ocaml`,name:`OCaml`,import:(()=>$(()=>import(`./ocaml-O90oeIOV.js`),[],import.meta.url))},{id:`odin`,name:`Odin`,import:(()=>$(()=>import(`./odin-B1RWQWA5.js`),[],import.meta.url))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>$(()=>import(`./openscad-BUDT5pXO.js`),[],import.meta.url))},{id:`org`,name:`Org Markup`,import:(()=>$(()=>import(`./org-DyhV0u0R.js`),__vite__mapDeps([76,2,3,1,5,8,7,9,11,13,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,48,50,81,82,83,63,65,66,67,70,84,75,85,86,87,88,89,90,91,92,93]),import.meta.url))},{id:`pascal`,name:`Pascal`,import:(()=>$(()=>import(`./pascal-4ZHwLPI5.js`),[],import.meta.url))},{id:`perl`,name:`Perl`,import:(()=>$(()=>import(`./perl-B0H1z4iL.js`),__vite__mapDeps([65,2,3,1,7,8,16]),import.meta.url))},{id:`php`,name:`PHP`,import:(()=>$(()=>import(`./php-BPT4W6n1.js`),__vite__mapDeps([87,2,3,1,7,8,9,16]),import.meta.url))},{id:`pkl`,name:`Pkl`,import:(()=>$(()=>import(`./pkl-ot-7Btpt.js`),[],import.meta.url))},{id:`plsql`,name:`PL/SQL`,import:(()=>$(()=>import(`./plsql-DGHpHOYJ.js`),[],import.meta.url))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>$(()=>import(`./po-BiJDBrnU.js`),[],import.meta.url))},{id:`polar`,name:`Polar`,import:(()=>$(()=>import(`./polar-C7UOKdEL.js`),[],import.meta.url))},{id:`postcss`,name:`PostCSS`,import:(()=>$(()=>import(`./postcss-BXeXVLqQ.js`),[],import.meta.url))},{id:`powerquery`,name:`PowerQuery`,import:(()=>$(()=>import(`./powerquery-DNMTfnFr.js`),[],import.meta.url))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>$(()=>import(`./powershell-QtSnmXcu.js`),[],import.meta.url))},{id:`prisma`,name:`Prisma`,import:(()=>$(()=>import(`./prisma-DMgNhnYS.js`),[],import.meta.url))},{id:`prolog`,name:`Prolog`,import:(()=>$(()=>import(`./prolog-iXnhIJG7.js`),[],import.meta.url))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>$(()=>import(`./proto-DB4EqR-F.js`),[],import.meta.url))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>$(()=>import(`./pug-BoCt7RDl.js`),__vite__mapDeps([94,2,3,1]),import.meta.url))},{id:`puppet`,name:`Puppet`,import:(()=>$(()=>import(`./puppet-CDv2pdJW.js`),[],import.meta.url))},{id:`purescript`,name:`PureScript`,import:(()=>$(()=>import(`./purescript-9MfHhQsQ.js`),[],import.meta.url))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>$(()=>import(`./python-gzcpVVnB.js`),[],import.meta.url))},{id:`qml`,name:`QML`,import:(()=>$(()=>import(`./qml-Cb4Cd08W.js`),__vite__mapDeps([95,2]),import.meta.url))},{id:`qmldir`,name:`QML Directory`,import:(()=>$(()=>import(`./qmldir-DCQb3MpD.js`),[],import.meta.url))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>$(()=>import(`./qss-Fe1Jh2GI.js`),[],import.meta.url))},{id:`r`,name:`R`,import:(()=>$(()=>import(`./r-fe_4bIGN.js`).then(e=>e.n),[],import.meta.url))},{id:`racket`,name:`Racket`,import:(()=>$(()=>import(`./racket-DcIDlBhZ.js`),[],import.meta.url))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>$(()=>import(`./raku-B3gFvitq.js`),[],import.meta.url))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>$(()=>import(`./razor-dDhRcZ_O.js`),__vite__mapDeps([96,1,2,3,78]),import.meta.url))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>$(()=>import(`./rbs-C0MpOrj4.js`),[],import.meta.url))},{id:`reg`,name:`Windows Registry Script`,import:(()=>$(()=>import(`./reg-CRGYupPL.js`),[],import.meta.url))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>$(()=>import(`./regexp-B7rcDdRa.js`).then(e=>e.n),[],import.meta.url))},{id:`rel`,name:`Rel`,import:(()=>$(()=>import(`./rel-BtDbiS_P.js`),[],import.meta.url))},{id:`riscv`,name:`RISC-V`,import:(()=>$(()=>import(`./riscv-Ckw8ddFX.js`),[],import.meta.url))},{id:`ron`,name:`RON`,import:(()=>$(()=>import(`./ron-VUp2lXgN.js`),[],import.meta.url))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>$(()=>import(`./rosmsg-CAekHB0j.js`),[],import.meta.url))},{id:`rst`,name:`reStructuredText`,import:(()=>$(()=>import(`./rst-DjeWGJRw.js`),__vite__mapDeps([97,2,15,1,3,20,98,25,26,27,22,29,39,34,7,8,16,35,36,11,13,37,38]),import.meta.url))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>$(()=>import(`./ruby-Dx3POAAI.js`),__vite__mapDeps([34,2,3,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39]),import.meta.url))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>$(()=>import(`./rust-DpiIf5JO.js`),[],import.meta.url))},{id:`sas`,name:`SAS`,import:(()=>$(()=>import(`./sas-CZOq7qCQ.js`),__vite__mapDeps([99,16]),import.meta.url))},{id:`sass`,name:`Sass`,import:(()=>$(()=>import(`./sass-DXrisJhu.js`),[],import.meta.url))},{id:`scala`,name:`Scala`,import:(()=>$(()=>import(`./scala-BiFt_7mu.js`),[],import.meta.url))},{id:`scheme`,name:`Scheme`,import:(()=>$(()=>import(`./scheme-DQCgrYNe.js`),[],import.meta.url))},{id:`scss`,name:`SCSS`,import:(()=>$(()=>import(`./scss-DhFtC8D4.js`).then(e=>e.n),__vite__mapDeps([5,3]),import.meta.url))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>$(()=>import(`./sdbl-bTVj8UrX.js`),[],import.meta.url))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>$(()=>import(`./shaderlab-TOUzSsQk.js`),__vite__mapDeps([100,101]),import.meta.url))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>$(()=>import(`./shellscript-Djdriz3m.js`).then(e=>e.n),[],import.meta.url))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>$(()=>import(`./shellsession-Dkak5s2P.js`),__vite__mapDeps([102,29]),import.meta.url))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>$(()=>import(`./smalltalk-BHpQb5nM.js`),[],import.meta.url))},{id:`smithy`,name:`Smithy`,import:(()=>$(()=>import(`./smithy-Dgaz7aur.js`),[],import.meta.url))},{id:`solidity`,name:`Solidity`,import:(()=>$(()=>import(`./solidity-Bj7E1mRn.js`),[],import.meta.url))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>$(()=>import(`./soy-CqlitY2w.js`),__vite__mapDeps([103,1,2,3]),import.meta.url))},{id:`sparql`,name:`SPARQL`,import:(()=>$(()=>import(`./sparql-D_iOobhT.js`),__vite__mapDeps([104,105]),import.meta.url))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>$(()=>import(`./splunk-BC2Px7Mm.js`),[],import.meta.url))},{id:`sql`,name:`SQL`,import:(()=>$(()=>import(`./sql-BrLHRKP1.js`).then(e=>e.n),[],import.meta.url))},{id:`ssh-config`,name:`SSH Config`,import:(()=>$(()=>import(`./ssh-config-BgfXC-Er.js`),[],import.meta.url))},{id:`stata`,name:`Stata`,import:(()=>$(()=>import(`./stata-CZpBofQo.js`),__vite__mapDeps([106,16]),import.meta.url))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>$(()=>import(`./stylus-B6D30XZt.js`),[],import.meta.url))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>$(()=>import(`./surrealql-DI5AQTqZ.js`),__vite__mapDeps([107,2]),import.meta.url))},{id:`svelte`,name:`Svelte`,import:(()=>$(()=>import(`./svelte-U4k0rBt4.js`),__vite__mapDeps([108,2,3,11,12]),import.meta.url))},{id:`swift`,name:`Swift`,import:(()=>$(()=>import(`./swift-CyEgAFGc.js`),[],import.meta.url))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>$(()=>import(`./system-verilog-Dh5ihWbf.js`),[],import.meta.url))},{id:`systemd`,name:`Systemd Units`,import:(()=>$(()=>import(`./systemd-BxMlprV5.js`),[],import.meta.url))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>$(()=>import(`./talonscript-CohzipZa.js`),[],import.meta.url))},{id:`tasl`,name:`Tasl`,import:(()=>$(()=>import(`./tasl-DMoTqEGO.js`),[],import.meta.url))},{id:`tcl`,name:`Tcl`,import:(()=>$(()=>import(`./tcl-CZd0xW_V.js`),[],import.meta.url))},{id:`templ`,name:`Templ`,import:(()=>$(()=>import(`./templ-jjK4_r-Y.js`),__vite__mapDeps([109,2,3,81]),import.meta.url))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>$(()=>import(`./terraform-DswuEJGm.js`),[],import.meta.url))},{id:`tex`,name:`TeX`,import:(()=>$(()=>import(`./tex-BwNS-MeE.js`).then(e=>e.n),__vite__mapDeps([67,63]),import.meta.url))},{id:`toml`,name:`TOML`,import:(()=>$(()=>import(`./toml-CcmNWLt0.js`),[],import.meta.url))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>$(()=>import(`./ts-tags-CJ1vUXbL.js`),__vite__mapDeps([110,2,3,1,7,8,11,16,27,22]),import.meta.url))},{id:`tsv`,name:`TSV`,import:(()=>$(()=>import(`./tsv-sltzmVWM.js`),[],import.meta.url))},{id:`tsx`,name:`TSX`,import:(()=>$(()=>import(`./tsx-BwmOEMnR.js`).then(e=>e.n),[],import.meta.url))},{id:`turtle`,name:`Turtle`,import:(()=>$(()=>import(`./turtle-ByJddavk.js`),[],import.meta.url))},{id:`twig`,name:`Twig`,import:(()=>$(()=>import(`./twig-hj02oBmU.js`),__vite__mapDeps([111,2,3,5,20,34,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39,87,9]),import.meta.url))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>$(()=>import(`./typescript-BnHEhDG5.js`).then(e=>e.n),[],import.meta.url))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>$(()=>import(`./typespec-BGhR2SqG.js`),[],import.meta.url))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>$(()=>import(`./typst-9zNH6XOp.js`),__vite__mapDeps([112,2,3,1,5,8,7,9,11,13,113,114,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,44,48,50,81,82,54,83,115,63,62,65,66,67,70,116,84,85,87,88,89,90,91,93,117,94,118,119,111,120]),import.meta.url))},{id:`v`,name:`V`,import:(()=>$(()=>import(`./v-DBj4K9d_.js`),[],import.meta.url))},{id:`vala`,name:`Vala`,import:(()=>$(()=>import(`./vala-zf12oZj6.js`),[],import.meta.url))},{id:`vb`,name:`Visual Basic`,import:(()=>$(()=>import(`./vb-DOwzaHZ0.js`),[],import.meta.url))},{id:`verilog`,name:`Verilog`,import:(()=>$(()=>import(`./verilog-B2gwz-sJ.js`),[],import.meta.url))},{id:`vhdl`,name:`VHDL`,import:(()=>$(()=>import(`./vhdl-BroJfC0k.js`),[],import.meta.url))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>$(()=>import(`./viml-DvXPmvsu.js`),[],import.meta.url))},{id:`vue`,name:`Vue`,import:(()=>$(()=>import(`./vue-wqTzy8u9.js`),__vite__mapDeps([121,2,3,1,9,11,15]),import.meta.url))},{id:`vue-html`,name:`Vue HTML`,import:(()=>$(()=>import(`./vue-html-unwCMN4c.js`),__vite__mapDeps([122,2]),import.meta.url))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>$(()=>import(`./vue-vine-C-RiGvWN.js`),__vite__mapDeps([123,2,3,5,12,70,124]),import.meta.url))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>$(()=>import(`./vyper-CgoNMtux.js`),[],import.meta.url))},{id:`wasm`,name:`WebAssembly`,import:(()=>$(()=>import(`./wasm-ByWQv1Qj.js`),[],import.meta.url))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>$(()=>import(`./wenyan-C8pVoKbM.js`),[],import.meta.url))},{id:`wgsl`,name:`WGSL`,import:(()=>$(()=>import(`./wgsl-BsKzXJz4.js`),[],import.meta.url))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>$(()=>import(`./wikitext-ClFFjSW2.js`),[],import.meta.url))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>$(()=>import(`./wit-DdvCle-K.js`),[],import.meta.url))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>$(()=>import(`./wolfram-DLL8P-h_.js`),[],import.meta.url))},{id:`xml`,name:`XML`,import:(()=>$(()=>import(`./xml-2pQenJRT.js`).then(e=>e.n),__vite__mapDeps([7,8]),import.meta.url))},{id:`xsl`,name:`XSL`,import:(()=>$(()=>import(`./xsl-B_MbLqZj.js`),__vite__mapDeps([93,7,8]),import.meta.url))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>$(()=>import(`./yaml-COm5VSZw.js`).then(e=>e.n),[],import.meta.url))},{id:`zenscript`,name:`ZenScript`,import:(()=>$(()=>import(`./zenscript-BnlCZFoB.js`),[],import.meta.url))},{id:`zig`,name:`Zig`,import:(()=>$(()=>import(`./zig-CMLA9XwU.js`),[],import.meta.url))}],cx=Object.fromEntries(sx.map(e=>[e.id,e.import])),lx=Object.fromEntries(sx.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),ux={...cx,...lx},dx=`github-dark-default`,fx={h:`c`,hh:`cpp`,hpp:`cpp`,hxx:`cpp`,cc:`cpp`,cxx:`cpp`,htm:`html`,svg:`xml`,pl:`perl`,ex:`elixir`,exs:`elixir`,makefile:`make`,dockerfile:`dockerfile`},px=new Map;for(let e of sx)for(let t of[e.id,...e.aliases??[]])px.set(t.toLowerCase(),e.id);for(let[e,t]of Object.entries(fx))px.set(e,t);function mx(e){let t=e.slice(e.lastIndexOf(`/`)+1).toLowerCase(),n=t.lastIndexOf(`.`),r=n===-1?t:t.slice(n+1);return px.get(r)??px.get(t)??null}var hx=null;function gx(){return hx??=Ab({themes:[$(()=>import(`./github-dark-default-DXG-b-1a.js`),[],import.meta.url)],langs:[],engine:tx($(()=>import(`./wasm-BnjxR4X6.js`),[],import.meta.url))}),hx}async function _x(e){let t=await gx();return t.getLoadedLanguages().includes(e)||await t.loadLanguage(ux[e]),n=>n.length===0?[]:t.codeToTokensBase(n.join(`
|
|
84
84
|
`),{lang:e,theme:dx})}function vx(e,t){let n=new Map,r=new Map;if(e.newContent!==null){let r=Math.max(0,...e.hunks.flatMap(e=>e.lines.map(e=>e.newNo??0)));t(Al(e.newContent).slice(0,r)).forEach((e,t)=>n.set(t+1,e))}for(let i of e.hunks){let a=i.lines.filter(e=>e.type!==`add`);if(t(a.map(e=>e.text)).forEach((e,t)=>r.set(a[t].oldNo,e)),e.newContent===null){let e=i.lines.filter(e=>e.type!==`del`);t(e.map(e=>e.text)).forEach((t,r)=>n.set(e[r].newNo,t))}}return{newSide:n,oldSide:r}}function yx(e){let t=mx(e.path),[n,r]=(0,v.useState)(null);(0,v.useEffect)(()=>{if(t===null)return;let e=!1;return _x(t).then(n=>!e&&r({lang:t,tokenizer:n}),n=>!e&&r({lang:t,error:n instanceof Error?n.message:String(n)})),()=>{e=!0}},[t]);let i=n!==null&&n.lang===t?n:null,a=i!==null&&`tokenizer`in i?i.tokenizer:null;return(0,v.useMemo)(()=>{if(i!==null&&`error`in i)return{status:`error`,message:i.error};if(a===null)return{status:`none`};let t=new Map;return{status:`ready`,file:vx(e,a),suggestion:e=>{let n=t.get(e);return n||(n=a(Al(e)),t.set(e,n)),n}}},[i,a,e])}function bx({scope:e,onScopeChange:t,wholeFileAvailable:n,codeView:r,onCodeViewChange:i,mode:a,onModeChange:o}){return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(ch,{label:`Afficher`,options:Rl,value:e,onChange:t,disabled:n?void 0:{file:`Contenu du fichier non conservé dans l'analyse`}}),(0,O.jsx)(ch,{label:`Code`,options:Ll,value:r,onChange:i}),(0,O.jsx)(ch,{label:`Correctifs`,options:Il,value:a,onChange:o})]})}var xx={context:` `,add:`+`,del:`−`};function Sx(e,t){return t===`new`&&e===`add`?`is-new`:`is-${e}`}function Cx(e,t){let n=[],r=0;for(let{text:i,style:a}of e){let e=t.flatMap(e=>[e.start,e.end]).map(e=>Math.min(Math.max(e-r,0),i.length)),o=[...new Set([0,...e,i.length])].sort((e,t)=>e-t);for(let e=0;e<o.length-1;e++){let s=r+o[e],c=t.find(e=>s>=e.start&&s<e.end);n.push({text:i.slice(o[e],o[e+1]),style:a,className:c?.className})}r+=i.length}return n}function wx({text:e,tokens:t,marks:n=[],suffix:r}){let i=t?t.map(e=>({text:e.content,style:jx(e)})):[{text:e}];return(0,O.jsxs)(`span`,{className:`diff-code${t?` is-highlighted`:``}`,children:[Cx(i,n).map((e,t)=>(0,O.jsx)(`span`,{style:e.style,className:e.className,children:e.text},t)),r]})}function Tx({fold:e}){return e?(0,O.jsx)(`button`,{type:`button`,className:`diff-fold${e.folded?` is-folded`:``}`,"aria-expanded":!e.folded,title:e.folded?`Déplier le bloc · Ctrl+clic : tout déplier`:`Replier le bloc · Ctrl+clic : replier niveau par niveau, des blocs les plus imbriqués vers celui-ci`,onClick:e.onToggle,children:(0,O.jsx)(U,{name:e.folded?`chevron-right`:`chevron-down`,size:14})}):(0,O.jsx)(`span`,{className:`diff-fold`})}function Ex({fold:e}){return e?.folded?(0,O.jsxs)(`button`,{type:`button`,className:`diff-fold-ellipsis`,title:`Déplier le bloc`,onClick:e.onToggle,children:[`⋯ `,W(e.lines,`ligne`)]}):null}function Dx(e,t){let n=eh(e.rows.map(tu)),r=n.map(t=>eu(e.rows[t.start])),i=new Set(n.flatMap((e,n)=>t.has(r[n])?[n]:[]));return{regions:n,keys:r,folded:i,regionAt:new Map(n.map((e,t)=>[e.start,t])),hidden:th(n,i),rowIndex:new Map(e.rows.map((e,t)=>[e,t]))}}var Ox=new Set;function kx(e,t,n){if(e.replaced&&!n)return[];if(e.oldLine){let t=be(e.oldLine.text,e.line.text);return n?[{start:t.start,end:t.oldEnd,className:`diff-indent is-del`}]:[{start:t.start,end:t.newEnd,className:`diff-indent is-add`}]}return!e.inline||t.type===`context`?[]:e.inline.map(e=>({...e,className:`diff-inline is-${t.type}`}))}function Ax(e,t){let{oldEnd:n,newEnd:r}=be(e,t);return r>n?`→`:r<n?`←`:`↔`}function jx(e){let t=e.fontStyle??0;return{color:e.color,fontStyle:t&1?`italic`:void 0,fontWeight:t&2?600:void 0}}function Mx(e){return e?{"--mark":Du[e.severity].color}:void 0}function Nx(e){return e?e.muted?` has-bar is-bar-muted`:` has-bar`:``}function Px({entries:e}){return(0,O.jsx)(`span`,{className:`diff-pills`,children:e.map(e=>(0,O.jsx)(`span`,{className:e.finding.status===`open`?void 0:`is-muted`,title:e.finding.title,children:(0,O.jsx)(ah,{entry:e,small:!0})},e.finding.id))})}function Fx({entry:e,bar:t,pills:n,applied:r,isTarget:i,foldHidden:a,onHide:o}){let s=Al(e.finding.suggestion??``).length===0,c=mu(e.startLine,e.endLine),l=s?`supprime ${c}`:`remplace ${c}`;return(0,O.jsxs)(`div`,{className:`fix-strip${r?` is-applied`:``}${Nx(t)}${i?` is-target`:``}${a?` is-fold-hidden`:``}`,style:Mx(t),"data-fix":e.finding.id,children:[(0,O.jsx)(ah,{entry:e,small:!0}),(0,O.jsx)(U,{name:`sparkles`,color:`#8b97ff`}),(0,O.jsx)(`span`,{className:`fix-strip-text`,children:r?`Correctif ${e.number} appliqué — ${l}`:`Correctif proposé par l'agent — ${l}`}),n.length>0&&(0,O.jsx)(Px,{entries:n}),(0,O.jsx)(`button`,{type:`button`,className:`fix-strip-hide`,onClick:o,children:r?`Retirer le correctif`:`Masquer le correctif`})]})}function Ix({context:e,onChange:t}){return(0,O.jsxs)(`div`,{className:`context-stepper`,role:`group`,"aria-label":`Contexte du bloc`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`context-stepper-button`,disabled:!e.canShrink,title:`Retirer 5 lignes de contexte au-dessus et en dessous`,onClick:()=>t(-1),children:[(0,O.jsx)(U,{name:`fold-vertical`,size:12}),`−`,5]}),(0,O.jsx)(`span`,{className:`context-stepper-count`,children:W(e.context,`ligne`)}),(0,O.jsxs)(`button`,{type:`button`,className:`context-stepper-button`,disabled:!e.canGrow,title:`Ajouter 5 lignes de contexte au-dessus et en dessous`,onClick:()=>t(1),children:[(0,O.jsx)(U,{name:`unfold-vertical`,size:12}),`+`,5]})]})}function Lx({mode:e,codeView:t,explained:n,reindented:r,inlined:i,expanded:a}){return(0,O.jsxs)(`div`,{className:`diff-legend`,children:[t===`new`?(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-new`}),`Ajouté par la feature`]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-add`}),`Ajouté par la feature`]}),(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-del`}),`Supprimé par la feature`]})]}),i&&(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch ${t===`new`?`is-inline-add`:`is-inline`}`}),`Partie modifiée de la ligne`]}),r&&(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-reindent`}),`Indentation modifiée`]}),e===`before-after`&&(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-replaced`}),`Lignes remplacées par le correctif`]}),e!==`off`&&(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-proposed`}),e===`applied`?`Correctif appliqué`:`Correctif proposé`]}),n&&(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-explained`}),`Code décrit par une explication`]}),a&&(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch is-expanded`}),`Contexte ajouté`]})]})}function Rx({file:e,fileDiff:t,hunks:n,hunkContexts:r,addedContext:i,onContextChange:a,findings:o,notedLines:s,scrollRef:c,mode:l,onModeChange:u,codeView:d,onCodeViewChange:f,scope:p,onScopeChange:m,wholeFileAvailable:h,explained:g,target:_,onLineNote:y,onHideFix:b,onRequestExplanation:x,zen:S}){let C=e.contentAvailable,w=yx(t),T=(0,v.useRef)(null),ee=(0,v.useRef)(null),[E,te]=(0,v.useState)(0),[D,k]=(0,v.useState)({path:e.path,keys:Ox}),ne=D.path===e.path?D.keys:Ox,re=n.map(e=>Dx(e,ne)),ie=!S||w.status===`error`,ae=p===`file`&&!S,oe=(0,v.useMemo)(()=>ae?pu(n,d,o,s):null,[ae,n,d,o,s]);(0,v.useEffect)(()=>{let e=T.current;if(!e){te(0);return}let t=new ResizeObserver(()=>te(e.offsetHeight));return t.observe(e),()=>t.disconnect()},[ie]);let se=(t,n,r)=>{let{regions:i,keys:a,folded:o}=re[t],s;r.ctrlKey||r.metaKey?s=ih(i,n,o):(s=new Set(o),s.delete(n)||s.add(n));let c=new Set(a),l=[...ne].filter(e=>!c.has(e));k({path:e.path,keys:new Set([...l,...[...s].map(e=>a[e])])})},ce=(e,t)=>{let{regions:n,folded:r,regionAt:i}=re[e],a=i.get(t);if(a===void 0)return null;let o=n[a];return{folded:r.has(a),lines:o.end-o.start,onToggle:t=>se(e,a,t)}},le=(e,t,n)=>(0,O.jsx)(Fx,{entry:e.entry,bar:e.bar,pills:e.pills,applied:l===`applied`,isTarget:Ul(_,{kind:`fix`,entry:e.entry}),foldHidden:n,onHide:()=>b(e.entry.finding.id)},t),A=(e,t,n,r,a)=>{if(e.kind===`fix-line`)return(0,O.jsxs)(`div`,{className:`diff-line is-proposed${Nx(e.bar)}${r?` is-fold-hidden`:``}`,style:Mx(e.bar),children:[(0,O.jsx)(`span`,{className:`diff-num`}),(0,O.jsx)(Tx,{fold:n}),(0,O.jsx)(`span`,{className:`diff-marker`,children:`›`}),(0,O.jsx)(wx,{text:e.text,tokens:w.status===`ready`?w.suggestion(e.entry.finding.suggestion??``)[e.index]:void 0,suffix:(0,O.jsx)(Ex,{fold:n})})]},a);let{oldLine:o}=e,c=t===`old`,l=c&&o?o:e.line,u=o??(l.type===`del`?l:null),f=e.replaced&&!c,p=c?null:e.bar,m=c?null:l.newNo,h=w.status!==`ready`||f?void 0:l.type===`del`?w.file.oldSide.get(l.oldNo):w.file.newSide.get(l.newNo),g=kx(e,l,c),v=[`diff-line`,o?`is-reindent`:Sx(l.type,d),!o&&!f&&e.inline?`has-inline`:``,f?`is-replaced`:``,l.type===`context`&&l.newNo!==null&&i?.has(l.newNo)?`is-expanded`:``,e.explained?`is-explained`:``,Nx(p).trim(),m!==null&&Ul(_,{kind:`line`,line:m})?`is-target`:``,r?`is-fold-hidden`:``];return(0,O.jsxs)(`div`,{className:v.filter(Boolean).join(` `),style:Mx(p),"data-line":m??void 0,"data-old-line":t===`new`?void 0:u?.oldNo??void 0,children:[m!==null&&s.has(m)&&(0,O.jsx)(`span`,{className:`diff-note-dot`,title:`Remarque sur cette ligne`}),m!==null&&C?(0,O.jsx)(`button`,{type:`button`,className:`diff-num`,title:`Ajouter une remarque sur la ligne ${m}`,onClick:()=>y(m),children:m}):(0,O.jsx)(`span`,{className:`diff-num`,children:(c?l.oldNo:m)??``}),(0,O.jsx)(Tx,{fold:n}),o?(0,O.jsx)(`span`,{className:`diff-marker`,title:`Seule l'indentation de cette ligne change (ligne ${o.oldNo} avant)`,children:Ax(o.text,e.line.text)}):(0,O.jsx)(`span`,{className:`diff-marker`,children:d===`new`?``:xx[l.type]}),(0,O.jsx)(wx,{text:l.text,tokens:h,marks:g,suffix:(0,O.jsx)(Ex,{fold:n})}),!c&&e.pills.length>0&&(0,O.jsx)(Px,{entries:e.pills})]},a)};return(0,O.jsxs)(`div`,{className:`diff`,children:[ie&&(0,O.jsxs)(`div`,{className:`diff-toolbar`,ref:T,children:[w.status===`error`&&(0,O.jsxs)(`span`,{className:`diff-toolbar-error`,children:[`Coloration syntaxique indisponible : `,w.message]}),!S&&(0,O.jsx)(bx,{scope:p,onScopeChange:m,wholeFileAvailable:h,codeView:d,onCodeViewChange:f,mode:l,onModeChange:u})]}),(0,O.jsxs)(`div`,{className:`diff-body${ae?` has-minimap`:``}`,children:[(0,O.jsx)(`div`,{className:`diff-rows`,ref:ee,children:n.map((e,t)=>(0,O.jsxs)(`div`,{className:`hunk`,children:[(0,O.jsxs)(`div`,{className:`hunk-header`,children:[(0,O.jsx)(`span`,{className:`hunk-header-text mono`,children:e.hunk.header}),r?.[t]&&(0,O.jsx)(Ix,{context:r[t],onChange:e=>a(t,e)}),(0,O.jsx)(`button`,{type:`button`,className:`hunk-explain`,title:`Copier un prompt qui demande à l'agent d'expliquer ce bloc et d'ajouter ses explications à l'analyse`,"aria-label":`Copier une demande d'explication`,onClick:()=>x(e.hunk),children:(0,O.jsx)(U,{name:`bot`,color:`#3cc4b4`})})]}),d===`split`?ru(e.rows).map((e,n)=>{let{hidden:r,rowIndex:i}=re[t];if(e.kind===`full`)return le(e.row,n,r.has(i.get(e.row)));let a=e.left?i.get(e.left):null,o=e.right?i.get(e.right):null,s=[a,o].every(e=>e===null||r.has(e)),c=e.left&&a!==null&&e.left!==e.right&&e.left.line.type===`del`?ce(t,a):null;return(0,O.jsxs)(`div`,{className:`diff-split-row${s?` is-fold-hidden`:``}`,children:[e.left?A(e.left,`old`,c,!1):(0,O.jsx)(`div`,{className:`diff-line is-empty`}),e.right&&o!==null?A(e.right,`new`,ce(t,o),!1):(0,O.jsx)(`div`,{className:`diff-line is-empty`})]},n)}):e.rows.map((e,n)=>{let r=re[t].hidden.has(n);return e.kind===`fix-strip`?le(e,n,r):A(e,`both`,ce(t,n),r,n)})]},t))}),oe&&(0,O.jsx)(ph,{model:oe,rowsRef:ee,scrollRef:c,toolbarHeight:E})]}),(0,O.jsx)(Lx,{mode:l,codeView:d,explained:g,reindented:n.some(e=>e.rows.some(e=>e.kind===`line`&&e.oldLine!==null)),inlined:n.some(e=>e.rows.some(e=>e.kind===`line`&&e.inline!==null&&!e.replaced)),expanded:i!==null&&i.size>0})]})}var zx=8,Bx=600;function Vx({explanation:e}){let[t,n]=(0,v.useState)(!1),{side:r,startLine:i,endLine:a}=e.location,o=e.body.split(`
|
|
85
85
|
`).length>zx||e.body.length>Bx;return(0,O.jsxs)(`article`,{className:`margin-card margin-explanation is-${e.status}`,"data-explanation-card":e.id,children:[(0,O.jsxs)(`header`,{className:`margin-card-head`,children:[(0,O.jsx)(U,{name:`info`,color:`#3cc4b4`}),(0,O.jsx)(`span`,{className:`margin-explanation-kind`,children:`Explication`}),r===`old`&&(0,O.jsx)(`span`,{className:`tag explanation-side`,children:`Code supprimé`}),e.status===`outdated`&&(0,O.jsx)(`span`,{className:`tag explanation-outdated-tag`,children:`Obsolète`}),(0,O.jsxs)(`span`,{className:`margin-card-lines mono`,title:r===`old`?`Numéros de ligne avant la feature`:void 0,children:[`l. `,jl(i,a,`–`)]})]}),(0,O.jsx)(`h3`,{className:`margin-card-title`,children:e.title}),e.status===`outdated`&&(0,O.jsx)(`p`,{className:`explanation-outdated`,children:`Le code décrit a changé depuis la rédaction de cette explication : elle peut ne plus correspondre.`}),(0,O.jsx)(`p`,{className:`margin-explanation-body${o&&!t?` is-folded`:``}`,children:e.body}),o&&(0,O.jsx)(`button`,{type:`button`,className:`margin-explanation-more`,"aria-expanded":t,onClick:()=>n(!t),children:t?`Réduire`:`Lire la suite`})]})}function Hx(e,t){return e.notes.filter(e=>e.location?.path===t.path&&e.location.line===null)}function Ux({analysis:e,file:t,numbered:n,explanations:r,fileDiff:i,fixes:a,mode:o,codeView:s,removed:c,lineNotes:l,shown:u,setComposer:d,onToggleFix:f,revealedId:p}){let m=t.contentAvailable,h=[];for(let t of n){let{finding:n}=t,r=Kl(t,a,u,c),i=Fl(u,t.startLine,t.endLine),s=r!==null&&i!==null;h.push({key:`finding-${n.id}`,kind:`finding`,anchor:s?Vl(r):null,line:s?Hl(r):t.startLine,rank:t.number,color:n.status===`open`?Du[n.severity].color:`#3a4050`,label:`Constat ${t.number} · ${Du[n.severity].label} · ${n.title}`,content:(0,O.jsx)(sh,{analysis:e,entry:t,fix:a.get(n.id),mode:o,onToggleFix:e=>f(n.id,e),onAddNote:m?()=>d({line:i??t.startLine,findingId:n.id}):void 0,highlighted:n.id===p})})}for(let e of r){let t=i===null?null:Ql(i,e,c,s);h.push({key:`explanation-${e.id}`,kind:`explanation`,anchor:t?.selector??null,line:t?.order??e.location.startLine,rank:0,color:e.status===`current`?`#3cc4b4`:`#3a4050`,label:`Explication · ${e.title}`,content:(0,O.jsx)(Vx,{explanation:e})})}for(let e of l){let t=u.has(e.location.line),n=Gl(e.location.line,c);h.push({key:`note-${e.id}`,kind:`note`,anchor:t?Vl(n):null,line:t?Hl(n):e.location.line,rank:1e3,color:e.question===null?Ou.color:ku.color,label:`${e.question===null?`Remarque`:`Question`} · ligne ${e.location.line}`,content:(0,O.jsx)(Gm,{note:e})})}return h}var Wx=40;function Gx(e,t){let[n,r]=(0,v.useState)([]),i=(0,v.useRef)(()=>{});return(0,v.useLayoutEffect)(()=>{i.current=()=>{let n=e.current,i=t.current;if(!n||!i)return;let a=n.getBoundingClientRect().bottom-Wx,o=[...i.querySelectorAll(`[data-finding-card]`)].map(e=>({id:e.dataset.findingCard,top:e.getBoundingClientRect().top})).filter(e=>e.top>a).sort((e,t)=>e.top-t.top).map(e=>e.id);r(e=>e.join(`
|
|
86
86
|
`)===o.join(`
|
|
87
|
-
`)?e:o)},i.current()}),(0,v.useEffect)(()=>{let n=e.current,r=t.current;if(!n||!r)return;let a=()=>i.current();n.addEventListener(`scroll`,a,{passive:!0});let o=new ResizeObserver(a);return o.observe(n),o.observe(r),()=>{n.removeEventListener(`scroll`,a),o.disconnect()}},[e,t]),n}var Kx=12;function qx(e){let t=[],n=-12;for(let r of e){let e=Math.max(r.anchorTop,n+Kx,0);t.push(e),n=e+r.height}return t}function Jx(e,t){(0,v.useLayoutEffect)(()=>{let n=e.current,r=t.current;if(!n||!r)return;let i=[...n.querySelectorAll(`:scope > [data-anchor]`)],a=()=>{let e=n.getBoundingClientRect().top,t=i.map(t=>{let n=r.querySelector(t.dataset.anchor);if(!n)throw Error(`Ancre introuvable dans le diff : ${t.dataset.anchor}`);return{anchorTop:n.getBoundingClientRect().top-e,height:t.offsetHeight}}),a=qx(t);i.forEach((e,n)=>{e.style.top=`${a[n]}px`,e.style.setProperty(`--shift`,`${a[n]-t[n].anchorTop}px`)});let o=i.length-1;n.style.minHeight=o<0?``:`${a[o]+t[o].height}px`};a();let o=new ResizeObserver(a);o.observe(r);for(let e of i)o.observe(e);return()=>o.disconnect()})}function Yx({filters:e}){let t=[{key:`findings`,label:`Constats`,count:e.findingCount,shown:e.findingsShown,color:`#e3a33b`,onChange:e.onFindingsShownChange},{key:`explanations`,label:`Explications`,count:e.explanationCount,shown:e.explanationsShown,color:`#3cc4b4`,onChange:e.onExplanationsShownChange}];return(0,O.jsx)(`div`,{className:`margin-filters`,role:`group`,"aria-label":`Éléments affichés`,children:t.map(e=>(0,O.jsxs)(`button`,{type:`button`,className:`margin-filter${e.shown?` is-on`:``}`,style:{"--filter":e.color},"aria-pressed":e.shown,title:e.shown?`Masquer les ${e.label.toLowerCase()}`:`Afficher les ${e.label.toLowerCase()}`,onClick:()=>e.onChange(!e.shown),children:[(0,O.jsx)(`span`,{className:`margin-filter-dot`,"aria-hidden":`true`}),e.label,(0,O.jsx)(`span`,{className:`margin-filter-count`,children:e.count})]},e.key))})}function Xx({numbered:e,onReveal:t}){return(0,O.jsx)(`nav`,{className:`margin-index`,"aria-label":`Index des constats du fichier`,children:e.map(e=>{let{finding:n}=e,r=n.status===`open`?``:` · ${Au[n.status].toLowerCase()}`;return(0,O.jsxs)(`button`,{type:`button`,className:`margin-index-item${n.status===`open`?``:` is-muted`}`,style:{color:Du[n.severity].color},title:`${n.title} · ${td(e.startLine,e.endLine)}${r}`,onClick:()=>t(e),children:[(0,O.jsx)(ah,{entry:e,small:!0}),(0,O.jsxs)(`span`,{className:`mono`,children:[`l.`,e.startLine]})]},n.id)})})}function Zx({analysis:e,file:t,numbered:n,explanations:r,filters:i,fileDiff:a,fixes:o,mode:s,codeView:c,removed:l,lineNotes:u,shownLines:d,composer:f,setComposer:p,onToggleFix:m,scopeRef:h,scrollRef:g,onReveal:_,revealedId:y}){let b=(0,v.useRef)(null),x=(0,v.useRef)(null);Jx(x,h);let S=Gx(g,b),C=S.length===0?void 0:n.find(e=>e.finding.id===S[0]),w=d??new Set,T=Hx(e,t),ee=e=>(0,O.jsx)(Xm,{path:t.path,line:e,findingId:f?.findingId??null,onClose:()=>p(null)}),E=Ux({analysis:e,file:t,numbered:n,explanations:r,fileDiff:a,fixes:o,mode:s,codeView:c,removed:l,lineNotes:u,shown:w,setComposer:p,onToggleFix:m,revealedId:y}),te=[],D=[];for(let e of E)e.anchor===null?D.push((0,O.jsx)(`div`,{children:e.content},e.key)):te.push({...e,anchor:e.anchor});let k=f?.line??null,ne=f!==null&&k!==null&&w.has(k);if(ne){let e=Gl(k,l);te.push({key:`composer`,anchor:Vl(e),line:Hl(e),rank:2e3,color:`#6d7cff`,content:ee(k)})}f!==null&&k!==null&&!ne&&D.push((0,O.jsx)(`div`,{children:ee(k)},`composer`)),te.sort((e,t)=>e.line-t.line||e.rank-t.rank);let re=n.length===0&&r.length===0&&u.length===0&&T.length===0&&f===null,ie=(i.findingsShown?0:i.findingCount)+(i.explanationsShown?0:i.explanationCount),ae=n.filter(e=>e.finding.status===`open`).length;return(0,O.jsxs)(`aside`,{className:`margin-column`,"aria-label":`Constats et explications de ce fichier`,ref:b,children:[(0,O.jsxs)(`div`,{className:`margin-head`,children:[(0,O.jsxs)(`h2`,{className:`margin-title`,children:[`Constats et explications`,` `,i.findingsShown&&(0,O.jsxs)(`span`,{className:`margin-count`,title:`Constats ouverts de ce fichier ; le total compte aussi les constats ignorés et obsolètes.`,children:[W(ae,`constat ouvert`,`constats ouverts`),n.length!==ae&&` · ${n.length} au total`]})]}),(0,O.jsx)(Yx,{filters:i}),re&&ie>0?(0,O.jsxs)(`p`,{className:`margin-subtitle`,children:[W(ie,`élément masqué`,`éléments masqués`),` sur ce fichier : affichez-les avec les boutons ci-dessus.`]}):re?(0,O.jsx)(`p`,{className:`margin-subtitle`,children:`Aucun constat, explication ni remarque sur ce fichier. Cliquez sur un numéro de ligne pour ajouter une remarque.`}):(0,O.jsx)(`p`,{className:`margin-subtitle is-aligned-hint`,children:`Chaque carte est alignée sur les lignes qu'elle concerne.`}),n.length>0&&(0,O.jsx)(Xx,{numbered:n,onReveal:_})]}),(T.length>0||f?.line===null)&&(0,O.jsxs)(`section`,{className:`margin-section`,children:[(0,O.jsx)(`h3`,{className:`block-title`,children:`Sur le fichier entier`}),T.map(e=>(0,O.jsx)(Gm,{note:e},e.id)),f?.line===null&&ee(null)]}),d!==null&&D.length>0&&(0,O.jsxs)(`section`,{className:`margin-section`,children:[(0,O.jsx)(`h3`,{className:`block-title`,children:`Hors des lignes affichées du diff`}),D]}),(0,O.jsx)(`div`,{className:`margin-track`,ref:x,children:d!==null&&te.map(e=>(0,O.jsxs)(`div`,{className:`margin-item`,"data-anchor":e.anchor,style:{"--link":e.color},children:[(0,O.jsx)(`span`,{className:`margin-link-a`,"aria-hidden":`true`}),(0,O.jsx)(`span`,{className:`margin-link-b`,"aria-hidden":`true`}),e.content]},e.key))}),C&&(0,O.jsxs)(`button`,{type:`button`,className:`margin-more`,onClick:()=>_(C),children:[W(S.length,`constat`),` plus bas ↓`]})]})}var Qx={central:`target`,check:`eye`,skim:`chevrons-right`};function $x({file:e}){let t=H(e=>e.setFileLevel),n=e.classification,r=Fd(e);if(n===null||r===null)return null;let i=Object.fromEntries(Object.keys(Pu).map(e=>[e,{icon:Qx[e],label:Pu[e].label,description:e===n.level?`${Pu[e].description} · choix de l'agent`:Pu[e].description}]));return(0,O.jsxs)(`div`,{className:`classification-bar`,children:[(0,O.jsxs)(`span`,{className:`level-chip is-${r}`,children:[(0,O.jsx)(U,{name:Qx[r]}),Pu[r].label]}),(0,O.jsx)(`span`,{className:`classification-reason`,title:n.reason,children:n.reason}),n.reviewerLevel!==null&&(0,O.jsxs)(`span`,{className:`classification-override`,children:[`Reclassé par vous · l'agent proposait `,Pu[n.level].label]}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsx)(ch,{label:`Niveau de ce fichier`,options:i,value:r,onChange:n=>{n!==r&&t(e.path,n)},trigger:{icon:`arrow-up-down`,label:`Reclasser`}})]})}function eS(e){return e===`unclassified`?`Non classés`:Pu[e].label}function tS({name:e}){let{head:t,tail:n}=Xu(e);return(0,O.jsxs)(`span`,{className:`middle-ellipsis`,children:[(0,O.jsx)(`span`,{className:`middle-ellipsis-head`,children:t}),(0,O.jsx)(`span`,{className:`middle-ellipsis-tail`,children:n})]})}function nS({analysis:e,file:t,current:n}){let r=t.reviewed?`circle-check`:n?`circle-dot`:`circle`,i=t.reviewed?`#3fb950`:n?`#8b97ff`:`#3a4050`,a=Jd(e,t.path);return(0,O.jsxs)(`div`,{className:`files-item${n?` is-current`:``}${t.reviewed?` is-reviewed`:``}`,children:[(0,O.jsxs)(`a`,{href:w.review(e.id,t.path),className:`files-item-link`,title:t.path,"aria-current":n?`page`:void 0,children:[(0,O.jsx)(U,{name:r,color:i}),(0,O.jsx)(`span`,{className:`files-item-name`,children:(0,O.jsx)(tS,{name:Vu(t.path).name})})]}),qd(e,t.path).map(({severity:n,count:r,firstLine:i})=>(0,O.jsx)(yd,{severity:n,count:r,href:w.review(e.id,t.path,i),title:`${Yu(n,r)} — ${r>1?`aller au premier`:`y aller`}`},n)),a&&(0,O.jsx)(bd,{count:a.count,href:w.review(e.id,t.path,a.firstLine??void 0),title:a.firstLine===null?`${W(a.count,`remarque`)} sur le fichier — y aller`:`${W(a.count,`remarque`)} — ${a.count>1?`aller à la première`:`y aller`}`}),(0,O.jsx)(`span`,{className:`files-item-status mono is-${t.status}`,title:Mu[t.status],children:Nu[t.status]})]})}function rS({analysis:e,files:t,currentPath:n}){return(0,O.jsx)(`nav`,{className:`files-list`,children:t.map((r,i)=>{let a=Vu(r.path).folder,o=i===0?a!==``:Vu(t[i-1].path).folder!==a;return(0,O.jsxs)(v.Fragment,{children:[o&&(0,O.jsx)(`span`,{className:`files-group mono`,title:a||`racine du dépôt`,children:a||`./`}),(0,O.jsx)(nS,{analysis:e,file:r,current:r.path===n})]},r.path)})})}function iS({analysis:e,tab:t,onChange:n,skimAlert:r}){let i=zd.filter(t=>t!==`unclassified`||Vd(e,t).length>0);return(0,O.jsx)(`div`,{className:`level-tabs`,role:`tablist`,"aria-label":`Niveaux de relecture`,children:i.map(i=>(0,O.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":i===t,className:`level-tab${i===t?` is-active`:``}`,title:i===`unclassified`?`Fichiers que l'agent n'a pas classés`:Pu[i].description,onClick:()=>n(i),children:[eS(i),(0,O.jsx)(`span`,{className:`level-tab-count`,children:Vd(e,i).length}),i===`skim`&&r&&(0,O.jsx)(`span`,{className:`level-tab-alert`,"aria-label":`un fichier en survol a un constat`})]},i))})}function aS({analysis:e,tab:t,onOpen:n}){let r=zd.slice(zd.indexOf(t)+1).find(t=>Vd(e,t).length>0);if(r===void 0)return null;let i=Vd(e,r).length;return(0,O.jsxs)(`button`,{type:`button`,className:`level-card level-next`,onClick:()=>n(r),children:[(0,O.jsxs)(`span`,{className:`level-card-text`,children:[(0,O.jsx)(`span`,{className:`level-card-label`,children:`Ensuite`}),(0,O.jsxs)(`span`,{className:`level-card-title`,children:[eS(r),` · `,W(i,`fichier`)]})]}),(0,O.jsx)(U,{name:`arrow-right`,color:`#9aa1b1`})]})}function oS({analysis:e,files:t}){return(0,O.jsxs)(`div`,{className:`level-card level-alert`,children:[(0,O.jsx)(U,{name:`circle-alert`,color:`#e3a33b`}),(0,O.jsxs)(`span`,{className:`level-card-text`,children:[(0,O.jsx)(`span`,{className:`level-alert-title`,children:t.length>1?`${t.length} fichiers en survol ont un constat`:`Un fichier en survol a un constat`}),t.map(t=>(0,O.jsx)(`a`,{className:`level-alert-link`,href:w.review(e.id,t.path),title:t.path,children:Vu(t.path).name},t.path))]})]})}function sS({analysis:e,currentPath:t}){let n=e.files.find(e=>e.path===t),r=n?Bd(n):null,[i,a]=(0,v.useState)(r??`central`);(0,v.useEffect)(()=>{r!==null&&a(r)},[t,r]);let o=Rd(e),s=Gd(e);return(0,O.jsxs)(`aside`,{className:`files-panel`,children:[(0,O.jsxs)(`div`,{className:`files-panel-head`,children:[(0,O.jsx)(`span`,{className:`files-panel-title`,children:`Fichiers`}),(0,O.jsx)(`span`,{className:`files-panel-count`,children:e.files.length})]}),o?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(iS,{analysis:e,tab:i,onChange:a,skimAlert:s.length>0}),(0,O.jsx)(rS,{analysis:e,files:Vd(e,i),currentPath:t}),(0,O.jsxs)(`div`,{className:`level-cards`,children:[(0,O.jsx)(aS,{analysis:e,tab:i,onOpen:t=>{a(t);let n=Wd(e,t);n!==null&&T(w.review(e.id,n))}}),i!==`skim`&&s.length>0&&(0,O.jsx)(oS,{analysis:e,files:s})]})]}):(0,O.jsx)(rS,{analysis:e,files:e.files,currentPath:t})]})}var cS={default:280,min:200,max:600},lS=`feature-analyzer.files-panel-width`;function uS(e){return Math.round(Math.min(Math.max(e,cS.min),cS.max))}function dS(){try{let e=Number(window.localStorage.getItem(lS));return e>0?uS(e):cS.default}catch{return cS.default}}function fS(e){try{window.localStorage.setItem(lS,String(e))}catch{}}function pS(){let[e,t]=(0,v.useState)(dS),n=(0,v.useRef)(e);return{width:e,setWidth:(0,v.useCallback)(e=>{let r=uS(typeof e==`function`?e(n.current):e);n.current=r,t(r),fS(r)},[])}}var mS=14,hS=200,gS=22,_S=8,vS=`unplaced`;function yS(e){return e instanceof HTMLElement&&(e.isContentEditable||[`INPUT`,`TEXTAREA`,`SELECT`].includes(e.tagName))}function bS({items:e,fileNotes:t,scopeRef:n,scrollRef:r}){let i=(0,v.useRef)(null),a=(0,v.useRef)(null),o=(0,v.useRef)(void 0),[s,c]=(0,v.useState)(new Map),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)({root:0,track:0,trackTop:0}),[p,m]=(0,v.useState)(null),h=e.filter(e=>e.anchor!==null);(0,v.useLayoutEffect)(()=>{let e=r.current,t=n.current,o=i.current,s=a.current;if(!e||!t||!o||!s)return;let l=()=>{let t=e.scrollHeight,n=t>0?{top:e.scrollTop/t,height:e.clientHeight/t}:null;u(e=>e?.top===n?.top&&e?.height===n?.height?e:n)},d=()=>{let n=e.scrollHeight,r=e.getBoundingClientRect().top-e.scrollTop,i=new Map;for(let e of h){let a=t.querySelector(e.anchor);if(!a)throw Error(`Ancre introuvable dans le diff : ${e.anchor}`);n>0&&i.set(e.key,(a.getBoundingClientRect().top-r)/n)}c(e=>e.size===i.size&&[...i].every(([t,n])=>e.get(t)===n)?e:i);let a={root:o.offsetHeight,track:s.offsetHeight,trackTop:s.offsetTop};f(e=>e.root===a.root&&e.track===a.track&&e.trackTop===a.trackTop?e:a),l()};d(),e.addEventListener(`scroll`,l,{passive:!0});let p=new ResizeObserver(d);return p.observe(e),p.observe(t),p.observe(o),()=>{e.removeEventListener(`scroll`,l),p.disconnect()}}),(0,v.useEffect)(()=>{if(!p?.pinned)return;let e=()=>m(null),t=t=>{i.current?.contains(t.target)||e()},n=t=>{t.key===`Escape`&&!yS(t.target)&&e()};return document.addEventListener(`mousedown`,t),document.addEventListener(`keydown`,n),()=>{document.removeEventListener(`mousedown`,t),document.removeEventListener(`keydown`,n)}},[p?.pinned]),(0,v.useEffect)(()=>()=>clearTimeout(o.current),[]);let g=[],_=h.filter(e=>s.has(e.key)).map(e=>({item:e,top:s.get(e.key)*d.track})).sort((e,t)=>e.top-t.top||e.item.line-t.item.line||e.item.rank-t.item.rank);for(let{item:e,top:t}of _){let n=g[g.length-1];n&&t-n.top<mS?n.items.push(e):g.push({key:e.key,top:t,items:[e]})}let y=e.filter(e=>e.anchor===null),b=y.length+t.length,x=e=>{clearTimeout(o.current),m(t=>t?.key===e?t:{key:e,pinned:!1})},S=()=>{clearTimeout(o.current),o.current=setTimeout(()=>m(e=>e?.pinned?e:null),hS)},C=e=>{clearTimeout(o.current),m({key:e,pinned:!0})},w=e=>{let t=e.items[0].anchor;t&&n.current?.querySelector(t)?.scrollIntoView({block:`center`}),C(e.key)},T=e=>{let t=r.current,n=a.current;if(e.button!==0||e.target!==e.currentTarget||!t||!n)return;let i=n.getBoundingClientRect();t.scrollTop=Math.min(Math.max((e.clientY-i.top)/i.height,0),1)*t.scrollHeight-t.clientHeight/2},ee=null;p?.key===vS&&b>0&&(ee={y:20,content:(0,O.jsxs)(O.Fragment,{children:[t.length>0&&(0,O.jsxs)(`section`,{className:`zen-popover-section`,children:[(0,O.jsx)(`h3`,{className:`block-title`,children:`Sur le fichier entier`}),t.map(e=>(0,O.jsx)(Gm,{note:e},e.id))]}),y.length>0&&(0,O.jsxs)(`section`,{className:`zen-popover-section`,children:[(0,O.jsx)(`h3`,{className:`block-title`,children:`Hors des lignes affichées du diff`}),y.map(e=>(0,O.jsx)(v.Fragment,{children:e.content},e.key))]})]})});let E=p===null?void 0:g.find(e=>e.key===p.key);return E&&(ee={y:d.trackTop+E.top,content:E.items.map(e=>(0,O.jsx)(v.Fragment,{children:e.content},e.key))}),(0,O.jsxs)(`aside`,{className:`zen-rail`,ref:i,"aria-label":`Repères des constats, explications et remarques`,children:[(0,O.jsx)(`div`,{className:`zen-rail-slot`,children:b>0&&(0,O.jsxs)(`button`,{type:`button`,className:`zen-rail-group${p?.key===vS?` is-open`:``}`,title:`Remarques sur le fichier et cartes hors des lignes affichées`,"aria-label":W(b,`élément hors du diff`,`éléments hors du diff`),onPointerEnter:()=>x(vS),onPointerLeave:S,onFocus:()=>x(vS),onBlur:S,onClick:()=>C(vS),children:[(0,O.jsx)(U,{name:`list`,color:`#9aa1b1`}),(0,O.jsx)(`span`,{className:`zen-rail-group-count`,children:b})]})}),(0,O.jsxs)(`div`,{className:`zen-rail-track`,ref:a,onPointerDown:T,children:[l&&(0,O.jsx)(`div`,{className:`zen-rail-view`,style:{top:`${l.top*100}%`,height:`${l.height*100}%`}}),g.map(e=>{let t=e.items.find(e=>e.kind===`finding`)??e.items[0];return(0,O.jsx)(`button`,{type:`button`,className:`zen-marker is-${t.kind}${p?.key===e.key?` is-open`:``}`,style:{top:e.top,"--marker":t.color},"aria-label":e.items.map(e=>e.label).join(` ; `),onPointerEnter:()=>x(e.key),onPointerLeave:S,onFocus:()=>x(e.key),onBlur:S,onClick:()=>w(e),children:e.items.length>1&&(0,O.jsx)(`span`,{className:`zen-marker-count`,children:e.items.length})},e.key)})]}),ee&&p&&(0,O.jsx)(`div`,{className:`zen-popover`,style:(e=>e>d.root/2?{bottom:Math.max(d.root-e-gS,_S),maxHeight:e+gS-_S}:{top:Math.max(e-gS,_S),maxHeight:d.root-Math.max(e-gS,_S)-_S})(ee.y),onPointerEnter:()=>x(p.key),onPointerLeave:S,onPointerDown:()=>C(p.key),children:ee.content})]})}function xS({width:e,setWidth:t,containerRef:n}){let[r,i]=(0,v.useState)(!1),a=e=>uS(e-(n.current?.getBoundingClientRect().left??0));return(0,O.jsx)(`div`,{className:`files-panel-resizer${r?` is-dragging`:``}`,style:{left:e},role:`separator`,"aria-orientation":`vertical`,"aria-label":`Largeur de la liste des fichiers`,"aria-valuenow":e,"aria-valuemin":cS.min,"aria-valuemax":cS.max,tabIndex:0,title:`Glisser pour régler la largeur · double-clic pour la largeur par défaut`,onPointerDown:e=>{e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),i(!0)},onPointerMove:e=>{let t=n.current;if(!r||!t)return;let i=a(e.clientX);t.style.gridTemplateColumns=`${i}px minmax(0, 1fr)`,e.currentTarget.style.left=`${i}px`},onPointerUp:e=>{r&&(i(!1),t(a(e.clientX)))},onDoubleClick:()=>t(cS.default),onKeyDown:e=>{e.key===`ArrowLeft`&&t(e=>e-16),e.key===`ArrowRight`&&t(e=>e+16)}})}function SS({analysis:e}){let t=H(e=>e.gapsCollapsed),n=H(e=>e.setGapsCollapsed),r=Yd(e);if(r.length===0)return null;let i=r.filter(e=>e.status===`open`).length;return(0,O.jsxs)(`section`,{className:`gap-banner${t?` is-collapsed`:``}`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`gap-banner-toggle block-title`,"aria-expanded":!t,onClick:()=>n(!t),children:[(0,O.jsx)(U,{name:t?`chevron-right`:`chevron-down`,color:`#646b7b`}),(0,O.jsx)(U,{name:`triangle-alert`,color:`#e3a33b`}),W(r.length,`exigence manquante`,`exigences manquantes`),i!==r.length&&(0,O.jsxs)(`span`,{className:`gap-banner-count`,children:[`· `,W(i,`ouverte`)]})]}),!t&&r.map(t=>(0,O.jsx)(Wm,{analysis:e,finding:t},t.id))]})}function CS({file:e}){return e.binary?(0,O.jsxs)(`p`,{className:`diff-message`,children:[`Fichier binaire (`,Mu[e.status].toLowerCase(),`) : son contenu n'est pas affiché.`]}):e.status===`renamed`?(0,O.jsxs)(`p`,{className:`diff-message`,children:[`Fichier renommé depuis `,e.oldPath,` sans changement de contenu.`]}):(0,O.jsx)(`p`,{className:`diff-message`,children:`Aucune ligne modifiée dans ce fichier (changement de mode ou fichier vide).`})}function wS({file:e}){let{folder:t,name:n}=Vu(e.path);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`span`,{className:`file-head-path mono`,title:e.oldPath?`${e.oldPath} → ${e.path}`:e.path,children:[(0,O.jsx)(`span`,{className:`path-folder`,children:t}),(0,O.jsx)(`span`,{className:`file-head-name`,children:n})]}),(0,O.jsxs)(`span`,{className:`count-add mono`,children:[`+`,e.additions]}),(0,O.jsxs)(`span`,{className:`count-del mono`,children:[`−`,e.deletions]}),e.status!==`modified`&&(0,O.jsx)(`span`,{className:`tag tag-file-${e.status}`,children:Mu[e.status]})]})}function TS({analysis:e,file:t,onFileNote:n}){let r=H(e=>e.setFileReviewed),i=H(e=>e.saving),a=Ld(e.files),o=a.findIndex(e=>e.path===t.path),s=a[o-1],c=a[o+1];return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`button`,{type:`button`,className:`link-button muted`,onClick:n,children:[(0,O.jsx)(U,{name:`message-square`,size:13}),`Remarque sur le fichier`]}),(0,O.jsxs)(`div`,{className:`icon-button-group`,children:[(0,O.jsx)(`button`,{type:`button`,className:`icon-button`,disabled:!s,title:s?`Fichier précédent : ${s.path}`:`Premier fichier`,onClick:()=>s&&T(w.review(e.id,s.path)),children:(0,O.jsx)(U,{name:`arrow-left`,color:`#9aa1b1`})}),(0,O.jsx)(`button`,{type:`button`,className:`icon-button`,disabled:!c,title:c?`Fichier suivant : ${c.path}`:`Dernier fichier`,onClick:()=>c&&T(w.review(e.id,c.path)),children:(0,O.jsx)(U,{name:`arrow-right`,color:`#9aa1b1`})})]}),(0,O.jsxs)(`button`,{type:`button`,className:`button button-secondary reviewed-toggle${t.reviewed?` is-on`:``}`,"aria-pressed":t.reviewed,disabled:i,onClick:()=>void r(t.path,!t.reviewed),children:[(0,O.jsx)(U,{name:`square-check`,color:t.reviewed?`#3fb950`:`#9aa1b1`}),t.reviewed?`Revu`:`Marquer comme revu`]})]})}function ES({analysis:e,file:t,onFileNote:n}){let r=H(e=>e.filesPanelCollapsed),i=H(e=>e.setFilesPanelCollapsed),a=H(e=>e.setZenMode);return(0,O.jsxs)(`div`,{className:`file-head`,children:[(0,O.jsxs)(`div`,{className:`icon-button-group file-head-toggles`,children:[(0,O.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-pressed":!r,title:r?`Afficher la liste des fichiers`:`Masquer la liste des fichiers`,onClick:()=>i(!r),children:(0,O.jsx)(U,{name:r?`panel-left-open`:`panel-left-close`,color:`#9aa1b1`})}),(0,O.jsx)(`button`,{type:`button`,className:`icon-button`,title:`Mode zen : le code sur toute la page`,onClick:()=>a(!0),children:(0,O.jsx)(U,{name:`maximize`,color:`#9aa1b1`})})]}),(0,O.jsx)(wS,{file:t}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsx)(TS,{analysis:e,file:t,onFileNote:n})]})}function DS({analysis:e,file:t,menus:n}){let r=H(e=>e.setZenMode);return(0,O.jsxs)(`header`,{className:`file-head zen-bar`,children:[(0,O.jsx)(`a`,{className:`brand-mark`,href:w.home(),title:`Feature Analyzer — accueil`,children:(0,O.jsx)(U,{name:`scan-search`,color:`#8b97ff`})}),(0,O.jsx)(`span`,{className:`zen-bar-separator`,"aria-hidden":`true`}),(0,O.jsx)(wS,{file:t}),(0,O.jsx)(`div`,{className:`zen-bar-menus`,children:n}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsx)(Eu,{analysis:e}),(0,O.jsx)(`button`,{type:`button`,className:`icon-button is-on`,"aria-pressed":!0,title:`Quitter le mode zen`,onClick:()=>r(!1),children:(0,O.jsx)(U,{name:`minimize`,color:`#8b97ff`})}),(0,O.jsx)(k,{analysis:e})]})}function OS({analysis:e,path:t,line:n}){let r=H(e=>e.diff),i=H(e=>e.diffError),a=H(e=>e.fixMode),o=H(e=>e.setFixMode),s=H(e=>e.codeView),c=H(e=>e.setCodeView),l=H(e=>e.diffScope),u=H(e=>e.setDiffScope),d=H(e=>e.copy),f=H(e=>e.findingsShown),p=H(e=>e.setFindingsShown),m=H(e=>e.explanationsShown),h=H(e=>e.setExplanationsShown),g=H(e=>e.filesPanelCollapsed),_=H(e=>e.zenMode),y=pS(),b=(0,v.useRef)(null),[x,S]=(0,v.useState)(null),C=x&&x.path===t?{line:x.line,findingId:x.findingId}:null,ee=e=>S(e&&t!==null?{path:t,...e}:null),[E,te]=(0,v.useState)({}),[D,k]=(0,v.useState)({}),[ne,re]=(0,v.useState)(null),ie=(0,v.useRef)(null),ae=(0,v.useRef)(null),oe=Ud(e);(0,v.useEffect)(()=>{t===null&&oe!==null&&T(w.review(e.id,oe),{replace:!0})},[t,oe,e.id]);let se=e.files.find(e=>e.path===t)??null,ce=r?.id===e.id?r.snapshot.files.find(e=>e.path===t):void 0,le=ce!==void 0&&ce.newContent!==null,A=le?l:`changes`,ue=(0,v.useMemo)(()=>A===`file`&&ce?Hm(ce)??void 0:ce,[A,ce]),de=t===null?void 0:D[t],fe=(0,v.useMemo)(()=>A===`changes`&&ce?Pm(ce,de??[]):null,[A,ce,de]),pe=fe?.fileDiff??ue,me=(e,n)=>{if(t===null||!fe)return;let r=Fm(fe,e,n);k(e=>({...e,[t]:r}))},he=i!==null&&r?.id!==e.id,ge=t===null?[]:Nl(e,t),_e=f?ge:[],ve=Bl(_e,pe??{path:t??``,hunks:[],newContent:null},e=>E[e.id]??(e.suggestion!==null&&e.status===`open`),a),ye=Wl(_e,ve,a),j=n===null?null:Gl(n,ye),M=j===null?null:Vl(j),be=ne!==null&&ne.path===t&&ne.line===n?ne.findingId:null,xe=ne?.seq??0;if((0,v.useEffect)(()=>{let e=ie.current;ue&&e&&(M===null?e.scrollTo({top:0}):(e.querySelector(M)?.scrollIntoView({block:`center`}),be!==null&&e.querySelector(`[data-finding-card="${CSS.escape(be)}"]`)?.scrollIntoView({block:`nearest`})))},[ue,M,t,be,xe]),t===null)return(0,O.jsx)(`div`,{className:`page`,children:(0,O.jsx)(`p`,{className:`empty-text`,children:`L'analyse ne contient aucun fichier modifié : il n'y a rien à revoir.`})});let Se=Xl(e,t),Ce=m?Se:[],we=pe?$l(pe,_e,ve,a,Ce,s):[],N=pe?Pl(pe):he?new Set:null,Te=su(e,t),Ee=new Set(Te.map(e=>e.location.line)),De=(e,t)=>te(n=>({...n,[e]:t})),Oe=n=>{re(e=>({path:t,findingId:n.finding.id,line:n.startLine,seq:(e?.seq??0)+1})),T(w.review(e.id,t,n.startLine))},ke=(t,n)=>(0,O.jsxs)(`div`,{className:`review-center`,ref:ae,children:[f&&(0,O.jsx)(SS,{analysis:e}),!t.contentAvailable&&!t.binary&&t.status!==`deleted`&&(0,O.jsx)(`p`,{className:`diff-notice`,children:`Fichier trop volumineux pour être conservé en entier : les remarques ne peuvent viser que le fichier entier.`}),he?(0,O.jsx)(`p`,{className:`diff-message is-error`,children:i}):pe?ce?.hunks.length===0?(0,O.jsx)(CS,{file:t}):(0,O.jsx)(Rx,{file:t,fileDiff:pe,hunks:we,hunkContexts:fe?.hunks??null,addedContext:fe?.added??null,onContextChange:me,findings:_e,notedLines:Ee,scrollRef:ie,mode:a,onModeChange:o,codeView:s,onCodeViewChange:c,scope:A,onScopeChange:u,wholeFileAvailable:le,explained:Ce.length>0,target:j,onLineNote:e=>ee({line:e,findingId:null}),onHideFix:e=>De(e,!1),onRequestExplanation:n=>void d(Bm(e,t,n),`Demande d'explication copiée : collez-la dans la conversation de l'agent.`),zen:n}):(0,O.jsx)(`p`,{className:`diff-message`,children:`Chargement du diff…`})]}),Ae=()=>ee({line:null,findingId:null});if(se!==null&&Xd(_,e,t)){let t=N===null?[]:Ux({analysis:e,file:se,numbered:_e,explanations:Ce,fileDiff:pe??null,fixes:ve,mode:a,codeView:s,removed:ye,lineNotes:Te,shown:N,setComposer:ee,onToggleFix:De,revealedId:be});return(0,O.jsxs)(`div`,{className:`zen`,children:[(0,O.jsx)(DS,{analysis:e,file:se,menus:(0,O.jsx)(bx,{scope:A,onScopeChange:u,wholeFileAvailable:le,codeView:s,onCodeViewChange:c,mode:a,onModeChange:o})}),(0,O.jsxs)(`div`,{className:`zen-main`,children:[(0,O.jsx)(`div`,{className:`review-body`,ref:ie,children:ke(se,!0)}),(0,O.jsx)(bS,{items:t,fileNotes:Hx(e,se),scopeRef:ae,scrollRef:ie}),(0,O.jsxs)(`div`,{className:`zen-dock`,children:[C!==null&&(0,O.jsx)(`div`,{className:`zen-composer`,children:(0,O.jsx)(Xm,{path:se.path,line:C.line,findingId:C.findingId,onClose:()=>ee(null)},`${C.line??`file`}-${C.findingId??``}`)}),(0,O.jsx)(`div`,{className:`zen-actions`,children:(0,O.jsx)(TS,{analysis:e,file:se,onFileNote:Ae})})]})]})]})}let je=g&&se!==null;return(0,O.jsxs)(`div`,{className:`review${je?` is-files-hidden`:``}`,ref:b,style:je?void 0:{gridTemplateColumns:`${y.width}px minmax(0, 1fr)`},children:[!je&&(0,O.jsx)(sS,{analysis:e,currentPath:t}),!je&&(0,O.jsx)(xS,{width:y.width,setWidth:y.setWidth,containerRef:b}),(0,O.jsx)(`section`,{className:`review-main`,children:se===null?(0,O.jsx)(`div`,{className:`review-body review-body-padded`,children:(0,O.jsxs)(`p`,{className:`diff-message`,children:[`Le fichier « `,t,` » ne fait pas partie de cette analyse. Choisissez un fichier dans la liste.`]})}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(ES,{analysis:e,file:se,onFileNote:Ae}),(0,O.jsx)($x,{file:se}),(0,O.jsx)(`div`,{className:`review-body`,ref:ie,children:(0,O.jsxs)(`div`,{className:`review-columns`,children:[ke(se,!1),(0,O.jsx)(Zx,{analysis:e,file:se,numbered:_e,explanations:Ce,filters:{findingCount:ge.length,explanationCount:Se.length,findingsShown:f,explanationsShown:m,onFindingsShownChange:p,onExplanationsShownChange:h},fileDiff:pe??null,fixes:ve,mode:a,codeView:s,removed:ye,lineNotes:Te,shownLines:N,composer:C,setComposer:ee,onToggleFix:De,scopeRef:ae,scrollRef:ie,onReveal:Oe,revealedId:be})]})})]})})]})}function kS(e){return e.name===`feature`||e.name===`review`||e.name===`finish`?e.id:null}function AS({children:e}){return(0,O.jsx)(`div`,{className:`empty-state`,children:(0,O.jsx)(`div`,{className:`empty-card`,children:e})})}function jS(){kd();let e=te(),t=H(e=>e.current),n=H(e=>e.openAnalysis),r=H(e=>e.zenMode),i=kS(e);(0,v.useEffect)(()=>{i&&n(i)},[i,n]);let a=t&&t.id===i?t.analysis:null,o=t&&t.id===i?t.error:null,s=t&&t.id===i?t.links:null,c=e.name===`review`&&a!==null&&Xd(r,a,e.path),l=e.name===`review`&&a?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Eu,{analysis:a}),(0,O.jsx)(k,{analysis:a})]}):null,u;return u=e.name===`home`?(0,O.jsx)(Am,{}):e.name===`not_found`?(0,O.jsx)(AS,{children:(0,O.jsxs)(`p`,{children:[`Adresse inconnue : `,(0,O.jsx)(`code`,{children:e.hash}),`. `,(0,O.jsx)(`a`,{href:w.home(),children:`Revenir à l'accueil`}),`.`]})}):o?(0,O.jsxs)(AS,{children:[(0,O.jsxs)(`p`,{className:`error-text`,children:[`Analyse illisible : `,o]}),(0,O.jsx)(`p`,{children:(0,O.jsx)(`a`,{href:w.home(),children:`Revenir à l'accueil`})})]}):a?e.name===`feature`?(0,O.jsx)(vm,{analysis:a,links:s,tab:e.tab}):e.name===`review`?(0,O.jsx)(OS,{analysis:a,path:e.path,line:e.line}):(0,O.jsx)(Sm,{analysis:a},a.id):(0,O.jsx)(AS,{children:(0,O.jsx)(`p`,{children:`Chargement de l'analyse…`})}),(0,O.jsxs)(`div`,{className:`app`,children:[!c&&(0,O.jsx)(Td,{currentId:i,action:l}),(0,O.jsx)(`main`,{className:`main${e.name===`review`?` main-fixed`:``}`,children:u}),(0,O.jsx)(Tu,{})]})}(0,y.createRoot)(document.getElementById(`root`)).render((0,O.jsx)(v.StrictMode,{children:(0,O.jsx)(jS,{})}));export{s as t};
|
|
87
|
+
`)?e:o)},i.current()}),(0,v.useEffect)(()=>{let n=e.current,r=t.current;if(!n||!r)return;let a=()=>i.current();n.addEventListener(`scroll`,a,{passive:!0});let o=new ResizeObserver(a);return o.observe(n),o.observe(r),()=>{n.removeEventListener(`scroll`,a),o.disconnect()}},[e,t]),n}var Kx=12;function qx(e){let t=[],n=-12;for(let r of e){let e=Math.max(r.anchorTop,n+Kx,0);t.push(e),n=e+r.height}return t}function Jx(e,t){(0,v.useLayoutEffect)(()=>{let n=e.current,r=t.current;if(!n||!r)return;let i=[...n.querySelectorAll(`:scope > [data-anchor]`)],a=()=>{let e=n.getBoundingClientRect().top,t=i.map(t=>{let n=r.querySelector(t.dataset.anchor);if(!n)throw Error(`Ancre introuvable dans le diff : ${t.dataset.anchor}`);return{anchorTop:n.getBoundingClientRect().top-e,height:t.offsetHeight}}),a=qx(t);i.forEach((e,n)=>{e.style.top=`${a[n]}px`,e.style.setProperty(`--shift`,`${a[n]-t[n].anchorTop}px`)});let o=i.length-1;n.style.minHeight=o<0?``:`${a[o]+t[o].height}px`};a();let o=new ResizeObserver(a);o.observe(r);for(let e of i)o.observe(e);return()=>o.disconnect()})}function Yx({filters:e}){let t=[{key:`findings`,label:`Constats`,count:e.findingCount,shown:e.findingsShown,color:`#e3a33b`,onChange:e.onFindingsShownChange},{key:`explanations`,label:`Explications`,count:e.explanationCount,shown:e.explanationsShown,color:`#3cc4b4`,onChange:e.onExplanationsShownChange}];return(0,O.jsx)(`div`,{className:`margin-filters`,role:`group`,"aria-label":`Éléments affichés`,children:t.map(e=>(0,O.jsxs)(`button`,{type:`button`,className:`margin-filter${e.shown?` is-on`:``}`,style:{"--filter":e.color},"aria-pressed":e.shown,title:e.shown?`Masquer les ${e.label.toLowerCase()}`:`Afficher les ${e.label.toLowerCase()}`,onClick:()=>e.onChange(!e.shown),children:[(0,O.jsx)(`span`,{className:`margin-filter-dot`,"aria-hidden":`true`}),e.label,(0,O.jsx)(`span`,{className:`margin-filter-count`,children:e.count})]},e.key))})}function Xx({numbered:e,onReveal:t}){return(0,O.jsx)(`nav`,{className:`margin-index`,"aria-label":`Index des constats du fichier`,children:e.map(e=>{let{finding:n}=e,r=n.status===`open`?``:` · ${Au[n.status].toLowerCase()}`;return(0,O.jsxs)(`button`,{type:`button`,className:`margin-index-item${n.status===`open`?``:` is-muted`}`,style:{color:Du[n.severity].color},title:`${n.title} · ${td(e.startLine,e.endLine)}${r}`,onClick:()=>t(e),children:[(0,O.jsx)(ah,{entry:e,small:!0}),(0,O.jsxs)(`span`,{className:`mono`,children:[`l.`,e.startLine]})]},n.id)})})}function Zx({analysis:e,file:t,numbered:n,explanations:r,filters:i,fileDiff:a,fixes:o,mode:s,codeView:c,removed:l,lineNotes:u,shownLines:d,composer:f,setComposer:p,onToggleFix:m,scopeRef:h,scrollRef:g,onReveal:_,revealedId:y}){let b=(0,v.useRef)(null),x=(0,v.useRef)(null);Jx(x,h);let S=Gx(g,b),C=S.length===0?void 0:n.find(e=>e.finding.id===S[0]),w=d??new Set,T=Hx(e,t),ee=e=>(0,O.jsx)(Xm,{path:t.path,line:e,findingId:f?.findingId??null,onClose:()=>p(null)}),E=Ux({analysis:e,file:t,numbered:n,explanations:r,fileDiff:a,fixes:o,mode:s,codeView:c,removed:l,lineNotes:u,shown:w,setComposer:p,onToggleFix:m,revealedId:y}),te=[],D=[];for(let e of E)e.anchor===null?D.push((0,O.jsx)(`div`,{children:e.content},e.key)):te.push({...e,anchor:e.anchor});let k=f?.line??null,ne=f!==null&&k!==null&&w.has(k);if(ne){let e=Gl(k,l);te.push({key:`composer`,anchor:Vl(e),line:Hl(e),rank:2e3,color:`#6d7cff`,content:ee(k)})}f!==null&&k!==null&&!ne&&D.push((0,O.jsx)(`div`,{children:ee(k)},`composer`)),te.sort((e,t)=>e.line-t.line||e.rank-t.rank);let re=n.length===0&&r.length===0&&u.length===0&&T.length===0&&f===null,ie=(i.findingsShown?0:i.findingCount)+(i.explanationsShown?0:i.explanationCount),ae=n.filter(e=>e.finding.status===`open`).length;return(0,O.jsxs)(`aside`,{className:`margin-column`,"aria-label":`Constats et explications de ce fichier`,ref:b,children:[(0,O.jsxs)(`div`,{className:`margin-head`,children:[(0,O.jsxs)(`h2`,{className:`margin-title`,children:[`Constats et explications`,` `,i.findingsShown&&(0,O.jsxs)(`span`,{className:`margin-count`,title:`Constats ouverts de ce fichier ; le total compte aussi les constats ignorés et obsolètes.`,children:[W(ae,`constat ouvert`,`constats ouverts`),n.length!==ae&&` · ${n.length} au total`]})]}),(0,O.jsx)(Yx,{filters:i}),re&&ie>0?(0,O.jsxs)(`p`,{className:`margin-subtitle`,children:[W(ie,`élément masqué`,`éléments masqués`),` sur ce fichier : affichez-les avec les boutons ci-dessus.`]}):re?(0,O.jsx)(`p`,{className:`margin-subtitle`,children:`Aucun constat, explication ni remarque sur ce fichier. Cliquez sur un numéro de ligne pour ajouter une remarque.`}):(0,O.jsx)(`p`,{className:`margin-subtitle is-aligned-hint`,children:`Chaque carte est alignée sur les lignes qu'elle concerne.`}),n.length>0&&(0,O.jsx)(Xx,{numbered:n,onReveal:_})]}),(T.length>0||f?.line===null)&&(0,O.jsxs)(`section`,{className:`margin-section`,children:[(0,O.jsx)(`h3`,{className:`block-title`,children:`Sur le fichier entier`}),T.map(e=>(0,O.jsx)(Gm,{note:e},e.id)),f?.line===null&&ee(null)]}),d!==null&&D.length>0&&(0,O.jsxs)(`section`,{className:`margin-section`,children:[(0,O.jsx)(`h3`,{className:`block-title`,children:`Hors des lignes affichées du diff`}),D]}),(0,O.jsx)(`div`,{className:`margin-track`,ref:x,children:d!==null&&te.map(e=>(0,O.jsxs)(`div`,{className:`margin-item`,"data-anchor":e.anchor,style:{"--link":e.color},children:[(0,O.jsx)(`span`,{className:`margin-link-a`,"aria-hidden":`true`}),(0,O.jsx)(`span`,{className:`margin-link-b`,"aria-hidden":`true`}),e.content]},e.key))}),C&&(0,O.jsxs)(`button`,{type:`button`,className:`margin-more`,onClick:()=>_(C),children:[W(S.length,`constat`),` plus bas ↓`]})]})}var Qx={central:`target`,check:`eye`,skim:`chevrons-right`};function $x({file:e}){let t=H(e=>e.setFileLevel),n=e.classification,r=Fd(e);if(n===null||r===null)return null;let i=Object.fromEntries(Object.keys(Pu).map(e=>[e,{icon:Qx[e],label:Pu[e].label,description:e===n.level?`${Pu[e].description} · choix de l'agent`:Pu[e].description}]));return(0,O.jsxs)(`div`,{className:`classification-bar`,children:[(0,O.jsxs)(`span`,{className:`level-chip is-${r}`,children:[(0,O.jsx)(U,{name:Qx[r]}),Pu[r].label]}),(0,O.jsx)(`span`,{className:`classification-reason`,title:n.reason,children:n.reason}),n.reviewerLevel!==null&&(0,O.jsxs)(`span`,{className:`classification-override`,children:[`Reclassé par vous · l'agent proposait `,Pu[n.level].label]}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsx)(ch,{label:`Niveau de ce fichier`,options:i,value:r,onChange:n=>{n!==r&&t(e.path,n)},trigger:{icon:`arrow-up-down`,label:`Reclasser`}})]})}function eS(e){return e===`unclassified`?`Non classés`:Pu[e].label}function tS({name:e}){let{head:t,tail:n}=Xu(e);return(0,O.jsxs)(`span`,{className:`middle-ellipsis`,children:[(0,O.jsx)(`span`,{className:`middle-ellipsis-head`,children:t}),(0,O.jsx)(`span`,{className:`middle-ellipsis-tail`,children:n})]})}function nS({analysis:e,file:t,current:n}){let r=t.reviewed?`circle-check`:n?`circle-dot`:`circle`,i=t.reviewed?`#3fb950`:n?`#8b97ff`:`#3a4050`,a=Jd(e,t.path);return(0,O.jsxs)(`div`,{className:`files-item${n?` is-current`:``}${t.reviewed?` is-reviewed`:``}`,children:[(0,O.jsxs)(`a`,{href:w.review(e.id,t.path),className:`files-item-link`,title:t.path,"aria-current":n?`page`:void 0,children:[(0,O.jsx)(U,{name:r,color:i}),(0,O.jsx)(`span`,{className:`files-item-name`,children:(0,O.jsx)(tS,{name:Vu(t.path).name})})]}),qd(e,t.path).map(({severity:n,count:r,firstLine:i})=>(0,O.jsx)(yd,{severity:n,count:r,href:w.review(e.id,t.path,i),title:`${Yu(n,r)} — ${r>1?`aller au premier`:`y aller`}`},n)),a&&(0,O.jsx)(bd,{count:a.count,href:w.review(e.id,t.path,a.firstLine??void 0),title:a.firstLine===null?`${W(a.count,`remarque`)} sur le fichier — y aller`:`${W(a.count,`remarque`)} — ${a.count>1?`aller à la première`:`y aller`}`}),(0,O.jsx)(`span`,{className:`files-item-status mono is-${t.status}`,title:Mu[t.status],children:Nu[t.status]})]})}function rS({analysis:e,files:t,currentPath:n}){return(0,O.jsx)(`nav`,{className:`files-list`,children:t.map((r,i)=>{let a=Vu(r.path).folder,o=i===0?a!==``:Vu(t[i-1].path).folder!==a;return(0,O.jsxs)(v.Fragment,{children:[o&&(0,O.jsx)(`span`,{className:`files-group mono`,title:a||`racine du dépôt`,children:a||`./`}),(0,O.jsx)(nS,{analysis:e,file:r,current:r.path===n})]},r.path)})})}function iS({analysis:e,tab:t,onChange:n,skimAlert:r}){let i=zd.filter(t=>t!==`unclassified`||Vd(e,t).length>0);return(0,O.jsx)(`div`,{className:`level-tabs`,role:`tablist`,"aria-label":`Niveaux de relecture`,children:i.map(i=>(0,O.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":i===t,className:`level-tab${i===t?` is-active`:``}`,title:i===`unclassified`?`Fichiers que l'agent n'a pas classés`:Pu[i].description,onClick:()=>n(i),children:[eS(i),(0,O.jsx)(`span`,{className:`level-tab-count`,children:Vd(e,i).length}),i===`skim`&&r&&(0,O.jsx)(`span`,{className:`level-tab-alert`,"aria-label":`un fichier en survol a un constat`})]},i))})}function aS({analysis:e,tab:t,onOpen:n}){let r=zd.slice(zd.indexOf(t)+1).find(t=>Vd(e,t).length>0);if(r===void 0)return null;let i=Vd(e,r).length;return(0,O.jsxs)(`button`,{type:`button`,className:`level-card level-next`,onClick:()=>n(r),children:[(0,O.jsxs)(`span`,{className:`level-card-text`,children:[(0,O.jsx)(`span`,{className:`level-card-label`,children:`Ensuite`}),(0,O.jsxs)(`span`,{className:`level-card-title`,children:[eS(r),` · `,W(i,`fichier`)]})]}),(0,O.jsx)(U,{name:`arrow-right`,color:`#9aa1b1`})]})}function oS({analysis:e,files:t}){return(0,O.jsxs)(`div`,{className:`level-card level-alert`,children:[(0,O.jsx)(U,{name:`circle-alert`,color:`#e3a33b`}),(0,O.jsxs)(`span`,{className:`level-card-text`,children:[(0,O.jsx)(`span`,{className:`level-alert-title`,children:t.length>1?`${t.length} fichiers en survol ont un constat`:`Un fichier en survol a un constat`}),t.map(t=>(0,O.jsx)(`a`,{className:`level-alert-link`,href:w.review(e.id,t.path),title:t.path,children:Vu(t.path).name},t.path))]})]})}function sS({analysis:e,currentPath:t}){let n=e.files.find(e=>e.path===t),r=n?Bd(n):null,[i,a]=(0,v.useState)(r??`central`);(0,v.useEffect)(()=>{r!==null&&a(r)},[t,r]);let o=Rd(e),s=Gd(e);return(0,O.jsxs)(`aside`,{className:`files-panel`,children:[(0,O.jsxs)(`div`,{className:`files-panel-head`,children:[(0,O.jsx)(`span`,{className:`files-panel-title`,children:`Fichiers`}),(0,O.jsx)(`span`,{className:`files-panel-count`,children:e.files.length})]}),o?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(iS,{analysis:e,tab:i,onChange:a,skimAlert:s.length>0}),(0,O.jsx)(rS,{analysis:e,files:Vd(e,i),currentPath:t}),(0,O.jsxs)(`div`,{className:`level-cards`,children:[(0,O.jsx)(aS,{analysis:e,tab:i,onOpen:t=>{a(t);let n=Wd(e,t);n!==null&&T(w.review(e.id,n))}}),i!==`skim`&&s.length>0&&(0,O.jsx)(oS,{analysis:e,files:s})]})]}):(0,O.jsx)(rS,{analysis:e,files:e.files,currentPath:t})]})}var cS={storageKey:`feature-analyzer.files-panel-width`,default:280,min:200,max:600},lS={storageKey:`feature-analyzer.findings-panel-width`,default:400,min:280,max:720};function uS(e,t){return Math.round(Math.min(Math.max(t,e.min),e.max))}function dS(e){try{let t=Number(window.localStorage.getItem(e.storageKey));return t>0?uS(e,t):e.default}catch{return e.default}}function fS(e,t){try{window.localStorage.setItem(e.storageKey,String(t))}catch{}}function pS(e){let[t,n]=(0,v.useState)(()=>dS(e)),r=(0,v.useRef)(t);return{width:t,setWidth:(0,v.useCallback)(t=>{let i=uS(e,typeof t==`function`?t(r.current):t);r.current=i,n(i),fS(e,i)},[e])}}function mS({setting:e,side:t,label:n,width:r,setWidth:i,containerRef:a,preview:o}){let[s,c]=(0,v.useState)(!1),l=n=>{let i=a.current?.getBoundingClientRect();return i?uS(e,t===`left`?n-i.left:i.right-n):r},u=t===`left`?`ArrowRight`:`ArrowLeft`,d=t===`left`?`ArrowLeft`:`ArrowRight`;return(0,O.jsx)(`div`,{className:`panel-resizer is-${t}${s?` is-dragging`:``}`,style:{[t]:r},role:`separator`,"aria-orientation":`vertical`,"aria-label":n,"aria-valuenow":r,"aria-valuemin":e.min,"aria-valuemax":e.max,tabIndex:0,title:`Glisser pour régler la largeur · double-clic pour la largeur par défaut`,onPointerDown:e=>{e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),c(!0)},onPointerMove:e=>{let n=a.current;if(!s||!n)return;let r=l(e.clientX);o(n,r),e.currentTarget.style[t]=`${r}px`},onPointerUp:e=>{s&&(c(!1),i(l(e.clientX)))},onDoubleClick:()=>i(e.default),onKeyDown:e=>{e.key===u&&i(e=>e+16),e.key===d&&i(e=>e-16)}})}var hS=14,gS=200,_S=22,vS=8,yS=`unplaced`;function bS(e){return e instanceof HTMLElement&&(e.isContentEditable||[`INPUT`,`TEXTAREA`,`SELECT`].includes(e.tagName))}function xS({items:e,fileNotes:t,scopeRef:n,scrollRef:r}){let i=(0,v.useRef)(null),a=(0,v.useRef)(null),o=(0,v.useRef)(void 0),[s,c]=(0,v.useState)(new Map),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)({root:0,track:0,trackTop:0}),[p,m]=(0,v.useState)(null),h=e.filter(e=>e.anchor!==null);(0,v.useLayoutEffect)(()=>{let e=r.current,t=n.current,o=i.current,s=a.current;if(!e||!t||!o||!s)return;let l=()=>{let t=e.scrollHeight,n=t>0?{top:e.scrollTop/t,height:e.clientHeight/t}:null;u(e=>e?.top===n?.top&&e?.height===n?.height?e:n)},d=()=>{let n=e.scrollHeight,r=e.getBoundingClientRect().top-e.scrollTop,i=new Map;for(let e of h){let a=t.querySelector(e.anchor);if(!a)throw Error(`Ancre introuvable dans le diff : ${e.anchor}`);n>0&&i.set(e.key,(a.getBoundingClientRect().top-r)/n)}c(e=>e.size===i.size&&[...i].every(([t,n])=>e.get(t)===n)?e:i);let a={root:o.offsetHeight,track:s.offsetHeight,trackTop:s.offsetTop};f(e=>e.root===a.root&&e.track===a.track&&e.trackTop===a.trackTop?e:a),l()};d(),e.addEventListener(`scroll`,l,{passive:!0});let p=new ResizeObserver(d);return p.observe(e),p.observe(t),p.observe(o),()=>{e.removeEventListener(`scroll`,l),p.disconnect()}}),(0,v.useEffect)(()=>{if(!p?.pinned)return;let e=()=>m(null),t=t=>{i.current?.contains(t.target)||e()},n=t=>{t.key===`Escape`&&!bS(t.target)&&e()};return document.addEventListener(`mousedown`,t),document.addEventListener(`keydown`,n),()=>{document.removeEventListener(`mousedown`,t),document.removeEventListener(`keydown`,n)}},[p?.pinned]),(0,v.useEffect)(()=>()=>clearTimeout(o.current),[]);let g=[],_=h.filter(e=>s.has(e.key)).map(e=>({item:e,top:s.get(e.key)*d.track})).sort((e,t)=>e.top-t.top||e.item.line-t.item.line||e.item.rank-t.item.rank);for(let{item:e,top:t}of _){let n=g[g.length-1];n&&t-n.top<hS?n.items.push(e):g.push({key:e.key,top:t,items:[e]})}let y=e.filter(e=>e.anchor===null),b=y.length+t.length,x=e=>{clearTimeout(o.current),m(t=>t?.key===e?t:{key:e,pinned:!1})},S=()=>{clearTimeout(o.current),o.current=setTimeout(()=>m(e=>e?.pinned?e:null),gS)},C=e=>{clearTimeout(o.current),m({key:e,pinned:!0})},w=e=>{let t=e.items[0].anchor;t&&n.current?.querySelector(t)?.scrollIntoView({block:`center`}),C(e.key)},T=e=>{let t=r.current,n=a.current;if(e.button!==0||e.target!==e.currentTarget||!t||!n)return;let i=n.getBoundingClientRect();t.scrollTop=Math.min(Math.max((e.clientY-i.top)/i.height,0),1)*t.scrollHeight-t.clientHeight/2},ee=null;p?.key===yS&&b>0&&(ee={y:20,content:(0,O.jsxs)(O.Fragment,{children:[t.length>0&&(0,O.jsxs)(`section`,{className:`zen-popover-section`,children:[(0,O.jsx)(`h3`,{className:`block-title`,children:`Sur le fichier entier`}),t.map(e=>(0,O.jsx)(Gm,{note:e},e.id))]}),y.length>0&&(0,O.jsxs)(`section`,{className:`zen-popover-section`,children:[(0,O.jsx)(`h3`,{className:`block-title`,children:`Hors des lignes affichées du diff`}),y.map(e=>(0,O.jsx)(v.Fragment,{children:e.content},e.key))]})]})});let E=p===null?void 0:g.find(e=>e.key===p.key);return E&&(ee={y:d.trackTop+E.top,content:E.items.map(e=>(0,O.jsx)(v.Fragment,{children:e.content},e.key))}),(0,O.jsxs)(`aside`,{className:`zen-rail`,ref:i,"aria-label":`Repères des constats, explications et remarques`,children:[(0,O.jsx)(`div`,{className:`zen-rail-slot`,children:b>0&&(0,O.jsxs)(`button`,{type:`button`,className:`zen-rail-group${p?.key===yS?` is-open`:``}`,title:`Remarques sur le fichier et cartes hors des lignes affichées`,"aria-label":W(b,`élément hors du diff`,`éléments hors du diff`),onPointerEnter:()=>x(yS),onPointerLeave:S,onFocus:()=>x(yS),onBlur:S,onClick:()=>C(yS),children:[(0,O.jsx)(U,{name:`list`,color:`#9aa1b1`}),(0,O.jsx)(`span`,{className:`zen-rail-group-count`,children:b})]})}),(0,O.jsxs)(`div`,{className:`zen-rail-track`,ref:a,onPointerDown:T,children:[l&&(0,O.jsx)(`div`,{className:`zen-rail-view`,style:{top:`${l.top*100}%`,height:`${l.height*100}%`}}),g.map(e=>{let t=e.items.find(e=>e.kind===`finding`)??e.items[0];return(0,O.jsx)(`button`,{type:`button`,className:`zen-marker is-${t.kind}${p?.key===e.key?` is-open`:``}`,style:{top:e.top,"--marker":t.color},"aria-label":e.items.map(e=>e.label).join(` ; `),onPointerEnter:()=>x(e.key),onPointerLeave:S,onFocus:()=>x(e.key),onBlur:S,onClick:()=>w(e),children:e.items.length>1&&(0,O.jsx)(`span`,{className:`zen-marker-count`,children:e.items.length})},e.key)})]}),ee&&p&&(0,O.jsx)(`div`,{className:`zen-popover`,style:(e=>e>d.root/2?{bottom:Math.max(d.root-e-_S,vS),maxHeight:e+_S-vS}:{top:Math.max(e-_S,vS),maxHeight:d.root-Math.max(e-_S,vS)-vS})(ee.y),onPointerEnter:()=>x(p.key),onPointerLeave:S,onPointerDown:()=>C(p.key),children:ee.content})]})}function SS({analysis:e}){let t=H(e=>e.gapsCollapsed),n=H(e=>e.setGapsCollapsed),r=Yd(e);if(r.length===0)return null;let i=r.filter(e=>e.status===`open`).length;return(0,O.jsxs)(`section`,{className:`gap-banner${t?` is-collapsed`:``}`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`gap-banner-toggle block-title`,"aria-expanded":!t,onClick:()=>n(!t),children:[(0,O.jsx)(U,{name:t?`chevron-right`:`chevron-down`,color:`#646b7b`}),(0,O.jsx)(U,{name:`triangle-alert`,color:`#e3a33b`}),W(r.length,`exigence manquante`,`exigences manquantes`),i!==r.length&&(0,O.jsxs)(`span`,{className:`gap-banner-count`,children:[`· `,W(i,`ouverte`)]})]}),!t&&r.map(t=>(0,O.jsx)(Wm,{analysis:e,finding:t},t.id))]})}function CS({file:e}){return e.binary?(0,O.jsxs)(`p`,{className:`diff-message`,children:[`Fichier binaire (`,Mu[e.status].toLowerCase(),`) : son contenu n'est pas affiché.`]}):e.status===`renamed`?(0,O.jsxs)(`p`,{className:`diff-message`,children:[`Fichier renommé depuis `,e.oldPath,` sans changement de contenu.`]}):(0,O.jsx)(`p`,{className:`diff-message`,children:`Aucune ligne modifiée dans ce fichier (changement de mode ou fichier vide).`})}function wS({file:e}){let{folder:t,name:n}=Vu(e.path);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`span`,{className:`file-head-path mono`,title:e.oldPath?`${e.oldPath} → ${e.path}`:e.path,children:[(0,O.jsx)(`span`,{className:`path-folder`,children:t}),(0,O.jsx)(`span`,{className:`file-head-name`,children:n})]}),(0,O.jsxs)(`span`,{className:`count-add mono`,children:[`+`,e.additions]}),(0,O.jsxs)(`span`,{className:`count-del mono`,children:[`−`,e.deletions]}),e.status!==`modified`&&(0,O.jsx)(`span`,{className:`tag tag-file-${e.status}`,children:Mu[e.status]})]})}function TS({analysis:e,file:t,onFileNote:n}){let r=H(e=>e.setFileReviewed),i=H(e=>e.saving),a=Ld(e.files),o=a.findIndex(e=>e.path===t.path),s=a[o-1],c=a[o+1];return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`button`,{type:`button`,className:`link-button muted`,onClick:n,children:[(0,O.jsx)(U,{name:`message-square`,size:13}),`Remarque sur le fichier`]}),(0,O.jsxs)(`div`,{className:`icon-button-group`,children:[(0,O.jsx)(`button`,{type:`button`,className:`icon-button`,disabled:!s,title:s?`Fichier précédent : ${s.path}`:`Premier fichier`,onClick:()=>s&&T(w.review(e.id,s.path)),children:(0,O.jsx)(U,{name:`arrow-left`,color:`#9aa1b1`})}),(0,O.jsx)(`button`,{type:`button`,className:`icon-button`,disabled:!c,title:c?`Fichier suivant : ${c.path}`:`Dernier fichier`,onClick:()=>c&&T(w.review(e.id,c.path)),children:(0,O.jsx)(U,{name:`arrow-right`,color:`#9aa1b1`})})]}),(0,O.jsxs)(`button`,{type:`button`,className:`button button-secondary reviewed-toggle${t.reviewed?` is-on`:``}`,"aria-pressed":t.reviewed,disabled:i,onClick:()=>void r(t.path,!t.reviewed),children:[(0,O.jsx)(U,{name:`square-check`,color:t.reviewed?`#3fb950`:`#9aa1b1`}),t.reviewed?`Revu`:`Marquer comme revu`]})]})}function ES({analysis:e,file:t,onFileNote:n}){let r=H(e=>e.filesPanelCollapsed),i=H(e=>e.setFilesPanelCollapsed),a=H(e=>e.setZenMode);return(0,O.jsxs)(`div`,{className:`file-head`,children:[(0,O.jsxs)(`div`,{className:`icon-button-group file-head-toggles`,children:[(0,O.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-pressed":!r,title:r?`Afficher la liste des fichiers`:`Masquer la liste des fichiers`,onClick:()=>i(!r),children:(0,O.jsx)(U,{name:r?`panel-left-open`:`panel-left-close`,color:`#9aa1b1`})}),(0,O.jsx)(`button`,{type:`button`,className:`icon-button`,title:`Mode zen : le code sur toute la page`,onClick:()=>a(!0),children:(0,O.jsx)(U,{name:`maximize`,color:`#9aa1b1`})})]}),(0,O.jsx)(wS,{file:t}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsx)(TS,{analysis:e,file:t,onFileNote:n})]})}function DS({analysis:e,file:t,menus:n}){let r=H(e=>e.setZenMode);return(0,O.jsxs)(`header`,{className:`file-head zen-bar`,children:[(0,O.jsx)(`a`,{className:`brand-mark`,href:w.home(),title:`Feature Analyzer — accueil`,children:(0,O.jsx)(U,{name:`scan-search`,color:`#8b97ff`})}),(0,O.jsx)(`span`,{className:`zen-bar-separator`,"aria-hidden":`true`}),(0,O.jsx)(wS,{file:t}),(0,O.jsx)(`div`,{className:`zen-bar-menus`,children:n}),(0,O.jsx)(`span`,{className:`spacer`}),(0,O.jsx)(Eu,{analysis:e}),(0,O.jsx)(`button`,{type:`button`,className:`icon-button is-on`,"aria-pressed":!0,title:`Quitter le mode zen`,onClick:()=>r(!1),children:(0,O.jsx)(U,{name:`minimize`,color:`#8b97ff`})}),(0,O.jsx)(k,{analysis:e})]})}function OS({analysis:e,path:t,line:n}){let r=H(e=>e.diff),i=H(e=>e.diffError),a=H(e=>e.fixMode),o=H(e=>e.setFixMode),s=H(e=>e.codeView),c=H(e=>e.setCodeView),l=H(e=>e.diffScope),u=H(e=>e.setDiffScope),d=H(e=>e.copy),f=H(e=>e.findingsShown),p=H(e=>e.setFindingsShown),m=H(e=>e.explanationsShown),h=H(e=>e.setExplanationsShown),g=H(e=>e.filesPanelCollapsed),_=H(e=>e.zenMode),y=pS(cS),b=pS(lS),x=(0,v.useRef)(null),S=(0,v.useRef)(null),[C,ee]=(0,v.useState)(null),E=C&&C.path===t?{line:C.line,findingId:C.findingId}:null,te=e=>ee(e&&t!==null?{path:t,...e}:null),[D,k]=(0,v.useState)({}),[ne,re]=(0,v.useState)({}),[ie,ae]=(0,v.useState)(null),oe=(0,v.useRef)(null),se=(0,v.useRef)(null),ce=Ud(e);(0,v.useEffect)(()=>{t===null&&ce!==null&&T(w.review(e.id,ce),{replace:!0})},[t,ce,e.id]);let le=e.files.find(e=>e.path===t)??null,A=r?.id===e.id?r.snapshot.files.find(e=>e.path===t):void 0,ue=A!==void 0&&A.newContent!==null,de=ue?l:`changes`,fe=(0,v.useMemo)(()=>de===`file`&&A?Hm(A)??void 0:A,[de,A]),pe=t===null?void 0:ne[t],me=(0,v.useMemo)(()=>de===`changes`&&A?Pm(A,pe??[]):null,[de,A,pe]),he=me?.fileDiff??fe,ge=(e,n)=>{if(t===null||!me)return;let r=Fm(me,e,n);re(e=>({...e,[t]:r}))},_e=i!==null&&r?.id!==e.id,ve=t===null?[]:Nl(e,t),ye=f?ve:[],j=Bl(ye,he??{path:t??``,hunks:[],newContent:null},e=>D[e.id]??(e.suggestion!==null&&e.status===`open`),a),M=Wl(ye,j,a),be=n===null?null:Gl(n,M),xe=be===null?null:Vl(be),Se=ie!==null&&ie.path===t&&ie.line===n?ie.findingId:null,Ce=ie?.seq??0;if((0,v.useEffect)(()=>{let e=oe.current;fe&&e&&(xe===null?e.scrollTo({top:0}):(e.querySelector(xe)?.scrollIntoView({block:`center`}),Se!==null&&e.querySelector(`[data-finding-card="${CSS.escape(Se)}"]`)?.scrollIntoView({block:`nearest`})))},[fe,xe,t,Se,Ce]),t===null)return(0,O.jsx)(`div`,{className:`page`,children:(0,O.jsx)(`p`,{className:`empty-text`,children:`L'analyse ne contient aucun fichier modifié : il n'y a rien à revoir.`})});let we=Xl(e,t),N=m?we:[],Te=he?$l(he,ye,j,a,N,s):[],Ee=he?Pl(he):_e?new Set:null,De=su(e,t),Oe=new Set(De.map(e=>e.location.line)),ke=(e,t)=>k(n=>({...n,[e]:t})),Ae=n=>{ae(e=>({path:t,findingId:n.finding.id,line:n.startLine,seq:(e?.seq??0)+1})),T(w.review(e.id,t,n.startLine))},je=(t,n)=>(0,O.jsxs)(`div`,{className:`review-center`,ref:se,children:[f&&(0,O.jsx)(SS,{analysis:e}),!t.contentAvailable&&!t.binary&&t.status!==`deleted`&&(0,O.jsx)(`p`,{className:`diff-notice`,children:`Fichier trop volumineux pour être conservé en entier : les remarques ne peuvent viser que le fichier entier.`}),_e?(0,O.jsx)(`p`,{className:`diff-message is-error`,children:i}):he?A?.hunks.length===0?(0,O.jsx)(CS,{file:t}):(0,O.jsx)(Rx,{file:t,fileDiff:he,hunks:Te,hunkContexts:me?.hunks??null,addedContext:me?.added??null,onContextChange:ge,findings:ye,notedLines:Oe,scrollRef:oe,mode:a,onModeChange:o,codeView:s,onCodeViewChange:c,scope:de,onScopeChange:u,wholeFileAvailable:ue,explained:N.length>0,target:be,onLineNote:e=>te({line:e,findingId:null}),onHideFix:e=>ke(e,!1),onRequestExplanation:n=>void d(Bm(e,t,n),`Demande d'explication copiée : collez-la dans la conversation de l'agent.`),zen:n}):(0,O.jsx)(`p`,{className:`diff-message`,children:`Chargement du diff…`})]}),Me=()=>te({line:null,findingId:null});if(le!==null&&Xd(_,e,t)){let t=Ee===null?[]:Ux({analysis:e,file:le,numbered:ye,explanations:N,fileDiff:he??null,fixes:j,mode:a,codeView:s,removed:M,lineNotes:De,shown:Ee,setComposer:te,onToggleFix:ke,revealedId:Se});return(0,O.jsxs)(`div`,{className:`zen`,children:[(0,O.jsx)(DS,{analysis:e,file:le,menus:(0,O.jsx)(bx,{scope:de,onScopeChange:u,wholeFileAvailable:ue,codeView:s,onCodeViewChange:c,mode:a,onModeChange:o})}),(0,O.jsxs)(`div`,{className:`zen-main`,children:[(0,O.jsx)(`div`,{className:`review-body`,ref:oe,children:je(le,!0)}),(0,O.jsx)(xS,{items:t,fileNotes:Hx(e,le),scopeRef:se,scrollRef:oe}),(0,O.jsxs)(`div`,{className:`zen-dock`,children:[E!==null&&(0,O.jsx)(`div`,{className:`zen-composer`,children:(0,O.jsx)(Xm,{path:le.path,line:E.line,findingId:E.findingId,onClose:()=>te(null)},`${E.line??`file`}-${E.findingId??``}`)}),(0,O.jsx)(`div`,{className:`zen-actions`,children:(0,O.jsx)(TS,{analysis:e,file:le,onFileNote:Me})})]})]})]})}let Ne=g&&le!==null;return(0,O.jsxs)(`div`,{className:`review${Ne?` is-files-hidden`:``}`,ref:x,style:Ne?void 0:{gridTemplateColumns:`${y.width}px minmax(0, 1fr)`},children:[!Ne&&(0,O.jsx)(sS,{analysis:e,currentPath:t}),!Ne&&(0,O.jsx)(mS,{setting:cS,side:`left`,label:`Largeur de la liste des fichiers`,width:y.width,setWidth:y.setWidth,containerRef:x,preview:(e,t)=>e.style.gridTemplateColumns=`${t}px minmax(0, 1fr)`}),(0,O.jsx)(`section`,{className:`review-main`,children:le===null?(0,O.jsx)(`div`,{className:`review-body review-body-padded`,children:(0,O.jsxs)(`p`,{className:`diff-message`,children:[`Le fichier « `,t,` » ne fait pas partie de cette analyse. Choisissez un fichier dans la liste.`]})}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(ES,{analysis:e,file:le,onFileNote:Me}),(0,O.jsx)($x,{file:le}),(0,O.jsx)(`div`,{className:`review-body`,ref:oe,children:(0,O.jsxs)(`div`,{className:`review-columns`,ref:S,style:{"--findings-panel-width":`${b.width}px`},children:[je(le,!1),(0,O.jsx)(mS,{setting:lS,side:`right`,label:`Largeur de la colonne des constats`,width:b.width,setWidth:b.setWidth,containerRef:S,preview:(e,t)=>e.style.setProperty(`--findings-panel-width`,`${t}px`)}),(0,O.jsx)(Zx,{analysis:e,file:le,numbered:ye,explanations:N,filters:{findingCount:ve.length,explanationCount:we.length,findingsShown:f,explanationsShown:m,onFindingsShownChange:p,onExplanationsShownChange:h},fileDiff:he??null,fixes:j,mode:a,codeView:s,removed:M,lineNotes:De,shownLines:Ee,composer:E,setComposer:te,onToggleFix:ke,scopeRef:se,scrollRef:oe,onReveal:Ae,revealedId:Se})]})})]})})]})}function kS(e){return e.name===`feature`||e.name===`review`||e.name===`finish`?e.id:null}function AS({children:e}){return(0,O.jsx)(`div`,{className:`empty-state`,children:(0,O.jsx)(`div`,{className:`empty-card`,children:e})})}function jS(){kd();let e=te(),t=H(e=>e.current),n=H(e=>e.openAnalysis),r=H(e=>e.zenMode),i=kS(e);(0,v.useEffect)(()=>{i&&n(i)},[i,n]);let a=t&&t.id===i?t.analysis:null,o=t&&t.id===i?t.error:null,s=t&&t.id===i?t.links:null,c=e.name===`review`&&a!==null&&Xd(r,a,e.path),l=e.name===`review`&&a?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Eu,{analysis:a}),(0,O.jsx)(k,{analysis:a})]}):null,u;return u=e.name===`home`?(0,O.jsx)(Am,{}):e.name===`not_found`?(0,O.jsx)(AS,{children:(0,O.jsxs)(`p`,{children:[`Adresse inconnue : `,(0,O.jsx)(`code`,{children:e.hash}),`. `,(0,O.jsx)(`a`,{href:w.home(),children:`Revenir à l'accueil`}),`.`]})}):o?(0,O.jsxs)(AS,{children:[(0,O.jsxs)(`p`,{className:`error-text`,children:[`Analyse illisible : `,o]}),(0,O.jsx)(`p`,{children:(0,O.jsx)(`a`,{href:w.home(),children:`Revenir à l'accueil`})})]}):a?e.name===`feature`?(0,O.jsx)(vm,{analysis:a,links:s,tab:e.tab}):e.name===`review`?(0,O.jsx)(OS,{analysis:a,path:e.path,line:e.line}):(0,O.jsx)(Sm,{analysis:a},a.id):(0,O.jsx)(AS,{children:(0,O.jsx)(`p`,{children:`Chargement de l'analyse…`})}),(0,O.jsxs)(`div`,{className:`app`,children:[!c&&(0,O.jsx)(Td,{currentId:i,action:l}),(0,O.jsx)(`main`,{className:`main${e.name===`review`?` main-fixed`:``}`,children:u}),(0,O.jsx)(Tu,{})]})}(0,y.createRoot)(document.getElementById(`root`)).render((0,O.jsx)(v.StrictMode,{children:(0,O.jsx)(jS,{})}));export{s as t};
|