pulls.review 0.2.0 → 0.2.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 (183) hide show
  1. package/dist/client/assets/ChatWidget-BsnoQ6oS.js +1 -0
  2. package/dist/client/assets/DisplayFileIcon-DzBo3Ez5.js +151 -0
  3. package/dist/client/assets/GithubAvatar-CSsUV5vf.js +1 -0
  4. package/dist/client/assets/LandingHero-BkTBSu71.js +1 -0
  5. package/dist/client/assets/_repo_-Dcgj3PGg.js +22 -0
  6. package/dist/client/assets/analyze-509KQQBC.js +1 -0
  7. package/dist/client/assets/andromeeda-vGVdxbeo.js +1 -0
  8. package/dist/client/assets/anthropic-messages-Cd2DkgOC.js +41 -0
  9. package/dist/client/assets/aurora-x-CDeNXAV0.js +1 -0
  10. package/dist/client/assets/ayu-dark-DluEY0Gj.js +1 -0
  11. package/dist/client/assets/ayu-light-C3h-C4tm.js +1 -0
  12. package/dist/client/assets/ayu-mirage-Bqwy1Gya.js +1 -0
  13. package/dist/client/assets/browser-agent-rpc-BXhoSh1z-DrxWeI3_.js +1 -0
  14. package/dist/client/assets/c-BNQJhXlP.js +1 -0
  15. package/dist/client/assets/catppuccin-frappe-C9Q5zVZY.js +1 -0
  16. package/dist/client/assets/catppuccin-latte-CtsyrtPq.js +1 -0
  17. package/dist/client/assets/catppuccin-macchiato-R8nAf1vR.js +1 -0
  18. package/dist/client/assets/catppuccin-mocha-DjuaAJKi.js +1 -0
  19. package/dist/client/assets/clojure-DqKBuwfJ.js +1 -0
  20. package/dist/client/assets/cpp-7GgD5o7L.js +1 -0
  21. package/dist/client/assets/csharp-oqKa8noW.js +1 -0
  22. package/dist/client/assets/css-DlBQoFxe.js +1 -0
  23. package/dist/client/assets/dark-plus-Cs2F2srj.js +1 -0
  24. package/dist/client/assets/de-Bq9RfdAn.js +1 -0
  25. package/dist/client/assets/diff-BKQFn0my.js +37 -0
  26. package/dist/client/assets/diff-Bx6SazPw.js +1 -0
  27. package/dist/client/assets/diff-woXpYk--.js +1 -0
  28. package/dist/client/assets/diffs-store-ncE62OUU.js +1510 -0
  29. package/dist/client/assets/dist-Dh0a8u-Y.js +1 -0
  30. package/dist/client/assets/docker-IyjqRm3v.js +1 -0
  31. package/dist/client/assets/dracula-BHWKrbxM.js +1 -0
  32. package/dist/client/assets/dracula-soft-5eyTD99u.js +1 -0
  33. package/dist/client/assets/elixir-D3n0XgqJ.js +1 -0
  34. package/dist/client/assets/en-8hQdak1X.js +1 -0
  35. package/dist/client/assets/error-CJ3RHG07.js +1 -0
  36. package/dist/client/assets/es-QcvEBShr.js +1 -0
  37. package/dist/client/assets/everforest-dark-sB-x3p7T.js +1 -0
  38. package/dist/client/assets/everforest-light-Df2xbC6M.js +1 -0
  39. package/dist/client/assets/fr-DAWKVvDP.js +1 -0
  40. package/dist/client/assets/github-dark-C-LZuMrd.js +1 -0
  41. package/dist/client/assets/github-dark-default-DXG-b-1a.js +1 -0
  42. package/dist/client/assets/github-dark-dimmed-Bx1FflLF.js +1 -0
  43. package/dist/client/assets/github-dark-high-contrast-B_tTalzw.js +1 -0
  44. package/dist/client/assets/github-light-EUqPIrTm.js +1 -0
  45. package/dist/client/assets/github-light-default-BXViO-2h.js +1 -0
  46. package/dist/client/assets/github-light-high-contrast-B68TUdTA.js +1 -0
  47. package/dist/client/assets/go-rLFTqkRN.js +1 -0
  48. package/dist/client/assets/graphql-ki1Ij_uk.js +1 -0
  49. package/dist/client/assets/groovy-CacY0gHj.js +1 -0
  50. package/dist/client/assets/gruvbox-dark-hard-C820rvS2.js +1 -0
  51. package/dist/client/assets/gruvbox-dark-medium-BPjhmG05.js +1 -0
  52. package/dist/client/assets/gruvbox-dark-soft-MrdJrrXF.js +1 -0
  53. package/dist/client/assets/gruvbox-light-hard-BC_s9l72.js +1 -0
  54. package/dist/client/assets/gruvbox-light-medium-BAWPOn9u.js +1 -0
  55. package/dist/client/assets/gruvbox-light-soft-BSMLrYjP.js +1 -0
  56. package/dist/client/assets/haskell-D8IpX4py.js +1 -0
  57. package/dist/client/assets/horizon-CE9ld1lL.js +1 -0
  58. package/dist/client/assets/horizon-bright-DSNQnXHK.js +1 -0
  59. package/dist/client/assets/houston-CsvMBhTu.js +1 -0
  60. package/dist/client/assets/html-BC8aFsRK.js +1 -0
  61. package/dist/client/assets/i18n-CGV_MDS8.js +2 -0
  62. package/dist/client/assets/id-NIGs9Xhn.js +1 -0
  63. package/dist/client/assets/index-BCCy9wJJ.js +2 -0
  64. package/dist/client/assets/index-BDPZiDIt.css +1 -0
  65. package/dist/client/assets/ini-B5eOa1yu.js +1 -0
  66. package/dist/client/assets/install-B-q5w2uE.js +4 -0
  67. package/dist/client/assets/it-DjRuurmk.js +1 -0
  68. package/dist/client/assets/ja-BAKkDsQ5.js +1 -0
  69. package/dist/client/assets/java-D7h0NA_A.js +1 -0
  70. package/dist/client/assets/javascript-DcMHgNcu.js +1 -0
  71. package/dist/client/assets/json-qhed-kSA.js +1 -0
  72. package/dist/client/assets/jsonc-CYpm1nAK.js +1 -0
  73. package/dist/client/assets/jsx-BUUYi3qs.js +1 -0
  74. package/dist/client/assets/kanagawa-dragon-Bozd7klA.js +1 -0
  75. package/dist/client/assets/kanagawa-lotus-BmuOG9ZW.js +1 -0
  76. package/dist/client/assets/kanagawa-wave-BML5mF2J.js +1 -0
  77. package/dist/client/assets/ko-DHculY2W.js +1 -0
  78. package/dist/client/assets/kotlin-DhhofPvG.js +1 -0
  79. package/dist/client/assets/laserwave-C_8bwKvT.js +1 -0
  80. package/dist/client/assets/less-DVTAwKKz.js +1 -0
  81. package/dist/client/assets/light-plus-DVQuIRkW.js +1 -0
  82. package/dist/client/assets/llm-DYDmh8Ki.js +2 -0
  83. package/dist/client/assets/llm-store-CVM33nlB.js +2 -0
  84. package/dist/client/assets/locales-SpkpwNqX.js +1 -0
  85. package/dist/client/assets/lua-DCW0Dwo5.js +1 -0
  86. package/dist/client/assets/make-Dixweg8N.js +1 -0
  87. package/dist/client/assets/markdown-BYOwaDjH.js +1 -0
  88. package/dist/client/assets/material-theme-Bm3Qr25_.js +1 -0
  89. package/dist/client/assets/material-theme-darker-2IIEA8gg.js +1 -0
  90. package/dist/client/assets/material-theme-lighter-uhdI0v04.js +1 -0
  91. package/dist/client/assets/material-theme-ocean-CHQ94UKr.js +1 -0
  92. package/dist/client/assets/material-theme-palenight-B5W6OYN7.js +1 -0
  93. package/dist/client/assets/mdx-DQZ5AkYe.js +1 -0
  94. package/dist/client/assets/min-dark-BSWPekZh.js +1 -0
  95. package/dist/client/assets/min-light-DDpmG2fV.js +1 -0
  96. package/dist/client/assets/monokai-B_bV9PQ9.js +1 -0
  97. package/dist/client/assets/nginx-C4fSytnP.js +1 -0
  98. package/dist/client/assets/night-owl-DhmEMT88.js +1 -0
  99. package/dist/client/assets/night-owl-light-eJ-hLW7d.js +1 -0
  100. package/dist/client/assets/node.browser-BX-QLlU2.js +1 -0
  101. package/dist/client/assets/node.browser-DFtqp6Hr.js +1 -0
  102. package/dist/client/assets/nord-Cb4Vim4T.js +1 -0
  103. package/dist/client/assets/objective-c-D1A_Heim.js +1 -0
  104. package/dist/client/assets/objective-cpp-BsSzOQcm.js +1 -0
  105. package/dist/client/assets/one-dark-pro-CLwyXe_n.js +1 -0
  106. package/dist/client/assets/one-light-D7Lr4KcI.js +1 -0
  107. package/dist/client/assets/openai-completions-CSvY9IVo.js +21 -0
  108. package/dist/client/assets/pages-B5mEqsbn.js +1 -0
  109. package/dist/client/assets/pages-local-x_ACBinc.js +1 -0
  110. package/dist/client/assets/pages-web-DitAPN6U.js +21 -0
  111. package/dist/client/assets/patch-parser-k3Vbbmi0.js +5 -0
  112. package/dist/client/assets/perl-C8GHouAq.js +1 -0
  113. package/dist/client/assets/php-BahmaYs0.js +1 -0
  114. package/dist/client/assets/pierre-dark-CpLgRqie.js +1 -0
  115. package/dist/client/assets/pierre-dark-protanopia-deuteranopia-B35FxJx-.js +1 -0
  116. package/dist/client/assets/pierre-dark-soft-kZQmAZld.js +1 -0
  117. package/dist/client/assets/pierre-dark-tritanopia-CpjhbsIL.js +1 -0
  118. package/dist/client/assets/pierre-dark-vibrant-CpQYzh95.js +1 -0
  119. package/dist/client/assets/pierre-light-CoaEpmwp.js +1 -0
  120. package/dist/client/assets/pierre-light-protanopia-deuteranopia-0fSaH845.js +1 -0
  121. package/dist/client/assets/pierre-light-soft-lWLdNTOI.js +1 -0
  122. package/dist/client/assets/pierre-light-tritanopia-CEbqgOJL.js +1 -0
  123. package/dist/client/assets/pierre-light-vibrant-D80Fkn33.js +1 -0
  124. package/dist/client/assets/plastic-DQwYfKfQ.js +1 -0
  125. package/dist/client/assets/poimandres-DRFjx7u4.js +1 -0
  126. package/dist/client/assets/portalTarget-C60SzJiK.js +1 -0
  127. package/dist/client/assets/preload-helper-BaNbYf_w.js +1 -0
  128. package/dist/client/assets/proto-DB4EqR-F.js +1 -0
  129. package/dist/client/assets/pt-BR-LLtJ99P6.js +1 -0
  130. package/dist/client/assets/python-gzcpVVnB.js +1 -0
  131. package/dist/client/assets/r-C5FwQflr.js +1 -0
  132. package/dist/client/assets/red-DX1BQOs8.js +1 -0
  133. package/dist/client/assets/rolldown-runtime-Dd_uD5pT.js +1 -0
  134. package/dist/client/assets/rose-pine-aMsaMD1D.js +1 -0
  135. package/dist/client/assets/rose-pine-dawn-8PwUyIlP.js +1 -0
  136. package/dist/client/assets/rose-pine-moon-DO-qXg-I.js +1 -0
  137. package/dist/client/assets/ru-DvkrOLxc.js +1 -0
  138. package/dist/client/assets/ruby-CfFGiaYl.js +1 -0
  139. package/dist/client/assets/runtime-dom.esm-bundler-CqL7__VR.js +2 -0
  140. package/dist/client/assets/rust-Cfkwpbl8.js +1 -0
  141. package/dist/client/assets/scala-BiFt_7mu.js +1 -0
  142. package/dist/client/assets/scss-C-_0yqZd.js +1 -0
  143. package/dist/client/assets/shellscript-CLZ0U2zV.js +1 -0
  144. package/dist/client/assets/shiki-wasm-noop-Gxv9UHE7.js +1 -0
  145. package/dist/client/assets/slack-dark-DnToyrRv.js +1 -0
  146. package/dist/client/assets/slack-ochin-B2OO5cIa.js +1 -0
  147. package/dist/client/assets/snazzy-light-4G7pJPwS.js +1 -0
  148. package/dist/client/assets/solarized-dark-UdsmMDCL.js +1 -0
  149. package/dist/client/assets/solarized-light-C1IUL_tW.js +1 -0
  150. package/dist/client/assets/source-hSji-yvG.js +2 -0
  151. package/dist/client/assets/sql-BsFa4tDR.js +1 -0
  152. package/dist/client/assets/swift-CyEgAFGc.js +1 -0
  153. package/dist/client/assets/synthwave-84-nFMaYfgc.js +1 -0
  154. package/dist/client/assets/terraform-DswuEJGm.js +1 -0
  155. package/dist/client/assets/time-ago-Bdao9Hh1.js +1 -0
  156. package/dist/client/assets/tokyo-night-oM2G3aXe.js +1 -0
  157. package/dist/client/assets/toml-CcmNWLt0.js +1 -0
  158. package/dist/client/assets/transform-messages-C8U1xonk.js +3 -0
  159. package/dist/client/assets/tsx-DvWhG4dC.js +1 -0
  160. package/dist/client/assets/typescript-BTGs5etX.js +1 -0
  161. package/dist/client/assets/upload-GnI9kmJu.js +1 -0
  162. package/dist/client/assets/uploadSession-BUj4FNau.js +1 -0
  163. package/dist/client/assets/useDocumentTitle-nuqxXiNo.js +185 -0
  164. package/dist/client/assets/vesper-DdrHHSXu.js +1 -0
  165. package/dist/client/assets/vitesse-black-fwtXNY1n.js +1 -0
  166. package/dist/client/assets/vitesse-dark-BZCL-v6S.js +1 -0
  167. package/dist/client/assets/vitesse-light-VbXTXTou.js +1 -0
  168. package/dist/client/assets/vue-BbYmdtmv.js +1 -0
  169. package/dist/client/assets/vue-html-BXjKVtKk.js +1 -0
  170. package/dist/client/assets/vue-i18n-DVI_S4Q5.js +5 -0
  171. package/dist/client/assets/xml-BsprbK0m.js +1 -0
  172. package/dist/client/assets/yaml-rwi0_p6S.js +1 -0
  173. package/dist/client/assets/zh-CN-BIibd6kG.js +1 -0
  174. package/dist/client/assets/zh-TW-3FtUHjoZ.js +1 -0
  175. package/dist/client/favicon.svg +1 -0
  176. package/dist/client/index.html +44 -0
  177. package/dist/client/og-dark.png +0 -0
  178. package/dist/client/og.png +0 -0
  179. package/dist/client/robots.txt +2 -0
  180. package/dist/devframe-CX5butdC.mjs +493 -0
  181. package/dist/devframe.mjs +2 -0
  182. package/dist/index.mjs +90 -0
  183. package/package.json +2 -2
@@ -0,0 +1,1510 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ChatWidget-BsnoQ6oS.js","./vue-i18n-DVI_S4Q5.js","./runtime-dom.esm-bundler-CqL7__VR.js","./useDocumentTitle-nuqxXiNo.js","./rolldown-runtime-Dd_uD5pT.js","./source-hSji-yvG.js","./i18n-CGV_MDS8.js","./locales-SpkpwNqX.js","./en-8hQdak1X.js","./preload-helper-BaNbYf_w.js","./dist-Dh0a8u-Y.js","./llm-store-CVM33nlB.js","./llm-DYDmh8Ki.js"])))=>i.map(i=>d[i]);
2
+ import{i as e,n as t}from"./rolldown-runtime-Dd_uD5pT.js";import{$ as n,$n as r,An as i,Er as a,Et as o,G as s,Gt as c,H as l,Jn as u,Kn as d,Kt as f,Lt as p,Mt as m,Nt as h,P as g,Q as _,Rn as v,Sr as y,Tr as b,U as x,Un as S,V as C,Vn as w,Vt as T,W as E,Yt as ee,Z as D,bn as O,c as te,ct as ne,d as re,dt as k,et as A,f as ie,h as ae,j,kt as oe,l as se,ln as ce,n as le,on as ue,pn as de,qt as fe,vn as M,wt as pe,yt as me,zt as N}from"./vue-i18n-DVI_S4Q5.js";import{C as he,w as ge,x as _e}from"./runtime-dom.esm-bundler-CqL7__VR.js";import{$ as ve,At as ye,D as be,J as xe,K as Se,Q as Ce,S as we,X as Te,Y as Ee,Z as De,_ as Oe,a as ke,an as Ae,at as je,c as Me,ct as Ne,d as Pe,dt as Fe,et as Ie,ft as Le,g as Re,h as ze,i as Be,it as Ve,jt as He,l as Ue,lt as We,n as Ge,nt as Ke,ot as qe,pt as Je,q as Ye,r as Xe,rt as Ze,s as Qe,st as $e,tn as et,tt,u as nt,ut as rt,w as it}from"./useDocumentTitle-nuqxXiNo.js";import{b as at,h as ot,i as st,x as ct}from"./source-hSji-yvG.js";import{n as lt,t as ut}from"./i18n-CGV_MDS8.js";import{i as dt,n as ft,o as pt,r as mt,s as ht,t as gt}from"./analyze-509KQQBC.js";import{i as _t}from"./locales-SpkpwNqX.js";import{t as vt}from"./preload-helper-BaNbYf_w.js";import{a as yt,t as bt}from"./index-BCCy9wJJ.js";import{r as P,t as xt}from"./dist-Dh0a8u-Y.js";import{a as St,c as Ct,d as wt,i as Tt,l as Et,n as Dt,o as Ot,r as kt,s as At,t as jt,u as Mt}from"./DisplayFileIcon-DzBo3Ez5.js";import{n as Nt,t as Pt}from"./GithubAvatar-CSsUV5vf.js";function Ft(e){let t=[],n=``,r=!1;for(let i=0;i<e.length;i++){let a=e[i],o=a===`|`&&i>0&&e[i-1]===`\\`;a===`|`&&!o?(r&&n&&(t.push(n.length),n=``),r=!0):r&&(n+=a)}return r&&n&&t.push(n.length),t}function It(e){let t=[],n=``,r=!1;for(let i=0;i<e.length;i++){let a=e[i],o=a===`|`&&i>0&&e[i-1]===`\\`;a===`|`&&!o?(r&&(t.push(n.trim()),n=``),r=!0):r&&(n+=a)}return n.trim()&&t.push(n.trim()),t}function Lt(e){let t=e.split(`
3
+ `),n=[],r=-1;for(let e=0;e<t.length;e++)t[e].trim().startsWith(`|`)?r===-1&&(r=e):r!==-1&&(n.push({start:r,end:e-1}),r=-1);if(r!==-1&&n.push({start:r,end:t.length-1}),n.length===0)return e;let{start:i,end:a}=n[n.length-1];t[i].trim().endsWith(`|`)||(t[i]+=` |`);let o=Ft(t[i].trim()).length,s=()=>`| `+Array(o).fill(`---`).join(` | `)+` |`,c=a-i>=1?t[i+1].trim():``,l=c.startsWith(`|`)&&(c.includes(`-`)||c.includes(`:`)),u=t[a].trim();if(u.startsWith(`|`)&&(u.includes(`-`)||u.includes(`:`))){let e=It(u).map(e=>{let t=e.startsWith(`:`),n=e.endsWith(`:`)&&e.length>1,r=e.replace(/^:/,``).replace(/:$/,``);if(t&&n)return r.length<1&&(r=`-`),`:`+r+`:`;if(t)return r.length<1&&(r=`-`),`:`+r;if(n)return r.length<1&&(r=`-`),r+`:`;for(;r.length<3;)r+=`-`;return r});for(;e.length<o;)e.push(`---`);t[a]=`| `+e.join(` | `)+` |`}else if(u.startsWith(`|`)&&!u.endsWith(`|`)){let e=t[i].trim();for(let n=i+(l?2:1);n<a;n++){let r=t[n].trim();if(r.startsWith(`|`)&&r.endsWith(`|`)&&!r.includes(`-`)){e=r;break}}let n=Ft(e),r=It(u),o=r[r.length-1]??``,s=/(?:\*\*?|__?|~~|`|\$)$/.test(o)||/(?:\*\*|__|~~|`)[^\s*_~`]+$/.test(o),c=`| `+r.map((e,t)=>{let r=n[t]||e.length+2;return e+` `.repeat(Math.max(0,r-e.length-2))}).join(` | `);t[a]=s?c:c+` |`}return l||t.splice(i+1,0,s()),t.join(`
4
+ `)}function Rt(e,t={}){if(!e)return e;let n=t.syntax!==!1,r=t.attributes??n,i=t.linkMode??`protocol`,a=t.incompleteLinkPlaceholder??`comark:incomplete-link`,o=t.incompleteImagePlaceholder??`comark:incomplete-image`,s=t.math===!0;t.dropTrailingOpeners===!0&&(e=Ut(e));let c=e.split(`
5
+ `),l=c.length,u=!1,d=!1,f=-1,p=null,m=!1,h=!1,g=[],_=/^<(script|pre|style|textarea)(\s|>|$)/i;for(let e=0;e<l;e++){let r=c[e],i=r.trim();if(p){RegExp(`</${p}\\s*>`,`i`).test(r)&&(p=null);continue}let a=i.match(_);if(a){let e=a[1].toLowerCase();RegExp(`</${e}\\s*>`,`i`).test(r)||(p=e);continue}if(zt(r)){let e=r.trim();if(e.startsWith("```")&&e.endsWith("``")&&!e.endsWith("```")&&!e.slice(3).includes("```"))continue;m=!m;continue}if(!m){if(s&&i===`$$`){h=!h;continue}if(e===0&&t.frontmatter&&i===`---`){u=!0;continue}if(u){i===`---`?u=!1:i&&(d=!0);continue}if(i===`---`&&g.length>0){let e=g[g.length-1];e.hasYamlProps=!e.hasYamlProps;continue}if(i.startsWith(`|`)?f=f===-1?e:f:f!==-1&&(f=-1),e===l-1&&n&&i[0]===`:`&&g.length===0){let t=0;for(;t<i.length&&i[t]===`:`;)t++;i.slice(t).trim()===``&&(c[e]=``)}if(n&&i[0]===`:`){let e=0;for(;e<i.length&&i[e]===`:`;)e++;if(e>=2){let t=0;for(;t<r.length&&(r[t]===` `||r[t]===` `);)t++;let n=r.slice(0,t),a=i[e]??``;if(a>=`a`&&a<=`z`||a>=`A`&&a<=`Z`||a===`$`){let t=e;for(;t<i.length;){let e=i[t];if(!(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e>=`0`&&e<=`9`||e===`$`||e===`.`||e===`-`||e===`_`))break;t++}g.push({depth:e,name:i.slice(e,t),indent:n,hasYamlProps:!1})}else e===i.length&&g.length>0&&g[g.length-1].depth===e&&g.pop()}}}}if(!m&&!u&&!h){let e=l-1;for(;e>0&&c[e]===``;)e--;let t=e>=0?c[e]:``,n=t.trim(),u=n.startsWith("```")&&n.endsWith("``")&&!n.endsWith("```");t!==``&&n!==`$$`&&(!zt(t)||u)&&(c[e]=Wt(t,{attributesEnabled:r,linkMode:i,linkPh:a,imagePh:o,math:s}))}let v=c.join(`
6
+ `);if(v=Xt(v),f!==-1&&(v=Lt(v)),s&&h&&(v+=v.endsWith(`
7
+ `)?`$$`:`
8
+ $$`),u&&d){let e=(v.includes(`
9
+ `)?v.slice(v.lastIndexOf(`
10
+ `)+1):v).trim().replace(/\u200B/g,``);e===`-`||e===`--`?v=v.replace(/\u200B+$/,``)+`-`.repeat(3-e.length):v+=v.endsWith(`
11
+ `)?`---`:`
12
+ ---`}if(n&&e.includes(`::`)){let e=v.lastIndexOf(`
13
+ `)+1,t=v.slice(e),n=-1;for(let e=t.length-1;e>=0&&t[e]!==`}`;e--)if(t[e]===`{`){n=e;break}if(n>=0){let e=t.slice(n+1),r=0,i=0;for(let t=0;t<e.length;t++)e[t]===`"`&&r++,e[t]===`'`&&i++;v+=(r%2==1?`"`:``)+(i%2==1?`'`:``)+`}`}if(g.length>0){let e=g[g.length-1],t=v.slice(v.lastIndexOf(`
14
+ `)+1).trim().replace(/\u200B/g,``);e.hasYamlProps&&(t===`-`||t===`--`)&&(v=v.replace(/\u200B+$/,``)+`-`.repeat(3-t.length),e.hasYamlProps=!1);let n=[];for(;g.length;){let e=g.pop();e.hasYamlProps&&n.push(e.indent+`---`),n.push(e.indent+`:`.repeat(e.depth))}v+=`
15
+ `+n.join(`
16
+ `)}}return v}function zt(e){let t=0;for(;t<e.length&&(e[t]===` `||e[t]===` `);)t++;let n=e[t];if(n!=="`"&&n!==`~`)return!1;let r=0;for(;t+r<e.length&&e[t+r]===n;)r++;return r>=3}function Bt(e){if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95}function Vt(e){return e===``||e===` `||e===` `||e===`
17
+ `}var Ht=`*_$:[{!`;function Ut(e){let t=e.length;for(;t>0;){let n=e[t-1];if(n===` `||n===` `||n===`
18
+ `||n===`\r`)t--;else break}if(t===0)return e;let n=t;for(;n>0&&Ht.includes(e[n-1])&&!(n>=2&&e[n-2]===`\\`);)n--;if(n===t)return e;let r=n>0?e[n-1]:``;if(r!==``&&r!==` `&&r!==` `&&r!==`
19
+ `&&r!==`\r`)return e;let i=n;return i>0&&(e[i-1]===` `||e[i-1]===` `)&&i--,e.slice(0,i)+e.slice(t)}function Wt(e,t){if(e.endsWith(` `)&&!e.endsWith(` `)){let t=e.lastIndexOf(`
20
+ `),n=t===-1?e:e.slice(t+1);/^[ \t]*[A-Za-z_][\w.-]*: $/.test(n)||(e=e.slice(0,-1))}let n=e.length,r=[],i=[],a=!1,o=!1,s=!1,c=!1,l=!1,u=!1,d=0,f=0,p=0,m=!1,h=-1,g=0,_=0,v=0,y=(e,t,n)=>{let r=!Vt(t)&&i[i.length-1]===e,a=!Vt(n);r?i.pop():a&&i.push(e)},b=e=>{i[i.length-1]===e?i.pop():i.push(e)};for(let x=0;x<n;x++){let S=e[x],C=x>0?e[x-1]:``,w=x+1<n?e[x+1]:``;if(S===`
21
+ `){r.push(S),f=x+1;continue}if(x===f||x>0&&e[x-1]===`
22
+ `){let t=x;for(;t<n&&(e[t]===` `||e[t]===` `);)t++;let i=e[t];if(i==="`"||i===`~`){let o=0;for(;t+o<n&&e[t+o]===i;)o++;if(o>=3){let o=t;for(;o<n&&e[o]!==`
23
+ `;)o++;let s=e.slice(t,o);if(i==="`"&&s.startsWith("```")&&s.endsWith("``")&&!s.endsWith("```")&&!s.slice(3).includes("```")){for(;x<o;)r.push(e[x]),x++;r.push("`"),x--;continue}for(a=!a;x<n&&e[x]!==`
24
+ `;)r.push(e[x]),x++;x<n?(r.push(`
25
+ `),f=x+1):x--;continue}}}if(a){r.push(S);continue}if(S===`\\`){r.push(S),x+1<n&&r.push(e[++x]);continue}if(S===`>`){let t=x;for(;t>0&&e[t-1]!==`
26
+ `;)t--;let n=e.slice(t,x);if(/^(\s*(?:[-*+]|\d+[.)]) +)$/.test(n)&&/^=?\s*\$?\d/.test(e.slice(x+1))){r.push(`\\`,`>`);continue}}if(S===`~`&&w!==`~`&&C!==`~`&&Bt(C)&&Bt(w)&&!o&&!s&&!c&&!Zt(e,x)){r.push(`\\`,`~`);continue}if(S===`<`&&(w>=`a`&&w<=`z`||w>=`A`&&w<=`Z`||w===`/`)&&(h=r.length),S===`>`&&(h=-1),o){r.push(S),S==="`"&&w!=="`"&&C!=="`"&&(o=!1,i[i.length-1]==="`"&&i.pop());continue}if(c){r.push(S),S===`$`&&w===`$`&&(r.push(`$`),x++,c=!1,i[i.length-1]===`$$`&&i.pop());continue}if(s){r.push(S),S===`$`&&w!==`$`&&(s=!1,i[i.length-1]===`$`&&i.pop());continue}if(l){r.push(S),S===`\\`&&w===`)`&&(r.push(`)`),x++,l=!1);continue}if(u){r.push(S),S===`\\`&&w===`]`&&(r.push(`]`),x++,u=!1);continue}if(t.attributesEnabled&&S===`{`&&C&&C!==` `&&C!==` `&&C!==`
27
+ `){d++,r.push(S);continue}if(t.attributesEnabled&&S===`}`){d>0&&d--,r.push(S);continue}if(d>0){r.push(S);continue}if(S===`[`){p++,r.push(S);continue}if(S===`]`){p>0&&p--,r.push(S),w===`(`&&(m=!0);continue}if(m){r.push(S),S===`)`&&p===0&&(m=!1);continue}if(p>0){r.push(S);continue}if(S==="`"){if(w==="`"&&e[x+2]==="`"){r.push("`","`","`"),x+=2;continue}r.push(S),o=!0,i.push("`");continue}if(S===`$`){r.push(S),w===`$`?(r.push(`$`),x++,t.math&&(c=!c,b(`$$`))):t.math&&Qt(e,x)&&(s=!0,i.push(`$`));continue}if(S===`*`){let t=x;for(;t+1<n&&e[t+1]===`*`;)t++;let a=t-x+1,o=t+1<n?e[t+1]:``,s=Vt(C),c=Vt(o),l=a===1&&s&&c;for(let e=x;e<=t;e++)r.push(`*`);if(!l){if(a===1&&Bt(C)&&Bt(o)&&g%2==0){x=t;continue}if(g+=a,a===1)y(`*`,C,o);else if(a===2)_++,y(`**`,C,o);else if(a>=3){let r=x;for(;r>0&&e[r-1]!==`
28
+ `;)r--;let c=t+1;for(;c<n&&e[c]!==`
29
+ `;)c++;let l=e.slice(r,c),u=!0;for(let e=0;e<l.length;e++){let t=l[e];if(t!==`*`&&t!==` `&&t!==` `){u=!1;break}}if(u){x=t;continue}if(a===3){let e=i.includes(`*`),t=i.includes(`**`);if(e&&t&&!s){for(let e=i.length-1;e>=0;e--)(i[e]===`*`||i[e]===`**`)&&i.splice(e,1);_++}else v++,y(`***`,C,o)}else{let e=Math.floor(a/2);for(let t=0;t<e;t++)_++,y(`**`,C,o);a%2==1&&y(`*`,C,o)}x=t;continue}}x=t;continue}if(S===`_`){let t=x;for(;t+1<n&&e[t+1]===`_`;)t++;let i=t-x+1,a=t+1<n?e[t+1]:``,o=Vt(C)&&Vt(a);for(let e=x;e<=t;e++)r.push(`_`);if(i>=3){let r=x;for(;r>0&&e[r-1]!==`
30
+ `;)r--;let i=t+1;for(;i<n&&e[i]!==`
31
+ `;)i++;let a=e.slice(r,i),o=!0;for(let e=0;e<a.length;e++){let t=a[e];if(t!==`_`&&t!==` `&&t!==` `){o=!1;break}}if(o){x=t;continue}}if(!(Bt(C)&&Bt(a))&&!o){if(i===1)y(`_`,C,a);else if(i>=2){let e=Math.floor(i/2);for(let t=0;t<e;t++)y(`__`,C,a);i%2==1&&y(`_`,C,a)}}x=t;continue}if(S===`~`){let t=x;for(;t+1<n&&e[t+1]===`~`;)t++;let i=t-x+1,a=t+1<n?e[t+1]:``,o=Vt(C)&&Vt(a);for(let e=x;e<=t;e++)r.push(`~`);if(!o&&i>=2){let e=Math.floor(i/2);for(let t=0;t<e;t++)y(`~~`,C,a)}x=t;continue}r.push(S)}let x=r.join(``);h>=0&&(x=Gt(x));let S=Jt(x,t);if(S!==x){if(t.linkMode===`protocol`&&(S.endsWith(`](${t.linkPh})`)||S.endsWith(`](${t.imagePh})`)))return S;x=S}if(i.length===0||Kt(x))return x;if(o){let e=x.lastIndexOf("`");if((e>=0?x.slice(e+1):``).length>0){let e=-1;for(let t=0;t<i.length;t++)i[t]==="`"&&(e=t);let t=``;if(e>0)for(let n=e-1;n>=0;n--){let e=i[n];(e===`**`||e===`*`||e===`__`||e===`_`||e===`~~`||e===`***`)&&(t+=e)}for(let n=i.length-1;n>e;n--){let e=i[n];(e===`**`||e===`*`||e===`__`||e===`_`||e===`~~`||e===`***`)&&(t+=e)}return x+t+"`"}return x}return x=qt(x,i,{asteriskTotal:g,doubleAsteriskCount:_,tripleCount:v}),x}function Gt(e){for(let t=e.length-1;t>=0;t--){if(e[t]===`>`||e[t]===`
32
+ `)return e;if(e[t]===`<`){let n=e[t+1]??``;return n>=`a`&&n<=`z`||n>=`A`&&n<=`Z`||n===`/`?e.slice(0,t).replace(/[ \t]+$/,``):e}}return e}function Kt(e){let t=e.lastIndexOf(`
33
+ `),n=(t===-1?e:e.slice(t+1)).trim();return n?!!(n===`*`||n===`**`||n===`***`||n===`****`||n===`_`||n===`__`||n===`___`||n===`~`||n===`~~`||n==="`"||/^\*{3,}$/.test(n)||/^_{3,}$/.test(n)||/^-{3,}$/.test(n)):!1}function qt(e,t,n){if(/\*\*\*[^*]+\*{1,2}$/.test(e)&&!/\*{3}$/.test(e)){let r=e.match(/\*+$/)?.[0].length??0;if(r>=1&&r<=2&&(t.includes(`***`)||n.tripleCount%2==1))return e+`*`.repeat(3-r)}if(/\*\*[^*]+\*$/.test(e)&&t.includes(`**`)&&!t.includes(`***`))return e+`*`;if(/__[^_]+_$/.test(e)&&t.includes(`__`))return e+`_`;if(/~~[^~]+~$/.test(e)&&t.includes(`~~`))return e+`~`;let r=n.doubleAsteriskCount>=2&&n.doubleAsteriskCount%2==0&&n.asteriskTotal%2==0,i=t.slice();r&&(i=i.filter(e=>e!==`***`&&e!==`**`&&e!==`*`));let a=[];for(let t=i.length-1;t>=0;t--){let n=i[t];if(n===`$$`){a.push(`$$`);continue}if(n===`$`){a.push(`$`);continue}if(n==="`")continue;let r=n,o=e.lastIndexOf(r);o<0||$t(e.slice(o+r.length))&&a.push(n)}if(a.length===0)return e;if(a.includes(`*`)||a.includes(`**`)||a.includes(`***`)){let e=null;for(let t of a)if(t===`*`||t===`**`||t===`***`){e=t;break}if(e===`*`&&a.includes(`**`)&&!a.includes(`***`)&&a[0]===`*`)for(let e=a.length-1;e>=0;e--)(a[e]===`**`||a[e]===`***`)&&a.splice(e,1)}let o=``;for(let t of a)if(t===`$$`){if(e.endsWith(`$`)&&!e.endsWith(`$$`))o+=`$`;else{let t=e.indexOf(`$$`),n=t!==-1&&e.indexOf(`
34
+ `,t)!==-1;o+=n&&!e.endsWith(`
35
+ `)?`
36
+ $$`:`$$`}}else o+=t;if(e.endsWith(` `)&&!e.endsWith(` `))return e.slice(0,-1)+o;let s=e.length;for(;s>0&&e[s-1]===`
37
+ `;)s--;return s<e.length?e.slice(0,s)+o+e.slice(s):e+o}function Jt(e,t){let n=e.lastIndexOf(`](`);if(n!==-1&&!e.slice(n+2).includes(`)`)&&!Yt(e,n)){let r=1,i=-1;for(let t=n-1;t>=0;t--)if(e[t]===`]`)r++;else if(e[t]===`[`&&(r--,r===0)){i=t;break}if(i>=0&&!Yt(e,i)){let r=i>0&&e[i-1]===`!`,a=r?i-1:i,o=e.slice(0,a),s=e.slice(i+1,n);return r?`${o}![${s}](${t.imagePh})`:t.linkMode===`text-only`?o+s:`${o}[${s}](${t.linkPh})`}}for(let n=e.length-1;n>=0;n--){if(e[n]!==`[`||Yt(e,n))continue;let r=n>0&&e[n-1]===`!`,i=1,a=-1;for(let t=n+1;t<e.length;t++)if(e[t]===`[`)i++;else if(e[t]===`]`&&(i--,i===0)){a=t;break}if(a===-1){let i=r?n-1:n,a=e.slice(0,i);return r?`${a}![${e.slice(n+1)}](${t.imagePh})`:t.linkMode===`text-only`?e.slice(0,n)+e.slice(n+1):`${e}](${t.linkPh})`}if(r&&(a===e.length-1||e[a+1]!==`(`)&&e.slice(a+1).trim()===``)return`${e.slice(0,n-1)}![${e.slice(n+1,a)}](${t.imagePh})`}return e}function Yt(e,t){let n=!1,r=0;for(;r<t;){if(r===0||e[r-1]===`
38
+ `){let t=r;for(;t<e.length&&(e[t]===` `||e[t]===` `);)t++;let i=e[t];if(i==="`"||i===`~`){let a=0;for(;t+a<e.length&&e[t+a]===i;)a++;if(a>=3){for(n=!n;r<e.length&&e[r]!==`
39
+ `;)r++;r<e.length&&r++;continue}}}r++}return n}function Xt(e){let t=e.lastIndexOf(`
40
+ `);if(t===-1)return e;let n=e.slice(t+1),r=n.trim();if(!/^(-{1,2}|={1,2})$/.test(r)||/\s$/.test(n)&&n!==r)return e;let i=e.slice(0,t),a=i.lastIndexOf(`
41
+ `),o=(a===-1?i:i.slice(a+1)).trim();return!o||o===`---`||/^[A-Za-z_][\w.-]*\s*:/.test(o)?e:e+`​`}function Zt(e,t){let n=t=>{if(e[t]!==`~`)return!1;let n=t>0?e[t-1]:``,r=t+1<e.length?e[t+1]:``;return n!==`~`&&r!==`~`},r=(t,n)=>{if(n-t<1)return!1;for(let r=t;r<n;r++){let t=e[r];if(t===`~`||t===` `||t===` `||t===`
42
+ `||t===`\r`)return!1}return!0};for(let i=t-1;i>=0&&e[i]!==`
43
+ `;i--)if(e[i]===`~`)return!n(i)||!Bt(i>0?e[i-1]:``)||!Bt(t+1<e.length?e[t+1]:``)?!1:r(i+1,t);for(let i=t+1;i<e.length&&e[i]!==`
44
+ `;i++)if(e[i]===`~`)return!n(i)||!Bt(t>0?e[t-1]:``)||!Bt(i+1<e.length?e[i+1]:``)?!1:r(t+1,i);return!1}function Qt(e,t){let n=t+1<e.length?e[t+1]:``;return!(!n||n===` `||n===` `||n===`
45
+ `||n>=`0`&&n<=`9`||(t>0?e[t-1]:``)===`:`)}function $t(e){for(let t=0;t<e.length;t++){let n=e[t];if(n!==` `&&n!==` `&&n!==`
46
+ `&&n!==`\r`&&n!==`*`&&n!==`_`&&n!==`~`&&n!=="`")return!0}return!1}function en(e){if(typeof e==`string`||e.length<2)return e;let[t,n,...r]=e,i=r.filter(e=>typeof e!=`string`||e&&e.trim());if(i.length===0)return e;if(i.length>1||typeof i[0]==`string`||i[0][0]!==`p`)return[t,n,...r.map(e=>en(e))];let a=i[0][1];return[t,a&&Object.keys(a).length>0?{...a,...n}:n,...i[0].slice(2)]}var tn=Object.defineProperty,nn=(e,t)=>{let n={};for(var r in e)tn(n,r,{get:e[r],enumerable:!0});return t&&tn(n,Symbol.toStringTag,{value:`Module`}),n},rn=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),an=String.fromCodePoint??(e=>{let t=``;return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t});function on(e){return e>=55296&&e<=57343||e>1114111?65533:rn.get(e)??e}function sn(e){let t=typeof atob==`function`?atob(e):typeof Buffer.from==`function`?Buffer.from(e,`base64`).toString(`binary`):new Buffer(e,`base64`).toString(`binary`),n=t.length&-2,r=new Uint16Array(n/2);for(let e=0,i=0;e<n;e+=2){let n=t.charCodeAt(e),a=t.charCodeAt(e+1);r[i++]=n|a<<8}return r}var cn=sn(`QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQCpQIABY3B5ACUBKAE1AfUhdGUGYWmg0iJ0KGFsRGlmZmVyZW50aWF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E_LENGTH=49152]=`VALUE_LENGTH`,e[e.FLAG13=8192]=`FLAG13`,e[e.BRANCH_LENGTH=8064]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(ln||={});var F;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(F||={});var un=32;function dn(e){return e>=F.ZERO&&e<=F.NINE}function fn(e){return e>=F.UPPER_A&&e<=F.UPPER_F||e>=F.LOWER_A&&e<=F.LOWER_F}function pn(e){return e>=F.UPPER_A&&e<=F.UPPER_Z||e>=F.LOWER_A&&e<=F.LOWER_Z||dn(e)}function mn(e){return e===F.EQUALS||pn(e)}var I;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(I||={});var hn;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(hn||={});var gn=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=I.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=hn.Strict,this.runConsumed=0}startEntity(e){this.decodeMode=e,this.state=I.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(e,t){switch(this.state){case I.EntityStart:return e.charCodeAt(t)===F.NUM?(this.state=I.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=I.NamedEntity,this.stateNamedEntity(e,t));case I.NumericStart:return this.stateNumericStart(e,t);case I.NumericDecimal:return this.stateNumericDecimal(e,t);case I.NumericHex:return this.stateNumericHex(e,t);case I.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|un)===F.LOWER_X?(this.state=I.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=I.NumericDecimal,this.stateNumericDecimal(e,t))}stateNumericHex(e,t){for(;t<e.length;){let n=e.charCodeAt(t);if(dn(n)||fn(n)){let e=n<=F.NINE?n-F.ZERO:(n|un)-F.LOWER_A+10;this.result=this.result*16+e,this.consumed++,t++}else return this.emitNumericEntity(n,3)}return-1}stateNumericDecimal(e,t){for(;t<e.length;){let n=e.charCodeAt(t);if(dn(n))this.result=this.result*10+(n-F.ZERO),this.consumed++,t++;else return this.emitNumericEntity(n,2)}return-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===F.SEMI)this.consumed+=1;else if(this.decodeMode===hn.Strict)return 0;return this.emitCodePoint(on(this.result),this.consumed),this.errors&&(e!==F.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&ln.VALUE_LENGTH)>>14;for(;t<e.length;){if(i===0&&(r&ln.FLAG13)!==0){let a=(r&ln.BRANCH_LENGTH)>>7;if(this.runConsumed===0){let n=r&ln.JUMP_TABLE;if(e.charCodeAt(t)!==n)return this.result===0?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}for(;this.runConsumed<a;){if(t>=e.length)return-1;let r=this.runConsumed-1,i=n[this.treeIndex+1+(r>>1)],a=r%2==0?i&255:i>>8&255;if(e.charCodeAt(t)!==a)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(a>>1),r=n[this.treeIndex],i=(r&ln.VALUE_LENGTH)>>14}if(t>=e.length)break;let a=e.charCodeAt(t);if(a===F.SEMI&&i!==0&&(r&ln.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);if(this.treeIndex=vn(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===hn.Attribute&&(i===0||mn(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&ln.VALUE_LENGTH)>>14,i!==0){if(a===F.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==hn.Strict&&(r&ln.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}t++,this.excess++}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&ln.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~(ln.VALUE_LENGTH|ln.FLAG13):r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case I.NamedEntity:return this.result!==0&&(this.decodeMode!==hn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case I.NumericDecimal:return this.emitNumericEntity(0,2);case I.NumericHex:return this.emitNumericEntity(0,3);case I.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case I.EntityStart:return 0}}};function _n(e){let t=``,n=new gn(e,e=>t+=an(e));return function(e,r){let i=0,a=0;for(;(a=e.indexOf(`&`,a))>=0;){t+=e.slice(i,a),n.startEntity(r);let o=n.write(e,a+1);if(o<0){i=a+n.end();break}i=a+o,a=o===0?i+1:i}let o=t+e.slice(i);return t=``,o}}function vn(e,t,n,r){let i=(t&ln.BRANCH_LENGTH)>>7,a=t&ln.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=i+1>>1,s=0,c=i-1;for(;s<=c;){let t=s+c>>>1,i=e[n+(t>>1)]>>(t&1)*8&255;if(i<r)s=t+1;else if(i>r)c=t-1;else return e[n+o+t]}return-1}var yn=_n(cn);function bn(e,t=hn.Legacy){return yn(e,t)}function xn(e){return yn(e,hn.Strict)}var Sn={};function Cn(e){let t=Sn[e];if(t)return t;t=Sn[e]=[];for(let e=0;e<128;e++){let n=String.fromCharCode(e);t.push(n)}for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t[r]=`%`+(`0`+r.toString(16).toUpperCase()).slice(-2)}return t}function wn(e,t){typeof t!=`string`&&(t=wn.defaultChars);let n=Cn(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(e){let t=``;for(let r=0,i=e.length;r<i;r+=3){let a=parseInt(e.slice(r+1,r+3),16);if(a<128){t+=n[a];continue}if((a&224)==192&&r+3<i){let n=parseInt(e.slice(r+4,r+6),16);if((n&192)==128){let e=a<<6&1984|n&63;t+=e<128?`��`:String.fromCharCode(e),r+=3;continue}}if((a&240)==224&&r+6<i){let n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16);if((n&192)==128&&(i&192)==128){let e=a<<12&61440|n<<6&4032|i&63;t+=e<2048||e>=55296&&e<=57343?`���`:String.fromCharCode(e),r+=6;continue}}if((a&248)==240&&r+9<i){let n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),o=parseInt(e.slice(r+10,r+12),16);if((n&192)==128&&(i&192)==128&&(o&192)==128){let e=a<<18&1835008|n<<12&258048|i<<6&4032|o&63;e<65536||e>1114111?t+=`����`:(e-=65536,t+=String.fromCharCode(55296+(e>>10),56320+(e&1023))),r+=9;continue}}t+=`�`}return t})}wn.defaultChars=`;/?:@&=+$,#`,wn.componentChars=``;var Tn={};function En(e){let t=Tn[e];if(t)return t;t=Tn[e]=[];for(let e=0;e<128;e++){let n=String.fromCharCode(e);/^[0-9a-z]$/i.test(n)?t.push(n):t.push(`%`+(`0`+e.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function Dn(e,t,n){typeof t!=`string`&&(n=t,t=Dn.defaultChars),n===void 0&&(n=!0);let r=En(t),i=``;for(let t=0,a=e.length;t<a;t++){let o=e.charCodeAt(t);if(n&&o===37&&t+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(t+1,t+3))){i+=e.slice(t,t+3),t+=2;continue}if(o<128){i+=r[o];continue}if(o>=55296&&o<=57343){if(o>=55296&&o<=56319&&t+1<a){let n=e.charCodeAt(t+1);if(n>=56320&&n<=57343){i+=encodeURIComponent(e[t]+e[t+1]),t++;continue}}i+=`%EF%BF%BD`;continue}i+=encodeURIComponent(e[t])}return i}Dn.defaultChars=`;/?:@&=+$,-_.!~*'()#`,Dn.componentChars=`-_.!~*'()`;function On(e){let t=``;return t+=e.protocol||``,t+=e.slashes?`//`:``,t+=e.auth?e.auth+`@`:``,e.hostname&&e.hostname.indexOf(`:`)!==-1?t+=`[`+e.hostname+`]`:t+=e.hostname||``,t+=e.port?`:`+e.port:``,t+=e.pathname||``,t+=e.search||``,t+=e.hash||``,t}function kn(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var An=/^([a-z0-9.+-]+:)/i,jn=/:[0-9]*$/,Mn=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Nn=[`%`,`/`,`?`,`;`,`#`,`'`,`{`,`}`,`|`,`\\`,`^`,"`",`<`,`>`,`"`,"`",` `,`\r`,`
47
+ `,` `],Pn=[`/`,`?`,`#`],Fn=255,In=/^[+a-z0-9A-Z_-]{0,63}$/,Ln=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Rn={javascript:!0,"javascript:":!0},zn={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Bn(e,t){if(e&&e instanceof kn)return e;let n=new kn;return n.parse(e,t),n}kn.prototype.parse=function(e,t){let n,r,i,a=e;if(a=a.trim(),!t&&e.split(`#`).length===1){let e=Mn.exec(a);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let o=An.exec(a);if(o&&(o=o[0],n=o.toLowerCase(),this.protocol=o,a=a.substr(o.length)),(t||o||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=a.substr(0,2)===`//`,i&&!(o&&Rn[o])&&(a=a.substr(2),this.slashes=!0)),!Rn[o]&&(i||o&&!zn[o])){let e=-1;for(let t=0;t<Pn.length;t++)r=a.indexOf(Pn[t]),r!==-1&&(e===-1||r<e)&&(e=r);let t,n;n=e===-1?a.lastIndexOf(`@`):a.lastIndexOf(`@`,e),n!==-1&&(t=a.slice(0,n),a=a.slice(n+1),this.auth=t),e=-1;for(let t=0;t<Nn.length;t++)r=a.indexOf(Nn[t]),r!==-1&&(e===-1||r<e)&&(e=r);e===-1&&(e=a.length),a[e-1]===`:`&&e--;let i=a.slice(0,e);a=a.slice(e),this.parseHost(i),this.hostname=this.hostname||``;let o=this.hostname[0]===`[`&&this.hostname[this.hostname.length-1]===`]`;if(!o){let e=this.hostname.split(/\./);for(let t=0,n=e.length;t<n;t++){let n=e[t];if(n&&!n.match(In)){let r=``;for(let e=0,t=n.length;e<t;e++)n.charCodeAt(e)>127?r+=`x`:r+=n[e];if(!r.match(In)){let r=e.slice(0,t),i=e.slice(t+1),o=n.match(Ln);o&&(r.push(o[1]),i.unshift(o[2])),i.length&&(a=i.join(`.`)+a),this.hostname=r.join(`.`);break}}}}this.hostname.length>Fn&&(this.hostname=``),o&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let s=a.indexOf(`#`);s!==-1&&(this.hash=a.substr(s),a=a.slice(0,s));let c=a.indexOf(`?`);return c!==-1&&(this.search=a.substr(c),a=a.slice(0,c)),a&&(this.pathname=a),zn[n]&&this.hostname&&!this.pathname&&(this.pathname=``),this},kn.prototype.parseHost=function(e){let t=jn.exec(e);t&&(t=t[0],t!==`:`&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Vn=t({decode:()=>wn,encode:()=>Dn,format:()=>On,parse:()=>Bn}),Hn=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Un=/[\0-\x1F\x7F-\x9F]/,Wn=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Gn=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Kn=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,qn=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Jn=t({Any:()=>Hn,Cc:()=>Un,Cf:()=>Wn,P:()=>Gn,S:()=>Kn,Z:()=>qn});function Yn(e){let t={};e||={},t.src_Any=Hn.source,t.src_Cc=Un.source,t.src_Z=qn.source,t.src_P=Gn.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join(`|`),t.src_ZCc=[t.src_Z,t.src_Cc].join(`|`);let n=`[><|]`;return t.src_pseudo_letter=`(?:(?!${n}|${t.src_ZPCc})${t.src_Any})`,t.src_ip4=`(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)`,t.src_auth=`(?:(?:(?!${t.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`,t.src_port=`(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?`,t.src_host_terminator=`(?=$|${n}|${t.src_ZPCc})(?!${e[`---`]?`-(?!--)|`:`-|`}_|:\\d|\\.-|\\.(?!$|${t.src_ZPCc}))`,t.src_path=`(?:[/?#](?:(?!${t.src_ZCc}|${n}|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!${t.src_ZCc}|\\]).)*\\]|\\((?:(?!${t.src_ZCc}|[)]).)*\\)|\\{(?:(?!${t.src_ZCc}|[}]).)*\\}|\\"(?:(?!${t.src_ZCc}|["]).)+\\"|\\'(?:(?!${t.src_ZCc}|[']).)+\\'|\\'(?=${t.src_pseudo_letter}|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!${t.src_ZCc}|[.]|$)|`+(e[`---`]?`\\-(?!--(?:[^-]|$))(?:-*)|`:`\\-+|`)+`,(?!${t.src_ZCc}|$)|;(?!${t.src_ZCc}|$)|\\!+(?!${t.src_ZCc}|[!]|$)|\\?(?!${t.src_ZCc}|[?]|$))+|\\/)?`,t.src_email_name=`[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]{0,63}`,t.src_xn=`xn--[a-z0-9\\-]{1,59}`,t.src_domain_root=`(?:`+t.src_xn+`|${t.src_pseudo_letter}{1,63})`,t.src_domain=`(?:`+t.src_xn+`|(?:${t.src_pseudo_letter})|(?:${t.src_pseudo_letter}(?:-|${t.src_pseudo_letter}){0,61}${t.src_pseudo_letter}))`,t.src_host=`(?:(?:(?:(?:${t.src_domain})\\.)*${t.src_domain}))`,t.tpl_host_fuzzy=`(?:`+t.src_ip4+`|(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%)))`,t.tpl_host_no_ip_fuzzy=`(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%))`,t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${t.src_ZPCc}|>|$))`,t.tpl_email_fuzzy=`(^|${n}|"|\\(|${t.src_ZCc})(${t.src_email_name}@${t.tpl_host_fuzzy_strict})`,t.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uff5c]|${t.src_ZPCc}))((?![$+<=>^\`|\uff5c])${t.tpl_host_port_fuzzy_strict}${t.src_path})`,t.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uff5c]|${t.src_ZPCc}))((?![$+<=>^\`|\uff5c])${t.tpl_host_port_no_ip_fuzzy_strict}${t.src_path})`,t}function Xn(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function Zn(e){return Object.prototype.toString.call(e)}function Qn(e){return Zn(e)===`[object String]`}function $n(e){return Zn(e)===`[object Object]`}function er(e){return Zn(e)===`[object RegExp]`}function tr(e){return Zn(e)===`[object Function]`}function nr(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,`\\$&`)}var rr={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function ir(e){return Object.keys(e||{}).reduce(function(e,t){return e||rr.hasOwnProperty(t)},!1)}var ar={"http:":{validate:function(e,t,n){let r=e.slice(t);return n.re.http||(n.re.http=RegExp(`^\\/\\/${n.re.src_auth}${n.re.src_host_port_strict}${n.re.src_path}`,`i`)),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":`http:`,"ftp:":`http:`,"//":{validate:function(e,t,n){let r=e.slice(t);return n.re.no_http||(n.re.no_http=RegExp(`^`+n.re.src_auth+`(?:localhost|(?:(?:${n.re.src_domain})\\.)+${n.re.src_domain_root})`+n.re.src_port+n.re.src_host_terminator+n.re.src_path,`i`)),n.re.no_http.test(r)?t>=3&&e[t-3]===`:`||t>=3&&e[t-3]===`/`?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let r=e.slice(t);return n.re.mailto||(n.re.mailto=RegExp(`^${n.re.src_email_name}@${n.re.src_host_strict}`,`i`)),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},or=`a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]`,sr=`biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф`.split(`|`);function cr(e){return function(t,n){let r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function lr(){return function(e,t){t.normalize(e)}}function ur(e){let t=e.re=Yn(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(or),n.push(t.src_xn),t.src_tlds=n.join(`|`);function r(e){return e.replace(`%TLDS%`,t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),`i`),t.email_fuzzy_global=RegExp(r(t.tpl_email_fuzzy),`ig`),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),`i`),t.link_fuzzy_global=RegExp(r(t.tpl_link_fuzzy),`ig`),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),`i`),t.link_no_ip_fuzzy_global=RegExp(r(t.tpl_link_no_ip_fuzzy),`ig`),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),`i`);let i=[];e.__compiled__={};function a(e,t){throw Error(`(LinkifyIt) Invalid schema "${e}": ${t}`)}Object.keys(e.__schemas__).forEach(function(t){let n=e.__schemas__[t];if(n===null)return;let r={validate:null,link:null};if(e.__compiled__[t]=r,$n(n)){er(n.validate)?r.validate=cr(n.validate):tr(n.validate)?r.validate=n.validate:a(t,n),tr(n.normalize)?r.normalize=n.normalize:n.normalize?a(t,n):r.normalize=lr();return}if(Qn(n)){i.push(t);return}a(t,n)}),i.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[``]={validate:null,normalize:lr()};let o=Object.keys(e.__compiled__).filter(function(t){return t.length>0&&e.__compiled__[t]}).map(nr).join(`|`);e.re.schema_test=RegExp(`(^|(?!_)(?:[><\uff5c]|${t.src_ZPCc}))(${o})`,`i`),e.re.schema_search=RegExp(`(^|(?!_)(?:[><\uff5c]|${t.src_ZPCc}))(${o})`,`ig`),e.re.schema_at_start=RegExp(`^${e.re.schema_search.source}`,`i`),e.re.pretest=RegExp(`(${e.re.schema_test.source})|(${e.re.host_fuzzy_test.source})|@`,`i`)}function dr(e,t,n,r){let i=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=i,this.text=i,this.url=i}function fr(e,t){if(!(this instanceof fr))return new fr(e,t);t||ir(e)&&(t=e,e={}),this.__opts__=Xn({},rr,t),this.__schemas__=Xn({},ar,e),this.__compiled__={},this.__tlds__=sr,this.__tlds_replaced__=!1,this.re={},ur(this)}fr.prototype.add=function(e,t){return this.__schemas__[e]=t,ur(this),this},fr.prototype.set=function(e){return this.__opts__=Xn(this.__opts__,e),this},fr.prototype.test=function(e){if(!e.length)return!1;let t,n;if(this.re.schema_test.test(e)){for(n=this.re.schema_search,n.lastIndex=0;(t=n.exec(e))!==null;)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__[`http:`]&&e.search(this.re.host_fuzzy_test)>=0&&e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__[`mailto:`]&&e.indexOf(`@`)>=0&&e.match(this.re.email_fuzzy)!==null)},fr.prototype.pretest=function(e){return this.re.pretest.test(e)},fr.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},fr.prototype.match=function(e){let t=[],n=[],r=[],i=[],a,o,s;function c(e,t){return e?t?e.index===t.index?e.lastIndex>=t.lastIndex?e:t:e.index<t.index?e:t:e:t}if(!e.length)return null;if(this.re.schema_test.test(e))for(s=this.re.schema_search,s.lastIndex=0;(a=s.exec(e))!==null;)o=this.testSchemaAt(e,a[2],s.lastIndex),o&&n.push({schema:a[2],index:a.index+a[1].length,lastIndex:a.index+a[0].length+o});if(this.__opts__.fuzzyLink&&this.__compiled__[`http:`])for(s=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,s.lastIndex=0;(a=s.exec(e))!==null;)r.push({schema:``,index:a.index+a[1].length,lastIndex:a.index+a[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__[`mailto:`])for(s=this.re.email_fuzzy_global,s.lastIndex=0;(a=s.exec(e))!==null;)i.push({schema:`mailto:`,index:a.index+a[1].length,lastIndex:a.index+a[0].length});let l=[0,0,0],u=0;for(;;){let a=[n[l[0]],i[l[1]],r[l[2]]],o=c(c(a[0],a[1]),a[2]);if(!o)break;if(o===a[0]?l[0]++:o===a[1]?l[1]++:l[2]++,o.index<u)continue;let s=new dr(e,o.schema,o.index,o.lastIndex);this.__compiled__[s.schema].normalize(s,this),t.push(s),u=o.lastIndex}return t.length?t:null},fr.prototype.matchAtStart=function(e){if(!e.length)return null;let t=this.re.schema_at_start.exec(e);if(!t)return null;let n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;let r=new dr(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__compiled__[r.schema].normalize(r,this),r},fr.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse(),ur(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,ur(this),this)},fr.prototype.normalize=function(e){e.schema||(e.url=`http://${e.url}`),e.schema===`mailto:`&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)},fr.prototype.onCompile=function(){};var pr=2147483647,mr=36,hr=1,gr=26,_r=38,vr=700,yr=72,br=128,xr=`-`,Sr=/^xn--/,Cr=/[^\0-\x7F]/,wr=/[\x2E\u3002\uFF0E\uFF61]/g,Tr={overflow:`Overflow: input needs wider integers to process`,"not-basic":`Illegal input >= 0x80 (not a basic code point)`,"invalid-input":`Invalid input`},Er=35,Dr=Math.floor,Or=String.fromCharCode;function kr(e){throw RangeError(Tr[e])}function Ar(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n}function jr(e,t){let n=e.split(`@`),r=``;n.length>1&&(r=n[0]+`@`,e=n[1]),e=e.replace(wr,`.`);let i=Ar(e.split(`.`),t).join(`.`);return r+i}function Mr(e){let t=[],n=0,r=e.length;for(;n<r;){let i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){let r=e.charCodeAt(n++);(r&64512)==56320?t.push(((i&1023)<<10)+(r&1023)+65536):(t.push(i),n--)}else t.push(i)}return t}var Nr=e=>String.fromCodePoint(...e),Pr=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:mr},Fr=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Ir=function(e,t,n){let r=0;for(e=n?Dr(e/vr):e>>1,e+=Dr(e/t);e>455;r+=mr)e=Dr(e/Er);return Dr(r+36*e/(e+_r))},Lr=function(e){let t=[],n=e.length,r=0,i=br,a=yr,o=e.lastIndexOf(xr);o<0&&(o=0);for(let n=0;n<o;++n)e.charCodeAt(n)>=128&&kr(`not-basic`),t.push(e.charCodeAt(n));for(let s=o>0?o+1:0;s<n;){let o=r;for(let t=1,i=mr;;i+=mr){s>=n&&kr(`invalid-input`);let o=Pr(e.charCodeAt(s++));o>=mr&&kr(`invalid-input`),o>Dr((pr-r)/t)&&kr(`overflow`),r+=o*t;let c=i<=a?hr:i>=a+gr?gr:i-a;if(o<c)break;let l=mr-c;t>Dr(pr/l)&&kr(`overflow`),t*=l}let c=t.length+1;a=Ir(r-o,c,o==0),Dr(r/c)>pr-i&&kr(`overflow`),i+=Dr(r/c),r%=c,t.splice(r++,0,i)}return String.fromCodePoint(...t)},Rr=function(e){let t=[];e=Mr(e);let n=e.length,r=br,i=0,a=yr;for(let n of e)n<128&&t.push(Or(n));let o=t.length,s=o;for(o&&t.push(xr);s<n;){let n=pr;for(let t of e)t>=r&&t<n&&(n=t);let c=s+1;n-r>Dr((pr-i)/c)&&kr(`overflow`),i+=(n-r)*c,r=n;for(let n of e)if(n<r&&++i>pr&&kr(`overflow`),n===r){let e=i;for(let n=mr;;n+=mr){let r=n<=a?hr:n>=a+gr?gr:n-a;if(e<r)break;let i=e-r,o=mr-r;t.push(Or(Fr(r+i%o,0))),e=Dr(i/o)}t.push(Or(Fr(e,0))),a=Ir(i,c,s===o),i=0,++s}++i,++r}return t.join(``)},zr={version:`2.3.1`,ucs2:{decode:Mr,encode:Nr},decode:Lr,encode:Rr,toASCII:function(e){return jr(e,function(e){return Cr.test(e)?`xn--`+Rr(e):e})},toUnicode:function(e){return jr(e,function(e){return Sr.test(e)?Lr(e.slice(4).toLowerCase()):e})}},Br=nn({arrayReplaceAt:()=>Gr,asciiTrim:()=>pi,assign:()=>Wr,escapeHtml:()=>ii,escapeRE:()=>oi,fromCodePoint:()=>qr,has:()=>Ur,isMdAsciiPunct:()=>ui,isPromiseLike:()=>mi,isPunctChar:()=>ci,isPunctCharCode:()=>li,isSpace:()=>L,isString:()=>Vr,isValidEntityCode:()=>Kr,isWhiteSpace:()=>si,lib:()=>hi,normalizeReference:()=>di,unescapeAll:()=>$r,unescapeMd:()=>Qr});function Vr(e){return typeof e==`string`}var Hr=Object.prototype.hasOwnProperty;function Ur(e,t){return Hr.call(e,t)}function Wr(e,...t){for(let n of t)if(n){if(typeof n!=`object`)throw TypeError(`source must be object`);Object.assign(e,n)}return e}function Gr(e,t,n){return e.slice(0,t).concat(n,e.slice(t+1))}function Kr(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function qr(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var Jr=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Yr=RegExp(`${Jr.source}|&([a-z#][a-z0-9]{1,31});`,`gi`),Xr=/^#(x[a-f0-9]{1,8}|\d{1,8})$/i;function Zr(e,t){if(t.charCodeAt(0)===35&&Xr.test(t)){let n=t[1].toLowerCase()===`x`?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return Kr(n)?qr(n):e}let n=bn(e);return n===e?e:n}function Qr(e){return e.includes(`\\`)?e.replace(Jr,`$1`):e}function $r(e){return!e.includes(`\\`)&&!e.includes(`&`)?e:e.replace(Yr,(e,t,n)=>t||Zr(e,n))}var ei=/[&<>"]/,ti=/[&<>"]/g,ni={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`};function ri(e){return ni[e]}function ii(e){return ei.test(e)?e.replace(ti,ri):e}var ai=/[.?*+^$[\]\\(){}|-]/g;function oi(e){return e.replace(ai,`\\$&`)}function L(e){switch(e){case 9:case 32:return!0}return!1}function si(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function ci(e){return Gn.test(e)||Kn.test(e)}function li(e){return ci(qr(e))}function ui(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function di(e){return e=e.trim().replace(/\s+/g,` `),e.toLowerCase().toUpperCase()}function fi(e){return e===32||e===9||e===10||e===13}function pi(e){let t=0;for(;t<e.length&&fi(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&fi(e.charCodeAt(n));n--);return e.slice(t,n+1)}function mi(e){return typeof e?.then==`function`}var hi={mdurl:Vn,ucmicro:Jn},gi=class{type;tag;attrs=null;map=null;nesting;level=0;children=null;content=``;markup=``;info=``;meta=null;block=!1;hidden=!1;constructor(e,t,n){this.type=e,this.tag=t,this.nesting=n}attrIndex(e){if(!this.attrs)return-1;let t=this.attrs;for(let n=0,r=t.length;n<r;n++)if(t[n][0]===e)return n;return-1}attrPush(e){this.attrs?this.attrs.push(e):this.attrs=[e]}attrSet(e,t){let n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r}attrGet(e){let t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n}attrJoin(e,t){let n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=`${this.attrs[n][1]} ${t}`}},_i=class{src;md;env;tokens;bMarks=[];eMarks=[];tShift=[];sCount=[];bsCount=[];blkIndent=0;line=0;lineMax=0;tight=!1;ddIndent=-1;listIndent=-1;parentType=`root`;level=0;Token=gi;constructor(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r;let i=this.src,a=i.length;for(let e=0;e<a;){let t=i.indexOf(`
48
+ `,e),n=t===-1?a:t,r=0,o=0,s=e;for(;s<n;){let e=i.charCodeAt(s);if(L(e)){r++,o+=e===9?4-o%4:1,s++;continue}break}this.bMarks.push(e),this.eMarks.push(n),this.tShift.push(r),this.sCount.push(o),this.bsCount.push(0),e=n+1}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}push(e,t,n){let r=new gi(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e}skipSpaces(e){let t=this.src;for(let n=t.length;e<n&&L(t.charCodeAt(e));e++);return e}skipSpacesBack(e,t){if(e<=t)return e;let n=this.src;for(;e>t;)if(!L(n.charCodeAt(--e)))return e+1;return e}skipChars(e,t){let n=this.src;for(let r=n.length;e<r&&n.charCodeAt(e)===t;e++);return e}skipCharsBack(e,t,n){if(e<=n)return e;let r=this.src;for(;e>n;)if(t!==r.charCodeAt(--e))return e+1;return e}getLines(e,t,n,r){if(e>=t)return``;let i=Array(t-e),a=this.src;for(let o=0,s=e;s<t;s++,o++){let e=0,c=this.bMarks[s],l=c,u;for(u=s+1<t||r?this.eMarks[s]+1:this.eMarks[s];l<u&&e<n;){let t=a.charCodeAt(l);if(L(t))t===9?e+=4-(e+this.bsCount[s])%4:e++;else if(l-c<this.tShift[s])e++;else break;l++}e>n?i[o]=` `.repeat(e-n)+this.src.slice(l,u):i[o]=this.src.slice(l,u)}return i.join(``)}},vi=class{src;env;tokens=[];inlineMode=!1;md;constructor(e,t,n){this.src=e,this.env=n,this.md=t}Token=gi},yi=class{src;env;md;tokens;tokens_meta;pos=0;posMax;level=0;pending=``;pendingLevel=0;cache={};delimiters=[];_prev_delimiters=[];backticks={};backticksScanned=!1;linkLevel=0;constructor(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.posMax=this.src.length}pushPending(){let e=new gi(`text`,``,0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending=``,e}push(e,t,n){this.pending&&this.pushPending();let r=new gi(e,t,n),i=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()??[]),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r}scanDelims(e,t){let n=this.src,r=this.posMax,i=n.charCodeAt(e),a;if(e===0)a=32;else if(e===1)a=this.src.charCodeAt(0),(a&63488)==55296&&(a=65533);else if(a=this.src.charCodeAt(e-1),(a&64512)==56320){let t=this.src.charCodeAt(e-2);a=(t&64512)==55296?65536+(t-55296<<10)+(a-56320):65533}else(a&64512)==55296&&(a=65533);let o=e;for(;o<r&&n.charCodeAt(o)===i;)o++;let s=o-e,c=o<r?this.src.charCodeAt(o):32;if((c&64512)==55296){let e=this.src.charCodeAt(o+1);c=(e&64512)==56320?65536+(c-55296<<10)+(e-56320):65533}else(c&64512)==56320&&(c=65533);let l=ui(a)||li(a),u=ui(c)||li(c),d=si(a),f=si(c),p=!f&&(!u||d||l),m=!d&&(!l||f||u);return{can_open:p&&(t||!m||l),can_close:m&&(t||!p||u),length:s}}Token=gi},bi=class{__rules__=[];__cache__=null;__find__(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1}__compile__(){let e=new Set([``]);for(let t of this.__rules__)if(t.enabled)for(let n of t.alt)e.add(n);this.__cache__={};for(let t of e){let e=[];for(let n of this.__rules__)n.enabled&&(!t||n.alt.includes(t))&&e.push(n.fn);this.__cache__[t]=e}}at(e,t,n={}){let r=this.__find__(e),i=n||{};if(r===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__[r].fn=t,this.__rules__[r].alt=i.alt||[],this.__cache__=null}before(e,t,n,r){let i=this.__find__(e),a=r||{};if(i===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:n,alt:a.alt||[]}),this.__cache__=null}after(e,t,n,r){let i=this.__find__(e),a=r||{};if(i===-1)throw Error(`Parser rule not found: ${e}`);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:n,alt:a.alt||[]}),this.__cache__=null}push(e,t,n){let r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null}enable(e,t){Array.isArray(e)||(e=[e]);let n=[];for(let r of e){let e=this.__find__(r);if(e<0){if(t)continue;throw Error(`Rules manager: invalid rule name ${r}`)}this.__rules__[e].enabled=!0,n.push(r)}return this.__cache__=null,n}enableOnly(e,t){Array.isArray(e)||(e=[e]);for(let e of this.__rules__)e.enabled=!1;this.enable(e,t)}disable(e,t){Array.isArray(e)||(e=[e]);let n=[];for(let r of e){let e=this.__find__(r);if(e<0){if(t)continue;throw Error(`Rules manager: invalid rule name ${r}`)}this.__rules__[e].enabled=!1,n.push(r)}return this.__cache__=null,n}getRules(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]}};function xi(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],o=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;let s=[],c=[],l=[],u=[],d=e.md.block.ruler.getRules(`blockquote`),f=e.parentType;e.parentType=`blockquote`;let p=!1,m;for(m=t;m<n;m++){let t=e.sCount[m]<e.blkIndent;if(i=e.bMarks[m]+e.tShift[m],a=e.eMarks[m],i>=a)break;if(e.src.charCodeAt(i++)===62&&!t){let t=e.sCount[m]+1,n,r;e.src.charCodeAt(i)===32?(i++,t++,r=!1,n=!0):e.src.charCodeAt(i)===9?(n=!0,(e.bsCount[m]+t)%4==3?(i++,t++,r=!1):r=!0):n=!1;let o=t;for(s.push(e.bMarks[m]),e.bMarks[m]=i;i<a;){let t=e.src.charCodeAt(i);if(L(t))t===9?o+=4-(o+e.bsCount[m]+ +!!r)%4:o++;else break;i++}p=i>=a,c.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+ +!!n,l.push(e.sCount[m]),e.sCount[m]=o-t,u.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let r=!1;for(let t=0,i=d.length;t<i;t++)if(d[t](e,m,n,!0)){r=!0;break}if(r){e.lineMax=m,e.blkIndent!==0&&(s.push(e.bMarks[m]),c.push(e.bsCount[m]),u.push(e.tShift[m]),l.push(e.sCount[m]),e.sCount[m]-=e.blkIndent);break}s.push(e.bMarks[m]),c.push(e.bsCount[m]),u.push(e.tShift[m]),l.push(e.sCount[m]),e.sCount[m]=-1}let h=e.blkIndent;e.blkIndent=0;let g=e.push(`blockquote_open`,`blockquote`,1);g.markup=`>`;let _=[t,0];g.map=_,e.md.block.tokenize(e,t,m);let v=e.push(`blockquote_close`,`blockquote`,-1);v.markup=`>`,e.lineMax=o,e.parentType=f,_[1]=e.line;for(let n=0;n<u.length;n++)e.bMarks[n+t]=s[n],e.tShift[n+t]=u[n],e.sCount[n+t]=l[n],e.bsCount[n+t]=c[n];return e.blkIndent=h,!0}function Si(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,i=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,i=r;continue}break}e.line=i;let a=e.push(`code_block`,`code`,0);return a.content=`${e.getLines(t,i,4+e.blkIndent,!1)}\n`,a.map=[t,e.line],!0}function Ci(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>a)return!1;let o=e.src.charCodeAt(i);if(o!==126&&o!==96)return!1;let s=i;i=e.skipChars(i,o);let c=i-s;if(c<3)return!1;let l=e.src.slice(s,i),u=e.src.slice(i,a);if(o===96&&u.includes(String.fromCharCode(o)))return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(i=s=e.bMarks[d]+e.tShift[d],a=e.eMarks[d],i<a&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(i)===o&&!(e.sCount[d]-e.blkIndent>=4)&&(i=e.skipChars(i,o),!(i-s<c)&&(i=e.skipSpaces(i),!(i<a)))){f=!0;break}c=e.sCount[t],e.line=d+ +!!f;let p=e.push(`fence`,`code`,0);return p.info=u,p.content=e.getLines(t+1,d,c,!0),p.markup=l,p.map=[t,e.line],!0}function wi(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.src.charCodeAt(i);if(o!==35||i>=a)return!1;let s=1;for(o=e.src.charCodeAt(++i);o===35&&i<a&&s<=6;)s++,o=e.src.charCodeAt(++i);if(s>6||i<a&&!L(o))return!1;if(r)return!0;a=e.skipSpacesBack(a,i);let c=e.skipCharsBack(a,35,i);c>i&&L(e.src.charCodeAt(c-1))&&(a=c),e.line=t+1;let l=e.push(`heading_open`,`h${String(s)}`,1);l.markup=`########`.slice(0,s),l.map=[t,e.line];let u=e.push(`inline`,``,0);u.content=pi(e.src.slice(i,a)),u.map=[t,e.line],u.children=[];let d=e.push(`heading_close`,`h${String(s)}`,-1);return d.markup=`########`.slice(0,s),!0}function Ti(e,t,n,r){let i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.bMarks[t]+e.tShift[t],o=e.src.charCodeAt(a++);if(o!==42&&o!==45&&o!==95)return!1;let s=1;for(;a<i;){let t=e.src.charCodeAt(a++);if(t!==o&&!L(t))return!1;t===o&&s++}if(s<3)return!1;if(r)return!0;e.line=t+1;let c=e.push(`hr`,`hr`,0);return c.map=[t,e.line],c.markup=String.fromCharCode(o).repeat(s),!0}var Ei=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Di=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,Oi=`<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>`,ki=RegExp(`^(?:${Di}|${Oi}|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<\\?[\\s\\S]*?\\?>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`),Ai=RegExp(`^(?:${Di}|${Oi})`),ji=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[RegExp(`^</?(${Ei.join(`|`)})(?=(\\s|/?>|$))`,`i`),/^$/,!0],[RegExp(`${Ai.source}\\s*$`),/^$/,!1]];function Mi(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let o=e.src.slice(i,a),s=0;for(;s<ji.length&&!ji[s][0].test(o);s++);if(s===ji.length)return!1;if(r)return ji[s][2];let c=t+1,l=ji[s][1].test(``);if(!ji[s][1].test(o)){for(;c<n&&!(e.sCount[c]<e.blkIndent&&(l||!e.isEmpty(c)));c++)if(i=e.bMarks[c]+e.tShift[c],a=e.eMarks[c],o=e.src.slice(i,a),ji[s][1].test(o)){o.length!==0&&c++;break}}e.line=c;let u=e.push(`html_block`,``,0);return u.map=[t,c],u.content=e.getLines(t,c,e.blkIndent,!0),!0}function Ni(e,t,n){let r=e.md.block.ruler.getRules(`paragraph`);if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.parentType;e.parentType=`paragraph`;let a=0,o,s=t+1;for(;s<n&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let t=e.bMarks[s]+e.tShift[s],n=e.eMarks[s];if(t<n&&(o=e.src.charCodeAt(t),(o===45||o===61)&&(t=e.skipChars(t,o),t=e.skipSpaces(t),t>=n))){a=o===61?1:2;break}}if(e.sCount[s]<0)continue;let t=!1;for(let i=0,a=r.length;i<a;i++)if(r[i](e,s,n,!0)){t=!0;break}if(t)break}if(!a||o===void 0)return e.parentType=i,!1;let c=pi(e.getLines(t,s,e.blkIndent,!1));e.line=s+1;let l=e.push(`heading_open`,`h${String(a)}`,1);l.markup=String.fromCharCode(o),l.map=[t,e.line];let u=e.push(`inline`,``,0);u.content=c,u.map=[t,e.line-1],u.children=[];let d=e.push(`heading_close`,`h${String(a)}`,-1);return d.markup=String.fromCharCode(o),e.parentType=i,!0}function Pi(e,t){let n=e.eMarks[t],r=e.bMarks[t]+e.tShift[t],i=e.src.charCodeAt(r++);return i!==42&&i!==45&&i!==43||r<n&&!L(e.src.charCodeAt(r))?-1:r}function Fi(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],i=n;if(i+1>=r)return-1;let a=e.src.charCodeAt(i++);if(a<48||a>57)return-1;for(;;){if(i>=r)return-1;if(a=e.src.charCodeAt(i++),a>=48&&a<=57){if(i-n>=10)return-1;continue}if(a===41||a===46)break;return-1}return i<r&&(a=e.src.charCodeAt(i),!L(a))?-1:i}function Ii(e,t){let n=e.level+2;for(let r=t+2,i=e.tokens.length-2;r<i;r++)e.tokens[r].level===n&&e.tokens[r].type===`paragraph_open`&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function Li(e,t,n,r){let i,a,o,s,c=t,l=!0;if(e.sCount[c]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[c]-e.listIndent>=4&&e.sCount[c]<e.blkIndent)return!1;let u=!1;r&&e.parentType===`paragraph`&&e.sCount[c]>=e.blkIndent&&(u=!0);let d,f,p=Fi(e,c);if(p>=0){if(d=!0,o=e.bMarks[c]+e.tShift[c],f=Number(e.src.slice(o,p-1)),u&&f!==1)return!1}else if(p=Pi(e,c),p>=0)d=!1;else return!1;if(u&&e.skipSpaces(p)>=e.eMarks[c])return!1;if(r)return!0;let m=e.src.charCodeAt(p-1),h=e.tokens.length;d?(s=e.push(`ordered_list_open`,`ol`,1),f!==1&&(s.attrs=[[`start`,f.toString()]])):s=e.push(`bullet_list_open`,`ul`,1);let g=[c,0];s.map=g,s.markup=String.fromCharCode(m);let _=!1,v=e.md.block.ruler.getRules(`list`),y=e.parentType;for(e.parentType=`list`;c<n;){a=p,i=e.eMarks[c];let t=e.sCount[c]+p-(e.bMarks[c]+e.tShift[c]),r=t;for(;a<i;){let t=e.src.charCodeAt(a);if(t===9)r+=4-(r+e.bsCount[c])%4;else if(t===32)r++;else break;a++}let u=a,f;f=u>=i?1:r-t,f>4&&(f=1);let h=t+f;s=e.push(`list_item_open`,`li`,1),s.markup=String.fromCharCode(m);let g=[c,0];s.map=g,d&&(s.info=e.src.slice(o,p-1));let y=e.tight,b=e.tShift[c],x=e.sCount[c],S=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=h,e.tight=!0,e.tShift[c]=u-e.bMarks[c],e.sCount[c]=r,u>=i&&e.isEmpty(c+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,c,n,!0),(!e.tight||_)&&(l=!1),_=e.line-c>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=S,e.tShift[c]=b,e.sCount[c]=x,e.tight=y,s=e.push(`list_item_close`,`li`,-1),s.markup=String.fromCharCode(m),c=e.line,g[1]=c,c>=n||e.sCount[c]<e.blkIndent||e.sCount[c]-e.blkIndent>=4)break;let C=!1;for(let t=0,r=v.length;t<r;t++)if(v[t](e,c,n,!0)){C=!0;break}if(C)break;if(d){if(p=Fi(e,c),p<0)break;o=e.bMarks[c]+e.tShift[c]}else if(p=Pi(e,c),p<0)break;if(m!==e.src.charCodeAt(p-1))break}return s=d?e.push(`ordered_list_close`,`ol`,-1):e.push(`bullet_list_close`,`ul`,-1),s.markup=String.fromCharCode(m),g[1]=c,e.line=c,e.parentType=y,l&&Ii(e,h),!0}function Ri(e,t,n){let r=e.md.block.ruler.getRules(`paragraph`),i=e.parentType,a=t+1;for(e.parentType=`paragraph`;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)continue;let t=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,a,n,!0)){t=!0;break}if(t)break}let o=pi(e.getLines(t,a,e.blkIndent,!1));e.line=a;let s=e.push(`paragraph_open`,`p`,1);s.map=[t,e.line];let c=e.push(`inline`,``,0);return c.content=o,c.map=[t,e.line],c.children=[],e.push(`paragraph_close`,`p`,-1),e.parentType=i,!0}function zi(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],o=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==91)return!1;function s(t){let n=e.lineMax;if(t>=n||e.isEmpty(t))return null;let r=!1;if(e.sCount[t]-e.blkIndent>3&&(r=!0),e.sCount[t]<0&&(r=!0),!r){let r=e.md.block.ruler.getRules(`reference`),i=e.parentType;e.parentType=`reference`;let a=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,t,n,!0)){a=!0;break}if(e.parentType=i,a)return null}let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];return e.src.slice(i,a+1)}let c=e.src.slice(i,a+1);a=c.length;let l=-1;for(i=1;i<a;i++){let e=c.charCodeAt(i);if(e===91)return!1;if(e===93){l=i;break}if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(e===92&&(i++,i<a&&c.charCodeAt(i)===10)){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}}if(l<0||c.charCodeAt(l+1)!==58)return!1;for(i=l+2;i<a;i++){let e=c.charCodeAt(i);if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(!L(e))break}let u=e.md.helpers.parseLinkDestination(c,i,a);if(!u.ok)return!1;let d=e.md.normalizeLink(u.str);if(!e.md.validateLink(d))return!1;i=u.pos;let f=i,p=o,m=i;for(;i<a;i++){let e=c.charCodeAt(i);if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(!L(e))break}let h=e.md.helpers.parseLinkTitle(c,i,a);for(;h.can_continue;){let t=s(o);if(t===null)break;c+=t,i=a,a=c.length,o++,h=e.md.helpers.parseLinkTitle(c,i,a,h)}let g;for(i<a&&m!==i&&h.ok?(g=h.str,i=h.pos):(g=``,i=f,o=p);i<a&&L(c.charCodeAt(i));)i++;if(i<a&&c.charCodeAt(i)!==10&&g)for(g=``,i=f,o=p;i<a&&L(c.charCodeAt(i));)i++;if(i<a&&c.charCodeAt(i)!==10)return!1;let _=di(c.slice(1,l));if(!_)return!1;if(r)return!0;e.env.references===void 0&&(e.env.references={}),e.env.references[_]===void 0&&(e.env.references[_]={title:g,href:d}),e.line=o;let v=e.push(`reference`,``,0);return v.map=[t,e.line],v.info=_,v.meta={title:g,href:d},!0}var Bi=65536;function Vi(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function Hi(e){let t=[],n=e.length,r=0,i=e.charCodeAt(r),a=!1,o=0,s=``;for(;r<n;)i===124&&(a?(s+=e.substring(o,r-1),o=r):(t.push(s+e.substring(o,r)),s=``,o=r+1)),a=i===92,r++,i=e.charCodeAt(r);return t.push(s+e.substring(o)),t}function Ui(e,t,n,r){if(t+2>n)return!1;let i=t+1;if(e.sCount[i]<e.blkIndent||e.sCount[i]-e.blkIndent>=4)return!1;let a=e.bMarks[i]+e.tShift[i];if(a>=e.eMarks[i])return!1;let o=e.src.charCodeAt(a++);if(o!==124&&o!==45&&o!==58||a>=e.eMarks[i])return!1;let s=e.src.charCodeAt(a++);if(s!==124&&s!==45&&s!==58&&!L(s)||o===45&&L(s))return!1;for(;a<e.eMarks[i];){let t=e.src.charCodeAt(a);if(t!==124&&t!==45&&t!==58&&!L(t))return!1;a++}let c=Vi(e,t+1),l=c.split(`|`),u=[];for(let e=0;e<l.length;e++){let t=l[e].trim();if(!t){if(e===0||e===l.length-1)continue;return!1}if(!/^:?-+:?$/.test(t))return!1;t.charCodeAt(t.length-1)===58?u.push(t.charCodeAt(0)===58?`center`:`right`):t.charCodeAt(0)===58?u.push(`left`):u.push(``)}if(c=Vi(e,t).trim(),!c.includes(`|`)||e.sCount[t]-e.blkIndent>=4)return!1;l=Hi(c),l.length&&l[0]===``&&l.shift(),l.length&&l[l.length-1]===``&&l.pop();let d=l.length;if(d===0||d!==u.length)return!1;if(r)return!0;let f=e.parentType;e.parentType=`table`;let p=e.md.block.ruler.getRules(`blockquote`),m=e.push(`table_open`,`table`,1),h=[t,0];m.map=h;let g=e.push(`thead_open`,`thead`,1);g.map=[t,t+1];let _=e.push(`tr_open`,`tr`,1);_.map=[t,t+1];for(let t=0;t<l.length;t++){let n=e.push(`th_open`,`th`,1);u[t]&&(n.attrs=[[`style`,`text-align:${u[t]}`]]);let r=e.push(`inline`,``,0);r.content=l[t].trim(),r.children=[],e.push(`th_close`,`th`,-1)}e.push(`tr_close`,`tr`,-1),e.push(`thead_close`,`thead`,-1);let v,y=0;for(i=t+2;i<n&&!(e.sCount[i]<e.blkIndent);i++){let r=!1;for(let t=0,a=p.length;t<a;t++)if(p[t](e,i,n,!0)){r=!0;break}if(r||(c=Vi(e,i).trim(),!c)||e.sCount[i]-e.blkIndent>=4||(l=Hi(c),l.length&&l[0]===``&&l.shift(),l.length&&l[l.length-1]===``&&l.pop(),y+=d-l.length,y>Bi))break;if(i===t+2){let n=e.push(`tbody_open`,`tbody`,1);n.map=v=[t+2,0]}let a=e.push(`tr_open`,`tr`,1);a.map=[i,i+1];for(let t=0;t<d;t++){let n=e.push(`td_open`,`td`,1);u[t]&&(n.attrs=[[`style`,`text-align:${u[t]}`]]);let r=e.push(`inline`,``,0);r.content=l[t]?l[t].trim():``,r.children=[],e.push(`td_close`,`td`,-1)}e.push(`tr_close`,`tr`,-1)}return v&&(e.push(`tbody_close`,`tbody`,-1),v[1]=i),e.push(`table_close`,`table`,-1),h[1]=i,e.parentType=f,e.line=i,!0}var Wi=[[`table`,Ui,[`paragraph`,`reference`]],[`code`,Si],[`fence`,Ci,[`paragraph`,`reference`,`blockquote`,`list`]],[`blockquote`,xi,[`paragraph`,`reference`,`blockquote`,`list`]],[`hr`,Ti,[`paragraph`,`reference`,`blockquote`,`list`]],[`list`,Li,[`paragraph`,`reference`,`blockquote`]],[`reference`,zi],[`html_block`,Mi,[`paragraph`,`reference`,`blockquote`]],[`heading`,wi,[`paragraph`,`reference`,`blockquote`]],[`lheading`,Ni],[`paragraph`,Ri]],Gi=class{ruler;constructor(){this.ruler=new bi;for(let e=0;e<Wi.length;e++)this.ruler.push(Wi[e][0],Wi[e][1],{alt:(Wi[e][2]||[]).slice()})}tokenize(e,t,n,r){let i=this.ruler.getRules(``),a=i.length,o=e.md.options.maxNesting,s=t,c=!1;for(;s<n&&(e.line=s=e.skipEmptyLines(s),!(s>=n||e.sCount[s]<e.blkIndent));){if(e.level>=o){e.line=n;break}let t=e.line,r=!1;for(let o=0;o<a;o++)if(r=i[o](e,s,n,!1),r){if(t>=e.line)throw Error(`block rule didn't increment state.line`);break}if(!r)throw Error(`none of the block rules matched`);e.tight=!c,e.isEmpty(e.line-1)&&(c=!0),s=e.line,s<n&&e.isEmpty(s)&&(c=!0,s++,e.line=s)}}parse(e,t,n,r){if(!e)return;let i=new this.State(e,t,n,r);this.tokenize(i,i.line,i.lineMax)}State=_i};function Ki(e){let t;e.inlineMode?(t=new e.Token(`inline`,``,0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function qi(e){let t=e.tokens;for(let n=0,r=t.length;n<r;n++){let r=t[n];r.type===`inline`&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}function Ji(e){return/^<a[>\s]/i.test(e)}function Yi(e){return/^<\/a\s*>/i.test(e)}function Xi(e){if(!e.md.options.linkify)return;let t=e.tokens,n=e.md.linkify;for(let r=0,i=t.length;r<i;r++){if(t[r].type!==`inline`||!n.pretest(t[r].content))continue;let i=t[r].children,a=0;for(let t=i.length-1;t>=0;t--){let r=i[t];if(r.type===`link_close`){for(t--;i[t].level!==r.level&&i[t].type!==`link_open`;)t--;continue}if(r.type===`html_inline`&&(Ji(r.content)&&a>0&&a--,Yi(r.content)&&a++),!(a>0)&&r.type===`text`){let a=r.content;if(!n.pretest(a))continue;let o=n.match(a);if(!o?.length)continue;let s=[],c=r.level,l=0,u=+(o[0].index===0&&t>0&&i[t-1].type===`text_special`);for(let t=u;t<o.length;t++){let n=o[t],r=e.md.normalizeLink(n.url);if(!e.md.validateLink(r))continue;let i=n.text;i=n.schema?n.schema===`mailto:`&&!/^mailto:/i.test(i)?e.md.normalizeLinkText(`mailto:${i}`).replace(/^mailto:/,``):e.md.normalizeLinkText(i):e.md.normalizeLinkText(`http://${i}`).replace(/^http:\/\//,``);let u=n.index;if(u>l){let t=new e.Token(`text`,``,0);t.content=a.slice(l,u),t.level=c,s.push(t)}let d=new e.Token(`link_open`,`a`,1);d.attrs=[[`href`,r]],d.level=c++,d.markup=`linkify`,d.info=`auto`,s.push(d);let f=new e.Token(`text`,``,0);f.content=i,f.level=c,s.push(f);let p=new e.Token(`link_close`,`a`,-1);p.level=--c,p.markup=`linkify`,p.info=`auto`,s.push(p),l=n.lastIndex}if(l<a.length){let t=new e.Token(`text`,``,0);t.content=a.slice(l),t.level=c,s.push(t)}i.splice(t,1,...s)}}}}var Zi=/\r\n?|\n/g,Qi=/\0/g;function $i(e){let t=e.src,n=t.includes(`\r`),r=t.includes(`\0`);(n||r)&&(n&&(t=t.replace(Zi,`
49
+ `)),r&&(t=t.replace(Qi,`�`)),e.src=t)}var ea=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,ta=/\((?:c|tm|r)\)/i,na=/\((c|tm|r)\)/gi,ra={c:`©`,r:`®`,tm:`™`};function ia(e,t){return ra[t.toLowerCase()]}function aa(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type===`text`&&!t&&(r.content=r.content.replace(na,ia)),r.type===`link_open`&&r.info===`auto`&&t--,r.type===`link_close`&&r.info===`auto`&&t++}}function oa(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type===`text`&&!t&&ea.test(r.content)&&(r.content=r.content.replace(/\+-/g,`±`).replace(/\.{2,}/g,`…`).replace(/([?!])…/g,`$1..`).replace(/([?!]){4,}/g,`$1$1$1`).replace(/,{2,}/g,`,`).replace(/(^|[^-])---(?=[^-]|$)/gm,`$1—`).replace(/(^|\s)--(?=\s|$)/gm,`$1–`).replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,`$1–`)),r.type===`link_open`&&r.info===`auto`&&t--,r.type===`link_close`&&r.info===`auto`&&t++}}function sa(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type===`inline`&&(ta.test(e.tokens[t].content)&&aa(e.tokens[t].children),ea.test(e.tokens[t].content)&&oa(e.tokens[t].children))}var ca=/['"]/,la=/['"]/g,ua=`’`;function da(e,t,n,r){e[t]||(e[t]=[]),e[t].push({pos:n,ch:r})}function fa(e,t){let n=``,r=0;t.sort((e,t)=>e.pos-t.pos);for(let i=0;i<t.length;i++){let a=t[i];n+=e.slice(r,a.pos)+a.ch,r=a.pos+1}return n+e.slice(r)}function pa(e,t){let n,r=[],i={};for(let a=0;a<e.length;a++){let o=e[a],s=e[a].level;for(n=r.length-1;n>=0&&!(r[n].level<=s);n--);if(r.length=n+1,o.type!==`text`)continue;let c=o.content,l=0,u=c.length;OUTER:for(;l<u;){la.lastIndex=l;let o=la.exec(c);if(!o)break;let d=!0,f=!0;l=o.index+1;let p=o[0]===`'`,m=32;if(o.index-1>=0)m=c.charCodeAt(o.index-1);else for(n=a-1;n>=0&&e[n].type!==`softbreak`&&e[n].type!==`hardbreak`;n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let h=32;if(l<u)h=c.charCodeAt(l);else for(n=a+1;n<e.length&&e[n].type!==`softbreak`&&e[n].type!==`hardbreak`;n++)if(e[n].content){h=e[n].content.charCodeAt(0);break}let g=ui(m)||li(m),_=ui(h)||li(h),v=si(m),y=si(h);if(y?d=!1:_&&(v||g||(d=!1)),v?f=!1:g&&(y||_||(f=!1)),h===34&&o[0]===`"`&&m>=48&&m<=57&&(f=d=!1),d&&f&&(d=g,f=_),!d&&!f){p&&da(i,a,o.index,ua);continue}if(f)for(n=r.length-1;n>=0;n--){let e=r[n];if(r[n].level<s)break;if(e.single===p&&r[n].level===s){e=r[n];let s,c;p?(s=t.md.options.quotes[2],c=t.md.options.quotes[3]):(s=t.md.options.quotes[0],c=t.md.options.quotes[1]),da(i,a,o.index,c),da(i,e.token,e.pos,s),r.length=n;continue OUTER}}d?r.push({token:a,pos:o.index,single:p,level:s}):f&&p&&da(i,a,o.index,ua)}}Object.keys(i).forEach(t=>{e[t].content=fa(e[t].content,i[t])})}function ma(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type===`inline`&&ca.test(e.tokens[t].content)&&pa(e.tokens[t].children,e)}function ha(e){let t,n,r=e.tokens,i=r.length;for(let e=0;e<i;e++){if(r[e].type!==`inline`)continue;let i=r[e].children,a=i.length;for(t=0;t<a;t++)i[t].type===`text_special`&&(i[t].type=`text`);for(t=n=0;t<a;t++)i[t].type===`text`&&t+1<a&&i[t+1].type===`text`?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}}var ga=[[`normalize`,$i],[`block`,Ki],[`inline`,qi],[`linkify`,Xi],[`replacements`,sa],[`smartquotes`,ma],[`text_join`,ha]],_a=class{ruler;constructor(){this.ruler=new bi;for(let e=0;e<ga.length;e++)this.ruler.push(ga[e][0],ga[e][1])}process(e){let t=this.ruler.getRules(``);for(let n=0,r=t.length;n<r;n++)t[n](e)}State=vi};function va(e,t,n){let r,i=t,a={ok:!1,pos:0,str:``};if(e.charCodeAt(i)===60){for(i++;i<n;){if(r=e.charCodeAt(i),r===10||r===60)return a;if(r===62)return a.pos=i+1,a.str=$r(e.slice(t+1,i)),a.ok=!0,a;if(r===92&&i+1<n){i+=2;continue}i++}return a}let o=0;for(;i<n&&(r=e.charCodeAt(i),!(r===32||r<32||r===127));){if(r===92&&i+1<n){if(e.charCodeAt(i+1)===32)break;i+=2;continue}if(r===40&&(o++,o>32))return a;if(r===41){if(o===0)break;o--}i++}return t===i||o!==0?a:(a.str=$r(e.slice(t,i)),a.pos=i,a.ok=!0,a)}function ya(e,t,n=!1){let r,i=!1,a,o,s=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos<s;){if(a=e.src.charCodeAt(e.pos),a===93&&(r--,r===0)){i=!0;break}if(o=e.pos,e.md.inline.skipToken(e),a===91){if(o===e.pos-1)r++;else if(n)return e.pos=c,-1}}let l=-1;return i&&(l=e.pos),e.pos=c,l}function ba(e,t,n,r){let i,a=t,o={ok:!1,can_continue:!1,pos:0,str:``,marker:0};if(r)o.str=r.str,o.marker=r.marker;else{if(a>=n)return o;let r=e.charCodeAt(a);if(r!==34&&r!==39&&r!==40)return o;t++,a++,r===40&&(r=41),o.marker=r}for(;a<n;){if(i=e.charCodeAt(a),i===o.marker)return o.pos=a+1,o.str+=$r(e.slice(t,a)),o.ok=!0,o;if(i===40&&o.marker===41)return o;i===92&&a+1<n&&a++,a++}return o.can_continue=!0,o.str+=$r(e.slice(t,a)),o}var xa={parseLinkDestination:va,parseLinkLabel:ya,parseLinkTitle:ba},Sa=/^([\w.!#$%&'*+/=?^`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*)$/i,Ca=/^([a-z][a-z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/i;function wa(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;let t=e.src.charCodeAt(n);if(t===60)return!1;if(t===62)break}let a=e.src.slice(r+1,n);if(Ca.test(a)){let n=e.md.normalizeLink(a);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,n]],t.markup=`autolink`,t.info=`auto`;let r=e.push(`text`,``,0);r.content=e.md.normalizeLinkText(a);let i=e.push(`link_close`,`a`,-1);i.markup=`autolink`,i.info=`auto`}return e.pos+=a.length+2,!0}if(Sa.test(a)){let n=e.md.normalizeLink(`mailto:${a}`);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,n]],t.markup=`autolink`,t.info=`auto`;let r=e.push(`text`,``,0);r.content=e.md.normalizeLinkText(a);let i=e.push(`link_close`,`a`,-1);i.markup=`autolink`,i.info=`auto`}return e.pos+=a.length+2,!0}return!1}function Ta(e,t){let n=e.pos,r=e.src;if(r.charCodeAt(n)!==96)return!1;let i=n;n++;let a=e.posMax;for(;n<a&&r.charCodeAt(n)===96;)n++;let o=r.slice(i,n),s=o.length;if(e.backticksScanned&&(e.backticks[s]||0)<=i)return t||(e.pending+=o),e.pos+=s,!0;let c=n,l;for(;l=r.indexOf("`",c),l!==-1;){for(c=l+1;c<a&&r.charCodeAt(c)===96;)c++;let i=c-l;if(i===s){if(!t){let t=e.push(`code_inline`,`code`,0);t.markup=o,t.content=r.slice(n,l).replace(/\n/g,` `).replace(/^ (.+) $/,`$1`)}return e.pos=c,!0}e.backticks[i]=l}return e.backticksScanned=!0,t||(e.pending+=o),e.pos+=s,!0}function Ea(e){let t={},n=e.length;if(!n)return;let r=0,i=-2,a=[];for(let o=0;o<n;o++){let n=e[o];if(a.push(0),(e[r].marker!==n.marker||i!==n.token-1)&&(r=o),i=n.token,n.length=n.length||0,!n.close)continue;t.hasOwnProperty(n.marker)||(t[n.marker]=[-1,-1,-1,-1,-1,-1]);let s=t[n.marker][(n.open?3:0)+n.length%3],c=r-a[r]-1,l=c;for(;c>s;c-=a[c]+1){let t=e[c];if(t.marker===n.marker&&t.open&&t.end<0){let r=!1;if((t.close||n.open)&&(t.length+n.length)%3==0&&(t.length%3!=0||n.length%3!=0)&&(r=!0),!r){let r=c>0&&!e[c-1].open?a[c-1]+1:0;a[o]=o-c+r,a[c]=r,n.open=!1,t.end=o,t.close=!1,l=-1,i=-2;break}}}l!==-1&&(t[n.marker][(n.open?3:0)+(n.length||0)%3]=l)}}function Da(e){let t=e.tokens_meta,n=e.tokens_meta.length;Ea(e.delimiters);for(let e=0;e<n;e++){let n=t[e]?.delimiters;n&&Ea(n)}}function Oa(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||r!==95&&r!==42)return!1;let i=e.scanDelims(e.pos,r===42);for(let t=0;t<i.length;t++){let t=e.push(`text`,``,0);t.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return e.pos+=i.length,!0}function ka(e,t){let n=t.length;for(let r=n-1;r>=0;r--){let n=t[r];if(n.marker!==95&&n.marker!==42||n.end===-1)continue;let i=t[n.end],a=r>0&&t[r-1].end===n.end+1&&t[r-1].marker===n.marker&&t[r-1].token===n.token-1&&t[n.end+1].token===i.token+1,o=String.fromCharCode(n.marker),s=e.tokens[n.token];s.type=a?`strong_open`:`em_open`,s.tag=a?`strong`:`em`,s.nesting=1,s.markup=a?o+o:o,s.content=``;let c=e.tokens[i.token];c.type=a?`strong_close`:`em_close`,c.tag=a?`strong`:`em`,c.nesting=-1,c.markup=a?o+o:o,c.content=``,a&&(e.tokens[t[r-1].token].content=``,e.tokens[t[n.end+1].token].content=``,r--)}}function Aa(e){let t=e.tokens_meta,n=e.tokens_meta.length;ka(e,e.delimiters);for(let r=0;r<n;r++){let n=t[r]?.delimiters;n&&ka(e,n)}}var ja={tokenize:Oa,postProcess:Aa},Ma=/^&#(x[a-f0-9]{1,6}|\d{1,7});/i,Na=/^&([a-z][a-z0-9]{1,31});/i;function Pa(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let r=e.src.slice(n).match(Ma);if(r){if(!t){let t=r[1][0].toLowerCase()===`x`?Number.parseInt(r[1].slice(1),16):Number.parseInt(r[1],10),n=e.push(`text_special`,``,0);n.content=Kr(t)?qr(t):qr(65533),n.markup=r[0],n.info=`entity`}return e.pos+=r[0].length,!0}}else{let r=e.src.slice(n).match(Na);if(r){let n=xn(r[0]);if(n!==r[0]){if(!t){let t=e.push(`text_special`,``,0);t.content=n,t.markup=r[0],t.info=`entity`}return e.pos+=r[0].length,!0}}}return!1}var Fa=[];for(let e=0;e<256;e++)Fa.push(0);for(let e of`\\!"#$%&'()*+,./:;<=>?@[]^_\`{|}~-`.split(``))Fa[e.charCodeAt(0)]=1;function Ia(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push(`hardbreak`,`br`,0),n++;n<r&&(i=e.src.charCodeAt(n),L(i));)n++;return e.pos=n,!0}let a=e.src[n];if(i>=55296&&i<=56319&&n+1<r){let t=e.src.charCodeAt(n+1);t>=56320&&t<=57343&&(a+=e.src[n+1],n++)}let o=`\\${a}`;if(!t){let t=e.push(`text_special`,``,0);t.content=i<256&&Fa[i]!==0?a:o,t.markup=o,t.info=`escape`}return e.pos=n+1,!0}function La(e){let t,n,r=0,i=e.tokens,a=e.tokens.length;for(t=n=0;t<a;t++)i[t].nesting<0&&r--,i[t].level=r,i[t].nesting>0&&r++,i[t].type===`text`&&t+1<a&&i[t+1].type===`text`?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}function Ra(e){return/^<a[>\s]/i.test(e)}function za(e){return/^<\/a\s*>/i.test(e)}function Ba(e){let t=e|32;return t>=97&&t<=122}function Va(e,t){if(!e.md.options.html)return!1;let n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!Ba(i))return!1;let a=e.src.slice(r).match(ki);if(!a)return!1;if(!t){let t=e.push(`html_inline`,``,0);t.content=a[0],Ra(t.content)&&e.linkLevel++,za(t.content)&&e.linkLevel--}return e.pos+=a[0].length,!0}function Ha(e,t){let n,r,i,a,o,s,c,l,u=``,d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;let p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(a=m+1,a<f&&e.src.charCodeAt(a)===40){for(a++;a<f&&(n=e.src.charCodeAt(a),L(n)||n===10);a++);if(a>=f)return!1;for(l=a,s=e.md.helpers.parseLinkDestination(e.src,a,e.posMax),s.ok&&(u=e.md.normalizeLink(s.str),e.md.validateLink(u)?a=s.pos:u=``),l=a;a<f&&(n=e.src.charCodeAt(a),L(n)||n===10);a++);if(s=e.md.helpers.parseLinkTitle(e.src,a,e.posMax),a<f&&l!==a&&s.ok)for(c=s.str,a=s.pos;a<f&&(n=e.src.charCodeAt(a),L(n)||n===10);a++);else c=``;if(a>=f||e.src.charCodeAt(a)!==41)return e.pos=d,!1;a++}else{if(e.env.references===void 0)return!1;if(a<f&&e.src.charCodeAt(a)===91?(l=a+1,a=e.md.helpers.parseLinkLabel(e,a),a>=0?i=e.src.slice(l,a++):a=m+1):a=m+1,i||=e.src.slice(p,m),o=e.env.references[di(i)],!o)return e.pos=d,!1;u=o.href,c=o.title}if(!t){r=e.src.slice(p,m);let t=[];e.md.inline.parse(r,e.md,e.env,t);let n=e.push(`image`,`img`,0),i=[[`src`,u],[`alt`,``]];n.attrs=i,n.children=t,n.content=r,c&&i.push([`title`,c])}return e.pos=a,e.posMax=f,!0}function Ua(e,t){let n,r,i,a,o=``,s=``,c=e.pos,l=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;let u=e.pos,d=e.posMax,f=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let m=p+1;if(m<d&&e.src.charCodeAt(m)===40){for(l=!1,m++;m<d&&(n=e.src.charCodeAt(m),L(n)||n===10);m++);if(m>=d)return!1;if(c=m,i=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),i.ok){for(o=e.md.normalizeLink(i.str),e.md.validateLink(o)?m=i.pos:o=``,c=m;m<d&&(n=e.src.charCodeAt(m),L(n)||n===10);m++);if(i=e.md.helpers.parseLinkTitle(e.src,m,e.posMax),m<d&&c!==m&&i.ok)for(s=i.str,m=i.pos;m<d&&(n=e.src.charCodeAt(m),L(n)||n===10);m++);}(m>=d||e.src.charCodeAt(m)!==41)&&(l=!0),m++}if(l){if(e.env.references===void 0)return!1;if(m<d&&e.src.charCodeAt(m)===91?(c=m+1,m=e.md.helpers.parseLinkLabel(e,m),m>=0?r=e.src.slice(c,m++):m=p+1):m=p+1,r||=e.src.slice(f,p),a=e.env.references[di(r)],!a)return e.pos=u,!1;o=a.href,s=a.title}if(!t){e.pos=f,e.posMax=p;let t=e.push(`link_open`,`a`,1),n=[[`href`,o]];t.attrs=n,s&&n.push([`title`,s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push(`link_close`,`a`,-1)}return e.pos=m,e.posMax=d,!0}var Wa=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function Ga(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;let n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;let i=e.pending.match(Wa);if(!i)return!1;let a=i[1],o=e.md.linkify.matchAtStart(e.src.slice(n-a.length));if(!o)return!1;let s=o.url;if(s.length<=a.length)return!1;let c=s.length;for(;c>0&&s.charCodeAt(c-1)===42;)c--;c!==s.length&&(s=s.slice(0,c));let l=e.md.normalizeLink(s);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-a.length);let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,l]],t.markup=`linkify`,t.info=`auto`;let n=e.push(`text`,``,0);n.content=e.md.normalizeLinkText(s);let r=e.push(`link_close`,`a`,-1);r.markup=`linkify`,r.info=`auto`}return e.pos+=s.length-a.length,!0}function Ka(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,i=e.posMax;if(!t){if(r>=0&&e.pending.charCodeAt(r)===32){if(r>=1&&e.pending.charCodeAt(r-1)===32){let t=r-1;for(;t>=1&&e.pending.charCodeAt(t-1)===32;)t--;e.pending=e.pending.slice(0,t),e.push(`hardbreak`,`br`,0)}else e.pending=e.pending.slice(0,-1),e.push(`softbreak`,`br`,0)}else e.push(`softbreak`,`br`,0)}for(n++;n<i&&L(e.src.charCodeAt(n));)n++;return e.pos=n,!0}function qa(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||r!==126)return!1;let i=e.scanDelims(e.pos,!0),a=i.length,o=String.fromCharCode(r);if(a<2)return!1;let s;a%2&&(s=e.push(`text`,``,0),s.content=o,a--);for(let t=0;t<a;t+=2)s=e.push(`text`,``,0),s.content=o+o,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}function Ja(e,t){let n,r=[],i=t.length;for(let a=0;a<i;a++){let i=t[a];if(i.marker!==126||i.end===-1)continue;let o=t[i.end];n=e.tokens[i.token],n.type=`s_open`,n.tag=`s`,n.nesting=1,n.markup=`~~`,n.content=``,n=e.tokens[o.token],n.type=`s_close`,n.tag=`s`,n.nesting=-1,n.markup=`~~`,n.content=``,e.tokens[o.token-1].type===`text`&&e.tokens[o.token-1].content===`~`&&r.push(o.token-1)}for(;r.length;){let t=r.pop(),i=t+1;for(;i<e.tokens.length&&e.tokens[i].type===`s_close`;)i++;i--,t!==i&&(n=e.tokens[i],e.tokens[i]=e.tokens[t],e.tokens[t]=n)}}function Ya(e){let t=e.tokens_meta,n=e.tokens_meta.length;Ja(e,e.delimiters);for(let r=0;r<n;r++){let n=t[r]?.delimiters;n&&Ja(e,n)}}var Xa={tokenize:qa,postProcess:Ya};function Za(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function Qa(e,t){let n=e.pos,r=e.src;for(;n<e.posMax&&!Za(r.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=r.slice(e.pos,n)),e.pos=n,!0)}var $a=[[`text`,Qa],[`linkify`,Ga],[`newline`,Ka],[`escape`,Ia],[`backticks`,Ta],[`strikethrough`,Xa.tokenize],[`emphasis`,ja.tokenize],[`link`,Ua],[`image`,Ha],[`autolink`,wa],[`html_inline`,Va],[`entity`,Pa]],eo=[[`balance_pairs`,Da],[`strikethrough`,Xa.postProcess],[`emphasis`,ja.postProcess],[`fragments_join`,La]],to=class{ruler;ruler2;constructor(){this.ruler=new bi;for(let e=0;e<$a.length;e++)this.ruler.push($a[e][0],$a[e][1]);this.ruler2=new bi;for(let e=0;e<eo.length;e++)this.ruler2.push(eo[e][0],eo[e][1])}skipToken(e){let t=e.pos,n=this.ruler.getRules(``),r=n.length,i=e.md.options.maxNesting,a=e.cache,o=a[t];if(o!==void 0){e.pos=o;return}let s=!1;if(e.level<i){for(let i=0;i<r;i++)if(e.level++,s=n[i](e,!0),e.level--,s){if(t>=e.pos)throw Error(`inline rule didn't increment state.pos`);break}}else e.pos=e.posMax;s||e.pos++,a[t]=e.pos}tokenize(e){let t=this.ruler.getRules(``),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos<r;){let a=e.pos,o=!1;if(e.level<i){for(let r=0;r<n;r++)if(o=t[r](e,!1),o){if(a>=e.pos)throw Error(`inline rule didn't increment state.pos`);break}}if(o){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()}parse(e,t,n,r){let i=new this.State(e,t,n,r);this.tokenize(i);let a=this.ruler2.getRules(``),o=a.length;for(let e=0;e<o;e++)a[e](i)}State=yi},no=/^(vbscript|javascript|file|data):/,ro=/^data:image\/(gif|png|jpeg|webp);/;function io(e){let t=e.trim().toLowerCase();return!no.test(t)||ro.test(t)}var ao=[`http:`,`https:`,`mailto:`];function oo(e){let t=Bn(e,!0);if(t.hostname&&(!t.protocol||ao.includes(t.protocol)))try{t.hostname=zr.toASCII(t.hostname)}catch{}return Dn(On(t))}function so(e){let t=Bn(e,!0);if(t.hostname&&(!t.protocol||ao.includes(t.protocol)))try{t.hostname=zr.toUnicode(t.hostname)}catch{}return wn(On(t),`${wn.defaultChars}%`)}var co={html:!1,linkify:!1,typographer:!1,quotes:`“”‘’`,maxNesting:100},lo=class{inline=new to;block=new Gi;core=new _a;linkify=new fr;validateLink=io;normalizeLink=oo;normalizeLinkText=so;helpers={...xa};options={...co};parse(e,t={}){if(typeof e!=`string`)throw TypeError(`Input data should be a String`);let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens}parseInline(e,t={}){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens}},uo={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:20},components:{core:{rules:[`normalize`,`block`,`inline`,`text_join`]},block:{rules:[`blockquote`,`code`,`fence`,`heading`,`hr`,`html_block`,`lheading`,`list`,`reference`,`paragraph`]},inline:{rules:[`autolink`,`backticks`,`emphasis`,`entity`,`escape`,`html_inline`,`image`,`link`,`newline`,`text`],rules2:[`balance_pairs`,`emphasis`,`fragments_join`]}}},fo={options:{...co,xhtmlOut:!1,breaks:!1,langPrefix:`language-`,highlight:null},components:{core:{},block:{},inline:{}}},po={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:20},components:{core:{rules:[`normalize`,`block`,`inline`,`text_join`]},block:{rules:[`paragraph`]},inline:{rules:[`text`],rules2:[`balance_pairs`,`fragments_join`]}}},mo={};mo.code_inline=function(e,t,n,r,i){let a=e[t];return`<code${i.renderAttrs(a)}>${ii(a.content)}</code>`},mo.code_block=function(e,t,n,r,i){let a=e[t];return`<pre${i.renderAttrs(a)}><code>${ii(e[t].content)}</code></pre>\n`},mo.fence=function(e,t,n,r,i){let a=e[t],o=a.info?$r(a.info).trim():``,s=``,c=``;if(o){let e=o.split(/(\s+)/g);s=e[0],c=e.slice(2).join(``)}function l(e){if(e.indexOf(`<pre`)===0)return`${e}\n`;if(o){let t=a.attrIndex(`class`),r=a.attrs?a.attrs.slice():[];t<0?r.push([`class`,n.langPrefix+s]):(r[t]=r[t].slice(),r[t][1]+=` ${n.langPrefix}${s}`);let o={attrs:r};return`<pre><code${i.renderAttrs(o)}>${e}</code></pre>\n`}return`<pre><code${i.renderAttrs(a)}>${e}</code></pre>\n`}let u=(()=>{if(!n.highlight)return ii(a.content);let e=n.highlight(a.content,s,c,r);return mi(e)?e.then(e=>e||ii(a.content)):e||ii(a.content)})();return mi(u)?u.then(l):l(u)},mo.image=function(e,t,n,r,i){let a=e[t];return a.attrs[a.attrIndex(`alt`)][1]=i.renderInlineAsText(a.children,n,r),i.renderToken(e,t,n)},mo.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
50
+ `:`<br>
51
+ `},mo.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
52
+ `:`<br>
53
+ `:`
54
+ `},mo.text=function(e,t){return ii(e[t].content)},mo.html_block=function(e,t){return e[t].content},mo.html_inline=function(e,t){return e[t].content},mo.reference=function(e,t){return e[t].content};var ho=class{rules=Wr({},mo);constructor(){}renderAttrs(e){let t=e.attrs;if(!t)return``;let n=t.length;if(n===0)return``;let r=``;for(let e=0;e<n;e++)r+=` ${ii(t[e][0])}="${ii(t[e][1])}"`;return r}renderToken(e,t,n,r={}){let i=e[t],a=``;if(i.hidden)return``;i.block&&i.nesting!==-1&&t&&e[t-1].hidden&&(a+=`
55
+ `),a+=(i.nesting===-1?`</`:`<`)+i.tag,a+=this.renderAttrs(i),i.nesting===0&&n.xhtmlOut&&(a+=` /`);let o=!1;if(i.block&&(o=!0,i.nesting===1&&t+1<e.length)){let n=e[t+1];(n.type===`inline`||n.type===`reference`||n.hidden||n.nesting===-1&&n.tag===i.tag)&&(o=!1)}return a+=o?`>
56
+ `:`>`,a}renderInline(e,t,n={}){let r=``,i=this.rules;for(let a=0,o=e.length;a<o;a++){let o=i[e[a].type];if(o){let i=o(e,a,t,n,this);if(mi(i))throw Error(`Renderer.renderInline: async rule detected, use renderInlineAsync()`);r+=i}else r+=this.renderToken(e,a,t,n)}return r}renderInlineAsText(e,t,n={}){let r=``;for(let i=0,a=e.length;i<a;i++){let a=e[i];switch(a.type){case`text`:r+=a.content;break;case`image`:r+=this.renderInlineAsText(a.children,t,n);break;case`html_inline`:case`html_block`:r+=a.content;break;case`softbreak`:case`hardbreak`:r+=`
57
+ `}}return r}render(e,t,n={}){let r=``,i=this.rules;for(let a=0,o=e.length;a<o;a++){let o=e[a].type;if(o===`inline`)r+=this.renderInline(e[a].children,t,n);else{let s=i[o];if(s){let i=s(e,a,t,n,this);if(mi(i))throw Error(`Renderer.render: async rule detected, use renderAsync()`);r+=i}else r+=this.renderToken(e,a,t,n)}}return r}async renderInlineAsync(e,t,n){let r=[],i=this.rules;for(let a=0,o=e.length;a<o;a++){let o=i[e[a].type];o?r.push(Promise.resolve(o(e,a,t,n,this))):r.push(Promise.resolve(this.renderToken(e,a,t,n)))}return(await Promise.all(r)).join(``)}async renderAsync(e,t,n){let r=[],i=this.rules;for(let a=0,o=e.length;a<o;a++){let o=e[a],s=o.type;if(s===`inline`)r.push(this.renderInlineAsync(o.children,t,n));else{let o=i[s];o?r.push(Promise.resolve(o(e,a,t,n,this))):r.push(Promise.resolve(this.renderToken(e,a,t,n)))}}return(await Promise.all(r)).join(``)}},go={default:fo,zero:po,commonmark:uo},_o=class extends lo{renderer=new ho;utils=Br;options={...go.default.options};constructor(e,t){super();let[n,r]=typeof e==`string`?[e,t]:[`default`,e];this.configure(n),r&&this.set(r)}set(e){return Wr(this.options,e),this}configure(e){if(typeof e==`string`){let t=e;if(e=go[t],!e)throw Error(`Wrong \`markdown-exit\` preset "${t}", check name`)}if(!e)throw Error("Wrong `markdown-exit` preset, can't be empty");if(e.options&&this.set(e.options),e.components)for(let t of Object.keys(e.components)){let n=e.components[t];n.rules&&this[t].ruler.enableOnly(n.rules),n.rules2&&this[t].ruler2?.enableOnly(n.rules2)}return this}enable(e,t){let n=[];Array.isArray(e)||(e=[e]);for(let t of[`core`,`block`,`inline`])n=n.concat(this[t].ruler.enable(e,!0));n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(e=>!n.includes(e));if(r.length&&!t)throw Error(`MarkdownExit. Failed to enable unknown rule(s): ${r}`);return this}disable(e,t){let n=[];Array.isArray(e)||(e=[e]);for(let t of[`core`,`block`,`inline`])n=n.concat(this[t].ruler.disable(e,!0));n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(e=>!n.includes(e));if(r.length&&!t)throw Error(`MarkdownExit. Failed to disable unknown rule(s): ${r}`);return this}use(e,...t){return e.apply(e,[this,...t]),this}render(e,t={}){return this.renderer.render(this.parse(e,t),this.options,t)}renderAsync(e,t={}){return this.renderer.renderAsync(this.parse(e,t),this.options,t)}renderInline(e,t={}){return this.renderer.render(this.parseInline(e,t),this.options,t)}renderInlineAsync(e,t={}){return this.renderer.renderAsync(this.parseInline(e,t),this.options,t)}};function vo(e){function t(...t){return new e(...t)}return Object.setPrototypeOf(t,_o),t.prototype=_o.prototype,t.prototype.constructor=t,t}var yo=vo(_o);function bo(e){let t=Promise.resolve(null);return(...n)=>(t=t.then(()=>e(...n)).catch(()=>null),t)}function xo(e,t){let n=new Map;for(let t of e)n.set(t.name,t);let r=new Set;for(let e of t)r.has(e.name)||(r.add(e.name),n.delete(e.name),n.set(e.name,e));return[...n.values()]}function So(e){return e}function Co(e,t){if(e[t]!==`[`)return-1;let n=t+1,r=0;for(;n<e.length;){if(e[n]===`\\`&&n+1<e.length){n+=2;continue}if(e[n]===`[`)r++;else if(e[n]===`]`){if(r===0)return n;r--}n+=1}return-1}function wo(e,t){let n=Co(e,t);return n===-1?null:{content:e.slice(t+1,n),endIndex:n+1}}var To=[8364,0,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,0,381,0,0,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,0,382,376];function Eo(e){return e===0||e>=55296&&e<=57343||e>1114111}function Do(e){return Eo(e)?65533:e>=128&&e<=159&&To[e-128]||e}function Oo(e){return Eo(e)?65533:e}function ko(e){return e-1>>>0<127||e-160>>>0<55136?String.fromCharCode(e):String.fromCodePoint(Do(e))}var Ao=(()=>{let e=new Uint8Array(127),t=0;for(let n=33;n<=126;n++)n!==34&&n!==36&&n!==92&&(e[n]=t++);return e})();function jo(e,t,n,r,i,a){let o=e.length,s=a*90,c=0,l=()=>{let t=Ao[e.charCodeAt(c++)];return t<a?t:t*91-s+Ao[e.charCodeAt(c++)]},u=n-r,d=n+i,f=new Int32Array(d);f.fill(-1,r,a),f.fill(-1,a+u,d);let p=new Int32Array(d),m=new Int32Array(d);function h(t,n){let r=0,i=n,a=n+t;for(;i<a;){let t=Ao[e.charCodeAt(c++)];if(t<89)r+=t,f[i++]=r;else if(t===89){let t=Ao[e.charCodeAt(c++)]+2;for(;t--;)f[i++]=++r}else{let t=Ao[e.charCodeAt(c++)];r+=89+(t<90?t*91+Ao[e.charCodeAt(c++)]:Ao[e.charCodeAt(c++)]*8281+Ao[e.charCodeAt(c++)]*91+Ao[e.charCodeAt(c++)]),f[i++]=r}}}h(r,0),h(u,a);let g=new Int32Array(i*2),_=0,v=0;function y(e,t){for(let n=0;n<e;n++){let e=t+n,r=l(),i=l();g[v*2]=r,g[v*2+1]=i,v+=1,p[e]=_;let a=(f[r]<0?m[r]:1)+(f[i]<0?m[i]:1);m[e]=a,_+=a}}y(i-a+r,a+u),y(a-r,r);let b=new Uint16Array(_),x=0;for(let e=0;e<v;e++)for(let t=0;t<2;t++){let n=g[e*2+t],r=f[n];if(r<0){let e=p[n],t=e+m[n];for(;e<t;)b[x++]=b[e++]}else b[x++]=r}let S=new Uint16Array(t),C=0;for(;c<o;){let t=Ao[e.charCodeAt(c++)];t>=a&&(t=t*91-s+Ao[e.charCodeAt(c++)]);let n=f[t];if(n<0){let e=p[t],n=e+m[t];for(;e<n;)S[C++]=b[e++]}else S[C++]=n}return S}var Mo=jo("!}.&u%}'&}*'~!6*)%&,~!J~!J~%L~y<~!R,~~%Lu~~#GD~~#|)1#%}^%}2%+#.##%##%}&%##%'#%##&%#%#'%#&#%#&#'#%%#&#%##%#)%''%&%#%#'%#%%#%%}%%%#%#&(23#%%#&-%0%('1#(##%#'##+%'*.:1}#%#6-+(%'%%#%%%}#L'2351&('%}&/N'(0(/*-%(%%}#'+&T%7.2}#&%&#%#36/5##%&%%#&#%%#))2%%##%&&'0~!#*+&'%1~!%).'3q?&%'1~!.##%6(~!+%%%(Gw'rT~!E#<nA%#jZ~!H%(~!42##~!*31&~!G%U~#)5~#`3~!J~!Z~%]~%Y~%C~!q~!u~#kz~%#~!6'~!D~!U~!?~#T~!c%~!G#'~%7|~!G~!J~!G&~#pb~(Df}#%}*&}#%##%##%##&#-}&'#'&%#.++}%mI,#,@&(}*%}*'%&##&#%##%}&0}#.},U},%}+%}&%}#%##&}B%(}(%}+%)})%##%#&}&%##%&}<%}>%#%&}*%}(%}9%}/%})%}*%}*%}?&}&%}3%}&*#%})%#%#)}#&#-#+*%E%%'%'#%}#*V##&##I}#&&##%&%#&&Qf%%))w/0+&%#(#.%-''''++++7}>%4'',##1,#%#&%##&#'##&#*#9)%&%}#*}%,#+P(%A&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#?C2F|9jPv0w.vISh-MKvUaz(.!9ABbb|[5;5<H|Eg>unwfh;9:4E|YjQsBt|vjx'hYq3!(?C2F|J:2<BaY?C2F|GOu!5x,g|p{ah!-(?C2F|c9:4E|OjXuvvNr}:Rh&i[w*t|cd+U#jJvsu)vsSn~Mkfrmu9p}u7vwv]So!McW#Xa!ax5@A5aY:5;5<H|>kJv~vYrquJu3x4ib#T)2@SmZM?C2F|Bj:rmu9@xPhI(a*a#U#`a3-5Abb|L~@:RhK9:4E|0@52B5G|#C::aY?C2F|-:2<BaY?C2F|.5Jvk!a)javYrquJu3x4ia#T)2@SmYM?C2F|HAxPhH(!a#U#`a*-5Abb|4~@:RhJ9:4E|R@52B5G|F:2<BaY?C2F|Sc^#Xa2j=Qq5CJvB!-g<v{z;hhM?C2F|Zi[vrv{z;hiM?C2F|XKsA>!a)-g<v{z;h[eb?C2F|]i[vrv{z;h]eb?C2F|^iZu.vix,hZq3ah!.(?C2F|QOu!5ShXM:2<BaY?C2F|P",13494,2713,49,25,61),No=new Uint16Array([512,26465,29036,7,0,2,4,116,24638,116,24636,8693,29807,24610,621,1,0,0,3,112,24614,111,115,24615]),R;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.FLAG13=8192]=`FLAG13`,e[e.BRANCH_LENGTH=8064]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`,e[e.VALUE_MASK=8191]=`VALUE_MASK`})(R||={});var z;(function(e){e[e.AMP=38]=`AMP`,e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_X=120]=`LOWER_X`})(z||={});var Po=32,Fo=21,Io=2097151,Lo=2047,Ro=0;function zo(e){let t=e>>>Fo;return t===Lo?Ro:t}function Bo(e){return e-z.ZERO>>>0<=9}function Vo(e){return(e|Po)-z.LOWER_A>>>0<=5}function Ho(e){return(e|Po)-z.LOWER_A>>>0<=25}function Uo(e){return e===z.EQUALS||Ho(e)||Bo(e)}var Wo;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(Wo||={});var Go;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(Go||={});var Ko=class{decodeTree;emitCodePoint;errors;state=Wo.EntityStart;consumed=1;result=0;treeIndex=0;excess=1;decodeMode=Go.Strict;runConsumed=0;constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n}startEntity(e){this.decodeMode=e,this.state=Wo.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(e,t){switch(this.state){case Wo.EntityStart:return e.charCodeAt(t)===z.NUM?(this.state=Wo.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Wo.NamedEntity,this.stateNamedEntity(e,t));case Wo.NumericStart:return this.stateNumericStart(e,t);case Wo.NumericDecimal:return this.stateNumericDecimal(e,t);case Wo.NumericHex:return this.stateNumericHex(e,t);default:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Po)===z.LOWER_X?(this.state=Wo.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Wo.NumericDecimal,this.stateNumericDecimal(e,t))}stateNumericHex(e,t){let n=e.length,{result:r}=this,{consumed:i}=this;for(;t<n;){let n=e.charCodeAt(t);if(Bo(n)||Vo(n)){let e=n<=z.NINE?n-z.ZERO:(n|Po)-z.LOWER_A+10;r=r*16+e,i+=1,t+=1}else return this.result=r,this.consumed=i,this.emitNumericEntity(n,3)}return this.result=r,this.consumed=i,-1}stateNumericDecimal(e,t){let n=e.length,{result:r}=this,{consumed:i}=this;for(;t<n;){let n=e.charCodeAt(t)-z.ZERO;if(n>>>0>9)return this.result=r,this.consumed=i,this.emitNumericEntity(n+z.ZERO,2);r=r*10+n,i+=1,t+=1}return this.result=r,this.consumed=i,-1}emitNumericEntity(e,t){if(this.consumed<=t)return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===z.SEMI)this.consumed+=1;else if(this.decodeMode===Go.Strict)return 0;return this.emitCodePoint((this.decodeTree===No?Oo:Do)(this.result),this.consumed),this.errors&&(e!==z.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}flushAndEmitLegacyOrReject(e,t,n,r){return this.consumed=e,this.excess=t,this.result===0||this.decodeMode===Go.Attribute&&(r===0||t>1||Uo(n))?0:this.emitNotTerminatedNamedEntity()}stateNamedEntity(e,t){let{decodeTree:n}=this,r=e.length,i=this.decodeMode===Go.Strict,{treeIndex:a}=this,{excess:o}=this,{consumed:s}=this,c=n[a];for(;t<r;){for(;(c&(R.VALUE_LENGTH|R.FLAG13))===0&&(c&R.JUMP_TABLE)!==0;){let i=e.charCodeAt(t),l=c&R.JUMP_TABLE,u=(c&R.BRANCH_LENGTH)>>7;if(u===0){if(i!==l)return this.flushAndEmitLegacyOrReject(s,o,i,0);a+=1}else{let e=i-l;if(e>>>0>=u)return this.flushAndEmitLegacyOrReject(s,o,i,0);let t=n[a+1+e];if(t===0)return this.flushAndEmitLegacyOrReject(s,o,i,0);a=a+u+t&65535}if(c=n[a],t+=1,o+=1,t>=r)break}if(t>=r)break;if((c&(R.VALUE_LENGTH|R.FLAG13))===R.FLAG13){let i=(c&R.BRANCH_LENGTH)>>7,{runConsumed:l}=this;if(l===0){let n=e.charCodeAt(t);if(n!==(c&R.JUMP_TABLE))return this.flushAndEmitLegacyOrReject(s,o,n,0);t+=1,o+=1,l=1}for(;l<i;){if(t>=r)return this.treeIndex=a,this.excess=o,this.consumed=s,this.runConsumed=l,-1;let i=l-1,c=n[a+1+(i>>1)]>>((i&1)<<3)&255,u=e.charCodeAt(t);if(u!==c)return this.runConsumed=0,this.flushAndEmitLegacyOrReject(s,o,u,0);t+=1,o+=1,l+=1}this.runConsumed=0,a+=1+(i>>1),c=n[a];continue}let l=c>>>14,u=e.charCodeAt(t);if(l!==0){if(!i&&(c&R.FLAG13)===0&&(this.result=a,s+=o-1,o=1),u===z.SEMI)return this.emitNamedEntityData(a,l,s+o);if(l===1)return this.flushAndEmitLegacyOrReject(s,o,u,l)}let d=qo(n,c,a+(l||1),u);if(d<0)return this.flushAndEmitLegacyOrReject(s,o,u,l);a=d,c=n[a],t+=1,o+=1}return!i&&c>>>14&&(c&R.FLAG13)===0&&(this.result=a,s+=o-1,o=1),this.treeIndex=a,this.excess=o,this.consumed=s,-1}emitNotTerminatedNamedEntity(){let{result:e,decodeTree:t}=this,n=t[e]>>>14;return this.emitNamedEntityData(e,n,this.consumed),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&R.VALUE_MASK:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){switch(this.state){case Wo.NamedEntity:return this.result!==0&&(this.decodeMode!==Go.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Wo.NumericDecimal:return this.emitNumericEntity(0,2);case Wo.NumericHex:return this.emitNumericEntity(0,3);case Wo.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;default:return 0}}};function qo(e,t,n,r){let i=(t&R.BRANCH_LENGTH)>>7,a=t&R.JUMP_TABLE;if(a){if(i===0)return r===a?n:-1;let t=r-a;if(t>>>0>=i)return-1;let o=e[n+t];return o===0?-1:n+i+o-1&65535}if(i===0)return-1;let o=i+1>>1,s=n+o+i;for(let t=0;t<i;t++){let i=e[n+(t>>1)]>>((t&1)<<3)&255;if(i===r)return s+e[n+o+t]&65535;if(i>r)return-1}return-1}function Jo(e,t,n){return n===1?String.fromCharCode(e[t]&R.VALUE_MASK):n===2?String.fromCharCode(e[t+1]):String.fromCharCode(e[t+1],e[t+2])}function Yo(e,t,n){let r=t+1,i=0,a=r;if(r<n&&(e.charCodeAt(r)|Po)===z.LOWER_X)for(r+=1,a=r;r<n;){let t=e.charCodeAt(r);if(Bo(t))i=i*16+(t-z.ZERO);else if(Vo(t))i=i*16+((t|Po)-z.LOWER_A+10);else break;r+=1}else for(;r<n;){let t=e.charCodeAt(r)-z.ZERO;if(t>>>0>9)break;i=i*10+t,r+=1}if(r===a)return 0;r<n&&e.charCodeAt(r)===z.SEMI&&(r+=1),i>1114111&&(i=1114112);let o=r-t;return o>=Lo&&(Ro=o,o=Lo),o<<Fo|i}function Xo(e,t,n){let r=Mo,i=e.indexOf(`&`);if(i<0)return e;let a=e.length,o=0,s=``,c=r[0],l=c&R.JUMP_TABLE,u=(c&R.BRANCH_LENGTH)>>7;do{let c=i+1,d=e.charCodeAt(c),f,p;if(d===z.NUM){let n=Yo(e,c,a);f=zo(n),t&&f>0&&e.charCodeAt(c+f-1)!==z.SEMI&&(f=0),p=f===0?``:ko(n&Io)}else if(Ho(d)){f=0,p=``;let n=d-l,i;if(n>>>0<u){let e=r[1+n];i=e===0?-1:u+e&65535}else i=-1;let o=0,s=0,m=i<0?0:r[i],h=c+1;trie:for(;h<a;){for(;(m&(R.VALUE_LENGTH|R.FLAG13))===0&&(m&R.JUMP_TABLE)!==0;){let t=m&R.JUMP_TABLE,n=(m&R.BRANCH_LENGTH)>>7;if(n===0){if(e.charCodeAt(h)!==t)break trie;i+=1}else{let a=e.charCodeAt(h)-t;if(a>>>0>=n)break trie;let o=r[i+1+a];if(o===0)break trie;i=i+n+o&65535}if(m=r[i],h+=1,h>=a)break trie}if((m&(R.VALUE_LENGTH|R.FLAG13))===R.FLAG13){let t=(m&R.BRANCH_LENGTH)>>7;if(e.charCodeAt(h)!==(m&R.JUMP_TABLE))break;h+=1;let n=t-1,a=i+1,o=0;for(;o+1<n;o+=2){let t=r[a];if(e.charCodeAt(h)!==(t&255)||(h+=1,e.charCodeAt(h)!==(t>>8&255)))break trie;h+=1,a+=1}if(o<n){if(e.charCodeAt(h)!==(r[a]&255))break;h+=1}i+=1+(t>>1),m=r[i];continue}let n=m>>>14,l=e.charCodeAt(h);if(n!==0){if(l===z.SEMI){f=h-c+1,p=n===1?String.fromCharCode(m&R.VALUE_MASK):Jo(r,i,n);break}if(!t&&(m&R.FLAG13)===0&&(f=h-c,o=i,s=n),n===1)break}let u=qo(r,m,i+(n||1),l);if(u<0)break;i=u,m=r[i],h+=1}if(p===``){let e=m>>>14;e!==0&&!t&&(m&R.FLAG13)===0&&(f=h-c,o=i,s=e),f>0&&(p=Jo(r,o,s))}}else f=0,p=``;f===0||n&&d!==z.NUM&&e.charCodeAt(c+f-1)!==z.SEMI&&c+f<a&&Uo(e.charCodeAt(c+f))?i=c:(o<i&&(s+=e.slice(o,i)),s+=p,i=o=c+f),e.charCodeAt(i)!==z.AMP&&(i=e.indexOf(`&`,i))}while(i>=0);return s+e.slice(o)}function Zo(e,t=Go.Legacy){return Xo(e,t===Go.Strict,t===Go.Attribute)}var B=Symbol(`NOT_RESOLVED`);function Qo(e,t){return{tagName:e,nodeKind:`scalar`,implicit:t.implicit??!1,matchByTagPrefix:t.matchByTagPrefix??!1,implicitFirstChars:t.implicitFirstChars??null,resolve:t.resolve,identify:t.identify,represent:t.represent??(e=>String(e)),representTagName:t.representTagName??(()=>e)}}function $o(e,t){let n=t.finalize===void 0;return{tagName:e,nodeKind:`sequence`,implicit:!1,matchByTagPrefix:t.matchByTagPrefix??!1,create:t.create,addItem:t.addItem,finalize:t.finalize??(e=>e),carrierIsResult:n,identify:t.identify,represent:t.represent??(e=>e),representTagName:t.representTagName??(()=>e)}}function es(e,t){let n=t.finalize===void 0;return{tagName:e,nodeKind:`mapping`,implicit:!1,matchByTagPrefix:t.matchByTagPrefix??!1,create:t.create,addPair:t.addPair,has:t.has,keys:t.keys,get:t.get,finalize:t.finalize??(e=>e),carrierIsResult:n,identify:t.identify,represent:t.represent??(e=>e),representTagName:t.representTagName??(()=>e)}}var ts=Qo(`tag:yaml.org,2002:str`,{resolve:e=>e,identify:e=>typeof e==`string`}),ns=[``,`~`,`null`,`Null`,`NULL`],rs=Qo(`tag:yaml.org,2002:null`,{implicit:!0,implicitFirstChars:[``,`~`,`n`,`N`],resolve:e=>ns.indexOf(e)===-1?B:null,identify:e=>e===null,represent:()=>`null`}),is=Qo(`tag:yaml.org,2002:null`,{implicit:!0,implicitFirstChars:[`n`],resolve:(e,t)=>e===`null`||t&&e===``?null:B,identify:e=>e===null,represent:()=>`null`}),as=[``,`~`,`null`,`Null`,`NULL`],os=Qo(`tag:yaml.org,2002:null`,{implicit:!0,implicitFirstChars:[``,`~`,`n`,`N`],resolve:e=>as.indexOf(e)===-1?B:null,identify:e=>e===null,represent:()=>`null`}),ss=[`true`,`True`,`TRUE`],cs=[`false`,`False`,`FALSE`],ls=Qo(`tag:yaml.org,2002:bool`,{implicit:!0,implicitFirstChars:[`t`,`T`,`f`,`F`],resolve:e=>ss.indexOf(e)!==-1||cs.indexOf(e)===-1&&B,identify:e=>Object.prototype.toString.call(e)===`[object Boolean]`,represent:e=>e?`true`:`false`}),us=[`true`],ds=[`false`],fs=Qo(`tag:yaml.org,2002:bool`,{implicit:!0,implicitFirstChars:[`t`,`f`],resolve:e=>us.indexOf(e)!==-1||ds.indexOf(e)===-1&&B,identify:e=>Object.prototype.toString.call(e)===`[object Boolean]`,represent:e=>e?`true`:`false`}),ps=[`true`,`True`,`TRUE`,`y`,`Y`,`yes`,`Yes`,`YES`,`on`,`On`,`ON`],ms=[`false`,`False`,`FALSE`,`n`,`N`,`no`,`No`,`NO`,`off`,`Off`,`OFF`],hs=Qo(`tag:yaml.org,2002:bool`,{implicit:!0,implicitFirstChars:[`y`,`Y`,`n`,`N`,`t`,`T`,`f`,`F`,`o`,`O`],resolve:e=>ps.indexOf(e)!==-1||ms.indexOf(e)===-1&&B,identify:e=>Object.prototype.toString.call(e)===`[object Boolean]`,represent:e=>e?`true`:`false`}),gs=RegExp(`^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$`),_s=RegExp(`^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$`);function vs(e){let t=e,n=1;return(t[0]===`-`||t[0]===`+`)&&(t[0]===`-`&&(n=-1),t=t.slice(1)),t.startsWith(`0b`)?n*parseInt(t.slice(2),2):t.startsWith(`0o`)?n*parseInt(t.slice(2),8):t.startsWith(`0x`)?n*parseInt(t.slice(2),16):n*parseInt(t,10)}function ys(e,t){if(t){if(!_s.test(e))return B}else if(!gs.test(e))return B;let n=vs(e);return Number.isFinite(n)?n:B}var bs=Qo(`tag:yaml.org,2002:int`,{implicit:!0,implicitFirstChars:[`-`,`+`,...`0123456789`],resolve:ys,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf(`e`)<0,represent:e=>e.toString(10)}),xs=RegExp(`^-?(?:0|[1-9][0-9]*)$`),Ss=RegExp(`^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$`);function Cs(e){let t=e,n=1;return(t[0]===`-`||t[0]===`+`)&&(t[0]===`-`&&(n=-1),t=t.slice(1)),t.startsWith(`0b`)?n*parseInt(t.slice(2),2):t.startsWith(`0o`)?n*parseInt(t.slice(2),8):t.startsWith(`0x`)?n*parseInt(t.slice(2),16):n*parseInt(t,10)}function ws(e,t){if(t){if(!Ss.test(e))return B}else if(!xs.test(e))return B;let n=Cs(e);return Number.isFinite(n)?n:B}var Ts=Qo(`tag:yaml.org,2002:int`,{implicit:!0,implicitFirstChars:[`-`,...`0123456789`],resolve:ws,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf(`e`)<0,represent:e=>e.toString(10)}),Es=RegExp(`^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$`);function Ds(e){let t=e.replace(/_/g,``),n=1;if((t[0]===`-`||t[0]===`+`)&&(t[0]===`-`&&(n=-1),t=t.slice(1)),t.startsWith(`0b`))return n*parseInt(t.slice(2),2);if(t.startsWith(`0x`))return n*parseInt(t.slice(2),16);if(t.includes(`:`)){let e=0;for(let n of t.split(`:`))e=e*60+Number(n);return n*e}return t!==`0`&&t[0]===`0`?n*parseInt(t,8):n*parseInt(t,10)}function Os(e){if(!Es.test(e))return B;let t=Ds(e);return Number.isFinite(t)?t:B}var ks=Qo(`tag:yaml.org,2002:int`,{implicit:!0,implicitFirstChars:[`-`,`+`,...`0123456789`],resolve:Os,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf(`e`)<0,represent:e=>e.toString(10)}),As=RegExp(`^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`),js=RegExp(`^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function Ms(e){if(!As.test(e))return B;let t=e.toLowerCase(),n=t[0]===`-`?-1:1;if(`+-`.includes(t[0])&&(t=t.slice(1)),t===`.inf`)return n===1?1/0:-1/0;if(t===`.nan`)return NaN;let r=n*parseFloat(t);return Number.isFinite(r)||js.test(e)?r:B}function Ns(e){if(isNaN(e))return`.nan`;if(e===1/0)return`.inf`;if(e===-1/0)return`-.inf`;if(Object.is(e,-0))return`-0.0`;let t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace(`e`,`.e`):t}var Ps=Qo(`tag:yaml.org,2002:float`,{implicit:!0,implicitFirstChars:[`-`,`+`,`.`,...`0123456789`],resolve:Ms,identify:e=>typeof e==`number`&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf(`e`)>=0),represent:Ns}),Fs=RegExp(`^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$`),Is=RegExp(`^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function Ls(e,t){if(t){if(!Is.test(e))return B;let t=e.toLowerCase(),n=t[0]===`-`?-1:1;if(`+-`.includes(t[0])&&(t=t.slice(1)),t===`.inf`)return n===1?1/0:-1/0;if(t===`.nan`)return NaN;let r=n*parseFloat(t);return Number.isFinite(r)?r:B}if(!Fs.test(e))return B;let n=Number(e);return Number.isFinite(n)?n:B}function Rs(e){if(isNaN(e))return`.nan`;if(e===1/0)return`.inf`;if(e===-1/0)return`-.inf`;if(Object.is(e,-0))return`-0.0`;let t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace(`e`,`.e`):t}var zs=Qo(`tag:yaml.org,2002:float`,{implicit:!0,implicitFirstChars:[`-`,...`0123456789`],resolve:Ls,identify:e=>typeof e==`number`&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf(`e`)>=0),represent:Rs}),Bs=RegExp(`^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`),Vs=RegExp(`^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function Hs(e){if(!Bs.test(e))return B;let t=e.toLowerCase().replace(/_/g,``),n=t[0]===`-`?-1:1;if(`+-`.includes(t[0])&&(t=t.slice(1)),t===`.inf`)return n===1?1/0:-1/0;if(t===`.nan`)return NaN;let r=0;if(t.includes(`:`)){for(let e of t.split(`:`))r=r*60+Number(e);r*=n}else r=n*parseFloat(t);return Number.isFinite(r)||Vs.test(e)?r:B}function Us(e){if(isNaN(e))return`.nan`;if(e===1/0)return`.inf`;if(e===-1/0)return`-.inf`;if(Object.is(e,-0))return`-0.0`;let t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace(`e`,`.e`):t}var Ws=Qo(`tag:yaml.org,2002:float`,{implicit:!0,implicitFirstChars:[`-`,`+`,`.`,...`0123456789`],resolve:Hs,identify:e=>typeof e==`number`&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf(`e`)>=0),represent:Us}),Gs=Qo(`tag:yaml.org,2002:merge`,{implicit:!0,implicitFirstChars:[`<`],resolve:(e,t)=>e===`<<`||t&&e===``?`<<`:B,identify:()=>!1}),Ks=/^[A-Za-z0-9+/]*={0,2}$/;function qs(e){let t=e.replace(/\s/g,``);if(t.length%4!=0||!Ks.test(t))return B;let n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r}function Js(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}var Ys=Qo(`tag:yaml.org,2002:binary`,{resolve:qs,identify:e=>Object.prototype.toString.call(e)===`[object Uint8Array]`,represent:Js}),Xs=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$`),Zs=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$`);function Qs(e,t,n,r=0,i=0,a=0,o=0){let s=new Date(Date.UTC(e,t,n,r,i,a,o));return s.setUTCFullYear(e,t,n),s}function $s(e){let t=Xs.exec(e);if(t===null&&(t=Zs.exec(e)),t===null)return B;let n=+t[1],r=t[2]-1,i=+t[3];if(!t[4]){let e=Qs(n,r,i);return e.getUTCFullYear()!==n||e.getUTCMonth()!==r||e.getUTCDate()!==i?B:e}let a=+t[4],o=+t[5],s=+t[6],c=0;if(a>23||o>59||s>59)return B;if(t[7]){let e=t[7].slice(0,3);for(;e.length<3;)e+=`0`;c=+e}let l=Qs(n,r,i,a,o,s,c);if(l.getUTCFullYear()!==n||l.getUTCMonth()!==r||l.getUTCDate()!==i)return B;if(t[9]){let e=+t[10],n=+(t[11]||0);if(e>23||n>59)return B;let r=(e*60+n)*6e4;l.setTime(l.getTime()-(t[9]===`-`?-r:r))}return l}var ec=Qo(`tag:yaml.org,2002:timestamp`,{implicit:!0,implicitFirstChars:[...`0123456789`],resolve:$s,identify:e=>e instanceof Date,represent:e=>e.toISOString()}),tc=$o(`tag:yaml.org,2002:seq`,{create:()=>[],addItem:(e,t)=>{e.push(t)},identify:Array.isArray});function nc(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function rc(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}var ic=$o(`tag:yaml.org,2002:omap`,{create:()=>({list:[],seen:new Set}),addItem:(e,t)=>{let n;if(t instanceof Map){if(t.size!==1)return`cannot resolve an ordered map item`;n=t.keys().next().value}else if(nc(t)){let e=Object.keys(t);if(e.length!==1)return`cannot resolve an ordered map item`;n=e[0]}else return`cannot resolve an ordered map item`;return e.seen.has(n)?`duplicate key in ordered map`:(e.seen.add(n),e.list.push(t),``)},finalize:e=>e.list,identify:()=>!1}),ac=$o(`tag:yaml.org,2002:pairs`,{create:()=>[],addItem:(e,t)=>{if(t instanceof Map)return t.size===1?(e.push(t.entries().next().value),``):`cannot resolve a pairs item`;if(Object.prototype.toString.call(t)!==`[object Object]`)return`cannot resolve a pairs item`;let n=t,r=Object.keys(n);return r.length===1?(e.push([r[0],n[r[0]]]),``):`cannot resolve a pairs item`},identify:()=>!1}),oc=es(`tag:yaml.org,2002:map`,{create:()=>({}),identify:nc,represent:e=>{let t=new Map;for(let n of Object.keys(e))t.set(n,e[n]);return t},addPair:(e,t,n)=>{if(typeof t==`object`&&t)return`object-based map does not support complex keys`;let r=String(t);return r===`__proto__`?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,``},has:(e,t)=>typeof t==`object`&&t?!1:Object.prototype.hasOwnProperty.call(e,String(t)),keys:e=>Object.keys(e),get:(e,t)=>{let n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?e[n]:null}}),sc=es(`tag:yaml.org,2002:set`,{create:()=>new Set,identify:e=>e instanceof Set,represent:e=>{let t=new Map;for(let n of e)t.set(n,null);return t},addPair:(e,t,n)=>n===null?(e.add(t),``):`cannot resolve a set item`,has:(e,t)=>e.has(t),keys:e=>e.keys(),get:()=>null});function cc(){return{scalar:Object.create(null),sequence:Object.create(null),mapping:Object.create(null)}}function lc(){return{scalar:[],sequence:[],mapping:[]}}function uc(e){let t=[];for(let n of e){let e=t.length;for(let r=0;r<t.length;r++){let i=t[r];if(i.nodeKind===n.nodeKind&&i.tagName===n.tagName&&i.matchByTagPrefix===n.matchByTagPrefix){e=r;break}}t[e]=n}return t}var dc=class e{tags;implicitScalarTags;implicitScalarByFirstChar;implicitScalarAnyFirstChar;defaultScalarTag;defaultSequenceTag;defaultMappingTag;exact;prefix;constructor(e){let t=uc(e),n=[],r=cc(),i=lc();for(let e of t){if(e.nodeKind===`scalar`&&e.implicit){if(e.matchByTagPrefix)throw Error(`Implicit scalar tags cannot match by tag prefix`);n.push(e)}switch(e.nodeKind){case`scalar`:e.matchByTagPrefix?i.scalar.push(e):r.scalar[e.tagName]=e;break;case`sequence`:e.matchByTagPrefix?i.sequence.push(e):r.sequence[e.tagName]=e;break;case`mapping`:e.matchByTagPrefix?i.mapping.push(e):r.mapping[e.tagName]=e}}let a=n.filter(e=>e.implicitFirstChars===null),o=new Set;for(let e of n)if(e.implicitFirstChars!==null)for(let t of e.implicitFirstChars)o.add(t);let s=new Map;for(let e of o)s.set(e,n.filter(t=>t.implicitFirstChars===null||t.implicitFirstChars.indexOf(e)!==-1));let c=r.scalar[`tag:yaml.org,2002:str`];if(!c)throw Error(`schema does not define the default scalar tag (tag:yaml.org,2002:str)`);this.tags=t,this.implicitScalarTags=n,this.implicitScalarByFirstChar=s,this.implicitScalarAnyFirstChar=a,this.defaultScalarTag=c,this.defaultSequenceTag=r.sequence[`tag:yaml.org,2002:seq`],this.defaultMappingTag=r.mapping[`tag:yaml.org,2002:map`],this.exact=r,this.prefix=i}lookupScalarTag(e){let t=this.exact.scalar[e];if(t)return t;for(let t of this.prefix.scalar)if(e.startsWith(t.tagName))return t}lookupSequenceTag(e){let t=this.exact.sequence[e];if(t)return t;for(let t of this.prefix.sequence)if(e.startsWith(t.tagName))return t}lookupMappingTag(e){let t=this.exact.mapping[e];if(t)return t;for(let t of this.prefix.mapping)if(e.startsWith(t.tagName))return t}resolveImplicitScalarTag(e){let t=this.implicitScalarByFirstChar.get(e.charAt(0))??this.implicitScalarAnyFirstChar;for(let n of t){let t=n.resolve(e,!1,n.tagName);if(t!==B)return{value:t,tag:n}}let n=this.defaultScalarTag;return{value:n.resolve(e,!1,n.tagName),tag:n}}withTags(...t){let n=[];for(let e of t)n=n.concat(e);return new e([...this.tags,...n])}},fc=new dc([ts,tc,oc]),pc=new dc([...fc.tags,is,fs,Ts,zs]),mc=new dc([...fc.tags,rs,ls,bs,Ps]);new dc([...fc.tags,os,hs,ks,Ws,ec,Gs,Ys,ic,ac,sc]).withTags({...ks,resolve:(e,t,n)=>{let r=ks.resolve(e,t,n);return r===B?bs.resolve(e,t,n):r}},{...Ws,resolve:(e,t,n)=>{let r=Ws.resolve(e,t,n);return r===B?Ps.resolve(e,t,n):r}}),es(`tag:yaml.org,2002:map`,{create:()=>new Map,addPair:(e,t,n)=>(e.set(t,n),``),has:(e,t)=>e.has(t),keys:e=>e.keys(),get:(e,t)=>e.get(t),identify:e=>e instanceof Map||nc(e),represent:e=>{if(e instanceof Map)return e;let t=new Map,n=e;for(let e of Object.keys(n))t.set(e,n[e]);return t}});function hc(e){if(Array.isArray(e)){let t=Array.prototype.slice.call(e);for(let e=0;e<t.length;e++){if(Array.isArray(t[e]))return null;typeof t[e]==`object`&&Object.prototype.toString.call(t[e])===`[object Object]`&&(t[e]=`[object Object]`)}return String(t)}return typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`?`[object Object]`:String(e)}es(`tag:yaml.org,2002:map`,{create:()=>({}),identify:nc,represent:e=>{let t=new Map;for(let n of Object.keys(e))t.set(n,e[n]);return t},addPair:(e,t,n)=>{let r=hc(t);return r===null?`nested arrays are not supported inside keys`:(r===`__proto__`?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,``)},has:(e,t)=>{let n=hc(t);return n!==null&&Object.prototype.hasOwnProperty.call(e,n)},keys:e=>Object.keys(e),get:(e,t)=>{let n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?e[n]:null}});var gc={maxLength:79,indent:1,linesBefore:3,linesAfter:2};function _c(e,t,n,r,i){let a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}function vc(e,t){return` `.repeat(Math.max(t-e.length,0))+e}function yc(e,t){if(!e.buffer)return null;let n={...gc,...t},r=/\r?\n|\r|\0/g,i=[0],a=[],o,s=-1;for(;o=r.exec(e.buffer);)a.push(o.index),i.push(o.index+o[0].length),e.position<=o.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);let c=``,l=Math.min(e.line+n.linesAfter,a.length).toString().length,u=n.maxLength-(n.indent+l+3);for(let t=1;t<=n.linesBefore&&!(s-t<0);t++){let r=_c(e.buffer,i[s-t],a[s-t],e.position-(i[s]-i[s-t]),u);c=`${` `.repeat(n.indent)}${vc((e.line-t+1).toString(),l)} | ${r.str}\n${c}`}let d=_c(e.buffer,i[s],a[s],e.position,u);c+=`${` `.repeat(n.indent)}${vc((e.line+1).toString(),l)} | ${d.str}\n`,c+=`${`-`.repeat(n.indent+l+3+d.pos)}^\n`;for(let t=1;t<=n.linesAfter&&!(s+t>=a.length);t++){let r=_c(e.buffer,i[s+t],a[s+t],e.position-(i[s]-i[s+t]),u);c+=`${` `.repeat(n.indent)}${vc((e.line+t+1).toString(),l)} | ${r.str}\n`}return c.replace(/\n$/,``)}function bc(e,t){let n=``;return e.mark?(e.mark.name&&(n+=`in "${e.mark.name}" `),n+=`(${e.mark.line+1}:${e.mark.column+1})`,!t&&e.mark.snippet&&(n+=`\n\n${e.mark.snippet}`),`${e.reason} ${n}`):e.reason}var xc=class e extends Error{reason;mark;constructor(e,t){super(),this.name=`YAMLException`,this.reason=e,this.mark=t,this.message=bc(this,!1),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toString(e){return`${this.name}: ${bc(this,e)}`}static throwAt(t,n,r,i=``){let a=0,o=0;for(let e=0;e<n;e++){let n=t.charCodeAt(e);n===10?(a++,o=e+1):n===13&&(a++,t.charCodeAt(e+1)===10&&e++,o=e+1)}let s={name:i,buffer:t,position:n,line:a,column:n-o};throw s.snippet=yc(s),new e(r,s)}},V={DOCUMENT:1,SEQUENCE:2,MAPPING:3,SCALAR:4,ALIAS:5,POP:6},H={PLAIN:1,SINGLE_QUOTED:2,DOUBLE_QUOTED:3,LITERAL_BLOCK:4,FOLDED_BLOCK:5},Sc={BLOCK:1,FLOW:2},Cc={CLIP:1,STRIP:2,KEEP:3},wc=-1;function Tc(e){switch(e){case 48:return`\0`;case 97:return`\x07`;case 98:return`\b`;case 116:return` `;case 9:return` `;case 110:return`
58
+ `;case 118:return`\v`;case 102:return`\f`;case 114:return`\r`;case 101:return`\x1B`;case 32:return` `;case 34:return`"`;case 47:return`/`;case 92:return`\\`;case 78:return`…`;case 95:return`\xA0`;case 76:return`\u2028`;case 80:return`\u2029`;default:return``}}var Ec=Array(256),Dc=Array(256);for(let e=0;e<256;e++)Ec[e]=+!!Tc(e),Dc[e]=Tc(e);function Oc(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function kc(e){return e>=48&&e<=57?e-48:(e|32)-97+10}function Ac(e){return e===120?2:e===117?4:8}function jc(e,t,n){let r=0;for(;t<n;){let n=e.charCodeAt(t);if(n===10)r++,t++;else if(n===13)r++,t++,e.charCodeAt(t)===10&&t++;else if(n===32||n===9)t++;else break}return{position:t,breaks:r}}function Mc(e){return e===1?` `:`
59
+ `.repeat(e-1)}function Nc(e,t,n){let r=``,i=t,a=t,o=t;for(;i<n;){let t=e.charCodeAt(i);if(t===10||t===13){r+=e.slice(a,o);let t=jc(e,i,n);r+=Mc(t.breaks),i=a=o=t.position}else i++,t!==32&&t!==9&&(o=i)}return r+e.slice(a,o)}function Pc(e,t,n){let r=``,i=t,a=t,o=t;for(;i<n;){let t=e.charCodeAt(i);if(t===39)r+=e.slice(a,i)+`'`,i+=2,a=o=i;else if(t===10||t===13){r+=e.slice(a,o);let t=jc(e,i,n);r+=Mc(t.breaks),i=a=o=t.position}else i++,t!==32&&t!==9&&(o=i)}return r+e.slice(a,n)}function Fc(e,t,n){let r=``,i=t,a=t,o=t;for(;i<n;){let t=e.charCodeAt(i);if(t===92){r+=e.slice(a,i),i++;let t=e.charCodeAt(i);if(t===10||t===13)i=jc(e,i,n).position;else if(t<256&&Ec[t])r+=Dc[t],i++;else{let n=Ac(t),a=0;for(;n>0;n--){i++;let t=kc(e.charCodeAt(i));a=(a<<4)+t}r+=Oc(a),i++}a=o=i}else if(t===10||t===13){r+=e.slice(a,o);let t=jc(e,i,n);r+=Mc(t.breaks),i=a=o=t.position}else i++,t!==32&&t!==9&&(o=i)}return r+e.slice(a,n)}function Ic(e,t,n,r,i,a){let o=r<0?0:r,s=e.slice(t,n).replace(/\r\n?/g,`
60
+ `),c=s===``?[]:(s.endsWith(`
61
+ `)?s.slice(0,-1):s).split(`
62
+ `),l=``,u=!1,d=0,f=!1;for(let e of c){let t=0;for(;t<o&&e.charCodeAt(t)===32;)t++;if(r<0||t>=e.length){d++;continue}let n=e.slice(o),i=n.charCodeAt(0);a?i===32||i===9?(f=!0,l+=`
63
+ `.repeat(u?1+d:d)):f?(f=!1,l+=`
64
+ `.repeat(d+1)):d===0?u&&(l+=` `):l+=`
65
+ `.repeat(d):l+=`
66
+ `.repeat(u?1+d:d),l+=n,u=!0,d=0}return i===Cc.KEEP?l+=`
67
+ `.repeat(u?1+d:d):i!==Cc.STRIP&&u&&(l+=`
68
+ `),l}function Lc(e,t){if(t.valueStart===wc)return``;let{valueStart:n,valueEnd:r}=t;if(t.fast)return e.slice(n,r);switch(t.style){case H.SINGLE_QUOTED:return Pc(e,n,r);case H.DOUBLE_QUOTED:return Fc(e,n,r);case H.LITERAL_BLOCK:return Ic(e,n,r,t.indent,t.chomping,!1);case H.FOLDED_BLOCK:return Ic(e,n,r,t.indent,t.chomping,!0);default:return Nc(e,n,r)}}var Rc=Object.assign(Object.create(null),{"!":`!`,"!!":`tag:yaml.org,2002:`});function zc(e,t){if(e.startsWith(`!<`)&&e.endsWith(`>`))return decodeURIComponent(e.slice(2,-1));let n=e.indexOf(`!`,1),r=n===-1?`!`:e.slice(0,n+1),i=t?.[r]??Rc[r]??r;return decodeURIComponent(i)+decodeURIComponent(e.slice(r.length))}var Bc=-1,Vc=`tag:yaml.org,2002:merge`,Hc={filename:``,schema:mc,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};function Uc(e){return`tagStart`in e&&e.tagStart!==Bc?e.tagStart:`anchorStart`in e&&e.anchorStart!==Bc?e.anchorStart:`valueStart`in e&&e.valueStart!==Bc?e.valueStart:`start`in e?e.start:0}function U(e,t){xc.throwAt(e.source,e.position,t,e.filename)}function Wc(e,t,n,r){try{return n.finalize(r)}catch(n){if(n instanceof xc)throw n;xc.throwAt(e.source,t,n instanceof Error?n.message:String(n),e.filename)}}function Gc(e,t){let n=Lc(e.source,t),r=t.tagStart===Bc?``:e.source.slice(t.tagStart,t.tagEnd),i=e.schema.defaultScalarTag;if(r!==``){if(r===`!`)return{value:n,tag:i};let t=zc(r,e.tagHandlers),a=e.schema.lookupScalarTag(t);if(a){let r=a.resolve(n,!0,t);return r===B&&U(e,`cannot resolve a node with !<${t}> explicit tag`),{value:r,tag:a}}let o=e.schema.lookupMappingTag(t)??e.schema.lookupSequenceTag(t);if(o){n!==``&&U(e,`cannot resolve a node with !<${t}> explicit tag`);let r=o.create(t);return{value:o.carrierIsResult?r:Wc(e,e.position,o,r),tag:o}}U(e,`unknown scalar tag !<${t}>`)}return t.style===H.PLAIN?e.schema.resolveImplicitScalarTag(n):{value:i.resolve(n,!1,i.tagName),tag:i}}function Kc(e,t,n){let r=t.tagStart===Bc?``:e.source.slice(t.tagStart,t.tagEnd);return r===``||r===`!`?n:zc(r,e.tagHandlers)}function qc(e){return e.nodeKind===`mapping`}function Jc(e){e.totalMergeKeys++,e.maxTotalMergeKeys!==-1&&e.totalMergeKeys>e.maxTotalMergeKeys&&U(e,`merge keys exceeded maxTotalMergeKeys (${e.maxTotalMergeKeys})`)}function Yc(e,t,n,r){Jc(e);for(let i of r.keys(n)){if(Jc(e),t.tag.has(t.value,i))continue;let a=t.tag.addPair(t.value,i,r.get(n,i));a&&U(e,a),t.overridable??=new Set,t.overridable.add(i)}}function Xc(e,t,n,r){if(e.position=t.keyPosition,qc(r))Yc(e,t,n,r);else if(r.nodeKind===`sequence`&&Array.isArray(n)){n.length>100&&U(e,`abnormal merge sequence size`);for(let r of n){let n=e.nodeTags.get(r);n||U(e,`cannot merge mappings; the provided source object is unacceptable`),Yc(e,t,r,n)}}else U(e,`cannot merge mappings; the provided source object is unacceptable`)}function Zc(e,t,n,r,i){if(e.position=t.keyPosition,t.keyIsMerge){Xc(e,t,r,i);return}!e.json&&t.tag.has(t.value,n)&&!t.overridable?.has(n)&&U(e,`duplicated mapping key`);let a=t.tag.addPair(t.value,n,r);a&&U(e,a),t.overridable?.delete(n)}function Qc(e,t,n){let r=e.frames[e.frames.length-1];if(r.kind===`document`)r.value=t,r.hasValue=!0;else if(r.kind===`sequence`){qc(n)&&e.nodeTags.set(t,n);let i=r.tag.addItem(r.value,t,r.index++);i&&U(e,i)}else if(r.hasKey){let i=r.key;r.key=void 0,r.hasKey=!1,Zc(e,r,i,t,n)}else r.key=t,r.keyPosition=e.position,r.hasKey=!0,r.keyIsMerge=n.tagName===Vc}function $c(e,t,n,r,i){if(t.anchorStart!==Bc){let a={value:n,tag:r,isValueFinal:i};return e.anchors.set(e.source.slice(t.anchorStart,t.anchorEnd),a),a}return null}function el(e,t){let n={...Hc,...t,events:e,documents:[],eventIndex:0,position:0,frames:[],anchors:new Map,nodeTags:new Map,tagHandlers:Object.create(null),totalMergeKeys:0,aliasCount:0};for(;n.eventIndex<n.events.length;){let e=n.events[n.eventIndex++];switch(n.position=Uc(e),e.type){case V.DOCUMENT:n.anchors=new Map,n.nodeTags=new Map,n.aliasCount=0,n.tagHandlers=Object.create(null);for(let t of e.directives)t.kind===`tag`&&(n.tagHandlers[t.handle]=t.prefix);n.frames.push({kind:`document`,position:n.position,value:void 0,hasValue:!1});break;case V.SCALAR:{let{value:t,tag:r}=Gc(n,e);$c(n,e,t,r,!0),Qc(n,t,r);break}case V.SEQUENCE:{let t=Kc(n,e,`tag:yaml.org,2002:seq`),r=n.schema.lookupSequenceTag(t);r||U(n,`unknown sequence tag !<${t}>`);let i=r.create(t),a=$c(n,e,i,r,r.carrierIsResult);n.frames.push({kind:`sequence`,position:n.position,value:i,tag:r,anchor:a,index:0});break}case V.MAPPING:{let t=Kc(n,e,`tag:yaml.org,2002:map`),r=n.schema.lookupMappingTag(t);r||U(n,`unknown mapping tag !<${t}>`);let i=r.create(t),a=$c(n,e,i,r,r.carrierIsResult);n.frames.push({kind:`mapping`,position:n.position,value:i,tag:r,anchor:a,key:void 0,keyPosition:n.position,hasKey:!1,keyIsMerge:!1,overridable:null});break}case V.ALIAS:{n.maxAliases!==-1&&++n.aliasCount>n.maxAliases&&U(n,`aliases exceeded maxAliases (${n.maxAliases})`);let t=n.source.slice(e.anchorStart,e.anchorEnd),r=n.anchors.get(t);r||U(n,`unidentified alias "${t}"`),r.isValueFinal||U(n,`recursive alias "${t}" is not supported for tag ${r.tag.tagName} because it uses finalize()`),Qc(n,r.value,r.tag);break}case V.POP:{let e=n.frames.pop();if(e.kind===`mapping`&&e.hasKey&&(n.position=e.keyPosition,U(n,`incomplete mapping pair in event stream`)),e.kind===`document`)n.documents.push(e.value);else{let t=e.tag.carrierIsResult?e.value:Wc(n,e.position,e.tag,e.value);e.anchor&&(e.anchor.value=t,e.anchor.isValueFinal=!0),Qc(n,t,e.tag)}break}}}return n.documents}var W=-1,tl=Object.prototype.hasOwnProperty,nl=1,rl=2,il=3,al=4,ol=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,sl=/[,\[\]{}]/,cl=/^(?:!|!!|![0-9A-Za-z-]+!)$/,ll=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`,ul=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`,dl=RegExp(`^(?:${ll})*$`),fl=RegExp(`^(?:${ul})+$`),pl=RegExp(`^(?:!(?:${ll})*|${ul}(?:${ll})*)$`),ml={filename:``,maxDepth:100};function hl(e,t,n){e.events.push({type:V.DOCUMENT,explicitStart:t,explicitEnd:n,directives:e.directives})}function gl(e,t,n,r,i,a,o){e.events.push({type:V.SEQUENCE,start:t,anchorStart:n,anchorEnd:r,tagStart:i,tagEnd:a,style:o})}function _l(e,t,n,r,i,a,o){e.events.push({type:V.MAPPING,start:t,anchorStart:n,anchorEnd:r,tagStart:i,tagEnd:a,style:o})}function vl(e,t){e.events.splice(t.eventsLength,0,{type:V.MAPPING,start:t.position,anchorStart:W,anchorEnd:W,tagStart:W,tagEnd:W,style:Sc.FLOW})}function yl(e,t,n,r,i,a,o,s,c=Cc.CLIP,l=-1,u=!1){e.events.push({type:V.SCALAR,valueStart:t,valueEnd:n,anchorStart:r,anchorEnd:i,tagStart:a,tagEnd:o,style:s,chomping:c,indent:l,fast:u})}function bl(e,t,n){e.events.push({type:V.ALIAS,anchorStart:t,anchorEnd:n})}function xl(e){e.events.push({type:V.POP})}function Sl(e){yl(e,W,W,W,W,W,W,H.PLAIN)}function Cl(){return{anchorStart:W,anchorEnd:W,tagStart:W,tagEnd:W}}function wl(e){return{position:e.position,line:e.line,lineStart:e.lineStart,lineIndent:e.lineIndent,firstTabInLine:e.firstTabInLine,eventsLength:e.events.length}}function Tl(e,t){e.position=t.position,e.line=t.line,e.lineStart=t.lineStart,e.lineIndent=t.lineIndent,e.firstTabInLine=t.firstTabInLine,e.events.length=t.eventsLength}function G(e,t){xc.throwAt(e.input.slice(0,e.length),e.position,t,e.filename)}function K(e){return e===10||e===13}function El(e){return e===9||e===32}function Dl(e){return El(e)||K(e)}function Ol(e){return e===0||Dl(e)}function kl(e){return e===44||e===91||e===93||e===123||e===125}function Al(e){return e>=48&&e<=57?e-48:-1}function jl(e){if(e>=48&&e<=57)return e-48;let t=e|32;return t>=97&&t<=102?t-97+10:-1}function Ml(e){return e===120?2:e===117?4:e===85?8:0}function Nl(e){return e===48||e===97||e===98||e===116||e===9||e===110||e===118||e===102||e===114||e===101||e===32||e===34||e===47||e===92||e===78||e===95||e===76||e===80}function Pl(e){e.input.charCodeAt(e.position)===10?e.position++:(e.position++,e.input.charCodeAt(e.position)===10&&e.position++),e.line++,e.lineStart=e.position,e.lineIndent=0,e.firstTabInLine=-1}function Fl(e,t){let n=0,r=e.input.charCodeAt(e.position),i=e.position===e.lineStart||Dl(e.input.charCodeAt(e.position-1));for(;r!==0;){for(;El(r);)i=!0,r===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),r=e.input.charCodeAt(++e.position);if(t&&i&&r===35)do r=e.input.charCodeAt(++e.position);while(!K(r)&&r!==0);if(!K(r))break;for(Pl(e),n++,i=!0,r=e.input.charCodeAt(e.position);r===32;)e.lineIndent++,r=e.input.charCodeAt(++e.position)}return n}function Il(e,t=e.position){let n=e.input.charCodeAt(t);if((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)){let n=e.input.charCodeAt(t+3);return n===0||Dl(n)}return!1}function Ll(e){e.position===e.lineStart&&e.input.charCodeAt(e.position)===65279&&(e.position++,e.lineStart=e.position)}function Rl(e){if(e.position!==e.lineStart)return!1;if(Il(e))return!0;if(e.input.charCodeAt(e.position)!==65279)return!1;let t=wl(e);Ll(e),Fl(e,!0);let n=e.input.charCodeAt(e.position),r=e.position===e.lineStart&&(n===37||n===45&&Il(e));return Tl(e,t),r}function zl(e){let t=e.input.charCodeAt(e.position);for(;t!==0&&!K(t);)t=e.input.charCodeAt(++e.position)}function Bl(e,t,n){ol.test(e.input.slice(t,n))&&G(e,`the stream contains non-printable characters`)}function Vl(e,t,n){if(e.input.charCodeAt(e.position)!==33)return!1;t.tagStart!==W&&G(e,`duplication of a tag property`);let r=e.position,i=!1,a=!1,o=`!`,s=e.input.charCodeAt(++e.position);s===60?(i=!0,s=e.input.charCodeAt(++e.position)):s===33&&(a=!0,o=`!!`,s=e.input.charCodeAt(++e.position));let c=e.position,l;if(i){for(;s!==0&&s!==62;)s=e.input.charCodeAt(++e.position);s!==62&&G(e,`unexpected end of the stream within a verbatim tag`),l=e.input.slice(c,e.position),e.position++}else{for(;s!==0&&!Dl(s)&&!(n&&kl(s));)s===33&&(a?G(e,`tag suffix cannot contain exclamation marks`):(o=e.input.slice(c-1,e.position+1),cl.test(o)||G(e,`named tag handle cannot contain such characters`),a=!0,c=e.position+1)),s=e.input.charCodeAt(++e.position);l=e.input.slice(c,e.position),sl.test(l)&&G(e,`tag suffix cannot contain flow indicator characters`)}return l&&!(i?dl.test(l):fl.test(l))&&G(e,`tag name cannot contain such characters: ${l}`),!i&&o!==`!`&&o!==`!!`&&!tl.call(e.tagHandlers,o)&&G(e,`undeclared tag handle "${o}"`),t.tagStart=r,t.tagEnd=e.position,!0}function Hl(e,t){if(e.input.charCodeAt(e.position)!==38)return!1;t.anchorStart!==W&&G(e,`duplication of an anchor property`),e.position++;let n=e.position;for(;e.input.charCodeAt(e.position)!==0&&!Dl(e.input.charCodeAt(e.position))&&!kl(e.input.charCodeAt(e.position));)e.position++;return e.position===n&&G(e,`name of an anchor node must contain at least one character`),t.anchorStart=n,t.anchorEnd=e.position,!0}function Ul(e,t){if(e.input.charCodeAt(e.position)!==42)return!1;(t.anchorStart!==W||t.tagStart!==W)&&G(e,`alias node should not have any properties`),e.position++;let n=e.position;for(;e.input.charCodeAt(e.position)!==0&&!Dl(e.input.charCodeAt(e.position))&&!kl(e.input.charCodeAt(e.position));)e.position++;return e.position===n&&G(e,`name of an alias node must contain at least one character`),bl(e,n,e.position),!0}function Wl(e,t){Fl(e,!1),e.lineIndent<t&&G(e,`deficient indentation`)}function Gl(e,t,n){if(e.input.charCodeAt(e.position)!==39)return!1;e.position++;let r=e.position,i=!0;for(;e.input.charCodeAt(e.position)!==0;){let a=e.input.charCodeAt(e.position);if(a===39){if(e.input.charCodeAt(e.position+1)===39){i=!1,e.position+=2;continue}let t=e.position;return e.position++,yl(e,r,t,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,H.SINGLE_QUOTED,Cc.CLIP,-1,i),!0}K(a)?(i=!1,Wl(e,t)):e.position===e.lineStart&&Il(e)?G(e,`unexpected end of the document within a single quoted scalar`):a!==9&&a<32?G(e,`expected valid JSON character`):e.position++}G(e,`unexpected end of the stream within a single quoted scalar`)}function Kl(e,t,n){if(e.input.charCodeAt(e.position)!==34)return!1;e.position++;let r=e.position,i=!0;for(;e.input.charCodeAt(e.position)!==0;){let a=e.input.charCodeAt(e.position);if(a===34){let t=e.position;return e.position++,yl(e,r,t,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,H.DOUBLE_QUOTED,Cc.CLIP,-1,i),!0}if(a===92){i=!1;let n=e.input.charCodeAt(++e.position);if(K(n))Wl(e,t);else if(Nl(n))e.position++;else{let t=Ml(n);for(t===0&&G(e,`unknown escape sequence`);t-->0;)e.position++,jl(e.input.charCodeAt(e.position))<0&&G(e,`expected hexadecimal character`);e.position++}}else K(a)?(i=!1,Wl(e,t)):e.position===e.lineStart&&Il(e)?G(e,`unexpected end of the document within a double quoted scalar`):a!==9&&a<32?G(e,`expected valid JSON character`):e.position++}G(e,`unexpected end of the stream within a double quoted scalar`)}function ql(e,t,n){let r=e.input.charCodeAt(e.position),i=Cc.CLIP,a=-1,o=!1;if(r!==124&&r!==62)return!1;let s=r===124?H.LITERAL_BLOCK:H.FOLDED_BLOCK;for(e.position++;e.input.charCodeAt(e.position)!==0;){let n=e.input.charCodeAt(e.position),r=Al(n);if(n===43||n===45)i!==Cc.CLIP&&G(e,`repeat of a chomping mode identifier`),i=n===43?Cc.KEEP:Cc.STRIP,e.position++;else if(r>=0)r===0&&G(e,`bad explicit indentation width of a block scalar; it cannot be less than one`),o&&G(e,`repeat of an indentation width identifier`),a=t+r-1,o=!0,e.position++;else break}let c=!1;for(;El(e.input.charCodeAt(e.position));)c=!0,e.position++;c&&e.input.charCodeAt(e.position)===35&&zl(e),K(e.input.charCodeAt(e.position))?Pl(e):e.input.charCodeAt(e.position)!==0&&G(e,`a line break is expected`);let l=o?a:-1,u=0,d=e.position,f=e.position;for(;e.input.charCodeAt(e.position)!==0;){let n=e.position,r=0;for(;e.input.charCodeAt(n+r)===32;)r++;let i=e.input.charCodeAt(n+r);if(i===0){l>=0?r>l&&(f=n+r):r>0&&(f=n+r);break}if(Rl(e))break;if(!o&&l===-1&&K(i)&&(u=Math.max(u,r)),!o&&l===-1&&!K(i)&&(i===9&&r<t&&(e.position=n+r,G(e,`tab characters must not be used in indentation`)),r<u&&(e.position=n+r,G(e,`bad indentation of a mapping entry`))),l===-1&&i!==0&&!K(i)&&r<t){e.lineIndent=r,e.position=n+r;break}!o&&i!==0&&!K(i)&&l===-1&&(l=r);let a=l===-1?t+1:l;if(i!==0&&!K(i)&&r<a){e.lineIndent=r,e.position=n+r;break}zl(e),f=e.position,K(e.input.charCodeAt(e.position))&&(Pl(e),f=e.position)}return Bl(e,d,f),yl(e,d,f,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,s,i,l),!0}function Jl(e,t){let n=e.input.charCodeAt(e.position),r=t===nl;if(n===0||Dl(n)||n===35||n===38||n===42||n===33||n===124||n===62||n===39||n===34||n===37||n===64||n===96||r&&kl(n))return!1;if(n===63||n===45){let t=e.input.charCodeAt(e.position+1);if(Ol(t)||r&&kl(t))return!1}return!0}function Yl(e,t,n,r){if(!Jl(e,n))return!1;let i=e.position,a=e.position,o=e.input.charCodeAt(e.position),s=n===nl,c=!1;for(;o!==0&&!Rl(e);){if(o===58){let t=e.input.charCodeAt(e.position+1);if(Ol(t)||s&&kl(t))break}else if(o===35){if(Dl(e.input.charCodeAt(e.position-1)))break}else if(s&&kl(o))break;else if(K(o)){let n=e.position,r=e.line,i=e.lineStart,a=e.lineIndent;if(Fl(e,!1),e.lineIndent>=t){c=!0,o=e.input.charCodeAt(e.position);continue}e.position=n,e.line=r,e.lineStart=i,e.lineIndent=a;break}El(o)||(a=e.position+1),o=e.input.charCodeAt(++e.position)}return a!==i&&(Bl(e,i,a),yl(e,i,a,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,H.PLAIN,Cc.CLIP,-1,!c),!0)}function Xl(e,t){let n=e.line;Fl(e,!0),(e.line>n&&e.lineIndent<t||e.firstTabInLine!==-1&&e.lineIndent<t)&&G(e,`deficient indentation`)}function Zl(e,t,n){let r=e.input.charCodeAt(e.position),i=r===123,a=e.position,o=!0;if(r!==91&&r!==123)return!1;let s=i?125:93;for(i?_l(e,a,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,Sc.FLOW):gl(e,a,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,Sc.FLOW),e.position++;e.input.charCodeAt(e.position)!==0;){Xl(e,t);let n=e.input.charCodeAt(e.position);if(n===s)return e.position++,xl(e),!0;o?n===44&&G(e,`expected the node content, but found ','`):G(e,`missed comma between flow collection entries`);let r=!1,a=!1;n===63&&Dl(e.input.charCodeAt(e.position+1))&&(r=a=!0,e.position+=1,Xl(e,t));let c=e.line,l=wl(e),u=eu(e,t,nl,!1,!0);Xl(e,t),n=e.input.charCodeAt(e.position),(i||a||e.line===c)&&n===58?(r=!0,e.position++,Xl(e,t),i||vl(e,l),u||Sl(e),eu(e,t,nl,!1,!0)||Sl(e),Xl(e,t),i||xl(e)):i&&r?(u||Sl(e),Sl(e)):i?Sl(e):r&&(vl(e,l),u||Sl(e),Sl(e),xl(e)),n=e.input.charCodeAt(e.position),n===44?(o=!0,e.position++):o=!1}G(e,`unexpected end of the stream within a flow collection`)}function Ql(e,t,n){if(e.firstTabInLine!==-1||e.input.charCodeAt(e.position)!==45||!Ol(e.input.charCodeAt(e.position+1)))return!1;for(gl(e,e.position,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,Sc.BLOCK);e.input.charCodeAt(e.position)===45&&Ol(e.input.charCodeAt(e.position+1));){e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,G(e,`tab characters must not be used in indentation`));let n=e.line;e.position++;let r=Fl(e,!0)>0;if(e.firstTabInLine!==-1&&e.input.charCodeAt(e.position)===45&&Ol(e.input.charCodeAt(e.position+1))&&G(e,`bad indentation of a sequence entry`),r&&e.lineIndent<=t?Sl(e):eu(e,t,il,!1,!0),Fl(e,!0),e.lineIndent<t||e.position>=e.length)break;e.lineIndent>t&&G(e,`bad indentation of a sequence entry`),e.line===n&&e.input.charCodeAt(e.position)===45&&Ol(e.input.charCodeAt(e.position+1))&&G(e,`bad indentation of a sequence entry`)}return xl(e),!0}function $l(e,t,n,r){let i=!1,a=!1,o=!1,s=!1;if(e.firstTabInLine!==-1)return!1;let c=e.input.charCodeAt(e.position);for(;c!==0;){!i&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,G(e,`tab characters must not be used in indentation`));let l=e.input.charCodeAt(e.position+1),u=e.line;if((c===63||c===58)&&Ol(l))o||=(_l(e,e.position,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,Sc.BLOCK),!0),c===63?(i&&Sl(e),a=!0,i=!0):i?i=!1:(Sl(e),a=!0,i=!1),e.position+=1,s=!0;else{i&&=(Sl(e),!1);let t=wl(e);if(!eu(e,n,rl,!1,!0))break;if(e.line===u){for(c=e.input.charCodeAt(e.position);El(c);)c=e.input.charCodeAt(++e.position);if(c===58){if(c=e.input.charCodeAt(++e.position),Ol(c)||G(e,`a whitespace character is expected after the key-value separator within a block mapping`),!o){for(Tl(e,t),_l(e,t.position,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,Sc.BLOCK),o=!0,eu(e,n,rl,!1,!0),c=e.input.charCodeAt(e.position);El(c);)c=e.input.charCodeAt(++e.position);e.position++}a=!0,i=!1,s=!1}else if(a)G(e,`expected ':' after a mapping key`);else return r.anchorStart!==W||r.tagStart!==W?(Tl(e,t),!1):!0}else if(a)G(e,`can not read a block mapping entry; a multiline key may not be an implicit key`);else return r.anchorStart!==W||r.tagStart!==W?(Tl(e,t),!1):!0}if(eu(e,t,al,!0,s)&&(s=!1),i||(s&&=(Sl(e),!1)),Fl(e,!0),c=e.input.charCodeAt(e.position),(e.line===u||e.lineIndent>t)&&c!==0)G(e,`bad indentation of a mapping entry`);else if(e.lineIndent<t)break}return a?(i&&Sl(e),o&&xl(e),!0):!1}function eu(e,t,n,r,i,a=!0){e.depth>=e.maxDepth&&G(e,`nesting exceeded maxDepth (${e.maxDepth})`),e.depth++;let o=1,s=!1,c=!1,l=null,u=Cl(),d=n===al||n===il,f=d,p=d;if(r&&Fl(e,!0)&&(s=!0,o=e.lineIndent>t?1:e.lineIndent===t?0:-1),o===1)for(;;){let r=e.input.charCodeAt(e.position),i=wl(e);if(s&&o!==1&&(r===33||r===38))break;if(s&&p&&(u.tagStart!==W||u.anchorStart!==W)&&(r===33||r===38)){let n=wl(e),r=t+1;if($l(e,e.position-e.lineStart,r,u)&&e.events[n.eventsLength]?.type===V.MAPPING)return e.depth--,!0;Tl(e,n)}if(s&&(r===33&&u.tagStart!==W||r===38&&u.anchorStart!==W)||!Vl(e,u,n===nl)&&!Hl(e,u))break;l===null&&(l=i),Fl(e,!0)?(s=!0,f=p,o=e.lineIndent>t?1:e.lineIndent===t?0:-1):f=!1}if(f&&=s||i,o===1||n===al){let r=n===nl||n===rl?t:t+1,i=e.position-e.lineStart;if(o===1){if(f&&(Ql(e,i,u)||$l(e,i,r,u))||Zl(e,r,u))c=!0;else{let t=e.input.charCodeAt(e.position);if(l!==null&&a&&p&&!f&&t!==124&&t!==62){let t=wl(e),n=l.position-l.lineStart;Tl(e,l),$l(e,n,r,Cl())&&e.events[t.eventsLength]?.type===V.MAPPING?c=!0:Tl(e,t)}!c&&(d&&ql(e,r,u)||Gl(e,r,u)||Kl(e,r,u)||Ul(e,u)||Yl(e,r,n,u))&&(c=!0)}}else o===0&&(c=f&&Ql(e,i,u))}return d&&=!c,!c&&(u.anchorStart!==W||u.tagStart!==W||d)&&(yl(e,W,W,u.anchorStart,u.anchorEnd,u.tagStart,u.tagEnd,H.PLAIN),c=!0),e.depth--,c||u.anchorStart!==W||u.tagStart!==W}function tu(e){if(e.lineIndent>0||e.input.charCodeAt(e.position)!==37)return!1;e.position++;let t=e.position;for(;e.input.charCodeAt(e.position)!==0&&!Dl(e.input.charCodeAt(e.position));)e.position++;let n=e.input.slice(t,e.position),r=[];for(n.length===0&&G(e,`directive name must not be less than one character in length`);e.input.charCodeAt(e.position)!==0&&!K(e.input.charCodeAt(e.position));){for(;El(e.input.charCodeAt(e.position));)e.position++;if(e.input.charCodeAt(e.position)===35||K(e.input.charCodeAt(e.position))||e.input.charCodeAt(e.position)===0)break;let t=e.position;for(;e.input.charCodeAt(e.position)!==0&&!Dl(e.input.charCodeAt(e.position));)e.position++;r.push(e.input.slice(t,e.position))}if(K(e.input.charCodeAt(e.position))&&Pl(e),n===`YAML`){e.directives.some(e=>e.kind===`yaml`)&&G(e,`duplication of %YAML directive`),r.length!==1&&G(e,`YAML directive accepts exactly one argument`);let t=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);t===null&&G(e,`ill-formed argument of the YAML directive`),parseInt(t[1],10)!==1&&G(e,`unacceptable YAML version of the document`),e.directives.push({kind:`yaml`,version:r[0]})}else if(n===`TAG`){r.length!==2&&G(e,`TAG directive accepts exactly two arguments`);let[t,n]=r;cl.test(t)||G(e,`ill-formed tag handle (first argument) of the TAG directive`),tl.call(e.tagHandlers,t)&&G(e,`there is a previously declared suffix for "${t}" tag handle`),pl.test(n)||G(e,`ill-formed tag prefix (second argument) of the TAG directive`),e.tagHandlers[t]=n,e.directives.push({kind:`tag`,handle:t,prefix:n})}return!0}function nu(e){e.directives=[],e.tagHandlers=Object.create(null);let t=!1;for(Fl(e,!0);tu(e);)t=!0,Fl(e,!0);let n=!1,r=!1,i=!0;if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45&&Ol(e.input.charCodeAt(e.position+3))){n=!0;let t=e.line;e.position+=3,Fl(e,!0),i=e.line>t}else t&&G(e,`directives end mark is expected`);let a=e.events.length;if(!n&&e.position===e.lineStart&&e.input.charCodeAt(e.position)===46&&Il(e)){e.position+=3,Fl(e,!0);return}if(hl(e,n,!1),eu(e,e.lineIndent-1,al,!1,i,i)||Sl(e),Fl(e,!0),e.position===e.lineStart&&Il(e)&&(r=e.input.charCodeAt(e.position)===46,r)){let t=e.line;e.position+=3,Fl(e,!0),e.line===t&&e.position<e.length&&G(e,`end of the stream or a document separator is expected`)}let o=e.events[a];o?.type===V.DOCUMENT&&(o.explicitEnd=r),xl(e),!r&&e.position<e.length&&!Rl(e)&&G(e,`end of the stream or a document separator is expected`)}function ru(e,t){let n=e.length,r={...ml,...t,input:`${e}\0`,length:n,position:0,line:0,lineStart:0,lineIndent:0,firstTabInLine:-1,depth:0,directives:[],tagHandlers:Object.create(null),events:[]},i=e.indexOf(`\0`);for(i!==-1&&xc.throwAt(e,i,`null byte is not allowed in input`,r.filename);r.position<r.length&&(Ll(r),Fl(r,!0),!(r.position>=r.length));){let e=r.position;nu(r),r.position===e&&G(r,`can not read a document`)}return r.events}var iu={...ml,...Hc};function au(e,t={}){let n={...iu,...t},r=String(e),i=Object.keys(ml),a=Object.keys(Hc);return el(ru(r,rc(n,i)),{...rc(n,a),source:r})}function ou(e,t,n){let r=null;typeof t==`function`?r=t:typeof t==`object`&&t&&(n=t);let i=au(e,n);if(r===null)return i;for(let e of i)r(e)}function su(e,t){return!!(e&1<<t)}var cu={applyQuoteFlowKeysOption:uu,doubleQuoteForInvisibles:du,doubleQuoteWhitespaceOnly:fu,applyForceQuotesOption:pu,tryLongOrMultilineAsBlock:mu,quoteInvalidPlain:hu,fallbackToDoubleQuoted:gu};function lu(e){return e.presenterOptions.quoteStyle===`single`&&su(e.allowedStylesMask,H.SINGLE_QUOTED)?H.SINGLE_QUOTED:H.DOUBLE_QUOTED}function uu(e){e.presenterOptions.quoteFlowKeys&&e.isKey&&e.flowOnly&&e.style===H.PLAIN&&(e.style=H.DOUBLE_QUOTED)}function du(e){e.style===H.PLAIN&&/[\t\x7F-\xA0\u2028\u2029\uFEFF\uFFFE\uFFFF]/.test(e.node.value)&&(e.style=H.DOUBLE_QUOTED)}function fu(e){e.style===H.PLAIN&&/^\s+$/.test(e.node.value)&&(e.style=H.DOUBLE_QUOTED)}function pu(e){e.presenterOptions.forceQuotes&&(e.isKey||e.style!==H.PLAIN||e.node.tag===e.presenterOptions.schema.defaultScalarTag.tagName&&(e.style=e.node.value.includes(`
69
+ `)?H.DOUBLE_QUOTED:lu(e)))}function mu(e){if(e.style!==H.PLAIN||e.isKey)return;let t=e.node.value,n=t.indexOf(`
70
+ `)!==-1;if(!su(e.allowedStylesMask,H.LITERAL_BLOCK)){n&&(e.style=H.DOUBLE_QUOTED);return}let r=e.presenterOptions.lineWidth;if(r===-1){n&&(e.style=H.LITERAL_BLOCK);return}let i=Math.max(Math.min(r,40),r-e.shiftOfContent),a=0,o=!1;for(;a<=t.length;){let e=t.length,n=t.indexOf(`
71
+ `,a);n!==-1&&(e=n);let r=t.slice(a,e);if(r.length>i&&r[0]!==` `&&/ [^ \t]/.test(r)&&(o=!0),n===-1)break;a=n+1}o?e.style=H.FOLDED_BLOCK:n&&(e.style=H.LITERAL_BLOCK)}function hu(e){e.style===H.PLAIN&&!su(e.allowedStylesMask,H.PLAIN)&&(e.style=lu(e))}function gu(e){su(e.allowedStylesMask,e.style)||(e.style=H.DOUBLE_QUOTED)}var _u=`[\\x09\\x0A\\x0D\\x20-\\x7E\\x85\\xA0-\\uD7FF\\uE000-\\uFFFD\\u{10000}-\\u{10FFFF}]`,vu=`[\\n\\r]`,yu=`\\uFEFF`,bu=`[ \\t]`,xu=`(?:(?!(?:${vu}|${yu}))${_u})`,Su=`(?:(?!${bu})${xu})`,Cu=`[\\x09\\x20-\\uD7FF\\uE000-\\uFFFF\\u{10000}-\\u{10FFFF}]`,wu=`[-?:,\\[\\]{}#&*!|>'"%@\`]`,Tu=`[,\\[\\]{}]`,Eu=Su,Du=`(?:(?!${Tu})${Su})`,Ou=`(?:(?:(?!${wu})${Su})|[?:-](?=${Eu}))`,ku=`(?:(?:(?!${wu})${Su})|[?:-](?=${Du}))`,Au=`(?:(?:(?![:#])${Eu})|:(?=${Eu}))#*`,ju=`(?:(?:(?![:#])${Du})|:(?=${Du}))#*`,Mu=`(?:${bu}*${Au})*`,Nu=`(?:${bu}*${ju})*`,Pu=`${Ou}#*${Mu}`,Fu=`${ku}#*${Nu}`,Iu=Pu,Lu=Fu,Ru=`\\n+${Au}${Mu}`,zu=`\\n+${ju}${Nu}`,Bu=`${Pu}(?:${Ru})*`,Vu=`${Fu}(?:${zu})*`;RegExp(`^(?:${Bu})$`,`u`),RegExp(`^(?:${Vu})$`,`u`),RegExp(`^(?:${Iu})$`,`u`),RegExp(`^(?:${Lu})$`,`u`),RegExp(`^(?:${Cu})*$`,`u`),RegExp(`^(?:${Cu}|\\n)*$`,`u`),RegExp(`^(?:${xu}|\\n)*$`,`u`),Object.keys(cu).map(e=>Reflect.get(cu,e)),V.DOCUMENT,V.SEQUENCE,V.MAPPING,V.SCALAR,V.ALIAS,V.POP,H.PLAIN,H.SINGLE_QUOTED,H.DOUBLE_QUOTED,H.LITERAL_BLOCK,H.FOLDED_BLOCK,Sc.BLOCK,Sc.FLOW,Cc.CLIP,Cc.STRIP,Cc.KEEP;function Hu(e){let t=ou(e,{schema:pc});if(t.length>1)throw new xc(`expected a single document in the stream, but found more`);return t[0]}var Uu=[`javascript:`,`data:text/html`,`vbscript:`,`data:text/javascript`,`data:text/vbscript`,`data:text/css`,`data:text/plain`,`data:text/xml`],Wu={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`,colon:`:`,sol:`/`,bsol:`\\`,Tab:` `,NewLine:`
72
+ `};function Gu(e){let t=e;for(let e=0;e<10;e++){let e=t.replace(/&#x([0-9a-f]+);?/gi,(e,t)=>{let n=Number.parseInt(t,16);return n<=1114111?String.fromCodePoint(n):e}).replace(/&#(\d+);?/g,(e,t)=>{let n=Number.parseInt(t,10);return n<=1114111?String.fromCodePoint(n):e}).replace(/&([a-z]+);?/gi,(e,t)=>Wu[t]??e);if(e===t)break;t=e}return t}function Ku(e){let t=e;try{t=decodeURIComponent(e)}catch{}let n=Gu(t),r;try{r=new URL(n)}catch{return!1}return Uu.some(e=>r.href.toLowerCase().startsWith(e))}var qu=new Set([`innerhtml`,`dangerouslysetinnerhtml`,`textcontent`]);function Ju(e,t,n={}){let r={};for(let i in e){if(i===`$`)continue;let a=e[i],o=i.charCodeAt(0)===58,s=o?i.slice(1):i;if(qu.has(s.toLowerCase()))continue;let c,l=i;if(n.parseJson&&o){if(typeof a==`string`)try{c=JSON.parse(a)}catch{c=nd(t,a)}else c=a;l=s}else if(o&&typeof a==`string`){let e=nd(t,a);e===void 0?c=a:(c=e,l=s)}else c=a;let u=s.toLowerCase();(!o||u!==`href`&&u!==`src`&&u!==`xlink:href`||typeof c!=`string`||!Ku(c))&&(r[l]=c)}return r}function Yu(e){return!!e&&typeof e==`object`&&Array.isArray(e.nodes)}function Xu(e,t={}){if(typeof e==`string`)return t.decodeUnicodeEntities?Zo(e):e;let n=``,r=e.length;for(let i=2;i<r;i++)n+=Xu(e[i],t);return n}function*Zu(e,t){function*n(e,r,i){let a=e;if(t(e)){let t=yield e;if(t===!1)return r.splice(i,1),!0;t!==void 0&&(r[i]=t,a=t)}if(Array.isArray(a)&&a.length>2){let e=2;for(;e<a.length;)(yield*n(a[e],a,e))||(e+=1)}return!1}let r=0;for(;r<e.nodes.length;)(yield*n(e.nodes[r],e.nodes,r))||(r+=1)}function Qu(e,t,n){let r=Zu(e,t),i=r.next();for(;!i.done;){let e=n(i.value);i=r.next(e)}}function $u(e){return e?td(e).map(e=>e?e[0].toUpperCase()+e.slice(1):``).join(``):``}function ed(e){return e?td(e).map(e=>e.toLowerCase()).join(`-`):``}function td(e){let t=[];if(!e)return t;let n=``,r,i;for(let a=0;a<e.length;a++){let o=e[a],s=o===`-`||o===`_`||o===`/`||o===`.`;if(s===!0){t.push(n),n=``,r=void 0;continue}let c=o.charCodeAt(0),l=c>=48&&c<=57?void 0:c>=65&&c<=90;if(i===!1){if(r===!1&&l===!0){t.push(n),n=o,r=l;continue}if(r===!0&&l===!1&&n.length>1){let e=n[n.length-1];t.push(n.slice(0,n.length-1)),n=e+o,r=l;continue}}n+=o,r=l,i=s}return t.push(n),t}function nd(e,t){let n=t.split(`.`),r=e;for(let e of n)if(r&&typeof r==`object`&&e in r)r=r[e];else return;return r}var rd={"[":`]`,"{":`}`,"(":`)`},id={"'":`'`,'"':`"`,"`":"`"};function ad(e,t=0){if(e[t]!==`{`)throw Error(`Invalid props, expected \`{\` but got '${e[t]}'`);let n=[];if(e[t+1]===`{`)return;for(t+=1;t<e.length;)if(e[t]===`\\`)t+=2;else if(e[t]===`}`){t+=1;break}else if(e[t]===` `)t+=1;else if(e[t]===`.`)t+=1,n.push([`class`,r(` #.}`)]);else if(e[t]===`#`)t+=1,n.push([`id`,r(` #.}`)]);else{let r=t;for(;t<e.length&&(t+=1,!` }=`.includes(e[t])););let a=e[t];if(r!==t){let o=e.slice(r,t).trim(),s=``;a===`=`?(t+=1,s=i()):(o=o[0]===`:`?o:`:${o}`,s=`true`),o.match(/^:?[a-z_][a-z0-9_-]*$/gi)&&n.push([o,s])}}function r(n){let r=t;for(;t<e.length&&(t+=1,e[t]===`\\`&&(t+=2),!n.includes(e[t])););return e.slice(r,t)}function i(){let n=t;return e[t]in rd?(a(rd[e[t]]),t+=1,e.slice(n,t)):e[t]in id?(o(id[e[t]]),t+=1,e.slice(n,t)):r(` }`)}function a(n){for(;t<e.length;)if(t++,e[t]in id)o(id[e[t]]);else if(e[t]in rd)a(rd[e[t]]);else if(e[t]===n)return}function o(e){return r(e)}return n.forEach(e=>{/^(['"`]).*\1$/.test(e[1])&&(e[1]=e[1].slice(1,-1))}),{props:n,index:t}}var od=/^[a-z$][$\w.-]*/i;function sd(e){if(e=e.trim(),!e)return{name:``};let t=e.match(od)?.[0];if(!t)throw Error(`Invalid block params: ${e}`);let n=e.slice(t.length).trim(),r,i,a;if(n.startsWith(`[`)){let e=wo(n,0);e&&(r=e.content,n=n.slice(e.endIndex).trim())}if(n.startsWith(`{`)){let e=ad(n,0);if(e){i=e.props;let t=n.slice(e.index).trim();t&&(a=t)}}else n&&(a=n);let o={name:ed(t)};return r!==void 0&&(o.content=r),i!==void 0&&(o.props=i),a&&(o.remaining=a),o}function cd(e,t,n){let r=e.bMarks[t],i=e.eMarks[t],a=r,o=0;for(;a<i&&o<n;){let r=e.src.charCodeAt(a);if(r===32)o++;else if(r===9){let r=4-(o+e.bsCount[t])%4;if(o+r>n)return!1;o+=r}else break;a++}return o>0&&(e.bMarks[t]=a,e.bsCount[t]+=o,e.sCount[t]-=o,e.tShift[t]-=a-r),!0}function ld(e,t,n,r){let i=[],a=[],o=[],s=[];for(let c=t;c<n;c++)if(i.push(e.bMarks[c]),a.push(e.bsCount[c]),o.push(e.sCount[c]),s.push(e.tShift[c]),!cd(e,c,r[c-t]))return ud(e,t,i,a,o,s),!1;let c=e.blkIndent;return e.blkIndent=0,e.md.block.tokenize(e,t,n),e.blkIndent=c,ud(e,t,i,a,o,s),!0}function ud(e,t,n,r,i,a){for(let o=0;o<n.length;o++){let s=t+o;e.bMarks[s]=n[o],e.bsCount[s]=r[o],e.sCount[s]=i[o],e.tShift[s]=a[o]}}var dd=/^[a-z$][\w$-]*/i;function fd(e){return dd.test(e)}var pd={"---":`---`,"```yaml [props]":"```","~~~yaml [props]":`~~~`,"```yml [props]":"```","~~~yml [props]":`~~~`},md=e=>{e.block.ruler.before(`fence`,`comark_block_shorthand`,function(e,t,n,r){let i=e.src.slice(e.bMarks[t]+e.tShift[t],e.eMarks[t]);if(i[0]!==`:`||!fd(i.slice(1)))return!1;let{name:a,content:o,props:s,remaining:c}=sd(i.slice(1));if(c)return!1;if(!r){if(o!==void 0){let n=e.push(`mdc_block_shorthand`,a,1);s?.forEach(([e,t])=>{e===`class`?n.attrJoin(e,t):n.attrSet(e,t)}),n.map=[t,t+1];let r=e.push(`inline`,``,0);r.content=o,r.children=[];let i=e.push(`mdc_block_shorthand`,a,-1);i.map=[t,t+1]}else{let n=e.push(`mdc_block_shorthand`,a,0);n.map=[t,t+1],s?.forEach(([e,t])=>{e===`class`?n.attrJoin(e,t):n.attrSet(e,t)})}}return e.line=t+1,!0}),e.block.ruler.before(`fence`,`comark_block`,function(e,t,n,r){let i,a,o=!1,s=e.bMarks[t]+e.tShift[t],c=e.eMarks[t],l=e.sCount[t],u=!1,d=0,f=0,p=0;if(e.src[s]!==`:`)return!1;for(i=s+1;i<=c&&e.src[i]===`:`;i++);let m=Math.floor(i-s);if(m<2)return!1;let h=e.src.slice(s,i),g=e.skipSpaces(i);if(g<c&&!fd(e.src.slice(g,c)))return!1;let _=sd(e.src.slice(i,c));if(!_.name)return!1;if(r)return!0;let v=[],y=0,b=!1;for(a=t;a++,!(a>=n||(s=e.bMarks[a]+e.tShift[a],c=e.eMarks[a],s<c&&e.sCount[a]<e.blkIndent));){let t=s>=c?l:e.sCount[a];t<l&&(b=!0),v.push(s>=c?0:u?y:Math.min(l,t));let n=e.src.charCodeAt(s);if(u){if(n===d){let t=s+1;for(;t<c&&e.src.charCodeAt(t)===d;)t++;t-s>=f&&e.skipSpaces(t)>=c&&(u=!1)}continue}if(n===96||n===126){let t=s+1;for(;t<c&&e.src.charCodeAt(t)===n;)t++;if(t-s>=3){u=!0,d=n,f=t-s,y=v[v.length-1];continue}}if(n===58){for(i=s+1;i<=c&&e.src[i]===`:`;i++);if(i-s===m){if(i=e.skipSpaces(i),i<c){p++;continue}if(p>0){p--;continue}o=!0;break}}}let x=e.parentType,S=e.lineMax;e.parentType=`comark_block`,e.lineMax=a;let C=e.push(`mdc_block_open`,_.name,1);if(C.markup=h,C.block=!0,C.info=_.name,C.map=[t,a],_.props?.forEach(([e,t])=>{e===`class`?C.attrJoin(e,t):C.attrSet(e,t)}),_.content!==void 0){let n=e.push(`paragraph_open`,`p`,1);n.map=[t,t+1];let r=e.push(`inline`,``,0);r.content=_.content,r.children=[],e.push(`paragraph_close`,`p`,-1)}if(e.env.comarkBlockTokens||=[],e.env.comarkBlockTokens.unshift(C),!b||!ld(e,t+1,a,v)){let n=e.blkIndent;e.blkIndent=l,e.md.block.tokenize(e,t+1,a),e.blkIndent=n}e.env.comarkBlockTokens.shift();let w=e.push(`mdc_block_close`,_.name,-1);return w.map=[t,a],w.markup=e.src.slice(s,i),w.block=!0,e.tokens.slice(e.tokens.indexOf(C)+1,e.tokens.indexOf(w)).filter(e=>e.level===C.level+1).forEach((e,t,n)=>{n.length<=2&&e.tag===`p`&&(e.hidden=!0)}),e.parentType=x,e.lineMax=S,e.line=a+ +!!o,!0},{alt:[`paragraph`,`reference`,`blockquote`,`list`]}),e.block.ruler.after(`code`,`comark_block_yaml`,function(e,t,n,r){if(!e.env.comarkBlockTokens?.length)return!1;let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],o=e.src.slice(i,a),s=pd[o]||``;if(!s)return!1;if(o===`---`){let n=e.env.comarkBlockTokens[0].map?.[0];if(n===void 0||t!==n+1)return!1}let c=t+1,l=!1;for(;c<n;){if(e.src.slice(e.bMarks[c]+e.tShift[t],e.eMarks[c])===s){l=!0;break}c+=1}if(!l)return!1;if(!r){let n=Hu(e.getLines(t+1,c,e.blkIndent,!1)),r=e.env.comarkBlockTokens[0];Object.entries(n||{}).forEach(([e,t])=>{if(e===`class`){r.attrJoin(e,t);return}typeof t==`string`?r.attrSet(e,t):r.attrSet(`:${e}`,JSON.stringify(t))})}return e.line=c+1,!0}),e.block.ruler.after(`code`,`comark_block_slots`,function(e,t,n,r){if(!e.env.comarkBlockTokens?.length)return!1;let i=e.bMarks[t]+e.tShift[t];if(e.src[i]!==`#`||e.src[i+1]===` `||e.src[i+1]===`#`)return!1;let{name:a,props:o}=sd(e.src.slice(i,e.eMarks[t]).slice(1)),s=t+1,c=!1,l=``,u=0;for(;s<n;){let n=e.src.slice(e.bMarks[s]+e.tShift[t],e.eMarks[s]);if(c){if(n[0]===l){let e=1;for(;e<n.length&&n[e]===l;)e++;e>=u&&n.slice(e).trim()===``&&(c=!1)}s+=1;continue}if(n[0]==="`"||n[0]===`~`){let e=n[0],t=1;for(;t<n.length&&n[t]===e;)t++;if(t>=3){c=!0,l=e,u=t,s+=1;continue}}if(/^#\w+/.test(n)||n.startsWith(`::`))break;s+=1}if(r)return e.line=s,!0;let d=e.lineMax,f=e.push(`mdc_block_slot`,`template`,1);return f.attrSet(`#${a}`,``),o?.forEach(([e,t])=>{e===`class`?f.attrJoin(e,t):f.attrSet(e,t)}),e.line=t+1,e.lineMax=s,e.md.block.tokenize(e,t+1,s),e.push(`mdc_block_slot`,`template`,-1),e.line=s,e.lineMax=d,!0})},hd=new Set([` `,` `,`
73
+ `,`*`,`_`,`[`]),gd=e=>{e.inline.ruler.after(`entity`,`comark_inline_component`,(e,t)=>{let n=e.pos;if(e.src[n]!==`:`)return!1;let r=e.src[n-1];if(n>0&&!hd.has(r))return!1;let i=n+1,a=-1,o=-1,s=-1;for(;i<e.src.length;){let t=e.src[i];if(t===`[`){a=i;let t=wo(e.src,i);t&&(o=i+1,s=t.endIndex-1,i=t.endIndex);break}if(!/[\w$-]/.test(t))break;i+=1}if(a===-1&&(a=i),a<=n+1)return!1;let c=e.src.slice(n+1,a);if(!fd(c))return!1;if(e.pos=i,t)return!0;if(o!==-1){e.push(`mdc_inline_component`,c,1);let t=e.pos,n=e.posMax;e.pos=o,e.posMax=s,e.md.inline.tokenize(e),e.pos=t,e.posMax=n,e.push(`mdc_inline_component`,c,-1)}else e.push(`mdc_inline_component`,c,0);return!0})},_d=e=>{e.inline.ruler.before(`link`,`comark_inline_span`,(e,t)=>{let n=e.pos;if(e.src[n]!==`[`)return!1;let r=Co(e.src,n),i=r===-1?e.src.length:r,a=e.src[i+1];if(a===`(`||a===`[`||e.linkLevel>0&&a!==`{`||t)return!1;e.push(`mdc_inline_span`,`span`,1);let o=e.pos,s=e.posMax;return e.pos=n+1,e.posMax=i,e.md.inline.tokenize(e),e.pos=o,e.posMax=s,e.push(`mdc_inline_span`,`span`,-1),e.pos=i+1,!0})},vd=e=>{e.use(md),e.use(_d),e.use(gd)},yd=So(()=>({name:`components`,markdownItPlugins:[vd]})),bd=e=>{e.inline.ruler.after(`entity`,`comark_inline_props`,(e,t)=>{let n=e.pos;if(e.src[n]!==`{`||e.src[n+1]===`{`||e.src[n-1]===`{`||e.src[n-1]===`$`)return!1;let r=ad(e.src,n);if(!r)return!1;let{props:i,index:a}=r;if(a===n)return!1;if(e.pos=a,t)return!0;let o=e.push(`mdc_inline_props`,`span`,0);return o.attrs=i,o.hidden=!0,!0}),e.renderer.rules.mdc_inline_props=()=>``;let t=e.parse;e.parse=function(e,n){let r=t.call(this,e,n);return r.forEach((e,t)=>{let n=r[t-1],i=r[t+1];if(!n||![`heading_open`,`paragraph_open`,`list_item_open`].includes(n.type)||n.hidden||(e.hidden&&i?.type===`inline`&&(e=i),e.type!==`inline`||!e.children?.length))return;let a=e.children[e.children.length-1];if(a.type!==`mdc_inline_props`)return;let o=e.children.length-2;for(;o>=0;){let t=e.children[o];if(t.type===`text`&&!t.content){o--;continue}break}let s=o>=0?e.children[o]:void 0;if(!s||s.type!==`text`)return;typeof s.content==`string`&&(s.content=s.content.replace(/[ \t]+$/,``));let c=a.attrs;e.children.length=s.content?o+1:o,c?.forEach(([e,t])=>{e===`class`?n.attrJoin(`class`,t):n.attrSet(e,t)})}),r},e.renderer.renderInline=xd(e.renderer.renderInline),`renderInlineAsync`in e.renderer&&(e.renderer.renderInlineAsync=xd(e.renderer.renderInlineAsync))};function xd(e){return function(t,n,r){return t=[...t],t.forEach((e,n)=>{if(e.type!==`mdc_inline_props`)return;let r=n-1,i=t[r];for(;r>=0&&i.type===`text`&&!i.content.trim();)r--,i=t[r];if(!i.tag&&i.type===`text`){i=new gi(`mdc_inline_span`,`span`,1),t.splice(n-1,0,i);let e=new gi(`mdc_inline_span`,`span`,-1);t.splice(n+2,0,e)}else if(i.nesting===-1){let e=n-1;for(;e>=0;){let n=t[e];if(n.nesting===1&&n.tag===i.tag&&n.level===i.level){i=n;break}e--}}if(i.nesting===-1)throw Error(`No matching opening tag found for ${JSON.stringify(i)}`);e.attrs?.forEach(([e,t])=>{e===`class`?i.attrJoin(`class`,t):i.attrSet(e,t)})}),e.call(this,t,n,r)}}var Sd=bd,Cd=So(()=>({name:`attributes`,markdownItPlugins:[Sd]}));function wd(e,t,n){let r=e.attrIndex(t),i=[t,n];r<0?(e.attrs||=[],e.attrs.push(i)):e.attrs[r]=i}function Td(e,t){let n=!(t?.enabled??!1);e.core.ruler.before(`inline`,`task-lists-mdc`,e=>{let t=e.tokens,n=[],r=[],i=[];for(let e=0;e<t.length;e++){let a=t[e];if(a.type===`bullet_list_open`||a.type===`ordered_list_open`){i.push(e);continue}if(a.type===`bullet_list_close`||a.type===`ordered_list_close`){i.pop();continue}if(a.type===`list_item_open`){n.push(e),r.push(i.length>0?i[i.length-1]:-1);continue}if(a.type===`list_item_close`){n.pop(),r.pop();continue}if(a.type===`inline`&&a.content&&n.length>0){let e=a.content.match(/^(\[[ x]\])\s+/i);if(e){let i=e[1].toLowerCase()===`[x]`;wd(t[n[n.length-1]],`class`,`task-list-item`);let o=r[r.length-1];o>=0&&wd(t[o],`class`,`contains-task-list`);let s=`TASK_CHECKBOX_${i?`CHECKED`:`UNCHECKED`} `;a.content=a.content.replace(/^\[[ x]\]\s+/i,s)}}}}),e.core.ruler.after(`inline`,`task-lists-mdc-post`,e=>{let t=e.tokens;for(let r=0;r<t.length;r++){let i=t[r];if(i.type===`inline`&&i.children)for(let t=0;t<i.children.length;t++){let r=i.children[t];if(r.type===`text`&&r.content){let a=r.content.match(/^TASK_CHECKBOX_CHECKED/),o=r.content.match(/^TASK_CHECKBOX_UNCHECKED/);if(a||o){let o=!!a,s=new e.Token(`mdc_inline_component`,`input`,0);s.attrs=[[`class`,`task-list-item-checkbox`],[`type`,`checkbox`]],n&&s.attrs.push([`:disabled`,`true`]),o&&s.attrs.push([`:checked`,`true`]),r.content=r.content.replace(/^TASK_CHECKBOX_(CHECKED|UNCHECKED)/,``),i.children.splice(t,0,s),t++}}}}})}var Ed=So(()=>({name:`task-list`,markdownItPlugins:[Td]})),Dd={"!TIP":{type:`tip`,title:`Tip`,color:`#238636`},"!NOTE":{type:`note`,title:`Note`,color:`#1f6feb`},"!IMPORTANT":{type:`important`,title:`Important`,color:`#8957e5`},"!WARNING":{type:`warning`,title:`Warning`,color:`#9e6a03`},"!CAUTION":{type:`caution`,title:`Caution`,color:`#da3633`}},Od=So(()=>({name:`alert`,post(e){Qu(e.tree,e=>Array.isArray(e)&&e[0]===`blockquote`,e=>{let t=e;if(e[2]?.[0]===`span`){let n=Dd[String(e[2][2]).toUpperCase()];n&&(typeof e[3]==`string`&&(t[3]=String(t[3]).trimStart()),t.splice(2,1),t[1].as=n.type)}else if(e[2]?.[0]===`p`){let n=e[2];if(n[2]?.[0]===`span`){let e=Dd[String(n[2][2]).toUpperCase()];e&&(typeof n[3]==`string`&&(n[3]=String(n[3]).trimStart()),n.splice(2,1),t[1].as=e.type)}}})}})),kd=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Ad=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,jd=`<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>`,Md=RegExp(`^(?:${Ad}|${jd}|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<\\?[\\s\\S]*?\\?>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`),Nd=RegExp(`^(?:${Ad}|${jd})`),Pd=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[RegExp(`^</?(${kd.join(`|`)})(?=(\\s|/?>|$))`,`i`),/^$/,!0],[RegExp(`${Nd.source}\\s*$`),/^$/,!1]];function Fd(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==60)return!1;let o=e.src.slice(i,a),s=0;for(;s<Pd.length&&!Pd[s][0].test(o);s++);if(s===Pd.length)return!1;if(r)return Pd[s][2];let c=t+1;if(!Pd[s][1].test(o)){for(;c<n&&!(e.sCount[c]<e.blkIndent);c++)if(i=e.bMarks[c]+e.tShift[c],a=e.eMarks[c],o=e.src.slice(i,a),Pd[s][1].test(o)){o.length!==0&&c++;break}}e.line=c;let l=e.push(`html_block`,``,1);return l.map=[t,c],l.content=e.getLines(t,c,e.blkIndent,!0),!0}function Id(e){return/^<a[>\s]/i.test(e)}function Ld(e){return/^<\/a\s*>/i.test(e)}function Rd(e){let t=e|32;return t>=97&&t<=122}function zd(e,t){let n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!Rd(i))return!1;let a=e.src.slice(r).match(Md);if(!a)return!1;if(!t){let t=e.push(`html_inline`,``,0);t.content=a[0],Id(t.content)&&e.linkLevel++,Ld(t.content)&&e.linkLevel--}return e.pos+=a[0].length,!0}function Bd(e){e.set({html:!0}),e.inline.ruler.before(`text`,`comark_html_inline`,zd),e.block.ruler.before(`html_block`,`comark_html_block`,Fd,{alt:[`paragraph`,`reference`,`blockquote`]})}var Vd=So(()=>({name:`html`,markdownItPlugins:[Bd]})),Hd=`---`,Ud=`\r`;function Wd(e){let t={},n=``;if(e.startsWith(Hd)){let r=e.indexOf(`
74
+ ---`);if(r!==-1){let i=e[r-1]===Ud;n=e.slice(4,r-+!!i),n&&(t=Hu(n)??{},e=e.slice(r+4+ +!!i))}}return{content:e,data:t,frontmatterText:n}}var Gd=So(()=>({name:`frontmatter`,pre(e){let{content:t,data:n,frontmatterText:r}=Wd(e.markdown);e.markdown=t,e.frontmatter=n,e.frontmatterText=r,t&&r&&(e.parsedLines=(e.parsedLines??0)+r.split(`
75
+ `).length+1)}}));function Kd(e){return e?e===!0?[`p`]:typeof e==`string`?e.split(/[,\s]/).map(e=>e.trim()).filter(Boolean):e.filter(Boolean):[]}function qd(e){return Array.isArray(e)&&typeof e[0]==`string`}function Jd(e,t){return qd(e)&&(t===`*`||e[0]===t)}function Yd(e,t){if(t.length===0)return e;let[n,...r]=t,i=[];for(let t of e){let e=Jd(t,n)?t.slice(2):[t];for(let t of Yd(e,r))i.push(t)}return i.filter(e=>typeof e!=`string`||e.trim()!==``)}function Xd(e,t){if(t.length===0)return e;let n=Yd(e,t),r=[];for(let e of n)typeof e==`string`&&typeof r[r.length-1]==`string`?r[r.length-1]=r[r.length-1]+e:r.push(e);return r}var q;(function(e){e[e.Tab=9]=`Tab`,e[e.NewLine=10]=`NewLine`,e[e.FormFeed=12]=`FormFeed`,e[e.CarriageReturn=13]=`CarriageReturn`,e[e.Space=32]=`Space`,e[e.ExclamationMark=33]=`ExclamationMark`,e[e.Number=35]=`Number`,e[e.Amp=38]=`Amp`,e[e.SingleQuote=39]=`SingleQuote`,e[e.DoubleQuote=34]=`DoubleQuote`,e[e.Dash=45]=`Dash`,e[e.Slash=47]=`Slash`,e[e.Zero=48]=`Zero`,e[e.Nine=57]=`Nine`,e[e.Semi=59]=`Semi`,e[e.Lt=60]=`Lt`,e[e.Eq=61]=`Eq`,e[e.Gt=62]=`Gt`,e[e.Questionmark=63]=`Questionmark`,e[e.UpperA=65]=`UpperA`,e[e.LowerA=97]=`LowerA`,e[e.UpperF=70]=`UpperF`,e[e.LowerF=102]=`LowerF`,e[e.UpperZ=90]=`UpperZ`,e[e.LowerZ=122]=`LowerZ`,e[e.LowerX=120]=`LowerX`,e[e.OpeningSquareBracket=91]=`OpeningSquareBracket`})(q||={});var J;(function(e){e[e.Text=1]=`Text`,e[e.BeforeTagName=2]=`BeforeTagName`,e[e.InTagName=3]=`InTagName`,e[e.InSelfClosingTag=4]=`InSelfClosingTag`,e[e.BeforeClosingTagName=5]=`BeforeClosingTagName`,e[e.InClosingTagName=6]=`InClosingTagName`,e[e.AfterClosingTagName=7]=`AfterClosingTagName`,e[e.BeforeAttributeName=8]=`BeforeAttributeName`,e[e.InAttributeName=9]=`InAttributeName`,e[e.AfterAttributeName=10]=`AfterAttributeName`,e[e.BeforeAttributeValue=11]=`BeforeAttributeValue`,e[e.InAttributeValueDq=12]=`InAttributeValueDq`,e[e.InAttributeValueSq=13]=`InAttributeValueSq`,e[e.InAttributeValueNq=14]=`InAttributeValueNq`,e[e.BeforeDeclaration=15]=`BeforeDeclaration`,e[e.InDeclaration=16]=`InDeclaration`,e[e.InProcessingInstruction=17]=`InProcessingInstruction`,e[e.BeforeComment=18]=`BeforeComment`,e[e.CDATASequence=19]=`CDATASequence`,e[e.DeclarationSequence=20]=`DeclarationSequence`,e[e.InSpecialComment=21]=`InSpecialComment`,e[e.InCommentLike=22]=`InCommentLike`,e[e.SpecialStartSequence=23]=`SpecialStartSequence`,e[e.InSpecialTag=24]=`InSpecialTag`,e[e.InPlainText=25]=`InPlainText`,e[e.InEntity=26]=`InEntity`})(J||={});function Zd(e){return e===q.Space||e===q.NewLine||e===q.Tab||e===q.FormFeed||e===q.CarriageReturn}function Qd(e){return e===q.Slash||e===q.Gt||Zd(e)}function $d(e){return e>=q.LowerA&&e<=q.LowerZ||e>=q.UpperA&&e<=q.UpperZ}var ef;(function(e){e[e.NoValue=0]=`NoValue`,e[e.Unquoted=1]=`Unquoted`,e[e.Single=2]=`Single`,e[e.Double=3]=`Double`})(ef||={});var Y={Empty:new Uint8Array,Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,33,62]),Doctype:new Uint8Array([100,111,99,116,121,112,101]),IframeEnd:new Uint8Array([60,47,105,102,114,97,109,101]),NoembedEnd:new Uint8Array([60,47,110,111,101,109,98,101,100]),NoframesEnd:new Uint8Array([60,47,110,111,102,114,97,109,101,115]),Plaintext:new Uint8Array([60,47,112,108,97,105,110,116,101,120,116]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97]),XmpEnd:new Uint8Array([60,47,120,109,112])},tf=new Map([[Y.IframeEnd[2],Y.IframeEnd],[Y.NoembedEnd[2],Y.NoembedEnd],[Y.Plaintext[2],Y.Plaintext],[Y.ScriptEnd[2],Y.ScriptEnd],[Y.TitleEnd[2],Y.TitleEnd],[Y.XmpEnd[2],Y.XmpEnd]]),nf=class{cbs;state=J.Text;buffer=``;sectionStart=0;index=0;entityStart=0;baseState=J.Text;isSpecial=!1;running=!0;offset=0;xmlMode;decodeEntities;recognizeSelfClosing;entityDecoder;constructor({xmlMode:e=!1,decodeEntities:t=!0,recognizeSelfClosing:n=e},r){this.cbs=r,this.xmlMode=e,this.decodeEntities=t,this.recognizeSelfClosing=n,this.entityDecoder=new Ko(e?No:Mo,(e,t)=>this.emitCodePoint(e,t))}reset(){this.state=J.Text,this.buffer=``,this.sectionStart=0,this.index=0,this.baseState=J.Text,this.isSpecial=!1,this.currentSequence=Y.Empty,this.sequenceIndex=0,this.running=!0,this.offset=0}write(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}stateText(e){e===q.Lt||!this.decodeEntities&&this.fastForwardTo(q.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=J.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===q.Amp&&this.startEntity()}currentSequence=Y.Empty;sequenceIndex=0;enterTagBody(){this.currentSequence===Y.Plaintext?(this.currentSequence=Y.Empty,this.state=J.InPlainText):this.isSpecial?(this.state=J.InSpecialTag,this.sequenceIndex=0):this.state=J.Text}stateSpecialStartSequence(e){let t=e|32;if(this.sequenceIndex<this.currentSequence.length){if(t===this.currentSequence[this.sequenceIndex]){this.sequenceIndex++;return}if(this.sequenceIndex===3){if(this.currentSequence===Y.ScriptEnd&&t===Y.StyleEnd[3]){this.currentSequence=Y.StyleEnd,this.sequenceIndex=4;return}if(this.currentSequence===Y.TitleEnd&&t===Y.TextareaEnd[3]){this.currentSequence=Y.TextareaEnd,this.sequenceIndex=4;return}}else if(this.sequenceIndex===4&&this.currentSequence===Y.NoembedEnd&&t===Y.NoframesEnd[4]){this.currentSequence=Y.NoframesEnd,this.sequenceIndex=5;return}}else if(Qd(e)){this.sequenceIndex=0,this.state=J.InTagName,this.stateInTagName(e);return}this.isSpecial=!1,this.currentSequence=Y.Empty,this.sequenceIndex=0,this.state=J.InTagName,this.stateInTagName(e)}stateCDATASequence(e){e===Y.Cdata[this.sequenceIndex]?++this.sequenceIndex===Y.Cdata.length&&(this.state=J.InCommentLike,this.currentSequence=Y.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.xmlMode?(this.state=J.InDeclaration,this.stateInDeclaration(e)):(this.state=J.InSpecialComment,this.stateInSpecialComment(e)))}fastForwardTo(e){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===e)return!0;return this.index=this.buffer.length+this.offset-1,!1}emitComment(e){this.cbs.oncomment(this.sectionStart,this.index,e),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=J.Text}stateInCommentLike(e){!this.xmlMode&&this.currentSequence===Y.CommentEnd&&this.sequenceIndex<=1&&this.index===this.sectionStart+this.sequenceIndex&&e===q.Gt?this.emitComment(this.sequenceIndex):this.currentSequence===Y.CommentEnd&&this.sequenceIndex===2&&e===q.Gt?this.emitComment(2):this.currentSequence===Y.CommentEnd&&this.sequenceIndex===this.currentSequence.length-1&&e!==q.Gt?this.sequenceIndex=Number(e===q.Dash):e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===Y.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,3),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=J.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(e){return this.xmlMode?!Qd(e):$d(e)}stateInSpecialTag(e){if(this.sequenceIndex===this.currentSequence.length){if(Qd(e)){let t=this.index-this.currentSequence.length;if(this.sectionStart<t){let e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}this.isSpecial=!1,this.sectionStart=t+2,this.stateInClosingTagName(e);return}this.sequenceIndex=0}(e|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===Y.TitleEnd||this.currentSequence===Y.TextareaEnd?this.decodeEntities&&e===q.Amp&&this.startEntity():this.fastForwardTo(q.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=Number(e===q.Lt)}stateBeforeTagName(e){if(e===q.ExclamationMark)this.state=J.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===q.Questionmark)this.xmlMode?(this.state=J.InProcessingInstruction,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.state=J.InSpecialComment,this.sectionStart=this.index);else if(this.isTagStartChar(e)){this.sectionStart=this.index;let t=this.xmlMode||this.cbs.isInForeignContext?.()?void 0:tf.get(e|32);t===void 0?this.state=J.InTagName:(this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=3,this.state=J.SpecialStartSequence)}else e===q.Slash?this.state=J.BeforeClosingTagName:(this.state=J.Text,this.stateText(e))}stateInTagName(e){Qd(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=J.BeforeAttributeName,this.stateBeforeAttributeName(e))}stateBeforeClosingTagName(e){Zd(e)?this.xmlMode||(this.state=J.InSpecialComment,this.sectionStart=this.index):e===q.Gt?(this.state=J.Text,this.xmlMode||(this.sectionStart=this.index+1)):(this.state=this.isTagStartChar(e)?J.InClosingTagName:J.InSpecialComment,this.sectionStart=this.index)}stateInClosingTagName(e){Qd(e)&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=J.AfterClosingTagName,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){(e===q.Gt||this.fastForwardTo(q.Gt))&&(this.state=J.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(e){e===q.Gt?(this.cbs.onopentagend(this.index),this.enterTagBody(),this.sectionStart=this.index+1):e===q.Slash?this.state=J.InSelfClosingTag:Zd(e)||(this.state=J.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(e){if(e===q.Gt){if(this.cbs.onselfclosingtag(this.index),this.sectionStart=this.index+1,!this.recognizeSelfClosing){this.enterTagBody();return}this.state=J.Text,this.isSpecial=!1,this.currentSequence=Y.Empty}else Zd(e)||(this.state=J.BeforeAttributeName,this.stateBeforeAttributeName(e))}stateInAttributeName(e){(e===q.Eq||Qd(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=J.AfterAttributeName,this.stateAfterAttributeName(e))}stateAfterAttributeName(e){e===q.Eq?this.state=J.BeforeAttributeValue:e===q.Slash||e===q.Gt?(this.cbs.onattribend(ef.NoValue,this.sectionStart),this.sectionStart=-1,this.state=J.BeforeAttributeName,this.stateBeforeAttributeName(e)):Zd(e)||(this.cbs.onattribend(ef.NoValue,this.sectionStart),this.state=J.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(e){e===q.DoubleQuote?(this.state=J.InAttributeValueDq,this.sectionStart=this.index+1):e===q.SingleQuote?(this.state=J.InAttributeValueSq,this.sectionStart=this.index+1):Zd(e)||(this.sectionStart=this.index,this.state=J.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))}handleInAttributeValue(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===q.DoubleQuote?ef.Double:ef.Single,this.index+1),this.state=J.BeforeAttributeName):this.decodeEntities&&e===q.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(e){this.handleInAttributeValue(e,q.DoubleQuote)}stateInAttributeValueSingleQuotes(e){this.handleInAttributeValue(e,q.SingleQuote)}stateInAttributeValueNoQuotes(e){Zd(e)||e===q.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(ef.Unquoted,this.index),this.state=J.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===q.Amp&&this.startEntity()}stateBeforeDeclaration(e){e===q.OpeningSquareBracket?(this.state=J.CDATASequence,this.sequenceIndex=0):this.xmlMode?this.state=e===q.Dash?J.BeforeComment:J.InDeclaration:(e|32)===Y.Doctype[0]?(this.state=J.DeclarationSequence,this.currentSequence=Y.Doctype,this.sequenceIndex=1):e===q.Gt?(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=J.Text,this.sectionStart=this.index+1):this.state=e===q.Dash?J.BeforeComment:J.InSpecialComment}stateDeclarationSequence(e){this.sequenceIndex===this.currentSequence.length?(this.state=J.InDeclaration,this.stateInDeclaration(e)):(e|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:e===q.Gt?(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=J.Text,this.sectionStart=this.index+1):this.state=J.InSpecialComment}stateInDeclaration(e){(e===q.Gt||this.fastForwardTo(q.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=J.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){e===q.Questionmark?this.sequenceIndex=1:e===q.Gt&&this.sequenceIndex===1?(this.cbs.onprocessinginstruction(this.sectionStart,this.index-1),this.sequenceIndex=0,this.state=J.Text,this.sectionStart=this.index+1):this.sequenceIndex=Number(this.fastForwardTo(q.Questionmark))}stateBeforeComment(e){e===q.Dash?(this.state=J.InCommentLike,this.currentSequence=Y.CommentEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):this.xmlMode?this.state=J.InDeclaration:e===q.Gt?(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=J.Text,this.sectionStart=this.index+1):this.state=J.InSpecialComment}stateInSpecialComment(e){(e===q.Gt||this.fastForwardTo(q.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=J.Text,this.sectionStart=this.index+1)}startEntity(){this.baseState=this.state,this.state=J.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?Go.Strict:this.baseState===J.Text||this.baseState===J.InSpecialTag?Go.Legacy:Go.Attribute)}stateInEntity(){let e=this.index-this.offset,t=this.entityDecoder.write(this.buffer,e);if(t>=0)this.state=this.baseState,t===0&&--this.index;else{if(e<this.buffer.length&&this.buffer.charCodeAt(e)===q.Amp){this.state=this.baseState,--this.index;return}this.index=this.offset+this.buffer.length-1}}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===J.Text||this.state===J.InPlainText||this.state===J.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===J.InAttributeValueDq||this.state===J.InAttributeValueSq||this.state===J.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){let e=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case J.Text:this.stateText(e);break;case J.InPlainText:this.index=this.buffer.length+this.offset-1;break;case J.SpecialStartSequence:this.stateSpecialStartSequence(e);break;case J.InSpecialTag:this.stateInSpecialTag(e);break;case J.CDATASequence:this.stateCDATASequence(e);break;case J.DeclarationSequence:this.stateDeclarationSequence(e);break;case J.InAttributeValueDq:this.stateInAttributeValueDoubleQuotes(e);break;case J.InAttributeName:this.stateInAttributeName(e);break;case J.InCommentLike:this.stateInCommentLike(e);break;case J.InSpecialComment:this.stateInSpecialComment(e);break;case J.BeforeAttributeName:this.stateBeforeAttributeName(e);break;case J.InTagName:this.stateInTagName(e);break;case J.InClosingTagName:this.stateInClosingTagName(e);break;case J.BeforeTagName:this.stateBeforeTagName(e);break;case J.AfterAttributeName:this.stateAfterAttributeName(e);break;case J.InAttributeValueSq:this.stateInAttributeValueSingleQuotes(e);break;case J.BeforeAttributeValue:this.stateBeforeAttributeValue(e);break;case J.BeforeClosingTagName:this.stateBeforeClosingTagName(e);break;case J.AfterClosingTagName:this.stateAfterClosingTagName(e);break;case J.InAttributeValueNq:this.stateInAttributeValueNoQuotes(e);break;case J.InSelfClosingTag:this.stateInSelfClosingTag(e);break;case J.InDeclaration:this.stateInDeclaration(e);break;case J.BeforeDeclaration:this.stateBeforeDeclaration(e);break;case J.BeforeComment:this.stateBeforeComment(e);break;case J.InProcessingInstruction:this.stateInProcessingInstruction(e);break;case J.InEntity:this.stateInEntity()}this.index++}this.cleanup()}finish(){this.state===J.InEntity&&(this.entityDecoder.end(),this.state=this.baseState),this.handleTrailingData(),this.cbs.onend()}handleTrailingCommentLikeData(e){if(this.state!==J.InCommentLike)return!1;if(this.currentSequence===Y.CdataEnd){if(this.xmlMode)this.sectionStart<e&&this.cbs.oncdata(this.sectionStart,e,0);else{let t=this.sectionStart-Y.Cdata.length-1;this.cbs.oncomment(t,e,0)}}else{let t=this.xmlMode?0:Math.min(this.sequenceIndex,Y.CommentEnd.length-1);this.cbs.oncomment(this.sectionStart,e,t)}return!0}handleTrailingMarkupDeclaration(e){if(this.xmlMode)switch(this.state){case J.InSpecialComment:case J.BeforeComment:case J.CDATASequence:case J.DeclarationSequence:case J.InDeclaration:return this.cbs.ontext(this.sectionStart,e),!0;default:return!1}switch(this.state){case J.BeforeDeclaration:case J.InSpecialComment:case J.BeforeComment:case J.CDATASequence:return this.cbs.oncomment(this.sectionStart,e,0),!0;case J.DeclarationSequence:return this.sequenceIndex!==Y.Doctype.length&&this.cbs.oncomment(this.sectionStart,e,0),!0;case J.InDeclaration:return!0;default:return!1}}handleTrailingData(){let e=this.buffer.length+this.offset;if(!(this.handleTrailingCommentLikeData(e)||this.handleTrailingMarkupDeclaration(e))&&!(this.sectionStart>=e))switch(this.state){case J.InTagName:case J.BeforeAttributeName:case J.BeforeAttributeValue:case J.AfterAttributeName:case J.InAttributeName:case J.InAttributeValueSq:case J.InAttributeValueDq:case J.InAttributeValueNq:case J.InClosingTagName:break;default:this.cbs.ontext(this.sectionStart,e)}}emitCodePoint(e,t){this.baseState!==J.Text&&this.baseState!==J.InSpecialTag?(this.sectionStart<this.entityStart&&this.cbs.onattribdata(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+t,this.index=this.sectionStart-1,this.cbs.onattribentity(e)):(this.sectionStart<this.entityStart&&this.cbs.ontext(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+t,this.index=this.sectionStart-1,this.cbs.ontextentity(e,this.sectionStart))}},{fromCodePoint:rf}=String,af=new Set([`input`,`option`,`optgroup`,`select`,`button`,`datalist`,`textarea`]),X=new Set([`p`]),of=new Set([`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`p`]),sf=new Set([`thead`,`tbody`]),cf=new Set([`dd`,`dt`]),lf=new Set([`rt`,`rp`]),uf=new Map([[`tr`,new Set([`tr`,`th`,`td`])],[`th`,new Set([`th`])],[`td`,new Set([`thead`,`th`,`td`])],[`body`,new Set([`head`,`link`,`script`])],[`a`,new Set([`a`])],[`li`,new Set([`li`])],[`p`,X],[`h1`,of],[`h2`,of],[`h3`,of],[`h4`,of],[`h5`,of],[`h6`,of],[`select`,af],[`input`,af],[`output`,af],[`button`,af],[`datalist`,af],[`textarea`,af],[`option`,new Set([`option`])],[`optgroup`,new Set([`optgroup`,`option`])],[`dd`,cf],[`dt`,cf],[`address`,X],[`article`,X],[`aside`,X],[`blockquote`,X],[`details`,X],[`div`,X],[`dl`,X],[`fieldset`,X],[`figcaption`,X],[`figure`,X],[`footer`,X],[`form`,X],[`header`,X],[`hr`,X],[`main`,X],[`nav`,X],[`ol`,X],[`pre`,X],[`section`,X],[`table`,X],[`ul`,X],[`rt`,lf],[`rp`,lf],[`tbody`,sf],[`tfoot`,sf]]),df=`doctype`,ff=new Set([`area`,`base`,`basefont`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`img`,`input`,`isindex`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),pf=new Set([`math`,`svg`]),mf=new Set([`mi`,`mo`,`mn`,`ms`,`mtext`,`annotation-xml`,`foreignObject`,`desc`,`title`]),hf=new Map([[`altglyph`,`altGlyph`],[`altglyphdef`,`altGlyphDef`],[`altglyphitem`,`altGlyphItem`],[`animatecolor`,`animateColor`],[`animatemotion`,`animateMotion`],[`animatetransform`,`animateTransform`],[`clippath`,`clipPath`],[`feblend`,`feBlend`],[`fecolormatrix`,`feColorMatrix`],[`fecomponenttransfer`,`feComponentTransfer`],[`fecomposite`,`feComposite`],[`feconvolvematrix`,`feConvolveMatrix`],[`fediffuselighting`,`feDiffuseLighting`],[`fedisplacementmap`,`feDisplacementMap`],[`fedistantlight`,`feDistantLight`],[`fedropshadow`,`feDropShadow`],[`feflood`,`feFlood`],[`fefunca`,`feFuncA`],[`fefuncb`,`feFuncB`],[`fefuncg`,`feFuncG`],[`fefuncr`,`feFuncR`],[`fegaussianblur`,`feGaussianBlur`],[`feimage`,`feImage`],[`femerge`,`feMerge`],[`femergenode`,`feMergeNode`],[`femorphology`,`feMorphology`],[`feoffset`,`feOffset`],[`fepointlight`,`fePointLight`],[`fespecularlighting`,`feSpecularLighting`],[`fespotlight`,`feSpotLight`],[`fetile`,`feTile`],[`feturbulence`,`feTurbulence`],[`foreignobject`,`foreignObject`],[`glyphref`,`glyphRef`],[`lineargradient`,`linearGradient`],[`radialgradient`,`radialGradient`],[`textpath`,`textPath`]]),gf;(function(e){e[e.None=0]=`None`,e[e.Svg=1]=`Svg`,e[e.MathML=2]=`MathML`})(gf||={});var _f=/\s|\//,vf=class{options;startIndex=0;endIndex=0;openTagStart=0;tagname=``;attribname=``;attribvalue=``;attribs=null;stack=[];foreignContext;cbs;lowerCaseTagNames;lowerCaseAttributeNames;recognizeSelfClosing;htmlMode;tokenizer;buffers=[];bufferOffset=0;writeIndex=0;ended=!1;constructor(e,t={}){this.options=t,this.cbs=e??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=t.lowerCaseTags??this.htmlMode,this.lowerCaseAttributeNames=t.lowerCaseAttributeNames??this.htmlMode,this.recognizeSelfClosing=t.recognizeSelfClosing??!this.htmlMode,this.tokenizer=new(t.Tokenizer??nf)(this.options,this),this.foreignContext=[gf.None],this.cbs.onparserinit?.(this)}ontext(e,t){let n=this.getSlice(e,t);this.endIndex=t-1,this.cbs.ontext?.(n),this.startIndex=t}ontextentity(e,t){this.endIndex=t-1,this.cbs.ontext?.(rf(e)),this.startIndex=t}isInForeignContext(){return this.foreignContext[0]!==gf.None}isVoidElement(e){return this.htmlMode&&ff.has(e)}readTagName(e,t){let n=this.lowerCaseTagNames?this.getSlice(e,t).toLowerCase():this.getSlice(e,t);if(!(this.lowerCaseTagNames&&this.htmlMode))return n;if(this.foreignContext[0]===gf.Svg)return hf.get(n)??n;if(this.foreignContext.length>1){let e=hf.get(n);if(e!==void 0&&this.stack.includes(e))return e}return this.isInForeignContext()?n:n===`image`?`img`:n}onopentagname(e,t){this.endIndex=t,this.emitOpenTag(this.readTagName(e,t))}emitOpenTag(e){if(this.openTagStart=this.startIndex,this.tagname=e,this.htmlMode&&e===`form`&&this.stack.includes(`form`)){this.tagname=``;return}let t=this.htmlMode&&uf.get(e);if(t)for(;this.stack.length>0&&t.has(this.stack[0]);)this.popElement(!0);this.isVoidElement(e)||(this.stack.unshift(e),this.htmlMode&&(e===`svg`?this.foreignContext.unshift(gf.Svg):e===`math`?this.foreignContext.unshift(gf.MathML):mf.has(e)&&this.foreignContext.unshift(gf.None))),this.cbs.onopentagname?.(e),this.cbs.onopentag&&(this.attribs={})}endOpenTag(e){this.startIndex=this.openTagStart,this.attribs&&=(this.cbs.onopentag?.(this.tagname,this.attribs,e),null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=``}onopentagend(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1}onclosetag(e,t){this.endIndex=t;let n=this.readTagName(e,t);if(this.isVoidElement(n))this.htmlMode&&n===`br`&&(this.cbs.onopentagname?.(`br`),this.cbs.onopentag?.(`br`,{},!0),this.cbs.onclosetag?.(`br`,!1));else{let e=this.stack.indexOf(n);if(e!==-1){for(let t=0;t<e;t++)this.popElement(!0);this.popElement(!1)}else this.htmlMode&&n===`p`&&(this.emitOpenTag(`p`),this.closeCurrentTag(!0))}this.startIndex=t+1}onselfclosingtag(e){this.endIndex=e,this.recognizeSelfClosing||this.isInForeignContext()?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)}popElement(e){let t=this.stack.shift();this.htmlMode&&(pf.has(t)||mf.has(t))&&this.foreignContext.shift(),this.cbs.onclosetag?.(t,e)}closeCurrentTag(e){let t=this.tagname;this.endOpenTag(e),this.stack[0]===t&&this.popElement(!e)}onattribname(e,t){this.startIndex=e;let n=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n}onattribdata(e,t){this.attribvalue+=this.getSlice(e,t)}onattribentity(e){this.attribvalue+=rf(e)}onattribend(e,t){this.endIndex=t,this.cbs.onattribute?.(this.attribname,this.attribvalue,e===ef.Double?`"`:e===ef.Single?`'`:e===ef.NoValue?void 0:null),this.attribs&&!Object.hasOwn(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=``}getInstructionName(e){let t=e.search(_f),n=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n}ondeclaration(e,t){this.endIndex=t;let n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){let e=this.htmlMode?this.lowerCaseTagNames?df:n.slice(0,7):this.getInstructionName(n);this.cbs.onprocessinginstruction(`!${e}`,`!${n}`)}this.startIndex=t+1}onprocessinginstruction(e,t){this.endIndex=t;let n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){let e=this.getInstructionName(n);this.cbs.onprocessinginstruction(`?${e}`,`?${n}`)}this.startIndex=t+1}oncomment(e,t,n){this.endIndex=t,this.cbs.oncomment?.(this.getSlice(e,t-n)),this.cbs.oncommentend?.(),this.startIndex=t+1}oncdata(e,t,n){this.endIndex=t;let r=this.getSlice(e,t-n);!this.htmlMode||this.options.recognizeCDATA?(this.cbs.oncdatastart?.(),this.cbs.ontext?.(r),this.cbs.oncdataend?.()):this.isInForeignContext()?this.cbs.ontext?.(r):(this.cbs.oncomment?.(`[CDATA[${r}]]`),this.cbs.oncommentend?.()),this.startIndex=t+1}onend(){if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let e=0;e<this.stack.length;e++)this.cbs.onclosetag(this.stack[e],!0)}this.cbs.onend?.()}reset(){this.cbs.onreset?.(),this.tokenizer.reset(),this.tagname=``,this.attribname=``,this.attribvalue=``,this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,this.cbs.onparserinit?.(this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(gf.None),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(e){this.reset(),this.end(e)}getSlice(e,t){if(e===t)return``;for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let n=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);for(;t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,t-this.bufferOffset);return n}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(e){if(this.ended){this.cbs.onerror?.(Error(`.write() after done!`));return}this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++)}end(e){if(this.ended){this.cbs.onerror?.(Error(`.end() after done!`));return}e&&this.write(e),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}},yf=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]);function bf(e,t=!1){let n={$:{html:1,block:+!t}};for(let t in e){let r=e[t];r===``?n[`:${t}`]=`true`:n[t]=r}return n}function xf(e){let t=e.trim();if(!t.startsWith(`<`))return null;let n=t.match(/^<\/([a-z][a-z0-9]*)\s*>/i);if(n)return{tag:n[1].toLowerCase(),attrs:{},isVoid:!1,isClose:!0};let r=null,i=new vf({onopentag(e,t){r={tag:e,attrs:bf(t,!0),isVoid:yf.has(e),isClose:!1}}},{decodeEntities:!1});return i.write(t),i.end(),r}function Sf(e){let t=[],n=[],r=new vf({onopentag(e,r){let i=bf(r);if(yf.has(e)){let r=[e,i];n.length>0?n[n.length-1].children.push(r):t.push(r);return}n.push({tag:e,attrs:i,children:[]})},ontext(e){let r=e.trim();r&&(n.length>0?n[n.length-1].children.push(r):t.push(r))},onclosetag(e){if(yf.has(e))return;let r=n.length-1;for(;r>=0&&n[r].tag!==e;)r--;if(r>=0)for(;n.length>r;){let e=n.pop(),r=e.children.length>0?[e.tag,e.attrs,...e.children]:[e.tag,e.attrs];n.length>0?n[n.length-1].children.push(r):t.push(r)}},oncomment(e){let r=[null,{},e];n.length>0?n[n.length-1].children.push(r):t.push(r)}},{decodeEntities:!0});return r.write(e.trim()),r.end(),t}var Cf=new Set([`ul`,`ol`,`table`,`blockquote`,`pre`]),wf={blockquote_open:`blockquote`,ordered_list_open:`ol`,bullet_list_open:`ul`,list_item_open:`li`,paragraph_open:`p`,table_open:`table`,thead_open:`thead`,tbody_open:`tbody`,tr_open:`tr`,th_open:`th`,td_open:`td`},Tf={strong_open:`strong`,em_open:`em`,s_open:`del`,sub_open:`sub`,sup_open:`sup`};function Ef(e,t){let n={startLine:0,preservePositions:!1,headingIds:!0,...t},r={headingSlugCounts:new Map,headingStack:[],preservePositions:n.preservePositions,headingIds:n.headingIds??!0},i=[],a=0,o=n.startLine;for(;a<e.length;){if(e[a].type===`html_block`){let t=Df(e,a);i.push(...t.nodes),a=t.nextIndex;continue}let t=Mf(e,a,!1,r);if(t.node){if(n.preservePositions){for(let r=a;r<t.nextIndex;r++)e[r].map&&e[r].map[1]&&(o=e[r].map[1]+n.startLine+ +!!e[r].type?.endsWith(`_close`));t.node[1].$||(t.node[1].$={}),t.node[1].$.line=o}i.push(t.node)}a=t.nextIndex}return i}function Df(e,t){return{nodes:Sf(typeof e[t]?.content==`string`?e[t].content:``),nextIndex:t+1}}function Of(e,t={}){let{handleJSON:n=!0,filterEmpty:r=!1}=t,i={};if(!e||!Array.isArray(e))return i;for(let t of e)if(Array.isArray(t)&&t.length>=2){let[e]=t,a=t[1];if(r&&(a===``||a==null))continue;if(n&&typeof a==`string`){if(a.startsWith(`{`)&&a.endsWith(`}`))try{a=JSON.parse(a)}catch{}else if(a.startsWith(`[`)&&a.endsWith(`]`))try{a=JSON.parse(a)}catch{}}i[e]=e===`class`&&typeof i[e]==`string`?`${i[e]} ${a}`:a}return i}var kf=1e3;function Af(e){if(!e)return{};let t={},n=e.trim(),r=n.match(/^([^\s[{}"'<>`]+)/);for(r&&(t.language=r[1],n=n.slice(r[1].length).trim());n&&(n.startsWith(`{`)||n.startsWith(`[`));)if(n.startsWith(`{`)){let e=n.match(/^\{([^}]+)\}/);if(e){let r=e[1];n=n.slice(e[0].length).trim();let i=[],a=r.split(`,`);for(let e of a){let t=e.trim();if(t.includes(`-`)){let[e,n]=t.split(`-`).map(e=>Number.parseInt(e.trim(),10));if(!Number.isNaN(e)&&!Number.isNaN(n)&&n-e<=kf)for(let t=e;t<=n&&i.length<kf;t++)i.push(t)}else{let e=Number.parseInt(t,10);!Number.isNaN(e)&&i.length<kf&&i.push(e)}}i.length>0&&(t.highlights=i)}else break}else if(n.startsWith(`[`)){let e=0,r=0;for(;r<n.length;r++)if(n[r]===`[`)e++;else if(n[r]===`]`&&(e--,e===0)){t.filename=n.slice(1,r).replace(/\\\\/g,``),n=n.slice(r+1).trim();break}if(e!==0)break}return n&&(t.meta=n),t}function jf(e,t,n=!0){let r=t;if(n)for(;r<e.length&&e[r].type===`text`&&!e[r].content?.trim();)r++;if(r<e.length&&e[r].type===`mdc_inline_props`){let t=e[r];return{attrs:Of(t.attrs),nextIndex:r+1}}return{attrs:{},nextIndex:t}}function Mf(e,t,n=!1,r){let i=e[t];if(i.type===`hr`)return{node:[`hr`,{}],nextIndex:t+1};if(i.type===`html_block`){let n=Df(e,t);return{node:n.nodes[0]??null,nextIndex:n.nextIndex}}if(i.type===`mdc_block_open`){let n=i.tag||`component`,a=Of(i.attrs),o=Nf(e,t+1,`mdc_block_close`,r);if(Cf.has(n)&&o.nodes.length===1&&Array.isArray(o.nodes[0])&&o.nodes[0][0]===n){let e=o.nodes[0],t=e[1],r=e.slice(2);return{node:[n,{...t,...a},...r],nextIndex:o.nextIndex+1}}return{node:[n,a,...o.nodes],nextIndex:o.nextIndex+1}}if(i.type===`mdc_block_shorthand`){let n=t+1,r=i.tag||`component`,a=Of(i.attrs,{handleJSON:!1}),o=[];if(i.nesting===1)for(;n<e.length;){let t=e[n];if(n++,t.type===`mdc_block_shorthand`&&t.nesting===-1)break;if(t.type===`inline`){let e=Rf(t.children||[],!1);o.push(...e)}}return{node:[r,a,...o],nextIndex:n}}if(i.type===`math_block`)return{node:[`math`,{class:`math block`,content:i.content},i.content],nextIndex:t+1};if(i.type===`fence`||i.type===`fenced_code_block`||i.type===`code_block`){let e=i.content||``,n=Af(i.info||i.params||``),r=n,a={};return n.language&&n.language.trim()&&(r.language=n.language,a.class=`language-${n.language}`),{node:[`pre`,r,[`code`,a,e.endsWith(`
76
+ `)?e.slice(0,-1):e]],nextIndex:t+1}}if(i.type===`heading_open`){let a=Number.parseInt(i.tag.replace(`h`,``),10),o=`h${a}`,s=Of(i.attrs,{handleJSON:!1}),c=Pf(e,t+1,`heading_close`,!0,!0,n,r);if(c.nodes.length>0){let e;return e=r?.headingIds?{id:Lf(If(c.nodes.map(e=>Xu(e)).join(``)),a,r),...s}:s,{node:[o,e,...c.nodes],nextIndex:c.nextIndex+1}}return{node:null,nextIndex:c.nextIndex+1}}if(i.type===`list_item_open`){let n=Of(i.attrs,{handleJSON:!1}),a=Pf(e,t+1,`list_item_close`,!1,!1,!0,r);return a.nodes.length>0?{node:[`li`,n,...a.nodes],nextIndex:a.nextIndex+1}:{node:null,nextIndex:a.nextIndex+1}}let a=wf[i.type];if(a){let n=Of(i.attrs,{handleJSON:!1}),o=i.type.replace(`_open`,`_close`),s=[`td`,`th`].includes(a),c=Pf(e,t+1,o,!1,!1,s,r);return{node:[a,n,...c.nodes],nextIndex:c.nextIndex+1}}return{node:[i.tag||`component`,Of(i.attrs,{handleJSON:!1})],nextIndex:t+1}}function Nf(e,t,n,r){let i=[],a=t,o=null,s={},c=[];for(;a<e.length&&e[a].type!==n;){let t=e[a];if(t.type===`html_block`){let t=Df(e,a);o===null?i.push(...t.nodes):c.push(...t.nodes),a=t.nextIndex;continue}if(t.type===`mdc_block_slot`){if(t.attrs&&Array.isArray(t.attrs)&&t.attrs.length>0){let e=t.attrs[0];if(Array.isArray(e)&&e.length>0){let n=e[0];if(n.startsWith(`#`)){let e=n.substring(1),r=Of(t.attrs.slice(1));o!==null&&c.length>0&&(i.push([`template`,{name:o,...s},...c]),c=[]),o=e,s=r,a++;continue}}}a++;continue}let n=Mf(e,a,!1,r);a=n.nextIndex,n.node&&(o===null?i.push(n.node):c.push(n.node))}return o!==null&&c.length>0&&i.push([`template`,{name:o,...s},...c]),{nodes:i,nextIndex:a}}function Pf(e,t,n,r,i=!1,a=!1,o){let s=[],c=t;for(;c<e.length&&e[c].type!==n;){let t=e[c];if(t.type===`html_block`){let t=Df(e,c);s.push(...t.nodes),c=t.nextIndex;continue}if(t.type===`inline`){let e=Rf(t.children||[],i);s.push(...e),c++}else if(t.type===`hardbreak`||t.type===`hard_break`)s.push([`br`,{}]),c++;else if(t.type===`softbreak`)s.push(`
77
+ `),c++;else if(r&&(t.type===`text`||t.type===`code_inline`))t.content&&s.push(t.content),c++;else{let t=Mf(e,c,a,o);c=t.nextIndex,t.node&&s.push(t.node)}}return{nodes:Ff(s),nextIndex:c}}function Ff(e){let t=[];for(let n of e){let e=t[t.length-1];typeof n==`string`&&typeof e==`string`?t[t.length-1]=e+n:t.push(n)}return t}function If(e){let t=e.toLowerCase().trim().replace(/\s+/g,`-`).replace(/[^\w-]+/g,``).replace(/-{2,}/g,`-`).replace(/^-+|-+$/g,``);return/^\d/.test(t)&&(t=`_`+t),t}function Lf(e,t,n){if(!n)return e;for(;n.headingStack.length>0&&n.headingStack[n.headingStack.length-1].level>=t;)n.headingStack.pop();if(n.headingStack.length>0){let t=n.headingStack[n.headingStack.length-1];t.level>=2&&(e=t.id+`-`+e)}n.headingStack.push({level:t,id:e});let r=n.headingSlugCounts.get(e)??0;return n.headingSlugCounts.set(e,r+1),r===0?e:`${e}-${r}`}function Rf(e,t=!1){let n=[],r=0;for(;r<e.length;){let i=e[r];if(i.type===`mdc_inline_props`&&i.hidden){r++;continue}let a=Bf(e,r,t);r=a.nextIndex,a.node&&n.push(a.node)}return Ff(n)}var zf=100;function Bf(e,t,n=!1,r=0){let i=e[t];if(i.type===`text`||i.type===`emoji`)return{node:i.content||null,nextIndex:t+1};if(i.type===`html_inline`){let a=i.content||``,o=xf(a);if(!o)return{node:a||null,nextIndex:t+1};if(o.isClose)return{node:null,nextIndex:t+1};if(o.isVoid)return{node:[o.tag,o.attrs],nextIndex:t+1};if(r>=zf)return{node:a||null,nextIndex:t+1};let s=[],c=t+1;for(;c<e.length;){let t=e[c];if(t.type===`html_inline`){let e=xf(t.content||``);if(e?.isClose&&e.tag===o.tag){c++;break}}let i=Bf(e,c,n,r+1);c=i.nextIndex,i.node&&s.push(i.node)}return{node:s.length>0?[o.tag,o.attrs,...s]:[o.tag,o.attrs],nextIndex:c}}if(i.type===`mdc_inline_span`&&i.nesting===1){let i={},a=t+1,o=[];for(;a<e.length;){let t=e[a];if(t.type===`mdc_inline_span`&&t.nesting===-1)break;if(t.type===`text`&&!t.content?.trim()){a++;continue}let i=Bf(e,a,n,r);a=i.nextIndex,i.node&&o.push(i.node)}let{attrs:s,nextIndex:c}=jf(e,a+1);return Object.assign(i,s),o.length>0||Object.keys(i).length>0?{node:[`span`,i,...o],nextIndex:c}:{node:null,nextIndex:c}}if(i.type===`mdc_inline_span`&&i.nesting===-1)return{node:null,nextIndex:t+1};if(i.type===`code_inline`){let{attrs:n,nextIndex:r}=jf(e,t+1);return i.content?{node:[`code`,n,i.content],nextIndex:r}:{node:null,nextIndex:r}}if(i.type===`hardbreak`||i.type===`hard_break`)return{node:[`br`,{}],nextIndex:t+1};if(i.type===`softbreak`)return{node:`
78
+ `,nextIndex:t+1};if(i.type===`mdc_inline_component`){let a=i.tag||`component`;if(i.nesting===1){let i=[],o=t+1;for(;o<e.length;){let t=e[o];if(t.type===`mdc_inline_component`&&t.nesting===-1){let{attrs:t,nextIndex:n}=jf(e,o+1,!1);return{node:[a,t,...i],nextIndex:n}}let s=Bf(e,o,n,r);o=s.nextIndex,s.node&&i.push(s.node)}return{node:[a,{},...i],nextIndex:o}}if(i.nesting===-1)return{node:null,nextIndex:t+1};{let n={},{attrs:r,nextIndex:o}=jf(e,t+1,!1);Object.assign(n,r);let s=Of(i.attrs,{handleBoolean:!1});Object.assign(n,s);let c=Object.keys(r).length>0?o:t+1;return{node:[a,n],nextIndex:c}}}if(i.type===`image`){let n=Of(i.attrs,{handleJSON:!1,filterEmpty:!0});i.content&&(n.alt=i.content);let{attrs:r,nextIndex:a}=jf(e,t+1);return Object.assign(n,r),{node:[`img`,n],nextIndex:a}}if(i.type===`link_open`){let r=Of(i.attrs,{handleJSON:!1}),a=Vf(e,t+1,`link_close`,n),{attrs:o,nextIndex:s}=jf(e,a.nextIndex+1);return Object.assign(r,o),a.nodes.length>0?{node:[`a`,r,...a.nodes],nextIndex:s}:{node:null,nextIndex:s}}if(i.type===`math_inline`)return{node:[`math`,{class:`math inline`,content:i.content},i.content],nextIndex:t+1};let a=Tf[i.type];if(a){let r=i.type.replace(`_open`,`_close`),o=Vf(e,t+1,r,n),{attrs:s,nextIndex:c}=jf(e,o.nextIndex+1);return o.nodes.length>0?{node:[a,s,...o.nodes],nextIndex:c}:{node:null,nextIndex:c}}if(i.children){let e=Rf(i.children,n);return{node:e.length===1?e[0]:null,nextIndex:t+1}}return{node:null,nextIndex:t+1}}function Vf(e,t,n,r=!1){let i=[],a=t;for(;a<e.length;){let t=e[a];if(t.type===n&&(n===`mdc_inline_span`&&t.nesting===-1||n!==`mdc_inline_span`))break;if(t.type===`mdc_inline_props`&&t.hidden){a++;continue}if(t.type===`mdc_inline_component`&&r){let n=t.tag||`component`,r={},{attrs:o,nextIndex:s}=jf(e,a+1,!1);Object.assign(r,o),Object.keys(o).length>0?a=s:a++,i.push([n,r]);continue}let o=Bf(e,a,r);a=o.nextIndex,o.node&&i.push(o.node)}return{nodes:Ff(i),nextIndex:a}}function Hf(e,t){let n=-1,r=t.nodes.length-1,i=!1;for(;r>=0;){let e=t.nodes[r];if(e[1]&&e[1].$?.line){if(i){n=r;break}i=!0}r--}let a=n===-1?null:t.nodes[n];if(a){let r=a[1].$?.line??0;return{remainingMarkdownStartLine:r,reusedNodes:t.nodes.slice(0,n+1),remainingMarkdown:e.split(`
79
+ `).slice(r).join(`
80
+ `)||``}}return{remainingMarkdownStartLine:0,remainingMarkdown:e,reusedNodes:[]}}var Uf={end:()=>{}},Wf={startSpan:()=>Uf,startActiveSpan:(e,t,n)=>(typeof t==`function`?t:n)(Uf)};function Gf(e,t,n,r){return e.startActiveSpan(t,r??{},e=>{try{let t=n();return t instanceof Promise?t.finally(()=>e.end()):(e.end(),t)}catch(t){throw e.end(),t}})}function Kf(e={}){let{autoUnwrap:t=!0,autoClose:n=!0,tracer:r=Wf}=e,i=Kd(e.unwrap),a=e.plugins??[];e.html!==void 0&&console.warn("[comark] `ParserOptions.html` is deprecated and will be removed in a future major version. Use `registerDefaultPlugins: false` and register `html()` from `comark/plugins/html` only when needed.");let o=xo(e.registerDefaultPlugins===!1?[]:[Gd(),...e.html===!1?[]:[Vd()],Od(),Ed(),yd(),Cd()],a),s=e=>o.some(t=>t.name===e),c=new yo({linkify:e.linkify??!0}).enable([`table`,`strikethrough`]);for(let e of o)for(let t of e.markdownItPlugins||[])c.use(t);let l=null,u=null;return async(a,d={})=>await Gf(r,`comark:parse`,async()=>{let f={options:e,tokens:[],markdown:a,tree:null,parsedLines:0,reusableNodes:[],frontmatterText:``,frontmatter:{}},p=l,m=a.startsWith(u??``);if(d.streaming&&p&&m){let{remainingMarkdownStartLine:e,reusedNodes:t,remainingMarkdown:n}=Hf(a,p);if(!n)return p;f.parsedLines=e,f.markdown=n,f.reusableNodes=t}typeof n==`function`?f.markdown=Gf(r,`comark:autoclose`,()=>n(f.markdown)):n&&(f.markdown=Gf(r,`comark:autoclose`,()=>Rt(f.markdown,{frontmatter:s(`frontmatter`)&&d.streaming,syntax:s(`components`),attributes:s(`components`)||s(`attributes`),math:s(`math`),dropTrailingOpeners:d.streaming===!0})));for(let e of o)e.pre&&await Gf(r,`comark:pre:${e.name}`,()=>e.pre(f));try{f.tokens=Gf(r,`comark:tokenize`,()=>c.parse(f.markdown,{}))}catch(e){if(d.streaming&&p)return p;throw e}let h=r.startSpan(`comark:nodes`),g=Ef(f.tokens,{startLine:f.parsedLines,preservePositions:d.streaming??!1,headingIds:e.headingIds??!0});t&&(g=g.map(e=>en(e))),i.length>0&&(g=Xd(g,i)),h.end();let _=f.frontmatter??{},v=f.frontmatterText??``;d.streaming?(f.tree={frontmatter:v?_:p?.frontmatter??_,meta:{},nodes:[...f.reusableNodes,...g]},l=f.tree,u=a):(f.tree={frontmatter:_,meta:{},nodes:g},l=null,u=null);for(let e of o)e.post&&await Gf(r,`comark:post:${e.name}`,()=>e.post(f));return f.tree})}function qf(e={}){return bo(Kf(e))}var Jf=` `,Yf=`background-color: currentColor; display: inline-block; margin-left: 0.25rem; margin-right: 0.25rem; animation: pulse 0.75s cubic-bezier(0.4,0,0.6,1) infinite;`;function Xf(e){if(e===!0)return[`span`,{key:`stream-caret`,style:Yf},Jf];if(typeof e==`object`){let t=e?.class||``;return[`span`,{key:`stream-caret`,style:Yf,...t?{class:t}:{}},Jf]}return null}function Zf(e,t){for(let n=e.length-1;n>=2;n--){let r=e[n];if(typeof r==`string`&&e[1]?.key!==`stream-caret`)return e.push(t),!0;if(Array.isArray(r)&&Zf(r,t))return!0}return!1}var Qf=new Map;function $f(e){return!!e&&typeof e.then==`function`}function ep(e){return e&&typeof e==`object`&&`default`in e?e.default:e}function tp(e){return Array.isArray(e)&&e.length>=1?e[0]:null}function np(e){return Array.isArray(e)&&e.length>=2&&e[1]||{}}function rp(e){return Array.isArray(e)&&e.length>2?e.slice(2):[]}function ip(e,t,r){let i=ne()?.appContext?.components,a=$u(e),o=`Prose${a}`,s=t[o]||t[a]||t[e]||i?.[o]||i?.[a];if(!s&&r){let t=e;if(!Qf.has(t)){let i=r(e);$f(i)?Qf.set(t,n(()=>i)):i&&Qf.set(t,ep(i))}s=Qf.get(t)}return s}function ap(e,t={},n,r,i,a={frontmatter:{},meta:{},data:{},props:{}}){if(typeof e==`string`)return e;if(Array.isArray(e)){let o=tp(e);if(!o)return null;let s=np(e),c=rp(e),l;i?.[0]!==`pre`&&(s.as&&(l=ip(s.as,t,r)),l||=ip(o,t,r));let u=l||o,d=Ju(s,a,{parseJson:!0}),f={};for(let e in d)e===`className`?f.class=d[e]:f[e]=d[e];if((u?.props?.__node||u?.__asyncResolved?.props?.__node)&&(f.__node=e),n!==void 0&&(f.key=n),e.length===2)return k(u,f);let p=Object.keys(d).length>0?{...a,props:f}:a,m={},h=[];for(let n=0;n<c.length;n++){let i=c[n];if(i==null)continue;let a=tp(i),o=np(i);if(a===`template`&&o){let n;if(o.name)n=o.name;else for(let e in o)if(e.startsWith(`v-slot:`)){n=e.substring(7);break}if(n){let a=rp(i);m[n]=()=>a.map((n,i)=>ap(n,t,i,r,e,p)).filter(e=>e!==null);continue}}let s=ap(i,t,n,r,e,p);s!==null&&h.push(s)}return l?(h.length>0&&(m.default=()=>h),k(u,f,m)):k(u,f,h)}return null}var op=A({name:`MarkdownDocument`,props:{value:{type:Object,default:void 0},components:{type:Object,default:()=>({})},componentsManifest:{type:Function,default:void 0},streaming:{type:Boolean,default:!1},caret:{type:[Boolean,Object],default:!1},data:{type:Object,default:()=>({})},documentKey:{type:String,default:void 0}},async setup(e){let t=C(()=>e.value??{nodes:[],frontmatter:{},meta:{}}),n=S(new Set),r=d(null),i=t.value.meta?.key||e.documentKey;if(i&&globalThis.comarkContext){let e=globalThis.comarkContext.get(i,u(t.value)).listen(e=>{r.value=e});p(()=>e(!0))}m((e,t,r)=>{let i=t?.$?.type?.name||t?.type?.name||`unknown`;return n.value.add(i),!1});let a=me(`comark`,{components:{},componentManifest:()=>null}),o=C(()=>({...a?.components,...e.components})),s=t=>{let n=e.componentsManifest?.(t);return n||=a?.componentManifest(t),n||null},c=C(()=>Xf(e.caret||!1));return()=>{let n=u(r.value??t.value),i=[...n.nodes||[]];e.streaming&&c.value&&i.length>0&&(Zf(i[i.length-1],c.value)||i.push(c.value));let a={frontmatter:n.frontmatter||n.data||{},meta:n.meta||{},data:e.data||{},props:{}},l=i.map((e,t)=>ap(e,o.value,t,s,void 0,a)).filter(e=>e!==null);return k(`div`,{class:`comark-content`},l)}}}),sp=A({name:`Markdown`,props:{value:{type:[String,Object],default:void 0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},unwrap:{type:[Boolean,String,Array],default:!1},components:{type:Object,default:()=>({})},componentsManifest:{type:Function,default:void 0},streaming:{type:Boolean,default:!1},summary:{type:Boolean,default:!1},caret:{type:[Boolean,Object],default:!1},data:{type:Object,default:()=>({})},documentKey:{type:String,default:void 0}},async setup(e,t){let n=C(()=>{if(Yu(e.value))return``;let n=e.value,r=t.slots.default?.();return r&&r.length>0&&typeof r[0].children==`string`&&(n=r[0].children),e.summary&&(n=n?.split(`<!-- more -->`)[0]),(n||``).trim()}),r=d(null),i=qf({...e.options,...e.unwrap?{unwrap:e.unwrap}:{},plugins:e.plugins});return de(()=>[n.value,e.streaming],()=>{Yu(e.value)||i(n.value,{streaming:e.streaming}).then(e=>r.value=e)}),Yu(e.value)||await i(n.value,{streaming:e.streaming}).then(e=>r.value=e),()=>Yu(e.value)?k(op,{value:e.value,components:e.components,streaming:e.streaming,componentsManifest:e.componentsManifest,class:e.streaming?`comark-stream`:``,caret:e.caret,data:e.data,documentKey:e.documentKey}):k(op,{value:r.value||{nodes:[],frontmatter:{},meta:{}},components:e.components,streaming:e.streaming,componentsManifest:e.componentsManifest,class:e.streaming?`comark-stream`:``,caret:e.caret,data:e.data,documentKey:e.documentKey})}}),cp=e(Ae(),1),lp={key:0,class:`flex justify-end`},up={class:`max-w-[85%] whitespace-pre-wrap break-words rounded-lg bg-active px-3 py-2 text-sm`},dp={key:1,class:`max-w-full flex flex-col items-start gap-1.5`},fp={key:1,class:`flex items-center gap-1.5 text-xs op-mute`},pp={key:0,class:`flex flex-wrap items-center gap-2 text-sm text-red-500`},mp={class:`break-words`},hp={key:1,class:`border border-base rounded px-1.5 text-xs op-mute`},gp={key:2,class:`flex items-center gap-1.5 text-xs op-mute`},_p={key:3,class:`flex items-start gap-1.5 text-xs op-mute`},vp={class:`whitespace-pre-wrap break-words`},yp=A({__name:`ChatMessage`,props:{message:{},retryable:{type:Boolean}},emits:[`retry`],setup(e){let t=e,{t:n}=le();function i(e){return typeof e==`string`?e:e.map(e=>e.text??``).join(`
81
+ `)}let o=C(()=>t.message.role===`user`?i(t.message.content):``),u=C(()=>{let e=t.message;if(e.role!==`toolResult`||e.toolName!==`update_grouping`||e.isError)return;let r=i(e.content).match(/(\d+) groups?/)?.[1];return r?n(`chat.updatedGrouping`,{n:r}):void 0}),d=C(()=>{let e=t.message;return e.role===`toolResult`&&e.isError?i(e.content):void 0});function f(e){if(e.name===`read_diffs`){let t=e.arguments.paths,r=Array.isArray(t)?t.length:0;return n(`chat.readFiles`,{n:r},r)}return e.name===`update_grouping`?n(`chat.updatingGrouping`):e.name===`submit_grouping`?n(`chat.submittingGrouping`):e.name}return(t,n)=>e.message.role===`user`?(N(),s(`div`,lp,[l(`div`,up,a(o.value),1)])):e.message.role===`assistant`?(N(),s(`div`,dp,[(N(!0),s(j,null,c(e.message.content,(t,i)=>(N(),s(j,{key:i},[t.type===`text`&&t.text.trim()?(N(),x(g,{key:0},{default:M(()=>[_(r(sp),{value:t.text,streaming:e.message.stopReason===`pending`,class:`chat-markdown min-w-0 self-stretch`},null,8,[`value`,`streaming`])]),_:2},1024)):t.type===`toolCall`?(N(),s(`div`,fp,[n[1]||=l(`span`,{class:`i-ph:wrench-duotone`,"aria-hidden":`true`},null,-1),D(` `+a(f(t)),1)])):E(``,!0)],64))),128)),e.message.stopReason===`error`?(N(),s(`div`,pp,[l(`span`,mp,a(e.message.errorMessage??t.$t(`chat.requestFailed`)),1),e.retryable?(N(),x(P,{key:0,size:`sm`,icon:`i-ph:arrow-clockwise-duotone`,onClick:n[0]||=e=>t.$emit(`retry`)},{default:M(()=>[D(a(t.$t(`common.retry`)),1)]),_:1})):E(``,!0)])):e.message.stopReason===`aborted`?(N(),s(`span`,hp,a(t.$t(`chat.stopped`)),1)):E(``,!0)])):u.value?(N(),s(`div`,gp,[n[2]||=l(`span`,{class:`i-ph:tree-structure-duotone`,"aria-hidden":`true`},null,-1),D(` `+a(u.value),1)])):d.value?(N(),s(`div`,_p,[n[3]||=l(`span`,{class:`i-ph:warning-duotone mt-0.5 shrink-0`,"aria-hidden":`true`},null,-1),l(`span`,vp,a(d.value),1)])):E(``,!0)}}),bp=ot({headSha:ct(),result:st}),xp=new Set,Sp=null;function Cp(e){xp.add(e),Sp??=requestAnimationFrame(Tp)}function wp(e){xp.delete(e)&&xp.size===0&&Sp!=null&&(cancelAnimationFrame(Sp),Sp=null)}function Tp(e){let t=new Set(xp);xp.clear();for(let n of t)try{n(e)}catch(e){console.error(e)}Sp=xp.size>0?requestAnimationFrame(Tp):null}function Ep(e,t,n){if(e===t||e==null||t==null)return e===t;let r=new Set(n),i=Object.keys(e),a=new Set(Object.keys(t));for(let n of i)if(a.delete(n),!r.has(n)&&(!(n in t)||e[n]!==t[n]))return!1;for(let e of Array.from(a))if(!r.has(e))return!1;return!0}function Dp(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function Op(e,t){let n=e?.theme??Ee,r=t?.theme??Ee,i=kp(e),a=kp(t);return Dp(n,r)&&Ep(e,t,[`theme`,`parseDiffOptions`])&&Ep(i,a)}function kp(e){if(e!=null&&`parseDiffOptions`in e)return e.parseDiffOptions}function Ap(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function jp({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:r=!1,fitPerfectlyOverscroll:i=0,overscrollSize:a}){let o=n+a*2,s=r?n+i*2:o;if(t=Math.max(t,s),o>=t||r){let n=Math.max(e-i,0),r=Math.min(e+s,t);return{top:n,bottom:Math.max(r,n)}}let c=e+n/2-o/2,l=c+o;return c<0&&(c=0),l>t&&(l=t),c=Math.floor(Math.max(c,0)),{top:c,bottom:Math.ceil(Math.max(Math.min(l,t),c))}}function Mp(e){return{type:`text`,value:e}}function Z({tagName:e,children:t=[],properties:n={}}){return{type:`element`,tagName:e,properties:n,children:t}}function Np({name:e,width:t=16,height:n=16,properties:r}){return Z({tagName:`svg`,properties:{width:t,height:n,viewBox:`0 0 16 16`,...r},children:[Z({tagName:`use`,properties:{href:`#${e.replace(/^#/,``)}`}})]})}function Pp(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t;t=`children`in t?t.children[0]:null}}function Fp(e){return Z({tagName:`div`,properties:{"data-gutter":``},children:e})}function Ip(e,t,n,r={}){return Z({tagName:`div`,properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...r},children:t==null?void 0:[Z({tagName:`span`,properties:{"data-line-number-content":``},children:[Mp(`${t}`)]})]})}function Lp(e,t,n){return Z({tagName:`div`,properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t===`annotation`?void 0:e,style:t===`annotation`?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function Rp(){return Z({tagName:`button`,properties:{"data-utility-button":``,type:`button`},children:[Np({name:`diffs-icon-plus`,properties:{"data-icon":``}})]})}function zp(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function Bp(e){for(let t of e)if(t instanceof HTMLElement&&(t.hasAttribute(`data-utility-button`)||t.hasAttribute(`data-gutter-utility-slot`)||t.getAttribute(`slot`)===`gutter-utility-slot`||t.getAttribute(`name`)===`gutter-utility-slot`))return!0;return!1}var Vp=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;selectedRangeHighlightSide;selectedRangeLineNumberOnly=!1;editorActiveLine=null;editorActiveLineSide;editorLineNumberOnly=!1;proposedSelectedRange;renderedSelectedLinesState;renderedEditorActiveLineState;selectionAnchor;pointerSession={mode:`idle`};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener(`click`,this.handlePointerClick),this.pre?.removeEventListener(`pointerdown`,this.handlePointerDown),this.pre?.removeEventListener(`pointermove`,this.handlePointerMove),this.pre?.removeEventListener(`pointerleave`,this.handlePointerLeave),this.pre?.removeAttribute(`data-interactive-lines`),this.pre?.removeAttribute(`data-interactive-line-numbers`),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),wp(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}setup(e){this.setSelectionDirty();let{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode===`gutterSelecting`&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectedLinesState=void 0,this.renderedEditorActiveLineState=void 0}isSelectionDirty(){return this.renderedSelectedLinesState===void 0||this.renderedEditorActiveLineState===void 0}setSelection(e,t){let n=!(e===this.selectedRange||Ap(e??void 0,this.selectedRange??void 0)),r=t?.lineNumberOnly??!1,i=t?.activeLineSide!==this.selectedRangeHighlightSide||r!==this.selectedRangeLineNumberOnly;(this.isSelectionDirty()||n||i)&&(this.proposedSelectedRange=void 0,this.selectedRange=e,this.selectedRangeHighlightSide=t?.activeLineSide,this.selectedRangeLineNumberOnly=r,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted(e))}setEditorActiveLine(e,{lineNumberOnly:t=!1,side:n}={}){let r=e!==this.editorActiveLine,i=n!==this.editorActiveLineSide||t!==this.editorLineNumberOnly;(this.isSelectionDirty()||r||i)&&(this.editorActiveLine=e,this.editorActiveLineSide=n,this.editorLineNumberOnly=t,this.renderSelection())}getSelection(){return this.selectedRange}getHoveredLine=()=>{let e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode===`diff`&&e.type===`diff-line`)return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode===`file`&&e.type===`line`)return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:a}=this.options;(t!=null||n!=null||r!=null||a!=null||i!=null)&&(this.options.onGutterUtilityClick!=null&&Bp(e.composedPath())||(sm(this.options.__debugPointerEvents,`click`,`FileDiff.DEBUG.handlePointerClick:`,e),this.handlePointerEvent({eventType:`click`,event:e})))};handlePointerMove=e=>{if(e.pointerType!==`mouse`)return;let{lineHoverHighlight:t=`disabled`,onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:a,enableGutterUtility:o=!1}=this.options;(t!==`disabled`||o||n!=null||r!=null||i!=null||a!=null)&&(sm(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(sm(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){sm(t,`move`,`FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token`);return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){let{__debugPointerEvents:n}=this.options,r=t.composedPath();sm(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);sm(n,e,`FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:`,i);let{onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,onHunkExpand:f,onMergeConflictActionClick:p}=this.options;switch(e){case`move`:{let e=Kp(i)&&this.hoveredLine?.lineElement===i.lineElement;Gp(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),Gp(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Kp(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(Jp(i)&&p!=null){p(i);break}if(qp(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!Kp(i))break;Gp(i)&&l!=null&&l(this.toTokenEventBaseProps(i),t);let e=this.toEventBaseProps(i);o!=null&&i.numberColumn?o({...e,event:t}):a?.({...e,event:t});break}}}syncPointerListeners(e){let{__debugPointerEvents:t,lineHoverHighlight:n=`disabled`,onLineClick:r,onLineNumberClick:i,onLineEnter:a,onLineLeave:o,onTokenClick:s,onTokenEnter:c,onTokenLeave:l,onHunkExpand:u,onMergeConflictActionClick:d,enableGutterUtility:f=!1,enableLineSelection:p=!1,onGutterUtilityClick:m}=this.options,h=m!=null,g=n!==`disabled`||r!=null||i!=null||a!=null||o!=null||s!=null||c!=null||l!=null||u!=null||d!=null||f||p||h;g&&!this.hasPointerListeners?(e.addEventListener(`click`,this.handlePointerClick),e.addEventListener(`pointerdown`,this.handlePointerDown),e.addEventListener(`pointermove`,this.handlePointerMove),e.addEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!0,sm(t,`click`,`FileDiff.DEBUG.attachEventListeners: Attaching click events for:`,(()=>{let e=[];return(t===`both`||t===`click`)&&(r!=null&&e.push(`onLineClick`),i!=null&&e.push(`onLineNumberClick`),u!=null&&e.push(`expandable hunk separators`),d!=null&&e.push(`merge conflict actions`)),e})()),sm(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),sm(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event`)):!g&&this.hasPointerListeners&&(e.removeEventListener(`click`,this.handlePointerClick),e.removeEventListener(`pointerdown`,this.handlePointerDown),e.removeEventListener(`pointermove`,this.handlePointerMove),e.removeEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!1);let _=this.pointerSession.mode===`selecting`||this.pointerSession.mode===`pendingSingleLineUnselect`,v=this.pointerSession.mode===`gutterSelecting`;(!p&&_||!h&&v)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;let{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,i=t!=null||n;r&&!this.interactiveLinesAttr?(this.pre.setAttribute(`data-interactive-lines`,``),this.interactiveLinesAttr=!0):!r&&this.interactiveLinesAttr&&(this.pre.removeAttribute(`data-interactive-lines`),this.interactiveLinesAttr=!1),i&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute(`data-interactive-line-numbers`,``),this.interactiveLineNumbersAttr=!0):!i&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute(`data-interactive-line-numbers`),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType===`mouse`&&e.button!==0||this.pre==null||this.pointerSession.mode!==`idle`)return;let t=e.composedPath();Bp(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!==`mouse`&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){let{enableLineSelection:t=!1}=this.options;if(!t)return;let n=this.resolveSelectionInfo(e,{source:`event-path`,requireNumberColumn:!0});if(n==null)return;let{pre:r}=this;if(r==null)return;let{lineNumber:i,eventSide:a,lineIndex:o}=n;if(e.shiftKey&&this.selectedRange!=null){let t=this.getIndexesFromSelection(this.selectedRange,r.getAttribute(`data-diff-type`)===`split`);if(t==null)return;let n=t.start<=t.end?o>=t.start:o<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===i&&this.selectedRange?.end===i){let t={lineNumber:i,side:a};this.selectionAnchor=t,this.pointerSession={mode:`pendingSingleLineUnselect`,pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:i,side:a},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){let{onGutterUtilityClick:t}=this.options;if(t==null)return;let n=this.currentSelectionEnds(),r=n?.bottom??this.resolveSelectionPoint(e,{source:`event-path`,excludeUtility:!1}),i=n?.top??r;r!=null&&i!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:i,current:r},this.selectionAnchor={lineNumber:i.lineNumber,side:i.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionPoint(e,{source:`coordinates-first`});if(t==null)return;this.pointerSession.current=t,this.updateSelection(t.lineNumber,t.side);return}case`selecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case`pendingSingleLineUnselect`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;let n={lineNumber:t.lineNumber,side:t.eventSide};if(zp(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:`selecting`,pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{let{onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{let{pointerSession:n}=this;if(e.pointerId!==n.pointerId)return;e.preventDefault();let r=this.resolveSelectionPoint(e,{source:`coordinates-first`});r!=null&&(n.current=r,this.updateSelection(r.lineNumber,r.side));let i=this.buildSelectedLineRange(n.anchor,n.current);t?.({...i}),this.selectionAnchor=void 0,this.notifySelectionEnd(i),this.notifySelectionCommitted(i),this.clearProposedSelection(),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case`pendingSingleLineUnselect`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection();return;case`selecting`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:case`selecting`:case`pendingSingleLineUnselect`:if(`pointerId`in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute(`data-hovered`),this.hoveredLine.numberElement.removeAttribute(`data-hovered`),this.hoveredLine=void 0)}setHoveredLine(e){let{lineHoverHighlight:t=`disabled`}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!==`disabled`&&((t===`both`||t===`line`)&&this.hoveredLine.lineElement.setAttribute(`data-hovered`,``),(t===`both`||t===`number`)&&this.hoveredLine.numberElement.setAttribute(`data-hovered`,``))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer??(this.gutterUtilityContainer=document.createElement(`div`),this.gutterUtilityContainer.setAttribute(`data-gutter-utility-slot`,``)),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot??(this.gutterUtilitySlot=document.createElement(`slot`),this.gutterUtilitySlot.name=`gutter-utility-slot`),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){let e=document.createElement(`div`);e.innerHTML=Mt(Rp());let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error(`InteractionManager.ensureGutterUtilityNode: Node element should be a button`);t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;let t=this.resolvePointerTarget(e);Wp(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){let e=this.currentSelectionEnds();if(e==null)return!1;let t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){let e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){let t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),i=this.selectionPointRowIndex(n);if(r!=null&&i!=null)return r>i?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){let t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;let t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;let n=this.mode===`diff`?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(let t of r){if(!(t instanceof HTMLElement))continue;let n=this.resolvePointerTarget(Zp(t));if(Wp(n)&&(this.mode!==`diff`||e.side==null||n.side===e.side))return n}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||=(document.addEventListener(`pointermove`,this.handleDocumentPointerMove),document.addEventListener(`pointerup`,this.handleDocumentPointerUp),document.addEventListener(`pointercancel`,this.handleDocumentPointerCancel),!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&=(document.removeEventListener(`pointermove`,this.handleDocumentPointerMove),document.removeEventListener(`pointerup`,this.handleDocumentPointerUp),document.removeEventListener(`pointercancel`,this.handleDocumentPointerCancel),!1)}clearPointerSession(){this.pointerSession={mode:`idle`}}clearPendingSingleLineState(){this.pointerSession.mode===`pendingSingleLineUnselect`&&(this.pointerSession={mode:`idle`})}selectionInfoFromPath(e,t){let n=this.resolvePointerTarget(e);if(Wp(n)&&(!t||n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode===`diff`?n.side:void 0}}resolveSelectionInfo(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionInfoFromPath(n,t.requireNumberColumn)}selectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(Wp(t))return{lineNumber:t.lineNumber,side:this.mode===`diff`?t.side:void 0}}resolveSelectionPoint(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionPointFromPath(n)}resolveSelectionPath(e,t){let n=t.excludeUtility!==!1;switch(t.source){case`event-path`:return this.pathFromEventPath(e.composedPath(),n);case`coordinates-first`:{let t=this.pathFromCoordinates(e,n);return t===void 0?this.pathFromEventPath(e.composedPath(),n):t??void 0}}}pathFromCoordinates(e,t){let n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&Bp(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=Zp(e);if(t&&Bp(n))return;let r=Qp(e);return r==null?this.pathFromAnnotationSlot(e):Zp(r)}pathFromAnnotationSlot(e){let t=$p(e)?.previousElementSibling;if(t instanceof HTMLElement&&(t.hasAttribute(`data-line`)||t.hasAttribute(`data-column-number`)))return Zp(t);let n=tm(em(e));if(n==null)return;let r=this.targetForSelectionPoint(n);return r==null?void 0:Zp(r.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=nm(t)?t:nm(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){let{getLineIndex:n}=this.options;return n==null?[e-1,e-1]:n(e,t)}getCurrentSelectionRange(){return this.proposedSelectedRange===void 0?this.selectedRange:this.proposedSelectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){let r=this.getCurrentSelectionRange(),i;if(e==null)i=null;else{let n=this.selectionAnchor?.side??t,r=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(r,e,n,t)}Ap(r??void 0,i??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,Cp(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;let n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}getSelectionRenderState(){return{selectedLines:{range:this.selectedRange,highlightSide:this.selectedRangeHighlightSide,lineNumberOnly:this.selectedRangeLineNumberOnly},editorActiveLine:{range:this.editorActiveLine==null?null:{start:this.editorActiveLine,end:this.editorActiveLine,side:this.editorActiveLineSide},highlightSide:this.editorActiveLineSide,lineNumberOnly:this.editorLineNumberOnly}}}resolveLineRenderRange(e,t,n){if(e.range==null)return;let r=this.getIndexesFromSelection(e.range,t);if(r==null)throw console.error({rowRange:r,range:e.range}),Error(`InteractionManager.renderSelection: No valid ${n} rowRange`);return r}getLineRenderColumns(e,t,n,r){if(this.pre==null||t==null&&r==null)return[];let{children:i}=this.pre;if(i.length>2)throw console.error(i),Error(`InteractionManager.renderSelection: Somehow there are more than 2 code elements...`);let a=[];for(let o of i){let i=o.hasAttribute(`data-deletions`)?`deletions`:o.hasAttribute(`data-additions`)?`additions`:void 0,s=e!=null&&t!=null&&(e.highlightSide==null||i==null||e.highlightSide===i),c=n!=null&&r!=null&&(n.highlightSide==null||i==null||n.highlightSide===i);if(!s&&!c)continue;let[l,u]=o.children;if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))throw Error(`InteractionManager.renderSelection: missing gutter or content element`);if(u.children.length!==l.children.length)throw Error(`InteractionManager.renderSelection: gutter and content children dont match, something is wrong`);a.push({content:u,gutter:l,renderEditorActiveLine:c,renderSelectedLines:s})}return a}renderSelection=()=>{wp(this.renderSelection);let e=this.getSelectionRenderState();if(this.pre==null)return;let{editorActiveLine:t,selectedLines:n}=e,r=!im(this.renderedSelectedLinesState,n),i=!im(this.renderedEditorActiveLineState,t);if(!r&&!i)return;r&&(this.renderedSelectedLinesState=void 0),i&&(this.renderedEditorActiveLineState=void 0);let a=this.pre.getAttribute(`data-diff-type`)===`split`,o=r?this.resolveLineRenderRange(n,a,`selected-lines`):void 0,s=i?this.resolveLineRenderRange(t,a,`editor-active-line`):void 0,c=this.getLineRenderColumns(r?n:void 0,o,i?t:void 0,s),l=n.range==null||c.some(e=>e.renderSelectedLines),u=t.range==null||c.some(e=>e.renderEditorActiveLine);if(r)for(let e of this.pre.querySelectorAll(`[data-selected-line]`))e.removeAttribute(`data-selected-line`);if(i)for(let e of this.pre.querySelectorAll(`[data-editor-active-line]`))e.removeAttribute(`data-editor-active-line`);let d=o==null?void 0:Math.min(o.start,o.end),f=o==null?void 0:Math.max(o.start,o.end),p=d===f,m=s?.start;for(let e of c){let{content:r,gutter:i,renderEditorActiveLine:o,renderSelectedLines:s}=e,c=Math.max(s?f??-1/0:-1/0,o?m??-1/0:-1/0),l=r.children.length;for(let e=0;e<l;e++){let l=r.children[e],u=i.children[e];if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))continue;let h=this.parseLineIndex(l,a);if((h??0)>c)break;if(h!=null){if(s&&d!=null&&f!=null&&h>=d&&h<=f){let e=p?`single`:h===d?`first`:h===f?`last`:``;u.setAttribute(`data-selected-line`,e),n.lineNumberOnly||(l.setAttribute(`data-selected-line`,e),u.nextSibling instanceof HTMLElement&&l.nextSibling instanceof HTMLElement&&(l.nextSibling.hasAttribute(`data-line-annotation`)||l.nextSibling.hasAttribute(`data-merge-conflict-actions`))&&(p?(e=`last`,l.setAttribute(`data-selected-line`,`first`)):h===d?e=``:h===f&&l.setAttribute(`data-selected-line`,``),l.nextSibling.setAttribute(`data-selected-line`,e),u.nextSibling.setAttribute(`data-selected-line`,e)))}o&&h===m&&(u.setAttribute(`data-editor-active-line`,``),t.lineNumberOnly||l.setAttribute(`data-editor-active-line`,``))}}}r&&l&&(this.renderedSelectedLinesState=n),i&&u&&(this.renderedEditorActiveLineState=t)};notifySelectionCommitted(e){this.options.onLineSelected?.(e)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode===`file`?{type:`line`,lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:`diff-line`,annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}){return this.mode===`file`?{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:i,tokenText:a}:{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,r){return{start:e,end:t,...n==null?{}:{side:n},...n!==r&&r!=null?{endSide:r}:{}}}resolvePointerTarget(e){let t=!1,n,r,i,a,o,s,c,l,u,d;for(let f of e){if(!(f instanceof HTMLElement))continue;if(d==null&&f.hasAttribute(`data-merge-conflict-action`)){let e=f.getAttribute(`data-merge-conflict-action`)??void 0,t=f.getAttribute(`data-merge-conflict-conflict-index`)??void 0,n=t==null?NaN:Number.parseInt(t,10);Yp(e)&&Number.isFinite(n)&&(d={kind:`merge-conflict-action`,resolution:e,conflictIndex:n})}if(s==null&&f.hasAttribute(`data-char`)){s=f;let e=f.getAttribute(`data-char`);if(e!=null){let t=Number.parseInt(e,10);if(!Number.isNaN(t)){let e=f.textContent??``,n=t+e.length;(e.trim()!==``||this.options.enableTokenInteractionsOnWhitespace===!0)&&(c={tokenElement:s,lineCharStart:t,lineCharEnd:n,tokenText:e});continue}}}let e=o==null?f.getAttribute(`data-column-number`)??void 0:void 0;if(e!=null){o=f,u=Number.parseInt(e,10),t=!0,n=om(f),a=f.getAttribute(`data-line-index`)??void 0;continue}let p=i==null?f.getAttribute(`data-line`)??void 0:void 0;if(p!=null){i=f,u=Number.parseInt(p,10),n=om(f),a=f.getAttribute(`data-line-index`)??void 0;continue}if(l==null&&(f.hasAttribute(`data-expand-button`)||f.hasAttribute(`data-unmodified-lines`))){l={hunkIndex:void 0,direction:f.hasAttribute(`data-expand-up`)?`up`:f.hasAttribute(`data-expand-down`)?`down`:`both`,all:f.hasAttribute(`data-expand-all-button`)};continue}let m=l==null?void 0:f.getAttribute(`data-expand-index`)??void 0;if(l!=null&&m!=null){let e=Number.parseInt(m,10);Number.isNaN(e)||(l.hunkIndex=e);continue}if(r==null&&f.hasAttribute(`data-code`)){r=f;break}}if(d!=null)return d;if(l?.hunkIndex!=null)return{type:`line-info`,hunkIndex:l.hunkIndex,direction:l.direction,all:l.all};if(i??=a==null?void 0:Xp(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:Xp(r,`[data-column-number][data-line-index="${a}"]`),r==null||i==null||o==null||n==null||u==null||Number.isNaN(u))return;let f=this.parseLineIndex(i,this.isSplitDiff());return c==null?this.mode===`file`?{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f}:{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:am(n,r),splitLineIndex:f}:this.mode===`file`?{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f,...c}:{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:am(n,r),splitLineIndex:f,...c}}isSplitDiff(){return this.pre?.getAttribute(`data-diff-type`)===`split`}parseLineIndex(e,t){let n=(e.getAttribute(`data-line-index`)??``).split(`,`).map(e=>Number.parseInt(e,10)).filter(e=>!Number.isNaN(e));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function Hp({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,renderGutterUtility:d,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v},y,b,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:Up({enableGutterUtility:t,renderGutterUtility:d,onGutterUtilityClick:r}),usesCustomGutterUtility:d!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:y,onMergeConflictActionClick:x,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v,getLineIndex:b}}function Up({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw Error(`Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.`);return e??!1}function Wp(e){return e!=null&&`kind`in e&&e.kind===`line`}function Gp(e){return e!=null&&`kind`in e&&e.kind===`token`}function Kp(e){return Wp(e)||Gp(e)}function qp(e){return`type`in e&&e.type===`line-info`}function Jp(e){return`kind`in e&&e.kind===`merge-conflict-action`}function Yp(e){return e===`current`||e===`incoming`||e===`both`}function Xp(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function Zp(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function Qp(e){let t=e.closest(`[data-line], [data-column-number]`);if(t instanceof HTMLElement)return t;let n=e.closest(`[data-line-annotation], [data-gutter-buffer="annotation"]`);if(!(n instanceof HTMLElement))return;let r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute(`data-line`)||r.hasAttribute(`data-column-number`))?r:void 0}function $p(e){let t=e.closest(`[slot^="annotation-"]`),n=(t instanceof HTMLElement&&t.assignedSlot!=null?t.assignedSlot:e.tagName===`SLOT`?e:void 0)?.closest(`[data-line-annotation]`);return n instanceof HTMLElement?n:void 0}function em(e){let t=e.closest(`[slot^="annotation-"]`);if(t instanceof HTMLElement)return t.getAttribute(`slot`)??void 0;if(e instanceof HTMLElement){let t=e.getAttribute(`name`)??void 0;return t!=null&&t.startsWith(`annotation-`)?t:void 0}}function tm(e){if(e==null)return;let t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;let n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function nm(e){return e!=null&&typeof e.elementFromPoint==`function`}function rm(e,t){return e===t||Ap(e??void 0,t??void 0)}function im(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&rm(e?.range??null,t.range)}function am(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function om(e){let t=e.getAttribute(`data-line-type`);if(t!=null)switch(t){case`change-deletion`:case`change-addition`:case`context`:case`context-expanded`:return t;default:return}}function sm(e=`none`,t,...n){switch(e){case`none`:return;case`both`:break;case`click`:if(t!==`click`)return;break;case`move`:if(t!==`move`)return}console.log(...n)}var cm=class e{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){let t=e.resizeObserver??new ResizeObserver(e.handleSharedResizeEntries);return e.resizeObserver=t,t}static handleSharedResizeEntries(t){let n=new Map;for(let r of t){let t=e.managersByElement.get(r.target);if(t==null)continue;let i=n.get(t);i==null?n.set(t,[r]):i.push(r)}for(let[e,t]of n)e.handleResizeEntries(t)}observedNodes=new Map;setup(e,{disableAnnotations:t,columnVariables:n=`apply`}){let r=new Set,i=n===`apply`,a=0,o=new Map(this.observedNodes);this.observedNodes.clear();for(let t of e.children){if(a===2)break;let e=(()=>{if(t instanceof HTMLElement&&t.tagName===`CODE`)return t})();if(e==null)continue;a++;let n=o.get(e);if(n!=null&&n.type!==`code`)throw Error(`ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible`);let r=e.firstElementChild;r instanceof HTMLElement||(r=null),n==null?(n={type:`code`,codeElement:e,numberElement:r,codeWidth:`auto`,numberWidth:0,applyColumnVariables:i},this.observedNodes.set(e,n),this.observe(e),r!=null&&(this.observedNodes.set(r,n),this.observe(r))):(this.observedNodes.set(e,n),o.delete(e),n.numberElement===r?n.numberElement==null?n.numberWidth=0:(o.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):(n.numberElement!=null&&(this.unobserve(n.numberElement),o.delete(n.numberElement)),r!=null&&(this.observe(r),o.delete(r),this.observedNodes.set(r,n)),n.numberElement=r,n.numberWidth=0),dm(n,i))}if(a>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),n=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-line-annotation`)??``;if(!/^-?\d+,-?\d+$/.test(t)){console.error(`DiffFileRenderer.setupResizeObserver: Invalid element or annotation`,{lineAnnotation:t,element:e});continue}let r=n.get(t);r??(r=[],n.set(t,r)),r.push(e)}for(let[e,t]of n){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[n,i]=t,a=n.firstElementChild,s=i.firstElementChild;if(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||!(a instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let c=o.get(a);if(c!=null){this.observedNodes.set(a,c),this.observedNodes.set(s,c),o.delete(a),o.delete(s);continue}let l=a.getBoundingClientRect().height,u=s.getBoundingClientRect().height;c={type:`annotations`,column1:{container:n,child:a,childHeight:l},column2:{container:i,child:s,childHeight:u},currentHeight:`auto`},r.add({child1:a,child2:s,item:c,newHeight:Math.max(l,u)})}for(let e of r)this.applyNewHeight(e.item,e.newHeight),this.observedNodes.set(e.child1,e.item),this.observedNodes.set(e.child2,e.item),this.observe(e.child1),this.observe(e.child2);r.clear()}for(let[e,t]of o)this.unobserve(e),t.type===`code`?mm(t):hm(t);o.clear()}cleanUp(){for(let e of this.observedNodes.keys())this.unobserve(e);this.observedNodes.clear()}observe(t){let{managersByElement:n}=e,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw Error(`ResizeManager.observe: element is already owned by another ResizeManager`);n.set(t,this),e.getResizeObserver().observe(t)}}unobserve(t){let{managersByElement:n,resizeObserver:r}=e,i=n.get(t);if(i!=null){if(i!==this)throw Error(`ResizeManager.unobserve: element is owned by another ResizeManager`);n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),e.resizeObserver=void 0)}}handleResizeEntries(e){let t=new Map,n=new Set;for(let r of e){let{target:e,borderBoxSize:i,contentBoxSize:a}=r;if(!(e instanceof HTMLElement)){console.error(`ResizeManager.handleResizeEntries: Invalid element for ResizeObserver`,r);continue}let o=this.observedNodes.get(e);if(o==null){console.error(`ResizeManager.handleResizeEntries: Not a valid observed node`,r);continue}if(o.type===`annotations`){let t=(()=>{if(e===o.column1.child)return o.column1;if(e===o.column2.child)return o.column2})();if(t==null){console.error(`ResizeManager.handleResizeEntries: Couldn't find a column for`,{item:o,target:e});continue}t.childHeight=i[0].blockSize,n.add(o)}else if(o.type===`code`){let n=t.get(o)??{},r=a[0].inlineSize;e===o.codeElement?n.codeInlineSize=r:e===o.numberElement&&(n.numberInlineSize=r),t.set(o,n)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(e){for(let t of e)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=e=>{for(let[t,n]of e){let e=n.codeInlineSize==null?t.codeWidth:lm(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:um(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;(i||a)&&(t.codeWidth=e,t.numberWidth=r,t.applyColumnVariables&&fm(t,{codeWidthChanged:i,numberWidthChanged:a}))}};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`),e.column2.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`))}};function lm(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function um(e){return Math.max(Math.ceil(e),0)}function dm(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?fm(e,{codeWidthChanged:!0,numberWidthChanged:!0}):pm(e))}function fm(e,{codeWidthChanged:t,numberWidthChanged:n}){let{codeElement:r,codeWidth:i,numberWidth:a}=e;if(t&&r.style.setProperty(`--diffs-column-width`,`${typeof i==`number`?`${i}px`:`auto`}`),n&&r.style.setProperty(`--diffs-column-number-width`,`${a===0?`auto`:`${a}px`}`),t||n&&i!==`auto`){let e=typeof i==`number`?Math.max(i-a,0):0;r.style.setProperty(`--diffs-column-content-width`,`${e>0?`${e}px`:`auto`}`)}}function pm(e){e.codeElement.style.removeProperty(`--diffs-column-content-width`),e.codeElement.style.removeProperty(`--diffs-column-number-width`),e.codeElement.style.removeProperty(`--diffs-column-width`)}function mm(e){e.codeElement.isConnected&&pm(e)}function hm(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty(`--diffs-annotation-min-height`),e.column2.container.isConnected&&e.column2.container.style.removeProperty(`--diffs-annotation-min-height`)}function gm(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function _m(e){return Z({tagName:`div`,children:[Z({tagName:`div`,children:e.annotations?.map(e=>Z({tagName:`slot`,properties:{name:e}})),properties:{"data-annotation-content":``}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function vm(e){switch(e){case`file`:return`diffs-icon-file-code`;case`change`:return`diffs-icon-symbol-modified`;case`new`:return`diffs-icon-symbol-added`;case`deleted`:return`diffs-icon-symbol-deleted`;case`rename-pure`:case`rename-changed`:return`diffs-icon-symbol-moved`}}function ym({fileOrDiff:e,mode:t,stickyHeader:n}){let r=`type`in e?e:void 0,i={"data-diffs-header":t,"data-change-type":r?.type,"data-sticky":n?``:void 0};return Z({tagName:`div`,children:[t===`custom`?Z({tagName:`slot`,properties:{name:Se}}):bm({name:e.name,prevName:`prevName`in e?e.prevName:void 0,iconType:r?.type??`file`}),...t===`custom`?[]:[xm(r)]],properties:i})}function bm({name:e,prevName:t,iconType:n}){let r=[Z({tagName:`slot`,properties:{name:qe}}),Np({name:vm(n),properties:{"data-change-icon":n}})];return t!=null&&(r.push(Z({tagName:`div`,children:[Z({tagName:`bdi`,children:[Mp(t)]})],properties:{"data-prev-name":``}})),r.push(Np({name:`diffs-icon-arrow-right-short`,properties:{"data-rename-icon":``}}))),r.push(Z({tagName:`div`,children:[Z({tagName:`bdi`,children:[Mp(e)]})],properties:{"data-title":``}})),r.push(Z({tagName:`slot`,properties:{name:Ve}})),Z({tagName:`div`,children:r,properties:{"data-header-content":``}})}function xm(e){let t=[];if(e!=null){let n=0,r=0;for(let t of e.hunks)n+=t.additionLines,r+=t.deletionLines;(r>0||n===0)&&t.push(Z({tagName:`span`,children:[Mp(`-${r}`)],properties:{"data-deletions-count":``}})),(n>0||r===0)&&t.push(Z({tagName:`span`,children:[Mp(`+${n}`)],properties:{"data-additions-count":``}}))}return t.push(Z({tagName:`slot`,properties:{name:je}})),Z({tagName:`div`,children:t,properties:{"data-metadata":``}})}function Sm(e){return Z({tagName:`pre`,properties:Cm(e)})}function Cm({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:r,split:i,totalLines:a,type:o,customProperties:s}){return{...s,"data-diff":o===`diff`?``:void 0,"data-file":o===`file`?``:void 0,"data-diff-type":o===`diff`?i?`split`:`single`:void 0,"data-overflow":r,"data-disable-line-numbers":n?``:void 0,"data-background":t?void 0:``,"data-indicators":e===`bars`||e===`classic`?e:void 0,style:`--diffs-min-number-column-width-default:${`${a}`.length}ch;`}}var wm=new Map,Tm={"1c":`1c`,abap:`abap`,as:`actionscript-3`,ada:`ada`,adb:`ada`,ads:`ada`,adoc:`asciidoc`,asciidoc:`asciidoc`,"component.html":`angular-html`,"component.ts":`angular-ts`,conf:`nginx`,htaccess:`apache`,cls:`tex`,trigger:`apex`,apl:`apl`,applescript:`applescript`,scpt:`applescript`,ara:`ara`,asm:`asm`,s:`riscv`,astro:`astro`,awk:`awk`,bal:`ballerina`,sh:`zsh`,bash:`zsh`,bat:`cmd`,cmd:`cmd`,be:`berry`,beancount:`beancount`,bib:`bibtex`,bicep:`bicep`,"blade.php":`blade`,bsl:`bsl`,c:`c`,h:`objective-cpp`,cs:`csharp`,cpp:`cpp`,hpp:`cpp`,cc:`cpp`,cxx:`cpp`,hh:`cpp`,cdc:`cdc`,cairo:`cairo`,clar:`clarity`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,soy:`soy`,cmake:`cmake`,"CMakeLists.txt":`cmake`,cob:`cobol`,cbl:`cobol`,cobol:`cobol`,CODEOWNERS:`codeowners`,ql:`ql`,coffee:`coffeescript`,lisp:`lisp`,cl:`lisp`,lsp:`lisp`,log:`log`,v:`verilog`,cql:`cql`,cr:`crystal`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cypher`,cyp:`cypher`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,patch:`diff`,Dockerfile:`dockerfile`,dockerfile:`dockerfile`,env:`dotenv`,dm:`dream-maker`,edge:`edge`,el:`emacs-lisp`,ex:`elixir`,exs:`elixir`,elm:`elm`,erb:`erb`,erl:`erlang`,hrl:`erlang`,f:`fortran-fixed-form`,for:`fortran-fixed-form`,fs:`fsharp`,fsi:`fsharp`,fsx:`fsharp`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`fortran-free-form`,f95:`fortran-free-form`,fnl:`fennel`,fish:`fish`,ftl:`ftl`,tres:`gdresource`,res:`gdresource`,gd:`gdscript`,gdshader:`gdshader`,gs:`genie`,feature:`gherkin`,COMMIT_EDITMSG:`git-commit`,"git-rebase-todo":`git-rebase`,gjs:`glimmer-js`,gleam:`gleam`,gts:`glimmer-ts`,glsl:`glsl`,vert:`glsl`,frag:`glsl`,shader:`shaderlab`,gp:`gnuplot`,plt:`gnuplot`,gnuplot:`gnuplot`,go:`go`,graphql:`graphql`,gql:`graphql`,groovy:`groovy`,gvy:`groovy`,hack:`hack`,haml:`haml`,hbs:`handlebars`,handlebars:`handlebars`,hs:`haskell`,lhs:`haskell`,hx:`haxe`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,fx:`hlsl`,html:`html`,htm:`html`,http:`http`,rest:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,cfg:`ini`,jade:`pug`,pug:`pug`,java:`java`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jinja:`jinja`,jinja2:`jinja`,j2:`jinja`,jison:`jison`,jl:`julia`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,libsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,kt:`kotlin`,kts:`kts`,kql:`kusto`,tex:`tex`,ltx:`tex`,lean:`lean4`,less:`less`,liquid:`liquid`,lit:`lit`,ll:`llvm`,logo:`logo`,lua:`lua`,luau:`luau`,Makefile:`makefile`,mk:`makefile`,makefile:`makefile`,md:`markdown`,markdown:`markdown`,marko:`marko`,m:`wolfram`,mat:`matlab`,mdc:`mdc`,mdx:`mdx`,wiki:`wikitext`,mediawiki:`wikitext`,mmd:`mermaid`,mermaid:`mermaid`,mips:`mipsasm`,mojo:`mojo`,"🔥":`mojo`,move:`move`,nar:`narrat`,nf:`nextflow`,nim:`nim`,nims:`nim`,nimble:`nim`,nix:`nix`,nu:`nushell`,mm:`objective-cpp`,ml:`ocaml`,mli:`ocaml`,mll:`ocaml`,mly:`ocaml`,pas:`pascal`,p:`pascal`,pl:`prolog`,pm:`perl`,t:`perl`,raku:`raku`,p6:`raku`,pl6:`raku`,php:`php`,phtml:`php`,pls:`plsql`,sql:`sql`,po:`po`,polar:`polar`,pcss:`postcss`,pot:`pot`,potx:`potx`,pq:`powerquery`,pqm:`powerquery`,ps1:`powershell`,psm1:`powershell`,psd1:`powershell`,prisma:`prisma`,pro:`prolog`,P:`prolog`,properties:`properties`,proto:`protobuf`,pp:`puppet`,purs:`purescript`,py:`python`,pyw:`python`,pyi:`python`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,R:`r`,rkt:`racket`,rktl:`racket`,razor:`razor`,cshtml:`razor`,rb:`ruby`,rbw:`ruby`,reg:`reg`,regex:`regexp`,rel:`rel`,rs:`rust`,rst:`rst`,rake:`ruby`,gemspec:`ruby`,jbuilder:`ruby`,builder:`ruby`,rabl:`ruby`,arb:`ruby`,ru:`ruby`,podspec:`ruby`,Gemfile:`ruby`,Rakefile:`ruby`,Guardfile:`ruby`,Capfile:`ruby`,Berksfile:`ruby`,Brewfile:`ruby`,Vagrantfile:`ruby`,Thorfile:`ruby`,Appraisals:`ruby`,Dangerfile:`ruby`,sas:`sas`,sass:`sass`,scala:`scala`,sc:`scala`,scm:`scheme`,ss:`scheme`,sld:`scheme`,scss:`scss`,sdbl:`sdbl`,shadergraph:`shader`,st:`smalltalk`,sol:`solidity`,sparql:`sparql`,rq:`sparql`,spl:`splunk`,config:`ssh-config`,do:`stata`,ado:`stata`,dta:`stata`,styl:`stylus`,stylus:`stylus`,svelte:`svelte`,swift:`swift`,sv:`system-verilog`,svh:`system-verilog`,service:`systemd`,socket:`systemd`,device:`systemd`,timer:`systemd`,talon:`talonscript`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`typescript`,mts:`typescript`,cts:`typescript`,tsp:`typespec`,tsv:`tsv`,tsx:`tsx`,ttl:`turtle`,twig:`twig`,typ:`typst`,vv:`v`,vala:`vala`,vapi:`vala`,vb:`vb`,vbs:`vb`,bas:`vb`,vh:`verilog`,vhd:`vhdl`,vhdl:`vhdl`,vim:`vimscript`,vue:`vue`,"vine.ts":`vue-vine`,vy:`vyper`,wasm:`wasm`,wat:`wasm`,wy:`文言`,wgsl:`wgsl`,wit:`wit`,wl:`wolfram`,nb:`wolfram`,xml:`xml`,xsl:`xsl`,xslt:`xsl`,yaml:`yaml`,yml:`yml`,zs:`zenscript`,zig:`zig`,zsh:`zsh`,sty:`tex`};function Em(e){if(wm.has(e))return wm.get(e)??`text`;if(Tm[e]!=null)return Tm[e];let t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(wm.has(t[1]))return wm.get(t[1])??`text`;if(Tm[t[1]]!=null)return Tm[t[1]]??`text`}let n=e.match(/\.([^.]+)$/)?.[1]??``;return wm.has(n)?wm.get(n)??`text`:Tm[n]??`text`}function Dm(e,{theme:t,preferredHighlighter:n=`shiki-js`}){return{langs:Array.isArray(e)?e:[e??`text`],themes:Et(t),preferredHighlighter:n}}function Om(e){return`annotation-${`side`in e?`${e.side}-`:``}${e.lineNumber}`}function km(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}function Am(e,t,n){let r=typeof n.lineInfo==`function`?n.lineInfo(t):n.lineInfo[t-1];if(r==null){let r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),Error(r)}return e.tagName=`div`,e.properties[`data-line`]=r.lineNumber,e.properties[`data-alt-line`]=r.altLineNumber,e.properties[`data-line-type`]=r.type,e.properties[`data-line-index`]=r.lineIndex,e.children.length===0&&e.children.push(Mp(`
82
+ `)),e}var jm=Symbol(`no-token`),Mm=Symbol(`multiple-tokens`);function Nm(e){let t=Pm(e);if(t!=null)return t;let n=jm,r=[],i=[],a,o=()=>{if(i.length===0||a==null){i=[],a=void 0;return}if(i.length===1){let e=i[0];if(e?.type===`element`){Im(e,a);for(let t of e.children)Fm(t)}else Fm(e);r.push(e),i=[],a=void 0;return}for(let e of i)Fm(e);r.push(Z({tagName:`span`,properties:{"data-char":a},children:i})),i=[],a=void 0},s=e=>{if(e!==jm){if(e===Mm){n=Mm;return}if(n===jm){n=e;return}n!==e&&(n=Mm)}};for(let t of e.children){let e=t.type===`element`?Nm(t):jm;if(s(e),typeof e!=`number`){o(),r.push(t);continue}a!=null&&a!==e&&o(),a??=e,i.push(t)}return o(),e.children=r,n}function Pm(e){let t=e.properties[`data-char`];if(typeof t==`number`)return t}function Fm(e){if(e.type===`element`){e.properties[`data-char`]=void 0;for(let t of e.children)Fm(t)}}function Im(e,t){e.properties[`data-char`]=t}function Lm(e={}){let{classPrefix:t=`__shiki_`,classSuffix:n=``,classReplacer:r=e=>e}=e,i=new Map;function a(e){return Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function o(e){let o=typeof e==`string`?e:a(e),s=t+Rm(o)+n;return s=r(s),i.has(s)||i.set(s,typeof e==`string`?e:{...e}),s}return{name:`@shikijs/transformers:style-to-class`,pre(e){if(!e.properties.style)return;let t=o(e.properties.style);delete e.properties.style,this.addClassToHast(e,t)},tokens(e){for(let t of e)for(let e of t){if(!e.htmlStyle)continue;let t=o(e.htmlStyle);e.htmlStyle={},e.htmlAttrs||={},e.htmlAttrs.class?e.htmlAttrs.class+=` ${t}`:e.htmlAttrs.class=t}},getClassRegistry(){return i},getCSS(){let e=``;for(let[t,n]of i.entries())e+=`.${t}{${typeof n==`string`?n:a(n)}}`;return e},clearRegistry(){i.clear()}}}function Rm(e,t=0){let n=3735928559^t,r=1103547991^t;for(let t=0,i;t<e.length;t++)i=e.charCodeAt(t),n=Math.imul(n^i,2654435761),r=Math.imul(r^i,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&r)+(n>>>0)).toString(36).slice(0,6)}function zm(e=!1,t=!1){let n={lineInfo:[]},r=[{line(e){return delete e.properties.class,e},pre(t){let r=Pp(t),i=[];if(r!=null){let t=1;for(let a of r.children)a.type===`element`&&(e&&Nm(a),i.push(Am(a,t,n)),t++);r.children=i}return t},...e?{tokens(e){for(let t of e){let e=0;for(let n of t){let t=n;t.__lineChar??=e,e+=n.content.length}}},preprocess(e,t){t.mergeWhitespaces=`never`},span(e,t,n,r,i){if(i?.offset!=null&&i.content!=null){let t=i.__lineChar;return t!=null&&(e.properties[`data-char`]=t),e}return e}}:null}];return t&&r.push(Vm,Bm),e&&r.push({line:e=>(e.type===`element`&&e.children.length===0&&e.children.push({type:`element`,tagName:`br`,properties:{},children:[]}),e)}),{state:n,transformers:r,toClass:Bm}}var Bm=Lm({classPrefix:`hl-`}),Vm={name:`token-style-normalizer`,tokens(e){for(let t of e)for(let e of t){if(e.htmlStyle!=null)continue;let t={};e.color!=null&&(t.color=e.color),e.bgColor!=null&&(t[`background-color`]=e.bgColor),e.fontStyle!=null&&e.fontStyle!==0&&(e.fontStyle&1&&(t[`font-style`]=`italic`),e.fontStyle&2&&(t[`font-weight`]=`bold`),e.fontStyle&4&&(t[`text-decoration`]=`underline`)),Object.keys(t).length>0&&(e.htmlStyle=t)}}};function Hm(e){return`--${e===`token`?`diffs-token`:`diffs`}-`}var Um=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,Wm=/^0(?:\.0+)?%?$/;function Gm(e){let t=e.indexOf(`(`);if(t<=0||!e.endsWith(`)`))return;let n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;let r=e.slice(t+1,-1).trim();if(r.length===0)return;let i=r.lastIndexOf(`/`);if(i!==-1)return r.slice(i+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){let e=r.split(`,`);if(e.length===4)return e[3]?.trim()}}function Km(e){let t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;let n=t[1],r,i=1;return n.length===3?r=n.split(``).map(e=>e+e).join(``):n.length===6?r=n:(r=n.slice(0,6),i=parseInt(n.slice(6,8),16)/255),[parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16),i]}function qm(e){if(e==null)return null;let t=Km(e);if(t==null)return null;let n=t[0]/255,r=t[1]/255,i=t[2]/255,a=e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4;return .2126*a(n)+.7152*a(r)+.0722*a(i)}function Jm(e){if(e==null)return!1;let t=e.trim().toLowerCase();if(t===`transparent`||Um.test(t))return!0;let n=Gm(t);return n!=null&&Wm.test(n)}function Ym(e,t,n){if(t==null||n==null)return!1;let r=qm(e),i=qm(t),a=qm(n);return r==null||i==null||a==null?!1:Math.abs(r-a)<Math.abs(r-i)}var Xm=new WeakMap;function Zm(e){let t=Xm.get(e);if(t!=null)return t;let n=e.colors??{},r={...n},i=n[`editor.background`]??e.bg,a=n[`editor.foreground`]??e.fg,o=n[`sideBar.background`]??i,s=n[`sideBar.foreground`]??a;Qm(r,`editor.background`,i),Qm(r,`editor.foreground`,a),Qm(r,`sideBar.background`,o),Qm(r,`sideBar.foreground`,s),Qm(r,`input.background`,n[`input.background`]??o),Qm(r,`sideBarSectionHeader.foreground`,n[`sideBarSectionHeader.foreground`]??s),Qm(r,`list.activeSelectionForeground`,n[`list.activeSelectionForeground`]??s),Qm(r,`gitDecoration.addedResourceForeground`,$m(n[`gitDecoration.addedResourceForeground`],n[`terminal.ansiGreen`],n[`editorGutter.addedBackground`])),Qm(r,`gitDecoration.modifiedResourceForeground`,$m(n[`gitDecoration.modifiedResourceForeground`],n[`terminal.ansiBlue`],n[`editorGutter.modifiedBackground`])),Qm(r,`gitDecoration.deletedResourceForeground`,$m(n[`gitDecoration.deletedResourceForeground`],n[`terminal.ansiRed`],n[`editorGutter.deletedBackground`]));let c=(Jm(n[`list.focusOutline`])?void 0:n[`list.focusOutline`])??(Jm(n.focusBorder)?void 0:n.focusBorder);c==null?delete r[`list.focusOutline`]:r[`list.focusOutline`]=c;let l=n[`list.hoverBackground`];l!=null&&(eh(l,o)||Ym(l,o,s))&&delete r[`list.hoverBackground`];let u=Object.freeze({...e,colors:Object.freeze(r)});return Xm.set(e,u),u}function Qm(e,t,n){n!=null&&n!==``&&(e[t]=n)}function $m(...e){for(let t of e)if(t!=null&&t!==``)return t}function eh(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function th({theme:e=Ee,highlighter:t,prefix:n}){let r=``;if(typeof e==`string`){let i=t.getTheme(e),a=Zm(i);r+=`color:${a.fg};`,r+=`background-color:${a.bg};`,r+=`${Hm(`global`)}fg:${a.fg};`,r+=`${Hm(`global`)}bg:${a.bg};`,r+=nh(i,n)}else{let n=t.getTheme(e.dark),i=Zm(n);r+=`${Hm(`global`)}dark:${i.fg};`,r+=`${Hm(`global`)}dark-bg:${i.bg};`,r+=nh(n,`dark`),n=t.getTheme(e.light),i=Zm(n),r+=`${Hm(`global`)}light:${i.fg};`,r+=`${Hm(`global`)}light-bg:${i.bg};`,r+=nh(n,`light`)}return r}function nh(e,t){t=t==null?``:`${t}-`;let n=``,r=e.colors?.[`gitDecoration.addedResourceForeground`]??e.colors?.[`terminal.ansiGreen`];r!=null&&(n+=`${Hm(`global`)}${t}addition-color:${r};`);let i=e.colors?.[`gitDecoration.deletedResourceForeground`]??e.colors?.[`terminal.ansiRed`];i!=null&&(n+=`${Hm(`global`)}${t}deletion-color:${i};`);let a=e.colors?.[`gitDecoration.modifiedResourceForeground`]??e.colors?.[`terminal.ansiBlue`];return a!=null&&(n+=`${Hm(`global`)}${t}modified-color:${a};`),n}function rh(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t.children;t=`children`in t?t.children[0]:null}throw console.error(e),Error(`getLineNodes: Unable to find children`)}function ih(e,t){for(let n of t)e.push(n)}var ah=`-1,-1`;function oh(e){return e?.some(e=>e.lineNumber===0)??!1}function sh(e){let t=e[0];return t!=null&&t.length>0?t:void 0}function ch(e){return e.startingLine===0&&e.totalLines>0}function lh(e,t){return e.endsWith(`\r
83
+ `)?t+`\r
84
+ `:e.endsWith(`\r`)?t+`\r`:e.endsWith(`
85
+ `)?t+`
86
+ `:t}function uh(e,t){return Z({tagName:`div`,children:e,properties:{"data-content":``,style:`grid-row: span ${t}`}})}var dh=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
87
+ <symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
88
+ <path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
89
+ </symbol>
90
+ <symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
91
+ <path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>
92
+ </symbol>
93
+ <symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
94
+ <path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>
95
+ </symbol>
96
+ <symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
97
+ <path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>
98
+ </symbol>
99
+ <symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
100
+ <path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>
101
+ </symbol>
102
+ <symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
103
+ <path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>
104
+ </symbol>
105
+ <symbol id="diffs-icon-expand" viewBox="0 0 16 16">
106
+ <path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>
107
+ </symbol>
108
+ <symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
109
+ <path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>
110
+ </symbol>
111
+ <symbol id="diffs-icon-eye-slash" viewBox="0 0 16 16">
112
+ <path d="m13.47 1.47-12 12 1.06 1.06 12-12zM8 14c-.92 0-1.802-.208-2.624-.547l1.173-1.174c.476.142.963.221 1.451.221 1.66 0 3.307-.949 4.626-2.196a10.4 10.4 0 0 0 1.494-1.751A5 5 0 0 0 14.443 8a5 5 0 0 0-.323-.553 10 10 0 0 0-1.238-1.5l1.061-1.062C15.222 6.173 16 7.511 16 8c0 1.05-3.582 6-8 6"/><path d="M8 11q-.084 0-.167-.005l3.162-3.162q.006.083.005.167a3 3 0 0 1-3 3M5.005 8.167l3.162-3.162a3 3 0 0 0-3.162 3.162"/><path d="M8 3.5c.485 0 .97.081 1.445.227l1.168-1.169C9.794 2.212 8.915 2 8 2 3.582 2 0 6.8 0 8c0 .555.766 1.88 2.027 3.144l1.06-1.06a9.5 9.5 0 0 1-1.203-1.461 4.3 4.3 0 0 1-.345-.617L1.536 8l.003-.006c.064-.149.176-.359.345-.617a9.8 9.8 0 0 1 1.482-1.73C4.675 4.427 6.326 3.5 8 3.5"/>
113
+ </symbol>
114
+ <symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
115
+ <path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>
116
+ </symbol>
117
+ <symbol id="diffs-icon-plus" viewBox="0 0 16 16">
118
+ <path d="M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3"/>
119
+ </symbol>
120
+ <symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
121
+ <path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
122
+ </symbol>
123
+ <symbol id="diffs-icon-symbol-added-duo" viewBox="0 0 16 16">
124
+ <path d="M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8" opacity=".2"/><path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/>
125
+ </symbol>
126
+ <symbol id="diffs-icon-symbol-added-fill" viewBox="0 0 16 16">
127
+ <path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8m0 4a.75.75 0 0 0-.75.75v2.5h-2.5a.75.75 0 0 0 0 1.5h2.5v2.5a.75.75 0 0 0 1.5 0v-2.5h2.5a.75.75 0 0 0 0-1.5h-2.5v-2.5A.75.75 0 0 0 8 4" clip-rule="evenodd"/>
128
+ </symbol>
129
+ <symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
130
+ <path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
131
+ </symbol>
132
+ <symbol id="diffs-icon-symbol-deleted-duo" viewBox="0 0 16 16">
133
+ <path d="M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8" opacity=".2"/><path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/>
134
+ </symbol>
135
+ <symbol id="diffs-icon-symbol-deleted-fill" viewBox="0 0 16 16">
136
+ <path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8M4.75 7.25a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5z" clip-rule="evenodd"/>
137
+ </symbol>
138
+ <symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
139
+ <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
140
+ </symbol>
141
+ <symbol id="diffs-icon-symbol-diffstat-duo" viewBox="0 0 16 16">
142
+ <path d="M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8" opacity=".2"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
143
+ </symbol>
144
+ <symbol id="diffs-icon-symbol-diffstat-fill" viewBox="0 0 16 16">
145
+ <path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8M5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5zM8 3.546a.75.75 0 0 0-.75.75V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2V4.296a.75.75 0 0 0-.75-.75" clip-rule="evenodd"/>
146
+ </symbol>
147
+ <symbol id="diffs-icon-symbol-extracted" viewBox="0 0 16 16">
148
+ <path d="M8.25 4.25a.75.75 0 0 1 0 1.5H6.81l3.302 3.302a1.5 1.5 0 1 1-1.06 1.06L5.75 6.811V8.25a.75.75 0 0 1-1.5 0V5A.75.75 0 0 1 5 4.25z"/><path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8m0 1.5c-1.613 0-2.807.089-3.704.288-.88.196-1.382.477-1.706.802-.325.324-.606.826-.802 1.706C1.588 5.193 1.5 6.387 1.5 8s.089 2.807.288 3.704c.196.88.477 1.382.802 1.706.324.325.826.606 1.706.802.897.2 2.091.288 3.704.288s2.807-.089 3.704-.288c.88-.196 1.382-.477 1.706-.802.325-.324.606-.826.802-1.706.2-.897.288-2.091.288-3.704s-.089-2.807-.288-3.704c-.196-.88-.477-1.382-.802-1.706-.324-.325-.826-.606-1.706-.802C10.807 1.588 9.613 1.5 8 1.5" clip-rule="evenodd"/>
149
+ </symbol>
150
+ <symbol id="diffs-icon-symbol-extracted-duo" viewBox="0 0 16 16">
151
+ <path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8" clip-rule="evenodd" opacity=".2"/><path d="M8.25 4.25a.75.75 0 0 1 0 1.5H6.81l3.302 3.302a1.5 1.5 0 1 1-1.06 1.06L5.75 6.811V8.25a.75.75 0 0 1-1.5 0V5A.75.75 0 0 1 5 4.25z"/>
152
+ </symbol>
153
+ <symbol id="diffs-icon-symbol-extracted-fill" viewBox="0 0 16 16">
154
+ <path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8M5 4.25a.75.75 0 0 0-.75.75v3.25a.75.75 0 0 0 1.5 0V6.81l3.302 3.302a1.5 1.5 0 1 0 1.06-1.06L6.811 5.75H8.25a.75.75 0 0 0 0-1.5z" clip-rule="evenodd"/>
155
+ </symbol>
156
+ <symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
157
+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>
158
+ </symbol>
159
+ <symbol id="diffs-icon-symbol-ignored-duo" viewBox="0 0 16 16">
160
+ <path d="M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8" opacity=".2"/><path d="M11.53 4.47a.75.75 0 0 1 0 1.06l-6 6a.75.75 0 0 1-1.06-1.06l6-6a.75.75 0 0 1 1.06 0"/>
161
+ </symbol>
162
+ <symbol id="diffs-icon-symbol-ignored-fill" viewBox="0 0 16 16">
163
+ <path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8m3.53 4.47a.75.75 0 0 0-1.06 0l-6 6a.75.75 0 1 0 1.06 1.06l6-6a.75.75 0 0 0 0-1.06" clip-rule="evenodd"/>
164
+ </symbol>
165
+ <symbol id="diffs-icon-symbol-inlined" viewBox="0 0 16 16">
166
+ <path d="M7.75 11.75a.75.75 0 0 1 0-1.5h1.44L5.887 6.948a1.5 1.5 0 1 1 1.06-1.06l3.302 3.301V7.75a.75.75 0 0 1 1.5 0V11a.75.75 0 0 1-.75.75z"/><path fill-rule="evenodd" d="M8 16c-6.588 0-8-1.412-8-8s1.412-8 8-8 8 1.412 8 8-1.412 8-8 8m0-1.5c1.613 0 2.807-.089 3.704-.288.88-.196 1.382-.477 1.706-.802.325-.324.606-.826.802-1.706.2-.897.288-2.091.288-3.704s-.089-2.807-.288-3.704c-.196-.88-.477-1.382-.802-1.706-.324-.325-.826-.606-1.706-.802C10.807 1.588 9.613 1.5 8 1.5s-2.807.089-3.704.288c-.88.196-1.382.477-1.706.802-.325.324-.606.826-.802 1.706C1.588 5.193 1.5 6.387 1.5 8s.089 2.807.288 3.704c.196.88.477 1.382.802 1.706.324.325.826.606 1.706.802.897.2 2.091.288 3.704.288" clip-rule="evenodd"/>
167
+ </symbol>
168
+ <symbol id="diffs-icon-symbol-inlined-duo" viewBox="0 0 16 16">
169
+ <path fill-rule="evenodd" d="M8 16c-6.588 0-8-1.412-8-8s1.412-8 8-8 8 1.412 8 8-1.412 8-8 8" clip-rule="evenodd" opacity=".2"/><path d="M7.75 11.75a.75.75 0 0 1 0-1.5h1.44L5.887 6.948a1.5 1.5 0 1 1 1.06-1.06l3.302 3.301V7.75a.75.75 0 0 1 1.5 0V11a.75.75 0 0 1-.75.75z"/>
170
+ </symbol>
171
+ <symbol id="diffs-icon-symbol-inlined-fill" viewBox="0 0 16 16">
172
+ <path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8M5.5 4a1.5 1.5 0 1 0 .388 2.948l3.301 3.302H7.75a.75.75 0 0 0 0 1.5H11a.75.75 0 0 0 .75-.75V7.75a.75.75 0 0 0-1.5 0v1.44L6.948 5.887A1.5 1.5 0 0 0 5.5 4" clip-rule="evenodd"/>
173
+ </symbol>
174
+ <symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
175
+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>
176
+ </symbol>
177
+ <symbol id="diffs-icon-symbol-modified-duo" viewBox="0 0 16 16">
178
+ <path d="M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8" opacity=".2"/><path d="M11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0"/>
179
+ </symbol>
180
+ <symbol id="diffs-icon-symbol-modified-fill" viewBox="0 0 16 16">
181
+ <path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8m0 5a3 3 0 1 0 0 6 3 3 0 0 0 0-6" clip-rule="evenodd"/>
182
+ </symbol>
183
+ <symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
184
+ <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
185
+ </symbol>
186
+ <symbol id="diffs-icon-symbol-moved-duo" viewBox="0 0 16 16">
187
+ <path d="M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8" opacity=".2"/><path d="M8.496 4.695a.75.75 0 0 0-.051 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.051 1.06L6.49 8.003 4.693 9.998a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
188
+ </symbol>
189
+ <symbol id="diffs-icon-symbol-moved-fill" viewBox="0 0 16 16">
190
+ <path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8m1.555 4.745a.75.75 0 0 0-1.11 1.01L10.486 8l-2.04 2.245a.75.75 0 0 0 1.109 1.01l2.5-2.75a.75.75 0 0 0 0-1.01zm-4 0a.75.75 0 0 0-1.11 1.01l2.043 2.248-1.796 1.995a.75.75 0 0 0 1.116 1.004l2.25-2.5a.75.75 0 0 0-.003-1.007z" clip-rule="evenodd"/>
191
+ </symbol>
192
+ <symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
193
+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
194
+ </symbol>
195
+ </svg>`;function fh(e,t){return e==null||t==null?e===t:mh(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackground===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}var ph={};function mh(e=ph,t=ph){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}function hh(e){let t=document.createElement(`div`);return t.dataset.annotationSlot=``,t.slot=e,t.style.whiteSpace=`normal`,t}function gh(){let e=document.createElement(`div`);return e.slot=`gutter-utility-slot`,e.style.position=`absolute`,e.style.top=`0`,e.style.bottom=`0`,e.style.textAlign=`center`,e.style.whiteSpace=`normal`,e.style.touchAction=`none`,e}function _h(){let e=document.createElement(`style`);return e.setAttribute(rt,``),e}var vh=`@layer base,theme,rendered,unsafe;@layer base{:host{--diffs-font-fallback:"SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono", "Courier New", monospace;--diffs-header-font-fallback:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;--diffs-mixer:light-dark(#000,#fff);--diffs-gap-fallback:8px;--diffs-scrollbar-gutter-fallback:6px;--diffs-scrollbar-gutter:var(--diffs-scrollbar-gutter-override,var(--diffs-scrollbar-gutter-measured,var(--diffs-scrollbar-gutter-fallback)));--diffs-added-light:#0dbe4e;--diffs-added-dark:#5ecc71;--diffs-modified-light:#009fff;--diffs-modified-dark:#69b1ff;--diffs-deleted-light:#ff2e3f;--diffs-deleted-dark:#ff6762;--diffs-warning-light:#d5a910;--diffs-warning-dark:#ffd452;color-scheme:light dark;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);font-feature-settings:var(--diffs-font-features);--diffs-bg:light-dark(var(--diffs-light-bg,#fff),var(--diffs-dark-bg,#000));--diffs-bg-buffer:var(--diffs-bg-buffer-override,light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));--diffs-bg-context:var(--diffs-bg-context-override,light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));--diffs-bg-context-gutter:var(--diffs-bg-context-gutter-override,light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)),color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));--diffs-bg-separator:var(--diffs-bg-separator-override,light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));--diffs-fg:light-dark(var(--diffs-light,#000),var(--diffs-dark,#fff));--diffs-fg-number:var(--diffs-fg-number-override,light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)),color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));--diffs-fg-conflict-marker:var(--diffs-fg-conflict-marker-override,var(--diffs-fg-number));--diffs-deletion-base:var(--diffs-deletion-color-override,light-dark(var(--diffs-light-deletion-color,var(--diffs-deletion-color,var(--diffs-deleted-light))),var(--diffs-dark-deletion-color,var(--diffs-deletion-color,var(--diffs-deleted-dark)))));--diffs-addition-base:var(--diffs-addition-color-override,light-dark(var(--diffs-light-addition-color,var(--diffs-addition-color,var(--diffs-added-light))),var(--diffs-dark-addition-color,var(--diffs-addition-color,var(--diffs-added-dark)))));--diffs-modified-base:var(--diffs-modified-color-override,light-dark(var(--diffs-light-modified-color,var(--diffs-modified-color,var(--diffs-modified-light))),var(--diffs-dark-modified-color,var(--diffs-modified-color,var(--diffs-modified-dark)))));--diffs-bg-deletion:var(--diffs-bg-deletion-override,light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)),color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));--diffs-bg-deletion-emphasis:var(--diffs-bg-deletion-emphasis-override,light-dark(rgb(from var(--diffs-deletion-base) r g b / .15),rgb(from var(--diffs-deletion-base) r g b / .2)));--diffs-bg-addition:var(--diffs-bg-addition-override,light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)),color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));--diffs-bg-addition-emphasis:var(--diffs-bg-addition-emphasis-override,light-dark(rgb(from var(--diffs-addition-base) r g b / .15),rgb(from var(--diffs-addition-base) r g b / .2)));--diffs-selection-base:var(--diffs-modified-base);--diffs-selection-number-fg:light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));background-color:var(--diffs-bg);color:var(--diffs-fg);display:block}pre,code,[data-error-wrapper]{isolation:isolate;font-family:var(--diffs-font-family,var(--diffs-font-fallback));outline:none;margin:0;padding:0;display:block}pre,code{background-color:var(--diffs-bg)}code{contain:content}input,button{font-family:inherit;font-size:inherit;line-height:inherit}*,:before,:after{box-sizing:border-box}[data-icon-sprite]{display:none}[data-diffs-header],[data-separator]{font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback))}[data-diffs-header][data-sticky]{z-index:1;background-color:var(--diffs-bg);position:sticky;top:0}[data-file-info]{color:var(--fg);background-color:color-mix(in lab, var(--bg) 98%, var(--fg));border-block:1px solid color-mix(in lab, var(--bg) 95%, var(--fg));padding:10px;font-weight:700}[data-diff],[data-file]{--diffs-grid-number-column-width:minmax(min-content, max-content);--diffs-code-grid:var(--diffs-grid-number-column-width) 1fr;&[data-dehydrated]{--diffs-code-grid:var(--diffs-grid-number-column-width) minmax(0, 1fr)}&:hover [data-code]::-webkit-scrollbar-thumb{background-color:var(--diffs-bg-context)}}@supports (-webkit-touch-callout:none){:host{--diffs-scrollbar-gutter-fallback:0px}}[data-line] span,[data-edit-prediction-suffix] span{color:light-dark(var(--diffs-token-light,var(--diffs-light)),var(--diffs-token-dark,var(--diffs-dark)));background-color:light-dark(var(--diffs-token-light-bg,inherit),var(--diffs-token-dark-bg,inherit));font-weight:light-dark(var(--diffs-token-light-font-weight,inherit),var(--diffs-token-dark-font-weight,inherit));font-style:light-dark(var(--diffs-token-light-font-style,inherit),var(--diffs-token-dark-font-style,inherit));text-decoration:light-dark(var(--diffs-token-light-text-decoration,inherit),var(--diffs-token-dark-text-decoration,inherit))}[data-line],[data-gutter-buffer],[data-column-number],[data-line-annotation],[data-no-newline],[data-merge-conflict],[data-merge-conflict-actions],[data-editor-overlay]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-computed-editor-active-line-bg:var(--diffs-computed-selected-line-bg);--diffs-computed-hovered-line-bg:var(--diffs-computed-editor-active-line-bg);--diffs-hover-mix-target:var(--diffs-bg-hover-override,var(--diffs-mixer));--diffs-line-bg:var(--diffs-computed-hovered-line-bg);color:var(--diffs-fg);background-color:var(--diffs-line-bg,var(--diffs-bg))}[data-line],[data-no-newline]{&[data-decoration-bg]{--mix-deco-light:92%;--mix-deco-dark:85%;&[data-decoration-bg-depth="2"]{--mix-deco-light:88%;--mix-deco-dark:80%}&[data-decoration-bg-depth="3"]{--mix-deco-light:85%;--mix-deco-dark:78%}--diffs-hover-mix-target:var(--diffs-decoration-bg);--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) var(--mix-deco-light), var(--diffs-decoration-bg)),color-mix(in lab, var(--diffs-bg) var(--mix-deco-dark), var(--diffs-decoration-bg)))}}[data-line-annotation],[data-gutter-buffer=annotation]{--diffs-annotation-bg:var(--diffs-bg-context);--diffs-computed-decoration-bg:var(--diffs-annotation-bg);--diffs-hover-mix-target:var(--diffs-computed-editor-active-line-bg)}[data-merge-conflict-actions],[data-gutter-buffer=merge-conflict-action],[data-gutter-buffer=merge-conflict-marker-base],[data-gutter-buffer=merge-conflict-marker-separator],[data-merge-conflict=marker-base],[data-merge-conflict=marker-separator]{--diffs-computed-decoration-bg:var(--diffs-bg-context);--diffs-hover-mix-target:var(--diffs-computed-editor-active-line-bg)}[data-gutter-buffer=merge-conflict-marker-start],[data-merge-conflict=marker-start]{--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) 78%, var(--conflict-bg-current-header-override,var(--diffs-addition-base))),color-mix(in lab, var(--diffs-bg) 68%, var(--conflict-bg-current-header-override,var(--diffs-addition-base))));--diffs-hover-mix-target:var(--diffs-computed-editor-active-line-bg)}[data-gutter-buffer=merge-conflict-marker-end],[data-merge-conflict=marker-end]{--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) 78%, var(--conflict-bg-incoming-header-override,var(--diffs-modified-base))),color-mix(in lab, var(--diffs-bg) 68%, var(--conflict-bg-incoming-header-override,var(--diffs-modified-base))));--diffs-hover-mix-target:var(--diffs-computed-editor-active-line-bg)}[data-has-merge-conflict] [data-line-annotation],[data-has-merge-conflict] [data-gutter-buffer=annotation]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-hover-mix-target:var(--diffs-computed-editor-active-line-bg)}:where([data-background]){& [data-gutter-buffer],& [data-column-number]{--mix-light:91%;--mix-dark:85%}& [data-line],& [data-no-newline]{--mix-light:88%;--mix-dark:80%}& [data-gutter-buffer],& [data-column-number],& [data-line],& [data-no-newline]{--diffs-diff-line-mix-target:var(--diffs-bg);&[data-line-type=change-deletion]{--diffs-diff-line-mix-target:var(--diffs-bg-deletion-override,var(--diffs-deletion-base));--diffs-hover-mix-target:var(--diffs-diff-line-mix-target);&:where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-deletion-override,var(--diffs-deletion-base));--diffs-diff-line-mix-target:var(--diffs-bg-deletion-number-override,var(--diffs-deletion-base))}--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)))}&[data-line-type=change-addition]{--diffs-diff-line-mix-target:var(--diffs-bg-addition-override,var(--diffs-addition-base));--diffs-hover-mix-target:var(--diffs-diff-line-mix-target);&:where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-addition-override,var(--diffs-addition-base));--diffs-diff-line-mix-target:var(--diffs-bg-addition-number-override,var(--diffs-addition-base))}--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)))}&[data-merge-conflict=current]{--diffs-diff-line-mix-target:var(--conflict-bg-current-override,var(--diffs-addition-base));--diffs-hover-mix-target:var(--diffs-diff-line-mix-target);&:where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-addition-override,var(--diffs-addition-base));--diffs-diff-line-mix-target:var(--conflict-bg-current-number-override,var(--diffs-addition-base))}--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)))}&[data-merge-conflict=incoming]{--diffs-diff-line-mix-target:var(--conflict-bg-incoming-override,var(--diffs-modified-base));--diffs-hover-mix-target:var(--diffs-diff-line-mix-target);&:where([data-gutter-buffer],[data-column-number]){color:var(--diffs-modified-base);--diffs-diff-line-mix-target:var(--conflict-bg-incoming-number-override,var(--diffs-modified-base))}--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)))}}}[data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline],[data-editor-overlay]{--diffs-selection-mix-target:var(--diffs-bg-selection-override,var(--diffs-selection-base));--diffs-selection-emphasis-mix-target:var(--diffs-selection-mix-target);&:where([data-editor-overlay]),&:where([data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline])[data-selected-line]{--mix-selection-light:82%;--mix-selection-dark:75%;--diffs-hover-mix-target:var(--diffs-selection-mix-target)}&:where([data-gutter-buffer][data-selected-line],[data-column-number]:is([data-selected-line],[data-editor-active-line])){--mix-selection-light:75%;--mix-selection-dark:60%;--diffs-selection-mix-target:var(--diffs-bg-selection-number-override,var(--diffs-selection-base));--diffs-hover-mix-target:var(--diffs-selection-mix-target)}&:where([data-line][data-selected-line]):is([data-line-type=change-addition],[data-line-type=change-deletion]){--diffs-selection-emphasis-mix-target:light-dark(color-mix(in lab, var(--diffs-diff-line-mix-target,var(--diffs-selection-mix-target)) var(--mix-selection-light), var(--diffs-selection-mix-target)),var(--diffs-selection-mix-target))}&:where([data-editor-overlay]),&[data-selected-line]{--diffs-computed-selected-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-diff-line-bg) var(--mix-selection-light), var(--diffs-selection-mix-target)),color-mix(in lab, var(--diffs-computed-diff-line-bg) var(--mix-selection-dark), var(--diffs-selection-mix-target)))}}[data-line][data-editor-active-line],[data-column-number][data-editor-active-line]{--diffs-computed-editor-active-line-bg:color-mix(in lab, var(--diffs-computed-selected-line-bg) var(--diffs-editor-active-line-source-mix,100%), var(--diffs-selection-emphasis-mix-target))}@media (pointer:fine){[data-line][data-hovered],[data-gutter-buffer][data-hovered],[data-column-number][data-hovered],[data-line-annotation][data-hovered],[data-no-newline][data-hovered],[data-merge-conflict][data-hovered],[data-merge-conflict-actions][data-hovered],[data-editor-overlay][data-hovered]{--diffs-computed-hovered-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-editor-active-line-bg) 97%, var(--diffs-hover-mix-target)),color-mix(in lab, var(--diffs-computed-editor-active-line-bg) 91%, var(--diffs-hover-mix-target)))}}[data-gutter-buffer][data-selected-line],[data-column-number]:is([data-selected-line],[data-editor-active-line]){color:var(--diffs-selection-number-fg)}[data-no-newline]{user-select:none;& span{opacity:.6}}[data-diff-type=split][data-overflow=scroll]{grid-template-columns:1fr 1fr;display:grid;& [data-additions]{border-left:1px solid var(--diffs-bg)}& [data-deletions]{border-right:1px solid var(--diffs-bg)}}[data-code]{grid-auto-flow:dense;grid-template-columns:var(--diffs-code-grid);overflow:var(--diffs-overflow-override,scroll) clip;overscroll-behavior-x:none;tab-size:var(--diffs-tab-size,2);padding-top:var(--diffs-gap-block,var(--diffs-gap-fallback));padding-bottom:max(0px, calc(var(--diffs-gap-block,var(--diffs-gap-fallback)) - var(--diffs-scrollbar-gutter)));scrollbar-gutter:stable;align-self:flex-start;display:grid}[data-diffs-scrollbar-measure]{opacity:0;pointer-events:none;scrollbar-gutter:auto;grid-template-columns:none;width:100px;height:100px;padding:0;position:absolute;top:-200px;left:-200px}[data-container-size]{container-type:inline-size}[data-code]::-webkit-scrollbar{width:0;height:var(--diffs-scrollbar-gutter)}[data-code]::-webkit-scrollbar-track{background:0 0}[data-code]::-webkit-scrollbar-thumb{background-color:#0000;background-clip:content-box;border:1px solid #0000;border-radius:3px}[data-code]::-webkit-scrollbar-corner{background-color:#0000}@supports ((-moz-appearance:none)){[data-code]{scrollbar-width:thin;scrollbar-color:var(--diffs-bg-context) transparent;padding-bottom:var(--diffs-gap-block,var(--diffs-gap-fallback))}}[data-diffs-header]~[data-diff],[data-diffs-header]~[data-file]{& [data-code],&[data-overflow=wrap],&[data-dehydrated][data-diff-type=split][data-overflow=scroll]{padding-top:0}}[data-gutter]{grid-template-rows:subgrid;grid-template-columns:subgrid;z-index:3;background-color:var(--diffs-bg);grid-column:1;display:grid;position:relative;& [data-gutter-buffer],& [data-column-number]{border-right:var(--diffs-gap-style,2px solid var(--diffs-bg))}}[data-content]{grid-template-rows:subgrid;grid-template-columns:subgrid;background-color:var(--diffs-bg);grid-column:2;min-width:0;display:grid}[data-diff-type=split][data-overflow=wrap],[data-dehydrated][data-diff-type=split][data-overflow=scroll]{grid-auto-flow:dense;grid-template-columns:repeat(2, var(--diffs-code-grid));padding-block:var(--diffs-gap-block,var(--diffs-gap-fallback));display:grid;& [data-code]{display:contents}& [data-deletions]{& [data-gutter]{grid-column:1}& [data-content]{border-right:1px solid var(--diffs-bg);grid-column:2}}& [data-additions]{& [data-gutter]{border-left:1px solid var(--diffs-bg);grid-column:3}& [data-content]{grid-column:4}}}[data-dehydrated][data-diff-type=split][data-overflow=scroll] [data-content]{overflow:clip}[data-overflow=scroll] [data-gutter]{position:sticky;left:0}[data-interactive-lines] [data-line]{cursor:pointer}[data-interactive-line-numbers] [data-column-number]{cursor:pointer;touch-action:none}[data-content-buffer],[data-gutter-buffer]{user-select:none;min-height:1lh;position:relative}[data-gutter-buffer]{padding-left:2ch;padding-right:1ch;&:before{content:"";min-width:var(--diffs-min-number-column-width,var(--diffs-min-number-column-width-default,3ch));display:block}}[data-gutter-buffer=annotation]{--diffs-annotation-bg:var(--diffs-bg-context-gutter);min-height:0}[data-gutter-buffer=buffer]{--diffs-line-bg:var(--diffs-bg-context-gutter)}[data-content-buffer]{background-position:5px 0;background-size:8px 8px;background-origin:border-box;background-image:repeating-linear-gradient(-45deg, transparent, transparent calc(3px * 1.414), var(--diffs-bg-buffer) calc(3px * 1.414), var(--diffs-bg-buffer) calc(4px * 1.414));grid-column:1}[data-separator]{box-sizing:content-box;background-color:var(--diffs-bg)}[data-separator=simple]{min-height:4px}[data-separator=line-info],[data-separator=line-info-basic],[data-separator=metadata],[data-separator=simple]{background-color:var(--diffs-bg-separator)}[data-separator=line-info],[data-separator=line-info-basic],[data-separator=metadata]{height:32px;position:relative}[data-separator-wrapper]{user-select:none;fill:currentColor;background-color:var(--diffs-bg);align-items:center;height:100%;display:flex;position:absolute;inset-inline:0}[data-content] [data-separator-wrapper]{display:none}[data-separator=metadata] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);height:100%;color:var(--diffs-fg-number);white-space:nowrap;text-overflow:ellipsis;min-width:min-content;padding-inline:1ch;inset-inline:100% auto;overflow:hidden}[data-separator=line-info]{margin-block:var(--diffs-gap-block,var(--diffs-gap-fallback));& [data-separator-wrapper]{min-width:16px}}[data-separator=line-info-basic],[data-separator=metadata]{margin-block:0}[data-separator=line-info][data-separator-first]{margin-top:0}[data-separator=line-info][data-separator-last]{margin-bottom:0}[data-expand-index] [data-separator-wrapper]{grid-template-columns:32px auto;display:grid}[data-expand-index] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:32px 32px auto}[data-expand-button],[data-separator-content]{background-color:var(--diffs-bg-separator);flex:none;align-items:center;display:flex}[data-expand-index] [data-separator-content]:hover{cursor:pointer;text-decoration:underline}[data-expand-button]{cursor:pointer;min-width:32px;color:var(--diffs-fg-number);border-right:2px solid var(--diffs-bg);flex-shrink:0;justify-content:center;align-self:stretch;&:hover{color:var(--diffs-fg)}&[data-expand-all-button]{display:none}}[data-expand-down] [data-icon]{transform:scaleY(-1)}[data-separator-content]{height:100%;color:var(--diffs-fg-number);flex:auto;justify-content:flex-start;padding:0 1ch;overflow:hidden}[data-separator=line-info],[data-separator=line-info-basic]{& [data-separator-content]{user-select:none;height:100%;overflow:clip}}[data-unmodified-lines]{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;display:block;overflow:hidden}@supports (width:1cqi){[data-unified]{& [data-separator=line-info] [data-separator-wrapper]{padding-inline:var(--diffs-gap-inline,var(--diffs-gap-fallback));width:100cqi;& [data-separator-content]{border-radius:6px}}& [data-separator=line-info][data-expand-index] [data-separator-wrapper] [data-separator-content]{border-top-left-radius:unset;border-bottom-left-radius:unset}}[data-gutter]{& [data-separator=line-info] [data-separator-wrapper]{padding-left:var(--diffs-gap-inline,var(--diffs-gap-fallback))}& [data-separator=line-info] [data-separator-content]{border-top-left-radius:6px;border-bottom-left-radius:6px}& [data-separator=line-info][data-expand-index] [data-separator-content]{border-top-left-radius:unset;border-bottom-left-radius:unset}}[data-additions]{& [data-content] [data-separator=line-info]{background-color:var(--diffs-bg);& [data-separator-wrapper]{display:none}}& [data-gutter] [data-separator=line-info] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);border-top-right-radius:6px;border-bottom-right-radius:6px;height:100%;display:block;& [data-separator-content],& [data-expand-button]{display:none}}}[data-overflow=scroll] [data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]{width:calc(100cqi - var(--diffs-gap-inline,var(--diffs-gap-fallback)))}[data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);height:100%;margin-right:var(--diffs-gap-inline,var(--diffs-gap-fallback));border-top-right-radius:6px;border-bottom-right-radius:6px;display:block;& [data-separator-content],& [data-expand-button]{display:none}}[data-separator=line-info] [data-separator-wrapper]{& [data-expand-both],& [data-expand-down],& [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}}@media (pointer:fine){[data-separator=line-info] [data-separator-wrapper]{&[data-separator-multi-button]{& [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:unset}& [data-expand-down]{border-bottom-left-radius:6px;border-top-left-radius:unset}}}}}@media (pointer:coarse){[data-separator=line-info-basic] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:34px 34px auto;& [data-separator-content]{grid-column:unset;grid-row:unset}}@supports (width:1cqi){[data-separator=line-info] [data-separator-wrapper]{& [data-expand-both],& [data-expand-down],& [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}&[data-separator-multi-button]{& [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}& [data-expand-down]{border-bottom-left-radius:unset;border-top-left-radius:unset}}}}}@media (pointer:fine){[data-separator-wrapper][data-separator-multi-button]{grid-template-rows:50% 50%;display:grid;& [data-separator-content]{grid-area:1/2/-1;min-width:min-content}& [data-expand-button]{grid-column:1}}[data-separator=line-info] [data-separator-wrapper],[data-separator=line-info] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:34px auto}[data-separator=line-info-basic][data-expand-index] [data-separator-wrapper]{grid-template-columns:100% auto}[data-separator=line-info],[data-separator=line-info-basic]{& [data-separator-multi-button]{& [data-expand-up]{border-bottom:1px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg)}& [data-expand-down]{border-top:1px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg)}}}}[data-additions] [data-gutter] [data-separator-wrapper],[data-additions] [data-separator=line-info-basic] [data-separator-wrapper],[data-content] [data-separator-wrapper]{display:none}[data-line-annotation]{min-height:var(--diffs-annotation-min-height,0);z-index:2}[data-merge-conflict-actions]{z-index:2}[data-separator=custom]{grid-template-columns:subgrid;display:grid}[data-line],[data-column-number],[data-no-newline]{padding-inline:1ch;position:relative}[data-indicators=classic] [data-line]{padding-inline-start:2ch}[data-indicators=classic]{& [data-line-type=change-addition],& [data-line-type=change-deletion]{&[data-no-newline],&[data-line]{&:before{user-select:none;width:1ch;height:1lh;display:inline-block;position:absolute;top:0;left:0}}}& [data-line-type=change-addition]{&[data-line],&[data-no-newline]{&:before{content:"+";color:var(--diffs-addition-base)}}}& [data-line-type=change-deletion]{&[data-line],&[data-no-newline]{&:before{content:"-";color:var(--diffs-deletion-base)}}}}[data-indicators=bars]{& [data-line-type=change-deletion],& [data-line-type=change-addition]{&[data-column-number]{&:before{content:"";user-select:none;contain:strict;width:4px;height:100%;display:block;position:absolute;top:0;left:0}}}& [data-line-type=change-deletion]{&[data-column-number]{&:before{background-image:linear-gradient(0deg, var(--diffs-bg-deletion) 50%, var(--diffs-deletion-base) 50%);background-repeat:repeat;background-size:2px 2px;background-size:calc(1lh / round(1lh / 2px)) calc(1lh / round(1lh / 2px))}}}& [data-line-type=change-addition]{&[data-column-number]{&:before{background-color:var(--diffs-addition-base)}}}}[data-overflow=wrap]{& [data-line]{white-space:pre-wrap;word-break:break-word}& [data-annotation-content]{word-break:break-word}}[data-overflow=scroll] [data-line]{white-space:pre;min-height:1lh}[data-column-number]{box-sizing:content-box;text-align:right;user-select:none;color:var(--diffs-fg-number);padding-left:2ch}[data-line-number-content]{min-width:var(--diffs-min-number-column-width,var(--diffs-min-number-column-width-default,3ch));z-index:1;display:inline-block;position:relative}[data-disable-line-numbers]{& [data-gutter-buffer],& [data-column-number]{min-width:4px;padding:0;&:before{min-width:0}}& [data-line-number-content]{display:none}& [data-gutter-utility-slot]{right:unset;justify-content:flex-start;left:0}&[data-indicators=bars] [data-gutter-utility-slot]{left:6px}}[data-file][data-disable-line-numbers]{& [data-gutter-buffer],& [data-column-number]{border-right:0;min-width:0}}[data-diff-span]{box-decoration-break:clone;border-radius:3px}[data-line-type=change-addition] [data-diff-span]{background-color:var(--diffs-bg-addition-emphasis)}[data-line-type=change-deletion] [data-diff-span]{background-color:var(--diffs-bg-deletion-emphasis)}[data-merge-conflict=marker-start],[data-merge-conflict=marker-base],[data-merge-conflict=marker-separator],[data-merge-conflict=marker-end]{color:var(--diffs-fg);padding-left:1ch}[data-merge-conflict=marker-start],[data-merge-conflict=marker-end]{align-items:center;display:flex;&:after{color:var(--diffs-fg-conflict-marker);font-size:.75rem;font-style:normal;line-height:1.25rem;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));padding-left:1ch}}[data-merge-conflict=marker-start]:after{content:"(Current Change)"}[data-merge-conflict=marker-end]:after{content:"(Incoming Change)"}[data-merge-conflict-actions-content]{min-height:1.75rem;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));color:var(--diffs-fg);align-items:center;gap:.25rem;padding-inline:.5rem;font-size:.75rem;line-height:1.2;display:flex}[data-merge-conflict-action]{appearance:none;color:var(--diffs-fg-number);font:inherit;cursor:pointer;background:0 0;border:0;padding:0;font-style:normal}[data-merge-conflict-action]:hover{color:var(--diffs-fg)}[data-merge-conflict-action=current]:hover{color:var(--diffs-addition-base)}[data-merge-conflict-action=incoming]:hover{color:var(--diffs-modified-base)}[data-merge-conflict-action-separator]{color:var(--diffs-fg-number);opacity:.6;user-select:none}[data-diffs-header=default]{background-color:var(--diffs-bg);justify-content:space-between;align-items:center;gap:var(--diffs-gap-inline,var(--diffs-gap-fallback));min-height:calc(1lh + (var(--diffs-gap-block,var(--diffs-gap-fallback)) * 3));z-index:2;flex-direction:row;padding-inline:16px;display:flex;position:relative;top:0}[data-header-content]{align-items:center;gap:var(--diffs-gap-inline,var(--diffs-gap-fallback));white-space:nowrap;flex-direction:row;min-width:0;display:flex}[data-header-content] [data-prev-name],[data-header-content] [data-title]{text-overflow:ellipsis;white-space:nowrap;direction:rtl;min-width:0;overflow:hidden}[data-prev-name]{opacity:.7}[data-rename-icon]{fill:currentColor;flex-grow:0;flex-shrink:0}[data-diffs-header=default] [data-metadata]{white-space:nowrap;align-items:center;gap:1ch;display:flex}[data-diffs-header=default] [data-additions-count]{font-family:var(--diffs-font-family,var(--diffs-font-fallback));color:var(--diffs-addition-base)}[data-diffs-header=default] [data-deletions-count]{font-family:var(--diffs-font-family,var(--diffs-font-fallback));color:var(--diffs-deletion-base)}[data-change-icon]{fill:currentColor;flex-shrink:0}[data-change-icon=change],[data-change-icon=rename-pure],[data-change-icon=rename-changed]{color:var(--diffs-modified-base)}[data-change-icon=new]{color:var(--diffs-addition-base)}[data-change-icon=deleted]{color:var(--diffs-deletion-base)}[data-change-icon=file]{opacity:.6}[data-annotation-content]{z-index:2;isolation:isolate;white-space:normal;align-self:flex-start;min-width:0;display:flow-root;position:relative}[data-overflow=scroll] [data-annotation-content],[data-overflow=scroll] [data-merge-conflict-actions-content]{width:var(--diffs-column-content-width,auto);left:var(--diffs-column-number-width,0);position:sticky}[data-annotation-slot]{text-wrap-mode:wrap;word-break:normal;white-space-collapse:collapse}[data-gutter-utility-slot]{touch-action:none;justify-content:flex-end;display:flex;position:absolute;top:0;bottom:0;right:0}[data-utility-button]{appearance:none;cursor:pointer;width:1lh;height:1lh;font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);background-color:var(--diffs-modified-base);color:var(--diffs-bg);fill:currentColor;z-index:4;touch-action:none;border:none;border-radius:4px;justify-content:center;align-items:center;margin-right:calc(-1lh + 1ch);padding:0;display:flex;position:relative;&:before{content:"";display:block;position:absolute;inset:0 0 0 -4px}}[data-decoration-bar-stack]{pointer-events:none;isolation:isolate;z-index:1;background-color:var(--diffs-decoration-bar-color,transparent);box-sizing:content-box;border-left:2px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg);width:6px;position:absolute;top:0;bottom:0;right:-2px;[data-decoration-bar-depth="1"] &{background-color:color-mix(in lab, var(--diffs-bg) 20%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth="2"] &{background-color:color-mix(in lab, var(--diffs-bg) 45%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth="3"] &{background-color:color-mix(in lab, var(--diffs-bg) 65%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-start] &{border-top-left-radius:5px;border-top-right-radius:5px}[data-decoration-bar-end] &{z-index:3;border-bottom-right-radius:5px;border-bottom-left-radius:5px}}[data-placeholder]{contain:strict}[data-error-wrapper]{padding:var(--diffs-gap-block,var(--diffs-gap-fallback)) var(--diffs-gap-inline,var(--diffs-gap-fallback));scrollbar-width:none;max-height:400px;overflow:auto;& [data-error-message]{color:var(--diffs-deletion-base);font-size:18px;font-weight:700}& [data-error-stack]{color:var(--diffs-fg-number)}}}@layer theme,rendered,unsafe;
196
+ `,yh;function bh(e){if(yh!=null)return yh;let t=e.host;if(typeof HTMLElement<`u`&&t instanceof HTMLElement&&!t.isConnected)return;let n=document.createElement(`div`);n.setAttribute(`data-code`,``),n.setAttribute(ve,`true`);let r=document.createElement(`div`);return r.style.position=`relative`,r.style.width=`200%`,r.style.height=`200%`,n.appendChild(r),e.appendChild(n),yh=Math.max(n.offsetHeight-n.clientHeight,0),n.remove(),yh}function xh(e){let t=e==null?`var(--diffs-scrollbar-gutter-fallback)`:`${e}px`;return`${Ce}: ${t};`}var Sh=`@layer base, theme, rendered, unsafe;`,Ch=RegExp(`${Dh(Ce)}\\s*:\\s*[^;]+;`);function wh(e){return`${Sh}
197
+ @layer unsafe {
198
+ ${e}
199
+ }`}function Th(e,t=`system`,n){return`${Sh}
200
+ @layer rendered {
201
+ :host {${t===`system`?``:`
202
+ color-scheme: ${t};`}
203
+ ${xh(n)}
204
+ ${e}
205
+ }
206
+ }`}function Eh(e,t){let n=xh(t);return e.replace(Ch,n)}function Dh(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}var Oh=new WeakMap;function kh(e){return Oh.get(e)??e}function Ah({code:e,pre:t,columnType:n,rowSpan:r,containerSize:i=!1}={}){return e??(e=document.createElement(`code`),e.setAttribute(`data-code`,``),n!=null&&e.setAttribute(`data-${n}`,``),t?.appendChild(e)),r==null?e.style.removeProperty(`grid-row`):e.style.setProperty(`grid-row`,`span ${r}`),i?e.setAttribute(`data-container-size`,``):e.removeAttribute(`data-container-size`),e}function jh(e,t){if(t==null)return;let n=e.shadowRoot??e.attachShadow({mode:`open`});n.innerHTML===``&&(n.innerHTML=t)}function Mh(e,{type:t,diffIndicators:n,disableBackground:r,disableLineNumbers:i,overflow:a,split:o,totalLines:s,customProperties:c}){if(c!=null)for(let t in c){let n=c[t];n!=null&&e.setAttribute(t,`${n}`)}switch(t===`diff`?(e.setAttribute(`data-diff`,``),e.removeAttribute(`data-file`)):(e.setAttribute(`data-file`,``),e.removeAttribute(`data-diff`)),n){case`bars`:case`classic`:e.setAttribute(`data-indicators`,n);break;case`none`:e.removeAttribute(`data-indicators`)}return i?e.setAttribute(`data-disable-line-numbers`,``):e.removeAttribute(`data-disable-line-numbers`),r?e.removeAttribute(`data-background`):e.setAttribute(`data-background`,``),t===`diff`?e.setAttribute(`data-diff-type`,o?`split`:`single`):e.removeAttribute(`data-diff-type`),e.setAttribute(`data-overflow`,a),e.style.setProperty(`--diffs-min-number-column-width-default`,`${`${s}`.length}ch`),e}function Nh(e){if(typeof HTMLStyleElement<`u`&&e instanceof HTMLStyleElement)return!0;let t=e.tagName??e.nodeName;return typeof t==`string`&&t.toLowerCase()===`style`}function Ph(e,t,n){let r=new Map;for(let i of e){let e=kh(i);r.set(e,n?.slotNames.get(e)??t(i))}return{provided:e,current:e,slotNames:r}}function Fh(e,t,n){for(let r of t){let t=kh(r);e.slotNames.has(t)||e.slotNames.set(t,n(r))}e.provided=t,e.current=t}function Ih(e,t,n){if(e==null)return n(t);let r=kh(t),i=e.slotNames.get(r);return i??(i=n(t),e.slotNames.set(r,i)),i}function Lh(e){return e?.useTokenTransformer===!0||e?.onTokenClick!=null||e?.onTokenEnter!=null||e?.onTokenLeave!=null}function Rh(e,t){let n=e?.offsetHeight??0;if(e==null||n===0){t();return}e.style.minHeight=`${n}px`;try{t(),e.offsetHeight}finally{e.style.minHeight=``}}function zh({shadowRoot:e,currentNode:t,themeCSS:n}){if(n.trim()===``){t?.remove();return}return t??=Bh(),t.textContent=n,t.parentNode!==e&&e.appendChild(t),t}function Bh(){let e=document.createElement(`style`);return e.setAttribute(We,``),e}var Vh=void 0;function Hh(){return Vh??=`safari`in window&&`pushNotification`in window.safari||/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}if(typeof HTMLElement<`u`&&customElements.get(`diffs-container`)==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;let t=this.attachShadow({mode:`open`});e??(e=new CSSStyleSheet,e.replaceSync(vh)),t.adoptedStyleSheets=[e]}connectedCallback(){bh(this.shadowRoot??this.attachShadow({mode:`open`}))}}customElements.define(Ie,t)}function Uh(e){return{...De,...e}}function Wh(e,t){let n=Gh(e,t);return t?n:e.diffHeaderHeight+n}function Gh(e,t){return e.paddingTop??(t?e.spacing:0)}function Kh(e){return e.paddingBottom??e.spacing}function qh(e){switch(e){case`simple`:return 4;case`metadata`:case`line-info`:case`line-info-basic`:case`custom`:return 32}}function Q(e,t){return e?.cacheKey!=null||t?.cacheKey!=null?e?.cacheKey===t?.cacheKey:e===t}function Jh(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function Yh(e){return e.map(e=>({...e,hunkContent:e.hunkContent.map(e=>({...e}))}))}function Xh(e){return{...e,hunks:Yh(e.hunks),deletionLines:[...e.deletionLines],additionLines:[...e.additionLines]}}function Zh(e,t){return e-(t===0?0:1)}function Qh(e,t){return Zh(e,t)+t}var $h=1;function eg(e,...t){return`ck${$h}:${JSON.stringify([e,...t])}`}function tg(e){return e===``?[]:e.split(Ne)}function ng(e,t,n){let r=e===`clone`?Xh(t):t;if(!r.isPartial)throw Error(`hydratePartialDiff: fileDiff must be partial`);switch(r.type){case`change`:case`rename-changed`:return rg(r,ag(r,n),og(r,n));case`rename-pure`:{let e=og(r,n);sg(r,n);let t=tg(e.contents);return r.isPartial=!1,r.deletionLines=t,r.additionLines=t,lg(r,null,e),r}}throw Error(`hydratePartialDiff: ${r.type} diffs cannot be hydrated from loaded files`)}function rg(e,t,n){let r=tg(t.contents),i=tg(n.contents),{hunks:a,splitLineCount:o,unifiedLineCount:s}=ig(e.hunks,i.length);return e.hunks=a,e.splitLineCount=o,e.unifiedLineCount=s,e.isPartial=!1,e.deletionLines=r,e.additionLines=i,lg(e,t,n),e}function ig(e,t){let n=0,r=0,i=0,a=[];for(let t of e){let e=Math.max(t.additionStart-1,0),o=Math.max(t.deletionStart-1,0),s=e,c=o,l=0,u=0,d=0,f=0,p=[];for(let e of t.hunkContent){if(e.type===`context`){p.push({...e,additionLineIndex:s,deletionLineIndex:c}),s+=e.lines,c+=e.lines,d+=e.lines,f+=e.lines;continue}p.push({...e,additionLineIndex:s,deletionLineIndex:c}),s+=e.additions,c+=e.deletions,l+=e.additions,u+=e.deletions,d+=Math.max(e.additions,e.deletions),f+=e.additions+e.deletions}let m=Math.max(Zh(t.additionStart,t.additionCount)-i,0);a.push({...t,collapsedBefore:m,additionLineIndex:e,deletionLineIndex:o,additionLines:l,deletionLines:u,hunkContent:p,splitLineStart:n+m,unifiedLineStart:r+m,splitLineCount:d,unifiedLineCount:f}),n+=m+d,r+=m+f,i=Qh(t.additionStart,t.additionCount)}if(a.length>0){let e=a[a.length-1],i=Qh(e.additionStart,e.additionCount),o=Math.max(t-i,0);n+=o,r+=o}return{hunks:a,splitLineCount:n,unifiedLineCount:r}}function ag(e,t){if(t.oldFile==null)throw Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires oldFile`);return t.oldFile}function og(e,t){if(t.newFile==null)throw Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires newFile`);return t.newFile}function sg(e,t){if(t.oldFile!==null)throw Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires oldFile to be null`)}function cg(e,t,n){return e.cacheKey==null?ug(t,n):`${e.cacheKey}:hydrated`}function lg(e,t,n){let r=cg(e,t,n);if(r==null){delete e.cacheKey;return}e.cacheKey=r}function ug(e,t){return e!=null&&t!=null?e.cacheKey!=null&&t.cacheKey!=null?eg(`hydrated-files`,e.cacheKey,t.cacheKey):void 0:e?.cacheKey??t?.cacheKey}function dg(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}var fg=new TextEncoder,pg=new TextDecoder(`utf-8`,{ignoreBOM:!0}),mg=/[\uD800-\uDFFF]/,hg=1024,gg=new Uint8Array(hg);function _g(){gg.length!==hg&&(gg=new Uint8Array(hg))}function $(e){if(e.length===0)return e;if(mg.test(e))return JSON.parse(JSON.stringify(e));let t=e.length*3;gg.length<t&&(gg=new Uint8Array(t));let{written:n}=fg.encodeInto(e,gg);return pg.decode(gg.subarray(0,n))}var vg=new TextDecoder(`utf-8`,{ignoreBOM:!0}),yg={'"':`"`,"\\":`\\`,a:`\x07`,b:`\b`,t:` `,n:`
207
+ `,v:`\v`,f:`\f`,r:`\r`};function bg(e){if(e[0]!==`"`)return;let t=``,n=1;for(;n<e.length;){let r=e[n];if(r===`"`)return{fileName:t,rawLength:n+1};if(r!==`\\`){t+=r,n++;continue}let i=yg[e[n+1]];if(i!=null){t+=i,n+=2;continue}let a=[];do{let t=xg(e,n+1);if(t==null)return;a.push(t),n+=4}while(e[n]===`\\`&&e[n+1]>=`0`&&e[n+1]<=`7`);t+=vg.decode(new Uint8Array(a))}}function xg(e,t){let n=e.charCodeAt(t)-48,r=e.charCodeAt(t+1)-48,i=e.charCodeAt(t+2)-48;if(n>=0&&n<=3&&r>=0&&r<=7&&i>=0&&i<=7)return n*64+r*8+i}var Sg=4096,Cg=.5;function wg(e){for(let t of e.hunks)for(let n=0;n<t.hunkContent.length;n++){let r=t.hunkContent[n];if(r.type!==`change`)continue;let i=Eg(e,r);i!=null&&(t.hunkContent.splice(n,1,...i),n+=i.length-1)}}function Tg(e,t,n){let{hunkContent:r}=e;for(let e=1;e<r.length;e++){let i=r[e],a=r[e-1];if(i.type!==`change`||i.additions>0&&i.deletions>0||a.type!==`context`)continue;let o=i.additions>0,s=o?t.additionLines:t.deletionLines,c=o?i.additionLineIndex:i.deletionLineIndex,l=o?i.additions:i.deletions,u=s[c]??``;if(u.trim()!==``)continue;let d=!0;for(let e=1;e<l;e++)if(s[c+e]!==u){d=!1;break}if(!d)continue;let f=0;for(;f<a.lines&&t.additionLines[a.additionLineIndex+a.lines-1-f]===u;)f++;if(f===0||e===1&&f===a.lines||n!=null&&(f=n(i,f),f===0))continue;i.additionLineIndex-=f,i.deletionLineIndex-=f;let p=i.additionLineIndex+i.additions,m=i.deletionLineIndex+i.deletions,h=r[e+1];h?.type===`context`?(h.lines+=f,h.additionLineIndex=p,h.deletionLineIndex=m):r.splice(e+1,0,{type:`context`,lines:f,additionLineIndex:p,deletionLineIndex:m}),a.lines-=f,a.lines===0&&(r.splice(e-1,1),e--)}}function Eg(e,t){let{deletions:n,additions:r,deletionLineIndex:i,additionLineIndex:a}=t,o=Math.min(n,r),s=Math.abs(r-n);if(o===0||s===0||o*(s+1)>Sg)return null;let c=[];for(let t=0;t<n;t++)c.push(Og(e.deletionLines[i+t]??``));let l=[];for(let t=0;t<r;t++)l.push(Og(e.additionLines[a+t]??``));let u=r>n,d=0,f=-1;for(let e=0;e<=s;e++){let t=0;for(let n=0;n<o;n++)t+=kg(c[n+(u?0:e)],l[n+(u?e:0)]);e===0?f=t+o*Cg:t>f&&(f=t,d=e)}if(d===0)return null;let p=[],m=(e,t,n,r)=>{(e>0||t>0)&&p.push({type:`change`,deletions:e,additions:t,deletionLineIndex:n,additionLineIndex:r})};return u?(m(0,d,i,a),m(o,o,i,a+d),m(0,r-o-d,i+o,a+d+o)):(m(d,0,i,a),m(o,o,i+d,a),m(n-o-d,0,i+d+o,a+o)),p}var Dg=/\s+/g;function Og(e){return e.replace(Dg,``)}function kg(e,t){if(e===t)return 1;let n=Math.max(e.length,t.length),r=Math.min(e.length,t.length);if(r===0)return 0;let i=0;for(;i<r&&e[i]===t[i];)i++;let a=0;for(;a<r-i&&e[e.length-1-a]===t[t.length-1-a];)a++;return(i+a)/n}var Ag=/^diff --git ("a\/(?:[^"\\]|\\.)*"|a\/.+?) ("b\/(?:[^"\\]|\\.)*"|b\/.+?)$/;function jg(e,t){try{return Mg(e,t)}finally{_g()}}function Mg(e,{cacheKey:t,isGitDiff:n=Ze.test(e),oldFile:r,newFile:i,throwOnError:a=!1}={}){let o=0,s=Vg(e,`@@ `),c,l=r==null||i==null,u=0,d=0;for(let e of s){let s=Fg(e),f=s[0];if(f==null){if(a)throw Error(`parsePatchContent: invalid hunk`);console.error(`parsePatchContent: invalid hunk`,e);continue}let p=Rg(f),m=0,h=0;if(p==null||c==null){if(c!=null){if(a)throw Error(`parsePatchContent: Invalid hunk`);console.error(`parsePatchContent: Invalid hunk`,e);continue}c={name:``,type:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:l,additionLines:!l&&r!=null&&i!=null?Pg(i.contents):[],deletionLines:!l&&r!=null&&i!=null?Pg(r.contents):[],cacheKey:Ug(t)},c.additionLines.length===1&&i?.contents===``&&(c.additionLines.length=0),c.deletionLines.length===1&&r?.contents===``&&(c.deletionLines.length=0);for(let e of s){if(e.startsWith(`diff --git`)){let t=e.trim().match(Ag);if(t==null){if(a)throw Error(`parsePatchContent: invalid git diff header`);console.error(`parsePatchContent: invalid git diff header`,e);continue}let n=Ng(t[1],!0),r=Ng(t[2],!0);c.name=$(r),n!==r&&(c.prevName=$(n));continue}let t=e.startsWith(`---`)||e.startsWith(`+++`)?e.match(Ke):null;if(t!=null){let[,e,r]=t,i=Ng(r,n);if(e===`---`&&i!==`/dev/null`){let e=$(i);c.prevName=e,c.name=e}else e===`+++`&&i!==`/dev/null`&&(c.name=$(i))}else if(n){if(e.startsWith(`new mode `)&&(c.mode=$(e.slice(8).trim())),e.startsWith(`old mode `)&&(c.prevMode=$(e.slice(8).trim())),e.startsWith(`new file mode`)&&(c.type=`new`,c.mode=$(e.slice(13).trim())),e.startsWith(`deleted file mode`)&&(c.type=`deleted`,c.mode=$(e.slice(17).trim())),e.startsWith(`similarity index`)&&(e.startsWith(`similarity index 100%`)?c.type=`rename-pure`:c.type=`rename-changed`),e.startsWith(`index `)){let[,t,n,r]=e.trim().match($e)??[];t!=null&&(c.prevObjectId=$(t)),n!=null&&(c.newObjectId=$(n)),r!=null&&(c.mode=$(r))}(e.startsWith(`rename from `)||e.startsWith(`copy from `))&&(c.prevName=$(Ng(e.slice(e.startsWith(`rename`)?12:10)))),(e.startsWith(`rename to `)||e.startsWith(`copy to `))&&(c.name=$(Ng(e.slice(e.startsWith(`rename`)?10:8))))}}continue}let g,_;for(;s.length>0&&(s[s.length-1]===`
208
+ `||s[s.length-1]===`\r`||s[s.length-1]===`\r
209
+ `||s[s.length-1]===``);)s.pop();let{additionStart:v,deletionStart:y}=p;u=l?u:y-1,d=l?d:v-1;let b={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:p.additionCount,additionStart:v,additionLines:m,deletionCount:p.deletionCount,deletionStart:y,deletionLines:h,deletionLineIndex:u,additionLineIndex:d,hunkContent:[],hunkContext:Ug(p.hunkContext),hunkSpecs:$(f),noEOFCRAdditions:!1,noEOFCRDeletions:!1},x=0,S=0;for(let e=1;e<s.length;e++){let t=s[e];if(x>=b.additionCount&&S>=b.deletionCount&&!t.startsWith(`\\`)){if(!Ig(t)||Lg(t))break;if(a)throw Error(`parsePatchContent: hunk has more lines than expected`)}let n=t[0];if(n!==`+`&&n!==`-`&&n!==` `&&n!==`\\`){if(a)throw Error(`parsePatchContent: invalid hunk line`);console.error(`parseLineType: Invalid firstChar: "${n}", full line: "${t}"`),console.error(`processFile: invalid rawLine:`,t);continue}let r=Wg(n);if(r===`addition`){if(a&&x>=b.additionCount)throw Error(`parsePatchContent: hunk has too many addition lines`);let e=Gg(t);(g==null||g.type!==`change`)&&(g=Kg(`change`,u,d),b.hunkContent.push(g)),d++,x++,l&&c.additionLines.push(e),g.additions++,m++,_=`addition`}else if(r===`deletion`){if(a&&S>=b.deletionCount)throw Error(`parsePatchContent: hunk has too many deletion lines`);let e=Gg(t);(g==null||g.type!==`change`)&&(g=Kg(`change`,u,d),b.hunkContent.push(g)),u++,S++,l&&c.deletionLines.push(e),g.deletions++,h++,_=`deletion`}else if(r===`context`){if(a&&(S>=b.deletionCount||x>=b.additionCount))throw Error(`parsePatchContent: hunk has too many context lines`);let e=Gg(t);(g==null||g.type!==`context`)&&(g=Kg(`context`,u,d),b.hunkContent.push(g)),d++,u++,x++,S++,l&&(c.deletionLines.push(e),c.additionLines.push(e)),g.lines++,_=`context`}else if(r===`metadata`&&g!=null){if(g.type===`context`?(b.noEOFCRAdditions=!0,b.noEOFCRDeletions=!0):_===`deletion`?b.noEOFCRDeletions=!0:_===`addition`&&(b.noEOFCRAdditions=!0),l&&(_===`addition`||_===`context`)){let e=c.additionLines.length-1;e>=0&&(c.additionLines[e]=dg(c.additionLines[e]))}if(l&&(_===`deletion`||_===`context`)){let e=c.deletionLines.length-1;e>=0&&(c.deletionLines[e]=dg(c.deletionLines[e]))}}}if(x!==b.additionCount||S!==b.deletionCount){if(a)throw Error(`parsePatchContent: hunk line count mismatch`);console.error(`parsePatchContent: hunk line count mismatch: "${f.trimEnd()}", declared old/new ${b.deletionCount}/${b.additionCount}, parsed old/new ${S}/${x}`);let e=Zh(b.additionStart,b.additionCount)+(x===0?0:1),t=Zh(b.deletionStart,b.deletionCount)+(S===0?0:1);if(!l){let n=e-b.additionStart,r=t-b.deletionStart;b.additionLineIndex+=n,b.deletionLineIndex+=r;for(let e of b.hunkContent)e.additionLineIndex+=n,e.deletionLineIndex+=r}b.additionStart=e,b.deletionStart=t,b.additionCount=x,b.deletionCount=S}b.additionLines=m,b.deletionLines=h,b.collapsedBefore=Math.max(Zh(b.additionStart,b.additionCount)-o,0),c.hunks.push(b),o=Qh(b.additionStart,b.additionCount);for(let e of b.hunkContent)e.type===`context`?(b.splitLineCount+=e.lines,b.unifiedLineCount+=e.lines):(b.splitLineCount+=Math.max(e.additions,e.deletions),b.unifiedLineCount+=e.deletions+e.additions);b.splitLineStart=c.splitLineCount+b.collapsedBefore,b.unifiedLineStart=c.unifiedLineCount+b.collapsedBefore,c.splitLineCount+=b.collapsedBefore+b.splitLineCount,c.unifiedLineCount+=b.collapsedBefore+b.unifiedLineCount}if(c!=null){if(a&&l&&!n&&c.hunks.length===0)throw Error(`parsePatchContent: unified file has no hunks`);if(c.hunks.length>0&&!l&&c.additionLines.length>0&&c.deletionLines.length>0){let e=c.hunks[c.hunks.length-1],t=Qh(e.additionStart,e.additionCount),n=c.additionLines.length,r=Math.max(n-t,0);c.splitLineCount+=r,c.unifiedLineCount+=r}return n||(c.prevName!=null&&c.name!==c.prevName?c.hunks.length>0?c.type=`rename-changed`:c.type=`rename-pure`:(r==null||r.contents===``)&&i!=null&&i.contents!==``?c.type=`new`:r!=null&&r.contents!==``&&(i==null||i.contents===``)&&(c.type=`deleted`)),c.type!==`rename-pure`&&c.type!==`rename-changed`&&(c.prevName=void 0),wg(c),c}}function Ng(e,t=!1){let n=e.trim(),r=n.startsWith(`"`)?bg(n)?.fileName??n:n;return t&&(r.startsWith(`a/`)||r.startsWith(`b/`))?r.slice(2):r}function Pg(e){let t=Fg(e);for(let e=0;e<t.length;e++)t[e]=$(t[e]);return t}function Fg(e){if(e.length===0)return[``];let t=[],n=0;for(;;){let r=e.indexOf(`
210
+ `,n);if(r===-1)break;t.push(e.slice(n,r+1)),n=r+1}return n<e.length&&t.push(e.slice(n)),t}function Ig(e){let t=e[0];return t===`+`||t===`-`||t===` `}function Lg(e){if(!e.startsWith(`--`))return!1;for(let t=2;t<e.length;t++){let n=e[t];if(n!==` `&&n!==` `&&n!==`
211
+ `&&n!==`\r`)return!1}return!0}function Rg(e){if(!e.startsWith(`@@ -`))return;let t=4,n=zg(e,t);if(n==null)return;let r=n.value;t=n.endIndex;let i=1;if(e[t]===`,`){let n=zg(e,t+1);if(n==null)return;i=n.value,t=n.endIndex}if(e[t]!==` `||e[t+1]!==`+`)return;t+=2;let a=zg(e,t);if(a==null)return;let o=a.value;t=a.endIndex;let s=1;if(e[t]===`,`){let n=zg(e,t+1);if(n==null)return;s=n.value,t=n.endIndex}if(e[t]!==` `||e[t+1]!==`@`||e[t+2]!==`@`)return;let c,l=t+3;return e[l]===` `&&(c=Bg(e.slice(l+1))),{additionCount:s,additionStart:o,deletionCount:i,deletionStart:r,hunkContext:c}}function zg(e,t){let n=t,r=0;for(;n<e.length;n++){let t=e.charCodeAt(n)-48;if(t<0||t>9)break;r=r*10+t}if(n!==t)return{value:r,endIndex:n}}function Bg(e){return e.endsWith(`\r
212
+ `)?e.slice(0,-2):e.endsWith(`
213
+ `)?e.slice(0,-1):e}function Vg(e,t){if(e.length===0)return[``];let n=`\n${t}`,r=e.startsWith(t)?0:Hg(e,n,0);if(r===-1)return[e];let i=[];r>0&&i.push(e.slice(0,r));let a=r;for(;;){let t=Hg(e,n,a+1);if(t===-1)break;i.push(e.slice(a,t)),a=t}return i.push(e.slice(a)),i}function Hg(e,t,n){let r=e.indexOf(t,n);return r===-1?-1:r+1}function Ug(e){return e==null?e:$(e)}function Wg(e){return e===` `?`context`:e===`\\`?`metadata`:e===`+`?`addition`:`deletion`}function Gg(e){let t=e.slice(1);return $(t===``?`
214
+ `:t)}function Kg(e,t,n){return e===`change`?{type:`change`,additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:`context`,lines:0,additionLineIndex:n,deletionLineIndex:t}}var qg=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},Jg=new class extends qg{};function Yg(e,t,n){return Jg.diff(e,t,n)}function Xg(e,t){let n=0;for(;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function Zg(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function Qg(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function $g(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function e_(e,t){return Qg(e,t,``)}function t_(e,t){return $g(e,t,``)}function n_(e,t){return t.slice(0,r_(e,t))}function r_(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function i_(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function a_(e,t){if(t)return s_(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function o_(e,t){if(t)return s_(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function s_(e,t){if(!t)return[o_(e),a_(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=i_(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var c_=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,l_=RegExp(`[${c_}]+|\\s+|[^${c_}]`,`ug`);new class extends qg{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=i_(e,r)}else n=e.match(l_)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&u_(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&u_(n,i,r,null,t.intlSegmenter),e}};function u_(e,t,n,r,i){if(t&&n){let[a,o]=s_(t.value,i),[s,c]=s_(n.value,i);if(e){let r=Xg(a,s);e.value=$g(e.value,s,r),t.value=e_(t.value,r),n.value=e_(n.value,r)}if(r){let e=Zg(o,c);r.value=Qg(r.value,c,e),t.value=t_(t.value,e),n.value=t_(n.value,e)}}else if(n){if(e){let e=o_(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=o_(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=o_(r.value,i),[a,o]=s_(t.value,i),s=Xg(n,a);t.value=e_(t.value,s);let c=Zg(e_(n,s),o);t.value=t_(t.value,c),r.value=Qg(r.value,n,c),e.value=$g(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=o_(r.value,i),n=n_(a_(t.value,i),e);t.value=t_(t.value,n)}else if(e){let n=n_(a_(e.value,i),o_(t.value,i));t.value=e_(t.value,n)}}var d_=new class extends qg{tokenize(e){let t=RegExp(`(\\r?\\n)|[${c_}]+|[^\\S\\n\\r]+|[^${c_}]`,`ug`);return e.match(t)||[]}};function f_(e,t,n){return d_.diff(e,t,n)}var p_=new class extends qg{constructor(){super(...arguments),this.tokenize=h_}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
215
+ `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
216
+ `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
217
+ `)&&(e=e.slice(0,-1)),t.endsWith(`
218
+ `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function m_(e,t,n){return p_.diff(e,t,n)}function h_(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
219
+ `));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function g_(e){return e==`.`||e==`!`||e==`?`}new class extends qg{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(g_(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends qg{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends qg{constructor(){super(...arguments),this.tokenize=h_}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(__(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function __(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a=0;for(;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=__(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=__(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends qg{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function v_(e){for(let t=0;t<e.length;t++)if(e[t]<` `||e[t]>`~`||e[t]===`"`||e[t]===`\\`)return!0;return!1}function y_(e){if(!v_(e))return e;let t=`"`,n=new TextEncoder().encode(e),r=0;for(;r<n.length;){let e=n[r];t+=e===7?`\\a`:e===8?`\\b`:e===9?`\\t`:e===10?`\\n`:e===11?`\\v`:e===12?`\\f`:e===13?`\\r`:e===34?`\\"`:e===92?`\\\\`:e>=32&&e<=126?String.fromCharCode(e):`\\`+e.toString(8).padStart(3,`0`),r++}return t+=`"`,t}var b_={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function x_(e,t,n,r,i,a,o){let s;s=o?typeof o==`function`?{callback:o}:o:{},s.context===void 0&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw Error(`newlineIsToken may not be used with patch-generation functions, only with diffing functions`);if(s.callback){let{callback:e}=s;m_(n,r,Object.assign(Object.assign({},s),{callback:t=>{let n=l(t);e(n)}}))}else return l(m_(n,r,s));function l(n){if(!n)return;n.push({value:``,lines:[]});function r(e){return e.map(function(e){return` `+e})}let o=[],s=0,l=0,u=[],d=1,f=1;for(let e=0;e<n.length;e++){let t=n[e],i=t.lines||w_(t.value);if(t.lines=i,t.added||t.removed){if(!s){let t=n[e-1];s=d,l=f,t&&(u=c>0?r(t.lines.slice(-c)):[],s-=u.length,l-=u.length)}for(let e of i)u.push((t.added?`+`:`-`)+e);t.added?f+=i.length:d+=i.length}else{if(s){if(i.length<=c*2&&e<n.length-2)for(let e of r(i))u.push(e);else{let e=Math.min(i.length,c);for(let t of r(i.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:d-s+e,newStart:l,newLines:f-l+e,lines:u};o.push(t),s=0,l=0,u=[]}}d+=i.length,f+=i.length}}for(let e of o)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith(`
220
+ `)?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,`\`),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:o}}}function S_(e,t){if(t||=b_,Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders&&!e.every(e=>e.isGit))throw Error(`Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)`);return e.map(e=>S_(e,t)).join(`
221
+ `)}let n=[];if(e.isGit){if(t=b_,!e.oldFileName)throw Error(`oldFileName must be specified for Git patches`);if(!e.newFileName)throw Error(`newFileName must be specified for Git patches`);let r=e.oldFileName,i=e.newFileName;e.isCreate&&r===`/dev/null`?r=i.replace(/^b\//,`a/`):e.isDelete&&i===`/dev/null`&&(i=r.replace(/^a\//,`b/`)),n.push(`diff --git `+y_(r)+` `+y_(i)),e.isDelete&&n.push(`deleted file mode `+(e.oldMode??`100644`)),e.isCreate&&n.push(`new file mode `+(e.newMode??`100644`)),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(n.push(`old mode `+e.oldMode),n.push(`new mode `+e.newMode)),e.isRename&&(n.push(`rename from `+y_((e.oldFileName??``).replace(/^a\//,``))),n.push(`rename to `+y_((e.newFileName??``).replace(/^b\//,``)))),e.isCopy&&(n.push(`copy from `+y_((e.oldFileName??``).replace(/^a\//,``))),n.push(`copy to `+y_((e.newFileName??``).replace(/^b\//,``))))}else t.includeIndex&&e.oldFileName==e.newFileName&&e.oldFileName!==void 0&&n.push(`Index: `+e.oldFileName),t.includeUnderline&&n.push(`===================================================================`);let r=e.hunks.length>0;t.includeFileHeaders&&e.oldFileName!==void 0&&e.newFileName!==void 0&&(!e.isGit||r)&&(n.push(`--- `+y_(e.oldFileName)+(e.oldHeader?` `+e.oldHeader:``)),n.push(`+++ `+y_(e.newFileName)+(e.newHeader?` `+e.newHeader:``)));for(let t=0;t<e.hunks.length;t++){let r=e.hunks[t],i=r.oldLines===0?r.oldStart-1:r.oldStart,a=r.newLines===0?r.newStart-1:r.newStart;n.push(`@@ -`+i+`,`+r.oldLines+` +`+a+`,`+r.newLines+` @@`);for(let e of r.lines)n.push(e)}return n.join(`
222
+ `)+`
223
+ `}function C_(e,t,n,r,i,a,o){if(typeof o==`function`&&(o={callback:o}),o?.callback){let{callback:s}=o;x_(e,t,n,r,i,a,Object.assign(Object.assign({},o),{callback:e=>{s(e?S_(e,o.headerOptions):void 0)}}))}else{let s=x_(e,t,n,r,i,a,o);return s?S_(s,o?.headerOptions):void 0}}function w_(e){let t=e.endsWith(`
224
+ `),n=e.split(`
225
+ `).map(e=>e+`
226
+ `);return t?n.pop():n.push(n.pop().slice(0,-1)),n}var T_=`/dev/null`;function E_(e,t,n,r=!1){if(e===null&&t===null)throw Error(`parseDiffFromFile: You must pass oldFile, newFile, or both`);let i=e??D_(),a=t??D_(),o=jg(C_(i.name,a.name,i.contents,a.contents,i.header,a.header,n),{cacheKey:(()=>{let n=e?.cacheKey,r=t?.cacheKey;return n!=null&&r!=null?eg(`diff`,n,r):void 0})(),oldFile:i,newFile:a,throwOnError:r});if(o==null)throw Error(`parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?`);e===null?(o.type=`new`,o.prevName=void 0):t===null&&(o.type=`deleted`,o.prevName=void 0);let s=t?.lang??(t===null?e?.lang:void 0);return s!=null&&(o.lang=s),o}function D_(){return{name:T_,contents:``}}var O_=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&=(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,!1)}setup(e,t,n){if(t==null||n==null)for(let r of e.children??[])r instanceof HTMLElement&&(`deletions`in r.dataset?t=r:`additions`in r.dataset&&(n=r));if(n==null||t==null){this.cleanUp();return}this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener(`scroll`,this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==n&&(this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),this.codeAdditions=n,n.addEventListener(`scroll`,this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function k_(e,t){return Dp(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function A_(e){return Z({tagName:`div`,properties:{"data-content-buffer":``,"data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function j_(e){return Z({tagName:`div`,children:[Z({tagName:`span`,children:[Mp(`No newline at end of file`)]})],properties:{"data-no-newline":``,"data-line-type":e,"data-column-content":``}})}function M_(e){return Z({tagName:`div`,children:[Np({name:e===`both`?`diffs-icon-expand-all`:`diffs-icon-expand`,properties:{"data-icon":``}})],properties:{role:`button`,"data-expand-button":``,"data-expand-both":e===`both`?``:void 0,"data-expand-up":e===`up`?``:void 0,"data-expand-down":e===`down`?``:void 0}})}function N_({type:e,content:t,expandIndex:n,chunked:r=!1,slotName:i,isFirstHunk:a,isLastHunk:o}){let s=0,c=[];if(e===`metadata`&&t!=null&&c.push(Z({tagName:`div`,children:[Mp(t)],properties:{"data-separator-wrapper":``}})),(e===`line-info`||e===`line-info-basic`)&&t!=null){let e=[];n!=null&&(r?(a||(e.push(M_(`up`)),s++),o||(e.push(M_(`down`)),s++)):(e.push(M_(!a&&!o?`both`:a?`down`:`up`)),s++)),e.push(Z({tagName:`div`,children:[Z({tagName:`span`,children:[Mp(t)],properties:{"data-unmodified-lines":``}})],properties:{"data-separator-content":``}})),r&&n!=null&&e.push(Z({tagName:`div`,children:[Mp(`Expand all`)],properties:{role:`button`,"data-expand-button":``,"data-expand-all-button":``}})),c.push(Z({tagName:`div`,children:e,properties:{"data-separator-wrapper":``,"data-separator-multi-button":s>1?``:void 0}}))}return e===`custom`&&i!=null&&c.push(Z({tagName:`slot`,properties:{name:i}})),Z({tagName:`div`,children:c,properties:{"data-separator":c.length===0?`simple`:e,"data-expand-index":n,"data-separator-first":a?``:void 0,"data-separator-last":o?``:void 0}})}function P_(e,t){return`hunk-separator-${e}-${t}`}function F_(e){let t=e.at(-1);return t==null?0:Math.max(Qh(t.additionStart,t.additionCount),Qh(t.deletionStart,t.deletionCount))}function I_({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":``},alwaysWrap:!0}}function L_({item:e,arr:t,enableJoin:n,isNeutral:r=!1,isLastItem:i=!1}){let a=t[t.length-1];if(a==null||i||!n){t.push([+!r,e.value]);return}let o=a[0]===0;if(r===o||r&&e.value.length===1&&!o){a[1]+=e.value;return}t.push([+!r,e.value])}function R_(e){return[Zh(e.additionStart,e.additionCount)+1,Qh(e.additionStart,e.additionCount)+1]}function z_({isPartial:e,rangeSize:t,expandedHunks:n,hunkIndex:r,collapsedContextThreshold:i}){let a=Math.max(t,0);if(a===0||e)return{fromStart:0,fromEnd:0,rangeSize:a,collapsedLines:a,renderAll:!1};if(n===!0||a<=i)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(r),s=Math.min(Math.max(o?.fromStart??0,0),a),c=Math.min(Math.max(o?.fromEnd??0,0),a),l=s+c,u=l>=a;return{fromStart:u?a:s,fromEnd:u?0:c,rangeSize:a,collapsedLines:Math.max(a-l,0),renderAll:u}}function B_(e){let t=e.hunks[e.hunks.length-1];if(t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return!1;let n=e.additionLines.length-Qh(t.additionStart,t.additionCount),r=e.deletionLines.length-Qh(t.deletionStart,t.deletionCount);return n<=0&&r<=0?!1:n!==r}function V_({fileDiff:e,errorPrefix:t}){let n=e.hunks[e.hunks.length-1];if(n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;let r=e.additionLines.length-Qh(n.additionStart,n.additionCount),i=e.deletionLines.length-Qh(n.deletionStart,n.deletionCount);if(r<=0&&i<=0)return 0;if(r!==i)throw Error(`${t}: trailing context mismatch (additions=${r}, deletions=${i}) for ${e.name}`);return Math.min(r,i)}function H_({fileDiff:e,hunkIndex:t,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:i}){if(t!==e.hunks.length-1)return;let a=V_({fileDiff:e,errorPrefix:i});if(a<=0)return;if(n===!0||a<=r)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(e.hunks.length),s=Math.min(Math.max(o?.fromStart??0,0),a);return{fromStart:s,fromEnd:0,rangeSize:a,collapsedLines:a-s,renderAll:s>=a}}function U_({fileDiff:e,lineNumber:t,expandedHunks:n,collapsedContextThreshold:r}){if(n===!0||e.isPartial)return!0;for(let[i,a]of e.hunks.entries()){let[o,s]=R_(a);if(t<o){let s=z_({isPartial:e.isPartial,rangeSize:a.collapsedBefore,expandedHunks:n,hunkIndex:i,collapsedContextThreshold:r}),c=o-s.rangeSize;return s.renderAll||t<c+s.fromStart||t>=o-s.fromEnd}if(t<s)return!0}let i=H_({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:`isAdditionLineRenderable`});if(i==null||i.renderAll)return!0;let a=e.hunks[e.hunks.length-1],[,o]=R_(a);return t<o+i.fromStart||t>=o+i.rangeSize}function W_({fileDiff:e,lineNumber:t,direction:n,expandedHunks:r,collapsedContextThreshold:i}){if(r===!0||e.isPartial)return t;let a=[],o=1;for(let[t,n]of e.hunks.entries()){let[s,c]=R_(n),l=z_({isPartial:e.isPartial,rangeSize:n.collapsedBefore,expandedHunks:r,hunkIndex:t,collapsedContextThreshold:i}),u=s-l.rangeSize;l.renderAll?a.push([u,s]):(l.fromStart>0&&a.push([u,u+l.fromStart]),l.fromEnd>0&&a.push([s-l.fromEnd,s])),a.push([s,c]),o=c}let s=H_({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:r,collapsedContextThreshold:i,errorPrefix:`getNearestRenderableAdditionLine`});if(s!=null){let e=o;o=e+s.rangeSize,s.renderAll?a.push([e,o]):s.fromStart>0&&a.push([e,e+s.fromStart])}if(t>=o)return t;if(n===`down`){for(let[e,n]of a)if(n>t)return Math.max(e,t);return}for(let e=a.length-1;e>=0;e--){let[n,r]=a[e];if(n<=t)return Math.min(r-1,t)}}function G_({type:e,metrics:t}){return t.hunkSeparatorHeight??qh(e)}function K_({type:e,metrics:t}){return e===`simple`||e===`metadata`||e===`line-info-basic`?0:t.spacing}function q_({type:e,hunkIndex:t,hunkSpecs:n}){switch(e){case`simple`:return t>0;case`metadata`:return n!=null;case`line-info`:case`line-info-basic`:case`custom`:return!0}}function J_(e){return e!==`simple`&&e!==`metadata`}function Y_({type:e,metrics:t,hunkIndex:n,hunkSpecs:r}){if(!q_({type:e,hunkIndex:n,hunkSpecs:r}))return;let i=G_({type:e,metrics:t}),a=K_({type:e,metrics:t}),o=n>0?a:0,s=a;return{height:i,gapBefore:o,gapAfter:s,totalHeight:o+i+s}}function X_({type:e,metrics:t}){if(!J_(e))return;let n=G_({type:e,metrics:t}),r=K_({type:e,metrics:t});return{height:n,gapBefore:r,gapAfter:0,totalHeight:r+n}}function Z_({diff:e,diffStyle:t,startingLine:n=0,totalLines:r=1/0,expandedHunks:i,collapsedContextThreshold:a=1,callback:o}){let s=Q_({diff:e,diffStyle:t,startingLine:n,expandedHunks:i,collapsedContextThreshold:a}),c={viewportStart:n,viewportEnd:n+r,isWindowedHighlight:n>0||r<1/0,splitCount:s.splitCount,unifiedCount:s.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!c.isWindowedHighlight)return!1;let e=c.unifiedCount>=n+r,i=c.splitCount>=n+r;return t===`unified`?e:(t===`split`||e)&&i},shouldSkip(e,r){if(!c.isWindowedHighlight)return!1;let i=e>0&&c.unifiedCount+e<=n,a=r>0&&c.splitCount+r<=n;return t===`unified`?i:(t===`split`||i)&&a},incrementCounts(e,n){(t===`unified`||t===`both`)&&(c.unifiedCount+=e),(t===`split`||t===`both`)&&(c.splitCount+=n)},isInWindow(e,n){if(!c.isWindowedHighlight)return!0;let r=c.isInUnifiedWindow(e),i=c.isInSplitWindow(n);return t===`unified`?r:t===`split`?i:r||i},isInUnifiedWindow(e){return!c.isWindowedHighlight||c.unifiedCount>=n-e&&c.unifiedCount<n+r},isInSplitWindow(e){return!c.isWindowedHighlight||c.splitCount>=n-e&&c.splitCount<n+r},emit(e,n=!1){return n||(t===`unified`?c.incrementCounts(1,0):t===`split`?c.incrementCounts(0,1):c.incrementCounts(1,1)),o(e)??!1}};hunkIterator:for(let n=s.hunkIndex;n<e.hunks.length;n++){let r=e.hunks[n];if(r==null)throw Error(`iterateOverDiff: invalid hunk index`);if(c.shouldBreak())break;let o=Zh(r.deletionStart,r.deletionCount),s=Zh(r.additionStart,r.additionCount),l=!e.isPartial&&r.deletionCount===0?o:r.deletionLineIndex,u=!e.isPartial&&r.additionCount===0?s:r.additionLineIndex,d=z_({isPartial:e.isPartial,rangeSize:r.collapsedBefore,expandedHunks:i,hunkIndex:n,collapsedContextThreshold:a}),f=n===c.finalHunkIndex?H_({fileDiff:e,hunkIndex:n,expandedHunks:i,collapsedContextThreshold:a,errorPrefix:`iterateOverDiff`}):void 0,p=d.fromStart+d.fromEnd;function m(e,n){return f==null||f.collapsedLines<=0||f.fromStart+f.fromEnd>0?0:t===`unified`?e===r.unifiedLineStart+r.unifiedLineCount-1?f.collapsedLines:0:n===r.splitLineStart+r.splitLineCount-1?f.collapsedLines:0}let h=d.collapsedLines===0;function g(){return h?0:(h=!0,d.collapsedLines)}if(c.shouldSkip(p,p))c.incrementCounts(p,p),g();else{let e=r.unifiedLineStart-d.rangeSize,i=r.splitLineStart-d.rangeSize,a=l-d.rangeSize,f=u-d.rangeSize,p=o+1-d.rangeSize,m=s+1-d.rangeSize;if(tv(c,d.fromStart,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:0,collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:p+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:f+t,lineNumber:m+t,noEOFCR:!1}}))||(e=r.unifiedLineStart-d.fromEnd,i=r.splitLineStart-d.fromEnd,a=l-d.fromEnd,f=u-d.fromEnd,p=o+1-d.fromEnd,m=s+1-d.fromEnd,tv(c,d.fromEnd,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:p+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:f+t,lineNumber:m+t,noEOFCR:!1}}),()=>{g()})))break hunkIterator}let _=r.unifiedLineStart,v=r.splitLineStart,y=l,b=u,x=o+1,S=s+1,C=r.hunkContent.at(-1);for(let e of r.hunkContent){if(c.shouldBreak())break hunkIterator;let i=e===C;if(e.type===`context`){if(c.shouldSkip(e.lines,e.lines))c.incrementCounts(e.lines,e.lines),g();else if(tv(c,e.lines,t,t=>{let a=i&&t===e.lines-1,o=_+t,s=v+t;return c.emit({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:m(o,s),type:`context`,deletionLine:{lineNumber:x+t,lineIndex:y+t,noEOFCR:a&&r.noEOFCRDeletions,unifiedLineIndex:o,splitLineIndex:s},additionLine:{unifiedLineIndex:o,splitLineIndex:s,lineIndex:b+t,lineNumber:S+t,noEOFCR:a&&r.noEOFCRAdditions}})},()=>{g()}))break hunkIterator;_+=e.lines,v+=e.lines,y+=e.lines,b+=e.lines,x+=e.lines,S+=e.lines}else{let a=Math.max(e.deletions,e.additions),o=e.deletions+e.additions;if(!c.shouldSkip(o,a)){let s=nv(c,e,t);(s[0]?.[0]??0)>0&&g();for(let[l,u]of s)for(let s=l;s<u;s++){let l=m(_+s,t===`unified`?v+(s<e.deletions?s:s-e.deletions):v+s);if(c.emit(rv({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:l,diffStyle:t,index:s,unifiedLineIndex:_,splitLineIndex:v,additionLineIndex:b,deletionLineIndex:y,additionLineNumber:S,deletionLineNumber:x,content:e,isLastContent:i,unifiedCount:o,splitCount:a}),!0))break hunkIterator}}g(),c.incrementCounts(o,a),_+=o,v+=a,y+=e.deletions,b+=e.additions,x+=e.deletions,S+=e.additions}}if(f!=null){let{collapsedLines:n,fromStart:r,fromEnd:i}=f,a=r+i;if(tv(c,a,t,t=>{let r=t===a-1;return c.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:r?n:0,type:`context-expanded`,deletionLine:{lineNumber:x+t,lineIndex:y+t,noEOFCR:!1,unifiedLineIndex:_+t,splitLineIndex:v+t},additionLine:{unifiedLineIndex:_+t,splitLineIndex:v+t,lineIndex:b+t,lineNumber:S+t,noEOFCR:!1}})},void 0,()=>c.shouldBreak()))break hunkIterator}}}function Q_({diff:e,diffStyle:t,startingLine:n,expandedHunks:r,collapsedContextThreshold:i}){if(n<=0||t===`both`)return{hunkIndex:0,splitCount:0,unifiedCount:0};let a=$_({diff:e,expandedHunks:r,collapsedContextThreshold:i}),o=0,s=e.hunks.length-1,c=e.hunks.length;for(;o<=s;){let e=o+s>>1,r=a[e+1];if(r==null)throw Error(`iterateOverDiff: invalid hunk prefix index`);(t===`unified`?r.unifiedCount:r.splitCount)>n?(c=e,s=e-1):o=e+1}if(c>=e.hunks.length){let t=a[e.hunks.length];if(t==null)throw Error(`iterateOverDiff: invalid terminal hunk prefix index`);return{hunkIndex:e.hunks.length,splitCount:t.splitCount,unifiedCount:t.unifiedCount}}let l=a[c];if(l==null)throw Error(`iterateOverDiff: invalid selected hunk prefix index`);return{hunkIndex:c,splitCount:l.splitCount,unifiedCount:l.unifiedCount}}function $_({diff:e,expandedHunks:t,collapsedContextThreshold:n}){let r=0,i=0,a=e.hunks.length-1,o=[{splitCount:0,unifiedCount:0}];for(let s=0;s<e.hunks.length;s++){let c=e.hunks[s];if(c==null)throw Error(`iterateOverDiff: invalid hunk summary index`);let l=z_({isPartial:e.isPartial,rangeSize:c.collapsedBefore,expandedHunks:t,hunkIndex:s,collapsedContextThreshold:n}),u=l.fromStart+l.fromEnd;r+=u+c.splitLineCount,i+=u+c.unifiedLineCount;let d=s===a?H_({fileDiff:e,hunkIndex:s,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:`iterateOverDiff`}):void 0;if(d!=null){let e=d.fromStart+d.fromEnd;r+=e,i+=e}o.push({splitCount:r,unifiedCount:i})}return o}function ev(e,t,n){if(!e.isWindowedHighlight||t<=0)return[0,t];let r=[];function i(n){let i=Math.max(0,e.viewportStart-n),a=Math.min(t,e.viewportEnd-n);a>i&&r.push([i,a])}if(n!==`split`&&i(e.unifiedCount),n!==`unified`&&i(e.splitCount),r.length===0)return[0,0];let a=r[0][0],o=r[0][1];for(let e=1;e<r.length;e++){let t=r[e];a=Math.min(a,t[0]),o=Math.max(o,t[1])}return[a,o]}function tv(e,t,n,r,i,a){let[o,s]=ev(e,t,n);o>0&&(e.incrementCounts(o,o),i?.());let c=o;for(;c<t;){if(a?.()===!0)return!0;if(c>=s){e.incrementCounts(t-c,t-c);break}if(e.isInWindow(0,0)){if(r(c)===!0)return!0}else e.incrementCounts(1,1);c++}return!1}function nv(e,t,n){if(!e.isWindowedHighlight)return[[0,n===`unified`?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];let r=n!==`split`,i=n!==`unified`,a=n===`unified`?`unified`:`split`,o=[];function s(t,n){if(t+n<=e.viewportStart||t>=e.viewportEnd)return;let r=Math.max(0,e.viewportStart-t),i=Math.min(n,e.viewportEnd-t);return i>r?[r,i]:void 0}function c(e,n){return a===`split`?e:n===`additions`?[e[0]+t.deletions,e[1]+t.deletions]:e}function l(e,t){if(e==null)return;let[n,r]=c(e,t);r>n&&o.push([n,r])}if(r&&(l(s(e.unifiedCount,t.deletions),`deletions`),l(s(e.unifiedCount+t.deletions,t.additions),`additions`)),i&&(l(s(e.splitCount,t.deletions),`deletions`),l(s(e.splitCount,t.additions),`additions`)),o.length===0)return o;o.sort((e,t)=>e[0]-t[0]);let u=[o[0]];for(let[e,t]of o.slice(1)){let n=u[u.length-1];e<=n[1]?n[1]=Math.max(n[1],t):u.push([e,t])}return u}function rv({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,diffStyle:i,index:a,unifiedLineIndex:o,splitLineIndex:s,additionLineIndex:c,deletionLineIndex:l,additionLineNumber:u,deletionLineNumber:d,content:f,isLastContent:p,unifiedCount:m,splitCount:h}){let g=a<f.deletions?o+a:void 0,_=i===`unified`?a>=f.deletions?o+a:void 0:a<f.additions?o+f.deletions+a:void 0,v=i===`unified`?s+(a<f.deletions?a:a-f.deletions):s+a,y=a<f.deletions?l+a:void 0,b=a<f.deletions?d+a:void 0,x=i===`unified`?a>=f.deletions?c+(a-f.deletions):void 0:a<f.additions?c+a:void 0,S=i===`unified`?a>=f.deletions?u+(a-f.deletions):void 0:a<f.additions?u+a:void 0,C=i===`unified`?p&&a===f.deletions-1&&t.noEOFCRDeletions:p&&a===h-1&&t.noEOFCRDeletions,w=i===`unified`?p&&a===m-1&&t.noEOFCRAdditions:p&&a===h-1&&t.noEOFCRAdditions,T=y!=null&&b!=null&&g!=null?{lineNumber:b,lineIndex:y,noEOFCR:C,unifiedLineIndex:g,splitLineIndex:v}:void 0,E=x!=null&&S!=null&&_!=null?{unifiedLineIndex:_,splitLineIndex:v,lineIndex:x,lineNumber:S,noEOFCR:w}:void 0;if(T==null&&E!=null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:void 0,additionLine:E};if(T!=null&&E==null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:T,additionLine:void 0};if(T==null||E==null)throw Error(`iterateOverDiff: missing change line data`);return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:T,additionLine:E}}var iv={forcePlainText:!1};function av(e,t,n,{forcePlainText:r,startingLine:i,totalLines:a,expandedHunks:o,collapsedContextThreshold:s=1}=iv){r?(i??=0,a??=1/0):(i=0,a=1/0);let c=i>0||a<1/0,l=typeof n.theme==`string`?t.getTheme(n.theme).type:void 0,u=th({theme:n.theme,highlighter:t}),d=r&&!c&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?`none`:n.lineDiffType,f={deletionLines:[],additionLines:[]},{maxLineDiffLength:p}=n,m=!r&&!e.isPartial,h=r?o:void 0,g=new Map;function _(e){let t=m?0:e,n=g.get(t)??cv();return g.set(t,n),n}function v(e,t,n,r){if(c){let e=n.at(-1);(e==null||e.targetIndex+e.count!==t)&&(e={targetIndex:t,originalOffset:r.length,count:0},n.push(e)),e.count++}r.push(e)}Z_({diff:e,diffStyle:`both`,startingLine:i,totalLines:a,expandedHunks:!c||h,collapsedContextThreshold:s,callback:({hunkIndex:t,additionLine:n,deletionLine:r,type:i})=>{let a=_(t),o=n==null?r.splitLineIndex:n.splitLineIndex;i===`change`&&n!=null&&r!=null&&sv({additionLine:e.additionLines[n.lineIndex],deletionLine:e.deletionLines[r.lineIndex],deletionLineIndex:a.deletionContent.length,additionLineIndex:a.additionContent.length,deletionDecorations:a.deletionDecorations,additionDecorations:a.additionDecorations,lineDiffType:d,maxLineDiffLength:p}),r!=null&&(v(e.deletionLines[r.lineIndex],r.lineIndex,a.deletionSegments,a.deletionContent),a.deletionInfo.push({type:i===`change`?`change-deletion`:i,lineNumber:r.lineNumber,altLineNumber:i===`change`?void 0:n.lineNumber??void 0,lineIndex:`${r.unifiedLineIndex},${o}`})),n!=null&&(v(e.additionLines[n.lineIndex],n.lineIndex,a.additionSegments,a.additionContent),a.additionInfo.push({type:i===`change`?`change-addition`:i,lineNumber:n.lineNumber,altLineNumber:i===`change`?void 0:r.lineNumber??void 0,lineIndex:`${n.unifiedLineIndex},${o}`}))}});for(let i of g.values()){if(i.deletionContent.length===0&&i.additionContent.length===0)continue;let a={name:e.prevName??e.name,contents:i.deletionContent.value},o={name:e.name,contents:i.additionContent.value},{deletionLines:s,additionLines:c}=lv({deletionFile:a,deletionInfo:i.deletionInfo,deletionDecorations:i.deletionDecorations,additionFile:o,additionInfo:i.additionInfo,additionDecorations:i.additionDecorations,highlighter:t,options:n,languageOverride:r?`text`:e.lang});if(m){f.deletionLines=s,f.additionLines=c;continue}if(i.deletionSegments.length>0)for(let e of i.deletionSegments)for(let t=0;t<e.count;t++)f.deletionLines[e.targetIndex+t]=s[e.originalOffset+t];else ih(f.deletionLines,s);if(i.additionSegments.length>0)for(let e of i.additionSegments)for(let t=0;t<e.count;t++)f.additionLines[e.targetIndex+t]=c[e.originalOffset+t];else ih(f.additionLines,c)}return{code:f,themeStyles:u,baseThemeType:l}}function ov(e,{deletionLineIndex:t,additionLineIndex:n,deletionDecorations:r,additionDecorations:i}){let a=0,o=0,s=-1,c=0,l=-1,u=0;for(let{value:t,added:n,removed:r}of e)r?(s===-1&&(s=a),a+=t.length,c=a):n?(l===-1&&(l=o),o+=t.length,u=o):(a+=t.length,o+=t.length);s!==-1&&r.push(I_({line:t,spanStart:s,spanLength:c-s})),l!==-1&&i.push(I_({line:n,spanStart:l,spanLength:u-l}))}function sv({deletionLine:e,additionLine:t,deletionLineIndex:n,additionLineIndex:r,deletionDecorations:i,additionDecorations:a,lineDiffType:o,maxLineDiffLength:s}){if(e==null||t==null||o===`none`||(e=dg(e),t=dg(t),e.length>s||t.length>s))return;let c=o===`char`?Yg(e,t):f_(e,t);if(o===`word-line`){ov(c,{deletionLineIndex:n,additionLineIndex:r,deletionDecorations:i,additionDecorations:a});return}let l=[],u=[],d=o===`word-alt`,f=c.at(-1);for(let e of c){let t=e===f;!e.added&&!e.removed?(L_({item:e,arr:l,enableJoin:d,isNeutral:!0,isLastItem:t}),L_({item:e,arr:u,enableJoin:d,isNeutral:!0,isLastItem:t})):e.removed?L_({item:e,arr:l,enableJoin:d,isLastItem:t}):L_({item:e,arr:u,enableJoin:d,isLastItem:t})}let p=0;for(let e of l)e[0]===1&&i.push(I_({line:n,spanStart:p,spanLength:e[1].length})),p+=e[1].length;p=0;for(let e of u)e[0]===1&&a.push(I_({line:r,spanStart:p,spanLength:e[1].length})),p+=e[1].length}function cv(){return{deletionContent:{push(e){this.value+=e,this.length++},value:``,length:0},additionContent:{push(e){this.value+=e,this.length++},value:``,length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function lv({deletionFile:e,additionFile:t,deletionInfo:n,additionInfo:r,highlighter:i,deletionDecorations:a,additionDecorations:o,languageOverride:s,options:{theme:c,...l}}){let u=s??Em(e.name),d=s??Em(t.name),{state:f,transformers:p}=zm(l.useTokenTransformer),m=typeof c==`string`?{...l,lang:`text`,theme:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:Hm(`token`),tokenizeTimeLimit:0}:{...l,lang:`text`,themes:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:Hm(`token`),tokenizeTimeLimit:0};return{deletionLines:e.contents===``?[]:(m.lang=u,f.lineInfo=n,m.decorations=a,rh(i.codeToHast(dg(e.contents),m))),additionLines:t.contents===``?[]:(m.lang=d,m.decorations=o,f.lineInfo=r,rh(i.codeToHast(dg(t.contents),m)))}}function uv(e,t){let n=E_({name:e.prevName??e.name,contents:e.deletionLines.join(``)},{name:e.name,contents:e.additionLines.join(``),lang:e.lang},t);return{hunks:n.hunks,splitLineCount:n.splitLineCount,unifiedLineCount:n.unifiedLineCount,additionLines:n.additionLines,deletionLines:n.deletionLines,type:n.type}}function dv(e,t){let n=Math.max(e,1),r=Array.from({length:n},(e,t)=>`${` `.repeat(t+1)}\n`).join(``);return r===t&&(r=Array.from({length:n},(e,t)=>`\u0000${` `.repeat(t)}\n`).join(``)),r}function fv(e){for(let t of e)if(t.trim().length>0)return!1;return!0}function pv(e,t){return t.length>0&&t.length<e.deletionLines.length&&fv(t)}function mv(e,t,n){let r=e.deletionLines.join(``),i=dv(t.length,r),a=E_({name:e.prevName??e.name,contents:r},{name:e.name,contents:i,lang:e.lang},n);return{hunks:a.hunks,splitLineCount:a.splitLineCount,unifiedLineCount:a.unifiedLineCount,additionLines:t,deletionLines:a.deletionLines,type:a.type}}function hv(e,t){return mv(e,[``],t)}function gv(e,t){if(e.additionLines.length===0)return hv(e,t);if(pv(e,e.additionLines))return mv(e,e.additionLines,t);let n=e.additionLines,r=uv(e,t);return vv(r,n),r}function _v(e){return e.length>1&&e.at(-1)===``}function vv(e,t){if(!_v(t))return;let n=t.length-e.additionLines.length;if(n<=0)return;let r=e.additionLines.length,i=e.hunks.at(-1);if(i!=null&&Qh(i.additionStart,i.additionCount)===r){for(let a of i.hunkContent)if(a.type===`change`&&a.additions<a.deletions&&a.additionLineIndex+a.additions===r){e.additionLines=t,a.additions+=n,i.additionCount+=n,i.additionLines+=n,Ov(e);return}}}function yv(e,t,n){if(e.isPartial||e.deletionLines.length!==e.additionLines.length)return bv(e,uv(e,n));let r=Array.from(t);if(r.length===0)return bv(e,{hunks:e.hunks,splitLineCount:e.splitLineCount,unifiedLineCount:e.unifiedLineCount,type:e.type});for(let t of r){let r=e.additionLines[t],i=e.deletionLines[t];if(r==null||i==null||dg(r)===dg(i))return bv(e,uv(e,n))}let i=xv(e,r);if(i.size===0)return bv(e,uv(e,n));for(let t of i)if(!Cv(e,t,n))return bv(e,uv(e,n));return Ov(e),B_(e)?bv(e,uv(e,n)):bv(e,{hunks:e.hunks,splitLineCount:e.splitLineCount,unifiedLineCount:e.unifiedLineCount,type:e.type})}function bv(e,t){return Object.assign(e,t),t}function xv(e,t){let n=new Set;for(let r of t){let t=Sv(e,r);if(t==null)return new Set;n.add(t)}return n}function Sv(e,t){for(let[n,r]of e.hunks.entries()){let e=r.additionLineIndex+r.additionCount;if(t>=r.additionLineIndex&&t<e)return n}}function Cv(e,t,n){let r=e.hunks[t];if(r==null)return!1;let i=e.deletionLines.slice(r.deletionLineIndex,r.deletionLineIndex+r.deletionCount),a=e.additionLines.slice(r.additionLineIndex,r.additionLineIndex+r.additionCount),o=E_({name:e.prevName??e.name,contents:i.join(``)},{name:e.name,contents:a.join(``),lang:e.lang},{...n,context:0}),s=o.hunks[0];return s==null||o.hunks.length!==1?!1:(Tv(r,s),wv(e,t),!0)}function wv(e,t){let n=e.hunks[t];if(n==null)return;if(t!==e.hunks.length-1){n.noEOFCRAdditions=!1,n.noEOFCRDeletions=!1;return}let r=e.additionLines.at(-1),i=e.deletionLines.at(-1);n.noEOFCRAdditions=r!=null&&r!==``&&!r.endsWith(`
227
+ `),n.noEOFCRDeletions=i!=null&&i!==``&&!i.endsWith(`
228
+ `)}function Tv(e,t){let n=e.additionLineIndex,r=e.deletionLineIndex;e.hunkContent=t.hunkContent.map(e=>Ev(e,n,r)),e.additionLineIndex=n+t.additionLineIndex,e.additionStart+=t.additionLineIndex,e.additionCount=t.additionCount,e.additionLines=t.additionLines,t.deletionLineIndex>=0&&(e.deletionLineIndex=r+t.deletionLineIndex,e.deletionStart+=t.deletionLineIndex),e.deletionCount=t.deletionCount,e.deletionLines=t.deletionLines,e.noEOFCRAdditions=t.noEOFCRAdditions,e.noEOFCRDeletions=t.noEOFCRDeletions,Dv(e)}function Ev(e,t,n){return{...e,additionLineIndex:e.additionLineIndex+t,deletionLineIndex:e.deletionLineIndex+n}}function Dv(e){let t=0,n=0;for(let r of e.hunkContent)r.type===`context`?(t+=r.lines,n+=r.lines):(t+=Math.max(r.additions,r.deletions),n+=r.additions+r.deletions);e.splitLineCount=t,e.unifiedLineCount=n}function Ov(e){let t=0,n=0,r=0;for(let i of e.hunks)i.collapsedBefore=Math.max(Zh(i.additionStart,i.additionCount)-r,0),i.splitLineStart=t+i.collapsedBefore,i.unifiedLineStart=n+i.collapsedBefore,Dv(i),t+=i.collapsedBefore+i.splitLineCount,n+=i.collapsedBefore+i.unifiedLineCount,r=Qh(i.additionStart,i.additionCount);if(e.hunks.length>0){let r=e.hunks[e.hunks.length-1],i=Math.max(e.additionLines.length-Qh(r.additionStart,r.additionCount),0);t+=i,n+=i}e.splitLineCount=t,e.unifiedLineCount=n}var kv=new WeakMap;function Av(e){return e.length>1&&e[e.length-1]===``?e.slice(0,-1):e}function jv(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r++;let i=e.length,a=t.length;for(;i>r&&a>r&&e[i-1]===t[a-1];)i--,a--;if(r!==i||r!==a)return{start:r,deletionEnd:i,additionEnd:a}}function Mv(e,t,n){let r=e.hunks,i=e.additionLines,a=Av(i),o=a===i?e:{...e,additionLines:a},s=Uv(r,Vv(o,t,n),e.deletionLines.length),c=Kv(o,s);if(e.additionLines=a,e.hunks=c,e.editSessionDirty=!0,ny(e),vv(e,i),Yv(r,e.hunks))return{regions:s.map(e=>e.previousSpan)}}function Nv(e,t,n,r){let i=new Set(t),a=Array.from(i).filter(t=>t>=0&&t<e.additionLines.length).sort((e,t)=>e-t);if(a.length===0)return;let o=t=>i.has(t)?r?.get(t):e.additionLines[t],{hunks:s}=e,c,l=0;for(let t of a){for(;l<s.length;){let e=s[l];if(t<Qv(e)+e.additionCount)break;l++}let r=s[l],i=r==null?void 0:Qv(r);if(i==null||t<i||c!=null&&c!==l)return Mv(e,n,o);c=l}if(c!=null){if(Pv(e,a,c,r,n)){e.editSessionDirty=!0;return}return Mv(e,n,o)}}function Pv(e,t,n,r,i){if(r==null||i?.ignoreWhitespace===!0||i?.stripTrailingCr===!0)return!1;let a=Fv(e),o=e.hunks[n];if(o.hunkContent.some(Iv))return!1;for(let n of t){let t=r.get(n),i=e.additionLines[n];if(t==null||i==null||a.has(t)||a.has(i))return!1;let s=!1;for(let e of o.hunkContent)if(e.type===`change`&&e.additions===e.deletions&&n>=e.additionLineIndex&&n<e.additionLineIndex+e.additions){s=!0;break}if(!s)return!1}return!0}function Fv(e){let t=kv.get(e);if(t?.lines===e.deletionLines)return t.set;let n=new Set(e.deletionLines);return kv.set(e,{lines:e.deletionLines,set:n}),n}function Iv(e){return e?.type===`change`&&(e.additions===0||e.deletions===0)}function Lv(e,t){let n=new Map,{regions:r}=t;for(let t=0;t<=r.length;t++){let i=r[t-1],a=r[t],o=t===0?e.get(0):i==null?void 0:e.get(i.lastIndex+1),s=a==null?void 0:e.get(a.firstIndex),c=o?.fromStart??0,l=s?.fromEnd??0;(c>0||l>0)&&n.set(t,{fromStart:c,fromEnd:l})}return n}function Rv(e,t,n){let r=[];if(e.isPartial)return r;for(let[i,a]of e.hunks.entries()){let o=z_({isPartial:e.isPartial,rangeSize:a.collapsedBefore,expandedHunks:t,hunkIndex:i,collapsedContextThreshold:n});if(o.rangeSize<=n)continue;let s=$v(a),c=s-o.rangeSize;o.fromStart>0&&r.push([c,c+o.fromStart]),o.fromEnd>0&&r.push([s-o.fromEnd,s])}let i=H_({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:`captureExpansionAnchors`});if(i!=null&&i.fromStart>0&&i.rangeSize>n){let t=e.hunks[e.hunks.length-1],n=$v(t)+t.deletionCount;r.push([n,n+i.fromStart])}return r}function zv(e,t){let n=new Map;if(t.length===0)return n;let r=(e,r,i)=>{if(i<=r)return;let a=0,o=0;for(let[e,n]of t)n<=r||e>=i||(e<=r&&(a=Math.max(a,Math.min(n,i)-r)),n>=i&&(o=Math.max(o,i-Math.max(e,r))));(a>0||o>0)&&n.set(e,{fromStart:a,fromEnd:o})};for(let[t,n]of e.hunks.entries()){let e=$v(n);r(t,e-Math.max(n.collapsedBefore,0),e)}let i=e.hunks[e.hunks.length-1];return i!=null&&!e.isPartial&&e.deletionLines.length>0&&r(e.hunks.length,$v(i)+i.deletionCount,e.deletionLines.length),n}function Bv(e,t){return e.editSessionDirty===!0&&(delete e.editSessionDirty,Object.assign(e,e.additionLines.length<=1&&e.additionLines.join(``)===``?uv(e,t):gv(e,t)),!0)}function Vv(e,t,n){if(jv(e.deletionLines,e.additionLines)==null)return[];let r=E_({name:e.prevName??e.name,contents:e.deletionLines.join(``)},{name:e.name,contents:e.additionLines.join(``),lang:e.lang},t),i,a=(t,a)=>{i??=Hv(e.hunks);for(let e=0;e<=a;e++){let o=i.get(t.deletionLineIndex-e);if(o!=null&&o.additions===t.additions&&o.deletions===t.deletions){if(t.additions>0&&n!=null){for(let e=0;e<t.additions;e++)if(n(o.additionLineIndex+e)!==r.additionLines[t.additionLineIndex+e])return a}return e}}return a},o=[],s=0,c=0;for(let e of r.hunks){Tg(e,r,a);let t=e.additionCount>0?e.additionLineIndex-s:e.deletionLineIndex-c;s+=t,c+=t;for(let t of e.hunkContent){if(t.type===`context`){s+=t.lines,c+=t.lines;continue}let e=Ev(t,0,0);e.additions===0&&(e.additionLineIndex=s),e.deletions===0&&(e.deletionLineIndex=c),o.push(e),s+=e.additions,c+=e.deletions}}return o}function Hv(e){let t=new Map;for(let n of e)for(let e of n.hunkContent)e.type===`change`&&(e.additions===0||e.deletions===0)&&t.set(e.deletionLineIndex,e);return t}function Uv(e,t,n){let r=e.map((e,t)=>{let n=$v(e);return{deletionStart:n,deletionEnd:n+e.deletionCount,blocks:[],previousSpan:{firstIndex:t,lastIndex:t}}}),i=[],a=0;for(let e of t){let t=e.deletionLineIndex,o=t+e.deletions;for(;a<r.length&&r[a].deletionEnd<t;)i.push(r[a]),a++;let s=i.length>0&&Wv(t,o,i[i.length-1])?i.pop():void 0;for(;a<r.length&&r[a].deletionStart<=o;)s=Gv(s,r[a]),a++;if(s==null){let c=t,l=o;if((e.deletions===0||e.additions===0)&&n>e.deletions){let e=i[i.length-1]?.deletionEnd??0,s=r[a]?.deletionStart??n;t>e?c--:o<s&&l++}s={deletionStart:c,deletionEnd:l,blocks:[],previousSpan:void 0}}s.deletionStart=Math.min(s.deletionStart,t),s.deletionEnd=Math.max(s.deletionEnd,o),s.blocks.push(e),i.push(s)}for(;a<r.length;)i.push(r[a]),a++;return i}function Wv(e,t,n){return e<=n.deletionEnd&&t>=n.deletionStart}function Gv(e,t){return e==null?t:(e.deletionStart=Math.min(e.deletionStart,t.deletionStart),e.deletionEnd=Math.max(e.deletionEnd,t.deletionEnd),e.blocks.push(...t.blocks),t.previousSpan!=null&&(e.previousSpan??={...t.previousSpan},e.previousSpan.firstIndex=Math.min(e.previousSpan.firstIndex,t.previousSpan.firstIndex),e.previousSpan.lastIndex=Math.max(e.previousSpan.lastIndex,t.previousSpan.lastIndex)),e)}function Kv(e,t){let n=[],r=0,i=0;for(let a of t){let t=a.deletionStart-r;if(t<0)throw Error(`buildRegionHunks: overlapping old-side regions`);r+=t,i+=t;let o=i,s=[];for(let e of a.blocks){let t=e.deletionLineIndex-r,n=e.additionLineIndex-i;if(t<0||t!==n)throw Error(`buildRegionHunks: canonical block context mismatch`);Jv(s,t,i,r),r+=t,i+=n,s.push({...e}),r+=e.deletions,i+=e.additions}let c=a.deletionEnd-r;if(c<0)throw Error(`buildRegionHunks: block exceeds its old-side region`);Jv(s,c,i,r),r+=c,i+=c,n.push(qv(e,{additionStart:o,additionEnd:i,deletionStart:a.deletionStart,deletionEnd:a.deletionEnd},s))}if(e.deletionLines.length-r!==e.additionLines.length-i)throw Error(`buildRegionHunks: trailing context mismatch`);return n}function qv(e,t,n){let r=t.additionEnd-t.additionStart,i=t.deletionEnd-t.deletionStart,a=0,o=0;for(let e of n)e.type===`change`&&(a+=e.additions,o+=e.deletions);let s={collapsedBefore:0,additionStart:ey(t.additionStart,r),additionCount:r,additionLines:a,additionLineIndex:ty(t.additionStart,r),deletionStart:ey(t.deletionStart,i),deletionCount:i,deletionLines:o,deletionLineIndex:ty(t.deletionStart,i),hunkContent:n,hunkSpecs:`@@ -${ey(t.deletionStart,i)},${i} +${ey(t.additionStart,r)},${r} @@`,splitLineStart:0,splitLineCount:0,unifiedLineStart:0,unifiedLineCount:0,noEOFCRAdditions:!1,noEOFCRDeletions:!1};return Dv(s),s}function Jv(e,t,n,r){t>0&&e.push({type:`context`,lines:t,additionLineIndex:n,deletionLineIndex:r})}function Yv(e,t){if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if($v(r)!==$v(i)||r.deletionCount!==i.deletionCount||Qv(r)!==Qv(i)||r.additionCount!==i.additionCount||r.splitLineCount!==i.splitLineCount||!Xv(r,i))return!0}return!1}function Xv(e,t){let n=Zv(e),r=Zv(t);for(;;){let e=n.next(),t=r.next();if(e.done===!0||t.done===!0)return e.done===t.done;if(e.value[0]!==t.value[0]||e.value[1]!==t.value[1])return!1}}function*Zv(e){for(let t of e.hunkContent){if(t.type===`context`){for(let e=0;e<t.lines;e++)yield[t.deletionLineIndex+e,t.additionLineIndex+e];continue}let e=Math.max(t.deletions,t.additions);for(let n=0;n<e;n++)yield[n<t.deletions?t.deletionLineIndex+n:void 0,n<t.additions?t.additionLineIndex+n:void 0]}}function Qv(e){return Zh(e.additionStart,e.additionCount)}function $v(e){return Zh(e.deletionStart,e.deletionCount)}function ey(e,t){return t===0?e:e+1}function ty(e,t){return t===0?e-1:e}function ny(e){Ov(e);for(let t=0;t<e.hunks.length;t++)wv(e,t)}function ry(e){let t=e.lang??Em(e.name),n=e.lang??(e.prevName==null?`text`:Em(e.prevName));return t===`text`&&n===`text`}var iy=-1,ay=class{options;annotationSlotName;onRenderUpdate;workerManager;__id=`diff-hunks-renderer:${++iy}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLangs=[`text`];renderCache;pendingHighlightResult;pendingStructuralRows;editSessionActive=!1;constructor(e={theme:Ee},t=Om,n,r){this.options=e,this.annotationSlotName=t,this.onRenderUpdate=n,this.workerManager=r,r?.isWorkingPool()!==!0&&(this.highlighter=Ct(e.theme??Ee)?Ot():void 0)}cleanUp(){this.endEditSession(),this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.editSessionActive?(this.renderCache!=null&&(this.renderCache.renderRange=void 0),this.pendingHighlightResult=void 0,this.pendingStructuralRows=void 0):this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this)}beginEditSession(e,t){let{editSessionActive:n}=this;this.editSessionActive=!0,n||(this.pendingHighlightResult=void 0),this.diff=e,n&&this.renderCache!=null&&this.renderCache.diff!==e&&this.clearRenderCache();let{renderCache:r}=this;if(!e.isPartial&&e.additionLines.length===0){Object.assign(e,hv(e,this.options.parseDiffOptions)),this.markEditSessionPass(e),this.clearRenderCache();return}if(r==null||n&&r.diff===e)return;let{options:i}=this.getRenderOptions(e),a=r.diff===e,o=t!=null&&Q(r.diff,t),{result:s}=r;if(!r.highlighted||s==null||!k_(r.options,i)||!a&&!o){this.clearRenderCache();return}a||(this.renderCache={diff:e,options:i,highlighted:!0,result:{...s,code:{...s.code,additionLines:[...s.code.additionLines]}},renderRange:r.renderRange})}endEditSession(){this.editSessionActive=!1,this.pendingHighlightResult=void 0,this.diff??this.clearRenderCache()}editorRenderReady(){return this.renderCache?.options.useTokenTransformer===!0&&this.renderCache.highlighted&&this.renderCache.result!=null}refreshHighlightedResult(){let{diff:e,renderCache:t,workerManager:n}=this;return e==null||t==null||!Q(t.diff,e)||ry(e)||vy(e,this.getTokenizeMaxLength())?Promise.resolve():!this.editSessionActive&&n?.isWorkingPool()===!0&&e.cacheKey!=null?(n.evictDiffFromCache(e.cacheKey),n.primeDiffHighlightCache(e).then(()=>{this.applyRefreshedResult(e,n.getDiffResultCache(e))}).catch(e=>this.onHighlightError(e))):this.asyncHighlight(e).then(t=>this.applyRefreshedResult(e,t)).catch(e=>this.onHighlightError(e))}applyRefreshedResult(e,t){let{diff:n,renderCache:r}=this;if(t==null||n==null||r==null||!Q(n,e)||!Q(r.diff,e)||this.editSessionActive)return;let{options:i}=this.getRenderOptions(n);k_(i,t.options)&&(this.pendingHighlightResult={diff:n,options:t.options,highlighted:!0,result:t.result},this.onRenderUpdate?.())}get diffCache(){return this.renderCache?.diff??this.diff}clearRenderCache(){this.renderCache=void 0,this.pendingHighlightResult=void 0,this.pendingStructuralRows=void 0}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){let r={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t===`up`||t===`both`)&&(r.fromStart+=n),(t===`down`||t===`both`)&&(r.fromEnd+=n),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(e,r)}getExpandedHunk(e){return this.expandedHunks.get(e)??Ye}getExpandedHunksMap(){return this.expandedHunks}setExpandedHunksMap(e){this.expandedHunks=e}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(let t of e){let e=(()=>{switch(t.side){case`deletions`:return this.deletionAnnotations;case`additions`:return this.additionAnnotations}})(),n=e[t.lineNumber]??[];e[t.lineNumber]=n,n.push(t)}}updateRenderCache(e,t,n=!1){this.pendingStructuralRows=void 0;let{renderCache:r}=this;if(r==null)return!1;let{result:i,diff:a}=r;if(i==null)return!1;if(a.isPartial)throw Error(`Could not update render cache for partial diff`);let o=i.code.additionLines,s=this.pendingStructuralRows=n?new Map:void 0,c=[],l=new Map;for(let[t,n]of e){let e=o[t]?.properties??{},r=n.map(e=>e[2]).join(``),i=t<a.additionLines.length,u=i?a.additionLines[t]??``:``,d=dg(u);s==null&&i&&(a.additionLines[t]=lh(u,r),d!==r&&(c.push(t),l.set(t,u)));let f={type:`element`,tagName:`div`,properties:{"data-line":e[`data-line`]??t+1,"data-line-index":e[`data-line-index`]??t,"data-line-type":e[`data-line-type`]??`context`},children:n.map(([e,t,n])=>e===0&&t===``?n===``?{type:`element`,tagName:`br`,properties:{},children:[]}:{type:`text`,value:n}:{type:`element`,tagName:`span`,properties:{"data-char":e,style:`color:${t};`},children:[{type:`text`,value:n}]})};s==null?o[t]=f:s.set(t,f)}let u=!1;if(c.length>0){if(this.editSessionActive){if(a.additionLines.length<=1&&a.additionLines.join(``)===``)this.applyRecomputePreservingSessionType(a,hv(a,this.options.parseDiffOptions)),u=!0;else if(pv(a,a.additionLines))this.applyRecomputePreservingSessionType(a,mv(a,a.additionLines,this.options.parseDiffOptions)),u=!0;else{let e=Nv(a,c,this.options.parseDiffOptions,l);this.applyExpansionRemap(e),u=e!=null}}else Object.assign(a,yv(a,c,this.options.parseDiffOptions))}return i.baseThemeType=t,r.isDirty=!0,u}applyExpansionRemap(e){e!=null&&(this.expandedHunks=Lv(this.expandedHunks,e))}applyDocumentChange(e){let{pendingStructuralRows:t,renderCache:n}=this;this.pendingStructuralRows=void 0;let r=this.diff??n?.diff;if(r==null)return;let i=n?.result;if(r.isPartial)throw Error(`Could not apply document change for partial diff`);let{additionLines:a}=r;if(r.additionLines=gy(e),i!=null&&(i.code.additionLines=my(a,r.additionLines,i.code.additionLines,e)),r.additionLines.length<=1&&r.additionLines.join(``)===``?(this.applyRecomputePreservingSessionType(r,hv(r,this.options.parseDiffOptions)),i!=null&&(i.code.additionLines[0]=hy(0,e.getLineText(0)))):this.editSessionActive?this.applySessionDocumentChange(r,a):Object.assign(r,gv(r,this.options.parseDiffOptions)),t!=null&&i!=null)for(let[e,n]of t)e<i.code.additionLines.length&&(i.code.additionLines[e]=n);n!=null&&(n.isDirty=!0)}applySessionDocumentChange(e,t){let{parseDiffOptions:n}=this.options,r=e.additionLines;if(pv(e,r)){this.applyRecomputePreservingSessionType(e,mv(e,r,n));return}this.applyExpansionRemap(Mv(e,n,e=>t[e]))}applyRecomputePreservingSessionType(e,t){let n=this.editSessionActive?e.type:void 0;Object.assign(e,t),n!=null&&(e.type=n),this.markEditSessionPass(e)}markEditSessionPass(e){this.editSessionActive&&(e.editSessionDirty=!0)}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e,contentProperties:{"data-line-type":e}}}getSplitLineDecoration({side:e,type:t}){let n=t===`change`?e===`deletions`?`change-deletion`:`change-addition`:t;return{gutterLineType:n,contentProperties:{"data-line-type":n}}}createAnnotationElement=e=>_m(e);getOptionsWithDefaults(){let{diffIndicators:e=`bars`,diffStyle:t=`split`,disableBackground:n=!1,disableFileHeader:r=!1,disableLineNumbers:i=!1,disableVirtualizationBuffers:a=!1,collapsed:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=1,expansionLineCount:l=100,hunkSeparators:u=`line-info`,lineDiffType:d=`word-alt`,maxLineDiffLength:f=1e3,overflow:p=`scroll`,stickyHeader:m=!1,theme:h=Ee,headerRenderMode:g=`default`,tokenizeMaxLineLength:_=1e3,tokenizeMaxLength:v=Te,useTokenTransformer:y=!1,useCSSClasses:b=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:r,disableLineNumbers:i,disableVirtualizationBuffers:a,collapsed:o,expandUnchanged:s,collapsedContextThreshold:c,expansionLineCount:l,hunkSeparators:u,lineDiffType:d,maxLineDiffLength:f,overflow:p,stickyHeader:m,theme:this.workerManager?.getDiffRenderOptions().theme??h,headerRenderMode:g,tokenizeMaxLineLength:_,tokenizeMaxLength:v,useTokenTransformer:y,useCSSClasses:b}}async initializeHighlighter(){return this.highlighter=await At(Dm(this.computedLangs,{theme:this.getLocalHighlightTheme(),preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter})),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;let{options:t}=this.getRenderOptions(e),n=vy(e,this.getTokenizeMaxLength()),r=this.workerManager?.getDiffResultCache(e);r!=null&&!k_(t,r.options)&&(r=void 0),this.renderCache??={diff:e,hydrated:!0,highlighted:!n&&!ry(e),options:t,result:n?void 0:r?.result,renderRange:void 0},!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter??(this.computedLangs=_y(e),this.initializeHighlighter())}getLocalHighlightTheme(){return this.workerManager?.getDiffRenderOptions().theme??this.options.theme??Ee}getEffectiveCodeOptions(){let e=this.workerManager?.isWorkingPool()===!0?this.workerManager.getDiffRenderOptions():void 0;return{theme:this.getLocalHighlightTheme(),tokenizeMaxLineLength:e?.tokenizeMaxLineLength??this.options.tokenizeMaxLineLength}}getRenderOptions(e){let t=(()=>{if(this.workerManager?.isWorkingPool()===!0){let e=this.workerManager.getDiffRenderOptions();return this.editSessionActive&&e.useTokenTransformer!==!0?{...e,useTokenTransformer:!0}:e}let{theme:e,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}=this.getOptionsWithDefaults();return{theme:e,useTokenTransformer:this.editSessionActive||this.options.useTokenTransformer===!0,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}})();this.getOptionsWithDefaults();let{renderCache:n}=this;return n?.result==null||!Q(e,n.diff)||!k_(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}getDiffForNextRender(e){let{options:t}=this.getRenderOptions(e);if(this.getReadyRenderResult(e,t)!=null||this.renderCache==null)return e;if(Q(this.renderCache.diff,e))return this.renderCache.diff;let n=!(e.additionLines.length>0||e.deletionLines.length>0)||ry(e)||vy(e,this.getTokenizeMaxLength());return this.canRenderDiff(e,t,n)?e:this.renderCache.diff}canRenderDiff(e,t,n){let{renderCache:r}=this;return r==null||Q(r.diff,e)?!0:n?r.result==null&&r.hydrated!==!0||this.workerManager?.isWorkingPool()===!0||this.highlighter!=null&&Ct(t.theme):r.result==null&&r.hydrated!==!0?!0:!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0?!r.highlighted:this.highlighter!=null&&Ct(t.theme)}renderDiff(e=this.diff,t=xe){if(this.diff=e,e==null){this.pendingHighlightResult=void 0;return}let{expandUnchanged:n,collapsedContextThreshold:r}=this.getOptionsWithDefaults(),{options:i,forceHighlight:a}=this.getRenderOptions(e),o=this.getReadyRenderResult(e,i);this.pendingHighlightResult=void 0,o!=null&&(this.renderCache={...o,diff:e,renderRange:void 0},a=!1),this.renderCache??={diff:e,highlighted:!1,options:i,result:void 0,renderRange:void 0};let s=e.additionLines.length>0||e.deletionLines.length>0,c=!s||ry(e)||vy(e,this.getTokenizeMaxLength()),l=this.canRenderDiff(e,i,c),u=!Q(e,this.renderCache.diff),d=!gm(this.renderCache.renderRange,t);if(!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0){let o=this.renderCache.result==null&&this.renderCache.highlighted&&!c&&!u&&km(t);l&&!o&&(c||this.renderCache.result==null||!this.renderCache.highlighted&&(u||d))&&(this.renderCache.diff=e,this.renderCache.options=i,this.renderCache.highlighted=!1,(this.renderCache.result==null||u||d||a)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,km(t)||n?!0:this.expandedHunks,r)),this.renderCache.renderRange=t),!c&&s&&(!this.renderCache.highlighted||a)&&this.workerManager.highlightDiffAST(this,e)}else{this.computedLangs=_y(e),this.highlighter??=Ot();let t=this.highlighter!=null&&Ct(i.theme),n=this.highlighter!=null&&wt(this.computedLangs),r=!c&&n;if(l&&this.highlighter!=null&&t&&(a||c||!this.renderCache.highlighted&&r||this.renderCache.result==null)){let{result:t,options:i}=this.renderDiffWithHighlighter(e,this.highlighter,c||!n);this.renderCache={diff:e,options:i,highlighted:r,result:t,renderRange:void 0}}(!t||!c&&!n)&&this.asyncHighlight(e).then(({result:t,options:n})=>{this.applyHighlightResult(e,t,n,!c)})}return this.renderCache.result==null?void 0:this.processDiffResult(this.renderCache.diff,t,this.renderCache.result)}async asyncRender(e,t=xe){this.diff=e;let{result:n}=await this.asyncHighlight(e);return this.processDiffResult(e,t,n)}createPreElement(e,t,n){let{diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o}=this.getOptionsWithDefaults();return Sm({type:`diff`,diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o,split:e,totalLines:t,customProperties:n})}async asyncHighlight(e){let t=vy(e,this.getTokenizeMaxLength());this.computedLangs=t?[`text`]:_y(e);let n=this.highlighter!=null&&Ct(this.getLocalHighlightTheme()),r=t||this.highlighter!=null&&wt(this.computedLangs);return(this.highlighter==null||!n||!r)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter,t)}renderDiffWithHighlighter(e,t,n=!1){let{options:r}=this.getRenderOptions(e),{collapsedContextThreshold:i}=this.getOptionsWithDefaults(),a=av(e,t,r,{forcePlainText:n,expandedHunks:n?!0:void 0,collapsedContextThreshold:i});if(this.editSessionActive&&e.additionLines.length===1&&e.additionLines[0]===``&&a.code.additionLines[0]==null){let t;if(Z_({diff:e,diffStyle:`both`,expandedHunks:n?!0:void 0,collapsedContextThreshold:i,callback:({additionLine:e})=>{if(e?.lineIndex===0)return t=e,!0}}),t==null)throw Error(`DiffHunksRenderer: missing empty addition line`);a.code.additionLines[0]=hy(0,``,t.unifiedLineIndex,t.splitLineIndex)}return{result:a,options:r}}onHighlightSuccess(e,t,n,r=!0){this.editSessionActive||this.applyHighlightResult(e,t,n,r)}applyHighlightResult(e,t,n,r=!0){let{diff:i,renderCache:a}=this;i!=null&&a!=null&&Q(i,e)&&k_(n,this.getRenderOptions(i).options)&&(a.result!=null&&a.highlighted&&k_(a.options,n)&&Q(a.diff,i)||(this.pendingHighlightResult={diff:i,options:n,highlighted:r,result:t},this.onRenderUpdate?.()))}getMatchingWorkerResultCache(e,t){if(this.editSessionActive)return;let n=this.workerManager?.getDiffResultCache(e);if(n!=null&&k_(t,n.options))return n}getReadyRenderResult(e,t){let{pendingHighlightResult:n}=this;if(n!=null&&Q(n.diff,e)&&k_(n.options,t))return n;let r=this.getMatchingWorkerResultCache(e,t);if(!(r==null||this.hasHighlightedRenderCache(e,t)))return{diff:e,highlighted:!0,...r}}hasHighlightedRenderCache(e,t){let{renderCache:n}=this;return n?.result!=null&&n.highlighted&&Q(e,n.diff)&&k_(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){let{diffStyle:a,disableFileHeader:o,expandUnchanged:s,expansionLineCount:c,collapsedContextThreshold:l,hunkSeparators:u}=this.getOptionsWithDefaults(),d=this.renderCache?.isDirty??!1,f=a===`unified`,p=yy(e,this.options.loadDiffFiles!=null),m=!e.isPartial||p,h=[],g=[],_=[],v=[],{additionLines:y,deletionLines:b}=n,x={rowCount:0,hunkSeparators:u,additionsContentAST:h,deletionsContentAST:g,unifiedContentAST:_,unifiedGutterAST:Fp(),deletionsGutterAST:Fp(),additionsGutterAST:Fp(),expansionLineCount:c,hunkData:v,incrementRowCount(e=1){x.rowCount+=e},pushToGutter(e,t){switch(e){case`unified`:x.unifiedGutterAST.children.push(t);break;case`deletions`:x.deletionsGutterAST.children.push(t);break;case`additions`:x.additionsGutterAST.children.push(t)}}},S=V_({fileDiff:e,errorPrefix:`DiffHunksRenderer.processDiffResult`}),C={size:0,side:void 0,increment(){this.size+=1},flush(){if(a!==`unified`){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side===`additions`?(x.pushToGutter(`additions`,Lp(void 0,`buffer`,this.size)),h?.push(A_(this.size))):(x.pushToGutter(`deletions`,Lp(void 0,`buffer`,this.size)),g?.push(A_(this.size))),this.size=0,this.side=void 0}}},w=(e,t,n,r,i)=>{x.pushToGutter(e,Ip(t,n,r,i))};function T(e){C.flush(),a===`unified`?dy(`unified`,e,x):(dy(`deletions`,e,x),dy(`additions`,e,x))}this.pushFileLevelAnnotations(e,a,t,x),Z_({diff:e,diffStyle:a,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:s?!0:this.expandedHunks,collapsedContextThreshold:l,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,additionLine:o,deletionLine:s,type:c})=>{let l=s==null?o.splitLineIndex:s.splitLineIndex,f=o==null?s.unifiedLineIndex:o.unifiedLineIndex;a===`split`&&c!==`change`&&C.flush(),r>0&&T({hunkIndex:t,collapsedLines:r,rangeSize:Math.max(n?.collapsedBefore??0,0),hunkSpecs:n?.hunkSpecs,isFirstHunk:t===0,isLastHunk:!1,isExpandable:m});let h=a===`unified`?f:l,g={type:c,hunkIndex:t,lineIndex:h,unifiedLineIndex:f,splitLineIndex:l,deletionLine:s,additionLine:o};if(a===`unified`){let n=this.getUnifiedInjectedRowsForLine?.(g);n?.before!=null&&cy(n.before,x);let r=s==null?void 0:b[s.lineIndex],i=o==null?void 0:y[o.lineIndex];if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let a=c===`change`?o==null?`change-deletion`:`change-addition`:c,u=this.getUnifiedLineDecoration({type:c,lineType:a,additionLineIndex:o?.lineIndex,deletionLineIndex:s?.lineIndex});w(`unified`,u.gutterLineType,o==null?s.lineNumber:o.lineNumber,`${f},${l}`,u.gutterProperties),i==null?r!=null&&(r=fy(r,u.contentProperties,d&&s!=null?{"data-line":s.lineNumber,"data-line-index":`${f},${l}`}:void 0)):i=fy(i,u.contentProperties,d&&o!=null?{"data-line":o.lineNumber,"data-line-index":`${f},${l}`}:void 0),uy({diffStyle:`unified`,type:c,deletionLine:r,additionLine:i,unifiedSpan:this.getAnnotations(`unified`,s?.lineNumber,o?.lineNumber,t,h),createAnnotationElement:e=>this.createAnnotationElement(e),context:x}),n?.after!=null&&cy(n.after,x)}else{let n=this.getSplitInjectedRowsForLine?.(g);n?.before!=null&&ly(n.before,x,C);let r=s==null?void 0:b[s.lineIndex],i=o==null?void 0:y[o.lineIndex],a=this.getSplitLineDecoration({side:`deletions`,type:c,lineIndex:s?.lineIndex}),u=this.getSplitLineDecoration({side:`additions`,type:c,lineIndex:o?.lineIndex});if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let f=(()=>{if(c===`change`){if(i==null)return`additions`;if(r==null)return`deletions`}})();f==null?c===`change`&&C.flush():(C.side!=null&&C.side!==f&&C.flush(),C.side=f,C.increment());let p=this.getAnnotations(`split`,s?.lineNumber,o?.lineNumber,t,h);if(p!=null&&C.size>0&&C.flush(),s!=null){let e=fy(r,a.contentProperties,d?{"data-line":s.lineNumber,"data-line-index":`${s.unifiedLineIndex},${l}`}:void 0);w(`deletions`,a.gutterLineType,s.lineNumber,`${s.unifiedLineIndex},${l}`,a.gutterProperties),e!=null&&(r=e)}if(o!=null){let e=fy(i,u.contentProperties,d?{"data-line":o.lineNumber,"data-line-index":`${o.unifiedLineIndex},${l}`}:void 0);w(`additions`,u.gutterLineType,o.lineNumber,`${o.unifiedLineIndex},${l}`,u.gutterProperties),e!=null&&(i=e)}uy({diffStyle:`split`,type:c,additionLine:i,deletionLine:r,...p,createAnnotationElement:e=>this.createAnnotationElement(e),context:x}),n?.after!=null&&ly(n.after,x,C)}let _=a===`split`&&n!=null&&l===n.splitLineStart+n.splitLineCount-1,v=t===e.hunks.length-1&&n!=null&&(a===`split`?l===n.splitLineStart+n.splitLineCount-1:f===n.unifiedLineStart+n.unifiedLineCount-1),E=_?n.noEOFCRDeletions:!1,ee=_?n.noEOFCRAdditions:!1,D=(s?.noEOFCR??!1)||E,O=(o?.noEOFCR??!1)||ee;if(O||D){if(a===`split`&&C.flush(),D){let e=c===`context`||c===`context-expanded`?c:`change-deletion`;a===`unified`?(x.unifiedContentAST.push(j_(e)),x.pushToGutter(`unified`,Lp(e,`metadata`,1))):(x.deletionsContentAST.push(j_(e)),x.pushToGutter(`deletions`,Lp(e,`metadata`,1)),O||(x.pushToGutter(`additions`,Lp(void 0,`buffer`,1)),x.additionsContentAST.push(A_(1))))}if(O){let e=c===`context`||c===`context-expanded`?c:`change-addition`;a===`unified`?(x.unifiedContentAST.push(j_(e)),x.pushToGutter(`unified`,Lp(e,`metadata`,1))):(x.additionsContentAST.push(j_(e)),x.pushToGutter(`additions`,Lp(e,`metadata`,1)),D||(x.pushToGutter(`deletions`,Lp(void 0,`buffer`,1)),x.deletionsContentAST.push(A_(1))))}x.incrementRowCount(1)}u!==`simple`&&u!==`metadata`&&(i>0||v&&p)&&T({hunkIndex:c===`context-expanded`?t:t+1,collapsedLines:v&&p?`unknown`:i,rangeSize:S,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:m}),x.incrementRowCount(1)}}),a===`split`&&C.flush();let E=Math.max(F_(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),ee=t.bufferBefore>0||t.bufferAfter>0,D=!f&&e.type!==`deleted`,O=!f&&e.type!==`new`,te=x.rowCount>0||ee;h=D&&te?h:void 0,g=O&&te?g:void 0,_=f&&te?_:void 0;let ne=this.createPreElement(g!=null&&h!=null,E);return{fileDiff:e,unifiedGutterAST:f&&te?x.unifiedGutterAST.children:void 0,unifiedContentAST:_,deletionsGutterAST:O&&te?x.deletionsGutterAST.children:void 0,deletionsContentAST:g,additionsGutterAST:D&&te?x.additionsGutterAST.children:void 0,additionsContentAST:h,hunkData:v,preNode:ne,themeStyles:r,baseThemeType:i,headerElement:o?void 0:this.renderHeader(e),totalLines:E,rowCount:x.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:``}}renderCodeAST(e,t){let n=e===`unified`?t.unifiedGutterAST:e===`deletions`?t.deletionsGutterAST:t.additionsGutterAST,r=e===`unified`?t.unifiedContentAST:e===`deletions`?t.deletionsContentAST:t.additionsContentAST;if(n==null||r==null)return;let i=Fp(n);return i.properties.style=`grid-row: span ${t.rowCount}`,[i,uh(r,t.rowCount)]}renderFullAST(e,t=[]){let n=this.getOptionsWithDefaults().hunkSeparators===`line-info`,r=this.renderCodeAST(`unified`,e);if(r!=null)return t.push(Z({tagName:`code`,children:r,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-unified":``}})),{...e.preNode,children:t};let i=this.renderCodeAST(`deletions`,e);i!=null&&t.push(Z({tagName:`code`,children:i,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-deletions":``}}));let a=this.renderCodeAST(`additions`,e);return a!=null&&t.push(Z({tagName:`code`,children:a,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-additions":``}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return Mt(this.renderFullAST(e,t))}renderPartialHTML(e,t){return Mt(t==null?e:Z({tagName:`code`,children:e,properties:{"data-code":``,"data-container-size":this.getOptionsWithDefaults().hunkSeparators===`line-info`?``:void 0,[`data-${t}`]:``}}))}pushFileLevelAnnotations(e,t,n,r){if(!ch(n))return;let i=e.type===`new`?[]:this.getAnnotationNames(sh(this.deletionAnnotations)),a=e.type===`deleted`?[]:this.getAnnotationNames(sh(this.additionAnnotations));if(i.length===0&&a.length===0)return;let{createAnnotationElement:o}=this;if(t===`unified`){uy({diffStyle:t,type:`context`,unifiedSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:i.concat(a)},createAnnotationElement:o,context:r});return}uy({diffStyle:t,type:`context`,deletionSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:i},additionSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:a},createAnnotationElement:o,context:r})}getAnnotations(e,t,n,r,i){let a={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(t!=null)for(let e of this.deletionAnnotations[t]??[])a.annotations.push(this.annotationSlotName(e));let o={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(n!=null)for(let t of this.additionAnnotations[n]??[])(e===`unified`?a:o).annotations.push(this.annotationSlotName(t));if(e===`unified`)return a.annotations.length>0?a:void 0;if(o.annotations.length!==0||a.annotations.length!==0)return{deletionSpan:a,additionSpan:o}}getAnnotationNames(e){return e?.map(e=>this.annotationSlotName(e))??[]}renderHeader(e){let{headerRenderMode:t,stickyHeader:n}=this.getOptionsWithDefaults();return ym({fileOrDiff:e,mode:t,stickyHeader:n})}},oy=new Intl.PluralRules(`en-US`);function sy(e){return`${e} unmodified line${oy.select(e)===`one`?``:`s`}`}function cy(e,t){for(let n of e)t.unifiedContentAST.push(n.content),t.pushToGutter(`unified`,n.gutter),t.incrementRowCount(1)}function ly(e,t,n){for(let{deletion:r,addition:i}of e){if(r==null&&i==null)continue;let e=r!=null&&i!=null?void 0:r==null?`deletions`:`additions`;(e==null||n.side!==e)&&n.flush(),r!=null&&(t.deletionsContentAST.push(r.content),t.pushToGutter(`deletions`,r.gutter)),i!=null&&(t.additionsContentAST.push(i.content),t.pushToGutter(`additions`,i.gutter)),e!=null&&(n.side=e,n.increment()),t.incrementRowCount(1)}}function uy({diffStyle:e,type:t,deletionLine:n,additionLine:r,unifiedSpan:i,deletionSpan:a,additionSpan:o,createAnnotationElement:s,context:c}){let l=!1;if(e===`unified`){if(r==null?n!=null&&c.unifiedContentAST.push(n):c.unifiedContentAST.push(r),i!=null){let e=t===`change`?n==null?`change-addition`:`change-deletion`:t;c.unifiedContentAST.push(s(i)),c.pushToGutter(`unified`,Lp(e,`annotation`,1)),l=!0}}else if(e===`split`){if(n!=null&&c.deletionsContentAST.push(n),r!=null&&c.additionsContentAST.push(r),a!=null){let e=t===`change`?n==null?`context`:`change-deletion`:t;c.deletionsContentAST.push(s(a)),c.pushToGutter(`deletions`,Lp(e,`annotation`,1)),l=!0}if(o!=null){let e=t===`change`?r==null?`context`:`change-addition`:t;c.additionsContentAST.push(s(o)),c.pushToGutter(`additions`,Lp(e,`annotation`,1)),l=!0}}l&&c.incrementRowCount(1)}function dy(e,{hunkIndex:t,collapsedLines:n,rangeSize:r,hunkSpecs:i,isFirstHunk:a,isLastHunk:o,isExpandable:s},c){if(typeof n==`number`&&n<=0)return;let l=e===`unified`?c.unifiedContentAST:e===`deletions`?c.deletionsContentAST:c.additionsContentAST;if(c.hunkSeparators===`metadata`){i!=null&&(c.pushToGutter(e,N_({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),l.push(N_({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1));return}if(c.hunkSeparators===`simple`){t>0&&(c.pushToGutter(e,N_({type:`simple`,isFirstHunk:a,isLastHunk:!1})),l.push(N_({type:`simple`,isFirstHunk:a,isLastHunk:!1})),e!==`additions`&&c.incrementRowCount(1));return}let u=P_(e,t),d=r>c.expansionLineCount,f=s?t:void 0,p=typeof n==`number`?sy(n):`More unchanged context may be available`;c.pushToGutter(e,N_({type:c.hunkSeparators,content:p,expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),l.push(N_({type:c.hunkSeparators,content:p,expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1),c.hunkData.push({slotName:u,hunkIndex:t,lines:typeof n==`number`?n:0,lineCountKnown:typeof n==`number`,type:e,expandable:s?{up:!a,down:!o,chunked:d}:void 0})}function fy(e,t,n){return e==null||e.type!==`element`||t==null&&n==null?e:{...e,properties:{...e.properties,...t,...n}}}function py(e){return e.length>0&&e[e.length-1]===``?e.length-1:e.length}function my(e,t,n,r){let i=py(e),a=py(t),o=Math.min(i,a),s=0;for(;s<o&&e[s]===t[s];)s++;let c=0;for(;c<o-s&&e[i-1-c]===t[a-1-c];)c++;let l=Array(t.length);for(let e=0;e<s;e++)l[e]=n[e];for(let e=0;e<c;e++)l[a-1-e]=n[i-1-e];i<e.length&&a<t.length&&(l[t.length-1]=n[e.length-1]);for(let e=s;e<t.length;e++)l[e]??=hy(e,r.getLineText(e));return l}function hy(e,t,n=e,r=e){return{type:`element`,tagName:`div`,properties:{"data-line":e+1,"data-line-index":`${n},${r}`,"data-line-type":`context`},children:[{type:`element`,tagName:`span`,properties:{"data-char":0},children:[{type:`text`,value:t}]}]}}function gy(e){let t=[];for(let n=0;n<e.lineCount;n++)t.push(e.getLineText(n,!0));return t}function _y(e){if(e.lang!=null)return[e.lang];let t=Em(e.prevName??e.name),n=Em(e.name);return t===n?[n]:[t,n]}function vy(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function yy(e,t){return e.isPartial&&t&&(e.type===`change`||e.type===`rename-changed`)}function by(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function xy(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.lineCountKnown===t.lineCountKnown&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}async function Sy(e,t=300){let n;try{await Promise.race([e(),new Promise(e=>{n=setTimeout(e,t)})])}finally{n!=null&&clearTimeout(n)}}function Cy({oldFile:e,newFile:t},n){if(e!==void 0||t!==void 0){if(e===void 0||t===void 0)throw Error(`${n}: Pass null for an intentionally missing oldFile or newFile side`);if(e===null){if(t===null)throw Error(`${n}: You must pass oldFile, newFile, or both`);return{oldFile:e,newFile:t}}return{oldFile:e,newFile:t}}}function wy(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:Lh(e),tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:typeof e?.hunkSeparators==`function`?`custom`:e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,loadDiffFiles:e?.loadDiffFiles,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader==null?`default`:`custom`}}function Ty(e){return e.isPartial&&(e.type===`change`||e.type===`rename-changed`||e.type===`rename-pure`)}function Ey(e){let t={...e};return delete t.cacheKey,t}function Dy(e,t){if(e.isPartial||t.isPartial)throw Error(`FileDiff.shouldResetEditorForExternalDiff: diffs must be fully hydrated`);let n=e.lang??Em(e.name),r=t.lang??Em(t.name),i=e.type!==`new`,a=t.type!==`new`;return e.name!==t.name||n!==r||i!==a||e.deletionLines.length!==t.deletionLines.length||e.deletionLines.some((e,n)=>e!==t.deletionLines[n])}function Oy(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function ky(e,t){let{oldFile:n}=e;return n==null?t.type===`new`:t.type!==`new`&&n.name===(t.prevName??t.name)&&Oy(n.lines,t.deletionLines)}var Ay=-1,jy=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file-diff:${++Ay}`;type=`file-diff`;fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerFilenameSuffix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;editSession;renderedDiff;renderRange;pendingFiles;appliedPreAttributes;headerCache={lastRenderedHTML:void 0,html:void 0,fileDiff:void 0};lastRowCount;mounted=!1;enabled=!0;editor;refreshViewTimeout;lineStateRefreshPending=!1;deferredSelectedLines;deferredEditorActiveLine;constructor(e={theme:Ee},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.hunksRenderer=this.createHunksRenderer(e),this.resizeManager=new cm,this.scrollSyncManager=new O_,this.interactionManager=new Vp(`diff`,Hp(e,typeof e.hunkSeparators==`function`||(e.hunkSeparators??`line-info`)===`line-info`||e.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getTheme(){return this.workerManager?.getDiffRenderOptions().theme??this.options.theme??Ee}getHunksRendererOptions(e){return wy(e)}createHunksRenderer(e){return new ay(this.getHunksRendererOptions(e),this.getAnnotationSlotName,this.handleHighlightRender,this.workerManager)}getLineIndex=(e,t=`additions`)=>this.getLineIndexForDiff(this.getDiffForLineIndex(),e,t);getDiffForLineIndex(){return this.getRenderedDiff()}getLineIndexForDiff(e,t,n){if(e==null)return;let r=e.hunks.at(-1),i,a;hunkIterator:for(let o of e.hunks){let e=n===`deletions`?o.deletionStart:o.additionStart,s=n===`deletions`?o.deletionCount:o.additionCount,c=Zh(e,s)+1,l=o.splitLineStart,u=o.unifiedLineStart;if(t<c){let e=c-t;i=Math.max(u-e,0),a=Math.max(l-e,0);break hunkIterator}if(t>=c+s){if(o===r){let e=t-(c+s);i=u+o.unifiedLineCount+e,a=l+o.splitLineCount+e;break hunkIterator}continue}for(let e of o.hunkContent)if(e.type===`context`){if(t<c+e.lines){let e=t-c;a=l+e,i=u+e;break hunkIterator}c+=e.lines,l+=e.lines,u+=e.lines}else{let r=n===`deletions`?e.deletions:e.additions;if(t<c+r){let r=t-c;i=u+(n===`additions`?e.deletions:0)+r,a=l+r;break hunkIterator}c+=r,l+=Math.max(e.deletions,e.additions),u+=e.deletions+e.additions}break hunkIterator}if(i!=null&&a!=null)return[i,a]}setOptions(e){e!=null&&(this.options=e,this.clearReusableHeader(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(e)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(Hp(this.options,typeof this.options.hunkSeparators==`function`||(this.options.hunkSeparators??`line-info`)===`line-info`||this.options.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex))}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??`system`)!==e&&(this.mergeOptions({themeType:e}),this.applyCachedThemeState(e))}applyCachedThemeState(e){if(typeof this.options.theme==`string`||this.fileContainer==null||this.appliedThemeCSS==null)return!1;let t=this.appliedThemeCSS.baseThemeType??e;return this.appliedThemeCSS.themeType!==t&&(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!Dp(this.appliedThemeCSS.theme,this.getTheme())}getHoveredLine=()=>this.interactionManager.getHoveredLine();getAnnotationSlotName=e=>Ih(this.editSession?.annotations,e,Om);getLatestAnnotations(){return this.editSession?.annotations?.current??this.lineAnnotations}isNewAnnotations(e){let t=this.editSession?.annotations;return e===this.lineAnnotations?!1:t==null||e!==t.provided&&e!==t.current}setLineAnnotations(e){let t=this.editSession?.annotations;if(t==null){this.lineAnnotations=e;return}this.isNewAnnotations(e)&&(this.lineAnnotations=e,Fh(t,e,Om))}syncEditSessionAnnotationsFromEditor(e){let t=this.editSession?.annotations;return t==null||e===t.current?!1:(t.current=e,this.hunksRenderer.setLineAnnotations(e),this.renderAnnotations(),!0)}canPartiallyRender(e,t,n){return!(e||t||n||typeof this.options.hunkSeparators==`function`)}setSelectedLines(e,t){this.lineStateRefreshPending?this.deferredSelectedLines=[e,t]:this.interactionManager.setSelection(e,t)}setEditorActiveLine(e,t){this.lineStateRefreshPending?this.deferredEditorActiveLine=[e,t]:this.interactionManager.setEditorActiveLine(e,{lineNumberOnly:t?.lineNumberOnly,side:t?.side??`additions`})}flushDeferredLineState(){let{deferredEditorActiveLine:e,deferredSelectedLines:t}=this;this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,e!=null&&this.setEditorActiveLine(...e),t!=null&&this.interactionManager.setSelection(...t)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}let{diffStyle:e=`split`,overflow:t=`scroll`}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,{disableAnnotations:t===`wrap`,columnVariables:this.shouldApplyColumnVariables(t)?`apply`:`measure`}),t===`scroll`&&e===`split`?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}shouldApplyColumnVariables(e){return typeof this.options.hunkSeparators==`function`||e===`scroll`&&(this.getLatestAnnotations().length>0||this.pre?.hasAttribute(`data-has-merge-conflict`)===!0)}getCodeScrollLeft(){return Math.max(this.codeUnified?.scrollLeft??0,this.codeDeletions?.scrollLeft??0,this.codeAdditions?.scrollLeft??0)}setCodeScrollLeft(e){this.codeUnified!=null&&(this.codeUnified.scrollLeft=e),this.codeAdditions!=null&&(this.codeAdditions.scrollLeft=e),this.codeDeletions!=null&&(this.codeDeletions.scrollLeft=e)}__getEffectiveCodeOptions(){return{...this.options,...this.hunksRenderer.getEffectiveCodeOptions()}}cleanUp(e=!1){let{editor:t}=this;wp(this.handleEditSessionRender),this.emitPostRender(!0),t?.cleanUp(e?`recycle`:`discard`),e||(this.editor=void 0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,e||(this.pendingFiles=void 0),this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,e||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder?.remove(),this.placeHolder=void 0,this.headerCache.lastRenderedHTML=void 0,e||this.clearReusableHeader(),this.errorWrapper?.remove(),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,e?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.editSession=void 0,this.renderedDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate({fileContainer:e,prerenderedHTML:t,preventEmit:n=!1,lineAnnotations:r,fileDiff:i,...a}){if(!this.enabled)throw Error(`FileDiff.hydrate: attempting to call hydrate after cleaned up`);if(this.fileContainer!=null)throw Error(`FileDiff.hydrate: hydrate can only be called before the instance has rendered or hydrated`);let o=Cy(a,`FileDiff.hydrate`),s=o?.oldFile,c=o?.newFile;this.hydrateElements(e,t);let l=this.editor!=null;l||Iy(this.pre,Py({fileDiff:i,oldFile:s,newFile:c}),this.options.collapsed)||Ly(this.headerElement,Fy({fileDiff:i,oldFile:s,newFile:c}),this.options.disableFileHeader)?this.render({...a,fileContainer:e,lineAnnotations:r,fileDiff:i,forceRender:l||a.forceRender,preventEmit:!0}):this.hydrationSetup({fileDiff:i,lineAnnotations:r,...o}),n||this.emitPostRender()}hydrateElements(e,t){this.fileContainer!==e&&this.emitPostRender(!0),jh(e,t);for(let t of e.shadowRoot?.children??[]){if(t instanceof SVGElement){this.spriteSVG=t;continue}if(t instanceof HTMLElement){if(t instanceof HTMLPreElement){this.pre=t;for(let e of t.children)e instanceof HTMLElement&&e.tagName.toLowerCase()===`code`&&(`deletions`in e.dataset&&(this.codeDeletions=e),`additions`in e.dataset&&(this.codeAdditions=e),`unified`in e.dataset&&(this.codeUnified=e));continue}if(`diffsHeader`in t.dataset){this.headerElement=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-theme-css`)){this.themeCSSStyle=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-unsafe-css`)){this.unsafeCSSStyle=t,this.appliedUnsafeCSS=t.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute(`data-dehydrated`)),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:e,oldFile:t,newFile:n,lineAnnotations:r}){this.lineAnnotations=r??this.lineAnnotations,this.additionFile=n,this.deletionFile=t,this.fileDiff=e??(t!==void 0&&n!==void 0?E_(t,n,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderedDiff=this.fileDiff,this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(e,t,n)=>{this.expandHunk(e,t,n)};expandHunk=(e,t,n)=>{this.loadFilesIfNecessary(),this.hunksRenderer.expandHunk(e,t,n),this.rerender()};loadFilesIfNecessary(){let{fileDiff:e,options:{loadDiffFiles:t}}=this;if(e==null||!Ty(e)||this.pendingFiles?.fileDiff===e)return;if(t==null)throw Error(`FileDiff: loadDiffFiles is required to load full files for a partial diff`);let n=this.loadFilesForDiff(e,t),r=this.pendingFiles={fileDiff:e,promise:n};r.promise=n.finally(()=>{this.pendingFiles===r&&(this.pendingFiles=void 0)})}__canAttachEditor(){return this.fileDiff!=null&&!this.fileDiff.isPartial}async prepareForEditing(){if(this.__canAttachEditor())return;let e=this.__prepareForEditing();if(e==null)throw this.fileDiff?.isPartial===!0&&!Ty(this.fileDiff)?Error(`FileDiff.prepareForEditing: this partial diff cannot be hydrated; provide a complete diff`):Error(`FileDiff.prepareForEditing: a partial diff requires loadDiffFiles`);if(await e,!this.__canAttachEditor())throw Error(`FileDiff.prepareForEditing: the diff did not finish loading`)}__prepareForEditing(){if(!this.__canAttachEditor()){if(this.fileDiff?.isPartial===!0&&!Ty(this.fileDiff))throw Error(`FileDiff: this partial diff cannot be hydrated; provide a complete diff to edit`);return this.loadFilesIfNecessary(),this.pendingFiles?.promise}}async loadFilesForDiff(e,t){try{let n=await t(e);if(this.fileDiff!==e)return;await this.handleFilesLoaded(e,n)}catch(e){if(this.options.disableErrorHandling===!0)throw e;console.error(e)}}async handleFilesLoaded(e,t){if(this.fileDiff===e&&e.isPartial){if(ng(`merge`,e,t),this.setHydratedState(t),this.installHydratedSessionDiff(e)){this.rerender();return}await Sy(()=>this.primeHighlightCache(e)),this.enabled&&this.fileDiff===e&&this.rerender()}}installHydratedSessionDiff(e){if(e.isPartial)throw Error(`FileDiff.installHydratedSessionDiff: diffs cannot be partial for editing`);return this.fileDiff===e&&this.editSession?.outgoingDiff!=null&&(this.installEditSession(e),!0)}updateExternalDiff(e,t){if(Q(this.fileDiff,e))return!1;let n=this.editSession?.outgoingDiff??this.editSession?.diff;return this.fileDiff=e,n!=null&&(e.isPartial?this.loadFilesIfNecessary():this.installEditSession(e),this.editSession!=null&&(this.editSession.outgoingDiff=n)),this.editSession?.annotations!=null&&t!=null&&(this.lineAnnotations=t,this.editSession.annotations=Ph(t,Om,this.editSession.annotations)),!0}installEditSession(e,t,n){let r=e.additionLines.join(``),i=t==null?void 0:tg(t.contents),a=n!=null&&ky(n,e);if(n!=null&&!a)throw Error(`FileDiff: retained session cannot resume against a different old file`);if(t!=null&&t.contents!==r&&!a)throw Error(`FileDiff: retained edits are missing their diff session state`);let o=t==null||t.name===e.name&&t.lang===e.lang&&t.contents===r,s=Ey(e);t!=null&&i!=null&&!o&&(s.name=t.name,s.lang=t.lang),a&&n!=null&&i!=null&&(s.additionLines=i,s.type=n.type,s.hunks=n.hunks,s.editSessionDirty=!0,Ov(s)),this.editSession={diff:s,annotations:this.editSession?.annotations??Ph(this.lineAnnotations,Om),outgoingDiff:this.editSession?.outgoingDiff},this.hunksRenderer.beginEditSession(s,o&&!a?e:void 0)}setHydratedState(e){this.deletionFile=e.oldFile,this.additionFile=e.newFile,this.workerManager?.cleanUpTasks(this.hunksRenderer),this.hunksRenderer.clearRenderCache()}render({fileDiff:e,deferManagers:t=!1,forceRender:n=!1,preventEmit:r=!1,lineAnnotations:i,fileContainer:a,containerWrapper:o,renderRange:s,...c}){if(!this.enabled)throw Error(`FileDiff.render: attempting to call render after cleaned up`);let l=Cy(c,`FileDiff.render`),u=l?.oldFile,d=l?.newFile;this.editor?.__postponeBgTokenizeToNextFrame();let{collapsed:f=!1,themeType:p=`system`,expandUnchanged:m=!1}=this.options,h=f?void 0:s,g=this.hasThemeChanged(),_=l!=null,v=_&&(!Ny(u,this.deletionFile)||!Ny(d,this.additionFile)),y=e!=null&&!Q(e,this.fileDiff),b=i!=null&&(i.length>0||this.getLatestAnnotations().length>0)&&this.isNewAnnotations(i);if(!f&&gm(h,this.renderRange)&&!n&&!b&&!g&&(e!=null&&!y||e==null&&!v)){let e=this.applyCachedThemeState(p);return e&&this.finalizeRender(),e}let x;e==null&&_&&(v||this.fileDiff==null)&&(x=E_(l.oldFile,l.newFile,this.options.parseDiffOptions));let{renderRange:S}=this;this.renderRange=h,_?(this.deletionFile=u,this.additionFile=d):e!=null&&(this.deletionFile=void 0,this.additionFile=void 0),e!=null&&y?this.updateExternalDiff(e,i):x!=null&&(y=!0,this.updateExternalDiff(x,i)),y&&this.clearReusableHeader(),i!=null&&this.setLineAnnotations(i);let C=this.getLatestDiff();if(C==null)return!1;C.editSessionDirty===!0&&this.shouldSelfHealEditSession()&&(Bv(C,this.options.parseDiffOptions),this.hunksRenderer.refreshHighlightedResult()),m&&this.loadFilesIfNecessary(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.getLatestAnnotations());let{disableErrorHandling:w=!1,disableFileHeader:T=!1}=this.options;if(T&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.headerCache.lastRenderedHTML=void 0),this.clearHeaderSlots()),a=this.getOrCreateFileContainer(a,o),this.applyCachedThemeState(p),f){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{let e=this.hunksRenderer.renderDiff(C,tt);e!=null&&this.applyThemeState(a,e.themeStyles,p,e.baseThemeType),e?.headerElement!=null&&this.applyHeaderToDOM(e.headerElement,a,e.fileDiff),this.renderSeparators([]),this.renderedDiff=e?.fileDiff??C,this.injectUnsafeCSS()}catch(e){if(w)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}return this.finalizeRender(),r||this.emitPostRender(),!0}try{let e=this.getOrCreatePreNode(a);if(!(this.canPartiallyRender(n,b,v||y||g||!Q(this.renderedDiff,C))&&this.applyPartialRender({fileDiff:C,previousRenderRange:S,renderRange:h}))){let t=this.hunksRenderer.renderDiff(C,h);if(t==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.isWorkingPool()&&this.workerManager.initialize().catch(()=>{}).then(()=>this.rerender()),!1;this.applyThemeState(a,t.themeStyles,p,t.baseThemeType),t.headerElement!=null&&this.applyHeaderToDOM(t.headerElement,a,t.fileDiff),t.additionsContentAST!=null||t.deletionsContentAST!=null||t.unifiedContentAST!=null?this.applyHunksToDOM(e,t):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(t.hunkData),this.renderedDiff=t.fileDiff}this.applyBuffers(e,h),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,t||this.flushManagers(),this.finalizeRender(),this.editor!=null&&this.syncRenderViewToEditor()}catch(e){if(w)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}return r||this.emitPostRender(),!0}finalizeRender(){}emitPostRender(e=!1){let{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,t==null))return;this.options.onPostRender?.(t,this,`unmount`);return}if(t==null)return;let r=this.mounted?`update`:`mount`;this.mounted=!0,n?.(t,this,r)}getLatestDiff(e=this.fileDiff){return this.editSession?.diff??e}getRenderedDiff(){return this.renderedDiff}syncRenderViewToEditor(){let{editor:e,fileContainer:t}=this,n=this.getLatestAnnotations(),r=this.computeEditorRenderRange(this.renderRange),i=this.getLatestDiff();if(e==null||t==null||i==null||i.isPartial)return;let a=a=>{if(!this.enabled||this.editor!==e||this.fileContainer!==t||this.getLatestDiff()!==i)return;let o=this.editSession?.outgoingDiff,{fileDiff:s}=this,c=o!=null&&s!=null&&o!==i,l=c&&o!=null&&s!=null?Dy(o,s):!1;e.__syncRenderView({highlighter:a,fileContainer:t,fileDiff:i,lineAnnotations:n,renderRange:r,externalDocument:c,resetHistory:l})},o=this.getTheme(),s=i.lang??Em(i.name),c=Ot({theme:o,lang:s});c==null?At({themes:Et(o),langs:[`text`,s],preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter}).then(a):a(c)}computeEditorRenderRange(e){let t=this.getLatestDiff();if(e==null||t==null||km(e))return e;let{diffStyle:n=`split`,expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options,a,o;return Z_({diff:t,diffStyle:n,startingLine:e.startingLine,totalLines:e.totalLines,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i,callback:({additionLine:e})=>{e!=null&&(a??=e.lineNumber,o=e.lineNumber)}}),a==null||o==null?{...e,startingLine:0,totalLines:0}:{...e,startingLine:a-1,totalLines:o-a+1}}__acknowledgeDocumentUpdate(){this.editSession!=null&&(this.editSession.outgoingDiff=void 0)}__acceptEditorChange(e){let{lineAnnotations:t}=e;t!=null&&this.syncEditSessionAnnotationsFromEditor(t)}emitEditChange(e){let{onEditChange:t}=this.options;t?.(e)}__captureDocumentSessionState(e=!0){let{fileDiff:t,editSession:{diff:n,outgoingDiff:r}={}}=this;if(r!=null&&t!=null){if(!t.isPartial&&Dy(r,t))return;n=r}if(!(n==null||n.isPartial))return{diffSession:{oldFile:n.type===`new`?null:{name:n.prevName??n.name,lines:e?[...n.deletionLines]:n.deletionLines},type:n.type,hunks:e?Yh(n.hunks):n.hunks},hasChanges:n.editSessionDirty===!0}}__attachEditor(e){if(this.type!==`file-diff`)throw Error(`FileDiff.__attachEditor: cannot attach an editor to a "${this.type}" diff`);if(this.editor!=null)throw Error(`FileDiff.__attachEditor: an editor is already attached`);if(!this.__canAttachEditor())throw Error(`FileDiff.__attachEditor: a complete diff is required before editing`);let t=()=>{this.editor=void 0,this.finishEditSession()};try{return this.resumeEditorRendering(e),t}catch(e){throw t(),e}}__resumeEditor(e){if(this.editor!==e)throw Error(`FileDiff.__resumeEditor: editor association changed`);this.resumeEditorRendering(e)}resumeEditorRendering(e){let{fileDiff:t}=this,n=this.editSession?.outgoingDiff;n!=null&&t!=null&&!t.isPartial&&this.editSession?.diff===n&&this.installEditSession(t);let r=this.editSession==null&&t!=null&&!t.isPartial?t:void 0;r==null?this.editSession!=null&&this.hunksRenderer.beginEditSession(this.editSession.diff):this.installEditSession(r,e.__getDocumentContents(My(r)),e.__getDocumentSessionState()),this.editor=e,this.fileDiff?.isPartial===!0&&this.loadFilesIfNecessary();let i=this.editSession?.diff;this.hunksRenderer.editorRenderReady()?(i!=null&&this.hunksRenderer.diffCache===i&&(this.renderedDiff=i),this.syncRenderViewToEditor()):this.rerender()}finishEditSession(){this.hunksRenderer.endEditSession(),this.finalizeEditSessionHunks()}__completeEditSession(e,t){this.settleEditSession(t===`install`,e)}settleEditSession(e,t){let{editSession:n,fileDiff:r,lineAnnotations:i}=this;if(n==null||r==null)return;let{diff:a,annotations:o}=n;if(this.editor!=null)throw Error(`FileDiff.__completeEditSession: detach the editor before completing the session`);this.hunksRenderer.endEditSession(),this.finalizeEditSessionHunks();let s=o?.current,c,l=null,u=null,d=!1,f;if(t==null)throw Error(`FileDiff.__completeEditSession: editor is required for completion`);let p=Xh(a),m={name:p.name,contents:p.additionLines.join(``)};p.lang!=null&&(m.lang=p.lang);let h={fileDiff:p,editor:t,originalFileDiff:r,oldFile:p.type===`new`?null:{name:p.prevName??p.name,contents:p.deletionLines.join(``)},newFile:m,lineAnnotations:s,originalLineAnnotations:i};Object.freeze(h);try{if(t.__emitEditComplete(h),this.options.onEditComplete?.(h)===`accept`){if(p.cacheKey!=null&&p.cacheKey===r.cacheKey)throw Error(`FileDiff.__completeEditSession: an accepted diff must not reuse the replaced diff cacheKey`);c=p,l=h.oldFile,u=h.newFile}}catch(e){d=!0,f=e}if(e&&c!=null&&(this.fileDiff=c,this.additionFile!=null&&(this.deletionFile=l,this.additionFile=u),s!=null&&(this.lineAnnotations=s)),this.editSession=void 0,e&&this.fileContainer!=null&&this.rerender(),d)throw f}finalizeEditSessionHunks(){let e=this.getLatestDiff();if(e==null||e.editSessionDirty!==!0)return!1;let{collapsedContextThreshold:t=1}=this.options,n=Rv(e,this.hunksRenderer.getExpandedHunksMap(),t);return Bv(e,this.options.parseDiffOptions),this.hunksRenderer.setExpandedHunksMap(zv(e,n)),this.hunksRenderer.refreshHighlightedResult(),this.escalateEditSessionRender(),!0}applyDocumentChange(e,t){let n=this.editSession?.diff;if(n==null)throw Error(`FileDiff.applyDocumentChange: requires an active edit session`);this.detachAdditionLines(),this.hunksRenderer.beginEditSession(n),this.hunksRenderer.applyDocumentChange(e),t!=null&&this.syncEditSessionAnnotationsFromEditor(t),this.rerender(),this.interactionManager.setSelectionDirty()}applySuspendedDocumentChange(e,t){this.applyDocumentChange(e,t),this.hunksRenderer.clearRenderCache()}updateRenderCache(e,t,n={}){let r=this.editSession?.diff;if(r==null)throw Error(`FileDiff.updateRenderCache: requires an active edit session`);this.detachAdditionLines(),this.hunksRenderer.beginEditSession(r);let{shouldRefreshDiffsView:i,lineCountChangeInFlight:a}=n;if(this.hunksRenderer.updateRenderCache(e,t,a)){this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!0,this.escalateEditSessionRender();return}i===!0&&(this.refreshViewTimeout!=null&&clearTimeout(this.refreshViewTimeout),this.lineStateRefreshPending=!0,this.refreshViewTimeout=setTimeout(()=>{this.refreshViewTimeout=void 0,this.options.diffStyle===`split`?this.refreshSplitDiffView():this.refreshUnifiedDiffView(),this.flushDeferredLineState()},150))}detachAdditionLines(){let e=this.editSession?.diff,{fileDiff:t}=this;e!=null&&(e.additionLines===t?.additionLines||e.additionLines===e.deletionLines)&&(e.additionLines=[...e.additionLines])}isLineRenderable(e){let t=this.getRenderedDiff();if(t==null)return!0;let{expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options;return U_({fileDiff:t,lineNumber:e,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:r})}getNearestRenderableLine(e,t){let n=this.getRenderedDiff();if(n==null)return e;let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options;return W_({fileDiff:n,lineNumber:e,direction:t,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i})}revealLine(e){let t=this.getRenderedDiff(),{expandUnchanged:n=!1,collapsedContextThreshold:r=1,expansionLineCount:i=100}=this.options;if(t==null||t.isPartial||n)return!1;let a=this.hunksRenderer.getExpandedHunksMap();for(let[n,o]of t.hunks.entries()){let[s,c]=R_(o);if(e<s){let c=z_({isPartial:t.isPartial,rangeSize:o.collapsedBefore,expandedHunks:a,hunkIndex:n,collapsedContextThreshold:r}),l=s-c.rangeSize;if(c.renderAll||e<l+c.fromStart||e>=s-c.fromEnd)return!1;let u=e-(l+c.fromStart)+1,d=s-c.fromEnd-e;return u<=d?this.expandHunk(n,`up`,u+i):this.expandHunk(n,`down`,d+i),!0}if(e<c)return!1}let o=H_({fileDiff:t,hunkIndex:t.hunks.length-1,expandedHunks:a,collapsedContextThreshold:r,errorPrefix:`FileDiff.revealLine`});if(o==null||o.renderAll)return!1;let s=t.hunks[t.hunks.length-1],[,c]=R_(s);return e<c+o.fromStart||e>=c+o.rangeSize?!1:(this.expandHunk(t.hunks.length,`up`,e-(c+o.fromStart)+1+i),!0)}shouldSelfHealEditSession(){return this.editor==null}escalateEditSessionRender(){Cp(this.handleEditSessionRender)}handleEditSessionRender=()=>{this.rerender(),this.flushDeferredLineState()};removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){let e=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:`open`});this.placeHolder=document.createElement(`div`),this.placeHolder.dataset.placeholder=``,e.appendChild(this.placeHolder)}return this.setPlaceholderHeight(e)}setPlaceholderHeight(e){return this.placeHolder!=null&&(this.placeHolder.style.setProperty(`height`,`${e}px`),!0)}async primeHighlightCache(e=this.fileDiff){let{workerManager:t}=this;if(e==null||t==null||!t.isWorkingPool()||e.cacheKey==null||ry(e))return;let n=this.options.tokenizeMaxLength??1e5;Math.max(e.additionLines.length,e.deletionLines.length)>n||await t.primeDiffHighlightCache(e).catch(e=>{console.error(e)})}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.headerCache.lastRenderedHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(e){let{hunkSeparators:t}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof t!=`function`){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();return}let n=new Map(this.separatorCache);for(let r of e){let e=r.slotName,i=this.separatorCache.get(e);if(i==null||!xy(r,i.hunkData)){i?.element.remove();let n=document.createElement(`div`);n.style.display=`contents`,n.slot=r.slotName;let a=t(r,this);a!=null&&n.appendChild(a),this.fileContainer.appendChild(n),i={element:n,hunkData:r},this.separatorCache.set(e,i)}n.delete(e)}for(let[e,{element:t}]of n.entries())this.separatorCache.delete(e),t.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear();return}let e=new Map(this.annotationCache),{renderAnnotation:t}=this.options,n=this.getLatestAnnotations();if(t!=null&&n.length>0)for(let[r,i]of n.entries()){let n=this.getAnnotationSlotName(i),a=`${r}-${n}`,o=this.annotationCache.get(a);if(o==null||!by(i,o.annotation)){o?.element.remove();let e=t(i);if(e==null)continue;o={element:hh(n),annotation:i},o.element.appendChild(e),this.fileContainer.appendChild(o.element),this.annotationCache.set(a,o)}e.delete(a)}for(let[t,{element:n}]of e.entries())this.annotationCache.delete(t),n.remove()}renderGutterUtility(){let{renderGutterUtility:e}=this.options;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let n=gh();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}getOrCreateFileContainer(e,t){let{fileContainer:n}=this,r=e??n??document.createElement(`diffs-container`),i=n!==r;return n!=null&&i&&this.editor?.__captureFocusForDOMReplacement(),i&&this.emitPostRender(!0),this.fileContainer=r,n!=null&&i&&(this.headerCache.lastRenderedHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),i&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){let{shadowRoot:t}=e;if(t!=null)for(let e of t.children)e instanceof SVGElement?this.spriteSVG??=e:Nh(e)&&e.hasAttribute(`data-theme-css`)?(this.themeCSSStyle??=e,this.hasAdoptedThemeCSS=!0):Nh(e)&&e.hasAttribute(`data-unsafe-css`)&&(this.unsafeCSSStyle??=e,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});if(this.spriteSVG==null){let e=document.createElement(`div`);e.innerHTML=dh;let t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});return this.pre==null?(this.pre=document.createElement(`pre`),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(this.editor?.__captureFocusForDOMReplacement(),t.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(e){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(let t of Array.from(e.children))t instanceof HTMLElement&&(t.hasAttribute(`data-unified`)?this.codeUnified=t:t.hasAttribute(`data-deletions`)?this.codeDeletions=t:t.hasAttribute(`data-additions`)&&(this.codeAdditions=t))}applyHeaderToDOM(e,t,n){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;let{headerCache:{fileDiff:r,html:i,lastRenderedHTML:a}}=this,o=(n!==this.editSession?.diff&&Q(r,n)?i:void 0)??Mt(e);if(this.headerCache.html=o,this.headerCache.fileDiff=n,o!==a){let e=document.createElement(`div`);e.innerHTML=o;let n=e.firstElementChild;if(!(n instanceof HTMLElement))return;this.headerElement==null?t.shadowRoot?.prepend(n):t.shadowRoot?.replaceChild(n,this.headerElement),this.headerElement=n,this.headerCache.lastRenderedHTML=o}if(this.isContainerManaged)return;let{renderCustomHeader:s,renderHeaderPrefix:c,renderHeaderFilenameSuffix:l,renderHeaderMetadata:u}=this.options;if(s!=null){let e=s(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,Se,e),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0;return}let d=c?.(n)??void 0,f=l?.(n)??void 0,p=u?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,qe,d),this.headerFilenameSuffix=this.upsertHeaderSlotElement(t,this.headerFilenameSuffix,Ve,f),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,je,p),this.headerCustom?.remove(),this.headerCustom=void 0}clearReusableHeader(){this.headerCache.html=void 0,this.headerCache.fileDiff=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,r){if(r==null){t?.remove();return}let i=t??this.createHeaderSlotElement(n);return t??e.appendChild(i),this.replaceHeaderSlotContent(i,r),i}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){let t=document.createElement(`div`);return t.slot=e,t}injectUnsafeCSS(){let{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(t!=null){if(e==null||e===``){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}(this.unsafeCSSStyle?.parentNode!==t||this.appliedUnsafeCSS!==e)&&(this.unsafeCSSStyle??=_h(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=wh(e),this.appliedUnsafeCSS=e)}}applyThemeState(e,t,n,r){let i=e.shadowRoot??e.attachShadow({mode:`open`}),a=r??n,o=this.getTheme(),s=typeof o==`string`?o:{...o},c=bh(i);if(this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===a&&this.appliedThemeCSS.scrollbarGutter===c){this.appliedThemeCSS.theme=s;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===i){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c};return}this.themeCSSStyle=zh({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:Th(t,a,c)}),this.appliedThemeCSS=this.themeCSSStyle==null?void 0:{theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c}}hydrateMeasuredScrollbar(){let e=this.fileContainer?.shadowRoot;e!=null&&this.themeCSSStyle!=null&&(this.themeCSSStyle.textContent=Eh(this.themeCSSStyle.textContent??``,bh(e)))}shouldGuardRebuildScroll(){return this.editor!=null&&Hh()}applyHunksToDOM(e,t){this.shouldGuardRebuildScroll()?Rh(e,()=>this.replaceCodeColumns(e,t)):this.replaceCodeColumns(e,t)}applyCodeColumnsInPlace(e,t,n){let r=this.getColumnPair(e);if(r==null)return!1;let i=Ry(t[0]),a=Ry(t[1]);return i==null||a==null?!1:(r.gutter.innerHTML=Mt(i),r.content.innerHTML=Mt(a),n!==this.lastRowCount&&(r.gutter.style.setProperty(`grid-row`,`span ${n}`),r.content.style.setProperty(`grid-row`,`span ${n}`)),!0)}replaceCodeColumns(e,t){let{overflow:n=`scroll`}=this.options,r=(this.options.hunkSeparators??`line-info`)===`line-info`,i=n===`wrap`?t.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t);let a=!1,o=[],s=this.hunksRenderer.renderCodeAST(`unified`,t),c=this.hunksRenderer.renderCodeAST(`deletions`,t),l=this.hunksRenderer.renderCodeAST(`additions`,t);this.editor?.__captureFocusForDOMReplacement(),s==null?c!=null||l!=null?(c==null?(this.codeDeletions?.remove(),this.codeDeletions=void 0):(a=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=Ah({code:this.codeDeletions,columnType:`deletions`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeDeletions,c,t.rowCount)||(this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(c)),o.push(this.codeDeletions)),l==null?(this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=a||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=Ah({code:this.codeAdditions,columnType:`additions`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeAdditions,l,t.rowCount)||(this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(l)),o.push(this.codeAdditions))):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=Ah({code:this.codeUnified,columnType:`unified`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeUnified,s,t.rowCount)||(this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(s)),o.push(this.codeUnified)),o.length===0?e.textContent=``:a&&e.replaceChildren(...o),this.lastRowCount=t.rowCount}applyPartialRender({fileDiff:e,previousRenderRange:t,renderRange:n}){let{pre:r,codeUnified:i,codeAdditions:a,codeDeletions:o,options:{diffStyle:s=`split`}}=this;if(r==null||t==null||n==null||!Number.isFinite(t.totalLines)||!Number.isFinite(n.totalLines)||this.lastRowCount==null)return!1;let c=this.getCodeColumns(s,i,o,a);if(c==null)return!1;let l=t.startingLine,u=n.startingLine,d=l+t.totalLines,f=u+n.totalLines,p=Math.max(l,u),m=Math.min(d,f);if(m<=p)return!1;let h=Math.max(0,p-l),g=Math.max(0,d-m),_=this.trimColumns({columns:c,trimStart:h,trimEnd:g,previousStart:l,overlapStart:p,overlapEnd:m,diffStyle:s});if(_<0)throw Error(`FileDiff.applyPartialRender: failed to trim to overlap`);if(this.lastRowCount<_)throw Error(`FileDiff.applyPartialRender: trimmed beyond DOM row count`);let v=this.lastRowCount-_,y=(t,n)=>{if(!(n<=0))return this.hunksRenderer.renderDiff(e,{startingLine:t,totalLines:n,bufferBefore:0,bufferAfter:0})},b=y(u,Math.max(p-u,0));if(b==null&&u<p)return!1;let x=y(m,Math.max(f-m,0));if(x==null&&f>m)return!1;let S=(e,t)=>{if(e!=null){if(s===`unified`&&!Array.isArray(c))this.insertPartialHTML(s,c,e,t);else if(s===`split`&&Array.isArray(c))this.insertPartialHTML(s,c,e,t);else throw Error(`FileDiff.applyPartialRender.applyChunk: invalid chunk application`);v+=e.rowCount,this.renderedDiff=e.fileDiff}};return this.cleanupErrorWrapper(),S(b,`afterbegin`),S(x,`beforeend`),this.lastRowCount!==v&&(this.applyRowSpan(s,c,v),this.lastRowCount=v),!0}insertPartialHTML(e,t,n,r){if(e===`unified`&&!Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`unified`,n);this.renderPartialColumn(t,e,r)}else if(e===`split`&&Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`deletions`,n),i=this.hunksRenderer.renderCodeAST(`additions`,n);this.renderPartialColumn(t[0],e,r),this.renderPartialColumn(t[1],i,r)}else throw Error(`FileDiff.insertPartialHTML: Invalid argument composition`)}refreshSplitDiffView(){let e=this.getLatestDiff();if(this.options.diffStyle!==`split`||e==null)return;let t=this.hunksRenderer.renderDiff(e,this.renderRange);if(t==null)return;let n=this.getCodeColumns(`split`,this.codeUnified,this.codeDeletions,this.codeAdditions);if(!Array.isArray(n))return;let r=(e,n)=>{if(n==null)return;let r=this.hunksRenderer.renderCodeAST(e,t),i=Ry(r?.[0]),a=Ry(r?.[1]);for(let[e,t]of[[n.gutter,i],[n.content,a]])if(t!=null&&e.childElementCount===t.length)for(let n=0;n<t.length;n++){let r=e.children[n],i=t[n].properties[`data-line-type`];i!=null&&r.dataset.lineType!==i&&(r.dataset.lineType=i)}};r(`deletions`,n[0]),r(`additions`,n[1]),this.renderedDiff=t.fileDiff}refreshUnifiedDiffView(){let e=this.getLatestDiff();if(this.options.diffStyle!==`unified`||e==null)return;let t=this.hunksRenderer.renderDiff(e,this.renderRange);if(t==null)return;let n=this.getCodeColumns(`unified`,this.codeUnified,this.codeDeletions,this.codeAdditions);if(n==null||Array.isArray(n))return;let r=this.hunksRenderer.renderCodeAST(`unified`,t),i=Ry(r?.[0]),a=Ry(r?.[1]),o=()=>{for(let[e,t]of[[n.gutter,i],[n.content,a]])t!=null&&(e.innerHTML=Mt(t));t.rowCount!==this.lastRowCount&&(this.applyRowSpan(`unified`,n,t.rowCount),this.lastRowCount=t.rowCount),this.renderedDiff=t.fileDiff};this.shouldGuardRebuildScroll()?Rh(this.pre,o):o(),this.renderSeparators(t.hunkData),this.managersDirty=!0,this.flushManagers(),this.syncRenderViewToEditor()}renderPartialColumn(e,t,n){if(e==null||t==null)return;let r=Ry(t[0]),i=Ry(t[1]);if(r==null||i==null)throw Error(`FileDiff.insertPartialHTML: Unexpected AST structure`);let a=i.at(0);n===`beforeend`&&a?.type===`element`&&typeof a.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(a.properties[`data-buffer-size`],e.content.children[e.content.children.length-1],e.gutter.children[e.gutter.children.length-1],r,i,!0);let o=i.at(-1);n===`afterbegin`&&o?.type===`element`&&typeof o.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(o.properties[`data-buffer-size`],e.content.children[0],e.gutter.children[0],r,i,!1),e.gutter.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(r)),e.content.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(i))}mergeBuffersIfNecessary(e,t,n,r,i,a){if(!(t instanceof HTMLElement)||!(n instanceof HTMLElement))return;let o=this.getBufferSize(t.dataset);o!=null&&(a?(r.shift(),i.shift()):(r.pop(),i.pop()),this.updateBufferSize(t,o+e),this.updateBufferSize(n,o+e))}applyRowSpan(e,t,n){let r=e=>{e!=null&&(e.gutter.style.setProperty(`grid-row`,`span ${n}`),e.content.style.setProperty(`grid-row`,`span ${n}`))};if(e===`unified`&&!Array.isArray(t))r(t);else if(e===`split`&&Array.isArray(t))r(t[0]),r(t[1]);else throw Error(`dun fuuuuked up`)}trimColumnRows(e,t,n){let r=0,i=0,a=0,o=!1,s=n>=0;if(e==null)return 0;let c=Array.from(e.content.children),l=Array.from(e.gutter.children);if(c.length!==l.length)throw Error(`FileDiff.trimColumnRows: columns do not match`);for(;a<c.length&&!(t<=0&&!s&&!o);){let e=l[a],u=c[a];if(a++,!(e instanceof HTMLElement)||!(u instanceof HTMLElement))throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: invalid row elements`);if(o&&(o=!1,e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset||e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset)){e.remove(),u.remove(),i++;continue}if(`lineIndex`in e.dataset&&`lineIndex`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),t>0&&(t--,t===0&&(o=!0)),i++),r++;continue}if(`separator`in e.dataset&&`separator`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`buffer`&&`contentBuffer`in u.dataset){let a=this.getBufferSize(u.dataset);if(a==null)throw Error(`FileDiff.trimColumnRows: invalid element`);if(t>0){let n=Math.min(t,a),r=a-n;r>0?(this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=n):(e.remove(),u.remove(),i+=a),t-=n,t===0&&r===0&&(o=!0)}else if(s){let t=r,o=r+a-1;if(n<=t)e.remove(),u.remove(),i+=a;else if(n<=o){let t=o-n+1,r=a-t;this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=t}}r+=a;continue}throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: unknown row elements`)}return i}trimColumns({columns:e,diffStyle:t,overlapEnd:n,overlapStart:r,previousStart:i,trimEnd:a,trimStart:o}){let s=Math.max(0,r-i),c=n-i;if(c<0)throw Error(`FileDiff.trimColumns: overlap ends before previous`);let l=o>0,u=a>0;if(!l&&!u)return 0;let d=l?s:0,f=u?c:-1;if(t===`unified`&&!Array.isArray(e))return this.trimColumnRows(e,d,f);if(t===`split`&&Array.isArray(e)){let t=this.trimColumnRows(e[0],d,f),n=this.trimColumnRows(e[1],d,f);if(e[0]!=null&&e[1]!=null&&t!==n)throw Error(`FileDiff.trimColumns: split columns out of sync`);return e[0]==null?n:t}throw console.error({diffStyle:t,columns:e}),Error(`FileDiff.trimColumns: Invalid columns for diffType`)}getBufferSize(e){let t=Number.parseInt(e?.bufferSize??``,10);return Number.isNaN(t)?void 0:t}updateBufferSize(e,t){e.dataset.bufferSize=`${t}`,e.style.setProperty(`grid-row`,`span ${t}`),e.style.setProperty(`min-height`,`calc(${t} * 1lh)`)}getColumnPair(e){if(e==null)return;let t=e.children[0],n=e.children[1];if(t instanceof HTMLElement&&n instanceof HTMLElement&&t.dataset.gutter!=null&&n.dataset.content!=null)return{gutter:t,content:n}}getCodeColumns(e,t,n,r){if(e===`unified`)return this.getColumnPair(t);{let e=this.getColumnPair(n),t=this.getColumnPair(r);return e!=null||t!=null?[e,t]:void 0}}updateBuffers(e){this.pre!=null&&this.applyBuffers(this.pre,e)}applyBuffers(e,t){if(t==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(this.bufferBefore??(this.bufferBefore=document.createElement(`div`),this.bufferBefore.dataset.virtualizerBuffer=`before`,e.before(this.bufferBefore)),this.bufferBefore.style.setProperty(`height`,`${t.bufferBefore}px`),this.bufferBefore.style.setProperty(`contain`,`strict`)):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter??(this.bufferAfter=document.createElement(`div`),this.bufferAfter.dataset.virtualizerBuffer=`after`,e.after(this.bufferAfter)),this.bufferAfter.style.setProperty(`height`,`${t.bufferAfter}px`),this.bufferAfter.style.setProperty(`contain`,`strict`)):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(e,{additionsContentAST:t,deletionsContentAST:n,totalLines:r},i){let{diffIndicators:a=`bars`,disableBackground:o=!1,disableLineNumbers:s=!1,overflow:c=`scroll`,diffStyle:l=`split`}=this.options,u={type:`diff`,diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:l!==`unified`&&t!=null&&n!=null,totalLines:r,customProperties:i};fh(u,this.appliedPreAttributes)||(Mh(e,u),this.appliedPreAttributes=u)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;let n=t.shadowRoot??t.attachShadow({mode:`open`});this.errorWrapper??=document.createElement(`div`),this.errorWrapper.dataset.errorWrapper=``,this.errorWrapper.textContent=``,n.appendChild(this.errorWrapper);let r=document.createElement(`div`);r.dataset.errorMessage=``,r.innerText=e.message,this.errorWrapper.appendChild(r);let i=document.createElement(`pre`);i.dataset.errorStack=``,i.innerText=e.stack??`No Error Stack`,this.errorWrapper.appendChild(i)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function My(e){return{name:e.name,lang:e.lang,contents:e.additionLines.join(``)}}function Ny(e,t){return e==null||t==null?e==null&&t==null:Jh(e,t)}function Py({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function Fy({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function Iy(e,t,n=!1){return!n&&e==null&&t}function Ly(e,t,n=!1){return e==null&&t&&!n}function Ry(e){if(e!=null&&e.type===`element`)return e.children??[]}function zy({fileDiff:e,metrics:t,disableFileHeader:n,hunkSeparators:r,expandUnchanged:i,expandedHunks:a,collapsedContextThreshold:o,canHydratePartialDiff:s}){let c=Wh(t,n),l=c,u=i?!0:a,d=e.hunks.length-1;for(let n=0;n<e.hunks.length;n++){let i=e.hunks[n];if(i==null)throw Error(`computeEstimatedDiffHeights: invalid hunk index`);let a=z_({isPartial:e.isPartial,rangeSize:i.collapsedBefore,expandedHunks:u,hunkIndex:n,collapsedContextThreshold:o}),f=(a.fromStart+a.fromEnd)*t.lineHeight;if(c+=f,l+=f,a.collapsedLines>0){let e=Y_({type:r,metrics:t,hunkIndex:n,hunkSpecs:i.hunkSpecs})?.totalHeight??0;c+=e,l+=e}c+=i.splitLineCount*t.lineHeight,l+=i.unifiedLineCount*t.lineHeight;let p=By(i);c+=p.split*t.lineHeight,l+=p.unified*t.lineHeight;let m=n===d?H_({fileDiff:e,hunkIndex:n,expandedHunks:u,collapsedContextThreshold:o,errorPrefix:`computeEstimatedDiffHeights`}):void 0;if(m!=null){let e=(m.fromStart+m.fromEnd)*t.lineHeight;if(c+=e,l+=e,m.collapsedLines>0){let e=X_({type:r,metrics:t})?.totalHeight??0;c+=e,l+=e}}else if(n===d&&e.isPartial&&s){let e=X_({type:r,metrics:t})?.totalHeight??0;c+=e,l+=e}}if(e.hunks.length>0){let e=Kh(t);c+=e,l+=e}return{splitHeight:c,unifiedHeight:l}}function By(e){if(!e.noEOFCRAdditions&&!e.noEOFCRDeletions)return{split:0,unified:0};let t=e.hunkContent.at(-1);if(t==null)return{split:0,unified:0};if(t.type===`context`){let e=+(t.lines>0);return{split:e,unified:e}}return Vy(e,t)}function Vy(e,t){let n=(t.deletions>0&&e.noEOFCRDeletions?1:0)+(t.additions>0&&e.noEOFCRAdditions?1:0),r=t.deletions>0&&e.noEOFCRDeletions,i=t.additions>0&&e.noEOFCRAdditions;return{split:r||i?1:0,unified:n}}var Hy=3e3,Uy=new Map,Wy=-1,Gy=class extends jy{__id=`little-virtualized-file-diff:${++Wy}`;renderType=`virtualized`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0,fileAnnotationHeight:0,ghostTextRows:Uy,ghostTextRowsByIndex:new Map};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;forceRenderOverride;currentCollapsed;pendingHydratedDiff;pendingExpansions;pendingRender;constructor(e,t,n,r,i=!1){super(e,r,i),this.virtualizer=t,this.metrics=Uh(n)}setMetrics(e,t=!1){let n=Uh(e);(t||!Ep(this.metrics,n))&&(this.metrics=n,this.resetLayoutCache({includeEstimatedHeights:!0}))}setLineAnnotations(e){this.syncLineAnnotations(e)&&(this.forceRenderOverride=!0)}syncLineAnnotations(e){return e==null||!this.isNewAnnotations(e)||e.length===0&&this.getLatestAnnotations().length===0?!1:(super.setLineAnnotations(e),!0)}syncEditSessionAnnotationsFromEditor(e){return super.syncEditSessionAnnotationsFromEditor(e)?(this.forceRenderOverride=!0,!0):!1}setFileAnnotationHeight(e){let t=this.cache.fileAnnotationHeight;return e!==t&&(this.cache.fileAnnotationHeight=e,this.cache.measuredHeightDeltaTotal+=e-t,!0)}hasFileAnnotations(e){let t=this.getLatestAnnotations();return oh(t)?t.some(t=>t.lineNumber===0?e.type===`new`?t.side===`additions`:e.type!==`deleted`||t.side===`deletions`:!1):!1}getLineHeight(e,t=!1){return this.getEstimatedLineHeight(t)+(this.cache.heightDeltas.get(e)??0)}getEstimatedLineHeight(e=!1){let t=e?2:1;return this.metrics.lineHeight*t}setOptions(e){if(this.isAdvancedMode())throw Error(`VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.`);if(e==null)return;let{options:t}=this,n=!Op(t,e),r=n&&$y(t,e);super.setOptions(e),r&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:eb(t,e)}),n&&(this.forceRenderOverride=!0),n&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,r)}setThemeType(e){if(this.isAdvancedMode())throw Error(`VirtualizedFileDiff.setThemeType cannot be used inside CodeView. Update CodeView options instead.`);super.setThemeType(e)}resetLayoutCache({forceSimpleRecompute:e=!1,includeEstimatedHeights:t=!1,resetRenderRange:n=!0}={}){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heightDeltas.clear(),this.cache.measuredHeightDeltaTotal=0,this.cache.ghostTextRows=Uy,this.cache.ghostTextRowsByIndex.size>0&&this.cache.ghostTextRowsByIndex.clear(),this.invalidateDerivedLayoutCache(t,n),e&&this.isSimpleMode()&&this.computeApproximateSize()}invalidateDerivedLayoutCache(e,t=!0){this.layoutDirty=!0,this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.totalLines!==0&&(this.cache.totalLines=0),e&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),this.renderRange!=null&&t&&(this.renderRange=void 0)}applyGhostTextRows(e,t){let{cache:{heightDeltas:n,ghostTextRows:r,ghostTextRowsByIndex:i},metrics:{lineHeight:a}}=this;if(r===t)return!1;let o=this.getDiffStyle(),s=new Map;for(let[n,r]of t){let t=this.getLineIndexForDiff(e,n+1,`additions`);t!=null&&s.set(o===`split`?t[1]:t[0],r)}let c=!1;for(let e of new Set([...i.keys(),...s.keys()])){let t=((s.get(e)??0)-(i.get(e)??0))*a;if(t===0)continue;let r=(n.get(e)??0)+t;r===0?n.delete(e):n.set(e,r),this.cache.measuredHeightDeltaTotal+=t,c=!0}return this.cache.ghostTextRows=t,this.cache.ghostTextRowsByIndex=s,c}reconcileHeights(){let e=!1,{options:{overflow:t=`scroll`},metrics:{lineHeight:n}}=this,r=this.placeHolder==null?this.getRenderedDiff():this.getLayoutDiff();if(this.fileContainer==null||r==null)return this.height!==0&&(e=!0),this.height=0,e;this.top=this.getVirtualizedTop(),e=this.applyGhostTextRows(r,this.editor?.__getGhostTextRows()??Uy);let{ghostTextRowsByIndex:i}=this.cache,a=t!==`scroll`||this.getLatestAnnotations().length>0||this.isResizeDebuggingEnabled();if(this.placeHolder!=null||!a&&this.cache.heightDeltas.size===0&&this.cache.fileAnnotationHeight===0)return e&&(this.computeApproximateSize(!0),this.setPlaceholderHeight(this.height)),e;let o=this.getDiffStyle(),s=o===`split`?[this.codeDeletions,this.codeAdditions]:[this.codeUnified];if(this.renderRange!=null&&ch(this.renderRange)){let t=Ky(s)??0;this.setFileAnnotationHeight(t)&&(e=!0)}for(let t of s){if(t==null)continue;let r=t.children[1];if(!(r instanceof HTMLElement))continue;let s=o===`split`&&t===this.codeDeletions;for(let t of r.children){if(!(t instanceof HTMLElement))continue;let r=t.dataset.lineIndex;if(r==null)continue;let c=ib(r,o),l=i.get(c)??0;if(s&&l>0)continue;let u=this.cache.heightDeltas.get(c)??0;if(!a&&u===l*n)continue;let d=t.getBoundingClientRect().height+l*n,f=!1;t.nextElementSibling instanceof HTMLElement&&(`lineAnnotation`in t.nextElementSibling.dataset||`noNewline`in t.nextElementSibling.dataset)&&(`noNewline`in t.nextElementSibling.dataset&&(f=!0),d+=t.nextElementSibling.getBoundingClientRect().height);let p=this.getEstimatedLineHeight(f),m=d-p;m!==u&&(e=!0,this.cache.measuredHeightDeltaTotal+=m-u,m===0?this.cache.heightDeltas.delete(c):this.cache.heightDeltas.set(c,m))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer!=null&&(e&&(this.top=this.getVirtualizedTop()),this.render());flushManagers(){super.flushManagers(),this.lineStateRefreshPending&&this.flushDeferredLineState()}updateCodeViewLayout(e,t,n,r){let i=!1,a=!1,{pendingExpansions:o,pendingHydratedDiff:s,options:{collapsed:c=!1}}=this;if(s!=null&&(this.pendingHydratedDiff=void 0,s.expectedDiff===e&&(Object.assign(e,s.nextDiff),this.setHydratedState(s.files),this.installHydratedSessionDiff(e),this.forceRenderOverride=!0,i=!0,a=!0)),o!=null){this.pendingExpansions=void 0;for(let{hunkIndex:e,direction:t,expansionLineCountOverride:n}of o)this.hunksRenderer.expandHunk(e,t,n),this.forceRenderOverride=!0,a=!0}let l=this.updateExternalDiff(e,r),{pendingRenderDiff:u,layoutDiffChanged:d,renderedDiffChanged:f,annotationsChanged:p}=this.updatePendingRender(e,r);return!this.forceRenderOverride&&(l||f||p)&&(this.forceRenderOverride=!0),(n?.resetDiffLayoutCache===!0||d)&&(i=!0),(d||n?.resetDiffLayoutCache===!0&&n.includeEstimatedDiffHeights)&&(a=!0),n?.metrics!=null&&(this.metrics=Uh(n.metrics),i=!0,a=!0),this.currentCollapsed!==c&&(this.currentCollapsed=c,i=!0),i?this.resetLayoutCache({includeEstimatedHeights:a}):a&&this.invalidateDerivedLayoutCache(!0),this.top=t,this.computeApproximateSize(!1,u),this.height}getLinePosition(e,t=`additions`){let n=this.getLayoutDiff();if(n==null||e<1)return;let r=this.getLineIndexForDiff(n,e,t);if(r==null)return;let{disableFileHeader:i=!1,expandUnchanged:a=!1,collapsed:o=!1,collapsedContextThreshold:s=1}=this.options,c=this.getDiffStyle(),l=this.getHunkSeparatorType(),u=c===`split`?r[1]:r[0];this.approximateLayoutCheckpoints(n);let d=Wh(this.metrics,i),f=this.getLayoutCheckpointBeforeLineIndex(u),p=f?.top??d+this.cache.fileAnnotationHeight;if(o)return{top:d,height:0};let m;return Z_({diff:n,diffStyle:c,startingLine:f?.renderedLineIndex??0,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:s,callback:({hunkIndex:e,hunk:t,collapsedBefore:n,collapsedAfter:r,deletionLine:i,additionLine:a})=>{let o=c===`split`?a?.splitLineIndex??i?.splitLineIndex:a?.unifiedLineIndex??i?.unifiedLineIndex;if(o==null)throw Error(`VirtualizedFileDiff.getLinePosition: missing line index data`);if(n>0){let r=Y_({type:l,metrics:this.metrics,hunkIndex:e,hunkSpecs:t?.hunkSpecs});if(r!=null){if(p+=r.gapBefore,u>=o-n&&u<o)return m={top:p,height:r.height},!0;p+=r.height+r.gapAfter}}let s=this.getLineHeight(o,(a?.noEOFCR??!1)||(i?.noEOFCR??!1));if(o===u)return m={top:p,height:s},!0;if(p+=s,r>0){let e=X_({type:l,metrics:this.metrics});if(e!=null){if(u>o&&u<=o+r)return m={top:p+e.gapBefore,height:e.height},!0;p+=e.totalHeight}}return!1}}),m}getEditorViewport(){return this.virtualizer.type===`simple`?this.virtualizer.getRoot():this.virtualizer.getContainerElement()}getNumericScrollAnchor(e){let t=this.getLayoutDiff();if(t==null)return;let{disableFileHeader:n=!1,expandUnchanged:r=!1,collapsed:i=!1,collapsedContextThreshold:a=1}=this.options;if(i)return;let o=this.getDiffStyle(),s=this.getHunkSeparatorType();this.approximateLayoutCheckpoints(t);let c=this.getLayoutCheckpointBeforeTop(e),l=c?.top??Wh(this.metrics,n)+this.cache.fileAnnotationHeight,u;return Z_({diff:t,diffStyle:o,startingLine:c?.renderedLineIndex??0,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:a,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,deletionLine:a,additionLine:c})=>{let d=o===`split`?c?.splitLineIndex??a?.splitLineIndex:c?.unifiedLineIndex??a?.unifiedLineIndex;if(d==null)throw Error(`VirtualizedFileDiff.getNumericScrollAnchor: missing line index data`);if(r>0){let e=Y_({type:s,metrics:this.metrics,hunkIndex:t,hunkSpecs:n?.hunkSpecs});e!=null&&(l+=e.totalHeight)}if(l>=e&&(a==null?c!=null&&(u={lineNumber:c.lineNumber,side:`additions`,top:l}):u={lineNumber:a.lineNumber,side:`deletions`,top:l},u!=null))return!0;let f=this.getLineHeight(d,(c?.noEOFCR??!1)||(a?.noEOFCR??!1));if(l+=f,i>0){let e=X_({type:s,metrics:this.metrics});e!=null&&(l+=e.totalHeight)}return!1}}),u}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){let t=this.getLayoutDiff();if(this.top==null||t==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};let n=e==null?this.renderRange:this.computeRenderRangeFromWindow(t,this.top,e);if(n==null)return;let{bufferBefore:r,bufferAfter:i,totalLines:a}=n,o=0;if(a===0){let t=e??this.virtualizer.getWindowSpecs();this.top<t.top&&(o=i)}return{topOffset:this.top+r+o,height:this.height-(r+i)}}cleanUp(e=!1){let t=this.cache.ghostTextRows.size>0;t&&(this.layoutDirty=!0);let n=e&&this.isAdvancedMode()&&this.fileContainer!=null&&(t||!Q(this.getRenderedDiff(),this.getLatestDiff()));this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||(this.resetLayoutCache({includeEstimatedHeights:!0}),this.pendingExpansions=void 0,this.pendingHydratedDiff=void 0),this.pendingRender=void 0,this.isSetup=!1,super.cleanUp(e),n&&this.virtualizer.instanceChanged(this,!0)}expandHunk=(e,t,n)=>{this.fileDiff!=null&&(this.loadFilesIfNecessary(),this.isAdvancedMode()?(this.pendingExpansions??=[],this.pendingExpansions.push({hunkIndex:e,direction:t,expansionLineCountOverride:n})):(this.hunksRenderer.expandHunk(e,t,n),this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()),this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0))};async handleFilesLoaded(e,t){if(this.fileDiff===e&&e.isPartial){if(this.isAdvancedMode()){let n=ng(`clone`,e,t);if(await Sy(()=>this.primeHighlightCache(n)),this.fileDiff!==e)return;this.pendingHydratedDiff={expectedDiff:e,nextDiff:n,files:t}}else{if(ng(`merge`,e,t),this.setHydratedState(t),!this.installHydratedSessionDiff(e)&&(await Sy(()=>this.primeHighlightCache(e)),this.fileDiff!==e))return;this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}}loadFilesIfNecessary(){if(this.pendingHydratedDiff!=null){if(this.pendingHydratedDiff.expectedDiff===this.fileDiff)return;this.pendingHydratedDiff=void 0}super.loadFilesIfNecessary()}isLineRenderable(e){if(super.isLineRenderable(e))return!0;let{pendingExpansions:t}=this,n=this.getRenderedDiff();if(t==null||t.length===0||n==null)return!1;let{expansionLineCount:r=100,collapsedContextThreshold:i=1}=this.options,a=new Map(this.hunksRenderer.getExpandedHunksMap());for(let e of t){let t={...a.get(e.hunkIndex)??{fromStart:0,fromEnd:0}},n=e.expansionLineCountOverride??r;(e.direction===`up`||e.direction===`both`)&&(t.fromStart+=n),(e.direction===`down`||e.direction===`both`)&&(t.fromEnd+=n),a.set(e.hunkIndex,t)}return U_({fileDiff:n,lineNumber:e,expandedHunks:a,collapsedContextThreshold:i})}invalidateEditSessionLayout(){this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1}),this.isSimpleMode()||this.computeApproximateSize(!0),this.getSimpleVirtualizer()?.requestHeightReconcile(this)}escalateEditSessionRender(){this.invalidateEditSessionLayout(),this.enabled&&this.fileDiff!=null&&(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0))}shouldSelfHealEditSession(){return!this.isAdvancedMode()&&super.shouldSelfHealEditSession()}setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){if(!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null)return;let e=this.getLatestDiff(),t=e==null?void 0:this.hunksRenderer.getDiffForNextRender(e);this.isSimpleMode()&&(this.pendingRender=void 0),this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!Q(this.getRenderedDiff(),t))}syncGhostTextRows(){let e=this.getAdvancedVirtualizer();e==null?this.getSimpleVirtualizer()?.requestHeightReconcile(this):(e.capturePendingLayoutAnchor(),this.layoutDirty=!0,e.instanceChanged(this,!0))}applyDocumentChange(e,t,n=!1){let{renderRange:r}=this;this.getAdvancedVirtualizer()?.capturePendingLayoutAnchor(),super.applyDocumentChange(e,t),this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1});let i=this.getRenderedDiff();if(!this.isSimpleMode())this.computeApproximateSize(!0);else if(n&&r!=null&&i!=null){let e=this.virtualizer.getWindowSpecs(),t=this.computeRenderRangeFromWindow(i,this.top??0,e);t.bufferAfter!==r.bufferAfter&&this.updateBuffers(t)}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}computeApproximateSize(e=!1,t=this.getLayoutDiff()){let n=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!n)return;let r=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,t==null){this.layoutDirty=!1;return}this.applyGhostTextRows(t,this.editor?.__getGhostTextRows()??Uy);let{disableFileHeader:i=!1,collapsed:a=!1}=this.options,o=Wh(this.metrics,i);if(this.height+=o,a){this.layoutDirty=!1;return}this.height=this.getActiveEstimatedHeight(t)+this.cache.measuredHeightDeltaTotal,n&&!r&&this.validateComputedHeight(t),this.layoutDirty=!1}getLayoutDiff(){return this.pendingRender?.diff??this.getRenderedDiff()}getActiveEstimatedHeight(e=this.getLayoutDiff()){this.ensureEstimatedDiffHeights(e);let t=this.getDiffStyle()===`split`?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(t==null)throw Error(`VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height`);return t}ensureEstimatedDiffHeights(e=this.getLayoutDiff()){if(e==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;let{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options,{splitHeight:i,unifiedHeight:a}=zy({fileDiff:e,metrics:this.metrics,disableFileHeader:t,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:n,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:r,canHydratePartialDiff:tb(e,this.options.loadDiffFiles!=null)});this.cache.estimatedSplitHeight=i,this.cache.estimatedUnifiedHeight=a}validateComputedHeight(e=this.getLayoutDiff()){if(this.fileContainer==null||e==null)return;let t=this.fileContainer.getBoundingClientRect();t.height===this.height?console.log(`VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT`):console.log(`VirtualizedFileDiff.computeApproximateSize: computed height doesnt match`,{name:e.name,elementHeight:t.height,computedHeight:this.height})}render({fileContainer:e,fileDiff:t,forceRender:n=!1,lineAnnotations:r,...i}={}){let a=Cy(i,`VirtualizedFileDiff.render`),o=a!=null,s=a?.oldFile,c=a?.newFile,l=o&&(!rb(s,this.deletionFile)||!rb(c,this.additionFile)),u=t??this.fileDiff;t==null&&o&&(l||this.fileDiff==null)&&(u=E_(a.oldFile,a.newFile,this.options.parseDiffOptions));let{forceRenderOverride:d,isSetup:f}=this;this.forceRenderOverride=void 0;let p=u!=null&&!Q(this.fileDiff,u),m=p||l;if(e=this.getOrCreateFileContainer(e),u==null)return console.error(`VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data`),!1;p&&this.updateExternalDiff(u,r);let{pendingRenderDiff:h,layoutDiffChanged:g,renderedDiffChanged:_,annotationsChanged:v}=this.pendingRender!=null&&this.pendingRender.latestDiff===(this.getLatestDiff(u)??u)?{pendingRenderDiff:this.pendingRender.diff,layoutDiffChanged:!1,renderedDiffChanged:!1,annotationsChanged:this.syncLineAnnotations(r)}:this.updatePendingRender(u,r);if(g&&this.resetLayoutCache({includeEstimatedHeights:!0}),f)this.top??=this.getVirtualizedTop(),this.layoutDirty&&this.isSimpleMode()&&(this.getSimpleVirtualizer()?.markDOMDirty(),this.computeApproximateSize(!1,h));else{this.computeApproximateSize(!1,h);let t=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(t==null)throw Error(`VirtualizedFileDiff.render: simple virtualizer is not available`);t.connect(e,this),this.isVisible=t.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode()&&(!m||!f))return a!=null&&(this.deletionFile=s,this.additionFile=c),p&&this.clearReusableHeader(),this.renderPlaceholder(this.height);let y=this.virtualizer.getWindowSpecs(),b=this.top??0,x=this.computeRenderRangeFromWindow(h,b,y);return super.render({fileDiff:u,fileContainer:e,renderRange:x,lineAnnotations:r,forceRender:(d??n)||v||_||p,...a,...i})}finalizeRender(){if(!Q(this.getRenderedDiff(),this.pendingRender?.diff))throw Error(`VirtualizedFileDiff.render: rendered a different diff than its prepared layout`);this.pendingRender=void 0,this.isSimpleMode()&&this.getSimpleVirtualizer()?.requestHeightReconcile(this)}updatePendingRender(e,t){let n=this.getLatestDiff(e)??e,r=this.getRenderedDiff(),{pendingRender:i}=this,a=i?.diff??r,o=this.hunksRenderer.getDiffForNextRender(n);return this.pendingRender={latestDiff:n,diff:o},{pendingRenderDiff:o,annotationsChanged:this.syncLineAnnotations(t),layoutDiffChanged:!Q(a,o),renderedDiffChanged:!Q(r,o)}}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}shouldGuardRebuildScroll(){return!1}isSimpleMode(){return this.virtualizer.type===`simple`}isAdvancedMode(){return this.virtualizer.type===`advanced`}getVirtualizedTop(){return this.virtualizer.type===`advanced`?this.virtualizer.getLocalTopForInstance(this):this.fileContainer==null?0:this.virtualizer.getOffsetInScrollContainer(this.fileContainer)}getSimpleVirtualizer(){return this.virtualizer.type===`simple`?this.virtualizer:void 0}getAdvancedVirtualizer(){return this.virtualizer.type===`advanced`?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??`split`}getHunkSeparatorType(){return nb(this.options.hunkSeparators)}approximateLayoutCheckpoints(e){if(!this.layoutDirty&&this.cache.checkpoints.length>0||e.hunks.length===0||this.options.collapsed===!0)return;let{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options,i=e.hunks.length-1,a=tb(e,this.options.loadDiffFiles!=null),o=this.getDiffStyle(),s=this.getHunkSeparatorType(),c=n?!0:this.hunksRenderer.getExpandedHunksMap(),l=qy(this.cache.heightDeltas),u=Wh(this.metrics,t)+this.cache.fileAnnotationHeight,d=0,f=({rowCount:e,startLineIndex:t,preSeparatorHeight:n=0,postSeparatorHeight:r=0,metadataOffsets:i=[]})=>{if(e<=0)return;let a=d,o=d+e,s=Xy(a);for(;s<o;){let e=s-a,r=u+(e>0?n:0)+e*this.metrics.lineHeight+Zy(i,e)*this.metrics.lineHeight+Jy(l,t,t+e);this.cache.checkpoints.push({renderedLineIndex:s,lineIndex:t+e,top:r}),s+=Hy}u+=n+e*this.metrics.lineHeight+i.length*this.metrics.lineHeight+Jy(l,t,t+e)+r,d=o};for(let t=0;t<e.hunks.length;t++){let n=e.hunks[t];if(n==null)throw Error(`VirtualizedFileDiff.approximateLayoutCheckpoints: invalid hunk index`);let l=z_({isPartial:e.isPartial,rangeSize:n.collapsedBefore,expandedHunks:c,hunkIndex:t,collapsedContextThreshold:r}),u=l.collapsedLines>0?Y_({type:s,metrics:this.metrics,hunkIndex:t,hunkSpecs:n.hunkSpecs})?.totalHeight??0:0;f({rowCount:l.fromStart,startLineIndex:(o===`split`?n.splitLineStart:n.unifiedLineStart)-l.rangeSize});let d=u;f({rowCount:l.fromEnd,startLineIndex:(o===`split`?n.splitLineStart:n.unifiedLineStart)-l.fromEnd,preSeparatorHeight:d}),l.fromEnd>0&&(d=0);let p=t===i?H_({fileDiff:e,hunkIndex:t,expandedHunks:c,collapsedContextThreshold:r,errorPrefix:`VirtualizedFileDiff`}):void 0,m=p!=null&&p.collapsedLines>0||t===i&&a?X_({type:s,metrics:this.metrics})?.totalHeight??0:0,h=p==null?0:p.fromStart+p.fromEnd,g=o===`split`?n.splitLineCount:n.unifiedLineCount,_=o===`split`?n.splitLineStart:n.unifiedLineStart;f({rowCount:g,startLineIndex:_,preSeparatorHeight:d,postSeparatorHeight:h===0?m:0,metadataOffsets:Qy({diffStyle:o,hunk:n,rowCount:g})}),p!=null&&h>0&&f({rowCount:h,startLineIndex:_+g,postSeparatorHeight:m})}this.cache.totalLines=d}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,r;for(;t<=n;){let i=t+n>>1,a=this.cache.checkpoints[i];if(a==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);a.lineIndex<=e?(r=a,t=i+1):n=i-1}return r}getLayoutCheckpointBeforeTop(e,t){let n=0,r=this.cache.checkpoints.length-1,i=-1;for(;n<=r;){let t=n+r>>1,a=this.cache.checkpoints[t];if(a==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);a.top<=e?(i=t,n=t+1):r=t-1}if(t==null)return i>=0?this.cache.checkpoints[i]:void 0;for(let e=i;e>=0;e--){let n=this.cache.checkpoints[e];if(n==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);if(n.renderedLineIndex%t===0)return n}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(let r of e.hunks)n+=t===`split`?r.splitLineCount:r.unifiedLineCount;return n}let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options,a=r?!0:this.hunksRenderer.getExpandedHunksMap();for(let[r,o]of e.hunks.entries()){let s=t===`split`?o.splitLineCount:o.unifiedLineCount;n+=s;let c=Math.max(o.collapsedBefore,0),{fromStart:l,fromEnd:u,renderAll:d}=z_({isPartial:e.isPartial,rangeSize:c,expandedHunks:a,hunkIndex:r,collapsedContextThreshold:i});c>0&&(n+=d?c:l+u)}let o=H_({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:a,collapsedContextThreshold:i,errorPrefix:`VirtualizedFileDiff`});return o!=null&&(n+=o.fromStart+o.fromEnd),n}getLayoutLineCount(e,t){let n=this.getExpandedLineCount(e,t),r=t===`split`?e.splitLineCount:e.unifiedLineCount;return Math.max(n,r,e.additionLines.length,e.deletionLines.length,this.cache.totalLines)}computeRenderRangeFromWindow(e,t,{top:n,bottom:r}){let{disableFileHeader:i=!1,expandUnchanged:a=!1,collapsedContextThreshold:o=1}=this.options,{hunkLineCount:s,lineHeight:c}=this.metrics,l=this.getDiffStyle(),u=this.getHunkSeparatorType(),d=tb(e,this.options.loadDiffFiles!=null),f=this.height,p=this.getLayoutLineCount(e,l),m=Wh(this.metrics,i),h=e.hunks.length>0?Kh(this.metrics):0,{fileAnnotationHeight:g}=this.cache,_=m+g,v=Math.max(0,f-m-g-h),y=this.hasFileAnnotations(e),b=t+m,x=g>0&&y&&b<r&&b+g>n;if(t<n-f||t>r)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-m-h};if(p<=s||e.hunks.length===0)return{startingLine:0,totalLines:s,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(e),p=this.getLayoutLineCount(e,l);let S=Math.ceil(Math.max(r-n,0)/c),C=Math.ceil(S/s)*s+s,w=C/s,T=w,E=[],ee=(n+r)/2,D=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-C*c*2),s),O=t+(D?.top??_),te=D?.renderedLineIndex??0,ne,re,k;if(Z_({diff:e,diffStyle:l,startingLine:D?.renderedLineIndex??0,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:i,hunk:a,collapsedBefore:o,collapsedAfter:c,deletionLine:f,additionLine:p})=>{let m=p==null?f.splitLineIndex:p.splitLineIndex,h=p==null?f.unifiedLineIndex:p.unifiedLineIndex,g=(p?.noEOFCR??!1)||(f?.noEOFCR??!1),v=i===e.hunks.length-1&&a!=null&&(l===`split`?m===a.splitLineStart+a.splitLineCount-1:h===a.unifiedLineStart+a.unifiedLineCount-1),y=(o>0?Y_({type:u,metrics:this.metrics,hunkIndex:i,hunkSpecs:a?.hunkSpecs}):void 0)?.totalHeight??0;O+=y;let b=te%s===0,x=Math.floor(te/s);if(b&&(E[x]=O-(t+_+y),k!=null)){if(k<=0)return!0;k--}let S=this.getLineHeight(l===`split`?m:h,g);if(O>n-S&&O<r&&(ne??=x),re==null&&O+S>ee&&(re=x),k==null&&O>=r&&b&&(k=T),te++,O+=S,c>0||v&&d){let e=X_({type:u,metrics:this.metrics});e!=null&&(O<r&&O+e.totalHeight>n&&(ne??=x),re==null&&O+e.totalHeight>ee&&(re=x),O+=e.totalHeight)}return!1}}),ne==null){if(x)ne=0,re=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-m-h}}re??=ne;let A=Math.round(re-w/2),ie=Math.max(0,Math.ceil(p/s)-w),ae=Math.max(0,Math.min(A,ie)),j=ae*s,oe=A<0?C+A*s:C,se=E[ae]??0,ce=j===0?0:g+se,le=ae+oe/s,ue=le<E.length?v-E[le]:v-(O-t-_);return{startingLine:j,totalLines:oe,bufferBefore:ce,bufferAfter:Math.max(0,ue)}}};function Ky(e){let t;for(let n of e){if(n==null)continue;let e=n.children[1];if(e instanceof HTMLElement)for(let n of e.children)n instanceof HTMLElement&&n.dataset.lineAnnotation===ah&&(t=Math.max(t??0,n.getBoundingClientRect().height))}return t}function qy(e){let t=Array.from(e).sort((e,t)=>e[0]-t[0]),n=[],r=[0],i=0;for(let[e,a]of t)n.push(e),i+=a,r.push(i);return{lineIndexes:n,prefixTotals:r}}function Jy({lineIndexes:e,prefixTotals:t},n,r){if(n>=r||e.length===0)return 0;let i=Yy(e,n);return(t[Yy(e,r)]??0)-(t[i]??0)}function Yy(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>1,a=e[i];if(a==null)throw Error(`VirtualizedFileDiff: invalid prefix index`);a<t?n=i+1:r=i}return n}function Xy(e){return Math.ceil(e/Hy)*Hy}function Zy(e,t){let n=0;for(let r of e)r<t&&n++;return n}function Qy({diffStyle:e,hunk:t,rowCount:n}){if(n<=0||!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return[];let r=t.hunkContent.at(-1);if(r==null)return[];if(r.type===`context`)return[n-1];let i=Math.max(r.deletions,r.additions),a=r.deletions+r.additions;if(e===`split`)return i>0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[n-1]:[];let o=[],s=n-a;return r.deletions>0&&t.noEOFCRDeletions&&o.push(s+r.deletions-1),r.additions>0&&t.noEOFCRAdditions&&o.push(n-1),o}function $y(e,t){return(e.diffStyle??`split`)!==(t.diffStyle??`split`)||(e.overflow??`scroll`)!==(t.overflow??`scroll`)||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.diffIndicators??`bars`)!==(t.diffIndicators??`bars`)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||!!e.loadDiffFiles!=!!t.loadDiffFiles||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)||e.unsafeCSS!==t.unsafeCSS}function eb(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||!!e.loadDiffFiles!=!!t.loadDiffFiles||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function tb(e,t){return e.isPartial&&t&&(e.type===`change`||e.type===`rename-changed`)}function nb(e){return typeof e==`function`?`custom`:e??`line-info`}function rb(e,t){return e==null||t==null?e==null&&t==null:Jh(e,t)}function ib(e,t){let[n,r]=e.split(`,`).map(Number);return t===`split`?r:n}function ab(e,t){return e==null||t==null?e===t:e.top===t.top&&e.bottom===t.bottom}var ob=1e3,sb=ob*4,cb=[0,1e-6,.99999,1],lb={overscrollSize:ob,intersectionObserverMargin:sb,resizeDebugging:!1},ub=0,db=-1,fb=class e{static __STOP=!1;static __lastScrollPosition=0;__id=`virtualizer-${++db}`;config;type=`simple`;intersectionObserver;scrollTop=0;height=0;scrollHeight=0;windowSpecs={top:0,bottom:0};root;contentContainer;resizeObserver;observers=new Map;visibleInstances=new Map;visibleInstancesDirty=!1;instancesChanged=new Set;reconcileQueue=new Set;scrollDirty=!0;heightDirty=!0;scrollHeightDirty=!0;renderedObservers=0;connectQueue=new Map;constructor(e){this.config={...lb,...e}}setup(t,n){if(this.root==null){this.root=t,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:cb,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),t instanceof Document?this.setupWindow():this.setupElement(n),window.__INSTANCE=this,window.__TOGGLE=()=>{e.__STOP?(e.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:e.__lastScrollPosition}),Cp(this.computeRenderRangeAndEmit)):(e.__lastScrollPosition=this.getScrollTop(),e.__STOP=!0)};for(let[e,t]of this.connectQueue.entries())this.connect(e,t);this.connectQueue.clear(),this.markDOMDirty(),Cp(this.computeRenderRangeAndEmit)}}instanceChanged(e,t){this.instancesChanged.add(e),t&&this.markDOMDirty(),Cp(this.computeRenderRangeAndEmit)}requestHeightReconcile(e){this.reconcileQueue.add(e),Cp(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=jp({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}getRoot(){return this.root}isInstanceVisible(e,t){let n=this.getScrollTop(),r=this.getHeight(),i=this.config.intersectionObserverMargin,a=n-i,o=n+r+i;return!(e<a-t||e>o)}handleContainerResize=e=>{if(this.root==null)return;let t=!1;for(let n of e){let e=n.borderBoxSize[0].blockSize;this.root instanceof Document?e!==this.scrollHeight&&(this.scrollHeightDirty=!0,t=!0,this.config.resizeDebugging&&(console.log(`Virtualizer: content size change`,this.__id,{sizeChange:e-ub,newSize:e}),ub=e)):n.target===this.root?e!==this.height&&(this.heightDirty=!0,t=!0):n.target===this.contentContainer&&(this.scrollHeightDirty=!0,t=!0,this.config.resizeDebugging&&(console.log(`Virtualizer: scroller size change`,this.__id,{sizeChange:e-ub,newSize:e}),ub=e))}t&&Cp(this.computeRenderRangeAndEmit)};setupWindow(){if(this.root==null||!(this.root instanceof Document))throw Error(`Virtualizer.setupWindow: Invalid setup method`);window.addEventListener(`scroll`,this.handleWindowScroll,{passive:!0}),window.addEventListener(`resize`,this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(e){if(this.root==null||this.root instanceof Document)throw Error(`Virtualizer.setupElement: Invalid setup method`);this.root.addEventListener(`scroll`,this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),e??=this.root.firstElementChild??void 0,e instanceof HTMLElement&&(this.contentContainer=e,this.resizeObserver?.observe(e))}cleanUp(){wp(this.computeRenderRangeAndEmit),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener(`scroll`,this.handleElementScroll),window.removeEventListener(`scroll`,this.handleWindowScroll),window.removeEventListener(`resize`,this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.reconcileQueue.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.scrollHeightDirty=!0}getOffsetInScrollContainer(e){return this.getScrollTop()+pb(e,this.getScrollContainerElement())}connect(e,t){if(this.observers.has(e))throw Error(`Virtualizer.connect: instance is already connected...`);return this.intersectionObserver==null?this.connectQueue.set(e,t):(this.intersectionObserver.observe(e),this.observers.set(e,t),this.instancesChanged.add(t),this.markDOMDirty(),Cp(this.computeRenderRangeAndEmit)),()=>this.disconnect(e)}disconnect(e){let t=this.observers.get(e);this.connectQueue.delete(e),t!=null&&(this.intersectionObserver?.unobserve(e),this.observers.delete(e),this.instancesChanged.delete(t),this.reconcileQueue.delete(t),this.visibleInstances.delete(e)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),Cp(this.computeRenderRangeAndEmit))}handleWindowResize=()=>{e.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,Cp(this.computeRenderRangeAndEmit))};handleWindowScroll=()=>{!e.__STOP&&this.root!=null&&this.root instanceof Document&&(this.scrollDirty=!0,Cp(this.computeRenderRangeAndEmit))};handleElementScroll=()=>{e.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,Cp(this.computeRenderRangeAndEmit))};computeRenderRangeAndEmit=()=>{if(e.__STOP)return;let t=this.heightDirty||this.scrollHeightDirty,n=this.instancesChanged.size>0;if(this.instancesChanged.size===0){let e=jp({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!t&&ab(this.windowSpecs,e)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.reconcileQueue.size===0)return;this.windowSpecs=e}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;let r=this.getScrollAnchor(this.height),i=new Set;for(let e of t?this.observers.values():this.visibleInstances.values())e.onRender(t)&&i.add(e);for(let e of this.instancesChanged)i.has(e)||e.onRender(t)&&i.add(e);this.scrollFix(r);for(let e of i)this.reconcileQueue.delete(e),e.reconcileHeights();for(let e of this.reconcileQueue)e.reconcileHeights()&&(n=!0);this.reconcileQueue.clear(),n||=this.instancesChanged.size>0,n&&this.markDOMDirty(),(n||t)&&Cp(this.computeRenderRangeAndEmit),i.clear(),this.instancesChanged.clear()};scrollFix(e){if(e==null)return;let t=this.getScrollContainerElement(),{lineIndex:n,lineOffset:r,fileElement:i,fileOffset:a,fileTypeOffset:o}=e;if(n!=null&&r!=null){let e=i.shadowRoot?.querySelector(`[data-line][data-line-index="${n}"]`);if(e instanceof HTMLElement){let n=pb(e,t);if(n!==r){let e=n-r;this.applyScrollFix(e)}return}}let s=pb(i,t);if(o===`top`)s!==a&&this.applyScrollFix(s-a);else{let e=s+i.getBoundingClientRect().height;e!==a&&this.applyScrollFix(e-a)}}applyScrollFix(e){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+e,behavior:`instant`}):this.root.scrollTo({top:this.root.scrollTop+e,behavior:`instant`}),this.markDOMDirty()}getScrollAnchor(e){let t=this.getScrollContainerElement(),n;for(let[r]of this.visibleInstances.entries()){let i=pb(r,t),a=i+r.offsetHeight,o,s;a<=0?(o=a,s=`bottom`):(o=i,s=`top`);let c,l;if(a>0&&i<e)for(let e of r.shadowRoot?.querySelectorAll(`[data-line][data-line-index]`)??[]){if(!(e instanceof HTMLElement))continue;let n=e.dataset.lineIndex;if(n==null)continue;let r=pb(e,t);if(!(r<0)){c=n,l=r;break}}if(n?.lineOffset!=null&&l==null)continue;let u=!1;(n==null||l!=null&&(n.lineOffset==null||l<n.lineOffset)||l==null&&n.lineOffset==null&&(o>=0&&(n.fileOffset<0||o<n.fileOffset)||o<0&&n.fileOffset<0&&o>n.fileOffset))&&(u=!0),u&&(n={fileElement:r,fileTypeOffset:s,fileOffset:o,lineIndex:c,lineOffset:l})}return n}handleIntersectionChange=e=>{this.scrollDirty=!0;for(let{target:t,isIntersecting:n}of e){if(!(t instanceof HTMLElement))throw Error(`Virtualizer.handleIntersectionChange: target not an HTMLElement`);let e=this.observers.get(t);e!=null&&(n&&!this.visibleInstances.has(t)?(e.setVisibility(!0),this.visibleInstances.set(t,e),this.visibleInstancesDirty=!0):!n&&this.visibleInstances.has(t)&&(e.setVisibility(!1),this.visibleInstances.delete(t),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&Cp(this.computeRenderRangeAndEmit)};getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let e=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return e=this.clampScrollTop(e),this.scrollTop=e,e}scrollTo({top:e,behavior:t=`auto`}){let{root:n}=this;if(n==null)return;let r=this.clampScrollTop(e);n instanceof Document?window.scrollTo({top:r,behavior:t}):n.scrollTo({top:r,behavior:t}),this.scrollDirty=!0,Cp(this.computeRenderRangeAndEmit)}clampScrollTop(e){return Math.max(0,Math.min(e,this.getScrollHeight()-this.getHeight()))}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}};function pb(e,t){let n=e.getBoundingClientRect(),r=t?.getBoundingClientRect().top??0;return n.top-r}var mb=re(`diffs:group-nav`,`tabs`),hb=ie(`(min-width: 1024px)`),gb=C(()=>mb.value===`sidebar`&&hb.value);function _b(e,t,n){if(e==null)return``;let r,i={},a={},o=``,s=``,c=``,l=2,u=3,d=2,f=[],p=0,m=0;for(let h=0;h<e.length;h+=1)if(o=e.charAt(h),Object.prototype.hasOwnProperty.call(i,o)||(i[o]=u++,a[o]=!0),s=c+o,Object.prototype.hasOwnProperty.call(i,s))c=s;else{if(Object.prototype.hasOwnProperty.call(a,c)){if(c.charCodeAt(0)<256){for(let e=0;e<d;e++)p<<=1,m==t-1?(m=0,f.push(n(p)),p=0):m++;r=c.charCodeAt(0);for(let e=0;e<8;e++)p=p<<1|r&1,m==t-1?(m=0,f.push(n(p)),p=0):m++,r>>=1}else{r=1;for(let e=0;e<d;e++)p=p<<1|r,m==t-1?(m=0,f.push(n(p)),p=0):m++,r=0;r=c.charCodeAt(0);for(let e=0;e<16;e++)p=p<<1|r&1,m==t-1?(m=0,f.push(n(p)),p=0):m++,r>>=1}l--,l==0&&(l=2**d,d++),delete a[c]}else{r=i[c];for(let e=0;e<d;e++)p=p<<1|r&1,m==t-1?(m=0,f.push(n(p)),p=0):m++,r>>=1}l--,l==0&&(l=2**d,d++),i[s]=u++,c=String(o)}if(c!==``){if(Object.prototype.hasOwnProperty.call(a,c)){if(c.charCodeAt(0)<256){for(let e=0;e<d;e++)p<<=1,m==t-1?(m=0,f.push(n(p)),p=0):m++;r=c.charCodeAt(0);for(let e=0;e<8;e++)p=p<<1|r&1,m==t-1?(m=0,f.push(n(p)),p=0):m++,r>>=1}else{r=1;for(let e=0;e<d;e++)p=p<<1|r,m==t-1?(m=0,f.push(n(p)),p=0):m++,r=0;r=c.charCodeAt(0);for(let e=0;e<16;e++)p=p<<1|r&1,m==t-1?(m=0,f.push(n(p)),p=0):m++,r>>=1}l--,l==0&&(l=2**d,d++),delete a[c]}else{r=i[c];for(let e=0;e<d;e++)p=p<<1|r&1,m==t-1?(m=0,f.push(n(p)),p=0):m++,r>>=1}l--,l==0&&(l=2**d,d++)}r=2;for(let e=0;e<d;e++)p=p<<1|r&1,m==t-1?(m=0,f.push(n(p)),p=0):m++,r>>=1;let h=!0;do p<<=1,m==t-1?(f.push(n(p)),h=!1):m++;while(h);return f.join(``)}function vb(e,t,n){let r=[],i=[],a={val:n(0),position:t,index:1},o=4,s=4,c=3,l=``,u,d=0,f=4,p=1;for(let e=0;e<3;e+=1)r[e]=String(e);for(;p!=f;){let e=a.val&a.position;a.position>>=1,a.position==0&&(a.position=t,a.val=n(a.index++)),d|=+(e>0)*p,p<<=1}switch(d){case 0:for(d=0,f=256,p=1;p!=f;){let e=a.val&a.position;a.position>>=1,a.position==0&&(a.position=t,a.val=n(a.index++)),d|=+(e>0)*p,p<<=1}u=String.fromCharCode(d);break;case 1:for(d=0,f=2**16,p=1;p!=f;){let e=a.val&a.position;a.position>>=1,a.position==0&&(a.position=t,a.val=n(a.index++)),d|=+(e>0)*p,p<<=1}u=String.fromCharCode(d);break;case 2:return``}if(u===void 0)throw Error(`No character found`);r[3]=String(u);let m=String(u);for(i.push(String(u));;){if(a.index>e)return``;for(d=0,f=2**c,p=1;p!=f;){let e=a.val&a.position;a.position>>=1,a.position==0&&(a.position=t,a.val=n(a.index++)),d|=+(e>0)*p,p<<=1}switch(u=d){case 0:for(d=0,f=256,p=1;p!=f;){let e=a.val&a.position;a.position>>=1,a.position==0&&(a.position=t,a.val=n(a.index++)),d|=+(e>0)*p,p<<=1}r[s++]=String.fromCharCode(d),u=s-1,o--;break;case 1:for(d=0,f=2**16,p=1;p!=f;){let e=a.val&a.position;a.position>>=1,a.position==0&&(a.position=t,a.val=n(a.index++)),d|=+(e>0)*p,p<<=1}r[s++]=String.fromCharCode(d),u=s-1,o--;break;case 2:return i.join(``)}if(o==0&&(o=2**c,c++),r[u])l=String(r[u]);else if(u===s)l=m+m.charAt(0);else return null;i.push(l),r[s++]=m+l.charAt(0),o--,m=l,o==0&&(o=2**c,c++)}}var yb=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`;function bb(e){if(e==null)return``;let t=_b(e,6,e=>yb.charAt(e));switch(t.length%4){default:case 0:return t;case 1:return t+`===`;case 2:return t+`==`;case 3:return t+`=`}}var xb={};function Sb(e,t){if(!xb[e]){xb[e]={};for(let t=0;t<e.length;t++)xb[e][e.charAt(t)]=t}return xb[e][t]}function Cb(e){return e==null?``:e==``?null:vb(e.length,32,t=>Sb(yb,e.charAt(t)))}var wb=`https://pulls.review`,Tb=`<!-- pulls.review data -->`,Eb=6e4;function Db(e){return e.replace(`T`,` `).slice(0,16)}function Ob(e,t){return t?["```lz-string",bb(JSON.stringify(e)),"```"].join(`
229
+ `):["```json",JSON.stringify(e,null,2),"```"].join(`
230
+ `)}function kb(e,t,n){let{result:r}=n,i=`${wb}/gh/${e.owner}/${e.repo}/${e.number}?from=${t}`,a=e=>[Tb,`👁️‍🗨️ Review this pull request with grouped, summarized diffs at:`,`👉 ${i}`,``,`<details><summary>raw result</summary>`,``,`<br>`,``,`💭 analyzed by \`${r.model??r.source}\``,`🕰️ ${Db(r.generatedAt)} UTC`,`🔗 head ${n.headSha.slice(0,7)}`,`🤖 automated by [pulls.review](${wb})`,``,Ob(n,e),``,`</details>`,``].join(`
231
+ `),o=a(!1);if(o.length<=Eb)return o;let s=a(!0);if(s.length>Eb)throw it.commentTooLarge({n:s.length});return s}function Ab(e){if(!e.startsWith(Tb))return;let t=e.match(/```(json|lz-string)\n([\s\S]*?)\n```/);if(t)try{let e=t[1]===`lz-string`?Cb(t[2]):t[2];if(!e)return;let n=at(bp,JSON.parse(e));return n.success?n.output:void 0}catch{return}}async function jb(e,t){return(await(await e.request(`/repos/${t.owner}/${t.repo}/issues/${t.number}/comments?per_page=100`)).json()).flatMap(e=>{let t=Ab(e.body);return t&&e.user?[{id:e.id,login:e.user.login,url:e.html_url,updatedAt:e.updated_at,analysis:t}]:[]}).sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt))}async function Mb(e,t,n){let r=await(await e.request(`/repos/${t.owner}/${t.repo}/issues/${t.number}/comments`,{method:`POST`,body:{body:n}})).json();return{id:r.id,url:r.html_url}}async function Nb(e,t,n,r){let i=await(await e.request(`/repos/${t.owner}/${t.repo}/issues/comments/${n}`,{method:`PATCH`,body:{body:r}})).json();return{id:i.id,url:i.html_url}}var Pb=Symbol(`diffs-virtualizer`);function Fb(e,t,n,r,i){if(e<=0||n<=0)return i;let a=Math.floor(n/(e/t)*2)/2;return Math.min(i,Math.max(r,a))}function Ib(e,t,n,r,i){let a=S(i);function s(){if(!e.value||!t.value)return;let n=Number.parseFloat(getComputedStyle(e.value).fontSize);a.value=Fb(t.value.getBoundingClientRect().width,n,e.value.clientWidth,r,i)}return ae(e,s),de(n,()=>o(s)),document.fonts?.ready.then(s),a}function Lb(e,t,n){return{key:e.key,label:e.label,summary:e.summary,category:e.category??`other`,files:t,missing:n,added:t.reduce((e,t)=>e+t.additions,0),deleted:t.reduce((e,t)=>e+t.deletions,0)}}function Rb(e,t){let n=new Map(t.map(e=>[e.path,e])),r=new Map(t.flatMap(e=>e.previousPath?[[e.previousPath,e]]:[])),i=new Set;function a(e){let t=[],a=[];for(let o of e.filePaths){let e=n.get(o)??r.get(o);e?(t.push(e),i.add(e)):a.push(o)}return Lb(e,t,a)}let o=e.map(e=>({...a(e),children:(e.children??[]).map(a)})),s=t.filter(e=>!i.has(e));return s.length>0&&o.push({...Lb({key:`uncategorized`,label:lt(`group.uncategorized`),summary:lt(`group.uncategorizedSummary`),category:`other`},s,[]),children:[]}),o}function zb(e){return e.files.length+e.children.reduce((e,t)=>e+t.files.length,0)}function Bb(e,t){let n=[...e.files,...e.children.flatMap(e=>e.files)];return n.length===0?1:n.filter(e=>t.has(e.sha)).length/n.length}function Vb(e){return{added:e.added+e.children.reduce((e,t)=>e+t.added,0),deleted:e.deleted+e.children.reduce((e,t)=>e+t.deleted,0)}}var Hb={class:`flex flex-col items-start`},Ub={class:`flex items-center gap-1.5`},Wb={class:`flex items-center text-xs`},Gb={class:`op-mute`},Kb={key:0,class:`op-mute`},qb=A({__name:`DiffGroupNavItem`,props:{group:{},active:{type:Boolean},reviewed:{},expanded:{type:Boolean}},emits:[`select`,`toggle`],setup(e){let t=e,n=C(()=>Vb(t.group)),i=C(()=>zb(t.group)),o=C(()=>t.group.children.length),c=C(()=>Bb(t.group,t.reviewed));return(t,u)=>(N(),s(`div`,{class:y([`flex items-center border border-b-2 border-base rounded-t transition-all`,[r(Tt)[e.group.category],e.active?`border-b-current shadow translate-y--1px`:``]])},[l(`button`,{type:`button`,class:y([[e.active?`op-100`:`op-fade hover:op-100`],`group flex items-center gap-2 px-2 py-0.5 text-left text-sm color-base hover:bg-active`]),onClick:u[1]||=n=>t.$emit(`select`,e.group.key)},[l(`div`,Hb,[l(`div`,Ub,[_(kt,{category:e.group.category,class:y([`text-sm group-hover:saturate-100`,e.active?``:`saturate-0`])},null,8,[`category`,`class`]),l(`span`,null,a(e.group.label),1)]),l(`div`,Wb,[_(Nt,{additions:n.value.added,deletions:n.value.deleted},null,8,[`additions`,`deletions`]),l(`span`,Gb,`・`+a(t.$t(`common.files`,{n:i.value},i.value)),1),o.value?(N(),s(`span`,Kb,`・`+a(t.$t(`common.subgroups`,{n:o.value},o.value)),1)):E(``,!0)])]),c.value===0?E(``,!0):(N(),x(St,{key:0,value:c.value,size:18,thickness:2,class:`color-base`},null,8,[`value`])),o.value?(N(),x(ye,{key:1,type:`button`,icon:e.expanded?`i-ph:caret-up`:`i-ph:caret-down`,"aria-expanded":e.expanded,class:`mr--1 text-xs`,"aria-label":t.$t(e.expanded?`group.hideSubgroups`:`group.showSubgroups`),onClick:u[0]||=ge(e=>t.$emit(`toggle`),[`stop`])},null,8,[`icon`,`aria-expanded`,`aria-label`])):E(``,!0)],2)],2))}}),Jb={class:`min-w-0 flex flex-1 flex-col gap-1.5`},Yb={class:`flex flex-wrap items-center gap-1.5`},Xb={class:`flex items-center gap-1`},Zb={class:`text-sm`},Qb={class:`op-fade`},$b={class:`flex flex-wrap items-center gap-1.5`},ex=A({__name:`DiffGroupNav`,props:{groups:{},groupsVisable:{},reviewed:{}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=S();function o(e,t=i.value!==e){i.value=t?e:void 0}let u=C(()=>{let e=n.groups.find(e=>e.key===i.value);return e?e.children.map(e=>({...e,children:[]})):[]});function d(e){r(`select`,e),o(e,!0)}return(t,r)=>(N(),s(`div`,Jb,[l(`div`,Yb,[(N(!0),s(j,null,c(e.groups,t=>(N(),x(qb,{key:t.key,group:t,active:e.groupsVisable.includes(t.key),reviewed:e.reviewed,expanded:i.value===t.key,onSelect:r[0]||=e=>d(e),onToggle:e=>o(t.key)},null,8,[`group`,`active`,`reviewed`,`expanded`,`onToggle`]))),128))]),u.value.length?(N(),s(j,{key:0},[l(`div`,Xb,[r[2]||=l(`div`,{class:`i-ph-folder-notch-open-duotone op-fade`},null,-1),l(`div`,Zb,[l(`span`,Qb,a(t.$t(`group.subgroupsOf`)),1),l(`span`,null,a(n.groups.find(e=>e.key===i.value)?.label),1)]),r[3]||=l(`div`,{class:`flex-auto border-t border-base`},null,-1)]),l(`div`,$b,[(N(!0),s(j,null,c(u.value,n=>(N(),x(qb,{key:n.key,group:n,active:e.groupsVisable.includes(n.key),reviewed:e.reviewed,onSelect:r[1]||=e=>t.$emit(`select`,e)},null,8,[`group`,`active`,`reviewed`]))),128))])],64)):E(``,!0)]))}});function tx(e){return e.replace(/\\/g,`/`)}function nx(e){return/\bnode_modules\b/.test(tx(e))}function rx(e){let t=e.split(`_`)[0]??``,n=t.lastIndexOf(`@`);if(n<=0)return;let r=t.slice(0,n),i=t.slice(n+1),a=r;return r.includes(`+`)&&(a=r.replace(`+`,`/`),a.startsWith(`@`)||(a=`@${a}`)),{name:a,version:i}}function ix(e){let t=tx(e).match(/\.pnpm\/([^/]+)/);if(t?.[1]!=null)return rx(t[1])}function ax(e){let t=tx(e),n=ix(t);if(n)return n.name;let r=t.lastIndexOf(`node_modules/`);if(r===-1)return;let[i,a]=t.slice(r+13).split(`/`);if(i!=null)return i.startsWith(`@`)&&a!=null?`${i}/${a}`:i}function ox(e,t=`~/`){return tx(e).replace(/.*\.pnpm\/[^/]+\/node_modules\//,t)}function sx(e,t,n={}){let{pnpmCollapse:r=`~/`,maxUp:i=3}=n,a=tx(e),o=tx(t).replace(/\/$/,``);if(a.includes(`.pnpm/`))return ox(a,r);if(!o)return a;if(a===o)return`.`;if(a.startsWith(`${o}/`)){let e=a.slice(o.length+1);return e.startsWith(`.`)?e:`./${e}`}let s=o.split(`/`),c=a.split(`/`),l=0;for(;l<s.length&&l<c.length&&s[l]===c[l];)l++;let u=s.length-l;return u>i||l===0?a:`${`../`.repeat(u)}${c.slice(l).join(`/`)}`}function cx(e,t,n){let r=nx(e)?ax(e):void 0;return{path:sx(e,t,n),moduleName:r}}var lx={class:`truncate`},ux={class:`color-base`},dx={key:1,class:`op-mute italic`},fx={key:2,class:`op-mute`},px={key:1,class:`text-xs op-mute shrink-0`},mx=A({__name:`DisplayFilePath`,props:{path:{},root:{default:``},icon:{type:Boolean,default:!0},href:{},line:{},column:{},dim:{type:Boolean,default:!0},clickable:{type:Boolean},pnpmCollapse:{},tooltip:{type:[Boolean,String],default:!1}},setup(e){let t=e,n=C(()=>cx(t.path,t.root,{pnpmCollapse:t.pnpmCollapse})),i=C(()=>{let e=n.value.path,t=e.search(/[?#]/),r=t===-1?e:e.slice(0,t),i=t===-1?``:e.slice(t),a=r.lastIndexOf(`/`);return{dir:a===-1?``:r.slice(0,a+1),base:a===-1?r:r.slice(a+1),query:i}}),o=C(()=>t.href!=null||t.clickable);return(t,c)=>O((N(),x(ee(e.href?`a`:`span`),{href:e.href,class:y([`text-sm font-mono inline-flex gap-1 max-w-full min-w-0 items-center`,{"hover:color-active transition":o.value,"cursor-pointer":e.clickable&&!e.href}])},{default:M(()=>[e.icon?(N(),s(`span`,{key:0,class:y([r(Dt)(i.value.base),`op-fade shrink-0`]),"aria-hidden":`true`},null,2)):E(``,!0),l(`span`,lx,[i.value.dir?(N(),s(`span`,{key:0,class:y(e.dim?`op-mute`:`color-base`)},a(i.value.dir),3)):E(``,!0),l(`span`,ux,a(i.value.base),1),i.value.query?(N(),s(`span`,dx,a(i.value.query),1)):E(``,!0),e.line==null?E(``,!0):(N(),s(`span`,fx,[D(`:`+a(e.line),1),e.column==null?E(``,!0):(N(),s(j,{key:0},[D(`:`+a(e.column),1)],64))]))]),n.value.moduleName?(N(),s(`span`,px,`(`+a(n.value.moduleName)+`)`,1)):E(``,!0)]),_:1},8,[`href`,`class`])),[[r(He),e.tooltip===!0?e.path:e.tooltip||``]])}}),hx=[`rows`,`placeholder`,`disabled`,`aria-invalid`],gx=A({__name:`FormTextarea`,props:pe({placeholder:{},rows:{default:4},disabled:{type:Boolean},invalid:{type:Boolean},resize:{type:Boolean,default:!0}},{modelValue:{default:``},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=ue(e,`modelValue`);return(n,r)=>O((N(),s(`textarea`,{"onUpdate:modelValue":r[0]||=e=>t.value=e,rows:e.rows,placeholder:e.placeholder,disabled:e.disabled,"aria-invalid":e.invalid||void 0,class:y([`color-base px-2 py-1.5 outline-none border rounded bg-raised w-full transition placeholder:op-mute focus:ring-2`,[e.invalid?`border-red-500/60 focus:ring-red-500/40`:`border-base focus:ring-primary-500/40`,{"resize-none":!e.resize,"op50 pointer-events-none":e.disabled}]])},null,10,hx)),[[_e,t.value]])}}),_x={class:`flex flex-col gap-2 p-2`},vx={key:0,class:`text-xs text-red-600 dark:text-red-400`},yx={class:`flex flex-wrap justify-end gap-2`},bx=A({__name:`CommentComposer`,props:{hasPendingReview:{type:Boolean},busy:{type:Boolean},error:{}},emits:[`submit`,`cancel`],setup(e,{emit:t}){let n=e,r=t,i=S(``);function o(e){i.value.trim()&&r(`submit`,i.value,e)}return(t,c)=>(N(),s(`div`,_x,[_(gx,{modelValue:i.value,"onUpdate:modelValue":c[0]||=e=>i.value=e,rows:3,placeholder:t.$t(`review.leaveComment`),disabled:e.busy,invalid:!!e.error,onKeydown:[c[1]||=he(ge(e=>o(`review`),[`meta`]),[`enter`]),c[2]||=he(ge(e=>o(`review`),[`ctrl`]),[`enter`])]},null,8,[`modelValue`,`placeholder`,`disabled`,`invalid`]),e.error?(N(),s(`p`,vx,a(e.error),1)):E(``,!0),l(`div`,yx,[_(P,{size:`sm`,variant:`text`,disabled:e.busy,onClick:c[3]||=e=>r(`cancel`)},{default:M(()=>[D(a(t.$t(`common.cancel`)),1)]),_:1},8,[`disabled`]),n.hasPendingReview?E(``,!0):(N(),x(P,{key:0,size:`sm`,disabled:e.busy||!i.value.trim(),onClick:c[4]||=e=>o(`single`)},{default:M(()=>[D(a(t.$t(`review.addSingle`)),1)]),_:1},8,[`disabled`])),_(P,{size:`sm`,variant:`primary`,loading:e.busy,disabled:!i.value.trim(),onClick:c[5]||=e=>o(`review`)},{default:M(()=>[D(a(t.$t(e.hasPendingReview?`review.addToReview`:`review.startReview`)),1)]),_:1},8,[`loading`,`disabled`])])]))}}),xx=[`title`],Sx=A({__name:`FileStatus`,props:{status:{}},setup(e){let t={added:`A`,removed:`D`,modified:`M`,renamed:`R`,copied:`C`},n={added:`color-success-500 bg-success-500:10`,removed:`color-error-500 bg-error-500:10`,modified:`color-warning-500 bg-warning-500:10`,renamed:`color-blue-500 bg-blue-500:10`,copied:`color-blue-500 bg-blue-500:10`};return(r,i)=>(N(),s(`span`,{class:y([`w-4 inline-flex shrink-0 items-center justify-center rounded text-xs font-mono`,n[e.status]]),title:r.$t(`fileStatus.${e.status}`)},a(t[e.status]),11,xx))}}),Cx=(0,cp.default)(et);function wx(e){return Cx(e)}var Tx=`@layer base {
232
+ :host {
233
+ --diffs-font-fallback: "SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono",
234
+ "Courier New", monospace;
235
+ --diffs-header-font-fallback: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
236
+ "Noto Sans", "Liberation Sans", Arial, sans-serif;
237
+ --diffs-mixer: light-dark(#000, #fff);
238
+ --diffs-gap-fallback: 8px;
239
+ --diffs-scrollbar-gutter-fallback: 6px;
240
+ --diffs-scrollbar-gutter: var(--diffs-scrollbar-gutter-override, var(--diffs-scrollbar-gutter-measured, var(--diffs-scrollbar-gutter-fallback)));
241
+ --diffs-added-light: #0dbe4e;
242
+ --diffs-added-dark: #5ecc71;
243
+ --diffs-modified-light: #009fff;
244
+ --diffs-modified-dark: #69b1ff;
245
+ --diffs-deleted-light: #ff2e3f;
246
+ --diffs-deleted-dark: #ff6762;
247
+ --diffs-warning-light: #d5a910;
248
+ --diffs-warning-dark: #ffd452;
249
+ color-scheme: light dark;
250
+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
251
+ font-size: var(--diffs-font-size, 13px);
252
+ line-height: var(--diffs-line-height, 20px);
253
+ font-feature-settings: var(--diffs-font-features);
254
+ --diffs-bg: light-dark(var(--diffs-light-bg, #fff), var(--diffs-dark-bg, #000));
255
+ --diffs-bg-buffer: var(--diffs-bg-buffer-override, light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));
256
+ --diffs-bg-context: var(--diffs-bg-context-override, light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));
257
+ --diffs-bg-context-gutter: var(--diffs-bg-context-gutter-override, light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)), color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));
258
+ --diffs-bg-separator: var(--diffs-bg-separator-override, light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));
259
+ --diffs-fg: light-dark(var(--diffs-light, #000), var(--diffs-dark, #fff));
260
+ --diffs-fg-number: var(--diffs-fg-number-override, light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)), color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));
261
+ --diffs-fg-conflict-marker: var(--diffs-fg-conflict-marker-override, var(--diffs-fg-number));
262
+ --diffs-deletion-base: var(--diffs-deletion-color-override, light-dark(var(--diffs-light-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-light))), var(--diffs-dark-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-dark)))));
263
+ --diffs-addition-base: var(--diffs-addition-color-override, light-dark(var(--diffs-light-addition-color, var(--diffs-addition-color, var(--diffs-added-light))), var(--diffs-dark-addition-color, var(--diffs-addition-color, var(--diffs-added-dark)))));
264
+ --diffs-modified-base: var(--diffs-modified-color-override, light-dark(var(--diffs-light-modified-color, var(--diffs-modified-color, var(--diffs-modified-light))), var(--diffs-dark-modified-color, var(--diffs-modified-color, var(--diffs-modified-dark)))));
265
+ --diffs-bg-deletion: var(--diffs-bg-deletion-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));
266
+ --diffs-bg-deletion-emphasis: var(--diffs-bg-deletion-emphasis-override, light-dark(rgb(from var(--diffs-deletion-base) r g b / .15), rgb(from var(--diffs-deletion-base) r g b / .2)));
267
+ --diffs-bg-addition: var(--diffs-bg-addition-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));
268
+ --diffs-bg-addition-emphasis: var(--diffs-bg-addition-emphasis-override, light-dark(rgb(from var(--diffs-addition-base) r g b / .15), rgb(from var(--diffs-addition-base) r g b / .2)));
269
+ --diffs-selection-base: var(--diffs-modified-base);
270
+ --diffs-selection-number-fg: light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));
271
+ background-color: var(--diffs-bg);
272
+ color: var(--diffs-fg);
273
+ display: block;
274
+ }
275
+
276
+ pre, code, [data-error-wrapper] {
277
+ isolation: isolate;
278
+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));
279
+ outline: none;
280
+ margin: 0;
281
+ padding: 0;
282
+ display: block;
283
+ }
284
+
285
+ pre, code {
286
+ background-color: var(--diffs-bg);
287
+ }
288
+
289
+ code {
290
+ contain: content;
291
+ }
292
+
293
+ input, button {
294
+ font-family: inherit;
295
+ font-size: inherit;
296
+ line-height: inherit;
297
+ }
298
+
299
+ *, :before, :after {
300
+ box-sizing: border-box;
301
+ }
302
+
303
+ [data-icon-sprite] {
304
+ display: none;
305
+ }
306
+
307
+ [data-diffs-header], [data-separator] {
308
+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
309
+ }
310
+
311
+ [data-diffs-header][data-sticky] {
312
+ z-index: 1;
313
+ background-color: var(--diffs-bg);
314
+ position: sticky;
315
+ top: 0;
316
+ }
317
+
318
+ [data-file-info] {
319
+ color: var(--fg);
320
+ background-color: color-mix(in lab, var(--bg) 98%, var(--fg));
321
+ border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));
322
+ padding: 10px;
323
+ font-weight: 700;
324
+ }
325
+
326
+ [data-diff], [data-file] {
327
+ --diffs-grid-number-column-width: minmax(min-content, max-content);
328
+ --diffs-code-grid: var(--diffs-grid-number-column-width) 1fr;
329
+
330
+ &[data-dehydrated] {
331
+ --diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);
332
+ }
333
+
334
+ &:hover [data-code]::-webkit-scrollbar-thumb {
335
+ background-color: var(--diffs-bg-context);
336
+ }
337
+ }
338
+
339
+ @supports (-webkit-touch-callout: none) {
340
+ :host {
341
+ --diffs-scrollbar-gutter-fallback: 0px;
342
+ }
343
+ }
344
+
345
+ [data-line] span, [data-edit-prediction-suffix] span {
346
+ color: light-dark(var(--diffs-token-light, var(--diffs-light)), var(--diffs-token-dark, var(--diffs-dark)));
347
+ background-color: light-dark(var(--diffs-token-light-bg, inherit), var(--diffs-token-dark-bg, inherit));
348
+ font-weight: light-dark(var(--diffs-token-light-font-weight, inherit), var(--diffs-token-dark-font-weight, inherit));
349
+ font-style: light-dark(var(--diffs-token-light-font-style, inherit), var(--diffs-token-dark-font-style, inherit));
350
+ text-decoration: light-dark(var(--diffs-token-light-text-decoration, inherit), var(--diffs-token-dark-text-decoration, inherit));
351
+ }
352
+
353
+ [data-line], [data-gutter-buffer], [data-column-number], [data-line-annotation], [data-no-newline], [data-merge-conflict], [data-merge-conflict-actions], [data-editor-overlay] {
354
+ --diffs-computed-decoration-bg: var(--diffs-bg);
355
+ --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
356
+ --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
357
+ --diffs-computed-editor-active-line-bg: var(--diffs-computed-selected-line-bg);
358
+ --diffs-computed-hovered-line-bg: var(--diffs-computed-editor-active-line-bg);
359
+ --diffs-hover-mix-target: var(--diffs-bg-hover-override, var(--diffs-mixer));
360
+ --diffs-line-bg: var(--diffs-computed-hovered-line-bg);
361
+ color: var(--diffs-fg);
362
+ background-color: var(--diffs-line-bg, var(--diffs-bg));
363
+ }
364
+
365
+ [data-line], [data-no-newline] {
366
+ &[data-decoration-bg] {
367
+ --mix-deco-light: 92%;
368
+ --mix-deco-dark: 85%;
369
+
370
+ &[data-decoration-bg-depth="2"] {
371
+ --mix-deco-light: 88%;
372
+ --mix-deco-dark: 80%;
373
+ }
374
+
375
+ &[data-decoration-bg-depth="3"] {
376
+ --mix-deco-light: 85%;
377
+ --mix-deco-dark: 78%;
378
+ }
379
+
380
+ --diffs-hover-mix-target: var(--diffs-decoration-bg);
381
+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
382
+ var(--diffs-bg) var(--mix-deco-light),
383
+ var(--diffs-decoration-bg)), color-mix(in lab,
384
+ var(--diffs-bg) var(--mix-deco-dark),
385
+ var(--diffs-decoration-bg)));
386
+ }
387
+ }
388
+
389
+ [data-line-annotation], [data-gutter-buffer="annotation"] {
390
+ --diffs-annotation-bg: var(--diffs-bg-context);
391
+ --diffs-computed-decoration-bg: var(--diffs-annotation-bg);
392
+ --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
393
+ }
394
+
395
+ [data-merge-conflict-actions], [data-gutter-buffer="merge-conflict-action"], [data-gutter-buffer="merge-conflict-marker-base"], [data-gutter-buffer="merge-conflict-marker-separator"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"] {
396
+ --diffs-computed-decoration-bg: var(--diffs-bg-context);
397
+ --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
398
+ }
399
+
400
+ [data-gutter-buffer="merge-conflict-marker-start"], [data-merge-conflict="marker-start"] {
401
+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
402
+ var(--diffs-bg) 78%,
403
+ var(--conflict-bg-current-header-override, var(--diffs-addition-base))), color-mix(in lab,
404
+ var(--diffs-bg) 68%,
405
+ var(--conflict-bg-current-header-override, var(--diffs-addition-base))));
406
+ --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
407
+ }
408
+
409
+ [data-gutter-buffer="merge-conflict-marker-end"], [data-merge-conflict="marker-end"] {
410
+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
411
+ var(--diffs-bg) 78%,
412
+ var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))), color-mix(in lab,
413
+ var(--diffs-bg) 68%,
414
+ var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))));
415
+ --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
416
+ }
417
+
418
+ [data-has-merge-conflict] [data-line-annotation], [data-has-merge-conflict] [data-gutter-buffer="annotation"] {
419
+ --diffs-computed-decoration-bg: var(--diffs-bg);
420
+ --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
421
+ }
422
+
423
+ :where([data-background]) {
424
+ & [data-gutter-buffer], & [data-column-number] {
425
+ --mix-light: 91%;
426
+ --mix-dark: 85%;
427
+ }
428
+
429
+ & [data-line], & [data-no-newline] {
430
+ --mix-light: 88%;
431
+ --mix-dark: 80%;
432
+ }
433
+
434
+ & [data-gutter-buffer], & [data-column-number], & [data-line], & [data-no-newline] {
435
+ --diffs-diff-line-mix-target: var(--diffs-bg);
436
+
437
+ &[data-line-type="change-deletion"] {
438
+ --diffs-diff-line-mix-target: var(--diffs-bg-deletion-override, var(--diffs-deletion-base));
439
+ --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
440
+
441
+ &:where([data-gutter-buffer], [data-column-number]) {
442
+ color: var(--diffs-fg-number-deletion-override, var(--diffs-deletion-base));
443
+ --diffs-diff-line-mix-target: var(--diffs-bg-deletion-number-override, var(--diffs-deletion-base));
444
+ }
445
+
446
+ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
447
+ var(--diffs-computed-decoration-bg) var(--mix-light),
448
+ var(--diffs-diff-line-mix-target)), color-mix(in lab,
449
+ var(--diffs-computed-decoration-bg) var(--mix-dark),
450
+ var(--diffs-diff-line-mix-target)));
451
+ }
452
+
453
+ &[data-line-type="change-addition"] {
454
+ --diffs-diff-line-mix-target: var(--diffs-bg-addition-override, var(--diffs-addition-base));
455
+ --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
456
+
457
+ &:where([data-gutter-buffer], [data-column-number]) {
458
+ color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
459
+ --diffs-diff-line-mix-target: var(--diffs-bg-addition-number-override, var(--diffs-addition-base));
460
+ }
461
+
462
+ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
463
+ var(--diffs-computed-decoration-bg) var(--mix-light),
464
+ var(--diffs-diff-line-mix-target)), color-mix(in lab,
465
+ var(--diffs-computed-decoration-bg) var(--mix-dark),
466
+ var(--diffs-diff-line-mix-target)));
467
+ }
468
+
469
+ &[data-merge-conflict="current"] {
470
+ --diffs-diff-line-mix-target: var(--conflict-bg-current-override, var(--diffs-addition-base));
471
+ --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
472
+
473
+ &:where([data-gutter-buffer], [data-column-number]) {
474
+ color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
475
+ --diffs-diff-line-mix-target: var(--conflict-bg-current-number-override, var(--diffs-addition-base));
476
+ }
477
+
478
+ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
479
+ var(--diffs-computed-decoration-bg) var(--mix-light),
480
+ var(--diffs-diff-line-mix-target)), color-mix(in lab,
481
+ var(--diffs-computed-decoration-bg) var(--mix-dark),
482
+ var(--diffs-diff-line-mix-target)));
483
+ }
484
+
485
+ &[data-merge-conflict="incoming"] {
486
+ --diffs-diff-line-mix-target: var(--conflict-bg-incoming-override, var(--diffs-modified-base));
487
+ --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
488
+
489
+ &:where([data-gutter-buffer], [data-column-number]) {
490
+ color: var(--diffs-modified-base);
491
+ --diffs-diff-line-mix-target: var(--conflict-bg-incoming-number-override, var(--diffs-modified-base));
492
+ }
493
+
494
+ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
495
+ var(--diffs-computed-decoration-bg) var(--mix-light),
496
+ var(--diffs-diff-line-mix-target)), color-mix(in lab,
497
+ var(--diffs-computed-decoration-bg) var(--mix-dark),
498
+ var(--diffs-diff-line-mix-target)));
499
+ }
500
+ }
501
+ }
502
+
503
+ [data-gutter-buffer], [data-column-number], [data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline], [data-editor-overlay] {
504
+ --diffs-selection-mix-target: var(--diffs-bg-selection-override, var(--diffs-selection-base));
505
+ --diffs-selection-emphasis-mix-target: var(--diffs-selection-mix-target);
506
+
507
+ &:where([data-editor-overlay]), &:where([data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline])[data-selected-line] {
508
+ --mix-selection-light: 82%;
509
+ --mix-selection-dark: 75%;
510
+ --diffs-hover-mix-target: var(--diffs-selection-mix-target);
511
+ }
512
+
513
+ &:where([data-gutter-buffer][data-selected-line], [data-column-number]:is([data-selected-line], [data-editor-active-line])) {
514
+ --mix-selection-light: 75%;
515
+ --mix-selection-dark: 60%;
516
+ --diffs-selection-mix-target: var(--diffs-bg-selection-number-override, var(--diffs-selection-base));
517
+ --diffs-hover-mix-target: var(--diffs-selection-mix-target);
518
+ }
519
+
520
+ &:where([data-line][data-selected-line]):is([data-line-type="change-addition"], [data-line-type="change-deletion"]) {
521
+ --diffs-selection-emphasis-mix-target: light-dark(color-mix(in lab,
522
+ var(--diffs-diff-line-mix-target, var(--diffs-selection-mix-target))
523
+ var(--mix-selection-light),
524
+ var(--diffs-selection-mix-target)), var(--diffs-selection-mix-target));
525
+ }
526
+
527
+ &:where([data-editor-overlay]), &[data-selected-line] {
528
+ --diffs-computed-selected-line-bg: light-dark(color-mix(in lab,
529
+ var(--diffs-computed-diff-line-bg) var(--mix-selection-light),
530
+ var(--diffs-selection-mix-target)), color-mix(in lab,
531
+ var(--diffs-computed-diff-line-bg) var(--mix-selection-dark),
532
+ var(--diffs-selection-mix-target)));
533
+ }
534
+ }
535
+
536
+ [data-line][data-editor-active-line], [data-column-number][data-editor-active-line] {
537
+ --diffs-computed-editor-active-line-bg: color-mix(in lab,
538
+ var(--diffs-computed-selected-line-bg)
539
+ var(--diffs-editor-active-line-source-mix, 100%),
540
+ var(--diffs-selection-emphasis-mix-target));
541
+ }
542
+
543
+ @media (pointer: fine) {
544
+ [data-line][data-hovered], [data-gutter-buffer][data-hovered], [data-column-number][data-hovered], [data-line-annotation][data-hovered], [data-no-newline][data-hovered], [data-merge-conflict][data-hovered], [data-merge-conflict-actions][data-hovered], [data-editor-overlay][data-hovered] {
545
+ --diffs-computed-hovered-line-bg: light-dark(color-mix(in lab,
546
+ var(--diffs-computed-editor-active-line-bg) 97%,
547
+ var(--diffs-hover-mix-target)), color-mix(in lab,
548
+ var(--diffs-computed-editor-active-line-bg) 91%,
549
+ var(--diffs-hover-mix-target)));
550
+ }
551
+ }
552
+
553
+ [data-gutter-buffer][data-selected-line], [data-column-number]:is([data-selected-line], [data-editor-active-line]) {
554
+ color: var(--diffs-selection-number-fg);
555
+ }
556
+
557
+ [data-no-newline] {
558
+ user-select: none;
559
+
560
+ & span {
561
+ opacity: .6;
562
+ }
563
+ }
564
+
565
+ [data-diff-type="split"][data-overflow="scroll"] {
566
+ grid-template-columns: 1fr 1fr;
567
+ display: grid;
568
+
569
+ & [data-additions] {
570
+ border-left: 1px solid var(--diffs-bg);
571
+ }
572
+
573
+ & [data-deletions] {
574
+ border-right: 1px solid var(--diffs-bg);
575
+ }
576
+ }
577
+
578
+ [data-code] {
579
+ grid-auto-flow: dense;
580
+ grid-template-columns: var(--diffs-code-grid);
581
+ overflow: var(--diffs-overflow-override, scroll) clip;
582
+ overscroll-behavior-x: none;
583
+ tab-size: var(--diffs-tab-size, 2);
584
+ padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));
585
+ padding-bottom: max(0px,
586
+ calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) -
587
+ var(--diffs-scrollbar-gutter)));
588
+ scrollbar-gutter: stable;
589
+ align-self: flex-start;
590
+ display: grid;
591
+ }
592
+
593
+ [data-diffs-scrollbar-measure] {
594
+ opacity: 0;
595
+ pointer-events: none;
596
+ scrollbar-gutter: auto;
597
+ grid-template-columns: none;
598
+ width: 100px;
599
+ height: 100px;
600
+ padding: 0;
601
+ position: absolute;
602
+ top: -200px;
603
+ left: -200px;
604
+ }
605
+
606
+ [data-container-size] {
607
+ container-type: inline-size;
608
+ }
609
+
610
+ [data-code]::-webkit-scrollbar {
611
+ width: 0;
612
+ height: var(--diffs-scrollbar-gutter);
613
+ }
614
+
615
+ [data-code]::-webkit-scrollbar-track {
616
+ background: none;
617
+ }
618
+
619
+ [data-code]::-webkit-scrollbar-thumb {
620
+ background-color: #0000;
621
+ background-clip: content-box;
622
+ border: 1px solid #0000;
623
+ border-radius: 3px;
624
+ }
625
+
626
+ [data-code]::-webkit-scrollbar-corner {
627
+ background-color: #0000;
628
+ }
629
+
630
+ @supports ((-moz-appearance: none)) {
631
+ [data-code] {
632
+ scrollbar-width: thin;
633
+ scrollbar-color: var(--diffs-bg-context) transparent;
634
+ padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));
635
+ }
636
+ }
637
+
638
+ [data-diffs-header] ~ [data-diff], [data-diffs-header] ~ [data-file] {
639
+ & [data-code], &[data-overflow="wrap"], &[data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {
640
+ padding-top: 0;
641
+ }
642
+ }
643
+
644
+ [data-gutter] {
645
+ grid-template-rows: subgrid;
646
+ grid-template-columns: subgrid;
647
+ z-index: 3;
648
+ background-color: var(--diffs-bg);
649
+ grid-column: 1;
650
+ display: grid;
651
+ position: relative;
652
+
653
+ & [data-gutter-buffer], & [data-column-number] {
654
+ border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg));
655
+ }
656
+ }
657
+
658
+ [data-content] {
659
+ grid-template-rows: subgrid;
660
+ grid-template-columns: subgrid;
661
+ background-color: var(--diffs-bg);
662
+ grid-column: 2;
663
+ min-width: 0;
664
+ display: grid;
665
+ }
666
+
667
+ [data-diff-type="split"][data-overflow="wrap"], [data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {
668
+ grid-auto-flow: dense;
669
+ grid-template-columns: repeat(2, var(--diffs-code-grid));
670
+ padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
671
+ display: grid;
672
+
673
+ & [data-code] {
674
+ display: contents;
675
+ }
676
+
677
+ & [data-deletions] {
678
+ & [data-gutter] {
679
+ grid-column: 1;
680
+ }
681
+
682
+ & [data-content] {
683
+ border-right: 1px solid var(--diffs-bg);
684
+ grid-column: 2;
685
+ }
686
+ }
687
+
688
+ & [data-additions] {
689
+ & [data-gutter] {
690
+ border-left: 1px solid var(--diffs-bg);
691
+ grid-column: 3;
692
+ }
693
+
694
+ & [data-content] {
695
+ grid-column: 4;
696
+ }
697
+ }
698
+ }
699
+
700
+ [data-dehydrated][data-diff-type="split"][data-overflow="scroll"] [data-content] {
701
+ overflow: clip;
702
+ }
703
+
704
+ [data-overflow="scroll"] [data-gutter] {
705
+ position: sticky;
706
+ left: 0;
707
+ }
708
+
709
+ [data-interactive-lines] [data-line] {
710
+ cursor: pointer;
711
+ }
712
+
713
+ [data-interactive-line-numbers] [data-column-number] {
714
+ cursor: pointer;
715
+ touch-action: none;
716
+ }
717
+
718
+ [data-content-buffer], [data-gutter-buffer] {
719
+ user-select: none;
720
+ min-height: 1lh;
721
+ position: relative;
722
+ }
723
+
724
+ [data-gutter-buffer] {
725
+ padding-left: 2ch;
726
+ padding-right: 1ch;
727
+
728
+ &:before {
729
+ content: "";
730
+ min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
731
+ display: block;
732
+ }
733
+ }
734
+
735
+ [data-gutter-buffer="annotation"] {
736
+ --diffs-annotation-bg: var(--diffs-bg-context-gutter);
737
+ min-height: 0;
738
+ }
739
+
740
+ [data-gutter-buffer="buffer"] {
741
+ --diffs-line-bg: var(--diffs-bg-context-gutter);
742
+ }
743
+
744
+ [data-content-buffer] {
745
+ background-position: 5px 0;
746
+ background-size: 8px 8px;
747
+ background-origin: border-box;
748
+ background-image: repeating-linear-gradient(-45deg,
749
+ transparent,
750
+ transparent calc(3px * 1.414),
751
+ var(--diffs-bg-buffer) calc(3px * 1.414),
752
+ var(--diffs-bg-buffer) calc(4px * 1.414));
753
+ grid-column: 1;
754
+ }
755
+
756
+ [data-separator] {
757
+ box-sizing: content-box;
758
+ background-color: var(--diffs-bg);
759
+ }
760
+
761
+ [data-separator="simple"] {
762
+ min-height: 4px;
763
+ }
764
+
765
+ [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"], [data-separator="simple"] {
766
+ background-color: var(--diffs-bg-separator);
767
+ }
768
+
769
+ [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"] {
770
+ height: 32px;
771
+ position: relative;
772
+ }
773
+
774
+ [data-separator-wrapper] {
775
+ user-select: none;
776
+ fill: currentColor;
777
+ background-color: var(--diffs-bg);
778
+ align-items: center;
779
+ height: 100%;
780
+ display: flex;
781
+ position: absolute;
782
+ inset-inline: 0;
783
+ }
784
+
785
+ [data-content] [data-separator-wrapper] {
786
+ display: none;
787
+ }
788
+
789
+ [data-separator="metadata"] [data-separator-wrapper] {
790
+ background-color: var(--diffs-bg-separator);
791
+ height: 100%;
792
+ color: var(--diffs-fg-number);
793
+ white-space: nowrap;
794
+ text-overflow: ellipsis;
795
+ min-width: min-content;
796
+ padding-inline: 1ch;
797
+ inset-inline: 100% auto;
798
+ overflow: hidden;
799
+ }
800
+
801
+ [data-separator="line-info"] {
802
+ margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
803
+
804
+ & [data-separator-wrapper] {
805
+ min-width: 16px;
806
+ }
807
+ }
808
+
809
+ [data-separator="line-info-basic"], [data-separator="metadata"] {
810
+ margin-block: 0;
811
+ }
812
+
813
+ [data-separator="line-info"][data-separator-first] {
814
+ margin-top: 0;
815
+ }
816
+
817
+ [data-separator="line-info"][data-separator-last] {
818
+ margin-bottom: 0;
819
+ }
820
+
821
+ [data-expand-index] [data-separator-wrapper] {
822
+ grid-template-columns: 32px auto;
823
+ display: grid;
824
+ }
825
+
826
+ [data-expand-index] [data-separator-wrapper][data-separator-multi-button] {
827
+ grid-template-columns: 32px 32px auto;
828
+ }
829
+
830
+ [data-expand-button], [data-separator-content] {
831
+ background-color: var(--diffs-bg-separator);
832
+ flex: none;
833
+ align-items: center;
834
+ display: flex;
835
+ }
836
+
837
+ [data-expand-index] [data-separator-content]:hover {
838
+ cursor: pointer;
839
+ text-decoration: underline;
840
+ }
841
+
842
+ [data-expand-button] {
843
+ cursor: pointer;
844
+ min-width: 32px;
845
+ color: var(--diffs-fg-number);
846
+ border-right: 2px solid var(--diffs-bg);
847
+ flex-shrink: 0;
848
+ justify-content: center;
849
+ align-self: stretch;
850
+
851
+ &:hover {
852
+ color: var(--diffs-fg);
853
+ }
854
+
855
+ &[data-expand-all-button] {
856
+ display: none;
857
+ }
858
+ }
859
+
860
+ [data-expand-down] [data-icon] {
861
+ transform: scaleY(-1);
862
+ }
863
+
864
+ [data-separator-content] {
865
+ height: 100%;
866
+ color: var(--diffs-fg-number);
867
+ flex: auto;
868
+ justify-content: flex-start;
869
+ padding: 0 1ch;
870
+ overflow: hidden;
871
+ }
872
+
873
+ [data-separator="line-info"], [data-separator="line-info-basic"] {
874
+ & [data-separator-content] {
875
+ user-select: none;
876
+ height: 100%;
877
+ overflow: clip;
878
+ }
879
+ }
880
+
881
+ [data-unmodified-lines] {
882
+ text-overflow: ellipsis;
883
+ white-space: nowrap;
884
+ flex: 0 auto;
885
+ min-width: 0;
886
+ display: block;
887
+ overflow: hidden;
888
+ }
889
+
890
+ @supports (width: 1cqi) {
891
+ [data-unified] {
892
+ & [data-separator="line-info"] [data-separator-wrapper] {
893
+ padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback));
894
+ width: 100cqi;
895
+
896
+ & [data-separator-content] {
897
+ border-radius: 6px;
898
+ }
899
+ }
900
+
901
+ & [data-separator="line-info"][data-expand-index] [data-separator-wrapper] [data-separator-content] {
902
+ border-top-left-radius: unset;
903
+ border-bottom-left-radius: unset;
904
+ }
905
+ }
906
+
907
+ [data-gutter] {
908
+ & [data-separator="line-info"] [data-separator-wrapper] {
909
+ padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));
910
+ }
911
+
912
+ & [data-separator="line-info"] [data-separator-content] {
913
+ border-top-left-radius: 6px;
914
+ border-bottom-left-radius: 6px;
915
+ }
916
+
917
+ & [data-separator="line-info"][data-expand-index] [data-separator-content] {
918
+ border-top-left-radius: unset;
919
+ border-bottom-left-radius: unset;
920
+ }
921
+ }
922
+
923
+ [data-additions] {
924
+ & [data-content] [data-separator="line-info"] {
925
+ background-color: var(--diffs-bg);
926
+
927
+ & [data-separator-wrapper] {
928
+ display: none;
929
+ }
930
+ }
931
+
932
+ & [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
933
+ background-color: var(--diffs-bg-separator);
934
+ border-top-right-radius: 6px;
935
+ border-bottom-right-radius: 6px;
936
+ height: 100%;
937
+ display: block;
938
+
939
+ & [data-separator-content], & [data-expand-button] {
940
+ display: none;
941
+ }
942
+ }
943
+ }
944
+
945
+ [data-overflow="scroll"] [data-additions] [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
946
+ width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback)));
947
+ }
948
+
949
+ [data-overflow="wrap"] [data-additions] [data-content] [data-separator="line-info"] [data-separator-wrapper] {
950
+ background-color: var(--diffs-bg-separator);
951
+ height: 100%;
952
+ margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));
953
+ border-top-right-radius: 6px;
954
+ border-bottom-right-radius: 6px;
955
+ display: block;
956
+
957
+ & [data-separator-content], & [data-expand-button] {
958
+ display: none;
959
+ }
960
+ }
961
+
962
+ [data-separator="line-info"] [data-separator-wrapper] {
963
+ & [data-expand-both], & [data-expand-down], & [data-expand-up] {
964
+ border-top-left-radius: 6px;
965
+ border-bottom-left-radius: 6px;
966
+ }
967
+ }
968
+
969
+ @media (pointer: fine) {
970
+ [data-separator="line-info"] [data-separator-wrapper] {
971
+ &[data-separator-multi-button] {
972
+ & [data-expand-up] {
973
+ border-top-left-radius: 6px;
974
+ border-bottom-left-radius: unset;
975
+ }
976
+
977
+ & [data-expand-down] {
978
+ border-bottom-left-radius: 6px;
979
+ border-top-left-radius: unset;
980
+ }
981
+ }
982
+ }
983
+ }
984
+ }
985
+
986
+ @media (pointer: coarse) {
987
+ [data-separator="line-info-basic"] [data-separator-wrapper][data-separator-multi-button] {
988
+ grid-template-columns: 34px 34px auto;
989
+
990
+ & [data-separator-content] {
991
+ grid-column: unset;
992
+ grid-row: unset;
993
+ }
994
+ }
995
+
996
+ @supports (width: 1cqi) {
997
+ [data-separator="line-info"] [data-separator-wrapper] {
998
+ & [data-expand-both], & [data-expand-down], & [data-expand-up] {
999
+ border-top-left-radius: 6px;
1000
+ border-bottom-left-radius: 6px;
1001
+ }
1002
+
1003
+ &[data-separator-multi-button] {
1004
+ & [data-expand-up] {
1005
+ border-top-left-radius: 6px;
1006
+ border-bottom-left-radius: 6px;
1007
+ }
1008
+
1009
+ & [data-expand-down] {
1010
+ border-bottom-left-radius: unset;
1011
+ border-top-left-radius: unset;
1012
+ }
1013
+ }
1014
+ }
1015
+ }
1016
+ }
1017
+
1018
+ @media (pointer: fine) {
1019
+ [data-separator-wrapper][data-separator-multi-button] {
1020
+ grid-template-rows: 50% 50%;
1021
+ display: grid;
1022
+
1023
+ & [data-separator-content] {
1024
+ grid-area: 1 / 2 / -1;
1025
+ min-width: min-content;
1026
+ }
1027
+
1028
+ & [data-expand-button] {
1029
+ grid-column: 1;
1030
+ }
1031
+ }
1032
+
1033
+ [data-separator="line-info"] [data-separator-wrapper], [data-separator="line-info"] [data-separator-wrapper][data-separator-multi-button] {
1034
+ grid-template-columns: 34px auto;
1035
+ }
1036
+
1037
+ [data-separator="line-info-basic"][data-expand-index] [data-separator-wrapper] {
1038
+ grid-template-columns: 100% auto;
1039
+ }
1040
+
1041
+ [data-separator="line-info"], [data-separator="line-info-basic"] {
1042
+ & [data-separator-multi-button] {
1043
+ & [data-expand-up] {
1044
+ border-bottom: 1px solid var(--diffs-bg);
1045
+ border-right: 2px solid var(--diffs-bg);
1046
+ }
1047
+
1048
+ & [data-expand-down] {
1049
+ border-top: 1px solid var(--diffs-bg);
1050
+ border-right: 2px solid var(--diffs-bg);
1051
+ }
1052
+ }
1053
+ }
1054
+ }
1055
+
1056
+ [data-additions] [data-gutter] [data-separator-wrapper], [data-additions] [data-separator="line-info-basic"] [data-separator-wrapper], [data-content] [data-separator-wrapper] {
1057
+ display: none;
1058
+ }
1059
+
1060
+ [data-line-annotation] {
1061
+ min-height: var(--diffs-annotation-min-height, 0);
1062
+ z-index: 2;
1063
+ }
1064
+
1065
+ [data-merge-conflict-actions] {
1066
+ z-index: 2;
1067
+ }
1068
+
1069
+ [data-separator="custom"] {
1070
+ grid-template-columns: subgrid;
1071
+ display: grid;
1072
+ }
1073
+
1074
+ [data-line], [data-column-number], [data-no-newline] {
1075
+ padding-inline: 1ch;
1076
+ position: relative;
1077
+ }
1078
+
1079
+ [data-indicators="classic"] [data-line] {
1080
+ padding-inline-start: 2ch;
1081
+ }
1082
+
1083
+ [data-indicators="classic"] {
1084
+ & [data-line-type="change-addition"], & [data-line-type="change-deletion"] {
1085
+ &[data-no-newline], &[data-line] {
1086
+ &:before {
1087
+ user-select: none;
1088
+ width: 1ch;
1089
+ height: 1lh;
1090
+ display: inline-block;
1091
+ position: absolute;
1092
+ top: 0;
1093
+ left: 0;
1094
+ }
1095
+ }
1096
+ }
1097
+
1098
+ & [data-line-type="change-addition"] {
1099
+ &[data-line], &[data-no-newline] {
1100
+ &:before {
1101
+ content: "+";
1102
+ color: var(--diffs-addition-base);
1103
+ }
1104
+ }
1105
+ }
1106
+
1107
+ & [data-line-type="change-deletion"] {
1108
+ &[data-line], &[data-no-newline] {
1109
+ &:before {
1110
+ content: "-";
1111
+ color: var(--diffs-deletion-base);
1112
+ }
1113
+ }
1114
+ }
1115
+ }
1116
+
1117
+ [data-indicators="bars"] {
1118
+ & [data-line-type="change-deletion"], & [data-line-type="change-addition"] {
1119
+ &[data-column-number] {
1120
+ &:before {
1121
+ content: "";
1122
+ user-select: none;
1123
+ contain: strict;
1124
+ width: 4px;
1125
+ height: 100%;
1126
+ display: block;
1127
+ position: absolute;
1128
+ top: 0;
1129
+ left: 0;
1130
+ }
1131
+ }
1132
+ }
1133
+
1134
+ & [data-line-type="change-deletion"] {
1135
+ &[data-column-number] {
1136
+ &:before {
1137
+ background-image: linear-gradient(0deg,
1138
+ var(--diffs-bg-deletion) 50%,
1139
+ var(--diffs-deletion-base) 50%);
1140
+ background-repeat: repeat;
1141
+ background-size: 2px 2px;
1142
+ background-size: calc(1lh / round(1lh / 2px))
1143
+ calc(1lh / round(1lh / 2px));
1144
+ }
1145
+ }
1146
+ }
1147
+
1148
+ & [data-line-type="change-addition"] {
1149
+ &[data-column-number] {
1150
+ &:before {
1151
+ background-color: var(--diffs-addition-base);
1152
+ }
1153
+ }
1154
+ }
1155
+ }
1156
+
1157
+ [data-overflow="wrap"] {
1158
+ & [data-line] {
1159
+ white-space: pre-wrap;
1160
+ word-break: break-word;
1161
+ }
1162
+
1163
+ & [data-annotation-content] {
1164
+ word-break: break-word;
1165
+ }
1166
+ }
1167
+
1168
+ [data-overflow="scroll"] [data-line] {
1169
+ white-space: pre;
1170
+ min-height: 1lh;
1171
+ }
1172
+
1173
+ [data-column-number] {
1174
+ box-sizing: content-box;
1175
+ text-align: right;
1176
+ user-select: none;
1177
+ color: var(--diffs-fg-number);
1178
+ padding-left: 2ch;
1179
+ }
1180
+
1181
+ [data-line-number-content] {
1182
+ min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
1183
+ z-index: 1;
1184
+ display: inline-block;
1185
+ position: relative;
1186
+ }
1187
+
1188
+ [data-disable-line-numbers] {
1189
+ & [data-gutter-buffer], & [data-column-number] {
1190
+ min-width: 4px;
1191
+ padding: 0;
1192
+
1193
+ &:before {
1194
+ min-width: 0;
1195
+ }
1196
+ }
1197
+
1198
+ & [data-line-number-content] {
1199
+ display: none;
1200
+ }
1201
+
1202
+ & [data-gutter-utility-slot] {
1203
+ right: unset;
1204
+ justify-content: flex-start;
1205
+ left: 0;
1206
+ }
1207
+
1208
+ &[data-indicators="bars"] [data-gutter-utility-slot] {
1209
+ left: 6px;
1210
+ }
1211
+ }
1212
+
1213
+ [data-file][data-disable-line-numbers] {
1214
+ & [data-gutter-buffer], & [data-column-number] {
1215
+ border-right: 0;
1216
+ min-width: 0;
1217
+ }
1218
+ }
1219
+
1220
+ [data-diff-span] {
1221
+ box-decoration-break: clone;
1222
+ border-radius: 3px;
1223
+ }
1224
+
1225
+ [data-line-type="change-addition"] [data-diff-span] {
1226
+ background-color: var(--diffs-bg-addition-emphasis);
1227
+ }
1228
+
1229
+ [data-line-type="change-deletion"] [data-diff-span] {
1230
+ background-color: var(--diffs-bg-deletion-emphasis);
1231
+ }
1232
+
1233
+ [data-merge-conflict="marker-start"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"], [data-merge-conflict="marker-end"] {
1234
+ color: var(--diffs-fg);
1235
+ padding-left: 1ch;
1236
+ }
1237
+
1238
+ [data-merge-conflict="marker-start"], [data-merge-conflict="marker-end"] {
1239
+ align-items: center;
1240
+ display: flex;
1241
+
1242
+ &:after {
1243
+ color: var(--diffs-fg-conflict-marker);
1244
+ font-size: .75rem;
1245
+ font-style: normal;
1246
+ line-height: 1.25rem;
1247
+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
1248
+ padding-left: 1ch;
1249
+ }
1250
+ }
1251
+
1252
+ [data-merge-conflict="marker-start"]:after {
1253
+ content: "(Current Change)";
1254
+ }
1255
+
1256
+ [data-merge-conflict="marker-end"]:after {
1257
+ content: "(Incoming Change)";
1258
+ }
1259
+
1260
+ [data-merge-conflict-actions-content] {
1261
+ min-height: 1.75rem;
1262
+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
1263
+ color: var(--diffs-fg);
1264
+ align-items: center;
1265
+ gap: .25rem;
1266
+ padding-inline: .5rem;
1267
+ font-size: .75rem;
1268
+ line-height: 1.2;
1269
+ display: flex;
1270
+ }
1271
+
1272
+ [data-merge-conflict-action] {
1273
+ appearance: none;
1274
+ color: var(--diffs-fg-number);
1275
+ font: inherit;
1276
+ cursor: pointer;
1277
+ background: none;
1278
+ border: 0;
1279
+ padding: 0;
1280
+ font-style: normal;
1281
+ }
1282
+
1283
+ [data-merge-conflict-action]:hover {
1284
+ color: var(--diffs-fg);
1285
+ }
1286
+
1287
+ [data-merge-conflict-action="current"]:hover {
1288
+ color: var(--diffs-addition-base);
1289
+ }
1290
+
1291
+ [data-merge-conflict-action="incoming"]:hover {
1292
+ color: var(--diffs-modified-base);
1293
+ }
1294
+
1295
+ [data-merge-conflict-action-separator] {
1296
+ color: var(--diffs-fg-number);
1297
+ opacity: .6;
1298
+ user-select: none;
1299
+ }
1300
+
1301
+ [data-diffs-header="default"] {
1302
+ background-color: var(--diffs-bg);
1303
+ justify-content: space-between;
1304
+ align-items: center;
1305
+ gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1306
+ min-height: calc(1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3));
1307
+ z-index: 2;
1308
+ flex-direction: row;
1309
+ padding-inline: 16px;
1310
+ display: flex;
1311
+ position: relative;
1312
+ top: 0;
1313
+ }
1314
+
1315
+ [data-header-content] {
1316
+ align-items: center;
1317
+ gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1318
+ white-space: nowrap;
1319
+ flex-direction: row;
1320
+ min-width: 0;
1321
+ display: flex;
1322
+ }
1323
+
1324
+ [data-header-content] [data-prev-name], [data-header-content] [data-title] {
1325
+ text-overflow: ellipsis;
1326
+ white-space: nowrap;
1327
+ direction: rtl;
1328
+ min-width: 0;
1329
+ overflow: hidden;
1330
+ }
1331
+
1332
+ [data-prev-name] {
1333
+ opacity: .7;
1334
+ }
1335
+
1336
+ [data-rename-icon] {
1337
+ fill: currentColor;
1338
+ flex-grow: 0;
1339
+ flex-shrink: 0;
1340
+ }
1341
+
1342
+ [data-diffs-header="default"] [data-metadata] {
1343
+ white-space: nowrap;
1344
+ align-items: center;
1345
+ gap: 1ch;
1346
+ display: flex;
1347
+ }
1348
+
1349
+ [data-diffs-header="default"] [data-additions-count] {
1350
+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));
1351
+ color: var(--diffs-addition-base);
1352
+ }
1353
+
1354
+ [data-diffs-header="default"] [data-deletions-count] {
1355
+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));
1356
+ color: var(--diffs-deletion-base);
1357
+ }
1358
+
1359
+ [data-change-icon] {
1360
+ fill: currentColor;
1361
+ flex-shrink: 0;
1362
+ }
1363
+
1364
+ [data-change-icon="change"], [data-change-icon="rename-pure"], [data-change-icon="rename-changed"] {
1365
+ color: var(--diffs-modified-base);
1366
+ }
1367
+
1368
+ [data-change-icon="new"] {
1369
+ color: var(--diffs-addition-base);
1370
+ }
1371
+
1372
+ [data-change-icon="deleted"] {
1373
+ color: var(--diffs-deletion-base);
1374
+ }
1375
+
1376
+ [data-change-icon="file"] {
1377
+ opacity: .6;
1378
+ }
1379
+
1380
+ [data-annotation-content] {
1381
+ z-index: 2;
1382
+ isolation: isolate;
1383
+ white-space: normal;
1384
+ align-self: flex-start;
1385
+ min-width: 0;
1386
+ display: flow-root;
1387
+ position: relative;
1388
+ }
1389
+
1390
+ [data-overflow="scroll"] [data-annotation-content], [data-overflow="scroll"] [data-merge-conflict-actions-content] {
1391
+ width: var(--diffs-column-content-width, auto);
1392
+ left: var(--diffs-column-number-width, 0);
1393
+ position: sticky;
1394
+ }
1395
+
1396
+ [data-annotation-slot] {
1397
+ text-wrap-mode: wrap;
1398
+ word-break: normal;
1399
+ white-space-collapse: collapse;
1400
+ }
1401
+
1402
+ [data-gutter-utility-slot] {
1403
+ touch-action: none;
1404
+ justify-content: flex-end;
1405
+ display: flex;
1406
+ position: absolute;
1407
+ top: 0;
1408
+ bottom: 0;
1409
+ right: 0;
1410
+ }
1411
+
1412
+ [data-utility-button] {
1413
+ appearance: none;
1414
+ cursor: pointer;
1415
+ width: 1lh;
1416
+ height: 1lh;
1417
+ font-size: var(--diffs-font-size, 13px);
1418
+ line-height: var(--diffs-line-height, 20px);
1419
+ background-color: var(--diffs-modified-base);
1420
+ color: var(--diffs-bg);
1421
+ fill: currentColor;
1422
+ z-index: 4;
1423
+ touch-action: none;
1424
+ border: none;
1425
+ border-radius: 4px;
1426
+ justify-content: center;
1427
+ align-items: center;
1428
+ margin-right: calc(-1lh + 1ch);
1429
+ padding: 0;
1430
+ display: flex;
1431
+ position: relative;
1432
+
1433
+ &:before {
1434
+ content: "";
1435
+ display: block;
1436
+ position: absolute;
1437
+ inset: 0 0 0 -4px;
1438
+ }
1439
+ }
1440
+
1441
+ [data-decoration-bar-stack] {
1442
+ pointer-events: none;
1443
+ isolation: isolate;
1444
+ z-index: 1;
1445
+ background-color: var(--diffs-decoration-bar-color, transparent);
1446
+ box-sizing: content-box;
1447
+ border-left: 2px solid var(--diffs-bg);
1448
+ border-right: 2px solid var(--diffs-bg);
1449
+ width: 6px;
1450
+ position: absolute;
1451
+ top: 0;
1452
+ bottom: 0;
1453
+ right: -2px;
1454
+
1455
+ [data-decoration-bar-depth="1"] & {
1456
+ background-color: color-mix(in lab,
1457
+ var(--diffs-bg) 20%,
1458
+ var(--diffs-decoration-bar-color, transparent));
1459
+ }
1460
+
1461
+ [data-decoration-bar-depth="2"] & {
1462
+ background-color: color-mix(in lab,
1463
+ var(--diffs-bg) 45%,
1464
+ var(--diffs-decoration-bar-color, transparent));
1465
+ }
1466
+
1467
+ [data-decoration-bar-depth="3"] & {
1468
+ background-color: color-mix(in lab,
1469
+ var(--diffs-bg) 65%,
1470
+ var(--diffs-decoration-bar-color, transparent));
1471
+ }
1472
+
1473
+ [data-decoration-bar-start] & {
1474
+ border-top-left-radius: 5px;
1475
+ border-top-right-radius: 5px;
1476
+ }
1477
+
1478
+ [data-decoration-bar-end] & {
1479
+ z-index: 3;
1480
+ border-bottom-right-radius: 5px;
1481
+ border-bottom-left-radius: 5px;
1482
+ }
1483
+ }
1484
+
1485
+ [data-placeholder] {
1486
+ contain: strict;
1487
+ }
1488
+
1489
+ [data-error-wrapper] {
1490
+ padding: var(--diffs-gap-block, var(--diffs-gap-fallback))
1491
+ var(--diffs-gap-inline, var(--diffs-gap-fallback));
1492
+ scrollbar-width: none;
1493
+ max-height: 400px;
1494
+ overflow: auto;
1495
+
1496
+ & [data-error-message] {
1497
+ color: var(--diffs-deletion-base);
1498
+ font-size: 18px;
1499
+ font-weight: bold;
1500
+ }
1501
+
1502
+ & [data-error-stack] {
1503
+ color: var(--diffs-fg-number);
1504
+ }
1505
+ }
1506
+ }
1507
+
1508
+ @layer theme, rendered, unsafe;
1509
+ `,Ex;function Dx(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});return Ex??=(()=>{let e=new CSSStyleSheet;return e.replaceSync(Tx),e})(),t.adoptedStyleSheets.includes(Ex)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,Ex]),t}function Ox(e,t){return e.reviewed.has(t.sha)?`reviewed`:e.changedSinceReviewed.has(t.path)?`changed`:`unreviewed`}var kx=A({__name:`ReviewCheckbox`,props:{status:{},ariaLabel:{}},emits:[`update`],setup(e,{emit:t}){let n=e,i=t,a=C(()=>n.status===`reviewed`||n.status!==`unreviewed`&&`indeterminate`),o=C(()=>n.status===`changed`?`data-[state=indeterminate]:border-orange-500 data-[state=indeterminate]:bg-orange-500 focus-visible:ring-orange-500/40`:`data-[state=checked]:border-primary-500 data-[state=indeterminate]:border-primary-500 data-[state=checked]:bg-primary-500 data-[state=indeterminate]:bg-primary-500 focus-visible:ring-primary-500/40`);return(t,n)=>(N(),x(r(Je),{class:y([`h-4 w-4 flex shrink-0 items-center justify-center border border-base rounded bg-raised outline-none transition focus-visible:ring-2`,o.value]),"model-value":a.value,"aria-label":e.ariaLabel,"onUpdate:modelValue":n[0]||=e=>i(`update`,e===!0)},{default:M(()=>[_(r(Le),{class:`text-white`},{default:M(()=>[l(`div`,{class:y([a.value===`indeterminate`?`i-ph:minus-bold`:`i-ph:check-bold`,`mt--1px text-micro`]),"aria-hidden":`true`},null,2)]),_:1})]),_:1},8,[`class`,`model-value`,`aria-label`]))}}),Ax={class:`flex flex-col gap-1.5 px-3 py-2 text-sm`},jx={class:`flex items-center gap-2`},Mx={class:`font-medium`},Nx={key:0,class:`flex flex-col gap-2`},Px={class:`flex justify-end gap-2`},Fx=A({__name:`ReviewCommentCard`,props:{comment:{},isViewer:{type:Boolean},busy:{type:Boolean}},emits:[`edit`,`delete`],setup(e,{emit:t}){let n=e,i=t,o=S(!1),c=S(``);function u(){c.value=n.comment.body,o.value=!0}function d(){c.value.trim()&&(i(`edit`,c.value),o.value=!1)}return(t,n)=>(N(),s(`article`,Ax,[l(`header`,jx,[e.comment.author?(N(),x(Pt,{key:0,login:e.comment.author.login,"avatar-url":e.comment.author.avatarUrl,size:18},null,8,[`login`,`avatar-url`])):E(``,!0),l(`span`,Mx,a(e.comment.author?.login??`ghost`),1),_(ze,{date:e.comment.createdAt,class:`text-xs op-fade`},null,8,[`date`]),e.comment.pending?(N(),x(Oe,{key:1,text:t.$t(`review.pending`),class:`text-xs text-amber-700 dark:text-amber-400`},null,8,[`text`])):E(``,!0),n[3]||=l(`div`,{class:`flex-auto`},null,-1),e.isViewer&&!o.value?(N(),s(j,{key:2},[_(ye,{compact:``,icon:`i-ph:pencil-simple-duotone`,label:t.$t(`review.editComment`),disabled:e.busy,onClick:u},null,8,[`label`,`disabled`]),_(ye,{compact:``,icon:`i-ph:trash-duotone`,label:t.$t(`review.deleteComment`),disabled:e.busy,onClick:n[0]||=e=>i(`delete`)},null,8,[`label`,`disabled`])],64)):E(``,!0)]),o.value?(N(),s(`div`,Nx,[_(gx,{modelValue:c.value,"onUpdate:modelValue":n[1]||=e=>c.value=e,rows:3,disabled:e.busy,onKeydown:[he(ge(d,[`meta`]),[`enter`]),he(ge(d,[`ctrl`]),[`enter`])]},null,8,[`modelValue`,`disabled`,`onKeydown`]),l(`div`,Px,[_(P,{size:`sm`,variant:`text`,disabled:e.busy,onClick:n[2]||=e=>o.value=!1},{default:M(()=>[D(a(t.$t(`common.cancel`)),1)]),_:1},8,[`disabled`]),_(P,{size:`sm`,variant:`primary`,disabled:e.busy||!c.value.trim(),onClick:d},{default:M(()=>[D(a(t.$t(`common.save`)),1)]),_:1},8,[`disabled`])])])):(N(),x(g,{key:1},{default:M(()=>[_(r(sp),{value:e.comment.body,class:`review-comment-markdown text-sm`},null,8,[`value`])]),_:1}))]))}}),Ix={class:`my-1 max-w-200 overflow-hidden border border-base rounded-lg bg-base text-left font-sans`},Lx={class:`divide-y divide-#9992`},Rx={key:0,class:`px-3 pb-1 text-xs text-red-600 dark:text-red-400`},zx={key:1,class:`flex flex-col gap-2 border-t border-base bg-raised px-2 py-1.5`},Bx={class:`flex justify-end gap-2`},Vx={key:1,class:`flex items-center gap-2`},Hx={key:1,class:`flex-1`},Ux=A({__name:`ReviewThreadCard`,props:{thread:{},reviews:{}},setup(e){let t=e,n=S(!1),r=S(),i=S(!1),o=S(``),u=C(()=>t.reviews.canWrite),d=C(()=>u.value&&!!t.thread.threadId&&!t.thread.pending);async function f(e){n.value=!0,r.value=void 0;try{await e()}catch(e){r.value=e instanceof Error?e.message:String(e)}finally{n.value=!1}}async function p(){let e=o.value;e.trim()&&await f(async()=>{await t.reviews.reply(t.thread.rootId,e),o.value=``,i.value=!1})}return(t,m)=>(N(),s(`div`,Ix,[l(`div`,Lx,[(N(!0),s(j,null,c(e.thread.comments,t=>(N(),x(Fx,{key:t.id,comment:t,"is-viewer":!!t.author&&t.author.login===e.reviews.viewerLogin,busy:n.value,onEdit:n=>f(()=>e.reviews.editComment(t.id,n)),onDelete:n=>f(()=>e.reviews.deleteComment(t.id))},null,8,[`comment`,`is-viewer`,`busy`,`onEdit`,`onDelete`]))),128))]),r.value?(N(),s(`p`,Rx,a(r.value),1)):E(``,!0),u.value?(N(),s(`footer`,zx,[i.value?(N(),s(j,{key:0},[_(gx,{modelValue:o.value,"onUpdate:modelValue":m[0]||=e=>o.value=e,rows:2,placeholder:t.$t(`review.replyPlaceholder`),disabled:n.value,onKeydown:[he(ge(p,[`meta`]),[`enter`]),he(ge(p,[`ctrl`]),[`enter`])]},null,8,[`modelValue`,`placeholder`,`disabled`,`onKeydown`]),l(`div`,Bx,[_(P,{size:`sm`,variant:`text`,disabled:n.value,onClick:m[1]||=e=>i.value=!1},{default:M(()=>[D(a(t.$t(`common.cancel`)),1)]),_:1},8,[`disabled`]),_(P,{size:`sm`,variant:`primary`,loading:n.value,disabled:!o.value.trim(),onClick:p},{default:M(()=>[D(a(t.$t(`common.reply`)),1)]),_:1},8,[`loading`,`disabled`])])],64)):(N(),s(`div`,Vx,[e.thread.pending?(N(),s(`div`,Hx)):(N(),s(`button`,{key:0,type:`button`,class:`flex-1 border border-base rounded bg-base px-2 py-1 text-left text-sm color-base op-fade hover:op-100`,onClick:m[2]||=e=>i.value=!0},a(t.$t(`review.replyPlaceholder`)),1)),d.value?(N(),x(P,{key:2,size:`sm`,disabled:n.value,icon:`i-ph:check-circle-duotone`,onClick:m[3]||=t=>f(()=>e.reviews.resolveThread(e.thread.threadId))},{default:M(()=>[D(a(t.$t(`review.resolve`)),1)]),_:1},8,[`disabled`])):E(``,!0)]))])):E(``,!0)]))}}),Wx=[`id`],Gx={class:`min-w-0 flex items-center gap-2 text-sm`},Kx={class:`flex shrink-0 items-center gap-2`},qx={key:0,class:`text-xs op-fade`},Jx={key:2,class:`text-xs op-fade`},Yx=[`title`],Xx={key:0,class:`overflow-hidden border-x border-b border-base rounded-b-xl`},Zx={key:0,class:`flex flex-wrap items-center justify-between gap-2 border-b border-orange:20 bg-orange:10 px-3 py-1.5 text-sm text-orange-700 dark:text-orange-400`},Qx={class:`flex items-center gap-1.5`},$x={key:1,class:`p-4 text-sm op-fade`},eS={key:2,class:`p-4 text-sm op-fade`},tS=[`slot`],nS={key:0,class:`my-1 max-w-200 overflow-hidden border border-base rounded-lg bg-base`},rS=640,iS=A({__name:`FileDiff`,props:{store:{},file:{}},setup(e,{expose:t}){let n=e,r=C(()=>Ox(n.store,n.file)),i=C(()=>r.value===`reviewed`),u=me(Pe,nt),d=me(Pb,void 0),f=ce(`container`),p=S(i.value||wx(n.file.path)),m;function g(e){let t=e.previousPath??e.path,n=e.path,r=[`diff --git a/${t} b/${n}`];e.status===`added`?r.push(`new file mode 100644`):e.status===`removed`?r.push(`deleted file mode 100644`):e.status===`renamed`?r.push(`rename from ${t}`,`rename to ${n}`):e.status===`copied`&&r.push(`copy from ${t}`,`copy to ${n}`),r.push(`--- ${e.status===`added`?`/dev/null`:`a/${t}`}`),r.push(`+++ ${e.status===`removed`?`/dev/null`:`b/${n}`}`);for(let t of e.hunks)r.push(t.header,t.patch);return r.join(`
1510
+ `)}let v=S(),b=S(),w=S(!1),T=S(),ee=C(()=>v.value!==void 0||b.value!==void 0),O=C(()=>!!n.store.fileContent&&!n.file.isBinary&&!ee.value);async function te(){let{fileContent:e}=n.store;if(!(!e||w.value||ee.value)){w.value=!0,T.value=void 0;try{let t=await e.load(n.file);v.value=t.old,b.value=t.new}catch(e){T.value=e instanceof Error?e:Error(String(e))}finally{w.value=!1}}}function ne(e){for(let t of e.composedPath()){if(!(t instanceof HTMLElement)||!t.hasAttribute(`data-expand-button`)&&!t.hasAttribute(`data-unmodified-lines`))continue;let n=Number(t.getAttribute(`data-expand-index`));if(Number.isNaN(n))return;let r=t.hasAttribute(`data-expand-up`)?`up`:t.hasAttribute(`data-expand-down`)?`down`:`both`;return{index:n,direction:t.hasAttribute(`data-expand-all-button`)||e.shiftKey?`both`:r}}}async function re(e){if(!O.value)return;let t=ne(e);t&&(await te(),ee.value&&(await o(),m?.expandHunk(t.index,t.direction,t.direction===`both`?1/0:void 0)))}let k=C(()=>{if(p.value||n.file.isBinary)return;let e=n.file.previousPath??n.file.path;return jg(g(n.file),ee.value?{oldFile:v.value===void 0?void 0:{name:e,contents:v.value},newFile:b.value===void 0?void 0:{name:n.file.path,contents:b.value}}:void 0)}),A=S(0),ie;de(f,(e,t)=>{t&&ie?.unobserve(t),e&&(ie??=new ResizeObserver(e=>{A.value=e[0]?.contentRect.width??0}),ie.observe(e))},{immediate:!0}),oe(()=>ie?.disconnect());let ae=C(()=>n.store.reviews),se=C(()=>{let e=ae.value;return e?e.threads.filter(t=>t.path===n.file.path&&t.line!==void 0&&!t.outdated&&t.resolved!==!0&&(e.showThreads||t.pending)):[]}),le=C(()=>ae.value?.threads.filter(e=>e.path===n.file.path&&e.resolved===!0).length??0),ue=S(),fe=S(!1),pe=S(),he=C(()=>{let e=new Map;function t(t,n){let r=`${t}-${n}`,i=e.get(r);return i||(i={side:t,line:n,threads:[],hasDraft:!1},e.set(r,i)),i}for(let e of se.value)t(e.side,e.line).threads.push(e);return ue.value&&(t(ue.value.side,ue.value.line).hasDraft=!0),[...e.values()]}),_e=C(()=>he.value.map(e=>({side:e.side,lineNumber:e.line}))),ve=C(()=>(ae.value?.canWrite??!1)&&!n.file.isBinary);function be(e){let t=e.endSide??e.side??`additions`,r=Math.max(e.start,e.end),i=Math.min(e.start,e.end);ue.value={path:n.file.path,side:t,line:r,...i<r?{startLine:i,startSide:e.side??t}:{}},pe.value=void 0}async function xe(e,t){let n=ue.value,r=ae.value;if(n&&r){fe.value=!0,pe.value=void 0;try{await r.addComment(n,e,t),ue.value=void 0}catch(e){pe.value=e instanceof Error?e.message:String(e)}finally{fe.value=!1}}}let Se=C(()=>n.file.additions===0||n.file.deletions===0),Ce=C(()=>n.store.ui.layout===`unified`||Se.value||A.value>0&&A.value<rS?`unified`:n.store.ui.layout),we=C(()=>({diffStyle:Ce.value,theme:{...Ue.value},themeType:u.value?`dark`:`light`,disableErrorHandling:!1,disableFileHeader:!0,...ve.value?{enableGutterUtility:!0,enableLineSelection:!0,onGutterUtilityClick:be}:{}}));function Te(){m?.cleanUp(),f.value&&!n.file.isBinary&&!p.value&&k.value&&(Dx(f.value).addEventListener(`click`,re),m=d?new Gy(we.value,d,void 0,void 0,!0):new jy(we.value,void 0,!0),m.render({fileDiff:k.value,fileContainer:f.value,lineAnnotations:_e.value.map(e=>({...e}))}))}return h(Te),oe(()=>m?.cleanUp()),de(p,()=>Te(),{flush:`post`}),de(we,e=>{m?.setOptions(e),m?.rerender()}),de([k,f],([e,t])=>{e&&t&&m?.render({fileDiff:e,fileContainer:t,lineAnnotations:_e.value.map(e=>({...e}))})}),de(_e,e=>{m?.setLineAnnotations(e.map(e=>({...e}))),m?.rerender()}),de(i,e=>{p.value=e}),t({expand:()=>{p.value=!1}}),(t,n)=>(N(),s(j,null,[l(`header`,{id:`file-${e.file.sha}`,class:y([`relative sticky top-[calc(var(--diffs-header-height)-1px)] z-file-diff-header mt-2 flex items-center justify-between gap-2 overflow-hidden border border-base bg-base px-2 py-1.5`,p.value?`rounded-lg`:`rounded-t-lg`]),role:`button`,onClick:n[2]||=ge(e=>p.value=!p.value,[`self`])},[l(`div`,Gx,[_(kx,{status:r.value,"aria-label":t.$t(`file.markReviewed`),onUpdate:n[0]||=t=>e.store.setReviewed([e.file.sha],t)},null,8,[`status`,`aria-label`]),_(mx,{path:e.file.path,class:`min-w-0`},null,8,[`path`])]),l(`div`,Kx,[le.value?(N(),s(`span`,qx,a(t.$t(`file.resolved`,{n:le.value})),1)):E(``,!0),e.file.isBinary?(N(),s(`span`,Jx,a(t.$t(`file.binary`)),1)):(N(),x(Nt,{key:1,additions:e.file.additions,deletions:e.file.deletions},null,8,[`additions`,`deletions`])),_(Sx,{status:e.file.status},null,8,[`status`]),T.value?(N(),s(`span`,{key:3,class:`text-xs text-red-500`,title:T.value.message},a(t.$t(`file.loadFailed`)),9,Yx)):E(``,!0),O.value||w.value?(N(),x(ye,{key:4,compact:``,icon:w.value?`i-ph:spinner-duotone animate-spin`:`i-ph:file-text-duotone`,disabled:w.value,label:t.$t(`file.loadFull`),tooltip:t.$t(`file.loadFull`),onClick:te},null,8,[`icon`,`disabled`,`label`,`tooltip`])):E(``,!0),_(ye,{compact:``,icon:p.value?`i-ph:caret-right`:`i-ph:caret-down`,label:t.$t(p.value?`file.expand`:`file.collapse`),onClick:n[1]||=e=>p.value=!p.value},null,8,[`icon`,`label`])])],10,Wx),p.value?E(``,!0):(N(),s(`div`,Xx,[r.value===`changed`?(N(),s(`div`,Zx,[l(`span`,Qx,[n[5]||=l(`span`,{class:`i-ph:warning-circle-duotone shrink-0`,"aria-hidden":`true`},null,-1),D(` `+a(t.$t(`file.changedSinceReviewed`)),1)]),_(P,{size:`sm`,onClick:n[3]||=t=>e.store.setReviewed([e.file.sha],!0)},{default:M(()=>[D(a(t.$t(`file.markReviewed`)),1)]),_:1})])):E(``,!0),e.file.isBinary?(N(),s(`div`,$x,a(t.$t(`file.binaryNotShown`)),1)):e.file.truncated&&!ee.value?(N(),s(`div`,eS,a(t.$t(`file.tooLarge`)),1)):(N(),s(`div`,{key:3,ref:`container`,class:y(r.value===`changed`?`mb--2`:`my--2`)},[(N(!0),s(j,null,c(he.value,t=>(N(),s(`div`,{key:`${t.side}-${t.line}`,slot:`annotation-${t.side}-${t.line}`,"data-annotation-slot":``,class:`whitespace-normal px-2 text-left font-sans`},[(N(!0),s(j,null,c(t.threads,t=>(N(),x(Ux,{key:t.rootId,thread:t,reviews:e.store.reviews},null,8,[`thread`,`reviews`]))),128)),t.hasDraft?(N(),s(`div`,nS,[_(bx,{"has-pending-review":!!e.store.reviews.pendingReview,busy:fe.value,error:pe.value,onSubmit:xe,onCancel:n[4]||=e=>ue.value=void 0},null,8,[`has-pending-review`,`busy`,`error`])])):E(``,!0)],8,tS))),128))],2))]))],64))}}),aS={ref:`scrollEl`,class:`overflow-auto`},oS={class:`truncate op-fade`},sS=[`title`,`onClick`],cS=[`title`],lS={class:`shrink-0 text-xs`},uS=A({__name:`FileTree`,props:{store:{},files:{},missing:{},filesVisible:{}},emits:[`navigate`],setup(e,{emit:t}){let n=e,i=t,o=C(()=>{let e={name:``,children:new Map},t=[...n.files.map(e=>({path:e.path,file:e})),...(n.missing??[]).map(e=>({path:e,file:void 0}))].sort((e,t)=>e.path.localeCompare(t.path));for(let{path:n,file:r}of t){let t=n.split(`/`),i=e;for(let e=0;e<t.length-1;e++){let n=t[e],r=i.children.get(n);r||(r={name:n,children:new Map},i.children.set(n,r)),i=r}i.children.set(`\0file:${n}`,{name:t[t.length-1],children:new Map,file:r,missing:!r})}function r(e){let t=[];for(let n of e.children.values())t.push(...n.file?[n.file]:r(n));return t}let i=[];function a(e,t,n){for(let[o,s]of e.children){if(s.file){i.push({key:`file:${s.file.path}`,depth:t,type:`file`,name:s.name,file:s.file});continue}if(s.missing){i.push({key:`missing:${n}${s.name}`,depth:t,type:`missing`,name:s.name});continue}let e=s.name,c=s,l=`${n}${o}/`;for(;c.children.size===1;){let[t,n]=[...c.children.entries()][0];if(n.file||n.missing)break;e+=`/${n.name}`,c=n,l+=`${t}/`}i.push({key:`folder:${l}`,depth:t,type:`folder`,name:e,files:r(c)}),a(c,t+1,l)}}return a(e,0,``),i});function u(e){let t=e.filter(e=>n.store.reviewed.has(e.sha)).length;return t===0?`unreviewed`:t===e.length?`reviewed`:`partial`}let d=ce(`scrollEl`),f=dt(C(()=>({count:o.value.length,getScrollElement:()=>d.value,estimateSize:()=>24,overscan:10})));return(t,n)=>(N(),s(`div`,aS,[l(`div`,{style:b({height:`${r(f).getTotalSize()}px`,position:`relative`})},[(N(!0),s(j,null,c(r(f).getVirtualItems().map(e=>({item:e,row:o.value[e.index]})),o=>(N(),s(`div`,{key:o.row.key,class:y([`flex items-center gap-1.5 rounded text-sm`,o.row.file&&e.filesVisible.includes(o.row.file.sha)?`bg-active`:``]),style:b({position:`absolute`,top:0,left:0,width:`100%`,height:`${o.item.size}px`,transform:`translateY(${o.item.start}px)`,paddingLeft:`${.5+o.row.depth}em`})},[o.row.type===`folder`?(N(),s(j,{key:0},[_(kx,{status:u(o.row.files),"aria-label":t.$t(`file.markFolderReviewed`,{name:o.row.name}),onUpdate:t=>e.store.setReviewed(o.row.files.map(e=>e.sha),t)},null,8,[`status`,`aria-label`,`onUpdate`]),_(jt,{directory:``,path:o.row.name,class:`op-fade`},null,8,[`path`]),l(`span`,oS,a(o.row.name),1)],64)):o.row.file?(N(),s(j,{key:1},[_(kx,{status:r(Ox)(e.store,o.row.file),"aria-label":t.$t(`file.markReviewed`),onUpdate:t=>e.store.setReviewed([o.row.file.sha],t)},null,8,[`status`,`aria-label`,`onUpdate`]),l(`button`,{type:`button`,class:`min-w-0 flex flex-1 items-center gap-1.5 text-left`,title:r(Ox)(e.store,o.row.file)===`changed`?t.$t(`file.changedSinceReviewed`):void 0,onClick:e=>i(`navigate`,o.row.file.sha)},[_(mx,{path:o.row.name,dim:!1,class:`min-w-0 flex-1`},null,8,[`path`]),_(Nt,{additions:o.row.file.additions,deletions:o.row.file.deletions},null,8,[`additions`,`deletions`]),_(Sx,{status:o.row.file.status},null,8,[`status`])],8,sS)],64)):o.row.type===`missing`?(N(),s(j,{key:2},[n[0]||=l(`span`,{class:`w-4 shrink-0`,"aria-hidden":`true`},null,-1),l(`span`,{class:`min-w-0 flex flex-1 items-center gap-1.5 op-50`,title:t.$t(`file.noLongerInDiff`)},[_(mx,{path:o.row.name,dim:!1,class:`min-w-0 flex-1 line-through`},null,8,[`path`]),l(`span`,lS,a(t.$t(`file.removed`)),1)],8,cS)],64)):E(``,!0)],6))),128))],4)],512))}}),dS=[`id`],fS={key:0,class:`flex flex-col gap-2 border-b border-base p-3`},pS={class:`w-full flex items-center`},mS=[`aria-expanded`],hS={class:`min-w-0 flex flex-1 flex-col gap-1.5`},gS={class:`flex items-center gap-2 leading-1em`},_S=[`title`],vS={class:`flex items-center gap-2 leading-1em`},yS={class:`text-xs op-fade`},bS={class:`text-xs op-fade`},xS={key:0,class:`flex shrink-0 items-center gap-1 px-2`},SS={key:1,class:`flex flex-col gap-4 p-3 lg:grid lg:grid-cols-[1fr_4fr]`},CS={class:`top-[calc(var(--diffs-header-height)+10px)] min-w-70 flex shrink-0 flex-col gap-3 lg:sticky lg:max-h-[calc(100vh-var(--diffs-header-height)-20px)] lg:self-start`},wS={key:0,class:`w-full flex flex-col bg-base`},TS={class:`w-full flex items-center`},ES=[`aria-expanded`],DS={class:`min-w-0 flex-1`},OS={class:`flex items-center gap-2 leading-1em`},kS=[`title`],AS=[`title`],jS={class:`flex items-center gap-2 leading-1em`},MS={class:`text-xs op-fade`},NS={key:0,class:`flex shrink-0 items-center gap-1 px-2`},PS={class:`min-w-0 flex flex-col`},FS=[`data-file-start`],IS={key:2,class:`flex flex-col gap-4`},LS=A({__name:`DiffGroup`,props:{store:{},group:{},collapsed:{type:Boolean},parentLabel:{},parentKey:{},filesVisible:{}},emits:[`toggle`],setup(e,{emit:t}){let n=e,i=t,u=C(()=>zb(n.group)),d=C(()=>Vb(n.group)),p=C(()=>d.value.added),m=C(()=>d.value.deleted),h=C(()=>[...n.group.files,...n.group.children.flatMap(e=>e.files)].filter(e=>n.store.reviewed.has(e.sha)).length),v=S(new Set);function y(e){let t=new Set(v.value);t.has(e)?t.delete(e):t.add(e),v.value=t}let w=S(),T=S(),ee=Ib(w,T,()=>n.group.label,14,20),D=C(()=>!n.parentLabel&&n.group.children.length>0),O=new Map;function te(e,t){t?O.set(e,t.$el):O.delete(e)}function ne(e){O.get(e)?.scrollIntoView({behavior:`smooth`,block:`start`})}function re(){n.parentKey&&document.getElementById(`group-${n.parentKey}`)?.scrollIntoView({behavior:`smooth`,block:`start`})}let k=C(()=>u.value===0?1:h.value/u.value),A=new Map;function ie(e,t){t?A.set(e,t):A.delete(e)}function ae(e){A.get(e)?.expand(),o(()=>{document.getElementById(`file-${e}`)?.scrollIntoView({behavior:`smooth`,block:`start`})})}return(t,n)=>(N(),s(`section`,{id:`group-${e.group.key}`,class:`scroll-mt-[var(--diffs-header-height)]`},[D.value?(N(),s(`header`,fS,[l(`div`,pS,[l(`button`,{type:`button`,class:`min-w-0 flex flex-1 items-start px-2 py-1 text-left`,"aria-expanded":!e.collapsed,onClick:n[0]||=e=>i(`toggle`)},[_(ye,{compact:``,class:`ml--5 py2 op-mute hover:op-100`,icon:e.collapsed?`i-ph:caret-right`:`i-ph:caret-down`,label:t.$t(`group.toggle`),as:`span`},null,8,[`icon`,`label`]),l(`div`,hS,[l(`div`,gS,[_(kt,{category:e.group.category,class:`text-xl`},null,8,[`category`]),l(`span`,{class:`truncate text-2xl font-medium leading-1em`,title:e.group.label},a(e.group.label),9,_S)]),l(`div`,vS,[_(Nt,{additions:p.value,deletions:m.value},null,8,[`additions`,`deletions`]),l(`span`,yS,a(t.$t(`common.files`,{n:u.value},u.value)),1),l(`span`,bS,a(t.$t(`common.subgroups`,{n:e.group.children.length},e.group.children.length)),1),_(St,{value:k.value,size:12,thickness:2.5},null,8,[`value`])])])],8,mS),t.$slots.actions?(N(),s(`div`,xS,[f(t.$slots,`actions`)])):E(``,!0)]),e.collapsed?E(``,!0):(N(),s(j,{key:0},[e.group.summary?(N(),x(g,{key:0},{default:M(()=>[_(r(sp),{value:e.group.summary,class:`max-w-200 px-2 text-sm op-fade`},null,8,[`value`])]),_:1})):E(``,!0),r(gb)?E(``,!0):(N(),x(ex,{key:1,class:`px-2`,groups:e.group.children.map(e=>({...e,children:[]})),"groups-visable":[],reviewed:e.store.reviewed,onSelect:ne},null,8,[`groups`,`reviewed`]))],64))])):E(``,!0),!D.value||!e.collapsed&&e.group.files.length?(N(),s(`div`,SS,[l(`aside`,CS,[D.value?E(``,!0):(N(),s(`header`,wS,[e.parentLabel?(N(),s(`button`,{key:0,type:`button`,class:`self-start truncate pb1 pl2 text-xs leading-1em op-fade hover:op-100`,onClick:re},a(e.parentLabel)+` › `,1)):E(``,!0),l(`div`,TS,[l(`button`,{type:`button`,class:`min-w-0 flex flex-1 items-start px-2 py-1 text-left text-sm`,"aria-expanded":!e.collapsed,onClick:n[1]||=e=>i(`toggle`)},[_(ye,{compact:``,class:`ml--5 py1.5 op-mute hover:op-100`,icon:e.collapsed?`i-ph:caret-right`:`i-ph:caret-down`,label:t.$t(`group.toggle`),as:`span`},null,8,[`icon`,`label`]),l(`div`,DS,[l(`div`,OS,[_(kt,{category:e.group.category,class:`text-base`},null,8,[`category`]),l(`span`,{ref_key:`labelBox`,ref:w,class:`min-w-0 flex-1 truncate text-xl font-medium`,style:b({fontSize:`${r(ee)}px`}),title:e.group.label},[l(`span`,{ref_key:`labelText`,ref:T},a(e.group.label),513)],12,kS),l(`div`,{class:`flex shrink-0 items-center`,title:t.$t(`group.filesReviewed`,{reviewed:h.value,total:u.value})},null,8,AS)]),l(`div`,jS,[_(Nt,{additions:p.value,deletions:m.value},null,8,[`additions`,`deletions`]),l(`span`,MS,a(t.$t(`common.files`,{n:u.value},u.value)),1),_(St,{value:k.value,size:12,thickness:2.5},null,8,[`value`])])])],8,ES),t.$slots.actions?(N(),s(`div`,NS,[f(t.$slots,`actions`)])):E(``,!0)])])),e.collapsed?E(``,!0):(N(),s(j,{key:1},[e.group.summary&&!D.value?(N(),x(g,{key:0},{default:M(()=>[_(r(sp),{value:e.group.summary,class:`border-b border-base pb-2 pl2 text-sm op-fade`},null,8,[`value`])]),_:1})):E(``,!0),_(uS,{class:`min-h-0 flex-1`,store:e.store,files:e.group.files,missing:e.group.missing,"files-visible":e.filesVisible,onNavigate:ae},null,8,[`store`,`files`,`missing`,`files-visible`])],64))]),l(`div`,PS,[e.collapsed?E(``,!0):(N(!0),s(j,{key:0},c(e.group.files,t=>(N(),s(j,{key:t.sha},[l(`div`,{"data-file-start":t.sha},null,8,FS),_(iS,{ref_for:!0,ref:e=>ie(t.sha,e),store:e.store,file:t},null,8,[`store`,`file`])],64))),128))])])):E(``,!0),D.value&&!e.collapsed?(N(),s(`div`,IS,[(N(!0),s(j,null,c(e.group.children,t=>(N(),x(LS,{key:t.key,ref_for:!0,ref:e=>te(t.key,e),store:e.store,group:{...t,children:[]},collapsed:v.value.has(t.key),"parent-label":e.group.label,"parent-key":e.group.key,"files-visible":e.filesVisible,onToggle:e=>y(t.key)},null,8,[`store`,`group`,`collapsed`,`parent-label`,`parent-key`,`files-visible`,`onToggle`]))),128))])):E(``,!0)],8,dS))}}),RS={class:`flex flex-col gap-0.5 text-sm`},zS=[`onClick`],BS={class:`w-full flex items-center gap-1.5`},VS=[`title`],HS={class:`flex items-center gap-1 text-xs`},US={class:`op-mute`},WS=A({__name:`DiffGroupSidebar`,props:{groups:{},groupsVisable:{},reviewed:{}},emits:[`select`],setup(e){let t=e,n=S(new Set);function i(e){let t=new Set(n.value);t.has(e)?t.delete(e):t.add(e),n.value=t}let o=C(()=>t.groups.flatMap(e=>[{group:e,depth:0},...n.value.has(e.key)?[]:e.children.map(e=>({group:{...e,children:[]},depth:1}))]));return(t,u)=>(N(),s(`nav`,RS,[(N(!0),s(j,null,c(o.value,({group:o,depth:c})=>(N(),s(`div`,{key:o.key,class:y([`group flex items-center rounded pr-1 transition-colors`,[e.groupsVisable.includes(o.key)?`bg-active`:`hover:bg-hover`,c?`ml-3.5 border-l border-base rounded-l-none`:``]])},[l(`button`,{type:`button`,class:y([`min-w-0 flex flex-1 flex-col items-start px-2 py-1 text-left color-base`,e.groupsVisable.includes(o.key)?`op-100`:`op-fade hover:op-100`]),onClick:e=>t.$emit(`select`,o.key)},[l(`span`,BS,[_(kt,{category:o.category,class:y([`text-sm group-hover:saturate-100`,e.groupsVisable.includes(o.key)?``:`saturate-0`])},null,8,[`category`,`class`]),l(`span`,{class:`truncate`,title:o.label},a(o.label),9,VS)]),l(`span`,HS,[_(Nt,{additions:r(Vb)(o).added,deletions:r(Vb)(o).deleted},null,8,[`additions`,`deletions`]),l(`span`,US,`・`+a(t.$t(`common.files`,{n:r(zb)(o)},r(zb)(o))),1)])],10,zS),_(St,{value:r(Bb)(o,e.reviewed),size:16,thickness:2,class:`shrink-0`},null,8,[`value`]),o.children.length?(N(),x(ye,{key:0,icon:n.value.has(o.key)?`i-ph:caret-right`:`i-ph:caret-down`,"aria-expanded":!n.value.has(o.key),label:t.$t(n.value.has(o.key)?`group.showSubgroups`:`group.hideSubgroups`),class:`shrink-0 text-xs`,onClick:e=>i(o.key)},null,8,[`icon`,`aria-expanded`,`label`,`onClick`])):E(``,!0)],2))),128))]))}}),GS={class:`max-h-[60vh] min-h-40 flex flex-col gap-3`},KS={key:0,class:`flex items-center gap-1.5 text-xs op-mute`,role:`status`},qS={key:0,class:`break-words text-sm text-red-600 dark:text-red-400`},JS=A({__name:`AnalyzeStatusModal`,props:{open:{type:Boolean},store:{},document:{}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t,i=C(()=>n.store.llm),o=C(()=>i.value.transcript.filter(e=>e.role===`assistant`||e.role===`toolResult`)),u=ce(`listEl`),d=ce(`contentEl`),f=S(!0);function p(){let e=u.value;e&&(f.value=e.scrollHeight-e.scrollTop-e.clientHeight<40)}ae(d,()=>{f.value&&u.value&&(u.value.scrollTop=u.value.scrollHeight)});function m(){f.value=!0,i.value.reanalyze()}return(t,n)=>(N(),x(ke,{title:t.$t(`analyze.statusTitle`),open:e.open,document:e.document,"onUpdate:open":n[1]||=e=>r(`update:open`,e)},{footer:M(()=>[i.value.isAnalyzing?(N(),x(P,{key:0,size:`sm`,icon:`i-ph:stop-duotone`,onClick:n[0]||=e=>i.value.abort()},{default:M(()=>[D(a(t.$t(`common.abort`)),1)]),_:1})):(N(),x(P,{key:1,size:`sm`,variant:`primary`,icon:`i-ph:arrow-clockwise-duotone`,onClick:m},{default:M(()=>[D(a(t.$t(`common.rerun`)),1)]),_:1}))]),default:M(()=>[l(`div`,GS,[l(`div`,{ref_key:`listEl`,ref:u,class:`min-w-0 flex-auto overflow-y-auto overscroll-contain`,onScroll:p},[l(`div`,{ref_key:`contentEl`,ref:d,class:`flex flex-col gap-3`},[(N(!0),s(j,null,c(o.value,(e,t)=>(N(),x(yp,{key:t,message:e},null,8,[`message`]))),128)),i.value.isAnalyzing?(N(),s(`div`,KS,[n[2]||=l(`span`,{class:`i-ph:spinner-duotone animate-spin`,"aria-hidden":`true`},null,-1),D(` `+a(i.value.progress?.message??t.$t(`analyze.starting`)),1)])):E(``,!0)],512)],544),i.value.error?(N(),s(`p`,qS,a(i.value.error.message),1)):E(``,!0)])]),_:1},8,[`title`,`open`,`document`]))}}),YS=A({__name:`DiffAnalyzeButton`,props:{store:{},document:{}},setup(e){let t=e,{t:n}=le(),r=C(()=>t.store.llm),i=C(()=>t.store.aiResult!==void 0),o=C(()=>r.value.isAnalyzing||r.value.error!==void 0),c=S(!1),l=C(()=>r.value.isAnalyzing?`i-ph:spinner-duotone animate-spin`:r.value.error?`i-ph:warning-circle-duotone ${i.value?`text-red-500`:`text-red-100`}`:`i-ph:sparkle-duotone`),u=C(()=>r.value.isAnalyzing?n(`analyze.analyzing`):r.value.error?n(`analyze.failed`):i.value?n(`analyze.reanalyze`):n(`analyze.withAi`)),d=C(()=>{if(r.value.isAnalyzing)return r.value.progress?.message??n(`analyze.analyzing`);if(r.value.error)return n(`analyze.failedTitle`,{message:r.value.error.message})});function f(){o.value?c.value=!0:r.value.reanalyze()}return(t,n)=>(N(),s(j,null,[r.value.isSetup?!i.value||o.value||e.store.analyzeMode!==`rule-based`?(N(),x(P,{key:1,class:`shrink-0 text-xs`,variant:i.value?`text`:`primary`,icon:l.value,title:d.value,onClick:f},{default:M(()=>[D(a(u.value),1)]),_:1},8,[`variant`,`icon`,`title`])):E(``,!0):(N(),x(P,{key:0,class:`shrink-0 text-xs shadow`,size:`sm`,icon:`i-ph:key-duotone`,variant:`primary`,onClick:n[0]||=e=>Qe.value=!0},{default:M(()=>[D(a(t.$t(`analyze.setupKeys`)),1)]),_:1})),_(JS,{open:c.value&&o.value,store:e.store,document:e.document,"onUpdate:open":n[1]||=e=>c.value=e},null,8,[`open`,`store`,`document`])],64))}}),XS=A({__name:`DiffGroupNavToggle`,setup(e){let t=C(()=>mb.value===`sidebar`);return(e,n)=>(N(),x(ye,{icon:t.value?`i-ph:tabs-duotone`:`i-ph:sidebar-simple-duotone`,label:e.$t(t.value?`group.navTabs`:`group.navSidebar`),tooltip:e.$t(t.value?`group.navTabs`:`group.navSidebar`),onClick:n[0]||=e=>mb.value=t.value?`tabs`:`sidebar`},null,8,[`icon`,`label`,`tooltip`]))}}),ZS={key:0,class:`op-fade`},QS={key:1,class:`text-xs ml-0.5 op-fade`},$S=A({__name:`DisplayNumber`,props:{value:{},prefix:{},suffix:{},options:{},mono:{type:Boolean,default:!0}},setup(e){let t=e,n=C(()=>Re(t.value,t.options));return(t,r)=>(N(),s(`span`,{class:y({"font-mono tabular-nums":e.mono})},[e.prefix?(N(),s(`span`,ZS,a(e.prefix),1)):E(``,!0),D(a(n.value),1),e.suffix?(N(),s(`span`,QS,a(e.suffix),1)):E(``,!0)],2))}}),eC=A({__name:`DisplayNumberBadge`,props:{value:{},prefix:{},suffix:{},options:{},color:{type:[Boolean,Number,String],default:!1}},setup(e){return(t,n)=>(N(),x(Oe,{color:e.color,class:`text-micro`},{default:M(()=>[f(t.$slots,`default`,{},()=>[_($S,{value:e.value,prefix:e.prefix,suffix:e.suffix,options:e.options},null,8,[`value`,`prefix`,`suffix`,`options`])])]),_:3},8,[`color`]))}}),tC={class:`relative shrink-0`},nC=A({__name:`DiffReviewButton`,props:{pendingCommentCount:{}},emits:[`review`],setup(e){return(t,n)=>(N(),s(`div`,tC,[_(P,{size:`sm`,variant:`action`,icon:`i-ph:chat-centered-text-duotone`,onClick:n[0]||=e=>t.$emit(`review`)},{default:M(()=>[D(a(t.$t(`review.addReview`)),1)]),_:1}),e.pendingCommentCount>0?(N(),x(eC,{key:0,value:e.pendingCommentCount,class:`absolute right--2 top--2`},null,8,[`value`])):E(``,!0)]))}}),rC={class:`flex flex-col gap-3`},iC={class:`flex flex-wrap gap-2`},aC={class:`flex flex-col text-sm`},oC=[`onClick`],sC=A({__name:`ReviewProgressModal`,props:{open:{type:Boolean},store:{},document:{}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t,i=C(()=>(n.store.diff?.files??[]).map(e=>({file:e,status:Ox(n.store,e)})).sort((e,t)=>e.file.path.localeCompare(t.file.path))),o=C(()=>i.value.filter(e=>e.status===`reviewed`).length);function u(e){return i.value.filter(t=>t.status===`reviewed`===e).map(e=>e.file.sha)}async function d(){let[e,t]=[u(!0),u(!1)];await n.store.setReviewed(e,!1),await n.store.setReviewed(t,!0)}function f(e){let t=n.document??document;r(`update:open`,!1),t.getElementById(`file-${e}`)?.scrollIntoView({behavior:`smooth`,block:`start`})}return(t,n)=>(N(),x(ke,{title:t.$t(`reviewProgress.title`),description:t.$t(`group.filesReviewed`,{reviewed:o.value,total:i.value.length}),open:e.open,document:e.document,"onUpdate:open":n[2]||=e=>r(`update:open`,e)},{default:M(()=>[l(`div`,rC,[l(`div`,iC,[_(P,{size:`sm`,icon:`i-ph:checks`,disabled:o.value===i.value.length,onClick:n[0]||=t=>e.store.setReviewed(u(!1),!0)},{default:M(()=>[D(a(t.$t(`reviewProgress.markAll`)),1)]),_:1},8,[`disabled`]),_(P,{size:`sm`,icon:`i-ph:arrows-left-right`,disabled:i.value.length===0,onClick:d},{default:M(()=>[D(a(t.$t(`reviewProgress.invert`)),1)]),_:1},8,[`disabled`]),_(P,{size:`sm`,icon:`i-ph:arrow-counter-clockwise`,disabled:o.value===0&&e.store.changedSinceReviewed.size===0,onClick:n[1]||=t=>e.store.setReviewed(i.value.map(e=>e.file.sha),!1)},{default:M(()=>[D(a(t.$t(`reviewProgress.reset`)),1)]),_:1},8,[`disabled`])]),l(`ul`,aC,[(N(!0),s(j,null,c(i.value,({file:n,status:r})=>(N(),s(`li`,{key:n.sha,class:`flex items-center gap-2 rounded-md px-1 py-1 hover:bg-hover`},[_(kx,{status:r,"aria-label":t.$t(`file.markReviewed`),onUpdate:t=>e.store.setReviewed([n.sha],t)},null,8,[`status`,`aria-label`,`onUpdate`]),l(`button`,{type:`button`,class:`min-w-0 flex-1 text-left`,onClick:e=>f(n.sha)},[_(mx,{path:n.path,class:`min-w-0`},null,8,[`path`])],8,oC),l(`span`,{class:y([`shrink-0 text-xs`,r===`changed`?`text-orange-700 dark:text-orange-400`:r===`reviewed`?`text-primary-600 dark:text-primary-400`:`op-fade`])},a(t.$t(`reviewProgress.status.${r}`)),3)]))),128))])])]),_:1},8,[`title`,`description`,`open`,`document`]))}}),cC={class:`w-full flex flex-col gap-3 p-3`},lC={key:0,class:`text-sm op-fade`},uC={key:1,class:`text-sm text-red-600 dark:text-red-400`},dC={class:`flex flex-wrap items-center justify-end gap-2`},fC=A({__name:`ReviewSubmitModal`,props:{open:{type:Boolean},reviews:{},document:{}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t,i=S(``),o=S(`COMMENT`),c=S(!1),u=S(),{t:d}=le(),f=C(()=>[{value:`COMMENT`,label:d(`review.comment`),icon:`i-octicon-comment-16`},{value:`APPROVE`,label:d(`review.approve`),icon:`i-octicon-check-circle-16`},{value:`REQUEST_CHANGES`,label:d(`review.requestChanges`),icon:`i-octicon-code-review-16`}]);async function p(e){c.value=!0,u.value=void 0;try{await e(),i.value=``,o.value=`COMMENT`,r(`update:open`,!1)}catch(e){u.value=e instanceof Error?e.message:String(e)}finally{c.value=!1}}return(t,d)=>(N(),x(ke,{title:t.$t(`review.reviewChanges`),open:e.open,document:e.document,"onUpdate:open":d[4]||=e=>r(`update:open`,e)},{default:M(()=>[l(`div`,cC,[e.reviews.pendingCommentCount>0?(N(),s(`p`,lC,a(t.$t(`review.includesPending`,{n:e.reviews.pendingCommentCount},e.reviews.pendingCommentCount)),1)):E(``,!0),_(gx,{modelValue:i.value,"onUpdate:modelValue":d[0]||=e=>i.value=e,rows:4,placeholder:t.$t(`review.summaryPlaceholder`),disabled:c.value,invalid:!!u.value},null,8,[`modelValue`,`placeholder`,`disabled`,`invalid`]),u.value?(N(),s(`p`,uC,a(u.value),1)):E(``,!0),l(`div`,dC,[_(Me,{modelValue:o.value,"onUpdate:modelValue":d[1]||=e=>o.value=e,options:f.value},null,8,[`modelValue`,`options`]),d[5]||=l(`div`,{class:`flex-auto`},null,-1),e.reviews.pendingReview?(N(),x(P,{key:0,variant:`text`,class:`text-red-600 dark:text-red-400`,disabled:c.value,onClick:d[2]||=e=>p(()=>n.reviews.discardPendingReview())},{default:M(()=>[D(a(t.$t(`review.discard`)),1)]),_:1},8,[`disabled`])):E(``,!0),d[6]||=l(`div`,{class:`flex-auto`},null,-1),_(P,{variant:`primary`,class:`px3`,loading:c.value,disabled:o.value!==`APPROVE`&&!i.value.trim()&&e.reviews.pendingCommentCount===0,onClick:d[3]||=e=>p(()=>n.reviews.submitReview(o.value,i.value))},{default:M(()=>[D(a(t.$t(`common.submit`)),1)]),_:1},8,[`loading`,`disabled`])])])]),_:1},8,[`title`,`open`,`document`]))}}),pC={class:`flex items-center gap-2 text-sm`},mC=[`title`,`aria-expanded`],hC={class:`text-xs opacity-50`},gC=A({__name:`DiffPrMeta`,props:{document:{},store:{}},setup(e){let t=e,n=C(()=>t.store.diff.files),r=C(()=>n.value.length),i=C(()=>n.value.filter(e=>t.store.reviewed.has(e.sha)).length),o=C(()=>n.value.reduce((e,t)=>e+t.additions,0)),c=C(()=>n.value.reduce((e,t)=>e+t.deletions,0)),u=C(()=>r.value===0?1:i.value/r.value),d=C(()=>t.store.reviews),f=S(!1),p=S(!1);return(t,n)=>(N(),s(`div`,pC,[_(Nt,{additions:o.value,deletions:c.value},null,8,[`additions`,`deletions`]),l(`button`,{type:`button`,class:`flex shrink-0 items-center gap-2 whitespace-nowrap rounded-md px-1.5 py-0.5 transition -mx-1.5 hover:bg-hover`,title:t.$t(`reviewProgress.title`),"aria-expanded":p.value,onClick:n[0]||=e=>p.value=!0},[_(St,{value:u.value,size:18,thickness:3},null,8,[`value`]),l(`span`,null,[D(a(i.value)+` `,1),l(`span`,hC,a(t.$t(`pr.reviewedOf`,{total:r.value})),1)])],8,mC),d.value?.canWrite?(N(),x(nC,{key:0,"pending-comment-count":d.value.pendingCommentCount,onReview:n[1]||=e=>f.value=!0},null,8,[`pending-comment-count`])):E(``,!0),d.value?(N(),x(fC,{key:1,open:f.value,"onUpdate:open":n[2]||=e=>f.value=e,reviews:d.value,document:e.document},null,8,[`open`,`reviews`,`document`])):E(``,!0),_(sC,{open:p.value,"onUpdate:open":n[3]||=e=>p.value=e,store:e.store,document:e.document},null,8,[`open`,`store`,`document`])]))}}),_C=A({__name:`DiffReviewThreadsToggle`,props:{showThreads:{type:Boolean}},emits:[`update:showThreads`],setup(e){return(t,n)=>(N(),x(ye,{class:y([`shrink-0`,e.showThreads?``:`op-fade`]),icon:e.showThreads?`i-ph:chats-duotone`:`i-ph:chats`,label:t.$t(e.showThreads?`review.hideComments`:`review.showComments`),tooltip:t.$t(e.showThreads?`review.hideComments`:`review.showComments`),onClick:n[0]||=n=>t.$emit(`update:showThreads`,!e.showThreads)},null,8,[`class`,`icon`,`label`,`tooltip`]))}}),vC={class:`w-full flex flex-col gap-3 text-sm`},yC=[`href`],bC={key:0,class:`inline-flex items-center gap-1 align-middle`},xC={class:`h-4 w-4 overflow-hidden rounded-full`},SC={class:`flex flex-col gap-1`},CC={class:`op-fade`},wC={class:`flex flex-col list-disc gap-0.5 pl-5`},TC={class:`op-fade`},EC={class:`op-fade`},DC={key:0,class:`flex items-start gap-2 border border-amber:20 rounded-lg bg-amber:10 px-3 py-2 text-amber-700 dark:text-amber-400`},OC={key:1,class:`text-red-600 dark:text-red-400`},kC={class:`flex justify-end gap-2`},AC=A({__name:`ShareResultModal`,props:{open:{type:Boolean},store:{},document:{}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t,{t:i}=le(),o=C(()=>n.store.shared),c=C(()=>{let e=n.store.aiResult?.locale;return e!==void 0&&e!==`en`}),u=C(()=>o.value.ownComment?c.value?i(`share.updateAnyway`):i(`share.update`):c.value?i(`share.shareAnyway`):i(`share.share`));async function d(){await o.value.share(),o.value.error||r(`update:open`,!1)}return(t,n)=>{let i=fe(`i18n-t`);return N(),x(ke,{title:t.$t(o.value.ownComment?`share.titleUpdate`:`share.titleShare`),open:e.open,document:e.document,"onUpdate:open":n[1]||=e=>r(`update:open`,e)},{default:M(()=>[l(`div`,vC,[_(i,{keypath:o.value.ownComment?`share.willUpdate`:`share.willPost`,tag:`p`,scope:`global`},{comment:M(()=>[l(`a`,{href:o.value.ownComment?.url,target:`_blank`,rel:`noopener`,class:`underline`},a(t.$t(`share.commentLink`)),9,yC)]),user:M(()=>[o.value.viewerLogin?(N(),s(`span`,bC,[l(`span`,xC,[_(Pt,{login:o.value.viewerLogin,size:16},null,8,[`login`])]),l(`strong`,null,a(o.value.viewerLogin),1)])):(N(),s(j,{key:1},[D(a(t.$t(`common.you`)),1)],64))]),_:1},8,[`keypath`]),l(`div`,SC,[l(`p`,CC,a(t.$t(`share.contains`)),1),l(`ul`,wC,[_(i,{keypath:`share.containsLink`,tag:`li`,scope:`global`},{site:M(()=>[...n[2]||=[l(`span`,{class:`text-primary font-bold`},`pulls.review`,-1)]]),_:1}),l(`li`,null,a(t.$t(`share.containsJson`)),1)]),l(`p`,TC,a(t.$t(`share.excludes`)),1)]),l(`p`,EC,a(t.$t(`share.anyoneCanLoad`)),1),c.value?(N(),s(`div`,DC,[n[3]||=l(`span`,{class:`i-ph:globe-duotone mt-0.5 shrink-0`,"aria-hidden":`true`},null,-1),l(`span`,null,a(t.$t(`share.englishRecommended`)),1)])):E(``,!0),o.value.error?(N(),s(`p`,OC,a(o.value.error.message),1)):E(``,!0),l(`div`,kC,[_(P,{variant:`text`,disabled:o.value.isSharing,onClick:n[0]||=e=>r(`update:open`,!1)},{default:M(()=>[D(a(t.$t(`common.cancel`)),1)]),_:1},8,[`disabled`]),_(P,{variant:`primary`,icon:`i-ph:share-network-duotone`,loading:o.value.isSharing,onClick:d},{default:M(()=>[D(a(u.value),1)]),_:1},8,[`loading`])])])]),_:1},8,[`title`,`open`,`document`])}}}),jC=[`title`],MC=A({__name:`DiffShareButton`,props:{store:{},document:{}},setup(e){let t=e,n=C(()=>t.store.shared),r=S(!1);return(t,i)=>(N(),s(j,null,[_(P,{class:`shrink-0 text-xs`,variant:`text`,disabled:n.value.isSharing||!n.value.canShare,title:t.$t(n.value.canShare?`share.tooltip`:`share.needsToken`),icon:n.value.isSharing?`i-ph:spinner-duotone animate-spin`:`i-ph:share-network-duotone`,onClick:i[0]||=e=>r.value=!0},{default:M(()=>[D(a(t.$t(n.value.isSharing?`share.sharing`:n.value.ownComment?`share.updateButton`:`share.button`)),1)]),_:1},8,[`disabled`,`title`,`icon`]),n.value.error&&!r.value?(N(),s(`span`,{key:0,class:`max-w-80 self-center truncate text-xs text-red-500`,title:t.$t(`share.failed`,{message:n.value.error.message})},a(t.$t(`share.failed`,{message:n.value.error.message})),9,jC)):E(``,!0),_(AC,{open:r.value,"onUpdate:open":i[1]||=e=>r.value=e,store:e.store,document:e.document},null,8,[`open`,`store`,`document`])],64))}}),NC={class:`mxa max-w-500 w-full`},PC={class:`flex flex-wrap items-center gap-2`},FC={key:1,class:`i-ph-house-line-duotone`},IC={class:`flex flex-auto items-center gap-2 break-words text-lg font-semibold`},LC=[`href`],RC={key:0,class:`flex shrink-0 items-center gap-1.5 text-sm`},zC={class:`op-fade`},BC={class:`shrink-0`},VC={class:`hidden lg:block`},HC={class:`flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-sm`},UC={key:1,class:`flex items-center gap-1.5`},WC={class:`op-fade`},GC={class:`op-fade`},KC={key:2,class:`flex items-center gap-1 font-mono`},qC={class:`border border-base rounded bg-code px-2 py-0.5 text-xs font-mono`},JC={class:`border border-base rounded bg-code px-2 py-0.5 text-xs font-mono`},YC=[`title`],XC={key:0,class:`flex items-center gap-2 pt-2 text-sm`},ZC=A({__name:`DiffsHeader`,props:{document:{},store:{},groupsVisable:{},scrollY:{}},setup(e){let t=e,{t:n}=le(),i=C(()=>t.store.diff),o=C(()=>t.store.groups),c=C(()=>t.store.aiResult),u=C(()=>[{value:`rule-based`,label:n(`pr.rules`)},{value:c.value?.source??`llm`,label:n(`pr.ai`),icon:`i-ph-sparkle-duotone`}]),d=C(()=>t.store.shared&&t.store.llm&&c.value&&!c.value.sharedBy),f=C(()=>bt(i.value.ref)),p=C(()=>t.store.reviews);function m(e){(t.document??document).getElementById(`group-${e}`)?.scrollIntoView({behavior:`smooth`,block:`start`})}return(t,n)=>(N(),s(`header`,{class:y([`sticky left-0 right-0 top-0 z-nav flex flex-col gap-2 border-b bg-base px4 py2 transition-all`,e.scrollY>20?`border-base shadow-sm`:`border-transparent`])},[l(`div`,NC,[l(`div`,PC,[(N(),x(ee(r(!1)?`div`:r(yt)),{to:`/`,class:`flex`},{default:M(()=>[i.value.pullRequest?.state?(N(),x(Ge,{key:0,state:i.value.pullRequest.state},null,8,[`state`])):(N(),s(`div`,FC))]),_:1})),l(`h1`,IC,[D(a(i.value.title)+` `,1),i.value.label?(N(),s(`a`,{key:0,href:i.value.url,target:`_blank`,rel:`noopener`,class:`text-base font-normal op-fade hover:underline`},a(i.value.label),9,LC)):E(``,!0),e.store.canRefresh?(N(),x(ye,{key:1,icon:`i-ph:arrows-clockwise-duotone`,label:t.$t(`common.refresh`),tooltip:t.$t(`common.refresh`),class:`shrink-0 text-sm`,onClick:n[0]||=t=>e.store.refresh()},null,8,[`label`,`tooltip`])):E(``,!0)]),c.value?(N(),s(`div`,RC,[l(`span`,zC,a(t.$t(`pr.analyzeBy`)),1),_(Me,{"model-value":e.store.analyzeMode,options:u.value,"onUpdate:modelValue":n[1]||=t=>e.store.setAnalyzeMode(t)},null,8,[`model-value`,`options`])])):E(``,!0),p.value?(N(),x(_C,{key:1,"show-threads":p.value.showThreads,"onUpdate:showThreads":n[2]||=e=>p.value.setShowThreads(e)},null,8,[`show-threads`])):E(``,!0),l(`div`,BC,[_(Xe,{document:e.document},{default:M(()=>[l(`div`,VC,[_(XS)])]),_:1},8,[`document`])])]),l(`div`,HC,[f.value&&!r(!1)?(N(),x(r(yt),{key:0,to:f.value.route,class:`flex items-center gap-1.5 op-fade hover:underline`},{default:M(()=>[l(`span`,null,a(f.value.label),1)]),_:1},8,[`to`])):E(``,!0),i.value.author?(N(),s(`span`,UC,[l(`span`,WC,a(t.$t(`pr.by`)),1),_(Pt,{login:i.value.author.name,"avatar-url":i.value.author.avatarUrl,size:16},null,8,[`login`,`avatar-url`]),l(`span`,GC,a(i.value.author.name),1)])):E(``,!0),i.value.base&&i.value.head&&!r(!1)?(N(),s(`span`,KC,[l(`span`,qC,a(i.value.base.ref),1),n[3]||=D(` ← `,-1),l(`span`,JC,a(i.value.head.ref),1)])):E(``,!0),c.value?.sharedBy&&e.store.analyzeMode!==`rule-based`?(N(),s(`span`,{key:3,class:`flex items-center gap-1.5 border border-base rounded px2`,title:c.value.model},[c.value.sharedBy===r(`github-actions[bot]`)?(N(),s(j,{key:0},[D(a(t.$t(`pr.sharedAnalysis`)),1)],64)):(N(),s(j,{key:1},[D(a(t.$t(`pr.sharedBy`))+` `,1),_(Pt,{login:c.value.sharedBy,size:16},null,8,[`login`]),D(` `+a(c.value.sharedBy),1)],64))],8,YC)):E(``,!0),e.store.llm?(N(),x(YS,{key:4,store:e.store,document:e.document},null,8,[`store`,`document`])):E(``,!0),d.value?(N(),x(MC,{key:5,store:e.store,document:e.document},null,8,[`store`,`document`])):E(``,!0),r(gb)?(N(),x(gC,{key:6,class:`ml-auto`,store:e.store,document:e.document},null,8,[`store`,`document`])):E(``,!0)]),r(gb)?E(``,!0):(N(),s(`div`,XC,[_(ex,{class:`flex-auto`,groups:o.value,"groups-visable":e.groupsVisable,reviewed:e.store.reviewed,onSelect:m},null,8,[`groups`,`groups-visable`,`reviewed`]),_(gC,{class:`ml-auto self-end pt-2`,store:e.store,document:e.document},null,8,[`store`,`document`])]))])],2))}}),QC={key:0,class:`border border-base rounded-lg`},$C=[`aria-expanded`],ew={class:`font-medium`},tw={class:`font-mono op-mute`},nw={key:0,class:`border-t border-base divide-y divide-#9992`},rw={class:`flex items-center gap-2`},iw={class:`font-medium`},aw={class:`op-fade`},ow=A({__name:`ReviewSummaries`,props:{summaries:{}},setup(e){let t=S(!1),n={approved:{label:`review.approved`,icon:`i-ph:check-circle-duotone text-green-600 dark:text-green-400`},changes_requested:{label:`review.changesRequested`,icon:`i-ph:x-circle-duotone text-red-600 dark:text-red-400`},commented:{label:`review.commented`,icon:`i-ph:chat-circle-dots-duotone op-fade`},dismissed:{label:`review.dismissed`,icon:`i-ph:prohibit op-mute`}};return(i,o)=>e.summaries.length?(N(),s(`section`,QC,[l(`button`,{type:`button`,class:`w-full flex items-center gap-1.5 px-3 py-2 text-sm`,"aria-expanded":t.value,onClick:o[0]||=e=>t.value=!t.value},[l(`span`,{class:y(t.value?`i-ph:caret-down`:`i-ph:caret-right`),"aria-hidden":`true`},null,2),l(`span`,ew,a(i.$t(`review.reviews`)),1),l(`span`,tw,a(e.summaries.length),1)],8,$C),t.value?(N(),s(`ul`,nw,[(N(!0),s(j,null,c(e.summaries,e=>(N(),s(`li`,{key:e.id,class:`flex flex-col gap-1 px-3 py-2 text-sm`},[l(`div`,rw,[l(`span`,{class:y(n[e.state].icon),"aria-hidden":`true`},null,2),e.author?(N(),x(Pt,{key:0,login:e.author.login,"avatar-url":e.author.avatarUrl,size:16},null,8,[`login`,`avatar-url`])):E(``,!0),l(`span`,iw,a(e.author?.login??`ghost`),1),l(`span`,aw,a(i.$t(n[e.state].label)),1),e.submittedAt?(N(),x(ze,{key:1,date:e.submittedAt,class:`text-xs op-fade`},null,8,[`date`])):E(``,!0)]),e.body?(N(),x(g,{key:0},{default:M(()=>[_(r(sp),{value:e.body,class:`pl-6 text-sm op-fade`},null,8,[`value`])]),_:2},1024)):E(``,!0)]))),128))])):E(``,!0)])):E(``,!0)}}),sw={key:0,class:`flex flex-wrap items-center gap-x-3 gap-y-2 border border-base rounded-lg bg-raised px-3 py-2 text-sm`},cw={key:0,class:`text-xs op-fade`},lw={key:1,class:`text-xs op-fade`},uw={key:1,class:`op-fade`},dw=A({__name:`SharedAnalysisBanner`,props:{store:{}},setup(e){let t=e,{t:n,locale:r}=le(),i=C(()=>t.store.shared),o=C(()=>t.store.aiResult!==void 0&&t.store.aiResult.sharedBy===void 0);function u(e){let t=e.result.locale;return t!==void 0&&t!==r.value?_t(t):void 0}function d(e){let t=u(e);return e.stale?n(`share.staleTitle`):t?n(`share.inLanguage`,{language:t}):e.result.model}return(e,t)=>i.value.candidates.length||i.value.notice?(N(),s(`div`,sw,[t[1]||=l(`span`,{class:`i-ph-sparkle-duotone shrink-0 op-fade`,"aria-hidden":`true`},null,-1),i.value.candidates.length?(N(),s(j,{key:0},[l(`span`,null,a(e.$t(o.value?`share.loadReplaces`:`share.available`)),1),(N(!0),s(j,null,c(i.value.candidates,t=>(N(),x(P,{key:t.login,size:`sm`,class:`rounded-full`,title:d(t),onClick:e=>i.value.load(t.login)},{default:M(()=>[_(Pt,{login:t.login,size:16},null,8,[`login`]),D(` `+a(t.own?e.$t(`common.you`):t.login)+` `,1),t.stale?(N(),s(`span`,cw,a(e.$t(`share.outdated`)),1)):u(t)?(N(),s(`span`,lw,`(`+a(u(t))+`)`,1)):E(``,!0)]),_:2},1032,[`title`,`onClick`]))),128))],64)):(N(),s(`span`,uw,a(i.value.notice),1)),t[2]||=l(`div`,{class:`flex-auto`},null,-1),_(ye,{icon:`i-ph:x`,label:e.$t(`common.dismiss`),tooltip:e.$t(`common.dismiss`),class:`text-sm`,onClick:t[0]||=e=>i.value.dismiss()},null,8,[`label`,`tooltip`])])):E(``,!0)}}),fw={key:0,class:`mxa max-w-500 w-full px-4 py-12`},pw={key:1,class:`mxa max-w-500 w-full flex flex-col gap-8 px-4 py-12`},mw={class:`mxa max-w-500 w-full flex`},hw={key:0,class:`w-64 shrink-0 border-r border-base`},gw={class:`sticky top-[calc(var(--diffs-header-height)+10px)] max-h-[calc(100vh-var(--diffs-header-height)-20px)] overflow-auto py-3 pl-3 pr-2`},_w={class:`min-w-0 flex flex-auto flex-col gap-4`},vw={key:0,class:`mb-4 flex flex-wrap items-center justify-between gap-3 border border-amber:20 rounded-lg bg-amber:10 bg-raised px-3 py-2 text-sm text-amber-700 dark:text-amber-400`},yw={class:`flex items-center gap-3`},bw={class:`mt-200 p2 text-center text-xs italic op50`},xw={key:3,class:`mxa max-w-500 w-full px-4 py-12`},Sw=A({__name:`DiffsPage`,props:{document:{},store:{}},setup(e){let t=e,i=n(()=>vt(()=>import(`./ChatWidget-BsnoQ6oS.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url)),u=C(()=>t.store?.diff),d=C(()=>t.store?.grouped),p=C(()=>t.store?.isLoading??!1),m=C(()=>t.store?.error),v=C(()=>t.store?.isStale??!1),y=C(()=>t.store?.groups??[]),w=new fb;T(Pb,w);let ee=ce(`root`);h(()=>{w.setup(t.document&&!(t.document instanceof Document)?ee.value:document)}),oe(()=>w.cleanUp());let O=S(new Set);function ne(e){let t=new Set(O.value);t.has(e)?t.delete(e):t.add(e),O.value=t}let re=S(0);se(()=>t.document??document,`scroll`,e=>{re.value=e.target instanceof Element?e.target.scrollTop:window.scrollY,ae(),ue()},{capture:!0});let k=ce(`header`),{height:A}=te(()=>k.value?.$el),ie=S([]);function ae(){let e=t.document??document,n=window.innerHeight,r=y.value.flatMap(e=>[e.key,...e.children.map(e=>e.key)]);ie.value=r.filter(t=>{let r=e.getElementById(`group-${t}`);if(!r)return!1;let i=r.getBoundingClientRect();return i.bottom>A.value&&i.top<n})}let le=S([]);function ue(){let e=t.document??document,n=window.innerHeight,r=[...e.querySelectorAll(`[data-file-start]`)];le.value=r.filter((e,t)=>{let i=r[t+1],a=e.getBoundingClientRect().top;return(i&&i.parentElement===e.parentElement?i.getBoundingClientRect().top:e.parentElement.getBoundingClientRect().bottom)>A.value&&a<n}).map(e=>e.dataset.fileStart)}de([y,A],()=>o(()=>{ae(),ue()}),{immediate:!0});function fe(e){(t.document??document).getElementById(`group-${e}`)?.scrollIntoView({behavior:`smooth`,block:`start`})}let pe=C(()=>({"--diffs-header-height":A.value?`${A.value}px`:void 0})),me=S(!0);function he(){be.value=me.value,t.store?.refresh()}return(t,n)=>(N(),s(`div`,{ref:`root`,class:`diffs-page bg-base color-base`,style:b(pe.value)},[l(`div`,null,[p.value&&!u.value?(N(),s(`div`,fw,[f(t.$slots,`loading`,{},()=>[_(pt,{text:t.$t(`common.loading`)},null,8,[`text`])])])):m.value?(N(),s(`div`,pw,[f(t.$slots,`error`,{error:m.value,retry:()=>e.store?.load()},()=>[_(ht,{icon:`i-ph:warning-duotone`,title:t.$t(`pr.somethingWrong`)},{hint:M(()=>[D(a(m.value.message),1)]),actions:M(()=>[_(P,{variant:`primary`,onClick:n[0]||=t=>e.store?.load()},{default:M(()=>[D(a(t.$t(`common.retry`)),1)]),_:1})]),_:1},8,[`title`])]),e.store?.auth===`github-token`?(N(),x(mt,{key:0,class:`mxa max-w-200 border border-base border-rounded p4`,onSaved:n[1]||=t=>e.store?.load()})):E(``,!0)])):u.value&&d.value?(N(),s(j,{key:2},[_(ZC,{ref:`header`,document:e.document,store:e.store,"groups-visable":ie.value,"scroll-y":re.value},null,8,[`document`,`store`,`groups-visable`,`scroll-y`]),l(`div`,mw,[r(gb)?(N(),s(`aside`,hw,[l(`div`,gw,[_(WS,{groups:y.value,"groups-visable":ie.value,reviewed:e.store.reviewed,onSelect:fe},null,8,[`groups`,`groups-visable`,`reviewed`])])])):E(``,!0),l(`div`,_w,[f(t.$slots,`stale`,{refresh:()=>e.store?.refresh()},()=>[v.value?(N(),s(`div`,vw,[l(`span`,null,a(t.$t(`pr.newCommits`)),1),l(`div`,yw,[_(Fe,{modelValue:me.value,"onUpdate:modelValue":n[2]||=e=>me.value=e,label:t.$t(`pr.autoRefreshNextTime`)},null,8,[`modelValue`,`label`]),_(P,{size:`sm`,onClick:he},{default:M(()=>[D(a(t.$t(`common.refresh`)),1)]),_:1})])])):E(``,!0)]),e.store?.shared?(N(),x(dw,{key:0,store:e.store},null,8,[`store`])):E(``,!0),e.store?.reviews?(N(),x(ow,{key:1,summaries:e.store.reviews.summaries},null,8,[`summaries`])):E(``,!0),d.value?.overallSummary?(N(),x(g,{key:2},{default:M(()=>[_(r(sp),{value:d.value?.overallSummary,class:`border-b border-base px-4 pb-2 text-sm op-fade`},null,8,[`value`])]),_:1})):E(``,!0),(N(!0),s(j,null,c(y.value,t=>(N(),x(LS,{key:t.key,store:e.store,group:t,collapsed:O.value.has(t.key),"files-visible":le.value,onToggle:e=>ne(t.key)},null,8,[`store`,`group`,`collapsed`,`files-visible`,`onToggle`]))),128)),l(`div`,bw,a(t.$t(`pr.endOfDiff`)),1)])]),r(i)&&e.store?.llm&&e.store.aiResult?(N(),x(r(i),{key:0,store:e.store},null,8,[`store`])):E(``,!0)],64)):(N(),s(`div`,xw,[f(t.$slots,`empty`)]))])],4))}}),Cw=re(`diffs:show-review-comments`,!0);function ww(e,t){let{write:n}=t.access,r=S({threads:[],summaries:[],pendingReview:void 0}),i=S(!1),a=C(()=>r.value.threads.reduce((e,t)=>e+t.comments.filter(e=>e.pending).length,0));async function o(){let n=await e.fetch();r.value=n;let i=t.getCacheKey();i&&await t.cache.diffs.setReviewData(i,n)}async function s(){let e=t.cachedData?.();e&&(r.value=e),i.value=!e;try{await t.access.resolve(),await o()}catch{}finally{i.value=!1}}async function c(e){await n(e),await o()}async function l(n,i,a){let o=t.getHeadSha();if(!o)throw Error(lt(`errors.diffNotLoaded`));await c(()=>e.addComment({target:n,body:i,mode:a,headSha:o,pendingReview:r.value.pendingReview}))}async function u(){let t=r.value.pendingReview;t&&await c(()=>e.discardPendingReview(t))}return w({threads:C(()=>r.value.threads),summaries:C(()=>r.value.summaries),pendingReview:C(()=>r.value.pendingReview),pendingCommentCount:a,isLoading:i,viewerLogin:t.access.viewerLogin,canWrite:t.access.canWrite,writeBlockedReason:t.access.writeBlockedReason,showThreads:Cw,setShowThreads:e=>{Cw.value=e},load:s,addComment:l,reply:(t,n)=>c(()=>e.reply(t,n)),editComment:(t,n)=>c(()=>e.editComment(t,n)),deleteComment:t=>c(()=>e.deleteComment(t)),resolveThread:t=>c(()=>e.resolveThread(t)),submitReview:(t,n)=>c(()=>e.submitReview(t,n,r.value.pendingReview)),discardPendingReview:u})}function Tw(e,t){let{access:n}=t,r=S([]),i=S(),a=S(!1),o=S(),s=S();async function c(e){await t.applyResult({...e.result,sharedBy:e.login}),r.value=[],i.value=void 0}async function l(a){await n.resolve(),s.value??=t.cachedComment();let o=t.getAiResult();if(!a&&o)return;let l;try{l=await e.list()}catch{return}let u=n.viewerLogin.value,d=l.find(e=>e.login===u);d&&(s.value={id:d.id,url:d.url});let f=t.getDiff()?.head?.sha,p=e=>({login:e.login,url:e.url,result:e.analysis.result,own:e.login===u,stale:e.analysis.headSha!==f}),m=l.find(e=>e.login===(a??`github-actions[bot]`));if(m){o!==void 0&&o.sharedBy===void 0?r.value=[p(m)]:await c(p(m));return}a&&(i.value=lt(`share.notShared`,{login:a})),o||(r.value=l.map(p))}async function u(e){let t=r.value.find(t=>t.login===e);t?await c(t):await l(e)}function d(){r.value=[],i.value=void 0}async function f(){let r=t.getDiff(),i=t.getAiResult();if(r&&i&&!i.sharedBy){a.value=!0,o.value=void 0;try{let a=await n.write(()=>{let t=n.viewerLogin.value;if(!t)throw Error(lt(`errors.noViewer`));return e.upsert(t,{headSha:r.head?.sha??``,result:i},s.value)});s.value=a;let o=t.getCacheKey();o&&await t.cache.diffs.setSharedComment(o,a)}catch(e){o.value=we(e)}finally{a.value=!1}}}return{store:w({candidates:r,notice:i,viewerLogin:n.viewerLogin,canShare:n.canWrite,isSharing:a,error:o,ownComment:s,dismiss:d,load:u,share:f}),discover:l}}var Ew=`This token cannot write to this repository. It needs the "repo" scope (classic token) or "Pull requests: Read and write" permission (fine-grained token).`;function Dw(e){let t=S(),n=S(),r=C(()=>t.value?.login),i=C(()=>!!t.value?.canWrite&&!n.value);async function a(){t.value=await e()}async function o(e){if(t.value||await a(),!t.value)throw Error(lt(`errors.tokenRequired`));try{return await e()}catch(e){throw e instanceof xt&&e.name===`writeForbidden`&&(n.value=Ew),e}}return{viewerLogin:r,canWrite:i,writeBlockedReason:n,resolve:a,write:o}}function Ow(e,t){let{cache:n}=t,r=S(),a=S({}),o=S(!1),s=S(),c=S(!1),l=S(`llm`),u=S(),f=S(new Set),p=S(new Set),m=d(),h=d();i()&&v(()=>h.value?.abort());let g,_,y=Dw(e.viewer??(async()=>void 0)),b=e.reviews?ww(e.reviews,{cache:n,access:y,getHeadSha:()=>r.value?.head?.sha,getCacheKey:()=>u.value,cachedData:()=>g}):void 0,x=C(()=>a.value[l.value]??a.value[`rule-based`]),T=C(()=>a.value.llm??a.value[`web-llm`]),E=C(()=>r.value&&x.value?Rb(x.value.groups,r.value.files):[]),ee=vt(async()=>{let{createLlmStore:e}=await import(`./llm-store-CVM33nlB.js`);return{createLlmStore:e}},__vite__mapDeps([11,1,3,4,2,5,6,7,8,9,10,12]),import.meta.url).then(({createLlmStore:e})=>{h.value=e({cache:n,diff:r,session:m,getCacheKey:()=>u.value,setResult:e=>a.value={...a.value,llm:e},showLlmResult:()=>ne(`llm`)})});async function D(){r.value&&(f.value=await n.reviewMarks.get(r.value.files.map(e=>e.sha)))}async function O(e,t){await n.reviewMarks.set(e,t);let i=new Set(f.value);for(let n of e)t?i.add(n):i.delete(n);f.value=i;let a=new Set(e),o=r.value?.files.filter(e=>a.has(e.sha)).map(e=>e.path)??[];if(!o.some(e=>p.value.has(e)))return;let s=new Set(p.value);for(let e of o)s.delete(e);p.value=s,u.value&&await n.diffs.setChangedSinceReviewed(u.value,[...s])}async function te(e){if(!r.value)return;let t=await gt(e).analyze(r.value);a.value={...a.value,[e]:t}}de(ut.global.locale,()=>{for(let e of[`rule-based`,`none`])a.value[e]&&te(e)});async function ne(e){l.value=e,e!==`llm`&&a.value[e]===void 0&&await te(e)}async function re(e){let t=e.source;(t===`llm`||t===`web-llm`)&&(h.value?.abort(),a.value={...a.value,[t]:e},m.value=void 0,l.value=t,u.value&&(await n.diffs.setAnalyzedResult(u.value,t,e),await n.diffs.setLlmSession(u.value,void 0)))}let k=e.sharing?Tw(e.sharing,{cache:n,access:y,getDiff:()=>r.value,getCacheKey:()=>u.value,getAiResult:()=>T.value,cachedComment:()=>_,applyResult:re}):void 0;async function A(e,t){r.value=t.diff,u.value=e,p.value=new Set(t.changedSinceReviewed),a.value={...t.analyzedBy,"rule-based":await ft.analyze(t.diff)},m.value=t.llmSession,await D()}async function ie(e,t){h.value?.abort(),await A(e,await n.diffs.putDiff(e,t,t.head?.sha??``));let r=l.value;r!==`rule-based`&&r!==`llm`&&await te(r)}async function ae(){await ie(await e.key(),await e.fetch())}async function j(t){if(e.fingerprint)try{if(await e.fingerprint()===t)return;be.value?await se():c.value=!0}catch{}}async function oe(){o.value=!0,s.value=void 0,c.value=!1;try{let r=await e.key(),i=await n.diffs.get(r);i?(g=i.reviews,_=i.sharedComment,await n.diffs.touch(r),await A(r,i),j(i.headSha)):await ae(),b?.load(),k?.discover(t.from),await ee}catch(e){s.value=e instanceof Error?e:Error(String(e))}finally{o.value=!1}}async function se(){o.value=!0,s.value=void 0;try{await ae(),c.value=!1,b?.load(),k?.discover()}catch(e){s.value=e instanceof Error?e:Error(String(e))}finally{o.value=!1}}let{loadFile:ce}=e,le=ce&&{async load(e){let t=r.value,i=u.value;if(!t?.base||!t.head||!i)throw Error(lt(`errors.diffNotLoaded`));let a=async(e,t)=>{let r=await n.fileContents.get(i,t,e);if(r!==void 0)return r;let a=await ce(e,t);return a!==void 0&&await n.fileContents.set(i,t,e,a),a},[o,s]=await Promise.all([e.status===`added`?void 0:a(e.previousPath??e.path,t.base.sha),e.status===`removed`?void 0:a(e.path,t.head.sha)]);return{old:o,new:s}}},ue=w({layout:Be,setLayout:e=>{Be.value=e}});return w({diff:r,grouped:x,isLoading:o,error:s,isStale:c,reviewed:f,changedSinceReviewed:p,groups:E,aiResult:T,analyzeMode:l,setAnalyzeMode:ne,ui:ue,llm:h,reviews:b,shared:k?.store,fileContent:le,canRefresh:!!e.fingerprint,auth:e.auth,load:oe,refresh:se,setReviewed:O})}export{kb as a,yp as c,jb as i,Sw as n,Nb as o,Mb as r,C_ as s,Ow as t};