@bkm016/basalt 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/chunk-09vr609h.js +2 -0
  2. package/chunk-0qqb6v41.js +3753 -0
  3. package/{chunk-1egbcp85.js → chunk-0yytz0r1.js} +7 -7
  4. package/{chunk-rjdhaasf.js → chunk-1aspj1hn.js} +2 -2
  5. package/chunk-1b7gbe8g.js +10 -0
  6. package/{chunk-665jzf2w.js → chunk-1v7st27a.js} +11 -11
  7. package/{chunk-5fdgy0q2.js → chunk-2bb01ddq.js} +10 -10
  8. package/{chunk-kjr81mrd.js → chunk-2wkaw73s.js} +3 -3
  9. package/{chunk-xhk54h2q.js → chunk-3m7qwfm3.js} +4 -4
  10. package/{chunk-0tdv0t5q.js → chunk-44ek81ad.js} +2 -2
  11. package/{chunk-wc5j0hfw.js → chunk-45cz26ap.js} +2 -2
  12. package/{chunk-0rya8cxe.js → chunk-6e49xsf5.js} +2 -2
  13. package/{chunk-bj14jshr.js → chunk-6qertm2t.js} +2 -2
  14. package/chunk-8dxzqwq3.js +2 -0
  15. package/chunk-9mmz6wt3.js +2 -0
  16. package/{chunk-3jz9g8ab.js → chunk-a3tqx584.js} +3 -3
  17. package/{chunk-y9xe9ct2.js → chunk-a8nyk4k9.js} +1 -1
  18. package/{chunk-qffb7een.js → chunk-bhqyxyap.js} +2 -2
  19. package/chunk-bpw6q7g0.js +3 -0
  20. package/{chunk-tnrqkc7b.js → chunk-cv5wsd9m.js} +1 -1
  21. package/{chunk-5wp4egky.js → chunk-dhm42y04.js} +2 -2
  22. package/{chunk-913tfr9c.js → chunk-exnn1867.js} +1 -1
  23. package/{chunk-7yw8aa5j.js → chunk-f7egr55n.js} +4 -4
  24. package/{chunk-kgdrjqsy.js → chunk-g2t6t8fk.js} +2 -2
  25. package/{chunk-qbf8x2ft.js → chunk-h6sw8fbt.js} +1 -1
  26. package/chunk-jhd54p1b.js +3 -0
  27. package/{chunk-x9982ek7.js → chunk-kf8hq21a.js} +2 -2
  28. package/{chunk-zt1wvkyf.js → chunk-kfq8wyd3.js} +1 -1
  29. package/chunk-nt2gntad.js +2 -0
  30. package/{chunk-wd9zxhza.js → chunk-pmc3y1z8.js} +1 -1
  31. package/{chunk-3p7q2pyp.js → chunk-pvncysbb.js} +1 -1
  32. package/chunk-q8zx3kt6.js +2 -0
  33. package/{chunk-sf13azm4.js → chunk-qczbfccb.js} +3 -3
  34. package/chunk-qx0m82rw.js +2 -0
  35. package/chunk-ry0z4ev6.js +2 -0
  36. package/{chunk-g2k3yhgh.js → chunk-s37s3k24.js} +3 -3
  37. package/{chunk-y8ced1jm.js → chunk-sh74qzvt.js} +1 -1
  38. package/{chunk-9y69ywyg.js → chunk-szat3vp4.js} +2 -2
  39. package/chunk-tvm4zmgj.js +3 -0
  40. package/{chunk-8wjgbd9k.js → chunk-vgvq3q12.js} +2 -2
  41. package/{chunk-d913kpyw.js → chunk-vv7fp27r.js} +2 -2
  42. package/{chunk-97kjn55j.js → chunk-wjd9fr23.js} +1 -1
  43. package/{chunk-6gyhajhx.js → chunk-x3dnb9sz.js} +2 -2
  44. package/chunk-xysny0ve.js +3 -0
  45. package/{chunk-qcwnkr5y.js → chunk-yskm0hsy.js} +1 -1
  46. package/{chunk-sytpmbfp.js → chunk-zef13k3h.js} +36 -36
  47. package/cli.js +89 -0
  48. package/compiled.js +12 -3762
  49. package/package.json +4 -3
  50. package/ui-test-worker.js +31 -31
  51. package/web/{chunk-rkesqprv.js → chunk-05w4fyzc.js} +1 -1
  52. package/web/{chunk-ev1g5cqw.js → chunk-0vt9fg48.js} +1 -1
  53. package/web/{chunk-55kw67nv.js → chunk-22a4ety5.js} +1 -1
  54. package/web/{chunk-hryhthxr.js → chunk-2m12wyrb.js} +1 -1
  55. package/web/{chunk-svmhj9hd.js → chunk-2msj52w6.js} +1 -1
  56. package/web/{chunk-rsn8j7xv.js → chunk-2ps6mepk.js} +1 -1
  57. package/web/chunk-2pver6r4.js +1 -0
  58. package/web/{chunk-1t760bg0.js → chunk-2scce33n.js} +1 -1
  59. package/web/chunk-37ajk6zg.js +2 -0
  60. package/web/{chunk-haphmhz8.js → chunk-3ee04tmm.js} +1 -1
  61. package/web/{chunk-c85wxnpw.js → chunk-3jhyzmnf.js} +1 -1
  62. package/web/{chunk-pz934t6t.js → chunk-45fzdcgz.js} +1 -1
  63. package/web/{chunk-ea9swkkt.js → chunk-4ks96e4r.js} +1 -1
  64. package/web/{chunk-0k0hvh59.js → chunk-4v8en1yw.js} +1 -1
  65. package/web/chunk-4wkm9fda.js +1 -0
  66. package/web/{chunk-zk2f7x5e.js → chunk-5vw9rs4r.js} +1 -1
  67. package/web/{chunk-mq92vqb1.js → chunk-70qwwwak.js} +1 -1
  68. package/web/{chunk-4b5mt5pd.js → chunk-8p4tc9f4.js} +1 -1
  69. package/web/{chunk-3pm4645m.js → chunk-90kp4pnz.js} +1 -1
  70. package/web/{chunk-ytpwz01r.js → chunk-9an7cjd9.js} +1 -1
  71. package/web/{chunk-29e1trsq.js → chunk-9dxjafp2.js} +1 -1
  72. package/web/{chunk-ykxpb3wv.js → chunk-9p12mgs6.js} +1 -1
  73. package/web/{chunk-sc63gh9d.js → chunk-9yakxvjb.js} +1 -1
  74. package/web/{chunk-fdkp6tzq.js → chunk-a1z5qx1r.js} +1 -1
  75. package/web/{chunk-v6v831tc.js → chunk-a3verqw9.js} +1 -1
  76. package/web/{chunk-vqjs551t.js → chunk-a5x2zveg.js} +1 -1
  77. package/web/chunk-amzgyy1k.js +1 -0
  78. package/web/{chunk-e5rmr47n.js → chunk-b1pe46zz.js} +1 -1
  79. package/web/{chunk-1v3d60pp.js → chunk-b4wbk7vc.js} +1 -1
  80. package/web/{chunk-3bqh2dkw.js → chunk-bc78qf1m.js} +1 -1
  81. package/web/{chunk-tfyxp2qs.js → chunk-bgnnrpna.js} +1 -1
  82. package/web/{chunk-vadqkz3x.js → chunk-bj90t5gh.js} +1 -1
  83. package/web/{chunk-mdsgekpk.js → chunk-bjkc94mv.js} +1 -1
  84. package/web/{chunk-3cfabjey.js → chunk-ca682sm6.js} +1 -1
  85. package/web/chunk-cff5hcm8.js +8 -0
  86. package/web/{chunk-942prjb6.js → chunk-dt462hk9.js} +1 -1
  87. package/web/{chunk-bwyw10wx.js → chunk-dzwxgqgm.js} +1 -1
  88. package/web/{chunk-bhe4jzha.js → chunk-e32y85kx.js} +1 -1
  89. package/web/{chunk-v47rhg7b.js → chunk-e53wfgb8.js} +1 -1
  90. package/web/{chunk-ezyvv4ab.js → chunk-e6jxqbv7.js} +1 -1
  91. package/web/chunk-esp1mmgr.js +1 -0
  92. package/web/chunk-ew3cgdtd.js +1 -0
  93. package/web/{chunk-svdzmaxb.js → chunk-f26smjjf.js} +1 -1
  94. package/web/{chunk-jvhmna7z.js → chunk-fk0dh93x.js} +1 -1
  95. package/web/{chunk-3pf33xsm.js → chunk-fm2ybfj5.js} +1 -1
  96. package/web/{chunk-6r912gfj.js → chunk-fscafg24.js} +1 -1
  97. package/web/{chunk-canbct9d.js → chunk-fz06t6km.js} +1 -1
  98. package/web/{chunk-rz6wwdd5.js → chunk-g4azyef7.js} +1 -1
  99. package/web/chunk-gjq1pxw3.js +1 -0
  100. package/web/{chunk-0xck277j.js → chunk-gqw3f02j.js} +1 -1
  101. package/web/chunk-h5ejbf6e.js +1 -0
  102. package/web/{chunk-kbtbbarw.js → chunk-hev4hq89.js} +1 -1
  103. package/web/chunk-jjh5jvva.js +1 -0
  104. package/web/{chunk-a3xt6840.js → chunk-jrcyc9s9.js} +1 -1
  105. package/web/{chunk-4y2td14d.js → chunk-jwzd9tzk.js} +1 -1
  106. package/web/chunk-k5btcvbg.js +1 -0
  107. package/web/{chunk-z1jtv4c0.js → chunk-kdyjnwdx.js} +1 -1
  108. package/web/chunk-kpvgecwy.js +1 -0
  109. package/web/chunk-kq40ss39.js +1 -0
  110. package/web/{chunk-ghxe4gam.js → chunk-p3b9crsa.js} +1 -1
  111. package/web/{chunk-zakv2xdf.js → chunk-pf2ab8p8.js} +1 -1
  112. package/web/{chunk-d4d3mnak.js → chunk-q0p5xqe1.js} +1 -1
  113. package/web/{chunk-5hex8g0y.js → chunk-q5ke7a33.js} +1 -1
  114. package/web/chunk-q7dsnvpf.js +1 -0
  115. package/web/{chunk-vfqe8298.js → chunk-qd8bxxdj.js} +1 -1
  116. package/web/{chunk-3ahpr030.js → chunk-qefasa1j.js} +1 -1
  117. package/web/{chunk-x9q4kh67.js → chunk-qh7265qw.js} +1 -1
  118. package/web/{chunk-hejz98gw.js → chunk-qnaqf0cr.js} +1 -1
  119. package/web/chunk-rg426vkf.js +1 -0
  120. package/web/{chunk-s8vapqgr.js → chunk-rpmpttbk.js} +1 -1
  121. package/web/chunk-scpwc9ev.js +1 -0
  122. package/web/{chunk-b5brnfv9.js → chunk-ss1bcb0n.js} +1 -1
  123. package/web/chunk-ssy07dd2.js +1 -0
  124. package/web/{chunk-gxn0bey7.js → chunk-taynqrgq.js} +2 -2
  125. package/web/chunk-tgpbhzn9.js +1 -0
  126. package/web/{chunk-ejd43q75.js → chunk-tmvakq7n.js} +2 -2
  127. package/web/{chunk-nerx2q12.js → chunk-tqmwd9qp.js} +1 -1
  128. package/web/{chunk-n5fn9khr.js → chunk-v28fx2nd.js} +1 -1
  129. package/web/{chunk-32ezm0ry.js → chunk-vt40e1kp.js} +39 -39
  130. package/web/chunk-w53rba6g.js +1 -0
  131. package/web/chunk-w86n42dy.js +1 -0
  132. package/web/{chunk-ktqt87qw.js → chunk-w880psmw.js} +1 -1
  133. package/web/{chunk-p8y0hjx9.js → chunk-wptv8atc.js} +1 -1
  134. package/web/{chunk-g9qv15hq.js → chunk-xbty0rv7.js} +1 -1
  135. package/web/{chunk-7f0m2yrd.js → chunk-xjxv8dg8.js} +1 -1
  136. package/web/{chunk-x3zwjkwg.js → chunk-xrxne80b.js} +1 -1
  137. package/web/{chunk-jtwhjp20.js → chunk-y0m8hrwz.js} +2 -2
  138. package/web/{chunk-6atq9qtt.js → chunk-y49fhfda.js} +1 -1
  139. package/web/{chunk-1x8fn8w9.js → chunk-yd46jhqv.js} +1 -1
  140. package/web/{chunk-ngpq43vn.js → chunk-z7dcbxws.js} +1 -1
  141. package/web/chunk-zde7mj43.js +1 -0
  142. package/web/index.html +1 -1
  143. package/worker.js +1 -1
  144. package/chunk-1fv27j4b.js +0 -3
  145. package/chunk-356q8e0y.js +0 -10
  146. package/chunk-b9bg5fhd.js +0 -2
  147. package/chunk-j2x0g1vg.js +0 -2
  148. package/chunk-k0t23cmx.js +0 -2
  149. package/chunk-m38ber71.js +0 -2
  150. package/chunk-rad3dm0q.js +0 -2
  151. package/chunk-tjpvayr1.js +0 -2
  152. package/chunk-ve7qx8wm.js +0 -3
  153. package/chunk-yb1jxgnk.js +0 -2
  154. package/web/chunk-00mq7bhx.js +0 -1
  155. package/web/chunk-0atfn8jf.js +0 -1
  156. package/web/chunk-310yey4q.js +0 -1
  157. package/web/chunk-3hvgs5aw.js +0 -1
  158. package/web/chunk-3kh6zefg.js +0 -1
  159. package/web/chunk-401v5ht6.js +0 -8
  160. package/web/chunk-5r5kv4gh.js +0 -1
  161. package/web/chunk-95q1bwxn.js +0 -1
  162. package/web/chunk-9s7c178f.js +0 -1
  163. package/web/chunk-benmmqt2.js +0 -1
  164. package/web/chunk-bgqdcnke.js +0 -1
  165. package/web/chunk-eqegxtdt.js +0 -1
  166. package/web/chunk-gmfp7fg4.js +0 -1
  167. package/web/chunk-gxay64d5.js +0 -1
  168. package/web/chunk-jg6nzn6q.js +0 -1
  169. package/web/chunk-kx2xk3bb.js +0 -1
  170. package/web/chunk-vfqdy860.js +0 -1
  171. package/web/chunk-x59p8sg2.js +0 -1
  172. package/web/chunk-y7z144e3.js +0 -1
  173. package/web/chunk-ydgqrfvw.js +0 -2
  174. package/web/chunk-yj1a2d37.js +0 -1
@@ -1,4 +1,4 @@
1
- import{Qr,ii,Mn,Nr,oi,si,pn}from"./chunk-32ezm0ry.js";var S=class extends Error{constructor(t){super(t);this.name="ShikiError"}};function tn(t){return Ne(t)}function Ne(t){if(Array.isArray(t))return nn(t);if(t instanceof RegExp)return t;if(typeof t==="object")return rn(t);return t}function nn(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=Ne(t[n]);return e}function rn(t){let e={};for(let n in t)e[n]=Ne(t[n]);return e}function Ve(t,...e){return e.forEach((n)=>{for(let r in n)t[r]=n[r]}),t}function Ye(t){let e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");if(e===0)return t;else if(~e===t.length-1)return Ye(t.substring(0,t.length-1));else return t.substr(~e+1)}var ye=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,J=class{static hasCaptures(t){if(t===null)return!1;return ye.lastIndex=0,ye.test(t)}static replaceCaptures(t,e,n){return t.replace(ye,(r,s,i,o)=>{let a=n[parseInt(s||i,10)];if(a){let c=e.substring(a.start,a.end);while(c[0]===".")c=c.substring(1);switch(o){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return r})}};function Je(t,e){if(t<e)return-1;if(t>e)return 1;return 0}function Qe(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let s=0;s<n;s++){let i=Je(t[s],e[s]);if(i!==0)return i}return 0}return n-r}function Fe(t){if(/^#[0-9a-f]{6}$/i.test(t))return!0;if(/^#[0-9a-f]{8}$/i.test(t))return!0;if(/^#[0-9a-f]{3}$/i.test(t))return!0;if(/^#[0-9a-f]{4}$/i.test(t))return!0;return!1}function Xe(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Ze=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);let e=this.fn(t);return this.cache.set(t,e),e}},M=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(an(t),e)}static createFromParsedTheme(t,e){return ln(t,e)}_cachedMatchRoot=new Ze((t)=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;let e=t.scopeName,r=this._cachedMatchRoot.get(e).find((s)=>sn(t.parent,s.parentScopes));if(!r)return null;return new et(r.fontStyle,r.foreground,r.background)}},be=class t{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(let r of n)e=new t(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new t(n,e[r]);return n}push(e){return new t(this,e)}getSegments(){let e=this,n=[];while(e)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){if(this===e)return!0;if(this.parent===null)return!1;return this.parent.extends(e)}getExtensionIfDefined(e){let n=[],r=this;while(r&&r!==e)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function sn(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],s=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],s=!0}while(t){if(on(t.scopeName,r))break;if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function on(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var et=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function an(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let s=0,i=e.length;s<i;s++){let o=e[s];if(!o.settings)continue;let a;if(typeof o.scope==="string"){let h=o.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),a=h.split(",")}else if(Array.isArray(o.scope))a=o.scope;else a=[""];let c=-1;if(typeof o.settings.fontStyle==="string"){c=0;let h=o.settings.fontStyle.split(" ");for(let d=0,f=h.length;d<f;d++)switch(h[d]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let l=null;if(typeof o.settings.foreground==="string"&&Fe(o.settings.foreground))l=o.settings.foreground;let u=null;if(typeof o.settings.background==="string"&&Fe(o.settings.background))u=o.settings.background;for(let h=0,d=a.length;h<d;h++){let m=a[h].trim().split(" "),y=m[m.length-1],_=null;if(m.length>1)_=m.slice(0,m.length-1),_.reverse();n[r++]=new cn(y,_,s,c,l,u)}}return n}var cn=class{constructor(t,e,n,r,s,i){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=s,this.background=i}},k=((t)=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(k||{});function ln(t,e){t.sort((c,l)=>{let u=Je(c.scope,l.scope);if(u!==0)return u;if(u=Qe(c.parentScopes,l.parentScopes),u!==0)return u;return c.index-l.index});let n=0,r="#000000",s="#ffffff";while(t.length>=1&&t[0].scope===""){let c=t.shift();if(c.fontStyle!==-1)n=c.fontStyle;if(c.foreground!==null)r=c.foreground;if(c.background!==null)s=c.background}let i=new un(e),o=new et(n,i.getId(r),i.getId(s)),a=new fn(new we(0,null,-1,0,0),[]);for(let c=0,l=t.length;c<l;c++){let u=t[c];a.insert(0,u.scope,u.parentScopes,u.fontStyle,i.getId(u.foreground),i.getId(u.background))}return new M(i,o,a)}var un=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},hn=Object.freeze([]),we=class t{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,s,i){this.scopeDepth=e,this.parentScopes=n||hn,this.fontStyle=r,this.foreground=s,this.background=i}clone(){return new t(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,s=e.length;r<s;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,s){if(this.scopeDepth>e)console.log("how did this happen?");else this.scopeDepth=e;if(n!==-1)this.fontStyle=n;if(r!==0)this.foreground=r;if(s!==0)this.background=s}},fn=class t{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,s=0;while(!0){if(e.parentScopes[r]===">")r++;if(n.parentScopes[s]===">")s++;if(r>=e.parentScopes.length||s>=n.parentScopes.length)break;let i=n.parentScopes[s].length-e.parentScopes[r].length;if(i!==0)return i;r++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,i;if(r===-1)s=e,i="";else s=e.substring(0,r),i=e.substring(r+1);if(this._children.hasOwnProperty(s))return this._children[s].match(i)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(t._cmpBySpecificity),n}insert(e,n,r,s,i,o){if(n===""){this._doInsertHere(e,r,s,i,o);return}let a=n.indexOf("."),c,l;if(a===-1)c=n,l="";else c=n.substring(0,a),l=n.substring(a+1);let u;if(this._children.hasOwnProperty(c))u=this._children[c];else u=new t(this._mainRule.clone(),we.cloneArr(this._rulesWithParentScopes)),this._children[c]=u;u.insert(e+1,l,r,s,i,o)}_doInsertHere(e,n,r,s,i){if(n===null){this._mainRule.acceptOverwrite(e,r,s,i);return}for(let o=0,a=this._rulesWithParentScopes.length;o<a;o++){let c=this._rulesWithParentScopes[o];if(Qe(c.parentScopes,n)===0){c.acceptOverwrite(e,r,s,i);return}}if(r===-1)r=this._mainRule.fontStyle;if(s===0)s=this._mainRule.foreground;if(i===0)i=this._mainRule.background;this._rulesWithParentScopes.push(new we(e,n,r,s,i))}},x=class t{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){let n=t.getLanguageId(e),r=t.getTokenType(e),s=t.getFontStyle(e),i=t.getForeground(e),o=t.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:i,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,s,i,o,a){let c=t.getLanguageId(e),l=t.getTokenType(e),u=t.containsBalancedBrackets(e)?1:0,h=t.getFontStyle(e),d=t.getForeground(e),f=t.getBackground(e);if(n!==0)c=n;if(r!==8)l=mn(r);if(s!==null)u=s?1:0;if(i!==-1)h=i;if(o!==0)d=o;if(a!==0)f=a;return(c<<0|l<<8|u<<10|h<<11|d<<15|f<<24)>>>0}};function dn(t){return t}function mn(t){return t}function X(t,e){let n=[],r=gn(t),s=r.next();while(s!==null){let c=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let l=o();if(n.push({matcher:l,priority:c}),s!==",")break;s=r.next()}return n;function i(){if(s==="-"){s=r.next();let c=i();return(l)=>!!c&&!c(l)}if(s==="("){s=r.next();let c=a();if(s===")")s=r.next();return c}if(De(s)){let c=[];do c.push(s),s=r.next();while(De(s));return(l)=>e(c,l)}return null}function o(){let c=[],l=i();while(l)c.push(l),l=i();return(u)=>c.every((h)=>h(u))}function a(){let c=[],l=o();while(l){if(c.push(l),s==="|"||s===",")do s=r.next();while(s==="|"||s===",");else break;l=o()}return(u)=>c.some((h)=>h(u))}}function De(t){return!!t&&!!t.match(/[\w\.:]+/)}function gn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;let r=n[0];return n=e.exec(t),r}}}function tt(t){if(typeof t.dispose==="function")t.dispose()}var j=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},_n=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},yn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){let e=t.toKey();if(this._seenReferenceKeys.has(e))return;this._seenReferenceKeys.add(e),this._references.push(t)}},bn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new j(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let t=this.Q;this.Q=[];let e=new yn;for(let n of t)Sn(n,this.initialScopeName,this.repo,e);for(let n of e.references)if(n instanceof j){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName))continue;if(this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Sn(t,e,n,r){let s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw Error(`No grammar provided for <${e}>`);return}let i=n.lookup(e);if(t instanceof j)Q({baseGrammar:i,selfGrammar:s},r);else Ce(t.ruleName,{baseGrammar:i,selfGrammar:s,repository:s.repository},r);let o=n.injections(t.scopeName);if(o)for(let a of o)r.add(new j(a))}function Ce(t,e,n){if(e.repository&&e.repository[t]){let r=e.repository[t];Z([r],e,n)}}function Q(t,e){if(t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns))Z(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e);if(t.selfGrammar.injections)Z(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function Z(t,e,n){for(let r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let s=r.repository?Ve({},e.repository,r.repository):e.repository;if(Array.isArray(r.patterns))Z(r.patterns,{...e,repository:s},n);let i=r.include;if(!i)continue;let o=nt(i);switch(o.kind){case 0:Q({...e,selfGrammar:e.baseGrammar},n);break;case 1:Q(e,n);break;case 2:Ce(o.ruleName,{...e,repository:s},n);break;case 3:case 4:let a=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){let c={baseGrammar:e.baseGrammar,selfGrammar:a,repository:s};if(o.kind===4)Ce(o.ruleName,c,n);else Q(c,n)}else if(o.kind===4)n.add(new _n(o.scopeName,o.ruleName));else n.add(new j(o.scopeName));break}}}var wn=class{kind=0},Cn=class{kind=1},kn=class{constructor(t){this.ruleName=t}kind=2},Rn=class{constructor(t){this.scopeName=t}kind=3},Nn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function nt(t){if(t==="$base")return new wn;else if(t==="$self")return new Cn;let e=t.indexOf("#");if(e===-1)return new Rn(t);else if(e===0)return new kn(t.substring(1));else{let n=t.substring(0,e),r=t.substring(e+1);return new Nn(n,r)}}var Tn=/\\(\d+)/,We=/\\(\d+)/g,ws=Symbol("RuleId"),vn=-1,rt=-2;function st(t){return t}function it(t){return t}var W=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=J.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=J.hasCaptures(this._contentName)}get debugName(){let t=this.$location?`${Ye(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){if(!this._nameIsCapturing||this._name===null||t===null||e===null)return this._name;return J.replaceCaptures(this._name,t,e)}getContentName(t,e){if(!this._contentNameIsCapturing||this._contentName===null)return this._contentName;return J.replaceCaptures(this._contentName,t,e)}},An=class extends W{retokenizeCapturedWithRuleId;constructor(t,e,n,r,s){super(t,e,n,r);this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,e){throw Error("Not supported!")}compile(t,e){throw Error("Not supported!")}compileAG(t,e,n,r){throw Error("Not supported!")}},En=class extends W{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,null);this._match=new F(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns)this._cachedCompiledPatterns=new D,this.collectPatterns(t,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}},He=class extends W{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,r);this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}collectPatterns(t,e){for(let n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns)this._cachedCompiledPatterns=new D,this.collectPatterns(t,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}},ke=class extends W{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s,i,o,a,c,l){super(t,e,n,r);this._begin=new F(s,this.id),this.beginCaptures=i,this._end=new F(o?o:"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new D;for(let n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);if(this.applyEndPatternLast)this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end);else this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}if(this._end.hasBackReferences)if(this.applyEndPatternLast)this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e);else this._cachedCompiledPatterns.setSource(0,e);return this._cachedCompiledPatterns}},ee=class extends W{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,s,i,o,a,c){super(t,e,n,r);this._begin=new F(s,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new F(o,rt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null;if(this._cachedCompiledWhilePatterns)this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new D;for(let e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){if(!this._cachedCompiledWhilePatterns)this._cachedCompiledWhilePatterns=new D,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while);if(this._while.hasBackReferences)this._cachedCompiledWhilePatterns.setSource(0,e?e:"￿");return this._cachedCompiledWhilePatterns}},ot=class t{static createCaptureRule(e,n,r,s,i){return e.registerRule((o)=>new An(n,o,r,s,i))}static getCompiledRuleId(e,n,r){if(!e.id)n.registerRule((s)=>{if(e.id=s,e.match)return new En(e.$vscodeTextmateLocation,e.id,e.name,e.match,t._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){if(e.repository)r=Ve({},r,e.repository);let i=e.patterns;if(typeof i>"u"&&e.include)i=[{include:e.include}];return new He(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,t._compilePatterns(i,n,r))}if(e.while)return new ee(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,t._compileCaptures(e.whileCaptures||e.captures,n,r),t._compilePatterns(e.patterns,n,r));return new ke(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,t._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,t._compilePatterns(e.patterns,n,r))});return e.id}static _compileCaptures(e,n,r){let s=[];if(e){let i=0;for(let o in e){if(o==="$vscodeTextmateLocation")continue;let a=parseInt(o,10);if(a>i)i=a}for(let o=0;o<=i;o++)s[o]=null;for(let o in e){if(o==="$vscodeTextmateLocation")continue;let a=parseInt(o,10),c=0;if(e[o].patterns)c=t.getCompiledRuleId(e[o],n,r);s[a]=t.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,c)}}return s}static _compilePatterns(e,n,r){let s=[];if(e)for(let i=0,o=e.length;i<o;i++){let a=e[i],c=-1;if(a.include){let l=nt(a.include);switch(l.kind){case 0:case 1:c=t.getCompiledRuleId(r[a.include],n,r);break;case 2:let u=r[l.ruleName];if(u)c=t.getCompiledRuleId(u,n,r);break;case 3:case 4:let h=l.scopeName,d=l.kind===4?l.ruleName:null,f=n.getExternalGrammar(h,r);if(f)if(d){let m=f.repository[d];if(m)c=t.getCompiledRuleId(m,n,f.repository)}else c=t.getCompiledRuleId(f.repository.$self,n,f.repository);break}}else c=t.getCompiledRuleId(a,n,r);if(c!==-1){let l=n.getRule(c),u=!1;if(l instanceof He||l instanceof ke||l instanceof ee){if(l.hasMissingPatterns&&l.patterns.length===0)u=!0}if(u)continue;s.push(c)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},F=class t{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e==="string"){let r=e.length,s=0,i=[],o=!1;for(let a=0;a<r;a++)if(e.charAt(a)==="\\"){if(a+1<r){let l=e.charAt(a+1);if(l==="z")i.push(e.substring(s,a)),i.push("$(?!\\n)(?<!\\n)"),s=a+2;else if(l==="A"||l==="G")o=!0;a++}}if(this.hasAnchor=o,s===0)this.source=e;else i.push(e.substring(s,r)),this.source=i.join("")}else this.hasAnchor=!1,this.source=e;if(this.hasAnchor)this._anchorCache=this._buildAnchorCache();else this._anchorCache=null;if(this.ruleId=n,typeof this.source==="string")this.hasBackReferences=Tn.test(this.source);else this.hasBackReferences=!1}clone(){return new t(this.source,this.ruleId)}setSource(e){if(this.source===e)return;if(this.source=e,this.hasAnchor)this._anchorCache=this._buildAnchorCache()}resolveBackReferences(e,n){if(typeof this.source!=="string")throw Error("This method should only be called if the source is a string");let r=n.map((s)=>e.substring(s.start,s.end));return We.lastIndex=0,this.source.replace(We,(s,i)=>Xe(r[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!=="string")throw Error("This method should only be called if the source is a string");let e=[],n=[],r=[],s=[],i,o,a,c;for(i=0,o=this.source.length;i<o;i++)if(a=this.source.charAt(i),e[i]=a,n[i]=a,r[i]=a,s[i]=a,a==="\\"){if(i+1<o){if(c=this.source.charAt(i+1),c==="A")e[i+1]="￿",n[i+1]="￿",r[i+1]="A",s[i+1]="A";else if(c==="G")e[i+1]="￿",n[i+1]="G",r[i+1]="￿",s[i+1]="G";else e[i+1]=c,n[i+1]=c,r[i+1]=c,s[i+1]=c;i++}}return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){if(!this.hasAnchor||!this._anchorCache||typeof this.source!=="string")return this.source;if(e)if(n)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;else if(n)return this._anchorCache.A0_G1;else return this._anchorCache.A0_G0}},D=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(){if(this._cached)this._cached.dispose(),this._cached=null;if(this._anchorCache.A0_G0)this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null;if(this._anchorCache.A0_G1)this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null;if(this._anchorCache.A1_G0)this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null;if(this._anchorCache.A1_G1)this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){if(this._items[t].source!==e)this._disposeCaches(),this._items[t].setSource(e)}compile(t){if(!this._cached){let e=this._items.map((n)=>n.source);this._cached=new qe(t,e,this._items.map((n)=>n.ruleId))}return this._cached}compileAG(t,e,n){if(!this._hasAnchors)return this.compile(t);else if(e)if(n){if(!this._anchorCache.A1_G1)this._anchorCache.A1_G1=this._resolveAnchors(t,e,n);return this._anchorCache.A1_G1}else{if(!this._anchorCache.A1_G0)this._anchorCache.A1_G0=this._resolveAnchors(t,e,n);return this._anchorCache.A1_G0}else if(n){if(!this._anchorCache.A0_G1)this._anchorCache.A0_G1=this._resolveAnchors(t,e,n);return this._anchorCache.A0_G1}else{if(!this._anchorCache.A0_G0)this._anchorCache.A0_G0=this._resolveAnchors(t,e,n);return this._anchorCache.A0_G0}}_resolveAnchors(t,e,n){let r=this._items.map((s)=>s.resolveAnchors(e,n));return new qe(t,r,this._items.map((s)=>s.ruleId))}},qe=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){if(typeof this.scanner.dispose==="function")this.scanner.dispose()}toString(){let t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
1
+ import{Qr,ii,Mn,Nr,oi,si,pn}from"./chunk-vt40e1kp.js";var S=class extends Error{constructor(t){super(t);this.name="ShikiError"}};function tn(t){return Ne(t)}function Ne(t){if(Array.isArray(t))return nn(t);if(t instanceof RegExp)return t;if(typeof t==="object")return rn(t);return t}function nn(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=Ne(t[n]);return e}function rn(t){let e={};for(let n in t)e[n]=Ne(t[n]);return e}function Ve(t,...e){return e.forEach((n)=>{for(let r in n)t[r]=n[r]}),t}function Ye(t){let e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");if(e===0)return t;else if(~e===t.length-1)return Ye(t.substring(0,t.length-1));else return t.substr(~e+1)}var ye=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,J=class{static hasCaptures(t){if(t===null)return!1;return ye.lastIndex=0,ye.test(t)}static replaceCaptures(t,e,n){return t.replace(ye,(r,s,i,o)=>{let a=n[parseInt(s||i,10)];if(a){let c=e.substring(a.start,a.end);while(c[0]===".")c=c.substring(1);switch(o){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return r})}};function Je(t,e){if(t<e)return-1;if(t>e)return 1;return 0}function Qe(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let s=0;s<n;s++){let i=Je(t[s],e[s]);if(i!==0)return i}return 0}return n-r}function Fe(t){if(/^#[0-9a-f]{6}$/i.test(t))return!0;if(/^#[0-9a-f]{8}$/i.test(t))return!0;if(/^#[0-9a-f]{3}$/i.test(t))return!0;if(/^#[0-9a-f]{4}$/i.test(t))return!0;return!1}function Xe(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Ze=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);let e=this.fn(t);return this.cache.set(t,e),e}},M=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(an(t),e)}static createFromParsedTheme(t,e){return ln(t,e)}_cachedMatchRoot=new Ze((t)=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;let e=t.scopeName,r=this._cachedMatchRoot.get(e).find((s)=>sn(t.parent,s.parentScopes));if(!r)return null;return new et(r.fontStyle,r.foreground,r.background)}},be=class t{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(let r of n)e=new t(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new t(n,e[r]);return n}push(e){return new t(this,e)}getSegments(){let e=this,n=[];while(e)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){if(this===e)return!0;if(this.parent===null)return!1;return this.parent.extends(e)}getExtensionIfDefined(e){let n=[],r=this;while(r&&r!==e)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function sn(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],s=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],s=!0}while(t){if(on(t.scopeName,r))break;if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function on(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var et=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function an(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let s=0,i=e.length;s<i;s++){let o=e[s];if(!o.settings)continue;let a;if(typeof o.scope==="string"){let h=o.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),a=h.split(",")}else if(Array.isArray(o.scope))a=o.scope;else a=[""];let c=-1;if(typeof o.settings.fontStyle==="string"){c=0;let h=o.settings.fontStyle.split(" ");for(let d=0,f=h.length;d<f;d++)switch(h[d]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let l=null;if(typeof o.settings.foreground==="string"&&Fe(o.settings.foreground))l=o.settings.foreground;let u=null;if(typeof o.settings.background==="string"&&Fe(o.settings.background))u=o.settings.background;for(let h=0,d=a.length;h<d;h++){let m=a[h].trim().split(" "),y=m[m.length-1],_=null;if(m.length>1)_=m.slice(0,m.length-1),_.reverse();n[r++]=new cn(y,_,s,c,l,u)}}return n}var cn=class{constructor(t,e,n,r,s,i){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=s,this.background=i}},k=((t)=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(k||{});function ln(t,e){t.sort((c,l)=>{let u=Je(c.scope,l.scope);if(u!==0)return u;if(u=Qe(c.parentScopes,l.parentScopes),u!==0)return u;return c.index-l.index});let n=0,r="#000000",s="#ffffff";while(t.length>=1&&t[0].scope===""){let c=t.shift();if(c.fontStyle!==-1)n=c.fontStyle;if(c.foreground!==null)r=c.foreground;if(c.background!==null)s=c.background}let i=new un(e),o=new et(n,i.getId(r),i.getId(s)),a=new fn(new we(0,null,-1,0,0),[]);for(let c=0,l=t.length;c<l;c++){let u=t[c];a.insert(0,u.scope,u.parentScopes,u.fontStyle,i.getId(u.foreground),i.getId(u.background))}return new M(i,o,a)}var un=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},hn=Object.freeze([]),we=class t{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,s,i){this.scopeDepth=e,this.parentScopes=n||hn,this.fontStyle=r,this.foreground=s,this.background=i}clone(){return new t(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,s=e.length;r<s;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,s){if(this.scopeDepth>e)console.log("how did this happen?");else this.scopeDepth=e;if(n!==-1)this.fontStyle=n;if(r!==0)this.foreground=r;if(s!==0)this.background=s}},fn=class t{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,s=0;while(!0){if(e.parentScopes[r]===">")r++;if(n.parentScopes[s]===">")s++;if(r>=e.parentScopes.length||s>=n.parentScopes.length)break;let i=n.parentScopes[s].length-e.parentScopes[r].length;if(i!==0)return i;r++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,i;if(r===-1)s=e,i="";else s=e.substring(0,r),i=e.substring(r+1);if(this._children.hasOwnProperty(s))return this._children[s].match(i)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(t._cmpBySpecificity),n}insert(e,n,r,s,i,o){if(n===""){this._doInsertHere(e,r,s,i,o);return}let a=n.indexOf("."),c,l;if(a===-1)c=n,l="";else c=n.substring(0,a),l=n.substring(a+1);let u;if(this._children.hasOwnProperty(c))u=this._children[c];else u=new t(this._mainRule.clone(),we.cloneArr(this._rulesWithParentScopes)),this._children[c]=u;u.insert(e+1,l,r,s,i,o)}_doInsertHere(e,n,r,s,i){if(n===null){this._mainRule.acceptOverwrite(e,r,s,i);return}for(let o=0,a=this._rulesWithParentScopes.length;o<a;o++){let c=this._rulesWithParentScopes[o];if(Qe(c.parentScopes,n)===0){c.acceptOverwrite(e,r,s,i);return}}if(r===-1)r=this._mainRule.fontStyle;if(s===0)s=this._mainRule.foreground;if(i===0)i=this._mainRule.background;this._rulesWithParentScopes.push(new we(e,n,r,s,i))}},x=class t{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){let n=t.getLanguageId(e),r=t.getTokenType(e),s=t.getFontStyle(e),i=t.getForeground(e),o=t.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:i,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,s,i,o,a){let c=t.getLanguageId(e),l=t.getTokenType(e),u=t.containsBalancedBrackets(e)?1:0,h=t.getFontStyle(e),d=t.getForeground(e),f=t.getBackground(e);if(n!==0)c=n;if(r!==8)l=mn(r);if(s!==null)u=s?1:0;if(i!==-1)h=i;if(o!==0)d=o;if(a!==0)f=a;return(c<<0|l<<8|u<<10|h<<11|d<<15|f<<24)>>>0}};function dn(t){return t}function mn(t){return t}function X(t,e){let n=[],r=gn(t),s=r.next();while(s!==null){let c=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let l=o();if(n.push({matcher:l,priority:c}),s!==",")break;s=r.next()}return n;function i(){if(s==="-"){s=r.next();let c=i();return(l)=>!!c&&!c(l)}if(s==="("){s=r.next();let c=a();if(s===")")s=r.next();return c}if(De(s)){let c=[];do c.push(s),s=r.next();while(De(s));return(l)=>e(c,l)}return null}function o(){let c=[],l=i();while(l)c.push(l),l=i();return(u)=>c.every((h)=>h(u))}function a(){let c=[],l=o();while(l){if(c.push(l),s==="|"||s===",")do s=r.next();while(s==="|"||s===",");else break;l=o()}return(u)=>c.some((h)=>h(u))}}function De(t){return!!t&&!!t.match(/[\w\.:]+/)}function gn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;let r=n[0];return n=e.exec(t),r}}}function tt(t){if(typeof t.dispose==="function")t.dispose()}var j=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},_n=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},yn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){let e=t.toKey();if(this._seenReferenceKeys.has(e))return;this._seenReferenceKeys.add(e),this._references.push(t)}},bn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new j(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let t=this.Q;this.Q=[];let e=new yn;for(let n of t)Sn(n,this.initialScopeName,this.repo,e);for(let n of e.references)if(n instanceof j){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName))continue;if(this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Sn(t,e,n,r){let s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw Error(`No grammar provided for <${e}>`);return}let i=n.lookup(e);if(t instanceof j)Q({baseGrammar:i,selfGrammar:s},r);else Ce(t.ruleName,{baseGrammar:i,selfGrammar:s,repository:s.repository},r);let o=n.injections(t.scopeName);if(o)for(let a of o)r.add(new j(a))}function Ce(t,e,n){if(e.repository&&e.repository[t]){let r=e.repository[t];Z([r],e,n)}}function Q(t,e){if(t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns))Z(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e);if(t.selfGrammar.injections)Z(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function Z(t,e,n){for(let r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let s=r.repository?Ve({},e.repository,r.repository):e.repository;if(Array.isArray(r.patterns))Z(r.patterns,{...e,repository:s},n);let i=r.include;if(!i)continue;let o=nt(i);switch(o.kind){case 0:Q({...e,selfGrammar:e.baseGrammar},n);break;case 1:Q(e,n);break;case 2:Ce(o.ruleName,{...e,repository:s},n);break;case 3:case 4:let a=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){let c={baseGrammar:e.baseGrammar,selfGrammar:a,repository:s};if(o.kind===4)Ce(o.ruleName,c,n);else Q(c,n)}else if(o.kind===4)n.add(new _n(o.scopeName,o.ruleName));else n.add(new j(o.scopeName));break}}}var wn=class{kind=0},Cn=class{kind=1},kn=class{constructor(t){this.ruleName=t}kind=2},Rn=class{constructor(t){this.scopeName=t}kind=3},Nn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function nt(t){if(t==="$base")return new wn;else if(t==="$self")return new Cn;let e=t.indexOf("#");if(e===-1)return new Rn(t);else if(e===0)return new kn(t.substring(1));else{let n=t.substring(0,e),r=t.substring(e+1);return new Nn(n,r)}}var Tn=/\\(\d+)/,We=/\\(\d+)/g,ws=Symbol("RuleId"),vn=-1,rt=-2;function st(t){return t}function it(t){return t}var W=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=J.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=J.hasCaptures(this._contentName)}get debugName(){let t=this.$location?`${Ye(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){if(!this._nameIsCapturing||this._name===null||t===null||e===null)return this._name;return J.replaceCaptures(this._name,t,e)}getContentName(t,e){if(!this._contentNameIsCapturing||this._contentName===null)return this._contentName;return J.replaceCaptures(this._contentName,t,e)}},An=class extends W{retokenizeCapturedWithRuleId;constructor(t,e,n,r,s){super(t,e,n,r);this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,e){throw Error("Not supported!")}compile(t,e){throw Error("Not supported!")}compileAG(t,e,n,r){throw Error("Not supported!")}},En=class extends W{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,null);this._match=new F(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns)this._cachedCompiledPatterns=new D,this.collectPatterns(t,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}},He=class extends W{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,r);this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}collectPatterns(t,e){for(let n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns)this._cachedCompiledPatterns=new D,this.collectPatterns(t,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}},ke=class extends W{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s,i,o,a,c,l){super(t,e,n,r);this._begin=new F(s,this.id),this.beginCaptures=i,this._end=new F(o?o:"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new D;for(let n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);if(this.applyEndPatternLast)this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end);else this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}if(this._end.hasBackReferences)if(this.applyEndPatternLast)this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e);else this._cachedCompiledPatterns.setSource(0,e);return this._cachedCompiledPatterns}},ee=class extends W{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,s,i,o,a,c){super(t,e,n,r);this._begin=new F(s,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new F(o,rt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null;if(this._cachedCompiledWhilePatterns)this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new D;for(let e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){if(!this._cachedCompiledWhilePatterns)this._cachedCompiledWhilePatterns=new D,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while);if(this._while.hasBackReferences)this._cachedCompiledWhilePatterns.setSource(0,e?e:"￿");return this._cachedCompiledWhilePatterns}},ot=class t{static createCaptureRule(e,n,r,s,i){return e.registerRule((o)=>new An(n,o,r,s,i))}static getCompiledRuleId(e,n,r){if(!e.id)n.registerRule((s)=>{if(e.id=s,e.match)return new En(e.$vscodeTextmateLocation,e.id,e.name,e.match,t._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){if(e.repository)r=Ve({},r,e.repository);let i=e.patterns;if(typeof i>"u"&&e.include)i=[{include:e.include}];return new He(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,t._compilePatterns(i,n,r))}if(e.while)return new ee(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,t._compileCaptures(e.whileCaptures||e.captures,n,r),t._compilePatterns(e.patterns,n,r));return new ke(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,t._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,t._compilePatterns(e.patterns,n,r))});return e.id}static _compileCaptures(e,n,r){let s=[];if(e){let i=0;for(let o in e){if(o==="$vscodeTextmateLocation")continue;let a=parseInt(o,10);if(a>i)i=a}for(let o=0;o<=i;o++)s[o]=null;for(let o in e){if(o==="$vscodeTextmateLocation")continue;let a=parseInt(o,10),c=0;if(e[o].patterns)c=t.getCompiledRuleId(e[o],n,r);s[a]=t.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,c)}}return s}static _compilePatterns(e,n,r){let s=[];if(e)for(let i=0,o=e.length;i<o;i++){let a=e[i],c=-1;if(a.include){let l=nt(a.include);switch(l.kind){case 0:case 1:c=t.getCompiledRuleId(r[a.include],n,r);break;case 2:let u=r[l.ruleName];if(u)c=t.getCompiledRuleId(u,n,r);break;case 3:case 4:let h=l.scopeName,d=l.kind===4?l.ruleName:null,f=n.getExternalGrammar(h,r);if(f)if(d){let m=f.repository[d];if(m)c=t.getCompiledRuleId(m,n,f.repository)}else c=t.getCompiledRuleId(f.repository.$self,n,f.repository);break}}else c=t.getCompiledRuleId(a,n,r);if(c!==-1){let l=n.getRule(c),u=!1;if(l instanceof He||l instanceof ke||l instanceof ee){if(l.hasMissingPatterns&&l.patterns.length===0)u=!0}if(u)continue;s.push(c)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},F=class t{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e==="string"){let r=e.length,s=0,i=[],o=!1;for(let a=0;a<r;a++)if(e.charAt(a)==="\\"){if(a+1<r){let l=e.charAt(a+1);if(l==="z")i.push(e.substring(s,a)),i.push("$(?!\\n)(?<!\\n)"),s=a+2;else if(l==="A"||l==="G")o=!0;a++}}if(this.hasAnchor=o,s===0)this.source=e;else i.push(e.substring(s,r)),this.source=i.join("")}else this.hasAnchor=!1,this.source=e;if(this.hasAnchor)this._anchorCache=this._buildAnchorCache();else this._anchorCache=null;if(this.ruleId=n,typeof this.source==="string")this.hasBackReferences=Tn.test(this.source);else this.hasBackReferences=!1}clone(){return new t(this.source,this.ruleId)}setSource(e){if(this.source===e)return;if(this.source=e,this.hasAnchor)this._anchorCache=this._buildAnchorCache()}resolveBackReferences(e,n){if(typeof this.source!=="string")throw Error("This method should only be called if the source is a string");let r=n.map((s)=>e.substring(s.start,s.end));return We.lastIndex=0,this.source.replace(We,(s,i)=>Xe(r[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!=="string")throw Error("This method should only be called if the source is a string");let e=[],n=[],r=[],s=[],i,o,a,c;for(i=0,o=this.source.length;i<o;i++)if(a=this.source.charAt(i),e[i]=a,n[i]=a,r[i]=a,s[i]=a,a==="\\"){if(i+1<o){if(c=this.source.charAt(i+1),c==="A")e[i+1]="￿",n[i+1]="￿",r[i+1]="A",s[i+1]="A";else if(c==="G")e[i+1]="￿",n[i+1]="G",r[i+1]="￿",s[i+1]="G";else e[i+1]=c,n[i+1]=c,r[i+1]=c,s[i+1]=c;i++}}return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){if(!this.hasAnchor||!this._anchorCache||typeof this.source!=="string")return this.source;if(e)if(n)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;else if(n)return this._anchorCache.A0_G1;else return this._anchorCache.A0_G0}},D=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(){if(this._cached)this._cached.dispose(),this._cached=null;if(this._anchorCache.A0_G0)this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null;if(this._anchorCache.A0_G1)this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null;if(this._anchorCache.A1_G0)this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null;if(this._anchorCache.A1_G1)this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){if(this._items[t].source!==e)this._disposeCaches(),this._items[t].setSource(e)}compile(t){if(!this._cached){let e=this._items.map((n)=>n.source);this._cached=new qe(t,e,this._items.map((n)=>n.ruleId))}return this._cached}compileAG(t,e,n){if(!this._hasAnchors)return this.compile(t);else if(e)if(n){if(!this._anchorCache.A1_G1)this._anchorCache.A1_G1=this._resolveAnchors(t,e,n);return this._anchorCache.A1_G1}else{if(!this._anchorCache.A1_G0)this._anchorCache.A1_G0=this._resolveAnchors(t,e,n);return this._anchorCache.A1_G0}else if(n){if(!this._anchorCache.A0_G1)this._anchorCache.A0_G1=this._resolveAnchors(t,e,n);return this._anchorCache.A0_G1}else{if(!this._anchorCache.A0_G0)this._anchorCache.A0_G0=this._resolveAnchors(t,e,n);return this._anchorCache.A0_G0}}_resolveAnchors(t,e,n){let r=this._items.map((s)=>s.resolveAnchors(e,n));return new qe(t,r,this._items.map((s)=>s.ruleId))}},qe=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){if(typeof this.scanner.dispose==="function")this.scanner.dispose()}toString(){let t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
2
2
  `)}findNextMatchSync(t,e,n){let r=this.scanner.findNextMatchSync(t,e,n);if(!r)return null;return{ruleId:this.rules[r.index],captureIndices:r.captureIndices}}},Se=class{constructor(t,e){this.languageId=t,this.tokenType=e}},xn=class t{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new Se(e,8),this._embeddedLanguagesMatcher=new In(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){if(e===null)return t._NULL_SCOPE_METADATA;return this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new Se(0,0);_getBasicScopeAttributes=new Ze((e)=>{let n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Se(n,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){let n=e.match(t.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/},In=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);let e=t.map(([n,r])=>Xe(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;let e=t.match(this.scopesRegExp);if(!e)return;return this.values.get(e[1])}},Cs={InDebugMode:typeof process<"u"&&!!process.env.VSCODE_TEXTMATE_DEBUG},at=!1,ze=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function ct(t,e,n,r,s,i,o,a){let c=e.content.length,l=!1,u=-1;if(o){let f=Ln(t,e,n,r,s,i);s=f.stack,r=f.linePos,n=f.isFirstLine,u=f.anchorPosition}let h=Date.now();while(!l){if(a!==0){if(Date.now()-h>a)return new ze(s,!0)}d()}return new ze(s,!1);function d(){let f=Pn(t,e,n,r,s,u);if(!f){i.produce(s,c),l=!0;return}let{captureIndices:m,matchedRuleId:y}=f,_=m&&m.length>0?m[0].end>r:!1;if(y===vn){let p=s.getRule(t);i.produce(s,m[0].start),s=s.withContentNameScopesList(s.nameScopesList),B(t,e,n,s,i,p.endCaptures,m),i.produce(s,m[0].end);let g=s;if(s=s.parent,u=g.getAnchorPos(),!_&&g.getEnterPos()===r){s=g,i.produce(s,c),l=!0;return}}else{let p=t.getRule(y);i.produce(s,m[0].start);let g=s,b=p.getName(e.content,m),C=s.contentNameScopesList.pushAttributed(b,t);if(s=s.push(y,r,u,m[0].end===c,null,C,C),p instanceof ke){let R=p;B(t,e,n,s,i,R.beginCaptures,m),i.produce(s,m[0].end),u=m[0].end;let N=R.getContentName(e.content,m),E=C.pushAttributed(N,t);if(s=s.withContentNameScopesList(E),R.endHasBackReferences)s=s.withEndRule(R.getEndWithResolvedBackReferences(e.content,m));if(!_&&g.hasSameRuleAs(s)){s=s.pop(),i.produce(s,c),l=!0;return}}else if(p instanceof ee){let R=p;B(t,e,n,s,i,R.beginCaptures,m),i.produce(s,m[0].end),u=m[0].end;let N=R.getContentName(e.content,m),E=C.pushAttributed(N,t);if(s=s.withContentNameScopesList(E),R.whileHasBackReferences)s=s.withEndRule(R.getWhileWithResolvedBackReferences(e.content,m));if(!_&&g.hasSameRuleAs(s)){s=s.pop(),i.produce(s,c),l=!0;return}}else if(B(t,e,n,s,i,p.captures,m),i.produce(s,m[0].end),s=s.pop(),!_){s=s.safePop(),i.produce(s,c),l=!0;return}}if(m[0].end>r)r=m[0].end,n=!1}}function Ln(t,e,n,r,s,i){let o=s.beginRuleCapturedEOL?0:-1,a=[];for(let c=s;c;c=c.pop()){let l=c.getRule(t);if(l instanceof ee)a.push({rule:l,stack:c})}for(let c=a.pop();c;c=a.pop()){let{ruleScanner:l,findOptions:u}=On(c.rule,t,c.stack.endRule,n,r===o),h=l.findNextMatchSync(e,r,u);if(h){if(h.ruleId!==rt){s=c.stack.pop();break}if(h.captureIndices&&h.captureIndices.length){if(i.produce(c.stack,h.captureIndices[0].start),B(t,e,n,c.stack,i,c.rule.whileCaptures,h.captureIndices),i.produce(c.stack,h.captureIndices[0].end),o=h.captureIndices[0].end,h.captureIndices[0].end>r)r=h.captureIndices[0].end,n=!1}}else{s=c.stack.pop();break}}return{stack:s,linePos:r,anchorPosition:o,isFirstLine:n}}function Pn(t,e,n,r,s,i){let o=Gn(t,e,n,r,s,i),a=t.getInjections();if(a.length===0)return o;let c=Bn(a,t,e,n,r,s,i);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;if(u<l||c.priorityMatch&&u===l)return c;return o}function Gn(t,e,n,r,s,i){let o=s.getRule(t),{ruleScanner:a,findOptions:c}=lt(o,t,s.endRule,n,r===i),l=a.findNextMatchSync(e,r,c);if(l)return{captureIndices:l.captureIndices,matchedRuleId:l.ruleId};return null}function Bn(t,e,n,r,s,i,o){let a=Number.MAX_VALUE,c=null,l,u=0,h=i.contentNameScopesList.getScopeNames();for(let d=0,f=t.length;d<f;d++){let m=t[d];if(!m.matcher(h))continue;let y=e.getRule(m.ruleId),{ruleScanner:_,findOptions:p}=lt(y,e,null,r,s===o),g=_.findNextMatchSync(n,s,p);if(!g)continue;let b=g.captureIndices[0].start;if(b>=a)continue;if(a=b,c=g.captureIndices,l=g.ruleId,u=m.priority,a===s)break}if(c)return{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l};return null}function lt(t,e,n,r,s){if(at){let o=t.compile(e,n),a=ut(r,s);return{ruleScanner:o,findOptions:a}}return{ruleScanner:t.compileAG(e,n,r,s),findOptions:0}}function On(t,e,n,r,s){if(at){let o=t.compileWhile(e,n),a=ut(r,s);return{ruleScanner:o,findOptions:a}}return{ruleScanner:t.compileWhileAG(e,n,r,s),findOptions:0}}function ut(t,e){let n=0;if(!t)n|=1;if(!e)n|=4;return n}function B(t,e,n,r,s,i,o){if(i.length===0)return;let a=e.content,c=Math.min(i.length,o.length),l=[],u=o[0].end;for(let h=0;h<c;h++){let d=i[h];if(d===null)continue;let f=o[h];if(f.length===0)continue;if(f.start>u)break;while(l.length>0&&l[l.length-1].endPos<=f.start)s.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0)s.produceFromScopes(l[l.length-1].scopes,f.start);else s.produce(r,f.start);if(d.retokenizeCapturedWithRuleId){let y=d.getName(a,o),_=r.contentNameScopesList.pushAttributed(y,t),p=d.getContentName(a,o),g=_.pushAttributed(p,t),b=r.push(d.retokenizeCapturedWithRuleId,f.start,-1,!1,null,_,g),C=t.createOnigString(a.substring(0,f.end));ct(t,C,n&&f.start===0,f.start,b,s,!1,0),tt(C);continue}let m=d.getName(a,o);if(m!==null){let _=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(m,t);l.push(new $n(_,f.end))}}while(l.length>0)s.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var $n=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function jn(t,e,n,r,s,i,o,a){return new Dn(t,e,n,r,s,i,o,a)}function Ue(t,e,n,r,s){let i=X(e,te),o=ot.getCompiledRuleId(n,r,s.repository);for(let a of i)t.push({debugSelector:e,matcher:a.matcher,ruleId:o,grammar:s,priority:a.priority})}function te(t,e){if(e.length<t.length)return!1;let n=0;return t.every((r)=>{for(let s=n;s<e.length;s++)if(Fn(e[s],r))return n=s+1,!0;return!1})}function Fn(t,e){if(!t)return!1;if(t===e)return!0;let n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var Dn=class{constructor(t,e,n,r,s,i,o,a){if(this._rootScopeName=t,this.balancedBracketSelectors=i,this._onigLib=a,this._basicScopeAttributesProvider=new xn(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Ke(e,null),this._injections=null,this._tokenTypeMatchers=[],s)for(let c of Object.keys(s)){let l=X(c,te);for(let u of l)this._tokenTypeMatchers.push({matcher:u.matcher,type:s[c]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let t of this._ruleId2desc)if(t)t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){let t={lookup:(s)=>{if(s===this._rootScopeName)return this._grammar;return this.getExternalGrammar(s)},injections:(s)=>this._grammarRepository.injections(s)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){let s=r.injections;if(s)for(let o in s)Ue(e,o,s[o],this,r);let i=this._grammarRepository.injections(n);if(i)i.forEach((o)=>{let a=this.getExternalGrammar(o);if(a){let c=a.injectionSelector;if(c)Ue(e,c,a,this,a)}})}return e.sort((s,i)=>s.priority-i.priority),e}getInjections(){if(this._injections===null)this._injections=this._collectInjections();return this._injections}registerRule(t){let e=++this._lastRuleId,n=t(st(e));return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[it(t)]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];else if(this._grammarRepository){let n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=Ke(n,e&&e.$base),this._includedGrammars[t]}return}tokenizeLine(t,e,n=0){let r=this._tokenize(t,e,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,e,n=0){let r=this._tokenize(t,e,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,e,n,r){if(this._rootId===-1)this._rootId=ot.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections();let s;if(!e||e===Re.NULL){s=!0;let l=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=x.set(0,l.languageId,l.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),d=this.getRule(this._rootId).getName(null,null),f;if(d)f=O.createRootAndLookUpScopeName(d,h,this);else f=O.createRoot("unknown",h);e=new Re(null,this._rootId,-1,-1,!1,null,f,f)}else s=!1,e.reset();t=t+`
3
3
  `;let i=this.createOnigString(t),o=i.content.length,a=new Hn(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),c=ct(this,i,s,0,e,a,!0,r);return tt(i),{lineLength:o,lineTokens:a,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Ke(t,e){return t=tn(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var O=class t{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}static fromExtension(e,n){let r=e,s=e?.scopePath??null;for(let i of n)s=be.push(s,i.scopeNames),r=new t(r,s,i.encodedTokenAttributes);return r}static createRoot(e,n){return new t(null,new be(null,e),n)}static createRootAndLookUpScopeName(e,n,r){let s=r.getMetadataForScope(e),i=new be(null,e),o=r.themeProvider.themeMatch(i),a=t.mergeAttributes(n,s,o);return new t(null,i,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return t.equals(this,e)}static equals(e,n){do{if(e===n)return!0;if(!e&&!n)return!0;if(!e||!n)return!1;if(e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let s=-1,i=0,o=0;if(r!==null)s=r.fontStyle,i=r.foregroundId,o=r.backgroundId;return x.set(e,n.languageId,n.tokenType,null,s,i,o)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return t._pushAttributed(this,e,n);let r=e.split(/ /g),s=this;for(let i of r)s=t._pushAttributed(s,i,n);return s}static _pushAttributed(e,n,r){let s=r.getMetadataForScope(n),i=e.scopePath.push(n),o=r.themeProvider.themeMatch(i),a=t.mergeAttributes(e.tokenAttributes,s,o);return new t(e,i,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let n=[],r=this;while(r&&r!==e)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?n.reverse():void 0}},Re=class t{constructor(e,n,r,s,i,o,a,c){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=i,this.endRule=o,this.nameScopesList=a,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=s}_stackElementBrand=void 0;static NULL=new t(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){if(e===null)return!1;return t._equals(this,e)}static _equals(e,n){if(e===n)return!0;if(!this._structuralEquals(e,n))return!1;return O.equals(e.contentNameScopesList,n.contentNameScopesList)}static _structuralEquals(e,n){do{if(e===n)return!0;if(!e&&!n)return!0;if(!e||!n)return!1;if(e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){while(e)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){t._reset(this)}pop(){return this.parent}safePop(){if(this.parent)return this.parent;return this}push(e,n,r,s,i,o,a){return new t(this,e,n,r,s,i,o,a)}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,n){if(this.parent)n=this.parent._writeString(e,n);return e[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(e){if(this.contentNameScopesList===e)return this;return this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){if(this.endRule===e)return this;return new t(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;while(n&&n._enterPos===e._enterPos){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:it(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){let r=O.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new t(e,st(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,O.fromExtension(r,n.contentNameScopesList))}},Wn=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap((n)=>{if(n==="*")return this.allowAny=!0,[];return X(n,te).map((r)=>r.matcher)}),this.unbalancedBracketScopes=e.flatMap((n)=>X(n,te).map((r)=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(let e of this.unbalancedBracketScopes)if(e(t))return!1;for(let e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},Hn=class{constructor(t,e,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=t?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways)s=!0;if(this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let i=t?.getScopeNames()??[];for(let o of this._tokenTypeOverrides)if(o.matcher(i))r=x.set(r,0,dn(o.type),null,-1,0,0);if(this.balancedBracketSelectors)s=this.balancedBracketSelectors.match(i)}if(s)r=x.set(r,0,8,s,-1,0,0);if(this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}let n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){if(this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1)this._tokens.pop();if(this._tokens.length===0)this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0;return this._tokens}getBinaryResult(t,e){if(this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1)this._binaryTokens.pop(),this._binaryTokens.pop();if(this._binaryTokens.length===0)this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0;let n=new Uint32Array(this._binaryTokens.length);for(let r=0,s=this._binaryTokens.length;r<s;r++)n[r]=this._binaryTokens[r];return n}},qn=class{constructor(t,e){this._onigLib=e,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){if(this._rawGrammars.set(t.scopeName,t),e)this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,s){if(!this._grammars.has(t)){let i=this._rawGrammars.get(t);if(!i)return null;this._grammars.set(t,jn(t,i,e,n,r,s,this,this._onigLib))}return this._grammars.get(t)}},ht=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new qn(M.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,e){this._syncRegistry.setTheme(M.createFromRawTheme(t,e))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,e,n){return this.loadGrammarWithConfiguration(t,e,{embeddedLanguages:n})}loadGrammarWithConfiguration(t,e,n){return this._loadGrammar(t,e,n.embeddedLanguages,n.tokenTypes,new Wn(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,e,n,r,s){let i=new bn(this._syncRegistry,t);while(i.Q.length>0)i.Q.map((o)=>this._loadSingleGrammar(o.scopeName)),i.processQueue();return this._grammarForScopeName(t,e,n,r,s)}_loadSingleGrammar(t){if(!this._ensureGrammarCache.has(t))this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0)}_doLoadSingleGrammar(t){let e=this._options.loadGrammar(t);if(e){let n=typeof this._options.getInjections==="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(e,n)}}addGrammar(t,e=[],n=0,r=null){return this._syncRegistry.addGrammar(t,e),this._grammarForScopeName(t.scopeName,n,r)}_grammarForScopeName(t,e=0,n=null,r=null,s=null){return this._syncRegistry.grammarForScopeName(t,e,n,r,s)}},ne=Re.NULL;function q(t,e){let n=typeof t==="string"?{}:{...t.colorReplacements},r=typeof t==="string"?t:t.name;for(let[s,i]of Object.entries(e?.colorReplacements||{}))if(typeof i==="string")n[s]=i;else if(s===r)Object.assign(n,i);return n}function v(t,e){if(!t)return t;return e?.[t?.toLowerCase()]||t}function pt(t){return Array.isArray(t)?t:[t]}async function Te(t){return Promise.resolve(typeof t==="function"?t():t).then((e)=>e.default||e)}function z(t){return!t||["plaintext","txt","text","plain"].includes(t)}function _t(t){return t==="ansi"||z(t)}function U(t){return t==="none"}function yt(t){return U(t)}var zn=/(\r?\n)/g;function P(t,e=!1){if(t.length===0)return[["",0]];let n=t.split(zn),r=0,s=[];for(let i=0;i<n.length;i+=2){let o=e?n[i]+(n[i+1]||""):n[i];s.push([o,r]),r+=n[i].length,r+=n[i+1]?.length||0}return s}var ft={light:"#333333",dark:"#bbbbbb"},dt={light:"#fffffe",dark:"#1e1e1e"},mt="__shiki_resolved";function re(t){if(t?.[mt])return t;let e={...t};if(e.tokenColors&&!e.settings)e.settings=e.tokenColors,delete e.tokenColors;e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:r}=e;if(!n||!r){let a=e.settings?e.settings.find((c)=>!c.name&&!c.scope):void 0;if(a?.settings?.foreground)r=a.settings.foreground;if(a?.settings?.background)n=a.settings.background;if(!r&&e?.colors?.["editor.foreground"])r=e.colors["editor.foreground"];if(!n&&e?.colors?.["editor.background"])n=e.colors["editor.background"];if(!r)r=e.type==="light"?ft.light:ft.dark;if(!n)n=e.type==="light"?dt.light:dt.dark;e.fg=r,e.bg=n}if(!(e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope))e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let s=0,i=new Map;function o(a){if(i.has(a))return i.get(a);s+=1;let c=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;if(e.colorReplacements?.[`#${c}`])return o(a);return i.set(a,c),c}e.settings=e.settings.map((a)=>{let c=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),l=a.settings?.background&&!a.settings.background.startsWith("#");if(!c&&!l)return a;let u={...a,settings:{...a.settings}};if(c){let h=o(a.settings.foreground);e.colorReplacements[h]=a.settings.foreground,u.settings.foreground=h}if(l){let h=o(a.settings.background);e.colorReplacements[h]=a.settings.background,u.settings.background=h}return u});for(let a of Object.keys(e.colors||{}))if(a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi")){if(!e.colors[a]?.startsWith("#")){let c=o(e.colors[a]);e.colorReplacements[c]=e.colors[a],e.colors[a]=c}}return Object.defineProperty(e,mt,{enumerable:!1,writable:!1,value:!0}),e}async function bt(t){return[...new Set((await Promise.all(t.filter((e)=>!_t(e)).map(async(e)=>await Te(e).then((n)=>Array.isArray(n)?n:[n])))).flat())]}async function St(t){return(await Promise.all(t.map(async(e)=>yt(e)?null:re(await Te(e))))).filter((e)=>!!e)}function wt(t,e){if(!e)return t;if(e[t]){let n=new Set([t]);while(e[t]){if(t=e[t],n.has(t))throw new S(`Circular alias \`${[...n].join(" -> ")} -> ${t}\``);n.add(t)}}return t}var Un=class extends ht{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,e,n,r={}){super(t);this._resolver=t,this._themes=e,this._langs=n,this._alias=r,this._themes.map((s)=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(t){if(typeof t==="string")return this._resolvedThemes.get(t);else return this.loadTheme(t)}loadTheme(t){let e=re(t);if(e.name)this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null;return e}getLoadedThemes(){if(!this._loadedThemesCache)this._loadedThemesCache=[...this._resolvedThemes.keys()];return this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);if(!e)e=M.createFromRawTheme(t),this._textmateThemeCache.set(t,e);this._syncRegistry.setTheme(e)}getGrammar(t){return t=wt(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;let e=new Set([...this._langMap.values()].filter((s)=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);let n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);let r=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(r.name=t.name,this._resolvedGrammars.set(t.name,r),t.aliases)t.aliases.forEach((s)=>{this._alias[s]=t.name});if(this._loadedLanguagesCache=null,e.size)for(let s of e)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(let r of t)this.resolveEmbeddedLanguages(r);let e=[...this._langGraph.entries()],n=e.filter(([r,s])=>!s);if(n.length){let r=e.filter(([s,i])=>{if(!i)return!1;return(i.embeddedLanguages||i.embeddedLangs)?.some((o)=>n.map(([a])=>a).includes(o))}).filter((s)=>!n.includes(s));throw new S(`Missing languages ${n.map(([s])=>`\`${s}\``).join(", ")}, required by ${r.map(([s])=>`\`${s}\``).join(", ")}`)}for(let[r,s]of e)this._resolver.addLanguage(s);for(let[r,s]of e)this.loadLanguage(s)}getLoadedLanguages(){if(!this._loadedLanguagesCache)this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])];return this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);let e=t.embeddedLanguages??t.embeddedLangs;if(e)for(let n of e)this._langGraph.set(n,this._langMap.get(n))}},Kn=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:(n)=>t.createScanner(n),createOnigString:(n)=>t.createString(n)},e.forEach((n)=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){if(this._langs.set(t.name,t),t.aliases)t.aliases.forEach((e)=>{this._langs.set(e,t)});if(this._scopeToLang.set(t.scopeName,t),t.injectTo)t.injectTo.forEach((e)=>{if(!this._injections.get(e))this._injections.set(e,[]);this._injections.get(e).push(t.scopeName)})}getInjections(t){let e=t.split("."),n=[];for(let r=1;r<=e.length;r++){let s=e.slice(0,r).join(".");n=[...n,...this._injections.get(s)||[]]}return n}},H=0;function ve(t){if(H+=1,t.warnings!==!1&&H>=10&&H%10===0)console.warn(`[Shiki] ${H} 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 e=!1;if(!t.engine)throw new S("`engine` option is required for synchronous mode");let n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(re),s=new Un(new Kn(t.engine,n),r,n,t.langAlias),i;function o(g){return wt(g,t.langAlias)}function a(g){_();let b=s.getGrammar(typeof g==="string"?g:g.name);if(!b)throw new S(`Language \`${g}\` not found, you may need to load it first`);return b}function c(g){if(g==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};_();let b=s.getTheme(g);if(!b)throw new S(`Theme \`${g}\` not found, you may need to load it first`);return b}function l(g){_();let b=c(g);if(i!==g)s.setTheme(b),i=g;return{theme:b,colorMap:s.getColorMap()}}function u(){return _(),s.getLoadedThemes()}function h(){return _(),s.getLoadedLanguages()}function d(...g){_(),s.loadLanguages(g.flat(1))}async function f(...g){return d(await bt(g))}function m(...g){_();for(let b of g.flat(1))s.loadTheme(b)}async function y(...g){return _(),m(await St(g))}function _(){if(e)throw new S("Shiki instance has been disposed")}function p(){if(e)return;e=!0,s.dispose(),H-=1}return{setTheme:l,getTheme:c,getLanguage:a,getLoadedThemes:u,getLoadedLanguages:h,resolveLangAlias:o,loadLanguage:f,loadLanguageSync:d,loadTheme:y,loadThemeSync:m,dispose:p,[Symbol.dispose]:p}}async function Ae(t){if(!t.engine)console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[e,n,r]=await Promise.all([St(t.themes||[]),bt(t.langs||[]),t.engine]);return ve({...t,themes:e,langs:n,engine:r})}var Ct=new WeakMap;function K(t,e){Ct.set(t,e)}function G(t){return Ct.get(t)}var se=class t{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new t(Object.fromEntries(pt(n).map((r)=>[r,ne])),e)}constructor(...e){if(e.length===2){let[n,r]=e;this.lang=r,this._stacks=n}else{let[n,r,s]=e;this.lang=r,this._stacks={[s]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Vn(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Vn(t){let e=[],n=new Set;function r(s){if(n.has(s))return;n.add(s);let i=s?.nameScopesList?.scopeName;if(i)e.push(i);if(s.parent)r(s.parent)}return r(t),e}function Yn(t,e){if(!(t instanceof se))throw new S("Invalid grammar state");return t.getInternalStack(e)}var Jn=/,/,Qn=/ /;function Ee(t,e,n={}){let{theme:r=t.getLoadedThemes()[0]}=n;if(z(t.resolveLangAlias(n.lang||"text"))||U(r))return P(e).map((a)=>[{content:a[0],offset:a[1]}]);let{theme:s,colorMap:i}=t.setTheme(r),o=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==o.name)throw new S(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(s.name))throw new S(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return Rt(e,o,s,i,n)}function kt(...t){if(t.length===2)return G(t[1]);let[e,n,r={}]=t,{lang:s="text",theme:i=e.getLoadedThemes()[0]}=r;if(z(s)||U(i))throw new S("Plain language does not have grammar state");if(s==="ansi")throw new S("ANSI language does not have grammar state");let{theme:o,colorMap:a}=e.setTheme(i),c=e.getLanguage(s);return new se(xe(n,c,o,a,r).stateStack,c.name,o.name)}function Rt(t,e,n,r,s){let i=xe(t,e,n,r,s),o=new se(i.stateStack,e.name,n.name);return K(i.tokens,o),i.tokens}function xe(t,e,n,r,s){let i=q(n,s),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:a=500,includeExplanation:c=!1}=s,l=P(t),u=s.grammarState?Yn(s.grammarState,n.name)??ne:s.grammarContextCode!=null?xe(s.grammarContextCode,e,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:ne,h=[],d=[];for(let f=0,m=l.length;f<m;f++){let[y,_]=l[f];if(y===""){h=[],d.push([]);continue}if(o>0&&y.length>=o){h=[],d.push([{content:y,offset:_,color:"",fontStyle:0}]);continue}let p,g,b;if(c&&c!=="tokenType")p=e.tokenizeLine(y,u,a),g=p.tokens,b=0;let C=e.tokenizeLine2(y,u,a),R=C.tokens.length/2;for(let N=0;N<R;N++){let E=C.tokens[2*N],ge=N+1<R?C.tokens[2*N+2]:y.length;if(E===ge)continue;let pe=C.tokens[2*N+1],Zt=v(r[x.getForeground(pe)],i),en=x.getFontStyle(pe),Y={content:y.substring(E,ge),offset:_+E,color:Zt,fontStyle:en};if(c==="tokenType")Y.type=x.getTokenType(pe);else if(c){let Me=[];if(c!=="scopeName")for(let T of n.settings){let L;switch(typeof T.scope){case"string":L=T.scope.split(Jn).map((_e)=>_e.trim());break;case"object":L=T.scope;break;default:continue}Me.push({settings:T,selectors:L.map((_e)=>_e.split(Qn))})}Y.explanation=[];let je=0;while(E+je<ge){let T=g[b],L=y.substring(T.startIndex,T.endIndex);je+=L.length,Y.explanation.push({content:L,scopes:c==="scopeName"?Xn(T.scopes):Zn(Me,T.scopes)}),b+=1}}h.push(Y)}d.push(h),h=[],u=C.ruleStack}return{tokens:d,stateStack:u}}function Xn(t){return t.map((e)=>({scopeName:e}))}function Zn(t,e){let n=[];for(let r=0,s=e.length;r<s;r++){let i=e[r];n[r]={scopeName:i,themeMatches:tr(t,i,e.slice(0,r))}}return n}function gt(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function er(t,e,n){if(!gt(t.at(-1),e))return!1;let r=t.length-2,s=n.length-1;while(r>=0&&s>=0){if(gt(t[r],n[s]))r-=1;s-=1}if(r===-1)return!0;return!1}function tr(t,e,n){let r=[];for(let{selectors:s,settings:i}of t)for(let o of s)if(er(o,e,n)){r.push(i);break}return r}function ie(t,e,n,r=Ee){let s=Object.entries(n.themes).filter((l)=>l[1]).map((l)=>({color:l[0],theme:l[1]})),i=s.map((l)=>{let u=r(t,e,{...n,theme:l.theme});return{tokens:u,state:G(u),theme:typeof l.theme==="string"?l.theme:l.theme.name}}),o=nr(...i.map((l)=>l.tokens)),a=o[0].map((l,u)=>l.map((h,d)=>{let f={content:h.content,variants:{},offset:h.offset};if("includeExplanation"in n&&n.includeExplanation)f.explanation=h.explanation;return o.forEach((m,y)=>{let{content:_,explanation:p,offset:g,...b}=m[u][d];f.variants[s[y].color]=b}),f})),c=i[0].state?new se(Object.fromEntries(i.map((l)=>[l.theme,l.state?.getInternalStack(l.theme)])),i[0].state.lang):void 0;if(c)K(a,c);return a}function nr(...t){let e=t.map(()=>[]),n=t.length;for(let r=0;r<t[0].length;r++){let s=t.map((c)=>c[r]),i=e.map(()=>[]);e.forEach((c,l)=>c.push(i[l]));let o=s.map(()=>0),a=s.map((c)=>c[0]);while(a.every((c)=>c)){let c=Math.min(...a.map((l)=>l.content.length));for(let l=0;l<n;l++){let u=a[l];if(u.content.length===c)i[l].push(u),o[l]+=1,a[l]=s[l][o[l]];else i[l].push({...u,content:u.content.slice(0,c)}),a[l]={...u,content:u.content.slice(c),offset:u.offset+c}}}}return e}var Nt=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Tt={}.hasOwnProperty;function vt(t,e){let n=e||{};function r(s,...i){let{invalid:o,handlers:a}=r;if(s&&Tt.call(s,t)){let c=String(s[t]);o=Tt.call(a,c)?a[c]:r.unknown}if(o)return o.call(this,s,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var rr=/["&'<>`]/g,sr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ir=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,or=/[|\\{}()[\]^$+*?.]/g,At=new WeakMap;function Et(t,e){if(t=t.replace(e.subset?ar(e.subset):rr,r),e.subset||e.escapeOnly)return t;return t.replace(sr,n).replace(ir,r);function n(s,i,o){return e.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,o.charCodeAt(i+2),e)}function r(s,i,o){return e.format(s.charCodeAt(0),o.charCodeAt(i+1),e)}}function ar(t){let e=At.get(t);if(!e)e=cr(t),At.set(t,e);return e}function cr(t){let e=[],n=-1;while(++n<t.length)e.push(t[n].replace(or,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}var lr=/[\dA-Fa-f]/;function xt(t,e,n){let r="&#x"+t.toString(16).toUpperCase();return n&&e&&!lr.test(String.fromCharCode(e))?r:r+";"}var ur=/\d/;function It(t,e,n){let r="&#"+String(t);return n&&e&&!ur.test(String.fromCharCode(e))?r:r+";"}var Lt=["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"];var oe={nbsp:" ",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:"€"};var Pt=["cent","copy","divide","gt","lt","not","para","times"];var Gt={}.hasOwnProperty,Ie={},ae;for(ae in oe)if(Gt.call(oe,ae))Ie[oe[ae]]=ae;var hr=/[^\dA-Za-z]/;function Bt(t,e,n,r){let s=String.fromCharCode(t);if(Gt.call(Ie,s)){let i=Ie[s],o="&"+i;if(n&&Lt.includes(i)&&!Pt.includes(i)&&(!r||e&&e!==61&&hr.test(String.fromCharCode(e))))return o;return o+";"}return""}function Ot(t,e,n){let r=xt(t,e,n.omitOptionalSemicolons),s;if(n.useNamedReferences||n.useShortestReferences)s=Bt(t,e,n.omitOptionalSemicolons,n.attribute);if((n.useShortestReferences||!s)&&n.useShortestReferences){let i=It(t,e,n.omitOptionalSemicolons);if(i.length<r.length)r=i}return s&&(!n.useShortestReferences||s.length<r.length)?s:r}function A(t,e){return Et(t,Object.assign({format:Ot},e))}var fr=/^>|^->|<!--|-->|--!>|<!-$/g,dr=[">"],mr=["<",">"];function $t(t,e,n,r){return r.settings.bogusComments?"<?"+A(t.value,Object.assign({},r.settings.characterReferences,{subset:dr}))+">":"<!--"+t.value.replace(fr,s)+"-->";function s(i){return A(i,Object.assign({},r.settings.characterReferences,{subset:mr}))}}function Mt(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}var w=jt(1),Le=jt(-1),gr=[];function jt(t){return e;function e(n,r,s){let i=n?n.children:gr,o=(r||0)+t,a=i[o];if(!s)while(a&&pn(a))o+=t,a=i[o];return a}}var pr={}.hasOwnProperty;function ce(t){return e;function e(n,r,s){return pr.call(t,n.tagName)&&t[n.tagName](n,r,s)}}var V=ce({body:yr,caption:Pe,colgroup:Pe,dd:Cr,dt:wr,head:Pe,html:_r,li:Sr,optgroup:kr,option:Rr,p:br,rp:Ft,rt:Ft,tbody:vr,td:Dt,tfoot:Ar,th:Dt,thead:Tr,tr:Er});function Pe(t,e,n){let r=w(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&pn(r.value.charAt(0)))}function _r(t,e,n){let r=w(n,e);return!r||r.type!=="comment"}function yr(t,e,n){let r=w(n,e);return!r||r.type!=="comment"}function br(t,e,n){let r=w(n,e);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 Sr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&r.tagName==="li"}function wr(t,e,n){let r=w(n,e);return Boolean(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Cr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Ft(t,e,n){let r=w(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function kr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Rr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Tr(t,e,n){let r=w(n,e);return Boolean(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function vr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Ar(t,e,n){return!w(n,e)}function Er(t,e,n){let r=w(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function Dt(t,e,n){let r=w(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var Wt=ce({body:Lr,colgroup:Pr,head:Ir,html:xr,tbody:Gr});function xr(t){let e=w(t,-1);return!e||e.type!=="comment"}function Ir(t){let e=new Set;for(let r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}let n=t.children[0];return!n||n.type==="element"}function Lr(t){let e=w(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&pn(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Pr(t,e,n){let r=Le(n,e),s=w(t,-1,!0);if(n&&r&&r.type==="element"&&r.tagName==="colgroup"&&V(r,n.children.indexOf(r),n))return!1;return Boolean(s&&s.type==="element"&&s.tagName==="col")}function Gr(t,e,n){let r=Le(n,e),s=w(t,-1);if(n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&V(r,n.children.indexOf(r),n))return!1;return Boolean(s&&s.type==="element"&&s.tagName==="tr")}var le={name:[[`
4
4
  \f\r &/=>`.split(""),`
@@ -0,0 +1 @@
1
+ import{Si}from"./chunk-taynqrgq.js";export{Si as createArchitectureServices};
@@ -1,2 +1,2 @@
1
- import{e,p}from"./chunk-jtwhjp20.js";var fe=e((o,t)=>{let n;if(t==="sandbox")n=p("#i"+o);return(t==="sandbox"?p(n.nodes()[0].contentDocument.body):p("body")).select(`[id="${o}"]`)},"getDiagramElement");
1
+ import{e,p}from"./chunk-y0m8hrwz.js";var fe=e((o,t)=>{let n;if(t==="sandbox")n=p("#i"+o);return(t==="sandbox"?p(n.nodes()[0].contentDocument.body):p("body")).select(`[id="${o}"]`)},"getDiagramElement");
2
2
  export{fe};
@@ -0,0 +1 @@
1
+ import{bi}from"./chunk-taynqrgq.js";export{bi as createCynefinServices};
@@ -1,4 +1,4 @@
1
- import{At,x}from"./chunk-32ezm0ry.js";var un={};At(un,{AbnfAlternation:()=>Eo,AbnfConcatenation:()=>Co,AbnfElement:()=>vi,AbnfGroup:()=>bo,AbnfNumVal:()=>_o,AbnfOptionalGroup:()=>So,AbnfPrimary:()=>hr,AbnfRule:()=>$i,AbnfRuleName:()=>wo,AbnfStringLiteral:()=>Po,AbstractMermaidTokenBuilder:()=>ce,AbstractMermaidValueConverter:()=>Ie,Architecture:()=>ot,ArchitectureGrammarGeneratedModule:()=>Ml,Branch:()=>Zn,Commit:()=>Tr,CommonTokenBuilder:()=>kR,CommonValueConverter:()=>Je,Cynefin:()=>Yt,CynefinGrammarGeneratedModule:()=>Dl,DomainBlock:()=>Qn,DomainItem:()=>Hi,EbnfChoice:()=>ko,EbnfExceptionPostfix:()=>Io,EbnfGroup:()=>No,EbnfNonTerminal:()=>Oo,EbnfOneOrMorePostfix:()=>Mo,EbnfOptional:()=>Do,EbnfOptionalPostfix:()=>Lo,EbnfPostfix:()=>tn,EbnfPrimary:()=>Kt,EbnfRepetition:()=>xo,EbnfRule:()=>Ri,EbnfSequence:()=>Go,EbnfSpecial:()=>Fo,EbnfTerm:()=>Ai,EbnfTerminal:()=>jo,EbnfZeroOrMorePostfix:()=>zo,EmDataEntity:()=>yr,EmFrame:()=>Wt,EmptyFileSystem:()=>le,EventModel:()=>ht,EventModelingGeneratedModule:()=>Ll,GitGraph:()=>Xt,GitGraphGrammarGeneratedModule:()=>xl,Info:()=>sn,InfoGrammarGeneratedModule:()=>Gl,Merge:()=>Rr,MermaidGeneratedSharedModule:()=>ue,Packet:()=>Ar,PacketBlock:()=>Er,PacketGrammarGeneratedModule:()=>Fl,PegAny:()=>Bo,PegGroup:()=>Uo,PegIdentifier:()=>Vo,PegLiteral:()=>Ko,PegOrderedChoice:()=>Wo,PegPrefix:()=>Ei,PegPrimary:()=>rn,PegRule:()=>Pi,PegSequence:()=>qo,PegSuffix:()=>Ii,Pie:()=>Jt,PieGrammarGeneratedModule:()=>jl,PieSection:()=>ea,Radar:()=>qt,RadarGrammarGeneratedModule:()=>zl,Railroad:()=>Cr,RailroadAbnf:()=>br,RailroadAbnfGrammarGeneratedModule:()=>Bl,RailroadChoiceExpr:()=>Ho,RailroadEbnf:()=>_r,RailroadEbnfGrammarGeneratedModule:()=>Ul,RailroadExpression:()=>yt,RailroadGrammarGeneratedModule:()=>Vl,RailroadNonTerminalExpr:()=>Yo,RailroadOneOrMoreExpr:()=>Xo,RailroadOptionalExpr:()=>Jo,RailroadPeg:()=>Sr,RailroadPegGrammarGeneratedModule:()=>Kl,RailroadRule:()=>Ni,RailroadSequenceExpr:()=>Zo,RailroadSpecialExpr:()=>Qo,RailroadTerminalExpr:()=>el,RailroadZeroOrMoreExpr:()=>tl,Statement:()=>gr,Transition:()=>on,TreeNode:()=>vr,TreeView:()=>nn,TreeViewGrammarGeneratedModule:()=>ql,Treemap:()=>wr,TreemapGrammarGeneratedModule:()=>Wl,Wardley:()=>Oe,WardleyGrammarGeneratedModule:()=>Hl,__name:()=>i,createDefaultCoreModule:()=>ae,createDefaultSharedCoreModule:()=>ie,inject:()=>W,isArchitecture:()=>Vp,isBranch:()=>Kp,isCommit:()=>Wp,isCynefin:()=>qp,isDomainBlock:()=>Hp,isDomainItem:()=>Yp,isEmModelEntityType:()=>Xp,isEmResetFrame:()=>$r,isGitGraph:()=>Jp,isInfo:()=>Zp,isMerge:()=>Qp,isPacket:()=>ed,isPacketBlock:()=>td,isPie:()=>rd,isPieSection:()=>nd,isRailroad:()=>ad,isRailroadAbnf:()=>id,isRailroadEbnf:()=>sd,isRailroadPeg:()=>od,isTransition:()=>ld,isTreemap:()=>ud,isWardley:()=>cd});var{create:rA,defineProperty:Yi,getOwnPropertyDescriptor:nA,getOwnPropertyNames:Sf,getPrototypeOf:aA}=Object,iA=Object.prototype.hasOwnProperty,i=(e,t)=>Yi(e,"name",{value:t,configurable:!0}),sA=(e,t)=>function(){return e&&(t=(0,e[Sf(e)[0]])(e=0)),t},Z=(e,t)=>function(){return t||(0,e[Sf(e)[0]])((t={exports:{}}).exports,t),t.exports},oA=(e,t)=>{for(var r in t)Yi(e,r,{get:t[r],enumerable:!0})},Nm=(e,t,r,n)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let a of Sf(t))if(!iA.call(e,a)&&a!==r)Yi(e,a,{get:()=>t[a],enumerable:!(n=nA(t,a))||n.enumerable})}return e},wf=(e,t,r)=>(r=e!=null?rA(aA(e)):{},Nm(t||!e||!e.__esModule?Yi(r,"default",{value:e,enumerable:!0}):r,e)),Pf=(e)=>Nm(Yi({},"__esModule",{value:!0}),e),Xi=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/is.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.boolean=t,e.string=r,e.number=n,e.error=a,e.func=s,e.array=o,e.stringArray=l;function t(u){return u===!0||u===!1}i(t,"boolean");function r(u){return typeof u==="string"||u instanceof String}i(r,"string");function n(u){return typeof u==="number"||u instanceof Number}i(n,"number");function a(u){return u instanceof Error}i(a,"error");function s(u){return typeof u==="function"}i(s,"func");function o(u){return Array.isArray(u)}i(o,"array");function l(u){return o(u)&&u.every((c)=>r(c))}i(l,"stringArray")}}),Om=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){var t=e&&e.__createBinding||(Object.create?function(A,g,C,N){if(N===void 0)N=C;var S=Object.getOwnPropertyDescriptor(g,C);if(!S||("get"in S?!g.__esModule:S.writable||S.configurable))S={enumerable:!0,get:i(function(){return g[C]},"get")};Object.defineProperty(A,N,S)}:function(A,g,C,N){if(N===void 0)N=C;A[N]=g[C]}),r=e&&e.__setModuleDefault||(Object.create?function(A,g){Object.defineProperty(A,"default",{enumerable:!0,value:g})}:function(A,g){A.default=g}),n=e&&e.__importStar||function(){var A=i(function(g){return A=Object.getOwnPropertyNames||function(C){var N=[];for(var S in C)if(Object.prototype.hasOwnProperty.call(C,S))N[N.length]=S;return N},A(g)},"ownKeys");return function(g){if(g&&g.__esModule)return g;var C={};if(g!=null){for(var N=A(g),S=0;S<N.length;S++)if(N[S]!=="default")t(C,g,N[S])}return r(C,g),C}}();Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var a=n(Xi()),s;(function(A){A.ParseError=-32700,A.InvalidRequest=-32600,A.MethodNotFound=-32601,A.InvalidParams=-32602,A.InternalError=-32603,A.jsonrpcReservedErrorRangeStart=-32099,A.serverErrorStart=-32099,A.MessageWriteError=-32099,A.MessageReadError=-32098,A.PendingResponseRejected=-32097,A.ConnectionInactive=-32096,A.ServerNotInitialized=-32002,A.UnknownErrorCode=-32001,A.jsonrpcReservedErrorRangeEnd=-32000,A.serverErrorEnd=-32000})(s||(e.ErrorCodes=s={}));var o=class A extends Error{static{i(this,"ResponseError")}code;data;constructor(g,C,N){super(C);this.code=a.number(g)?g:s.UnknownErrorCode,this.data=N,Object.setPrototypeOf(this,A.prototype)}toJson(){let g={code:this.code,message:this.message};if(this.data!==void 0)g.data=this.data;return g}};e.ResponseError=o;var l=class A{static{i(this,"ParameterStructures")}kind;static auto=new A("auto");static byPosition=new A("byPosition");static byName=new A("byName");constructor(g){this.kind=g}static is(g){return g===A.auto||g===A.byName||g===A.byPosition}toString(){return this.kind}};e.ParameterStructures=l;var u=class{static{i(this,"AbstractMessageSignature")}method;numberOfParams;constructor(A,g){this.method=A,this.numberOfParams=g}get parameterStructures(){return l.auto}};e.AbstractMessageSignature=u;var c=class extends u{static{i(this,"RequestType0")}_;constructor(A){super(A,0)}};e.RequestType0=c;var p=class extends u{static{i(this,"RequestType")}_parameterStructures;_;constructor(A,g=l.auto){super(A,1);this._parameterStructures=g}get parameterStructures(){return this._parameterStructures}};e.RequestType=p;var h=class extends u{static{i(this,"RequestType1")}_parameterStructures;_;constructor(A,g=l.auto){super(A,1);this._parameterStructures=g}get parameterStructures(){return this._parameterStructures}};e.RequestType1=h;var y=class extends u{static{i(this,"RequestType2")}_;constructor(A){super(A,2)}};e.RequestType2=y;var d=class extends u{static{i(this,"RequestType3")}_;constructor(A){super(A,3)}};e.RequestType3=d;var E=class extends u{static{i(this,"RequestType4")}_;constructor(A){super(A,4)}};e.RequestType4=E;var T=class extends u{static{i(this,"RequestType5")}_;constructor(A){super(A,5)}};e.RequestType5=T;var v=class extends u{static{i(this,"RequestType6")}_;constructor(A){super(A,6)}};e.RequestType6=v;var R=class extends u{static{i(this,"RequestType7")}_;constructor(A){super(A,7)}};e.RequestType7=R;var w=class extends u{static{i(this,"RequestType8")}_;constructor(A){super(A,8)}};e.RequestType8=w;var _=class extends u{static{i(this,"RequestType9")}_;constructor(A){super(A,9)}};e.RequestType9=_;var M=class extends u{static{i(this,"NotificationType")}_parameterStructures;_;constructor(A,g=l.auto){super(A,1);this._parameterStructures=g}get parameterStructures(){return this._parameterStructures}};e.NotificationType=M;var L=class extends u{static{i(this,"NotificationType0")}_;constructor(A){super(A,0)}};e.NotificationType0=L;var F=class extends u{static{i(this,"NotificationType1")}_parameterStructures;_;constructor(A,g=l.auto){super(A,1);this._parameterStructures=g}get parameterStructures(){return this._parameterStructures}};e.NotificationType1=F;var V=class extends u{static{i(this,"NotificationType2")}_;constructor(A){super(A,2)}};e.NotificationType2=V;var te=class extends u{static{i(this,"NotificationType3")}_;constructor(A){super(A,3)}};e.NotificationType3=te;var fe=class extends u{static{i(this,"NotificationType4")}_;constructor(A){super(A,4)}};e.NotificationType4=fe;var Q=class extends u{static{i(this,"NotificationType5")}_;constructor(A){super(A,5)}};e.NotificationType5=Q;var P=class extends u{static{i(this,"NotificationType6")}_;constructor(A){super(A,6)}};e.NotificationType6=P;var D=class extends u{static{i(this,"NotificationType7")}_;constructor(A){super(A,7)}};e.NotificationType7=D;var j=class extends u{static{i(this,"NotificationType8")}_;constructor(A){super(A,8)}};e.NotificationType8=j;var z=class extends u{static{i(this,"NotificationType9")}_;constructor(A){super(A,9)}};e.NotificationType9=z;var I;(function(A){function g(S){let O=S;return O&&a.string(O.method)&&(a.string(O.id)||a.number(O.id))}i(g,"isRequest"),A.isRequest=g;function C(S){let O=S;return O&&a.string(O.method)&&S.id===void 0}i(C,"isNotification"),A.isNotification=C;function N(S){let O=S;return O&&(O.result!==void 0||!!O.error)&&(a.string(O.id)||a.number(O.id)||O.id===null)}i(N,"isResponse"),A.isResponse=N})(I||(e.Message=I={}))}}),Mm=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0;var t;(function(a){a.None=0,a.First=1,a.AsOld=a.First,a.Last=2,a.AsNew=a.Last})(t||(e.Touch=t={}));var r=class{static{i(this,"LinkedMap")}[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}before(a){let s=this._map.get(a);return s?s.previous?.value:void 0}after(a){let s=this._map.get(a);return s?s.next?.value:void 0}has(a){return this._map.has(a)}get(a,s=t.None){let o=this._map.get(a);if(!o)return;if(s!==t.None)this.touch(o,s);return o.value}set(a,s,o=t.None){let l=this._map.get(a);if(l){if(l.value=s,o!==t.None)this.touch(l,o)}else{switch(l={key:a,value:s,next:void 0,previous:void 0},o){case t.None:this.addItemLast(l);break;case t.First:this.addItemFirst(l);break;case t.Last:this.addItemLast(l);break;default:this.addItemLast(l);break}this._map.set(a,l),this._size++}return this}delete(a){return!!this.remove(a)}remove(a){let s=this._map.get(a);if(!s)return;return this._map.delete(a),this.removeItem(s),this._size--,s.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw Error("Invalid list");let a=this._head;return this._map.delete(a.key),this.removeItem(a),this._size--,a.value}forEach(a,s){let o=this._state,l=this._head;while(l){if(s)a.bind(s)(l.value,l.key,this);else a(l.value,l.key,this);if(this._state!==o)throw Error("LinkedMap got modified during iteration.");l=l.next}}keys(){let a=this._state,s=this._head,o={[Symbol.iterator]:()=>o,next:i(()=>{if(this._state!==a)throw Error("LinkedMap got modified during iteration.");if(s){let l={value:s.key,done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}values(){let a=this._state,s=this._head,o={[Symbol.iterator]:()=>o,next:i(()=>{if(this._state!==a)throw Error("LinkedMap got modified during iteration.");if(s){let l={value:s.value,done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}entries(){let a=this._state,s=this._head,o={[Symbol.iterator]:()=>o,next:i(()=>{if(this._state!==a)throw Error("LinkedMap got modified during iteration.");if(s){let l={value:[s.key,s.value],done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}[Symbol.iterator](){return this.entries()}trimOld(a){if(a>=this.size)return;if(a===0){this.clear();return}let s=this._head,o=this.size;while(s&&o>a)this._map.delete(s.key),s=s.next,o--;if(this._head=s,this._size=o,s)s.previous=void 0;this._state++}addItemFirst(a){if(!this._head&&!this._tail)this._tail=a;else if(!this._head)throw Error("Invalid list");else a.next=this._head,this._head.previous=a;this._head=a,this._state++}addItemLast(a){if(!this._head&&!this._tail)this._head=a;else if(!this._tail)throw Error("Invalid list");else a.previous=this._tail,this._tail.next=a;this._tail=a,this._state++}removeItem(a){if(a===this._head&&a===this._tail)this._head=void 0,this._tail=void 0;else if(a===this._head){if(!a.next)throw Error("Invalid list");a.next.previous=void 0,this._head=a.next}else if(a===this._tail){if(!a.previous)throw Error("Invalid list");a.previous.next=void 0,this._tail=a.previous}else{let{next:s,previous:o}=a;if(!s||!o)throw Error("Invalid list");s.previous=o,o.next=s}a.next=void 0,a.previous=void 0,this._state++}touch(a,s){if(!this._head||!this._tail)throw Error("Invalid list");if(s!==t.First&&s!==t.Last)return;if(s===t.First){if(a===this._head)return;let{next:o,previous:l}=a;if(a===this._tail)l.next=void 0,this._tail=l;else o.previous=l,l.next=o;a.previous=void 0,a.next=this._head,this._head.previous=a,this._head=a,this._state++}else if(s===t.Last){if(a===this._tail)return;let{next:o,previous:l}=a;if(a===this._head)o.previous=void 0,this._head=o;else o.previous=l,l.next=o;a.next=void 0,a.previous=this._tail,this._tail.next=a,this._tail=a,this._state++}}toJSON(){let a=[];return this.forEach((s,o)=>{a.push([o,s])}),a}fromJSON(a){this.clear();for(let[s,o]of a)this.set(s,o)}};e.LinkedMap=r;var n=class extends r{static{i(this,"LRUCache")}_limit;_ratio;constructor(a,s=1){super();this._limit=a,this._ratio=Math.min(Math.max(0,s),1)}get limit(){return this._limit}set limit(a){this._limit=a,this.checkTrim()}get ratio(){return this._ratio}set ratio(a){this._ratio=Math.min(Math.max(0,a),1),this.checkTrim()}get(a,s=t.AsNew){return super.get(a,s)}peek(a){return super.get(a,t.None)}set(a,s){return super.set(a,s,t.Last),this.checkTrim(),this}checkTrim(){if(this.size>this._limit)this.trimOld(Math.round(this._limit*this._ratio))}};e.LRUCache=n}}),lA=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0;var t;(function(r){function n(a){return{dispose:a}}i(n,"create"),r.create=n})(t||(e.Disposable=t={}))}}),pn=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/ral.js"(e){Object.defineProperty(e,"__esModule",{value:!0});var t;function r(){if(t===void 0)throw Error("No runtime abstraction layer installed");return t}i(r,"RAL"),function(n){function a(s){if(s===void 0)throw Error("No runtime abstraction layer provided");t=s}i(a,"install"),n.install=a}(r||(r={})),e.default=r}}),Ji=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/events.js"(e){var t=e&&e.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var r=t(pn()),n;(function(o){let l={dispose(){}};o.None=function(){return l}})(n||(e.Event=n={}));var a=class{static{i(this,"CallbackList")}_callbacks;_contexts;add(o,l=null,u){if(!this._callbacks)this._callbacks=[],this._contexts=[];if(this._callbacks.push(o),this._contexts.push(l),Array.isArray(u))u.push({dispose:i(()=>this.remove(o,l),"dispose")})}remove(o,l=null){if(!this._callbacks)return;let u=!1;for(let c=0,p=this._callbacks.length;c<p;c++)if(this._callbacks[c]===o)if(this._contexts[c]===l){this._callbacks.splice(c,1),this._contexts.splice(c,1);return}else u=!0;if(u)throw Error("When adding a listener with a context, you should remove it with the same context")}invoke(...o){if(!this._callbacks)return[];let l=[],u=this._callbacks.slice(0),c=this._contexts.slice(0);for(let p=0,h=u.length;p<h;p++)try{l.push(u[p].apply(c[p],o))}catch(y){(0,r.default)().console.error(y)}return l}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},s=class o{static{i(this,"Emitter")}_options;static _noop=i(function(){},"_noop");_event;_callbacks;constructor(l){this._options=l}get event(){if(!this._event)this._event=(l,u,c)=>{if(!this._callbacks)this._callbacks=new a;if(this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty())this._options.onFirstListenerAdd(this);this._callbacks.add(l,u);let p={dispose:i(()=>{if(!this._callbacks)return;if(this._callbacks.remove(l,u),p.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty())this._options.onLastListenerRemove(this)},"dispose")};if(Array.isArray(c))c.push(p);return p};return this._event}fire(l){if(this._callbacks)this._callbacks.invoke.call(this._callbacks,l)}dispose(){if(this._callbacks)this._callbacks.dispose(),this._callbacks=void 0}};e.Emitter=s}}),kf=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){var t=e&&e.__createBinding||(Object.create?function(y,d,E,T){if(T===void 0)T=E;var v=Object.getOwnPropertyDescriptor(d,E);if(!v||("get"in v?!d.__esModule:v.writable||v.configurable))v={enumerable:!0,get:i(function(){return d[E]},"get")};Object.defineProperty(y,T,v)}:function(y,d,E,T){if(T===void 0)T=E;y[T]=d[E]}),r=e&&e.__setModuleDefault||(Object.create?function(y,d){Object.defineProperty(y,"default",{enumerable:!0,value:d})}:function(y,d){y.default=d}),n=e&&e.__importStar||function(){var y=i(function(d){return y=Object.getOwnPropertyNames||function(E){var T=[];for(var v in E)if(Object.prototype.hasOwnProperty.call(E,v))T[T.length]=v;return T},y(d)},"ownKeys");return function(d){if(d&&d.__esModule)return d;var E={};if(d!=null){for(var T=y(d),v=0;v<T.length;v++)if(T[v]!=="default")t(E,d,T[v])}return r(E,d),E}}(),a=e&&e.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var s=a(pn()),o=n(Xi()),l=Ji(),u;(function(y){y.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:l.Event.None}),y.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:l.Event.None});function d(E){let T=E;return T&&(T===y.None||T===y.Cancelled||o.boolean(T.isCancellationRequested)&&!!T.onCancellationRequested)}i(d,"is"),y.is=d})(u||(e.CancellationToken=u={}));var c=Object.freeze(function(y,d){let E=(0,s.default)().timer.setTimeout(y.bind(d),0);return{dispose(){E.dispose()}}}),p=class{static{i(this,"MutableToken")}_isCancelled=!1;_emitter;cancel(){if(!this._isCancelled){if(this._isCancelled=!0,this._emitter)this._emitter.fire(void 0),this.dispose()}}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){if(this._isCancelled)return c;if(!this._emitter)this._emitter=new l.Emitter;return this._emitter.event}dispose(){if(this._emitter)this._emitter.dispose(),this._emitter=void 0}},h=class{static{i(this,"CancellationTokenSource")}_token;get token(){if(!this._token)this._token=new p;return this._token}cancel(){if(!this._token)this._token=u.Cancelled;else this._token.cancel()}dispose(){if(!this._token)this._token=u.None;else if(this._token instanceof p)this._token.dispose()}};e.CancellationTokenSource=h}}),uA=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var t=kf(),r;(function(l){l.Continue=0,l.Cancelled=1})(r||(r={}));var n=class{static{i(this,"SharedArraySenderStrategy")}buffers;constructor(){this.buffers=new Map}enableCancellation(l){if(l.id===null)return;let u=new SharedArrayBuffer(4),c=new Int32Array(u,0,1);c[0]=r.Continue,this.buffers.set(l.id,u),l.$cancellationData=u}async sendCancellation(l,u){let c=this.buffers.get(u);if(c===void 0)return;let p=new Int32Array(c,0,1);Atomics.store(p,0,r.Cancelled)}cleanup(l){this.buffers.delete(l)}dispose(){this.buffers.clear()}};e.SharedArraySenderStrategy=n;var a=class{static{i(this,"SharedArrayBufferCancellationToken")}data;constructor(l){this.data=new Int32Array(l,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===r.Cancelled}get onCancellationRequested(){throw Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},s=class{static{i(this,"SharedArrayBufferCancellationTokenSource")}token;constructor(l){this.token=new a(l)}cancel(){}dispose(){}},o=class{static{i(this,"SharedArrayReceiverStrategy")}kind="request";createCancellationTokenSource(l){let u=l.$cancellationData;if(u===void 0)return new t.CancellationTokenSource;return new s(u)}};e.SharedArrayReceiverStrategy=o}}),Dm=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){var t=e&&e.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var r=t(pn()),n=class{static{i(this,"Semaphore")}_capacity;_active;_waiting;constructor(a=1){if(a<=0)throw Error("Capacity must be greater than 0");this._capacity=a,this._active=0,this._waiting=[]}lock(a){return new Promise((s,o)=>{this._waiting.push({thunk:a,resolve:s,reject:o}),this.runNext()})}get active(){return this._active}runNext(){if(this._waiting.length===0||this._active===this._capacity)return;(0,r.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let a=this._waiting.shift();if(this._active++,this._active>this._capacity)throw Error("Too many thunks active");try{let s=a.thunk();if(s instanceof Promise)s.then((o)=>{this._active--,a.resolve(o),this.runNext()},(o)=>{this._active--,a.reject(o),this.runNext()});else this._active--,a.resolve(s),this.runNext()}catch(s){this._active--,a.reject(s),this.runNext()}}};e.Semaphore=n}}),cA=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){var t=e&&e.__createBinding||(Object.create?function(d,E,T,v){if(v===void 0)v=T;var R=Object.getOwnPropertyDescriptor(E,T);if(!R||("get"in R?!E.__esModule:R.writable||R.configurable))R={enumerable:!0,get:i(function(){return E[T]},"get")};Object.defineProperty(d,v,R)}:function(d,E,T,v){if(v===void 0)v=T;d[v]=E[T]}),r=e&&e.__setModuleDefault||(Object.create?function(d,E){Object.defineProperty(d,"default",{enumerable:!0,value:E})}:function(d,E){d.default=E}),n=e&&e.__importStar||function(){var d=i(function(E){return d=Object.getOwnPropertyNames||function(T){var v=[];for(var R in T)if(Object.prototype.hasOwnProperty.call(T,R))v[v.length]=R;return v},d(E)},"ownKeys");return function(E){if(E&&E.__esModule)return E;var T={};if(E!=null){for(var v=d(E),R=0;R<v.length;R++)if(v[R]!=="default")t(T,E,v[R])}return r(T,E),T}}(),a=e&&e.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var s=a(pn()),o=n(Xi()),l=Ji(),u=Dm(),c;(function(d){function E(T){let v=T;return v&&o.func(v.listen)&&o.func(v.dispose)&&o.func(v.onError)&&o.func(v.onClose)&&o.func(v.onPartialMessage)}i(E,"is"),d.is=E})(c||(e.MessageReader=c={}));var p=class{static{i(this,"AbstractMessageReader")}errorEmitter;closeEmitter;partialMessageEmitter;constructor(){this.errorEmitter=new l.Emitter,this.closeEmitter=new l.Emitter,this.partialMessageEmitter=new l.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose(),this.partialMessageEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(d){this.errorEmitter.fire(this.asError(d))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(d){this.partialMessageEmitter.fire(d)}asError(d){if(d instanceof Error)return d;else return Error(`Reader received error. Reason: ${o.string(d.message)?d.message:"unknown"}`)}};e.AbstractMessageReader=p;var h;(function(d){function E(T){let v,R,w,_=new Map,M,L=new Map;if(T===void 0||typeof T==="string")v=T??"utf-8";else{if(v=T.charset??"utf-8",T.contentDecoder!==void 0)w=T.contentDecoder,_.set(w.name,w);if(T.contentDecoders!==void 0)for(let F of T.contentDecoders)_.set(F.name,F);if(T.contentTypeDecoder!==void 0)M=T.contentTypeDecoder,L.set(M.name,M);if(T.contentTypeDecoders!==void 0)for(let F of T.contentTypeDecoders)L.set(F.name,F)}if(M===void 0)M=(0,s.default)().applicationJson.decoder,L.set(M.name,M);return{charset:v,contentDecoder:w,contentDecoders:_,contentTypeDecoder:M,contentTypeDecoders:L}}i(E,"fromOptions"),d.fromOptions=E})(h||(h={}));var y=class extends p{static{i(this,"ReadableStreamMessageReader")}readable;options;callback;nextMessageLength;messageToken;buffer;partialMessageTimer;_partialMessageTimeout;readSemaphore;constructor(d,E){super();this.readable=d,this.options=h.fromOptions(E),this.buffer=(0,s.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new u.Semaphore(1)}set partialMessageTimeout(d){this._partialMessageTimeout=d}get partialMessageTimeout(){return this._partialMessageTimeout}listen(d){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=d;let E=this.readable.onData((T)=>{this.onData(T)});return this.readable.onError((T)=>this.fireError(T)),this.readable.onClose(()=>this.fireClose()),E}onData(d){try{this.buffer.append(d);while(!0){if(this.nextMessageLength===-1){let T=this.buffer.tryReadHeaders(!0);if(!T)return;let v=T.get("content-length");if(!v){this.fireError(Error(`Header must provide a Content-Length property.
1
+ import{At,x}from"./chunk-vt40e1kp.js";var un={};At(un,{AbnfAlternation:()=>Eo,AbnfConcatenation:()=>Co,AbnfElement:()=>vi,AbnfGroup:()=>bo,AbnfNumVal:()=>_o,AbnfOptionalGroup:()=>So,AbnfPrimary:()=>hr,AbnfRule:()=>$i,AbnfRuleName:()=>wo,AbnfStringLiteral:()=>Po,AbstractMermaidTokenBuilder:()=>ce,AbstractMermaidValueConverter:()=>Ie,Architecture:()=>ot,ArchitectureGrammarGeneratedModule:()=>Ml,Branch:()=>Zn,Commit:()=>Tr,CommonTokenBuilder:()=>kR,CommonValueConverter:()=>Je,Cynefin:()=>Yt,CynefinGrammarGeneratedModule:()=>Dl,DomainBlock:()=>Qn,DomainItem:()=>Hi,EbnfChoice:()=>ko,EbnfExceptionPostfix:()=>Io,EbnfGroup:()=>No,EbnfNonTerminal:()=>Oo,EbnfOneOrMorePostfix:()=>Mo,EbnfOptional:()=>Do,EbnfOptionalPostfix:()=>Lo,EbnfPostfix:()=>tn,EbnfPrimary:()=>Kt,EbnfRepetition:()=>xo,EbnfRule:()=>Ri,EbnfSequence:()=>Go,EbnfSpecial:()=>Fo,EbnfTerm:()=>Ai,EbnfTerminal:()=>jo,EbnfZeroOrMorePostfix:()=>zo,EmDataEntity:()=>yr,EmFrame:()=>Wt,EmptyFileSystem:()=>le,EventModel:()=>ht,EventModelingGeneratedModule:()=>Ll,GitGraph:()=>Xt,GitGraphGrammarGeneratedModule:()=>xl,Info:()=>sn,InfoGrammarGeneratedModule:()=>Gl,Merge:()=>Rr,MermaidGeneratedSharedModule:()=>ue,Packet:()=>Ar,PacketBlock:()=>Er,PacketGrammarGeneratedModule:()=>Fl,PegAny:()=>Bo,PegGroup:()=>Uo,PegIdentifier:()=>Vo,PegLiteral:()=>Ko,PegOrderedChoice:()=>Wo,PegPrefix:()=>Ei,PegPrimary:()=>rn,PegRule:()=>Pi,PegSequence:()=>qo,PegSuffix:()=>Ii,Pie:()=>Jt,PieGrammarGeneratedModule:()=>jl,PieSection:()=>ea,Radar:()=>qt,RadarGrammarGeneratedModule:()=>zl,Railroad:()=>Cr,RailroadAbnf:()=>br,RailroadAbnfGrammarGeneratedModule:()=>Bl,RailroadChoiceExpr:()=>Ho,RailroadEbnf:()=>_r,RailroadEbnfGrammarGeneratedModule:()=>Ul,RailroadExpression:()=>yt,RailroadGrammarGeneratedModule:()=>Vl,RailroadNonTerminalExpr:()=>Yo,RailroadOneOrMoreExpr:()=>Xo,RailroadOptionalExpr:()=>Jo,RailroadPeg:()=>Sr,RailroadPegGrammarGeneratedModule:()=>Kl,RailroadRule:()=>Ni,RailroadSequenceExpr:()=>Zo,RailroadSpecialExpr:()=>Qo,RailroadTerminalExpr:()=>el,RailroadZeroOrMoreExpr:()=>tl,Statement:()=>gr,Transition:()=>on,TreeNode:()=>vr,TreeView:()=>nn,TreeViewGrammarGeneratedModule:()=>ql,Treemap:()=>wr,TreemapGrammarGeneratedModule:()=>Wl,Wardley:()=>Oe,WardleyGrammarGeneratedModule:()=>Hl,__name:()=>i,createDefaultCoreModule:()=>ae,createDefaultSharedCoreModule:()=>ie,inject:()=>W,isArchitecture:()=>Vp,isBranch:()=>Kp,isCommit:()=>Wp,isCynefin:()=>qp,isDomainBlock:()=>Hp,isDomainItem:()=>Yp,isEmModelEntityType:()=>Xp,isEmResetFrame:()=>$r,isGitGraph:()=>Jp,isInfo:()=>Zp,isMerge:()=>Qp,isPacket:()=>ed,isPacketBlock:()=>td,isPie:()=>rd,isPieSection:()=>nd,isRailroad:()=>ad,isRailroadAbnf:()=>id,isRailroadEbnf:()=>sd,isRailroadPeg:()=>od,isTransition:()=>ld,isTreemap:()=>ud,isWardley:()=>cd});var{create:rA,defineProperty:Yi,getOwnPropertyDescriptor:nA,getOwnPropertyNames:Sf,getPrototypeOf:aA}=Object,iA=Object.prototype.hasOwnProperty,i=(e,t)=>Yi(e,"name",{value:t,configurable:!0}),sA=(e,t)=>function(){return e&&(t=(0,e[Sf(e)[0]])(e=0)),t},Z=(e,t)=>function(){return t||(0,e[Sf(e)[0]])((t={exports:{}}).exports,t),t.exports},oA=(e,t)=>{for(var r in t)Yi(e,r,{get:t[r],enumerable:!0})},Nm=(e,t,r,n)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let a of Sf(t))if(!iA.call(e,a)&&a!==r)Yi(e,a,{get:()=>t[a],enumerable:!(n=nA(t,a))||n.enumerable})}return e},wf=(e,t,r)=>(r=e!=null?rA(aA(e)):{},Nm(t||!e||!e.__esModule?Yi(r,"default",{value:e,enumerable:!0}):r,e)),Pf=(e)=>Nm(Yi({},"__esModule",{value:!0}),e),Xi=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/is.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.boolean=t,e.string=r,e.number=n,e.error=a,e.func=s,e.array=o,e.stringArray=l;function t(u){return u===!0||u===!1}i(t,"boolean");function r(u){return typeof u==="string"||u instanceof String}i(r,"string");function n(u){return typeof u==="number"||u instanceof Number}i(n,"number");function a(u){return u instanceof Error}i(a,"error");function s(u){return typeof u==="function"}i(s,"func");function o(u){return Array.isArray(u)}i(o,"array");function l(u){return o(u)&&u.every((c)=>r(c))}i(l,"stringArray")}}),Om=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){var t=e&&e.__createBinding||(Object.create?function(A,g,C,N){if(N===void 0)N=C;var S=Object.getOwnPropertyDescriptor(g,C);if(!S||("get"in S?!g.__esModule:S.writable||S.configurable))S={enumerable:!0,get:i(function(){return g[C]},"get")};Object.defineProperty(A,N,S)}:function(A,g,C,N){if(N===void 0)N=C;A[N]=g[C]}),r=e&&e.__setModuleDefault||(Object.create?function(A,g){Object.defineProperty(A,"default",{enumerable:!0,value:g})}:function(A,g){A.default=g}),n=e&&e.__importStar||function(){var A=i(function(g){return A=Object.getOwnPropertyNames||function(C){var N=[];for(var S in C)if(Object.prototype.hasOwnProperty.call(C,S))N[N.length]=S;return N},A(g)},"ownKeys");return function(g){if(g&&g.__esModule)return g;var C={};if(g!=null){for(var N=A(g),S=0;S<N.length;S++)if(N[S]!=="default")t(C,g,N[S])}return r(C,g),C}}();Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var a=n(Xi()),s;(function(A){A.ParseError=-32700,A.InvalidRequest=-32600,A.MethodNotFound=-32601,A.InvalidParams=-32602,A.InternalError=-32603,A.jsonrpcReservedErrorRangeStart=-32099,A.serverErrorStart=-32099,A.MessageWriteError=-32099,A.MessageReadError=-32098,A.PendingResponseRejected=-32097,A.ConnectionInactive=-32096,A.ServerNotInitialized=-32002,A.UnknownErrorCode=-32001,A.jsonrpcReservedErrorRangeEnd=-32000,A.serverErrorEnd=-32000})(s||(e.ErrorCodes=s={}));var o=class A extends Error{static{i(this,"ResponseError")}code;data;constructor(g,C,N){super(C);this.code=a.number(g)?g:s.UnknownErrorCode,this.data=N,Object.setPrototypeOf(this,A.prototype)}toJson(){let g={code:this.code,message:this.message};if(this.data!==void 0)g.data=this.data;return g}};e.ResponseError=o;var l=class A{static{i(this,"ParameterStructures")}kind;static auto=new A("auto");static byPosition=new A("byPosition");static byName=new A("byName");constructor(g){this.kind=g}static is(g){return g===A.auto||g===A.byName||g===A.byPosition}toString(){return this.kind}};e.ParameterStructures=l;var u=class{static{i(this,"AbstractMessageSignature")}method;numberOfParams;constructor(A,g){this.method=A,this.numberOfParams=g}get parameterStructures(){return l.auto}};e.AbstractMessageSignature=u;var c=class extends u{static{i(this,"RequestType0")}_;constructor(A){super(A,0)}};e.RequestType0=c;var p=class extends u{static{i(this,"RequestType")}_parameterStructures;_;constructor(A,g=l.auto){super(A,1);this._parameterStructures=g}get parameterStructures(){return this._parameterStructures}};e.RequestType=p;var h=class extends u{static{i(this,"RequestType1")}_parameterStructures;_;constructor(A,g=l.auto){super(A,1);this._parameterStructures=g}get parameterStructures(){return this._parameterStructures}};e.RequestType1=h;var y=class extends u{static{i(this,"RequestType2")}_;constructor(A){super(A,2)}};e.RequestType2=y;var d=class extends u{static{i(this,"RequestType3")}_;constructor(A){super(A,3)}};e.RequestType3=d;var E=class extends u{static{i(this,"RequestType4")}_;constructor(A){super(A,4)}};e.RequestType4=E;var T=class extends u{static{i(this,"RequestType5")}_;constructor(A){super(A,5)}};e.RequestType5=T;var v=class extends u{static{i(this,"RequestType6")}_;constructor(A){super(A,6)}};e.RequestType6=v;var R=class extends u{static{i(this,"RequestType7")}_;constructor(A){super(A,7)}};e.RequestType7=R;var w=class extends u{static{i(this,"RequestType8")}_;constructor(A){super(A,8)}};e.RequestType8=w;var _=class extends u{static{i(this,"RequestType9")}_;constructor(A){super(A,9)}};e.RequestType9=_;var M=class extends u{static{i(this,"NotificationType")}_parameterStructures;_;constructor(A,g=l.auto){super(A,1);this._parameterStructures=g}get parameterStructures(){return this._parameterStructures}};e.NotificationType=M;var L=class extends u{static{i(this,"NotificationType0")}_;constructor(A){super(A,0)}};e.NotificationType0=L;var F=class extends u{static{i(this,"NotificationType1")}_parameterStructures;_;constructor(A,g=l.auto){super(A,1);this._parameterStructures=g}get parameterStructures(){return this._parameterStructures}};e.NotificationType1=F;var V=class extends u{static{i(this,"NotificationType2")}_;constructor(A){super(A,2)}};e.NotificationType2=V;var te=class extends u{static{i(this,"NotificationType3")}_;constructor(A){super(A,3)}};e.NotificationType3=te;var fe=class extends u{static{i(this,"NotificationType4")}_;constructor(A){super(A,4)}};e.NotificationType4=fe;var Q=class extends u{static{i(this,"NotificationType5")}_;constructor(A){super(A,5)}};e.NotificationType5=Q;var P=class extends u{static{i(this,"NotificationType6")}_;constructor(A){super(A,6)}};e.NotificationType6=P;var D=class extends u{static{i(this,"NotificationType7")}_;constructor(A){super(A,7)}};e.NotificationType7=D;var j=class extends u{static{i(this,"NotificationType8")}_;constructor(A){super(A,8)}};e.NotificationType8=j;var z=class extends u{static{i(this,"NotificationType9")}_;constructor(A){super(A,9)}};e.NotificationType9=z;var I;(function(A){function g(S){let O=S;return O&&a.string(O.method)&&(a.string(O.id)||a.number(O.id))}i(g,"isRequest"),A.isRequest=g;function C(S){let O=S;return O&&a.string(O.method)&&S.id===void 0}i(C,"isNotification"),A.isNotification=C;function N(S){let O=S;return O&&(O.result!==void 0||!!O.error)&&(a.string(O.id)||a.number(O.id)||O.id===null)}i(N,"isResponse"),A.isResponse=N})(I||(e.Message=I={}))}}),Mm=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0;var t;(function(a){a.None=0,a.First=1,a.AsOld=a.First,a.Last=2,a.AsNew=a.Last})(t||(e.Touch=t={}));var r=class{static{i(this,"LinkedMap")}[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}before(a){let s=this._map.get(a);return s?s.previous?.value:void 0}after(a){let s=this._map.get(a);return s?s.next?.value:void 0}has(a){return this._map.has(a)}get(a,s=t.None){let o=this._map.get(a);if(!o)return;if(s!==t.None)this.touch(o,s);return o.value}set(a,s,o=t.None){let l=this._map.get(a);if(l){if(l.value=s,o!==t.None)this.touch(l,o)}else{switch(l={key:a,value:s,next:void 0,previous:void 0},o){case t.None:this.addItemLast(l);break;case t.First:this.addItemFirst(l);break;case t.Last:this.addItemLast(l);break;default:this.addItemLast(l);break}this._map.set(a,l),this._size++}return this}delete(a){return!!this.remove(a)}remove(a){let s=this._map.get(a);if(!s)return;return this._map.delete(a),this.removeItem(s),this._size--,s.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw Error("Invalid list");let a=this._head;return this._map.delete(a.key),this.removeItem(a),this._size--,a.value}forEach(a,s){let o=this._state,l=this._head;while(l){if(s)a.bind(s)(l.value,l.key,this);else a(l.value,l.key,this);if(this._state!==o)throw Error("LinkedMap got modified during iteration.");l=l.next}}keys(){let a=this._state,s=this._head,o={[Symbol.iterator]:()=>o,next:i(()=>{if(this._state!==a)throw Error("LinkedMap got modified during iteration.");if(s){let l={value:s.key,done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}values(){let a=this._state,s=this._head,o={[Symbol.iterator]:()=>o,next:i(()=>{if(this._state!==a)throw Error("LinkedMap got modified during iteration.");if(s){let l={value:s.value,done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}entries(){let a=this._state,s=this._head,o={[Symbol.iterator]:()=>o,next:i(()=>{if(this._state!==a)throw Error("LinkedMap got modified during iteration.");if(s){let l={value:[s.key,s.value],done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}[Symbol.iterator](){return this.entries()}trimOld(a){if(a>=this.size)return;if(a===0){this.clear();return}let s=this._head,o=this.size;while(s&&o>a)this._map.delete(s.key),s=s.next,o--;if(this._head=s,this._size=o,s)s.previous=void 0;this._state++}addItemFirst(a){if(!this._head&&!this._tail)this._tail=a;else if(!this._head)throw Error("Invalid list");else a.next=this._head,this._head.previous=a;this._head=a,this._state++}addItemLast(a){if(!this._head&&!this._tail)this._head=a;else if(!this._tail)throw Error("Invalid list");else a.previous=this._tail,this._tail.next=a;this._tail=a,this._state++}removeItem(a){if(a===this._head&&a===this._tail)this._head=void 0,this._tail=void 0;else if(a===this._head){if(!a.next)throw Error("Invalid list");a.next.previous=void 0,this._head=a.next}else if(a===this._tail){if(!a.previous)throw Error("Invalid list");a.previous.next=void 0,this._tail=a.previous}else{let{next:s,previous:o}=a;if(!s||!o)throw Error("Invalid list");s.previous=o,o.next=s}a.next=void 0,a.previous=void 0,this._state++}touch(a,s){if(!this._head||!this._tail)throw Error("Invalid list");if(s!==t.First&&s!==t.Last)return;if(s===t.First){if(a===this._head)return;let{next:o,previous:l}=a;if(a===this._tail)l.next=void 0,this._tail=l;else o.previous=l,l.next=o;a.previous=void 0,a.next=this._head,this._head.previous=a,this._head=a,this._state++}else if(s===t.Last){if(a===this._tail)return;let{next:o,previous:l}=a;if(a===this._head)o.previous=void 0,this._head=o;else o.previous=l,l.next=o;a.next=void 0,a.previous=this._tail,this._tail.next=a,this._tail=a,this._state++}}toJSON(){let a=[];return this.forEach((s,o)=>{a.push([o,s])}),a}fromJSON(a){this.clear();for(let[s,o]of a)this.set(s,o)}};e.LinkedMap=r;var n=class extends r{static{i(this,"LRUCache")}_limit;_ratio;constructor(a,s=1){super();this._limit=a,this._ratio=Math.min(Math.max(0,s),1)}get limit(){return this._limit}set limit(a){this._limit=a,this.checkTrim()}get ratio(){return this._ratio}set ratio(a){this._ratio=Math.min(Math.max(0,a),1),this.checkTrim()}get(a,s=t.AsNew){return super.get(a,s)}peek(a){return super.get(a,t.None)}set(a,s){return super.set(a,s,t.Last),this.checkTrim(),this}checkTrim(){if(this.size>this._limit)this.trimOld(Math.round(this._limit*this._ratio))}};e.LRUCache=n}}),lA=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0;var t;(function(r){function n(a){return{dispose:a}}i(n,"create"),r.create=n})(t||(e.Disposable=t={}))}}),pn=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/ral.js"(e){Object.defineProperty(e,"__esModule",{value:!0});var t;function r(){if(t===void 0)throw Error("No runtime abstraction layer installed");return t}i(r,"RAL"),function(n){function a(s){if(s===void 0)throw Error("No runtime abstraction layer provided");t=s}i(a,"install"),n.install=a}(r||(r={})),e.default=r}}),Ji=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/events.js"(e){var t=e&&e.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var r=t(pn()),n;(function(o){let l={dispose(){}};o.None=function(){return l}})(n||(e.Event=n={}));var a=class{static{i(this,"CallbackList")}_callbacks;_contexts;add(o,l=null,u){if(!this._callbacks)this._callbacks=[],this._contexts=[];if(this._callbacks.push(o),this._contexts.push(l),Array.isArray(u))u.push({dispose:i(()=>this.remove(o,l),"dispose")})}remove(o,l=null){if(!this._callbacks)return;let u=!1;for(let c=0,p=this._callbacks.length;c<p;c++)if(this._callbacks[c]===o)if(this._contexts[c]===l){this._callbacks.splice(c,1),this._contexts.splice(c,1);return}else u=!0;if(u)throw Error("When adding a listener with a context, you should remove it with the same context")}invoke(...o){if(!this._callbacks)return[];let l=[],u=this._callbacks.slice(0),c=this._contexts.slice(0);for(let p=0,h=u.length;p<h;p++)try{l.push(u[p].apply(c[p],o))}catch(y){(0,r.default)().console.error(y)}return l}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},s=class o{static{i(this,"Emitter")}_options;static _noop=i(function(){},"_noop");_event;_callbacks;constructor(l){this._options=l}get event(){if(!this._event)this._event=(l,u,c)=>{if(!this._callbacks)this._callbacks=new a;if(this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty())this._options.onFirstListenerAdd(this);this._callbacks.add(l,u);let p={dispose:i(()=>{if(!this._callbacks)return;if(this._callbacks.remove(l,u),p.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty())this._options.onLastListenerRemove(this)},"dispose")};if(Array.isArray(c))c.push(p);return p};return this._event}fire(l){if(this._callbacks)this._callbacks.invoke.call(this._callbacks,l)}dispose(){if(this._callbacks)this._callbacks.dispose(),this._callbacks=void 0}};e.Emitter=s}}),kf=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){var t=e&&e.__createBinding||(Object.create?function(y,d,E,T){if(T===void 0)T=E;var v=Object.getOwnPropertyDescriptor(d,E);if(!v||("get"in v?!d.__esModule:v.writable||v.configurable))v={enumerable:!0,get:i(function(){return d[E]},"get")};Object.defineProperty(y,T,v)}:function(y,d,E,T){if(T===void 0)T=E;y[T]=d[E]}),r=e&&e.__setModuleDefault||(Object.create?function(y,d){Object.defineProperty(y,"default",{enumerable:!0,value:d})}:function(y,d){y.default=d}),n=e&&e.__importStar||function(){var y=i(function(d){return y=Object.getOwnPropertyNames||function(E){var T=[];for(var v in E)if(Object.prototype.hasOwnProperty.call(E,v))T[T.length]=v;return T},y(d)},"ownKeys");return function(d){if(d&&d.__esModule)return d;var E={};if(d!=null){for(var T=y(d),v=0;v<T.length;v++)if(T[v]!=="default")t(E,d,T[v])}return r(E,d),E}}(),a=e&&e.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var s=a(pn()),o=n(Xi()),l=Ji(),u;(function(y){y.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:l.Event.None}),y.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:l.Event.None});function d(E){let T=E;return T&&(T===y.None||T===y.Cancelled||o.boolean(T.isCancellationRequested)&&!!T.onCancellationRequested)}i(d,"is"),y.is=d})(u||(e.CancellationToken=u={}));var c=Object.freeze(function(y,d){let E=(0,s.default)().timer.setTimeout(y.bind(d),0);return{dispose(){E.dispose()}}}),p=class{static{i(this,"MutableToken")}_isCancelled=!1;_emitter;cancel(){if(!this._isCancelled){if(this._isCancelled=!0,this._emitter)this._emitter.fire(void 0),this.dispose()}}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){if(this._isCancelled)return c;if(!this._emitter)this._emitter=new l.Emitter;return this._emitter.event}dispose(){if(this._emitter)this._emitter.dispose(),this._emitter=void 0}},h=class{static{i(this,"CancellationTokenSource")}_token;get token(){if(!this._token)this._token=new p;return this._token}cancel(){if(!this._token)this._token=u.Cancelled;else this._token.cancel()}dispose(){if(!this._token)this._token=u.None;else if(this._token instanceof p)this._token.dispose()}};e.CancellationTokenSource=h}}),uA=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var t=kf(),r;(function(l){l.Continue=0,l.Cancelled=1})(r||(r={}));var n=class{static{i(this,"SharedArraySenderStrategy")}buffers;constructor(){this.buffers=new Map}enableCancellation(l){if(l.id===null)return;let u=new SharedArrayBuffer(4),c=new Int32Array(u,0,1);c[0]=r.Continue,this.buffers.set(l.id,u),l.$cancellationData=u}async sendCancellation(l,u){let c=this.buffers.get(u);if(c===void 0)return;let p=new Int32Array(c,0,1);Atomics.store(p,0,r.Cancelled)}cleanup(l){this.buffers.delete(l)}dispose(){this.buffers.clear()}};e.SharedArraySenderStrategy=n;var a=class{static{i(this,"SharedArrayBufferCancellationToken")}data;constructor(l){this.data=new Int32Array(l,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===r.Cancelled}get onCancellationRequested(){throw Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},s=class{static{i(this,"SharedArrayBufferCancellationTokenSource")}token;constructor(l){this.token=new a(l)}cancel(){}dispose(){}},o=class{static{i(this,"SharedArrayReceiverStrategy")}kind="request";createCancellationTokenSource(l){let u=l.$cancellationData;if(u===void 0)return new t.CancellationTokenSource;return new s(u)}};e.SharedArrayReceiverStrategy=o}}),Dm=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){var t=e&&e.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var r=t(pn()),n=class{static{i(this,"Semaphore")}_capacity;_active;_waiting;constructor(a=1){if(a<=0)throw Error("Capacity must be greater than 0");this._capacity=a,this._active=0,this._waiting=[]}lock(a){return new Promise((s,o)=>{this._waiting.push({thunk:a,resolve:s,reject:o}),this.runNext()})}get active(){return this._active}runNext(){if(this._waiting.length===0||this._active===this._capacity)return;(0,r.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let a=this._waiting.shift();if(this._active++,this._active>this._capacity)throw Error("Too many thunks active");try{let s=a.thunk();if(s instanceof Promise)s.then((o)=>{this._active--,a.resolve(o),this.runNext()},(o)=>{this._active--,a.reject(o),this.runNext()});else this._active--,a.resolve(s),this.runNext()}catch(s){this._active--,a.reject(s),this.runNext()}}};e.Semaphore=n}}),cA=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){var t=e&&e.__createBinding||(Object.create?function(d,E,T,v){if(v===void 0)v=T;var R=Object.getOwnPropertyDescriptor(E,T);if(!R||("get"in R?!E.__esModule:R.writable||R.configurable))R={enumerable:!0,get:i(function(){return E[T]},"get")};Object.defineProperty(d,v,R)}:function(d,E,T,v){if(v===void 0)v=T;d[v]=E[T]}),r=e&&e.__setModuleDefault||(Object.create?function(d,E){Object.defineProperty(d,"default",{enumerable:!0,value:E})}:function(d,E){d.default=E}),n=e&&e.__importStar||function(){var d=i(function(E){return d=Object.getOwnPropertyNames||function(T){var v=[];for(var R in T)if(Object.prototype.hasOwnProperty.call(T,R))v[v.length]=R;return v},d(E)},"ownKeys");return function(E){if(E&&E.__esModule)return E;var T={};if(E!=null){for(var v=d(E),R=0;R<v.length;R++)if(v[R]!=="default")t(T,E,v[R])}return r(T,E),T}}(),a=e&&e.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var s=a(pn()),o=n(Xi()),l=Ji(),u=Dm(),c;(function(d){function E(T){let v=T;return v&&o.func(v.listen)&&o.func(v.dispose)&&o.func(v.onError)&&o.func(v.onClose)&&o.func(v.onPartialMessage)}i(E,"is"),d.is=E})(c||(e.MessageReader=c={}));var p=class{static{i(this,"AbstractMessageReader")}errorEmitter;closeEmitter;partialMessageEmitter;constructor(){this.errorEmitter=new l.Emitter,this.closeEmitter=new l.Emitter,this.partialMessageEmitter=new l.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose(),this.partialMessageEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(d){this.errorEmitter.fire(this.asError(d))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(d){this.partialMessageEmitter.fire(d)}asError(d){if(d instanceof Error)return d;else return Error(`Reader received error. Reason: ${o.string(d.message)?d.message:"unknown"}`)}};e.AbstractMessageReader=p;var h;(function(d){function E(T){let v,R,w,_=new Map,M,L=new Map;if(T===void 0||typeof T==="string")v=T??"utf-8";else{if(v=T.charset??"utf-8",T.contentDecoder!==void 0)w=T.contentDecoder,_.set(w.name,w);if(T.contentDecoders!==void 0)for(let F of T.contentDecoders)_.set(F.name,F);if(T.contentTypeDecoder!==void 0)M=T.contentTypeDecoder,L.set(M.name,M);if(T.contentTypeDecoders!==void 0)for(let F of T.contentTypeDecoders)L.set(F.name,F)}if(M===void 0)M=(0,s.default)().applicationJson.decoder,L.set(M.name,M);return{charset:v,contentDecoder:w,contentDecoders:_,contentTypeDecoder:M,contentTypeDecoders:L}}i(E,"fromOptions"),d.fromOptions=E})(h||(h={}));var y=class extends p{static{i(this,"ReadableStreamMessageReader")}readable;options;callback;nextMessageLength;messageToken;buffer;partialMessageTimer;_partialMessageTimeout;readSemaphore;constructor(d,E){super();this.readable=d,this.options=h.fromOptions(E),this.buffer=(0,s.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new u.Semaphore(1)}set partialMessageTimeout(d){this._partialMessageTimeout=d}get partialMessageTimeout(){return this._partialMessageTimeout}listen(d){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=d;let E=this.readable.onData((T)=>{this.onData(T)});return this.readable.onError((T)=>this.fireError(T)),this.readable.onClose(()=>this.fireClose()),E}onData(d){try{this.buffer.append(d);while(!0){if(this.nextMessageLength===-1){let T=this.buffer.tryReadHeaders(!0);if(!T)return;let v=T.get("content-length");if(!v){this.fireError(Error(`Header must provide a Content-Length property.
2
2
  ${JSON.stringify(Object.fromEntries(T))}`));return}let R=parseInt(v);if(isNaN(R)){this.fireError(Error(`Content-Length value must be a number. Got ${v}`));return}this.nextMessageLength=R}let E=this.buffer.tryReadBody(this.nextMessageLength);if(E===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let T=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(E):E,v=await this.options.contentTypeDecoder.decode(T,this.options);this.callback(v)}).catch((T)=>{this.fireError(T)})}}catch(E){this.fireError(E)}}clearPartialMessageTimer(){if(this.partialMessageTimer)this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0}setPartialMessageTimer(){if(this.clearPartialMessageTimer(),this._partialMessageTimeout<=0)return;this.partialMessageTimer=(0,s.default)().timer.setTimeout((d,E)=>{if(this.partialMessageTimer=void 0,d===this.messageToken)this.firePartialMessage({messageToken:d,waitingTime:E}),this.setPartialMessageTimer()},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout)}};e.ReadableStreamMessageReader=y}}),fA=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(e){var t=e&&e.__createBinding||(Object.create?function(T,v,R,w){if(w===void 0)w=R;var _=Object.getOwnPropertyDescriptor(v,R);if(!_||("get"in _?!v.__esModule:_.writable||_.configurable))_={enumerable:!0,get:i(function(){return v[R]},"get")};Object.defineProperty(T,w,_)}:function(T,v,R,w){if(w===void 0)w=R;T[w]=v[R]}),r=e&&e.__setModuleDefault||(Object.create?function(T,v){Object.defineProperty(T,"default",{enumerable:!0,value:v})}:function(T,v){T.default=v}),n=e&&e.__importStar||function(){var T=i(function(v){return T=Object.getOwnPropertyNames||function(R){var w=[];for(var _ in R)if(Object.prototype.hasOwnProperty.call(R,_))w[w.length]=_;return w},T(v)},"ownKeys");return function(v){if(v&&v.__esModule)return v;var R={};if(v!=null){for(var w=T(v),_=0;_<w.length;_++)if(w[_]!=="default")t(R,v,w[_])}return r(R,v),R}}(),a=e&&e.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var s=a(pn()),o=n(Xi()),l=Dm(),u=Ji(),c="Content-Length: ",p=`\r
3
3
  `,h;(function(T){function v(R){let w=R;return w&&o.func(w.dispose)&&o.func(w.onClose)&&o.func(w.onError)&&o.func(w.write)}i(v,"is"),T.is=v})(h||(e.MessageWriter=h={}));var y=class{static{i(this,"AbstractMessageWriter")}errorEmitter;closeEmitter;constructor(){this.errorEmitter=new u.Emitter,this.closeEmitter=new u.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(T,v,R){this.errorEmitter.fire([this.asError(T),v,R])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(T){if(T instanceof Error)return T;else return Error(`Writer received error. Reason: ${o.string(T.message)?T.message:"unknown"}`)}};e.AbstractMessageWriter=y;var d;(function(T){function v(R){if(R===void 0||typeof R==="string")return{charset:R??"utf-8",contentTypeEncoder:(0,s.default)().applicationJson.encoder};else return{charset:R.charset??"utf-8",contentEncoder:R.contentEncoder,contentTypeEncoder:R.contentTypeEncoder??(0,s.default)().applicationJson.encoder}}i(v,"fromOptions"),T.fromOptions=v})(d||(d={}));var E=class extends y{static{i(this,"WriteableStreamMessageWriter")}writable;options;errorCount;writeSemaphore;constructor(T,v){super();this.writable=T,this.options=d.fromOptions(v),this.errorCount=0,this.writeSemaphore=new l.Semaphore(1),this.writable.onError((R)=>this.fireError(R)),this.writable.onClose(()=>this.fireClose())}async write(T){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(T,this.options).then((R)=>{if(this.options.contentEncoder!==void 0)return this.options.contentEncoder.encode(R);else return R}).then((R)=>{let w=[];return w.push(c,R.byteLength.toString(),p),w.push(p),this.doWrite(T,w,R)},(R)=>{throw this.fireError(R),R}))}async doWrite(T,v,R){try{return await this.writable.write(v.join(""),"ascii"),this.writable.write(R)}catch(w){return this.handleError(w,T),Promise.reject(w)}}handleError(T,v){this.errorCount++,this.fireError(T,v,this.errorCount)}end(){this.writable.end()}};e.WriteableStreamMessageWriter=E}}),pA=Z({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var t=13,r=10,n=`\r
4
4
  `,a=class{static{i(this,"AbstractMessageBuffer")}_encoding;_chunks;_totalLength;constructor(s="utf-8"){this._encoding=s,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(s){let o=typeof s==="string"?this.fromString(s,this._encoding):s;this._chunks.push(o),this._totalLength+=o.byteLength}tryReadHeaders(s=!1){if(this._chunks.length===0)return;let o=0,l=0,u=0,c=0;e:while(l<this._chunks.length){let d=this._chunks[l];u=0;while(u<d.length){switch(d[u]){case t:switch(o){case 0:o=1;break;case 2:o=3;break;default:o=0}break;case r:switch(o){case 1:o=2;break;case 3:o=4,u++;break e;default:o=0}break;default:o=0}u++}c+=d.byteLength,l++}if(o!==4)return;let p=this._read(c+u),h=new Map,y=this.toString(p,"ascii").split(n);if(y.length<2)return h;for(let d=0;d<y.length-2;d++){let E=y[d],T=E.indexOf(":");if(T===-1)throw Error(`Message header must separate key and value using ':'
@@ -136,7 +136,7 @@ ${t}`;if(this.inline)return`{${n}}`;else return n}};function bR(e,t,r){if(e==="l
136
136
  `);return}},Je=class extends Ie{static{i(this,"CommonValueConverter")}runCustomConverter(e,t,r){return}},ce=class extends aR{static{i(this,"AbstractMermaidTokenBuilder")}constructor(e){super();this.keywords=new Set(e)}buildKeywordTokens(e,t,r){let n=super.buildKeywordTokens(e,t,r);return n.forEach((a)=>{if(this.keywords.has(a.name)&&a.PATTERN!==void 0)a.PATTERN=new RegExp(a.PATTERN.toString()+"(?:(?=%%)|(?!\\S))")}),n}},kR=class extends ce{static{i(this,"CommonTokenBuilder")}};var dP=class extends ce{static{i(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},IR={parser:{TokenBuilder:i(()=>new dP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")}};function hi(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),zl,IR);return t.ServiceRegistry.register(r),{shared:t,Radar:r}}i(hi,"createRadarServices");var mP=class extends ce{static{i(this,"RailroadTokenBuilder")}constructor(){super(["railroad-beta"])}},NR=i((e)=>{let t=e.slice(1,-1),r="";for(let n=0;n<t.length;n++){let a=t[n];if(a==="\\"&&n+1<t.length){n++;let s=t[n];switch(s){case"n":r+=`
137
137
  `;break;case"r":r+="\r";break;case"t":r+="\t";break;default:r+=s}continue}r+=a}return r},"decodeEscapedString"),hP=class extends Ie{static{i(this,"RailroadValueConverter")}runConverter(e,t,r){let n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n==="string"){let a=n.trim();if(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))return NR(a)}return n}runCustomConverter(e,t,r){if(e.name==="RR_STRING")return NR(t);return}},OR={parser:{TokenBuilder:i(()=>new mP,"TokenBuilder"),ValueConverter:i(()=>new hP,"ValueConverter")}};function rr(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Vl,OR);return t.ServiceRegistry.register(r),{shared:t,Railroad:r}}i(rr,"createRailroadServices");var yP=class extends ce{static{i(this,"RailroadEbnfTokenBuilder")}constructor(){super(["railroad-ebnf-beta"])}},MR=i((e)=>{let t=e.slice(1,-1),r="";for(let n=0;n<t.length;n++){let a=t[n];if(a==="\\"&&n+1<t.length){n++;let s=t[n];switch(s){case"n":r+=`
138
138
  `;break;case"r":r+="\r";break;case"t":r+="\t";break;default:r+=s}continue}r+=a}return r},"decodeEscapedString"),gP=class extends Ie{static{i(this,"RailroadEbnfValueConverter")}runConverter(e,t,r){let n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n==="string"){let a=n.trim();if(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))return MR(a)}return n}runCustomConverter(e,t,r){if(e.name==="EBNF_STRING")return MR(t);if(e.name==="EBNF_SPECIAL_SEQUENCE")return t.slice(1,-1).trim();return}},DR={parser:{TokenBuilder:i(()=>new yP,"TokenBuilder"),ValueConverter:i(()=>new gP,"ValueConverter")}};function ar(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Ul,DR);return t.ServiceRegistry.register(r),{shared:t,RailroadEbnf:r}}i(ar,"createRailroadEbnfServices");var vP=class extends ce{static{i(this,"RailroadAbnfTokenBuilder")}constructor(){super(["railroad-abnf-beta"])}},TP=class extends Ie{static{i(this,"RailroadAbnfValueConverter")}runConverter(e,t,r){let n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n==="string"){let a=n.trim();if(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))return a.slice(1,-1)}return n}runCustomConverter(e,t,r){if(e.name==="ABNF_STRING")return t.slice(1,-1);return}},LR={parser:{TokenBuilder:i(()=>new vP,"TokenBuilder"),ValueConverter:i(()=>new TP,"ValueConverter")}};function ir(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Bl,LR);return t.ServiceRegistry.register(r),{shared:t,RailroadAbnf:r}}i(ir,"createRailroadAbnfServices");var $P=class extends ce{static{i(this,"RailroadPegTokenBuilder")}constructor(){super(["railroad-peg-beta"])}},xR=i((e)=>{let t=e.slice(1,-1),r="";for(let n=0;n<t.length;n++){let a=t[n];if(a==="\\"&&n+1<t.length){n++;let s=t[n];switch(s){case"n":r+=`
139
- `;break;case"r":r+="\r";break;case"t":r+="\t";break;default:r+=s}continue}r+=a}return r},"decodeEscapedString"),RP=class extends Ie{static{i(this,"RailroadPegValueConverter")}runConverter(e,t,r){let n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n==="string"){let a=n.trim();if(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))return xR(a)}return n}runCustomConverter(e,t,r){if(e.name==="PEG_STRING")return xR(t);return}},GR={parser:{TokenBuilder:i(()=>new $P,"TokenBuilder"),ValueConverter:i(()=>new RP,"ValueConverter")}};function or(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Kl,GR);return t.ServiceRegistry.register(r),{shared:t,RailroadPeg:r}}i(or,"createRailroadPegServices");var AP=class extends ce{static{i(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},EP=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,CP=class extends Ie{static{i(this,"TreemapValueConverter")}runCustomConverter(e,t,r){if(e.name==="NUMBER2")return parseFloat(t.replace(/,/g,""));else if(e.name==="SEPARATOR")return t.substring(1,t.length-1);else if(e.name==="STRING2")return t.substring(1,t.length-1);else if(e.name==="INDENTATION")return t.length;else if(e.name==="ClassDef"){if(typeof t!=="string")return t;let n=EP.exec(t);if(n)return{$type:"ClassDefStatement",className:n[1],styleText:n[2]||void 0}}return}};function FR(e){let t=e.validation.TreemapValidator,r=e.validation.ValidationRegistry;if(r){let n={Treemap:t.checkSingleRoot.bind(t)};r.register(n,t)}}i(FR,"registerValidationChecks");var bP=class{static{i(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(let n of e.TreemapRows){if(!n.item)continue;if(r===void 0&&n.indent===void 0)r=0;else if(n.indent===void 0)t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"});else if(r!==void 0&&r>=parseInt(n.indent,10))t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"})}}},jR={parser:{TokenBuilder:i(()=>new AP,"TokenBuilder"),ValueConverter:i(()=>new CP,"ValueConverter")},validation:{TreemapValidator:i(()=>new bP,"TreemapValidator")}};function gi(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Wl,jR);return t.ServiceRegistry.register(r),FR(r),{shared:t,Treemap:r}}i(gi,"createTreemapServices");var _P=class extends Ie{static{i(this,"WardleyValueConverter")}runCustomConverter(e,t,r){switch(e.name.toUpperCase()){case"LINK_LABEL":return t.substring(1).trim();default:return}}},zR={parser:{ValueConverter:i(()=>new _P,"ValueConverter")}};function yi(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Hl,zR);return t.ServiceRegistry.register(r),{shared:t,Wardley:r}}i(yi,"createWardleyServices");var SP=class extends ce{static{i(this,"CynefinTokenBuilder")}constructor(){super(["cynefin-beta"])}},BR={parser:{TokenBuilder:i(()=>new SP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")}};function bi(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Dl,BR);return t.ServiceRegistry.register(r),{shared:t,Cynefin:r}}i(bi,"createCynefinServices");var wP=class extends ce{static{i(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},UR={parser:{TokenBuilder:i(()=>new wP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")}};function xi(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),xl,UR);return t.ServiceRegistry.register(r),{shared:t,GitGraph:r}}i(xi,"createGitGraphServices");var PP=class extends ce{static{i(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},VR={parser:{TokenBuilder:i(()=>new PP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")}};function _i(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Gl,VR);return t.ServiceRegistry.register(r),{shared:t,Info:r}}i(_i,"createInfoServices");var kP=class extends ce{static{i(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},KR={parser:{TokenBuilder:i(()=>new kP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")}};function wi(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Fl,KR);return t.ServiceRegistry.register(r),{shared:t,Packet:r}}i(wi,"createPacketServices");var IP=class extends ce{static{i(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},NP=class extends Ie{static{i(this,"PieValueConverter")}runCustomConverter(e,t,r){if(e.name!=="PIE_SECTION_LABEL")return;return t.replace(/"/g,"").trim()}},WR={parser:{TokenBuilder:i(()=>new IP,"TokenBuilder"),ValueConverter:i(()=>new NP,"ValueConverter")}};function ki(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),jl,WR);return t.ServiceRegistry.register(r),{shared:t,Pie:r}}i(ki,"createPieServices");var OP=class extends Ie{static{i(this,"TreeViewValueConverter")}runCustomConverter(e,t,r){if(e.name==="INDENTATION")return t?.length||0;if(e.name==="QUOTED_NAME")return t.substring(1,t.length-1);if(e.name==="BARE_NAME")return t.replace(/[\t ]+$/,"");if(e.name==="CLASS_ANNOTATION")return t.trim().substring(3).trim();if(e.name==="ICON_ANNOTATION"){let n=t.trim();return n.substring(5,n.length-1)}if(e.name==="DESC_ANNOTATION")return t.trim().substring(2).trim();return}},MP=class extends ce{static{i(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},qR={parser:{TokenBuilder:i(()=>new MP,"TokenBuilder"),ValueConverter:i(()=>new OP,"ValueConverter")}};function Ci(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),ql,qR);return t.ServiceRegistry.register(r),{shared:t,TreeView:r}}i(Ci,"createTreeViewServices");var DP=class extends ce{static{i(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},LP=class extends Ie{static{i(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){if(e.name==="ARCH_ICON")return t.replace(/[()]/g,"").trim();else if(e.name==="ARCH_TEXT_ICON")return t.replace(/["()]/g,"");else if(e.name==="ARCH_TITLE"){let n=t.replace(/^\[|]$/g,"").trim();if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))n=n.slice(1,-1),n=n.replace(/\\"/g,'"').replace(/\\'/g,"'");return n.trim()}return}},HR={parser:{TokenBuilder:i(()=>new DP,"TokenBuilder"),ValueConverter:i(()=>new LP,"ValueConverter")}};function Si(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Ml,HR);return t.ServiceRegistry.register(r),{shared:t,Architecture:r}}i(Si,"createArchitectureServices");var xP=class extends ce{static{i(this,"EventModelingTokenBuilder")}constructor(){super(["eventmodeling"])}},YR=new Set(["cmd","command"]),XR=new Set(["evt","event"]),fd=new Set(["rmo","readmodel"]),JR=new Set(["pcr","processor"]),ZR=new Set(["ui"]);function QR(e){let t=e.validation.EventModelingValidator,r=e.validation.ValidationRegistry;if(r){let n={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};r.register(n,t)}}i(QR,"registerValidationChecks");var GP=class{static{i(this,"EventModelingValidator")}checkSourceFrameTypes(e,t){if(e.sourceFrames.length===0)return;if(YR.has(e.modelEntityType))this.validateSources(e,new Set([...ZR,...JR]),"command","ui or processor",t);else if(XR.has(e.modelEntityType))this.validateSources(e,YR,"event","command",t);else if(fd.has(e.modelEntityType))this.validateSources(e,XR,"read model","event",t);else if(JR.has(e.modelEntityType))this.validateSources(e,fd,"processor","read model",t);else if(ZR.has(e.modelEntityType))this.validateSources(e,fd,"ui","read model",t)}validateSources(e,t,r,n,a){for(let s of e.sourceFrames){let o=s.ref;if(o!==void 0&&!t.has(o.modelEntityType))a("error",`A ${r} can only receive input from a ${n}, not from '${o.modelEntityType}'.`,{node:e,property:"sourceFrames"})}}},eA={parser:{TokenBuilder:i(()=>new xP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")},validation:{EventModelingValidator:i(()=>new GP,"EventModelingValidator")}};function Ti(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Ll,eA);return t.ServiceRegistry.register(r),QR(r),{shared:t,EventModel:r}}i(Ti,"createEventModelingServices");var je={},FP={info:i(async()=>{let{createInfoServices:e}=await (x("x59p8sg2"),import("./chunk-x59p8sg2.js")),t=e().Info.parser.LangiumParser;je.info=t},"info"),packet:i(async()=>{let{createPacketServices:e}=await (x("vfqdy860"),import("./chunk-vfqdy860.js")),t=e().Packet.parser.LangiumParser;je.packet=t},"packet"),pie:i(async()=>{let{createPieServices:e}=await (x("eqegxtdt"),import("./chunk-eqegxtdt.js")),t=e().Pie.parser.LangiumParser;je.pie=t},"pie"),treeView:i(async()=>{let{createTreeViewServices:e}=await (x("310yey4q"),import("./chunk-310yey4q.js")),t=e().TreeView.parser.LangiumParser;je.treeView=t},"treeView"),architecture:i(async()=>{let{createArchitectureServices:e}=await (x("3kh6zefg"),import("./chunk-3kh6zefg.js")),t=e().Architecture.parser.LangiumParser;je.architecture=t},"architecture"),gitGraph:i(async()=>{let{createGitGraphServices:e}=await (x("00mq7bhx"),import("./chunk-00mq7bhx.js")),t=e().GitGraph.parser.LangiumParser;je.gitGraph=t},"gitGraph"),eventmodeling:i(async()=>{let{createEventModelingServices:e}=await (x("5r5kv4gh"),import("./chunk-5r5kv4gh.js")),t=e().EventModel.parser.LangiumParser;je.eventmodeling=t},"eventmodeling"),radar:i(async()=>{let{createRadarServices:e}=await (x("yj1a2d37"),import("./chunk-yj1a2d37.js")),t=e().Radar.parser.LangiumParser;je.radar=t},"radar"),railroad:i(async()=>{let{createRailroadServices:e}=await (x("y7z144e3"),import("./chunk-y7z144e3.js")),t=e().Railroad.parser.LangiumParser;je.railroad=t},"railroad"),railroadEbnf:i(async()=>{let{createRailroadEbnfServices:e}=await (x("9s7c178f"),import("./chunk-9s7c178f.js")),t=e().RailroadEbnf.parser.LangiumParser;je.railroadEbnf=t},"railroadEbnf"),railroadAbnf:i(async()=>{let{createRailroadAbnfServices:e}=await (x("jg6nzn6q"),import("./chunk-jg6nzn6q.js")),t=e().RailroadAbnf.parser.LangiumParser;je.railroadAbnf=t},"railroadAbnf"),railroadPeg:i(async()=>{let{createRailroadPegServices:e}=await (x("kx2xk3bb"),import("./chunk-kx2xk3bb.js")),t=e().RailroadPeg.parser.LangiumParser;je.railroadPeg=t},"railroadPeg"),treemap:i(async()=>{let{createTreemapServices:e}=await (x("0atfn8jf"),import("./chunk-0atfn8jf.js")),t=e().Treemap.parser.LangiumParser;je.treemap=t},"treemap"),wardley:i(async()=>{let{createWardleyServices:e}=await (x("95q1bwxn"),import("./chunk-95q1bwxn.js")),t=e().Wardley.parser.LangiumParser;je.wardley=t},"wardley"),cynefin:i(async()=>{let{createCynefinServices:e}=await (x("gmfp7fg4"),import("./chunk-gmfp7fg4.js")),t=e().Cynefin.parser.LangiumParser;je.cynefin=t},"cynefin")};async function X(e,t){let r=FP[e];if(!r)throw Error(`Unknown diagram type: ${e}`);if(!je[e])await r();let a=je[e].parse(t);if(a.lexerErrors.length>0||a.parserErrors.length>0)throw new _t(a);return a.value}i(X,"parse");var Yl=i((e)=>e!==void 0&&e>=0?e:"?","formatLocation"),_t=class extends Error{constructor(e){let t=e.lexerErrors.map((n)=>{let a=Yl(n.line),s=Yl(n.column);return`Lexer error on line ${a}, column ${s}: ${n.message}`}).join(`
139
+ `;break;case"r":r+="\r";break;case"t":r+="\t";break;default:r+=s}continue}r+=a}return r},"decodeEscapedString"),RP=class extends Ie{static{i(this,"RailroadPegValueConverter")}runConverter(e,t,r){let n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n==="string"){let a=n.trim();if(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))return xR(a)}return n}runCustomConverter(e,t,r){if(e.name==="PEG_STRING")return xR(t);return}},GR={parser:{TokenBuilder:i(()=>new $P,"TokenBuilder"),ValueConverter:i(()=>new RP,"ValueConverter")}};function or(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Kl,GR);return t.ServiceRegistry.register(r),{shared:t,RailroadPeg:r}}i(or,"createRailroadPegServices");var AP=class extends ce{static{i(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},EP=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,CP=class extends Ie{static{i(this,"TreemapValueConverter")}runCustomConverter(e,t,r){if(e.name==="NUMBER2")return parseFloat(t.replace(/,/g,""));else if(e.name==="SEPARATOR")return t.substring(1,t.length-1);else if(e.name==="STRING2")return t.substring(1,t.length-1);else if(e.name==="INDENTATION")return t.length;else if(e.name==="ClassDef"){if(typeof t!=="string")return t;let n=EP.exec(t);if(n)return{$type:"ClassDefStatement",className:n[1],styleText:n[2]||void 0}}return}};function FR(e){let t=e.validation.TreemapValidator,r=e.validation.ValidationRegistry;if(r){let n={Treemap:t.checkSingleRoot.bind(t)};r.register(n,t)}}i(FR,"registerValidationChecks");var bP=class{static{i(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(let n of e.TreemapRows){if(!n.item)continue;if(r===void 0&&n.indent===void 0)r=0;else if(n.indent===void 0)t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"});else if(r!==void 0&&r>=parseInt(n.indent,10))t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"})}}},jR={parser:{TokenBuilder:i(()=>new AP,"TokenBuilder"),ValueConverter:i(()=>new CP,"ValueConverter")},validation:{TreemapValidator:i(()=>new bP,"TreemapValidator")}};function gi(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Wl,jR);return t.ServiceRegistry.register(r),FR(r),{shared:t,Treemap:r}}i(gi,"createTreemapServices");var _P=class extends Ie{static{i(this,"WardleyValueConverter")}runCustomConverter(e,t,r){switch(e.name.toUpperCase()){case"LINK_LABEL":return t.substring(1).trim();default:return}}},zR={parser:{ValueConverter:i(()=>new _P,"ValueConverter")}};function yi(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Hl,zR);return t.ServiceRegistry.register(r),{shared:t,Wardley:r}}i(yi,"createWardleyServices");var SP=class extends ce{static{i(this,"CynefinTokenBuilder")}constructor(){super(["cynefin-beta"])}},BR={parser:{TokenBuilder:i(()=>new SP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")}};function bi(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Dl,BR);return t.ServiceRegistry.register(r),{shared:t,Cynefin:r}}i(bi,"createCynefinServices");var wP=class extends ce{static{i(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},UR={parser:{TokenBuilder:i(()=>new wP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")}};function xi(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),xl,UR);return t.ServiceRegistry.register(r),{shared:t,GitGraph:r}}i(xi,"createGitGraphServices");var PP=class extends ce{static{i(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},VR={parser:{TokenBuilder:i(()=>new PP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")}};function _i(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Gl,VR);return t.ServiceRegistry.register(r),{shared:t,Info:r}}i(_i,"createInfoServices");var kP=class extends ce{static{i(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},KR={parser:{TokenBuilder:i(()=>new kP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")}};function wi(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Fl,KR);return t.ServiceRegistry.register(r),{shared:t,Packet:r}}i(wi,"createPacketServices");var IP=class extends ce{static{i(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},NP=class extends Ie{static{i(this,"PieValueConverter")}runCustomConverter(e,t,r){if(e.name!=="PIE_SECTION_LABEL")return;return t.replace(/"/g,"").trim()}},WR={parser:{TokenBuilder:i(()=>new IP,"TokenBuilder"),ValueConverter:i(()=>new NP,"ValueConverter")}};function ki(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),jl,WR);return t.ServiceRegistry.register(r),{shared:t,Pie:r}}i(ki,"createPieServices");var OP=class extends Ie{static{i(this,"TreeViewValueConverter")}runCustomConverter(e,t,r){if(e.name==="INDENTATION")return t?.length||0;if(e.name==="QUOTED_NAME")return t.substring(1,t.length-1);if(e.name==="BARE_NAME")return t.replace(/[\t ]+$/,"");if(e.name==="CLASS_ANNOTATION")return t.trim().substring(3).trim();if(e.name==="ICON_ANNOTATION"){let n=t.trim();return n.substring(5,n.length-1)}if(e.name==="DESC_ANNOTATION")return t.trim().substring(2).trim();return}},MP=class extends ce{static{i(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},qR={parser:{TokenBuilder:i(()=>new MP,"TokenBuilder"),ValueConverter:i(()=>new OP,"ValueConverter")}};function Ci(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),ql,qR);return t.ServiceRegistry.register(r),{shared:t,TreeView:r}}i(Ci,"createTreeViewServices");var DP=class extends ce{static{i(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},LP=class extends Ie{static{i(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){if(e.name==="ARCH_ICON")return t.replace(/[()]/g,"").trim();else if(e.name==="ARCH_TEXT_ICON")return t.replace(/["()]/g,"");else if(e.name==="ARCH_TITLE"){let n=t.replace(/^\[|]$/g,"").trim();if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))n=n.slice(1,-1),n=n.replace(/\\"/g,'"').replace(/\\'/g,"'");return n.trim()}return}},HR={parser:{TokenBuilder:i(()=>new DP,"TokenBuilder"),ValueConverter:i(()=>new LP,"ValueConverter")}};function Si(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Ml,HR);return t.ServiceRegistry.register(r),{shared:t,Architecture:r}}i(Si,"createArchitectureServices");var xP=class extends ce{static{i(this,"EventModelingTokenBuilder")}constructor(){super(["eventmodeling"])}},YR=new Set(["cmd","command"]),XR=new Set(["evt","event"]),fd=new Set(["rmo","readmodel"]),JR=new Set(["pcr","processor"]),ZR=new Set(["ui"]);function QR(e){let t=e.validation.EventModelingValidator,r=e.validation.ValidationRegistry;if(r){let n={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};r.register(n,t)}}i(QR,"registerValidationChecks");var GP=class{static{i(this,"EventModelingValidator")}checkSourceFrameTypes(e,t){if(e.sourceFrames.length===0)return;if(YR.has(e.modelEntityType))this.validateSources(e,new Set([...ZR,...JR]),"command","ui or processor",t);else if(XR.has(e.modelEntityType))this.validateSources(e,YR,"event","command",t);else if(fd.has(e.modelEntityType))this.validateSources(e,XR,"read model","event",t);else if(JR.has(e.modelEntityType))this.validateSources(e,fd,"processor","read model",t);else if(ZR.has(e.modelEntityType))this.validateSources(e,fd,"ui","read model",t)}validateSources(e,t,r,n,a){for(let s of e.sourceFrames){let o=s.ref;if(o!==void 0&&!t.has(o.modelEntityType))a("error",`A ${r} can only receive input from a ${n}, not from '${o.modelEntityType}'.`,{node:e,property:"sourceFrames"})}}},eA={parser:{TokenBuilder:i(()=>new xP,"TokenBuilder"),ValueConverter:i(()=>new Je,"ValueConverter")},validation:{EventModelingValidator:i(()=>new GP,"EventModelingValidator")}};function Ti(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),Ll,eA);return t.ServiceRegistry.register(r),QR(r),{shared:t,EventModel:r}}i(Ti,"createEventModelingServices");var je={},FP={info:i(async()=>{let{createInfoServices:e}=await (x("q7dsnvpf"),import("./chunk-q7dsnvpf.js")),t=e().Info.parser.LangiumParser;je.info=t},"info"),packet:i(async()=>{let{createPacketServices:e}=await (x("k5btcvbg"),import("./chunk-k5btcvbg.js")),t=e().Packet.parser.LangiumParser;je.packet=t},"packet"),pie:i(async()=>{let{createPieServices:e}=await (x("zde7mj43"),import("./chunk-zde7mj43.js")),t=e().Pie.parser.LangiumParser;je.pie=t},"pie"),treeView:i(async()=>{let{createTreeViewServices:e}=await (x("kq40ss39"),import("./chunk-kq40ss39.js")),t=e().TreeView.parser.LangiumParser;je.treeView=t},"treeView"),architecture:i(async()=>{let{createArchitectureServices:e}=await (x("scpwc9ev"),import("./chunk-scpwc9ev.js")),t=e().Architecture.parser.LangiumParser;je.architecture=t},"architecture"),gitGraph:i(async()=>{let{createGitGraphServices:e}=await (x("tgpbhzn9"),import("./chunk-tgpbhzn9.js")),t=e().GitGraph.parser.LangiumParser;je.gitGraph=t},"gitGraph"),eventmodeling:i(async()=>{let{createEventModelingServices:e}=await (x("jjh5jvva"),import("./chunk-jjh5jvva.js")),t=e().EventModel.parser.LangiumParser;je.eventmodeling=t},"eventmodeling"),radar:i(async()=>{let{createRadarServices:e}=await (x("ew3cgdtd"),import("./chunk-ew3cgdtd.js")),t=e().Radar.parser.LangiumParser;je.radar=t},"radar"),railroad:i(async()=>{let{createRailroadServices:e}=await (x("esp1mmgr"),import("./chunk-esp1mmgr.js")),t=e().Railroad.parser.LangiumParser;je.railroad=t},"railroad"),railroadEbnf:i(async()=>{let{createRailroadEbnfServices:e}=await (x("w53rba6g"),import("./chunk-w53rba6g.js")),t=e().RailroadEbnf.parser.LangiumParser;je.railroadEbnf=t},"railroadEbnf"),railroadAbnf:i(async()=>{let{createRailroadAbnfServices:e}=await (x("kpvgecwy"),import("./chunk-kpvgecwy.js")),t=e().RailroadAbnf.parser.LangiumParser;je.railroadAbnf=t},"railroadAbnf"),railroadPeg:i(async()=>{let{createRailroadPegServices:e}=await (x("w86n42dy"),import("./chunk-w86n42dy.js")),t=e().RailroadPeg.parser.LangiumParser;je.railroadPeg=t},"railroadPeg"),treemap:i(async()=>{let{createTreemapServices:e}=await (x("rg426vkf"),import("./chunk-rg426vkf.js")),t=e().Treemap.parser.LangiumParser;je.treemap=t},"treemap"),wardley:i(async()=>{let{createWardleyServices:e}=await (x("gjq1pxw3"),import("./chunk-gjq1pxw3.js")),t=e().Wardley.parser.LangiumParser;je.wardley=t},"wardley"),cynefin:i(async()=>{let{createCynefinServices:e}=await (x("ssy07dd2"),import("./chunk-ssy07dd2.js")),t=e().Cynefin.parser.LangiumParser;je.cynefin=t},"cynefin")};async function X(e,t){let r=FP[e];if(!r)throw Error(`Unknown diagram type: ${e}`);if(!je[e])await r();let a=je[e].parse(t);if(a.lexerErrors.length>0||a.parserErrors.length>0)throw new _t(a);return a.value}i(X,"parse");var Yl=i((e)=>e!==void 0&&e>=0?e:"?","formatLocation"),_t=class extends Error{constructor(e){let t=e.lexerErrors.map((n)=>{let a=Yl(n.line),s=Yl(n.column);return`Lexer error on line ${a}, column ${s}: ${n.message}`}).join(`
140
140
  `),r=e.parserErrors.map((n)=>{let a=Yl(n.token.startLine),s=Yl(n.token.startColumn);return`Parse error on line ${a}, column ${s}: ${n.message}`}).join(`
141
141
  `);super(`Parsing failed: ${t} ${r}`);this.result=e}static{i(this,"MermaidParseError")}};
142
142
  export{$r,hi,rr,ar,ir,or,gi,yi,bi,xi,_i,wi,ki,Ci,Si,Ti,X,_t};
@@ -0,0 +1 @@
1
+ import{xi}from"./chunk-taynqrgq.js";export{xi as createGitGraphServices};