@harperfast/harper 5.2.6 → 5.2.8

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 (304) hide show
  1. package/components/mcp/tools/application.ts +8 -4
  2. package/dist/components/mcp/tools/application.js +7 -4
  3. package/dist/components/mcp/tools/application.js.map +1 -1
  4. package/dist/resources/PrimaryRocksDatabase.js +2 -3
  5. package/dist/resources/PrimaryRocksDatabase.js.map +1 -1
  6. package/dist/resources/RecordEncoder.d.ts +16 -0
  7. package/dist/resources/RecordEncoder.js +93 -3
  8. package/dist/resources/RecordEncoder.js.map +1 -1
  9. package/dist/resources/RocksTransactionLogStore.js +11 -1
  10. package/dist/resources/RocksTransactionLogStore.js.map +1 -1
  11. package/dist/resources/Table.js +55 -1
  12. package/dist/resources/Table.js.map +1 -1
  13. package/dist/resources/auditStore.d.ts +1 -0
  14. package/dist/resources/auditStore.js +1 -0
  15. package/dist/resources/auditStore.js.map +1 -1
  16. package/dist/resources/graphql.js +1 -1
  17. package/dist/resources/graphql.js.map +1 -1
  18. package/dist/resources/tracked.js +5 -0
  19. package/dist/resources/tracked.js.map +1 -1
  20. package/dist/resources/transactionBroadcast.js +5 -5
  21. package/dist/resources/transactionBroadcast.js.map +1 -1
  22. package/npm-shrinkwrap.json +47 -47
  23. package/package.json +4 -4
  24. package/resources/DESIGN.md +5 -0
  25. package/resources/PrimaryRocksDatabase.ts +3 -3
  26. package/resources/RecordEncoder.ts +85 -3
  27. package/resources/RocksTransactionLogStore.ts +11 -1
  28. package/resources/Table.ts +62 -2
  29. package/resources/auditStore.ts +3 -1
  30. package/resources/graphql.ts +1 -1
  31. package/resources/tracked.ts +4 -0
  32. package/resources/transactionBroadcast.ts +5 -5
  33. package/studio/web/assets/{Chat-BNHY84-Z.js → Chat-DDlysEi_.js} +71 -95
  34. package/studio/web/assets/FloatingChat-DdJ3DZJX.js +23 -0
  35. package/studio/web/assets/abnfDiagram-VCTEODGH-C0_BAZyO.js +1 -0
  36. package/studio/web/assets/{alertDialog-BaBrZQ4M.js → alertDialog-DIHt7Z0r.js} +1 -1
  37. package/studio/web/assets/apiToken-CrPb_98N.js +1 -0
  38. package/studio/web/assets/applications-C6Y4nL_X.js +296 -0
  39. package/studio/web/assets/arc-CVRByUzA.js +1 -0
  40. package/studio/web/assets/architecture-7GRP2DOG-DNdx5tEU.js +1 -0
  41. package/studio/web/assets/architectureDiagram-5GKGNRK7-BWzrASgm.js +36 -0
  42. package/studio/web/assets/authStore-qKmCZcaf.js +3 -0
  43. package/studio/web/assets/blockDiagram-NRAW4CY4-BdJX9Khj.js +129 -0
  44. package/studio/web/assets/{button-DfBmT4rc.js → button-DhiX-njv.js} +1 -1
  45. package/studio/web/assets/c4Diagram-UCG6FXSJ-CI6MzGmQ.js +38 -0
  46. package/studio/web/assets/channel-DtCV8PTL.js +1 -0
  47. package/studio/web/assets/chevron-up-Df2c8uoU.js +1 -0
  48. package/studio/web/assets/chunk-75Z2AOVW-BT8tVmks.js +2 -0
  49. package/studio/web/assets/chunk-DU6HZSFF-9kAOOmI6.js +127 -0
  50. package/studio/web/assets/{chunk-2GRJ4B5K-DtwG__pv.js → chunk-F27PBJKO-BW7ao8AY.js} +1 -1
  51. package/studio/web/assets/{chunk-KEIR6QF5-BICK3FdT.js → chunk-FOHPRMQF-DHwB1DNv.js} +2 -2
  52. package/studio/web/assets/{chunk-5RXB4S5H-D3c7okHC.js → chunk-G27WJ6UU-COyLMcgK.js} +2 -2
  53. package/studio/web/assets/chunk-GMAD6QVW-BNyXpoQO.js +72 -0
  54. package/studio/web/assets/chunk-JQ64N6SF-Cyz1IeLf.js +1 -0
  55. package/studio/web/assets/{chunk-GF5L2VYU-DreJ7Snz.js → chunk-LCL6LL3I-HOzK_ppE.js} +3 -3
  56. package/studio/web/assets/chunk-OBVCFTLP-D4wWOqDQ.js +1 -0
  57. package/studio/web/assets/chunk-P2QGCYS3-DmIFY4d7.js +1 -0
  58. package/studio/web/assets/{chunk-KBJHAD2P-CLDPbAA-.js → chunk-POPQ4Y6H-BPrvMyKz.js} +1 -1
  59. package/studio/web/assets/{chunk-4I5QYGJK-D1FhvtQq.js → chunk-PWAF6VOD-2zB6IW9i.js} +1 -1
  60. package/studio/web/assets/chunk-R7TYR2AO-Irip67yr.js +10 -0
  61. package/studio/web/assets/chunk-RHFEMEQ7-2FgyI8YU.js +168 -0
  62. package/studio/web/assets/{chunk-6Q2QTUOP-QviMM6bR.js → chunk-SVP7TREG-FwtbH2QC.js} +1 -1
  63. package/studio/web/assets/chunk-TEH6E4GO-P87k5mNi.js +62 -0
  64. package/studio/web/assets/{chunk-XXDRQBXY-CaP_jixK.js → chunk-XXDRQBXY-BoGZu3HH.js} +1 -1
  65. package/studio/web/assets/classDiagram-DTDB5LWJ-DbO_dCNE.js +1 -0
  66. package/studio/web/assets/classDiagram-v2-JRS7N3AN-DbO_dCNE.js +1 -0
  67. package/studio/web/assets/{cose-bilkent-JH36ORCC-BVTNhTKD.js → cose-bilkent-JH36ORCC-Cuuf67Bh.js} +1 -1
  68. package/studio/web/assets/{createLucideIcon-BMkDbMrz.js → createLucideIcon-BKGPfjm2.js} +1 -1
  69. package/studio/web/assets/cssMode-D8ceA4av.js +1 -0
  70. package/studio/web/assets/cynefin-OW5HDTMX-BRkpLFQV.js +1 -0
  71. package/studio/web/assets/cynefinDiagram-5FMLGOSQ-CHT1DaX6.js +62 -0
  72. package/studio/web/assets/cytoscape.esm-C2x7inlt.js +321 -0
  73. package/studio/web/assets/dagre-3AP2YEHR-DpUXBh63.js +4 -0
  74. package/studio/web/assets/dagre-PrKaheQc.js +1 -0
  75. package/studio/web/assets/diagram-S7CK7UJ4-BuymVFZT.js +30 -0
  76. package/studio/web/assets/diagram-UQ7AKVKN-CyP148RM.js +41 -0
  77. package/studio/web/assets/diagram-VSXAHHWV-CoCAg3M9.js +3 -0
  78. package/studio/web/assets/diagram-VX7I27RA-BpOqCFca.js +24 -0
  79. package/studio/web/assets/diagram-Z3DM3KII-Bfpw7Vbj.js +24 -0
  80. package/studio/web/assets/dialog-CBf0Mr1d.js +1 -0
  81. package/studio/web/assets/{dist-CeoU7cfW.js → dist-kYfyPZP9.js} +1 -1
  82. package/studio/web/assets/{dist-cY0BPcz0.js → dist-lkA3O3eM.js} +1 -1
  83. package/studio/web/assets/download-BtTOBem-.js +1 -0
  84. package/studio/web/assets/ebnfDiagram-PWID7BFC-DS_6aWqL.js +1 -0
  85. package/studio/web/assets/editor-C-jlLd1G.js +1 -0
  86. package/studio/web/assets/erDiagram-SSCWMZ5O-DJNk6Fgw.js +99 -0
  87. package/studio/web/assets/eventmodeling-NTZA5JFV-5jbe4A5P.js +1 -0
  88. package/studio/web/assets/flowDiagram-A5DVABFB-Dp9Ezlow.js +1 -0
  89. package/studio/web/assets/{ganttDiagram-PKOTCBZU-Cit41Zp3.js → ganttDiagram-EL5Y4UJY-2pOExxMY.js} +2 -2
  90. package/studio/web/assets/{getAnalytics-rTxZLIM5.js → getAnalytics-D4LKGeVy.js} +1 -1
  91. package/studio/web/assets/gitGraph-4MIJSDKK-CH5ZxwzF.js +1 -0
  92. package/studio/web/assets/gitGraphDiagram-WWUBYQGX-DVIsIhbO.js +106 -0
  93. package/studio/web/assets/html-BnuKFPjv.js +1 -0
  94. package/studio/web/assets/htmlMode-DXM6YYUw.js +1 -0
  95. package/studio/web/assets/index-BtTvoLf8.js +824 -0
  96. package/studio/web/assets/index-Cxj2_wsl.css +1 -0
  97. package/studio/web/assets/index.lazy-PVbC6xQh.js +2 -0
  98. package/studio/web/assets/info-A6RAGUB7-CPQfTnaG.js +1 -0
  99. package/studio/web/assets/infoDiagram-RXCK75RN-DlwLYlwm.js +2 -0
  100. package/studio/web/assets/{ishikawaDiagram-WSZJBQD7-BJYRB-hU.js → ishikawaDiagram-5VMMS53U-BRXRp29U.js} +2 -2
  101. package/studio/web/assets/{javascript-CGzSV8Sd.js → javascript-CAuAkYxc.js} +1 -1
  102. package/studio/web/assets/{journeyDiagram-NVQOT4AX-B8K4wuMz.js → journeyDiagram-EYS64GPL-B0ou8k0n.js} +1 -1
  103. package/studio/web/assets/jsonMode-Dny8hrU7.js +1 -0
  104. package/studio/web/assets/{kanban-definition-27J2QSJJ-DKFV1ovM.js → kanban-definition-3QL26DDD-uYg7iYzp.js} +11 -11
  105. package/studio/web/assets/languageServices-D1uNqC6s.js +1 -0
  106. package/studio/web/assets/linear-Cnt8506Q.js +1 -0
  107. package/studio/web/assets/lspLanguageFeatures-Bh-bvkyK.js +4 -0
  108. package/studio/web/assets/mermaid-parser.core-Ck-fC8b7.js +7 -0
  109. package/studio/web/assets/mermaid.core-CP8aNNYm.js +44 -0
  110. package/studio/web/assets/{mindmap-definition-FAOFIHXS-CKL4PdAv.js → mindmap-definition-FBJOCRG2-CgTZ-rit.js} +25 -25
  111. package/studio/web/assets/notifications-DPTOF-SX.js +1 -0
  112. package/studio/web/assets/notifications-DsE0S3zT.js +1 -0
  113. package/studio/web/assets/packet-AYTQ26CC-DEyoPtPb.js +1 -0
  114. package/studio/web/assets/pegDiagram-XKGWAZYB-DrD-7sD9.js +1 -0
  115. package/studio/web/assets/pie-WAS4IAKB-wjj-EI1d.js +1 -0
  116. package/studio/web/assets/pieDiagram-E7YTZNPT-GntqDCzv.js +39 -0
  117. package/studio/web/assets/profile-BIeCZr-w.js +1 -0
  118. package/studio/web/assets/{quadrantDiagram-CIZ2JOQS-CSbsuWtH.js → quadrantDiagram-AXDQQJYC-0UeqXQGd.js} +1 -1
  119. package/studio/web/assets/radar-RG4KPBEZ-DFSA5h7k.js +1 -0
  120. package/studio/web/assets/railroad-74A4TZTK-CaOUG9wR.js +1 -0
  121. package/studio/web/assets/railroad-abnf-HS5TGJTU-Bc0Qi0WH.js +1 -0
  122. package/studio/web/assets/railroad-ebnf-LZEXJU2U-G8rVVZ2C.js +1 -0
  123. package/studio/web/assets/railroad-peg-WCYAUIDC-CrehKBhC.js +1 -0
  124. package/studio/web/assets/railroadDiagram-O6MQD6OU-yHUELZaV.js +1 -0
  125. package/studio/web/assets/regions-B5lGduv5.js +1 -0
  126. package/studio/web/assets/{editor.api-eUd8PqEu.js → register-Cvc1TpmQ.js} +139 -138
  127. package/studio/web/assets/{requirementDiagram-LRYGKXZP-ZIF0Wlho.js → requirementDiagram-EFPCY7ZU-DNEGFjuW.js} +2 -2
  128. package/studio/web/assets/rolldown-runtime-hePW80VL.js +1 -0
  129. package/studio/web/assets/safeParse-DeaoCCWH.js +1 -0
  130. package/studio/web/assets/{sankeyDiagram-W5VNT64P-BcRESt9x.js → sankeyDiagram-P5KCCOFB-DpyAmSVR.js} +1 -1
  131. package/studio/web/assets/{sequenceDiagram-SI44F4Z6-OpgTeJNU.js → sequenceDiagram-WJ2MYXX4-TyaT7xNk.js} +1 -1
  132. package/studio/web/assets/setComponentFile-D8ZLDWhU.js +1 -0
  133. package/studio/web/assets/setLocalStorage-D_kflv4U.js +1 -0
  134. package/studio/web/assets/setSessionStorage-B0bf71m4.js +1 -0
  135. package/studio/web/assets/setup-D2az-Ue_.js +2 -0
  136. package/studio/web/assets/src-CMc7m_Ut.js +1 -0
  137. package/studio/web/assets/stateDiagram-HBIQ2CUA-CeEdTArZ.js +1 -0
  138. package/studio/web/assets/stateDiagram-v2-4QOOHH4V-D4tuw9Su.js +1 -0
  139. package/studio/web/assets/status-BJegPrWN.js +61 -0
  140. package/studio/web/assets/step-vX8bovaY.js +1 -0
  141. package/studio/web/assets/swimlanes-XN3QIQJK-B54FmF46.js +1 -0
  142. package/studio/web/assets/swimlanesDiagram-VK2B7HYN-XOhmNEvq.js +8 -0
  143. package/studio/web/assets/tabs-B_G5zscN.js +1 -0
  144. package/studio/web/assets/{time-D55sDum-.js → time-Cclkb7kQ.js} +1 -1
  145. package/studio/web/assets/{timeline-definition-Z64GVDOM-Dy5A_tK2.js → timeline-definition-24CTP7MA-D-a9ujbo.js} +5 -5
  146. package/studio/web/assets/toggleHighContrast-BdIEw2rK.js +49 -0
  147. package/studio/web/assets/treeView-Q6P3EWNA-CrW_6JnS.js +1 -0
  148. package/studio/web/assets/treemap-WGGIJYW6-BxyYLdP_.js +1 -0
  149. package/studio/web/assets/tsMode-CulNMwI9.js +11 -0
  150. package/studio/web/assets/typescript-BpRqjmvQ.js +1 -0
  151. package/studio/web/assets/useEntityRestURL-C7x-Yz9r.js +1 -0
  152. package/studio/web/assets/useLocalStorage-Dtj1QS8_.js +1 -0
  153. package/studio/web/assets/{vendor-core-CddkYGh5.js → vendor-core-RCcadM3e.js} +1 -1
  154. package/studio/web/assets/vendor-datadog-BRv-mOv1.js +6 -0
  155. package/studio/web/assets/{vendor-react-BhazFIp8.js → vendor-react-Dyj4O3HE.js} +1 -1
  156. package/studio/web/assets/vendor-tanstack-BiFWSB3W.js +1 -0
  157. package/studio/web/assets/{vendor-ui-BLIveqaL.js → vendor-ui-vhu-UHhF.js} +11 -11
  158. package/studio/web/assets/{vennDiagram-T6HMQDX7-DRvMIiSo.js → vennDiagram-4TSXK5OY-Cy7s7Mpy.js} +3 -3
  159. package/studio/web/assets/wardley-WFR3VGLG-BeBL35g2.js +1 -0
  160. package/studio/web/assets/{wardleyDiagram-T6FBY63Y-B04FSA0i.js → wardleyDiagram-VM6X3IG4-BylmIGSg.js} +3 -3
  161. package/studio/web/assets/workers-B2WpJDK9.js +3 -0
  162. package/studio/web/assets/x-B9o9hsep.js +1 -0
  163. package/studio/web/assets/xml-CZnimVSX.js +1 -0
  164. package/studio/web/assets/{xychartDiagram-ELKLHX3M-BE0X7RA7.js → xychartDiagram-S5SC5T6Z-CoKALMXr.js} +3 -3
  165. package/studio/web/assets/yaml-BwNuyZS-.js +1 -0
  166. package/studio/web/assets/{yaml.worker-Iyy2Pf1T.js → yaml.worker-BDL8_iuk.js} +153 -153
  167. package/studio/web/harper-studio_black.png +0 -0
  168. package/studio/web/index.html +18 -24
  169. package/studio/web/assets/FloatingChat-BbztUci0.js +0 -23
  170. package/studio/web/assets/abnfDiagram-N423BO3Z-BRuH0ywn.js +0 -1
  171. package/studio/web/assets/apiToken-D0x_S8Wq.js +0 -1
  172. package/studio/web/assets/applications-BU83fSEG.js +0 -296
  173. package/studio/web/assets/arc-3Xw6uabx.js +0 -1
  174. package/studio/web/assets/architecture-TIHT7OUA-CsHfPErM.js +0 -1
  175. package/studio/web/assets/architectureDiagram-T3A2C74G-DrwbS7Gp.js +0 -36
  176. package/studio/web/assets/array-BifhSqXX.js +0 -1
  177. package/studio/web/assets/authStore-B3IhXrn6.js +0 -3
  178. package/studio/web/assets/blockDiagram-VBNYF7ZC-DKN1mht5.js +0 -132
  179. package/studio/web/assets/c4Diagram-5PPSVZJV-CT9bmjm_.js +0 -10
  180. package/studio/web/assets/card-ByrPS_wa.js +0 -1
  181. package/studio/web/assets/channel-mnKBfsP-.js +0 -1
  182. package/studio/web/assets/chevron-right-CY-tr2sG.js +0 -1
  183. package/studio/web/assets/chunk-3NCLNEKW-BVj72ixc.js +0 -1
  184. package/studio/web/assets/chunk-5FCAYU7R-Dh5nylU8.js +0 -1
  185. package/studio/web/assets/chunk-5HE753X5-Bw-yg4kO.js +0 -1
  186. package/studio/web/assets/chunk-5JV3BV7I-Cy5pj3QY.js +0 -1
  187. package/studio/web/assets/chunk-5TONJI2A-DQOY3q1H.js +0 -2
  188. package/studio/web/assets/chunk-7BUUIJ7U-Bb538aSH.js +0 -1
  189. package/studio/web/assets/chunk-7Z6QIM7H-BJhESwQK.js +0 -10
  190. package/studio/web/assets/chunk-BIQX33UG-DZEsGuSn.js +0 -1
  191. package/studio/web/assets/chunk-CQNSW5MT-B8S09OIh.js +0 -1
  192. package/studio/web/assets/chunk-CYSBUYHQ-C1Rf4art.js +0 -1
  193. package/studio/web/assets/chunk-EMLP6XTP-RLD4nXpI.js +0 -1
  194. package/studio/web/assets/chunk-I66GZJ75-DHPYnKNr.js +0 -125
  195. package/studio/web/assets/chunk-J7OUQ5F2-DcY_kb6i.js +0 -2
  196. package/studio/web/assets/chunk-JG7HCLWE-BYfiSaVt.js +0 -2
  197. package/studio/web/assets/chunk-JQJVKLGR-DtEmbHZj.js +0 -156
  198. package/studio/web/assets/chunk-MOZMSUNE-XVucA-n6.js +0 -1
  199. package/studio/web/assets/chunk-NSK5VX7P-DDFNzCU_.js +0 -2
  200. package/studio/web/assets/chunk-OSBZ3O6U-CrKZOUOr.js +0 -1
  201. package/studio/web/assets/chunk-QBLGF6JB-CxAyS2mW.js +0 -1
  202. package/studio/web/assets/chunk-QR6OTTB3-Df7OCENk.js +0 -62
  203. package/studio/web/assets/chunk-R7FJI6CG-Cnn3gE-Y.js +0 -1
  204. package/studio/web/assets/chunk-RYQCIY6F-N0MDKk5G.js +0 -1
  205. package/studio/web/assets/chunk-U6XO7XAA-BFxjP5U3.js +0 -2
  206. package/studio/web/assets/chunk-UBXNYLIW-rn0yw1mp.js +0 -1
  207. package/studio/web/assets/chunk-W5SLKNZC-DKMlAWZk.js +0 -1
  208. package/studio/web/assets/chunk-WRU74C26-Dg10j8Pf.js +0 -70
  209. package/studio/web/assets/chunk-YOTPTUD7-D0vRKqYp.js +0 -1
  210. package/studio/web/assets/chunk-ZIRB5QZD-O39ZBUk3.js +0 -32
  211. package/studio/web/assets/classDiagram-JCYQIIEL-BrXNP4fl.js +0 -1
  212. package/studio/web/assets/classDiagram-v2-OCEON4UE-BrXNP4fl.js +0 -1
  213. package/studio/web/assets/cssMode-DipmMR_-.js +0 -1
  214. package/studio/web/assets/cynefin-VYW2F7L2-Ds2Fw2Y0.js +0 -1
  215. package/studio/web/assets/cynefinDiagram-MW4NZA55-DcTzrsC5.js +0 -62
  216. package/studio/web/assets/cytoscape.esm-B-NFISlW.js +0 -321
  217. package/studio/web/assets/dagre-Buvkdvvj.js +0 -1
  218. package/studio/web/assets/dagre-VZM6K2ZE-CMyJ9QPU.js +0 -4
  219. package/studio/web/assets/diagram-7IWD3JNH-jEGuzdp3.js +0 -30
  220. package/studio/web/assets/diagram-B4RE2ZJO-Ba7wC7iw.js +0 -3
  221. package/studio/web/assets/diagram-LBJQPF4R-Bm7Wj_dF.js +0 -24
  222. package/studio/web/assets/diagram-Q27KOJAE-C-gdktLC.js +0 -24
  223. package/studio/web/assets/diagram-UB23O5K3-COBVIEEk.js +0 -41
  224. package/studio/web/assets/ebnfDiagram-BXEA7PRR-G-t56mVV.js +0 -1
  225. package/studio/web/assets/editor-BDfNodZS.js +0 -1
  226. package/studio/web/assets/erDiagram-JOGREHBK-DpHzpqx1.js +0 -85
  227. package/studio/web/assets/eventmodeling-45OFAUF4-CLEiVx5s.js +0 -1
  228. package/studio/web/assets/flowDiagram-UKHOOZJN-CIxxUUxn.js +0 -1
  229. package/studio/web/assets/getRegistrationInfo--NLLrics.js +0 -1
  230. package/studio/web/assets/gitGraph-TEB2WS4Q-CZFBqwW-.js +0 -1
  231. package/studio/web/assets/gitGraphDiagram-DS77QQ5N-DuGnRv2R.js +0 -106
  232. package/studio/web/assets/html-DmSSmgE8.js +0 -1
  233. package/studio/web/assets/htmlMode-B2LqJw1z.js +0 -1
  234. package/studio/web/assets/index-BO3NaEw8.css +0 -1
  235. package/studio/web/assets/index-BQB9R8Ug.js +0 -810
  236. package/studio/web/assets/index-BnYZFLIB.css +0 -1
  237. package/studio/web/assets/index.lazy-CtErm5q7.js +0 -13
  238. package/studio/web/assets/info-DKCQHKI2--1InqQeT.js +0 -1
  239. package/studio/web/assets/infoDiagram-6WML65LV-DliK38kp.js +0 -2
  240. package/studio/web/assets/isArrayLikeObject-BHDnhloL.js +0 -1
  241. package/studio/web/assets/jsonMode-BVS6P5Xk.js +0 -1
  242. package/studio/web/assets/languageServices-Bl-BvoAb.js +0 -1
  243. package/studio/web/assets/line-Bom3IjHi.js +0 -1
  244. package/studio/web/assets/linear-DwB_ruUT.js +0 -1
  245. package/studio/web/assets/lspLanguageFeatures-C7XtZA_w.js +0 -4
  246. package/studio/web/assets/map-BaFkSB1l.js +0 -1
  247. package/studio/web/assets/math-Bi_r_ZWc.js +0 -1
  248. package/studio/web/assets/mermaid-parser.core-Dd4RYr9Q.js +0 -4
  249. package/studio/web/assets/mermaid.core-Bbo24DGo.js +0 -11
  250. package/studio/web/assets/notifications-B8rDagJM.js +0 -1
  251. package/studio/web/assets/notifications-CPwYKDDH.js +0 -1
  252. package/studio/web/assets/packet-7NZHBO7P-BGMXB0XL.js +0 -1
  253. package/studio/web/assets/path-fybaL0A-.js +0 -1
  254. package/studio/web/assets/pegDiagram-VL7TDLO6-CWEktcBB.js +0 -1
  255. package/studio/web/assets/pie-RZYD4A2V-DgYg3tCt.js +0 -1
  256. package/studio/web/assets/pieDiagram-7S7Q4E2Y-DEAmZOqY.js +0 -39
  257. package/studio/web/assets/pollUnlessForbidden-DIDXGBc5.js +0 -1
  258. package/studio/web/assets/profile-D0hB1xdm.js +0 -1
  259. package/studio/web/assets/purify.es-DrVcFY1Q.js +0 -3
  260. package/studio/web/assets/queryClient-BLhQvmWC.js +0 -1
  261. package/studio/web/assets/radar-I7S5WNFK-Ag-zp_Rq.js +0 -1
  262. package/studio/web/assets/railroad-3IZDKUUU-aibJDIDV.js +0 -1
  263. package/studio/web/assets/railroad-abnf-AHOZXSZD-BBMEuvIl.js +0 -1
  264. package/studio/web/assets/railroad-ebnf-EBAXGLYW-Be1nseej.js +0 -1
  265. package/studio/web/assets/railroad-peg-LSFZ7HO6-DIvD-Eyb.js +0 -1
  266. package/studio/web/assets/railroadDiagram-AXF67PYL-BJWrgR10.js +0 -1
  267. package/studio/web/assets/react-VeAY02s6.js +0 -1
  268. package/studio/web/assets/react-redux-Ds7wf7Ax.js +0 -5
  269. package/studio/web/assets/regions-y_jxsBpN.js +0 -1
  270. package/studio/web/assets/register-3F1Tje_F.js +0 -2
  271. package/studio/web/assets/register-S_PdXsoi.js +0 -2
  272. package/studio/web/assets/rolldown-runtime-B0Z9INg1.js +0 -1
  273. package/studio/web/assets/select-CKgJgpkn.js +0 -1
  274. package/studio/web/assets/setComponentFile-DSHbURTI.js +0 -1
  275. package/studio/web/assets/setLocalStorage-CD_L8p_D.js +0 -1
  276. package/studio/web/assets/setup-J5SrM1Kp.js +0 -2
  277. package/studio/web/assets/src-DUvBCJIr.js +0 -1
  278. package/studio/web/assets/stateDiagram-OKZ733FA-D9oPLTjO.js +0 -1
  279. package/studio/web/assets/stateDiagram-v2-UEYNNEHI-CSD1wbuZ.js +0 -1
  280. package/studio/web/assets/status-IoJkDzlx.js +0 -61
  281. package/studio/web/assets/string-f6JzSHaO.js +0 -1
  282. package/studio/web/assets/swagger-ui-react-BlgSS25O.js +0 -240
  283. package/studio/web/assets/swimlanes-SLNWSIFB-BpeoNE9k.js +0 -2
  284. package/studio/web/assets/swimlanesDiagram-ULZ7WXOC-DHxwzxpp.js +0 -8
  285. package/studio/web/assets/table-BvFflPWi.js +0 -1
  286. package/studio/web/assets/tabs-Dd_ElZ36.js +0 -1
  287. package/studio/web/assets/textarea-a3RnTY31.js +0 -9
  288. package/studio/web/assets/toggleHighContrast-CyNC3SCQ.js +0 -49
  289. package/studio/web/assets/tokenization-CWuvR2gh.js +0 -7
  290. package/studio/web/assets/treeView-QDETBFTQ-uHZ-3Fz8.js +0 -1
  291. package/studio/web/assets/treemap-6X3UGDF4-BnUKyy3l.js +0 -1
  292. package/studio/web/assets/tsMode-CslzhcVk.js +0 -11
  293. package/studio/web/assets/typescript-Dtnury3t.js +0 -1
  294. package/studio/web/assets/useAuth-DiJUZS1C.js +0 -1
  295. package/studio/web/assets/useEntityRestURL-qfahJnvr.js +0 -1
  296. package/studio/web/assets/useLocalStorage-DetQlhBe.js +0 -1
  297. package/studio/web/assets/vendor-datadog-XDrpA25D.js +0 -6
  298. package/studio/web/assets/vendor-tanstack-FsM5XZNE.js +0 -1
  299. package/studio/web/assets/wardley-OPB4EBWU-Da7TLC2F.js +0 -1
  300. package/studio/web/assets/workers-BtibQGyk.js +0 -3
  301. package/studio/web/assets/x-D39AGKMb.js +0 -1
  302. package/studio/web/assets/xml-D41zWqPl.js +0 -1
  303. package/studio/web/assets/yaml-BFQ3mF1U.js +0 -1
  304. /package/studio/web/assets/{editor-jjEx9u7D.css → register-jjEx9u7D.css} +0 -0
@@ -35,55 +35,55 @@ var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],en
35
35
  `+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\r`+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\r
36
36
  `+` `.repeat(t));var vs;(function(e){e.DEFAULT={allowTrailingComma:!1}})(vs||={});function ys(e,t=[],n=vs.DEFAULT){let r=null,i=[],a=[];function o(e){Array.isArray(i)?i.push(e):r!==null&&(i[r]=e)}return Cs(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 bs(e){switch(e.type){case`array`:return e.children.map(bs);case`object`:let t=Object.create(null);for(let n of e.children){let e=n.children[1];e&&(t[n.children[0].value]=bs(e))}return t;case`null`:case`string`:case`number`:case`boolean`:return e.value;default:return}}function xs(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}function Ss(e,t,n=!1){if(xs(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=Ss(r[e],t,n);if(i)return i}return e}}function Cs(e,t,n=vs.DEFAULT){let r=ps(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 w(e){let t=r.getTokenValue();return e?g(t):(f(t),i.push(t)),S(),!0}function T(){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 ee(){return r.getToken()===10?(w(!1),r.getToken()===6?(_(`:`),S(),D()||C(4,[],[2,5])):C(5,[],[2,5]),i.pop(),!0):(C(3,[],[2,5]),!1)}function E(){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,[],[]);ee()||C(4,[],[2,5]),e=!0}return p(),r.getToken()===2?S():C(7,[2],[]),!0}function te(){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]++,D()||C(4,[],[4,5]),t=!0}return h(),e||i.pop(),r.getToken()===4?S():C(8,[4],[]),!0}function D(){switch(r.getToken()){case 3:return te();case 1:return E();case 10:return w(!0);default:return T()}}return S(),r.getToken()===17?n.allowEmptyContent?!0:(C(4,[],[]),!1):D()?(r.getToken()!==17&&C(9,[],[]),!0):(C(4,[],[]),!1)}var ws;(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`})(ws||={});var Ts;(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`})(Ts||={});const Es=ys,Ds=Ss,Os=bs;var ks;(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`})(ks||={});var As;(()=>{var e={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}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};let i;n.r(r),n.d(r,{URI:()=>u,Utils:()=>C}),typeof process==`object`?i=process.platform===`win32`:typeof navigator==`object`&&(i=navigator.userAgent.indexOf(`Windows`)>=0);let a=/^\w[\w\d+.-]*$/,o=/^\//,s=/^\/\//;function c(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&&!a.test(e.scheme))throw Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!o.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(s.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 l=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static isUri(e){return e instanceof u||!!e&&typeof e.authority==`string`&&typeof e.fragment==`string`&&typeof e.path==`string`&&typeof e.query==`string`&&typeof e.scheme==`string`&&typeof e.fsPath==`string`&&typeof e.with==`function`&&typeof e.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||``,c(this,a))}get fsPath(){return g(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 f(t,n,r,i,a)}static parse(e,t=!1){let n=l.exec(e);return n?new f(n[2]||``,b(n[4]||``),b(n[5]||``),b(n[7]||``),b(n[9]||``),t):new f(``,``,``,``,``)}static file(e){let t=``;if(i&&(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 f(`file`,t,e,``,``)}static from(e){let t=new f(e.scheme,e.authority,e.path,e.query,e.fragment);return c(t,!0),t}toString(e=!1){return _(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof u)return e;{let t=new f(e);return t._formatted=e.external,t._fsPath=e._sep===d?e.fsPath:null,t}}return e}}let d=i?1:void 0;class f extends u{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=g(this,!1),this._fsPath}toString(e=!1){return e?_(this,!0):(this._formatted||=_(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=d),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 p={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 m(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=p[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 h(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+=p[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}function g(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,i&&(n=n.replace(/\//g,`\\`)),n}function _(e,t){let n=t?h:m,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:m(c,!1,!1)),r}function v(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+v(e.substr(3)):e}}let y=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function b(e){return e.match(y)?e.replace(y,(e=>v(e))):e}var x=n(975);let S=x.posix||x;var C;(function(e){e.joinPath=function(e,...t){return e.with({path:S.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=S.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=S.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return S.basename(e.path)},e.extname=function(e){return S.extname(e.path)}})(C||={}),As=r})();const{URI:js,Utils:Ms}=As;var Ns;(function(e){function t(e){return typeof e==`string`}e.is=t})(Ns||={});var Ps;(function(e){function t(e){return typeof e==`string`}e.is=t})(Ps||={});var Fs;(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})(Fs||={});var Is;(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})(Is||={});var Ls;(function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=Is.MAX_VALUE),t===Number.MAX_VALUE&&(t=Is.MAX_VALUE),{line:e,character:t}}e.create=t;function n(e){let t=e;return L.objectLiteral(t)&&L.uinteger(t.line)&&L.uinteger(t.character)}e.is=n})(Ls||={});var F;(function(e){function t(e,t,n,r){if(L.uinteger(e)&&L.uinteger(t)&&L.uinteger(n)&&L.uinteger(r))return{start:Ls.create(e,t),end:Ls.create(n,r)};if(Ls.is(e)&&Ls.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 L.objectLiteral(t)&&Ls.is(t.start)&&Ls.is(t.end)}e.is=n})(F||={});var Rs;(function(e){function t(e,t){return{uri:e,range:t}}e.create=t;function n(e){let t=e;return L.objectLiteral(t)&&F.is(t.range)&&(L.string(t.uri)||L.undefined(t.uri))}e.is=n})(Rs||={});var zs;(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 L.objectLiteral(t)&&F.is(t.targetRange)&&L.string(t.targetUri)&&F.is(t.targetSelectionRange)&&(F.is(t.originSelectionRange)||L.undefined(t.originSelectionRange))}e.is=n})(zs||={});var Bs;(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 L.objectLiteral(t)&&L.numberRange(t.red,0,1)&&L.numberRange(t.green,0,1)&&L.numberRange(t.blue,0,1)&&L.numberRange(t.alpha,0,1)}e.is=n})(Bs||={});var Vs;(function(e){function t(e,t){return{range:e,color:t}}e.create=t;function n(e){let t=e;return L.objectLiteral(t)&&F.is(t.range)&&Bs.is(t.color)}e.is=n})(Vs||={});var Hs;(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}e.create=t;function n(e){let t=e;return L.objectLiteral(t)&&L.string(t.label)&&(L.undefined(t.textEdit)||Xs.is(t))&&(L.undefined(t.additionalTextEdits)||L.typedArray(t.additionalTextEdits,Xs.is))}e.is=n})(Hs||={});var Us;(function(e){e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`})(Us||={});var Ws;(function(e){function t(e,t,n,r,i,a){let o={startLine:e,endLine:t};return L.defined(n)&&(o.startCharacter=n),L.defined(r)&&(o.endCharacter=r),L.defined(i)&&(o.kind=i),L.defined(a)&&(o.collapsedText=a),o}e.create=t;function n(e){let t=e;return L.objectLiteral(t)&&L.uinteger(t.startLine)&&L.uinteger(t.startLine)&&(L.undefined(t.startCharacter)||L.uinteger(t.startCharacter))&&(L.undefined(t.endCharacter)||L.uinteger(t.endCharacter))&&(L.undefined(t.kind)||L.string(t.kind))}e.is=n})(Ws||={});var Gs;(function(e){function t(e,t){return{location:e,message:t}}e.create=t;function n(e){let t=e;return L.defined(t)&&Rs.is(t.location)&&L.string(t.message)}e.is=n})(Gs||={});var I;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(I||={});var Ks;(function(e){e.Unnecessary=1,e.Deprecated=2})(Ks||={});var qs;(function(e){function t(e){let t=e;return L.objectLiteral(t)&&L.string(t.href)}e.is=t})(qs||={});var Js;(function(e){function t(e,t,n,r,i,a){let o={range:e,message:t};return L.defined(n)&&(o.severity=n),L.defined(r)&&(o.code=r),L.defined(i)&&(o.source=i),L.defined(a)&&(o.relatedInformation=a),o}e.create=t;function n(e){let t=e;return L.defined(t)&&F.is(t.range)&&(L.string(t.message)||fc.is(t.message))&&(L.number(t.severity)||L.undefined(t.severity))&&(L.integer(t.code)||L.string(t.code)||L.undefined(t.code))&&(L.undefined(t.codeDescription)||L.string(t.codeDescription?.href))&&(L.string(t.source)||L.undefined(t.source))&&(L.undefined(t.relatedInformation)||L.typedArray(t.relatedInformation,Gs.is))}e.is=n;function r(e){return L.string(e.message)}e.is3_17=r;function i(e){if(L.string(e.message))return e.message;if(fc.is(e.message))return e.message.value;throw Error(`Unknown message type ${typeof e.message}`)}e.getMessageString=i})(Js||={});var Ys;(function(e){function t(e,t,...n){let r={title:e,command:t};return L.defined(n)&&n.length>0&&(r.arguments=n),r}e.create=t;function n(e){let t=e;return L.defined(t)&&L.string(t.title)&&(t.tooltip===void 0||L.string(t.tooltip))&&L.string(t.command)}e.is=n})(Ys||={});var Xs;(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 L.objectLiteral(t)&&L.string(t.newText)&&F.is(t.range)}e.is=i})(Xs||={});var Zs;(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 L.objectLiteral(t)&&L.string(t.label)&&(L.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(L.string(t.description)||t.description===void 0)}e.is=n})(Zs||={});var Qs;(function(e){function t(e){let t=e;return L.string(t)}e.is=t})(Qs||={});var $s;(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 Xs.is(t)&&(Zs.is(t.annotationId)||Qs.is(t.annotationId))}e.is=i})($s||={});var ec;(function(e){function t(e,t){return{textDocument:e,edits:t}}e.create=t;function n(e){let t=e;return L.defined(t)&&cc.is(t.textDocument)&&Array.isArray(t.edits)}e.is=n})(ec||={});var tc;(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`&&L.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||L.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||L.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||Qs.is(t.annotationId))}e.is=n})(tc||={});var nc;(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`&&L.string(t.oldUri)&&L.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||L.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||L.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||Qs.is(t.annotationId))}e.is=n})(nc||={});var rc;(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`&&L.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||L.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||L.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||Qs.is(t.annotationId))}e.is=n})(rc||={});var ic;(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=>L.string(e.kind)?tc.is(e)||nc.is(e)||rc.is(e):ec.is(e)))}e.is=t})(ic||={});var ac;(function(e){function t(e){let t=e;return L.objectLiteral(t)&&F.is(t.range)&&Qc.isSnippet(t.snippet)&&(t.annotationId===void 0||Zs.is(t.annotationId)||Qs.is(t.annotationId))}e.is=t})(ac||={});var oc;(function(e){function t(e){return{uri:e}}e.create=t;function n(e){let t=e;return L.defined(t)&&L.string(t.uri)}e.is=n})(oc||={});var sc;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return L.defined(t)&&L.string(t.uri)&&L.integer(t.version)}e.is=n})(sc||={});var cc;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return L.defined(t)&&L.string(t.uri)&&(t.version===null||L.integer(t.version))}e.is=n})(cc||={});var lc;(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`})(lc||={});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 L.defined(t)&&L.string(t.uri)&&L.string(t.languageId)&&L.integer(t.version)&&L.string(t.text)}e.is=n})(uc||={});var dc;(function(e){e.PlainText=`plaintext`,e.Markdown=`markdown`;function t(t){let n=t;return n===e.PlainText||n===e.Markdown}e.is=t})(dc||={});var fc;(function(e){function t(e){let t=e;return L.objectLiteral(e)&&dc.is(t.kind)&&L.string(t.value)}e.is=t})(fc||={});var pc;(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})(pc||={});var mc;(function(e){e.PlainText=1,e.Snippet=2})(mc||={});var hc;(function(e){e.Deprecated=1})(hc||={});var gc;(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&&L.string(t.newText)&&F.is(t.insert)&&F.is(t.replace)}e.is=n})(gc||={});var _c;(function(e){e.asIs=1,e.adjustIndentation=2})(_c||={});var vc;(function(e){e.Replace=1,e.Merge=2})(vc||={});var yc;(function(e){function t(e){let t=e;return t&&(L.string(t.detail)||t.detail===void 0)&&(L.string(t.description)||t.description===void 0)}e.is=t})(yc||={});var bc;(function(e){function t(e){return{label:e}}e.create=t})(bc||={});var xc;(function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t})(xc||={});var Sc;(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}e.fromPlainText=t;function n(e){let t=e;return L.string(t)||L.objectLiteral(t)&&L.string(t.language)&&L.string(t.value)}e.is=n})(Sc||={});var Cc;(function(e){function t(e){let t=e;return!!t&&L.objectLiteral(t)&&(fc.is(t.contents)||Sc.is(t.contents)||L.typedArray(t.contents,Sc.is))&&(e.range===void 0||F.is(e.range))}e.is=t})(Cc||={});var wc;(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t})(wc||={});var Tc;(function(e){function t(e,t,...n){let r={label:e};return L.defined(t)&&(r.documentation=t),r.parameters=L.defined(n)?n:[],r}e.create=t})(Tc||={});var Ec;(function(e){e.Text=1,e.Read=2,e.Write=3})(Ec||={});var Dc;(function(e){function t(e,t){let n={range:e};return L.number(t)&&(n.kind=t),n}e.create=t})(Dc||={});var Oc;(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})(Oc||={});var kc;(function(e){e.Deprecated=1})(kc||={});var Ac;(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})(Ac||={});var jc;(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})(jc||={});var Mc;(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&&L.string(t.name)&&L.number(t.kind)&&F.is(t.range)&&F.is(t.selectionRange)&&(t.detail===void 0||L.string(t.detail))&&(t.deprecated===void 0||L.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=n})(Mc||={});var Nc;(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`})(Nc||={});var Pc;(function(e){e.Invoked=1,e.Automatic=2})(Pc||={});var Fc;(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 L.defined(t)&&L.typedArray(t.diagnostics,Js.is)&&(t.only===void 0||L.typedArray(t.only,L.string))&&(t.triggerKind===void 0||t.triggerKind===Pc.Invoked||t.triggerKind===Pc.Automatic)}e.is=n})(Fc||={});var Ic;(function(e){e.LLMGenerated=1;function t(t){return L.defined(t)&&t===e.LLMGenerated}e.is=t})(Ic||={});var Lc;(function(e){function t(e,t,n){let r={title:e},i=!0;return typeof t==`string`?(i=!1,r.kind=t):Ys.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&&L.string(t.title)&&(t.diagnostics===void 0||L.typedArray(t.diagnostics,Js.is))&&(t.kind===void 0||L.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||Ys.is(t.command))&&(t.isPreferred===void 0||L.boolean(t.isPreferred))&&(t.edit===void 0||ic.is(t.edit))&&(t.tags===void 0||L.typedArray(t.tags,Ic.is))}e.is=n})(Lc||={});var Rc;(function(e){function t(e,t){let n={range:e};return L.defined(t)&&(n.data=t),n}e.create=t;function n(e){let t=e;return L.defined(t)&&F.is(t.range)&&(L.undefined(t.command)||Ys.is(t.command))}e.is=n})(Rc||={});var zc;(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}e.create=t;function n(e){let t=e;return L.defined(t)&&L.uinteger(t.tabSize)&&L.boolean(t.insertSpaces)}e.is=n})(zc||={});var Bc;(function(e){function t(e,t,n){return{range:e,target:t,data:n}}e.create=t;function n(e){let t=e;return L.defined(t)&&F.is(t.range)&&(L.undefined(t.target)||L.string(t.target))}e.is=n})(Bc||={});var Vc;(function(e){function t(e,t){return{range:e,parent:t}}e.create=t;function n(t){let n=t;return L.objectLiteral(n)&&F.is(n.range)&&(n.parent===void 0||e.is(n.parent))}e.is=n})(Vc||={});var Hc;(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`})(Hc||={});var Uc;(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`})(Uc||={});var Wc;(function(e){function t(e){let t=e;return L.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})(Wc||={});var Gc;(function(e){function t(e,t){return{range:e,text:t}}e.create=t;function n(e){let t=e;return t!=null&&F.is(t.range)&&L.string(t.text)}e.is=n})(Gc||={});var Kc;(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&&F.is(t.range)&&L.boolean(t.caseSensitiveLookup)&&(L.string(t.variableName)||t.variableName===void 0)}e.is=n})(Kc||={});var qc;(function(e){function t(e,t){return{range:e,expression:t}}e.create=t;function n(e){let t=e;return t!=null&&F.is(t.range)&&(L.string(t.expression)||t.expression===void 0)}e.is=n})(qc||={});var Jc;(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}e.create=t;function n(e){let t=e;return L.defined(t)&&F.is(e.stoppedLocation)}e.is=n})(Jc||={});var Yc;(function(e){e.Type=1,e.Parameter=2;function t(e){return e===1||e===2}e.is=t})(Yc||={});var Xc;(function(e){function t(e){return{value:e}}e.create=t;function n(e){let t=e;return L.objectLiteral(t)&&(t.tooltip===void 0||L.string(t.tooltip)||fc.is(t.tooltip))&&(t.location===void 0||Rs.is(t.location))&&(t.command===void 0||Ys.is(t.command))}e.is=n})(Xc||={});var Zc;(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 L.objectLiteral(t)&&Ls.is(t.position)&&(L.string(t.label)||L.typedArray(t.label,Xc.is))&&(t.kind===void 0||Yc.is(t.kind))&&t.textEdits===void 0||L.typedArray(t.textEdits,Xs.is)&&(t.tooltip===void 0||L.string(t.tooltip)||fc.is(t.tooltip))&&(t.paddingLeft===void 0||L.boolean(t.paddingLeft))&&(t.paddingRight===void 0||L.boolean(t.paddingRight))}e.is=n})(Zc||={});var Qc;(function(e){function t(e){return{kind:`snippet`,value:e}}e.createSnippet=t;function n(e){let t=e;return L.objectLiteral(t)&&t.kind===`snippet`&&L.string(t.value)}e.isSnippet=n})(Qc||={});var $c;(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}e.create=t})($c||={});var el;(function(e){function t(e){return{items:e}}e.create=t})(el||={});var tl;(function(e){e.Invoked=1,e.Automatic=2})(tl||={});var nl;(function(e){function t(e,t){return{range:e,text:t}}e.create=t})(nl||={});var rl;(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t})(rl||={});var il;(function(e){function t(e){let t=e;return L.objectLiteral(t)&&Ps.is(t.uri)&&L.string(t.name)}e.is=t})(il||={});var al;(function(e){function t(e,t,n,r){return new ol(e,t,n,r)}e.create=t;function n(e){let t=e;return!!(L.defined(t)&&L.string(t.uri)&&(L.undefined(t.languageId)||L.string(t.languageId))&&L.uinteger(t.lineCount)&&L.func(t.getText)&&L.func(t.positionAt)&&L.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}})(al||={});var ol=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
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 Ls.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 Ls.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}},L;(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})(L||={});var sl;function R(...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 R(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=sl?.[n];return a?typeof a==`string`?ll(a,i):a.comment?ll(a.message,i):ll(r,i):ll(r,i)}var cl=/{([^}]+)}/g;function ll(e,t){return Object.keys(t).length===0?e:e.replace(cl,(e,n)=>t[n]??e)}const ul={exports:{}};function dl(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function fl(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 pl(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 ml={resolve:function(){for(var e=``,t=!1,n,r=arguments.length-1;r>=-1&&!t;r--){var i;r>=0?i=arguments[r]:(n===void 0&&(n=process.cwd()),i=n),dl(i),i.length!==0&&(e=i+`/`+e,t=i.charCodeAt(0)===47)}return e=fl(e,!t),t?e.length>0?`/`+e:`/`:e.length>0?e:`.`},normalize:function(e){if(dl(e),e.length===0)return`.`;var t=e.charCodeAt(0)===47,n=e.charCodeAt(e.length-1)===47;return e=fl(e,!t),e.length===0&&!t&&(e=`.`),e.length>0&&n&&(e+=`/`),t?`/`+e:e},isAbsolute:function(e){return dl(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 n=arguments[t];dl(n),n.length>0&&(e===void 0?e=n:e+=`/`+n)}return e===void 0?`.`:ml.normalize(e)},relative:function(e,t){if(dl(e),dl(t),e===t||(e=ml.resolve(e),t=ml.resolve(t),e===t))return``;for(var n=1;n<e.length&&e.charCodeAt(n)===47;++n);for(var r=e.length,i=r-n,a=1;a<t.length&&t.charCodeAt(a)===47;++a);for(var o=t.length-a,s=i<o?i:o,c=-1,l=0;l<=s;++l){if(l===s){if(o>s){if(t.charCodeAt(a+l)===47)return t.slice(a+l+1);if(l===0)return t.slice(a+l)}else i>s&&(e.charCodeAt(n+l)===47?c=l:l===0&&(c=0));break}var u=e.charCodeAt(n+l);if(u!==t.charCodeAt(a+l))break;u===47&&(c=l)}var d=``;for(l=n+c+1;l<=r;++l)(l===r||e.charCodeAt(l)===47)&&(d.length===0?d+=`..`:d+=`/..`);return d.length>0?d+t.slice(a+c):(a+=c,t.charCodeAt(a)===47&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(dl(e),e.length===0)return`.`;for(var t=e.charCodeAt(0),n=t===47,r=-1,i=!0,a=e.length-1;a>=1;--a)if(t=e.charCodeAt(a),t===47){if(!i){r=a;break}}else i=!1;return r===-1?n?`/`:`.`:n&&r===1?`//`:e.slice(0,r)},basename:function(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);dl(e);var n=0,r=-1,i=!0,a;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return``;var o=t.length-1,s=-1;for(a=e.length-1;a>=0;--a){var 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:function(e){dl(e);for(var t=-1,n=0,r=-1,i=!0,a=0,o=e.length-1;o>=0;--o){var s=e.charCodeAt(o);if(s===47){if(!i){n=o+1;break}continue}r===-1&&(i=!1,r=o+1),s===46?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:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return pl(`/`,e)},parse:function(e){dl(e);var t={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return t;var n=e.charCodeAt(0),r=n===47,i;r?(t.root=`/`,i=1):i=0;for(var a=-1,o=0,s=-1,c=!0,l=e.length-1,u=0;l>=i;--l){if(n=e.charCodeAt(l),n===47){if(!c){o=l+1;break}continue}s===-1&&(c=!1,s=l+1),n===46?a===-1?a=l:u!==1&&(u=1):a!==-1&&(u=-1)}return a===-1||s===-1||u===0||u===1&&a===s-1&&a===o+1?s!==-1&&(t.base=t.name=o===0&&r?e.slice(1,s):e.slice(o,s)):(o===0&&r?(t.name=e.slice(1,a),t.base=e.slice(1,s)):(t.name=e.slice(o,a),t.base=e.slice(o,s)),t.ext=e.slice(a,s)),o>0?t.dir=e.slice(0,o-1):r&&(t.dir=`/`),t},sep:`/`,delimiter:`:`,win32:null,posix:null};ml.posix=ml,ul.exports=ml;const{resolve:hl,normalize:gl,isAbsolute:_l,join:vl,relative:yl,_makeLong:bl,dirname:xl,basename:Sl,extname:Cl,format:wl,parse:Tl,sep:El,delimiter:Dl,win32:Ol}=ml;ul.exports;const kl=Symbol.for(`yaml.alias`),Al=Symbol.for(`yaml.document`),jl=Symbol.for(`yaml.map`),Ml=Symbol.for(`yaml.pair`),Nl=Symbol.for(`yaml.scalar`),Pl=Symbol.for(`yaml.seq`),Fl=Symbol.for(`yaml.node.type`),Il=e=>!!e&&typeof e==`object`&&e[Fl]===kl,Ll=e=>!!e&&typeof e==`object`&&e[Fl]===Al,Rl=e=>!!e&&typeof e==`object`&&e[Fl]===jl,zl=e=>!!e&&typeof e==`object`&&e[Fl]===Ml,z=e=>!!e&&typeof e==`object`&&e[Fl]===Nl,Bl=e=>!!e&&typeof e==`object`&&e[Fl]===Pl;function Vl(e){if(e&&typeof e==`object`)switch(e[Fl]){case jl:case Pl:return!0}return!1}function Hl(e){if(e&&typeof e==`object`)switch(e[Fl]){case kl:case jl:case Nl:case Pl:return!0}return!1}const Ul=e=>(z(e)||Vl(e))&&!!e.anchor,Wl=Symbol(`break visit`),Gl=Symbol(`skip children`),Kl=Symbol(`remove node`);function ql(e,t){let n=Yl(t);Ll(e)?Jl(null,e.contents,n,Object.freeze([e]))===Kl&&(e.contents=null):Jl(null,e,n,Object.freeze([]))}ql.BREAK=Wl,ql.SKIP=Gl,ql.REMOVE=Kl;function Jl(e,t,n,r){let i=Xl(e,t,n,r);if(Hl(i)||zl(i))return Zl(e,r,i),Jl(e,i,n,r);if(typeof i!=`symbol`){if(Vl(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=Jl(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===Wl)return Wl;else i===Kl&&(t.items.splice(e,1),--e)}}else if(zl(t)){r=Object.freeze(r.concat(t));let e=Jl(`key`,t.key,n,r);if(e===Wl)return Wl;e===Kl&&(t.key=null);let i=Jl(`value`,t.value,n,r);if(i===Wl)return Wl;i===Kl&&(t.value=null)}}return i}function Yl(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 Xl(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(Rl(t))return n.Map?.(e,t,r);if(Bl(t))return n.Seq?.(e,t,r);if(zl(t))return n.Pair?.(e,t,r);if(z(t))return n.Scalar?.(e,t,r);if(Il(t))return n.Alias?.(e,t,r)}function Zl(e,t,n){let r=t[t.length-1];if(Vl(r))r.items[e]=n;else if(zl(r))e===`key`?r.key=n:r.value=n;else if(Ll(r))r.contents=n;else{let e=Il(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}const Ql={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},$l=e=>e.replace(/[!,[\]{}]/g,e=>Ql[e]);var eu=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+$l(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&&Hl(e.contents)){let t={};ql(e.contents,(e,n)=>{Hl(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
- `)}};eu.defaultYaml={explicit:!1,version:`1.2`},eu.defaultTags={"!!":`tag:yaml.org,2002:`};function tu(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 nu(e){let t=new Set;return ql(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function ru(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function iu(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=nu(e);let a=ru(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(z(t.node)||Vl(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 au(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=au(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=au(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=au(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=au(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function ou(e,t,n){if(Array.isArray(e))return e.map((e,t)=>ou(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!Ul(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,Fl,{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(!Ll(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=ou(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?au(i,{"":o},``,o):o}},cu=class extends su{constructor(e){super(kl),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=[],ql(e,{Node:(e,t)=>{(Il(t)||Ul(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||=(ou(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=lu(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(tu(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 lu(e,t,n){if(Il(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(Vl(t)){let r=0;for(let i of t.items){let t=lu(e,i,n);t>r&&(r=t)}return r}if(zl(t)){let r=lu(e,t.key,n),i=lu(e,t.value,n);return Math.max(r,i)}return 1}const uu=e=>!e||typeof e!=`function`&&typeof e!=`object`;var B=class extends su{constructor(e){super(Nl),this.value=e}toJSON(e,t){return t?.keep?this.value:ou(this.value,e,t)}toString(){return String(this.value)}};B.BLOCK_FOLDED=`BLOCK_FOLDED`,B.BLOCK_LITERAL=`BLOCK_LITERAL`,B.PLAIN=`PLAIN`,B.QUOTE_DOUBLE=`QUOTE_DOUBLE`,B.QUOTE_SINGLE=`QUOTE_SINGLE`;function du(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 fu(e,t,n){if(Ll(e)&&(e=e.contents),Hl(e))return e;if(zl(e)){let t=n.schema[jl].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=du(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new B(e);return c&&(c.node=t),t}l=e instanceof Map?o[jl]:Symbol.iterator in Object(e)?o[Pl]:o[jl]}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 B(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function pu(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 fu(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}const mu=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done;var hu=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=>Hl(t)||zl(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(mu(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(Vl(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,pu(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(Vl(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&&z(i)?i.value:i:Vl(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!zl(t))return!1;let n=t.value;return n==null||e&&z(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 Vl(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(Vl(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,pu(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}};const gu=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function _u(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const vu=(e,t,n)=>e.endsWith(`
40
- `)?_u(n,t):n.includes(`
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 Ls.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 Ls.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}},L;(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})(L||={});function R(...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 R(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??{};return cl(r,i)}var sl=/{([^}]+)}/g;function cl(e,t){return Object.keys(t).length===0?e:e.replace(sl,(e,n)=>t[n]??e)}const ll={exports:{}};function ul(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function dl(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 fl(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 pl={resolve:function(){for(var e=``,t=!1,n,r=arguments.length-1;r>=-1&&!t;r--){var i;r>=0?i=arguments[r]:(n===void 0&&(n=process.cwd()),i=n),ul(i),i.length!==0&&(e=i+`/`+e,t=i.charCodeAt(0)===47)}return e=dl(e,!t),t?e.length>0?`/`+e:`/`:e.length>0?e:`.`},normalize:function(e){if(ul(e),e.length===0)return`.`;var t=e.charCodeAt(0)===47,n=e.charCodeAt(e.length-1)===47;return e=dl(e,!t),e.length===0&&!t&&(e=`.`),e.length>0&&n&&(e+=`/`),t?`/`+e:e},isAbsolute:function(e){return ul(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 n=arguments[t];ul(n),n.length>0&&(e===void 0?e=n:e+=`/`+n)}return e===void 0?`.`:pl.normalize(e)},relative:function(e,t){if(ul(e),ul(t),e===t||(e=pl.resolve(e),t=pl.resolve(t),e===t))return``;for(var n=1;n<e.length&&e.charCodeAt(n)===47;++n);for(var r=e.length,i=r-n,a=1;a<t.length&&t.charCodeAt(a)===47;++a);for(var o=t.length-a,s=i<o?i:o,c=-1,l=0;l<=s;++l){if(l===s){if(o>s){if(t.charCodeAt(a+l)===47)return t.slice(a+l+1);if(l===0)return t.slice(a+l)}else i>s&&(e.charCodeAt(n+l)===47?c=l:l===0&&(c=0));break}var u=e.charCodeAt(n+l);if(u!==t.charCodeAt(a+l))break;u===47&&(c=l)}var d=``;for(l=n+c+1;l<=r;++l)(l===r||e.charCodeAt(l)===47)&&(d.length===0?d+=`..`:d+=`/..`);return d.length>0?d+t.slice(a+c):(a+=c,t.charCodeAt(a)===47&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(ul(e),e.length===0)return`.`;for(var t=e.charCodeAt(0),n=t===47,r=-1,i=!0,a=e.length-1;a>=1;--a)if(t=e.charCodeAt(a),t===47){if(!i){r=a;break}}else i=!1;return r===-1?n?`/`:`.`:n&&r===1?`//`:e.slice(0,r)},basename:function(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);ul(e);var n=0,r=-1,i=!0,a;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return``;var o=t.length-1,s=-1;for(a=e.length-1;a>=0;--a){var 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:function(e){ul(e);for(var t=-1,n=0,r=-1,i=!0,a=0,o=e.length-1;o>=0;--o){var s=e.charCodeAt(o);if(s===47){if(!i){n=o+1;break}continue}r===-1&&(i=!1,r=o+1),s===46?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:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return fl(`/`,e)},parse:function(e){ul(e);var t={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return t;var n=e.charCodeAt(0),r=n===47,i;r?(t.root=`/`,i=1):i=0;for(var a=-1,o=0,s=-1,c=!0,l=e.length-1,u=0;l>=i;--l){if(n=e.charCodeAt(l),n===47){if(!c){o=l+1;break}continue}s===-1&&(c=!1,s=l+1),n===46?a===-1?a=l:u!==1&&(u=1):a!==-1&&(u=-1)}return a===-1||s===-1||u===0||u===1&&a===s-1&&a===o+1?s!==-1&&(t.base=t.name=o===0&&r?e.slice(1,s):e.slice(o,s)):(o===0&&r?(t.name=e.slice(1,a),t.base=e.slice(1,s)):(t.name=e.slice(o,a),t.base=e.slice(o,s)),t.ext=e.slice(a,s)),o>0?t.dir=e.slice(0,o-1):r&&(t.dir=`/`),t},sep:`/`,delimiter:`:`,win32:null,posix:null};pl.posix=pl,ll.exports=pl;const{resolve:ml,normalize:hl,isAbsolute:gl,join:_l,relative:vl,_makeLong:yl,dirname:bl,basename:xl,extname:Sl,format:Cl,parse:wl,sep:Tl,delimiter:El,win32:Dl}=pl;ll.exports;const Ol=Symbol.for(`yaml.alias`),kl=Symbol.for(`yaml.document`),Al=Symbol.for(`yaml.map`),jl=Symbol.for(`yaml.pair`),Ml=Symbol.for(`yaml.scalar`),Nl=Symbol.for(`yaml.seq`),Pl=Symbol.for(`yaml.node.type`),Fl=e=>!!e&&typeof e==`object`&&e[Pl]===Ol,Il=e=>!!e&&typeof e==`object`&&e[Pl]===kl,Ll=e=>!!e&&typeof e==`object`&&e[Pl]===Al,Rl=e=>!!e&&typeof e==`object`&&e[Pl]===jl,z=e=>!!e&&typeof e==`object`&&e[Pl]===Ml,zl=e=>!!e&&typeof e==`object`&&e[Pl]===Nl;function Bl(e){if(e&&typeof e==`object`)switch(e[Pl]){case Al:case Nl:return!0}return!1}function Vl(e){if(e&&typeof e==`object`)switch(e[Pl]){case Ol:case Al:case Ml:case Nl:return!0}return!1}const Hl=e=>(z(e)||Bl(e))&&!!e.anchor,Ul=Symbol(`break visit`),Wl=Symbol(`skip children`),Gl=Symbol(`remove node`);function Kl(e,t){let n=Jl(t);Il(e)?ql(null,e.contents,n,Object.freeze([e]))===Gl&&(e.contents=null):ql(null,e,n,Object.freeze([]))}Kl.BREAK=Ul,Kl.SKIP=Wl,Kl.REMOVE=Gl;function ql(e,t,n,r){let i=Yl(e,t,n,r);if(Vl(i)||Rl(i))return Xl(e,r,i),ql(e,i,n,r);if(typeof i!=`symbol`){if(Bl(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=ql(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===Ul)return Ul;else i===Gl&&(t.items.splice(e,1),--e)}}else if(Rl(t)){r=Object.freeze(r.concat(t));let e=ql(`key`,t.key,n,r);if(e===Ul)return Ul;e===Gl&&(t.key=null);let i=ql(`value`,t.value,n,r);if(i===Ul)return Ul;i===Gl&&(t.value=null)}}return i}function Jl(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 Yl(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(Ll(t))return n.Map?.(e,t,r);if(zl(t))return n.Seq?.(e,t,r);if(Rl(t))return n.Pair?.(e,t,r);if(z(t))return n.Scalar?.(e,t,r);if(Fl(t))return n.Alias?.(e,t,r)}function Xl(e,t,n){let r=t[t.length-1];if(Bl(r))r.items[e]=n;else if(Rl(r))e===`key`?r.key=n:r.value=n;else if(Il(r))r.contents=n;else{let e=Fl(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}const Zl={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},Ql=e=>e.replace(/[!,[\]{}]/g,e=>Zl[e]);var $l=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+Ql(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&&Vl(e.contents)){let t={};Kl(e.contents,(e,n)=>{Vl(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
+ `)}};$l.defaultYaml={explicit:!1,version:`1.2`},$l.defaultTags={"!!":`tag:yaml.org,2002:`};function eu(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 tu(e){let t=new Set;return Kl(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function nu(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function ru(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=tu(e);let a=nu(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(z(t.node)||Bl(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 iu(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=iu(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=iu(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=iu(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=iu(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function au(e,t,n){if(Array.isArray(e))return e.map((e,t)=>au(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!Hl(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 ou=class{constructor(e){Object.defineProperty(this,Pl,{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(!Il(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=au(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?iu(i,{"":o},``,o):o}},su=class extends ou{constructor(e){super(Ol),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=[],Kl(e,{Node:(e,t)=>{(Fl(t)||Hl(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||=(au(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=cu(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(eu(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 cu(e,t,n){if(Fl(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(Bl(t)){let r=0;for(let i of t.items){let t=cu(e,i,n);t>r&&(r=t)}return r}if(Rl(t)){let r=cu(e,t.key,n),i=cu(e,t.value,n);return Math.max(r,i)}return 1}const lu=e=>!e||typeof e!=`function`&&typeof e!=`object`;var B=class extends ou{constructor(e){super(Ml),this.value=e}toJSON(e,t){return t?.keep?this.value:au(this.value,e,t)}toString(){return String(this.value)}};B.BLOCK_FOLDED=`BLOCK_FOLDED`,B.BLOCK_LITERAL=`BLOCK_LITERAL`,B.PLAIN=`PLAIN`,B.QUOTE_DOUBLE=`QUOTE_DOUBLE`,B.QUOTE_SINGLE=`QUOTE_SINGLE`;function uu(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(Il(e)&&(e=e.contents),Vl(e))return e;if(Rl(e)){let t=n.schema[Al].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 su(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=`tag:yaml.org,2002:`+t.slice(2));let l=uu(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new B(e);return c&&(c.node=t),t}l=e instanceof Map?o[Al]:Symbol.iterator in Object(e)?o[Nl]:o[Al]}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 B(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function fu(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})}const pu=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done;var mu=class extends ou{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=>Vl(t)||Rl(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(pu(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(Bl(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,fu(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(Bl(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&&z(i)?i.value:i:Bl(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Rl(t))return!1;let n=t.value;return n==null||e&&z(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 Bl(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(Bl(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,fu(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}};const hu=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function gu(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const _u=(e,t,n)=>e.endsWith(`
40
+ `)?gu(n,t):n.includes(`
41
41
  `)?`
42
- `+_u(n,t):(e.endsWith(` `)?``:` `)+n,yu=`flow`;function bu(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=xu(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=xu(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
42
+ `+gu(n,t):(e.endsWith(` `)?``:` `)+n,vu=`flow`;function yu(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=bu(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=bu(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
44
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 xu(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}const Su=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Cu=e=>/^(%|---|\.\.\.)/m.test(e);function wu(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 Tu(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(Cu(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)+`
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 bu(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}const xu=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Su=e=>/^(%|---|\.\.\.)/m.test(e);function Cu(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 wu(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(Su(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
48
 
49
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:bu(o,a,`quoted`,Su(t,!1))}function Eu(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
51
- `)||/[ \t]\n|\n[ \t]/.test(e))return Tu(e,t);let n=t.indent||(Cu(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:bu(r,n,yu,Su(t,!1))}function Du(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=Tu;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?Eu:i&&!t?Tu:n?Eu:Tu}return r(e,t)}let Ou;try{Ou=RegExp(`(^|(?<!
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:yu(o,a,`quoted`,xu(t,!1))}function Tu(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
51
+ `)||/[ \t]\n|\n[ \t]/.test(e))return wu(e,t);let n=t.indent||(Su(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:yu(r,n,vu,xu(t,!1))}function Eu(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=wu;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?Tu:i&&!t?wu:n?Tu:wu}return r(e,t)}let Du;try{Du=RegExp(`(^|(?<!
52
52
  ))
53
53
  +(?!
54
- |$)`,`g`)}catch{Ou=/\n+(?!\n|$)/g}function ku({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 Du(n,r);let l=r.indent||(r.forceBlockIndent||Cu(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===B.BLOCK_FOLDED?!1:t===B.BLOCK_LITERAL||!wu(n,c,l.length);if(!n)return u?`|
54
+ |$)`,`g`)}catch{Du=/\n+(?!\n|$)/g}function Ou({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 Eu(n,r);let l=r.indent||(r.forceBlockIndent||Su(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===B.BLOCK_FOLDED?!1:t===B.BLOCK_LITERAL||!Cu(n,c,l.length);if(!n)return u?`|
55
55
  `:`>
56
56
  `;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
57
57
  `&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
58
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(Ou,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
59
+ `&&(p=p.slice(0,-1)),p.replace(Du,`$&${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
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=Su(r,!0);o!==`folded`&&t!==B.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=bu(`${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 Au(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 Du(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
63
- `)?Du(a,t):ku(e,t,n,r);if(!s&&!u&&i!==B.PLAIN&&a.includes(`
64
- `))return ku(e,t,n,r);if(Cu(a)){if(c===``)return t.forceBlockIndent=!0,ku(e,t,n,r);if(s&&c===l)return Du(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 Du(a,t)}return s?d:bu(d,c,yu,Su(t,!1))}function ju(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!==B.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=B.QUOTE_DOUBLE);let c=e=>{switch(e){case B.BLOCK_FOLDED:case B.BLOCK_LITERAL:return i||a?Du(o.value,t):ku(o,t,n,r);case B.QUOTE_DOUBLE:return Tu(o.value,t);case B.QUOTE_SINGLE:return Eu(o.value,t);case B.PLAIN:return Au(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 Mu(e,t){let n=Object.assign({blockQuote:!0,commentString:gu,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 Nu(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(z(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 Pu(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(z(e)||Vl(e))&&e.anchor;a&&tu(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 Fu(e,t,n,r){if(zl(e))return e.toString(t,n,r);if(Il(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=Hl(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=Nu(t.doc.schema.tags,a);let o=Pu(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):z(a)?ju(a,t,n,r):a.toString(t,n,r);return o?z(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}\n${t.indent}${s}`:s}function Iu({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=Hl(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(Vl(e)||!Hl(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||Vl(e)||(z(e)?e.type===B.BLOCK_FOLDED||e.type===B.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=Fu(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+=vu(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=vu(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=vu(g,n.indent,l(f))));let _,v,y;Hl(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&&z(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&Bl(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=Fu(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
65
- `:``,v){let e=l(v);S+=`\n${_u(e,n.indent)}`}x===``&&!n.inFlow?S===`
61
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=xu(r,!0);o!==`folded`&&t!==B.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=yu(`${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 ku(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 Eu(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
63
+ `)?Eu(a,t):Ou(e,t,n,r);if(!s&&!u&&i!==B.PLAIN&&a.includes(`
64
+ `))return Ou(e,t,n,r);if(Su(a)){if(c===``)return t.forceBlockIndent=!0,Ou(e,t,n,r);if(s&&c===l)return Eu(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 Eu(a,t)}return s?d:yu(d,c,vu,xu(t,!1))}function Au(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!==B.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=B.QUOTE_DOUBLE);let c=e=>{switch(e){case B.BLOCK_FOLDED:case B.BLOCK_LITERAL:return i||a?Eu(o.value,t):Ou(o,t,n,r);case B.QUOTE_DOUBLE:return wu(o.value,t);case B.QUOTE_SINGLE:return Tu(o.value,t);case B.PLAIN:return ku(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 ju(e,t){let n=Object.assign({blockQuote:!0,commentString:hu,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 Mu(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(z(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 Nu(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(z(e)||Bl(e))&&e.anchor;a&&eu(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 Pu(e,t,n,r){if(Rl(e))return e.toString(t,n,r);if(Fl(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=Vl(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=Mu(t.doc.schema.tags,a);let o=Nu(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):z(a)?Au(a,t,n,r):a.toString(t,n,r);return o?z(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}\n${t.indent}${s}`:s}function Fu({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=Vl(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(Bl(e)||!Vl(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||Bl(e)||(z(e)?e.type===B.BLOCK_FOLDED||e.type===B.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=Pu(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+=_u(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=_u(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=_u(g,n.indent,l(f))));let _,v,y;Vl(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&&z(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&zl(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=Pu(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
65
+ `:``,v){let e=l(v);S+=`\n${gu(e,n.indent)}`}x===``&&!n.inFlow?S===`
66
66
  `&&y&&(S=`
67
67
 
68
- `):S+=`\n${n.indent}`}else if(!p&&Vl(t)){let e=x[0],r=x.indexOf(`
68
+ `):S+=`\n${n.indent}`}else if(!p&&Bl(t)){let e=x[0],r=x.indexOf(`
69
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+=vu(g,n.indent,l(y)):h&&i&&i(),g}function Lu(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}const Ru={identify:e=>e===`<<`||typeof e==`symbol`&&e.description===`<<`,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new B(Symbol(`<<`)),{addToJSMap:Bu}),stringify:()=>`<<`},zu=(e,t)=>(Ru.identify(t)||z(t)&&(!t.type||t.type===B.PLAIN)&&Ru.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===Ru.tag&&e.default);function Bu(e,t,n){let r=Hu(e,n);if(Bl(r))for(let n of r.items)Vu(e,t,n);else if(Array.isArray(r))for(let n of r)Vu(e,t,n);else Vu(e,t,r)}function Vu(e,t,n){let r=Hu(e,n);if(!Rl(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 Hu(e,t){return e&&Il(t)?t.resolve(e.doc,e):t}function Uu(e,t,{key:n,value:r}){if(Hl(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(zu(e,n))Bu(e,t,r);else{let i=ou(n,``,e);if(t instanceof Map)t.set(i,ou(r,i,e));else if(t instanceof Set)t.add(i);else{let a=Wu(n,i,e),o=ou(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function Wu(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(Hl(e)&&n?.doc){let t=Mu(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)+`..."`),Lu(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 Gu(e,t,n){return new Ku(fu(e,void 0,n),fu(t,void 0,n))}var Ku=class e{constructor(e,t=null){Object.defineProperty(this,Fl,{value:Ml}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return Hl(n)&&(n=n.clone(t)),Hl(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return Uu(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?Iu(this,e,t,n):JSON.stringify(this)}};function qu(e,t,n){return(t.inFlow??e.flow?Yu:Ju)(e,t,n)}function Ju({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(Hl(i))!d&&i.spaceBefore&&f.push(``),Xu(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(zl(i)){let e=Hl(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),Xu(n,f,e.commentBefore,d))}d=!1;let s=Fu(i,u,()=>o=null,()=>d=!0);o&&(s+=vu(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}`:`
70
+ `)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=_u(g,n.indent,l(y)):h&&i&&i(),g}function Iu(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}const Lu={identify:e=>e===`<<`||typeof e==`symbol`&&e.description===`<<`,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new B(Symbol(`<<`)),{addToJSMap:zu}),stringify:()=>`<<`},Ru=(e,t)=>(Lu.identify(t)||z(t)&&(!t.type||t.type===B.PLAIN)&&Lu.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===Lu.tag&&e.default);function zu(e,t,n){let r=Vu(e,n);if(zl(r))for(let n of r.items)Bu(e,t,n);else if(Array.isArray(r))for(let n of r)Bu(e,t,n);else Bu(e,t,r)}function Bu(e,t,n){let r=Vu(e,n);if(!Ll(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 Vu(e,t){return e&&Fl(t)?t.resolve(e.doc,e):t}function Hu(e,t,{key:n,value:r}){if(Vl(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(Ru(e,n))zu(e,t,r);else{let i=au(n,``,e);if(t instanceof Map)t.set(i,au(r,i,e));else if(t instanceof Set)t.add(i);else{let a=Uu(n,i,e),o=au(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function Uu(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(Vl(e)&&n?.doc){let t=ju(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)+`..."`),Iu(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 Wu(e,t,n){return new Gu(du(e,void 0,n),du(t,void 0,n))}var Gu=class e{constructor(e,t=null){Object.defineProperty(this,Pl,{value:jl}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return Vl(n)&&(n=n.clone(t)),Vl(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return Hu(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?Fu(this,e,t,n):JSON.stringify(this)}};function Ku(e,t,n){return(t.inFlow??e.flow?Ju:qu)(e,t,n)}function qu({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(Vl(i))!d&&i.spaceBefore&&f.push(``),Yu(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(Rl(i)){let e=Vl(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),Yu(n,f,e.commentBefore,d))}d=!1;let s=Pu(i,u,()=>o=null,()=>d=!0);o&&(s+=_u(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
71
  `}}return e?(p+=`
72
- `+_u(l(e),c),s&&s()):d&&o&&o(),p}function Yu({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(Hl(i))i.spaceBefore&&d.push(``),Xu(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(zl(i)){let e=Hl(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),Xu(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=Hl(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=Fu(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+=vu(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 Xu({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=_u(t(r),e);n.push(i.trimStart())}}function Zu(e,t){let n=z(t)?t.value:t;for(let r of e)if(zl(r)&&(r.key===t||r.key===n||z(r.key)&&r.key.value===n))return r}var Qu=class extends hu{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(jl,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(Gu(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=zl(e)?e:!e||typeof e!=`object`||!(`key`in e)?new Ku(e,e?.value):new Ku(e.key,e.value);let r=Zu(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);z(r.value)&&uu(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=Zu(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=Zu(this.items,e)?.value;return(!t&&z(n)?n.value:n)??void 0}has(e){return!!Zu(this.items,e)}set(e,t){this.add(new Ku(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)Uu(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!zl(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})),qu(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}};const $u={collection:`map`,default:!0,nodeClass:Qu,tag:`tag:yaml.org,2002:map`,resolve(e,t){return Rl(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>Qu.from(e,t,n)};var ed=class extends hu{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(Pl,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=td(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=td(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&z(r)?r.value:r}has(e){let t=td(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=td(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];z(r)&&uu(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(ou(e,String(r++),t));return n}toString(e,t,n){return e?qu(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(fu(a,void 0,n))}}return i}};function td(e){let t=z(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}const nd={collection:`seq`,default:!0,nodeClass:ed,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return Bl(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>ed.from(e,t,n)},rd={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),ju(e,t,n,r)}},id={identify:e=>e==null,createNode:()=>new B(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new B(null),stringify:({source:e},t)=>typeof e==`string`&&id.test.test(e)?e:t.options.nullStr},ad={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new B(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&ad.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function od({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}const 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:od},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():od(e)}},ld={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 B(parseFloat(e)),n=e.indexOf(`.`);return n!==-1&&e[e.length-1]===`0`&&(t.minFractionDigits=e.length-n-1),t},stringify:od},ud=e=>typeof e==`bigint`||Number.isInteger(e),dd=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function fd(e,t,n){let{value:r}=e;return ud(r)&&r>=0?n+r.toString(t):od(e)}const pd={identify:e=>ud(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o[0-7]+$/,resolve:(e,t,n)=>dd(e,2,8,n),stringify:e=>fd(e,8,`0o`)},md={identify:ud,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>dd(e,0,10,n),stringify:od},hd={identify:e=>ud(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>dd(e,2,16,n),stringify:e=>fd(e,16,`0x`)},gd=[$u,nd,rd,id,ad,pd,md,hd,sd,cd,ld];function _d(e){return typeof e==`bigint`||Number.isInteger(e)}const vd=({value:e})=>JSON.stringify(e),yd=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:vd},{identify:e=>e==null,createNode:()=>new B(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:vd},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:vd},{identify:_d,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})=>_d(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:vd}],bd=[$u,nd].concat(yd,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),xd={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??=B.BLOCK_LITERAL,t!==B.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===B.BLOCK_LITERAL?`
75
- `:` `)}return ju({comment:e,type:t,value:s},r,i,a)}};function Sd(e,t){if(Bl(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!zl(r)){if(Rl(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new Ku(new B(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]=zl(r)?r:new Ku(r)}}else t(`Expected a sequence for this tag`);return e}function Cd(e,t,n){let{replacer:r}=n,i=new ed(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(Gu(o,s,n))}return i}const wd={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:Sd,createNode:Cd};var Td=class e extends ed{constructor(){super(),this.add=Qu.prototype.add.bind(this),this.delete=Qu.prototype.delete.bind(this),this.get=Qu.prototype.get.bind(this),this.has=Qu.prototype.has.bind(this),this.set=Qu.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(zl(e)?(r=ou(e.key,``,t),i=ou(e.value,r,t)):r=ou(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=Cd(e,t,n),i=new this;return i.items=r.items,i}};Td.tag=`tag:yaml.org,2002:omap`;const Ed={collection:`seq`,identify:e=>e instanceof Map,nodeClass:Td,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=Sd(e,t),r=[];for(let{key:e}of n.items)z(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new Td,n)},createNode:(e,t,n)=>Td.from(e,t,n)};function Dd({value:e,source:t},n){return t&&(e?Od:kd).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const Od={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 B(!0),stringify:Dd},kd={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 B(!1),stringify:Dd},Ad={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:od},jd={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():od(e)}},Md={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 B(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:od},Nd=e=>typeof e==`bigint`||Number.isInteger(e);function Pd(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 Fd(e,t,n){let{value:r}=e;if(Nd(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return od(e)}const Id={identify:Nd,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Pd(e,2,2,n),stringify:e=>Fd(e,2,`0b`)},Ld={identify:Nd,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Pd(e,1,8,n),stringify:e=>Fd(e,8,`0`)},Rd={identify:Nd,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Pd(e,0,10,n),stringify:od},zd={identify:Nd,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Pd(e,2,16,n),stringify:e=>Fd(e,16,`0x`)};var Bd=class e extends Qu{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=zl(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new Ku(e.key,null):new Ku(e,null),Zu(this.items,t.key)||this.items.push(t)}get(e,t){let n=Zu(this.items,e);return!t&&zl(n)?z(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=Zu(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Ku(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(Gu(e,null,n));return i}};Bd.tag=`tag:yaml.org,2002:set`;const Vd={collection:`map`,identify:e=>e instanceof Set,nodeClass:Bd,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>Bd.from(e,t,n),resolve(e,t){if(Rl(e)){if(e.hasAllNullValues(!0))return Object.assign(new Bd,e);t(`Set items must all have null values`)}else t(`Expected a mapping for this tag`);return e}};function Hd(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 Ud(e){let{value:t}=e,n=e=>e;if(typeof t==`bigint`)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return od(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*$/,``)}const Wd={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})=>Hd(e,n),stringify:Ud},Gd={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=>Hd(e,!1),stringify:Ud},Kd={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(Kd.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=Hd(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$/,``)??``},qd=[$u,nd,rd,id,Od,kd,Id,Ld,Rd,zd,Ad,jd,Md,xd,Ru,Ed,wd,Vd,Wd,Gd,Kd],Jd=new Map([[`core`,gd],[`failsafe`,[$u,nd,rd]],[`json`,bd],[`yaml11`,qd],[`yaml-1.1`,qd]]),Yd={binary:xd,bool:ad,float:ld,floatExp:cd,floatNaN:sd,floatTime:Gd,int:md,intHex:hd,intOct:pd,intTime:Wd,map:$u,merge:Ru,null:id,omap:Ed,pairs:wd,seq:nd,set:Vd,timestamp:Kd},Xd={"tag:yaml.org,2002:binary":xd,"tag:yaml.org,2002:merge":Ru,"tag:yaml.org,2002:omap":Ed,"tag:yaml.org,2002:pairs":wd,"tag:yaml.org,2002:set":Vd,"tag:yaml.org,2002:timestamp":Kd};function Zd(e,t,n){let r=Jd.get(t);if(r&&!e)return n&&!r.includes(Ru)?r.concat(Ru):r.slice();let i=r;if(!i){if(Array.isArray(e))i=[];else{let e=Array.from(Jd.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(Ru)),i.reduce((e,t)=>{let n=typeof t==`string`?Yd[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(Yd).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}const Qd=(e,t)=>e.key<t.key?-1:+(e.key>t.key);var $d=class e{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?Zd(e,`compat`):e?Zd(null,e):null,this.name=typeof i==`string`&&i||`core`,this.knownTags=r?Xd:{},this.tags=Zd(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,jl,{value:$u}),Object.defineProperty(this,Nl,{value:rd}),Object.defineProperty(this,Pl,{value:nd}),this.sortMapEntries=typeof a==`function`?a:a===!0?Qd:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function ef(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=Mu(e,t),{commentString:a}=i.options;if(e.commentBefore){n.length!==1&&n.unshift(``);let t=a(e.commentBefore);n.unshift(_u(t,``))}let o=!1,s=null;if(e.contents){if(Hl(e.contents)){if(e.contents.spaceBefore&&r&&n.push(``),e.contents.commentBefore){let t=a(e.contents.commentBefore);n.push(_u(t,``))}i.forceBlockIndent=!!e.comment,s=e.contents.comment}let t=s?void 0:()=>o=!0,c=Fu(e.contents,i,()=>s=null,t);s&&(c+=vu(c,``,a(s))),(c[0]===`|`||c[0]===`>`)&&n[n.length-1]===`---`?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(Fu(e.contents,i));if(e.directives?.docEnd){if(e.comment){let t=a(e.comment);t.includes(`
76
- `)?(n.push(`...`),n.push(_u(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(_u(a(t),``)))}return n.join(`
72
+ `+gu(l(e),c),s&&s()):d&&o&&o(),p}function Ju({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(Vl(i))i.spaceBefore&&d.push(``),Yu(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(Rl(i)){let e=Vl(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),Yu(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=Vl(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=Pu(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+=_u(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 Yu({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=gu(t(r),e);n.push(i.trimStart())}}function Xu(e,t){let n=z(t)?t.value:t;for(let r of e)if(Rl(r)&&(r.key===t||r.key===n||z(r.key)&&r.key.value===n))return r}var Zu=class extends mu{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(Al,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(Wu(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=Rl(e)?e:!e||typeof e!=`object`||!(`key`in e)?new Gu(e,e?.value):new Gu(e.key,e.value);let r=Xu(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);z(r.value)&&lu(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=Xu(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=Xu(this.items,e)?.value;return(!t&&z(n)?n.value:n)??void 0}has(e){return!!Xu(this.items,e)}set(e,t){this.add(new Gu(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)Hu(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!Rl(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})),Ku(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}};const Qu={collection:`map`,default:!0,nodeClass:Zu,tag:`tag:yaml.org,2002:map`,resolve(e,t){return Ll(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>Zu.from(e,t,n)};var $u=class extends mu{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(Nl,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=ed(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=ed(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&z(r)?r.value:r}has(e){let t=ed(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=ed(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];z(r)&&lu(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(au(e,String(r++),t));return n}toString(e,t,n){return e?Ku(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 ed(e){let t=z(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}const td={collection:`seq`,default:!0,nodeClass:$u,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return zl(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>$u.from(e,t,n)},nd={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),Au(e,t,n,r)}},rd={identify:e=>e==null,createNode:()=>new B(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new B(null),stringify:({source:e},t)=>typeof e==`string`&&rd.test.test(e)?e:t.options.nullStr},id={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new B(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&id.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function ad({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}const od={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:ad},sd={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():ad(e)}},cd={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 B(parseFloat(e)),n=e.indexOf(`.`);return n!==-1&&e[e.length-1]===`0`&&(t.minFractionDigits=e.length-n-1),t},stringify:ad},ld=e=>typeof e==`bigint`||Number.isInteger(e),ud=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function dd(e,t,n){let{value:r}=e;return ld(r)&&r>=0?n+r.toString(t):ad(e)}const fd={identify:e=>ld(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o[0-7]+$/,resolve:(e,t,n)=>ud(e,2,8,n),stringify:e=>dd(e,8,`0o`)},pd={identify:ld,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>ud(e,0,10,n),stringify:ad},md={identify:e=>ld(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>ud(e,2,16,n),stringify:e=>dd(e,16,`0x`)},hd=[Qu,td,nd,rd,id,fd,pd,md,od,sd,cd];function gd(e){return typeof e==`bigint`||Number.isInteger(e)}const _d=({value:e})=>JSON.stringify(e),vd=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:_d},{identify:e=>e==null,createNode:()=>new B(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:_d},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:_d},{identify:gd,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})=>gd(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:_d}],yd=[Qu,td].concat(vd,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),bd={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??=B.BLOCK_LITERAL,t!==B.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===B.BLOCK_LITERAL?`
75
+ `:` `)}return Au({comment:e,type:t,value:s},r,i,a)}};function xd(e,t){if(zl(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!Rl(r)){if(Ll(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new Gu(new B(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]=Rl(r)?r:new Gu(r)}}else t(`Expected a sequence for this tag`);return e}function Sd(e,t,n){let{replacer:r}=n,i=new $u(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(Wu(o,s,n))}return i}const Cd={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:xd,createNode:Sd};var wd=class e extends $u{constructor(){super(),this.add=Zu.prototype.add.bind(this),this.delete=Zu.prototype.delete.bind(this),this.get=Zu.prototype.get.bind(this),this.has=Zu.prototype.has.bind(this),this.set=Zu.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(Rl(e)?(r=au(e.key,``,t),i=au(e.value,r,t)):r=au(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=Sd(e,t,n),i=new this;return i.items=r.items,i}};wd.tag=`tag:yaml.org,2002:omap`;const Td={collection:`seq`,identify:e=>e instanceof Map,nodeClass:wd,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=xd(e,t),r=[];for(let{key:e}of n.items)z(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new wd,n)},createNode:(e,t,n)=>wd.from(e,t,n)};function Ed({value:e,source:t},n){return t&&(e?Dd:Od).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const Dd={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 B(!0),stringify:Ed},Od={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 B(!1),stringify:Ed},kd={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:ad},Ad={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():ad(e)}},jd={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 B(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:ad},Md=e=>typeof e==`bigint`||Number.isInteger(e);function Nd(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 Pd(e,t,n){let{value:r}=e;if(Md(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return ad(e)}const Fd={identify:Md,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Nd(e,2,2,n),stringify:e=>Pd(e,2,`0b`)},Id={identify:Md,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Nd(e,1,8,n),stringify:e=>Pd(e,8,`0`)},Ld={identify:Md,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Nd(e,0,10,n),stringify:ad},Rd={identify:Md,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Nd(e,2,16,n),stringify:e=>Pd(e,16,`0x`)};var zd=class e extends Zu{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=Rl(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new Gu(e.key,null):new Gu(e,null),Xu(this.items,t.key)||this.items.push(t)}get(e,t){let n=Xu(this.items,e);return!t&&Rl(n)?z(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=Xu(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Gu(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(Wu(e,null,n));return i}};zd.tag=`tag:yaml.org,2002:set`;const Bd={collection:`map`,identify:e=>e instanceof Set,nodeClass:zd,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>zd.from(e,t,n),resolve(e,t){if(Ll(e)){if(e.hasAllNullValues(!0))return Object.assign(new zd,e);t(`Set items must all have null values`)}else t(`Expected a mapping for this tag`);return e}};function Vd(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 Hd(e){let{value:t}=e,n=e=>e;if(typeof t==`bigint`)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return ad(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*$/,``)}const Ud={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})=>Vd(e,n),stringify:Hd},Wd={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=>Vd(e,!1),stringify:Hd},Gd={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(Gd.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=Vd(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$/,``)??``},Kd=[Qu,td,nd,rd,Dd,Od,Fd,Id,Ld,Rd,kd,Ad,jd,bd,Lu,Td,Cd,Bd,Ud,Wd,Gd],qd=new Map([[`core`,hd],[`failsafe`,[Qu,td,nd]],[`json`,yd],[`yaml11`,Kd],[`yaml-1.1`,Kd]]),Jd={binary:bd,bool:id,float:cd,floatExp:sd,floatNaN:od,floatTime:Wd,int:pd,intHex:md,intOct:fd,intTime:Ud,map:Qu,merge:Lu,null:rd,omap:Td,pairs:Cd,seq:td,set:Bd,timestamp:Gd},Yd={"tag:yaml.org,2002:binary":bd,"tag:yaml.org,2002:merge":Lu,"tag:yaml.org,2002:omap":Td,"tag:yaml.org,2002:pairs":Cd,"tag:yaml.org,2002:set":Bd,"tag:yaml.org,2002:timestamp":Gd};function Xd(e,t,n){let r=qd.get(t);if(r&&!e)return n&&!r.includes(Lu)?r.concat(Lu):r.slice();let i=r;if(!i){if(Array.isArray(e))i=[];else{let e=Array.from(qd.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(Lu)),i.reduce((e,t)=>{let n=typeof t==`string`?Jd[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(Jd).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}const Zd=(e,t)=>e.key<t.key?-1:+(e.key>t.key);var Qd=class e{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?Xd(e,`compat`):e?Xd(null,e):null,this.name=typeof i==`string`&&i||`core`,this.knownTags=r?Yd:{},this.tags=Xd(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,Al,{value:Qu}),Object.defineProperty(this,Ml,{value:nd}),Object.defineProperty(this,Nl,{value:td}),this.sortMapEntries=typeof a==`function`?a:a===!0?Zd:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function $d(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=ju(e,t),{commentString:a}=i.options;if(e.commentBefore){n.length!==1&&n.unshift(``);let t=a(e.commentBefore);n.unshift(gu(t,``))}let o=!1,s=null;if(e.contents){if(Vl(e.contents)){if(e.contents.spaceBefore&&r&&n.push(``),e.contents.commentBefore){let t=a(e.contents.commentBefore);n.push(gu(t,``))}i.forceBlockIndent=!!e.comment,s=e.contents.comment}let t=s?void 0:()=>o=!0,c=Pu(e.contents,i,()=>s=null,t);s&&(c+=_u(c,``,a(s))),(c[0]===`|`||c[0]===`>`)&&n[n.length-1]===`---`?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(Pu(e.contents,i));if(e.directives?.docEnd){if(e.comment){let t=a(e.comment);t.includes(`
76
+ `)?(n.push(`...`),n.push(gu(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(gu(a(t),``)))}return n.join(`
77
77
  `)+`
78
- `}var tf=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Fl,{value:Al});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 eu({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[Fl]:{value:Al}});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=Hl(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){nf(this.contents)&&this.contents.add(e)}addIn(e,t){nf(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=nu(this);e.anchor=!t||n.has(t)?ru(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}=iu(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=fu(e,l,p);return o&&Vl(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new Ku(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return nf(this.contents)?this.contents.delete(e):!1}deleteIn(e){return mu(e)?this.contents!=null&&(this.contents=null,!0):nf(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return Vl(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return mu(e)?!t&&z(this.contents)?this.contents.value:this.contents:Vl(this.contents)?this.contents.getIn(e,t):void 0}has(e){return Vl(this.contents)?this.contents.has(e):!1}hasIn(e){return mu(e)?this.contents!==void 0:Vl(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=pu(this.schema,[e],t):nf(this.contents)&&this.contents.set(e,t)}setIn(e,t){mu(e)?this.contents=t:this.contents==null?this.contents=pu(this.schema,Array.from(e),t):nf(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 eu({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 eu({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 $d(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=ou(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`?au(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 ef(this,e)}};function nf(e){if(Vl(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var rf=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},af=class extends rf{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},of=class extends rf{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}};const 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 lf(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(lf(t.key)||lf(t.value))return!0}return!1;default:return!0}}function uf(e,t,n){if(t?.type===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&lf(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function df(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||z(e)&&z(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}const ff=`All mapping items must start at the same column`;function pf({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??Qu)(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`,ff)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+=`
81
- `+p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||lf(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`,ff);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&uf(r.indent,u,i),n.atKey=!1,df(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&&uf(r.indent,f,i),s=c.range[2];let l=new Ku(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 Ku(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 mf({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??ed)(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&&uf(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function hf(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}}const gf=`Block collections are not allowed within flow collections`,_f=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function vf({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new((a?.nodeClass)??(o?Qu:ed))(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&&lf(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];zl(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],_f(m)&&i(r.range,`BLOCK_IN_FLOW`,gf)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);_f(f)&&i(g.range,`BLOCK_IN_FLOW`,gf),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?_f(m)&&i(v.range,`BLOCK_IN_FLOW`,gf):_.comment&&(g.comment?g.comment+=`
85
- `+_.comment:g.comment=_.comment);let y=new Ku(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;df(n,e.items,g)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(y)}else{let e=new Qu(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=hf(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 yf(e,t,n,r,i,a){let o=n.type===`block-map`?pf(e,t,n,r,a):n.type===`block-seq`?mf(e,t,n,r,a):vf(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function bf(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===Qu.tagName&&s===`map`||o===ed.tagName&&s===`seq`)return yf(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),yf(e,t,n,i,o)}let l=yf(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a,`TAG_RESOLVE_FAILED`,e),t.options)??l,d=Hl(u)?u:new B(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function xf(e,t,n){let r=t.offset,i=Sf(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?B.BLOCK_FOLDED:B.BLOCK_LITERAL,o=t.source?Cf(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?`
78
+ `}var ef=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Pl,{value:kl});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 $l({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[Pl]:{value:kl}});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=Vl(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){tf(this.contents)&&this.contents.add(e)}addIn(e,t){tf(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=tu(this);e.anchor=!t||n.has(t)?nu(t||`a`,n):t}return new su(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}=ru(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&&Bl(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new Gu(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return tf(this.contents)?this.contents.delete(e):!1}deleteIn(e){return pu(e)?this.contents!=null&&(this.contents=null,!0):tf(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return Bl(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return pu(e)?!t&&z(this.contents)?this.contents.value:this.contents:Bl(this.contents)?this.contents.getIn(e,t):void 0}has(e){return Bl(this.contents)?this.contents.has(e):!1}hasIn(e){return pu(e)?this.contents!==void 0:Bl(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=fu(this.schema,[e],t):tf(this.contents)&&this.contents.set(e,t)}setIn(e,t){pu(e)?this.contents=t:this.contents==null?this.contents=fu(this.schema,Array.from(e),t):tf(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 $l({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 $l({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 Qd(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=au(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`?iu(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 $d(this,e)}};function tf(e){if(Bl(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var nf=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},rf=class extends nf{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},af=class extends nf{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}};const of=(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 sf(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 cf(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(cf(t.key)||cf(t.value))return!0}return!1;default:return!0}}function lf(e,t,n){if(t?.type===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&cf(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function uf(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||z(e)&&z(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}const df=`All mapping items must start at the same column`;function ff({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??Zu)(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=sf(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||cf(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&&lf(r.indent,u,i),n.atKey=!1,uf(n,o.items,g)&&i(h,`DUPLICATE_KEY`,`Map keys must be unique`);let _=sf(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&&lf(r.indent,f,i),s=c.range[2];let l=new Gu(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 Gu(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 pf({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??$u)(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=sf(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&&lf(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function mf(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}}const hf=`Block collections are not allowed within flow collections`,gf=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function _f({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new((a?.nodeClass)??(o?Zu:$u))(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=sf(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&&cf(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];Rl(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],gf(m)&&i(r.range,`BLOCK_IN_FLOW`,hf)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);gf(f)&&i(g.range,`BLOCK_IN_FLOW`,hf),n.atKey=!1;let _=sf(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?gf(m)&&i(v.range,`BLOCK_IN_FLOW`,hf):_.comment&&(g.comment?g.comment+=`
85
+ `+_.comment:g.comment=_.comment);let y=new Gu(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;uf(n,e.items,g)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(y)}else{let e=new Zu(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=mf(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 vf(e,t,n,r,i,a){let o=n.type===`block-map`?ff(e,t,n,r,a):n.type===`block-seq`?pf(e,t,n,r,a):_f(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function yf(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===Zu.tagName&&s===`map`||o===$u.tagName&&s===`seq`)return vf(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),vf(e,t,n,i,o)}let l=vf(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a,`TAG_RESOLVE_FAILED`,e),t.options)??l,d=Vl(u)?u:new B(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function bf(e,t,n){let r=t.offset,i=xf(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?B.BLOCK_FOLDED:B.BLOCK_LITERAL,o=t.source?Sf(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
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
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===B.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f=`
89
89
  `):t.length>c||r[0]===` `?(f===` `?f=`
@@ -98,50 +98,50 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
98
98
  `+o[e][0].slice(c);d[d.length-1]!==`
99
99
  `&&(d+=`
100
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 Sf({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 Cf(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 wf(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=B.PLAIN,c=Tf(a,l);break;case`single-quoted-scalar`:s=B.QUOTE_SINGLE,c=Ef(a,l);break;case`double-quoted-scalar`:s=B.QUOTE_DOUBLE,c=Of(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=hf(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function Tf(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}`),Df(e)}function Ef(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),Df(e.slice(1,-1)).replace(/''/g,`'`)}function Df(e){let t,n;try{t=RegExp(`(.*?)(?<![ ])[ ]*\r?
101
+ `}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function xf({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 Sf(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 Cf(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=B.PLAIN,c=wf(a,l);break;case`single-quoted-scalar`:s=B.QUOTE_SINGLE,c=Tf(a,l);break;case`double-quoted-scalar`:s=B.QUOTE_DOUBLE,c=Df(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=mf(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function wf(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}`),Ef(e)}function Tf(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),Ef(e.slice(1,-1)).replace(/''/g,`'`)}function Ef(e){let t,n;try{t=RegExp(`(.*?)(?<![ ])[ ]*\r?
102
102
  `,`sy`),n=RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
103
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
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 Of(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!==`\r`||e[r+1]!==`
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 Df(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!==`\r`||e[r+1]!==`
106
106
  `){if(i===`
107
- `){let{fold:t,offset:i}=kf(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=Af[i];if(a)n+=a;else if(i===`
107
+ `){let{fold:t,offset:i}=Of(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=kf[i];if(a)n+=a;else if(i===`
108
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+=jf(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!==`
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+=Af(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
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 kf(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
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 Of(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
112
112
  `||r===`\r`)&&(r!==`\r`||e[t+2]===`
113
113
  `);)r===`
114
114
  `&&(n+=`
115
- `),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}const Af={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
116
- `,r:`\r`,t:` `,v:`\v`,N:`…`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function jf(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 Mf(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?xf(e,t,r):wf(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[Nl]:c?Nf(e.schema,i,c,n,r):t.type===`scalar`?Pf(e,i,t,r):e.schema[Nl];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=z(a)?a:new B(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new B(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 Nf(e,t,n,r,i){if(n===`!`)return e[Nl];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[Nl])}function Pf({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[Nl];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[Nl];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 Ff(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}const If={composeNode:Lf,composeEmptyNode:Rf};function Lf(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=zf(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=Mf(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:try{l=bf(If,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??=Rf(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&&(!z(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 Rf(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=Mf(e,{type:`scalar`,offset:Ff(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 zf({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=hf(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function Bf(e,t,{offset:n,start:r,value:i,end:a},o){let s=new tf(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?Lf(c,i,l,o):Rf(c,l.end,r,null,l,o);let u=s.contents.range[2],d=hf(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function Vf(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 Hf(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?`
115
+ `),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}const kf={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
116
+ `,r:`\r`,t:` `,v:`\v`,N:`…`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function Af(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 jf(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?bf(e,t,r):Cf(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[Ml]:c?Mf(e.schema,i,c,n,r):t.type===`scalar`?Nf(e,i,t,r):e.schema[Ml];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=z(a)?a:new B(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new B(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 Mf(e,t,n,r,i){if(n===`!`)return e[Ml];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[Ml])}function Nf({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[Ml];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[Ml];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 Pf(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}const Ff={composeNode:If,composeEmptyNode:Lf};function If(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=Rf(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=jf(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:try{l=yf(Ff,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??=Lf(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&&(!z(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 Lf(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=jf(e,{type:`scalar`,offset:Pf(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 Rf({options:e},{offset:t,source:n,end:r},i){let a=new su(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=mf(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function zf(e,t,{offset:n,start:r,value:i,end:a},o){let s=new ef(void 0,Object.assign({_directives:t},e)),c={atKey:!1,atRoot:!0,directives:s.directives,options:s.options,schema:s.schema},l=sf(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?If(c,i,l,o):Lf(c,l.end,r,null,l,o);let u=s.contents.range[2],d=mf(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function Bf(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 Vf(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
117
 
118
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 Uf=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=Vf(e);r?this.warnings.push(new of(i,t,n)):this.errors.push(new af(i,t,n))},this.directives=new eu({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=Hf(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(Vl(i)&&!i.flow&&i.items.length>0){let e=i.items[0];zl(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:Hf(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=Vf(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=Bf(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 af(Vf(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 af(Vf(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=hf(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 af(Vf(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 tf(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}}};const Wf=e=>`type`in e?Gf(e):Kf(e);function Gf(e){switch(e.type){case`block-scalar`:{let t=``;for(let n of e.props)t+=Gf(n);return t+e.source}case`block-map`:case`block-seq`:{let t=``;for(let n of e.items)t+=Kf(n);return t}case`flow-collection`:{let t=e.start.source;for(let n of e.items)t+=Kf(n);for(let n of e.end)t+=n.source;return t}case`document`:{let t=Kf(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 Kf({start:e,key:t,sep:n,value:r}){let i=``;for(let t of e)i+=t.source;if(t&&(i+=Gf(t)),n)for(let e of n)i+=e.source;return r&&(i+=Gf(r)),i}const qf=Symbol(`break visit`),Jf=Symbol(`skip children`),Yf=Symbol(`remove item`);function Xf(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),Zf(Object.freeze([]),e,t)}Xf.BREAK=qf,Xf.SKIP=Jf,Xf.REMOVE=Yf,Xf.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},Xf.parentCollection=(e,t)=>{let n=Xf.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 Zf(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=Zf(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===qf)return qf;else r===Yf&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}const Qf=e=>!!e&&`items`in e,$f=e=>!!e&&(e.type===`scalar`||e.type===`single-quoted-scalar`||e.type===`double-quoted-scalar`||e.type===`block-scalar`);function ep(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`
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 Hf=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=Bf(e);r?this.warnings.push(new af(i,t,n)):this.errors.push(new rf(i,t,n))},this.directives=new $l({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=Vf(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(Bl(i)&&!i.flow&&i.items.length>0){let e=i.items[0];Rl(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:Vf(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=Bf(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=zf(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 rf(Bf(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 rf(Bf(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=mf(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 rf(Bf(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 ef(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}}};const Uf=e=>`type`in e?Wf(e):Gf(e);function Wf(e){switch(e.type){case`block-scalar`:{let t=``;for(let n of e.props)t+=Wf(n);return t+e.source}case`block-map`:case`block-seq`:{let t=``;for(let n of e.items)t+=Gf(n);return t}case`flow-collection`:{let t=e.start.source;for(let n of e.items)t+=Gf(n);for(let n of e.end)t+=n.source;return t}case`document`:{let t=Gf(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 Gf({start:e,key:t,sep:n,value:r}){let i=``;for(let t of e)i+=t.source;if(t&&(i+=Wf(t)),n)for(let e of n)i+=e.source;return r&&(i+=Wf(r)),i}const Kf=Symbol(`break visit`),qf=Symbol(`skip children`),Jf=Symbol(`remove item`);function Yf(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),Xf(Object.freeze([]),e,t)}Yf.BREAK=Kf,Yf.SKIP=qf,Yf.REMOVE=Jf,Yf.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},Yf.parentCollection=(e,t)=>{let n=Yf.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 Xf(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=Xf(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===Kf)return Kf;else r===Jf&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}const Zf=e=>!!e&&`items`in e,Qf=e=>!!e&&(e.type===`scalar`||e.type===`single-quoted-scalar`||e.type===`double-quoted-scalar`||e.type===`block-scalar`);function $f(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
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 tp(e){switch(e){case void 0:case` `:case`
122
- `:case`\r`:case` `:return!0;default:return!1}}const np=new Set(`0123456789ABCDEFabcdef`),rp=new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),ip=new Set(`,[]{}`),ap=new Set(` ,[]{}
123
- \r `),op=e=>!e||ap.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===`
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 ep(e){switch(e){case void 0:case` `:case`
122
+ `:case`\r`:case` `:return!0;default:return!1}}const tp=new Set(`0123456789ABCDEFabcdef`),np=new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),rp=new Set(`,[]{}`),ip=new Set(` ,[]{}
123
+ \r `),ap=e=>!e||ip.has(e);var op=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
124
  `||t===`\r`&&this.buffer[e+1]===`
125
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
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===`...`)&&tp(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===`...`)&&tp(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&&!tp(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===`:`)&&tp(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(op),`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(`...`))&&tp(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(op),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||tp(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(`
127
+ `||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&ep(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===`...`)&&ep(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&&!ep(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===`:`)&&ep(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(ap),`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(`...`))&&ep(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(ap),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||ep(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
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=>tp(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`
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=>ep(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
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
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
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
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(tp(r)||e&&ip.has(r))break;t=n}else if(tp(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
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(ep(r)||e&&rp.has(r))break;t=n}else if(ep(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
136
136
  `?(n+=1,r=`
137
- `,i=this.buffer[n+1]):t=n),i===`#`||e&&ip.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&&ip.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(op),e+=yield*this.pushSpaces(!0);continue loop;case`-`:case`?`:case`:`:{let t=this.flowLevel>0,n=this.charAt(1);if(tp(n)||t&&ip.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(;!tp(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(rp.has(t))t=this.buffer[++e];else if(t===`%`&&np.has(this.buffer[e+1])&&np.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===`
137
+ `,i=this.buffer[n+1]):t=n),i===`#`||e&&rp.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&&rp.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(ap),e+=yield*this.pushSpaces(!0);continue loop;case`-`:case`?`:case`:`:{let t=this.flowLevel>0,n=this.charAt(1);if(ep(n)||t&&rp.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(;!ep(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(np.has(t))t=this.buffer[++e];else if(t===`%`&&tp.has(this.buffer[e+1])&&tp.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
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 lp(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function up(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 dp(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 fp(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 pp(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 mp(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 hp(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!lp(t.start,`explicit-key-ind`)&&!lp(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,dp(t.value)?t.value.end?mp(t.value.end,t.sep):t.value.end=t.sep:mp(t.start,t.sep),delete t.sep)}var gp=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=ep(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`&&hp(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&&up(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`:up(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=pp(fp(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(`
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)}},sp=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 cp(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function lp(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 up(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 fp(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 pp(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 mp(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!cp(t.start,`explicit-key-ind`)&&!cp(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,up(t.value)?t.value.end?pp(t.value.end,t.sep):t.value.end=t.sep:pp(t.start,t.sep),delete t.sep)}var hp=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 op,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=$f(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`&&mp(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&&lp(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`:lp(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=fp(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
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)){mp(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(lp(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=pp(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(lp(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(dp(t.key)&&!lp(t.sep,`newline`)){let e=pp(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]}):lp(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&&!lp(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)){mp(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||lp(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=pp(fp(t));hp(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(`
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)){pp(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(cp(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=fp(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(cp(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(up(t.key)&&!cp(t.sep,`newline`)){let e=fp(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]}):cp(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&&!cp(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)){pp(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||cp(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=fp(dp(t));mp(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
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=pp(fp(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=pp(fp(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 _p(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new cp||null,prettyErrors:t}}function vp(e,t={}){let{lineCounter:n,prettyErrors:r}=_p(t),i=new gp(n?.addNewLine),a=new Uf(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 af(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 yp(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let i=vp(e,n);if(!i)return null;if(i.warnings.forEach(e=>Lu(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 bp(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 Ll(e)&&!r?e.toString(n):new tf(e,r,n).toString(n)}var xp=t({__parsePrettierYamlConfig:()=>$_,default:()=>Vp,languages:()=>ng,options:()=>ig,parsers:()=>ag,printers:()=>Q_}),Sp=Object.create,Cp=Object.defineProperty,wp=Object.getOwnPropertyDescriptor,Tp=Object.getOwnPropertyNames,Ep=Object.getPrototypeOf,Dp=Object.prototype.hasOwnProperty,Op=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),kp=(e,t)=>{for(var n in t)Cp(e,n,{get:t[n],enumerable:!0})},Ap=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of Tp(t))!Dp.call(e,i)&&i!==n&&Cp(e,i,{get:()=>t[i],enumerable:!(r=wp(t,i))||r.enumerable});return e},jp=(e,t,n)=>(n=e==null?{}:Sp(Ep(e)),Ap(t||!e||!e.__esModule?Cp(n,`default`,{value:e,enumerable:!0}):n,e)),Mp=Op(e=>{var t={ANCHOR:`&`,COMMENT:`#`,TAG:`!`,DIRECTIVES_END:`-`,DOCUMENT_END:`.`},n={ALIAS:`ALIAS`,BLANK_LINE:`BLANK_LINE`,BLOCK_FOLDED:`BLOCK_FOLDED`,BLOCK_LITERAL:`BLOCK_LITERAL`,COMMENT:`COMMENT`,DIRECTIVE:`DIRECTIVE`,DOCUMENT:`DOCUMENT`,FLOW_MAP:`FLOW_MAP`,FLOW_SEQ:`FLOW_SEQ`,MAP:`MAP`,MAP_KEY:`MAP_KEY`,MAP_VALUE:`MAP_VALUE`,PLAIN:`PLAIN`,QUOTE_DOUBLE:`QUOTE_DOUBLE`,QUOTE_SINGLE:`QUOTE_SINGLE`,SEQ:`SEQ`,SEQ_ITEM:`SEQ_ITEM`},r=`tag:yaml.org,2002:`,i={MAP:`tag:yaml.org,2002:map`,SEQ:`tag:yaml.org,2002:seq`,STR:`tag:yaml.org,2002:str`};function a(e){let t=[0],n=e.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=fp(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=fp(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 gp(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new sp||null,prettyErrors:t}}function _p(e,t={}){let{lineCounter:n,prettyErrors:r}=gp(t),i=new hp(n?.addNewLine),a=new Hf(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 rf(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(of(e,n)),o.warnings.forEach(of(e,n))),o}function vp(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let i=_p(e,n);if(!i)return null;if(i.warnings.forEach(e=>Iu(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 yp(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 Il(e)&&!r?e.toString(n):new ef(e,r,n).toString(n)}var bp=t({__parsePrettierYamlConfig:()=>Q_,default:()=>Bp,languages:()=>tg,options:()=>rg,parsers:()=>ig,printers:()=>Z_}),xp=Object.create,Sp=Object.defineProperty,Cp=Object.getOwnPropertyDescriptor,wp=Object.getOwnPropertyNames,Tp=Object.getPrototypeOf,Ep=Object.prototype.hasOwnProperty,Dp=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Op=(e,t)=>{for(var n in t)Sp(e,n,{get:t[n],enumerable:!0})},kp=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of wp(t))!Ep.call(e,i)&&i!==n&&Sp(e,i,{get:()=>t[i],enumerable:!(r=Cp(t,i))||r.enumerable});return e},Ap=(e,t,n)=>(n=e==null?{}:xp(Tp(e)),kp(t||!e||!e.__esModule?Sp(n,`default`,{value:e,enumerable:!0}):n,e)),jp=Dp(e=>{var t={ANCHOR:`&`,COMMENT:`#`,TAG:`!`,DIRECTIVES_END:`-`,DOCUMENT_END:`.`},n={ALIAS:`ALIAS`,BLANK_LINE:`BLANK_LINE`,BLOCK_FOLDED:`BLOCK_FOLDED`,BLOCK_LITERAL:`BLOCK_LITERAL`,COMMENT:`COMMENT`,DIRECTIVE:`DIRECTIVE`,DOCUMENT:`DOCUMENT`,FLOW_MAP:`FLOW_MAP`,FLOW_SEQ:`FLOW_SEQ`,MAP:`MAP`,MAP_KEY:`MAP_KEY`,MAP_VALUE:`MAP_VALUE`,PLAIN:`PLAIN`,QUOTE_DOUBLE:`QUOTE_DOUBLE`,QUOTE_SINGLE:`QUOTE_SINGLE`,SEQ:`SEQ`,SEQ_ITEM:`SEQ_ITEM`},r=`tag:yaml.org,2002:`,i={MAP:`tag:yaml.org,2002:map`,SEQ:`tag:yaml.org,2002:seq`,STR:`tag:yaml.org,2002:str`};function a(e){let t=[0],n=e.indexOf(`
145
145
  `);for(;n!==-1;)n+=1,t.push(n),n=e.indexOf(`
146
146
  `,n);return t}function o(e){let t,n;return typeof e==`string`?(t=a(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=a(e.context.src)),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function s(e,t){if(typeof e!=`number`||e<0)return null;let{lineStarts:n,src:r}=o(t);if(!n||!r||e>r.length)return null;for(let t=0;t<n.length;++t){let r=n[t];if(e<r)return{line:t,col:e-n[t-1]+1};if(e===r)return{line:t+1,col:1}}let i=n.length;return{line:i,col:e-n[i-1]+1}}function c(e,t){let{lineStarts:n,src:r}=o(t);if(!n||!(e>=1)||e>n.length)return null;let i=n[e-1],a=n[e];for(;a&&a>i&&r[a-1]===`
147
147
  `;)--a;return r.slice(i,a)}function l({start:e,end:t},n,r=80){let i=c(e.line,n);if(!i)return null;let{col:a}=e;if(i.length>r){if(a<=r-10)i=i.substr(0,r-1)+`…`;else{let e=Math.round(r/2);i.length>a+e&&(i=i.substr(0,a+e-1)+`…`),a-=i.length-r,i=`…`+i.substr(1-r)}}let o=1,s=``;t&&(t.line===e.line&&a+(t.col-e.col)<=r+1?o=t.col-e.col:(o=Math.min(i.length+1,r)-a,s=`…`));let l=a>1?` `.repeat(a-1):``,u=`^`.repeat(o);return`${i}
@@ -175,7 +175,7 @@ ${r}
175
175
  `&&(i+=r>a?n.slice(a,r+1):e)}else i+=e}let a=n[e];switch(a){case` `:return{errors:[new m(this,`Plain value cannot start with a tab character`)],str:i};case`@`:case"`":{let e=`Plain value cannot start with reserved character ${a}`;return{errors:[new m(this,e)],str:i}}default:return i}}parseBlockValue(t){let{indent:n,inFlow:r,src:i}=this.context,a=t,o=t;for(let t=i[a];t===`
176
176
  `&&!d.atDocumentBoundary(i,a+1);t=i[a]){let t=d.endOfBlockIndent(i,n,a+1);if(t===null||i[t]===`#`)break;i[t]===`
177
177
  `?a=t:(o=e.endOfLine(i,t,r),a=o)}return this.valueRange.isEmpty()&&(this.valueRange.start=t),this.valueRange.end=o,o}parse(t,n){this.context=t;let{inFlow:r,src:i}=t,a=n,o=i[a];return o&&o!==`#`&&o!==`
178
- `&&(a=e.endOfLine(i,n,r)),this.valueRange=new u(n,a),a=d.endOfWhiteSpace(i,a),a=this.parseComment(a),(!this.hasComment||this.valueRange.isEmpty())&&(a=this.parseBlockValue(a)),a}};e.Char=t,e.Node=d,e.PlainValue=v,e.Range=u,e.Type=n,e.YAMLError=f,e.YAMLReferenceError=p,e.YAMLSemanticError=m,e.YAMLSyntaxError=h,e.YAMLWarning=g,e._defineProperty=_,e.defaultTagPrefix=r,e.defaultTags=i}),Np=Op(e=>{var t=Mp(),n=class extends t.Node{constructor(){super(t.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,n){return this.context=e,this.range=new t.Range(n,n+1),n+1}},r=class extends t.Node{constructor(e,t){super(e,t),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,r){this.context=e;let{parseNode:i,src:a}=e,{atLineStart:o,lineStart:s}=e;!o&&this.type===t.Type.SEQ_ITEM&&(this.error=new t.YAMLSemanticError(this,`Sequence items must not have preceding content on the same line`));let c=o?r-s:e.indent,l=t.Node.endOfWhiteSpace(a,r+1),u=a[l],d=u===`#`,f=[],p=null;for(;u===`
178
+ `&&(a=e.endOfLine(i,n,r)),this.valueRange=new u(n,a),a=d.endOfWhiteSpace(i,a),a=this.parseComment(a),(!this.hasComment||this.valueRange.isEmpty())&&(a=this.parseBlockValue(a)),a}};e.Char=t,e.Node=d,e.PlainValue=v,e.Range=u,e.Type=n,e.YAMLError=f,e.YAMLReferenceError=p,e.YAMLSemanticError=m,e.YAMLSyntaxError=h,e.YAMLWarning=g,e._defineProperty=_,e.defaultTagPrefix=r,e.defaultTags=i}),Mp=Dp(e=>{var t=jp(),n=class extends t.Node{constructor(){super(t.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,n){return this.context=e,this.range=new t.Range(n,n+1),n+1}},r=class extends t.Node{constructor(e,t){super(e,t),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,r){this.context=e;let{parseNode:i,src:a}=e,{atLineStart:o,lineStart:s}=e;!o&&this.type===t.Type.SEQ_ITEM&&(this.error=new t.YAMLSemanticError(this,`Sequence items must not have preceding content on the same line`));let c=o?r-s:e.indent,l=t.Node.endOfWhiteSpace(a,r+1),u=a[l],d=u===`#`,f=[],p=null;for(;u===`
179
179
  `||u===`#`;){if(u===`#`){let e=t.Node.endOfLine(a,l+1);f.push(new t.Range(l,e)),l=e}else o=!0,s=l+1,a[t.Node.endOfWhiteSpace(a,s)]===`
180
180
  `&&f.length===0&&(p=new n,s=p.parse({src:a},s)),l=t.Node.endOfIndent(a,s);u=a[l]}if(t.Node.nextNodeIsIndented(u,l-(s+c),this.type!==t.Type.SEQ_ITEM)?this.node=i({atLineStart:o,inCollection:!1,indent:c,lineStart:s,parent:this},l):u&&s>r+1&&(l=s-1),this.node){if(p){let t=e.parent.items||e.parent.contents;t&&t.push(p)}f.length&&Array.prototype.push.apply(this.props,f),l=this.node.range.end}else if(d){let e=f[0];this.props.push(e),l=e.end}else l=t.Node.endOfLine(a,r+1);let m=this.node?this.node.valueRange.end:l;return this.valueRange=new t.Range(r,m),l}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.node?this.node.setOrigRanges(e,t):t}toString(){let{context:{src:e},node:n,range:r,value:i}=this;if(i!=null)return i;let a=n?e.slice(r.start,n.range.start)+String(n):e.slice(r.start,r.end);return t.Node.addStringTerminator(e,r.end,a)}},i=class extends t.Node{constructor(){super(t.Type.COMMENT)}parse(e,n){this.context=e;let r=this.parseComment(n);return this.range=new t.Range(n,r),r}};function a(e){let n=e;for(;n instanceof r;)n=n.node;if(!(n instanceof o))return null;let i=n.items.length,a=-1;for(let e=i-1;e>=0;--e){let r=n.items[e];if(r.type===t.Type.COMMENT){let{indent:t,lineStart:n}=r.context;if(t>0&&r.range.start>=n+t)break;a=e}else if(r.type===t.Type.BLANK_LINE)a=e;else break}if(a===-1)return null;let s=n.items.splice(a,i-a),c=s[0].range.start;for(;n.range.end=c,n.valueRange&&n.valueRange.end>c&&(n.valueRange.end=c),n!==e;)n=n.context.parent;return s}var o=class e extends t.Node{static nextContentHasIndent(n,r,i){let a=t.Node.endOfLine(n,r)+1;r=t.Node.endOfWhiteSpace(n,a);let o=n[r];return o?r>=a+i?!0:o!==`#`&&o!==`
181
181
  `?!1:e.nextContentHasIndent(n,r,i):!1}constructor(e){super(e.type===t.Type.SEQ_ITEM?t.Type.SEQ:t.Type.MAP);for(let t=e.props.length-1;t>=0;--t)if(e.props[t].start<e.context.lineStart){this.props=e.props.slice(0,t+1),e.props=e.props.slice(t+1);let n=e.props[0]||e.valueRange;e.range.start=n.start;break}this.items=[e];let n=a(e);n&&Array.prototype.push.apply(this.items,n)}get includesTrailingLines(){return this.items.length>0}parse(r,o){this.context=r;let{parseNode:s,src:c}=r,l=t.Node.startOfLine(c,o),u=this.items[0];u.context.parent=this,this.valueRange=t.Range.copy(u.valueRange);let d=u.range.start-u.context.lineStart,f=o;f=t.Node.normalizeOffset(c,f);let p=c[f],m=t.Node.endOfWhiteSpace(c,l)===f,h=!1;for(;p;){for(;p===`
@@ -227,7 +227,7 @@ ${r}
227
227
  `){let e=n,r;do r=e+1,e=t.Node.endOfIndent(a,r);while(a[e]===`
228
228
  `);let o=e-(r+this.indent),c=i.type===t.Type.SEQ_ITEM&&i.context.atLineStart;if(a[e]!==`#`&&!t.Node.nextNodeIsIndented(a[e],o,!c))break;this.atLineStart=!0,this.lineStart=r,s=!1,n=e}else if(c===t.Char.COMMENT){let e=t.Node.endOfLine(a,n+1);o.push(new t.Range(n,e)),n=e}else{let e=t.Node.endOfIdentifier(a,n+1);c===t.Char.TAG&&a[e]===`,`&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(a.slice(n+1,e+13))&&(e=t.Node.endOfIdentifier(a,e+5)),o.push(new t.Range(n,e)),s=!0,n=t.Node.endOfWhiteSpace(a,e)}c=a[n]}return s&&c===`:`&&t.Node.atBlank(a,n+1,!0)&&--n,{props:o,type:e.parseType(a,n,r),valueStart:n}}};function _(e){let t=[];e.indexOf(`\r`)!==-1&&(e=e.replace(/\r\n?/g,(e,n)=>(e.length>1&&t.push(n),`
229
229
  `)));let n=[],r=0;do{let t=new c,i=new g({src:e});r=t.parse(i,r),n.push(t)}while(r<e.length);return n.setOrigRanges=()=>{if(t.length===0)return!1;for(let e=1;e<t.length;++e)t[e]-=e;let e=0;for(let r=0;r<n.length;++r)e=n[r].setOrigRanges(t,e);return t.splice(0,t.length),!0},n.toString=()=>n.join(`...
230
- `),n}e.parse=_}),Pp=Op(e=>{var t=Mp();function n(e,t,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${t}#`)}
230
+ `),n}e.parse=_}),Np=Dp(e=>{var t=jp();function n(e,t,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${t}#`)}
231
231
  ${t}${e}`:e}function r(e,t,n){return n?n.indexOf(`
232
232
  `)===-1?`${e} #${n}`:`${e}
233
233
  `+n.replace(/^/gm,`${t||``}#`):e}var i=class{};function a(e,t,n){if(Array.isArray(e))return e.map((e,t)=>a(e,String(t),n));if(e&&typeof e.toJSON==`function`){let r=n&&n.anchors&&n.anchors.get(e);r&&(n.onCreate=e=>{r.res=e,delete n.onCreate});let i=e.toJSON(t,n);return r&&n.onCreate&&n.onCreate(i),i}return(!n||!n.keep)&&typeof e==`bigint`?Number(e):e}var o=class extends i{constructor(e){super(),this.value=e}toJSON(e,t){return t&&t.keep?this.value:a(this.value,e,t)}toString(){return String(this.value)}};function s(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else{let e={};Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=e}}return e.createNode(r,!1)}var c=e=>e==null||typeof e==`object`&&e[Symbol.iterator]().next().done,l=class e extends i{constructor(e){super(),t._defineProperty(this,`items`,[]),this.schema=e}addIn(t,n){if(c(t))this.add(n);else{let[r,...i]=t,a=this.get(r,!0);if(a instanceof e)a.addIn(i,n);else if(a===void 0&&this.schema)this.set(r,s(this.schema,i,n));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn([t,...n]){if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(r instanceof e)return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn([t,...n],r){let i=this.get(t,!0);return n.length===0?!r&&i instanceof o?i.value:i:i instanceof e?i.getIn(n,r):void 0}hasAllNullValues(){return this.items.every(e=>{if(!e||e.type!==`PAIR`)return!1;let t=e.value;return t==null||t instanceof o&&t.value==null&&!t.commentBefore&&!t.comment&&!t.tag})}hasIn([t,...n]){if(n.length===0)return this.has(t);let r=this.get(t,!0);return r instanceof e&&r.hasIn(n)}setIn([t,...n],r){if(n.length===0)this.set(t,r);else{let i=this.get(t,!0);if(i instanceof e)i.setIn(n,r);else if(i===void 0&&this.schema)this.set(t,s(this.schema,n,r));else throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}}toJSON(){return null}toString(n,{blockItem:i,flowChars:a,isMap:o,itemIndent:s},c,l){let{indent:u,indentStep:d,stringify:f}=n,p=this.type===t.Type.FLOW_MAP||this.type===t.Type.FLOW_SEQ||n.inFlow;p&&(s+=d);let m=o&&this.hasAllNullValues();n=Object.assign({},n,{allNullValues:m,indent:s,inFlow:p,type:null});let h=!1,g=!1,_=this.items.reduce((e,t,i)=>{let a;t&&(!h&&t.spaceBefore&&e.push({type:`comment`,str:``}),t.commentBefore&&t.commentBefore.match(/^.*$/gm).forEach(t=>{e.push({type:`comment`,str:`#${t}`})}),t.comment&&(a=t.comment),p&&(!h&&t.spaceBefore||t.commentBefore||t.comment||t.key&&(t.key.commentBefore||t.key.comment)||t.value&&(t.value.commentBefore||t.value.comment))&&(g=!0)),h=!1;let o=f(t,n,()=>a=null,()=>h=!0);return p&&!g&&o.includes(`
@@ -275,10 +275,10 @@ ${t}`:t);let i=r.after.join(`
275
275
  `);i&&(o.comment=o.comment?`${o.comment}
276
276
  ${i}`:i)}return n.resolved=o}function Te(e,n){if(n.type!==t.Type.MAP&&n.type!==t.Type.FLOW_MAP){let r=`A ${n.type} node cannot be resolved as a mapping`;return e.errors.push(new t.YAMLSyntaxError(n,r)),null}let{comments:r,items:i}=n.type===t.Type.FLOW_MAP?ke(e,n):Oe(e,n),a=new _;a.items=i,me(a,r);let o=!1;for(let r=0;r<i.length;++r){let{key:a}=i[r];if(a instanceof l&&(o=!0),e.schema.merge&&a&&a.value===v){i[r]=new y(i[r]);let a=i[r].value.items,o=null;a.some(e=>{if(e instanceof h){let{type:n}=e.source;return n===t.Type.MAP||n===t.Type.FLOW_MAP?!1:o=`Merge nodes aliases can only point to maps`}return o=`Merge nodes can only have Alias nodes as values`}),o&&e.errors.push(new t.YAMLSemanticError(n,o))}else for(let o=r+1;o<i.length;++o){let{key:r}=i[o];if(a===r||a&&r&&Object.prototype.hasOwnProperty.call(a,`value`)&&a.value===r.value){let r=`Map keys must be unique; "${a}" is repeated`;e.errors.push(new t.YAMLSemanticError(n,r));break}}}return o&&!e.options.mapAsMap&&e.warnings.push(new t.YAMLWarning(n,`Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.`)),n.resolved=a,a}var Ee=({context:{lineStart:e,node:n,src:r},props:i})=>{if(i.length===0)return!1;let{start:a}=i[0];if(n&&a>n.valueRange.start||r[a]!==t.Char.COMMENT)return!1;for(let t=e;t<a;++t)if(r[t]===`
277
277
  `)return!1;return!0};function De(e,n){if(!Ee(e))return;let r=e.getPropValue(0,t.Char.COMMENT,!0),i=!1,a=n.value.commentBefore;if(a&&a.startsWith(r))n.value.commentBefore=a.substr(r.length+1),i=!0;else{let t=n.value.comment;!e.node&&t&&t.startsWith(r)&&(n.value.comment=t.substr(r.length+1),i=!0)}i&&(n.comment=r)}function Oe(e,n){let r=[],i=[],a,o=null;for(let s=0;s<n.items.length;++s){let c=n.items[s];switch(c.type){case t.Type.BLANK_LINE:r.push({afterKey:!!a,before:i.length});break;case t.Type.COMMENT:r.push({afterKey:!!a,before:i.length,comment:c.comment});break;case t.Type.MAP_KEY:a!==void 0&&i.push(new p(a)),c.error&&e.errors.push(c.error),a=we(e,c.node),o=null;break;case t.Type.MAP_VALUE:{a===void 0&&(a=null),c.error&&e.errors.push(c.error),!c.context.atLineStart&&c.node&&c.node.type===t.Type.MAP&&!c.node.context.atLineStart&&e.errors.push(new t.YAMLSemanticError(c.node,`Nested mappings are not allowed in compact mappings`));let r=c.node;if(!r&&c.props.length>0){r=new t.PlainValue(t.Type.PLAIN,[]),r.context={parent:c,src:c.context.src};let e=c.range.start+1;if(r.range={start:e,end:e},r.valueRange={start:e,end:e},typeof c.range.origStart==`number`){let e=c.range.origStart+1;r.range.origStart=r.range.origEnd=e,r.valueRange.origStart=r.valueRange.origEnd=e}}let s=new p(a,we(e,r));De(c,s),i.push(s),a&&typeof o==`number`&&c.range.start>o+1024&&e.errors.push(pe(n,a)),a=void 0,o=null}break;default:a!==void 0&&i.push(new p(a)),a=we(e,c),o=c.range.start,c.error&&e.errors.push(c.error);e:for(let r=s+1;;++r){let i=n.items[r];switch(i&&i.type){case t.Type.BLANK_LINE:case t.Type.COMMENT:continue e;case t.Type.MAP_VALUE:break e;default:e.errors.push(new t.YAMLSemanticError(c,`Implicit map keys need to be followed by map values`));break e}}c.valueRangeContainsNewline&&e.errors.push(new t.YAMLSemanticError(c,`Implicit map keys need to be on a single line`))}}return a!==void 0&&i.push(new p(a)),{comments:r,items:i}}function ke(e,n){let r=[],i=[],a,o=!1,s=`{`;for(let c=0;c<n.items.length;++c){let l=n.items[c];if(typeof l.char==`string`){let{char:r,offset:u}=l;if(r===`?`&&a===void 0&&!o){o=!0,s=`:`;continue}if(r===`:`){if(a===void 0&&(a=null),s===`:`){s=`,`;continue}}else if(o&&=(a===void 0&&r!==`,`&&(a=null),!1),a!==void 0&&(i.push(new p(a)),a=void 0,r===`,`)){s=`:`;continue}if(r===`}`){if(c===n.items.length-1)continue}else if(r===s){s=`:`;continue}let d=`Flow map contains an unexpected ${r}`,f=new t.YAMLSyntaxError(n,d);f.offset=u,e.errors.push(f)}else l.type===t.Type.BLANK_LINE?r.push({afterKey:!!a,before:i.length}):l.type===t.Type.COMMENT?(fe(e.errors,l),r.push({afterKey:!!a,before:i.length,comment:l.comment})):a===void 0?(s===`,`&&e.errors.push(new t.YAMLSemanticError(l,`Separator , missing in flow map`)),a=we(e,l)):(s!==`,`&&e.errors.push(new t.YAMLSemanticError(l,`Indicator : missing in flow map entry`)),i.push(new p(a,we(e,l))),a=void 0,o=!1)}return de(e.errors,n),a!==void 0&&i.push(new p(a)),{comments:r,items:i}}function Ae(e,n){if(n.type!==t.Type.SEQ&&n.type!==t.Type.FLOW_SEQ){let r=`A ${n.type} node cannot be resolved as a sequence`;return e.errors.push(new t.YAMLSyntaxError(n,r)),null}let{comments:r,items:i}=n.type===t.Type.FLOW_SEQ?Me(e,n):je(e,n),a=new d;return a.items=i,me(a,r),!e.options.mapAsMap&&i.some(e=>e instanceof p&&e.key instanceof l)&&e.warnings.push(new t.YAMLWarning(n,`Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.`)),n.resolved=a,a}function je(e,n){let r=[],i=[];for(let a=0;a<n.items.length;++a){let o=n.items[a];switch(o.type){case t.Type.BLANK_LINE:r.push({before:i.length});break;case t.Type.COMMENT:r.push({comment:o.comment,before:i.length});break;case t.Type.SEQ_ITEM:o.error&&e.errors.push(o.error),i.push(we(e,o.node)),o.hasProps&&e.errors.push(new t.YAMLSemanticError(o,`Sequence items cannot have tags or anchors before the - indicator`));break;default:o.error&&e.errors.push(o.error),e.errors.push(new t.YAMLSyntaxError(o,`Unexpected ${o.type} node in sequence`))}}return{comments:r,items:i}}function Me(e,n){let r=[],i=[],a=!1,o,s=null,c=`[`,l=null;for(let u=0;u<n.items.length;++u){let d=n.items[u];if(typeof d.char==`string`){let{char:r,offset:f}=d;if(r!==`:`&&(a||o!==void 0)&&(a&&o===void 0&&(o=c?i.pop():null),i.push(new p(o)),a=!1,o=void 0,s=null),r===c)c=null;else if(!c&&r===`?`)a=!0;else if(c!==`[`&&r===`:`&&o===void 0){if(c===`,`){if(o=i.pop(),o instanceof p){let r=new t.YAMLSemanticError(n,`Chaining flow sequence pairs is invalid`);r.offset=f,e.errors.push(r)}if(!a&&typeof s==`number`){let r=d.range?d.range.start:d.offset;r>s+1024&&e.errors.push(pe(n,o));let{src:i}=l.context;for(let n=s;n<r;++n)if(i[n]===`
278
- `){e.errors.push(new t.YAMLSemanticError(l,`Implicit keys of flow sequence pairs need to be on a single line`));break}}}else o=null;s=null,a=!1,c=null}else if(c===`[`||r!==`]`||u<n.items.length-1){let i=`Flow sequence contains an unexpected ${r}`,a=new t.YAMLSyntaxError(n,i);a.offset=f,e.errors.push(a)}}else if(d.type===t.Type.BLANK_LINE)r.push({before:i.length});else if(d.type===t.Type.COMMENT)fe(e.errors,d),r.push({comment:d.comment,before:i.length});else{if(c){let n=`Expected a ${c} in flow sequence`;e.errors.push(new t.YAMLSemanticError(d,n))}let n=we(e,d);o===void 0?(i.push(n),l=d):(i.push(new p(o,n)),o=void 0),s=d.range.start,c=`,`}}return de(e.errors,n),o!==void 0&&i.push(new p(o)),{comments:r,items:i}}e.Alias=h,e.Collection=l,e.Merge=y,e.Node=i,e.Pair=p,e.Scalar=o,e.YAMLMap=_,e.YAMLSeq=d,e.addComment=r,e.binaryOptions=b,e.boolOptions=x,e.findPair=g,e.intOptions=S,e.isEmptyPath=c,e.nullOptions=C,e.resolveMap=Te,e.resolveNode=we,e.resolveSeq=Ae,e.resolveString=he,e.strOptions=w,e.stringifyNumber=ue,e.stringifyString=le,e.toJSON=a}),Fp=Op(e=>{var t=Mp(),n=Pp(),r={identify:e=>e instanceof Uint8Array,default:!1,tag:`tag:yaml.org,2002:binary`,resolve:(e,r)=>{let i=n.resolveString(e,r);if(typeof Buffer==`function`)return Buffer.from(i,`base64`);if(typeof atob==`function`){let e=atob(i.replace(/[\n\r]/g,``)),t=new Uint8Array(e.length);for(let n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}return e.errors.push(new t.YAMLReferenceError(r,`This environment does not support reading binary tags; either Buffer or atob is required`)),null},options:n.binaryOptions,stringify:({comment:e,type:r,value:i},a,o,s)=>{let c;if(typeof Buffer==`function`)c=i instanceof Buffer?i.toString(`base64`):Buffer.from(i.buffer).toString(`base64`);else if(typeof btoa==`function`){let e=``;for(let t=0;t<i.length;++t)e+=String.fromCharCode(i[t]);c=btoa(e)}else throw Error(`This environment does not support writing binary tags; either Buffer or btoa is required`);if(r||=n.binaryOptions.defaultType,r===t.Type.QUOTE_DOUBLE)i=c;else{let{lineWidth:e}=n.binaryOptions,a=Math.ceil(c.length/e),o=Array(a);for(let t=0,n=0;t<a;++t,n+=e)o[t]=c.substr(n,e);i=o.join(r===t.Type.BLOCK_LITERAL?`
278
+ `){e.errors.push(new t.YAMLSemanticError(l,`Implicit keys of flow sequence pairs need to be on a single line`));break}}}else o=null;s=null,a=!1,c=null}else if(c===`[`||r!==`]`||u<n.items.length-1){let i=`Flow sequence contains an unexpected ${r}`,a=new t.YAMLSyntaxError(n,i);a.offset=f,e.errors.push(a)}}else if(d.type===t.Type.BLANK_LINE)r.push({before:i.length});else if(d.type===t.Type.COMMENT)fe(e.errors,d),r.push({comment:d.comment,before:i.length});else{if(c){let n=`Expected a ${c} in flow sequence`;e.errors.push(new t.YAMLSemanticError(d,n))}let n=we(e,d);o===void 0?(i.push(n),l=d):(i.push(new p(o,n)),o=void 0),s=d.range.start,c=`,`}}return de(e.errors,n),o!==void 0&&i.push(new p(o)),{comments:r,items:i}}e.Alias=h,e.Collection=l,e.Merge=y,e.Node=i,e.Pair=p,e.Scalar=o,e.YAMLMap=_,e.YAMLSeq=d,e.addComment=r,e.binaryOptions=b,e.boolOptions=x,e.findPair=g,e.intOptions=S,e.isEmptyPath=c,e.nullOptions=C,e.resolveMap=Te,e.resolveNode=we,e.resolveSeq=Ae,e.resolveString=he,e.strOptions=w,e.stringifyNumber=ue,e.stringifyString=le,e.toJSON=a}),Pp=Dp(e=>{var t=jp(),n=Np(),r={identify:e=>e instanceof Uint8Array,default:!1,tag:`tag:yaml.org,2002:binary`,resolve:(e,r)=>{let i=n.resolveString(e,r);if(typeof Buffer==`function`)return Buffer.from(i,`base64`);if(typeof atob==`function`){let e=atob(i.replace(/[\n\r]/g,``)),t=new Uint8Array(e.length);for(let n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}return e.errors.push(new t.YAMLReferenceError(r,`This environment does not support reading binary tags; either Buffer or atob is required`)),null},options:n.binaryOptions,stringify:({comment:e,type:r,value:i},a,o,s)=>{let c;if(typeof Buffer==`function`)c=i instanceof Buffer?i.toString(`base64`):Buffer.from(i.buffer).toString(`base64`);else if(typeof btoa==`function`){let e=``;for(let t=0;t<i.length;++t)e+=String.fromCharCode(i[t]);c=btoa(e)}else throw Error(`This environment does not support writing binary tags; either Buffer or btoa is required`);if(r||=n.binaryOptions.defaultType,r===t.Type.QUOTE_DOUBLE)i=c;else{let{lineWidth:e}=n.binaryOptions,a=Math.ceil(c.length/e),o=Array(a);for(let t=0,n=0;t<a;++t,n+=e)o[t]=c.substr(n,e);i=o.join(r===t.Type.BLOCK_LITERAL?`
279
279
  `:` `)}return n.stringifyString({comment:e,type:r,value:i},a,o,s)}};function i(e,r){let i=n.resolveSeq(e,r);for(let e=0;e<i.items.length;++e){let a=i.items[e];if(!(a instanceof n.Pair)){if(a instanceof n.YAMLMap){if(a.items.length>1)throw new t.YAMLSemanticError(r,`Each pair must have its own sequence indicator`);let e=a.items[0]||new n.Pair;a.commentBefore&&(e.commentBefore=e.commentBefore?`${a.commentBefore}
280
280
  ${e.commentBefore}`:a.commentBefore),a.comment&&(e.comment=e.comment?`${a.comment}
281
- ${e.comment}`:a.comment),a=e}i.items[e]=a instanceof n.Pair?a:new n.Pair(a)}}return i}function a(e,t,r){let i=new n.YAMLSeq(e);i.tag=`tag:yaml.org,2002:pairs`;for(let n of t){let t,a;if(Array.isArray(n)){if(n.length===2)t=n[0],a=n[1];else throw TypeError(`Expected [key, value] tuple: ${n}`)}else if(n&&n instanceof Object){let e=Object.keys(n);if(e.length===1)t=e[0],a=n[t];else throw TypeError(`Expected { key: value } tuple: ${n}`)}else t=n;let o=e.createPair(t,a,r);i.items.push(o)}return i}var o={default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:i,createNode:a},s=class e extends n.YAMLSeq{constructor(){super(),t._defineProperty(this,`add`,n.YAMLMap.prototype.add.bind(this)),t._defineProperty(this,`delete`,n.YAMLMap.prototype.delete.bind(this)),t._defineProperty(this,`get`,n.YAMLMap.prototype.get.bind(this)),t._defineProperty(this,`has`,n.YAMLMap.prototype.has.bind(this)),t._defineProperty(this,`set`,n.YAMLMap.prototype.set.bind(this)),this.tag=e.tag}toJSON(e,t){let r=new Map;t&&t.onCreate&&t.onCreate(r);for(let e of this.items){let i,a;if(e instanceof n.Pair?(i=n.toJSON(e.key,``,t),a=n.toJSON(e.value,i,t)):i=n.toJSON(e,``,t),r.has(i))throw Error(`Ordered maps must not include duplicate keys`);r.set(i,a)}return r}};t._defineProperty(s,`tag`,`tag:yaml.org,2002:omap`);function c(e,r){let a=i(e,r),o=[];for(let{key:e}of a.items)if(e instanceof n.Scalar){if(o.includes(e.value))throw new t.YAMLSemanticError(r,`Ordered maps must not include duplicate keys`);o.push(e.value)}return Object.assign(new s,a)}function l(e,t,n){let r=a(e,t,n),i=new s;return i.items=r.items,i}var u={identify:e=>e instanceof Map,nodeClass:s,default:!1,tag:`tag:yaml.org,2002:omap`,resolve:c,createNode:l},d=class e extends n.YAMLMap{constructor(){super(),this.tag=e.tag}add(e){let t=e instanceof n.Pair?e:new n.Pair(e);n.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let r=n.findPair(this.items,e);return!t&&r instanceof n.Pair?r.key instanceof n.Scalar?r.key.value:r.key:r}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let r=n.findPair(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new n.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,t,n);throw Error(`Set items must all have null values`)}};t._defineProperty(d,`tag`,`tag:yaml.org,2002:set`);function f(e,r){let i=n.resolveMap(e,r);if(!i.hasAllNullValues())throw new t.YAMLSemanticError(r,`Set items must all have null values`);return Object.assign(new d,i)}function p(e,t,n){let r=new d;for(let i of t)r.items.push(e.createPair(i,null,n));return r}var m={identify:e=>e instanceof Set,nodeClass:d,default:!1,tag:`tag:yaml.org,2002:set`,resolve:f,createNode:p},h=(e,t)=>{let n=t.split(`:`).reduce((e,t)=>e*60+Number(t),0);return e===`-`?-n:n},g=({value:e})=>{if(isNaN(e)||!isFinite(e))return n.stringifyNumber(e);let t=``;e<0&&(t=`-`,e=Math.abs(e));let r=[e%60];return e<60?r.unshift(0):(e=Math.round((e-r[0])/60),r.unshift(e%60),e>=60&&(e=Math.round((e-r[0])/60),r.unshift(e))),t+r.map(e=>e<10?`0`+String(e):String(e)).join(`:`).replace(/000000\d*$/,``)},_={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:int`,format:`TIME`,test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(e,t,n)=>h(t,n.replace(/_/g,``)),stringify:g},v={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,t,n)=>h(t,n.replace(/_/g,``)),stringify:g},y={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,t,n,r,i,a,o,s,c)=>{s&&=(s+`00`).substr(1,3);let l=Date.UTC(t,n-1,r,i||0,a||0,o||0,s||0);if(c&&c!==`Z`){let e=h(c[0],c.slice(1));Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,``)};function b(e){let t={};return e?typeof YAML_SILENCE_DEPRECATION_WARNINGS<`u`?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<`u`?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function x(e,t){b(!1)&&console.warn(t?`${t}: ${e}`:e)}function S(e){b(!0)&&x(`The endpoint 'yaml/${e.replace(/.*yaml[/\\]/i,``).replace(/\.js$/,``).replace(/\\/g,`/`)}' will be removed in a future release.`,`DeprecationWarning`)}var C={};function w(e,t){if(!C[e]&&b(!0)){C[e]=!0;let n=`The option '${e}' will be removed in a future release`;n+=t?`, use '${t}' instead.`:`.`,x(n,`DeprecationWarning`)}}e.binary=r,e.floatTime=v,e.intTime=_,e.omap=u,e.pairs=o,e.set=m,e.timestamp=y,e.warn=x,e.warnFileDeprecation=S,e.warnOptionDeprecation=w}),Ip=Op(e=>{var t=Mp(),n=Pp(),r=Fp();function i(e,t,r){let i=new n.YAMLMap(e);if(t instanceof Map)for(let[n,a]of t)i.items.push(e.createPair(n,a,r));else if(t&&typeof t==`object`)for(let n of Object.keys(t))i.items.push(e.createPair(n,t[n],r));return typeof e.sortMapEntries==`function`&&i.items.sort(e.sortMapEntries),i}var a={createNode:i,default:!0,nodeClass:n.YAMLMap,tag:`tag:yaml.org,2002:map`,resolve:n.resolveMap};function o(e,t,r){let i=new n.YAMLSeq(e);if(t&&t[Symbol.iterator])for(let n of t){let t=e.createNode(n,r.wrapScalars,null,r);i.items.push(t)}return i}var s={createNode:o,default:!0,nodeClass:n.YAMLSeq,tag:`tag:yaml.org,2002:seq`,resolve:n.resolveSeq},c=[a,s,{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:n.resolveString,stringify(e,t,r,i){return t=Object.assign({actualString:!0},t),n.stringifyString(e,t,r,i)},options:n.strOptions}],l=e=>typeof e==`bigint`||Number.isInteger(e),u=(e,t,r)=>n.intOptions.asBigInt?BigInt(e):parseInt(t,r);function d(e,t,r){let{value:i}=e;return l(i)&&i>=0?r+i.toString(t):n.stringifyNumber(e)}var f={identify:e=>e==null,createNode:(e,t,r)=>r.wrapScalars?new n.Scalar(null):null,default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:n.nullOptions,stringify:()=>n.nullOptions.nullStr},p={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>e[0]===`t`||e[0]===`T`,options:n.boolOptions,stringify:({value:e})=>e?n.boolOptions.trueStr:n.boolOptions.falseStr},m={identify:e=>l(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o([0-7]+)$/,resolve:(e,t)=>u(e,t,8),options:n.intOptions,stringify:e=>d(e,8,`0o`)},h={identify:l,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:e=>u(e,e,10),options:n.intOptions,stringify:n.stringifyNumber},g={identify:e=>l(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x([0-9a-fA-F]+)$/,resolve:(e,t)=>u(e,t,16),options:n.intOptions,stringify:e=>d(e,16,`0x`)},_={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:e[0]===`-`?-1/0:1/0,stringify:n.stringifyNumber},v={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:({value:e})=>Number(e).toExponential()},y={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(e,t,r){let i=t||r,a=new n.Scalar(parseFloat(e));return i&&i[i.length-1]===`0`&&(a.minFractionDigits=i.length),a},stringify:n.stringifyNumber},b=c.concat([f,p,m,h,g,_,v,y]),x=e=>typeof e==`bigint`||Number.isInteger(e),S=({value:e})=>JSON.stringify(e),C=[a,s,{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:n.resolveString,stringify:S},{identify:e=>e==null,createNode:(e,t,r)=>r.wrapScalars?new n.Scalar(null):null,default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:S},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true|false$/,resolve:e=>e===`true`,stringify:S},{identify:x,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:e=>n.intOptions.asBigInt?BigInt(e):parseInt(e,10),stringify:({value:e})=>x(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:S}];C.scalarFallback=e=>{throw SyntaxError(`Unresolved plain scalar ${JSON.stringify(e)}`)};var w=({value:e})=>e?n.boolOptions.trueStr:n.boolOptions.falseStr,T=e=>typeof e==`bigint`||Number.isInteger(e);function ee(e,t,r){let i=t.replace(/_/g,``);if(n.intOptions.asBigInt){switch(r){case 2:i=`0b${i}`;break;case 8:i=`0o${i}`;break;case 16:i=`0x${i}`}let t=BigInt(i);return e===`-`?BigInt(-1)*t:t}let a=parseInt(i,r);return e===`-`?-1*a:a}function E(e,t,r){let{value:i}=e;if(T(i)){let e=i.toString(t);return i<0?`-`+r+e.substr(1):r+e}return n.stringifyNumber(e)}var te={core:b,failsafe:c,json:C,yaml11:c.concat([{identify:e=>e==null,createNode:(e,t,r)=>r.wrapScalars?new n.Scalar(null):null,default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:n.nullOptions,stringify:()=>n.nullOptions.nullStr},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:n.boolOptions,stringify:w},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:n.boolOptions,stringify:w},{identify:T,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^([-+]?)0b([0-1_]+)$/,resolve:(e,t,n)=>ee(t,n,2),stringify:e=>E(e,2,`0b`)},{identify:T,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^([-+]?)0([0-7_]+)$/,resolve:(e,t,n)=>ee(t,n,8),stringify:e=>E(e,8,`0`)},{identify:T,default:!0,tag:`tag:yaml.org,2002:int`,test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(e,t,n)=>ee(t,n,10),stringify:n.stringifyNumber},{identify:T,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(e,t,n)=>ee(t,n,16),stringify:e=>E(e,16,`0x`)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:e[0]===`-`?-1/0:1/0,stringify:n.stringifyNumber},{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:({value:e})=>Number(e).toExponential()},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(e,t){let r=new n.Scalar(parseFloat(e.replace(/_/g,``)));if(t){let e=t.replace(/_/g,``);e[e.length-1]===`0`&&(r.minFractionDigits=e.length)}return r},stringify:n.stringifyNumber}],r.binary,r.omap,r.pairs,r.set,r.intTime,r.floatTime,r.timestamp)},D={binary:r.binary,bool:p,float:y,floatExp:v,floatNaN:_,floatTime:r.floatTime,int:h,intHex:g,intOct:m,intTime:r.intTime,map:a,null:f,omap:r.omap,pairs:r.pairs,seq:s,set:r.set,timestamp:r.timestamp};function ne(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&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format)}function re(e,t,r){if(e instanceof n.Node)return e;let{defaultPrefix:i,onTagObj:o,prevObjects:c,schema:l,wrapScalars:u}=r;t&&t.startsWith(`!!`)&&(t=i+t.slice(2));let d=ne(e,t,l.tags);if(!d){if(typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`)return u?new n.Scalar(e):e;d=e instanceof Map?a:e[Symbol.iterator]?s:a}o&&(o(d),delete r.onTagObj);let f={value:void 0,node:void 0};if(e&&typeof e==`object`&&c){let t=c.get(e);if(t){let e=new n.Alias(t);return r.aliasNodes.push(e),e}f.value=e,c.set(e,f)}return f.node=d.createNode?d.createNode(r.schema,e,r):u?new n.Scalar(e):e,t&&f.node instanceof n.Node&&(f.node.tag=t),f.node}function O(e,t,n,r){let i=e[r.replace(/\W/g,``)];if(!i){let t=Object.keys(e).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown schema "${r}"; use one of ${t}`)}if(Array.isArray(n))for(let e of n)i=i.concat(e);else typeof n==`function`&&(i=n(i.slice()));for(let e=0;e<i.length;++e){let n=i[e];if(typeof n==`string`){let r=t[n];if(!r){let e=Object.keys(t).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag "${n}"; use one of ${e}`)}i[e]=r}}return i}var ie=(e,t)=>e.key<t.key?-1:+(e.key>t.key),ae=class e{constructor({customTags:e,merge:t,schema:n,sortMapEntries:i,tags:a}){this.merge=!!t,this.name=n,this.sortMapEntries=i===!0?ie:i||null,!e&&a&&r.warnOptionDeprecation(`tags`,`customTags`),this.tags=O(te,D,e||a,n)}createNode(t,n,r,i){let a={defaultPrefix:e.defaultPrefix,schema:this,wrapScalars:n};return re(t,r,i?Object.assign(i,a):a)}createPair(e,t,r){r||={wrapScalars:!0};let i=this.createNode(e,r.wrapScalars,null,r),a=this.createNode(t,r.wrapScalars,null,r);return new n.Pair(i,a)}};t._defineProperty(ae,`defaultPrefix`,t.defaultTagPrefix),t._defineProperty(ae,`defaultTags`,t.defaultTags),e.Schema=ae}),Lp=Op(e=>{var t=Mp(),n=Pp(),r=Ip(),i={anchorPrefix:`a`,customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:`1.2`},a={get binary(){return n.binaryOptions},set binary(e){Object.assign(n.binaryOptions,e)},get bool(){return n.boolOptions},set bool(e){Object.assign(n.boolOptions,e)},get int(){return n.intOptions},set int(e){Object.assign(n.intOptions,e)},get null(){return n.nullOptions},set null(e){Object.assign(n.nullOptions,e)},get str(){return n.strOptions},set str(e){Object.assign(n.strOptions,e)}},o={"1.0":{schema:`yaml-1.1`,merge:!0,tagPrefixes:[{handle:`!`,prefix:t.defaultTagPrefix},{handle:`!!`,prefix:`tag:private.yaml.org,2002:`}]},1.1:{schema:`yaml-1.1`,merge:!0,tagPrefixes:[{handle:`!`,prefix:`!`},{handle:`!!`,prefix:t.defaultTagPrefix}]},1.2:{schema:`core`,merge:!1,tagPrefixes:[{handle:`!`,prefix:`!`},{handle:`!!`,prefix:t.defaultTagPrefix}]}};function s(e,t){if((e.version||e.options.version)===`1.0`){let e=t.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(e)return`!`+e[1];let n=t.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return n?`!${n[1]}/${n[2]}`:`!${t.replace(/^tag:/,``)}`}let n=e.tagPrefixes.find(e=>t.indexOf(e.prefix)===0);if(!n){let r=e.getDefaults().tagPrefixes;n=r&&r.find(e=>t.indexOf(e.prefix)===0)}if(!n)return t[0]===`!`?t:`!<${t}>`;let r=t.substr(n.prefix.length).replace(/[!,[\]{}]/g,e=>({"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`})[e]);return n.handle+r}function c(e,t){if(t instanceof n.Alias)return n.Alias;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 r,i;if(t instanceof n.Scalar){i=t.value;let n=e.filter(e=>e.identify&&e.identify(i)||e.class&&i instanceof e.class);r=n.find(e=>e.format===t.format)||n.find(e=>!e.format)}else i=t,r=e.find(e=>e.nodeClass&&i instanceof e.nodeClass);if(!r){let e=i&&i.constructor?i.constructor.name:typeof i;throw Error(`Tag not resolved for ${e} value`)}return r}function l(e,t,{anchors:n,doc:r}){let i=[],a=r.anchors.getName(e);return a&&(n[a]=e,i.push(`&${a}`)),e.tag?i.push(s(r,e.tag)):t.default||i.push(s(r,t.tag)),i.join(` `)}function u(e,t,r,i){let{anchors:a,schema:o}=t.doc,s;if(!(e instanceof n.Node)){let t={aliasNodes:[],onTagObj:e=>s=e,prevObjects:new Map};e=o.createNode(e,!0,null,t);for(let e of t.aliasNodes){e.source=e.source.node;let t=a.getName(e.source);t||(t=a.newName(),a.map[t]=e.source)}}if(e instanceof n.Pair)return e.toString(t,r,i);s||=c(o.tags,e);let u=l(e,s,t);u.length>0&&(t.indentAtStart=(t.indentAtStart||0)+u.length+1);let d=typeof s.stringify==`function`?s.stringify(e,t,r,i):e instanceof n.Scalar?n.stringifyString(e,t,r,i):e.toString(t,r,i);return u?e instanceof n.Scalar||d[0]===`{`||d[0]===`[`?`${u} ${d}`:`${u}
281
+ ${e.comment}`:a.comment),a=e}i.items[e]=a instanceof n.Pair?a:new n.Pair(a)}}return i}function a(e,t,r){let i=new n.YAMLSeq(e);i.tag=`tag:yaml.org,2002:pairs`;for(let n of t){let t,a;if(Array.isArray(n)){if(n.length===2)t=n[0],a=n[1];else throw TypeError(`Expected [key, value] tuple: ${n}`)}else if(n&&n instanceof Object){let e=Object.keys(n);if(e.length===1)t=e[0],a=n[t];else throw TypeError(`Expected { key: value } tuple: ${n}`)}else t=n;let o=e.createPair(t,a,r);i.items.push(o)}return i}var o={default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:i,createNode:a},s=class e extends n.YAMLSeq{constructor(){super(),t._defineProperty(this,`add`,n.YAMLMap.prototype.add.bind(this)),t._defineProperty(this,`delete`,n.YAMLMap.prototype.delete.bind(this)),t._defineProperty(this,`get`,n.YAMLMap.prototype.get.bind(this)),t._defineProperty(this,`has`,n.YAMLMap.prototype.has.bind(this)),t._defineProperty(this,`set`,n.YAMLMap.prototype.set.bind(this)),this.tag=e.tag}toJSON(e,t){let r=new Map;t&&t.onCreate&&t.onCreate(r);for(let e of this.items){let i,a;if(e instanceof n.Pair?(i=n.toJSON(e.key,``,t),a=n.toJSON(e.value,i,t)):i=n.toJSON(e,``,t),r.has(i))throw Error(`Ordered maps must not include duplicate keys`);r.set(i,a)}return r}};t._defineProperty(s,`tag`,`tag:yaml.org,2002:omap`);function c(e,r){let a=i(e,r),o=[];for(let{key:e}of a.items)if(e instanceof n.Scalar){if(o.includes(e.value))throw new t.YAMLSemanticError(r,`Ordered maps must not include duplicate keys`);o.push(e.value)}return Object.assign(new s,a)}function l(e,t,n){let r=a(e,t,n),i=new s;return i.items=r.items,i}var u={identify:e=>e instanceof Map,nodeClass:s,default:!1,tag:`tag:yaml.org,2002:omap`,resolve:c,createNode:l},d=class e extends n.YAMLMap{constructor(){super(),this.tag=e.tag}add(e){let t=e instanceof n.Pair?e:new n.Pair(e);n.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let r=n.findPair(this.items,e);return!t&&r instanceof n.Pair?r.key instanceof n.Scalar?r.key.value:r.key:r}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let r=n.findPair(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new n.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,t,n);throw Error(`Set items must all have null values`)}};t._defineProperty(d,`tag`,`tag:yaml.org,2002:set`);function f(e,r){let i=n.resolveMap(e,r);if(!i.hasAllNullValues())throw new t.YAMLSemanticError(r,`Set items must all have null values`);return Object.assign(new d,i)}function p(e,t,n){let r=new d;for(let i of t)r.items.push(e.createPair(i,null,n));return r}var m={identify:e=>e instanceof Set,nodeClass:d,default:!1,tag:`tag:yaml.org,2002:set`,resolve:f,createNode:p},h=(e,t)=>{let n=t.split(`:`).reduce((e,t)=>e*60+Number(t),0);return e===`-`?-n:n},g=({value:e})=>{if(isNaN(e)||!isFinite(e))return n.stringifyNumber(e);let t=``;e<0&&(t=`-`,e=Math.abs(e));let r=[e%60];return e<60?r.unshift(0):(e=Math.round((e-r[0])/60),r.unshift(e%60),e>=60&&(e=Math.round((e-r[0])/60),r.unshift(e))),t+r.map(e=>e<10?`0`+String(e):String(e)).join(`:`).replace(/000000\d*$/,``)},_={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:int`,format:`TIME`,test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(e,t,n)=>h(t,n.replace(/_/g,``)),stringify:g},v={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,t,n)=>h(t,n.replace(/_/g,``)),stringify:g},y={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,t,n,r,i,a,o,s,c)=>{s&&=(s+`00`).substr(1,3);let l=Date.UTC(t,n-1,r,i||0,a||0,o||0,s||0);if(c&&c!==`Z`){let e=h(c[0],c.slice(1));Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,``)};function b(e){let t={};return e?typeof YAML_SILENCE_DEPRECATION_WARNINGS<`u`?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<`u`?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function x(e,t){b(!1)&&console.warn(t?`${t}: ${e}`:e)}function S(e){b(!0)&&x(`The endpoint 'yaml/${e.replace(/.*yaml[/\\]/i,``).replace(/\.js$/,``).replace(/\\/g,`/`)}' will be removed in a future release.`,`DeprecationWarning`)}var C={};function w(e,t){if(!C[e]&&b(!0)){C[e]=!0;let n=`The option '${e}' will be removed in a future release`;n+=t?`, use '${t}' instead.`:`.`,x(n,`DeprecationWarning`)}}e.binary=r,e.floatTime=v,e.intTime=_,e.omap=u,e.pairs=o,e.set=m,e.timestamp=y,e.warn=x,e.warnFileDeprecation=S,e.warnOptionDeprecation=w}),Fp=Dp(e=>{var t=jp(),n=Np(),r=Pp();function i(e,t,r){let i=new n.YAMLMap(e);if(t instanceof Map)for(let[n,a]of t)i.items.push(e.createPair(n,a,r));else if(t&&typeof t==`object`)for(let n of Object.keys(t))i.items.push(e.createPair(n,t[n],r));return typeof e.sortMapEntries==`function`&&i.items.sort(e.sortMapEntries),i}var a={createNode:i,default:!0,nodeClass:n.YAMLMap,tag:`tag:yaml.org,2002:map`,resolve:n.resolveMap};function o(e,t,r){let i=new n.YAMLSeq(e);if(t&&t[Symbol.iterator])for(let n of t){let t=e.createNode(n,r.wrapScalars,null,r);i.items.push(t)}return i}var s={createNode:o,default:!0,nodeClass:n.YAMLSeq,tag:`tag:yaml.org,2002:seq`,resolve:n.resolveSeq},c=[a,s,{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:n.resolveString,stringify(e,t,r,i){return t=Object.assign({actualString:!0},t),n.stringifyString(e,t,r,i)},options:n.strOptions}],l=e=>typeof e==`bigint`||Number.isInteger(e),u=(e,t,r)=>n.intOptions.asBigInt?BigInt(e):parseInt(t,r);function d(e,t,r){let{value:i}=e;return l(i)&&i>=0?r+i.toString(t):n.stringifyNumber(e)}var f={identify:e=>e==null,createNode:(e,t,r)=>r.wrapScalars?new n.Scalar(null):null,default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:n.nullOptions,stringify:()=>n.nullOptions.nullStr},p={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>e[0]===`t`||e[0]===`T`,options:n.boolOptions,stringify:({value:e})=>e?n.boolOptions.trueStr:n.boolOptions.falseStr},m={identify:e=>l(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o([0-7]+)$/,resolve:(e,t)=>u(e,t,8),options:n.intOptions,stringify:e=>d(e,8,`0o`)},h={identify:l,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:e=>u(e,e,10),options:n.intOptions,stringify:n.stringifyNumber},g={identify:e=>l(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x([0-9a-fA-F]+)$/,resolve:(e,t)=>u(e,t,16),options:n.intOptions,stringify:e=>d(e,16,`0x`)},_={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:e[0]===`-`?-1/0:1/0,stringify:n.stringifyNumber},v={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:({value:e})=>Number(e).toExponential()},y={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(e,t,r){let i=t||r,a=new n.Scalar(parseFloat(e));return i&&i[i.length-1]===`0`&&(a.minFractionDigits=i.length),a},stringify:n.stringifyNumber},b=c.concat([f,p,m,h,g,_,v,y]),x=e=>typeof e==`bigint`||Number.isInteger(e),S=({value:e})=>JSON.stringify(e),C=[a,s,{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:n.resolveString,stringify:S},{identify:e=>e==null,createNode:(e,t,r)=>r.wrapScalars?new n.Scalar(null):null,default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:S},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true|false$/,resolve:e=>e===`true`,stringify:S},{identify:x,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:e=>n.intOptions.asBigInt?BigInt(e):parseInt(e,10),stringify:({value:e})=>x(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:S}];C.scalarFallback=e=>{throw SyntaxError(`Unresolved plain scalar ${JSON.stringify(e)}`)};var w=({value:e})=>e?n.boolOptions.trueStr:n.boolOptions.falseStr,T=e=>typeof e==`bigint`||Number.isInteger(e);function ee(e,t,r){let i=t.replace(/_/g,``);if(n.intOptions.asBigInt){switch(r){case 2:i=`0b${i}`;break;case 8:i=`0o${i}`;break;case 16:i=`0x${i}`}let t=BigInt(i);return e===`-`?BigInt(-1)*t:t}let a=parseInt(i,r);return e===`-`?-1*a:a}function E(e,t,r){let{value:i}=e;if(T(i)){let e=i.toString(t);return i<0?`-`+r+e.substr(1):r+e}return n.stringifyNumber(e)}var te={core:b,failsafe:c,json:C,yaml11:c.concat([{identify:e=>e==null,createNode:(e,t,r)=>r.wrapScalars?new n.Scalar(null):null,default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:n.nullOptions,stringify:()=>n.nullOptions.nullStr},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:n.boolOptions,stringify:w},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:n.boolOptions,stringify:w},{identify:T,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^([-+]?)0b([0-1_]+)$/,resolve:(e,t,n)=>ee(t,n,2),stringify:e=>E(e,2,`0b`)},{identify:T,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^([-+]?)0([0-7_]+)$/,resolve:(e,t,n)=>ee(t,n,8),stringify:e=>E(e,8,`0`)},{identify:T,default:!0,tag:`tag:yaml.org,2002:int`,test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(e,t,n)=>ee(t,n,10),stringify:n.stringifyNumber},{identify:T,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(e,t,n)=>ee(t,n,16),stringify:e=>E(e,16,`0x`)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:e[0]===`-`?-1/0:1/0,stringify:n.stringifyNumber},{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:({value:e})=>Number(e).toExponential()},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(e,t){let r=new n.Scalar(parseFloat(e.replace(/_/g,``)));if(t){let e=t.replace(/_/g,``);e[e.length-1]===`0`&&(r.minFractionDigits=e.length)}return r},stringify:n.stringifyNumber}],r.binary,r.omap,r.pairs,r.set,r.intTime,r.floatTime,r.timestamp)},D={binary:r.binary,bool:p,float:y,floatExp:v,floatNaN:_,floatTime:r.floatTime,int:h,intHex:g,intOct:m,intTime:r.intTime,map:a,null:f,omap:r.omap,pairs:r.pairs,seq:s,set:r.set,timestamp:r.timestamp};function ne(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&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format)}function re(e,t,r){if(e instanceof n.Node)return e;let{defaultPrefix:i,onTagObj:o,prevObjects:c,schema:l,wrapScalars:u}=r;t&&t.startsWith(`!!`)&&(t=i+t.slice(2));let d=ne(e,t,l.tags);if(!d){if(typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`)return u?new n.Scalar(e):e;d=e instanceof Map?a:e[Symbol.iterator]?s:a}o&&(o(d),delete r.onTagObj);let f={value:void 0,node:void 0};if(e&&typeof e==`object`&&c){let t=c.get(e);if(t){let e=new n.Alias(t);return r.aliasNodes.push(e),e}f.value=e,c.set(e,f)}return f.node=d.createNode?d.createNode(r.schema,e,r):u?new n.Scalar(e):e,t&&f.node instanceof n.Node&&(f.node.tag=t),f.node}function O(e,t,n,r){let i=e[r.replace(/\W/g,``)];if(!i){let t=Object.keys(e).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown schema "${r}"; use one of ${t}`)}if(Array.isArray(n))for(let e of n)i=i.concat(e);else typeof n==`function`&&(i=n(i.slice()));for(let e=0;e<i.length;++e){let n=i[e];if(typeof n==`string`){let r=t[n];if(!r){let e=Object.keys(t).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag "${n}"; use one of ${e}`)}i[e]=r}}return i}var ie=(e,t)=>e.key<t.key?-1:+(e.key>t.key),ae=class e{constructor({customTags:e,merge:t,schema:n,sortMapEntries:i,tags:a}){this.merge=!!t,this.name=n,this.sortMapEntries=i===!0?ie:i||null,!e&&a&&r.warnOptionDeprecation(`tags`,`customTags`),this.tags=O(te,D,e||a,n)}createNode(t,n,r,i){let a={defaultPrefix:e.defaultPrefix,schema:this,wrapScalars:n};return re(t,r,i?Object.assign(i,a):a)}createPair(e,t,r){r||={wrapScalars:!0};let i=this.createNode(e,r.wrapScalars,null,r),a=this.createNode(t,r.wrapScalars,null,r);return new n.Pair(i,a)}};t._defineProperty(ae,`defaultPrefix`,t.defaultTagPrefix),t._defineProperty(ae,`defaultTags`,t.defaultTags),e.Schema=ae}),Ip=Dp(e=>{var t=jp(),n=Np(),r=Fp(),i={anchorPrefix:`a`,customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:`1.2`},a={get binary(){return n.binaryOptions},set binary(e){Object.assign(n.binaryOptions,e)},get bool(){return n.boolOptions},set bool(e){Object.assign(n.boolOptions,e)},get int(){return n.intOptions},set int(e){Object.assign(n.intOptions,e)},get null(){return n.nullOptions},set null(e){Object.assign(n.nullOptions,e)},get str(){return n.strOptions},set str(e){Object.assign(n.strOptions,e)}},o={"1.0":{schema:`yaml-1.1`,merge:!0,tagPrefixes:[{handle:`!`,prefix:t.defaultTagPrefix},{handle:`!!`,prefix:`tag:private.yaml.org,2002:`}]},1.1:{schema:`yaml-1.1`,merge:!0,tagPrefixes:[{handle:`!`,prefix:`!`},{handle:`!!`,prefix:t.defaultTagPrefix}]},1.2:{schema:`core`,merge:!1,tagPrefixes:[{handle:`!`,prefix:`!`},{handle:`!!`,prefix:t.defaultTagPrefix}]}};function s(e,t){if((e.version||e.options.version)===`1.0`){let e=t.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(e)return`!`+e[1];let n=t.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return n?`!${n[1]}/${n[2]}`:`!${t.replace(/^tag:/,``)}`}let n=e.tagPrefixes.find(e=>t.indexOf(e.prefix)===0);if(!n){let r=e.getDefaults().tagPrefixes;n=r&&r.find(e=>t.indexOf(e.prefix)===0)}if(!n)return t[0]===`!`?t:`!<${t}>`;let r=t.substr(n.prefix.length).replace(/[!,[\]{}]/g,e=>({"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`})[e]);return n.handle+r}function c(e,t){if(t instanceof n.Alias)return n.Alias;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 r,i;if(t instanceof n.Scalar){i=t.value;let n=e.filter(e=>e.identify&&e.identify(i)||e.class&&i instanceof e.class);r=n.find(e=>e.format===t.format)||n.find(e=>!e.format)}else i=t,r=e.find(e=>e.nodeClass&&i instanceof e.nodeClass);if(!r){let e=i&&i.constructor?i.constructor.name:typeof i;throw Error(`Tag not resolved for ${e} value`)}return r}function l(e,t,{anchors:n,doc:r}){let i=[],a=r.anchors.getName(e);return a&&(n[a]=e,i.push(`&${a}`)),e.tag?i.push(s(r,e.tag)):t.default||i.push(s(r,t.tag)),i.join(` `)}function u(e,t,r,i){let{anchors:a,schema:o}=t.doc,s;if(!(e instanceof n.Node)){let t={aliasNodes:[],onTagObj:e=>s=e,prevObjects:new Map};e=o.createNode(e,!0,null,t);for(let e of t.aliasNodes){e.source=e.source.node;let t=a.getName(e.source);t||(t=a.newName(),a.map[t]=e.source)}}if(e instanceof n.Pair)return e.toString(t,r,i);s||=c(o.tags,e);let u=l(e,s,t);u.length>0&&(t.indentAtStart=(t.indentAtStart||0)+u.length+1);let d=typeof s.stringify==`function`?s.stringify(e,t,r,i):e instanceof n.Scalar?n.stringifyString(e,t,r,i):e.toString(t,r,i);return u?e instanceof n.Scalar||d[0]===`{`||d[0]===`[`?`${u} ${d}`:`${u}
282
282
  ${t.indent}${d}`:d}var d=class e{static validAnchorNode(e){return e instanceof n.Scalar||e instanceof n.YAMLSeq||e instanceof n.YAMLMap}constructor(e){t._defineProperty(this,`map`,Object.create(null)),this.prefix=e}createAlias(e,t){return this.setAnchor(e,t),new n.Alias(e)}createMergePair(...e){let t=new n.Merge;return t.value.items=e.map(e=>{if(e instanceof n.Alias){if(e.source instanceof n.YAMLMap)return e}else if(e instanceof n.YAMLMap)return this.createAlias(e);throw Error(`Merge sources must be Map nodes or their Aliases`)}),t}getName(e){let{map:t}=this;return Object.keys(t).find(n=>t[n]===e)}getNames(){return Object.keys(this.map)}getNode(e){return this.map[e]}newName(e){e||=this.prefix;let t=Object.keys(this.map);for(let n=1;;++n){let r=`${e}${n}`;if(!t.includes(r))return r}}resolveNodes(){let{map:e,_cstAliases:t}=this;Object.keys(e).forEach(t=>{e[t]=e[t].resolved}),t.forEach(e=>{e.source=e.source.resolved}),delete this._cstAliases}setAnchor(t,n){if(t!=null&&!e.validAnchorNode(t))throw Error(`Anchors may only be set for Scalar, Seq and Map nodes`);if(n&&/[\x00-\x19\s,[\]{}]/.test(n))throw Error(`Anchor names must not contain whitespace or control characters`);let{map:r}=this,i=t&&Object.keys(r).find(e=>r[e]===t);if(i){if(n)i!==n&&(delete r[i],r[n]=t);else return i}else{if(!n){if(!t)return null;n=this.newName()}r[n]=t}return n}},f=(e,t)=>{if(e&&typeof e==`object`){let{tag:r}=e;e instanceof n.Collection?(r&&(t[r]=!0),e.items.forEach(e=>f(e,t))):e instanceof n.Pair?(f(e.key,t),f(e.value,t)):e instanceof n.Scalar&&r&&(t[r]=!0)}return t},p=e=>Object.keys(f(e,{}));function m(e,r){let i={before:[],after:[]},a,o=!1;for(let s of r)if(s.valueRange){if(a!==void 0){e.errors.push(new t.YAMLSyntaxError(s,`Document contains trailing content not separated by a ... or --- line`));break}let r=n.resolveNode(e,s);o&&=(r.spaceBefore=!0,!1),a=r}else s.comment===null?s.type===t.Type.BLANK_LINE&&(o=!0,a===void 0&&i.before.length>0&&!e.commentBefore&&(e.commentBefore=i.before.join(`
283
283
  `),i.before=[])):(a===void 0?i.before:i.after).push(s.comment);if(e.contents=a||null,!a)e.comment=i.before.concat(i.after).join(`
284
284
  `)||null;else{let t=i.before.join(`
@@ -287,108 +287,108 @@ ${e.commentBefore}`:t}e.comment=i.after.join(`
287
287
  `)||null}}function h({tagPrefixes:e},n){let[r,i]=n.parameters;if(!r||!i)throw new t.YAMLSemanticError(n,`Insufficient parameters given for %TAG directive`);if(e.some(e=>e.handle===r))throw new t.YAMLSemanticError(n,`The %TAG directive must only be given at most once per handle in the same document.`);return{handle:r,prefix:i}}function g(e,n){let[r]=n.parameters;if(n.name===`YAML:1.0`&&(r=`1.0`),!r)throw new t.YAMLSemanticError(n,`Insufficient parameters given for %YAML directive`);if(!o[r]){let i=`Document will be parsed as YAML ${e.version||e.options.version} rather than YAML ${r}`;e.warnings.push(new t.YAMLWarning(n,i))}return r}function _(e,n,r){let i=[],a=!1;for(let r of n){let{comment:n,name:o}=r;switch(o){case`TAG`:try{e.tagPrefixes.push(h(e,r))}catch(t){e.errors.push(t)}a=!0;break;case`YAML`:case`YAML:1.0`:e.version&&e.errors.push(new t.YAMLSemanticError(r,`The %YAML directive must only be given at most once per document.`));try{e.version=g(e,r)}catch(t){e.errors.push(t)}a=!0;break;default:if(o){let n=`YAML only supports %TAG and %YAML directives, and not %${o}`;e.warnings.push(new t.YAMLWarning(r,n))}}n&&i.push(n)}r&&!a&&(e.version||r.version||e.options.version)===`1.1`&&(e.tagPrefixes=r.tagPrefixes.map(({handle:e,prefix:t})=>({handle:e,prefix:t})),e.version=r.version),e.commentBefore=i.join(`
288
288
  `)||null}function v(e){if(e instanceof n.Collection)return!0;throw Error(`Expected a YAML collection as document contents`)}var y=class e{constructor(e){this.anchors=new d(e.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=e,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(e){return v(this.contents),this.contents.add(e)}addIn(e,t){v(this.contents),this.contents.addIn(e,t)}delete(e){return v(this.contents),this.contents.delete(e)}deleteIn(e){return n.isEmptyPath(e)?this.contents!=null&&(this.contents=null,!0):(v(this.contents),this.contents.deleteIn(e))}getDefaults(){return e.defaults[this.version]||e.defaults[this.options.version]||{}}get(e,t){return this.contents instanceof n.Collection?this.contents.get(e,t):void 0}getIn(e,t){return n.isEmptyPath(e)?!t&&this.contents instanceof n.Scalar?this.contents.value:this.contents:this.contents instanceof n.Collection?this.contents.getIn(e,t):void 0}has(e){return this.contents instanceof n.Collection&&this.contents.has(e)}hasIn(e){return n.isEmptyPath(e)?this.contents!==void 0:this.contents instanceof n.Collection&&this.contents.hasIn(e)}set(e,t){v(this.contents),this.contents.set(e,t)}setIn(e,t){n.isEmptyPath(e)?this.contents=t:(v(this.contents),this.contents.setIn(e,t))}setSchema(e,t){if(!e&&!t&&this.schema)return;typeof e==`number`&&(e=e.toFixed(1)),e===`1.0`||e===`1.1`||e===`1.2`?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&typeof e==`string`&&(this.options.schema=e),Array.isArray(t)&&(this.options.customTags=t);let n=Object.assign({},this.getDefaults(),this.options);this.schema=new r.Schema(n)}parse(e,n){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type=`DOCUMENT`);let{directives:r=[],contents:i=[],directivesEndMarker:a,error:o,valueRange:s}=e;if(o&&(o.source||=this,this.errors.push(o)),_(this,r,n),a&&(this.directivesEndMarker=!0),this.range=s?[s.start,s.end]:null,this.setSchema(),this.anchors._cstAliases=[],m(this,i),this.anchors.resolveNodes(),this.options.prettyErrors){for(let e of this.errors)e instanceof t.YAMLError&&e.makePretty();for(let e of this.warnings)e instanceof t.YAMLError&&e.makePretty()}return this}listNonDefaultTags(){return p(this.contents).filter(e=>e.indexOf(r.Schema.defaultPrefix)!==0)}setTagPrefix(e,t){if(e[0]!==`!`||e[e.length-1]!==`!`)throw Error(`Handle must start and end with !`);if(t){let n=this.tagPrefixes.find(t=>t.handle===e);n?n.prefix=t:this.tagPrefixes.push({handle:e,prefix:t})}else this.tagPrefixes=this.tagPrefixes.filter(t=>t.handle!==e)}toJSON(e,t){let{keepBlobsInJSON:r,mapAsMap:i,maxAliasCount:a}=this.options,o=r&&(typeof e!=`string`||!(this.contents instanceof n.Scalar)),s={doc:this,indentStep:` `,keep:o,mapAsMap:o&&!!i,maxAliasCount:a,stringify:u},c=Object.keys(this.anchors.map);c.length>0&&(s.anchors=new Map(c.map(e=>[this.anchors.map[e],{alias:[],aliasCount:0,count:1}])));let l=n.toJSON(this.contents,e,s);if(typeof t==`function`&&s.anchors)for(let{count:e,res:n}of s.anchors.values())t(n,e);return l}toString(){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);let e=this.options.indent;if(!Number.isInteger(e)||e<=0){let t=JSON.stringify(e);throw Error(`"indent" option must be a positive integer, not ${t}`)}this.setSchema();let t=[],r=!1;if(this.version){let e=`%YAML 1.2`;this.schema.name===`yaml-1.1`&&(this.version===`1.0`?e=`%YAML:1.0`:this.version===`1.1`&&(e=`%YAML 1.1`)),t.push(e),r=!0}let i=this.listNonDefaultTags();this.tagPrefixes.forEach(({handle:e,prefix:n})=>{i.some(e=>e.indexOf(n)===0)&&(t.push(`%TAG ${e} ${n}`),r=!0)}),(r||this.directivesEndMarker)&&t.push(`---`),this.commentBefore&&((r||!this.directivesEndMarker)&&t.unshift(``),t.unshift(this.commentBefore.replace(/^/gm,`#`)));let a={anchors:Object.create(null),doc:this,indent:``,indentStep:` `.repeat(e),stringify:u},o=!1,s=null;if(this.contents){this.contents instanceof n.Node&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&t.push(``),this.contents.commentBefore&&t.push(this.contents.commentBefore.replace(/^/gm,`#`)),a.forceBlockIndent=!!this.comment,s=this.contents.comment);let e=s?null:()=>o=!0,i=u(this.contents,a,()=>s=null,e);t.push(n.addComment(i,``,s))}else this.contents!==void 0&&t.push(u(this.contents,a));return this.comment&&((!o||s)&&t[t.length-1]!==``&&t.push(``),t.push(this.comment.replace(/^/gm,`#`))),t.join(`
289
289
  `)+`
290
- `}};t._defineProperty(y,`defaults`,o),e.Document=y,e.defaultOptions=i,e.scalarOptions=a}),Rp=Op(e=>{var t=Np(),n=Lp(),r=Ip(),i=Mp(),a=Fp();Pp();function o(e,t=!0,i){i===void 0&&typeof t==`string`&&(i=t,t=!0);let a=Object.assign({},n.Document.defaults[n.defaultOptions.version],n.defaultOptions);return new r.Schema(a).createNode(e,t,i)}var s=class extends n.Document{constructor(e){super(Object.assign({},n.defaultOptions,e))}};function c(e,n){let r=[],i;for(let a of t.parse(e)){let e=new s(n);e.parse(a,i),r.push(e),i=e}return r}function l(e,n){let r=t.parse(e),a=new s(n).parse(r[0]);return r.length>1&&a.errors.unshift(new i.YAMLSemanticError(r[1],`Source contains multiple documents; please use YAML.parseAllDocuments()`)),a}function u(e,t){let n=l(e,t);if(n.warnings.forEach(e=>a.warn(e)),n.errors.length>0)throw n.errors[0];return n.toJSON()}function d(e,t){let n=new s(t);return n.contents=e,String(n)}e.YAML={createNode:o,defaultOptions:n.defaultOptions,Document:s,parse:u,parseAllDocuments:c,parseCST:t.parse,parseDocument:l,scalarOptions:n.scalarOptions,stringify:d}}),zp=Op((e,t)=>{t.exports=Rp().YAML}),Bp=Op(e=>{var t=Pp(),n=Mp();e.findPair=t.findPair,e.parseMap=t.resolveMap,e.parseSeq=t.resolveSeq,e.stringifyNumber=t.stringifyNumber,e.stringifyString=t.stringifyString,e.toJSON=t.toJSON,e.Type=n.Type,e.YAMLError=n.YAMLError,e.YAMLReferenceError=n.YAMLReferenceError,e.YAMLSemanticError=n.YAMLSemanticError,e.YAMLSyntaxError=n.YAMLSyntaxError,e.YAMLWarning=n.YAMLWarning}),Vp={};kp(Vp,{__parsePrettierYamlConfig:()=>$_,languages:()=>ng,options:()=>ig,parsers:()=>ag,printers:()=>Q_});var Hp=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i);function Up(e){return this[e<0?this.length+e:e]}var Wp=Hp(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return Up}),Gp=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Kp=Hp(`replaceAll`,function(){if(typeof this==`string`)return Gp}),qp=()=>{},Jp=`string`,Yp=`array`,Xp=`cursor`,Zp=`indent`,Qp=`align`,$p=`trim`,em=`group`,tm=`fill`,nm=`if-break`,rm=`indent-if-break`,im=`line-suffix`,am=`line-suffix-boundary`,om=`line`,sm=`label`,cm=`break-parent`,lm=new Set([Xp,Zp,Qp,$p,em,tm,nm,rm,im,am,om,sm,cm]);function um(e){if(typeof e==`string`)return Jp;if(Array.isArray(e))return Yp;if(!e)return;let{type:t}=e;if(lm.has(t))return t}var dm=um,fm=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function pm(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
291
- Expected it to be 'string' or 'object'.`;if(dm(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=fm([...lm].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
292
- Expected it to be ${r}.`}var mm=class extends Error{name=`InvalidDocError`;constructor(e){super(pm(e)),this.doc=e}};function hm(e,t){if(typeof e==`string`)return t(e);let n=new Map;return r(e);function r(e){if(n.has(e))return n.get(e);let t=i(e);return n.set(e,t),t}function i(e){switch(dm(e)){case Yp:return t(e.map(r));case tm:return t({...e,parts:e.parts.map(r)});case nm:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case em:{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 Qp:case Zp:case rm:case sm:case im:return t({...e,contents:r(e.contents)});case Jp:case Xp:case $p:case am:case om:case cm:return t(e);default:throw new mm(e)}}}function gm(e,t=Pm){return hm(e,e=>typeof e==`string`?Am(t,e.split(`
293
- `)):e)}var _m=qp,vm=qp,ym=qp,bm=qp;function xm(e,t){return bm(e),_m(t),{type:Qp,contents:t,n:e}}function Sm(e){return xm(-1/0,e)}function Cm(e){return xm({type:`root`},e)}function wm(e){return xm(-1,e)}var Tm={type:cm};function Em(e){return ym(e),{type:tm,parts:e}}function Dm(e,t={}){return _m(e),vm(t.expandedStates,!0),{type:em,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Om(e,t){return Dm(e[0],{...t,expandedStates:e})}function km(e,t=``,n={}){return _m(e),t!==``&&_m(t),{type:nm,breakContents:e,flatContents:t,groupId:n.groupId}}function Am(e,t){_m(e),vm(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}var jm={type:om},Mm={type:om,soft:!0},Nm=[{type:om,hard:!0},Tm],Pm=[{type:om,hard:!0,literal:!0},Tm];function Fm(e){return _m(e),{type:im,contents:e}}function Im(e){return(t,n,r)=>{let i=!!r?.backwards;if(n===!1)return!1;let{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 Lm=Im(` `),Rm=e=>e===`
294
- `||e===`\r`||e===`\u2028`||e===`\u2029`;function zm(e,t,n){let r=!!n?.backwards;if(t===!1)return!1;let i=e.charAt(t);if(r){if(e.charAt(t-1)===`\r`&&i===`
295
- `)return t-2;if(Rm(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===`
296
- `)return t+2;if(Rm(i))return t+1}return t}var Bm=zm;function Vm(e,t){let n=t-1;n=Lm(e,n,{backwards:!0}),n=Bm(e,n,{backwards:!0}),n=Lm(e,n,{backwards:!0});let r=Bm(e,n,{backwards:!0});return n!==r}var Hm=Vm,Um=class extends Error{name=`UnexpectedNodeError`;constructor(e,t,n=`type`){super(`Unexpected ${t} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},Wm=`format`,Gm=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/u,Km=/^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/u,qm=/^\s*@(?:format|prettier)\s*$/u,Jm=e=>qm.test(e),Ym=e=>Km.test(e),Xm=e=>Gm.test(e),Zm=e=>`# @${Wm}
290
+ `}};t._defineProperty(y,`defaults`,o),e.Document=y,e.defaultOptions=i,e.scalarOptions=a}),Lp=Dp(e=>{var t=Mp(),n=Ip(),r=Fp(),i=jp(),a=Pp();Np();function o(e,t=!0,i){i===void 0&&typeof t==`string`&&(i=t,t=!0);let a=Object.assign({},n.Document.defaults[n.defaultOptions.version],n.defaultOptions);return new r.Schema(a).createNode(e,t,i)}var s=class extends n.Document{constructor(e){super(Object.assign({},n.defaultOptions,e))}};function c(e,n){let r=[],i;for(let a of t.parse(e)){let e=new s(n);e.parse(a,i),r.push(e),i=e}return r}function l(e,n){let r=t.parse(e),a=new s(n).parse(r[0]);return r.length>1&&a.errors.unshift(new i.YAMLSemanticError(r[1],`Source contains multiple documents; please use YAML.parseAllDocuments()`)),a}function u(e,t){let n=l(e,t);if(n.warnings.forEach(e=>a.warn(e)),n.errors.length>0)throw n.errors[0];return n.toJSON()}function d(e,t){let n=new s(t);return n.contents=e,String(n)}e.YAML={createNode:o,defaultOptions:n.defaultOptions,Document:s,parse:u,parseAllDocuments:c,parseCST:t.parse,parseDocument:l,scalarOptions:n.scalarOptions,stringify:d}}),Rp=Dp((e,t)=>{t.exports=Lp().YAML}),zp=Dp(e=>{var t=Np(),n=jp();e.findPair=t.findPair,e.parseMap=t.resolveMap,e.parseSeq=t.resolveSeq,e.stringifyNumber=t.stringifyNumber,e.stringifyString=t.stringifyString,e.toJSON=t.toJSON,e.Type=n.Type,e.YAMLError=n.YAMLError,e.YAMLReferenceError=n.YAMLReferenceError,e.YAMLSemanticError=n.YAMLSemanticError,e.YAMLSyntaxError=n.YAMLSyntaxError,e.YAMLWarning=n.YAMLWarning}),Bp={};Op(Bp,{__parsePrettierYamlConfig:()=>Q_,languages:()=>tg,options:()=>rg,parsers:()=>ig,printers:()=>Z_});var Vp=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i);function Hp(e){return this[e<0?this.length+e:e]}var Up=Vp(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return Hp}),Wp=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Gp=Vp(`replaceAll`,function(){if(typeof this==`string`)return Wp}),Kp=()=>{},qp=`string`,Jp=`array`,Yp=`cursor`,Xp=`indent`,Zp=`align`,Qp=`trim`,$p=`group`,em=`fill`,tm=`if-break`,nm=`indent-if-break`,rm=`line-suffix`,im=`line-suffix-boundary`,am=`line`,om=`label`,sm=`break-parent`,cm=new Set([Yp,Xp,Zp,Qp,$p,em,tm,nm,rm,im,am,om,sm]);function lm(e){if(typeof e==`string`)return qp;if(Array.isArray(e))return Jp;if(!e)return;let{type:t}=e;if(cm.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}',
291
+ 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([...cm].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
292
+ 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){if(n.has(e))return n.get(e);let t=i(e);return n.set(e,t),t}function i(e){switch(um(e)){case Jp:return t(e.map(r));case em:return t({...e,parts:e.parts.map(r)});case tm:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case $p:{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 Zp:case Xp:case nm:case om:case rm:return t({...e,contents:r(e.contents)});case qp:case Yp:case Qp:case im:case am:case sm:return t(e);default:throw new pm(e)}}}function hm(e,t=Nm){return mm(e,e=>typeof e==`string`?km(t,e.split(`
293
+ `)):e)}var gm=Kp,_m=Kp,vm=Kp,ym=Kp;function bm(e,t){return ym(e),gm(t),{type:Zp,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:sm};function Tm(e){return vm(e),{type:em,parts:e}}function Em(e,t={}){return gm(e),_m(t.expandedStates,!0),{type:$p,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:tm,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:am},jm={type:am,soft:!0},Mm=[{type:am,hard:!0},wm],Nm=[{type:am,hard:!0,literal:!0},wm];function Pm(e){return gm(e),{type:rm,contents:e}}function Fm(e){return(t,n,r)=>{let i=!!r?.backwards;if(n===!1)return!1;let{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===`
294
+ `||e===`\r`||e===`\u2028`||e===`\u2029`;function Rm(e,t,n){let r=!!n?.backwards;if(t===!1)return!1;let i=e.charAt(t);if(r){if(e.charAt(t-1)===`\r`&&i===`
295
+ `)return t-2;if(Lm(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===`
296
+ `)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}},Um=`format`,Wm=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/u,Gm=/^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/u,Km=/^\s*@(?:format|prettier)\s*$/u,qm=e=>Km.test(e),Jm=e=>Gm.test(e),Ym=e=>Wm.test(e),Xm=e=>`# @${Um}
297
297
 
298
- ${e}`;function Qm(e,t){switch(e.type){case`comment`:if(Jm(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}}Qm.ignoredProperties=new Set([`position`]);var $m=Qm;function eh(e,t){let{node:n}=e;if(n.type===`root`&&t.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/u.test(t.filepath))return async e=>{let n=await e(t.originalText,{parser:`json`});return n?[n,Nm]:void 0}}eh.getVisitorKeys=()=>[];var th=eh,nh=null;function rh(e){if(nh!==null&&typeof nh.property){let e=nh;return nh=rh.prototype=null,e}return nh=rh.prototype=e??Object.create(null),new rh}var ih=10;for(let e=0;e<=ih;e++)rh();function ah(e){return rh(e)}function oh(e,t=`type`){ah(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 sh=oh,ch=[[`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`]],lh=sh({root:ch[0],document:[`head`,`body`,`children`,`anchor`,`tag`,`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`],documentHead:ch[0],documentBody:ch[0],directive:ch[1],alias:ch[1],blockLiteral:ch[1],blockFolded:ch[0],plain:ch[0],quoteSingle:ch[1],quoteDouble:ch[1],mapping:ch[0],mappingItem:ch[2],mappingKey:ch[3],mappingValue:ch[3],sequence:ch[0],sequenceItem:ch[3],flowMapping:ch[0],flowMappingItem:ch[2],flowSequence:ch[0],flowSequenceItem:ch[3],comment:ch[1],tag:ch[4],anchor:ch[4]}),uh=e=>e.position.start.offset,dh=e=>e.position.end.offset;function fh(e){return Array.isArray(e)&&e.length>0}var ph=fh;function mh(e,t){return typeof e?.type==`string`&&t.includes(e.type)}function hh(e,t,n){return t(`children`in e?{...e,children:e.children.map(n=>hh(n,t,e))}:e,n)}function gh(e,t,n){Object.defineProperty(e,t,{get:n,enumerable:!1})}function _h(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===`
299
- `&&n++,n===1&&/\S/u.test(e))return!1;if(n===2)return!0}return!1}function vh(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 yh(e){return ph(e.children)?yh(Wp(0,e.children,-1)):e}function bh(e){return e.value.trim()===`prettier-ignore`}function xh(e){let{node:t}=e;if(t.type===`documentBody`){let t=e.parent.head;return Oh(t)&&bh(Wp(0,t.endComments,-1))}return wh(t)&&bh(Wp(0,t.leadingComments,-1))}function Sh(e){return!ph(e.children)&&!Ch(e)}function Ch(e){return wh(e)||Th(e)||Eh(e)||Dh(e)||Oh(e)}function wh(e){return ph(e?.leadingComments)}function Th(e){return ph(e?.middleComments)}function Eh(e){return e?.indicatorComment}function Dh(e){return e?.trailingComment}function Oh(e){return ph(e?.endComments)}function kh(e){return e?e.split(/(?<!^| ) (?! |$)/u):[]}function Ah(e,t,n){let r=t.split(`
300
- `).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=kh(n);t>0&&r[t-1].length>0&&a.length>0&&!(e===`quoteDouble`&&Wp(0,Wp(0,i,-1),-1).endsWith(`\\`))?i[i.length-1]=[...Wp(0,i,-1),...a]:i.push(a)}return n.proseWrap===`never`?i.map(e=>[e.join(` `)]):i}function jh(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(.*)$/su)[1],a;if(e.indent===null){let e=i.match(/^(?<leadingSpace> *)[^\n\r ]/mu);a=e?e.groups.leadingSpace.length:1/0}else a=e.indent-1+t;let o=i.split(`
301
- `).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=kh(t);e>0&&n.length>0&&o[e-1].length>0&&!/^\s/u.test(n[0])&&!/^\s|\s$/u.test(Wp(0,s,-1))?s[s.length-1]=[...Wp(0,s,-1),...n]:s.push(n)}return s=s.map(e=>{let t=[];for(let n of e)t.length>0&&/\s$/u.test(Wp(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 Wp(0,t,-1).length===0?t.slice(0,-1):t;let r=0;for(let e=t.length-1;e>=0&&t[e].length===0;e--)r++;return r===0?t:r>=2&&!n?t.slice(0,-(r-1)):t.slice(0,-r)}}function Mh(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 Nh=new WeakMap;function Ph(e,t){let{node:n,root:r}=e,i;return Nh.has(r)?i=Nh.get(r):(i=new Set,Nh.set(r,i)),!i.has(n.position.end.line)&&(i.add(n.position.end.line),_h(n,t)&&!Fh(e.parent))?Mm:``}function Fh(e){return Oh(e)&&!mh(e,[`documentHead`,`documentBody`,`flowMapping`,`flowSequence`])}function Ih(e,t){return xm(` `.repeat(e),t)}function Lh(e,t,n){let{node:r}=e,i=e.ancestors.filter(e=>e.type===`sequence`||e.type===`mapping`).length,a=vh(e),o=[r.type===`blockFolded`?`>`:`|`];r.indent!==null&&o.push(r.indent.toString()),r.chomping!==`clip`&&o.push(r.chomping===`keep`?`+`:`-`),Eh(r)&&o.push(` `,n(`indicatorComment`));let s=jh(r,{parentIndent:i,isLastDescendant:a,options:t}),c=[];for(let[e,t]of s.entries())e===0&&c.push(Nm),c.push(Em(Am(jm,t))),e===s.length-1?r.chomping===`keep`&&a&&c.push(Sm(t.length===0?Nm:Pm)):c.push(t.length===0?Nm:Cm(Pm));return r.indent===null?o.push(wm(Ih(t.tabWidth,c))):o.push(Sm(Ih(r.indent-1+i,c))),o}var Rh=Lh;function zh(e,t,n){let{node:r}=e,i=r.type===`flowMapping`,a=i?`{`:`[`,o=i?`}`:`]`,s=Mm;i&&r.children.length>0&&t.bracketSpacing&&(s=jm);let c=Wp(0,r.children,-1),l=c?.type===`flowMappingItem`&&Sh(c.key)&&Sh(c.value);return[a,Ih(t.tabWidth,[s,Bh(e,t,n),t.trailingComma===`none`?``:km(`,`),Oh(r)?[Nm,Am(Nm,e.map(n,`endComments`))]:``]),l?``:s,o]}function Bh(e,t,n){return e.map(({isLast:r,node:i,next:a})=>[n(),r?``:[`,`,jm,i.position.start.line===a.position.start.line?``:Ph(e,t.originalText)]],`children`)}function Vh(e,t,n){let{node:r,parent:i}=e,{key:a,value:o}=r,s=Sh(a),c=Sh(o);if(s&&c)return`: `;let l=n(`key`),u=Uh(r)?` `:``;if(c)return r.type===`flowMappingItem`&&i.type===`flowMapping`?l:r.type===`mappingItem`&&Hh(a.content,t)&&!Dh(a.content)&&i.tag?.value!==`tag:yaml.org,2002:set`?[l,u,`:`]:[`? `,Ih(2,l)];let d=n(`value`);if(s)return[`: `,Ih(2,d)];if(wh(o)||!Mh(a.content))return[`? `,Ih(2,l),Nm,...e.map(()=>[n(),Nm],`value`,`leadingComments`),`: `,Ih(2,d)];if(Wh(a.content)&&!wh(a.content)&&!Th(a.content)&&!Dh(a.content)&&!Oh(a)&&!wh(o.content)&&!Th(o.content)&&!Oh(o)&&Hh(o.content,t))return[l,u,`: `,d];let f=Symbol(`mappingKey`),p=Dm([km(`? `),Dm(Ih(2,l),{id:f})]),m=[Nm,`: `,Ih(2,d)],h=[u,`:`];Oh(o)&&o.content&&mh(o.content,[`flowMapping`,`flowSequence`])&&o.content.children.length===0?h.push(` `):wh(o.content)||Oh(o)&&o.content&&!mh(o.content,[`mapping`,`sequence`])||i.type===`mapping`&&Dh(a.content)&&Mh(o.content)||mh(o.content,[`mapping`,`sequence`])&&o.content.tag===null&&o.content.anchor===null?h.push(Nm):o.content?h.push(jm):Dh(o)&&h.push(` `),h.push(d);let g=Ih(t.tabWidth,h);return Hh(a.content,t)&&!wh(a.content)&&!Th(a.content)&&!Dh(a.content)&&!Oh(a)?Om([[l,g]]):Om([[p,km(m,g,{groupId:f})]])}function Hh(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(/\\$/mu.test(t.originalText.slice(e.position.start.offset,e.position.end.offset)))return!1;switch(t.proseWrap){case`never`:return!e.value.includes(`
302
- `);case`always`:return!/[\n ]/u.test(e.value);default:return!1}}function Uh(e){return e.key.content?.type===`alias`}function Wh(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 Gh=Vh;function Kh(e){return hh(e,qh)}function qh(e){switch(e.type){case`document`:gh(e,`head`,()=>e.children[0]),gh(e,`body`,()=>e.children[1]);break;case`documentBody`:case`sequenceItem`:case`flowSequenceItem`:case`mappingKey`:case`mappingValue`:gh(e,`content`,()=>e.children[0]);break;case`mappingItem`:case`flowMappingItem`:gh(e,`key`,()=>e.children[0]),gh(e,`value`,()=>e.children[1])}return e}var Jh=Kh;function Yh(e,t,n){let{node:r}=e,i=[];r.type!==`mappingValue`&&wh(r)&&i.push([Am(Nm,e.map(n,`leadingComments`)),Nm]);let{tag:a,anchor:o}=r;a&&i.push(n(`tag`)),a&&o&&i.push(` `),o&&i.push(n(`anchor`));let s=``;return mh(r,[`mapping`,`sequence`,`comment`,`directive`,`mappingItem`,`sequenceItem`])&&!vh(e)&&(s=Ph(e,t.originalText)),(a||o)&&(mh(r,[`sequence`,`mapping`])&&!Th(r)?i.push(Nm):i.push(` `)),Th(r)&&i.push([r.middleComments.length===1?``:Nm,Am(Nm,e.map(n,`middleComments`)),Nm]),xh(e)?i.push(gm(t.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):i.push(Dm(Xh(e,t,n))),Dh(r)&&!mh(r,[`document`,`documentHead`])&&i.push(Fm([r.type===`mappingValue`&&!r.content?``:` `,e.parent.type===`mappingKey`&&e.getParentNode(2).type===`mapping`&&Mh(r)?``:Tm,n(`trailingComment`)])),Fh(r)&&i.push(Ih(r.type===`sequenceItem`?2:0,[Nm,Am(Nm,e.map(({node:e})=>[Hm(t.originalText,uh(e))?Nm:``,n()],`endComments`))])),i.push(s),i}function Xh(e,t,n){let{node:r}=e;switch(r.type){case`root`:{let t=yh(r),i=!(mh(t,[`blockLiteral`,`blockFolded`])&&t.chomping===`keep`),a=[];return e.each(({node:t,isFirst:r})=>{r||a.push(Nm),a.push(n()),Qh(e)&&(i&&a.push(Nm),a.push(`...`),Dh(t)&&a.push(` `,n(`trailingComment`)))},`children`),i&&a.push(Nm),a}case`document`:{let t=[];return $h(e)&&((r.head.children.length>0||r.head.endComments.length>0)&&t.push(n(`head`)),Dh(r.head)?t.push([`---`,` `,n([`head`,`trailingComment`])]):t.push(`---`)),Zh(r)&&t.push(n(`body`)),Am(Nm,t)}case`documentHead`:return Am(Nm,[...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=yh(r);mh(e,[`blockFolded`,`blockLiteral`])?e.chomping!==`keep`&&(o=[Nm,Nm]):o=mh(Wp(0,i,-1),[`mapping`])&&Hm(t.originalText,uh(a[0]))?[Nm,Nm]:Nm}return[Am(Nm,e.map(n,`children`)),o,Am(Nm,e.map(n,`endComments`))]}case`directive`:return[`%`,Am(` `,[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 eg(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`&&/\\[^"]/u.test(e)){let n=r.type===`quoteDouble`?`"`:`'`;return[n,eg(r.type,e,t),n]}if(e.includes(`"`))return[`'`,eg(r.type,r.type===`quoteDouble`?Kp(0,Kp(0,e,`\\"`,`"`),`'`,`'`.repeat(2)):e,t),`'`];if(e.includes(`'`))return[`"`,eg(r.type,r.type===`quoteSingle`?Kp(0,e,`''`,`'`):e,t),`"`];let n=t.singleQuote?`'`:`"`;return[n,eg(r.type,e,t),n]}case`blockFolded`:case`blockLiteral`:return Rh(e,t,n);case`mapping`:case`sequence`:return Am(Nm,e.map(n,`children`));case`sequenceItem`:return[`- `,Ih(2,r.content?n(`content`):``)];case`mappingKey`:case`mappingValue`:return r.content?n(`content`):``;case`mappingItem`:case`flowMappingItem`:return Gh(e,t,n);case`flowMapping`:return zh(e,t,n);case`flowSequence`:return zh(e,t,n);case`flowSequenceItem`:return n(`content`);default:throw new Um(r,`YAML`)}}function Zh(e){return e.body.children.length>0||Oh(e.body)}function Qh(e){let t=e.node;if(t.documentEndMarker||Dh(t))return!0;if(e.isLast)return!1;let n=e.next;return n.head.children.length>0||Oh(n.head)}function $h(e){let t=e.node;return t.directivesEndMarker||t.head.children.length>0||Oh(t.head)||Dh(t.head)}function eg(e,t,n){return Am(Nm,Ah(e,t,n).map(e=>Em(Am(jm,e))))}var tg={preprocess:Jh,embed:th,print:Yh,massageAstNode:$m,insertPragma:Zm,getVisitorKeys:lh},ng=[{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}],rg={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.`}},ig={bracketSpacing:rg.bracketSpacing,singleQuote:rg.singleQuote,proseWrap:rg.proseWrap},ag={};kp(ag,{yaml:()=>Z_});var og=jp(zp(),1),sg=jp(Bp(),1);sg.default.findPair,sg.default.toJSON,sg.default.parseMap,sg.default.parseSeq,sg.default.stringifyNumber,sg.default.stringifyString,sg.default.Type,sg.default.YAMLError,sg.default.YAMLReferenceError;var cg=sg.default.YAMLSemanticError;sg.default.YAMLSyntaxError,sg.default.YAMLWarning;function lg(e,t=null){`children`in e&&e.children.forEach(t=>lg(t,e)),`anchor`in e&&e.anchor&&lg(e.anchor,e),`tag`in e&&e.tag&&lg(e.tag,e),`leadingComments`in e&&e.leadingComments.forEach(t=>lg(t,e)),`middleComments`in e&&e.middleComments.forEach(t=>lg(t,e)),`indicatorComment`in e&&e.indicatorComment&&lg(e.indicatorComment,e),`trailingComment`in e&&e.trailingComment&&lg(e.trailingComment,e),`endComments`in e&&e.endComments.forEach(t=>lg(t,e)),Object.defineProperty(e,"_parent",{value:t,enumerable:!1})}function ug(e){return`${e.line}:${e.column}`}function dg(e){lg(e);let t=fg(e),n=e.children.slice();e.comments.sort((e,t)=>e.position.start.offset-t.position.end.offset).filter(e=>!e._parent).forEach(e=>{for(;n.length>1&&e.position.start.line>n[0].position.end.line;)n.shift();mg(e,t,n[0])})}function fg(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 pg(t,e),t}function pg(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=>{pg(e,t)})}}function mg(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 ${ug(e.position.start)}`);lg(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=gg(e)?e:t}for(;;){if(hg(a,e)){lg(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){lg(e,n),n.leadingComments.push(e);return}}let a=n.children[1];lg(e,a),a.endComments.push(e)}function hg(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`||gg(e));default:return!1}}function gg(e){return e.position.start!==e.position.end&&(e.children.length===0||e.position.start.offset!==e.children[0].position.start.offset)}function _g(e,t){return{type:e,position:t}}function vg(e,t,n){return{..._g(`root`,e),children:t,comments:n}}function yg(e){switch(e.type){case`DOCUMENT`:for(let t=e.contents.length-1;t>=0;t--)e.contents[t].type===`BLANK_LINE`?e.contents.splice(t,1):yg(e.contents[t]);for(let t=e.directives.length-1;t>=0;t--)e.directives[t].type===`BLANK_LINE`&&e.directives.splice(t,1);break;case`FLOW_MAP`:case`FLOW_SEQ`:case`MAP`:case`SEQ`:for(let t=e.items.length-1;t>=0;t--){let n=e.items[t];`char`in n||(n.type===`BLANK_LINE`?e.items.splice(t,1):yg(n))}break;case`MAP_KEY`:case`MAP_VALUE`:case`SEQ_ITEM`:e.node&&yg(e.node);break;case`ALIAS`:case`BLANK_LINE`:case`BLOCK_FOLDED`:case`BLOCK_LITERAL`:case`COMMENT`:case`DIRECTIVE`:case`PLAIN`:case`QUOTE_DOUBLE`:case`QUOTE_SINGLE`:break;default:throw Error(`Unexpected node type ${JSON.stringify(e.type)}`)}}function bg(e,t){return{start:e,end:t}}function xg(e){return{start:e,end:e}}var Sg;(function(e){e.Tag=`!`,e.Anchor=`&`,e.Comment=`#`})(Sg||={});function Cg(e,t){return{..._g(`anchor`,e),value:t}}function wg(e,t){return{..._g(`comment`,e),value:t}}function Tg(e,t,n){return{anchor:t,tag:e,middleComments:n}}function Eg(e,t){return{..._g(`tag`,e),value:t}}function Dg(e,t,n=()=>!1){let r=e.cstNode,i=[],a=null,o=null,s=null;for(let c of r.props){let l=t.text[c.origStart];switch(l){case Sg.Tag:a||=c,o=Eg(t.transformRange(c),e.tag);break;case Sg.Anchor:a||=c,s=Cg(t.transformRange(c),r.anchor);break;case Sg.Comment:{let e=wg(t.transformRange(c),t.text.slice(c.origStart+1,c.origEnd));t.comments.push(e),!n(e)&&a&&a.origEnd<=c.origStart&&c.origEnd<=r.valueRange.origStart&&i.push(e);break}default:throw Error(`Unexpected leading character ${JSON.stringify(l)}`)}}return Tg(o,s,i)}function Og(){return{leadingComments:[]}}function kg(e=null){return{trailingComment:e}}function Ag(){return{...Og(),...kg()}}function jg(e,t,n){return{..._g(`alias`,e),...Ag(),...t,value:n}}function Mg(e,t){let n=e.cstNode;return jg(t.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),t.transformContent(e),n.rawValue)}function Ng(e){return{...e,type:`blockFolded`}}function Pg(e,t,n,r,i,a){return{..._g(`blockValue`,e),...Og(),...t,chomping:n,indent:r,value:i,indicatorComment:a}}var Fg;(function(e){e.CLIP=`clip`,e.STRIP=`strip`,e.KEEP=`keep`})(Fg||={});function Ig(e,t){let n=e.cstNode,r=n.chomping===`CLIP`?0:1,i=n.header.origEnd-n.header.origStart-1-r!=0,a=t.transformRange({origStart:n.header.origStart,origEnd:n.valueRange.origEnd}),o=null;return Pg(a,Dg(e,t,e=>{if(!(a.start.offset<e.position.start.offset&&e.position.end.offset<a.end.offset))return!1;if(o)throw Error(`Unexpected multiple indicator comments at ${ug(e.position.start)}`);return o=e,!0}),Fg[n.chomping],i?n.blockIndent:null,n.strValue,o)}function Lg(e,t){return Ng(Ig(e,t))}function Rg(e){return{...e,type:`blockLiteral`}}function zg(e,t){return Rg(Ig(e,t))}function Bg(e,t){return wg(t.transformRange(e.range),e.comment)}function Vg(e,t,n){return{..._g(`directive`,e),...Ag(),name:t,parameters:n}}function Hg(e,t){for(let n of e.props){let e=t.text[n.origStart];switch(e){case Sg.Comment:t.comments.push(wg(t.transformRange(n),t.text.slice(n.origStart+1,n.origEnd)));break;default:throw Error(`Unexpected leading character ${JSON.stringify(e)}`)}}}function Ug(e,t){return Hg(e,t),Vg(t.transformRange(e.range),e.name,e.parameters)}function Wg(e,t,n,r,i,a){return{..._g(`document`,e),...kg(a),directivesEndMarker:t,documentEndMarker:n,children:[r,i]}}function Gg(e=[]){return{endComments:e}}function Kg(e,t,n){return{..._g(`documentBody`,e),...Gg(n),children:t?[t]:[]}}function qg(e){return e[e.length-1]}function Jg(e,t){let n=e.match(t);return n?n.index:-1}function Yg(e,t,n){let r=e.cstNode,{comments:i,endComments:a,documentTrailingComment:o,documentHeadTrailingComment:s}=Xg(r,t,n),c=t.transformNode(e.contents),{position:l,documentEndPoint:u}=Zg(r,c,t);return t.comments.push(...i,...a),{documentBody:Kg(l,c,a),documentEndPoint:u,documentTrailingComment:o,documentHeadTrailingComment:s}}function Xg(e,t,n){let r=[],i=[],a=[],o=[],s=!1;for(let i=e.contents.length-1;i>=0;i--){let c=e.contents[i];if(c.type===`COMMENT`){let i=t.transformNode(c);n&&n.line===i.position.start.line?o.unshift(i):s?r.unshift(i):i.position.start.offset>=e.valueRange.origEnd?a.unshift(i):r.unshift(i)}else s=!0}if(a.length>1)throw Error(`Unexpected multiple document trailing comments at ${ug(a[1].position.start)}`);if(o.length>1)throw Error(`Unexpected multiple documentHead trailing comments at ${ug(o[1].position.start)}`);return{comments:r,endComments:i,documentTrailingComment:qg(a)||null,documentHeadTrailingComment:qg(o)||null}}function Zg(e,t,n){let r=Jg(n.text.slice(e.valueRange.origEnd),/^\.\.\./),i=r===-1?e.valueRange.origEnd:Math.max(0,e.valueRange.origEnd-1);n.text[i-1]===`\r`&&i--;let a=n.transformRange({origStart:t===null?i:t.position.start.offset,origEnd:i});return{position:a,documentEndPoint:r===-1?a.end:n.transformOffset(e.valueRange.origEnd+3)}}function Qg(e,t,n,r){return{..._g(`documentHead`,e),...Gg(n),...kg(r),children:t}}function $g(e,t){let n=e.cstNode,{directives:r,comments:i,endComments:a}=e_(n,t),{position:o,documentEndMarkererPoint:s}=t_(n,r,t);return t.comments.push(...i,...a),{createDocumentHeadWithTrailingComment:e=>(e&&t.comments.push(e),Qg(o,r,a,e)),documentHeadEndMarkerPoint:s}}function e_(e,t){let n=[],r=[],i=[],a=!1;for(let o=e.directives.length-1;o>=0;o--){let s=t.transformNode(e.directives[o]);s.type===`comment`?a?r.unshift(s):i.unshift(s):(a=!0,n.unshift(s))}return{directives:n,comments:r,endComments:i}}function t_(e,t,n){let r=Jg(n.text.slice(0,e.valueRange.origStart),/---\s*$/);r>0&&!/[\r\n]/.test(n.text[r-1])&&(r=-1);let i=r===-1?{origStart:e.valueRange.origStart,origEnd:e.valueRange.origStart}:{origStart:r,origEnd:r+3};return t.length!==0&&(i.origStart=t[0].position.start.offset),{position:n.transformRange(i),documentEndMarkererPoint:r===-1?null:n.transformOffset(r)}}function n_(e,t){let{createDocumentHeadWithTrailingComment:n,documentHeadEndMarkerPoint:r}=$g(e,t),{documentBody:i,documentEndPoint:a,documentTrailingComment:o,documentHeadTrailingComment:s}=Yg(e,t,r),c=n(s);o&&t.comments.push(o);let l=e.cstNode;return Wg(bg(c.position.start,a),!!l.directivesEndMarker,!!l.documentEndMarker,c,i,o)}function r_(e,t,n){return{..._g(`flowCollection`,e),...Ag(),...Gg(),...t,children:n}}function i_(e,t,n){return{...r_(e,t,n),type:`flowMapping`}}function a_(e,t,n){return{..._g(`flowMappingItem`,e),...Og(),children:[t,n]}}function o_(e,t){let n=[];for(let r of e)r&&`type`in r&&r.type===`COMMENT`?t.comments.push(t.transformNode(r)):n.push(r);return n}function s_(e){let[t,n]=[`?`,`:`].map(t=>{let n=e.find(e=>`char`in e&&e.char===t);return n?{origStart:n.origOffset,origEnd:n.origOffset+1}:null});return{additionalKeyRange:t,additionalValueRange:n}}function c_(e,t){let n=t;return t=>e.slice(n,n=t)}function l_(e){let t=[],n=c_(e,1),r=!1;for(let i=1;i<e.length-1;i++){let a=e[i];if(`char`in a&&a.char===`,`){t.push(n(i)),n(i+1),r=!1;continue}r=!0}return r&&t.push(n(e.length-1)),t}function u_(e,t){return{..._g(`mappingKey`,e),...kg(),...Gg(),children:t?[t]:[]}}function d_(e,t){return{..._g(`mappingValue`,e),...Ag(),...Gg(),children:t?[t]:[]}}function f_(e,t,n,r,i){let a=t.transformNode(e.key),o=t.transformNode(e.value),s=a||r?u_(t.transformRange({origStart:r?r.origStart:a.position.start.offset,origEnd:a?a.position.end.offset:r.origStart+1}),a):null,c=o||i?d_(t.transformRange({origStart:i?i.origStart:o.position.start.offset,origEnd:o?o.position.end.offset:i.origStart+1}),o):null;return n(bg(s?s.position.start:c.position.start,c?c.position.end:s.position.end),s||u_(xg(c.position.start),null),c||d_(xg(s.position.end),null))}function p_(e,t){let n=o_(e.cstNode.items,t),r=l_(n),i=e.items.map((e,n)=>{let i=r[n],{additionalKeyRange:a,additionalValueRange:o}=s_(i);return f_(e,t,a_,a,o)}),a=n[0],o=qg(n);return i_(t.transformRange({origStart:a.origOffset,origEnd:o.origOffset+1}),t.transformContent(e),i)}function m_(e,t,n){return{...r_(e,t,n),type:`flowSequence`}}function h_(e,t){return{..._g(`flowSequenceItem`,e),children:[t]}}function g_(e,t){let n=o_(e.cstNode.items,t),r=l_(n),i=e.items.map((e,n)=>{if(e.type!==`PAIR`){let n=t.transformNode(e);return h_(bg(n.position.start,n.position.end),n)}{let i=r[n],{additionalKeyRange:a,additionalValueRange:o}=s_(i);return f_(e,t,a_,a,o)}}),a=n[0],o=qg(n);return m_(t.transformRange({origStart:a.origOffset,origEnd:o.origOffset+1}),t.transformContent(e),i)}function __(e,t,n){return{..._g(`mapping`,e),...Og(),...t,children:n}}function v_(e,t,n){return{..._g(`mappingItem`,e),...Og(),children:[t,n]}}function y_(e,t){let n=e.cstNode;n.items.filter(e=>e.type===`MAP_KEY`||e.type===`MAP_VALUE`).forEach(e=>Hg(e,t));let r=b_(o_(n.items,t)),i=e.items.map((e,n)=>{let i=r[n],[a,o]=i[0].type===`MAP_VALUE`?[null,i[0].range]:[i[0].range,i.length===1?null:i[1].range];return f_(e,t,v_,a,o)});return __(bg(i[0].position.start,qg(i).position.end),t.transformContent(e),i)}function b_(e){let t=[],n=c_(e,0),r=!1;for(let i=0;i<e.length;i++){if(e[i].type===`MAP_VALUE`){t.push(n(i+1)),r=!1;continue}r&&t.push(n(i)),r=!0}return r&&t.push(n(1/0)),t}function x_(e,t,n){return{..._g(`plain`,e),...Ag(),...t,value:n}}function S_(e,t,n){for(let r=t;r>=0;r--)if(n.test(e[r]))return r;return-1}function C_(e,t){let n=e.cstNode;return x_(t.transformRange({origStart:n.valueRange.origStart,origEnd:S_(t.text,n.valueRange.origEnd-1,/\S/)+1}),t.transformContent(e),n.strValue)}function w_(e){return{...e,type:`quoteDouble`}}function T_(e,t,n){return{..._g(`quoteValue`,e),...t,...Ag(),value:n}}function E_(e,t){let n=e.cstNode;return T_(t.transformRange(n.valueRange),t.transformContent(e),n.strValue)}function D_(e,t){return w_(E_(e,t))}function O_(e){return{...e,type:`quoteSingle`}}function k_(e,t){return O_(E_(e,t))}function A_(e,t,n){return{..._g(`sequence`,e),...Og(),...Gg(),...t,children:n}}function j_(e,t){return{..._g(`sequenceItem`,e),...Ag(),...Gg(),children:t?[t]:[]}}function M_(e,t){let n=o_(e.cstNode.items,t).map((n,r)=>{Hg(n,t);let i=t.transformNode(e.items[r]);return j_(bg(t.transformOffset(n.valueRange.origStart),i===null?t.transformOffset(n.valueRange.origStart+1):i.position.end),i)});return A_(bg(n[0].position.start,qg(n).position.end),t.transformContent(e),n)}function N_(e,t){if(e===null||e.type===void 0&&e.value===null)return null;switch(e.type){case`ALIAS`:return Mg(e,t);case`BLOCK_FOLDED`:return Lg(e,t);case`BLOCK_LITERAL`:return zg(e,t);case`COMMENT`:return Bg(e,t);case`DIRECTIVE`:return Ug(e,t);case`DOCUMENT`:return n_(e,t);case`FLOW_MAP`:return p_(e,t);case`FLOW_SEQ`:return g_(e,t);case`MAP`:return y_(e,t);case`PLAIN`:return C_(e,t);case`QUOTE_DOUBLE`:return D_(e,t);case`QUOTE_SINGLE`:return k_(e,t);case`SEQ`:return M_(e,t);default:throw Error(`Unexpected node type ${e.type}`)}}var P_,F_=class{text;comments=[];#e;#t;constructor(e,t){this.text=t,this.#e=e}setOrigRanges(){if(!this.#e.setOrigRanges())for(let e of this.#e)e.setOrigRanges([],0)}#n(e){if(!P_){let[e]=this.#e,t=Object.getPrototypeOf(Object.getPrototypeOf(e));P_=Object.getOwnPropertyDescriptor(t,`rangeAsLinePos`).get}if(this.#t??={root:{context:{src:this.text}}},this.text===``&&e.origStart===0&&e.origEnd===0)return{start:{offset:0,line:1,column:1},end:{offset:0,line:1,column:1}};let{start:{line:t,col:n},end:{line:r,col:i}}=P_.call({range:{start:this.#r(e.origStart),end:this.#r(e.origEnd)},context:this.#t});return{start:{offset:e.origStart,line:t,column:n},end:{offset:e.origEnd,line:r,column:i}}}#r(e){return e<0?0:e>this.text.length?this.text.length:e}transformOffset(e){return this.#n({origStart:e,origEnd:e}).start}transformRange(e){let{start:t,end:n}=this.#n(e);return bg(t,n)}transformNode(e){return N_(e,this)}transformContent(e){return Dg(e,this)}};function I_(e,t,n){let r=SyntaxError(e);return r.name=`YAMLSyntaxError`,r.source=t,r.position=n,r}function L_(e,t){let n=e.source.range||e.source.valueRange;return I_(e.message,t.text,t.transformRange(n))}function R_(e){if(`children`in e){if(e.children.length===1){let t=e.children[0];if(t.type===`plain`&&t.tag===null&&t.anchor===null&&t.value===``)return e.children.splice(0,1),e}e.children.forEach(R_)}return e}function z_(e,t,n,r){let i=t(e);return t=>{r(i,t)&&n(e,i=t)}}function B_(e){if(e===null||!(`children`in e))return;let t=e.children;if(t.forEach(B_),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=z_(e.position,V_,H_,G_),r=z_(e.position,U_,W_,K_);`endComments`in e&&e.endComments.length!==0&&(n(e.endComments[0].position.start),r(qg(e.endComments).position.end));let i=t.filter(e=>e!==null);if(i.length!==0){let e=i[0],t=qg(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 V_(e){return e.start}function H_(e,t){e.start=t}function U_(e){return e.end}function W_(e,t){e.end=t}function G_(e,t){return t.offset<e.offset}function K_(e,t){return t.offset>e.offset}function q_(e){let t=og.default.parseCST(e),n=new F_(t,e);n.setOrigRanges();let r=t.map(e=>new og.default.Document({merge:!1,keepCstNodes:!0}).parse(e));for(let e of r)for(let t of e.errors)if(!(t instanceof cg&&t.message===`Map keys must be unique; "<<" is repeated`))throw L_(t,n);r.forEach(e=>yg(e.cstNode));let i=vg(n.transformRange({origStart:0,origEnd:e.length}),r.map(e=>n.transformNode(e)),n.comments);return dg(i),B_(i),R_(i),i}function J_(e,t){let n=SyntaxError(e+` (`+t.loc.start.line+`:`+t.loc.start.column+`)`);return Object.assign(n,t)}var Y_=J_;function X_(e){try{let t=q_(e);return delete t.comments,t}catch(e){throw e?.position?Y_(e.message,{loc:e.position,cause:e}):e}}var Z_={astFormat:`yaml`,parse:X_,hasPragma:Ym,hasIgnorePragma:Xm,locStart:uh,locEnd:dh},Q_={yaml:tg},$_=jp(zp(),1).default.parse,ev=t({default:()=>rv,languages:()=>UA,options:()=>VA,printers:()=>HA}),tv=Object.defineProperty,nv=(e,t)=>{for(var n in t)tv(e,n,{get:t[n],enumerable:!0})},rv={};nv(rv,{languages:()=>UA,options:()=>VA,printers:()=>HA});var iv=[{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:[`chakra`,`d8`,`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:[`chakra`,`d8`,`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`,codemirrorMode:`jsx`,codemirrorMimeType:`text/typescript-jsx`,group:`TypeScript`,parsers:[`typescript`,`babel-ts`],vscodeLanguageIds:[`typescriptreact`],linguistLanguageId:94901924}],av={};nv(av,{canAttachComment:()=>nx,embed:()=>Tw,features:()=>AA,getVisitorKeys:()=>ly,handleComments:()=>uS,hasPrettierIgnore:()=>UD,insertPragma:()=>Ww,isBlockComment:()=>py,isGap:()=>fS,massageAstNode:()=>Yb,print:()=>kA,printComment:()=>Yw,printPrettierIgnored:()=>kA,willPrintOwnComments:()=>hS});var ov=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),sv=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},cv=ov(`replaceAll`,function(){if(typeof this==`string`)return sv});function lv(e){return this[e<0?this.length+e:e]}var uv=ov(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return lv});function dv(e){return typeof e==`object`&&!!e}var fv=dv;function*pv(e,t){let{getVisitorKeys:n,filter:r=()=>!0}=t,i=e=>fv(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*mv(e,t){let n=[e];for(let e=0;e<n.length;e++){let r=n[e];for(let e of pv(r,t))yield e,n.push(e)}}function hv(e,{getVisitorKeys:t,predicate:n}){for(let r of mv(e,{getVisitorKeys:t}))if(n(r))return!0;return!1}var gv=()=>/[#*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;function _v(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function vv(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var yv=`©®‼⁉™ℹ↔↕↖↗↘↙↩↪⌨⏏⏱⏲⏸⏹⏺▪▫▶◀◻◼☀☁☂☃☄☎☑☘☝☠☢☣☦☪☮☯☸☹☺♀♂♟♠♣♥♦♨♻♾⚒⚔⚕⚖⚗⚙⚛⚜⚠⚧⚰⚱⛈⛏⛑⛓⛩⛱⛷⛸⛹✂✈✉✌✍✏✒✔✖✝✡✳✴❄❇❣❤➡⤴⤵⬅⬆⬇`,bv=/[^\x20-\x7F]/u,xv=new Set(yv);function Sv(e){if(!e)return 0;if(!bv.test(e))return e.length;e=e.replace(gv(),e=>xv.has(e)?` `:` `);let t=0;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+=_v(e)||vv(e)?2:1)}return t}var Cv=Sv;function wv(e){return(t,n,r)=>{let i=!!r?.backwards;if(n===!1)return!1;let{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 Tv=wv(` `),Ev=wv(`,; `),Dv=wv(/[^\n\r]/u),Ov=e=>e===`
303
- `||e===`\r`||e===`\u2028`||e===`\u2029`;function kv(e,t,n){let r=!!n?.backwards;if(t===!1)return!1;let i=e.charAt(t);if(r){if(e.charAt(t-1)===`\r`&&i===`
304
- `)return t-2;if(Ov(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===`
305
- `)return t+2;if(Ov(i))return t+1}return t}var Av=kv;function jv(e,t,n={}){let r=Tv(e,n.backwards?t-1:t,n);return r!==Av(e,r,n)}var Mv=jv;function Nv(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 Pv=Nv;function Fv(e,t){return t===!1?!1:e.charAt(t)===`/`&&e.charAt(t+1)===`/`?Dv(e,t):t}var Iv=Fv;function Lv(e,t){let n=null,r=t;for(;r!==n;)n=r,r=Ev(e,r),r=Pv(e,r),r=Tv(e,r);return r=Iv(e,r),r=Av(e,r),r!==!1&&Mv(e,r)}var Rv=Lv;function zv(e){return Array.isArray(e)&&e.length>0}var Bv=zv,Vv=()=>{},Hv=Object.freeze({character:`'`,codePoint:39}),Uv=Object.freeze({character:`"`,codePoint:34}),Wv=Object.freeze({preferred:Hv,alternate:Uv}),Gv=Object.freeze({preferred:Uv,alternate:Hv});function Kv(e,t){let{preferred:n,alternate:r}=t===!0||t===`'`?Wv:Gv,{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 qv=Kv,Jv=/\\(["'\\])|(["'])/gu;function Yv(e,t){let n=t===`"`?`'`:`"`;return t+cv(0,e,Jv,(e,r,i)=>r?r===n?n:e:i===t?`\\`+i:i)+t}var Xv=Yv;function Zv(e,t){/^(?<quote>["']).*\k<quote>$/su.test(e);let n=e.slice(1,-1),r=t.parser===`json`||t.parser===`jsonc`||t.parser===`json5`&&t.quoteProps===`preserve`&&!t.singleQuote?`"`:t.__isInHtmlAttribute?`'`:qv(n,t.singleQuote);return e.charAt(0)===r?e:Xv(n,r)}var Qv=Zv,$v=e=>Number.isInteger(e)&&e>=0;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}function H(e){return e.range?.[1]??e.end}function ey(e,t){let n=V(e);return $v(n)&&n===V(t)}function ty(e,t){let n=H(e);return $v(n)&&n===H(t)}function ny(e,t){return ey(e,t)&&ty(e,t)}var ry=null;function iy(e){if(ry!==null&&typeof ry.property){let e=ry;return ry=iy.prototype=null,e}return ry=iy.prototype=e??Object.create(null),new iy}var ay=10;for(let e=0;e<=ay;e++)iy();function oy(e){return iy(e)}function sy(e,t=`type`){oy(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 cy=sy,U=[[`decorators`,`key`,`typeAnnotation`,`value`],[],[`elementType`],[`expression`],[`expression`,`typeAnnotation`],[`left`,`right`],[`argument`],[`directives`,`body`],[`label`],[`callee`,`typeArguments`,`arguments`],[`body`],[`decorators`,`id`,`typeParameters`,`superClass`,`superTypeArguments`,`mixins`,`implements`,`body`,`superTypeParameters`],[`id`,`typeParameters`],[`decorators`,`key`,`typeParameters`,`params`,`returnType`,`body`],[`decorators`,`variance`,`key`,`typeAnnotation`,`value`],[`name`,`typeAnnotation`],[`test`,`consequent`,`alternate`],[`checkType`,`extendsType`,`trueType`,`falseType`],[`value`],[`id`,`body`],[`declaration`,`specifiers`,`source`,`attributes`],[`id`],[`id`,`typeParameters`,`extends`,`body`],[`typeAnnotation`],[`id`,`typeParameters`,`right`],[`body`,`test`],[`members`],[`id`,`init`],[`exported`],[`left`,`right`,`body`],[`id`,`typeParameters`,`params`,`predicate`,`returnType`,`body`],[`id`,`params`,`body`,`typeParameters`,`returnType`],[`key`,`value`],[`local`],[`objectType`,`indexType`],[`typeParameter`],[`types`],[`node`],[`object`,`property`],[`argument`,`cases`],[`pattern`,`body`,`guard`],[`literal`],[`decorators`,`key`,`value`],[`expressions`],[`qualification`,`id`],[`decorators`,`key`,`typeAnnotation`],[`typeParameters`,`params`,`returnType`],[`expression`,`typeArguments`],[`params`],[`parameterName`,`typeAnnotation`]],ly=cy({AccessorProperty:U[0],AnyTypeAnnotation:U[1],ArgumentPlaceholder:U[1],ArrayExpression:[`elements`],ArrayPattern:[`elements`,`typeAnnotation`,`decorators`],ArrayTypeAnnotation:U[2],ArrowFunctionExpression:[`typeParameters`,`params`,`predicate`,`returnType`,`body`],AsConstExpression:U[3],AsExpression:U[4],AssignmentExpression:U[5],AssignmentPattern:[`left`,`right`,`decorators`,`typeAnnotation`],AwaitExpression:U[6],BigIntLiteral:U[1],BigIntLiteralTypeAnnotation:U[1],BigIntTypeAnnotation:U[1],BinaryExpression:U[5],BindExpression:[`object`,`callee`],BlockStatement:U[7],BooleanLiteral:U[1],BooleanLiteralTypeAnnotation:U[1],BooleanTypeAnnotation:U[1],BreakStatement:U[8],CallExpression:U[9],CatchClause:[`param`,`body`],ChainExpression:U[3],ClassAccessorProperty:U[0],ClassBody:U[10],ClassDeclaration:U[11],ClassExpression:U[11],ClassImplements:U[12],ClassMethod:U[13],ClassPrivateMethod:U[13],ClassPrivateProperty:U[14],ClassProperty:U[14],ComponentDeclaration:[`id`,`params`,`body`,`typeParameters`,`rendersType`],ComponentParameter:[`name`,`local`],ComponentTypeAnnotation:[`params`,`rest`,`typeParameters`,`rendersType`],ComponentTypeParameter:U[15],ConditionalExpression:U[16],ConditionalTypeAnnotation:U[17],ContinueStatement:U[8],DebuggerStatement:U[1],DeclareClass:[`id`,`typeParameters`,`extends`,`mixins`,`implements`,`body`],DeclareComponent:[`id`,`params`,`rest`,`typeParameters`,`rendersType`],DeclaredPredicate:U[18],DeclareEnum:U[19],DeclareExportAllDeclaration:[`source`,`attributes`],DeclareExportDeclaration:U[20],DeclareFunction:[`id`,`predicate`],DeclareHook:U[21],DeclareInterface:U[22],DeclareModule:U[19],DeclareModuleExports:U[23],DeclareNamespace:U[19],DeclareOpaqueType:[`id`,`typeParameters`,`supertype`,`lowerBound`,`upperBound`],DeclareTypeAlias:U[24],DeclareVariable:U[21],Decorator:U[3],Directive:U[18],DirectiveLiteral:U[1],DoExpression:U[10],DoWhileStatement:U[25],EmptyStatement:U[1],EmptyTypeAnnotation:U[1],EnumBigIntBody:U[26],EnumBigIntMember:U[27],EnumBooleanBody:U[26],EnumBooleanMember:U[27],EnumDeclaration:U[19],EnumDefaultedMember:U[21],EnumNumberBody:U[26],EnumNumberMember:U[27],EnumStringBody:U[26],EnumStringMember:U[27],EnumSymbolBody:U[26],ExistsTypeAnnotation:U[1],ExperimentalRestProperty:U[6],ExperimentalSpreadProperty:U[6],ExportAllDeclaration:[`source`,`attributes`,`exported`],ExportDefaultDeclaration:[`declaration`],ExportDefaultSpecifier:U[28],ExportNamedDeclaration:U[20],ExportNamespaceSpecifier:U[28],ExportSpecifier:[`local`,`exported`],ExpressionStatement:U[3],File:[`program`],ForInStatement:U[29],ForOfStatement:U[29],ForStatement:[`init`,`test`,`update`,`body`],FunctionDeclaration:U[30],FunctionExpression:U[30],FunctionTypeAnnotation:[`typeParameters`,`this`,`params`,`rest`,`returnType`],FunctionTypeParam:U[15],GenericTypeAnnotation:U[12],HookDeclaration:U[31],HookTypeAnnotation:[`params`,`returnType`,`rest`,`typeParameters`],Identifier:[`typeAnnotation`,`decorators`],IfStatement:U[16],ImportAttribute:U[32],ImportDeclaration:[`specifiers`,`source`,`attributes`],ImportDefaultSpecifier:U[33],ImportExpression:[`source`,`options`],ImportNamespaceSpecifier:U[33],ImportSpecifier:[`imported`,`local`],IndexedAccessType:U[34],InferredPredicate:U[1],InferTypeAnnotation:U[35],InterfaceDeclaration:U[22],InterfaceExtends:U[12],InterfaceTypeAnnotation:[`extends`,`body`],InterpreterDirective:U[1],IntersectionTypeAnnotation:U[36],JsExpressionRoot:U[37],JsonRoot:U[37],JSXAttribute:[`name`,`value`],JSXClosingElement:[`name`],JSXClosingFragment:U[1],JSXElement:[`openingElement`,`children`,`closingElement`],JSXEmptyExpression:U[1],JSXExpressionContainer:U[3],JSXFragment:[`openingFragment`,`children`,`closingFragment`],JSXIdentifier:U[1],JSXMemberExpression:U[38],JSXNamespacedName:[`namespace`,`name`],JSXOpeningElement:[`name`,`typeArguments`,`attributes`],JSXOpeningFragment:U[1],JSXSpreadAttribute:U[6],JSXSpreadChild:U[3],JSXText:U[1],KeyofTypeAnnotation:U[6],LabeledStatement:[`label`,`body`],Literal:U[1],LogicalExpression:U[5],MatchArrayPattern:[`elements`,`rest`],MatchAsPattern:[`pattern`,`target`],MatchBindingPattern:U[21],MatchExpression:U[39],MatchExpressionCase:U[40],MatchIdentifierPattern:U[21],MatchLiteralPattern:U[41],MatchMemberPattern:[`base`,`property`],MatchObjectPattern:[`properties`,`rest`],MatchObjectPatternProperty:[`key`,`pattern`],MatchOrPattern:[`patterns`],MatchRestPattern:U[6],MatchStatement:U[39],MatchStatementCase:U[40],MatchUnaryPattern:U[6],MatchWildcardPattern:U[1],MemberExpression:U[38],MetaProperty:[`meta`,`property`],MethodDefinition:U[42],MixedTypeAnnotation:U[1],ModuleExpression:U[10],NeverTypeAnnotation:U[1],NewExpression:U[9],NGChainedExpression:U[43],NGEmptyExpression:U[1],NGMicrosyntax:U[10],NGMicrosyntaxAs:[`key`,`alias`],NGMicrosyntaxExpression:[`expression`,`alias`],NGMicrosyntaxKey:U[1],NGMicrosyntaxKeyedExpression:[`key`,`expression`],NGMicrosyntaxLet:U[32],NGPipeExpression:[`left`,`right`,`arguments`],NGRoot:U[37],NullableTypeAnnotation:U[23],NullLiteral:U[1],NullLiteralTypeAnnotation:U[1],NumberLiteralTypeAnnotation:U[1],NumberTypeAnnotation:U[1],NumericLiteral:U[1],ObjectExpression:[`properties`],ObjectMethod:U[13],ObjectPattern:[`decorators`,`properties`,`typeAnnotation`],ObjectProperty:U[42],ObjectTypeAnnotation:[`properties`,`indexers`,`callProperties`,`internalSlots`],ObjectTypeCallProperty:U[18],ObjectTypeIndexer:[`variance`,`id`,`key`,`value`],ObjectTypeInternalSlot:[`id`,`value`],ObjectTypeMappedTypeProperty:[`keyTparam`,`propType`,`sourceType`,`variance`],ObjectTypeProperty:[`key`,`value`,`variance`],ObjectTypeSpreadProperty:U[6],OpaqueType:[`id`,`typeParameters`,`supertype`,`impltype`,`lowerBound`,`upperBound`],OptionalCallExpression:U[9],OptionalIndexedAccessType:U[34],OptionalMemberExpression:U[38],ParenthesizedExpression:U[3],PipelineBareFunction:[`callee`],PipelinePrimaryTopicReference:U[1],PipelineTopicExpression:U[3],Placeholder:U[1],PrivateIdentifier:U[1],PrivateName:U[21],Program:U[7],Property:U[32],PropertyDefinition:U[14],QualifiedTypeIdentifier:U[44],QualifiedTypeofIdentifier:U[44],RegExpLiteral:U[1],RestElement:[`argument`,`typeAnnotation`,`decorators`],ReturnStatement:U[6],SatisfiesExpression:U[4],SequenceExpression:U[43],SpreadElement:U[6],StaticBlock:U[10],StringLiteral:U[1],StringLiteralTypeAnnotation:U[1],StringTypeAnnotation:U[1],Super:U[1],SwitchCase:[`test`,`consequent`],SwitchStatement:[`discriminant`,`cases`],SymbolTypeAnnotation:U[1],TaggedTemplateExpression:[`tag`,`typeArguments`,`quasi`],TemplateElement:U[1],TemplateLiteral:[`quasis`,`expressions`],ThisExpression:U[1],ThisTypeAnnotation:U[1],ThrowStatement:U[6],TopicReference:U[1],TryStatement:[`block`,`handler`,`finalizer`],TSAbstractAccessorProperty:U[45],TSAbstractKeyword:U[1],TSAbstractMethodDefinition:U[32],TSAbstractPropertyDefinition:U[45],TSAnyKeyword:U[1],TSArrayType:U[2],TSAsExpression:U[4],TSAsyncKeyword:U[1],TSBigIntKeyword:U[1],TSBooleanKeyword:U[1],TSCallSignatureDeclaration:U[46],TSClassImplements:U[47],TSConditionalType:U[17],TSConstructorType:U[46],TSConstructSignatureDeclaration:U[46],TSDeclareFunction:U[31],TSDeclareKeyword:U[1],TSDeclareMethod:[`decorators`,`key`,`typeParameters`,`params`,`returnType`],TSEmptyBodyFunctionExpression:[`id`,`typeParameters`,`params`,`returnType`],TSEnumBody:U[26],TSEnumDeclaration:U[19],TSEnumMember:[`id`,`initializer`],TSExportAssignment:U[3],TSExportKeyword:U[1],TSExternalModuleReference:U[3],TSFunctionType:U[46],TSImportEqualsDeclaration:[`id`,`moduleReference`],TSImportType:[`options`,`qualifier`,`typeArguments`,`source`],TSIndexedAccessType:U[34],TSIndexSignature:[`parameters`,`typeAnnotation`],TSInferType:U[35],TSInstantiationExpression:U[47],TSInterfaceBody:U[10],TSInterfaceDeclaration:U[22],TSInterfaceHeritage:U[47],TSIntersectionType:U[36],TSIntrinsicKeyword:U[1],TSJSDocAllType:U[1],TSJSDocNonNullableType:U[23],TSJSDocNullableType:U[23],TSJSDocUnknownType:U[1],TSLiteralType:U[41],TSMappedType:[`key`,`constraint`,`nameType`,`typeAnnotation`],TSMethodSignature:[`key`,`typeParameters`,`params`,`returnType`],TSModuleBlock:U[10],TSModuleDeclaration:U[19],TSNamedTupleMember:[`label`,`elementType`],TSNamespaceExportDeclaration:U[21],TSNeverKeyword:U[1],TSNonNullExpression:U[3],TSNullKeyword:U[1],TSNumberKeyword:U[1],TSObjectKeyword:U[1],TSOptionalType:U[23],TSParameterProperty:[`parameter`,`decorators`],TSParenthesizedType:U[23],TSPrivateKeyword:U[1],TSPropertySignature:[`key`,`typeAnnotation`],TSProtectedKeyword:U[1],TSPublicKeyword:U[1],TSQualifiedName:U[5],TSReadonlyKeyword:U[1],TSRestType:U[23],TSSatisfiesExpression:U[4],TSStaticKeyword:U[1],TSStringKeyword:U[1],TSSymbolKeyword:U[1],TSTemplateLiteralType:[`quasis`,`types`],TSThisType:U[1],TSTupleType:[`elementTypes`],TSTypeAliasDeclaration:[`id`,`typeParameters`,`typeAnnotation`],TSTypeAnnotation:U[23],TSTypeAssertion:U[4],TSTypeLiteral:U[26],TSTypeOperator:U[23],TSTypeParameter:[`name`,`constraint`,`default`],TSTypeParameterDeclaration:U[48],TSTypeParameterInstantiation:U[48],TSTypePredicate:U[49],TSTypeQuery:[`exprName`,`typeArguments`],TSTypeReference:[`typeName`,`typeArguments`],TSUndefinedKeyword:U[1],TSUnionType:U[36],TSUnknownKeyword:U[1],TSVoidKeyword:U[1],TupleTypeAnnotation:[`types`,`elementTypes`],TupleTypeLabeledElement:[`label`,`elementType`,`variance`],TupleTypeSpreadElement:[`label`,`typeAnnotation`],TypeAlias:U[24],TypeAnnotation:U[23],TypeCastExpression:U[4],TypeofTypeAnnotation:[`argument`,`typeArguments`],TypeOperator:U[23],TypeParameter:[`bound`,`default`,`variance`],TypeParameterDeclaration:U[48],TypeParameterInstantiation:U[48],TypePredicate:U[49],UnaryExpression:U[6],UndefinedTypeAnnotation:U[1],UnionTypeAnnotation:U[36],UnknownTypeAnnotation:U[1],UpdateExpression:U[6],V8IntrinsicIdentifier:U[1],VariableDeclaration:[`declarations`],VariableDeclarator:U[27],Variance:U[1],VoidPattern:U[1],VoidTypeAnnotation:U[1],WhileStatement:U[25],WithStatement:[`object`,`body`],YieldExpression:U[6]});function uy(e){let t=new Set(e);return e=>t.has(e?.type)}var W=uy;function dy(e){return e.extra?.raw??e.raw}var fy=dy,py=W([`Block`,`CommentBlock`,`MultiLine`]),my=W([`AnyTypeAnnotation`,`ThisTypeAnnotation`,`NumberTypeAnnotation`,`VoidTypeAnnotation`,`BooleanTypeAnnotation`,`BigIntTypeAnnotation`,`SymbolTypeAnnotation`,`StringTypeAnnotation`,`NeverTypeAnnotation`,`UndefinedTypeAnnotation`,`UnknownTypeAnnotation`,`EmptyTypeAnnotation`,`MixedTypeAnnotation`]),hy=W([`Line`,`CommentLine`,`SingleLine`,`HashbangComment`,`HTMLOpen`,`HTMLClose`,`Hashbang`,`InterpreterDirective`]);function gy(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 _y(e,t){return t.some(t=>gy(e,t))}var vy=_y;function yy({type:e}){return e.startsWith(`TS`)&&e.endsWith(`Keyword`)}var by=yy;function xy({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}var Sy=xy;function Cy(e,t){return t(e)||hv(e,{getVisitorKeys:ly,predicate:t})}function wy(e){return e.type===`AssignmentExpression`||e.type===`BinaryExpression`||e.type===`LogicalExpression`||e.type===`NGPipeExpression`||e.type===`ConditionalExpression`||tb(e)||nb(e)||e.type===`SequenceExpression`||e.type===`TaggedTemplateExpression`||e.type===`BindExpression`||e.type===`UpdateExpression`&&!e.prefix||zb(e)||e.type===`TSNonNullExpression`||e.type===`ChainExpression`}function Ty(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function Ey(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.`)}var Dy=W([`ExportDefaultDeclaration`,`DeclareExportDeclaration`,`ExportNamedDeclaration`,`ExportAllDeclaration`,`DeclareExportAllDeclaration`]),Oy=W([`ArrayExpression`]),ky=W([`ObjectExpression`]);function Ay(e){return e.type===`LogicalExpression`&&e.operator===`??`}function jy(e){return e.type===`NumericLiteral`||e.type===`Literal`&&typeof e.value==`number`}function My(e){return e.type===`BooleanLiteral`||e.type===`Literal`&&typeof e.value==`boolean`}function Ny(e){return e.type===`UnaryExpression`&&(e.operator===`+`||e.operator===`-`)&&jy(e.argument)}function Py(e){return!!(e&&(e.type===`StringLiteral`||e.type===`Literal`&&typeof e.value==`string`))}function Fy(e){return e.type===`RegExpLiteral`||e.type===`Literal`&&!!e.regex}var Iy=W([`Literal`,`BooleanLiteral`,`BigIntLiteral`,`DirectiveLiteral`,`NullLiteral`,`NumericLiteral`,`RegExpLiteral`,`StringLiteral`]),Ly=W([`Identifier`,`ThisExpression`,`Super`,`PrivateName`,`PrivateIdentifier`]),Ry=W([`ObjectTypeAnnotation`,`TSTypeLiteral`,`TSMappedType`]),zy=W([`FunctionExpression`,`ArrowFunctionExpression`]);function By(e){return e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`&&e.body.type===`BlockStatement`}function Vy(e){return tb(e)&&e.callee.type===`Identifier`&&[`async`,`inject`,`fakeAsync`,`waitForAsync`].includes(e.callee.name)}var Hy=W([`JSXElement`,`JSXFragment`]);function Uy(e){return e.method&&e.kind===`init`||e.kind===`get`||e.kind===`set`}function Wy(e){return(e.type===`ObjectTypeProperty`||e.type===`ObjectTypeInternalSlot`)&&!e.static&&!e.method&&e.kind!==`get`&&e.kind!==`set`&&e.value.type===`FunctionTypeAnnotation`}function Gy(e){return(e.type===`TypeAnnotation`||e.type===`TSTypeAnnotation`)&&e.typeAnnotation.type===`FunctionTypeAnnotation`&&!e.static&&!ey(e,e.typeAnnotation)}var Ky=W([`BinaryExpression`,`LogicalExpression`,`NGPipeExpression`]);function qy(e){return nb(e)||e.type===`BindExpression`&&!!e.object}var Jy=W([`TSThisType`,`NullLiteralTypeAnnotation`,`BooleanLiteralTypeAnnotation`,`StringLiteralTypeAnnotation`,`BigIntLiteralTypeAnnotation`,`NumberLiteralTypeAnnotation`,`TSLiteralType`,`TSTemplateLiteralType`]);function Yy(e){return by(e)||my(e)||Jy(e)||e.type===`GenericTypeAnnotation`&&!e.typeParameters||e.type===`TSTypeReference`&&!e.typeArguments}function Xy(e){return e.type===`Identifier`&&(e.name===`beforeEach`||e.name===`beforeAll`||e.name===`afterEach`||e.name===`afterAll`)}var Zy=`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 Qy(e){return vy(e,Zy)}function $y(e,t){if(e?.type!==`CallExpression`||e.optional)return!1;let n=kb(e);if(n.length===1){if(Vy(e)&&$y(t))return zy(n[0]);if(Xy(e.callee))return Vy(n[0])}else if((n.length===2||n.length===3)&&(n[0].type===`TemplateLiteral`||Py(n[0]))&&Qy(e.callee))return n[2]&&!jy(n[2])?!1:(n.length===2?zy(n[1]):By(n[1])&&Eb(n[1]).length<=1)||Vy(n[1]);return!1}var eb=e=>t=>(t?.type===`ChainExpression`&&(t=t.expression),e(t)),tb=eb(W([`CallExpression`,`OptionalCallExpression`])),nb=eb(W([`MemberExpression`,`OptionalMemberExpression`]));function rb(e,t=5){return ib(e,t)<=t}function ib(e,t){let n=0;for(let r in e){let i=e[r];if(fv(i)&&typeof i.type==`string`&&(n++,n+=ib(i,t-n)),n>t)return n}return n}var ab=.25;function ob(e,t){let{printWidth:n}=t;if(K(e))return!1;let r=n*ab;if(e.type===`ThisExpression`||e.type===`Identifier`&&e.name.length<=r||Ny(e)&&!K(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:Py(e)?Qv(fy(e),t).length<=r:e.type===`TemplateLiteral`?e.expressions.length===0&&e.quasis[0].value.raw.length<=r&&!e.quasis[0].value.raw.includes(`
306
- `):e.type===`UnaryExpression`?ob(e.argument,{printWidth:n}):e.type===`CallExpression`&&e.arguments.length===0&&e.callee.type===`Identifier`?e.callee.name.length<=r-2:Iy(e)}function sb(e,t){return Hy(t)?Nb(t):K(t,G.Leading,t=>Mv(e,H(t)))}function cb(e){return e.quasis.some(e=>e.value.raw.includes(`
307
- `))}function lb(e,t){return(e.type===`TemplateLiteral`&&cb(e)||e.type===`TaggedTemplateExpression`&&cb(e.quasi))&&!Mv(t,V(e),{backwards:!0})}function ub(e){if(!K(e))return!1;let t=uv(0,Fb(e,G.Dangling),-1);return t&&!py(t)}function db(e){if(e.length<=1)return!1;let t=0;for(let n of e)if(zy(n)){if(t+=1,t>1)return!0}else if(tb(n)){for(let e of kb(n))if(zy(e))return!0}return!1}function fb(e){let{node:t,parent:n,key:r}=e;return r===`callee`&&tb(t)&&tb(n)&&n.arguments.length>0&&t.arguments.length>n.arguments.length}var pb=new Set([`!`,`-`,`+`,`~`]);function mb(e,t=2){if(t<=0)return!1;if(e.type===`ChainExpression`||e.type===`TSNonNullExpression`)return mb(e.expression,t);let n=e=>mb(e,t-1);if(Fy(e))return Cv(e.pattern??e.regex.pattern)<=5;if(Iy(e)||Ly(e)||e.type===`ArgumentPlaceholder`)return!0;if(e.type===`TemplateLiteral`)return e.quasis.every(e=>!e.value.raw.includes(`
308
- `))&&e.expressions.every(n);if(ky(e))return e.properties.every(e=>!e.computed&&(e.shorthand||e.value&&n(e.value)));if(Oy(e))return e.elements.every(e=>e===null||n(e));if(Lb(e)){if(e.type===`ImportExpression`||mb(e.callee,t)){let r=kb(e);return r.length<=t&&r.every(n)}return!1}return nb(e)?mb(e.object,t)&&mb(e.property,t):e.type===`UnaryExpression`&&pb.has(e.operator)||e.type===`UpdateExpression`?mb(e.argument,t):!1}function hb(e,t=`es5`){return e.trailingComma===`es5`&&t===`es5`||e.trailingComma===`all`&&(t===`all`||t===`es5`)}function gb(e,t){switch(e.type){case`BinaryExpression`:case`LogicalExpression`:case`AssignmentExpression`:case`NGPipeExpression`:return gb(e.left,t);case`MemberExpression`:case`OptionalMemberExpression`:return gb(e.object,t);case`TaggedTemplateExpression`:return e.tag.type!==`FunctionExpression`&&gb(e.tag,t);case`CallExpression`:case`OptionalCallExpression`:return e.callee.type!==`FunctionExpression`&&gb(e.callee,t);case`ConditionalExpression`:return gb(e.test,t);case`UpdateExpression`:return!e.prefix&&gb(e.argument,t);case`BindExpression`:return e.object&&gb(e.object,t);case`SequenceExpression`:return gb(e.expressions[0],t);case`ChainExpression`:case`TSSatisfiesExpression`:case`TSAsExpression`:case`TSNonNullExpression`:case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:return gb(e.expression,t);default:return t(e)}}var _b={"==":!0,"!=":!0,"===":!0,"!==":!0},vb={"*":!0,"/":!0,"%":!0},yb={">>":!0,">>>":!0,"<<":!0};function bb(e,t){return!(Sb(t)!==Sb(e)||e===`**`||_b[e]&&_b[t]||t===`%`&&vb[e]||e===`%`&&vb[t]||t!==e&&vb[t]&&vb[e]||yb[e]&&yb[t])}var xb=new Map([[`|>`],[`??`],[`||`],[`&&`],[`|`],[`^`],[`&`],[`==`,`===`,`!=`,`!==`],[`<`,`>`,`<=`,`>=`,`in`,`instanceof`],[`>>`,`<<`,`>>>`],[`+`,`-`],[`*`,`/`,`%`],[`**`]].flatMap((e,t)=>e.map(e=>[e,t])));function Sb(e){return xb.get(e)}function Cb(e){return!!yb[e]||e===`|`||e===`^`||e===`&`}function wb(e){return e.rest?!0:uv(0,Eb(e),-1)?.type===`RestElement`}var Tb=new WeakMap;function Eb(e){if(Tb.has(e))return Tb.get(e);let t=[];return e.this&&t.push(e.this),t.push(...e.params),e.rest&&t.push(e.rest),Tb.set(e,t),t}function Db(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`)}var Ob=new WeakMap;function kb(e){if(Ob.has(e))return Ob.get(e);if(e.type===`ChainExpression`)return kb(e.expression);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,Ob.set(e,t),t}function Ab(e,t){let{node:n}=e;if(n.type===`ChainExpression`)return e.call(()=>Ab(e,t),`expression`);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 jb(e,t){let n=[];if(e.type===`ChainExpression`&&(e=e.expression,n.push(`expression`)),e.type===`ImportExpression`||e.type===`TSImportType`){if(t===0||t===(e.options?-2:-1))return[...n,`source`];if(e.options&&(t===1||t===-1))return[...n,`options`];throw RangeError(`Invalid argument index`)}if(e.type===`TSExternalModuleReference`){if(t===0||t===-1)return[...n,`expression`]}else if(t<0&&(t=e.arguments.length+t),t>=0&&t<e.arguments.length)return[...n,`arguments`,t];throw RangeError(`Invalid argument index`)}function Mb(e){return e.value.trim()===`prettier-ignore`&&!e.unignore}function Nb(e){return e?.prettierIgnore||K(e,G.PrettierIgnore)}var G={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},Pb=(e,t)=>{if(typeof e==`function`&&(t=e,e=0),e||t)return(n,r,i)=>!(e&G.Leading&&!n.leading||e&G.Trailing&&!n.trailing||e&G.Dangling&&(n.leading||n.trailing)||e&G.Block&&!py(n)||e&G.Line&&!hy(n)||e&G.First&&r!==0||e&G.Last&&r!==i.length-1||e&G.PrettierIgnore&&!Mb(n)||t&&!t(n))};function K(e,t,n){if(!Bv(e?.comments))return!1;let r=Pb(t,n);return!r||e.comments.some(r)}function Fb(e,t,n){if(!Array.isArray(e?.comments))return[];let r=Pb(t,n);return r?e.comments.filter(r):e.comments}var Ib=(e,{originalText:t})=>Rv(t,H(e));function Lb(e){return tb(e)||e.type===`NewExpression`||e.type===`ImportExpression`}function Rb(e){return e&&(e.type===`ObjectProperty`||e.type===`Property`&&!Uy(e))}var zb=W([`TSAsExpression`,`TSSatisfiesExpression`,`AsExpression`,`AsConstExpression`,`SatisfiesExpression`]),Bb=W([`TSUnionType`,`UnionTypeAnnotation`]),Vb=W([`TSIntersectionType`,`IntersectionTypeAnnotation`]),Hb=W([`TSConditionalType`,`ConditionalTypeAnnotation`]),Ub=e=>e?.type===`TSAsExpression`&&e.typeAnnotation.type===`TSTypeReference`&&e.typeAnnotation.typeName.type===`Identifier`&&e.typeAnnotation.typeName.name===`const`,Wb=W([`TSTypeAliasDeclaration`,`TypeAlias`]);function Gb({key:e,parent:t}){return!(e===`types`&&Bb(t)||e===`types`&&Vb(t))}var Kb=new Set([`range`,`raw`,`comments`,`leadingComments`,`trailingComments`,`innerComments`,`extra`,`start`,`end`,`loc`,`flags`,`errors`,`tokens`]),qb=e=>{for(let t of e.quasis)delete t.value};function Jb(e,t,n){if(e.type===`Program`&&delete t.sourceType,(e.type===`BigIntLiteral`||e.type===`Literal`)&&e.bigint&&(t.bigint=e.bigint.toLowerCase()),e.type===`EmptyStatement`&&!Sy({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===`Property`||e.type===`ObjectProperty`||e.type===`MethodDefinition`||e.type===`ClassProperty`||e.type===`ClassMethod`||e.type===`PropertyDefinition`||e.type===`TSDeclareMethod`||e.type===`TSPropertySignature`||e.type===`ObjectTypeProperty`||e.type===`ImportAttribute`)&&e.key&&!e.computed){let{key:n}=e;Py(n)||jy(n)?t.key=String(n.value):n.type===`Identifier`&&(t.key=n.name)}if(e.type===`JSXElement`&&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`&&qb(n);e.type===`JSXAttribute`&&e.name.name===`css`&&e.value.type===`JSXExpressionContainer`&&e.value.expression.type===`TemplateLiteral`&&qb(t.value.expression),e.type===`JSXAttribute`&&e.value?.type===`Literal`&&/["']|&quot;|&apos;/u.test(e.value.value)&&(t.value.value=cv(0,e.value.value,/["']|&quot;|&apos;/gu,`"`));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`:Oy(r.value)&&qb(r.value.elements[0]);break;case`template`:r.value.type===`TemplateLiteral`&&qb(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`)&&qb(t.quasi),e.type===`TemplateLiteral`&&qb(t),e.type===`ChainExpression`&&e.expression.type===`TSNonNullExpression`&&(t.type=`TSNonNullExpression`,t.expression.type=`ChainExpression`)}Jb.ignoredProperties=Kb;var Yb=Jb,Xb=W([`File`,`TemplateElement`,`TSEmptyBodyFunctionExpression`,`ChainExpression`]),Zb=(e,[t])=>t?.type===`ComponentParameter`&&t.shorthand&&t.name===e&&t.local!==t.name||t?.type===`MatchObjectPatternProperty`&&t.shorthand&&t.key===e&&t.value!==t.key||t?.type===`ObjectProperty`&&t.shorthand&&t.key===e&&t.value!==t.key||t?.type===`Property`&&t.shorthand&&t.key===e&&!Uy(t)&&t.value!==t.key,Qb=(e,[t])=>!!(e.type===`FunctionExpression`&&t.type===`MethodDefinition`&&t.value===e&&Eb(e).length===0&&!e.returnType&&!Bv(e.typeParameters)&&e.body),$b=(e,[t])=>t?.typeAnnotation===e&&Ub(t),ex=(e,[t,...n])=>$b(e,[t])||t?.typeName===e&&$b(t,n);function tx(e,t){return Xb(e)||Zb(e,t)||Qb(e,t)?!1:e.type===`EmptyStatement`?Sy({node:e,parent:t[0]}):!(ex(e,t)||e.type===`TSTypeAnnotation`&&t[0].type===`TSPropertySignature`)}var nx=tx;function rx(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 ix(e,t){(e.comments??=[]).push(t),t.printed=!1,t.nodeDescription=rx(e)}function ax(e,t){t.leading=!0,t.trailing=!1,ix(e,t)}function ox(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),ix(e,t)}function sx(e,t){t.leading=!1,t.trailing=!0,ix(e,t)}function cx(e,t){let n=null,r=t;for(;r!==n;)n=r,r=Tv(e,r),r=Pv(e,r),r=Iv(e,r),r=Av(e,r);return r}var lx=cx;function ux(e,t){let n=lx(e,t);return n===!1?``:e.charAt(n)}var dx=ux;function fx(e,t,n){for(let r=t;r<n;++r)if(e.charAt(r)===`
309
- `)return!0;return!1}var px=fx,mx=new WeakMap;function hx(e){return mx.has(e)||mx.set(e,py(e)&&e.value[0]===`*`&&/@(?:type|satisfies)\b/u.test(e.value)),mx.get(e)}var gx=hx,_x=(e,t)=>hy(e)||!px(t,V(e),H(e));function vx(e){return[eS,kx,zx,Rx,Dx,wx,Tx,Ex,jx,qx,Ux,Wx,Kx,Jx,Yx,Nx,Bx,Vx,Ox,iS,tS,sS].some(t=>t(e))}function yx(e){return[Cx,zx,kx,Jx,wx,Tx,Ex,jx,Bx,Hx,Gx,Kx,Qx,Vx,nS,rS,aS,tS,cS,oS,sS].some(t=>t(e))}function bx(e){return[eS,wx,Tx,Lx,Nx,Kx,Ix,Fx,Vx,$x,sS].some(t=>t(e))}function xx(e,t){let n=(e.body||e.properties).find(({type:e})=>e!==`EmptyStatement`);n?ax(n,t):ox(e,t)}function Sx(e,t){e.type===`BlockStatement`?xx(e,t):ax(e,t)}function Cx({comment:e,followingNode:t}){return t&&gx(e)?(ax(t,e),!0):!1}function wx({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){if(n?.type!==`IfStatement`||!r)return!1;if(dx(i,H(e))===`)`)return sx(t,e),!0;if(r.type===`BlockStatement`&&r===n.consequent&&V(e)>=H(t)&&H(e)<=V(r))return ax(r,e),!0;if(t===n.consequent&&r===n.alternate){let a=lx(i,H(n.consequent));if(r.type===`BlockStatement`&&V(e)>=a&&H(e)<=V(r))return ax(r,e),!0;if(V(e)<a||n.alternate.type===`BlockStatement`)return t.type===`BlockStatement`||_x(e,i)&&!px(i,V(t),V(e))?(sx(t,e),!0):(ox(n,e),!0)}return r.type===`BlockStatement`?(xx(r,e),!0):r.type===`IfStatement`?(Sx(r.consequent,e),!0):n.consequent===r&&(ax(r,e),!0)}function Tx({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return n?.type!==`WhileStatement`||!r?!1:dx(i,H(e))===`)`?(sx(t,e),!0):r.type===`BlockStatement`?(xx(r,e),!0):n.body===r&&(ax(r,e),!0)}function Ex({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return n?.type!==`TryStatement`&&n?.type!==`CatchClause`||!r?!1:n.type===`CatchClause`&&t?(sx(t,e),!0):r.type===`BlockStatement`?(xx(r,e),!0):r.type===`TryStatement`?(Sx(r.finalizer,e),!0):r.type===`CatchClause`&&(Sx(r.body,e),!0)}function Dx({comment:e,enclosingNode:t,followingNode:n}){return nb(t)&&n?.type===`Identifier`?(ax(t,e),!0):!1}function Ox({comment:e,enclosingNode:t,followingNode:n,options:r}){return!r.experimentalTernaries||!(t?.type===`ConditionalExpression`||Hb(t))?!1:n?.type===`ConditionalExpression`||Hb(n)?(ox(t,e),!0):!1}function kx({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i,options:a}){let o=t&&!px(i,H(t),V(e));return(!t||!o)&&(n?.type===`ConditionalExpression`||Hb(n))&&r?a.experimentalTernaries&&n.alternate===r&&!(py(e)&&!px(a.originalText,V(e),H(e)))?(ox(n,e),!0):(ax(r,e),!0):!1}var Ax=W([`ClassDeclaration`,`ClassExpression`,`DeclareClass`,`DeclareInterface`,`InterfaceDeclaration`,`TSInterfaceDeclaration`]);function jx({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){if(Ax(n)){if(Bv(n.decorators)&&r?.type!==`Decorator`)return sx(uv(0,n.decorators,-1),e),!0;if(n.body&&r===n.body)return xx(n.body,e),!0;if(r){if(n.superClass&&r===n.superClass&&t&&(t===n.id||t===n.typeParameters))return sx(t,e),!0;for(let i of[`implements`,`extends`,`mixins`])if(n[i]&&r===n[i][0])return t&&(t===n.id||t===n.typeParameters||t===n.superClass)?sx(t,e):ox(n,e,i),!0}}return!1}var Mx=W([`ClassMethod`,`ClassProperty`,`PropertyDefinition`,`TSAbstractPropertyDefinition`,`TSAbstractMethodDefinition`,`TSDeclareMethod`,`MethodDefinition`,`ClassAccessorProperty`,`AccessorProperty`,`TSAbstractAccessorProperty`,`TSParameterProperty`]);function Nx({comment:e,precedingNode:t,enclosingNode:n,text:r}){return n&&t&&dx(r,H(e))===`(`&&(n.type===`Property`||n.type===`TSDeclareMethod`||n.type===`TSAbstractMethodDefinition`)&&t.type===`Identifier`&&n.key===t&&dx(r,H(t))!==`:`||t?.type===`Decorator`&&Mx(n)&&(hy(e)||e.placement===`ownLine`)?(sx(t,e),!0):!1}var Px=W([`FunctionDeclaration`,`FunctionExpression`,`ClassMethod`,`MethodDefinition`,`ObjectMethod`]);function Fx({comment:e,precedingNode:t,enclosingNode:n,text:r}){return dx(r,H(e))===`(`&&t&&Px(n)?(sx(t,e),!0):!1}function Ix({comment:e,enclosingNode:t,text:n}){if(t?.type!==`ArrowFunctionExpression`)return!1;let r=lx(n,H(e));return r!==!1&&n.slice(r,r+2)===`=>`&&(ox(t,e),!0)}function Lx({comment:e,enclosingNode:t,text:n}){return dx(n,H(e))===`)`?t&&(lS(t)&&Eb(t).length===0||Lb(t)&&kb(t).length===0)?(ox(t,e),!0):(t?.type===`MethodDefinition`||t?.type===`TSAbstractMethodDefinition`)&&Eb(t.value).length===0&&(ox(t.value,e),!0):!1}function Rx({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return(t?.type===`ComponentTypeParameter`&&(n?.type===`DeclareComponent`||n?.type===`ComponentTypeAnnotation`)&&r?.type!==`ComponentTypeParameter`||(t?.type===`ComponentParameter`||t?.type===`RestElement`)&&n?.type===`ComponentDeclaration`&&dx(i,H(e))===`)`)&&(sx(t,e),!0)}function zx({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return t?.type===`FunctionTypeParam`&&n?.type===`FunctionTypeAnnotation`&&r?.type!==`FunctionTypeParam`||(t?.type===`Identifier`||t?.type===`AssignmentPattern`||t?.type===`ObjectPattern`||t?.type===`ArrayPattern`||t?.type===`RestElement`||t?.type===`TSParameterProperty`)&&lS(n)&&dx(i,H(e))===`)`?(sx(t,e),!0):!py(e)&&r?.type===`BlockStatement`&&Px(n)&&(n.type===`MethodDefinition`?n.value.body:n.body)===r&&lx(i,H(e))===V(r)?(xx(r,e),!0):!1}function Bx({comment:e,enclosingNode:t}){return t?.type===`LabeledStatement`&&(ax(t,e),!0)}function Vx({comment:e,enclosingNode:t}){return(t?.type===`ContinueStatement`||t?.type===`BreakStatement`)&&!t.label&&(sx(t,e),!0)}function Hx({comment:e,precedingNode:t,enclosingNode:n}){return tb(n)&&t&&n.callee===t&&n.arguments.length>0?(ax(n.arguments[0],e),!0):!1}function Ux({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return Bb(n)?(Mb(e)&&(r.prettierIgnore=!0,e.unignore=!0),t?(sx(t,e),!0):!1):(Bb(r)&&Mb(e)&&(r.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function Wx({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return n&&n.type===`MatchOrPattern`?(Mb(e)&&(r.prettierIgnore=!0,e.unignore=!0),t?(sx(t,e),!0):!1):(r&&r.type===`MatchOrPattern`&&Mb(e)&&(r.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function Gx({comment:e,enclosingNode:t}){return Rb(t)?(ax(t,e),!0):!1}function Kx({comment:e,enclosingNode:t,ast:n,isLastComment:r}){return n?.body?.length===0?(r?ox(n,e):ax(n,e),!0):t?.type===`Program`&&t.body.length===0&&!Bv(t.directives)&&(r?ox(t,e):ax(t,e),!0)}function qx({comment:e,enclosingNode:t,followingNode:n}){return(t?.type===`ForInStatement`||t?.type===`ForOfStatement`)&&n!==t.body&&(ax(t,e),!0)}function Jx({comment:e,precedingNode:t,enclosingNode:n,text:r}){if(n?.type===`ImportSpecifier`||n?.type===`ExportSpecifier`)return ax(n,e),!0;let i=t?.type===`ImportSpecifier`&&n?.type===`ImportDeclaration`,a=t?.type===`ExportSpecifier`&&n?.type===`ExportNamedDeclaration`;return(i||a)&&Mv(r,H(e))?(sx(t,e),!0):!1}function Yx({comment:e,enclosingNode:t}){return t?.type===`AssignmentPattern`&&(ax(t,e),!0)}var Xx=W([`VariableDeclarator`,`AssignmentExpression`,`TypeAlias`,`TSTypeAliasDeclaration`]),Zx=W([`ObjectExpression`,`ArrayExpression`,`TemplateLiteral`,`TaggedTemplateExpression`,`ObjectTypeAnnotation`,`TSTypeLiteral`]);function Qx({comment:e,enclosingNode:t,followingNode:n}){return Xx(t)&&n&&(Zx(n)||py(e))?(ax(n,e),!0):!1}function $x({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)&&dx(i,H(e))===`;`&&(sx(t,e),!0)}function eS({comment:e,enclosingNode:t,followingNode:n}){if(Mb(e)&&t?.type===`TSMappedType`&&n===t.key)return t.prettierIgnore=!0,e.unignore=!0,!0}function tS({comment:e,precedingNode:t,enclosingNode:n}){if(n?.type===`TSMappedType`&&!t)return ox(n,e),!0}function nS({comment:e,enclosingNode:t,followingNode:n}){return!t||t.type!==`SwitchCase`||t.test||!n||n!==t.consequent[0]?!1:(n.type===`BlockStatement`&&hy(e)?xx(n,e):ox(t,e),!0)}function rS({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return Bb(t)&&((n.type===`TSArrayType`||n.type===`ArrayTypeAnnotation`)&&!r||Vb(n))?(sx(uv(0,t.types,-1),e),!0):!1}function iS({comment:e,enclosingNode:t,precedingNode:n,followingNode:r}){if((t?.type===`ObjectPattern`||t?.type===`ArrayPattern`)&&r?.type===`TSTypeAnnotation`)return n?sx(n,e):ox(t,e),!0}function aS({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return!r&&n?.type===`UnaryExpression`&&(t?.type===`LogicalExpression`||t?.type===`BinaryExpression`)&&px(i,V(n.argument),V(t.right))&&_x(e,i)&&!px(i,V(t.right),V(e))?(sx(t.right,e),!0):!1}function oS({enclosingNode:e,followingNode:t,comment:n}){if(e&&(e.type===`TSPropertySignature`||e.type===`ObjectTypeProperty`)&&(Bb(t)||Vb(t)))return ax(t,n),!0}function sS({enclosingNode:e,precedingNode:t,followingNode:n,comment:r,text:i}){if(zb(e)&&t===e.expression&&!_x(r,i))return n?ax(n,r):sx(e,r),!0}function cS({comment:e,enclosingNode:t,followingNode:n,precedingNode:r}){return t&&n&&r&&t.type===`ArrowFunctionExpression`&&t.returnType===r&&(r.type===`TSTypeAnnotation`||r.type===`TypeAnnotation`)?(ax(n,e),!0):!1}var lS=W([`ArrowFunctionExpression`,`FunctionExpression`,`FunctionDeclaration`,`ObjectMethod`,`ClassMethod`,`TSDeclareFunction`,`TSCallSignatureDeclaration`,`TSConstructSignatureDeclaration`,`TSMethodSignature`,`TSConstructorType`,`TSFunctionType`,`TSDeclareMethod`]),uS={endOfLine:yx,ownLine:vx,remaining:bx};function dS(e,{parser:t}){if(t===`flow`||t===`hermes`||t===`babel-flow`)return e=cv(0,e,/[\s(]/gu,``),e===``||e===`/*`||e===`/*::`}var fS=dS,pS=W([`ClassDeclaration`,`ClassExpression`,`DeclareClass`,`DeclareInterface`,`InterfaceDeclaration`,`TSInterfaceDeclaration`]);function mS(e){let{key:t,parent:n}=e;if(t===`types`&&Bb(n)||t===`argument`&&n.type===`JSXSpreadAttribute`||t===`expression`&&n.type===`JSXSpreadChild`||t===`superClass`&&(n.type===`ClassDeclaration`||n.type===`ClassExpression`)||(t===`id`||t===`typeParameters`)&&pS(n)||t===`patterns`&&n.type===`MatchOrPattern`)return!0;let{node:r}=e;return Nb(r)?!1:Bb(r)?Gb(e):!!Hy(r)}var hS=mS,gS=`string`,_S=`array`,vS=`cursor`,yS=`indent`,bS=`align`,xS=`trim`,SS=`group`,CS=`fill`,wS=`if-break`,TS=`indent-if-break`,ES=`line-suffix`,DS=`line-suffix-boundary`,OS=`line`,kS=`label`,AS=`break-parent`,jS=new Set([vS,yS,bS,xS,SS,CS,wS,TS,ES,DS,OS,kS,AS]);function MS(e){if(typeof e==`string`)return gS;if(Array.isArray(e))return _S;if(!e)return;let{type:t}=e;if(jS.has(t))return t}var NS=MS,PS=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function FS(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
310
- Expected it to be 'string' or 'object'.`;if(NS(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=PS([...jS].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
311
- Expected it to be ${r}.`}var IS=class extends Error{name=`InvalidDocError`;constructor(e){super(FS(e)),this.doc=e}},LS={};function RS(e,t,n,r){let i=[e];for(;i.length>0;){let e=i.pop();if(e===LS){n(i.pop());continue}n&&i.push(e,LS);let a=NS(e);if(!a)throw new IS(e);if(t?.(e)!==!1)switch(a){case _S:case CS:{let t=a===_S?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case wS:i.push(e.flatContents,e.breakContents);break;case SS: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 bS:case yS:case TS:case kS:case ES:i.push(e.contents);break;case gS:case vS:case xS:case DS:case OS:case AS:break;default:throw new IS(e)}}}var zS=RS;function BS(e,t){if(typeof e==`string`)return t(e);let n=new Map;return r(e);function r(e){if(n.has(e))return n.get(e);let t=i(e);return n.set(e,t),t}function i(e){switch(NS(e)){case _S:return t(e.map(r));case CS:return t({...e,parts:e.parts.map(r)});case wS:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case SS:{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 bS:case yS:case TS:case kS:case ES:return t({...e,contents:r(e.contents)});case gS:case vS:case xS:case DS:case OS:case AS:return t(e);default:throw new IS(e)}}}function VS(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 zS(e,a),r}function HS(e){if(e.type===SS&&e.break||e.type===OS&&e.hard||e.type===AS)return!0}function US(e){return VS(e,HS,!1)}function WS(e){if(e.length>0){let t=uv(0,e,-1);!t.expandedStates&&!t.break&&(t.break=`propagated`)}return null}function GS(e){let t=new Set,n=[];function r(e){if(e.type===AS&&WS(n),e.type===SS){if(n.push(e),t.has(e))return!1;t.add(e)}}function i(e){e.type===SS&&n.pop().break&&WS(n)}zS(e,r,i,!0)}function KS(e){return e.type===OS&&!e.hard?e.soft?``:` `:e.type===wS?e.flatContents:e}function qS(e){return BS(e,KS)}function JS(e){switch(NS(e)){case CS:if(e.parts.every(e=>e===``))return``;break;case SS:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return``;if(e.contents.type===SS&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case bS:case yS:case TS:case ES:if(!e.contents)return``;break;case wS:if(!e.flatContents&&!e.breakContents)return``;break;case _S:{let t=[];for(let n of e){if(!n)continue;let[e,...r]=Array.isArray(n)?n:[n];typeof e==`string`&&typeof uv(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 gS:case vS:case xS:case DS:case OS:case kS:case AS:break;default:throw new IS(e)}return e}function YS(e){return BS(e,e=>JS(e))}function XS(e,t=gC){return BS(e,e=>typeof e==`string`?X(t,e.split(`
312
- `)):e)}function ZS(e){if(e.type===OS)return!0}function QS(e){return VS(e,ZS,!1)}function $S(e,t){return e.type===kS?{...e,contents:t(e.contents)}:t(e)}function eC(e){let t=!0;return zS(e,e=>{switch(NS(e)){case gS:if(e===``)break;case xS:case DS:case OS:case AS:return t=!1,!1}}),t}var tC=Vv,nC=Vv,rC=Vv,iC=Vv;function q(e){return tC(e),{type:yS,contents:e}}function aC(e,t){return iC(e),tC(t),{type:bS,contents:t,n:e}}function oC(e){return aC(-1/0,e)}function sC(e){return aC(-1,e)}function cC(e,t,n){tC(e);let r=e;if(t>0){for(let e=0;e<Math.floor(t/n);++e)r=q(r);r=aC(t%n,r),r=aC(-1/0,r)}return r}var lC={type:AS},uC={type:vS};function dC(e){return rC(e),{type:CS,parts:e}}function J(e,t={}){return tC(e),nC(t.expandedStates,!0),{type:SS,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function fC(e,t){return J(e[0],{...t,expandedStates:e})}function Y(e,t=``,n={}){return tC(e),t!==``&&tC(t),{type:wS,breakContents:e,flatContents:t,groupId:n.groupId}}function pC(e,t){return tC(e),{type:TS,contents:e,groupId:t.groupId,negate:t.negate}}function X(e,t){tC(e),nC(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}function mC(e,t){return tC(t),e?{type:kS,label:e,contents:t}:t}var Z={type:OS},Q={type:OS,soft:!0},hC={type:OS,hard:!0},$=[hC,lC],gC=[{type:OS,hard:!0,literal:!0},lC];function _C(e){return tC(e),{type:ES,contents:e}}var vC={type:DS},yC=`cr`,bC=`crlf`,xC=`\r`,SC=`\r
313
- `,CC=`
314
- `;function wC(e){return e===yC?xC:e===bC?SC:CC}var TC={type:0},EC={type:1},DC={value:``,length:0,queue:[],get root(){return DC}};function OC(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 kC(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?EC:{type:2,width:t}:{type:3,string:t},OC(e,r,n)}function AC(e,t){return OC(e,TC,t)}function jC(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 MC(e){let t=jC(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}var NC=Symbol(`MODE_BREAK`),PC=Symbol(`MODE_FLAT`),FC=Symbol(`DOC_FILL_PRINTED_LENGTH`);function IC(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=NS(u);switch(d){case gS:u&&(s&&=(l+=` `,--n,!1),l+=u,n-=Cv(u));break;case _S:case CS:{let t=d===_S?u:u.parts,n=u[FC]??0;for(let r=t.length-1;r>=n;r--)c.push({mode:e,doc:t[r]});break}case yS:case bS:case TS:case kS:c.push({mode:e,doc:u.contents});break;case xS:{let{text:e,count:t}=MC(l);l=e,n+=t;break}case SS:{if(a&&u.break)return!1;let t=u.break?NC:e,n=u.expandedStates&&t===NC?uv(0,u.expandedStates,-1):u.contents;c.push({mode:t,doc:n});break}case wS:{let t=(u.groupId?i[u.groupId]||PC:e)===NC?u.breakContents:u.flatContents;t&&c.push({mode:e,doc:t});break}case OS:if(e===NC||u.hard)return!0;u.soft||(s=!0);break;case ES:r=!0;break;case DS:if(r)return!1}}return!1}function LC(e,t){let n=Object.create(null),r=t.printWidth,i=wC(t.endOfLine),a=0,o=[{indent:DC,mode:NC,doc:e}],s=``,c=!1,l=[],u=[],d=[],f=[],p=0;for(GS(e);o.length>0;){let{indent:e,mode:d,doc:f}=o.pop();switch(NS(f)){case gS:{let e=i===`
315
- `?f:cv(0,f,`
316
- `,i);e&&(s+=e,o.length>0&&(a+=Cv(e)));break}case _S:for(let t=f.length-1;t>=0;t--)o.push({indent:e,mode:d,doc:f[t]});break;case vS:if(u.length>=2)throw Error(`There are too many 'cursor' in doc.`);u.push(p+s.length);break;case yS:o.push({indent:AC(e,t),mode:d,doc:f.contents});break;case bS:o.push({indent:kC(e,f.n,t),mode:d,doc:f.contents});break;case xS:_();break;case SS:switch(d){case PC:if(!c){o.push({indent:e,mode:f.break?NC:PC,doc:f.contents});break}case NC:{c=!1;let t={indent:e,mode:PC,doc:f.contents},i=r-a,s=l.length>0;if(!f.break&&IC(t,o,i,s,n))o.push(t);else if(f.expandedStates){let t=uv(0,f.expandedStates,-1);if(f.break){o.push({indent:e,mode:NC,doc:t});break}for(let r=1;r<f.expandedStates.length+1;r++)if(r>=f.expandedStates.length){o.push({indent:e,mode:NC,doc:t});break}else{let t={indent:e,mode:PC,doc:f.expandedStates[r]};if(IC(t,o,i,s,n)){o.push(t);break}}}else o.push({indent:e,mode:NC,doc:f.contents});break}}f.id&&(n[f.id]=uv(0,o,-1).mode);break;case CS:{let t=r-a,i=f[FC]??0,{parts:s}=f,c=s.length-i;if(c===0)break;let u=s[i+0],p=s[i+1],m={indent:e,mode:PC,doc:u},h={indent:e,mode:NC,doc:u},g=IC(m,[],t,l.length>0,n,!0);if(c===1){g?o.push(m):o.push(h);break}let _={indent:e,mode:PC,doc:p},v={indent:e,mode:NC,doc:p};if(c===2){g?o.push(_,m):o.push(v,h);break}let y=s[i+2],b={indent:e,mode:d,doc:{...f,[FC]:i+2}},x=IC({indent:e,mode:PC,doc:[u,p,y]},[],t,l.length>0,n,!0);o.push(b),x?o.push(_,m):g?o.push(v,m):o.push(v,h);break}case wS:case TS:{let t=f.groupId?n[f.groupId]:d;if(t===NC){let t=f.type===wS?f.breakContents:f.negate?f.contents:q(f.contents);t&&o.push({indent:e,mode:d,doc:t})}if(t===PC){let t=f.type===wS?f.flatContents:f.negate?q(f.contents):f.contents;t&&o.push({indent:e,mode:d,doc:t})}break}case ES:l.push({indent:e,mode:d,doc:f.contents});break;case DS:l.length>0&&o.push({indent:e,mode:d,doc:hC});break;case OS:switch(d){case PC:if(f.hard)c=!0;else{f.soft||(s+=` `,a+=1);break}case NC:if(l.length>0){o.push({indent:e,mode:d,doc:f},...l.reverse()),l.length=0;break}f.literal?(s+=i,a=0,e.root&&(e.root.value&&(s+=e.root.value),a=e.root.length)):(_(),s+=i+e.value,a=e.length)}break;case kS:o.push({indent:e,mode:d,doc:f.contents});break;case AS:break;default:throw new IS(f)}o.length===0&&l.length>0&&(o.push(...l.reverse()),l.length=0)}let m=d.join(``)+s,h=[...f,...u];if(h.length!==2)return{formatted:m};let g=h[0];return{formatted:m,cursorNodeStart:g,cursorNodeText:m.slice(g,uv(0,h,-1))};function _(){let{text:e,count:t}=MC(s);e&&(d.push(e),p+=e.length),s=``,a-=t,u.length>0&&(f.push(...u.map(e=>Math.min(e,p))),u.length=0)}}function RC(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 zC=RC;function BC(e,t){let n=e.lastIndexOf(`
317
- `);return n===-1?0:zC(e.slice(n+1).match(/^[\t ]*/u)[0],t)}var VC=BC;function HC(e,t,n){let{node:r}=e;if(r.type===`TemplateLiteral`&&YC(e)){let r=WC(e,t,n);if(r)return r}let i=`expressions`;r.type===`TSTemplateLiteralType`&&(i=`types`);let a=[],o=e.map(n,i);a.push(vC,"`");let s=0;return e.each(({index:e,node:c})=>{if(a.push(n()),c.tail)return;let{tabWidth:l}=t,u=c.value.raw,d=u.includes(`
318
- `)?VC(u,l):s;s=d;let f=o[e],p=r[i][e],m=px(t.originalText,H(c),V(r.quasis[e+1]));if(!m){let e=LC(f,{...t,printWidth:1/0}).formatted;e.includes(`
319
- `)?m=!0:f=e}m&&(K(p)||p.type===`Identifier`||nb(p)||p.type===`ConditionalExpression`||p.type===`SequenceExpression`||zb(p)||Ky(p))&&(f=[q([Q,f]),Q]);let h=d===0&&u.endsWith(`
320
- `)?aC(-1/0,f):cC(f,d,l);a.push(J(["${",h,vC,`}`]))},`quasis`),a.push("`"),a}function UC(e,t,n){let r=n(`quasi`),{node:i}=e,a=``,o=Fb(i.quasi,G.Leading)[0];return o&&(a=px(t.originalText,H(i.typeArguments??i.tag),V(o))?Q:` `),mC(r.label&&{tagged:!0,...r.label},[n(`tag`),n(`typeArguments`),a,vC,r])}function WC(e,t,n){let{node:r}=e,i=r.quasis[0].value.raw.trim().split(/\s*\|\s*/u);if(i.length>1||i.some(e=>e.length>0)){t.__inJestEach=!0;let a=e.map(n,`expressions`);t.__inJestEach=!1;let o=a.map(e=>"${"+LC(e,{...t,printWidth:1/0,endOfLine:`lf`}).formatted+`}`),s=[{hasLineBreak:!1,cells:[]}];for(let e=1;e<r.quasis.length;e++){let t=uv(0,s,-1),n=o[e-1];t.cells.push(n),n.includes(`
298
+ ${e}`;function Zm(e,t){switch(e.type){case`comment`:if(qm(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}}Zm.ignoredProperties=new Set([`position`]);var Qm=Zm;function $m(e,t){let{node:n}=e;if(n.type===`root`&&t.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/u.test(t.filepath))return async e=>{let n=await e(t.originalText,{parser:`json`});return n?[n,Mm]:void 0}}$m.getVisitorKeys=()=>[];var eh=$m,th=null;function nh(e){if(th!==null&&typeof th.property){let e=th;return th=nh.prototype=null,e}return th=nh.prototype=e??Object.create(null),new nh}var rh=10;for(let e=0;e<=rh;e++)nh();function ih(e){return nh(e)}function ah(e,t=`type`){ih(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 oh=ah,sh=[[`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`]],ch=oh({root:sh[0],document:[`head`,`body`,`children`,`anchor`,`tag`,`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`],documentHead:sh[0],documentBody:sh[0],directive:sh[1],alias:sh[1],blockLiteral:sh[1],blockFolded:sh[0],plain:sh[0],quoteSingle:sh[1],quoteDouble:sh[1],mapping:sh[0],mappingItem:sh[2],mappingKey:sh[3],mappingValue:sh[3],sequence:sh[0],sequenceItem:sh[3],flowMapping:sh[0],flowMappingItem:sh[2],flowSequence:sh[0],flowSequenceItem:sh[3],comment:sh[1],tag:sh[4],anchor:sh[4]}),lh=e=>e.position.start.offset,uh=e=>e.position.end.offset;function dh(e){return Array.isArray(e)&&e.length>0}var fh=dh;function ph(e,t){return typeof e?.type==`string`&&t.includes(e.type)}function mh(e,t,n){return t(`children`in e?{...e,children:e.children.map(n=>mh(n,t,e))}:e,n)}function hh(e,t,n){Object.defineProperty(e,t,{get:n,enumerable:!1})}function gh(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===`
299
+ `&&n++,n===1&&/\S/u.test(e))return!1;if(n===2)return!0}return!1}function _h(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 vh(e){return fh(e.children)?vh(Up(0,e.children,-1)):e}function yh(e){return e.value.trim()===`prettier-ignore`}function bh(e){let{node:t}=e;if(t.type===`documentBody`){let t=e.parent.head;return Dh(t)&&yh(Up(0,t.endComments,-1))}return Ch(t)&&yh(Up(0,t.leadingComments,-1))}function xh(e){return!fh(e.children)&&!Sh(e)}function Sh(e){return Ch(e)||wh(e)||Th(e)||Eh(e)||Dh(e)}function Ch(e){return fh(e?.leadingComments)}function wh(e){return fh(e?.middleComments)}function Th(e){return e?.indicatorComment}function Eh(e){return e?.trailingComment}function Dh(e){return fh(e?.endComments)}function Oh(e){return e?e.split(/(?<!^| ) (?! |$)/u):[]}function kh(e,t,n){let r=t.split(`
300
+ `).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=Oh(n);t>0&&r[t-1].length>0&&a.length>0&&!(e===`quoteDouble`&&Up(0,Up(0,i,-1),-1).endsWith(`\\`))?i[i.length-1]=[...Up(0,i,-1),...a]:i.push(a)}return n.proseWrap===`never`?i.map(e=>[e.join(` `)]):i}function Ah(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(.*)$/su)[1],a;if(e.indent===null){let e=i.match(/^(?<leadingSpace> *)[^\n\r ]/mu);a=e?e.groups.leadingSpace.length:1/0}else a=e.indent-1+t;let o=i.split(`
301
+ `).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=Oh(t);e>0&&n.length>0&&o[e-1].length>0&&!/^\s/u.test(n[0])&&!/^\s|\s$/u.test(Up(0,s,-1))?s[s.length-1]=[...Up(0,s,-1),...n]:s.push(n)}return s=s.map(e=>{let t=[];for(let n of e)t.length>0&&/\s$/u.test(Up(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 Up(0,t,-1).length===0?t.slice(0,-1):t;let r=0;for(let e=t.length-1;e>=0&&t[e].length===0;e--)r++;return r===0?t:r>=2&&!n?t.slice(0,-(r-1)):t.slice(0,-r)}}function jh(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 Mh=new WeakMap;function Nh(e,t){let{node:n,root:r}=e,i;return Mh.has(r)?i=Mh.get(r):(i=new Set,Mh.set(r,i)),!i.has(n.position.end.line)&&(i.add(n.position.end.line),gh(n,t)&&!Ph(e.parent))?jm:``}function Ph(e){return Dh(e)&&!ph(e,[`documentHead`,`documentBody`,`flowMapping`,`flowSequence`])}function Fh(e,t){return bm(` `.repeat(e),t)}function Ih(e,t,n){let{node:r}=e,i=e.ancestors.filter(e=>e.type===`sequence`||e.type===`mapping`).length,a=_h(e),o=[r.type===`blockFolded`?`>`:`|`];r.indent!==null&&o.push(r.indent.toString()),r.chomping!==`clip`&&o.push(r.chomping===`keep`?`+`:`-`),Th(r)&&o.push(` `,n(`indicatorComment`));let s=Ah(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(Fh(t.tabWidth,c))):o.push(xm(Fh(r.indent-1+i,c))),o}var Lh=Ih;function Rh(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=Up(0,r.children,-1),l=c?.type===`flowMappingItem`&&xh(c.key)&&xh(c.value);return[a,Fh(t.tabWidth,[s,zh(e,t,n),t.trailingComma===`none`?``:Om(`,`),Dh(r)?[Mm,km(Mm,e.map(n,`endComments`))]:``]),l?``:s,o]}function zh(e,t,n){return e.map(({isLast:r,node:i,next:a})=>[n(),r?``:[`,`,Am,i.position.start.line===a.position.start.line?``:Nh(e,t.originalText)]],`children`)}function Bh(e,t,n){let{node:r,parent:i}=e,{key:a,value:o}=r,s=xh(a),c=xh(o);if(s&&c)return`: `;let l=n(`key`),u=Hh(r)?` `:``;if(c)return r.type===`flowMappingItem`&&i.type===`flowMapping`?l:r.type===`mappingItem`&&Vh(a.content,t)&&!Eh(a.content)&&i.tag?.value!==`tag:yaml.org,2002:set`?[l,u,`:`]:[`? `,Fh(2,l)];let d=n(`value`);if(s)return[`: `,Fh(2,d)];if(Ch(o)||!jh(a.content))return[`? `,Fh(2,l),Mm,...e.map(()=>[n(),Mm],`value`,`leadingComments`),`: `,Fh(2,d)];if(Uh(a.content)&&!Ch(a.content)&&!wh(a.content)&&!Eh(a.content)&&!Dh(a)&&!Ch(o.content)&&!wh(o.content)&&!Dh(o)&&Vh(o.content,t))return[l,u,`: `,d];let f=Symbol(`mappingKey`),p=Em([Om(`? `),Em(Fh(2,l),{id:f})]),m=[Mm,`: `,Fh(2,d)],h=[u,`:`];Dh(o)&&o.content&&ph(o.content,[`flowMapping`,`flowSequence`])&&o.content.children.length===0?h.push(` `):Ch(o.content)||Dh(o)&&o.content&&!ph(o.content,[`mapping`,`sequence`])||i.type===`mapping`&&Eh(a.content)&&jh(o.content)||ph(o.content,[`mapping`,`sequence`])&&o.content.tag===null&&o.content.anchor===null?h.push(Mm):o.content?h.push(Am):Eh(o)&&h.push(` `),h.push(d);let g=Fh(t.tabWidth,h);return Vh(a.content,t)&&!Ch(a.content)&&!wh(a.content)&&!Eh(a.content)&&!Dh(a)?Dm([[l,g]]):Dm([[p,Om(m,g,{groupId:f})]])}function Vh(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(/\\$/mu.test(t.originalText.slice(e.position.start.offset,e.position.end.offset)))return!1;switch(t.proseWrap){case`never`:return!e.value.includes(`
302
+ `);case`always`:return!/[\n ]/u.test(e.value);default:return!1}}function Hh(e){return e.key.content?.type===`alias`}function Uh(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 Wh=Bh;function Gh(e){return mh(e,Kh)}function Kh(e){switch(e.type){case`document`:hh(e,`head`,()=>e.children[0]),hh(e,`body`,()=>e.children[1]);break;case`documentBody`:case`sequenceItem`:case`flowSequenceItem`:case`mappingKey`:case`mappingValue`:hh(e,`content`,()=>e.children[0]);break;case`mappingItem`:case`flowMappingItem`:hh(e,`key`,()=>e.children[0]),hh(e,`value`,()=>e.children[1])}return e}var qh=Gh;function Jh(e,t,n){let{node:r}=e,i=[];r.type!==`mappingValue`&&Ch(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 ph(r,[`mapping`,`sequence`,`comment`,`directive`,`mappingItem`,`sequenceItem`])&&!_h(e)&&(s=Nh(e,t.originalText)),(a||o)&&(ph(r,[`sequence`,`mapping`])&&!wh(r)?i.push(Mm):i.push(` `)),wh(r)&&i.push([r.middleComments.length===1?``:Mm,km(Mm,e.map(n,`middleComments`)),Mm]),bh(e)?i.push(hm(t.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):i.push(Em(Yh(e,t,n))),Eh(r)&&!ph(r,[`document`,`documentHead`])&&i.push(Pm([r.type===`mappingValue`&&!r.content?``:` `,e.parent.type===`mappingKey`&&e.getParentNode(2).type===`mapping`&&jh(r)?``:wm,n(`trailingComment`)])),Ph(r)&&i.push(Fh(r.type===`sequenceItem`?2:0,[Mm,km(Mm,e.map(({node:e})=>[Vm(t.originalText,lh(e))?Mm:``,n()],`endComments`))])),i.push(s),i}function Yh(e,t,n){let{node:r}=e;switch(r.type){case`root`:{let t=vh(r),i=!(ph(t,[`blockLiteral`,`blockFolded`])&&t.chomping===`keep`),a=[];return e.each(({node:t,isFirst:r})=>{r||a.push(Mm),a.push(n()),Zh(e)&&(i&&a.push(Mm),a.push(`...`),Eh(t)&&a.push(` `,n(`trailingComment`)))},`children`),i&&a.push(Mm),a}case`document`:{let t=[];return Qh(e)&&((r.head.children.length>0||r.head.endComments.length>0)&&t.push(n(`head`)),Eh(r.head)?t.push([`---`,` `,n([`head`,`trailingComment`])]):t.push(`---`)),Xh(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=vh(r);ph(e,[`blockFolded`,`blockLiteral`])?e.chomping!==`keep`&&(o=[Mm,Mm]):o=ph(Up(0,i,-1),[`mapping`])&&Vm(t.originalText,lh(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 $h(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`&&/\\[^"]/u.test(e)){let n=r.type===`quoteDouble`?`"`:`'`;return[n,$h(r.type,e,t),n]}if(e.includes(`"`))return[`'`,$h(r.type,r.type===`quoteDouble`?Gp(0,Gp(0,e,`\\"`,`"`),`'`,`'`.repeat(2)):e,t),`'`];if(e.includes(`'`))return[`"`,$h(r.type,r.type===`quoteSingle`?Gp(0,e,`''`,`'`):e,t),`"`];let n=t.singleQuote?`'`:`"`;return[n,$h(r.type,e,t),n]}case`blockFolded`:case`blockLiteral`:return Lh(e,t,n);case`mapping`:case`sequence`:return km(Mm,e.map(n,`children`));case`sequenceItem`:return[`- `,Fh(2,r.content?n(`content`):``)];case`mappingKey`:case`mappingValue`:return r.content?n(`content`):``;case`mappingItem`:case`flowMappingItem`:return Wh(e,t,n);case`flowMapping`:return Rh(e,t,n);case`flowSequence`:return Rh(e,t,n);case`flowSequenceItem`:return n(`content`);default:throw new Hm(r,`YAML`)}}function Xh(e){return e.body.children.length>0||Dh(e.body)}function Zh(e){let t=e.node;if(t.documentEndMarker||Eh(t))return!0;if(e.isLast)return!1;let n=e.next;return n.head.children.length>0||Dh(n.head)}function Qh(e){let t=e.node;return t.directivesEndMarker||t.head.children.length>0||Dh(t.head)||Eh(t.head)}function $h(e,t,n){return km(Mm,kh(e,t,n).map(e=>Tm(km(Am,e))))}var eg={preprocess:qh,embed:eh,print:Jh,massageAstNode:Qm,insertPragma:Xm,getVisitorKeys:ch},tg=[{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}],ng={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.`}},rg={bracketSpacing:ng.bracketSpacing,singleQuote:ng.singleQuote,proseWrap:ng.proseWrap},ig={};Op(ig,{yaml:()=>X_});var ag=Ap(Rp(),1),og=Ap(zp(),1);og.default.findPair,og.default.toJSON,og.default.parseMap,og.default.parseSeq,og.default.stringifyNumber,og.default.stringifyString,og.default.Type,og.default.YAMLError,og.default.YAMLReferenceError;var sg=og.default.YAMLSemanticError;og.default.YAMLSyntaxError,og.default.YAMLWarning;function cg(e,t=null){`children`in e&&e.children.forEach(t=>cg(t,e)),`anchor`in e&&e.anchor&&cg(e.anchor,e),`tag`in e&&e.tag&&cg(e.tag,e),`leadingComments`in e&&e.leadingComments.forEach(t=>cg(t,e)),`middleComments`in e&&e.middleComments.forEach(t=>cg(t,e)),`indicatorComment`in e&&e.indicatorComment&&cg(e.indicatorComment,e),`trailingComment`in e&&e.trailingComment&&cg(e.trailingComment,e),`endComments`in e&&e.endComments.forEach(t=>cg(t,e)),Object.defineProperty(e,"_parent",{value:t,enumerable:!1})}function lg(e){return`${e.line}:${e.column}`}function ug(e){cg(e);let t=dg(e),n=e.children.slice();e.comments.sort((e,t)=>e.position.start.offset-t.position.end.offset).filter(e=>!e._parent).forEach(e=>{for(;n.length>1&&e.position.start.line>n[0].position.end.line;)n.shift();pg(e,t,n[0])})}function dg(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 fg(t,e),t}function fg(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=>{fg(e,t)})}}function pg(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 ${lg(e.position.start)}`);cg(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=hg(e)?e:t}for(;;){if(mg(a,e)){cg(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){cg(e,n),n.leadingComments.push(e);return}}let a=n.children[1];cg(e,a),a.endComments.push(e)}function mg(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`||hg(e));default:return!1}}function hg(e){return e.position.start!==e.position.end&&(e.children.length===0||e.position.start.offset!==e.children[0].position.start.offset)}function gg(e,t){return{type:e,position:t}}function _g(e,t,n){return{...gg(`root`,e),children:t,comments:n}}function vg(e){switch(e.type){case`DOCUMENT`:for(let t=e.contents.length-1;t>=0;t--)e.contents[t].type===`BLANK_LINE`?e.contents.splice(t,1):vg(e.contents[t]);for(let t=e.directives.length-1;t>=0;t--)e.directives[t].type===`BLANK_LINE`&&e.directives.splice(t,1);break;case`FLOW_MAP`:case`FLOW_SEQ`:case`MAP`:case`SEQ`:for(let t=e.items.length-1;t>=0;t--){let n=e.items[t];`char`in n||(n.type===`BLANK_LINE`?e.items.splice(t,1):vg(n))}break;case`MAP_KEY`:case`MAP_VALUE`:case`SEQ_ITEM`:e.node&&vg(e.node);break;case`ALIAS`:case`BLANK_LINE`:case`BLOCK_FOLDED`:case`BLOCK_LITERAL`:case`COMMENT`:case`DIRECTIVE`:case`PLAIN`:case`QUOTE_DOUBLE`:case`QUOTE_SINGLE`:break;default:throw Error(`Unexpected node type ${JSON.stringify(e.type)}`)}}function yg(e,t){return{start:e,end:t}}function bg(e){return{start:e,end:e}}var xg;(function(e){e.Tag=`!`,e.Anchor=`&`,e.Comment=`#`})(xg||={});function Sg(e,t){return{...gg(`anchor`,e),value:t}}function Cg(e,t){return{...gg(`comment`,e),value:t}}function wg(e,t,n){return{anchor:t,tag:e,middleComments:n}}function Tg(e,t){return{...gg(`tag`,e),value:t}}function Eg(e,t,n=()=>!1){let r=e.cstNode,i=[],a=null,o=null,s=null;for(let c of r.props){let l=t.text[c.origStart];switch(l){case xg.Tag:a||=c,o=Tg(t.transformRange(c),e.tag);break;case xg.Anchor:a||=c,s=Sg(t.transformRange(c),r.anchor);break;case xg.Comment:{let e=Cg(t.transformRange(c),t.text.slice(c.origStart+1,c.origEnd));t.comments.push(e),!n(e)&&a&&a.origEnd<=c.origStart&&c.origEnd<=r.valueRange.origStart&&i.push(e);break}default:throw Error(`Unexpected leading character ${JSON.stringify(l)}`)}}return wg(o,s,i)}function Dg(){return{leadingComments:[]}}function Og(e=null){return{trailingComment:e}}function kg(){return{...Dg(),...Og()}}function Ag(e,t,n){return{...gg(`alias`,e),...kg(),...t,value:n}}function jg(e,t){let n=e.cstNode;return Ag(t.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),t.transformContent(e),n.rawValue)}function Mg(e){return{...e,type:`blockFolded`}}function Ng(e,t,n,r,i,a){return{...gg(`blockValue`,e),...Dg(),...t,chomping:n,indent:r,value:i,indicatorComment:a}}var Pg;(function(e){e.CLIP=`clip`,e.STRIP=`strip`,e.KEEP=`keep`})(Pg||={});function Fg(e,t){let n=e.cstNode,r=n.chomping===`CLIP`?0:1,i=n.header.origEnd-n.header.origStart-1-r!=0,a=t.transformRange({origStart:n.header.origStart,origEnd:n.valueRange.origEnd}),o=null;return Ng(a,Eg(e,t,e=>{if(!(a.start.offset<e.position.start.offset&&e.position.end.offset<a.end.offset))return!1;if(o)throw Error(`Unexpected multiple indicator comments at ${lg(e.position.start)}`);return o=e,!0}),Pg[n.chomping],i?n.blockIndent:null,n.strValue,o)}function Ig(e,t){return Mg(Fg(e,t))}function Lg(e){return{...e,type:`blockLiteral`}}function Rg(e,t){return Lg(Fg(e,t))}function zg(e,t){return Cg(t.transformRange(e.range),e.comment)}function Bg(e,t,n){return{...gg(`directive`,e),...kg(),name:t,parameters:n}}function Vg(e,t){for(let n of e.props){let e=t.text[n.origStart];switch(e){case xg.Comment:t.comments.push(Cg(t.transformRange(n),t.text.slice(n.origStart+1,n.origEnd)));break;default:throw Error(`Unexpected leading character ${JSON.stringify(e)}`)}}}function Hg(e,t){return Vg(e,t),Bg(t.transformRange(e.range),e.name,e.parameters)}function Ug(e,t,n,r,i,a){return{...gg(`document`,e),...Og(a),directivesEndMarker:t,documentEndMarker:n,children:[r,i]}}function Wg(e=[]){return{endComments:e}}function Gg(e,t,n){return{...gg(`documentBody`,e),...Wg(n),children:t?[t]:[]}}function Kg(e){return e[e.length-1]}function qg(e,t){let n=e.match(t);return n?n.index:-1}function Jg(e,t,n){let r=e.cstNode,{comments:i,endComments:a,documentTrailingComment:o,documentHeadTrailingComment:s}=Yg(r,t,n),c=t.transformNode(e.contents),{position:l,documentEndPoint:u}=Xg(r,c,t);return t.comments.push(...i,...a),{documentBody:Gg(l,c,a),documentEndPoint:u,documentTrailingComment:o,documentHeadTrailingComment:s}}function Yg(e,t,n){let r=[],i=[],a=[],o=[],s=!1;for(let i=e.contents.length-1;i>=0;i--){let c=e.contents[i];if(c.type===`COMMENT`){let i=t.transformNode(c);n&&n.line===i.position.start.line?o.unshift(i):s?r.unshift(i):i.position.start.offset>=e.valueRange.origEnd?a.unshift(i):r.unshift(i)}else s=!0}if(a.length>1)throw Error(`Unexpected multiple document trailing comments at ${lg(a[1].position.start)}`);if(o.length>1)throw Error(`Unexpected multiple documentHead trailing comments at ${lg(o[1].position.start)}`);return{comments:r,endComments:i,documentTrailingComment:Kg(a)||null,documentHeadTrailingComment:Kg(o)||null}}function Xg(e,t,n){let r=qg(n.text.slice(e.valueRange.origEnd),/^\.\.\./),i=r===-1?e.valueRange.origEnd:Math.max(0,e.valueRange.origEnd-1);n.text[i-1]===`\r`&&i--;let a=n.transformRange({origStart:t===null?i:t.position.start.offset,origEnd:i});return{position:a,documentEndPoint:r===-1?a.end:n.transformOffset(e.valueRange.origEnd+3)}}function Zg(e,t,n,r){return{...gg(`documentHead`,e),...Wg(n),...Og(r),children:t}}function Qg(e,t){let n=e.cstNode,{directives:r,comments:i,endComments:a}=$g(n,t),{position:o,documentEndMarkererPoint:s}=e_(n,r,t);return t.comments.push(...i,...a),{createDocumentHeadWithTrailingComment:e=>(e&&t.comments.push(e),Zg(o,r,a,e)),documentHeadEndMarkerPoint:s}}function $g(e,t){let n=[],r=[],i=[],a=!1;for(let o=e.directives.length-1;o>=0;o--){let s=t.transformNode(e.directives[o]);s.type===`comment`?a?r.unshift(s):i.unshift(s):(a=!0,n.unshift(s))}return{directives:n,comments:r,endComments:i}}function e_(e,t,n){let r=qg(n.text.slice(0,e.valueRange.origStart),/---\s*$/);r>0&&!/[\r\n]/.test(n.text[r-1])&&(r=-1);let i=r===-1?{origStart:e.valueRange.origStart,origEnd:e.valueRange.origStart}:{origStart:r,origEnd:r+3};return t.length!==0&&(i.origStart=t[0].position.start.offset),{position:n.transformRange(i),documentEndMarkererPoint:r===-1?null:n.transformOffset(r)}}function t_(e,t){let{createDocumentHeadWithTrailingComment:n,documentHeadEndMarkerPoint:r}=Qg(e,t),{documentBody:i,documentEndPoint:a,documentTrailingComment:o,documentHeadTrailingComment:s}=Jg(e,t,r),c=n(s);o&&t.comments.push(o);let l=e.cstNode;return Ug(yg(c.position.start,a),!!l.directivesEndMarker,!!l.documentEndMarker,c,i,o)}function n_(e,t,n){return{...gg(`flowCollection`,e),...kg(),...Wg(),...t,children:n}}function r_(e,t,n){return{...n_(e,t,n),type:`flowMapping`}}function i_(e,t,n){return{...gg(`flowMappingItem`,e),...Dg(),children:[t,n]}}function a_(e,t){let n=[];for(let r of e)r&&`type`in r&&r.type===`COMMENT`?t.comments.push(t.transformNode(r)):n.push(r);return n}function o_(e){let[t,n]=[`?`,`:`].map(t=>{let n=e.find(e=>`char`in e&&e.char===t);return n?{origStart:n.origOffset,origEnd:n.origOffset+1}:null});return{additionalKeyRange:t,additionalValueRange:n}}function s_(e,t){let n=t;return t=>e.slice(n,n=t)}function c_(e){let t=[],n=s_(e,1),r=!1;for(let i=1;i<e.length-1;i++){let a=e[i];if(`char`in a&&a.char===`,`){t.push(n(i)),n(i+1),r=!1;continue}r=!0}return r&&t.push(n(e.length-1)),t}function l_(e,t){return{...gg(`mappingKey`,e),...Og(),...Wg(),children:t?[t]:[]}}function u_(e,t){return{...gg(`mappingValue`,e),...kg(),...Wg(),children:t?[t]:[]}}function d_(e,t,n,r,i){let a=t.transformNode(e.key),o=t.transformNode(e.value),s=a||r?l_(t.transformRange({origStart:r?r.origStart:a.position.start.offset,origEnd:a?a.position.end.offset:r.origStart+1}),a):null,c=o||i?u_(t.transformRange({origStart:i?i.origStart:o.position.start.offset,origEnd:o?o.position.end.offset:i.origStart+1}),o):null;return n(yg(s?s.position.start:c.position.start,c?c.position.end:s.position.end),s||l_(bg(c.position.start),null),c||u_(bg(s.position.end),null))}function f_(e,t){let n=a_(e.cstNode.items,t),r=c_(n),i=e.items.map((e,n)=>{let i=r[n],{additionalKeyRange:a,additionalValueRange:o}=o_(i);return d_(e,t,i_,a,o)}),a=n[0],o=Kg(n);return r_(t.transformRange({origStart:a.origOffset,origEnd:o.origOffset+1}),t.transformContent(e),i)}function p_(e,t,n){return{...n_(e,t,n),type:`flowSequence`}}function m_(e,t){return{...gg(`flowSequenceItem`,e),children:[t]}}function h_(e,t){let n=a_(e.cstNode.items,t),r=c_(n),i=e.items.map((e,n)=>{if(e.type!==`PAIR`){let n=t.transformNode(e);return m_(yg(n.position.start,n.position.end),n)}{let i=r[n],{additionalKeyRange:a,additionalValueRange:o}=o_(i);return d_(e,t,i_,a,o)}}),a=n[0],o=Kg(n);return p_(t.transformRange({origStart:a.origOffset,origEnd:o.origOffset+1}),t.transformContent(e),i)}function g_(e,t,n){return{...gg(`mapping`,e),...Dg(),...t,children:n}}function __(e,t,n){return{...gg(`mappingItem`,e),...Dg(),children:[t,n]}}function v_(e,t){let n=e.cstNode;n.items.filter(e=>e.type===`MAP_KEY`||e.type===`MAP_VALUE`).forEach(e=>Vg(e,t));let r=y_(a_(n.items,t)),i=e.items.map((e,n)=>{let i=r[n],[a,o]=i[0].type===`MAP_VALUE`?[null,i[0].range]:[i[0].range,i.length===1?null:i[1].range];return d_(e,t,__,a,o)});return g_(yg(i[0].position.start,Kg(i).position.end),t.transformContent(e),i)}function y_(e){let t=[],n=s_(e,0),r=!1;for(let i=0;i<e.length;i++){if(e[i].type===`MAP_VALUE`){t.push(n(i+1)),r=!1;continue}r&&t.push(n(i)),r=!0}return r&&t.push(n(1/0)),t}function b_(e,t,n){return{...gg(`plain`,e),...kg(),...t,value:n}}function x_(e,t,n){for(let r=t;r>=0;r--)if(n.test(e[r]))return r;return-1}function S_(e,t){let n=e.cstNode;return b_(t.transformRange({origStart:n.valueRange.origStart,origEnd:x_(t.text,n.valueRange.origEnd-1,/\S/)+1}),t.transformContent(e),n.strValue)}function C_(e){return{...e,type:`quoteDouble`}}function w_(e,t,n){return{...gg(`quoteValue`,e),...t,...kg(),value:n}}function T_(e,t){let n=e.cstNode;return w_(t.transformRange(n.valueRange),t.transformContent(e),n.strValue)}function E_(e,t){return C_(T_(e,t))}function D_(e){return{...e,type:`quoteSingle`}}function O_(e,t){return D_(T_(e,t))}function k_(e,t,n){return{...gg(`sequence`,e),...Dg(),...Wg(),...t,children:n}}function A_(e,t){return{...gg(`sequenceItem`,e),...kg(),...Wg(),children:t?[t]:[]}}function j_(e,t){let n=a_(e.cstNode.items,t).map((n,r)=>{Vg(n,t);let i=t.transformNode(e.items[r]);return A_(yg(t.transformOffset(n.valueRange.origStart),i===null?t.transformOffset(n.valueRange.origStart+1):i.position.end),i)});return k_(yg(n[0].position.start,Kg(n).position.end),t.transformContent(e),n)}function M_(e,t){if(e===null||e.type===void 0&&e.value===null)return null;switch(e.type){case`ALIAS`:return jg(e,t);case`BLOCK_FOLDED`:return Ig(e,t);case`BLOCK_LITERAL`:return Rg(e,t);case`COMMENT`:return zg(e,t);case`DIRECTIVE`:return Hg(e,t);case`DOCUMENT`:return t_(e,t);case`FLOW_MAP`:return f_(e,t);case`FLOW_SEQ`:return h_(e,t);case`MAP`:return v_(e,t);case`PLAIN`:return S_(e,t);case`QUOTE_DOUBLE`:return E_(e,t);case`QUOTE_SINGLE`:return O_(e,t);case`SEQ`:return j_(e,t);default:throw Error(`Unexpected node type ${e.type}`)}}var N_,P_=class{text;comments=[];#e;#t;constructor(e,t){this.text=t,this.#e=e}setOrigRanges(){if(!this.#e.setOrigRanges())for(let e of this.#e)e.setOrigRanges([],0)}#n(e){if(!N_){let[e]=this.#e,t=Object.getPrototypeOf(Object.getPrototypeOf(e));N_=Object.getOwnPropertyDescriptor(t,`rangeAsLinePos`).get}if(this.#t??={root:{context:{src:this.text}}},this.text===``&&e.origStart===0&&e.origEnd===0)return{start:{offset:0,line:1,column:1},end:{offset:0,line:1,column:1}};let{start:{line:t,col:n},end:{line:r,col:i}}=N_.call({range:{start:this.#r(e.origStart),end:this.#r(e.origEnd)},context:this.#t});return{start:{offset:e.origStart,line:t,column:n},end:{offset:e.origEnd,line:r,column:i}}}#r(e){return e<0?0:e>this.text.length?this.text.length:e}transformOffset(e){return this.#n({origStart:e,origEnd:e}).start}transformRange(e){let{start:t,end:n}=this.#n(e);return yg(t,n)}transformNode(e){return M_(e,this)}transformContent(e){return Eg(e,this)}};function F_(e,t,n){let r=SyntaxError(e);return r.name=`YAMLSyntaxError`,r.source=t,r.position=n,r}function I_(e,t){let n=e.source.range||e.source.valueRange;return F_(e.message,t.text,t.transformRange(n))}function L_(e){if(`children`in e){if(e.children.length===1){let t=e.children[0];if(t.type===`plain`&&t.tag===null&&t.anchor===null&&t.value===``)return e.children.splice(0,1),e}e.children.forEach(L_)}return e}function R_(e,t,n,r){let i=t(e);return t=>{r(i,t)&&n(e,i=t)}}function z_(e){if(e===null||!(`children`in e))return;let t=e.children;if(t.forEach(z_),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=R_(e.position,B_,V_,W_),r=R_(e.position,H_,U_,G_);`endComments`in e&&e.endComments.length!==0&&(n(e.endComments[0].position.start),r(Kg(e.endComments).position.end));let i=t.filter(e=>e!==null);if(i.length!==0){let e=i[0],t=Kg(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 B_(e){return e.start}function V_(e,t){e.start=t}function H_(e){return e.end}function U_(e,t){e.end=t}function W_(e,t){return t.offset<e.offset}function G_(e,t){return t.offset>e.offset}function K_(e){let t=ag.default.parseCST(e),n=new P_(t,e);n.setOrigRanges();let r=t.map(e=>new ag.default.Document({merge:!1,keepCstNodes:!0}).parse(e));for(let e of r)for(let t of e.errors)if(!(t instanceof sg&&t.message===`Map keys must be unique; "<<" is repeated`))throw I_(t,n);r.forEach(e=>vg(e.cstNode));let i=_g(n.transformRange({origStart:0,origEnd:e.length}),r.map(e=>n.transformNode(e)),n.comments);return ug(i),z_(i),L_(i),i}function q_(e,t){let n=SyntaxError(e+` (`+t.loc.start.line+`:`+t.loc.start.column+`)`);return Object.assign(n,t)}var J_=q_;function Y_(e){try{let t=K_(e);return delete t.comments,t}catch(e){throw e?.position?J_(e.message,{loc:e.position,cause:e}):e}}var X_={astFormat:`yaml`,parse:Y_,hasPragma:Jm,hasIgnorePragma:Ym,locStart:lh,locEnd:uh},Z_={yaml:eg},Q_=Ap(Rp(),1).default.parse,$_=t({default:()=>nv,languages:()=>HA,options:()=>BA,printers:()=>VA}),ev=Object.defineProperty,tv=(e,t)=>{for(var n in t)ev(e,n,{get:t[n],enumerable:!0})},nv={};tv(nv,{languages:()=>HA,options:()=>BA,printers:()=>VA});var rv=[{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:[`chakra`,`d8`,`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:[`chakra`,`d8`,`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`,codemirrorMode:`jsx`,codemirrorMimeType:`text/typescript-jsx`,group:`TypeScript`,parsers:[`typescript`,`babel-ts`],vscodeLanguageIds:[`typescriptreact`],linguistLanguageId:94901924}],iv={};tv(iv,{canAttachComment:()=>tx,embed:()=>ww,features:()=>kA,getVisitorKeys:()=>cy,handleComments:()=>lS,hasPrettierIgnore:()=>HD,insertPragma:()=>Uw,isBlockComment:()=>fy,isGap:()=>dS,massageAstNode:()=>Jb,print:()=>OA,printComment:()=>Jw,printPrettierIgnored:()=>OA,willPrintOwnComments:()=>mS});var av=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),ov=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},sv=av(`replaceAll`,function(){if(typeof this==`string`)return ov});function cv(e){return this[e<0?this.length+e:e]}var lv=av(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return cv});function uv(e){return typeof e==`object`&&!!e}var dv=uv;function*fv(e,t){let{getVisitorKeys:n,filter:r=()=>!0}=t,i=e=>dv(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*pv(e,t){let n=[e];for(let e=0;e<n.length;e++){let r=n[e];for(let e of fv(r,t))yield e,n.push(e)}}function mv(e,{getVisitorKeys:t,predicate:n}){for(let r of pv(e,{getVisitorKeys:t}))if(n(r))return!0;return!1}var hv=()=>/[#*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;function gv(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function _v(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var vv=`©®‼⁉™ℹ↔↕↖↗↘↙↩↪⌨⏏⏱⏲⏸⏹⏺▪▫▶◀◻◼☀☁☂☃☄☎☑☘☝☠☢☣☦☪☮☯☸☹☺♀♂♟♠♣♥♦♨♻♾⚒⚔⚕⚖⚗⚙⚛⚜⚠⚧⚰⚱⛈⛏⛑⛓⛩⛱⛷⛸⛹✂✈✉✌✍✏✒✔✖✝✡✳✴❄❇❣❤➡⤴⤵⬅⬆⬇`,yv=/[^\x20-\x7F]/u,bv=new Set(vv);function xv(e){if(!e)return 0;if(!yv.test(e))return e.length;e=e.replace(hv(),e=>bv.has(e)?` `:` `);let t=0;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+=gv(e)||_v(e)?2:1)}return t}var Sv=xv;function Cv(e){return(t,n,r)=>{let i=!!r?.backwards;if(n===!1)return!1;let{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 wv=Cv(` `),Tv=Cv(`,; `),Ev=Cv(/[^\n\r]/u),Dv=e=>e===`
303
+ `||e===`\r`||e===`\u2028`||e===`\u2029`;function Ov(e,t,n){let r=!!n?.backwards;if(t===!1)return!1;let i=e.charAt(t);if(r){if(e.charAt(t-1)===`\r`&&i===`
304
+ `)return t-2;if(Dv(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===`
305
+ `)return t+2;if(Dv(i))return t+1}return t}var kv=Ov;function Av(e,t,n={}){let r=wv(e,n.backwards?t-1:t,n);return r!==kv(e,r,n)}var jv=Av;function Mv(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 Nv=Mv;function Pv(e,t){return t===!1?!1:e.charAt(t)===`/`&&e.charAt(t+1)===`/`?Ev(e,t):t}var Fv=Pv;function Iv(e,t){let n=null,r=t;for(;r!==n;)n=r,r=Tv(e,r),r=Nv(e,r),r=wv(e,r);return r=Fv(e,r),r=kv(e,r),r!==!1&&jv(e,r)}var Lv=Iv;function Rv(e){return Array.isArray(e)&&e.length>0}var zv=Rv,Bv=()=>{},Vv=Object.freeze({character:`'`,codePoint:39}),Hv=Object.freeze({character:`"`,codePoint:34}),Uv=Object.freeze({preferred:Vv,alternate:Hv}),Wv=Object.freeze({preferred:Hv,alternate:Vv});function Gv(e,t){let{preferred:n,alternate:r}=t===!0||t===`'`?Uv:Wv,{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 Kv=Gv,qv=/\\(["'\\])|(["'])/gu;function Jv(e,t){let n=t===`"`?`'`:`"`;return t+sv(0,e,qv,(e,r,i)=>r?r===n?n:e:i===t?`\\`+i:i)+t}var Yv=Jv;function Xv(e,t){/^(?<quote>["']).*\k<quote>$/su.test(e);let n=e.slice(1,-1),r=t.parser===`json`||t.parser===`jsonc`||t.parser===`json5`&&t.quoteProps===`preserve`&&!t.singleQuote?`"`:t.__isInHtmlAttribute?`'`:Kv(n,t.singleQuote);return e.charAt(0)===r?e:Yv(n,r)}var Zv=Xv,Qv=e=>Number.isInteger(e)&&e>=0;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}function H(e){return e.range?.[1]??e.end}function $v(e,t){let n=V(e);return Qv(n)&&n===V(t)}function ey(e,t){let n=H(e);return Qv(n)&&n===H(t)}function ty(e,t){return $v(e,t)&&ey(e,t)}var ny=null;function ry(e){if(ny!==null&&typeof ny.property){let e=ny;return ny=ry.prototype=null,e}return ny=ry.prototype=e??Object.create(null),new ry}var iy=10;for(let e=0;e<=iy;e++)ry();function ay(e){return ry(e)}function oy(e,t=`type`){ay(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 sy=oy,U=[[`decorators`,`key`,`typeAnnotation`,`value`],[],[`elementType`],[`expression`],[`expression`,`typeAnnotation`],[`left`,`right`],[`argument`],[`directives`,`body`],[`label`],[`callee`,`typeArguments`,`arguments`],[`body`],[`decorators`,`id`,`typeParameters`,`superClass`,`superTypeArguments`,`mixins`,`implements`,`body`,`superTypeParameters`],[`id`,`typeParameters`],[`decorators`,`key`,`typeParameters`,`params`,`returnType`,`body`],[`decorators`,`variance`,`key`,`typeAnnotation`,`value`],[`name`,`typeAnnotation`],[`test`,`consequent`,`alternate`],[`checkType`,`extendsType`,`trueType`,`falseType`],[`value`],[`id`,`body`],[`declaration`,`specifiers`,`source`,`attributes`],[`id`],[`id`,`typeParameters`,`extends`,`body`],[`typeAnnotation`],[`id`,`typeParameters`,`right`],[`body`,`test`],[`members`],[`id`,`init`],[`exported`],[`left`,`right`,`body`],[`id`,`typeParameters`,`params`,`predicate`,`returnType`,`body`],[`id`,`params`,`body`,`typeParameters`,`returnType`],[`key`,`value`],[`local`],[`objectType`,`indexType`],[`typeParameter`],[`types`],[`node`],[`object`,`property`],[`argument`,`cases`],[`pattern`,`body`,`guard`],[`literal`],[`decorators`,`key`,`value`],[`expressions`],[`qualification`,`id`],[`decorators`,`key`,`typeAnnotation`],[`typeParameters`,`params`,`returnType`],[`expression`,`typeArguments`],[`params`],[`parameterName`,`typeAnnotation`]],cy=sy({AccessorProperty:U[0],AnyTypeAnnotation:U[1],ArgumentPlaceholder:U[1],ArrayExpression:[`elements`],ArrayPattern:[`elements`,`typeAnnotation`,`decorators`],ArrayTypeAnnotation:U[2],ArrowFunctionExpression:[`typeParameters`,`params`,`predicate`,`returnType`,`body`],AsConstExpression:U[3],AsExpression:U[4],AssignmentExpression:U[5],AssignmentPattern:[`left`,`right`,`decorators`,`typeAnnotation`],AwaitExpression:U[6],BigIntLiteral:U[1],BigIntLiteralTypeAnnotation:U[1],BigIntTypeAnnotation:U[1],BinaryExpression:U[5],BindExpression:[`object`,`callee`],BlockStatement:U[7],BooleanLiteral:U[1],BooleanLiteralTypeAnnotation:U[1],BooleanTypeAnnotation:U[1],BreakStatement:U[8],CallExpression:U[9],CatchClause:[`param`,`body`],ChainExpression:U[3],ClassAccessorProperty:U[0],ClassBody:U[10],ClassDeclaration:U[11],ClassExpression:U[11],ClassImplements:U[12],ClassMethod:U[13],ClassPrivateMethod:U[13],ClassPrivateProperty:U[14],ClassProperty:U[14],ComponentDeclaration:[`id`,`params`,`body`,`typeParameters`,`rendersType`],ComponentParameter:[`name`,`local`],ComponentTypeAnnotation:[`params`,`rest`,`typeParameters`,`rendersType`],ComponentTypeParameter:U[15],ConditionalExpression:U[16],ConditionalTypeAnnotation:U[17],ContinueStatement:U[8],DebuggerStatement:U[1],DeclareClass:[`id`,`typeParameters`,`extends`,`mixins`,`implements`,`body`],DeclareComponent:[`id`,`params`,`rest`,`typeParameters`,`rendersType`],DeclaredPredicate:U[18],DeclareEnum:U[19],DeclareExportAllDeclaration:[`source`,`attributes`],DeclareExportDeclaration:U[20],DeclareFunction:[`id`,`predicate`],DeclareHook:U[21],DeclareInterface:U[22],DeclareModule:U[19],DeclareModuleExports:U[23],DeclareNamespace:U[19],DeclareOpaqueType:[`id`,`typeParameters`,`supertype`,`lowerBound`,`upperBound`],DeclareTypeAlias:U[24],DeclareVariable:U[21],Decorator:U[3],Directive:U[18],DirectiveLiteral:U[1],DoExpression:U[10],DoWhileStatement:U[25],EmptyStatement:U[1],EmptyTypeAnnotation:U[1],EnumBigIntBody:U[26],EnumBigIntMember:U[27],EnumBooleanBody:U[26],EnumBooleanMember:U[27],EnumDeclaration:U[19],EnumDefaultedMember:U[21],EnumNumberBody:U[26],EnumNumberMember:U[27],EnumStringBody:U[26],EnumStringMember:U[27],EnumSymbolBody:U[26],ExistsTypeAnnotation:U[1],ExperimentalRestProperty:U[6],ExperimentalSpreadProperty:U[6],ExportAllDeclaration:[`source`,`attributes`,`exported`],ExportDefaultDeclaration:[`declaration`],ExportDefaultSpecifier:U[28],ExportNamedDeclaration:U[20],ExportNamespaceSpecifier:U[28],ExportSpecifier:[`local`,`exported`],ExpressionStatement:U[3],File:[`program`],ForInStatement:U[29],ForOfStatement:U[29],ForStatement:[`init`,`test`,`update`,`body`],FunctionDeclaration:U[30],FunctionExpression:U[30],FunctionTypeAnnotation:[`typeParameters`,`this`,`params`,`rest`,`returnType`],FunctionTypeParam:U[15],GenericTypeAnnotation:U[12],HookDeclaration:U[31],HookTypeAnnotation:[`params`,`returnType`,`rest`,`typeParameters`],Identifier:[`typeAnnotation`,`decorators`],IfStatement:U[16],ImportAttribute:U[32],ImportDeclaration:[`specifiers`,`source`,`attributes`],ImportDefaultSpecifier:U[33],ImportExpression:[`source`,`options`],ImportNamespaceSpecifier:U[33],ImportSpecifier:[`imported`,`local`],IndexedAccessType:U[34],InferredPredicate:U[1],InferTypeAnnotation:U[35],InterfaceDeclaration:U[22],InterfaceExtends:U[12],InterfaceTypeAnnotation:[`extends`,`body`],InterpreterDirective:U[1],IntersectionTypeAnnotation:U[36],JsExpressionRoot:U[37],JsonRoot:U[37],JSXAttribute:[`name`,`value`],JSXClosingElement:[`name`],JSXClosingFragment:U[1],JSXElement:[`openingElement`,`children`,`closingElement`],JSXEmptyExpression:U[1],JSXExpressionContainer:U[3],JSXFragment:[`openingFragment`,`children`,`closingFragment`],JSXIdentifier:U[1],JSXMemberExpression:U[38],JSXNamespacedName:[`namespace`,`name`],JSXOpeningElement:[`name`,`typeArguments`,`attributes`],JSXOpeningFragment:U[1],JSXSpreadAttribute:U[6],JSXSpreadChild:U[3],JSXText:U[1],KeyofTypeAnnotation:U[6],LabeledStatement:[`label`,`body`],Literal:U[1],LogicalExpression:U[5],MatchArrayPattern:[`elements`,`rest`],MatchAsPattern:[`pattern`,`target`],MatchBindingPattern:U[21],MatchExpression:U[39],MatchExpressionCase:U[40],MatchIdentifierPattern:U[21],MatchLiteralPattern:U[41],MatchMemberPattern:[`base`,`property`],MatchObjectPattern:[`properties`,`rest`],MatchObjectPatternProperty:[`key`,`pattern`],MatchOrPattern:[`patterns`],MatchRestPattern:U[6],MatchStatement:U[39],MatchStatementCase:U[40],MatchUnaryPattern:U[6],MatchWildcardPattern:U[1],MemberExpression:U[38],MetaProperty:[`meta`,`property`],MethodDefinition:U[42],MixedTypeAnnotation:U[1],ModuleExpression:U[10],NeverTypeAnnotation:U[1],NewExpression:U[9],NGChainedExpression:U[43],NGEmptyExpression:U[1],NGMicrosyntax:U[10],NGMicrosyntaxAs:[`key`,`alias`],NGMicrosyntaxExpression:[`expression`,`alias`],NGMicrosyntaxKey:U[1],NGMicrosyntaxKeyedExpression:[`key`,`expression`],NGMicrosyntaxLet:U[32],NGPipeExpression:[`left`,`right`,`arguments`],NGRoot:U[37],NullableTypeAnnotation:U[23],NullLiteral:U[1],NullLiteralTypeAnnotation:U[1],NumberLiteralTypeAnnotation:U[1],NumberTypeAnnotation:U[1],NumericLiteral:U[1],ObjectExpression:[`properties`],ObjectMethod:U[13],ObjectPattern:[`decorators`,`properties`,`typeAnnotation`],ObjectProperty:U[42],ObjectTypeAnnotation:[`properties`,`indexers`,`callProperties`,`internalSlots`],ObjectTypeCallProperty:U[18],ObjectTypeIndexer:[`variance`,`id`,`key`,`value`],ObjectTypeInternalSlot:[`id`,`value`],ObjectTypeMappedTypeProperty:[`keyTparam`,`propType`,`sourceType`,`variance`],ObjectTypeProperty:[`key`,`value`,`variance`],ObjectTypeSpreadProperty:U[6],OpaqueType:[`id`,`typeParameters`,`supertype`,`impltype`,`lowerBound`,`upperBound`],OptionalCallExpression:U[9],OptionalIndexedAccessType:U[34],OptionalMemberExpression:U[38],ParenthesizedExpression:U[3],PipelineBareFunction:[`callee`],PipelinePrimaryTopicReference:U[1],PipelineTopicExpression:U[3],Placeholder:U[1],PrivateIdentifier:U[1],PrivateName:U[21],Program:U[7],Property:U[32],PropertyDefinition:U[14],QualifiedTypeIdentifier:U[44],QualifiedTypeofIdentifier:U[44],RegExpLiteral:U[1],RestElement:[`argument`,`typeAnnotation`,`decorators`],ReturnStatement:U[6],SatisfiesExpression:U[4],SequenceExpression:U[43],SpreadElement:U[6],StaticBlock:U[10],StringLiteral:U[1],StringLiteralTypeAnnotation:U[1],StringTypeAnnotation:U[1],Super:U[1],SwitchCase:[`test`,`consequent`],SwitchStatement:[`discriminant`,`cases`],SymbolTypeAnnotation:U[1],TaggedTemplateExpression:[`tag`,`typeArguments`,`quasi`],TemplateElement:U[1],TemplateLiteral:[`quasis`,`expressions`],ThisExpression:U[1],ThisTypeAnnotation:U[1],ThrowStatement:U[6],TopicReference:U[1],TryStatement:[`block`,`handler`,`finalizer`],TSAbstractAccessorProperty:U[45],TSAbstractKeyword:U[1],TSAbstractMethodDefinition:U[32],TSAbstractPropertyDefinition:U[45],TSAnyKeyword:U[1],TSArrayType:U[2],TSAsExpression:U[4],TSAsyncKeyword:U[1],TSBigIntKeyword:U[1],TSBooleanKeyword:U[1],TSCallSignatureDeclaration:U[46],TSClassImplements:U[47],TSConditionalType:U[17],TSConstructorType:U[46],TSConstructSignatureDeclaration:U[46],TSDeclareFunction:U[31],TSDeclareKeyword:U[1],TSDeclareMethod:[`decorators`,`key`,`typeParameters`,`params`,`returnType`],TSEmptyBodyFunctionExpression:[`id`,`typeParameters`,`params`,`returnType`],TSEnumBody:U[26],TSEnumDeclaration:U[19],TSEnumMember:[`id`,`initializer`],TSExportAssignment:U[3],TSExportKeyword:U[1],TSExternalModuleReference:U[3],TSFunctionType:U[46],TSImportEqualsDeclaration:[`id`,`moduleReference`],TSImportType:[`options`,`qualifier`,`typeArguments`,`source`],TSIndexedAccessType:U[34],TSIndexSignature:[`parameters`,`typeAnnotation`],TSInferType:U[35],TSInstantiationExpression:U[47],TSInterfaceBody:U[10],TSInterfaceDeclaration:U[22],TSInterfaceHeritage:U[47],TSIntersectionType:U[36],TSIntrinsicKeyword:U[1],TSJSDocAllType:U[1],TSJSDocNonNullableType:U[23],TSJSDocNullableType:U[23],TSJSDocUnknownType:U[1],TSLiteralType:U[41],TSMappedType:[`key`,`constraint`,`nameType`,`typeAnnotation`],TSMethodSignature:[`key`,`typeParameters`,`params`,`returnType`],TSModuleBlock:U[10],TSModuleDeclaration:U[19],TSNamedTupleMember:[`label`,`elementType`],TSNamespaceExportDeclaration:U[21],TSNeverKeyword:U[1],TSNonNullExpression:U[3],TSNullKeyword:U[1],TSNumberKeyword:U[1],TSObjectKeyword:U[1],TSOptionalType:U[23],TSParameterProperty:[`parameter`,`decorators`],TSParenthesizedType:U[23],TSPrivateKeyword:U[1],TSPropertySignature:[`key`,`typeAnnotation`],TSProtectedKeyword:U[1],TSPublicKeyword:U[1],TSQualifiedName:U[5],TSReadonlyKeyword:U[1],TSRestType:U[23],TSSatisfiesExpression:U[4],TSStaticKeyword:U[1],TSStringKeyword:U[1],TSSymbolKeyword:U[1],TSTemplateLiteralType:[`quasis`,`types`],TSThisType:U[1],TSTupleType:[`elementTypes`],TSTypeAliasDeclaration:[`id`,`typeParameters`,`typeAnnotation`],TSTypeAnnotation:U[23],TSTypeAssertion:U[4],TSTypeLiteral:U[26],TSTypeOperator:U[23],TSTypeParameter:[`name`,`constraint`,`default`],TSTypeParameterDeclaration:U[48],TSTypeParameterInstantiation:U[48],TSTypePredicate:U[49],TSTypeQuery:[`exprName`,`typeArguments`],TSTypeReference:[`typeName`,`typeArguments`],TSUndefinedKeyword:U[1],TSUnionType:U[36],TSUnknownKeyword:U[1],TSVoidKeyword:U[1],TupleTypeAnnotation:[`types`,`elementTypes`],TupleTypeLabeledElement:[`label`,`elementType`,`variance`],TupleTypeSpreadElement:[`label`,`typeAnnotation`],TypeAlias:U[24],TypeAnnotation:U[23],TypeCastExpression:U[4],TypeofTypeAnnotation:[`argument`,`typeArguments`],TypeOperator:U[23],TypeParameter:[`bound`,`default`,`variance`],TypeParameterDeclaration:U[48],TypeParameterInstantiation:U[48],TypePredicate:U[49],UnaryExpression:U[6],UndefinedTypeAnnotation:U[1],UnionTypeAnnotation:U[36],UnknownTypeAnnotation:U[1],UpdateExpression:U[6],V8IntrinsicIdentifier:U[1],VariableDeclaration:[`declarations`],VariableDeclarator:U[27],Variance:U[1],VoidPattern:U[1],VoidTypeAnnotation:U[1],WhileStatement:U[25],WithStatement:[`object`,`body`],YieldExpression:U[6]});function ly(e){let t=new Set(e);return e=>t.has(e?.type)}var W=ly;function uy(e){return e.extra?.raw??e.raw}var dy=uy,fy=W([`Block`,`CommentBlock`,`MultiLine`]),py=W([`AnyTypeAnnotation`,`ThisTypeAnnotation`,`NumberTypeAnnotation`,`VoidTypeAnnotation`,`BooleanTypeAnnotation`,`BigIntTypeAnnotation`,`SymbolTypeAnnotation`,`StringTypeAnnotation`,`NeverTypeAnnotation`,`UndefinedTypeAnnotation`,`UnknownTypeAnnotation`,`EmptyTypeAnnotation`,`MixedTypeAnnotation`]),my=W([`Line`,`CommentLine`,`SingleLine`,`HashbangComment`,`HTMLOpen`,`HTMLClose`,`Hashbang`,`InterpreterDirective`]);function hy(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 gy(e,t){return t.some(t=>hy(e,t))}var _y=gy;function vy({type:e}){return e.startsWith(`TS`)&&e.endsWith(`Keyword`)}var yy=vy;function by({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}var xy=by;function Sy(e,t){return t(e)||mv(e,{getVisitorKeys:cy,predicate:t})}function Cy(e){return e.type===`AssignmentExpression`||e.type===`BinaryExpression`||e.type===`LogicalExpression`||e.type===`NGPipeExpression`||e.type===`ConditionalExpression`||eb(e)||tb(e)||e.type===`SequenceExpression`||e.type===`TaggedTemplateExpression`||e.type===`BindExpression`||e.type===`UpdateExpression`&&!e.prefix||Rb(e)||e.type===`TSNonNullExpression`||e.type===`ChainExpression`}function wy(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function Ty(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.`)}var Ey=W([`ExportDefaultDeclaration`,`DeclareExportDeclaration`,`ExportNamedDeclaration`,`ExportAllDeclaration`,`DeclareExportAllDeclaration`]),Dy=W([`ArrayExpression`]),Oy=W([`ObjectExpression`]);function ky(e){return e.type===`LogicalExpression`&&e.operator===`??`}function Ay(e){return e.type===`NumericLiteral`||e.type===`Literal`&&typeof e.value==`number`}function jy(e){return e.type===`BooleanLiteral`||e.type===`Literal`&&typeof e.value==`boolean`}function My(e){return e.type===`UnaryExpression`&&(e.operator===`+`||e.operator===`-`)&&Ay(e.argument)}function Ny(e){return!!(e&&(e.type===`StringLiteral`||e.type===`Literal`&&typeof e.value==`string`))}function Py(e){return e.type===`RegExpLiteral`||e.type===`Literal`&&!!e.regex}var Fy=W([`Literal`,`BooleanLiteral`,`BigIntLiteral`,`DirectiveLiteral`,`NullLiteral`,`NumericLiteral`,`RegExpLiteral`,`StringLiteral`]),Iy=W([`Identifier`,`ThisExpression`,`Super`,`PrivateName`,`PrivateIdentifier`]),Ly=W([`ObjectTypeAnnotation`,`TSTypeLiteral`,`TSMappedType`]),Ry=W([`FunctionExpression`,`ArrowFunctionExpression`]);function zy(e){return e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`&&e.body.type===`BlockStatement`}function By(e){return eb(e)&&e.callee.type===`Identifier`&&[`async`,`inject`,`fakeAsync`,`waitForAsync`].includes(e.callee.name)}var Vy=W([`JSXElement`,`JSXFragment`]);function Hy(e){return e.method&&e.kind===`init`||e.kind===`get`||e.kind===`set`}function Uy(e){return(e.type===`ObjectTypeProperty`||e.type===`ObjectTypeInternalSlot`)&&!e.static&&!e.method&&e.kind!==`get`&&e.kind!==`set`&&e.value.type===`FunctionTypeAnnotation`}function Wy(e){return(e.type===`TypeAnnotation`||e.type===`TSTypeAnnotation`)&&e.typeAnnotation.type===`FunctionTypeAnnotation`&&!e.static&&!$v(e,e.typeAnnotation)}var Gy=W([`BinaryExpression`,`LogicalExpression`,`NGPipeExpression`]);function Ky(e){return tb(e)||e.type===`BindExpression`&&!!e.object}var qy=W([`TSThisType`,`NullLiteralTypeAnnotation`,`BooleanLiteralTypeAnnotation`,`StringLiteralTypeAnnotation`,`BigIntLiteralTypeAnnotation`,`NumberLiteralTypeAnnotation`,`TSLiteralType`,`TSTemplateLiteralType`]);function Jy(e){return yy(e)||py(e)||qy(e)||e.type===`GenericTypeAnnotation`&&!e.typeParameters||e.type===`TSTypeReference`&&!e.typeArguments}function Yy(e){return e.type===`Identifier`&&(e.name===`beforeEach`||e.name===`beforeAll`||e.name===`afterEach`||e.name===`afterAll`)}var Xy=`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 Zy(e){return _y(e,Xy)}function Qy(e,t){if(e?.type!==`CallExpression`||e.optional)return!1;let n=Ob(e);if(n.length===1){if(By(e)&&Qy(t))return Ry(n[0]);if(Yy(e.callee))return By(n[0])}else if((n.length===2||n.length===3)&&(n[0].type===`TemplateLiteral`||Ny(n[0]))&&Zy(e.callee))return n[2]&&!Ay(n[2])?!1:(n.length===2?Ry(n[1]):zy(n[1])&&Tb(n[1]).length<=1)||By(n[1]);return!1}var $y=e=>t=>(t?.type===`ChainExpression`&&(t=t.expression),e(t)),eb=$y(W([`CallExpression`,`OptionalCallExpression`])),tb=$y(W([`MemberExpression`,`OptionalMemberExpression`]));function nb(e,t=5){return rb(e,t)<=t}function rb(e,t){let n=0;for(let r in e){let i=e[r];if(dv(i)&&typeof i.type==`string`&&(n++,n+=rb(i,t-n)),n>t)return n}return n}var ib=.25;function ab(e,t){let{printWidth:n}=t;if(K(e))return!1;let r=n*ib;if(e.type===`ThisExpression`||e.type===`Identifier`&&e.name.length<=r||My(e)&&!K(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:Ny(e)?Zv(dy(e),t).length<=r:e.type===`TemplateLiteral`?e.expressions.length===0&&e.quasis[0].value.raw.length<=r&&!e.quasis[0].value.raw.includes(`
306
+ `):e.type===`UnaryExpression`?ab(e.argument,{printWidth:n}):e.type===`CallExpression`&&e.arguments.length===0&&e.callee.type===`Identifier`?e.callee.name.length<=r-2:Fy(e)}function ob(e,t){return Vy(t)?Mb(t):K(t,G.Leading,t=>jv(e,H(t)))}function sb(e){return e.quasis.some(e=>e.value.raw.includes(`
307
+ `))}function cb(e,t){return(e.type===`TemplateLiteral`&&sb(e)||e.type===`TaggedTemplateExpression`&&sb(e.quasi))&&!jv(t,V(e),{backwards:!0})}function lb(e){if(!K(e))return!1;let t=lv(0,Pb(e,G.Dangling),-1);return t&&!fy(t)}function ub(e){if(e.length<=1)return!1;let t=0;for(let n of e)if(Ry(n)){if(t+=1,t>1)return!0}else if(eb(n)){for(let e of Ob(n))if(Ry(e))return!0}return!1}function db(e){let{node:t,parent:n,key:r}=e;return r===`callee`&&eb(t)&&eb(n)&&n.arguments.length>0&&t.arguments.length>n.arguments.length}var fb=new Set([`!`,`-`,`+`,`~`]);function pb(e,t=2){if(t<=0)return!1;if(e.type===`ChainExpression`||e.type===`TSNonNullExpression`)return pb(e.expression,t);let n=e=>pb(e,t-1);if(Py(e))return Sv(e.pattern??e.regex.pattern)<=5;if(Fy(e)||Iy(e)||e.type===`ArgumentPlaceholder`)return!0;if(e.type===`TemplateLiteral`)return e.quasis.every(e=>!e.value.raw.includes(`
308
+ `))&&e.expressions.every(n);if(Oy(e))return e.properties.every(e=>!e.computed&&(e.shorthand||e.value&&n(e.value)));if(Dy(e))return e.elements.every(e=>e===null||n(e));if(Ib(e)){if(e.type===`ImportExpression`||pb(e.callee,t)){let r=Ob(e);return r.length<=t&&r.every(n)}return!1}return tb(e)?pb(e.object,t)&&pb(e.property,t):e.type===`UnaryExpression`&&fb.has(e.operator)||e.type===`UpdateExpression`?pb(e.argument,t):!1}function mb(e,t=`es5`){return e.trailingComma===`es5`&&t===`es5`||e.trailingComma===`all`&&(t===`all`||t===`es5`)}function hb(e,t){switch(e.type){case`BinaryExpression`:case`LogicalExpression`:case`AssignmentExpression`:case`NGPipeExpression`:return hb(e.left,t);case`MemberExpression`:case`OptionalMemberExpression`:return hb(e.object,t);case`TaggedTemplateExpression`:return e.tag.type!==`FunctionExpression`&&hb(e.tag,t);case`CallExpression`:case`OptionalCallExpression`:return e.callee.type!==`FunctionExpression`&&hb(e.callee,t);case`ConditionalExpression`:return hb(e.test,t);case`UpdateExpression`:return!e.prefix&&hb(e.argument,t);case`BindExpression`:return e.object&&hb(e.object,t);case`SequenceExpression`:return hb(e.expressions[0],t);case`ChainExpression`:case`TSSatisfiesExpression`:case`TSAsExpression`:case`TSNonNullExpression`:case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:return hb(e.expression,t);default:return t(e)}}var gb={"==":!0,"!=":!0,"===":!0,"!==":!0},_b={"*":!0,"/":!0,"%":!0},vb={">>":!0,">>>":!0,"<<":!0};function yb(e,t){return!(xb(t)!==xb(e)||e===`**`||gb[e]&&gb[t]||t===`%`&&_b[e]||e===`%`&&_b[t]||t!==e&&_b[t]&&_b[e]||vb[e]&&vb[t])}var bb=new Map([[`|>`],[`??`],[`||`],[`&&`],[`|`],[`^`],[`&`],[`==`,`===`,`!=`,`!==`],[`<`,`>`,`<=`,`>=`,`in`,`instanceof`],[`>>`,`<<`,`>>>`],[`+`,`-`],[`*`,`/`,`%`],[`**`]].flatMap((e,t)=>e.map(e=>[e,t])));function xb(e){return bb.get(e)}function Sb(e){return!!vb[e]||e===`|`||e===`^`||e===`&`}function Cb(e){return e.rest?!0:lv(0,Tb(e),-1)?.type===`RestElement`}var wb=new WeakMap;function Tb(e){if(wb.has(e))return wb.get(e);let t=[];return e.this&&t.push(e.this),t.push(...e.params),e.rest&&t.push(e.rest),wb.set(e,t),t}function Eb(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`)}var Db=new WeakMap;function Ob(e){if(Db.has(e))return Db.get(e);if(e.type===`ChainExpression`)return Ob(e.expression);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,Db.set(e,t),t}function kb(e,t){let{node:n}=e;if(n.type===`ChainExpression`)return e.call(()=>kb(e,t),`expression`);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 Ab(e,t){let n=[];if(e.type===`ChainExpression`&&(e=e.expression,n.push(`expression`)),e.type===`ImportExpression`||e.type===`TSImportType`){if(t===0||t===(e.options?-2:-1))return[...n,`source`];if(e.options&&(t===1||t===-1))return[...n,`options`];throw RangeError(`Invalid argument index`)}if(e.type===`TSExternalModuleReference`){if(t===0||t===-1)return[...n,`expression`]}else if(t<0&&(t=e.arguments.length+t),t>=0&&t<e.arguments.length)return[...n,`arguments`,t];throw RangeError(`Invalid argument index`)}function jb(e){return e.value.trim()===`prettier-ignore`&&!e.unignore}function Mb(e){return e?.prettierIgnore||K(e,G.PrettierIgnore)}var G={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},Nb=(e,t)=>{if(typeof e==`function`&&(t=e,e=0),e||t)return(n,r,i)=>!(e&G.Leading&&!n.leading||e&G.Trailing&&!n.trailing||e&G.Dangling&&(n.leading||n.trailing)||e&G.Block&&!fy(n)||e&G.Line&&!my(n)||e&G.First&&r!==0||e&G.Last&&r!==i.length-1||e&G.PrettierIgnore&&!jb(n)||t&&!t(n))};function K(e,t,n){if(!zv(e?.comments))return!1;let r=Nb(t,n);return!r||e.comments.some(r)}function Pb(e,t,n){if(!Array.isArray(e?.comments))return[];let r=Nb(t,n);return r?e.comments.filter(r):e.comments}var Fb=(e,{originalText:t})=>Lv(t,H(e));function Ib(e){return eb(e)||e.type===`NewExpression`||e.type===`ImportExpression`}function Lb(e){return e&&(e.type===`ObjectProperty`||e.type===`Property`&&!Hy(e))}var Rb=W([`TSAsExpression`,`TSSatisfiesExpression`,`AsExpression`,`AsConstExpression`,`SatisfiesExpression`]),zb=W([`TSUnionType`,`UnionTypeAnnotation`]),Bb=W([`TSIntersectionType`,`IntersectionTypeAnnotation`]),Vb=W([`TSConditionalType`,`ConditionalTypeAnnotation`]),Hb=e=>e?.type===`TSAsExpression`&&e.typeAnnotation.type===`TSTypeReference`&&e.typeAnnotation.typeName.type===`Identifier`&&e.typeAnnotation.typeName.name===`const`,Ub=W([`TSTypeAliasDeclaration`,`TypeAlias`]);function Wb({key:e,parent:t}){return!(e===`types`&&zb(t)||e===`types`&&Bb(t))}var Gb=new Set([`range`,`raw`,`comments`,`leadingComments`,`trailingComments`,`innerComments`,`extra`,`start`,`end`,`loc`,`flags`,`errors`,`tokens`]),Kb=e=>{for(let t of e.quasis)delete t.value};function qb(e,t,n){if(e.type===`Program`&&delete t.sourceType,(e.type===`BigIntLiteral`||e.type===`Literal`)&&e.bigint&&(t.bigint=e.bigint.toLowerCase()),e.type===`EmptyStatement`&&!xy({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===`Property`||e.type===`ObjectProperty`||e.type===`MethodDefinition`||e.type===`ClassProperty`||e.type===`ClassMethod`||e.type===`PropertyDefinition`||e.type===`TSDeclareMethod`||e.type===`TSPropertySignature`||e.type===`ObjectTypeProperty`||e.type===`ImportAttribute`)&&e.key&&!e.computed){let{key:n}=e;Ny(n)||Ay(n)?t.key=String(n.value):n.type===`Identifier`&&(t.key=n.name)}if(e.type===`JSXElement`&&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`&&Kb(n);e.type===`JSXAttribute`&&e.name.name===`css`&&e.value.type===`JSXExpressionContainer`&&e.value.expression.type===`TemplateLiteral`&&Kb(t.value.expression),e.type===`JSXAttribute`&&e.value?.type===`Literal`&&/["']|&quot;|&apos;/u.test(e.value.value)&&(t.value.value=sv(0,e.value.value,/["']|&quot;|&apos;/gu,`"`));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`:Dy(r.value)&&Kb(r.value.elements[0]);break;case`template`:r.value.type===`TemplateLiteral`&&Kb(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`)&&Kb(t.quasi),e.type===`TemplateLiteral`&&Kb(t),e.type===`ChainExpression`&&e.expression.type===`TSNonNullExpression`&&(t.type=`TSNonNullExpression`,t.expression.type=`ChainExpression`)}qb.ignoredProperties=Gb;var Jb=qb,Yb=W([`File`,`TemplateElement`,`TSEmptyBodyFunctionExpression`,`ChainExpression`]),Xb=(e,[t])=>t?.type===`ComponentParameter`&&t.shorthand&&t.name===e&&t.local!==t.name||t?.type===`MatchObjectPatternProperty`&&t.shorthand&&t.key===e&&t.value!==t.key||t?.type===`ObjectProperty`&&t.shorthand&&t.key===e&&t.value!==t.key||t?.type===`Property`&&t.shorthand&&t.key===e&&!Hy(t)&&t.value!==t.key,Zb=(e,[t])=>!!(e.type===`FunctionExpression`&&t.type===`MethodDefinition`&&t.value===e&&Tb(e).length===0&&!e.returnType&&!zv(e.typeParameters)&&e.body),Qb=(e,[t])=>t?.typeAnnotation===e&&Hb(t),$b=(e,[t,...n])=>Qb(e,[t])||t?.typeName===e&&Qb(t,n);function ex(e,t){return Yb(e)||Xb(e,t)||Zb(e,t)?!1:e.type===`EmptyStatement`?xy({node:e,parent:t[0]}):!($b(e,t)||e.type===`TSTypeAnnotation`&&t[0].type===`TSPropertySignature`)}var tx=ex;function nx(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 rx(e,t){(e.comments??=[]).push(t),t.printed=!1,t.nodeDescription=nx(e)}function ix(e,t){t.leading=!0,t.trailing=!1,rx(e,t)}function ax(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),rx(e,t)}function ox(e,t){t.leading=!1,t.trailing=!0,rx(e,t)}function sx(e,t){let n=null,r=t;for(;r!==n;)n=r,r=wv(e,r),r=Nv(e,r),r=Fv(e,r),r=kv(e,r);return r}var cx=sx;function lx(e,t){let n=cx(e,t);return n===!1?``:e.charAt(n)}var ux=lx;function dx(e,t,n){for(let r=t;r<n;++r)if(e.charAt(r)===`
309
+ `)return!0;return!1}var fx=dx,px=new WeakMap;function mx(e){return px.has(e)||px.set(e,fy(e)&&e.value[0]===`*`&&/@(?:type|satisfies)\b/u.test(e.value)),px.get(e)}var hx=mx,gx=(e,t)=>my(e)||!fx(t,V(e),H(e));function _x(e){return[$x,Ox,Rx,Lx,Ex,Cx,wx,Tx,Ax,Kx,Hx,Ux,Gx,qx,Jx,Mx,zx,Bx,Dx,rS,eS,oS].some(t=>t(e))}function vx(e){return[Sx,Rx,Ox,qx,Cx,wx,Tx,Ax,zx,Vx,Wx,Gx,Zx,Bx,tS,nS,iS,eS,sS,aS,oS].some(t=>t(e))}function yx(e){return[$x,Cx,wx,Ix,Mx,Gx,Fx,Px,Bx,Qx,oS].some(t=>t(e))}function bx(e,t){let n=(e.body||e.properties).find(({type:e})=>e!==`EmptyStatement`);n?ix(n,t):ax(e,t)}function xx(e,t){e.type===`BlockStatement`?bx(e,t):ix(e,t)}function Sx({comment:e,followingNode:t}){return t&&hx(e)?(ix(t,e),!0):!1}function Cx({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){if(n?.type!==`IfStatement`||!r)return!1;if(ux(i,H(e))===`)`)return ox(t,e),!0;if(r.type===`BlockStatement`&&r===n.consequent&&V(e)>=H(t)&&H(e)<=V(r))return ix(r,e),!0;if(t===n.consequent&&r===n.alternate){let a=cx(i,H(n.consequent));if(r.type===`BlockStatement`&&V(e)>=a&&H(e)<=V(r))return ix(r,e),!0;if(V(e)<a||n.alternate.type===`BlockStatement`)return t.type===`BlockStatement`||gx(e,i)&&!fx(i,V(t),V(e))?(ox(t,e),!0):(ax(n,e),!0)}return r.type===`BlockStatement`?(bx(r,e),!0):r.type===`IfStatement`?(xx(r.consequent,e),!0):n.consequent===r&&(ix(r,e),!0)}function wx({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return n?.type!==`WhileStatement`||!r?!1:ux(i,H(e))===`)`?(ox(t,e),!0):r.type===`BlockStatement`?(bx(r,e),!0):n.body===r&&(ix(r,e),!0)}function Tx({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return n?.type!==`TryStatement`&&n?.type!==`CatchClause`||!r?!1:n.type===`CatchClause`&&t?(ox(t,e),!0):r.type===`BlockStatement`?(bx(r,e),!0):r.type===`TryStatement`?(xx(r.finalizer,e),!0):r.type===`CatchClause`&&(xx(r.body,e),!0)}function Ex({comment:e,enclosingNode:t,followingNode:n}){return tb(t)&&n?.type===`Identifier`?(ix(t,e),!0):!1}function Dx({comment:e,enclosingNode:t,followingNode:n,options:r}){return!r.experimentalTernaries||!(t?.type===`ConditionalExpression`||Vb(t))?!1:n?.type===`ConditionalExpression`||Vb(n)?(ax(t,e),!0):!1}function Ox({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i,options:a}){let o=t&&!fx(i,H(t),V(e));return(!t||!o)&&(n?.type===`ConditionalExpression`||Vb(n))&&r?a.experimentalTernaries&&n.alternate===r&&!(fy(e)&&!fx(a.originalText,V(e),H(e)))?(ax(n,e),!0):(ix(r,e),!0):!1}var kx=W([`ClassDeclaration`,`ClassExpression`,`DeclareClass`,`DeclareInterface`,`InterfaceDeclaration`,`TSInterfaceDeclaration`]);function Ax({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){if(kx(n)){if(zv(n.decorators)&&r?.type!==`Decorator`)return ox(lv(0,n.decorators,-1),e),!0;if(n.body&&r===n.body)return bx(n.body,e),!0;if(r){if(n.superClass&&r===n.superClass&&t&&(t===n.id||t===n.typeParameters))return ox(t,e),!0;for(let i of[`implements`,`extends`,`mixins`])if(n[i]&&r===n[i][0])return t&&(t===n.id||t===n.typeParameters||t===n.superClass)?ox(t,e):ax(n,e,i),!0}}return!1}var jx=W([`ClassMethod`,`ClassProperty`,`PropertyDefinition`,`TSAbstractPropertyDefinition`,`TSAbstractMethodDefinition`,`TSDeclareMethod`,`MethodDefinition`,`ClassAccessorProperty`,`AccessorProperty`,`TSAbstractAccessorProperty`,`TSParameterProperty`]);function Mx({comment:e,precedingNode:t,enclosingNode:n,text:r}){return n&&t&&ux(r,H(e))===`(`&&(n.type===`Property`||n.type===`TSDeclareMethod`||n.type===`TSAbstractMethodDefinition`)&&t.type===`Identifier`&&n.key===t&&ux(r,H(t))!==`:`||t?.type===`Decorator`&&jx(n)&&(my(e)||e.placement===`ownLine`)?(ox(t,e),!0):!1}var Nx=W([`FunctionDeclaration`,`FunctionExpression`,`ClassMethod`,`MethodDefinition`,`ObjectMethod`]);function Px({comment:e,precedingNode:t,enclosingNode:n,text:r}){return ux(r,H(e))===`(`&&t&&Nx(n)?(ox(t,e),!0):!1}function Fx({comment:e,enclosingNode:t,text:n}){if(t?.type!==`ArrowFunctionExpression`)return!1;let r=cx(n,H(e));return r!==!1&&n.slice(r,r+2)===`=>`&&(ax(t,e),!0)}function Ix({comment:e,enclosingNode:t,text:n}){return ux(n,H(e))===`)`?t&&(cS(t)&&Tb(t).length===0||Ib(t)&&Ob(t).length===0)?(ax(t,e),!0):(t?.type===`MethodDefinition`||t?.type===`TSAbstractMethodDefinition`)&&Tb(t.value).length===0&&(ax(t.value,e),!0):!1}function Lx({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return(t?.type===`ComponentTypeParameter`&&(n?.type===`DeclareComponent`||n?.type===`ComponentTypeAnnotation`)&&r?.type!==`ComponentTypeParameter`||(t?.type===`ComponentParameter`||t?.type===`RestElement`)&&n?.type===`ComponentDeclaration`&&ux(i,H(e))===`)`)&&(ox(t,e),!0)}function Rx({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return t?.type===`FunctionTypeParam`&&n?.type===`FunctionTypeAnnotation`&&r?.type!==`FunctionTypeParam`||(t?.type===`Identifier`||t?.type===`AssignmentPattern`||t?.type===`ObjectPattern`||t?.type===`ArrayPattern`||t?.type===`RestElement`||t?.type===`TSParameterProperty`)&&cS(n)&&ux(i,H(e))===`)`?(ox(t,e),!0):!fy(e)&&r?.type===`BlockStatement`&&Nx(n)&&(n.type===`MethodDefinition`?n.value.body:n.body)===r&&cx(i,H(e))===V(r)?(bx(r,e),!0):!1}function zx({comment:e,enclosingNode:t}){return t?.type===`LabeledStatement`&&(ix(t,e),!0)}function Bx({comment:e,enclosingNode:t}){return(t?.type===`ContinueStatement`||t?.type===`BreakStatement`)&&!t.label&&(ox(t,e),!0)}function Vx({comment:e,precedingNode:t,enclosingNode:n}){return eb(n)&&t&&n.callee===t&&n.arguments.length>0?(ix(n.arguments[0],e),!0):!1}function Hx({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return zb(n)?(jb(e)&&(r.prettierIgnore=!0,e.unignore=!0),t?(ox(t,e),!0):!1):(zb(r)&&jb(e)&&(r.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function Ux({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return n&&n.type===`MatchOrPattern`?(jb(e)&&(r.prettierIgnore=!0,e.unignore=!0),t?(ox(t,e),!0):!1):(r&&r.type===`MatchOrPattern`&&jb(e)&&(r.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function Wx({comment:e,enclosingNode:t}){return Lb(t)?(ix(t,e),!0):!1}function Gx({comment:e,enclosingNode:t,ast:n,isLastComment:r}){return n?.body?.length===0?(r?ax(n,e):ix(n,e),!0):t?.type===`Program`&&t.body.length===0&&!zv(t.directives)&&(r?ax(t,e):ix(t,e),!0)}function Kx({comment:e,enclosingNode:t,followingNode:n}){return(t?.type===`ForInStatement`||t?.type===`ForOfStatement`)&&n!==t.body&&(ix(t,e),!0)}function qx({comment:e,precedingNode:t,enclosingNode:n,text:r}){if(n?.type===`ImportSpecifier`||n?.type===`ExportSpecifier`)return ix(n,e),!0;let i=t?.type===`ImportSpecifier`&&n?.type===`ImportDeclaration`,a=t?.type===`ExportSpecifier`&&n?.type===`ExportNamedDeclaration`;return(i||a)&&jv(r,H(e))?(ox(t,e),!0):!1}function Jx({comment:e,enclosingNode:t}){return t?.type===`AssignmentPattern`&&(ix(t,e),!0)}var Yx=W([`VariableDeclarator`,`AssignmentExpression`,`TypeAlias`,`TSTypeAliasDeclaration`]),Xx=W([`ObjectExpression`,`ArrayExpression`,`TemplateLiteral`,`TaggedTemplateExpression`,`ObjectTypeAnnotation`,`TSTypeLiteral`]);function Zx({comment:e,enclosingNode:t,followingNode:n}){return Yx(t)&&n&&(Xx(n)||fy(e))?(ix(n,e),!0):!1}function Qx({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)&&ux(i,H(e))===`;`&&(ox(t,e),!0)}function $x({comment:e,enclosingNode:t,followingNode:n}){if(jb(e)&&t?.type===`TSMappedType`&&n===t.key)return t.prettierIgnore=!0,e.unignore=!0,!0}function eS({comment:e,precedingNode:t,enclosingNode:n}){if(n?.type===`TSMappedType`&&!t)return ax(n,e),!0}function tS({comment:e,enclosingNode:t,followingNode:n}){return!t||t.type!==`SwitchCase`||t.test||!n||n!==t.consequent[0]?!1:(n.type===`BlockStatement`&&my(e)?bx(n,e):ax(t,e),!0)}function nS({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return zb(t)&&((n.type===`TSArrayType`||n.type===`ArrayTypeAnnotation`)&&!r||Bb(n))?(ox(lv(0,t.types,-1),e),!0):!1}function rS({comment:e,enclosingNode:t,precedingNode:n,followingNode:r}){if((t?.type===`ObjectPattern`||t?.type===`ArrayPattern`)&&r?.type===`TSTypeAnnotation`)return n?ox(n,e):ax(t,e),!0}function iS({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return!r&&n?.type===`UnaryExpression`&&(t?.type===`LogicalExpression`||t?.type===`BinaryExpression`)&&fx(i,V(n.argument),V(t.right))&&gx(e,i)&&!fx(i,V(t.right),V(e))?(ox(t.right,e),!0):!1}function aS({enclosingNode:e,followingNode:t,comment:n}){if(e&&(e.type===`TSPropertySignature`||e.type===`ObjectTypeProperty`)&&(zb(t)||Bb(t)))return ix(t,n),!0}function oS({enclosingNode:e,precedingNode:t,followingNode:n,comment:r,text:i}){if(Rb(e)&&t===e.expression&&!gx(r,i))return n?ix(n,r):ox(e,r),!0}function sS({comment:e,enclosingNode:t,followingNode:n,precedingNode:r}){return t&&n&&r&&t.type===`ArrowFunctionExpression`&&t.returnType===r&&(r.type===`TSTypeAnnotation`||r.type===`TypeAnnotation`)?(ix(n,e),!0):!1}var cS=W([`ArrowFunctionExpression`,`FunctionExpression`,`FunctionDeclaration`,`ObjectMethod`,`ClassMethod`,`TSDeclareFunction`,`TSCallSignatureDeclaration`,`TSConstructSignatureDeclaration`,`TSMethodSignature`,`TSConstructorType`,`TSFunctionType`,`TSDeclareMethod`]),lS={endOfLine:vx,ownLine:_x,remaining:yx};function uS(e,{parser:t}){if(t===`flow`||t===`hermes`||t===`babel-flow`)return e=sv(0,e,/[\s(]/gu,``),e===``||e===`/*`||e===`/*::`}var dS=uS,fS=W([`ClassDeclaration`,`ClassExpression`,`DeclareClass`,`DeclareInterface`,`InterfaceDeclaration`,`TSInterfaceDeclaration`]);function pS(e){let{key:t,parent:n}=e;if(t===`types`&&zb(n)||t===`argument`&&n.type===`JSXSpreadAttribute`||t===`expression`&&n.type===`JSXSpreadChild`||t===`superClass`&&(n.type===`ClassDeclaration`||n.type===`ClassExpression`)||(t===`id`||t===`typeParameters`)&&fS(n)||t===`patterns`&&n.type===`MatchOrPattern`)return!0;let{node:r}=e;return Mb(r)?!1:zb(r)?Wb(e):!!Vy(r)}var mS=pS,hS=`string`,gS=`array`,_S=`cursor`,vS=`indent`,yS=`align`,bS=`trim`,xS=`group`,SS=`fill`,CS=`if-break`,wS=`indent-if-break`,TS=`line-suffix`,ES=`line-suffix-boundary`,DS=`line`,OS=`label`,kS=`break-parent`,AS=new Set([_S,vS,yS,bS,xS,SS,CS,wS,TS,ES,DS,OS,kS]);function jS(e){if(typeof e==`string`)return hS;if(Array.isArray(e))return gS;if(!e)return;let{type:t}=e;if(AS.has(t))return t}var MS=jS,NS=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function PS(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
310
+ Expected it to be 'string' or 'object'.`;if(MS(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=NS([...AS].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
311
+ Expected it to be ${r}.`}var FS=class extends Error{name=`InvalidDocError`;constructor(e){super(PS(e)),this.doc=e}},IS={};function LS(e,t,n,r){let i=[e];for(;i.length>0;){let e=i.pop();if(e===IS){n(i.pop());continue}n&&i.push(e,IS);let a=MS(e);if(!a)throw new FS(e);if(t?.(e)!==!1)switch(a){case gS:case SS:{let t=a===gS?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case CS:i.push(e.flatContents,e.breakContents);break;case xS: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 yS:case vS:case wS:case OS:case TS:i.push(e.contents);break;case hS:case _S:case bS:case ES:case DS:case kS:break;default:throw new FS(e)}}}var RS=LS;function zS(e,t){if(typeof e==`string`)return t(e);let n=new Map;return r(e);function r(e){if(n.has(e))return n.get(e);let t=i(e);return n.set(e,t),t}function i(e){switch(MS(e)){case gS:return t(e.map(r));case SS:return t({...e,parts:e.parts.map(r)});case CS:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case xS:{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 yS:case vS:case wS:case OS:case TS:return t({...e,contents:r(e.contents)});case hS:case _S:case bS:case ES:case DS:case kS:return t(e);default:throw new FS(e)}}}function BS(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 RS(e,a),r}function VS(e){if(e.type===xS&&e.break||e.type===DS&&e.hard||e.type===kS)return!0}function HS(e){return BS(e,VS,!1)}function US(e){if(e.length>0){let t=lv(0,e,-1);!t.expandedStates&&!t.break&&(t.break=`propagated`)}return null}function WS(e){let t=new Set,n=[];function r(e){if(e.type===kS&&US(n),e.type===xS){if(n.push(e),t.has(e))return!1;t.add(e)}}function i(e){e.type===xS&&n.pop().break&&US(n)}RS(e,r,i,!0)}function GS(e){return e.type===DS&&!e.hard?e.soft?``:` `:e.type===CS?e.flatContents:e}function KS(e){return zS(e,GS)}function qS(e){switch(MS(e)){case SS:if(e.parts.every(e=>e===``))return``;break;case xS:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return``;if(e.contents.type===xS&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case yS:case vS:case wS:case TS:if(!e.contents)return``;break;case CS:if(!e.flatContents&&!e.breakContents)return``;break;case gS:{let t=[];for(let n of e){if(!n)continue;let[e,...r]=Array.isArray(n)?n:[n];typeof e==`string`&&typeof lv(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 hS:case _S:case bS:case ES:case DS:case OS:case kS:break;default:throw new FS(e)}return e}function JS(e){return zS(e,e=>qS(e))}function YS(e,t=hC){return zS(e,e=>typeof e==`string`?X(t,e.split(`
312
+ `)):e)}function XS(e){if(e.type===DS)return!0}function ZS(e){return BS(e,XS,!1)}function QS(e,t){return e.type===OS?{...e,contents:t(e.contents)}:t(e)}function $S(e){let t=!0;return RS(e,e=>{switch(MS(e)){case hS:if(e===``)break;case bS:case ES:case DS:case kS:return t=!1,!1}}),t}var eC=Bv,tC=Bv,nC=Bv,rC=Bv;function q(e){return eC(e),{type:vS,contents:e}}function iC(e,t){return rC(e),eC(t),{type:yS,contents:t,n:e}}function aC(e){return iC(-1/0,e)}function oC(e){return iC(-1,e)}function sC(e,t,n){eC(e);let r=e;if(t>0){for(let e=0;e<Math.floor(t/n);++e)r=q(r);r=iC(t%n,r),r=iC(-1/0,r)}return r}var cC={type:kS},lC={type:_S};function uC(e){return nC(e),{type:SS,parts:e}}function J(e,t={}){return eC(e),tC(t.expandedStates,!0),{type:xS,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function dC(e,t){return J(e[0],{...t,expandedStates:e})}function Y(e,t=``,n={}){return eC(e),t!==``&&eC(t),{type:CS,breakContents:e,flatContents:t,groupId:n.groupId}}function fC(e,t){return eC(e),{type:wS,contents:e,groupId:t.groupId,negate:t.negate}}function X(e,t){eC(e),tC(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}function pC(e,t){return eC(t),e?{type:OS,label:e,contents:t}:t}var Z={type:DS},Q={type:DS,soft:!0},mC={type:DS,hard:!0},$=[mC,cC],hC=[{type:DS,hard:!0,literal:!0},cC];function gC(e){return eC(e),{type:TS,contents:e}}var _C={type:ES},vC=`cr`,yC=`crlf`,bC=`\r`,xC=`\r
313
+ `,SC=`
314
+ `;function CC(e){return e===vC?bC:e===yC?xC:SC}var wC={type:0},TC={type:1},EC={value:``,length:0,queue:[],get root(){return EC}};function DC(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 OC(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?TC:{type:2,width:t}:{type:3,string:t},DC(e,r,n)}function kC(e,t){return DC(e,wC,t)}function AC(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 jC(e){let t=AC(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}var MC=Symbol(`MODE_BREAK`),NC=Symbol(`MODE_FLAT`),PC=Symbol(`DOC_FILL_PRINTED_LENGTH`);function FC(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=MS(u);switch(d){case hS:u&&(s&&=(l+=` `,--n,!1),l+=u,n-=Sv(u));break;case gS:case SS:{let t=d===gS?u:u.parts,n=u[PC]??0;for(let r=t.length-1;r>=n;r--)c.push({mode:e,doc:t[r]});break}case vS:case yS:case wS:case OS:c.push({mode:e,doc:u.contents});break;case bS:{let{text:e,count:t}=jC(l);l=e,n+=t;break}case xS:{if(a&&u.break)return!1;let t=u.break?MC:e,n=u.expandedStates&&t===MC?lv(0,u.expandedStates,-1):u.contents;c.push({mode:t,doc:n});break}case CS:{let t=(u.groupId?i[u.groupId]||NC:e)===MC?u.breakContents:u.flatContents;t&&c.push({mode:e,doc:t});break}case DS:if(e===MC||u.hard)return!0;u.soft||(s=!0);break;case TS:r=!0;break;case ES:if(r)return!1}}return!1}function IC(e,t){let n=Object.create(null),r=t.printWidth,i=CC(t.endOfLine),a=0,o=[{indent:EC,mode:MC,doc:e}],s=``,c=!1,l=[],u=[],d=[],f=[],p=0;for(WS(e);o.length>0;){let{indent:e,mode:d,doc:f}=o.pop();switch(MS(f)){case hS:{let e=i===`
315
+ `?f:sv(0,f,`
316
+ `,i);e&&(s+=e,o.length>0&&(a+=Sv(e)));break}case gS:for(let t=f.length-1;t>=0;t--)o.push({indent:e,mode:d,doc:f[t]});break;case _S:if(u.length>=2)throw Error(`There are too many 'cursor' in doc.`);u.push(p+s.length);break;case vS:o.push({indent:kC(e,t),mode:d,doc:f.contents});break;case yS:o.push({indent:OC(e,f.n,t),mode:d,doc:f.contents});break;case bS:_();break;case xS:switch(d){case NC:if(!c){o.push({indent:e,mode:f.break?MC:NC,doc:f.contents});break}case MC:{c=!1;let t={indent:e,mode:NC,doc:f.contents},i=r-a,s=l.length>0;if(!f.break&&FC(t,o,i,s,n))o.push(t);else if(f.expandedStates){let t=lv(0,f.expandedStates,-1);if(f.break){o.push({indent:e,mode:MC,doc:t});break}for(let r=1;r<f.expandedStates.length+1;r++)if(r>=f.expandedStates.length){o.push({indent:e,mode:MC,doc:t});break}else{let t={indent:e,mode:NC,doc:f.expandedStates[r]};if(FC(t,o,i,s,n)){o.push(t);break}}}else o.push({indent:e,mode:MC,doc:f.contents});break}}f.id&&(n[f.id]=lv(0,o,-1).mode);break;case SS:{let t=r-a,i=f[PC]??0,{parts:s}=f,c=s.length-i;if(c===0)break;let u=s[i+0],p=s[i+1],m={indent:e,mode:NC,doc:u},h={indent:e,mode:MC,doc:u},g=FC(m,[],t,l.length>0,n,!0);if(c===1){g?o.push(m):o.push(h);break}let _={indent:e,mode:NC,doc:p},v={indent:e,mode:MC,doc:p};if(c===2){g?o.push(_,m):o.push(v,h);break}let y=s[i+2],b={indent:e,mode:d,doc:{...f,[PC]:i+2}},x=FC({indent:e,mode:NC,doc:[u,p,y]},[],t,l.length>0,n,!0);o.push(b),x?o.push(_,m):g?o.push(v,m):o.push(v,h);break}case CS:case wS:{let t=f.groupId?n[f.groupId]:d;if(t===MC){let t=f.type===CS?f.breakContents:f.negate?f.contents:q(f.contents);t&&o.push({indent:e,mode:d,doc:t})}if(t===NC){let t=f.type===CS?f.flatContents:f.negate?q(f.contents):f.contents;t&&o.push({indent:e,mode:d,doc:t})}break}case TS:l.push({indent:e,mode:d,doc:f.contents});break;case ES:l.length>0&&o.push({indent:e,mode:d,doc:mC});break;case DS:switch(d){case NC:if(f.hard)c=!0;else{f.soft||(s+=` `,a+=1);break}case MC:if(l.length>0){o.push({indent:e,mode:d,doc:f},...l.reverse()),l.length=0;break}f.literal?(s+=i,a=0,e.root&&(e.root.value&&(s+=e.root.value),a=e.root.length)):(_(),s+=i+e.value,a=e.length)}break;case OS:o.push({indent:e,mode:d,doc:f.contents});break;case kS:break;default:throw new FS(f)}o.length===0&&l.length>0&&(o.push(...l.reverse()),l.length=0)}let m=d.join(``)+s,h=[...f,...u];if(h.length!==2)return{formatted:m};let g=h[0];return{formatted:m,cursorNodeStart:g,cursorNodeText:m.slice(g,lv(0,h,-1))};function _(){let{text:e,count:t}=jC(s);e&&(d.push(e),p+=e.length),s=``,a-=t,u.length>0&&(f.push(...u.map(e=>Math.min(e,p))),u.length=0)}}function LC(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 RC=LC;function zC(e,t){let n=e.lastIndexOf(`
317
+ `);return n===-1?0:RC(e.slice(n+1).match(/^[\t ]*/u)[0],t)}var BC=zC;function VC(e,t,n){let{node:r}=e;if(r.type===`TemplateLiteral`&&JC(e)){let r=UC(e,t,n);if(r)return r}let i=`expressions`;r.type===`TSTemplateLiteralType`&&(i=`types`);let a=[],o=e.map(n,i);a.push(_C,"`");let s=0;return e.each(({index:e,node:c})=>{if(a.push(n()),c.tail)return;let{tabWidth:l}=t,u=c.value.raw,d=u.includes(`
318
+ `)?BC(u,l):s;s=d;let f=o[e],p=r[i][e],m=fx(t.originalText,H(c),V(r.quasis[e+1]));if(!m){let e=IC(f,{...t,printWidth:1/0}).formatted;e.includes(`
319
+ `)?m=!0:f=e}m&&(K(p)||p.type===`Identifier`||tb(p)||p.type===`ConditionalExpression`||p.type===`SequenceExpression`||Rb(p)||Gy(p))&&(f=[q([Q,f]),Q]);let h=d===0&&u.endsWith(`
320
+ `)?iC(-1/0,f):sC(f,d,l);a.push(J(["${",h,_C,`}`]))},`quasis`),a.push("`"),a}function HC(e,t,n){let r=n(`quasi`),{node:i}=e,a=``,o=Pb(i.quasi,G.Leading)[0];return o&&(a=fx(t.originalText,H(i.typeArguments??i.tag),V(o))?Q:` `),pC(r.label&&{tagged:!0,...r.label},[n(`tag`),n(`typeArguments`),a,_C,r])}function UC(e,t,n){let{node:r}=e,i=r.quasis[0].value.raw.trim().split(/\s*\|\s*/u);if(i.length>1||i.some(e=>e.length>0)){t.__inJestEach=!0;let a=e.map(n,`expressions`);t.__inJestEach=!1;let o=a.map(e=>"${"+IC(e,{...t,printWidth:1/0,endOfLine:`lf`}).formatted+`}`),s=[{hasLineBreak:!1,cells:[]}];for(let e=1;e<r.quasis.length;e++){let t=lv(0,s,-1),n=o[e-1];t.cells.push(n),n.includes(`
321
321
  `)&&(t.hasLineBreak=!0),r.quasis[e].value.raw.includes(`
322
- `)&&s.push({hasLineBreak:!1,cells:[]})}let c=Math.max(i.length,...s.map(e=>e.cells.length)),l=Array.from({length:c}).fill(0),u=[{cells:i},...s.filter(e=>e.cells.length>0)];for(let{cells:e}of u.filter(e=>!e.hasLineBreak))for(let[t,n]of e.entries())l[t]=Math.max(l[t],Cv(n));return[vC,"`",q([$,X($,u.map(e=>X(` | `,e.cells.map((t,n)=>e.hasLineBreak?t:t+` `.repeat(l[n]-Cv(t))))))]),$,"`"]}}function GC(e,t){let{node:n}=e,r=t();return K(n)&&(r=J([q([Q,r]),Q])),["${",r,vC,`}`]}function KC(e,t){return e.map(()=>GC(e,t),`expressions`)}function qC(e,t){return BS(e,e=>typeof e==`string`?t?cv(0,e,/(\\*)`/gu,"$1$1\\`"):JC(e):e)}function JC(e){return cv(0,e,/([\\`]|\$\{)/gu,`\\$1`)}function YC({node:e,parent:t}){let n=/^[fx]?(?:describe|it|test)$/u;return 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`&&n.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`&&n.test(t.tag.object.object.name))}var XC=[(e,t)=>e.type===`ObjectExpression`&&t===`properties`,(e,t)=>e.type===`CallExpression`&&e.callee.type===`Identifier`&&e.callee.name===`Component`&&t===`arguments`,(e,t)=>e.type===`Decorator`&&t===`expression`];function ZC(e){let t=e=>e.type===`TemplateLiteral`,n=(e,t)=>Rb(e)&&!e.computed&&e.key.type===`Identifier`&&e.key.name===`styles`&&t===`value`;return e.match(t,(e,t)=>Oy(e)&&t===`elements`,n,...XC)||e.match(t,n,...XC)}function QC(e){return e.match(e=>e.type===`TemplateLiteral`,(e,t)=>Rb(e)&&!e.computed&&e.key.type===`Identifier`&&e.key.name===`template`&&t===`value`,...XC)}function $C(e,t){return K(e,G.Block|G.Leading,({value:e})=>e===` ${t} `)}function ew({node:e,parent:t},n){return $C(e,n)||tw(t)&&$C(t,n)||t.type===`ExpressionStatement`&&$C(t,n)}function tw(e){return e.type===`AsConstExpression`||e.type===`TSAsExpression`&&e.typeAnnotation.type===`TSTypeReference`&&e.typeAnnotation.typeName.type===`Identifier`&&e.typeAnnotation.typeName.name===`const`}async function nw(e,t,n){let{node:r}=n,i=``;for(let[e,t]of r.quasis.entries()){let{raw:n}=t.value;e>0&&(i+=`@prettier-placeholder-`+(e-1)+`-id`),i+=n}let a=rw(await e(i,{parser:`scss`}),KC(n,t));if(!a)throw Error(`Couldn't insert all the expressions`);return["`",q([$,a]),Q,"`"]}function rw(e,t){if(!Bv(t))return e;let n=0,r=BS(YS(e),e=>typeof e!=`string`||!e.includes(`@prettier-placeholder`)?e:e.split(/@prettier-placeholder-(\d+)-id/u).map((e,r)=>r%2==0?XS(e):(n++,t[e])));return t.length===n?r:null}function iw(e){return e.match(void 0,(e,t)=>t===`quasi`&&e.type===`TaggedTemplateExpression`&&vy(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 aw(e){return e.type===`Identifier`&&e.name===`styled`}function ow(e){return/^[A-Z]/u.test(e.object.name)&&e.property.name===`extend`}function sw({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 aw(t.object)||ow(t);case`CallExpression`:return aw(t.callee)||t.callee.type===`MemberExpression`&&(t.callee.object.type===`MemberExpression`&&(aw(t.callee.object.object)||ow(t.callee.object))||t.callee.object.type===`CallExpression`&&aw(t.callee.object.callee));case`Identifier`:return t.name===`css`;default:return!1}}function cw({parent:e,grandparent:t}){return t?.type===`JSXAttribute`&&e.type===`JSXExpressionContainer`&&t.name.type===`JSXIdentifier`&&t.name.name===`css`}var lw=e=>iw(e)||sw(e)||cw(e)||ZC(e);async function uw(e,t,n){let{node:r}=n,i=r.quasis.length,a=KC(n,t),o=[];for(let t=0;t<i;t++){let n=r.quasis[t],s=t===0,c=t===i-1,l=n.value.cooked,u=l.split(`
323
- `),d=u.length,f=a[t],p=d>2&&u[0].trim()===``&&u[1].trim()===``,m=d>2&&u[d-1].trim()===``&&u[d-2].trim()===``,h=u.every(e=>/^\s*(?:#[^\n\r]*)?$/u.test(e));if(!c&&/#[^\n\r]*$/u.test(u[d-1]))return null;let g=null;g=h?dw(u):await e(l,{parser:`graphql`}),g?(g=qC(g,!1),!s&&p&&o.push(``),o.push(g),!c&&m&&o.push(``)):!s&&!c&&p&&o.push(``),f&&o.push(f)}return["`",q([$,X($,o)]),$,"`"]}function dw(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([$,i]):t.push(i),n=!0);return t.length===0?null:X($,t)}function fw({node:e,parent:t}){return ew({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 pw=0;async function mw(e,t,n,r,i){let{node:a}=r,o=pw;pw=pw+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=KC(r,n),u=new RegExp(s(`(\\d+)`),`gu`),d=0,f=BS(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=JC(r),i.__embeddedInHtml&&(r=cv(0,r,/<\/(?=script\b)/giu,`<\\/`)),t.push(r));continue}let a=Number(r);t.push(l[a])}return t}),p=/^\s/u.test(c)?` `:``,m=/\s$/u.test(c)?` `:``,h=i.htmlWhitespaceSensitivity===`ignore`?$:p&&m?Z:null;return h?J(["`",q([h,J(f)]),h,"`"]):mC({hug:!1},J(["`",p,d>1?q(J(f)):J(f),m,"`"]))}function hw(e){return ew(e,`HTML`)||e.match(e=>e.type===`TemplateLiteral`,(e,t)=>e.type===`TaggedTemplateExpression`&&e.tag.type===`Identifier`&&e.tag.name===`html`&&t===`quasi`)}var gw=mw.bind(void 0,`html`),_w=mw.bind(void 0,`angular`);async function vw(e,t,n){let{node:r}=n,i=cv(0,r.quasis[0].value.raw,/((?:\\\\)*)\\`/gu,(e,t)=>`\\`.repeat(t.length/2)+"`"),a=yw(i),o=a!==``;o&&(i=cv(0,i,RegExp(`^${a}`,`gmu`),``));let s=qC(await e(i,{parser:`markdown`,__inJsTemplate:!0}),!0);return["`",o?q([Q,s]):[gC,oC(s)],Q,"`"]}function yw(e){let t=e.match(/^([^\S\n]*)\S/mu);return t===null?``:t[1]}function bw({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 xw=[{test:lw,print:nw},{test:fw,print:uw},{test:hw,print:gw},{test:QC,print:_w},{test:bw,print:vw}].map(({test:e,print:t})=>({test:e,print:Cw(t)}));function Sw(e){let{node:t}=e;if(t.type!==`TemplateLiteral`||ww(t))return;let n=xw.find(({test:t})=>t(e));if(n)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===``?"``":n.print}function Cw(e){return async(...t)=>{let n=await e(...t);return n&&mC({embed:!0,...n.label},n)}}function ww({quasis:e}){return e.some(({value:{cooked:e}})=>e===null)}var Tw=Sw,Ew=/\*\/$/,Dw=/^\/\*\*?/,Ow=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,kw=/(^|\s+)\/\/([^\n\r]*)/g,Aw=/^(\r?\n)+/,jw=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,Mw=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,Nw=/(\r?\n|^) *\* ?/g,Pw=[];function Fw(e){let t=e.match(Ow);return t?t[0].trimStart():``}function Iw(e){let t=e.match(Ow)?.[0];return t==null?e:e.slice(t.length)}function Lw(e){e=cv(0,e.replace(Dw,``).replace(Ew,``),Nw,`$1`);let t=``;for(;t!==e;)t=e,e=cv(0,e,jw,`
322
+ `)&&s.push({hasLineBreak:!1,cells:[]})}let c=Math.max(i.length,...s.map(e=>e.cells.length)),l=Array.from({length:c}).fill(0),u=[{cells:i},...s.filter(e=>e.cells.length>0)];for(let{cells:e}of u.filter(e=>!e.hasLineBreak))for(let[t,n]of e.entries())l[t]=Math.max(l[t],Sv(n));return[_C,"`",q([$,X($,u.map(e=>X(` | `,e.cells.map((t,n)=>e.hasLineBreak?t:t+` `.repeat(l[n]-Sv(t))))))]),$,"`"]}}function WC(e,t){let{node:n}=e,r=t();return K(n)&&(r=J([q([Q,r]),Q])),["${",r,_C,`}`]}function GC(e,t){return e.map(()=>WC(e,t),`expressions`)}function KC(e,t){return zS(e,e=>typeof e==`string`?t?sv(0,e,/(\\*)`/gu,"$1$1\\`"):qC(e):e)}function qC(e){return sv(0,e,/([\\`]|\$\{)/gu,`\\$1`)}function JC({node:e,parent:t}){let n=/^[fx]?(?:describe|it|test)$/u;return 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`&&n.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`&&n.test(t.tag.object.object.name))}var YC=[(e,t)=>e.type===`ObjectExpression`&&t===`properties`,(e,t)=>e.type===`CallExpression`&&e.callee.type===`Identifier`&&e.callee.name===`Component`&&t===`arguments`,(e,t)=>e.type===`Decorator`&&t===`expression`];function XC(e){let t=e=>e.type===`TemplateLiteral`,n=(e,t)=>Lb(e)&&!e.computed&&e.key.type===`Identifier`&&e.key.name===`styles`&&t===`value`;return e.match(t,(e,t)=>Dy(e)&&t===`elements`,n,...YC)||e.match(t,n,...YC)}function ZC(e){return e.match(e=>e.type===`TemplateLiteral`,(e,t)=>Lb(e)&&!e.computed&&e.key.type===`Identifier`&&e.key.name===`template`&&t===`value`,...YC)}function QC(e,t){return K(e,G.Block|G.Leading,({value:e})=>e===` ${t} `)}function $C({node:e,parent:t},n){return QC(e,n)||ew(t)&&QC(t,n)||t.type===`ExpressionStatement`&&QC(t,n)}function ew(e){return e.type===`AsConstExpression`||e.type===`TSAsExpression`&&e.typeAnnotation.type===`TSTypeReference`&&e.typeAnnotation.typeName.type===`Identifier`&&e.typeAnnotation.typeName.name===`const`}async function tw(e,t,n){let{node:r}=n,i=``;for(let[e,t]of r.quasis.entries()){let{raw:n}=t.value;e>0&&(i+=`@prettier-placeholder-`+(e-1)+`-id`),i+=n}let a=nw(await e(i,{parser:`scss`}),GC(n,t));if(!a)throw Error(`Couldn't insert all the expressions`);return["`",q([$,a]),Q,"`"]}function nw(e,t){if(!zv(t))return e;let n=0,r=zS(JS(e),e=>typeof e!=`string`||!e.includes(`@prettier-placeholder`)?e:e.split(/@prettier-placeholder-(\d+)-id/u).map((e,r)=>r%2==0?YS(e):(n++,t[e])));return t.length===n?r:null}function rw(e){return e.match(void 0,(e,t)=>t===`quasi`&&e.type===`TaggedTemplateExpression`&&_y(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 iw(e){return e.type===`Identifier`&&e.name===`styled`}function aw(e){return/^[A-Z]/u.test(e.object.name)&&e.property.name===`extend`}function ow({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 iw(t.object)||aw(t);case`CallExpression`:return iw(t.callee)||t.callee.type===`MemberExpression`&&(t.callee.object.type===`MemberExpression`&&(iw(t.callee.object.object)||aw(t.callee.object))||t.callee.object.type===`CallExpression`&&iw(t.callee.object.callee));case`Identifier`:return t.name===`css`;default:return!1}}function sw({parent:e,grandparent:t}){return t?.type===`JSXAttribute`&&e.type===`JSXExpressionContainer`&&t.name.type===`JSXIdentifier`&&t.name.name===`css`}var cw=e=>rw(e)||ow(e)||sw(e)||XC(e);async function lw(e,t,n){let{node:r}=n,i=r.quasis.length,a=GC(n,t),o=[];for(let t=0;t<i;t++){let n=r.quasis[t],s=t===0,c=t===i-1,l=n.value.cooked,u=l.split(`
323
+ `),d=u.length,f=a[t],p=d>2&&u[0].trim()===``&&u[1].trim()===``,m=d>2&&u[d-1].trim()===``&&u[d-2].trim()===``,h=u.every(e=>/^\s*(?:#[^\n\r]*)?$/u.test(e));if(!c&&/#[^\n\r]*$/u.test(u[d-1]))return null;let g=null;g=h?uw(u):await e(l,{parser:`graphql`}),g?(g=KC(g,!1),!s&&p&&o.push(``),o.push(g),!c&&m&&o.push(``)):!s&&!c&&p&&o.push(``),f&&o.push(f)}return["`",q([$,X($,o)]),$,"`"]}function uw(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([$,i]):t.push(i),n=!0);return t.length===0?null:X($,t)}function dw({node:e,parent:t}){return $C({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 fw=0;async function pw(e,t,n,r,i){let{node:a}=r,o=fw;fw=fw+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=GC(r,n),u=new RegExp(s(`(\\d+)`),`gu`),d=0,f=zS(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=qC(r),i.__embeddedInHtml&&(r=sv(0,r,/<\/(?=script\b)/giu,`<\\/`)),t.push(r));continue}let a=Number(r);t.push(l[a])}return t}),p=/^\s/u.test(c)?` `:``,m=/\s$/u.test(c)?` `:``,h=i.htmlWhitespaceSensitivity===`ignore`?$:p&&m?Z:null;return h?J(["`",q([h,J(f)]),h,"`"]):pC({hug:!1},J(["`",p,d>1?q(J(f)):J(f),m,"`"]))}function mw(e){return $C(e,`HTML`)||e.match(e=>e.type===`TemplateLiteral`,(e,t)=>e.type===`TaggedTemplateExpression`&&e.tag.type===`Identifier`&&e.tag.name===`html`&&t===`quasi`)}var hw=pw.bind(void 0,`html`),gw=pw.bind(void 0,`angular`);async function _w(e,t,n){let{node:r}=n,i=sv(0,r.quasis[0].value.raw,/((?:\\\\)*)\\`/gu,(e,t)=>`\\`.repeat(t.length/2)+"`"),a=vw(i),o=a!==``;o&&(i=sv(0,i,RegExp(`^${a}`,`gmu`),``));let s=KC(await e(i,{parser:`markdown`,__inJsTemplate:!0}),!0);return["`",o?q([Q,s]):[hC,aC(s)],Q,"`"]}function vw(e){let t=e.match(/^([^\S\n]*)\S/mu);return t===null?``:t[1]}function yw({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 bw=[{test:cw,print:tw},{test:dw,print:lw},{test:mw,print:hw},{test:ZC,print:gw},{test:yw,print:_w}].map(({test:e,print:t})=>({test:e,print:Sw(t)}));function xw(e){let{node:t}=e;if(t.type!==`TemplateLiteral`||Cw(t))return;let n=bw.find(({test:t})=>t(e));if(n)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===``?"``":n.print}function Sw(e){return async(...t)=>{let n=await e(...t);return n&&pC({embed:!0,...n.label},n)}}function Cw({quasis:e}){return e.some(({value:{cooked:e}})=>e===null)}var ww=xw,Tw=/\*\/$/,Ew=/^\/\*\*?/,Dw=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,Ow=/(^|\s+)\/\/([^\n\r]*)/g,kw=/^(\r?\n)+/,Aw=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,jw=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,Mw=/(\r?\n|^) *\* ?/g,Nw=[];function Pw(e){let t=e.match(Dw);return t?t[0].trimStart():``}function Fw(e){let t=e.match(Dw)?.[0];return t==null?e:e.slice(t.length)}function Iw(e){e=sv(0,e.replace(Ew,``).replace(Tw,``),Mw,`$1`);let t=``;for(;t!==e;)t=e,e=sv(0,e,Aw,`
324
324
  $1 $2
325
- `);e=e.replace(Aw,``).trimEnd();let n=Object.create(null),r=cv(0,e,Mw,``).replace(Aw,``).trimEnd(),i;for(;i=Mw.exec(e);){let e=cv(0,i[2],kw,``);if(typeof n[i[1]]==`string`||Array.isArray(n[i[1]])){let t=n[i[1]];n[i[1]]=[...Pw,...Array.isArray(t)?t:[t],e]}else n[i[1]]=e}return{comments:r,pragmas:n}}function Rw({comments:e=``,pragmas:t={}}){let n=Object.keys(t),r=n.flatMap(e=>zw(e,t[e])).map(e=>` * ${e}
326
- `).join(``);if(!e){if(n.length===0)return``;if(n.length===1&&!Array.isArray(t[n[0]])){let e=t[n[0]];return`/** ${zw(n[0],e)[0]} */`}}let i=e.split(`
325
+ `);e=e.replace(kw,``).trimEnd();let n=Object.create(null),r=sv(0,e,jw,``).replace(kw,``).trimEnd(),i;for(;i=jw.exec(e);){let e=sv(0,i[2],Ow,``);if(typeof n[i[1]]==`string`||Array.isArray(n[i[1]])){let t=n[i[1]];n[i[1]]=[...Nw,...Array.isArray(t)?t:[t],e]}else n[i[1]]=e}return{comments:r,pragmas:n}}function Lw({comments:e=``,pragmas:t={}}){let n=Object.keys(t),r=n.flatMap(e=>Rw(e,t[e])).map(e=>` * ${e}
326
+ `).join(``);if(!e){if(n.length===0)return``;if(n.length===1&&!Array.isArray(t[n[0]])){let e=t[n[0]];return`/** ${Rw(n[0],e)[0]} */`}}let i=e.split(`
327
327
  `).map(e=>` * ${e}`).join(`
328
328
  `)+`
329
329
  `;return`/**
330
330
  `+(e?i:``)+(e&&n.length>0?` *
331
- `:``)+r+` */`}function zw(e,t){return[...Pw,...Array.isArray(t)?t:[t]].map(t=>`@${e} ${t}`.trim())}var Bw=`format`;function Vw(e){if(!e.startsWith(`#!`))return``;let t=e.indexOf(`
332
- `);return t===-1?e:e.slice(0,t)}var Hw=Vw;function Uw(e){let t=Hw(e);t&&(e=e.slice(t.length+1));let{pragmas:n,comments:r}=Lw(Fw(e));return{shebang:t,text:e,pragmas:n,comments:r}}function Ww(e){let{shebang:t,text:n,pragmas:r,comments:i}=Uw(e),a=Iw(n),o=Rw({pragmas:{[Bw]:``,...r},comments:i.trimStart()});return(t?`${t}
331
+ `:``)+r+` */`}function Rw(e,t){return[...Nw,...Array.isArray(t)?t:[t]].map(t=>`@${e} ${t}`.trim())}var zw=`format`;function Bw(e){if(!e.startsWith(`#!`))return``;let t=e.indexOf(`
332
+ `);return t===-1?e:e.slice(0,t)}var Vw=Bw;function Hw(e){let t=Vw(e);t&&(e=e.slice(t.length+1));let{pragmas:n,comments:r}=Iw(Pw(e));return{shebang:t,text:e,pragmas:n,comments:r}}function Uw(e){let{shebang:t,text:n,pragmas:r,comments:i}=Hw(e),a=Fw(n),o=Lw({pragmas:{[zw]:``,...r},comments:i.trimStart()});return(t?`${t}
333
333
  `:``)+o+(a.startsWith(`
334
334
  `)?`
335
335
  `:`
336
336
 
337
- `)+a}function Gw(e){if(!py(e))return!1;let t=`*${e.value}*`.split(`
338
- `);return t.length>1&&t.every(e=>e.trimStart()[0]===`*`)}var Kw=new WeakMap;function qw(e){return Kw.has(e)||Kw.set(e,Gw(e)),Kw.get(e)}var Jw=qw;function Yw(e,t){let n=e.node;if(hy(n))return t.originalText.slice(V(n),H(n)).trimEnd();if(Jw(n))return Xw(n);if(py(n))return[`/*`,XS(n.value),`*/`];throw Error(`Not a comment: `+JSON.stringify(n))}function Xw(e){let t=e.value.split(`
339
- `);return[`/*`,X($,t.map((e,n)=>n===0?e.trimEnd():` `+(n<t.length-1?e.trim():e.trimStart()))),`*/`]}function Zw(e,t){if(e.isRoot)return!1;let{node:n,key:r,parent:i}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&tT(n)&&nT(e))return!0;if(Qw(n))return!1;if(n.type===`Identifier`){if(n.extra?.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(n.name)||r===`left`&&(n.name===`async`&&!i.await||n.name===`let`)&&i.type===`ForOfStatement`)return!0;if(n.name===`let`){let t=e.findAncestor(e=>e.type===`ForOfStatement`)?.left;if(t&&gb(t,e=>e===n))return!0}if(r===`object`&&n.name===`let`&&i.type===`MemberExpression`&&i.computed&&!i.optional){let t=e.findAncestor(e=>e.type===`ExpressionStatement`||e.type===`ForStatement`||e.type===`ForInStatement`),r=t?t.type===`ExpressionStatement`?t.expression:t.type===`ForStatement`?t.init:t.left:void 0;if(r&&gb(r,e=>e===n))return!0}if(r===`expression`)switch(n.name){case`await`:case`interface`:case`module`:case`using`:case`yield`:case`let`:case`component`:case`hook`:case`type`:{let t=e.findAncestor(e=>!zb(e));if(t!==i&&t.type===`ExpressionStatement`)return!0}}return!1}if(n.type===`ObjectExpression`||n.type===`FunctionExpression`||n.type===`ClassExpression`||n.type===`DoExpression`){let t=e.findAncestor(e=>e.type===`ExpressionStatement`)?.expression;if(t&&gb(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`&&gb(t,e=>e===n))return!0}switch(i.type){case`ParenthesizedExpression`:return!1;case`ClassDeclaration`:case`ClassExpression`:if(r===`superClass`&&(n.type===`ArrowFunctionExpression`||n.type===`AssignmentExpression`||n.type===`AwaitExpression`||n.type===`BinaryExpression`||n.type===`ConditionalExpression`||n.type===`LogicalExpression`||n.type===`NewExpression`||n.type===`ObjectExpression`||n.type===`SequenceExpression`||n.type===`TaggedTemplateExpression`||n.type===`UnaryExpression`||n.type===`UpdateExpression`||n.type===`YieldExpression`||n.type===`TSNonNullExpression`||n.type===`ClassExpression`&&Bv(n.decorators)))return!0;break;case`ExportDefaultDeclaration`:return rT(e,t)||n.type===`SequenceExpression`;case`Decorator`:if(r===`expression`&&!oT(n))return!0;break;case`TypeAnnotation`:if(e.match(void 0,void 0,(e,t)=>t===`returnType`&&e.type===`ArrowFunctionExpression`)&&eT(n))return!0;break;case`BinaryExpression`:if(r===`left`&&(i.operator===`in`||i.operator===`instanceof`)&&n.type===`UnaryExpression`)return!0;break;case`VariableDeclarator`:if(r===`init`&&e.match(void 0,void 0,(e,t)=>t===`declarations`&&e.type===`VariableDeclaration`,(e,t)=>t===`left`&&e.type===`ForInStatement`))return!0}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`&&i.operator===`**`;case`TSNonNullExpression`:return!0;default:return!1}case`BinaryExpression`:if(i.type===`UpdateExpression`||n.operator===`in`&&$w(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!zb(n);case`ConditionalExpression`:return zb(n)||Ay(n);case`CallExpression`:case`NewExpression`:case`OptionalCallExpression`:return r===`callee`;case`ClassExpression`:case`ClassDeclaration`:return r===`superClass`;case`TSTypeAssertion`:case`TaggedTemplateExpression`:case`UnaryExpression`:case`JSXSpreadAttribute`:case`SpreadElement`:case`BindExpression`:case`AwaitExpression`:case`TSNonNullExpression`:case`UpdateExpression`:return!0;case`MemberExpression`:case`OptionalMemberExpression`:return r===`object`;case`AssignmentExpression`:case`AssignmentPattern`:return r===`left`&&(n.type===`TSTypeAssertion`||zb(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=Sb(e),o=i.operator,s=Sb(o);return!!(s>a||r===`right`&&s===a||s===a&&!bb(o,e)||s<a&&e===`%`&&(o===`+`||o===`-`)||Cb(o))}default:return!1}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`&&Hb(n)&&i.type===n.type||r===`checkType`&&Hb(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(Bb(i)||Vb(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`: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`:return i.type===`ArrayTypeAnnotation`||r===`objectType`&&(i.type===`IndexedAccessType`||i.type===`OptionalIndexedAccessType`);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===`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&&Eb(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`&&nb(i)&&jy(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`ExportDefaultDeclaration`: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;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`;default:return!1}case`OptionalMemberExpression`:case`OptionalCallExpression`:case`CallExpression`:case`MemberExpression`:if(iT(e))return!0;case`TaggedTemplateExpression`:case`TSNonNullExpression`:if(r===`callee`&&(i.type===`BindExpression`||i.type===`NewExpression`)){let e=n;for(;e;)switch(e.type){case`CallExpression`:case`OptionalCallExpression`: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`&&nb(i);case`NGPipeExpression`:return!(i.type===`NGRoot`||i.type===`NGMicrosyntaxExpression`||i.type===`ObjectProperty`&&!n.extra?.parenthesized||Oy(i)||r===`arguments`&&tb(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===`<`||!Oy(i)&&i.type!==`ArrowFunctionExpression`&&i.type!==`AssignmentExpression`&&i.type!==`AssignmentPattern`&&i.type!==`BinaryExpression`&&i.type!==`NewExpression`&&i.type!==`ConditionalExpression`&&i.type!==`ExpressionStatement`&&i.type!==`JsExpressionRoot`&&i.type!==`JSXAttribute`&&i.type!==`JSXElement`&&i.type!==`JSXExpressionContainer`&&i.type!==`JSXFragment`&&i.type!==`LogicalExpression`&&!tb(i)&&!Rb(i)&&i.type!==`ReturnStatement`&&i.type!==`ThrowStatement`&&i.type!==`TypeCastExpression`&&i.type!==`VariableDeclarator`&&i.type!==`YieldExpression`&&i.type!==`MatchExpressionCase`;case`TSInstantiationExpression`:return r===`object`&&nb(i);case`MatchOrPattern`:return i.type===`MatchAsPattern`}return!1}var Qw=W(`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 $w(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 eT(e){return Cy(e,e=>e.type===`ObjectTypeAnnotation`&&Cy(e,e=>e.type===`FunctionTypeAnnotation`))}function tT(e){return ky(e)}function nT(e){let{parent:t,key:n}=e;switch(t.type){case`NGPipeExpression`:if(n===`arguments`&&e.isLast)return e.callParent(nT);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(nT);break;case`ConditionalExpression`:if(n===`alternate`)return e.callParent(nT);break;case`UnaryExpression`:if(t.prefix)return e.callParent(nT)}return!1}function rT(e,t){let{node:n,parent:r}=e;return n.type===`FunctionExpression`||n.type===`ClassExpression`?r.type===`ExportDefaultDeclaration`||!Zw(e,t):!wy(n)||r.type!==`ExportDefaultDeclaration`&&Zw(e,t)?!1:e.call(()=>rT(e,t),...Ey(n))}function iT(e){return!!(e.match(void 0,(e,t)=>t===`expression`&&e.type===`ChainExpression`,(e,t)=>t===`tag`&&e.type===`TaggedTemplateExpression`)||e.match(e=>e.type===`OptionalCallExpression`||e.type===`OptionalMemberExpression`,(e,t)=>t===`tag`&&e.type===`TaggedTemplateExpression`)||e.match(e=>e.type===`OptionalCallExpression`||e.type===`OptionalMemberExpression`,(e,t)=>t===`expression`&&e.type===`TSNonNullExpression`,(e,t)=>t===`tag`&&e.type===`TaggedTemplateExpression`)||e.match(void 0,(e,t)=>t===`expression`&&e.type===`ChainExpression`,(e,t)=>t===`expression`&&e.type===`TSNonNullExpression`,(e,t)=>t===`tag`&&e.type===`TaggedTemplateExpression`)||e.match(void 0,(e,t)=>t===`expression`&&e.type===`TSNonNullExpression`,(e,t)=>t===`expression`&&e.type===`ChainExpression`,(e,t)=>t===`tag`&&e.type===`TaggedTemplateExpression`)||e.match(e=>e.type===`OptionalMemberExpression`||e.type===`OptionalCallExpression`,(e,t)=>t===`object`&&e.type===`MemberExpression`||t===`callee`&&(e.type===`CallExpression`||e.type===`NewExpression`))||e.match(e=>e.type===`OptionalMemberExpression`||e.type===`OptionalCallExpression`,(e,t)=>t===`expression`&&e.type===`TSNonNullExpression`,(e,t)=>t===`object`&&e.type===`MemberExpression`||t===`callee`&&e.type===`CallExpression`)||e.match(e=>e.type===`CallExpression`||e.type===`MemberExpression`,(e,t)=>t===`expression`&&e.type===`ChainExpression`)&&(e.match(void 0,void 0,(e,t)=>t===`callee`&&(e.type===`CallExpression`&&!e.optional||e.type===`NewExpression`)||t===`object`&&e.type===`MemberExpression`&&!e.optional)||e.match(void 0,void 0,(e,t)=>t===`expression`&&e.type===`TSNonNullExpression`,(e,t)=>t===`object`&&e.type===`MemberExpression`||t===`callee`&&e.type===`CallExpression`))||e.match(e=>e.type===`CallExpression`||e.type===`MemberExpression`,(e,t)=>t===`expression`&&e.type===`TSNonNullExpression`,(e,t)=>t===`expression`&&e.type===`ChainExpression`,(e,t)=>t===`object`&&e.type===`MemberExpression`||t===`callee`&&e.type===`CallExpression`))}function aT(e){return e.type===`Identifier`?!0:nb(e)?!e.computed&&!e.optional&&e.property.type===`Identifier`&&aT(e.object):!1}function oT(e){return e.type===`ChainExpression`&&(e=e.expression),aT(e)||tb(e)&&!e.optional&&aT(e.callee)}var sT=Zw;function cT(e,t){let n=t-1;n=Tv(e,n,{backwards:!0}),n=Av(e,n,{backwards:!0}),n=Tv(e,n,{backwards:!0});let r=Av(e,n,{backwards:!0});return n!==r}var lT=cT,uT=()=>!0;function dT(e,t){let n=e.node;return n.printed=!0,t.printer.printComment(e,t)}function fT(e,t){let n=e.node,r=[dT(e,t)],{printer:i,originalText:a,locStart:o,locEnd:s}=t;if(i.isBlockComment?.(n)){let e=Mv(a,s(n))?Mv(a,o(n),{backwards:!0})?$:Z:` `;r.push(e)}else r.push($);let c=Av(a,Tv(a,s(n)));return c!==!1&&Mv(a,c)&&r.push($),r}function pT(e,t,n){let r=e.node,i=dT(e,t),{printer:a,originalText:o,locStart:s}=t,c=a.isBlockComment?.(r);return n?.hasLineSuffix&&!n?.isBlock||Mv(o,s(r),{backwards:!0})?{doc:_C([$,lT(o,s(r))?$:``,i]),isBlock:c,hasLineSuffix:!0}:!c||n?.hasLineSuffix?{doc:[_C([` `,i]),lC],isBlock:c,hasLineSuffix:!0}:{doc:[` `,i],isBlock:c,hasLineSuffix:!1}}function mT(e,t,n={}){let{node:r}=e;if(!Bv(r?.comments))return``;let{indent:i=!1,marker:a,filter:o=uT}=n,s=[];if(e.each(({node:n})=>{n.leading||n.trailing||n.marker!==a||!o(n)||s.push(dT(e,t))},`comments`),s.length===0)return``;let c=X($,s);return i?q([$,c]):c}function hT(e,t){let n=e.node;if(!n)return{};let r=t[Symbol.for(`printedComments`)];if((n.comments||[]).filter(e=>!r.has(e)).length===0)return{leading:``,trailing:``};let i=[],a=[],o;return e.each(()=>{let n=e.node;if(r?.has(n))return;let{leading:s,trailing:c}=n;s?i.push(fT(e,t)):c&&(o=pT(e,t,o),a.push(o.doc))},`comments`),{leading:i,trailing:a}}function gT(e,t,n){let{leading:r,trailing:i}=hT(e,n);return!r&&!i?t:$S(t,e=>[r,e,i])}var _T=class extends Error{name=`ArgExpansionBailout`};function vT(e,t,n,r,i){let a=e.node,o=Eb(a),s=i&&a.typeParameters?n(`typeParameters`):``;if(o.length===0)return[s,`(`,mT(e,t,{filter:e=>dx(t.originalText,H(e))===`)`}),`)`];let{parent:c}=e,l=$y(c),u=yT(a),d=[];if(Db(e,(e,r)=>{let i=r===o.length-1;i&&a.rest&&d.push(`...`),d.push(n()),!i&&(d.push(`,`),l||u?d.push(` `):Ib(o[r],t)?d.push($,$):d.push(Z))}),r&&!ST(e)){if(US(s)||US(d))throw new _T;return J([qS(s),`(`,qS(d),`)`])}let f=o.every(e=>!Bv(e.decorators));return u&&f||l?[s,`(`,...d,`)`]:(Wy(c)||Gy(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&&Yy(o[0].typeAnnotation)&&!a.rest?t.arrowParens===`always`||a.type===`HookTypeAnnotation`?[`(`,...d,`)`]:d:[s,`(`,q([Q,...d]),Y(!wb(a)&&hb(t,`all`)&&e.root.type!==`NGRoot`?`,`:``),Q,`)`]}function yT(e){if(!e)return!1;let t=Eb(e);if(t.length!==1)return!1;let[n]=t;return!K(n)&&(n.type===`ObjectPattern`||n.type===`ArrayPattern`||n.type===`Identifier`&&n.typeAnnotation&&(n.typeAnnotation.type===`TypeAnnotation`||n.typeAnnotation.type===`TSTypeAnnotation`)&&Ry(n.typeAnnotation.typeAnnotation)||n.type===`FunctionTypeParam`&&Ry(n.typeAnnotation)&&n!==e.rest||n.type===`AssignmentPattern`&&(n.left.type===`ObjectPattern`||n.left.type===`ArrayPattern`)&&(n.right.type===`Identifier`||ky(n.right)&&n.right.properties.length===0||Oy(n.right)&&n.right.elements.length===0))}function bT(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}function xT(e,t){let n=bT(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 Eb(e).length===1&&(Ry(n)||US(t))}function ST(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 CT(e){let t=Eb(e);return t.length>1&&t.some(e=>e.type===`TSParameterProperty`)}function wT(e,t){return(t===`params`||t===`this`||t===`rest`)&&yT(e)}function TT(e){let{node:t}=e;return!t.optional||t.type===`Identifier`&&t===e.parent.key?``:tb(t)||nb(t)&&t.computed||t.type===`OptionalIndexedAccessType`?`?.`:`?`}function ET(e){return e.node.definite||e.match(void 0,(e,t)=>t===`id`&&e.type===`VariableDeclarator`&&e.definite)?`!`:``}var DT=W([`DeclareClass`,`DeclareComponent`,`DeclareFunction`,`DeclareHook`,`DeclareVariable`,`DeclareExportDeclaration`,`DeclareExportAllDeclaration`,`DeclareOpaqueType`,`DeclareTypeAlias`,`DeclareEnum`,`DeclareInterface`]);function OT(e){let{node:t}=e;return t.declare||DT(t)&&e.parent.type!==`DeclareExportDeclaration`?`declare `:``}var kT=W([`TSAbstractMethodDefinition`,`TSAbstractPropertyDefinition`,`TSAbstractAccessorProperty`]);function AT({node:e}){return e.abstract||kT(e)?`abstract `:``}function jT(e,t,n){return e.type===`EmptyStatement`?K(e,G.Leading)?[` `,t]:t:e.type===`BlockStatement`||n?[` `,t]:q([Z,t])}function MT(e){return e.accessibility?e.accessibility+` `:``}var NT=/^[\$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]*$/,PT=e=>NT.test(e);function FT(e){return e.length===1?e:e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/u,`$1$2`).replace(/^([+-]?[\d.]+)e[+-]?0+$/u,`$1`).replace(/^([+-])?\./u,`$10.`).replace(/(\.\d+?)0+(?=e|$)/u,`$1`).replace(/\.(?=e|$)/u,``)}var IT=FT,LT=0;function RT(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=zT(e,t,n,!1,s);if(s)return l;if(c)return J(l);if(o===`callee`&&(tb(i)||i.type===`NewExpression`)||i.type===`UnaryExpression`||nb(i)&&!i.computed)return J([q([Q,...l]),Q]);let u=i.type===`ReturnStatement`||i.type===`ThrowStatement`||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`&&a.type!==`ReturnStatement`&&a.type!==`ThrowStatement`&&!tb(a)&&a.type!==`NewExpression`||i.type===`TemplateLiteral`||UT(e),d=i.type===`AssignmentExpression`||i.type===`VariableDeclarator`||i.type===`ClassProperty`||i.type===`PropertyDefinition`||i.type===`TSAbstractPropertyDefinition`||i.type===`ClassPrivateProperty`||Rb(i),f=Ky(r.left)&&bb(r.operator,r.left.operator);if(u||BT(r)&&!f||!BT(r)&&d)return J(l);if(l.length===0)return``;let p=Hy(r.right),m=l.findIndex(e=>typeof e!=`string`&&!Array.isArray(e)&&e.type===SS),h=l.slice(0,m===-1?1:m+1),g=l.slice(h.length,p?-1:void 0),_=Symbol(`logicalChain-`+ ++LT),v=J([...h,q(g)],{id:_});return p?J([v,pC(uv(0,l,-1),{groupId:_})]):v}function zT(e,t,n,r,i){let{node:a}=e;if(!Ky(a))return[J(n())];let o=[];bb(a.operator,a.left.operator)?o=e.call(()=>zT(e,t,n,!0,i),`left`):o.push(J(n(`left`)));let s=BT(a),c=a.right.type===`ChainExpression`?a.right.expression:a.right,l=(a.operator===`|>`||a.type===`NGPipeExpression`||HT(e,t))&&!sb(t.originalText,c),u=!K(c,G.Leading,gx)&&sb(t.originalText,c),d=a.type===`NGPipeExpression`?`|`:a.operator,f=a.type===`NGPipeExpression`&&a.arguments.length>0?J(q([Q,`: `,X([Z,`: `],e.map(()=>aC(2,J(n())),`arguments`))])):``,p;if(s)p=[d,sb(t.originalText,c)?q([Z,n(`right`),f]):[` `,n(`right`),f]];else{let r=d===`|>`&&e.root.extra?.__isUsingHackPipeline?e.call(()=>zT(e,t,n,!0,i),`right`):n(`right`);if(t.experimentalOperatorPosition===`start`){let e=``;if(u)switch(NS(r)){case _S:e=r.splice(0,1)[0];break;case kS:e=r.contents.splice(0,1)[0];break}p=[Z,e,d,` `,r,f]}else p=[l?Z:``,d,l?` `:Z,r,f]}let{parent:m}=e,h=K(a.left,G.Trailing|G.Line);if((h||!(i&&a.type===`LogicalExpression`)&&m.type!==a.type&&a.left.type!==a.type&&a.right.type!==a.type)&&(p=J(p,{shouldBreak:h})),t.experimentalOperatorPosition===`start`?o.push(s||u?` `:``,p):o.push(l?``:` `,p),r&&K(a)){let n=YS(gT(e,o,t));return n.type===CS?n.parts:Array.isArray(n)?n:[n]}return o}function BT(e){return e.type===`LogicalExpression`&&!!(ky(e.right)&&e.right.properties.length>0||Oy(e.right)&&e.right.elements.length>0||Hy(e.right))}var VT=e=>e.type===`BinaryExpression`&&e.operator===`|`;function HT(e,t){return(t.parser===`__vue_expression`||t.parser===`__vue_ts_expression`)&&VT(e.node)&&!e.hasAncestor(e=>!VT(e)&&e.type!==`JsExpressionRoot`)}function UT(e){if(e.key!==`arguments`)return!1;let{parent:t}=e;if(!(tb(t)&&!t.optional&&t.arguments.length===1))return!1;let{callee:n}=t;return n.type===`Identifier`&&n.name===`Boolean`}function WT(e,t,n){let{node:r}=e,{parent:i}=e,a=i.type!==`TypeParameterInstantiation`&&(!Hb(i)||!t.experimentalTernaries)&&i.type!==`TSTypeParameterInstantiation`&&i.type!==`GenericTypeAnnotation`&&i.type!==`TSTypeReference`&&i.type!==`TSTypeAssertion`&&i.type!==`TupleTypeAnnotation`&&i.type!==`TSTupleType`&&!(i.type===`FunctionTypeParam`&&!i.name&&e.grandparent.this!==i)&&!((Wb(i)||i.type===`VariableDeclarator`)&&sb(t.originalText,r))&&!(Wb(i)&&K(i.id,G.Trailing|G.Line)),o=qT(r),s=e.map(()=>{let r=n();return o||(r=aC(2,r)),gT(e,r,t)},`types`),c=``,l=``;if(Gb(e)&&({leading:c,trailing:l}=hT(e,t)),o)return[c,X(` | `,s),l];let u=[Y([a&&!sb(t.originalText,r)?Z:``,`| `]),X([Z,`| `],s)];if(sT(e,t))return[c,J([q(u),Q]),l];let d=[c,J(u)];return(i.type===`TupleTypeAnnotation`||i.type===`TSTupleType`)&&i[i.type===`TupleTypeAnnotation`&&i.types?`types`:`elementTypes`].length>1?[J([q([Y([`(`,Q]),d]),Q,Y(`)`)]),l]:[J(a?q(d):d),l]}var GT=W([`VoidTypeAnnotation`,`TSVoidKeyword`,`NullLiteralTypeAnnotation`,`TSNullKeyword`]),KT=W([`ObjectTypeAnnotation`,`TSTypeLiteral`,`GenericTypeAnnotation`,`TSTypeReference`]);function qT(e){let{types:t}=e;if(t.some(e=>K(e)))return!1;let n=t.find(e=>KT(e));return n?t.every(e=>e===n||GT(e)):!1}function JT(e){return Yy(e)||Ry(e)?!0:Bb(e)?qT(e):!1}var YT=new WeakSet;function XT(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(ZT,n);(t===`=>`||t===`:`&&K(r,G.Leading))&&(i=!0),YT.add(r)}return i?[` `,t(n)]:t(n)}var ZT=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 QT(e,t,n){let r=ZT(e);return r?[r,` `,n(`typeAnnotation`)]:n(`typeAnnotation`)}function $T(e,t,n,r){let{node:i}=e,a=i.inexact?`...`:``;return K(i,G.Dangling)?J([n,a,mT(e,t,{indent:!0}),Q,r]):[n,a,r]}function eE(e,t,n){let{node:r}=e,i=[],a=r.type===`TupleTypeAnnotation`&&r.types?`types`:r.type===`TSTupleType`||r.type===`TupleTypeAnnotation`?`elementTypes`:`elements`,o=r[a];if(o.length===0)i.push($T(e,t,`[`,`]`));else{let s=uv(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)=>{let r=e?.type;if(!Oy(e)&&!ky(e))return!1;let i=n[t+1];if(i&&r!==i.type)return!1;let a=Oy(e)?`elements`:`properties`;return e[a]&&e[a].length>1}),f=tE(r,t),p=c?l?`,`:hb(t)?f?Y(`,`,``,{groupId:u}):Y(`,`):``:``;i.push(J([`[`,q([Q,f?iE(e,t,n,p):[rE(e,t,n,a,r.inexact),p],mT(e,t)]),Q,`]`],{shouldBreak:d,id:u}))}return i.push(TT(e),XT(e,n)),i}function tE(e,t){return Oy(e)&&e.elements.length>0&&e.elements.every(e=>e&&(jy(e)||Ny(e)&&!K(e.argument))&&!K(e,G.Trailing|G.Line,e=>!Mv(t.originalText,V(e),{backwards:!0})))}function nE({node:e},{originalText:t}){let n=H(e);if(n===V(e))return!1;let{length:r}=t;for(;n<r&&t[n]!==`,`;)n=Pv(t,Iv(t,n+1));return Rv(t,n)}function rE(e,t,n,r,i){let a=[];return e.each(({node:r,isLast:o})=>{a.push(r?J(n()):``),(!o||i)&&a.push([`,`,Z,r&&nE(e,t)?Q:``])},r),i&&a.push(`...`),a}function iE(e,t,n,r){let i=[];return e.each(({isLast:a,next:o})=>{i.push([n(),a?r:`,`]),a||i.push(nE(e,t)?[$,$]:K(o,G.Leading|G.Line)?$:Z)},`elements`),dC(i)}function aE(e,t,n){let{node:r}=e,i=kb(r);if(i.length===0)return[`(`,mT(e,t),`)`];let a=i.length-1;if(uE(i)){let t=[`(`];return Ab(e,(e,r)=>{t.push(n()),r!==a&&t.push(`, `)}),t.push(`)`),t}let o=!1,s=[];Ab(e,({node:e},r)=>{let i=n();r===a||(Ib(e,t)?(o=!0,i=[i,`,`,$,$]):i=[i,`,`,Z]),s.push(i)});let c=!t.parser.startsWith(`__ng_`)&&r.type!==`ImportExpression`&&r.type!==`TSImportType`&&r.type!==`TSExternalModuleReference`&&hb(t,`all`)?`,`:``;function l(){return J([`(`,q([Z,...s]),c,Z,`)`],{shouldBreak:!0})}if(o||e.parent.type!==`Decorator`&&db(i))return l();if(cE(i)){let e=s.slice(1);if(e.some(US))return l();let t;try{t=n(jb(r,0),{expandFirstArg:!0})}catch(e){if(e instanceof _T)return l();throw e}return US(t)?[lC,fC([[`(`,J(t,{shouldBreak:!0}),`, `,...e,`)`],l()])]:fC([[`(`,t,`, `,...e,`)`],[`(`,J(t,{shouldBreak:!0}),`, `,...e,`)`],l()])}if(sE(i,s,t)){let e=s.slice(0,-1);if(e.some(US))return l();let t;try{t=n(jb(r,-1),{expandLastArg:!0})}catch(e){if(e instanceof _T)return l();throw e}return US(t)?[lC,fC([[`(`,...e,J(t,{shouldBreak:!0}),`)`],l()])]:fC([[`(`,...e,t,`)`],[`(`,...e,J(t,{shouldBreak:!0}),`)`],l()])}let u=[`(`,q([Q,...s]),Y(c),Q,`)`];return fb(e)?u:J(u,{shouldBreak:s.some(US)||o})}function oE(e,t=!1){return ky(e)&&(e.properties.length>0||K(e))||Oy(e)&&(e.elements.length>0||K(e))||e.type===`TSTypeAssertion`&&oE(e.expression)||zb(e)&&oE(e.expression)||e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`&&(!e.returnType||!e.returnType.typeAnnotation||e.returnType.typeAnnotation.type!==`TSTypeReference`||fE(e.body))&&(e.body.type===`BlockStatement`||e.body.type===`ArrowFunctionExpression`&&oE(e.body,!0)||ky(e.body)||Oy(e.body)||!t&&(tb(e.body)||e.body.type===`ConditionalExpression`)||Hy(e.body))||e.type===`DoExpression`||e.type===`ModuleExpression`}function sE(e,t,n){let r=uv(0,e,-1);if(e.length===1){let e=uv(0,t,-1);if(e.label?.embed&&e.label?.hug!==!1)return!0}let i=uv(0,e,-2);return!K(r,G.Leading)&&!K(r,G.Trailing)&&oE(r)&&(!i||i.type!==r.type)&&(e.length!==2||i.type!==`ArrowFunctionExpression`||!Oy(r))&&!(e.length>1&&tE(r,n))}function cE(e){if(e.length!==2)return!1;let[t,n]=e;return t.type===`ModuleExpression`&&pE(n)?!0:!K(t)&&(t.type===`FunctionExpression`||t.type===`ArrowFunctionExpression`&&t.body.type===`BlockStatement`)&&n.type!==`FunctionExpression`&&n.type!==`ArrowFunctionExpression`&&n.type!==`ConditionalExpression`&&lE(n)&&!oE(n)}function lE(e){if(e.type===`ParenthesizedExpression`)return lE(e.expression);if(zb(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 Yy(t)&&mb(e.expression,1)}return Lb(e)&&kb(e).length>1?!1:Ky(e)?mb(e.left,1)&&mb(e.right,1):Fy(e)||mb(e)}function uE(e){return e.length===2?dE(e,0):e.length===3&&e[0].type===`Identifier`&&dE(e,1)}function dE(e,t){let n=e[t],r=e[t+1];return n.type===`ArrowFunctionExpression`&&Eb(n).length===0&&n.body.type===`BlockStatement`&&r.type===`ArrayExpression`&&!e.some(e=>K(e))}function fE(e){return e.type===`BlockStatement`&&(e.body.some(e=>e.type!==`EmptyStatement`)||K(e,G.Dangling))}function pE(e){if(e.type!==`ObjectExpression`||e.properties.length!==1)return!1;let[t]=e.properties;return Rb(t)?!t.computed&&(t.key.type===`Identifier`&&t.key.name===`type`||Py(t.key)&&t.key.value===`type`)&&Py(t.value)&&t.value.value===`module`:!1}var mE=aE;function hE(e,t,n){return[n(`object`),J(q([Q,gE(e,t,n)]))]}function gE(e,t,n){return[`::`,n(`callee`)]}var _E=e=>((e.type===`ChainExpression`||e.type===`TSNonNullExpression`)&&(e=e.expression),tb(e)&&kb(e).length>0);function vE(e){let{node:t,ancestors:n}=e;for(let e of n){if(!(nb(e)&&e.object===t||e.type===`TSNonNullExpression`&&e.expression===t))return e.type===`NewExpression`&&e.callee===t;t=e}return!1}function yE(e,t,n){let r=n(`object`),i=bE(e,t,n),{node:a}=e,o=e.findAncestor(e=>!(nb(e)||e.type===`TSNonNullExpression`)),s=e.findAncestor(e=>e.type!==`ChainExpression`&&e.type!==`TSNonNullExpression`),c=o.type===`BindExpression`||o.type===`AssignmentExpression`&&o.left.type!==`Identifier`||vE(e)||a.computed||a.object.type===`Identifier`&&a.property.type===`Identifier`&&!nb(s)||(s.type===`AssignmentExpression`||s.type===`VariableDeclarator`)&&(_E(a.object)||r.label?.memberChain);return mC(r.label,[r,c?i:J(q([Q,i]))])}function bE(e,t,n){let r=n(`property`),{node:i}=e,a=TT(e);return i.computed?!i.property||jy(i.property)?[a,`[`,r,`]`]:J([a,`[`,q([Q,r]),Q,`]`]):[a,`.`,r]}function xE(e,t,n){if(e.node.type===`ChainExpression`)return e.call(()=>xE(e,t,n),`expression`);let r=(e.parent.type===`ChainExpression`?e.grandparent:e.parent).type===`ExpressionStatement`,i=[];function a(e){let{originalText:n}=t,r=lx(n,H(e));return n.charAt(r)===`)`?r!==!1&&Rv(n,r+1):Ib(e,t)}function o(){let{node:r}=e;if(r.type===`ChainExpression`)return e.call(o,`expression`);if(tb(r)&&(qy(r.callee)||tb(r.callee))){let s=a(r);i.unshift({node:r,hasTrailingEmptyLine:s,printed:[gT(e,[TT(e),n(`typeArguments`),mE(e,t,n)],t),s?$:``]}),e.call(o,`callee`)}else qy(r)?(i.unshift({node:r,needsParens:sT(e,t),printed:gT(e,nb(r)?bE(e,t,n):gE(e,t,n),t)}),e.call(o,`object`)):r.type===`TSNonNullExpression`?(i.unshift({node:r,printed:gT(e,`!`,t)}),e.call(o,`expression`)):i.unshift({node:r,printed:n()})}let{node:s}=e;i.unshift({node:s,printed:[TT(e),n(`typeArguments`),mE(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`||tb(i[u].node)||nb(i[u].node)&&i[u].node.computed&&jy(i[u].node.property));++u)l.push(i[u]);if(!tb(i[0].node))for(;u+1<i.length&&qy(i[u].node)&&qy(i[u+1].node);++u)l.push(i[u]);c.push(l),l=[];let d=!1;for(;u<i.length;++u){if(d&&qy(i[u].node)){if(i[u].node.computed&&jy(i[u].node.property)){l.push(i[u]);continue}c.push(l),l=[],d=!1}(tb(i[u].node)||i[u].node.type===`ImportExpression`)&&(d=!0),l.push(i[u]),K(i[u].node,G.Trailing)&&(c.push(l),l=[],d=!1)}l.length>0&&c.push(l);function f(e){return/^[A-Z]|^[$_]+$/u.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=uv(0,e[0],-1).node;return nb(n)&&n.property.type===`Identifier`&&(f(n.property.name)||t)}let h=c.length>=2&&!K(c[1][0].node)&&m(c);function g(e){let t=e.map(e=>e.printed);return e.length>0&&uv(0,e,-1).needsParens?[`(`,...t,`)`]:t}function _(e){return e.length===0?``:q([$,X($,e.map(g))])}let v=c.map(g),y=v,b=h?3:2,x=c.flat(),S=x.slice(1,-1).some(e=>K(e.node,G.Leading))||x.slice(0,-1).some(e=>K(e.node,G.Trailing))||c[b]&&K(c[b][0].node,G.Leading);if(c.length<=b&&!S&&!c.some(e=>uv(0,e,-1).hasTrailingEmptyLine))return fb(e)?y:J(y);let C=uv(0,c[+!!h],-1).node,w=!tb(C)&&a(C),T=[g(c[0]),h?c.slice(1,2).map(g):``,w?$:``,_(c.slice(h?2:1))],ee=i.map(({node:e})=>e).filter(tb);function E(){let e=uv(0,uv(0,c,-1),-1).node,t=uv(0,v,-1);return tb(e)&&US(t)&&ee.slice(0,-1).some(e=>e.arguments.some(zy))}let te;return te=S||ee.length>2&&ee.some(e=>!e.arguments.every(e=>mb(e)))||v.slice(0,-1).some(US)||E()?J(T):[US(y)||w?lC:``,fC([y,T])],mC({memberChain:!0},te)}var SE=xE;function CE(e,t,n){let{node:r}=e,i=r.type===`NewExpression`,a=TT(e),o=kb(r),s=r.type!==`TSImportType`&&r.typeArguments?n(`typeArguments`):``,c=o.length===1&&lb(o[0],t.originalText);if(c||EE(e)||DE(e)||$y(r,e.parent)){let t=[];if(Ab(e,()=>{t.push(n())}),!(c&&t[0].label?.embed))return[i?`new `:``,wE(e,n),a,s,`(`,X(`, `,t),`)`]}let l=r.type===`ImportExpression`||r.type===`TSImportType`||r.type===`TSExternalModuleReference`;if(!l&&!i&&qy(r.callee)&&!e.call(()=>sT(e,t),`callee`,...r.callee.type===`ChainExpression`?[`expression`]:[]))return SE(e,t,n);let u=[i?`new `:``,wE(e,n),a,s,mE(e,t,n)];return l||tb(r.callee)?J(u):u}function wE(e,t){let{node:n}=e;return n.type===`ImportExpression`?`import${n.phase?`.${n.phase}`:``}`:n.type===`TSImportType`?`import`:n.type===`TSExternalModuleReference`?`require`:t(`callee`)}var TE=[`require`,`require.resolve`,`require.resolve.paths`,`import.meta.resolve`];function EE(e){let{node:t}=e;if(!(t.type===`ImportExpression`||t.type===`TSImportType`||t.type===`TSExternalModuleReference`||t.type===`CallExpression`&&!t.optional&&vy(t.callee,TE)))return!1;let n=kb(t);return n.length===1&&Py(n[0])&&!K(n[0])}function DE(e){let{node:t}=e;if(t.type!==`CallExpression`||t.optional||t.callee.type!==`Identifier`)return!1;let n=kb(t);return t.callee.name===`require`?(n.length===1&&Py(n[0])||n.length>1)&&!K(n[0]):t.callee.name===`define`&&e.parent.type===`ExpressionStatement`?n.length===1||n.length===2&&n[0].type===`ArrayExpression`||n.length===3&&Py(n[0])&&n[1].type===`ArrayExpression`:!1}function OE(e,t,n,r,i,a){let o=jE(e,t,n,r,a),s=a?n(a,{assignmentLayout:o}):``;switch(o){case`break-after-operator`:return J([J(r),i,J(q([Z,s]))]);case`never-break-after-operator`:return J([J(r),i,` `,s]);case`fluid`:{let e=Symbol(`assignment`);return J([J(r),i,J(q(Z),{id:e}),vC,pC(s,{groupId:e})])}case`break-lhs`:return J([r,i,` `,J(s)]);case`chain`:return[J(r),i,Z,s];case`chain-tail`:return[J(r),i,q([Z,s])];case`chain-tail-arrow-chain`:return[J(r),i,s];case`only-left`:return r}}function kE(e,t,n){let{node:r}=e;return OE(e,t,n,n(`left`),[` `,r.operator],`right`)}function AE(e,t,n){return OE(e,t,n,n(`id`),` =`,`init`)}function jE(e,t,n,r,i){let{node:a}=e,o=a[i];if(!o)return`only-left`;let s=!PE(o);if(e.match(PE,FE,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&&PE(o.right)||sb(t.originalText,o))return`break-after-operator`;if(a.type===`ImportAttribute`||o.type===`CallExpression`&&o.callee.name===`require`||t.parser===`json5`||t.parser===`jsonc`||t.parser===`json`)return`never-break-after-operator`;let c=QS(r);if(NE(a)||RE(a)||zE(a)&&c)return`break-lhs`;let l=HE(a,r,t);return e.call(()=>ME(e,t,n,l),i)?`break-after-operator`:IE(a)?`break-lhs`:!c&&(l||o.type===`TemplateLiteral`||o.type===`TaggedTemplateExpression`||My(o)||jy(o)||o.type===`ClassExpression`)?`never-break-after-operator`:`fluid`}function ME(e,t,n,r){let i=e.node;if(Ky(i)&&!BT(i))return!0;switch(i.type){case`StringLiteralTypeAnnotation`:case`SequenceExpression`:return!0;case`TSConditionalType`:case`ConditionalTypeAnnotation`:if(!t.experimentalTernaries&&!KE(i))break;return!0;case`ConditionalExpression`:{if(!t.experimentalTernaries){let{test:e}=i;return Ky(e)&&!BT(e)}let{consequent:e,alternate:n}=i;return e.type===`ConditionalExpression`||n.type===`ConditionalExpression`}case`ClassExpression`:return Bv(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!!(Py(a)||e.call(()=>VE(e,t,n),...o))}function NE(e){if(FE(e)){let t=e.left||e.id;return t.type===`ObjectPattern`&&t.properties.length>2&&t.properties.some(e=>Rb(e)&&(!e.shorthand||e.value?.type===`AssignmentPattern`))}return!1}function PE(e){return e.type===`AssignmentExpression`}function FE(e){return PE(e)||e.type===`VariableDeclarator`}function IE(e){let t=LE(e);if(Bv(t)){let n=e.type===`TSTypeAliasDeclaration`?`constraint`:`bound`;if(t.length>1&&t.some(e=>e[n]||e.default))return!0}return!1}function LE(e){if(Wb(e))return e.typeParameters?.params}function RE(e){if(e.type!==`VariableDeclarator`)return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let n=BE(t.typeAnnotation);return Bv(n)&&n.length>1&&n.some(e=>Bv(BE(e))||e.type===`TSConditionalType`)}function zE(e){return e.type===`VariableDeclarator`&&e.init?.type===`ArrowFunctionExpression`}function BE(e){let t;switch(e.type){case`GenericTypeAnnotation`:t=e.typeParameters;break;case`TSTypeReference`:t=e.typeArguments}return t?.params}function VE(e,t,n,r=!1){let{node:i}=e,a=()=>VE(e,t,n,!0);if(i.type===`ChainExpression`||i.type===`TSNonNullExpression`)return e.call(a,`expression`);if(tb(i)){if(CE(e,t,n).label?.memberChain)return!1;let r=kb(i);return!(r.length===0||r.length===1&&ob(r[0],t))||UE(i,n)?!1:e.call(a,`callee`)}return nb(i)?e.call(a,`object`):r&&(i.type===`Identifier`||i.type===`ThisExpression`)}function HE(e,t,n){return Rb(e)?(t=YS(t),typeof t==`string`&&Cv(t)<n.tabWidth+3):!1}function UE(e,t){let n=WE(e);if(Bv(n)){if(n.length>1)return!0;if(n.length===1){let e=n[0];if(Bb(e)||Vb(e)||e.type===`TSTypeLiteral`||e.type===`ObjectTypeAnnotation`)return!0}if(US(t(e.typeParameters?`typeParameters`:`typeArguments`)))return!0}return!1}function WE(e){return(e.typeParameters??e.typeArguments)?.params}function GE(e){switch(e.type){case`FunctionTypeAnnotation`:case`GenericTypeAnnotation`:case`TSFunctionType`:return!!e.typeParameters;case`TSTypeReference`:return!!e.typeArguments;default:return!1}}function KE(e){return GE(e.checkType)||GE(e.extendsType)}var qE=new WeakMap;function JE(e){return/^(?:\d+|\d+\.\d+)$/u.test(e)}function YE(e,t){return t.parser===`json`||t.parser===`jsonc`||!Py(e.key)||Qv(fy(e.key),t).slice(1,-1)!==e.key.value?!1:!!(PT(e.key.value)&&!(t.parser===`babel-ts`&&e.type===`ClassProperty`||(t.parser===`typescript`||t.parser===`oxc-ts`)&&e.type===`PropertyDefinition`)||JE(e.key.value)&&String(Number(e.key.value))===e.key.value&&e.type!==`ImportAttribute`&&(t.parser===`babel`||t.parser===`acorn`||t.parser===`oxc`||t.parser===`espree`||t.parser===`meriyah`||t.parser===`__babel_estree`))}function XE(e,t){let{key:n}=e.node;return(n.type===`Identifier`||jy(n)&&JE(IT(fy(n)))&&String(n.value)===IT(fy(n))&&t.parser!==`typescript`&&t.parser!==`babel-ts`&&t.parser!==`oxc-ts`)&&(t.parser===`json`||t.parser===`jsonc`||t.quoteProps===`consistent`&&qE.get(e.parent))}function ZE(e,t,n){let{node:r}=e;if(r.computed)return[`[`,n(`key`),`]`];let{parent:i}=e,{key:a}=r;if(t.quoteProps===`consistent`&&!qE.has(i)){let n=e.siblings.some(e=>!e.computed&&Py(e.key)&&!YE(e,t));qE.set(i,n)}if(XE(e,t)){let n=Qv(JSON.stringify(a.type===`Identifier`?a.name:a.value.toString()),t);return e.call(()=>gT(e,n,t),`key`)}return YE(r,t)&&(t.quoteProps===`as-needed`||t.quoteProps===`consistent`&&!qE.get(i))?e.call(()=>gT(e,/^\d/u.test(a.value)?IT(a.value):a.value,t),`key`):n(`key`)}function QE(e,t,n){let{node:r}=e;return r.shorthand?n(`value`):OE(e,t,n,ZE(e,t,n),`:`,`value`)}var $E=({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`&&Uy(n));function eD(e,t,n,r){if($E(e))return nD(e,t,n);let{node:i}=e,a=!1;if((i.type===`FunctionDeclaration`||i.type===`FunctionExpression`)&&r?.expandLastArg){let{parent:t}=e;tb(t)&&(kb(t).length>1||Eb(i).every(e=>e.type===`Identifier`&&!e.typeAnnotation))&&(a=!0)}let o=[OT(e),i.async?`async `:``,`function${i.generator?`*`:``} `,i.id?n(`id`):``],s=vT(e,t,n,a),c=aD(e,n),l=xT(i,c);return o.push(n(`typeParameters`),J([l?J(s):s,c]),i.body?` `:``,n(`body`)),t.semi&&(i.declare||!i.body)&&o.push(`;`),o}function tD(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(ZE(e,t,n),r.optional?`?`:``,r===a?nD(e,t,n):n(`value`)),o}function nD(e,t,n){let{node:r}=e,i=vT(e,t,n),a=aD(e,n),o=CT(r),s=xT(r,a),c=[n(`typeParameters`),J([o?J(i,{shouldBreak:!0}):s?J(i):i,a])];return r.body?c.push(` `,n(`body`)):c.push(t.semi?`;`:``),c}function rD(e){let t=Eb(e);return t.length===1&&!e.typeParameters&&!K(e,G.Dangling)&&t[0].type===`Identifier`&&!t[0].typeAnnotation&&!K(t[0])&&!t[0].optional&&!e.predicate&&!e.returnType}function iD(e,t){if(t.arrowParens===`always`)return!1;if(t.arrowParens===`avoid`){let{node:t}=e;return rD(t)}return!1}function aD(e,t){let{node:n}=e,r=[XT(e,t,`returnType`)];return n.predicate&&r.push(t(`predicate`)),r}function oD(e,t,n){let{node:r}=e,i=[];if(r.argument){let e=n(`argument`);lD(t,r.argument)?e=[`(`,q([$,e]),$,`)`]:(Ky(r.argument)||t.experimentalTernaries&&r.argument.type===`ConditionalExpression`&&(r.argument.consequent.type===`ConditionalExpression`||r.argument.alternate.type===`ConditionalExpression`))&&(e=J([Y(`(`),q([Q,e]),Q,Y(`)`)])),i.push(` `,e)}let a=K(r,G.Dangling),o=t.semi&&a&&K(r,G.Last|G.Line);return o&&i.push(`;`),a&&i.push(` `,mT(e,t)),!o&&t.semi&&i.push(`;`),i}function sD(e,t,n){return[`return`,oD(e,t,n)]}function cD(e,t,n){return[`throw`,oD(e,t,n)]}function lD(e,t){if(sb(e.originalText,t)||K(t,G.Leading,t=>px(e.originalText,V(t),H(t)))&&!Hy(t))return!0;if(wy(t)){let n=t,r;for(;r=Ty(n);)if(n=r,sb(e.originalText,n))return!0}return!1}function uD(e,t){if(t.semi||pD(e,t)||hD(e,t)||mD(e,t))return!1;let{node:n,key:r,parent:i}=e;return!!(n.type===`ExpressionStatement`&&(r===`body`&&(i.type===`Program`||i.type===`BlockStatement`||i.type===`StaticBlock`||i.type===`TSModuleBlock`)||r===`consequent`&&i.type===`SwitchCase`)&&e.call(()=>dD(e,t),`expression`))}function dD(e,t){let{node:n}=e;switch(n.type){case`ParenthesizedExpression`:case`TypeCastExpression`:case`ArrayExpression`:case`ArrayPattern`:case`TemplateLiteral`:case`TemplateElement`:case`RegExpLiteral`:return!0;case`ArrowFunctionExpression`:if(!iD(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(Hy(n))return!0}return sT(e,t)?!0:wy(n)?e.call(()=>dD(e,t),...Ey(n)):!1}var fD=({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 pD(e,t){return(t.parentParser===`markdown`||t.parentParser===`mdx`)&&fD(e)&&Hy(e.node.expression)}function mD(e,t){return t.__isHtmlInlineEventHandler&&fD(e)}function hD(e,t){return(t.parser===`__vue_event_binding`||t.parser===`__vue_ts_event_binding`)&&fD(e)}var gD=class extends Error{name=`UnexpectedNodeError`;constructor(e,t,n=`type`){super(`Unexpected ${t} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}};function _D(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var vD=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(uv(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=`[${_D([...this.#e].join(``))}]+`,r=new RegExp(t?`(${n})`:n,`u`);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(`
337
+ `)+a}function Ww(e){if(!fy(e))return!1;let t=`*${e.value}*`.split(`
338
+ `);return t.length>1&&t.every(e=>e.trimStart()[0]===`*`)}var Gw=new WeakMap;function Kw(e){return Gw.has(e)||Gw.set(e,Ww(e)),Gw.get(e)}var qw=Kw;function Jw(e,t){let n=e.node;if(my(n))return t.originalText.slice(V(n),H(n)).trimEnd();if(qw(n))return Yw(n);if(fy(n))return[`/*`,YS(n.value),`*/`];throw Error(`Not a comment: `+JSON.stringify(n))}function Yw(e){let t=e.value.split(`
339
+ `);return[`/*`,X($,t.map((e,n)=>n===0?e.trimEnd():` `+(n<t.length-1?e.trim():e.trimStart()))),`*/`]}function Xw(e,t){if(e.isRoot)return!1;let{node:n,key:r,parent:i}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&eT(n)&&tT(e))return!0;if(Zw(n))return!1;if(n.type===`Identifier`){if(n.extra?.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(n.name)||r===`left`&&(n.name===`async`&&!i.await||n.name===`let`)&&i.type===`ForOfStatement`)return!0;if(n.name===`let`){let t=e.findAncestor(e=>e.type===`ForOfStatement`)?.left;if(t&&hb(t,e=>e===n))return!0}if(r===`object`&&n.name===`let`&&i.type===`MemberExpression`&&i.computed&&!i.optional){let t=e.findAncestor(e=>e.type===`ExpressionStatement`||e.type===`ForStatement`||e.type===`ForInStatement`),r=t?t.type===`ExpressionStatement`?t.expression:t.type===`ForStatement`?t.init:t.left:void 0;if(r&&hb(r,e=>e===n))return!0}if(r===`expression`)switch(n.name){case`await`:case`interface`:case`module`:case`using`:case`yield`:case`let`:case`component`:case`hook`:case`type`:{let t=e.findAncestor(e=>!Rb(e));if(t!==i&&t.type===`ExpressionStatement`)return!0}}return!1}if(n.type===`ObjectExpression`||n.type===`FunctionExpression`||n.type===`ClassExpression`||n.type===`DoExpression`){let t=e.findAncestor(e=>e.type===`ExpressionStatement`)?.expression;if(t&&hb(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`&&hb(t,e=>e===n))return!0}switch(i.type){case`ParenthesizedExpression`:return!1;case`ClassDeclaration`:case`ClassExpression`:if(r===`superClass`&&(n.type===`ArrowFunctionExpression`||n.type===`AssignmentExpression`||n.type===`AwaitExpression`||n.type===`BinaryExpression`||n.type===`ConditionalExpression`||n.type===`LogicalExpression`||n.type===`NewExpression`||n.type===`ObjectExpression`||n.type===`SequenceExpression`||n.type===`TaggedTemplateExpression`||n.type===`UnaryExpression`||n.type===`UpdateExpression`||n.type===`YieldExpression`||n.type===`TSNonNullExpression`||n.type===`ClassExpression`&&zv(n.decorators)))return!0;break;case`ExportDefaultDeclaration`:return nT(e,t)||n.type===`SequenceExpression`;case`Decorator`:if(r===`expression`&&!aT(n))return!0;break;case`TypeAnnotation`:if(e.match(void 0,void 0,(e,t)=>t===`returnType`&&e.type===`ArrowFunctionExpression`)&&$w(n))return!0;break;case`BinaryExpression`:if(r===`left`&&(i.operator===`in`||i.operator===`instanceof`)&&n.type===`UnaryExpression`)return!0;break;case`VariableDeclarator`:if(r===`init`&&e.match(void 0,void 0,(e,t)=>t===`declarations`&&e.type===`VariableDeclaration`,(e,t)=>t===`left`&&e.type===`ForInStatement`))return!0}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`&&i.operator===`**`;case`TSNonNullExpression`:return!0;default:return!1}case`BinaryExpression`:if(i.type===`UpdateExpression`||n.operator===`in`&&Qw(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!Rb(n);case`ConditionalExpression`:return Rb(n)||ky(n);case`CallExpression`:case`NewExpression`:case`OptionalCallExpression`:return r===`callee`;case`ClassExpression`:case`ClassDeclaration`:return r===`superClass`;case`TSTypeAssertion`:case`TaggedTemplateExpression`:case`UnaryExpression`:case`JSXSpreadAttribute`:case`SpreadElement`:case`BindExpression`:case`AwaitExpression`:case`TSNonNullExpression`:case`UpdateExpression`:return!0;case`MemberExpression`:case`OptionalMemberExpression`:return r===`object`;case`AssignmentExpression`:case`AssignmentPattern`:return r===`left`&&(n.type===`TSTypeAssertion`||Rb(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=xb(e),o=i.operator,s=xb(o);return!!(s>a||r===`right`&&s===a||s===a&&!yb(o,e)||s<a&&e===`%`&&(o===`+`||o===`-`)||Sb(o))}default:return!1}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`&&Vb(n)&&i.type===n.type||r===`checkType`&&Vb(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(zb(i)||Bb(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`: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`:return i.type===`ArrayTypeAnnotation`||r===`objectType`&&(i.type===`IndexedAccessType`||i.type===`OptionalIndexedAccessType`);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===`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&&Tb(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`&&tb(i)&&Ay(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`ExportDefaultDeclaration`: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;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`;default:return!1}case`OptionalMemberExpression`:case`OptionalCallExpression`:case`CallExpression`:case`MemberExpression`:if(rT(e))return!0;case`TaggedTemplateExpression`:case`TSNonNullExpression`:if(r===`callee`&&(i.type===`BindExpression`||i.type===`NewExpression`)){let e=n;for(;e;)switch(e.type){case`CallExpression`:case`OptionalCallExpression`: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`&&tb(i);case`NGPipeExpression`:return!(i.type===`NGRoot`||i.type===`NGMicrosyntaxExpression`||i.type===`ObjectProperty`&&!n.extra?.parenthesized||Dy(i)||r===`arguments`&&eb(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===`<`||!Dy(i)&&i.type!==`ArrowFunctionExpression`&&i.type!==`AssignmentExpression`&&i.type!==`AssignmentPattern`&&i.type!==`BinaryExpression`&&i.type!==`NewExpression`&&i.type!==`ConditionalExpression`&&i.type!==`ExpressionStatement`&&i.type!==`JsExpressionRoot`&&i.type!==`JSXAttribute`&&i.type!==`JSXElement`&&i.type!==`JSXExpressionContainer`&&i.type!==`JSXFragment`&&i.type!==`LogicalExpression`&&!eb(i)&&!Lb(i)&&i.type!==`ReturnStatement`&&i.type!==`ThrowStatement`&&i.type!==`TypeCastExpression`&&i.type!==`VariableDeclarator`&&i.type!==`YieldExpression`&&i.type!==`MatchExpressionCase`;case`TSInstantiationExpression`:return r===`object`&&tb(i);case`MatchOrPattern`:return i.type===`MatchAsPattern`}return!1}var Zw=W(`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 Qw(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 $w(e){return Sy(e,e=>e.type===`ObjectTypeAnnotation`&&Sy(e,e=>e.type===`FunctionTypeAnnotation`))}function eT(e){return Oy(e)}function tT(e){let{parent:t,key:n}=e;switch(t.type){case`NGPipeExpression`:if(n===`arguments`&&e.isLast)return e.callParent(tT);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(tT);break;case`ConditionalExpression`:if(n===`alternate`)return e.callParent(tT);break;case`UnaryExpression`:if(t.prefix)return e.callParent(tT)}return!1}function nT(e,t){let{node:n,parent:r}=e;return n.type===`FunctionExpression`||n.type===`ClassExpression`?r.type===`ExportDefaultDeclaration`||!Xw(e,t):!Cy(n)||r.type!==`ExportDefaultDeclaration`&&Xw(e,t)?!1:e.call(()=>nT(e,t),...Ty(n))}function rT(e){return!!(e.match(void 0,(e,t)=>t===`expression`&&e.type===`ChainExpression`,(e,t)=>t===`tag`&&e.type===`TaggedTemplateExpression`)||e.match(e=>e.type===`OptionalCallExpression`||e.type===`OptionalMemberExpression`,(e,t)=>t===`tag`&&e.type===`TaggedTemplateExpression`)||e.match(e=>e.type===`OptionalCallExpression`||e.type===`OptionalMemberExpression`,(e,t)=>t===`expression`&&e.type===`TSNonNullExpression`,(e,t)=>t===`tag`&&e.type===`TaggedTemplateExpression`)||e.match(void 0,(e,t)=>t===`expression`&&e.type===`ChainExpression`,(e,t)=>t===`expression`&&e.type===`TSNonNullExpression`,(e,t)=>t===`tag`&&e.type===`TaggedTemplateExpression`)||e.match(void 0,(e,t)=>t===`expression`&&e.type===`TSNonNullExpression`,(e,t)=>t===`expression`&&e.type===`ChainExpression`,(e,t)=>t===`tag`&&e.type===`TaggedTemplateExpression`)||e.match(e=>e.type===`OptionalMemberExpression`||e.type===`OptionalCallExpression`,(e,t)=>t===`object`&&e.type===`MemberExpression`||t===`callee`&&(e.type===`CallExpression`||e.type===`NewExpression`))||e.match(e=>e.type===`OptionalMemberExpression`||e.type===`OptionalCallExpression`,(e,t)=>t===`expression`&&e.type===`TSNonNullExpression`,(e,t)=>t===`object`&&e.type===`MemberExpression`||t===`callee`&&e.type===`CallExpression`)||e.match(e=>e.type===`CallExpression`||e.type===`MemberExpression`,(e,t)=>t===`expression`&&e.type===`ChainExpression`)&&(e.match(void 0,void 0,(e,t)=>t===`callee`&&(e.type===`CallExpression`&&!e.optional||e.type===`NewExpression`)||t===`object`&&e.type===`MemberExpression`&&!e.optional)||e.match(void 0,void 0,(e,t)=>t===`expression`&&e.type===`TSNonNullExpression`,(e,t)=>t===`object`&&e.type===`MemberExpression`||t===`callee`&&e.type===`CallExpression`))||e.match(e=>e.type===`CallExpression`||e.type===`MemberExpression`,(e,t)=>t===`expression`&&e.type===`TSNonNullExpression`,(e,t)=>t===`expression`&&e.type===`ChainExpression`,(e,t)=>t===`object`&&e.type===`MemberExpression`||t===`callee`&&e.type===`CallExpression`))}function iT(e){return e.type===`Identifier`?!0:tb(e)?!e.computed&&!e.optional&&e.property.type===`Identifier`&&iT(e.object):!1}function aT(e){return e.type===`ChainExpression`&&(e=e.expression),iT(e)||eb(e)&&!e.optional&&iT(e.callee)}var oT=Xw;function sT(e,t){let n=t-1;n=wv(e,n,{backwards:!0}),n=kv(e,n,{backwards:!0}),n=wv(e,n,{backwards:!0});let r=kv(e,n,{backwards:!0});return n!==r}var cT=sT,lT=()=>!0;function uT(e,t){let n=e.node;return n.printed=!0,t.printer.printComment(e,t)}function dT(e,t){let n=e.node,r=[uT(e,t)],{printer:i,originalText:a,locStart:o,locEnd:s}=t;if(i.isBlockComment?.(n)){let e=jv(a,s(n))?jv(a,o(n),{backwards:!0})?$:Z:` `;r.push(e)}else r.push($);let c=kv(a,wv(a,s(n)));return c!==!1&&jv(a,c)&&r.push($),r}function fT(e,t,n){let r=e.node,i=uT(e,t),{printer:a,originalText:o,locStart:s}=t,c=a.isBlockComment?.(r);return n?.hasLineSuffix&&!n?.isBlock||jv(o,s(r),{backwards:!0})?{doc:gC([$,cT(o,s(r))?$:``,i]),isBlock:c,hasLineSuffix:!0}:!c||n?.hasLineSuffix?{doc:[gC([` `,i]),cC],isBlock:c,hasLineSuffix:!0}:{doc:[` `,i],isBlock:c,hasLineSuffix:!1}}function pT(e,t,n={}){let{node:r}=e;if(!zv(r?.comments))return``;let{indent:i=!1,marker:a,filter:o=lT}=n,s=[];if(e.each(({node:n})=>{n.leading||n.trailing||n.marker!==a||!o(n)||s.push(uT(e,t))},`comments`),s.length===0)return``;let c=X($,s);return i?q([$,c]):c}function mT(e,t){let n=e.node;if(!n)return{};let r=t[Symbol.for(`printedComments`)];if((n.comments||[]).filter(e=>!r.has(e)).length===0)return{leading:``,trailing:``};let i=[],a=[],o;return e.each(()=>{let n=e.node;if(r?.has(n))return;let{leading:s,trailing:c}=n;s?i.push(dT(e,t)):c&&(o=fT(e,t,o),a.push(o.doc))},`comments`),{leading:i,trailing:a}}function hT(e,t,n){let{leading:r,trailing:i}=mT(e,n);return!r&&!i?t:QS(t,e=>[r,e,i])}var gT=class extends Error{name=`ArgExpansionBailout`};function _T(e,t,n,r,i){let a=e.node,o=Tb(a),s=i&&a.typeParameters?n(`typeParameters`):``;if(o.length===0)return[s,`(`,pT(e,t,{filter:e=>ux(t.originalText,H(e))===`)`}),`)`];let{parent:c}=e,l=Qy(c),u=vT(a),d=[];if(Eb(e,(e,r)=>{let i=r===o.length-1;i&&a.rest&&d.push(`...`),d.push(n()),!i&&(d.push(`,`),l||u?d.push(` `):Fb(o[r],t)?d.push($,$):d.push(Z))}),r&&!xT(e)){if(HS(s)||HS(d))throw new gT;return J([KS(s),`(`,KS(d),`)`])}let f=o.every(e=>!zv(e.decorators));return u&&f||l?[s,`(`,...d,`)`]:(Uy(c)||Wy(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&&Jy(o[0].typeAnnotation)&&!a.rest?t.arrowParens===`always`||a.type===`HookTypeAnnotation`?[`(`,...d,`)`]:d:[s,`(`,q([Q,...d]),Y(!Cb(a)&&mb(t,`all`)&&e.root.type!==`NGRoot`?`,`:``),Q,`)`]}function vT(e){if(!e)return!1;let t=Tb(e);if(t.length!==1)return!1;let[n]=t;return!K(n)&&(n.type===`ObjectPattern`||n.type===`ArrayPattern`||n.type===`Identifier`&&n.typeAnnotation&&(n.typeAnnotation.type===`TypeAnnotation`||n.typeAnnotation.type===`TSTypeAnnotation`)&&Ly(n.typeAnnotation.typeAnnotation)||n.type===`FunctionTypeParam`&&Ly(n.typeAnnotation)&&n!==e.rest||n.type===`AssignmentPattern`&&(n.left.type===`ObjectPattern`||n.left.type===`ArrayPattern`)&&(n.right.type===`Identifier`||Oy(n.right)&&n.right.properties.length===0||Dy(n.right)&&n.right.elements.length===0))}function yT(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}function bT(e,t){let n=yT(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 Tb(e).length===1&&(Ly(n)||HS(t))}function xT(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 ST(e){let t=Tb(e);return t.length>1&&t.some(e=>e.type===`TSParameterProperty`)}function CT(e,t){return(t===`params`||t===`this`||t===`rest`)&&vT(e)}function wT(e){let{node:t}=e;return!t.optional||t.type===`Identifier`&&t===e.parent.key?``:eb(t)||tb(t)&&t.computed||t.type===`OptionalIndexedAccessType`?`?.`:`?`}function TT(e){return e.node.definite||e.match(void 0,(e,t)=>t===`id`&&e.type===`VariableDeclarator`&&e.definite)?`!`:``}var ET=W([`DeclareClass`,`DeclareComponent`,`DeclareFunction`,`DeclareHook`,`DeclareVariable`,`DeclareExportDeclaration`,`DeclareExportAllDeclaration`,`DeclareOpaqueType`,`DeclareTypeAlias`,`DeclareEnum`,`DeclareInterface`]);function DT(e){let{node:t}=e;return t.declare||ET(t)&&e.parent.type!==`DeclareExportDeclaration`?`declare `:``}var OT=W([`TSAbstractMethodDefinition`,`TSAbstractPropertyDefinition`,`TSAbstractAccessorProperty`]);function kT({node:e}){return e.abstract||OT(e)?`abstract `:``}function AT(e,t,n){return e.type===`EmptyStatement`?K(e,G.Leading)?[` `,t]:t:e.type===`BlockStatement`||n?[` `,t]:q([Z,t])}function jT(e){return e.accessibility?e.accessibility+` `:``}var MT=/^[\$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]*$/,NT=e=>MT.test(e);function PT(e){return e.length===1?e:e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/u,`$1$2`).replace(/^([+-]?[\d.]+)e[+-]?0+$/u,`$1`).replace(/^([+-])?\./u,`$10.`).replace(/(\.\d+?)0+(?=e|$)/u,`$1`).replace(/\.(?=e|$)/u,``)}var FT=PT,IT=0;function LT(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=RT(e,t,n,!1,s);if(s)return l;if(c)return J(l);if(o===`callee`&&(eb(i)||i.type===`NewExpression`)||i.type===`UnaryExpression`||tb(i)&&!i.computed)return J([q([Q,...l]),Q]);let u=i.type===`ReturnStatement`||i.type===`ThrowStatement`||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`&&a.type!==`ReturnStatement`&&a.type!==`ThrowStatement`&&!eb(a)&&a.type!==`NewExpression`||i.type===`TemplateLiteral`||HT(e),d=i.type===`AssignmentExpression`||i.type===`VariableDeclarator`||i.type===`ClassProperty`||i.type===`PropertyDefinition`||i.type===`TSAbstractPropertyDefinition`||i.type===`ClassPrivateProperty`||Lb(i),f=Gy(r.left)&&yb(r.operator,r.left.operator);if(u||zT(r)&&!f||!zT(r)&&d)return J(l);if(l.length===0)return``;let p=Vy(r.right),m=l.findIndex(e=>typeof e!=`string`&&!Array.isArray(e)&&e.type===xS),h=l.slice(0,m===-1?1:m+1),g=l.slice(h.length,p?-1:void 0),_=Symbol(`logicalChain-`+ ++IT),v=J([...h,q(g)],{id:_});return p?J([v,fC(lv(0,l,-1),{groupId:_})]):v}function RT(e,t,n,r,i){let{node:a}=e;if(!Gy(a))return[J(n())];let o=[];yb(a.operator,a.left.operator)?o=e.call(()=>RT(e,t,n,!0,i),`left`):o.push(J(n(`left`)));let s=zT(a),c=a.right.type===`ChainExpression`?a.right.expression:a.right,l=(a.operator===`|>`||a.type===`NGPipeExpression`||VT(e,t))&&!ob(t.originalText,c),u=!K(c,G.Leading,hx)&&ob(t.originalText,c),d=a.type===`NGPipeExpression`?`|`:a.operator,f=a.type===`NGPipeExpression`&&a.arguments.length>0?J(q([Q,`: `,X([Z,`: `],e.map(()=>iC(2,J(n())),`arguments`))])):``,p;if(s)p=[d,ob(t.originalText,c)?q([Z,n(`right`),f]):[` `,n(`right`),f]];else{let r=d===`|>`&&e.root.extra?.__isUsingHackPipeline?e.call(()=>RT(e,t,n,!0,i),`right`):n(`right`);if(t.experimentalOperatorPosition===`start`){let e=``;if(u)switch(MS(r)){case gS:e=r.splice(0,1)[0];break;case OS:e=r.contents.splice(0,1)[0];break}p=[Z,e,d,` `,r,f]}else p=[l?Z:``,d,l?` `:Z,r,f]}let{parent:m}=e,h=K(a.left,G.Trailing|G.Line);if((h||!(i&&a.type===`LogicalExpression`)&&m.type!==a.type&&a.left.type!==a.type&&a.right.type!==a.type)&&(p=J(p,{shouldBreak:h})),t.experimentalOperatorPosition===`start`?o.push(s||u?` `:``,p):o.push(l?``:` `,p),r&&K(a)){let n=JS(hT(e,o,t));return n.type===SS?n.parts:Array.isArray(n)?n:[n]}return o}function zT(e){return e.type===`LogicalExpression`&&!!(Oy(e.right)&&e.right.properties.length>0||Dy(e.right)&&e.right.elements.length>0||Vy(e.right))}var BT=e=>e.type===`BinaryExpression`&&e.operator===`|`;function VT(e,t){return(t.parser===`__vue_expression`||t.parser===`__vue_ts_expression`)&&BT(e.node)&&!e.hasAncestor(e=>!BT(e)&&e.type!==`JsExpressionRoot`)}function HT(e){if(e.key!==`arguments`)return!1;let{parent:t}=e;if(!(eb(t)&&!t.optional&&t.arguments.length===1))return!1;let{callee:n}=t;return n.type===`Identifier`&&n.name===`Boolean`}function UT(e,t,n){let{node:r}=e,{parent:i}=e,a=i.type!==`TypeParameterInstantiation`&&(!Vb(i)||!t.experimentalTernaries)&&i.type!==`TSTypeParameterInstantiation`&&i.type!==`GenericTypeAnnotation`&&i.type!==`TSTypeReference`&&i.type!==`TSTypeAssertion`&&i.type!==`TupleTypeAnnotation`&&i.type!==`TSTupleType`&&!(i.type===`FunctionTypeParam`&&!i.name&&e.grandparent.this!==i)&&!((Ub(i)||i.type===`VariableDeclarator`)&&ob(t.originalText,r))&&!(Ub(i)&&K(i.id,G.Trailing|G.Line)),o=KT(r),s=e.map(()=>{let r=n();return o||(r=iC(2,r)),hT(e,r,t)},`types`),c=``,l=``;if(Wb(e)&&({leading:c,trailing:l}=mT(e,t)),o)return[c,X(` | `,s),l];let u=[Y([a&&!ob(t.originalText,r)?Z:``,`| `]),X([Z,`| `],s)];if(oT(e,t))return[c,J([q(u),Q]),l];let d=[c,J(u)];return(i.type===`TupleTypeAnnotation`||i.type===`TSTupleType`)&&i[i.type===`TupleTypeAnnotation`&&i.types?`types`:`elementTypes`].length>1?[J([q([Y([`(`,Q]),d]),Q,Y(`)`)]),l]:[J(a?q(d):d),l]}var WT=W([`VoidTypeAnnotation`,`TSVoidKeyword`,`NullLiteralTypeAnnotation`,`TSNullKeyword`]),GT=W([`ObjectTypeAnnotation`,`TSTypeLiteral`,`GenericTypeAnnotation`,`TSTypeReference`]);function KT(e){let{types:t}=e;if(t.some(e=>K(e)))return!1;let n=t.find(e=>GT(e));return n?t.every(e=>e===n||WT(e)):!1}function qT(e){return Jy(e)||Ly(e)?!0:zb(e)?KT(e):!1}var JT=new WeakSet;function YT(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(XT,n);(t===`=>`||t===`:`&&K(r,G.Leading))&&(i=!0),JT.add(r)}return i?[` `,t(n)]:t(n)}var XT=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 ZT(e,t,n){let r=XT(e);return r?[r,` `,n(`typeAnnotation`)]:n(`typeAnnotation`)}function QT(e,t,n,r){let{node:i}=e,a=i.inexact?`...`:``;return K(i,G.Dangling)?J([n,a,pT(e,t,{indent:!0}),Q,r]):[n,a,r]}function $T(e,t,n){let{node:r}=e,i=[],a=r.type===`TupleTypeAnnotation`&&r.types?`types`:r.type===`TSTupleType`||r.type===`TupleTypeAnnotation`?`elementTypes`:`elements`,o=r[a];if(o.length===0)i.push(QT(e,t,`[`,`]`));else{let s=lv(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)=>{let r=e?.type;if(!Dy(e)&&!Oy(e))return!1;let i=n[t+1];if(i&&r!==i.type)return!1;let a=Dy(e)?`elements`:`properties`;return e[a]&&e[a].length>1}),f=eE(r,t),p=c?l?`,`:mb(t)?f?Y(`,`,``,{groupId:u}):Y(`,`):``:``;i.push(J([`[`,q([Q,f?rE(e,t,n,p):[nE(e,t,n,a,r.inexact),p],pT(e,t)]),Q,`]`],{shouldBreak:d,id:u}))}return i.push(wT(e),YT(e,n)),i}function eE(e,t){return Dy(e)&&e.elements.length>0&&e.elements.every(e=>e&&(Ay(e)||My(e)&&!K(e.argument))&&!K(e,G.Trailing|G.Line,e=>!jv(t.originalText,V(e),{backwards:!0})))}function tE({node:e},{originalText:t}){let n=H(e);if(n===V(e))return!1;let{length:r}=t;for(;n<r&&t[n]!==`,`;)n=Nv(t,Fv(t,n+1));return Lv(t,n)}function nE(e,t,n,r,i){let a=[];return e.each(({node:r,isLast:o})=>{a.push(r?J(n()):``),(!o||i)&&a.push([`,`,Z,r&&tE(e,t)?Q:``])},r),i&&a.push(`...`),a}function rE(e,t,n,r){let i=[];return e.each(({isLast:a,next:o})=>{i.push([n(),a?r:`,`]),a||i.push(tE(e,t)?[$,$]:K(o,G.Leading|G.Line)?$:Z)},`elements`),uC(i)}function iE(e,t,n){let{node:r}=e,i=Ob(r);if(i.length===0)return[`(`,pT(e,t),`)`];let a=i.length-1;if(lE(i)){let t=[`(`];return kb(e,(e,r)=>{t.push(n()),r!==a&&t.push(`, `)}),t.push(`)`),t}let o=!1,s=[];kb(e,({node:e},r)=>{let i=n();r===a||(Fb(e,t)?(o=!0,i=[i,`,`,$,$]):i=[i,`,`,Z]),s.push(i)});let c=!t.parser.startsWith(`__ng_`)&&r.type!==`ImportExpression`&&r.type!==`TSImportType`&&r.type!==`TSExternalModuleReference`&&mb(t,`all`)?`,`:``;function l(){return J([`(`,q([Z,...s]),c,Z,`)`],{shouldBreak:!0})}if(o||e.parent.type!==`Decorator`&&ub(i))return l();if(sE(i)){let e=s.slice(1);if(e.some(HS))return l();let t;try{t=n(Ab(r,0),{expandFirstArg:!0})}catch(e){if(e instanceof gT)return l();throw e}return HS(t)?[cC,dC([[`(`,J(t,{shouldBreak:!0}),`, `,...e,`)`],l()])]:dC([[`(`,t,`, `,...e,`)`],[`(`,J(t,{shouldBreak:!0}),`, `,...e,`)`],l()])}if(oE(i,s,t)){let e=s.slice(0,-1);if(e.some(HS))return l();let t;try{t=n(Ab(r,-1),{expandLastArg:!0})}catch(e){if(e instanceof gT)return l();throw e}return HS(t)?[cC,dC([[`(`,...e,J(t,{shouldBreak:!0}),`)`],l()])]:dC([[`(`,...e,t,`)`],[`(`,...e,J(t,{shouldBreak:!0}),`)`],l()])}let u=[`(`,q([Q,...s]),Y(c),Q,`)`];return db(e)?u:J(u,{shouldBreak:s.some(HS)||o})}function aE(e,t=!1){return Oy(e)&&(e.properties.length>0||K(e))||Dy(e)&&(e.elements.length>0||K(e))||e.type===`TSTypeAssertion`&&aE(e.expression)||Rb(e)&&aE(e.expression)||e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`&&(!e.returnType||!e.returnType.typeAnnotation||e.returnType.typeAnnotation.type!==`TSTypeReference`||dE(e.body))&&(e.body.type===`BlockStatement`||e.body.type===`ArrowFunctionExpression`&&aE(e.body,!0)||Oy(e.body)||Dy(e.body)||!t&&(eb(e.body)||e.body.type===`ConditionalExpression`)||Vy(e.body))||e.type===`DoExpression`||e.type===`ModuleExpression`}function oE(e,t,n){let r=lv(0,e,-1);if(e.length===1){let e=lv(0,t,-1);if(e.label?.embed&&e.label?.hug!==!1)return!0}let i=lv(0,e,-2);return!K(r,G.Leading)&&!K(r,G.Trailing)&&aE(r)&&(!i||i.type!==r.type)&&(e.length!==2||i.type!==`ArrowFunctionExpression`||!Dy(r))&&!(e.length>1&&eE(r,n))}function sE(e){if(e.length!==2)return!1;let[t,n]=e;return t.type===`ModuleExpression`&&fE(n)?!0:!K(t)&&(t.type===`FunctionExpression`||t.type===`ArrowFunctionExpression`&&t.body.type===`BlockStatement`)&&n.type!==`FunctionExpression`&&n.type!==`ArrowFunctionExpression`&&n.type!==`ConditionalExpression`&&cE(n)&&!aE(n)}function cE(e){if(e.type===`ParenthesizedExpression`)return cE(e.expression);if(Rb(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 Jy(t)&&pb(e.expression,1)}return Ib(e)&&Ob(e).length>1?!1:Gy(e)?pb(e.left,1)&&pb(e.right,1):Py(e)||pb(e)}function lE(e){return e.length===2?uE(e,0):e.length===3&&e[0].type===`Identifier`&&uE(e,1)}function uE(e,t){let n=e[t],r=e[t+1];return n.type===`ArrowFunctionExpression`&&Tb(n).length===0&&n.body.type===`BlockStatement`&&r.type===`ArrayExpression`&&!e.some(e=>K(e))}function dE(e){return e.type===`BlockStatement`&&(e.body.some(e=>e.type!==`EmptyStatement`)||K(e,G.Dangling))}function fE(e){if(e.type!==`ObjectExpression`||e.properties.length!==1)return!1;let[t]=e.properties;return Lb(t)?!t.computed&&(t.key.type===`Identifier`&&t.key.name===`type`||Ny(t.key)&&t.key.value===`type`)&&Ny(t.value)&&t.value.value===`module`:!1}var pE=iE;function mE(e,t,n){return[n(`object`),J(q([Q,hE(e,t,n)]))]}function hE(e,t,n){return[`::`,n(`callee`)]}var gE=e=>((e.type===`ChainExpression`||e.type===`TSNonNullExpression`)&&(e=e.expression),eb(e)&&Ob(e).length>0);function _E(e){let{node:t,ancestors:n}=e;for(let e of n){if(!(tb(e)&&e.object===t||e.type===`TSNonNullExpression`&&e.expression===t))return e.type===`NewExpression`&&e.callee===t;t=e}return!1}function vE(e,t,n){let r=n(`object`),i=yE(e,t,n),{node:a}=e,o=e.findAncestor(e=>!(tb(e)||e.type===`TSNonNullExpression`)),s=e.findAncestor(e=>e.type!==`ChainExpression`&&e.type!==`TSNonNullExpression`),c=o.type===`BindExpression`||o.type===`AssignmentExpression`&&o.left.type!==`Identifier`||_E(e)||a.computed||a.object.type===`Identifier`&&a.property.type===`Identifier`&&!tb(s)||(s.type===`AssignmentExpression`||s.type===`VariableDeclarator`)&&(gE(a.object)||r.label?.memberChain);return pC(r.label,[r,c?i:J(q([Q,i]))])}function yE(e,t,n){let r=n(`property`),{node:i}=e,a=wT(e);return i.computed?!i.property||Ay(i.property)?[a,`[`,r,`]`]:J([a,`[`,q([Q,r]),Q,`]`]):[a,`.`,r]}function bE(e,t,n){if(e.node.type===`ChainExpression`)return e.call(()=>bE(e,t,n),`expression`);let r=(e.parent.type===`ChainExpression`?e.grandparent:e.parent).type===`ExpressionStatement`,i=[];function a(e){let{originalText:n}=t,r=cx(n,H(e));return n.charAt(r)===`)`?r!==!1&&Lv(n,r+1):Fb(e,t)}function o(){let{node:r}=e;if(r.type===`ChainExpression`)return e.call(o,`expression`);if(eb(r)&&(Ky(r.callee)||eb(r.callee))){let s=a(r);i.unshift({node:r,hasTrailingEmptyLine:s,printed:[hT(e,[wT(e),n(`typeArguments`),pE(e,t,n)],t),s?$:``]}),e.call(o,`callee`)}else Ky(r)?(i.unshift({node:r,needsParens:oT(e,t),printed:hT(e,tb(r)?yE(e,t,n):hE(e,t,n),t)}),e.call(o,`object`)):r.type===`TSNonNullExpression`?(i.unshift({node:r,printed:hT(e,`!`,t)}),e.call(o,`expression`)):i.unshift({node:r,printed:n()})}let{node:s}=e;i.unshift({node:s,printed:[wT(e),n(`typeArguments`),pE(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`||eb(i[u].node)||tb(i[u].node)&&i[u].node.computed&&Ay(i[u].node.property));++u)l.push(i[u]);if(!eb(i[0].node))for(;u+1<i.length&&Ky(i[u].node)&&Ky(i[u+1].node);++u)l.push(i[u]);c.push(l),l=[];let d=!1;for(;u<i.length;++u){if(d&&Ky(i[u].node)){if(i[u].node.computed&&Ay(i[u].node.property)){l.push(i[u]);continue}c.push(l),l=[],d=!1}(eb(i[u].node)||i[u].node.type===`ImportExpression`)&&(d=!0),l.push(i[u]),K(i[u].node,G.Trailing)&&(c.push(l),l=[],d=!1)}l.length>0&&c.push(l);function f(e){return/^[A-Z]|^[$_]+$/u.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=lv(0,e[0],-1).node;return tb(n)&&n.property.type===`Identifier`&&(f(n.property.name)||t)}let h=c.length>=2&&!K(c[1][0].node)&&m(c);function g(e){let t=e.map(e=>e.printed);return e.length>0&&lv(0,e,-1).needsParens?[`(`,...t,`)`]:t}function _(e){return e.length===0?``:q([$,X($,e.map(g))])}let v=c.map(g),y=v,b=h?3:2,x=c.flat(),S=x.slice(1,-1).some(e=>K(e.node,G.Leading))||x.slice(0,-1).some(e=>K(e.node,G.Trailing))||c[b]&&K(c[b][0].node,G.Leading);if(c.length<=b&&!S&&!c.some(e=>lv(0,e,-1).hasTrailingEmptyLine))return db(e)?y:J(y);let C=lv(0,c[+!!h],-1).node,w=!eb(C)&&a(C),T=[g(c[0]),h?c.slice(1,2).map(g):``,w?$:``,_(c.slice(h?2:1))],ee=i.map(({node:e})=>e).filter(eb);function E(){let e=lv(0,lv(0,c,-1),-1).node,t=lv(0,v,-1);return eb(e)&&HS(t)&&ee.slice(0,-1).some(e=>e.arguments.some(Ry))}let te;return te=S||ee.length>2&&ee.some(e=>!e.arguments.every(e=>pb(e)))||v.slice(0,-1).some(HS)||E()?J(T):[HS(y)||w?cC:``,dC([y,T])],pC({memberChain:!0},te)}var xE=bE;function SE(e,t,n){let{node:r}=e,i=r.type===`NewExpression`,a=wT(e),o=Ob(r),s=r.type!==`TSImportType`&&r.typeArguments?n(`typeArguments`):``,c=o.length===1&&cb(o[0],t.originalText);if(c||TE(e)||EE(e)||Qy(r,e.parent)){let t=[];if(kb(e,()=>{t.push(n())}),!(c&&t[0].label?.embed))return[i?`new `:``,CE(e,n),a,s,`(`,X(`, `,t),`)`]}let l=r.type===`ImportExpression`||r.type===`TSImportType`||r.type===`TSExternalModuleReference`;if(!l&&!i&&Ky(r.callee)&&!e.call(()=>oT(e,t),`callee`,...r.callee.type===`ChainExpression`?[`expression`]:[]))return xE(e,t,n);let u=[i?`new `:``,CE(e,n),a,s,pE(e,t,n)];return l||eb(r.callee)?J(u):u}function CE(e,t){let{node:n}=e;return n.type===`ImportExpression`?`import${n.phase?`.${n.phase}`:``}`:n.type===`TSImportType`?`import`:n.type===`TSExternalModuleReference`?`require`:t(`callee`)}var wE=[`require`,`require.resolve`,`require.resolve.paths`,`import.meta.resolve`];function TE(e){let{node:t}=e;if(!(t.type===`ImportExpression`||t.type===`TSImportType`||t.type===`TSExternalModuleReference`||t.type===`CallExpression`&&!t.optional&&_y(t.callee,wE)))return!1;let n=Ob(t);return n.length===1&&Ny(n[0])&&!K(n[0])}function EE(e){let{node:t}=e;if(t.type!==`CallExpression`||t.optional||t.callee.type!==`Identifier`)return!1;let n=Ob(t);return t.callee.name===`require`?(n.length===1&&Ny(n[0])||n.length>1)&&!K(n[0]):t.callee.name===`define`&&e.parent.type===`ExpressionStatement`?n.length===1||n.length===2&&n[0].type===`ArrayExpression`||n.length===3&&Ny(n[0])&&n[1].type===`ArrayExpression`:!1}function DE(e,t,n,r,i,a){let o=AE(e,t,n,r,a),s=a?n(a,{assignmentLayout:o}):``;switch(o){case`break-after-operator`:return J([J(r),i,J(q([Z,s]))]);case`never-break-after-operator`:return J([J(r),i,` `,s]);case`fluid`:{let e=Symbol(`assignment`);return J([J(r),i,J(q(Z),{id:e}),_C,fC(s,{groupId:e})])}case`break-lhs`:return J([r,i,` `,J(s)]);case`chain`:return[J(r),i,Z,s];case`chain-tail`:return[J(r),i,q([Z,s])];case`chain-tail-arrow-chain`:return[J(r),i,s];case`only-left`:return r}}function OE(e,t,n){let{node:r}=e;return DE(e,t,n,n(`left`),[` `,r.operator],`right`)}function kE(e,t,n){return DE(e,t,n,n(`id`),` =`,`init`)}function AE(e,t,n,r,i){let{node:a}=e,o=a[i];if(!o)return`only-left`;let s=!NE(o);if(e.match(NE,PE,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&&NE(o.right)||ob(t.originalText,o))return`break-after-operator`;if(a.type===`ImportAttribute`||o.type===`CallExpression`&&o.callee.name===`require`||t.parser===`json5`||t.parser===`jsonc`||t.parser===`json`)return`never-break-after-operator`;let c=ZS(r);if(ME(a)||LE(a)||RE(a)&&c)return`break-lhs`;let l=VE(a,r,t);return e.call(()=>jE(e,t,n,l),i)?`break-after-operator`:FE(a)?`break-lhs`:!c&&(l||o.type===`TemplateLiteral`||o.type===`TaggedTemplateExpression`||jy(o)||Ay(o)||o.type===`ClassExpression`)?`never-break-after-operator`:`fluid`}function jE(e,t,n,r){let i=e.node;if(Gy(i)&&!zT(i))return!0;switch(i.type){case`StringLiteralTypeAnnotation`:case`SequenceExpression`:return!0;case`TSConditionalType`:case`ConditionalTypeAnnotation`:if(!t.experimentalTernaries&&!GE(i))break;return!0;case`ConditionalExpression`:{if(!t.experimentalTernaries){let{test:e}=i;return Gy(e)&&!zT(e)}let{consequent:e,alternate:n}=i;return e.type===`ConditionalExpression`||n.type===`ConditionalExpression`}case`ClassExpression`:return zv(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!!(Ny(a)||e.call(()=>BE(e,t,n),...o))}function ME(e){if(PE(e)){let t=e.left||e.id;return t.type===`ObjectPattern`&&t.properties.length>2&&t.properties.some(e=>Lb(e)&&(!e.shorthand||e.value?.type===`AssignmentPattern`))}return!1}function NE(e){return e.type===`AssignmentExpression`}function PE(e){return NE(e)||e.type===`VariableDeclarator`}function FE(e){let t=IE(e);if(zv(t)){let n=e.type===`TSTypeAliasDeclaration`?`constraint`:`bound`;if(t.length>1&&t.some(e=>e[n]||e.default))return!0}return!1}function IE(e){if(Ub(e))return e.typeParameters?.params}function LE(e){if(e.type!==`VariableDeclarator`)return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let n=zE(t.typeAnnotation);return zv(n)&&n.length>1&&n.some(e=>zv(zE(e))||e.type===`TSConditionalType`)}function RE(e){return e.type===`VariableDeclarator`&&e.init?.type===`ArrowFunctionExpression`}function zE(e){let t;switch(e.type){case`GenericTypeAnnotation`:t=e.typeParameters;break;case`TSTypeReference`:t=e.typeArguments}return t?.params}function BE(e,t,n,r=!1){let{node:i}=e,a=()=>BE(e,t,n,!0);if(i.type===`ChainExpression`||i.type===`TSNonNullExpression`)return e.call(a,`expression`);if(eb(i)){if(SE(e,t,n).label?.memberChain)return!1;let r=Ob(i);return!(r.length===0||r.length===1&&ab(r[0],t))||HE(i,n)?!1:e.call(a,`callee`)}return tb(i)?e.call(a,`object`):r&&(i.type===`Identifier`||i.type===`ThisExpression`)}function VE(e,t,n){return Lb(e)?(t=JS(t),typeof t==`string`&&Sv(t)<n.tabWidth+3):!1}function HE(e,t){let n=UE(e);if(zv(n)){if(n.length>1)return!0;if(n.length===1){let e=n[0];if(zb(e)||Bb(e)||e.type===`TSTypeLiteral`||e.type===`ObjectTypeAnnotation`)return!0}if(HS(t(e.typeParameters?`typeParameters`:`typeArguments`)))return!0}return!1}function UE(e){return(e.typeParameters??e.typeArguments)?.params}function WE(e){switch(e.type){case`FunctionTypeAnnotation`:case`GenericTypeAnnotation`:case`TSFunctionType`:return!!e.typeParameters;case`TSTypeReference`:return!!e.typeArguments;default:return!1}}function GE(e){return WE(e.checkType)||WE(e.extendsType)}var KE=new WeakMap;function qE(e){return/^(?:\d+|\d+\.\d+)$/u.test(e)}function JE(e,t){return t.parser===`json`||t.parser===`jsonc`||!Ny(e.key)||Zv(dy(e.key),t).slice(1,-1)!==e.key.value?!1:!!(NT(e.key.value)&&!(t.parser===`babel-ts`&&e.type===`ClassProperty`||(t.parser===`typescript`||t.parser===`oxc-ts`)&&e.type===`PropertyDefinition`)||qE(e.key.value)&&String(Number(e.key.value))===e.key.value&&e.type!==`ImportAttribute`&&(t.parser===`babel`||t.parser===`acorn`||t.parser===`oxc`||t.parser===`espree`||t.parser===`meriyah`||t.parser===`__babel_estree`))}function YE(e,t){let{key:n}=e.node;return(n.type===`Identifier`||Ay(n)&&qE(FT(dy(n)))&&String(n.value)===FT(dy(n))&&t.parser!==`typescript`&&t.parser!==`babel-ts`&&t.parser!==`oxc-ts`)&&(t.parser===`json`||t.parser===`jsonc`||t.quoteProps===`consistent`&&KE.get(e.parent))}function XE(e,t,n){let{node:r}=e;if(r.computed)return[`[`,n(`key`),`]`];let{parent:i}=e,{key:a}=r;if(t.quoteProps===`consistent`&&!KE.has(i)){let n=e.siblings.some(e=>!e.computed&&Ny(e.key)&&!JE(e,t));KE.set(i,n)}if(YE(e,t)){let n=Zv(JSON.stringify(a.type===`Identifier`?a.name:a.value.toString()),t);return e.call(()=>hT(e,n,t),`key`)}return JE(r,t)&&(t.quoteProps===`as-needed`||t.quoteProps===`consistent`&&!KE.get(i))?e.call(()=>hT(e,/^\d/u.test(a.value)?FT(a.value):a.value,t),`key`):n(`key`)}function ZE(e,t,n){let{node:r}=e;return r.shorthand?n(`value`):DE(e,t,n,XE(e,t,n),`:`,`value`)}var QE=({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`&&Hy(n));function $E(e,t,n,r){if(QE(e))return tD(e,t,n);let{node:i}=e,a=!1;if((i.type===`FunctionDeclaration`||i.type===`FunctionExpression`)&&r?.expandLastArg){let{parent:t}=e;eb(t)&&(Ob(t).length>1||Tb(i).every(e=>e.type===`Identifier`&&!e.typeAnnotation))&&(a=!0)}let o=[DT(e),i.async?`async `:``,`function${i.generator?`*`:``} `,i.id?n(`id`):``],s=_T(e,t,n,a),c=iD(e,n),l=bT(i,c);return o.push(n(`typeParameters`),J([l?J(s):s,c]),i.body?` `:``,n(`body`)),t.semi&&(i.declare||!i.body)&&o.push(`;`),o}function eD(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(XE(e,t,n),r.optional?`?`:``,r===a?tD(e,t,n):n(`value`)),o}function tD(e,t,n){let{node:r}=e,i=_T(e,t,n),a=iD(e,n),o=ST(r),s=bT(r,a),c=[n(`typeParameters`),J([o?J(i,{shouldBreak:!0}):s?J(i):i,a])];return r.body?c.push(` `,n(`body`)):c.push(t.semi?`;`:``),c}function nD(e){let t=Tb(e);return t.length===1&&!e.typeParameters&&!K(e,G.Dangling)&&t[0].type===`Identifier`&&!t[0].typeAnnotation&&!K(t[0])&&!t[0].optional&&!e.predicate&&!e.returnType}function rD(e,t){if(t.arrowParens===`always`)return!1;if(t.arrowParens===`avoid`){let{node:t}=e;return nD(t)}return!1}function iD(e,t){let{node:n}=e,r=[YT(e,t,`returnType`)];return n.predicate&&r.push(t(`predicate`)),r}function aD(e,t,n){let{node:r}=e,i=[];if(r.argument){let e=n(`argument`);cD(t,r.argument)?e=[`(`,q([$,e]),$,`)`]:(Gy(r.argument)||t.experimentalTernaries&&r.argument.type===`ConditionalExpression`&&(r.argument.consequent.type===`ConditionalExpression`||r.argument.alternate.type===`ConditionalExpression`))&&(e=J([Y(`(`),q([Q,e]),Q,Y(`)`)])),i.push(` `,e)}let a=K(r,G.Dangling),o=t.semi&&a&&K(r,G.Last|G.Line);return o&&i.push(`;`),a&&i.push(` `,pT(e,t)),!o&&t.semi&&i.push(`;`),i}function oD(e,t,n){return[`return`,aD(e,t,n)]}function sD(e,t,n){return[`throw`,aD(e,t,n)]}function cD(e,t){if(ob(e.originalText,t)||K(t,G.Leading,t=>fx(e.originalText,V(t),H(t)))&&!Vy(t))return!0;if(Cy(t)){let n=t,r;for(;r=wy(n);)if(n=r,ob(e.originalText,n))return!0}return!1}function lD(e,t){if(t.semi||fD(e,t)||mD(e,t)||pD(e,t))return!1;let{node:n,key:r,parent:i}=e;return!!(n.type===`ExpressionStatement`&&(r===`body`&&(i.type===`Program`||i.type===`BlockStatement`||i.type===`StaticBlock`||i.type===`TSModuleBlock`)||r===`consequent`&&i.type===`SwitchCase`)&&e.call(()=>uD(e,t),`expression`))}function uD(e,t){let{node:n}=e;switch(n.type){case`ParenthesizedExpression`:case`TypeCastExpression`:case`ArrayExpression`:case`ArrayPattern`:case`TemplateLiteral`:case`TemplateElement`:case`RegExpLiteral`:return!0;case`ArrowFunctionExpression`:if(!rD(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(Vy(n))return!0}return oT(e,t)?!0:Cy(n)?e.call(()=>uD(e,t),...Ty(n)):!1}var dD=({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 fD(e,t){return(t.parentParser===`markdown`||t.parentParser===`mdx`)&&dD(e)&&Vy(e.node.expression)}function pD(e,t){return t.__isHtmlInlineEventHandler&&dD(e)}function mD(e,t){return(t.parser===`__vue_event_binding`||t.parser===`__vue_ts_event_binding`)&&dD(e)}var hD=class extends Error{name=`UnexpectedNodeError`;constructor(e,t,n=`type`){super(`Unexpected ${t} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}};function gD(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var _D=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(lv(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=`[${gD([...this.#e].join(``))}]+`,r=new RegExp(t?`(${n})`:n,`u`);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(`
340
340
  `)){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(`
341
341
  `).map(e=>e.slice(t)).join(`
342
342
  `)}}(`
343
- \r `),yD=e=>e===``||e===Z||e===$||e===Q;function bD(e,t,n){let{node:r}=e;if(r.type===`JSXElement`&&RD(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=>BD(e)?{type:`JSXText`,value:` `,raw:` `}:e);let o=r.children.some(Hy),s=r.children.filter(e=>e.type===`JSXExpressionContainer`).length>1,c=r.type===`JSXElement`&&r.openingElement.attributes.length>1,l=US(i)||o||c||s,u=e.parent.rootMarker===`mdx`,d=t.singleQuote?`{' '}`:`{" "}`,f=u?Z:Y([d,Q],` `),p=xD(e,t,n,f,r.openingElement?.name?.name===`fbt`),m=r.children.some(e=>zD(e));for(let e=p.length-2;e>=0;e--){let t=p[e]===``&&p[e+1]===``,n=p[e]===$&&p[e+1]===``&&p[e+2]===$,r=(p[e]===Q||p[e]===$)&&p[e+1]===``&&p[e+2]===f,i=p[e]===f&&p[e+1]===``&&(p[e+2]===Q||p[e+2]===$),a=p[e]===f&&p[e+1]===``&&p[e+2]===f,o=p[e]===Q&&p[e+1]===``&&p[e+2]===$||p[e]===$&&p[e+1]===``&&p[e+2]===Q;n&&m||t||r||a||o?p.splice(e,2):i&&p.splice(e+1,2)}for(;p.length>0&&yD(uv(0,p,-1));)p.pop();for(;p.length>1&&yD(p[0])&&yD(p[1]);)p.shift(),p.shift();let h=[``];for(let[e,t]of p.entries()){if(t===f){if(e===1&&eC(p[e-1])){if(p.length===2){h.push([h.pop(),d]);continue}h.push([d,$],``);continue}if(e===p.length-1){h.push([h.pop(),d]);continue}if(p[e-1]===``&&p[e-2]===$){h.push([h.pop(),d]);continue}}e%2==0?h.push([h.pop(),t]):h.push(t,``),US(t)&&(l=!0)}let g=m?dC(h):J(h,{shouldBreak:!0});if(t.cursorNode?.type===`JSXText`&&r.children.includes(t.cursorNode)?g=[uC,g,uC]:t.nodeBeforeCursor?.type===`JSXText`&&r.children.includes(t.nodeBeforeCursor)?g=[uC,g]:t.nodeAfterCursor?.type===`JSXText`&&r.children.includes(t.nodeAfterCursor)&&(g=[g,uC]),u)return g;let _=J([i,q([$,g]),$,a]);return l?_:fC([J([i,...p,a]),_])}function xD(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=fy(e);if(zD(e)){let o=vD.split(n,!0);o[0]===``&&(o.shift(),/\n/u.test(o[0])?c(CD(i,o[1],e,t)):c(r),o.shift());let l;if(uv(0,o,-1)===``&&(o.pop(),l=o.pop()),o.length===0)return;for(let[e,t]of o.entries())e%2==1?c(Z):s(t);l===void 0?c(SD(i,a,e,t)):/\n/u.test(l)?c(CD(i,a,e,t)):c(r)}else/\n/u.test(n)?n.match(/\n/gu).length>1&&c($):c(r)}else if(s(n()),t&&zD(t)){let n=vD.trim(fy(t)),[r]=vD.split(n);c(SD(i,r,e,t))}else c($)},`children`),o}function SD(e,t,n,r){return e?``:n.type===`JSXElement`&&!n.closingElement||r?.type===`JSXElement`&&!r.closingElement?t.length===1?Q:$:Q}function CD(e,t,n,r){return e?$:t.length===1?n.type===`JSXElement`&&!n.closingElement||r?.type===`JSXElement`&&!r.closingElement?$:Q:$}var wD=W([`ArrayExpression`,`JSXAttribute`,`JSXElement`,`JSXExpressionContainer`,`JSXFragment`,`ExpressionStatement`,`NewExpression`,`CallExpression`,`OptionalCallExpression`,`ConditionalExpression`,`JsExpressionRoot`,`MatchExpressionCase`]);function TD(e,t,n){let{parent:r}=e;if(wD(r))return t;let i=ED(e),a=sT(e,n);return J([a?``:Y(`(`),q([Q,t]),Q,a?``:Y(`)`)],{shouldBreak:i})}function ED(e){return e.match(void 0,(e,t)=>t===`body`&&e.type===`ArrowFunctionExpression`,(e,t)=>t===`arguments`&&tb(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 DD(e,t,n){let{node:r}=e,i=[n(`name`)];if(r.value){let a;if(Py(r.value)){let n=cv(0,cv(0,fy(r.value).slice(1,-1),`&apos;`,`'`),`&quot;`,`"`),i=qv(n,t.jsxSingleQuote);n=i===`"`?cv(0,n,`"`,`&quot;`):cv(0,n,`'`,`&apos;`),a=e.call(()=>gT(e,XS(i+n+i),t),`value`)}else a=n(`value`);i.push(`=`,a)}return i}function OD(e,t,n){let{node:r}=e,i=(e,t)=>e.type===`JSXEmptyExpression`||!K(e)&&(Oy(e)||ky(e)||e.type===`ArrowFunctionExpression`||e.type===`AwaitExpression`&&(i(e.argument,e)||e.argument.type===`JSXElement`)||tb(e)||e.type===`ChainExpression`&&tb(e.expression)||e.type===`FunctionExpression`||e.type===`TemplateLiteral`||e.type===`TaggedTemplateExpression`||e.type===`DoExpression`||Hy(t)&&(e.type===`ConditionalExpression`||Ky(e)));return i(r.expression,e.parent)?J([`{`,n(`expression`),vC,`}`]):J([`{`,q([Q,n(`expression`)]),Q,vC,`}`])}function kD(e,t,n){let{node:r}=e,i=K(r.name)||K(r.typeArguments);if(r.selfClosing&&r.attributes.length===0&&!i)return[`<`,n(`name`),n(`typeArguments`),` />`];if(r.attributes?.length===1&&Py(r.attributes[0].value)&&!r.attributes[0].value.value.includes(`
344
- `)&&!i&&!K(r.attributes[0]))return J([`<`,n(`name`),n(`typeArguments`),` `,...e.map(n,`attributes`),r.selfClosing?` />`:`>`]);let a=r.attributes?.some(e=>Py(e.value)&&e.value.value.includes(`
345
- `)),o=t.singleAttributePerLine&&r.attributes.length>1?$:Z;return J([`<`,n(`name`),n(`typeArguments`),q(e.map(()=>[o,n()],`attributes`)),...AD(r,t,i)],{shouldBreak:a})}function AD(e,t,n){return e.selfClosing?[Z,`/>`]:jD(e,t,n)?[`>`]:[Q,`>`]}function jD(e,t,n){let r=e.attributes.length>0&&K(uv(0,e.attributes,-1),G.Trailing);return e.attributes.length===0&&!n||(t.bracketSameLine||t.jsxBracketSameLine)&&(!n||e.attributes.length>0)&&!r}function MD(e,t,n){let{node:r}=e,i=[`</`],a=n(`name`);return K(r.name,G.Leading|G.Line)?i.push(q([$,a]),$):K(r.name,G.Leading|G.Block)?i.push(` `,a):i.push(a),i.push(`>`),i}function ND(e,t){let{node:n}=e,r=K(n),i=K(n,G.Line),a=n.type===`JSXOpeningFragment`;return[a?`<`:`</`,q([i?$:r&&!a?` `:``,mT(e,t)]),i?$:``,`>`]}function PD(e,t,n){return TD(e,gT(e,bD(e,t,n),t),t)}function FD(e,t){let{node:n}=e,r=K(n,G.Line);return[mT(e,t,{indent:r}),r?$:``]}function ID(e,t,n){let{node:r}=e;return[`{`,e.call(({node:r})=>{let i=[`...`,n()];return K(r)?[q([Q,gT(e,i,t)]),Q]:i},r.type===`JSXSpreadAttribute`?`argument`:`expression`),`}`]}function LD(e,t,n){let{node:r}=e;if(r.type.startsWith(`JSX`))switch(r.type){case`JSXAttribute`:return DD(e,t,n);case`JSXIdentifier`:return r.name;case`JSXNamespacedName`:return X(`:`,[n(`namespace`),n(`name`)]);case`JSXMemberExpression`:return X(`.`,[n(`object`),n(`property`)]);case`JSXSpreadAttribute`:case`JSXSpreadChild`:return ID(e,t,n);case`JSXExpressionContainer`:return OD(e,t,n);case`JSXFragment`:case`JSXElement`:return PD(e,t,n);case`JSXOpeningElement`:return kD(e,t,n);case`JSXClosingElement`:return MD(e,t,n);case`JSXOpeningFragment`:case`JSXClosingFragment`:return ND(e,t);case`JSXEmptyExpression`:return FD(e,t);case`JSXText`:throw Error(`JSXText should be handled by JSXElement`);default:throw new gD(r,`JSX`)}}function RD(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type===`JSXText`&&!zD(t)}function zD(e){return e.type===`JSXText`&&(vD.hasNonWhitespaceCharacter(fy(e))||!/\n/u.test(fy(e)))}function BD(e){return e.type===`JSXExpressionContainer`&&Py(e.expression)&&e.expression.value===` `&&!K(e.expression)}function VD(e){let{node:t,parent:n}=e;if(!Hy(t)||!Hy(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`&&!zD(t))){a=t;break}}return a?.type===`JSXExpressionContainer`&&a.expression.type===`JSXEmptyExpression`&&Nb(a.expression)}function HD(e){return Nb(e.node)||VD(e)}var UD=HD;function WD(e,t,n){let{node:r}=e;if(r.type.startsWith(`NG`))switch(r.type){case`NGRoot`:return n(`node`);case`NGPipeExpression`:return RT(e,t,n);case`NGChainedExpression`:return J(X([`;`,Z],e.map(()=>JD(e)?n():[`(`,n(),`)`],`expressions`)));case`NGEmptyExpression`:return``;case`NGMicrosyntax`:return e.map(()=>[e.isFirst?``:GD(e)?` `:[`;`,Z],n()],`body`);case`NGMicrosyntaxKey`:return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/iu.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=GD(e)||KD(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 gD(r,`Angular`)}}function GD({node:e,index:t}){return e.type===`NGMicrosyntaxKeyedExpression`&&e.key.name===`of`&&t===1}function KD(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 qD=W([`CallExpression`,`OptionalCallExpression`,`AssignmentExpression`]);function JD({node:e}){return Cy(e,qD)}function YD(e,t,n){let{node:r}=e;return J([X(Z,e.map(n,`decorators`)),QD(r,t)?$:Z])}function XD(e,t,n){return $D(e.node)?[X($,e.map(n,`declaration`,`decorators`)),$]:``}function ZD(e,t,n){let{node:r,parent:i}=e,{decorators:a}=r;if(!Bv(a)||$D(i)||UD(e))return``;let o=r.type===`ClassExpression`||r.type===`ClassDeclaration`||QD(r,t);return[e.key===`declaration`&&Dy(i)?$:o?lC:``,X(Z,e.map(n,`decorators`)),Z]}function QD(e,t){return e.decorators.some(e=>Mv(t.originalText,H(e)))}function $D(e){if(e.type!==`ExportDefaultDeclaration`&&e.type!==`ExportNamedDeclaration`&&e.type!==`DeclareExportDeclaration`)return!1;let t=e.declaration?.decorators;return Bv(t)&&ey(e,t[0])}var eO=new WeakMap;function tO(e){return eO.has(e)||eO.set(e,e.type===`ConditionalExpression`&&!gb(e,e=>e.type===`ObjectExpression`)),eO.get(e)}var nO=e=>e.type===`SequenceExpression`;function rO(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=iO(e,t,n,r);if(i.length===0)i.push(f);else{let{leading:n,trailing:r}=hT(e,t);i.push([n,f]),o.unshift(r)}c&&(s||=d.returnType&&Eb(d).length>0||d.typeParameters||Eb(d).some(e=>e.type!==`Identifier`)),!c||d.body.type!==`ArrowFunctionExpression`?(a=n(`body`,r),l=d.body):e.call(u,`body`)})();let u=!sb(t.originalText,l)&&(nO(l)||aO(l,a,t)||!s&&tO(l)),d=e.key===`callee`&&Lb(e.parent),f=Symbol(`arrow-chain`),p=oO(e,r,{signatureDocs:i,shouldBreak:s}),m=!1,h=!1,g=!1;return c&&(d||r.assignmentLayout)&&(h=!0,g=!K(e.node,G.Leading&G.Line),m=r.assignmentLayout===`chain-tail-arrow-chain`||d&&!u),a=sO(e,t,r,{bodyDoc:a,bodyComments:o,functionBody:l,shouldPutBodyOnSameLine:u}),J([J(h?q([g?Q:``,p]):p,{shouldBreak:m,id:f}),` =>`,c?pC(a,{groupId:f}):J(a),c&&d?Y(Q,``,{groupId:f}):``])}function iO(e,t,n,r){let{node:i}=e,a=[];if(i.async&&a.push(`async `),iD(e,t))a.push(n([`params`,0]));else{let i=r.expandLastArg||r.expandFirstArg,o=aD(e,n);if(i){if(US(o))throw new _T;o=J(qS(o))}a.push(J([vT(e,t,n,i,!0),o]))}let o=mT(e,t,{filter(e){let n=lx(t.originalText,H(e));return n!==!1&&t.originalText.slice(n,n+2)===`=>`}});return o&&a.push(` `,o),a}function aO(e,t,n){return Oy(e)||ky(e)||e.type===`ArrowFunctionExpression`||e.type===`DoExpression`||e.type===`BlockStatement`||Hy(e)||t.label?.hug!==!1&&(t.label?.embed||lb(e,n.originalText))}function oO(e,t,{signatureDocs:n,shouldBreak:r}){if(n.length===1)return n[0];let{parent:i,key:a}=e;return a!==`callee`&&Lb(i)||Ky(i)?J([n[0],` =>`,q([Z,X([` =>`,Z],n.slice(1))])],{shouldBreak:r}):a===`callee`&&Lb(i)||t.assignmentLayout?J(X([` =>`,Z],n),{shouldBreak:r}):J(q(X([` =>`,Z],n)),{shouldBreak:r})}function sO(e,t,n,{bodyDoc:r,bodyComments:i,functionBody:a,shouldPutBodyOnSameLine:o}){let{node:s,parent:c}=e,l=n.expandLastArg&&hb(t,`all`)?Y(`,`):``,u=(n.expandLastArg||c.type===`JSXExpressionContainer`)&&!K(s)?Q:``;return o&&tO(a)?[` `,J([Y(``,`(`),q([Q,r]),Y(``,`)`),l,u]),i]:o?[` `,r,i]:[q([Z,r,i]),l,u]}var cO=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}},lO=ov(`findLast`,function(){if(Array.isArray(this))return cO});function uO(e,t,n,r){let{node:i}=e,a=[],o=lO(0,i[r],e=>e.type!==`EmptyStatement`);return e.each(({node:e})=>{e.type!==`EmptyStatement`&&(a.push(n()),e!==o&&(a.push($),Ib(e,t)&&a.push($)))},r),a}function dO(e,t,n){let r=fO(e,t,n),{node:i,parent:a}=e;if(i.type===`Program`&&a?.type!==`ModuleExpression`)return r?[r,$]:``;let o=[];if(i.type===`StaticBlock`&&o.push(`static `),o.push(`{`),r)o.push(q([$,r]),$);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===`MatchStatementCase`||i.type===`StaticBlock`||o.push($)}return o.push(`}`),o}function fO(e,t,n){let{node:r}=e,i=Bv(r.directives),a=r.body.some(e=>e.type!==`EmptyStatement`),o=K(r,G.Dangling);if(!i&&!a&&!o)return``;let s=[];return i&&(s.push(uO(e,t,n,`directives`)),(a||o)&&(s.push($),Ib(uv(0,r.directives,-1),t)&&s.push($))),a&&s.push(uO(e,t,n,`body`)),o&&s.push(mT(e,t)),s}function pO(e){let t=new WeakMap;return function(n){return t.has(n)||t.set(n,Symbol(e)),t.get(n)}}var mO=pO;function hO(e,t,n){let{node:r}=e,i=[],a=r.type===`ObjectTypeAnnotation`,o=!gO(e),s=o?Z:$,c=K(r,G.Dangling),[l,u]=a&&r.exact?[`{|`,`|}`]:`{}`,d;if(_O(e,({node:r,next:c,isLast:l})=>{if(d??=r,i.push(n()),o&&a){let{parent:n}=e;n.inexact||!l?i.push(`,`):hb(t)&&i.push(Y(`,`))}!o&&(xO({node:r,next:c},t)||CO({node:r,next:c},t))&&i.push(`;`),l||(i.push(s),Ib(r,t)&&i.push($))}),c&&i.push(mT(e,t)),r.type===`ObjectTypeAnnotation`&&r.inexact){let e;e=K(r,G.Dangling)?[K(r,G.Line)||Mv(t.originalText,H(uv(0,Fb(r),-1)))?$:Z,`...`]:[d?Z:``,`...`],i.push(e)}if(o){let n=c||t.objectWrap===`preserve`&&d&&px(t.originalText,V(r),V(d)),a;if(i.length===0)a=l+u;else{let e=t.bracketSpacing?Z:Q;a=[l,q([e,...i]),e,u]}return e.match(void 0,(e,t)=>t===`typeAnnotation`,(e,t)=>t===`typeAnnotation`,wT)||e.match(void 0,(e,t)=>e.type===`FunctionTypeParam`&&t===`typeAnnotation`,wT)?a:J(a,{shouldBreak:n})}return[l,i.length>0?[q([$,i]),$]:``,u]}function gO(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`}function _O(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===`ObjectTypeAnnotation`){let n=[`properties`,`indexers`,`callProperties`,`internalSlots`].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 vO(e,t){let{parent:n}=e;return e.callParent(gO)?t.semi||n.type===`ObjectTypeAnnotation`?`;`:``:n.type===`TSTypeLiteral`?e.isLast?t.semi?Y(`;`):``:t.semi||CO({node:e.node,next:e.next},t)?`;`:Y(``,`;`):``}var yO=W([`ClassProperty`,`PropertyDefinition`,`ClassPrivateProperty`,`ClassAccessorProperty`,`AccessorProperty`,`TSAbstractPropertyDefinition`,`TSAbstractAccessorProperty`]),bO=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 xO({node:e,next:t},n){if(n.semi||!yO(e))return!1;if(!e.value&&bO(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(yO(t)&&t.variance&&!t.static&&!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 SO=W([`TSPropertySignature`]);function CO({node:e,next:t},n){return n.semi||!SO(e)?!1:bO(e)?!0:t?t.type===`TSCallSignatureDeclaration`:!1}var wO=mO(`heritageGroup`),TO=W([`TSInterfaceDeclaration`,`DeclareInterface`,`InterfaceDeclaration`,`InterfaceTypeAnnotation`]);function EO(e,t,n){let{node:r}=e,i=TO(r),a=[OT(e),AT(e),i?`interface`:`class`],o=jO(e),s=[],c=[];if(r.type!==`InterfaceTypeAnnotation`){r.id&&s.push(` `);for(let i of[`id`,`typeParameters`])if(r[i]){let{leading:r,trailing:a}=e.call(()=>hT(e,t),i);s.push(r,n(i),q(a))}}if(r.superClass){let i=[NO(e,t,n),n(r.superTypeArguments?`superTypeArguments`:`superTypeParameters`)],a=e.call(()=>[`extends `,gT(e,i,t)],`superClass`);o?c.push(Z,J(a)):c.push(` `,a)}else c.push(MO(e,t,n,`extends`));c.push(MO(e,t,n,`mixins`),MO(e,t,n,`implements`));let l;return o?(l=wO(r),a.push(J([...s,q(c)],{id:l}))):a.push(...s,...c),!i&&o&&DO(r.body)?a.push(Y($,` `,{groupId:l})):a.push(` `),a.push(n(`body`)),a}function DO(e){return e.type===`ObjectTypeAnnotation`?[`properties`,`indexers`,`callProperties`,`internalSlots`].some(t=>Bv(e[t])):Bv(e.body)}function OO(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 kO(e){let{node:t}=e;if(K(t.id,G.Trailing)||K(t.typeParameters,G.Trailing)||K(t.superClass)||OO(t))return!0;if(t.superClass)return e.parent.type!==`AssignmentExpression`&&!(t.superTypeArguments??t.superTypeParameters)&&nb(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`)&&nb(n.expression)&&!n.typeArguments:!1}var AO=new WeakMap;function jO(e){let{node:t}=e;return AO.has(t)||AO.set(t,kO(e)),AO.get(t)}function MO(e,t,n,r){let{node:i}=e;if(!Bv(i[r]))return``;let a=mT(e,t,{marker:r}),o=X([`,`,Z],e.map(n,r));if(!OO(i)){let t=[`${r} `,a,o];return jO(e)?[Z,J(t)]:[` `,t]}return[Z,a,a&&$,r,J(q([Z,o]))]}function NO(e,t,n){let r=n(`superClass`),{parent:i}=e;return i.type===`AssignmentExpression`?J(Y([`(`,q([Q,r]),Q,`)`],r)):r}function PO(e,t,n){let{node:r}=e,i=[];return Bv(r.decorators)&&i.push(YD(e,t,n)),i.push(MT(r)),r.static&&i.push(`static `),i.push(AT(e)),r.override&&i.push(`override `),i.push(tD(e,t,n)),i}function FO(e,t,n){let{node:r}=e,i=[];return Bv(r.decorators)&&i.push(YD(e,t,n)),i.push(OT(e),MT(r)),r.static&&i.push(`static `),i.push(AT(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(ZE(e,t,n),TT(e),ET(e),XT(e,n)),[OE(e,t,n,i,` =`,r.type===`TSAbstractPropertyDefinition`||r.type===`TSAbstractAccessorProperty`?void 0:`value`),t.semi?`;`:``]}var IO=W([`TSAsExpression`,`TSTypeAssertion`,`TSNonNullExpression`,`TSInstantiationExpression`,`TSSatisfiesExpression`]);function LO(e){return IO(e)?LO(e.expression):e}var RO=W([`FunctionExpression`,`ArrowFunctionExpression`]);function zO(e){return e.type===`MemberExpression`||e.type===`OptionalMemberExpression`||e.type===`Identifier`&&e.name!==`undefined`}function BO(e,t){if(hD(e,t)){let t=LO(e.node.expression);return RO(t)||zO(t)}return!(!t.semi||pD(e,t)||mD(e,t))}function VO(e,t,n){return[n(`expression`),BO(e,t)?`;`:``]}function HO(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=X([`,`,Z],r);return t.__isVueForBindingLeft?[`(`,q([Q,J(i)]),Q,`)`]:i}if(t.__isEmbeddedTypescriptGenericParameters){let t=e.map(n,`program`,`body`,0,`typeParameters`,`params`);return X([`,`,Z],t)}}function UO(e,t){let{node:n}=e;switch(n.type){case`RegExpLiteral`:return KO(n);case`BigIntLiteral`:return GO(n.extra.raw);case`NumericLiteral`:return IT(n.extra.raw);case`StringLiteral`:return XS(Qv(n.extra.raw,t));case`NullLiteral`:return`null`;case`BooleanLiteral`:return String(n.value);case`DirectiveLiteral`:return JO(n.extra.raw,t);case`Literal`:{if(n.regex)return KO(n.regex);if(n.bigint)return GO(n.raw);let{value:r}=n;return typeof r==`number`?IT(n.raw):typeof r==`string`?WO(e)?JO(n.raw,t):XS(Qv(n.raw,t)):String(r)}}}function WO(e){if(e.key!==`expression`)return;let{parent:t}=e;return t.type===`ExpressionStatement`&&typeof t.directive==`string`}function GO(e){return e.toLowerCase()}function KO({pattern:e,flags:t}){return t=[...t].sort().join(``),`/${e}/${t}`}var qO=`use strict`;function JO(e,t){let n=e.slice(1,-1);if(n===qO||!(n.includes(`"`)||n.includes(`'`))){let e=t.singleQuote?`'`:`"`;return e+n+e}return e}function YO(e,t,n){let r=e.originalText.slice(t,n);for(let i of e[Symbol.for(`comments`)]){let e=V(i);if(e>n)break;let a=H(i);if(a<t)continue;let o=e-t,s=a-t;r=r.slice(0,o)+cv(0,r.slice(o,s),/[^\n]/gu,` `)+r.slice(s)}return r}var XO=YO,ZO=W([`ImportDeclaration`,`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`ExportAllDeclaration`,`DeclareExportDeclaration`,`DeclareExportAllDeclaration`]),QO=W([`EnumBooleanBody`,`EnumNumberBody`,`EnumBigIntBody`,`EnumStringBody`,`EnumSymbolBody`]);function $O(e,t,n){let{node:r,parent:i}=e,a=QO(r),o=r.type===`TSEnumBody`||a,s=ZO(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&&ek(r,u[0],t),f=[],p=e.map(({node:e})=>{let r=[...f,J(n())];return f=[`,`,Z],Ib(e,t)&&f.push($),r},l);if(c){let n;if(K(r,G.Dangling)){let i=K(r,G.Line);n=[mT(e,t),i||Mv(t.originalText,H(uv(0,Fb(r),-1)))?$:Z,`...`]}else n=[`...`];p.push([...f,...n])}let m=!(c||uv(0,u,-1)?.type===`RestElement`),h;if(p.length===0){if(!K(r,G.Dangling))return[`{}`,XT(e,n)];h=J([`{`,mT(e,t,{indent:!0}),Q,`}`,TT(e),XT(e,n)])}else{let r=t.bracketSpacing?Z:Q;h=[`{`,q([r,...p]),Y(m&&hb(t)?`,`:``),r,`}`,TT(e),XT(e,n)]}return e.match(e=>e.type===`ObjectPattern`&&!Bv(e.decorators),wT)||Ry(r)&&(e.match(void 0,(e,t)=>t===`typeAnnotation`,(e,t)=>t===`typeAnnotation`,wT)||e.match(void 0,(e,t)=>e.type===`FunctionTypeParam`&&t===`typeAnnotation`,wT))||!d&&e.match(e=>e.type===`ObjectPattern`,e=>e.type===`AssignmentExpression`||e.type===`VariableDeclarator`)?h:J(h,{shouldBreak:d})}function ek(e,t,n){let r=n.originalText,i=V(e),a=V(t);if(ZO(e)){let t=V(e);i=t+XO(n,t,a).lastIndexOf(`{`)}return px(r,i,a)}function tk(e,t,n){let{node:r}=e;return[`import`,r.phase?` ${r.phase}`:``,sk(r),uk(e,t,n),lk(e,t,n),mk(e,t,n),t.semi?`;`:``]}var nk=e=>e.type===`ExportDefaultDeclaration`||e.type===`DeclareExportDeclaration`&&e.default;function rk(e,t,n){let{node:r}=e,i=[XD(e,t,n),OT(e),`export`,nk(r)?` default`:``],{declaration:a,exported:o}=r;return K(r,G.Dangling)&&(i.push(` `,mT(e,t)),ub(r)&&i.push($)),a?i.push(` `,n(`declaration`)):(i.push(ck(r)),r.type===`ExportAllDeclaration`||r.type===`DeclareExportAllDeclaration`?(i.push(` *`),o&&i.push(` as `,n(`exported`))):i.push(uk(e,t,n)),i.push(lk(e,t,n),mk(e,t,n))),i.push(ak(r,t)),i}var ik=W([`ClassDeclaration`,`ComponentDeclaration`,`FunctionDeclaration`,`TSInterfaceDeclaration`,`DeclareClass`,`DeclareComponent`,`DeclareFunction`,`DeclareHook`,`HookDeclaration`,`TSDeclareFunction`,`EnumDeclaration`]);function ak(e,t){return t.semi&&(!e.declaration||nk(e)&&!ik(e.declaration))?`;`:``}function ok(e,t=!0){return e&&e!==`value`?`${t?` `:``}${e}${t?``:` `}`:``}function sk(e,t){return ok(e.importKind,t)}function ck(e){return ok(e.exportKind)}function lk(e,t,n){let{node:r}=e;return r.source?[dk(r,t)?` from`:``,` `,n(`source`)]:``}function uk(e,t,n){let{node:r}=e;if(!dk(r,t))return``;let i=[` `];if(Bv(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 gD(r,`specifier`)},`specifiers`),i.push(X(`, `,a)),o.length>0&&(a.length>0&&i.push(`, `),o.length>1||a.length>0||r.specifiers.some(e=>K(e))?i.push(J([`{`,q([t.bracketSpacing?Z:Q,X([`,`,Z],o)]),Y(hb(t)?`,`:``),t.bracketSpacing?Z:Q,`}`])):i.push([`{`,t.bracketSpacing?` `:``,...o,t.bracketSpacing?` `:``,`}`]))}else i.push(`{}`);return i}function dk(e,t){return e.type!==`ImportDeclaration`||Bv(e.specifiers)||e.importKind===`type`?!0:XO(t,V(e),V(e.source)).trimEnd().endsWith(`from`)}function fk(e,t){if(e.extra?.deprecatedAssertSyntax)return`assert`;let n=XO(t,H(e.source),e.attributes?.[0]?V(e.attributes[0]):H(e)).trimStart();return n.startsWith(`assert`)?`assert`:n.startsWith(`with`)||Bv(e.attributes)?`with`:void 0}var pk=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`||Py(i)&&i.value===`type`)&&Py(a)&&!K(n)&&!K(i)&&!K(a)};function mk(e,t,n){let{node:r}=e;if(!r.source)return``;let i=fk(r,t);if(!i)return``;let a=$O(e,t,n);return pk(r)&&(a=qS(a)),[` ${i} `,a]}function hk(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&&!gk(r)&&(d=n(s)),[ok(i===`ImportSpecifier`?r.importKind:r.exportKind,!1),u,u&&d?` as `:``,d]}function gk(e){if(e.type!==`ImportSpecifier`&&e.type!==`ExportSpecifier`)return!1;let{local:t,[e.type===`ImportSpecifier`?`imported`:`exported`]:n}=e;if(t.type!==n.type||!ny(t,n))return!1;if(Py(t))return t.value===n.value&&fy(t)===fy(n);switch(t.type){case`Identifier`:return t.name===n.name;default:return!1}}function _k(e,t){return[`...`,t(`argument`),XT(e,t)]}function vk(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(Hy(r))return!0;r.type===`ConditionalExpression`&&t.push(r)}}return!1}function yk(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?aC(2,s):s}var bk=new Map([[`AssignmentExpression`,`right`],[`VariableDeclarator`,`init`],[`ReturnStatement`,`argument`],[`ThrowStatement`,`argument`],[`UnaryExpression`,`argument`],[`YieldExpression`,`argument`],[`AwaitExpression`,`argument`]]);function xk(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(i.type===`ChainExpression`&&i.expression===r||tb(i)&&i.callee===r||nb(i)&&i.object===r||i.type===`TSNonNullExpression`&&i.expression===r){r=i;continue}i.type===`NewExpression`&&i.callee===r||zb(i)&&i.expression===r?(n=e.getParentNode(t+1),r=i):n=i}return r!==t&&n[bk.get(n.type)]===r}function Sk(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&&(Hy(r[s[0]])||Hy(c)||Hy(l)||vk(y))){d=!0,m=!0;let e=e=>[Y(`(`),q([Q,e]),Q,Y(`)`)],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?q(n(e)):aC(2,n(e)),i=[Z,`? `,c.type===r.type?Y(``,`(`):``,e(a),c.type===r.type?Y(``,`)`):``,Z,`: `,e(o)];u.push(f.type!==r.type||f[o]===r||p?i:t.useTabs?sC(q(i)):aC(Math.max(0,t.tabWidth-2),i))}let b=e=>f===v?J(e):e,x=!d&&(nb(f)||f.type===`NGPipeExpression`&&f.left===r)&&!f.computed,S=xk(e),C=b([yk(e,t,n),m?u:q(u),i&&x&&!S?Q:``]);return p||S?J([q([Q,C]),Q]):C}function Ck(e,t){return(nb(t)||t.type===`NGPipeExpression`&&t.left===e)&&!t.computed}function wk(e,t,n,r){return[...e.map(e=>Fb(e)),Fb(t),Fb(n)].flat().some(e=>py(e)&&px(r.originalText,V(e),H(e)))}var Tk=new Map([[`AssignmentExpression`,`right`],[`VariableDeclarator`,`init`],[`ReturnStatement`,`argument`],[`ThrowStatement`,`argument`],[`UnaryExpression`,`argument`],[`YieldExpression`,`argument`],[`AwaitExpression`,`argument`]]);function Ek(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(i.type===`ChainExpression`&&i.expression===r||tb(i)&&i.callee===r||nb(i)&&i.object===r||i.type===`TSNonNullExpression`&&i.expression===r){r=i;continue}i.type===`NewExpression`&&i.callee===r||zb(i)&&i.expression===r?(n=e.getParentNode(t+1),r=i):n=i}return r!==t&&n[Tk.get(n.type)]===r}var Dk=e=>[Y(`(`),q([Q,e]),Q,Y(`)`)];function Ok(e,t,n,r){if(!t.experimentalTernaries)return Sk(e,t,n);let{node:i}=e,a=i.type===`ConditionalExpression`,o=Hb(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 w=x||p,T=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`),ee=(p.type===`ReturnStatement`||p.type===`ThrowStatement`)&&!(_||v),E=a&&w.type===`JSXExpressionContainer`&&e.grandparent.type!==`JSXAttribute`,te=Ek(e),D=Ck(i,p),ne=o&&sT(e,t),re=b?t.useTabs?` `:` `.repeat(t.tabWidth-1):``,O=wk(f,u,d,t)||_||v,ie=!y&&!m&&!o&&(E?u.type===`NullLiteral`||u.type===`Literal`&&u.value===null:ob(u,t)&&rb(i.test,3)),ae=y||g||o&&!m||m&&a&&rb(i.test,1)||ie,oe=[];!_&&K(u,G.Dangling)&&e.call(()=>{oe.push(mT(e,t),$)},`consequent`);let se=[];K(i.test,G.Dangling)&&e.call(()=>{se.push(mT(e,t))},`test`),!v&&K(d,G.Dangling)&&e.call(()=>{se.push(mT(e,t))},`alternate`),K(i,G.Dangling)&&se.push(mT(e,t));let ce=Symbol(`test`),le=Symbol(`consequent`),ue=Symbol(`test-and-consequent`),de=J([a?[Dk(n(`test`)),i.test.type===`ConditionalExpression`?lC:``]:[n(`checkType`),` `,`extends`,` `,Hb(i.extendsType)||i.extendsType.type===`TSMappedType`?n(`extendsType`):J(Dk(n(`extendsType`)))],` ?`],{id:ce}),fe=n(s),pe=q([_||E&&(Hy(u)||m||y)?$:Z,oe,fe]),me=ae?J([de,y?pe:Y(pe,J(pe,{id:le}),{groupId:ce})],{id:ue}):[de,pe],he=n(c),ge=ie?Y(he,sC(Dk(he)),{groupId:ue}):he,_e=[me,se.length>0?[q([$,se]),$]:v?$:ie?Y(Z,` `,{groupId:ue}):Z,`:`,v?` `:b?ae?Y(re,Y(y||ie?` `:re,` `),{groupId:ue}):Y(re,` `):` `,v?ge:J([q(ge),E&&!ie?Q:``]),D&&!te?Q:``,O?lC:``];return T&&!O?J(q([Q,J(_e)])):T||ee?J(q(_e)):te||o&&h?J([q([Q,_e]),ne?Q:``]):p===w?J(_e):_e}function kk(e,t,n,r){let{node:i}=e;if(Iy(i))return UO(e,t);switch(i.type){case`JsExpressionRoot`:return n(`node`);case`JsonRoot`:return[mT(e,t),n(`node`),$];case`File`:return HO(e,t,n)??n(`program`);case`ExpressionStatement`:return VO(e,t,n);case`ChainExpression`:return n(`expression`);case`ParenthesizedExpression`:return!K(i.expression)&&(ky(i.expression)||Oy(i.expression))?[`(`,n(`expression`),`)`]:J([`(`,q([Q,n(`expression`)]),Q,`)`]);case`AssignmentExpression`:return kE(e,t,n);case`VariableDeclarator`:return AE(e,t,n);case`BinaryExpression`:case`LogicalExpression`:return RT(e,t,n);case`AssignmentPattern`:return[n(`left`),` = `,n(`right`)];case`OptionalMemberExpression`:case`MemberExpression`:return yE(e,t,n);case`MetaProperty`:return[n(`meta`),`.`,n(`property`)];case`BindExpression`:return hE(e,t,n);case`Identifier`:return[i.name,TT(e),ET(e),XT(e,n)];case`V8IntrinsicIdentifier`:return[`%`,i.name];case`SpreadElement`:return _k(e,n);case`RestElement`:return _k(e,n);case`FunctionDeclaration`:case`FunctionExpression`:return eD(e,t,n,r);case`ArrowFunctionExpression`:return rO(e,t,n,r);case`YieldExpression`:return[`yield${i.delegate?`*`:``}`,i.argument?[` `,n(`argument`)]:``];case`AwaitExpression`:{let t=[`await`];if(i.argument){t.push(` `,n(`argument`));let{parent:r}=e;if(tb(r)&&r.callee===i||nb(r)&&r.object===i){t=[q([Q,...t]),Q];let n=e.findAncestor(e=>e.type===`AwaitExpression`||e.type===`BlockStatement`);if(n?.type!==`AwaitExpression`||!gb(n.argument,e=>e===i))return J(t)}}return t}case`ExportDefaultDeclaration`:case`ExportNamedDeclaration`:case`ExportAllDeclaration`:return rk(e,t,n);case`ImportDeclaration`:return tk(e,t,n);case`ImportSpecifier`:case`ExportSpecifier`:case`ImportNamespaceSpecifier`:case`ExportNamespaceSpecifier`:case`ImportDefaultSpecifier`:case`ExportDefaultSpecifier`:return hk(e,t,n);case`ImportAttribute`:return QE(e,t,n);case`Program`:case`BlockStatement`:case`StaticBlock`:return dO(e,t,n);case`ClassBody`:return hO(e,t,n);case`ThrowStatement`:return cD(e,t,n);case`ReturnStatement`:return sD(e,t,n);case`NewExpression`:case`ImportExpression`:case`OptionalCallExpression`:case`CallExpression`:return CE(e,t,n);case`ObjectExpression`:case`ObjectPattern`:return $O(e,t,n);case`Property`:return Uy(i)?tD(e,t,n):QE(e,t,n);case`ObjectProperty`:return QE(e,t,n);case`ObjectMethod`:return tD(e,t,n);case`Decorator`:return[`@`,n(`expression`)];case`ArrayExpression`:case`ArrayPattern`:return eE(e,t,n);case`SequenceExpression`:{let{parent:t}=e;if(t.type===`ExpressionStatement`||t.type===`ForStatement`){let t=[];return e.each(({isFirst:e})=>{e?t.push(n()):t.push(`,`,q([Z,n()]))},`expressions`),J(t)}let r=X([`,`,Z],e.map(n,`expressions`));return(t.type===`ReturnStatement`||t.type===`ThrowStatement`)&&e.key===`argument`||t.type===`ArrowFunctionExpression`&&e.key===`body`?J(Y([q([Q,r]),Q],r)):J(r)}case`ThisExpression`:return`this`;case`Super`:return`super`;case`Directive`:return[n(`value`),t.semi?`;`:``];case`UnaryExpression`:{let e=[i.operator];return/[a-z]$/u.test(i.operator)&&e.push(` `),K(i.argument)?e.push(J([`(`,q([Q,n(`argument`)]),Q,`)`])):e.push(n(`argument`)),e}case`UpdateExpression`:return[i.prefix?i.operator:``,n(`argument`),i.prefix?``:i.operator];case`ConditionalExpression`:return Ok(e,t,n,r);case`VariableDeclaration`:{let r=e.map(n,`declarations`),a=e.parent,o=a.type===`ForStatement`||a.type===`ForInStatement`||a.type===`ForOfStatement`,s=i.declarations.some(e=>e.init),c;return r.length===1&&!K(i.declarations[0])?c=r[0]:r.length>0&&(c=q(r[0])),J([OT(e),i.kind,c?[` `,c]:``,q(r.slice(1).map(e=>[`,`,s&&!o?$:Z,e])),t.semi&&!(o&&a.body!==i)?`;`:``])}case`WithStatement`:return J([`with (`,n(`object`),`)`,jT(i.body,n(`body`))]);case`IfStatement`:{let r=jT(i.consequent,n(`consequent`)),a=[J([`if (`,J([q([Q,n(`test`)]),Q]),`)`,r])];if(i.alternate){let r=K(i.consequent,G.Trailing|G.Line)||ub(i),o=i.consequent.type===`BlockStatement`&&!r;a.push(o?` `:$),K(i,G.Dangling)&&a.push(mT(e,t),r?$:` `),a.push(`else`,J(jT(i.alternate,n(`alternate`),i.alternate.type===`IfStatement`)))}return a}case`ForStatement`:{let r=jT(i.body,n(`body`)),a=mT(e,t),o=a?[a,Q]:``;return!i.init&&!i.test&&!i.update?[o,J([`for (;;)`,r])]:[o,J([`for (`,J([q([Q,n(`init`),`;`,Z,n(`test`),`;`,i.update?[Z,n(`update`)]:Y(``,Z)]),Q]),`)`,r])]}case`WhileStatement`:return J([`while (`,J([q([Q,n(`test`)]),Q]),`)`,jT(i.body,n(`body`))]);case`ForInStatement`:return J([`for (`,n(`left`),` in `,n(`right`),`)`,jT(i.body,n(`body`))]);case`ForOfStatement`:return J([`for`,i.await?` await`:``,` (`,n(`left`),` of `,n(`right`),`)`,jT(i.body,n(`body`))]);case`DoWhileStatement`:return[J([`do`,jT(i.body,n(`body`))]),i.body.type===`BlockStatement`?` `:$,`while (`,J([q([Q,n(`test`)]),Q]),`)`,t.semi?`;`:``];case`DoExpression`:return[i.async?`async `:``,`do `,n(`body`)];case`BreakStatement`:case`ContinueStatement`:return[i.type===`BreakStatement`?`break`:`continue`,i.label?[` `,n(`label`)]:``,t.semi?`;`:``];case`LabeledStatement`:return[n(`label`),`:${i.body.type===`EmptyStatement`&&!K(i.body,G.Leading)?``:` `}`,n(`body`)];case`TryStatement`:return[`try `,n(`block`),i.handler?[` `,n(`handler`)]:``,i.finalizer?[` finally `,n(`finalizer`)]:``];case`CatchClause`:if(i.param){let e=K(i.param,e=>!py(e)||e.leading&&Mv(t.originalText,H(e))||e.trailing&&Mv(t.originalText,V(e),{backwards:!0})),r=n(`param`);return[`catch `,e?[`(`,q([Q,r]),Q,`) `]:[`(`,r,`) `],n(`body`)]}return[`catch `,n(`body`)];case`SwitchStatement`:return[J([`switch (`,q([Q,n(`discriminant`)]),Q,`)`]),` {`,i.cases.length>0?q([$,X($,e.map(({node:e,isLast:r})=>[n(),!r&&Ib(e,t)?$:``],`cases`))]):``,$,`}`];case`SwitchCase`:{let r=[];i.test?r.push(`case `,n(`test`),`:`):r.push(`default:`),K(i,G.Dangling)&&r.push(` `,mT(e,t));let a=i.consequent.filter(e=>e.type!==`EmptyStatement`);if(a.length>0){let i=uO(e,t,n,`consequent`);r.push(a.length===1&&a[0].type===`BlockStatement`?[` `,i]:q([$,i]))}return r}case`DebuggerStatement`:return[`debugger`,t.semi?`;`:``];case`ClassDeclaration`:case`ClassExpression`:return EO(e,t,n);case`ClassMethod`:case`ClassPrivateMethod`:case`MethodDefinition`:return PO(e,t,n);case`ClassProperty`:case`PropertyDefinition`:case`ClassPrivateProperty`:case`ClassAccessorProperty`:case`AccessorProperty`:return FO(e,t,n);case`TemplateElement`:return XS(i.value.raw);case`TemplateLiteral`:return HC(e,t,n);case`TaggedTemplateExpression`:return UC(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(Sy(e))return`;`;default:throw new gD(i,`ESTree`)}}function Ak(e){return[e(`elementType`),`[]`]}var jk=W([`SatisfiesExpression`,`TSSatisfiesExpression`]);function Mk(e,t,n){let{parent:r,node:i,key:a}=e,o=i.type===`AsConstExpression`?`const`:n(`typeAnnotation`),s=[n(`expression`),` `,jk(i)?`satisfies`:`as`,` `,o];return a===`callee`&&tb(r)||a===`object`&&nb(r)?J([q([Q,...s]),Q]):s}function Nk(e,t,n){let{node:r}=e,i=[OT(e),`component`];r.id&&i.push(` `,n(`id`)),i.push(n(`typeParameters`));let a=Pk(e,t,n);return r.rendersType?i.push(J([a,` `,n(`rendersType`)])):i.push(J([a])),r.body&&i.push(` `,n(`body`)),t.semi&&r.type===`DeclareComponent`&&i.push(`;`),i}function Pk(e,t,n){let{node:r}=e,i=r.params;if(r.rest&&(i=[...i,r.rest]),i.length===0)return[`(`,mT(e,t,{filter:e=>dx(t.originalText,H(e))===`)`}),`)`];let a=[];return Ik(e,(e,o)=>{let s=o===i.length-1;s&&r.rest&&a.push(`...`),a.push(n()),!s&&(a.push(`,`),Ib(i[o],t)?a.push($,$):a.push(Z))}),[`(`,q([Q,...a]),Y(hb(t,`all`)&&!Fk(r,i)?`,`:``),Q,`)`]}function Fk(e,t){return e.rest||uv(0,t,-1)?.type===`RestElement`}function Ik(e,t){let{node:n}=e,r=0,i=e=>t(e,r++);e.each(i,`params`),n.rest&&e.call(i,`rest`)}function Lk(e,t,n){let{node:r}=e;return r.shorthand?n(`local`):[n(`name`),` as `,n(`local`)]}function Rk(e,t,n){let{node:r}=e,i=[];return r.name&&i.push(n(`name`),r.optional?`?: `:`: `),i.push(n(`typeAnnotation`)),i}function zk(e,t,n){return $O(e,t,n)}function Bk(e,t,n){let{node:r}=e;return[r.type===`EnumSymbolBody`||r.explicitType?`of ${r.type.slice(4,-4).toLowerCase()} `:``,zk(e,t,n)]}function Vk(e,t){let{node:n}=e,r=t(`id`);n.computed&&(r=[`[`,r,`]`]);let i=``;return n.initializer&&(i=t(`initializer`)),n.init&&(i=t(`init`)),i?[r,` = `,i]:r}function Hk(e,t){let{node:n}=e;return[OT(e),n.const?`const `:``,`enum `,t(`id`),` `,t(`body`)]}function Uk(e,t,n){let{node:r}=e,i=[AT(e)];(r.type===`TSConstructorType`||r.type===`TSConstructSignatureDeclaration`)&&i.push(`new `);let a=vT(e,t,n,!1,!0),o=[];return r.type===`FunctionTypeAnnotation`?o.push(Wk(e)?` => `:`: `,n(`returnType`)):o.push(XT(e,n,`returnType`)),xT(r,o)&&(a=J(a)),i.push(a,o),[J(i),r.type===`TSConstructSignatureDeclaration`||r.type===`TSCallSignatureDeclaration`?vO(e,t):``]}function Wk(e){let{node:t,parent:n}=e;return t.type===`FunctionTypeAnnotation`&&(Wy(n)||!((n.type===`ObjectTypeProperty`||n.type===`ObjectTypeInternalSlot`)&&!n.variance&&!n.optional&&ey(n,t)||n.type===`ObjectTypeCallProperty`||e.getParentNode(2)?.type===`DeclareFunction`))}function Gk(e,t,n){let{node:r}=e,i=[`hook`];r.id&&i.push(` `,n(`id`));let a=vT(e,t,n,!1,!0),o=aD(e,n),s=xT(r,o);return i.push(J([s?J(a):a,o]),r.body?` `:``,n(`body`)),i}function Kk(e,t,n){let{node:r}=e,i=[OT(e),`hook`];return r.id&&i.push(` `,n(`id`)),t.semi&&i.push(`;`),i}function qk(e){let{node:t}=e;return t.type===`HookTypeAnnotation`&&e.getParentNode(2)?.type===`DeclareHook`}function Jk(e,t,n){let{node:r}=e,i=vT(e,t,n,!1,!0),a=[qk(e)?`: `:` => `,n(`returnType`)];return J([qk(e)?``:`hook `,xT(r,a)?J(i):i,a])}function Yk(e,t,n){return[n(`objectType`),TT(e),`[`,n(`indexType`),`]`]}function Xk(e,t,n){return[`infer `,n(`typeParameter`)]}function Zk(e,t,n){let r=!1;return J(e.map(({isFirst:e,previous:i,node:a,index:o})=>{let s=n();if(e)return s;let c=Ry(a),l=Ry(i);return l&&c?[` & `,r?q(s):s]:!l&&!c||sb(t.originalText,a)?t.experimentalOperatorPosition===`start`?q([Z,`& `,s]):q([` &`,Z,s]):(o>1&&(r=!0),[` & `,o>1?q(s):s])},`types`))}function Qk(e){switch(e){case null:return``;case`PlusOptional`:return`+?`;case`MinusOptional`:return`-?`;case`Optional`:return`?`}}function $k(e,t,n){let{node:r}=e;return[J([r.variance?n(`variance`):``,`[`,q([n(`keyTparam`),` in `,n(`sourceType`)]),`]`,Qk(r.optional),`: `,n(`propType`)]),vO(e,t)]}function eA(e,t){return e===`+`||e===`-`?e+t:t}function tA(e,t,n){let{node:r}=e,i=!1;if(t.objectWrap===`preserve`){let e=V(r),n=XO(t,e+1,V(r.key)),a=e+1+n.search(/\S/u);px(t.originalText,e,a)&&(i=!0)}return J([`{`,q([t.bracketSpacing?Z:Q,K(r,G.Dangling)?J([mT(e,t),$]):``,J([r.readonly?[eA(r.readonly,`readonly`),` `]:``,`[`,n(`key`),` in `,n(`constraint`),r.nameType?[` as `,n(`nameType`)]:``,`]`,r.optional?eA(r.optional,`?`):``,r.typeAnnotation?`: `:``,n(`typeAnnotation`)]),t.semi?Y(`;`):``]),t.bracketSpacing?Z:Q,`}`],{shouldBreak:i})}function nA(e,t,n){let{node:r}=e;return[J([`match (`,q([Q,n(`argument`)]),Q,`)`]),` {`,r.cases.length>0?q([$,X($,e.map(({node:e,isLast:r})=>[n(),!r&&Ib(e,t)?$:``],`cases`))]):``,$,`}`]}function rA(e,t,n){let{node:r}=e,i=K(r,G.Dangling)?[` `,mT(e,t)]:[],a=r.type===`MatchStatementCase`?[` `,n(`body`)]:q([Z,n(`body`),`,`]);return[n(`pattern`),r.guard?J([q([Z,`if (`,n(`guard`),`)`])]):``,J([` =>`,i,a])]}function iA(e,t,n){let{node:r}=e;switch(r.type){case`MatchOrPattern`:return cA(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`)]:[`[`,q([Q,n(`property`)]),Q,`]`];return J([n(`base`),e])}case`MatchBindingPattern`:return[r.kind,` `,n(`id`)];case`MatchObjectPattern`:{let t=e.map(n,`properties`);return r.rest&&t.push(n(`rest`)),J([`{`,q([Q,X([`,`,Z],t)]),r.rest?``:Y(`,`),Q,`}`])}case`MatchArrayPattern`:{let t=e.map(n,`elements`);return r.rest&&t.push(n(`rest`)),J([`[`,q([Q,X([`,`,Z],t)]),r.rest?``:Y(`,`),Q,`]`])}case`MatchObjectPatternProperty`:return r.shorthand?n(`pattern`):J([n(`key`),`:`,q([Z,n(`pattern`)])]);case`MatchRestPattern`:{let e=[`...`];return r.argument&&e.push(n(`argument`)),e}}}var aA=W([`MatchWildcardPattern`,`MatchLiteralPattern`,`MatchUnaryPattern`,`MatchIdentifierPattern`]);function oA(e){let{patterns:t}=e;if(t.some(e=>K(e)))return!1;let n=t.find(e=>e.type===`MatchObjectPattern`);return n?t.every(e=>e===n||aA(e)):!1}function sA(e){return aA(e)||e.type===`MatchObjectPattern`?!0:e.type===`MatchOrPattern`&&oA(e)}function cA(e,t,n){let{node:r}=e,{parent:i}=e,a=i.type!==`MatchStatementCase`&&i.type!==`MatchExpressionCase`&&i.type!==`MatchArrayPattern`&&i.type!==`MatchObjectPatternProperty`&&!sb(t.originalText,r),o=sA(r),s=e.map(()=>{let r=n();return o||(r=aC(2,r)),gT(e,r,t)},`patterns`);if(o)return X(` | `,s);let c=[Y([`| `]),X([Z,`| `],s)];return sT(e,t)?J([q([Y([Q]),c]),Q]):i.type===`MatchArrayPattern`&&i.elements.length>1?J([q([Y([`(`,Q]),c]),Q,Y(`)`)]):J(a?q(c):c)}function lA(e,t,n){let{node:r}=e,i=[OT(e),`opaque type `,n(`id`),n(`typeParameters`)];if(r.supertype&&i.push(`: `,n(`supertype`)),r.lowerBound||r.upperBound){let e=[];r.lowerBound&&e.push(q([Z,`super `,n(`lowerBound`)])),r.upperBound&&e.push(q([Z,`extends `,n(`upperBound`)])),i.push(J(e))}return r.impltype&&i.push(` = `,n(`impltype`)),i.push(t.semi?`;`:``),i}function uA(e,t,n){let{node:r}=e;return[`...`,...r.type===`TupleTypeSpreadElement`&&r.label?[n(`label`),`: `]:[],n(`typeAnnotation`)]}function dA(e,t,n){let{node:r}=e;return[r.variance?n(`variance`):``,n(`label`),r.optional?`?`:``,`: `,n(`elementType`)]}function fA(e,t,n){let{node:r}=e;return[OE(e,t,n,[OT(e),`type `,n(`id`),n(`typeParameters`)],` =`,r.type===`TSTypeAliasDeclaration`?`typeAnnotation`:`right`),t.semi?`;`:``]}function pA(e,t,n){let{node:r}=e;return Eb(r).length===1&&r.type.startsWith(`TS`)&&!r[n][0].constraint&&e.parent.type===`ArrowFunctionExpression`&&!(t.filepath&&/\.ts$/u.test(t.filepath))}function mA(e,t,n,r){let{node:i}=e;if(!i[r])return``;if(!Array.isArray(i[r]))return n(r);let a=$y(e.grandparent),o=e.match(e=>!(e[r].length===1&&Ry(e[r][0])),void 0,(e,t)=>t===`typeAnnotation`,e=>e.type===`Identifier`,zE);if(i[r].length===0||!o&&(a||i[r].length===1&&(i[r][0].type===`NullableTypeAnnotation`||JT(i[r][0]))))return[`<`,X(`, `,e.map(n,r)),hA(e,t),`>`];let s=i.type===`TSTypeParameterInstantiation`?``:pA(e,t,r)?`,`:hb(t)?Y(`,`):``;return J([`<`,q([Q,X([`,`,Z],e.map(n,r))]),s,Q,`>`])}function hA(e,t){let{node:n}=e;if(!K(n,G.Dangling))return``;let r=!K(n,G.Line),i=mT(e,t,{indent:!r});return r?i:[i,$]}function gA(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(XT(e,n,`bound`))),r.constraint){let e=Symbol(`constraint`);i.push(` extends`,J(q(Z),{id:e}),vC,pC(n(`constraint`),{groupId:e}))}if(r.default){let e=Symbol(`default`);i.push(` =`,J(q(Z),{id:e}),vC,pC(n(`default`),{groupId:e}))}return J(i)}function _A(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 `,XT(e,t)]:``]}function vA({node:e},t){return[`typeof `,t(e.type===`TSTypeQuery`?`exprName`:`argument`),t(`typeArguments`)]}function yA(e,t,n){let{node:r}=e;if(my(r))return r.type.slice(0,-14).toLowerCase();switch(r.type){case`ComponentDeclaration`:case`DeclareComponent`:case`ComponentTypeAnnotation`:return Nk(e,t,n);case`ComponentParameter`:return Lk(e,t,n);case`ComponentTypeParameter`:return Rk(e,t,n);case`HookDeclaration`:return Gk(e,t,n);case`DeclareHook`:return Kk(e,t,n);case`HookTypeAnnotation`:return Jk(e,t,n);case`DeclareFunction`:return[OT(e),`function `,n(`id`),n(`predicate`),t.semi?`;`:``];case`DeclareModule`:return[`declare module `,n(`id`),` `,n(`body`)];case`DeclareModuleExports`:return[`declare module.exports`,XT(e,n),t.semi?`;`:``];case`DeclareNamespace`:return[`declare namespace `,n(`id`),` `,n(`body`)];case`DeclareVariable`:return[OT(e),r.kind??`var`,` `,n(`id`),t.semi?`;`:``];case`DeclareExportDeclaration`:case`DeclareExportAllDeclaration`:return rk(e,t,n);case`DeclareOpaqueType`:case`OpaqueType`:return lA(e,t,n);case`DeclareTypeAlias`:case`TypeAlias`:return fA(e,t,n);case`IntersectionTypeAnnotation`:return Zk(e,t,n);case`UnionTypeAnnotation`:return WT(e,t,n);case`ConditionalTypeAnnotation`:return Ok(e,t,n);case`InferTypeAnnotation`:return Xk(e,t,n);case`FunctionTypeAnnotation`:return Uk(e,t,n);case`TupleTypeAnnotation`:return eE(e,t,n);case`TupleTypeLabeledElement`:return dA(e,t,n);case`TupleTypeSpreadElement`:return uA(e,t,n);case`GenericTypeAnnotation`:return[n(`id`),mA(e,t,n,`typeParameters`)];case`IndexedAccessType`:case`OptionalIndexedAccessType`:return Yk(e,t,n);case`TypeAnnotation`:return QT(e,t,n);case`TypeParameter`:return gA(e,t,n);case`TypeofTypeAnnotation`:return vA(e,n);case`ExistsTypeAnnotation`:return`*`;case`ArrayTypeAnnotation`:return Ak(n);case`DeclareEnum`:case`EnumDeclaration`:return Hk(e,n);case`EnumBooleanBody`:case`EnumNumberBody`:case`EnumBigIntBody`:case`EnumStringBody`:case`EnumSymbolBody`:return Bk(e,t,n);case`EnumBooleanMember`:case`EnumNumberMember`:case`EnumBigIntMember`:case`EnumStringMember`:case`EnumDefaultedMember`:return Vk(e,n);case`FunctionTypeParam`:{let t=r.name?n(`name`):e.parent.this===r?`this`:``;return[t,TT(e),t?`: `:``,n(`typeAnnotation`)]}case`DeclareClass`:case`DeclareInterface`:case`InterfaceDeclaration`:case`InterfaceTypeAnnotation`:return EO(e,t,n);case`ObjectTypeAnnotation`:return hO(e,t,n);case`ClassImplements`:case`InterfaceExtends`:return[n(`id`),n(`typeParameters`)];case`NullableTypeAnnotation`:return[`?`,n(`typeAnnotation`)];case`Variance`:{let{kind:e}=r;return e===`plus`?`+`:`-`}case`KeyofTypeAnnotation`:return[`keyof `,n(`argument`)];case`ObjectTypeCallProperty`:return[r.static?`static `:``,n(`value`),vO(e,t)];case`ObjectTypeMappedTypeProperty`:return $k(e,t,n);case`ObjectTypeIndexer`:return[r.static?`static `:``,r.variance?n(`variance`):``,`[`,n(`id`),r.id?`: `:``,n(`key`),`]: `,n(`value`),vO(e,t)];case`ObjectTypeProperty`:{let i=``;return r.proto?i=`proto `:r.static&&(i=`static `),[i,r.kind===`init`?``:r.kind+` `,r.variance?n(`variance`):``,ZE(e,t,n),TT(e),Uy(r)?``:`: `,n(`value`),vO(e,t)]}case`ObjectTypeInternalSlot`:return[r.static?`static `:``,`[[`,n(`id`),`]]`,TT(e),r.method?``:`: `,n(`value`),vO(e,t)];case`ObjectTypeSpreadProperty`:return _k(e,n);case`QualifiedTypeofIdentifier`:case`QualifiedTypeIdentifier`:return[n(`qualification`),`.`,n(`id`)];case`NullLiteralTypeAnnotation`:return`null`;case`BooleanLiteralTypeAnnotation`:return String(r.value);case`StringLiteralTypeAnnotation`:return XS(Qv(fy(r),t));case`NumberLiteralTypeAnnotation`:return IT(fy(r));case`BigIntLiteralTypeAnnotation`:return GO(fy(r));case`TypeCastExpression`:return[`(`,n(`expression`),XT(e,n),`)`];case`TypePredicate`:return _A(e,n);case`TypeOperator`:return[r.operator,` `,n(`typeAnnotation`)];case`TypeParameterDeclaration`:case`TypeParameterInstantiation`:return mA(e,t,n,`params`);case`InferredPredicate`:case`DeclaredPredicate`:return[e.key===`predicate`&&e.parent.type!==`DeclareFunction`&&!e.parent.returnType?`: `:` `,`%checks`,...r.type===`DeclaredPredicate`?[`(`,n(`value`),`)`]:[]];case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:return Mk(e,t,n);case`MatchExpression`:case`MatchStatement`:return nA(e,t,n);case`MatchExpressionCase`:case`MatchStatementCase`:return rA(e,t,n);case`MatchOrPattern`:case`MatchAsPattern`:case`MatchWildcardPattern`:case`MatchLiteralPattern`:case`MatchUnaryPattern`:case`MatchIdentifierPattern`:case`MatchMemberPattern`:case`MatchBindingPattern`:case`MatchObjectPattern`:case`MatchObjectPatternProperty`:case`MatchRestPattern`:case`MatchArrayPattern`:return iA(e,t,n)}}function bA(e,t,n){let{node:r}=e,i=r.parameters.length>1?Y(hb(t)?`,`:``):``,a=J([q([Q,X([`, `,Q],e.map(n,`parameters`))]),i,Q]);return[e.key===`body`&&e.parent.type===`ClassBody`&&r.static?`static `:``,r.readonly?`readonly `:``,`[`,r.parameters?a:``,`]`,XT(e,n),vO(e,t)]}function xA(e,t,n){let{node:r}=e;return[r.postfix?``:n,XT(e,t),r.postfix?n:``]}function SA(e,t,n){let{node:r}=e,i=[],a=r.kind&&r.kind!==`method`?`${r.kind} `:``;i.push(MT(r),a,r.computed?`[`:``,n(`key`),r.computed?`]`:``,TT(e));let o=vT(e,t,n,!1,!0),s=XT(e,n,`returnType`),c=xT(r,s);return i.push(c?J(o):o),r.returnType&&i.push(J(s)),[J(i),vO(e,t)]}function CA(e,t,n){let{node:r}=e;return[OT(e),r.kind===`global`?``:`${r.kind} `,n(`id`),r.body?[` `,J(n(`body`))]:t.semi?`;`:``]}function wA(e,t,n){let{node:r}=e,i=!(Oy(r.expression)||ky(r.expression)),a=J([`<`,q([Q,n(`typeAnnotation`)]),Q,`>`]),o=[Y(`(`),q([Q,n(`expression`)]),Q,Y(`)`)];return i?fC([[a,n(`expression`)],[a,J(o,{shouldBreak:!0})],[a,n(`expression`)]]):J([a,n(`expression`)])}function TA(e,t,n){let{node:r}=e;if(r.type.startsWith(`TS`)){if(by(r))return r.type.slice(2,-7).toLowerCase();switch(r.type){case`TSThisType`:return`this`;case`TSTypeAssertion`:return wA(e,t,n);case`TSDeclareFunction`:return eD(e,t,n);case`TSExportAssignment`:return[`export = `,n(`expression`),t.semi?`;`:``];case`TSModuleBlock`:return dO(e,t,n);case`TSInterfaceBody`:case`TSTypeLiteral`:return hO(e,t,n);case`TSTypeAliasDeclaration`:return fA(e,t,n);case`TSQualifiedName`:return[n(`left`),`.`,n(`right`)];case`TSAbstractMethodDefinition`:case`TSDeclareMethod`:return PO(e,t,n);case`TSAbstractAccessorProperty`:case`TSAbstractPropertyDefinition`:return FO(e,t,n);case`TSInterfaceHeritage`:case`TSClassImplements`:case`TSInstantiationExpression`:return[n(`expression`),n(`typeArguments`)];case`TSTemplateLiteralType`:return HC(e,t,n);case`TSNamedTupleMember`:return dA(e,t,n);case`TSRestType`:return uA(e,t,n);case`TSOptionalType`:return[n(`typeAnnotation`),`?`];case`TSInterfaceDeclaration`:return EO(e,t,n);case`TSTypeParameterDeclaration`:case`TSTypeParameterInstantiation`:return mA(e,t,n,`params`);case`TSTypeParameter`:return gA(e,t,n);case`TSAsExpression`:case`TSSatisfiesExpression`:return Mk(e,t,n);case`TSArrayType`:return Ak(n);case`TSPropertySignature`:return[r.readonly?`readonly `:``,ZE(e,t,n),TT(e),XT(e,n),vO(e,t)];case`TSParameterProperty`:return[MT(r),r.static?`static `:``,r.override?`override `:``,r.readonly?`readonly `:``,n(`parameter`)];case`TSTypeQuery`:return vA(e,n);case`TSIndexSignature`:return bA(e,t,n);case`TSTypePredicate`:return _A(e,n);case`TSNonNullExpression`:return[n(`expression`),`!`];case`TSImportType`:return[CE(e,t,n),r.qualifier?[`.`,n(`qualifier`)]:``,mA(e,t,n,`typeArguments`)];case`TSLiteralType`:return n(`literal`);case`TSIndexedAccessType`:return Yk(e,t,n);case`TSTypeOperator`:return[r.operator,` `,n(`typeAnnotation`)];case`TSMappedType`:return tA(e,t,n);case`TSMethodSignature`:return SA(e,t,n);case`TSNamespaceExportDeclaration`:return[`export as namespace `,n(`id`),t.semi?`;`:``];case`TSEnumDeclaration`:return Hk(e,n);case`TSEnumBody`:return zk(e,t,n);case`TSEnumMember`:return Vk(e,n);case`TSImportEqualsDeclaration`:return[`import `,sk(r,!1),n(`id`),` = `,n(`moduleReference`),t.semi?`;`:``];case`TSExternalModuleReference`:return CE(e,t,n);case`TSModuleDeclaration`:return CA(e,t,n);case`TSConditionalType`:return Ok(e,t,n);case`TSInferType`:return Xk(e,t,n);case`TSIntersectionType`:return Zk(e,t,n);case`TSUnionType`:return WT(e,t,n);case`TSFunctionType`:case`TSCallSignatureDeclaration`:case`TSConstructorType`:case`TSConstructSignatureDeclaration`:return Uk(e,t,n);case`TSTupleType`:return eE(e,t,n);case`TSTypeReference`:return[n(`typeName`),mA(e,t,n,`typeArguments`)];case`TSTypeAnnotation`:return QT(e,t,n);case`TSEmptyBodyFunctionExpression`:return nD(e,t,n);case`TSJSDocAllType`:return`*`;case`TSJSDocUnknownType`:return`?`;case`TSJSDocNullableType`:return xA(e,n,`?`);case`TSJSDocNonNullableType`:return xA(e,n,`!`);default:throw new gD(r,`TypeScript`)}}}function EA(e,t,n,r){for(let i of[WD,LD,yA,TA,kk]){let a=i(e,t,n,r);if(a!==void 0)return a}}var DA=W([`ClassMethod`,`ClassPrivateMethod`,`ClassProperty`,`ClassAccessorProperty`,`AccessorProperty`,`TSAbstractAccessorProperty`,`PropertyDefinition`,`TSAbstractPropertyDefinition`,`ClassPrivateProperty`,`MethodDefinition`,`TSAbstractMethodDefinition`,`TSDeclareMethod`]);function OA(e,t,n,r){e.isRoot&&t.__onHtmlBindingRoot?.(e.node,t);let{node:i}=e,a=UD(e)?t.originalText.slice(V(i),H(i)):EA(e,t,n,r);if(!a)return``;if(DA(i))return a;let o=Bv(i.decorators),s=ZD(e,t,n),c=i.type===`ClassExpression`;if(o&&!c)return $S(a,e=>J([s,e]));let l=sT(e,t),u=uD(e,t);return!s&&!l&&!u?a:$S(a,e=>[u?`;`:``,l?`(`:``,l&&c&&o?[q([Z,s,e]),Z]:[s,e],l?`)`:``])}var kA=OA,AA={experimental_avoidAstMutation:!0},jA=[{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`,`.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}],MA={};nv(MA,{getVisitorKeys:()=>PA,massageAstNode:()=>RA,print:()=>FA});var NA=[[]],PA=cy({JsonRoot:[`node`],ArrayExpression:[`elements`],ObjectExpression:[`properties`],ObjectProperty:[`key`,`value`],UnaryExpression:[`argument`],NullLiteral:NA[0],BooleanLiteral:NA[0],StringLiteral:NA[0],NumericLiteral:NA[0],Identifier:NA[0],TemplateLiteral:[`quasis`],TemplateElement:NA[0]});function FA(e,t,n){let{node:r}=e;switch(r.type){case`JsonRoot`:return[n(`node`),$];case`ArrayExpression`:{if(r.elements.length===0)return`[]`;let t=e.map(()=>e.node===null?`null`:n(),`elements`);return[`[`,q([$,X([`,`,$],t)]),$,`]`]}case`ObjectExpression`:return r.properties.length===0?`{}`:[`{`,q([$,X([`,`,$],e.map(n,`properties`))]),$,`}`];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 JSON.stringify(r.value);case`NumericLiteral`:return IA(e)?JSON.stringify(String(r.value)):JSON.stringify(r.value);case`Identifier`:return IA(e)?JSON.stringify(r.name):r.name;case`TemplateLiteral`:return n([`quasis`,0]);case`TemplateElement`:return JSON.stringify(r.value.cooked);default:throw new gD(r,`JSON`)}}function IA(e){return e.key===`key`&&e.parent.type===`ObjectProperty`}var LA=new Set([`start`,`end`,`extra`,`loc`,`comments`,`leadingComments`,`trailingComments`,`innerComments`,`errors`,`range`,`tokens`]);function RA(e,t){let{type:n}=e;if(n===`ObjectProperty`){let{key:n}=e;n.type===`Identifier`?t.key={type:`StringLiteral`,value:n.name}:n.type===`NumericLiteral`&&(t.key={type:`StringLiteral`,value:String(n.value)});return}if(n===`UnaryExpression`&&e.operator===`+`)return t.argument;if(n===`ArrayExpression`){for(let[n,r]of e.elements.entries())r===null&&t.elements.splice(n,0,{type:`NullLiteral`});return}if(n===`TemplateLiteral`)return{type:`StringLiteral`,value:e.quasis[0].value.cooked}}RA.ignoredProperties=LA;var zA={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.`}},BA=`JavaScript`,VA={arrowParens:{category:BA,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:zA.bracketSameLine,objectWrap:zA.objectWrap,bracketSpacing:zA.bracketSpacing,jsxBracketSameLine:{category:BA,type:`boolean`,description:`Put > on the last line instead of at a new line.`,deprecated:`2.4.0`},semi:{category:BA,type:`boolean`,default:!0,description:`Print semicolons.`,oppositeDescription:`Do not print semicolons, except at the beginning of lines which may need them.`},experimentalOperatorPosition:{category:BA,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:BA,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:zA.singleQuote,jsxSingleQuote:{category:BA,type:`boolean`,default:!1,description:`Use single quotes in JSX.`},quoteProps:{category:BA,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:BA,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:zA.singleAttributePerLine},HA={estree:av,"estree-json":MA},UA=[...iv,...jA],WA=Object.create,GA=Object.defineProperty,KA=Object.getOwnPropertyDescriptor,qA=Object.getOwnPropertyNames,JA=Object.getPrototypeOf,YA=Object.prototype.hasOwnProperty,XA=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ZA=(e,t)=>{for(var n in t)GA(e,n,{get:t[n],enumerable:!0})},QA=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of qA(t))!YA.call(e,i)&&i!==n&&GA(e,i,{get:()=>t[i],enumerable:!(r=KA(t,i))||r.enumerable});return e},$A=(e,t,n)=>(n=e==null?{}:WA(JA(e)),QA(t||!e||!e.__esModule?GA(n,`default`,{value:e,enumerable:!0}):n,e)),ej=XA((e,t)=>{var n,r,i,a,o,s,c,l,u,d,f,p,m=/\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]|[^\/\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/uy,h,g,_,v,y,b;p=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,n=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/uy,g=/(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y,f=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,_=/[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y,b=/[\t\v\f\ufeff\p{Zs}]+/uy,l=/\r?\n|[\r\u2028\u2029]/y,u=/\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y,h=/\/\/.*/y,i=/[<>.:={}]|\/(?![\/*])/y,r=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/uy,a=/(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y,o=/[^<>{}]+/y,y=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,v=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,s=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,c=/^(?:return|throw|yield)$/,d=RegExp(l.source),t.exports=function*(e,{jsx:t=!1}={}){var x,S,C,w,T,ee,E,te,D,ne,re,O,ie,ae;for({length:ee}=e,w=0,T=``,ae=[{tag:`JS`}],x=[],re=0,O=!1;w<ee;){switch(te=ae[ae.length-1],te.tag){case`JS`:case`JSNonExpressionParen`:case`InterpolationInTemplate`:case`InterpolationInJSX`:if(e[w]===`/`&&(y.test(T)||s.test(T))&&(m.lastIndex=w,E=m.exec(e))){w=m.lastIndex,T=E[0],O=!0,yield{type:`RegularExpressionLiteral`,value:E[0],closed:E[1]!==void 0&&E[1]!==`\\`};continue}if(p.lastIndex=w,E=p.exec(e)){switch(ie=E[0],D=p.lastIndex,ne=ie,ie){case`(`:T===`?NonExpressionParenKeyword`&&ae.push({tag:`JSNonExpressionParen`,nesting:re}),re++,O=!1;break;case`)`:re--,O=!0,te.tag===`JSNonExpressionParen`&&re===te.nesting&&(ae.pop(),ne=`?NonExpressionParenEnd`,O=!1);break;case`{`:p.lastIndex=0,C=!v.test(T)&&(y.test(T)||s.test(T)),x.push(C),O=!1;break;case`}`:switch(te.tag){case`InterpolationInTemplate`:if(x.length===te.nesting){_.lastIndex=w,E=_.exec(e),w=_.lastIndex,T=E[0],E[1]==="${"?(T=`?InterpolationInTemplate`,O=!1,yield{type:`TemplateMiddle`,value:E[0]}):(ae.pop(),O=!0,yield{type:`TemplateTail`,value:E[0],closed:E[1]==="`"});continue}break;case`InterpolationInJSX`:if(x.length===te.nesting){ae.pop(),w+=1,T=`}`,yield{type:`JSXPunctuator`,value:`}`};continue}}O=x.pop(),ne=O?`?ExpressionBraceEnd`:`}`;break;case`]`:O=!0;break;case`++`:case`--`:ne=O?`?PostfixIncDec`:`?UnaryIncDec`;break;case`<`:if(t&&(y.test(T)||s.test(T))){ae.push({tag:`JSXTag`}),w+=1,T=`<`,yield{type:`JSXPunctuator`,value:ie};continue}O=!1;break;default:O=!1}w=D,T=ne,yield{type:`Punctuator`,value:ie};continue}if(n.lastIndex=w,E=n.exec(e)){switch(w=n.lastIndex,ne=E[0],E[0]){case`for`:case`if`:case`while`:case`with`:T!==`.`&&T!==`?.`&&(ne=`?NonExpressionParenKeyword`)}T=ne,O=!s.test(E[0]),yield{type:E[1]===`#`?`PrivateIdentifier`:`IdentifierName`,value:E[0]};continue}if(g.lastIndex=w,E=g.exec(e)){w=g.lastIndex,T=E[0],O=!0,yield{type:`StringLiteral`,value:E[0],closed:E[2]!==void 0};continue}if(f.lastIndex=w,E=f.exec(e)){w=f.lastIndex,T=E[0],O=!0,yield{type:`NumericLiteral`,value:E[0]};continue}if(_.lastIndex=w,E=_.exec(e)){w=_.lastIndex,T=E[0],E[1]==="${"?(T=`?InterpolationInTemplate`,ae.push({tag:`InterpolationInTemplate`,nesting:x.length}),O=!1,yield{type:`TemplateHead`,value:E[0]}):(O=!0,yield{type:`NoSubstitutionTemplate`,value:E[0],closed:E[1]==="`"});continue}break;case`JSXTag`:case`JSXTagEnd`:if(i.lastIndex=w,E=i.exec(e)){switch(w=i.lastIndex,ne=E[0],E[0]){case`<`:ae.push({tag:`JSXTag`});break;case`>`:ae.pop(),T===`/`||te.tag===`JSXTagEnd`?(ne=`?JSX`,O=!0):ae.push({tag:`JSXChildren`});break;case`{`:ae.push({tag:`InterpolationInJSX`,nesting:x.length}),ne=`?InterpolationInJSX`,O=!1;break;case`/`:T===`<`&&(ae.pop(),ae[ae.length-1].tag===`JSXChildren`&&ae.pop(),ae.push({tag:`JSXTagEnd`}))}T=ne,yield{type:`JSXPunctuator`,value:E[0]};continue}if(r.lastIndex=w,E=r.exec(e)){w=r.lastIndex,T=E[0],yield{type:`JSXIdentifier`,value:E[0]};continue}if(a.lastIndex=w,E=a.exec(e)){w=a.lastIndex,T=E[0],yield{type:`JSXString`,value:E[0],closed:E[2]!==void 0};continue}break;case`JSXChildren`:if(o.lastIndex=w,E=o.exec(e)){w=o.lastIndex,T=E[0],yield{type:`JSXText`,value:E[0]};continue}switch(e[w]){case`<`:ae.push({tag:`JSXTag`}),w++,T=`<`,yield{type:`JSXPunctuator`,value:`<`};continue;case`{`:ae.push({tag:`InterpolationInJSX`,nesting:x.length}),w++,T=`?InterpolationInJSX`,O=!1,yield{type:`JSXPunctuator`,value:`{`};continue}}if(b.lastIndex=w,E=b.exec(e)){w=b.lastIndex,yield{type:`WhiteSpace`,value:E[0]};continue}if(l.lastIndex=w,E=l.exec(e)){w=l.lastIndex,O=!1,c.test(T)&&(T=`?NoLineTerminatorHere`),yield{type:`LineTerminatorSequence`,value:E[0]};continue}if(u.lastIndex=w,E=u.exec(e)){w=u.lastIndex,d.test(E[0])&&(O=!1,c.test(T)&&(T=`?NoLineTerminatorHere`)),yield{type:`MultiLineComment`,value:E[0],closed:E[1]!==void 0};continue}if(h.lastIndex=w,E=h.exec(e)){w=h.lastIndex,O=!1,yield{type:`SingleLineComment`,value:E[0]};continue}S=String.fromCodePoint(e.codePointAt(w)),w+=S.length,T=S,O=!1,yield{type:te.tag.startsWith(`JSX`)?`JSXInvalid`:`Invalid`,value:S}}}});ZA({},{__debug:()=>LL,check:()=>FL,doc:()=>JI,format:()=>PL,formatWithCursor:()=>NL,getSupportInfo:()=>IL,util:()=>$I,version:()=>QI});var tj=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),nj=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},rj=tj(`replaceAll`,function(){if(typeof this==`string`)return nj}),ij=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}},aj=new class extends ij{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function oj(e,t,n){return aj.diff(e,t,n)}var sj=()=>{},cj=`cr`,lj=`crlf`,uj=`lf`,dj=`\r`,fj=`\r
346
- `,pj=`
347
- `,mj=pj;function hj(e){let t=e.indexOf(dj);return t===-1?uj:e.charAt(t+1)===pj?lj:cj}function gj(e){return e===cj?dj:e===lj?fj:mj}var _j=new Map([[pj,/\n/gu],[dj,/\r/gu],[fj,/\r\n/gu]]);function vj(e,t){let n=_j.get(t);return e.match(n)?.length??0}var yj=/\r\n?/gu;function bj(e){return rj(0,e,yj,pj)}function xj(e){return this[e<0?this.length+e:e]}var Sj=tj(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return xj}),Cj=`string`,wj=`array`,Tj=`cursor`,Ej=`indent`,Dj=`align`,Oj=`trim`,kj=`group`,Aj=`fill`,jj=`if-break`,Mj=`indent-if-break`,Nj=`line-suffix`,Pj=`line-suffix-boundary`,Fj=`line`,Ij=`label`,Lj=`break-parent`,Rj=new Set([Tj,Ej,Dj,Oj,kj,Aj,jj,Mj,Nj,Pj,Fj,Ij,Lj]);function zj(e){let t=e.length;for(;t>0&&(e[t-1]===`\r`||e[t-1]===`
348
- `);)t--;return t<e.length?e.slice(0,t):e}function Bj(e){if(typeof e==`string`)return Cj;if(Array.isArray(e))return wj;if(!e)return;let{type:t}=e;if(Rj.has(t))return t}var Vj=Bj,Hj=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function Uj(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
349
- Expected it to be 'string' or 'object'.`;if(Vj(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=Hj([...Rj].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
350
- Expected it to be ${r}.`}var Wj=class extends Error{name=`InvalidDocError`;constructor(e){super(Uj(e)),this.doc=e}},Gj={};function Kj(e,t,n,r){let i=[e];for(;i.length>0;){let e=i.pop();if(e===Gj){n(i.pop());continue}n&&i.push(e,Gj);let a=Vj(e);if(!a)throw new Wj(e);if(t?.(e)!==!1)switch(a){case wj:case Aj:{let t=a===wj?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case jj:i.push(e.flatContents,e.breakContents);break;case kj: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 Dj:case Ej:case Mj:case Ij:case Nj:i.push(e.contents);break;case Cj:case Tj:case Oj:case Pj:case Fj:case Lj:break;default:throw new Wj(e)}}}var qj=Kj;function Jj(e,t){if(typeof e==`string`)return t(e);let n=new Map;return r(e);function r(e){if(n.has(e))return n.get(e);let t=i(e);return n.set(e,t),t}function i(e){switch(Vj(e)){case wj:return t(e.map(r));case Aj:return t({...e,parts:e.parts.map(r)});case jj:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case kj:{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 Dj:case Ej:case Mj:case Ij:case Nj:return t({...e,contents:r(e.contents)});case Cj:case Tj:case Oj:case Pj:case Fj:case Lj:return t(e);default:throw new Wj(e)}}}function Yj(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 qj(e,a),r}function Xj(e){if(e.type===kj&&e.break||e.type===Fj&&e.hard||e.type===Lj)return!0}function Zj(e){return Yj(e,Xj,!1)}function Qj(e){if(e.length>0){let t=Sj(0,e,-1);!t.expandedStates&&!t.break&&(t.break=`propagated`)}return null}function $j(e){let t=new Set,n=[];function r(e){if(e.type===Lj&&Qj(n),e.type===kj){if(n.push(e),t.has(e))return!1;t.add(e)}}function i(e){e.type===kj&&n.pop().break&&Qj(n)}qj(e,r,i,!0)}function eM(e){return e.type===Fj&&!e.hard?e.soft?``:` `:e.type===jj?e.flatContents:e}function tM(e){return Jj(e,eM)}function nM(e){for(e=[...e];e.length>=2&&Sj(0,e,-2).type===Fj&&Sj(0,e,-1).type===Lj;)e.length-=2;if(e.length>0){let t=rM(Sj(0,e,-1));e[e.length-1]=t}return e}function rM(e){switch(Vj(e)){case Ej:case Mj:case kj:case Nj:case Ij:{let t=rM(e.contents);return{...e,contents:t}}case jj:return{...e,breakContents:rM(e.breakContents),flatContents:rM(e.flatContents)};case Aj:return{...e,parts:nM(e.parts)};case wj:return nM(e);case Cj:return zj(e);case Dj:case Tj:case Oj:case Pj:case Fj:case Lj:break;default:throw new Wj(e)}return e}function iM(e){return rM(oM(e))}function aM(e){switch(Vj(e)){case Aj:if(e.parts.every(e=>e===``))return``;break;case kj:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return``;if(e.contents.type===kj&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case Dj:case Ej:case Mj:case Nj:if(!e.contents)return``;break;case jj:if(!e.flatContents&&!e.breakContents)return``;break;case wj:{let t=[];for(let n of e){if(!n)continue;let[e,...r]=Array.isArray(n)?n:[n];typeof e==`string`&&typeof Sj(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 Cj:case Tj:case Oj:case Pj:case Fj:case Ij:case Lj:break;default:throw new Wj(e)}return e}function oM(e){return Jj(e,e=>aM(e))}function sM(e,t=FM){return Jj(e,e=>typeof e==`string`?OM(t,e.split(`
351
- `)):e)}function cM(e){if(e.type===Fj)return!0}function lM(e){return Yj(e,cM,!1)}function uM(e,t){return e.type===Ij?{...e,contents:t(e.contents)}:t(e)}var dM=sj,fM=sj,pM=sj,mM=sj;function hM(e){return dM(e),{type:Ej,contents:e}}function gM(e,t){return mM(e),dM(t),{type:Dj,contents:t,n:e}}function _M(e){return gM(-1/0,e)}function vM(e){return gM({type:`root`},e)}function yM(e){return gM(-1,e)}function bM(e,t,n){dM(e);let r=e;if(t>0){for(let e=0;e<Math.floor(t/n);++e)r=hM(r);r=gM(t%n,r),r=gM(-1/0,r)}return r}var xM={type:Lj},SM={type:Tj};function CM(e){return pM(e),{type:Aj,parts:e}}function wM(e,t={}){return dM(e),fM(t.expandedStates,!0),{type:kj,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function TM(e,t){return wM(e[0],{...t,expandedStates:e})}function EM(e,t=``,n={}){return dM(e),t!==``&&dM(t),{type:jj,breakContents:e,flatContents:t,groupId:n.groupId}}function DM(e,t){return dM(e),{type:Mj,contents:e,groupId:t.groupId,negate:t.negate}}function OM(e,t){dM(e),fM(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}function kM(e,t){return dM(t),e?{type:Ij,label:e,contents:t}:t}var AM={type:Fj},jM={type:Fj,soft:!0},MM={type:Fj,hard:!0},NM=[MM,xM],PM={type:Fj,hard:!0,literal:!0},FM=[PM,xM];function IM(e){return dM(e),{type:Nj,contents:e}}var LM={type:Pj},RM={type:Oj};function zM(e){if(!e)return``;if(Array.isArray(e)){let t=[];for(let n of e)if(Array.isArray(n))t.push(...zM(n));else{let e=zM(n);e!==``&&t.push(e)}return t}return e.type===jj?{...e,breakContents:zM(e.breakContents),flatContents:zM(e.flatContents)}:e.type===kj?{...e,contents:zM(e.contents),expandedStates:e.expandedStates?.map(zM)}:e.type===Aj?{type:`fill`,parts:e.parts.map(zM)}:e.contents?{...e,contents:zM(e.contents)}:e}function BM(e){let t=Object.create(null),n=new Set;return r(zM(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===Fj){let r=n?.[t+1]?.type===Lj;return e.literal?r?`literalline`:`literallineWithoutBreakParent`:e.hard?r?`hardline`:`hardlineWithoutBreakParent`:e.soft?`softline`:`line`}if(e.type===Lj)return n?.[t-1]?.type===Fj&&n[t-1].hard?void 0:`breakParent`;if(e.type===Oj)return`trim`;if(e.type===Ej)return`indent(`+r(e.contents)+`)`;if(e.type===Dj)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===jj)return`ifBreak(`+r(e.breakContents)+(e.flatContents?`, `+r(e.flatContents):``)+(e.groupId?(e.flatContents?``:`, ""`)+`, { groupId: ${i(e.groupId)} }`:``)+`)`;if(e.type===Mj){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===kj){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===Aj)return`fill([${e.parts.map(e=>r(e)).join(`, `)}])`;if(e.type===Nj)return`lineSuffix(`+r(e.contents)+`)`;if(e.type===Pj)return`lineSuffixBoundary`;if(e.type===Ij)return`label(${JSON.stringify(e.label)}, ${r(e.contents)})`;if(e.type===Tj)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 VM=()=>/[#*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;function HM(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function UM(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var WM=`©®‼⁉™ℹ↔↕↖↗↘↙↩↪⌨⏏⏱⏲⏸⏹⏺▪▫▶◀◻◼☀☁☂☃☄☎☑☘☝☠☢☣☦☪☮☯☸☹☺♀♂♟♠♣♥♦♨♻♾⚒⚔⚕⚖⚗⚙⚛⚜⚠⚧⚰⚱⛈⛏⛑⛓⛩⛱⛷⛸⛹✂✈✉✌✍✏✒✔✖✝✡✳✴❄❇❣❤➡⤴⤵⬅⬆⬇`,GM=/[^\x20-\x7F]/u,KM=new Set(WM);function qM(e){if(!e)return 0;if(!GM.test(e))return e.length;e=e.replace(VM(),e=>KM.has(e)?` `:` `);let t=0;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+=HM(e)||UM(e)?2:1)}return t}var JM=qM,YM={type:0},XM={type:1},ZM={value:``,length:0,queue:[],get root(){return ZM}};function QM(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 $M(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?XM:{type:2,width:t}:{type:3,string:t},QM(e,r,n)}function eN(e,t){return QM(e,YM,t)}function tN(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 nN(e){let t=tN(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}var rN=Symbol(`MODE_BREAK`),iN=Symbol(`MODE_FLAT`),aN=Symbol(`DOC_FILL_PRINTED_LENGTH`);function oN(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=Vj(u);switch(d){case Cj:u&&(s&&=(l+=` `,--n,!1),l+=u,n-=JM(u));break;case wj:case Aj:{let t=d===wj?u:u.parts,n=u[aN]??0;for(let r=t.length-1;r>=n;r--)c.push({mode:e,doc:t[r]});break}case Ej:case Dj:case Mj:case Ij:c.push({mode:e,doc:u.contents});break;case Oj:{let{text:e,count:t}=nN(l);l=e,n+=t;break}case kj:{if(a&&u.break)return!1;let t=u.break?rN:e,n=u.expandedStates&&t===rN?Sj(0,u.expandedStates,-1):u.contents;c.push({mode:t,doc:n});break}case jj:{let t=(u.groupId?i[u.groupId]||iN:e)===rN?u.breakContents:u.flatContents;t&&c.push({mode:e,doc:t});break}case Fj:if(e===rN||u.hard)return!0;u.soft||(s=!0);break;case Nj:r=!0;break;case Pj:if(r)return!1}}return!1}function sN(e,t){let n=Object.create(null),r=t.printWidth,i=gj(t.endOfLine),a=0,o=[{indent:ZM,mode:rN,doc:e}],s=``,c=!1,l=[],u=[],d=[],f=[],p=0;for($j(e);o.length>0;){let{indent:e,mode:d,doc:f}=o.pop();switch(Vj(f)){case Cj:{let e=i===`
352
- `?f:rj(0,f,`
353
- `,i);e&&(s+=e,o.length>0&&(a+=JM(e)));break}case wj:for(let t=f.length-1;t>=0;t--)o.push({indent:e,mode:d,doc:f[t]});break;case Tj:if(u.length>=2)throw Error(`There are too many 'cursor' in doc.`);u.push(p+s.length);break;case Ej:o.push({indent:eN(e,t),mode:d,doc:f.contents});break;case Dj:o.push({indent:$M(e,f.n,t),mode:d,doc:f.contents});break;case Oj:_();break;case kj:switch(d){case iN:if(!c){o.push({indent:e,mode:f.break?rN:iN,doc:f.contents});break}case rN:{c=!1;let t={indent:e,mode:iN,doc:f.contents},i=r-a,s=l.length>0;if(!f.break&&oN(t,o,i,s,n))o.push(t);else if(f.expandedStates){let t=Sj(0,f.expandedStates,-1);if(f.break){o.push({indent:e,mode:rN,doc:t});break}for(let r=1;r<f.expandedStates.length+1;r++)if(r>=f.expandedStates.length){o.push({indent:e,mode:rN,doc:t});break}else{let t={indent:e,mode:iN,doc:f.expandedStates[r]};if(oN(t,o,i,s,n)){o.push(t);break}}}else o.push({indent:e,mode:rN,doc:f.contents});break}}f.id&&(n[f.id]=Sj(0,o,-1).mode);break;case Aj:{let t=r-a,i=f[aN]??0,{parts:s}=f,c=s.length-i;if(c===0)break;let u=s[i+0],p=s[i+1],m={indent:e,mode:iN,doc:u},h={indent:e,mode:rN,doc:u},g=oN(m,[],t,l.length>0,n,!0);if(c===1){g?o.push(m):o.push(h);break}let _={indent:e,mode:iN,doc:p},v={indent:e,mode:rN,doc:p};if(c===2){g?o.push(_,m):o.push(v,h);break}let y=s[i+2],b={indent:e,mode:d,doc:{...f,[aN]:i+2}},x=oN({indent:e,mode:iN,doc:[u,p,y]},[],t,l.length>0,n,!0);o.push(b),x?o.push(_,m):g?o.push(v,m):o.push(v,h);break}case jj:case Mj:{let t=f.groupId?n[f.groupId]:d;if(t===rN){let t=f.type===jj?f.breakContents:f.negate?f.contents:hM(f.contents);t&&o.push({indent:e,mode:d,doc:t})}if(t===iN){let t=f.type===jj?f.flatContents:f.negate?hM(f.contents):f.contents;t&&o.push({indent:e,mode:d,doc:t})}break}case Nj:l.push({indent:e,mode:d,doc:f.contents});break;case Pj:l.length>0&&o.push({indent:e,mode:d,doc:MM});break;case Fj:switch(d){case iN:if(f.hard)c=!0;else{f.soft||(s+=` `,a+=1);break}case rN:if(l.length>0){o.push({indent:e,mode:d,doc:f},...l.reverse()),l.length=0;break}f.literal?(s+=i,a=0,e.root&&(e.root.value&&(s+=e.root.value),a=e.root.length)):(_(),s+=i+e.value,a=e.length)}break;case Ij:o.push({indent:e,mode:d,doc:f.contents});break;case Lj:break;default:throw new Wj(f)}o.length===0&&l.length>0&&(o.push(...l.reverse()),l.length=0)}let m=d.join(``)+s,h=[...f,...u];if(h.length!==2)return{formatted:m};let g=h[0];return{formatted:m,cursorNodeStart:g,cursorNodeText:m.slice(g,Sj(0,h,-1))};function _(){let{text:e,count:t}=nN(s);e&&(d.push(e),p+=e.length),s=``,a-=t,u.length>0&&(f.push(...u.map(e=>Math.min(e,p))),u.length=0)}}function cN(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 lN=cN,uN=class{constructor(e){this.stack=[e]}get key(){let{stack:e,siblings:t}=this;return Sj(0,e,t===null?-2:-4)??null}get index(){return this.siblings===null?null:Sj(0,this.stack,-2)}get node(){return Sj(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=Sj(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?Sj(0,e,-2):null}getValue(){return Sj(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=Sj(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=Sj(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 dN(e){return typeof e==`object`&&!!e}var fN=dN;function pN(e){return(t,n,r)=>{let i=!!r?.backwards;if(n===!1)return!1;let{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 mN=pN(/\s/u),hN=pN(` `),gN=pN(`,; `),_N=pN(/[^\n\r]/u),vN=e=>e===`
354
- `||e===`\r`||e===`\u2028`||e===`\u2029`;function yN(e,t,n){let r=!!n?.backwards;if(t===!1)return!1;let i=e.charAt(t);if(r){if(e.charAt(t-1)===`\r`&&i===`
355
- `)return t-2;if(vN(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===`
356
- `)return t+2;if(vN(i))return t+1}return t}var bN=yN;function xN(e,t,n={}){let r=hN(e,n.backwards?t-1:t,n);return r!==bN(e,r,n)}var SN=xN;function CN(e){return Array.isArray(e)&&e.length>0}var wN=CN;function*TN(e,t){let{getVisitorKeys:n,filter:r=()=>!0}=t,i=e=>fN(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*EN(e,t){let n=[e];for(let e=0;e<n.length;e++){let r=n[e];for(let e of TN(r,t))yield e,n.push(e)}}function DN(e,t){return TN(e,t).next().done}function ON(e,t,n){let{cache:r}=n;if(r.has(e))return r.get(e);let{filter:i}=n;if(!i)return[];let a,o=(n.getChildren?.(e,n)??[...TN(e,{getVisitorKeys:n.getVisitorKeys})]).flatMap(r=>(a??=[e,...t],i(r,a)?[r]:ON(r,a,n))),{locStart:s,locEnd:c}=n;return o.sort((e,t)=>s(e)-s(t)||c(e)-c(t)),r.set(e,o),o}var kN=ON;function AN(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 jN(e,t){(e.comments??=[]).push(t),t.printed=!1,t.nodeDescription=AN(e)}function MN(e,t){t.leading=!0,t.trailing=!1,jN(e,t)}function NN(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),jN(e,t)}function PN(e,t){t.leading=!1,t.trailing=!0,jN(e,t)}var FN=new WeakMap;function IN(e,t,n,r,i=[]){let{locStart:a,locEnd:o}=n,s=a(t),c=o(t),l=kN(e,i,{cache:FN,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 IN(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=UN(e,t,n);u&&UN(e,u,n)!==i&&(u=null),d&&UN(e,d,n)!==i&&(d=null)}return{enclosingNode:r,precedingNode:u,followingNode:d}}var LN=()=>!1;function RN(e,t){let{comments:n}=e;if(delete e.comments,!wN(n)||!t.printer.canAttachComment)return;let r=[],{printer:{features:{experimental_avoidAstMutation:i},handleComments:a={}},originalText:o}=t,{ownLine:s=LN,endOfLine:c=LN,remaining:l=LN}=a,u=n.map((r,i)=>({...IN(e,r,t),comment:r,text:o,options:t,ast:e,isLastComment:n.length-1===i}));for(let[e,t]of u.entries()){let{comment:n,precedingNode:a,enclosingNode:o,followingNode:d,text:f,options:p,ast:m,isLastComment:h}=t,g;if(i?g=[t]:(n.enclosingNode=o,n.precedingNode=a,n.followingNode=d,g=[n,f,p,m,h]),BN(f,p,u,e))n.placement=`ownLine`,s(...g)||(d?MN(d,n):a?PN(a,n):NN(o||m,n));else if(VN(f,p,u,e))n.placement=`endOfLine`,c(...g)||(a?PN(a,n):d?MN(d,n):NN(o||m,n));else if(n.placement=`remaining`,!l(...g)){if(a&&d){let e=r.length;e>0&&r[e-1].followingNode!==d&&HN(r,p),r.push(t)}else a?PN(a,n):d?MN(d,n):NN(o||m,n)}}if(HN(r,t),!i)for(let e of n)delete e.precedingNode,delete e.enclosingNode,delete e.followingNode}var zN=e=>!/[\S\n\u2028\u2029]/u.test(e);function BN(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||!zN(e.slice(s(r),c)))break;c=o(r)}return SN(e,c,{backwards:!0})}function VN(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||!zN(e.slice(c,o(r))))break;c=s(r)}return SN(e,c)}function HN(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(]*$/u.test(s))a=t.locStart(n);else break}for(let[t,{comment:n}]of e.entries())t<o?PN(r,n):MN(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 UN(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 WN(e,t){let n=t-1;n=hN(e,n,{backwards:!0}),n=bN(e,n,{backwards:!0}),n=hN(e,n,{backwards:!0});let r=bN(e,n,{backwards:!0});return n!==r}var GN=WN;function KN(e,t){let n=e.node;return n.printed=!0,t.printer.printComment(e,t)}function qN(e,t){let n=e.node,r=[KN(e,t)],{printer:i,originalText:a,locStart:o,locEnd:s}=t;if(i.isBlockComment?.(n)){let e=SN(a,s(n))?SN(a,o(n),{backwards:!0})?NM:AM:` `;r.push(e)}else r.push(NM);let c=bN(a,hN(a,s(n)));return c!==!1&&SN(a,c)&&r.push(NM),r}function JN(e,t,n){let r=e.node,i=KN(e,t),{printer:a,originalText:o,locStart:s}=t,c=a.isBlockComment?.(r);return n?.hasLineSuffix&&!n?.isBlock||SN(o,s(r),{backwards:!0})?{doc:IM([NM,GN(o,s(r))?NM:``,i]),isBlock:c,hasLineSuffix:!0}:!c||n?.hasLineSuffix?{doc:[IM([` `,i]),xM],isBlock:c,hasLineSuffix:!0}:{doc:[` `,i],isBlock:c,hasLineSuffix:!1}}function YN(e,t){let n=e.node;if(!n)return{};let r=t[Symbol.for(`printedComments`)];if((n.comments||[]).filter(e=>!r.has(e)).length===0)return{leading:``,trailing:``};let i=[],a=[],o;return e.each(()=>{let n=e.node;if(r?.has(n))return;let{leading:s,trailing:c}=n;s?i.push(qN(e,t)):c&&(o=JN(e,t,o),a.push(o.doc))},`comments`),{leading:i,trailing:a}}function XN(e,t,n){let{leading:r,trailing:i}=YN(e,n);return!r&&!i?t:uM(t,e=>[r,e,i])}function ZN(e){let{[Symbol.for(`comments`)]: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 QN=()=>sj,$N=class extends Error{name=`ConfigError`},eP=class extends Error{name=`UndefinedParserError`},tP={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
343
+ \r `),vD=e=>e===``||e===Z||e===$||e===Q;function yD(e,t,n){let{node:r}=e;if(r.type===`JSXElement`&&LD(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=>zD(e)?{type:`JSXText`,value:` `,raw:` `}:e);let o=r.children.some(Vy),s=r.children.filter(e=>e.type===`JSXExpressionContainer`).length>1,c=r.type===`JSXElement`&&r.openingElement.attributes.length>1,l=HS(i)||o||c||s,u=e.parent.rootMarker===`mdx`,d=t.singleQuote?`{' '}`:`{" "}`,f=u?Z:Y([d,Q],` `),p=bD(e,t,n,f,r.openingElement?.name?.name===`fbt`),m=r.children.some(e=>RD(e));for(let e=p.length-2;e>=0;e--){let t=p[e]===``&&p[e+1]===``,n=p[e]===$&&p[e+1]===``&&p[e+2]===$,r=(p[e]===Q||p[e]===$)&&p[e+1]===``&&p[e+2]===f,i=p[e]===f&&p[e+1]===``&&(p[e+2]===Q||p[e+2]===$),a=p[e]===f&&p[e+1]===``&&p[e+2]===f,o=p[e]===Q&&p[e+1]===``&&p[e+2]===$||p[e]===$&&p[e+1]===``&&p[e+2]===Q;n&&m||t||r||a||o?p.splice(e,2):i&&p.splice(e+1,2)}for(;p.length>0&&vD(lv(0,p,-1));)p.pop();for(;p.length>1&&vD(p[0])&&vD(p[1]);)p.shift(),p.shift();let h=[``];for(let[e,t]of p.entries()){if(t===f){if(e===1&&$S(p[e-1])){if(p.length===2){h.push([h.pop(),d]);continue}h.push([d,$],``);continue}if(e===p.length-1){h.push([h.pop(),d]);continue}if(p[e-1]===``&&p[e-2]===$){h.push([h.pop(),d]);continue}}e%2==0?h.push([h.pop(),t]):h.push(t,``),HS(t)&&(l=!0)}let g=m?uC(h):J(h,{shouldBreak:!0});if(t.cursorNode?.type===`JSXText`&&r.children.includes(t.cursorNode)?g=[lC,g,lC]:t.nodeBeforeCursor?.type===`JSXText`&&r.children.includes(t.nodeBeforeCursor)?g=[lC,g]:t.nodeAfterCursor?.type===`JSXText`&&r.children.includes(t.nodeAfterCursor)&&(g=[g,lC]),u)return g;let _=J([i,q([$,g]),$,a]);return l?_:dC([J([i,...p,a]),_])}function bD(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=dy(e);if(RD(e)){let o=_D.split(n,!0);o[0]===``&&(o.shift(),/\n/u.test(o[0])?c(SD(i,o[1],e,t)):c(r),o.shift());let l;if(lv(0,o,-1)===``&&(o.pop(),l=o.pop()),o.length===0)return;for(let[e,t]of o.entries())e%2==1?c(Z):s(t);l===void 0?c(xD(i,a,e,t)):/\n/u.test(l)?c(SD(i,a,e,t)):c(r)}else/\n/u.test(n)?n.match(/\n/gu).length>1&&c($):c(r)}else if(s(n()),t&&RD(t)){let n=_D.trim(dy(t)),[r]=_D.split(n);c(xD(i,r,e,t))}else c($)},`children`),o}function xD(e,t,n,r){return e?``:n.type===`JSXElement`&&!n.closingElement||r?.type===`JSXElement`&&!r.closingElement?t.length===1?Q:$:Q}function SD(e,t,n,r){return e?$:t.length===1?n.type===`JSXElement`&&!n.closingElement||r?.type===`JSXElement`&&!r.closingElement?$:Q:$}var CD=W([`ArrayExpression`,`JSXAttribute`,`JSXElement`,`JSXExpressionContainer`,`JSXFragment`,`ExpressionStatement`,`NewExpression`,`CallExpression`,`OptionalCallExpression`,`ConditionalExpression`,`JsExpressionRoot`,`MatchExpressionCase`]);function wD(e,t,n){let{parent:r}=e;if(CD(r))return t;let i=TD(e),a=oT(e,n);return J([a?``:Y(`(`),q([Q,t]),Q,a?``:Y(`)`)],{shouldBreak:i})}function TD(e){return e.match(void 0,(e,t)=>t===`body`&&e.type===`ArrowFunctionExpression`,(e,t)=>t===`arguments`&&eb(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 ED(e,t,n){let{node:r}=e,i=[n(`name`)];if(r.value){let a;if(Ny(r.value)){let n=sv(0,sv(0,dy(r.value).slice(1,-1),`&apos;`,`'`),`&quot;`,`"`),i=Kv(n,t.jsxSingleQuote);n=i===`"`?sv(0,n,`"`,`&quot;`):sv(0,n,`'`,`&apos;`),a=e.call(()=>hT(e,YS(i+n+i),t),`value`)}else a=n(`value`);i.push(`=`,a)}return i}function DD(e,t,n){let{node:r}=e,i=(e,t)=>e.type===`JSXEmptyExpression`||!K(e)&&(Dy(e)||Oy(e)||e.type===`ArrowFunctionExpression`||e.type===`AwaitExpression`&&(i(e.argument,e)||e.argument.type===`JSXElement`)||eb(e)||e.type===`ChainExpression`&&eb(e.expression)||e.type===`FunctionExpression`||e.type===`TemplateLiteral`||e.type===`TaggedTemplateExpression`||e.type===`DoExpression`||Vy(t)&&(e.type===`ConditionalExpression`||Gy(e)));return i(r.expression,e.parent)?J([`{`,n(`expression`),_C,`}`]):J([`{`,q([Q,n(`expression`)]),Q,_C,`}`])}function OD(e,t,n){let{node:r}=e,i=K(r.name)||K(r.typeArguments);if(r.selfClosing&&r.attributes.length===0&&!i)return[`<`,n(`name`),n(`typeArguments`),` />`];if(r.attributes?.length===1&&Ny(r.attributes[0].value)&&!r.attributes[0].value.value.includes(`
344
+ `)&&!i&&!K(r.attributes[0]))return J([`<`,n(`name`),n(`typeArguments`),` `,...e.map(n,`attributes`),r.selfClosing?` />`:`>`]);let a=r.attributes?.some(e=>Ny(e.value)&&e.value.value.includes(`
345
+ `)),o=t.singleAttributePerLine&&r.attributes.length>1?$:Z;return J([`<`,n(`name`),n(`typeArguments`),q(e.map(()=>[o,n()],`attributes`)),...kD(r,t,i)],{shouldBreak:a})}function kD(e,t,n){return e.selfClosing?[Z,`/>`]:AD(e,t,n)?[`>`]:[Q,`>`]}function AD(e,t,n){let r=e.attributes.length>0&&K(lv(0,e.attributes,-1),G.Trailing);return e.attributes.length===0&&!n||(t.bracketSameLine||t.jsxBracketSameLine)&&(!n||e.attributes.length>0)&&!r}function jD(e,t,n){let{node:r}=e,i=[`</`],a=n(`name`);return K(r.name,G.Leading|G.Line)?i.push(q([$,a]),$):K(r.name,G.Leading|G.Block)?i.push(` `,a):i.push(a),i.push(`>`),i}function MD(e,t){let{node:n}=e,r=K(n),i=K(n,G.Line),a=n.type===`JSXOpeningFragment`;return[a?`<`:`</`,q([i?$:r&&!a?` `:``,pT(e,t)]),i?$:``,`>`]}function ND(e,t,n){return wD(e,hT(e,yD(e,t,n),t),t)}function PD(e,t){let{node:n}=e,r=K(n,G.Line);return[pT(e,t,{indent:r}),r?$:``]}function FD(e,t,n){let{node:r}=e;return[`{`,e.call(({node:r})=>{let i=[`...`,n()];return K(r)?[q([Q,hT(e,i,t)]),Q]:i},r.type===`JSXSpreadAttribute`?`argument`:`expression`),`}`]}function ID(e,t,n){let{node:r}=e;if(r.type.startsWith(`JSX`))switch(r.type){case`JSXAttribute`:return ED(e,t,n);case`JSXIdentifier`:return r.name;case`JSXNamespacedName`:return X(`:`,[n(`namespace`),n(`name`)]);case`JSXMemberExpression`:return X(`.`,[n(`object`),n(`property`)]);case`JSXSpreadAttribute`:case`JSXSpreadChild`:return FD(e,t,n);case`JSXExpressionContainer`:return DD(e,t,n);case`JSXFragment`:case`JSXElement`:return ND(e,t,n);case`JSXOpeningElement`:return OD(e,t,n);case`JSXClosingElement`:return jD(e,t,n);case`JSXOpeningFragment`:case`JSXClosingFragment`:return MD(e,t);case`JSXEmptyExpression`:return PD(e,t);case`JSXText`:throw Error(`JSXText should be handled by JSXElement`);default:throw new hD(r,`JSX`)}}function LD(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type===`JSXText`&&!RD(t)}function RD(e){return e.type===`JSXText`&&(_D.hasNonWhitespaceCharacter(dy(e))||!/\n/u.test(dy(e)))}function zD(e){return e.type===`JSXExpressionContainer`&&Ny(e.expression)&&e.expression.value===` `&&!K(e.expression)}function BD(e){let{node:t,parent:n}=e;if(!Vy(t)||!Vy(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`&&!RD(t))){a=t;break}}return a?.type===`JSXExpressionContainer`&&a.expression.type===`JSXEmptyExpression`&&Mb(a.expression)}function VD(e){return Mb(e.node)||BD(e)}var HD=VD;function UD(e,t,n){let{node:r}=e;if(r.type.startsWith(`NG`))switch(r.type){case`NGRoot`:return n(`node`);case`NGPipeExpression`:return LT(e,t,n);case`NGChainedExpression`:return J(X([`;`,Z],e.map(()=>qD(e)?n():[`(`,n(),`)`],`expressions`)));case`NGEmptyExpression`:return``;case`NGMicrosyntax`:return e.map(()=>[e.isFirst?``:WD(e)?` `:[`;`,Z],n()],`body`);case`NGMicrosyntaxKey`:return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/iu.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=WD(e)||GD(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 hD(r,`Angular`)}}function WD({node:e,index:t}){return e.type===`NGMicrosyntaxKeyedExpression`&&e.key.name===`of`&&t===1}function GD(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 KD=W([`CallExpression`,`OptionalCallExpression`,`AssignmentExpression`]);function qD({node:e}){return Sy(e,KD)}function JD(e,t,n){let{node:r}=e;return J([X(Z,e.map(n,`decorators`)),ZD(r,t)?$:Z])}function YD(e,t,n){return QD(e.node)?[X($,e.map(n,`declaration`,`decorators`)),$]:``}function XD(e,t,n){let{node:r,parent:i}=e,{decorators:a}=r;if(!zv(a)||QD(i)||HD(e))return``;let o=r.type===`ClassExpression`||r.type===`ClassDeclaration`||ZD(r,t);return[e.key===`declaration`&&Ey(i)?$:o?cC:``,X(Z,e.map(n,`decorators`)),Z]}function ZD(e,t){return e.decorators.some(e=>jv(t.originalText,H(e)))}function QD(e){if(e.type!==`ExportDefaultDeclaration`&&e.type!==`ExportNamedDeclaration`&&e.type!==`DeclareExportDeclaration`)return!1;let t=e.declaration?.decorators;return zv(t)&&$v(e,t[0])}var $D=new WeakMap;function eO(e){return $D.has(e)||$D.set(e,e.type===`ConditionalExpression`&&!hb(e,e=>e.type===`ObjectExpression`)),$D.get(e)}var tO=e=>e.type===`SequenceExpression`;function nO(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=rO(e,t,n,r);if(i.length===0)i.push(f);else{let{leading:n,trailing:r}=mT(e,t);i.push([n,f]),o.unshift(r)}c&&(s||=d.returnType&&Tb(d).length>0||d.typeParameters||Tb(d).some(e=>e.type!==`Identifier`)),!c||d.body.type!==`ArrowFunctionExpression`?(a=n(`body`,r),l=d.body):e.call(u,`body`)})();let u=!ob(t.originalText,l)&&(tO(l)||iO(l,a,t)||!s&&eO(l)),d=e.key===`callee`&&Ib(e.parent),f=Symbol(`arrow-chain`),p=aO(e,r,{signatureDocs:i,shouldBreak:s}),m=!1,h=!1,g=!1;return c&&(d||r.assignmentLayout)&&(h=!0,g=!K(e.node,G.Leading&G.Line),m=r.assignmentLayout===`chain-tail-arrow-chain`||d&&!u),a=oO(e,t,r,{bodyDoc:a,bodyComments:o,functionBody:l,shouldPutBodyOnSameLine:u}),J([J(h?q([g?Q:``,p]):p,{shouldBreak:m,id:f}),` =>`,c?fC(a,{groupId:f}):J(a),c&&d?Y(Q,``,{groupId:f}):``])}function rO(e,t,n,r){let{node:i}=e,a=[];if(i.async&&a.push(`async `),rD(e,t))a.push(n([`params`,0]));else{let i=r.expandLastArg||r.expandFirstArg,o=iD(e,n);if(i){if(HS(o))throw new gT;o=J(KS(o))}a.push(J([_T(e,t,n,i,!0),o]))}let o=pT(e,t,{filter(e){let n=cx(t.originalText,H(e));return n!==!1&&t.originalText.slice(n,n+2)===`=>`}});return o&&a.push(` `,o),a}function iO(e,t,n){return Dy(e)||Oy(e)||e.type===`ArrowFunctionExpression`||e.type===`DoExpression`||e.type===`BlockStatement`||Vy(e)||t.label?.hug!==!1&&(t.label?.embed||cb(e,n.originalText))}function aO(e,t,{signatureDocs:n,shouldBreak:r}){if(n.length===1)return n[0];let{parent:i,key:a}=e;return a!==`callee`&&Ib(i)||Gy(i)?J([n[0],` =>`,q([Z,X([` =>`,Z],n.slice(1))])],{shouldBreak:r}):a===`callee`&&Ib(i)||t.assignmentLayout?J(X([` =>`,Z],n),{shouldBreak:r}):J(q(X([` =>`,Z],n)),{shouldBreak:r})}function oO(e,t,n,{bodyDoc:r,bodyComments:i,functionBody:a,shouldPutBodyOnSameLine:o}){let{node:s,parent:c}=e,l=n.expandLastArg&&mb(t,`all`)?Y(`,`):``,u=(n.expandLastArg||c.type===`JSXExpressionContainer`)&&!K(s)?Q:``;return o&&eO(a)?[` `,J([Y(``,`(`),q([Q,r]),Y(``,`)`),l,u]),i]:o?[` `,r,i]:[q([Z,r,i]),l,u]}var sO=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}},cO=av(`findLast`,function(){if(Array.isArray(this))return sO});function lO(e,t,n,r){let{node:i}=e,a=[],o=cO(0,i[r],e=>e.type!==`EmptyStatement`);return e.each(({node:e})=>{e.type!==`EmptyStatement`&&(a.push(n()),e!==o&&(a.push($),Fb(e,t)&&a.push($)))},r),a}function uO(e,t,n){let r=dO(e,t,n),{node:i,parent:a}=e;if(i.type===`Program`&&a?.type!==`ModuleExpression`)return r?[r,$]:``;let o=[];if(i.type===`StaticBlock`&&o.push(`static `),o.push(`{`),r)o.push(q([$,r]),$);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===`MatchStatementCase`||i.type===`StaticBlock`||o.push($)}return o.push(`}`),o}function dO(e,t,n){let{node:r}=e,i=zv(r.directives),a=r.body.some(e=>e.type!==`EmptyStatement`),o=K(r,G.Dangling);if(!i&&!a&&!o)return``;let s=[];return i&&(s.push(lO(e,t,n,`directives`)),(a||o)&&(s.push($),Fb(lv(0,r.directives,-1),t)&&s.push($))),a&&s.push(lO(e,t,n,`body`)),o&&s.push(pT(e,t)),s}function fO(e){let t=new WeakMap;return function(n){return t.has(n)||t.set(n,Symbol(e)),t.get(n)}}var pO=fO;function mO(e,t,n){let{node:r}=e,i=[],a=r.type===`ObjectTypeAnnotation`,o=!hO(e),s=o?Z:$,c=K(r,G.Dangling),[l,u]=a&&r.exact?[`{|`,`|}`]:`{}`,d;if(gO(e,({node:r,next:c,isLast:l})=>{if(d??=r,i.push(n()),o&&a){let{parent:n}=e;n.inexact||!l?i.push(`,`):mb(t)&&i.push(Y(`,`))}!o&&(bO({node:r,next:c},t)||SO({node:r,next:c},t))&&i.push(`;`),l||(i.push(s),Fb(r,t)&&i.push($))}),c&&i.push(pT(e,t)),r.type===`ObjectTypeAnnotation`&&r.inexact){let e;e=K(r,G.Dangling)?[K(r,G.Line)||jv(t.originalText,H(lv(0,Pb(r),-1)))?$:Z,`...`]:[d?Z:``,`...`],i.push(e)}if(o){let n=c||t.objectWrap===`preserve`&&d&&fx(t.originalText,V(r),V(d)),a;if(i.length===0)a=l+u;else{let e=t.bracketSpacing?Z:Q;a=[l,q([e,...i]),e,u]}return e.match(void 0,(e,t)=>t===`typeAnnotation`,(e,t)=>t===`typeAnnotation`,CT)||e.match(void 0,(e,t)=>e.type===`FunctionTypeParam`&&t===`typeAnnotation`,CT)?a:J(a,{shouldBreak:n})}return[l,i.length>0?[q([$,i]),$]:``,u]}function hO(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`}function gO(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===`ObjectTypeAnnotation`){let n=[`properties`,`indexers`,`callProperties`,`internalSlots`].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 _O(e,t){let{parent:n}=e;return e.callParent(hO)?t.semi||n.type===`ObjectTypeAnnotation`?`;`:``:n.type===`TSTypeLiteral`?e.isLast?t.semi?Y(`;`):``:t.semi||SO({node:e.node,next:e.next},t)?`;`:Y(``,`;`):``}var vO=W([`ClassProperty`,`PropertyDefinition`,`ClassPrivateProperty`,`ClassAccessorProperty`,`AccessorProperty`,`TSAbstractPropertyDefinition`,`TSAbstractAccessorProperty`]),yO=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 bO({node:e,next:t},n){if(n.semi||!vO(e))return!1;if(!e.value&&yO(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(vO(t)&&t.variance&&!t.static&&!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 xO=W([`TSPropertySignature`]);function SO({node:e,next:t},n){return n.semi||!xO(e)?!1:yO(e)?!0:t?t.type===`TSCallSignatureDeclaration`:!1}var CO=pO(`heritageGroup`),wO=W([`TSInterfaceDeclaration`,`DeclareInterface`,`InterfaceDeclaration`,`InterfaceTypeAnnotation`]);function TO(e,t,n){let{node:r}=e,i=wO(r),a=[DT(e),kT(e),i?`interface`:`class`],o=AO(e),s=[],c=[];if(r.type!==`InterfaceTypeAnnotation`){r.id&&s.push(` `);for(let i of[`id`,`typeParameters`])if(r[i]){let{leading:r,trailing:a}=e.call(()=>mT(e,t),i);s.push(r,n(i),q(a))}}if(r.superClass){let i=[MO(e,t,n),n(r.superTypeArguments?`superTypeArguments`:`superTypeParameters`)],a=e.call(()=>[`extends `,hT(e,i,t)],`superClass`);o?c.push(Z,J(a)):c.push(` `,a)}else c.push(jO(e,t,n,`extends`));c.push(jO(e,t,n,`mixins`),jO(e,t,n,`implements`));let l;return o?(l=CO(r),a.push(J([...s,q(c)],{id:l}))):a.push(...s,...c),!i&&o&&EO(r.body)?a.push(Y($,` `,{groupId:l})):a.push(` `),a.push(n(`body`)),a}function EO(e){return e.type===`ObjectTypeAnnotation`?[`properties`,`indexers`,`callProperties`,`internalSlots`].some(t=>zv(e[t])):zv(e.body)}function DO(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 OO(e){let{node:t}=e;if(K(t.id,G.Trailing)||K(t.typeParameters,G.Trailing)||K(t.superClass)||DO(t))return!0;if(t.superClass)return e.parent.type!==`AssignmentExpression`&&!(t.superTypeArguments??t.superTypeParameters)&&tb(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`)&&tb(n.expression)&&!n.typeArguments:!1}var kO=new WeakMap;function AO(e){let{node:t}=e;return kO.has(t)||kO.set(t,OO(e)),kO.get(t)}function jO(e,t,n,r){let{node:i}=e;if(!zv(i[r]))return``;let a=pT(e,t,{marker:r}),o=X([`,`,Z],e.map(n,r));if(!DO(i)){let t=[`${r} `,a,o];return AO(e)?[Z,J(t)]:[` `,t]}return[Z,a,a&&$,r,J(q([Z,o]))]}function MO(e,t,n){let r=n(`superClass`),{parent:i}=e;return i.type===`AssignmentExpression`?J(Y([`(`,q([Q,r]),Q,`)`],r)):r}function NO(e,t,n){let{node:r}=e,i=[];return zv(r.decorators)&&i.push(JD(e,t,n)),i.push(jT(r)),r.static&&i.push(`static `),i.push(kT(e)),r.override&&i.push(`override `),i.push(eD(e,t,n)),i}function PO(e,t,n){let{node:r}=e,i=[];return zv(r.decorators)&&i.push(JD(e,t,n)),i.push(DT(e),jT(r)),r.static&&i.push(`static `),i.push(kT(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(XE(e,t,n),wT(e),TT(e),YT(e,n)),[DE(e,t,n,i,` =`,r.type===`TSAbstractPropertyDefinition`||r.type===`TSAbstractAccessorProperty`?void 0:`value`),t.semi?`;`:``]}var FO=W([`TSAsExpression`,`TSTypeAssertion`,`TSNonNullExpression`,`TSInstantiationExpression`,`TSSatisfiesExpression`]);function IO(e){return FO(e)?IO(e.expression):e}var LO=W([`FunctionExpression`,`ArrowFunctionExpression`]);function RO(e){return e.type===`MemberExpression`||e.type===`OptionalMemberExpression`||e.type===`Identifier`&&e.name!==`undefined`}function zO(e,t){if(mD(e,t)){let t=IO(e.node.expression);return LO(t)||RO(t)}return!(!t.semi||fD(e,t)||pD(e,t))}function BO(e,t,n){return[n(`expression`),zO(e,t)?`;`:``]}function VO(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=X([`,`,Z],r);return t.__isVueForBindingLeft?[`(`,q([Q,J(i)]),Q,`)`]:i}if(t.__isEmbeddedTypescriptGenericParameters){let t=e.map(n,`program`,`body`,0,`typeParameters`,`params`);return X([`,`,Z],t)}}function HO(e,t){let{node:n}=e;switch(n.type){case`RegExpLiteral`:return GO(n);case`BigIntLiteral`:return WO(n.extra.raw);case`NumericLiteral`:return FT(n.extra.raw);case`StringLiteral`:return YS(Zv(n.extra.raw,t));case`NullLiteral`:return`null`;case`BooleanLiteral`:return String(n.value);case`DirectiveLiteral`:return qO(n.extra.raw,t);case`Literal`:{if(n.regex)return GO(n.regex);if(n.bigint)return WO(n.raw);let{value:r}=n;return typeof r==`number`?FT(n.raw):typeof r==`string`?UO(e)?qO(n.raw,t):YS(Zv(n.raw,t)):String(r)}}}function UO(e){if(e.key!==`expression`)return;let{parent:t}=e;return t.type===`ExpressionStatement`&&typeof t.directive==`string`}function WO(e){return e.toLowerCase()}function GO({pattern:e,flags:t}){return t=[...t].sort().join(``),`/${e}/${t}`}var KO=`use strict`;function qO(e,t){let n=e.slice(1,-1);if(n===KO||!(n.includes(`"`)||n.includes(`'`))){let e=t.singleQuote?`'`:`"`;return e+n+e}return e}function JO(e,t,n){let r=e.originalText.slice(t,n);for(let i of e[Symbol.for(`comments`)]){let e=V(i);if(e>n)break;let a=H(i);if(a<t)continue;let o=e-t,s=a-t;r=r.slice(0,o)+sv(0,r.slice(o,s),/[^\n]/gu,` `)+r.slice(s)}return r}var YO=JO,XO=W([`ImportDeclaration`,`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`ExportAllDeclaration`,`DeclareExportDeclaration`,`DeclareExportAllDeclaration`]),ZO=W([`EnumBooleanBody`,`EnumNumberBody`,`EnumBigIntBody`,`EnumStringBody`,`EnumSymbolBody`]);function QO(e,t,n){let{node:r,parent:i}=e,a=ZO(r),o=r.type===`TSEnumBody`||a,s=XO(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&&$O(r,u[0],t),f=[],p=e.map(({node:e})=>{let r=[...f,J(n())];return f=[`,`,Z],Fb(e,t)&&f.push($),r},l);if(c){let n;if(K(r,G.Dangling)){let i=K(r,G.Line);n=[pT(e,t),i||jv(t.originalText,H(lv(0,Pb(r),-1)))?$:Z,`...`]}else n=[`...`];p.push([...f,...n])}let m=!(c||lv(0,u,-1)?.type===`RestElement`),h;if(p.length===0){if(!K(r,G.Dangling))return[`{}`,YT(e,n)];h=J([`{`,pT(e,t,{indent:!0}),Q,`}`,wT(e),YT(e,n)])}else{let r=t.bracketSpacing?Z:Q;h=[`{`,q([r,...p]),Y(m&&mb(t)?`,`:``),r,`}`,wT(e),YT(e,n)]}return e.match(e=>e.type===`ObjectPattern`&&!zv(e.decorators),CT)||Ly(r)&&(e.match(void 0,(e,t)=>t===`typeAnnotation`,(e,t)=>t===`typeAnnotation`,CT)||e.match(void 0,(e,t)=>e.type===`FunctionTypeParam`&&t===`typeAnnotation`,CT))||!d&&e.match(e=>e.type===`ObjectPattern`,e=>e.type===`AssignmentExpression`||e.type===`VariableDeclarator`)?h:J(h,{shouldBreak:d})}function $O(e,t,n){let r=n.originalText,i=V(e),a=V(t);if(XO(e)){let t=V(e);i=t+YO(n,t,a).lastIndexOf(`{`)}return fx(r,i,a)}function ek(e,t,n){let{node:r}=e;return[`import`,r.phase?` ${r.phase}`:``,ok(r),lk(e,t,n),ck(e,t,n),pk(e,t,n),t.semi?`;`:``]}var tk=e=>e.type===`ExportDefaultDeclaration`||e.type===`DeclareExportDeclaration`&&e.default;function nk(e,t,n){let{node:r}=e,i=[YD(e,t,n),DT(e),`export`,tk(r)?` default`:``],{declaration:a,exported:o}=r;return K(r,G.Dangling)&&(i.push(` `,pT(e,t)),lb(r)&&i.push($)),a?i.push(` `,n(`declaration`)):(i.push(sk(r)),r.type===`ExportAllDeclaration`||r.type===`DeclareExportAllDeclaration`?(i.push(` *`),o&&i.push(` as `,n(`exported`))):i.push(lk(e,t,n)),i.push(ck(e,t,n),pk(e,t,n))),i.push(ik(r,t)),i}var rk=W([`ClassDeclaration`,`ComponentDeclaration`,`FunctionDeclaration`,`TSInterfaceDeclaration`,`DeclareClass`,`DeclareComponent`,`DeclareFunction`,`DeclareHook`,`HookDeclaration`,`TSDeclareFunction`,`EnumDeclaration`]);function ik(e,t){return t.semi&&(!e.declaration||tk(e)&&!rk(e.declaration))?`;`:``}function ak(e,t=!0){return e&&e!==`value`?`${t?` `:``}${e}${t?``:` `}`:``}function ok(e,t){return ak(e.importKind,t)}function sk(e){return ak(e.exportKind)}function ck(e,t,n){let{node:r}=e;return r.source?[uk(r,t)?` from`:``,` `,n(`source`)]:``}function lk(e,t,n){let{node:r}=e;if(!uk(r,t))return``;let i=[` `];if(zv(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 hD(r,`specifier`)},`specifiers`),i.push(X(`, `,a)),o.length>0&&(a.length>0&&i.push(`, `),o.length>1||a.length>0||r.specifiers.some(e=>K(e))?i.push(J([`{`,q([t.bracketSpacing?Z:Q,X([`,`,Z],o)]),Y(mb(t)?`,`:``),t.bracketSpacing?Z:Q,`}`])):i.push([`{`,t.bracketSpacing?` `:``,...o,t.bracketSpacing?` `:``,`}`]))}else i.push(`{}`);return i}function uk(e,t){return e.type!==`ImportDeclaration`||zv(e.specifiers)||e.importKind===`type`?!0:YO(t,V(e),V(e.source)).trimEnd().endsWith(`from`)}function dk(e,t){if(e.extra?.deprecatedAssertSyntax)return`assert`;let n=YO(t,H(e.source),e.attributes?.[0]?V(e.attributes[0]):H(e)).trimStart();return n.startsWith(`assert`)?`assert`:n.startsWith(`with`)||zv(e.attributes)?`with`:void 0}var fk=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`||Ny(i)&&i.value===`type`)&&Ny(a)&&!K(n)&&!K(i)&&!K(a)};function pk(e,t,n){let{node:r}=e;if(!r.source)return``;let i=dk(r,t);if(!i)return``;let a=QO(e,t,n);return fk(r)&&(a=KS(a)),[` ${i} `,a]}function mk(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&&!hk(r)&&(d=n(s)),[ak(i===`ImportSpecifier`?r.importKind:r.exportKind,!1),u,u&&d?` as `:``,d]}function hk(e){if(e.type!==`ImportSpecifier`&&e.type!==`ExportSpecifier`)return!1;let{local:t,[e.type===`ImportSpecifier`?`imported`:`exported`]:n}=e;if(t.type!==n.type||!ty(t,n))return!1;if(Ny(t))return t.value===n.value&&dy(t)===dy(n);switch(t.type){case`Identifier`:return t.name===n.name;default:return!1}}function gk(e,t){return[`...`,t(`argument`),YT(e,t)]}function _k(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(Vy(r))return!0;r.type===`ConditionalExpression`&&t.push(r)}}return!1}function vk(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?iC(2,s):s}var yk=new Map([[`AssignmentExpression`,`right`],[`VariableDeclarator`,`init`],[`ReturnStatement`,`argument`],[`ThrowStatement`,`argument`],[`UnaryExpression`,`argument`],[`YieldExpression`,`argument`],[`AwaitExpression`,`argument`]]);function bk(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(i.type===`ChainExpression`&&i.expression===r||eb(i)&&i.callee===r||tb(i)&&i.object===r||i.type===`TSNonNullExpression`&&i.expression===r){r=i;continue}i.type===`NewExpression`&&i.callee===r||Rb(i)&&i.expression===r?(n=e.getParentNode(t+1),r=i):n=i}return r!==t&&n[yk.get(n.type)]===r}function xk(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&&(Vy(r[s[0]])||Vy(c)||Vy(l)||_k(y))){d=!0,m=!0;let e=e=>[Y(`(`),q([Q,e]),Q,Y(`)`)],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?q(n(e)):iC(2,n(e)),i=[Z,`? `,c.type===r.type?Y(``,`(`):``,e(a),c.type===r.type?Y(``,`)`):``,Z,`: `,e(o)];u.push(f.type!==r.type||f[o]===r||p?i:t.useTabs?oC(q(i)):iC(Math.max(0,t.tabWidth-2),i))}let b=e=>f===v?J(e):e,x=!d&&(tb(f)||f.type===`NGPipeExpression`&&f.left===r)&&!f.computed,S=bk(e),C=b([vk(e,t,n),m?u:q(u),i&&x&&!S?Q:``]);return p||S?J([q([Q,C]),Q]):C}function Sk(e,t){return(tb(t)||t.type===`NGPipeExpression`&&t.left===e)&&!t.computed}function Ck(e,t,n,r){return[...e.map(e=>Pb(e)),Pb(t),Pb(n)].flat().some(e=>fy(e)&&fx(r.originalText,V(e),H(e)))}var wk=new Map([[`AssignmentExpression`,`right`],[`VariableDeclarator`,`init`],[`ReturnStatement`,`argument`],[`ThrowStatement`,`argument`],[`UnaryExpression`,`argument`],[`YieldExpression`,`argument`],[`AwaitExpression`,`argument`]]);function Tk(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(i.type===`ChainExpression`&&i.expression===r||eb(i)&&i.callee===r||tb(i)&&i.object===r||i.type===`TSNonNullExpression`&&i.expression===r){r=i;continue}i.type===`NewExpression`&&i.callee===r||Rb(i)&&i.expression===r?(n=e.getParentNode(t+1),r=i):n=i}return r!==t&&n[wk.get(n.type)]===r}var Ek=e=>[Y(`(`),q([Q,e]),Q,Y(`)`)];function Dk(e,t,n,r){if(!t.experimentalTernaries)return xk(e,t,n);let{node:i}=e,a=i.type===`ConditionalExpression`,o=Vb(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 w=x||p,T=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`),ee=(p.type===`ReturnStatement`||p.type===`ThrowStatement`)&&!(_||v),E=a&&w.type===`JSXExpressionContainer`&&e.grandparent.type!==`JSXAttribute`,te=Tk(e),D=Sk(i,p),ne=o&&oT(e,t),re=b?t.useTabs?` `:` `.repeat(t.tabWidth-1):``,O=Ck(f,u,d,t)||_||v,ie=!y&&!m&&!o&&(E?u.type===`NullLiteral`||u.type===`Literal`&&u.value===null:ab(u,t)&&nb(i.test,3)),ae=y||g||o&&!m||m&&a&&nb(i.test,1)||ie,oe=[];!_&&K(u,G.Dangling)&&e.call(()=>{oe.push(pT(e,t),$)},`consequent`);let se=[];K(i.test,G.Dangling)&&e.call(()=>{se.push(pT(e,t))},`test`),!v&&K(d,G.Dangling)&&e.call(()=>{se.push(pT(e,t))},`alternate`),K(i,G.Dangling)&&se.push(pT(e,t));let ce=Symbol(`test`),le=Symbol(`consequent`),ue=Symbol(`test-and-consequent`),de=J([a?[Ek(n(`test`)),i.test.type===`ConditionalExpression`?cC:``]:[n(`checkType`),` `,`extends`,` `,Vb(i.extendsType)||i.extendsType.type===`TSMappedType`?n(`extendsType`):J(Ek(n(`extendsType`)))],` ?`],{id:ce}),fe=n(s),pe=q([_||E&&(Vy(u)||m||y)?$:Z,oe,fe]),me=ae?J([de,y?pe:Y(pe,J(pe,{id:le}),{groupId:ce})],{id:ue}):[de,pe],he=n(c),ge=ie?Y(he,oC(Ek(he)),{groupId:ue}):he,_e=[me,se.length>0?[q([$,se]),$]:v?$:ie?Y(Z,` `,{groupId:ue}):Z,`:`,v?` `:b?ae?Y(re,Y(y||ie?` `:re,` `),{groupId:ue}):Y(re,` `):` `,v?ge:J([q(ge),E&&!ie?Q:``]),D&&!te?Q:``,O?cC:``];return T&&!O?J(q([Q,J(_e)])):T||ee?J(q(_e)):te||o&&h?J([q([Q,_e]),ne?Q:``]):p===w?J(_e):_e}function Ok(e,t,n,r){let{node:i}=e;if(Fy(i))return HO(e,t);switch(i.type){case`JsExpressionRoot`:return n(`node`);case`JsonRoot`:return[pT(e,t),n(`node`),$];case`File`:return VO(e,t,n)??n(`program`);case`ExpressionStatement`:return BO(e,t,n);case`ChainExpression`:return n(`expression`);case`ParenthesizedExpression`:return!K(i.expression)&&(Oy(i.expression)||Dy(i.expression))?[`(`,n(`expression`),`)`]:J([`(`,q([Q,n(`expression`)]),Q,`)`]);case`AssignmentExpression`:return OE(e,t,n);case`VariableDeclarator`:return kE(e,t,n);case`BinaryExpression`:case`LogicalExpression`:return LT(e,t,n);case`AssignmentPattern`:return[n(`left`),` = `,n(`right`)];case`OptionalMemberExpression`:case`MemberExpression`:return vE(e,t,n);case`MetaProperty`:return[n(`meta`),`.`,n(`property`)];case`BindExpression`:return mE(e,t,n);case`Identifier`:return[i.name,wT(e),TT(e),YT(e,n)];case`V8IntrinsicIdentifier`:return[`%`,i.name];case`SpreadElement`:return gk(e,n);case`RestElement`:return gk(e,n);case`FunctionDeclaration`:case`FunctionExpression`:return $E(e,t,n,r);case`ArrowFunctionExpression`:return nO(e,t,n,r);case`YieldExpression`:return[`yield${i.delegate?`*`:``}`,i.argument?[` `,n(`argument`)]:``];case`AwaitExpression`:{let t=[`await`];if(i.argument){t.push(` `,n(`argument`));let{parent:r}=e;if(eb(r)&&r.callee===i||tb(r)&&r.object===i){t=[q([Q,...t]),Q];let n=e.findAncestor(e=>e.type===`AwaitExpression`||e.type===`BlockStatement`);if(n?.type!==`AwaitExpression`||!hb(n.argument,e=>e===i))return J(t)}}return t}case`ExportDefaultDeclaration`:case`ExportNamedDeclaration`:case`ExportAllDeclaration`:return nk(e,t,n);case`ImportDeclaration`:return ek(e,t,n);case`ImportSpecifier`:case`ExportSpecifier`:case`ImportNamespaceSpecifier`:case`ExportNamespaceSpecifier`:case`ImportDefaultSpecifier`:case`ExportDefaultSpecifier`:return mk(e,t,n);case`ImportAttribute`:return ZE(e,t,n);case`Program`:case`BlockStatement`:case`StaticBlock`:return uO(e,t,n);case`ClassBody`:return mO(e,t,n);case`ThrowStatement`:return sD(e,t,n);case`ReturnStatement`:return oD(e,t,n);case`NewExpression`:case`ImportExpression`:case`OptionalCallExpression`:case`CallExpression`:return SE(e,t,n);case`ObjectExpression`:case`ObjectPattern`:return QO(e,t,n);case`Property`:return Hy(i)?eD(e,t,n):ZE(e,t,n);case`ObjectProperty`:return ZE(e,t,n);case`ObjectMethod`:return eD(e,t,n);case`Decorator`:return[`@`,n(`expression`)];case`ArrayExpression`:case`ArrayPattern`:return $T(e,t,n);case`SequenceExpression`:{let{parent:t}=e;if(t.type===`ExpressionStatement`||t.type===`ForStatement`){let t=[];return e.each(({isFirst:e})=>{e?t.push(n()):t.push(`,`,q([Z,n()]))},`expressions`),J(t)}let r=X([`,`,Z],e.map(n,`expressions`));return(t.type===`ReturnStatement`||t.type===`ThrowStatement`)&&e.key===`argument`||t.type===`ArrowFunctionExpression`&&e.key===`body`?J(Y([q([Q,r]),Q],r)):J(r)}case`ThisExpression`:return`this`;case`Super`:return`super`;case`Directive`:return[n(`value`),t.semi?`;`:``];case`UnaryExpression`:{let e=[i.operator];return/[a-z]$/u.test(i.operator)&&e.push(` `),K(i.argument)?e.push(J([`(`,q([Q,n(`argument`)]),Q,`)`])):e.push(n(`argument`)),e}case`UpdateExpression`:return[i.prefix?i.operator:``,n(`argument`),i.prefix?``:i.operator];case`ConditionalExpression`:return Dk(e,t,n,r);case`VariableDeclaration`:{let r=e.map(n,`declarations`),a=e.parent,o=a.type===`ForStatement`||a.type===`ForInStatement`||a.type===`ForOfStatement`,s=i.declarations.some(e=>e.init),c;return r.length===1&&!K(i.declarations[0])?c=r[0]:r.length>0&&(c=q(r[0])),J([DT(e),i.kind,c?[` `,c]:``,q(r.slice(1).map(e=>[`,`,s&&!o?$:Z,e])),t.semi&&!(o&&a.body!==i)?`;`:``])}case`WithStatement`:return J([`with (`,n(`object`),`)`,AT(i.body,n(`body`))]);case`IfStatement`:{let r=AT(i.consequent,n(`consequent`)),a=[J([`if (`,J([q([Q,n(`test`)]),Q]),`)`,r])];if(i.alternate){let r=K(i.consequent,G.Trailing|G.Line)||lb(i),o=i.consequent.type===`BlockStatement`&&!r;a.push(o?` `:$),K(i,G.Dangling)&&a.push(pT(e,t),r?$:` `),a.push(`else`,J(AT(i.alternate,n(`alternate`),i.alternate.type===`IfStatement`)))}return a}case`ForStatement`:{let r=AT(i.body,n(`body`)),a=pT(e,t),o=a?[a,Q]:``;return!i.init&&!i.test&&!i.update?[o,J([`for (;;)`,r])]:[o,J([`for (`,J([q([Q,n(`init`),`;`,Z,n(`test`),`;`,i.update?[Z,n(`update`)]:Y(``,Z)]),Q]),`)`,r])]}case`WhileStatement`:return J([`while (`,J([q([Q,n(`test`)]),Q]),`)`,AT(i.body,n(`body`))]);case`ForInStatement`:return J([`for (`,n(`left`),` in `,n(`right`),`)`,AT(i.body,n(`body`))]);case`ForOfStatement`:return J([`for`,i.await?` await`:``,` (`,n(`left`),` of `,n(`right`),`)`,AT(i.body,n(`body`))]);case`DoWhileStatement`:return[J([`do`,AT(i.body,n(`body`))]),i.body.type===`BlockStatement`?` `:$,`while (`,J([q([Q,n(`test`)]),Q]),`)`,t.semi?`;`:``];case`DoExpression`:return[i.async?`async `:``,`do `,n(`body`)];case`BreakStatement`:case`ContinueStatement`:return[i.type===`BreakStatement`?`break`:`continue`,i.label?[` `,n(`label`)]:``,t.semi?`;`:``];case`LabeledStatement`:return[n(`label`),`:${i.body.type===`EmptyStatement`&&!K(i.body,G.Leading)?``:` `}`,n(`body`)];case`TryStatement`:return[`try `,n(`block`),i.handler?[` `,n(`handler`)]:``,i.finalizer?[` finally `,n(`finalizer`)]:``];case`CatchClause`:if(i.param){let e=K(i.param,e=>!fy(e)||e.leading&&jv(t.originalText,H(e))||e.trailing&&jv(t.originalText,V(e),{backwards:!0})),r=n(`param`);return[`catch `,e?[`(`,q([Q,r]),Q,`) `]:[`(`,r,`) `],n(`body`)]}return[`catch `,n(`body`)];case`SwitchStatement`:return[J([`switch (`,q([Q,n(`discriminant`)]),Q,`)`]),` {`,i.cases.length>0?q([$,X($,e.map(({node:e,isLast:r})=>[n(),!r&&Fb(e,t)?$:``],`cases`))]):``,$,`}`];case`SwitchCase`:{let r=[];i.test?r.push(`case `,n(`test`),`:`):r.push(`default:`),K(i,G.Dangling)&&r.push(` `,pT(e,t));let a=i.consequent.filter(e=>e.type!==`EmptyStatement`);if(a.length>0){let i=lO(e,t,n,`consequent`);r.push(a.length===1&&a[0].type===`BlockStatement`?[` `,i]:q([$,i]))}return r}case`DebuggerStatement`:return[`debugger`,t.semi?`;`:``];case`ClassDeclaration`:case`ClassExpression`:return TO(e,t,n);case`ClassMethod`:case`ClassPrivateMethod`:case`MethodDefinition`:return NO(e,t,n);case`ClassProperty`:case`PropertyDefinition`:case`ClassPrivateProperty`:case`ClassAccessorProperty`:case`AccessorProperty`:return PO(e,t,n);case`TemplateElement`:return YS(i.value.raw);case`TemplateLiteral`:return VC(e,t,n);case`TaggedTemplateExpression`:return HC(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(xy(e))return`;`;default:throw new hD(i,`ESTree`)}}function kk(e){return[e(`elementType`),`[]`]}var Ak=W([`SatisfiesExpression`,`TSSatisfiesExpression`]);function jk(e,t,n){let{parent:r,node:i,key:a}=e,o=i.type===`AsConstExpression`?`const`:n(`typeAnnotation`),s=[n(`expression`),` `,Ak(i)?`satisfies`:`as`,` `,o];return a===`callee`&&eb(r)||a===`object`&&tb(r)?J([q([Q,...s]),Q]):s}function Mk(e,t,n){let{node:r}=e,i=[DT(e),`component`];r.id&&i.push(` `,n(`id`)),i.push(n(`typeParameters`));let a=Nk(e,t,n);return r.rendersType?i.push(J([a,` `,n(`rendersType`)])):i.push(J([a])),r.body&&i.push(` `,n(`body`)),t.semi&&r.type===`DeclareComponent`&&i.push(`;`),i}function Nk(e,t,n){let{node:r}=e,i=r.params;if(r.rest&&(i=[...i,r.rest]),i.length===0)return[`(`,pT(e,t,{filter:e=>ux(t.originalText,H(e))===`)`}),`)`];let a=[];return Fk(e,(e,o)=>{let s=o===i.length-1;s&&r.rest&&a.push(`...`),a.push(n()),!s&&(a.push(`,`),Fb(i[o],t)?a.push($,$):a.push(Z))}),[`(`,q([Q,...a]),Y(mb(t,`all`)&&!Pk(r,i)?`,`:``),Q,`)`]}function Pk(e,t){return e.rest||lv(0,t,-1)?.type===`RestElement`}function Fk(e,t){let{node:n}=e,r=0,i=e=>t(e,r++);e.each(i,`params`),n.rest&&e.call(i,`rest`)}function Ik(e,t,n){let{node:r}=e;return r.shorthand?n(`local`):[n(`name`),` as `,n(`local`)]}function Lk(e,t,n){let{node:r}=e,i=[];return r.name&&i.push(n(`name`),r.optional?`?: `:`: `),i.push(n(`typeAnnotation`)),i}function Rk(e,t,n){return QO(e,t,n)}function zk(e,t,n){let{node:r}=e;return[r.type===`EnumSymbolBody`||r.explicitType?`of ${r.type.slice(4,-4).toLowerCase()} `:``,Rk(e,t,n)]}function Bk(e,t){let{node:n}=e,r=t(`id`);n.computed&&(r=[`[`,r,`]`]);let i=``;return n.initializer&&(i=t(`initializer`)),n.init&&(i=t(`init`)),i?[r,` = `,i]:r}function Vk(e,t){let{node:n}=e;return[DT(e),n.const?`const `:``,`enum `,t(`id`),` `,t(`body`)]}function Hk(e,t,n){let{node:r}=e,i=[kT(e)];(r.type===`TSConstructorType`||r.type===`TSConstructSignatureDeclaration`)&&i.push(`new `);let a=_T(e,t,n,!1,!0),o=[];return r.type===`FunctionTypeAnnotation`?o.push(Uk(e)?` => `:`: `,n(`returnType`)):o.push(YT(e,n,`returnType`)),bT(r,o)&&(a=J(a)),i.push(a,o),[J(i),r.type===`TSConstructSignatureDeclaration`||r.type===`TSCallSignatureDeclaration`?_O(e,t):``]}function Uk(e){let{node:t,parent:n}=e;return t.type===`FunctionTypeAnnotation`&&(Uy(n)||!((n.type===`ObjectTypeProperty`||n.type===`ObjectTypeInternalSlot`)&&!n.variance&&!n.optional&&$v(n,t)||n.type===`ObjectTypeCallProperty`||e.getParentNode(2)?.type===`DeclareFunction`))}function Wk(e,t,n){let{node:r}=e,i=[`hook`];r.id&&i.push(` `,n(`id`));let a=_T(e,t,n,!1,!0),o=iD(e,n),s=bT(r,o);return i.push(J([s?J(a):a,o]),r.body?` `:``,n(`body`)),i}function Gk(e,t,n){let{node:r}=e,i=[DT(e),`hook`];return r.id&&i.push(` `,n(`id`)),t.semi&&i.push(`;`),i}function Kk(e){let{node:t}=e;return t.type===`HookTypeAnnotation`&&e.getParentNode(2)?.type===`DeclareHook`}function qk(e,t,n){let{node:r}=e,i=_T(e,t,n,!1,!0),a=[Kk(e)?`: `:` => `,n(`returnType`)];return J([Kk(e)?``:`hook `,bT(r,a)?J(i):i,a])}function Jk(e,t,n){return[n(`objectType`),wT(e),`[`,n(`indexType`),`]`]}function Yk(e,t,n){return[`infer `,n(`typeParameter`)]}function Xk(e,t,n){let r=!1;return J(e.map(({isFirst:e,previous:i,node:a,index:o})=>{let s=n();if(e)return s;let c=Ly(a),l=Ly(i);return l&&c?[` & `,r?q(s):s]:!l&&!c||ob(t.originalText,a)?t.experimentalOperatorPosition===`start`?q([Z,`& `,s]):q([` &`,Z,s]):(o>1&&(r=!0),[` & `,o>1?q(s):s])},`types`))}function Zk(e){switch(e){case null:return``;case`PlusOptional`:return`+?`;case`MinusOptional`:return`-?`;case`Optional`:return`?`}}function Qk(e,t,n){let{node:r}=e;return[J([r.variance?n(`variance`):``,`[`,q([n(`keyTparam`),` in `,n(`sourceType`)]),`]`,Zk(r.optional),`: `,n(`propType`)]),_O(e,t)]}function $k(e,t){return e===`+`||e===`-`?e+t:t}function eA(e,t,n){let{node:r}=e,i=!1;if(t.objectWrap===`preserve`){let e=V(r),n=YO(t,e+1,V(r.key)),a=e+1+n.search(/\S/u);fx(t.originalText,e,a)&&(i=!0)}return J([`{`,q([t.bracketSpacing?Z:Q,K(r,G.Dangling)?J([pT(e,t),$]):``,J([r.readonly?[$k(r.readonly,`readonly`),` `]:``,`[`,n(`key`),` in `,n(`constraint`),r.nameType?[` as `,n(`nameType`)]:``,`]`,r.optional?$k(r.optional,`?`):``,r.typeAnnotation?`: `:``,n(`typeAnnotation`)]),t.semi?Y(`;`):``]),t.bracketSpacing?Z:Q,`}`],{shouldBreak:i})}function tA(e,t,n){let{node:r}=e;return[J([`match (`,q([Q,n(`argument`)]),Q,`)`]),` {`,r.cases.length>0?q([$,X($,e.map(({node:e,isLast:r})=>[n(),!r&&Fb(e,t)?$:``],`cases`))]):``,$,`}`]}function nA(e,t,n){let{node:r}=e,i=K(r,G.Dangling)?[` `,pT(e,t)]:[],a=r.type===`MatchStatementCase`?[` `,n(`body`)]:q([Z,n(`body`),`,`]);return[n(`pattern`),r.guard?J([q([Z,`if (`,n(`guard`),`)`])]):``,J([` =>`,i,a])]}function rA(e,t,n){let{node:r}=e;switch(r.type){case`MatchOrPattern`:return sA(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`)]:[`[`,q([Q,n(`property`)]),Q,`]`];return J([n(`base`),e])}case`MatchBindingPattern`:return[r.kind,` `,n(`id`)];case`MatchObjectPattern`:{let t=e.map(n,`properties`);return r.rest&&t.push(n(`rest`)),J([`{`,q([Q,X([`,`,Z],t)]),r.rest?``:Y(`,`),Q,`}`])}case`MatchArrayPattern`:{let t=e.map(n,`elements`);return r.rest&&t.push(n(`rest`)),J([`[`,q([Q,X([`,`,Z],t)]),r.rest?``:Y(`,`),Q,`]`])}case`MatchObjectPatternProperty`:return r.shorthand?n(`pattern`):J([n(`key`),`:`,q([Z,n(`pattern`)])]);case`MatchRestPattern`:{let e=[`...`];return r.argument&&e.push(n(`argument`)),e}}}var iA=W([`MatchWildcardPattern`,`MatchLiteralPattern`,`MatchUnaryPattern`,`MatchIdentifierPattern`]);function aA(e){let{patterns:t}=e;if(t.some(e=>K(e)))return!1;let n=t.find(e=>e.type===`MatchObjectPattern`);return n?t.every(e=>e===n||iA(e)):!1}function oA(e){return iA(e)||e.type===`MatchObjectPattern`?!0:e.type===`MatchOrPattern`&&aA(e)}function sA(e,t,n){let{node:r}=e,{parent:i}=e,a=i.type!==`MatchStatementCase`&&i.type!==`MatchExpressionCase`&&i.type!==`MatchArrayPattern`&&i.type!==`MatchObjectPatternProperty`&&!ob(t.originalText,r),o=oA(r),s=e.map(()=>{let r=n();return o||(r=iC(2,r)),hT(e,r,t)},`patterns`);if(o)return X(` | `,s);let c=[Y([`| `]),X([Z,`| `],s)];return oT(e,t)?J([q([Y([Q]),c]),Q]):i.type===`MatchArrayPattern`&&i.elements.length>1?J([q([Y([`(`,Q]),c]),Q,Y(`)`)]):J(a?q(c):c)}function cA(e,t,n){let{node:r}=e,i=[DT(e),`opaque type `,n(`id`),n(`typeParameters`)];if(r.supertype&&i.push(`: `,n(`supertype`)),r.lowerBound||r.upperBound){let e=[];r.lowerBound&&e.push(q([Z,`super `,n(`lowerBound`)])),r.upperBound&&e.push(q([Z,`extends `,n(`upperBound`)])),i.push(J(e))}return r.impltype&&i.push(` = `,n(`impltype`)),i.push(t.semi?`;`:``),i}function lA(e,t,n){let{node:r}=e;return[`...`,...r.type===`TupleTypeSpreadElement`&&r.label?[n(`label`),`: `]:[],n(`typeAnnotation`)]}function uA(e,t,n){let{node:r}=e;return[r.variance?n(`variance`):``,n(`label`),r.optional?`?`:``,`: `,n(`elementType`)]}function dA(e,t,n){let{node:r}=e;return[DE(e,t,n,[DT(e),`type `,n(`id`),n(`typeParameters`)],` =`,r.type===`TSTypeAliasDeclaration`?`typeAnnotation`:`right`),t.semi?`;`:``]}function fA(e,t,n){let{node:r}=e;return Tb(r).length===1&&r.type.startsWith(`TS`)&&!r[n][0].constraint&&e.parent.type===`ArrowFunctionExpression`&&!(t.filepath&&/\.ts$/u.test(t.filepath))}function pA(e,t,n,r){let{node:i}=e;if(!i[r])return``;if(!Array.isArray(i[r]))return n(r);let a=Qy(e.grandparent),o=e.match(e=>!(e[r].length===1&&Ly(e[r][0])),void 0,(e,t)=>t===`typeAnnotation`,e=>e.type===`Identifier`,RE);if(i[r].length===0||!o&&(a||i[r].length===1&&(i[r][0].type===`NullableTypeAnnotation`||qT(i[r][0]))))return[`<`,X(`, `,e.map(n,r)),mA(e,t),`>`];let s=i.type===`TSTypeParameterInstantiation`?``:fA(e,t,r)?`,`:mb(t)?Y(`,`):``;return J([`<`,q([Q,X([`,`,Z],e.map(n,r))]),s,Q,`>`])}function mA(e,t){let{node:n}=e;if(!K(n,G.Dangling))return``;let r=!K(n,G.Line),i=pT(e,t,{indent:!r});return r?i:[i,$]}function hA(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(YT(e,n,`bound`))),r.constraint){let e=Symbol(`constraint`);i.push(` extends`,J(q(Z),{id:e}),_C,fC(n(`constraint`),{groupId:e}))}if(r.default){let e=Symbol(`default`);i.push(` =`,J(q(Z),{id:e}),_C,fC(n(`default`),{groupId:e}))}return J(i)}function gA(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 `,YT(e,t)]:``]}function _A({node:e},t){return[`typeof `,t(e.type===`TSTypeQuery`?`exprName`:`argument`),t(`typeArguments`)]}function vA(e,t,n){let{node:r}=e;if(py(r))return r.type.slice(0,-14).toLowerCase();switch(r.type){case`ComponentDeclaration`:case`DeclareComponent`:case`ComponentTypeAnnotation`:return Mk(e,t,n);case`ComponentParameter`:return Ik(e,t,n);case`ComponentTypeParameter`:return Lk(e,t,n);case`HookDeclaration`:return Wk(e,t,n);case`DeclareHook`:return Gk(e,t,n);case`HookTypeAnnotation`:return qk(e,t,n);case`DeclareFunction`:return[DT(e),`function `,n(`id`),n(`predicate`),t.semi?`;`:``];case`DeclareModule`:return[`declare module `,n(`id`),` `,n(`body`)];case`DeclareModuleExports`:return[`declare module.exports`,YT(e,n),t.semi?`;`:``];case`DeclareNamespace`:return[`declare namespace `,n(`id`),` `,n(`body`)];case`DeclareVariable`:return[DT(e),r.kind??`var`,` `,n(`id`),t.semi?`;`:``];case`DeclareExportDeclaration`:case`DeclareExportAllDeclaration`:return nk(e,t,n);case`DeclareOpaqueType`:case`OpaqueType`:return cA(e,t,n);case`DeclareTypeAlias`:case`TypeAlias`:return dA(e,t,n);case`IntersectionTypeAnnotation`:return Xk(e,t,n);case`UnionTypeAnnotation`:return UT(e,t,n);case`ConditionalTypeAnnotation`:return Dk(e,t,n);case`InferTypeAnnotation`:return Yk(e,t,n);case`FunctionTypeAnnotation`:return Hk(e,t,n);case`TupleTypeAnnotation`:return $T(e,t,n);case`TupleTypeLabeledElement`:return uA(e,t,n);case`TupleTypeSpreadElement`:return lA(e,t,n);case`GenericTypeAnnotation`:return[n(`id`),pA(e,t,n,`typeParameters`)];case`IndexedAccessType`:case`OptionalIndexedAccessType`:return Jk(e,t,n);case`TypeAnnotation`:return ZT(e,t,n);case`TypeParameter`:return hA(e,t,n);case`TypeofTypeAnnotation`:return _A(e,n);case`ExistsTypeAnnotation`:return`*`;case`ArrayTypeAnnotation`:return kk(n);case`DeclareEnum`:case`EnumDeclaration`:return Vk(e,n);case`EnumBooleanBody`:case`EnumNumberBody`:case`EnumBigIntBody`:case`EnumStringBody`:case`EnumSymbolBody`:return zk(e,t,n);case`EnumBooleanMember`:case`EnumNumberMember`:case`EnumBigIntMember`:case`EnumStringMember`:case`EnumDefaultedMember`:return Bk(e,n);case`FunctionTypeParam`:{let t=r.name?n(`name`):e.parent.this===r?`this`:``;return[t,wT(e),t?`: `:``,n(`typeAnnotation`)]}case`DeclareClass`:case`DeclareInterface`:case`InterfaceDeclaration`:case`InterfaceTypeAnnotation`:return TO(e,t,n);case`ObjectTypeAnnotation`:return mO(e,t,n);case`ClassImplements`:case`InterfaceExtends`:return[n(`id`),n(`typeParameters`)];case`NullableTypeAnnotation`:return[`?`,n(`typeAnnotation`)];case`Variance`:{let{kind:e}=r;return e===`plus`?`+`:`-`}case`KeyofTypeAnnotation`:return[`keyof `,n(`argument`)];case`ObjectTypeCallProperty`:return[r.static?`static `:``,n(`value`),_O(e,t)];case`ObjectTypeMappedTypeProperty`:return Qk(e,t,n);case`ObjectTypeIndexer`:return[r.static?`static `:``,r.variance?n(`variance`):``,`[`,n(`id`),r.id?`: `:``,n(`key`),`]: `,n(`value`),_O(e,t)];case`ObjectTypeProperty`:{let i=``;return r.proto?i=`proto `:r.static&&(i=`static `),[i,r.kind===`init`?``:r.kind+` `,r.variance?n(`variance`):``,XE(e,t,n),wT(e),Hy(r)?``:`: `,n(`value`),_O(e,t)]}case`ObjectTypeInternalSlot`:return[r.static?`static `:``,`[[`,n(`id`),`]]`,wT(e),r.method?``:`: `,n(`value`),_O(e,t)];case`ObjectTypeSpreadProperty`:return gk(e,n);case`QualifiedTypeofIdentifier`:case`QualifiedTypeIdentifier`:return[n(`qualification`),`.`,n(`id`)];case`NullLiteralTypeAnnotation`:return`null`;case`BooleanLiteralTypeAnnotation`:return String(r.value);case`StringLiteralTypeAnnotation`:return YS(Zv(dy(r),t));case`NumberLiteralTypeAnnotation`:return FT(dy(r));case`BigIntLiteralTypeAnnotation`:return WO(dy(r));case`TypeCastExpression`:return[`(`,n(`expression`),YT(e,n),`)`];case`TypePredicate`:return gA(e,n);case`TypeOperator`:return[r.operator,` `,n(`typeAnnotation`)];case`TypeParameterDeclaration`:case`TypeParameterInstantiation`:return pA(e,t,n,`params`);case`InferredPredicate`:case`DeclaredPredicate`:return[e.key===`predicate`&&e.parent.type!==`DeclareFunction`&&!e.parent.returnType?`: `:` `,`%checks`,...r.type===`DeclaredPredicate`?[`(`,n(`value`),`)`]:[]];case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:return jk(e,t,n);case`MatchExpression`:case`MatchStatement`:return tA(e,t,n);case`MatchExpressionCase`:case`MatchStatementCase`:return nA(e,t,n);case`MatchOrPattern`:case`MatchAsPattern`:case`MatchWildcardPattern`:case`MatchLiteralPattern`:case`MatchUnaryPattern`:case`MatchIdentifierPattern`:case`MatchMemberPattern`:case`MatchBindingPattern`:case`MatchObjectPattern`:case`MatchObjectPatternProperty`:case`MatchRestPattern`:case`MatchArrayPattern`:return rA(e,t,n)}}function yA(e,t,n){let{node:r}=e,i=r.parameters.length>1?Y(mb(t)?`,`:``):``,a=J([q([Q,X([`, `,Q],e.map(n,`parameters`))]),i,Q]);return[e.key===`body`&&e.parent.type===`ClassBody`&&r.static?`static `:``,r.readonly?`readonly `:``,`[`,r.parameters?a:``,`]`,YT(e,n),_O(e,t)]}function bA(e,t,n){let{node:r}=e;return[r.postfix?``:n,YT(e,t),r.postfix?n:``]}function xA(e,t,n){let{node:r}=e,i=[],a=r.kind&&r.kind!==`method`?`${r.kind} `:``;i.push(jT(r),a,r.computed?`[`:``,n(`key`),r.computed?`]`:``,wT(e));let o=_T(e,t,n,!1,!0),s=YT(e,n,`returnType`),c=bT(r,s);return i.push(c?J(o):o),r.returnType&&i.push(J(s)),[J(i),_O(e,t)]}function SA(e,t,n){let{node:r}=e;return[DT(e),r.kind===`global`?``:`${r.kind} `,n(`id`),r.body?[` `,J(n(`body`))]:t.semi?`;`:``]}function CA(e,t,n){let{node:r}=e,i=!(Dy(r.expression)||Oy(r.expression)),a=J([`<`,q([Q,n(`typeAnnotation`)]),Q,`>`]),o=[Y(`(`),q([Q,n(`expression`)]),Q,Y(`)`)];return i?dC([[a,n(`expression`)],[a,J(o,{shouldBreak:!0})],[a,n(`expression`)]]):J([a,n(`expression`)])}function wA(e,t,n){let{node:r}=e;if(r.type.startsWith(`TS`)){if(yy(r))return r.type.slice(2,-7).toLowerCase();switch(r.type){case`TSThisType`:return`this`;case`TSTypeAssertion`:return CA(e,t,n);case`TSDeclareFunction`:return $E(e,t,n);case`TSExportAssignment`:return[`export = `,n(`expression`),t.semi?`;`:``];case`TSModuleBlock`:return uO(e,t,n);case`TSInterfaceBody`:case`TSTypeLiteral`:return mO(e,t,n);case`TSTypeAliasDeclaration`:return dA(e,t,n);case`TSQualifiedName`:return[n(`left`),`.`,n(`right`)];case`TSAbstractMethodDefinition`:case`TSDeclareMethod`:return NO(e,t,n);case`TSAbstractAccessorProperty`:case`TSAbstractPropertyDefinition`:return PO(e,t,n);case`TSInterfaceHeritage`:case`TSClassImplements`:case`TSInstantiationExpression`:return[n(`expression`),n(`typeArguments`)];case`TSTemplateLiteralType`:return VC(e,t,n);case`TSNamedTupleMember`:return uA(e,t,n);case`TSRestType`:return lA(e,t,n);case`TSOptionalType`:return[n(`typeAnnotation`),`?`];case`TSInterfaceDeclaration`:return TO(e,t,n);case`TSTypeParameterDeclaration`:case`TSTypeParameterInstantiation`:return pA(e,t,n,`params`);case`TSTypeParameter`:return hA(e,t,n);case`TSAsExpression`:case`TSSatisfiesExpression`:return jk(e,t,n);case`TSArrayType`:return kk(n);case`TSPropertySignature`:return[r.readonly?`readonly `:``,XE(e,t,n),wT(e),YT(e,n),_O(e,t)];case`TSParameterProperty`:return[jT(r),r.static?`static `:``,r.override?`override `:``,r.readonly?`readonly `:``,n(`parameter`)];case`TSTypeQuery`:return _A(e,n);case`TSIndexSignature`:return yA(e,t,n);case`TSTypePredicate`:return gA(e,n);case`TSNonNullExpression`:return[n(`expression`),`!`];case`TSImportType`:return[SE(e,t,n),r.qualifier?[`.`,n(`qualifier`)]:``,pA(e,t,n,`typeArguments`)];case`TSLiteralType`:return n(`literal`);case`TSIndexedAccessType`:return Jk(e,t,n);case`TSTypeOperator`:return[r.operator,` `,n(`typeAnnotation`)];case`TSMappedType`:return eA(e,t,n);case`TSMethodSignature`:return xA(e,t,n);case`TSNamespaceExportDeclaration`:return[`export as namespace `,n(`id`),t.semi?`;`:``];case`TSEnumDeclaration`:return Vk(e,n);case`TSEnumBody`:return Rk(e,t,n);case`TSEnumMember`:return Bk(e,n);case`TSImportEqualsDeclaration`:return[`import `,ok(r,!1),n(`id`),` = `,n(`moduleReference`),t.semi?`;`:``];case`TSExternalModuleReference`:return SE(e,t,n);case`TSModuleDeclaration`:return SA(e,t,n);case`TSConditionalType`:return Dk(e,t,n);case`TSInferType`:return Yk(e,t,n);case`TSIntersectionType`:return Xk(e,t,n);case`TSUnionType`:return UT(e,t,n);case`TSFunctionType`:case`TSCallSignatureDeclaration`:case`TSConstructorType`:case`TSConstructSignatureDeclaration`:return Hk(e,t,n);case`TSTupleType`:return $T(e,t,n);case`TSTypeReference`:return[n(`typeName`),pA(e,t,n,`typeArguments`)];case`TSTypeAnnotation`:return ZT(e,t,n);case`TSEmptyBodyFunctionExpression`:return tD(e,t,n);case`TSJSDocAllType`:return`*`;case`TSJSDocUnknownType`:return`?`;case`TSJSDocNullableType`:return bA(e,n,`?`);case`TSJSDocNonNullableType`:return bA(e,n,`!`);default:throw new hD(r,`TypeScript`)}}}function TA(e,t,n,r){for(let i of[UD,ID,vA,wA,Ok]){let a=i(e,t,n,r);if(a!==void 0)return a}}var EA=W([`ClassMethod`,`ClassPrivateMethod`,`ClassProperty`,`ClassAccessorProperty`,`AccessorProperty`,`TSAbstractAccessorProperty`,`PropertyDefinition`,`TSAbstractPropertyDefinition`,`ClassPrivateProperty`,`MethodDefinition`,`TSAbstractMethodDefinition`,`TSDeclareMethod`]);function DA(e,t,n,r){e.isRoot&&t.__onHtmlBindingRoot?.(e.node,t);let{node:i}=e,a=HD(e)?t.originalText.slice(V(i),H(i)):TA(e,t,n,r);if(!a)return``;if(EA(i))return a;let o=zv(i.decorators),s=XD(e,t,n),c=i.type===`ClassExpression`;if(o&&!c)return QS(a,e=>J([s,e]));let l=oT(e,t),u=lD(e,t);return!s&&!l&&!u?a:QS(a,e=>[u?`;`:``,l?`(`:``,l&&c&&o?[q([Z,s,e]),Z]:[s,e],l?`)`:``])}var OA=DA,kA={experimental_avoidAstMutation:!0},AA=[{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`,`.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}],jA={};tv(jA,{getVisitorKeys:()=>NA,massageAstNode:()=>LA,print:()=>PA});var MA=[[]],NA=sy({JsonRoot:[`node`],ArrayExpression:[`elements`],ObjectExpression:[`properties`],ObjectProperty:[`key`,`value`],UnaryExpression:[`argument`],NullLiteral:MA[0],BooleanLiteral:MA[0],StringLiteral:MA[0],NumericLiteral:MA[0],Identifier:MA[0],TemplateLiteral:[`quasis`],TemplateElement:MA[0]});function PA(e,t,n){let{node:r}=e;switch(r.type){case`JsonRoot`:return[n(`node`),$];case`ArrayExpression`:{if(r.elements.length===0)return`[]`;let t=e.map(()=>e.node===null?`null`:n(),`elements`);return[`[`,q([$,X([`,`,$],t)]),$,`]`]}case`ObjectExpression`:return r.properties.length===0?`{}`:[`{`,q([$,X([`,`,$],e.map(n,`properties`))]),$,`}`];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 JSON.stringify(r.value);case`NumericLiteral`:return FA(e)?JSON.stringify(String(r.value)):JSON.stringify(r.value);case`Identifier`:return FA(e)?JSON.stringify(r.name):r.name;case`TemplateLiteral`:return n([`quasis`,0]);case`TemplateElement`:return JSON.stringify(r.value.cooked);default:throw new hD(r,`JSON`)}}function FA(e){return e.key===`key`&&e.parent.type===`ObjectProperty`}var IA=new Set([`start`,`end`,`extra`,`loc`,`comments`,`leadingComments`,`trailingComments`,`innerComments`,`errors`,`range`,`tokens`]);function LA(e,t){let{type:n}=e;if(n===`ObjectProperty`){let{key:n}=e;n.type===`Identifier`?t.key={type:`StringLiteral`,value:n.name}:n.type===`NumericLiteral`&&(t.key={type:`StringLiteral`,value:String(n.value)});return}if(n===`UnaryExpression`&&e.operator===`+`)return t.argument;if(n===`ArrayExpression`){for(let[n,r]of e.elements.entries())r===null&&t.elements.splice(n,0,{type:`NullLiteral`});return}if(n===`TemplateLiteral`)return{type:`StringLiteral`,value:e.quasis[0].value.cooked}}LA.ignoredProperties=IA;var RA={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.`}},zA=`JavaScript`,BA={arrowParens:{category:zA,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:RA.bracketSameLine,objectWrap:RA.objectWrap,bracketSpacing:RA.bracketSpacing,jsxBracketSameLine:{category:zA,type:`boolean`,description:`Put > on the last line instead of at a new line.`,deprecated:`2.4.0`},semi:{category:zA,type:`boolean`,default:!0,description:`Print semicolons.`,oppositeDescription:`Do not print semicolons, except at the beginning of lines which may need them.`},experimentalOperatorPosition:{category:zA,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:zA,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:RA.singleQuote,jsxSingleQuote:{category:zA,type:`boolean`,default:!1,description:`Use single quotes in JSX.`},quoteProps:{category:zA,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:zA,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:RA.singleAttributePerLine},VA={estree:iv,"estree-json":jA},HA=[...rv,...AA],UA=Object.create,WA=Object.defineProperty,GA=Object.getOwnPropertyDescriptor,KA=Object.getOwnPropertyNames,qA=Object.getPrototypeOf,JA=Object.prototype.hasOwnProperty,YA=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),XA=(e,t)=>{for(var n in t)WA(e,n,{get:t[n],enumerable:!0})},ZA=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of KA(t))!JA.call(e,i)&&i!==n&&WA(e,i,{get:()=>t[i],enumerable:!(r=GA(t,i))||r.enumerable});return e},QA=(e,t,n)=>(n=e==null?{}:UA(qA(e)),ZA(t||!e||!e.__esModule?WA(n,`default`,{value:e,enumerable:!0}):n,e)),$A=YA((e,t)=>{var n,r,i,a,o,s,c,l,u,d,f,p,m=/\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]|[^\/\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/uy,h,g,_,v,y,b;p=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,n=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/uy,g=/(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y,f=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,_=/[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y,b=/[\t\v\f\ufeff\p{Zs}]+/uy,l=/\r?\n|[\r\u2028\u2029]/y,u=/\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y,h=/\/\/.*/y,i=/[<>.:={}]|\/(?![\/*])/y,r=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/uy,a=/(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y,o=/[^<>{}]+/y,y=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,v=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,s=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,c=/^(?:return|throw|yield)$/,d=RegExp(l.source),t.exports=function*(e,{jsx:t=!1}={}){var x,S,C,w,T,ee,E,te,D,ne,re,O,ie,ae;for({length:ee}=e,w=0,T=``,ae=[{tag:`JS`}],x=[],re=0,O=!1;w<ee;){switch(te=ae[ae.length-1],te.tag){case`JS`:case`JSNonExpressionParen`:case`InterpolationInTemplate`:case`InterpolationInJSX`:if(e[w]===`/`&&(y.test(T)||s.test(T))&&(m.lastIndex=w,E=m.exec(e))){w=m.lastIndex,T=E[0],O=!0,yield{type:`RegularExpressionLiteral`,value:E[0],closed:E[1]!==void 0&&E[1]!==`\\`};continue}if(p.lastIndex=w,E=p.exec(e)){switch(ie=E[0],D=p.lastIndex,ne=ie,ie){case`(`:T===`?NonExpressionParenKeyword`&&ae.push({tag:`JSNonExpressionParen`,nesting:re}),re++,O=!1;break;case`)`:re--,O=!0,te.tag===`JSNonExpressionParen`&&re===te.nesting&&(ae.pop(),ne=`?NonExpressionParenEnd`,O=!1);break;case`{`:p.lastIndex=0,C=!v.test(T)&&(y.test(T)||s.test(T)),x.push(C),O=!1;break;case`}`:switch(te.tag){case`InterpolationInTemplate`:if(x.length===te.nesting){_.lastIndex=w,E=_.exec(e),w=_.lastIndex,T=E[0],E[1]==="${"?(T=`?InterpolationInTemplate`,O=!1,yield{type:`TemplateMiddle`,value:E[0]}):(ae.pop(),O=!0,yield{type:`TemplateTail`,value:E[0],closed:E[1]==="`"});continue}break;case`InterpolationInJSX`:if(x.length===te.nesting){ae.pop(),w+=1,T=`}`,yield{type:`JSXPunctuator`,value:`}`};continue}}O=x.pop(),ne=O?`?ExpressionBraceEnd`:`}`;break;case`]`:O=!0;break;case`++`:case`--`:ne=O?`?PostfixIncDec`:`?UnaryIncDec`;break;case`<`:if(t&&(y.test(T)||s.test(T))){ae.push({tag:`JSXTag`}),w+=1,T=`<`,yield{type:`JSXPunctuator`,value:ie};continue}O=!1;break;default:O=!1}w=D,T=ne,yield{type:`Punctuator`,value:ie};continue}if(n.lastIndex=w,E=n.exec(e)){switch(w=n.lastIndex,ne=E[0],E[0]){case`for`:case`if`:case`while`:case`with`:T!==`.`&&T!==`?.`&&(ne=`?NonExpressionParenKeyword`)}T=ne,O=!s.test(E[0]),yield{type:E[1]===`#`?`PrivateIdentifier`:`IdentifierName`,value:E[0]};continue}if(g.lastIndex=w,E=g.exec(e)){w=g.lastIndex,T=E[0],O=!0,yield{type:`StringLiteral`,value:E[0],closed:E[2]!==void 0};continue}if(f.lastIndex=w,E=f.exec(e)){w=f.lastIndex,T=E[0],O=!0,yield{type:`NumericLiteral`,value:E[0]};continue}if(_.lastIndex=w,E=_.exec(e)){w=_.lastIndex,T=E[0],E[1]==="${"?(T=`?InterpolationInTemplate`,ae.push({tag:`InterpolationInTemplate`,nesting:x.length}),O=!1,yield{type:`TemplateHead`,value:E[0]}):(O=!0,yield{type:`NoSubstitutionTemplate`,value:E[0],closed:E[1]==="`"});continue}break;case`JSXTag`:case`JSXTagEnd`:if(i.lastIndex=w,E=i.exec(e)){switch(w=i.lastIndex,ne=E[0],E[0]){case`<`:ae.push({tag:`JSXTag`});break;case`>`:ae.pop(),T===`/`||te.tag===`JSXTagEnd`?(ne=`?JSX`,O=!0):ae.push({tag:`JSXChildren`});break;case`{`:ae.push({tag:`InterpolationInJSX`,nesting:x.length}),ne=`?InterpolationInJSX`,O=!1;break;case`/`:T===`<`&&(ae.pop(),ae[ae.length-1].tag===`JSXChildren`&&ae.pop(),ae.push({tag:`JSXTagEnd`}))}T=ne,yield{type:`JSXPunctuator`,value:E[0]};continue}if(r.lastIndex=w,E=r.exec(e)){w=r.lastIndex,T=E[0],yield{type:`JSXIdentifier`,value:E[0]};continue}if(a.lastIndex=w,E=a.exec(e)){w=a.lastIndex,T=E[0],yield{type:`JSXString`,value:E[0],closed:E[2]!==void 0};continue}break;case`JSXChildren`:if(o.lastIndex=w,E=o.exec(e)){w=o.lastIndex,T=E[0],yield{type:`JSXText`,value:E[0]};continue}switch(e[w]){case`<`:ae.push({tag:`JSXTag`}),w++,T=`<`,yield{type:`JSXPunctuator`,value:`<`};continue;case`{`:ae.push({tag:`InterpolationInJSX`,nesting:x.length}),w++,T=`?InterpolationInJSX`,O=!1,yield{type:`JSXPunctuator`,value:`{`};continue}}if(b.lastIndex=w,E=b.exec(e)){w=b.lastIndex,yield{type:`WhiteSpace`,value:E[0]};continue}if(l.lastIndex=w,E=l.exec(e)){w=l.lastIndex,O=!1,c.test(T)&&(T=`?NoLineTerminatorHere`),yield{type:`LineTerminatorSequence`,value:E[0]};continue}if(u.lastIndex=w,E=u.exec(e)){w=u.lastIndex,d.test(E[0])&&(O=!1,c.test(T)&&(T=`?NoLineTerminatorHere`)),yield{type:`MultiLineComment`,value:E[0],closed:E[1]!==void 0};continue}if(h.lastIndex=w,E=h.exec(e)){w=h.lastIndex,O=!1,yield{type:`SingleLineComment`,value:E[0]};continue}S=String.fromCodePoint(e.codePointAt(w)),w+=S.length,T=S,O=!1,yield{type:te.tag.startsWith(`JSX`)?`JSXInvalid`:`Invalid`,value:S}}}});XA({},{__debug:()=>IL,check:()=>PL,doc:()=>qI,format:()=>NL,formatWithCursor:()=>ML,getSupportInfo:()=>FL,util:()=>QI,version:()=>ZI});var ej=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),tj=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},nj=ej(`replaceAll`,function(){if(typeof this==`string`)return tj}),rj=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}},ij=new class extends rj{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function aj(e,t,n){return ij.diff(e,t,n)}var oj=()=>{},sj=`cr`,cj=`crlf`,lj=`lf`,uj=`\r`,dj=`\r
346
+ `,fj=`
347
+ `,pj=fj;function mj(e){let t=e.indexOf(uj);return t===-1?lj:e.charAt(t+1)===fj?cj:sj}function hj(e){return e===sj?uj:e===cj?dj:pj}var gj=new Map([[fj,/\n/gu],[uj,/\r/gu],[dj,/\r\n/gu]]);function _j(e,t){let n=gj.get(t);return e.match(n)?.length??0}var vj=/\r\n?/gu;function yj(e){return nj(0,e,vj,fj)}function bj(e){return this[e<0?this.length+e:e]}var xj=ej(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return bj}),Sj=`string`,Cj=`array`,wj=`cursor`,Tj=`indent`,Ej=`align`,Dj=`trim`,Oj=`group`,kj=`fill`,Aj=`if-break`,jj=`indent-if-break`,Mj=`line-suffix`,Nj=`line-suffix-boundary`,Pj=`line`,Fj=`label`,Ij=`break-parent`,Lj=new Set([wj,Tj,Ej,Dj,Oj,kj,Aj,jj,Mj,Nj,Pj,Fj,Ij]);function Rj(e){let t=e.length;for(;t>0&&(e[t-1]===`\r`||e[t-1]===`
348
+ `);)t--;return t<e.length?e.slice(0,t):e}function zj(e){if(typeof e==`string`)return Sj;if(Array.isArray(e))return Cj;if(!e)return;let{type:t}=e;if(Lj.has(t))return t}var Bj=zj,Vj=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function Hj(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
349
+ Expected it to be 'string' or 'object'.`;if(Bj(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=Vj([...Lj].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
350
+ Expected it to be ${r}.`}var Uj=class extends Error{name=`InvalidDocError`;constructor(e){super(Hj(e)),this.doc=e}},Wj={};function Gj(e,t,n,r){let i=[e];for(;i.length>0;){let e=i.pop();if(e===Wj){n(i.pop());continue}n&&i.push(e,Wj);let a=Bj(e);if(!a)throw new Uj(e);if(t?.(e)!==!1)switch(a){case Cj:case kj:{let t=a===Cj?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case Aj:i.push(e.flatContents,e.breakContents);break;case Oj: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 Ej:case Tj:case jj:case Fj:case Mj:i.push(e.contents);break;case Sj:case wj:case Dj:case Nj:case Pj:case Ij:break;default:throw new Uj(e)}}}var Kj=Gj;function qj(e,t){if(typeof e==`string`)return t(e);let n=new Map;return r(e);function r(e){if(n.has(e))return n.get(e);let t=i(e);return n.set(e,t),t}function i(e){switch(Bj(e)){case Cj:return t(e.map(r));case kj:return t({...e,parts:e.parts.map(r)});case Aj:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case Oj:{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 Ej:case Tj:case jj:case Fj:case Mj:return t({...e,contents:r(e.contents)});case Sj:case wj:case Dj:case Nj:case Pj:case Ij:return t(e);default:throw new Uj(e)}}}function Jj(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 Kj(e,a),r}function Yj(e){if(e.type===Oj&&e.break||e.type===Pj&&e.hard||e.type===Ij)return!0}function Xj(e){return Jj(e,Yj,!1)}function Zj(e){if(e.length>0){let t=xj(0,e,-1);!t.expandedStates&&!t.break&&(t.break=`propagated`)}return null}function Qj(e){let t=new Set,n=[];function r(e){if(e.type===Ij&&Zj(n),e.type===Oj){if(n.push(e),t.has(e))return!1;t.add(e)}}function i(e){e.type===Oj&&n.pop().break&&Zj(n)}Kj(e,r,i,!0)}function $j(e){return e.type===Pj&&!e.hard?e.soft?``:` `:e.type===Aj?e.flatContents:e}function eM(e){return qj(e,$j)}function tM(e){for(e=[...e];e.length>=2&&xj(0,e,-2).type===Pj&&xj(0,e,-1).type===Ij;)e.length-=2;if(e.length>0){let t=nM(xj(0,e,-1));e[e.length-1]=t}return e}function nM(e){switch(Bj(e)){case Tj:case jj:case Oj:case Mj:case Fj:{let t=nM(e.contents);return{...e,contents:t}}case Aj:return{...e,breakContents:nM(e.breakContents),flatContents:nM(e.flatContents)};case kj:return{...e,parts:tM(e.parts)};case Cj:return tM(e);case Sj:return Rj(e);case Ej:case wj:case Dj:case Nj:case Pj:case Ij:break;default:throw new Uj(e)}return e}function rM(e){return nM(aM(e))}function iM(e){switch(Bj(e)){case kj:if(e.parts.every(e=>e===``))return``;break;case Oj:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return``;if(e.contents.type===Oj&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case Ej:case Tj:case jj:case Mj:if(!e.contents)return``;break;case Aj:if(!e.flatContents&&!e.breakContents)return``;break;case Cj:{let t=[];for(let n of e){if(!n)continue;let[e,...r]=Array.isArray(n)?n:[n];typeof e==`string`&&typeof xj(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 Sj:case wj:case Dj:case Nj:case Pj:case Fj:case Ij:break;default:throw new Uj(e)}return e}function aM(e){return qj(e,e=>iM(e))}function oM(e,t=PM){return qj(e,e=>typeof e==`string`?DM(t,e.split(`
351
+ `)):e)}function sM(e){if(e.type===Pj)return!0}function cM(e){return Jj(e,sM,!1)}function lM(e,t){return e.type===Fj?{...e,contents:t(e.contents)}:t(e)}var uM=oj,dM=oj,fM=oj,pM=oj;function mM(e){return uM(e),{type:Tj,contents:e}}function hM(e,t){return pM(e),uM(t),{type:Ej,contents:t,n:e}}function gM(e){return hM(-1/0,e)}function _M(e){return hM({type:`root`},e)}function vM(e){return hM(-1,e)}function yM(e,t,n){uM(e);let r=e;if(t>0){for(let e=0;e<Math.floor(t/n);++e)r=mM(r);r=hM(t%n,r),r=hM(-1/0,r)}return r}var bM={type:Ij},xM={type:wj};function SM(e){return fM(e),{type:kj,parts:e}}function CM(e,t={}){return uM(e),dM(t.expandedStates,!0),{type:Oj,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function wM(e,t){return CM(e[0],{...t,expandedStates:e})}function TM(e,t=``,n={}){return uM(e),t!==``&&uM(t),{type:Aj,breakContents:e,flatContents:t,groupId:n.groupId}}function EM(e,t){return uM(e),{type:jj,contents:e,groupId:t.groupId,negate:t.negate}}function DM(e,t){uM(e),dM(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}function OM(e,t){return uM(t),e?{type:Fj,label:e,contents:t}:t}var kM={type:Pj},AM={type:Pj,soft:!0},jM={type:Pj,hard:!0},MM=[jM,bM],NM={type:Pj,hard:!0,literal:!0},PM=[NM,bM];function FM(e){return uM(e),{type:Mj,contents:e}}var IM={type:Nj},LM={type:Dj};function RM(e){if(!e)return``;if(Array.isArray(e)){let t=[];for(let n of e)if(Array.isArray(n))t.push(...RM(n));else{let e=RM(n);e!==``&&t.push(e)}return t}return e.type===Aj?{...e,breakContents:RM(e.breakContents),flatContents:RM(e.flatContents)}:e.type===Oj?{...e,contents:RM(e.contents),expandedStates:e.expandedStates?.map(RM)}:e.type===kj?{type:`fill`,parts:e.parts.map(RM)}:e.contents?{...e,contents:RM(e.contents)}:e}function zM(e){let t=Object.create(null),n=new Set;return r(RM(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===Pj){let r=n?.[t+1]?.type===Ij;return e.literal?r?`literalline`:`literallineWithoutBreakParent`:e.hard?r?`hardline`:`hardlineWithoutBreakParent`:e.soft?`softline`:`line`}if(e.type===Ij)return n?.[t-1]?.type===Pj&&n[t-1].hard?void 0:`breakParent`;if(e.type===Dj)return`trim`;if(e.type===Tj)return`indent(`+r(e.contents)+`)`;if(e.type===Ej)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===Aj)return`ifBreak(`+r(e.breakContents)+(e.flatContents?`, `+r(e.flatContents):``)+(e.groupId?(e.flatContents?``:`, ""`)+`, { groupId: ${i(e.groupId)} }`:``)+`)`;if(e.type===jj){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===Oj){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===kj)return`fill([${e.parts.map(e=>r(e)).join(`, `)}])`;if(e.type===Mj)return`lineSuffix(`+r(e.contents)+`)`;if(e.type===Nj)return`lineSuffixBoundary`;if(e.type===Fj)return`label(${JSON.stringify(e.label)}, ${r(e.contents)})`;if(e.type===wj)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 BM=()=>/[#*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;function VM(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function HM(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var UM=`©®‼⁉™ℹ↔↕↖↗↘↙↩↪⌨⏏⏱⏲⏸⏹⏺▪▫▶◀◻◼☀☁☂☃☄☎☑☘☝☠☢☣☦☪☮☯☸☹☺♀♂♟♠♣♥♦♨♻♾⚒⚔⚕⚖⚗⚙⚛⚜⚠⚧⚰⚱⛈⛏⛑⛓⛩⛱⛷⛸⛹✂✈✉✌✍✏✒✔✖✝✡✳✴❄❇❣❤➡⤴⤵⬅⬆⬇`,WM=/[^\x20-\x7F]/u,GM=new Set(UM);function KM(e){if(!e)return 0;if(!WM.test(e))return e.length;e=e.replace(BM(),e=>GM.has(e)?` `:` `);let t=0;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+=VM(e)||HM(e)?2:1)}return t}var qM=KM,JM={type:0},YM={type:1},XM={value:``,length:0,queue:[],get root(){return XM}};function ZM(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 QM(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?YM:{type:2,width:t}:{type:3,string:t},ZM(e,r,n)}function $M(e,t){return ZM(e,JM,t)}function eN(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 tN(e){let t=eN(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}var nN=Symbol(`MODE_BREAK`),rN=Symbol(`MODE_FLAT`),iN=Symbol(`DOC_FILL_PRINTED_LENGTH`);function aN(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=Bj(u);switch(d){case Sj:u&&(s&&=(l+=` `,--n,!1),l+=u,n-=qM(u));break;case Cj:case kj:{let t=d===Cj?u:u.parts,n=u[iN]??0;for(let r=t.length-1;r>=n;r--)c.push({mode:e,doc:t[r]});break}case Tj:case Ej:case jj:case Fj:c.push({mode:e,doc:u.contents});break;case Dj:{let{text:e,count:t}=tN(l);l=e,n+=t;break}case Oj:{if(a&&u.break)return!1;let t=u.break?nN:e,n=u.expandedStates&&t===nN?xj(0,u.expandedStates,-1):u.contents;c.push({mode:t,doc:n});break}case Aj:{let t=(u.groupId?i[u.groupId]||rN:e)===nN?u.breakContents:u.flatContents;t&&c.push({mode:e,doc:t});break}case Pj:if(e===nN||u.hard)return!0;u.soft||(s=!0);break;case Mj:r=!0;break;case Nj:if(r)return!1}}return!1}function oN(e,t){let n=Object.create(null),r=t.printWidth,i=hj(t.endOfLine),a=0,o=[{indent:XM,mode:nN,doc:e}],s=``,c=!1,l=[],u=[],d=[],f=[],p=0;for(Qj(e);o.length>0;){let{indent:e,mode:d,doc:f}=o.pop();switch(Bj(f)){case Sj:{let e=i===`
352
+ `?f:nj(0,f,`
353
+ `,i);e&&(s+=e,o.length>0&&(a+=qM(e)));break}case Cj:for(let t=f.length-1;t>=0;t--)o.push({indent:e,mode:d,doc:f[t]});break;case wj:if(u.length>=2)throw Error(`There are too many 'cursor' in doc.`);u.push(p+s.length);break;case Tj:o.push({indent:$M(e,t),mode:d,doc:f.contents});break;case Ej:o.push({indent:QM(e,f.n,t),mode:d,doc:f.contents});break;case Dj:_();break;case Oj:switch(d){case rN:if(!c){o.push({indent:e,mode:f.break?nN:rN,doc:f.contents});break}case nN:{c=!1;let t={indent:e,mode:rN,doc:f.contents},i=r-a,s=l.length>0;if(!f.break&&aN(t,o,i,s,n))o.push(t);else if(f.expandedStates){let t=xj(0,f.expandedStates,-1);if(f.break){o.push({indent:e,mode:nN,doc:t});break}for(let r=1;r<f.expandedStates.length+1;r++)if(r>=f.expandedStates.length){o.push({indent:e,mode:nN,doc:t});break}else{let t={indent:e,mode:rN,doc:f.expandedStates[r]};if(aN(t,o,i,s,n)){o.push(t);break}}}else o.push({indent:e,mode:nN,doc:f.contents});break}}f.id&&(n[f.id]=xj(0,o,-1).mode);break;case kj:{let t=r-a,i=f[iN]??0,{parts:s}=f,c=s.length-i;if(c===0)break;let u=s[i+0],p=s[i+1],m={indent:e,mode:rN,doc:u},h={indent:e,mode:nN,doc:u},g=aN(m,[],t,l.length>0,n,!0);if(c===1){g?o.push(m):o.push(h);break}let _={indent:e,mode:rN,doc:p},v={indent:e,mode:nN,doc:p};if(c===2){g?o.push(_,m):o.push(v,h);break}let y=s[i+2],b={indent:e,mode:d,doc:{...f,[iN]:i+2}},x=aN({indent:e,mode:rN,doc:[u,p,y]},[],t,l.length>0,n,!0);o.push(b),x?o.push(_,m):g?o.push(v,m):o.push(v,h);break}case Aj:case jj:{let t=f.groupId?n[f.groupId]:d;if(t===nN){let t=f.type===Aj?f.breakContents:f.negate?f.contents:mM(f.contents);t&&o.push({indent:e,mode:d,doc:t})}if(t===rN){let t=f.type===Aj?f.flatContents:f.negate?mM(f.contents):f.contents;t&&o.push({indent:e,mode:d,doc:t})}break}case Mj:l.push({indent:e,mode:d,doc:f.contents});break;case Nj:l.length>0&&o.push({indent:e,mode:d,doc:jM});break;case Pj:switch(d){case rN:if(f.hard)c=!0;else{f.soft||(s+=` `,a+=1);break}case nN:if(l.length>0){o.push({indent:e,mode:d,doc:f},...l.reverse()),l.length=0;break}f.literal?(s+=i,a=0,e.root&&(e.root.value&&(s+=e.root.value),a=e.root.length)):(_(),s+=i+e.value,a=e.length)}break;case Fj:o.push({indent:e,mode:d,doc:f.contents});break;case Ij:break;default:throw new Uj(f)}o.length===0&&l.length>0&&(o.push(...l.reverse()),l.length=0)}let m=d.join(``)+s,h=[...f,...u];if(h.length!==2)return{formatted:m};let g=h[0];return{formatted:m,cursorNodeStart:g,cursorNodeText:m.slice(g,xj(0,h,-1))};function _(){let{text:e,count:t}=tN(s);e&&(d.push(e),p+=e.length),s=``,a-=t,u.length>0&&(f.push(...u.map(e=>Math.min(e,p))),u.length=0)}}function sN(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 cN=sN,lN=class{constructor(e){this.stack=[e]}get key(){let{stack:e,siblings:t}=this;return xj(0,e,t===null?-2:-4)??null}get index(){return this.siblings===null?null:xj(0,this.stack,-2)}get node(){return xj(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=xj(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?xj(0,e,-2):null}getValue(){return xj(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=xj(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=xj(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 uN(e){return typeof e==`object`&&!!e}var dN=uN;function fN(e){return(t,n,r)=>{let i=!!r?.backwards;if(n===!1)return!1;let{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 pN=fN(/\s/u),mN=fN(` `),hN=fN(`,; `),gN=fN(/[^\n\r]/u),_N=e=>e===`
354
+ `||e===`\r`||e===`\u2028`||e===`\u2029`;function vN(e,t,n){let r=!!n?.backwards;if(t===!1)return!1;let i=e.charAt(t);if(r){if(e.charAt(t-1)===`\r`&&i===`
355
+ `)return t-2;if(_N(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===`
356
+ `)return t+2;if(_N(i))return t+1}return t}var yN=vN;function bN(e,t,n={}){let r=mN(e,n.backwards?t-1:t,n);return r!==yN(e,r,n)}var xN=bN;function SN(e){return Array.isArray(e)&&e.length>0}var CN=SN;function*wN(e,t){let{getVisitorKeys:n,filter:r=()=>!0}=t,i=e=>dN(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*TN(e,t){let n=[e];for(let e=0;e<n.length;e++){let r=n[e];for(let e of wN(r,t))yield e,n.push(e)}}function EN(e,t){return wN(e,t).next().done}function DN(e,t,n){let{cache:r}=n;if(r.has(e))return r.get(e);let{filter:i}=n;if(!i)return[];let a,o=(n.getChildren?.(e,n)??[...wN(e,{getVisitorKeys:n.getVisitorKeys})]).flatMap(r=>(a??=[e,...t],i(r,a)?[r]:DN(r,a,n))),{locStart:s,locEnd:c}=n;return o.sort((e,t)=>s(e)-s(t)||c(e)-c(t)),r.set(e,o),o}var ON=DN;function kN(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 AN(e,t){(e.comments??=[]).push(t),t.printed=!1,t.nodeDescription=kN(e)}function jN(e,t){t.leading=!0,t.trailing=!1,AN(e,t)}function MN(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),AN(e,t)}function NN(e,t){t.leading=!1,t.trailing=!0,AN(e,t)}var PN=new WeakMap;function FN(e,t,n,r,i=[]){let{locStart:a,locEnd:o}=n,s=a(t),c=o(t),l=ON(e,i,{cache:PN,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 FN(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=HN(e,t,n);u&&HN(e,u,n)!==i&&(u=null),d&&HN(e,d,n)!==i&&(d=null)}return{enclosingNode:r,precedingNode:u,followingNode:d}}var IN=()=>!1;function LN(e,t){let{comments:n}=e;if(delete e.comments,!CN(n)||!t.printer.canAttachComment)return;let r=[],{printer:{features:{experimental_avoidAstMutation:i},handleComments:a={}},originalText:o}=t,{ownLine:s=IN,endOfLine:c=IN,remaining:l=IN}=a,u=n.map((r,i)=>({...FN(e,r,t),comment:r,text:o,options:t,ast:e,isLastComment:n.length-1===i}));for(let[e,t]of u.entries()){let{comment:n,precedingNode:a,enclosingNode:o,followingNode:d,text:f,options:p,ast:m,isLastComment:h}=t,g;if(i?g=[t]:(n.enclosingNode=o,n.precedingNode=a,n.followingNode=d,g=[n,f,p,m,h]),zN(f,p,u,e))n.placement=`ownLine`,s(...g)||(d?jN(d,n):a?NN(a,n):MN(o||m,n));else if(BN(f,p,u,e))n.placement=`endOfLine`,c(...g)||(a?NN(a,n):d?jN(d,n):MN(o||m,n));else if(n.placement=`remaining`,!l(...g)){if(a&&d){let e=r.length;e>0&&r[e-1].followingNode!==d&&VN(r,p),r.push(t)}else a?NN(a,n):d?jN(d,n):MN(o||m,n)}}if(VN(r,t),!i)for(let e of n)delete e.precedingNode,delete e.enclosingNode,delete e.followingNode}var RN=e=>!/[\S\n\u2028\u2029]/u.test(e);function zN(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||!RN(e.slice(s(r),c)))break;c=o(r)}return xN(e,c,{backwards:!0})}function BN(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||!RN(e.slice(c,o(r))))break;c=s(r)}return xN(e,c)}function VN(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(]*$/u.test(s))a=t.locStart(n);else break}for(let[t,{comment:n}]of e.entries())t<o?NN(r,n):jN(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 HN(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 UN(e,t){let n=t-1;n=mN(e,n,{backwards:!0}),n=yN(e,n,{backwards:!0}),n=mN(e,n,{backwards:!0});let r=yN(e,n,{backwards:!0});return n!==r}var WN=UN;function GN(e,t){let n=e.node;return n.printed=!0,t.printer.printComment(e,t)}function KN(e,t){let n=e.node,r=[GN(e,t)],{printer:i,originalText:a,locStart:o,locEnd:s}=t;if(i.isBlockComment?.(n)){let e=xN(a,s(n))?xN(a,o(n),{backwards:!0})?MM:kM:` `;r.push(e)}else r.push(MM);let c=yN(a,mN(a,s(n)));return c!==!1&&xN(a,c)&&r.push(MM),r}function qN(e,t,n){let r=e.node,i=GN(e,t),{printer:a,originalText:o,locStart:s}=t,c=a.isBlockComment?.(r);return n?.hasLineSuffix&&!n?.isBlock||xN(o,s(r),{backwards:!0})?{doc:FM([MM,WN(o,s(r))?MM:``,i]),isBlock:c,hasLineSuffix:!0}:!c||n?.hasLineSuffix?{doc:[FM([` `,i]),bM],isBlock:c,hasLineSuffix:!0}:{doc:[` `,i],isBlock:c,hasLineSuffix:!1}}function JN(e,t){let n=e.node;if(!n)return{};let r=t[Symbol.for(`printedComments`)];if((n.comments||[]).filter(e=>!r.has(e)).length===0)return{leading:``,trailing:``};let i=[],a=[],o;return e.each(()=>{let n=e.node;if(r?.has(n))return;let{leading:s,trailing:c}=n;s?i.push(KN(e,t)):c&&(o=qN(e,t,o),a.push(o.doc))},`comments`),{leading:i,trailing:a}}function YN(e,t,n){let{leading:r,trailing:i}=JN(e,n);return!r&&!i?t:lM(t,e=>[r,e,i])}function XN(e){let{[Symbol.for(`comments`)]: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 ZN=()=>oj,QN=class extends Error{name=`ConfigError`},$N=class extends Error{name=`UndefinedParserError`},eP={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
357
357
  (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).
358
358
  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.
359
- 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 nP({plugins:e=[],showDeprecated:t=!1}={}){let n=e.flatMap(e=>e.languages??[]),r=[];for(let i of iP(Object.assign({},...e.map(({options:e})=>e),tP)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter(e=>!e.deprecated)),i.name===`parser`&&(i.choices=[...i.choices,...rP(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*rP(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&&Object.prototype.hasOwnProperty.call(e.parsers,t)),a=e.name;i?.name&&(a+=` (plugin: ${i.name})`),yield{value:t,description:a}}}}function iP(e){let t=[];for(let[n,r]of Object.entries(e)){let e={name:n,...r};Array.isArray(e.default)&&(e.default=Sj(0,e.default,-1).value),t.push(e)}return t}var aP=Array.prototype.toReversed??function(){return[...this].reverse()},oP=tj(`toReversed`,function(){if(Array.isArray(this))return aP});function sP(){let e=globalThis,t=e.Deno?.build?.os;return typeof t==`string`?t===`windows`:e.navigator?.platform?.startsWith(`Win`)??e.process?.platform?.startsWith(`win`)??!1}var cP=sP();function lP(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 uP(e){return e=lP(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,`%25`))}function dP(e){e=lP(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 fP(e){return cP?dP(e):uP(e)}var pP=e=>String(e).split(/[/\\]/u).pop(),mP=e=>String(e).startsWith(`file:`);function hP(e,t){if(!t)return;let n=pP(t).toLowerCase();return e.find(({filenames:e})=>e?.some(e=>e.toLowerCase()===n))??e.find(({extensions:e})=>e?.some(e=>n.endsWith(e)))}function gP(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 _P=void 0;function vP(e,t){if(t){if(mP(t))try{t=fP(t)}catch{return}if(typeof t==`string`)return e.find(({isSupported:e})=>e?.({filepath:t}))}}function yP(e,t){let n=oP(0,e.plugins).flatMap(e=>e.languages??[]);return(gP(n,t.language)??hP(n,t.physicalFile)??hP(n,t.file)??vP(n,t.physicalFile)??vP(n,t.file)??_P?.(n,t.physicalFile))?.parsers[0]}var bP=yP,xP={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=>xP.value(e)).join(`, `)}]`;let t=Object.keys(e);return t.length===0?`{}`:`{ ${t.map(t=>`${xP.key(t)}: ${xP.value(e[t])}`).join(`, `)} }`},pair:({key:e,value:t})=>xP.value({[e]:t})},SP=new Proxy(String,{get:()=>SP}),CP=SP,wP=()=>SP,TP=(e,t,{descriptor:n})=>{let r=[`${CP.yellow(typeof e==`string`?n.key(e):n.pair(e))} is deprecated`];return t&&r.push(`we now treat it as ${CP.blue(typeof t==`string`?n.key(t):n.pair(t))}`),r.join(`; `)+`.`},EP=Symbol.for(`vnopts.VALUE_NOT_EXIST`),DP=Symbol.for(`vnopts.VALUE_UNCHANGED`),OP=` `.repeat(2),kP=(e,t,n)=>{let{text:r,list:i}=n.normalizeExpectedResult(n.schemas[e].expected(n)),a=[];return r&&a.push(AP(e,t,r,n.descriptor)),i&&a.push([AP(e,t,i.title,n.descriptor)].concat(i.values.map(e=>jP(e,n.loggerPrintWidth))).join(`
360
- `)),MP(a,n.loggerPrintWidth)};function AP(e,t,n,r){return[`Invalid ${CP.red(r.key(e))} value.`,`Expected ${CP.blue(n)},`,`but received ${t===EP?CP.gray(`nothing`):CP.red(r.value(t))}.`].join(` `)}function jP({text:e,list:t},n){let r=[];return e&&r.push(`- ${CP.blue(e)}`),t&&r.push([`- ${CP.blue(t.title)}:`].concat(t.values.map(e=>jP(e,n-OP.length).replace(/^|\n/g,`$&${OP}`))).join(`
361
- `)),MP(r,n)}function MP(e,t){if(e.length===1)return e[0];let[n,r]=e,[i,a]=e.map(e=>e.split(`
362
- `,1)[0].length);return i>t&&i>a?r:n}var NP=[],PP=[];function FP(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;)PP[f]=e.charCodeAt(s+f),NP[f]=++f;for(;p<o;){for(c=t.charCodeAt(s+p),u=p++,l=p,f=0;f<a;f++)d=c===PP[f]?u:u+1,u=NP[f],l=NP[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++)NP[f]<e&&(e=NP[f]);if(e>r)return r}}return NP.length=a,PP.length=a,r!==void 0&&l>r?r:l}function IP(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?FP(e,n):FP(e,n,{maxDistance:c});if(r!==void 0&&l>r)continue;let u=l;if(c!==void 0&&l===c&&c===r&&(u=FP(e,n)),u<o&&(o=u,a=n,o===0))break}if(!(r!==void 0&&o>r))return a}var LP=(e,t,{descriptor:n,logger:r,schemas:i})=>{let a=[`Ignored unknown option ${CP.yellow(n.pair({key:e,value:t}))}.`],o=IP(e,Object.keys(i),{maxDistance:3});o&&a.push(`Did you mean ${CP.blue(n.key(o))}?`),r.warn(a.join(` `))},RP=[`default`,`expected`,`validate`,`deprecated`,`forward`,`redirect`,`overlap`,`preprocess`,`postprocess`];function zP(e,t){let n=new e(t),r=Object.create(n);for(let e of RP)e in t&&(r[e]=VP(t[e],n,BP.prototype[e].length));return r}var BP=class{static create(e){return zP(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 DP}};function VP(e,t,n){return typeof e==`function`?(...r)=>e(...r.slice(0,n-1),t,...r.slice(n-1)):()=>e}var HP=class extends BP{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}},UP=class extends BP{expected(){return`anything`}validate(){return!0}},WP=class extends BP{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(GP))}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(GP))}return n.length===0?{redirect:r}:{redirect:r,remain:n}}overlap(e,t){return e.concat(t)}};function GP({from:e,to:t}){return{from:[e],to:t}}var KP=class extends BP{expected(){return`true or false`}validate(e){return typeof e==`boolean`}};function qP(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 JP(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 YP(){let e=Object.create(null);return t=>{let n=JSON.stringify(t);return e[n]?!0:(e[n]=!0,!1)}}function XP(e,t){let n=[],r=[];for(let i of e)t(i)?n.push(i):r.push(i);return[n,r]}function ZP(e){return e===Math.floor(e)}function QP(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 $P(e){return(...t)=>{let n=e(...t);return typeof n==`string`?Error(n):n}}function eF(e){return e===void 0?{}:e}function tF(e){if(typeof e==`string`)return{text:e};let{text:t,list:n}=e;return sF((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(tF)}}:{text:t}}function nF(e,t){return e===!0?!0:e===!1?{value:t}:e}function rF(e,t,n=!1){return e===!1?!1:e===!0?n?!0:[{value:t}]:`value`in e?[e]:e.length!==0&&e}function iF(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 aF(e,t){return e===void 0?[]:Array.isArray(e)?e.map(e=>iF(e,t)):[iF(e,t)]}function oF(e,t){let n=aF(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 sF(e,t){if(!e)throw Error(t)}var cF=class extends BP{constructor(e){super(e),this._choices=JP(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(QP).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}},lF=class extends BP{expected(){return`a number`}validate(e,t){return typeof e==`number`}},uF=class extends lF{expected(){return`an integer`}validate(e,t){return t.normalizeValidateResult(super.validate(e,t),e)===!0&&ZP(e)}},dF=class extends BP{expected(){return`a string`}validate(e){return typeof e==`string`}},fF=xP,pF=LP,mF=kP,hF=TP,gF=class{constructor(e,t){let{logger:n=console,loggerPrintWidth:r=80,descriptor:i=fF,unknown:a=pF,invalid:o=mF,deprecated:s=hF,missing:c=()=>!1,required:l=()=>!1,preprocess:u=e=>e,postprocess:d=()=>DP}=t||{};this._utils={descriptor:i,logger:n||{warn:()=>{}},loggerPrintWidth:r,schemas:qP(e,`name`),normalizeDefaultResult:eF,normalizeExpectedResult:tF,normalizeDeprecatedResult:rF,normalizeForwardResult:aF,normalizeRedirectResult:oF,normalizeValidateResult:nF},this._unknownHandler=a,this._invalidHandler=$P(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=YP()}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=eF(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!==DP&&(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=rF(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))}}}};aF(r.forward(a,this._utils),a).forEach(o);let c=oF(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,EP,this._utils)}_partitionOptionKeys(e){let[t,n]=XP(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=nF(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!==DP){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})}}}}},_F;function vF(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=xP;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 LP(e,t,{...n,schemas:i})},c=new gF(yF(t,{isCLI:r,FlagSchema:a}),{logger:n,unknown:s,descriptor:o}),l=n!==!1;l&&_F&&(c._hasDeprecationWarned=_F);let u=c.normalize(e);return l&&(_F=c._hasDeprecationWarned),u}function yF(e,{isCLI:t,FlagSchema:n}){let r=[];t&&r.push(UP.create({name:`_`}));for(let i of e)r.push(bF(i,{isCLI:t,optionInfos:e,FlagSchema:n})),i.alias&&t&&r.push(HP.create({name:i.alias,sourceName:i.name}));return r}function bF(e,{isCLI:t,optionInfos:n,FlagSchema:r}){let{name:i}=e,a={name:i},o,s={};switch(e.type){case`int`:o=uF,t&&(a.preprocess=Number);break;case`string`:o=dF;break;case`choice`:o=cF,a.choices=e.choices.map(t=>t?.redirect?{...t,redirect:{to:{key:e.name,value:t.redirect}}}:t);break;case`boolean`:o=KP;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=dF;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)?Sj(0,t,-1):t),r)}return e.array?WP.create({...t?{preprocess:e=>Array.isArray(e)?e:[e]}:{},...s,valueSchema:o.create(a)}):o.create({...a,...s})}var xF=vF,SF=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}},CF=tj(`findLast`,function(){if(Array.isArray(this))return SF}),wF=Symbol.for(`PRETTIER_IS_FRONT_MATTER`),TF=[];function EF(e){return!!e?.[wF]}var DF=EF,OF=new Set([`yaml`,`toml`]),kF=({node:e})=>DF(e)&&OF.has(e.language);async function AF(e,t,n,r){let{node:i}=n,{language:a}=i;if(!OF.has(a))return;let o=i.value.trim(),s;if(o){let t=a===`yaml`?a:bP(r,{language:a});if(!t)return;s=o?await e(o,{parser:t}):``}else s=o;return vM([i.startDelimiter,i.explicitLanguage??``,NM,s,s?NM:``,i.endDelimiter])}function jF(e,t){return kF({node:e})&&(delete t.end,delete t.raw,delete t.value),t}var MF=jF;function NF({node:e}){return e.raw}var PF=NF,FF=new Set([`tokens`,`comments`,`parent`,`enclosingNode`,`precedingNode`,`followingNode`]),IF=e=>Object.keys(e).filter(e=>!FF.has(e));function LF(e,t){let n=e?t=>e(t,FF):IF;return t?new Proxy(n,{apply:(e,t,n)=>DF(n[0])?TF:Reflect.apply(e,t,n)}):n}var RF=LF;function zF(e,t){if(!t)throw Error(`parserName is required.`);let n=CF(0,e,e=>e.parsers&&Object.prototype.hasOwnProperty.call(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 $N(r)}function BF(e,t){if(!t)throw Error(`astFormat is required.`);let n=CF(0,e,e=>e.printers&&Object.prototype.hasOwnProperty.call(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 $N(r)}function VF({plugins:e,parser:t}){return HF(zF(e,t),t)}function HF(e,t){let n=e.parsers[t];return typeof n==`function`?n():n}async function UF(e,t){let n=e.printers[t];return GF(typeof n==`function`?await n():n)}var WF=new WeakMap;function GF(e){if(WF.has(e))return WF.get(e);let{features:t,getVisitorKeys:n,embed:r,massageAstNode:i,print:a,...o}=e;t=JF(t);let s=t.experimental_frontMatterSupport;n=RF(n,s.massageAstNode||s.embed||s.print);let c=i;i&&s.massageAstNode&&(c=new Proxy(i,{apply(e,t,n){return MF(...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?RF(r.getVisitorKeys,s.massageAstNode||s.embed):n,e):Reflect.get(t,i,a)},apply:(e,t,n)=>s.embed&&kF(...n)?AF:Reflect.apply(e,t,n)})}let u=a;s.print&&(u=new Proxy(a,{apply(e,t,n){let[r]=n;return DF(r.node)?PF(r):Reflect.apply(e,t,n)}}));let d={features:t,getVisitorKeys:n,embed:l,massageAstNode:c,print:u,...o};return WF.set(e,d),d}var KF=Object.fromEntries([`clean`,`embed`,`print`].map(e=>[e,!1]));function qF(e){return{...KF,...e}}function JF(e){return{experimental_avoidAstMutation:!1,...e,experimental_frontMatterSupport:qF(e?.experimental_frontMatterSupport)}}var YF={astFormat:`estree`,printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null};async function XF(e,t={}){let n={...e};if(!n.parser){if(n.filepath){if(n.parser=bP(n,{physicalFile:n.filepath}),!n.parser)throw new eP(`No parser could be inferred for file "${n.filepath}".`)}else throw new eP(`No parser and no file path given, couldn't infer a parser.`)}let r=nP({plugins:e.plugins,showDeprecated:!0}).options,i={...YF,...Object.fromEntries(r.filter(e=>e.default!==void 0).map(e=>[e.name,e.default]))},a=zF(n.plugins,n.parser),o=await HF(a,n.parser);n.astFormat=o.astFormat,n.locEnd=o.locEnd,n.locStart=o.locStart;let s=a.printers?.[o.astFormat]?a:BF(n.plugins,o.astFormat),c=await UF(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]===null||n[e]===void 0)&&(n[e]=t);return n.parser===`json`&&(n.trailingComma=`none`),xF(n,r,{passThrough:Object.keys(YF),...t})}var ZF=XF;$A(ej(),1);var QF=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,$F=`·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`;RegExp(`[`+QF+`]`),RegExp(`[`+QF+$F+`]`),QF=$F=null;var eI={keyword:`break.case.catch.continue.debugger.default.do.else.finally.for.function.if.return.switch.throw.try.var.const.while.with.new.this.super.class.extends.export.import.null.true.false.in.instanceof.typeof.void.delete`.split(`.`),strict:[`implements`,`interface`,`let`,`package`,`private`,`protected`,`public`,`static`,`yield`],strictBind:[`eval`,`arguments`]};new Set(eI.keyword),new Set(eI.strict),new Set(eI.strictBind);var tI=(e,t)=>n=>e(t(n));function nI(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.gray,invalid:tI(tI(e.white,e.bgRed),e.bold),gutter:e.gray,marker:tI(e.red,e.bold),message:tI(e.red,e.bold),reset:e.reset}}nI(wP(!0)),nI(wP(!1));function rI(){return new Proxy({},{get:()=>e=>e})}var iI=/\r\n|[\n\r\u2028\u2029]/;function aI(e,t,n){let r=Object.assign({column:0,line:-1},e.start),i=Object.assign({},r,e.end),{linesAbove:a=2,linesBelow:o=3}=n||{},s=r.line,c=r.column,l=i.line,u=i.column,d=Math.max(s-(a+1),0),f=Math.min(t.length,l+o);s===-1&&(d=0),l===-1&&(f=t.length);let p=l-s,m={};if(p)for(let e=0;e<=p;e++){let n=e+s;m[n]=c?e===0?[c,t[n-1].length-c+1]:e===p?[0,u]:[0,t[n-e].length]:!0}else m[s]=c===u?!c||[c,0]:[c,u-c];return{start:d,end:f,markerLines:m}}function oI(e,t,n={}){let r=rI(!1),{start:i,end:a,markerLines:o}=aI(t,e.split(iI),n),s=t.start&&typeof t.start.column==`number`,c=String(a).length,l=e.split(iI,a).slice(i,a).map((e,t)=>{let a=i+1+t,s=` ${` ${a}`.slice(-c)} |`,l=o[a],u=!o[a+1];if(l){let t=``;if(Array.isArray(l)){let i=e.slice(0,Math.max(l[0]-1,0)).replace(/[^\t]/g,` `),a=l[1]||1;t=[`
359
+ 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 tP({plugins:e=[],showDeprecated:t=!1}={}){let n=e.flatMap(e=>e.languages??[]),r=[];for(let i of rP(Object.assign({},...e.map(({options:e})=>e),eP)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter(e=>!e.deprecated)),i.name===`parser`&&(i.choices=[...i.choices,...nP(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*nP(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&&Object.prototype.hasOwnProperty.call(e.parsers,t)),a=e.name;i?.name&&(a+=` (plugin: ${i.name})`),yield{value:t,description:a}}}}function rP(e){let t=[];for(let[n,r]of Object.entries(e)){let e={name:n,...r};Array.isArray(e.default)&&(e.default=xj(0,e.default,-1).value),t.push(e)}return t}var iP=Array.prototype.toReversed??function(){return[...this].reverse()},aP=ej(`toReversed`,function(){if(Array.isArray(this))return iP});function oP(){let e=globalThis,t=e.Deno?.build?.os;return typeof t==`string`?t===`windows`:e.navigator?.platform?.startsWith(`Win`)??e.process?.platform?.startsWith(`win`)??!1}var sP=oP();function cP(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 lP(e){return e=cP(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,`%25`))}function uP(e){e=cP(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 dP(e){return sP?uP(e):lP(e)}var fP=e=>String(e).split(/[/\\]/u).pop(),pP=e=>String(e).startsWith(`file:`);function mP(e,t){if(!t)return;let n=fP(t).toLowerCase();return e.find(({filenames:e})=>e?.some(e=>e.toLowerCase()===n))??e.find(({extensions:e})=>e?.some(e=>n.endsWith(e)))}function hP(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 gP=void 0;function _P(e,t){if(t){if(pP(t))try{t=dP(t)}catch{return}if(typeof t==`string`)return e.find(({isSupported:e})=>e?.({filepath:t}))}}function vP(e,t){let n=aP(0,e.plugins).flatMap(e=>e.languages??[]);return(hP(n,t.language)??mP(n,t.physicalFile)??mP(n,t.file)??_P(n,t.physicalFile)??_P(n,t.file)??gP?.(n,t.physicalFile))?.parsers[0]}var yP=vP,bP={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=>bP.value(e)).join(`, `)}]`;let t=Object.keys(e);return t.length===0?`{}`:`{ ${t.map(t=>`${bP.key(t)}: ${bP.value(e[t])}`).join(`, `)} }`},pair:({key:e,value:t})=>bP.value({[e]:t})},xP=new Proxy(String,{get:()=>xP}),SP=xP,CP=()=>xP,wP=(e,t,{descriptor:n})=>{let r=[`${SP.yellow(typeof e==`string`?n.key(e):n.pair(e))} is deprecated`];return t&&r.push(`we now treat it as ${SP.blue(typeof t==`string`?n.key(t):n.pair(t))}`),r.join(`; `)+`.`},TP=Symbol.for(`vnopts.VALUE_NOT_EXIST`),EP=Symbol.for(`vnopts.VALUE_UNCHANGED`),DP=` `.repeat(2),OP=(e,t,n)=>{let{text:r,list:i}=n.normalizeExpectedResult(n.schemas[e].expected(n)),a=[];return r&&a.push(kP(e,t,r,n.descriptor)),i&&a.push([kP(e,t,i.title,n.descriptor)].concat(i.values.map(e=>AP(e,n.loggerPrintWidth))).join(`
360
+ `)),jP(a,n.loggerPrintWidth)};function kP(e,t,n,r){return[`Invalid ${SP.red(r.key(e))} value.`,`Expected ${SP.blue(n)},`,`but received ${t===TP?SP.gray(`nothing`):SP.red(r.value(t))}.`].join(` `)}function AP({text:e,list:t},n){let r=[];return e&&r.push(`- ${SP.blue(e)}`),t&&r.push([`- ${SP.blue(t.title)}:`].concat(t.values.map(e=>AP(e,n-DP.length).replace(/^|\n/g,`$&${DP}`))).join(`
361
+ `)),jP(r,n)}function jP(e,t){if(e.length===1)return e[0];let[n,r]=e,[i,a]=e.map(e=>e.split(`
362
+ `,1)[0].length);return i>t&&i>a?r:n}var MP=[],NP=[];function PP(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;)NP[f]=e.charCodeAt(s+f),MP[f]=++f;for(;p<o;){for(c=t.charCodeAt(s+p),u=p++,l=p,f=0;f<a;f++)d=c===NP[f]?u:u+1,u=MP[f],l=MP[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++)MP[f]<e&&(e=MP[f]);if(e>r)return r}}return MP.length=a,NP.length=a,r!==void 0&&l>r?r:l}function FP(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?PP(e,n):PP(e,n,{maxDistance:c});if(r!==void 0&&l>r)continue;let u=l;if(c!==void 0&&l===c&&c===r&&(u=PP(e,n)),u<o&&(o=u,a=n,o===0))break}if(!(r!==void 0&&o>r))return a}var IP=(e,t,{descriptor:n,logger:r,schemas:i})=>{let a=[`Ignored unknown option ${SP.yellow(n.pair({key:e,value:t}))}.`],o=FP(e,Object.keys(i),{maxDistance:3});o&&a.push(`Did you mean ${SP.blue(n.key(o))}?`),r.warn(a.join(` `))},LP=[`default`,`expected`,`validate`,`deprecated`,`forward`,`redirect`,`overlap`,`preprocess`,`postprocess`];function RP(e,t){let n=new e(t),r=Object.create(n);for(let e of LP)e in t&&(r[e]=BP(t[e],n,zP.prototype[e].length));return r}var zP=class{static create(e){return RP(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 EP}};function BP(e,t,n){return typeof e==`function`?(...r)=>e(...r.slice(0,n-1),t,...r.slice(n-1)):()=>e}var VP=class extends zP{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}},HP=class extends zP{expected(){return`anything`}validate(){return!0}},UP=class extends zP{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(WP))}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(WP))}return n.length===0?{redirect:r}:{redirect:r,remain:n}}overlap(e,t){return e.concat(t)}};function WP({from:e,to:t}){return{from:[e],to:t}}var GP=class extends zP{expected(){return`true or false`}validate(e){return typeof e==`boolean`}};function KP(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 qP(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 JP(){let e=Object.create(null);return t=>{let n=JSON.stringify(t);return e[n]?!0:(e[n]=!0,!1)}}function YP(e,t){let n=[],r=[];for(let i of e)t(i)?n.push(i):r.push(i);return[n,r]}function XP(e){return e===Math.floor(e)}function ZP(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 QP(e){return(...t)=>{let n=e(...t);return typeof n==`string`?Error(n):n}}function $P(e){return e===void 0?{}:e}function eF(e){if(typeof e==`string`)return{text:e};let{text:t,list:n}=e;return oF((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(eF)}}:{text:t}}function tF(e,t){return e===!0?!0:e===!1?{value:t}:e}function nF(e,t,n=!1){return e===!1?!1:e===!0?n?!0:[{value:t}]:`value`in e?[e]:e.length!==0&&e}function rF(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 iF(e,t){return e===void 0?[]:Array.isArray(e)?e.map(e=>rF(e,t)):[rF(e,t)]}function aF(e,t){let n=iF(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 oF(e,t){if(!e)throw Error(t)}var sF=class extends zP{constructor(e){super(e),this._choices=qP(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(ZP).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}},cF=class extends zP{expected(){return`a number`}validate(e,t){return typeof e==`number`}},lF=class extends cF{expected(){return`an integer`}validate(e,t){return t.normalizeValidateResult(super.validate(e,t),e)===!0&&XP(e)}},uF=class extends zP{expected(){return`a string`}validate(e){return typeof e==`string`}},dF=bP,fF=IP,pF=OP,mF=wP,hF=class{constructor(e,t){let{logger:n=console,loggerPrintWidth:r=80,descriptor:i=dF,unknown:a=fF,invalid:o=pF,deprecated:s=mF,missing:c=()=>!1,required:l=()=>!1,preprocess:u=e=>e,postprocess:d=()=>EP}=t||{};this._utils={descriptor:i,logger:n||{warn:()=>{}},loggerPrintWidth:r,schemas:KP(e,`name`),normalizeDefaultResult:$P,normalizeExpectedResult:eF,normalizeDeprecatedResult:nF,normalizeForwardResult:iF,normalizeRedirectResult:aF,normalizeValidateResult:tF},this._unknownHandler=a,this._invalidHandler=QP(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=JP()}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=$P(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!==EP&&(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=nF(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))}}}};iF(r.forward(a,this._utils),a).forEach(o);let c=aF(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,TP,this._utils)}_partitionOptionKeys(e){let[t,n]=YP(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=tF(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!==EP){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})}}}}},gF;function _F(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=bP;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 IP(e,t,{...n,schemas:i})},c=new hF(vF(t,{isCLI:r,FlagSchema:a}),{logger:n,unknown:s,descriptor:o}),l=n!==!1;l&&gF&&(c._hasDeprecationWarned=gF);let u=c.normalize(e);return l&&(gF=c._hasDeprecationWarned),u}function vF(e,{isCLI:t,FlagSchema:n}){let r=[];t&&r.push(HP.create({name:`_`}));for(let i of e)r.push(yF(i,{isCLI:t,optionInfos:e,FlagSchema:n})),i.alias&&t&&r.push(VP.create({name:i.alias,sourceName:i.name}));return r}function yF(e,{isCLI:t,optionInfos:n,FlagSchema:r}){let{name:i}=e,a={name:i},o,s={};switch(e.type){case`int`:o=lF,t&&(a.preprocess=Number);break;case`string`:o=uF;break;case`choice`:o=sF,a.choices=e.choices.map(t=>t?.redirect?{...t,redirect:{to:{key:e.name,value:t.redirect}}}:t);break;case`boolean`:o=GP;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=uF;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)?xj(0,t,-1):t),r)}return e.array?UP.create({...t?{preprocess:e=>Array.isArray(e)?e:[e]}:{},...s,valueSchema:o.create(a)}):o.create({...a,...s})}var bF=_F,xF=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}},SF=ej(`findLast`,function(){if(Array.isArray(this))return xF}),CF=Symbol.for(`PRETTIER_IS_FRONT_MATTER`),wF=[];function TF(e){return!!e?.[CF]}var EF=TF,DF=new Set([`yaml`,`toml`]),OF=({node:e})=>EF(e)&&DF.has(e.language);async function kF(e,t,n,r){let{node:i}=n,{language:a}=i;if(!DF.has(a))return;let o=i.value.trim(),s;if(o){let t=a===`yaml`?a:yP(r,{language:a});if(!t)return;s=o?await e(o,{parser:t}):``}else s=o;return _M([i.startDelimiter,i.explicitLanguage??``,MM,s,s?MM:``,i.endDelimiter])}function AF(e,t){return OF({node:e})&&(delete t.end,delete t.raw,delete t.value),t}var jF=AF;function MF({node:e}){return e.raw}var NF=MF,PF=new Set([`tokens`,`comments`,`parent`,`enclosingNode`,`precedingNode`,`followingNode`]),FF=e=>Object.keys(e).filter(e=>!PF.has(e));function IF(e,t){let n=e?t=>e(t,PF):FF;return t?new Proxy(n,{apply:(e,t,n)=>EF(n[0])?wF:Reflect.apply(e,t,n)}):n}var LF=IF;function RF(e,t){if(!t)throw Error(`parserName is required.`);let n=SF(0,e,e=>e.parsers&&Object.prototype.hasOwnProperty.call(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 QN(r)}function zF(e,t){if(!t)throw Error(`astFormat is required.`);let n=SF(0,e,e=>e.printers&&Object.prototype.hasOwnProperty.call(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 QN(r)}function BF({plugins:e,parser:t}){return VF(RF(e,t),t)}function VF(e,t){let n=e.parsers[t];return typeof n==`function`?n():n}async function HF(e,t){let n=e.printers[t];return WF(typeof n==`function`?await n():n)}var UF=new WeakMap;function WF(e){if(UF.has(e))return UF.get(e);let{features:t,getVisitorKeys:n,embed:r,massageAstNode:i,print:a,...o}=e;t=qF(t);let s=t.experimental_frontMatterSupport;n=LF(n,s.massageAstNode||s.embed||s.print);let c=i;i&&s.massageAstNode&&(c=new Proxy(i,{apply(e,t,n){return jF(...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?LF(r.getVisitorKeys,s.massageAstNode||s.embed):n,e):Reflect.get(t,i,a)},apply:(e,t,n)=>s.embed&&OF(...n)?kF:Reflect.apply(e,t,n)})}let u=a;s.print&&(u=new Proxy(a,{apply(e,t,n){let[r]=n;return EF(r.node)?NF(r):Reflect.apply(e,t,n)}}));let d={features:t,getVisitorKeys:n,embed:l,massageAstNode:c,print:u,...o};return UF.set(e,d),d}var GF=Object.fromEntries([`clean`,`embed`,`print`].map(e=>[e,!1]));function KF(e){return{...GF,...e}}function qF(e){return{experimental_avoidAstMutation:!1,...e,experimental_frontMatterSupport:KF(e?.experimental_frontMatterSupport)}}var JF={astFormat:`estree`,printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null};async function YF(e,t={}){let n={...e};if(!n.parser){if(n.filepath){if(n.parser=yP(n,{physicalFile:n.filepath}),!n.parser)throw new $N(`No parser could be inferred for file "${n.filepath}".`)}else throw new $N(`No parser and no file path given, couldn't infer a parser.`)}let r=tP({plugins:e.plugins,showDeprecated:!0}).options,i={...JF,...Object.fromEntries(r.filter(e=>e.default!==void 0).map(e=>[e.name,e.default]))},a=RF(n.plugins,n.parser),o=await VF(a,n.parser);n.astFormat=o.astFormat,n.locEnd=o.locEnd,n.locStart=o.locStart;let s=a.printers?.[o.astFormat]?a:zF(n.plugins,o.astFormat),c=await HF(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]===null||n[e]===void 0)&&(n[e]=t);return n.parser===`json`&&(n.trailingComma=`none`),bF(n,r,{passThrough:Object.keys(JF),...t})}var XF=YF;QA($A(),1);var ZF=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,QF=`·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`;RegExp(`[`+ZF+`]`),RegExp(`[`+ZF+QF+`]`),ZF=QF=null;var $F={keyword:`break.case.catch.continue.debugger.default.do.else.finally.for.function.if.return.switch.throw.try.var.const.while.with.new.this.super.class.extends.export.import.null.true.false.in.instanceof.typeof.void.delete`.split(`.`),strict:[`implements`,`interface`,`let`,`package`,`private`,`protected`,`public`,`static`,`yield`],strictBind:[`eval`,`arguments`]};new Set($F.keyword),new Set($F.strict),new Set($F.strictBind);var eI=(e,t)=>n=>e(t(n));function tI(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.gray,invalid:eI(eI(e.white,e.bgRed),e.bold),gutter:e.gray,marker:eI(e.red,e.bold),message:eI(e.red,e.bold),reset:e.reset}}tI(CP(!0)),tI(CP(!1));function nI(){return new Proxy({},{get:()=>e=>e})}var rI=/\r\n|[\n\r\u2028\u2029]/;function iI(e,t,n){let r=Object.assign({column:0,line:-1},e.start),i=Object.assign({},r,e.end),{linesAbove:a=2,linesBelow:o=3}=n||{},s=r.line,c=r.column,l=i.line,u=i.column,d=Math.max(s-(a+1),0),f=Math.min(t.length,l+o);s===-1&&(d=0),l===-1&&(f=t.length);let p=l-s,m={};if(p)for(let e=0;e<=p;e++){let n=e+s;m[n]=c?e===0?[c,t[n-1].length-c+1]:e===p?[0,u]:[0,t[n-e].length]:!0}else m[s]=c===u?!c||[c,0]:[c,u-c];return{start:d,end:f,markerLines:m}}function aI(e,t,n={}){let r=nI(!1),{start:i,end:a,markerLines:o}=iI(t,e.split(rI),n),s=t.start&&typeof t.start.column==`number`,c=String(a).length,l=e.split(rI,a).slice(i,a).map((e,t)=>{let a=i+1+t,s=` ${` ${a}`.slice(-c)} |`,l=o[a],u=!o[a+1];if(l){let t=``;if(Array.isArray(l)){let i=e.slice(0,Math.max(l[0]-1,0)).replace(/[^\t]/g,` `),a=l[1]||1;t=[`
363
363
  `,r.gutter(s.replace(/\d/g,` `)),` `,i,r.marker(`^`).repeat(a)].join(``),u&&n.message&&(t+=` `+r.message(n.message))}return[r.marker(`>`),r.gutter(s),e.length>0?` ${e}`:``,t].join(``)}return` ${r.gutter(s)}${e.length>0?` ${e}`:``}`}).join(`
364
364
  `);return n.message&&!s&&(l=`${` `.repeat(c+1)}${n.message}
365
- ${l}`),l}async function sI(e,t){let n=await VF(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){cI(t,e)}return{text:r,ast:i}}function cI(e,t){let{loc:n}=e;if(n){let r=oI(t,n,{highlightCode:!0});throw e.message+=`
366
- `+r,e.codeFrame=r,e}throw e}var lI=sI;async function uI(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 dI(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 dI(e,t,n,r){let i=await ZF({...n,...t,parentParser:n.parser,originalText:e,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:a}=await lI(e,i);return iM(await r(a,i))}function fI(e,t,n,r){let{originalText:i,[Symbol.for(`comments`)]: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 pI=fI;async function mI(e,t){({ast:e}=await gI(e,t));let n=new Map,r=new uN(e),i=QN(t),a=new Map;await uI(r,s,t,mI,a);let o=await hI(r,t,s,void 0,a);if(ZN(t),t.cursorOffset>=0){if(t.nodeAfterCursor&&!t.nodeBeforeCursor)return[SM,o];if(t.nodeBeforeCursor&&!t.nodeAfterCursor)return[o,SM]}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=fN(o)&&e===void 0;if(c&&n.has(o))return n.get(o);let l=hI(r,t,s,e,a);return c&&n.set(o,l),l}}function hI(e,t,n,r,i){let{node:a}=e,{printer:o}=t,s;switch(s=o.hasPrettierIgnore?.(e)?pI(e,t,n,r):i.has(a)?i.get(a):o.print(e,t,n,r),a){case t.cursorNode:s=uM(s,e=>[SM,e,SM]);break;case t.nodeBeforeCursor:s=uM(s,e=>[e,SM]);break;case t.nodeAfterCursor:s=uM(s,e=>[SM,e])}return o.printComment&&!o.willPrintOwnComments?.(e,t)&&(s=XN(e,s,t)),s}async function gI(e,t){let n=e.comments??[];t[Symbol.for(`comments`)]=n,t[Symbol.for(`printedComments`)]=new Set,RN(e,t);let{printer:{preprocess:r}}=t;return e=r?await r(e,t):e,{ast:e,comments:n}}function _I(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 EN(e,{getVisitorKeys:a,filter:o}))c.push(t),s=t;if(DN(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 TN(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 vI=_I;function yI(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(!fN(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)!Object.prototype.hasOwnProperty.call(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 bI=yI,xI=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},SI=tj(`findLastIndex`,function(){if(Array.isArray(this))return xI}),CI=({parser:e})=>e===`json`||e===`json5`||e===`jsonc`||e===`json-stringify`;function wI(e,t){return t=new Set(t),e.find(e=>kI.has(e.type)&&t.has(e))}function TI(e){let t=SI(0,e,e=>e.type!==`Program`&&e.type!==`File`);return t===-1?e:e.slice(0,t+1)}function EI(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 TI(s))if(n(e)>=c)o=e;else break;let l=r(o);for(let e of TI(a)){if(r(e)<=l)i=e;else break;if(i===o)break}return[i,o]}function DI(e,t,n,r,i=[],a){let{locStart:o,locEnd:s}=n,c=o(e),l=s(e);if(t>l||t<c||a===`rangeEnd`&&t===c||a===`rangeStart`&&t===l)return;let u=[e,...i],d=kN(e,u,{cache:FN,locStart:o,locEnd:s,getVisitorKeys:n.getVisitorKeys,filter:n.printer.canAttachComment,getChildren:n.printer.getCommentChildNodes});for(let e of d){let i=DI(e,t,n,r,u,a);if(i)return i}if(r(e,i[0]))return u}function OI(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 kI=new Set([`JsonRoot`,`ObjectExpression`,`ArrayExpression`,`StringLiteral`,`NumericLiteral`,`BooleanLiteral`,`NullLiteral`,`UnaryExpression`,`TemplateLiteral`]),AI=new Set([`OperationDefinition`,`FragmentDefinition`,`VariableDefinition`,`TypeExtensionDefinition`,`ObjectTypeDefinition`,`FieldDefinition`,`DirectiveDefinition`,`EnumTypeDefinition`,`EnumValueDefinition`,`InputValueDefinition`,`InputObjectTypeDefinition`,`SchemaDefinition`,`OperationTypeDefinition`,`InterfaceTypeDefinition`,`UnionTypeDefinition`,`ScalarTypeDefinition`]);function jI(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`__babel_estree`:return OI(t.type,n?.type);case`json`:case`json5`:case`jsonc`:case`json-stringify`:return kI.has(t.type);case`graphql`:return AI.has(t.kind);case`vue`:return t.tag!==`root`}return!1}function MI(e,t,n){let{rangeStart:r,rangeEnd:i,locStart:a,locEnd:o}=t,s=e.slice(r,i).search(/\S/u),c=s===-1;if(!c)for(r+=s;i>r&&!/\S/u.test(e[i-1]);--i);let l=DI(n,r,t,(e,n)=>jI(t,e,n),[],`rangeStart`);if(!l)return;let u=c?l:DI(n,i,t,e=>jI(t,e),[],`rangeEnd`);if(!u)return;let d,f;if(CI(t)){let e=wI(l,u);d=e,f=e}else[d,f]=EI(l,u,t);return[Math.min(a(d),a(f)),Math.max(o(d),o(f))]}var NI=``,PI=Symbol(`cursor`);async function FI(e,t,n=0){if(!e||e.trim().length===0)return{formatted:``,cursorOffset:-1,comments:[]};let{ast:r,text:i}=await lI(e,t);t.cursorOffset>=0&&(t={...t,...vI(r,t)});let a=await mI(r,t,n);n>0&&(a=bM([NM,a],n,t.tabWidth));let o=sN(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+gj(t.endOfLine)}let s=t[Symbol.for(`comments`)];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,PI);let u=oj(l,a.split(``)),d=r;for(let e of u)if(e.removed){if(e.value.includes(PI))break}else d+=e.count;return{formatted:o.formatted,cursorOffset:d,comments:s}}return{formatted:o.formatted,cursorOffset:-1,comments:s}}async function II(e,t){let{ast:n,text:r}=await lI(e,t),[i,a]=MI(r,t,n)??[0,0],o=r.slice(i,a),s=Math.min(i,r.lastIndexOf(`
367
- `,i)+1),c=r.slice(s,i).match(/^\s*/u)[0],l=lN(c,t.tabWidth),u=await FI(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=gj(t.endOfLine);f>=0&&e===`\r
368
- `&&(f+=vj(p.slice(0,f),`
369
- `)),p=rj(0,p,`
370
- `,e)}return{formatted:p,cursorOffset:f,comments:u.comments}}function LI(e,t,n){return typeof t!=`number`||Number.isNaN(t)||t<0||t>e.length?n:t}function RI(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i}=t;return n=LI(e,n,-1),r=LI(e,r,0),i=LI(e,i,e.length),{...t,cursorOffset:n,rangeStart:r,rangeEnd:i}}function zI(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:a}=RI(e,t),o=e.charAt(0)===NI;if(o&&(e=e.slice(1),n--,r--,i--),a===`auto`&&(a=hj(e)),e.includes(`\r`)){let t=t=>vj(e.slice(0,Math.max(t,0)),`\r
371
- `);n-=t(n),r-=t(r),i-=t(i),e=bj(e)}return{hasBOM:o,text:e,options:RI(e,{...t,cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:a})}}async function BI(e,t){let n=await VF(t);return!n.hasPragma||n.hasPragma(e)}async function VI(e,t){return(await VF(t)).hasIgnorePragma?.(e)}async function HI(e,t){let{hasBOM:n,text:r,options:i}=zI(e,await ZF(t));if(i.rangeStart>=i.rangeEnd&&r!==``||i.requirePragma&&!await BI(r,i)||i.checkIgnorePragma&&await VI(r,i))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let a;return i.rangeStart>0||i.rangeEnd<r.length?a=await II(r,i):(!i.requirePragma&&i.insertPragma&&i.printer.insertPragma&&!await BI(r,i)&&(r=i.printer.insertPragma(r)),a=await FI(r,i)),n&&(a.formatted=NI+a.formatted,a.cursorOffset>=0&&a.cursorOffset++),a}async function UI(e,t,n){let{text:r,options:i}=zI(e,await ZF(t)),a=await lI(r,i);return n&&(n.preprocessForPrint&&(a.ast=await gI(a.ast,i)),n.massage&&(a.ast=bI(a.ast,i))),a}async function WI(e,t){return t=await ZF(t),sN(await mI(e,t),t)}async function GI(e,t){let{formatted:n}=await HI(BM(e),{...t,parser:`__js_expression`});return n}async function KI(e,t){t=await ZF(t);let{ast:n}=await lI(e,t);return t.cursorOffset>=0&&(t={...t,...vI(n,t)}),mI(n,t)}async function qI(e,t){return sN(e,await ZF(t))}var JI={};ZA(JI,{builders:()=>YI,printer:()=>XI,utils:()=>ZI});var YI={join:OM,line:AM,softline:jM,hardline:NM,literalline:FM,group:wM,conditionalGroup:TM,fill:CM,lineSuffix:IM,lineSuffixBoundary:LM,cursor:SM,breakParent:xM,ifBreak:EM,trim:RM,indent:hM,indentIfBreak:DM,align:gM,addAlignmentToDoc:bM,markAsRoot:vM,dedentToRoot:_M,dedent:yM,hardlineWithoutBreakParent:MM,literallineWithoutBreakParent:PM,label:kM,concat:e=>e},XI={printDocToString:sN},ZI={willBreak:Zj,traverseDoc:qj,findInDoc:Yj,mapDoc:Jj,removeLines:tM,stripTrailingHardline:iM,replaceEndOfLine:sM,canBreak:lM},QI=`3.8.3`,$I={};ZA($I,{addDanglingComment:()=>NN,addLeadingComment:()=>MN,addTrailingComment:()=>PN,getAlignmentSize:()=>lN,getIndentSize:()=>lL,getMaxContinuousCount:()=>fL,getNextNonSpaceNonCommentCharacter:()=>mL,getNextNonSpaceNonCommentCharacterIndex:()=>EL,getPreferredQuote:()=>bL,getStringWidth:()=>JM,hasNewline:()=>SN,hasNewlineInRange:()=>SL,hasSpaces:()=>wL,isNextLineEmpty:()=>jL,isNextLineEmptyAfterIndex:()=>sL,isPreviousLineEmpty:()=>OL,makeString:()=>AL,skip:()=>pN,skipEverythingButNewLine:()=>_N,skipInlineComment:()=>tL,skipNewline:()=>bN,skipSpaces:()=>hN,skipToLineEnd:()=>gN,skipTrailingComment:()=>rL,skipWhitespace:()=>mN});function eL(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 tL=eL;function nL(e,t){return t===!1?!1:e.charAt(t)===`/`&&e.charAt(t+1)===`/`?_N(e,t):t}var rL=nL;function iL(e,t){let n=null,r=t;for(;r!==n;)n=r,r=hN(e,r),r=tL(e,r),r=rL(e,r),r=bN(e,r);return r}var aL=iL;function oL(e,t){let n=null,r=t;for(;r!==n;)n=r,r=gN(e,r),r=tL(e,r),r=hN(e,r);return r=rL(e,r),r=bN(e,r),r!==!1&&SN(e,r)}var sL=oL;function cL(e,t){let n=e.lastIndexOf(`
372
- `);return n===-1?0:lN(e.slice(n+1).match(/^[\t ]*/u)[0],t)}var lL=cL;function uL(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function dL(e,t){let n=e.matchAll(RegExp(`(?:${uL(t)})+`,`gu`));return n.reduce||(n=[...n]),n.reduce((e,[t])=>Math.max(e,t.length),0)/t.length}var fL=dL;function pL(e,t){let n=aL(e,t);return n===!1?``:e.charAt(n)}var mL=pL,hL=Object.freeze({character:`'`,codePoint:39}),gL=Object.freeze({character:`"`,codePoint:34}),_L=Object.freeze({preferred:hL,alternate:gL}),vL=Object.freeze({preferred:gL,alternate:hL});function yL(e,t){let{preferred:n,alternate:r}=t===!0||t===`'`?_L:vL,{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 bL=yL;function xL(e,t,n){for(let r=t;r<n;++r)if(e.charAt(r)===`
373
- `)return!0;return!1}var SL=xL;function CL(e,t,n={}){return hN(e,n.backwards?t-1:t,n)!==t}var wL=CL;function TL(e,t,n){return aL(e,n(t))}function EL(e,t){return arguments.length===2||typeof t==`number`?aL(e,t):TL(...arguments)}function DL(e,t,n){return GN(e,n(t))}function OL(e,t){return arguments.length===2||typeof t==`number`?GN(e,t):DL(...arguments)}function kL(e,t,n){return sL(e,n(t))}function AL(e,t,n){let r=t===`"`?`'`:`"`;return t+rj(0,e,/\\(.)|(["'])/gsu,(e,i,a)=>i===r?i:a===t?`\\`+a:a||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(i)?i:`\\`+i))+t}function jL(e,t){return arguments.length===2||typeof t==`number`?sL(e,t):kL(...arguments)}function ML(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)},e(...n)}}var NL=ML(HI);async function PL(e,t){let{formatted:n}=await NL(e,{...t,cursorOffset:-1});return n}async function FL(e,t){return await PL(e,t)===e}var IL=ML(nP,0),LL={parse:ML(UI),formatAST:ML(WI),formatDoc:ML(GI),printToDoc:ML(KI),printDocToString:ML(qI)},RL=Object.getOwnPropertyNames,zL=((e,t)=>function(){return t||(0,e[RL(e)[0]])((t={exports:{}}).exports,t),t.exports})({"fillers/json-schema.json"(e,t){t.exports={}}});function BL(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 VL(e,t){var n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:n===0&&e===t}function HL(e){return BL(e,`(?i)`)?new RegExp(e.substring(4),`i`):new RegExp(e)}function UL(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(!UL(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(),!UL(i,a))return!1;for(n=0;n<i.length;n++)if(!UL(e[i[n]],t[i[n]]))return!1}return!0}function WL(e){return typeof e==`number`}function GL(e){return e!==void 0}function KL(e){return typeof e==`boolean`}function qL(e){return typeof e==`string`}var JL;(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`})(JL||={});var YL;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[dc.Markdown,dc.PlainText],commitCharactersSupport:!0}}}}})(YL||={});var XL=(e,t,...n)=>n.length===0?t:t.replaceAll(/{(\d+)}/g,(e,[t])=>t in n?String(n[t]):e);function ZL(){return XL}var QL=(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)}})(),$L=ZL(),eR={"color-hex":{errorMessage:$L(`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:$L(`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:$L(`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:$L(`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:$L(`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,}))$/}},tR=(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){QL(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.type=`null`,r.value=null,r}return t})(tR),(function(e){QL(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})(tR),(function(e){QL(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})(tR),(function(e){QL(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})(tR),(function(e){QL(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})(tR),(function(e){QL(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})(tR),(function(e){QL(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})(tR);function nR(e){return KL(e)?e?{}:{not:{}}:e}var rR;(function(e){e[e.Key=0]=`Key`,e[e.Enum=1]=`Enum`})(rR||={});var iR=(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||cR(e,this.focusOffset))&&e!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e})(),aR=(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})(),oR=(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===JL.EnumValueMismatch&&(r.message=$L(`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 sR(e){return Os(e)}function cR(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 Ds(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=I.Warning),this.root&&t){var r=new oR;return lR(this.root,t,r,aR.instance),r.problems.map(function(t){var r=F.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return Js.create(r,t.message,t.severity??n,t.code)})}},e.prototype.getMatchingSchemas=function(e,t,n){t===void 0&&(t=-1);var r=new iR(t,n);return this.root&&e&&lR(this.root,e,new oR,r),r.schemas},e})();function lR(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 lR(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||$L(`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||$L(`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];lR(i,nR(s),n,r)}var c=nR(t.not);if(c){var l=new oR,u=r.newSub();lR(i,c,l,u),l.hasProblems()||n.problems.push({location:{offset:i.offset,length:i.length},message:$L(`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=nR(l),d=new oR,f=r.newSub();if(lR(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:$L(`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 oR,a=r.newSub();lR(i,nR(e),t,a),n.merge(t),n.propertiesMatches+=t.propertiesMatches,n.propertiesValueMatches+=t.propertiesValueMatches,r.merge(a)},g=function(e,t,n){var a=nR(e),o=new oR,s=r.newSub();lR(i,a,o,s),r.merge(s),o.hasProblems()?n&&h(n):t&&h(t)},_=nR(t.if);if(_&&g(_,nR(t.then),nR(t.else)),Array.isArray(t.enum)){for(var v=sR(i),y=!1,b=0,x=t.enum;b<x.length;b++){var S=x[b];if(UL(v,S)){y=!0;break}}n.enumValues=t.enum,n.enumValueMatch=y,y||n.problems.push({location:{offset:i.offset,length:i.length},code:JL.EnumValueMismatch,message:t.errorMessage||$L(`enumWarning`,`Value is not accepted. Valid values: {0}.`,t.enum.map(function(e){return JSON.stringify(e)}).join(`, `))})}if(GL(t.const)){var v=sR(i);UL(v,t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:i.offset,length:i.length},code:JL.EnumValueMismatch,message:t.errorMessage||$L(`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:I.Warning,message:t.deprecationMessage,code:JL.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(WL(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:$L(`multipleOfWarning`,`Value is not divisible by {0}.`,t.multipleOf)})}function u(e,t){if(WL(t))return t;if(KL(t)&&t)return e}function d(e,t){if(!KL(t)||!t)return e}var f=u(t.minimum,t.exclusiveMinimum);WL(f)&&i<=f&&n.problems.push({location:{offset:e.offset,length:e.length},message:$L(`exclusiveMinimumWarning`,`Value is below the exclusive minimum of {0}.`,f)});var p=u(t.maximum,t.exclusiveMaximum);WL(p)&&i>=p&&n.problems.push({location:{offset:e.offset,length:e.length},message:$L(`exclusiveMaximumWarning`,`Value is above the exclusive maximum of {0}.`,p)});var m=d(t.minimum,t.exclusiveMinimum);WL(m)&&i<m&&n.problems.push({location:{offset:e.offset,length:e.length},message:$L(`minimumWarning`,`Value is below the minimum of {0}.`,m)});var h=d(t.maximum,t.exclusiveMaximum);WL(h)&&i>h&&n.problems.push({location:{offset:e.offset,length:e.length},message:$L(`maximumWarning`,`Value is above the maximum of {0}.`,h)})}function s(e,t,n,r){if(WL(t.minLength)&&e.value.length<t.minLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:$L(`minLengthWarning`,`String is shorter than the minimum length of {0}.`,t.minLength)}),WL(t.maxLength)&&e.value.length>t.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:$L(`maxLengthWarning`,`String is longer than the maximum length of {0}.`,t.maxLength)}),qL(t.pattern)&&(HL(t.pattern).test(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||$L(`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=$L(`uriEmpty`,`URI expected.`);else{var a=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);a?!a[2]&&t.format===`uri`&&(i=$L(`uriSchemeMissing`,`URI with a scheme is expected.`)):i=$L(`uriMissing`,`URI is expected.`)}i&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||$L(`uriFormatWarning`,`String is not a URI: {0}`,i)});break;case`color-hex`:case`date-time`:case`date`:case`time`:case`email`:var o=eR[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=nR(o),c=new oR,l=e.items[a];l?(lR(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 oR;lR(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:$L(`additionalItemsWarning`,`Array has too many items according to schema. Expected {0} or fewer.`,i.length)})}}else{var d=nR(t.items);if(d)for(var f=0,p=e.items;f<p.length;f++){var l=p[f],c=new oR;lR(l,d,c,r),n.mergePropertyMatch(c)}}var m=nR(t.contains);if(m&&(e.items.some(function(e){var t=new oR;return lR(e,m,t,aR.instance),!t.hasProblems()})||n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||$L(`requiredItemMissingWarning`,`Array does not contain required item.`)})),WL(t.minItems)&&e.items.length<t.minItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:$L(`minItemsWarning`,`Array has too few items. Expected {0} or more.`,t.minItems)}),WL(t.maxItems)&&e.items.length>t.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:$L(`maxItemsWarning`,`Array has too many items. Expected {0} or fewer.`,t.maxItems)}),t.uniqueItems===!0){var h=sR(e);h.some(function(e,t){return t!==h.lastIndexOf(e)})&&n.problems.push({location:{offset:e.offset,length:e.length},message:$L(`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:$L(`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(KL(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||$L(`DisallowedExtraPropWarning`,`Property {0} is not allowed.`,f)})}}else{var b=new oR;lR(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],w=HL(C),T=0,ee=a.slice(0);T<ee.length;T++){var f=ee[T];if(w.test(f)){h(f);var y=i[f];if(y){var v=t.patternProperties[C];if(KL(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||$L(`DisallowedExtraPropWarning`,`Property {0} is not allowed.`,f)})}}else{var b=new oR;lR(y,v,b,r),n.mergePropertyMatch(b)}}}}if(typeof t.additionalProperties==`object`)for(var E=0,te=a;E<te.length;E++){var f=te[E],y=i[f];if(y){var b=new oR;lR(y,t.additionalProperties,b,r),n.mergePropertyMatch(b)}}else if(t.additionalProperties===!1&&a.length>0)for(var D=0,ne=a;D<ne.length;D++){var f=ne[D],y=i[f];if(y){var c=y.parent;n.problems.push({location:{offset:c.keyNode.offset,length:c.keyNode.length},message:t.errorMessage||$L(`DisallowedExtraPropWarning`,`Property {0} is not allowed.`,f)})}}if(WL(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:$L(`MaxPropWarning`,`Object has more properties than limit of {0}.`,t.maxProperties)}),WL(t.minProperties)&&e.properties.length<t.minProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:$L(`MinPropWarning`,`Object has fewer properties than the required number of {0}`,t.minProperties)}),t.dependencies)for(var re=0,O=Object.keys(t.dependencies);re<O.length;re++){var l=O[re];if(i[l]){var ie=t.dependencies[l];if(Array.isArray(ie))for(var ae=0,oe=ie;ae<oe.length;ae++){var se=oe[ae];i[se]?n.propertiesValueMatches++:n.problems.push({location:{offset:e.offset,length:e.length},message:$L(`RequiredDependentPropWarning`,`Object is missing property {0} required by property {1}.`,se,l)})}else{var v=nR(ie);if(v){var b=new oR;lR(e,v,b,r),n.mergePropertyMatch(b)}}}}var ce=nR(t.propertyNames);if(ce)for(var le=0,ue=e.properties;le<ue.length;le++){var l=ue[le].keyNode;l&&lR(l,ce,n,aR.instance)}}}function uR(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 dR=ZL(),fR=`!`,pR=`/`,mR=(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]!==fR;a||(i=i.substring(1)),i.length>0&&(i[0]===pR&&(i=i.substring(1)),this.globWrappers.push({regexp:uR(`**/`+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})(),hR=(function(){function e(e,t,n){this.service=e,this.url=t,this.dependencies={},n&&(this.unresolvedSchema=this.service.promise.resolve(new gR(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})(),gR=(function(){function e(e,t){t===void 0&&(t=[]),this.schema=e,this.errors=t}return e})(),_R=(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 nR(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(HL(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})(),vR=(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=js.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=bR(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=bR(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(bR),l=this.addFilePatternAssociation(s.pattern,c);this.contributionAssociations.push(l)}},e.prototype.addSchemaHandle=function(e,t){var n=new hR(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 mR(e,t);return this.filePatternAssociations.push(n),n},e.prototype.registerExternalSchema=function(e,t,n){var r=bR(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=bR(e),n=this.schemasById[t];return n?n.getResolvedSchema():this.promise.resolve(void 0)},e.prototype.loadSchema=function(e){if(!this.requestService){var t=dR(`json.schema.norequestservice`,`Unable to load schema from '{0}'. No schema request service available`,SR(e));return this.promise.resolve(new gR({},[t]))}return this.requestService(e).then(function(t){if(!t)return new gR({},[dR(`json.schema.nocontent`,`Unable to load schema from '{0}': No content.`,SR(e))]);var n={},r=[];n=Es(t,r);var i=r.length?[dR(`json.schema.invalidFormat`,`Unable to parse content from '{0}': Parse error at offset {1}.`,SR(e),r[0].offset)]:[];return new gR(n,i)},function(t){var n=t.toString(),r=t.toString().split(`Error: `);return r.length>1&&(n=r[1]),VL(n,`.`)&&(n=n.substr(0,n.length-1)),new gR({},[dR(`json.schema.nocontent`,`Unable to load schema from '{0}': {1}.`,SR(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=bR(a.$schema);if(o===`http://json-schema.org/draft-03/schema`)return this.promise.resolve(new _R({},[dR(`json.schema.draft03.notsupported`,`Draft-03 schemas are not supported.`)]));o===`https://json-schema.org/draft/2019-09/schema`&&i.push(dR(`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(dR(`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=bR(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(dR(`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=[...arguments],t=0,n=e;t<n.length;t++){var r=n[t];typeof r==`object`&&a.push(r)}},d=function(){for(var e=[...arguments],t=0,n=e;t<n.length;t++){var r=n[t];if(typeof r==`object`)for(var i in r){var o=r[i];typeof o==`object`&&a.push(o)}}},f=function(){for(var e=[...arguments],t=0,n=e;t<n.length;t++){var r=n[t];if(Array.isArray(r))for(var i=0,o=r;i<o.length;i++){var s=o[i];typeof s==`object`&&a.push(s)}}},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 _R(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=sR(r);if(i&&BL(i,`.`)&&this.contextService&&(i=this.contextService.resolveRelativePath(i,e)),i){var a=bR(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=xR(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/`+yR++;return this.resolveSchemaContent(new gR(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})(),yR=0;function bR(e){try{return js.parse(e).toString()}catch{return e}}function xR(e){try{return js.parse(e).with({fragment:null,query:null}).toString()}catch{return e}}function SR(e){try{var t=js.parse(e);if(t.scheme===`file`)return t.fsPath}catch{}return e}var CR;(function(e){e.draft04=`draft04`,e.draft07=`draft07`,e.draft2019=`draft2019-09`,e.draft2020=`draft2020-12`})(CR||={});function wR(e){switch(e.type){case`array`:return e.children.map(wR);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]=wR(i))}return t}case`null`:case`string`:case`number`:return e.value;case`boolean`:return e.source;default:return}}function TR(e,t,n=!1){return t>=e.offset&&t<=e.offset+e.length||n&&t===e.offset+e.length}function ER(e,t,n){if(n===void 0&&(n=!1),TR(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=ER(r[e],t,n);if(i)return i}return e}}function DR(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 OR(e,t,n){if(n===`boolean`&&typeof e==`string`&&(e=DR(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(!OR(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(),!OR(n,a))return!1;for(r=0;r<n.length;r++)if(!OR(e[n[r]],t[n[r]]))return!1}return!0}function kR(e){return typeof e==`number`}function AR(e){return e!==void 0}function jR(e){return typeof e==`boolean`}function MR(e){return typeof e==`string`}function NR(e){return Symbol.iterator in Object(e)}function PR(e){let t=e.type&&e.closestTitle;return e.title?e.title:e.$id?FR(e.$id):e.$ref||e._$ref?FR(e.$ref||e._$ref):Array.isArray(e.type)?e.type.join(` | `):t?e.type.concat(`(`,e.closestTitle,`)`):e.type||e.closestTitle}function FR(e){let t=e.match(/^(?:.*\/)?(.*?)(?:\.schema\.json)?$/),n=!!t&&t[1];return n||(n=`typeNotFound`,console.error(`$ref (${e}) not parsed properly`)),n}function IR(e,t){let n=js.parse(t),r=Sl(n.fsPath);return Cl(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 LR(e){return e.type!==`object`&&!RR(e)}function RR(e){return!!(e.anyOf||e.allOf||e.oneOf)}function zR(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 BR(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 VR(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 HR(e){return e.replace(/[-\\{}+?|^$.,[\]()#\s]/g,`\\$&`).replace(/[*]/g,`.*`)}function UR(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 WR(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 GR(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 KR=class{constructor(e){try{this.patternRegExp=RegExp(HR(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 qR(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 JR=ZL(),YR=(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:I.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?$R(n.trailingCommas):I.Error,c=n?.comments?$R(n.comments):i.commentSeverity,l=n?.schemaValidation?$R(n.schemaValidation):I.Warning,u=n?.schemaRequest?$R(n.schemaRequest):I.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=F.create(e.positionAt(p.offset),e.positionAt(p.offset+p.length));s(Js.create(m,r.errors[0],u,JL.SchemaResolveError))}else{var m=F.create(e.positionAt(d.offset),e.positionAt(d.offset+1));s(Js.create(m,r.errors[0],u,JL.SchemaResolveError))}}else if(l){var h=t.validate(e,r.schema,l);h&&h.forEach(s)}ZR(r.schema)&&(c=void 0),QR(r.schema)&&(o=void 0)}for(var g=0,_=t.syntaxErrors;g<_.length;g++){var v=_[g];if(v.code===JL.TrailingComma){if(typeof o!=`number`)continue;v.severity=o}s(v)}if(typeof c==`number`){var y=JR(`InvalidCommentToken`,`Comments are not permitted in JSON.`);t.comments.forEach(function(e){s(Js.create(e,y,c,JL.CommentNotPermitted))})}return a};if(r){var l=r.id||`schemaservice://untitled/`+XR++;return this.jsonSchemaService.resolveSchemaContent(new gR(r),l,{}).then(function(e){return c(e)})}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then(function(e){return c(e)})},e})(),XR=0;function ZR(e){if(e&&typeof e==`object`){if(KL(e.allowComments))return e.allowComments;if(e.allOf)for(var t=0,n=e.allOf;t<n.length;t++){var r=n[t],i=ZR(r);if(KL(i))return i}}}function QR(e){if(e&&typeof e==`object`){if(KL(e.allowTrailingCommas))return e.allowTrailingCommas;var t=e;if(KL(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(var n=0,r=e.allOf;n<r.length;n++){var i=r[n],a=QR(i);if(KL(a))return a}}}function $R(e){switch(e){case`error`:return I.Error;case`warning`:return I.Warning;case`ignore`:return}}var ez=48,tz=57,nz=65,rz=97,iz=102;function az(e){return e<ez?0:e<=tz?e-ez:(e<rz&&(e+=rz-nz),e>=rz&&e<=iz?e-rz+10:0)}function oz(e){if(e[0]===`#`)switch(e.length){case 4:return{red:az(e.charCodeAt(1))*17/255,green:az(e.charCodeAt(2))*17/255,blue:az(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:az(e.charCodeAt(1))*17/255,green:az(e.charCodeAt(2))*17/255,blue:az(e.charCodeAt(3))*17/255,alpha:az(e.charCodeAt(4))*17/255};case 7:return{red:(az(e.charCodeAt(1))*16+az(e.charCodeAt(2)))/255,green:(az(e.charCodeAt(3))*16+az(e.charCodeAt(4)))/255,blue:(az(e.charCodeAt(5))*16+az(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(az(e.charCodeAt(1))*16+az(e.charCodeAt(2)))/255,green:(az(e.charCodeAt(3))*16+az(e.charCodeAt(4)))/255,blue:(az(e.charCodeAt(5))*16+az(e.charCodeAt(6)))/255,alpha:(az(e.charCodeAt(7))*16+az(e.charCodeAt(8)))/255}}}var sz=(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`||VL(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=Rs.create(e.uri,cz(e,u));if(s.push({name:sR(p.valueNode),kind:Oc.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=Rs.create(e.uri,cz(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`||VL(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=cz(e,u),h=cz(e,p.keyNode);if(s.push({name:sR(p.valueNode),kind:Oc.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=cz(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=cz(e,t),s=cz(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 Oc.Module;case`string`:return Oc.String;case`number`:return Oc.Number;case`array`:return Oc.Array;case`boolean`:return Oc.Boolean;default:return Oc.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=oz(sR(u.node));if(f){var p=cz(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:Xs.replace(r,JSON.stringify(l))}),i},e})();function cz(e,t){return F.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function lz(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=dz(t,i);if(a){var o=e.positionAt(a.offset);n.push({target:e.uri+`#`+(o.line+1)+`,`+(o.character+1),range:uz(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function uz(e,t){return F.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function dz(e,t){var n=pz(t);return n?fz(n,e.root):null}function fz(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?fz(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?fz(e,a):null}return null}function pz(e){return e===`#`?[]:e[0]!==`#`||e[1]!==`/`?null:e.substring(2).split(/\//).map(mz)}function mz(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}var hz=`YAML`,gz=`yaml-schema: `,_z;(function(e){e.missingRequiredPropWarning=`missingRequiredPropWarning`,e.typeMismatchWarning=`typeMismatchWarning`,e.constWarning=`constWarning`})(_z||={});var vz={[_z.missingRequiredPropWarning]:`Missing property "{0}".`,[_z.typeMismatchWarning]:`Incorrect type. Expected "{0}".`,[_z.constWarning]:`Value must be {0}.`},yz=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||TR(e,this.focusOffset))&&e!==this.exclude}newSub(){return new e(-1,this.exclude)}},bz=class{constructor(){}get schemas(){return[]}add(){}merge(){}include(){return!0}newSub(){return this}};bz.instance=new bz;var xz={"color-hex":{errorMessage:R(`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:R(`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:R(`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:R(`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:R(`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:R(`String does not match IPv4 format.`),pattern:/^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$/},ipv6:{errorMessage:R(`String does not match IPv6 format.`),pattern:/^([0-9a-f]|:){1,4}(:([0-9a-f]{0,4})*){1,7}$/i}},Sz=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===JL.EnumValueMismatch&&(e.message=R(`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!==_z.missingRequiredPropWarning||VR(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=Tz(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(gz,``);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}},Cz=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`&&NR(e.properties)&&n.push(...e.properties)})}}else t[r]=e.valueNode}return t}validateDocument(e,t,n,r){let i=new Sz(r.isKubernetes);return this.validateNode(e,n,n,i,bz.instance,r),i.problems.map(e=>{let n=F.create(t.positionAt(e.location.offset),t.positionAt(e.location.offset+e.location.length)),r=Js.create(n,e.message,e.severity,e.code?e.code:JL.Undefined,e.source);return r.data={schemaUri:e.schemaUri,...e.data},r})}getMatchingSchemas(e,t,n,r,i){let a=new yz(r,i);return this.validateNode(e,t,t,new Sz(n.isKubernetes),a,n),a.schemas}getNoOpCollector(){return bz.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=js.parse(r).toString())}return n?`${gz}${n}`:hz}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()){jz(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:I.Warning,message:t.errorMessage||R(`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`?PR(t):t.type;r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:t.errorMessage||Tz(_z.typeMismatchWarning,[i]),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n),problemType:_z.typeMismatchWarning,problemArgs:[i]})}if(Array.isArray(t.allOf))for(let n of t.allOf){let s=wz(n),c=new Sz(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=wz(t.not);if(u){let s=new Sz(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:I.Warning,message:R(`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={...wz(n)},c=new Sz(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:I.Warning,message:R(`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 Sz(o),c=i.newSub();this.validateNode(e,wz(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=wz(s),m=new Sz(o),h=i.newSub();this.validateNode(e,p,c,m,h,a),i.merge(h);let g=p?.filePatternAssociation;g&&(new KR(g).matchesPattern(a.uri)||m.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`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=wz(t.if);if(m&&p(m,t,wz(t.then),wz(t.else)),Array.isArray(t.enum)){let i=wR(e),a=!1;for(let n of t.enum)if(OR(i,n,e.type)||Ez(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:I.Warning,code:JL.EnumValueMismatch,message:t.errorMessage||R(`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(AR(t.const)){let i=wR(e),a=t.const;!OR(i,a,e.type)&&!Ez(s,e,i,a)?(r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,code:JL.EnumValueMismatch,problemType:_z.constWarning,message:t.errorMessage||Tz(_z.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:I.Warning,message:t.deprecationMessage,source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}validateStringNode(e,t,n,r){let i=e.value;if(kR(t.minLength)&&i.length<(t.minLength??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`String is shorter than the minimum length of {0}.`,t.minLength),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),kR(t.maxLength)&&i.length>(t.maxLength??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`String is longer than the maximum length of {0}.`,t.maxLength),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),MR(t.pattern)){let a=WR(t.pattern);a?a.test(i)||r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:t.patternErrorMessage||t.errorMessage||R(`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:I.Warning,message:R(`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=R(`URI expected.`);else try{!js.parse(i).scheme&&t.format===`uri`&&(a=R(`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:I.Warning,message:t.patternErrorMessage||t.errorMessage||R(`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=xz[t.format];(!i||!a.pattern.test(i))&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:t.patternErrorMessage||t.errorMessage||R(a.errorMessage),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});break}}}validateNumberNode(e,t,n,r){let i=e.value;kR(t.multipleOf)&&qR(i,t.multipleOf??0)!==0&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`Value is not divisible by {0}.`,t.multipleOf),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});let a=this.getNumberLimits(t);kR(a.exclusiveMinimum)&&i<=a.exclusiveMinimum&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`Value is below the exclusive minimum of {0}.`,a.exclusiveMinimum),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),kR(a.exclusiveMaximum)&&i>=a.exclusiveMaximum&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`Value is above the exclusive maximum of {0}.`,a.exclusiveMaximum),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),kR(a.minimum)&&i<a.minimum&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`Value is below the minimum of {0}.`,a.minimum),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),kR(a.maximum)&&i>a.maximum&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`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=wz(l[e]),u=new Sz(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:I.Warning,message:R(`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 Sz(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=wz(t.items);if(n){let c=r.getEvaluatedItems(e);for(let e=0;e<s.length;e++){let l=s[e],u=new Sz(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=wz(t.contains);s&&((e.items??[]).some(e=>{let n=new Sz(o);return this.validateNode(e,s,t,n,bz.instance,a),!n.hasProblems()})||r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:t.errorMessage||R(`Array does not contain required item.`),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}))}applyArrayLength(e,t,n,r,i){kR(t.minItems)&&e.items.length<(t.minItems??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`Array has too few items. Expected {0} or more.`,t.minItems),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),kR(t.maxItems)&&e.items.length>(t.maxItems??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`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=wR(e);Array.isArray(i)&&i.some((e,t)=>t!==i.lastIndexOf(e))&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`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`&&NR(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:I.Warning,message:t.errorMessage||Tz(_z.missingRequiredPropWarning,[i]),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n),problemArgs:[i],problemType:_z.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),jR(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:I.Warning,message:t.errorMessage||R(`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 Sz(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=WR(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(jR(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:I.Warning,message:t.errorMessage||R(`Property {0} is not allowed.`,f),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}}else{let e=new Sz(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 Sz(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:I.Warning,code:JL.PropertyExpected,message:t.errorMessage||R(`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){kR(t.maxProperties)&&e.properties.length>(t.maxProperties??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`Object has more properties than limit of {0}.`,t.maxProperties),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),kR(t.minProperties)&&e.properties.length<(t.minProperties??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`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:I.Warning,message:R(`Object is missing property {0} required by property {1}.`,i,l),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});else{let n=wz(u);if(n){let o=new Sz(s);this.validateNode(e,n,t,o,i,a),r.mergePropertyMatch(o),r.mergeEnumValues(o)}}}}applyPropertyNames(e,t,n,r){let i=wz(t.propertyNames);if(i)for(let a of e.properties){let e=a.keyNode;e&&this.validateNode(e,i,t,n,bz.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,[_z.missingRequiredPropWarning,_z.typeMismatchWarning,_z.constWarning])}};function wz(e){if(e!==void 0)return jR(e)?e?{}:{not:{}}:typeof e==`object`?e:(console.warn(`Wrong schema: ${JSON.stringify(e)}, it MUST be an Object or Boolean`),{type:e})}function Tz(e,t){return R(vz[e],t.join(` | `))}function Ez(e,t,n,r){return e?n===null&&t.length===0||MR(n)&&MR(r)&&r.startsWith(n):!1}var Dz=class extends Cz{getCurrentDialect(){return CR.draft04}getNumberLimits(e){let t=kR(e.minimum)?e.minimum:void 0,n=kR(e.maximum)?e.maximum:void 0,r=jR(e.exclusiveMinimum)&&e.exclusiveMinimum?t:void 0,i=jR(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}}},Oz=class extends Cz{getCurrentDialect(){return CR.draft07}getNumberLimits(e){let t=kR(e.minimum)?e.minimum:void 0,n=kR(e.maximum)?e.maximum:void 0,r=kR(e.exclusiveMinimum)?e.exclusiveMinimum:void 0,i=kR(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}}},kz=class extends Oz{getCurrentDialect(){return CR.draft2019}applyContains(e,t,n,r,i,a){let o=wz(t.contains);if(!o)return;let s=t.minContains,c=t.maxContains,l=kR(s)?s:1,u=kR(c)?c:void 0,d=0,f=e.items??[];for(let e of f){let n=new Sz(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:I.Warning,message:t.errorMessage||R(`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:I.Warning,message:t.errorMessage||R(`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:I.Warning,message:R(`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=wz(c[n]);if(!s)continue;let l=new Sz(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:I.Warning,code:JL.PropertyExpected,message:t.errorMessage||R(`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=wz(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 Sz(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:I.Warning,code:JL.PropertyExpected,message:t.errorMessage||R(`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=wz(o);if(u)for(let e of l){let n=s[e],o=new Sz(a.isKubernetes);this.validateNode(n,u,t,o,i,a),r.merge(o),r.mergeEnumValues(o),c.add(e)}}},Az=class extends kz{getCurrentDialect(){return CR.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=wz(c[n]);if(!e){s.add(n);continue}let l=new Sz(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:I.Warning,message:R(`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=wz(l);if(e)for(let n=u;n<o.length;n++){let c=new Sz(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=wz(t.contains);if(!o)return;let s=e.items??[],c=t.minContains,l=t.maxContains,u=kR(c)?c:1,d=kR(l)?l:void 0,f=0,p=r.getEvaluatedItems(e);for(let e=0;e<s.length;e++){let n=new Sz(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:I.Warning,message:t.errorMessage||R(`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:I.Warning,message:t.errorMessage||R(`Array has too many items matching "contains". Expected {0} or fewer.`,d),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}};function jz(e){switch(e){case CR.draft04:return new Dz;case CR.draft07:return new Oz;case CR.draft2019:return new kz;case CR.draft2020:return new Az;default:return new Oz}}var Mz=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()+`}`:``)}},Nz=class extends Mz{constructor(e,t,n,r){super(e,t,n,r),this.type=`null`,this.value=null}},Pz=class extends Mz{constructor(e,t,n,r,i,a){super(e,t,i,a),this.type=`boolean`,this.value=n,this.source=r}},Fz=class extends Mz{constructor(e,t,n,r){super(e,t,n,r),this.type=`array`,this.items=[]}get children(){return this.items}},Iz=class extends Mz{constructor(e,t,n,r){super(e,t,n,r),this.type=`number`,this.isInteger=!0,this.value=NaN}},Lz=class extends Mz{constructor(e,t,n,r){super(e,t,n,r),this.type=`string`,this.value=``}},Rz=class extends Mz{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]}},zz=class extends Mz{constructor(e,t,n,r){super(e,t,n,r),this.type=`object`,this.properties=[]}get children(){return this.properties}},Bz;(function(e){e[e.Key=0]=`Key`,e[e.Enum=1]=`Enum`})(Bz||={});var Vz=class{constructor(e,t=[],n=[]){this.root=e,this.syntaxErrors=t,this.comments=n}getNodeFromOffset(e,t=!1){if(this.root)return ER(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:jz(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?[]:jz(e._dialect).getMatchingSchemas(this.root,e,{isKubernetes:this.isKubernetes,disableAdditionalProperties:this.disableAdditionalProperties,uri:this.uri,callFromAutoComplete:r},t,n)}},Hz={maxRefCount:1e3,currentRefDepth:0,aliasResolutionCache:new Map};function Uz(e,t,n,r){if(e||(Hz.currentRefDepth=0,Hz.aliasResolutionCache=new Map),!t)return null;if(Rl(t))return Wz(t,e,n,r);if(zl(t))return Gz(t,e,n,r);if(Bl(t))return Kz(t,e,n,r);if(z(t))return qz(t,e);if(Il(t)&&Hz.currentRefDepth<Hz.maxRefCount)return Jz(t,e,n,r)}function Wz(e,t,n,r){let i;i=e.flow&&!e.range?Zz(e):e.range;let a=new zz(t,e,...Xz(i,r));for(let t of e.items)zl(t)&&a.properties.push(Uz(a,t,n,r));return a}function Gz(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 Rz(t,e,...Xz([o,s,c],r));if(Il(i)){let e=new Lz(t,i,...Yz(i.range));e.value=i.source,l.keyNode=e}else l.keyNode=Uz(l,i,n,r);return l.valueNode=Uz(l,a,n,r),l}function Kz(e,t,n,r){let i=new Fz(t,e,...Yz(e.range));for(let t of e.items)if(Hl(t)){let e=Uz(i,t,n,r);e&&i.children.push(e)}return i}function qz(e,t){if(e.value===null)return new Nz(t,e,...Yz(e.range));switch(typeof e.value){case`string`:{let n=new Lz(t,e,...Yz(e.range));return n.value=e.value,n}case`boolean`:return new Pz(t,e,e.value,e.source,...Yz(e.range));case`number`:{let n=new Iz(t,e,...Yz(e.range));return n.value=e.value,n.isInteger=Number.isInteger(n.value),n}default:{let n=new Lz(t,e,...Yz(e.range));return n.value=e.source,n}}}function Jz(e,t,n,r){if(Hz.aliasResolutionCache.has(e))return Hz.aliasResolutionCache.get(e);Hz.currentRefDepth++;let i=e.resolve(n),a;if(i)a=Uz(t,i,n,r);else{let n=new Lz(t,e,...Yz(e.range));n.value=e.source,a=n}return Hz.currentRefDepth--,Hz.aliasResolutionCache.set(e,a),a}function Yz(e){return[e[0],e[1]-e[0]]}function Xz(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 Zz(e){let t=2**53-1,n=0;for(let r of e.items)zl(r)&&(Hl(r.key)&&r.key.range&&r.key.range[0]<=t&&(t=r.key.range[0]),Hl(r.value)&&r.value.range&&r.value.range[2]>=n&&(n=r.value.range[2]));return[t,n,n]}function Qz(e,t){let n;if(ql(e,(e,r,i)=>{if(r===t)return n=i[i.length-1],ql.BREAK}),!Ll(n))return n}function $z(e){if(e.items.length>1)return!1;let t=e.items[0];return z(t.key)&&z(t.value)&&t.key.value===``&&!t.value.value}function eB(e,t){for(let[n,r]of e.items.entries())if(t===r)return n}function tB(e,t){let n=!1;for(let r of e){if(r.type===`document`)rB([],r,e=>{if(nB(e)&&e.value?.type===`comment`){if(r.offset<=t&&e.value.source.length+e.value.offset>=t)return n=!0,ql.BREAK}else if(e.type===`comment`&&e.offset<=t&&e.offset+e.source.length>=t)return n=!0,ql.BREAK});else if(r.type===`comment`&&r.offset<=t&&r.source.length+r.offset>=t)return!0;if(n)break}return n}function nB(e){return e.start!==void 0}function rB(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=rB(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===ql.BREAK)return ql.BREAK;else r===ql.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=rB(Object.freeze(e),i[t],n);if(typeof r==`number`)t=r-1;else if(r===ql.BREAK)return ql.BREAK;else r===ql.REMOVE&&(i.items.splice(t,1),--t)}return typeof r==`function`?r(t,e):r}var iB=class e extends Vz{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(`
374
- `).forEach(e=>this._lineComments.push(`#${e}`)),ql(this.internalDocument,(e,t)=>{t?.commentBefore&&(t?.commentBefore.split(`
375
- `)).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=Uz(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(sB)}get warnings(){return this.internalDocument.warnings.map(sB)}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 ql(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]&&z(n)&&n.value===null)c=n;else return ql.SKIP}}),[c,!1]}findClosestNode(e,t,n){let r=this.internalDocument.range[2],i=this.internalDocument.range[0],a;ql(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=UR(t.getLineContent(o.line),o.character);return z(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,Hl(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(zl(e)&&Hl(e.value))return e.value;if(zl(a)&&Hl(a.value))return a.value}else return t}else if(zl(t)){a=t;let o=this.getParent(t);return this.getProperParentByIndentation(e,o,n,r,i,a)}return t}getParent(e){return Qz(this.internalDocument,e)}},aB=class{constructor(e,t){this.documents=e,this.tokens=t,this.errors=[],this.warnings=[]}},oB=new class{constructor(){this.cache=new Map}getYamlDocument(e,t,n=!1){return this.ensureCache(e,t??fB,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 aB([],[]),parserOptions:fB});let i=this.cache.get(r);if(i.version!==e.version||t.customTags&&!VR(i.parserOptions.customTags,t.customTags)){let r=e.getText();n&&!/\S/.test(r)&&(r=`{${r}}`),i.document=pB(r,t,e),i.version=e.version,i.parserOptions=t}}};function sB(e){return{message:e.message,location:{start:e.pos[0],end:e.pos[1],toLineEnd:!0},severity:1,code:JL.Undefined}}var cB=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(Rl(e)&&this.type===`mapping`||Bl(e)&&this.type===`sequence`||typeof e==`string`&&this.type===`scalar`)return e}},lB=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 uB(e){let t=[],n=BR(e);for(let e of n){let n=e.split(` `),r=n[0],i=n[1]&&n[1].toLowerCase()||`scalar`;t.push(new cB(r,i))}return t.push(new lB),t}var dB=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(F.create(e-1,t,e-1,t+1)).charCodeAt(0)}getText(e){return this.doc.getText(e)}getPosition(e){return this.doc.positionAt(e)}},fB={customTags:[],yamlVersion:`1.2`};function pB(e,t=fB,n){let r=new Uf({strict:!1,customTags:uB(t.customTags),version:t.yamlVersion??fB.yamlVersion,keepSourceTokens:!0}),i=new cp,a=!1;if(n){let t=new dB(n),r=t.getPosition(e.length);a=t.getLineContent(r.line).trim().length===0}let o=(a?new gp:new gp(i.addNewLine)).parse(e),s=Array.from(o),c=r.compose(s,!0,e.length);return new aB(Array.from(c,e=>mB(e,i)),s)}function mB(e,t){let n=new iB(t);return n.internalDocument=e,n}function hB(e){if(e instanceof iB){let t=e.lineComments.find(e=>gB(e));if(t!=null){let e=t.match(/\$schema(?:=|:\s*)(\S+)/);if(e!==null&&e.length===2)return e[1]}}}function gB(e){let t=e.match(/^#\s+(?:yaml-language-server\s*:|\$schema:)/g);return t!==null&&t.length===1}function _B(){return!0}var vB=class{compile(){return _B}defaultMeta(){return`http://json-schema.org/draft-07/schema`}},yB=class extends vB{defaultMeta(){return`http://json-schema.org/draft-04/schema`}},bB=class extends vB{defaultMeta(){return`https://json-schema.org/draft/2019-09/schema`}},xB=class extends vB{defaultMeta(){return`https://json-schema.org/draft/2020-12/schema`}},SB=`https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.32.1-standalone-strict/`,CB=SB+`all.json`,wB=`https://raw.githubusercontent.com/datreeio/CRDs-catalog/main`;function TB(e){let t=new Map;return e&&(e.url?e.url.startsWith(`schemaservice://combinedSchema/`)?EB(e,t):t.set(e.url,e):EB(e,t)),t}function EB(e,t){e.allOf&&DB(e.allOf,t),e.anyOf&&DB(e.anyOf,t),e.oneOf&&DB(e.oneOf,t)}function DB(e,t){for(let n of e)!jR(n)&&n.url&&!t.has(n.url)&&t.set(n.url,n)}function OB(e,t,n){let r=jB(e);if(!r||!r.group||!r.version||!r.kind)return;let i=kB(r,t);if(i)return i;let a=AB(r,n);if(a)return a}function kB(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 SB+o}function AB(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 jB(e){if(e instanceof iB)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 MB=new yB({allErrors:!0}),NB=new vB({allErrors:!0}),PB=new bB({allErrors:!0}),FB=new xB({allErrors:!0}),IB=zL(),LB=void 0,RB=zL(),zB=zL(),BB=zL(),VB=MB.compile(IB),HB=NB.compile(LB),UB=PB.compile(RB),WB=FB.compile(zB),GB=new Map,KB=new Map,qB=new Map([[`zh-cn`,`zh`],[`zh-tw`,`zh-TW`]]),JB=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(`.`)),YB;(function(e){e[e.delete=0]=`delete`,e[e.add=1]=`add`,e[e.deleteAll=2]=`deleteAll`})(YB||={});var XB=class extends vR{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=ZB(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(R(`Schema '{0}' is not valid: {1}`,i,`expected a JSON Schema object or boolean, got "${e}".`)),new _R({},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 rV(e.$schema,c);n&&(e._dialect=n);let a=iV(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)){nV(a.errors,l);let e=[];for(let t of a.errors)e.push(`${t.instancePath} : ${t.message}`);r.push(R(`Schema '{0}' is not valid: {1}`,i,`
365
+ ${l}`),l}async function oI(e,t){let n=await BF(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){sI(t,e)}return{text:r,ast:i}}function sI(e,t){let{loc:n}=e;if(n){let r=aI(t,n,{highlightCode:!0});throw e.message+=`
366
+ `+r,e.codeFrame=r,e}throw e}var cI=oI;async function lI(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 uI(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 uI(e,t,n,r){let i=await XF({...n,...t,parentParser:n.parser,originalText:e,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:a}=await cI(e,i);return rM(await r(a,i))}function dI(e,t,n,r){let{originalText:i,[Symbol.for(`comments`)]: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 fI=dI;async function pI(e,t){({ast:e}=await hI(e,t));let n=new Map,r=new lN(e),i=ZN(t),a=new Map;await lI(r,s,t,pI,a);let o=await mI(r,t,s,void 0,a);if(XN(t),t.cursorOffset>=0){if(t.nodeAfterCursor&&!t.nodeBeforeCursor)return[xM,o];if(t.nodeBeforeCursor&&!t.nodeAfterCursor)return[o,xM]}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=dN(o)&&e===void 0;if(c&&n.has(o))return n.get(o);let l=mI(r,t,s,e,a);return c&&n.set(o,l),l}}function mI(e,t,n,r,i){let{node:a}=e,{printer:o}=t,s;switch(s=o.hasPrettierIgnore?.(e)?fI(e,t,n,r):i.has(a)?i.get(a):o.print(e,t,n,r),a){case t.cursorNode:s=lM(s,e=>[xM,e,xM]);break;case t.nodeBeforeCursor:s=lM(s,e=>[e,xM]);break;case t.nodeAfterCursor:s=lM(s,e=>[xM,e])}return o.printComment&&!o.willPrintOwnComments?.(e,t)&&(s=YN(e,s,t)),s}async function hI(e,t){let n=e.comments??[];t[Symbol.for(`comments`)]=n,t[Symbol.for(`printedComments`)]=new Set,LN(e,t);let{printer:{preprocess:r}}=t;return e=r?await r(e,t):e,{ast:e,comments:n}}function gI(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 TN(e,{getVisitorKeys:a,filter:o}))c.push(t),s=t;if(EN(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 wN(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 _I=gI;function vI(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(!dN(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)!Object.prototype.hasOwnProperty.call(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 yI=vI,bI=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},xI=ej(`findLastIndex`,function(){if(Array.isArray(this))return bI}),SI=({parser:e})=>e===`json`||e===`json5`||e===`jsonc`||e===`json-stringify`;function CI(e,t){return t=new Set(t),e.find(e=>OI.has(e.type)&&t.has(e))}function wI(e){let t=xI(0,e,e=>e.type!==`Program`&&e.type!==`File`);return t===-1?e:e.slice(0,t+1)}function TI(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 wI(s))if(n(e)>=c)o=e;else break;let l=r(o);for(let e of wI(a)){if(r(e)<=l)i=e;else break;if(i===o)break}return[i,o]}function EI(e,t,n,r,i=[],a){let{locStart:o,locEnd:s}=n,c=o(e),l=s(e);if(t>l||t<c||a===`rangeEnd`&&t===c||a===`rangeStart`&&t===l)return;let u=[e,...i],d=ON(e,u,{cache:PN,locStart:o,locEnd:s,getVisitorKeys:n.getVisitorKeys,filter:n.printer.canAttachComment,getChildren:n.printer.getCommentChildNodes});for(let e of d){let i=EI(e,t,n,r,u,a);if(i)return i}if(r(e,i[0]))return u}function DI(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 OI=new Set([`JsonRoot`,`ObjectExpression`,`ArrayExpression`,`StringLiteral`,`NumericLiteral`,`BooleanLiteral`,`NullLiteral`,`UnaryExpression`,`TemplateLiteral`]),kI=new Set([`OperationDefinition`,`FragmentDefinition`,`VariableDefinition`,`TypeExtensionDefinition`,`ObjectTypeDefinition`,`FieldDefinition`,`DirectiveDefinition`,`EnumTypeDefinition`,`EnumValueDefinition`,`InputValueDefinition`,`InputObjectTypeDefinition`,`SchemaDefinition`,`OperationTypeDefinition`,`InterfaceTypeDefinition`,`UnionTypeDefinition`,`ScalarTypeDefinition`]);function AI(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`__babel_estree`:return DI(t.type,n?.type);case`json`:case`json5`:case`jsonc`:case`json-stringify`:return OI.has(t.type);case`graphql`:return kI.has(t.kind);case`vue`:return t.tag!==`root`}return!1}function jI(e,t,n){let{rangeStart:r,rangeEnd:i,locStart:a,locEnd:o}=t,s=e.slice(r,i).search(/\S/u),c=s===-1;if(!c)for(r+=s;i>r&&!/\S/u.test(e[i-1]);--i);let l=EI(n,r,t,(e,n)=>AI(t,e,n),[],`rangeStart`);if(!l)return;let u=c?l:EI(n,i,t,e=>AI(t,e),[],`rangeEnd`);if(!u)return;let d,f;if(SI(t)){let e=CI(l,u);d=e,f=e}else[d,f]=TI(l,u,t);return[Math.min(a(d),a(f)),Math.max(o(d),o(f))]}var MI=``,NI=Symbol(`cursor`);async function PI(e,t,n=0){if(!e||e.trim().length===0)return{formatted:``,cursorOffset:-1,comments:[]};let{ast:r,text:i}=await cI(e,t);t.cursorOffset>=0&&(t={...t,..._I(r,t)});let a=await pI(r,t,n);n>0&&(a=yM([MM,a],n,t.tabWidth));let o=oN(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+hj(t.endOfLine)}let s=t[Symbol.for(`comments`)];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,NI);let u=aj(l,a.split(``)),d=r;for(let e of u)if(e.removed){if(e.value.includes(NI))break}else d+=e.count;return{formatted:o.formatted,cursorOffset:d,comments:s}}return{formatted:o.formatted,cursorOffset:-1,comments:s}}async function FI(e,t){let{ast:n,text:r}=await cI(e,t),[i,a]=jI(r,t,n)??[0,0],o=r.slice(i,a),s=Math.min(i,r.lastIndexOf(`
367
+ `,i)+1),c=r.slice(s,i).match(/^\s*/u)[0],l=cN(c,t.tabWidth),u=await PI(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=hj(t.endOfLine);f>=0&&e===`\r
368
+ `&&(f+=_j(p.slice(0,f),`
369
+ `)),p=nj(0,p,`
370
+ `,e)}return{formatted:p,cursorOffset:f,comments:u.comments}}function II(e,t,n){return typeof t!=`number`||Number.isNaN(t)||t<0||t>e.length?n:t}function LI(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i}=t;return n=II(e,n,-1),r=II(e,r,0),i=II(e,i,e.length),{...t,cursorOffset:n,rangeStart:r,rangeEnd:i}}function RI(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:a}=LI(e,t),o=e.charAt(0)===MI;if(o&&(e=e.slice(1),n--,r--,i--),a===`auto`&&(a=mj(e)),e.includes(`\r`)){let t=t=>_j(e.slice(0,Math.max(t,0)),`\r
371
+ `);n-=t(n),r-=t(r),i-=t(i),e=yj(e)}return{hasBOM:o,text:e,options:LI(e,{...t,cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:a})}}async function zI(e,t){let n=await BF(t);return!n.hasPragma||n.hasPragma(e)}async function BI(e,t){return(await BF(t)).hasIgnorePragma?.(e)}async function VI(e,t){let{hasBOM:n,text:r,options:i}=RI(e,await XF(t));if(i.rangeStart>=i.rangeEnd&&r!==``||i.requirePragma&&!await zI(r,i)||i.checkIgnorePragma&&await BI(r,i))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let a;return i.rangeStart>0||i.rangeEnd<r.length?a=await FI(r,i):(!i.requirePragma&&i.insertPragma&&i.printer.insertPragma&&!await zI(r,i)&&(r=i.printer.insertPragma(r)),a=await PI(r,i)),n&&(a.formatted=MI+a.formatted,a.cursorOffset>=0&&a.cursorOffset++),a}async function HI(e,t,n){let{text:r,options:i}=RI(e,await XF(t)),a=await cI(r,i);return n&&(n.preprocessForPrint&&(a.ast=await hI(a.ast,i)),n.massage&&(a.ast=yI(a.ast,i))),a}async function UI(e,t){return t=await XF(t),oN(await pI(e,t),t)}async function WI(e,t){let{formatted:n}=await VI(zM(e),{...t,parser:`__js_expression`});return n}async function GI(e,t){t=await XF(t);let{ast:n}=await cI(e,t);return t.cursorOffset>=0&&(t={...t,..._I(n,t)}),pI(n,t)}async function KI(e,t){return oN(e,await XF(t))}var qI={};XA(qI,{builders:()=>JI,printer:()=>YI,utils:()=>XI});var JI={join:DM,line:kM,softline:AM,hardline:MM,literalline:PM,group:CM,conditionalGroup:wM,fill:SM,lineSuffix:FM,lineSuffixBoundary:IM,cursor:xM,breakParent:bM,ifBreak:TM,trim:LM,indent:mM,indentIfBreak:EM,align:hM,addAlignmentToDoc:yM,markAsRoot:_M,dedentToRoot:gM,dedent:vM,hardlineWithoutBreakParent:jM,literallineWithoutBreakParent:NM,label:OM,concat:e=>e},YI={printDocToString:oN},XI={willBreak:Xj,traverseDoc:Kj,findInDoc:Jj,mapDoc:qj,removeLines:eM,stripTrailingHardline:rM,replaceEndOfLine:oM,canBreak:cM},ZI=`3.8.3`,QI={};XA(QI,{addDanglingComment:()=>MN,addLeadingComment:()=>jN,addTrailingComment:()=>NN,getAlignmentSize:()=>cN,getIndentSize:()=>cL,getMaxContinuousCount:()=>dL,getNextNonSpaceNonCommentCharacter:()=>pL,getNextNonSpaceNonCommentCharacterIndex:()=>TL,getPreferredQuote:()=>yL,getStringWidth:()=>qM,hasNewline:()=>xN,hasNewlineInRange:()=>xL,hasSpaces:()=>CL,isNextLineEmpty:()=>AL,isNextLineEmptyAfterIndex:()=>oL,isPreviousLineEmpty:()=>DL,makeString:()=>kL,skip:()=>fN,skipEverythingButNewLine:()=>gN,skipInlineComment:()=>eL,skipNewline:()=>yN,skipSpaces:()=>mN,skipToLineEnd:()=>hN,skipTrailingComment:()=>nL,skipWhitespace:()=>pN});function $I(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 eL=$I;function tL(e,t){return t===!1?!1:e.charAt(t)===`/`&&e.charAt(t+1)===`/`?gN(e,t):t}var nL=tL;function rL(e,t){let n=null,r=t;for(;r!==n;)n=r,r=mN(e,r),r=eL(e,r),r=nL(e,r),r=yN(e,r);return r}var iL=rL;function aL(e,t){let n=null,r=t;for(;r!==n;)n=r,r=hN(e,r),r=eL(e,r),r=mN(e,r);return r=nL(e,r),r=yN(e,r),r!==!1&&xN(e,r)}var oL=aL;function sL(e,t){let n=e.lastIndexOf(`
372
+ `);return n===-1?0:cN(e.slice(n+1).match(/^[\t ]*/u)[0],t)}var cL=sL;function lL(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function uL(e,t){let n=e.matchAll(RegExp(`(?:${lL(t)})+`,`gu`));return n.reduce||(n=[...n]),n.reduce((e,[t])=>Math.max(e,t.length),0)/t.length}var dL=uL;function fL(e,t){let n=iL(e,t);return n===!1?``:e.charAt(n)}var pL=fL,mL=Object.freeze({character:`'`,codePoint:39}),hL=Object.freeze({character:`"`,codePoint:34}),gL=Object.freeze({preferred:mL,alternate:hL}),_L=Object.freeze({preferred:hL,alternate:mL});function vL(e,t){let{preferred:n,alternate:r}=t===!0||t===`'`?gL:_L,{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 yL=vL;function bL(e,t,n){for(let r=t;r<n;++r)if(e.charAt(r)===`
373
+ `)return!0;return!1}var xL=bL;function SL(e,t,n={}){return mN(e,n.backwards?t-1:t,n)!==t}var CL=SL;function wL(e,t,n){return iL(e,n(t))}function TL(e,t){return arguments.length===2||typeof t==`number`?iL(e,t):wL(...arguments)}function EL(e,t,n){return WN(e,n(t))}function DL(e,t){return arguments.length===2||typeof t==`number`?WN(e,t):EL(...arguments)}function OL(e,t,n){return oL(e,n(t))}function kL(e,t,n){let r=t===`"`?`'`:`"`;return t+nj(0,e,/\\(.)|(["'])/gsu,(e,i,a)=>i===r?i:a===t?`\\`+a:a||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(i)?i:`\\`+i))+t}function AL(e,t){return arguments.length===2||typeof t==`number`?oL(e,t):OL(...arguments)}function jL(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)},e(...n)}}var ML=jL(VI);async function NL(e,t){let{formatted:n}=await ML(e,{...t,cursorOffset:-1});return n}async function PL(e,t){return await NL(e,t)===e}var FL=jL(tP,0),IL={parse:jL(HI),formatAST:jL(UI),formatDoc:jL(WI),printToDoc:jL(GI),printDocToString:jL(KI)},LL=Object.getOwnPropertyNames,RL=((e,t)=>function(){return t||(0,e[LL(e)[0]])((t={exports:{}}).exports,t),t.exports})({"fillers/json-schema.json"(e,t){t.exports={}}});function zL(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 BL(e,t){var n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:n===0&&e===t}function VL(e){return zL(e,`(?i)`)?new RegExp(e.substring(4),`i`):new RegExp(e)}function HL(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(!HL(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(),!HL(i,a))return!1;for(n=0;n<i.length;n++)if(!HL(e[i[n]],t[i[n]]))return!1}return!0}function UL(e){return typeof e==`number`}function WL(e){return e!==void 0}function GL(e){return typeof e==`boolean`}function KL(e){return typeof e==`string`}var qL;(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`})(qL||={});var JL;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[dc.Markdown,dc.PlainText],commitCharactersSupport:!0}}}}})(JL||={});var YL=(e,t,...n)=>n.length===0?t:t.replaceAll(/{(\d+)}/g,(e,[t])=>t in n?String(n[t]):e);function XL(){return YL}var ZL=(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)}})(),QL=XL(),$L={"color-hex":{errorMessage:QL(`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:QL(`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:QL(`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:QL(`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:QL(`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,}))$/}},eR=(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){ZL(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.type=`null`,r.value=null,r}return t})(eR),(function(e){ZL(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})(eR),(function(e){ZL(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})(eR),(function(e){ZL(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})(eR),(function(e){ZL(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})(eR),(function(e){ZL(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})(eR),(function(e){ZL(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})(eR);function tR(e){return GL(e)?e?{}:{not:{}}:e}var nR;(function(e){e[e.Key=0]=`Key`,e[e.Enum=1]=`Enum`})(nR||={});var rR=(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||sR(e,this.focusOffset))&&e!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e})(),iR=(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})(),aR=(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===qL.EnumValueMismatch&&(r.message=QL(`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 oR(e){return Os(e)}function sR(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 Ds(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=I.Warning),this.root&&t){var r=new aR;return cR(this.root,t,r,iR.instance),r.problems.map(function(t){var r=F.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return Js.create(r,t.message,t.severity??n,t.code)})}},e.prototype.getMatchingSchemas=function(e,t,n){t===void 0&&(t=-1);var r=new rR(t,n);return this.root&&e&&cR(this.root,e,new aR,r),r.schemas},e})();function cR(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 cR(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||QL(`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||QL(`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];cR(i,tR(s),n,r)}var c=tR(t.not);if(c){var l=new aR,u=r.newSub();cR(i,c,l,u),l.hasProblems()||n.problems.push({location:{offset:i.offset,length:i.length},message:QL(`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=tR(l),d=new aR,f=r.newSub();if(cR(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:QL(`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 aR,a=r.newSub();cR(i,tR(e),t,a),n.merge(t),n.propertiesMatches+=t.propertiesMatches,n.propertiesValueMatches+=t.propertiesValueMatches,r.merge(a)},g=function(e,t,n){var a=tR(e),o=new aR,s=r.newSub();cR(i,a,o,s),r.merge(s),o.hasProblems()?n&&h(n):t&&h(t)},_=tR(t.if);if(_&&g(_,tR(t.then),tR(t.else)),Array.isArray(t.enum)){for(var v=oR(i),y=!1,b=0,x=t.enum;b<x.length;b++){var S=x[b];if(HL(v,S)){y=!0;break}}n.enumValues=t.enum,n.enumValueMatch=y,y||n.problems.push({location:{offset:i.offset,length:i.length},code:qL.EnumValueMismatch,message:t.errorMessage||QL(`enumWarning`,`Value is not accepted. Valid values: {0}.`,t.enum.map(function(e){return JSON.stringify(e)}).join(`, `))})}if(WL(t.const)){var v=oR(i);HL(v,t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:i.offset,length:i.length},code:qL.EnumValueMismatch,message:t.errorMessage||QL(`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:I.Warning,message:t.deprecationMessage,code:qL.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(UL(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:QL(`multipleOfWarning`,`Value is not divisible by {0}.`,t.multipleOf)})}function u(e,t){if(UL(t))return t;if(GL(t)&&t)return e}function d(e,t){if(!GL(t)||!t)return e}var f=u(t.minimum,t.exclusiveMinimum);UL(f)&&i<=f&&n.problems.push({location:{offset:e.offset,length:e.length},message:QL(`exclusiveMinimumWarning`,`Value is below the exclusive minimum of {0}.`,f)});var p=u(t.maximum,t.exclusiveMaximum);UL(p)&&i>=p&&n.problems.push({location:{offset:e.offset,length:e.length},message:QL(`exclusiveMaximumWarning`,`Value is above the exclusive maximum of {0}.`,p)});var m=d(t.minimum,t.exclusiveMinimum);UL(m)&&i<m&&n.problems.push({location:{offset:e.offset,length:e.length},message:QL(`minimumWarning`,`Value is below the minimum of {0}.`,m)});var h=d(t.maximum,t.exclusiveMaximum);UL(h)&&i>h&&n.problems.push({location:{offset:e.offset,length:e.length},message:QL(`maximumWarning`,`Value is above the maximum of {0}.`,h)})}function s(e,t,n,r){if(UL(t.minLength)&&e.value.length<t.minLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:QL(`minLengthWarning`,`String is shorter than the minimum length of {0}.`,t.minLength)}),UL(t.maxLength)&&e.value.length>t.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:QL(`maxLengthWarning`,`String is longer than the maximum length of {0}.`,t.maxLength)}),KL(t.pattern)&&(VL(t.pattern).test(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||QL(`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=QL(`uriEmpty`,`URI expected.`);else{var a=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);a?!a[2]&&t.format===`uri`&&(i=QL(`uriSchemeMissing`,`URI with a scheme is expected.`)):i=QL(`uriMissing`,`URI is expected.`)}i&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||QL(`uriFormatWarning`,`String is not a URI: {0}`,i)});break;case`color-hex`:case`date-time`:case`date`:case`time`:case`email`:var o=$L[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=tR(o),c=new aR,l=e.items[a];l?(cR(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 aR;cR(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:QL(`additionalItemsWarning`,`Array has too many items according to schema. Expected {0} or fewer.`,i.length)})}}else{var d=tR(t.items);if(d)for(var f=0,p=e.items;f<p.length;f++){var l=p[f],c=new aR;cR(l,d,c,r),n.mergePropertyMatch(c)}}var m=tR(t.contains);if(m&&(e.items.some(function(e){var t=new aR;return cR(e,m,t,iR.instance),!t.hasProblems()})||n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||QL(`requiredItemMissingWarning`,`Array does not contain required item.`)})),UL(t.minItems)&&e.items.length<t.minItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:QL(`minItemsWarning`,`Array has too few items. Expected {0} or more.`,t.minItems)}),UL(t.maxItems)&&e.items.length>t.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:QL(`maxItemsWarning`,`Array has too many items. Expected {0} or fewer.`,t.maxItems)}),t.uniqueItems===!0){var h=oR(e);h.some(function(e,t){return t!==h.lastIndexOf(e)})&&n.problems.push({location:{offset:e.offset,length:e.length},message:QL(`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:QL(`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(GL(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||QL(`DisallowedExtraPropWarning`,`Property {0} is not allowed.`,f)})}}else{var b=new aR;cR(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],w=VL(C),T=0,ee=a.slice(0);T<ee.length;T++){var f=ee[T];if(w.test(f)){h(f);var y=i[f];if(y){var v=t.patternProperties[C];if(GL(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||QL(`DisallowedExtraPropWarning`,`Property {0} is not allowed.`,f)})}}else{var b=new aR;cR(y,v,b,r),n.mergePropertyMatch(b)}}}}if(typeof t.additionalProperties==`object`)for(var E=0,te=a;E<te.length;E++){var f=te[E],y=i[f];if(y){var b=new aR;cR(y,t.additionalProperties,b,r),n.mergePropertyMatch(b)}}else if(t.additionalProperties===!1&&a.length>0)for(var D=0,ne=a;D<ne.length;D++){var f=ne[D],y=i[f];if(y){var c=y.parent;n.problems.push({location:{offset:c.keyNode.offset,length:c.keyNode.length},message:t.errorMessage||QL(`DisallowedExtraPropWarning`,`Property {0} is not allowed.`,f)})}}if(UL(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:QL(`MaxPropWarning`,`Object has more properties than limit of {0}.`,t.maxProperties)}),UL(t.minProperties)&&e.properties.length<t.minProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:QL(`MinPropWarning`,`Object has fewer properties than the required number of {0}`,t.minProperties)}),t.dependencies)for(var re=0,O=Object.keys(t.dependencies);re<O.length;re++){var l=O[re];if(i[l]){var ie=t.dependencies[l];if(Array.isArray(ie))for(var ae=0,oe=ie;ae<oe.length;ae++){var se=oe[ae];i[se]?n.propertiesValueMatches++:n.problems.push({location:{offset:e.offset,length:e.length},message:QL(`RequiredDependentPropWarning`,`Object is missing property {0} required by property {1}.`,se,l)})}else{var v=tR(ie);if(v){var b=new aR;cR(e,v,b,r),n.mergePropertyMatch(b)}}}}var ce=tR(t.propertyNames);if(ce)for(var le=0,ue=e.properties;le<ue.length;le++){var l=ue[le].keyNode;l&&cR(l,ce,n,iR.instance)}}}function lR(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 uR=XL(),dR=`!`,fR=`/`,pR=(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]!==dR;a||(i=i.substring(1)),i.length>0&&(i[0]===fR&&(i=i.substring(1)),this.globWrappers.push({regexp:lR(`**/`+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})(),mR=(function(){function e(e,t,n){this.service=e,this.url=t,this.dependencies={},n&&(this.unresolvedSchema=this.service.promise.resolve(new hR(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})(),hR=(function(){function e(e,t){t===void 0&&(t=[]),this.schema=e,this.errors=t}return e})(),gR=(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 tR(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(VL(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})(),_R=(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=js.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=yR(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=yR(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(yR),l=this.addFilePatternAssociation(s.pattern,c);this.contributionAssociations.push(l)}},e.prototype.addSchemaHandle=function(e,t){var n=new mR(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 pR(e,t);return this.filePatternAssociations.push(n),n},e.prototype.registerExternalSchema=function(e,t,n){var r=yR(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=yR(e),n=this.schemasById[t];return n?n.getResolvedSchema():this.promise.resolve(void 0)},e.prototype.loadSchema=function(e){if(!this.requestService){var t=uR(`json.schema.norequestservice`,`Unable to load schema from '{0}'. No schema request service available`,xR(e));return this.promise.resolve(new hR({},[t]))}return this.requestService(e).then(function(t){if(!t)return new hR({},[uR(`json.schema.nocontent`,`Unable to load schema from '{0}': No content.`,xR(e))]);var n={},r=[];n=Es(t,r);var i=r.length?[uR(`json.schema.invalidFormat`,`Unable to parse content from '{0}': Parse error at offset {1}.`,xR(e),r[0].offset)]:[];return new hR(n,i)},function(t){var n=t.toString(),r=t.toString().split(`Error: `);return r.length>1&&(n=r[1]),BL(n,`.`)&&(n=n.substr(0,n.length-1)),new hR({},[uR(`json.schema.nocontent`,`Unable to load schema from '{0}': {1}.`,xR(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=yR(a.$schema);if(o===`http://json-schema.org/draft-03/schema`)return this.promise.resolve(new gR({},[uR(`json.schema.draft03.notsupported`,`Draft-03 schemas are not supported.`)]));o===`https://json-schema.org/draft/2019-09/schema`&&i.push(uR(`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(uR(`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=yR(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(uR(`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=[...arguments],t=0,n=e;t<n.length;t++){var r=n[t];typeof r==`object`&&a.push(r)}},d=function(){for(var e=[...arguments],t=0,n=e;t<n.length;t++){var r=n[t];if(typeof r==`object`)for(var i in r){var o=r[i];typeof o==`object`&&a.push(o)}}},f=function(){for(var e=[...arguments],t=0,n=e;t<n.length;t++){var r=n[t];if(Array.isArray(r))for(var i=0,o=r;i<o.length;i++){var s=o[i];typeof s==`object`&&a.push(s)}}},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 gR(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=oR(r);if(i&&zL(i,`.`)&&this.contextService&&(i=this.contextService.resolveRelativePath(i,e)),i){var a=yR(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=bR(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/`+vR++;return this.resolveSchemaContent(new hR(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})(),vR=0;function yR(e){try{return js.parse(e).toString()}catch{return e}}function bR(e){try{return js.parse(e).with({fragment:null,query:null}).toString()}catch{return e}}function xR(e){try{var t=js.parse(e);if(t.scheme===`file`)return t.fsPath}catch{}return e}var SR;(function(e){e.draft04=`draft04`,e.draft07=`draft07`,e.draft2019=`draft2019-09`,e.draft2020=`draft2020-12`})(SR||={});function CR(e){switch(e.type){case`array`:return e.children.map(CR);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]=CR(i))}return t}case`null`:case`string`:case`number`:return e.value;case`boolean`:return e.source;default:return}}function wR(e,t,n=!1){return t>=e.offset&&t<=e.offset+e.length||n&&t===e.offset+e.length}function TR(e,t,n){if(n===void 0&&(n=!1),wR(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=TR(r[e],t,n);if(i)return i}return e}}function ER(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 DR(e,t,n){if(n===`boolean`&&typeof e==`string`&&(e=ER(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(!DR(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(),!DR(n,a))return!1;for(r=0;r<n.length;r++)if(!DR(e[n[r]],t[n[r]]))return!1}return!0}function OR(e){return typeof e==`number`}function kR(e){return e!==void 0}function AR(e){return typeof e==`boolean`}function jR(e){return typeof e==`string`}function MR(e){return Symbol.iterator in Object(e)}function NR(e){let t=e.type&&e.closestTitle;return e.title?e.title:e.$id?PR(e.$id):e.$ref||e._$ref?PR(e.$ref||e._$ref):Array.isArray(e.type)?e.type.join(` | `):t?e.type.concat(`(`,e.closestTitle,`)`):e.type||e.closestTitle}function PR(e){let t=e.match(/^(?:.*\/)?(.*?)(?:\.schema\.json)?$/),n=!!t&&t[1];return n||(n=`typeNotFound`,console.error(`$ref (${e}) not parsed properly`)),n}function FR(e,t){let n=js.parse(t),r=xl(n.fsPath);return Sl(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 IR(e){return e.type!==`object`&&!LR(e)}function LR(e){return!!(e.anyOf||e.allOf||e.oneOf)}function RR(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 zR(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 BR(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 VR(e){return e.replace(/[-\\{}+?|^$.,[\]()#\s]/g,`\\$&`).replace(/[*]/g,`.*`)}function HR(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 UR(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 WR(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 GR=class{constructor(e){try{this.patternRegExp=RegExp(VR(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 KR(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 qR=XL(),JR=(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:I.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?QR(n.trailingCommas):I.Error,c=n?.comments?QR(n.comments):i.commentSeverity,l=n?.schemaValidation?QR(n.schemaValidation):I.Warning,u=n?.schemaRequest?QR(n.schemaRequest):I.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=F.create(e.positionAt(p.offset),e.positionAt(p.offset+p.length));s(Js.create(m,r.errors[0],u,qL.SchemaResolveError))}else{var m=F.create(e.positionAt(d.offset),e.positionAt(d.offset+1));s(Js.create(m,r.errors[0],u,qL.SchemaResolveError))}}else if(l){var h=t.validate(e,r.schema,l);h&&h.forEach(s)}XR(r.schema)&&(c=void 0),ZR(r.schema)&&(o=void 0)}for(var g=0,_=t.syntaxErrors;g<_.length;g++){var v=_[g];if(v.code===qL.TrailingComma){if(typeof o!=`number`)continue;v.severity=o}s(v)}if(typeof c==`number`){var y=qR(`InvalidCommentToken`,`Comments are not permitted in JSON.`);t.comments.forEach(function(e){s(Js.create(e,y,c,qL.CommentNotPermitted))})}return a};if(r){var l=r.id||`schemaservice://untitled/`+YR++;return this.jsonSchemaService.resolveSchemaContent(new hR(r),l,{}).then(function(e){return c(e)})}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then(function(e){return c(e)})},e})(),YR=0;function XR(e){if(e&&typeof e==`object`){if(GL(e.allowComments))return e.allowComments;if(e.allOf)for(var t=0,n=e.allOf;t<n.length;t++){var r=n[t],i=XR(r);if(GL(i))return i}}}function ZR(e){if(e&&typeof e==`object`){if(GL(e.allowTrailingCommas))return e.allowTrailingCommas;var t=e;if(GL(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(var n=0,r=e.allOf;n<r.length;n++){var i=r[n],a=ZR(i);if(GL(a))return a}}}function QR(e){switch(e){case`error`:return I.Error;case`warning`:return I.Warning;case`ignore`:return}}var $R=48,ez=57,tz=65,nz=97,rz=102;function iz(e){return e<$R?0:e<=ez?e-$R:(e<nz&&(e+=nz-tz),e>=nz&&e<=rz?e-nz+10:0)}function az(e){if(e[0]===`#`)switch(e.length){case 4:return{red:iz(e.charCodeAt(1))*17/255,green:iz(e.charCodeAt(2))*17/255,blue:iz(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:iz(e.charCodeAt(1))*17/255,green:iz(e.charCodeAt(2))*17/255,blue:iz(e.charCodeAt(3))*17/255,alpha:iz(e.charCodeAt(4))*17/255};case 7:return{red:(iz(e.charCodeAt(1))*16+iz(e.charCodeAt(2)))/255,green:(iz(e.charCodeAt(3))*16+iz(e.charCodeAt(4)))/255,blue:(iz(e.charCodeAt(5))*16+iz(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(iz(e.charCodeAt(1))*16+iz(e.charCodeAt(2)))/255,green:(iz(e.charCodeAt(3))*16+iz(e.charCodeAt(4)))/255,blue:(iz(e.charCodeAt(5))*16+iz(e.charCodeAt(6)))/255,alpha:(iz(e.charCodeAt(7))*16+iz(e.charCodeAt(8)))/255}}}var oz=(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`||BL(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=Rs.create(e.uri,sz(e,u));if(s.push({name:oR(p.valueNode),kind:Oc.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=Rs.create(e.uri,sz(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`||BL(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=sz(e,u),h=sz(e,p.keyNode);if(s.push({name:oR(p.valueNode),kind:Oc.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=sz(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=sz(e,t),s=sz(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 Oc.Module;case`string`:return Oc.String;case`number`:return Oc.Number;case`array`:return Oc.Array;case`boolean`:return Oc.Boolean;default:return Oc.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=az(oR(u.node));if(f){var p=sz(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:Xs.replace(r,JSON.stringify(l))}),i},e})();function sz(e,t){return F.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function cz(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=uz(t,i);if(a){var o=e.positionAt(a.offset);n.push({target:e.uri+`#`+(o.line+1)+`,`+(o.character+1),range:lz(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function lz(e,t){return F.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function uz(e,t){var n=fz(t);return n?dz(n,e.root):null}function dz(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?dz(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?dz(e,a):null}return null}function fz(e){return e===`#`?[]:e[0]!==`#`||e[1]!==`/`?null:e.substring(2).split(/\//).map(pz)}function pz(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}var mz=`YAML`,hz=`yaml-schema: `,gz;(function(e){e.missingRequiredPropWarning=`missingRequiredPropWarning`,e.typeMismatchWarning=`typeMismatchWarning`,e.constWarning=`constWarning`})(gz||={});var _z={[gz.missingRequiredPropWarning]:`Missing property "{0}".`,[gz.typeMismatchWarning]:`Incorrect type. Expected "{0}".`,[gz.constWarning]:`Value must be {0}.`},vz=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||wR(e,this.focusOffset))&&e!==this.exclude}newSub(){return new e(-1,this.exclude)}},yz=class{constructor(){}get schemas(){return[]}add(){}merge(){}include(){return!0}newSub(){return this}};yz.instance=new yz;var bz={"color-hex":{errorMessage:R(`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:R(`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:R(`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:R(`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:R(`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:R(`String does not match IPv4 format.`),pattern:/^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$/},ipv6:{errorMessage:R(`String does not match IPv6 format.`),pattern:/^([0-9a-f]|:){1,4}(:([0-9a-f]{0,4})*){1,7}$/i}},xz=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===qL.EnumValueMismatch&&(e.message=R(`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!==gz.missingRequiredPropWarning||BR(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=wz(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(hz,``);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}},Sz=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`&&MR(e.properties)&&n.push(...e.properties)})}}else t[r]=e.valueNode}return t}validateDocument(e,t,n,r){let i=new xz(r.isKubernetes);return this.validateNode(e,n,n,i,yz.instance,r),i.problems.map(e=>{let n=F.create(t.positionAt(e.location.offset),t.positionAt(e.location.offset+e.location.length)),r=Js.create(n,e.message,e.severity,e.code?e.code:qL.Undefined,e.source);return r.data={schemaUri:e.schemaUri,...e.data},r})}getMatchingSchemas(e,t,n,r,i){let a=new vz(r,i);return this.validateNode(e,t,t,new xz(n.isKubernetes),a,n),a.schemas}getNoOpCollector(){return yz.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=js.parse(r).toString())}return n?`${hz}${n}`:mz}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()){Az(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:I.Warning,message:t.errorMessage||R(`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`?NR(t):t.type;r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:t.errorMessage||wz(gz.typeMismatchWarning,[i]),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n),problemType:gz.typeMismatchWarning,problemArgs:[i]})}if(Array.isArray(t.allOf))for(let n of t.allOf){let s=Cz(n),c=new xz(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=Cz(t.not);if(u){let s=new xz(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:I.Warning,message:R(`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={...Cz(n)},c=new xz(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:I.Warning,message:R(`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 xz(o),c=i.newSub();this.validateNode(e,Cz(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=Cz(s),m=new xz(o),h=i.newSub();this.validateNode(e,p,c,m,h,a),i.merge(h);let g=p?.filePatternAssociation;g&&(new GR(g).matchesPattern(a.uri)||m.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`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=Cz(t.if);if(m&&p(m,t,Cz(t.then),Cz(t.else)),Array.isArray(t.enum)){let i=CR(e),a=!1;for(let n of t.enum)if(DR(i,n,e.type)||Tz(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:I.Warning,code:qL.EnumValueMismatch,message:t.errorMessage||R(`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(kR(t.const)){let i=CR(e),a=t.const;!DR(i,a,e.type)&&!Tz(s,e,i,a)?(r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,code:qL.EnumValueMismatch,problemType:gz.constWarning,message:t.errorMessage||wz(gz.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:I.Warning,message:t.deprecationMessage,source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}validateStringNode(e,t,n,r){let i=e.value;if(OR(t.minLength)&&i.length<(t.minLength??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`String is shorter than the minimum length of {0}.`,t.minLength),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),OR(t.maxLength)&&i.length>(t.maxLength??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`String is longer than the maximum length of {0}.`,t.maxLength),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),jR(t.pattern)){let a=UR(t.pattern);a?a.test(i)||r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:t.patternErrorMessage||t.errorMessage||R(`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:I.Warning,message:R(`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=R(`URI expected.`);else try{!js.parse(i).scheme&&t.format===`uri`&&(a=R(`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:I.Warning,message:t.patternErrorMessage||t.errorMessage||R(`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=bz[t.format];(!i||!a.pattern.test(i))&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:t.patternErrorMessage||t.errorMessage||R(a.errorMessage),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});break}}}validateNumberNode(e,t,n,r){let i=e.value;OR(t.multipleOf)&&KR(i,t.multipleOf??0)!==0&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`Value is not divisible by {0}.`,t.multipleOf),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});let a=this.getNumberLimits(t);OR(a.exclusiveMinimum)&&i<=a.exclusiveMinimum&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`Value is below the exclusive minimum of {0}.`,a.exclusiveMinimum),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),OR(a.exclusiveMaximum)&&i>=a.exclusiveMaximum&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`Value is above the exclusive maximum of {0}.`,a.exclusiveMaximum),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),OR(a.minimum)&&i<a.minimum&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`Value is below the minimum of {0}.`,a.minimum),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),OR(a.maximum)&&i>a.maximum&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`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=Cz(l[e]),u=new xz(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:I.Warning,message:R(`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 xz(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=Cz(t.items);if(n){let c=r.getEvaluatedItems(e);for(let e=0;e<s.length;e++){let l=s[e],u=new xz(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=Cz(t.contains);s&&((e.items??[]).some(e=>{let n=new xz(o);return this.validateNode(e,s,t,n,yz.instance,a),!n.hasProblems()})||r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:t.errorMessage||R(`Array does not contain required item.`),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}))}applyArrayLength(e,t,n,r,i){OR(t.minItems)&&e.items.length<(t.minItems??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`Array has too few items. Expected {0} or more.`,t.minItems),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),OR(t.maxItems)&&e.items.length>(t.maxItems??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`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=CR(e);Array.isArray(i)&&i.some((e,t)=>t!==i.lastIndexOf(e))&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`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`&&MR(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:I.Warning,message:t.errorMessage||wz(gz.missingRequiredPropWarning,[i]),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n),problemArgs:[i],problemType:gz.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),AR(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:I.Warning,message:t.errorMessage||R(`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 xz(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=UR(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(AR(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:I.Warning,message:t.errorMessage||R(`Property {0} is not allowed.`,f),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}}else{let e=new xz(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 xz(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:I.Warning,code:qL.PropertyExpected,message:t.errorMessage||R(`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){OR(t.maxProperties)&&e.properties.length>(t.maxProperties??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`Object has more properties than limit of {0}.`,t.maxProperties),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),OR(t.minProperties)&&e.properties.length<(t.minProperties??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:R(`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:I.Warning,message:R(`Object is missing property {0} required by property {1}.`,i,l),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});else{let n=Cz(u);if(n){let o=new xz(s);this.validateNode(e,n,t,o,i,a),r.mergePropertyMatch(o),r.mergeEnumValues(o)}}}}applyPropertyNames(e,t,n,r){let i=Cz(t.propertyNames);if(i)for(let a of e.properties){let e=a.keyNode;e&&this.validateNode(e,i,t,n,yz.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,[gz.missingRequiredPropWarning,gz.typeMismatchWarning,gz.constWarning])}};function Cz(e){if(e!==void 0)return AR(e)?e?{}:{not:{}}:typeof e==`object`?e:(console.warn(`Wrong schema: ${JSON.stringify(e)}, it MUST be an Object or Boolean`),{type:e})}function wz(e,t){return R(_z[e],t.join(` | `))}function Tz(e,t,n,r){return e?n===null&&t.length===0||jR(n)&&jR(r)&&r.startsWith(n):!1}var Ez=class extends Sz{getCurrentDialect(){return SR.draft04}getNumberLimits(e){let t=OR(e.minimum)?e.minimum:void 0,n=OR(e.maximum)?e.maximum:void 0,r=AR(e.exclusiveMinimum)&&e.exclusiveMinimum?t:void 0,i=AR(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}}},Dz=class extends Sz{getCurrentDialect(){return SR.draft07}getNumberLimits(e){let t=OR(e.minimum)?e.minimum:void 0,n=OR(e.maximum)?e.maximum:void 0,r=OR(e.exclusiveMinimum)?e.exclusiveMinimum:void 0,i=OR(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}}},Oz=class extends Dz{getCurrentDialect(){return SR.draft2019}applyContains(e,t,n,r,i,a){let o=Cz(t.contains);if(!o)return;let s=t.minContains,c=t.maxContains,l=OR(s)?s:1,u=OR(c)?c:void 0,d=0,f=e.items??[];for(let e of f){let n=new xz(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:I.Warning,message:t.errorMessage||R(`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:I.Warning,message:t.errorMessage||R(`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:I.Warning,message:R(`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=Cz(c[n]);if(!s)continue;let l=new xz(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:I.Warning,code:qL.PropertyExpected,message:t.errorMessage||R(`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=Cz(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 xz(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:I.Warning,code:qL.PropertyExpected,message:t.errorMessage||R(`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=Cz(o);if(u)for(let e of l){let n=s[e],o=new xz(a.isKubernetes);this.validateNode(n,u,t,o,i,a),r.merge(o),r.mergeEnumValues(o),c.add(e)}}},kz=class extends Oz{getCurrentDialect(){return SR.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=Cz(c[n]);if(!e){s.add(n);continue}let l=new xz(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:I.Warning,message:R(`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=Cz(l);if(e)for(let n=u;n<o.length;n++){let c=new xz(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=Cz(t.contains);if(!o)return;let s=e.items??[],c=t.minContains,l=t.maxContains,u=OR(c)?c:1,d=OR(l)?l:void 0,f=0,p=r.getEvaluatedItems(e);for(let e=0;e<s.length;e++){let n=new xz(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:I.Warning,message:t.errorMessage||R(`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:I.Warning,message:t.errorMessage||R(`Array has too many items matching "contains". Expected {0} or fewer.`,d),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}};function Az(e){switch(e){case SR.draft04:return new Ez;case SR.draft07:return new Dz;case SR.draft2019:return new Oz;case SR.draft2020:return new kz;default:return new Dz}}var jz=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()+`}`:``)}},Mz=class extends jz{constructor(e,t,n,r){super(e,t,n,r),this.type=`null`,this.value=null}},Nz=class extends jz{constructor(e,t,n,r,i,a){super(e,t,i,a),this.type=`boolean`,this.value=n,this.source=r}},Pz=class extends jz{constructor(e,t,n,r){super(e,t,n,r),this.type=`array`,this.items=[]}get children(){return this.items}},Fz=class extends jz{constructor(e,t,n,r){super(e,t,n,r),this.type=`number`,this.isInteger=!0,this.value=NaN}},Iz=class extends jz{constructor(e,t,n,r){super(e,t,n,r),this.type=`string`,this.value=``}},Lz=class extends jz{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]}},Rz=class extends jz{constructor(e,t,n,r){super(e,t,n,r),this.type=`object`,this.properties=[]}get children(){return this.properties}},zz;(function(e){e[e.Key=0]=`Key`,e[e.Enum=1]=`Enum`})(zz||={});var Bz=class{constructor(e,t=[],n=[]){this.root=e,this.syntaxErrors=t,this.comments=n}getNodeFromOffset(e,t=!1){if(this.root)return TR(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:Az(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?[]:Az(e._dialect).getMatchingSchemas(this.root,e,{isKubernetes:this.isKubernetes,disableAdditionalProperties:this.disableAdditionalProperties,uri:this.uri,callFromAutoComplete:r},t,n)}},Vz={maxRefCount:1e3,currentRefDepth:0,aliasResolutionCache:new Map};function Hz(e,t,n,r){if(e||(Vz.currentRefDepth=0,Vz.aliasResolutionCache=new Map),!t)return null;if(Ll(t))return Uz(t,e,n,r);if(Rl(t))return Wz(t,e,n,r);if(zl(t))return Gz(t,e,n,r);if(z(t))return Kz(t,e);if(Fl(t)&&Vz.currentRefDepth<Vz.maxRefCount)return qz(t,e,n,r)}function Uz(e,t,n,r){let i;i=e.flow&&!e.range?Xz(e):e.range;let a=new Rz(t,e,...Yz(i,r));for(let t of e.items)Rl(t)&&a.properties.push(Hz(a,t,n,r));return a}function Wz(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 Lz(t,e,...Yz([o,s,c],r));if(Fl(i)){let e=new Iz(t,i,...Jz(i.range));e.value=i.source,l.keyNode=e}else l.keyNode=Hz(l,i,n,r);return l.valueNode=Hz(l,a,n,r),l}function Gz(e,t,n,r){let i=new Pz(t,e,...Jz(e.range));for(let t of e.items)if(Vl(t)){let e=Hz(i,t,n,r);e&&i.children.push(e)}return i}function Kz(e,t){if(e.value===null)return new Mz(t,e,...Jz(e.range));switch(typeof e.value){case`string`:{let n=new Iz(t,e,...Jz(e.range));return n.value=e.value,n}case`boolean`:return new Nz(t,e,e.value,e.source,...Jz(e.range));case`number`:{let n=new Fz(t,e,...Jz(e.range));return n.value=e.value,n.isInteger=Number.isInteger(n.value),n}default:{let n=new Iz(t,e,...Jz(e.range));return n.value=e.source,n}}}function qz(e,t,n,r){if(Vz.aliasResolutionCache.has(e))return Vz.aliasResolutionCache.get(e);Vz.currentRefDepth++;let i=e.resolve(n),a;if(i)a=Hz(t,i,n,r);else{let n=new Iz(t,e,...Jz(e.range));n.value=e.source,a=n}return Vz.currentRefDepth--,Vz.aliasResolutionCache.set(e,a),a}function Jz(e){return[e[0],e[1]-e[0]]}function Yz(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 Xz(e){let t=2**53-1,n=0;for(let r of e.items)Rl(r)&&(Vl(r.key)&&r.key.range&&r.key.range[0]<=t&&(t=r.key.range[0]),Vl(r.value)&&r.value.range&&r.value.range[2]>=n&&(n=r.value.range[2]));return[t,n,n]}function Zz(e,t){let n;if(Kl(e,(e,r,i)=>{if(r===t)return n=i[i.length-1],Kl.BREAK}),!Il(n))return n}function Qz(e){if(e.items.length>1)return!1;let t=e.items[0];return z(t.key)&&z(t.value)&&t.key.value===``&&!t.value.value}function $z(e,t){for(let[n,r]of e.items.entries())if(t===r)return n}function eB(e,t){let n=!1;for(let r of e){if(r.type===`document`)nB([],r,e=>{if(tB(e)&&e.value?.type===`comment`){if(r.offset<=t&&e.value.source.length+e.value.offset>=t)return n=!0,Kl.BREAK}else if(e.type===`comment`&&e.offset<=t&&e.offset+e.source.length>=t)return n=!0,Kl.BREAK});else if(r.type===`comment`&&r.offset<=t&&r.source.length+r.offset>=t)return!0;if(n)break}return n}function tB(e){return e.start!==void 0}function nB(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=nB(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===Kl.BREAK)return Kl.BREAK;else r===Kl.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=nB(Object.freeze(e),i[t],n);if(typeof r==`number`)t=r-1;else if(r===Kl.BREAK)return Kl.BREAK;else r===Kl.REMOVE&&(i.items.splice(t,1),--t)}return typeof r==`function`?r(t,e):r}var rB=class e extends Bz{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(`
374
+ `).forEach(e=>this._lineComments.push(`#${e}`)),Kl(this.internalDocument,(e,t)=>{t?.commentBefore&&(t?.commentBefore.split(`
375
+ `)).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=Hz(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(oB)}get warnings(){return this.internalDocument.warnings.map(oB)}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 Kl(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]&&z(n)&&n.value===null)c=n;else return Kl.SKIP}}),[c,!1]}findClosestNode(e,t,n){let r=this.internalDocument.range[2],i=this.internalDocument.range[0],a;Kl(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=HR(t.getLineContent(o.line),o.character);return z(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,Vl(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(Rl(e)&&Vl(e.value))return e.value;if(Rl(a)&&Vl(a.value))return a.value}else return t}else if(Rl(t)){a=t;let o=this.getParent(t);return this.getProperParentByIndentation(e,o,n,r,i,a)}return t}getParent(e){return Zz(this.internalDocument,e)}},iB=class{constructor(e,t){this.documents=e,this.tokens=t,this.errors=[],this.warnings=[]}},aB=new class{constructor(){this.cache=new Map}getYamlDocument(e,t,n=!1){return this.ensureCache(e,t??dB,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 iB([],[]),parserOptions:dB});let i=this.cache.get(r);if(i.version!==e.version||t.customTags&&!BR(i.parserOptions.customTags,t.customTags)){let r=e.getText();n&&!/\S/.test(r)&&(r=`{${r}}`),i.document=fB(r,t,e),i.version=e.version,i.parserOptions=t}}};function oB(e){return{message:e.message,location:{start:e.pos[0],end:e.pos[1],toLineEnd:!0},severity:1,code:qL.Undefined}}var sB=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(Ll(e)&&this.type===`mapping`||zl(e)&&this.type===`sequence`||typeof e==`string`&&this.type===`scalar`)return e}},cB=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 lB(e){let t=[],n=zR(e);for(let e of n){let n=e.split(` `),r=n[0],i=n[1]&&n[1].toLowerCase()||`scalar`;t.push(new sB(r,i))}return t.push(new cB),t}var uB=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(F.create(e-1,t,e-1,t+1)).charCodeAt(0)}getText(e){return this.doc.getText(e)}getPosition(e){return this.doc.positionAt(e)}},dB={customTags:[],yamlVersion:`1.2`};function fB(e,t=dB,n){let r=new Hf({strict:!1,customTags:lB(t.customTags),version:t.yamlVersion??dB.yamlVersion,keepSourceTokens:!0}),i=new sp,a=!1;if(n){let t=new uB(n),r=t.getPosition(e.length);a=t.getLineContent(r.line).trim().length===0}let o=(a?new hp:new hp(i.addNewLine)).parse(e),s=Array.from(o),c=r.compose(s,!0,e.length);return new iB(Array.from(c,e=>pB(e,i)),s)}function pB(e,t){let n=new rB(t);return n.internalDocument=e,n}function mB(e){if(e instanceof rB){let t=e.lineComments.find(e=>hB(e));if(t!=null){let e=t.match(/\$schema(?:=|:\s*)(\S+)/);if(e!==null&&e.length===2)return e[1]}}}function hB(e){let t=e.match(/^#\s+(?:yaml-language-server\s*:|\$schema:)/g);return t!==null&&t.length===1}function gB(){return!0}var _B=class{compile(){return gB}defaultMeta(){return`http://json-schema.org/draft-07/schema`}},vB=class extends _B{defaultMeta(){return`http://json-schema.org/draft-04/schema`}},yB=class extends _B{defaultMeta(){return`https://json-schema.org/draft/2019-09/schema`}},bB=class extends _B{defaultMeta(){return`https://json-schema.org/draft/2020-12/schema`}},xB=`https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.32.1-standalone-strict/`,SB=xB+`all.json`,CB=`https://raw.githubusercontent.com/datreeio/CRDs-catalog/main`;function wB(e){let t=new Map;return e&&(e.url?e.url.startsWith(`schemaservice://combinedSchema/`)?TB(e,t):t.set(e.url,e):TB(e,t)),t}function TB(e,t){e.allOf&&EB(e.allOf,t),e.anyOf&&EB(e.anyOf,t),e.oneOf&&EB(e.oneOf,t)}function EB(e,t){for(let n of e)!AR(n)&&n.url&&!t.has(n.url)&&t.set(n.url,n)}function DB(e,t,n){let r=AB(e);if(!r||!r.group||!r.version||!r.kind)return;let i=OB(r,t);if(i)return i;let a=kB(r,n);if(a)return a}function OB(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 xB+o}function kB(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 AB(e){if(e instanceof rB)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 jB=new vB({allErrors:!0}),MB=new _B({allErrors:!0}),NB=new yB({allErrors:!0}),PB=new bB({allErrors:!0}),FB=RL(),IB=void 0,LB=RL(),RB=RL(),zB=RL(),BB=jB.compile(FB),VB=MB.compile(IB),HB=NB.compile(LB),UB=PB.compile(RB),WB=new Map,GB=new Map,KB=new Map([[`zh-cn`,`zh`],[`zh-tw`,`zh-TW`]]),qB=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(`.`)),JB;(function(e){e[e.delete=0]=`delete`,e[e.add=1]=`add`,e[e.deleteAll=2]=`deleteAll`})(JB||={});var YB=class extends _R{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=XB(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(R(`Schema '{0}' is not valid: {1}`,i,`expected a JSON Schema object or boolean, got "${e}".`)),new gR({},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 nV(e.$schema,c);n&&(e._dialect=n);let a=rV(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)){tV(a.errors,l);let e=[];for(let t of a.errors)e.push(`${t.instancePath} : ${t.message}`);r.push(R(`Schema '{0}' is not valid: {1}`,i,`
376
376
  ${e.join(`
377
- `)}`))}}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(R(`$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=js.parse(e),r=js.parse(t);if(n.scheme!==`file`||r.scheme!==`http`&&r.scheme!==`https`)return;let i=ml.basename(r.path);if(!i)return;let a=ml.dirname(n.path),o=ml.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(R(`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(!JB.has(t))return!0;return!1},_=e=>{let t={};for(let n of Object.keys(e))JB.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))JB.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 w=decodeURIComponent(C),T=w.split(`#`,2),ee=T[0],E=T.length>1?T[1]:``,te=`${ee?m(n,ee):n}#${E}`;if(g(e)){if(o===CR.draft04||o===CR.draft07)v(e);else{if(f?.has(te))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(te)),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&&(w===`#`||w===``)){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(w)||(y(e,n,o,``,!1),b.add(w));continue}l.push(S(e,o,``,n,a,r,i,c,h));return}continue}if(u){let t=ee.length>0?m(n,ee):n,o=d.get(t)?.fragments,s=E.length>0&&o?.get(E)?.dynamic,u=s?h?.get(E)?.[0]:void 0,f=u?u._baseUri:t;if(u&&(f===n||i.has(f))){b.has(w)||(y(e,u,f,``,!1),b.add(w));continue}if(ee.length>0||s){if(x(w,f,E))continue;l.push(S(e,f,E,n,a,r,i,c,h));return}}else if(ee.length>0){if(x(w,m(n,ee),E))continue;l.push(S(e,ee,E,n,a,r,i,c,h));return}b.has(w)||(y(e,t,n,E,u&&!!h),b.add(w))}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)},w=new Set,T=g._baseUri||t;return T&&w.add(T),await C(g,g,t,n,w),new _R(g,r)}getSchemaForResource(e,t){let n=()=>{let n=hB(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(_l(n))n=js.file(n).toString();else{let t=js.parse(e);n=js.file(hl(Tl(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===CB){a||=await this.getResolvedSchema(CB);let r=OB(t,a,this.yamlSettings.kubernetesCRDStoreUrl??wB);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 _R(t,e.errors):new _R(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(QV.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 js.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 gR({},[R(`Unable to load schema from '{0}': No content. {1}`,ZB(e),n.errors)]);try{return new gR(yp(t),[])}catch(t){return new gR({},[R(`Unable to parse content from '{0}': {1}.`,ZB(e),t)])}},e=>{let t=e.toString(),n=e.toString().split(`Error: `);return n.length>1&&(t=n[1]),new gR({},[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=R(`Unable to load schema from '{0}': No content.`,ZB(e));else if(r.toLowerCase().indexOf(`parse`)!==-1){let n=await t(e),i=[],a=Es(n,i);if(i.length&&a){let{offset:t}=i[0],{line:a,column:o}=QB(n,t);r=R(`Unable to parse content from '{0}': Parse error at line: {1} column: {2}`,ZB(e),a,o)}}return new gR({},[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 ZB(e){try{let t=js.parse(e);if(t.scheme===`file`)return t.fsPath}catch{}return e}function QB(e,t){let n=e.slice(0,t).split(/\r?\n/);return{line:n.length,column:n[n.length-1].length+1}}function $B(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 eV(e){if(e===$B(MB.defaultMeta()))return CR.draft04;if(e===$B(NB.defaultMeta()))return CR.draft07;if(e===$B(PB.defaultMeta()))return CR.draft2019;if(e===$B(FB.defaultMeta()))return CR.draft2020}function tV(e){if(!e)return;let t=e.trim().toLowerCase(),n=qB.get(t);return BB[e]||BB[t]||(n?BB[n]:void 0)}function nV(e,t){(tV(t)||BB.en)(e)}async function rV(e,t){if(!e)return;let n=$B(e||``),r=eV(n);if(r)return r;let i=GB.get(n);if(i)return i;let a=KB.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=eV(r.$schema);if(i)return i})();KB.set(n,o);try{let e=await o;return GB.set(n,e),e}finally{KB.delete(n)}}function iV(e){switch(e){case CR.draft04:return VB;case CR.draft07:return HB;case CR.draft2019:return UB;case CR.draft2020:return WB;default:return}}var aV=class{constructor(e,t){this.telemetry=t,this.jsonDocumentSymbols=new sz(e),this.jsonDocumentSymbols.getKeyLabel=e=>{let t=e.keyNode.internalNode,n=``;return n=Rl(t)?`{}`:Bl(t)?`[]`:t.source,n}}findDocumentSymbols(e,t={resultLimit:Number.MAX_VALUE}){let n=[];try{let r=oB.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=oB.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 oV(e,t){for(let n of e)n.isKubernetes=t}function sV(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 cV=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=oB.getYamlDocument(e),i=zR(e.offsetAt(t),r);return i===null?Promise.resolve(void 0):(oV(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=F.create(e.positionAt(a.offset),e.positionAt(a.offset+a.length)),s=e=>({contents:{kind:dc.Markdown,value:e},range:o});if(this.shouldHoverAnchor&&i.type===`property`&&i.valueNode&&i.valueNode.type===`object`){let e="```yaml\n"+bp(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(wR(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`?sV(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&&fV(i,t,e.schema)&&(r=``,a=e.schema.description?e.schema.description+`
378
- `:``,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(bp(e,null,2))})),!0));let f=``;return r&&(f=`#### `+this.toMarkdown(r)),a&&(f=lV(f),f+=a),u.length!==0&&(f=lV(f),f+=R(`Allowed Values:`)+`
377
+ `)}`))}}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(R(`$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=js.parse(e),r=js.parse(t);if(n.scheme!==`file`||r.scheme!==`http`&&r.scheme!==`https`)return;let i=pl.basename(r.path);if(!i)return;let a=pl.dirname(n.path),o=pl.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(R(`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(!qB.has(t))return!0;return!1},_=e=>{let t={};for(let n of Object.keys(e))qB.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))qB.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 w=decodeURIComponent(C),T=w.split(`#`,2),ee=T[0],E=T.length>1?T[1]:``,te=`${ee?m(n,ee):n}#${E}`;if(g(e)){if(o===SR.draft04||o===SR.draft07)v(e);else{if(f?.has(te))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(te)),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&&(w===`#`||w===``)){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(w)||(y(e,n,o,``,!1),b.add(w));continue}l.push(S(e,o,``,n,a,r,i,c,h));return}continue}if(u){let t=ee.length>0?m(n,ee):n,o=d.get(t)?.fragments,s=E.length>0&&o?.get(E)?.dynamic,u=s?h?.get(E)?.[0]:void 0,f=u?u._baseUri:t;if(u&&(f===n||i.has(f))){b.has(w)||(y(e,u,f,``,!1),b.add(w));continue}if(ee.length>0||s){if(x(w,f,E))continue;l.push(S(e,f,E,n,a,r,i,c,h));return}}else if(ee.length>0){if(x(w,m(n,ee),E))continue;l.push(S(e,ee,E,n,a,r,i,c,h));return}b.has(w)||(y(e,t,n,E,u&&!!h),b.add(w))}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)},w=new Set,T=g._baseUri||t;return T&&w.add(T),await C(g,g,t,n,w),new gR(g,r)}getSchemaForResource(e,t){let n=()=>{let n=mB(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(gl(n))n=js.file(n).toString();else{let t=js.parse(e);n=js.file(ml(wl(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===SB){a||=await this.getResolvedSchema(SB);let r=DB(t,a,this.yamlSettings.kubernetesCRDStoreUrl??CB);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 gR(t,e.errors):new gR(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(ZV.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 js.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 hR({},[R(`Unable to load schema from '{0}': No content. {1}`,XB(e),n.errors)]);try{return new hR(vp(t),[])}catch(t){return new hR({},[R(`Unable to parse content from '{0}': {1}.`,XB(e),t)])}},e=>{let t=e.toString(),n=e.toString().split(`Error: `);return n.length>1&&(t=n[1]),new hR({},[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=R(`Unable to load schema from '{0}': No content.`,XB(e));else if(r.toLowerCase().indexOf(`parse`)!==-1){let n=await t(e),i=[],a=Es(n,i);if(i.length&&a){let{offset:t}=i[0],{line:a,column:o}=ZB(n,t);r=R(`Unable to parse content from '{0}': Parse error at line: {1} column: {2}`,XB(e),a,o)}}return new hR({},[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 XB(e){try{let t=js.parse(e);if(t.scheme===`file`)return t.fsPath}catch{}return e}function ZB(e,t){let n=e.slice(0,t).split(/\r?\n/);return{line:n.length,column:n[n.length-1].length+1}}function QB(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 $B(e){if(e===QB(jB.defaultMeta()))return SR.draft04;if(e===QB(MB.defaultMeta()))return SR.draft07;if(e===QB(NB.defaultMeta()))return SR.draft2019;if(e===QB(PB.defaultMeta()))return SR.draft2020}function eV(e){if(!e)return;let t=e.trim().toLowerCase(),n=KB.get(t);return zB[e]||zB[t]||(n?zB[n]:void 0)}function tV(e,t){(eV(t)||zB.en)(e)}async function nV(e,t){if(!e)return;let n=QB(e||``),r=$B(n);if(r)return r;let i=WB.get(n);if(i)return i;let a=GB.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=$B(r.$schema);if(i)return i})();GB.set(n,o);try{let e=await o;return WB.set(n,e),e}finally{GB.delete(n)}}function rV(e){switch(e){case SR.draft04:return BB;case SR.draft07:return VB;case SR.draft2019:return HB;case SR.draft2020:return UB;default:return}}var iV=class{constructor(e,t){this.telemetry=t,this.jsonDocumentSymbols=new oz(e),this.jsonDocumentSymbols.getKeyLabel=e=>{let t=e.keyNode.internalNode,n=``;return n=Ll(t)?`{}`:zl(t)?`[]`:t.source,n}}findDocumentSymbols(e,t={resultLimit:Number.MAX_VALUE}){let n=[];try{let r=aB.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=aB.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 aV(e,t){for(let n of e)n.isKubernetes=t}function oV(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 sV=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=aB.getYamlDocument(e),i=RR(e.offsetAt(t),r);return i===null?Promise.resolve(void 0):(aV(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=F.create(e.positionAt(a.offset),e.positionAt(a.offset+a.length)),s=e=>({contents:{kind:dc.Markdown,value:e},range:o});if(this.shouldHoverAnchor&&i.type===`property`&&i.valueNode&&i.valueNode.type===`object`){let e="```yaml\n"+yp(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(CR(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`?oV(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&&dV(i,t,e.schema)&&(r=``,a=e.schema.description?e.schema.description+`
378
+ `:``,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(yp(e,null,2))})),!0));let f=``;return r&&(f=`#### `+this.toMarkdown(r)),a&&(f=cV(f),f+=a),u.length!==0&&(f=cV(f),f+=R(`Allowed Values:`)+`
379
379
 
380
- `,d&&u.unshift(u.splice(d,1)[0]),u.forEach(e=>{e.description?f+=`* \`${dV(e.value)}\`: ${e.description}
381
- `:f+=`* \`${dV(e.value)}\`
382
- `})),l.length!==0&&l.forEach(e=>{f=lV(f),f+=R(`Example:`)+`
380
+ `,d&&u.unshift(u.splice(d,1)[0]),u.forEach(e=>{e.description?f+=`* \`${uV(e.value)}\`: ${e.description}
381
+ `:f+=`* \`${uV(e.value)}\`
382
+ `})),l.length!==0&&l.forEach(e=>{f=cV(f),f+=R(`Example:`)+`
383
383
 
384
384
  `,f+=`\`\`\`yaml
385
385
  ${e}\`\`\`
386
- `}),f.length>0&&e.schema.url&&this.hoverSchemaSource&&(f=lV(f),f+=R(`Source: [{0}]({1})`,uV(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(Il(e))return e.source;if(Rl(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 Bl(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
386
+ `}),f.length>0&&e.schema.url&&this.hoverSchemaSource&&(f=cV(f),f+=R(`Source: [{0}]({1})`,lV(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(Fl(e))return e.source;if(Ll(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 zl(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
387
387
 
388
- $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 lV(e){return e.length===0?e:(e.endsWith(`
388
+ $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 cV(e){return e.length===0?e:(e.endsWith(`
389
389
  `)||(e+=`
390
390
  `),e+`
391
- `)}function uV(e){let t=`JSON Schema`,n=e.url;if(n){let e=js.parse(n);t=Sl(e.fsPath)}else e.title&&(t=e.title);return t}function dV(e){return e.indexOf("`")===-1?e:"`` "+e+" ``"}function fV(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 pV=/^\s*#\s*yaml-language-server-disable\b(.*)$/;function mV(e){let t=e.trim();return t?t.split(`,`).map(e=>e.trim().toLowerCase()).filter(e=>e.length>0):[]}function hV(e,t){if(e.length===0)return!0;let n=t.toLowerCase();return e.some(e=>n.includes(e))}function gV(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=pV.exec(a);return!o||!hV(mV(o[1]),n(e))})}var _V=class{validate(e,t){let n=[],r=new Set,i=new Set,a=new Set,o=new Map;ql(t.internalDocument,(e,n,s)=>{Hl(n)&&((Vl(n)||z(n))&&n.anchor&&(r.add(n),o.set(n,s[s.length-1])),Il(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=F.create(e.positionAt(r.offset),e.positionAt(r.offset+r.source.length)),i=Js.create(t,R(`Unused anchor "{0}"`,r.source),I.Information,0);i.tags=[Ks.Unnecessary],n.push(i)}}return a.forEach(t=>{let r=t.range;if(r){let i=r[0],a=r[1],o=F.create(e.positionAt(i),e.positionAt(a)),s=Js.create(o,R(`Unresolved alias "{0}"`,t.toString()),I.Information,0);s.tags=[Ks.Unnecessary],n.push(s)}}),n}getAnchorNode(e,t){if(e&&e.srcToken){let n=e.srcToken;if(nB(n))return vV(n);if(Qf(n))for(let e of n.items){if(t.srcToken!==e.value)continue;let n=vV(e);if(n)return n}}}};function vV(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 yV=class{constructor(e){this.forbidMapping=e.flowMapping===`forbid`,this.forbidSequence=e.flowSequence===`forbid`}validate(e,t){let n=[];return ql(t.internalDocument,(t,r)=>{this.forbidMapping&&Rl(r)&&r.srcToken?.type===`flow-collection`&&n.push(Js.create(this.getRangeOf(e,r.srcToken),R(`Flow style mapping is forbidden`),I.Error,`flowMap`)),this.forbidSequence&&Bl(r)&&r.srcToken?.type===`flow-collection`&&n.push(Js.create(this.getRangeOf(e,r.srcToken),R(`Flow style sequence is forbidden`),I.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},F.create(e.positionAt(t.start.offset),r)}},bV=class{validate(e,t){let n=[];return ql(t.internalDocument,(t,r)=>{if(Rl(r)){for(let t=1;t<r.items.length;t++)if(SV(r.items[t-1],r.items[t])>0){let i=xV(e,r.items[t-1]);n.push(Js.create(i,`Wrong ordering of key "${r.items[t-1].key}" in mapping`,I.Error,`mapKeyOrder`));break}}}),n}};function xV(e,t){let n=t.key.srcToken,r=n.offset,i=r+n.source.length;return F.create(e.positionAt(r),e.positionAt(i))}function SV(e,t){let n=String(t.key);return String(e.key).localeCompare(n)}var CV=(e,t)=>{let n=t.positionAt(e.location.start),r={start:n,end:e.location.toLineEnd?Ls.create(n.line,new dB(t).getLineLength(n.line)):t.positionAt(e.location.end)};return Js.create(r,e.message,e.severity,e.code,hz)},wV=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 YR(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 yV(e)),e.keyOrdering&&this.validators.push(new bV)),this.validators.push(new _V)}async doValidation(e,t=!1){if(!this.validationEnabled)return Promise.resolve([]);let n=[];try{let r=oB.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=CV(o,e)),o.source||(o.source=hz),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 dB(e);return gV(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}},TV=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 PL(n,{parser:`yaml`,plugins:[xp,ev],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?[]:[Xs.replace(F.create(Ls.create(0,0),e.positionAt(n.length)),r)]}catch{return[]}}},EV=class{constructor(e){this.telemetry=e}findLinks(e){try{let t=oB.getYamlDocument(e),n=[];for(let r of t.documents)n.push(lz(e,r));return Promise.all(n).then(e=>[].concat(...e))}catch(e){this.telemetry?.sendError(`yaml.documentLink.error`,e)}}};function DV(e,t){if(!e)return;let n=[],r=oB.getYamlDocument(e);for(let t of r.documents)r.documents.length>1&&n.push(OV(e,t.root)),t.visit(t=>{if(t.type===`object`&&t.parent?.type===`array`&&n.push(OV(e,t)),t.type===`property`&&t.valueNode)switch(t.valueNode.type){case`array`:case`object`:n.push(OV(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(OV(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 OV(e,t){let n=e.positionAt(t.offset),r=e.positionAt(t.offset+t.length),i=e.getText(F.create(n,r)),a=i.length-i.trimRight().length;return a>0&&(r=e.positionAt(t.offset+t.length-a)),Ws.create(n.line,r.line,n.character,r.character)}var kV;(function(e){e.JUMP_TO_SCHEMA=`jumpToSchema`})(kV||={});var AV=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(`
391
+ `)}function lV(e){let t=`JSON Schema`,n=e.url;if(n){let e=js.parse(n);t=xl(e.fsPath)}else e.title&&(t=e.title);return t}function uV(e){return e.indexOf("`")===-1?e:"`` "+e+" ``"}function dV(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 fV=/^\s*#\s*yaml-language-server-disable\b(.*)$/;function pV(e){let t=e.trim();return t?t.split(`,`).map(e=>e.trim().toLowerCase()).filter(e=>e.length>0):[]}function mV(e,t){if(e.length===0)return!0;let n=t.toLowerCase();return e.some(e=>n.includes(e))}function hV(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=fV.exec(a);return!o||!mV(pV(o[1]),n(e))})}var gV=class{validate(e,t){let n=[],r=new Set,i=new Set,a=new Set,o=new Map;Kl(t.internalDocument,(e,n,s)=>{Vl(n)&&((Bl(n)||z(n))&&n.anchor&&(r.add(n),o.set(n,s[s.length-1])),Fl(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=F.create(e.positionAt(r.offset),e.positionAt(r.offset+r.source.length)),i=Js.create(t,R(`Unused anchor "{0}"`,r.source),I.Information,0);i.tags=[Ks.Unnecessary],n.push(i)}}return a.forEach(t=>{let r=t.range;if(r){let i=r[0],a=r[1],o=F.create(e.positionAt(i),e.positionAt(a)),s=Js.create(o,R(`Unresolved alias "{0}"`,t.toString()),I.Information,0);s.tags=[Ks.Unnecessary],n.push(s)}}),n}getAnchorNode(e,t){if(e&&e.srcToken){let n=e.srcToken;if(tB(n))return _V(n);if(Zf(n))for(let e of n.items){if(t.srcToken!==e.value)continue;let n=_V(e);if(n)return n}}}};function _V(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 vV=class{constructor(e){this.forbidMapping=e.flowMapping===`forbid`,this.forbidSequence=e.flowSequence===`forbid`}validate(e,t){let n=[];return Kl(t.internalDocument,(t,r)=>{this.forbidMapping&&Ll(r)&&r.srcToken?.type===`flow-collection`&&n.push(Js.create(this.getRangeOf(e,r.srcToken),R(`Flow style mapping is forbidden`),I.Error,`flowMap`)),this.forbidSequence&&zl(r)&&r.srcToken?.type===`flow-collection`&&n.push(Js.create(this.getRangeOf(e,r.srcToken),R(`Flow style sequence is forbidden`),I.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},F.create(e.positionAt(t.start.offset),r)}},yV=class{validate(e,t){let n=[];return Kl(t.internalDocument,(t,r)=>{if(Ll(r)){for(let t=1;t<r.items.length;t++)if(xV(r.items[t-1],r.items[t])>0){let i=bV(e,r.items[t-1]);n.push(Js.create(i,`Wrong ordering of key "${r.items[t-1].key}" in mapping`,I.Error,`mapKeyOrder`));break}}}),n}};function bV(e,t){let n=t.key.srcToken,r=n.offset,i=r+n.source.length;return F.create(e.positionAt(r),e.positionAt(i))}function xV(e,t){let n=String(t.key);return String(e.key).localeCompare(n)}var SV=(e,t)=>{let n=t.positionAt(e.location.start),r={start:n,end:e.location.toLineEnd?Ls.create(n.line,new uB(t).getLineLength(n.line)):t.positionAt(e.location.end)};return Js.create(r,e.message,e.severity,e.code,mz)},CV=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 JR(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 vV(e)),e.keyOrdering&&this.validators.push(new yV)),this.validators.push(new gV)}async doValidation(e,t=!1){if(!this.validationEnabled)return Promise.resolve([]);let n=[];try{let r=aB.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=SV(o,e)),o.source||(o.source=mz),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 uB(e);return hV(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}},wV=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 NL(n,{parser:`yaml`,plugins:[bp,$_],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?[]:[Xs.replace(F.create(Ls.create(0,0),e.positionAt(n.length)),r)]}catch{return[]}}},TV=class{constructor(e){this.telemetry=e}findLinks(e){try{let t=aB.getYamlDocument(e),n=[];for(let r of t.documents)n.push(cz(e,r));return Promise.all(n).then(e=>[].concat(...e))}catch(e){this.telemetry?.sendError(`yaml.documentLink.error`,e)}}};function EV(e,t){if(!e)return;let n=[],r=aB.getYamlDocument(e);for(let t of r.documents)r.documents.length>1&&n.push(DV(e,t.root)),t.visit(t=>{if(t.type===`object`&&t.parent?.type===`array`&&n.push(DV(e,t)),t.type===`property`&&t.valueNode)switch(t.valueNode.type){case`array`:case`object`:n.push(DV(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(DV(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 DV(e,t){let n=e.positionAt(t.offset),r=e.positionAt(t.offset+t.length),i=e.getText(F.create(n,r)),a=i.length-i.trimRight().length;return a>0&&(r=e.positionAt(t.offset+t.length-a)),Ws.create(n.line,r.line,n.character,r.character)}var OV;(function(e){e.JUMP_TO_SCHEMA=`jumpToSchema`})(OV||={});var kV=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(`
392
392
  `);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(`
393
393
  `)}i.pop();for(let e=1;e<i.length;){if(/^[ \t]+$/.test(i[e])){if(i[e-1]===`
394
394
  `||i[e-1]===``){i.splice(e-1,1);continue}return null}e++}let o=`>`;i[i.length-1]!==`
@@ -397,35 +397,35 @@ $3`);if(t=t.replace(/[\\`*_{}[\]#+!]/g,`\\$&`),this.indentation!==void 0){let e=
397
397
  `&&i[i.length-3]!==``?i.splice(i.length-2,2):o+=`+`,/ /.test(t.charAt(0))&&(o+=`${r.length}`);let s=i.flatMap(t=>t===`
398
398
  `||t===``?[{type:`newline`,indent:0,offset:e.srcToken.offset,source:`
399
399
  `}]:[{type:`newline`,indent:0,offset:e.srcToken.offset,source:`
400
- `},{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 Wf(c)}writeLiteralBlockScalar(e){if(e.type!==`QUOTE_DOUBLE`&&e.type!==`QUOTE_SINGLE`)return null;let t=e.value;if(t.indexOf(`
400
+ `},{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 Uf(c)}writeLiteralBlockScalar(e){if(e.type!==`QUOTE_DOUBLE`&&e.type!==`QUOTE_SINGLE`)return null;let t=e.value;if(t.indexOf(`
401
401
  `)<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(`
402
402
  `),a=`|`;i[i.length-1]!==`
403
403
  `&&i[i.length-1]!==``?a+=`-`:i[i.length-2]!==`
404
404
  `&&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:`
405
405
  `}]:[{type:`newline`,indent:0,offset:e.srcToken.offset,source:`
406
- `},{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 Wf(s)}},jV=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)Xf(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:`
406
+ `},{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 Uf(s)}},AV=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)Yf(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:`
407
407
  `}),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:`
408
- `},{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 ql.SKIP});return Wf(i)}},MV=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=Lc.create(R(`Jump to schema location ({0})`,Sl(e)),Ys.create(`JumpToSchema`,kV.JUMP_TO_SCHEMA,e));r.diagnostics=t.get(e),n.push(r)}return n}getTabToSpaceConverting(e,t){let n=[],r=new dB(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=F.create(a.range.start,Ls.create(a.range.end.line,a.range.start.character+o))),n.push(Lc.create(R(`Convert Tab to Spaces`),PV(t.uri,[Xs.replace(c,s)]),Nc.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(Xs.replace(F.create(t,r-i,t,r),a)),i=0,a=``);break}if(o===` `&&i!==0){e.push(Xs.replace(F.create(t,r-i,t,r),a)),i=0,a=``;continue}o===` `&&(a+=this.indentation,i++)}i!==0&&e.push(Xs.replace(F.create(t,0,t,r.getLineLength(t)),a))}e.length>0&&n.push(Lc.create(R(`Convert all Tabs to Spaces`),PV(t.uri,e),Nc.QuickFix))}return n}getUnusedAnchorsDelete(e,t){let n=[],r=new dB(t);for(let i of e)if(i.message.startsWith(`Unused anchor`)&&i.source===hz){let e=F.create(i.range.start,i.range.end),a=r.getText(e),o=GR(r.getLineContent(e.end.line),e.end.character);e.end.character=o;let s=Lc.create(R(`Delete unused anchor: {0}`,a),PV(t.uri,[Xs.del(e)]),Nc.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(Lc.create(R(`Convert to boolean`),PV(t.uri,[Xs.replace(r.range,i)]),Nc.QuickFix))}}return n}getConvertToBlockStyleActions(e,t){let n=[];for(let r of e)if(r.code===`flowMap`||r.code===`flowSeq`){let e=NV(t,r);if(Rl(e.internalNode)||Bl(e.internalNode)){let i=Rl(e.internalNode)?`map`:`sequence`,a=new jV(this.indentation);n.push(Lc.create(R(`Convert to block style {0}`,i),PV(t.uri,[Xs.replace(r.range,a.write(e))]),Nc.QuickFix))}}return n}getConvertStringToBlockStyleActions(e,t){let n=oB.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=[];ql(e.internalDocument,(e,t)=>{z(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(`
409
- `)>=0||t.value.length>this.lineWidth)&&n.push(t)});for(let e of n){let n=F.create(t.positionAt(e.range[0]),t.positionAt(e.range[1])),r=new AV(this.indentation,this.lineWidth),i=r.writeFoldedBlockScalar(e);i!==null&&a.push(Lc.create(R(`Convert string to folded block string`),PV(t.uri,[Xs.replace(n,i)]),Nc.Refactor));let o=r.writeLiteralBlockScalar(e);o!==null&&a.push(Lc.create(R(`Convert string to literal block string`),PV(t.uri,[Xs.replace(n,o)]),Nc.Refactor))}}return a}getKeyOrderActions(e,t){let n=[];for(let r of e)if(r?.code===`mapKeyOrder`){let e=NV(t,r);for(;e&&e.type!==`object`;)e=e.parent;if(e&&Rl(e.internalNode)){let r=structuredClone(e.internalNode),i=e=>{if(e){if($f(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&&$f(e.key)&&$f(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:`
410
- `}),!c&&s>-1&&o&&o.splice(s,1)}}let a=F.create(t.positionAt(e.offset),t.positionAt(e.offset+e.length));n.push(Lc.create(R(`Fix key order for this map`),PV(t.uri,[Xs.replace(a,Wf(r.srcToken))]),Nc.QuickFix))}}return n}getPossibleQuickFixValues(e){if(typeof e.data==`object`){if(e.code===JL.EnumValueMismatch&&`values`in e.data&&Array.isArray(e.data.values))return e.data.values;if(e.code===JL.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`?sV(i):String(i);n.push(Lc.create(e,PV(t.uri,[Xs.replace(r.range,e)]),Nc.QuickFix))}}return n}};function NV(e,t){let n=oB.getYamlDocument(e),r=e.offsetAt(t.range.start),i=e.offsetAt(t.range.end),a=zR(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 PV(e,t){let n={};return n[e]=t,{changes:n}}function FV(e,t){let{position:n}=t,r=new dB(e);if(t.ch===`
411
- `){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(Xs.del(F.create(n,Ls.create(n.line,i.length-1)))),a.push(Xs.insert(n,` `.repeat(t.options.tabSize+(o?2-r:0)))),a}if(o)return[Xs.insert(n,` `.repeat(t.options.tabSize))]}if(e.trimRight().endsWith(`|`))return[Xs.insert(n,` `.repeat(t.options.tabSize))];if(e.includes(` - `)&&!e.includes(`: `))return[Xs.insert(n,`- `)];if(e.includes(` - `)&&e.includes(`: `))return[Xs.insert(n,` `)]}}var IV=class{constructor(e,t){this.schemaService=e,this.telemetry=t}async getCodeLens(e){let t=[];try{let n=oB.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([...TB(n?.schema),...r]))}for(let e of r){let n=Rc.create(F.create(0,0,0,0));n.command={title:IR(e[1],e[0]),command:kV.JUMP_TO_SCHEMA,arguments:[e[0]]},t.push(n)}}catch(e){this.telemetry?.sendError(`yaml.codeLens.error`,e)}return t}resolveCodeLens(e){return e}},LV=class{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}};function RV(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 zV(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 LV;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++,RV(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 BV(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+=`
412
- `+o+`- `+n(e[c]);continue}Array.isArray(e[c])||(l=VV(e[c],a)),s+=BV(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
+ `},{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 Kl.SKIP});return Uf(i)}},jV=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=Lc.create(R(`Jump to schema location ({0})`,xl(e)),Ys.create(`JumpToSchema`,OV.JUMP_TO_SCHEMA,e));r.diagnostics=t.get(e),n.push(r)}return n}getTabToSpaceConverting(e,t){let n=[],r=new uB(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=F.create(a.range.start,Ls.create(a.range.end.line,a.range.start.character+o))),n.push(Lc.create(R(`Convert Tab to Spaces`),NV(t.uri,[Xs.replace(c,s)]),Nc.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(Xs.replace(F.create(t,r-i,t,r),a)),i=0,a=``);break}if(o===` `&&i!==0){e.push(Xs.replace(F.create(t,r-i,t,r),a)),i=0,a=``;continue}o===` `&&(a+=this.indentation,i++)}i!==0&&e.push(Xs.replace(F.create(t,0,t,r.getLineLength(t)),a))}e.length>0&&n.push(Lc.create(R(`Convert all Tabs to Spaces`),NV(t.uri,e),Nc.QuickFix))}return n}getUnusedAnchorsDelete(e,t){let n=[],r=new uB(t);for(let i of e)if(i.message.startsWith(`Unused anchor`)&&i.source===mz){let e=F.create(i.range.start,i.range.end),a=r.getText(e),o=WR(r.getLineContent(e.end.line),e.end.character);e.end.character=o;let s=Lc.create(R(`Delete unused anchor: {0}`,a),NV(t.uri,[Xs.del(e)]),Nc.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(Lc.create(R(`Convert to boolean`),NV(t.uri,[Xs.replace(r.range,i)]),Nc.QuickFix))}}return n}getConvertToBlockStyleActions(e,t){let n=[];for(let r of e)if(r.code===`flowMap`||r.code===`flowSeq`){let e=MV(t,r);if(Ll(e.internalNode)||zl(e.internalNode)){let i=Ll(e.internalNode)?`map`:`sequence`,a=new AV(this.indentation);n.push(Lc.create(R(`Convert to block style {0}`,i),NV(t.uri,[Xs.replace(r.range,a.write(e))]),Nc.QuickFix))}}return n}getConvertStringToBlockStyleActions(e,t){let n=aB.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=[];Kl(e.internalDocument,(e,t)=>{z(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(`
409
+ `)>=0||t.value.length>this.lineWidth)&&n.push(t)});for(let e of n){let n=F.create(t.positionAt(e.range[0]),t.positionAt(e.range[1])),r=new kV(this.indentation,this.lineWidth),i=r.writeFoldedBlockScalar(e);i!==null&&a.push(Lc.create(R(`Convert string to folded block string`),NV(t.uri,[Xs.replace(n,i)]),Nc.Refactor));let o=r.writeLiteralBlockScalar(e);o!==null&&a.push(Lc.create(R(`Convert string to literal block string`),NV(t.uri,[Xs.replace(n,o)]),Nc.Refactor))}}return a}getKeyOrderActions(e,t){let n=[];for(let r of e)if(r?.code===`mapKeyOrder`){let e=MV(t,r);for(;e&&e.type!==`object`;)e=e.parent;if(e&&Ll(e.internalNode)){let r=structuredClone(e.internalNode),i=e=>{if(e){if(Qf(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&&Qf(e.key)&&Qf(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:`
410
+ `}),!c&&s>-1&&o&&o.splice(s,1)}}let a=F.create(t.positionAt(e.offset),t.positionAt(e.offset+e.length));n.push(Lc.create(R(`Fix key order for this map`),NV(t.uri,[Xs.replace(a,Uf(r.srcToken))]),Nc.QuickFix))}}return n}getPossibleQuickFixValues(e){if(typeof e.data==`object`){if(e.code===qL.EnumValueMismatch&&`values`in e.data&&Array.isArray(e.data.values))return e.data.values;if(e.code===qL.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`?oV(i):String(i);n.push(Lc.create(e,NV(t.uri,[Xs.replace(r.range,e)]),Nc.QuickFix))}}return n}};function MV(e,t){let n=aB.getYamlDocument(e),r=e.offsetAt(t.range.start),i=e.offsetAt(t.range.end),a=RR(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 NV(e,t){let n={};return n[e]=t,{changes:n}}function PV(e,t){let{position:n}=t,r=new uB(e);if(t.ch===`
411
+ `){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(Xs.del(F.create(n,Ls.create(n.line,i.length-1)))),a.push(Xs.insert(n,` `.repeat(t.options.tabSize+(o?2-r:0)))),a}if(o)return[Xs.insert(n,` `.repeat(t.options.tabSize))]}if(e.trimRight().endsWith(`|`))return[Xs.insert(n,` `.repeat(t.options.tabSize))];if(e.includes(` - `)&&!e.includes(`: `))return[Xs.insert(n,`- `)];if(e.includes(` - `)&&e.includes(`: `))return[Xs.insert(n,` `)]}}var FV=class{constructor(e,t){this.schemaService=e,this.telemetry=t}async getCodeLens(e){let t=[];try{let n=aB.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([...wB(n?.schema),...r]))}for(let e of r){let n=Rc.create(F.create(0,0,0,0));n.command={title:FR(e[1],e[0]),command:OV.JUMP_TO_SCHEMA,arguments:[e[0]]},t.push(n)}}catch(e){this.telemetry?.sendError(`yaml.codeLens.error`,e)}return t}resolveCodeLens(e){return e}},IV=class{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}};function LV(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 RV(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 IV;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++,LV(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 zV(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+=`
412
+ `+o+`- `+n(e[c]);continue}Array.isArray(e[c])||(l=BV(e[c],a)),s+=zV(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?`
413
413
  `:``,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?``:`
414
- `;if(i===0&&c&&!r.indentFirstObject){let a=BV(e[u],p,n,r,i+1,0);s+=m+t+u+f+a}else{let t=BV(e[u],p,n,r,i+1,0);s+=m+o+u+f+t}c=!1}return s}}return n(e)}function VV(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 HV=pc.Class,UV=`__`,WV=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=xc.create([],!1);if(!this.completionEnabled)return i;let a=this.yamlDocument.getYamlDocument(e,{customTags:this.customTags,yamlVersion:this.yamlVersion},!0),o=new dB(e);if(this.configuredIndentation)this.indentation=this.configuredIndentation;else{let e=zV(o,2,!0);this.indentation=e.insertSpaces?` `.repeat(e.tabSize):` `}oV(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=zR(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=F.create(t,Ls.create(t.line,p.length));let e=p.trim().length===0,n=p.match(/^\s*(-)\s*$/);if(u&&z(u)&&!e&&!n){let e=p.substring(0,t.character),n=e.match(/^[\s-]*([^:]+)?$/)||e.match(/:[ \t]((?!:[ \t]).*)$/);n?.[1]&&(g=F.create(Ls.create(t.line,t.character-n[1].length),Ls.create(t.line,p.length)))}}else if(u&&z(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=F.create(t,n)}else if(u&&z(u)&&u.value){let t=e.positionAt(u.range[0]);g=F.create(t,e.positionAt(u.range[1]))}else if(u&&z(u)&&u.value===null&&f===`-`)g=F.create(t,t),this.arrayPrefixIndentation=` `;else{let n=s-f.length;n>0&&c[n-1]===`"`&&n--,g=F.create(e.positionAt(n),t)}let _={},v={add:(e,t)=>{let n=function(e){if(_[e.label]?.label===UV)return;let t=e.parent.schema,n=PR(t),r=t.markdownDescription||t.description,a=i.items.find(e=>e.parent?.schema===t&&e.kind===HV);a&&a.parent.insertTexts.includes(e.insertText)||(a?a.parent.insertTexts.push(e.insertText):(a={...e,label:n,documentation:r,sortText:`_`+n,kind:HV},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(MR(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=Xs.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=Xs.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!==UV&&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(`
415
- `)&&(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&&!gB(p)){let e={kind:pc.Text,label:R(`Inline schema`),insertText:`# yaml-language-server: $schema=`,insertTextFormat:mc.PlainText};i.items.push(e)}if(gB(p)||tB(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:pc.Constant,label:e.name??e.uri,detail:e.description,insertText:e.uri,insertTextFormat:mc.PlainText,insertTextMode:_c.asIs};i.items.push(t)}),i}if(!n||n.errors.length)return i;let m=null;if(!u){if(!l.internalDocument.contents||z(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(z(u)){if(u.value){if(zl(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(Bl(l.internalDocument.contents)){let t=eB(l.internalDocument.contents,n);typeof t==`number`&&(l.internalDocument.set(t,e),l.updateFromInternalDocument())}else t&&(Rl(t)||Bl(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(Bl(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(zl(n)){if(n.key===u)u=n;else if(Hl(n.key)&&n.key.range){let r=l.getParent(n);if(d&&r&&Rl(r)&&$z(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&&(Rl(r)||Bl(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(Bl(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(Rl(u)&&!d&&p.trim().length===0&&Bl(n)){let e=o.getLineContent(t.line+1);(o.getLineCount()===t.line+1||e.trim().length===0)&&(u=n)}}else if(z(u)){let e=this.createTempObjNode(f,u,l);l.internalDocument.contents=e,l.updateFromInternalDocument(),m=e.items[0],u=e}else if(Rl(u))for(let e of u.items)Hl(e.value)&&e.value.range&&e.value.range[0]===s+1&&(u=e.value);else if(Bl(u)&&p.charAt(t.character-1)!==`-`){let e=this.createTempObjNode(f,u,l);e.items=[],l.updateFromInternalDocument();for(let t of u.items)Rl(t)&&t.items.forEach(t=>{e.items.push(t)});u=e}}}let y=o.getLineContent(g.start.line).trim().length===0&&h&&(z(h)&&h.value===null||Bl(h));if(u&&Rl(u)){let e=u.items;for(let t of e)(!m||m!==t)&&z(t.key)&&(_[t.key.value+``]=bc.create(UV));this.addPropertyCompletions(n,l,u,h,``,v,o,g,r,y),!n&&f.length>0&&c.charAt(s-f.length-1)!==`"`&&v.add({kind:pc.Property,label:f,insertText:this.getInsertTextForProperty(f,null,``),insertTextFormat:mc.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(`
414
+ `;if(i===0&&c&&!r.indentFirstObject){let a=zV(e[u],p,n,r,i+1,0);s+=m+t+u+f+a}else{let t=zV(e[u],p,n,r,i+1,0);s+=m+o+u+f+t}c=!1}return s}}return n(e)}function BV(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 VV=pc.Class,HV=`__`,UV=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=xc.create([],!1);if(!this.completionEnabled)return i;let a=this.yamlDocument.getYamlDocument(e,{customTags:this.customTags,yamlVersion:this.yamlVersion},!0),o=new uB(e);if(this.configuredIndentation)this.indentation=this.configuredIndentation;else{let e=RV(o,2,!0);this.indentation=e.insertSpaces?` `.repeat(e.tabSize):` `}aV(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=RR(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=F.create(t,Ls.create(t.line,p.length));let e=p.trim().length===0,n=p.match(/^\s*(-)\s*$/);if(u&&z(u)&&!e&&!n){let e=p.substring(0,t.character),n=e.match(/^[\s-]*([^:]+)?$/)||e.match(/:[ \t]((?!:[ \t]).*)$/);n?.[1]&&(g=F.create(Ls.create(t.line,t.character-n[1].length),Ls.create(t.line,p.length)))}}else if(u&&z(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=F.create(t,n)}else if(u&&z(u)&&u.value){let t=e.positionAt(u.range[0]);g=F.create(t,e.positionAt(u.range[1]))}else if(u&&z(u)&&u.value===null&&f===`-`)g=F.create(t,t),this.arrayPrefixIndentation=` `;else{let n=s-f.length;n>0&&c[n-1]===`"`&&n--,g=F.create(e.positionAt(n),t)}let _={},v={add:(e,t)=>{let n=function(e){if(_[e.label]?.label===HV)return;let t=e.parent.schema,n=NR(t),r=t.markdownDescription||t.description,a=i.items.find(e=>e.parent?.schema===t&&e.kind===VV);a&&a.parent.insertTexts.includes(e.insertText)||(a?a.parent.insertTexts.push(e.insertText):(a={...e,label:n,documentation:r,sortText:`_`+n,kind:VV},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(jR(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=Xs.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=Xs.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!==HV&&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(`
415
+ `)&&(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&&!hB(p)){let e={kind:pc.Text,label:R(`Inline schema`),insertText:`# yaml-language-server: $schema=`,insertTextFormat:mc.PlainText};i.items.push(e)}if(hB(p)||eB(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:pc.Constant,label:e.name??e.uri,detail:e.description,insertText:e.uri,insertTextFormat:mc.PlainText,insertTextMode:_c.asIs};i.items.push(t)}),i}if(!n||n.errors.length)return i;let m=null;if(!u){if(!l.internalDocument.contents||z(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(z(u)){if(u.value){if(Rl(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(zl(l.internalDocument.contents)){let t=$z(l.internalDocument.contents,n);typeof t==`number`&&(l.internalDocument.set(t,e),l.updateFromInternalDocument())}else t&&(Ll(t)||zl(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(zl(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(Rl(n)){if(n.key===u)u=n;else if(Vl(n.key)&&n.key.range){let r=l.getParent(n);if(d&&r&&Ll(r)&&Qz(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&&(Ll(r)||zl(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(zl(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(Ll(u)&&!d&&p.trim().length===0&&zl(n)){let e=o.getLineContent(t.line+1);(o.getLineCount()===t.line+1||e.trim().length===0)&&(u=n)}}else if(z(u)){let e=this.createTempObjNode(f,u,l);l.internalDocument.contents=e,l.updateFromInternalDocument(),m=e.items[0],u=e}else if(Ll(u))for(let e of u.items)Vl(e.value)&&e.value.range&&e.value.range[0]===s+1&&(u=e.value);else if(zl(u)&&p.charAt(t.character-1)!==`-`){let e=this.createTempObjNode(f,u,l);e.items=[],l.updateFromInternalDocument();for(let t of u.items)Ll(t)&&t.items.forEach(t=>{e.items.push(t)});u=e}}}let y=o.getLineContent(g.start.line).trim().length===0&&h&&(z(h)&&h.value===null||zl(h));if(u&&Ll(u)){let e=u.items;for(let t of e)(!m||m!==t)&&z(t.key)&&(_[t.key.value+``]=bc.create(HV));this.addPropertyCompletions(n,l,u,h,``,v,o,g,r,y),!n&&f.length>0&&c.charAt(s-f.length-1)!==`"`&&v.add({kind:pc.Property,label:f,insertText:this.getInsertTextForProperty(f,null,``),insertTextFormat:mc.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(`
416
416
  `),a=e=>e.startsWith(`
417
417
  `),o=e=>{let t=e.indexOf(`
418
418
  `);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(`
419
419
  ${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:dc.Markdown,value:[...a,"```yaml",n+i,"```"].join(`
420
- `)},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&&Bl(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=>z(e.key)&&e.key.range&&e.key.value===c&&z(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=z(r)&&r.value===null||Rl(r)&&r.items.length===0,b=e.schema.required?.length>0;(!this.parentSkeletonSelectedFirst||!v||!b)&&a.add({kind:pc.Property,label:c,insertText:h,insertTextFormat:mc.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:mc.Snippet,documentation:this.fromMarkup(u.markdownDescription)||u.description||``,parent:{schema:e.schema,indent:t}})}}}}if(g&&Bl(g)&&LR(e.schema)&&this.addSchemaValueCompletions(e.schema,i,a,{},l),e.schema.type===`object`&&e.schema.propertyNames&&e.schema.additionalProperties!==!1){let t=wz(e.schema.propertyNames);if(!t.deprecationMessage&&!t.doNotSuggest){let e=this.fromMarkup((t.markdownDescription||t.description||``)+(t.pattern?`
420
+ `)},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&&zl(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=>z(e.key)&&e.key.range&&e.key.value===c&&z(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=z(r)&&r.value===null||Ll(r)&&r.items.length===0,b=e.schema.required?.length>0;(!this.parentSkeletonSelectedFirst||!v||!b)&&a.add({kind:pc.Property,label:c,insertText:h,insertTextFormat:mc.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:mc.Snippet,documentation:this.fromMarkup(u.markdownDescription)||u.description||``,parent:{schema:e.schema,indent:t}})}}}}if(g&&zl(g)&&IR(e.schema)&&this.addSchemaValueCompletions(e.schema,i,a,{},l),e.schema.type===`object`&&e.schema.propertyNames&&e.schema.additionalProperties!==!1){let t=Cz(e.schema.propertyNames);if(!t.deprecationMessage&&!t.doNotSuggest){let e=this.fromMarkup((t.markdownDescription||t.description||``)+(t.pattern?`
421
421
 
422
- **Pattern:** \`${t.pattern}\``:``)),{candidates:n,impossible:r}=this.getPropertyNamesCandidates(t);if(!r){if(n.length)for(let t of n)a.add({kind:pc.Property,label:t,insertText:`${t}: `,insertTextFormat:mc.PlainText,documentation:e});else{let n=t.title||`property`;a.add({kind:pc.Property,label:n,insertText:`\${1:${n}}: `,insertTextFormat:mc.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&&z(n)&&(n=t.getParent(n)),!n){this.addSchemaValueCompletions(e.schema,``,a,o,!1);return}if(zl(n)){let e=n.value;if(e&&e.range&&r>e.range[0]+e.range[2])return;l=z(n.key)?n.key.value+``:null,n=t.getParent(n)}if(n&&(l!==null||Bl(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}),Bl(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`||RR(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=PR(e),a=`- ${this.getInsertTextForObject(e,t).insertText.trimLeft()}`,o=i?" type `"+i+"`":``,s=e.description?` (`+e.description+`)`:``,c=this.getDocumentationWithMarkdownText(R(`Create an item of an array{0}{1}`,o,s),a);n.add({kind:this.getSuggestionKind(e.type),label:R(`- (array item) `)+(i||r),documentation:c,insertText:a,insertTextFormat:mc.Snippet})}getInsertTextForProperty(e,t,n,r=this.indentation,i=!1){let a=this.getInsertTextForValue(e,``,`string`),o=a+`:`,s=t&&i&&AR(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;AR(e)&&(c=this.getInsertTextForSnippetValue(e,``,{newLineFirst:!0,indentFirstObject:!1,shouldIndentWithTab:!1},[],1),!c.startsWith(` `)&&!c.startsWith(`
423
- `)&&(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),AR(t.const)&&(c||=(c=this.getInsertTextForGuessedValue(t.const,``,e),c=this.evaluateTab1Symbol(c),` `+c),l++),AR(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}
422
+ **Pattern:** \`${t.pattern}\``:``)),{candidates:n,impossible:r}=this.getPropertyNamesCandidates(t);if(!r){if(n.length)for(let t of n)a.add({kind:pc.Property,label:t,insertText:`${t}: `,insertTextFormat:mc.PlainText,documentation:e});else{let n=t.title||`property`;a.add({kind:pc.Property,label:n,insertText:`\${1:${n}}: `,insertTextFormat:mc.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&&z(n)&&(n=t.getParent(n)),!n){this.addSchemaValueCompletions(e.schema,``,a,o,!1);return}if(Rl(n)){let e=n.value;if(e&&e.range&&r>e.range[0]+e.range[2])return;l=z(n.key)?n.key.value+``:null,n=t.getParent(n)}if(n&&(l!==null||zl(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}),zl(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`||LR(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=NR(e),a=`- ${this.getInsertTextForObject(e,t).insertText.trimLeft()}`,o=i?" type `"+i+"`":``,s=e.description?` (`+e.description+`)`:``,c=this.getDocumentationWithMarkdownText(R(`Create an item of an array{0}{1}`,o,s),a);n.add({kind:this.getSuggestionKind(e.type),label:R(`- (array item) `)+(i||r),documentation:c,insertText:a,insertTextFormat:mc.Snippet})}getInsertTextForProperty(e,t,n,r=this.indentation,i=!1){let a=this.getInsertTextForValue(e,``,`string`),o=a+`:`,s=t&&i&&kR(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;kR(e)&&(c=this.getInsertTextForSnippetValue(e,``,{newLineFirst:!0,indentFirstObject:!1,shouldIndentWithTab:!1},[],1),!c.startsWith(` `)&&!c.startsWith(`
423
+ `)&&(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),kR(t.const)&&(c||=(c=this.getInsertTextForGuessedValue(t.const,``,e),c=this.evaluateTab1Symbol(c),` `+c),l++),kR(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}
424
424
  ${this.getInsertTextForObject(t,n,r).insertText}`;if(t.items)return`${o}
425
425
  ${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=`
426
426
  ${r}`;break;case`array`:c=`
427
427
  ${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++}
428
- `:(s===`string`&&(e=sV(e)),i+=`${n}${a}: \${${r++}:${e}}
428
+ `:(s===`string`&&(e=oV(e)),i+=`${n}${a}: \${${r++}:${e}}
429
429
  `);break}case`array`:{let e=this.getInsertTextForArray(o.items,t,r++,n),s=e.insertText.split(`
430
430
  `),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(`
431
431
  `)}r=e.insertIndex,i+=`${n}${a}:
@@ -433,22 +433,22 @@ ${n}${this.indentation}- ${c}
433
433
  `}break;case`object`:{let e=this.getInsertTextForObject(o,t,`${n}${this.indentation}`,r++);r=e.insertIndex,i+=`${n}${a}:
434
434
  ${e.insertText}
435
435
  `}}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}}
436
- `;break;case`string`:i+=`${n}${a}: \${${r++}:${sV(o.default)}}
436
+ `;break;case`string`:i+=`${n}${a}: \${${r++}:${oV(o.default)}}
437
437
  `}}),i.trim().length===0&&(i=`${n}$${r++}
438
438
  `),i=i.trimRight()+t,{insertText:i,insertIndex:r}):(i=`${n}$${r++}
439
- `,{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(sV(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=sV(String(e),this.isSingleQuote)),this.getInsertTextForPlainText(e+t)}getInsertTemplateForValue(e,t,n,r){if(Array.isArray(e)){let r=`
439
+ `,{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(oV(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=oV(String(e),this.isSingleQuote)),this.getInsertTextForPlainText(e+t)}getInsertTemplateForValue(e,t,n,r){if(Array.isArray(e)){let r=`
440
440
  `;for(let i of e)r+=`${t}- \${${n.index++}:${i}}
441
441
  `;return r}if(typeof e==`object`){let i=`
442
442
  `;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)}}
443
- `,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&&!RR(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)||AR(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(AR(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`?R(`Default value`):this.getLabelForValue(o),n.add({kind:this.getSuggestionKind(a),label:s,insertText:this.getInsertTextForValue(o,t,a),insertTextFormat:mc.Snippet,detail:R(`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:mc.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(AR(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:mc.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:mc.Snippet,documentation:o})}}getLabelForValue(e){return e===null?`null`:Array.isArray(e)?JSON.stringify(e):typeof e==`string`?sV(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(AR(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===UV);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+`[
443
+ `,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&&!LR(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)||kR(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(kR(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`?R(`Default value`):this.getLabelForValue(o),n.add({kind:this.getSuggestionKind(a),label:s,insertText:this.getInsertTextForValue(o,t,a),insertTextFormat:mc.Snippet,detail:R(`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:mc.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(kR(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:mc.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:mc.Snippet,documentation:o})}}getLabelForValue(e){return e===null?`null`:Array.isArray(e)?JSON.stringify(e):typeof e==`string`?oV(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(kR(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===HV);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+`[
444
444
  `,n=n+`
445
445
  `+r+`]`,r+=this.indentation,o=`array`;l=e+r+a.bodyText.split(`
446
446
  `).join(`
447
- `+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:mc.Snippet,filterText:u})}}getInsertTextForSnippetValue(e,t,n,r,i){return BV(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:mc.Snippet,documentation:``})}addNullValueCompletion(e,t){t.add({kind:this.getSuggestionKind(`null`),label:`null`,insertText:`null`+e,insertTextFormat:mc.Snippet,documentation:``})}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,`$1`)}getCustomTagValueCompletions(e){BR(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:mc.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}
447
+ `+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:mc.Snippet,filterText:u})}}getInsertTextForSnippetValue(e,t,n,r,i){return zV(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:mc.Snippet,documentation:``})}addNullValueCompletion(e,t){t.add({kind:this.getSuggestionKind(`null`),label:`null`,insertText:`null`+e,insertTextFormat:mc.Snippet,documentation:``})}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,`$1`)}getCustomTagValueCompletions(e){zR(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:mc.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}
448
448
  \`\`\`
449
449
  ${t}
450
450
  \`\`\``)),n}getSuggestionKind(e){if(Array.isArray(e)){let t=e;e=t.length>0?t[0]:null}if(!e)return pc.Value;switch(e){case`string`:return pc.Value;case`object`:return pc.Module;case`property`:return pc.Property;default:return pc.Value}}getCurrentWord(e,t){let n=t-1,r=e.getText();for(;n>=0&&`
451
- \r\v":{[,]}`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,t)}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:dc.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(dc.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(Hl(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 GV(){}var KV=class{constructor(e){this.telemetry=e}getDefinition(e,t){try{let n=oB.getYamlDocument(e),r=e.offsetAt(t.position),i=zR(r,n);if(i){let[t]=i.getNodeFromPosition(r,new dB(e));if(t&&Il(t)){let n=t.resolve(i.internalDocument);if(n&&n.range){let t=F.create(e.positionAt(n.range[0]),e.positionAt(n.range[2])),r=F.create(e.positionAt(n.range[0]),e.positionAt(n.range[1]));return[zs.create(e.uri,t,r)]}}}}catch(e){this.telemetry?.sendError(`yaml.definition.error`,e)}}};function qV(e,t){let n=oB.getYamlDocument(e);return t.map(e=>{let t=r(e),n;for(let e of t)n=Vc.create(e,n);return n??Vc.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)===`
452
- `&&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=JV(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 JV(e){return e.endsWith(`\r
451
+ \r\v":{[,]}`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,t)}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:dc.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(dc.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(Vl(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 WV(){}var GV=class{constructor(e){this.telemetry=e}getDefinition(e,t){try{let n=aB.getYamlDocument(e),r=e.offsetAt(t.position),i=RR(r,n);if(i){let[t]=i.getNodeFromPosition(r,new uB(e));if(t&&Fl(t)){let n=t.resolve(i.internalDocument);if(n&&n.range){let t=F.create(e.positionAt(n.range[0]),e.positionAt(n.range[2])),r=F.create(e.positionAt(n.range[0]),e.positionAt(n.range[1]));return[zs.create(e.uri,t,r)]}}}}catch(e){this.telemetry?.sendError(`yaml.definition.error`,e)}}};function KV(e,t){let n=aB.getYamlDocument(e);return t.map(e=>{let t=r(e),n;for(let e of t)n=Vc.create(e,n);return n??Vc.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)===`
452
+ `&&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=qV(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 qV(e){return e.endsWith(`\r
453
453
  `)?e.substring(0,e.length-2):e.endsWith(`
454
- `)?e.substring(0,e.length-1):e}var YV={},XV=class extends Error{name=`ResponseError`;constructor(e,t){super(t)}},ZV=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 XV(YV.InvalidParams,`Anchor name cannot contain '${a}'`);let o=[];return o.push(Xs.replace(this.getNameRange(e,r),i)),ql(n.yamlDoc.internalDocument,(t,r)=>{Il(r)&&r.srcToken&&r.resolve(n.yamlDoc.internalDocument)===n.anchorNode&&o.push(Xs.replace(this.getNameRange(e,r.srcToken),i))}),{changes:{[e.uri]:o}}}catch(e){if(e instanceof XV)throw e;return this.telemetry?.sendError(`yaml.rename.error`,e),null}}findTarget(e,t){let n=oB.getYamlDocument(e),r=e.offsetAt(t),i=zR(r,n);if(!i)return null;let[a]=i.getNodeFromPosition(r,new dB(e));if(!a)return this.findByToken(i,r);if(Il(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((Vl(a)||z(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 ql(e.internalDocument,(r,i)=>{if(Il(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},ql.BREAK}if((Vl(i)||z(i))&&i.anchor){let r=this.findAnchorToken(e,i);if(r&&this.isOffsetInsideToken(r,t))return n={anchorNode:i,token:r,yamlDoc:e},ql.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(nB(e))return this.getAnchorFromCollectionItem(e);if(Qf(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 F.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}},QV;(function(e){e[e.SchemaStore=1]=`SchemaStore`,e[e.SchemaAssociation=2]=`SchemaAssociation`,e[e.Settings=3]=`Settings`})(QV||={});function $V(e){let t=new XB(e.schemaRequestService,e.workspaceContext,null,e.yamlSettings),n=new WV(t,e.clientCapabilities,oB,e.telemetry),r=new cV(t,e.telemetry),i=new aV(t,e.telemetry),a=new wV(t,e.telemetry),o=new TV,s=new MV(e.clientCapabilities),c=new IV(t,e.telemetry),l=new EV(e.telemetry),u=new KV(e.telemetry),d=new ZV(e.telemetry);return new GV(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:FV,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:DV,getSelectionRanges:qV,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 eH(e){let t=await fetch(e);if(t.ok)return t.text();throw Error(`Schema request failed for ${e}`)}var tH={send(){},sendError(e,t){console.error(`monaco-yaml`,e,t)},sendTrack(){}};as((e,{enableSchemaRequest:t,format:n,...r})=>{let i=$V({schemaRequestService:t?eH:null,telemetry:tH,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(ss.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}))}});
454
+ `)?e.substring(0,e.length-1):e}var JV={},YV=class extends Error{name=`ResponseError`;constructor(e,t){super(t)}},XV=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 YV(JV.InvalidParams,`Anchor name cannot contain '${a}'`);let o=[];return o.push(Xs.replace(this.getNameRange(e,r),i)),Kl(n.yamlDoc.internalDocument,(t,r)=>{Fl(r)&&r.srcToken&&r.resolve(n.yamlDoc.internalDocument)===n.anchorNode&&o.push(Xs.replace(this.getNameRange(e,r.srcToken),i))}),{changes:{[e.uri]:o}}}catch(e){if(e instanceof YV)throw e;return this.telemetry?.sendError(`yaml.rename.error`,e),null}}findTarget(e,t){let n=aB.getYamlDocument(e),r=e.offsetAt(t),i=RR(r,n);if(!i)return null;let[a]=i.getNodeFromPosition(r,new uB(e));if(!a)return this.findByToken(i,r);if(Fl(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((Bl(a)||z(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 Kl(e.internalDocument,(r,i)=>{if(Fl(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},Kl.BREAK}if((Bl(i)||z(i))&&i.anchor){let r=this.findAnchorToken(e,i);if(r&&this.isOffsetInsideToken(r,t))return n={anchorNode:i,token:r,yamlDoc:e},Kl.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(tB(e))return this.getAnchorFromCollectionItem(e);if(Zf(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 F.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}},ZV;(function(e){e[e.SchemaStore=1]=`SchemaStore`,e[e.SchemaAssociation=2]=`SchemaAssociation`,e[e.Settings=3]=`Settings`})(ZV||={});function QV(e){let t=new YB(e.schemaRequestService,e.workspaceContext,null,e.yamlSettings),n=new UV(t,e.clientCapabilities,aB,e.telemetry),r=new sV(t,e.telemetry),i=new iV(t,e.telemetry),a=new CV(t,e.telemetry),o=new wV,s=new jV(e.clientCapabilities),c=new FV(t,e.telemetry),l=new TV(e.telemetry),u=new GV(e.telemetry),d=new XV(e.telemetry);return new WV(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:PV,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:EV,getSelectionRanges:KV,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 $V(e){let t=await fetch(e);if(t.ok)return t.text();throw Error(`Schema request failed for ${e}`)}var eH={send(){},sendError(e,t){console.error(`monaco-yaml`,e,t)},sendTrack(){}};as((e,{enableSchemaRequest:t,format:n,...r})=>{let i=QV({schemaRequestService:t?$V:null,telemetry:eH,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(ss.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}))}});