@deepseek-insight/dsi 0.5.5

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 (285) hide show
  1. package/LICENSE +204 -0
  2. package/README.md +98 -0
  3. package/bin/dsi.mjs +147 -0
  4. package/build/client/_app/immutable/assets/0.DqFt8jIM.css +2 -0
  5. package/build/client/_app/immutable/assets/2.YlW45hiM.css +1 -0
  6. package/build/client/_app/immutable/assets/codicon.Brq4_Ui5.ttf +0 -0
  7. package/build/client/_app/immutable/assets/editor.jjEx9u7D.css +1 -0
  8. package/build/client/_app/immutable/assets/settings-monaco.C1CMdMvw.css +1 -0
  9. package/build/client/_app/immutable/chunks/-g7BcI22.js +4 -0
  10. package/build/client/_app/immutable/chunks/08VXUWAP.js +1 -0
  11. package/build/client/_app/immutable/chunks/2irkVCIh.js +10 -0
  12. package/build/client/_app/immutable/chunks/43DmfD33.js +1 -0
  13. package/build/client/_app/immutable/chunks/6GKQw8m6.js +99 -0
  14. package/build/client/_app/immutable/chunks/6RTg0lbw.js +1 -0
  15. package/build/client/_app/immutable/chunks/9TvT6fta.js +120 -0
  16. package/build/client/_app/immutable/chunks/B1YSaoU7.js +96 -0
  17. package/build/client/_app/immutable/chunks/B2J2w5EN.js +1 -0
  18. package/build/client/_app/immutable/chunks/B5-_aFwp.js +2 -0
  19. package/build/client/_app/immutable/chunks/B8-Q2PIv.js +1 -0
  20. package/build/client/_app/immutable/chunks/B8J7ngcE.js +1 -0
  21. package/build/client/_app/immutable/chunks/B9JPFI3C.js +2 -0
  22. package/build/client/_app/immutable/chunks/BAZKJuQw.js +1 -0
  23. package/build/client/_app/immutable/chunks/BBKpNcUe.js +1 -0
  24. package/build/client/_app/immutable/chunks/BEEn4gHE.js +1 -0
  25. package/build/client/_app/immutable/chunks/BEtHBSE6.js +1 -0
  26. package/build/client/_app/immutable/chunks/BFoDCU3G.js +1 -0
  27. package/build/client/_app/immutable/chunks/BHtPwB2y.js +847 -0
  28. package/build/client/_app/immutable/chunks/BI-MrBd-.js +1 -0
  29. package/build/client/_app/immutable/chunks/BI4pMaIG.js +1 -0
  30. package/build/client/_app/immutable/chunks/BJL7RCQE.js +4 -0
  31. package/build/client/_app/immutable/chunks/BKxtCVv1.js +1 -0
  32. package/build/client/_app/immutable/chunks/BOfSXrr7.js +1 -0
  33. package/build/client/_app/immutable/chunks/BOotOW0E.js +1 -0
  34. package/build/client/_app/immutable/chunks/BTzV9O1M.js +3 -0
  35. package/build/client/_app/immutable/chunks/BW-FRVGs.js +1 -0
  36. package/build/client/_app/immutable/chunks/BWPQTe0t.js +1 -0
  37. package/build/client/_app/immutable/chunks/BYgofb2h.js +1 -0
  38. package/build/client/_app/immutable/chunks/Ba7i2nA0.js +1 -0
  39. package/build/client/_app/immutable/chunks/Bb19NAkg.js +1 -0
  40. package/build/client/_app/immutable/chunks/Bc_sGQ0U.js +1 -0
  41. package/build/client/_app/immutable/chunks/BeGwcela.js +1 -0
  42. package/build/client/_app/immutable/chunks/BeZqd5lB.js +1 -0
  43. package/build/client/_app/immutable/chunks/Beo7Z46k.js +7 -0
  44. package/build/client/_app/immutable/chunks/BhNEBkk_.js +39 -0
  45. package/build/client/_app/immutable/chunks/BifhSqXX.js +1 -0
  46. package/build/client/_app/immutable/chunks/Bjy-W4x2.js +81 -0
  47. package/build/client/_app/immutable/chunks/BlltJnm0.js +1 -0
  48. package/build/client/_app/immutable/chunks/Bn9NRi0R.js +168 -0
  49. package/build/client/_app/immutable/chunks/BnF5Jm-h.js +1 -0
  50. package/build/client/_app/immutable/chunks/Bp4uuUjI.js +3 -0
  51. package/build/client/_app/immutable/chunks/BrTsmS-o.js +57 -0
  52. package/build/client/_app/immutable/chunks/Bri6UV-V.js +1 -0
  53. package/build/client/_app/immutable/chunks/Btk-1DaX.js +1 -0
  54. package/build/client/_app/immutable/chunks/BwWrilGY.js +1 -0
  55. package/build/client/_app/immutable/chunks/Bxkupp3x.js +1 -0
  56. package/build/client/_app/immutable/chunks/Bz4Y3fRF.js +1 -0
  57. package/build/client/_app/immutable/chunks/C-OQMol4.js +1 -0
  58. package/build/client/_app/immutable/chunks/C-y9NEjX.js +1 -0
  59. package/build/client/_app/immutable/chunks/C1JXY9b5.js +30 -0
  60. package/build/client/_app/immutable/chunks/C2x7inlt.js +321 -0
  61. package/build/client/_app/immutable/chunks/C531GsRP.js +2 -0
  62. package/build/client/_app/immutable/chunks/C5TAQhFO.js +1 -0
  63. package/build/client/_app/immutable/chunks/C5_-GSwl.js +1 -0
  64. package/build/client/_app/immutable/chunks/C6lv30UQ.js +1 -0
  65. package/build/client/_app/immutable/chunks/C7h46wYY.js +1 -0
  66. package/build/client/_app/immutable/chunks/C8Ef5oNN.js +1 -0
  67. package/build/client/_app/immutable/chunks/CA_WNCsl.js +41 -0
  68. package/build/client/_app/immutable/chunks/CC2rA5mh.js +1 -0
  69. package/build/client/_app/immutable/chunks/CHdTS7qa.js +15 -0
  70. package/build/client/_app/immutable/chunks/CIPQ_RoX.js +1 -0
  71. package/build/client/_app/immutable/chunks/CJ_zvTBg.js +72 -0
  72. package/build/client/_app/immutable/chunks/CPEyWost.js +1 -0
  73. package/build/client/_app/immutable/chunks/CPgSxomx.js +1 -0
  74. package/build/client/_app/immutable/chunks/CRfGWb83.js +1 -0
  75. package/build/client/_app/immutable/chunks/CTgm3pse.js +1 -0
  76. package/build/client/_app/immutable/chunks/CVaqCwHa.js +1 -0
  77. package/build/client/_app/immutable/chunks/CWKM3f5q.js +1 -0
  78. package/build/client/_app/immutable/chunks/CWVpRRWx.js +162 -0
  79. package/build/client/_app/immutable/chunks/CXMH3UgJ.js +257 -0
  80. package/build/client/_app/immutable/chunks/CZ-RNlot.js +1 -0
  81. package/build/client/_app/immutable/chunks/CZXl7qUb.js +70 -0
  82. package/build/client/_app/immutable/chunks/C_N-eONP.js +1 -0
  83. package/build/client/_app/immutable/chunks/Cb1pwoev.js +1 -0
  84. package/build/client/_app/immutable/chunks/CcL1k2On.js +11 -0
  85. package/build/client/_app/immutable/chunks/CcWV7GYH.js +1 -0
  86. package/build/client/_app/immutable/chunks/CcwsVR0C.js +1 -0
  87. package/build/client/_app/immutable/chunks/Cd6K7Y8m.js +1 -0
  88. package/build/client/_app/immutable/chunks/CfSJPG6W.js +1 -0
  89. package/build/client/_app/immutable/chunks/CfZ7uSQe.js +38 -0
  90. package/build/client/_app/immutable/chunks/Cimd5fb3.js +1 -0
  91. package/build/client/_app/immutable/chunks/Cj-Zm41R.js +36 -0
  92. package/build/client/_app/immutable/chunks/CjZ_QSbm.js +1 -0
  93. package/build/client/_app/immutable/chunks/CkrcOjFY.js +1 -0
  94. package/build/client/_app/immutable/chunks/ClamHrr6.js +1 -0
  95. package/build/client/_app/immutable/chunks/Cm7r79vr.js +1 -0
  96. package/build/client/_app/immutable/chunks/CmbEK4CY.js +84 -0
  97. package/build/client/_app/immutable/chunks/CmvnEPtD.js +7 -0
  98. package/build/client/_app/immutable/chunks/CopQ2nXW.js +1 -0
  99. package/build/client/_app/immutable/chunks/CpzslTdj.js +1 -0
  100. package/build/client/_app/immutable/chunks/CsHVnZCH.js +1 -0
  101. package/build/client/_app/immutable/chunks/CsQS60Ue.js +1 -0
  102. package/build/client/_app/immutable/chunks/CuRJVwEq.js +1 -0
  103. package/build/client/_app/immutable/chunks/D-oSqn_W.js +1 -0
  104. package/build/client/_app/immutable/chunks/D-ptJ9y-.js +1 -0
  105. package/build/client/_app/immutable/chunks/D05T4iGw.js +1 -0
  106. package/build/client/_app/immutable/chunks/D0I62FkS.js +1 -0
  107. package/build/client/_app/immutable/chunks/D16vkywU.js +1 -0
  108. package/build/client/_app/immutable/chunks/D1qzYj9m.js +1 -0
  109. package/build/client/_app/immutable/chunks/D3hlyOfw.js +1 -0
  110. package/build/client/_app/immutable/chunks/D4gq_dik.js +1 -0
  111. package/build/client/_app/immutable/chunks/D7fX-3xy.js +1 -0
  112. package/build/client/_app/immutable/chunks/D8-5qLJg.js +231 -0
  113. package/build/client/_app/immutable/chunks/D8hlhfM3.js +1 -0
  114. package/build/client/_app/immutable/chunks/DAS1CLuE.js +24 -0
  115. package/build/client/_app/immutable/chunks/DGarjVZC.js +1 -0
  116. package/build/client/_app/immutable/chunks/DGd2pJF5.js +1 -0
  117. package/build/client/_app/immutable/chunks/DHpiXF5c.js +1 -0
  118. package/build/client/_app/immutable/chunks/DHwB1DNv.js +161 -0
  119. package/build/client/_app/immutable/chunks/DIMkf-bt.js +3 -0
  120. package/build/client/_app/immutable/chunks/DISqw1ZD.js +1 -0
  121. package/build/client/_app/immutable/chunks/DITEY8D_.js +62 -0
  122. package/build/client/_app/immutable/chunks/DL0yNkAA.js +1 -0
  123. package/build/client/_app/immutable/chunks/DL1Hc2zs.js +1 -0
  124. package/build/client/_app/immutable/chunks/DLOOos_8.js +292 -0
  125. package/build/client/_app/immutable/chunks/DMUM7wLl.js +1 -0
  126. package/build/client/_app/immutable/chunks/DPKol_4Z.js +139 -0
  127. package/build/client/_app/immutable/chunks/DS17s2tU.js +1 -0
  128. package/build/client/_app/immutable/chunks/DT7zqm-g.js +1 -0
  129. package/build/client/_app/immutable/chunks/DTj74zXo.js +1 -0
  130. package/build/client/_app/immutable/chunks/DV3o63ZY.js +1 -0
  131. package/build/client/_app/immutable/chunks/DVXVVWkX.js +129 -0
  132. package/build/client/_app/immutable/chunks/DWDfcLfy.js +206 -0
  133. package/build/client/_app/immutable/chunks/DXeGLmed.js +8 -0
  134. package/build/client/_app/immutable/chunks/DYqsupvX.js +1 -0
  135. package/build/client/_app/immutable/chunks/DZ6u0Z-K.js +1 -0
  136. package/build/client/_app/immutable/chunks/DZFCIeNp.js +1 -0
  137. package/build/client/_app/immutable/chunks/D_Lu-MrJ.js +1 -0
  138. package/build/client/_app/immutable/chunks/DauUninz.js +1 -0
  139. package/build/client/_app/immutable/chunks/DbInun42.js +1 -0
  140. package/build/client/_app/immutable/chunks/DbcKN35_.js +3 -0
  141. package/build/client/_app/immutable/chunks/DcZe4Woe.js +1 -0
  142. package/build/client/_app/immutable/chunks/DdL9SqIa.js +1 -0
  143. package/build/client/_app/immutable/chunks/De2hgUGE.js +1 -0
  144. package/build/client/_app/immutable/chunks/DezsRK8O.js +1 -0
  145. package/build/client/_app/immutable/chunks/Dg_UWGX7.js +24 -0
  146. package/build/client/_app/immutable/chunks/Dj2t5yNg.js +1 -0
  147. package/build/client/_app/immutable/chunks/DkqhCAOL.js +1 -0
  148. package/build/client/_app/immutable/chunks/DlQrSOw4.js +7 -0
  149. package/build/client/_app/immutable/chunks/DmHpPYUd.js +1 -0
  150. package/build/client/_app/immutable/chunks/Dmn-tsie.js +1 -0
  151. package/build/client/_app/immutable/chunks/DpFanUEy.js +298 -0
  152. package/build/client/_app/immutable/chunks/DqwfDHZH.js +89 -0
  153. package/build/client/_app/immutable/chunks/Dr0pcX_F.js +1 -0
  154. package/build/client/_app/immutable/chunks/DrH0SRf2.js +1 -0
  155. package/build/client/_app/immutable/chunks/DsF7k-Jl.js +1 -0
  156. package/build/client/_app/immutable/chunks/DtBGId5S.js +2 -0
  157. package/build/client/_app/immutable/chunks/DuM1hSCa.js +1 -0
  158. package/build/client/_app/immutable/chunks/Du_ODUAO.js +1 -0
  159. package/build/client/_app/immutable/chunks/DvCMcJ3P.js +1 -0
  160. package/build/client/_app/immutable/chunks/Dy-Kn_BL.js +1 -0
  161. package/build/client/_app/immutable/chunks/DzVMo6mB.js +62 -0
  162. package/build/client/_app/immutable/chunks/ESmLJICu.js +1 -0
  163. package/build/client/_app/immutable/chunks/FvmIjYaQ.js +1 -0
  164. package/build/client/_app/immutable/chunks/GBaNblmo.js +1 -0
  165. package/build/client/_app/immutable/chunks/HclGiUj8.js +1 -0
  166. package/build/client/_app/immutable/chunks/Ju5jF6hy.js +1 -0
  167. package/build/client/_app/immutable/chunks/KythIMN8.js +1 -0
  168. package/build/client/_app/immutable/chunks/LWre5GKl.js +40 -0
  169. package/build/client/_app/immutable/chunks/NEE52Syq.js +1 -0
  170. package/build/client/_app/immutable/chunks/No6lfiAw.js +1 -0
  171. package/build/client/_app/immutable/chunks/OmE6SGvs.js +106 -0
  172. package/build/client/_app/immutable/chunks/P_ok0Z_j.js +2 -0
  173. package/build/client/_app/immutable/chunks/PaZBB01u.js +1 -0
  174. package/build/client/_app/immutable/chunks/Rh9cy7xg.js +2 -0
  175. package/build/client/_app/immutable/chunks/SOo6toE5.js +1 -0
  176. package/build/client/_app/immutable/chunks/TNLUqJaC.js +1 -0
  177. package/build/client/_app/immutable/chunks/UNxFjlik.js +1 -0
  178. package/build/client/_app/immutable/chunks/UmdltqoE.js +1 -0
  179. package/build/client/_app/immutable/chunks/Z5eAx3Zn.js +1 -0
  180. package/build/client/_app/immutable/chunks/bTuwJoIa.js +1 -0
  181. package/build/client/_app/immutable/chunks/fmXr3nnJ.js +1 -0
  182. package/build/client/_app/immutable/chunks/fybaL0A-.js +1 -0
  183. package/build/client/_app/immutable/chunks/gp-XZpBa.js +3 -0
  184. package/build/client/_app/immutable/chunks/h-p5ZdY8.js +1 -0
  185. package/build/client/_app/immutable/chunks/hxYEUgOo.js +1 -0
  186. package/build/client/_app/immutable/chunks/i0VQdJtv.js +1 -0
  187. package/build/client/_app/immutable/chunks/i0X4ZdIN.js +1 -0
  188. package/build/client/_app/immutable/chunks/mVHw7KEX.js +7 -0
  189. package/build/client/_app/immutable/chunks/nDMCpPkF.js +1 -0
  190. package/build/client/_app/immutable/chunks/nr791fC2.js +1 -0
  191. package/build/client/_app/immutable/chunks/onAF5SnQ.js +1 -0
  192. package/build/client/_app/immutable/chunks/oz_6vUea.js +1 -0
  193. package/build/client/_app/immutable/chunks/qEGLx2Wc.js +78 -0
  194. package/build/client/_app/immutable/chunks/raVGrKQy.js +44 -0
  195. package/build/client/_app/immutable/chunks/sBoK_t0W.js +1 -0
  196. package/build/client/_app/immutable/chunks/sIEmSkn6.js +34 -0
  197. package/build/client/_app/immutable/chunks/wFIeY1Cf.js +88 -0
  198. package/build/client/_app/immutable/chunks/xihTtKlq.js +1 -0
  199. package/build/client/_app/immutable/chunks/zpcgJjUg.js +127 -0
  200. package/build/client/_app/immutable/entry/app.B2QxMn0t.js +2 -0
  201. package/build/client/_app/immutable/entry/start.BR3A4iFi.js +1 -0
  202. package/build/client/_app/immutable/nodes/0.B_ZEZy7b.js +1 -0
  203. package/build/client/_app/immutable/nodes/1.By3Gd2cs.js +1 -0
  204. package/build/client/_app/immutable/nodes/2.1TAwiWw1.js +69 -0
  205. package/build/client/_app/immutable/workers/css.worker-DRH2OcAG.js +93 -0
  206. package/build/client/_app/immutable/workers/html.worker-DQLddT9h.js +506 -0
  207. package/build/client/_app/immutable/workers/json.worker-D_Dqrls5.js +62 -0
  208. package/build/client/_app/immutable/workers/settings-editor-worker-D9zwrD0f.js +30 -0
  209. package/build/client/_app/immutable/workers/ts.worker-DkYoA6bF.js +67738 -0
  210. package/build/client/_app/immutable/workers/yaml.worker-BTGFEDOA.js +449 -0
  211. package/build/client/_app/version.json +1 -0
  212. package/build/client/favicon.svg +7 -0
  213. package/build/env.js +70 -0
  214. package/build/handler.js +23 -0
  215. package/build/index.js +146 -0
  216. package/build/server/chunks/chunks/a2a-protocol.js-C77mVg2Q.js +52 -0
  217. package/build/server/chunks/chunks/app-config.svelte.js-Co9jacqT.js +52 -0
  218. package/build/server/chunks/chunks/config.js-BBYogCe7.js +123 -0
  219. package/build/server/chunks/chunks/db.js-DcmO3JAx.js +120 -0
  220. package/build/server/chunks/chunks/db2.js-DBltVUGg.js +717 -0
  221. package/build/server/chunks/chunks/dsh-connection.js-DwihVtk_.js +1957 -0
  222. package/build/server/chunks/chunks/dsh-events.js-BtDxaV6Q.js +706 -0
  223. package/build/server/chunks/chunks/env.js-l0sNRNKZ.js +2 -0
  224. package/build/server/chunks/chunks/exports.js-DMiPee3x.js +263 -0
  225. package/build/server/chunks/chunks/goal-projection.js-0_34t60K.js +44 -0
  226. package/build/server/chunks/chunks/image-limits.js-BMPZ55kJ.js +186 -0
  227. package/build/server/chunks/chunks/insight-config.js-CfMPTA6Z.js +352 -0
  228. package/build/server/chunks/chunks/internal.js-CQzEjdyk.js +747 -0
  229. package/build/server/chunks/chunks/internal2.js-D-DAuSVh.js +22 -0
  230. package/build/server/chunks/chunks/server.js-DoCd0fEo.js +4104 -0
  231. package/build/server/chunks/chunks/shared.js-C4-Py8s_.js +775 -0
  232. package/build/server/chunks/chunks/state.js-CpmOS0a2.js +114 -0
  233. package/build/server/chunks/chunks/uneval.js-BJ9Qq2SF.js +488 -0
  234. package/build/server/chunks/chunks/utils.js-tOWCe9Wk.js +933 -0
  235. package/build/server/chunks/chunks/watcher.js-BelxjMOP.js +473 -0
  236. package/build/server/chunks/entries/endpoints/api/a2a/_id_/_server.ts.js-B4HUNFZv.js +37 -0
  237. package/build/server/chunks/entries/endpoints/api/a2a/_server.ts.js-JDV_oqbX.js +61 -0
  238. package/build/server/chunks/entries/endpoints/api/a2a/register/_server.ts.js-Dxwc-7-5.js +99 -0
  239. package/build/server/chunks/entries/endpoints/api/config/_server.ts.js-D8i35bGH.js +35 -0
  240. package/build/server/chunks/entries/endpoints/api/dsh/directory/_server.ts.js-CeBU1G85.js +43 -0
  241. package/build/server/chunks/entries/endpoints/api/dsh/pick-directory/_server.ts.js-CyrVUxv3.js +36 -0
  242. package/build/server/chunks/entries/endpoints/api/dsh/presets/_server.ts.js-qeO_1htT.js +33 -0
  243. package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/attachment/_server.ts.js-DnHffohz.js +44 -0
  244. package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/cancel/_server.ts.js-fm6MFyjP.js +33 -0
  245. package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/catalog/_server.ts.js-wJ9V_Ue7.js +42 -0
  246. package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/command/_server.ts.js-o83L4GUY.js +85 -0
  247. package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/events/_server.ts.js-DLCHSC1M.js +212 -0
  248. package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/fork/_server.ts.js-Ca6NU9HO.js +58 -0
  249. package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/goal/_server.ts.js-RteR85vn.js +138 -0
  250. package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/history/_server.ts.js-CEKDkK7v.js +55 -0
  251. package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/models/_server.ts.js-D7ziyW3d.js +35 -0
  252. package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/permission/_server.ts.js-DbkD4JZb.js +92 -0
  253. package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/prompt/_server.ts.js-eOLNlf1-.js +94 -0
  254. package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/rename/_server.ts.js-txQRocK9.js +57 -0
  255. package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/respond/_server.ts.js-D3WGYzkE.js +69 -0
  256. package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/select-model/_server.ts.js-g2GtvLTs.js +69 -0
  257. package/build/server/chunks/entries/endpoints/api/dsh/sessions/_server.ts.js-17yKojU_.js +85 -0
  258. package/build/server/chunks/entries/endpoints/api/dsh/workspace-file/_server.ts.js-D16pEhvd.js +99 -0
  259. package/build/server/chunks/entries/endpoints/api/dsh/workspace-file/save/_server.ts.js-BXpZNLK8.js +110 -0
  260. package/build/server/chunks/entries/endpoints/api/dsh/workspace-file-bytes/_server.ts.js-hBlyjq-x.js +113 -0
  261. package/build/server/chunks/entries/endpoints/api/dsh/workspace-tree/_server.ts.js-KWRnsAkm.js +59 -0
  262. package/build/server/chunks/entries/endpoints/api/dsh/workspaces/_server.ts.js-DzNvvCxK.js +55 -0
  263. package/build/server/chunks/entries/endpoints/api/dsh/workspaces/_workspaceId_/delete/_server.ts.js-MK5925CY.js +45 -0
  264. package/build/server/chunks/entries/endpoints/api/dsh/workspaces/_workspaceId_/rename/_server.ts.js-w3Mo0nf7.js +63 -0
  265. package/build/server/chunks/entries/endpoints/api/prompts/_id_/_server.ts.js-CInfjM-i.js +64 -0
  266. package/build/server/chunks/entries/endpoints/api/prompts/_server.ts.js-C1lqP1OV.js +87 -0
  267. package/build/server/chunks/entries/endpoints/api/prompts/use/_server.ts.js-B36YMKMt.js +54 -0
  268. package/build/server/chunks/entries/endpoints/api/settings/_server.ts.js-CHvHNzeB.js +101 -0
  269. package/build/server/chunks/entries/pages/_error.svelte.js-BE3-BWDd.js +41 -0
  270. package/build/server/chunks/entries/pages/_layout.svelte.js-EFiihTdF.js +18 -0
  271. package/build/server/chunks/entries/pages/_layout.ts.js-CNSo-Z1U.js +22 -0
  272. package/build/server/chunks/entries/pages/_page.server.ts.js-Bk8UuUXA.js +85 -0
  273. package/build/server/chunks/entries/pages/_page.svelte.js-CfmKQYLK.js +13883 -0
  274. package/build/server/chunks/handler-BshnD4Y4.js +1735 -0
  275. package/build/server/chunks/index.js-I_pMeIwQ.js +3864 -0
  276. package/build/server/chunks/manifest.js-DwhpAk_y.js +273 -0
  277. package/build/server/chunks/nodes/0.js-DCyDo8-C.js +12 -0
  278. package/build/server/chunks/nodes/1.js-Dx7z_VWN.js +9 -0
  279. package/build/server/chunks/nodes/2.js-CLw9pxho.js +24 -0
  280. package/build/shims.js +33 -0
  281. package/package.json +65 -0
  282. package/template/.dsi/a2a.sqlite +0 -0
  283. package/template/.dsi/config.json +42 -0
  284. package/template/.dsi/prompts.sqlite +0 -0
  285. package/template/.dsi/settings.yaml +33 -0
@@ -0,0 +1,449 @@
1
+ (function(){var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));let u=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?g.isErrorNoTelemetry(e)?new g(e.message+`
2
+
3
+ `+e.stack):Error(e.message+`
4
+
5
+ `+e.stack):e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function d(e){m(e)||u.onUnexpectedError(e)}function f(e){m(e)||u.onUnexpectedExternalError(e)}function p(e){if(e instanceof Error){let{name:t,message:n,cause:r}=e;return{$isError:!0,name:t,message:n,stack:e.stacktrace||e.stack,noTelemetry:g.isErrorNoTelemetry(e),cause:r?p(r):void 0,code:e.code}}return e}function m(e){return e instanceof h||e instanceof Error&&e.name===`Canceled`&&e.message===`Canceled`}var h=class extends Error{constructor(){super(`Canceled`),this.name=this.message}},g=class e extends Error{constructor(e){super(e),this.name=`CodeExpectedError`}static fromError(t){if(t instanceof e)return t;let n=new e;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(e){return e.name===`CodeExpectedError`}},_=class e extends Error{constructor(t){super(t||`An unexpected bug occurred.`),Object.setPrototypeOf(this,e.prototype)}};function v(e,t=`Unreachable`){throw Error(t)}function y(e,t=`unexpected state`){if(!e)throw typeof t==`string`?new _(`Assertion Failed: ${t}`):t}function b(e){e()||(e(),d(new _(`Assertion Failed`)))}function x(e,t){let n=0;for(;n<e.length-1;){let r=e[n],i=e[n+1];if(!t(r,i))return!1;n++}return!0}function S(e){return typeof e==`string`}function C(e){return!!e&&typeof e[Symbol.iterator]==`function`}var ee;(function(e){function t(e){return!!e&&typeof e==`object`&&typeof e[Symbol.iterator]==`function`}e.is=t;let n=Object.freeze([]);function r(){return n}e.empty=r;function*i(e){yield e}e.single=i;function a(e){return t(e)?e:i(e)}e.wrap=a;function o(e){return e??n}e.from=o;function*s(e){for(let t=e.length-1;t>=0;t--)yield e[t]}e.reverse=s;function c(e){return!e||e[Symbol.iterator]().next().done===!0}e.isEmpty=c;function l(e){return e[Symbol.iterator]().next().value}e.first=l;function u(e,t){let n=0;for(let r of e)if(t(r,n++))return!0;return!1}e.some=u;function d(e,t){let n=0;for(let r of e)if(!t(r,n++))return!1;return!0}e.every=d;function f(e,t){for(let n of e)if(t(n))return n}e.find=f;function*p(e,t){for(let n of e)t(n)&&(yield n)}e.filter=p;function*m(e,t){let n=0;for(let r of e)yield t(r,n++)}e.map=m;function*h(e,t){let n=0;for(let r of e)yield*t(r,n++)}e.flatMap=h;function*g(...e){for(let t of e)C(t)?yield*t:yield t}e.concat=g;function _(e,t,n){let r=n;for(let n of e)r=t(r,n);return r}e.reduce=_;function v(e){let t=0;for(let n of e)t++;return t}e.length=v;function*y(e,t,n=e.length){for(t<-e.length&&(t=0),t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);t<n;t++)yield e[t]}e.slice=y;function b(t,n=1/0){let r=[];if(n===0)return[r,t];let i=t[Symbol.iterator]();for(let t=0;t<n;t++){let t=i.next();if(t.done)return[r,e.empty()];r.push(t.value)}return[r,{[Symbol.iterator](){return i}}]}e.consume=b;async function x(e){let t=[];for await(let n of e)t.push(n);return t}e.asyncToArray=x;async function S(e){let t=[];for await(let n of e)t=t.concat(n);return t}e.asyncToArrayFlat=S})(ee||={});function te(e){if(ee.is(e)){let t=[];for(let n of e)if(n)try{n.dispose()}catch(e){t.push(e)}if(t.length===1)throw t[0];if(t.length>1)throw AggregateError(t,`Encountered errors while disposing of store`);return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function ne(...e){return ie(()=>te(e))}var re=class{constructor(e){this._isDisposed=!1,this._fn=e}dispose(){if(!this._isDisposed){if(!this._fn)throw Error(`Unbound disposable context: Need to use an arrow function to preserve the value of this`);this._isDisposed=!0,this._fn()}}};function ie(e){return new re(e)}var ae=class e{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{te(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t||t===oe.None)return t;if(t===this)throw Error(`Cannot register a disposable on itself!`);return this._isDisposed?e.DISABLE_DISPOSED_WARNING||console.warn(Error(`Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!`).stack):this._toDispose.add(t),t}delete(e){if(e){if(e===this)throw Error(`Cannot dispose a disposable on itself!`);this._toDispose.delete(e),e.dispose()}}},oe=class{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new ae,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw Error(`Cannot register a disposable on itself!`);return this._store.add(e)}},se=class e{static{this.Undefined=new e(void 0)}constructor(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}},ce=class{constructor(){this._first=se.Undefined,this._last=se.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===se.Undefined}clear(){let e=this._first;for(;e!==se.Undefined;){let t=e.next;e.prev=se.Undefined,e.next=se.Undefined,e=t}this._first=se.Undefined,this._last=se.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let n=new se(e);if(this._first===se.Undefined)this._first=n,this._last=n;else if(t){let e=this._last;this._last=n,n.prev=e,e.next=n}else{let e=this._first;this._first=n,n.next=e,e.prev=n}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(n))}}shift(){if(this._first!==se.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==se.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==se.Undefined&&e.next!==se.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===se.Undefined&&e.next===se.Undefined?(this._first=se.Undefined,this._last=se.Undefined):e.next===se.Undefined?(this._last=this._last.prev,this._last.next=se.Undefined):e.prev===se.Undefined&&(this._first=this._first.next,this._first.prev=se.Undefined);--this._size}*[Symbol.iterator](){let e=this._first;for(;e!==se.Undefined;)yield e.element,e=e.next}};function le(){return globalThis._VSCODE_NLS_MESSAGES}function ue(){return globalThis._VSCODE_NLS_LANGUAGE}let de=ue()===`pseudo`||typeof document<`u`&&document.location&&typeof document.location.hash==`string`&&document.location.hash.indexOf(`pseudo=true`)>=0;function fe(e,t){let n;return n=t.length===0?e:e.replace(/\{(\d+)\}/g,(e,n)=>{let r=t[n[0]],i=e;return typeof r==`string`?i=r:(typeof r==`number`||typeof r==`boolean`||r==null)&&(i=String(r)),i}),de&&(n=`[`+n.replace(/[aouei]/g,`$&$&`)+`]`),n}function w(e,t,...n){return fe(typeof e==`number`?pe(e,t):t,n)}function pe(e,t){let n=le()?.[e];if(typeof n!=`string`){if(typeof t==`string`)return t;throw Error(`!!! NLS MISSING: ${e} !!!`)}return n}let me=!1,he=!1,ge=!1,_e=!1,ve=!1,ye,be=globalThis,xe;be.vscode!==void 0&&be.vscode.process!==void 0?xe=be.vscode.process:typeof process<`u`&&typeof process?.versions?.node==`string`&&(xe=process);let Se=typeof xe?.versions?.electron==`string`&&xe?.type===`renderer`;if(typeof xe==`object`){me=xe.platform===`win32`,he=xe.platform===`darwin`,ge=xe.platform===`linux`,ge&&xe.env.SNAP&&xe.env.SNAP_REVISION,xe.env.CI||xe.env.BUILD_ARTIFACTSTAGINGDIRECTORY||xe.env.GITHUB_WORKSPACE;let e=xe.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);t.userLocale,t.osLocale,t.resolvedLanguage,t.languagePack?.translationsConfigFile}catch{}_e=!0}else typeof navigator==`object`&&!Se?(ye=navigator.userAgent,me=ye.indexOf(`Windows`)>=0,he=ye.indexOf(`Macintosh`)>=0,(ye.indexOf(`Macintosh`)>=0||ye.indexOf(`iPad`)>=0||ye.indexOf(`iPhone`)>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,ge=ye.indexOf(`Linux`)>=0,ye?.indexOf(`Mobi`),ve=!0,ue(),navigator.language.toLowerCase()):console.error(`Unable to resolve platform.`);let Ce=me,we=he,Te=_e,Ee=ve,De=ve&&typeof be.importScripts==`function`?be.origin:void 0,Oe=ye,ke=typeof be.postMessage==`function`&&!be.importScripts;(()=>{if(ke){let e=[];be.addEventListener(`message`,t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,r=e.length;n<r;n++){let r=e[n];if(r.id===t.data.vscodeScheduleAsyncWork){e.splice(n,1),r.callback();return}}});let t=0;return n=>{let r=++t;e.push({id:r,callback:n}),be.postMessage({vscodeScheduleAsyncWork:r},`*`)}}return e=>setTimeout(e)})();let Ae=!!(Oe&&Oe.indexOf(`Chrome`)>=0);Oe&&Oe.indexOf(`Firefox`),!Ae&&Oe&&Oe.indexOf(`Safari`),Oe&&Oe.indexOf(`Edg/`),Oe&&Oe.indexOf(`Android`);let je,Me=globalThis.vscode;if(Me!==void 0&&Me.process!==void 0){let e=Me.process;je={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else je=typeof process<`u`&&typeof process?.versions?.node==`string`?{get platform(){return process.platform},get arch(){return process.arch},get env(){return{}},cwd(){return{}.VSCODE_CWD||process.cwd()}}:{get platform(){return Ce?`win32`:we?`darwin`:`linux`},get arch(){},get env(){return{}},cwd(){return`/`}};let Ne=je.cwd,Pe=je.env,Fe=je.platform,Ie=globalThis.performance.now.bind(globalThis.performance);var Le=class e{static create(t){return new e(t)}constructor(e){this._now=e===!1?Date.now:Ie,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime===-1?this._now()-this._startTime:this._stopTime-this._startTime}};let Re=6e4;function ze(){return!!Pe.VSCODE_DEV}var Be;(function(e){e.None=()=>oe.None;function t(e,t,n){return f(e,()=>void 0,0,void 0,t??!0,void 0,n)}e.defer=t;function n(e){return(t,n=null,r)=>{let i=!1,a;return a=e(e=>{if(!i)return a?a.dispose():i=!0,t.call(n,e)},null,r),i&&a.dispose(),a}}e.once=n;function r(t,n){return e.once(e.filter(t,n))}e.onceIf=r;function i(e,t,n){return u((n,r=null,i)=>e(e=>n.call(r,t(e)),null,i),n)}e.map=i;function a(e,t,n){return u((n,r=null,i)=>e(e=>{t(e),n.call(r,e)},null,i),n)}e.forEach=a;function o(e,t,n){return u((n,r=null,i)=>e(e=>t(e)&&n.call(r,e),null,i),n)}e.filter=o;function s(e){return e}e.signal=s;function c(...e){return(t,n=null,r)=>d(ne(...e.map(e=>e(e=>t.call(n,e)))),r)}e.any=c;function l(e,t,n,r){let a=n;return i(e,e=>(a=t(a,e),a),r)}e.reduce=l;function u(e,t){let n,r=new qe({onWillAddFirstListener(){n=e(r.fire,r)},onDidRemoveLastListener(){n?.dispose()}});return t?.add(r),r.event}function d(e,t){return t instanceof Array?t.push(e):t&&t.add(e),e}function f(e,t,n=100,r=!1,i=!1,a,o){let s,c,l,u=0,d,f=new qe({leakWarningThreshold:a,onWillAddFirstListener(){s=e(e=>{u++,c=t(c,e),r&&!l&&(f.fire(c),c=void 0),d=()=>{let e=c;c=void 0,l=void 0,(!r||u>1)&&f.fire(e),u=0},typeof n==`number`?(l&&clearTimeout(l),l=setTimeout(d,n)):l===void 0&&(l=null,queueMicrotask(d))})},onWillRemoveListener(){i&&u>0&&d?.()},onDidRemoveLastListener(){d=void 0,s.dispose()}});return o?.add(f),f.event}e.debounce=f;function p(t,n=0,r,i){return e.debounce(t,(e,t)=>e?(e.push(t),e):[t],n,void 0,r??!0,void 0,i)}e.accumulate=p;function m(e,t,n=100,r=!0,i=!0,a,o){let s,c,l,u=0,d=new qe({leakWarningThreshold:a,onWillAddFirstListener(){s=e(e=>{u++,c=t(c,e),l===void 0&&(r&&(d.fire(c),c=void 0,u=0),typeof n==`number`?l=setTimeout(()=>{i&&u>0&&d.fire(c),c=void 0,l=void 0,u=0},n):(l=0,queueMicrotask(()=>{i&&u>0&&d.fire(c),c=void 0,l=void 0,u=0})))})},onDidRemoveLastListener(){s.dispose()}});return o?.add(d),d.event}e.throttle=m;function h(e,t=(e,t)=>e===t,n){let r=!0,i;return o(e,e=>{let n=r||!t(e,i);return r=!1,i=e,n},n)}e.latch=h;function g(t,n,r){return[e.filter(t,n,r),e.filter(t,e=>!n(e),r)]}e.split=g;function _(e,t,n=!1,r=[],i){let a=r.slice(),o;ze()&&(o={stack:Ue.create(),timerId:setTimeout(()=>{a&&a.length>0&&o&&!o.warned&&(o.warned=!0,console.warn(`[Event.buffer][${t}] potential LEAK detected: ${a.length} events buffered for ${Re/1e3}s without being consumed. Buffered here:`),o.stack.print())},Re),warned:!1},i&&i.add(ie(()=>clearTimeout(o.timerId))));let s=()=>{o&&clearTimeout(o.timerId)},c=e(e=>{a?(a.push(e),ze()&&o&&!o.warned&&a.length>=100&&(o.warned=!0,console.warn(`[Event.buffer][${t}] potential LEAK detected: ${a.length} events buffered without being consumed. Buffered here:`),o.stack.print())):u.fire(e)});i&&i.add(c);let l=()=>{a?.forEach(e=>u.fire(e)),a=null,s()},u=new qe({onWillAddFirstListener(){c||(c=e(e=>u.fire(e)),i&&i.add(c))},onDidAddFirstListener(){a&&(n?setTimeout(l):l())},onDidRemoveLastListener(){c&&c.dispose(),c=null,s()}});return i&&i.add(u),u.event}e.buffer=_;function v(e,t){return(n,r,i)=>{let a=t(new b);return e(function(e){let t=a.evaluate(e);t!==y&&n.call(r,t)},void 0,i)}}e.chain=v;let y=Symbol(`HaltChainable`);class b{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push(t=>(e(t),t)),this}filter(e){return this.steps.push(t=>e(t)?t:y),this}reduce(e,t){let n=t;return this.steps.push(t=>(n=e(n,t),n)),this}latch(e=(e,t)=>e===t){let t=!0,n;return this.steps.push(r=>{let i=t||!e(r,n);return t=!1,n=r,i?r:y}),this}evaluate(e){for(let t of this.steps)if(e=t(e),e===y)break;return e}}function x(e,t,n=e=>e){let r=(...e)=>i.fire(n(...e)),i=new qe({onWillAddFirstListener:()=>e.on(t,r),onDidRemoveLastListener:()=>e.removeListener(t,r)});return i.event}e.fromNodeEventEmitter=x;function S(e,t,n=e=>e){let r=(...e)=>i.fire(n(...e)),i=new qe({onWillAddFirstListener:()=>e.addEventListener(t,r),onDidRemoveLastListener:()=>e.removeEventListener(t,r)});return i.event}e.fromDOMEventEmitter=S;function C(e,t){let r,i,a=new Promise(a=>{i=n(e)(a),Ye(i,t),r=()=>{Xe(i,t)}});return a.cancel=r,t&&a.finally(()=>Xe(i,t)),a}e.toPromise=C;function ee(e,t){return e(e=>t.fire(e))}e.forward=ee;function te(e,t,n){return t(n),e(e=>t(e))}e.runAndSubscribe=te;class re{constructor(e,t){this._observable=e,this._counter=0,this._hasChanged=!1;let n={onWillAddFirstListener:()=>{e.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{e.removeObserver(this)}};this.emitter=new qe(n),t&&t.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function ae(e,t){return new re(e,t).emitter.event}e.fromObservable=ae;function se(e){return(t,n,r)=>{let i=0,a=!1,o={beginUpdate(){i++},endUpdate(){i--,i===0&&(e.reportChanges(),a&&(a=!1,t.call(n)))},handlePossibleChange(){},handleChange(){a=!0}};e.addObserver(o),e.reportChanges();let s={dispose(){e.removeObserver(o)}};return Ye(s,r),s}}e.fromObservableLight=se})(Be||={});var Ve=class e{static{this.all=new Set}static{this._idPool=0}constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${e._idPool++}`,e.all.add(this)}start(e){this._stopWatch=new Le,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}},He=class e{static{this._idPool=1}constructor(t,n,r=(e._idPool++).toString(16).padStart(3,`0`)){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){let n=this.threshold;if(n<=0||t<n)return;this._stacks||=new Map;let r=this._stacks.get(e.value)||0;if(this._stacks.set(e.value,r+1),--this._warnCountdown,this._warnCountdown<=0){this._warnCountdown=n*.5;let[e,r]=this.getMostFrequentStack(),i=/^[0-9a-f]+$/i.test(this.name)?void 0:this.name,a=`[${this.name}] potential listener LEAK detected, having ${t} listeners already. MOST frequent listener (${r}):`;console.warn(a),console.warn(e);let o=new We(r/t>.3?`dominated`:`popular`,a,e,t,i);this._errorHandler(o)}return()=>{let t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(let[n,r]of this._stacks)(!e||t<r)&&(e=[n,r],t=r);return e}},Ue=class e{static create(){return new e(Error().stack??``)}constructor(e){this.value=e}print(){console.warn(this.value.split(`
6
+ `).slice(2).join(`
7
+ `))}},We=class e extends Error{constructor(e,t,n,r,i){super(i?`[${i}] potential listener LEAK detected, ${e}`:`potential listener LEAK detected, ${e}`),this.name=`ListenerLeakError`,this.kind=e,this.listenerCount=r,this.details=t,this.stack=n}static is(t){return t instanceof e||t instanceof Error&&typeof t.kind==`string`&&typeof t.listenerCount==`number`}},Ge=class extends We{constructor(e,t,n,r,i){super(e,t,n,r,i),this.name=`ListenerRefusalError`}},Ke=class{constructor(e){this.value=e}},qe=class{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new He(e?.onListenerError??d,this._options?.leakWarningThreshold??-1,this._options?.leakWarningName):void 0,this._perfMon=this._options?._profName?new Ve(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,t,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let e=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(e);let t=this._leakageMon.getMostFrequentStack()??[`UNKNOWN stack`,-1],n=new Ge(t[1]/this._size>.3?`dominated`:`popular`,`${e}. HINT: Stack shows most frequent listener (${t[1]}-times)`,t[0],this._size,this._options?.leakWarningName);return(this._options?.onListenerError||d)(n),oe.None}if(this._disposed)return oe.None;t&&(e=e.bind(t));let r=new Ke(e),i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=Ue.create(),i=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof Ke?(this._deliveryQueue??=new Je,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;let a=ie(()=>{i?.(),this._removeListener(r)});return Ye(a,n),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log(`disposed?`,this._disposed),console.log(`size?`,this._size),console.log(`arr?`,JSON.stringify(this._listeners)),Error(`Attempted to dispose unknown listener`);this._size--,t[n]=void 0;let r=this._deliveryQueue.current===this;if(this._size*2<=t.length){let e=0;for(let n=0;n<t.length;n++)t[n]?t[e++]=t[n]:r&&e<this._deliveryQueue.end&&(this._deliveryQueue.end--,e<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=e}}_deliver(e,t){if(!e)return;let n=this._options?.onListenerError||d;if(!n){e.value(t);return}try{e.value(t)}catch(e){n(e)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners){if(this._listeners instanceof Ke)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}}this._perfMon?.stop()}hasListeners(){return this._size>0}},Je=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};function Ye(e,t){t instanceof ae?t.add(e):Array.isArray(t)&&t.push(e)}function Xe(e,t){if(t instanceof ae)t.delete(e);else if(Array.isArray(t)){let n=t.indexOf(e);n!==-1&&t.splice(n,1)}e.dispose()}function Ze(e){return e}var Qe=class{constructor(e,t){this.lastCache=void 0,this.lastArgKey=void 0,typeof e==`function`?(this._fn=e,this._computeKey=Ze):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){let t=this._computeKey(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this._fn(e)),this.lastCache}},$e;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Running=1]=`Running`,e[e.Completed=2]=`Completed`})($e||={});var et=class{constructor(e){this.executor=e,this._state=$e.Uninitialized}get value(){if(this._state===$e.Uninitialized){this._state=$e.Running;try{this._value=this.executor()}catch(e){this._error=e}finally{this._state=$e.Completed}}else if(this._state===$e.Running)throw Error(`Cannot read the value of a lazy that is being initialized`);if(this._error)throw this._error;return this._value}get rawValue(){return this._value}};function tt(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,`\\$&`)}function nt(e){return e.source===`^`||e.source===`^$`||e.source===`$`||e.source===`^\\s*$`?!1:!!(e.exec(``)&&e.lastIndex===0)}function rt(e){return e.split(/\r\n|\r|\n/)}function it(e){for(let t=0,n=e.length;t<n;t++){let n=e.charCodeAt(t);if(n!==32&&n!==9)return t}return-1}function at(e,t=e.length-1){for(let n=t;n>=0;n--){let t=e.charCodeAt(n);if(t!==32&&t!==9)return n}return-1}function ot(e){return e>=65&&e<=90}function st(e,t){let n=Math.min(e.length,t.length),r;for(r=0;r<n;r++)if(e.charCodeAt(r)!==t.charCodeAt(r))return r;return n}function ct(e,t){let n=Math.min(e.length,t.length),r,i=e.length-1,a=t.length-1;for(r=0;r<n;r++)if(e.charCodeAt(i-r)!==t.charCodeAt(a-r))return r;return n}function lt(e){return 55296<=e&&e<=56319}function ut(e){return 56320<=e&&e<=57343}function dt(e,t){return(e-55296<<10)+(t-56320)+65536}function ft(e,t,n){let r=e.charCodeAt(n);if(lt(r)&&n+1<t){let t=e.charCodeAt(n+1);if(ut(t))return dt(r,t)}return r}let pt=/^[\t\n\r\x20-\x7E]*$/;function mt(e){return pt.test(e)}(class e{static{this._INSTANCE=null}static getInstance(){return e._INSTANCE||=new e,e._INSTANCE}constructor(){this._data=ht()}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;let t=this._data,n=t.length/3,r=1;for(;r<=n;)if(e<t[3*r])r=2*r;else if(e>t[3*r+1])r=2*r+1;else return t[3*r+2];return 0}});function ht(){return JSON.parse(`[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]`)}var gt=class e{static{this.ambiguousCharacterData=new et(()=>JSON.parse(`{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,1523,96,8242,96,1370,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,118002,50,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,118003,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,118004,52,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,118005,53,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,118006,54,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,118007,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,118008,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,118009,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,117974,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,117975,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71913,67,71922,67,65315,67,8557,67,8450,67,8493,67,117976,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,117977,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,117978,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,117979,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,117980,71,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,117981,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,117983,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,117984,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,118001,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,117982,108,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,117985,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,117986,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,117987,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,118000,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,117988,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,117989,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,117990,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,117991,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,117992,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,117993,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,117994,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,117995,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71910,87,71919,87,117996,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,117997,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,117998,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,71909,90,66293,90,65338,90,8484,90,8488,90,117999,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65283,35,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"cs":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"es":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"fr":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"it":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ja":[8211,45,8218,44,65281,33,8216,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65292,44,65297,49,65307,59],"ko":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pt-BR":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ru":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"zh-hans":[160,32,65374,126,8218,44,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65297,49],"zh-hant":[8211,45,65374,126,8218,44,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89]}`))}static{this.cache=new Qe(t=>{let n=t.split(`,`);function r(e){let t=new Map;for(let n=0;n<e.length;n+=2)t.set(e[n],e[n+1]);return t}function i(e,t){let n=new Map(e);for(let[e,r]of t)n.set(e,r);return n}function a(e,t){if(!e)return t;let n=new Map;for(let[r,i]of e)t.has(r)&&n.set(r,i);return n}let o=this.ambiguousCharacterData.value,s=n.filter(e=>!e.startsWith(`_`)&&Object.hasOwn(o,e));s.length===0&&(s=[`_default`]);let c;for(let e of s){let t=r(o[e]);c=a(c,t)}let l=i(r(o._common),c);return new e(l)})}static getInstance(t){return e.cache.get(Array.from(t).join(`,`))}static{this._locales=new et(()=>Object.keys(e.ambiguousCharacterData.value).filter(e=>!e.startsWith(`_`)))}static getLocales(){return e._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}},_t=class e{static getRawData(){return JSON.parse(`{"_common":[11,12,13,127,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999],"cs":[173,8203,12288],"de":[173,8203,12288],"es":[8203,12288],"fr":[173,8203,12288],"it":[160,173,12288],"ja":[173],"ko":[173,12288],"pl":[173,8203,12288],"pt-BR":[173,8203,12288],"qps-ploc":[160,173,8203,12288],"ru":[173,12288],"tr":[160,173,8203,12288],"zh-hans":[160,173,8203,12288],"zh-hant":[173,12288]}`)}static{this._data=void 0}static getData(){return this._data||=new Set([...Object.values(e.getRawData())].flat()),this._data}static isInvisibleCharacter(t){return e.getData().has(t)}static get codePoints(){return e.getData()}};let vt=`default`;var yt=class{constructor(e,t,n,r,i){this.vsWorker=e,this.req=t,this.channel=n,this.method=r,this.args=i,this.type=0}},bt=class{constructor(e,t,n,r){this.vsWorker=e,this.seq=t,this.res=n,this.err=r,this.type=1}},xt=class{constructor(e,t,n,r,i){this.vsWorker=e,this.req=t,this.channel=n,this.eventName=r,this.arg=i,this.type=2}},St=class{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}},Ct=class{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}},wt=class{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}async sendMessage(e,t,n){let r=String(++this._lastSentReq);return new Promise((i,a)=>{this._pendingReplies[r]={resolve:i,reject:a},this._send(new yt(this._workerId,r,e,t,n))})}listen(e,t,n){let r=null,i=new qe({onWillAddFirstListener:()=>{r=String(++this._lastSentReq),this._pendingEmitters.set(r,i),this._send(new xt(this._workerId,r,e,t,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(r),this._send(new Ct(this._workerId,r)),r=null}});return i.event}handleMessage(e){!e||!e.vsWorker||(this._workerId===-1||e.vsWorker===this._workerId)&&this._handleMessage(e)}createProxyToRemoteChannel(e,t){return new Proxy(Object.create(null),{get:(n,r)=>(typeof r==`string`&&!n[r]&&(Et(r)?n[r]=t=>this.listen(e,r,t):Tt(r)?n[r]=this.listen(e,r,void 0):r.charCodeAt(0)===36&&(n[r]=async(...n)=>(await t?.(),this.sendMessage(e,r,n)))),n[r])})}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn(`Got reply to unknown seq`);return}let t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;if(e.err.$isError){let t=Error();t.name=e.err.name,t.message=e.err.message,t.stack=e.err.stack,n=t}t.reject(n);return}t.resolve(e.res)}_handleRequestMessage(e){let t=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then(e=>{this._send(new bt(this._workerId,t,e,void 0))},e=>{e.detail instanceof Error&&(e.detail=p(e.detail)),this._send(new bt(this._workerId,t,void 0,p(e)))})}_handleSubscribeEventMessage(e){let t=e.req,n=this._handler.handleEvent(e.channel,e.eventName,e.arg)(e=>{this._send(new St(this._workerId,t,e))});this._pendingEvents.set(t,n)}_handleEventMessage(e){let t=this._pendingEmitters.get(e.req);if(t===void 0){console.warn(`Got event for unknown req`);return}t.fire(e.event)}_handleUnsubscribeEventMessage(e){let t=this._pendingEvents.get(e.req);if(t===void 0){console.warn(`Got unsubscribe for unknown req`);return}t.dispose(),this._pendingEvents.delete(e.req)}_send(e){let t=[];if(e.type===0)for(let n=0;n<e.args.length;n++){let r=e.args[n];r instanceof ArrayBuffer&&t.push(r)}else e.type===1&&e.res instanceof ArrayBuffer&&t.push(e.res);this._handler.sendMessage(e,t)}};function Tt(e){return e[0]===`o`&&e[1]===`n`&&ot(e.charCodeAt(2))}function Et(e){return/^onDynamic/.test(e)&&ot(e.charCodeAt(9))}var Dt=class{constructor(e,t){this._localChannels=new Map,this._remoteChannels=new Map,this._protocol=new wt({sendMessage:(t,n)=>{e(t,n)},handleMessage:(e,t,n)=>this._handleMessage(e,t,n),handleEvent:(e,t,n)=>this._handleEvent(e,t,n)}),this.requestHandler=t(this)}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,t,n){if(e===vt&&t===`$initialize`)return this.initialize(n[0]);let r=e===vt?this.requestHandler:this._localChannels.get(e);if(!r)return Promise.reject(Error(`Missing channel ${e} on worker thread`));let i=r[t];if(typeof i!=`function`)return Promise.reject(Error(`Missing method ${t} on worker thread channel ${e}`));try{return Promise.resolve(i.apply(r,n))}catch(e){return Promise.reject(e)}}_handleEvent(e,t,n){let r=e===vt?this.requestHandler:this._localChannels.get(e);if(!r)throw Error(`Missing channel ${e} on worker thread`);if(Et(t)){let e=r[t];if(typeof e!=`function`)throw Error(`Missing dynamic event ${t} on request handler.`);let i=e.call(r,n);if(typeof i!=`function`)throw Error(`Missing dynamic event ${t} on request handler.`);return i}if(Tt(t)){let e=r[t];if(typeof e!=`function`)throw Error(`Missing event ${t} on request handler.`);return e}throw Error(`Malformed event name ${t}`)}getChannel(e){let t=this._remoteChannels.get(e);return t===void 0&&(t=this._protocol.createProxyToRemoteChannel(e),this._remoteChannels.set(e,t)),t}async initialize(e){this._protocol.setWorkerId(e)}};let Ot=!1;function kt(e){if(Ot)throw Error(`WebWorker already initialized!`);Ot=!0;let t=new Dt(e=>globalThis.postMessage(e),t=>e(t));return globalThis.onmessage=e=>{t.onmessage(e.data)},t}var At=class{constructor(e,t,n,r){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=r}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}};let jt=typeof Buffer<`u`;new et(()=>new Uint8Array(256));let Mt;var Nt=class e{static wrap(t){return jt&&!Buffer.isBuffer(t)&&(t=Buffer.from(t.buffer,t.byteOffset,t.byteLength)),new e(t)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return jt?this.buffer.toString():(Mt||=new TextDecoder(void 0,{ignoreBOM:!0}),Mt.decode(this.buffer))}};let Pt=`0123456789abcdef`;function Ft({buffer:e}){let t=``;for(let n=0;n<e.length;n++){let r=e[n];t+=Pt[r>>>4],t+=Pt[r&15]}return t}function It(e,t){return(t<<5)-t+e|0}function Lt(e,t){t=It(149417,t);for(let n=0,r=e.length;n<r;n++)t=It(e.charCodeAt(n),t);return t}function Rt(e,t,n=32){let r=n-t,i=~((1<<r)-1);return(e<<t|(i&e)>>>r)>>>0}function zt(e,t=32){return e instanceof ArrayBuffer?Ft(Nt.wrap(new Uint8Array(e))):(e>>>0).toString(16).padStart(t/4,`0`)}(class e{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){let t=e.length;if(t===0)return;let n=this._buff,r=this._buffLen,i=this._leftoverHighSurrogate,a,o;for(i===0?(a=e.charCodeAt(0),o=0):(a=i,o=-1,i=0);;){let s=a;if(lt(a)){if(o+1<t){let t=e.charCodeAt(o+1);ut(t)?(o++,s=dt(a,t)):s=65533}else{i=a;break}}else ut(a)&&(s=65533);if(r=this._push(n,r,s),o++,o<t)a=e.charCodeAt(o);else break}this._buffLen=r,this._leftoverHighSurrogate=i}_push(e,t,n){return n<128?e[t++]=n:n<2048?(e[t++]=192|(n&1984)>>>6,e[t++]=128|(n&63)>>>0):n<65536?(e[t++]=224|(n&61440)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0):(e[t++]=240|(n&1835008)>>>18,e[t++]=128|(n&258048)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),zt(this._h0)+zt(this._h1)+zt(this._h2)+zt(this._h3)+zt(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,this._buff.subarray(this._buffLen).fill(0),this._buffLen>56&&(this._step(),this._buff.fill(0));let e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){let t=e._bigBlock32,n=this._buffDV;for(let e=0;e<64;e+=4)t.setUint32(e,n.getUint32(e,!1),!1);for(let e=64;e<320;e+=4)t.setUint32(e,Rt(t.getUint32(e-12,!1)^t.getUint32(e-32,!1)^t.getUint32(e-56,!1)^t.getUint32(e-64,!1),1),!1);let r=this._h0,i=this._h1,a=this._h2,o=this._h3,s=this._h4,c,l,u;for(let e=0;e<80;e++)e<20?(c=i&a|~i&o,l=1518500249):e<40?(c=i^a^o,l=1859775393):e<60?(c=i&a|i&o|a&o,l=2400959708):(c=i^a^o,l=3395469782),u=Rt(r,5)+c+s+l+t.getUint32(e*4,!1)&4294967295,s=o,o=a,a=Rt(i,30),i=r,r=u;this._h0=this._h0+r&4294967295,this._h1=this._h1+i&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+o&4294967295,this._h4=this._h4+s&4294967295}});var Bt=class{constructor(e){this.source=e}getElements(){let e=this.source,t=new Int32Array(e.length);for(let n=0,r=e.length;n<r;n++)t[n]=e.charCodeAt(n);return t}};function Vt(e,t,n){return new Gt(new Bt(e),new Bt(t)).ComputeDiff(n).changes}var Ht=class{static Assert(e,t){if(!e)throw Error(t)}},Ut=class{static Copy(e,t,n,r,i){for(let a=0;a<i;a++)n[r+a]=e[t+a]}static Copy2(e,t,n,r,i){for(let a=0;a<i;a++)n[r+a]=e[t+a]}},Wt=class{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new At(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}},Gt=class e{constructor(t,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=t,this._modifiedSequence=n;let[i,a,o]=e._getElements(t),[s,c,l]=e._getElements(n);this._hasStrings=o&&l,this._originalStringElements=i,this._originalElementsOrHash=a,this._modifiedStringElements=s,this._modifiedElementsOrHash=c,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]==`string`}static _getElements(t){let n=t.getElements();if(e._isStringArray(n)){let e=new Int32Array(n.length);for(let t=0,r=n.length;t<r;t++)e[t]=Lt(n[t],0);return[n,e,!0]}return n instanceof Int32Array?[[],n,!1]:[[],new Int32Array(n),!1]}ElementsAreEqual(e,t){return this._originalElementsOrHash[e]===this._modifiedElementsOrHash[t]?!this._hasStrings||this._originalStringElements[e]===this._modifiedStringElements[t]:!1}ElementsAreStrictEqual(t,n){return this.ElementsAreEqual(t,n)?e._getStrictElement(this._originalSequence,t)===e._getStrictElement(this._modifiedSequence,n):!1}static _getStrictElement(e,t){return typeof e.getStrictElement==`function`?e.getStrictElement(t):null}OriginalElementsAreEqual(e,t){return this._originalElementsOrHash[e]===this._originalElementsOrHash[t]?!this._hasStrings||this._originalStringElements[e]===this._originalStringElements[t]:!1}ModifiedElementsAreEqual(e,t){return this._modifiedElementsOrHash[e]===this._modifiedElementsOrHash[t]?!this._hasStrings||this._modifiedStringElements[e]===this._modifiedStringElements[t]:!1}ComputeDiff(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)}_ComputeDiff(e,t,n,r,i){let a=[!1],o=this.ComputeDiffRecursive(e,t,n,r,a);return i&&(o=this.PrettifyChanges(o)),{quitEarly:a[0],changes:o}}ComputeDiffRecursive(e,t,n,r,i){for(i[0]=!1;e<=t&&n<=r&&this.ElementsAreEqual(e,n);)e++,n++;for(;t>=e&&r>=n&&this.ElementsAreEqual(t,r);)t--,r--;if(e>t||n>r){let i;return n<=r?(Ht.Assert(e===t+1,`originalStart should only be one more than originalEnd`),i=[new At(e,0,n,r-n+1)]):e<=t?(Ht.Assert(n===r+1,`modifiedStart should only be one more than modifiedEnd`),i=[new At(e,t-e+1,n,0)]):(Ht.Assert(e===t+1,`originalStart should only be one more than originalEnd`),Ht.Assert(n===r+1,`modifiedStart should only be one more than modifiedEnd`),i=[]),i}let a=[0],o=[0],s=this.ComputeRecursionPoint(e,t,n,r,a,o,i),c=a[0],l=o[0];if(s!==null)return s;if(!i[0]){let a=this.ComputeDiffRecursive(e,c,n,l,i),o=[];return o=i[0]?[new At(c+1,t-(c+1)+1,l+1,r-(l+1)+1)]:this.ComputeDiffRecursive(c+1,t,l+1,r,i),this.ConcatenateChanges(a,o)}return[new At(e,t-e+1,n,r-n+1)]}WALKTRACE(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_){let v=null,y=null,b=new Wt,x=t,S=n,C=f[0]-h[0]-r,ee=-1073741824,te=this.m_forwardHistory.length-1;do{let t=C+e;t===x||t<S&&c[t-1]<c[t+1]?(u=c[t+1],p=u-C-r,u<ee&&b.MarkNextChange(),ee=u,b.AddModifiedElement(u+1,p),C=t+1-e):(u=c[t-1]+1,p=u-C-r,u<ee&&b.MarkNextChange(),ee=u-1,b.AddOriginalElement(u,p+1),C=t-1-e),te>=0&&(c=this.m_forwardHistory[te],e=c[0],x=1,S=c.length-1)}while(--te>=-1);if(v=b.getReverseChanges(),_[0]){let e=f[0]+1,t=h[0]+1;if(v!==null&&v.length>0){let n=v[v.length-1];e=Math.max(e,n.getOriginalEnd()),t=Math.max(t,n.getModifiedEnd())}y=[new At(e,d-e+1,t,m-t+1)]}else{b=new Wt,x=a,S=o,C=f[0]-h[0]-s,ee=1073741824,te=g?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{let e=C+i;e===x||e<S&&l[e-1]>=l[e+1]?(u=l[e+1]-1,p=u-C-s,u>ee&&b.MarkNextChange(),ee=u+1,b.AddOriginalElement(u+1,p+1),C=e+1-i):(u=l[e-1],p=u-C-s,u>ee&&b.MarkNextChange(),ee=u,b.AddModifiedElement(u+1,p+1),C=e-1-i),te>=0&&(l=this.m_reverseHistory[te],i=l[0],x=1,S=l.length-1)}while(--te>=-1);y=b.getChanges()}return this.ConcatenateChanges(v,y)}ComputeRecursionPoint(e,t,n,r,i,a,o){let s=0,c=0,l=0,u=0,d=0,f=0;e--,n--,i[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];let p=t-e+(r-n),m=p+1,h=new Int32Array(m),g=new Int32Array(m),_=r-n,v=t-e,y=e-n,b=t-r,x=(v-_)%2==0;h[_]=e,g[v]=t,o[0]=!1;for(let S=1;S<=p/2+1;S++){let p=0,C=0;l=this.ClipDiagonalBound(_-S,S,_,m),u=this.ClipDiagonalBound(_+S,S,_,m);for(let e=l;e<=u;e+=2){s=e===l||e<u&&h[e-1]<h[e+1]?h[e+1]:h[e-1]+1,c=s-(e-_)-y;let n=s;for(;s<t&&c<r&&this.ElementsAreEqual(s+1,c+1);)s++,c++;if(h[e]=s,s+c>p+C&&(p=s,C=c),!x&&Math.abs(e-v)<=S-1&&s>=g[e])return i[0]=s,a[0]=c,n<=g[e]&&S<=1448?this.WALKTRACE(_,l,u,y,v,d,f,b,h,g,s,t,i,c,r,a,x,o):null}let ee=(p-e+(C-n)-S)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(p,ee))return o[0]=!0,i[0]=p,a[0]=C,ee>0&&S<=1448?this.WALKTRACE(_,l,u,y,v,d,f,b,h,g,s,t,i,c,r,a,x,o):(e++,n++,[new At(e,t-e+1,n,r-n+1)]);d=this.ClipDiagonalBound(v-S,S,v,m),f=this.ClipDiagonalBound(v+S,S,v,m);for(let p=d;p<=f;p+=2){s=p===d||p<f&&g[p-1]>=g[p+1]?g[p+1]-1:g[p-1],c=s-(p-v)-b;let m=s;for(;s>e&&c>n&&this.ElementsAreEqual(s,c);)s--,c--;if(g[p]=s,x&&Math.abs(p-_)<=S&&s<=h[p])return i[0]=s,a[0]=c,m>=h[p]&&S<=1448?this.WALKTRACE(_,l,u,y,v,d,f,b,h,g,s,t,i,c,r,a,x,o):null}if(S<=1447){let e=new Int32Array(u-l+2);e[0]=_-l+1,Ut.Copy2(h,l,e,1,u-l+1),this.m_forwardHistory.push(e),e=new Int32Array(f-d+2),e[0]=v-d+1,Ut.Copy2(g,d,e,1,f-d+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(_,l,u,y,v,d,f,b,h,g,s,t,i,c,r,a,x,o)}PrettifyChanges(e){for(let t=0;t<e.length;t++){let n=e[t],r=t<e.length-1?e[t+1].originalStart:this._originalElementsOrHash.length,i=t<e.length-1?e[t+1].modifiedStart:this._modifiedElementsOrHash.length,a=n.originalLength>0,o=n.modifiedLength>0;for(;n.originalStart+n.originalLength<r&&n.modifiedStart+n.modifiedLength<i&&(!a||this.OriginalElementsAreEqual(n.originalStart,n.originalStart+n.originalLength))&&(!o||this.ModifiedElementsAreEqual(n.modifiedStart,n.modifiedStart+n.modifiedLength));){let e=this.ElementsAreStrictEqual(n.originalStart,n.modifiedStart);if(this.ElementsAreStrictEqual(n.originalStart+n.originalLength,n.modifiedStart+n.modifiedLength)&&!e)break;n.originalStart++,n.modifiedStart++}let s=[null];if(t<e.length-1&&this.ChangesOverlap(e[t],e[t+1],s)){e[t]=s[0],e.splice(t+1,1),t--;continue}}for(let t=e.length-1;t>=0;t--){let n=e[t],r=0,i=0;if(t>0){let n=e[t-1];r=n.originalStart+n.originalLength,i=n.modifiedStart+n.modifiedLength}let a=n.originalLength>0,o=n.modifiedLength>0,s=0,c=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let e=1;;e++){let t=n.originalStart-e,l=n.modifiedStart-e;if(t<r||l<i||a&&!this.OriginalElementsAreEqual(t,t+n.originalLength)||o&&!this.ModifiedElementsAreEqual(l,l+n.modifiedLength))break;let u=(t===r&&l===i?5:0)+this._boundaryScore(t,n.originalLength,l,n.modifiedLength);u>c&&(c=u,s=e)}n.originalStart-=s,n.modifiedStart-=s;let l=[null];if(t>0&&this.ChangesOverlap(e[t-1],e[t],l)){e[t-1]=l[0],e.splice(t,1),t++;continue}}if(this._hasStrings)for(let t=1,n=e.length;t<n;t++){let n=e[t-1],r=e[t],i=r.originalStart-n.originalStart-n.originalLength,a=n.originalStart,o=r.originalStart+r.originalLength,s=o-a,c=n.modifiedStart,l=r.modifiedStart+r.modifiedLength,u=l-c;if(i<5&&s<20&&u<20){let e=this._findBetterContiguousSequence(a,s,c,u,i);if(e){let[t,a]=e;(t!==n.originalStart+n.originalLength||a!==n.modifiedStart+n.modifiedLength)&&(n.originalLength=t-n.originalStart,n.modifiedLength=a-n.modifiedStart,r.originalStart=t+i,r.modifiedStart=a+i,r.originalLength=o-r.originalStart,r.modifiedLength=l-r.modifiedStart)}}}return e}_findBetterContiguousSequence(e,t,n,r,i){if(t<i||r<i)return null;let a=e+t-i+1,o=n+r-i+1,s=0,c=0,l=0;for(let t=e;t<a;t++)for(let e=n;e<o;e++){let n=this._contiguousSequenceScore(t,e,i);n>0&&n>s&&(s=n,c=t,l=e)}return s>0?[c,l]:null}_contiguousSequenceScore(e,t,n){let r=0;for(let i=0;i<n;i++){if(!this.ElementsAreEqual(e+i,t+i))return 0;r+=this._originalStringElements[e+i].length}return r}_OriginalIsBoundary(e){return e<=0||e>=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){let n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){let n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,r){return+!!this._OriginalRegionIsBoundary(e,t)+ +!!this._ModifiedRegionIsBoundary(n,r)}ConcatenateChanges(e,t){let n=[];if(e.length===0||t.length===0)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){let r=Array(e.length+t.length-1);return Ut.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],Ut.Copy(t,1,r,e.length,t.length-1),r}{let n=Array(e.length+t.length);return Ut.Copy(e,0,n,0,e.length),Ut.Copy(t,0,n,e.length,t.length),n}}ChangesOverlap(e,t,n){if(Ht.Assert(e.originalStart<=t.originalStart,`Left change is not less than or equal to right change`),Ht.Assert(e.modifiedStart<=t.modifiedStart,`Left change is not less than or equal to right change`),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){let r=e.originalStart,i=e.originalLength,a=e.modifiedStart,o=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(i=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(o=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new At(r,i,a,o),!0}return n[0]=null,!1}ClipDiagonalBound(e,t,n,r){if(e>=0&&e<r)return e;let i=n,a=r-n-1,o=t%2==0;return e<0?o===(i%2==0)?0:1:o===(a%2==0)?r-1:r-2}},T=class e{constructor(e,t){this.lineNumber=e,this.column=t}with(t=this.lineNumber,n=this.column){return t===this.lineNumber&&n===this.column?this:new e(t,n)}delta(e=0,t=0){return this.with(Math.max(1,this.lineNumber+e),Math.max(1,this.column+t))}equals(t){return e.equals(this,t)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(t){return e.isBefore(this,t)}static isBefore(e,t){return e.lineNumber<t.lineNumber?!0:t.lineNumber<e.lineNumber?!1:e.column<t.column}isBeforeOrEqual(t){return e.isBeforeOrEqual(this,t)}static isBeforeOrEqual(e,t){return e.lineNumber<t.lineNumber?!0:t.lineNumber<e.lineNumber?!1:e.column<=t.column}static compare(e,t){let n=e.lineNumber|0,r=t.lineNumber|0;return n===r?(e.column|0)-(t.column|0):n-r}clone(){return new e(this.lineNumber,this.column)}toString(){return`(`+this.lineNumber+`,`+this.column+`)`}static lift(t){return new e(t.lineNumber,t.column)}static isIPosition(e){return!!e&&typeof e.lineNumber==`number`&&typeof e.column==`number`}toJSON(){return{lineNumber:this.lineNumber,column:this.column}}},E=class e{constructor(e,t,n,r){e>n||e===n&&t>r?(this.startLineNumber=n,this.startColumn=r,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=r)}isEmpty(){return e.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(t){return e.containsPosition(this,t)}static containsPosition(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<e.startColumn||t.lineNumber===e.endLineNumber&&t.column>e.endColumn)}static strictContainsPosition(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<=e.startColumn||t.lineNumber===e.endLineNumber&&t.column>=e.endColumn)}containsRange(t){return e.containsRange(this,t)}static containsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber||t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>e.endColumn)}strictContainsRange(t){return e.strictContainsRange(this,t)}static strictContainsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber||t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(t){return e.plusRange(this,t)}static plusRange(t,n){let r,i,a,o;return n.startLineNumber<t.startLineNumber?(r=n.startLineNumber,i=n.startColumn):n.startLineNumber===t.startLineNumber?(r=n.startLineNumber,i=Math.min(n.startColumn,t.startColumn)):(r=t.startLineNumber,i=t.startColumn),n.endLineNumber>t.endLineNumber?(a=n.endLineNumber,o=n.endColumn):n.endLineNumber===t.endLineNumber?(a=n.endLineNumber,o=Math.max(n.endColumn,t.endColumn)):(a=t.endLineNumber,o=t.endColumn),new e(r,i,a,o)}intersectRanges(t){return e.intersectRanges(this,t)}static intersectRanges(t,n){let r=t.startLineNumber,i=t.startColumn,a=t.endLineNumber,o=t.endColumn,s=n.startLineNumber,c=n.startColumn,l=n.endLineNumber,u=n.endColumn;return r<s?(r=s,i=c):r===s&&(i=Math.max(i,c)),a>l?(a=l,o=u):a===l&&(o=Math.min(o,u)),r>a||r===a&&i>o?null:new e(r,i,a,o)}equalsRange(t){return e.equalsRange(this,t)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return e.getEndPosition(this)}static getEndPosition(e){return new T(e.endLineNumber,e.endColumn)}getStartPosition(){return e.getStartPosition(this)}static getStartPosition(e){return new T(e.startLineNumber,e.startColumn)}toString(){return`[`+this.startLineNumber+`,`+this.startColumn+` -> `+this.endLineNumber+`,`+this.endColumn+`]`}setEndPosition(t,n){return new e(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new e(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return e.collapseToStart(this)}static collapseToStart(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}collapseToEnd(){return e.collapseToEnd(this)}static collapseToEnd(t){return new e(t.endLineNumber,t.endColumn,t.endLineNumber,t.endColumn)}delta(t){return new e(this.startLineNumber+t,this.startColumn,this.endLineNumber+t,this.endColumn)}isSingleLine(){return this.startLineNumber===this.endLineNumber}static fromPositions(t,n=t){return new e(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(e){return!!e&&typeof e.startLineNumber==`number`&&typeof e.startColumn==`number`&&typeof e.endLineNumber==`number`&&typeof e.endColumn==`number`}static areIntersectingOrTouching(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn||t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn)}static areIntersecting(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<=t.startColumn||t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<=e.startColumn)}static areOnlyIntersecting(e,t){return!(e.endLineNumber<t.startLineNumber-1||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn-1||t.endLineNumber<e.startLineNumber-1||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn-1)}static compareRangesUsingStarts(e,t){if(e&&t){let n=e.startLineNumber|0,r=t.startLineNumber|0;if(n===r){let n=e.startColumn|0,r=t.startColumn|0;if(n===r){let n=e.endLineNumber|0,r=t.endLineNumber|0;return n===r?(e.endColumn|0)-(t.endColumn|0):n-r}return n-r}return n-r}return!!e-+!!t}static compareRangesUsingEnds(e,t){return e.endLineNumber===t.endLineNumber?e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber}static spansMultipleLines(e){return e.endLineNumber>e.startLineNumber}toJSON(){return this}};function Kt(e){return e<0?0:e>255?255:e|0}function qt(e){return e<0?0:e>4294967295?4294967295:e|0}var Jt=class e{constructor(t){let n=Kt(t);this._defaultValue=n,this._asciiMap=e._createAsciiMap(n),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);return t.fill(e),t}set(e,t){let n=Kt(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}},Yt=class{constructor(e,t,n){let r=new Uint8Array(e*t);for(let i=0,a=e*t;i<a;i++)r[i]=n;this._data=r,this.rows=e,this.cols=t}get(e,t){return this._data[e*this.cols+t]}set(e,t,n){this._data[e*this.cols+t]=n}},Xt=class{constructor(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++){let[i,a,o]=e[r];a>t&&(t=a),i>n&&(n=i),o>n&&(n=o)}t++,n++;let r=new Yt(n,t,0);for(let t=0,n=e.length;t<n;t++){let[n,i,a]=e[t];r.set(n,i,a)}this._states=r,this._maxCharCode=t}nextState(e,t){return t<0||t>=this._maxCharCode?0:this._states.get(e,t)}};let Zt=null;function Qt(){return Zt===null&&(Zt=new Xt([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),Zt}let $t=null;function en(){if($t===null){$t=new Jt(0);for(let e=0;e<36;e++)$t.set(` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…|`.charCodeAt(e),1);for(let e=0;e<4;e++)$t.set(`.,;:`.charCodeAt(e),2)}return $t}var tn=class e{static _createLink(e,t,n,r,i){let a=i-1;do{let n=t.charCodeAt(a);if(e.get(n)!==2)break;a--}while(a>r);if(r>0){let e=t.charCodeAt(r-1),n=t.charCodeAt(a);(e===40&&n===41||e===91&&n===93||e===123&&n===125)&&a--}return{range:{startLineNumber:n,startColumn:r+1,endLineNumber:n,endColumn:a+2},url:t.substring(r,a+1)}}static computeLinks(t,n=Qt()){let r=en(),i=[];for(let a=1,o=t.getLineCount();a<=o;a++){let o=t.getLineContent(a),s=o.length,c=0,l=0,u=0,d=1,f=!1,p=!1,m=!1,h=!1;for(;c<s;){let t=!1,s=o.charCodeAt(c);if(d===13){let n;switch(s){case 40:f=!0,n=0;break;case 41:n=+!f;break;case 91:m=!0,p=!0,n=0;break;case 93:m=!1,n=+!p;break;case 123:h=!0,n=0;break;case 125:n=+!h;break;case 39:case 34:case 96:n=u===s?1:u===39||u===34||u===96?0:1;break;case 42:n=+(u===42);break;case 32:n=+!m;break;default:n=r.get(s)}n===1&&(i.push(e._createLink(r,o,a,l,c)),t=!0)}else if(d===12){let e;s===91?(p=!0,e=0):e=r.get(s),e===1?t=!0:d=13}else d=n.nextState(d,s),d===0&&(t=!0);t&&(d=1,f=!1,p=!1,h=!1,l=c+1,u=s),c++}d===13&&i.push(e._createLink(r,o,a,l,s))}return i}};function nn(e){return!e||typeof e.getLineCount!=`function`||typeof e.getLineContent!=`function`?[]:tn.computeLinks(e)}var rn=class e{constructor(){this._defaultValueSet=[[`true`,`false`],[`True`,`False`],[`Private`,`Public`,`Friend`,`ReadOnly`,`Partial`,`Protected`,`WriteOnly`],[`public`,`protected`,`private`]]}static{this.INSTANCE=new e}navigateValueSet(e,t,n,r,i){if(e&&t){let n=this.doNavigateValueSet(t,i);if(n)return{range:e,value:n}}if(n&&r){let e=this.doNavigateValueSet(r,i);if(e)return{range:n,value:e}}return null}doNavigateValueSet(e,t){let n=this.numberReplace(e,t);return n===null?this.textReplace(e,t):n}numberReplace(e,t){let n=10**(e.length-(e.lastIndexOf(`.`)+1)),r=Number(e),i=parseFloat(e);return!isNaN(r)&&!isNaN(i)&&r===i?r===0&&!t?null:(r=Math.floor(r*n),r+=t?n:-n,String(r/n)):null}textReplace(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)}valueSetsReplace(e,t,n){let r=null;for(let i=0,a=e.length;r===null&&i<a;i++)r=this.valueSetReplace(e[i],t,n);return r}valueSetReplace(e,t,n){let r=e.indexOf(t);return r>=0?(r+=n?1:-1,r<0?r=e.length-1:r%=e.length,e[r]):null}};let an=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}});var on;(function(e){function t(t){return t===e.None||t===e.Cancelled||t instanceof sn?!0:!t||typeof t!=`object`?!1:typeof t.isCancellationRequested==`boolean`&&typeof t.onCancellationRequested==`function`}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Be.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:an})})(on||={});var sn=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?an:(this._emitter||=new qe,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),null)}},cn=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||=new sn,this._token}cancel(){this._token?this._token instanceof sn&&this._token.cancel():this._token=on.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof sn&&this._token.dispose():this._token=on.None}},ln=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}};let un=new ln,dn=new ln,fn=new ln,pn=Array(230),mn=Object.create(null),hn=Object.create(null),gn=[];for(let e=0;e<=193;e++)gn[e]=-1;(function(){let e=[[1,0,`None`,0,`unknown`,0,`VK_UNKNOWN`,``,``],[1,1,`Hyper`,0,``,0,``,``,``],[1,2,`Super`,0,``,0,``,``,``],[1,3,`Fn`,0,``,0,``,``,``],[1,4,`FnLock`,0,``,0,``,``,``],[1,5,`Suspend`,0,``,0,``,``,``],[1,6,`Resume`,0,``,0,``,``,``],[1,7,`Turbo`,0,``,0,``,``,``],[1,8,`Sleep`,0,``,0,`VK_SLEEP`,``,``],[1,9,`WakeUp`,0,``,0,``,``,``],[0,10,`KeyA`,31,`A`,65,`VK_A`,``,``],[0,11,`KeyB`,32,`B`,66,`VK_B`,``,``],[0,12,`KeyC`,33,`C`,67,`VK_C`,``,``],[0,13,`KeyD`,34,`D`,68,`VK_D`,``,``],[0,14,`KeyE`,35,`E`,69,`VK_E`,``,``],[0,15,`KeyF`,36,`F`,70,`VK_F`,``,``],[0,16,`KeyG`,37,`G`,71,`VK_G`,``,``],[0,17,`KeyH`,38,`H`,72,`VK_H`,``,``],[0,18,`KeyI`,39,`I`,73,`VK_I`,``,``],[0,19,`KeyJ`,40,`J`,74,`VK_J`,``,``],[0,20,`KeyK`,41,`K`,75,`VK_K`,``,``],[0,21,`KeyL`,42,`L`,76,`VK_L`,``,``],[0,22,`KeyM`,43,`M`,77,`VK_M`,``,``],[0,23,`KeyN`,44,`N`,78,`VK_N`,``,``],[0,24,`KeyO`,45,`O`,79,`VK_O`,``,``],[0,25,`KeyP`,46,`P`,80,`VK_P`,``,``],[0,26,`KeyQ`,47,`Q`,81,`VK_Q`,``,``],[0,27,`KeyR`,48,`R`,82,`VK_R`,``,``],[0,28,`KeyS`,49,`S`,83,`VK_S`,``,``],[0,29,`KeyT`,50,`T`,84,`VK_T`,``,``],[0,30,`KeyU`,51,`U`,85,`VK_U`,``,``],[0,31,`KeyV`,52,`V`,86,`VK_V`,``,``],[0,32,`KeyW`,53,`W`,87,`VK_W`,``,``],[0,33,`KeyX`,54,`X`,88,`VK_X`,``,``],[0,34,`KeyY`,55,`Y`,89,`VK_Y`,``,``],[0,35,`KeyZ`,56,`Z`,90,`VK_Z`,``,``],[0,36,`Digit1`,22,`1`,49,`VK_1`,``,``],[0,37,`Digit2`,23,`2`,50,`VK_2`,``,``],[0,38,`Digit3`,24,`3`,51,`VK_3`,``,``],[0,39,`Digit4`,25,`4`,52,`VK_4`,``,``],[0,40,`Digit5`,26,`5`,53,`VK_5`,``,``],[0,41,`Digit6`,27,`6`,54,`VK_6`,``,``],[0,42,`Digit7`,28,`7`,55,`VK_7`,``,``],[0,43,`Digit8`,29,`8`,56,`VK_8`,``,``],[0,44,`Digit9`,30,`9`,57,`VK_9`,``,``],[0,45,`Digit0`,21,`0`,48,`VK_0`,``,``],[1,46,`Enter`,3,`Enter`,13,`VK_RETURN`,``,``],[1,47,`Escape`,9,`Escape`,27,`VK_ESCAPE`,``,``],[1,48,`Backspace`,1,`Backspace`,8,`VK_BACK`,``,``],[1,49,`Tab`,2,`Tab`,9,`VK_TAB`,``,``],[1,50,`Space`,10,`Space`,32,`VK_SPACE`,``,``],[0,51,`Minus`,88,`-`,189,`VK_OEM_MINUS`,`-`,`OEM_MINUS`],[0,52,`Equal`,86,`=`,187,`VK_OEM_PLUS`,`=`,`OEM_PLUS`],[0,53,`BracketLeft`,92,`[`,219,`VK_OEM_4`,`[`,`OEM_4`],[0,54,`BracketRight`,94,`]`,221,`VK_OEM_6`,`]`,`OEM_6`],[0,55,`Backslash`,93,`\\`,220,`VK_OEM_5`,`\\`,`OEM_5`],[0,56,`IntlHash`,0,``,0,``,``,``],[0,57,`Semicolon`,85,`;`,186,`VK_OEM_1`,`;`,`OEM_1`],[0,58,`Quote`,95,`'`,222,`VK_OEM_7`,`'`,`OEM_7`],[0,59,`Backquote`,91,"`",192,`VK_OEM_3`,"`",`OEM_3`],[0,60,`Comma`,87,`,`,188,`VK_OEM_COMMA`,`,`,`OEM_COMMA`],[0,61,`Period`,89,`.`,190,`VK_OEM_PERIOD`,`.`,`OEM_PERIOD`],[0,62,`Slash`,90,`/`,191,`VK_OEM_2`,`/`,`OEM_2`],[1,63,`CapsLock`,8,`CapsLock`,20,`VK_CAPITAL`,``,``],[1,64,`F1`,59,`F1`,112,`VK_F1`,``,``],[1,65,`F2`,60,`F2`,113,`VK_F2`,``,``],[1,66,`F3`,61,`F3`,114,`VK_F3`,``,``],[1,67,`F4`,62,`F4`,115,`VK_F4`,``,``],[1,68,`F5`,63,`F5`,116,`VK_F5`,``,``],[1,69,`F6`,64,`F6`,117,`VK_F6`,``,``],[1,70,`F7`,65,`F7`,118,`VK_F7`,``,``],[1,71,`F8`,66,`F8`,119,`VK_F8`,``,``],[1,72,`F9`,67,`F9`,120,`VK_F9`,``,``],[1,73,`F10`,68,`F10`,121,`VK_F10`,``,``],[1,74,`F11`,69,`F11`,122,`VK_F11`,``,``],[1,75,`F12`,70,`F12`,123,`VK_F12`,``,``],[1,76,`PrintScreen`,0,``,0,``,``,``],[1,77,`ScrollLock`,84,`ScrollLock`,145,`VK_SCROLL`,``,``],[1,78,`Pause`,7,`PauseBreak`,19,`VK_PAUSE`,``,``],[1,79,`Insert`,19,`Insert`,45,`VK_INSERT`,``,``],[1,80,`Home`,14,`Home`,36,`VK_HOME`,``,``],[1,81,`PageUp`,11,`PageUp`,33,`VK_PRIOR`,``,``],[1,82,`Delete`,20,`Del`,46,`VK_DELETE`,`Delete`,``],[1,83,`End`,13,`End`,35,`VK_END`,``,``],[1,84,`PageDown`,12,`PageDown`,34,`VK_NEXT`,``,``],[1,85,`ArrowRight`,17,`RightArrow`,39,`VK_RIGHT`,`Right`,``],[1,86,`ArrowLeft`,15,`LeftArrow`,37,`VK_LEFT`,`Left`,``],[1,87,`ArrowDown`,18,`DownArrow`,40,`VK_DOWN`,`Down`,``],[1,88,`ArrowUp`,16,`UpArrow`,38,`VK_UP`,`Up`,``],[1,89,`NumLock`,83,`NumLock`,144,`VK_NUMLOCK`,``,``],[1,90,`NumpadDivide`,113,`NumPad_Divide`,111,`VK_DIVIDE`,``,``],[1,91,`NumpadMultiply`,108,`NumPad_Multiply`,106,`VK_MULTIPLY`,``,``],[1,92,`NumpadSubtract`,111,`NumPad_Subtract`,109,`VK_SUBTRACT`,``,``],[1,93,`NumpadAdd`,109,`NumPad_Add`,107,`VK_ADD`,``,``],[1,94,`NumpadEnter`,3,``,0,``,``,``],[1,95,`Numpad1`,99,`NumPad1`,97,`VK_NUMPAD1`,``,``],[1,96,`Numpad2`,100,`NumPad2`,98,`VK_NUMPAD2`,``,``],[1,97,`Numpad3`,101,`NumPad3`,99,`VK_NUMPAD3`,``,``],[1,98,`Numpad4`,102,`NumPad4`,100,`VK_NUMPAD4`,``,``],[1,99,`Numpad5`,103,`NumPad5`,101,`VK_NUMPAD5`,``,``],[1,100,`Numpad6`,104,`NumPad6`,102,`VK_NUMPAD6`,``,``],[1,101,`Numpad7`,105,`NumPad7`,103,`VK_NUMPAD7`,``,``],[1,102,`Numpad8`,106,`NumPad8`,104,`VK_NUMPAD8`,``,``],[1,103,`Numpad9`,107,`NumPad9`,105,`VK_NUMPAD9`,``,``],[1,104,`Numpad0`,98,`NumPad0`,96,`VK_NUMPAD0`,``,``],[1,105,`NumpadDecimal`,112,`NumPad_Decimal`,110,`VK_DECIMAL`,``,``],[0,106,`IntlBackslash`,97,`OEM_102`,226,`VK_OEM_102`,``,``],[1,107,`ContextMenu`,58,`ContextMenu`,93,``,``,``],[1,108,`Power`,0,``,0,``,``,``],[1,109,`NumpadEqual`,0,``,0,``,``,``],[1,110,`F13`,71,`F13`,124,`VK_F13`,``,``],[1,111,`F14`,72,`F14`,125,`VK_F14`,``,``],[1,112,`F15`,73,`F15`,126,`VK_F15`,``,``],[1,113,`F16`,74,`F16`,127,`VK_F16`,``,``],[1,114,`F17`,75,`F17`,128,`VK_F17`,``,``],[1,115,`F18`,76,`F18`,129,`VK_F18`,``,``],[1,116,`F19`,77,`F19`,130,`VK_F19`,``,``],[1,117,`F20`,78,`F20`,131,`VK_F20`,``,``],[1,118,`F21`,79,`F21`,132,`VK_F21`,``,``],[1,119,`F22`,80,`F22`,133,`VK_F22`,``,``],[1,120,`F23`,81,`F23`,134,`VK_F23`,``,``],[1,121,`F24`,82,`F24`,135,`VK_F24`,``,``],[1,122,`Open`,0,``,0,``,``,``],[1,123,`Help`,0,``,0,``,``,``],[1,124,`Select`,0,``,0,``,``,``],[1,125,`Again`,0,``,0,``,``,``],[1,126,`Undo`,0,``,0,``,``,``],[1,127,`Cut`,0,``,0,``,``,``],[1,128,`Copy`,0,``,0,``,``,``],[1,129,`Paste`,0,``,0,``,``,``],[1,130,`Find`,0,``,0,``,``,``],[1,131,`AudioVolumeMute`,117,`AudioVolumeMute`,173,`VK_VOLUME_MUTE`,``,``],[1,132,`AudioVolumeUp`,118,`AudioVolumeUp`,175,`VK_VOLUME_UP`,``,``],[1,133,`AudioVolumeDown`,119,`AudioVolumeDown`,174,`VK_VOLUME_DOWN`,``,``],[1,134,`NumpadComma`,110,`NumPad_Separator`,108,`VK_SEPARATOR`,``,``],[0,135,`IntlRo`,115,`ABNT_C1`,193,`VK_ABNT_C1`,``,``],[1,136,`KanaMode`,0,``,0,``,``,``],[0,137,`IntlYen`,0,``,0,``,``,``],[1,138,`Convert`,0,``,0,``,``,``],[1,139,`NonConvert`,0,``,0,``,``,``],[1,140,`Lang1`,0,``,0,``,``,``],[1,141,`Lang2`,0,``,0,``,``,``],[1,142,`Lang3`,0,``,0,``,``,``],[1,143,`Lang4`,0,``,0,``,``,``],[1,144,`Lang5`,0,``,0,``,``,``],[1,145,`Abort`,0,``,0,``,``,``],[1,146,`Props`,0,``,0,``,``,``],[1,147,`NumpadParenLeft`,0,``,0,``,``,``],[1,148,`NumpadParenRight`,0,``,0,``,``,``],[1,149,`NumpadBackspace`,0,``,0,``,``,``],[1,150,`NumpadMemoryStore`,0,``,0,``,``,``],[1,151,`NumpadMemoryRecall`,0,``,0,``,``,``],[1,152,`NumpadMemoryClear`,0,``,0,``,``,``],[1,153,`NumpadMemoryAdd`,0,``,0,``,``,``],[1,154,`NumpadMemorySubtract`,0,``,0,``,``,``],[1,155,`NumpadClear`,131,`Clear`,12,`VK_CLEAR`,``,``],[1,156,`NumpadClearEntry`,0,``,0,``,``,``],[1,0,``,5,`Ctrl`,17,`VK_CONTROL`,``,``],[1,0,``,4,`Shift`,16,`VK_SHIFT`,``,``],[1,0,``,6,`Alt`,18,`VK_MENU`,``,``],[1,0,``,57,`Meta`,91,`VK_COMMAND`,``,``],[1,157,`ControlLeft`,5,``,0,`VK_LCONTROL`,``,``],[1,158,`ShiftLeft`,4,``,0,`VK_LSHIFT`,``,``],[1,159,`AltLeft`,6,``,0,`VK_LMENU`,``,``],[1,160,`MetaLeft`,57,``,0,`VK_LWIN`,``,``],[1,161,`ControlRight`,5,``,0,`VK_RCONTROL`,``,``],[1,162,`ShiftRight`,4,``,0,`VK_RSHIFT`,``,``],[1,163,`AltRight`,6,``,0,`VK_RMENU`,``,``],[1,164,`MetaRight`,57,``,0,`VK_RWIN`,``,``],[1,165,`BrightnessUp`,0,``,0,``,``,``],[1,166,`BrightnessDown`,0,``,0,``,``,``],[1,167,`MediaPlay`,0,``,0,``,``,``],[1,168,`MediaRecord`,0,``,0,``,``,``],[1,169,`MediaFastForward`,0,``,0,``,``,``],[1,170,`MediaRewind`,0,``,0,``,``,``],[1,171,`MediaTrackNext`,124,`MediaTrackNext`,176,`VK_MEDIA_NEXT_TRACK`,``,``],[1,172,`MediaTrackPrevious`,125,`MediaTrackPrevious`,177,`VK_MEDIA_PREV_TRACK`,``,``],[1,173,`MediaStop`,126,`MediaStop`,178,`VK_MEDIA_STOP`,``,``],[1,174,`Eject`,0,``,0,``,``,``],[1,175,`MediaPlayPause`,127,`MediaPlayPause`,179,`VK_MEDIA_PLAY_PAUSE`,``,``],[1,176,`MediaSelect`,128,`LaunchMediaPlayer`,181,`VK_MEDIA_LAUNCH_MEDIA_SELECT`,``,``],[1,177,`LaunchMail`,129,`LaunchMail`,180,`VK_MEDIA_LAUNCH_MAIL`,``,``],[1,178,`LaunchApp2`,130,`LaunchApp2`,183,`VK_MEDIA_LAUNCH_APP2`,``,``],[1,179,`LaunchApp1`,0,``,0,`VK_MEDIA_LAUNCH_APP1`,``,``],[1,180,`SelectTask`,0,``,0,``,``,``],[1,181,`LaunchScreenSaver`,0,``,0,``,``,``],[1,182,`BrowserSearch`,120,`BrowserSearch`,170,`VK_BROWSER_SEARCH`,``,``],[1,183,`BrowserHome`,121,`BrowserHome`,172,`VK_BROWSER_HOME`,``,``],[1,184,`BrowserBack`,122,`BrowserBack`,166,`VK_BROWSER_BACK`,``,``],[1,185,`BrowserForward`,123,`BrowserForward`,167,`VK_BROWSER_FORWARD`,``,``],[1,186,`BrowserStop`,0,``,0,`VK_BROWSER_STOP`,``,``],[1,187,`BrowserRefresh`,0,``,0,`VK_BROWSER_REFRESH`,``,``],[1,188,`BrowserFavorites`,0,``,0,`VK_BROWSER_FAVORITES`,``,``],[1,189,`ZoomToggle`,0,``,0,``,``,``],[1,190,`MailReply`,0,``,0,``,``,``],[1,191,`MailForward`,0,``,0,``,``,``],[1,192,`MailSend`,0,``,0,``,``,``],[1,0,``,114,`KeyInComposition`,229,``,``,``],[1,0,``,116,`ABNT_C2`,194,`VK_ABNT_C2`,``,``],[1,0,``,96,`OEM_8`,223,`VK_OEM_8`,``,``],[1,0,``,0,``,0,`VK_KANA`,``,``],[1,0,``,0,``,0,`VK_HANGUL`,``,``],[1,0,``,0,``,0,`VK_JUNJA`,``,``],[1,0,``,0,``,0,`VK_FINAL`,``,``],[1,0,``,0,``,0,`VK_HANJA`,``,``],[1,0,``,0,``,0,`VK_KANJI`,``,``],[1,0,``,0,``,0,`VK_CONVERT`,``,``],[1,0,``,0,``,0,`VK_NONCONVERT`,``,``],[1,0,``,0,``,0,`VK_ACCEPT`,``,``],[1,0,``,0,``,0,`VK_MODECHANGE`,``,``],[1,0,``,0,``,0,`VK_SELECT`,``,``],[1,0,``,0,``,0,`VK_PRINT`,``,``],[1,0,``,0,``,0,`VK_EXECUTE`,``,``],[1,0,``,0,``,0,`VK_SNAPSHOT`,``,``],[1,0,``,0,``,0,`VK_HELP`,``,``],[1,0,``,0,``,0,`VK_APPS`,``,``],[1,0,``,0,``,0,`VK_PROCESSKEY`,``,``],[1,0,``,0,``,0,`VK_PACKET`,``,``],[1,0,``,0,``,0,`VK_DBE_SBCSCHAR`,``,``],[1,0,``,0,``,0,`VK_DBE_DBCSCHAR`,``,``],[1,0,``,0,``,0,`VK_ATTN`,``,``],[1,0,``,0,``,0,`VK_CRSEL`,``,``],[1,0,``,0,``,0,`VK_EXSEL`,``,``],[1,0,``,0,``,0,`VK_EREOF`,``,``],[1,0,``,0,``,0,`VK_PLAY`,``,``],[1,0,``,0,``,0,`VK_ZOOM`,``,``],[1,0,``,0,``,0,`VK_NONAME`,``,``],[1,0,``,0,``,0,`VK_PA1`,``,``],[1,0,``,0,``,0,`VK_OEM_CLEAR`,``,``]],t=[],n=[];for(let r of e){let[e,i,a,o,s,c,l,u,d]=r;if(n[i]||(n[i]=!0,mn[a]=i,hn[a.toLowerCase()]=i,e&&(gn[i]=o)),!t[o]){if(t[o]=!0,!s)throw Error(`String representation missing for key code ${o} around scan code ${a}`);un.define(o,s),dn.define(o,u||s),fn.define(o,d||u||s)}c&&(pn[c]=o)}})();var _n;(function(e){function t(e){return un.keyCodeToStr(e)}e.toString=t;function n(e){return un.strToKeyCode(e)}e.fromString=n;function r(e){return dn.keyCodeToStr(e)}e.toUserSettingsUS=r;function i(e){return fn.keyCodeToStr(e)}e.toUserSettingsGeneral=i;function a(e){return dn.strToKeyCode(e)||fn.strToKeyCode(e)}e.fromUserSettings=a;function o(e){if(e>=98&&e<=113)return null;switch(e){case 16:return`Up`;case 18:return`Down`;case 15:return`Left`;case 17:return`Right`;case 20:return`Delete`}return un.keyCodeToStr(e)}e.toElectronAccelerator=o})(_n||={});function vn(e,t){return(e|(t&65535)<<16>>>0)>>>0}var yn=class extends Error{constructor(e,t,n){let r;typeof t==`string`&&t.indexOf(`not `)===0?(r=`must not be`,t=t.replace(/^not /,``)):r=`must be`;let i=`The "${e}" ${e.indexOf(`.`)===-1?`argument`:`property`} ${r} of type ${t}`;i+=`. Received type ${typeof n}`,super(i),this.code=`ERR_INVALID_ARG_TYPE`}};function bn(e,t){if(typeof e!=`object`||!e)throw new yn(t,`Object`,e)}function xn(e,t){if(typeof e!=`string`)throw new yn(t,`string`,e)}let Sn=Fe===`win32`;function D(e){return e===47||e===92}function Cn(e){return e===47}function wn(e){return e>=65&&e<=90||e>=97&&e<=122}function Tn(e,t,n,r){let i=``,a=0,o=-1,s=0,c=0;for(let l=0;l<=e.length;++l){if(l<e.length)c=e.charCodeAt(l);else if(r(c))break;else c=47;if(r(c)){if(o!==l-1&&s!==1){if(s===2){if(i.length<2||a!==2||i.charCodeAt(i.length-1)!==46||i.charCodeAt(i.length-2)!==46){if(i.length>2){let e=i.lastIndexOf(n);e===-1?(i=``,a=0):(i=i.slice(0,e),a=i.length-1-i.lastIndexOf(n)),o=l,s=0;continue}if(i.length!==0){i=``,a=0,o=l,s=0;continue}}t&&(i+=i.length>0?`${n}..`:`..`,a=2)}else i.length>0?i+=`${n}${e.slice(o+1,l)}`:i=e.slice(o+1,l),a=l-o-1}o=l,s=0}else c===46&&s!==-1?++s:s=-1}return i}function En(e){return e?`${e[0]===`.`?``:`.`}${e}`:``}function Dn(e,t){bn(t,`pathObject`);let n=t.dir||t.root,r=t.base||`${t.name||``}${En(t.ext)}`;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}let On={resolve(...e){let t=``,n=``,r=!1;for(let i=e.length-1;i>=-1;i--){let a;if(i>=0){if(a=e[i],xn(a,`paths[${i}]`),a.length===0)continue}else t.length===0?a=Ne():(a=Pe[`=${t}`]||Ne(),(a===void 0||a.slice(0,2).toLowerCase()!==t.toLowerCase()&&a.charCodeAt(2)===92)&&(a=`${t}\\`));let o=a.length,s=0,c=``,l=!1,u=a.charCodeAt(0);if(o===1)D(u)&&(s=1,l=!0);else if(D(u)){if(l=!0,D(a.charCodeAt(1))){let e=2,t=e;for(;e<o&&!D(a.charCodeAt(e));)e++;if(e<o&&e!==t){let n=a.slice(t,e);for(t=e;e<o&&D(a.charCodeAt(e));)e++;if(e<o&&e!==t){for(t=e;e<o&&!D(a.charCodeAt(e));)e++;(e===o||e!==t)&&(c=`\\\\${n}\\${a.slice(t,e)}`,s=e)}}}else s=1}else wn(u)&&a.charCodeAt(1)===58&&(c=a.slice(0,2),s=2,o>2&&D(a.charCodeAt(2))&&(l=!0,s=3));if(c.length>0){if(t.length>0){if(c.toLowerCase()!==t.toLowerCase())continue}else t=c}if(r){if(t.length>0)break}else if(n=`${a.slice(s)}\\${n}`,r=l,l&&t.length>0)break}return n=Tn(n,!r,`\\`,D),r?`${t}\\${n}`:`${t}${n}`||`.`},normalize(e){xn(e,`path`);let t=e.length;if(t===0)return`.`;let n=0,r,i=!1,a=e.charCodeAt(0);if(t===1)return Cn(a)?`\\`:e;if(D(a)){if(i=!0,D(e.charCodeAt(1))){let i=2,a=i;for(;i<t&&!D(e.charCodeAt(i));)i++;if(i<t&&i!==a){let o=e.slice(a,i);for(a=i;i<t&&D(e.charCodeAt(i));)i++;if(i<t&&i!==a){for(a=i;i<t&&!D(e.charCodeAt(i));)i++;if(i===t)return`\\\\${o}\\${e.slice(a)}\\`;i!==a&&(r=`\\\\${o}\\${e.slice(a,i)}`,n=i)}}}else n=1}else wn(a)&&e.charCodeAt(1)===58&&(r=e.slice(0,2),n=2,t>2&&D(e.charCodeAt(2))&&(i=!0,n=3));let o=n<t?Tn(e.slice(n),!i,`\\`,D):``;if(o.length===0&&!i&&(o=`.`),o.length>0&&D(e.charCodeAt(t-1))&&(o+=`\\`),!i&&r===void 0&&e.includes(`:`)){if(o.length>=2&&wn(o.charCodeAt(0))&&o.charCodeAt(1)===58)return`.\\${o}`;let n=e.indexOf(`:`);do if(n===t-1||D(e.charCodeAt(n+1)))return`.\\${o}`;while((n=e.indexOf(`:`,n+1))!==-1)}return r===void 0?i?`\\${o}`:o:i?`${r}\\${o}`:`${r}${o}`},isAbsolute(e){xn(e,`path`);let t=e.length;if(t===0)return!1;let n=e.charCodeAt(0);return D(n)||t>2&&wn(n)&&e.charCodeAt(1)===58&&D(e.charCodeAt(2))},join(...e){if(e.length===0)return`.`;let t,n;for(let r=0;r<e.length;++r){let i=e[r];xn(i,`path`),i.length>0&&(t===void 0?t=n=i:t+=`\\${i}`)}if(t===void 0)return`.`;let r=!0,i=0;if(typeof n==`string`&&D(n.charCodeAt(0))){++i;let e=n.length;e>1&&D(n.charCodeAt(1))&&(++i,e>2&&(D(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i<t.length&&D(t.charCodeAt(i));)i++;i>=2&&(t=`\\${t.slice(i)}`)}return On.normalize(t)},relative(e,t){if(xn(e,`from`),xn(t,`to`),e===t)return``;let n=On.resolve(e),r=On.resolve(t);if(n===r||(e=n.toLowerCase(),t=r.toLowerCase(),e===t))return``;if(n.length!==e.length||r.length!==t.length){let e=n.split(`\\`),t=r.split(`\\`);e[e.length-1]===``&&e.pop(),t[t.length-1]===``&&t.pop();let i=e.length,a=t.length,o=i<a?i:a,s;for(s=0;s<o&&e[s].toLowerCase()===t[s].toLowerCase();s++);return s===0?r:s===o?a>o?t.slice(s).join(`\\`):i>o?`..\\`.repeat(i-1-s)+`..`:``:`..\\`.repeat(i-s)+t.slice(s).join(`\\`)}let i=0;for(;i<e.length&&e.charCodeAt(i)===92;)i++;let a=e.length;for(;a-1>i&&e.charCodeAt(a-1)===92;)a--;let o=a-i,s=0;for(;s<t.length&&t.charCodeAt(s)===92;)s++;let c=t.length;for(;c-1>s&&t.charCodeAt(c-1)===92;)c--;let l=c-s,u=o<l?o:l,d=-1,f=0;for(;f<u;f++){let n=e.charCodeAt(i+f);if(n!==t.charCodeAt(s+f))break;n===92&&(d=f)}if(f!==u){if(d===-1)return r}else{if(l>u){if(t.charCodeAt(s+f)===92)return r.slice(s+f+1);if(f===2)return r.slice(s+f)}o>u&&(e.charCodeAt(i+f)===92?d=f:f===2&&(d=3)),d===-1&&(d=0)}let p=``;for(f=i+d+1;f<=a;++f)(f===a||e.charCodeAt(f)===92)&&(p+=p.length===0?`..`:`\\..`);return s+=d,p.length>0?`${p}${r.slice(s,c)}`:(r.charCodeAt(s)===92&&++s,r.slice(s,c))},toNamespacedPath(e){if(typeof e!=`string`||e.length===0)return e;let t=On.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===92){if(t.charCodeAt(1)===92){let e=t.charCodeAt(2);if(e!==63&&e!==46)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(wn(t.charCodeAt(0))&&t.charCodeAt(1)===58&&t.charCodeAt(2)===92)return`\\\\?\\${t}`;return t},dirname(e){xn(e,`path`);let t=e.length;if(t===0)return`.`;let n=-1,r=0,i=e.charCodeAt(0);if(t===1)return D(i)?e:`.`;if(D(i)){if(n=r=1,D(e.charCodeAt(1))){let i=2,a=i;for(;i<t&&!D(e.charCodeAt(i));)i++;if(i<t&&i!==a){for(a=i;i<t&&D(e.charCodeAt(i));)i++;if(i<t&&i!==a){for(a=i;i<t&&!D(e.charCodeAt(i));)i++;if(i===t)return e;i!==a&&(n=r=i+1)}}}}else wn(i)&&e.charCodeAt(1)===58&&(n=t>2&&D(e.charCodeAt(2))?3:2,r=n);let a=-1,o=!0;for(let n=t-1;n>=r;--n)if(D(e.charCodeAt(n))){if(!o){a=n;break}}else o=!1;if(a===-1){if(n===-1)return`.`;a=n}return e.slice(0,a)},basename(e,t){t!==void 0&&xn(t,`suffix`),xn(e,`path`);let n=0,r=-1,i=!0,a;if(e.length>=2&&wn(e.charCodeAt(0))&&e.charCodeAt(1)===58&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return``;let o=t.length-1,s=-1;for(a=e.length-1;a>=n;--a){let c=e.charCodeAt(a);if(D(c)){if(!i){n=a+1;break}}else s===-1&&(i=!1,s=a+1),o>=0&&(c===t.charCodeAt(o)?--o===-1&&(r=a):(o=-1,r=s))}return n===r?r=s:r===-1&&(r=e.length),e.slice(n,r)}for(a=e.length-1;a>=n;--a)if(D(e.charCodeAt(a))){if(!i){n=a+1;break}}else r===-1&&(i=!1,r=a+1);return r===-1?``:e.slice(n,r)},extname(e){xn(e,`path`);let t=0,n=-1,r=0,i=-1,a=!0,o=0;e.length>=2&&e.charCodeAt(1)===58&&wn(e.charCodeAt(0))&&(t=r=2);for(let s=e.length-1;s>=t;--s){let t=e.charCodeAt(s);if(D(t)){if(!a){r=s+1;break}continue}i===-1&&(a=!1,i=s+1),t===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1)}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},format:Dn.bind(null,`\\`),parse(e){xn(e,`path`);let t={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return t;let n=e.length,r=0,i=e.charCodeAt(0);if(n===1)return D(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(D(i)){if(r=1,D(e.charCodeAt(1))){let t=2,i=t;for(;t<n&&!D(e.charCodeAt(t));)t++;if(t<n&&t!==i){for(i=t;t<n&&D(e.charCodeAt(t));)t++;if(t<n&&t!==i){for(i=t;t<n&&!D(e.charCodeAt(t));)t++;t===n?r=t:t!==i&&(r=t+1)}}}}else if(wn(i)&&e.charCodeAt(1)===58){if(n<=2)return t.root=t.dir=e,t;if(r=2,D(e.charCodeAt(2))){if(n===3)return t.root=t.dir=e,t;r=3}}r>0&&(t.root=e.slice(0,r));let a=-1,o=r,s=-1,c=!0,l=e.length-1,u=0;for(;l>=r;--l){if(i=e.charCodeAt(l),D(i)){if(!c){o=l+1;break}continue}s===-1&&(c=!1,s=l+1),i===46?a===-1?a=l:u!==1&&(u=1):a!==-1&&(u=-1)}return s!==-1&&(a===-1||u===0||u===1&&a===s-1&&a===o+1?t.base=t.name=e.slice(o,s):(t.name=e.slice(o,a),t.base=e.slice(o,s),t.ext=e.slice(a,s))),t.dir=o>0&&o!==r?e.slice(0,o-1):t.root,t},sep:`\\`,delimiter:`;`,win32:null,posix:null},kn=(()=>{if(Sn){let e=/\\/g;return()=>{let t=Ne().replace(e,`/`);return t.slice(t.indexOf(`/`))}}return()=>Ne()})(),An={resolve(...e){let t=``,n=!1;for(let r=e.length-1;r>=0&&!n;r--){let i=e[r];xn(i,`paths[${r}]`),i.length!==0&&(t=`${i}/${t}`,n=i.charCodeAt(0)===47)}if(!n){let e=kn();t=`${e}/${t}`,n=e.charCodeAt(0)===47}return t=Tn(t,!n,`/`,Cn),n?`/${t}`:t.length>0?t:`.`},normalize(e){if(xn(e,`path`),e.length===0)return`.`;let t=e.charCodeAt(0)===47,n=e.charCodeAt(e.length-1)===47;return e=Tn(e,!t,`/`,Cn),e.length===0?t?`/`:n?`./`:`.`:(n&&(e+=`/`),t?`/${e}`:e)},isAbsolute(e){return xn(e,`path`),e.length>0&&e.charCodeAt(0)===47},join(...e){if(e.length===0)return`.`;let t=[];for(let n=0;n<e.length;++n){let r=e[n];xn(r,`path`),r.length>0&&t.push(r)}return t.length===0?`.`:An.normalize(t.join(`/`))},relative(e,t){if(xn(e,`from`),xn(t,`to`),e===t||(e=An.resolve(e),t=An.resolve(t),e===t))return``;let n=e.length,r=n-1,i=t.length-1,a=r<i?r:i,o=-1,s=0;for(;s<a;s++){let n=e.charCodeAt(1+s);if(n!==t.charCodeAt(1+s))break;n===47&&(o=s)}if(s===a){if(i>a){if(t.charCodeAt(1+s)===47)return t.slice(1+s+1);if(s===0)return t.slice(1+s)}else r>a&&(e.charCodeAt(1+s)===47?o=s:s===0&&(o=0))}let c=``;for(s=1+o+1;s<=n;++s)(s===n||e.charCodeAt(s)===47)&&(c+=c.length===0?`..`:`/..`);return`${c}${t.slice(1+o)}`},toNamespacedPath(e){return e},dirname(e){if(xn(e,`path`),e.length===0)return`.`;let t=e.charCodeAt(0)===47,n=-1,r=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===47){if(!r){n=t;break}}else r=!1;return n===-1?t?`/`:`.`:t&&n===1?`//`:e.slice(0,n)},basename(e,t){t!==void 0&&xn(t,`suffix`),xn(e,`path`);let n=0,r=-1,i=!0,a;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return``;let o=t.length-1,s=-1;for(a=e.length-1;a>=0;--a){let c=e.charCodeAt(a);if(c===47){if(!i){n=a+1;break}}else s===-1&&(i=!1,s=a+1),o>=0&&(c===t.charCodeAt(o)?--o===-1&&(r=a):(o=-1,r=s))}return n===r?r=s:r===-1&&(r=e.length),e.slice(n,r)}for(a=e.length-1;a>=0;--a)if(e.charCodeAt(a)===47){if(!i){n=a+1;break}}else r===-1&&(i=!1,r=a+1);return r===-1?``:e.slice(n,r)},extname(e){xn(e,`path`);let t=-1,n=0,r=-1,i=!0,a=0;for(let o=e.length-1;o>=0;--o){let s=e[o];if(s===`/`){if(!i){n=o+1;break}continue}r===-1&&(i=!1,r=o+1),s===`.`?t===-1?t=o:a!==1&&(a=1):t!==-1&&(a=-1)}return t===-1||r===-1||a===0||a===1&&t===r-1&&t===n+1?``:e.slice(t,r)},format:Dn.bind(null,`/`),parse(e){xn(e,`path`);let t={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return t;let n=e.charCodeAt(0)===47,r;n?(t.root=`/`,r=1):r=0;let i=-1,a=0,o=-1,s=!0,c=e.length-1,l=0;for(;c>=r;--c){let t=e.charCodeAt(c);if(t===47){if(!s){a=c+1;break}continue}o===-1&&(s=!1,o=c+1),t===46?i===-1?i=c:l!==1&&(l=1):i!==-1&&(l=-1)}if(o!==-1){let r=a===0&&n?1:a;i===-1||l===0||l===1&&i===o-1&&i===a+1?t.base=t.name=e.slice(r,o):(t.name=e.slice(r,i),t.base=e.slice(r,o),t.ext=e.slice(i,o))}return a>0?t.dir=e.slice(0,a-1):n&&(t.dir=`/`),t},sep:`/`,delimiter:`:`,win32:null,posix:null};An.win32=On.win32=On,An.posix=On.posix=An,Sn?On.normalize:An.normalize;let jn=Sn?On.join:An.join;Sn?On.resolve:An.resolve,Sn?On.relative:An.relative,Sn?On.dirname:An.dirname,Sn?On.basename:An.basename,Sn?On.extname:An.extname,Sn?On.sep:An.sep;let Mn=/^\w[\w\d+.-]*$/,Nn=/^\//,Pn=/^\/\//;function Fn(e,t){if(!e.scheme&&t)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!Mn.test(e.scheme)){let t=[...e.scheme.matchAll(/[^\w\d+.-]/gu)],n=t.length>0?` Found '${t[0][0]}' at index ${t[0].index} (${t.length} total)`:``;throw Error(`[UriError]: Scheme contains illegal characters.${n} (len:${e.scheme.length})`)}if(e.path){if(e.authority){if(!Nn.test(e.path))throw Error(`[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character`)}else if(Pn.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}function In(e,t){return!e&&!t?`file`:e}function Ln(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==Rn&&(t=Rn+t):t=Rn}return t}let Rn=`/`,zn=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;var Bn=class e{static isUri(t){return t instanceof e?!0:!t||typeof t!=`object`?!1:typeof t.authority==`string`&&typeof t.fragment==`string`&&typeof t.path==`string`&&typeof t.query==`string`&&typeof t.scheme==`string`&&typeof t.fsPath==`string`&&typeof t.with==`function`&&typeof t.toString==`function`}constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=In(e,a),this.authority=t||``,this.path=Ln(this.scheme,n||``),this.query=r||``,this.fragment=i||``,Fn(this,a))}get fsPath(){return Kn(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new Hn(t,n,r,i,a)}static parse(e,t=!1){let n=zn.exec(e);return n?new Hn(n[2]||``,Xn(n[4]||``),Xn(n[5]||``),Xn(n[7]||``),Xn(n[9]||``),t):new Hn(``,``,``,``,``)}static file(e){let t=``;if(Ce&&(e=e.replace(/\\/g,`/`)),e[0]===`/`&&e[1]===`/`){let n=e.indexOf(`/`,2);n===-1?(t=e.substring(2),e=`/`):(t=e.substring(2,n),e=e.substring(n)||`/`)}return new Hn(`file`,t,e,``,``)}static from(e,t){return new Hn(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(t,...n){if(!t.path)throw Error(`[UriError]: cannot call joinPath on URI without path: ${t.toString()}`);let r;return r=Ce&&t.scheme===`file`?e.file(On.join(Kn(t,!0),...n)).path:An.join(t.path,...n),t.with({path:r})}toString(e=!1){return qn(this,e)}toJSON(){return this}static revive(t){if(!t||t instanceof e)return t;{let e=new Hn(t);return e._formatted=t.external??null,e._fsPath=t._sep===Vn?t.fsPath??null:null,e}}};let Vn=Ce?1:void 0;var Hn=class extends Bn{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||=Kn(this,!1),this._fsPath}toString(e=!1){return e?qn(this,!0):(this._formatted||=qn(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Vn),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}};let Un={58:`%3A`,47:`%2F`,63:`%3F`,35:`%23`,91:`%5B`,93:`%5D`,64:`%40`,33:`%21`,36:`%24`,38:`%26`,39:`%27`,40:`%28`,41:`%29`,42:`%2A`,43:`%2B`,44:`%2C`,59:`%3B`,61:`%3D`,32:`%20`};function Wn(e,t,n){let r,i=-1;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=Un[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}function Gn(e){let t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r===35||r===63?(t===void 0&&(t=e.substr(0,n)),t+=Un[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}function Kn(e,t){let n;return n=e.authority&&e.path.length>1&&e.scheme===`file`?`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,Ce&&(n=n.replace(/\//g,`\\`)),n}function qn(e,t){let n=t?Gn:Wn,r=``,{scheme:i,authority:a,path:o,query:s,fragment:c}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),c&&(r+=`#`,r+=t?c:Wn(c,!1,!1)),r}function Jn(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+Jn(e.substr(3)):e}}let Yn=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Xn(e){return e.match(Yn)?e.replace(Yn,e=>Jn(e)):e}var Zn=class e extends E{constructor(e,t,n,r){super(e,t,n,r),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=r}toString(){return`[`+this.selectionStartLineNumber+`,`+this.selectionStartColumn+` -> `+this.positionLineNumber+`,`+this.positionColumn+`]`}equalsSelection(t){return e.selectionsEqual(this,t)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,n){return this.getDirection()===0?new e(this.startLineNumber,this.startColumn,t,n):new e(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new T(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new T(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(t,n){return this.getDirection()===0?new e(t,n,this.endLineNumber,this.endColumn):new e(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new e(t.lineNumber,t.column,n.lineNumber,n.column)}static fromRange(t,n){return n===0?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new e(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}static liftSelection(t){return new e(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(!this.selectionsEqual(e[n],t[n]))return!1;return!0}static isISelection(e){return!!e&&typeof e.selectionStartLineNumber==`number`&&typeof e.selectionStartColumn==`number`&&typeof e.positionLineNumber==`number`&&typeof e.positionColumn==`number`}static createWithDirection(t,n,r,i,a){return a===0?new e(t,n,r,i):new e(r,i,t,n)}};let Qn=Object.create(null);function O(e,t){if(S(t)){let n=Qn[t];if(n===void 0)throw Error(`${e} references an unknown codicon: ${t}`);t=n}return Qn[e]=t,{id:e}}let $n={add:O(`add`,6e4),plus:O(`plus`,6e4),gistNew:O(`gist-new`,6e4),repoCreate:O(`repo-create`,6e4),lightbulb:O(`lightbulb`,60001),lightBulb:O(`light-bulb`,60001),repo:O(`repo`,60002),repoDelete:O(`repo-delete`,60002),gistFork:O(`gist-fork`,60003),repoForked:O(`repo-forked`,60003),gitPullRequest:O(`git-pull-request`,60004),gitPullRequestAbandoned:O(`git-pull-request-abandoned`,60004),recordKeys:O(`record-keys`,60005),keyboard:O(`keyboard`,60005),tag:O(`tag`,60006),gitPullRequestLabel:O(`git-pull-request-label`,60006),tagAdd:O(`tag-add`,60006),tagRemove:O(`tag-remove`,60006),person:O(`person`,60007),personFollow:O(`person-follow`,60007),personOutline:O(`person-outline`,60007),personFilled:O(`person-filled`,60007),sourceControl:O(`source-control`,60008),mirror:O(`mirror`,60009),mirrorPublic:O(`mirror-public`,60009),star:O(`star`,60010),starAdd:O(`star-add`,60010),starDelete:O(`star-delete`,60010),starEmpty:O(`star-empty`,60010),comment:O(`comment`,60011),commentAdd:O(`comment-add`,60011),alert:O(`alert`,60012),warning:O(`warning`,60012),search:O(`search`,60013),searchSave:O(`search-save`,60013),logOut:O(`log-out`,60014),signOut:O(`sign-out`,60014),logIn:O(`log-in`,60015),signIn:O(`sign-in`,60015),eye:O(`eye`,60016),eyeUnwatch:O(`eye-unwatch`,60016),eyeWatch:O(`eye-watch`,60016),circleFilled:O(`circle-filled`,60017),primitiveDot:O(`primitive-dot`,60017),closeDirty:O(`close-dirty`,60017),debugBreakpoint:O(`debug-breakpoint`,60017),debugBreakpointDisabled:O(`debug-breakpoint-disabled`,60017),debugHint:O(`debug-hint`,60017),terminalDecorationSuccess:O(`terminal-decoration-success`,60017),primitiveSquare:O(`primitive-square`,60018),edit:O(`edit`,60019),pencil:O(`pencil`,60019),info:O(`info`,60020),issueOpened:O(`issue-opened`,60020),gistPrivate:O(`gist-private`,60021),gitForkPrivate:O(`git-fork-private`,60021),lock:O(`lock`,60021),mirrorPrivate:O(`mirror-private`,60021),close:O(`close`,60022),removeClose:O(`remove-close`,60022),x:O(`x`,60022),repoSync:O(`repo-sync`,60023),sync:O(`sync`,60023),clone:O(`clone`,60024),desktopDownload:O(`desktop-download`,60024),beaker:O(`beaker`,60025),microscope:O(`microscope`,60025),vm:O(`vm`,60026),deviceDesktop:O(`device-desktop`,60026),file:O(`file`,60027),more:O(`more`,60028),ellipsis:O(`ellipsis`,60028),kebabHorizontal:O(`kebab-horizontal`,60028),mailReply:O(`mail-reply`,60029),reply:O(`reply`,60029),organization:O(`organization`,60030),organizationFilled:O(`organization-filled`,60030),organizationOutline:O(`organization-outline`,60030),newFile:O(`new-file`,60031),fileAdd:O(`file-add`,60031),newFolder:O(`new-folder`,60032),fileDirectoryCreate:O(`file-directory-create`,60032),trash:O(`trash`,60033),trashcan:O(`trashcan`,60033),history:O(`history`,60034),clock:O(`clock`,60034),folder:O(`folder`,60035),fileDirectory:O(`file-directory`,60035),symbolFolder:O(`symbol-folder`,60035),logoGithub:O(`logo-github`,60036),markGithub:O(`mark-github`,60036),github:O(`github`,60036),terminal:O(`terminal`,60037),console:O(`console`,60037),repl:O(`repl`,60037),zap:O(`zap`,60038),symbolEvent:O(`symbol-event`,60038),error:O(`error`,60039),stop:O(`stop`,60039),variable:O(`variable`,60040),symbolVariable:O(`symbol-variable`,60040),array:O(`array`,60042),symbolArray:O(`symbol-array`,60042),symbolModule:O(`symbol-module`,60043),symbolPackage:O(`symbol-package`,60043),symbolNamespace:O(`symbol-namespace`,60043),symbolObject:O(`symbol-object`,60043),symbolMethod:O(`symbol-method`,60044),symbolFunction:O(`symbol-function`,60044),symbolConstructor:O(`symbol-constructor`,60044),symbolBoolean:O(`symbol-boolean`,60047),symbolNull:O(`symbol-null`,60047),symbolNumeric:O(`symbol-numeric`,60048),symbolNumber:O(`symbol-number`,60048),symbolStructure:O(`symbol-structure`,60049),symbolStruct:O(`symbol-struct`,60049),symbolParameter:O(`symbol-parameter`,60050),symbolTypeParameter:O(`symbol-type-parameter`,60050),symbolKey:O(`symbol-key`,60051),symbolText:O(`symbol-text`,60051),symbolReference:O(`symbol-reference`,60052),goToFile:O(`go-to-file`,60052),symbolEnum:O(`symbol-enum`,60053),symbolValue:O(`symbol-value`,60053),symbolRuler:O(`symbol-ruler`,60054),symbolUnit:O(`symbol-unit`,60054),activateBreakpoints:O(`activate-breakpoints`,60055),archive:O(`archive`,60056),arrowBoth:O(`arrow-both`,60057),arrowDown:O(`arrow-down`,60058),arrowLeft:O(`arrow-left`,60059),arrowRight:O(`arrow-right`,60060),arrowSmallDown:O(`arrow-small-down`,60061),arrowSmallLeft:O(`arrow-small-left`,60062),arrowSmallRight:O(`arrow-small-right`,60063),arrowSmallUp:O(`arrow-small-up`,60064),arrowUp:O(`arrow-up`,60065),bell:O(`bell`,60066),bold:O(`bold`,60067),book:O(`book`,60068),bookmark:O(`bookmark`,60069),debugBreakpointConditionalUnverified:O(`debug-breakpoint-conditional-unverified`,60070),debugBreakpointConditional:O(`debug-breakpoint-conditional`,60071),debugBreakpointConditionalDisabled:O(`debug-breakpoint-conditional-disabled`,60071),debugBreakpointDataUnverified:O(`debug-breakpoint-data-unverified`,60072),debugBreakpointData:O(`debug-breakpoint-data`,60073),debugBreakpointDataDisabled:O(`debug-breakpoint-data-disabled`,60073),debugBreakpointLogUnverified:O(`debug-breakpoint-log-unverified`,60074),debugBreakpointLog:O(`debug-breakpoint-log`,60075),debugBreakpointLogDisabled:O(`debug-breakpoint-log-disabled`,60075),briefcase:O(`briefcase`,60076),broadcast:O(`broadcast`,60077),browser:O(`browser`,60078),bug:O(`bug`,60079),calendar:O(`calendar`,60080),caseSensitive:O(`case-sensitive`,60081),check:O(`check`,60082),checklist:O(`checklist`,60083),chevronDown:O(`chevron-down`,60084),chevronLeft:O(`chevron-left`,60085),chevronRight:O(`chevron-right`,60086),chevronUp:O(`chevron-up`,60087),chromeClose:O(`chrome-close`,60088),chromeMaximize:O(`chrome-maximize`,60089),chromeMinimize:O(`chrome-minimize`,60090),chromeRestore:O(`chrome-restore`,60091),circleOutline:O(`circle-outline`,60092),circle:O(`circle`,60092),debugBreakpointUnverified:O(`debug-breakpoint-unverified`,60092),terminalDecorationIncomplete:O(`terminal-decoration-incomplete`,60092),circleSlash:O(`circle-slash`,60093),circuitBoard:O(`circuit-board`,60094),clearAll:O(`clear-all`,60095),clippy:O(`clippy`,60096),closeAll:O(`close-all`,60097),cloudDownload:O(`cloud-download`,60098),cloudUpload:O(`cloud-upload`,60099),code:O(`code`,60100),collapseAll:O(`collapse-all`,60101),colorMode:O(`color-mode`,60102),commentDiscussion:O(`comment-discussion`,60103),creditCard:O(`credit-card`,60105),dash:O(`dash`,60108),dashboard:O(`dashboard`,60109),database:O(`database`,60110),debugContinue:O(`debug-continue`,60111),debugDisconnect:O(`debug-disconnect`,60112),debugPause:O(`debug-pause`,60113),debugRestart:O(`debug-restart`,60114),debugStart:O(`debug-start`,60115),debugStepInto:O(`debug-step-into`,60116),debugStepOut:O(`debug-step-out`,60117),debugStepOver:O(`debug-step-over`,60118),debugStop:O(`debug-stop`,60119),debug:O(`debug`,60120),deviceCameraVideo:O(`device-camera-video`,60121),deviceCamera:O(`device-camera`,60122),deviceMobile:O(`device-mobile`,60123),diffAdded:O(`diff-added`,60124),diffIgnored:O(`diff-ignored`,60125),diffModified:O(`diff-modified`,60126),diffRemoved:O(`diff-removed`,60127),diffRenamed:O(`diff-renamed`,60128),diff:O(`diff`,60129),diffSidebyside:O(`diff-sidebyside`,60129),discard:O(`discard`,60130),editorLayout:O(`editor-layout`,60131),emptyWindow:O(`empty-window`,60132),exclude:O(`exclude`,60133),extensions:O(`extensions`,60134),eyeClosed:O(`eye-closed`,60135),fileBinary:O(`file-binary`,60136),fileCode:O(`file-code`,60137),fileMedia:O(`file-media`,60138),filePdf:O(`file-pdf`,60139),fileSubmodule:O(`file-submodule`,60140),fileSymlinkDirectory:O(`file-symlink-directory`,60141),fileSymlinkFile:O(`file-symlink-file`,60142),fileZip:O(`file-zip`,60143),files:O(`files`,60144),filter:O(`filter`,60145),flame:O(`flame`,60146),foldDown:O(`fold-down`,60147),foldUp:O(`fold-up`,60148),fold:O(`fold`,60149),folderActive:O(`folder-active`,60150),folderOpened:O(`folder-opened`,60151),gear:O(`gear`,60152),gift:O(`gift`,60153),gistSecret:O(`gist-secret`,60154),gist:O(`gist`,60155),gitCommit:O(`git-commit`,60156),gitCompare:O(`git-compare`,60157),compareChanges:O(`compare-changes`,60157),gitMerge:O(`git-merge`,60158),githubAction:O(`github-action`,60159),githubAlt:O(`github-alt`,60160),globe:O(`globe`,60161),grabber:O(`grabber`,60162),graph:O(`graph`,60163),gripper:O(`gripper`,60164),heart:O(`heart`,60165),home:O(`home`,60166),horizontalRule:O(`horizontal-rule`,60167),hubot:O(`hubot`,60168),inbox:O(`inbox`,60169),issueReopened:O(`issue-reopened`,60171),issues:O(`issues`,60172),italic:O(`italic`,60173),jersey:O(`jersey`,60174),json:O(`json`,60175),bracket:O(`bracket`,60175),kebabVertical:O(`kebab-vertical`,60176),key:O(`key`,60177),law:O(`law`,60178),lightbulbAutofix:O(`lightbulb-autofix`,60179),linkExternal:O(`link-external`,60180),link:O(`link`,60181),listOrdered:O(`list-ordered`,60182),listUnordered:O(`list-unordered`,60183),liveShare:O(`live-share`,60184),loading:O(`loading`,60185),location:O(`location`,60186),mailRead:O(`mail-read`,60187),mail:O(`mail`,60188),markdown:O(`markdown`,60189),megaphone:O(`megaphone`,60190),mention:O(`mention`,60191),milestone:O(`milestone`,60192),gitPullRequestMilestone:O(`git-pull-request-milestone`,60192),mortarBoard:O(`mortar-board`,60193),move:O(`move`,60194),multipleWindows:O(`multiple-windows`,60195),mute:O(`mute`,60196),noNewline:O(`no-newline`,60197),note:O(`note`,60198),octoface:O(`octoface`,60199),openPreview:O(`open-preview`,60200),package:O(`package`,60201),paintcan:O(`paintcan`,60202),pin:O(`pin`,60203),play:O(`play`,60204),run:O(`run`,60204),plug:O(`plug`,60205),preserveCase:O(`preserve-case`,60206),preview:O(`preview`,60207),project:O(`project`,60208),pulse:O(`pulse`,60209),question:O(`question`,60210),quote:O(`quote`,60211),radioTower:O(`radio-tower`,60212),reactions:O(`reactions`,60213),references:O(`references`,60214),refresh:O(`refresh`,60215),regex:O(`regex`,60216),remoteExplorer:O(`remote-explorer`,60217),remote:O(`remote`,60218),remove:O(`remove`,60219),replaceAll:O(`replace-all`,60220),replace:O(`replace`,60221),repoClone:O(`repo-clone`,60222),repoForcePush:O(`repo-force-push`,60223),repoPull:O(`repo-pull`,60224),repoPush:O(`repo-push`,60225),report:O(`report`,60226),requestChanges:O(`request-changes`,60227),rocket:O(`rocket`,60228),rootFolderOpened:O(`root-folder-opened`,60229),rootFolder:O(`root-folder`,60230),rss:O(`rss`,60231),ruby:O(`ruby`,60232),saveAll:O(`save-all`,60233),saveAs:O(`save-as`,60234),save:O(`save`,60235),screenFull:O(`screen-full`,60236),screenNormal:O(`screen-normal`,60237),searchStop:O(`search-stop`,60238),server:O(`server`,60240),settingsGear:O(`settings-gear`,60241),settings:O(`settings`,60242),shield:O(`shield`,60243),smiley:O(`smiley`,60244),sortPrecedence:O(`sort-precedence`,60245),splitHorizontal:O(`split-horizontal`,60246),splitVertical:O(`split-vertical`,60247),squirrel:O(`squirrel`,60248),starFull:O(`star-full`,60249),starHalf:O(`star-half`,60250),symbolClass:O(`symbol-class`,60251),symbolColor:O(`symbol-color`,60252),symbolConstant:O(`symbol-constant`,60253),symbolEnumMember:O(`symbol-enum-member`,60254),symbolField:O(`symbol-field`,60255),symbolFile:O(`symbol-file`,60256),symbolInterface:O(`symbol-interface`,60257),symbolKeyword:O(`symbol-keyword`,60258),symbolMisc:O(`symbol-misc`,60259),symbolOperator:O(`symbol-operator`,60260),symbolProperty:O(`symbol-property`,60261),wrench:O(`wrench`,60261),wrenchSubaction:O(`wrench-subaction`,60261),symbolSnippet:O(`symbol-snippet`,60262),tasklist:O(`tasklist`,60263),telescope:O(`telescope`,60264),textSize:O(`text-size`,60265),threeBars:O(`three-bars`,60266),thumbsdown:O(`thumbsdown`,60267),thumbsup:O(`thumbsup`,60268),tools:O(`tools`,60269),triangleDown:O(`triangle-down`,60270),triangleLeft:O(`triangle-left`,60271),triangleRight:O(`triangle-right`,60272),triangleUp:O(`triangle-up`,60273),twitter:O(`twitter`,60274),unfold:O(`unfold`,60275),unlock:O(`unlock`,60276),unmute:O(`unmute`,60277),unverified:O(`unverified`,60278),verified:O(`verified`,60279),versions:O(`versions`,60280),vmActive:O(`vm-active`,60281),vmOutline:O(`vm-outline`,60282),vmRunning:O(`vm-running`,60283),watch:O(`watch`,60284),whitespace:O(`whitespace`,60285),wholeWord:O(`whole-word`,60286),window:O(`window`,60287),wordWrap:O(`word-wrap`,60288),zoomIn:O(`zoom-in`,60289),zoomOut:O(`zoom-out`,60290),listFilter:O(`list-filter`,60291),listFlat:O(`list-flat`,60292),listSelection:O(`list-selection`,60293),selection:O(`selection`,60293),listTree:O(`list-tree`,60294),debugBreakpointFunctionUnverified:O(`debug-breakpoint-function-unverified`,60295),debugBreakpointFunction:O(`debug-breakpoint-function`,60296),debugBreakpointFunctionDisabled:O(`debug-breakpoint-function-disabled`,60296),debugStackframeActive:O(`debug-stackframe-active`,60297),circleSmallFilled:O(`circle-small-filled`,60298),debugStackframeDot:O(`debug-stackframe-dot`,60298),terminalDecorationMark:O(`terminal-decoration-mark`,60298),debugStackframe:O(`debug-stackframe`,60299),debugStackframeFocused:O(`debug-stackframe-focused`,60299),debugBreakpointUnsupported:O(`debug-breakpoint-unsupported`,60300),symbolString:O(`symbol-string`,60301),debugReverseContinue:O(`debug-reverse-continue`,60302),debugStepBack:O(`debug-step-back`,60303),debugRestartFrame:O(`debug-restart-frame`,60304),debugAlt:O(`debug-alt`,60305),callIncoming:O(`call-incoming`,60306),callOutgoing:O(`call-outgoing`,60307),menu:O(`menu`,60308),expandAll:O(`expand-all`,60309),feedback:O(`feedback`,60310),gitPullRequestReviewer:O(`git-pull-request-reviewer`,60310),groupByRefType:O(`group-by-ref-type`,60311),ungroupByRefType:O(`ungroup-by-ref-type`,60312),account:O(`account`,60313),gitPullRequestAssignee:O(`git-pull-request-assignee`,60313),bellDot:O(`bell-dot`,60314),debugConsole:O(`debug-console`,60315),library:O(`library`,60316),output:O(`output`,60317),runAll:O(`run-all`,60318),syncIgnored:O(`sync-ignored`,60319),pinned:O(`pinned`,60320),githubInverted:O(`github-inverted`,60321),serverProcess:O(`server-process`,60322),serverEnvironment:O(`server-environment`,60323),pass:O(`pass`,60324),issueClosed:O(`issue-closed`,60324),stopCircle:O(`stop-circle`,60325),playCircle:O(`play-circle`,60326),record:O(`record`,60327),debugAltSmall:O(`debug-alt-small`,60328),vmConnect:O(`vm-connect`,60329),cloud:O(`cloud`,60330),merge:O(`merge`,60331),export:O(`export`,60332),graphLeft:O(`graph-left`,60333),magnet:O(`magnet`,60334),notebook:O(`notebook`,60335),redo:O(`redo`,60336),checkAll:O(`check-all`,60337),pinnedDirty:O(`pinned-dirty`,60338),passFilled:O(`pass-filled`,60339),circleLargeFilled:O(`circle-large-filled`,60340),circleLarge:O(`circle-large`,60341),circleLargeOutline:O(`circle-large-outline`,60341),combine:O(`combine`,60342),gather:O(`gather`,60342),table:O(`table`,60343),variableGroup:O(`variable-group`,60344),typeHierarchy:O(`type-hierarchy`,60345),typeHierarchySub:O(`type-hierarchy-sub`,60346),typeHierarchySuper:O(`type-hierarchy-super`,60347),gitPullRequestCreate:O(`git-pull-request-create`,60348),runAbove:O(`run-above`,60349),runBelow:O(`run-below`,60350),notebookTemplate:O(`notebook-template`,60351),debugRerun:O(`debug-rerun`,60352),workspaceTrusted:O(`workspace-trusted`,60353),workspaceUntrusted:O(`workspace-untrusted`,60354),workspaceUnknown:O(`workspace-unknown`,60355),terminalCmd:O(`terminal-cmd`,60356),terminalDebian:O(`terminal-debian`,60357),terminalLinux:O(`terminal-linux`,60358),terminalPowershell:O(`terminal-powershell`,60359),terminalTmux:O(`terminal-tmux`,60360),terminalUbuntu:O(`terminal-ubuntu`,60361),terminalBash:O(`terminal-bash`,60362),arrowSwap:O(`arrow-swap`,60363),copy:O(`copy`,60364),personAdd:O(`person-add`,60365),filterFilled:O(`filter-filled`,60366),wand:O(`wand`,60367),debugLineByLine:O(`debug-line-by-line`,60368),inspect:O(`inspect`,60369),layers:O(`layers`,60370),layersDot:O(`layers-dot`,60371),layersActive:O(`layers-active`,60372),compass:O(`compass`,60373),compassDot:O(`compass-dot`,60374),compassActive:O(`compass-active`,60375),azure:O(`azure`,60376),issueDraft:O(`issue-draft`,60377),gitPullRequestClosed:O(`git-pull-request-closed`,60378),gitPullRequestDraft:O(`git-pull-request-draft`,60379),debugAll:O(`debug-all`,60380),debugCoverage:O(`debug-coverage`,60381),runErrors:O(`run-errors`,60382),folderLibrary:O(`folder-library`,60383),debugContinueSmall:O(`debug-continue-small`,60384),beakerStop:O(`beaker-stop`,60385),graphLine:O(`graph-line`,60386),graphScatter:O(`graph-scatter`,60387),pieChart:O(`pie-chart`,60388),bracketDot:O(`bracket-dot`,60389),bracketError:O(`bracket-error`,60390),lockSmall:O(`lock-small`,60391),azureDevops:O(`azure-devops`,60392),verifiedFilled:O(`verified-filled`,60393),newline:O(`newline`,60394),layout:O(`layout`,60395),layoutActivitybarLeft:O(`layout-activitybar-left`,60396),layoutActivitybarRight:O(`layout-activitybar-right`,60397),layoutPanelLeft:O(`layout-panel-left`,60398),layoutPanelCenter:O(`layout-panel-center`,60399),layoutPanelJustify:O(`layout-panel-justify`,60400),layoutPanelRight:O(`layout-panel-right`,60401),layoutPanel:O(`layout-panel`,60402),layoutSidebarLeft:O(`layout-sidebar-left`,60403),layoutSidebarRight:O(`layout-sidebar-right`,60404),layoutStatusbar:O(`layout-statusbar`,60405),layoutMenubar:O(`layout-menubar`,60406),layoutCentered:O(`layout-centered`,60407),target:O(`target`,60408),indent:O(`indent`,60409),recordSmall:O(`record-small`,60410),errorSmall:O(`error-small`,60411),terminalDecorationError:O(`terminal-decoration-error`,60411),arrowCircleDown:O(`arrow-circle-down`,60412),arrowCircleLeft:O(`arrow-circle-left`,60413),arrowCircleRight:O(`arrow-circle-right`,60414),arrowCircleUp:O(`arrow-circle-up`,60415),layoutSidebarRightOff:O(`layout-sidebar-right-off`,60416),layoutPanelOff:O(`layout-panel-off`,60417),layoutSidebarLeftOff:O(`layout-sidebar-left-off`,60418),blank:O(`blank`,60419),heartFilled:O(`heart-filled`,60420),map:O(`map`,60421),mapHorizontal:O(`map-horizontal`,60421),foldHorizontal:O(`fold-horizontal`,60421),mapFilled:O(`map-filled`,60422),mapHorizontalFilled:O(`map-horizontal-filled`,60422),foldHorizontalFilled:O(`fold-horizontal-filled`,60422),circleSmall:O(`circle-small`,60423),bellSlash:O(`bell-slash`,60424),bellSlashDot:O(`bell-slash-dot`,60425),commentUnresolved:O(`comment-unresolved`,60426),gitPullRequestGoToChanges:O(`git-pull-request-go-to-changes`,60427),gitPullRequestNewChanges:O(`git-pull-request-new-changes`,60428),searchFuzzy:O(`search-fuzzy`,60429),commentDraft:O(`comment-draft`,60430),send:O(`send`,60431),sparkle:O(`sparkle`,60432),insert:O(`insert`,60433),mic:O(`mic`,60434),thumbsdownFilled:O(`thumbsdown-filled`,60435),thumbsupFilled:O(`thumbsup-filled`,60436),coffee:O(`coffee`,60437),snake:O(`snake`,60438),game:O(`game`,60439),vr:O(`vr`,60440),chip:O(`chip`,60441),piano:O(`piano`,60442),music:O(`music`,60443),micFilled:O(`mic-filled`,60444),repoFetch:O(`repo-fetch`,60445),copilot:O(`copilot`,60446),lightbulbSparkle:O(`lightbulb-sparkle`,60447),robot:O(`robot`,60448),sparkleFilled:O(`sparkle-filled`,60449),diffSingle:O(`diff-single`,60450),diffMultiple:O(`diff-multiple`,60451),surroundWith:O(`surround-with`,60452),share:O(`share`,60453),gitStash:O(`git-stash`,60454),gitStashApply:O(`git-stash-apply`,60455),gitStashPop:O(`git-stash-pop`,60456),vscode:O(`vscode`,60457),vscodeInsiders:O(`vscode-insiders`,60458),codeOss:O(`code-oss`,60459),runCoverage:O(`run-coverage`,60460),runAllCoverage:O(`run-all-coverage`,60461),coverage:O(`coverage`,60462),githubProject:O(`github-project`,60463),mapVertical:O(`map-vertical`,60464),foldVertical:O(`fold-vertical`,60464),mapVerticalFilled:O(`map-vertical-filled`,60465),foldVerticalFilled:O(`fold-vertical-filled`,60465),goToSearch:O(`go-to-search`,60466),percentage:O(`percentage`,60467),sortPercentage:O(`sort-percentage`,60467),attach:O(`attach`,60468),goToEditingSession:O(`go-to-editing-session`,60469),editSession:O(`edit-session`,60470),codeReview:O(`code-review`,60471),copilotWarning:O(`copilot-warning`,60472),python:O(`python`,60473),copilotLarge:O(`copilot-large`,60474),copilotWarningLarge:O(`copilot-warning-large`,60475),keyboardTab:O(`keyboard-tab`,60476),copilotBlocked:O(`copilot-blocked`,60477),copilotNotConnected:O(`copilot-not-connected`,60478),flag:O(`flag`,60479),lightbulbEmpty:O(`lightbulb-empty`,60480),symbolMethodArrow:O(`symbol-method-arrow`,60481),copilotUnavailable:O(`copilot-unavailable`,60482),repoPinned:O(`repo-pinned`,60483),keyboardTabAbove:O(`keyboard-tab-above`,60484),keyboardTabBelow:O(`keyboard-tab-below`,60485),gitPullRequestDone:O(`git-pull-request-done`,60486),mcp:O(`mcp`,60487),extensionsLarge:O(`extensions-large`,60488),layoutPanelDock:O(`layout-panel-dock`,60489),layoutSidebarLeftDock:O(`layout-sidebar-left-dock`,60490),layoutSidebarRightDock:O(`layout-sidebar-right-dock`,60491),copilotInProgress:O(`copilot-in-progress`,60492),copilotError:O(`copilot-error`,60493),copilotSuccess:O(`copilot-success`,60494),chatSparkle:O(`chat-sparkle`,60495),searchSparkle:O(`search-sparkle`,60496),editSparkle:O(`edit-sparkle`,60497),copilotSnooze:O(`copilot-snooze`,60498),sendToRemoteAgent:O(`send-to-remote-agent`,60499),commentDiscussionSparkle:O(`comment-discussion-sparkle`,60500),chatSparkleWarning:O(`chat-sparkle-warning`,60501),chatSparkleError:O(`chat-sparkle-error`,60502),collection:O(`collection`,60503),newCollection:O(`new-collection`,60504),thinking:O(`thinking`,60505),build:O(`build`,60506),commentDiscussionQuote:O(`comment-discussion-quote`,60507),cursor:O(`cursor`,60508),eraser:O(`eraser`,60509),fileText:O(`file-text`,60510),quotes:O(`quotes`,60512),rename:O(`rename`,60513),runWithDeps:O(`run-with-deps`,60514),debugConnected:O(`debug-connected`,60515),strikethrough:O(`strikethrough`,60516),openInProduct:O(`open-in-product`,60517),indexZero:O(`index-zero`,60518),agent:O(`agent`,60519),editCode:O(`edit-code`,60520),repoSelected:O(`repo-selected`,60521),skip:O(`skip`,60522),mergeInto:O(`merge-into`,60523),gitBranchChanges:O(`git-branch-changes`,60524),gitBranchStagedChanges:O(`git-branch-staged-changes`,60525),gitBranchConflicts:O(`git-branch-conflicts`,60526),gitBranch:O(`git-branch`,60527),gitBranchCreate:O(`git-branch-create`,60527),gitBranchDelete:O(`git-branch-delete`,60527),searchLarge:O(`search-large`,60528),terminalGitBash:O(`terminal-git-bash`,60529),windowActive:O(`window-active`,60530),forward:O(`forward`,60531),download:O(`download`,60532),clockface:O(`clockface`,60533),unarchive:O(`unarchive`,60534),sessionInProgress:O(`session-in-progress`,60535),collectionSmall:O(`collection-small`,60536),vmSmall:O(`vm-small`,60537),cloudSmall:O(`cloud-small`,60538),addSmall:O(`add-small`,60539),removeSmall:O(`remove-small`,60540),worktreeSmall:O(`worktree-small`,60541),worktree:O(`worktree`,60542),screenCut:O(`screen-cut`,60543),ask:O(`ask`,60544),openai:O(`openai`,60545),claude:O(`claude`,60546),openInWindow:O(`open-in-window`,60547),newSession:O(`new-session`,60548),terminalSecure:O(`terminal-secure`,60549),chatImport:O(`chat-import`,60550),chatExport:O(`chat-export`,60551),shareWindow:O(`share-window`,60552),circleSlashCompact:O(`circle-slash-compact`,60553),copilotCompact:O(`copilot-compact`,60554),folderOpenedCompact:O(`folder-opened-compact`,60555),folderCompact:O(`folder-compact`,60556),gearCompact:O(`gear-compact`,60557),gitBranchCompact:O(`git-branch-compact`,60558),libraryCompact:O(`library-compact`,60559),recordKeysCompact:O(`record-keys-compact`,60560),remoteCompact:O(`remote-compact`,60561),repoForkedCompact:O(`repo-forked-compact`,60562),repoCompact:O(`repo-compact`,60563),shieldCompact:O(`shield-compact`,60564),sparkleCompact:O(`sparkle-compact`,60565),symbolColorCompact:O(`symbol-color-compact`,60566),windowCompact:O(`window-compact`,60567),errorCompact:O(`error-compact`,60568),warningCompact:O(`warning-compact`,60569),passCompact:O(`pass-compact`,60570),important:O(`important`,60571),importantCompact:O(`important-compact`,60572),rocketCompact:O(`rocket-compact`,60573),unpin:O(`unpin`,60574),addCompact:O(`add-compact`,60575),attachCompact:O(`attach-compact`,60576),beakerCompact:O(`beaker-compact`,60577),checkCompact:O(`check-compact`,60578),checklistCompact:O(`checklist-compact`,60579),chevronDownCompact:O(`chevron-down-compact`,60580),chevronLeftCompact:O(`chevron-left-compact`,60581),chevronRightCompact:O(`chevron-right-compact`,60582),chevronUpCompact:O(`chevron-up-compact`,60583),circleFilledCompact:O(`circle-filled-compact`,60584),circleSmallFilledCompact:O(`circle-small-filled-compact`,60585),closeCompact:O(`close-compact`,60586),collapseAllCompact:O(`collapse-all-compact`,60587),commentCompact:O(`comment-compact`,60588),commentUnresolvedCompact:O(`comment-unresolved-compact`,60589),debugConnectedCompact:O(`debug-connected-compact`,60590),debugDisconnectCompact:O(`debug-disconnect-compact`,60591),editCompact:O(`edit-compact`,60592),fileMediaCompact:O(`file-media-compact`,60593),gitFetch:O(`git-fetch`,60594),lightbulbCompact:O(`lightbulb-compact`,60595),loadingCompact:O(`loading-compact`,60596),passFilledCompact:O(`pass-filled-compact`,60597),projectCompact:O(`project-compact`,60598),refreshCompact:O(`refresh-compact`,60599),searchCompact:O(`search-compact`,60600),sessionInProgressCompact:O(`session-in-progress-compact`,60601),syncCompact:O(`sync-compact`,60602),terminalCompact:O(`terminal-compact`,60603),vmPending:O(`vm-pending`,60604),worktreeCompact:O(`worktree-compact`,60605),developerTools:O(`developer-tools`,60606),cloudCompact:O(`cloud-compact`,60607),agentCompact:O(`agent-compact`,60608),askCompact:O(`ask-compact`,60609),settingsCompact:O(`settings-compact`,60610),vmCompact:O(`vm-compact`,60611),runCompact:O(`run-compact`,60612),gitPullRequestComment:O(`git-pull-request-comment`,60613),gitPullRequestError:O(`git-pull-request-error`,60614),rightPanelHide:O(`right-panel-hide`,60615),rightPanelShow:O(`right-panel-show`,60616),vscodeInsidersOutline:O(`vscode-insiders-outline`,60617),vscodeOutline:O(`vscode-outline`,60618),voiceMode:O(`voice-mode`,60619),voiceModeCompact:O(`voice-mode-compact`,60620)},er={dialogError:O(`dialog-error`,`error`),dialogWarning:O(`dialog-warning`,`warning`),dialogInfo:O(`dialog-info`,`info`),dialogClose:O(`dialog-close`,`close`),treeItemExpanded:O(`tree-item-expanded`,`chevron-down`),treeFilterOnTypeOn:O(`tree-filter-on-type-on`,`list-filter`),treeFilterOnTypeOff:O(`tree-filter-on-type-off`,`list-selection`),treeFilterClear:O(`tree-filter-clear`,`close`),treeItemLoading:O(`tree-item-loading`,`loading`),menuSelection:O(`menu-selection`,`check`),menuSubmenu:O(`menu-submenu`,`chevron-right`),menuBarMore:O(`menubar-more`,`more`),scrollbarButtonLeft:O(`scrollbar-button-left`,`triangle-left`),scrollbarButtonRight:O(`scrollbar-button-right`,`triangle-right`),scrollbarButtonUp:O(`scrollbar-button-up`,`triangle-up`),scrollbarButtonDown:O(`scrollbar-button-down`,`triangle-down`),toolBarMore:O(`toolbar-more`,`more`),quickInputBack:O(`quick-input-back`,`arrow-left`),dropDownButton:O(`drop-down-button`,60084),symbolCustomColor:O(`symbol-customcolor`,60252),exportIcon:O(`export`,60332),workspaceUnspecified:O(`workspace-unspecified`,60355),newLine:O(`newline`,60394),thumbsDownFilled:O(`thumbsdown-filled`,60435),thumbsUpFilled:O(`thumbsup-filled`,60436),gitFetch:O(`git-fetch`,60445),lightbulbSparkleAutofix:O(`lightbulb-sparkle-autofix`,60447),debugBreakpointPending:O(`debug-breakpoint-pending`,60377),chatImport:O(`chat-import`,60550),chatExport:O(`chat-export`,60551)},k={...$n,...er};var tr=class{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new qe,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),ie(()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){this._factories.get(e)?.dispose();let n=new nr(this,e,t);return this._factories.set(e,n),ie(()=>{let t=this._factories.get(e);!t||t!==n||(this._factories.delete(e),t.dispose())})}async getOrCreate(e){let t=this.get(e);if(t)return t;let n=this._factories.get(e);return!n||n.isResolved?null:(await n.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;let t=this._factories.get(e);return!!(!t||t.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}},nr=class extends oe{get isResolved(){return this._isResolved}constructor(e,t,n){super(),this._registry=e,this._languageId=t,this._factory=n,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||=this._create(),this._resolvePromise}async _create(){let e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}},rr=class{constructor(e,t,n){this.offset=e,this.type=t,this.language=n,this._tokenBrand=void 0}toString(){return`(`+this.offset+`, `+this.type+`)`}},ir;(function(e){e[e.Increase=0]=`Increase`,e[e.Decrease=1]=`Decrease`})(ir||={});var ar;(function(e){let t=new Map;t.set(0,k.symbolMethod),t.set(1,k.symbolFunction),t.set(2,k.symbolConstructor),t.set(3,k.symbolField),t.set(4,k.symbolVariable),t.set(5,k.symbolClass),t.set(6,k.symbolStruct),t.set(7,k.symbolInterface),t.set(8,k.symbolModule),t.set(9,k.symbolProperty),t.set(10,k.symbolEvent),t.set(11,k.symbolOperator),t.set(12,k.symbolUnit),t.set(13,k.symbolValue),t.set(15,k.symbolEnum),t.set(14,k.symbolConstant),t.set(15,k.symbolEnum),t.set(16,k.symbolEnumMember),t.set(17,k.symbolKeyword),t.set(28,k.symbolSnippet),t.set(18,k.symbolText),t.set(19,k.symbolColor),t.set(20,k.symbolFile),t.set(21,k.symbolReference),t.set(22,k.symbolCustomColor),t.set(23,k.symbolFolder),t.set(24,k.symbolTypeParameter),t.set(25,k.account),t.set(26,k.issues),t.set(27,k.tools);function n(e){let n=t.get(e);return n||=(console.info(`No codicon found for CompletionItemKind `+e),k.symbolProperty),n}e.toIcon=n;function r(e){switch(e){case 0:return w(763,`Method`);case 1:return w(764,`Function`);case 2:return w(765,`Constructor`);case 3:return w(766,`Field`);case 4:return w(767,`Variable`);case 5:return w(768,`Class`);case 6:return w(769,`Struct`);case 7:return w(770,`Interface`);case 8:return w(771,`Module`);case 9:return w(772,`Property`);case 10:return w(773,`Event`);case 11:return w(774,`Operator`);case 12:return w(775,`Unit`);case 13:return w(776,`Value`);case 14:return w(777,`Constant`);case 15:return w(778,`Enum`);case 16:return w(779,`Enum Member`);case 17:return w(780,`Keyword`);case 18:return w(781,`Text`);case 19:return w(782,`Color`);case 20:return w(783,`File`);case 21:return w(784,`Reference`);case 22:return w(785,`Custom Color`);case 23:return w(786,`Folder`);case 24:return w(787,`Type Parameter`);case 25:return w(788,`User`);case 26:return w(789,`Issue`);case 27:return w(790,`Tool`);case 28:return w(791,`Snippet`);default:return``}}e.toLabel=r;let i=new Map;i.set(`method`,0),i.set(`function`,1),i.set(`constructor`,2),i.set(`field`,3),i.set(`variable`,4),i.set(`class`,5),i.set(`struct`,6),i.set(`interface`,7),i.set(`module`,8),i.set(`property`,9),i.set(`event`,10),i.set(`operator`,11),i.set(`unit`,12),i.set(`value`,13),i.set(`constant`,14),i.set(`enum`,15),i.set(`enum-member`,16),i.set(`enumMember`,16),i.set(`keyword`,17),i.set(`snippet`,28),i.set(`text`,18),i.set(`color`,19),i.set(`file`,20),i.set(`reference`,21),i.set(`customcolor`,22),i.set(`folder`,23),i.set(`type-parameter`,24),i.set(`typeParameter`,24),i.set(`account`,25),i.set(`issue`,26),i.set(`tool`,27);function a(e,t){let n=i.get(e);return n===void 0&&!t&&(n=9),n}e.fromString=a})(ar||={});var or;(function(e){e[e.Automatic=0]=`Automatic`,e[e.Explicit=1]=`Explicit`})(or||={});var sr;(function(e){e[e.Code=1]=`Code`,e[e.Label=2]=`Label`})(sr||={});var cr;(function(e){e[e.Accepted=0]=`Accepted`,e[e.Rejected=1]=`Rejected`,e[e.Ignored=2]=`Ignored`})(cr||={});var lr;(function(e){e[e.Automatic=0]=`Automatic`,e[e.PasteAs=1]=`PasteAs`})(lr||={});var ur;(function(e){e[e.Invoke=1]=`Invoke`,e[e.TriggerCharacter=2]=`TriggerCharacter`,e[e.ContentChange=3]=`ContentChange`})(ur||={});var dr;(function(e){e[e.Text=0]=`Text`,e[e.Read=1]=`Read`,e[e.Write=2]=`Write`})(dr||={}),w(792,`array`),w(793,`boolean`),w(794,`class`),w(795,`constant`),w(796,`constructor`),w(797,`enumeration`),w(798,`enumeration member`),w(799,`event`),w(800,`field`),w(801,`file`),w(802,`function`),w(803,`interface`),w(804,`key`),w(805,`method`),w(806,`module`),w(807,`namespace`),w(808,`null`),w(809,`number`),w(810,`object`),w(811,`operator`),w(812,`package`),w(813,`property`),w(814,`string`),w(815,`struct`),w(816,`type parameter`),w(817,`variable`);var fr;(function(e){let t=new Map;t.set(0,k.symbolFile),t.set(1,k.symbolModule),t.set(2,k.symbolNamespace),t.set(3,k.symbolPackage),t.set(4,k.symbolClass),t.set(5,k.symbolMethod),t.set(6,k.symbolProperty),t.set(7,k.symbolField),t.set(8,k.symbolConstructor),t.set(9,k.symbolEnum),t.set(10,k.symbolInterface),t.set(11,k.symbolFunction),t.set(12,k.symbolVariable),t.set(13,k.symbolConstant),t.set(14,k.symbolString),t.set(15,k.symbolNumber),t.set(16,k.symbolBoolean),t.set(17,k.symbolArray),t.set(18,k.symbolObject),t.set(19,k.symbolKey),t.set(20,k.symbolNull),t.set(21,k.symbolEnumMember),t.set(22,k.symbolStruct),t.set(23,k.symbolEvent),t.set(24,k.symbolOperator),t.set(25,k.symbolTypeParameter);function n(e){let n=t.get(e);return n||=(console.info(`No codicon found for SymbolKind `+e),k.symbolProperty),n}e.toIcon=n;let r=new Map;r.set(0,20),r.set(1,8),r.set(2,8),r.set(3,8),r.set(4,5),r.set(5,0),r.set(6,9),r.set(7,3),r.set(8,2),r.set(9,15),r.set(10,7),r.set(11,1),r.set(12,4),r.set(13,14),r.set(14,18),r.set(15,13),r.set(16,13),r.set(17,13),r.set(18,13),r.set(19,17),r.set(20,13),r.set(21,16),r.set(22,6),r.set(23,10),r.set(24,11),r.set(25,24);function i(e){let t=r.get(e);return t===void 0&&(console.info(`No completion kind found for SymbolKind `+e),t=20),t}e.toCompletionKind=i})(fr||={}),class e{static{this.Comment=new e(`comment`)}static{this.Imports=new e(`imports`)}static{this.Region=new e(`region`)}static fromValue(t){switch(t){case`comment`:return e.Comment;case`imports`:return e.Imports;case`region`:return e.Region}return new e(t)}constructor(e){this.value=e}};var pr;(function(e){e[e.AIGenerated=1]=`AIGenerated`})(pr||={});var mr;(function(e){e[e.Invoke=0]=`Invoke`,e[e.Automatic=1]=`Automatic`})(mr||={});var hr;(function(e){function t(e){return!e||typeof e!=`object`?!1:typeof e.id==`string`&&typeof e.title==`string`}e.is=t})(hr||={});var gr;(function(e){e[e.Type=1]=`Type`,e[e.Parameter=2]=`Parameter`})(gr||={}),new tr;var _r;(function(e){e[e.Unknown=0]=`Unknown`,e[e.Disabled=1]=`Disabled`,e[e.Enabled=2]=`Enabled`})(_r||={});var vr;(function(e){e[e.Invoke=1]=`Invoke`,e[e.Auto=2]=`Auto`})(vr||={});var yr;(function(e){e[e.None=0]=`None`,e[e.KeepWhitespace=1]=`KeepWhitespace`,e[e.InsertAsSnippet=4]=`InsertAsSnippet`})(yr||={});var br;(function(e){e[e.Method=0]=`Method`,e[e.Function=1]=`Function`,e[e.Constructor=2]=`Constructor`,e[e.Field=3]=`Field`,e[e.Variable=4]=`Variable`,e[e.Class=5]=`Class`,e[e.Struct=6]=`Struct`,e[e.Interface=7]=`Interface`,e[e.Module=8]=`Module`,e[e.Property=9]=`Property`,e[e.Event=10]=`Event`,e[e.Operator=11]=`Operator`,e[e.Unit=12]=`Unit`,e[e.Value=13]=`Value`,e[e.Constant=14]=`Constant`,e[e.Enum=15]=`Enum`,e[e.EnumMember=16]=`EnumMember`,e[e.Keyword=17]=`Keyword`,e[e.Text=18]=`Text`,e[e.Color=19]=`Color`,e[e.File=20]=`File`,e[e.Reference=21]=`Reference`,e[e.Customcolor=22]=`Customcolor`,e[e.Folder=23]=`Folder`,e[e.TypeParameter=24]=`TypeParameter`,e[e.User=25]=`User`,e[e.Issue=26]=`Issue`,e[e.Tool=27]=`Tool`,e[e.Snippet=28]=`Snippet`})(br||={});var xr;(function(e){e[e.Deprecated=1]=`Deprecated`})(xr||={});var Sr;(function(e){e[e.Invoke=0]=`Invoke`,e[e.TriggerCharacter=1]=`TriggerCharacter`,e[e.TriggerForIncompleteCompletions=2]=`TriggerForIncompleteCompletions`})(Sr||={});var Cr;(function(e){e[e.EXACT=0]=`EXACT`,e[e.ABOVE=1]=`ABOVE`,e[e.BELOW=2]=`BELOW`})(Cr||={});var wr;(function(e){e[e.NotSet=0]=`NotSet`,e[e.ContentFlush=1]=`ContentFlush`,e[e.RecoverFromMarkers=2]=`RecoverFromMarkers`,e[e.Explicit=3]=`Explicit`,e[e.Paste=4]=`Paste`,e[e.Undo=5]=`Undo`,e[e.Redo=6]=`Redo`})(wr||={});var Tr;(function(e){e[e.LF=1]=`LF`,e[e.CRLF=2]=`CRLF`})(Tr||={});var Er;(function(e){e[e.Text=0]=`Text`,e[e.Read=1]=`Read`,e[e.Write=2]=`Write`})(Er||={});var Dr;(function(e){e[e.None=0]=`None`,e[e.Keep=1]=`Keep`,e[e.Brackets=2]=`Brackets`,e[e.Advanced=3]=`Advanced`,e[e.Full=4]=`Full`})(Dr||={});var Or;(function(e){e[e.acceptSuggestionOnCommitCharacter=0]=`acceptSuggestionOnCommitCharacter`,e[e.acceptSuggestionOnEnter=1]=`acceptSuggestionOnEnter`,e[e.accessibilitySupport=2]=`accessibilitySupport`,e[e.accessibilityPageSize=3]=`accessibilityPageSize`,e[e.allowOverflow=4]=`allowOverflow`,e[e.allowVariableLineHeights=5]=`allowVariableLineHeights`,e[e.allowVariableFonts=6]=`allowVariableFonts`,e[e.allowVariableFontsInAccessibilityMode=7]=`allowVariableFontsInAccessibilityMode`,e[e.ariaLabel=8]=`ariaLabel`,e[e.ariaRequired=9]=`ariaRequired`,e[e.autoClosingBrackets=10]=`autoClosingBrackets`,e[e.autoClosingComments=11]=`autoClosingComments`,e[e.screenReaderAnnounceInlineSuggestion=12]=`screenReaderAnnounceInlineSuggestion`,e[e.autoClosingDelete=13]=`autoClosingDelete`,e[e.autoClosingOvertype=14]=`autoClosingOvertype`,e[e.autoClosingQuotes=15]=`autoClosingQuotes`,e[e.autoIndent=16]=`autoIndent`,e[e.autoIndentOnPaste=17]=`autoIndentOnPaste`,e[e.autoIndentOnPasteWithinString=18]=`autoIndentOnPasteWithinString`,e[e.automaticLayout=19]=`automaticLayout`,e[e.autoSurround=20]=`autoSurround`,e[e.bracketPairColorization=21]=`bracketPairColorization`,e[e.guides=22]=`guides`,e[e.codeLens=23]=`codeLens`,e[e.codeLensFontFamily=24]=`codeLensFontFamily`,e[e.codeLensFontSize=25]=`codeLensFontSize`,e[e.colorDecorators=26]=`colorDecorators`,e[e.colorDecoratorsLimit=27]=`colorDecoratorsLimit`,e[e.columnSelection=28]=`columnSelection`,e[e.comments=29]=`comments`,e[e.contextmenu=30]=`contextmenu`,e[e.copyWithSyntaxHighlighting=31]=`copyWithSyntaxHighlighting`,e[e.cursorBlinking=32]=`cursorBlinking`,e[e.cursorSmoothCaretAnimation=33]=`cursorSmoothCaretAnimation`,e[e.cursorStyle=34]=`cursorStyle`,e[e.cursorSurroundingLines=35]=`cursorSurroundingLines`,e[e.cursorSurroundingLinesStyle=36]=`cursorSurroundingLinesStyle`,e[e.cursorWidth=37]=`cursorWidth`,e[e.cursorHeight=38]=`cursorHeight`,e[e.disableLayerHinting=39]=`disableLayerHinting`,e[e.disableMonospaceOptimizations=40]=`disableMonospaceOptimizations`,e[e.domReadOnly=41]=`domReadOnly`,e[e.dragAndDrop=42]=`dragAndDrop`,e[e.dropIntoEditor=43]=`dropIntoEditor`,e[e.editContext=44]=`editContext`,e[e.emptySelectionClipboard=45]=`emptySelectionClipboard`,e[e.experimentalGpuAcceleration=46]=`experimentalGpuAcceleration`,e[e.experimentalWhitespaceRendering=47]=`experimentalWhitespaceRendering`,e[e.extraEditorClassName=48]=`extraEditorClassName`,e[e.fastScrollSensitivity=49]=`fastScrollSensitivity`,e[e.find=50]=`find`,e[e.fixedOverflowWidgets=51]=`fixedOverflowWidgets`,e[e.folding=52]=`folding`,e[e.foldingStrategy=53]=`foldingStrategy`,e[e.foldingHighlight=54]=`foldingHighlight`,e[e.foldingImportsByDefault=55]=`foldingImportsByDefault`,e[e.foldingMaximumRegions=56]=`foldingMaximumRegions`,e[e.unfoldOnClickAfterEndOfLine=57]=`unfoldOnClickAfterEndOfLine`,e[e.fontFamily=58]=`fontFamily`,e[e.fontInfo=59]=`fontInfo`,e[e.fontLigatures=60]=`fontLigatures`,e[e.fontSize=61]=`fontSize`,e[e.fontWeight=62]=`fontWeight`,e[e.fontVariations=63]=`fontVariations`,e[e.formatOnPaste=64]=`formatOnPaste`,e[e.formatOnType=65]=`formatOnType`,e[e.glyphMargin=66]=`glyphMargin`,e[e.gotoLocation=67]=`gotoLocation`,e[e.hideCursorInOverviewRuler=68]=`hideCursorInOverviewRuler`,e[e.hover=69]=`hover`,e[e.inDiffEditor=70]=`inDiffEditor`,e[e.inlineSuggest=71]=`inlineSuggest`,e[e.letterSpacing=72]=`letterSpacing`,e[e.lightbulb=73]=`lightbulb`,e[e.lineDecorationsWidth=74]=`lineDecorationsWidth`,e[e.lineHeight=75]=`lineHeight`,e[e.lineNumbers=76]=`lineNumbers`,e[e.lineNumbersMinChars=77]=`lineNumbersMinChars`,e[e.linkedEditing=78]=`linkedEditing`,e[e.links=79]=`links`,e[e.matchBrackets=80]=`matchBrackets`,e[e.minimap=81]=`minimap`,e[e.mouseStyle=82]=`mouseStyle`,e[e.mouseWheelScrollSensitivity=83]=`mouseWheelScrollSensitivity`,e[e.mouseWheelZoom=84]=`mouseWheelZoom`,e[e.multiCursorMergeOverlapping=85]=`multiCursorMergeOverlapping`,e[e.multiCursorModifier=86]=`multiCursorModifier`,e[e.mouseMiddleClickAction=87]=`mouseMiddleClickAction`,e[e.multiCursorPaste=88]=`multiCursorPaste`,e[e.multiCursorLimit=89]=`multiCursorLimit`,e[e.occurrencesHighlight=90]=`occurrencesHighlight`,e[e.occurrencesHighlightDelay=91]=`occurrencesHighlightDelay`,e[e.overtypeCursorStyle=92]=`overtypeCursorStyle`,e[e.overtypeOnPaste=93]=`overtypeOnPaste`,e[e.overviewRulerBorder=94]=`overviewRulerBorder`,e[e.overviewRulerLanes=95]=`overviewRulerLanes`,e[e.padding=96]=`padding`,e[e.pasteAs=97]=`pasteAs`,e[e.parameterHints=98]=`parameterHints`,e[e.peekWidgetDefaultFocus=99]=`peekWidgetDefaultFocus`,e[e.placeholder=100]=`placeholder`,e[e.definitionLinkOpensInPeek=101]=`definitionLinkOpensInPeek`,e[e.quickSuggestions=102]=`quickSuggestions`,e[e.quickSuggestionsDelay=103]=`quickSuggestionsDelay`,e[e.readOnly=104]=`readOnly`,e[e.readOnlyMessage=105]=`readOnlyMessage`,e[e.renameOnType=106]=`renameOnType`,e[e.renderRichScreenReaderContent=107]=`renderRichScreenReaderContent`,e[e.renderControlCharacters=108]=`renderControlCharacters`,e[e.renderFinalNewline=109]=`renderFinalNewline`,e[e.renderLineHighlight=110]=`renderLineHighlight`,e[e.renderLineHighlightOnlyWhenFocus=111]=`renderLineHighlightOnlyWhenFocus`,e[e.renderValidationDecorations=112]=`renderValidationDecorations`,e[e.renderWhitespace=113]=`renderWhitespace`,e[e.revealHorizontalRightPadding=114]=`revealHorizontalRightPadding`,e[e.roundedSelection=115]=`roundedSelection`,e[e.rulers=116]=`rulers`,e[e.scrollbar=117]=`scrollbar`,e[e.scrollBeyondLastColumn=118]=`scrollBeyondLastColumn`,e[e.scrollBeyondLastLine=119]=`scrollBeyondLastLine`,e[e.scrollPredominantAxis=120]=`scrollPredominantAxis`,e[e.selectionClipboard=121]=`selectionClipboard`,e[e.selectionHighlight=122]=`selectionHighlight`,e[e.selectionHighlightMaxLength=123]=`selectionHighlightMaxLength`,e[e.selectionHighlightMultiline=124]=`selectionHighlightMultiline`,e[e.selectOnLineNumbers=125]=`selectOnLineNumbers`,e[e.showFoldingControls=126]=`showFoldingControls`,e[e.showUnused=127]=`showUnused`,e[e.snippetSuggestions=128]=`snippetSuggestions`,e[e.smartSelect=129]=`smartSelect`,e[e.smoothScrolling=130]=`smoothScrolling`,e[e.stickyScroll=131]=`stickyScroll`,e[e.stickyTabStops=132]=`stickyTabStops`,e[e.stopRenderingLineAfter=133]=`stopRenderingLineAfter`,e[e.suggest=134]=`suggest`,e[e.suggestFontSize=135]=`suggestFontSize`,e[e.suggestLineHeight=136]=`suggestLineHeight`,e[e.suggestOnTriggerCharacters=137]=`suggestOnTriggerCharacters`,e[e.suggestSelection=138]=`suggestSelection`,e[e.tabCompletion=139]=`tabCompletion`,e[e.tabIndex=140]=`tabIndex`,e[e.trimWhitespaceOnDelete=141]=`trimWhitespaceOnDelete`,e[e.unicodeHighlighting=142]=`unicodeHighlighting`,e[e.unusualLineTerminators=143]=`unusualLineTerminators`,e[e.useShadowDOM=144]=`useShadowDOM`,e[e.useTabStops=145]=`useTabStops`,e[e.wordBreak=146]=`wordBreak`,e[e.wordSegmenterLocales=147]=`wordSegmenterLocales`,e[e.wordSeparators=148]=`wordSeparators`,e[e.wordWrap=149]=`wordWrap`,e[e.wordWrapBreakAfterCharacters=150]=`wordWrapBreakAfterCharacters`,e[e.wordWrapBreakBeforeCharacters=151]=`wordWrapBreakBeforeCharacters`,e[e.wordWrapColumn=152]=`wordWrapColumn`,e[e.wordWrapOverride1=153]=`wordWrapOverride1`,e[e.wordWrapOverride2=154]=`wordWrapOverride2`,e[e.wrappingIndent=155]=`wrappingIndent`,e[e.wrappingStrategy=156]=`wrappingStrategy`,e[e.showDeprecated=157]=`showDeprecated`,e[e.inertialScroll=158]=`inertialScroll`,e[e.inlayHints=159]=`inlayHints`,e[e.wrapOnEscapedLineFeeds=160]=`wrapOnEscapedLineFeeds`,e[e.effectiveCursorStyle=161]=`effectiveCursorStyle`,e[e.editorClassName=162]=`editorClassName`,e[e.pixelRatio=163]=`pixelRatio`,e[e.tabFocusMode=164]=`tabFocusMode`,e[e.layoutInfo=165]=`layoutInfo`,e[e.wrappingInfo=166]=`wrappingInfo`,e[e.defaultColorDecorators=167]=`defaultColorDecorators`,e[e.colorDecoratorsActivatedOn=168]=`colorDecoratorsActivatedOn`,e[e.inlineCompletionsAccessibilityVerbose=169]=`inlineCompletionsAccessibilityVerbose`,e[e.effectiveEditContext=170]=`effectiveEditContext`,e[e.scrollOnMiddleClick=171]=`scrollOnMiddleClick`,e[e.effectiveAllowVariableFonts=172]=`effectiveAllowVariableFonts`,e[e.doubleClickSelectsBlock=173]=`doubleClickSelectsBlock`})(Or||={});var kr;(function(e){e[e.TextDefined=0]=`TextDefined`,e[e.LF=1]=`LF`,e[e.CRLF=2]=`CRLF`})(kr||={});var Ar;(function(e){e[e.LF=0]=`LF`,e[e.CRLF=1]=`CRLF`})(Ar||={});var jr;(function(e){e[e.Left=1]=`Left`,e[e.Center=2]=`Center`,e[e.Right=3]=`Right`})(jr||={});var Mr;(function(e){e[e.Increase=0]=`Increase`,e[e.Decrease=1]=`Decrease`})(Mr||={});var Nr;(function(e){e[e.None=0]=`None`,e[e.Indent=1]=`Indent`,e[e.IndentOutdent=2]=`IndentOutdent`,e[e.Outdent=3]=`Outdent`})(Nr||={});var Pr;(function(e){e[e.Both=0]=`Both`,e[e.Right=1]=`Right`,e[e.Left=2]=`Left`,e[e.None=3]=`None`})(Pr||={});var Fr;(function(e){e[e.Type=1]=`Type`,e[e.Parameter=2]=`Parameter`})(Fr||={});var Ir;(function(e){e[e.Accepted=0]=`Accepted`,e[e.Rejected=1]=`Rejected`,e[e.Ignored=2]=`Ignored`})(Ir||={});var Lr;(function(e){e[e.Code=1]=`Code`,e[e.Label=2]=`Label`})(Lr||={});var Rr;(function(e){e[e.Automatic=0]=`Automatic`,e[e.Explicit=1]=`Explicit`})(Rr||={});var zr;(function(e){e[e.DependsOnKbLayout=-1]=`DependsOnKbLayout`,e[e.Unknown=0]=`Unknown`,e[e.Backspace=1]=`Backspace`,e[e.Tab=2]=`Tab`,e[e.Enter=3]=`Enter`,e[e.Shift=4]=`Shift`,e[e.Ctrl=5]=`Ctrl`,e[e.Alt=6]=`Alt`,e[e.PauseBreak=7]=`PauseBreak`,e[e.CapsLock=8]=`CapsLock`,e[e.Escape=9]=`Escape`,e[e.Space=10]=`Space`,e[e.PageUp=11]=`PageUp`,e[e.PageDown=12]=`PageDown`,e[e.End=13]=`End`,e[e.Home=14]=`Home`,e[e.LeftArrow=15]=`LeftArrow`,e[e.UpArrow=16]=`UpArrow`,e[e.RightArrow=17]=`RightArrow`,e[e.DownArrow=18]=`DownArrow`,e[e.Insert=19]=`Insert`,e[e.Delete=20]=`Delete`,e[e.Digit0=21]=`Digit0`,e[e.Digit1=22]=`Digit1`,e[e.Digit2=23]=`Digit2`,e[e.Digit3=24]=`Digit3`,e[e.Digit4=25]=`Digit4`,e[e.Digit5=26]=`Digit5`,e[e.Digit6=27]=`Digit6`,e[e.Digit7=28]=`Digit7`,e[e.Digit8=29]=`Digit8`,e[e.Digit9=30]=`Digit9`,e[e.KeyA=31]=`KeyA`,e[e.KeyB=32]=`KeyB`,e[e.KeyC=33]=`KeyC`,e[e.KeyD=34]=`KeyD`,e[e.KeyE=35]=`KeyE`,e[e.KeyF=36]=`KeyF`,e[e.KeyG=37]=`KeyG`,e[e.KeyH=38]=`KeyH`,e[e.KeyI=39]=`KeyI`,e[e.KeyJ=40]=`KeyJ`,e[e.KeyK=41]=`KeyK`,e[e.KeyL=42]=`KeyL`,e[e.KeyM=43]=`KeyM`,e[e.KeyN=44]=`KeyN`,e[e.KeyO=45]=`KeyO`,e[e.KeyP=46]=`KeyP`,e[e.KeyQ=47]=`KeyQ`,e[e.KeyR=48]=`KeyR`,e[e.KeyS=49]=`KeyS`,e[e.KeyT=50]=`KeyT`,e[e.KeyU=51]=`KeyU`,e[e.KeyV=52]=`KeyV`,e[e.KeyW=53]=`KeyW`,e[e.KeyX=54]=`KeyX`,e[e.KeyY=55]=`KeyY`,e[e.KeyZ=56]=`KeyZ`,e[e.Meta=57]=`Meta`,e[e.ContextMenu=58]=`ContextMenu`,e[e.F1=59]=`F1`,e[e.F2=60]=`F2`,e[e.F3=61]=`F3`,e[e.F4=62]=`F4`,e[e.F5=63]=`F5`,e[e.F6=64]=`F6`,e[e.F7=65]=`F7`,e[e.F8=66]=`F8`,e[e.F9=67]=`F9`,e[e.F10=68]=`F10`,e[e.F11=69]=`F11`,e[e.F12=70]=`F12`,e[e.F13=71]=`F13`,e[e.F14=72]=`F14`,e[e.F15=73]=`F15`,e[e.F16=74]=`F16`,e[e.F17=75]=`F17`,e[e.F18=76]=`F18`,e[e.F19=77]=`F19`,e[e.F20=78]=`F20`,e[e.F21=79]=`F21`,e[e.F22=80]=`F22`,e[e.F23=81]=`F23`,e[e.F24=82]=`F24`,e[e.NumLock=83]=`NumLock`,e[e.ScrollLock=84]=`ScrollLock`,e[e.Semicolon=85]=`Semicolon`,e[e.Equal=86]=`Equal`,e[e.Comma=87]=`Comma`,e[e.Minus=88]=`Minus`,e[e.Period=89]=`Period`,e[e.Slash=90]=`Slash`,e[e.Backquote=91]=`Backquote`,e[e.BracketLeft=92]=`BracketLeft`,e[e.Backslash=93]=`Backslash`,e[e.BracketRight=94]=`BracketRight`,e[e.Quote=95]=`Quote`,e[e.OEM_8=96]=`OEM_8`,e[e.IntlBackslash=97]=`IntlBackslash`,e[e.Numpad0=98]=`Numpad0`,e[e.Numpad1=99]=`Numpad1`,e[e.Numpad2=100]=`Numpad2`,e[e.Numpad3=101]=`Numpad3`,e[e.Numpad4=102]=`Numpad4`,e[e.Numpad5=103]=`Numpad5`,e[e.Numpad6=104]=`Numpad6`,e[e.Numpad7=105]=`Numpad7`,e[e.Numpad8=106]=`Numpad8`,e[e.Numpad9=107]=`Numpad9`,e[e.NumpadMultiply=108]=`NumpadMultiply`,e[e.NumpadAdd=109]=`NumpadAdd`,e[e.NUMPAD_SEPARATOR=110]=`NUMPAD_SEPARATOR`,e[e.NumpadSubtract=111]=`NumpadSubtract`,e[e.NumpadDecimal=112]=`NumpadDecimal`,e[e.NumpadDivide=113]=`NumpadDivide`,e[e.KEY_IN_COMPOSITION=114]=`KEY_IN_COMPOSITION`,e[e.ABNT_C1=115]=`ABNT_C1`,e[e.ABNT_C2=116]=`ABNT_C2`,e[e.AudioVolumeMute=117]=`AudioVolumeMute`,e[e.AudioVolumeUp=118]=`AudioVolumeUp`,e[e.AudioVolumeDown=119]=`AudioVolumeDown`,e[e.BrowserSearch=120]=`BrowserSearch`,e[e.BrowserHome=121]=`BrowserHome`,e[e.BrowserBack=122]=`BrowserBack`,e[e.BrowserForward=123]=`BrowserForward`,e[e.MediaTrackNext=124]=`MediaTrackNext`,e[e.MediaTrackPrevious=125]=`MediaTrackPrevious`,e[e.MediaStop=126]=`MediaStop`,e[e.MediaPlayPause=127]=`MediaPlayPause`,e[e.LaunchMediaPlayer=128]=`LaunchMediaPlayer`,e[e.LaunchMail=129]=`LaunchMail`,e[e.LaunchApp2=130]=`LaunchApp2`,e[e.Clear=131]=`Clear`,e[e.MAX_VALUE=132]=`MAX_VALUE`})(zr||={});var Br;(function(e){e[e.Hint=1]=`Hint`,e[e.Info=2]=`Info`,e[e.Warning=4]=`Warning`,e[e.Error=8]=`Error`})(Br||={});var Vr;(function(e){e[e.Unnecessary=1]=`Unnecessary`,e[e.Deprecated=2]=`Deprecated`})(Vr||={});var Hr;(function(e){e[e.Inline=1]=`Inline`,e[e.Gutter=2]=`Gutter`})(Hr||={});var Ur;(function(e){e[e.Normal=1]=`Normal`,e[e.Underlined=2]=`Underlined`})(Ur||={});var Wr;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.TEXTAREA=1]=`TEXTAREA`,e[e.GUTTER_GLYPH_MARGIN=2]=`GUTTER_GLYPH_MARGIN`,e[e.GUTTER_LINE_NUMBERS=3]=`GUTTER_LINE_NUMBERS`,e[e.GUTTER_LINE_DECORATIONS=4]=`GUTTER_LINE_DECORATIONS`,e[e.GUTTER_VIEW_ZONE=5]=`GUTTER_VIEW_ZONE`,e[e.CONTENT_TEXT=6]=`CONTENT_TEXT`,e[e.CONTENT_EMPTY=7]=`CONTENT_EMPTY`,e[e.CONTENT_VIEW_ZONE=8]=`CONTENT_VIEW_ZONE`,e[e.CONTENT_WIDGET=9]=`CONTENT_WIDGET`,e[e.OVERVIEW_RULER=10]=`OVERVIEW_RULER`,e[e.SCROLLBAR=11]=`SCROLLBAR`,e[e.OVERLAY_WIDGET=12]=`OVERLAY_WIDGET`,e[e.OUTSIDE_EDITOR=13]=`OUTSIDE_EDITOR`})(Wr||={});var Gr;(function(e){e[e.AIGenerated=1]=`AIGenerated`})(Gr||={});var Kr;(function(e){e[e.Invoke=0]=`Invoke`,e[e.Automatic=1]=`Automatic`})(Kr||={});var qr;(function(e){e[e.TOP_RIGHT_CORNER=0]=`TOP_RIGHT_CORNER`,e[e.BOTTOM_RIGHT_CORNER=1]=`BOTTOM_RIGHT_CORNER`,e[e.TOP_CENTER=2]=`TOP_CENTER`})(qr||={});var Jr;(function(e){e[e.Left=1]=`Left`,e[e.Center=2]=`Center`,e[e.Right=4]=`Right`,e[e.Full=7]=`Full`})(Jr||={});var Yr;(function(e){e[e.Word=0]=`Word`,e[e.Line=1]=`Line`,e[e.Suggest=2]=`Suggest`})(Yr||={});var Xr;(function(e){e[e.Left=0]=`Left`,e[e.Right=1]=`Right`,e[e.None=2]=`None`,e[e.LeftOfInjectedText=3]=`LeftOfInjectedText`,e[e.RightOfInjectedText=4]=`RightOfInjectedText`})(Xr||={});var Zr;(function(e){e[e.Off=0]=`Off`,e[e.On=1]=`On`,e[e.Relative=2]=`Relative`,e[e.Interval=3]=`Interval`,e[e.Custom=4]=`Custom`})(Zr||={});var Qr;(function(e){e[e.None=0]=`None`,e[e.Text=1]=`Text`,e[e.Blocks=2]=`Blocks`})(Qr||={});var $r;(function(e){e[e.Smooth=0]=`Smooth`,e[e.Immediate=1]=`Immediate`})($r||={});var ei;(function(e){e[e.Auto=1]=`Auto`,e[e.Hidden=2]=`Hidden`,e[e.Visible=3]=`Visible`})(ei||={});var ti;(function(e){e[e.LTR=0]=`LTR`,e[e.RTL=1]=`RTL`})(ti||={});var ni;(function(e){e.Off=`off`,e.OnCode=`onCode`,e.On=`on`})(ni||={});var ri;(function(e){e[e.Invoke=1]=`Invoke`,e[e.TriggerCharacter=2]=`TriggerCharacter`,e[e.ContentChange=3]=`ContentChange`})(ri||={});var ii;(function(e){e[e.File=0]=`File`,e[e.Module=1]=`Module`,e[e.Namespace=2]=`Namespace`,e[e.Package=3]=`Package`,e[e.Class=4]=`Class`,e[e.Method=5]=`Method`,e[e.Property=6]=`Property`,e[e.Field=7]=`Field`,e[e.Constructor=8]=`Constructor`,e[e.Enum=9]=`Enum`,e[e.Interface=10]=`Interface`,e[e.Function=11]=`Function`,e[e.Variable=12]=`Variable`,e[e.Constant=13]=`Constant`,e[e.String=14]=`String`,e[e.Number=15]=`Number`,e[e.Boolean=16]=`Boolean`,e[e.Array=17]=`Array`,e[e.Object=18]=`Object`,e[e.Key=19]=`Key`,e[e.Null=20]=`Null`,e[e.EnumMember=21]=`EnumMember`,e[e.Struct=22]=`Struct`,e[e.Event=23]=`Event`,e[e.Operator=24]=`Operator`,e[e.TypeParameter=25]=`TypeParameter`})(ii||={});var ai;(function(e){e[e.Deprecated=1]=`Deprecated`})(ai||={});var oi;(function(e){e[e.LTR=0]=`LTR`,e[e.RTL=1]=`RTL`})(oi||={});var si;(function(e){e[e.Hidden=0]=`Hidden`,e[e.Blink=1]=`Blink`,e[e.Smooth=2]=`Smooth`,e[e.Phase=3]=`Phase`,e[e.Expand=4]=`Expand`,e[e.Solid=5]=`Solid`})(si||={});var ci;(function(e){e[e.Line=1]=`Line`,e[e.Block=2]=`Block`,e[e.Underline=3]=`Underline`,e[e.LineThin=4]=`LineThin`,e[e.BlockOutline=5]=`BlockOutline`,e[e.UnderlineThin=6]=`UnderlineThin`})(ci||={});var li;(function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]=`AlwaysGrowsWhenTypingAtEdges`,e[e.NeverGrowsWhenTypingAtEdges=1]=`NeverGrowsWhenTypingAtEdges`,e[e.GrowsOnlyWhenTypingBefore=2]=`GrowsOnlyWhenTypingBefore`,e[e.GrowsOnlyWhenTypingAfter=3]=`GrowsOnlyWhenTypingAfter`})(li||={});var ui;(function(e){e[e.None=0]=`None`,e[e.Same=1]=`Same`,e[e.Indent=2]=`Indent`,e[e.DeepIndent=3]=`DeepIndent`})(ui||={});var di=class{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(e,t){return vn(e,t)}};function fi(){return{editor:void 0,languages:void 0,CancellationTokenSource:cn,Emitter:qe,KeyCode:zr,KeyMod:di,Position:T,Range:E,Selection:Zn,SelectionDirection:ti,MarkerSeverity:Br,MarkerTag:Vr,Uri:Bn,Token:rr}}var pi,mi,hi=class{constructor(e,t){this.uri=e,this.value=t}};function gi(e){return Array.isArray(e)}(class e{static{this.defaultToKey=e=>e.toString()}constructor(t,n){if(this[pi]=`ResourceMap`,t instanceof e)this.map=new Map(t.map),this.toKey=n??e.defaultToKey;else if(gi(t)){this.map=new Map,this.toKey=n??e.defaultToKey;for(let[e,n]of t)this.set(e,n)}else this.map=new Map,this.toKey=t??e.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new hi(e,t)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){t!==void 0&&(e=e.bind(t));for(let[t,n]of this.map)e(n.value,n.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(pi=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}});var _i=class{constructor(){this[mi]=`LinkedMap`,this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=0){let n=this._map.get(e);if(n)return t!==0&&this.touch(n,t),n.value}set(e,t,n=0){let r=this._map.get(e);if(r)r.value=t,n!==0&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(r);break;case 1:this.addItemFirst(r);break;case 2:this.addItemLast(r);break;default:this.addItemLast(r)}this._map.set(e,r),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw Error(`Invalid list`);let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._state,r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw Error(`LinkedMap got modified during iteration.`);r=r.next}}keys(){let e=this,t=this._state,n=this._head,r={[Symbol.iterator](){return r},[Symbol.dispose](){},next(){if(e._state!==t)throw Error(`LinkedMap got modified during iteration.`);if(n){let e={value:n.key,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return r}values(){let e=this,t=this._state,n=this._head,r={[Symbol.iterator](){return r},[Symbol.dispose](){},next(){if(e._state!==t)throw Error(`LinkedMap got modified during iteration.`);if(n){let e={value:n.value,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return r}entries(){let e=this,t=this._state,n=this._head,r={[Symbol.iterator](){return r},[Symbol.dispose](){},next(){if(e._state!==t)throw Error(`LinkedMap got modified during iteration.`);if(n){let e={value:[n.key,n.value],done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return r}[(mi=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._tail,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.previous,n--;this._tail=t,this._size=n,t&&(t.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw Error(`Invalid list`);this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw Error(`Invalid list`);this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw Error(`Invalid list`);e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw Error(`Invalid list`);e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,n=e.previous;if(!t||!n)throw Error(`Invalid list`);t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw Error(`Invalid list`);if(t===1||t===2){if(t===1){if(e===this._head)return;let t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===2){if(e===this._tail)return;let t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(let[t,n]of e)this.set(t,n)}},vi=class extends _i{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}},yi=class extends vi{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}},bi=class{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){let n=this.map.get(e);n&&(n.delete(t),n.size===0&&this.map.delete(e))}forEach(e,t){let n=this.map.get(e);n&&n.forEach(t)}};new yi(10);var xi;(function(e){e[e.Left=1]=`Left`,e[e.Center=2]=`Center`,e[e.Right=4]=`Right`,e[e.Full=7]=`Full`})(xi||={});var Si;(function(e){e[e.Left=1]=`Left`,e[e.Center=2]=`Center`,e[e.Right=3]=`Right`})(Si||={});var Ci;(function(e){e[e.LTR=0]=`LTR`,e[e.RTL=1]=`RTL`})(Ci||={});var wi;(function(e){e[e.Both=0]=`Both`,e[e.Right=1]=`Right`,e[e.Left=2]=`Left`,e[e.None=3]=`None`})(wi||={});function Ti(e){if(!e||e.length===0)return!1;for(let t=0,n=e.length;t<n;t++){let r=e.charCodeAt(t);if(r===10)return!0;if(r===92){if(t++,t>=n)break;let r=e.charCodeAt(t);if(r===110||r===114||r===87)return!0}}return!1}function Ei(e,t,n,r,i){if(r===0)return!0;let a=t.charCodeAt(r-1);if(e.get(a)!==0||a===13||a===10)return!0;if(i>0){let n=t.charCodeAt(r);if(e.get(n)!==0)return!0}return!1}function Di(e,t,n,r,i){if(r+i===n)return!0;let a=t.charCodeAt(r+i);if(e.get(a)!==0||a===13||a===10)return!0;if(i>0){let n=t.charCodeAt(r+i-1);if(e.get(n)!==0)return!0}return!1}function Oi(e,t,n,r,i){return Ei(e,t,n,r,i)&&Di(e,t,n,r,i)}var ki=class{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){let t=e.length,n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t||(n=this._searchRegex.exec(e),!n))return null;let r=n.index,i=n[0].length;if(r===this._prevMatchStartIndex&&i===this._prevMatchLength){if(i===0){ft(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=r,this._prevMatchLength=i,!this._wordSeparators||Oi(this._wordSeparators,e,t,r,i))return n}while(n);return null}};function Ai(e=``){let t=`(-?\\d*\\.\\d\\w*)|([^`;for(let n of`\`~!@#$%^&*()-=+[{]}\\|;:'",.<>/?`)e.indexOf(n)>=0||(t+=`\\`+n);return t+=`\\s]+)`,new RegExp(t,`g`)}let ji=Ai();function Mi(e){let t=ji;if(e&&e instanceof RegExp){if(e.global)t=e;else{let n=`g`;e.ignoreCase&&(n+=`i`),e.multiline&&(n+=`m`),e.unicode&&(n+=`u`),t=new RegExp(e.source,n)}}return t.lastIndex=0,t}let Ni=new ce;Ni.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Pi(e,t,n,r,i){if(t=Mi(t),i||=ee.first(Ni),n.length>i.maxLen){let a=e-i.maxLen/2;return a<0?a=0:r+=a,n=n.substring(a,e+i.maxLen/2),Pi(e,t,n,r,i)}let a=Date.now(),o=e-1-r,s=-1,c=null;for(let e=1;!(Date.now()-a>=i.timeBudget);e++){let r=o-i.windowSize*e;t.lastIndex=Math.max(0,r);let a=Fi(t,n,o,s);if(!a&&c||(c=a,r<=0))break;s=r}if(c){let e={word:c[0],startColumn:r+1+c.index,endColumn:r+1+c.index+c[0].length};return t.lastIndex=0,e}return null}function Fi(e,t,n,r){let i;for(;i=e.exec(t);){let t=i.index||0;if(t<=n&&e.lastIndex>=n)return i;if(r>0&&t>r)return null}return null}var Ii=class{static computeUnicodeHighlights(e,t,n){let r=n?n.startLineNumber:1,i=n?n.endLineNumber:e.getLineCount(),a=new Ri(t),o=a.getCandidateCodePoints(),s;s=RegExp(o===`allNonBasicAscii`?`[^\\t\\n\\r\\x20-\\x7E]`:`${Li(Array.from(o))}`,`g`);let c=new ki(null,s),l=[],u=!1,d,f=0,p=0,m=0;forLoop:for(let t=r,n=i;t<=n;t++){let n=e.getLineContent(t),r=n.length;c.reset(0);do if(d=c.next(n),d){let e=d.index,i=d.index+d[0].length;e>0&&lt(n.charCodeAt(e-1))&&e--,i+1<r&&lt(n.charCodeAt(i-1))&&i++;let o=n.substring(e,i),s=Pi(e+1,ji,n,0);s&&s.endColumn<=e+1&&(s=null);let c=a.shouldHighlightNonBasicASCII(o,s?s.word:null);if(c!==0){if(c===3?f++:c===2?p++:c===1?m++:v(),l.length>=1e3){u=!0;break forLoop}l.push(new E(t,e+1,t,i+1))}}while(d)}return{ranges:l,hasMore:u,ambiguousCharacterCount:f,invisibleCharacterCount:p,nonBasicAsciiCharacterCount:m}}static computeUnicodeHighlightReason(e,t){let n=new Ri(t);switch(n.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{let r=e.codePointAt(0),i=n.ambiguousCharacters.getPrimaryConfusable(r),a=gt.getLocales().filter(e=>!gt.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(r));return{kind:0,confusableWith:String.fromCodePoint(i),notAmbiguousInLocales:a}}case 1:return{kind:2}}}};function Li(e,t){return`[${tt(e.map(e=>String.fromCodePoint(e)).join(``))}]`}var Ri=class{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=gt.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return`allNonBasicAscii`;let e=new Set;if(this.options.invisibleCharacters)for(let t of _t.codePoints)zi(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(let t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(let t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){let n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let r=!1,i=!1;if(t)for(let e of t){let t=e.codePointAt(0),n=mt(e);r||=n,!n&&!this.ambiguousCharacters.isAmbiguous(t)&&!_t.isInvisibleCharacter(t)&&(i=!0)}return!r&&i?0:this.options.invisibleCharacters&&!zi(e)&&_t.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}};function zi(e){return e===` `||e===`
8
+ `||e===` `}var Bi=class{constructor(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n}},Vi=class{constructor(e,t){this.lineRangeMapping=e,this.changes=t}};function Hi(e,t,n=(e,t)=>e===t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!n(e[r],t[r]))return!1;return!0}function*Ui(e,t){let n,r;for(let i of e)r!==void 0&&t(r,i)?n.push(i):(n&&(yield n),n=[i]),r=i;n&&(yield n)}function Wi(e,t){for(let n=0;n<=e.length;n++)t(n===0?void 0:e[n-1],n===e.length?void 0:e[n])}function Gi(e,t){for(let n=0;n<e.length;n++)t(n===0?void 0:e[n-1],e[n],n+1===e.length?void 0:e[n+1])}function Ki(e,t){for(let n of t)e.push(n)}var qi;(function(e){function t(e){return e<0}e.isLessThan=t;function n(e){return e<=0}e.isLessThanOrEqual=n;function r(e){return e>0}e.isGreaterThan=r;function i(e){return e===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(qi||={});function Ji(e,t){return(n,r)=>t(e(n),e(r))}let Yi=(e,t)=>e-t;function Xi(e){return(t,n)=>-e(t,n)}(class e{static{this.empty=new e(e=>{})}constructor(e){this.iterate=e}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(t){return new e(e=>this.iterate(n=>!t(n)||e(n)))}map(t){return new e(e=>this.iterate(n=>e(t(n))))}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(r=>((n||qi.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}});var A=class e{static fromTo(t,n){return new e(t,n)}static addRange(t,n){let r=0;for(;r<n.length&&n[r].endExclusive<t.start;)r++;let i=r;for(;i<n.length&&n[i].start<=t.endExclusive;)i++;if(r===i)n.splice(r,0,t);else{let a=Math.min(t.start,n[r].start),o=Math.max(t.endExclusive,n[i-1].endExclusive);n.splice(r,i-r,new e(a,o))}}static tryCreate(t,n){if(!(t>n))return new e(t,n)}static ofLength(t){return new e(0,t)}static ofStartAndLength(t,n){return new e(t,t+n)}static emptyAt(t){return new e(t,t)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new _(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(t){return new e(this.start+t,this.endExclusive+t)}deltaStart(t){return new e(this.start+t,this.endExclusive)}deltaEnd(t){return new e(this.start,this.endExclusive+t)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e<this.endExclusive}join(t){return new e(Math.min(this.start,t.start),Math.max(this.endExclusive,t.endExclusive))}intersect(t){let n=Math.max(this.start,t.start),r=Math.min(this.endExclusive,t.endExclusive);if(n<=r)return new e(n,r)}intersectionLength(e){let t=Math.max(this.start,e.start),n=Math.min(this.endExclusive,e.endExclusive);return Math.max(0,n-t)}intersects(e){return Math.max(this.start,e.start)<Math.min(this.endExclusive,e.endExclusive)}intersectsOrTouches(e){return Math.max(this.start,e.start)<=Math.min(this.endExclusive,e.endExclusive)}isBefore(e){return this.endExclusive<=e.start}isAfter(e){return this.start>=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new _(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new _(`Invalid clipping range: ${this.toString()}`);return e<this.start?this.endExclusive-(this.start-e)%this.length:e>=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;t<this.endExclusive;t++)e(t)}joinRightTouching(t){if(this.endExclusive!==t.start)throw new _(`Invalid join: ${this.toString()} and ${t.toString()}`);return new e(this.start,t.endExclusive)}withMargin(t,n){return n===void 0&&(n=t),new e(this.start-t,this.endExclusive+n)}};function Zi(e,t){let n=Qi(e,t);return n===-1?void 0:e[n]}function Qi(e,t,n=0,r=e.length){let i=n,a=r;for(;i<a;){let n=Math.floor((i+a)/2);t(e[n])?i=n+1:a=n}return i-1}function $i(e,t){let n=ea(e,t);return n===e.length?void 0:e[n]}function ea(e,t,n=0,r=e.length){let i=n,a=r;for(;i<a;){let n=Math.floor((i+a)/2);t(e[n])?a=n:i=n+1}return i}var ta=class e{static{this.assertInvariants=!1}constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(e.assertInvariants){if(this._prevFindLastPredicate){for(let e of this._array)if(this._prevFindLastPredicate(e)&&!t(e))throw Error(`MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.`)}this._prevFindLastPredicate=t}let n=Qi(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=n+1,n===-1?void 0:this._array[n]}},na=class e{static ofLength(t,n){return new e(t,t+n)}static fromRange(t){return new e(t.startLineNumber,t.endLineNumber)}static fromRangeInclusive(t){return new e(t.startLineNumber,t.endLineNumber+1)}static{this.compareByStart=Ji(e=>e.startLineNumber,Yi)}static joinMany(e){if(e.length===0)return[];let t=new ra(e[0].slice());for(let n=1;n<e.length;n++)t=t.getUnion(new ra(e[n].slice()));return t.ranges}static join(t){if(t.length===0)throw new _(`lineRanges cannot be empty`);let n=t[0].startLineNumber,r=t[0].endLineNumberExclusive;for(let e=1;e<t.length;e++)n=Math.min(n,t[e].startLineNumber),r=Math.max(r,t[e].endLineNumberExclusive);return new e(n,r)}static deserialize(t){return new e(t[0],t[1])}constructor(e,t){if(e>t)throw new _(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&e<this.endLineNumberExclusive}get isEmpty(){return this.startLineNumber===this.endLineNumberExclusive}delta(t){return new e(this.startLineNumber+t,this.endLineNumberExclusive+t)}deltaLength(t){return new e(this.startLineNumber,this.endLineNumberExclusive+t)}get length(){return this.endLineNumberExclusive-this.startLineNumber}join(t){return new e(Math.min(this.startLineNumber,t.startLineNumber),Math.max(this.endLineNumberExclusive,t.endLineNumberExclusive))}toString(){return`[${this.startLineNumber},${this.endLineNumberExclusive})`}intersect(t){let n=Math.max(this.startLineNumber,t.startLineNumber),r=Math.min(this.endLineNumberExclusive,t.endLineNumberExclusive);if(n<=r)return new e(n,r)}intersectsStrict(e){return this.startLineNumber<e.endLineNumberExclusive&&e.startLineNumber<this.endLineNumberExclusive}intersectsOrTouches(e){return this.startLineNumber<=e.endLineNumberExclusive&&e.startLineNumber<=this.endLineNumberExclusive}equals(e){return this.startLineNumber===e.startLineNumber&&this.endLineNumberExclusive===e.endLineNumberExclusive}toInclusiveRange(){return this.isEmpty?null:new E(this.startLineNumber,1,this.endLineNumberExclusive-1,2**53-1)}toExclusiveRange(){return new E(this.startLineNumber,1,this.endLineNumberExclusive,1)}mapToLineArray(e){let t=[];for(let n=this.startLineNumber;n<this.endLineNumberExclusive;n++)t.push(e(n));return t}forEach(e){for(let t=this.startLineNumber;t<this.endLineNumberExclusive;t++)e(t)}serialize(){return[this.startLineNumber,this.endLineNumberExclusive]}toOffsetRange(){return new A(this.startLineNumber-1,this.endLineNumberExclusive-1)}addMargin(t,n){return new e(this.startLineNumber-t,this.endLineNumberExclusive+n)}},ra=class e{constructor(e=[]){this._normalizedRanges=e}get ranges(){return this._normalizedRanges}addRange(e){if(e.length===0)return;let t=ea(this._normalizedRanges,t=>t.endLineNumberExclusive>=e.startLineNumber),n=Qi(this._normalizedRanges,t=>t.startLineNumber<=e.endLineNumberExclusive)+1;if(t===n)this._normalizedRanges.splice(t,0,e);else if(t===n-1){let n=this._normalizedRanges[t];this._normalizedRanges[t]=n.join(e)}else{let r=this._normalizedRanges[t].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(t,n-t,r)}}contains(e){let t=Zi(this._normalizedRanges,t=>t.startLineNumber<=e);return!!t&&t.endLineNumberExclusive>e}intersects(e){let t=Zi(this._normalizedRanges,t=>t.startLineNumber<e.endLineNumberExclusive);return!!t&&t.endLineNumberExclusive>e.startLineNumber}getUnion(t){if(this._normalizedRanges.length===0)return t;if(t._normalizedRanges.length===0)return this;let n=[],r=0,i=0,a=null;for(;r<this._normalizedRanges.length||i<t._normalizedRanges.length;){let e=null;if(r<this._normalizedRanges.length&&i<t._normalizedRanges.length){let n=this._normalizedRanges[r],a=t._normalizedRanges[i];n.startLineNumber<a.startLineNumber?(e=n,r++):(e=a,i++)}else r<this._normalizedRanges.length?(e=this._normalizedRanges[r],r++):(e=t._normalizedRanges[i],i++);a===null?a=e:a.endLineNumberExclusive>=e.startLineNumber?a=new na(a.startLineNumber,Math.max(a.endLineNumberExclusive,e.endLineNumberExclusive)):(n.push(a),a=e)}return a!==null&&n.push(a),new e(n)}subtractFrom(t){let n=ea(this._normalizedRanges,e=>e.endLineNumberExclusive>=t.startLineNumber),r=Qi(this._normalizedRanges,e=>e.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)return new e([t]);let i=[],a=t.startLineNumber;for(let e=n;e<r;e++){let t=this._normalizedRanges[e];t.startLineNumber>a&&i.push(new na(a,t.startLineNumber)),a=t.endLineNumberExclusive}return a<t.endLineNumberExclusive&&i.push(new na(a,t.endLineNumberExclusive)),new e(i)}toString(){return this._normalizedRanges.map(e=>e.toString()).join(`, `)}getIntersection(t){let n=[],r=0,i=0;for(;r<this._normalizedRanges.length&&i<t._normalizedRanges.length;){let e=this._normalizedRanges[r],a=t._normalizedRanges[i],o=e.intersect(a);o&&!o.isEmpty&&n.push(o),e.endLineNumberExclusive<a.endLineNumberExclusive?r++:i++}return new e(n)}getWithDelta(t){return new e(this._normalizedRanges.map(e=>e.delta(t)))}},ia=class e{static{this.zero=new e(0,0)}static betweenPositions(t,n){return t.lineNumber===n.lineNumber?new e(0,n.column-t.column):new e(n.lineNumber-t.lineNumber,n.column-1)}static fromPosition(t){return new e(t.lineNumber-1,t.column-1)}static ofRange(t){return e.betweenPositions(t.getStartPosition(),t.getEndPosition())}static ofText(t){let n=0,r=0;for(let e of t)e===`
9
+ `?(n++,r=0):r++;return new e(n,r)}constructor(e,t){this.lineCount=e,this.columnCount=t}isGreaterThanOrEqualTo(e){return this.lineCount===e.lineCount?this.columnCount>=e.columnCount:this.lineCount>e.lineCount}add(t){return t.lineCount===0?new e(this.lineCount,this.columnCount+t.columnCount):new e(this.lineCount+t.lineCount,t.columnCount)}createRange(e){return this.lineCount===0?new E(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new E(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new E(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return na.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new T(e.lineNumber,e.column+this.columnCount):new T(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}},aa=class{getOffsetRange(e){return new A(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return E.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new oa.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new oa.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){let t=e.replacements.map(e=>this.getTextReplacement(e));return new oa.deps.TextEdit(t)}},oa=class{static{this._deps=void 0}static get deps(){if(!this._deps)throw Error(`Dependencies not set. Call _setDependencies first.`);return this._deps}};function sa(e){oa._deps=e}var ca=class extends aa{constructor(e){super(),this.text=e}get lineStartOffsetByLineIdx(){return this._lineStartOffsetByLineIdx||this._computeLineOffsets(),this._lineStartOffsetByLineIdx}get lineEndOffsetByLineIdx(){return this._lineEndOffsetByLineIdx||this._computeLineOffsets(),this._lineEndOffsetByLineIdx}_computeLineOffsets(){this._lineStartOffsetByLineIdx=[],this._lineEndOffsetByLineIdx=[],this._lineStartOffsetByLineIdx.push(0);for(let e=0;e<this.text.length;e++)this.text.charAt(e)===`
10
+ `&&(this._lineStartOffsetByLineIdx.push(e+1),e>0&&this.text.charAt(e-1)===`\r`?this._lineEndOffsetByLineIdx.push(e-1):this._lineEndOffsetByLineIdx.push(e));this._lineEndOffsetByLineIdx.push(this.text.length)}getOffset(e){let t=this._validatePosition(e);return this.lineStartOffsetByLineIdx[t.lineNumber-1]+t.column-1}_validatePosition(e){if(e.lineNumber<1)return new T(1,1);let t=this.textLength.lineCount+1;if(e.lineNumber>t)return new T(t,this.getLineLength(t)+1);if(e.column<1)return new T(e.lineNumber,1);let n=this.getLineLength(e.lineNumber);return e.column-1>n?new T(e.lineNumber,n+1):e}getPosition(e){let t=Qi(this.lineStartOffsetByLineIdx,t=>t<=e);return new T(t+1,e-this.lineStartOffsetByLineIdx[t]+1)}get textLength(){let e=this.lineStartOffsetByLineIdx.length-1;return new oa.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}},la=class{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new T(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new E(e,1,e,2**53-1)).length}getTransformer(){return this._transformer||=new ca(this.getValue()),this._transformer}getLineAt(e){return this.getValueOfRange(new E(e,1,e,2**53-1))}},ua=class extends la{constructor(e,t){y(t>=1),super(),this._getLineContent=e,this._lineCount=t}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let t=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let n=e.startLineNumber+1;n<e.endLineNumber;n++)t+=`
11
+ `+this._getLineContent(n);return t+=`
12
+ `+this._getLineContent(e.endLineNumber).substring(0,e.endColumn-1),t}getLineLength(e){return this._getLineContent(e).length}get length(){let e=this._getLineContent(this._lineCount);return new ia(this._lineCount-1,e.length)}},da=class extends ua{constructor(e){super(t=>e[t-1],e.length)}},fa=class extends la{constructor(e){super(),this.value=e,this._t=new ca(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}getTransformer(){return this._t}},pa=class e{static fromStringEdit(t,n){let r=t.replacements.map(e=>ma.fromStringReplacement(e,n));return new e(r)}static fromParallelReplacementsUnsorted(t){let n=t.slice().sort(Ji(e=>e.range,E.compareRangesUsingStarts));return new e(n)}constructor(e){this.replacements=e,b(()=>x(e,(e,t)=>e.range.getEndPosition().isBeforeOrEqual(t.range.getStartPosition())))}mapPosition(e){let t=0,n=0,r=0;for(let i of this.replacements){let a=i.range.getStartPosition();if(e.isBeforeOrEqual(a))break;let o=i.range.getEndPosition(),s=ia.ofText(i.text);if(e.isBefore(o)){let e=new T(a.lineNumber+t,a.column+(a.lineNumber+t===n?r:0));return ha(e,s.addToPosition(e))}a.lineNumber+t!==n&&(r=0),t+=s.lineCount-(i.range.endLineNumber-i.range.startLineNumber),s.lineCount===0?o.lineNumber===a.lineNumber?r+=s.columnCount-(o.column-a.column):r+=s.columnCount-(o.column-1):r=s.columnCount,n=o.lineNumber+t}return new T(e.lineNumber+t,e.column+(e.lineNumber+t===n?r:0))}mapRange(e){function t(e){return e instanceof T?e:e.getStartPosition()}function n(e){return e instanceof T?e:e.getEndPosition()}return ha(t(this.mapPosition(e.getStartPosition())),n(this.mapPosition(e.getEndPosition())))}apply(e){let t=``,n=new T(1,1);for(let r of this.replacements){let i=r.range,a=i.getStartPosition(),o=i.getEndPosition(),s=ha(n,a);s.isEmpty()||(t+=e.getValueOfRange(s)),t+=r.text,n=o}let r=ha(n,e.endPositionExclusive);return r.isEmpty()||(t+=e.getValueOfRange(r)),t}applyToString(e){let t=new fa(e);return this.apply(t)}getNewRanges(){let e=[],t=0,n=0,r=0;for(let i of this.replacements){let a=ia.ofText(i.text),o=T.lift({lineNumber:i.range.startLineNumber+n,column:i.range.startColumn+(i.range.startLineNumber===t?r:0)}),s=a.createRange(o);e.push(s),n=s.endLineNumber-i.range.endLineNumber,r=s.endColumn-i.range.endColumn,t=i.range.endLineNumber}return e}toReplacement(e){if(this.replacements.length===0)throw new _;if(this.replacements.length===1)return this.replacements[0];let t=this.replacements[0].range.getStartPosition(),n=this.replacements[this.replacements.length-1].range.getEndPosition(),r=``;for(let t=0;t<this.replacements.length;t++){let n=this.replacements[t];if(r+=n.text,t<this.replacements.length-1){let i=this.replacements[t+1],a=E.fromPositions(n.range.getEndPosition(),i.range.getStartPosition()),o=e.getValueOfRange(a);r+=o}}return new ma(E.fromPositions(t,n),r)}toString(e){return e===void 0?this.replacements.map(e=>e.toString()).join(`
13
+ `):typeof e==`string`?this.toString(new fa(e)):this.replacements.length===0?``:this.replacements.map(t=>{let n=e.getValueOfRange(t.range),r=E.fromPositions(new T(Math.max(1,t.range.startLineNumber-1),1),t.range.getStartPosition()),i=e.getValueOfRange(r);i.length>10&&(i=`...`+i.substring(i.length-10));let a=E.fromPositions(t.range.getEndPosition(),new T(t.range.endLineNumber+1,1)),o=e.getValueOfRange(a);o.length>10&&(o=o.substring(0,10)+`...`);let s=n;s.length>10&&(s=s.substring(0,5)+`...`+s.substring(s.length-5));let c=t.text;return c.length>10&&(c=c.substring(0,5)+`...`+c.substring(c.length-5)),s.length===0?`${i}❰${c}❱${o}`:`${i}❰${s}↦${c}❱${o}`}).join(`
14
+ `)}},ma=class e{static joinReplacements(t,n){if(t.length===0)throw new _;if(t.length===1)return t[0];let r=t[0].range.getStartPosition(),i=t[t.length-1].range.getEndPosition(),a=``;for(let e=0;e<t.length;e++){let r=t[e];if(a+=r.text,e<t.length-1){let i=t[e+1],o=E.fromPositions(r.range.getEndPosition(),i.range.getStartPosition()),s=n.getValueOfRange(o);a+=s}}return new e(E.fromPositions(r,i),a)}static fromStringReplacement(t,n){return new e(n.getTransformer().getRange(t.replaceRange),t.newText)}static delete(t){return new e(t,``)}constructor(e,t){this.range=e,this.text=t}get isEmpty(){return this.range.isEmpty()&&this.text.length===0}static equals(e,t){return e.range.equalsRange(t.range)&&e.text===t.text}equals(t){return e.equals(this,t)}removeCommonPrefixAndSuffix(e){return this.removeCommonPrefix(e).removeCommonSuffix(e)}removeCommonPrefix(t){let n=t.getValueOfRange(this.range).replaceAll(`\r
15
+ `,`
16
+ `),r=this.text.replaceAll(`\r
17
+ `,`
18
+ `),i=st(n,r),a=ia.ofText(n.substring(0,i)).addToPosition(this.range.getStartPosition()),o=r.substring(i),s=E.fromPositions(a,this.range.getEndPosition());return new e(s,o)}removeCommonSuffix(t){let n=t.getValueOfRange(this.range).replaceAll(`\r
19
+ `,`
20
+ `),r=this.text.replaceAll(`\r
21
+ `,`
22
+ `),i=ct(n,r),a=ia.ofText(n.substring(0,n.length-i)).addToPosition(this.range.getStartPosition()),o=r.substring(0,r.length-i),s=E.fromPositions(this.range.getStartPosition(),a);return new e(s,o)}toString(){let e=this.range.getStartPosition(),t=this.range.getEndPosition();return`(${e.lineNumber},${e.column} -> ${t.lineNumber},${t.column}): "${this.text}"`}};function ha(e,t){if(e.lineNumber===t.lineNumber&&e.column===2**53-1)return E.fromPositions(t,t);if(!e.isBeforeOrEqual(t))throw new _(`start must be before end`);return new E(e.lineNumber,e.column,t.lineNumber,t.column)}var ga=class e{static inverse(t,n,r){let i=[],a=1,o=1;for(let n of t){let t=new e(new na(a,n.original.startLineNumber),new na(o,n.modified.startLineNumber));t.modified.isEmpty||i.push(t),a=n.original.endLineNumberExclusive,o=n.modified.endLineNumberExclusive}let s=new e(new na(a,n+1),new na(o,r+1));return s.modified.isEmpty||i.push(s),i}static clip(t,n,r){let i=[];for(let a of t){let t=a.original.intersect(n),o=a.modified.intersect(r);t&&!t.isEmpty&&o&&!o.isEmpty&&i.push(new e(t,o))}return i}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new e(this.modified,this.original)}join(t){return new e(this.original.join(t.original),this.modified.join(t.modified))}toRangeMapping(){let e=this.original.toInclusiveRange(),t=this.modified.toInclusiveRange();if(e&&t)return new ba(e,t);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(this.modified.startLineNumber!==1||this.original.startLineNumber!==1)throw new _(`not a valid diff`);return new ba(new E(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new E(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}return new ba(new E(this.original.startLineNumber-1,2**53-1,this.original.endLineNumberExclusive-1,2**53-1),new E(this.modified.startLineNumber-1,2**53-1,this.modified.endLineNumberExclusive-1,2**53-1))}toRangeMapping2(e,t){if(va(this.original.endLineNumberExclusive,e)&&va(this.modified.endLineNumberExclusive,t))return new ba(new E(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new E(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new ba(E.fromPositions(new T(this.original.startLineNumber,1),_a(new T(this.original.endLineNumberExclusive-1,2**53-1),e)),E.fromPositions(new T(this.modified.startLineNumber,1),_a(new T(this.modified.endLineNumberExclusive-1,2**53-1),t)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new ba(E.fromPositions(_a(new T(this.original.startLineNumber-1,2**53-1),e),_a(new T(this.original.endLineNumberExclusive-1,2**53-1),e)),E.fromPositions(_a(new T(this.modified.startLineNumber-1,2**53-1),t),_a(new T(this.modified.endLineNumberExclusive-1,2**53-1),t)));throw new _}};function _a(e,t){if(e.lineNumber<1)return new T(1,1);if(e.lineNumber>t.length)return new T(t.length,t[t.length-1].length+1);let n=t[e.lineNumber-1];return e.column>n.length+1?new T(e.lineNumber,n.length+1):e}function va(e,t){return e>=1&&e<=t.length}var ya=class e extends ga{static fromRangeMappings(t){let n=na.join(t.map(e=>na.fromRangeInclusive(e.originalRange))),r=na.join(t.map(e=>na.fromRangeInclusive(e.modifiedRange)));return new e(n,r,t)}constructor(e,t,n){super(e,t),this.innerChanges=n}flip(){return new e(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new e(this.original,this.modified,[this.toRangeMapping()])}},ba=class e{static fromEdit(t){let n=t.getNewRanges();return t.replacements.map((t,r)=>new e(t.range,n[r]))}static assertSorted(e){for(let t=1;t<e.length;t++){let n=e[t-1],r=e[t];if(!(n.originalRange.getEndPosition().isBeforeOrEqual(r.originalRange.getStartPosition())&&n.modifiedRange.getEndPosition().isBeforeOrEqual(r.modifiedRange.getStartPosition())))throw new _(`Range mappings must be sorted`)}}constructor(e,t){this.originalRange=e,this.modifiedRange=t}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new e(this.modifiedRange,this.originalRange)}toTextEdit(e){let t=e.getValueOfRange(this.modifiedRange);return new ma(this.originalRange,t)}};function xa(e,t,n,r=!1){let i=[];for(let r of Ui(e.map(e=>Sa(e,t,n)),(e,t)=>e.original.intersectsOrTouches(t.original)||e.modified.intersectsOrTouches(t.modified))){let e=r[0],t=r[r.length-1];i.push(new ya(e.original.join(t.original),e.modified.join(t.modified),r.map(e=>e.innerChanges[0])))}return b(()=>!r&&i.length>0&&(i[0].modified.startLineNumber!==i[0].original.startLineNumber||n.length.lineCount-i[i.length-1].modified.endLineNumberExclusive!==t.length.lineCount-i[i.length-1].original.endLineNumberExclusive)?!1:x(i,(e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive===t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive<t.original.startLineNumber&&e.modified.endLineNumberExclusive<t.modified.startLineNumber)),i}function Sa(e,t,n){let r=0,i=0;return e.modifiedRange.endColumn===1&&e.originalRange.endColumn===1&&e.originalRange.startLineNumber+r<=e.originalRange.endLineNumber&&e.modifiedRange.startLineNumber+r<=e.modifiedRange.endLineNumber&&(i=-1),e.modifiedRange.startColumn-1>=n.getLineLength(e.modifiedRange.startLineNumber)&&e.originalRange.startColumn-1>=t.getLineLength(e.originalRange.startLineNumber)&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+i&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+i&&(r=1),new ya(new na(e.originalRange.startLineNumber+r,e.originalRange.endLineNumber+1+i),new na(e.modifiedRange.startLineNumber+r,e.modifiedRange.endLineNumber+1+i),[e])}var Ca=class{computeDiff(e,t,n){let r=new Aa(e,t,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),i=[],a=null;for(let e of r.changes){let t;t=e.originalEndLineNumber===0?new na(e.originalStartLineNumber+1,e.originalStartLineNumber+1):new na(e.originalStartLineNumber,e.originalEndLineNumber+1);let n;n=e.modifiedEndLineNumber===0?new na(e.modifiedStartLineNumber+1,e.modifiedStartLineNumber+1):new na(e.modifiedStartLineNumber,e.modifiedEndLineNumber+1);let r=new ya(t,n,e.charChanges?.map(e=>new ba(new E(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),new E(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn))));a&&(a.modified.endLineNumberExclusive===r.modified.startLineNumber||a.original.endLineNumberExclusive===r.original.startLineNumber)&&(r=new ya(a.original.join(r.original),a.modified.join(r.modified),a.innerChanges&&r.innerChanges?a.innerChanges.concat(r.innerChanges):void 0),i.pop()),i.push(r),a=r}return b(()=>x(i,(e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive===t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive<t.original.startLineNumber&&e.modified.endLineNumberExclusive<t.modified.startLineNumber)),new Bi(i,[],r.quitEarly)}};function wa(e,t,n,r){return new Gt(e,t,n).ComputeDiff(r)}var Ta=class{constructor(e){let t=[],n=[];for(let r=0,i=e.length;r<i;r++)t[r]=ja(e[r],1),n[r]=Ma(e[r],1);this.lines=e,this._startColumns=t,this._endColumns=n}getElements(){let e=[];for(let t=0,n=this.lines.length;t<n;t++)e[t]=this.lines[t].substring(this._startColumns[t]-1,this._endColumns[t]-1);return e}getStrictElement(e){return this.lines[e]}getStartLineNumber(e){return e+1}getEndLineNumber(e){return e+1}createCharSequence(e,t,n){let r=[],i=[],a=[],o=0;for(let s=t;s<=n;s++){let t=this.lines[s],c=e?this._startColumns[s]:1,l=e?this._endColumns[s]:t.length+1;for(let e=c;e<l;e++)r[o]=t.charCodeAt(e-1),i[o]=s+1,a[o]=e,o++;!e&&s<n&&(r[o]=10,i[o]=s+1,a[o]=t.length+1,o++)}return new Ea(r,i,a)}},Ea=class{constructor(e,t,n){this._charCodes=e,this._lineNumbers=t,this._columns=n}toString(){return`[`+this._charCodes.map((e,t)=>(e===10?`\\n`:String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`).join(`, `)+`]`}_assertIndex(e,t){if(e<0||e>=t.length)throw Error(`Illegal index`)}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}},Da=class e{constructor(e,t,n,r,i,a,o,s){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=r,this.modifiedStartLineNumber=i,this.modifiedStartColumn=a,this.modifiedEndLineNumber=o,this.modifiedEndColumn=s}static createFromDiffChange(t,n,r){let i=n.getStartLineNumber(t.originalStart),a=n.getStartColumn(t.originalStart),o=n.getEndLineNumber(t.originalStart+t.originalLength-1),s=n.getEndColumn(t.originalStart+t.originalLength-1),c=r.getStartLineNumber(t.modifiedStart),l=r.getStartColumn(t.modifiedStart),u=r.getEndLineNumber(t.modifiedStart+t.modifiedLength-1),d=r.getEndColumn(t.modifiedStart+t.modifiedLength-1);return new e(i,a,o,s,c,l,u,d)}};function Oa(e){if(e.length<=1)return e;let t=[e[0]],n=t[0];for(let r=1,i=e.length;r<i;r++){let i=e[r],a=i.originalStart-(n.originalStart+n.originalLength),o=i.modifiedStart-(n.modifiedStart+n.modifiedLength);Math.min(a,o)<3?(n.originalLength=i.originalStart+i.originalLength-n.originalStart,n.modifiedLength=i.modifiedStart+i.modifiedLength-n.modifiedStart):(t.push(i),n=i)}return t}var ka=class e{constructor(e,t,n,r,i){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=r,this.charChanges=i}static createFromDiffResult(t,n,r,i,a,o,s){let c,l,u,d,f;if(n.originalLength===0?(c=r.getStartLineNumber(n.originalStart)-1,l=0):(c=r.getStartLineNumber(n.originalStart),l=r.getEndLineNumber(n.originalStart+n.originalLength-1)),n.modifiedLength===0?(u=i.getStartLineNumber(n.modifiedStart)-1,d=0):(u=i.getStartLineNumber(n.modifiedStart),d=i.getEndLineNumber(n.modifiedStart+n.modifiedLength-1)),o&&n.originalLength>0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&a()){let e=r.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),o=i.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(e.getElements().length>0&&o.getElements().length>0){let t=wa(e,o,a,!0).changes;s&&(t=Oa(t)),f=[];for(let n=0,r=t.length;n<r;n++)f.push(Da.createFromDiffChange(t[n],e,o))}}return new e(c,l,u,d,f)}},Aa=class{constructor(e,t,n){this.shouldComputeCharChanges=n.shouldComputeCharChanges,this.shouldPostProcessCharChanges=n.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=n.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=n.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=t,this.original=new Ta(e),this.modified=new Ta(t),this.continueLineDiff=Na(n.maxComputationTime),this.continueCharDiff=Na(n.maxComputationTime===0?0:Math.min(n.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:void 0}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:void 0}]};let e=wa(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),t=e.changes,n=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){let e=[];for(let n=0,r=t.length;n<r;n++)e.push(ka.createFromDiffResult(this.shouldIgnoreTrimWhitespace,t[n],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:n,changes:e}}let r=[],i=0,a=0;for(let e=-1,n=t.length;e<n;e++){let o=e+1<n?t[e+1]:null,s=o?o.originalStart:this.originalLines.length,c=o?o.modifiedStart:this.modifiedLines.length;for(;i<s&&a<c;){let e=this.originalLines[i],t=this.modifiedLines[a];if(e!==t){{let n=ja(e,1),o=ja(t,1);for(;n>1&&o>1&&e.charCodeAt(n-2)===t.charCodeAt(o-2);)n--,o--;(n>1||o>1)&&this._pushTrimWhitespaceCharChange(r,i+1,1,n,a+1,1,o)}{let n=Ma(e,1),o=Ma(t,1),s=e.length+1,c=t.length+1;for(;n<s&&o<c&&e.charCodeAt(n-1)===e.charCodeAt(o-1);)n++,o++;(n<s||o<c)&&this._pushTrimWhitespaceCharChange(r,i+1,n,s,a+1,o,c)}}i++,a++}o&&(r.push(ka.createFromDiffResult(this.shouldIgnoreTrimWhitespace,o,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),i+=o.originalLength,a+=o.modifiedLength)}return{quitEarly:n,changes:r}}_pushTrimWhitespaceCharChange(e,t,n,r,i,a,o){if(this._mergeTrimWhitespaceCharChange(e,t,n,r,i,a,o))return;let s;this.shouldComputeCharChanges&&(s=[new Da(t,n,t,r,i,a,i,o)]),e.push(new ka(t,t,i,i,s))}_mergeTrimWhitespaceCharChange(e,t,n,r,i,a,o){let s=e.length;if(s===0)return!1;let c=e[s-1];return c.originalEndLineNumber===0||c.modifiedEndLineNumber===0?!1:c.originalEndLineNumber===t&&c.modifiedEndLineNumber===i?(this.shouldComputeCharChanges&&c.charChanges&&c.charChanges.push(new Da(t,n,t,r,i,a,i,o)),!0):c.originalEndLineNumber+1===t&&c.modifiedEndLineNumber+1===i&&(c.originalEndLineNumber=t,c.modifiedEndLineNumber=i,this.shouldComputeCharChanges&&c.charChanges&&c.charChanges.push(new Da(t,n,t,r,i,a,i,o)),!0)}};function ja(e,t){let n=it(e);return n===-1?t:n+1}function Ma(e,t){let n=at(e);return n===-1?t:n+2}function Na(e){if(e===0)return()=>!0;let t=Date.now();return()=>Date.now()-t<e}var Pa=class e{static trivial(t,n){return new e([new Fa(A.ofLength(t.length),A.ofLength(n.length))],!1)}static trivialTimedOut(t,n){return new e([new Fa(A.ofLength(t.length),A.ofLength(n.length))],!0)}constructor(e,t){this.diffs=e,this.hitTimeout=t}},Fa=class e{static invert(t,n){let r=[];return Wi(t,(t,i)=>{r.push(e.fromOffsetPairs(t?t.getEndExclusives():Ia.zero,i?i.getStarts():new Ia(n,(t?t.seq2Range.endExclusive-t.seq1Range.endExclusive:0)+n)))}),r}static fromOffsetPairs(t,n){return new e(new A(t.offset1,n.offset1),new A(t.offset2,n.offset2))}static assertSorted(e){let t;for(let n of e){if(t&&!(t.seq1Range.endExclusive<=n.seq1Range.start&&t.seq2Range.endExclusive<=n.seq2Range.start))throw new _(`Sequence diffs must be sorted`);t=n}}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new e(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(t){return new e(this.seq1Range.join(t.seq1Range),this.seq2Range.join(t.seq2Range))}delta(t){return t===0?this:new e(this.seq1Range.delta(t),this.seq2Range.delta(t))}deltaStart(t){return t===0?this:new e(this.seq1Range.deltaStart(t),this.seq2Range.deltaStart(t))}deltaEnd(t){return t===0?this:new e(this.seq1Range.deltaEnd(t),this.seq2Range.deltaEnd(t))}intersect(t){let n=this.seq1Range.intersect(t.seq1Range),r=this.seq2Range.intersect(t.seq2Range);if(!(!n||!r))return new e(n,r)}getStarts(){return new Ia(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new Ia(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}},Ia=class e{static{this.zero=new e(0,0)}static{this.max=new e(2**53-1,2**53-1)}constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(t){return t===0?this:new e(this.offset1+t,this.offset2+t)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}},La=class e{static{this.instance=new e}isValid(){return!0}},Ra=class{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new _(`timeout must be positive`)}isValid(){return!(Date.now()-this.startTime<this.timeout)&&this.valid&&(this.valid=!1),this.valid}},za=class{constructor(e,t){this.width=e,this.height=t,this.array=[],this.array=Array(e*t)}get(e,t){return this.array[e+t*this.width]}set(e,t,n){this.array[e+t*this.width]=n}};function Ba(e){return e===32||e===9}var Va=class e{static{this.chrKeys=new Map}static getKey(e){let t=this.chrKeys.get(e);return t===void 0&&(t=this.chrKeys.size,this.chrKeys.set(e,t)),t}constructor(t,n,r){this.range=t,this.lines=n,this.source=r,this.histogram=[];let i=0;for(let r=t.startLineNumber-1;r<t.endLineNumberExclusive-1;r++){let t=n[r];for(let n=0;n<t.length;n++){i++;let r=t[n],a=e.getKey(r);this.histogram[a]=(this.histogram[a]||0)+1}i++;let a=e.getKey(`
23
+ `);this.histogram[a]=(this.histogram[a]||0)+1}this.totalCount=i}computeSimilarity(e){let t=0,n=Math.max(this.histogram.length,e.histogram.length);for(let r=0;r<n;r++)t+=Math.abs((this.histogram[r]??0)-(e.histogram[r]??0));return 1-t/(this.totalCount+e.totalCount)}},Ha=class{compute(e,t,n=La.instance,r){if(e.length===0||t.length===0)return Pa.trivial(e,t);let i=new za(e.length,t.length),a=new za(e.length,t.length),o=new za(e.length,t.length);for(let s=0;s<e.length;s++)for(let c=0;c<t.length;c++){if(!n.isValid())return Pa.trivialTimedOut(e,t);let l=s===0?0:i.get(s-1,c),u=c===0?0:i.get(s,c-1),d;e.getElement(s)===t.getElement(c)?(d=s===0||c===0?0:i.get(s-1,c-1),s>0&&c>0&&a.get(s-1,c-1)===3&&(d+=o.get(s-1,c-1)),d+=r?r(s,c):1):d=-1;let f=Math.max(l,u,d);if(f===d){let e=s>0&&c>0?o.get(s-1,c-1):0;o.set(s,c,e+1),a.set(s,c,3)}else f===l?(o.set(s,c,0),a.set(s,c,1)):f===u&&(o.set(s,c,0),a.set(s,c,2));i.set(s,c,f)}let s=[],c=e.length,l=t.length;function u(e,t){(e+1!==c||t+1!==l)&&s.push(new Fa(new A(e+1,c),new A(t+1,l))),c=e,l=t}let d=e.length-1,f=t.length-1;for(;d>=0&&f>=0;)a.get(d,f)===3?(u(d,f),d--,f--):a.get(d,f)===1?d--:f--;return u(-1,-1),s.reverse(),new Pa(s,!1)}},Ua=class{compute(e,t,n=La.instance){if(e.length===0||t.length===0)return Pa.trivial(e,t);let r=e,i=t;function a(e,t){for(;e<r.length&&t<i.length&&r.getElement(e)===i.getElement(t);)e++,t++;return e}let o=0,s=new Ga;s.set(0,a(0,0));let c=new Ka;c.set(0,s.get(0)===0?null:new Wa(null,0,0,s.get(0)));let l=0;loop:for(;;){if(o++,!n.isValid())return Pa.trivialTimedOut(r,i);let e=-Math.min(o,i.length+o%2),t=Math.min(o,r.length+o%2);for(l=e;l<=t;l+=2){let n=l===t?-1:s.get(l+1),o=l===e?-1:s.get(l-1)+1,u=Math.min(Math.max(n,o),r.length),d=u-l;if(u>r.length||d>i.length)continue;let f=a(u,d);s.set(l,f);let p=u===n?c.get(l+1):c.get(l-1);if(c.set(l,f===u?p:new Wa(p,u,d,f-u)),s.get(l)===r.length&&s.get(l)-l===i.length)break loop}}let u=c.get(l),d=[],f=r.length,p=i.length;for(;;){let e=u?u.x+u.length:0,t=u?u.y+u.length:0;if((e!==f||t!==p)&&d.push(new Fa(new A(e,f),new A(t,p))),!u)break;f=u.x,p=u.y,u=u.prev}return d.reverse(),new Pa(d,!1)}},Wa=class{constructor(e,t,n,r){this.prev=e,this.x=t,this.y=n,this.length=r}},Ga=class{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if(e=-e-1,e>=this.negativeArr.length){let e=this.negativeArr;this.negativeArr=new Int32Array(e.length*2),this.negativeArr.set(e)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){let e=this.positiveArr;this.positiveArr=new Int32Array(e.length*2),this.positiveArr.set(e)}this.positiveArr[e]=t}}},Ka=class{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}},qa=class{constructor(e,t,n){this.lines=e,this.range=t,this.considerWhitespaceChanges=n,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let t=this.range.startLineNumber;t<=this.range.endLineNumber;t++){let r=e[t-1],i=0;t===this.range.startLineNumber&&this.range.startColumn>1&&(i=this.range.startColumn-1,r=r.substring(i)),this.lineStartOffsets.push(i);let a=0;if(!n){let e=r.trimStart();a=r.length-e.length,r=e.trimEnd()}this.trimmedWsLengthsByLineIdx.push(a);let o=t===this.range.endLineNumber?Math.min(this.range.endColumn-1-i-a,r.length):r.length;for(let e=0;e<o;e++)this.elements.push(r.charCodeAt(e));t<this.range.endLineNumber&&(this.elements.push(10),this.firstElementOffsetByLineIdx.push(this.elements.length))}}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new A(0,this.length))}getText(e){return this.elements.slice(e.start,e.endExclusive).map(e=>String.fromCharCode(e)).join(``)}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){let t=Qa(e>0?this.elements[e-1]:-1),n=Qa(e<this.elements.length?this.elements[e]:-1);if(t===7&&n===8)return 0;if(t===8)return 150;let r=0;return t!==n&&(r+=10,t===0&&n===1&&(r+=1)),r+=Za(t),r+=Za(n),r}translateOffset(e,t=`right`){let n=Qi(this.firstElementOffsetByLineIdx,t=>t<=e),r=e-this.firstElementOffsetByLineIdx[n];return new T(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+r+(r===0&&t===`left`?0:this.trimmedWsLengthsByLineIdx[n]))}translateRange(e){let t=this.translateOffset(e.start,`right`),n=this.translateOffset(e.endExclusive,`left`);return n.isBefore(t)?E.fromPositions(n,n):E.fromPositions(t,n)}findWordContaining(e){if(e<0||e>=this.elements.length||!Ja(this.elements[e]))return;let t=e;for(;t>0&&Ja(this.elements[t-1]);)t--;let n=e;for(;n<this.elements.length&&Ja(this.elements[n]);)n++;return new A(t,n)}findSubWordContaining(e){if(e<0||e>=this.elements.length||!Ja(this.elements[e]))return;let t=e;for(;t>0&&Ja(this.elements[t-1])&&!Ya(this.elements[t]);)t--;let n=e;for(;n<this.elements.length&&Ja(this.elements[n])&&!Ya(this.elements[n]);)n++;return new A(t,n)}countLinesIn(e){return this.translateOffset(e.endExclusive).lineNumber-this.translateOffset(e.start).lineNumber}isStronglyEqual(e,t){return this.elements[e]===this.elements[t]}extendToFullLines(e){return new A(Zi(this.firstElementOffsetByLineIdx,t=>t<=e.start)??0,$i(this.firstElementOffsetByLineIdx,t=>e.endExclusive<=t)??this.elements.length)}};function Ja(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}function Ya(e){return e>=65&&e<=90}let Xa={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function Za(e){return Xa[e]}function Qa(e){return e===10?8:e===13?7:Ba(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:e===-1?3:e===44||e===59?5:4}function $a(e,t,n,r,i,a){let{moves:o,excludedChanges:s}=to(e,t,n,a);if(!a.isValid())return[];let c=no(e.filter(e=>!s.has(e)),r,i,t,n,a);return Ki(o,c),o=io(o),o=o.filter(e=>{let n=e.original.toOffsetRange().slice(t).map(e=>e.trim());return n.join(`
24
+ `).length>=15&&eo(n,e=>e.length>=2)>=2}),o=ao(e,o),o}function eo(e,t){let n=0;for(let r of e)t(r)&&n++;return n}function to(e,t,n,r){let i=[],a=e.filter(e=>e.modified.isEmpty&&e.original.length>=3).map(e=>new Va(e.original,t,e)),o=new Set(e.filter(e=>e.original.isEmpty&&e.modified.length>=3).map(e=>new Va(e.modified,n,e))),s=new Set;for(let e of a){let t=-1,n;for(let r of o){let i=e.computeSimilarity(r);i>t&&(t=i,n=r)}if(t>.9&&n&&(o.delete(n),i.push(new ga(e.range,n.range)),s.add(e.source),s.add(n.source)),!r.isValid())return{moves:i,excludedChanges:s}}return{moves:i,excludedChanges:s}}function no(e,t,n,r,i,a){let o=[],s=new bi;for(let n of e)for(let e=n.original.startLineNumber;e<n.original.endLineNumberExclusive-2;e++){let n=`${t[e-1]}:${t[e+1-1]}:${t[e+2-1]}`;s.add(n,{range:new na(e,e+3)})}let c=[];e.sort(Ji(e=>e.modified.startLineNumber,Yi));for(let t of e){let e=[];for(let r=t.modified.startLineNumber;r<t.modified.endLineNumberExclusive-2;r++){let t=`${n[r-1]}:${n[r+1-1]}:${n[r+2-1]}`,i=new na(r,r+3),a=[];s.forEach(t,({range:t})=>{for(let n of e)if(n.originalLineRange.endLineNumberExclusive+1===t.endLineNumberExclusive&&n.modifiedLineRange.endLineNumberExclusive+1===i.endLineNumberExclusive){n.originalLineRange=new na(n.originalLineRange.startLineNumber,t.endLineNumberExclusive),n.modifiedLineRange=new na(n.modifiedLineRange.startLineNumber,i.endLineNumberExclusive),a.push(n);return}let n={modifiedLineRange:i,originalLineRange:t};c.push(n),a.push(n)}),e=a}if(!a.isValid())return[]}c.sort(Xi(Ji(e=>e.modifiedLineRange.length,Yi)));let l=new ra,u=new ra;for(let e of c){let t=e.modifiedLineRange.startLineNumber-e.originalLineRange.startLineNumber,n=l.subtractFrom(e.modifiedLineRange),r=u.subtractFrom(e.originalLineRange).getWithDelta(t),i=n.getIntersection(r);for(let e of i.ranges){if(e.length<3)continue;let n=e,r=e.delta(-t);o.push(new ga(r,n)),l.addRange(n),u.addRange(r)}}o.sort(Ji(e=>e.original.startLineNumber,Yi));let d=new ta(e);for(let t=0;t<o.length;t++){let n=o[t],s=d.findLastMonotonous(e=>e.original.startLineNumber<=n.original.startLineNumber),c=Zi(e,e=>e.modified.startLineNumber<=n.modified.startLineNumber),f=Math.max(n.original.startLineNumber-s.original.startLineNumber,n.modified.startLineNumber-c.modified.startLineNumber),p=d.findLastMonotonous(e=>e.original.startLineNumber<n.original.endLineNumberExclusive),m=Zi(e,e=>e.modified.startLineNumber<n.modified.endLineNumberExclusive),h=Math.max(p.original.endLineNumberExclusive-n.original.endLineNumberExclusive,m.modified.endLineNumberExclusive-n.modified.endLineNumberExclusive),g;for(g=0;g<f;g++){let e=n.original.startLineNumber-g-1,t=n.modified.startLineNumber-g-1;if(e>r.length||t>i.length||l.contains(t)||u.contains(e)||!ro(r[e-1],i[t-1],a))break}g>0&&(u.addRange(new na(n.original.startLineNumber-g,n.original.startLineNumber)),l.addRange(new na(n.modified.startLineNumber-g,n.modified.startLineNumber)));let _;for(_=0;_<h;_++){let e=n.original.endLineNumberExclusive+_,t=n.modified.endLineNumberExclusive+_;if(e>r.length||t>i.length||l.contains(t)||u.contains(e)||!ro(r[e-1],i[t-1],a))break}_>0&&(u.addRange(new na(n.original.endLineNumberExclusive,n.original.endLineNumberExclusive+_)),l.addRange(new na(n.modified.endLineNumberExclusive,n.modified.endLineNumberExclusive+_))),(g>0||_>0)&&(o[t]=new ga(new na(n.original.startLineNumber-g,n.original.endLineNumberExclusive+_),new na(n.modified.startLineNumber-g,n.modified.endLineNumberExclusive+_)))}return o}function ro(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;let r=new Ua().compute(new qa([e],new E(1,1,1,e.length),!1),new qa([t],new E(1,1,1,t.length),!1),n),i=0,a=Fa.invert(r.diffs,e.length);for(let t of a)t.seq1Range.forEach(t=>{Ba(e.charCodeAt(t))||i++});function o(t){let n=0;for(let r=0;r<e.length;r++)Ba(t.charCodeAt(r))||n++;return n}let s=o(e.length>t.length?e:t);return i/s>.6&&s>10}function io(e){if(e.length===0)return e;e.sort(Ji(e=>e.original.startLineNumber,Yi));let t=[e[0]];for(let n=1;n<e.length;n++){let r=t[t.length-1],i=e[n],a=i.original.startLineNumber-r.original.endLineNumberExclusive,o=i.modified.startLineNumber-r.modified.endLineNumberExclusive;if(a>=0&&o>=0&&a+o<=2){t[t.length-1]=r.join(i);continue}t.push(i)}return t}function ao(e,t){let n=new ta(e);return t=t.filter(t=>(n.findLastMonotonous(e=>e.original.startLineNumber<t.original.endLineNumberExclusive)||new ga(new na(1,1),new na(1,1)))!==Zi(e,e=>e.modified.startLineNumber<t.modified.endLineNumberExclusive)),t}function oo(e,t,n){let r=n;return r=so(e,t,r),r=so(e,t,r),r=co(e,t,r),r}function so(e,t,n){if(n.length===0)return n;let r=[];r.push(n[0]);for(let i=1;i<n.length;i++){let a=r[r.length-1],o=n[i];if(o.seq1Range.isEmpty||o.seq2Range.isEmpty){let n=o.seq1Range.start-a.seq1Range.endExclusive,i;for(i=1;i<=n&&e.getElement(o.seq1Range.start-i)===e.getElement(o.seq1Range.endExclusive-i)&&t.getElement(o.seq2Range.start-i)===t.getElement(o.seq2Range.endExclusive-i);i++);if(i--,i===n){r[r.length-1]=new Fa(new A(a.seq1Range.start,o.seq1Range.endExclusive-n),new A(a.seq2Range.start,o.seq2Range.endExclusive-n));continue}o=o.delta(-i)}r.push(o)}let i=[];for(let n=0;n<r.length-1;n++){let a=r[n+1],o=r[n];if(o.seq1Range.isEmpty||o.seq2Range.isEmpty){let i=a.seq1Range.start-o.seq1Range.endExclusive,s;for(s=0;s<i&&!(!e.isStronglyEqual(o.seq1Range.start+s,o.seq1Range.endExclusive+s)||!t.isStronglyEqual(o.seq2Range.start+s,o.seq2Range.endExclusive+s));s++);if(s===i){r[n+1]=new Fa(new A(o.seq1Range.start+i,a.seq1Range.endExclusive),new A(o.seq2Range.start+i,a.seq2Range.endExclusive));continue}s>0&&(o=o.delta(s))}i.push(o)}return r.length>0&&i.push(r[r.length-1]),i}function co(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let r=0;r<n.length;r++){let i=r>0?n[r-1]:void 0,a=n[r],o=r+1<n.length?n[r+1]:void 0,s=new A(i?i.seq1Range.endExclusive+1:0,o?o.seq1Range.start-1:e.length),c=new A(i?i.seq2Range.endExclusive+1:0,o?o.seq2Range.start-1:t.length);a.seq1Range.isEmpty?n[r]=lo(a,e,t,s,c):a.seq2Range.isEmpty&&(n[r]=lo(a.swap(),t,e,c,s).swap())}return n}function lo(e,t,n,r,i){let a=1;for(;e.seq1Range.start-a>=r.start&&e.seq2Range.start-a>=i.start&&n.isStronglyEqual(e.seq2Range.start-a,e.seq2Range.endExclusive-a)&&a<100;)a++;a--;let o=0;for(;e.seq1Range.start+o<r.endExclusive&&e.seq2Range.endExclusive+o<i.endExclusive&&n.isStronglyEqual(e.seq2Range.start+o,e.seq2Range.endExclusive+o)&&o<100;)o++;if(a===0&&o===0)return e;let s=0,c=-1;for(let r=-a;r<=o;r++){let i=e.seq2Range.start+r,a=e.seq2Range.endExclusive+r,o=e.seq1Range.start+r,l=t.getBoundaryScore(o)+n.getBoundaryScore(i)+n.getBoundaryScore(a);l>c&&(c=l,s=r)}return e.delta(s)}function uo(e,t,n){let r=[];for(let e of n){let t=r[r.length-1];if(!t){r.push(e);continue}e.seq1Range.start-t.seq1Range.endExclusive<=2||e.seq2Range.start-t.seq2Range.endExclusive<=2?r[r.length-1]=new Fa(t.seq1Range.join(e.seq1Range),t.seq2Range.join(e.seq2Range)):r.push(e)}return r}function fo(e,t,n,r,i=!1){let a=Fa.invert(n,e.length),o=[],s=new Ia(0,0);function c(n,c){if(n.offset1<s.offset1||n.offset2<s.offset2)return;let l=r(e,n.offset1),u=r(t,n.offset2);if(!l||!u)return;let d=new Fa(l,u),f=d.intersect(c),p=f.seq1Range.length,m=f.seq2Range.length;for(;a.length>0;){let n=a[0];if(!(n.seq1Range.intersects(d.seq1Range)||n.seq2Range.intersects(d.seq2Range)))break;let i=new Fa(r(e,n.seq1Range.start),r(t,n.seq2Range.start)),o=i.intersect(n);if(p+=o.seq1Range.length,m+=o.seq2Range.length,d=d.join(i),d.seq1Range.endExclusive>=n.seq1Range.endExclusive)a.shift();else break}(i&&p+m<d.seq1Range.length+d.seq2Range.length||p+m<(d.seq1Range.length+d.seq2Range.length)*2/3)&&o.push(d),s=d.getEndExclusives()}for(;a.length>0;){let e=a.shift();e.seq1Range.isEmpty||(c(e.getStarts(),e),c(e.getEndExclusives().delta(-1),e))}return po(n,o)}function po(e,t){let n=[];for(;e.length>0||t.length>0;){let r=e[0],i=t[0],a;a=r&&(!i||r.seq1Range.start<i.seq1Range.start)?e.shift():t.shift(),n.length>0&&n[n.length-1].seq1Range.endExclusive>=a.seq1Range.start?n[n.length-1]=n[n.length-1].join(a):n.push(a)}return n}function mo(e,t,n){let r=n;if(r.length===0)return r;let i=0,a;do{a=!1;let t=[r[0]];for(let n=1;n<r.length;n++){let i=r[n],s=t[t.length-1];function o(t,n){let r=new A(s.seq1Range.endExclusive,i.seq1Range.start);return e.getText(r).replace(/\s/g,``).length<=4&&(t.seq1Range.length+t.seq2Range.length>5||n.seq1Range.length+n.seq2Range.length>5)}o(s,i)?(a=!0,t[t.length-1]=t[t.length-1].join(i)):t.push(i)}r=t}while(i++<10&&a);return r}function ho(e,t,n){let r=n;if(r.length===0)return r;let i=0,a;do{a=!1;let n=[r[0]];for(let i=1;i<r.length;i++){let s=r[i],c=n[n.length-1];function o(n,r){let i=new A(c.seq1Range.endExclusive,s.seq1Range.start);if(e.countLinesIn(i)>5||i.length>500)return!1;let a=e.getText(i).trim();if(a.length>20||a.split(/\r\n|\r|\n/).length>1)return!1;let o=e.countLinesIn(n.seq1Range),l=n.seq1Range.length,u=t.countLinesIn(n.seq2Range),d=n.seq2Range.length,f=e.countLinesIn(r.seq1Range),p=r.seq1Range.length,m=t.countLinesIn(r.seq2Range),h=r.seq2Range.length;function g(e){return Math.min(e,130)}return(g(o*40+l)**1.5+g(u*40+d)**1.5)**1.5+(g(f*40+p)**1.5+g(m*40+h)**1.5)**1.5>(130**1.5)**1.5*1.3}o(c,s)?(a=!0,n[n.length-1]=n[n.length-1].join(s)):n.push(s)}r=n}while(i++<10&&a);let s=[];return Gi(r,(t,n,r)=>{let i=n;function a(e){return e.length>0&&e.trim().length<=3&&n.seq1Range.length+n.seq2Range.length>100}let o=e.extendToFullLines(n.seq1Range),c=e.getText(new A(o.start,n.seq1Range.start));a(c)&&(i=i.deltaStart(-c.length));let l=e.getText(new A(n.seq1Range.endExclusive,o.endExclusive));a(l)&&(i=i.deltaEnd(l.length));let u=Fa.fromOffsetPairs(t?t.getEndExclusives():Ia.zero,r?r.getStarts():Ia.max),d=i.intersect(u);s.length>0&&d.getStarts().equals(s[s.length-1].getEndExclusives())?s[s.length-1]=s[s.length-1].join(d):s.push(d)}),s}var go=class{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){return 1e3-((e===0?0:_o(this.lines[e-1]))+(e===this.lines.length?0:_o(this.lines[e])))}getText(e){return this.lines.slice(e.start,e.endExclusive).join(`
25
+ `)}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}};function _o(e){let t=0;for(;t<e.length&&(e.charCodeAt(t)===32||e.charCodeAt(t)===9);)t++;return t}var vo=class{constructor(){this.dynamicProgrammingDiffing=new Ha,this.myersDiffingAlgorithm=new Ua}computeDiff(e,t,n){if(e.length<=1&&Hi(e,t,(e,t)=>e===t))return new Bi([],[],!1);if(e.length===1&&e[0].length===0||t.length===1&&t[0].length===0)return new Bi([new ya(new na(1,e.length+1),new na(1,t.length+1),[new ba(new E(1,1,e.length,e[e.length-1].length+1),new E(1,1,t.length,t[t.length-1].length+1))])],[],!1);let r=n.maxComputationTimeMs===0?La.instance:new Ra(n.maxComputationTimeMs),i=!n.ignoreTrimWhitespace,a=new Map;function o(e){let t=a.get(e);return t===void 0&&(t=a.size,a.set(e,t)),t}let s=e.map(e=>o(e.trim())),c=t.map(e=>o(e.trim())),l=new go(s,e),u=new go(c,t),d=l.length+u.length<1700?this.dynamicProgrammingDiffing.compute(l,u,r,(n,r)=>e[n]===t[r]?t[r].length===0?.1:1+Math.log(1+t[r].length):.99):this.myersDiffingAlgorithm.compute(l,u,r),f=d.diffs,p=d.hitTimeout;f=oo(l,u,f),f=mo(l,u,f);let m=[],h=a=>{if(i)for(let o=0;o<a;o++){let a=g+o,s=_+o;if(e[a]!==t[s]){let o=this.refineDiff(e,t,new Fa(new A(a,a+1),new A(s,s+1)),r,i,n);for(let e of o.mappings)m.push(e);o.hitTimeout&&(p=!0)}}},g=0,_=0;for(let a of f){b(()=>a.seq1Range.start-g===a.seq2Range.start-_),h(a.seq1Range.start-g),g=a.seq1Range.endExclusive,_=a.seq2Range.endExclusive;let o=this.refineDiff(e,t,a,r,i,n);o.hitTimeout&&(p=!0);for(let e of o.mappings)m.push(e)}h(e.length-g);let v=xa(m,new da(e),new da(t)),y=[];return n.computeMoves&&(y=this.computeMoves(v,e,t,s,c,r,i,n)),b(()=>{function n(e,t){if(e.lineNumber<1||e.lineNumber>t.length)return!1;let n=t[e.lineNumber-1];return!(e.column<1||e.column>n.length+1)}function r(e,t){return!(e.startLineNumber<1||e.startLineNumber>t.length+1||e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1)}for(let i of v){if(!i.innerChanges)return!1;for(let r of i.innerChanges)if(!(n(r.modifiedRange.getStartPosition(),t)&&n(r.modifiedRange.getEndPosition(),t)&&n(r.originalRange.getStartPosition(),e)&&n(r.originalRange.getEndPosition(),e)))return!1;if(!r(i.modified,t)||!r(i.original,e))return!1}return!0}),new Bi(v,y,p)}computeMoves(e,t,n,r,i,a,o,s){return $a(e,t,n,r,i,a).map(e=>new Vi(e,xa(this.refineDiff(t,n,new Fa(e.original.toOffsetRange(),e.modified.toOffsetRange()),a,o,s).mappings,new da(t),new da(n),!0)))}refineDiff(e,t,n,r,i,a){let o=yo(n).toRangeMapping2(e,t),s=new qa(e,o.originalRange,i),c=new qa(t,o.modifiedRange,i),l=s.length+c.length<500?this.dynamicProgrammingDiffing.compute(s,c,r):this.myersDiffingAlgorithm.compute(s,c,r),u=l.diffs;return u=oo(s,c,u),u=fo(s,c,u,(e,t)=>e.findWordContaining(t)),a.extendToSubwords&&(u=fo(s,c,u,(e,t)=>e.findSubWordContaining(t),!0)),u=uo(s,c,u),u=ho(s,c,u),{mappings:u.map(e=>new ba(s.translateRange(e.seq1Range),c.translateRange(e.seq2Range))),hitTimeout:l.hitTimeout}}};function yo(e){return new ga(new na(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new na(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}var bo;(function(e){e.inMemory=`inmemory`,e.vscode=`vscode`,e.internal=`private`,e.walkThrough=`walkThrough`,e.walkThroughSnippet=`walkThroughSnippet`,e.http=`http`,e.https=`https`,e.file=`file`,e.mailto=`mailto`,e.untitled=`untitled`,e.data=`data`,e.command=`command`,e.vscodeRemote=`vscode-remote`,e.vscodeRemoteResource=`vscode-remote-resource`,e.vscodeManagedRemoteResource=`vscode-managed-remote-resource`,e.vscodeUserData=`vscode-userdata`,e.vscodeCustomEditor=`vscode-custom-editor`,e.vscodeNotebookCell=`vscode-notebook-cell`,e.vscodeNotebookCellMetadata=`vscode-notebook-cell-metadata`,e.vscodeNotebookCellMetadataDiff=`vscode-notebook-cell-metadata-diff`,e.vscodeNotebookCellOutput=`vscode-notebook-cell-output`,e.vscodeNotebookCellOutputDiff=`vscode-notebook-cell-output-diff`,e.vscodeNotebookMetadata=`vscode-notebook-metadata`,e.vscodeInteractiveInput=`vscode-interactive-input`,e.vscodeSettings=`vscode-settings`,e.vscodeWorkspaceTrust=`vscode-workspace-trust`,e.vscodeTerminal=`vscode-terminal`,e.vscodeImageCarousel=`vscode-image-carousel`,e.vscodeChatCodeBlock=`vscode-chat-code-block`,e.vscodeChatCodeCompareBlock=`vscode-chat-code-compare-block`,e.vscodeChatEditor=`vscode-chat-editor`,e.vscodeChatInput=`chatSessionInput`,e.vscodeLocalChatSession=`vscode-chat-session`,e.webviewPanel=`webview-panel`,e.vscodeWebview=`vscode-webview`,e.vscodeBrowser=`vscode-browser`,e.extension=`extension`,e.vscodeFileResource=`vscode-file`,e.tmp=`tmp`,e.vsls=`vsls`,e.vscodeSourceControl=`vscode-scm`,e.commentsInput=`comment`,e.codeSetting=`code-setting`,e.outputChannel=`output`,e.accessibleView=`accessible-view`,e.chatEditingSnapshotScheme=`chat-editing-snapshot-text-model`,e.chatEditingModel=`chat-editing-text-model`,e.copilotPr=`copilot-pr`})(bo||={});let xo=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema=`http`,this._delegate=null,this._serverRootPath=`/`}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return An.join(this._serverRootPath,bo.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(t){return f(t),e}let t=e.authority,n=this._hosts[t];n&&n.indexOf(`:`)!==-1&&n.indexOf(`[`)===-1&&(n=`[${n}]`);let r=this._ports[t],i=this._connectionTokens[t],a=`path=${encodeURIComponent(e.path)}`;return typeof i==`string`&&(a+=`&tkn=${encodeURIComponent(i)}`),Bn.from({scheme:Ee?this._preferredWebSchema:bo.vscodeRemoteResource,authority:`${n}:${r}`,path:this._remoteResourcesPath,query:a})}},So=new class e{static{this.FALLBACK_AUTHORITY=`vscode-app`}asBrowserUri(e){let t=this.toUri(e);return this.uriToBrowserUri(t)}uriToBrowserUri(t){return t.scheme===bo.vscodeRemote?xo.rewrite(t):t.scheme===bo.file&&(Te||De===`${bo.vscodeFileResource}://${e.FALLBACK_AUTHORITY}`)?t.with({scheme:bo.vscodeFileResource,authority:t.authority||e.FALLBACK_AUTHORITY,query:null,fragment:null}):t}toUri(e){if(Bn.isUri(e))return e;if(globalThis._VSCODE_FILE_ROOT){let t=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(t))return Bn.joinPath(Bn.parse(t,!0),e);let n=jn(t,e);return Bn.file(n)}throw Error(`Cannot determine URI for module id!`)}};var Co;(function(e){let t=new Map([[`1`,{"Cross-Origin-Opener-Policy":`same-origin`}],[`2`,{"Cross-Origin-Embedder-Policy":`require-corp`}],[`3`,{"Cross-Origin-Opener-Policy":`same-origin`,"Cross-Origin-Embedder-Policy":`require-corp`}]]);e.CoopAndCoep=Object.freeze(t.get(`3`));let n=`vscode-coi`;function r(e){let r;typeof e==`string`?r=new URL(e).searchParams:e instanceof URL?r=e.searchParams:Bn.isUri(e)&&(r=new URL(e.toString(!0)).searchParams);let i=r?.get(n);if(i)return t.get(i)}e.getHeadersFromQuery=r;function i(e,t,r){if(!globalThis.crossOriginIsolated)return;let i=t&&r?`3`:r?`2`:`1`;e instanceof URLSearchParams?e.set(n,i):e[n]=i}e.addSearchParam=i})(Co||={});function wo(e,t){(globalThis._VSCODE_PRODUCT_JSON??globalThis.vscode?.context?.configuration()?.product)?.commit;let n=`vs/../../node_modules/${`${e}/${t}`}`;return So.asBrowserUri(n).toString(!0)}var To=class{constructor(e){this.replacements=e;let t=-1;for(let n of e){if(!(n.replaceRange.start>=t))throw new _(`Edits must be disjoint and sorted. Found ${n} after ${t}`);t=n.replaceRange.endExclusive}}toString(){return`[${this.replacements.map(e=>e.toString()).join(`, `)}]`}normalize(){let e=[],t;for(let n of this.replacements)if(n.getNewLength()!==0||n.replaceRange.length!==0){if(t&&t.replaceRange.endExclusive===n.replaceRange.start){let e=t.tryJoinTouching(n);if(e){t=e;continue}}t&&e.push(t),t=n}return t&&e.push(t),this._createNew(e)}compose(e){let t=this.normalize(),n=e.normalize();if(t.isEmpty())return n;if(n.isEmpty())return t;let r=[...t.replacements],i=[],a=0;for(let e of n.replacements){for(;;){let t=r[0];if(!t||t.replaceRange.start+a+t.getNewLength()>=e.replaceRange.start)break;r.shift(),i.push(t),a+=t.getNewLength()-t.replaceRange.length}let t=a,n,o;for(;;){let t=r[0];if(!t||t.replaceRange.start+a>e.replaceRange.endExclusive)break;n||=t,o=t,r.shift(),a+=t.getNewLength()-t.replaceRange.length}if(!n)i.push(e.delta(-a));else{let s=Math.min(n.replaceRange.start,e.replaceRange.start-t),c=e.replaceRange.start-(n.replaceRange.start+t);if(c>0){let e=n.slice(A.emptyAt(s),new A(0,c));i.push(e)}if(!o)throw new _(`Invariant violation: lastIntersecting is undefined`);let l=o.replaceRange.endExclusive+a-e.replaceRange.endExclusive;if(l>0){let e=o.slice(A.ofStartAndLength(o.replaceRange.endExclusive,0),new A(o.getNewLength()-l,o.getNewLength()));r.unshift(e),a-=e.getNewLength()-e.replaceRange.length}let u=new A(s,e.replaceRange.endExclusive-a),d=e.slice(u,new A(0,e.getNewLength()));i.push(d)}}for(;;){let e=r.shift();if(!e)break;i.push(e)}return this._createNew(i).normalize()}getNewRanges(){let e=[],t=0;for(let n of this.replacements)e.push(A.ofStartAndLength(n.replaceRange.start+t,n.getNewLength())),t+=n.getLengthDelta();return e}isEmpty(){return this.replacements.length===0}applyToOffsetOrUndefined(e){let t=0;for(let n of this.replacements)if(n.replaceRange.start<=e){if(e<n.replaceRange.endExclusive)return;t+=n.getNewLength()-n.replaceRange.length}else break;return e+t}},Eo=class{constructor(e){this.replaceRange=e}delta(e){return this.slice(this.replaceRange.delta(e),new A(0,this.getNewLength()))}getLengthDelta(){return this.getNewLength()-this.replaceRange.length}toString(){return`{ ${this.replaceRange.toString()} -> ${this.getNewLength()} }`}get isEmpty(){return this.getNewLength()===0&&this.replaceRange.length===0}getRangeAfterReplace(){return new A(this.replaceRange.start,this.replaceRange.start+this.getNewLength())}},Do=class extends To{apply(e){let t=[],n=0;for(let r of this.replacements)t.push(e.substring(n,r.replaceRange.start)),t.push(r.newText),n=r.replaceRange.endExclusive;return t.push(e.substring(n)),t.join(``)}removeCommonSuffixPrefix(e){let t=[];for(let n of this.replacements){let r=n.removeCommonSuffixPrefix(e);r.isEmpty||t.push(r)}return new ko(t)}},Oo=class extends Eo{constructor(e,t){super(e),this.newText=t}getNewLength(){return this.newText.length}toString(){return`${this.replaceRange} -> ${JSON.stringify(this.newText)}`}replace(e){return e.substring(0,this.replaceRange.start)+this.newText+e.substring(this.replaceRange.endExclusive)}removeCommonSuffixPrefix(e){let t=e.substring(this.replaceRange.start,this.replaceRange.endExclusive),n=st(t,this.newText),r=Math.min(t.length-n,this.newText.length-n,ct(t,this.newText));return new Ao(new A(this.replaceRange.start+n,this.replaceRange.endExclusive-r),this.newText.substring(n,this.newText.length-r))}removeCommonSuffixAndPrefix(e){return this.removeCommonSuffix(e).removeCommonPrefix(e)}removeCommonPrefix(e){let t=st(this.replaceRange.substring(e),this.newText);return t===0?this:this.slice(this.replaceRange.deltaStart(t),new A(t,this.newText.length))}removeCommonSuffix(e){let t=ct(this.replaceRange.substring(e),this.newText);return t===0?this:this.slice(this.replaceRange.deltaEnd(-t),new A(0,this.newText.length-t))}toJson(){return{txt:this.newText,pos:this.replaceRange.start,len:this.replaceRange.length}}},ko=class e extends Do{static{this.empty=new e([])}static replace(t,n){return new e([new Ao(t,n)])}static compose(t){if(t.length===0)return e.empty;let n=t[0];for(let e=1;e<t.length;e++)n=n.compose(t[e]);return n}constructor(e){super(e)}_createNew(t){return new e(t)}},Ao=class e extends Oo{static insert(t,n){return new e(A.emptyAt(t),n)}static replace(t,n){return new e(t,n)}equals(e){return this.replaceRange.equals(e.replaceRange)&&this.newText===e.newText}tryJoinTouching(t){return new e(this.replaceRange.joinRightTouching(t.replaceRange),this.newText+t.newText)}slice(t,n){return new e(t,n?n.substring(this.newText):this.newText)}};sa({StringEdit:ko,StringReplacement:Ao,TextReplacement:ma,TextEdit:pa,TextLength:ia});let jo,Mo,No;function Po(){return jo||=import(`${wo(`@vscode/diff`,`dist/index.js`)}`),jo}function Fo(e){return e?(No||=Po().then(e=>e.createDiffComputer({useWasm:!0})),No):(Mo||=Po().then(e=>e.createDiffComputer({useWasm:!1})),Mo)}async function Io(e){return new Lo(await Fo(e))}var Lo=class{constructor(e){this._computer=e}computeDiff(e,t,n){let r=new fa(e.join(`
26
+ `)),i=new fa(t.join(`
27
+ `)),a=this._computer.computeDiff(r.value,i.value,{ignoreTrimWhitespace:!0,computeMoves:n.computeMoves,extendToSubwords:n.extendToSubwords}),o=r.getTransformer(),s=i.getTransformer(),c=[],l=0;for(let e of a.edits.replacements){let t=e.range.start+l,n=t+e.newText.length,r=o.getRange(new A(e.range.start,e.range.endExclusive)),i=s.getRange(new A(t,n));c.push(new ba(r,i)),l+=e.newText.length-(e.range.endExclusive-e.range.start)}let u=xa(c,r,i),d=[];if(n.computeMoves)for(let e of a.moves){let t=o.getPosition(e.range.original.start),n=o.getPosition(e.range.original.endExclusive),r=s.getPosition(e.range.modified.start),i=s.getPosition(e.range.modified.endExclusive),a=new na(t.lineNumber,n.lineNumber),c=new na(r.lineNumber,i.lineNumber);d.push(new Vi(new ga(a,c),[]))}return new Bi(u,d,a.hitTimeout)}};let Ro={getLegacy:()=>new Ca,getDefault:()=>new vo,getAdvancedExternal:()=>Io(!1),getAdvancedWasm:()=>Io(!0)};function zo(e,t){let n=10**t;return Math.round(e*n)/n}var j=class{constructor(e,t,n,r=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,t))|0,this.b=Math.min(255,Math.max(0,n))|0,this.a=zo(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}},Bo=class e{constructor(e,t,n,r){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=zo(Math.max(Math.min(1,t),0),3),this.l=zo(Math.max(Math.min(1,n),0),3),this.a=zo(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(t){let n=t.r/255,r=t.g/255,i=t.b/255,a=t.a,o=Math.max(n,r,i),s=Math.min(n,r,i),c=0,l=0,u=(s+o)/2,d=o-s;if(d>0){switch(l=Math.min(u<=.5?d/(2*u):d/(2-2*u),1),o){case n:c=(r-i)/d+(r<i?6:0);break;case r:c=(i-n)/d+2;break;case i:c=(n-r)/d+4}c*=60,c=Math.round(c)}return new e(c,l,u,a)}static _hue2rgb(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}static toRGBA(t){let n=t.h/360,{s:r,l:i,a}=t,o,s,c;if(r===0)o=s=c=i;else{let t=i<.5?i*(1+r):i+r-i*r,a=2*i-t;o=e._hue2rgb(a,t,n+1/3),s=e._hue2rgb(a,t,n),c=e._hue2rgb(a,t,n-1/3)}return new j(Math.round(o*255),Math.round(s*255),Math.round(c*255),a)}},Vo=class e{constructor(e,t,n,r){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=zo(Math.max(Math.min(1,t),0),3),this.v=zo(Math.max(Math.min(1,n),0),3),this.a=zo(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(t){let n=t.r/255,r=t.g/255,i=t.b/255,a=Math.max(n,r,i),o=a-Math.min(n,r,i),s=a===0?0:o/a,c;return c=o===0?0:a===n?((r-i)/o%6+6)%6:a===r?(i-n)/o+2:(n-r)/o+4,new e(Math.round(c*60),s,a,t.a)}static toRGBA(e){let{h:t,s:n,v:r,a:i}=e,a=r*n,o=a*(1-Math.abs(t/60%2-1)),s=r-a,[c,l,u]=[0,0,0];return t<60?(c=a,l=o):t<120?(c=o,l=a):t<180?(l=a,u=o):t<240?(l=o,u=a):t<300?(c=o,u=a):t<=360&&(c=a,u=o),c=Math.round((c+s)*255),l=Math.round((l+s)*255),u=Math.round((u+s)*255),new j(c,l,u,i)}},Ho=class e{static fromHex(t){return e.Format.CSS.parseHex(t)||e.red}static equals(e,t){return!e&&!t?!0:!e||!t?!1:e.equals(t)}get hsla(){return this._hsla?this._hsla:Bo.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Vo.fromRGBA(this.rgba)}constructor(e){if(!e)throw Error(`Color needs a value`);if(e instanceof j)this.rgba=e;else if(e instanceof Bo)this._hsla=e,this.rgba=Bo.toRGBA(e);else if(e instanceof Vo)this._hsva=e,this.rgba=Vo.toRGBA(e);else throw Error(`Invalid color ctor argument`)}equals(e){return!!e&&j.equals(this.rgba,e.rgba)&&Bo.equals(this.hsla,e.hsla)&&Vo.equals(this.hsva,e.hsva)}getRelativeLuminance(){let t=e._relativeLuminanceForComponent(this.rgba.r),n=e._relativeLuminanceForComponent(this.rgba.g),r=e._relativeLuminanceForComponent(this.rgba.b);return zo(.2126*t+.7152*n+.0722*r,4)}static _relativeLuminanceForComponent(e){let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()<e.getRelativeLuminance()}lighten(t){return new e(new Bo(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*t,this.hsla.a))}darken(t){return new e(new Bo(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*t,this.hsla.a))}transparent(t){let{r:n,g:r,b:i,a}=this.rgba;return new e(new j(n,r,i,a*t))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new e(new j(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}mix(t,n=.5){let r=Math.min(Math.max(n,0),1),i=this.rgba,a=t.rgba,o=i.r+(a.r-i.r)*r,s=i.g+(a.g-i.g)*r,c=i.b+(a.b-i.b)*r,l=i.a+(a.a-i.a)*r;return new e(new j(o,s,c,l))}makeOpaque(t){if(this.isOpaque()||t.rgba.a!==1)return this;let{r:n,g:r,b:i,a}=this.rgba;return new e(new j(t.rgba.r-a*(t.rgba.r-n),t.rgba.g-a*(t.rgba.g-r),t.rgba.b-a*(t.rgba.b-i),1))}toString(){return this._toString||=e.Format.CSS.format(this),this._toString}toNumber32Bit(){return this._toNumber32Bit||=(this.rgba.r<<24|this.rgba.g<<16|this.rgba.b<<8|this.rgba.a*255<<0)>>>0,this._toNumber32Bit}static getLighterColor(e,t,n){if(e.isLighterThan(t))return e;n||=.5;let r=e.getRelativeLuminance(),i=t.getRelativeLuminance();return n=n*(i-r)/i,e.lighten(n)}static getDarkerColor(e,t,n){if(e.isDarkerThan(t))return e;n||=.5;let r=e.getRelativeLuminance(),i=t.getRelativeLuminance();return n=n*(r-i)/r,e.darken(n)}static{this.white=new e(new j(255,255,255,1))}static{this.black=new e(new j(0,0,0,1))}static{this.red=new e(new j(255,0,0,1))}static{this.blue=new e(new j(0,0,255,1))}static{this.green=new e(new j(0,255,0,1))}static{this.cyan=new e(new j(0,255,255,1))}static{this.lightgrey=new e(new j(211,211,211,1))}static{this.transparent=new e(new j(0,0,0,0))}};(function(e){(function(t){(function(t){function n(t){return t.rgba.a===1?`rgb(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b})`:e.Format.CSS.formatRGBA(t)}t.formatRGB=n;function r(e){return`rgba(${e.rgba.r}, ${e.rgba.g}, ${e.rgba.b}, ${+e.rgba.a.toFixed(2)})`}t.formatRGBA=r;function i(t){return t.hsla.a===1?`hsl(${t.hsla.h}, ${Math.round(t.hsla.s*100)}%, ${Math.round(t.hsla.l*100)}%)`:e.Format.CSS.formatHSLA(t)}t.formatHSL=i;function a(e){return`hsla(${e.hsla.h}, ${Math.round(e.hsla.s*100)}%, ${Math.round(e.hsla.l*100)}%, ${e.hsla.a.toFixed(2)})`}t.formatHSLA=a;function o(e){let t=e.toString(16);return t.length===2?t:`0`+t}function s(e){return`#${o(e.rgba.r)}${o(e.rgba.g)}${o(e.rgba.b)}`}t.formatHex=s;function c(t,n=!1){return n&&t.rgba.a===1?e.Format.CSS.formatHex(t):`#${o(t.rgba.r)}${o(t.rgba.g)}${o(t.rgba.b)}${o(Math.round(t.rgba.a*255))}`}t.formatHexA=c;function l(t){return t.isOpaque()?e.Format.CSS.formatHex(t):e.Format.CSS.formatRGBA(t)}t.format=l;function u(t){if(t===`transparent`)return e.transparent;if(t.startsWith(`#`))return f(t);if(t.startsWith(`rgba(`)){let n=t.match(/rgba\((?<r>(?:\+|-)?\d+), *(?<g>(?:\+|-)?\d+), *(?<b>(?:\+|-)?\d+), *(?<a>(?:\+|-)?\d+(\.\d+)?)\)/);if(!n)throw Error(`Invalid color format `+t);return new e(new j(parseInt(n.groups?.r??`0`),parseInt(n.groups?.g??`0`),parseInt(n.groups?.b??`0`),parseFloat(n.groups?.a??`0`)))}if(t.startsWith(`rgb(`)){let n=t.match(/rgb\((?<r>(?:\+|-)?\d+), *(?<g>(?:\+|-)?\d+), *(?<b>(?:\+|-)?\d+)\)/);if(!n)throw Error(`Invalid color format `+t);return new e(new j(parseInt(n.groups?.r??`0`),parseInt(n.groups?.g??`0`),parseInt(n.groups?.b??`0`)))}return d(t)}t.parse=u;function d(t){switch(t){case`aliceblue`:return new e(new j(240,248,255,1));case`antiquewhite`:return new e(new j(250,235,215,1));case`aqua`:return new e(new j(0,255,255,1));case`aquamarine`:return new e(new j(127,255,212,1));case`azure`:return new e(new j(240,255,255,1));case`beige`:return new e(new j(245,245,220,1));case`bisque`:return new e(new j(255,228,196,1));case`black`:return new e(new j(0,0,0,1));case`blanchedalmond`:return new e(new j(255,235,205,1));case`blue`:return new e(new j(0,0,255,1));case`blueviolet`:return new e(new j(138,43,226,1));case`brown`:return new e(new j(165,42,42,1));case`burlywood`:return new e(new j(222,184,135,1));case`cadetblue`:return new e(new j(95,158,160,1));case`chartreuse`:return new e(new j(127,255,0,1));case`chocolate`:return new e(new j(210,105,30,1));case`coral`:return new e(new j(255,127,80,1));case`cornflowerblue`:return new e(new j(100,149,237,1));case`cornsilk`:return new e(new j(255,248,220,1));case`crimson`:return new e(new j(220,20,60,1));case`cyan`:return new e(new j(0,255,255,1));case`darkblue`:return new e(new j(0,0,139,1));case`darkcyan`:return new e(new j(0,139,139,1));case`darkgoldenrod`:return new e(new j(184,134,11,1));case`darkgray`:return new e(new j(169,169,169,1));case`darkgreen`:return new e(new j(0,100,0,1));case`darkgrey`:return new e(new j(169,169,169,1));case`darkkhaki`:return new e(new j(189,183,107,1));case`darkmagenta`:return new e(new j(139,0,139,1));case`darkolivegreen`:return new e(new j(85,107,47,1));case`darkorange`:return new e(new j(255,140,0,1));case`darkorchid`:return new e(new j(153,50,204,1));case`darkred`:return new e(new j(139,0,0,1));case`darksalmon`:return new e(new j(233,150,122,1));case`darkseagreen`:return new e(new j(143,188,143,1));case`darkslateblue`:return new e(new j(72,61,139,1));case`darkslategray`:return new e(new j(47,79,79,1));case`darkslategrey`:return new e(new j(47,79,79,1));case`darkturquoise`:return new e(new j(0,206,209,1));case`darkviolet`:return new e(new j(148,0,211,1));case`deeppink`:return new e(new j(255,20,147,1));case`deepskyblue`:return new e(new j(0,191,255,1));case`dimgray`:return new e(new j(105,105,105,1));case`dimgrey`:return new e(new j(105,105,105,1));case`dodgerblue`:return new e(new j(30,144,255,1));case`firebrick`:return new e(new j(178,34,34,1));case`floralwhite`:return new e(new j(255,250,240,1));case`forestgreen`:return new e(new j(34,139,34,1));case`fuchsia`:return new e(new j(255,0,255,1));case`gainsboro`:return new e(new j(220,220,220,1));case`ghostwhite`:return new e(new j(248,248,255,1));case`gold`:return new e(new j(255,215,0,1));case`goldenrod`:return new e(new j(218,165,32,1));case`gray`:return new e(new j(128,128,128,1));case`green`:return new e(new j(0,128,0,1));case`greenyellow`:return new e(new j(173,255,47,1));case`grey`:return new e(new j(128,128,128,1));case`honeydew`:return new e(new j(240,255,240,1));case`hotpink`:return new e(new j(255,105,180,1));case`indianred`:return new e(new j(205,92,92,1));case`indigo`:return new e(new j(75,0,130,1));case`ivory`:return new e(new j(255,255,240,1));case`khaki`:return new e(new j(240,230,140,1));case`lavender`:return new e(new j(230,230,250,1));case`lavenderblush`:return new e(new j(255,240,245,1));case`lawngreen`:return new e(new j(124,252,0,1));case`lemonchiffon`:return new e(new j(255,250,205,1));case`lightblue`:return new e(new j(173,216,230,1));case`lightcoral`:return new e(new j(240,128,128,1));case`lightcyan`:return new e(new j(224,255,255,1));case`lightgoldenrodyellow`:return new e(new j(250,250,210,1));case`lightgray`:return new e(new j(211,211,211,1));case`lightgreen`:return new e(new j(144,238,144,1));case`lightgrey`:return new e(new j(211,211,211,1));case`lightpink`:return new e(new j(255,182,193,1));case`lightsalmon`:return new e(new j(255,160,122,1));case`lightseagreen`:return new e(new j(32,178,170,1));case`lightskyblue`:return new e(new j(135,206,250,1));case`lightslategray`:return new e(new j(119,136,153,1));case`lightslategrey`:return new e(new j(119,136,153,1));case`lightsteelblue`:return new e(new j(176,196,222,1));case`lightyellow`:return new e(new j(255,255,224,1));case`lime`:return new e(new j(0,255,0,1));case`limegreen`:return new e(new j(50,205,50,1));case`linen`:return new e(new j(250,240,230,1));case`magenta`:return new e(new j(255,0,255,1));case`maroon`:return new e(new j(128,0,0,1));case`mediumaquamarine`:return new e(new j(102,205,170,1));case`mediumblue`:return new e(new j(0,0,205,1));case`mediumorchid`:return new e(new j(186,85,211,1));case`mediumpurple`:return new e(new j(147,112,219,1));case`mediumseagreen`:return new e(new j(60,179,113,1));case`mediumslateblue`:return new e(new j(123,104,238,1));case`mediumspringgreen`:return new e(new j(0,250,154,1));case`mediumturquoise`:return new e(new j(72,209,204,1));case`mediumvioletred`:return new e(new j(199,21,133,1));case`midnightblue`:return new e(new j(25,25,112,1));case`mintcream`:return new e(new j(245,255,250,1));case`mistyrose`:return new e(new j(255,228,225,1));case`moccasin`:return new e(new j(255,228,181,1));case`navajowhite`:return new e(new j(255,222,173,1));case`navy`:return new e(new j(0,0,128,1));case`oldlace`:return new e(new j(253,245,230,1));case`olive`:return new e(new j(128,128,0,1));case`olivedrab`:return new e(new j(107,142,35,1));case`orange`:return new e(new j(255,165,0,1));case`orangered`:return new e(new j(255,69,0,1));case`orchid`:return new e(new j(218,112,214,1));case`palegoldenrod`:return new e(new j(238,232,170,1));case`palegreen`:return new e(new j(152,251,152,1));case`paleturquoise`:return new e(new j(175,238,238,1));case`palevioletred`:return new e(new j(219,112,147,1));case`papayawhip`:return new e(new j(255,239,213,1));case`peachpuff`:return new e(new j(255,218,185,1));case`peru`:return new e(new j(205,133,63,1));case`pink`:return new e(new j(255,192,203,1));case`plum`:return new e(new j(221,160,221,1));case`powderblue`:return new e(new j(176,224,230,1));case`purple`:return new e(new j(128,0,128,1));case`rebeccapurple`:return new e(new j(102,51,153,1));case`red`:return new e(new j(255,0,0,1));case`rosybrown`:return new e(new j(188,143,143,1));case`royalblue`:return new e(new j(65,105,225,1));case`saddlebrown`:return new e(new j(139,69,19,1));case`salmon`:return new e(new j(250,128,114,1));case`sandybrown`:return new e(new j(244,164,96,1));case`seagreen`:return new e(new j(46,139,87,1));case`seashell`:return new e(new j(255,245,238,1));case`sienna`:return new e(new j(160,82,45,1));case`silver`:return new e(new j(192,192,192,1));case`skyblue`:return new e(new j(135,206,235,1));case`slateblue`:return new e(new j(106,90,205,1));case`slategray`:return new e(new j(112,128,144,1));case`slategrey`:return new e(new j(112,128,144,1));case`snow`:return new e(new j(255,250,250,1));case`springgreen`:return new e(new j(0,255,127,1));case`steelblue`:return new e(new j(70,130,180,1));case`tan`:return new e(new j(210,180,140,1));case`teal`:return new e(new j(0,128,128,1));case`thistle`:return new e(new j(216,191,216,1));case`tomato`:return new e(new j(255,99,71,1));case`turquoise`:return new e(new j(64,224,208,1));case`violet`:return new e(new j(238,130,238,1));case`wheat`:return new e(new j(245,222,179,1));case`white`:return new e(new j(255,255,255,1));case`whitesmoke`:return new e(new j(245,245,245,1));case`yellow`:return new e(new j(255,255,0,1));case`yellowgreen`:return new e(new j(154,205,50,1));default:return null}}function f(t){let n=t.length;if(n===0||t.charCodeAt(0)!==35)return null;if(n===7)return new e(new j(16*p(t.charCodeAt(1))+p(t.charCodeAt(2)),16*p(t.charCodeAt(3))+p(t.charCodeAt(4)),16*p(t.charCodeAt(5))+p(t.charCodeAt(6)),1));if(n===9)return new e(new j(16*p(t.charCodeAt(1))+p(t.charCodeAt(2)),16*p(t.charCodeAt(3))+p(t.charCodeAt(4)),16*p(t.charCodeAt(5))+p(t.charCodeAt(6)),(16*p(t.charCodeAt(7))+p(t.charCodeAt(8)))/255));if(n===4){let n=p(t.charCodeAt(1)),r=p(t.charCodeAt(2)),i=p(t.charCodeAt(3));return new e(new j(16*n+n,16*r+r,16*i+i))}if(n===5){let n=p(t.charCodeAt(1)),r=p(t.charCodeAt(2)),i=p(t.charCodeAt(3)),a=p(t.charCodeAt(4));return new e(new j(16*n+n,16*r+r,16*i+i,(16*a+a)/255))}return null}t.parseHex=f;function p(e){switch(e){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(t.CSS||={})})(e.Format||={})})(Ho||={});function Uo(e){let t=[];for(let n of e){let e=Number(n);(e||e===0&&n.replace(/\s/g,``)!==``)&&t.push(e)}return t}function Wo(e,t,n,r){return{red:e/255,blue:n/255,green:t/255,alpha:r}}function Go(e,t){let n=t.index,r=t[0].length;if(n===void 0)return;let i=e.positionAt(n);return{startLineNumber:i.lineNumber,startColumn:i.column,endLineNumber:i.lineNumber,endColumn:i.column+r}}function Ko(e,t){if(!e)return;let n=Ho.Format.CSS.parseHex(t);if(n)return{range:e,color:Wo(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a)}}function qo(e,t,n){if(!e||t.length!==1)return;let r=Uo(t[0].values());return{range:e,color:Wo(r[0],r[1],r[2],n?r[3]:1)}}function Jo(e,t,n){if(!e||t.length!==1)return;let r=Uo(t[0].values()),i=new Ho(new Bo(r[0],r[1]/100,r[2]/100,n?r[3]:1));return{range:e,color:Wo(i.rgba.r,i.rgba.g,i.rgba.b,i.rgba.a)}}function Yo(e,t){return typeof e==`string`?[...e.matchAll(t)]:e.findMatches(t)}function Xo(e){let t=[],n=Yo(e,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%\/]*\))|^(#)([A-Fa-f0-9]{3})\b|^(#)([A-Fa-f0-9]{4})\b|^(#)([A-Fa-f0-9]{6})\b|^(#)([A-Fa-f0-9]{8})\b|(?<=['"\s])(#)([A-Fa-f0-9]{3})\b|(?<=['"\s])(#)([A-Fa-f0-9]{4})\b|(?<=['"\s])(#)([A-Fa-f0-9]{6})\b|(?<=['"\s])(#)([A-Fa-f0-9]{8})\b/gm);if(n.length>0)for(let r of n){let n=r.filter(e=>e!==void 0),i=n[1],a=n[2];if(!a)continue;let o;i===`rgb`?o=qo(Go(e,r),Yo(a,/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*[\s,]\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*[\s,]\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm),!1):i===`rgba`?o=qo(Go(e,r),Yo(a,/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*[\s,]\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*[\s,]\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*(?:[\s,]|[\s]*\/)\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm),!0):i===`hsl`?o=Jo(Go(e,r),Yo(a,/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100(?:\.0+)?|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100(?:\.0+)?|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm),!1):i===`hsla`?o=Jo(Go(e,r),Yo(a,/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100(?:\.0+)?|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100(?:\.0+)?|\d{1,2}[.]\d*|\d{1,2})%\s*(?:[\s,]|[\s]*\/)\s*(0[.][0-9]+|[.][0-9]+|[01][.]0*|[01])\s*\)$/gm),!0):i===`#`&&(o=Ko(Go(e,r),i+a)),o&&t.push(o)}return t}function Zo(e){return!e||typeof e.getValue!=`function`||typeof e.positionAt!=`function`?[]:Xo(e)}let Qo=/^-+|-+$/g;function $o(e,t){let n=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){let r=es(e,t);n=n.concat(r)}if(t.findMarkSectionHeaders){let r=ts(e,t);n=n.concat(r)}return n}function es(e,t){let n=[],r=e.getLineCount();for(let i=1;i<=r;i++){let r=e.getLineContent(i),a=r.match(t.foldingRules.markers.start);if(a){let e={startLineNumber:i,startColumn:a[0].length+1,endLineNumber:i,endColumn:r.length+1};if(e.endColumn>e.startColumn){let t={range:e,...ns(r.substring(a[0].length)),shouldBeInComments:!1};(t.text||t.hasSeparatorLine)&&n.push(t)}}}return n}function ts(e,t){let n=[],r=e.getLineCount();if(!t.markSectionHeaderRegex||t.markSectionHeaderRegex.trim()===``)return n;let i=Ti(t.markSectionHeaderRegex),a=new RegExp(t.markSectionHeaderRegex,`gdm${i?`s`:``}`);if(nt(a))return n;for(let t=1;t<=r;t+=95){let i=Math.min(t+100-1,r),o=[];for(let n=t;n<=i;n++)o.push(e.getLineContent(n));let s=o.join(`
28
+ `);a.lastIndex=0;let c;for(;(c=a.exec(s))!==null;){let e=s.substring(0,c.index),r=(e.match(/\n/g)||[]).length,i=t+r,o=c[0].split(`
29
+ `),l=o.length,u=i+l-1,d=e.lastIndexOf(`
30
+ `)+1,f=c.index-d+1,p=o[o.length-1],m={range:{startLineNumber:i,startColumn:f,endLineNumber:u,endColumn:l===1?f+c[0].length:p.length+1},text:(c.groups??{}).label??``,hasSeparatorLine:((c.groups??{}).separator??``)!==``,shouldBeInComments:!0};(m.text||m.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber<m.range.startLineNumber)&&n.push(m),a.lastIndex=c.index+c[0].length}}return n}function ns(e){e=e.trim();let t=e.startsWith(`-`);return e=e.replace(Qo,``),{text:e,hasSeparatorLine:t}}(function(){let e=globalThis;typeof e.requestIdleCallback!=`function`||e.cancelIdleCallback})();var rs=class{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,t)=>{this.completeCallback=e,this.errorCallback=t})}complete(e){return this.isSettled?Promise.resolve():new Promise(t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()})}error(e){return this.isSettled?Promise.resolve():new Promise(t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()})}cancel(){return this.error(new h)}},is;(function(e){async function t(e){let t,n=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||=e})));if(t!==void 0)throw t;return n}e.settled=t;function n(e){return new Promise(async(t,n)=>{try{await e(t,n)}catch(e){n(e)}})}e.withAsyncBody=n})(is||={});var as=class{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){let t=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(t,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(let t of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(t,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new _(`ProducerConsumer: cannot produce after final value has been set`)}_resolveOrRejectDeferred(e,t){t.ok?e.complete(t.value):e.error(t.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){let e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}{let e=new rs;return this._unsatisfiedConsumers.push(e),e.p}}};(class e{constructor(e,t){this._onReturn=t,this._producerConsumer=new as,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async e=>(this._finishError(e),{done:!0,value:void 0})},queueMicrotask(async()=>{let t=e({emitOne:e=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:e}}),emitMany:e=>{for(let t of e)this._producerConsumer.produce({ok:!0,value:{done:!1,value:t}})},reject:e=>this._finishError(e)});if(!this._producerConsumer.hasFinalValue)try{await t,this._finishOk()}catch(e){this._finishError(e)}})}static fromArray(t){return new e(e=>{e.emitMany(t)})}static fromPromise(t){return new e(async e=>{e.emitMany(await t)})}static fromPromisesResolveOrder(t){return new e(async e=>{await Promise.all(t.map(async t=>e.emitOne(await t)))})}static merge(t){return new e(async e=>{await Promise.all(t.map(async t=>{for await(let n of t)e.emitOne(n)}))})}static{this.EMPTY=e.fromArray([])}static map(t,n){return new e(async e=>{for await(let r of t)e.emitOne(n(r))})}static tee(t){let n,r,i=new rs,a=async()=>{if(!(!n||!r))try{for await(let e of t)n.emitOne(e),r.emitOne(e)}catch(e){n.reject(e),r.reject(e)}finally{i.complete()}};return[new e(async e=>(n=e,a(),i.p)),new e(async e=>(r=e,a(),i.p))]}map(t){return e.map(this,t)}static coalesce(t){return e.filter(t,e=>!!e)}coalesce(){return e.coalesce(this)}static filter(t,n){return new e(async e=>{for await(let r of t)n(r)&&e.emitOne(r)})}filter(t){return e.filter(this,t)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}});var os=class{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=qt(e);let n=this.values,r=this.prefixSum,i=t.length;return i!==0&&(this.values=new Uint32Array(n.length+i),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+i),this.values.set(t,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=qt(e),t=qt(t),this.values[e]!==t&&(this.values[e]=t,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,t){e=qt(e),t=qt(t);let n=this.values,r=this.prefixSum;if(e>=n.length)return!1;let i=n.length-e;return t>=i&&(t=i),t!==0&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=qt(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;t===0&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,r=0,i=0,a=0;for(;t<=n;)if(r=t+(n-t)/2|0,i=this.prefixSum[r],a=i-this.values[r],e<a)n=r-1;else if(e>=i)t=r+1;else break;return new ss(r,e-a)}},ss=class{constructor(e,t){this.index=e,this.remainder=t,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}},cs=class{constructor(e,t,n,r){this._uri=e,this._lines=t,this._eol=n,this._versionId=r,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);let t=e.changes;for(let e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new T(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){let e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let r=0;r<t;r++)n[r]=this._lines[r].length+e;this._lineStarts=new os(n)}}_setLineText(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.setValue(e,this._lines[e].length+this._eol.length)}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1));return}this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t){if(t.length===0)return;let n=rt(t);if(n.length===1){this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]+this._lines[e.lineNumber-1].substring(e.column-1));return}n[n.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]);let r=new Uint32Array(n.length-1);for(let t=1;t<n.length;t++)this._lines.splice(e.lineNumber+t-1,0,n[t]),r[t-1]=n[t].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,r)}},ls=class{constructor(){this._models=Object.create(null)}getModel(e){return this._models[e]}getModels(){let e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}$acceptNewModel(e){this._models[e.url]=new us(Bn.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){this._models[e]&&this._models[e].onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}},us=class extends cs{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){let t=[];for(let n=0;n<this._lines.length;n++){let r=this._lines[n],i=this.offsetAt(new T(n+1,1)),a=r.matchAll(e);for(let e of a)(e.index||e.index===0)&&(e.index+=i),t.push(e)}return t}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,t){let n=Pi(e.column,Mi(t),this._lines[e.lineNumber-1],0);return n?new E(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn):null}words(e){let t=this._lines,n=this._wordenize.bind(this),r=0,i=``,a=0,o=[];return{*[Symbol.iterator](){for(;;)if(a<o.length){let e=i.substring(o[a].start,o[a].end);a+=1,yield e}else if(r<t.length)i=t[r],o=n(i,e),a=0,r+=1;else break}}}getLineWords(e,t){let n=this._lines[e-1],r=this._wordenize(n,t),i=[];for(let e of r)i.push({word:n.substring(e.start,e.end),startColumn:e.start+1,endColumn:e.end+1});return i}_wordenize(e,t){let n=[],r;for(t.lastIndex=0;(r=t.exec(e))&&r[0].length!==0;)n.push({start:r.index,end:r.index+r[0].length});return n}getValueInRange(e){if(e=this._validateRange(e),e.startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);let t=this._eol,n=e.startLineNumber-1,r=e.endLineNumber-1,i=[];i.push(this._lines[n].substring(e.startColumn-1));for(let e=n+1;e<r;e++)i.push(this._lines[e]);return i.push(this._lines[r].substring(0,e.endColumn-1)),i.join(t)}offsetAt(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getPrefixSum(e.lineNumber-2)+(e.column-1)}positionAt(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();let t=this._lineStarts.getIndexOf(e),n=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,n)}}_validateRange(e){let t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),n=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||n.lineNumber!==e.endLineNumber||n.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}:e}_validatePosition(e){if(!T.isIPosition(e))throw Error(`bad position`);let{lineNumber:t,column:n}=e,r=!1;if(t<1)t=1,n=1,r=!0;else if(t>this._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,r=!0;else{let e=this._lines[t-1].length+1;n<1?(n=1,r=!0):n>e&&(n=e,r=!0)}return r?{lineNumber:t,column:n}:e}},ds=class e{constructor(e=null){this._foreignModule=e,this._requestHandlerBrand=void 0,this._workerTextModelSyncServer=new ls}dispose(){}async $ping(){return`pong`}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,t){this._workerTextModelSyncServer.$acceptModelChanged(e,t)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,t,n){let r=this._getModel(e);return r?Ii.computeUnicodeHighlights(r,t,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,t){let n=this._getModel(e);return n?$o(n,t):[]}async $computeDiff(t,n,r,i){let a=this._getModel(t),o=this._getModel(n);if(!a||!o)return null;let s=await fs(i);return e.computeDiff(a,o,r,s)}static computeDiff(e,t,n,r){let i=e.getLinesContent(),a=t.getLinesContent(),o=r.computeDiff(i,a,n),s=o.changes.length>0?!1:this._modelsAreIdentical(e,t);function c(e){return e.map(e=>[e.original.startLineNumber,e.original.endLineNumberExclusive,e.modified.startLineNumber,e.modified.endLineNumberExclusive,e.innerChanges?.map(e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn])])}return{identical:s,quitEarly:o.hitTimeout,changes:c(o.changes),moves:o.moves.map(e=>[e.lineRangeMapping.original.startLineNumber,e.lineRangeMapping.original.endLineNumberExclusive,e.lineRangeMapping.modified.startLineNumber,e.lineRangeMapping.modified.endLineNumberExclusive,c(e.changes)])}}static _modelsAreIdentical(e,t){let n=e.getLineCount();if(n!==t.getLineCount())return!1;for(let r=1;r<=n;r++)if(e.getLineContent(r)!==t.getLineContent(r))return!1;return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(t,n,r){let i=this._getModel(t);if(!i)return n;let a=[],o;n=n.slice(0).sort((e,t)=>e.range&&t.range?E.compareRangesUsingStarts(e.range,t.range):!e.range-+!t.range);let s=0;for(let e=1;e<n.length;e++)E.getEndPosition(n[s].range).equals(E.getStartPosition(n[e].range))?(n[s].range=E.fromPositions(E.getStartPosition(n[s].range),E.getEndPosition(n[e].range)),n[s].text+=n[e].text):(s++,n[s]=n[e]);n.length=s+1;for(let{range:t,text:s,eol:c}of n){if(typeof c==`number`&&(o=c),E.isEmpty(t)&&!s)continue;let n=i.getValueInRange(t);if(s=s.replace(/\r\n|\n|\r/g,i.eol),n===s)continue;if(Math.max(s.length,n.length)>e._diffLimit){a.push({range:t,text:s});continue}let l=Vt(n,s,r),u=i.offsetAt(E.lift(t).getStartPosition());for(let e of l){let t=i.positionAt(u+e.originalStart),n=i.positionAt(u+e.originalStart+e.originalLength),r={text:s.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}};i.getValueInRange(r.range)!==r.text&&a.push(r)}}return typeof o==`number`&&a.push({eol:o,text:``,range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),a}async $computeLinks(e){let t=this._getModel(e);return t?nn(t):null}async $computeDefaultDocumentColors(e){let t=this._getModel(e);return t?Zo(t):null}static{this._suggestionsLimit=1e4}async $textualSuggest(t,n,r,i){let a=new Le,o=new RegExp(r,i),s=new Set;outer:for(let r of t){let t=this._getModel(r);if(t){for(let r of t.words(o))if(!(r===n||!isNaN(Number(r)))&&(s.add(r),s.size>e._suggestionsLimit))break outer}}return{words:Array.from(s),duration:a.elapsed()}}async $computeWordRanges(e,t,n,r){let i=this._getModel(e);if(!i)return Object.create(null);let a=new RegExp(n,r),o=Object.create(null);for(let e=t.startLineNumber;e<t.endLineNumber;e++){let t=i.getLineWords(e,a);for(let n of t){if(!isNaN(Number(n.word)))continue;let t=o[n.word];t||(t=[],o[n.word]=t),t.push({startLineNumber:e,startColumn:n.startColumn,endLineNumber:e,endColumn:n.endColumn})}}return o}async $navigateValueSet(e,t,n,r,i){let a=this._getModel(e);if(!a)return null;let o=new RegExp(r,i);t.startColumn===t.endColumn&&(t={startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn+1});let s=a.getValueInRange(t),c=a.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn},o);if(!c)return null;let l=a.getValueInRange(c);return rn.INSTANCE.navigateValueSet(t,s,c,l,n)}$fmr(e,t){if(!this._foreignModule||typeof this._foreignModule[e]!=`function`)return Promise.reject(Error(`Missing requestHandler or method: `+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}};typeof importScripts==`function`&&(globalThis.monaco=fi());function fs(e){switch(e){case`legacy`:return Ro.getLegacy();case`advanced`:return Ro.getDefault();case`advanced-external`:return Ro.getAdvancedExternal();case`advanced-wasm`:return Ro.getAdvancedWasm()}}var ps=class e{static{this.CHANNEL_NAME=`editorWorkerHost`}static getChannel(t){return t.getChannel(e.CHANNEL_NAME)}static setChannel(t,n){t.setChannel(e.CHANNEL_NAME,n)}};function ms(e){let t,n=kt(r=>{let i=ps.getChannel(r);return t=e({host:new Proxy({},{get(e,t,n){if(t!==`then`){if(typeof t!=`string`)throw Error(`Not supported`);return(...e)=>i.$fhr(t,e)}}}),getMirrorModels:()=>n.requestHandler.getModels()}),new ds(t)});return t}let hs=!1;function gs(){return hs}function _s(e){hs=!0,self.onmessage=t=>{ms(n=>e(n,t.data))}}self.onmessage=()=>{gs()||ms(()=>({}))};function vs(e){self.onmessage=()=>{_s((t,n)=>Object.create(e(t,n)))}}var ys=class e{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(t,n){for(let n of t)if(e.isIncremental(n)){let e=ws(n.range),t=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);let i=Math.max(e.start.line,0),a=Math.max(e.end.line,0),o=this._lineOffsets,s=Ss(n.text,!1,t);if(a-i===s.length)for(let e=0,t=s.length;e<t;e++)o[e+i+1]=s[e];else s.length<1e4?o.splice(i+1,a-i,...s):this._lineOffsets=o=o.slice(0,i+1).concat(s,o.slice(a+1));let c=n.text.length-(r-t);if(c!==0)for(let e=i+1+s.length,t=o.length;e<t;e++)o[e]=o[e]+c}else if(e.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw Error(`Unknown change event received`);this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Ss(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return{line:0,character:e};for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return e=this.ensureBeforeEOL(e,t[i]),{line:i,character:e-t[i]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line];if(e.character<=0)return n;let r=e.line+1<t.length?t[e.line+1]:this._content.length,i=Math.min(n+e.character,r);return this.ensureBeforeEOL(i,n)}getLineRange(e){let t=this.getLineOffsets();if(e>=t.length){let e=t.length-1;return{start:{line:e,character:0},end:{line:e,character:this._content.length-t[e]}}}if(e<0)return{start:{line:0,character:0},end:{line:0,character:0}};let n=t[e],r=e+1<t.length?t[e+1]:this._content.length,i=this.ensureBeforeEOL(r,n);return{start:{line:e,character:0},end:{line:e,character:i-n}}}getEOLCharacters(e){let t=this.getLineOffsets();if(e>=t.length||e<0)return``;let n=e+1<t.length?t[e+1]:this._content.length,r=this.ensureBeforeEOL(n,t[e]);return this._content.substring(r,n)}ensureBeforeEOL(e,t){for(;e>t&&Cs(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength==`number`)}static isFull(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range===void 0&&t.rangeLength===void 0}},bs;(function(e){function t(e,t,n,r){return new ys(e,t,n,r)}e.create=t;function n(e,t,n){if(e instanceof ys)return e.update(t,n),e;throw Error(`TextDocument.update: document must be created by TextDocument.create`)}e.update=n;function r(e,t){let n=e.getText(),r=xs(t.map(Ts),(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),i=0,a=[];for(let t of r){let r=e.offsetAt(t.range.start);if(r<i)throw Error(`Overlapping edit`);r>i&&a.push(n.substring(i,r)),t.newText.length&&a.push(t.newText),i=e.offsetAt(t.range.end)}return a.push(n.substr(i)),a.join(``)}e.applyEdits=r})(bs||={});function xs(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);xs(r,t),xs(i,t);let a=0,o=0,s=0;for(;a<r.length&&o<i.length;)t(r[a],i[o])<=0?e[s++]=r[a++]:e[s++]=i[o++];for(;a<r.length;)e[s++]=r[a++];for(;o<i.length;)e[s++]=i[o++];return e}function Ss(e,t,n=0){let r=t?[n]:[];for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);Cs(i)&&(i===13&&t+1<e.length&&e.charCodeAt(t+1)===10&&t++,r.push(n+t+1))}return r}function Cs(e){return e===13||e===10}function ws(e){let t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Ts(e){let t=ws(e.range);return t===e.range?e:{newText:e.newText,range:t}}function Es(e,t=!1){let n=e.length,r=0,i=``,a=0,o=16,s=0,c=0,l=0,u=0,d=0;function f(t,n){let i=0,a=0;for(;i<t||!n;){let t=e.charCodeAt(r);if(t>=48&&t<=57)a=a*16+t-48;else if(t>=65&&t<=70)a=a*16+t-65+10;else if(t>=97&&t<=102)a=a*16+t-97+10;else break;r++,i++}return i<t&&(a=-1),a}function p(e){r=e,i=``,a=0,o=16,d=0}function m(){let t=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&ks(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46){if(r++,r<e.length&&ks(e.charCodeAt(r)))for(r++;r<e.length&&ks(e.charCodeAt(r));)r++;else return d=3,e.substring(t,r)}let n=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101)){if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&ks(e.charCodeAt(r))){for(r++;r<e.length&&ks(e.charCodeAt(r));)r++;n=r}else d=3}return e.substring(t,n)}function h(){let t=``,i=r;for(;;){if(r>=n){t+=e.substring(i,r),d=2;break}let a=e.charCodeAt(r);if(a===34){t+=e.substring(i,r),r++;break}if(a===92){if(t+=e.substring(i,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+=`"`;break;case 92:t+=`\\`;break;case 47:t+=`/`;break;case 98:t+=`\b`;break;case 102:t+=`\f`;break;case 110:t+=`
31
+ `;break;case 114:t+=`\r`;break;case 116:t+=` `;break;case 117:let e=f(4,!0);e>=0?t+=String.fromCharCode(e):d=4;break;default:d=5}i=r;continue}if(a>=0&&a<=31){if(Os(a)){t+=e.substring(i,r),d=2;break}d=6}r++}return t}function g(){if(i=``,d=0,a=r,c=s,u=l,r>=n)return a=n,o=17;let t=e.charCodeAt(r);if(Ds(t)){do r++,i+=String.fromCharCode(t),t=e.charCodeAt(r);while(Ds(t));return o=15}if(Os(t))return r++,i+=String.fromCharCode(t),t===13&&e.charCodeAt(r)===10&&(r++,i+=`
32
+ `),s++,l=r,o=14;switch(t){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=h(),o=10;case 47:let c=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!Os(e.charCodeAt(r));)r++;return i=e.substring(c,r),o=12}if(e.charCodeAt(r+1)===42){r+=2;let t=n-1,a=!1;for(;r<t;){let t=e.charCodeAt(r);if(t===42&&e.charCodeAt(r+1)===47){r+=2,a=!0;break}r++,Os(t)&&(t===13&&e.charCodeAt(r)===10&&r++,s++,l=r)}return a||(r++,d=1),i=e.substring(c,r),o=13}return i+=String.fromCharCode(t),r++,o=16;case 45:if(i+=String.fromCharCode(t),r++,r===n||!ks(e.charCodeAt(r)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=m(),o=11;default:for(;r<n&&_(t);)r++,t=e.charCodeAt(r);if(a!==r){switch(i=e.substring(a,r),i){case`true`:return o=8;case`false`:return o=9;case`null`:return o=7}return o=16}return i+=String.fromCharCode(t),r++,o=16}}function _(e){if(Ds(e)||Os(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function v(){let e;do e=g();while(e>=12&&e<=15);return e}return{setPosition:p,getPosition:()=>r,scan:t?v:g,getToken:()=>o,getTokenValue:()=>i,getTokenOffset:()=>a,getTokenLength:()=>r-a,getTokenStartLine:()=>c,getTokenStartCharacter:()=>a-u,getTokenError:()=>d}}function Ds(e){return e===32||e===9}function Os(e){return e===10||e===13}function ks(e){return e>=48&&e<=57}var As;(function(e){e[e.lineFeed=10]=`lineFeed`,e[e.carriageReturn=13]=`carriageReturn`,e[e.space=32]=`space`,e[e._0=48]=`_0`,e[e._1=49]=`_1`,e[e._2=50]=`_2`,e[e._3=51]=`_3`,e[e._4=52]=`_4`,e[e._5=53]=`_5`,e[e._6=54]=`_6`,e[e._7=55]=`_7`,e[e._8=56]=`_8`,e[e._9=57]=`_9`,e[e.a=97]=`a`,e[e.b=98]=`b`,e[e.c=99]=`c`,e[e.d=100]=`d`,e[e.e=101]=`e`,e[e.f=102]=`f`,e[e.g=103]=`g`,e[e.h=104]=`h`,e[e.i=105]=`i`,e[e.j=106]=`j`,e[e.k=107]=`k`,e[e.l=108]=`l`,e[e.m=109]=`m`,e[e.n=110]=`n`,e[e.o=111]=`o`,e[e.p=112]=`p`,e[e.q=113]=`q`,e[e.r=114]=`r`,e[e.s=115]=`s`,e[e.t=116]=`t`,e[e.u=117]=`u`,e[e.v=118]=`v`,e[e.w=119]=`w`,e[e.x=120]=`x`,e[e.y=121]=`y`,e[e.z=122]=`z`,e[e.A=65]=`A`,e[e.B=66]=`B`,e[e.C=67]=`C`,e[e.D=68]=`D`,e[e.E=69]=`E`,e[e.F=70]=`F`,e[e.G=71]=`G`,e[e.H=72]=`H`,e[e.I=73]=`I`,e[e.J=74]=`J`,e[e.K=75]=`K`,e[e.L=76]=`L`,e[e.M=77]=`M`,e[e.N=78]=`N`,e[e.O=79]=`O`,e[e.P=80]=`P`,e[e.Q=81]=`Q`,e[e.R=82]=`R`,e[e.S=83]=`S`,e[e.T=84]=`T`,e[e.U=85]=`U`,e[e.V=86]=`V`,e[e.W=87]=`W`,e[e.X=88]=`X`,e[e.Y=89]=`Y`,e[e.Z=90]=`Z`,e[e.asterisk=42]=`asterisk`,e[e.backslash=92]=`backslash`,e[e.closeBrace=125]=`closeBrace`,e[e.closeBracket=93]=`closeBracket`,e[e.colon=58]=`colon`,e[e.comma=44]=`comma`,e[e.dot=46]=`dot`,e[e.doubleQuote=34]=`doubleQuote`,e[e.minus=45]=`minus`,e[e.openBrace=123]=`openBrace`,e[e.openBracket=91]=`openBracket`,e[e.plus=43]=`plus`,e[e.slash=47]=`slash`,e[e.formFeed=12]=`formFeed`,e[e.tab=9]=`tab`})(As||={}),Array(20).fill(0).map((e,t)=>` `.repeat(t)),Array(200).fill(0).map((e,t)=>`
33
+ `+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\r`+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\r
34
+ `+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`
35
+ `+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\r`+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\r
36
+ `+` `.repeat(t));var js;(function(e){e.DEFAULT={allowTrailingComma:!1}})(js||={});function Ms(e,t=[],n=js.DEFAULT){let r=null,i=[],a=[];function o(e){Array.isArray(i)?i.push(e):r!==null&&(i[r]=e)}return Is(e,{onObjectBegin:()=>{let e={};o(e),a.push(i),i=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{i=a.pop()},onArrayBegin:()=>{let e=[];o(e),a.push(i),i=e,r=null},onArrayEnd:()=>{i=a.pop()},onLiteralValue:o,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n),i[0]}function Ns(e){switch(e.type){case`array`:return e.children.map(Ns);case`object`:let t=Object.create(null);for(let n of e.children){let e=n.children[1];e&&(t[n.children[0].value]=Ns(e))}return t;case`null`:case`string`:case`number`:case`boolean`:return e.value;default:return}}function Ps(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}function Fs(e,t,n=!1){if(Ps(e,t,n)){let r=e.children;if(Array.isArray(r))for(let e=0;e<r.length&&r[e].offset<=t;e++){let i=Fs(r[e],t,n);if(i)return i}return e}}function Is(e,t,n=js.DEFAULT){let r=Es(e,!1),i=[],a=0;function o(e){return e?()=>a===0&&e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function s(e){return e?t=>a===0&&e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function c(e){return e?t=>a===0&&e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function l(e){return e?()=>{a>0?a++:e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice())===!1&&(a=1)}:()=>!0}function u(e){return e?()=>{a>0&&a--,a===0&&e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}let d=l(t.onObjectBegin),f=c(t.onObjectProperty),p=u(t.onObjectEnd),m=l(t.onArrayBegin),h=u(t.onArrayEnd),g=c(t.onLiteralValue),_=s(t.onSeparator),v=o(t.onComment),y=s(t.onError),b=n&&n.disallowComments,x=n&&n.allowTrailingComma;function S(){for(;;){let e=r.scan();switch(r.getTokenError()){case 4:C(14);break;case 5:C(15);break;case 3:C(13);break;case 1:b||C(11);break;case 2:C(12);break;case 6:C(16)}switch(e){case 12:case 13:b?C(10):v();break;case 16:C(1);break;case 15:case 14:break;default:return e}}}function C(e,t=[],n=[]){if(y(e),t.length+n.length>0){let e=r.getToken();for(;e!==17;){if(t.indexOf(e)!==-1){S();break}if(n.indexOf(e)!==-1)break;e=S()}}}function ee(e){let t=r.getTokenValue();return e?g(t):(f(t),i.push(t)),S(),!0}function te(){switch(r.getToken()){case 11:let e=r.getTokenValue(),t=Number(e);isNaN(t)&&(C(2),t=0),g(t);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return S(),!0}function ne(){return r.getToken()===10?(ee(!1),r.getToken()===6?(_(`:`),S(),ae()||C(4,[],[2,5])):C(5,[],[2,5]),i.pop(),!0):(C(3,[],[2,5]),!1)}function re(){d(),S();let e=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(e||C(4,[],[]),_(`,`),S(),r.getToken()===2&&x)break}else e&&C(6,[],[]);ne()||C(4,[],[2,5]),e=!0}return p(),r.getToken()===2?S():C(7,[2],[]),!0}function ie(){m(),S();let e=!0,t=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(t||C(4,[],[]),_(`,`),S(),r.getToken()===4&&x)break}else t&&C(6,[],[]);e?(i.push(0),e=!1):i[i.length-1]++,ae()||C(4,[],[4,5]),t=!0}return h(),e||i.pop(),r.getToken()===4?S():C(8,[4],[]),!0}function ae(){switch(r.getToken()){case 3:return ie();case 1:return re();case 10:return ee(!0);default:return te()}}return S(),r.getToken()===17?n.allowEmptyContent?!0:(C(4,[],[]),!1):ae()?(r.getToken()!==17&&C(9,[],[]),!0):(C(4,[],[]),!1)}var Ls;(function(e){e[e.None=0]=`None`,e[e.UnexpectedEndOfComment=1]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=2]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=3]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=4]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=5]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=6]=`InvalidCharacter`})(Ls||={});var Rs;(function(e){e[e.OpenBraceToken=1]=`OpenBraceToken`,e[e.CloseBraceToken=2]=`CloseBraceToken`,e[e.OpenBracketToken=3]=`OpenBracketToken`,e[e.CloseBracketToken=4]=`CloseBracketToken`,e[e.CommaToken=5]=`CommaToken`,e[e.ColonToken=6]=`ColonToken`,e[e.NullKeyword=7]=`NullKeyword`,e[e.TrueKeyword=8]=`TrueKeyword`,e[e.FalseKeyword=9]=`FalseKeyword`,e[e.StringLiteral=10]=`StringLiteral`,e[e.NumericLiteral=11]=`NumericLiteral`,e[e.LineCommentTrivia=12]=`LineCommentTrivia`,e[e.BlockCommentTrivia=13]=`BlockCommentTrivia`,e[e.LineBreakTrivia=14]=`LineBreakTrivia`,e[e.Trivia=15]=`Trivia`,e[e.Unknown=16]=`Unknown`,e[e.EOF=17]=`EOF`})(Rs||={});let zs=Ms,Bs=Fs,Vs=Ns;var Hs;(function(e){e[e.InvalidSymbol=1]=`InvalidSymbol`,e[e.InvalidNumberFormat=2]=`InvalidNumberFormat`,e[e.PropertyNameExpected=3]=`PropertyNameExpected`,e[e.ValueExpected=4]=`ValueExpected`,e[e.ColonExpected=5]=`ColonExpected`,e[e.CommaExpected=6]=`CommaExpected`,e[e.CloseBraceExpected=7]=`CloseBraceExpected`,e[e.CloseBracketExpected=8]=`CloseBracketExpected`,e[e.EndOfFileExpected=9]=`EndOfFileExpected`,e[e.InvalidCommentToken=10]=`InvalidCommentToken`,e[e.UnexpectedEndOfComment=11]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=12]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=13]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=14]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=15]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=16]=`InvalidCharacter`})(Hs||={});var Us={975(e){function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function n(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===47)break;n=47}if(n===47){if(a!==s-1&&o!==1){if(a!==s-1&&o===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var c=r.lastIndexOf(`/`);if(c!==r.length-1){c===-1?(r=``,i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1}a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}var r={resolve:function(){for(var e,r=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),t(o),o.length!==0&&(r=o+`/`+r,i=o.charCodeAt(0)===47)}return r=n(r,!i),i?r.length>0?`/`+r:`/`:r.length>0?r:`.`},normalize:function(e){if(t(e),e.length===0)return`.`;var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=n(e,!r)).length!==0||r||(e=`.`),e.length>0&&i&&(e+=`/`),r?`/`+e:e},isAbsolute:function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(e===void 0?e=i:e+=`/`+i)}return e===void 0?`.`:r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return``;for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var a=e.length,o=a-i,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var c=n.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(n.charCodeAt(s+d)===47)return n.slice(s+d+1);if(d===0)return n.slice(s+d)}else o>l&&(e.charCodeAt(i+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(i+d);if(f!==n.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=i+u+1;d<=a;++d)d!==a&&e.charCodeAt(d)!==47||(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+n.slice(s+u):(s+=u,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),e.length===0)return`.`;for(var n=e.charCodeAt(0),r=n===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((n=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},basename:function(e,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);t(e);var r,i=0,a=-1,o=!0;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return``;var s=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(l===47){if(!o){i=r+1;break}}else c===-1&&(o=!1,c=r+1),s>=0&&(l===n.charCodeAt(s)?--s===-1&&(a=r):(s=-1,a=c))}return i===a?a=c:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c!==47)i===-1&&(a=!1,i=s+1),c===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1);else if(!a){r=s+1;break}}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},format:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r}(0,e)},parse:function(e){t(e);var n={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return n;var r,i=e.charCodeAt(0),a=i===47;a?(n.root=`/`,r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if((i=e.charCodeAt(u))!==47)c===-1&&(l=!1,c=u+1),i===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1);else if(!l){s=u+1;break}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(n.base=n.name=s===0&&a?e.slice(1,c):e.slice(s,c)):(s===0&&a?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(s,o),n.base=e.slice(s,c)),n.ext=e.slice(o,c)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir=`/`),n},sep:`/`,delimiter:`:`,win32:null,posix:null};r.posix=r,e.exports=r}},Ws={};function Gs(e){var t=Ws[e];if(t!==void 0)return t.exports;var n=Ws[e]={exports:{}};return Us[e](n,n.exports,Gs),n.exports}let Ks;Gs.d=(e,t)=>{for(var n in t)Gs.o(t,n)&&!Gs.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},Gs.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),typeof process==`object`?Ks=process.platform===`win32`:typeof navigator==`object`&&(Ks=navigator.userAgent.indexOf(`Windows`)>=0);let qs=/^\w[\w\d+.-]*$/,Js=/^\//,Ys=/^\/\//;function Xs(e,t){if(!e.scheme&&t)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!qs.test(e.scheme))throw Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!Js.test(e.path))throw Error(`[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character`)}else if(Ys.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}let Zs=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;var Qs=class e{static isUri(t){return t instanceof e||!!t&&typeof t.authority==`string`&&typeof t.fragment==`string`&&typeof t.path==`string`&&typeof t.query==`string`&&typeof t.scheme==`string`&&typeof t.fsPath==`string`&&typeof t.with==`function`&&typeof t.toString==`function`}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=function(e,t){return e||t?e:`file`}(e,a),this.authority=t||``,this.path=function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t}(this.scheme,n||``),this.query=r||``,this.fragment=i||``,Xs(this,a))}get fsPath(){return ic(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new ec(t,n,r,i,a)}static parse(e,t=!1){let n=Zs.exec(e);return n?new ec(n[2]||``,cc(n[4]||``),cc(n[5]||``),cc(n[7]||``),cc(n[9]||``),t):new ec(``,``,``,``,``)}static file(e){let t=``;if(Ks&&(e=e.replace(/\\/g,`/`)),e[0]===`/`&&e[1]===`/`){let n=e.indexOf(`/`,2);n===-1?(t=e.substring(2),e=`/`):(t=e.substring(2,n),e=e.substring(n)||`/`)}return new ec(`file`,t,e,``,``)}static from(e){let t=new ec(e.scheme,e.authority,e.path,e.query,e.fragment);return Xs(t,!0),t}toString(e=!1){return ac(this,e)}toJSON(){return this}static revive(t){if(t){if(t instanceof e)return t;{let e=new ec(t);return e._formatted=t.external,e._fsPath=t._sep===$s?t.fsPath:null,e}}return t}};let $s=Ks?1:void 0;var ec=class extends Qs{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=ic(this,!1),this._fsPath}toString(e=!1){return e?ac(this,!0):(this._formatted||=ac(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=$s),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}};let tc={58:`%3A`,47:`%2F`,63:`%3F`,35:`%23`,91:`%5B`,93:`%5D`,64:`%40`,33:`%21`,36:`%24`,38:`%26`,39:`%27`,40:`%28`,41:`%29`,42:`%2A`,43:`%2B`,44:`%2C`,59:`%3B`,61:`%3D`,32:`%20`};function nc(e,t,n){let r,i=-1;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=tc[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}function rc(e){let t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r===35||r===63?(t===void 0&&(t=e.substr(0,n)),t+=tc[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}function ic(e,t){let n;return n=e.authority&&e.path.length>1&&e.scheme===`file`?`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,Ks&&(n=n.replace(/\//g,`\\`)),n}function ac(e,t){let n=t?rc:nc,r=``,{scheme:i,authority:a,path:o,query:s,fragment:c}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),c&&(r+=`#`,r+=t?c:nc(c,!1,!1)),r}function oc(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+oc(e.substr(3)):e}}let sc=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function cc(e){return e.match(sc)?e.replace(sc,e=>oc(e)):e}var lc=Gs(975);let uc=lc.posix||lc;var dc;(function(e){e.joinPath=function(e,...t){return e.with({path:uc.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=uc.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=uc.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return uc.basename(e.path)},e.extname=function(e){return uc.extname(e.path)}})(dc||={});var fc;(function(e){function t(e){return typeof e==`string`}e.is=t})(fc||={});var pc;(function(e){function t(e){return typeof e==`string`}e.is=t})(pc||={});var mc;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(mc||={});var hc;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(hc||={});var gc;(function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=hc.MAX_VALUE),t===Number.MAX_VALUE&&(t=hc.MAX_VALUE),{line:e,character:t}}e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&P.uinteger(t.line)&&P.uinteger(t.character)}e.is=n})(gc||={});var M;(function(e){function t(e,t,n,r){if(P.uinteger(e)&&P.uinteger(t)&&P.uinteger(n)&&P.uinteger(r))return{start:gc.create(e,t),end:gc.create(n,r)};if(gc.is(e)&&gc.is(t))return{start:e,end:t};throw Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)}e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&gc.is(t.start)&&gc.is(t.end)}e.is=n})(M||={});var _c;(function(e){function t(e,t){return{uri:e,range:t}}e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&M.is(t.range)&&(P.string(t.uri)||P.undefined(t.uri))}e.is=n})(_c||={});var vc;(function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&M.is(t.targetRange)&&P.string(t.targetUri)&&M.is(t.targetSelectionRange)&&(M.is(t.originSelectionRange)||P.undefined(t.originSelectionRange))}e.is=n})(vc||={});var yc;(function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&P.numberRange(t.red,0,1)&&P.numberRange(t.green,0,1)&&P.numberRange(t.blue,0,1)&&P.numberRange(t.alpha,0,1)}e.is=n})(yc||={});var bc;(function(e){function t(e,t){return{range:e,color:t}}e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&M.is(t.range)&&yc.is(t.color)}e.is=n})(bc||={});var xc;(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&P.string(t.label)&&(P.undefined(t.textEdit)||kc.is(t))&&(P.undefined(t.additionalTextEdits)||P.typedArray(t.additionalTextEdits,kc.is))}e.is=n})(xc||={});var Sc;(function(e){e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`})(Sc||={});var Cc;(function(e){function t(e,t,n,r,i,a){let o={startLine:e,endLine:t};return P.defined(n)&&(o.startCharacter=n),P.defined(r)&&(o.endCharacter=r),P.defined(i)&&(o.kind=i),P.defined(a)&&(o.collapsedText=a),o}e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&P.uinteger(t.startLine)&&P.uinteger(t.startLine)&&(P.undefined(t.startCharacter)||P.uinteger(t.startCharacter))&&(P.undefined(t.endCharacter)||P.uinteger(t.endCharacter))&&(P.undefined(t.kind)||P.string(t.kind))}e.is=n})(Cc||={});var wc;(function(e){function t(e,t){return{location:e,message:t}}e.create=t;function n(e){let t=e;return P.defined(t)&&_c.is(t.location)&&P.string(t.message)}e.is=n})(wc||={});var N;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(N||={});var Tc;(function(e){e.Unnecessary=1,e.Deprecated=2})(Tc||={});var Ec;(function(e){function t(e){let t=e;return P.objectLiteral(t)&&P.string(t.href)}e.is=t})(Ec||={});var Dc;(function(e){function t(e,t,n,r,i,a){let o={range:e,message:t};return P.defined(n)&&(o.severity=n),P.defined(r)&&(o.code=r),P.defined(i)&&(o.source=i),P.defined(a)&&(o.relatedInformation=a),o}e.create=t;function n(e){let t=e;return P.defined(t)&&M.is(t.range)&&(P.string(t.message)||Gc.is(t.message))&&(P.number(t.severity)||P.undefined(t.severity))&&(P.integer(t.code)||P.string(t.code)||P.undefined(t.code))&&(P.undefined(t.codeDescription)||P.string(t.codeDescription?.href))&&(P.string(t.source)||P.undefined(t.source))&&(P.undefined(t.relatedInformation)||P.typedArray(t.relatedInformation,wc.is))}e.is=n;function r(e){return P.string(e.message)}e.is3_17=r;function i(e){if(P.string(e.message))return e.message;if(Gc.is(e.message))return e.message.value;throw Error(`Unknown message type ${typeof e.message}`)}e.getMessageString=i})(Dc||={});var Oc;(function(e){function t(e,t,...n){let r={title:e,command:t};return P.defined(n)&&n.length>0&&(r.arguments=n),r}e.create=t;function n(e){let t=e;return P.defined(t)&&P.string(t.title)&&(t.tooltip===void 0||P.string(t.tooltip))&&P.string(t.command)}e.is=n})(Oc||={});var kc;(function(e){function t(e,t){return{range:e,newText:t}}e.replace=t;function n(e,t){return{range:{start:e,end:e},newText:t}}e.insert=n;function r(e){return{range:e,newText:``}}e.del=r;function i(e){let t=e;return P.objectLiteral(t)&&P.string(t.newText)&&M.is(t.range)}e.is=i})(kc||={});var Ac;(function(e){function t(e,t,n){let r={label:e};return t!==void 0&&(r.needsConfirmation=t),n!==void 0&&(r.description=n),r}e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&P.string(t.label)&&(P.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(P.string(t.description)||t.description===void 0)}e.is=n})(Ac||={});var jc;(function(e){function t(e){let t=e;return P.string(t)}e.is=t})(jc||={});var Mc;(function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}e.replace=t;function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}e.insert=n;function r(e,t){return{range:e,newText:``,annotationId:t}}e.del=r;function i(e){let t=e;return kc.is(t)&&(Ac.is(t.annotationId)||jc.is(t.annotationId))}e.is=i})(Mc||={});var Nc;(function(e){function t(e,t){return{textDocument:e,edits:t}}e.create=t;function n(e){let t=e;return P.defined(t)&&Vc.is(t.textDocument)&&Array.isArray(t.edits)}e.is=n})(Nc||={});var Pc;(function(e){function t(e,t,n){let r={kind:`create`,uri:e};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`create`&&P.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||P.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||P.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||jc.is(t.annotationId))}e.is=n})(Pc||={});var Fc;(function(e){function t(e,t,n,r){let i={kind:`rename`,oldUri:e,newUri:t};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(i.options=n),r!==void 0&&(i.annotationId=r),i}e.create=t;function n(e){let t=e;return t&&t.kind===`rename`&&P.string(t.oldUri)&&P.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||P.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||P.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||jc.is(t.annotationId))}e.is=n})(Fc||={});var Ic;(function(e){function t(e,t,n){let r={kind:`delete`,uri:e};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`delete`&&P.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||P.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||P.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||jc.is(t.annotationId))}e.is=n})(Ic||={});var Lc;(function(e){function t(e){let t=e;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(e=>P.string(e.kind)?Pc.is(e)||Fc.is(e)||Ic.is(e):Nc.is(e)))}e.is=t})(Lc||={});var Rc;(function(e){function t(e){let t=e;return P.objectLiteral(t)&&M.is(t.range)&&jl.isSnippet(t.snippet)&&(t.annotationId===void 0||Ac.is(t.annotationId)||jc.is(t.annotationId))}e.is=t})(Rc||={});var zc;(function(e){function t(e){return{uri:e}}e.create=t;function n(e){let t=e;return P.defined(t)&&P.string(t.uri)}e.is=n})(zc||={});var Bc;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return P.defined(t)&&P.string(t.uri)&&P.integer(t.version)}e.is=n})(Bc||={});var Vc;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return P.defined(t)&&P.string(t.uri)&&(t.version===null||P.integer(t.version))}e.is=n})(Vc||={});var Hc;(function(e){e.ABAP=`abap`,e.WindowsBat=`bat`,e.BibTeX=`bibtex`,e.Clojure=`clojure`,e.Coffeescript=`coffeescript`,e.C=`c`,e.CPP=`cpp`,e.CSharp=`csharp`,e.CSS=`css`,e.D=`d`,e.Delphi=`pascal`,e.Diff=`diff`,e.Dart=`dart`,e.Dockerfile=`dockerfile`,e.Elixir=`elixir`,e.Erlang=`erlang`,e.FSharp=`fsharp`,e.GitCommit=`git-commit`,e.GitRebase=`git-rebase`,e.Go=`go`,e.Groovy=`groovy`,e.Handlebars=`handlebars`,e.Haskell=`haskell`,e.HTML=`html`,e.Ini=`ini`,e.Java=`java`,e.JavaScript=`javascript`,e.JavaScriptReact=`javascriptreact`,e.JSON=`json`,e.LaTeX=`latex`,e.Less=`less`,e.Lua=`lua`,e.Makefile=`makefile`,e.Markdown=`markdown`,e.ObjectiveC=`objective-c`,e.ObjectiveCPP=`objective-cpp`,e.Pascal=`pascal`,e.Perl=`perl`,e.Perl6=`perl6`,e.PHP=`php`,e.Plaintext=`plaintext`,e.Powershell=`powershell`,e.Pug=`jade`,e.Python=`python`,e.R=`r`,e.Razor=`razor`,e.Ruby=`ruby`,e.Rust=`rust`,e.SCSS=`scss`,e.SASS=`sass`,e.Scala=`scala`,e.ShaderLab=`shaderlab`,e.ShellScript=`shellscript`,e.SQL=`sql`,e.Swift=`swift`,e.TypeScript=`typescript`,e.TypeScriptReact=`typescriptreact`,e.TeX=`tex`,e.VisualBasic=`vb`,e.XML=`xml`,e.XSL=`xsl`,e.YAML=`yaml`})(Hc||={});var Uc;(function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}e.create=t;function n(e){let t=e;return P.defined(t)&&P.string(t.uri)&&P.string(t.languageId)&&P.integer(t.version)&&P.string(t.text)}e.is=n})(Uc||={});var Wc;(function(e){e.PlainText=`plaintext`,e.Markdown=`markdown`;function t(t){let n=t;return n===e.PlainText||n===e.Markdown}e.is=t})(Wc||={});var Gc;(function(e){function t(e){let t=e;return P.objectLiteral(e)&&Wc.is(t.kind)&&P.string(t.value)}e.is=t})(Gc||={});var Kc;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Kc||={});var qc;(function(e){e.PlainText=1,e.Snippet=2})(qc||={});var Jc;(function(e){e.Deprecated=1})(Jc||={});var Yc;(function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}e.create=t;function n(e){let t=e;return t&&P.string(t.newText)&&M.is(t.insert)&&M.is(t.replace)}e.is=n})(Yc||={});var Xc;(function(e){e.asIs=1,e.adjustIndentation=2})(Xc||={});var Zc;(function(e){e.Replace=1,e.Merge=2})(Zc||={});var Qc;(function(e){function t(e){let t=e;return t&&(P.string(t.detail)||t.detail===void 0)&&(P.string(t.description)||t.description===void 0)}e.is=t})(Qc||={});var $c;(function(e){function t(e){return{label:e}}e.create=t})($c||={});var el;(function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t})(el||={});var tl;(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}e.fromPlainText=t;function n(e){let t=e;return P.string(t)||P.objectLiteral(t)&&P.string(t.language)&&P.string(t.value)}e.is=n})(tl||={});var nl;(function(e){function t(e){let t=e;return!!t&&P.objectLiteral(t)&&(Gc.is(t.contents)||tl.is(t.contents)||P.typedArray(t.contents,tl.is))&&(e.range===void 0||M.is(e.range))}e.is=t})(nl||={});var rl;(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t})(rl||={});var il;(function(e){function t(e,t,...n){let r={label:e};return P.defined(t)&&(r.documentation=t),r.parameters=P.defined(n)?n:[],r}e.create=t})(il||={});var al;(function(e){e.Text=1,e.Read=2,e.Write=3})(al||={});var ol;(function(e){function t(e,t){let n={range:e};return P.number(t)&&(n.kind=t),n}e.create=t})(ol||={});var sl;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(sl||={});var cl;(function(e){e.Deprecated=1})(cl||={});var ll;(function(e){function t(e,t,n,r,i){let a={name:e,kind:t,location:{uri:r,range:n}};return i&&(a.containerName=i),a}e.create=t})(ll||={});var ul;(function(e){function t(e,t,n,r){return r===void 0?{name:e,kind:t,location:{uri:n}}:{name:e,kind:t,location:{uri:n,range:r}}}e.create=t})(ul||={});var dl;(function(e){function t(e,t,n,r,i,a){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return a!==void 0&&(o.children=a),o}e.create=t;function n(e){let t=e;return t&&P.string(t.name)&&P.number(t.kind)&&M.is(t.range)&&M.is(t.selectionRange)&&(t.detail===void 0||P.string(t.detail))&&(t.deprecated===void 0||P.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=n})(dl||={});var fl;(function(e){e.Empty=``,e.QuickFix=`quickfix`,e.Refactor=`refactor`,e.RefactorExtract=`refactor.extract`,e.RefactorInline=`refactor.inline`,e.RefactorMove=`refactor.move`,e.RefactorRewrite=`refactor.rewrite`,e.Source=`source`,e.SourceOrganizeImports=`source.organizeImports`,e.SourceFixAll=`source.fixAll`,e.Notebook=`notebook`})(fl||={});var pl;(function(e){e.Invoked=1,e.Automatic=2})(pl||={});var ml;(function(e){function t(e,t,n){let r={diagnostics:e};return t!=null&&(r.only=t),n!=null&&(r.triggerKind=n),r}e.create=t;function n(e){let t=e;return P.defined(t)&&P.typedArray(t.diagnostics,Dc.is)&&(t.only===void 0||P.typedArray(t.only,P.string))&&(t.triggerKind===void 0||t.triggerKind===pl.Invoked||t.triggerKind===pl.Automatic)}e.is=n})(ml||={});var hl;(function(e){e.LLMGenerated=1;function t(t){return P.defined(t)&&t===e.LLMGenerated}e.is=t})(hl||={});var gl;(function(e){function t(e,t,n){let r={title:e},i=!0;return typeof t==`string`?(i=!1,r.kind=t):Oc.is(t)?r.command=t:r.edit=t,i&&n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return t&&P.string(t.title)&&(t.diagnostics===void 0||P.typedArray(t.diagnostics,Dc.is))&&(t.kind===void 0||P.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||Oc.is(t.command))&&(t.isPreferred===void 0||P.boolean(t.isPreferred))&&(t.edit===void 0||Lc.is(t.edit))&&(t.tags===void 0||P.typedArray(t.tags,hl.is))}e.is=n})(gl||={});var _l;(function(e){function t(e,t){let n={range:e};return P.defined(t)&&(n.data=t),n}e.create=t;function n(e){let t=e;return P.defined(t)&&M.is(t.range)&&(P.undefined(t.command)||Oc.is(t.command))}e.is=n})(_l||={});var vl;(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}e.create=t;function n(e){let t=e;return P.defined(t)&&P.uinteger(t.tabSize)&&P.boolean(t.insertSpaces)}e.is=n})(vl||={});var yl;(function(e){function t(e,t,n){return{range:e,target:t,data:n}}e.create=t;function n(e){let t=e;return P.defined(t)&&M.is(t.range)&&(P.undefined(t.target)||P.string(t.target))}e.is=n})(yl||={});var bl;(function(e){function t(e,t){return{range:e,parent:t}}e.create=t;function n(t){let n=t;return P.objectLiteral(n)&&M.is(n.range)&&(n.parent===void 0||e.is(n.parent))}e.is=n})(bl||={});var xl;(function(e){e.namespace=`namespace`,e.type=`type`,e.class=`class`,e.enum=`enum`,e.interface=`interface`,e.struct=`struct`,e.typeParameter=`typeParameter`,e.parameter=`parameter`,e.variable=`variable`,e.property=`property`,e.enumMember=`enumMember`,e.event=`event`,e.function=`function`,e.method=`method`,e.macro=`macro`,e.keyword=`keyword`,e.modifier=`modifier`,e.comment=`comment`,e.string=`string`,e.number=`number`,e.regexp=`regexp`,e.operator=`operator`,e.decorator=`decorator`,e.label=`label`})(xl||={});var Sl;(function(e){e.declaration=`declaration`,e.definition=`definition`,e.readonly=`readonly`,e.static=`static`,e.deprecated=`deprecated`,e.abstract=`abstract`,e.async=`async`,e.modification=`modification`,e.documentation=`documentation`,e.defaultLibrary=`defaultLibrary`})(Sl||={});var Cl;(function(e){function t(e){let t=e;return P.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId==`string`)&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==`number`)}e.is=t})(Cl||={});var wl;(function(e){function t(e,t){return{range:e,text:t}}e.create=t;function n(e){let t=e;return t!=null&&M.is(t.range)&&P.string(t.text)}e.is=n})(wl||={});var Tl;(function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}e.create=t;function n(e){let t=e;return t!=null&&M.is(t.range)&&P.boolean(t.caseSensitiveLookup)&&(P.string(t.variableName)||t.variableName===void 0)}e.is=n})(Tl||={});var El;(function(e){function t(e,t){return{range:e,expression:t}}e.create=t;function n(e){let t=e;return t!=null&&M.is(t.range)&&(P.string(t.expression)||t.expression===void 0)}e.is=n})(El||={});var Dl;(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}e.create=t;function n(e){let t=e;return P.defined(t)&&M.is(e.stoppedLocation)}e.is=n})(Dl||={});var Ol;(function(e){e.Type=1,e.Parameter=2;function t(e){return e===1||e===2}e.is=t})(Ol||={});var kl;(function(e){function t(e){return{value:e}}e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&(t.tooltip===void 0||P.string(t.tooltip)||Gc.is(t.tooltip))&&(t.location===void 0||_c.is(t.location))&&(t.command===void 0||Oc.is(t.command))}e.is=n})(kl||={});var Al;(function(e){function t(e,t,n){let r={position:e,label:t};return n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&gc.is(t.position)&&(P.string(t.label)||P.typedArray(t.label,kl.is))&&(t.kind===void 0||Ol.is(t.kind))&&t.textEdits===void 0||P.typedArray(t.textEdits,kc.is)&&(t.tooltip===void 0||P.string(t.tooltip)||Gc.is(t.tooltip))&&(t.paddingLeft===void 0||P.boolean(t.paddingLeft))&&(t.paddingRight===void 0||P.boolean(t.paddingRight))}e.is=n})(Al||={});var jl;(function(e){function t(e){return{kind:`snippet`,value:e}}e.createSnippet=t;function n(e){let t=e;return P.objectLiteral(t)&&t.kind===`snippet`&&P.string(t.value)}e.isSnippet=n})(jl||={});var Ml;(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}e.create=t})(Ml||={});var Nl;(function(e){function t(e){return{items:e}}e.create=t})(Nl||={});var Pl;(function(e){e.Invoked=1,e.Automatic=2})(Pl||={});var Fl;(function(e){function t(e,t){return{range:e,text:t}}e.create=t})(Fl||={});var Il;(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t})(Il||={});var Ll;(function(e){function t(e){let t=e;return P.objectLiteral(t)&&pc.is(t.uri)&&P.string(t.name)}e.is=t})(Ll||={});var Rl;(function(e){function t(e,t,n,r){return new zl(e,t,n,r)}e.create=t;function n(e){let t=e;return!!(P.defined(t)&&P.string(t.uri)&&(P.undefined(t.languageId)||P.string(t.languageId))&&P.uinteger(t.lineCount)&&P.func(t.getText)&&P.func(t.positionAt)&&P.func(t.offsetAt))}e.is=n;function r(e,t){let n=e.getText(),r=i(t,(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),a=n.length;for(let t=r.length-1;t>=0;t--){let i=r[t],o=e.offsetAt(i.range.start),s=e.offsetAt(i.range.end);if(s<=a)n=n.substring(0,o)+i.newText+n.substring(s,n.length);else throw Error(`Overlapping edit`);a=o}return n}e.applyEdits=r;function i(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),a=e.slice(n);i(r,t),i(a,t);let o=0,s=0,c=0;for(;o<r.length&&s<a.length;)t(r[o],a[s])<=0?e[c++]=r[o++]:e[c++]=a[s++];for(;o<r.length;)e[c++]=r[o++];for(;s<a.length;)e[c++]=a[s++];return e}})(Rl||={});var zl=class{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&=(e.push(r),!1);let i=t.charAt(r);n=i===`\r`||i===`
37
+ `,i===`\r`&&r+1<t.length&&t.charAt(r+1)===`
38
+ `&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return gc.create(0,e);for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return gc.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}},P;(function(e){let t=Object.prototype.toString;function n(e){return e!==void 0}e.defined=n;function r(e){return e===void 0}e.undefined=r;function i(e){return e===!0||e===!1}e.boolean=i;function a(e){return t.call(e)===`[object String]`}e.string=a;function o(e){return t.call(e)===`[object Number]`}e.number=o;function s(e,n,r){return t.call(e)===`[object Number]`&&n<=e&&e<=r}e.numberRange=s;function c(e){return t.call(e)===`[object Number]`&&-2147483648<=e&&e<=2147483647}e.integer=c;function l(e){return t.call(e)===`[object Number]`&&0<=e&&e<=2147483647}e.uinteger=l;function u(e){return t.call(e)===`[object Function]`}e.func=u;function d(e){return typeof e==`object`&&!!e}e.objectLiteral=d;function f(e,t){return Array.isArray(e)&&e.every(t)}e.typedArray=f})(P||={});var Bl;function F(...e){let t=e[0],n,r,i;if(typeof t==`string`)n=t,r=t,e.splice(0,1),i=!e||typeof e[0]!=`object`?e:e[0];else if(t instanceof Array){let n=e.slice(1);if(t.length!==n.length+1)throw Error(`expected a string as the first argument to l10n.t`);let r=t[0];for(let e=1;e<t.length;e++)r+=`{${e-1}}`+t[e];return F(r,...n)}else r=t.message,n=r,t.comment&&t.comment.length>0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(``):t.comment}`),i=t.args??{};let a=Bl?.[n];return a?typeof a==`string`?Hl(a,i):a.comment?Hl(a.message,i):Hl(r,i):Hl(r,i)}var Vl=/{([^}]+)}/g;function Hl(e,t){return Object.keys(t).length===0?e:e.replace(Vl,(e,n)=>t[n]??e)}var Ul=l(o(((e,t)=>{function n(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function r(e,t){for(var n=``,r=0,i=-1,a=0,o,s=0;s<=e.length;++s){if(s<e.length)o=e.charCodeAt(s);else if(o===47)break;else o=47;if(o===47){if(i!==s-1&&a!==1){if(i!==s-1&&a===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var c=n.lastIndexOf(`/`);if(c!==n.length-1){c===-1?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}}else if(n.length===2||n.length===1){n=``,r=0,i=s,a=0;continue}}t&&(n.length>0?n+=`/..`:n=`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1}i=s,a=0}else o===46&&a!==-1?++a:a=-1}return n}function i(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+e+r:r}var a={resolve:function(){for(var e=``,t=!1,i,a=arguments.length-1;a>=-1&&!t;a--){var o;a>=0?o=arguments[a]:(i===void 0&&(i=process.cwd()),o=i),n(o),o.length!==0&&(e=o+`/`+e,t=o.charCodeAt(0)===47)}return e=r(e,!t),t?e.length>0?`/`+e:`/`:e.length>0?e:`.`},normalize:function(e){if(n(e),e.length===0)return`.`;var t=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return e=r(e,!t),e.length===0&&!t&&(e=`.`),e.length>0&&i&&(e+=`/`),t?`/`+e:e},isAbsolute:function(e){return n(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var e,t=0;t<arguments.length;++t){var r=arguments[t];n(r),r.length>0&&(e===void 0?e=r:e+=`/`+r)}return e===void 0?`.`:a.normalize(e)},relative:function(e,t){if(n(e),n(t),e===t||(e=a.resolve(e),t=a.resolve(t),e===t))return``;for(var r=1;r<e.length&&e.charCodeAt(r)===47;++r);for(var i=e.length,o=i-r,s=1;s<t.length&&t.charCodeAt(s)===47;++s);for(var c=t.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(t.charCodeAt(s+d)===47)return t.slice(s+d+1);if(d===0)return t.slice(s+d)}else o>l&&(e.charCodeAt(r+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(r+d);if(f!==t.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=r+u+1;d<=i;++d)(d===i||e.charCodeAt(d)===47)&&(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+t.slice(s+u):(s+=u,t.charCodeAt(s)===47&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(n(e),e.length===0)return`.`;for(var t=e.charCodeAt(0),r=t===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if(t=e.charCodeAt(o),t===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},basename:function(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);n(e);var r=0,i=-1,a=!0,o;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return``;var s=t.length-1,c=-1;for(o=e.length-1;o>=0;--o){var l=e.charCodeAt(o);if(l===47){if(!a){r=o+1;break}}else c===-1&&(a=!1,c=o+1),s>=0&&(l===t.charCodeAt(s)?--s===-1&&(i=o):(s=-1,i=c))}return r===i?i=c:i===-1&&(i=e.length),e.slice(r,i)}for(o=e.length-1;o>=0;--o)if(e.charCodeAt(o)===47){if(!a){r=o+1;break}}else i===-1&&(a=!1,i=o+1);return i===-1?``:e.slice(r,i)},extname:function(e){n(e);for(var t=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c===47){if(!a){r=s+1;break}continue}i===-1&&(a=!1,i=s+1),c===46?t===-1?t=s:o!==1&&(o=1):t!==-1&&(o=-1)}return t===-1||i===-1||o===0||o===1&&t===i-1&&t===r+1?``:e.slice(t,i)},format:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return i(`/`,e)},parse:function(e){n(e);var t={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return t;var r=e.charCodeAt(0),i=r===47,a;i?(t.root=`/`,a=1):a=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=a;--u){if(r=e.charCodeAt(u),r===47){if(!l){s=u+1;break}continue}c===-1&&(l=!1,c=u+1),r===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1)}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(t.base=t.name=s===0&&i?e.slice(1,c):e.slice(s,c)):(s===0&&i?(t.name=e.slice(1,o),t.base=e.slice(1,c)):(t.name=e.slice(s,o),t.base=e.slice(s,c)),t.ext=e.slice(o,c)),s>0?t.dir=e.slice(0,s-1):i&&(t.dir=`/`),t},sep:`/`,delimiter:`:`,win32:null,posix:null};a.posix=a,t.exports=a}))(),1);let Wl=Symbol.for(`yaml.alias`),Gl=Symbol.for(`yaml.document`),Kl=Symbol.for(`yaml.map`),ql=Symbol.for(`yaml.pair`),Jl=Symbol.for(`yaml.scalar`),Yl=Symbol.for(`yaml.seq`),Xl=Symbol.for(`yaml.node.type`),Zl=e=>!!e&&typeof e==`object`&&e[Xl]===Wl,Ql=e=>!!e&&typeof e==`object`&&e[Xl]===Gl,$l=e=>!!e&&typeof e==`object`&&e[Xl]===Kl,eu=e=>!!e&&typeof e==`object`&&e[Xl]===ql,I=e=>!!e&&typeof e==`object`&&e[Xl]===Jl,tu=e=>!!e&&typeof e==`object`&&e[Xl]===Yl;function nu(e){if(e&&typeof e==`object`)switch(e[Xl]){case Kl:case Yl:return!0}return!1}function ru(e){if(e&&typeof e==`object`)switch(e[Xl]){case Wl:case Kl:case Jl:case Yl:return!0}return!1}let iu=e=>(I(e)||nu(e))&&!!e.anchor,au=Symbol(`break visit`),ou=Symbol(`skip children`),su=Symbol(`remove node`);function cu(e,t){let n=uu(t);Ql(e)?lu(null,e.contents,n,Object.freeze([e]))===su&&(e.contents=null):lu(null,e,n,Object.freeze([]))}cu.BREAK=au,cu.SKIP=ou,cu.REMOVE=su;function lu(e,t,n,r){let i=du(e,t,n,r);if(ru(i)||eu(i))return fu(e,r,i),lu(e,i,n,r);if(typeof i!=`symbol`){if(nu(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=lu(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===au)return au;else i===su&&(t.items.splice(e,1),--e)}}else if(eu(t)){r=Object.freeze(r.concat(t));let e=lu(`key`,t.key,n,r);if(e===au)return au;e===su&&(t.key=null);let i=lu(`value`,t.value,n,r);if(i===au)return au;i===su&&(t.value=null)}}return i}function uu(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function du(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if($l(t))return n.Map?.(e,t,r);if(tu(t))return n.Seq?.(e,t,r);if(eu(t))return n.Pair?.(e,t,r);if(I(t))return n.Scalar?.(e,t,r);if(Zl(t))return n.Alias?.(e,t,r)}function fu(e,t,n){let r=t[t.length-1];if(nu(r))r.items[e]=n;else if(eu(r))e===`key`?r.key=n:r.value=n;else if(Ql(r))r.contents=n;else{let e=Zl(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}let pu={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},mu=e=>e.replace(/[!,[\]{}]/g,e=>pu[e]);var hu=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+mu(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&ru(e.contents)){let t={};cu(e.contents,(e,n)=>{ru(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
39
+ `)}};hu.defaultYaml={explicit:!1,version:`1.2`},hu.defaultTags={"!!":`tag:yaml.org,2002:`};function gu(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function _u(e){let t=new Set;return cu(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function vu(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function yu(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=_u(e);let a=vu(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(I(t.node)||nu(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function bu(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=bu(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=bu(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=bu(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=bu(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function xu(e,t,n){if(Array.isArray(e))return e.map((e,t)=>xu(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!iu(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var Su=class{constructor(e){Object.defineProperty(this,Xl,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!Ql(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=xu(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?bu(i,{"":o},``,o):o}},Cu=class extends Su{constructor(e){super(Wl),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],cu(e,{Node:(e,t)=>{(Zl(t)||iu(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(xu(a,null,t),n.get(a)),o?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=wu(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(gu(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function wu(e,t,n){if(Zl(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(nu(t)){let r=0;for(let i of t.items){let t=wu(e,i,n);t>r&&(r=t)}return r}if(eu(t)){let r=wu(e,t.key,n),i=wu(e,t.value,n);return Math.max(r,i)}return 1}let Tu=e=>!e||typeof e!=`function`&&typeof e!=`object`;var L=class extends Su{constructor(e){super(Jl),this.value=e}toJSON(e,t){return t?.keep?this.value:xu(this.value,e,t)}toString(){return String(this.value)}};L.BLOCK_FOLDED=`BLOCK_FOLDED`,L.BLOCK_LITERAL=`BLOCK_LITERAL`,L.PLAIN=`PLAIN`,L.QUOTE_DOUBLE=`QUOTE_DOUBLE`,L.QUOTE_SINGLE=`QUOTE_SINGLE`;function Eu(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function Du(e,t,n){if(Ql(e)&&(e=e.contents),ru(e))return e;if(eu(e)){let t=n.schema[Kl].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new Cu(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=`tag:yaml.org,2002:`+t.slice(2));let l=Eu(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new L(e);return c&&(c.node=t),t}l=e instanceof Map?o[Kl]:Symbol.iterator in Object(e)?o[Yl]:o[Kl]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new L(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function Ou(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return Du(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}let ku=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done;var Au=class extends Su{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>ru(t)||eu(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(ku(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(nu(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,Ou(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(nu(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&I(i)?i.value:i:nu(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!eu(t))return!1;let n=t.value;return n==null||e&&I(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return nu(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(nu(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,Ou(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}};let ju=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function Mu(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}let Nu=(e,t,n)=>e.endsWith(`
40
+ `)?Mu(n,t):n.includes(`
41
+ `)?`
42
+ `+Mu(n,t):(e.endsWith(` `)?``:` `)+n,Pu=`flow`;function Fu(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===`block`&&(h=Iu(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===`quoted`&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===`
43
+ `)n===`block`&&(h=Iu(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
44
+ `&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==`
45
+ `&&t!==` `&&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`\n${t}${e.slice(0,a)}`:(n===`quoted`&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,a)}`)}return v}function Iu(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===` `;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
46
+ `);r=t,i=t+1,a=e[i]}return r}let Lu=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Ru=e=>/^(%|---|\.\.\.)/m.test(e);function zu(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
47
+ `){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function Bu(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(Ru(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length<i)e+=1;else{for(o+=n.slice(s,e)+`
48
+
49
+ `;n[e+2]===`\\`&&n[e+3]===`n`&&n[e+4]!==`"`;)o+=`
50
+ `,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:Fu(o,a,`quoted`,Lu(t,!1))}function Vu(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
51
+ `)||/[ \t]\n|\n[ \t]/.test(e))return Bu(e,t);let n=t.indent||(Ru(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:Fu(r,n,Pu,Lu(t,!1))}function Hu(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=Bu;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?Vu:i&&!t?Bu:n?Vu:Bu}return r(e,t)}let Uu;try{Uu=RegExp(`(^|(?<!
52
+ ))
53
+ +(?!
54
+ |$)`,`g`)}catch{Uu=/\n+(?!\n|$)/g}function Wu({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n))return Hu(n,r);let l=r.indent||(r.forceBlockIndent||Ru(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===L.BLOCK_FOLDED?!1:t===L.BLOCK_LITERAL||!zu(n,c,l.length);if(!n)return u?`|
55
+ `:`>
56
+ `;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
57
+ `&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
58
+ `);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&=(n=n.slice(0,-p.length),p[p.length-1]===`
59
+ `&&(p=p.slice(0,-1)),p.replace(Uu,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
60
+ `)_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&=(n=n.substring(v.length),v.replace(/\n+/g,`$&${l}`));let y=(h?l?`2`:`1`:``)+d;if(e&&(y+=` `+s(e.replace(/ ?[\r\n]+/g,` `)),i&&i()),!u){let e=n.replace(/\n+/g,`
61
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=Lu(r,!0);o!==`folded`&&t!==L.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=Fu(`${v}${e}${p}`,l,`block`,a);if(!i)return`>${y}\n${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}\n${l}${v}${n}${p}`}function Gu(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(`
62
+ `)||u&&/[[\]{},]/.test(a))return Hu(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
63
+ `)?Hu(a,t):Wu(e,t,n,r);if(!s&&!u&&i!==L.PLAIN&&a.includes(`
64
+ `))return Wu(e,t,n,r);if(Ru(a)){if(c===``)return t.forceBlockIndent=!0,Wu(e,t,n,r);if(s&&c===l)return Hu(a,t)}let d=a.replace(/\n+/g,`$&\n${c}`);if(o){let e=e=>e.default&&e.tag!==`tag:yaml.org,2002:str`&&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return Hu(a,t)}return s?d:Fu(d,c,Pu,Lu(t,!1))}function Ku(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==L.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=L.QUOTE_DOUBLE);let c=e=>{switch(e){case L.BLOCK_FOLDED:case L.BLOCK_LITERAL:return i||a?Hu(o.value,t):Wu(o,t,n,r);case L.QUOTE_DOUBLE:return Bu(o.value,t);case L.QUOTE_SINGLE:return Vu(o.value,t);case L.PLAIN:return Gu(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function qu(e,t){let n=Object.assign({blockQuote:!0,commentString:ju,defaultKeyType:null,defaultStringType:`PLAIN`,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:`false`,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:`null`,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function Ju(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(I(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function Yu(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(I(e)||nu(e))&&e.anchor;a&&gu(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function Xu(e,t,n,r){if(eu(e))return e.toString(t,n,r);if(Zl(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=ru(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=Ju(t.doc.schema.tags,a);let o=Yu(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify==`function`?i.stringify(a,t,n,r):I(a)?Ku(a,t,n,r):a.toString(t,n,r);return o?I(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}\n${t.indent}${s}`:s}function Zu({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=ru(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(nu(e)||!ru(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||nu(e)||(I(e)?e.type===L.BLOCK_FOLDED||e.type===L.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=Xu(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=Nu(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=Nu(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=Nu(g,n.indent,l(f))));let _,v,y;ru(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&I(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&tu(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=Xu(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
65
+ `:``,v){let e=l(v);S+=`\n${Mu(e,n.indent)}`}x===``&&!n.inFlow?S===`
66
+ `&&y&&(S=`
67
+
68
+ `):S+=`\n${n.indent}`}else if(!p&&nu(t)){let e=x[0],r=x.indexOf(`
69
+ `),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e===`&`||e===`!`)){let n=x.indexOf(` `);e===`&`&&n!==-1&&n<r&&x[n+1]===`!`&&(n=x.indexOf(` `,n+1)),(n===-1||r<n)&&(t=!0)}t||(S=`\n${n.indent}`)}}else(x===``||x[0]===`
70
+ `)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=Nu(g,n.indent,l(y)):h&&i&&i(),g}function Qu(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}let $u={identify:e=>e===`<<`||typeof e==`symbol`&&e.description===`<<`,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new L(Symbol(`<<`)),{addToJSMap:td}),stringify:()=>`<<`},ed=(e,t)=>($u.identify(t)||I(t)&&(!t.type||t.type===L.PLAIN)&&$u.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===$u.tag&&e.default);function td(e,t,n){let r=rd(e,n);if(tu(r))for(let n of r.items)nd(e,t,n);else if(Array.isArray(r))for(let n of r)nd(e,t,n);else nd(e,t,r)}function nd(e,t,n){let r=rd(e,n);if(!$l(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function rd(e,t){return e&&Zl(t)?t.resolve(e.doc,e):t}function id(e,t,{key:n,value:r}){if(ru(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(ed(e,n))td(e,t,r);else{let i=xu(n,``,e);if(t instanceof Map)t.set(i,xu(r,i,e));else if(t instanceof Set)t.add(i);else{let a=ad(n,i,e),o=xu(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function ad(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(ru(e)&&n?.doc){let t=qu(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),Qu(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function od(e,t,n){return new sd(Du(e,void 0,n),Du(t,void 0,n))}var sd=class e{constructor(e,t=null){Object.defineProperty(this,Xl,{value:ql}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return ru(n)&&(n=n.clone(t)),ru(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return id(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?Zu(this,e,t,n):JSON.stringify(this)}};function cd(e,t,n){return(t.inFlow??e.flow?ud:ld)(e,t,n)}function ld({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(ru(i))!d&&i.spaceBefore&&f.push(``),dd(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(eu(i)){let e=ru(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),dd(n,f,e.commentBefore,d))}d=!1;let s=Xu(i,u,()=>o=null,()=>d=!0);o&&(s+=Nu(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?`\n${c}${t}`:`
71
+ `}}return e?(p+=`
72
+ `+Mu(l(e),c),s&&s()):d&&o&&o(),p}function ud({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(ru(i))i.spaceBefore&&d.push(``),dd(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(eu(i)){let e=ru(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),dd(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=ru(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=Xu(i,c,()=>a=null);l||=d.length>u||o.includes(`
73
+ `),n<e.length-1?o+=`,`:t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+=`,`)),a&&(o+=Nu(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`\n${a}${i}${t}`:`
74
+ `;return`${e}\n${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function dd({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=Mu(t(r),e);n.push(i.trimStart())}}function fd(e,t){let n=I(t)?t.value:t;for(let r of e)if(eu(r)&&(r.key===t||r.key===n||I(r.key)&&r.key.value===n))return r}var pd=class extends Au{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(Kl,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(od(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=eu(e)?e:!e||typeof e!=`object`||!(`key`in e)?new sd(e,e?.value):new sd(e.key,e.value);let r=fd(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);I(r.value)&&Tu(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=fd(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=fd(this.items,e)?.value;return(!t&&I(n)?n.value:n)??void 0}has(e){return!!fd(this.items,e)}set(e,t){this.add(new sd(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)id(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!eu(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),cd(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}};let md={collection:`map`,default:!0,nodeClass:pd,tag:`tag:yaml.org,2002:map`,resolve(e,t){return $l(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>pd.from(e,t,n)};var hd=class extends Au{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(Yl,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=gd(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=gd(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&I(r)?r.value:r}has(e){let t=gd(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=gd(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];I(r)&&Tu(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(xu(e,String(r++),t));return n}toString(e,t,n){return e?cd(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(Du(a,void 0,n))}}return i}};function gd(e){let t=I(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}let _d={collection:`seq`,default:!0,nodeClass:hd,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return tu(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>hd.from(e,t,n)},vd={identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),Ku(e,t,n,r)}},yd={identify:e=>e==null,createNode:()=>new L(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new L(null),stringify:({source:e},t)=>typeof e==`string`&&yd.test.test(e)?e:t.options.nullStr},bd={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new L(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&bd.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function xd({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==`bigint`)return String(r);let i=typeof r==`number`?r:Number(r);if(!isFinite(i))return isNaN(i)?`.nan`:i<0?`-.inf`:`.inf`;let a=Object.is(r,-0)?`-0`:JSON.stringify(r);if(!e&&t&&(!n||n===`tag:yaml.org,2002:float`)&&/^-?\d/.test(a)&&!a.includes(`e`)){let e=a.indexOf(`.`);e<0&&(e=a.length,a+=`.`);let n=t-(a.length-e-1);for(;n-->0;)a+=`0`}return a}let Sd={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:xd},Cd={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():xd(e)}},wd={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new L(parseFloat(e)),n=e.indexOf(`.`);return n!==-1&&e[e.length-1]===`0`&&(t.minFractionDigits=e.length-n-1),t},stringify:xd},Td=e=>typeof e==`bigint`||Number.isInteger(e),Ed=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function Dd(e,t,n){let{value:r}=e;return Td(r)&&r>=0?n+r.toString(t):xd(e)}let Od={identify:e=>Td(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o[0-7]+$/,resolve:(e,t,n)=>Ed(e,2,8,n),stringify:e=>Dd(e,8,`0o`)},kd={identify:Td,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>Ed(e,0,10,n),stringify:xd},Ad={identify:e=>Td(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>Ed(e,2,16,n),stringify:e=>Dd(e,16,`0x`)},jd=[md,_d,vd,yd,bd,Od,kd,Ad,Sd,Cd,wd];function Md(e){return typeof e==`bigint`||Number.isInteger(e)}let Nd=({value:e})=>JSON.stringify(e),Pd=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:Nd},{identify:e=>e==null,createNode:()=>new L(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:Nd},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:Nd},{identify:Md,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>Md(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Nd}],Fd=[md,_d].concat(Pd,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),Id={identify:e=>e instanceof Uint8Array,default:!1,tag:`tag:yaml.org,2002:binary`,resolve(e,t){if(typeof atob==`function`){let t=atob(e.replace(/[\n\r]/g,``)),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}return t(`This environment does not support reading binary tags; either Buffer or atob is required`),e},stringify({comment:e,type:t,value:n},r,i,a){if(!n)return``;let o=n,s;if(typeof btoa==`function`){let e=``;for(let t=0;t<o.length;++t)e+=String.fromCharCode(o[t]);s=btoa(e)}else throw Error(`This environment does not support writing binary tags; either Buffer or btoa is required`);if(t??=L.BLOCK_LITERAL,t!==L.QUOTE_DOUBLE){let e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(s.length/e),i=Array(n);for(let t=0,r=0;t<n;++t,r+=e)i[t]=s.substr(r,e);s=i.join(t===L.BLOCK_LITERAL?`
75
+ `:` `)}return Ku({comment:e,type:t,value:s},r,i,a)}};function Ld(e,t){if(tu(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!eu(r)){if($l(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new sd(new L(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}\n${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}\n${t.comment}`:r.comment}r=e}e.items[n]=eu(r)?r:new sd(r)}}else t(`Expected a sequence for this tag`);return e}function Rd(e,t,n){let{replacer:r}=n,i=new hd(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(od(o,s,n))}return i}let zd={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:Ld,createNode:Rd};var Bd=class e extends hd{constructor(){super(),this.add=pd.prototype.add.bind(this),this.delete=pd.prototype.delete.bind(this),this.get=pd.prototype.get.bind(this),this.has=pd.prototype.has.bind(this),this.set=pd.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(eu(e)?(r=xu(e.key,``,t),i=xu(e.value,r,t)):r=xu(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=Rd(e,t,n),i=new this;return i.items=r.items,i}};Bd.tag=`tag:yaml.org,2002:omap`;let Vd={collection:`seq`,identify:e=>e instanceof Map,nodeClass:Bd,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=Ld(e,t),r=[];for(let{key:e}of n.items)I(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new Bd,n)},createNode:(e,t,n)=>Bd.from(e,t,n)};function Hd({value:e,source:t},n){return t&&(e?Ud:Wd).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}let Ud={identify:e=>e===!0,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new L(!0),stringify:Hd},Wd={identify:e=>e===!1,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new L(!1),stringify:Hd},Gd={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:xd},Kd={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,``)),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():xd(e)}},qd={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new L(parseFloat(e.replace(/_/g,``))),n=e.indexOf(`.`);if(n!==-1){let r=e.substring(n+1).replace(/_/g,``);r[r.length-1]===`0`&&(t.minFractionDigits=r.length)}return t},stringify:xd},Jd=e=>typeof e==`bigint`||Number.isInteger(e);function Yd(e,t,n,{intAsBigInt:r}){let i=e[0];if((i===`-`||i===`+`)&&(t+=1),e=e.substring(t).replace(/_/g,``),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return i===`-`?BigInt(-1)*t:t}let a=parseInt(e,n);return i===`-`?-1*a:a}function Xd(e,t,n){let{value:r}=e;if(Jd(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return xd(e)}let Zd={identify:Jd,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Yd(e,2,2,n),stringify:e=>Xd(e,2,`0b`)},Qd={identify:Jd,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Yd(e,1,8,n),stringify:e=>Xd(e,8,`0`)},$d={identify:Jd,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Yd(e,0,10,n),stringify:xd},ef={identify:Jd,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Yd(e,2,16,n),stringify:e=>Xd(e,16,`0x`)};var tf=class e extends pd{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=eu(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new sd(e.key,null):new sd(e,null),fd(this.items,t.key)||this.items.push(t)}get(e,t){let n=fd(this.items,e);return!t&&eu(n)?I(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=fd(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new sd(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(od(e,null,n));return i}};tf.tag=`tag:yaml.org,2002:set`;let nf={collection:`map`,identify:e=>e instanceof Set,nodeClass:tf,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>tf.from(e,t,n),resolve(e,t){if($l(e)){if(e.hasAllNullValues(!0))return Object.assign(new tf,e);t(`Set items must all have null values`)}else t(`Expected a mapping for this tag`);return e}};function rf(e,t){let n=e[0],r=n===`-`||n===`+`?e.substring(1):e,i=e=>t?BigInt(e):Number(e),a=r.replace(/_/g,``).split(`:`).reduce((e,t)=>e*i(60)+i(t),i(0));return n===`-`?i(-1)*a:a}function af(e){let{value:t}=e,n=e=>e;if(typeof t==`bigint`)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return xd(e);let r=``;t<0&&(r=`-`,t*=n(-1));let i=n(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),r+a.map(e=>String(e).padStart(2,`0`)).join(`:`).replace(/000000\d*$/,``)}let of={identify:e=>typeof e==`bigint`||Number.isInteger(e),default:!0,tag:`tag:yaml.org,2002:int`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>rf(e,n),stringify:af},sf={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>rf(e,!1),stringify:af},cf={identify:e=>e instanceof Date,default:!0,tag:`tag:yaml.org,2002:timestamp`,test:RegExp(`^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$`),resolve(e){let t=e.match(cf.test);if(!t)throw Error(`!!timestamp expects a date, starting with yyyy-mm-dd`);let[,n,r,i,a,o,s]=t.map(Number),c=t[7]?Number((t[7]+`00`).substr(1,3)):0,l=Date.UTC(n,r-1,i,a||0,o||0,s||0,c),u=t[8];if(u&&u!==`Z`){let e=rf(u,!1);Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,``)??``},lf=[md,_d,vd,yd,Ud,Wd,Zd,Qd,$d,ef,Gd,Kd,qd,Id,$u,Vd,zd,nf,of,sf,cf],uf=new Map([[`core`,jd],[`failsafe`,[md,_d,vd]],[`json`,Fd],[`yaml11`,lf],[`yaml-1.1`,lf]]),df={binary:Id,bool:bd,float:wd,floatExp:Cd,floatNaN:Sd,floatTime:sf,int:kd,intHex:Ad,intOct:Od,intTime:of,map:md,merge:$u,null:yd,omap:Vd,pairs:zd,seq:_d,set:nf,timestamp:cf},ff={"tag:yaml.org,2002:binary":Id,"tag:yaml.org,2002:merge":$u,"tag:yaml.org,2002:omap":Vd,"tag:yaml.org,2002:pairs":zd,"tag:yaml.org,2002:set":nf,"tag:yaml.org,2002:timestamp":cf};function pf(e,t,n){let r=uf.get(t);if(r&&!e)return n&&!r.includes($u)?r.concat($u):r.slice();let i=r;if(!i){if(Array.isArray(e))i=[];else{let e=Array.from(uf.keys()).filter(e=>e!==`yaml11`).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}}if(Array.isArray(e))for(let t of e)i=i.concat(t);else typeof e==`function`&&(i=e(i.slice()));return n&&(i=i.concat($u)),i.reduce((e,t)=>{let n=typeof t==`string`?df[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(df).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}let mf=(e,t)=>e.key<t.key?-1:+(e.key>t.key);var hf=class e{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?pf(e,`compat`):e?pf(null,e):null,this.name=typeof i==`string`&&i||`core`,this.knownTags=r?ff:{},this.tags=pf(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,Kl,{value:md}),Object.defineProperty(this,Jl,{value:vd}),Object.defineProperty(this,Yl,{value:_d}),this.sortMapEntries=typeof a==`function`?a:a===!0?mf:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function gf(e,t){let n=[],r=t.directives===!0;if(t.directives!==!1&&e.directives){let t=e.directives.toString(e);t?(n.push(t),r=!0):e.directives.docStart&&(r=!0)}r&&n.push(`---`);let i=qu(e,t),{commentString:a}=i.options;if(e.commentBefore){n.length!==1&&n.unshift(``);let t=a(e.commentBefore);n.unshift(Mu(t,``))}let o=!1,s=null;if(e.contents){if(ru(e.contents)){if(e.contents.spaceBefore&&r&&n.push(``),e.contents.commentBefore){let t=a(e.contents.commentBefore);n.push(Mu(t,``))}i.forceBlockIndent=!!e.comment,s=e.contents.comment}let t=s?void 0:()=>o=!0,c=Xu(e.contents,i,()=>s=null,t);s&&(c+=Nu(c,``,a(s))),(c[0]===`|`||c[0]===`>`)&&n[n.length-1]===`---`?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(Xu(e.contents,i));if(e.directives?.docEnd){if(e.comment){let t=a(e.comment);t.includes(`
76
+ `)?(n.push(`...`),n.push(Mu(t,``))):n.push(`... ${t}`)}else n.push(`...`)}else{let t=e.comment;t&&o&&(t=t.replace(/^\n+/,``)),t&&((!o||s)&&n[n.length-1]!==``&&n.push(``),n.push(Mu(a(t),``)))}return n.join(`
77
+ `)+`
78
+ `}var _f=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Xl,{value:Gl});let r=null;typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:`warn`,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:`1.2`},n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new hu({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[Xl]:{value:Gl}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=ru(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){vf(this.contents)&&this.contents.add(e)}addIn(e,t){vf(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=_u(this);e.anchor=!t||n.has(t)?vu(t||`a`,n):t}return new Cu(e.anchor)}createNode(e,t,n){let r;if(typeof t==`function`)e=t.call({"":e},``,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e==`number`||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=yu(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=Du(e,l,p);return o&&nu(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new sd(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return vf(this.contents)?this.contents.delete(e):!1}deleteIn(e){return ku(e)?this.contents!=null&&(this.contents=null,!0):vf(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return nu(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return ku(e)?!t&&I(this.contents)?this.contents.value:this.contents:nu(this.contents)?this.contents.getIn(e,t):void 0}has(e){return nu(this.contents)?this.contents.has(e):!1}hasIn(e){return ku(e)?this.contents!==void 0:nu(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Ou(this.schema,[e],t):vf(this.contents)&&this.contents.set(e,t)}setIn(e,t){ku(e)?this.contents=t:this.contents==null?this.contents=Ou(this.schema,Array.from(e),t):vf(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e==`number`&&(e=String(e));let n;switch(e){case`1.1`:this.directives?this.directives.yaml.version=`1.1`:this.directives=new hu({version:`1.1`}),n={resolveKnownTags:!1,schema:`yaml-1.1`};break;case`1.2`:case`next`:this.directives?this.directives.yaml.version=e:this.directives=new hu({version:e}),n={resolveKnownTags:!0,schema:`core`};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new hf(Object.assign(n,t));else throw Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==`number`?r:100},s=xu(this.contents,t??``,o);if(typeof i==`function`)for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a==`function`?bu(a,{"":s},``,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);if(`indent`in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return gf(this,e)}};function vf(e){if(nu(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var yf=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},bf=class extends yf{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},xf=class extends yf{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}};let Sf=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,``);if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o=`…`+o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+`…`),r>1&&/^ *$/.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+`…
79
+ `),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s=` `.repeat(a)+`^`.repeat(e);n.message+=`:\n\n${o}\n${s}\n`}};function Cf(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d=``,f=``,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!==`space`&&i.type!==`newline`&&i.type!==`comma`&&a(i.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),!1),h&&=(l&&i.type!==`comment`&&i.type!==`newline`&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),null),i.type){case`space`:!t&&(n!==`doc-start`||r?.type!==`flow-collection`)&&i.source.includes(` `)&&(h=i),u=!0;break;case`comment`:{u||a(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let e=i.source.substring(1)||` `;d?d+=f+e:d=e,f=``,l=!1;break}case`newline`:l?d?d+=i.source:(!b||n!==`seq-item-ind`)&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case`anchor`:g&&a(i,`MULTIPLE_ANCHORS`,`A node can have at most one anchor`),i.source.endsWith(`:`)&&a(i.offset+i.source.length-1,`BAD_ALIAS`,`Anchor ending in : is ambiguous`,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case`tag`:_&&a(i,`MULTIPLE_TAGS`,`A node can have at most one tag`),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i,`BAD_PROP_ORDER`,`Anchors and tags must be after the ${i.source} indicator`),b&&a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.source} in ${t??`collection`}`),b=i,l=n===`seq-item-ind`||n===`explicit-key-ind`,u=!1;break;case`comma`:if(t){y&&a(i,`UNEXPECTED_TOKEN`,`Unexpected , in ${t}`),y=i,l=!1,u=!1;break}default:a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.type} token`),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!==`space`&&r.type!==`newline`&&r.type!==`comma`&&(r.type!==`scalar`||r.source!==``)&&a(r.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),h&&(l&&h.indent<=o||r?.type===`block-map`||r?.type===`block-seq`)&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}function wf(e){if(!e)return null;switch(e.type){case`alias`:case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:if(e.source.includes(`
80
+ `))return!0;if(e.end){for(let t of e.end)if(t.type===`newline`)return!0}return!1;case`flow-collection`:for(let t of e.items){for(let e of t.start)if(e.type===`newline`)return!0;if(t.sep){for(let e of t.sep)if(e.type===`newline`)return!0}if(wf(t.key)||wf(t.value))return!0}return!1;default:return!0}}function Tf(e,t,n){if(t?.type===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&wf(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function Ef(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||I(e)&&I(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}let Df=`All mapping items must start at the same column`;function Of({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??pd)(n.schema);n.atRoot&&=!1;let s=r.offset,c=null;for(let a of r.items){let{start:l,key:u,sep:d,value:f}=a,p=Cf(l,{indicator:`explicit-key-ind`,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type===`block-seq`?i(s,`BLOCK_AS_IMPLICIT_KEY`,`A block sequence may not be used as an implicit map key`):`indent`in u&&u.indent!==r.indent&&i(s,`BAD_INDENT`,Df)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+=`
81
+ `+p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||wf(u))&&i(u??l[l.length-1],`MULTILINE_IMPLICIT_KEY`,`Implicit keys need to be on a single line`)}else p.found?.indent!==r.indent&&i(s,`BAD_INDENT`,Df);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&Tf(r.indent,u,i),n.atKey=!1,Ef(n,o.items,g)&&i(h,`DUPLICATE_KEY`,`Map keys must be unique`);let _=Cf(d??[],{indicator:`map-value-ind`,next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||u.type===`block-scalar`});if(s=_.end,_.found){m&&(f?.type===`block-map`&&!_.hasNewline&&i(s,`BLOCK_AS_IMPLICIT_KEY`,`Nested mappings are not allowed in compact mappings`),n.options.strict&&p.start<_.found.offset-1024&&i(g.range,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit block mapping key`));let c=f?e(n,f,_,i):t(n,s,d,null,_,i);n.schema.compat&&Tf(r.indent,f,i),s=c.range[2];let l=new sd(g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range,`MISSING_CHAR`,`Implicit map keys need to be followed by map values`),_.comment&&(g.comment?g.comment+=`
82
+ `+_.comment:g.comment=_.comment);let e=new sd(g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c,`IMPOSSIBLE`,`Map comment with trailing content`),o.range=[r.offset,s,c??s],o}function kf({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??hd)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=Cf(a,{indicator:`seq-item-ind`,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found){if(u.anchor||u.tag||l)l?.type===`block-seq`?i(u.end,`BAD_INDENT`,`All sequence items must start at the same column`):i(s,`MISSING_CHAR`,`Sequence item without - indicator`);else{c=u.end,u.comment&&(o.comment=u.comment);continue}}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&Tf(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function Af(e,t,n,r){let i=``;if(e){let a=!1,o=``;for(let s of e){let{source:e,type:c}=s;switch(c){case`space`:a=!0;break;case`comment`:{n&&!a&&r(s,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let t=e.substring(1)||` `;i?i+=o+t:i=t,o=``;break}case`newline`:i&&(o+=e),a=!0;break;default:r(s,`UNEXPECTED_TOKEN`,`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}let jf=`Block collections are not allowed within flow collections`,Mf=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function Nf({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new((a?.nodeClass)??(o?pd:hd))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=Cf(d,{flow:s,indicator:`explicit-key-ind`,next:f??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!m){a===0&&h.comma?i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`):a<r.items.length-1&&i(h.start,`UNEXPECTED_TOKEN`,`Unexpected empty item in ${s}`),h.comment&&(c.comment?c.comment+=`
83
+ `+h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&wf(f)&&i(f,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`)}if(a===0)h.comma&&i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`);else if(h.comma||i(h.start,`MISSING_CHAR`,`Missing , between ${s} items`),h.comment){let e=``;loop:for(let t of d)switch(t.type){case`comma`:case`space`:break;case`comment`:e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];eu(t)&&(t=t.value??t.key),t.comment?t.comment+=`
84
+ `+e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],Mf(m)&&i(r.range,`BLOCK_IN_FLOW`,jf)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);Mf(f)&&i(g.range,`BLOCK_IN_FLOW`,jf),n.atKey=!1;let _=Cf(p??[],{flow:s,indicator:`map-value-ind`,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type===`newline`){i(e,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`);break}}h.start<_.found.offset-1024&&i(_.found,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit flow sequence key`)}}else m&&(`source`in m&&m.source?.[0]===`:`?i(m,`MISSING_CHAR`,`Missing space after : in ${s}`):i(_.start,`MISSING_CHAR`,`Missing , or : between ${s} items`));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?Mf(m)&&i(v.range,`BLOCK_IN_FLOW`,jf):_.comment&&(g.comment?g.comment+=`
85
+ `+_.comment:g.comment=_.comment);let y=new sd(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;Ef(n,e.items,g)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(y)}else{let e=new pd(n.schema);e.flow=!0,e.items.push(y);let t=(v??g).range;e.range=[g.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:_.end}}let d=o?`}`:`]`,[f,...p]=r.end,m=u;if(f?.source===d)m=f.offset+f.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l?`${e} must end with a ${d}`:`${e} in block collection must be sufficiently indented and end with a ${d}`;i(u,l?`MISSING_CHAR`:`BAD_INDENT`,t),f&&f.source.length!==1&&p.unshift(f)}if(p.length>0){let e=Af(p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+=`
86
+ `+e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function Pf(e,t,n,r,i,a){let o=n.type===`block-map`?Of(e,t,n,r,a):n.type===`block-seq`?kf(e,t,n,r,a):Nf(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function Ff(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a,`TAG_RESOLVE_FAILED`,e)):null;if(n.type===`block-seq`){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n,`MISSING_CHAR`,`Missing newline after block sequence props`)}let s=n.type===`block-map`?`map`:n.type===`block-seq`?`seq`:n.start.source===`{`?`map`:`seq`;if(!a||!o||o===`!`||o===pd.tagName&&s===`map`||o===hd.tagName&&s===`seq`)return Pf(e,t,n,i,o);let c=t.schema.tags.find(e=>e.tag===o&&e.collection===s);if(!c){let r=t.schema.knownTags[o];if(r?.collection===s)t.schema.tags.push(Object.assign({},r,{default:!1})),c=r;else return r?i(a,`BAD_COLLECTION_TYPE`,`${r.tag} used for ${s} collection, but expects ${r.collection??`scalar`}`,!0):i(a,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${o}`,!0),Pf(e,t,n,i,o)}let l=Pf(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a,`TAG_RESOLVE_FAILED`,e),t.options)??l,d=ru(u)?u:new L(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function If(e,t,n){let r=t.offset,i=Lf(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?L.BLOCK_FOLDED:L.BLOCK_LITERAL,o=t.source?Rf(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t===``||t===`\r`)s=e;else break}if(s===0){let e=i.chomp===`+`&&o.length>0?`
87
+ `.repeat(Math.max(1,o.length-1)):``,n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:a,comment:i.comment,range:[r,n,n]}}let c=t.indent+i.indent,l=t.offset+i.length,u=0;for(let t=0;t<s;++t){let[r,a]=o[t];if(a===``||a===`\r`)i.indent===0&&r.length>c&&(c=r.length);else{r.length<c&&n(l+r.length,`MISSING_CHAR`,`Block scalars with more-indented leading empty lines must use an explicit indentation indicator`),i.indent===0&&(c=r.length),u=t,c===0&&!e.atRoot&&n(l,`BAD_INDENT`,`Block scalar values in collections must be indented`);break}l+=r.length+a.length+1}for(let e=o.length-1;e>=s;--e)o[e][0].length>c&&(s=e+1);let d=``,f=``,p=!1;for(let e=0;e<u;++e)d+=o[e][0].slice(c)+`
88
+ `;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]===`\r`;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e=`Block scalar lines must not be less indented than their ${i.indent?`explicit indentation indicator`:`first line`}`;n(l-r.length-(s?2:1),`BAD_INDENT`,e),t=``}a===L.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f=`
89
+ `):t.length>c||r[0]===` `?(f===` `?f=`
90
+ `:!p&&f===`
91
+ `&&(f=`
92
+
93
+ `),d+=f+t.slice(c)+r,f=`
94
+ `,p=!0):r===``?f===`
95
+ `?d+=`
96
+ `:f=`
97
+ `:(d+=f+r,f=` `,p=!1)}switch(i.chomp){case`-`:break;case`+`:for(let e=s;e<o.length;++e)d+=`
98
+ `+o[e][0].slice(c);d[d.length-1]!==`
99
+ `&&(d+=`
100
+ `);break;default:d+=`
101
+ `}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function Lf({offset:e,props:t},n,r){if(t[0].type!==`block-scalar-header`)return r(t[0],`IMPOSSIBLE`,`Block scalar header not found`),null;let{source:i}=t[0],a=i[0],o=0,s=``,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n===`-`||n===`+`))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c,`UNEXPECTED_TOKEN`,`Block scalar header includes extra characters: ${i}`);let l=!1,u=``,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case`space`:l=!0;case`newline`:d+=i.source.length;break;case`comment`:n&&!l&&r(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`),d+=i.source.length,u=i.source.substring(1);break;case`error`:r(i,`UNEXPECTED_TOKEN`,i.message),d+=i.source.length;break;default:{r(i,`UNEXPECTED_TOKEN`,`Unexpected token in block scalar header: ${i.type}`);let e=i.source;e&&typeof e==`string`&&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function Rf(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[``,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function zf(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case`scalar`:s=L.PLAIN,c=Bf(a,l);break;case`single-quoted-scalar`:s=L.QUOTE_SINGLE,c=Vf(a,l);break;case`double-quoted-scalar`:s=L.QUOTE_DOUBLE,c=Uf(a,l);break;default:return n(e,`UNEXPECTED_TOKEN`,`Expected a flow scalar value, but found: ${i}`),{value:``,type:null,comment:``,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=Af(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function Bf(e,t){let n=``;switch(e[0]){case` `:n=`a tab character`;break;case`,`:n=`flow indicator character ,`;break;case`%`:n=`directive indicator character %`;break;case`|`:case`>`:n=`block scalar indicator ${e[0]}`;break;case`@`:case"`":n=`reserved character ${e[0]}`}return n&&t(0,`BAD_SCALAR_START`,`Plain value cannot start with ${n}`),Hf(e)}function Vf(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),Hf(e.slice(1,-1)).replace(/''/g,`'`)}function Hf(e){let t,n;try{t=RegExp(`(.*?)(?<![ ])[ ]*\r?
102
+ `,`sy`),n=RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
103
+ `,`sy`)}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],a=` `,o=t.lastIndex;for(n.lastIndex=o;r=n.exec(e);)r[1]===``?a===`
104
+ `?i+=a:a=`
105
+ `:(i+=a+r[1],a=` `),o=n.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,r=s.exec(e),i+a+(r?.[1]??``)}function Uf(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!==`\r`||e[r+1]!==`
106
+ `){if(i===`
107
+ `){let{fold:t,offset:i}=Wf(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=Gf[i];if(a)n+=a;else if(i===`
108
+ `)for(i=e[r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`\r`&&e[r+1]===`
109
+ `)for(i=e[++r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`x`||i===`u`||i===`U`){let a=i===`x`?2:i===`u`?4:8;n+=Kf(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),n+=i}}else if(i===` `||i===` `){let t=r,a=e[r+1];for(;a===` `||a===` `;)a=e[++r+1];a!==`
110
+ `&&(a!==`\r`||e[r+2]!==`
111
+ `)&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}}return(e[e.length-1]!==`"`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing "quote`),n}function Wf(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
112
+ `||r===`\r`)&&(r!==`\r`||e[t+2]===`
113
+ `);)r===`
114
+ `&&(n+=`
115
+ `),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}let Gf={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
116
+ `,r:`\r`,t:` `,v:`\v`,N:`…`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function Kf(e,t,n,r){let i=e.substr(t,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(a)}catch{let i=e.substr(t-2,n+2);return r(t-2,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),i}}function qf(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?If(e,t,r):zf(t,e.options.strict,r),c=n?e.directives.tagName(n.source,e=>r(n,`TAG_RESOLVE_FAILED`,e)):null,l;l=e.options.stringKeys&&e.atKey?e.schema[Jl]:c?Jf(e.schema,i,c,n,r):t.type===`scalar`?Yf(e,i,t,r):e.schema[Jl];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=I(a)?a:new L(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new L(i)}return u.range=s,u.source=i,a&&(u.type=a),c&&(u.tag=c),l.format&&(u.format=l.format),o&&(u.comment=o),u}function Jf(e,t,n,r,i){if(n===`!`)return e[Jl];let a=[];for(let t of e.tags)if(!t.collection&&t.tag===n){if(t.default&&t.test)a.push(t);else return t}for(let e of a)if(e.test?.test(t))return e;let o=e.knownTags[n];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${n}`,n!==`tag:yaml.org,2002:str`),e[Jl])}function Yf({atKey:e,directives:t,schema:n},r,i,a){let o=n.tags.find(t=>(t.default===!0||e&&t.default===`key`)&&t.test?.test(r))||n[Jl];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[Jl];o.tag!==e.tag&&a(i,`TAG_RESOLVE_FAILED`,`Value may be parsed as either ${t.tagString(o.tag)} or ${t.tagString(e.tag)}`,!0)}return o}function Xf(e,t,n){if(t){n??=t.length;for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case`space`:case`comment`:case`newline`:e-=n.source.length;continue}for(n=t[++r];n?.type===`space`;)e+=n.source.length,n=t[++r];break}}return e}let Zf={composeNode:Qf,composeEmptyNode:$f};function Qf(e,t,n,r){let i=e.atKey,{spaceBefore:a,comment:o,anchor:s,tag:c}=n,l,u=!0;switch(t.type){case`alias`:l=ep(e,t,r),(s||c)&&r(t,`ALIAS_PROPS`,`An alias node must not specify any properties`);break;case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`block-scalar`:l=qf(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:try{l=Ff(Zf,e,t,n,r),s&&(l.anchor=s.source.substring(1))}catch(e){r(t,`RESOURCE_EXHAUSTION`,e instanceof Error?e.message:String(e))}break;default:r(t,`UNEXPECTED_TOKEN`,t.type===`error`?t.message:`Unsupported token (type: ${t.type})`),u=!1}return l??=$f(e,t.offset,void 0,null,n,r),s&&l.anchor===``&&r(s,`BAD_ALIAS`,`Anchor cannot be an empty string`),i&&e.options.stringKeys&&(!I(l)||typeof l.value!=`string`||l.tag&&l.tag!==`tag:yaml.org,2002:str`)&&r(c??t,`NON_STRING_KEY`,`With stringKeys, all keys must be strings`),a&&(l.spaceBefore=!0),o&&(t.type===`scalar`&&t.source===``?l.comment=o:l.commentBefore=o),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function $f(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=qf(e,{type:`scalar`,offset:Xf(t,n,r),indent:-1,source:``},s,l);return o&&(u.anchor=o.source.substring(1),u.anchor===``&&l(o,`BAD_ALIAS`,`Anchor cannot be an empty string`)),i&&(u.spaceBefore=!0),a&&(u.comment=a,u.range[2]=c),u}function ep({options:e},{offset:t,source:n,end:r},i){let a=new Cu(n.substring(1));a.source===``&&i(t,`BAD_ALIAS`,`Alias cannot be an empty string`),a.source.endsWith(`:`)&&i(t+n.length-1,`BAD_ALIAS`,`Alias ending in : is ambiguous`,!0);let o=t+n.length,s=Af(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function tp(e,t,{offset:n,start:r,value:i,end:a},o){let s=new _f(void 0,Object.assign({_directives:t},e)),c={atKey:!1,atRoot:!0,directives:s.directives,options:s.options,schema:s.schema},l=Cf(r,{indicator:`doc-start`,next:i??a?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(s.directives.docStart=!0,i&&(i.type===`block-map`||i.type===`block-seq`)&&!l.hasNewline&&o(l.end,`MISSING_CHAR`,`Block collection cannot start on same line with directives-end marker`)),s.contents=i?Qf(c,i,l,o):$f(c,l.end,r,null,l,o);let u=s.contents.range[2],d=Af(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function np(e){if(typeof e==`number`)return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n==`string`?n.length:1)]}function rp(e){let t=``,n=!1,r=!1;for(let i=0;i<e.length;++i){let a=e[i];switch(a[0]){case`#`:t+=(t===``?``:r?`
117
+
118
+ `:`
119
+ `)+(a.substring(1)||` `),n=!0,r=!1;break;case`%`:e[i+1]?.[0]!==`#`&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var ip=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=np(e);r?this.warnings.push(new xf(i,t,n)):this.errors.push(new bf(i,t,n))},this.directives=new hu({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=rp(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(nu(i)&&!i.flow&&i.items.length>0){let e=i.items[0];eu(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:rp(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case`directive`:this.directives.add(e.source,(t,n,r)=>{let i=np(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=tp(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,`MISSING_CHAR`,`Missing directives-end/doc-start indicator line`),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case`byte-order-mark`:case`space`:break;case`comment`:case`newline`:this.prelude.push(e.source);break;case`error`:{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new bf(np(e),`UNEXPECTED_TOKEN`,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case`doc-end`:{if(!this.doc){this.errors.push(new bf(np(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=Af(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new bf(np(e),`UNEXPECTED_TOKEN`,`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new _f(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,`MISSING_CHAR`,`Missing directives-end indicator line`),e.range=[0,t,t],this.decorate(e,!1),yield e}}};let ap=e=>`type`in e?op(e):sp(e);function op(e){switch(e.type){case`block-scalar`:{let t=``;for(let n of e.props)t+=op(n);return t+e.source}case`block-map`:case`block-seq`:{let t=``;for(let n of e.items)t+=sp(n);return t}case`flow-collection`:{let t=e.start.source;for(let n of e.items)t+=sp(n);for(let n of e.end)t+=n.source;return t}case`document`:{let t=sp(e);if(e.end)for(let n of e.end)t+=n.source;return t}default:{let t=e.source;if(`end`in e&&e.end)for(let n of e.end)t+=n.source;return t}}}function sp({start:e,key:t,sep:n,value:r}){let i=``;for(let t of e)i+=t.source;if(t&&(i+=op(t)),n)for(let e of n)i+=e.source;return r&&(i+=op(r)),i}let cp=Symbol(`break visit`),lp=Symbol(`skip children`),up=Symbol(`remove item`);function dp(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),fp(Object.freeze([]),e,t)}dp.BREAK=cp,dp.SKIP=lp,dp.REMOVE=up,dp.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},dp.parentCollection=(e,t)=>{let n=dp.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function fp(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=fp(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===cp)return cp;else r===up&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}let pp=e=>!!e&&`items`in e,mp=e=>!!e&&(e.type===`scalar`||e.type===`single-quoted-scalar`||e.type===`double-quoted-scalar`||e.type===`block-scalar`);function hp(e){switch(e){case``:return`byte-order-mark`;case``:return`doc-mode`;case``:return`flow-error-end`;case``:return`scalar`;case`---`:return`doc-start`;case`...`:return`doc-end`;case``:case`
120
+ `:case`\r
121
+ `:return`newline`;case`-`:return`seq-item-ind`;case`?`:return`explicit-key-ind`;case`:`:return`map-value-ind`;case`{`:return`flow-map-start`;case`}`:return`flow-map-end`;case`[`:return`flow-seq-start`;case`]`:return`flow-seq-end`;case`,`:return`comma`}switch(e[0]){case` `:case` `:return`space`;case`#`:return`comment`;case`%`:return`directive-line`;case`*`:return`alias`;case`&`:return`anchor`;case`!`:return`tag`;case`'`:return`single-quoted-scalar`;case`"`:return`double-quoted-scalar`;case`|`:case`>`:return`block-scalar-header`}return null}function gp(e){switch(e){case void 0:case` `:case`
122
+ `:case`\r`:case` `:return!0;default:return!1}}let _p=new Set(`0123456789ABCDEFabcdef`),vp=new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),yp=new Set(`,[]{}`),bp=new Set(` ,[]{}
123
+ \r `),xp=e=>!e||bp.has(e);var Sp=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer=``,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!=`string`)throw TypeError(`source is not a string`);this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??`stream`;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===` `||t===` `;)t=this.buffer[++e];return!t||t===`#`||t===`
124
+ `||t===`\r`&&this.buffer[e+1]===`
125
+ `}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===` `;)t=this.buffer[++n+e];if(t===`\r`){let t=this.buffer[n+e+1];if(t===`
126
+ `||!t&&!this.atEnd)return e+n+1}return t===`
127
+ `||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&gp(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!=`number`||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
128
+ `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]===`\r`&&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case`stream`:return yield*this.parseStream();case`line-start`:return yield*this.parseLineStart();case`block-start`:return yield*this.parseBlockStart();case`doc`:return yield*this.parseDocument();case`flow`:return yield*this.parseFlowCollection();case`quoted-scalar`:return yield*this.parseQuotedScalar();case`block-scalar`:return yield*this.parseBlockScalar();case`plain-scalar`:return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext(`stream`);if(e[0]===``&&(yield*this.pushCount(1),e=e.substring(1)),e[0]===`%`){let t=e.length,n=e.indexOf(`#`);for(;n!==-1;){let r=e[n-1];if(r===` `||r===` `){t=n-1;break}n=e.indexOf(`#`,n+1)}for(;;){let n=e[t-1];if(n===` `||n===` `)--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),`stream`}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),`stream`}return yield``,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext(`line-start`);if(e===`-`||e===`.`){if(!this.atEnd&&!this.hasChars(4))return this.setNext(`line-start`);let e=this.peek(3);if((e===`---`||e===`...`)&&gp(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e===`---`?`doc`:`stream`}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!gp(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext(`block-start`);if((e===`-`||e===`?`||e===`:`)&&gp(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,`block-start`}return`doc`}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext(`doc`);let t=yield*this.pushIndicators();switch(e[t]){case`#`:yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),`doc`;case`*`:return yield*this.pushUntil(xp),`doc`;case`"`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&gp(r[3]))&&(n!==this.indentNext-1||this.flowLevel!==1||r[0]!==`]`&&r[0]!==`}`))return this.flowLevel=0,yield``,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(xp),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||gp(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`'`)for(;t!==-1&&this.buffer[t+1]===`'`;)t=this.buffer.indexOf(`'`,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]===`\\`;)e+=1;if(e%2==0)break;t=this.buffer.indexOf(`"`,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
129
+ `,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf(`
130
+ `,e)}r!==-1&&(t=r-(n[r-1]===`\r`?2:1))}if(t===-1){if(!this.atEnd)return this.setNext(`quoted-scalar`);t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?`flow`:`doc`}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t===`+`)this.blockScalarKeep=!0;else if(t>`0`&&t<=`9`)this.blockScalarIndent=Number(t)-1;else if(t!==`-`)break}return yield*this.pushUntil(e=>gp(e)||e===`#`)}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case` `:t+=1;break;case`
131
+ `:e=r,t=0;break;case`\r`:{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext(`block-scalar`);if(e===`
132
+ `)break}default:break loop}if(!n&&!this.atEnd)return this.setNext(`block-scalar`);if(t>=this.indentNext){this.indentNext=this.blockScalarIndent===-1?t:this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf(`
133
+ `,t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext(`block-scalar`);e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n===` `;)n=this.buffer[++r];if(n===` `){for(;n===` `||n===` `||n===`\r`||n===`
134
+ `;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let n=e-1,r=this.buffer[n];r===`\r`&&(r=this.buffer[--n]);let i=n;for(;r===` `;)r=this.buffer[--n];if(r===`
135
+ `&&n>=this.pos&&n+1+t>i)e=n;else break}while(!0);return yield``,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===`:`){let r=this.buffer[n+1];if(gp(r)||e&&yp.has(r))break;t=n}else if(gp(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
136
+ `?(n+=1,r=`
137
+ `,i=this.buffer[n+1]):t=n),i===`#`||e&&yp.has(i))break;if(r===`
138
+ `){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&yp.has(r))break;t=n}return!r&&!this.atEnd?this.setNext(`plain-scalar`):(yield``,yield*this.pushToIndex(t+1,!0),e?`flow`:`doc`)}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield``),0)}*pushIndicators(){let e=0;loop:for(;;){switch(this.charAt(0)){case`!`:e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue loop;case`&`:e+=yield*this.pushUntil(xp),e+=yield*this.pushSpaces(!0);continue loop;case`-`:case`?`:case`:`:{let t=this.flowLevel>0,n=this.charAt(1);if(gp(n)||t&&yp.has(n)){t?this.flowKey&&=!1:this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue loop}}}break loop}return e}*pushTag(){if(this.charAt(1)===`<`){let e=this.pos+2,t=this.buffer[e];for(;!gp(t)&&t!==`>`;)t=this.buffer[++e];return yield*this.pushToIndex(t===`>`?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(vp.has(t))t=this.buffer[++e];else if(t===`%`&&_p.has(this.buffer[e+1])&&_p.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
139
+ `?yield*this.pushCount(1):e===`\r`&&this.charAt(1)===`
140
+ `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===` `||e&&n===` `);let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},Cp=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function wp(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function Tp(e){for(let t=0;t<e.length;++t)switch(e[t].type){case`space`:case`comment`:case`newline`:break;default:return t}return-1}function Ep(e){switch(e?.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`flow-collection`:return!0;default:return!1}}function Dp(e){switch(e.type){case`document`:return e.start;case`block-map`:{let t=e.items[e.items.length-1];return t.sep??t.start}case`block-seq`:return e.items[e.items.length-1].start;default:return[]}}function Op(e){if(e.length===0)return[];let t=e.length;loop:for(;--t>=0;)switch(e[t].type){case`doc-start`:case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:case`newline`:break loop}for(;e[++t]?.type===`space`;);return e.splice(t,e.length)}function kp(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function Ap(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!wp(t.start,`explicit-key-ind`)&&!wp(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,Ep(t.value)?t.value.end?kp(t.value.end,t.sep):t.value.end=t.sep:kp(t.start,t.sep),delete t.sep)}var jp=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source=``,this.type=``,this.lexer=new Sp,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=hp(e);if(!t){let t=`Not a YAML token: ${e}`;yield*this.pop({type:`error`,offset:this.offset,message:t,source:e}),this.offset+=e.length}else if(t===`scalar`)this.atNewLine=!1,this.atScalar=!0,this.type=`scalar`;else{switch(this.type=t,yield*this.step(),t){case`newline`:this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case`space`:this.atNewLine&&e[0]===` `&&(this.indent+=e.length);break;case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:this.atNewLine&&(this.indent+=e.length);break;case`doc-mode`:case`flow-error-end`:return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type===`doc-end`&&e?.type!==`doc-end`){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:`doc-end`,offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case`document`:return yield*this.document(e);case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return yield*this.scalar(e);case`block-scalar`:return yield*this.blockScalar(e);case`block-map`:return yield*this.blockMap(e);case`block-seq`:return yield*this.blockSequence(e);case`flow-collection`:return yield*this.flowCollection(e);case`doc-end`:return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:`error`,offset:this.offset,source:``,message:`Tried to pop an empty stack`};else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type===`block-scalar`?t.indent=`indent`in e?e.indent:0:t.type===`flow-collection`&&e.type===`document`&&(t.indent=0),t.type===`flow-collection`&&Ap(t),e.type){case`document`:e.value=t;break;case`block-scalar`:e.props.push(t);break;case`block-map`:{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case`block-seq`:{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case`flow-collection`:{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type===`document`||e.type===`block-map`||e.type===`block-seq`)&&(t.type===`block-map`||t.type===`block-seq`)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&Tp(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!==`comment`||e.indent<t.indent))&&(e.type===`document`?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case`directive-line`:yield{type:`directive`,offset:this.offset,source:this.source};return;case`byte-order-mark`:case`space`:case`comment`:case`newline`:yield this.sourceToken;return;case`doc-mode`:case`doc-start`:{let e={type:`document`,offset:this.offset,start:[]};this.type===`doc-start`&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case`doc-start`:Tp(e.start)===-1?e.start.push(this.sourceToken):(yield*this.pop(),yield*this.step());return;case`anchor`:case`tag`:case`space`:case`comment`:case`newline`:e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type===`map-value-ind`){let t=Op(Dp(this.peek(2))),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let r={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case`space`:case`comment`:case`newline`:e.props.push(this.sourceToken);return;case`scalar`:if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf(`
141
+ `)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
142
+ `,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(this.onKeyLine=!1,t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){kp(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!==`seq-item-ind`,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case`newline`:n.push(r);break;case`space`:break;case`comment`:i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case`anchor`:case`tag`:r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`explicit-key-ind`:!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case`map-value-ind`:if(t.explicitKey){if(!t.sep){if(wp(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=Op(t.start);this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(wp(t.sep,`map-value-ind`))this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(Ep(t.key)&&!wp(t.sep,`newline`)){let e=Op(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken)}else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):wp(t.sep,`map-value-ind`)?this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type===`block-seq`){if(!t.explicitKey&&t.sep&&!wp(t.sep,`newline`)){yield*this.pop({type:`error`,offset:this.offset,message:`Unexpected block-seq-ind on same line with key`,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){kp(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case`anchor`:case`tag`:if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case`seq-item-ind`:if(this.indent!==e.indent)break;t.value||wp(t.start,`seq-item-ind`)?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type===`flow-error-end`){let e;do yield*this.pop(),e=this.peek(1);while(e?.type===`flow-collection`)}else if(e.end.length===0){switch(this.type){case`comma`:case`explicit-key-ind`:!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case`map-value-ind`:!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case`space`:case`comment`:case`newline`:case`anchor`:case`tag`:!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case`flow-map-end`:case`flow-seq-end`:e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if(t.type===`block-map`&&(this.type===`map-value-ind`&&t.indent===e.indent||this.type===`newline`&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type===`map-value-ind`&&t.type!==`flow-collection`){let n=Op(Dp(t));Ap(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf(`
143
+ `)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
144
+ `,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=Op(Dp(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=Op(Dp(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}};function Mp(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new Cp||null,prettyErrors:t}}function Np(e,t={}){let{lineCounter:n,prettyErrors:r}=Mp(t),i=new jp(n?.addNewLine),a=new ip(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new bf(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(Sf(e,n)),o.warnings.forEach(Sf(e,n))),o}function Pp(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let i=Np(e,n);if(!i)return null;if(i.warnings.forEach(e=>Qu(i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!==`silent`)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function Fp(e,t,n){let r=null;if(typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n==`string`&&(n=n.length),typeof n==`number`){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(e===void 0){let{keepUndefined:e}=n??t??{};if(!e)return}return Ql(e)&&!r?e.toString(n):new _f(e,r,n).toString(n)}var Ip=s({__parsePrettierYamlConfig:()=>eS,default:()=>zp,languages:()=>eg,options:()=>ng,parsers:()=>rg,printers:()=>$x}),Lp=Object.defineProperty,Rp=(e,t)=>{for(var n in t)Lp(e,n,{get:t[n],enumerable:!0})},zp={};Rp(zp,{__parsePrettierYamlConfig:()=>eS,languages:()=>eg,options:()=>ng,parsers:()=>rg,printers:()=>$x});var Bp=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i);function Vp(e){return this[e<0?this.length+e:e]}var Hp=Bp(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return Vp}),Up=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Wp=Bp(`replaceAll`,function(){if(typeof this==`string`)return Up}),Gp=()=>{},Kp=`string`,qp=`array`,Jp=`cursor`,Yp=`indent`,Xp=`align`,Zp=`trim`,Qp=`group`,$p=`fill`,em=`if-break`,tm=`indent-if-break`,nm=`line-suffix`,rm=`line-suffix-boundary`,im=`line`,am=`label`,om=`break-parent`,sm=new Set([Jp,Yp,Xp,Zp,Qp,$p,em,tm,nm,rm,im,am,om]);function cm(e,t,n){if(!e.has(t)){let r=n(t);e.set(t,r)}return e.get(t)}function lm(e){if(typeof e==`string`)return Kp;if(Array.isArray(e))return qp;if(!e)return;let{type:t}=e;if(sm.has(t))return t}var um=lm,dm=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function fm(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
145
+ Expected it to be 'string' or 'object'.`;if(um(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=dm([...sm].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
146
+ Expected it to be ${r}.`}var pm=class extends Error{name=`InvalidDocError`;constructor(e){super(fm(e)),this.doc=e}};function mm(e,t){if(typeof e==`string`)return t(e);let n=new Map;return r(e);function r(e){return cm(n,e,i)}function i(e){switch(um(e)){case qp:return t(e.map(r));case $p:return t({...e,parts:e.parts.map(r)});case em:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case Qp:{let{expandedStates:n,contents:i}=e;return n?(n=n.map(r),i=n[0]):i=r(i),t({...e,contents:i,expandedStates:n})}case Xp:case Yp:case tm:case am:case nm:return t({...e,contents:r(e.contents)});case Kp:case Jp:case Zp:case rm:case im:case om:return t(e);default:throw new pm(e)}}}function hm(e,t=Nm){return mm(e,e=>typeof e==`string`?km(t,e.split(`
147
+ `)):e)}var gm=Gp,_m=Gp,vm=Gp,ym=Gp;function bm(e,t){return ym(e),gm(t),{type:Xp,contents:t,n:e}}function xm(e){return bm(-1/0,e)}function Sm(e){return bm({type:`root`},e)}function Cm(e){return bm(-1,e)}var wm={type:om};function Tm(e){return vm(e),{type:$p,parts:e}}function Em(e,t={}){return gm(e),_m(t.expandedStates,!0),{type:Qp,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Dm(e,t){return Em(e[0],{...t,expandedStates:e})}function Om(e,t=``,n={}){return gm(e),t!==``&&gm(t),{type:em,breakContents:e,flatContents:t,groupId:n.groupId}}function km(e,t){gm(e),_m(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}var Am={type:im},jm={type:im,soft:!0},Mm=[{type:im,hard:!0},wm],Nm=[{type:im,hard:!0,literal:!0},wm];function Pm(e){return gm(e),{type:nm,contents:e}}function Fm(e){return(t,n,r)=>{if(n===!1)return!1;let i=!!r?.backwards,{length:a}=t,o=n;for(;o>=0&&o<a;){let n=t.charAt(o);if(e instanceof RegExp){if(!e.test(n))return o}else if(!e.includes(n))return o;i?o--:o++}return o===-1||o===a?o:!1}}var Im=Fm(` `),Lm=e=>e===`
148
+ `||e===`\r`||e===`\u2028`||e===`\u2029`;function Rm(e,t,n){if(t===!1)return!1;let r=!!n?.backwards,i=e.charAt(t);if(r){if(e.charAt(t-1)===`\r`&&i===`
149
+ `)return t-2;if(Lm(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===`
150
+ `)return t+2;if(Lm(i))return t+1}return t}var zm=Rm;function Bm(e,t){let n=t-1;n=Im(e,n,{backwards:!0}),n=zm(e,n,{backwards:!0}),n=Im(e,n,{backwards:!0});let r=zm(e,n,{backwards:!0});return n!==r}var Vm=Bm,Hm=class extends Error{name=`UnexpectedNodeError`;constructor(e,t,n=`type`){super(`Unexpected ${t} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}};function Um(e,t){let{node:n}=e;if(n.type===`root`&&t.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/.test(t.filepath))return async e=>{let n=await e(t.originalText,{parser:`json`});return n?[n,Mm]:void 0}}Um.getVisitorKeys=()=>[];var Wm=Um,Gm=null;function Km(e){if(Gm!==null&&typeof Gm.property){let e=Gm;return Gm=Km.prototype=null,e}return Gm=Km.prototype=e??Object.create(null),new Km}var qm=10;for(let e=0;e<=qm;e++)Km();function Jm(e){return Km(e)}function Ym(e,t=`type`){Jm(e);function n(n){let r=n[t],i=e[r];if(!Array.isArray(i))throw Object.assign(Error(`Missing visitor keys for '${r}'.`),{node:n});return i}return n}var Xm=Ym,Zm=[[`children`,`anchor`,`tag`,`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`],[`anchor`,`tag`,`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`],[`key`,`value`,`children`,`anchor`,`tag`,`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`],[`content`,`children`,`anchor`,`tag`,`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`],[`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`]],Qm=Xm({root:Zm[0],document:[`head`,`body`,`children`,`anchor`,`tag`,`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`],documentHead:Zm[0],documentBody:Zm[0],directive:Zm[1],alias:Zm[1],blockLiteral:Zm[1],blockFolded:Zm[0],plain:Zm[0],quoteSingle:Zm[1],quoteDouble:Zm[1],mapping:Zm[0],mappingItem:Zm[2],mappingKey:Zm[3],mappingValue:Zm[3],sequence:Zm[0],sequenceItem:Zm[3],flowMapping:Zm[0],flowMappingItem:Zm[2],flowSequence:Zm[0],flowSequenceItem:Zm[3],comment:Zm[1],tag:Zm[4],anchor:Zm[4]}),$m=e=>e.position.start.offset,eh=e=>e.position.end.offset,th=`format`,nh=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/,rh=/^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/,ih=/^\s*@(?:format|prettier)\s*$/,ah=e=>ih.test(e),oh=e=>rh.test(e),sh=e=>nh.test(e),ch=e=>`# @${th}
151
+
152
+ ${e}`;function lh(e,t){switch(e.type){case`comment`:if(ah(e.value))return null;break;case`quoteDouble`:case`quoteSingle`:t.type=`quote`;break;case`document`:t.directivesEndMarker||delete t.directivesEndMarker,t.documentEndMarker||delete t.documentEndMarker;break;case`blockLiteral`:case`blockFolded`:e.chomping===`keep`?t.value=e.value.split(`
153
+ `).map(e=>e.replace(/[ \t]+$/,``)).join(`
154
+ `):(e.chomping===`clip`||e.chomping===`strip`)&&(t.value=e.value.trimEnd())}}lh.ignoredProperties=new Set([`position`]);function uh(e){return Array.isArray(e)&&e.length>0}var dh=uh;function fh(e,t){return typeof e?.type==`string`&&t.includes(e.type)}function ph(e,t,n){return t(`children`in e?{...e,children:e.children.map(n=>ph(n,t,e))}:e,n)}function mh(e,t,n){Object.defineProperty(e,t,{get:n,enumerable:!1})}function hh(e,t){let n=0,r=t.length;for(let i=e.position.end.offset-1;i<r;i++){let e=t[i];if(e===`
155
+ `&&n++,n===1&&/\S/.test(e))return!1;if(n===2)return!0}return!1}function gh(e){let{node:t}=e;switch(t.type){case`tag`:case`anchor`:case`comment`:return!1}let n=e.stack.length;for(let t=1;t<n;t++){let n=e.stack[t],r=e.stack[t-1];if(Array.isArray(r)&&typeof n==`number`&&n!==r.length-1)return!1}return!0}function _h(e){return dh(e.children)?_h(Hp(0,e.children,-1)):e}function vh(e){return e.value.trim()===`prettier-ignore`}function yh(e){let{node:t}=e;if(t.type===`documentBody`){let t=e.parent.head;return Eh(t)&&vh(Hp(0,t.endComments,-1))}return Sh(t)&&vh(Hp(0,t.leadingComments,-1))}function bh(e){return!dh(e.children)&&!xh(e)}function xh(e){return Sh(e)||Ch(e)||wh(e)||Th(e)||Eh(e)}function Sh(e){return dh(e?.leadingComments)}function Ch(e){return dh(e?.middleComments)}function wh(e){return e?.indicatorComment}function Th(e){return e?.trailingComment}function Eh(e){return dh(e?.endComments)}function Dh(e){return e?e.split(/(?<!^| ) (?! |$)/):[]}function Oh(e,t,n){let r=t.split(`
156
+ `).map((e,t,n)=>t===0&&t===n.length-1?e:t!==0&&t!==n.length-1?e.trim():t===0?e.trimEnd():e.trimStart());if(n.proseWrap===`preserve`)return r.map(e=>e?[e]:[]);let i=[];for(let[t,n]of r.entries()){let a=Dh(n);t>0&&r[t-1].length>0&&a.length>0&&!(e===`quoteDouble`&&Hp(0,Hp(0,i,-1),-1).endsWith(`\\`))?i[i.length-1]=[...Hp(0,i,-1),...a]:i.push(a)}return n.proseWrap===`never`?i.map(e=>[e.join(` `)]):i}function kh(e,{parentIndent:t,isLastDescendant:n,options:r}){let i=e.position.start.line===e.position.end.line?``:r.originalText.slice(e.position.start.offset,e.position.end.offset).match(/^[^\n]*\n(.*)$/s)[1];if(i===``)return[];let a;if(e.indent===null){let e=i.match(/^(?<leadingSpace> *)[^\n\r ]/m);a=e?e.groups.leadingSpace.length:1/0}else a=e.indent-1+t;let o=i.split(`
157
+ `).map(e=>e.slice(a));if(r.proseWrap===`preserve`||e.type===`blockLiteral`)return c(o.map(e=>e?[e]:[]));let s=[];for(let[e,t]of o.entries()){let n=Dh(t);e>0&&n.length>0&&o[e-1].length>0&&!/^\s/.test(n[0])&&!/^\s|\s$/.test(Hp(0,s,-1))?s[s.length-1]=[...Hp(0,s,-1),...n]:s.push(n)}return s=s.map(e=>{let t=[];for(let n of e)t.length>0&&/\s$/.test(Hp(0,t,-1))?t[t.length-1]+=` `+n:t.push(n);return t}),r.proseWrap===`never`&&(s=s.map(e=>[e.join(` `)])),c(s);function c(t){if(e.chomping===`keep`)return i.endsWith(`
158
+ `)&&Hp(0,t,-1).length===0?t.slice(0,-1):t;let r=0;for(let e=t.length-1;e>=0&&t[e].every(e=>e.replace(/[ \t]+$/,``)===``);e--)r++;return r===0?t:r>=2&&!n?t.slice(0,-(r-1)):t.slice(0,-r)}}function Ah(e){if(!e)return!0;switch(e.type){case`plain`:case`quoteDouble`:case`quoteSingle`:case`alias`:case`flowMapping`:case`flowSequence`:return!0;default:return!1}}var jh=new WeakMap;function Mh(e,t){let{node:n,root:r}=e,i=cm(jh,r,()=>new Set);return!i.has(n.position.end.offset)&&(i.add(n.position.end.offset),hh(n,t)&&!Nh(e.parent))?jm:``}function Nh(e){return Eh(e)&&!fh(e,[`documentHead`,`documentBody`,`flowMapping`,`flowSequence`])}function Ph(e,t){return bm(` `.repeat(e),t)}function Fh(e,t,n){let{node:r}=e,i=e.ancestors.filter(e=>e.type===`sequence`||e.type===`mapping`).length,a=gh(e),o=[r.type===`blockFolded`?`>`:`|`];r.indent!==null&&o.push(r.indent.toString()),r.chomping!==`clip`&&o.push(r.chomping===`keep`?`+`:`-`),wh(r)&&o.push(` `,n(`indicatorComment`));let s=kh(r,{parentIndent:i,isLastDescendant:a,options:t}),c=[];for(let[e,t]of s.entries())e===0&&c.push(Mm),c.push(Tm(km(Am,t))),e===s.length-1?r.chomping===`keep`&&a&&c.push(xm(t.length===0?Mm:Nm)):c.push(t.length===0?Mm:Sm(Nm));return r.indent===null?o.push(Cm(Ph(t.tabWidth,c))):o.push(xm(Ph(r.indent-1+i,c))),o}var Ih=Fh;function Lh(e,t,n){let{node:r}=e,i=r.type===`flowMapping`,a=i?`{`:`[`,o=i?`}`:`]`,s=jm;i&&r.children.length>0&&t.bracketSpacing&&(s=Am);let c=Hp(0,r.children,-1),l=c?.type===`flowMappingItem`&&bh(c.key)&&bh(c.value);return[a,Ph(t.tabWidth,[s,Rh(e,t,n),t.trailingComma===`none`?``:Om(`,`),Eh(r)?[Mm,km(Mm,e.map(n,`endComments`))]:``]),l?``:s,o]}function Rh(e,t,n){return e.map(({isLast:r,node:i,next:a})=>[n(),r?``:[`,`,Am,i.position.start.line===a.position.start.line?``:Mh(e,t.originalText)]],`children`)}function zh(e,t,n){let{node:r,parent:i}=e,{key:a,value:o}=r,s=bh(a),c=bh(o);if(s&&c)return`: `;let l=n(`key`),u=Vh(r)?` `:``;if(c)return r.type===`flowMappingItem`&&i.type===`flowMapping`?l:r.type===`mappingItem`&&Bh(a.content,t)&&!Th(a.content)&&i.tag?.value!==`tag:yaml.org,2002:set`?[l,u,`:`]:[`? `,Ph(2,l)];let d=n(`value`);if(s)return[`: `,Ph(2,d)];if(Sh(o)||!Ah(a.content))return[`? `,Ph(2,l),Mm,...e.map(()=>[n(),Mm],`value`,`leadingComments`),`: `,Ph(2,d)];if(Hh(a.content)&&!Sh(a.content)&&!Ch(a.content)&&!Th(a.content)&&!Eh(a)&&!Sh(o.content)&&!Ch(o.content)&&!Eh(o)&&Bh(o.content,t)&&Bh(a.content,t))return[l,u,`: `,d];let f=Symbol(`mappingKey`),p=Em([Om(`? `),Em(Ph(2,l),{id:f})]),m=[Mm,`: `,Ph(2,d)],h=[u,`:`];Eh(o)&&o.content&&fh(o.content,[`flowMapping`,`flowSequence`])&&o.content.children.length===0?h.push(` `):Sh(o.content)||Eh(o)&&o.content&&!fh(o.content,[`mapping`,`sequence`])||i.type===`mapping`&&Th(a.content)&&Ah(o.content)||fh(o.content,[`mapping`,`sequence`])&&o.content.tag===null&&o.content.anchor===null?h.push(Mm):o.content?h.push(Am):Th(o)&&h.push(` `),h.push(d);let g=Ph(t.tabWidth,h);return Bh(a.content,t)&&!Sh(a.content)&&!Ch(a.content)&&!Th(a.content)&&!Eh(a)?Dm([[l,g]]):Dm([[p,Om(m,g,{groupId:f})]])}function Bh(e,t){if(!e)return!0;switch(e.type){case`plain`:case`quoteSingle`:case`quoteDouble`:break;case`alias`:return!0;default:return!1}if(t.proseWrap===`preserve`)return e.position.start.line===e.position.end.line;if(/\\$/m.test(t.originalText.slice(e.position.start.offset,e.position.end.offset)))return!1;switch(t.proseWrap){case`never`:return!e.value.includes(`
159
+ `);case`always`:return!/[\n ]/.test(e.value);default:return!1}}function Vh(e){return e.key.content?.type===`alias`}function Hh(e){if(!e)return!0;switch(e.type){case`plain`:case`quoteDouble`:case`quoteSingle`:return e.position.start.line===e.position.end.line;case`alias`:return!0;default:return!1}}var Uh=zh;function Wh(e){return ph(e,Gh)}function Gh(e){switch(e.type){case`document`:mh(e,`head`,()=>e.children[0]),mh(e,`body`,()=>e.children[1]);break;case`documentBody`:case`sequenceItem`:case`flowSequenceItem`:case`mappingKey`:case`mappingValue`:mh(e,`content`,()=>e.children[0]);break;case`mappingItem`:case`flowMappingItem`:mh(e,`key`,()=>e.children[0]),mh(e,`value`,()=>e.children[1])}return e}var Kh=Wh;function qh(e,t,n){let{node:r}=e,i=[];r.type!==`mappingValue`&&Sh(r)&&i.push([km(Mm,e.map(n,`leadingComments`)),Mm]);let{tag:a,anchor:o}=r;a&&i.push(n(`tag`)),a&&o&&i.push(` `),o&&i.push(n(`anchor`));let s=``;return fh(r,[`mapping`,`sequence`,`comment`,`directive`,`mappingItem`,`sequenceItem`])&&!gh(e)&&(s=Mh(e,t.originalText)),(a||o)&&(fh(r,[`sequence`,`mapping`])&&!Ch(r)?i.push(Mm):i.push(` `)),Ch(r)&&i.push([r.middleComments.length===1?``:Mm,km(Mm,e.map(n,`middleComments`)),Mm]),yh(e)?i.push(hm(t.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):i.push(Em(Jh(e,t,n))),Th(r)&&!fh(r,[`document`,`documentHead`])&&i.push(Pm([r.type===`mappingValue`&&!r.content?``:` `,e.parent.type===`mappingKey`&&e.getParentNode(2).type===`mapping`&&Ah(r)?``:wm,n(`trailingComment`)])),Nh(r)&&i.push(Ph(r.type===`sequenceItem`?2:0,[Mm,km(Mm,e.map(({node:e})=>[Vm(t.originalText,$m(e))?Mm:``,n()],`endComments`))])),i.push(s),i}function Jh(e,t,n){let{node:r}=e;switch(r.type){case`root`:{let t=_h(r),i=!(fh(t,[`blockLiteral`,`blockFolded`])&&t.chomping===`keep`),a=[];return e.each(({node:t,isFirst:r})=>{r||a.push(Mm),a.push(n()),Xh(e)&&(i&&a.push(Mm),a.push(`...`),Th(t)&&a.push(` `,n(`trailingComment`)))},`children`),i&&a.push(Mm),a}case`document`:{let t=[];return Zh(e)&&((r.head.children.length>0||r.head.endComments.length>0)&&t.push(n(`head`)),Th(r.head)?t.push([`---`,` `,n([`head`,`trailingComment`])]):t.push(`---`)),Yh(r)&&t.push(n(`body`)),km(Mm,t)}case`documentHead`:return km(Mm,[...e.map(n,`children`),...e.map(n,`endComments`)]);case`documentBody`:{let{children:i,endComments:a}=r,o=``;if(i.length>0&&a.length>0){let e=_h(r);fh(e,[`blockFolded`,`blockLiteral`])?e.chomping!==`keep`&&(o=[Mm,Mm]):o=fh(Hp(0,i,-1),[`mapping`])&&Vm(t.originalText,$m(a[0]))?[Mm,Mm]:Mm}return[km(Mm,e.map(n,`children`)),o,km(Mm,e.map(n,`endComments`))]}case`directive`:return[`%`,km(` `,[r.name,...r.parameters])];case`comment`:return[`#`,r.value];case`alias`:return[`*`,r.value];case`tag`:return t.originalText.slice(r.position.start.offset,r.position.end.offset);case`anchor`:return[`&`,r.value];case`plain`:return Qh(r.type,t.originalText.slice(r.position.start.offset,r.position.end.offset),t);case`quoteDouble`:case`quoteSingle`:{let e=t.originalText.slice(r.position.start.offset+1,r.position.end.offset-1);if(r.type===`quoteSingle`&&e.includes(`\\`)||r.type===`quoteDouble`&&/\\[^"]/.test(e)){let n=r.type===`quoteDouble`?`"`:`'`;return[n,Qh(r.type,e,t),n]}if(e.includes(`"`))return[`'`,Qh(r.type,r.type===`quoteDouble`?Wp(0,Wp(0,e,`\\"`,`"`),`'`,`'`.repeat(2)):e,t),`'`];if(e.includes(`'`))return[`"`,Qh(r.type,r.type===`quoteSingle`?Wp(0,e,`''`,`'`):e,t),`"`];let n=t.singleQuote?`'`:`"`;return[n,Qh(r.type,e,t),n]}case`blockFolded`:case`blockLiteral`:return Ih(e,t,n);case`mapping`:case`sequence`:return km(Mm,e.map(n,`children`));case`sequenceItem`:return[`- `,Ph(2,r.content?n(`content`):``)];case`mappingKey`:case`mappingValue`:return r.content?n(`content`):``;case`mappingItem`:case`flowMappingItem`:return Uh(e,t,n);case`flowMapping`:return Lh(e,t,n);case`flowSequence`:return Lh(e,t,n);case`flowSequenceItem`:return n(`content`);default:throw new Hm(r,`YAML`)}}function Yh(e){return e.body.children.length>0||Eh(e.body)}function Xh(e){let t=e.node;if(t.documentEndMarker||Th(t))return!0;if(e.isLast)return!1;let n=e.next;return n.head.children.length>0||Eh(n.head)}function Zh(e){let t=e.node;return t.directivesEndMarker||t.head.children.length>0||Eh(t.head)||Th(t.head)}function Qh(e,t,n){return km(Mm,Oh(e,t,n).map(e=>Tm(km(Am,e))))}var $h={preprocess:Kh,embed:Wm,print:qh,massageAstNode:lh,insertPragma:ch,getVisitorKeys:Qm},eg=[{name:`YAML`,type:`data`,aceMode:`yaml`,extensions:[`.yml`,`.mir`,`.reek`,`.rviz`,`.sublime-syntax`,`.syntax`,`.yaml`,`.yaml-tmlanguage`,`.yaml.sed`,`.yml.mysql`],filenames:[`.clang-format`,`.clang-tidy`,`.clangd`,`.gemrc`,`CITATION.cff`,`glide.lock`,`pixi.lock`,`.prettierrc`,`.stylelintrc`,`.lintstagedrc`],tmScope:`source.yaml`,aliases:[`yml`],codemirrorMode:`yaml`,codemirrorMimeType:`text/x-yaml`,parsers:[`yaml`],vscodeLanguageIds:[`yaml`,`ansible`,`dockercompose`,`github-actions-workflow`,`home-assistant`],linguistLanguageId:407}],tg={bracketSpacing:{category:`Common`,type:`boolean`,default:!0,description:`Print spaces between brackets.`,oppositeDescription:`Do not print spaces between brackets.`},objectWrap:{category:`Common`,type:`choice`,default:`preserve`,description:`How to wrap object literals.`,choices:[{value:`preserve`,description:`Keep as multi-line, if there is a newline between the opening brace and first property.`},{value:`collapse`,description:`Fit to a single line when possible.`}]},singleQuote:{category:`Common`,type:`boolean`,default:!1,description:`Use single quotes instead of double quotes.`},proseWrap:{category:`Common`,type:`choice`,default:`preserve`,description:`How to wrap prose.`,choices:[{value:`always`,description:`Wrap prose if it exceeds the print width.`},{value:`never`,description:`Do not wrap prose.`},{value:`preserve`,description:`Wrap prose as-is.`}]},bracketSameLine:{category:`Common`,type:`boolean`,default:!1,description:`Put > of opening tags on the last line instead of on a new line.`},singleAttributePerLine:{category:`Common`,type:`boolean`,default:!1,description:`Enforce single attribute per line in HTML, Vue and JSX.`}},ng={bracketSpacing:tg.bracketSpacing,singleQuote:tg.singleQuote,proseWrap:tg.proseWrap},rg={};Rp(rg,{yaml:()=>Qx});var ig=class extends SyntaxError{name=`YAMLSyntaxError`;code;source;position;constructor(e,t){super(t.message,{cause:t}),this.cause??=t,this.code=t.code,this.source=e.text,this.position=e.transformRange(t.pos)}};function ag(e,t=null){`children`in e&&e.children.forEach(t=>ag(t,e)),`anchor`in e&&e.anchor&&ag(e.anchor,e),`tag`in e&&e.tag&&ag(e.tag,e),`leadingComments`in e&&e.leadingComments.forEach(t=>ag(t,e)),`middleComments`in e&&e.middleComments.forEach(t=>ag(t,e)),`indicatorComment`in e&&e.indicatorComment&&ag(e.indicatorComment,e),`trailingComment`in e&&e.trailingComment&&ag(e.trailingComment,e),`endComments`in e&&e.endComments.forEach(t=>ag(t,e)),Object.defineProperty(e,"_parent",{value:t,enumerable:!1})}function og(e){return`${e.line}:${e.column}`}function sg(e){ag(e);let t=cg(e),n=e.children.slice();e.comments.filter(e=>!e._parent).forEach(e=>{for(;n.length>1&&e.position.start.line>n[0].position.end.line;)n.shift();ug(e,t,n[0])})}function cg(e){let t=Array.from(Array(e.position.end.line),()=>({}));for(let n of e.comments)t[n.position.start.line-1].comment=n;return lg(t,e),t}function lg(e,t){if(t.position.start.offset!==t.position.end.offset){if(`leadingComments`in t){let{start:n}=t.position,{leadingAttachableNode:r}=e[n.line-1];(!r||n.column<r.position.start.column)&&(e[n.line-1].leadingAttachableNode=t)}if(`trailingComment`in t&&t.position.end.column>1&&t.type!==`document`&&t.type!==`documentHead`){let{end:n}=t.position,{trailingAttachableNode:r}=e[n.line-1];(!r||n.column>=r.position.end.column)&&(e[n.line-1].trailingAttachableNode=t)}if(t.type!==`root`&&t.type!==`document`&&t.type!==`documentHead`&&t.type!==`documentBody`){let{start:n,end:r}=t.position,i=[r.line].concat(n.line===r.line?[]:n.line);for(let n of i){let i=e[n-1].trailingNode;(!i||r.column>=i.position.end.column)&&(e[n-1].trailingNode=t)}}`children`in t&&t.children.forEach(t=>{lg(e,t)})}}function ug(e,t,n){let r=e.position.start.line,{trailingAttachableNode:i}=t[r-1];if(i){if(i.trailingComment)throw Error(`Unexpected multiple trailing comment at ${og(e.position.start)}`);ag(e,i),i.trailingComment=e;return}for(let i=r;i>=n.position.start.line;i--){let{trailingNode:n}=t[i-1],a;if(n)a=n;else if(i!==r&&t[i-1].comment)a=t[i-1].comment._parent;else continue;if((a.type===`sequence`||a.type===`mapping`)&&(a=a.children[0]),a.type===`mappingItem`){let[e,t]=a.children;a=fg(e)?e:t}for(;;){if(dg(a,e)){ag(e,a),a.endComments.push(e);return}if(!a._parent)break;a=a._parent}break}for(let i=r+1;i<=n.position.end.line;i++){let{leadingAttachableNode:n}=t[i-1];if(n){ag(e,n),n.leadingComments.push(e);return}}let a=n.children[1];ag(e,a),a.endComments.push(e)}function dg(e,t){if(e.position.start.offset<t.position.start.offset&&e.position.end.offset>t.position.end.offset)switch(e.type){case`flowMapping`:case`flowSequence`:return e.children.length===0||t.position.start.line>e.children[e.children.length-1].position.end.line}if(t.position.end.offset<e.position.end.offset)return!1;switch(e.type){case`sequenceItem`:return t.position.start.column>e.position.start.column;case`mappingKey`:case`mappingValue`:return t.position.start.column>e._parent.position.start.column&&(e.children.length===0||e.children.length===1&&e.children[0].type!==`blockFolded`&&e.children[0].type!==`blockLiteral`)&&(e.type===`mappingValue`||fg(e));default:return!1}}function fg(e){return e.position.start!==e.position.end&&(e.children.length===0||e.position.start.offset!==e.children[0].position.start.offset)}function pg(e,t,n){return{type:`root`,position:e,children:t,comments:n}}function mg(e,t){return{start:e,end:t}}function hg(e){return{start:e,end:e}}function gg(e,t){return{type:`comment`,position:t.transformRange([e.offset,e.offset+e.source.length]),value:e.source.slice(1)}}function _g(e,t){return{type:`anchor`,position:e,value:t}}function vg(e,t,n){return{anchor:t,tag:e,middleComments:n}}function yg(e,t){return{type:`tag`,position:e,value:t}}function bg(e,t,n){let r=[],i=null,a=null,o=null;for(let s of t){let t=[s.offset,s.offset+s.source.length];switch(s.type){case`tag`:{i??=t;let r=e.tag??s.source.slice(s.source.startsWith(`!!`)?2:1);r===`!`&&(r=`tag:yaml.org,2002:str`),a=yg(n.transformRange(t),r)}break;case`anchor`:i??=t,o=_g(n.transformRange(t),e.anchor);break;case`comment`:{let a=n.transformComment(s);i&&i[0]<=t[0]&&t[1]<=e.range[0]&&r.push(a);break}default:throw Error(`Unexpected content property token type: ${s.type}`)}}return vg(a,o,r)}function xg(e,t,n){return{type:`alias`,position:e,leadingComments:[],trailingComment:null,...t,value:n}}function*Sg(...e){for(let t of e)if(t)for(let e of t)Cg(e)||(yield e)}function Cg(e){return e.type===`space`||e.type===`newline`}function wg(e){return e.type===`comment`||e.type===`tag`||e.type===`anchor`}function Tg(e,t){let n=[];for(let r of Sg(e))r.type===`comment`?t.transformComment(r):n.push(r);return n}function Eg(e,t,n){let r=e.srcToken;for(let e of Tg(r.end,t))throw Error(`Unexpected token type in alias end: ${e.type}`);return xg(t.transformRange(e.range),t.transformContentProperties(e,n.tokens),e.source)}function Dg(e){return{...e,type:`blockFolded`}}function Og(e,t,n,r,i,a){return{type:`blockValue`,position:e,leadingComments:[],...t,chomping:n,indent:r,value:i,indicatorComment:a}}function kg(e,t,n,r){let i=null,a=null;for(let e of Sg(t.props))if(e.type===`comment`)a=n.transformComment(e);else if(e.type===`block-scalar-header`)i=e;else throw Error(`Unexpected token type in block value end: ${e.type}`);if(!i)throw Error(`Expected block scalar header token`);let o=Ag(i.source);return Og(n.transformRange(e.range),n.transformContentProperties(e,r.tokens),o.chomping,o.indent,e.source,a)}function Ag(e){let t=/([+-]?)(\d*)([+-]?)$/u.exec(e),n=null,r=`clip`;if(t){n=t[2]?Number(t[2]):null;let e=t[3]||t[1];r=e===`+`?`keep`:e===`-`?`strip`:`clip`}return{chomping:r,indent:n}}function jg(e,t,n){let r=e.srcToken;if(!r||r.type!==`block-scalar`)throw Error(`Expected block scalar srcToken`);return Dg(kg(e,r,t,n))}function Mg(e){return{...e,type:`blockLiteral`}}function Ng(e,t,n){let r=e.srcToken;if(!r||r.type!==`block-scalar`)throw Error(`Expected block scalar srcToken`);return Mg(kg(e,r,t,n))}function Pg(e,t,n){return{type:`flowCollection`,position:e,leadingComments:[],trailingComment:null,endComments:[],...t,children:n}}function Fg(e,t,n){return{...Pg(e,t,n),type:`flowMapping`}}function Ig(e,t,n){return{type:`flowMappingItem`,position:e,leadingComments:[],children:[t,n]}}function Lg(e,t){return{type:`mappingKey`,position:e,trailingComment:null,endComments:[],children:t?[t]:[]}}function Rg(e,t){return{type:`mappingValue`,position:e,leadingComments:[],trailingComment:null,endComments:[],children:t?[t]:[]}}function zg(e,t,n,r){let i=[],a=null;for(let e of Sg(t.start)){if(wg(e)){i.push(e);continue}if(e.type===`explicit-key-ind`){a=e;continue}if(e.type!==`comma`)throw Error(`Unexpected token type in collection item start: ${e.type}`)}let o=[],s=null;for(let e of Sg(t.sep)){if(wg(e)){o.push(e);continue}if(e.type===`map-value-ind`){s=e;continue}throw Error(`Unexpected token type in collection item sep: ${e.type}`)}let c=a?.offset??t.key?.offset??s?.offset??t.value.offset,l=[c,t.key?e.key.range[1]:a?a.offset+a.source.length:c],u=null;if(e.value){let n=s?.offset??t.value?.offset??e.value.range[0];u=[n,t.value?e.value.range[1]:s?s.offset+s.source.length:n]}return Bg(e,n,r,{range:l,props:{tokens:i}},{range:u,props:{tokens:o}})}function Bg(e,t,n,r,i){let a=null;Cx(e.key,r.props)?Tg(r.props.tokens,t):a=t.transformNode(e.key,r.props);let o=null;Cx(e.value,i.props)?Tg(i.props.tokens,t):o=t.transformNode(e.value,i.props);let s=Lg(t.transformRange([r.range?r.range[0]:a.position.start.offset,a?a.position.end.offset:r.range[1]]),a),c=o||i.range?Rg(t.transformRange([i.range?i.range[0]:o.position.start.offset,o?o.position.end.offset:i.range[0]+1]),o):null;return n(mg(s.position.start,c?c.position.end:s.position.end),s,c||Rg(hg(s.position.end),null))}function Vg(e,t,n){let r=e.srcToken;if(!r||r.type!==`flow-collection`)throw Error(`Expected flow-collection CST node for flow map`);let i=e.items.map((e,n)=>{let i=r.items[n];return zg(e,i,t,Ig)});if(e.items.length<r.items.length)for(let n=e.items.length;n<r.items.length;n++){let e=r.items[n];for(let n of Tg(e.start,t))if(n.type!==`comma`)throw Error(`Unexpected token type in collection item start: ${n.type}`)}let a=null;for(let e of Tg(r.end,t)){if(e.type===`flow-map-end`){a=e;continue}throw Error(`Unexpected token type in flow map end: ${e.type}`)}if(!a)throw Error(`Expected flow-map-end token`);return Fg(t.transformRange([r.start.offset,a.offset+a.source.length]),t.transformContentProperties(e,n.tokens),i)}function Hg(e,t,n){return{...Pg(e,t,n),type:`flowSequence`}}function Ug(e,t){return{type:`flowSequenceItem`,position:e,children:[t]}}function Wg(e){return e[e.length-1]}var Gg={};Rp(Gg,{Alias:()=>O_,CST:()=>pb,Composer:()=>fb,Document:()=>Ty,Lexer:()=>Hb,LineCounter:()=>Ub,Pair:()=>gv,Parser:()=>Zb,Scalar:()=>R,Schema:()=>Cy,YAMLError:()=>Dy,YAMLMap:()=>Sv,YAMLParseError:()=>Oy,YAMLSeq:()=>wv,YAMLWarning:()=>ky,isAlias:()=>$g,isCollection:()=>a_,isDocument:()=>e_,isMap:()=>t_,isNode:()=>o_,isPair:()=>n_,isScalar:()=>r_,isSeq:()=>i_,parse:()=>tx,parseAllDocuments:()=>$b,parseDocument:()=>ex,stringify:()=>nx,visit:()=>d_,visitAsync:()=>p_});var Kg=Symbol.for(`yaml.alias`),qg=Symbol.for(`yaml.document`),Jg=Symbol.for(`yaml.map`),Yg=Symbol.for(`yaml.pair`),Xg=Symbol.for(`yaml.scalar`),Zg=Symbol.for(`yaml.seq`),Qg=Symbol.for(`yaml.node.type`),$g=e=>!!e&&typeof e==`object`&&e[Qg]===Kg,e_=e=>!!e&&typeof e==`object`&&e[Qg]===qg,t_=e=>!!e&&typeof e==`object`&&e[Qg]===Jg,n_=e=>!!e&&typeof e==`object`&&e[Qg]===Yg,r_=e=>!!e&&typeof e==`object`&&e[Qg]===Xg,i_=e=>!!e&&typeof e==`object`&&e[Qg]===Zg;function a_(e){if(e&&typeof e==`object`)switch(e[Qg]){case Jg:case Zg:return!0}return!1}function o_(e){if(e&&typeof e==`object`)switch(e[Qg]){case Kg:case Jg:case Xg:case Zg:return!0}return!1}var s_=e=>(r_(e)||a_(e))&&!!e.anchor,c_=Symbol(`break visit`),l_=Symbol(`skip children`),u_=Symbol(`remove node`);function d_(e,t){let n=h_(t);e_(e)?f_(null,e.contents,n,Object.freeze([e]))===u_&&(e.contents=null):f_(null,e,n,Object.freeze([]))}d_.BREAK=c_,d_.SKIP=l_,d_.REMOVE=u_;function f_(e,t,n,r){let i=g_(e,t,n,r);if(o_(i)||n_(i))return __(e,r,i),f_(e,i,n,r);if(typeof i!=`symbol`){if(a_(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=f_(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else{if(i===c_)return c_;i===u_&&(t.items.splice(e,1),--e)}}}else if(n_(t)){r=Object.freeze(r.concat(t));let e=f_(`key`,t.key,n,r);if(e===c_)return c_;e===u_&&(t.key=null);let i=f_(`value`,t.value,n,r);if(i===c_)return c_;i===u_&&(t.value=null)}}return i}async function p_(e,t){let n=h_(t);e_(e)?await m_(null,e.contents,n,Object.freeze([e]))===u_&&(e.contents=null):await m_(null,e,n,Object.freeze([]))}p_.BREAK=c_,p_.SKIP=l_,p_.REMOVE=u_;async function m_(e,t,n,r){let i=await g_(e,t,n,r);if(o_(i)||n_(i))return __(e,r,i),m_(e,i,n,r);if(typeof i!=`symbol`){if(a_(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await m_(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else{if(i===c_)return c_;i===u_&&(t.items.splice(e,1),--e)}}}else if(n_(t)){r=Object.freeze(r.concat(t));let e=await m_(`key`,t.key,n,r);if(e===c_)return c_;e===u_&&(t.key=null);let i=await m_(`value`,t.value,n,r);if(i===c_)return c_;i===u_&&(t.value=null)}}return i}function h_(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function g_(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(t_(t))return n.Map?.(e,t,r);if(i_(t))return n.Seq?.(e,t,r);if(n_(t))return n.Pair?.(e,t,r);if(r_(t))return n.Scalar?.(e,t,r);if($g(t))return n.Alias?.(e,t,r)}function __(e,t,n){let r=t[t.length-1];if(a_(r))r.items[e]=n;else if(n_(r))e===`key`?r.key=n:r.value=n;else if(e_(r))r.contents=n;else{let e=$g(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var v_={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},y_=e=>e.replace(/[!,[\]{}]/g,e=>v_[e]),b_=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+y_(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&o_(e.contents)){let t={};d_(e.contents,(e,n)=>{o_(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)i===`!!`&&a===`tag:yaml.org,2002:`||(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
160
+ `)}};b_.defaultYaml={explicit:!1,version:`1.2`},b_.defaultTags={"!!":`tag:yaml.org,2002:`};function x_(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function S_(e){let t=new Set;return d_(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function C_(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function w_(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=S_(e);let a=C_(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(r_(t.node)||a_(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function T_(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=T_(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=T_(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=T_(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=T_(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function E_(e,t,n){if(Array.isArray(e))return e.map((e,t)=>E_(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!s_(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var D_=class{constructor(e){Object.defineProperty(this,Qg,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!e_(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=E_(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?T_(i,{"":o},``,o):o}},O_=class extends D_{constructor(e){super(Kg),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],d_(e,{Node:(e,t)=>{($g(t)||s_(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(E_(a,null,t),n.get(a)),o?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=k_(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(x_(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function k_(e,t,n){if($g(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(a_(t)){let r=0;for(let i of t.items){let t=k_(e,i,n);t>r&&(r=t)}return r}if(n_(t)){let r=k_(e,t.key,n),i=k_(e,t.value,n);return Math.max(r,i)}return 1}var A_=e=>!e||typeof e!=`function`&&typeof e!=`object`,R=class extends D_{constructor(e){super(Xg),this.value=e}toJSON(e,t){return t?.keep?this.value:E_(this.value,e,t)}toString(){return String(this.value)}};R.BLOCK_FOLDED=`BLOCK_FOLDED`,R.BLOCK_LITERAL=`BLOCK_LITERAL`,R.PLAIN=`PLAIN`,R.QUOTE_DOUBLE=`QUOTE_DOUBLE`,R.QUOTE_SINGLE=`QUOTE_SINGLE`;var j_=`tag:yaml.org,2002:`;function M_(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function N_(e,t,n){if(e_(e)&&(e=e.contents),o_(e))return e;if(n_(e)){let t=n.schema[Jg].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new O_(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=j_+t.slice(2));let l=M_(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new R(e);return c&&(c.node=t),t}l=e instanceof Map?o[Jg]:Symbol.iterator in Object(e)?o[Zg]:o[Jg]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new R(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function P_(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return N_(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var F_=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,I_=class extends D_{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>o_(t)||n_(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(F_(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(a_(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,P_(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(a_(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&r_(i)?i.value:i:a_(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!n_(t))return!1;let n=t.value;return n==null||e&&r_(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return a_(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(a_(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,P_(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},L_=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function R_(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var z_=(e,t,n)=>e.endsWith(`
161
+ `)?R_(n,t):n.includes(`
162
+ `)?`
163
+ `+R_(n,t):(e.endsWith(` `)?``:` `)+n,B_=`flow`,V_=`block`,H_=`quoted`;function U_(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===V_&&(h=W_(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===H_&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===`
164
+ `)n===V_&&(h=W_(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
165
+ `&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==`
166
+ `&&t!==` `&&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n===H_){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`
167
+ ${t}${e.slice(0,a)}`:(n===H_&&u[i]&&(v+=`${e[i]}\\`),v+=`
168
+ ${t}${e.slice(i+1,a)}`)}return v}function W_(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===` `;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
169
+ `);r=t,i=t+1,a=e[i]}return r}var G_=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),K_=e=>/^(%|---|\.\.\.)/m.test(e);function q_(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
170
+ `){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function J_(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(K_(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length<i)e+=1;else{for(o+=n.slice(s,e)+`
171
+
172
+ `;n[e+2]===`\\`&&n[e+3]===`n`&&n[e+4]!==`"`;)o+=`
173
+ `,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:U_(o,a,H_,G_(t,!1))}function Y_(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
174
+ `)||/[ \t]\n|\n[ \t]/.test(e))return J_(e,t);let n=t.indent||(K_(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&
175
+ ${n}`)+`'`;return t.implicitKey?r:U_(r,n,B_,G_(t,!1))}function X_(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=J_;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?Y_:i&&!t?J_:n?Y_:J_}return r(e,t)}var Z_;try{Z_=RegExp(`(^|(?<!
176
+ ))
177
+ +(?!
178
+ |$)`,`g`)}catch{Z_=/\n+(?!\n|$)/g}function Q_({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n))return X_(n,r);let l=r.indent||(r.forceBlockIndent||K_(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===R.BLOCK_FOLDED?!1:t===R.BLOCK_LITERAL||!q_(n,c,l.length);if(!n)return u?`|
179
+ `:`>
180
+ `;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
181
+ `&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
182
+ `);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&=(n=n.slice(0,-p.length),p[p.length-1]===`
183
+ `&&(p=p.slice(0,-1)),p.replace(Z_,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
184
+ `)_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&=(n=n.substring(v.length),v.replace(/\n+/g,`$&${l}`));let y=(h?l?`2`:`1`:``)+d;if(e&&(y+=` `+s(e.replace(/ ?[\r\n]+/g,` `)),i&&i()),!u){let e=n.replace(/\n+/g,`
185
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=G_(r,!0);o!==`folded`&&t!==R.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=U_(`${v}${e}${p}`,l,V_,a);if(!i)return`>${y}
186
+ ${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}
187
+ ${l}${v}${n}${p}`}function $_(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(`
188
+ `)||u&&/[[\]{},]/.test(a))return X_(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
189
+ `)?X_(a,t):Q_(e,t,n,r);if(!s&&!u&&i!==R.PLAIN&&a.includes(`
190
+ `))return Q_(e,t,n,r);if(K_(a)){if(c===``)return t.forceBlockIndent=!0,Q_(e,t,n,r);if(s&&c===l)return X_(a,t)}let d=a.replace(/\n+/g,`$&
191
+ ${c}`);if(o){let e=e=>e.default&&e.tag!==`tag:yaml.org,2002:str`&&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return X_(a,t)}return s?d:U_(d,c,B_,G_(t,!1))}function ev(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==R.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=R.QUOTE_DOUBLE);let c=e=>{switch(e){case R.BLOCK_FOLDED:case R.BLOCK_LITERAL:return i||a?X_(o.value,t):Q_(o,t,n,r);case R.QUOTE_DOUBLE:return J_(o.value,t);case R.QUOTE_SINGLE:return Y_(o.value,t);case R.PLAIN:return $_(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function tv(e,t){let n=Object.assign({blockQuote:!0,commentString:L_,defaultKeyType:null,defaultStringType:`PLAIN`,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:`false`,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:`null`,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function nv(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(r_(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function rv(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(r_(e)||a_(e))&&e.anchor;a&&x_(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function iv(e,t,n,r){if(n_(e))return e.toString(t,n,r);if($g(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=o_(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=nv(t.doc.schema.tags,a);let o=rv(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify==`function`?i.stringify(a,t,n,r):r_(a)?ev(a,t,n,r):a.toString(t,n,r);return o?r_(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}
192
+ ${t.indent}${s}`:s}function av({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=o_(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(a_(e)||!o_(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||a_(e)||(r_(e)?e.type===R.BLOCK_FOLDED||e.type===R.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=iv(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=z_(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=z_(g,n.indent,l(f))),g=`? ${g}
193
+ ${s}:`):(g=`${g}:`,f&&(g+=z_(g,n.indent,l(f))));let _,v,y;o_(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&r_(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&i_(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=iv(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
194
+ `:``,v){let e=l(v);S+=`
195
+ ${R_(e,n.indent)}`}x===``&&!n.inFlow?S===`
196
+ `&&y&&(S=`
197
+
198
+ `):S+=`
199
+ ${n.indent}`}else if(!p&&a_(t)){let e=x[0],r=x.indexOf(`
200
+ `),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e===`&`||e===`!`)){let n=x.indexOf(` `);e===`&`&&n!==-1&&n<r&&x[n+1]===`!`&&(n=x.indexOf(` `,n+1)),(n===-1||r<n)&&(t=!0)}t||(S=`
201
+ ${n.indent}`)}}else(x===``||x[0]===`
202
+ `)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=z_(g,n.indent,l(y)):h&&i&&i(),g}function ov(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}var sv=`<<`,cv={identify:e=>e===sv||typeof e==`symbol`&&e.description===sv,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new R(Symbol(sv)),{addToJSMap:uv}),stringify:()=>sv},lv=(e,t)=>(cv.identify(t)||r_(t)&&(!t.type||t.type===R.PLAIN)&&cv.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===cv.tag&&e.default);function uv(e,t,n){let r=fv(e,n);if(i_(r))for(let n of r.items)dv(e,t,n);else if(Array.isArray(r))for(let n of r)dv(e,t,n);else dv(e,t,r)}function dv(e,t,n){let r=fv(e,n);if(!t_(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function fv(e,t){return e&&$g(t)?t.resolve(e.doc,e):t}function pv(e,t,{key:n,value:r}){if(o_(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(lv(e,n))uv(e,t,r);else{let i=E_(n,``,e);if(t instanceof Map)t.set(i,E_(r,i,e));else if(t instanceof Set)t.add(i);else{let a=mv(n,i,e),o=E_(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function mv(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(o_(e)&&n?.doc){let t=tv(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),ov(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function hv(e,t,n){return new gv(N_(e,void 0,n),N_(t,void 0,n))}var gv=class e{constructor(e,t=null){Object.defineProperty(this,Qg,{value:Yg}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return o_(n)&&(n=n.clone(t)),o_(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return pv(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?av(this,e,t,n):JSON.stringify(this)}};function _v(e,t,n){return(t.inFlow??e.flow?yv:vv)(e,t,n)}function vv({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(o_(i))!d&&i.spaceBefore&&f.push(``),bv(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(n_(i)){let e=o_(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),bv(n,f,e.commentBefore,d))}d=!1;let s=iv(i,u,()=>o=null,()=>d=!0);o&&(s+=z_(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?`
203
+ ${c}${t}`:`
204
+ `}}return e?(p+=`
205
+ `+R_(l(e),c),s&&s()):d&&o&&o(),p}function yv({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(o_(i))i.spaceBefore&&d.push(``),bv(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(n_(i)){let e=o_(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),bv(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=o_(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=iv(i,c,()=>a=null);l||=d.length>u||o.includes(`
206
+ `),n<e.length-1?o+=`,`:t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+=`,`)),a&&(o+=z_(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`
207
+ ${a}${i}${t}`:`
208
+ `;return`${e}
209
+ ${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function bv({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=R_(t(r),e);n.push(i.trimStart())}}function xv(e,t){let n=r_(t)?t.value:t;for(let r of e)if(n_(r)&&(r.key===t||r.key===n||r_(r.key)&&r.key.value===n))return r}var Sv=class extends I_{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(Jg,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(hv(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=n_(e)?e:!e||typeof e!=`object`||!(`key`in e)?new gv(e,e?.value):new gv(e.key,e.value);let r=xv(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);r_(r.value)&&A_(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=xv(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=xv(this.items,e)?.value;return(!t&&r_(n)?n.value:n)??void 0}has(e){return!!xv(this.items,e)}set(e,t){this.add(new gv(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)pv(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!n_(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),_v(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},Cv={collection:`map`,default:!0,nodeClass:Sv,tag:`tag:yaml.org,2002:map`,resolve(e,t){return t_(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>Sv.from(e,t,n)},wv=class extends I_{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(Zg,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=Tv(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=Tv(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&r_(r)?r.value:r}has(e){let t=Tv(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=Tv(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];r_(r)&&A_(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(E_(e,String(r++),t));return n}toString(e,t,n){return e?_v(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(N_(a,void 0,n))}}return i}};function Tv(e){let t=r_(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}var Ev={collection:`seq`,default:!0,nodeClass:wv,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return i_(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>wv.from(e,t,n)},Dv={identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),ev(e,t,n,r)}},Ov={identify:e=>e==null,createNode:()=>new R(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new R(null),stringify:({source:e},t)=>typeof e==`string`&&Ov.test.test(e)?e:t.options.nullStr},kv={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new R(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&kv.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function Av({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==`bigint`)return String(r);let i=typeof r==`number`?r:Number(r);if(!isFinite(i))return isNaN(i)?`.nan`:i<0?`-.inf`:`.inf`;let a=Object.is(r,-0)?`-0`:JSON.stringify(r);if(!e&&t&&(!n||n===`tag:yaml.org,2002:float`)&&/^-?\d/.test(a)&&!a.includes(`e`)){let e=a.indexOf(`.`);e<0&&(e=a.length,a+=`.`);let n=t-(a.length-e-1);for(;n-->0;)a+=`0`}return a}var jv={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:Av},Mv={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Av(e)}},Nv={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new R(parseFloat(e)),n=e.indexOf(`.`);return n!==-1&&e[e.length-1]===`0`&&(t.minFractionDigits=e.length-n-1),t},stringify:Av},Pv=e=>typeof e==`bigint`||Number.isInteger(e),Fv=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function Iv(e,t,n){let{value:r}=e;return Pv(r)&&r>=0?n+r.toString(t):Av(e)}var Lv={identify:e=>Pv(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o[0-7]+$/,resolve:(e,t,n)=>Fv(e,2,8,n),stringify:e=>Iv(e,8,`0o`)},Rv={identify:Pv,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>Fv(e,0,10,n),stringify:Av},zv={identify:e=>Pv(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>Fv(e,2,16,n),stringify:e=>Iv(e,16,`0x`)},Bv=[Cv,Ev,Dv,Ov,kv,Lv,Rv,zv,jv,Mv,Nv];function Vv(e){return typeof e==`bigint`||Number.isInteger(e)}var Hv=({value:e})=>JSON.stringify(e),Uv=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:Hv},{identify:e=>e==null,createNode:()=>new R(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:Hv},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:Hv},{identify:Vv,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>Vv(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Hv}],Wv=[Cv,Ev].concat(Uv,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),Gv={identify:e=>e instanceof Uint8Array,default:!1,tag:`tag:yaml.org,2002:binary`,resolve(e,t){if(typeof atob==`function`){let t=atob(e.replace(/[\n\r]/g,``)),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}return e},stringify({comment:e,type:t,value:n},r,i,a){if(!n)return``;let o=n,s;if(typeof btoa==`function`){let e=``;for(let t=0;t<o.length;++t)e+=String.fromCharCode(o[t]);s=btoa(e)}else throw Error(`This environment does not support writing binary tags; either Buffer or btoa is required`);if(t??=R.BLOCK_LITERAL,t!==R.QUOTE_DOUBLE){let e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(s.length/e),i=Array(n);for(let t=0,r=0;t<n;++t,r+=e)i[t]=s.substr(r,e);s=i.join(t===R.BLOCK_LITERAL?`
210
+ `:` `)}return ev({comment:e,type:t,value:s},r,i,a)}};function Kv(e,t){if(i_(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!n_(r)){if(t_(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new gv(new R(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}
211
+ ${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}
212
+ ${t.comment}`:r.comment}r=e}e.items[n]=n_(r)?r:new gv(r)}}else t(`Expected a sequence for this tag`);return e}function qv(e,t,n){let{replacer:r}=n,i=new wv(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(hv(o,s,n))}return i}var Jv={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:Kv,createNode:qv},Yv=class e extends wv{constructor(){super(),this.add=Sv.prototype.add.bind(this),this.delete=Sv.prototype.delete.bind(this),this.get=Sv.prototype.get.bind(this),this.has=Sv.prototype.has.bind(this),this.set=Sv.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(n_(e)?(r=E_(e.key,``,t),i=E_(e.value,r,t)):r=E_(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=qv(e,t,n),i=new this;return i.items=r.items,i}};Yv.tag=`tag:yaml.org,2002:omap`;var Xv={collection:`seq`,identify:e=>e instanceof Map,nodeClass:Yv,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=Kv(e,t),r=[];for(let{key:e}of n.items)r_(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new Yv,n)},createNode:(e,t,n)=>Yv.from(e,t,n)};function Zv({value:e,source:t},n){return t&&(e?Qv:$v).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var Qv={identify:e=>e===!0,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new R(!0),stringify:Zv},$v={identify:e=>e===!1,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new R(!1),stringify:Zv},ey={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:Av},ty={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,``)),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Av(e)}},ny={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new R(parseFloat(e.replace(/_/g,``))),n=e.indexOf(`.`);if(n!==-1){let r=e.substring(n+1).replace(/_/g,``);r[r.length-1]===`0`&&(t.minFractionDigits=r.length)}return t},stringify:Av},ry=e=>typeof e==`bigint`||Number.isInteger(e);function iy(e,t,n,{intAsBigInt:r}){let i=e[0];if((i===`-`||i===`+`)&&(t+=1),e=e.substring(t).replace(/_/g,``),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return i===`-`?BigInt(-1)*t:t}let a=parseInt(e,n);return i===`-`?-1*a:a}function ay(e,t,n){let{value:r}=e;if(ry(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return Av(e)}var oy={identify:ry,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>iy(e,2,2,n),stringify:e=>ay(e,2,`0b`)},sy={identify:ry,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>iy(e,1,8,n),stringify:e=>ay(e,8,`0`)},cy={identify:ry,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>iy(e,0,10,n),stringify:Av},ly={identify:ry,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>iy(e,2,16,n),stringify:e=>ay(e,16,`0x`)},uy=class e extends Sv{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=n_(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new gv(e.key,null):new gv(e,null),xv(this.items,t.key)||this.items.push(t)}get(e,t){let n=xv(this.items,e);return!t&&n_(n)?r_(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=xv(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new gv(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(hv(e,null,n));return i}};uy.tag=`tag:yaml.org,2002:set`;var dy={collection:`map`,identify:e=>e instanceof Set,nodeClass:uy,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>uy.from(e,t,n),resolve(e,t){if(t_(e)){if(e.hasAllNullValues(!0))return Object.assign(new uy,e);t(`Set items must all have null values`)}else t(`Expected a mapping for this tag`);return e}};function fy(e,t){let n=e[0],r=n===`-`||n===`+`?e.substring(1):e,i=e=>t?BigInt(e):Number(e),a=r.replace(/_/g,``).split(`:`).reduce((e,t)=>e*i(60)+i(t),i(0));return n===`-`?i(-1)*a:a}function py(e){let{value:t}=e,n=e=>e;if(typeof t==`bigint`)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return Av(e);let r=``;t<0&&(r=`-`,t*=n(-1));let i=n(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),r+a.map(e=>String(e).padStart(2,`0`)).join(`:`).replace(/000000\d*$/,``)}var my={identify:e=>typeof e==`bigint`||Number.isInteger(e),default:!0,tag:`tag:yaml.org,2002:int`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>fy(e,n),stringify:py},hy={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>fy(e,!1),stringify:py},gy={identify:e=>e instanceof Date,default:!0,tag:`tag:yaml.org,2002:timestamp`,test:RegExp(`^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$`),resolve(e){let t=e.match(gy.test);if(!t)throw Error(`!!timestamp expects a date, starting with yyyy-mm-dd`);let[,n,r,i,a,o,s]=t.map(Number),c=t[7]?Number((t[7]+`00`).substr(1,3)):0,l=Date.UTC(n,r-1,i,a||0,o||0,s||0,c),u=t[8];if(u&&u!==`Z`){let e=fy(u,!1);Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,``)??``},_y=[Cv,Ev,Dv,Ov,Qv,$v,oy,sy,cy,ly,ey,ty,ny,Gv,cv,Xv,Jv,dy,my,hy,gy],vy=new Map([[`core`,Bv],[`failsafe`,[Cv,Ev,Dv]],[`json`,Wv],[`yaml11`,_y],[`yaml-1.1`,_y]]),yy={binary:Gv,bool:kv,float:Nv,floatExp:Mv,floatNaN:jv,floatTime:hy,int:Rv,intHex:zv,intOct:Lv,intTime:my,map:Cv,merge:cv,null:Ov,omap:Xv,pairs:Jv,seq:Ev,set:dy,timestamp:gy},by={"tag:yaml.org,2002:binary":Gv,"tag:yaml.org,2002:merge":cv,"tag:yaml.org,2002:omap":Xv,"tag:yaml.org,2002:pairs":Jv,"tag:yaml.org,2002:set":dy,"tag:yaml.org,2002:timestamp":gy};function xy(e,t,n){let r=vy.get(t);if(r&&!e)return n&&!r.includes(cv)?r.concat(cv):r.slice();let i=r;if(!i){if(Array.isArray(e))i=[];else{let e=Array.from(vy.keys()).filter(e=>e!==`yaml11`).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}}if(Array.isArray(e))for(let t of e)i=i.concat(t);else typeof e==`function`&&(i=e(i.slice()));return n&&(i=i.concat(cv)),i.reduce((e,t)=>{let n=typeof t==`string`?yy[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(yy).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}var Sy=(e,t)=>e.key<t.key?-1:+(e.key>t.key),Cy=class e{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?xy(e,`compat`):e?xy(null,e):null,this.name=typeof i==`string`&&i||`core`,this.knownTags=r?by:{},this.tags=xy(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,Jg,{value:Cv}),Object.defineProperty(this,Xg,{value:Dv}),Object.defineProperty(this,Zg,{value:Ev}),this.sortMapEntries=typeof a==`function`?a:a===!0?Sy:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function wy(e,t){let n=[],r=t.directives===!0;if(t.directives!==!1&&e.directives){let t=e.directives.toString(e);t?(n.push(t),r=!0):e.directives.docStart&&(r=!0)}r&&n.push(`---`);let i=tv(e,t),{commentString:a}=i.options;if(e.commentBefore){n.length!==1&&n.unshift(``);let t=a(e.commentBefore);n.unshift(R_(t,``))}let o=!1,s=null;if(e.contents){if(o_(e.contents)){if(e.contents.spaceBefore&&r&&n.push(``),e.contents.commentBefore){let t=a(e.contents.commentBefore);n.push(R_(t,``))}i.forceBlockIndent=!!e.comment,s=e.contents.comment}let t=s?void 0:()=>o=!0,c=iv(e.contents,i,()=>s=null,t);s&&(c+=z_(c,``,a(s))),(c[0]===`|`||c[0]===`>`)&&n[n.length-1]===`---`?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(iv(e.contents,i));if(e.directives?.docEnd){if(e.comment){let t=a(e.comment);t.includes(`
213
+ `)?(n.push(`...`),n.push(R_(t,``))):n.push(`... ${t}`)}else n.push(`...`)}else{let t=e.comment;t&&o&&(t=t.replace(/^\n+/,``)),t&&((!o||s)&&n[n.length-1]!==``&&n.push(``),n.push(R_(a(t),``)))}return n.join(`
214
+ `)+`
215
+ `}var Ty=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Qg,{value:qg});let r=null;typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:`warn`,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:`1.2`},n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new b_({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[Qg]:{value:qg}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=o_(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){Ey(this.contents)&&this.contents.add(e)}addIn(e,t){Ey(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=S_(this);e.anchor=!t||n.has(t)?C_(t||`a`,n):t}return new O_(e.anchor)}createNode(e,t,n){let r;if(typeof t==`function`)e=t.call({"":e},``,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e==`number`||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=w_(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=N_(e,l,p);return o&&a_(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new gv(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return Ey(this.contents)?this.contents.delete(e):!1}deleteIn(e){return F_(e)?this.contents!=null&&(this.contents=null,!0):Ey(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return a_(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return F_(e)?!t&&r_(this.contents)?this.contents.value:this.contents:a_(this.contents)?this.contents.getIn(e,t):void 0}has(e){return a_(this.contents)?this.contents.has(e):!1}hasIn(e){return F_(e)?this.contents!==void 0:a_(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=P_(this.schema,[e],t):Ey(this.contents)&&this.contents.set(e,t)}setIn(e,t){F_(e)?this.contents=t:this.contents==null?this.contents=P_(this.schema,Array.from(e),t):Ey(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e==`number`&&(e=String(e));let n;switch(e){case`1.1`:this.directives?this.directives.yaml.version=`1.1`:this.directives=new b_({version:`1.1`}),n={resolveKnownTags:!1,schema:`yaml-1.1`};break;case`1.2`:case`next`:this.directives?this.directives.yaml.version=e:this.directives=new b_({version:e}),n={resolveKnownTags:!0,schema:`core`};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new Cy(Object.assign(n,t));else throw Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==`number`?r:100},s=E_(this.contents,t??``,o);if(typeof i==`function`)for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a==`function`?T_(a,{"":s},``,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);if(`indent`in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return wy(this,e)}};function Ey(e){if(a_(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var Dy=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},Oy=class extends Dy{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},ky=class extends Dy{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}},Ay=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,``);if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o=`…`+o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+`…`),r>1&&/^ *$/.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+`…
216
+ `),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s=` `.repeat(a)+`^`.repeat(e);n.message+=`:
217
+
218
+ ${o}
219
+ ${s}
220
+ `}};function jy(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d=``,f=``,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!==`space`&&i.type!==`newline`&&i.type!==`comma`&&a(i.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),!1),h&&=(l&&i.type!==`comment`&&i.type!==`newline`&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),null),i.type){case`space`:!t&&(n!==`doc-start`||r?.type!==`flow-collection`)&&i.source.includes(` `)&&(h=i),u=!0;break;case`comment`:{u||a(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let e=i.source.substring(1)||` `;d?d+=f+e:d=e,f=``,l=!1;break}case`newline`:l?d?d+=i.source:(!b||n!==`seq-item-ind`)&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case`anchor`:g&&a(i,`MULTIPLE_ANCHORS`,`A node can have at most one anchor`),i.source.endsWith(`:`)&&a(i.offset+i.source.length-1,`BAD_ALIAS`,`Anchor ending in : is ambiguous`,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case`tag`:_&&a(i,`MULTIPLE_TAGS`,`A node can have at most one tag`),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i,`BAD_PROP_ORDER`,`Anchors and tags must be after the ${i.source} indicator`),b&&a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.source} in ${t??`collection`}`),b=i,l=n===`seq-item-ind`||n===`explicit-key-ind`,u=!1;break;case`comma`:if(t){y&&a(i,`UNEXPECTED_TOKEN`,`Unexpected , in ${t}`),y=i,l=!1,u=!1;break}default:a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.type} token`),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!==`space`&&r.type!==`newline`&&r.type!==`comma`&&(r.type!==`scalar`||r.source!==``)&&a(r.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),h&&(l&&h.indent<=o||r?.type===`block-map`||r?.type===`block-seq`)&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}function My(e){if(!e)return null;switch(e.type){case`alias`:case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:if(e.source.includes(`
221
+ `))return!0;if(e.end){for(let t of e.end)if(t.type===`newline`)return!0}return!1;case`flow-collection`:for(let t of e.items){for(let e of t.start)if(e.type===`newline`)return!0;if(t.sep){for(let e of t.sep)if(e.type===`newline`)return!0}if(My(t.key)||My(t.value))return!0}return!1;default:return!0}}function Ny(e,t,n){if(t?.type===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&My(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function Py(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||r_(e)&&r_(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var Fy=`All mapping items must start at the same column`;function Iy({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??Sv)(n.schema);n.atRoot&&=!1;let s=r.offset,c=null;for(let a of r.items){let{start:l,key:u,sep:d,value:f}=a,p=jy(l,{indicator:`explicit-key-ind`,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type===`block-seq`?i(s,`BLOCK_AS_IMPLICIT_KEY`,`A block sequence may not be used as an implicit map key`):`indent`in u&&u.indent!==r.indent&&i(s,`BAD_INDENT`,Fy)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+=`
222
+ `+p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||My(u))&&i(u??l[l.length-1],`MULTILINE_IMPLICIT_KEY`,`Implicit keys need to be on a single line`)}else p.found?.indent!==r.indent&&i(s,`BAD_INDENT`,Fy);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&Ny(r.indent,u,i),n.atKey=!1,Py(n,o.items,g)&&i(h,`DUPLICATE_KEY`,`Map keys must be unique`);let _=jy(d??[],{indicator:`map-value-ind`,next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||u.type===`block-scalar`});if(s=_.end,_.found){m&&(f?.type===`block-map`&&!_.hasNewline&&i(s,`BLOCK_AS_IMPLICIT_KEY`,`Nested mappings are not allowed in compact mappings`),n.options.strict&&p.start<_.found.offset-1024&&i(g.range,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit block mapping key`));let c=f?e(n,f,_,i):t(n,s,d,null,_,i);n.schema.compat&&Ny(r.indent,f,i),s=c.range[2];let l=new gv(g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range,`MISSING_CHAR`,`Implicit map keys need to be followed by map values`),_.comment&&(g.comment?g.comment+=`
223
+ `+_.comment:g.comment=_.comment);let e=new gv(g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c,`IMPOSSIBLE`,`Map comment with trailing content`),o.range=[r.offset,s,c??s],o}function Ly({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??wv)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=jy(a,{indicator:`seq-item-ind`,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found){if(u.anchor||u.tag||l)l?.type===`block-seq`?i(u.end,`BAD_INDENT`,`All sequence items must start at the same column`):i(s,`MISSING_CHAR`,`Sequence item without - indicator`);else{c=u.end,u.comment&&(o.comment=u.comment);continue}}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&Ny(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function Ry(e,t,n,r){let i=``;if(e){let a=!1,o=``;for(let s of e){let{source:e,type:c}=s;switch(c){case`space`:a=!0;break;case`comment`:{n&&!a&&r(s,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let t=e.substring(1)||` `;i?i+=o+t:i=t,o=``;break}case`newline`:i&&(o+=e),a=!0;break;default:r(s,`UNEXPECTED_TOKEN`,`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}var zy=`Block collections are not allowed within flow collections`,By=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function Vy({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new((a?.nodeClass)??(o?Sv:wv))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=jy(d,{flow:s,indicator:`explicit-key-ind`,next:f??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!m){a===0&&h.comma?i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`):a<r.items.length-1&&i(h.start,`UNEXPECTED_TOKEN`,`Unexpected empty item in ${s}`),h.comment&&(c.comment?c.comment+=`
224
+ `+h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&My(f)&&i(f,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`)}if(a===0)h.comma&&i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`);else if(h.comma||i(h.start,`MISSING_CHAR`,`Missing , between ${s} items`),h.comment){let e=``;e:for(let t of d)switch(t.type){case`comma`:case`space`:break;case`comment`:e=t.source.substring(1);break e;default:break e}if(e){let t=c.items[c.items.length-1];n_(t)&&(t=t.value??t.key),t.comment?t.comment+=`
225
+ `+e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],By(m)&&i(r.range,`BLOCK_IN_FLOW`,zy)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);By(f)&&i(g.range,`BLOCK_IN_FLOW`,zy),n.atKey=!1;let _=jy(p??[],{flow:s,indicator:`map-value-ind`,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type===`newline`){i(e,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`);break}}h.start<_.found.offset-1024&&i(_.found,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit flow sequence key`)}}else m&&(`source`in m&&m.source?.[0]===`:`?i(m,`MISSING_CHAR`,`Missing space after : in ${s}`):i(_.start,`MISSING_CHAR`,`Missing , or : between ${s} items`));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?By(m)&&i(v.range,`BLOCK_IN_FLOW`,zy):_.comment&&(g.comment?g.comment+=`
226
+ `+_.comment:g.comment=_.comment);let y=new gv(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;Py(n,e.items,g)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(y)}else{let e=new Sv(n.schema);e.flow=!0,e.items.push(y);let t=(v??g).range;e.range=[g.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:_.end}}let d=o?`}`:`]`,[f,...p]=r.end,m=u;if(f?.source===d)m=f.offset+f.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l?`${e} must end with a ${d}`:`${e} in block collection must be sufficiently indented and end with a ${d}`;i(u,l?`MISSING_CHAR`:`BAD_INDENT`,t),f&&f.source.length!==1&&p.unshift(f)}if(p.length>0){let e=Ry(p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+=`
227
+ `+e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function Hy(e,t,n,r,i,a){let o=n.type===`block-map`?Iy(e,t,n,r,a):n.type===`block-seq`?Ly(e,t,n,r,a):Vy(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function Uy(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a,`TAG_RESOLVE_FAILED`,e)):null;if(n.type===`block-seq`){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n,`MISSING_CHAR`,`Missing newline after block sequence props`)}let s=n.type===`block-map`?`map`:n.type===`block-seq`?`seq`:n.start.source===`{`?`map`:`seq`;if(!a||!o||o===`!`||o===Sv.tagName&&s===`map`||o===wv.tagName&&s===`seq`)return Hy(e,t,n,i,o);let c=t.schema.tags.find(e=>e.tag===o&&e.collection===s);if(!c){let r=t.schema.knownTags[o];if(r?.collection===s)t.schema.tags.push(Object.assign({},r,{default:!1})),c=r;else return r?i(a,`BAD_COLLECTION_TYPE`,`${r.tag} used for ${s} collection, but expects ${r.collection??`scalar`}`,!0):i(a,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${o}`,!0),Hy(e,t,n,i,o)}let l=Hy(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a,`TAG_RESOLVE_FAILED`,e),t.options)??l,d=o_(u)?u:new R(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function Wy(e,t,n){let r=t.offset,i=Gy(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?R.BLOCK_FOLDED:R.BLOCK_LITERAL,o=t.source?Ky(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t===``||t===`\r`)s=e;else break}if(s===0){let e=i.chomp===`+`&&o.length>0?`
228
+ `.repeat(Math.max(1,o.length-1)):``,n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:a,comment:i.comment,range:[r,n,n]}}let c=t.indent+i.indent,l=t.offset+i.length,u=0;for(let t=0;t<s;++t){let[r,a]=o[t];if(a===``||a===`\r`)i.indent===0&&r.length>c&&(c=r.length);else{r.length<c&&n(l+r.length,`MISSING_CHAR`,`Block scalars with more-indented leading empty lines must use an explicit indentation indicator`),i.indent===0&&(c=r.length),u=t,c===0&&!e.atRoot&&n(l,`BAD_INDENT`,`Block scalar values in collections must be indented`);break}l+=r.length+a.length+1}for(let e=o.length-1;e>=s;--e)o[e][0].length>c&&(s=e+1);let d=``,f=``,p=!1;for(let e=0;e<u;++e)d+=o[e][0].slice(c)+`
229
+ `;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]===`\r`;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e=`Block scalar lines must not be less indented than their ${i.indent?`explicit indentation indicator`:`first line`}`;n(l-r.length-(s?2:1),`BAD_INDENT`,e),t=``}a===R.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f=`
230
+ `):t.length>c||r[0]===` `?(f===` `?f=`
231
+ `:!p&&f===`
232
+ `&&(f=`
233
+
234
+ `),d+=f+t.slice(c)+r,f=`
235
+ `,p=!0):r===``?f===`
236
+ `?d+=`
237
+ `:f=`
238
+ `:(d+=f+r,f=` `,p=!1)}switch(i.chomp){case`-`:break;case`+`:for(let e=s;e<o.length;++e)d+=`
239
+ `+o[e][0].slice(c);d[d.length-1]!==`
240
+ `&&(d+=`
241
+ `);break;default:d+=`
242
+ `}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function Gy({offset:e,props:t},n,r){if(t[0].type!==`block-scalar-header`)return r(t[0],`IMPOSSIBLE`,`Block scalar header not found`),null;let{source:i}=t[0],a=i[0],o=0,s=``,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n===`-`||n===`+`))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c,`UNEXPECTED_TOKEN`,`Block scalar header includes extra characters: ${i}`);let l=!1,u=``,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case`space`:l=!0;case`newline`:d+=i.source.length;break;case`comment`:n&&!l&&r(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`),d+=i.source.length,u=i.source.substring(1);break;case`error`:r(i,`UNEXPECTED_TOKEN`,i.message),d+=i.source.length;break;default:{r(i,`UNEXPECTED_TOKEN`,`Unexpected token in block scalar header: ${i.type}`);let e=i.source;e&&typeof e==`string`&&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function Ky(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[``,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function qy(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case`scalar`:s=R.PLAIN,c=Jy(a,l);break;case`single-quoted-scalar`:s=R.QUOTE_SINGLE,c=Yy(a,l);break;case`double-quoted-scalar`:s=R.QUOTE_DOUBLE,c=Zy(a,l);break;default:return n(e,`UNEXPECTED_TOKEN`,`Expected a flow scalar value, but found: ${i}`),{value:``,type:null,comment:``,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=Ry(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function Jy(e,t){let n=``;switch(e[0]){case` `:n=`a tab character`;break;case`,`:n=`flow indicator character ,`;break;case`%`:n=`directive indicator character %`;break;case`|`:case`>`:n=`block scalar indicator ${e[0]}`;break;case`@`:case"`":n=`reserved character ${e[0]}`}return n&&t(0,`BAD_SCALAR_START`,`Plain value cannot start with ${n}`),Xy(e)}function Yy(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),Xy(e.slice(1,-1)).replace(/''/g,`'`)}function Xy(e){let t,n;try{t=RegExp(`(.*?)(?<![ ])[ ]*\r?
243
+ `,`sy`),n=RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
244
+ `,`sy`)}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],a=` `,o=t.lastIndex;for(n.lastIndex=o;r=n.exec(e);)r[1]===``?a===`
245
+ `?i+=a:a=`
246
+ `:(i+=a+r[1],a=` `),o=n.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,r=s.exec(e),i+a+(r?.[1]??``)}function Zy(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!==`\r`||e[r+1]!==`
247
+ `){if(i===`
248
+ `){let{fold:t,offset:i}=Qy(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=$y[i];if(a)n+=a;else if(i===`
249
+ `)for(i=e[r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`\r`&&e[r+1]===`
250
+ `)for(i=e[++r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`x`||i===`u`||i===`U`){let a=i===`x`?2:i===`u`?4:8;n+=eb(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),n+=i}}else if(i===` `||i===` `){let t=r,a=e[r+1];for(;a===` `||a===` `;)a=e[++r+1];a!==`
251
+ `&&(a!==`\r`||e[r+2]!==`
252
+ `)&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}}return(e[e.length-1]!==`"`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing "quote`),n}function Qy(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
253
+ `||r===`\r`)&&(r!==`\r`||e[t+2]===`
254
+ `);)r===`
255
+ `&&(n+=`
256
+ `),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}var $y={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
257
+ `,r:`\r`,t:` `,v:`\v`,N:`…`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function eb(e,t,n,r){let i=e.substr(t,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(a)}catch{let i=e.substr(t-2,n+2);return r(t-2,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),i}}function tb(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?Wy(e,t,r):qy(t,e.options.strict,r),c=n?e.directives.tagName(n.source,e=>r(n,`TAG_RESOLVE_FAILED`,e)):null,l;l=e.options.stringKeys&&e.atKey?e.schema[Xg]:c?nb(e.schema,i,c,n,r):t.type===`scalar`?rb(e,i,t,r):e.schema[Xg];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=r_(a)?a:new R(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new R(i)}return u.range=s,u.source=i,a&&(u.type=a),c&&(u.tag=c),l.format&&(u.format=l.format),o&&(u.comment=o),u}function nb(e,t,n,r,i){if(n===`!`)return e[Xg];let a=[];for(let t of e.tags)if(!t.collection&&t.tag===n){if(t.default&&t.test)a.push(t);else return t}for(let e of a)if(e.test?.test(t))return e;let o=e.knownTags[n];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${n}`,n!==`tag:yaml.org,2002:str`),e[Xg])}function rb({atKey:e,directives:t,schema:n},r,i,a){let o=n.tags.find(t=>(t.default===!0||e&&t.default===`key`)&&t.test?.test(r))||n[Xg];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[Xg];o.tag!==e.tag&&a(i,`TAG_RESOLVE_FAILED`,`Value may be parsed as either ${t.tagString(o.tag)} or ${t.tagString(e.tag)}`,!0)}return o}function ib(e,t,n){if(t){n??=t.length;for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case`space`:case`comment`:case`newline`:e-=n.source.length;continue}for(n=t[++r];n?.type===`space`;)e+=n.source.length,n=t[++r];break}}return e}var ab={composeNode:ob,composeEmptyNode:sb};function ob(e,t,n,r){let i=e.atKey,{spaceBefore:a,comment:o,anchor:s,tag:c}=n,l,u=!0;switch(t.type){case`alias`:l=cb(e,t,r),(s||c)&&r(t,`ALIAS_PROPS`,`An alias node must not specify any properties`);break;case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`block-scalar`:l=tb(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:try{l=Uy(ab,e,t,n,r),s&&(l.anchor=s.source.substring(1))}catch(e){r(t,`RESOURCE_EXHAUSTION`,e instanceof Error?e.message:String(e))}break;default:r(t,`UNEXPECTED_TOKEN`,t.type===`error`?t.message:`Unsupported token (type: ${t.type})`),u=!1}return l??=sb(e,t.offset,void 0,null,n,r),s&&l.anchor===``&&r(s,`BAD_ALIAS`,`Anchor cannot be an empty string`),i&&e.options.stringKeys&&(!r_(l)||typeof l.value!=`string`||l.tag&&l.tag!==`tag:yaml.org,2002:str`)&&r(c??t,`NON_STRING_KEY`,`With stringKeys, all keys must be strings`),a&&(l.spaceBefore=!0),o&&(t.type===`scalar`&&t.source===``?l.comment=o:l.commentBefore=o),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function sb(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=tb(e,{type:`scalar`,offset:ib(t,n,r),indent:-1,source:``},s,l);return o&&(u.anchor=o.source.substring(1),u.anchor===``&&l(o,`BAD_ALIAS`,`Anchor cannot be an empty string`)),i&&(u.spaceBefore=!0),a&&(u.comment=a,u.range[2]=c),u}function cb({options:e},{offset:t,source:n,end:r},i){let a=new O_(n.substring(1));a.source===``&&i(t,`BAD_ALIAS`,`Alias cannot be an empty string`),a.source.endsWith(`:`)&&i(t+n.length-1,`BAD_ALIAS`,`Alias ending in : is ambiguous`,!0);let o=t+n.length,s=Ry(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function lb(e,t,{offset:n,start:r,value:i,end:a},o){let s=new Ty(void 0,Object.assign({_directives:t},e)),c={atKey:!1,atRoot:!0,directives:s.directives,options:s.options,schema:s.schema},l=jy(r,{indicator:`doc-start`,next:i??a?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(s.directives.docStart=!0,i&&(i.type===`block-map`||i.type===`block-seq`)&&!l.hasNewline&&o(l.end,`MISSING_CHAR`,`Block collection cannot start on same line with directives-end marker`)),s.contents=i?ob(c,i,l,o):sb(c,l.end,r,null,l,o);let u=s.contents.range[2],d=Ry(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function ub(e){if(typeof e==`number`)return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n==`string`?n.length:1)]}function db(e){let t=``,n=!1,r=!1;for(let i=0;i<e.length;++i){let a=e[i];switch(a[0]){case`#`:t+=(t===``?``:r?`
258
+
259
+ `:`
260
+ `)+(a.substring(1)||` `),n=!0,r=!1;break;case`%`:e[i+1]?.[0]!==`#`&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var fb=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=ub(e);r?this.warnings.push(new ky(i,t,n)):this.errors.push(new Oy(i,t,n))},this.directives=new b_({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=db(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}
261
+ ${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(a_(i)&&!i.flow&&i.items.length>0){let e=i.items[0];n_(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}
262
+ ${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}
263
+ ${e}`:n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:db(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case`directive`:this.directives.add(e.source,(t,n,r)=>{let i=ub(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=lb(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,`MISSING_CHAR`,`Missing directives-end/doc-start indicator line`),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case`byte-order-mark`:case`space`:break;case`comment`:case`newline`:this.prelude.push(e.source);break;case`error`:{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new Oy(ub(e),`UNEXPECTED_TOKEN`,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case`doc-end`:{if(!this.doc){this.errors.push(new Oy(ub(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=Ry(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}
264
+ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Oy(ub(e),`UNEXPECTED_TOKEN`,`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new Ty(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,`MISSING_CHAR`,`Missing directives-end indicator line`),e.range=[0,t,t],this.decorate(e,!1),yield e}}},pb={};Rp(pb,{BOM:()=>Ob,DOCUMENT:()=>kb,FLOW_END:()=>Ab,SCALAR:()=>jb,createScalarToken:()=>hb,isCollection:()=>Mb,isScalar:()=>Nb,prettyToken:()=>Pb,resolveAsScalar:()=>mb,setScalarValue:()=>gb,stringify:()=>bb,tokenType:()=>Fb,visit:()=>Eb});function mb(e,t=!0,n){if(e){let r=(e,t,r)=>{let i=typeof e==`number`?e:Array.isArray(e)?e[0]:e.offset;if(n)n(i,t,r);else throw new Oy([i,i+1],t,r)};switch(e.type){case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return qy(e,t,r);case`block-scalar`:return Wy({options:{strict:t}},e,r)}}return null}function hb(e,t){let{implicitKey:n=!1,indent:r,inFlow:i=!1,offset:a=-1,type:o=`PLAIN`}=t,s=ev({type:o,value:e},{implicitKey:n,indent:r>0?` `.repeat(r):``,inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),c=t.end??[{type:`newline`,offset:-1,indent:r,source:`
265
+ `}];switch(s[0]){case`|`:case`>`:{let e=s.indexOf(`
266
+ `),t=s.substring(0,e),n=s.substring(e+1)+`
267
+ `,i=[{type:`block-scalar-header`,offset:a,indent:r,source:t}];return vb(i,c)||i.push({type:`newline`,offset:-1,indent:r,source:`
268
+ `}),{type:`block-scalar`,offset:a,indent:r,props:i,source:n}}case`"`:return{type:`double-quoted-scalar`,offset:a,indent:r,source:s,end:c};case`'`:return{type:`single-quoted-scalar`,offset:a,indent:r,source:s,end:c};default:return{type:`scalar`,offset:a,indent:r,source:s,end:c}}}function gb(e,t,n={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:a=!1,type:o}=n,s=`indent`in e?e.indent:null;if(r&&typeof s==`number`&&(s+=2),!o)switch(e.type){case`single-quoted-scalar`:o=`QUOTE_SINGLE`;break;case`double-quoted-scalar`:o=`QUOTE_DOUBLE`;break;case`block-scalar`:{let t=e.props[0];if(t.type!==`block-scalar-header`)throw Error(`Invalid block scalar header`);o=t.source[0]===`>`?`BLOCK_FOLDED`:`BLOCK_LITERAL`;break}default:o=`PLAIN`}let c=ev({type:o,value:t},{implicitKey:i||s===null,indent:s!==null&&s>0?` `.repeat(s):``,inFlow:a,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case`|`:case`>`:_b(e,c);break;case`"`:yb(e,c,`double-quoted-scalar`);break;case`'`:yb(e,c,`single-quoted-scalar`);break;default:yb(e,c,`scalar`)}}function _b(e,t){let n=t.indexOf(`
269
+ `),r=t.substring(0,n),i=t.substring(n+1)+`
270
+ `;if(e.type===`block-scalar`){let t=e.props[0];if(t.type!==`block-scalar-header`)throw Error(`Invalid block scalar header`);t.source=r,e.source=i}else{let{offset:t}=e,n=`indent`in e?e.indent:-1,a=[{type:`block-scalar-header`,offset:t,indent:n,source:r}];vb(a,`end`in e?e.end:void 0)||a.push({type:`newline`,offset:-1,indent:n,source:`
271
+ `});for(let t of Object.keys(e))t!==`type`&&t!==`offset`&&delete e[t];Object.assign(e,{type:`block-scalar`,indent:n,props:a,source:i})}}function vb(e,t){if(t)for(let n of t)switch(n.type){case`space`:case`comment`:e.push(n);break;case`newline`:return e.push(n),!0}return!1}function yb(e,t,n){switch(e.type){case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:e.type=n,e.source=t;break;case`block-scalar`:{let r=e.props.slice(1),i=t.length;e.props[0].type===`block-scalar-header`&&(i-=e.props[0].source.length);for(let e of r)e.offset+=i;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case`block-map`:case`block-seq`:{let r={type:`newline`,offset:e.offset+t.length,indent:e.indent,source:`
272
+ `};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{let r=`indent`in e?e.indent:-1,i=`end`in e&&Array.isArray(e.end)?e.end.filter(e=>e.type===`space`||e.type===`comment`||e.type===`newline`):[];for(let t of Object.keys(e))t!==`type`&&t!==`offset`&&delete e[t];Object.assign(e,{type:n,indent:r,source:t,end:i})}}}var bb=e=>`type`in e?xb(e):Sb(e);function xb(e){switch(e.type){case`block-scalar`:{let t=``;for(let n of e.props)t+=xb(n);return t+e.source}case`block-map`:case`block-seq`:{let t=``;for(let n of e.items)t+=Sb(n);return t}case`flow-collection`:{let t=e.start.source;for(let n of e.items)t+=Sb(n);for(let n of e.end)t+=n.source;return t}case`document`:{let t=Sb(e);if(e.end)for(let n of e.end)t+=n.source;return t}default:{let t=e.source;if(`end`in e&&e.end)for(let n of e.end)t+=n.source;return t}}}function Sb({start:e,key:t,sep:n,value:r}){let i=``;for(let t of e)i+=t.source;if(t&&(i+=xb(t)),n)for(let e of n)i+=e.source;return r&&(i+=xb(r)),i}var Cb=Symbol(`break visit`),wb=Symbol(`skip children`),Tb=Symbol(`remove item`);function Eb(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),Db(Object.freeze([]),e,t)}Eb.BREAK=Cb,Eb.SKIP=wb,Eb.REMOVE=Tb,Eb.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},Eb.parentCollection=(e,t)=>{let n=Eb.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function Db(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=Db(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else{if(r===Cb)return Cb;r===Tb&&(a.items.splice(t,1),--t)}}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}var Ob=``,kb=``,Ab=``,jb=``,Mb=e=>!!e&&`items`in e,Nb=e=>!!e&&(e.type===`scalar`||e.type===`single-quoted-scalar`||e.type===`double-quoted-scalar`||e.type===`block-scalar`);function Pb(e){switch(e){case Ob:return`<BOM>`;case kb:return`<DOC>`;case Ab:return`<FLOW_END>`;case jb:return`<SCALAR>`;default:return JSON.stringify(e)}}function Fb(e){switch(e){case Ob:return`byte-order-mark`;case kb:return`doc-mode`;case Ab:return`flow-error-end`;case jb:return`scalar`;case`---`:return`doc-start`;case`...`:return`doc-end`;case``:case`
273
+ `:case`\r
274
+ `:return`newline`;case`-`:return`seq-item-ind`;case`?`:return`explicit-key-ind`;case`:`:return`map-value-ind`;case`{`:return`flow-map-start`;case`}`:return`flow-map-end`;case`[`:return`flow-seq-start`;case`]`:return`flow-seq-end`;case`,`:return`comma`}switch(e[0]){case` `:case` `:return`space`;case`#`:return`comment`;case`%`:return`directive-line`;case`*`:return`alias`;case`&`:return`anchor`;case`!`:return`tag`;case`'`:return`single-quoted-scalar`;case`"`:return`double-quoted-scalar`;case`|`:case`>`:return`block-scalar-header`}return null}function Ib(e){switch(e){case void 0:case` `:case`
275
+ `:case`\r`:case` `:return!0;default:return!1}}var Lb=new Set(`0123456789ABCDEFabcdef`),Rb=new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),zb=new Set(`,[]{}`),Bb=new Set(` ,[]{}
276
+ \r `),Vb=e=>!e||Bb.has(e),Hb=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer=``,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!=`string`)throw TypeError(`source is not a string`);this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??`stream`;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===` `||t===` `;)t=this.buffer[++e];return!t||t===`#`||t===`
277
+ `||t===`\r`&&this.buffer[e+1]===`
278
+ `}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===` `;)t=this.buffer[++n+e];if(t===`\r`){let t=this.buffer[n+e+1];if(t===`
279
+ `||!t&&!this.atEnd)return e+n+1}return t===`
280
+ `||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&Ib(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!=`number`||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
281
+ `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]===`\r`&&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case`stream`:return yield*this.parseStream();case`line-start`:return yield*this.parseLineStart();case`block-start`:return yield*this.parseBlockStart();case`doc`:return yield*this.parseDocument();case`flow`:return yield*this.parseFlowCollection();case`quoted-scalar`:return yield*this.parseQuotedScalar();case`block-scalar`:return yield*this.parseBlockScalar();case`plain-scalar`:return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext(`stream`);if(e[0]===Ob&&(yield*this.pushCount(1),e=e.substring(1)),e[0]===`%`){let t=e.length,n=e.indexOf(`#`);for(;n!==-1;){let r=e[n-1];if(r===` `||r===` `){t=n-1;break}n=e.indexOf(`#`,n+1)}for(;;){let n=e[t-1];if(n===` `||n===` `)--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),`stream`}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),`stream`}return yield kb,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext(`line-start`);if(e===`-`||e===`.`){if(!this.atEnd&&!this.hasChars(4))return this.setNext(`line-start`);let e=this.peek(3);if((e===`---`||e===`...`)&&Ib(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e===`---`?`doc`:`stream`}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Ib(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext(`block-start`);if((e===`-`||e===`?`||e===`:`)&&Ib(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,`block-start`}return`doc`}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext(`doc`);let t=yield*this.pushIndicators();switch(e[t]){case`#`:yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),`doc`;case`*`:return yield*this.pushUntil(Vb),`doc`;case`"`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&Ib(r[3]))&&(n!==this.indentNext-1||this.flowLevel!==1||r[0]!==`]`&&r[0]!==`}`))return this.flowLevel=0,yield Ab,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(Vb),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||Ib(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`'`)for(;t!==-1&&this.buffer[t+1]===`'`;)t=this.buffer.indexOf(`'`,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]===`\\`;)e+=1;if(e%2==0)break;t=this.buffer.indexOf(`"`,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
282
+ `,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf(`
283
+ `,e)}r!==-1&&(t=r-(n[r-1]===`\r`?2:1))}if(t===-1){if(!this.atEnd)return this.setNext(`quoted-scalar`);t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?`flow`:`doc`}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t===`+`)this.blockScalarKeep=!0;else if(t>`0`&&t<=`9`)this.blockScalarIndent=Number(t)-1;else if(t!==`-`)break}return yield*this.pushUntil(e=>Ib(e)||e===`#`)}*parseBlockScalar(){let e=this.pos-1,t=0,n;e:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case` `:t+=1;break;case`
284
+ `:e=r,t=0;break;case`\r`:{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext(`block-scalar`);if(e===`
285
+ `)break}default:break e}if(!n&&!this.atEnd)return this.setNext(`block-scalar`);if(t>=this.indentNext){this.indentNext=this.blockScalarIndent===-1?t:this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf(`
286
+ `,t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext(`block-scalar`);e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n===` `;)n=this.buffer[++r];if(n===` `){for(;n===` `||n===` `||n===`\r`||n===`
287
+ `;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let n=e-1,r=this.buffer[n];r===`\r`&&(r=this.buffer[--n]);let i=n;for(;r===` `;)r=this.buffer[--n];if(r===`
288
+ `&&n>=this.pos&&n+1+t>i)e=n;else break}while(!0);return yield jb,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===`:`){let r=this.buffer[n+1];if(Ib(r)||e&&zb.has(r))break;t=n}else if(Ib(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
289
+ `?(n+=1,r=`
290
+ `,i=this.buffer[n+1]):t=n),i===`#`||e&&zb.has(i))break;if(r===`
291
+ `){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&zb.has(r))break;t=n}return!r&&!this.atEnd?this.setNext(`plain-scalar`):(yield jb,yield*this.pushToIndex(t+1,!0),e?`flow`:`doc`)}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield``),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case`!`:e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case`&`:e+=yield*this.pushUntil(Vb),e+=yield*this.pushSpaces(!0);continue e;case`-`:case`?`:case`:`:{let t=this.flowLevel>0,n=this.charAt(1);if(Ib(n)||t&&zb.has(n)){t?this.flowKey&&=!1:this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)===`<`){let e=this.pos+2,t=this.buffer[e];for(;!Ib(t)&&t!==`>`;)t=this.buffer[++e];return yield*this.pushToIndex(t===`>`?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(Rb.has(t))t=this.buffer[++e];else if(t===`%`&&Lb.has(this.buffer[e+1])&&Lb.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
292
+ `?yield*this.pushCount(1):e===`\r`&&this.charAt(1)===`
293
+ `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===` `||e&&n===` `);let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},Ub=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function Wb(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function Gb(e){for(let t=0;t<e.length;++t)switch(e[t].type){case`space`:case`comment`:case`newline`:break;default:return t}return-1}function Kb(e){switch(e?.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`flow-collection`:return!0;default:return!1}}function qb(e){switch(e.type){case`document`:return e.start;case`block-map`:{let t=e.items[e.items.length-1];return t.sep??t.start}case`block-seq`:return e.items[e.items.length-1].start;default:return[]}}function Jb(e){if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case`doc-start`:case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:case`newline`:break e}for(;e[++t]?.type===`space`;);return e.splice(t,e.length)}function Yb(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function Xb(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!Wb(t.start,`explicit-key-ind`)&&!Wb(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,Kb(t.value)?t.value.end?Yb(t.value.end,t.sep):t.value.end=t.sep:Yb(t.start,t.sep),delete t.sep)}var Zb=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source=``,this.type=``,this.lexer=new Hb,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=Fb(e);if(t){if(t===`scalar`)this.atNewLine=!1,this.atScalar=!0,this.type=`scalar`;else{switch(this.type=t,yield*this.step(),t){case`newline`:this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case`space`:this.atNewLine&&e[0]===` `&&(this.indent+=e.length);break;case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:this.atNewLine&&(this.indent+=e.length);break;case`doc-mode`:case`flow-error-end`:return;default:this.atNewLine=!1}this.offset+=e.length}}else{let t=`Not a YAML token: ${e}`;yield*this.pop({type:`error`,offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type===`doc-end`&&e?.type!==`doc-end`){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:`doc-end`,offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case`document`:return yield*this.document(e);case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return yield*this.scalar(e);case`block-scalar`:return yield*this.blockScalar(e);case`block-map`:return yield*this.blockMap(e);case`block-seq`:return yield*this.blockSequence(e);case`flow-collection`:return yield*this.flowCollection(e);case`doc-end`:return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:`error`,offset:this.offset,source:``,message:`Tried to pop an empty stack`};else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type===`block-scalar`?t.indent=`indent`in e?e.indent:0:t.type===`flow-collection`&&e.type===`document`&&(t.indent=0),t.type===`flow-collection`&&Xb(t),e.type){case`document`:e.value=t;break;case`block-scalar`:e.props.push(t);break;case`block-map`:{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case`block-seq`:{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case`flow-collection`:{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type===`document`||e.type===`block-map`||e.type===`block-seq`)&&(t.type===`block-map`||t.type===`block-seq`)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&Gb(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!==`comment`||e.indent<t.indent))&&(e.type===`document`?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case`directive-line`:yield{type:`directive`,offset:this.offset,source:this.source};return;case`byte-order-mark`:case`space`:case`comment`:case`newline`:yield this.sourceToken;return;case`doc-mode`:case`doc-start`:{let e={type:`document`,offset:this.offset,start:[]};this.type===`doc-start`&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case`doc-start`:Gb(e.start)===-1?e.start.push(this.sourceToken):(yield*this.pop(),yield*this.step());return;case`anchor`:case`tag`:case`space`:case`comment`:case`newline`:e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type===`map-value-ind`){let t=Jb(qb(this.peek(2))),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let r={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case`space`:case`comment`:case`newline`:e.props.push(this.sourceToken);return;case`scalar`:if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf(`
294
+ `)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
295
+ `,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(this.onKeyLine=!1,t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Yb(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!==`seq-item-ind`,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case`newline`:n.push(r);break;case`space`:break;case`comment`:i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case`anchor`:case`tag`:r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`explicit-key-ind`:!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case`map-value-ind`:if(t.explicitKey){if(t.sep){if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Wb(t.sep,`map-value-ind`))this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(Kb(t.key)&&!Wb(t.sep,`newline`)){let e=Jb(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken)}else if(Wb(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=Jb(t.start);this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}}else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):Wb(t.sep,`map-value-ind`)?this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type===`block-seq`){if(!t.explicitKey&&t.sep&&!Wb(t.sep,`newline`)){yield*this.pop({type:`error`,offset:this.offset,message:`Unexpected block-seq-ind on same line with key`,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Yb(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case`anchor`:case`tag`:if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case`seq-item-ind`:if(this.indent!==e.indent)break;t.value||Wb(t.start,`seq-item-ind`)?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type===`flow-error-end`){let e;do yield*this.pop(),e=this.peek(1);while(e?.type===`flow-collection`)}else if(e.end.length===0){switch(this.type){case`comma`:case`explicit-key-ind`:!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case`map-value-ind`:!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case`space`:case`comment`:case`newline`:case`anchor`:case`tag`:!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case`flow-map-end`:case`flow-seq-end`:e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if(t.type===`block-map`&&(this.type===`map-value-ind`&&t.indent===e.indent||this.type===`newline`&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type===`map-value-ind`&&t.type!==`flow-collection`){let n=Jb(qb(t));Xb(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf(`
296
+ `)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
297
+ `,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=Jb(qb(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=Jb(qb(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}};function Qb(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new Ub||null,prettyErrors:t}}function $b(e,t={}){let{lineCounter:n,prettyErrors:r}=Qb(t),i=new Zb(n?.addNewLine),a=new fb(t),o=Array.from(a.compose(i.parse(e)));if(r&&n)for(let t of o)t.errors.forEach(Ay(e,n)),t.warnings.forEach(Ay(e,n));return o.length>0?o:Object.assign([],{empty:!0},a.streamInfo())}function ex(e,t={}){let{lineCounter:n,prettyErrors:r}=Qb(t),i=new Zb(n?.addNewLine),a=new fb(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new Oy(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(Ay(e,n)),o.warnings.forEach(Ay(e,n))),o}function tx(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let i=ex(e,n);if(!i)return null;if(i.warnings.forEach(e=>ov(i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!==`silent`)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function nx(e,t,n){let r=null;if(typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n==`string`&&(n=n.length),typeof n==`number`){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(e===void 0){let{keepUndefined:e}=n??t??{};if(!e)return}return e_(e)&&!r?e.toString(n):new Ty(e,r,n).toString(n)}var rx=Gg;function ix(e,t,n){let r=e.srcToken;if(!r||r.type!==`flow-collection`)throw Error(`Expected flow-collection CST node for flow sequence`);let i=e.items.map((e,n)=>{let i=r.items[n];if(ax(e,i))return zg(Wg(e.items),i,t,Ig);if(n_(e))return zg(e,i,t,Ig);{let n=[];for(let e of Sg(i.start)){if(wg(e)){n.push(e);continue}if(e.type!==`comma`)throw Error(`Unexpected token type in sequence item start: ${e.type}`)}let r=t.transformNode(e,{tokens:n});return Ug(mg(r.position.start,r.position.end),r)}});if(e.items.length<r.items.length)for(let n=e.items.length;n<r.items.length;n++){let e=r.items[n];for(let n of Tg(e.start,t))if(n.type!==`comma`)throw Error(`Unexpected token type in collection item start: ${n.type}`)}let a=null;for(let e of Sg(r.end)){if(e.type===`comment`){t.transformComment(e);continue}if(e.type===`flow-seq-end`){a=e;continue}throw Error(`Unexpected token type in flow seq end: ${e.type}`)}if(!a)throw Error(`Expected flow-seq-end token`);return Hg(t.transformRange([r.start.offset,a.offset+a.source.length]),t.transformContentProperties(e,n.tokens),i)}function ax(e,t){return e.srcToken||!t_(e)?!1:e.items.length===1&&e.items[0].srcToken===t}function ox(e,t,n){return{type:`mapping`,position:e,leadingComments:[],...t,children:n}}function sx(e,t,n){return{type:`mappingItem`,position:e,leadingComments:[],children:[t,n]}}function cx(e,t,n){let r=e.srcToken;if(!r||r.type!==`block-map`)throw Error(`Expected block mapping srcToken`);let i=e.items.map((e,n)=>{let i=r.items[n];return zg(e,i,t,sx)});if(e.items.length<r.items.length)for(let n=e.items.length;n<r.items.length;n++){let e=r.items[n];for(let n of Tg(e.start,t))throw Error(`Unexpected token type in collection item start: ${n.type}`)}return ox(mg(i[0].position.start,Wg(i).position.end),t.transformContentProperties(e,n.tokens),i)}function lx(e,t,n){return{type:`plain`,position:e,leadingComments:[],trailingComment:null,...t,value:n}}function ux(e,t,n){for(let r=t;r>=0;r--)if(n.test(e[r]))return r;return-1}function dx(e,t,n){if(e.range[0]===e.range[1]){let r=ux(t.text,e.range[0]-1,/\S/u)+1;return lx(t.transformRange([r,r]),t.transformContentProperties(e,n.tokens),``)}let r=e.srcToken;if(!r||r.type!==`scalar`)throw Error(`Expected plain scalar srcToken`);for(let e of Tg(r.end,t))throw Error(`Unexpected token type in plain scalar end: ${e.type}`);return lx(t.transformRange(e.range),t.transformContentProperties(e,n.tokens),e.source)}function fx(e){return{...e,type:`quoteDouble`}}function px(e,t,n){return{type:`quoteValue`,position:e,...t,leadingComments:[],trailingComment:null,value:n}}function mx(e,t,n,r){for(let e of Tg(t.end,n))throw Error(`Unexpected token type in quote value end: ${e.type}`);return px(n.transformRange(e.range),n.transformContentProperties(e,r.tokens),e.source)}function hx(e,t,n){let r=e.srcToken;if(!r||r.type!==`double-quoted-scalar`)throw Error(`Expected double-quoted scalar srcToken`);return fx(mx(e,r,t,n))}function gx(e){return{...e,type:`quoteSingle`}}function _x(e,t,n){let r=e.srcToken;if(!r||r.type!==`single-quoted-scalar`)throw Error(`Expected single-quoted scalar srcToken`);return gx(mx(e,r,t,n))}function vx(e,t,n){return{type:`sequence`,position:e,leadingComments:[],endComments:[],...t,children:n}}function yx(e,t){return{type:`sequenceItem`,position:e,leadingComments:[],trailingComment:null,endComments:[],children:t?[t]:[]}}function bx(e,t,n){let r=e.srcToken;if(!r||r.type!==`block-seq`)throw Error(`Expected block sequence srcToken`);let i=e.items.map((e,n)=>{let i=r.items[n],a=[],o=null;for(let e of Sg(i.start)){if(wg(e)){a.push(e);continue}if(e.type===`seq-item-ind`){o=e;continue}throw Error(`Unexpected token type in sequence item start: ${e.type}`)}let s=xx(e,t,{tokens:a});return yx(mg(o?t.transformOffset(o.offset):s.position.start,s?.position.end??t.transformOffset(o.offset+o.source.length)),s)});if(e.items.length<r.items.length)for(let n=e.items.length;n<r.items.length;n++){let e=r.items[n];for(let n of Tg(e.start,t))throw Error(`Unexpected token type in collection item start: ${n.type}`)}return vx(mg(i[0].position.start,Wg(i).position.end),t.transformContentProperties(e,n.tokens),i)}function xx(e,t,n){if(!n_(e))return Cx(e,n)?(Tg(n.tokens,t),null):t.transformNode(e,n);let r=e.srcToken,i=zg(e,r,t,sx);return ox(i.position,t.transformContentProperties(e.key,n.tokens),[i])}function Sx(e,t,n){if(e==null)return null;if($g(e))return Eg(e,t,n);if(t_(e))return e.flow?Vg(e,t,n):cx(e,t,n);if(i_(e))return e.flow?ix(e,t,n):bx(e,t,n);if(r_(e)){switch(e.type){case`BLOCK_FOLDED`:return jg(e,t,n);case`BLOCK_LITERAL`:return Ng(e,t,n);case`PLAIN`:return dx(e,t,n);case`QUOTE_DOUBLE`:return hx(e,t,n);case`QUOTE_SINGLE`:return _x(e,t,n)}throw Error(`Unexpected scalar type: ${e.type}`)}throw Error(`Unexpected unknown node type`)}function Cx(e,t){return!e||e.range[0]===e.range[1]&&t.tokens.every(e=>e.type===`comment`)}var wx=class{text;comments=[];#e;constructor(e,t){this.text=e,this.#e=t}transformOffset(e){let{line:t,col:n}=this.#e.linePos(e);return{line:t,column:n,offset:e}}transformRange(e){let[t,n]=e.map(e=>this.transformOffset(e));return mg(t,n)}transformNode(e,t){return Sx(e,this,t)}transformComment(e){let t=gg(e,this);return this.comments.push(t),t}transformContentProperties(e,t){return bg(e,t,this)}};function Tx(e,t,n,r,i,a){return{type:`document`,position:e,trailingComment:a,directivesEndMarker:t,documentEndMarker:n,children:[r,i]}}function Ex(e,t,n){return{type:`documentBody`,position:e,endComments:n,children:t?[t]:[]}}function Dx(e,t,n){for(let r=t;r<e.length;r++)if(n.test(e[r]))return r;return null}function Ox(e,t,n,r,i,a,o){let{documentTrailingComment:s,endComments:c,propTokens:l}=kx(t,n,i,a,o),u=r.contents&&(r.contents.range[0]<r.contents.range[1]||l.some(e=>e.type===`tag`||e.type===`anchor`)),d=u?o.transformNode(r.contents,{tokens:l}):null;if(!u)for(let e of Tg(l,o))throw Error(`Unexpected token type in empty document body: ${e.type}`);let{position:f,documentEndPoint:p}=Ax(e,r,d,a,o);return{documentBody:Ex(f,d,c),documentEndPoint:p,documentTrailingComment:s}}function kx(e,t,n,r,i){let a=[],o=[],s=[];for(let t of e){if(wg(t)){s.push(t);continue}throw Error(`Unexpected token type: ${t.type}`)}for(let e of Tg(n,i))throw Error(`Unexpected token type: ${e.type}`);let c=r?i.transformOffset(r.offset):null;if(t)for(let e of Sg(t.end,r?.end)){if(e.type===`comment`){let t=i.transformComment(e);c?c.line===t.position.start.line?o.push(t):t.position.start.line<c.line&&a.push(t):a.push(t);continue}throw Error(`Unexpected token type: ${e.type}`)}if(o.length>1)throw Error(`Unexpected multiple document trailing comments at ${og(o[1].position.start)}`);return{propTokens:s,endComments:a,documentTrailingComment:Wg(o)||null}}function Ax(e,t,n,r,i){let a=r?Math.max(0,r.offset-1):Dx(i.text,t.range[2],/\S/u)??i.text.length;i.text[a-1]===`\r`&&a--;let o=n===null?a:n.position.start.offset;if(e){let t=e.offset+e.source.length+1;o<t&&t<=a&&(o=t)}let s=i.transformRange([o,a]);return{position:s,documentEndPoint:r?i.transformOffset(r.offset+r.source.length):s.end}}function jx(e,t,n,r){return{type:`documentHead`,position:e,endComments:n,trailingComment:r,children:t}}function Mx(e,t,n){return{type:`directive`,position:e,leadingComments:[],trailingComment:null,name:t,parameters:n}}function Nx(e,t){let n=e.source.trim().split(/[\t ]+/),r=n.shift().replace(/^%/,``);return Mx(t.transformRange([e.offset,e.offset+e.source.length]),r,n)}function Px(e,t,n,r){let{directives:i,endCommentCandidates:a}=Fx(e,r),o=[],s=null;if(t){for(let e of Sg(t.start))if(o.push(e),!s&&e.type===`doc-start`){for(let e of o)if(e.type===`comment`){let t=r.transformComment(e);a.push(t)}o=[],s=e}}let c=Ix(i,n,s,r),l=null;if(s&&o.length>0){let e=o[0];e.type===`comment`&&r.transformOffset(e.offset).line===c.end.line&&(l=r.transformComment(e),o.shift())}return{documentHead:jx(c,i,s?a:[],l),docStart:s,tokensBeforeBody:o}}function Fx(e,t){let n=[],r=[],i=null;for(let a of e)if(a.type===`comment`){let e=t.transformComment(a);i&&i.position.end.line===e.position.start.line&&!i.trailingComment?(i.trailingComment=e,i.position.end=e.position.end):r.push(e)}else{let e=Nx(a,t);n.push(e),i=e,r=[]}return{directives:n,endCommentCandidates:r}}function Ix(e,t,n,r){let i=n?[n.offset,n.offset+n.source.length]:t.contents?[t.contents.range[0],t.contents.range[0]]:[t.range[0],t.range[0]];return e.length!==0&&(i[0]=e[0].position.start.offset),r.transformRange(i)}function Lx(e,t){let{documentHead:n,tokensBeforeBody:r,docStart:i}=Px(e.tokensBeforeBody,e.cstNode,e.node,t),{documentBody:a,documentEndPoint:o,documentTrailingComment:s}=Ox(i,r,e.cstNode,e.node,e.tokensAfterBody,e.documentEnd,t);return Tx(mg(n.position.start,o),!!i,!!e.documentEnd,n,a,s)}function Rx(e,t,n){if(e.length===0)return[];let r=[],i=[],a=[],o=null,s=t=>{let n={tokensBeforeBody:[...a,...i],cstNode:t,node:e[r.length],tokensAfterBody:[],documentEnd:null};return r.push(n),a.length=0,i.length=0,n};for(let c of Sg(t)){if(c.type===`document`){if(r.length>=e.length)throw Error(`Unexpected 'document' token at ${og(n.transformOffset(c.offset))}`);o=s(c);continue}if(c.type===`comment`){i.push(c);continue}if(c.type===`directive`){a.push(...i,c),i.length=0;continue}if(c.type===`doc-end`){if(!o||o.documentEnd)throw Error(`Unexpected 'doc-end' token at ${og(n.transformOffset(c.offset))}`);o.tokensAfterBody=[...i],i.length=0,o.documentEnd=c;continue}}if(a.length>0){let[e]=a;throw Error(`Unexpected '${e.type}' token at ${og(n.transformOffset(e.offset))}`)}return i.length>0&&(o||=s(null),i.length>0&&(o.tokensAfterBody.push(...i),i.length=0)),r.map(e=>Lx(e,n))}function zx(e,t,n,r){let i=t(e);return t=>{r(i,t)&&n(e,i=t)}}function Bx(e){if(e===null||!(`children`in e))return;let t=e.children;if(t.forEach(Bx),e.type===`document`){let[t,n]=e.children;t.position.start.offset===t.position.end.offset?t.position.start=t.position.end=n.position.start:n.position.start.offset===n.position.end.offset&&(n.position.start=n.position.end=t.position.end)}let n=zx(e.position,Vx,Hx,Gx),r=zx(e.position,Ux,Wx,Kx);`endComments`in e&&e.endComments.length!==0&&(n(e.endComments[0].position.start),r(Wg(e.endComments).position.end));let i=t.filter(e=>e!==null);if(i.length!==0){let e=i[0],t=Wg(i);n(e.position.start),r(t.position.end),`leadingComments`in e&&e.leadingComments.length!==0&&n(e.leadingComments[0].position.start),`tag`in e&&e.tag&&n(e.tag.position.start),`anchor`in e&&e.anchor&&n(e.anchor.position.start),`trailingComment`in t&&t.trailingComment&&r(t.trailingComment.position.end)}}function Vx(e){return e.start}function Hx(e,t){e.start=t}function Ux(e){return e.end}function Wx(e,t){e.end=t}function Gx(e,t){return t.offset<e.offset}function Kx(e,t){return t.offset>e.offset}function qx(e,t){let n=new Ub,r=new wx(e,n),i=new Zb(n.addNewLine),a=new fb({keepSourceTokens:!0,uniqueKeys:t?.uniqueKeys,lineCounter:n,merge:!0}),o=[],s=[...i.parse(e)];for(let t of a.compose(s,!0,e.length)){let{errors:e}=t;if(e.length>0)throw new ig(r,e[0]);o.push(t)}let c=Rx(o,s,r),l=r.comments.sort((e,t)=>e.position.start.offset-t.position.end.offset),u=pg(r.transformRange([0,e.length]),c,l);return sg(u),Bx(u),u}function Jx(e,t){let n=SyntaxError(e+` (`+t.loc.start.line+`:`+t.loc.start.column+`)`);return Object.assign(n,t)}var Yx=Jx,Xx={uniqueKeys:!1};function Zx(e){let t;try{t=qx(e,Xx)}catch(e){throw e instanceof ig?Yx(e.message,{loc:e.position,cause:e}):e}return delete t.comments,t}var Qx={astFormat:`yaml`,parse:Zx,hasPragma:oh,hasIgnorePragma:sh,locStart:$m,locEnd:eh},$x={yaml:$h},eS=rx.parse,tS=s({default:()=>iS,languages:()=>NI,options:()=>jI,printers:()=>MI}),nS=Object.defineProperty,rS=(e,t)=>{for(var n in t)nS(e,n,{get:t[n],enumerable:!0})},iS={};rS(iS,{languages:()=>NI,options:()=>jI,printers:()=>MI});var aS=[{name:`JavaScript`,type:`programming`,aceMode:`javascript`,extensions:`.js,._js,.bones,.cjs,.es,.es6,.gs,.jake,.javascript,.jsb,.jscad,.jsfl,.jslib,.jsm,.jspre,.jss,.mjs,.njs,.pac,.sjs,.ssjs,.xsjs,.xsjslib,.start.frag,.end.frag,.wxs`.split(`,`),filenames:[`Jakefile`,`start.frag`,`end.frag`],tmScope:`source.js`,aliases:[`js`,`node`],codemirrorMode:`javascript`,codemirrorMimeType:`text/javascript`,interpreters:[`bun`,`chakra`,`d8`,`deno`,`gjs`,`js`,`node`,`nodejs`,`qjs`,`rhino`,`v8`,`v8-shell`,`zx`],parsers:[`babel`,`acorn`,`espree`,`meriyah`,`babel-flow`,`babel-ts`,`flow`,`typescript`],vscodeLanguageIds:[`javascript`,`mongo`],linguistLanguageId:183},{name:`Flow`,type:`programming`,aceMode:`javascript`,extensions:[`.js.flow`],filenames:[],tmScope:`source.js`,aliases:[],codemirrorMode:`javascript`,codemirrorMimeType:`text/javascript`,interpreters:[`bun`,`chakra`,`d8`,`deno`,`gjs`,`js`,`node`,`nodejs`,`qjs`,`rhino`,`v8`,`v8-shell`],parsers:[`flow`,`babel-flow`],vscodeLanguageIds:[`javascript`],linguistLanguageId:183},{name:`JSX`,type:`programming`,aceMode:`javascript`,extensions:[`.jsx`],filenames:void 0,tmScope:`source.js.jsx`,aliases:void 0,codemirrorMode:`jsx`,codemirrorMimeType:`text/jsx`,interpreters:void 0,parsers:[`babel`,`babel-flow`,`babel-ts`,`flow`,`typescript`,`espree`,`meriyah`],vscodeLanguageIds:[`javascriptreact`],group:`JavaScript`,linguistLanguageId:183},{name:`TypeScript`,type:`programming`,aceMode:`typescript`,extensions:[`.ts`,`.cts`,`.mts`],tmScope:`source.ts`,aliases:[`ts`],codemirrorMode:`javascript`,codemirrorMimeType:`application/typescript`,interpreters:[`bun`,`deno`,`ts-node`,`tsx`],parsers:[`typescript`,`babel-ts`],vscodeLanguageIds:[`typescript`],linguistLanguageId:378},{name:`TSX`,type:`programming`,aceMode:`tsx`,extensions:[`.tsx`],tmScope:`source.tsx`,aliases:[`typescriptreact`],codemirrorMode:`jsx`,codemirrorMimeType:`text/typescript-jsx`,group:`TypeScript`,parsers:[`typescript`,`babel-ts`],vscodeLanguageIds:[`typescriptreact`],linguistLanguageId:94901924}],oS={};rS(oS,{estree:()=>yI});function sS(e){return Array.isArray(e)&&e.length>0}var cS=sS,lS=()=>{};function z(e){let t=new Set(e);return e=>t.has(e?.type)}var uS=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i);function dS(e){return this[e<0?this.length+e:e]}var B=uS(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return dS});function fS(e,t,n){if(!e.has(t)){let r=n(t);e.set(t,r)}return e.get(t)}function pS(e){let t=[];return e.this&&t.push(e.this),t.push(...e.params),e.rest&&t.push(e.rest),t}var mS=new WeakMap;function hS(e){return fS(mS,e,pS)}function gS(e,t){let{node:n}=e,r=0,i=()=>t(e,r++);n.this&&e.call(i,`this`),e.each(i,`params`),n.rest&&e.call(i,`rest`)}function _S(e){return e.rest?!0:B(0,hS(e),-1)?.type===`RestElement`}var vS=e=>e?.type===`TSAsExpression`&&e.typeAnnotation.type===`TSTypeReference`&&e.typeAnnotation.typeName.type===`Identifier`&&e.typeAnnotation.typeName.name===`const`;function yS({node:e,parent:t}){return e?.type===`EmptyStatement`?t.type===`IfStatement`?t.consequent===e||t.alternate===e:t.type===`DoWhileStatement`||t.type===`ForInStatement`||t.type===`ForOfStatement`||t.type===`ForStatement`||t.type===`LabeledStatement`||t.type===`WithStatement`||t.type===`WhileStatement`?t.body===e:!1:!1}function bS(e){return e.method&&e.kind===`init`||e.kind===`get`||e.kind===`set`}var xS=e=>Number.isSafeInteger(e)&&e>=0;function SS(e){return e.range?.[1]??e.end}function V(e){let t=e.range?.[0]??e.start,n=(e.declaration?.decorators??e.decorators)?.[0];return n?Math.min(V(n),t):t}var CS=5,wS=8,TS=8,ES=e=>t=>t.label?H(t.label):V(t)+e,DS=e=>e.__contentEnd??SS(e),OS=[`ExpressionStatement`,`Directive`,`ImportDeclaration`,`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`ExportAllDeclaration`,`ReturnStatement`,`ThrowStatement`,`DoWhileStatement`],kS=new Map([[`BreakStatement`,ES(CS)],[`ContinueStatement`,ES(wS)],[`DebuggerStatement`,e=>V(e)+TS],[`VariableDeclaration`,e=>H(B(0,e.declarations,-1))],...OS.map(e=>[e,DS])]),AS=z(OS),jS=e=>{if(AS(e)&&e.__contentEnd)return!0;let{type:t}=e;return t===`BreakStatement`||t===`ContinueStatement`||t===`DebuggerStatement`||t===`VariableDeclaration`?!0:t===`IfStatement`?jS(e.alternate??e.consequent):t===`ForInStatement`||t===`ForOfStatement`||t===`ForStatement`||t===`LabeledStatement`||t===`WithStatement`||t===`WhileStatement`?jS(e.body):!1};function H(e){let{type:t}=e;return t===`IfStatement`?H(e.alternate??e.consequent):t===`ForInStatement`||t===`ForOfStatement`||t===`ForStatement`||t===`LabeledStatement`||t===`WithStatement`||t===`WhileStatement`?H(e.body):kS.get(t)?.(e)??SS(e)}function MS(e,t){let n=V(e);return xS(n)&&n===V(t)}function NS(e,t){let n=H(e);return xS(n)&&n===H(t)}function PS(e,t){return MS(e,t)&&NS(e,t)}function FS(e){return e.extra?.raw??e.raw}function IS(e){return e.type===`BigIntLiteral`||e.type===`Literal`&&!!e.bigint}function LS(e){return e.type===`BooleanLiteral`||e.type===`Literal`&&typeof e.value==`boolean`}function RS(e){return e.type===`NumericLiteral`||e.type===`Literal`&&typeof e.value==`number`}function zS(e){return e.type===`RegExpLiteral`||e.type===`Literal`&&!!e.regex}function BS(e){return e?.type===`StringLiteral`||e?.type===`Literal`&&typeof e.value==`string`}var VS=z([`TSAsExpression`,`TSSatisfiesExpression`,`AsExpression`,`AsConstExpression`,`SatisfiesExpression`]),HS=z([`SatisfiesExpression`,`TSSatisfiesExpression`]),US=z([`TSUnionType`,`UnionTypeAnnotation`]),WS=z([`TSIntersectionType`,`IntersectionTypeAnnotation`]),GS=z([`TupleTypeAnnotation`,`TSTupleType`]),KS=z([`TSConditionalType`,`ConditionalTypeAnnotation`]),qS=z([`TSTypeAliasDeclaration`,`TypeAlias`]),JS=z([`ReturnStatement`,`ThrowStatement`]),YS=z([`ExportDefaultDeclaration`,`DeclareExportDeclaration`,`ExportNamedDeclaration`,`ExportAllDeclaration`,`DeclareExportAllDeclaration`]),XS=z([`ArrayExpression`]),ZS=z([`ObjectExpression`]),QS=z([`Literal`,`BooleanLiteral`,`BigIntLiteral`,`DirectiveLiteral`,`NullLiteral`,`NumericLiteral`,`RegExpLiteral`,`StringLiteral`]),$S=z([`ObjectTypeAnnotation`,`TSTypeLiteral`,`TSMappedType`]),eC=z([`FunctionExpression`,`ArrowFunctionExpression`]),tC=z([`JSXElement`,`JSXFragment`]),nC=z([`BinaryExpression`,`LogicalExpression`,`NGPipeExpression`]),rC=z([`CallExpression`,`OptionalCallExpression`]),iC=z([`MemberExpression`,`OptionalMemberExpression`]),aC=z([`CallExpression`,`OptionalCallExpression`,`NewExpression`]),oC=z([`CallExpression`,`OptionalCallExpression`,`NewExpression`,`ImportExpression`]),sC=z([`ChainExpression`,`TSNonNullExpression`]),cC=z([`TSArrayType`,`ArrayTypeAnnotation`]),lC=z([`TSTypeParameterInstantiation`,`TypeParameterInstantiation`]);function uC(e){if(e.type!==`ImportSpecifier`&&e.type!==`ExportSpecifier`)return!1;let{local:t,[e.type===`ImportSpecifier`?`imported`:`exported`]:n}=e;return t.type!==n.type||!PS(t,n)?!1:BS(t)?t.value===n.value&&FS(t)===FS(n):t.type===`Identifier`&&t.name===n.name}var dC=z([`File`,`TemplateElement`,`TSEmptyBodyFunctionExpression`,`ChainExpression`]),fC=(e,[t])=>t?.type===`ComponentParameter`&&t.shorthand&&t.name===e&&t.local!==t.name||t?.type===`MatchObjectPatternProperty`&&t.shorthand&&t.key===e||t?.type===`ObjectProperty`&&t.shorthand&&t.key===e&&t.value!==t.key||t?.type===`Property`&&t.shorthand&&t.key===e&&!bS(t)&&t.value!==t.key||t?.type===`ImportSpecifier`&&uC(t)&&t.local===e&&t.local!==t.imported||t?.type===`ExportSpecifier`&&uC(t)&&t.exported===e&&t.local!==t.exported,pC=(e,[t])=>!!(e.type===`FunctionExpression`&&t.type===`MethodDefinition`&&t.value===e&&hS(e).length===0&&!e.returnType&&!cS(e.typeParameters)&&e.body),mC=(e,[t])=>t?.typeAnnotation===e&&vS(t),hC=(e,[t,...n])=>mC(e,[t])||t?.typeName===e&&mC(t,n);function gC(e,t){return dC(e)||fC(e,t)||pC(e,t)?!1:e.type===`EmptyStatement`?yS({node:e,parent:t[0]}):!(hC(e,t)||e.type===`TSTypeAnnotation`&&t[0].type===`TSPropertySignature`)}var _C=gC;function vC(e){let t=e.type||e.kind||`(unknown type)`,n=String(e.name||e.id&&(typeof e.id==`object`?e.id.name:e.id)||e.key&&(typeof e.key==`object`?e.key.name:e.key)||e.value&&(typeof e.value==`object`?``:String(e.value))||e.operator||``);return n.length>20&&(n=n.slice(0,19)+`…`),t+(n?` `+n:``)}function yC(e,t){(e.comments??=[]).push(t),t.printed=!1,t.nodeDescription=vC(e)}function bC(e,t){t.leading=!0,t.trailing=!1,yC(e,t)}function xC(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),yC(e,t)}function SC(e,t){t.leading=!1,t.trailing=!0,yC(e,t)}function CC(e){return(t,n,r)=>{if(n===!1)return!1;let i=!!r?.backwards,{length:a}=t,o=n;for(;o>=0&&o<a;){let n=t.charAt(o);if(e instanceof RegExp){if(!e.test(n))return o}else if(!e.includes(n))return o;i?o--:o++}return o===-1||o===a?o:!1}}var wC=CC(` `),TC=CC(`,; `),EC=CC(/[^\n\r]/);function DC(e,t){if(t===!1)return!1;if(e.charAt(t)===`/`&&e.charAt(t+1)===`*`){for(let n=t+2;n<e.length;++n)if(e.charAt(n)===`*`&&e.charAt(n+1)===`/`)return n+2}return t}var OC=DC,kC=e=>e===`
298
+ `||e===`\r`||e===`\u2028`||e===`\u2029`;function AC(e,t,n){if(t===!1)return!1;let r=!!n?.backwards,i=e.charAt(t);if(r){if(e.charAt(t-1)===`\r`&&i===`
299
+ `)return t-2;if(kC(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===`
300
+ `)return t+2;if(kC(i))return t+1}return t}var jC=AC;function MC(e,t){return t===!1?!1:e.charAt(t)===`/`&&e.charAt(t+1)===`/`?EC(e,t):t}var NC=MC;function PC(e,t){let n=null,r=t;for(;r!==n;)n=r,r=wC(e,r),r=OC(e,r),r=NC(e,r),r=jC(e,r);return r}var FC=PC;function IC(e,t){let n=FC(e,t);return n===!1?``:e.charAt(n)}var LC=IC;function RC(e,t,n={}){let r=wC(e,n.backwards?t-1:t,n);return r!==jC(e,r,n)}var zC=RC;function BC(e,t,n){for(let r=t;r<n;++r)if(e.charAt(r)===`
301
+ `)return!0;return!1}var VC=BC,HC=new WeakMap;function UC(e){let t;return e.type===`ImportExpression`||e.type===`TSImportType`?(t=[e.source],e.options&&t.push(e.options)):t=e.type===`TSExternalModuleReference`?[e.expression]:e.arguments,t}function WC(e){return fS(HC,e,UC)}function GC(e,t){let{node:n}=e;n.type===`ImportExpression`||n.type===`TSImportType`?(e.call(()=>t(e,0),`source`),n.options&&e.call(()=>t(e,1),`options`)):n.type===`TSExternalModuleReference`?e.call(()=>t(e,0),`expression`):e.each(t,`arguments`)}function KC(e,t){if(e.type===`ImportExpression`||e.type===`TSImportType`){if(t===0||t===(e.options?-2:-1))return[`source`];if(e.options&&(t===1||t===-1))return[`options`];throw RangeError(`Invalid argument index`)}if(e.type===`TSExternalModuleReference`){if(t===0||t===-1)return[`expression`]}else if(t<0&&(t=e.arguments.length+t),t>=0&&t<e.arguments.length)return[`arguments`,t];throw RangeError(`Invalid argument index`)}var qC=Symbol.for(`comments`),JC=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},YC=uS(`replaceAll`,function(){if(typeof this==`string`)return JC});function XC(e){return YC(0,e,/[^\n]/g,` `)}var ZC=XC;function QC(e,t){for(let n of t){let t=V(n),r=H(n);e=e.slice(0,t)+ZC(e.slice(t,r))+e.slice(r)}return e}var $C=new WeakMap;function ew(e){let t=e[qC];return fS($C,t,t=>QC(e.originalText,t))}function tw(e,t){let n=H(e)-1;if(t.originalText[n]===`)`)return n}function nw(e,t){if(tw(e,t)===void 0)return;let n=ew(t),r=H(e.typeArguments??e.callee),i=n.indexOf(`(`,r);if(i!==-1)return i}function rw(e,t,n){let r=tw(e,n);if(r===void 0||H(t)>r)return!1;let i=nw(e,n);return i!==void 0&&V(t)>i}var iw=z([`Block`,`CommentBlock`,`MultiLine`]),aw=z([`Line`,`CommentLine`,`SingleLine`,`HashbangComment`,`HTMLOpen`,`HTMLClose`,`Hashbang`,`InterpreterDirective`]);function ow(e){return e?.type===`ObjectProperty`||e?.type===`Property`&&!bS(e)}function sw(e){return e.value.trim()===`prettier-ignore`&&!e.unignore}var cw=new WeakMap;function lw(e){return fS(cw,e,e=>iw(e)&&e.value[0]===`*`&&/@(?:type|satisfies)\b/.test(e.value))}function uw({comment:e,enclosingNode:t,followingNode:n,options:r}){if((t?.type===`ForInStatement`||t?.type===`ForOfStatement`||t?.type===`ForStatement`)&&n&&n===t.body){let t=ew(r).lastIndexOf(`)`,V(n));if(V(e)>t)return bC(n,e),!0}return!1}var dw=(e,t)=>iw(e)&&!VC(t,V(e),H(e)),fw=(e,t)=>aw(e)||dw(e,t);function pw(e,t){e.type===`BlockStatement`?mw(e,t):bC(e,t)}function mw(e,t){let n=(e.body||e.properties).find(({type:e})=>e!==`EmptyStatement`);n?bC(n,t):xC(e,t)}function hw({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i,options:a}){return n?.type!==`IfStatement`||!r?!1:LC(i,H(e))===`)`?(SC(t,e),!0):r===n.consequent?(bC(r,e),!0):t===n.consequent&&r===n.alternate&&gw({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i,options:a})}function gw({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i,options:a}){let o=ew(a).indexOf(`else`,H(n.consequent));return V(e)>=o?(bC(r,e),!0):t.type!==`BlockStatement`&&fw(e,i)&&!VC(i,H(t),V(e))?(SC(t,e),!0):(xC(n,e),!0)}function _w({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return n?.type===`SwitchStatement`&&n.cases.length===0&&!r&&t===n.discriminant&&LC(i,H(e))===`}`&&(xC(n,e),!0)}function vw({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return(n?.type===`WhileStatement`||n?.type===`WithStatement`)&&r?LC(i,H(e))===`)`?(SC(t,e),!0):n.body===r&&(bC(r,e),!0):!1}function yw(e,{comment:t,text:n,options:r}){if(US(e)&&dw(t,n)&&!sw(t)){let n=ew(r).slice(H(t),V(e));return/^[ \t]*$/.test(n)}return!1}function bw(e,t){return bC(yw(e,t)?e.types[0]:e,t.comment),!0}function xw(e){return[Rw,Qw,Ow,zw,Ew,hw,vw,_w,Tw,Aw,uw,Hw,Uw,Gw,Kw,qw,Mw,Bw,Dw,rT,eT,oT,uT].some(t=>t(e))}function Sw(e){return[Rw,ww,zw,Ow,Kw,hw,vw,_w,Tw,Aw,uw,Bw,Vw,Ww,Gw,Xw,tT,nT,iT,eT,cT,lT,aT,oT].some(t=>t(e))}function Cw(e){return[Rw,Qw,hw,vw,_w,uw,Mw,Gw,Xw,eT,Fw,Pw,Zw,lT,oT,uT].some(t=>t(e))}function ww({comment:e,followingNode:t}){return t&&lw(e)?(bC(t,e),!0):!1}function Tw({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return n?.type!==`TryStatement`&&n?.type!==`CatchClause`||!r?!1:n.type===`CatchClause`&&t?(SC(t,e),!0):r.type===`BlockStatement`?(mw(r,e),!0):r.type===`TryStatement`?(pw(r.finalizer,e),!0):r.type===`CatchClause`&&(pw(r.body,e),!0)}function Ew({comment:e,enclosingNode:t,followingNode:n}){return iC(t)&&n?.type===`Identifier`?(bC(t,e),!0):!1}function Dw({comment:e,enclosingNode:t,followingNode:n,options:r}){return!r.experimentalTernaries||!(t?.type===`ConditionalExpression`||KS(t))?!1:n?.type===`ConditionalExpression`||KS(n)?(xC(t,e),!0):!1}function Ow({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i,options:a}){let o=t&&!VC(i,H(t),V(e));return(!t||!o)&&(n?.type===`ConditionalExpression`||KS(n))&&r?a.experimentalTernaries&&n.alternate===r&&!(iw(e)&&!VC(a.originalText,V(e),H(e)))?(xC(n,e),!0):(bC(r,e),!0):!1}var kw=z([`ClassDeclaration`,`ClassExpression`,`DeclareClass`,`DeclareInterface`,`InterfaceDeclaration`,`TSInterfaceDeclaration`]);function Aw({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){if(kw(n)){let{decorators:i}=n;if(cS(i)&&r?.type!==`Decorator`)return SC(B(0,i,-1),e),!0;if(n.body&&r===n.body)return mw(n.body,e),!0;if(r){let{superClass:i}=n;if(i&&r===i&&t&&(t===n.id||t===n.typeParameters))return SC(t,e),!0;for(let a of[`implements`,`extends`,`mixins`])if(n[a]&&r===n[a][0])return t&&(t===n.id||t===n.typeParameters||t===i)?SC(t,e):xC(n,e,a),!0}}return!1}var jw=z([`ClassMethod`,`ClassProperty`,`PropertyDefinition`,`TSAbstractPropertyDefinition`,`TSAbstractMethodDefinition`,`TSDeclareMethod`,`MethodDefinition`,`ClassAccessorProperty`,`AccessorProperty`,`TSAbstractAccessorProperty`,`TSParameterProperty`]);function Mw({placement:e,comment:t,precedingNode:n,enclosingNode:r,followingNode:i,text:a}){return r&&n&&LC(a,H(t))===`(`&&(r.type===`Property`||r.type===`TSDeclareMethod`||r.type===`TSAbstractMethodDefinition`)&&n.type===`Identifier`&&r.key===n&&LC(a,H(n))!==`:`?(SC(n,t),!0):jw(r)&&!i&&e===`remaining`?(SC(LC(a,H(t))===`(`?n:r,t),!0):n?.type===`Decorator`&&jw(r)&&(aw(t)||e===`ownLine`)?(SC(n,t),!0):!1}var Nw=z([`FunctionDeclaration`,`FunctionExpression`,`ClassMethod`,`MethodDefinition`,`ObjectMethod`]);function Pw({comment:e,precedingNode:t,enclosingNode:n,text:r}){return LC(r,H(e))===`(`&&t&&Nw(n)?(SC(t,e),!0):!1}function Fw({comment:e,enclosingNode:t,text:n}){if(t?.type!==`ArrowFunctionExpression`)return!1;let r=FC(n,H(e));return r!==!1&&n.slice(r,r+2)===`=>`&&(xC(t,e,`commentBeforeArrow`),!0)}function Iw(e,t,n){if(V(t)>=H(e)||H(t)<=V(e))return!1;let r=ew(n);return r.slice(0,V(t)).trimEnd().endsWith(`(`)&&r.slice(H(t)).trimStart().startsWith(`)`)}var Lw=z([`ComponentDeclaration`,`DeclareComponent`,`ComponentTypeAnnotation`]);function Rw({comment:e,enclosingNode:t,options:n}){if(!t)return!1;if(oC(t)&&WC(t).length===0&&Iw(t,e,n))return xC(t,e),!0;let r=dT(t)||Lw(t)||t.type===`HookTypeAnnotation`?t:t.type===`MethodDefinition`||t.type===`TSAbstractMethodDefinition`||t.type===`Property`&&bS(t)?t.value:void 0;return r&&hS(r).length===0&&Iw(r,e,n)?(xC(r,e),!0):!1}function zw({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return t?.type===`FunctionTypeParam`&&n?.type===`FunctionTypeAnnotation`&&r?.type!==`FunctionTypeParam`||t?.type===`ComponentTypeParameter`&&(n?.type===`DeclareComponent`||n?.type===`ComponentTypeAnnotation`)&&r?.type!==`ComponentTypeParameter`||(t?.type===`Identifier`||t?.type===`AssignmentPattern`||t?.type===`ObjectPattern`||t?.type===`ArrayPattern`||t?.type===`RestElement`||t?.type===`TSParameterProperty`)&&(dT(n)||(n?.type===`TSAbstractMethodDefinition`||n?.type===`MethodDefinition`)&&n.value.type===`TSEmptyBodyFunctionExpression`)&&LC(i,H(e))===`)`||(t?.type===`ComponentParameter`||t?.type===`RestElement`)&&(n?.type===`ComponentDeclaration`||n?.type===`DeclareComponent`)&&LC(i,H(e))===`)`?(SC(t,e),!0):!iw(e)&&r?.type===`BlockStatement`&&Nw(n)&&(n.type===`MethodDefinition`?n.value.body:n.body)===r&&FC(i,H(e))===V(r)?(mw(r,e),!0):!1}function Bw({comment:e,enclosingNode:t}){return t?.type===`LabeledStatement`&&(bC(t,e),!0)}function Vw({comment:e,precedingNode:t,enclosingNode:n,options:r}){return aC(n)&&n.callee===t&&n.arguments.length>0&&rw(n,e,r)?(bC(n.arguments[0],e),!0):!1}function Hw({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return US(n)?(sw(e)&&(r.prettierIgnore=!0,e.unignore=!0),t?(SC(t,e),!0):!1):(US(r)&&sw(e)&&(r.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function Uw({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return n&&n.type===`MatchOrPattern`?(sw(e)&&(r.prettierIgnore=!0,e.unignore=!0),t?(SC(t,e),!0):!1):(r&&r.type===`MatchOrPattern`&&sw(e)&&(r.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function Ww({comment:e,enclosingNode:t}){return ow(t)?(bC(t,e),!0):!1}function Gw({comment:e,enclosingNode:t,ast:n,isLastComment:r}){return n?.body?.length===0?(r?xC(n,e):bC(n,e),!0):t?.type===`Program`&&t.body.length===0&&!cS(t.directives)&&(r?xC(t,e):bC(t,e),!0)}function Kw({comment:e,precedingNode:t,enclosingNode:n,text:r}){if(n?.type===`ImportSpecifier`||n?.type===`ExportSpecifier`)return bC(n,e),!0;let i=t?.type===`ImportSpecifier`&&n?.type===`ImportDeclaration`,a=t?.type===`ExportSpecifier`&&n?.type===`ExportNamedDeclaration`;return(i||a)&&zC(r,H(e))?(SC(t,e),!0):!1}function qw({comment:e,enclosingNode:t}){return t?.type===`AssignmentPattern`&&(bC(t,e),!0)}var Jw=z([`VariableDeclarator`,`AssignmentExpression`,`TypeAlias`,`TSTypeAliasDeclaration`]),Yw=z([`ObjectExpression`,`ArrayExpression`,`TemplateLiteral`,`TaggedTemplateExpression`,`ObjectTypeAnnotation`,`TSTypeLiteral`]);function Xw(e){let{comment:t,enclosingNode:n,followingNode:r,options:i,placement:a}=e;if(Jw(n)&&r&&a===`endOfLine`&&(Yw(r)||iw(t)))return bw(r,e);if(qS(n)&&r){let a=n.id,o=ew(i).indexOf(`=`,H(a));if(V(t)>=o)return bw(r,e)}return!1}function Zw({comment:e,enclosingNode:t,precedingNode:n,followingNode:r,text:i}){return!r&&(t?.type===`TSMethodSignature`||t?.type===`TSDeclareFunction`||t?.type===`TSAbstractMethodDefinition`)&&(!n||n!==t.returnType)&&LC(i,H(e))===`;`&&(SC(t,e),!0)}function Qw({comment:e,enclosingNode:t,followingNode:n}){if(sw(e)&&t?.type===`TSMappedType`&&n===t.key)return t.prettierIgnore=!0,e.unignore=!0,!0}function $w(e,t,n){let r=ew(n).indexOf(`[`,V(e));return H(t)<r}function eT({comment:e,enclosingNode:t,options:n}){if(t?.type===`TSMappedType`&&$w(t,e,n))return xC(t,e),!0}function tT({comment:e,enclosingNode:t,followingNode:n}){return!t||t.type!==`SwitchCase`||t.test||!n||n!==t.consequent[0]?!1:(n.type===`BlockStatement`&&aw(e)?mw(n,e):xC(t,e),!0)}function nT({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return US(t)&&(cC(n)&&!r||WS(n)||US(n))?(SC(B(0,t.types,-1),e),!0):!1}function rT({comment:e,enclosingNode:t,precedingNode:n,followingNode:r}){if((t?.type===`ObjectPattern`||t?.type===`ArrayPattern`)&&r?.type===`TSTypeAnnotation`)return n?SC(n,e):xC(t,e),!0}function iT({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return!r&&n?.type===`UnaryExpression`&&(t?.type===`LogicalExpression`||t?.type===`BinaryExpression`)&&VC(i,V(n.argument),V(t.right))&&fw(e,i)&&!VC(i,V(t.right),V(e))?(SC(t.right,e),!0):!1}function aT({enclosingNode:e,followingNode:t,comment:n}){if(e&&(e.type===`TSPropertySignature`||e.type===`ObjectTypeProperty`)&&(US(t)||WS(t)))return bC(t,n),!0}function oT({enclosingNode:e,precedingNode:t,followingNode:n,comment:r,text:i}){if(VS(e)&&t===e.expression&&!fw(r,i))return n?bC(n,r):SC(e,r),!0}function sT(e,t,n){let r=ew(n).lastIndexOf(`=>`,V(t.body));return H(e)<r}function cT({comment:e,enclosingNode:t,followingNode:n,precedingNode:r,options:i}){return t?.type!==`ArrowFunctionExpression`||!n||!r||sT(e,t,i)?!1:(pw(n,e),!0)}function lT({comment:e,enclosingNode:t,precedingNode:n,followingNode:r}){if(!r&&t&&n){if(t.type===`ExpressionStatement`&&t.expression===n)return SC(t,e),!0;let r=n.type===`SequenceExpression`,i=n.type===`AssignmentExpression`;if((r||i)&&(t.type===`ArrowFunctionExpression`&&t.body===n||t.type===`VariableDeclarator`&&t.init===n||t.type===`ReturnStatement`&&t.argument===n||t.type===`AssignmentExpression`&&t.right===n))return SC(r?B(0,n.expressions,-1):n.right,e),!0}return!1}function uT(e){let{followingNode:t,comment:n}=e;return yw(t,e)?(bC(t.types[0],n),!0):!1}var dT=z([`ArrowFunctionExpression`,`FunctionExpression`,`FunctionDeclaration`,`ObjectMethod`,`ClassMethod`,`TSDeclareFunction`,`TSCallSignatureDeclaration`,`TSConstructSignatureDeclaration`,`TSMethodSignature`,`TSConstructorType`,`TSFunctionType`,`TSDeclareMethod`,`HookDeclaration`]),fT={endOfLine:Sw,ownLine:xw,remaining:Cw};function pT(e,{parser:t}){if(t===`flow`||t===`hermes`||t===`babel-flow`)return e=YC(0,e,/[\s(]/g,``),e===``||e===`/*`||e===`/*::`}var mT=pT,U={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},hT=(e,t)=>{if(typeof e==`function`&&(t=e,e=0),e||t)return(n,r,i)=>!(e&U.Leading&&!n.leading||e&U.Trailing&&!n.trailing||e&U.Dangling&&(n.leading||n.trailing)||e&U.Block&&!iw(n)||e&U.Line&&!aw(n)||e&U.First&&r!==0||e&U.Last&&r!==i.length-1||e&U.PrettierIgnore&&!sw(n)||t&&!t(n))};function W(e,t,n){if(!cS(e?.comments))return!1;let r=hT(t,n);return!r||e.comments.some(r)}function gT(e,t,n){if(!Array.isArray(e?.comments))return[];let r=hT(t,n);return r?e.comments.filter(r):e.comments}function _T(e){return e?.prettierIgnore||W(e,U.PrettierIgnore)}function vT(e){let{node:t}=e;return(t.type===`FunctionExpression`||t.type===`ArrowFunctionExpression`)&&(e.key===`callee`&&rC(e.parent)||e.key===`tag`&&e.parent.type===`TaggedTemplateExpression`)}var yT=new Map([[`|>`],[`??`],[`||`],[`&&`],[`|`],[`^`],[`&`],[`==`,`===`,`!=`,`!==`],[`<`,`>`,`<=`,`>=`,`in`,`instanceof`],[`>>`,`<<`,`>>>`],[`+`,`-`],[`*`,`/`,`%`],[`**`]].flatMap((e,t)=>e.map(e=>[e,t])));function bT(e){return yT.get(e)}var xT={"==":!0,"!=":!0,"===":!0,"!==":!0},ST={"*":!0,"/":!0,"%":!0},CT={">>":!0,">>>":!0,"<<":!0};function wT(e,t){return!(bT(t)!==bT(e)||e===`**`||xT[e]&&xT[t]||t===`%`&&ST[e]||e===`%`&&ST[t]||t!==e&&ST[t]&&ST[e]||CT[e]&&CT[t])}function TT(e){return!!CT[e]||e===`|`||e===`^`||e===`&`}function ET(e){return e.type===`LogicalExpression`&&e.operator===`??`}function DT(e,t){switch(e.type){case`BinaryExpression`:case`LogicalExpression`:case`AssignmentExpression`:case`NGPipeExpression`:return DT(e.left,t);case`MemberExpression`:case`OptionalMemberExpression`:return DT(e.object,t);case`TaggedTemplateExpression`:return e.tag.type!==`FunctionExpression`&&DT(e.tag,t);case`CallExpression`:case`OptionalCallExpression`:return e.callee.type!==`FunctionExpression`&&DT(e.callee,t);case`ConditionalExpression`:return DT(e.test,t);case`UpdateExpression`:return!e.prefix&&DT(e.argument,t);case`BindExpression`:return e.object&&DT(e.object,t);case`SequenceExpression`:return DT(e.expressions[0],t);case`ChainExpression`:case`TSNonNullExpression`:case`TSSatisfiesExpression`:case`TSAsExpression`:case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:return DT(e.expression,t);default:return t(e)}}function OT(e){let{key:t,parent:n}=e;return t===`expression`&&n.type===`TSNonNullExpression`||t===`object`&&n.type===`MemberExpression`&&!n.optional||t===`callee`&&n.type===`CallExpression`&&!n.optional||t===`callee`&&n.type===`NewExpression`||t===`tag`&&n.type===`TaggedTemplateExpression`}var kT=e=>e.extra?.parenthesized,AT=z([`OptionalCallExpression`,`OptionalMemberExpression`]);function jT(e){let{node:t}=e,n=t;for(;n.type===`TSNonNullExpression`;)if(n=n.expression,kT(n))return!1;return AT(n)?kT(t)?!0:e.key!==`expression`||e.parent.type!==`TSNonNullExpression`:!1}function MT(e){return(e.node.type===`ChainExpression`||jT(e))&&OT(e)}function NT(e){let{node:t}=e;if(t.type!==`Identifier`)return!1;if(t.extra?.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(t.name))return!0;let{key:n,parent:r}=e;if(n===`left`&&(t.name===`async`&&!r.await||t.name===`let`)&&r.type===`ForOfStatement`)return!0;if(t.name===`let`){let n=e.findAncestor(e=>e.type===`ForOfStatement`||e.type===`ForInStatement`)?.left;if(n&&DT(n,e=>e===t))return!0}if(n===`object`&&t.name===`let`&&r.type===`MemberExpression`&&r.computed&&!r.optional){let n=e.findAncestor(e=>e.type===`ExpressionStatement`||e.type===`ForStatement`||e.type===`ForInStatement`),r=n?n.type===`ExpressionStatement`?n.expression:n.type===`ForStatement`?n.init:n.left:void 0;if(r&&DT(r,e=>e===t))return!0}if(n===`expression`)switch(t.name){case`await`:case`interface`:case`module`:case`using`:case`yield`:case`let`:case`component`:case`hook`:case`type`:{let t=e.findAncestor(e=>!VS(e));if(t!==r&&t.type===`ExpressionStatement`)return!0}}return!1}function PT(e){return typeof e==`object`&&!!e}var FT=PT;function*IT(e,t){let{getVisitorKeys:n,filter:r=()=>!0}=t,i=e=>FT(e)&&r(e);for(let t of n(e)){let n=e[t];if(Array.isArray(n))for(let e of n)i(e)&&(yield e);else i(n)&&(yield n)}}function*LT(e,t){let n=[e];for(let e=0;e<n.length;e++){let r=n[e];for(let e of IT(r,t))yield e,n.push(e)}}function RT(e,{getVisitorKeys:t,predicate:n}){for(let r of LT(e,{getVisitorKeys:t}))if(n(r))return!0;return!1}var zT=null;function BT(e){if(zT!==null&&typeof zT.property){let e=zT;return zT=BT.prototype=null,e}return zT=BT.prototype=e??Object.create(null),new BT}var VT=10;for(let e=0;e<=VT;e++)BT();function HT(e){return BT(e)}function UT(e,t=`type`){HT(e);function n(n){let r=n[t],i=e[r];if(!Array.isArray(i))throw Object.assign(Error(`Missing visitor keys for '${r}'.`),{node:n});return i}return n}var WT=UT,G=[[`elements`],[`left`,`right`],[`value`],[`directives`,`body`],[`label`],[`callee`,`typeArguments`,`arguments`],[`test`,`consequent`,`alternate`],[`body`,`test`],[`expression`],[`left`,`right`,`body`],[`id`,`typeParameters`,`params`,`predicate`,`returnType`,`body`],[`object`,`property`],[`properties`],[`decorators`,`key`,`typeParameters`,`params`,`returnType`,`body`],[`decorators`,`key`,`value`],[`argument`],[`expressions`],[`id`,`init`],[`body`],[`decorators`,`id`,`typeParameters`,`superClass`,`superTypeArguments`,`mixins`,`implements`,`body`],[`declaration`,`specifiers`,`source`,`attributes`],[`local`],[`exported`],[`decorators`,`variance`,`key`,`typeAnnotation`,`value`],[`id`],[`key`,`value`],[`elementType`],[`id`,`typeParameters`],[`id`,`typeParameters`,`extends`,`body`],[`id`,`body`],[`typeAnnotation`],[`id`,`typeParameters`,`right`],[`name`,`typeAnnotation`],[`types`],[`qualification`,`id`],[`elementTypes`],[`expression`,`typeAnnotation`],[`params`],[`members`],[`objectType`,`indexType`],[`decorators`,`key`,`typeAnnotation`,`value`],[`id`,`typeParameters`,`params`,`returnType`,`body`],[`key`,`typeParameters`,`params`,`returnType`],[`typeParameters`,`params`,`returnType`],[`parameterName`,`typeAnnotation`],[`checkType`,`extendsType`,`trueType`,`falseType`],[`typeParameter`],[`literal`],[`expression`,`typeArguments`],[`decorators`,`key`,`typeAnnotation`],[`argument`,`cases`],[`pattern`,`body`,`guard`],[`properties`,`rest`],[`node`]],GT=WT({ArrayExpression:G[0],AssignmentExpression:G[1],BinaryExpression:G[1],InterpreterDirective:[],Directive:G[2],DirectiveLiteral:[],BlockStatement:G[3],BreakStatement:G[4],CallExpression:G[5],CatchClause:[`param`,`body`],ConditionalExpression:G[6],ContinueStatement:G[4],DebuggerStatement:[],DoWhileStatement:G[7],EmptyStatement:[],ExpressionStatement:G[8],File:[`program`],ForInStatement:G[9],ForStatement:[`init`,`test`,`update`,`body`],FunctionDeclaration:G[10],FunctionExpression:G[10],Identifier:[`typeAnnotation`,`decorators`],IfStatement:G[6],LabeledStatement:[`label`,`body`],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:G[1],MemberExpression:G[11],NewExpression:G[5],Program:G[3],ObjectExpression:G[12],ObjectMethod:G[13],ObjectProperty:G[14],RestElement:[`argument`,`typeAnnotation`,`decorators`],ReturnStatement:G[15],SequenceExpression:G[16],ParenthesizedExpression:G[8],SwitchCase:[`test`,`consequent`],SwitchStatement:[`discriminant`,`cases`],ThisExpression:[],ThrowStatement:G[15],TryStatement:[`block`,`handler`,`finalizer`],UnaryExpression:G[15],UpdateExpression:G[15],VariableDeclaration:[`declarations`],VariableDeclarator:G[17],WhileStatement:G[7],WithStatement:[`object`,`body`],AssignmentPattern:[`left`,`right`,`decorators`,`typeAnnotation`],ArrayPattern:[`elements`,`typeAnnotation`,`decorators`],ArrowFunctionExpression:[`typeParameters`,`params`,`predicate`,`returnType`,`body`],ClassBody:G[18],ClassExpression:G[19],ClassDeclaration:G[19],ExportAllDeclaration:[`source`,`attributes`,`exported`],ExportDefaultDeclaration:[`declaration`],ExportNamedDeclaration:G[20],ExportSpecifier:[`local`,`exported`],ForOfStatement:G[9],ImportDeclaration:[`specifiers`,`source`,`attributes`],ImportDefaultSpecifier:G[21],ImportNamespaceSpecifier:G[21],ImportSpecifier:[`imported`,`local`],MetaProperty:[`meta`,`property`],ClassMethod:G[13],ObjectPattern:[`decorators`,`properties`,`typeAnnotation`],SpreadElement:G[15],Super:[],TaggedTemplateExpression:[`tag`,`typeArguments`,`quasi`],TemplateElement:[],TemplateLiteral:[`quasis`,`expressions`],YieldExpression:G[15],AwaitExpression:G[15],ImportExpression:[`source`,`options`],BigIntLiteral:[],ExportNamespaceSpecifier:G[22],OptionalMemberExpression:G[11],OptionalCallExpression:G[5],ClassProperty:G[23],ClassPrivateProperty:G[23],ClassPrivateMethod:G[13],PrivateName:G[24],StaticBlock:G[18],ImportAttribute:G[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:G[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:G[27],DeclareClass:[`id`,`typeParameters`,`extends`,`mixins`,`implements`,`body`],DeclareFunction:[`id`,`predicate`],DeclareInterface:G[28],DeclareModule:G[29],DeclareModuleExports:G[30],DeclareTypeAlias:G[31],DeclareOpaqueType:[`id`,`typeParameters`,`supertype`,`lowerBound`,`upperBound`],DeclareVariable:[`id`,`declarations`],DeclareExportDeclaration:G[20],DeclareExportAllDeclaration:[`source`,`attributes`],DeclaredPredicate:G[2],ExistsTypeAnnotation:[],FunctionTypeAnnotation:[`typeParameters`,`this`,`params`,`rest`,`returnType`],FunctionTypeParam:G[32],GenericTypeAnnotation:G[27],InferredPredicate:[],InterfaceExtends:G[27],InterfaceDeclaration:G[28],InterfaceTypeAnnotation:[`extends`,`body`],IntersectionTypeAnnotation:G[33],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:G[30],NumberLiteralTypeAnnotation:[],BigIntLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:[`properties`,`indexers`,`callProperties`,`internalSlots`],ObjectTypeInternalSlot:[`id`,`value`],ObjectTypeCallProperty:G[2],ObjectTypeIndexer:[`variance`,`id`,`key`,`value`],ObjectTypeProperty:[`key`,`value`,`variance`],ObjectTypeSpreadProperty:G[15],OpaqueType:[`id`,`typeParameters`,`supertype`,`impltype`,`lowerBound`,`upperBound`],QualifiedTypeIdentifier:G[34],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:G[35],TypeofTypeAnnotation:[`argument`,`typeArguments`],TypeAlias:G[31],TypeAnnotation:G[30],TypeCastExpression:G[36],TypeParameter:[`bound`,`default`,`variance`],TypeParameterDeclaration:G[37],TypeParameterInstantiation:G[37],UnionTypeAnnotation:G[33],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:G[29],EnumBooleanBody:G[38],EnumNumberBody:G[38],EnumStringBody:G[38],EnumSymbolBody:G[38],EnumBooleanMember:G[17],EnumNumberMember:G[17],EnumStringMember:G[17],EnumDefaultedMember:G[24],IndexedAccessType:G[39],OptionalIndexedAccessType:G[39],JSXAttribute:[`name`,`value`],JSXClosingElement:[`name`],JSXElement:[`openingElement`,`children`,`closingElement`],JSXEmptyExpression:[],JSXExpressionContainer:G[8],JSXSpreadChild:G[8],JSXIdentifier:[],JSXMemberExpression:G[11],JSXNamespacedName:[`namespace`,`name`],JSXOpeningElement:[`name`,`typeArguments`,`attributes`],JSXSpreadAttribute:G[15],JSXText:[],JSXFragment:[`openingFragment`,`children`,`closingFragment`],JSXOpeningFragment:[],JSXClosingFragment:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:[`object`,`callee`],ClassAccessorProperty:G[40],Decorator:G[8],DoExpression:G[18],ExportDefaultSpecifier:G[22],ModuleExpression:G[18],TopicReference:[],VoidPattern:[],TSParameterProperty:[`parameter`,`decorators`],TSDeclareFunction:G[41],TSDeclareMethod:G[42],TSQualifiedName:G[1],TSCallSignatureDeclaration:G[43],TSConstructSignatureDeclaration:G[43],TSPropertySignature:[`key`,`typeAnnotation`],TSMethodSignature:G[42],TSIndexSignature:[`parameters`,`typeAnnotation`],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:G[43],TSConstructorType:G[43],TSTypeReference:[`typeName`,`typeArguments`],TSTypePredicate:G[44],TSTypeQuery:[`exprName`,`typeArguments`],TSTypeLiteral:G[38],TSArrayType:G[26],TSTupleType:G[35],TSOptionalType:G[30],TSRestType:G[30],TSNamedTupleMember:[`label`,`elementType`],TSUnionType:G[33],TSIntersectionType:G[33],TSConditionalType:G[45],TSInferType:G[46],TSParenthesizedType:G[30],TSTypeOperator:G[30],TSIndexedAccessType:G[39],TSMappedType:[`key`,`constraint`,`nameType`,`typeAnnotation`],TSTemplateLiteralType:[`quasis`,`types`],TSLiteralType:G[47],TSClassImplements:G[48],TSInterfaceHeritage:G[48],TSInterfaceDeclaration:G[28],TSInterfaceBody:G[18],TSTypeAliasDeclaration:[`id`,`typeParameters`,`typeAnnotation`],TSInstantiationExpression:G[48],TSAsExpression:G[36],TSSatisfiesExpression:G[36],TSTypeAssertion:G[36],TSEnumBody:G[38],TSEnumDeclaration:G[29],TSEnumMember:[`id`,`initializer`],TSModuleDeclaration:G[29],TSModuleBlock:G[18],TSImportType:[`source`,`options`,`qualifier`,`typeArguments`],TSImportEqualsDeclaration:[`id`,`moduleReference`],TSExternalModuleReference:G[8],TSNonNullExpression:G[8],TSExportAssignment:G[8],TSNamespaceExportDeclaration:G[24],TSTypeAnnotation:G[30],TSTypeParameterInstantiation:G[37],TSTypeParameterDeclaration:G[37],TSTypeParameter:[`name`,`constraint`,`default`],ChainExpression:G[8],Literal:[],MethodDefinition:G[14],PrivateIdentifier:[],Property:G[25],PropertyDefinition:G[23],AccessorProperty:G[40],TSAbstractAccessorProperty:G[49],TSAbstractKeyword:[],TSAbstractMethodDefinition:G[25],TSAbstractPropertyDefinition:G[49],TSAsyncKeyword:[],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:[`id`,`typeParameters`,`params`,`returnType`],TSExportKeyword:[],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],AsConstExpression:G[8],AsExpression:G[36],BigIntTypeAnnotation:[],ComponentDeclaration:[`id`,`params`,`body`,`typeParameters`,`rendersType`],ComponentParameter:[`name`,`local`],ComponentTypeAnnotation:[`params`,`rest`,`typeParameters`,`rendersType`],ComponentTypeParameter:G[32],ConditionalTypeAnnotation:G[45],DeclareComponent:[`id`,`params`,`rest`,`typeParameters`,`rendersType`],DeclareEnum:G[29],DeclareHook:G[24],DeclareNamespace:G[29],EnumBigIntBody:G[38],EnumBigIntMember:G[17],EnumBody:G[38],HookDeclaration:G[41],HookTypeAnnotation:[`params`,`returnType`,`rest`,`typeParameters`],InferTypeAnnotation:G[46],KeyofTypeAnnotation:G[15],MatchArrayPattern:[`elements`,`rest`],MatchAsPattern:[`pattern`,`target`],MatchBindingPattern:G[24],MatchExpression:G[50],MatchExpressionCase:G[51],MatchIdentifierPattern:G[24],MatchInstanceObjectPattern:G[52],MatchInstancePattern:[`targetConstructor`,`properties`],MatchLiteralPattern:G[47],MatchMemberPattern:[`base`,`property`],MatchObjectPattern:G[52],MatchObjectPatternProperty:[`key`,`pattern`],MatchOrPattern:[`patterns`],MatchRestPattern:G[15],MatchStatement:G[50],MatchStatementCase:G[51],MatchUnaryPattern:G[15],MatchWildcardPattern:[],NeverTypeAnnotation:[],ObjectTypeMappedTypeProperty:[`keyTparam`,`propType`,`sourceType`,`variance`],QualifiedTypeofIdentifier:G[34],RecordDeclaration:[`id`,`typeParameters`,`implements`,`body`],RecordDeclarationBody:G[0],RecordDeclarationImplements:[`id`,`typeArguments`],RecordDeclarationProperty:[`key`,`typeAnnotation`,`defaultValue`],RecordDeclarationStaticProperty:[`key`,`typeAnnotation`,`value`],RecordExpression:[`recordConstructor`,`typeArguments`,`properties`],RecordExpressionProperties:G[12],SatisfiesExpression:G[36],TupleTypeLabeledElement:[`label`,`elementType`,`variance`],TupleTypeSpreadElement:[`label`,`typeAnnotation`],TypeOperator:G[30],TypePredicate:G[44],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],NGChainedExpression:G[16],NGEmptyExpression:[],NGPipeExpression:[`left`,`right`,`arguments`],NGMicrosyntax:G[18],NGMicrosyntaxAs:[`key`,`alias`],NGMicrosyntaxExpression:[`expression`,`alias`],NGMicrosyntaxKey:[],NGMicrosyntaxKeyedExpression:[`key`,`expression`],NGMicrosyntaxLet:G[25],NGRoot:G[53],JsExpressionRoot:G[53],JsonRoot:G[53],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:G[30],TSJSDocNonNullableType:G[30]});function KT(e,t){return t(e)||RT(e,{getVisitorKeys:GT,predicate:t})}function qT(e){return e.type===`AssignmentExpression`||e.type===`BinaryExpression`||e.type===`LogicalExpression`||e.type===`NGPipeExpression`||e.type===`ConditionalExpression`||rC(e)||iC(e)||e.type===`SequenceExpression`||e.type===`TaggedTemplateExpression`||e.type===`BindExpression`||e.type===`UpdateExpression`&&!e.prefix||VS(e)||sC(e)}function JT(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function YT(e){if(e.expressions)return[`expressions`,0];if(e.left)return[`left`];if(e.test)return[`test`];if(e.object)return[`object`];if(e.callee)return[`callee`];if(e.tag)return[`tag`];if(e.argument)return[`argument`];if(e.expression)return[`expression`];throw Error(`Unexpected node has no left side.`)}function XT(e,t){return tC(t)?_T(t):W(t,U.Leading,t=>zC(e,H(t)))}function ZT(e,t){if(XT(t.originalText,e)||W(e,U.Leading,e=>VC(t.originalText,V(e),H(e)))&&!tC(e))return!0;if(qT(e)){let n=e,r;for(;r=JT(n);)if(n=r,XT(t.originalText,n))return!0}return!1}var QT=new WeakMap;function $T(e,t){return fS(QT,e,e=>ZT(e,t))}function eE(e){for(;sC(e);)e=e.expression;return e}function tE(e,t,n){let{node:r,key:i,parent:a}=e;switch(a.type){case`ReturnStatement`:case`ThrowStatement`:if(nE(e,t))return!1;break;case`ParenthesizedExpression`:return!1;case`ClassDeclaration`:case`ClassExpression`:if(i===`superClass`){let e=eE(r);if(e.type===`ArrowFunctionExpression`||e.type===`AssignmentExpression`||e.type===`AwaitExpression`||e.type===`BinaryExpression`||e.type===`ConditionalExpression`||e.type===`LogicalExpression`||e.type===`NewExpression`||e.type===`ObjectExpression`||e.type===`SequenceExpression`||e.type===`TaggedTemplateExpression`||e.type===`UnaryExpression`||e.type===`UpdateExpression`||e.type===`YieldExpression`||e.type===`ClassExpression`&&cS(e.decorators))return!0}break;case`ExportDefaultDeclaration`:if(rE(e,t,n))return!0;break;case`Decorator`:if(i===`expression`&&!iE(r))return!0;break;case`TypeAnnotation`:if(e.match(void 0,void 0,(e,t)=>t===`returnType`&&e.type===`ArrowFunctionExpression`)&&!(r.type===`NullableTypeAnnotation`&&e.call(()=>n(e,t),`typeAnnotation`))&&oE(r))return!0;break;case`VariableDeclarator`:if(i===`init`&&e.match(void 0,void 0,(e,t)=>t===`declarations`&&e.type===`VariableDeclaration`,(e,t)=>t===`left`&&e.type===`ForInStatement`))return!0;break;case`TSInstantiationExpression`:if(i===`expression`&&(r.type===`AwaitExpression`||r.type===`YieldExpression`))return!0}}function nE(e,t){let{key:n,parent:r}=e;if(!(n===`argument`&&JS(r)))return!1;let{node:i}=e;return!!((i.type===`SequenceExpression`||i.type===`AssignmentExpression`)&&$T(i,t))}function rE(e,t,n){let{node:r,parent:i}=e;return r.type===`FunctionExpression`||r.type===`ClassExpression`?i.type===`ExportDefaultDeclaration`||!n(e,t):!qT(r)||i.type!==`ExportDefaultDeclaration`&&n(e,t)?!1:e.call(()=>rE(e,t,n),...YT(r))}function iE(e){return e.type===`ChainExpression`&&(e=e.expression),aE(e)||rC(e)&&!e.optional&&aE(e.callee)}function aE(e){return e.type===`Identifier`?!0:iC(e)?!e.computed&&!e.optional&&e.property.type===`Identifier`&&aE(e.object):!1}function oE(e){return KT(e,e=>e.type===`ObjectTypeAnnotation`&&KT(e,e=>e.type===`FunctionTypeAnnotation`))}function sE(e,t){if(e.isRoot)return!1;let{node:n,key:r,parent:i}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&uE(n)&&dE(e))return!0;if(cE(n))return!1;if(n.type===`Identifier`)return NT(e);if(n.type===`ObjectExpression`||n.type===`FunctionExpression`||n.type===`ClassExpression`||n.type===`DoExpression`){let t=e.findAncestor(e=>e.type===`ExpressionStatement`)?.expression;if(t&&DT(t,e=>e===n))return!0}if(n.type===`ObjectExpression`){let t=e.findAncestor(e=>e.type===`ArrowFunctionExpression`)?.body;if(t&&t.type!==`SequenceExpression`&&t.type!==`AssignmentExpression`&&DT(t,e=>e===n))return!0}let a=tE(e,t,sE);if(typeof a==`boolean`)return a;switch(n.type){case`UpdateExpression`:if(i.type===`UnaryExpression`)return n.prefix&&(n.operator===`++`&&i.operator===`+`||n.operator===`--`&&i.operator===`-`);case`UnaryExpression`:switch(i.type){case`UnaryExpression`:return n.operator===i.operator&&(n.operator===`+`||n.operator===`-`);case`BindExpression`:return!0;case`MemberExpression`:case`OptionalMemberExpression`:return r===`object`;case`TaggedTemplateExpression`:return!0;case`NewExpression`:case`CallExpression`:case`OptionalCallExpression`:return r===`callee`;case`BinaryExpression`:return r===`left`&&n.type===`UnaryExpression`&&(i.operator===`in`||i.operator===`instanceof`)||r===`left`&&i.operator===`**`;case`TSNonNullExpression`:return!0;default:return!1}case`BinaryExpression`:if(i.type===`UpdateExpression`||n.operator===`in`&&lE(e))return!0;if(n.operator===`|>`&&n.extra?.parenthesized){let t=e.grandparent;if(t.type===`BinaryExpression`&&t.operator===`|>`)return!0}case`TSTypeAssertion`:case`TSAsExpression`:case`TSSatisfiesExpression`:case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:case`LogicalExpression`:switch(i.type){case`TSAsExpression`:case`TSSatisfiesExpression`:case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:return!VS(n);case`ConditionalExpression`:return VS(n)||ET(n);case`CallExpression`:case`NewExpression`:case`OptionalCallExpression`:return r===`callee`;case`ClassExpression`:case`ClassDeclaration`:return r===`superClass`;case`TSTypeAssertion`:case`TaggedTemplateExpression`:case`JSXSpreadAttribute`:case`SpreadElement`:case`BindExpression`:case`AwaitExpression`:case`TSNonNullExpression`:case`UpdateExpression`:return!0;case`UnaryExpression`:if(!W(n))return!0;break;case`MemberExpression`:case`OptionalMemberExpression`:return r===`object`;case`AssignmentExpression`:case`AssignmentPattern`:return r===`left`&&(n.type===`TSTypeAssertion`||VS(n));case`LogicalExpression`:if(n.type===`LogicalExpression`)return i.operator!==n.operator;case`BinaryExpression`:{let{operator:e,type:t}=n;if(!e&&t!==`TSTypeAssertion`)return!0;let a=bT(e),o=i.operator,s=bT(o);return!!(s>a||r===`right`&&s===a||s===a&&!wT(o,e)||s<a&&e===`%`&&(o===`+`||o===`-`)||TT(o))}default:return!1}break;case`SequenceExpression`:return i.type!==`ForStatement`;case`YieldExpression`:if(i.type===`AwaitExpression`||i.type===`TSTypeAssertion`)return!0;case`AwaitExpression`:switch(i.type){case`TaggedTemplateExpression`:case`UnaryExpression`:case`LogicalExpression`:case`SpreadElement`:case`TSAsExpression`:case`TSSatisfiesExpression`:case`TSNonNullExpression`:case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:case`BindExpression`:return!0;case`MemberExpression`:case`OptionalMemberExpression`:return r===`object`;case`NewExpression`:case`CallExpression`:case`OptionalCallExpression`:return r===`callee`;case`ConditionalExpression`:return r===`test`;case`BinaryExpression`:return!(!n.argument&&i.operator===`|>`);default:return!1}case`TSFunctionType`:if(e.match(e=>e.type===`TSFunctionType`,(e,t)=>t===`typeAnnotation`&&e.type===`TSTypeAnnotation`,(e,t)=>t===`returnType`&&e.type===`ArrowFunctionExpression`))return!0;case`TSConditionalType`:case`TSConstructorType`:case`ConditionalTypeAnnotation`:if(r===`extendsType`&&KS(n)&&i.type===n.type||r===`constraint`&&n.type===`TSConditionalType`&&i.type===`TSTypeParameter`||r===`typeAnnotation`&&n.type===`ConditionalTypeAnnotation`&&i.type===`TypeAnnotation`&&e.grandparent.type===`TypeParameter`&&e.grandparent.bound===i&&e.grandparent.usesExtendsBound||r===`checkType`&&KS(i))return!0;if(r===`extendsType`&&i.type===`TSConditionalType`){let{typeAnnotation:e}=n.returnType||n.typeAnnotation;if(e.type===`TSTypePredicate`&&e.typeAnnotation&&(e=e.typeAnnotation.typeAnnotation),e.type===`TSInferType`&&e.typeParameter.constraint)return!0}case`TSUnionType`:case`TSIntersectionType`:if(US(i)||WS(i))return!0;case`TSInferType`:if(n.type===`TSInferType`){if(i.type===`TSRestType`)return!1;if(r===`types`&&(i.type===`TSUnionType`||i.type===`TSIntersectionType`)&&n.typeParameter.type===`TSTypeParameter`&&n.typeParameter.constraint)return!0}case`TSTypeOperator`:return i.type===`TSArrayType`||i.type===`TSOptionalType`||i.type===`TSRestType`||r===`objectType`&&i.type===`TSIndexedAccessType`||i.type===`TSTypeOperator`||i.type===`TSTypeAnnotation`&&e.grandparent.type.startsWith(`TSJSDoc`);case`TSTypeQuery`:return r===`objectType`&&i.type===`TSIndexedAccessType`||r===`elementType`&&i.type===`TSArrayType`;case`TypeOperator`:return i.type===`ArrayTypeAnnotation`||i.type===`NullableTypeAnnotation`||r===`objectType`&&(i.type===`IndexedAccessType`||i.type===`OptionalIndexedAccessType`)||i.type===`TypeOperator`;case`TypeofTypeAnnotation`:case`KeyofTypeAnnotation`:return r===`objectType`&&(i.type===`IndexedAccessType`||i.type===`OptionalIndexedAccessType`)||r===`elementType`&&i.type===`ArrayTypeAnnotation`;case`ArrayTypeAnnotation`:return i.type===`NullableTypeAnnotation`;case`IntersectionTypeAnnotation`:case`UnionTypeAnnotation`:return i.type===`TypeOperator`||i.type===`KeyofTypeAnnotation`||i.type===`ArrayTypeAnnotation`||i.type===`NullableTypeAnnotation`||i.type===`IntersectionTypeAnnotation`||i.type===`UnionTypeAnnotation`||r===`objectType`&&(i.type===`IndexedAccessType`||i.type===`OptionalIndexedAccessType`);case`InferTypeAnnotation`:case`NullableTypeAnnotation`:if(i.type===`ArrayTypeAnnotation`||r===`objectType`&&(i.type===`IndexedAccessType`||i.type===`OptionalIndexedAccessType`))return!0;break;case`ComponentTypeAnnotation`:case`FunctionTypeAnnotation`:{if(n.type===`ComponentTypeAnnotation`&&(n.rendersType===null||n.rendersType===void 0))return!1;if(e.match(void 0,(e,t)=>t===`typeAnnotation`&&e.type===`TypeAnnotation`,(e,t)=>t===`returnType`&&e.type===`ArrowFunctionExpression`)||e.match(void 0,(e,t)=>t===`typeAnnotation`&&e.type===`NullableTypeAnnotation`,(e,t)=>t===`typeAnnotation`&&e.type===`TypeAnnotation`,(e,t)=>t===`returnType`&&e.type===`ArrowFunctionExpression`)||e.match(void 0,(e,t)=>t===`typeAnnotation`&&e.type===`TypePredicate`,(e,t)=>t===`typeAnnotation`&&e.type===`TypeAnnotation`,(e,t)=>t===`returnType`&&e.type===`ArrowFunctionExpression`))return!0;let t=i.type===`NullableTypeAnnotation`?e.grandparent:i;return t.type===`UnionTypeAnnotation`||t.type===`IntersectionTypeAnnotation`||t.type===`ArrayTypeAnnotation`||r===`objectType`&&(t.type===`IndexedAccessType`||t.type===`OptionalIndexedAccessType`)||r===`checkType`&&i.type===`ConditionalTypeAnnotation`||r===`extendsType`&&i.type===`ConditionalTypeAnnotation`&&n.returnType?.type===`InferTypeAnnotation`&&n.returnType.typeParameter.bound||t.type===`NullableTypeAnnotation`||i.type===`FunctionTypeParam`&&i.name===null&&hS(n).some(e=>e.typeAnnotation?.type===`NullableTypeAnnotation`)}case`OptionalIndexedAccessType`:return r===`objectType`&&i.type===`IndexedAccessType`;case`StringLiteral`:case`NumericLiteral`:case`Literal`:if(typeof n.value==`string`&&i.type===`ExpressionStatement`&&typeof i.directive!=`string`){let t=e.grandparent;return t.type===`Program`||t.type===`BlockStatement`}return r===`object`&&iC(i)&&RS(n);case`AssignmentExpression`:return!((r===`init`||r===`update`)&&i.type===`ForStatement`||r===`expression`&&n.left.type!==`ObjectPattern`&&i.type===`ExpressionStatement`||r===`key`&&i.type===`TSPropertySignature`||i.type===`AssignmentExpression`||r===`expressions`&&i.type===`SequenceExpression`&&e.match(void 0,void 0,(e,t)=>(t===`init`||t===`update`)&&e.type===`ForStatement`)||r===`value`&&i.type===`Property`&&e.match(void 0,void 0,(e,t)=>t===`properties`&&e.type===`ObjectPattern`)||i.type===`NGChainedExpression`||r===`node`&&i.type===`JsExpressionRoot`);case`ConditionalExpression`:switch(i.type){case`TaggedTemplateExpression`:case`UnaryExpression`:case`SpreadElement`:case`BinaryExpression`:case`LogicalExpression`:case`NGPipeExpression`:case`AwaitExpression`:case`JSXSpreadAttribute`:case`TSTypeAssertion`:case`TypeCastExpression`:case`TSAsExpression`:case`TSSatisfiesExpression`:case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:case`TSNonNullExpression`:return!0;case`NewExpression`:case`CallExpression`:case`OptionalCallExpression`:return r===`callee`;case`ConditionalExpression`:return!t.experimentalTernaries&&r===`test`;case`MemberExpression`:case`OptionalMemberExpression`:return r===`object`;default:return!1}case`FunctionExpression`:switch(i.type){case`NewExpression`:case`CallExpression`:case`OptionalCallExpression`:return r===`callee`;case`TaggedTemplateExpression`:return!0;case`ExportDefaultDeclaration`:return r===`declaration`;default:return!1}case`ArrowFunctionExpression`:switch(i.type){case`BinaryExpression`:return i.operator!==`|>`||n.extra?.parenthesized;case`NewExpression`:case`CallExpression`:case`OptionalCallExpression`:return r===`callee`;case`MemberExpression`:case`OptionalMemberExpression`:return r===`object`;case`TSAsExpression`:case`TSSatisfiesExpression`:case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:case`TSNonNullExpression`:case`BindExpression`:case`TaggedTemplateExpression`:case`UnaryExpression`:case`LogicalExpression`:case`AwaitExpression`:case`TSTypeAssertion`:case`MatchExpressionCase`:return!0;case`TSInstantiationExpression`:return r===`expression`;case`ConditionalExpression`:return r===`test`;default:return!1}case`ClassExpression`:switch(i.type){case`NewExpression`:return r===`callee`;case`ExportDefaultDeclaration`:return r===`declaration`;default:return!1}case`OptionalMemberExpression`:case`OptionalCallExpression`:case`ChainExpression`:case`TSNonNullExpression`:if(MT(e))return!0;case`CallExpression`:case`MemberExpression`:case`TaggedTemplateExpression`:case`ImportExpression`:if(r===`callee`&&(i.type===`BindExpression`||i.type===`NewExpression`)){let e=n;for(;e;)switch(e.type){case`CallExpression`:case`ImportExpression`:return!0;case`MemberExpression`:case`OptionalMemberExpression`:case`BindExpression`:e=e.object;break;case`TaggedTemplateExpression`:e=e.tag;break;case`TSNonNullExpression`:e=e.expression;break;default:return!1}}return!1;case`BindExpression`:return r===`callee`&&(i.type===`BindExpression`||i.type===`NewExpression`)||r===`object`&&iC(i);case`NGPipeExpression`:return!(i.type===`NGRoot`||i.type===`NGMicrosyntaxExpression`||i.type===`ObjectProperty`&&!n.extra?.parenthesized||XS(i)||r===`arguments`&&rC(i)||r===`right`&&i.type===`NGPipeExpression`||r===`property`&&i.type===`MemberExpression`||i.type===`AssignmentExpression`);case`JSXFragment`:case`JSXElement`:return r===`callee`||r===`left`&&i.type===`BinaryExpression`&&i.operator===`<`||!XS(i)&&i.type!==`ArrowFunctionExpression`&&i.type!==`AssignmentExpression`&&i.type!==`AssignmentPattern`&&i.type!==`BinaryExpression`&&i.type!==`ConditionalExpression`&&i.type!==`ExpressionStatement`&&i.type!==`JsExpressionRoot`&&i.type!==`JSXAttribute`&&i.type!==`JSXElement`&&i.type!==`JSXExpressionContainer`&&i.type!==`JSXFragment`&&i.type!==`LogicalExpression`&&!aC(i)&&!ow(i)&&!JS(i)&&i.type!==`TypeCastExpression`&&i.type!==`VariableDeclarator`&&i.type!==`YieldExpression`&&i.type!==`MatchExpressionCase`&&(r!==`declaration`||i.type!==`ExportDefaultDeclaration`);case`TSInstantiationExpression`:return r===`object`&&iC(i);case`MatchOrPattern`:return i.type===`MatchAsPattern`}return!1}var cE=z(`BlockStatement.BreakStatement.ComponentDeclaration.ClassBody.ClassDeclaration.ClassMethod.ClassProperty.PropertyDefinition.ClassPrivateProperty.ContinueStatement.DebuggerStatement.DeclareComponent.DeclareClass.DeclareExportAllDeclaration.DeclareExportDeclaration.DeclareFunction.DeclareHook.DeclareInterface.DeclareModule.DeclareModuleExports.DeclareNamespace.DeclareVariable.DeclareEnum.DoWhileStatement.EnumDeclaration.ExportAllDeclaration.ExportDefaultDeclaration.ExportNamedDeclaration.ExpressionStatement.ForInStatement.ForOfStatement.ForStatement.FunctionDeclaration.HookDeclaration.IfStatement.ImportDeclaration.InterfaceDeclaration.LabeledStatement.MethodDefinition.ReturnStatement.SwitchStatement.ThrowStatement.TryStatement.TSDeclareFunction.TSEnumDeclaration.TSImportEqualsDeclaration.TSInterfaceDeclaration.TSModuleDeclaration.TSNamespaceExportDeclaration.TypeAlias.VariableDeclaration.WhileStatement.WithStatement`.split(`.`));function lE(e){let t=0,{node:n}=e;for(;n;){let r=e.getParentNode(t++);if(r?.type===`ForStatement`&&r.init===n)return!0;n=r}return!1}function uE(e){return ZS(e)}function dE(e){let{parent:t,key:n}=e;switch(t.type){case`NGPipeExpression`:if(n===`arguments`&&e.isLast)return e.callParent(dE);break;case`ObjectProperty`:if(n===`value`)return e.callParent(()=>e.key===`properties`&&e.isLast);break;case`BinaryExpression`:case`LogicalExpression`:if(n===`right`)return e.callParent(dE);break;case`ConditionalExpression`:if(n===`alternate`)return e.callParent(dE);break;case`UnaryExpression`:if(t.prefix&&e.callParent(dE))return!0}return!1}var fE=sE,pE=`string`,mE=`array`,hE=`cursor`,gE=`indent`,_E=`align`,vE=`trim`,yE=`group`,bE=`fill`,xE=`if-break`,SE=`indent-if-break`,CE=`line-suffix`,wE=`line-suffix-boundary`,TE=`line`,EE=`label`,DE=`break-parent`,OE=new Set([hE,gE,_E,vE,yE,bE,xE,SE,CE,wE,TE,EE,DE]);function kE(e){if(typeof e==`string`)return pE;if(Array.isArray(e))return mE;if(!e)return;let{type:t}=e;if(OE.has(t))return t}var AE=kE,jE=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function ME(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
302
+ Expected it to be 'string' or 'object'.`;if(AE(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=jE([...OE].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
303
+ Expected it to be ${r}.`}var NE=class extends Error{name=`InvalidDocError`;constructor(e){super(ME(e)),this.doc=e}},PE={};function FE(e,t,n,r){let i=[e];for(;i.length>0;){let e=i.pop();if(e===PE){n(i.pop());continue}n&&i.push(e,PE);let a=AE(e);if(!a)throw new NE(e);if(t?.(e)!==!1)switch(a){case mE:case bE:{let t=a===mE?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case xE:i.push(e.flatContents,e.breakContents);break;case yE:if(r&&e.expandedStates)for(let t=e.expandedStates.length,n=t-1;n>=0;--n)i.push(e.expandedStates[n]);else i.push(e.contents);break;case _E:case gE:case SE:case EE:case CE:i.push(e.contents);break;case pE:case hE:case vE:case wE:case TE:case DE:break;default:throw new NE(e)}}}var IE=FE;function LE(e,t){if(typeof e==`string`)return t(e);let n=new Map;return r(e);function r(e){return fS(n,e,i)}function i(e){switch(AE(e)){case mE:return t(e.map(r));case bE:return t({...e,parts:e.parts.map(r)});case xE:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case yE:{let{expandedStates:n,contents:i}=e;return n?(n=n.map(r),i=n[0]):i=r(i),t({...e,contents:i,expandedStates:n})}case _E:case gE:case SE:case EE:case CE:return t({...e,contents:r(e.contents)});case pE:case hE:case vE:case wE:case TE:case DE:return t(e);default:throw new NE(e)}}}function RE(e,t,n){let r=n,i=!1;function a(e){if(i)return!1;let n=t(e);n!==void 0&&(i=!0,r=n)}return IE(e,a),r}function zE(e){if(e.type===yE&&e.break||e.type===TE&&e.hard||e.type===DE)return!0}function BE(e){return RE(e,zE,!1)}function VE(e){if(e.length>0){let t=B(0,e,-1);!t.expandedStates&&!t.break&&(t.break=`propagated`)}return null}function HE(e){let t=new Set,n=[];function r(e){if(e.type===DE&&VE(n),e.type===yE){if(n.push(e),t.has(e))return!1;t.add(e)}}function i(e){e.type===yE&&n.pop().break&&VE(n)}IE(e,r,i,!0)}function UE(e){return e.type===TE&&!e.hard?e.soft?``:` `:e.type===xE?e.flatContents:e}function WE(e){return LE(e,UE)}function GE(e){switch(AE(e)){case bE:{let{parts:t}=e;if(t.every(e=>e===``))return``;if(t.length===1)return t[0];break}case yE:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return``;if(e.contents.type===yE&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case _E:case gE:case SE:case CE:if(!e.contents)return``;break;case xE:if(!e.flatContents&&!e.breakContents)return``;break;case mE:{let t=[];for(let n of e){if(!n)continue;let[e,...r]=Array.isArray(n)?n:[n];typeof e==`string`&&typeof B(0,t,-1)==`string`?t[t.length-1]+=e:t.push(e),t.push(...r)}return t.length===0?``:t.length===1?t[0]:t}case pE:case hE:case vE:case wE:case TE:case EE:case DE:break;default:throw new NE(e)}return e}function KE(e){return LE(e,e=>GE(e))}function qE(e,t=mD){return LE(e,e=>typeof e==`string`?Y(t,e.split(`
304
+ `)):e)}function JE(e){if(e.type===TE)return!0}function YE(e){return RE(e,JE,!1)}function XE(e,t){return e.type===EE?{...e,contents:t(e.contents)}:t(e)}function ZE(e){let t=!0;return IE(e,e=>{switch(AE(e)){case pE:if(e===``)break;case vE:case wE:case TE:case DE:return t=!1,!1}}),t}var QE=lS,$E=lS,eD=lS,tD=lS;function K(e){return QE(e),{type:gE,contents:e}}function nD(e,t){return tD(e),QE(t),{type:_E,contents:t,n:e}}function rD(e){return nD(-1/0,e)}function iD(e){return nD({type:`root`},e)}function aD(e){return nD(-1,e)}function oD(e,t,n){QE(e);let r=e;if(t>0){for(let e=0;e<Math.floor(t/n);++e)r=K(r);r=nD(t%n,r),r=nD(-1/0,r)}return r}var sD={type:DE},cD={type:hE};function lD(e){return eD(e),{type:bE,parts:e}}function q(e,t={}){return QE(e),$E(t.expandedStates,!0),{type:yE,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function uD(e,t){return q(e[0],{...t,expandedStates:e})}function J(e,t=``,n={}){return QE(e),t!==``&&QE(t),{type:xE,breakContents:e,flatContents:t,groupId:n.groupId}}function dD(e,t){return QE(e),{type:SE,contents:e,groupId:t.groupId,negate:t.negate}}function Y(e,t){QE(e),$E(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}function fD(e,t){return QE(t),e?{type:EE,label:e,contents:t}:t}var X={type:TE},Z={type:TE,soft:!0},pD={type:TE,hard:!0},Q=[pD,sD],mD=[{type:TE,hard:!0,literal:!0},sD];function hD(e){return QE(e),{type:CE,contents:e}}var gD={type:wE},_D=`cr`,vD=`crlf`,yD=`\r`,bD=`\r
305
+ `,xD=`
306
+ `;function SD(e){return e===_D?yD:e===vD?bD:xD}var CD=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,wD=12288,TD=65510,ED=[12288,12288,65281,65376,65504,65510],DD=4352,OD=262141,kD=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],AD=(e,t)=>{let n=0,r=Math.floor(e.length/2)-1;for(;n<=r;){let i=Math.floor((n+r)/2),a=i*2;if(t<e[a])r=i-1;else if(t>e[a+1])n=i+1;else return!0}return!1},jD=19968,[MD,ND]=PD(kD);function PD(e){let t=e[0],n=e[1];for(let r=0;r<e.length;r+=2){let i=e[r],a=e[r+1];if(jD>=i&&jD<=a)return[i,a];a-i>n-t&&(t=i,n=a)}return[t,n]}var FD=e=>e<wD||e>TD?!1:AD(ED,e),ID=e=>e>=MD&&e<=ND?!0:e<DD||e>OD?!1:AD(kD,e),LD=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05-\u2B07]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF3\uDFF5\uDFF7]|\uD83D[\uDC3F\uDC41\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])$/,RD=e=>LD.test(e),zD=/[^\x20-\x7F]/;function BD(e){if(!e)return 0;if(!zD.test(e))return e.length;let t=0;e=e.replace(CD(),e=>(t+=RD(e)?1:2,``));for(let n of e){let e=n.codePointAt(0);e<=31||e>=127&&e<=159||e>=768&&e<=879||e>=65024&&e<=65039||(t+=FD(e)||ID(e)?2:1)}return t}var VD=BD,HD={type:0},UD={type:1},WD={value:``,length:0,queue:[],get root(){return WD}};function GD(e,t,n){let r=t.type===1?e.queue.slice(0,-1):[...e.queue,t],i=``,a=0,o=0,s=0;for(let e of r)switch(e.type){case 0:u(),n.useTabs?c(1):l(n.tabWidth);break;case 3:{let{string:t}=e;u(),i+=t,a+=t.length;break}case 2:{let{width:t}=e;o+=1,s+=t;break}default:throw Error(`Unexpected indent comment '${e.type}'.`)}return f(),{...e,value:i,length:a,queue:r};function c(e){i+=` `.repeat(e),a+=n.tabWidth*e}function l(e){i+=` `.repeat(e),a+=e}function u(){n.useTabs?d():f()}function d(){o>0&&c(o),p()}function f(){s>0&&l(s),p()}function p(){o=0,s=0}}function KD(e,t,n){if(!t)return e;if(t.type===`root`)return{...e,root:e};if(t===-1/0)return e.root;let r;return r=typeof t==`number`?t<0?UD:{type:2,width:t}:{type:3,string:t},GD(e,r,n)}function qD(e,t){return GD(e,HD,t)}function JD(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r===` `||r===` `)t++;else break}return t}function YD(e){let t=JD(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}var XD=class{#e=[];#t=``;#n=0;#r=[];#i=[];#a(){let e=this.#t;e!==``&&(this.#e.push(e),this.#n+=e.length,this.#t=``);for(let e of this.#i)this.#r.push(Math.min(e,this.#n));this.#i.length=0}markPosition(){if(this.#r.length+this.#i.length>=2)throw Error(`There are too many 'cursor' in doc.`);this.#i.push(this.#n+this.#t.length)}write(e){this.#t+=e}trim(){let{text:e,count:t}=YD(this.#t);return this.#t=e,this.#a(),t}finish(){return this.#a(),{text:this.#e.join(``),positions:this.#r}}},ZD=Symbol(`MODE_BREAK`),QD=Symbol(`MODE_FLAT`),$D=Symbol(`DOC_FILL_PRINTED_LENGTH`);function eO(e,t,n,r,i,a){if(n===1/0)return!0;let o=t.length,s=!1,c=[e],l=``;for(;n>=0;){if(c.length===0){if(o===0)return!0;c.push(t[--o]);continue}let{mode:e,doc:u}=c.pop(),d=AE(u);switch(d){case pE:u&&(s&&=(l+=` `,--n,!1),l+=u,n-=VD(u));break;case mE:case bE:{let t=d===mE?u:u.parts,n=u[$D]??0;for(let r=t.length-1;r>=n;r--)c.push({mode:e,doc:t[r]});break}case gE:case _E:case SE:case EE:c.push({mode:e,doc:u.contents});break;case vE:{let{text:e,count:t}=YD(l);l=e,n+=t;break}case yE:{if(a&&u.break)return!1;let t=u.break?ZD:e,n=u.expandedStates&&t===ZD?B(0,u.expandedStates,-1):u.contents;c.push({mode:t,doc:n});break}case xE:{let t=(u.groupId?i[u.groupId]||QD:e)===ZD?u.breakContents:u.flatContents;t&&c.push({mode:e,doc:t});break}case TE:if(e===ZD||u.hard)return!0;u.soft||(s=!0);break;case CE:r=!0;break;case wE:if(r)return!1}}return!1}function tO(e,t){let n=Object.create(null),r=t.printWidth,i=SD(t.endOfLine),a=0,o=[{indent:WD,mode:ZD,doc:e}],s=!1,c=[],l=new XD;for(HE(e);o.length>0;){let{indent:e,mode:u,doc:d}=o.pop();switch(AE(d)){case pE:{let e=i===`
307
+ `?d:YC(0,d,`
308
+ `,i);e&&(l.write(e),o.length>0&&(a+=VD(e)));break}case mE:for(let t=d.length-1;t>=0;t--)o.push({indent:e,mode:u,doc:d[t]});break;case hE:l.markPosition();break;case gE:o.push({indent:qD(e,t),mode:u,doc:d.contents});break;case _E:o.push({indent:KD(e,d.n,t),mode:u,doc:d.contents});break;case vE:a-=l.trim();break;case yE:{let t=(function(){if(u===QD&&!s)return{indent:e,mode:d.break?ZD:QD,doc:d.contents};s=!1;let t=r-a,i=c.length>0,l={indent:e,mode:QD,doc:d.contents};if(!d.break&&eO(l,o,t,i,n))return l;if(!d.expandedStates)return{indent:e,mode:ZD,doc:d.contents};if(!d.break)for(let r=1;r<d.expandedStates.length-1;r++){let a={indent:e,mode:QD,doc:d.expandedStates[r]};if(eO(a,o,t,i,n))return a}return{indent:e,mode:ZD,doc:B(0,d.expandedStates,-1)}})();o.push(t),d.id&&(n[d.id]=t.mode);break}case bE:{let t=r-a,i=d[$D]??0,{parts:s}=d,l=s.length-i;if(l===0)break;let f=s[i+0],p=s[i+1],m={indent:e,mode:QD,doc:f},h={indent:e,mode:ZD,doc:f},g=eO(m,[],t,c.length>0,n,!0);if(l===1){g?o.push(m):o.push(h);break}let _={indent:e,mode:QD,doc:p},v={indent:e,mode:ZD,doc:p};if(l===2){g?o.push(_,m):o.push(v,h);break}let y=s[i+2],b={indent:e,mode:u,doc:{...d,[$D]:i+2}},x=eO({indent:e,mode:QD,doc:[f,p,y]},[],t,c.length>0,n,!0);o.push(b),x?o.push(_,m):g?o.push(v,m):o.push(v,h);break}case xE:case SE:{let t=d.groupId?n[d.groupId]:u;if(t===ZD){let t=d.type===xE?d.breakContents:d.negate?d.contents:K(d.contents);t&&o.push({indent:e,mode:u,doc:t})}if(t===QD){let t=d.type===xE?d.flatContents:d.negate?K(d.contents):d.contents;t&&o.push({indent:e,mode:u,doc:t})}break}case CE:c.push({indent:e,mode:u,doc:d.contents});break;case wE:c.length>0&&o.push({indent:e,mode:u,doc:pD});break;case TE:switch(u){case QD:if(!d.hard){d.soft||(l.write(` `),a+=1);break}s=!0;case ZD:if(c.length>0){o.push({indent:e,mode:u,doc:d},...c.reverse()),c.length=0;break}d.literal?(l.write(i),a=0,e.root&&(e.root.value&&l.write(e.root.value),a=e.root.length)):(l.trim(),l.write(i+e.value),a=e.length)}break;case EE:o.push({indent:e,mode:u,doc:d.contents});break;case DE:break;default:throw new NE(d)}o.length===0&&c.length>0&&(o.push(...c.reverse()),c.length=0)}let{text:u,positions:d}=l.finish();if(d.length!==2)return{formatted:u};let[f,p]=d;return{formatted:u,cursorNodeStart:f,cursorNodeText:u.slice(f,p)}}var nO=class extends Error{name=`ArgExpansionBailout`};function rO(e){return(e.type===`ObjectTypeProperty`||e.type===`ObjectTypeInternalSlot`)&&!e.static&&!e.method&&e.kind!==`get`&&e.kind!==`set`&&e.value.type===`FunctionTypeAnnotation`}function iO(e,t){let n=null,r=t;for(;r!==n;)n=r,r=TC(e,r),r=OC(e,r),r=wC(e,r);return r=NC(e,r),r=jC(e,r),r!==!1&&zC(e,r)}var aO=iO,oO=(e,{originalText:t})=>{let n=H(e);if(aO(t,n))return!0;let r=SS(e);return r!==n&&aO(t,r)},sO=z([`AnyTypeAnnotation`,`ThisTypeAnnotation`,`NumberTypeAnnotation`,`VoidTypeAnnotation`,`BooleanTypeAnnotation`,`BigIntTypeAnnotation`,`SymbolTypeAnnotation`,`StringTypeAnnotation`,`NeverTypeAnnotation`,`UndefinedTypeAnnotation`,`UnknownTypeAnnotation`,`EmptyTypeAnnotation`,`MixedTypeAnnotation`]),cO=z([`TSThisType`,`NullLiteralTypeAnnotation`,`BooleanLiteralTypeAnnotation`,`StringLiteralTypeAnnotation`,`BigIntLiteralTypeAnnotation`,`NumberLiteralTypeAnnotation`,`TSLiteralType`,`TSTemplateLiteralType`]);function lO({type:e}){return e.startsWith(`TS`)&&e.endsWith(`Keyword`)}var uO=lO;function dO(e){return uO(e)||sO(e)||cO(e)||e.type===`GenericTypeAnnotation`&&!e.typeParameters||e.type===`TSTypeReference`&&!e.typeArguments}function fO(e){return(e.type===`TypeAnnotation`||e.type===`TSTypeAnnotation`)&&e.typeAnnotation.type===`FunctionTypeAnnotation`&&!e.static&&!MS(e,e.typeAnnotation)}function pO(e,t){let n=t.split(`.`);for(let t=n.length-1;t>=0;t--){let r=n[t];if(t===0)return e.type===`Identifier`&&e.name===r;if(t===1&&e.type===`MetaProperty`&&e.property.type===`Identifier`&&e.property.name===r){e=e.meta;continue}if(e.type===`MemberExpression`&&!e.optional&&!e.computed&&e.property.type===`Identifier`&&e.property.name===r){e=e.object;continue}return!1}}function mO(e,t){return t.some(t=>pO(e,t))}var hO=`it,it.only,it.skip,describe,describe.only,describe.skip,test,test.only,test.skip,test.fixme,test.step,test.describe,test.describe.only,test.describe.skip,test.describe.fixme,test.describe.parallel,test.describe.parallel.only,test.describe.serial,test.describe.serial.only,skip,xit,xdescribe,xtest,fit,fdescribe,ftest`.split(`,`);function gO(e){return mO(e,hO)}function _O(e){return e.type===`Identifier`&&(e.name===`beforeEach`||e.name===`beforeAll`||e.name===`afterEach`||e.name===`afterAll`)}function vO(e){return rC(e)&&e.callee.type===`Identifier`&&[`async`,`inject`,`fakeAsync`,`waitForAsync`].includes(e.callee.name)}function yO(e){return e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`&&e.body.type===`BlockStatement`}function bO(e,t){if(e?.type!==`CallExpression`||e.optional)return!1;let n=WC(e);if(n.length===1){if(vO(e)&&bO(t))return eC(n[0]);if(_O(e.callee))return vO(n[0])}else if((n.length===2||n.length===3)&&(n[0].type===`TemplateLiteral`||BS(n[0]))&&gO(e.callee))return n[2]&&!RS(n[2])?!1:(n.length===2?eC(n[1]):yO(n[1])&&hS(n[1]).length<=1)||vO(n[1]);return!1}function xO(e,t){let n=t-1;n=wC(e,n,{backwards:!0}),n=jC(e,n,{backwards:!0}),n=wC(e,n,{backwards:!0});let r=jC(e,n,{backwards:!0});return n!==r}var SO=xO,CO=()=>!0;function wO(e,t){let n=e.node;return n.printed=!0,t.printer.printComment(e,t)}function TO(e,t){let n=e.node,r=[wO(e,t)],{printer:i,originalText:a,locStart:o,locEnd:s}=t;if(i.isBlockComment?.(n)){let e=` `;zC(a,s(n))&&(e=zC(a,o(n),{backwards:!0})?Q:X),r.push(e)}else r.push(Q);let c=jC(a,wC(a,s(n)));return c!==!1&&zC(a,c)&&r.push(Q),r}function EO(e,t,n){let r=e.node,i=wO(e,t),{printer:a,originalText:o,locStart:s}=t,c=a.isBlockComment?.(r);return n?.hasLineSuffix&&!n?.isBlock||zC(o,s(r),{backwards:!0})?{doc:hD([Q,SO(o,s(r))?Q:``,i]),isBlock:c,hasLineSuffix:!0}:!c||n?.hasLineSuffix?{doc:[hD([` `,i]),sD],isBlock:c,hasLineSuffix:!0}:{doc:[` `,i],isBlock:c,hasLineSuffix:!1}}function DO(e,t,n={}){let{indent:r=!1,marker:i,filter:a=CO}=n,o=new Set(e.node?.comments?.filter(e=>!(e.leading||e.trailing||e.marker!==i||!a(e))));if(o.size===0)return``;let s=Y(Q,e.map(({node:n})=>o.has(n)?wO(e,t):``,`comments`).filter(Boolean));return r?K([Q,s]):s}function OO(e,t,n){let r=t[Symbol.for(`printedComments`)],i=n?.filter??CO,a=new Set(e.node?.comments?.filter(e=>!r?.has(e)&&e.leading&&i(e)));return a.size===0?``:e.map(({node:n})=>a.has(n)?TO(e,t):``,`comments`).filter(Boolean)}function kO(e,t,n){let r=e.node?.comments,i=new Set(r?.filter(e=>e.trailing)),a=t[Symbol.for(`printedComments`)],o=n?.filter??CO,s=new Set(r?.filter(e=>i.has(e)&&!a?.has(e)&&o(e)));if(s.size===0)return``;let c=[],l;return e.each(({node:n})=>{i.has(n)&&(l=EO(e,t,l),s.has(n)&&c.push(l.doc))},`comments`),c}function AO(e,t,n){return{leading:OO(e,t,n),trailing:kO(e,t,n)}}function jO(e,t,n,r){let i=OO(e,n,r),a=kO(e,n,r);return i||a?XE(t,e=>[i,e,a]):t}function MO(e,t=`es5`){return e.trailingComma===`es5`&&t===`es5`||e.trailingComma===`all`&&(t===`all`||t===`es5`)}function NO(e){let{node:t}=e;return!t.optional||t.type===`Identifier`&&t===e.parent.key?``:rC(t)||iC(t)&&t.computed||t.type===`OptionalIndexedAccessType`?`?.`:`?`}function PO(e){return e.node.definite||e.match(void 0,(e,t)=>t===`id`&&e.type===`VariableDeclarator`&&e.definite)?`!`:``}var FO=z([`DeclareClass`,`DeclareComponent`,`DeclareFunction`,`DeclareHook`,`DeclareVariable`,`DeclareExportDeclaration`,`DeclareExportAllDeclaration`,`DeclareOpaqueType`,`DeclareTypeAlias`,`DeclareEnum`,`DeclareInterface`]),IO=e=>{let{node:t}=e;return FO(t)?e.parent.type!==`DeclareExportDeclaration`&&!t.implicitDeclare:t.declare};function LO(e){return IO(e)?`declare `:``}var RO=z([`TSAbstractMethodDefinition`,`TSAbstractPropertyDefinition`,`TSAbstractAccessorProperty`]);function zO({node:e}){return e.abstract||RO(e)?`abstract `:``}function BO(e){return e.accessibility?e.accessibility+` `:``}var VO=e=>e.type===`UnaryExpression`&&e.operator===`!`;function HO(e){return W(e)||!VO(e)?!1:(e=e.argument,e=VO(e)?e.argument:e,e.type===`LogicalExpression`)}function UO(e,t,n){let{node:r}=e,i=r.type===`WithStatement`?`object`:`test`,a=n(i);return HO(r[i])?a:q([K([Z,a]),Z])}function WO(e,t,n){let{node:r}=e;return W(r,U.Dangling,n)?[K([Z,DO(e,t,{filter:n})]),W(r,U.Dangling|U.Line,n)?Q:Z]:``}function GO(e,t=`es5`){return MO(e,t)?J(`,`):``}function KO(e){return e.semi?`;`:``}var qO=e=>e.mark!==`commentBeforeArrow`;function JO(e,t,n,r,i){let a=e.node,o=hS(a),s=i&&a.typeParameters?n(`typeParameters`):``;if(o.length===0)return[s,`(`,WO(e,t,qO),`)`];let{parent:c}=e,l=bO(c),u=YO(a),d=[];if(gS(e,(e,r)=>{let i=r===o.length-1;i&&a.rest&&d.push(`...`),d.push(n()),!i&&(d.push(`,`),l||u?d.push(` `):oO(o[r],t)?d.push(Q,Q):d.push(X))}),r&&!QO(e)){if(BE(s)||BE(d))throw new nO;return q([WE(s),`(`,WE(d),`)`])}let f=o.every(e=>!cS(e.decorators));return u&&f||l?[s,`(`,...d,`)`]:(rO(c)||fO(c)||c.type===`TypeAlias`||c.type===`UnionTypeAnnotation`||c.type===`IntersectionTypeAnnotation`||c.type===`FunctionTypeAnnotation`&&c.returnType===a)&&o.length===1&&o[0].name===null&&a.this!==o[0]&&o[0].typeAnnotation&&a.typeParameters===null&&dO(o[0].typeAnnotation)&&!a.rest?t.arrowParens===`always`||a.type===`HookTypeAnnotation`?[`(`,...d,`)`]:d:[s,`(`,K([Z,...d]),!_S(a)&&e.root.type!==`NGRoot`?GO(t,`all`):``,Z,`)`]}function YO(e){if(!e)return!1;let t=hS(e);if(t.length!==1)return!1;let[n]=t;return!W(n)&&(n.type===`ObjectPattern`||n.type===`ArrayPattern`||n.type===`Identifier`&&n.typeAnnotation&&(n.typeAnnotation.type===`TypeAnnotation`||n.typeAnnotation.type===`TSTypeAnnotation`)&&$S(n.typeAnnotation.typeAnnotation)||n.type===`FunctionTypeParam`&&$S(n.typeAnnotation)&&n!==e.rest||n.type===`AssignmentPattern`&&(n.left.type===`ObjectPattern`||n.left.type===`ArrayPattern`)&&(n.right.type===`Identifier`||ZS(n.right)&&n.right.properties.length===0||XS(n.right)&&n.right.elements.length===0))}function XO(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}function ZO(e,t){let n=XO(e);if(!n)return!1;let r=e.typeParameters?.params;if(r){if(r.length>1)return!1;if(r.length===1){let e=r[0];if(e.constraint||e.default)return!1}}return hS(e).length===1&&($S(n)||BE(t))}function QO(e){return e.match(e=>e.type===`ArrowFunctionExpression`&&e.body.type===`BlockStatement`,(e,t)=>{if(e.type===`CallExpression`&&t===`arguments`&&e.arguments.length===1&&e.callee.type===`CallExpression`){let t=e.callee.callee;return t.type===`Identifier`||t.type===`MemberExpression`&&!t.computed&&t.object.type===`Identifier`&&t.property.type===`Identifier`}return!1},(e,t)=>e.type===`VariableDeclarator`&&t===`init`||e.type===`ExportDefaultDeclaration`&&t===`declaration`||e.type===`TSExportAssignment`&&t===`expression`||e.type===`AssignmentExpression`&&t===`right`&&e.left.type===`MemberExpression`&&e.left.object.type===`Identifier`&&e.left.object.name===`module`&&e.left.property.type===`Identifier`&&e.left.property.name===`exports`,e=>e.type!==`VariableDeclaration`||e.kind===`const`&&e.declarations.length===1)}function $O(e){let t=hS(e);return t.length>1&&t.some(e=>e.type===`TSParameterProperty`)}function ek(e,t){return(t===`params`||t===`this`||t===`rest`)&&YO(e)}var tk=/^[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/,nk=e=>tk.test(e);function rk(e){return e.length===1?e:e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/,`$1$2`).replace(/^([+-]?[\d.]+)e[+-]?0+$/,`$1`).replace(/^([+-])?\./,`$10.`).replace(/(\.\d+?)0+(?=e|$)/,`$1`).replace(/\.(?=e|$)/,``)}var ik=rk,ak=Object.freeze({character:`'`,codePoint:39}),ok=Object.freeze({character:`"`,codePoint:34}),sk=Object.freeze({preferred:ak,alternate:ok}),ck=Object.freeze({preferred:ok,alternate:ak});function lk(e,t){let{preferred:n,alternate:r}=t===!0||t===`'`?sk:ck,{length:i}=e,a=0,o=0;for(let t=0;t<i;t++){let i=e.charCodeAt(t);i===n.codePoint?a++:i===r.codePoint&&o++}return(a>o?r:n).character}var uk=/\\(["'\\])|(["'])/g;function dk(e,t){let n=t===`"`?`'`:`"`;return t+YC(0,e,uk,(e,r,i)=>r?r===n?n:e:i===t?`\\`+i:i)+t}var fk=dk;function pk(e,t){/^(?<quote>["']).*\k<quote>$/s.test(e);let n=e.slice(1,-1),r;return r=t.parser===`json`||t.parser===`jsonc`||t.parser===`json-stringify`||t.parser===`json5`&&t.quoteProps===`preserve`&&!t.singleQuote?`"`:t.__isInHtmlAttribute?`'`:lk(n,t.singleQuote),e.charAt(0)===r?e:fk(n,r)}var mk=pk,hk=e=>e.type===`TSEnumMember`,gk=e=>hk(e)?`id`:`key`,_k=e=>e[gk(e)],vk=e=>!hk(e)&&e.computed;function yk(e){return/^(?:\d+|\d+\.\d+)$/.test(e)}var bk=({parser:e})=>e===`typescript`||e===`babel-ts`||e===`oxc-ts`||e===`yuku-ts`;function xk(e,t){let n=_k(e);if(n.type===`Identifier`)return!0;if(!RS(n)||bk(t))return!1;let r=ik(FS(n));return String(n.value)===r&&yk(r)}function Sk(e,t){let{parser:n}=t;if(n===`json`||n===`jsonc`)return!1;let r=_k(e);if(!BS(r))return!1;let{value:i}=r;return mk(FS(r),t).slice(1,-1)!==i||e.type===`TSMethodSignature`&&i===`new`?!1:!!(!(n===`babel-ts`&&e.type===`ClassProperty`||(n===`typescript`||n===`oxc-ts`||n===`yuku-ts`)&&e.type===`PropertyDefinition`)&&nk(i)||(n===`babel`||n===`acorn`||n===`oxc`||n===`yuku`||n===`espree`||n===`meriyah`||n===`__babel_estree`)&&e.type!==`ImportAttribute`&&yk(i)&&String(Number(i))===i)}var Ck=new WeakMap;function wk(e,t){return fS(Ck,e.parent,()=>e.siblings.some(e=>!vk(e)&&BS(_k(e))&&!Sk(e,t)))}function Tk(e,t){return(t.parser===`json`||t.parser===`jsonc`||t.quoteProps===`consistent`&&wk(e,t))&&xk(e.node,t)}function Ek(e,t){return(t.quoteProps===`as-needed`||t.quoteProps===`consistent`&&!wk(e,t))&&Sk(e.node,t)}function Dk(e,t,n){let{node:r}=e,i=gk(r);if(vk(r))return[`[`,n(i),`]`];if(Tk(e,t)){let n=_k(r),a=mk(JSON.stringify(n.type===`Identifier`?n.name:String(n.value)),t);return e.call(()=>jO(e,a,t),i)}if(Ek(e,t)){let{value:n}=_k(r),a=/^\d/.test(n)?ik(n):n;return e.call(()=>jO(e,a,t),i)}return n(i)}var Ok=z([`VoidTypeAnnotation`,`TSVoidKeyword`,`NullLiteralTypeAnnotation`,`TSNullKeyword`]),kk=z([`ObjectTypeAnnotation`,`TSTypeLiteral`,`GenericTypeAnnotation`,`TSTypeReference`]);function Ak(e){return e.key===`elementTypes`&&GS(e.parent)&&e.parent.elementTypes.length>1}function jk(e){let{types:t}=e;if(t.some(e=>W(e)))return!1;let n=t.find(e=>kk(e));return n?t.every(e=>e===n||Ok(e)):!1}function Mk(e){let{key:t,node:n,parent:r}=e;return!(jk(n)||t===`types`&&US(r)||t===`types`&&WS(r)||Ak(e))}function Nk(e,t,n,r){let{node:i}=e;if(jk(i))return Y(` | `,e.map(n,`types`));let a=q(e.map(({isFirst:r})=>{let i=r?J(`| `):[X,`| `],a=n();return W(e.node,U.Leading)?[i,nD(2,jO(e,a,t))]:[i,jO(e,nD(2,a),t)]},`types`));return Mk(e)&&(a=jO(e,a,t)),fE(e,t)?q([K([Z,a]),Z]):Ak(e)?q([K([J([`(`,Z]),a]),Z,J(`)`)]):r?.assignmentLayout===`break-after-operator`||!Pk(e)?a:q(K([Z,a]))}function Pk(e){let{key:t,parent:n}=e;return!(t===`typeAnnotation`&&n.type===`TSTypeAssertion`||t===`elementTypes`&&GS(n)||(t===`trueType`||t===`falseType`)&&KS(n)||t===`params`&&lC(n)||t===`typeAnnotation`&&n.type===`FunctionTypeParam`&&!n.name&&e.grandparent.this!==n||e.match(void 0,(e,t)=>t===`typeAnnotation`&&e.type===`FunctionTypeParam`,(e,t)=>t===`params`&&e.type===`FunctionTypeAnnotation`,(e,t)=>t===`value`&&e.type===`ObjectTypeProperty`&&rO(e)))}function Fk(e){return dO(e)||$S(e)?!0:US(e)?jk(e):!1}var Ik=new WeakSet;function Lk(e,t,n=`typeAnnotation`){let{node:{[n]:r}}=e;if(!r)return``;let i=!1;if(r.type===`TSTypeAnnotation`||r.type===`TypeAnnotation`){let t=e.call(Rk,n);(t===`=>`||t===`:`&&W(r,U.Leading))&&(i=!0),Ik.add(r)}return i?[` `,t(n)]:t(n)}var Rk=e=>e.match(e=>e.type===`TSTypeAnnotation`,(e,t)=>(t===`returnType`||t===`typeAnnotation`)&&(e.type===`TSFunctionType`||e.type===`TSConstructorType`))?`=>`:e.match(e=>e.type===`TSTypeAnnotation`,(e,t)=>t===`typeAnnotation`&&(e.type===`TSJSDocNullableType`||e.type===`TSJSDocNonNullableType`||e.type===`TSTypePredicate`))||e.match(e=>e.type===`TypeAnnotation`,(e,t)=>t===`typeAnnotation`&&e.type===`Identifier`,(e,t)=>t===`id`&&e.type===`DeclareFunction`)||e.match(e=>e.type===`TypeAnnotation`,(e,t)=>t===`typeAnnotation`&&e.type===`Identifier`,(e,t)=>t===`id`&&e.type===`DeclareHook`)||e.match(e=>e.type===`TypeAnnotation`,(e,t)=>t===`bound`&&e.type===`TypeParameter`&&e.usesExtendsBound)?``:`:`;function zk(e,t,n){let r=Rk(e);return r?[r,` `,n(`typeAnnotation`)]:n(`typeAnnotation`)}var Bk=({node:e,key:t,parent:n})=>t===`value`&&e.type===`FunctionExpression`&&(n.type===`ObjectMethod`||n.type===`ClassMethod`||n.type===`ClassPrivateMethod`||n.type===`MethodDefinition`||n.type===`TSAbstractMethodDefinition`||n.type===`TSDeclareMethod`||n.type===`Property`&&bS(n));function Vk(e,t,n,r){if(Bk(e))return Uk(e,t,n);let{node:i}=e,a=!1;if(i.type===`FunctionExpression`&&r?.expandLastArg){let{parent:t}=e;rC(t)&&(WC(t).length>1||hS(i).every(e=>e.type===`Identifier`&&!e.typeAnnotation))&&(a=!0)}let o=JO(e,t,n,a),s=Kk(e,n),c=ZO(i,s),l=i.type===`HookDeclaration`?`hook`:`function`;return[LO(e),i.async?`async `:``,l,i.generator?`*`:``,` `,i.id?n(`id`):``,n(`typeParameters`),q([c?q(o):o,s]),i.body?` `:``,n(`body`),i.declare||!i.body?KO(t):``]}function Hk(e,t,n){let{node:r}=e,{kind:i}=r,a=r.value||r,o=[];return!i||i===`init`||i===`method`||i===`constructor`?a.async&&o.push(`async `):o.push(i,` `),a.generator&&o.push(`*`),o.push(Dk(e,t,n),r.optional?`?`:``,r===a?Uk(e,t,n):n(`value`)),o}function Uk(e,t,n){let{node:r}=e,i=JO(e,t,n),a=Kk(e,n),o=$O(r),s=ZO(r,a),c=[n(`typeParameters`),q([o?q(i,{shouldBreak:!0}):s?q(i):i,a])];return r.body?c.push(` `,n(`body`)):c.push(KO(t)),c}function Wk(e){let t=hS(e);return t.length===1&&!e.typeParameters&&!W(e,U.Dangling)&&t[0].type===`Identifier`&&!t[0].typeAnnotation&&!W(t[0])&&!t[0].optional&&!e.predicate&&!e.returnType}function Gk(e,t){if(t.arrowParens===`always`)return!1;if(t.arrowParens===`avoid`){let{node:t}=e;return Wk(t)}return!1}function Kk(e,t){let{node:n}=e,r=[Lk(e,t,`returnType`)];return n.predicate&&r.push(t(`predicate`)),r}function qk(e,t){if(t.semi)return!1;let{node:n}=e;if(n.type!==`ExpressionStatement`||Xk(e,t)||Qk(e,t)||Zk(e,t))return!1;let{key:r,parent:i}=e;return!!((r===`body`&&(i.type===`Program`||i.type===`BlockStatement`||i.type===`StaticBlock`||i.type===`TSModuleBlock`)||r===`consequent`&&i.type===`SwitchCase`)&&e.call(()=>Jk(e,t),`expression`))}function Jk(e,t){let{node:n}=e;switch(n.type){case`ParenthesizedExpression`:case`TypeCastExpression`:case`TSTypeAssertion`:case`ArrayExpression`:case`ArrayPattern`:case`TemplateLiteral`:case`TemplateElement`:case`RegExpLiteral`:return!0;case`ArrowFunctionExpression`:if(!Gk(e,t))return!0;break;case`UnaryExpression`:{let{prefix:e,operator:t}=n;if(e&&(t===`+`||t===`-`))return!0;break}case`BindExpression`:if(!n.object)return!0;break;case`Literal`:if(n.regex)return!0;break;default:if(tC(n))return!0}return fE(e,t)?!0:qT(n)?e.call(()=>Jk(e,t),...YT(n)):!1}var Yk=({node:e,parent:t})=>e.type===`ExpressionStatement`&&t.type===`Program`&&t.body.length===1&&(Array.isArray(t.directives)&&t.directives.length===0||!t.directives);function Xk(e,t){return(t.parentParser===`markdown`||t.parentParser===`mdx`)&&Yk(e)&&tC(e.node.expression)}function Zk(e,t){return t.__isHtmlInlineEventHandler&&Yk(e)}function Qk(e,t){return(t.parser===`__vue_event_binding`||t.parser===`__vue_ts_event_binding`)&&Yk(e)}function $k(e,t){if(!qk(e,t))return!1;let n=B(0,gT(e.node,U.Leading),-1);return!!(n&&lw(n))}var eA=z([`ClassDeclaration`,`ClassExpression`,`DeclareClass`,`DeclareInterface`,`InterfaceDeclaration`,`TSInterfaceDeclaration`]);function tA(e,t){let{key:n,parent:r}=e;if(n===`types`&&US(r)||n===`argument`&&r.type===`JSXSpreadAttribute`||n===`expression`&&r.type===`JSXSpreadChild`||n===`superClass`&&(r.type===`ClassDeclaration`||r.type===`ClassExpression`)||(n===`id`||n===`typeParameters`)&&eA(r)||n===`patterns`&&r.type===`MatchOrPattern`||vT(e))return!0;let{node:i}=e;return _T(i)?!1:i.type===`ExpressionStatement`?$k(e,t):US(i)?Mk(e):!!tC(i)}var nA=tA;function rA(e,t,n=0){let r=0;for(let i=n;i<e.length;++i)e[i]===` `?r=r+t-r%t:r++;return r}var iA=rA;function aA(e,t){let n=e.lastIndexOf(`
309
+ `);return n===-1?0:iA(e.slice(n+1).match(/^[\t ]*/)[0],t)}var oA=aA;function sA(e,t,n){if(_A(e)){let r=lA(e,t,n);if(r)return r}let r=pA(e,t,n);return[gD,"`",...e.map(({isLast:e,index:t})=>[n(),e?``:r[t]],`quasis`),"`"]}function cA(e,t,n){let r=n(`quasi`),{node:i}=e,a=``,o=gT(i.quasi,U.Leading)[0];return o&&(a=VC(t.originalText,H(i.typeArguments??i.tag),V(o))?Z:` `),fD(r.label&&{tagged:!0,...r.label},[n(`tag`),n(`typeArguments`),a,gD,r])}function lA(e,t,n){let{node:r}=e,i=r.quasis[0].value.raw.trim().split(/\s*\|\s*/);if(i.length>1||i.some(e=>e.length>0)){t.__inJestEach=!0;let a=pA(e,t,n);t.__inJestEach=!1;let o=a.map(e=>tO(e,{...t,printWidth:1/0,endOfLine:`lf`}).formatted),s=[{hasLineBreak:!1,cells:[]}];for(let e=1;e<r.quasis.length;e++){let t=B(0,s,-1),n=o[e-1];t.cells.push(n),n.includes(`
310
+ `)&&(t.hasLineBreak=!0),r.quasis[e].value.raw.includes(`
311
+ `)&&s.push({hasLineBreak:!1,cells:[]})}let c=Math.max(i.length,...s.map(e=>e.cells.length)),l=Array.from({length:c},()=>0),u=[{cells:i},...s.filter(e=>e.cells.length>0)];for(let e of u)if(!e.hasLineBreak)for(let[t,n]of e.cells.entries())l[t]=Math.max(l[t],VD(n));return[gD,"`",K([Q,Y(Q,u.map(e=>Y(` | `,e.cells.map((t,n)=>e.hasLineBreak?t:t+` `.repeat(l[n]-VD(t))))))]),Q,"`"]}}var uA=new WeakMap;function dA(e,t){let{parent:n,index:r}=e;return fS(uA,n,e=>{let{tabWidth:n}=t,r=0;return e.quasis.map(e=>{let t=e.value.raw,i=t.includes(`
312
+ `)?oA(t,n):r;return r=i,{indentSize:i,previousQuasiText:t}})})[r]}function fA(e,t,n){let{node:r,index:i}=e,a=n(),{quasis:o}=e.parent,s=H(o[i]),c=V(o[i+1]),l=VC(t.originalText,s,c);if(!l){let e=tO(a,{...t,printWidth:1/0}).formatted;e.includes(`
313
+ `)?l=!0:a=e}l&&(W(r)||r.type===`Identifier`||iC(eE(r))||r.type===`ConditionalExpression`||r.type===`SequenceExpression`||VS(r)||nC(r))&&(a=[K([Z,a]),Z]);let{indentSize:u,previousQuasiText:d}=dA(e,t);return t.__inJestEach&&(u=Math.max(u,t.tabWidth)),a=u===0&&d.endsWith(`
314
+ `)?nD(-1/0,a):oD(a,u,t.tabWidth),q(["${",a,gD,`}`])}function pA(e,t,n){return e.map(()=>fA(e,t,n),e.node.type===`TSTemplateLiteralType`?`types`:`expressions`)}function mA(e,t){return LE(e,e=>typeof e==`string`?t?YC(0,e,/(\\*)`/g,"$1$1\\`"):hA(e):e)}function hA(e){return YC(0,e,/([\\`]|\$\{)/g,`\\$1`)}var gA=/^[fx]?(?:describe|it|test)$/;function _A({node:e,parent:t}){return e.type===`TemplateLiteral`&&t.type===`TaggedTemplateExpression`&&t.quasi===e&&t.tag.type===`MemberExpression`&&t.tag.property.type===`Identifier`&&t.tag.property.name===`each`&&(t.tag.object.type===`Identifier`&&gA.test(t.tag.object.name)||t.tag.object.type===`MemberExpression`&&t.tag.object.property.type===`Identifier`&&(t.tag.object.property.name===`only`||t.tag.object.property.name===`skip`)&&t.tag.object.object.type===`Identifier`&&gA.test(t.tag.object.object.name))}var vA=[(e,t)=>t===`properties`&&e.type===`ObjectExpression`,(e,t)=>t===`arguments`&&e.type===`CallExpression`&&e.callee.type===`Identifier`&&e.callee.name===`Component`,(e,t)=>t===`expression`&&e.type===`Decorator`];function yA(e){let t=e=>e.type===`TemplateLiteral`,n=(e,t)=>ow(e)&&!e.computed&&e.key.type===`Identifier`&&e.key.name===`styles`&&t===`value`;return e.match(t,(e,t)=>XS(e)&&t===`elements`,n,...vA)||e.match(t,n,...vA)}function bA(e){return e.match(e=>e.type===`TemplateLiteral`,(e,t)=>ow(e)&&!e.computed&&e.key.type===`Identifier`&&e.key.name===`template`&&t===`value`,...vA)}function xA(e,t){return W(e,U.Block|U.Leading,({value:e})=>e===` ${t} `)}function SA({node:e,parent:t},n){return xA(e,n)||CA(t)&&xA(t,n)||t.type===`ExpressionStatement`&&xA(t,n)}function CA(e){return e.type===`AsConstExpression`||e.type===`TSAsExpression`&&e.typeAnnotation.type===`TSTypeReference`&&e.typeAnnotation.typeName.type===`Identifier`&&e.typeAnnotation.typeName.name===`const`}async function wA(e,t,n,r){let{node:i}=n,a=``;for(let[e,t]of i.quasis.entries()){let{raw:n}=t.value;e>0&&(a+=`@prettier-placeholder-`+(e-1)+`-id`),a+=n}let o=TA(await e(a,{parser:`scss`}),pA(n,r,t));if(!o)throw Error(`Couldn't insert all the expressions`);return["`",K([Q,o]),Z,"`"]}function TA(e,t){if(!cS(t))return e;let n=0,r=LE(KE(e),e=>typeof e!=`string`||!e.includes(`@prettier-placeholder`)?e:e.split(/@prettier-placeholder-(\d+)-id/).map((e,r)=>r%2==0?qE(e):(n++,t[e])));return t.length===n?r:null}function EA(e){return e.match(void 0,(e,t)=>t===`quasi`&&e.type===`TaggedTemplateExpression`&&mO(e.tag,[`css`,`css.global`,`css.resolve`]))||e.match(void 0,(e,t)=>t===`expression`&&e.type===`JSXExpressionContainer`,(e,t)=>t===`children`&&e.type===`JSXElement`&&e.openingElement.name.type===`JSXIdentifier`&&e.openingElement.name.name===`style`&&e.openingElement.attributes.some(e=>e.type===`JSXAttribute`&&e.name.type===`JSXIdentifier`&&e.name.name===`jsx`))}function DA(e){return e.type===`Identifier`&&e.name===`styled`}function OA(e){return/^[A-Z]/.test(e.object.name)&&e.property.name===`extend`}function kA({parent:e}){if(!e||e.type!==`TaggedTemplateExpression`)return!1;let t=e.tag.type===`ParenthesizedExpression`?e.tag.expression:e.tag;switch(t.type){case`MemberExpression`:return DA(t.object)||OA(t);case`CallExpression`:return DA(t.callee)||t.callee.type===`MemberExpression`&&(t.callee.object.type===`MemberExpression`&&(DA(t.callee.object.object)||OA(t.callee.object))||t.callee.object.type===`CallExpression`&&DA(t.callee.object.callee));case`Identifier`:return t.name===`css`;default:return!1}}function AA({parent:e,grandparent:t}){return t?.type===`JSXAttribute`&&e.type===`JSXExpressionContainer`&&t.name.type===`JSXIdentifier`&&t.name.name===`css`}var jA=e=>EA(e)||kA(e)||AA(e)||yA(e);async function MA(e,t,n,r){let{node:i}=n,a=i.quasis.length,o=pA(n,r,t),s=[];for(let t=0;t<a;t++){let n=i.quasis[t],r=t===0,c=t===a-1,l=n.value.cooked,u=l.split(`
315
+ `),d=u.length;if(!c&&/#[^\n\r]*$/.test(u[d-1]))return null;let f=d>2&&u[0].trim()===``&&u[1].trim()===``,p=d>2&&u[d-1].trim()===``&&u[d-2].trim()===``,m=u.every(e=>/^\s*(?:#[^\n\r]*)?$/.test(e)),h;h=m?NA(u):await e(l,{parser:`graphql`}),h?(h=mA(h,!1),!r&&f&&s.push(``),s.push(h),!c&&p&&s.push(``)):!r&&!c&&f&&s.push(``),c||s.push(o[t])}return["`",K([Q,Y(Q,s)]),Q,"`"]}function NA(e){let t=[],n=!1,r=e.map(e=>e.trim());for(let[e,i]of r.entries())i!==``&&(r[e-1]===``&&n?t.push([Q,i]):t.push(i),n=!0);return t.length===0?null:Y(Q,t)}function PA({node:e,parent:t}){return SA({node:e,parent:t},`GraphQL`)||t&&(t.type===`TaggedTemplateExpression`&&(t.tag.type===`MemberExpression`&&t.tag.object.name===`graphql`&&t.tag.property.name===`experimental`||t.tag.type===`Identifier`&&(t.tag.name===`gql`||t.tag.name===`graphql`))||t.type===`CallExpression`&&t.callee.type===`Identifier`&&t.callee.name===`graphql`)}var FA=0;async function IA(e,t,n,r,i){let{node:a}=r,o=FA;FA=FA+1>>>0;let s=e=>`PRETTIER_HTML_PLACEHOLDER_${e}_${o}_IN_JS`,c=a.quasis.map((e,t,n)=>t===n.length-1?e.value.cooked:e.value.cooked+s(t)).join(``),l=pA(r,i,n),u=new RegExp(s(`(\\d+)`),`g`),d=0,f=LE(await t(c,{parser:e,__onHtmlRoot(e){d=e.children.length}}),e=>{if(typeof e!=`string`)return e;let t=[],n=e.split(u);for(let e=0;e<n.length;e++){let r=n[e];if(e%2==0){r&&(r=hA(r),i.__embeddedInHtml&&(r=YC(0,r,/<\/(?=script\b)/gi,`<\\/`)),t.push(r));continue}let a=Number(r);t.push(l[a])}return t}),p=/^\s/.test(c)?` `:``,m=/\s$/.test(c)?` `:``,h=i.htmlWhitespaceSensitivity===`ignore`?Q:p&&m?X:null;return h?q(["`",K([h,q(f)]),h,"`"]):fD({hug:!1},q(["`",p,d>1?K(q(f)):q(f),m,"`"]))}function LA(e){return SA(e,`HTML`)||e.match(e=>e.type===`TemplateLiteral`,(e,t)=>e.type===`TaggedTemplateExpression`&&e.tag.type===`Identifier`&&e.tag.name===`html`&&t===`quasi`)}var RA=IA.bind(void 0,`html`),zA=IA.bind(void 0,`angular`);async function BA(e,t,n){let{node:r}=n,i=YC(0,r.quasis[0].value.raw,/((?:\\\\)*)\\`/g,(e,t)=>`\\`.repeat(t.length/2)+"`"),a=VA(i),o=a!==``;o&&(i=YC(0,i,RegExp(`^${a}`,`gm`),``));let s=mA(await e(i,{parser:`markdown`,__inJsTemplate:!0}),!0);return["`",o?K([Z,s]):[mD,rD(s)],Z,"`"]}function VA(e){let t=e.match(/^([^\S\n]*)\S/m);return t===null?``:t[1]}function HA({node:e,parent:t}){return t?.type===`TaggedTemplateExpression`&&e.quasis.length===1&&t.tag.type===`Identifier`&&(t.tag.name===`md`||t.tag.name===`markdown`)}var UA=[{test:jA,print:wA},{test:PA,print:MA},{test:LA,print:RA},{test:bA,print:zA},{test:HA,print:BA}].map(({test:e,print:t})=>({test:e,print:GA(t)}));function WA(e){let{node:t}=e;if(t.type!==`TemplateLiteral`||KA(t))return;let n=UA.find(({test:t})=>t(e));if(n)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===``?"``":n.print}function GA(e){return async(...t)=>{let n=await e(...t);return n&&fD({embed:!0,...n.label},n)}}function KA({quasis:e}){return e.some(({value:{cooked:e}})=>e===null)}var qA=WA;function JA(e,t){e.type===`ChainExpression`?ZA(t):(e.type===`OptionalMemberExpression`||e.type===`OptionalCallExpression`)&&QA(t)}function YA(e){if(iC(e))return`object`;if(rC(e))return`callee`;if(sC(e))return`expression`}function XA(e){let t=YA(e);if(t)return e[t]}function ZA(e){for(e=XA(e);e.type===`MemberExpression`||e.type===`CallExpression`||e.type===`TSNonNullExpression`;e=XA(e)){let t=YA(e),n=e[t];n.type===`ChainExpression`&&(e[t]=n.expression)}}function QA(e){for(e=XA(e);e.type===`MemberExpression`||e.type===`CallExpression`;e=XA(e))e.type=`Optional${e.type}`}function $A(e,t,n){let r=t[n];(BS(r)||RS(r))&&(e[n]=String(r.value)),r.type===`Identifier`&&(e[n]=r.name)}function ej(e,t){(e.type===`Property`||e.type===`ObjectProperty`||e.type===`MethodDefinition`||e.type===`ClassProperty`||e.type===`ClassMethod`||e.type===`PropertyDefinition`||e.type===`TSDeclareMethod`||e.type===`TSPropertySignature`||e.type===`TSMethodSignature`||e.type===`ObjectTypeProperty`||e.type===`ImportAttribute`||e.type===`RecordDeclarationProperty`||e.type===`RecordDeclarationStaticProperty`)&&!e.computed&&$A(t,e,`key`),e.type===`TSEnumMember`&&$A(t,e,`id`)}function tj(e,t){e.type===`RegExpLiteral`&&(t.flags=[...e.flags].sort().join(``)),e.type===`Literal`&&`regex`in e&&(t.regex.flags=[...e.regex.flags].sort().join(``))}var nj=new Set([`range`,`raw`,`comments`,`extra`,`start`,`end`,`loc`,`errors`,`tokens`,`trailingComma`,`docblock`,`__contentEnd`]),rj=e=>{for(let t of e.quasis)delete t.value};function ij(e,t,n){if(e.type===`Program`&&delete t.sourceType,JA(e,t),ej(e,t),tj(e,t),(IS(e)||e.type===`BigIntLiteralTypeAnnotation`)&&`bigint`in e&&(t.bigint=e.bigint.toLowerCase()),e.type===`EmptyStatement`&&!yS({node:e,parent:n})||e.type===`JSXText`||e.type===`JSXExpressionContainer`&&(e.expression.type===`Literal`||e.expression.type===`StringLiteral`)&&e.expression.value===` `)return null;if(e.type===`JSXElement`&&e.openingElement.name.type===`JSXIdentifier`&&e.openingElement.name.name===`style`&&e.openingElement.attributes.some(e=>e.type===`JSXAttribute`&&e.name.name===`jsx`))for(let{type:e,expression:n}of t.children)e===`JSXExpressionContainer`&&n.type===`TemplateLiteral`&&rj(n);e.type===`JSXAttribute`&&e.name.name===`css`&&e.value.type===`JSXExpressionContainer`&&e.value.expression.type===`TemplateLiteral`&&rj(t.value.expression),e.type===`JSXAttribute`&&BS(e.value)&&/["']|&quot;|&apos;/.test(e.value.value)&&(t.value.value=YC(0,e.value.value,/["']|&quot;|&apos;/g,`"`));let r=e.expression||e.callee;if(e.type===`Decorator`&&r.type===`CallExpression`&&r.callee.name===`Component`&&r.arguments.length===1){let n=e.expression.arguments[0].properties;for(let[e,r]of t.expression.arguments[0].properties.entries())switch(n[e].key.name){case`styles`:XS(r.value)&&rj(r.value.elements[0]);break;case`template`:r.value.type===`TemplateLiteral`&&rj(r.value);break}}e.type===`TaggedTemplateExpression`&&(e.tag.type===`MemberExpression`||e.tag.type===`Identifier`&&(e.tag.name===`gql`||e.tag.name===`graphql`||e.tag.name===`css`||e.tag.name===`md`||e.tag.name===`markdown`||e.tag.name===`html`)||e.tag.type===`CallExpression`)&&rj(t.quasi),(e.type===`CallExpression`||e.type===`MemberExpression`)&&!e.optional&&delete t.optional,e.type===`TemplateLiteral`&&rj(t)}ij.ignoredProperties=nj;var aj=/\*\/$/,oj=/^\/\*\*?/,sj=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,cj=/(^|\s+)\/\/([^\n\r]*)/g,lj=/^(\r?\n)+/,uj=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,dj=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,fj=/(\r?\n|^) *\* ?/g,pj=[];function mj(e){let t=e.match(sj);return t?t[0].trimStart():``}function hj(e){let t=e.match(sj)?.[0];return t==null?e:e.slice(t.length)}function gj(e){e=YC(0,e.replace(oj,``).replace(aj,``),fj,`$1`);let t=``;for(;t!==e;)t=e,e=YC(0,e,uj,`
316
+ $1 $2
317
+ `);e=e.replace(lj,``).trimEnd();let n=Object.create(null),r=YC(0,e,dj,``).replace(lj,``).trimEnd(),i;for(;i=dj.exec(e);){let e=YC(0,i[2],cj,``);if(typeof n[i[1]]==`string`||Array.isArray(n[i[1]])){let t=n[i[1]];n[i[1]]=[...pj,...Array.isArray(t)?t:[t],e]}else n[i[1]]=e}return{comments:r,pragmas:n}}function _j({comments:e=``,pragmas:t={}}){let n=Object.keys(t),r=n.flatMap(e=>vj(e,t[e])).map(e=>` * ${e}
318
+ `).join(``);if(!e){if(n.length===0)return``;if(n.length===1&&!Array.isArray(t[n[0]])){let e=t[n[0]];return`/** ${vj(n[0],e)[0]} */`}}let i=e.split(`
319
+ `).map(e=>` * ${e}`).join(`
320
+ `)+`
321
+ `;return`/**
322
+ `+(e?i:``)+(e&&n.length>0?` *
323
+ `:``)+r+` */`}function vj(e,t){return[...pj,...Array.isArray(t)?t:[t]].map(t=>`@${e} ${t}`.trim())}var yj=`format`;function bj(e){if(!e.startsWith(`#!`))return``;let t=e.indexOf(`
324
+ `);return t===-1?e:e.slice(0,t)}var xj=bj;function Sj(e){let t=xj(e);t&&(e=e.slice(t.length+1));let{pragmas:n,comments:r}=gj(mj(e));return{shebang:t,text:e,pragmas:n,comments:r}}function Cj(e){let{shebang:t,text:n,pragmas:r,comments:i}=Sj(e),a=hj(n),o=_j({pragmas:{[yj]:``,...r},comments:i.trimStart()});return(t?`${t}
325
+ `:``)+o+(a.startsWith(`
326
+ `)?`
327
+ `:`
328
+
329
+ `)+a}function wj(e){if(!iw(e)||!e.value.includes(`
330
+ `))return[];let t=[];for(let n of`*${e.value}*`.split(`
331
+ `)){if(n=n.trimStart(),!n.startsWith(`*`))return[];t.push(n)}return t}var Tj=new WeakMap;function Ej(e){return fS(Tj,e,wj)}function Dj(e){return Ej(e).length>0}function Oj(e,t){let n=e.node;if(aw(n))return t.originalText.slice(V(n),H(n)).trimEnd();if(Dj(n))return kj(n);if(iw(n))return[`/*`,qE(n.value),`*/`];throw Error(`Not a comment: `+JSON.stringify(n))}function kj(e){let t=Ej(e),n=e.value[0]===`*`&&e.value[1]!==`*`;return[`/`,t.map((e,r)=>{if(r===0)return[e.trimEnd(),Q];if(r===t.length-1)return[` `,e];let i=e.trimEnd(),a=[` `,i];return n&&i!==`*`&&e.endsWith(` `)?[a,` `,iD(mD)]:[a,Q]}),`/`]}function Aj(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var jj=new class{#e;constructor(e){this.#e=new Set(e)}getLeadingWhitespaceCount(e){let t=this.#e,n=0;for(let r=0;r<e.length&&t.has(e.charAt(r));r++)n++;return n}getTrailingWhitespaceCount(e){let t=this.#e,n=0;for(let r=e.length-1;r>=0&&t.has(e.charAt(r));r--)n++;return n}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return this.#e.has(e.charAt(0))}hasTrailingWhitespace(e){return this.#e.has(B(0,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let n=`[${Aj([...this.#e].join(``))}]+`,r=new RegExp(t?`(${n})`:n);return e.split(r)}hasWhitespaceCharacter(e){let t=this.#e;return Array.prototype.some.call(e,e=>t.has(e))}hasNonWhitespaceCharacter(e){let t=this.#e;return Array.prototype.some.call(e,e=>!t.has(e))}isWhitespaceOnly(e){let t=this.#e;return Array.prototype.every.call(e,e=>t.has(e))}#t(e){let t=1/0;for(let n of e.split(`
332
+ `)){if(n.length===0)continue;let e=this.getLeadingWhitespaceCount(n);if(e===0)return 0;n.length!==e&&e<t&&(t=e)}return t===1/0?0:t}dedentString(e){let t=this.#t(e);return t===0?e:e.split(`
333
+ `).map(e=>e.slice(t)).join(`
334
+ `)}}(`
335
+ \r `);function Mj(e){return e.type===`JSXText`&&(jj.hasNonWhitespaceCharacter(FS(e))||!/\n/.test(FS(e)))}function Nj(e){let{node:t,parent:n}=e;if(!tC(t)||!tC(n))return!1;let{index:r,siblings:i}=e,a;for(let e=r;e>0;e--){let t=i[e-1];if(!(t.type===`JSXText`&&!Mj(t))){a=t;break}}return a?.type===`JSXExpressionContainer`&&a.expression.type===`JSXEmptyExpression`&&_T(a.expression)}function Pj(e){return _T(e.node)||Nj(e)}var Fj=Pj,Ij=class extends Error{name=`UnexpectedNodeError`;constructor(e,t,n=`type`){super(`Unexpected ${t} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}};function Lj(e){return e.type===`CallExpression`&&!e.optional&&e.arguments.length===1&&e.callee.type===`Identifier`&&e.callee.name===`Boolean`}var Rj=0;function zj(e,t,n){let{node:r,parent:i,grandparent:a,key:o}=e,s=o!==`body`&&(i.type===`IfStatement`||i.type===`WhileStatement`||i.type===`SwitchStatement`||i.type===`DoWhileStatement`),c=r.operator===`|>`&&e.root.extra?.__isUsingHackPipeline,l=Bj(e,t,n,!1,s);if(s)return l;if(c)return q(l);if(o===`callee`&&aC(i)||i.type===`UnaryExpression`&&!W(r)||iC(i)&&!i.computed)return q([K([Z,...l]),Z]);let u=JS(i)||i.type===`JSXExpressionContainer`&&a.type===`JSXAttribute`||r.operator!==`|`&&i.type===`JsExpressionRoot`||r.type!==`NGPipeExpression`&&(i.type===`NGRoot`&&t.parser===`__ng_binding`||i.type===`NGMicrosyntaxExpression`&&a.type===`NGMicrosyntax`&&a.body.length===1)||r===i.body&&i.type===`ArrowFunctionExpression`||r!==i.body&&i.type===`ForStatement`||i.type===`ConditionalExpression`&&!JS(a)&&!aC(a)||i.type===`TemplateLiteral`||o===`argument`&&i.type===`UnaryExpression`||o===`arguments`&&Lj(i),d=i.type===`AssignmentExpression`||i.type===`VariableDeclarator`||i.type===`ClassProperty`||i.type===`PropertyDefinition`||i.type===`TSAbstractPropertyDefinition`||i.type===`ClassPrivateProperty`||ow(i),f=nC(r.left)&&wT(r.operator,r.left.operator);if(u||Vj(r)&&!f||!Vj(r)&&d)return q(l);if(l.length===0)return``;let p=tC(r.right),m=l.findIndex(e=>typeof e!=`string`&&!Array.isArray(e)&&e.type===yE),h=l.slice(0,m===-1?1:m+1),g=l.slice(h.length,p?-1:void 0),_=Symbol(`logicalChain-`+ ++Rj),v=q([...h,K(g)],{id:_});return p?q([v,dD(B(0,l,-1),{groupId:_})]):v}function Bj(e,t,n,r,i){let{node:a}=e;if(!nC(a))return[q(n())];let o=[];wT(a.operator,a.left.operator)?o=e.call(()=>Bj(e,t,n,!0,i),`left`):o.push(q(n(`left`)));let s=Vj(a),c=a.right.type===`ChainExpression`?a.right.expression:a.right,l=(a.type===`NGPipeExpression`||a.operator===`|>`||Uj(e,t))&&!XT(t.originalText,c),u=!W(c,U.Leading,lw)&&XT(t.originalText,c),d=a.type===`NGPipeExpression`?`|`:a.operator,f=a.type===`NGPipeExpression`&&a.arguments.length>0?q(K([Z,`: `,Y([X,`: `],e.map(()=>nD(2,q(n())),`arguments`))])):``,p;if(s)p=[d,XT(t.originalText,c)?K([X,n(`right`),f]):[` `,n(`right`),f]];else{let r=d===`|>`&&e.root.extra?.__isUsingHackPipeline?e.call(()=>Bj(e,t,n,!0,i),`right`):n(`right`);if(t.experimentalOperatorPosition===`start`){let e=``;if(u)switch(AE(r)){case mE:e=r[0],r.shift();break;case EE:e=r.contents[0],r.contents.shift();break}p=[X,e,d,` `,r,f]}else p=[l?X:``,d,l?` `:X,r,f]}let{parent:m}=e,h=W(a.left,U.Trailing|U.Line);if((h||!(i&&a.type===`LogicalExpression`)&&m.type!==a.type&&a.left.type!==a.type&&a.right.type!==a.type)&&(p=q(p,{shouldBreak:h})),t.experimentalOperatorPosition===`start`?o.push(s||u?` `:``,p):o.push(l?``:` `,p),r&&W(a)){let n=KE(jO(e,o,t));return n.type===bE?n.parts:Array.isArray(n)?n:[n]}return o}function Vj(e){return e.type===`LogicalExpression`&&!!(ZS(e.right)&&e.right.properties.length>0||XS(e.right)&&e.right.elements.length>0||tC(e.right))}var Hj=e=>e.type===`BinaryExpression`&&e.operator===`|`;function Uj(e,t){return(t.parser===`__vue_expression`||t.parser===`__vue_ts_expression`)&&Hj(e.node)&&!e.hasAncestor(e=>!Hj(e)&&e.type!==`JsExpressionRoot`)}function Wj(e,t,n){let{node:r}=e;if(r.type.startsWith(`NG`))switch(r.type){case`NGRoot`:return n(`node`);case`NGPipeExpression`:return zj(e,t,n);case`NGChainedExpression`:return q(Y([`;`,X],e.map(()=>Jj(e)?n():[`(`,n(),`)`],`expressions`)));case`NGEmptyExpression`:return``;case`NGMicrosyntax`:return e.map(()=>[e.isFirst?``:Gj(e)?` `:[`;`,X],n()],`body`);case`NGMicrosyntaxKey`:return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(r.name)?r.name:JSON.stringify(r.name);case`NGMicrosyntaxExpression`:return[n(`expression`),r.alias===null?``:[` as `,n(`alias`)]];case`NGMicrosyntaxKeyedExpression`:{let{index:t,parent:i}=e,a=Gj(e)||Kj(e)||(t===1&&(r.key.name===`then`||r.key.name===`else`||r.key.name===`as`)||t===2&&(r.key.name===`else`&&i.body[t-1].type===`NGMicrosyntaxKeyedExpression`&&i.body[t-1].key.name===`then`||r.key.name===`track`))&&i.body[0].type===`NGMicrosyntaxExpression`;return[n(`key`),a?` `:`: `,n(`expression`)]}case`NGMicrosyntaxLet`:return[`let `,n(`key`),r.value===null?``:[` = `,n(`value`)]];case`NGMicrosyntaxAs`:return[n(`key`),` as `,n(`alias`)];default:throw new Ij(r,`Angular`)}}function Gj({node:e,index:t}){return e.type===`NGMicrosyntaxKeyedExpression`&&e.key.name===`of`&&t===1}function Kj(e){let{node:t}=e;return e.parent.body[1].key.name===`of`&&t.type===`NGMicrosyntaxKeyedExpression`&&t.key.name===`track`&&t.key.type===`NGMicrosyntaxKey`}var qj=z([`CallExpression`,`OptionalCallExpression`,`AssignmentExpression`]);function Jj({node:e}){return KT(e,qj)}function Yj(e,t,n){let{node:r}=e;return q([Y(X,e.map(n,`decorators`)),Qj(r,t)?Q:X])}function Xj(e,t,n){return $j(e.node)?[Y(Q,e.map(n,`declaration`,`decorators`)),Q]:``}function Zj(e,t,n){let{node:r,parent:i}=e,{decorators:a}=r;if(!cS(a)||$j(i)||Fj(e))return``;let o=r.type===`ClassExpression`||r.type===`ClassDeclaration`||Qj(r,t);return[e.key===`declaration`&&YS(i)?Q:o?sD:``,Y(X,e.map(n,`decorators`)),X]}function Qj(e,t){return e.decorators.some(e=>zC(t.originalText,H(e)))}function $j(e){if(e.type!==`ExportDefaultDeclaration`&&e.type!==`ExportNamedDeclaration`&&e.type!==`DeclareExportDeclaration`)return!1;let t=e.declaration?.decorators;return cS(t)&&MS(e,t[0])}function eM(e){return e.type===`UnaryExpression`&&(e.operator===`+`||e.operator===`-`)&&RS(e.argument)}function tM(e,t,n){let{node:r}=e,i=[],a=GS(r)?`elementTypes`:`elements`,o=r[a];if(o.length===0&&!r.inexact)i.push(q([`[`,WO(e,t),`]`]));else{let s=B(0,o,-1),c=s?.type!==`RestElement`&&!r.inexact,l=s===null,u=Symbol(`array`),d=!t.__inJestEach&&o.length>1&&o.every((e,t,n)=>{if(!XS(e)&&!ZS(e))return!1;let r=e?.type,i=n[t+1];if(i&&r!==i.type)return!1;let a=XS(e)?`elements`:`properties`;return e[a]&&e[a].length>1})||W(r,U.Dangling|U.Line),f=nM(r,t),p=c?l?`,`:MO(t)?f?J(`,`,``,{groupId:u}):J(`,`):``:``;i.push(q([`[`,K([Z,f?aM(e,t,n,p):[iM(e,t,n,a,r.inexact),p],DO(e,t)]),Z,`]`],{shouldBreak:d,id:u}))}return i.push(NO(e),Lk(e,n)),i}function nM(e,t){return XS(e)&&e.elements.length>0&&e.elements.every(e=>e&&(RS(e)||eM(e)&&!W(e.argument))&&!W(e,U.Trailing|U.Line,e=>!zC(t.originalText,V(e),{backwards:!0})))}function rM({node:e},{originalText:t}){let n=H(e);if(n===V(e))return!1;let{length:r}=t;for(;n<r&&t[n]!==`,`;)n=OC(t,NC(t,n+1));return aO(t,n)}function iM(e,t,n,r,i){let a=[];return e.each(({node:r,isLast:o})=>{a.push(r?q(n()):``),(!o||i)&&a.push([`,`,X,r&&rM(e,t)?Z:``])},r),i&&a.push(`...`),a}function aM(e,t,n,r){let i=[];return e.each(({isLast:a,next:o})=>{i.push([n(),a?r:`,`]),a||i.push(rM(e,t)?[Q,Q]:W(o,U.Leading|U.Line)?Q:X)},`elements`),lD(i)}function oM(e){return e.quasis.some(e=>e.value.raw.includes(`
336
+ `))}function sM(e,t){return(e.type===`TemplateLiteral`&&oM(e)||e.type===`TaggedTemplateExpression`&&oM(e.quasi))&&!zC(t,V(e),{backwards:!0})}var cM=new WeakMap;function lM(e){return fS(cM,e,e=>e.type===`ConditionalExpression`&&!DT(e,e=>e.type===`ObjectExpression`))}var uM=e=>e.type===`SequenceExpression`;function dM(e,t,n,r={}){let i=[],a,o=[],s=!1,c=!r.expandLastArg&&e.node.body.type===`ArrowFunctionExpression`,l;(function u(){let{node:d}=e,f=fM(e,t,n,r);if(i.length===0)i.push(f);else{let{leading:n,trailing:r}=AO(e,t);i.push([n,f]),o.unshift(r)}c&&(s||=d.returnType&&hS(d).length>0||d.typeParameters||hS(d).some(e=>e.type!==`Identifier`)),!c||d.body.type!==`ArrowFunctionExpression`?(a=n(`body`,r),l=d.body):e.call(u,`body`)})();let u=!XT(t.originalText,l)&&(uM(l)||pM(l,a,t)||!s&&lM(l)),d=e.key===`callee`&&oC(e.parent),f=Symbol(`arrow-chain`),p=mM(e,r,{signatureDocs:i,shouldBreak:s}),m=!1,h=!1,g=!1;return c&&(d||r.assignmentLayout)&&(h=!0,g=!W(e.node,U.Leading&U.Line),m=r.assignmentLayout===`chain-tail-arrow-chain`||d&&!u),a=hM(e,t,r,{bodyDoc:a,bodyComments:o,functionBody:l,shouldPutBodyOnSameLine:u}),q([q(h?K([g?Z:``,p]):p,{shouldBreak:m,id:f}),` =>`,c?dD(a,{groupId:f}):q(a),c&&d?J(Z,``,{groupId:f}):``])}function fM(e,t,n,r){let{node:i}=e,a=[];if(i.async&&a.push(`async `),Gk(e,t))a.push(n([`params`,0]));else{let i=r.expandLastArg||r.expandFirstArg,o=Kk(e,n);if(i){if(BE(o))throw new nO;o=q(WE(o))}a.push(q([JO(e,t,n,i,!0),o]))}let o=DO(e,t,{marker:`commentBeforeArrow`});return o&&a.push(` `,o),a}function pM(e,t,n){return XS(e)||ZS(e)||e.type===`ArrowFunctionExpression`||e.type===`DoExpression`||e.type===`BlockStatement`||tC(e)||t.label?.hug!==!1&&(t.label?.embed||sM(e,n.originalText))}function mM(e,t,{signatureDocs:n,shouldBreak:r}){if(n.length===1)return n[0];let{parent:i,key:a}=e;return a!==`callee`&&oC(i)||nC(i)?q([n[0],` =>`,K([X,Y([` =>`,X],n.slice(1))])],{shouldBreak:r}):a===`callee`&&oC(i)||t.assignmentLayout?q(Y([` =>`,X],n),{shouldBreak:r}):q(K(Y([` =>`,X],n)),{shouldBreak:r})}function hM(e,t,n,{bodyDoc:r,bodyComments:i,functionBody:a,shouldPutBodyOnSameLine:o}){let{node:s,parent:c}=e,l=n.expandLastArg?GO(t,`all`):``,u=(n.expandLastArg||c.type===`JSXExpressionContainer`)&&!W(s)?Z:``;return o&&lM(a)?[` `,q([J(``,`(`),K([Z,r]),J(``,`)`),l,u]),i]:o?[` `,r,i]:[K([X,r,i]),l,u]}var gM=.25;function _M(e,t){let{printWidth:n}=t;if(W(e))return!1;let r=n*gM;if(e.type===`ThisExpression`||e.type===`Identifier`&&e.name.length<=r||eM(e)&&!W(e.argument))return!0;let i=e.type===`Literal`&&`regex`in e&&e.regex.pattern||e.type===`RegExpLiteral`&&e.pattern;return i?i.length<=r:BS(e)?mk(FS(e),t).length<=r:e.type===`TemplateLiteral`?e.expressions.length===0&&e.quasis[0].value.raw.length<=r&&!e.quasis[0].value.raw.includes(`
337
+ `):e.type===`UnaryExpression`?_M(e.argument,{printWidth:n}):e.type===`CallExpression`&&e.arguments.length===0&&e.callee.type===`Identifier`?e.callee.name.length<=r-2:QS(e)}function vM(e){return iC(e)||e.type===`BindExpression`&&!!e.object}function yM(e){if(e.length<=1)return!1;let t=0;for(let n of e)if(eC(n)){if(t+=1,t>1)return!0}else if(n=eE(n),rC(n)){for(let e of WC(n))if(eC(e))return!0}return!1}function bM(e){let{node:t,parent:n,key:r}=e;return r===`callee`&&rC(t)&&rC(n)&&n.arguments.length>0&&t.arguments.length>n.arguments.length}var xM=new Set([`!`,`-`,`+`,`~`]),SM=z([`Identifier`,`ThisExpression`,`Super`,`PrivateName`,`PrivateIdentifier`]);function CM(e,t=2){if(t<=0)return!1;let n=e=>CM(e,t-1);if(e=eE(e),zS(e))return VD(e.pattern??e.regex.pattern)<=5;if(QS(e)||SM(e)||e.type===`ArgumentPlaceholder`)return!0;if(e.type===`TemplateLiteral`)return e.quasis.every(e=>!e.value.raw.includes(`
338
+ `))&&e.expressions.every(n);if(ZS(e))return e.properties.every(e=>!e.computed&&(e.shorthand||e.value&&n(e.value)));if(XS(e))return e.elements.every(e=>e===null||n(e));if(oC(e)){if(e.type===`ImportExpression`||CM(e.callee,t)){let r=WC(e);return r.length<=t&&r.every(n)}return!1}return iC(e)?CM(e.object,t)&&CM(e.property,t):e.type===`UnaryExpression`&&xM.has(e.operator)||e.type===`UpdateExpression`?CM(e.argument,t):!1}function wM(e,t,n){let{node:r}=e,i=WC(r);if(i.length===0)return q([`(`,WO(e,t),`)`]);let a=i.length-1;if(kM(i)){let t=[`(`];return GC(e,(e,r)=>{t.push(n()),r!==a&&t.push(`, `)}),t.push(`)`),t}let o=!1,s=[];GC(e,({node:e},r)=>{let i=n();r===a||(oO(e,t)?(o=!0,i=[i,`,`,Q,Q]):i=[i,`,`,X]),s.push(i)});let c=e.root.type!==`NGRoot`&&r.type!==`ImportExpression`&&r.type!==`TSImportType`&&r.type!==`TSExternalModuleReference`?GO(t,`all`):``;function l(){return q([`(`,K([X,...s]),c,X,`)`],{shouldBreak:!0})}if(o||e.parent.type!==`Decorator`&&yM(i))return l();if(DM(i)){let e=s.slice(1);if(e.some(BE))return l();let t;try{t=n(KC(r,0),{expandFirstArg:!0})}catch(e){if(e instanceof nO)return l();throw e}return BE(t)?[sD,uD([[`(`,q(t,{shouldBreak:!0}),`, `,...e,`)`],l()])]:uD([[`(`,t,`, `,...e,`)`],[`(`,q(t,{shouldBreak:!0}),`, `,...e,`)`],l()])}if(EM(i,s,t)){let e=s.slice(0,-1);if(e.some(BE))return l();let t;try{t=n(KC(r,-1),{expandLastArg:!0})}catch(e){if(e instanceof nO)return l();throw e}return BE(t)?[sD,uD([[`(`,...e,q(t,{shouldBreak:!0}),`)`],l()])]:uD([[`(`,...e,t,`)`],[`(`,...e,q(t,{shouldBreak:!0}),`)`],l()])}let u=[`(`,K([Z,...s]),c,Z,`)`];return bM(e)?u:q(u,{shouldBreak:s.some(BE)||o})}function TM(e,t=!1){if(ZS(e)&&(e.properties.length>0||W(e))||XS(e)&&(e.elements.length>0||W(e))||(VS(e)||e.type===`TSTypeAssertion`)&&TM(e.expression)||e.type===`FunctionExpression`||e.type===`DoExpression`||e.type===`ModuleExpression`)return!0;if(e.type===`ArrowFunctionExpression`){let{body:n}=e;if(n.type===`BlockStatement`||tC(n)||ZS(n)||XS(n)||n.type===`ArrowFunctionExpression`&&TM(n,!0)||!t&&(n.type===`ConditionalExpression`||rC(eE(n))))return!0}return!1}function EM(e,t,n){if(e.length===1){let e=B(0,t,-1);if(e.label?.embed&&e.label?.hug!==!1)return!0}let r=B(0,e,-1),i=B(0,e,-2);return!W(r,U.Leading)&&!W(r,U.Trailing)&&TM(r)&&(!i||i.type!==r.type)&&(e.length!==2||i.type!==`ArrowFunctionExpression`||!XS(r))&&!(e.length>1&&nM(r,n))}function DM(e){if(e.length!==2)return!1;let[t,n]=e;return t.type===`ModuleExpression`&&jM(n)?!0:!W(t)&&(t.type===`FunctionExpression`||t.type===`ArrowFunctionExpression`&&t.body.type===`BlockStatement`)&&n.type!==`FunctionExpression`&&n.type!==`ArrowFunctionExpression`&&n.type!==`ConditionalExpression`&&OM(n)&&!TM(n)}function OM(e){if(e.type===`ParenthesizedExpression`)return OM(e.expression);if(VS(e)||e.type===`TypeCastExpression`){let{typeAnnotation:t}=e;if(t.type===`TypeAnnotation`&&(t=t.typeAnnotation),t.type===`TSArrayType`&&(t=t.elementType,t.type===`TSArrayType`&&(t=t.elementType)),t.type===`GenericTypeAnnotation`||t.type===`TSTypeReference`){let e=t.type===`GenericTypeAnnotation`?t.typeParameters:t.typeArguments;e?.params.length===1&&(t=e.params[0])}return dO(t)&&CM(e.expression,1)}return oC(e)&&WC(e).length>1?!1:nC(e)?CM(e.left,1)&&CM(e.right,1):zS(e)||CM(e)}function kM(e){return e.length===2?AM(e,0):e.length===3&&e[0].type===`Identifier`&&AM(e,1)}function AM(e,t){let n=e[t],r=e[t+1];return n.type===`ArrowFunctionExpression`&&hS(n).length===0&&n.body.type===`BlockStatement`&&r.type===`ArrayExpression`&&e.every(e=>!W(e))}function jM(e){if(e.type!==`ObjectExpression`||e.properties.length!==1)return!1;let[t]=e.properties;return ow(t)?!t.computed&&(t.key.type===`Identifier`&&t.key.name===`type`||BS(t.key)&&t.key.value===`type`)&&BS(t.value)&&t.value.value===`module`:!1}var MM=wM;function NM(e,t,n){return[n(`object`),q(K([Z,PM(e,t,n)]))]}function PM(e,t,n){return[`::`,n(`callee`)]}var FM=e=>rC(e)&&WC(e).length>0;function IM(e){let{node:t,ancestors:n}=e;for(let e of n){if(!(iC(e)&&e.object===t||e.type===`TSNonNullExpression`&&e.expression===t))return e.type===`NewExpression`&&e.callee===t;t=e}return!1}function LM(e,t,n){let r=n(`object`),i=RM(e,t,n),{node:a}=e,o=e.findAncestor(e=>!(iC(e)||e.type===`TSNonNullExpression`)),s=e.findAncestor(e=>!sC(e)),c=o.type===`BindExpression`||o.type===`AssignmentExpression`&&o.left.type!==`Identifier`||IM(e)||a.computed||a.object.type===`Identifier`&&a.property.type===`Identifier`&&!iC(s)||(s.type===`AssignmentExpression`||s.type===`VariableDeclarator`)&&(FM(eE(a.object))||r.label?.memberChain);return fD(r.label,[r,gD,c?i:q(K([Z,i]))])}function RM(e,t,n){let r=n(`property`),{node:i}=e,a=NO(e);return i.computed?!i.property||RS(i.property)?[a,`[`,r,`]`]:q([a,`[`,K([Z,r]),Z,`]`]):[a,`.`,r]}function zM(e,t,n){let r=(e.parent.type===`ChainExpression`?e.grandparent:e.parent).type===`ExpressionStatement`,i=[];function a(e){let{originalText:n}=t,r=FC(n,H(e));return n.charAt(r)===`)`?r!==!1&&aO(n,r+1):oO(e,t)}function o(){let{node:r}=e;if(rC(r)&&(vM(r.callee)||rC(r.callee))&&!fE(e,t)){let s=a(r);i.unshift({node:r,hasTrailingEmptyLine:s,printed:[jO(e,[NO(e),n(`typeArguments`),MM(e,t,n)],t),s?Q:``]}),e.call(o,`callee`)}else vM(r)&&!fE(e,t)?(i.unshift({node:r,printed:jO(e,iC(r)?RM(e,t,n):PM(e,t,n),t)}),e.call(o,`object`)):r.type===`ChainExpression`&&!fE(e,t)?e.call(o,`expression`):r.type===`TSNonNullExpression`&&!fE(e,t)?(i.unshift({node:r,printed:jO(e,`!`,t)}),e.call(o,`expression`)):i.unshift({node:r,printed:n()})}let{node:s}=e;i.unshift({node:s,printed:[NO(e),n(`typeArguments`),MM(e,t,n)]}),s.callee&&e.call(o,`callee`);let c=[],l=[i[0]],u=1;for(;u<i.length&&(i[u].node.type===`TSNonNullExpression`||i[u].node.type===`ChainExpression`||rC(i[u].node)||iC(i[u].node)&&i[u].node.computed&&RS(i[u].node.property));++u)l.push(i[u]);if(!rC(i[0].node))for(;u+1<i.length&&vM(i[u].node)&&vM(i[u+1].node);++u)l.push(i[u]);c.push(l),l=[];let d=!1;for(;u<i.length;++u){if(d&&vM(i[u].node)){if(i[u].node.computed&&RS(i[u].node.property)){l.push(i[u]);continue}c.push(l),l=[],d=!1}(rC(i[u].node)||i[u].node.type===`ImportExpression`)&&(d=!0),l.push(i[u]),W(i[u].node,U.Trailing)&&(c.push(l),l=[],d=!1)}l.length>0&&c.push(l);function f(e){return/^[A-Z]|^[$_]+$/.test(e)}function p(e){return e.length<=t.tabWidth}function m(e){let t=e[1][0]?.node.computed;if(e[0].length===1){let n=e[0][0].node;return n.type===`ThisExpression`||n.type===`Identifier`&&(f(n.name)||r&&p(n.name)||t)}let n=B(0,e[0],-1).node;return iC(n)&&n.property.type===`Identifier`&&(f(n.property.name)||t)}let h=c.length>=2&&!W(c[1][0].node)&&m(c);function g(e){return e.map(e=>e.printed)}function _(e){return e.length===0?``:K([Q,Y(Q,e.map(g))])}let v=c.map(g),y=v,b=h?3:2,x=c.flat(),S=x.slice(1,-1).some(e=>W(e.node,U.Leading))||x.slice(0,-1).some(e=>W(e.node,U.Trailing))||c[b]&&W(c[b][0].node,U.Leading);if(c.length<=b&&!S&&c.every(e=>!B(0,e,-1).hasTrailingEmptyLine))return bM(e)?y:q(y);let C=B(0,c[+!!h],-1).node,ee=!rC(C)&&a(C),te=[g(c[0]),h?c.slice(1,2).map(g):``,ee?Q:``,_(c.slice(h?2:1))],ne=i.map(({node:e})=>e).filter(rC);function re(){let e=B(0,B(0,c,-1),-1).node,t=B(0,v,-1);return rC(e)&&BE(t)&&ne.slice(0,-1).some(e=>e.arguments.some(eC))}let ie;return ie=S||ne.length>2&&ne.some(e=>e.arguments.some(e=>!CM(e)))||v.slice(0,-1).some(BE)||re()?q(te):[BE(y)||ee?sD:``,uD([y,te])],fD({memberChain:!0},ie)}var BM=zM;function VM(e,t,n){let{node:r}=e,i=r.type===`NewExpression`,a=NO(e),o=WC(r),s=r.type!==`TSImportType`&&r.typeArguments?[n(`typeArguments`),gD]:``,c=o.length===1&&sM(o[0],t.originalText);if(c||WM(e)||GM(e)||bO(r,e.parent)){let t=[];if(GC(e,()=>{t.push(n())}),!(c&&t[0].label?.embed))return[HM(e,n),a,s,`(`,Y(`, `,t),`)`]}let l=r.type===`ImportExpression`||r.type===`TSImportType`||r.type===`TSExternalModuleReference`;if(!l&&!i&&vM(r.callee)&&!e.call(()=>fE(e,t),`callee`,...r.callee.type===`ChainExpression`?[`expression`]:[]))return BM(e,t,n);let u=[HM(e,n),a,s,MM(e,t,n)];return l||rC(r.callee)?q(u):u}function HM(e,t){let{node:n}=e;return n.type===`ImportExpression`?`import${n.phase?`.${n.phase}`:``}`:n.type===`TSImportType`?`import`:n.type===`TSExternalModuleReference`?`require`:[n.type===`NewExpression`?`new `:``,t(`callee`),gD]}var UM=[`require`,`require.resolve`,`require.resolve.paths`,`import.meta.resolve`];function WM(e){let{node:t}=e;if(!(t.type===`ImportExpression`||t.type===`TSImportType`||t.type===`TSExternalModuleReference`||t.type===`CallExpression`&&!t.optional&&mO(t.callee,UM)))return!1;let n=WC(t);return n.length===1&&BS(n[0])&&!W(n[0])}function GM(e){let{node:t}=e;if(t.type!==`CallExpression`||t.optional||t.callee.type!==`Identifier`)return!1;let n=WC(t);return t.callee.name===`require`?(n.length===1&&BS(n[0])||n.length>1)&&!W(n[0]):t.callee.name===`define`&&e.parent.type===`ExpressionStatement`?n.length===1||n.length===2&&n[0].type===`ArrayExpression`||n.length===3&&BS(n[0])&&n[1].type===`ArrayExpression`:!1}function KM(e,t,n,r,i,a){let o=YM(e,t,n,r,a),s=a?n(a,{assignmentLayout:o}):``;switch(o){case`break-after-operator`:return q([q(r),i,q(K([X,s]))]);case`never-break-after-operator`:return q([q(r),i,` `,s]);case`fluid`:{let e=Symbol(`assignment`);return q([q(r),i,q(K(X),{id:e}),gD,dD(s,{groupId:e})])}case`break-lhs`:return q([r,i,` `,q(s)]);case`chain`:return[q(r),i,X,s];case`chain-tail`:return[q(r),i,K([X,s])];case`chain-tail-arrow-chain`:return[q(r),i,s];case`only-left`:return r}}function qM(e,t,n){let{node:r}=e;return KM(e,t,n,n(`left`),[` `,r.operator],`right`)}function JM(e,t,n){return KM(e,t,n,n(`id`),` =`,`init`)}function YM(e,t,n,r,i){let{node:a}=e,o=a[i];if(!o)return`only-left`;let s=!QM(o);if(e.match(QM,$M,e=>!s||e.type!==`ExpressionStatement`&&e.type!==`VariableDeclaration`))return s?o.type===`ArrowFunctionExpression`&&o.body.type===`ArrowFunctionExpression`?`chain-tail-arrow-chain`:`chain-tail`:`chain`;if(!s&&QM(o.right)||US(o)&&!jk(o)||XT(t.originalText,o)||W(o,U.Leading,Dj))return`break-after-operator`;if(a.type===`ImportAttribute`||o.type===`CallExpression`&&o.callee.name===`require`||e.root.type===`JsonRoot`)return`never-break-after-operator`;let c=YE(r);if(ZM(a)||nN(a)||rN(a)&&c)return`break-lhs`;let l=oN(a,r,t);return e.call(()=>XM(e,t,n,l),i)?`break-after-operator`:eN(a)?`break-lhs`:!c&&(l||o.type===`TemplateLiteral`||o.type===`TaggedTemplateExpression`||LS(o)||RS(o)||o.type===`ClassExpression`)?`never-break-after-operator`:`fluid`}function XM(e,t,n,r){let i=e.node;if(nC(i)&&!Vj(i))return!0;switch(i.type){case`StringLiteralTypeAnnotation`:case`SequenceExpression`:return!0;case`TSConditionalType`:case`ConditionalTypeAnnotation`:if(!t.experimentalTernaries&&!lN(i))break;return!0;case`ConditionalExpression`:{if(!t.experimentalTernaries){let{test:e}=i;return nC(e)&&!Vj(e)}let{consequent:e,alternate:n}=i;return e.type===`ConditionalExpression`||n.type===`ConditionalExpression`}case`ClassExpression`:return cS(i.decorators)}if(r)return!1;let a=i,o=[];for(;;)if(a.type===`UnaryExpression`||a.type===`AwaitExpression`||a.type===`YieldExpression`&&a.argument!==null)a=a.argument,o.push(`argument`);else if(a.type===`TSNonNullExpression`)a=a.expression,o.push(`expression`);else break;return!!(BS(a)||e.call(()=>aN(e,t,n),...o))}function ZM(e){if($M(e)){let t=e.left||e.id;return t.type===`ObjectPattern`&&t.properties.length>2&&t.properties.some(e=>ow(e)&&(!e.shorthand||e.value?.type===`AssignmentPattern`))}return!1}function QM(e){return e.type===`AssignmentExpression`}function $M(e){return QM(e)||e.type===`VariableDeclarator`}function eN(e){let t=tN(e);if(cS(t)){let n=e.type===`TSTypeAliasDeclaration`?`constraint`:`bound`;if(t.length>1&&t.some(e=>e[n]||e.default))return!0}return!1}function tN(e){if(qS(e))return e.typeParameters?.params}function nN(e){if(e.type!==`VariableDeclarator`)return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let n=iN(t.typeAnnotation);return cS(n)&&n.length>1&&n.some(e=>cS(iN(e))||e.type===`TSConditionalType`)}function rN(e){return e.type===`VariableDeclarator`&&e.init?.type===`ArrowFunctionExpression`}function iN(e){let t;switch(e.type){case`GenericTypeAnnotation`:t=e.typeParameters;break;case`TSTypeReference`:t=e.typeArguments}return t?.params}function aN(e,t,n,r=!1){let{node:i}=e,a=()=>aN(e,t,n,!0);if(sC(i))return e.call(a,`expression`);if(rC(i)){if(VM(e,t,n).label?.memberChain)return!1;let r=WC(i);return!(r.length===0||r.length===1&&_M(r[0],t))||sN(i,n)?!1:e.call(a,`callee`)}return iC(i)?e.call(a,`object`):r&&(i.type===`Identifier`||i.type===`ThisExpression`)}function oN(e,t,n){return ow(e)?(t=KE(t),typeof t==`string`&&VD(t)<n.tabWidth+3):!1}function sN(e,t){let n=e.typeArguments?.params;if(cS(n)){if(n.length>1)return!0;if(n.length===1){let e=n[0];if(US(e)||WS(e)||e.type===`TSTypeLiteral`||e.type===`ObjectTypeAnnotation`)return!0}if(BE(t(`typeArguments`)))return!0}return!1}function cN(e){switch(e.type){case`FunctionTypeAnnotation`:case`GenericTypeAnnotation`:case`TSFunctionType`:return!!e.typeParameters;case`TSTypeReference`:return!!e.typeArguments;default:return!1}}function lN(e){return cN(e.checkType)||cN(e.extendsType)}function uN(e,t,n){let{node:r}=e,i=[`await`];if(r.argument){i.push(` `,n(`argument`));let{parent:t}=e;if(rC(t)&&t.callee===r||iC(t)&&t.object===r){i=[K([Z,...i]),Z];let t=e.findAncestor(e=>e.type===`AwaitExpression`||e.type===`BlockStatement`);if(t?.type!==`AwaitExpression`||!DT(t.argument,e=>e===r))return q(i)}}return i}var dN=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let n=this[t];if(e(n,t,this))return n}},fN=uS(`findLast`,function(){if(Array.isArray(this))return dN});function pN(e,t,n,r){let{node:i}=e,a=[],o=fN(0,i[r],e=>e.type!==`EmptyStatement`);return e.each(({node:e})=>{e.type!==`EmptyStatement`&&(a.push(n()),e!==o&&(a.push(Q),oO(e,t)&&a.push(Q)))},r),a}function mN(e,t,n){let r=hN(e,t,n),{node:i,parent:a}=e;if(i.type===`Program`&&a?.type!==`ModuleExpression`)return r?[r,Q]:``;let o=[];if(i.type===`StaticBlock`&&o.push(`static `),o.push(`{`),r)o.push(K([Q,r]),Q);else{let t=e.grandparent;a.type===`ArrowFunctionExpression`||a.type===`FunctionExpression`||a.type===`FunctionDeclaration`||a.type===`ComponentDeclaration`||a.type===`HookDeclaration`||a.type===`ObjectMethod`||a.type===`ClassMethod`||a.type===`ClassPrivateMethod`||a.type===`ForStatement`||a.type===`WhileStatement`||a.type===`DoWhileStatement`||a.type===`DoExpression`||a.type===`ModuleExpression`||a.type===`CatchClause`&&!t.finalizer||a.type===`TSModuleDeclaration`||a.type===`DeclareModule`||a.type===`MatchStatementCase`||i.type===`StaticBlock`||o.push(Q)}return o.push(`}`),o}function hN(e,t,n){let{node:r}=e,i=cS(r.directives),a=r.body.some(e=>e.type!==`EmptyStatement`),o=W(r,U.Dangling);if(!i&&!a&&!o)return``;let s=[];return i&&(s.push(pN(e,t,n,`directives`)),(a||o)&&(s.push(Q),oO(B(0,r.directives,-1),t)&&s.push(Q))),a&&s.push(pN(e,t,n,`body`)),o&&s.push(DO(e,t)),s}function gN(e){let t=new WeakMap;return n=>fS(t,n,()=>Symbol(e))}var _N=gN,vN=[`properties`,`indexers`,`callProperties`,`internalSlots`];function yN(e,t){let{node:n}=e;if(n.type===`ClassBody`||n.type===`TSInterfaceBody`){e.each(t,`body`);return}if(n.type===`TSTypeLiteral`){e.each(t,`members`);return}if(n.type===`RecordDeclarationBody`){e.each(t,`elements`);return}if(n.type===`ObjectTypeAnnotation`){let n=vN.flatMap(t=>e.map(({node:e,index:n})=>({node:e,loc:V(e),selector:[t,n]}),t)).sort((e,t)=>e.loc-t.loc);for(let[r,{node:i,selector:a}]of n.entries())e.call(()=>t({node:i,next:n[r+1]?.node,isLast:r===n.length-1}),...a)}}function bN(e){return e.type===`ObjectTypeAnnotation`?vN.some(t=>cS(e[t])):cS(e.type===`RecordDeclarationBody`?e.elements:e.body)}function xN(e,t,n){let{node:r}=e,i=[],a=r.type===`ObjectTypeAnnotation`,o=r.type===`RecordDeclarationBody`,s=!SN(e),c=s?X:Q,l=W(r,U.Dangling),[u,d]=a&&r.exact?[`{|`,`|}`]:`{}`,f=!0,p;if(yN(e,({node:r,next:l,isLast:u})=>{if(p??=r,f&&=!1,i.push(n()),!o&&s&&a){let{parent:n}=e;n.inexact||!u?i.push(`,`):i.push(GO(t))}o&&r.type!==`MethodDefinition`&&i.push(`,`),!o&&!s&&(EN({node:r,next:l},t)||ON({node:r,next:l},t))&&i.push(`;`),u||(i.push(c),oO(r,t)&&i.push(Q))}),l&&i.push(DO(e,t)),r.type===`ObjectTypeAnnotation`&&r.inexact){f&&=!1;let e;e=W(r,U.Dangling)?[W(r,U.Line)||zC(t.originalText,H(B(0,gT(r),-1)))?Q:X,`...`]:[p?X:``,`...`],i.push(e)}if(s){let n=W(r,U.Dangling|U.Line)||t.objectWrap===`preserve`&&p&&VC(t.originalText,V(r),V(p)),a;if(i.length===0)a=u+d;else{let e=!t.bracketSpacing||f&&!n?Z:X;a=[u,K([e,...i]),e,d]}return e.match(void 0,(e,t)=>t===`typeAnnotation`,(e,t)=>t===`typeAnnotation`,ek)||e.match(void 0,(e,t)=>e.type===`FunctionTypeParam`&&t===`typeAnnotation`,ek)?a:q(a,{shouldBreak:n})}return[u,i.length>0?[K([Q,i]),Q]:``,d]}function SN(e){let{node:t}=e;if(t.type===`ObjectTypeAnnotation`){let{key:t,parent:n}=e;return t===`body`&&(n.type===`InterfaceDeclaration`||n.type===`DeclareInterface`||n.type===`DeclareClass`)}return t.type===`ClassBody`||t.type===`TSInterfaceBody`||t.type===`RecordDeclarationBody`}function CN(e,t){let{parent:n}=e;return e.callParent(SN)?n.type===`ObjectTypeAnnotation`?`;`:KO(t):n.type===`TSTypeLiteral`?e.isLast?t.semi?J(`;`):``:t.semi||ON({node:e.node,next:e.next},t)?`;`:J(``,`;`):``}var wN=z([`ClassProperty`,`PropertyDefinition`,`ClassPrivateProperty`,`ClassAccessorProperty`,`AccessorProperty`,`TSAbstractPropertyDefinition`,`TSAbstractAccessorProperty`]),TN=e=>{if(e.computed||e.typeAnnotation)return!1;let{type:t,name:n}=e.key;return t===`Identifier`&&(n===`static`||n===`get`||n===`set`)};function EN({node:e,next:t},n){if(n.semi||!wN(e))return!1;if(!e.value&&TN(e))return!0;if(!t||t.static||t.accessibility||t.readonly)return!1;if(!t.computed){let e=t.key?.name;if(e===`in`||e===`instanceof`)return!0}if(wN(t)&&!t.static&&t.variance&&!t.declare)return!0;switch(t.type){case`ClassProperty`:case`PropertyDefinition`:case`TSAbstractPropertyDefinition`:return t.computed;case`MethodDefinition`:case`TSAbstractMethodDefinition`:case`ClassMethod`:case`ClassPrivateMethod`:{if((t.value?t.value.async:t.async)||t.kind===`get`||t.kind===`set`)return!1;let e=t.value?t.value.generator:t.generator;return!!(t.computed||e)}case`TSIndexSignature`:return!0}return!1}var DN=z([`TSPropertySignature`]);function ON({node:e,next:t},n){return n.semi||!DN(e)?!1:TN(e)?!0:t&&t.type===`TSCallSignatureDeclaration`?!(e.type===`TSPropertySignature`&&e.typeAnnotation):!1}var kN=_N(`heritageGroup`),AN=z([`TSInterfaceDeclaration`,`DeclareInterface`,`InterfaceDeclaration`,`InterfaceTypeAnnotation`]);function jN(e,t,n){let r=MN(e,t,n),{node:i}=e;if(i.type===`ClassExpression`&&cS(i.decorators)){let i=Zj(e,t,n);return fE(e,t)?[K([Z,i,r]),Z]:[i,r]}return r}function MN(e,t,n){let{node:r}=e,i=AN(r),a=r.type===`RecordDeclaration`,o=i?`interface`:a?`record`:`class`,s=[LO(e),zO(e),o],c=IN(e),l=[],u=[];if(r.type!==`InterfaceTypeAnnotation`){r.id&&l.push(` `);for(let i of[`id`,`typeParameters`])if(r[i]){let{leading:r,trailing:a}=e.call(()=>AO(e,t),i);l.push(r,n(i),K(a))}}if(r.superClass){let r=[RN(e,t,n),n(`superTypeArguments`)],i=e.call(()=>[`extends `,jO(e,r,t)],`superClass`);c?u.push(X,q(i)):u.push(` `,i)}else u.push(LN(e,t,n,`extends`));u.push(LN(e,t,n,`mixins`),LN(e,t,n,`implements`));let d;return c?(d=kN(r),s.push(q([...l,K(u)],{id:d}))):s.push(...l,...u),!i&&c&&bN(r.body)?s.push(J(Q,` `,{groupId:d})):s.push(` `),s.push(n(`body`)),s}function NN(e){let t=+!!e.superClass;for(let n of[`extends`,`mixins`,`implements`])if(Array.isArray(e[n])&&(t+=e[n].length),t>1)return!0;return t>1}function PN(e){let{node:t}=e;if(W(t.id,U.Trailing)||W(t.typeParameters,U.Trailing)||W(t.superClass)||NN(t))return!0;if(t.superClass)return e.parent.type!==`AssignmentExpression`&&!t.superTypeArguments&&iC(eE(t.superClass));let n=t.extends?.[0]??t.mixins?.[0]??t.implements?.[0];return n?n.type===`InterfaceExtends`&&n.id.type===`QualifiedTypeIdentifier`&&!n.typeParameters||(n.type===`TSClassImplements`||n.type===`TSInterfaceHeritage`)&&iC(n.expression)&&!n.typeArguments:!1}var FN=new WeakMap;function IN(e){return fS(FN,e.node,()=>PN(e))}function LN(e,t,n,r){let{node:i}=e;if(!cS(i[r]))return``;let a=DO(e,t,{marker:r}),o=Y([`,`,X],e.map(n,r));if(!NN(i)){let t=[`${r} `,a,o];return IN(e)?[X,q(t)]:[` `,t]}return[X,a,a&&Q,r,q(K([X,o]))]}function RN(e,t,n){let r=n(`superClass`),{parent:i}=e;return i.type===`AssignmentExpression`?q(J([`(`,K([Z,r]),Z,`)`],r)):r}function zN(e,t,n){let{node:r}=e,i=[];return cS(r.decorators)&&i.push(Yj(e,t,n)),i.push(BO(r)),r.static&&i.push(`static `),i.push(zO(e)),r.override&&i.push(`override `),i.push(Hk(e,t,n)),i}function BN(e,t,n){let{node:r}=e,i=[];return cS(r.decorators)&&i.push(Yj(e,t,n)),i.push(LO(e),BO(r)),r.static&&i.push(`static `),i.push(zO(e)),r.override&&i.push(`override `),r.readonly&&i.push(`readonly `),r.variance&&i.push(n(`variance`)),(r.type===`ClassAccessorProperty`||r.type===`AccessorProperty`||r.type===`TSAbstractAccessorProperty`)&&i.push(`accessor `),i.push(Dk(e,t,n),NO(e),PO(e),Lk(e,n)),[KM(e,t,n,i,` =`,r.type===`TSAbstractPropertyDefinition`||r.type===`TSAbstractAccessorProperty`?void 0:`value`),KO(t)]}function VN(e,t){let n=gT(e,U.Leading);if(n.length===0)return!1;let[r]=n,i=t.originalText,a=V(r);return VC(i,a,H(r))||zC(i,a,{backwards:!0})}function HN(e,t,n,r=`body`){return e.call(({node:r})=>{let i=n();if(r.type===`EmptyStatement`)return W(r,U.Leading)?[` `,i]:i;let a=r.type===`BlockStatement`;return VN(r,t)?a?[Q,i]:K([Q,i]):a||r.type===`IfStatement`&&e.parent.type===`IfStatement`&&e.key===`alternate`?[` `,i]:K([X,i])},r)}var UN=(e,t,n)=>HN(e,t,n,`consequent`),WN=(e,t,n)=>HN(e,t,n,`alternate`);function GN(e,t,n){return[q([`do`,HN(e,t,n)]),e.node.body.type===`BlockStatement`?` `:Q,`while (`,UO(e,t,n),`)`,KO(t)]}var KN=z([`TSAsExpression`,`TSTypeAssertion`,`TSNonNullExpression`,`TSInstantiationExpression`,`TSSatisfiesExpression`]);function qN(e){return KN(e)?qN(e.expression):e}var JN=z([`FunctionExpression`,`ArrowFunctionExpression`]);function YN(e){return e.type===`MemberExpression`||e.type===`OptionalMemberExpression`||e.type===`Identifier`&&e.name!==`undefined`}function XN(e,t){if(Qk(e,t)){let t=qN(e.node.expression);return JN(t)||YN(t)}return!(!t.semi||Xk(e,t)||Zk(e,t))}function ZN(e,t,n){let r=[n(`expression`)];if(qk(e,t)){if($k(e,t)){let{node:n}=e,i=B(0,gT(n,U.Leading),-1);return jO(e,[`;`,OO(e,t,{filter:e=>e===i}),...r],t,{filter:e=>e!==i})}r.unshift(`;`)}else XN(e,t)&&r.push(`;`);return r}function QN(e,t,n){let{node:r}=e,i=HN(e,t,n),a=DO(e,t),o=a?[a,Z]:``;return!r.init&&!r.test&&!r.update?[o,q([`for (;;)`,i])]:[o,q([`for (`,q([K([Z,n(`init`),`;`,X,n(`test`),`;`,r.update?[X,n(`update`)]:``]),Z]),`)`,i])]}function $N(e,t,n){let{node:r}=e,i=r.type===`ForOfStatement`;return q([`for`,i&&r.await?` await`:``,` (`,n(`left`),` `,i?`of`:`in`,` `,n(`right`),`)`,HN(e,t,n)])}function eP(e,t,n){if(t.__isVueBindings||t.__isVueForBindingLeft){let r=e.map(n,`program`,`body`,0,`params`);if(r.length===1)return r[0];let i=Y([`,`,X],r);return t.__isVueForBindingLeft?[`(`,K([Z,q(i)]),Z,`)`]:i}if(t.__isEmbeddedTypescriptGenericParameters){let t=e.map(n,`program`,`body`,0,`typeParameters`,`params`);return Y([`,`,X],t)}}var tP=(e,{originalText:t})=>SO(t,V(e));function nP(e){return aw(B(0,gT(e,U.Dangling),-1))}function rP(e,t,n){let{node:r}=e,i=q([`if (`,UO(e,t,n),`)`,UN(e,t,n)]);if(!r.alternate)return i;let{consequent:a}=r,o=a.type===`BlockStatement`,s=[i],c=o;o||(s.push(Q),c=!1);let l=gT(r,U.Dangling);if(l.length>0){let[n]=l;tP(n,t)?s.push(o?[Q,Q]:Q):zC(t.originalText,V(n),{backwards:!0})?s.push(o?Q:``):s.push(` `),s.push(DO(e,t),nP(r)||zC(t.originalText,H(B(0,l,-1)))?Q:` `),c=!1}return s.push(c?` `:``,`else`,q(WN(e,t,n))),s}function iP(e,t){let{node:n}=e;switch(n.type){case`RegExpLiteral`:return sP(n);case`BigIntLiteral`:return oP(n.extra.raw);case`NumericLiteral`:return ik(n.extra.raw);case`StringLiteral`:return qE(mk(n.extra.raw,t));case`NullLiteral`:return`null`;case`BooleanLiteral`:return String(n.value);case`DirectiveLiteral`:return lP(n.extra.raw,t);case`Literal`:{if(n.regex)return sP(n.regex);if(n.bigint)return oP(n.raw);let{value:r}=n;return typeof r==`number`?ik(n.raw):typeof r==`string`?aP(e)?lP(n.raw,t):qE(mk(n.raw,t)):String(r)}}}function aP(e){if(e.key!==`expression`)return;let{parent:t}=e;return t.type===`ExpressionStatement`&&typeof t.directive==`string`}function oP(e){return e.toLowerCase()}function sP({pattern:e,flags:t}){return t=[...t].sort().join(``),`/${e}/${t}`}var cP=`use strict`;function lP(e,t){let n=e.slice(1,-1);if(n===cP||!(n.includes(`"`)||n.includes(`'`))){let e=t.singleQuote?`'`:`"`;return e+n+e}return e}var uP=z([`ImportDeclaration`,`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`ExportAllDeclaration`,`DeclareExportDeclaration`,`DeclareExportAllDeclaration`]),dP=z([`EnumBody`,`EnumBooleanBody`,`EnumNumberBody`,`EnumBigIntBody`,`EnumStringBody`,`EnumSymbolBody`]);function fP(e,t,n){let{node:r,parent:i}=e,a=dP(r),o=r.type===`TSEnumBody`||a,s=uP(r),c=a&&r.hasUnknownMembers,l=o?`members`:s?`attributes`:`properties`,u=r[l],d=o||r.type===`ObjectPattern`&&i.type!==`FunctionDeclaration`&&i.type!==`FunctionExpression`&&i.type!==`ArrowFunctionExpression`&&i.type!==`ObjectMethod`&&i.type!==`ClassMethod`&&i.type!==`ClassPrivateMethod`&&i.type!==`AssignmentPattern`&&i.type!==`CatchClause`&&r.properties.some(e=>e.value&&(e.value.type===`ObjectPattern`||e.value.type===`ArrayPattern`))||r.type!==`ObjectPattern`&&t.objectWrap===`preserve`&&u.length>0&&pP(r,u[0],t),f=[],p=e.map(({node:e})=>{let r=[...f,n()];return f=[`,`,X],oO(e,t)&&f.push(Q),r},l);if(c){let n;if(W(r,U.Dangling)){let i=W(r,U.Line);n=[DO(e,t),i||zC(t.originalText,H(B(0,gT(r),-1)))?Q:X,`...`]}else n=[`...`];p.push([...f,...n])}let m=!(c||B(0,u,-1)?.type===`RestElement`),h;if(p.length===0)h=q([`{`,WO(e,t),`}`,NO(e),Lk(e,n)]);else{let r=t.bracketSpacing?X:Z;h=[`{`,K([r,...p]),m?GO(t):``,r,`}`,NO(e),Lk(e,n)]}return e.match(e=>e.type===`ObjectPattern`&&!cS(e.decorators),ek)||$S(r)&&(e.match(void 0,(e,t)=>t===`typeAnnotation`,(e,t)=>t===`typeAnnotation`,ek)||e.match(void 0,(e,t)=>e.type===`FunctionTypeParam`&&t===`typeAnnotation`,ek))||!d&&e.match(e=>e.type===`ObjectPattern`,e=>e.type===`AssignmentExpression`||e.type===`VariableDeclarator`)?h:q(h,{shouldBreak:d})}function pP(e,t,n){let r=n.originalText,i=V(t),a=V(e);return uP(e)&&(a=ew(n).lastIndexOf(`{`,i)),VC(r,a,i)}function mP(e,t,n){let{node:r}=e;return[`import`,r.phase?` ${r.phase}`:``,bP(r),CP(e,t,n),SP(e,t,n),DP(e,t,n),KO(t)]}var hP=e=>e.type===`ExportDefaultDeclaration`||e.type===`DeclareExportDeclaration`&&e.default;function gP(e,t,n){let{node:r}=e,i=[Xj(e,t,n),LO(e),`export`,hP(r)?` default`:``],{declaration:a,exported:o}=r;return W(r,U.Dangling)&&(i.push(` `,DO(e,t)),nP(r)&&i.push(Q)),a?i.push(` `,n(`declaration`)):(i.push(xP(r)),r.type===`ExportAllDeclaration`||r.type===`DeclareExportAllDeclaration`?(i.push(` *`),o&&i.push(` as `,n(`exported`))):i.push(CP(e,t,n)),i.push(SP(e,t,n),DP(e,t,n))),i.push(vP(r,t)),i}var _P=z([`ClassDeclaration`,`ComponentDeclaration`,`FunctionDeclaration`,`TSInterfaceDeclaration`,`DeclareClass`,`DeclareComponent`,`DeclareFunction`,`DeclareHook`,`HookDeclaration`,`TSDeclareFunction`,`EnumDeclaration`]);function vP(e,t){return!e.declaration||hP(e)&&!_P(e.declaration)?KO(t):``}function yP(e,t=!0){return e&&e!==`value`?`${t?` `:``}${e}${t?``:` `}`:``}function bP(e,t){return yP(e.importKind,t)}function xP(e){return yP(e.exportKind)}function SP(e,t,n){let{node:r}=e;return r.source?[wP(r,t)?` from`:``,` `,n(`source`)]:``}function CP(e,t,n){let{node:r}=e;if(!wP(r,t))return``;let i=[` `];if(cS(r.specifiers)){let a=[],o=[];e.each(()=>{let t=e.node.type;if(t===`ExportNamespaceSpecifier`||t===`ExportDefaultSpecifier`||t===`ImportNamespaceSpecifier`||t===`ImportDefaultSpecifier`)a.push(n());else if(t===`ExportSpecifier`||t===`ImportSpecifier`)o.push(n());else throw new Ij(r,`specifier`)},`specifiers`),i.push(Y(`, `,a)),o.length>0&&(a.length>0&&i.push(`, `),o.length>1||a.length>0||r.specifiers.some(e=>W(e))?i.push(q([`{`,K([t.bracketSpacing?X:Z,Y([`,`,X],o)]),GO(t),t.bracketSpacing?X:Z,`}`])):i.push([`{`,t.bracketSpacing?` `:``,...o,t.bracketSpacing?` `:``,`}`]))}else i.push(`{}`);return i}function wP(e,t){return e.type!==`ImportDeclaration`||cS(e.specifiers)||e.importKind===`type`?!0:ew(t).slice(V(e),V(e.source)).trimEnd().endsWith(`from`)}function TP(e,t){let n=ew(t).slice(H(e.source),e.attributes?.[0]?V(e.attributes[0]):H(e)).trimStart();return n.startsWith(`assert`)?`assert`:n.startsWith(`with`)||cS(e.attributes)?`with`:void 0}var EP=e=>{let{attributes:t}=e;if(t.length!==1)return!1;let[n]=t,{type:r,key:i,value:a}=n;return r===`ImportAttribute`&&(i.type===`Identifier`&&i.name===`type`||BS(i)&&i.value===`type`)&&BS(a)&&!W(n)&&!W(i)&&!W(a)};function DP(e,t,n){let{node:r}=e;if(!r.source)return``;let i=TP(r,t);if(!i)return``;let a=fP(e,t,n);return EP(r)&&(a=WE(a)),[` ${i} `,a]}function OP(e,t,n){let{node:r}=e,{type:i}=r,a=i.startsWith(`Import`),o=a?`imported`:`local`,s=a?`local`:`exported`,c=r[o],l=r[s],u=``,d=``;return i===`ExportNamespaceSpecifier`||i===`ImportNamespaceSpecifier`?u=`*`:c&&(u=n(o)),l&&!uC(r)&&(d=n(s)),[yP(i===`ImportSpecifier`?r.importKind:r.exportKind,!1),u,u&&d?` as `:``,d]}function kP(e,t,n){let{node:r}=e;return r.shorthand?n(`value`):KM(e,t,n,Dk(e,t,n),`:`,`value`)}function AP(e,t){return[`...`,t(`argument`),Lk(e,t)]}function jP(e,t,n){let{node:r}=e,i=n();return $T(r,t)?[`(`,K([Q,i]),Q,`)`]:nC(r)||t.experimentalTernaries&&r.type===`ConditionalExpression`&&(r.consequent.type===`ConditionalExpression`||r.alternate.type===`ConditionalExpression`)?q([J(`(`),K([Z,i]),Z,J(`)`)]):i}function MP(e,t,n){let{node:r}=e;return[r.type===`ThrowStatement`?`throw`:`return`,r.argument?[` `,e.call(()=>jP(e,t,n),`argument`)]:``,KO(t)]}function NP(e,t){let{key:n,parent:r}=e;return!!(n===`argument`&&JS(r)&&fE(e,t)||n===`body`&&r.type===`ArrowFunctionExpression`)}function PP(e,t,n){let{parent:r}=e;if(r.type===`ExpressionStatement`||r.type===`ForStatement`){let t=[];return e.each(({isFirst:e})=>{e?t.push(n()):t.push(`,`,K([X,n()]))},`expressions`),q(t)}let i=Y([`,`,X],e.map(n,`expressions`));return NP(e,t)?q(J([K([Z,i]),Z],i)):q(i)}function FP(e,t,n){return[q([`switch (`,K([Z,n(`discriminant`)]),Z,`)`]),` {`,e.node.cases.length>0?K([Q,Y(Q,e.map(({node:e,isLast:r})=>[n(),!r&&oO(e,t)?Q:``],`cases`))]):DO(e,t,{indent:!0}),Q,`}`]}function IP(e,t,n){let{node:r}=e,i=[];r.test?i.push(`case `,n(`test`),`:`):i.push(`default:`),W(r,U.Dangling)&&i.push(` `,DO(e,t));let a=r.consequent.filter(e=>e.type!==`EmptyStatement`);if(a.length>0){let r=pN(e,t,n,`consequent`);i.push(a.length===1&&a[0].type===`BlockStatement`?[` `,r]:K([Q,r]))}return i}function LP(e,t){let n=0;for(let r in e){let i=e[r];if(FT(i)&&typeof i.type==`string`&&(n++,n+=LP(i,t-n)),n>t)return n}return n}function RP(e,t=5){return LP(e,t)<=t}function zP(e){let t=[e];for(let e=0;e<t.length;e++){let n=t[e];for(let e of[`test`,`consequent`,`alternate`]){let r=n[e];if(tC(r))return!0;r.type===`ConditionalExpression`&&t.push(r)}}return!1}function BP(e,t,n){let{node:r}=e,i=r.type===`ConditionalExpression`,a=i?`alternate`:`falseType`,{parent:o}=e,s=i?n(`test`):[n(`checkType`),` `,`extends`,` `,n(`extendsType`)];return o.type===r.type&&o[a]===r?nD(2,s):s}var VP=new Map([[`AssignmentExpression`,`right`],[`VariableDeclarator`,`init`],[`ReturnStatement`,`argument`],[`ThrowStatement`,`argument`],[`UnaryExpression`,`argument`],[`YieldExpression`,`argument`],[`AwaitExpression`,`argument`]]);function HP(e){let{node:t}=e;if(t.type!==`ConditionalExpression`)return!1;let n,r=t;for(let t=0;!n;t++){let i=e.getParentNode(t);if(sC(i)&&i.expression===r||rC(i)&&i.callee===r||iC(i)&&i.object===r){r=i;continue}i.type===`NewExpression`&&i.callee===r||VS(i)&&i.expression===r?(n=e.getParentNode(t+1),r=i):n=i}return r!==t&&n[VP.get(n.type)]===r}function UP(e,t,n){let{node:r}=e,i=r.type===`ConditionalExpression`,a=i?`consequent`:`trueType`,o=i?`alternate`:`falseType`,s=i?[`test`]:[`checkType`,`extendsType`],c=r[a],l=r[o],u=[],d=!1,{parent:f}=e,p=f.type===r.type&&s.some(e=>f[e]===r),m=f.type===r.type&&!p,h,g,_=0;do g=h||r,h=e.getParentNode(_),_++;while(h&&h.type===r.type&&s.every(e=>h[e]!==g));let v=h||f,y=g;if(i&&(tC(r[s[0]])||tC(c)||tC(l)||zP(y))){d=!0,m=!0;let e=e=>[J(`(`),K([Z,e]),Z,J(`)`)],t=e=>e.type===`NullLiteral`||e.type===`Literal`&&e.value===null||e.type===`Identifier`&&e.name===`undefined`;u.push(` ? `,t(c)?n(a):e(n(a)),` : `,l.type===r.type||t(l)?n(o):e(n(o)))}else{let e=e=>t.useTabs?K(n(e)):nD(2,n(e)),i=[X,`? `,c.type===r.type?J(``,`(`):``,e(a),c.type===r.type?J(``,`)`):``,X,`: `,e(o)];u.push(f.type!==r.type||f[o]===r||p?i:t.useTabs?aD(K(i)):nD(Math.max(0,t.tabWidth-2),i))}let b=e=>f===v?q(e):e,x=!d&&(iC(f)||f.type===`NGPipeExpression`&&f.left===r)&&!f.computed,S=HP(e),C=b([BP(e,t,n),m?u:K(u),i&&x&&!S?Z:``]);return p||S?q([K([Z,C]),Z]):C}function WP(e,t){return(iC(t)||t.type===`NGPipeExpression`&&t.left===e)&&!t.computed}function GP(e,t,n,r){return[...e.map(e=>gT(e)),gT(t),gT(n)].flat().some(e=>iw(e)&&VC(r.originalText,V(e),H(e)))}var KP=new Map([[`AssignmentExpression`,`right`],[`VariableDeclarator`,`init`],[`ReturnStatement`,`argument`],[`ThrowStatement`,`argument`],[`UnaryExpression`,`argument`],[`YieldExpression`,`argument`],[`AwaitExpression`,`argument`]]);function qP(e){let{node:t}=e;if(t.type!==`ConditionalExpression`)return!1;let n,r=t;for(let t=0;!n;t++){let i=e.getParentNode(t);if(sC(i)&&i.expression===r||rC(i)&&i.callee===r||iC(i)&&i.object===r){r=i;continue}i.type===`NewExpression`&&i.callee===r||VS(i)&&i.expression===r?(n=e.getParentNode(t+1),r=i):n=i}return r!==t&&n[KP.get(n.type)]===r}var JP=e=>[J(`(`),K([Z,e]),Z,J(`)`)];function YP(e,t,n,r){if(!t.experimentalTernaries)return UP(e,t,n);let{node:i}=e,a=i.type===`ConditionalExpression`,o=KS(i),s=a?`consequent`:`trueType`,c=a?`alternate`:`falseType`,l=a?[`test`]:[`checkType`,`extendsType`],u=i[s],d=i[c],f=l.map(e=>i[e]),{parent:p}=e,m=p.type===i.type,h=m&&l.some(e=>p[e]===i),g=m&&p[c]===i,_=u.type===i.type,v=d.type===i.type,y=v||g,b=t.tabWidth>2||t.useTabs,x,S,C=0;do S=x||i,x=e.getParentNode(C),C++;while(x&&x.type===i.type&&l.every(e=>x[e]!==S));let ee=x||p,te=r&&r.assignmentLayout&&r.assignmentLayout!==`break-after-operator`&&(p.type===`AssignmentExpression`||p.type===`VariableDeclarator`||p.type===`ClassProperty`||p.type===`PropertyDefinition`||p.type===`ClassPrivateProperty`||p.type===`ObjectProperty`||p.type===`Property`),ne=JS(p)&&!(_||v),re=a&&ee.type===`JSXExpressionContainer`&&e.grandparent.type!==`JSXAttribute`,ie=qP(e),ae=WP(i,p),oe=o&&fE(e,t),se=b?t.useTabs?` `:` `.repeat(t.tabWidth-1):``,ce=GP(f,u,d,t)||_||v,le=!y&&!m&&!o&&(re?u.type===`NullLiteral`||u.type===`Literal`&&u.value===null:_M(u,t)&&RP(i.test,3)),ue=y||g||o&&!m||m&&a&&RP(i.test,1)||le,de=[];W(i.test,U.Dangling)&&e.call(()=>{de.push(DO(e,t))},`test`),W(i,U.Dangling)&&de.push(DO(e,t));let fe=Symbol(`test`),w=Symbol(`consequent`),pe=Symbol(`test-and-consequent`),me=q([a?[JP(n(`test`)),i.test.type===`ConditionalExpression`?sD:``]:[n(`checkType`),` `,`extends`,` `,KS(i.extendsType)||i.extendsType.type===`TSMappedType`?n(`extendsType`):q(JP(n(`extendsType`)))],` ?`],{id:fe}),he=n(s),ge=K([_||re&&(tC(u)||m||y)?Q:X,he]),_e=ue?q([me,y?ge:J(ge,q(ge,{id:w}),{groupId:fe})],{id:pe}):[me,ge],ve=n(c),ye=le?J(ve,aD(JP(ve)),{groupId:pe}):ve,be=[_e,de.length>0?[K([Q,de]),Q]:v?Q:le?J(X,` `,{groupId:pe}):X,`:`,v||!b?` `:ue?J(se,J(y||le?` `:se,` `),{groupId:pe}):J(se,` `),v?ye:q([K(ye),re&&!le?Z:``]),ae&&!ie?Z:``,ce?sD:``];return te&&!ce?q(K([Z,q(be)])):te||ne?q(K(be)):ie||o&&h?q([K([Z,be]),oe?Z:``]):p===ee?q(be):be}function XP(e,t,n){let{node:r}=e;return[`try `,n(`block`),r.handler?[` `,n(`handler`)]:``,r.finalizer?[` finally `,n(`finalizer`)]:``]}function ZP(e,t,n){let{node:r}=e;if(r.param){let e=W(r.param,e=>!iw(e)||e.leading&&zC(t.originalText,H(e))||e.trailing&&zC(t.originalText,V(e),{backwards:!0})),i=n(`param`);return[`catch `,e?[`(`,K([Z,i]),Z,`) `]:[`(`,i,`) `],n(`body`)]}return[`catch `,n(`body`)]}function QP(e,t,n){let{node:r}=e,i=e.map(n,`declarations`),a=e.key===`init`&&e.parent.type===`ForStatement`||e.key===`left`&&(e.parent.type===`ForInStatement`||e.parent.type===`ForOfStatement`),o=r.declarations.some(e=>e.init),s;return s=i.length===1&&!W(r.declarations[0])?i[0]:K(i[0]),q([LO(e),r.kind,s?[` `,s]:``,K(i.slice(1).map(e=>[`,`,o&&!a?Q:X,e])),a?``:KO(t)])}function $P(e,t,n){let{node:r}=e;return q([r.type===`WithStatement`?`with`:`while`,` (`,UO(e,t,n),`)`,HN(e,t,n)])}function eF(e,t,n,r){let{node:i}=e;if(QS(i))return iP(e,t);switch(i.type){case`JsExpressionRoot`:return n(`node`);case`JsonRoot`:return[DO(e,t),n(`node`),Q];case`File`:return eP(e,t,n)??n(`program`);case`ExpressionStatement`:return ZN(e,t,n);case`ChainExpression`:return n(`expression`);case`ParenthesizedExpression`:return!W(i.expression)&&(ZS(i.expression)||XS(i.expression))?[`(`,n(`expression`),`)`]:q([`(`,K([Z,n(`expression`)]),Z,`)`]);case`AssignmentExpression`:return qM(e,t,n);case`VariableDeclarator`:return JM(e,t,n);case`BinaryExpression`:case`LogicalExpression`:return zj(e,t,n);case`AssignmentPattern`:return[n(`left`),` = `,n(`right`)];case`OptionalMemberExpression`:case`MemberExpression`:return LM(e,t,n);case`MetaProperty`:return[n(`meta`),`.`,n(`property`)];case`BindExpression`:return NM(e,t,n);case`Identifier`:return[i.name,NO(e),PO(e),Lk(e,n)];case`V8IntrinsicIdentifier`:return[`%`,i.name];case`SpreadElement`:return AP(e,n);case`RestElement`:return AP(e,n);case`FunctionDeclaration`:case`FunctionExpression`:return Vk(e,t,n,r);case`ArrowFunctionExpression`:return dM(e,t,n,r);case`YieldExpression`:return[`yield${i.delegate?`*`:``}`,i.argument?[` `,n(`argument`)]:``];case`AwaitExpression`:return uN(e,t,n);case`ExportDefaultDeclaration`:case`ExportNamedDeclaration`:case`ExportAllDeclaration`:return gP(e,t,n);case`ImportDeclaration`:return mP(e,t,n);case`ImportSpecifier`:case`ExportSpecifier`:case`ImportNamespaceSpecifier`:case`ExportNamespaceSpecifier`:case`ImportDefaultSpecifier`:case`ExportDefaultSpecifier`:return OP(e,t,n);case`ImportAttribute`:return kP(e,t,n);case`Program`:case`BlockStatement`:case`StaticBlock`:return mN(e,t,n);case`ClassBody`:return xN(e,t,n);case`ThrowStatement`:return MP(e,t,n);case`ReturnStatement`:return MP(e,t,n);case`NewExpression`:case`ImportExpression`:case`OptionalCallExpression`:case`CallExpression`:return VM(e,t,n);case`ObjectExpression`:case`ObjectPattern`:return fP(e,t,n);case`Property`:return bS(i)?Hk(e,t,n):kP(e,t,n);case`ObjectProperty`:return kP(e,t,n);case`ObjectMethod`:return Hk(e,t,n);case`Decorator`:return[`@`,n(`expression`)];case`ArrayExpression`:case`ArrayPattern`:return tM(e,t,n);case`SequenceExpression`:return PP(e,t,n);case`ThisExpression`:return`this`;case`Super`:return`super`;case`Directive`:return[n(`value`),KO(t)];case`UnaryExpression`:{let e=[i.operator];/[a-z]$/.test(i.operator)&&e.push(` `);let t=n(`argument`);return W(i.argument)?e.push(q([`(`,K([Z,t]),Z,`)`])):e.push(t),e}case`UpdateExpression`:return[i.prefix?i.operator:``,n(`argument`),i.prefix?``:i.operator];case`ConditionalExpression`:return YP(e,t,n,r);case`VariableDeclaration`:return QP(e,t,n);case`IfStatement`:return rP(e,t,n);case`ForStatement`:return QN(e,t,n);case`WithStatement`:case`WhileStatement`:return $P(e,t,n);case`DoWhileStatement`:return GN(e,t,n);case`ForInStatement`:case`ForOfStatement`:return $N(e,t,n);case`DoExpression`:return[i.async?`async `:``,`do `,n(`body`)];case`BreakStatement`:case`ContinueStatement`:return[i.type===`BreakStatement`?`break`:`continue`,i.label?[` `,n(`label`)]:``,KO(t)];case`LabeledStatement`:return[n(`label`),`:${i.body.type===`EmptyStatement`&&!W(i.body,U.Leading)?``:` `}`,n(`body`)];case`TryStatement`:return XP(e,t,n);case`CatchClause`:return ZP(e,t,n);case`SwitchStatement`:return FP(e,t,n);case`SwitchCase`:return IP(e,t,n);case`DebuggerStatement`:return[`debugger`,KO(t)];case`ClassDeclaration`:case`ClassExpression`:return jN(e,t,n);case`ClassMethod`:case`ClassPrivateMethod`:case`MethodDefinition`:return zN(e,t,n);case`ClassProperty`:case`PropertyDefinition`:case`ClassPrivateProperty`:case`ClassAccessorProperty`:case`AccessorProperty`:return BN(e,t,n);case`TemplateElement`:return qE(i.value.raw);case`TemplateLiteral`:return sA(e,t,n);case`TaggedTemplateExpression`:return cA(e,t,n);case`PrivateIdentifier`:return[`#`,i.name];case`PrivateName`:return[`#`,n(`id`)];case`TopicReference`:return`%`;case`ArgumentPlaceholder`:return`?`;case`ModuleExpression`:return[`module `,n(`body`)];case`VoidPattern`:return`void`;case`EmptyStatement`:if(yS(e))return`;`;default:throw new Ij(i,`ESTree`)}}function tF(e){return[e(`elementType`),`[]`]}function nF(e,t,n){let{parent:r,node:i,key:a}=e,o=i.type===`AsConstExpression`?`const`:n(`typeAnnotation`),s=[n(`expression`),` `,HS(i)?`satisfies`:`as`,` `,o];return a===`callee`&&aC(r)||a===`object`&&iC(r)?q([K([Z,...s]),Z]):s}function rF(e,t,n){let{node:r}=e,i=[LO(e),r.async?`async `:``,`component`];r.id&&i.push(` `,n(`id`)),i.push(n(`typeParameters`));let a=JO(e,t,n);return r.rendersType?i.push(q([a,` `,n(`rendersType`)])):i.push(q([a])),r.body&&i.push(` `,n(`body`)),r.type===`DeclareComponent`&&i.push(KO(t)),i}function iF(e,t,n){let{node:r}=e;return r.shorthand?n(`local`):[n(`name`),` as `,n(`local`)]}function aF(e,t,n){let{node:r}=e,i=[];return r.name&&i.push(n(`name`),r.optional?`?: `:`: `),i.push(n(`typeAnnotation`)),i}function oF(e,t,n){let{node:r}=e;return[r.explicitType?`of ${r.explicitType} `:``,fP(e,t,n)]}function sF(e,t,n){let{node:r}=e;return[r.type===`EnumSymbolBody`||r.explicitType?`of ${r.type.slice(4,-4).toLowerCase()} `:``,fP(e,t,n)]}function cF(e,t,n){let{node:r}=e,i=r.type===`TSEnumMember`,a=i?Dk(e,t,n):n(`id`),o=i?`initializer`:`init`;return r[o]?[a,` = `,n(o)]:a}function lF(e,t){let{node:n}=e;return[LO(e),n.const?`const `:``,`enum `,t(`id`),` `,t(`body`)]}function uF(e,t,n){let{node:r}=e,i=[zO(e)];(r.type===`TSConstructorType`||r.type===`TSConstructSignatureDeclaration`)&&i.push(`new `);let a=JO(e,t,n,!1,!0),o=[];return r.type===`FunctionTypeAnnotation`?o.push(dF(e)?` => `:`: `,n(`returnType`)):o.push(Lk(e,n,`returnType`)),ZO(r,o)&&(a=q(a)),i.push(a,o),[q(i),r.type===`TSConstructSignatureDeclaration`||r.type===`TSCallSignatureDeclaration`?CN(e,t):``]}function dF(e){let{node:t,parent:n}=e;return t.type===`FunctionTypeAnnotation`&&(rO(n)||!((n.type===`ObjectTypeProperty`||n.type===`ObjectTypeInternalSlot`)&&!n.variance&&!n.optional&&MS(n,t)||n.type===`ObjectTypeCallProperty`||e.getParentNode(2)?.type===`DeclareFunction`))}function fF(e,t,n){return[LO(e),`hook`,e.node.id?[` `,n(`id`)]:``,KO(t)]}function pF(e){let{node:t}=e;return t.type===`HookTypeAnnotation`&&e.getParentNode(2)?.type===`DeclareHook`}function mF(e,t,n){let{node:r}=e,i=JO(e,t,n,!1,!0),a=[pF(e)?`: `:` => `,n(`returnType`)];return q([pF(e)?``:`hook `,ZO(r,a)?q(i):i,a])}function hF(e,t,n){return[n(`objectType`),NO(e),`[`,n(`indexType`),`]`]}function gF(e,t,n){return[`infer `,n(`typeParameter`)]}function _F(e,t,n){let r=!1;return q(e.map(({isFirst:e,previous:i,node:a,index:o})=>{let s=n();if(e)return s;let c=$S(a),l=$S(i);return l&&c?[` & `,r?K(s):s]:!l&&!c||XT(t.originalText,a)?t.experimentalOperatorPosition===`start`?K([X,`& `,s]):K([` &`,X,s]):(o>1&&(r=!0),[` & `,o>1?K(s):s])},`types`))}function vF(e){switch(e){case null:return``;case`PlusOptional`:return`+?`;case`MinusOptional`:return`-?`;case`Optional`:return`?`}}function yF(e,t,n){let{node:r}=e;return[q([r.variance?n(`variance`):``,q([`[`,K([Z,n(`keyTparam`),` in `,n(`sourceType`)]),Z,`]`]),vF(r.optional),`: `,n(`propType`)]),CN(e,t)]}function bF(e,t){return e===`+`||e===`-`?e+t:t}function xF(e,t,n){let{node:r}=e,i=!1;if(t.objectWrap===`preserve`){let e=ew(t),n=V(r)+1,a=n+e.slice(n).search(/\S/);VC(t.originalText,n,a)&&(i=!0)}let a=[],o=gT(r,U.Dangling);if(o.length>0){let n=B(0,o,-1),r=DO(e,t);a.push(...r.slice(0,-1),q([B(0,r,-1),aw(n)||zC(t.originalText,H(n))?Q:X]))}return q([`{`,K([t.bracketSpacing?X:Z,...a,r.readonly?[bF(r.readonly,`readonly`),` `]:``,q([`[`,K([Z,n(`key`),` in `,n(`constraint`),r.nameType?[` as `,n(`nameType`)]:``]),Z,`]`]),r.optional?bF(r.optional,`?`):``,r.typeAnnotation?`: `:``,n(`typeAnnotation`),t.semi?J(`;`):``]),t.bracketSpacing?X:Z,`}`],{shouldBreak:i})}function SF(e,t,n){let{node:r}=e;return[q([`match (`,K([Z,n(`argument`)]),Z,`)`]),` {`,r.cases.length>0?K([Q,Y(Q,e.map(({node:e,isLast:r})=>[n(),!r&&oO(e,t)?Q:``],`cases`))]):``,Q,`}`]}function CF(e,t,n){let{node:r}=e,i=W(r,U.Dangling)?[` `,DO(e,t)]:[],a=r.type===`MatchStatementCase`?[` `,n(`body`)]:K([X,n(`body`),`,`]);return[n(`pattern`),r.guard?q([K([X,`if (`,n(`guard`),`)`])]):``,q([` =>`,i,a])]}function wF(e,t,n){let{node:r}=e;switch(r.type){case`MatchOrPattern`:return kF(e,t,n);case`MatchAsPattern`:return[n(`pattern`),` as `,n(`target`)];case`MatchWildcardPattern`:return[`_`];case`MatchLiteralPattern`:return n(`literal`);case`MatchUnaryPattern`:return[r.operator,n(`argument`)];case`MatchIdentifierPattern`:return n(`id`);case`MatchMemberPattern`:{let e=r.property.type===`Identifier`?[`.`,n(`property`)]:[`[`,K([Z,n(`property`)]),Z,`]`];return q([n(`base`),e])}case`MatchBindingPattern`:return[r.kind,` `,n(`id`)];case`MatchObjectPattern`:case`MatchInstanceObjectPattern`:return TF(e,t,n);case`MatchInstancePattern`:return q([n(`targetConstructor`),` `,n(`properties`)]);case`MatchArrayPattern`:{let t=e.map(n,`elements`);return r.rest&&t.push(n(`rest`)),q([`[`,K([Z,Y([`,`,X],t)]),r.rest?``:J(`,`),Z,`]`])}case`MatchObjectPatternProperty`:return r.shorthand?n(`pattern`):q([n(`key`),`:`,K([X,n(`pattern`)])]);case`MatchRestPattern`:{let e=[`...`];return r.argument&&e.push(n(`argument`)),e}}}function TF(e,t,n){let{node:r}=e,i=e.map(n,`properties`);return r.rest&&i.push(n(`rest`)),q([`{`,K([Z,Y([`,`,X],i)]),r.rest?``:J(`,`),Z,`}`])}var EF=z([`MatchWildcardPattern`,`MatchLiteralPattern`,`MatchUnaryPattern`,`MatchIdentifierPattern`]);function DF(e){let{patterns:t}=e;if(t.some(e=>W(e)))return!1;let n=t.find(e=>e.type===`MatchObjectPattern`);return n?t.every(e=>e===n||EF(e)):!1}function OF(e){return EF(e)||e.type===`MatchObjectPattern`?!0:e.type===`MatchOrPattern`&&DF(e)}function kF(e,t,n){let{node:r}=e,{parent:i}=e,a=i.type!==`MatchStatementCase`&&i.type!==`MatchExpressionCase`&&i.type!==`MatchArrayPattern`&&i.type!==`MatchObjectPatternProperty`&&!XT(t.originalText,r),o=OF(r),s=e.map(()=>{let r=n();return o||(r=nD(2,r)),jO(e,r,t)},`patterns`);if(o)return Y(` | `,s);let c=[J([`| `]),Y([X,`| `],s)];return fE(e,t)?q([K([J([Z]),c]),Z]):i.type===`MatchArrayPattern`&&i.elements.length>1?q([K([J([`(`,Z]),c]),Z,J(`)`)]):q(a?K(c):c)}function AF(e,t,n){let{node:r}=e,i=[LO(e),`opaque type `,n(`id`),n(`typeParameters`)];if(r.supertype&&i.push(`: `,n(`supertype`)),r.lowerBound||r.upperBound){let e=[];r.lowerBound&&e.push(K([X,`super `,n(`lowerBound`)])),r.upperBound&&e.push(K([X,`extends `,n(`upperBound`)])),i.push(q(e))}return r.impltype&&i.push(` = `,n(`impltype`)),i.push(KO(t)),i}function jF(e,t,n){let{node:r}=e;return[`...`,...r.type===`TupleTypeSpreadElement`&&r.label?[n(`label`),`: `]:[],n(`typeAnnotation`)]}function MF(e,t,n){let{node:r}=e;return[r.variance?n(`variance`):``,n(`label`),r.optional?`?`:``,`: `,n(`elementType`)]}function NF(e,t,n){let{node:r}=e;return[KM(e,t,n,[LO(e),`type `,n(`id`),n(`typeParameters`)],` =`,r.type===`TSTypeAliasDeclaration`?`typeAnnotation`:`right`),KO(t)]}function PF(e,t,n){let{node:r}=e;return hS(r).length===1&&r.type.startsWith(`TS`)&&!r[n][0].constraint&&e.parent.type===`ArrowFunctionExpression`&&!(t.filepath&&/\.ts$/.test(t.filepath))}function FF(e,t,n,r){let{node:i}=e,a=i[r];if(!a)return``;if(!Array.isArray(a))return n(r);let o=bO(e.grandparent),s=e.match(e=>!(e[r].length===1&&$S(e[r][0])),void 0,(e,t)=>t===`typeAnnotation`,e=>e.type===`Identifier`,rN);if(a.length===0||!s&&(o||a.length===1&&(a[0].type===`NullableTypeAnnotation`||Fk(a[0])))&&!a.some(e=>{let n=gT(e,e=>e.leading||e.trailing);return n.length>0&&(n.some(e=>aw(e))||zC(t.originalText,H(B(0,n,-1))))}))return[`<`,Y(`, `,e.map(n,r)),IF(e,t),`>`];let c=i.type===`TSTypeParameterInstantiation`?``:PF(e,t,r)?`,`:GO(t);return q([`<`,K([Z,Y([`,`,X],e.map(n,r))]),c,Z,`>`])}function IF(e,t){let{node:n}=e;if(!W(n,U.Dangling))return``;let r=!W(n,U.Line),i=DO(e,t,{indent:!r});return r?i:[i,Q]}function LF(e,t,n){let{node:r}=e,i=[r.const?`const `:``],a=r.type===`TSTypeParameter`?n(`name`):r.name;if(r.variance&&i.push(n(`variance`)),r.in&&i.push(`in `),r.out&&i.push(`out `),i.push(a),r.bound&&(r.usesExtendsBound&&i.push(` extends `),i.push(Lk(e,n,`bound`))),r.constraint){let e=Symbol(`constraint`);i.push(` extends`,q(K(X),{id:e}),gD,dD(n(`constraint`),{groupId:e}))}if(r.default){let e=Symbol(`default`);i.push(` =`,q(K(X),{id:e}),gD,dD(n(`default`),{groupId:e}))}return q(i)}function RF(e,t){let{node:n}=e;return[n.type===`TSTypePredicate`&&n.asserts?`asserts `:n.type===`TypePredicate`&&n.kind?`${n.kind} `:``,t(`parameterName`),n.typeAnnotation?[` is `,Lk(e,t)]:``]}function zF({node:e},t){return[`typeof `,t(e.type===`TSTypeQuery`?`exprName`:`argument`),t(`typeArguments`)]}function BF(e,t,n,r){let{node:i}=e;if(sO(i))return i.type.slice(0,-14).toLowerCase();switch(i.type){case`ComponentDeclaration`:case`DeclareComponent`:case`ComponentTypeAnnotation`:return rF(e,t,n);case`ComponentParameter`:return iF(e,t,n);case`ComponentTypeParameter`:return aF(e,t,n);case`HookDeclaration`:return Vk(e,t,n);case`DeclareHook`:return fF(e,t,n);case`HookTypeAnnotation`:return mF(e,t,n);case`DeclareFunction`:return[LO(e),`function `,n(`id`),n(`predicate`),KO(t)];case`DeclareModule`:return[`declare module `,n(`id`),` `,n(`body`)];case`DeclareModuleExports`:return[`declare module.exports`,Lk(e,n),KO(t)];case`DeclareNamespace`:return[`declare namespace `,n(`id`),` `,n(`body`)];case`DeclareVariable`:return Array.isArray(i.declarations)?QP(e,t,n):[LO(e),i.kind??`var`,` `,n(`id`),KO(t)];case`DeclareExportDeclaration`:case`DeclareExportAllDeclaration`:return gP(e,t,n);case`DeclareOpaqueType`:case`OpaqueType`:return AF(e,t,n);case`DeclareTypeAlias`:case`TypeAlias`:return NF(e,t,n);case`IntersectionTypeAnnotation`:return _F(e,t,n);case`UnionTypeAnnotation`:return Nk(e,t,n,r);case`ConditionalTypeAnnotation`:return YP(e,t,n);case`InferTypeAnnotation`:return gF(e,t,n);case`FunctionTypeAnnotation`:return uF(e,t,n);case`TupleTypeAnnotation`:return tM(e,t,n);case`TupleTypeLabeledElement`:return MF(e,t,n);case`TupleTypeSpreadElement`:return jF(e,t,n);case`GenericTypeAnnotation`:return[n(`id`),FF(e,t,n,`typeParameters`)];case`IndexedAccessType`:case`OptionalIndexedAccessType`:return hF(e,t,n);case`TypeAnnotation`:return zk(e,t,n);case`TypeParameter`:return LF(e,t,n);case`TypeofTypeAnnotation`:return zF(e,n);case`ExistsTypeAnnotation`:return`*`;case`ArrayTypeAnnotation`:return tF(n);case`DeclareEnum`:case`EnumDeclaration`:return lF(e,n);case`EnumBody`:return oF(e,t,n);case`EnumBooleanBody`:case`EnumNumberBody`:case`EnumBigIntBody`:case`EnumStringBody`:case`EnumSymbolBody`:return sF(e,t,n);case`EnumBooleanMember`:case`EnumNumberMember`:case`EnumBigIntMember`:case`EnumStringMember`:case`EnumDefaultedMember`:return cF(e,t,n);case`FunctionTypeParam`:{let t=i.name?n(`name`):e.parent.this===i?`this`:``;return[t,NO(e),t?`: `:``,n(`typeAnnotation`)]}case`DeclareClass`:case`DeclareInterface`:case`InterfaceDeclaration`:case`InterfaceTypeAnnotation`:case`RecordDeclaration`:return jN(e,t,n);case`ObjectTypeAnnotation`:case`RecordDeclarationBody`:return xN(e,t,n);case`ClassImplements`:case`InterfaceExtends`:return[n(`id`),n(`typeParameters`)];case`RecordDeclarationImplements`:return[n(`id`),n(`typeArguments`)];case`NullableTypeAnnotation`:return[`?`,n(`typeAnnotation`)];case`Variance`:{let{kind:e}=i;return e===`plus`?`+`:e===`minus`?`-`:`${e} `}case`KeyofTypeAnnotation`:return[`keyof `,n(`argument`)];case`ObjectTypeCallProperty`:return[i.static?`static `:``,n(`value`),CN(e,t)];case`ObjectTypeMappedTypeProperty`:return yF(e,t,n);case`ObjectTypeIndexer`:return[i.static?`static `:``,i.variance?n(`variance`):``,`[`,n(`id`),i.id?`: `:``,n(`key`),`]: `,n(`value`),CN(e,t)];case`ObjectTypeProperty`:{let r=``;return i.proto?r=`proto `:i.static&&(r=`static `),[r,i.kind===`init`?``:i.kind+` `,i.variance?n(`variance`):``,Dk(e,t,n),NO(e),bS(i)?``:`: `,n(`value`),CN(e,t)]}case`ObjectTypeInternalSlot`:return[i.static?`static `:``,`[[`,n(`id`),`]]`,NO(e),i.method?``:`: `,n(`value`),CN(e,t)];case`ObjectTypeSpreadProperty`:return AP(e,n);case`QualifiedTypeofIdentifier`:case`QualifiedTypeIdentifier`:return[n(`qualification`),`.`,n(`id`)];case`NullLiteralTypeAnnotation`:return`null`;case`BooleanLiteralTypeAnnotation`:return String(i.value);case`StringLiteralTypeAnnotation`:return qE(mk(FS(i),t));case`NumberLiteralTypeAnnotation`:return ik(FS(i));case`BigIntLiteralTypeAnnotation`:return oP(FS(i));case`TypeCastExpression`:return[`(`,n(`expression`),Lk(e,n),`)`];case`TypePredicate`:return RF(e,n);case`TypeOperator`:return[i.operator,` `,n(`typeAnnotation`)];case`TypeParameterDeclaration`:case`TypeParameterInstantiation`:return FF(e,t,n,`params`);case`InferredPredicate`:case`DeclaredPredicate`:return[e.key===`predicate`&&e.parent.type!==`DeclareFunction`&&!e.parent.returnType?`: `:` `,`%checks`,...i.type===`DeclaredPredicate`?[`(`,n(`value`),`)`]:[]];case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:return nF(e,t,n);case`MatchExpression`:case`MatchStatement`:return SF(e,t,n);case`MatchExpressionCase`:case`MatchStatementCase`:return CF(e,t,n);case`MatchOrPattern`:case`MatchAsPattern`:case`MatchWildcardPattern`:case`MatchLiteralPattern`:case`MatchUnaryPattern`:case`MatchIdentifierPattern`:case`MatchInstancePattern`:case`MatchInstanceObjectPattern`:case`MatchMemberPattern`:case`MatchBindingPattern`:case`MatchObjectPattern`:case`MatchObjectPatternProperty`:case`MatchRestPattern`:case`MatchArrayPattern`:return wF(e,t,n);case`RecordExpression`:return[n(`recordConstructor`),n(`typeArguments`),` `,n(`properties`)];case`RecordExpressionProperties`:return fP(e,t,n);case`RecordDeclarationProperty`:case`RecordDeclarationStaticProperty`:{let r=i.type===`RecordDeclarationStaticProperty`,a=r?`value`:`defaultValue`;return[r?`static `:``,Dk(e,t,n),Lk(e,n),i[a]?[` = `,n(a)]:``]}}}function VF(e,t){let{node:n}=e,r=t.originalText.slice(V(n),H(n));return t.semi&&jS(n)?r+=`;`:qk(e,t)&&(r=`;${r}`),n.type===`ClassExpression`&&cS(n.decorators)?[K([Z,r]),Z]:r}var HF=e=>e===``||e===X||e===Q||e===Z;function UF(e,t,n){let{node:r}=e;if(r.type===`JSXElement`&&sI(r))return[n(`openingElement`),n(`closingElement`)];let i=r.type===`JSXElement`?n(`openingElement`):n(`openingFragment`),a=r.type===`JSXElement`?n(`closingElement`):n(`closingFragment`);if(r.children.length===1&&r.children[0].type===`JSXExpressionContainer`&&(r.children[0].expression.type===`TemplateLiteral`||r.children[0].expression.type===`TaggedTemplateExpression`))return[i,...e.map(n,`children`),a];r.children=r.children.map(e=>cI(e)?{type:`JSXText`,value:` `,raw:` `}:e);let o=r.children.some(tC),s=r.children.filter(e=>e.type===`JSXExpressionContainer`).length>1,c=r.type===`JSXElement`&&r.openingElement.attributes.length>1,l=BE(i)||o||c||s,u=e.parent.rootMarker===`mdx`,d=t.singleQuote?`{' '}`:`{" "}`,f=u?X:J([d,Z],` `),p=WF(e,t,n,f,r.openingElement?.name?.name===`fbt`),m=r.children.some(e=>Mj(e));for(let e=p.length-2;e>=0;e--){let t=p[e]===``&&p[e+1]===``,n=p[e]===Q&&p[e+1]===``&&p[e+2]===Q,r=(p[e]===Z||p[e]===Q)&&p[e+1]===``&&p[e+2]===f,i=p[e]===f&&p[e+1]===``&&(p[e+2]===Z||p[e+2]===Q),a=p[e]===f&&p[e+1]===``&&p[e+2]===f,o=p[e]===Z&&p[e+1]===``&&p[e+2]===Q||p[e]===Q&&p[e+1]===``&&p[e+2]===Z;n&&m||t||r||a||o?p.splice(e,2):i&&p.splice(e+1,2)}for(;p.length>0&&HF(B(0,p,-1));)p.pop();for(;p.length>1&&HF(p[0])&&HF(p[1]);)p.shift(),p.shift();let h=[``];for(let[e,t]of p.entries()){if(t===f){if(e===1&&ZE(p[e-1])){if(p.length===2){h.push([h.pop(),d]);continue}h.push([d,Q],``);continue}if(e===p.length-1){h.push([h.pop(),d]);continue}if(p[e-1]===``&&p[e-2]===Q){h.push([h.pop(),d]);continue}}e%2==0?h.push([h.pop(),t]):h.push(t,``),BE(t)&&(l=!0)}let g=m?lD(h):q(h,{shouldBreak:!0});if(t.cursorNode?.type===`JSXText`&&r.children.includes(t.cursorNode)?g=[cD,g,cD]:t.nodeBeforeCursor?.type===`JSXText`&&r.children.includes(t.nodeBeforeCursor)?g=[cD,g]:t.nodeAfterCursor?.type===`JSXText`&&r.children.includes(t.nodeAfterCursor)&&(g=[g,cD]),u)return g;let _=q([i,K([Q,g]),Q,a]);return l?_:uD([q([i,...p,a]),_])}function WF(e,t,n,r,i){let a=``,o=[a];function s(e){a=e,o.push([o.pop(),e])}function c(e){e!==``&&(a=e,o.push(e,``))}return e.each(({node:e,next:t})=>{if(e.type===`JSXText`){let n=FS(e);if(Mj(e)){let o=jj.split(n,!0);o[0]===``&&(o.shift(),/\n/.test(o[0])?c(KF(i,o[1],e,t)):c(r),o.shift());let l;if(B(0,o,-1)===``&&(o.pop(),l=o.pop()),o.length===0)return;for(let[e,t]of o.entries())e%2==1?c(X):s(t);l===void 0?c(GF(i,a,e,t)):/\n/.test(l)?c(KF(i,a,e,t)):c(r)}else/\n/.test(n)?n.match(/\n/g).length>1&&c(Q):c(r)}else if(s(n()),t&&Mj(t)){let n=jj.trim(FS(t)),[r]=jj.split(n);c(GF(i,r,e,t))}else c(Q)},`children`),o}function GF(e,t,n,r){return e?``:n.type===`JSXElement`&&!n.closingElement||r?.type===`JSXElement`&&!r.closingElement?t.length===1?Z:Q:Z}function KF(e,t,n,r){return e?Q:t.length===1?n.type===`JSXElement`&&!n.closingElement||r?.type===`JSXElement`&&!r.closingElement?Q:Z:Q}var qF=z([`ArrayExpression`,`JSXAttribute`,`JSXElement`,`JSXExpressionContainer`,`JSXFragment`,`ExpressionStatement`,`NewExpression`,`CallExpression`,`OptionalCallExpression`,`ConditionalExpression`,`JsExpressionRoot`,`MatchExpressionCase`]);function JF(e,t,n){let{parent:r}=e;if(qF(r))return t;let i=YF(e),a=fE(e,n);return q([a?``:J(`(`),K([Z,t]),Z,a?``:J(`)`)],{shouldBreak:i})}function YF(e){return e.match(void 0,(e,t)=>t===`body`&&e.type===`ArrowFunctionExpression`,(e,t)=>t===`arguments`&&rC(e))&&(e.match(void 0,void 0,void 0,(e,t)=>t===`expression`&&e.type===`JSXExpressionContainer`)||e.match(void 0,void 0,void 0,(e,t)=>t===`expression`&&e.type===`ChainExpression`,(e,t)=>t===`expression`&&e.type===`JSXExpressionContainer`))}function XF(e,t,n){let{node:r}=e,i=[n(`name`)];if(r.value){let a;if(BS(r.value)){let n=YC(0,YC(0,FS(r.value).slice(1,-1),`&apos;`,`'`),`&quot;`,`"`),i=lk(n,t.jsxSingleQuote);n=i===`"`?YC(0,n,`"`,`&quot;`):YC(0,n,`'`,`&apos;`),a=e.call(()=>jO(e,qE(i+n+i),t),`value`)}else a=n(`value`);i.push(`=`,a)}return i}function ZF(e,t,n){let{node:r}=e,i=(e,t)=>e.type===`JSXEmptyExpression`||!W(e)&&(XS(e)||ZS(e)||e.type===`ArrowFunctionExpression`||e.type===`AwaitExpression`&&(i(e.argument,e)||e.argument.type===`JSXElement`)||rC(eE(e))||e.type===`FunctionExpression`||e.type===`TemplateLiteral`||e.type===`TaggedTemplateExpression`||e.type===`DoExpression`||tC(t)&&(e.type===`ConditionalExpression`||nC(e)));return i(r.expression,e.parent)?q([`{`,n(`expression`),gD,`}`]):q([`{`,K([Z,n(`expression`)]),Z,gD,`}`])}function QF(e,t,n){let{node:r}=e,i=W(r.name)||W(r.typeArguments);if(r.selfClosing&&r.attributes.length===0&&!i)return[`<`,n(`name`),n(`typeArguments`),` />`];if(r.attributes?.length===1&&BS(r.attributes[0].value)&&!r.attributes[0].value.value.includes(`
339
+ `)&&!i&&!W(r.attributes[0]))return q([`<`,n(`name`),n(`typeArguments`),` `,...e.map(n,`attributes`),r.selfClosing?` />`:`>`]);let a=r.attributes?.some(e=>BS(e.value)&&e.value.value.includes(`
340
+ `)),o=t.singleAttributePerLine&&r.attributes.length>1?Q:X;return q([`<`,n(`name`),n(`typeArguments`),K(e.map(({isFirst:e,previous:r})=>[e?o:oO(r,t)?[Q,Q]:o,n()],`attributes`)),...$F(r,t,i)],{shouldBreak:a})}function $F(e,t,n){return e.selfClosing?[X,`/>`]:eI(e,t,n)?[`>`]:[Z,`>`]}function eI(e,t,n){let r=e.attributes.length>0&&W(B(0,e.attributes,-1),U.Trailing);return e.attributes.length===0&&!n||(t.bracketSameLine||t.jsxBracketSameLine)&&(!n||e.attributes.length>0)&&!r}function tI(e,t,n){let{node:r}=e,i=[`</`],a=n(`name`);return W(r.name,U.Leading|U.Line)?i.push(K([Q,a]),Q):W(r.name,U.Leading|U.Block)?i.push(` `,a):i.push(a),i.push(`>`),i}function nI(e,t){let{node:n}=e,r=W(n),i=W(n,U.Line),a=n.type===`JSXOpeningFragment`;return[a?`<`:`</`,K([i?Q:r&&!a?` `:``,DO(e,t)]),i?Q:``,`>`]}function rI(e,t,n){return JF(e,jO(e,UF(e,t,n),t),t)}function iI(e,t){let{node:n}=e,r=W(n,U.Line);return[DO(e,t,{indent:r}),r?Q:``]}function aI(e,t,n){let{node:r}=e;return[`{`,e.call(({node:r})=>{let i=[`...`,n()];return W(r)?[K([Z,jO(e,i,t)]),Z]:i},r.type===`JSXSpreadAttribute`?`argument`:`expression`),`}`]}function oI(e,t,n){let{node:r}=e;if(r.type.startsWith(`JSX`))switch(r.type){case`JSXAttribute`:return XF(e,t,n);case`JSXIdentifier`:return r.name;case`JSXNamespacedName`:return Y(`:`,[n(`namespace`),n(`name`)]);case`JSXMemberExpression`:return Y(`.`,[n(`object`),n(`property`)]);case`JSXSpreadAttribute`:case`JSXSpreadChild`:return aI(e,t,n);case`JSXExpressionContainer`:return ZF(e,t,n);case`JSXFragment`:case`JSXElement`:return rI(e,t,n);case`JSXOpeningElement`:return QF(e,t,n);case`JSXClosingElement`:return tI(e,t,n);case`JSXOpeningFragment`:case`JSXClosingFragment`:return nI(e,t);case`JSXEmptyExpression`:return iI(e,t);case`JSXText`:throw Error(`JSXText should be handled by JSXElement`);default:throw new Ij(r,`JSX`)}}function sI(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type===`JSXText`&&!Mj(t)}function cI(e){return e.type===`JSXExpressionContainer`&&BS(e.expression)&&e.expression.value===` `&&!W(e.expression)}function lI(e,t,n){let{node:r}=e,i=r.parameters.length>1?GO(t):``,a=q([K([Z,Y([`, `,Z],e.map(n,`parameters`))]),i,Z]);return[e.key===`body`&&e.parent.type===`ClassBody`&&r.static?`static `:``,r.readonly?`readonly `:``,`[`,r.parameters?a:``,`]`,Lk(e,n),CN(e,t)]}function uI(e,t,n){let{node:r}=e;return[r.postfix?``:n,Lk(e,t),r.postfix?n:``]}function dI(e,t,n){let{node:r}=e,i=[],a=r.kind&&r.kind!==`method`?`${r.kind} `:``;i.push(BO(r),a,Dk(e,t,n),NO(e));let o=JO(e,t,n,!1,!0),s=Lk(e,n,`returnType`),c=ZO(r,s);return i.push(c?q(o):o),r.returnType&&i.push(q(s)),[q(i),CN(e,t)]}function fI(e,t,n){let{node:r}=e;return[LO(e),r.kind===`global`?``:`${r.kind} `,n(`id`),r.body?[` `,q(n(`body`))]:KO(t)]}function pI(e,t,n){let{node:r}=e,i=!(XS(r.expression)||ZS(r.expression)),a=q([`<`,K([Z,n(`typeAnnotation`)]),Z,`>`]),o=[J(`(`),K([Z,n(`expression`)]),Z,J(`)`)];return i?uD([[a,n(`expression`)],[a,q(o,{shouldBreak:!0})],[a,n(`expression`)]]):q([a,n(`expression`)])}function mI(e,t,n,r){let{node:i}=e;if(i.type.startsWith(`TS`)){if(uO(i))return i.type.slice(2,-7).toLowerCase();switch(i.type){case`TSThisType`:return`this`;case`TSTypeAssertion`:return pI(e,t,n);case`TSDeclareFunction`:return Vk(e,t,n);case`TSExportAssignment`:return[`export = `,n(`expression`),KO(t)];case`TSModuleBlock`:return mN(e,t,n);case`TSInterfaceBody`:case`TSTypeLiteral`:return xN(e,t,n);case`TSTypeAliasDeclaration`:return NF(e,t,n);case`TSQualifiedName`:return[n(`left`),`.`,n(`right`)];case`TSAbstractMethodDefinition`:case`TSDeclareMethod`:return zN(e,t,n);case`TSAbstractAccessorProperty`:case`TSAbstractPropertyDefinition`:return BN(e,t,n);case`TSInterfaceHeritage`:case`TSClassImplements`:case`TSInstantiationExpression`:return[n(`expression`),n(`typeArguments`)];case`TSTemplateLiteralType`:return sA(e,t,n);case`TSNamedTupleMember`:return MF(e,t,n);case`TSRestType`:return jF(e,t,n);case`TSOptionalType`:return[n(`typeAnnotation`),`?`];case`TSInterfaceDeclaration`:return jN(e,t,n);case`TSTypeParameterDeclaration`:case`TSTypeParameterInstantiation`:return FF(e,t,n,`params`);case`TSTypeParameter`:return LF(e,t,n);case`TSAsExpression`:case`TSSatisfiesExpression`:return nF(e,t,n);case`TSArrayType`:return tF(n);case`TSPropertySignature`:return[i.readonly?`readonly `:``,Dk(e,t,n),NO(e),Lk(e,n),CN(e,t)];case`TSParameterProperty`:return[BO(i),i.static?`static `:``,i.override?`override `:``,i.readonly?`readonly `:``,n(`parameter`)];case`TSTypeQuery`:return zF(e,n);case`TSIndexSignature`:return lI(e,t,n);case`TSTypePredicate`:return RF(e,n);case`TSNonNullExpression`:return[n(`expression`),`!`];case`TSImportType`:return[VM(e,t,n),i.qualifier?[`.`,n(`qualifier`)]:``,FF(e,t,n,`typeArguments`)];case`TSLiteralType`:return n(`literal`);case`TSIndexedAccessType`:return hF(e,t,n);case`TSTypeOperator`:return[i.operator,` `,n(`typeAnnotation`)];case`TSMappedType`:return xF(e,t,n);case`TSMethodSignature`:return dI(e,t,n);case`TSNamespaceExportDeclaration`:return[`export as namespace `,n(`id`),KO(t)];case`TSEnumDeclaration`:return lF(e,n);case`TSEnumBody`:return fP(e,t,n);case`TSEnumMember`:return cF(e,t,n);case`TSImportEqualsDeclaration`:return[`import `,bP(i,!1),n(`id`),` = `,n(`moduleReference`),KO(t)];case`TSExternalModuleReference`:return VM(e,t,n);case`TSModuleDeclaration`:return fI(e,t,n);case`TSConditionalType`:return YP(e,t,n);case`TSInferType`:return gF(e,t,n);case`TSIntersectionType`:return _F(e,t,n);case`TSUnionType`:return Nk(e,t,n,r);case`TSFunctionType`:case`TSCallSignatureDeclaration`:case`TSConstructorType`:case`TSConstructSignatureDeclaration`:return uF(e,t,n);case`TSTupleType`:return tM(e,t,n);case`TSTypeReference`:return[n(`typeName`),FF(e,t,n,`typeArguments`)];case`TSTypeAnnotation`:return zk(e,t,n);case`TSEmptyBodyFunctionExpression`:return Uk(e,t,n);case`TSJSDocAllType`:return`*`;case`TSJSDocUnknownType`:return`?`;case`TSJSDocNullableType`:return uI(e,n,`?`);case`TSJSDocNonNullableType`:return uI(e,n,`!`);default:throw new Ij(i,`TypeScript`)}}}function hI(e,t,n,r){for(let i of[Wj,oI,BF,mI,eF]){let a=i(e,t,n,r);if(a!==void 0)return a}}var gI=z([`ClassMethod`,`ClassPrivateMethod`,`ClassProperty`,`ClassAccessorProperty`,`AccessorProperty`,`TSAbstractAccessorProperty`,`PropertyDefinition`,`TSAbstractPropertyDefinition`,`ClassPrivateProperty`,`MethodDefinition`,`TSAbstractMethodDefinition`,`TSDeclareMethod`]);function _I(e,t,n,r){e.isRoot&&t.__onHtmlBindingRoot?.(e.node,t);let{node:i}=e,a=Fj(e)?VF(e,t):hI(e,t,n,r);if(!a)return``;if(gI(i))return a;a=vI(e,t,a);let o=i.type!==`ClassExpression`&&cS(i.decorators)?Zj(e,t,n):``,s=fE(e,t);return!o&&!s?a:XE(a,e=>[s?`(`:``,o?q([o,e]):e,s?`)`:``])}function vI(e,t,n){let{node:r}=e;return(W(r,U.Leading)||W(r,U.Trailing))&&vT(e)?[K([Z,jO(e,n,t)]),Z]:n}var yI={features:{experimental_avoidAstMutation:!0,experimental_locForRangeFormat:{locStart:V,locEnd:SS}},massageAstNode:ij,canAttachComment:_C,handleComments:fT,isGap:mT,willPrintOwnComments:nA,embed:qA,insertPragma:Cj,printComment:Oj,printPrettierIgnored:_I,print:_I,getVisitorKeys:GT,isBlockComment:iw,hasPrettierIgnore:Fj},bI=[{name:`JSON.stringify`,type:`data`,aceMode:`json`,extensions:[`.importmap`],filenames:[`package.json`,`package-lock.json`,`composer.json`],tmScope:`source.json`,aliases:[`geojson`,`jsonl`,`sarif`,`topojson`],codemirrorMode:`javascript`,codemirrorMimeType:`application/json`,parsers:[`json-stringify`],vscodeLanguageIds:[`json`],linguistLanguageId:174},{name:`JSON`,type:`data`,aceMode:`json`,extensions:[`.json`,`.4DForm`,`.4DProject`,`.avsc`,`.geojson`,`.gltf`,`.har`,`.ice`,`.JSON-tmLanguage`,`.json.example`,`.mcmeta`,`.sarif`,`.slnlaunch`,`.tact`,`.tfstate`,`.tfstate.backup`,`.topojson`,`.webapp`,`.webmanifest`,`.yy`,`.yyp`],filenames:[`.all-contributorsrc`,`.arcconfig`,`.auto-changelog`,`.c8rc`,`.htmlhintrc`,`.imgbotconfig`,`.nycrc`,`.tern-config`,`.tern-project`,`.watchmanconfig`,`.babelrc`,`.jscsrc`,`.jshintrc`,`.jslintrc`,`.swcrc`],tmScope:`source.json`,aliases:[`geojson`,`jsonl`,`sarif`,`topojson`],codemirrorMode:`javascript`,codemirrorMimeType:`application/json`,parsers:[`json`],vscodeLanguageIds:[`json`],linguistLanguageId:174},{name:`JSON with Comments`,type:`data`,aceMode:`javascript`,extensions:[`.jsonc`,`.code-snippets`,`.code-workspace`,`.sublime-build`,`.sublime-color-scheme`,`.sublime-commands`,`.sublime-completions`,`.sublime-keymap`,`.sublime-macro`,`.sublime-menu`,`.sublime-mousemap`,`.sublime-project`,`.sublime-settings`,`.sublime-theme`,`.sublime-workspace`,`.sublime_metrics`,`.sublime_session`],filenames:[],tmScope:`source.json.comments`,aliases:[`jsonc`],codemirrorMode:`javascript`,codemirrorMimeType:`text/javascript`,group:`JSON`,parsers:[`jsonc`],vscodeLanguageIds:[`jsonc`],linguistLanguageId:423},{name:`JSON5`,type:`data`,aceMode:`json5`,extensions:[`.json5`],tmScope:`source.js`,codemirrorMode:`javascript`,codemirrorMimeType:`application/json`,parsers:[`json5`],vscodeLanguageIds:[`json5`],linguistLanguageId:175}],xI={};rS(xI,{estree:()=>yI,"estree-json":()=>OI});var SI=WT({JsonRoot:[`node`],ArrayExpression:[`elements`],ObjectExpression:[`properties`],ObjectProperty:[`key`,`value`],UnaryExpression:[`argument`],NullLiteral:[],BooleanLiteral:[],StringLiteral:[],NumericLiteral:[],Identifier:[],TemplateLiteral:[`quasis`],TemplateElement:[]});function CI(e){return e.extra.raw}var wI=new Set([`start`,`end`,`loc`,`comments`,`leadingComments`,`trailingComments`,`innerComments`,`errors`,`range`,`tokens`]);function TI(e,t){let{type:n}=e;if(n===`ObjectProperty`){let{key:n}=e;if(n.type===`Identifier`){let{name:e}=n;t.key={type:`StringLiteral`,value:e,extra:{rawValue:e}}}else if(n.type===`NumericLiteral`){let e=CI(n);String(Number(e))===e&&(t.key={type:`StringLiteral`,value:e,extra:{rawValue:e}})}}if(n===`StringLiteral`&&delete t.extra.raw,n===`UnaryExpression`&&e.operator===`+`)return t.argument;if((n===`ArrayExpression`||n===`ObjectExpression`)&&(t.extra??={},e.extra?.trailingComma&&delete t.extra.trailingComma),n===`ArrayExpression`){for(let[n,r]of e.elements.entries())r===null&&t.elements.splice(n,0,{type:`NullLiteral`});return}if(n===`TemplateLiteral`){let t=e.quasis[0].value.cooked;return{type:`StringLiteral`,value:t,extra:{rawValue:t}}}}TI.ignoredProperties=wI;function EI(e,t,n){let{node:r}=e;switch(r.type){case`JsonRoot`:return[n(`node`),Q];case`ArrayExpression`:{if(r.elements.length===0)return`[]`;let t=e.map(()=>e.node===null?`null`:n(),`elements`);return[`[`,K([Q,Y([`,`,Q],t)]),Q,`]`]}case`ObjectExpression`:return r.properties.length===0?`{}`:[`{`,K([Q,Y([`,`,Q],e.map(n,`properties`))]),Q,`}`];case`ObjectProperty`:return[n(`key`),`: `,n(`value`)];case`UnaryExpression`:return[r.operator===`+`?``:r.operator,n(`argument`)];case`NullLiteral`:return`null`;case`BooleanLiteral`:return r.value?`true`:`false`;case`StringLiteral`:return mk(CI(r),t);case`NumericLiteral`:{let t=CI(r);return DI(e)&&String(Number(t))===t?`"${t}"`:t}case`Identifier`:return DI(e)?JSON.stringify(r.name):r.name;case`TemplateLiteral`:return n([`quasis`,0]);case`TemplateElement`:return JSON.stringify(r.value.cooked);default:throw new Ij(r,`JSON`)}}function DI(e){return e.key===`key`&&e.parent.type===`ObjectProperty`}var OI={massageAstNode:TI,print:EI,getVisitorKeys:SI},kI={bracketSpacing:{category:`Common`,type:`boolean`,default:!0,description:`Print spaces between brackets.`,oppositeDescription:`Do not print spaces between brackets.`},objectWrap:{category:`Common`,type:`choice`,default:`preserve`,description:`How to wrap object literals.`,choices:[{value:`preserve`,description:`Keep as multi-line, if there is a newline between the opening brace and first property.`},{value:`collapse`,description:`Fit to a single line when possible.`}]},singleQuote:{category:`Common`,type:`boolean`,default:!1,description:`Use single quotes instead of double quotes.`},proseWrap:{category:`Common`,type:`choice`,default:`preserve`,description:`How to wrap prose.`,choices:[{value:`always`,description:`Wrap prose if it exceeds the print width.`},{value:`never`,description:`Do not wrap prose.`},{value:`preserve`,description:`Wrap prose as-is.`}]},bracketSameLine:{category:`Common`,type:`boolean`,default:!1,description:`Put > of opening tags on the last line instead of on a new line.`},singleAttributePerLine:{category:`Common`,type:`boolean`,default:!1,description:`Enforce single attribute per line in HTML, Vue and JSX.`}},AI=`JavaScript`,jI={arrowParens:{category:AI,type:`choice`,default:`always`,description:`Include parentheses around a sole arrow function parameter.`,choices:[{value:`always`,description:"Always include parens. Example: `(x) => x`"},{value:`avoid`,description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:kI.bracketSameLine,objectWrap:kI.objectWrap,bracketSpacing:kI.bracketSpacing,jsxBracketSameLine:{category:AI,type:`boolean`,description:`Put > on the last line instead of at a new line.`,deprecated:`2.4.0`},semi:{category:AI,type:`boolean`,default:!0,description:`Print semicolons.`,oppositeDescription:`Do not print semicolons, except at the beginning of lines which may need them.`},experimentalOperatorPosition:{category:AI,type:`choice`,default:`end`,description:`Where to print operators when binary expressions wrap lines.`,choices:[{value:`start`,description:`Print operators at the start of new lines.`},{value:`end`,description:`Print operators at the end of previous lines.`}]},experimentalTernaries:{category:AI,type:`boolean`,default:!1,description:`Use curious ternaries, with the question mark after the condition.`,oppositeDescription:`Default behavior of ternaries; keep question marks on the same line as the consequent.`},singleQuote:kI.singleQuote,jsxSingleQuote:{category:AI,type:`boolean`,default:!1,description:`Use single quotes in JSX.`},quoteProps:{category:AI,type:`choice`,default:`as-needed`,description:`Change when properties in objects are quoted.`,choices:[{value:`as-needed`,description:`Only add quotes around object properties where required.`},{value:`consistent`,description:`If at least one property in an object requires quotes, quote all properties.`},{value:`preserve`,description:`Respect the input use of quotes in object properties.`}]},trailingComma:{category:AI,type:`choice`,default:`all`,description:`Print trailing commas wherever possible when multi-line.`,choices:[{value:`all`,description:`Trailing commas wherever possible (including function arguments).`},{value:`es5`,description:`Trailing commas where valid in ES5 (objects, arrays, etc.)`},{value:`none`,description:`No trailing commas.`}]},singleAttributePerLine:kI.singleAttributePerLine},MI={...oS,...xI},NI=[...aS,...bI],PI=Object.defineProperty,FI=(e,t)=>{for(var n in t)PI(e,n,{get:t[n],enumerable:!0})};FI({},{__debug:()=>kU,check:()=>DU,doc:()=>VH,format:()=>EU,formatWithCursor:()=>TU,getSupportInfo:()=>OU,util:()=>KH,version:()=>GH});var II=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),LI=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},RI=II(`replaceAll`,function(){if(typeof this==`string`)return LI}),zI=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}},BI=new class extends zI{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function VI(e,t,n){return BI.diff(e,t,n)}var HI=()=>{},UI=`cr`,WI=`crlf`,GI=`lf`,KI=`\r`,qI=`\r
341
+ `,JI=`
342
+ `,YI=JI;function XI(e){let t=e.indexOf(KI);return t===-1?GI:e.charAt(t+1)===JI?WI:UI}function ZI(e){return e===UI?KI:e===WI?qI:YI}var QI=new Map([[JI,/\n/g],[KI,/\r/g],[qI,/\r\n/g]]);function $I(e,t){let n=QI.get(t);return e.match(n)?.length??0}var eL=/\r\n?/g;function tL(e){return RI(0,e,eL,JI)}var nL=Symbol.for(`comments`);function rL(e){return this[e<0?this.length+e:e]}var iL=II(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return rL}),aL=`string`,oL=`array`,sL=`cursor`,cL=`indent`,lL=`align`,uL=`trim`,dL=`group`,fL=`fill`,pL=`if-break`,mL=`indent-if-break`,hL=`line-suffix`,gL=`line-suffix-boundary`,_L=`line`,vL=`label`,yL=`break-parent`,bL=new Set([sL,cL,lL,uL,dL,fL,pL,mL,hL,gL,_L,vL,yL]);function xL(e){let t=e.length;for(;t>0&&(e[t-1]===`\r`||e[t-1]===`
343
+ `);)t--;return t<e.length?e.slice(0,t):e}function SL(e,t,n){if(!e.has(t)){let r=n(t);e.set(t,r)}return e.get(t)}function CL(e){if(typeof e==`string`)return aL;if(Array.isArray(e))return oL;if(!e)return;let{type:t}=e;if(bL.has(t))return t}var wL=CL,TL=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function EL(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
344
+ Expected it to be 'string' or 'object'.`;if(wL(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=TL([...bL].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
345
+ Expected it to be ${r}.`}var DL=class extends Error{name=`InvalidDocError`;constructor(e){super(EL(e)),this.doc=e}},OL={};function kL(e,t,n,r){let i=[e];for(;i.length>0;){let e=i.pop();if(e===OL){n(i.pop());continue}n&&i.push(e,OL);let a=wL(e);if(!a)throw new DL(e);if(t?.(e)!==!1)switch(a){case oL:case fL:{let t=a===oL?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case pL:i.push(e.flatContents,e.breakContents);break;case dL:if(r&&e.expandedStates)for(let t=e.expandedStates.length,n=t-1;n>=0;--n)i.push(e.expandedStates[n]);else i.push(e.contents);break;case lL:case cL:case mL:case vL:case hL:i.push(e.contents);break;case aL:case sL:case uL:case gL:case _L:case yL:break;default:throw new DL(e)}}}var AL=kL;function jL(e,t){if(typeof e==`string`)return t(e);let n=new Map;return r(e);function r(e){return SL(n,e,i)}function i(e){switch(wL(e)){case oL:return t(e.map(r));case fL:return t({...e,parts:e.parts.map(r)});case pL:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case dL:{let{expandedStates:n,contents:i}=e;return n?(n=n.map(r),i=n[0]):i=r(i),t({...e,contents:i,expandedStates:n})}case lL:case cL:case mL:case vL:case hL:return t({...e,contents:r(e.contents)});case aL:case sL:case uL:case gL:case _L:case yL:return t(e);default:throw new DL(e)}}}function ML(e,t,n){let r=n,i=!1;function a(e){if(i)return!1;let n=t(e);n!==void 0&&(i=!0,r=n)}return AL(e,a),r}function NL(e){if(e.type===dL&&e.break||e.type===_L&&e.hard||e.type===yL)return!0}function PL(e){return ML(e,NL,!1)}function FL(e){if(e.length>0){let t=iL(0,e,-1);!t.expandedStates&&!t.break&&(t.break=`propagated`)}return null}function IL(e){let t=new Set,n=[];function r(e){if(e.type===yL&&FL(n),e.type===dL){if(n.push(e),t.has(e))return!1;t.add(e)}}function i(e){e.type===dL&&n.pop().break&&FL(n)}AL(e,r,i,!0)}function LL(e){return e.type===_L&&!e.hard?e.soft?``:` `:e.type===pL?e.flatContents:e}function RL(e){return jL(e,LL)}function zL(e){for(e=[...e];e.length>=2&&iL(0,e,-2).type===_L&&iL(0,e,-1).type===yL;)e.length-=2;if(e.length>0){let t=BL(iL(0,e,-1));e[e.length-1]=t}return e}function BL(e){switch(wL(e)){case cL:case mL:case dL:case hL:case vL:{let t=BL(e.contents);return{...e,contents:t}}case pL:return{...e,breakContents:BL(e.breakContents),flatContents:BL(e.flatContents)};case fL:return{...e,parts:zL(e.parts)};case oL:return zL(e);case aL:return xL(e);case lL:case sL:case uL:case gL:case _L:case yL:break;default:throw new DL(e)}return e}function VL(e){return BL(UL(e))}function HL(e){switch(wL(e)){case fL:{let{parts:t}=e;if(t.every(e=>e===``))return``;if(t.length===1)return t[0];break}case dL:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return``;if(e.contents.type===dL&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case lL:case cL:case mL:case hL:if(!e.contents)return``;break;case pL:if(!e.flatContents&&!e.breakContents)return``;break;case oL:{let t=[];for(let n of e){if(!n)continue;let[e,...r]=Array.isArray(n)?n:[n];typeof e==`string`&&typeof iL(0,t,-1)==`string`?t[t.length-1]+=e:t.push(e),t.push(...r)}return t.length===0?``:t.length===1?t[0]:t}case aL:case sL:case uL:case gL:case _L:case vL:case yL:break;default:throw new DL(e)}return e}function UL(e){return jL(e,e=>HL(e))}function WL(e,t=vR){return jL(e,e=>typeof e==`string`?dR(t,e.split(`
346
+ `)):e)}function GL(e){if(e.type===_L)return!0}function KL(e){return ML(e,GL,!1)}function qL(e,t){return e.type===vL?{...e,contents:t(e.contents)}:t(e)}var JL=HI,YL=HI,XL=HI,ZL=HI;function QL(e){return JL(e),{type:cL,contents:e}}function $L(e,t){return ZL(e),JL(t),{type:lL,contents:t,n:e}}function eR(e){return $L(-1/0,e)}function tR(e){return $L({type:`root`},e)}function nR(e){return $L(-1,e)}function rR(e,t,n){JL(e);let r=e;if(t>0){for(let e=0;e<Math.floor(t/n);++e)r=QL(r);r=$L(t%n,r),r=$L(-1/0,r)}return r}var iR={type:yL},aR={type:sL};function oR(e){return XL(e),{type:fL,parts:e}}function sR(e,t={}){return JL(e),YL(t.expandedStates,!0),{type:dL,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function cR(e,t){return sR(e[0],{...t,expandedStates:e})}function lR(e,t=``,n={}){return JL(e),t!==``&&JL(t),{type:pL,breakContents:e,flatContents:t,groupId:n.groupId}}function uR(e,t){return JL(e),{type:mL,contents:e,groupId:t.groupId,negate:t.negate}}function dR(e,t){JL(e),YL(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}function fR(e,t){return JL(t),e?{type:vL,label:e,contents:t}:t}var pR={type:_L},mR={type:_L,soft:!0},hR={type:_L,hard:!0},gR=[hR,iR],_R={type:_L,hard:!0,literal:!0},vR=[_R,iR];function yR(e){return JL(e),{type:hL,contents:e}}var bR={type:gL},xR={type:uL};function SR(e){if(!e)return``;if(Array.isArray(e)){let t=[];for(let n of e)if(Array.isArray(n))t.push(...SR(n));else{let e=SR(n);e!==``&&t.push(e)}return t}return e.type===pL?{...e,breakContents:SR(e.breakContents),flatContents:SR(e.flatContents)}:e.type===dL?{...e,contents:SR(e.contents),expandedStates:e.expandedStates?.map(SR)}:e.type===fL?{type:`fill`,parts:e.parts.map(SR)}:e.contents?{...e,contents:SR(e.contents)}:e}function CR(e){let t=Object.create(null),n=new Set;return r(SR(e));function r(e,t,n){if(typeof e==`string`)return JSON.stringify(e);if(Array.isArray(e)){let t=e.map(r).filter(Boolean);return t.length===1?t[0]:`[${t.join(`, `)}]`}if(e.type===_L){let r=n?.[t+1]?.type===yL;return e.literal?r?`literalline`:`literallineWithoutBreakParent`:e.hard?r?`hardline`:`hardlineWithoutBreakParent`:e.soft?`softline`:`line`}if(e.type===yL)return n?.[t-1]?.type===_L&&n[t-1].hard?void 0:`breakParent`;if(e.type===uL)return`trim`;if(e.type===cL)return`indent(`+r(e.contents)+`)`;if(e.type===lL)return e.n===-1/0?`dedentToRoot(`+r(e.contents)+`)`:e.n<0?`dedent(`+r(e.contents)+`)`:e.n.type===`root`?`markAsRoot(`+r(e.contents)+`)`:`align(`+JSON.stringify(e.n)+`, `+r(e.contents)+`)`;if(e.type===pL)return`ifBreak(`+r(e.breakContents)+(e.flatContents?`, `+r(e.flatContents):``)+(e.groupId?(e.flatContents?``:`, ""`)+`, { groupId: ${i(e.groupId)} }`:``)+`)`;if(e.type===mL){let t=[];e.negate&&t.push(`negate: true`),e.groupId&&t.push(`groupId: ${i(e.groupId)}`);let n=t.length>0?`, { ${t.join(`, `)} }`:``;return`indentIfBreak(${r(e.contents)}${n})`}if(e.type===dL){let t=[];e.break&&e.break!==`propagated`&&t.push(`shouldBreak: true`),e.id&&t.push(`id: ${i(e.id)}`);let n=t.length>0?`, { ${t.join(`, `)} }`:``;return e.expandedStates?`conditionalGroup([${e.expandedStates.map(e=>r(e)).join(`,`)}]${n})`:`group(${r(e.contents)}${n})`}if(e.type===fL)return`fill([${e.parts.map(e=>r(e)).join(`, `)}])`;if(e.type===hL)return`lineSuffix(`+r(e.contents)+`)`;if(e.type===gL)return`lineSuffixBoundary`;if(e.type===vL)return`label(${JSON.stringify(e.label)}, ${r(e.contents)})`;if(e.type===sL)return`cursor`;throw Error(`Unknown doc type `+e.type)}function i(e){if(typeof e!=`symbol`)return JSON.stringify(String(e));if(e in t)return t[e];let r=e.description||`symbol`;for(let i=0;;i++){let a=r+(i>0?` #${i}`:``);if(!n.has(a))return n.add(a),t[e]=`Symbol.for(${JSON.stringify(a)})`}}}var wR=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,TR=12288,ER=65510,DR=[12288,12288,65281,65376,65504,65510],OR=4352,kR=262141,AR=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],jR=(e,t)=>{let n=0,r=Math.floor(e.length/2)-1;for(;n<=r;){let i=Math.floor((n+r)/2),a=i*2;if(t<e[a])r=i-1;else if(t>e[a+1])n=i+1;else return!0}return!1},MR=19968,[NR,PR]=FR(AR);function FR(e){let t=e[0],n=e[1];for(let r=0;r<e.length;r+=2){let i=e[r],a=e[r+1];if(MR>=i&&MR<=a)return[i,a];a-i>n-t&&(t=i,n=a)}return[t,n]}var IR=e=>e<TR||e>ER?!1:jR(DR,e),LR=e=>e>=NR&&e<=PR?!0:e<OR||e>kR?!1:jR(AR,e),RR=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05-\u2B07]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF3\uDFF5\uDFF7]|\uD83D[\uDC3F\uDC41\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])$/,zR=e=>RR.test(e),BR=/[^\x20-\x7F]/;function VR(e){if(!e)return 0;if(!BR.test(e))return e.length;let t=0;e=e.replace(wR(),e=>(t+=zR(e)?1:2,``));for(let n of e){let e=n.codePointAt(0);e<=31||e>=127&&e<=159||e>=768&&e<=879||e>=65024&&e<=65039||(t+=IR(e)||LR(e)?2:1)}return t}var HR=VR,UR={type:0},WR={type:1},GR={value:``,length:0,queue:[],get root(){return GR}};function KR(e,t,n){let r=t.type===1?e.queue.slice(0,-1):[...e.queue,t],i=``,a=0,o=0,s=0;for(let e of r)switch(e.type){case 0:u(),n.useTabs?c(1):l(n.tabWidth);break;case 3:{let{string:t}=e;u(),i+=t,a+=t.length;break}case 2:{let{width:t}=e;o+=1,s+=t;break}default:throw Error(`Unexpected indent comment '${e.type}'.`)}return f(),{...e,value:i,length:a,queue:r};function c(e){i+=` `.repeat(e),a+=n.tabWidth*e}function l(e){i+=` `.repeat(e),a+=e}function u(){n.useTabs?d():f()}function d(){o>0&&c(o),p()}function f(){s>0&&l(s),p()}function p(){o=0,s=0}}function qR(e,t,n){if(!t)return e;if(t.type===`root`)return{...e,root:e};if(t===-1/0)return e.root;let r;return r=typeof t==`number`?t<0?WR:{type:2,width:t}:{type:3,string:t},KR(e,r,n)}function JR(e,t){return KR(e,UR,t)}function YR(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r===` `||r===` `)t++;else break}return t}function XR(e){let t=YR(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}var ZR=class{#e=[];#t=``;#n=0;#r=[];#i=[];#a(){let e=this.#t;e!==``&&(this.#e.push(e),this.#n+=e.length,this.#t=``);for(let e of this.#i)this.#r.push(Math.min(e,this.#n));this.#i.length=0}markPosition(){if(this.#r.length+this.#i.length>=2)throw Error(`There are too many 'cursor' in doc.`);this.#i.push(this.#n+this.#t.length)}write(e){this.#t+=e}trim(){let{text:e,count:t}=XR(this.#t);return this.#t=e,this.#a(),t}finish(){return this.#a(),{text:this.#e.join(``),positions:this.#r}}},QR=Symbol(`MODE_BREAK`),$R=Symbol(`MODE_FLAT`),ez=Symbol(`DOC_FILL_PRINTED_LENGTH`);function tz(e,t,n,r,i,a){if(n===1/0)return!0;let o=t.length,s=!1,c=[e],l=``;for(;n>=0;){if(c.length===0){if(o===0)return!0;c.push(t[--o]);continue}let{mode:e,doc:u}=c.pop(),d=wL(u);switch(d){case aL:u&&(s&&=(l+=` `,--n,!1),l+=u,n-=HR(u));break;case oL:case fL:{let t=d===oL?u:u.parts,n=u[ez]??0;for(let r=t.length-1;r>=n;r--)c.push({mode:e,doc:t[r]});break}case cL:case lL:case mL:case vL:c.push({mode:e,doc:u.contents});break;case uL:{let{text:e,count:t}=XR(l);l=e,n+=t;break}case dL:{if(a&&u.break)return!1;let t=u.break?QR:e,n=u.expandedStates&&t===QR?iL(0,u.expandedStates,-1):u.contents;c.push({mode:t,doc:n});break}case pL:{let t=(u.groupId?i[u.groupId]||$R:e)===QR?u.breakContents:u.flatContents;t&&c.push({mode:e,doc:t});break}case _L:if(e===QR||u.hard)return!0;u.soft||(s=!0);break;case hL:r=!0;break;case gL:if(r)return!1}}return!1}function nz(e,t){let n=Object.create(null),r=t.printWidth,i=ZI(t.endOfLine),a=0,o=[{indent:GR,mode:QR,doc:e}],s=!1,c=[],l=new ZR;for(IL(e);o.length>0;){let{indent:e,mode:u,doc:d}=o.pop();switch(wL(d)){case aL:{let e=i===`
347
+ `?d:RI(0,d,`
348
+ `,i);e&&(l.write(e),o.length>0&&(a+=HR(e)));break}case oL:for(let t=d.length-1;t>=0;t--)o.push({indent:e,mode:u,doc:d[t]});break;case sL:l.markPosition();break;case cL:o.push({indent:JR(e,t),mode:u,doc:d.contents});break;case lL:o.push({indent:qR(e,d.n,t),mode:u,doc:d.contents});break;case uL:a-=l.trim();break;case dL:{let t=(function(){if(u===$R&&!s)return{indent:e,mode:d.break?QR:$R,doc:d.contents};s=!1;let t=r-a,i=c.length>0,l={indent:e,mode:$R,doc:d.contents};if(!d.break&&tz(l,o,t,i,n))return l;if(!d.expandedStates)return{indent:e,mode:QR,doc:d.contents};if(!d.break)for(let r=1;r<d.expandedStates.length-1;r++){let a={indent:e,mode:$R,doc:d.expandedStates[r]};if(tz(a,o,t,i,n))return a}return{indent:e,mode:QR,doc:iL(0,d.expandedStates,-1)}})();o.push(t),d.id&&(n[d.id]=t.mode);break}case fL:{let t=r-a,i=d[ez]??0,{parts:s}=d,l=s.length-i;if(l===0)break;let f=s[i+0],p=s[i+1],m={indent:e,mode:$R,doc:f},h={indent:e,mode:QR,doc:f},g=tz(m,[],t,c.length>0,n,!0);if(l===1){g?o.push(m):o.push(h);break}let _={indent:e,mode:$R,doc:p},v={indent:e,mode:QR,doc:p};if(l===2){g?o.push(_,m):o.push(v,h);break}let y=s[i+2],b={indent:e,mode:u,doc:{...d,[ez]:i+2}},x=tz({indent:e,mode:$R,doc:[f,p,y]},[],t,c.length>0,n,!0);o.push(b),x?o.push(_,m):g?o.push(v,m):o.push(v,h);break}case pL:case mL:{let t=d.groupId?n[d.groupId]:u;if(t===QR){let t=d.type===pL?d.breakContents:d.negate?d.contents:QL(d.contents);t&&o.push({indent:e,mode:u,doc:t})}if(t===$R){let t=d.type===pL?d.flatContents:d.negate?QL(d.contents):d.contents;t&&o.push({indent:e,mode:u,doc:t})}break}case hL:c.push({indent:e,mode:u,doc:d.contents});break;case gL:c.length>0&&o.push({indent:e,mode:u,doc:hR});break;case _L:switch(u){case $R:if(!d.hard){d.soft||(l.write(` `),a+=1);break}s=!0;case QR:if(c.length>0){o.push({indent:e,mode:u,doc:d},...c.reverse()),c.length=0;break}d.literal?(l.write(i),a=0,e.root&&(e.root.value&&l.write(e.root.value),a=e.root.length)):(l.trim(),l.write(i+e.value),a=e.length)}break;case vL:o.push({indent:e,mode:u,doc:d.contents});break;case yL:break;default:throw new DL(d)}o.length===0&&c.length>0&&(o.push(...c.reverse()),c.length=0)}let{text:u,positions:d}=l.finish();if(d.length!==2)return{formatted:u};let[f,p]=d;return{formatted:u,cursorNodeStart:f,cursorNodeText:u.slice(f,p)}}function rz(e,t,n=0){let r=0;for(let i=n;i<e.length;++i)e[i]===` `?r=r+t-r%t:r++;return r}var iz=rz,az=class{constructor(e){this.stack=[e]}get key(){let{stack:e,siblings:t}=this;return iL(0,e,t===null?-2:-4)??null}get index(){return this.siblings===null?null:iL(0,this.stack,-2)}get node(){return iL(0,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:e}=this,t=iL(0,e,-3);return Array.isArray(t)?t:null}get next(){let{siblings:e}=this;return e===null?null:e[this.index+1]}get previous(){let{siblings:e}=this;return e===null?null:e[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:e,index:t}=this;return e!==null&&t===e.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...this.#t()]}getName(){let{stack:e}=this,{length:t}=e;return t>1?iL(0,e,-2):null}getValue(){return iL(0,this.stack,-1)}getNode(e=0){let t=this.#e(e);return t===-1?null:this.stack[t]}getParentNode(e=0){return this.getNode(e+1)}#e(e){let{stack:t}=this;for(let n=t.length-1;n>=0;n-=2)if(!Array.isArray(t[n])&&--e<0)return n;return-1}call(e,...t){let{stack:n}=this,{length:r}=n,i=iL(0,n,-1);for(let e of t)i=i?.[e],n.push(e,i);try{return e(this)}finally{n.length=r}}callParent(e,t=0){let n=this.#e(t+1),r=this.stack.splice(n+1);try{return e(this)}finally{this.stack.push(...r)}}each(e,...t){let{stack:n}=this,{length:r}=n,i=iL(0,n,-1);for(let e of t)i=i[e],n.push(e,i);try{for(let t=0;t<i.length;++t)n.push(t,i[t]),e(this,t,i),n.length-=2}finally{n.length=r}}map(e,...t){let n=[];return this.each((t,r,i)=>{n[r]=e(t,r,i)},...t),n}match(...e){let t=this.stack.length-1,n=null,r=this.stack[t--];for(let i of e){if(r===void 0)return!1;let e=null;if(typeof n==`number`&&(e=n,n=this.stack[t--],r=this.stack[t--]),i&&!i(r,n,e))return!1;n=this.stack[t--],r=this.stack[t--]}return!0}findAncestor(e){for(let t of this.#t())if(e(t))return t}hasAncestor(e){for(let t of this.#t())if(e(t))return!0;return!1}*#t(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let n=e[t];Array.isArray(n)||(yield n)}}};function oz(e){return Array.isArray(e)&&e.length>0}var sz=oz;function cz(e){return typeof e==`object`&&!!e}var lz=cz;function uz(e){return(t,n,r)=>{if(n===!1)return!1;let i=!!r?.backwards,{length:a}=t,o=n;for(;o>=0&&o<a;){let n=t.charAt(o);if(e instanceof RegExp){if(!e.test(n))return o}else if(!e.includes(n))return o;i?o--:o++}return o===-1||o===a?o:!1}}var dz=uz(/\s/),fz=uz(` `),pz=uz(`,; `),mz=uz(/[^\n\r]/),hz=e=>e===`
349
+ `||e===`\r`||e===`\u2028`||e===`\u2029`;function gz(e,t,n){if(t===!1)return!1;let r=!!n?.backwards,i=e.charAt(t);if(r){if(e.charAt(t-1)===`\r`&&i===`
350
+ `)return t-2;if(hz(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===`
351
+ `)return t+2;if(hz(i))return t+1}return t}var _z=gz;function vz(e,t,n={}){let r=fz(e,n.backwards?t-1:t,n);return r!==_z(e,r,n)}var yz=vz;function*bz(e,t){let{getVisitorKeys:n,filter:r=()=>!0}=t,i=e=>lz(e)&&r(e);for(let t of n(e)){let n=e[t];if(Array.isArray(n))for(let e of n)i(e)&&(yield e);else i(n)&&(yield n)}}function*xz(e,t){let n=[e];for(let e=0;e<n.length;e++){let r=n[e];for(let e of bz(r,t))yield e,n.push(e)}}function Sz(e,t){return bz(e,t).next().done}function Cz(e,t,n){let{filter:r}=n;if(!r)return[];let i,a=(n.getChildren?.(e,n)??[...bz(e,{getVisitorKeys:n.getVisitorKeys})]).flatMap(a=>(i??=[e,...t],r(a,i)?[a]:wz(a,i,n))),{locStart:o,locEnd:s}=n;return a.sort((e,t)=>o(e)-o(t)||s(e)-s(t)),a}function wz(e,t,n){return SL(n.cache,e,e=>Cz(e,t,n))}var Tz=wz;function Ez(e){let t=e.type||e.kind||`(unknown type)`,n=String(e.name||e.id&&(typeof e.id==`object`?e.id.name:e.id)||e.key&&(typeof e.key==`object`?e.key.name:e.key)||e.value&&(typeof e.value==`object`?``:String(e.value))||e.operator||``);return n.length>20&&(n=n.slice(0,19)+`…`),t+(n?` `+n:``)}function Dz(e,t){(e.comments??=[]).push(t),t.printed=!1,t.nodeDescription=Ez(e)}function Oz(e,t){t.leading=!0,t.trailing=!1,Dz(e,t)}function kz(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),Dz(e,t)}function Az(e,t){t.leading=!1,t.trailing=!0,Dz(e,t)}var jz=new WeakMap;function Mz(e,t,n,r,i=[]){let{locStart:a,locEnd:o}=n,s=a(t),c=o(t),l=Tz(e,i,{cache:jz,locStart:a,locEnd:o,getVisitorKeys:n.getVisitorKeys,filter:n.printer.canAttachComment,getChildren:n.printer.getCommentChildNodes}),u,d,f=0,p=l.length;for(;f<p;){let e=f+p>>1,r=l[e],m=a(r),h=o(r);if(m<=s&&c<=h)return Mz(r,t,n,r,[r,...i]);if(h<=s){u=r,f=e+1;continue}if(c<=m){d=r,p=e;continue}throw Error(`Comment location overlaps with node location`)}if(r?.type===`TemplateLiteral`){let{quasis:e}=r,i=zz(e,t,n);u&&zz(e,u,n)!==i&&(u=null),d&&zz(e,d,n)!==i&&(d=null)}return{enclosingNode:r,precedingNode:u,followingNode:d}}var Nz=()=>!1;function Pz(e,t){let{comments:n}=e;if(delete e.comments,!sz(n)||!t.printer.canAttachComment)return;let r=[],{printer:{features:{experimental_avoidAstMutation:i},handleComments:a={}},originalText:o}=t,{ownLine:s=Nz,endOfLine:c=Nz,remaining:l=Nz}=a,u=n.map((r,i)=>({...Mz(e,r,t),comment:r,text:o,options:t,ast:e,isLastComment:n.length-1===i,placement:void 0})),d=!i;for(let[e,t]of u.entries()){let{comment:n,precedingNode:a,enclosingNode:o,followingNode:f,text:p,options:m,ast:h,isLastComment:g}=t,_=Iz(p,m,u,e)?`ownLine`:Lz(p,m,u,e)?`endOfLine`:`remaining`,v;if(i?(t.placement=_,v=[t]):v=[n,p,m,h,g],d&&(n.enclosingNode=o,n.precedingNode=a,n.followingNode=f),n.placement=_,_===`ownLine`)s(...v)||(f?Oz(f,n):a?Az(a,n):kz(o||h,n));else if(_===`endOfLine`)c(...v)||(a?Az(a,n):f?Oz(f,n):kz(o||h,n));else if(!l(...v)){if(a&&f){let e=r.length;e>0&&r[e-1].followingNode!==f&&Rz(r,m),r.push(t)}else a?Az(a,n):f?Oz(f,n):kz(o||h,n)}}if(Rz(r,t),d)for(let e of n)delete e.precedingNode,delete e.enclosingNode,delete e.followingNode}var Fz=e=>!/[\S\n\u2028\u2029]/.test(e);function Iz(e,t,n,r){let{comment:i,precedingNode:a}=n[r],{locStart:o,locEnd:s}=t,c=o(i);if(a)for(let t=r-1;t>=0;t--){let{comment:r,precedingNode:i}=n[t];if(i!==a||!Fz(e.slice(s(r),c)))break;c=o(r)}return yz(e,c,{backwards:!0})}function Lz(e,t,n,r){let{comment:i,followingNode:a}=n[r],{locStart:o,locEnd:s}=t,c=s(i);if(a)for(let t=r+1;t<n.length;t++){let{comment:r,followingNode:i}=n[t];if(i!==a||!Fz(e.slice(c,o(r))))break;c=s(r)}return yz(e,c)}function Rz(e,t){let n=e.length;if(n===0)return;let{precedingNode:r,followingNode:i}=e[0],a=t.locStart(i),o;for(o=n;o>0;--o){let{comment:n,precedingNode:r,followingNode:i}=e[o-1],s=t.originalText.slice(t.locEnd(n),a);if(t.printer.isGap?.(s,t)??/^[\s(]*$/.test(s))a=t.locStart(n);else break}for(let[t,{comment:n}]of e.entries())t<o?Az(r,n):Oz(i,n);for(let e of[r,i])e.comments&&e.comments.length>1&&e.comments.sort((e,n)=>t.locStart(e)-t.locStart(n));e.length=0}function zz(e,t,n){let r=n.locStart(t)-1;for(let t=1;t<e.length;++t)if(r<n.locStart(e[t]))return t-1;return 0}function Bz(e,t){let n=t-1;n=fz(e,n,{backwards:!0}),n=_z(e,n,{backwards:!0}),n=fz(e,n,{backwards:!0});let r=_z(e,n,{backwards:!0});return n!==r}var Vz=Bz,Hz=()=>!0;function Uz(e,t){let n=e.node;return n.printed=!0,t.printer.printComment(e,t)}function Wz(e,t){let n=e.node,r=[Uz(e,t)],{printer:i,originalText:a,locStart:o,locEnd:s}=t;if(i.isBlockComment?.(n)){let e=` `;yz(a,s(n))&&(e=yz(a,o(n),{backwards:!0})?gR:pR),r.push(e)}else r.push(gR);let c=_z(a,fz(a,s(n)));return c!==!1&&yz(a,c)&&r.push(gR),r}function Gz(e,t,n){let r=e.node,i=Uz(e,t),{printer:a,originalText:o,locStart:s}=t,c=a.isBlockComment?.(r);return n?.hasLineSuffix&&!n?.isBlock||yz(o,s(r),{backwards:!0})?{doc:yR([gR,Vz(o,s(r))?gR:``,i]),isBlock:c,hasLineSuffix:!0}:!c||n?.hasLineSuffix?{doc:[yR([` `,i]),iR],isBlock:c,hasLineSuffix:!0}:{doc:[` `,i],isBlock:c,hasLineSuffix:!1}}function Kz(e,t,n){let r=t[Symbol.for(`printedComments`)],i=n?.filter??Hz,a=new Set(e.node?.comments?.filter(e=>!r?.has(e)&&e.leading&&i(e)));return a.size===0?``:e.map(({node:n})=>a.has(n)?Wz(e,t):``,`comments`).filter(Boolean)}function qz(e,t,n){let r=e.node?.comments,i=new Set(r?.filter(e=>e.trailing)),a=t[Symbol.for(`printedComments`)],o=n?.filter??Hz,s=new Set(r?.filter(e=>i.has(e)&&!a?.has(e)&&o(e)));if(s.size===0)return``;let c=[],l;return e.each(({node:n})=>{i.has(n)&&(l=Gz(e,t,l),s.has(n)&&c.push(l.doc))},`comments`),c}function Jz(e,t,n,r){let i=Kz(e,n,r),a=qz(e,n,r);return i||a?qL(t,e=>[i,e,a]):t}function Yz(e){let{[nL]:t,[Symbol.for(`printedComments`)]:n}=e;for(let e of t){if(!e.printed&&!n.has(e))throw Error(`Comment "`+e.value.trim()+`" was not printed. Please report this error!`);delete e.printed}}var Xz=()=>HI,Zz=class extends Error{name=`ConfigError`},Qz=class extends Error{name=`UndefinedParserError`},$z=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),eB={checkIgnorePragma:{category:`Special`,type:`boolean`,default:!1,description:`Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.`,cliCategory:`Other`},cursorOffset:{category:`Special`,type:`int`,default:-1,range:{start:-1,end:1/0,step:1},description:`Print (to stderr) where a cursor at the given position would move to after formatting.`,cliCategory:`Editor`},endOfLine:{category:`Global`,type:`choice`,default:`lf`,description:`Which end of line characters to apply.`,choices:[{value:`lf`,description:`Line Feed only (\\n), common on Linux and macOS as well as inside git repos`},{value:`crlf`,description:`Carriage Return + Line Feed characters (\\r\\n), common on Windows`},{value:`cr`,description:`Carriage Return character only (\\r), used very rarely`},{value:`auto`,description:`Maintain existing
352
+ (mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:`Special`,type:`path`,description:`Specify the input filepath. This will be used to do parser inference.`,cliName:`stdin-filepath`,cliCategory:`Other`,cliDescription:`Path to the file to pretend that stdin comes from.`},insertPragma:{category:`Special`,type:`boolean`,default:!1,description:`Insert @format pragma into file's first docblock comment.`,cliCategory:`Other`},parser:{category:`Global`,type:`choice`,default:void 0,description:`Which parser to use.`,exception:e=>typeof e==`string`||typeof e==`function`,choices:[{value:`flow`,description:`Flow`},{value:`babel`,description:`JavaScript`},{value:`babel-flow`,description:`Flow`},{value:`babel-ts`,description:`TypeScript`},{value:`typescript`,description:`TypeScript`},{value:`acorn`,description:`JavaScript`},{value:`espree`,description:`JavaScript`},{value:`meriyah`,description:`JavaScript`},{value:`css`,description:`CSS`},{value:`less`,description:`Less`},{value:`scss`,description:`SCSS`},{value:`json`,description:`JSON`},{value:`json5`,description:`JSON5`},{value:`jsonc`,description:`JSON with Comments`},{value:`json-stringify`,description:`JSON.stringify`},{value:`graphql`,description:`GraphQL`},{value:`markdown`,description:`Markdown`},{value:`mdx`,description:`MDX`},{value:`vue`,description:`Vue`},{value:`yaml`,description:`YAML`},{value:`glimmer`,description:`Ember / Handlebars`},{value:`html`,description:`HTML`},{value:`angular`,description:`Angular`},{value:`lwc`,description:`Lightning Web Components`},{value:`mjml`,description:`MJML`}]},plugins:{type:`path`,array:!0,default:[{value:[]}],category:`Global`,description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e==`string`||typeof e==`object`,cliName:`plugin`,cliCategory:`Config`},printWidth:{category:`Global`,type:`int`,default:80,description:`The line length where Prettier will try wrap.`,range:{start:0,end:1/0,step:1}},rangeEnd:{category:`Special`,type:`int`,default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive).
353
+ The range will extend forwards to the end of the selected statement.`,cliCategory:`Editor`},rangeStart:{category:`Special`,type:`int`,default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset.
354
+ The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:`Editor`},requirePragma:{category:`Special`,type:`boolean`,default:!1,description:`Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.`,cliCategory:`Other`},tabWidth:{type:`int`,category:`Global`,default:2,description:`Number of spaces per indentation level.`,range:{start:0,end:1/0,step:1}},useTabs:{category:`Global`,type:`boolean`,default:!1,description:`Indent with tabs instead of spaces.`},embeddedLanguageFormatting:{category:`Global`,type:`choice`,default:`auto`,description:`Control how Prettier formats quoted code embedded in the file.`,choices:[{value:`auto`,description:`Format embedded code if Prettier can automatically identify it.`},{value:`off`,description:`Never automatically format embedded code.`}]}};function tB({plugins:e=[],showDeprecated:t=!1}={}){let n=e.flatMap(e=>e.languages??[]),r=[];for(let i of rB(Object.assign({},...e.map(({options:e})=>e),eB)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter(e=>!e.deprecated)),i.name===`parser`&&(i.choices=[...i.choices,...nB(i.choices,n,e)])),i.pluginDefaults=Object.fromEntries(e.filter(e=>e.defaultOptions?.[i.name]!==void 0).map(e=>[e.name,e.defaultOptions[i.name]])),r.push(i));return{languages:n,options:r}}function*nB(e,t,n){let r=new Set(e.map(e=>e.value));for(let e of t)if(e.parsers){for(let t of e.parsers)if(!r.has(t)){r.add(t);let i=n.find(e=>e.parsers&&$z(e.parsers,t)),a=e.name;i?.name&&(a+=` (plugin: ${i.name})`),yield{value:t,description:a}}}}function rB(e){let t=[];for(let[n,r]of Object.entries(e)){let e={name:n,...r};Array.isArray(e.default)&&(e.default=iL(0,e.default,-1).value),t.push(e)}return t}var iB=Array.prototype.toReversed??function(){return[...this].reverse()},aB=II(`toReversed`,function(){if(Array.isArray(this))return iB});function oB(){let e=globalThis,t=e.process?.platform;if(typeof t==`string`)return t.startsWith(`win`);let n=e.Deno?.build?.os;return typeof n==`string`?n===`windows`:e.navigator?.platform?.startsWith(`Win`)??!1}var sB=oB();function cB(e){if(e=e instanceof URL?e:new URL(e),e.protocol!==`file:`)throw TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function lB(e){return e=cB(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,`%25`))}function uB(e){e=cB(e);let t=decodeURIComponent(e.pathname.replace(/\//g,`\\`).replace(/%(?![0-9A-Fa-f]{2})/g,`%25`)).replace(/^\\*([A-Za-z]:)(\\|$)/,`$1\\`);return e.hostname!==``&&(t=`\\\\${e.hostname}${t}`),t}function dB(e){return sB?uB(e):lB(e)}var fB=e=>String(e).split(/[/\\]/).pop(),pB=e=>String(e).startsWith(`file:`);function mB(e,t){if(!t)return;let n=fB(t).toLowerCase();return e.find(({filenames:e})=>e?.some(e=>e.toLowerCase()===n))??e.find(({extensions:e})=>e?.some(e=>n.endsWith(e)))}function hB(e,t){if(t)return e.find(({name:e})=>e.toLowerCase()===t)??e.find(({aliases:e})=>e?.includes(t))??e.find(({extensions:e})=>e?.includes(`.${t}`))}var gB=void 0;function _B(e,t){if(t){if(pB(t))try{t=dB(t)}catch{return}if(typeof t==`string`)return e.find(({isSupported:e})=>e?.({filepath:t}))}}function vB(e,t){let n=aB(0,e.plugins).flatMap(e=>e.languages??[]);return(hB(n,t.language)??mB(n,t.physicalFile)??mB(n,t.file)??_B(n,t.physicalFile)??_B(n,t.file)??gB?.(n,t.physicalFile))?.parsers[0]}var yB=vB,bB={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(typeof e!=`object`||!e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(e=>bB.value(e)).join(`, `)}]`;let t=Object.keys(e);return t.length===0?`{}`:`{ ${t.map(t=>`${bB.key(t)}: ${bB.value(e[t])}`).join(`, `)} }`},pair:({key:e,value:t})=>bB.value({[e]:t})},xB=new Proxy(String,{get:()=>xB}),SB=xB,CB=(e,t,{descriptor:n})=>{let r=[`${SB.yellow(typeof e==`string`?n.key(e):n.pair(e))} is deprecated`];return t&&r.push(`we now treat it as ${SB.blue(typeof t==`string`?n.key(t):n.pair(t))}`),r.join(`; `)+`.`},wB=Symbol.for(`vnopts.VALUE_NOT_EXIST`),TB=Symbol.for(`vnopts.VALUE_UNCHANGED`),EB=` `.repeat(2),DB=(e,t,n)=>{let{text:r,list:i}=n.normalizeExpectedResult(n.schemas[e].expected(n)),a=[];return r&&a.push(OB(e,t,r,n.descriptor)),i&&a.push([OB(e,t,i.title,n.descriptor)].concat(i.values.map(e=>kB(e,n.loggerPrintWidth))).join(`
355
+ `)),AB(a,n.loggerPrintWidth)};function OB(e,t,n,r){return[`Invalid ${SB.red(r.key(e))} value.`,`Expected ${SB.blue(n)},`,`but received ${t===wB?SB.gray(`nothing`):SB.red(r.value(t))}.`].join(` `)}function kB({text:e,list:t},n){let r=[];return e&&r.push(`- ${SB.blue(e)}`),t&&r.push([`- ${SB.blue(t.title)}:`].concat(t.values.map(e=>kB(e,n-EB.length).replace(/^|\n/g,`$&${EB}`))).join(`
356
+ `)),AB(r,n)}function AB(e,t){if(e.length===1)return e[0];let[n,r]=e,[i,a]=e.map(e=>e.split(`
357
+ `,1)[0].length);return i>t&&i>a?r:n}var jB=[],MB=[];function NB(e,t,n){if(e===t)return 0;let r=n?.maxDistance,i=e;e.length>t.length&&(e=t,t=i);let a=e.length,o=t.length;for(;a>0&&e.charCodeAt(~-a)===t.charCodeAt(~-o);)a--,o--;let s=0;for(;s<a&&e.charCodeAt(s)===t.charCodeAt(s);)s++;if(a-=s,o-=s,r!==void 0&&o-a>r)return r;if(a===0)return r!==void 0&&o>r?r:o;let c,l,u,d,f=0,p=0;for(;f<a;)MB[f]=e.charCodeAt(s+f),jB[f]=++f;for(;p<o;){for(c=t.charCodeAt(s+p),u=p++,l=p,f=0;f<a;f++)d=c===MB[f]?u:u+1,u=jB[f],l=jB[f]=u>l?d>l?l+1:d:d>u?u+1:d;if(r!==void 0){let e=l;for(f=0;f<a;f++)jB[f]<e&&(e=jB[f]);if(e>r)return r}}return jB.length=a,MB.length=a,r!==void 0&&l>r?r:l}function PB(e,t,n){if(!Array.isArray(t)||t.length===0)return;let r=n?.maxDistance,i=e.length;for(let n of t)if(n===e)return n;if(r===0)return;let a,o=1/0,s=new Set;for(let n of t){if(s.has(n))continue;s.add(n);let t=Math.abs(n.length-i);if(t>=o||r!==void 0&&t>r)continue;let c=Number.isFinite(o)?r===void 0?o:Math.min(o,r):r,l=c===void 0?NB(e,n):NB(e,n,{maxDistance:c});if(r!==void 0&&l>r)continue;let u=l;if(c!==void 0&&l===c&&c===r&&(u=NB(e,n)),u<o&&(o=u,a=n,o===0))break}if(!(r!==void 0&&o>r))return a}var FB=(e,t,{descriptor:n,logger:r,schemas:i})=>{let a=[`Ignored unknown option ${SB.yellow(n.pair({key:e,value:t}))}.`],o=PB(e,Object.keys(i),{maxDistance:3});o&&a.push(`Did you mean ${SB.blue(n.key(o))}?`),r.warn(a.join(` `))},IB=[`default`,`expected`,`validate`,`deprecated`,`forward`,`redirect`,`overlap`,`preprocess`,`postprocess`];function LB(e,t){let n=new e(t),r=Object.create(n);for(let e of IB)e in t&&(r[e]=zB(t[e],n,RB.prototype[e].length));return r}var RB=class{static create(e){return LB(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return`nothing`}validate(e,t){return!1}deprecated(e,t){return!1}forward(e,t){}redirect(e,t){}overlap(e,t,n){return e}preprocess(e,t){return e}postprocess(e,t){return TB}};function zB(e,t,n){return typeof e==`function`?(...r)=>e(...r.slice(0,n-1),t,...r.slice(n-1)):()=>e}var BB=class extends RB{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,t){return t.schemas[this._sourceName].validate(e,t)}redirect(e,t){return this._sourceName}},VB=class extends RB{expected(){return`anything`}validate(){return!0}},HB=class extends RB{constructor({valueSchema:e,name:t=e.name,...n}){super({...n,name:t}),this._valueSchema=e}expected(e){let{text:t,list:n}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:t&&`an array of ${t}`,list:n&&{title:`an array of the following values`,values:[{list:n}]}}}validate(e,t){if(!Array.isArray(e))return!1;let n=[];for(let r of e){let e=t.normalizeValidateResult(this._valueSchema.validate(r,t),r);e!==!0&&n.push(e.value)}return n.length===0||{value:n}}deprecated(e,t){let n=[];for(let r of e){let e=t.normalizeDeprecatedResult(this._valueSchema.deprecated(r,t),r);e!==!1&&n.push(...e.map(({value:e})=>({value:[e]})))}return n}forward(e,t){let n=[];for(let r of e){let e=t.normalizeForwardResult(this._valueSchema.forward(r,t),r);n.push(...e.map(UB))}return n}redirect(e,t){let n=[],r=[];for(let i of e){let e=t.normalizeRedirectResult(this._valueSchema.redirect(i,t),i);`remain`in e&&n.push(e.remain),r.push(...e.redirect.map(UB))}return n.length===0?{redirect:r}:{redirect:r,remain:n}}overlap(e,t){return e.concat(t)}};function UB({from:e,to:t}){return{from:[e],to:t}}var WB=class extends RB{expected(){return`true or false`}validate(e){return typeof e==`boolean`}};function GB(e,t){let n=Object.create(null);for(let r of e){let e=r[t];if(n[e])throw Error(`Duplicate ${t} ${JSON.stringify(e)}`);n[e]=r}return n}function KB(e,t){let n=new Map;for(let r of e){let e=r[t];if(n.has(e))throw Error(`Duplicate ${t} ${JSON.stringify(e)}`);n.set(e,r)}return n}function qB(){let e=Object.create(null);return t=>{let n=JSON.stringify(t);return e[n]?!0:(e[n]=!0,!1)}}function JB(e,t){let n=[],r=[];for(let i of e)t(i)?n.push(i):r.push(i);return[n,r]}function YB(e){return e===Math.floor(e)}function XB(e,t){if(e===t)return 0;let n=typeof e,r=typeof t,i=[`undefined`,`object`,`boolean`,`number`,`string`];return n===r?n===`string`?e.localeCompare(t):Number(e)-Number(t):i.indexOf(n)-i.indexOf(r)}function ZB(e){return(...t)=>{let n=e(...t);return typeof n==`string`?Error(n):n}}function QB(e){return e===void 0?{}:e}function $B(e){if(typeof e==`string`)return{text:e};let{text:t,list:n}=e;return aV((t||n)!==void 0,"Unexpected `expected` result, there should be at least one field."),n?{text:t,list:{title:n.title,values:n.values.map($B)}}:{text:t}}function eV(e,t){return e===!0?!0:e===!1?{value:t}:e}function tV(e,t,n=!1){return e===!1?!1:e===!0?n?!0:[{value:t}]:`value`in e?[e]:e.length!==0&&e}function nV(e,t){return typeof e==`string`||`key`in e?{from:t,to:e}:`from`in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function rV(e,t){return e===void 0?[]:Array.isArray(e)?e.map(e=>nV(e,t)):[nV(e,t)]}function iV(e,t){let n=rV(typeof e==`object`&&`redirect`in e?e.redirect:e,t);return n.length===0?{remain:t,redirect:n}:typeof e==`object`&&`remain`in e?{remain:e.remain,redirect:n}:{redirect:n}}function aV(e,t){if(!e)throw Error(t)}var oV=class extends RB{constructor(e){super(e),this._choices=KB(e.choices.map(e=>e&&typeof e==`object`?e:{value:e}),`value`)}expected({descriptor:e}){let t=Array.from(this._choices.keys()).map(e=>this._choices.get(e)).filter(({hidden:e})=>!e).map(e=>e.value).sort(XB).map(e.value),n=t.slice(0,-2),r=t.slice(-2);return{text:n.concat(r.join(` or `)).join(`, `),list:{title:`one of the following values`,values:t}}}validate(e){return this._choices.has(e)}deprecated(e){let t=this._choices.get(e);return t&&t.deprecated?{value:e}:!1}forward(e){let t=this._choices.get(e);return t?t.forward:void 0}redirect(e){let t=this._choices.get(e);return t?t.redirect:void 0}},sV=class extends RB{expected(){return`a number`}validate(e,t){return typeof e==`number`}},cV=class extends sV{expected(){return`an integer`}validate(e,t){return t.normalizeValidateResult(super.validate(e,t),e)===!0&&YB(e)}},lV=class extends RB{expected(){return`a string`}validate(e){return typeof e==`string`}},uV=bB,dV=FB,fV=DB,pV=CB,mV=class{constructor(e,t){let{logger:n=console,loggerPrintWidth:r=80,descriptor:i=uV,unknown:a=dV,invalid:o=fV,deprecated:s=pV,missing:c=()=>!1,required:l=()=>!1,preprocess:u=e=>e,postprocess:d=()=>TB}=t||{};this._utils={descriptor:i,logger:n||{warn:()=>{}},loggerPrintWidth:r,schemas:GB(e,`name`),normalizeDefaultResult:QB,normalizeExpectedResult:$B,normalizeDeprecatedResult:tV,normalizeForwardResult:rV,normalizeRedirectResult:iV,normalizeValidateResult:eV},this._unknownHandler=a,this._invalidHandler=ZB(o),this._deprecatedHandler=s,this._identifyMissing=(e,t)=>!(e in t)||c(e,t),this._identifyRequired=l,this._preprocess=u,this._postprocess=d,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=qB()}normalize(e){let t={},n=[this._preprocess(e,this._utils)],r=()=>{for(;n.length!==0;){let e=n.shift(),r=this._applyNormalization(e,t);n.push(...r)}};r();for(let e of Object.keys(this._utils.schemas)){let r=this._utils.schemas[e];if(!(e in t)){let t=QB(r.default(this._utils));`value`in t&&n.push({[e]:t.value})}}r();for(let e of Object.keys(this._utils.schemas)){if(!(e in t))continue;let n=this._utils.schemas[e],r=t[e],i=n.postprocess(r,this._utils);i!==TB&&(this._applyValidation(i,e,n),t[e]=i)}return this._applyPostprocess(t),this._applyRequiredCheck(t),t}_applyNormalization(e,t){let n=[],{knownKeys:r,unknownKeys:i}=this._partitionOptionKeys(e);for(let i of r){let r=this._utils.schemas[i],a=r.preprocess(e[i],this._utils);this._applyValidation(a,i,r);let o=({from:e,to:t})=>{n.push(typeof t==`string`?{[t]:e}:{[t.key]:t.value})},s=({value:e,redirectTo:t})=>{let n=tV(r.deprecated(e,this._utils),a,!0);if(n!==!1){if(n===!0)this._hasDeprecationWarned(i)||this._utils.logger.warn(this._deprecatedHandler(i,t,this._utils));else for(let{value:e}of n){let n={key:i,value:e};if(!this._hasDeprecationWarned(n)){let r=typeof t==`string`?{key:t,value:e}:t;this._utils.logger.warn(this._deprecatedHandler(n,r,this._utils))}}}};rV(r.forward(a,this._utils),a).forEach(o);let c=iV(r.redirect(a,this._utils),a);if(c.redirect.forEach(o),`remain`in c){let e=c.remain;t[i]=i in t?r.overlap(t[i],e,this._utils):e,s({value:e})}for(let{from:e,to:t}of c.redirect)s({value:e,redirectTo:t})}for(let r of i){let i=e[r];this._applyUnknownHandler(r,i,t,(e,t)=>{n.push({[e]:t})})}return n}_applyRequiredCheck(e){for(let t of Object.keys(this._utils.schemas))if(this._identifyMissing(t,e)&&this._identifyRequired(t))throw this._invalidHandler(t,wB,this._utils)}_partitionOptionKeys(e){let[t,n]=JB(Object.keys(e).filter(t=>!this._identifyMissing(t,e)),e=>e in this._utils.schemas);return{knownKeys:t,unknownKeys:n}}_applyValidation(e,t,n){let r=eV(n.validate(e,this._utils),e);if(r!==!0)throw this._invalidHandler(t,r.value,this._utils)}_applyUnknownHandler(e,t,n,r){let i=this._unknownHandler(e,t,this._utils);if(i)for(let e of Object.keys(i)){if(this._identifyMissing(e,i))continue;let t=i[e];e in this._utils.schemas?r(e,t):n[e]=t}}_applyPostprocess(e){let t=this._postprocess(e,this._utils);if(t!==TB){if(t.delete)for(let n of t.delete)delete e[n];if(t.override){let{knownKeys:n,unknownKeys:r}=this._partitionOptionKeys(t.override);for(let r of n){let n=t.override[r];this._applyValidation(n,r,this._utils.schemas[r]),e[r]=n}for(let n of r){let r=t.override[n];this._applyUnknownHandler(n,r,e,(t,n)=>{let r=this._utils.schemas[t];this._applyValidation(n,t,r),e[t]=n})}}}}},hV;function gV(e,t,{logger:n=!1,isCLI:r=!1,passThrough:i=!1,FlagSchema:a,descriptor:o}={}){if(r){if(!a)throw Error(`'FlagSchema' option is required.`);if(!o)throw Error(`'descriptor' option is required.`)}else o=bB;let s=i?Array.isArray(i)?(e,t)=>i.includes(e)?{[e]:t}:void 0:(e,t)=>({[e]:t}):(e,t,n)=>{let{_:r,...i}=n.schemas;return FB(e,t,{...n,schemas:i})},c=new mV(_V(t,{isCLI:r,FlagSchema:a}),{logger:n,unknown:s,descriptor:o}),l=n!==!1;l&&hV&&(c._hasDeprecationWarned=hV);let u=c.normalize(e);return l&&(hV=c._hasDeprecationWarned),u}function _V(e,{isCLI:t,FlagSchema:n}){let r=[];t&&r.push(VB.create({name:`_`}));for(let i of e)r.push(vV(i,{isCLI:t,optionInfos:e,FlagSchema:n})),i.alias&&t&&r.push(BB.create({name:i.alias,sourceName:i.name}));return r}function vV(e,{isCLI:t,optionInfos:n,FlagSchema:r}){let{name:i}=e,a={name:i},o,s={};switch(e.type){case`int`:o=cV,t&&(a.preprocess=Number);break;case`string`:o=lV;break;case`choice`:o=oV,a.choices=e.choices.map(t=>t?.redirect?{...t,redirect:{to:{key:e.name,value:t.redirect}}}:t);break;case`boolean`:o=WB;break;case`flag`:o=r,a.flags=n.flatMap(e=>[e.alias,e.description&&e.name,e.oppositeDescription&&`no-${e.name}`].filter(Boolean));break;case`path`:o=lV;break;default:throw Error(`Unexpected type ${e.type}`)}if(a.validate=e.exception?(t,n,r)=>e.exception(t)||n.validate(t,r):(e,t,n)=>e===void 0||t.validate(e,n),e.redirect&&(s.redirect=t=>t?{to:typeof e.redirect==`string`?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(s.deprecated=!0),t&&!e.array){let e=a.preprocess||(e=>e);a.preprocess=(t,n,r)=>n.preprocess(e(Array.isArray(t)?iL(0,t,-1):t),r)}return e.array?HB.create({...t?{preprocess:e=>Array.isArray(e)?e:[e]}:{},...s,valueSchema:o.create(a)}):o.create({...a,...s})}var yV=gV,bV=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let n=this[t];if(e(n,t,this))return n}},xV=II(`findLast`,function(){if(Array.isArray(this))return bV}),SV=Symbol.for(`PRETTIER_IS_FRONT_MATTER`),CV=[];function wV(e){return!!e?.[SV]}var TV=wV,EV=new Set([`yaml`,`toml`]),DV=({node:e})=>TV(e)&&EV.has(e.language);async function OV(e,t,n,r){let{node:i}=n,{language:a}=i;if(!EV.has(a))return;let o=i.value.trim(),s;if(o){let t=a===`yaml`?a:yB(r,{language:a});if(!t)return;s=o?await e(o,{parser:t}):``}else s=o;return tR([i.startDelimiter,i.explicitLanguage??``,gR,s,s?gR:``,i.endDelimiter])}function kV(e,t){return DV({node:e})&&(delete t.end,delete t.raw,delete t.value),t}var AV=kV;function jV({node:e}){return e.raw}var MV=jV,NV=new Set([`tokens`,`comments`,`parent`,`enclosingNode`,`precedingNode`,`followingNode`]),PV=e=>Object.keys(e).filter(e=>!NV.has(e));function FV(e,t){let n=e?t=>e(t,NV):PV;return t?new Proxy(n,{apply:(e,t,n)=>TV(n[0])?CV:Reflect.apply(e,t,n)}):n}var IV=FV;function LV(e,t){if(!t)throw Error(`parserName is required.`);let n=xV(0,e,e=>e.parsers&&$z(e.parsers,t));if(n)return n;let r=`Couldn't resolve parser "${t}".`;throw r+=` Plugins must be explicitly added to the standalone bundle.`,new Zz(r)}function RV(e,t){if(!t)throw Error(`astFormat is required.`);let n=xV(0,e,e=>e.printers&&$z(e.printers,t));if(n)return n;let r=`Couldn't find plugin for AST format "${t}".`;throw r+=` Plugins must be explicitly added to the standalone bundle.`,new Zz(r)}function zV({plugins:e,parser:t}){return BV(LV(e,t),t)}function BV(e,t){let n=e.parsers[t];return typeof n==`function`?n():n}async function VV(e,t){let n=e.printers[t];return WV(typeof n==`function`?await n():n)}function HV(e){let{features:t,getVisitorKeys:n,embed:r,massageAstNode:i,print:a,...o}=e;t=qV(t);let s=t.experimental_frontMatterSupport;n=IV(n,s.massageAstNode||s.embed||s.print);let c=i;i&&s.massageAstNode&&(c=new Proxy(i,{apply(e,t,n){return AV(...n),Reflect.apply(e,t,n)}}));let l=r;if(r){let e;l=new Proxy(r,{get(t,i,a){return i===`getVisitorKeys`?(e??=r.getVisitorKeys?IV(r.getVisitorKeys,s.massageAstNode||s.embed):n,e):Reflect.get(t,i,a)},apply:(e,t,n)=>s.embed&&DV(...n)?OV:Reflect.apply(e,t,n)})}let u=a;return s.print&&(u=new Proxy(a,{apply(e,t,n){let[r]=n;return TV(r.node)?MV(r):Reflect.apply(e,t,n)}})),{features:t,getVisitorKeys:n,embed:l,massageAstNode:c,print:u,...o}}var UV=new WeakMap;function WV(e){return SL(UV,e,HV)}var GV=Object.fromEntries([`clean`,`embed`,`print`].map(e=>[e,!1]));function KV(e){return{...GV,...e}}function qV(e){return{experimental_avoidAstMutation:!1,...e,experimental_frontMatterSupport:KV(e?.experimental_frontMatterSupport)}}var JV={astFormat:`estree`,printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null};async function YV(e,t={}){let n={...e};if(!n.parser){if(!n.filepath)throw new Qz(`No parser and no file path given, couldn't infer a parser.`);if(n.parser=yB(n,{physicalFile:n.filepath}),!n.parser)throw new Qz(`No parser could be inferred for file "${n.filepath}".`)}let r=tB({plugins:e.plugins,showDeprecated:!0}).options,i={...JV,...Object.fromEntries(r.filter(e=>e.default!==void 0).map(e=>[e.name,e.default]))},a=LV(n.plugins,n.parser),o=await BV(a,n.parser);n.astFormat=o.astFormat,n.locEnd=o.locEnd,n.locStart=o.locStart;let s=a.printers?.[o.astFormat]?a:RV(n.plugins,o.astFormat),c=await VV(s,o.astFormat);n.printer=c,n.getVisitorKeys=c.getVisitorKeys;let l=s.defaultOptions?Object.fromEntries(Object.entries(s.defaultOptions).filter(([,e])=>e!==void 0)):{},u={...i,...l};for(let[e,t]of Object.entries(u))n[e]??(n[e]=t);return n.parser===`json`&&(n.trailingComma=`none`),yV(n,r,{passThrough:Object.keys(JV),...t})}var XV=YV,ZV=/\r\n|[\n\r\u2028\u2029]/;function QV(e,t,n,r){let i={column:null,line:-1,...e.start},a={...i,...e.end},{linesAbove:o=2,linesBelow:s=3}=n||{},c=i.line-r,l=i.column,u=a.line-r,d=a.column,f=Math.max(c-(o+1),0),p=Math.min(t.length,u+s);c===-1&&(f=0),u===-1&&(p=t.length);let m=u-c,h={};if(m)for(let e=0;e<=m;e++){let n=e+c;h[n]=l==null?!0:e===0?[l,t[n-1].length-l]:e===m?[0,d]:[0,t[n-1].length]}else if(l===d)h[c]=l==null||[l,0];else{let e=l??0;h[c]=[e,(d??e)-e]}return{start:f,end:p,markerLines:h}}function $V(e,t,n={},r){let{defs:i,highlight:a}=r||{defs:{gutter:String,marker:String,message:String,reset:String},highlight:String},o=(n.startLine||1)-1,{start:s,end:c,markerLines:l}=QV(t,e.split(ZV),n,o),u=t.start&&typeof t.start.column==`number`,d=String(c+o).length,f=a(e).split(ZV,c).slice(s,c).map((e,t)=>{let r=s+1+t,a=` ${` ${r+o}`.slice(-d)} |`,c=l[r],u=!l[r+1];if(c){let t=``;if(Array.isArray(c)){let r=e.slice(0,c[0]).replace(/[^\t]/g,` `),o=c[1]||1;t=[`
358
+ `,i.gutter(a.replace(/\d/g,` `)),` `,r,i.marker(`^`).repeat(o)].join(``),u&&n.message&&(t+=` `+i.message(n.message))}return[i.marker(`>`),i.gutter(a),e.length>0?` ${e}`:``,t].join(``)}return` ${i.gutter(a)}${e.length>0?` ${e}`:``}`}).join(`
359
+ `);return n.message&&!u&&(f=`${` `.repeat(d+1)}${n.message}
360
+ ${f}`),i.reset(f)}function eH(e,t,n={}){return $V(e,t,n)}async function tH(e,t){let n=await zV(t),r=n.preprocess?await n.preprocess(e,t):e;t.originalText=r;let i;try{i=await n.parse(r,t,t)}catch(t){nH(t,e)}return{text:r,ast:i}}function nH(e,t){let{loc:n}=e;if(n){let{start:r,end:i}=n;r&&={line:r.line,column:r.column-1},i&&={line:i.line,column:i.column-1};let a=eH(t,{start:r,end:i},{highlightCode:!0});e.message+=`
361
+ `+a,e.codeFrame=a}throw e}var rH=tH;async function iH(e,t,n,r,i){if(n.embeddedLanguageFormatting!==`auto`)return;let{printer:a}=n,{embed:o}=a;if(!o)return;if(o.length>2)throw Error(`printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed`);let{hasPrettierIgnore:s}=a,{getVisitorKeys:c}=o,l=[];f();let u=e.stack;for(let{print:r,node:a,pathStack:o}of l)try{e.stack=o;let s=await r(d,t,e,n);s&&i.set(a,s)}catch(e){if(globalThis.PRETTIER_DEBUG)throw e}e.stack=u;function d(e,t){return aH(e,t,n,r)}function f(){let{node:t}=e;if(typeof t!=`object`||!t||s?.(e))return;for(let n of c(t))Array.isArray(t[n])?e.each(f,n):e.call(f,n);let r=o(e,n);if(r){if(typeof r==`function`){l.push({print:r,node:t,pathStack:[...e.stack]});return}i.set(t,r)}}}async function aH(e,t,n,r){let i=await XV({...n,...t,parentParser:n.parser,originalText:e,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:a}=await rH(e,i);return VL(await r(a,i))}function oH(e,t,n,r){let{originalText:i,[nL]:a,locStart:o,locEnd:s,[Symbol.for(`printedComments`)]:c}=t,{node:l}=e,u=o(l),d=s(l);for(let e of a)o(e)>=u&&s(e)<=d&&c.add(e);let{printPrettierIgnored:f}=t.printer;return f?f(e,t,n,r):i.slice(u,d)}var sH=oH;async function cH(e,t){({ast:e}=await uH(e,t));let n=new Map,r=new az(e),i=Xz(t),a=new Map;await iH(r,s,t,cH,a);let o=await lH(r,t,s,void 0,a);if(Yz(t),t.cursorOffset>=0){if(t.nodeAfterCursor&&!t.nodeBeforeCursor)return[aR,o];if(t.nodeBeforeCursor&&!t.nodeAfterCursor)return[o,aR]}return o;function s(e,t){return e===void 0||e===r?c(t):Array.isArray(e)?r.call(()=>c(t),...e):r.call(()=>c(t),e)}function c(e){i(r);let o=r.node;if(o==null)return``;let c=lz(o)&&e===void 0;if(c&&n.has(o))return n.get(o);let l=lH(r,t,s,e,a);return c&&n.set(o,l),l}}function lH(e,t,n,r,i){let{node:a}=e,{printer:o}=t,s;switch(s=o.hasPrettierIgnore?.(e)?sH(e,t,n,r):i.has(a)?i.get(a):o.print(e,t,n,r),a){case t.cursorNode:s=qL(s,e=>[aR,e,aR]);break;case t.nodeBeforeCursor:s=qL(s,e=>[e,aR]);break;case t.nodeAfterCursor:s=qL(s,e=>[aR,e])}return o.printComment&&sz(a.comments)&&!o.willPrintOwnComments?.(e,t)&&(s=Jz(e,s,t)),s}async function uH(e,t){let n=e.comments??[];t[nL]=n,t[Symbol.for(`printedComments`)]=new Set,Pz(e,t);let{printer:{preprocess:r}}=t;return e=r?await r(e,t):e,{ast:e,comments:n}}function dH(e,t){let{cursorOffset:n,locStart:r,locEnd:i,getVisitorKeys:a}=t,o=e=>r(e)<=n&&i(e)>=n,s=e,c=[e];for(let t of xz(e,{getVisitorKeys:a,filter:o}))c.push(t),s=t;if(Sz(s,{getVisitorKeys:a}))return{cursorNode:s};let l,u,d=-1,f=1/0;for(;c.length>0&&(l===void 0||u===void 0);){s=c.pop();let e=l!==void 0,t=u!==void 0;for(let o of bz(s,{getVisitorKeys:a})){if(!e){let e=i(o);e<=n&&e>d&&(l=o,d=e)}if(!t){let e=r(o);e>=n&&e<f&&(u=o,f=e)}}}return{nodeBeforeCursor:l,nodeAfterCursor:u}}var fH=dH;function pH(e,t){let{printer:n}=t,r=n.massageAstNode;if(!r)return e;let{getVisitorKeys:i}=n,{ignoredProperties:a}=r;return o(e);function o(e,t){if(!lz(e))return e;if(Array.isArray(e))return e.map(e=>o(e,t)).filter(Boolean);let n={},s=new Set(i(e));for(let t in e)!$z(e,t)||a?.has(t)||(n[t]=s.has(t)?o(e[t],e):e[t]);let c=r(e,n,t);if(c!==null)return c??n}}var mH=pH,hH=Array.prototype.findLastIndex??function(e){for(let t=this.length-1;t>=0;t--){let n=this[t];if(e(n,t,this))return t}return-1},gH=II(`findLastIndex`,function(){if(Array.isArray(this))return hH});function _H(e,t){return t=new Set(t),e.find(e=>SH.has(e.type)&&t.has(e))}function vH(e){let t=gH(0,e,e=>e.type!==`Program`&&e.type!==`File`);return t===-1?e:e.slice(0,t+1)}function yH(e,t,{locStart:n,locEnd:r}){let[i,...a]=e,[o,...s]=t;if(i===o)return[i,o];let c=n(i);for(let e of vH(s))if(n(e)>=c)o=e;else break;let l=r(o);for(let e of vH(a)){if(r(e)<=l)i=e;else break;if(i===o)break}return[i,o]}function bH(e,t,n,r,i=[],a,o){let{locStart:s,locEnd:c}=o,l=s(e),u=c(e);if(t>u||t<l||a===`rangeEnd`&&t===l||a===`rangeStart`&&t===u)return;let d=[e,...i],f=Tz(e,d,{cache:jz,locStart:s,locEnd:c,getVisitorKeys:n.getVisitorKeys,filter:n.printer.canAttachComment,getChildren:n.printer.getCommentChildNodes});for(let e of f){let i=bH(e,t,n,r,d,a,o);if(i)return i}if(r(e,i[0]))return d}function xH(e,t){return t!==`DeclareExportDeclaration`&&e!==`TypeParameterDeclaration`&&(e===`Directive`||e===`TypeAlias`||e===`TSExportAssignment`||e.startsWith(`Declare`)||e.startsWith(`TSDeclare`)||e.endsWith(`Statement`)||e.endsWith(`Declaration`))}var SH=new Set([`JsonRoot`,`ObjectExpression`,`ArrayExpression`,`StringLiteral`,`NumericLiteral`,`BooleanLiteral`,`NullLiteral`,`UnaryExpression`,`TemplateLiteral`]),CH=new Set([`OperationDefinition`,`FragmentDefinition`,`VariableDefinition`,`TypeExtensionDefinition`,`ObjectTypeDefinition`,`FieldDefinition`,`DirectiveDefinition`,`EnumTypeDefinition`,`EnumValueDefinition`,`InputValueDefinition`,`InputObjectTypeDefinition`,`SchemaDefinition`,`OperationTypeDefinition`,`InterfaceTypeDefinition`,`UnionTypeDefinition`,`ScalarTypeDefinition`]);function wH(e,t,n){if(!t)return!1;switch(e.parser){case`flow`:case`hermes`:case`babel`:case`babel-flow`:case`babel-ts`:case`typescript`:case`acorn`:case`espree`:case`meriyah`:case`oxc`:case`oxc-ts`:case`yuku`:case`yuku-ts`:case`__babel_estree`:return xH(t.type,n?.type);case`json`:case`json5`:case`jsonc`:case`json-stringify`:return SH.has(t.type);case`graphql`:return CH.has(t.kind);case`vue`:return t.tag!==`root`}return!1}function TH(e,t,n){let{rangeStart:r,rangeEnd:i}=t,a=e.slice(r,i).search(/\S/),o=a===-1;if(!o)for(r+=a;i>r&&!/\S/.test(e[i-1]);--i);let s=t.printer.features?.experimental_locForRangeFormat??t,c=bH(n,r,t,(e,n)=>wH(t,e,n),[],`rangeStart`,s);if(!c)return;let l=o?c:bH(n,i,t,e=>wH(t,e),[],`rangeEnd`,s);if(!l)return;let u,d;if(n.type===`JsonRoot`){let e=_H(c,l);u=e,d=e}else[u,d]=yH(c,l,t);let{locStart:f,locEnd:p}=s;return[Math.min(f(u),f(d)),Math.max(p(u),p(d))]}var EH=``,DH=Symbol(`cursor`);async function OH(e,t,n=0){if(!e||e.trim().length===0)return{formatted:``,cursorOffset:-1,comments:[]};let{ast:r,text:i}=await rH(e,t);t.cursorOffset>=0&&(t={...t,...fH(r,t)});let a=await cH(r,t,n);n>0&&(a=rR([gR,a],n,t.tabWidth));let o=nz(a,t);if(n>0){let e=o.formatted.trim();o.cursorNodeStart!==void 0&&(o.cursorNodeStart-=o.formatted.indexOf(e),o.cursorNodeStart<0&&(o.cursorNodeStart=0,o.cursorNodeText=o.cursorNodeText.trimStart()),o.cursorNodeStart+o.cursorNodeText.length>e.length&&(o.cursorNodeText=o.cursorNodeText.trimEnd())),o.formatted=e+ZI(t.endOfLine)}let s=t[nL];if(t.cursorOffset>=0){let e,n,r,a;if((t.cursorNode||t.nodeBeforeCursor||t.nodeAfterCursor)&&o.cursorNodeText){if(r=o.cursorNodeStart,a=o.cursorNodeText,t.cursorNode)e=t.locStart(t.cursorNode),n=i.slice(e,t.locEnd(t.cursorNode));else{if(!t.nodeBeforeCursor&&!t.nodeAfterCursor)throw Error(`Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor`);e=t.nodeBeforeCursor?t.locEnd(t.nodeBeforeCursor):0;let r=t.nodeAfterCursor?t.locStart(t.nodeAfterCursor):i.length;n=i.slice(e,r)}}else e=0,n=i,r=0,a=o.formatted;let c=t.cursorOffset-e;if(n===a)return{formatted:o.formatted,cursorOffset:r+c,comments:s};let l=n.split(``);l.splice(c,0,DH);let u=VI(l,a.split(``)),d=r;for(let e of u)if(e.removed){if(e.value.includes(DH))break}else d+=e.count;return{formatted:o.formatted,cursorOffset:d,comments:s}}return{formatted:o.formatted,cursorOffset:-1,comments:s}}async function kH(e,t){let{ast:n,text:r}=await rH(e,t),[i,a]=TH(r,t,n)??[0,0],o=r.slice(i,a),s=Math.min(i,r.lastIndexOf(`
362
+ `,i)+1),c=r.slice(s,i).match(/^\s*/)[0],l=iz(c,t.tabWidth),u=await OH(o,{...t,rangeStart:0,rangeEnd:1/0,cursorOffset:t.cursorOffset>i&&t.cursorOffset<=a?t.cursorOffset-i:-1,endOfLine:`lf`},l),d=u.formatted.trimEnd(),{cursorOffset:f}=t;f>a?f+=d.length-o.length:u.cursorOffset>=0&&(f=u.cursorOffset+i);let p=r.slice(0,i)+d+r.slice(a);if(t.endOfLine!==`lf`){let e=ZI(t.endOfLine);f>=0&&e===`\r
363
+ `&&(f+=$I(p.slice(0,f),`
364
+ `)),p=RI(0,p,`
365
+ `,e)}return{formatted:p,cursorOffset:f,comments:u.comments}}function AH(e,t,n){return typeof t!=`number`||Number.isNaN(t)||t<0||t>e.length?n:t}function jH(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i}=t;return n=AH(e,n,-1),r=AH(e,r,0),i=AH(e,i,e.length),{...t,cursorOffset:n,rangeStart:r,rangeEnd:i}}function MH(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:a}=jH(e,t),o=e.charAt(0)===EH;if(o&&(e=e.slice(1),n--,r--,i--),a===`auto`&&(a=XI(e)),e.includes(`\r`)){let t=t=>$I(e.slice(0,Math.max(t,0)),`\r
366
+ `);n-=t(n),r-=t(r),i-=t(i),e=tL(e)}return{hasBOM:o,text:e,options:jH(e,{...t,cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:a})}}async function NH(e,t){let n=await zV(t);return!n.hasPragma||n.hasPragma(e)}async function PH(e,t){return(await zV(t)).hasIgnorePragma?.(e)}async function FH(e,t){let{hasBOM:n,text:r,options:i}=MH(e,await XV(t));if(i.rangeStart>=i.rangeEnd&&r!==``||i.requirePragma&&!await NH(r,i)||i.checkIgnorePragma&&await PH(r,i))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let a;return i.rangeStart>0||i.rangeEnd<r.length?a=await kH(r,i):(!i.requirePragma&&i.insertPragma&&i.printer.insertPragma&&!await NH(r,i)&&(r=i.printer.insertPragma(r)),a=await OH(r,i)),n&&(a.formatted=EH+a.formatted,a.cursorOffset>=0&&a.cursorOffset++),a}async function IH(e,t,n){let{text:r,options:i}=MH(e,await XV(t)),a=await rH(r,i);return n&&(n.preprocessForPrint&&(a.ast=await uH(a.ast,i)),n.massage&&(a.ast=mH(a.ast,i))),a}async function LH(e,t){return t=await XV(t),nz(await cH(e,t),t)}async function RH(e,t){let{formatted:n}=await FH(CR(e),{...t,parser:`__js_expression`});return n}async function zH(e,t){t=await XV(t);let{ast:n}=await rH(e,t);return t.cursorOffset>=0&&(t={...t,...fH(n,t)}),cH(n,t)}async function BH(e,t){return nz(e,await XV(t))}var VH={};FI(VH,{builders:()=>HH,printer:()=>UH,utils:()=>WH});var HH={join:dR,line:pR,softline:mR,hardline:gR,literalline:vR,group:sR,conditionalGroup:cR,fill:oR,lineSuffix:yR,lineSuffixBoundary:bR,cursor:aR,breakParent:iR,ifBreak:lR,trim:xR,indent:QL,indentIfBreak:uR,align:$L,addAlignmentToDoc:rR,markAsRoot:tR,dedentToRoot:eR,dedent:nR,hardlineWithoutBreakParent:hR,literallineWithoutBreakParent:_R,label:fR,concat:e=>e},UH={printDocToString:nz},WH={willBreak:PL,traverseDoc:AL,findInDoc:ML,mapDoc:jL,removeLines:RL,stripTrailingHardline:VL,replaceEndOfLine:WL,canBreak:KL},GH=`3.9.6`,KH={};FI(KH,{addDanglingComment:()=>kz,addLeadingComment:()=>Oz,addTrailingComment:()=>Az,getAlignmentSize:()=>iz,getIndentSize:()=>nU,getMaxContinuousCount:()=>aU,getNextNonSpaceNonCommentCharacter:()=>sU,getNextNonSpaceNonCommentCharacterIndex:()=>vU,getPreferredQuote:()=>fU,getStringWidth:()=>HR,hasNewline:()=>yz,hasNewlineInRange:()=>mU,hasSpaces:()=>gU,isNextLineEmpty:()=>CU,isNextLineEmptyAfterIndex:()=>eU,isPreviousLineEmpty:()=>bU,makeString:()=>SU,skip:()=>uz,skipEverythingButNewLine:()=>mz,skipInlineComment:()=>JH,skipNewline:()=>_z,skipSpaces:()=>fz,skipToLineEnd:()=>pz,skipTrailingComment:()=>XH,skipWhitespace:()=>dz});function qH(e,t){if(t===!1)return!1;if(e.charAt(t)===`/`&&e.charAt(t+1)===`*`){for(let n=t+2;n<e.length;++n)if(e.charAt(n)===`*`&&e.charAt(n+1)===`/`)return n+2}return t}var JH=qH;function YH(e,t){return t===!1?!1:e.charAt(t)===`/`&&e.charAt(t+1)===`/`?mz(e,t):t}var XH=YH;function ZH(e,t){let n=null,r=t;for(;r!==n;)n=r,r=fz(e,r),r=JH(e,r),r=XH(e,r),r=_z(e,r);return r}var QH=ZH;function $H(e,t){let n=null,r=t;for(;r!==n;)n=r,r=pz(e,r),r=JH(e,r),r=fz(e,r);return r=XH(e,r),r=_z(e,r),r!==!1&&yz(e,r)}var eU=$H;function tU(e,t){let n=e.lastIndexOf(`
367
+ `);return n===-1?0:iz(e.slice(n+1).match(/^[\t ]*/)[0],t)}var nU=tU;function rU(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function iU(e,t){let n=e.matchAll(RegExp(`(?:${rU(t)})+`,`g`));return n.reduce||(n=[...n]),n.reduce((e,[t])=>Math.max(e,t.length),0)/t.length}var aU=iU;function oU(e,t){let n=QH(e,t);return n===!1?``:e.charAt(n)}var sU=oU,cU=Object.freeze({character:`'`,codePoint:39}),lU=Object.freeze({character:`"`,codePoint:34}),uU=Object.freeze({preferred:cU,alternate:lU}),dU=Object.freeze({preferred:lU,alternate:cU});function fU(e,t){let{preferred:n,alternate:r}=t===!0||t===`'`?uU:dU,{length:i}=e,a=0,o=0;for(let t=0;t<i;t++){let i=e.charCodeAt(t);i===n.codePoint?a++:i===r.codePoint&&o++}return(a>o?r:n).character}function pU(e,t,n){for(let r=t;r<n;++r)if(e.charAt(r)===`
368
+ `)return!0;return!1}var mU=pU;function hU(e,t,n={}){return fz(e,n.backwards?t-1:t,n)!==t}var gU=hU;function _U(e,t,n){return QH(e,n(t))}function vU(e,t){return arguments.length===2||typeof t==`number`?QH(e,t):_U(...arguments)}function yU(e,t,n){return Vz(e,n(t))}function bU(e,t){return arguments.length===2||typeof t==`number`?Vz(e,t):yU(...arguments)}function xU(e,t,n){return eU(e,n(t))}function SU(e,t,n){let r=t===`"`?`'`:`"`;return t+RI(0,e,/\\(.)|(["'])/gs,(e,i,a)=>i===r?i:a===t?`\\`+a:a||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:`\\`+i))+t}function CU(e,t){return arguments.length===2||typeof t==`number`?eU(e,t):xU(...arguments)}function wU(e,t=1){return async(...n)=>{let r=n[t]??{},i=r.plugins??[];return n[t]={...r,plugins:Array.isArray(i)?i:Object.values(i)},await e(...n)}}var TU=wU(FH);async function EU(e,t){let{formatted:n}=await TU(e,{...t,cursorOffset:-1});return n}async function DU(e,t){return await EU(e,t)===e}var OU=wU(tB,0),kU={parse:wU(IH),formatAST:wU(LH),formatDoc:wU(RH),printToDoc:wU(zH),printDocToString:wU(BH)},AU=Object.getOwnPropertyNames,jU=((e,t)=>function(){return t||(0,e[AU(e)[0]])((t={exports:{}}).exports,t),t.exports})({"fillers/json-schema.json"(e,t){t.exports={}}});function MU(e,t){if(e.length<t.length)return!1;for(var n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function NU(e,t){var n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:n===0&&e===t}function PU(e){return MU(e,`(?i)`)?new RegExp(e.substring(4),`i`):new RegExp(e)}function FU(e,t){if(e===t)return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!=`object`||Array.isArray(e)!==Array.isArray(t))return!1;var n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!FU(e[n],t[n]))return!1}else{var i=[];for(r in e)i.push(r);i.sort();var a=[];for(r in t)a.push(r);if(a.sort(),!FU(i,a))return!1;for(n=0;n<i.length;n++)if(!FU(e[i[n]],t[i[n]]))return!1}return!0}function IU(e){return typeof e==`number`}function LU(e){return e!==void 0}function RU(e){return typeof e==`boolean`}function zU(e){return typeof e==`string`}var BU;(function(e){e[e.Undefined=0]=`Undefined`,e[e.EnumValueMismatch=1]=`EnumValueMismatch`,e[e.Deprecated=2]=`Deprecated`,e[e.UnexpectedEndOfComment=257]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=258]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=259]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=260]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=261]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=262]=`InvalidCharacter`,e[e.PropertyExpected=513]=`PropertyExpected`,e[e.CommaExpected=514]=`CommaExpected`,e[e.ColonExpected=515]=`ColonExpected`,e[e.ValueExpected=516]=`ValueExpected`,e[e.CommaOrCloseBacketExpected=517]=`CommaOrCloseBacketExpected`,e[e.CommaOrCloseBraceExpected=518]=`CommaOrCloseBraceExpected`,e[e.TrailingComma=519]=`TrailingComma`,e[e.DuplicateKey=520]=`DuplicateKey`,e[e.CommentNotPermitted=521]=`CommentNotPermitted`,e[e.SchemaResolveError=768]=`SchemaResolveError`})(BU||={});var VU;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Wc.Markdown,Wc.PlainText],commitCharactersSupport:!0}}}}})(VU||={});var HU=(e,t,...n)=>n.length===0?t:t.replaceAll(/{(\d+)}/g,(e,[t])=>t in n?String(n[t]):e);function UU(){return HU}var WU=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),$=UU(),GU={"color-hex":{errorMessage:$(`colorHexFormatWarning`,`Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.`),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:$(`dateTimeFormatWarning`,`String is not a RFC3339 date-time.`),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:$(`dateFormatWarning`,`String is not a RFC3339 date.`),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:$(`timeFormatWarning`,`String is not a RFC3339 time.`),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:$(`emailFormatWarning`,`String is not an e-mail address.`),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}},KU=(function(){function e(e,t,n){n===void 0&&(n=0),this.offset=t,this.length=n,this.parent=e}return Object.defineProperty(e.prototype,"children",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return`type: `+this.type+` (`+this.offset+`/`+this.length+`)`+(this.parent?` parent: {`+this.parent.toString()+`}`:``)},e})();(function(e){WU(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.type=`null`,r.value=null,r}return t})(KU),(function(e){WU(t,e);function t(t,n,r){var i=e.call(this,t,r)||this;return i.type=`boolean`,i.value=n,i}return t})(KU),(function(e){WU(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.type=`array`,r.items=[],r}return Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!1,configurable:!0}),t})(KU),(function(e){WU(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.type=`number`,r.isInteger=!0,r.value=NaN,r}return t})(KU),(function(e){WU(t,e);function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.type=`string`,i.value=``,i}return t})(KU),(function(e){WU(t,e);function t(t,n,r){var i=e.call(this,t,n)||this;return i.type=`property`,i.colonOffset=-1,i.keyNode=r,i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!1,configurable:!0}),t})(KU),(function(e){WU(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.type=`object`,r.properties=[],r}return Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!1,configurable:!0}),t})(KU);function qU(e){return RU(e)?e?{}:{not:{}}:e}var JU;(function(e){e[e.Key=0]=`Key`,e[e.Enum=1]=`Enum`})(JU||={});var YU=(function(){function e(e,t){e===void 0&&(e=-1),this.focusOffset=e,this.exclude=t,this.schemas=[]}return e.prototype.add=function(e){this.schemas.push(e)},e.prototype.merge=function(e){Array.prototype.push.apply(this.schemas,e.schemas)},e.prototype.include=function(e){return(this.focusOffset===-1||$U(e,this.focusOffset))&&e!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e})(),XU=(function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.add=function(e){},e.prototype.merge=function(e){},e.prototype.include=function(e){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e})(),ZU=(function(){function e(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}return e.prototype.hasProblems=function(){return!!this.problems.length},e.prototype.mergeAll=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];this.merge(r)}},e.prototype.merge=function(e){this.problems=this.problems.concat(e.problems)},e.prototype.mergeEnumValues=function(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(var t=0,n=this.problems;t<n.length;t++){var r=n[t];r.code===BU.EnumValueMismatch&&(r.message=$(`enumWarning`,`Value is not accepted. Valid values: {0}.`,this.enumValues.map(function(e){return JSON.stringify(e)}).join(`, `)))}}},e.prototype.mergePropertyMatch=function(e){this.merge(e),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&e.enumValues.length===1&&this.primaryValueMatches++},e.prototype.compare=function(e){var t=this.hasProblems();return t===e.hasProblems()?this.enumValueMatch===e.enumValueMatch?this.primaryValueMatches===e.primaryValueMatches?this.propertiesValueMatches===e.propertiesValueMatches?this.propertiesMatches-e.propertiesMatches:this.propertiesValueMatches-e.propertiesValueMatches:this.primaryValueMatches-e.primaryValueMatches:e.enumValueMatch?-1:1:t?-1:1},e})();function QU(e){return Vs(e)}function $U(e,t,n){return n===void 0&&(n=!1),t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}(function(){function e(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=[]),this.root=e,this.syntaxErrors=t,this.comments=n}return e.prototype.getNodeFromOffset=function(e,t){if(t===void 0&&(t=!1),this.root)return Bs(this.root,e,t)},e.prototype.visit=function(e){if(this.root){var t=function(n){var r=e(n),i=n.children;if(Array.isArray(i))for(var a=0;a<i.length&&r;a++)r=t(i[a]);return r};t(this.root)}},e.prototype.validate=function(e,t,n){if(n===void 0&&(n=N.Warning),this.root&&t){var r=new ZU;return eW(this.root,t,r,XU.instance),r.problems.map(function(t){var r=M.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return Dc.create(r,t.message,t.severity??n,t.code)})}},e.prototype.getMatchingSchemas=function(e,t,n){t===void 0&&(t=-1);var r=new YU(t,n);return this.root&&e&&eW(this.root,e,new ZU,r),r.schemas},e})();function eW(e,t,n,r){if(!e||!r.include(e))return;var i=e;switch(i.type){case`object`:l(i,t,n,r);break;case`array`:c(i,t,n,r);break;case`string`:s(i,t,n,r);break;case`number`:o(i,t,n,r);break;case`property`:return eW(i.valueNode,t,n,r)}a(),r.add({node:i,schema:t});function a(){function e(e){return i.type===e||e===`integer`&&i.type===`number`&&i.isInteger}if(Array.isArray(t.type)?t.type.some(e)||n.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||$(`typeArrayMismatchWarning`,`Incorrect type. Expected one of {0}.`,t.type.join(`, `))}):t.type&&(e(t.type)||n.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||$(`typeMismatchWarning`,`Incorrect type. Expected "{0}".`,t.type)})),Array.isArray(t.allOf))for(var a=0,o=t.allOf;a<o.length;a++){var s=o[a];eW(i,qU(s),n,r)}var c=qU(t.not);if(c){var l=new ZU,u=r.newSub();eW(i,c,l,u),l.hasProblems()||n.problems.push({location:{offset:i.offset,length:i.length},message:$(`notSchemaWarning`,`Matches a schema that is not allowed.`)});for(var d=0,f=u.schemas;d<f.length;d++){var p=f[d];p.inverted=!p.inverted,r.add(p)}}var m=function(e,t){for(var a=[],o=void 0,s=0,c=e;s<c.length;s++){var l=c[s],u=qU(l),d=new ZU,f=r.newSub();if(eW(i,u,d,f),d.hasProblems()||a.push(u),!o)o={schema:u,validationResult:d,matchingSchemas:f};else if(!t&&!d.hasProblems()&&!o.validationResult.hasProblems())o.matchingSchemas.merge(f),o.validationResult.propertiesMatches+=d.propertiesMatches,o.validationResult.propertiesValueMatches+=d.propertiesValueMatches;else{var p=d.compare(o.validationResult);p>0?o={schema:u,validationResult:d,matchingSchemas:f}:p===0&&(o.matchingSchemas.merge(f),o.validationResult.mergeEnumValues(d))}}return a.length>1&&t&&n.problems.push({location:{offset:i.offset,length:1},message:$(`oneOfWarning`,`Matches multiple schemas when only one must validate.`)}),o&&(n.merge(o.validationResult),n.propertiesMatches+=o.validationResult.propertiesMatches,n.propertiesValueMatches+=o.validationResult.propertiesValueMatches,r.merge(o.matchingSchemas)),a.length};Array.isArray(t.anyOf)&&m(t.anyOf,!1),Array.isArray(t.oneOf)&&m(t.oneOf,!0);var h=function(e){var t=new ZU,a=r.newSub();eW(i,qU(e),t,a),n.merge(t),n.propertiesMatches+=t.propertiesMatches,n.propertiesValueMatches+=t.propertiesValueMatches,r.merge(a)},g=function(e,t,n){var a=qU(e),o=new ZU,s=r.newSub();eW(i,a,o,s),r.merge(s),o.hasProblems()?n&&h(n):t&&h(t)},_=qU(t.if);if(_&&g(_,qU(t.then),qU(t.else)),Array.isArray(t.enum)){for(var v=QU(i),y=!1,b=0,x=t.enum;b<x.length;b++){var S=x[b];if(FU(v,S)){y=!0;break}}n.enumValues=t.enum,n.enumValueMatch=y,y||n.problems.push({location:{offset:i.offset,length:i.length},code:BU.EnumValueMismatch,message:t.errorMessage||$(`enumWarning`,`Value is not accepted. Valid values: {0}.`,t.enum.map(function(e){return JSON.stringify(e)}).join(`, `))})}if(LU(t.const)){var v=QU(i);FU(v,t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:i.offset,length:i.length},code:BU.EnumValueMismatch,message:t.errorMessage||$(`constWarning`,`Value must be {0}.`,JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]}t.deprecationMessage&&i.parent&&n.problems.push({location:{offset:i.parent.offset,length:i.parent.length},severity:N.Warning,message:t.deprecationMessage,code:BU.Deprecated})}function o(e,t,n,r){var i=e.value;function a(e){var t=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(e.toString());return t&&{value:Number(t[1]+(t[2]||``)),multiplier:(t[2]?.length||0)-(parseInt(t[3])||0)}}if(IU(t.multipleOf)){var o=-1;if(Number.isInteger(t.multipleOf))o=i%t.multipleOf;else{var s=a(t.multipleOf),c=a(i);if(s&&c){var l=10**Math.abs(c.multiplier-s.multiplier);c.multiplier<s.multiplier?c.value*=l:s.value*=l,o=c.value%s.value}}o!==0&&n.problems.push({location:{offset:e.offset,length:e.length},message:$(`multipleOfWarning`,`Value is not divisible by {0}.`,t.multipleOf)})}function u(e,t){if(IU(t))return t;if(RU(t)&&t)return e}function d(e,t){if(!RU(t)||!t)return e}var f=u(t.minimum,t.exclusiveMinimum);IU(f)&&i<=f&&n.problems.push({location:{offset:e.offset,length:e.length},message:$(`exclusiveMinimumWarning`,`Value is below the exclusive minimum of {0}.`,f)});var p=u(t.maximum,t.exclusiveMaximum);IU(p)&&i>=p&&n.problems.push({location:{offset:e.offset,length:e.length},message:$(`exclusiveMaximumWarning`,`Value is above the exclusive maximum of {0}.`,p)});var m=d(t.minimum,t.exclusiveMinimum);IU(m)&&i<m&&n.problems.push({location:{offset:e.offset,length:e.length},message:$(`minimumWarning`,`Value is below the minimum of {0}.`,m)});var h=d(t.maximum,t.exclusiveMaximum);IU(h)&&i>h&&n.problems.push({location:{offset:e.offset,length:e.length},message:$(`maximumWarning`,`Value is above the maximum of {0}.`,h)})}function s(e,t,n,r){if(IU(t.minLength)&&e.value.length<t.minLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:$(`minLengthWarning`,`String is shorter than the minimum length of {0}.`,t.minLength)}),IU(t.maxLength)&&e.value.length>t.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:$(`maxLengthWarning`,`String is longer than the maximum length of {0}.`,t.maxLength)}),zU(t.pattern)&&(PU(t.pattern).test(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||$(`patternWarning`,`String does not match the pattern of "{0}".`,t.pattern)})),t.format)switch(t.format){case`uri`:case`uri-reference`:var i=void 0;if(!e.value)i=$(`uriEmpty`,`URI expected.`);else{var a=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);a?!a[2]&&t.format===`uri`&&(i=$(`uriSchemeMissing`,`URI with a scheme is expected.`)):i=$(`uriMissing`,`URI is expected.`)}i&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||$(`uriFormatWarning`,`String is not a URI: {0}`,i)});break;case`color-hex`:case`date-time`:case`date`:case`time`:case`email`:var o=GU[t.format];(!e.value||!o.pattern.exec(e.value))&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||o.errorMessage})}}function c(e,t,n,r){if(Array.isArray(t.items)){for(var i=t.items,a=0;a<i.length;a++){var o=i[a],s=qU(o),c=new ZU,l=e.items[a];l?(eW(l,s,c,r),n.mergePropertyMatch(c)):e.items.length>=i.length&&n.propertiesValueMatches++}if(e.items.length>i.length){if(typeof t.additionalItems==`object`)for(var u=i.length;u<e.items.length;u++){var c=new ZU;eW(e.items[u],t.additionalItems,c,r),n.mergePropertyMatch(c)}else t.additionalItems===!1&&n.problems.push({location:{offset:e.offset,length:e.length},message:$(`additionalItemsWarning`,`Array has too many items according to schema. Expected {0} or fewer.`,i.length)})}}else{var d=qU(t.items);if(d)for(var f=0,p=e.items;f<p.length;f++){var l=p[f],c=new ZU;eW(l,d,c,r),n.mergePropertyMatch(c)}}var m=qU(t.contains);if(m&&(e.items.some(function(e){var t=new ZU;return eW(e,m,t,XU.instance),!t.hasProblems()})||n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||$(`requiredItemMissingWarning`,`Array does not contain required item.`)})),IU(t.minItems)&&e.items.length<t.minItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:$(`minItemsWarning`,`Array has too few items. Expected {0} or more.`,t.minItems)}),IU(t.maxItems)&&e.items.length>t.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:$(`maxItemsWarning`,`Array has too many items. Expected {0} or fewer.`,t.maxItems)}),t.uniqueItems===!0){var h=QU(e);h.some(function(e,t){return t!==h.lastIndexOf(e)})&&n.problems.push({location:{offset:e.offset,length:e.length},message:$(`uniqueItemsWarning`,`Array has duplicate items.`)})}}function l(e,t,n,r){for(var i=Object.create(null),a=[],o=0,s=e.properties;o<s.length;o++){var c=s[o],l=c.keyNode.value;i[l]=c.valueNode,a.push(l)}if(Array.isArray(t.required))for(var u=0,d=t.required;u<d.length;u++){var f=d[u];if(!i[f]){var p=e.parent&&e.parent.type===`property`&&e.parent.keyNode,m=p?{offset:p.offset,length:p.length}:{offset:e.offset,length:1};n.problems.push({location:m,message:$(`MissingRequiredPropWarning`,`Missing property "{0}".`,f)})}}var h=function(e){for(var t=a.indexOf(e);t>=0;)a.splice(t,1),t=a.indexOf(e)};if(t.properties)for(var g=0,_=Object.keys(t.properties);g<_.length;g++){var f=_[g];h(f);var v=t.properties[f],y=i[f];if(y){if(RU(v)){if(v)n.propertiesMatches++,n.propertiesValueMatches++;else{var c=y.parent;n.problems.push({location:{offset:c.keyNode.offset,length:c.keyNode.length},message:t.errorMessage||$(`DisallowedExtraPropWarning`,`Property {0} is not allowed.`,f)})}}else{var b=new ZU;eW(y,v,b,r),n.mergePropertyMatch(b)}}}if(t.patternProperties)for(var x=0,S=Object.keys(t.patternProperties);x<S.length;x++)for(var C=S[x],ee=PU(C),te=0,ne=a.slice(0);te<ne.length;te++){var f=ne[te];if(ee.test(f)){h(f);var y=i[f];if(y){var v=t.patternProperties[C];if(RU(v)){if(v)n.propertiesMatches++,n.propertiesValueMatches++;else{var c=y.parent;n.problems.push({location:{offset:c.keyNode.offset,length:c.keyNode.length},message:t.errorMessage||$(`DisallowedExtraPropWarning`,`Property {0} is not allowed.`,f)})}}else{var b=new ZU;eW(y,v,b,r),n.mergePropertyMatch(b)}}}}if(typeof t.additionalProperties==`object`)for(var re=0,ie=a;re<ie.length;re++){var f=ie[re],y=i[f];if(y){var b=new ZU;eW(y,t.additionalProperties,b,r),n.mergePropertyMatch(b)}}else if(t.additionalProperties===!1&&a.length>0)for(var ae=0,oe=a;ae<oe.length;ae++){var f=oe[ae],y=i[f];if(y){var c=y.parent;n.problems.push({location:{offset:c.keyNode.offset,length:c.keyNode.length},message:t.errorMessage||$(`DisallowedExtraPropWarning`,`Property {0} is not allowed.`,f)})}}if(IU(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:$(`MaxPropWarning`,`Object has more properties than limit of {0}.`,t.maxProperties)}),IU(t.minProperties)&&e.properties.length<t.minProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:$(`MinPropWarning`,`Object has fewer properties than the required number of {0}`,t.minProperties)}),t.dependencies)for(var se=0,ce=Object.keys(t.dependencies);se<ce.length;se++){var l=ce[se];if(i[l]){var le=t.dependencies[l];if(Array.isArray(le))for(var ue=0,de=le;ue<de.length;ue++){var fe=de[ue];i[fe]?n.propertiesValueMatches++:n.problems.push({location:{offset:e.offset,length:e.length},message:$(`RequiredDependentPropWarning`,`Object is missing property {0} required by property {1}.`,fe,l)})}else{var v=qU(le);if(v){var b=new ZU;eW(e,v,b,r),n.mergePropertyMatch(b)}}}}var w=qU(t.propertyNames);if(w)for(var pe=0,me=e.properties;pe<me.length;pe++){var l=me[pe].keyNode;l&&eW(l,w,n,XU.instance)}}}function tW(e,t){if(typeof e!=`string`)throw TypeError(`Expected a string`);for(var n=String(e),r=``,i=t?!!t.extended:!1,a=t?!!t.globstar:!1,o=!1,s=t&&typeof t.flags==`string`?t.flags:``,c,l=0,u=n.length;l<u;l++)switch(c=n[l],c){case`/`:case`$`:case`^`:case`+`:case`.`:case`(`:case`)`:case`=`:case`!`:case`|`:r+=`\\`+c;break;case`?`:if(i){r+=`.`;break}case`[`:case`]`:if(i){r+=c;break}case`{`:if(i){o=!0,r+=`(`;break}case`}`:if(i){o=!1,r+=`)`;break}case`,`:if(o){r+=`|`;break}r+=`\\`+c;break;case`*`:for(var d=n[l-1],f=1;n[l+1]===`*`;)f++,l++;var p=n[l+1];a?f>1&&(d===`/`||d===void 0||d===`{`||d===`,`)&&(p===`/`||p===void 0||p===`,`||p===`}`)?(p===`/`?l++:d===`/`&&r.endsWith(`\\/`)&&(r=r.substr(0,r.length-2)),r+=`((?:[^/]*(?:/|$))*)`):r+=`([^/]*)`:r+=`.*`;break;default:r+=c}return(!s||!~s.indexOf(`g`))&&(r=`^`+r+`$`),new RegExp(r,s)}var nW=UU(),rW=`!`,iW=`/`,aW=(function(){function e(e,t){this.globWrappers=[];try{for(var n=0,r=e;n<r.length;n++){var i=r[n],a=i[0]!==rW;a||(i=i.substring(1)),i.length>0&&(i[0]===iW&&(i=i.substring(1)),this.globWrappers.push({regexp:tW(`**/`+i,{extended:!0,globstar:!0}),include:a}))}this.uris=t}catch{this.globWrappers.length=0,this.uris=[]}}return e.prototype.matchesPattern=function(e){for(var t=!1,n=0,r=this.globWrappers;n<r.length;n++){var i=r[n],a=i.regexp,o=i.include;a.test(e)&&(t=o)}return t},e.prototype.getURIs=function(){return this.uris},e})(),oW=(function(){function e(e,t,n){this.service=e,this.url=t,this.dependencies={},n&&(this.unresolvedSchema=this.service.promise.resolve(new sW(n)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||=this.service.loadSchema(this.url),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var e=this;return this.resolvedSchema||=this.getUnresolvedSchema().then(function(t){return e.service.resolveSchemaContent(t,e.url,e.dependencies)}),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies={}},e})(),sW=(function(){function e(e,t){t===void 0&&(t=[]),this.schema=e,this.errors=t}return e})(),cW=(function(){function e(e,t){t===void 0&&(t=[]),this.schema=e,this.errors=t}return e.prototype.getSection=function(e){var t=this.getSectionRecursive(e,this.schema);if(t)return qU(t)},e.prototype.getSectionRecursive=function(e,t){if(!t||typeof t==`boolean`||e.length===0)return t;var n=e.shift();if(t.properties&&typeof t.properties[n])return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties)for(var r=0,i=Object.keys(t.patternProperties);r<i.length;r++){var a=i[r];if(PU(a).test(n))return this.getSectionRecursive(e,t.patternProperties[a])}else if(typeof t.additionalProperties==`object`)return this.getSectionRecursive(e,t.additionalProperties);else if(n.match(`[0-9]+`)){if(Array.isArray(t.items)){var o=parseInt(n,10);if(!isNaN(o)&&t.items[o])return this.getSectionRecursive(e,t.items[o])}else if(t.items)return this.getSectionRecursive(e,t.items)}},e})(),lW=(function(){function e(e,t,n){this.contextService=t,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(e){return Object.keys(this.registeredSchemasIds).filter(function(t){var n=Qs.parse(t).scheme;return n!==`schemaservice`&&(!e||e(n))})},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(e){var t=this;this.cachedSchemaForResource=void 0;var n=!1;e=dW(e);for(var r=[e],i=Object.keys(this.schemasById).map(function(e){return t.schemasById[e]});r.length;)for(var a=r.pop(),o=0;o<i.length;o++){var s=i[o];s&&(s.url===a||s.dependencies[a])&&(s.url!==a&&r.push(s.url),s.clearSchema(),i[o]=void 0,n=!0)}return n},e.prototype.setSchemaContributions=function(e){if(e.schemas){var t=e.schemas;for(var n in t){var r=dW(n);this.contributionSchemas[r]=this.addSchemaHandle(r,t[n])}}if(Array.isArray(e.schemaAssociations))for(var i=e.schemaAssociations,a=0,o=i;a<o.length;a++){var s=o[a],c=s.uris.map(dW),l=this.addFilePatternAssociation(s.pattern,c);this.contributionAssociations.push(l)}},e.prototype.addSchemaHandle=function(e,t){var n=new oW(this,e,t);return this.schemasById[e]=n,n},e.prototype.getOrAddSchemaHandle=function(e,t){return this.schemasById[e]||this.addSchemaHandle(e,t)},e.prototype.addFilePatternAssociation=function(e,t){var n=new aW(e,t);return this.filePatternAssociations.push(n),n},e.prototype.registerExternalSchema=function(e,t,n){var r=dW(e);return this.registeredSchemasIds[r]=!0,this.cachedSchemaForResource=void 0,t&&this.addFilePatternAssociation(t,[e]),n?this.addSchemaHandle(r,n):this.getOrAddSchemaHandle(r)},e.prototype.clearExternalSchemas=function(){for(var e in this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0,this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(var t=0,n=this.contributionAssociations;t<n.length;t++){var r=n[t];this.filePatternAssociations.push(r)}},e.prototype.getResolvedSchema=function(e){var t=dW(e),n=this.schemasById[t];return n?n.getResolvedSchema():this.promise.resolve(void 0)},e.prototype.loadSchema=function(e){if(!this.requestService){var t=nW(`json.schema.norequestservice`,`Unable to load schema from '{0}'. No schema request service available`,pW(e));return this.promise.resolve(new sW({},[t]))}return this.requestService(e).then(function(t){if(!t)return new sW({},[nW(`json.schema.nocontent`,`Unable to load schema from '{0}': No content.`,pW(e))]);var n={},r=[];n=zs(t,r);var i=r.length?[nW(`json.schema.invalidFormat`,`Unable to parse content from '{0}': Parse error at offset {1}.`,pW(e),r[0].offset)]:[];return new sW(n,i)},function(t){var n=t.toString(),r=t.toString().split(`Error: `);return r.length>1&&(n=r[1]),NU(n,`.`)&&(n=n.substr(0,n.length-1)),new sW({},[nW(`json.schema.nocontent`,`Unable to load schema from '{0}': {1}.`,pW(e),n)])})},e.prototype.resolveSchemaContent=function(e,t,n){var r=this,i=e.errors.slice(0),a=e.schema;if(a.$schema){var o=dW(a.$schema);if(o===`http://json-schema.org/draft-03/schema`)return this.promise.resolve(new cW({},[nW(`json.schema.draft03.notsupported`,`Draft-03 schemas are not supported.`)]));o===`https://json-schema.org/draft/2019-09/schema`&&i.push(nW(`json.schema.draft201909.notsupported`,`Draft 2019-09 schemas are not yet fully supported.`))}var s=this.contextService,c=function(e,t){if(!t)return e;var n=e;return t[0]===`/`&&(t=t.substr(1)),t.split(`/`).some(function(e){return e=e.replace(/~1/g,`/`).replace(/~0/g,`~`),n=n[e],!n}),n},l=function(e,t,n,r){var a=r?decodeURIComponent(r):void 0,o=c(t,a);if(o)for(var s in o)o.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(e[s]=o[s]);else i.push(nW(`json.schema.invalidref`,`$ref '{0}' in '{1}' can not be resolved.`,a,n))},u=function(e,t,n,a,o){s&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(t)&&(t=s.resolveRelativePath(t,a)),t=dW(t);var c=r.getOrAddSchemaHandle(t);return c.getUnresolvedSchema().then(function(r){if(o[t]=!0,r.errors.length){var a=n?t+`#`+n:t;i.push(nW(`json.schema.problemloadingref`,`Problems loading reference '{0}': {1}`,a,r.errors[0]))}return l(e,r.schema,t,n),d(e,r.schema,t,c.dependencies)})},d=function(e,t,n,i){if(!e||typeof e!=`object`)return Promise.resolve(null);for(var a=[e],o=[],s=[],c=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var i=r[n];typeof i==`object`&&a.push(i)}},d=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var i=r[n];if(typeof i==`object`)for(var o in i){var s=i[o];typeof s==`object`&&a.push(s)}}},f=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var i=r[n];if(Array.isArray(i))for(var o=0,s=i;o<s.length;o++){var c=s[o];typeof c==`object`&&a.push(c)}}},p=function(e){for(var r=[];e.$ref;){var a=e.$ref,o=a.split(`#`,2);if(delete e.$ref,o[0].length>0){s.push(u(e,o[0],o[1],n,i));return}r.indexOf(a)===-1&&(l(e,t,n,o[1]),r.push(a))}c(e.items,e.additionalItems,e.additionalProperties,e.not,e.contains,e.propertyNames,e.if,e.then,e.else),d(e.definitions,e.properties,e.patternProperties,e.dependencies),f(e.anyOf,e.allOf,e.oneOf,e.items)};a.length;){var m=a.pop();o.indexOf(m)>=0||(o.push(m),p(m))}return r.promise.all(s)};return d(a,a,t,n).then(function(e){return new cW(a,i)})},e.prototype.getSchemaForResource=function(e,t){if(t&&t.root&&t.root.type===`object`){var n=t.root.properties.filter(function(e){return e.keyNode.value===`$schema`&&e.valueNode&&e.valueNode.type===`string`});if(n.length>0){var r=n[0].valueNode;if(r&&r.type===`string`){var i=QU(r);if(i&&MU(i,`.`)&&this.contextService&&(i=this.contextService.resolveRelativePath(i,e)),i){var a=dW(i);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;for(var o=Object.create(null),s=[],c=fW(e),l=0,u=this.filePatternAssociations;l<u.length;l++){var d=u[l];if(d.matchesPattern(c))for(var f=0,p=d.getURIs();f<p.length;f++){var m=p[f];o[m]||(s.push(m),o[m]=!0)}}var h=s.length>0?this.createCombinedSchema(e,s).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:h},h},e.prototype.createCombinedSchema=function(e,t){if(t.length===1)return this.getOrAddSchemaHandle(t[0]);var n=`schemaservice://combinedSchema/`+encodeURIComponent(e),r={allOf:t.map(function(e){return{$ref:e}})};return this.addSchemaHandle(n,r)},e.prototype.getMatchingSchemas=function(e,t,n){if(n){var r=n.id||`schemaservice://untitled/matchingSchemas/`+uW++;return this.resolveSchemaContent(new sW(n),r,{}).then(function(e){return t.getMatchingSchemas(e.schema).filter(function(e){return!e.inverted})})}return this.getSchemaForResource(e.uri,t).then(function(e){return e?t.getMatchingSchemas(e.schema).filter(function(e){return!e.inverted}):[]})},e})(),uW=0;function dW(e){try{return Qs.parse(e).toString()}catch{return e}}function fW(e){try{return Qs.parse(e).with({fragment:null,query:null}).toString()}catch{return e}}function pW(e){try{var t=Qs.parse(e);if(t.scheme===`file`)return t.fsPath}catch{}return e}var mW;(function(e){e.draft04=`draft04`,e.draft07=`draft07`,e.draft2019=`draft2019-09`,e.draft2020=`draft2020-12`})(mW||={});function hW(e){switch(e.type){case`array`:return e.children.map(hW);case`object`:{let t=Object.create(null);for(let n=0,r=e.children;n<r.length;n++){let e=r[n],i=e.children[1];i&&(t[e.children[0].value]=hW(i))}return t}case`null`:case`string`:case`number`:return e.value;case`boolean`:return e.source;default:return}}function gW(e,t,n=!1){return t>=e.offset&&t<=e.offset+e.length||n&&t===e.offset+e.length}function _W(e,t,n){if(n===void 0&&(n=!1),gW(e,t,n)){let r=e.children;if(Array.isArray(r))for(let e=0;e<r.length&&r[e].offset<=t;e++){let i=_W(r[e],t,n);if(i)return i}return e}}function vW(e){if([`true`,`True`,`TRUE`,`y`,`Y`,`yes`,`Yes`,`YES`,`on`,`On`,`ON`].lastIndexOf(e)>=0)return!0;if([`false`,`False`,`FALSE`,`n`,`N`,`no`,`No`,`NO`,`off`,`Off`,`OFF`].lastIndexOf(e)>=0)return!1;throw`Invalid boolean "${e}"`}function yW(e,t,n){if(n===`boolean`&&typeof e==`string`&&(e=vW(e)),e===t)return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!=`object`||Array.isArray(e)!==Array.isArray(t))return!1;let r,i;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(r=0;r<e.length;r++)if(!yW(e[r],t[r]))return!1}else{let n=[];for(i in e)n.push(i);n.sort();let a=[];for(i in t)a.push(i);if(a.sort(),!yW(n,a))return!1;for(r=0;r<n.length;r++)if(!yW(e[n[r]],t[n[r]]))return!1}return!0}function bW(e){return typeof e==`number`}function xW(e){return e!==void 0}function SW(e){return typeof e==`boolean`}function CW(e){return typeof e==`string`}function wW(e){return Symbol.iterator in Object(e)}function TW(e){let t=e.type&&e.closestTitle;return e.title?e.title:e.$id?EW(e.$id):e.$ref||e._$ref?EW(e.$ref||e._$ref):Array.isArray(e.type)?e.type.join(` | `):t?e.type.concat(`(`,e.closestTitle,`)`):e.type||e.closestTitle}function EW(e){let t=e.match(/^(?:.*\/)?(.*?)(?:\.schema\.json)?$/),n=!!t&&t[1];return n||(n=`typeNotFound`,console.error(`$ref (${e}) not parsed properly`)),n}function DW(e,t){let n=Qs.parse(t),r=Ul.basename(n.fsPath);return Ul.extname(n.fsPath)||(r+=`.json`),Object.getOwnPropertyDescriptor(e,`name`)?Object.getOwnPropertyDescriptor(e,`name`).value+` (${r})`:e.title?e.description?e.title+` - `+e.description+` (${r})`:e.title+` (${r})`:r}function OW(e){return e.type!==`object`&&!kW(e)}function kW(e){return!!(e.anyOf||e.allOf||e.oneOf)}function AW(e,t){for(let n of t.documents)if(n.internalDocument&&n.internalDocument.range[0]<=e&&n.internalDocument.range[2]>=e)return n;return t.documents.length===1?t.documents[0]:null}function jW(e){let t=[`mapping`,`scalar`,`sequence`];return e?e.filter(e=>{if(typeof e==`string`){let n=e.split(` `),r=n[1]&&n[1].toLowerCase()||`scalar`;return r!==`map`&&t.indexOf(r)!==-1}return!1}):[]}function MW(e,t){if(!t||!e||t.length!==e.length)return!1;for(let n=e.length-1;n>=0;n--)if(e[n]!==t[n])return!1;return!0}function NW(e){return e.replace(/[-\\{}+?|^$.,[\]()#\s]/g,`\\$&`).replace(/[*]/g,`.*`)}function PW(e,t){if(e.length<t)return 0;for(let n=0;n<t;n++){let t=e.charCodeAt(n);if(t!==32&&t!==9)return n}return t}function FW(e){let t=``;e=e.replace(/\(\?([ims]+)\)/g,(e,n)=>{for(let e of n)t.includes(e)||(t+=e);return``});try{return new RegExp(e,t+`u`)}catch{try{return new RegExp(e,t)}catch{return}}}function IW(e,t){t++;for(let n=t;n<e.length;n++){let r=e.charAt(n);if(r===` `||r===` `)t++;else return t}return t}var LW=class{constructor(e){try{this.patternRegExp=RegExp(NW(e)+`$`)}catch{this.patternRegExp=null}this.schemas=[]}addSchema(e){this.schemas.push(e)}matchesPattern(e){return this.patternRegExp&&this.patternRegExp.test(e)}getSchemas(){return this.schemas}};function RW(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=Math.max(n,r);return parseInt(e.toFixed(i).replace(`.`,``))%parseInt(t.toFixed(i).replace(`.`,``))/10**i}var zW=UU(),BW=(function(){function e(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}return e.prototype.configure=function(e){e&&(this.validationEnabled=e.validate!==!1,this.commentSeverity=e.allowComments?void 0:N.Error)},e.prototype.doValidation=function(e,t,n,r){var i=this;if(!this.validationEnabled)return this.promise.resolve([]);var a=[],o={},s=function(e){var t=e.range.start.line+` `+e.range.start.character+` `+e.message;o[t]||(o[t]=!0,a.push(e))},c=function(r){var o=n?.trailingCommas?WW(n.trailingCommas):N.Error,c=n?.comments?WW(n.comments):i.commentSeverity,l=n?.schemaValidation?WW(n.schemaValidation):N.Warning,u=n?.schemaRequest?WW(n.schemaRequest):N.Warning;if(r){if(r.errors.length&&t.root&&u){var d=t.root,f=d.type===`object`?d.properties[0]:void 0;if(f&&f.keyNode.value===`$schema`){var p=f.valueNode||f,m=M.create(e.positionAt(p.offset),e.positionAt(p.offset+p.length));s(Dc.create(m,r.errors[0],u,BU.SchemaResolveError))}else{var m=M.create(e.positionAt(d.offset),e.positionAt(d.offset+1));s(Dc.create(m,r.errors[0],u,BU.SchemaResolveError))}}else if(l){var h=t.validate(e,r.schema,l);h&&h.forEach(s)}HW(r.schema)&&(c=void 0),UW(r.schema)&&(o=void 0)}for(var g=0,_=t.syntaxErrors;g<_.length;g++){var v=_[g];if(v.code===BU.TrailingComma){if(typeof o!=`number`)continue;v.severity=o}s(v)}if(typeof c==`number`){var y=zW(`InvalidCommentToken`,`Comments are not permitted in JSON.`);t.comments.forEach(function(e){s(Dc.create(e,y,c,BU.CommentNotPermitted))})}return a};if(r){var l=r.id||`schemaservice://untitled/`+VW++;return this.jsonSchemaService.resolveSchemaContent(new sW(r),l,{}).then(function(e){return c(e)})}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then(function(e){return c(e)})},e})(),VW=0;function HW(e){if(e&&typeof e==`object`){if(RU(e.allowComments))return e.allowComments;if(e.allOf)for(var t=0,n=e.allOf;t<n.length;t++){var r=n[t],i=HW(r);if(RU(i))return i}}}function UW(e){if(e&&typeof e==`object`){if(RU(e.allowTrailingCommas))return e.allowTrailingCommas;var t=e;if(RU(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(var n=0,r=e.allOf;n<r.length;n++){var i=r[n],a=UW(i);if(RU(a))return a}}}function WW(e){switch(e){case`error`:return N.Error;case`warning`:return N.Warning;case`ignore`:return}}var GW=48,KW=57,qW=65,JW=97,YW=102;function XW(e){return e<GW?0:e<=KW?e-GW:(e<JW&&(e+=JW-qW),e>=JW&&e<=YW?e-JW+10:0)}function ZW(e){if(e[0]===`#`)switch(e.length){case 4:return{red:XW(e.charCodeAt(1))*17/255,green:XW(e.charCodeAt(2))*17/255,blue:XW(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:XW(e.charCodeAt(1))*17/255,green:XW(e.charCodeAt(2))*17/255,blue:XW(e.charCodeAt(3))*17/255,alpha:XW(e.charCodeAt(4))*17/255};case 7:return{red:(XW(e.charCodeAt(1))*16+XW(e.charCodeAt(2)))/255,green:(XW(e.charCodeAt(3))*16+XW(e.charCodeAt(4)))/255,blue:(XW(e.charCodeAt(5))*16+XW(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(XW(e.charCodeAt(1))*16+XW(e.charCodeAt(2)))/255,green:(XW(e.charCodeAt(3))*16+XW(e.charCodeAt(4)))/255,blue:(XW(e.charCodeAt(5))*16+XW(e.charCodeAt(6)))/255,alpha:(XW(e.charCodeAt(7))*16+XW(e.charCodeAt(8)))/255}}}var QW=(function(){function e(e){this.schemaService=e}return e.prototype.findDocumentSymbols=function(e,t,n){var r=this;n===void 0&&(n={resultLimit:Number.MAX_VALUE});var i=t.root;if(!i)return[];var a=n.resultLimit||Number.MAX_VALUE,o=e.uri;if((o===`vscode://defaultsettings/keybindings.json`||NU(o.toLowerCase(),`/user/keybindings.json`))&&i.type===`array`){for(var s=[],c=0,l=i.items;c<l.length;c++){var u=l[c];if(u.type===`object`)for(var d=0,f=u.properties;d<f.length;d++){var p=f[d];if(p.keyNode.value===`key`&&p.valueNode){var m=_c.create(e.uri,$W(e,u));if(s.push({name:QU(p.valueNode),kind:sl.Function,location:m}),a--,a<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(o),s}}}return s}for(var h=[{node:i,containerName:``}],g=0,_=!1,v=[],y=function(t,n){t.type===`array`?t.items.forEach(function(e){e&&h.push({node:e,containerName:n})}):t.type===`object`&&t.properties.forEach(function(t){var i=t.valueNode;if(i){if(a>0){a--;var o=_c.create(e.uri,$W(e,t)),s=n?n+`.`+t.keyNode.value:t.keyNode.value;v.push({name:r.getKeyLabel(t),kind:r.getSymbolKind(i.type),location:o,containerName:n}),h.push({node:i,containerName:s})}else _=!0}})};g<h.length;){var b=h[g++];y(b.node,b.containerName)}return _&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(o),v},e.prototype.findDocumentSymbols2=function(e,t,n){var r=this;n===void 0&&(n={resultLimit:Number.MAX_VALUE});var i=t.root;if(!i)return[];var a=n.resultLimit||Number.MAX_VALUE,o=e.uri;if((o===`vscode://defaultsettings/keybindings.json`||NU(o.toLowerCase(),`/user/keybindings.json`))&&i.type===`array`){for(var s=[],c=0,l=i.items;c<l.length;c++){var u=l[c];if(u.type===`object`)for(var d=0,f=u.properties;d<f.length;d++){var p=f[d];if(p.keyNode.value===`key`&&p.valueNode){var m=$W(e,u),h=$W(e,p.keyNode);if(s.push({name:QU(p.valueNode),kind:sl.Function,range:m,selectionRange:h}),a--,a<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(o),s}}}return s}for(var g=[],_=[{node:i,result:g}],v=0,y=!1,b=function(t,n){t.type===`array`?t.items.forEach(function(t,i){if(t){if(a>0){a--;var o=$W(e,t),s=o,c={name:String(i),kind:r.getSymbolKind(t.type),range:o,selectionRange:s,children:[]};n.push(c),_.push({result:c.children,node:t})}else y=!0}}):t.type===`object`&&t.properties.forEach(function(t){var i=t.valueNode;if(i){if(a>0){a--;var o=$W(e,t),s=$W(e,t.keyNode),c=[],l={name:r.getKeyLabel(t),kind:r.getSymbolKind(i.type),range:o,selectionRange:s,children:c,detail:r.getDetail(i)};n.push(l),_.push({result:c,node:i})}else y=!0}})};v<_.length;){var x=_[v++];b(x.node,x.result)}return y&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(o),g},e.prototype.getSymbolKind=function(e){switch(e){case`object`:return sl.Module;case`string`:return sl.String;case`number`:return sl.Number;case`array`:return sl.Array;case`boolean`:return sl.Boolean;default:return sl.Variable}},e.prototype.getKeyLabel=function(e){var t=e.keyNode.value;return t&&=t.replace(/[\n]/g,`↵`),t&&t.trim()?t:`"`+t+`"`},e.prototype.getDetail=function(e){if(e){if(e.type===`boolean`||e.type===`number`||e.type===`null`||e.type===`string`)return String(e.value);if(e.type===`array`)return e.children.length?void 0:`[]`;if(e.type===`object`)return e.children.length?void 0:`{}`}},e.prototype.findDocumentColors=function(e,t,n){return this.schemaService.getSchemaForResource(e.uri,t).then(function(r){var i=[];if(r)for(var a=n&&typeof n.resultLimit==`number`?n.resultLimit:Number.MAX_VALUE,o=t.getMatchingSchemas(r.schema),s={},c=0,l=o;c<l.length;c++){var u=l[c];if(!u.inverted&&u.schema&&(u.schema.format===`color`||u.schema.format===`color-hex`)&&u.node&&u.node.type===`string`){var d=String(u.node.offset);if(!s[d]){var f=ZW(QU(u.node));if(f){var p=$W(e,u.node);i.push({color:f,range:p})}if(s[d]=!0,a--,a<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri),i}}}return i})},e.prototype.getColorPresentations=function(e,t,n,r){var i=[],a=Math.round(n.red*255),o=Math.round(n.green*255),s=Math.round(n.blue*255);function c(e){var t=e.toString(16);return t.length===2?t:`0`+t}var l=n.alpha===1?`#`+c(a)+c(o)+c(s):`#`+c(a)+c(o)+c(s)+c(Math.round(n.alpha*255));return i.push({label:l,textEdit:kc.replace(r,JSON.stringify(l))}),i},e})();function $W(e,t){return M.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function eG(e,t){var n=[];return t.visit(function(r){if(r.type===`property`&&r.keyNode.value===`$ref`&&r.valueNode?.type===`string`){var i=r.valueNode.value,a=nG(t,i);if(a){var o=e.positionAt(a.offset);n.push({target:e.uri+`#`+(o.line+1)+`,`+(o.character+1),range:tG(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function tG(e,t){return M.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function nG(e,t){var n=iG(t);return n?rG(n,e.root):null}function rG(e,t){if(!t)return null;if(e.length===0)return t;var n=e.shift();if(t&&t.type===`object`){var r=t.properties.find(function(e){return e.keyNode.value===n});return r?rG(e,r.valueNode):null}if(t&&t.type===`array`&&n.match(/^(0|[1-9][0-9]*)$/)){var i=Number.parseInt(n),a=t.items[i];return a?rG(e,a):null}return null}function iG(e){return e===`#`?[]:e[0]!==`#`||e[1]!==`/`?null:e.substring(2).split(/\//).map(aG)}function aG(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}var oG=`YAML`,sG=`yaml-schema: `,cG;(function(e){e.missingRequiredPropWarning=`missingRequiredPropWarning`,e.typeMismatchWarning=`typeMismatchWarning`,e.constWarning=`constWarning`})(cG||={});var lG={[cG.missingRequiredPropWarning]:`Missing property "{0}".`,[cG.typeMismatchWarning]:`Incorrect type. Expected "{0}".`,[cG.constWarning]:`Value must be {0}.`},uG=class e{constructor(e=-1,t=null){this.focusOffset=e,this.exclude=t,this.schemas=[]}add(e){this.schemas.push(e)}merge(e){this.schemas.push(...e.schemas)}include(e){return(this.focusOffset===-1||gW(e,this.focusOffset))&&e!==this.exclude}newSub(){return new e(-1,this.exclude)}},dG=class{constructor(){}get schemas(){return[]}add(){}merge(){}include(){return!0}newSub(){return this}};dG.instance=new dG;var fG={"color-hex":{errorMessage:F(`Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.`),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:F(`String is not a RFC3339 date-time.`),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:F(`String is not a RFC3339 date.`),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:F(`String is not a RFC3339 time.`),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:F(`String is not an e-mail address.`),pattern:/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/},ipv4:{errorMessage:F(`String does not match IPv4 format.`),pattern:/^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$/},ipv6:{errorMessage:F(`String does not match IPv6 format.`),pattern:/^([0-9a-f]|:){1,4}(:([0-9a-f]{0,4})*){1,7}$/i}},pG=class{constructor(e){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=null,e&&(this.enumValues=[])}getEvaluatedItems(e){this.evaluatedItemsByNode??=new Map;let t=this.evaluatedItemsByNode.get(e);return t||(t=new Set,this.evaluatedItemsByNode.set(e,t)),t}hasProblems(){return this.problems.length>0}merge(e){if(this.problems=this.problems.concat(e.problems),e.evaluatedProperties){this.evaluatedProperties??=new Set;for(let t of e.evaluatedProperties)this.evaluatedProperties.add(t)}if(e.evaluatedItemsByNode){this.evaluatedItemsByNode??=new Map;for(let[t,n]of e.evaluatedItemsByNode){let e=this.evaluatedItemsByNode.get(t);if(e)for(let t of n)e.add(t);else this.evaluatedItemsByNode.set(t,new Set(n))}}}mergeEnumValues(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(let e of this.problems)e.code===BU.EnumValueMismatch&&(e.message=F(`Value is not accepted. Valid values: {0}.`,[...new Set(this.enumValues)].map(e=>JSON.stringify(e)).join(`, `)))}}mergeWarningGeneric(e,t){if(this.problems?.length)for(let n of t){let t=this.problems.filter(e=>e.problemType===n);for(let r of t){let t=e.problems?.find(e=>e.problemType===n&&r.location.offset===e.location.offset&&(n!==cG.missingRequiredPropWarning||MW(e.problemArgs,r.problemArgs)));t&&(t.problemArgs?.length&&(t.problemArgs.filter(e=>!r.problemArgs.includes(e)).forEach(e=>r.problemArgs.push(e)),r.problemType&&(r.message=gG(r.problemType,r.problemArgs??[]))),this.mergeSources(t,r))}}}mergePropertyMatch(e,t=!0){t?this.merge(e):this.problems=this.problems.concat(e.problems),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&this.primaryValueMatches++}mergeSources(e,t){let n=(e.source??``).replace(sG,``);n&&t.source&&!t.source.includes(n)&&(t.source=t.source+` | `+n),t.schemaUri&&e.schemaUri&&!t.schemaUri.includes(e.schemaUri[0])&&(t.schemaUri=t.schemaUri.concat(e.schemaUri))}compareGeneric(e){let t=this.hasProblems();return t===e.hasProblems()?this.enumValueMatch===e.enumValueMatch?this.propertiesValueMatches===e.propertiesValueMatches?this.primaryValueMatches===e.primaryValueMatches?this.propertiesMatches-e.propertiesMatches:this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches-e.propertiesValueMatches:e.enumValueMatch?-1:1:t?-1:1}compareKubernetes(e){let t=this.hasProblems();return this.propertiesMatches===e.propertiesMatches?this.enumValueMatch===e.enumValueMatch?this.primaryValueMatches===e.primaryValueMatches?this.propertiesValueMatches===e.propertiesValueMatches?t===e.hasProblems()?this.propertiesMatches-e.propertiesMatches:t?-1:1:this.propertiesValueMatches-e.propertiesValueMatches:this.primaryValueMatches-e.primaryValueMatches:e.enumValueMatch?-1:1:this.propertiesMatches-e.propertiesMatches}},mG=class{collectSeenKeys(e){let t=Object.create(null),n=[...e.properties];for(;n.length>0;){let e=n.pop();if(!e)continue;let r=e.keyNode.value;if(r===`<<`&&e.valueNode){let t=e.valueNode;switch(t.type){case`object`:n.push(...t.properties);break;case`array`:t.items.forEach(e=>{e&&e.type===`object`&&wW(e.properties)&&n.push(...e.properties)})}}else t[r]=e.valueNode}return t}validateDocument(e,t,n,r){let i=new pG(r.isKubernetes);return this.validateNode(e,n,n,i,dG.instance,r),i.problems.map(e=>{let n=M.create(t.positionAt(e.location.offset),t.positionAt(e.location.offset+e.location.length)),r=Dc.create(n,e.message,e.severity,e.code?e.code:BU.Undefined,e.source);return r.data={schemaUri:e.schemaUri,...e.data},r})}getMatchingSchemas(e,t,n,r,i){let a=new uG(r,i);return this.validateNode(e,t,t,new pG(n.isKubernetes),a,n),a.schemas}getNoOpCollector(){return dG.instance}getSchemaSource(e,t){let n;if(e.title)n=e.title;else if(e.closestTitle)n=e.closestTitle;else if(t.closestTitle)n=t.closestTitle;else{let r=e.url??t.url;r&&(n=Qs.parse(r).toString())}return n?`${sG}${n}`:oG}getSchemaUri(e,t){let n=e.url??t.url;return n?[n]:[]}validateNode(e,t,n,r,i,a){if(e&&!(!t||typeof t!=`object`)){if(t._dialect){let o=t._dialect;if(o!==this.getCurrentDialect()){SG(o).validateNode(e,t,n,r,i,a);return}}switch(t.url||=n.url,t.closestTitle=t.title||n.closestTitle,e.type){case`object`:this.validateObjectNode(e,t,n,r,i,a);break;case`array`:this.validateArrayNode(e,t,n,r,i,a);break;case`string`:this.validateStringNode(e,t,n,r);break;case`number`:this.validateNumberNode(e,t,n,r);break;case`property`:this.validateNode(e.valueNode,t,t,r,i,a)}if(this.validateGenericNode(e,t,n,r,i,a),i.add({node:e,schema:t}),this.applyUnevaluatedItems(e,t,n,r,i,a),e.type===`object`){let o=this.collectSeenKeys(e);this.applyUnevaluatedProperties(e,t,n,r,i,a,o)}}}validateGenericNode(e,t,n,r,i,a){let{isKubernetes:o,callFromAutoComplete:s}=a,c=t=>e.type===t||t===`integer`&&e.type===`number`&&e.isInteger,l=(e,t)=>{if(t.evaluatedProperties){e.evaluatedProperties??=new Set;for(let n of t.evaluatedProperties)e.evaluatedProperties.add(n)}if(t.evaluatedItemsByNode){e.evaluatedItemsByNode??=new Map;for(let[n,r]of t.evaluatedItemsByNode){let t=e.evaluatedItemsByNode.get(n);if(t)for(let e of r)t.add(e);else e.evaluatedItemsByNode.set(n,new Set(r))}}};if(Array.isArray(t.type))t.type.some(c)||r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:t.errorMessage||F(`Incorrect type. Expected one of {0}.`,t.type.join(`, `)),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});else if(t.type&&!c(t.type)){let i=t.type===`object`?TW(t):t.type;r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:t.errorMessage||gG(cG.typeMismatchWarning,[i]),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n),problemType:cG.typeMismatchWarning,problemArgs:[i]})}if(Array.isArray(t.allOf))for(let n of t.allOf){let s=hG(n),c=new pG(o),l=i.newSub();this.validateNode(e,s,t,c,l,a),r.merge(c),r.propertiesMatches+=c.propertiesMatches,r.propertiesValueMatches+=c.propertiesValueMatches,i.merge(l)}let u=hG(t.not);if(u){let s=new pG(o),c=i.newSub();this.validateNode(e,u,t,s,c,a),s.hasProblems()||r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:F(`Matches a schema that is not allowed.`),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});for(let e of c.schemas)e.inverted=!e.inverted,i.add(e)}let d=(c,u)=>{let d=[],f=[],p=[],m=null;for(let n of c){let r={...hG(n)},c=new pG(o),l=i.newSub();this.validateNode(e,r,t,c,l,a),(!c.hasProblems()||s)&&(d.push(r),c.propertiesMatches===0&&f.push(r),r.format&&d.pop()),c.hasProblems()||p.push(c),m=m?o?this.alternativeComparison(c,m,r,l):this.genericComparison(e,u,c,m,r,l):{schema:r,validationResult:c,matchingSchemas:l}}if(d.length>1&&(d.length>1||f.length===0)&&u&&r.problems.push({location:{offset:e.offset,length:1},severity:N.Warning,message:F(`Matches multiple schemas when only one must validate.`),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),m&&(r.merge(m.validationResult),r.propertiesMatches+=m.validationResult.propertiesMatches,r.propertiesValueMatches+=m.validationResult.propertiesValueMatches,r.enumValueMatch=r.enumValueMatch||m.validationResult.enumValueMatch,m.validationResult.enumValues?.length&&(r.enumValues=(r.enumValues||[]).concat(m.validationResult.enumValues)),i.merge(m.matchingSchemas)),p.length>0)for(let e of p)l(r,e)};Array.isArray(t.anyOf)&&d(t.anyOf,!1),Array.isArray(t.oneOf)&&d(t.oneOf,!0);let f=(t,n)=>{let s=new pG(o),c=i.newSub();this.validateNode(e,hG(t),n,s,c,a),r.merge(s),r.propertiesMatches+=s.propertiesMatches,r.propertiesValueMatches+=s.propertiesValueMatches,i.merge(c)},p=(s,c,u,d)=>{let p=hG(s),m=new pG(o),h=i.newSub();this.validateNode(e,p,c,m,h,a),i.merge(h);let g=p?.filePatternAssociation;g&&(new LW(g).matchesPattern(a.uri)||m.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:F(`filePatternAssociation '{0}' does not match with doc uri '{1}'`,g,a.uri),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})),m.hasProblems()?d&&f(d,c):(l(r,m),u&&f(u,c))},m=hG(t.if);if(m&&p(m,t,hG(t.then),hG(t.else)),Array.isArray(t.enum)){let i=hW(e),a=!1;for(let n of t.enum)if(yW(i,n,e.type)||_G(s,e,i,n)){a=!0;break}r.enumValues=t.enum,r.enumValueMatch=a,a||r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,code:BU.EnumValueMismatch,message:t.errorMessage||F(`Value is not accepted. Valid values: {0}.`,(t.enum??[]).map(e=>JSON.stringify(e)).join(`, `)),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n),data:{values:t.enum}})}if(xW(t.const)){let i=hW(e),a=t.const;!yW(i,a,e.type)&&!_G(s,e,i,a)?(r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,code:BU.EnumValueMismatch,problemType:cG.constWarning,message:t.errorMessage||gG(cG.constWarning,[JSON.stringify(a)]),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n),problemArgs:[JSON.stringify(a)],data:{values:[a]}}),r.enumValueMatch=!1):r.enumValueMatch=!0,r.enumValues=[a]}t.deprecationMessage&&e.parent&&r.problems.push({location:{offset:e.parent.offset,length:e.parent.length},severity:N.Warning,message:t.deprecationMessage,source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}validateStringNode(e,t,n,r){let i=e.value;if(bW(t.minLength)&&i.length<(t.minLength??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:F(`String is shorter than the minimum length of {0}.`,t.minLength),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),bW(t.maxLength)&&i.length>(t.maxLength??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:F(`String is longer than the maximum length of {0}.`,t.maxLength),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),CW(t.pattern)){let a=FW(t.pattern);a?a.test(i)||r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:t.patternErrorMessage||t.errorMessage||F(`String does not match the pattern of "{0}".`,t.pattern),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}):r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:F(`Invalid pattern: "{0}"`,t.pattern),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}if(t.format)switch(t.format){case`uri`:case`uri-reference`:{let a;if(!i)a=F(`URI expected.`);else try{!Qs.parse(i).scheme&&t.format===`uri`&&(a=F(`URI with a scheme is expected.`))}catch(e){a=e instanceof Error?e.message:String(e)}a&&r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:t.patternErrorMessage||t.errorMessage||F(`String is not a URI: {0}`,a),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});break}case`color-hex`:case`date-time`:case`date`:case`time`:case`email`:case`ipv4`:case`ipv6`:{let a=fG[t.format];(!i||!a.pattern.test(i))&&r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:t.patternErrorMessage||t.errorMessage||F(a.errorMessage),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});break}}}validateNumberNode(e,t,n,r){let i=e.value;bW(t.multipleOf)&&RW(i,t.multipleOf??0)!==0&&r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:F(`Value is not divisible by {0}.`,t.multipleOf),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});let a=this.getNumberLimits(t);bW(a.exclusiveMinimum)&&i<=a.exclusiveMinimum&&r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:F(`Value is below the exclusive minimum of {0}.`,a.exclusiveMinimum),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),bW(a.exclusiveMaximum)&&i>=a.exclusiveMaximum&&r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:F(`Value is above the exclusive maximum of {0}.`,a.exclusiveMaximum),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),bW(a.minimum)&&i<a.minimum&&r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:F(`Value is below the minimum of {0}.`,a.minimum),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),bW(a.maximum)&&i>a.maximum&&r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:F(`Value is above the maximum of {0}.`,a.maximum),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}validateArrayNode(e,t,n,r,i,a){let{isKubernetes:o}=a,s=e.items??[],c=t.items?r.getEvaluatedItems(e):void 0;if(Array.isArray(t.items)){let l=t.items;for(let e=0;e<l.length;e++){let n=hG(l[e]),u=new pG(o),d=s[e];d?(this.validateNode(d,n,t,u,i,a),r.mergePropertyMatch(u,!1),r.mergeEnumValues(u),c?.add(e)):s.length>=l.length&&r.propertiesValueMatches++}if(s.length>l.length){let u=t.additionalItems;if(u===!1){r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:F(`Array has too many items according to schema. Expected {0} or fewer.`,l.length),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});for(let e=l.length;e<s.length;e++)c?.add(e)}else if(typeof u==`object`)for(let e=l.length;e<s.length;e++){let n=new pG(o);this.validateNode(s[e],u,t,n,i,a),r.mergePropertyMatch(n,!1),r.mergeEnumValues(n),c?.add(e)}else if(u===!0)for(let e=l.length;e<s.length;e++)c?.add(e)}}else{let n=hG(t.items);if(n){let c=r.getEvaluatedItems(e);for(let e=0;e<s.length;e++){let l=s[e],u=new pG(o);this.validateNode(l,n,t,u,i,a),r.mergePropertyMatch(u,!1),r.mergeEnumValues(u),c.add(e)}}}this.applyContains(e,t,n,r,i,a),this.applyArrayLength(e,t,n,r,a),this.applyUniqueItems(e,t,n,r)}applyContains(e,t,n,r,i,a){let{isKubernetes:o}=a,s=hG(t.contains);s&&((e.items??[]).some(e=>{let n=new pG(o);return this.validateNode(e,s,t,n,dG.instance,a),!n.hasProblems()})||r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:t.errorMessage||F(`Array does not contain required item.`),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}))}applyArrayLength(e,t,n,r,i){bW(t.minItems)&&e.items.length<(t.minItems??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:F(`Array has too few items. Expected {0} or more.`,t.minItems),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),bW(t.maxItems)&&e.items.length>(t.maxItems??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:F(`Array has too many items. Expected {0} or fewer.`,t.maxItems),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}applyUniqueItems(e,t,n,r){if(t.uniqueItems===!0){let i=hW(e);Array.isArray(i)&&i.some((e,t)=>t!==i.lastIndexOf(e))&&r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:F(`Array has duplicate items.`),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}}validateObjectNode(e,t,n,r,i,a){let o=Object.create(null),s=[],c=[...e.properties];for(;c.length>0;){let e=c.pop();if(!e)continue;let t=e.keyNode.value;if(t===`<<`&&e.valueNode)switch(e.valueNode.type){case`object`:c.push(...e.valueNode.properties);break;case`array`:e.valueNode.items.forEach(e=>{e&&e.type===`object`&&wW(e.properties)&&c.push(...e.properties)})}else o[t]=e.valueNode,s.push(t)}let l=e=>{let t=s.indexOf(e);for(;t>=0;)s.splice(t,1),t=s.indexOf(e)};this.applyRequired(e,t,n,r,a,o),this.applyProperties(e,t,n,r,i,a,o,s,l),this.applyPatternProperties(e,t,n,r,i,a,o,s,l),this.applyAdditionalProperties(e,t,n,r,i,a,o,s),this.applyPropertyCount(e,t,n,r),this.applyDependencies(e,t,n,r,i,a,o),this.applyPropertyNames(e,t,r,a)}applyRequired(e,t,n,r,i,a){if(Array.isArray(t.required)){for(let i of t.required)if(a[i]===void 0){let a=e.parent&&e.parent.type===`property`&&e.parent.keyNode,o=a?{offset:a.offset,length:a.length}:{offset:e.offset,length:1};r.problems.push({location:o,severity:N.Warning,message:t.errorMessage||gG(cG.missingRequiredPropWarning,[i]),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n),problemArgs:[i],problemType:cG.missingRequiredPropWarning})}}}applyProperties(e,t,n,r,i,a,o,s,c){let{isKubernetes:l}=a,u=t.properties;if(u)for(let e of Object.keys(u)){c(e);let s=u[e],d=o[e];if(d){if(r.evaluatedProperties??=new Set,r.evaluatedProperties.add(e),SW(s)){if(s)r.propertiesMatches++,r.propertiesValueMatches++;else{let i=d.parent;r.problems.push({location:{offset:i.keyNode.offset,length:i.keyNode.length},severity:N.Warning,message:t.errorMessage||F(`Property {0} is not allowed.`,e),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}}else{s.url=t.url??n.url;let e=new pG(l);this.validateNode(d,s,t,e,i,a),r.mergePropertyMatch(e,!1),r.mergeEnumValues(e)}}}}applyPatternProperties(e,t,n,r,i,a,o,s,c){let{isKubernetes:l}=a,u=t.patternProperties;if(u)for(let e of Object.keys(u)){let d=FW(e);if(d)for(let f of s.slice(0)){if(!d.test(f))continue;c(f);let s=o[f];if(!s)continue;r.evaluatedProperties??=new Set,r.evaluatedProperties.add(f);let p=u[e];if(SW(p)){if(p)r.propertiesMatches++,r.propertiesValueMatches++;else{let e=s.parent;r.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},severity:N.Warning,message:t.errorMessage||F(`Property {0} is not allowed.`,f),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}}else{let e=new pG(l);this.validateNode(s,p,t,e,i,a),r.mergePropertyMatch(e,!1),r.mergeEnumValues(e)}}}}applyAdditionalProperties(e,t,n,r,i,a,o,s){let{isKubernetes:c}=a,l=t.additionalProperties;if(typeof l==`object`){for(let e of s){let n=o[e];if(!n)continue;r.evaluatedProperties??=new Set,r.evaluatedProperties.add(e);let s=new pG(c);this.validateNode(n,l,t,s,i,a),r.mergePropertyMatch(s,!1),r.mergeEnumValues(s)}return}if(l===!0){if(s.length>0){r.evaluatedProperties??=new Set;for(let e of s)o[e]&&r.evaluatedProperties.add(e)}return}if(!(l===!1||t.type===`object`&&l===void 0&&a.disableAdditionalProperties===!0)||s.length===0)return;let u=t.properties&&Object.entries(t.properties).filter(([e,t])=>!(o[e]||t&&typeof t==`object`&&(t.doNotSuggest||t.deprecationMessage))).map(([e])=>e);for(let e of s){let i=o[e];if(!i)continue;let a=i.type===`property`?i:i.parent??i;a.type===`object`&&(a=a.properties[0]??a);let s=a.type===`property`?a.keyNode:a,c={location:{offset:s.offset,length:s.length},severity:N.Warning,code:BU.PropertyExpected,message:t.errorMessage||F(`Property {0} is not allowed.`,e),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)};u?.length&&(c.data={properties:u}),r.problems.push(c)}}applyPropertyCount(e,t,n,r){bW(t.maxProperties)&&e.properties.length>(t.maxProperties??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:F(`Object has more properties than limit of {0}.`,t.maxProperties),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),bW(t.minProperties)&&e.properties.length<(t.minProperties??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:F(`Object has fewer properties than the required number of {0}`,t.minProperties),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}applyDependencies(e,t,n,r,i,a,o){let{isKubernetes:s}=a,c=t.dependencies;if(c)for(let l of Object.keys(c)){if(!o[l])continue;let u=c[l];if(Array.isArray(u))for(let i of u)o[i]?r.propertiesValueMatches++:r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:F(`Object is missing property {0} required by property {1}.`,i,l),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});else{let n=hG(u);if(n){let o=new pG(s);this.validateNode(e,n,t,o,i,a),r.mergePropertyMatch(o),r.mergeEnumValues(o)}}}}applyPropertyNames(e,t,n,r){let i=hG(t.propertyNames);if(i)for(let a of e.properties){let e=a.keyNode;e&&this.validateNode(e,i,t,n,dG.instance,r)}}applyUnevaluatedProperties(e,t,n,r,i,a,o,s){}applyUnevaluatedItems(e,t,n,r,i,a){}alternativeComparison(e,t,n,r){let i=e.compareKubernetes(t.validationResult);return i>0?{schema:n,validationResult:e,matchingSchemas:r}:(i===0&&(t.matchingSchemas.merge(r),t.validationResult.mergeEnumValues(e)),t)}genericComparison(e,t,n,r,i,a){if(!t&&!n.hasProblems()&&!r.validationResult.hasProblems())r.matchingSchemas.merge(a),r.validationResult.propertiesMatches+=n.propertiesMatches,r.validationResult.propertiesValueMatches+=n.propertiesValueMatches;else{let o=n.compareGeneric(r.validationResult);o>0||o===0&&t&&r.schema.type===`object`&&e.type!==`null`&&e.type!==r.schema.type?r={schema:i,validationResult:n,matchingSchemas:a}:(o===0||(e.value===null||e.type===`null`)&&e.length===0)&&this.mergeValidationMatches(r,a,n)}return r}mergeValidationMatches(e,t,n){e.matchingSchemas.merge(t),e.validationResult.mergeEnumValues(n),e.validationResult.mergeWarningGeneric(n,[cG.missingRequiredPropWarning,cG.typeMismatchWarning,cG.constWarning])}};function hG(e){if(e!==void 0)return SW(e)?e?{}:{not:{}}:typeof e==`object`?e:(console.warn(`Wrong schema: ${JSON.stringify(e)}, it MUST be an Object or Boolean`),{type:e})}function gG(e,t){return F(lG[e],t.join(` | `))}function _G(e,t,n,r){return e?n===null&&t.length===0||CW(n)&&CW(r)&&r.startsWith(n):!1}var vG=class extends mG{getCurrentDialect(){return mW.draft04}getNumberLimits(e){let t=bW(e.minimum)?e.minimum:void 0,n=bW(e.maximum)?e.maximum:void 0,r=SW(e.exclusiveMinimum)&&e.exclusiveMinimum?t:void 0,i=SW(e.exclusiveMaximum)&&e.exclusiveMaximum?n:void 0;return{minimum:r===void 0?t:void 0,maximum:i===void 0?n:void 0,exclusiveMinimum:r,exclusiveMaximum:i}}},yG=class extends mG{getCurrentDialect(){return mW.draft07}getNumberLimits(e){let t=bW(e.minimum)?e.minimum:void 0,n=bW(e.maximum)?e.maximum:void 0,r=bW(e.exclusiveMinimum)?e.exclusiveMinimum:void 0,i=bW(e.exclusiveMaximum)?e.exclusiveMaximum:void 0;return{minimum:r===void 0?t:void 0,maximum:i===void 0?n:void 0,exclusiveMinimum:r,exclusiveMaximum:i}}},bG=class extends yG{getCurrentDialect(){return mW.draft2019}applyContains(e,t,n,r,i,a){let o=hG(t.contains);if(!o)return;let s=t.minContains,c=t.maxContains,l=bW(s)?s:1,u=bW(c)?c:void 0,d=0,f=e.items??[];for(let e of f){let n=new pG(a.isKubernetes);if(this.validateNode(e,o,t,n,this.getNoOpCollector(),a),!n.hasProblems()&&(d++,u!==void 0&&d>u))break}d<l&&r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:t.errorMessage||F(`Array has too few items matching "contains". Expected {0} or more.`,l),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),u!==void 0&&d>u&&r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:t.errorMessage||F(`Array has too many items matching "contains". Expected {0} or fewer.`,u),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}applyDependencies(e,t,n,r,i,a,o){super.applyDependencies(e,t,n,r,i,a,o);let s=t.dependentRequired;if(s&&typeof s==`object`)for(let i of Object.keys(s)){if(!o[i])continue;let a=s[i];if(Array.isArray(a))for(let s of a)o[s]?r.propertiesValueMatches++:r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:F(`Object is missing property {0} required by property {1}.`,s,i),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}let c=t.dependentSchemas;if(c&&typeof c==`object`)for(let n of Object.keys(c)){if(!o[n])continue;let s=hG(c[n]);if(!s)continue;let l=new pG(a.isKubernetes);this.validateNode(e,s,t,l,i,a),r.mergePropertyMatch(l),r.mergeEnumValues(l)}}applyUnevaluatedProperties(e,t,n,r,i,a,o){let s=t.unevaluatedProperties;if(s===void 0||!o)return;r.evaluatedProperties??=new Set;let c=Object.keys(o).filter(e=>!r.evaluatedProperties?.has(e));if(c.length===0)return;if(s===!1){for(let e of c){let i=o[e];if(!i)continue;let a=(i.type===`property`?i:i.parent).keyNode;a&&(r.problems.push({location:{offset:a.offset,length:a.length},severity:N.Warning,code:BU.PropertyExpected,message:t.errorMessage||F(`Property {0} is not allowed.`,e),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),r.evaluatedProperties?.add(e))}return}if(s===!0){for(let e of c)r.evaluatedProperties?.add(e);return}let l=hG(s);if(l)for(let e of c){let n=o[e];if(!n)continue;let s=n.type===`property`?n.valueNode:n;if(!s)continue;let c=new pG(a.isKubernetes);this.validateNode(s,l,t,c,i,a),r.mergePropertyMatch(c),r.mergeEnumValues(c),r.evaluatedProperties?.add(e)}}applyUnevaluatedItems(e,t,n,r,i,a){let o=t.unevaluatedItems;if(o===void 0)return;let s=e.items??[];if(s.length===0)return;let c=r.getEvaluatedItems(e),l=[];for(let e=0;e<s.length;e++)c.has(e)||l.push(e);if(l.length===0)return;if(o===!1){for(let e of l){let i=s[e];r.problems.push({location:{offset:i.offset,length:i.length||1},severity:N.Warning,code:BU.PropertyExpected,message:t.errorMessage||F(`Array has too many items according to schema. Expected {0} or fewer.`,e),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),c.add(e)}return}if(o===!0){for(let e of l)c.add(e);return}let u=hG(o);if(u)for(let e of l){let n=s[e],o=new pG(a.isKubernetes);this.validateNode(n,u,t,o,i,a),r.merge(o),r.mergeEnumValues(o),c.add(e)}}},xG=class extends bG{getCurrentDialect(){return mW.draft2020}validateArrayNode(e,t,n,r,i,a){let o=e.items??[],s=r.getEvaluatedItems(e),c=t.prefixItems;if(Array.isArray(c)){let e=Math.min(c.length,o.length);for(let n=0;n<e;n++){let e=hG(c[n]);if(!e){s.add(n);continue}let l=new pG(a.isKubernetes);this.validateNode(o[n],e,t,l,i,a),r.mergePropertyMatch(l,!1),r.mergeEnumValues(l),s.add(n)}}let l=t.items,u=Array.isArray(c)?c.length:0;if(o.length>u){if(l===!1){r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:F(`Array has too many items according to schema. Expected {0} or fewer.`,u),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});for(let e=u;e<o.length;e++)s.add(e)}else{let e=hG(l);if(e)for(let n=u;n<o.length;n++){let c=new pG(a.isKubernetes);this.validateNode(o[n],e,t,c,i,a),r.mergePropertyMatch(c,!1),r.mergeEnumValues(c),s.add(n)}}}this.applyContains(e,t,n,r,i,a),this.applyArrayLength(e,t,n,r,a),this.applyUniqueItems(e,t,n,r)}applyContains(e,t,n,r,i,a){let o=hG(t.contains);if(!o)return;let s=e.items??[],c=t.minContains,l=t.maxContains,u=bW(c)?c:1,d=bW(l)?l:void 0,f=0,p=r.getEvaluatedItems(e);for(let e=0;e<s.length;e++){let n=new pG(a.isKubernetes);if(this.validateNode(s[e],o,t,n,this.getNoOpCollector(),a),!n.hasProblems()&&(p.add(e),f++,d!==void 0&&f>d))break}f<u&&r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:t.errorMessage||F(`Array has too few items matching "contains". Expected {0} or more.`,u),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),d!==void 0&&f>d&&r.problems.push({location:{offset:e.offset,length:e.length},severity:N.Warning,message:t.errorMessage||F(`Array has too many items matching "contains". Expected {0} or fewer.`,d),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}};function SG(e){switch(e){case mW.draft04:return new vG;case mW.draft07:return new yG;case mW.draft2019:return new bG;case mW.draft2020:return new xG;default:return new yG}}var CG=class{constructor(e,t,n,r){this.offset=n,this.length=r,this.parent=e,this.internalNode=t}getNodeFromOffsetEndInclusive(e){let t=[],n=r=>{if(e>=r.offset&&e<=r.offset+r.length){let i=r.children;for(let r=0;r<i.length&&i[r].offset<=e;r++){let e=n(i[r]);e&&t.push(e)}return r}return null},r=n(this),i=Number.MAX_VALUE,a=null;for(let n of t){let t=n.length+n.offset-e+(e-n.offset);t<i&&(a=n,i=t)}return a||r}get children(){return[]}toString(){return`type: `+this.type+` (`+this.offset+`/`+this.length+`)`+(this.parent?` parent: {`+this.parent.toString()+`}`:``)}},wG=class extends CG{constructor(e,t,n,r){super(e,t,n,r),this.type=`null`,this.value=null}},TG=class extends CG{constructor(e,t,n,r,i,a){super(e,t,i,a),this.type=`boolean`,this.value=n,this.source=r}},EG=class extends CG{constructor(e,t,n,r){super(e,t,n,r),this.type=`array`,this.items=[]}get children(){return this.items}},DG=class extends CG{constructor(e,t,n,r){super(e,t,n,r),this.type=`number`,this.isInteger=!0,this.value=NaN}},OG=class extends CG{constructor(e,t,n,r){super(e,t,n,r),this.type=`string`,this.value=``}},kG=class extends CG{constructor(e,t,n,r){super(e,t,n,r),this.type=`property`,this.colonOffset=-1}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}},AG=class extends CG{constructor(e,t,n,r){super(e,t,n,r),this.type=`object`,this.properties=[]}get children(){return this.properties}},jG;(function(e){e[e.Key=0]=`Key`,e[e.Enum=1]=`Enum`})(jG||={});var MG=class{constructor(e,t=[],n=[]){this.root=e,this.syntaxErrors=t,this.comments=n}getNodeFromOffset(e,t=!1){if(this.root)return _W(this.root,e,t)}getNodeFromOffsetEndInclusive(e){return this.root&&this.root.getNodeFromOffsetEndInclusive(e)}visit(e){if(this.root){let t=n=>{let r=e(n),i=n.children;if(Array.isArray(i))for(let e=0;e<i.length&&r;e++)r=t(i[e]);return r};t(this.root)}}validate(e,t){return!this.root||!t?null:SG(t._dialect).validateDocument(this.root,e,t,{isKubernetes:this.isKubernetes,disableAdditionalProperties:this.disableAdditionalProperties,uri:this.uri})}getMatchingSchemas(e,t=-1,n=null,r){return!this.root||!e?[]:SG(e._dialect).getMatchingSchemas(this.root,e,{isKubernetes:this.isKubernetes,disableAdditionalProperties:this.disableAdditionalProperties,uri:this.uri,callFromAutoComplete:r},t,n)}},NG={maxRefCount:1e3,currentRefDepth:0,aliasResolutionCache:new Map};function PG(e,t,n,r){if(e||(NG.currentRefDepth=0,NG.aliasResolutionCache=new Map),!t)return null;if($l(t))return FG(t,e,n,r);if(eu(t))return IG(t,e,n,r);if(tu(t))return LG(t,e,n,r);if(I(t))return RG(t,e);if(Zl(t)&&NG.currentRefDepth<NG.maxRefCount)return zG(t,e,n,r)}function FG(e,t,n,r){let i;i=e.flow&&!e.range?HG(e):e.range;let a=new AG(t,e,...VG(i,r));for(let t of e.items)eu(t)&&a.properties.push(PG(a,t,n,r));return a}function IG(e,t,n,r){let i=e.key,a=e.value,o=i.range[0],s=i.range[1],c=i.range[2];a&&(s=a.range[1],c=a.range[2]);let l=new kG(t,e,...VG([o,s,c],r));if(Zl(i)){let e=new OG(t,i,...BG(i.range));e.value=i.source,l.keyNode=e}else l.keyNode=PG(l,i,n,r);return l.valueNode=PG(l,a,n,r),l}function LG(e,t,n,r){let i=new EG(t,e,...BG(e.range));for(let t of e.items)if(ru(t)){let e=PG(i,t,n,r);e&&i.children.push(e)}return i}function RG(e,t){if(e.value===null)return new wG(t,e,...BG(e.range));switch(typeof e.value){case`string`:{let n=new OG(t,e,...BG(e.range));return n.value=e.value,n}case`boolean`:return new TG(t,e,e.value,e.source,...BG(e.range));case`number`:{let n=new DG(t,e,...BG(e.range));return n.value=e.value,n.isInteger=Number.isInteger(n.value),n}default:{let n=new OG(t,e,...BG(e.range));return n.value=e.source,n}}}function zG(e,t,n,r){if(NG.aliasResolutionCache.has(e))return NG.aliasResolutionCache.get(e);NG.currentRefDepth++;let i=e.resolve(n),a;if(i)a=PG(t,i,n,r);else{let n=new OG(t,e,...BG(e.range));n.value=e.source,a=n}return NG.currentRefDepth--,NG.aliasResolutionCache.set(e,a),a}function BG(e){return[e[0],e[1]-e[0]]}function VG(e,t){let n=t.linePos(e[0]),r=t.linePos(e[1]),i=[e[0],e[1]-e[0]];return n.line!==r.line&&(t.lineStarts.length!==r.line||r.col===1)&&i[1]--,i}function HG(e){let t=2**53-1,n=0;for(let r of e.items)eu(r)&&(ru(r.key)&&r.key.range&&r.key.range[0]<=t&&(t=r.key.range[0]),ru(r.value)&&r.value.range&&r.value.range[2]>=n&&(n=r.value.range[2]));return[t,n,n]}function UG(e,t){let n;if(cu(e,(e,r,i)=>{if(r===t)return n=i[i.length-1],cu.BREAK}),!Ql(n))return n}function WG(e){if(e.items.length>1)return!1;let t=e.items[0];return I(t.key)&&I(t.value)&&t.key.value===``&&!t.value.value}function GG(e,t){for(let[n,r]of e.items.entries())if(t===r)return n}function KG(e,t){let n=!1;for(let r of e){if(r.type===`document`)JG([],r,e=>{if(qG(e)&&e.value?.type===`comment`){if(r.offset<=t&&e.value.source.length+e.value.offset>=t)return n=!0,cu.BREAK}else if(e.type===`comment`&&e.offset<=t&&e.offset+e.source.length>=t)return n=!0,cu.BREAK});else if(r.type===`comment`&&r.offset<=t&&r.source.length+r.offset>=t)return!0;if(n)break}return n}function qG(e){return e.start!==void 0}function JG(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=JG(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===cu.BREAK)return cu.BREAK;else r===cu.REMOVE&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}let i=t.sep;if(i)for(let t=0;t<i.length;++t){let r=JG(Object.freeze(e),i[t],n);if(typeof r==`number`)t=r-1;else if(r===cu.BREAK)return cu.BREAK;else r===cu.REMOVE&&(i.items.splice(t,1),--t)}return typeof r==`function`?r(t,e):r}var YG=class e extends MG{constructor(e){super(null,[]),this.lineCounter=e}clone(){let t=new e(this.lineCounter);return t.isKubernetes=this.isKubernetes,t.disableAdditionalProperties=this.disableAdditionalProperties,t.uri=this.uri,t.currentDocIndex=this.currentDocIndex,t._lineComments=this.lineComments.slice(),t.internalDocument=this._internalDocument.clone(),t}collectLineComments(){this._lineComments=[],this._internalDocument.commentBefore&&this._internalDocument.commentBefore.split(`
369
+ `).forEach(e=>this._lineComments.push(`#${e}`)),cu(this.internalDocument,(e,t)=>{t?.commentBefore&&(t?.commentBefore.split(`
370
+ `)).forEach(e=>this._lineComments.push(`#${e}`)),t?.comment&&this._lineComments.push(`#${t.comment}`)}),this._internalDocument.comment&&this._lineComments.push(`#${this._internalDocument.comment}`)}updateFromInternalDocument(){this.root=PG(null,this._internalDocument.contents,this._internalDocument,this.lineCounter)}set internalDocument(e){this._internalDocument=e,this.updateFromInternalDocument()}get internalDocument(){return this._internalDocument}get lineComments(){return this._lineComments||this.collectLineComments(),this._lineComments}set lineComments(e){this._lineComments=e}get errors(){return this.internalDocument.errors.map(QG)}get warnings(){return this.internalDocument.warnings.map(QG)}getNodeFromPosition(e,t,n){let r=t.getPosition(e),i=t.getLineContent(r.line);if(i.trim().length===0)return[this.findClosestNode(e,t,n),!0];let a=i.substring(r.character).match(/^([ ]+)\n?$/),o=!!a,s=a?.[1].length,c;return cu(this.internalDocument,(t,n)=>{if(!n)return;let r=n.range;if(r){if(r[0]<=e&&r[1]>=e||o&&e+s===r[2]&&I(n)&&n.value===null)c=n;else return cu.SKIP}}),[c,!1]}findClosestNode(e,t,n){let r=this.internalDocument.range[2],i=this.internalDocument.range[0],a;cu(this.internalDocument,(t,n)=>{if(!n)return;let o=n.range;if(!o)return;let s=o[1]-e;i<=o[0]&&s<=0&&Math.abs(s)<=r&&(r=Math.abs(s),i=o[0],a=n)});let o=t.getPosition(e),s=PW(t.getLineContent(o.line),o.character);return I(a)&&a.value===null||s===o.character&&(a=this.getProperParentByIndentation(s,a,t,``,n)),a}getProperParentByIndentation(e,t,n,r,i,a){if(!t)return this.internalDocument.contents;if(i||=2,ru(t)&&t.range){let o=n.getPosition(t.range[0]),s=n.getLineContent(o.line);if(r=r===``?s.trim():r,r.startsWith(`-`)&&e===i&&r===s.trim()&&(o.character+=e),o.character>e&&o.character>0){let o=this.getParent(t);if(o)return this.getProperParentByIndentation(e,o,n,r,i,a)}else if(o.character<e){let e=this.getParent(t);if(eu(e)&&ru(e.value))return e.value;if(eu(a)&&ru(a.value))return a.value}else return t}else if(eu(t)){a=t;let o=this.getParent(t);return this.getProperParentByIndentation(e,o,n,r,i,a)}return t}getParent(e){return UG(this.internalDocument,e)}},XG=class{constructor(e,t){this.documents=e,this.tokens=t,this.errors=[],this.warnings=[]}},ZG=new class{constructor(){this.cache=new Map}getYamlDocument(e,t,n=!1){return this.ensureCache(e,t??rK,n),this.cache.get(e.uri).document}clear(){this.cache.clear()}ensureCache(e,t,n){let r=e.uri;this.cache.has(r)||this.cache.set(r,{version:-1,document:new XG([],[]),parserOptions:rK});let i=this.cache.get(r);if(i.version!==e.version||t.customTags&&!MW(i.parserOptions.customTags,t.customTags)){let r=e.getText();n&&!/\S/.test(r)&&(r=`{${r}}`),i.document=iK(r,t,e),i.version=e.version,i.parserOptions=t}}};function QG(e){return{message:e.message,location:{start:e.pos[0],end:e.pos[1],toLineEnd:!0},severity:1,code:BU.Undefined}}var $G=class{constructor(e,t){this.tag=e,this.type=t}get collection(){if(this.type===`mapping`)return`map`;if(this.type===`sequence`)return`seq`}resolve(e){if($l(e)&&this.type===`mapping`||tu(e)&&this.type===`sequence`||typeof e==`string`&&this.type===`scalar`)return e}},eK=class{constructor(){this.tag=`!include`,this.type=`scalar`}resolve(e,t){if(e&&e.length>0&&e.trim())return e;t(`!include without value`)}};function tK(e){let t=[],n=jW(e);for(let e of n){let n=e.split(` `),r=n[0],i=n[1]&&n[1].toLowerCase()||`scalar`;t.push(new $G(r,i))}return t.push(new eK),t}var nK=class{constructor(e){this.doc=e}getLineCount(){return this.doc.lineCount}getLineLength(e){let t=this.doc.getLineOffsets();return e>=t.length?this.doc.getText().length:e<0?0:(e+1<t.length?t[e+1]:this.doc.getText().length)-t[e]}getLineContent(e){let t=this.doc.getLineOffsets();if(e>=t.length)return this.doc.getText();if(e<0)return``;let n=e+1<t.length?t[e+1]:this.doc.getText().length;return this.doc.getText().substring(t[e],n)}getLineCharCode(e,t){return this.doc.getText(M.create(e-1,t,e-1,t+1)).charCodeAt(0)}getText(e){return this.doc.getText(e)}getPosition(e){return this.doc.positionAt(e)}},rK={customTags:[],yamlVersion:`1.2`};function iK(e,t=rK,n){let r=new ip({strict:!1,customTags:tK(t.customTags),version:t.yamlVersion??rK.yamlVersion,keepSourceTokens:!0}),i=new Cp,a=!1;if(n){let t=new nK(n),r=t.getPosition(e.length);a=t.getLineContent(r.line).trim().length===0}let o=(a?new jp:new jp(i.addNewLine)).parse(e),s=Array.from(o),c=r.compose(s,!0,e.length);return new XG(Array.from(c,e=>aK(e,i)),s)}function aK(e,t){let n=new YG(t);return n.internalDocument=e,n}function oK(e){if(e instanceof YG){let t=e.lineComments.find(e=>sK(e));if(t!=null){let e=t.match(/\$schema(?:=|:\s*)(\S+)/);if(e!==null&&e.length===2)return e[1]}}}function sK(e){let t=e.match(/^#\s+(?:yaml-language-server\s*:|\$schema:)/g);return t!==null&&t.length===1}function cK(){return!0}var lK=class{compile(){return cK}defaultMeta(){return`http://json-schema.org/draft-07/schema`}},uK=class extends lK{defaultMeta(){return`http://json-schema.org/draft-04/schema`}},dK=class extends lK{defaultMeta(){return`https://json-schema.org/draft/2019-09/schema`}},fK=class extends lK{defaultMeta(){return`https://json-schema.org/draft/2020-12/schema`}},pK=`https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.32.1-standalone-strict/`,mK=pK+`all.json`,hK=`https://raw.githubusercontent.com/datreeio/CRDs-catalog/main`;function gK(e){let t=new Map;return e&&(e.url?e.url.startsWith(`schemaservice://combinedSchema/`)?_K(e,t):t.set(e.url,e):_K(e,t)),t}function _K(e,t){e.allOf&&vK(e.allOf,t),e.anyOf&&vK(e.anyOf,t),e.oneOf&&vK(e.oneOf,t)}function vK(e,t){for(let n of e)!SW(n)&&n.url&&!t.has(n.url)&&t.set(n.url,n)}function yK(e,t,n){let r=SK(e);if(!r||!r.group||!r.version||!r.kind)return;let i=bK(r,t);if(i)return i;let a=xK(r,n);if(a)return a}function bK(e,t){let{group:n,version:r,kind:i}=e,a=`io.k8s.api.${n.replace(`.k8s.io`,``).replace(`rbac.authorization`,`rbac`).toLowerCase()}.${r.toLowerCase()}.${i.toLowerCase()}`,o=(t.schema.oneOf||[]).map(e=>{if(typeof e!=`boolean`)return e._$ref||e.$ref}).find(e=>e?e.replace(`_definitions.json#/definitions/`,``).toLowerCase()===a:!1);if(o)return pK+o}function xK(e,t){let{group:n,version:r,kind:i}=e;return`io.k8s.api.${n.replace(`.k8s.io`,``).replace(`rbac.authorization`,`rbac`).toLowerCase()}.${r.toLowerCase()}.${i.toLowerCase()}`.includes(`openshift.io`)?`${t}/openshift/v4.15-strict/${i.toLowerCase()}_${n.toLowerCase()}_${r.toLowerCase()}.json`:`${t}/${n.toLowerCase()}/${i.toLowerCase()}_${r.toLowerCase()}.json`}function SK(e){if(e instanceof YG)try{let t=e.root.internalNode.toJSON();if(!t)return;let n=t.apiVersion;if(!n)return;let[r,i]=n.split(`/`);if(!r||!i)return;let a=t.kind;return a?{group:r,version:i,kind:a}:void 0}catch(e){console.error(`Error parsing YAML document:`,e);return}}var CK=new uK({allErrors:!0}),wK=new lK({allErrors:!0}),TK=new dK({allErrors:!0}),EK=new fK({allErrors:!0}),DK=jU(),OK=void 0,kK=jU(),AK=jU(),jK=jU(),MK=CK.compile(DK),NK=wK.compile(OK),PK=TK.compile(kK),FK=EK.compile(AK),IK=new Map,LK=new Map,RK=new Map([[`zh-cn`,`zh`],[`zh-tw`,`zh-TW`]]),zK=new Set(`$ref._$ref.$schema.$id.id._baseUri._sourceUri._dialect.$anchor.$dynamicAnchor.$dynamicRef.$recursiveAnchor.$recursiveRef.definitions.$defs.$comment.title.description.markdownDescription.$vocabulary.examples.default.url.closestTitle.unevaluatedProperties.unevaluatedItems`.split(`.`)),BK;(function(e){e[e.delete=0]=`delete`,e[e.add=1]=`add`,e[e.deleteAll=2]=`deleteAll`})(BK||={});var VK=class extends lW{constructor(e,t,n,r){super(e,t,n),this.schemaUriToNameAndDescription=new Map,this.customSchemaProvider=void 0,this.requestService=e,this.schemaPriorityMapping=new Map,this.yamlSettings=r}registerCustomSchemaProvider(e){this.customSchemaProvider=e}getAllSchemas(){let e=[],t=new Set;for(let n of this.filePatternAssociations){let r=n.uris[0];if(t.has(r))continue;t.add(r);let i={uri:r,fromStore:!1,usedForCurrentFile:!1};if(this.schemaUriToNameAndDescription.has(r)){let{name:e,description:t,versions:n}=this.schemaUriToNameAndDescription.get(r);i.name=e,i.description=t,i.fromStore=!0,i.versions=n}e.push(i)}return e}collectSchemaNodes(e,...t){let n=t=>{if(!(!t||typeof t!=`object`)){if(Array.isArray(t)){for(let e of t)n(e);return}e(t)}};for(let e of t)n(e)}schemaMapValues(e){if(!(!e||typeof e!=`object`))return Object.values(e)}async resolveSchemaContent(e,t,n){let r=e.errors.slice(0),i=HK(t),a=e.schema;if(a===null||Array.isArray(a)||typeof a!=`object`&&typeof a!=`boolean`){let e=a===null?`null`:Array.isArray(a)?`array`:typeof a;return r.push(F(`Schema '{0}' is not valid: {1}`,i,`expected a JSON Schema object or boolean, got "${e}".`)),new cW({},r)}let o=(e,t)=>{!e||typeof e!=`object`||!t||(e._sourceUri=t)},s=(e,t,n)=>{if(typeof e!=`object`||!e)return e;if(n){let r=n(e,t.size);if(r!==void 0)return r}if(t.has(e))return t.get(e);if(Array.isArray(e)){let r=[];t.set(e,r);for(let i of e)r.push(s(i,t,n));return r}let r={};t.set(e,r);for(let i in e)r[i]=s(e[i],t,n);return o(r,e._sourceUri),r},c=this.loadSchema.bind(this),l=this.yamlSettings?.locale;async function u(e,t){if(!e||typeof e!=`object`)return;let n=await JK(e.$schema,c);n&&(e._dialect=n);let a=YK(n);if(!a)return;let o=e;if(t&&(o=s(e,new Map,(e,t)=>{if(t!==0&&e&&typeof e==`object`&&e.$schema)return{}})),!a(o)){qK(a.errors,l);let e=[];for(let t of a.errors)e.push(`${t.instancePath} : ${t.message}`);r.push(F(`Schema '{0}' is not valid: {1}`,i,`
371
+ ${e.join(`
372
+ `)}`))}}let d=new Map,f=e=>{let t=d.get(e);return t||(t={fragments:new Map},d.set(e,t)),t},p=(e,t)=>{let n=d.get(t);if(!n||n.fragments.size===0)return e;let r=e;for(let[i,a]of n.fragments){if(!a.dynamic)continue;let n=r?.get(i)??[];n.some(e=>e._baseUri===t)||(r===e&&(r=e?new Map(e):new Map),r.set(i,n.concat(a.node)))}return r},m=(e,t)=>this.contextService?this.contextService.resolveRelativePath(t,e):this.normalizeId(t),h=async(e,t)=>{let n=[{node:e,baseUri:t,sourceUri:t}],r=[],i=new WeakMap,a=new Set;for(;n.length;){let e=n.pop();if(!e)continue;let t=e.node;if(!t||typeof t!=`object`||a.has(t))continue;a.add(t);let s=e.baseUri;o(t,e.sourceUri);let c=t.$id||t.id;if(c){let e=m(s,c);t._baseUri=e;let n=e.indexOf(`#`);if(n!==-1&&n<e.length-1){let r=e.slice(n+1);f(s).fragments.set(r,{node:t})}else{s=e;let n=f(e);n.root||=t}}t.$anchor&&f(s).fragments.set(t.$anchor,{node:t}),t.$dynamicAnchor&&(t._baseUri=s,f(s).fragments.set(t.$dynamicAnchor,{node:t,dynamic:!0}));let l=[];i.set(t,l),this.collectSchemaNodes(t=>{l.push(t),n.push({node:t,baseUri:s,sourceUri:e.sourceUri})},t.not,t.if,t.then,t.else,t.contains,t.propertyNames,t.additionalProperties,t.items,t.additionalItems,t.prefixItems,this.schemaMapValues(t.properties),this.schemaMapValues(t.patternProperties),this.schemaMapValues(t.definitions),this.schemaMapValues(t.$defs),this.schemaMapValues(t.dependentSchemas),this.schemaMapValues(t.dependencies),t.allOf,t.anyOf,t.oneOf,t.schemaSequence),r.push(t)}let s=new WeakMap;for(;r.length;){let t=r.pop(),n=!1;for(let e of i.get(t))if(e.$schema||s.get(e)){n=!0;break}s.set(t,n),(t===e||t.$schema)&&await u(t,n)}},g=a,_=e.uri??t;await h(g,_);let v=(e,t,n)=>{if(!t)return e;if(t[0]===`/`){let n=e,r=t.substr(1).split(`/`);for(let e of r)if(n=n?.[e.replace(/~1/g,`/`).replace(/~0/g,`~`)],n===null)return;return n}return f(n).fragments.get(t).node},y=(e,t,n,i,a=!1)=>{let c=v(t,i,n);if(typeof c==`boolean`){c||(e.not={});return}if(typeof c==`object`&&c){let t=a?s(c,new Map):c;for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&!Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=t[n]);o(e,t._sourceUri);return}r.push(F(`$ref '{0}' in '{1}' cannot be resolved.`,i,n))},b=(e,t)=>{let n=m(e,t);if(!t.startsWith(`/`))return n;let r=d.get(e)?.root,i=r?.$id||r?.id;if(!i)return n;let a=m(e,i);return!a.startsWith(`http://`)&&!a.startsWith(`https://`)?n:m(a,t)},x=(e,t)=>{try{let n=Qs.parse(e),r=Qs.parse(t);if(n.scheme!==`file`||r.scheme!==`http`&&r.scheme!==`https`)return;let i=Ul.posix.basename(r.path);if(!i)return;let a=Ul.posix.dirname(n.path),o=Ul.posix.join(a,i);return n.with({path:o,query:r.query,fragment:r.fragment}).toString()}catch{return}},S=(e,t,n,i,a,o,s,c,l)=>{let u=(e,t,n,r,i,a,o,s,c)=>{i[n]=!0,y(e,t,n,r,!!c||!!s),(!s||!e._baseUri)&&(e._baseUri=n),e.url=n;let l=new Set(o);return l.add(n),C(e,t,n,a,l,s,c)},f=(t,i=0)=>{let a=t[i],p=d.get(a)?.root;if(p)return u(e,p,a,n,o,o,s,c,l);let m=this.getOrAddSchemaHandle(a);return m.getUnresolvedSchema().then(async d=>{if(d.errors?.some(e=>e.toLowerCase().includes(`unable to load schema from`))&&i+1<t.length)return f(t,i+1);if(d.errors.length){let e=n?a+`#`+n:a;r.push(F(`Problems loading reference '{0}': {1}`,e,d.errors[0]))}return await h(d.schema,a),u(e,d.schema,a,n,o,m.dependencies,s,c,l)})},p=b(i,t),m=d.get(p)?.root?void 0:x(a,p);return f(m&&m!==p?[m,p]:[p])},C=async(e,t,n,r,i,a,o)=>{if(!e||typeof e!=`object`)return null;let s=[{node:e,baseUri:n,sourceUri:e._sourceUri??n,recursiveAnchorBase:a,inheritedDynamicScope:o}],c=new WeakSet,l=[],u=(e,n,a,o,c,u,f)=>{let h=p(u,n);this.collectSchemaNodes(e=>s.push({node:e,baseUri:n,sourceUri:a,recursiveAnchorBase:c,inheritedDynamicScope:h}),this.schemaMapValues(e.definitions||e.$defs));let g=e=>{for(let t of Object.keys(e))if(!zK.has(t))return!0;return!1},_=e=>{let t={};for(let n of Object.keys(e))zK.has(n)||(t[n]=e[n],delete e[n]);let n=e.$dynamicRef??e.$recursiveRef??e.$ref;typeof n==`string`&&(e.allOf=[{[e.$dynamicRef?`$dynamicRef`:e.$recursiveRef?`$recursiveRef`:`$ref`]:n},t],delete e.$dynamicRef,delete e.$recursiveRef,delete e.$ref)},v=e=>{for(let t of Object.keys(e))zK.has(t)||delete e[t]},b=new Set,x=(t,n,r)=>{if(!i.has(n))return!1;if(!b.has(t)){let i=d.get(n)?.root;i&&typeof i==`object`&&y(e,i,n,r,!!c),b.add(t)}return!0};for(;e.$dynamicRef||e.$recursiveRef||e.$ref;){let u=typeof e.$dynamicRef==`string`,p=!u&&typeof e.$recursiveRef==`string`,C=e.$dynamicRef??e.$recursiveRef??e.$ref;if(typeof C!=`string`)break;e._$ref=C;let ee=decodeURIComponent(C),te=ee.split(`#`,2),ne=te[0],re=te.length>1?te[1]:``,ie=`${ne?m(n,ne):n}#${re}`;if(g(e)){if(o===mW.draft04||o===mW.draft07)v(e);else{if(f?.has(ie))break;if(_(e),Array.isArray(e.allOf))for(let t=0;t<e.allOf.length;t++){let r=e.allOf[t];if(r&&typeof r==`object`){let e;t===0&&(e=new Set(f),e.add(ie)),s.push({node:r,baseUri:n,sourceUri:a,recursiveAnchorBase:c,inheritedDynamicScope:h,siblingRefCycleKeys:e})}}return}}if(delete e.$dynamicRef,delete e.$recursiveRef,delete e.$ref,p&&(ee===`#`||ee===``)){let o=d.get(n)?.root?.$recursiveAnchor&&c?c:n;if(o.length>0){if(i?.has(o)||o===n){let n=d.get(o)?.root??t;b.has(ee)||(y(e,n,o,``,!1),b.add(ee));continue}l.push(S(e,o,``,n,a,r,i,c,h));return}continue}if(u){let t=ne.length>0?m(n,ne):n,o=d.get(t)?.fragments,s=re.length>0&&o?.get(re)?.dynamic,u=s?h?.get(re)?.[0]:void 0,f=u?u._baseUri:t;if(u&&(f===n||i.has(f))){b.has(ee)||(y(e,u,f,``,!1),b.add(ee));continue}if(ne.length>0||s){if(x(ee,f,re))continue;l.push(S(e,f,re,n,a,r,i,c,h));return}}else if(ne.length>0){if(x(ee,m(n,ne),re))continue;l.push(S(e,ne,re,n,a,r,i,c,h));return}b.has(ee)||(y(e,t,n,re,u&&!!h),b.add(ee))}this.collectSchemaNodes(t=>s.push({node:t,baseUri:e._baseUri||n,sourceUri:e._sourceUri||a,dialect:o,recursiveAnchorBase:c,inheritedDynamicScope:h}),e.not,e.if,e.then,e.else,e.contains,e.propertyNames,e.additionalProperties,e.items,e.additionalItems,e.prefixItems,this.schemaMapValues(e.properties),this.schemaMapValues(e.patternProperties),this.schemaMapValues(e.dependentSchemas),this.schemaMapValues(e.dependencies),e.allOf,e.anyOf,e.oneOf,e.schemaSequence)};if(n.indexOf(`#`)>0){let e=n.split(`#`,2);if(e[0].length>0&&e[1].length>0){let t={};await S(t,e[0],e[1],n,g._sourceUri??n,r,i,a,o);for(let e in g)e!==`required`&&Object.prototype.hasOwnProperty.call(g,e)&&!Object.prototype.hasOwnProperty.call(t,e)&&(t[e]=g[e]);g=t}}for(;s.length;){let e=s.pop(),t=e.node,n=t._baseUri||e.baseUri,r=t._sourceUri||n,i=t._dialect||e.dialect,a=e.recursiveAnchorBase??(t.$recursiveAnchor?n:void 0);c.has(t)||(c.add(t),u(t,n,r,i,a,e.inheritedDynamicScope,e.siblingRefCycleKeys))}return Promise.all(l)},ee=new Set,te=g._baseUri||t;return te&&ee.add(te),await C(g,g,t,n,ee),new cW(g,r)}getSchemaForResource(e,t){let n=()=>{let n=oK(t);if(n!==void 0){if(!n.startsWith(`file:`)&&!n.startsWith(`http`)){let t=``;if(n.indexOf(`#`)>0){let e=n.split(`#`,2);n=e[0],t=e[1]}if(Ul.isAbsolute(n))n=Qs.file(n).toString();else{let t=Qs.parse(e);n=Qs.file(Ul.resolve(Ul.parse(t.fsPath).dir,n)).toString()}t.length>0&&(n+=`#`+t)}return n}},r=n=>{let r=super.createCombinedSchema(e,n);return r.getResolvedSchema().then(e=>this.finalizeResolvedSchema(e,r.url,t,!1))},i=async()=>{let n=Object.create(null),i=[],a;for(let r of this.filePatternAssociations)if(r.matchesPattern(e)){for(let e of r.getURIs())if(!n[e]){if(this.yamlSettings?.kubernetesCRDStoreEnabled&&e===mK){a||=await this.getResolvedSchema(mK);let r=yK(t,a,this.yamlSettings.kubernetesCRDStoreUrl??hK);r?(i.push(r),n[e]=!0):(i.push(e),n[e]=!0)}else i.push(e),n[e]=!0}}if(i.length>0){let e=this.highestPrioritySchemas(i);return r(e)}return Promise.resolve(null)},a=n();return a?r([a]):this.customSchemaProvider?this.customSchemaProvider(e).then(e=>Array.isArray(e)?e.length===0?i():Promise.all(e.map(e=>this.resolveCustomSchema(e,t))).then(e=>({errors:[],schema:{allOf:e.map(e=>e.schema)}}),()=>i()):e?this.resolveCustomSchema(e,t):i()).then(e=>e,()=>i()):i()}finalizeResolvedSchema(e,t,n,r){if(e.schema&&typeof e.schema==`object`&&(e.schema.url=t,e.schema.schemaSequence&&e.schema.schemaSequence[n.currentDocIndex])){let t=e.schema.schemaSequence[n.currentDocIndex];return r?new cW(t,e.errors):new cW(t)}return e}addSchemaPriority(e,t){let n=this.schemaPriorityMapping.get(e);n?(n=n.add(t),this.schemaPriorityMapping.set(e,n)):this.schemaPriorityMapping.set(e,new Set().add(t))}highestPrioritySchemas(e){let t=0,n=new Map;return e.forEach(e=>{(this.schemaPriorityMapping.get(e)||[0]).forEach(r=>{r>t&&(t=r);let i=n.get(r);i?(i=i.concat(e),n.set(r,i)):n.set(r,[e])})}),n.get(t)||[]}async resolveCustomSchema(e,t){let n=await this.loadSchema(e),r=await this.resolveSchemaContent(n,e,[]);return this.finalizeResolvedSchema(r,e,t,!0)}async saveSchema(e,t){let n=this.normalizeId(e);return this.getOrAddSchemaHandle(n,t),this.schemaPriorityMapping.set(n,new Set().add(Uq.Settings)),Promise.resolve(void 0)}async deleteSchemas(e){return e.schemas.forEach(e=>{this.deleteSchema(e)}),Promise.resolve(void 0)}async deleteSchema(e){let t=this.normalizeId(e);return this.schemasById[t]&&delete this.schemasById[t],this.schemaPriorityMapping.delete(t),Promise.resolve(void 0)}async addContent(e){let t=await this.getResolvedSchema(e.schema);if(t){let n=this.resolveJSONSchemaToSection(t.schema,e.path);typeof n==`object`&&(n[e.key]=e.content),await this.saveSchema(e.schema,t.schema)}}async deleteContent(e){let t=await this.getResolvedSchema(e.schema);if(t){let n=this.resolveJSONSchemaToSection(t.schema,e.path);typeof n==`object`&&delete n[e.key],await this.saveSchema(e.schema,t.schema)}}resolveJSONSchemaToSection(e,t){let n=t.split(`/`),r=e;for(let e of n)e!==``&&(this.resolveNext(r,e),r=r[e]);return r}resolveNext(e,t){if(Array.isArray(e)&&isNaN(t))throw Error(`Expected a number after the array object`);if(typeof e==`object`&&typeof t!=`string`)throw Error(`Expected a string after the object`)}normalizeId(e){try{return Qs.parse(e).toString()}catch{return e}}getOrAddSchemaHandle(e,t){return super.getOrAddSchemaHandle(e,t)}loadSchema(e){let t=this.requestService;return super.loadSchema(e).then(async n=>{if(n.errors&&(n.schema===void 0||typeof n.schema==`number`))return t(e).then(t=>{if(!t)return new sW({},[F(`Unable to load schema from '{0}': No content. {1}`,HK(e),n.errors)]);try{return new sW(Pp(t),[])}catch(t){return new sW({},[F(`Unable to parse content from '{0}': {1}.`,HK(e),t)])}},e=>{let t=e.toString(),n=e.toString().split(`Error: `);return n.length>1&&(t=n[1]),new sW({},[t])});if(n.uri=e,this.schemaUriToNameAndDescription.has(e)){let{name:t,description:r,versions:i}=this.schemaUriToNameAndDescription.get(e);n.schema.title=t??n.schema.title,n.schema.description=r??n.schema.description,n.schema.versions=i??n.schema.versions}else if(n.errors&&n.errors.length>0){let r=n.errors[0];if(r.toLowerCase().indexOf(`load`)!==-1)r=F(`Unable to load schema from '{0}': No content.`,HK(e));else if(r.toLowerCase().indexOf(`parse`)!==-1){let n=await t(e),i=[],a=zs(n,i);if(i.length&&a){let{offset:t}=i[0],{line:a,column:o}=UK(n,t);r=F(`Unable to parse content from '{0}': Parse error at line: {1} column: {2}`,HK(e),a,o)}}return new sW({},[r])}return n})}registerExternalSchema(e,t,n,r,i,a){return(r||i)&&this.schemaUriToNameAndDescription.set(e,{name:r,description:i,versions:a}),super.registerExternalSchema(e,t,n)}clearExternalSchemas(){super.clearExternalSchemas()}setSchemaContributions(e){super.setSchemaContributions(e)}getRegisteredSchemaIds(e){return super.getRegisteredSchemaIds(e)}getResolvedSchema(e){return super.getResolvedSchema(e)}onResourceChange(e){return super.onResourceChange(e)}};function HK(e){try{let t=Qs.parse(e);if(t.scheme===`file`)return t.fsPath}catch{}return e}function UK(e,t){let n=e.slice(0,t).split(/\r?\n/);return{line:n.length,column:n[n.length-1].length+1}}function WK(e){if(!e)return``;let t;t=typeof e==`string`?e:e.$id||e.id||``,t=t.trim();let n=t.indexOf(`#`);return t=n===-1?t:t.slice(0,n),t=t.replace(/^http:\/\/json-schema\.org\//i,`https://json-schema.org/`),t=t.replace(/\/+$/g,``),t}function GK(e){if(e===WK(CK.defaultMeta()))return mW.draft04;if(e===WK(wK.defaultMeta()))return mW.draft07;if(e===WK(TK.defaultMeta()))return mW.draft2019;if(e===WK(EK.defaultMeta()))return mW.draft2020}function KK(e){if(!e)return;let t=e.trim().toLowerCase(),n=RK.get(t);return jK[e]||jK[t]||(n?jK[n]:void 0)}function qK(e,t){(KK(t)||jK.en)(e)}async function JK(e,t){if(!e)return;let n=WK(e||``),r=GK(n);if(r)return r;let i=IK.get(n);if(i)return i;let a=LK.get(n);if(a)return a;if(!t)return;let o=(async()=>{let e=await t(n);if(e.errors?.length)return;let r=e.schema;if(!r||typeof r!=`object`)return;let i=GK(r.$schema);if(i)return i})();LK.set(n,o);try{let e=await o;return IK.set(n,e),e}finally{LK.delete(n)}}function YK(e){switch(e){case mW.draft04:return MK;case mW.draft07:return NK;case mW.draft2019:return PK;case mW.draft2020:return FK;default:return}}var XK=class{constructor(e,t){this.telemetry=t,this.jsonDocumentSymbols=new QW(e),this.jsonDocumentSymbols.getKeyLabel=e=>{let t=e.keyNode.internalNode,n=``;return n=$l(t)?`{}`:tu(t)?`[]`:t.source,n}}findDocumentSymbols(e,t={resultLimit:Number.MAX_VALUE}){let n=[];try{let r=ZG.getYamlDocument(e);if(!r||r.documents.length===0)return null;for(let i of r.documents)i.root&&(n=n.concat(this.jsonDocumentSymbols.findDocumentSymbols(e,i,t)))}catch(e){this.telemetry?.sendError(`yaml.documentSymbols.error`,e)}return n}findHierarchicalDocumentSymbols(e,t={resultLimit:Number.MAX_VALUE}){let n=[];try{let r=ZG.getYamlDocument(e);if(!r||r.documents.length===0)return null;for(let i of r.documents)i.root&&(n=n.concat(this.jsonDocumentSymbols.findDocumentSymbols2(e,i,t)))}catch(e){this.telemetry?.sendError(`yaml.hierarchicalDocumentSymbols.error`,e)}return n}};function ZK(e,t){for(let n of e)n.isKubernetes=t}function QK(e,t=!1){let n=t?`'`:`"`;if(e.length===0)return`${n}${n}`;if(e.length===1&&e===`"`)return`"\\""`;if(e.length===2&&(e[0]===`"`&&e[1]===`"`||e[0]===`'`&&e[1]===`'`))return e[0]===`"`?`"\\"\\""`:`"''"`;if(e.length>=2){let t=e[0],n=e[e.length-1];if(t===`"`&&n===`"`||t===`'`&&n===`'`)return e}return/["\\]/.test(e)?JSON.stringify(e):/^(?:on|off|true|false|yes|no|null|~)$/i.test(e)?`${n}${e}${n}`:/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/.test(e)||/^0x[0-9a-fA-F]+$/.test(e)||/^0o[0-7]+$/.test(e)||/^0[0-7]+$/.test(e)?`"${e}"`:/^\s|\s$/.test(e)||/(?:^|\s)#/.test(e)||/^[\][{}#&*!|>'"%@`]/.test(e)||/^[-?:](\s|$)/.test(e)||/(?:^|[^:]):(?:\s|$)/.test(e)?t?`'${e.replace(/'/g,`''`)}'`:JSON.stringify(e):/[\n\t\r]/.test(e)?JSON.stringify(e):e}var $K=class{constructor(e,t){this.telemetry=t,this.shouldHover=!0,this.schemaService=e}configure(e){e&&(this.shouldHover=e.hover,this.shouldHoverAnchor=e.hoverAnchor,this.indentation=e.indentation,this.hoverSchemaSource=e.hoverSchemaSource??!0)}doHover(e,t,n=!1){try{if(!this.shouldHover||!e)return Promise.resolve(void 0);let r=ZG.getYamlDocument(e),i=AW(e.offsetAt(t),r);return i===null?Promise.resolve(void 0):(ZK(r.documents,n),i.currentDocIndex=r.documents.indexOf(i),this.getHover(e,t,i))}catch(e){this.telemetry?.sendError(`yaml.hover.error`,e)}}getHover(e,t,n){let r=e.offsetAt(t),i=n.getNodeFromOffset(r);if(!i||(i.type===`object`||i.type===`array`)&&r>i.offset+1&&r<i.offset+i.length-1)return Promise.resolve(null);let a=i;if(i.type===`string`){let e=i.parent;if(e&&e.type===`property`&&e.keyNode===i&&(i=e.valueNode,!i))return Promise.resolve(null)}let o=M.create(e.positionAt(a.offset),e.positionAt(a.offset+a.length)),s=e=>({contents:{kind:Wc.Markdown,value:e},range:o});if(this.shouldHoverAnchor&&i.type===`property`&&i.valueNode&&i.valueNode.type===`object`){let e="```yaml\n"+Fp(this.resolveMergeKeys(i.valueNode,n),null,2)+"\n```";return Promise.resolve(s(e))}let c=e=>e.replace(/\s\|\|\s*$/,``);return this.schemaService.getSchemaForResource(e.uri,n).then(e=>{if(e&&i&&!e.errors.length){let t=n.getMatchingSchemas(e.schema,i.offset),r,a,o=[],l=[],u=[],d;t.every(e=>((e.node===i||i.type===`property`&&i.valueNode===e.node)&&!e.inverted&&e.schema&&(r=r||e.schema.title||e.schema.closestTitle,a=a||e.schema.markdownDescription||this.toMarkdown(e.schema.description),e.schema.enum&&(d=e.schema.enum.indexOf(hW(i)),o=e.schema.markdownEnumDescriptions?e.schema.markdownEnumDescriptions:e.schema.enumDescriptions?e.schema.enumDescriptions.map(this.toMarkdown,this):[],e.schema.enum.forEach((e,t)=>{var n;e=typeof e==`string`?QK(e,!1):JSON.stringify(e);let r=u.findIndex(t=>t.value===e);r<0?u.push({value:e,description:o[t]}):(n=u[r]).description||(n.description=o[t])})),e.schema.anyOf&&rq(i,t,e.schema)&&(r=``,a=e.schema.description?e.schema.description+`
373
+ `:``,e.schema.anyOf.forEach((t,n)=>{r+=t.title||e.schema.closestTitle||``,a+=t.markdownDescription||this.toMarkdown(t.description)||``,n!==e.schema.anyOf.length-1&&(r+=` || `,a+=` || `)}),r=c(r),a=c(a)),e.schema.examples&&e.schema.examples.forEach(e=>{l.push(Fp(e,null,2))})),!0));let f=``;return r&&(f=`#### `+this.toMarkdown(r)),a&&(f=eq(f),f+=a),u.length!==0&&(f=eq(f),f+=F(`Allowed Values:`)+`
374
+
375
+ `,d&&u.unshift(u.splice(d,1)[0]),u.forEach(e=>{e.description?f+=`* \`${nq(e.value)}\`: ${e.description}
376
+ `:f+=`* \`${nq(e.value)}\`
377
+ `})),l.length!==0&&l.forEach(e=>{f=eq(f),f+=F(`Example:`)+`
378
+
379
+ `,f+=`\`\`\`yaml
380
+ ${e}\`\`\`
381
+ `}),f.length>0&&e.schema.url&&this.hoverSchemaSource&&(f=eq(f),f+=F(`Source: [{0}]({1})`,tq(e.schema),e.schema.url)),s(f)}return null})}resolveMergeKeys(e,t,n=0){let r={},i=[...e.properties];for(;i.length>0;){let e=i.shift(),a=e.keyNode.value;if(a===`<<`&&e.valueNode){let i=this.resolveMergeValue(e.valueNode,t,n+1);if(i&&typeof i==`object`&&!Array.isArray(i)){let e=Object.keys(i);for(let t of e)r[t]=i[t]}}else r[a]=this.astNodeToValue(e.valueNode,t,n)}return r}resolveMergeValue(e,t,n){return n>=10?{"<<":e.parent.internalNode.value+` (recursion limit reached)`}:e.type===`object`?this.resolveMergeKeys(e,t,n):this.astNodeToValue(e,t,n)}astNodeToValue(e,t,n){if(!e)return null;switch(e.type){case`object`:return this.resolveMergeKeys(e,t,n);case`array`:return e.children.map(e=>this.astNodeToValue(e,t,n));case`string`:case`number`:case`boolean`:case`null`:return e.value;default:return this.nodeToValue(e.internalNode)}}nodeToValue(e){if(Zl(e))return e.source;if($l(e)){let t={};for(let n of e.items)if(n.key&&n.value){let e=this.nodeToValue(n.key),r=this.nodeToValue(n.value);typeof e==`string`&&(t[e]=r)}return t}return tu(e)?e.items.map(e=>this.nodeToValue(e)):e.value}toMarkdown(e){if(e){let t=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
382
+
383
+ $3`);if(t=t.replace(/[\\`*_{}[\]#+!]/g,`\\$&`),this.indentation!==void 0){let e=RegExp(` {${this.indentation.length}}`,`g`);t=t.replace(e,`&emsp;`)}return t}}};function eq(e){return e.length===0?e:(e.endsWith(`
384
+ `)||(e+=`
385
+ `),e+`
386
+ `)}function tq(e){let t=`JSON Schema`,n=e.url;if(n){let e=Qs.parse(n);t=Ul.basename(e.fsPath)}else e.title&&(t=e.title);return t}function nq(e){return e.indexOf("`")===-1?e:"`` "+e+" ``"}function rq(e,t,n){let r=0;for(let i of t)e===i.node&&i.schema!==n&&n.anyOf.forEach(e=>{i.schema.title===e.title&&i.schema.description===e.description&&i.schema.properties===e.properties&&r++});return r===n.anyOf.length}var iq=/^\s*#\s*yaml-language-server-disable\b(.*)$/;function aq(e){let t=e.trim();return t?t.split(`,`).map(e=>e.trim().toLowerCase()).filter(e=>e.length>0):[]}function oq(e,t){if(e.length===0)return!0;let n=t.toLowerCase();return e.some(e=>n.includes(e))}function sq(e,t,n,r){return e.filter(e=>{let i=t(e);if(i===0)return!0;let a=r(i-1);if(a===void 0)return!0;let o=iq.exec(a);return!o||!oq(aq(o[1]),n(e))})}var cq=class{validate(e,t){let n=[],r=new Set,i=new Set,a=new Set,o=new Map;cu(t.internalDocument,(e,n,s)=>{ru(n)&&((nu(n)||I(n))&&n.anchor&&(r.add(n),o.set(n,s[s.length-1])),Zl(n)&&(n.resolve(t.internalDocument)?i.add(n.resolve(t.internalDocument)):a.add(n)))});for(let t of r)if(!i.has(t)){let r=this.getAnchorNode(o.get(t),t);if(r){let t=M.create(e.positionAt(r.offset),e.positionAt(r.offset+r.source.length)),i=Dc.create(t,F(`Unused anchor "{0}"`,r.source),N.Information,0);i.tags=[Tc.Unnecessary],n.push(i)}}return a.forEach(t=>{let r=t.range;if(r){let i=r[0],a=r[1],o=M.create(e.positionAt(i),e.positionAt(a)),s=Dc.create(o,F(`Unresolved alias "{0}"`,t.toString()),N.Information,0);s.tags=[Tc.Unnecessary],n.push(s)}}),n}getAnchorNode(e,t){if(e&&e.srcToken){let n=e.srcToken;if(qG(n))return lq(n);if(pp(n))for(let e of n.items){if(t.srcToken!==e.value)continue;let n=lq(e);if(n)return n}}}};function lq(e){for(let t of e.start)if(t.type===`anchor`)return t;if(e.sep&&Array.isArray(e.sep)){for(let t of e.sep)if(t.type===`anchor`)return t}}var uq=class{constructor(e){this.forbidMapping=e.flowMapping===`forbid`,this.forbidSequence=e.flowSequence===`forbid`}validate(e,t){let n=[];return cu(t.internalDocument,(t,r)=>{this.forbidMapping&&$l(r)&&r.srcToken?.type===`flow-collection`&&n.push(Dc.create(this.getRangeOf(e,r.srcToken),F(`Flow style mapping is forbidden`),N.Error,`flowMap`)),this.forbidSequence&&tu(r)&&r.srcToken?.type===`flow-collection`&&n.push(Dc.create(this.getRangeOf(e,r.srcToken),F(`Flow style sequence is forbidden`),N.Error,`flowSeq`))}),n}getRangeOf(e,t){let n=t.end[0].offset,r=e.positionAt(n);return r={character:r.character+1,line:r.line},M.create(e.positionAt(t.start.offset),r)}},dq=class{validate(e,t){let n=[];return cu(t.internalDocument,(t,r)=>{if($l(r)){for(let t=1;t<r.items.length;t++)if(pq(r.items[t-1],r.items[t])>0){let i=fq(e,r.items[t-1]);n.push(Dc.create(i,`Wrong ordering of key "${r.items[t-1].key}" in mapping`,N.Error,`mapKeyOrder`));break}}}),n}};function fq(e,t){let n=t.key.srcToken,r=n.offset,i=r+n.source.length;return M.create(e.positionAt(r),e.positionAt(i))}function pq(e,t){let n=String(t.key);return String(e.key).localeCompare(n)}var mq=(e,t)=>{let n=t.positionAt(e.location.start),r={start:n,end:e.location.toLineEnd?gc.create(n.line,new nK(t).getLineLength(n.line)):t.positionAt(e.location.end)};return Dc.create(r,e.message,e.severity,e.code,oG)},hq=class{constructor(e,t){this.telemetry=t,this.validators=[],this.MATCHES_MULTIPLE=`Matches multiple schemas when only one must validate.`,this.validationEnabled=!0,this.jsonValidation=new BW(e,Promise)}configure(e){this.validators=[],e&&(this.validationEnabled=e.validate,this.customTags=e.customTags,this.disableAdditionalProperties=e.disableAdditionalProperties,this.yamlVersion=e.yamlVersion,(e.flowMapping===`forbid`||e.flowSequence===`forbid`)&&this.validators.push(new uq(e)),e.keyOrdering&&this.validators.push(new dq)),this.validators.push(new cq)}async doValidation(e,t=!1){if(!this.validationEnabled)return Promise.resolve([]);let n=[];try{let r=ZG.getYamlDocument(e,{customTags:this.customTags,yamlVersion:this.yamlVersion},!0),i=0;for(let a of r.documents){a.isKubernetes=t,a.currentDocIndex=i,a.disableAdditionalProperties=this.disableAdditionalProperties,a.uri=e.uri;let r=await this.jsonValidation.doValidation(e,a),o=a;o.errors.length>0&&n.push(...o.errors),o.warnings.length>0&&n.push(...o.warnings),n.push(...r),n.push(...this.runAdditionalValidators(e,a)),i++}}catch(e){this.telemetry?.sendError(`yaml.validation.error`,e)}let r,i=new Set,a=[];for(let o of n){if(t&&o.message===this.MATCHES_MULTIPLE)continue;if(Object.prototype.hasOwnProperty.call(o,`location`)&&(o=mq(o,e)),o.source||(o.source=oG),r&&r.message===o.message&&r.range.end.line===o.range.start.line&&Math.abs(r.range.end.character-o.range.end.character)>=1){r.range.end=o.range.end;continue}r=o;let n=o.range.start.line+` `+o.range.start.character+` `+o.message;i.has(n)||(a.push(o),i.add(n))}let o=new nK(e);return sq(a,e=>e.range.start.line,e=>e.message,e=>{if(!(e<0||e>=o.getLineCount()))return o.getLineContent(e).replace(/[\r\n]+$/,``)})}runAdditionalValidators(e,t){let n=[];for(let r of this.validators)n.push(...r.validate(e,t));return n}},gq=class{constructor(){this.formatterEnabled=!0}configure(e){e&&(this.formatterEnabled=e.format)}async format(e,t={}){if(!this.formatterEnabled)return[];try{let n=e.getText(),r=await EU(n,{parser:`yaml`,plugins:[Ip,tS],tabWidth:t.tabWidth||t.tabSize,singleQuote:t.singleQuote,bracketSpacing:t.bracketSpacing,proseWrap:t.proseWrap===`always`?`always`:t.proseWrap===`never`?`never`:`preserve`,printWidth:t.printWidth,trailingComma:t.trailingComma===!1?`none`:`all`});return r===n?[]:[kc.replace(M.create(gc.create(0,0),e.positionAt(n.length)),r)]}catch{return[]}}},_q=class{constructor(e){this.telemetry=e}findLinks(e){try{let t=ZG.getYamlDocument(e),n=[];for(let r of t.documents)n.push(eG(e,r));return Promise.all(n).then(e=>[].concat(...e))}catch(e){this.telemetry?.sendError(`yaml.documentLink.error`,e)}}};function vq(e,t){if(!e)return;let n=[],r=ZG.getYamlDocument(e);for(let t of r.documents)r.documents.length>1&&n.push(yq(e,t.root)),t.visit(t=>{if(t.type===`object`&&t.parent?.type===`array`&&n.push(yq(e,t)),t.type===`property`&&t.valueNode)switch(t.valueNode.type){case`array`:case`object`:n.push(yq(e,t));break;case`string`:{let r=e.positionAt(t.offset),i=e.positionAt(t.valueNode.offset+t.valueNode.length);r.line!==i.line&&n.push(yq(e,t));break}default:return!0}return!0});let i=t&&t.rangeLimit;return typeof i!=`number`||n.length<=i?n:(t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri),n.slice(0,t.rangeLimit))}function yq(e,t){let n=e.positionAt(t.offset),r=e.positionAt(t.offset+t.length),i=e.getText(M.create(n,r)),a=i.length-i.trimRight().length;return a>0&&(r=e.positionAt(t.offset+t.length-a)),Cc.create(n.line,r.line,n.character,r.character)}var bq;(function(e){e.JUMP_TO_SCHEMA=`jumpToSchema`})(bq||={});var xq=class{constructor(e,t){this.indentation=e,this.maxLineLength=t}writeFoldedBlockScalar(e){if(e.type!==`QUOTE_DOUBLE`&&e.type!==`QUOTE_SINGLE`)return null;let t=e.value,n=e.srcToken.indent,r=this.indentation;for(let e=0;e<n/this.indentation.length;e++)r+=this.indentation;let i=[],a=t.split(`
387
+ `);for(let e of a){let t=e;slicing:for(;t.length>this.maxLineLength;){let e=this.maxLineLength;for(;!/ /.test(t.charAt(e));)if(e++,e>=t.length)break slicing;for(;/ /.test(t.charAt(e));)if(e++,e>=t.length)break slicing;let n=t.substring(0,e-1);i.push(n),t=t.substring(e)}i.push(t),i.push(`
388
+ `)}i.pop();for(let e=1;e<i.length;){if(/^[ \t]+$/.test(i[e])){if(i[e-1]===`
389
+ `||i[e-1]===``){i.splice(e-1,1);continue}return null}e++}let o=`>`;i[i.length-1]!==`
390
+ `&&i[i.length-1]!==``?o+=`-`:(i[i.length-2]===`
391
+ `||i[i.length-2]===``)&&i[i.length-3]!==`
392
+ `&&i[i.length-3]!==``?i.splice(i.length-2,2):o+=`+`,/ /.test(t.charAt(0))&&(o+=`${r.length}`);let s=i.flatMap(t=>t===`
393
+ `||t===``?[{type:`newline`,indent:0,offset:e.srcToken.offset,source:`
394
+ `}]:[{type:`newline`,indent:0,offset:e.srcToken.offset,source:`
395
+ `},{type:`space`,indent:0,offset:e.srcToken.offset,source:r},{type:`scalar`,indent:0,offset:e.srcToken.offset,source:t}]);s.unshift({type:`block-scalar-header`,source:o,offset:e.srcToken.offset,indent:0});let c={type:`block-scalar`,offset:e.srcToken.offset,indent:0,source:``,props:s};return ap(c)}writeLiteralBlockScalar(e){if(e.type!==`QUOTE_DOUBLE`&&e.type!==`QUOTE_SINGLE`)return null;let t=e.value;if(t.indexOf(`
396
+ `)<0)return null;let n=e.srcToken.indent,r=this.indentation;for(let e=0;e<n/this.indentation.length;e++)r+=this.indentation;let i=t.split(`
397
+ `),a=`|`;i[i.length-1]!==`
398
+ `&&i[i.length-1]!==``?a+=`-`:i[i.length-2]!==`
399
+ `&&i[i.length-2]!==``?i.splice(i.length-1,1):a+=`+`,/ /.test(t.charAt(0))&&(a+=`${r.length}`);let o=i.flatMap(t=>t===``?[{type:`newline`,indent:0,offset:e.srcToken.offset,source:`
400
+ `}]:[{type:`newline`,indent:0,offset:e.srcToken.offset,source:`
401
+ `},{type:`space`,indent:0,offset:e.srcToken.offset,source:r},{type:`scalar`,indent:0,offset:e.srcToken.offset,source:t}]);o.unshift({type:`block-scalar-header`,source:a,offset:e.srcToken.offset,indent:0});let s={type:`block-scalar`,offset:e.srcToken.offset,indent:0,source:``,props:o};return ap(s)}},Sq=class{constructor(e){this.indentation=e}write(e){if(e.internalNode.srcToken.type!==`flow-collection`)return null;let t=e.internalNode.srcToken,n=t.start.type===`flow-map-start`?`block-map`:`block-seq`,r=e.parent.type,i={type:n,offset:t.offset,indent:t.indent,items:[]};for(let e of t.items)dp(e,({key:e,sep:t,value:a})=>{if(n===`block-map`){let n=[{type:`space`,indent:0,offset:e.offset,source:this.indentation}];r===`property`&&n.unshift({type:`newline`,indent:0,offset:e.offset,source:`
402
+ `}),i.items.push({start:n,key:e,sep:t,value:a})}else n===`block-seq`&&i.items.push({start:[{type:`newline`,indent:0,offset:a.offset,source:`
403
+ `},{type:`space`,indent:0,offset:a.offset,source:this.indentation},{type:`seq-item-ind`,indent:0,offset:a.offset,source:`-`},{type:`space`,indent:0,offset:a.offset,source:` `}],value:a});if(a.type===`flow-collection`)return cu.SKIP});return ap(i)}},Cq=class{constructor(e){this.clientCapabilities=e,this.indentation=` `,this.lineWidth=80}configure(e,t){this.indentation=e.indentation,this.lineWidth=t}getCodeAction(e,t){if(!t.context.diagnostics)return;let n=[];return n.push(...this.getConvertToBooleanActions(t.context.diagnostics,e)),n.push(...this.getJumpToSchemaActions(t.context.diagnostics)),n.push(...this.getTabToSpaceConverting(t.context.diagnostics,e)),n.push(...this.getUnusedAnchorsDelete(t.context.diagnostics,e)),n.push(...this.getConvertToBlockStyleActions(t.context.diagnostics,e)),n.push(...this.getConvertStringToBlockStyleActions(t.range,e)),n.push(...this.getKeyOrderActions(t.context.diagnostics,e)),n.push(...this.getQuickFixForPropertyOrValueMismatch(t.context.diagnostics,e)),n}getJumpToSchemaActions(e){if(!(this.clientCapabilities?.window?.showDocument?.support??!1))return[];let t=new Map;for(let n of e){let e=n.data?.schemaUri||[];for(let r of e)r&&(t.has(r)||t.set(r,[]),t.get(r).push(n))}let n=[];for(let e of t.keys()){let r=gl.create(F(`Jump to schema location ({0})`,Ul.basename(e)),Oc.create(`JumpToSchema`,bq.JUMP_TO_SCHEMA,e));r.diagnostics=t.get(e),n.push(r)}return n}getTabToSpaceConverting(e,t){let n=[],r=new nK(t),i=[];for(let a of e)if(a.message===`Tabs are not allowed as indentation`){if(i.includes(a.range.start.line))continue;let e=r.getLineContent(a.range.start.line),o=0,s=``;for(let t=a.range.start.character;t<=a.range.end.character&&e.charAt(t)===` `;t++)o++,s+=this.indentation;i.push(a.range.start.line);let c=a.range;o!==a.range.end.character-a.range.start.character&&(c=M.create(a.range.start,gc.create(a.range.end.line,a.range.start.character+o))),n.push(gl.create(F(`Convert Tab to Spaces`),Tq(t.uri,[kc.replace(c,s)]),fl.QuickFix))}if(n.length!==0){let e=[];for(let t=0;t<=r.getLineCount();t++){let n=r.getLineContent(t),i=0,a=``;for(let r=0;r<n.length;r++){let o=n.charAt(r);if(o!==` `&&o!==` `){i!==0&&(e.push(kc.replace(M.create(t,r-i,t,r),a)),i=0,a=``);break}if(o===` `&&i!==0){e.push(kc.replace(M.create(t,r-i,t,r),a)),i=0,a=``;continue}o===` `&&(a+=this.indentation,i++)}i!==0&&e.push(kc.replace(M.create(t,0,t,r.getLineLength(t)),a))}e.length>0&&n.push(gl.create(F(`Convert all Tabs to Spaces`),Tq(t.uri,e),fl.QuickFix))}return n}getUnusedAnchorsDelete(e,t){let n=[],r=new nK(t);for(let i of e)if(i.message.startsWith(`Unused anchor`)&&i.source===oG){let e=M.create(i.range.start,i.range.end),a=r.getText(e),o=IW(r.getLineContent(e.end.line),e.end.character);e.end.character=o;let s=gl.create(F(`Delete unused anchor: {0}`,a),Tq(t.uri,[kc.del(e)]),fl.QuickFix);s.diagnostics=[i],n.push(s)}return n}getConvertToBooleanActions(e,t){let n=[];for(let r of e)if(r.message===`Incorrect type. Expected "boolean".`){let e=t.getText(r.range).toLocaleLowerCase();if(e===`"true"`||e===`"false"`||e===`'true'`||e===`'false'`){let i=e.includes(`true`)?`true`:`false`;n.push(gl.create(F(`Convert to boolean`),Tq(t.uri,[kc.replace(r.range,i)]),fl.QuickFix))}}return n}getConvertToBlockStyleActions(e,t){let n=[];for(let r of e)if(r.code===`flowMap`||r.code===`flowSeq`){let e=wq(t,r);if($l(e.internalNode)||tu(e.internalNode)){let i=$l(e.internalNode)?`map`:`sequence`,a=new Sq(this.indentation);n.push(gl.create(F(`Convert to block style {0}`,i),Tq(t.uri,[kc.replace(r.range,a.write(e))]),fl.QuickFix))}}return n}getConvertStringToBlockStyleActions(e,t){let n=ZG.getYamlDocument(t),r=e?t.offsetAt(e.start):0,i=e?t.offsetAt(e.end):1/0,a=[];for(let e of n.documents){let n=[];cu(e.internalDocument,(e,t)=>{I(t)&&(r<=t.range[0]&&t.range[2]<=i||t.range[0]<=r&&i<=t.range[2])&&(t.type===`QUOTE_DOUBLE`||t.type===`QUOTE_SINGLE`)&&typeof t.value==`string`&&(t.value.indexOf(`
404
+ `)>=0||t.value.length>this.lineWidth)&&n.push(t)});for(let e of n){let n=M.create(t.positionAt(e.range[0]),t.positionAt(e.range[1])),r=new xq(this.indentation,this.lineWidth),i=r.writeFoldedBlockScalar(e);i!==null&&a.push(gl.create(F(`Convert string to folded block string`),Tq(t.uri,[kc.replace(n,i)]),fl.Refactor));let o=r.writeLiteralBlockScalar(e);o!==null&&a.push(gl.create(F(`Convert string to literal block string`),Tq(t.uri,[kc.replace(n,o)]),fl.Refactor))}}return a}getKeyOrderActions(e,t){let n=[];for(let r of e)if(r?.code===`mapKeyOrder`){let e=wq(t,r);for(;e&&e.type!==`object`;)e=e.parent;if(e&&$l(e.internalNode)){let r=structuredClone(e.internalNode),i=e=>{if(e){if(mp(e))return e.type===`block-scalar`?(e.props??=[],e.props):(e.end??=[],e.end);if(e.type===`flow-collection`)return e.end??=[],e.end;if(e.type===`block-map`){let t=e.items[e.items.length-1];return t?i(t.value):void 0}}};if((r.srcToken.type===`block-map`||r.srcToken.type===`flow-collection`)&&(e.internalNode.srcToken.type===`block-map`||e.internalNode.srcToken.type===`flow-collection`)){r.srcToken.items.sort((e,t)=>{if(e.key&&t.key&&mp(e.key)&&mp(t.key))return e.key.source.localeCompare(t.key.source);if(!e.key&&t.key)return-1;if(e.key&&!t.key)return 1;if(!e.key&&!t.key)return 0});for(let t=0;t<r.srcToken.items.length;t++){let n=r.srcToken.items[t],a=e.internalNode.srcToken.items[t];for(n.start=a.start;n.start?.[0]?.type===`newline`;)n.start.shift();let o=i(n.value),s=o?.findIndex(e=>e.type===`newline`)??-1,c=i(a.value)?.find(t=>t.type===`newline`&&t.offset<e.offset+e.length)??null;c&&s<0&&o&&o.push({type:`newline`,indent:0,offset:n.value.offset,source:`
405
+ `}),!c&&s>-1&&o&&o.splice(s,1)}}let a=M.create(t.positionAt(e.offset),t.positionAt(e.offset+e.length));n.push(gl.create(F(`Fix key order for this map`),Tq(t.uri,[kc.replace(a,ap(r.srcToken))]),fl.QuickFix))}}return n}getPossibleQuickFixValues(e){if(typeof e.data==`object`){if(e.code===BU.EnumValueMismatch&&`values`in e.data&&Array.isArray(e.data.values))return e.data.values;if(e.code===BU.PropertyExpected&&`properties`in e.data&&Array.isArray(e.data.properties))return e.data.properties}}getQuickFixForPropertyOrValueMismatch(e,t){let n=[];for(let r of e){let e=this.getPossibleQuickFixValues(r);if(e?.length)for(let i of e){let e=typeof i==`string`?QK(i):String(i);n.push(gl.create(e,Tq(t.uri,[kc.replace(r.range,e)]),fl.QuickFix))}}return n}};function wq(e,t){let n=ZG.getYamlDocument(e),r=e.offsetAt(t.range.start),i=e.offsetAt(t.range.end),a=AW(r,n),o=a.getNodeFromOffset(r);if(o&&r<i&&o.offset+o.length===r){let e=a.getNodeFromOffset(r+1);e&&(o=e)}return o}function Tq(e,t){let n={};return n[e]=t,{changes:n}}function Eq(e,t){let{position:n}=t,r=new nK(e);if(t.ch===`
406
+ `){let e=r.getLineContent(n.line-1);if(e.trimRight().endsWith(`:`)){let i=r.getLineContent(n.line),a=i.substring(n.character,i.length),o=e.indexOf(` - `)!==-1;if(a.trimRight().length===0){let r=n.character-(e.length-e.trimLeft().length);if(r===t.options.tabSize&&!o)return;let a=[];return i.length>0&&a.push(kc.del(M.create(n,gc.create(n.line,i.length-1)))),a.push(kc.insert(n,` `.repeat(t.options.tabSize+(o?2-r:0)))),a}if(o)return[kc.insert(n,` `.repeat(t.options.tabSize))]}if(e.trimRight().endsWith(`|`))return[kc.insert(n,` `.repeat(t.options.tabSize))];if(e.includes(` - `)&&!e.includes(`: `))return[kc.insert(n,`- `)];if(e.includes(` - `)&&e.includes(`: `))return[kc.insert(n,` `)]}}var Dq=class{constructor(e,t){this.schemaService=e,this.telemetry=t}async getCodeLens(e){let t=[];try{let n=ZG.getYamlDocument(e),r=new Map;for(let t of n.documents){let n=await this.schemaService.getSchemaForResource(e.uri,t);n?.schema&&(r=new Map([...gK(n?.schema),...r]))}for(let e of r){let n=_l.create(M.create(0,0,0,0));n.command={title:DW(e[1],e[0]),command:bq.JUMP_TO_SCHEMA,arguments:[e[0]]},t.push(n)}}catch(e){this.telemetry?.sendError(`yaml.codeLens.error`,e)}return t}resolveCodeLens(e){return e}},Oq=class{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}};function kq(e,t,n,r,i){i.spacesDiff=0,i.looksLikeAlignment=!1;let a;for(a=0;a<t&&a<r&&e.charCodeAt(a)===n.charCodeAt(a);a++);let o=0,s=0;for(let n=a;n<t;n++)e.charCodeAt(n)===32?o++:s++;let c=0,l=0;for(let e=a;e<r;e++)n.charCodeAt(e)===32?c++:l++;if(o>0&&s>0||c>0&&l>0)return;let u=Math.abs(s-l),d=Math.abs(o-c);if(u===0){i.spacesDiff=d,d>0&&0<=c-1&&c-1<e.length&&c<n.length&&n.charCodeAt(c)!==32&&e.charCodeAt(c-1)===32&&e.charCodeAt(e.length-1)===44&&(i.looksLikeAlignment=!0);return}d%u===0&&(i.spacesDiff=d/u)}function Aq(e,t,n){let r=Math.min(e.getLineCount(),1e4),i=0,a=0,o=``,s=0,c=[2,4,6,8,3,5,7],l=[0,0,0,0,0,0,0,0,0],u=new Oq;for(let c=1;c<=r;c++){let r=e.getLineLength(c),d=e.getLineContent(c),f=r<=65536,p=!1,m=0,h=0,g=0;for(let t=0,n=r;t<n;t++){let n=f?d.charCodeAt(t):e.getLineCharCode(c,t);if(n===9)g++;else if(n===32)h++;else{p=!0,m=t;break}}if(!p||(g>0?i++:h>1&&a++,kq(o,s,d,m,u),u.looksLikeAlignment&&!(n&&t===u.spacesDiff)))continue;let _=u.spacesDiff;_<=8&&l[_]++,o=d,s=m}let d=n;i!==a&&(d=i<a);let f=t;if(d){let e=d?0:.1*r;c.forEach(t=>{let n=l[t];n>e&&(e=n,f=t)}),f===4&&l[4]>0&&l[2]>0&&l[2]>=l[4]/2&&(f=2)}return{insertSpaces:d,tabSize:f}}function jq(e,t,n,r,i=0,a=0){if(typeof e==`object`&&e){let o=i===0&&r.shouldIndentWithTab||i>0?t+r.indentation:``;if(Array.isArray(e)){if(a+=1,e.length===0)return``;let s=``;for(let c=0;c<e.length;c++){let l=e[c];if(typeof e[c]!=`object`){s+=`
407
+ `+o+`- `+n(e[c]);continue}Array.isArray(e[c])||(l=Mq(e[c],a)),s+=jq(l,t,n,r,i+=1,a)}return s}{let a=Object.keys(e);if(a.length===0)return``;let s=i===0&&r.newLineFirst||i>0?`
408
+ `:``,c=!0;for(let l=0;l<a.length;l++){let u=a[l];if(i===0&&r.existingProps.includes(u))continue;let d=typeof e[u]==`object`,f=d?`:`:`: `,p=o+(d&&/^\s|-/.test(u)?r.indentation:``),m=c?``:`
409
+ `;if(i===0&&c&&!r.indentFirstObject){let a=jq(e[u],p,n,r,i+1,0);s+=m+t+u+f+a}else{let t=jq(e[u],p,n,r,i+1,0);s+=m+o+u+f+t}c=!1}return s}}return n(e)}function Mq(e,t){let n={};for(let r=0;r<Object.keys(e).length;r++){let i=Object.keys(e)[r];r===0?n[`- `.repeat(t)+i]=e[i]:n[` `.repeat(t)+i]=e[i]}return n}var Nq=Kc.Class,Pq=`__`,Fq=class{constructor(e,t={},n,r){this.schemaService=e,this.clientCapabilities=t,this.yamlDocument=n,this.telemetry=r,this.completionEnabled=!0,this.arrayPrefixIndentation=``}configure(e,t){e&&(this.completionEnabled=e.completion),this.customTags=e.customTags,this.yamlVersion=e.yamlVersion,this.isSingleQuote=t?.yamlFormatterSettings?.singleQuote||!1,this.configuredIndentation=e.indentation,this.disableDefaultProperties=e.disableDefaultProperties,this.parentSkeletonSelectedFirst=e.parentSkeletonSelectedFirst}async doComplete(e,t,n=!1,r=!0){let i=el.create([],!1);if(!this.completionEnabled)return i;let a=this.yamlDocument.getYamlDocument(e,{customTags:this.customTags,yamlVersion:this.yamlVersion},!0),o=new nK(e);if(this.configuredIndentation)this.indentation=this.configuredIndentation;else{let e=Aq(o,2,!0);this.indentation=e.insertSpaces?` `.repeat(e.tabSize):` `}ZK(a.documents,n);for(let t of a.documents)t.uri=e.uri;let s=e.offsetAt(t),c=e.getText();if(c.charAt(s-1)===`:`)return Promise.resolve(i);let l=AW(s,a);if(l===null)return Promise.resolve(i);l=l.clone();let[u,d]=l.getNodeFromPosition(s,o,this.indentation.length),f=this.getCurrentWord(e,s),p=o.getLineContent(t.line),m=p.substring(t.character),h=/^[ ]+\n?$/.test(m);this.arrayPrefixIndentation=``;let g=null;if(h){g=M.create(t,gc.create(t.line,p.length));let e=p.trim().length===0,n=p.match(/^\s*(-)\s*$/);if(u&&I(u)&&!e&&!n){let e=p.substring(0,t.character),n=e.match(/^[\s-]*([^:]+)?$/)||e.match(/:[ \t]((?!:[ \t]).*)$/);n?.[1]&&(g=M.create(gc.create(t.line,t.character-n[1].length),gc.create(t.line,p.length)))}}else if(u&&I(u)&&u.value===`null`){let t=e.positionAt(u.range[0]);t.character+=1;let n=e.positionAt(u.range[2]);n.character+=1,g=M.create(t,n)}else if(u&&I(u)&&u.value){let t=e.positionAt(u.range[0]);g=M.create(t,e.positionAt(u.range[1]))}else if(u&&I(u)&&u.value===null&&f===`-`)g=M.create(t,t),this.arrayPrefixIndentation=` `;else{let n=s-f.length;n>0&&c[n-1]===`"`&&n--,g=M.create(e.positionAt(n),t)}let _={},v={add:(e,t)=>{let n=function(e){if(_[e.label]?.label===Pq)return;let t=e.parent.schema,n=TW(t),r=t.markdownDescription||t.description,a=i.items.find(e=>e.parent?.schema===t&&e.kind===Nq);a&&a.parent.insertTexts.includes(e.insertText)||(a?a.parent.insertTexts.push(e.insertText):(a={...e,label:n,documentation:r,sortText:`_`+n,kind:Nq},a.label=a.label||e.label,a.parent.insertTexts=[e.insertText],i.items.push(a)))},r=!!e.parent,a=e.label;if(!a){console.warn(`Ignoring CompletionItem without label: ${JSON.stringify(e)}`);return}if(CW(a)||(a=String(a)),a=a.replace(/\n|\\n/g,`↵`),a.length>60){let e=a.substr(0,57).trim()+`...`;_[e]||(a=e)}if(e.label.toLowerCase()===`regular expression`){let t=e.documentation.value.split(`:`);a=t.length>0?`${this.getQuote()}\\${JSON.parse(t[1])}${this.getQuote()}`:e.label,e.insertText=a,e.textEdit=kc.replace(g,a)}else{let t=e.insertText.replace(/\${[0-9]+[:|](.*)}/g,(e,t)=>t).replace(/\$([0-9]+)/g,``).match(/^([^:"]+):\s*(['\\"\\])$/);if(t){let n=t[1],r=t[2];e.insertText=`${n}: ${this.getQuote()}\\${r}${this.getQuote()}`}e.insertText.endsWith(`$1`)&&!r&&(e.insertText=e.insertText.substr(0,e.insertText.length-2)),g&&g.start.line===g.end.line&&(e.textEdit=kc.replace(g,e.insertText))}if(e.label=a,r){n(e);return}this.arrayPrefixIndentation&&this.updateCompletionText(e,this.arrayPrefixIndentation+e.insertText);let o=_[a],s=o?.label!==Pq&&o?.insertText!==e.insertText;if(!o)_[a]=e,i.items.push(e);else if(s){let n=this.mergeSimpleInsertTexts(a,o.insertText,e.insertText,t);n?this.updateCompletionText(o,n):(_[a]=e,i.items.push(e))}o&&!o.documentation&&e.documentation&&(o.documentation=e.documentation),o&&!o.detail&&e.detail&&(o.detail=e.detail)},error:e=>{this.telemetry?.sendError(`yaml.completion.error`,e)},log:e=>{console.log(e)},getNumberOfProposals:()=>i.items.length,result:i,proposed:_};this.customTags&&this.customTags.length>0&&this.getCustomTagValueCompletions(v),p.endsWith(`
410
+ `)&&(p=p.substr(0,p.length-1));try{let n=await this.schemaService.getSchemaForResource(e.uri,l);if((!n||n.errors.length)&&t.line===0&&t.character===0&&!sK(p)){let e={kind:Kc.Text,label:F(`Inline schema`),insertText:`# yaml-language-server: $schema=`,insertTextFormat:qc.PlainText};i.items.push(e)}if(sK(p)||KG(a.tokens,s)){let e=p.match(/\$schema[=:]/);if(e)return e.index+e[0].length<=t.character&&this.schemaService.getAllSchemas().forEach(e=>{let t={kind:Kc.Constant,label:e.name??e.uri,detail:e.description,insertText:e.uri,insertTextFormat:qc.PlainText,insertTextMode:Xc.asIs};i.items.push(t)}),i}if(!n||n.errors.length)return i;let m=null;if(!u){if(!l.internalDocument.contents||I(l.internalDocument.contents)){let e=l.internalDocument.createNode({});e.range=[s,s+1,s+1],l.internalDocument.contents=e,l.updateFromInternalDocument(),u=e}else u=l.findClosestNode(s,o),d=!0}let h=u;if(u){if(p.length===0)u=l.internalDocument.contents;else{let n=l.getParent(u);if(n){if(I(u)){if(u.value){if(eu(n)){if(n.value===u){if(p.trim().length>0&&p.indexOf(`:`)<0){let e=this.createTempObjNode(f,u,l),t=l.getParent(n);if(tu(l.internalDocument.contents)){let t=GG(l.internalDocument.contents,n);typeof t==`number`&&(l.internalDocument.set(t,e),l.updateFromInternalDocument())}else t&&($l(t)||tu(t))?(t.set(n.key,e),l.updateFromInternalDocument()):(l.internalDocument.set(n.key,e),l.updateFromInternalDocument());m=e.items[0],u=e}else if(p.trim().length===0){let e=l.getParent(n);e&&(u=e)}}else if(n.key===u){let e=l.getParent(n);m=n,e&&(u=e)}}else if(tu(n)){if(p.trim().length>0){let e=this.createTempObjNode(f,u,l);n.delete(u),n.add(e),l.updateFromInternalDocument(),u=e}else u=n}}else if(u.value===null){if(eu(n)){if(n.key===u)u=n;else if(ru(n.key)&&n.key.range){let r=l.getParent(n);if(d&&r&&$l(r)&&WG(r))u=r;else{let i=e.positionAt(n.key.range[0]);if(t.character>i.character&&t.line!==i.line){let e=this.createTempObjNode(f,u,l);r&&($l(r)||tu(r))?(r.set(n.key,e),l.updateFromInternalDocument()):(l.internalDocument.set(n.key,e),l.updateFromInternalDocument()),m=e.items[0],u=e}else i.character===t.character&&r&&(u=r)}}}else if(tu(n)){if(p.charAt(t.character-1)!==`-`){let e=this.createTempObjNode(f,u,l);n.delete(u),n.add(e),l.updateFromInternalDocument(),u=e}else if(p.charAt(t.character-1)===`-`){let e=this.createTempObjNode(``,u,l);n.delete(u),n.add(e),l.updateFromInternalDocument(),u=e}else u=n}}}else if($l(u)&&!d&&p.trim().length===0&&tu(n)){let e=o.getLineContent(t.line+1);(o.getLineCount()===t.line+1||e.trim().length===0)&&(u=n)}}else if(I(u)){let e=this.createTempObjNode(f,u,l);l.internalDocument.contents=e,l.updateFromInternalDocument(),m=e.items[0],u=e}else if($l(u))for(let e of u.items)ru(e.value)&&e.value.range&&e.value.range[0]===s+1&&(u=e.value);else if(tu(u)&&p.charAt(t.character-1)!==`-`){let e=this.createTempObjNode(f,u,l);e.items=[],l.updateFromInternalDocument();for(let t of u.items)$l(t)&&t.items.forEach(t=>{e.items.push(t)});u=e}}}let y=o.getLineContent(g.start.line).trim().length===0&&h&&(I(h)&&h.value===null||tu(h));if(u&&$l(u)){let e=u.items;for(let t of e)(!m||m!==t)&&I(t.key)&&(_[t.key.value+``]=$c.create(Pq));this.addPropertyCompletions(n,l,u,h,``,v,o,g,r,y),!n&&f.length>0&&c.charAt(s-f.length-1)!==`"`&&v.add({kind:Kc.Property,label:f,insertText:this.getInsertTextForProperty(f,null,``),insertTextFormat:qc.Snippet})}this.getValueCompletions(n,l,u,s,e,v,{},r,y)}catch(e){this.telemetry?.sendError(`yaml.completion.error`,e)}this.finalizeParentCompletion(i);let y=i.items.filter((e,t,n)=>t===n.findIndex(t=>t.label===e.label&&t.insertText===e.insertText&&t.kind===e.kind));return y?.length>0&&(i.items=y),i}updateCompletionText(e,t){e.insertText=t,e.textEdit&&(e.textEdit.newText=t)}mergeSimpleInsertTexts(e,t,n,r){let i=e=>e.includes(`
411
+ `),a=e=>e.startsWith(`
412
+ `),o=e=>{let t=e.indexOf(`
413
+ `);return t>0&&e.substring(t,e.length).trim().length===0};if(i(t)||i(n))return r&&o(t)&&!o(n)&&!a(n)?n:void 0;let s=this.getValuesFromInsertText(t),c=this.getValuesFromInsertText(n),l=Array.prototype.concat(s,c);if(l.length)return l.length===1?`${e}: \${1:${l[0]}}`:`${e}: \${1|${l.join(`,`)}|}`}getValuesFromInsertText(e){let t=e.substring(e.indexOf(`:`)+1).trim();if(!t)return[];let n=t.match(/^\${1[|:]([^|]*)+\|?}$/);return n?n[1].split(`,`):[t]}finalizeParentCompletion(e){let t=e=>{let t=0;return e.map(e=>{let n=e.match(/\$([0-9]+)|\${[0-9]+:/g);if(!n)return e;let r=n.map(e=>+e.replace(/\${([0-9]+)[:|]/g,`$1`).replace(`$`,``)).reduce((e,t)=>t>e?t:e,0),i=e.replace(/\$([0-9]+)/g,(e,n)=>`$`+(+n+t)).replace(/\${([0-9]+)[:|]/g,(e,n)=>"${"+(+n+t)+`:`);return t+=r,i})};e.items.forEach(e=>{if(this.isParentCompletionItem(e)){let n=e.parent.indent||``,r=t(e.parent.insertTexts).join(`
414
+ ${n}`);r.endsWith(`$1`)&&(r=r.substring(0,r.length-2)),e.insertText=this.arrayPrefixIndentation+r,e.textEdit&&(e.textEdit.newText=e.insertText);let i=r.replace(/\${[0-9]+[:|](.*)}/g,(e,t)=>t).replace(/\$([0-9]+)/g,``),a=e.documentation?[e.documentation,``,`----`,``]:[];e.documentation={kind:Wc.Markdown,value:[...a,"```yaml",n+i,"```"].join(`
415
+ `)},delete e.parent}})}createTempObjNode(e,t,n){let r={};r[e]=null;let i=n.internalDocument.createNode(r);return i.range=t.range,i.items[0].key.range=t.range,i.items[0].value.range=t.range,i}addPropertyCompletions(e,t,n,r,i,a,o,s,c,l){let u=t.getMatchingSchemas(e.schema,-1,null,c),d=o.getText(s),f=o.getLineContent(s.start.line),p=f.trim().length===0,m=f.indexOf(`:`)!==-1,h=f.trimLeft().indexOf(`-`)===0,g=t.getParent(n),_=u.find(e=>e.node.internalNode===r&&e.schema.properties),v=u.filter(e=>e.schema.oneOf).map(e=>e.schema.oneOf)[0],y=!1;v?.length<u.length&&v?.forEach((e,t)=>{!u[t]?.schema.oneOf&&u[t]?.schema.properties===e.properties&&(y=!0)});for(let e of u){if((e.node.internalNode===n&&!_||e.node.internalNode===r&&!m||e.node.parent?.internalNode===r&&!m)&&!e.inverted){this.collectDefaultSnippets(e.schema,i,a,{newLineFirst:!1,indentFirstObject:!1,shouldIndentWithTab:h});let t=e.schema.properties;if(t){let c=e.schema.maxProperties;if(c===void 0||n.items===void 0||n.items.length<c||n.items.length===c&&!p){for(let c in t)if(Object.prototype.hasOwnProperty.call(t,c)){let u=t[c];if(typeof u==`object`&&!u.deprecationMessage&&!u.doNotSuggest){let t=``;if(g&&tu(g)&&n.items.length<=1&&!p){let e=o.getText(),r=e.lastIndexOf(`-`,n.range[0]-1);if(r>=0){let i=s.end.character-s.start.character;t=` `+e.slice(r+1,n.range[1]-i)}}t+=this.arrayPrefixIndentation;let f;u.type===`array`&&(f=n.items.find(e=>I(e.key)&&e.key.range&&e.key.value===c&&I(e.value)&&!e.value.value&&o.getPosition(e.key.range[2]).line===s.end.line-1))&&f&&(Array.isArray(u.items)?this.addSchemaValueCompletions(u.items[0],i,a,{},l,!0):typeof u.items==`object`&&u.items.type===`object`&&this.addArrayItemValueCompletion(u.items,i,a));let h=c,_=Array.isArray(e.schema.required)?e.schema.required.includes(c):!1;(!c.startsWith(d)||!m)&&(h=this.getInsertTextForProperty(c,u,i,t+this.indentation,_));let v=I(r)&&r.value===null||$l(r)&&r.items.length===0,b=e.schema.required?.length>0;(!this.parentSkeletonSelectedFirst||!v||!b)&&a.add({kind:Kc.Property,label:c,insertText:h,insertTextFormat:qc.Snippet,documentation:this.fromMarkup(u.markdownDescription)||u.description||``},y),e.schema.required?.includes(c)&&a.add({label:c,insertText:this.getInsertTextForProperty(c,u,i,t+this.indentation,!0),insertTextFormat:qc.Snippet,documentation:this.fromMarkup(u.markdownDescription)||u.description||``,parent:{schema:e.schema,indent:t}})}}}}if(g&&tu(g)&&OW(e.schema)&&this.addSchemaValueCompletions(e.schema,i,a,{},l),e.schema.type===`object`&&e.schema.propertyNames&&e.schema.additionalProperties!==!1){let t=hG(e.schema.propertyNames);if(!t.deprecationMessage&&!t.doNotSuggest){let e=this.fromMarkup((t.markdownDescription||t.description||``)+(t.pattern?`
416
+
417
+ **Pattern:** \`${t.pattern}\``:``)),{candidates:n,impossible:r}=this.getPropertyNamesCandidates(t);if(!r){if(n.length)for(let t of n)a.add({kind:Kc.Property,label:t,insertText:`${t}: `,insertTextFormat:qc.PlainText,documentation:e});else{let n=t.title||`property`;a.add({kind:Kc.Property,label:n,insertText:`\${1:${n}}: `,insertTextFormat:qc.Snippet,documentation:e})}}}}}g&&e.node.internalNode===g&&e.schema.defaultSnippets&&(n.items.length===1?this.collectDefaultSnippets(e.schema,i,a,{newLineFirst:!1,indentFirstObject:!1,shouldIndentWithTab:!0},1):this.collectDefaultSnippets(e.schema,i,a,{newLineFirst:!1,indentFirstObject:!0,shouldIndentWithTab:!1},1))}}getValueCompletions(e,t,n,r,i,a,o,s,c){let l=null;if(n&&I(n)&&(n=t.getParent(n)),!n){this.addSchemaValueCompletions(e.schema,``,a,o,!1);return}if(eu(n)){let e=n.value;if(e&&e.range&&r>e.range[0]+e.range[2])return;l=I(n.key)?n.key.value+``:null,n=t.getParent(n)}if(n&&(l!==null||tu(n))){let u=t.getMatchingSchemas(e.schema,-1,null,s);for(let e of u)if(e.node.internalNode===n&&!e.inverted&&e.schema){if(e.schema.items&&(this.collectDefaultSnippets(e.schema,``,a,{newLineFirst:!1,indentFirstObject:!1,shouldIndentWithTab:!1}),tu(n)&&n.items)){if(Array.isArray(e.schema.items)){let t=this.findItemAtOffset(n,i,r);t<e.schema.items.length&&this.addSchemaValueCompletions(e.schema.items[t],``,a,o,!1)}else this.addSchemaValueCompletions(e.schema.items,``,a,o,c,typeof e.schema.items==`object`&&(e.schema.items.type===`object`||kW(e.schema.items)))}if(e.schema.properties){let t=e.schema.properties[l];t&&this.addSchemaValueCompletions(t,``,a,o,c)}e.schema.additionalProperties&&this.addSchemaValueCompletions(e.schema.additionalProperties,``,a,o,c)}o.boolean&&(this.addBooleanValueCompletion(!0,``,a),this.addBooleanValueCompletion(!1,``,a)),o.null&&this.addNullValueCompletion(``,a)}}addArrayItemValueCompletion(e,t,n,r){let i=TW(e),a=`- ${this.getInsertTextForObject(e,t).insertText.trimLeft()}`,o=i?" type `"+i+"`":``,s=e.description?` (`+e.description+`)`:``,c=this.getDocumentationWithMarkdownText(F(`Create an item of an array{0}{1}`,o,s),a);n.add({kind:this.getSuggestionKind(e.type),label:F(`- (array item) `)+(i||r),documentation:c,insertText:a,insertTextFormat:qc.Snippet})}getInsertTextForProperty(e,t,n,r=this.indentation,i=!1){let a=this.getInsertTextForValue(e,``,`string`),o=a+`:`,s=t&&i&&xW(t.default),c,l=0;if(t){let e=Array.isArray(t.type)?t.type[0]:t.type;if(e||(t.properties?e=`object`:t.items?e=`array`:t.anyOf&&(e=`anyOf`)),Array.isArray(t.defaultSnippets)){if(t.defaultSnippets.length===1){let e=t.defaultSnippets[0].body;xW(e)&&(c=this.getInsertTextForSnippetValue(e,``,{newLineFirst:!0,indentFirstObject:!1,shouldIndentWithTab:!1},[],1),!c.startsWith(` `)&&!c.startsWith(`
418
+ `)&&(c=` `+c))}l+=t.defaultSnippets.length}if(t.enum&&(!c&&t.enum.length===1&&(c=` `+this.getInsertTextForGuessedValue(t.enum[0],``,e)),l+=t.enum.length),xW(t.const)&&(c||=(c=this.getInsertTextForGuessedValue(t.const,``,e),c=this.evaluateTab1Symbol(c),` `+c),l++),xW(t.default)){if(!c||s){let n=this.getInsertTextForGuessedValue(t.default,``,e);s&&(n=this.evaluateTab1Symbol(n)),c=` `+n}l++}if(Array.isArray(t.examples)&&t.examples.length&&(c||=` `+this.getInsertTextForGuessedValue(t.examples[0],``,e),l+=t.examples.length),t.properties)return`${o}
419
+ ${this.getInsertTextForObject(t,n,r).insertText}`;if(t.items)return`${o}
420
+ ${r}- ${this.getInsertTextForArray(t.items,n,1,r).insertText}`;if(l===0)switch(e){case`boolean`:case`string`:case`anyOf`:c=` $1`;break;case`object`:c=`
421
+ ${r}`;break;case`array`:c=`
422
+ ${r}- `;break;case`number`:case`integer`:c=" ${1:0}";break;case`null`:c=" ${1:null}";break;default:return a}}return(!c||l>1&&!s)&&(c=` $1`),o+c+n}getInsertTextForObject(e,t,n=this.indentation,r=1){let i=``;return e.properties?(Object.keys(e.properties).forEach(a=>{let o=e.properties[a],s=Array.isArray(o.type)?o.type[0]:o.type;if(s||(o.anyOf&&(s=`anyOf`),o.properties&&(s=`object`),o.items&&(s=`array`)),e.required&&e.required.indexOf(a)>-1)switch(s){case`boolean`:case`string`:case`number`:case`integer`:case`anyOf`:{let e=o.default===void 0?o.const:o.default;e===void 0?i+=`${n}${a}: $${r++}
423
+ `:(s===`string`&&(e=QK(e)),i+=`${n}${a}: \${${r++}:${e}}
424
+ `);break}case`array`:{let e=this.getInsertTextForArray(o.items,t,r++,n),s=e.insertText.split(`
425
+ `),c=e.insertText;if(s.length>1){for(let e=1;e<s.length;e++){let t=s[e];s[e]=` ${t}`}c=s.join(`
426
+ `)}r=e.insertIndex,i+=`${n}${a}:
427
+ ${n}${this.indentation}- ${c}
428
+ `}break;case`object`:{let e=this.getInsertTextForObject(o,t,`${n}${this.indentation}`,r++);r=e.insertIndex,i+=`${n}${a}:
429
+ ${e.insertText}
430
+ `}}else if(!this.disableDefaultProperties&&o.default!==void 0)switch(s){case`boolean`:case`number`:case`integer`:i+=`${n}${a===`null`?this.getInsertTextForValue(a,``,`string`):a}: \${${r++}:${o.default}}
431
+ `;break;case`string`:i+=`${n}${a}: \${${r++}:${QK(o.default)}}
432
+ `}}),i.trim().length===0&&(i=`${n}$${r++}
433
+ `),i=i.trimRight()+t,{insertText:i,insertIndex:r}):(i=`${n}$${r++}
434
+ `,{insertText:i,insertIndex:r})}getInsertTextForArray(e,t,n=1,r=this.indentation){let i=``;if(!e)return i=`$${n++}`,{insertText:i,insertIndex:n};let a=Array.isArray(e.type)?e.type[0]:e.type;switch(a||(e.properties&&(a=`object`),e.items&&(a=`array`)),e.type){case`boolean`:i=`\${${n++}:false}`;break;case`number`:case`integer`:i=`\${${n++}:0}`;break;case`string`:i=`\${${n++}}`;break;case`object`:{let a=this.getInsertTextForObject(e,t,`${r} `,n++);i=a.insertText.trimLeft(),n=a.insertIndex}}return{insertText:i,insertIndex:n}}getInsertTextForGuessedValue(e,t,n){switch(typeof e){case`object`:return e===null?"${1:null}"+t:this.getInsertTextForValue(e,t,n);case`string`:return n===`number`||n===`integer`?"${1:"+e+`}`+t:"${1:"+this.getInsertTextForPlainText(QK(e))+`}`+t;case`number`:case`boolean`:return"${1:"+e+`}`+t}return this.getInsertTextForValue(e,t,n)}getInsertTextForPlainText(e){return e.replace(/\\(?=[$}\\])/g,`\\\\`).replace(/[$}]/g,`\\$&`)}getInsertTextForValue(e,t,n){if(e===null)return`null`;switch(typeof e){case`object`:{let n=this.indentation;return this.getInsertTemplateForValue(e,n,{index:1},t)}case`number`:case`boolean`:return this.getInsertTextForPlainText(e+t)}return n=Array.isArray(n)?n[0]:n,n===`string`&&(e=QK(String(e),this.isSingleQuote)),this.getInsertTextForPlainText(e+t)}getInsertTemplateForValue(e,t,n,r){if(Array.isArray(e)){let r=`
435
+ `;for(let i of e)r+=`${t}- \${${n.index++}:${i}}
436
+ `;return r}if(typeof e==`object`){let i=`
437
+ `;for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a)){let o=e[a];i+=`${t}\${${n.index++}:${a}}:`;let s;s=typeof o==`object`?`${this.getInsertTemplateForValue(o,t+this.indentation,n,r)}`:` \${${n.index++}:${this.getInsertTextForPlainText(o+r)}}
438
+ `,i+=`${s}`}return i}return this.getInsertTextForPlainText(e+r)}addSchemaValueCompletions(e,t,n,r,i=!1,a=!1){typeof e==`object`&&(this.addEnumValueCompletions(e,t,n,i),this.addDefaultValueCompletions(e,t,n),this.collectTypes(e,r),a&&!kW(e)&&this.addArrayItemValueCompletion(e,t,n),Array.isArray(e.allOf)&&e.allOf.forEach(e=>this.addSchemaValueCompletions(e,t,n,r,i,a)),Array.isArray(e.anyOf)&&e.anyOf.forEach(e=>this.addSchemaValueCompletions(e,t,n,r,i,a)),Array.isArray(e.oneOf)&&e.oneOf.forEach(e=>this.addSchemaValueCompletions(e,t,n,r,i,a)))}collectTypes(e,t){if(Array.isArray(e.enum)||xW(e.const))return;let n=e.type;Array.isArray(n)?n.forEach(function(e){return t[e]=!0}):n&&(t[n]=!0)}addDefaultValueCompletions(e,t,n,r=0){let i=!1;if(xW(e.default)){let a=e.type,o=e.default;for(let e=r;e>0;e--)o=[o],a=`array`;let s;s=typeof o==`object`?F(`Default value`):this.getLabelForValue(o),n.add({kind:this.getSuggestionKind(a),label:s,insertText:this.getInsertTextForValue(o,t,a),insertTextFormat:qc.Snippet,detail:F(`Default value`)}),i=!0}Array.isArray(e.examples)&&e.examples.forEach(a=>{let o=e.type,s=a;for(let e=r;e>0;e--)s=[s],o=`array`;n.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(s),insertText:this.getInsertTextForValue(s,t,o),insertTextFormat:qc.Snippet}),i=!0}),this.collectDefaultSnippets(e,t,n,{newLineFirst:!0,indentFirstObject:!0,shouldIndentWithTab:!0}),!i&&typeof e.items==`object`&&!Array.isArray(e.items)&&this.addDefaultValueCompletions(e.items,t,n,r+1)}addEnumValueCompletions(e,t,n,r){if(xW(e.const)&&(!r||typeof e.const==`object`)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t,e.type),insertTextFormat:qc.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let i=0,a=e.enum.length;i<a;i++){let a=e.enum[i];if(r&&typeof a!=`object`)continue;let o=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&i<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?o=this.fromMarkup(e.markdownEnumDescriptions[i]):e.enumDescriptions&&i<e.enumDescriptions.length&&(o=e.enumDescriptions[i]),n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,t,e.type),insertTextFormat:qc.Snippet,documentation:o})}}getLabelForValue(e){return e===null?`null`:Array.isArray(e)?JSON.stringify(e):typeof e==`string`?QK(e,this.isSingleQuote):String(e)}collectDefaultSnippets(e,t,n,r,i=0){if(Array.isArray(e.defaultSnippets))for(let a of e.defaultSnippets){let o=e.type,s=a.body,c=a.label,l,u;if(xW(s)){let o=a.type||e.type;if(i===0&&o===`array`){let e={};Object.keys(s).forEach((t,n)=>{n===0&&!t.startsWith(`-`)?e[`- ${t}`]=s[t]:e[` ${t}`]=s[t]}),s=e}let u=Object.keys(n.proposed).filter(e=>n.proposed[e].label===Pq);if(l=this.getInsertTextForSnippetValue(s,t,r,u),l===``&&s)continue;c||=this.getLabelForSnippetValue(s)}else if(typeof a.bodyText==`string`){let e=``,n=``,r=``;for(let t=i;t>0;t--)e=e+r+`[
439
+ `,n=n+`
440
+ `+r+`]`,r+=this.indentation,o=`array`;l=e+r+a.bodyText.split(`
441
+ `).join(`
442
+ `+r)+n+t,c||=l,u=l.replace(/[\n]/g,``)}n.add({kind:a.suggestionKind||this.getSuggestionKind(o),label:c,sortText:a.sortText||a.label,documentation:this.fromMarkup(a.markdownDescription)||a.description,insertText:l,insertTextFormat:qc.Snippet,filterText:u})}}getInsertTextForSnippetValue(e,t,n,r,i){return jq(e,``,e=>{if(typeof e==`string`){if(e[0]===`^`)return e.substr(1);if(e===`true`||e===`false`)return`"${e}"`}return e},{...n,indentation:this.indentation,existingProps:r},i)+t}addBooleanValueCompletion(e,t,n){n.add({kind:this.getSuggestionKind(`boolean`),label:e?`true`:`false`,insertText:this.getInsertTextForValue(e,t,`boolean`),insertTextFormat:qc.Snippet,documentation:``})}addNullValueCompletion(e,t){t.add({kind:this.getSuggestionKind(`null`),label:`null`,insertText:`null`+e,insertTextFormat:qc.Snippet,documentation:``})}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,`$1`)}getCustomTagValueCompletions(e){jW(this.customTags).forEach(t=>{let n=t.split(` `)[0];this.addCustomTagValueCompletion(e,` `,n)})}addCustomTagValueCompletion(e,t,n){e.add({kind:this.getSuggestionKind(`string`),label:n,insertText:n+t,insertTextFormat:qc.Snippet,documentation:``})}getDocumentationWithMarkdownText(e,t){let n=e;return this.doesSupportMarkdown()&&(t=t.replace(/\${[0-9]+[:|](.*)}/g,(e,t)=>t).replace(/\$([0-9]+)/g,``),n=this.fromMarkup(`${e}
443
+ \`\`\`
444
+ ${t}
445
+ \`\`\``)),n}getSuggestionKind(e){if(Array.isArray(e)){let t=e;e=t.length>0?t[0]:null}if(!e)return Kc.Value;switch(e){case`string`:return Kc.Value;case`object`:return Kc.Module;case`property`:return Kc.Property;default:return Kc.Value}}getCurrentWord(e,t){let n=t-1,r=e.getText();for(;n>=0&&`
446
+ \r\v":{[,]}`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,t)}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:Wc.Markdown,value:e}}doesSupportMarkdown(){if(this.supportsMarkdown===void 0){let e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=e&&e.completionItem&&Array.isArray(e.completionItem.documentationFormat)&&e.completionItem.documentationFormat.indexOf(Wc.Markdown)!==-1}return this.supportsMarkdown}findItemAtOffset(e,t,n){for(let t=e.items.length-1;t>=0;t--){let r=e.items[t];if(ru(r)&&r.range&&(n>r.range[1]||n>=r.range[0]))return t}return 0}getPropertyNamesCandidates(e){let t=!1,n=e=>{if(!e||typeof e!=`object`)return null;if(Array.isArray(e.allOf)&&e.allOf.length){let r=null;for(let i of e.allOf){let e=n(i);if(e&&(r=r?new Set([...r].filter(t=>e.has(t))):new Set(e),r.size===0))return t=!0,new Set}if(r)return r}let r=new Set;return typeof e.const==`string`&&r.add(e.const),e.enum?.forEach(e=>typeof e==`string`&&r.add(e)),e.anyOf?.forEach(e=>n(e)?.forEach(e=>r.add(e))),e.oneOf?.forEach(e=>n(e)?.forEach(e=>r.add(e))),r.size?r:null},r=n(e);return{candidates:r?[...r]:[],impossible:t}}getQuote(){return this.isSingleQuote?`'`:`"`}evaluateTab1Symbol(e){return e.replace(/\$\{1:(.*)\}/,`$1`)}isParentCompletionItem(e){return`parent`in e}};function Iq(){}var Lq=class{constructor(e){this.telemetry=e}getDefinition(e,t){try{let n=ZG.getYamlDocument(e),r=e.offsetAt(t.position),i=AW(r,n);if(i){let[t]=i.getNodeFromPosition(r,new nK(e));if(t&&Zl(t)){let n=t.resolve(i.internalDocument);if(n&&n.range){let t=M.create(e.positionAt(n.range[0]),e.positionAt(n.range[2])),r=M.create(e.positionAt(n.range[0]),e.positionAt(n.range[1]));return[vc.create(e.uri,t,r)]}}}}catch(e){this.telemetry?.sendError(`yaml.definition.error`,e)}}};function Rq(e,t){let n=ZG.getYamlDocument(e);return t.map(e=>{let t=r(e),n;for(let e of t)n=bl.create(e,n);return n??bl.create({start:e,end:e})});function r(t){let r=e.offsetAt(t),o=[];for(let s of n.documents){let n,c;for(s.visit(e=>{let o=e.offset+e.length;if(o<r||a(o-1,o)===`
447
+ `&&o-1<r)return!0;let s=e.offset;if(s>r){let n=i(e,t);if(!n||n>r)return!0;s=n}return(!n||s>=n.offset)&&(n=e,c=s),!0});n;){let t=c??n.offset,i=n.offset+n.length,a={start:e.positionAt(t),end:e.positionAt(i)},s=zq(e.getText(a)),l=t+s.length;l>=r&&(a.end=e.positionAt(l));let u=(e,t)=>s.startsWith(e)&&s.endsWith(t||e);(n.type===`string`&&(u(`'`)||u(`"`))||n.type===`object`&&u(`{`,`}`)||n.type===`array`&&u(`[`,`]`))&&o.push({start:e.positionAt(t+1),end:e.positionAt(i-1)}),o.push(a),n=n.parent,c=void 0}if(o.length>0)break}return o.reverse()}function i(t,n){let r=e.positionAt(t.offset);if(r.line===n.line){if(t.parent?.type===`array`&&a(t.offset-2,t.offset)===`- `)return t.offset-2;if(t.type===`array`||t.type===`object`){let t={line:r.line,character:0};if(e.getText({start:t,end:r}).trim().length===0)return e.offsetAt(t)}}}function a(t,n){return e.getText({start:e.positionAt(t),end:e.positionAt(n)})}}function zq(e){return e.endsWith(`\r
448
+ `)?e.substring(0,e.length-2):e.endsWith(`
449
+ `)?e.substring(0,e.length-1):e}var Bq={},Vq=class extends Error{name=`ResponseError`;constructor(e,t){super(t)}},Hq=class{constructor(e){this.telemetry=e}prepareRename(e,t){try{let n=this.findTarget(e,t.position);return!n||!this.findAnchorToken(n.yamlDoc,n.anchorNode)?null:this.getNameRange(e,n.token)}catch(e){return this.telemetry?.sendError(`yaml.prepareRename.error`,e),null}}doRename(e,t){try{let n=this.findTarget(e,t.position);if(!n)return null;let r=this.findAnchorToken(n.yamlDoc,n.anchorNode);if(!r)return null;let i=t.newName,a=this.findInvalidAnchorChar(i);if(a!==null)throw new Vq(Bq.InvalidParams,`Anchor name cannot contain '${a}'`);let o=[];return o.push(kc.replace(this.getNameRange(e,r),i)),cu(n.yamlDoc.internalDocument,(t,r)=>{Zl(r)&&r.srcToken&&r.resolve(n.yamlDoc.internalDocument)===n.anchorNode&&o.push(kc.replace(this.getNameRange(e,r.srcToken),i))}),{changes:{[e.uri]:o}}}catch(e){if(e instanceof Vq)throw e;return this.telemetry?.sendError(`yaml.rename.error`,e),null}}findTarget(e,t){let n=ZG.getYamlDocument(e),r=e.offsetAt(t),i=AW(r,n);if(!i)return null;let[a]=i.getNodeFromPosition(r,new nK(e));if(!a)return this.findByToken(i,r);if(Zl(a)&&a.srcToken&&this.isOffsetInsideToken(a.srcToken,r)){let e=a.resolve(i.internalDocument);return e?{anchorNode:e,token:a.srcToken,yamlDoc:i}:null}if((nu(a)||I(a))&&a.anchor){let e=this.findAnchorToken(i,a);if(e&&this.isOffsetInsideToken(e,r))return{anchorNode:a,token:e,yamlDoc:i}}return this.findByToken(i,r)}findByToken(e,t){let n;return cu(e.internalDocument,(r,i)=>{if(Zl(i)&&i.srcToken&&this.isOffsetInsideToken(i.srcToken,t)){let t=i.resolve(e.internalDocument);if(t)return n={anchorNode:t,token:i.srcToken,yamlDoc:e},cu.BREAK}if((nu(i)||I(i))&&i.anchor){let r=this.findAnchorToken(e,i);if(r&&this.isOffsetInsideToken(r,t))return n={anchorNode:i,token:r,yamlDoc:e},cu.BREAK}}),n??null}findAnchorToken(e,t){let n=e.getParent(t),r=[];n&&n.srcToken&&r.push(n.srcToken),t.srcToken&&r.push(t.srcToken);for(let e of r){let n=this.getAnchorFromToken(e,t);if(n)return n}}getAnchorFromToken(e,t){if(qG(e))return this.getAnchorFromCollectionItem(e);if(pp(e)){let n=e;for(let e of n.items??[]){if(e.value!==t.srcToken)continue;let n=this.getAnchorFromCollectionItem(e);if(n)return n}}}getAnchorFromCollectionItem(e){for(let t of e.start)if(t.type===`anchor`)return t;if(e.sep&&Array.isArray(e.sep)){for(let t of e.sep)if(t.type===`anchor`)return t}}getNameRange(e,t){let n=t.offset+1,r=t.offset+t.source.length;return M.create(e.positionAt(n),e.positionAt(r))}isOffsetInsideToken(e,t){return t>=e.offset&&t<=e.offset+e.source.length}findInvalidAnchorChar(e){for(let t of[`[`,`]`,`{`,`}`,`,`,` `,` `])if(e.includes(t))return t===` `?`space`:t===` `?`tab`:t;return null}},Uq;(function(e){e[e.SchemaStore=1]=`SchemaStore`,e[e.SchemaAssociation=2]=`SchemaAssociation`,e[e.Settings=3]=`Settings`})(Uq||={});function Wq(e){let t=new VK(e.schemaRequestService,e.workspaceContext,null,e.yamlSettings),n=new Fq(t,e.clientCapabilities,ZG,e.telemetry),r=new $K(t,e.telemetry),i=new XK(t,e.telemetry),a=new hq(t,e.telemetry),o=new gq,s=new Cq(e.clientCapabilities),c=new Dq(t,e.telemetry),l=new _q(e.telemetry),u=new Lq(e.telemetry),d=new Hq(e.telemetry);return new Iq(t,e.yamlSettings,e.connection),{configure:i=>{t.clearExternalSchemas(),i.schemas&&(t.schemaPriorityMapping=new Map,i.schemas.forEach(e=>{let n=e.priority?e.priority:0;t.addSchemaPriority(e.uri,n),t.registerExternalSchema(e.uri,e.fileMatch,e.schema,e.name,e.description,e.versions)})),a.configure(i),r.configure(i),n.configure(i,e.yamlSettings),o.configure(i),s.configure(i,e?.yamlSettings?.yamlFormatterSettings?.printWidth||80)},registerCustomSchemaProvider:e=>{t.registerCustomSchemaProvider(e)},findLinks:l.findLinks.bind(l),doComplete:n.doComplete.bind(n),doValidation:a.doValidation.bind(a),doHover:r.doHover.bind(r),findDocumentSymbols:i.findDocumentSymbols.bind(i),findDocumentSymbols2:i.findHierarchicalDocumentSymbols.bind(i),doDefinition:u.getDefinition.bind(u),resetSchema:e=>t.onResourceChange(e),doFormat:o.format.bind(o),doDocumentOnTypeFormatting:Eq,addSchema:(e,n)=>t.saveSchema(e,n),deleteSchema:e=>t.deleteSchema(e),modifySchemaContent:e=>t.addContent(e),deleteSchemaContent:e=>t.deleteContent(e),deleteSchemasWhole:e=>t.deleteSchemas(e),getFoldingRanges:vq,getSelectionRanges:Rq,getCodeAction:(e,t)=>s.getCodeAction(e,t),getCodeLens:e=>c.getCodeLens(e),resolveCodeLens:e=>c.resolveCodeLens(e),prepareRename:(e,t)=>d.prepareRename(e,t),doRename:(e,t)=>d.doRename(e,t)}}async function Gq(e){let t=await fetch(e);if(t.ok)return t.text();throw Error(`Schema request failed for ${e}`)}var Kq={send(){},sendError(e,t){console.error(`monaco-yaml`,e,t)},sendTrack(){}};vs((e,{enableSchemaRequest:t,format:n,...r})=>{let i=Wq({schemaRequestService:t?Gq:null,telemetry:Kq,workspaceContext:{resolveRelativePath(e,t){return String(new URL(e,t))}},clientCapabilities:{textDocument:{completion:{completionItem:{commitCharactersSupport:!0,documentationFormat:[`markdown`,`plaintext`],labelDetailsSupport:!0}}}}}),a=t=>(n,...r)=>{let i=e.getMirrorModels();for(let e of i)if(String(e.uri)===n)return t(bs.create(n,`yaml`,e.version,e.getValue()),...r)};return i.configure({...r,format:!!n?.enable}),{doValidation:a(e=>i.doValidation(e,!!r.isKubernetes)),doComplete:a((e,t)=>i.doComplete(e,t,!!r.isKubernetes)),doDefinition:a((e,t)=>i.doDefinition(e,{position:t,textDocument:e})),doDocumentOnTypeFormatting:a((e,t,n,r)=>i.doDocumentOnTypeFormatting(e,{ch:n,options:r,position:t,textDocument:e})),doHover:a(i.doHover),doRename:a((e,t,n)=>i.doRename(e,{newName:n,position:t,textDocument:e})),format:a(e=>i.doFormat(e,n)),resetSchema:i.resetSchema,findDocumentSymbols:a(i.findDocumentSymbols2),findLinks:a(i.findLinks),getCodeAction:a((e,t,n)=>i.getCodeAction(e,{range:t,textDocument:e,context:n})),getCodeLens:a(i.getCodeLens),getFoldingRanges:a(e=>i.getFoldingRanges(e,{lineFoldingOnly:!0})),getSelectionRanges:a(i.getSelectionRanges),prepareRename:a((e,t)=>i.prepareRename(e,{position:t,textDocument:e}))}})})();