zudoku 0.0.0-ff3bc72 → 0.0.0-zuplo-api-keys.534c6f8

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 (1781) hide show
  1. package/README.md +121 -0
  2. package/cli.js +11 -2
  3. package/dist/app/ZuploBuildConfig.d.ts +155 -0
  4. package/dist/app/ZuploBuildConfig.js +29 -0
  5. package/dist/app/ZuploBuildConfig.js.map +1 -0
  6. package/dist/app/demo.js +1 -4
  7. package/dist/app/demo.js.map +1 -1
  8. package/dist/app/entry.client.d.ts +6 -0
  9. package/dist/app/entry.client.js +53 -3
  10. package/dist/app/entry.client.js.map +1 -1
  11. package/dist/app/entry.server.d.ts +9 -6
  12. package/dist/app/entry.server.js +21 -14
  13. package/dist/app/entry.server.js.map +1 -1
  14. package/dist/app/env.d.ts +33 -0
  15. package/dist/app/env.js +29 -0
  16. package/dist/app/env.js.map +1 -0
  17. package/dist/app/main.d.ts +3 -2
  18. package/dist/app/main.js +50 -61
  19. package/dist/app/main.js.map +1 -1
  20. package/dist/app/sentry.d.ts +3 -0
  21. package/dist/app/sentry.js +19 -0
  22. package/dist/app/sentry.js.map +1 -0
  23. package/dist/app/standalone.js +1 -4
  24. package/dist/app/standalone.js.map +1 -1
  25. package/dist/cli/build/handler.d.ts +1 -3
  26. package/dist/cli/build/handler.js +9 -1
  27. package/dist/cli/build/handler.js.map +1 -1
  28. package/dist/cli/cli.js +18 -5
  29. package/dist/cli/cli.js.map +1 -1
  30. package/dist/cli/cmds/build.d.ts +11 -3
  31. package/dist/cli/cmds/build.js +21 -13
  32. package/dist/cli/cmds/build.js.map +1 -1
  33. package/dist/cli/cmds/dev.d.ts +1 -1
  34. package/dist/cli/cmds/dev.js +5 -0
  35. package/dist/cli/cmds/dev.js.map +1 -1
  36. package/dist/cli/cmds/preview.d.ts +16 -0
  37. package/dist/cli/cmds/preview.js +25 -0
  38. package/dist/cli/cmds/preview.js.map +1 -0
  39. package/dist/cli/common/logger.js +9 -0
  40. package/dist/cli/common/logger.js.map +1 -1
  41. package/dist/cli/common/machine-id/lib.js +1 -0
  42. package/dist/cli/common/machine-id/lib.js.map +1 -1
  43. package/dist/cli/common/outdated.js +2 -1
  44. package/dist/cli/common/outdated.js.map +1 -1
  45. package/dist/cli/common/output.js.map +1 -1
  46. package/dist/cli/common/utils/box.js.map +1 -1
  47. package/dist/cli/common/utils/ports.d.ts +1 -1
  48. package/dist/cli/common/utils/ports.js +16 -15
  49. package/dist/cli/common/utils/ports.js.map +1 -1
  50. package/dist/cli/dev/handler.d.ts +1 -0
  51. package/dist/cli/dev/handler.js +16 -13
  52. package/dist/cli/dev/handler.js.map +1 -1
  53. package/dist/cli/preview/handler.d.ts +3 -0
  54. package/dist/cli/preview/handler.js +35 -0
  55. package/dist/cli/preview/handler.js.map +1 -0
  56. package/dist/codegen.d.ts +3 -0
  57. package/dist/codegen.js +45 -0
  58. package/dist/codegen.js.map +1 -0
  59. package/dist/config/config.d.ts +20 -16
  60. package/dist/config/file-exists.d.ts +1 -0
  61. package/dist/config/file-exists.js +5 -0
  62. package/dist/config/file-exists.js.map +1 -0
  63. package/dist/config/loader.d.ts +19 -0
  64. package/dist/config/loader.js +135 -0
  65. package/dist/config/loader.js.map +1 -0
  66. package/dist/config/validators/BuildSchema.d.ts +60 -0
  67. package/dist/config/validators/BuildSchema.js +31 -0
  68. package/dist/config/validators/BuildSchema.js.map +1 -0
  69. package/dist/config/validators/InputSidebarSchema.d.ts +63 -32
  70. package/dist/config/validators/InputSidebarSchema.js +17 -28
  71. package/dist/config/validators/InputSidebarSchema.js.map +1 -1
  72. package/dist/config/validators/SidebarSchema.d.ts +24 -1
  73. package/dist/config/validators/SidebarSchema.js +80 -44
  74. package/dist/config/validators/SidebarSchema.js.map +1 -1
  75. package/dist/config/validators/icon-types.d.ts +1 -0
  76. package/dist/config/validators/icon-types.js +2 -0
  77. package/dist/config/validators/icon-types.js.map +1 -0
  78. package/dist/config/validators/validate.d.ts +4690 -332
  79. package/dist/config/validators/validate.js +273 -82
  80. package/dist/config/validators/validate.js.map +1 -1
  81. package/dist/index.d.ts +9 -2
  82. package/dist/index.js +4 -1
  83. package/dist/index.js.map +1 -1
  84. package/dist/lib/MissingIcon.d.ts +2 -0
  85. package/dist/lib/MissingIcon.js +7 -0
  86. package/dist/lib/MissingIcon.js.map +1 -0
  87. package/dist/lib/authentication/AuthenticationPlugin.d.ts +11 -4
  88. package/dist/lib/authentication/AuthenticationPlugin.js +16 -1
  89. package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
  90. package/dist/lib/authentication/authentication.d.ts +4 -5
  91. package/dist/lib/authentication/components/CallbackHandler.js +25 -31
  92. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  93. package/dist/lib/authentication/components/SignIn.d.ts +1 -1
  94. package/dist/lib/authentication/components/SignIn.js +5 -2
  95. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  96. package/dist/lib/authentication/components/SignOut.js +2 -2
  97. package/dist/lib/authentication/components/SignOut.js.map +1 -1
  98. package/dist/lib/authentication/components/SignUp.d.ts +1 -1
  99. package/dist/lib/authentication/components/SignUp.js +4 -1
  100. package/dist/lib/authentication/components/SignUp.js.map +1 -1
  101. package/dist/lib/authentication/hook.d.ts +6 -4
  102. package/dist/lib/authentication/hook.js +12 -4
  103. package/dist/lib/authentication/hook.js.map +1 -1
  104. package/dist/lib/authentication/providers/auth0.d.ts +2 -2
  105. package/dist/lib/authentication/providers/auth0.js +15 -13
  106. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  107. package/dist/lib/authentication/providers/clerk.d.ts +2 -2
  108. package/dist/lib/authentication/providers/clerk.js +116 -47
  109. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  110. package/dist/lib/authentication/providers/openid.d.ts +21 -19
  111. package/dist/lib/authentication/providers/openid.js +62 -69
  112. package/dist/lib/authentication/providers/openid.js.map +1 -1
  113. package/dist/lib/authentication/providers/supabase.d.ts +4 -0
  114. package/dist/lib/authentication/providers/supabase.js +115 -0
  115. package/dist/lib/authentication/providers/supabase.js.map +1 -0
  116. package/dist/lib/authentication/state.d.ts +23 -19
  117. package/dist/lib/authentication/state.js +34 -7
  118. package/dist/lib/authentication/state.js.map +1 -1
  119. package/dist/lib/authentication/use-broadcast/shared.d.ts +48 -0
  120. package/dist/lib/authentication/use-broadcast/shared.js +243 -0
  121. package/dist/lib/authentication/use-broadcast/shared.js.map +1 -0
  122. package/dist/lib/authentication/use-broadcast/useBroadcast.d.ts +24 -0
  123. package/dist/lib/authentication/use-broadcast/useBroadcast.js +106 -0
  124. package/dist/lib/authentication/use-broadcast/useBroadcast.js.map +1 -0
  125. package/dist/lib/components/AnchorLink.d.ts +2 -2
  126. package/dist/lib/components/AnchorLink.js +9 -5
  127. package/dist/lib/components/AnchorLink.js.map +1 -1
  128. package/dist/lib/components/Autocomplete.d.ts +13 -0
  129. package/dist/lib/components/Autocomplete.js +47 -0
  130. package/dist/lib/components/Autocomplete.js.map +1 -0
  131. package/dist/lib/components/Banner.js +1 -1
  132. package/dist/lib/components/Banner.js.map +1 -1
  133. package/dist/lib/components/Bootstrap.d.ts +5 -3
  134. package/dist/lib/components/Bootstrap.js +13 -6
  135. package/dist/lib/components/Bootstrap.js.map +1 -1
  136. package/dist/lib/components/BuildCheck.d.ts +4 -0
  137. package/dist/lib/components/BuildCheck.js +38 -0
  138. package/dist/lib/components/BuildCheck.js.map +1 -0
  139. package/dist/lib/components/ClientOnly.d.ts +4 -2
  140. package/dist/lib/components/ClientOnly.js +1 -1
  141. package/dist/lib/components/ClientOnly.js.map +1 -1
  142. package/dist/lib/components/DeveloperHint.js +2 -1
  143. package/dist/lib/components/DeveloperHint.js.map +1 -1
  144. package/dist/lib/components/ErrorPage.js +1 -1
  145. package/dist/lib/components/Footer.d.ts +1 -0
  146. package/dist/lib/components/Footer.js +32 -0
  147. package/dist/lib/components/Footer.js.map +1 -0
  148. package/dist/lib/components/Header.js +31 -12
  149. package/dist/lib/components/Header.js.map +1 -1
  150. package/dist/lib/components/Heading.d.ts +5 -5
  151. package/dist/lib/components/Heading.js +1 -1
  152. package/dist/lib/components/Heading.js.map +1 -1
  153. package/dist/lib/components/InlineCode.d.ts +2 -1
  154. package/dist/lib/components/InlineCode.js +2 -9
  155. package/dist/lib/components/InlineCode.js.map +1 -1
  156. package/dist/lib/components/Layout.js +10 -21
  157. package/dist/lib/components/Layout.js.map +1 -1
  158. package/dist/lib/components/Main.d.ts +2 -0
  159. package/dist/lib/components/Main.js +18 -0
  160. package/dist/lib/components/Main.js.map +1 -0
  161. package/dist/lib/components/Markdown.d.ts +4 -2
  162. package/dist/lib/components/Markdown.js +10 -14
  163. package/dist/lib/components/Markdown.js.map +1 -1
  164. package/dist/lib/components/MobileTopNavigation.js +14 -7
  165. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  166. package/dist/lib/components/NotFoundPage.js +2 -2
  167. package/dist/lib/components/NotFoundPage.js.map +1 -1
  168. package/dist/lib/components/Pagination.d.ts +11 -0
  169. package/dist/lib/components/Pagination.js +10 -0
  170. package/dist/lib/components/Pagination.js.map +1 -0
  171. package/dist/lib/components/PathRenderer.d.ts +11 -0
  172. package/dist/lib/components/PathRenderer.js +28 -0
  173. package/dist/lib/components/PathRenderer.js.map +1 -0
  174. package/dist/lib/components/ReactMarkdown.d.ts +29 -0
  175. package/dist/lib/components/ReactMarkdown.js +182 -0
  176. package/dist/lib/components/ReactMarkdown.js.map +1 -0
  177. package/dist/lib/components/Search.d.ts +3 -1
  178. package/dist/lib/components/Search.js +9 -3
  179. package/dist/lib/components/Search.js.map +1 -1
  180. package/dist/lib/components/Slot.d.ts +17 -0
  181. package/dist/lib/components/Slot.js +24 -0
  182. package/dist/lib/components/Slot.js.map +1 -0
  183. package/dist/lib/components/Slot.test.js +163 -0
  184. package/dist/lib/components/Slot.test.js.map +1 -0
  185. package/dist/lib/components/StatusPage.d.ts +7 -0
  186. package/dist/lib/components/StatusPage.js +71 -0
  187. package/dist/lib/components/StatusPage.js.map +1 -0
  188. package/dist/lib/components/ThemeSwitch.d.ts +1 -0
  189. package/dist/lib/components/ThemeSwitch.js +16 -0
  190. package/dist/lib/components/ThemeSwitch.js.map +1 -0
  191. package/dist/lib/components/TopNavigation.d.ts +3 -0
  192. package/dist/lib/components/TopNavigation.js +53 -8
  193. package/dist/lib/components/TopNavigation.js.map +1 -1
  194. package/dist/lib/components/Zudoku.d.ts +7 -0
  195. package/dist/lib/components/Zudoku.js +58 -0
  196. package/dist/lib/components/Zudoku.js.map +1 -0
  197. package/dist/lib/components/cache.d.ts +13 -0
  198. package/dist/lib/components/cache.js +20 -0
  199. package/dist/lib/components/cache.js.map +1 -0
  200. package/dist/lib/components/context/BypassProtectedRoutesContext.d.ts +1 -0
  201. package/dist/lib/components/context/BypassProtectedRoutesContext.js +3 -0
  202. package/dist/lib/components/context/BypassProtectedRoutesContext.js.map +1 -0
  203. package/dist/lib/components/context/RouterEventsEmitter.d.ts +1 -0
  204. package/dist/lib/components/context/RouterEventsEmitter.js +17 -0
  205. package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -0
  206. package/dist/lib/components/context/SlotProvider.d.ts +26 -0
  207. package/dist/lib/components/context/SlotProvider.js +83 -0
  208. package/dist/lib/components/context/SlotProvider.js.map +1 -0
  209. package/dist/lib/components/context/ViewportAnchorContext.d.ts +2 -4
  210. package/dist/lib/components/context/ViewportAnchorContext.js +29 -23
  211. package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
  212. package/dist/lib/components/context/ZudokuContext.d.ts +10 -14
  213. package/dist/lib/components/context/ZudokuContext.js +40 -27
  214. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  215. package/dist/lib/components/context/ZudokuProvider.d.ts +2 -2
  216. package/dist/lib/components/context/ZudokuProvider.js +2 -1
  217. package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
  218. package/dist/lib/components/index.d.ts +59 -16
  219. package/dist/lib/components/index.js +27 -6
  220. package/dist/lib/components/index.js.map +1 -1
  221. package/dist/lib/components/navigation/PoweredByZudoku.d.ts +3 -0
  222. package/dist/lib/components/navigation/PoweredByZudoku.js +7 -0
  223. package/dist/lib/components/navigation/PoweredByZudoku.js.map +1 -0
  224. package/dist/lib/components/navigation/Sidebar.d.ts +5 -1
  225. package/dist/lib/components/navigation/Sidebar.js +4 -8
  226. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  227. package/dist/lib/components/navigation/SidebarBadge.d.ts +6 -3
  228. package/dist/lib/components/navigation/SidebarBadge.js +13 -11
  229. package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
  230. package/dist/lib/components/navigation/SidebarCategory.d.ts +3 -3
  231. package/dist/lib/components/navigation/SidebarCategory.js +32 -14
  232. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  233. package/dist/lib/components/navigation/SidebarItem.d.ts +3 -4
  234. package/dist/lib/components/navigation/SidebarItem.js +23 -17
  235. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  236. package/dist/lib/components/navigation/SidebarWrapper.d.ts +7 -6
  237. package/dist/lib/components/navigation/SidebarWrapper.js +18 -3
  238. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  239. package/dist/lib/components/navigation/Toc.js +46 -0
  240. package/dist/lib/components/navigation/Toc.js.map +1 -0
  241. package/dist/lib/components/navigation/ZudokuLogo.d.ts +6 -0
  242. package/dist/lib/components/navigation/ZudokuLogo.js +5 -0
  243. package/dist/lib/components/navigation/ZudokuLogo.js.map +1 -0
  244. package/dist/lib/components/navigation/ZuploLogo.d.ts +3 -0
  245. package/dist/lib/components/navigation/ZuploLogo.js +4 -0
  246. package/dist/lib/components/navigation/ZuploLogo.js.map +1 -0
  247. package/dist/lib/components/navigation/utils.d.ts +3 -0
  248. package/dist/lib/components/navigation/utils.js +19 -15
  249. package/dist/lib/components/navigation/utils.js.map +1 -1
  250. package/dist/lib/core/RouteGuard.d.ts +2 -0
  251. package/dist/lib/core/RouteGuard.js +52 -0
  252. package/dist/lib/core/RouteGuard.js.map +1 -0
  253. package/dist/lib/core/ZudokuContext.d.ts +112 -0
  254. package/dist/lib/core/ZudokuContext.js +70 -0
  255. package/dist/lib/core/ZudokuContext.js.map +1 -0
  256. package/dist/lib/core/plugins.d.ts +35 -17
  257. package/dist/lib/core/plugins.js +4 -0
  258. package/dist/lib/core/plugins.js.map +1 -1
  259. package/dist/lib/errors/ErrorAlert.d.ts +1 -1
  260. package/dist/lib/errors/ErrorAlert.js +13 -3
  261. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  262. package/dist/lib/errors/RouterError.js +1 -1
  263. package/dist/lib/errors/RouterError.js.map +1 -1
  264. package/dist/lib/hooks/index.d.ts +3 -0
  265. package/dist/lib/hooks/index.js +5 -0
  266. package/dist/lib/hooks/index.js.map +1 -0
  267. package/dist/lib/hooks/useEvent.d.ts +11 -0
  268. package/dist/lib/hooks/useEvent.js +19 -0
  269. package/dist/lib/hooks/useEvent.js.map +1 -0
  270. package/dist/lib/hooks/useEvent.test.js +100 -0
  271. package/dist/lib/hooks/useEvent.test.js.map +1 -0
  272. package/dist/lib/icons.d.ts +1 -0
  273. package/dist/lib/icons.js +1 -0
  274. package/dist/lib/icons.js.map +1 -1
  275. package/dist/lib/oas/graphql/circular.d.ts +3 -0
  276. package/dist/lib/oas/graphql/circular.js +43 -0
  277. package/dist/lib/oas/graphql/circular.js.map +1 -0
  278. package/dist/lib/oas/graphql/index.d.ts +25 -1
  279. package/dist/lib/oas/graphql/index.js +216 -69
  280. package/dist/lib/oas/graphql/index.js.map +1 -1
  281. package/dist/lib/oas/parser/dereference/index.js +8 -3
  282. package/dist/lib/oas/parser/dereference/index.js.map +1 -1
  283. package/dist/lib/oas/parser/index.d.ts +8 -3
  284. package/dist/lib/oas/parser/index.js +7 -23
  285. package/dist/lib/oas/parser/index.js.map +1 -1
  286. package/dist/lib/oas/parser/upgrade/index.d.ts +3 -2
  287. package/dist/lib/oas/parser/upgrade/index.js +83 -31
  288. package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
  289. package/dist/lib/plugins/api-catalog/Catalog.d.ts +4 -0
  290. package/dist/lib/plugins/api-catalog/Catalog.js +26 -0
  291. package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -0
  292. package/dist/lib/plugins/api-catalog/index.d.ts +31 -0
  293. package/dist/lib/plugins/api-catalog/index.js +46 -0
  294. package/dist/lib/plugins/api-catalog/index.js.map +1 -0
  295. package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +3 -2
  296. package/dist/lib/plugins/api-keys/CreateApiKey.js +16 -8
  297. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  298. package/dist/lib/plugins/api-keys/ProtectedRoute.js +1 -1
  299. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
  300. package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +1 -1
  301. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +55 -24
  302. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  303. package/dist/lib/plugins/api-keys/index.d.ts +23 -13
  304. package/dist/lib/plugins/api-keys/index.js +48 -32
  305. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  306. package/dist/lib/plugins/custom-pages/CustomPage.d.ts +2 -0
  307. package/dist/lib/plugins/custom-pages/CustomPage.js +11 -0
  308. package/dist/lib/plugins/custom-pages/CustomPage.js.map +1 -0
  309. package/dist/lib/plugins/custom-pages/index.d.ts +10 -0
  310. package/dist/lib/plugins/custom-pages/index.js +11 -0
  311. package/dist/lib/plugins/custom-pages/index.js.map +1 -0
  312. package/dist/lib/plugins/markdown/MdxPage.d.ts +10 -2
  313. package/dist/lib/plugins/markdown/MdxPage.js +17 -4
  314. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  315. package/dist/lib/plugins/markdown/index.d.ts +8 -7
  316. package/dist/lib/plugins/markdown/index.js +31 -3
  317. package/dist/lib/plugins/markdown/index.js.map +1 -1
  318. package/dist/lib/plugins/markdown/resolver.d.ts +32 -0
  319. package/dist/lib/plugins/markdown/resolver.js +46 -0
  320. package/dist/lib/plugins/markdown/resolver.js.map +1 -0
  321. package/dist/lib/plugins/openapi/CollapsibleCode.d.ts +5 -0
  322. package/dist/lib/plugins/openapi/CollapsibleCode.js +25 -0
  323. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -0
  324. package/dist/lib/plugins/openapi/ColorizedParam.d.ts +10 -2
  325. package/dist/lib/plugins/openapi/ColorizedParam.js +29 -14
  326. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  327. package/dist/lib/plugins/openapi/Endpoint.js +13 -16
  328. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  329. package/dist/lib/plugins/openapi/OasProvider.d.ts +8 -0
  330. package/dist/lib/plugins/openapi/OasProvider.js +29 -0
  331. package/dist/lib/plugins/openapi/OasProvider.js.map +1 -0
  332. package/dist/lib/plugins/openapi/OperationList.d.ts +6 -3
  333. package/dist/lib/plugins/openapi/OperationList.js +107 -27
  334. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  335. package/dist/lib/plugins/openapi/OperationListItem.d.ts +5 -3
  336. package/dist/lib/plugins/openapi/OperationListItem.js +12 -6
  337. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  338. package/dist/lib/plugins/openapi/ParamInfos.d.ts +6 -0
  339. package/dist/lib/plugins/openapi/ParamInfos.js +45 -0
  340. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -0
  341. package/dist/lib/plugins/openapi/ParameterList.d.ts +2 -1
  342. package/dist/lib/plugins/openapi/ParameterList.js +3 -2
  343. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  344. package/dist/lib/plugins/openapi/ParameterListItem.js +19 -1
  345. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  346. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +4 -2
  347. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +12 -3
  348. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  349. package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +3 -4
  350. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +5 -9
  351. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  352. package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +2 -4
  353. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +4 -6
  354. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  355. package/dist/lib/plugins/openapi/SchemaList.d.ts +1 -0
  356. package/dist/lib/plugins/openapi/SchemaList.js +53 -0
  357. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -0
  358. package/dist/lib/plugins/openapi/Sidecar.d.ts +1 -1
  359. package/dist/lib/plugins/openapi/Sidecar.js +114 -65
  360. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  361. package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
  362. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  363. package/dist/lib/plugins/openapi/SidecarExamples.d.ts +9 -0
  364. package/dist/lib/plugins/openapi/SidecarExamples.js +76 -0
  365. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -0
  366. package/dist/lib/plugins/openapi/SimpleSelect.js +1 -1
  367. package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -1
  368. package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +8 -0
  369. package/dist/lib/plugins/openapi/client/GraphQLClient.js +43 -0
  370. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -0
  371. package/dist/lib/plugins/openapi/client/GraphQLContext.d.ts +7 -0
  372. package/dist/lib/plugins/openapi/client/GraphQLContext.js +5 -0
  373. package/dist/lib/plugins/openapi/client/GraphQLContext.js.map +1 -0
  374. package/dist/lib/plugins/openapi/client/createServer.d.ts +3 -1
  375. package/dist/lib/plugins/openapi/client/createServer.js +5 -2
  376. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -1
  377. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +14 -0
  378. package/dist/lib/plugins/openapi/client/useCreateQuery.js +20 -0
  379. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -0
  380. package/dist/lib/plugins/openapi/components/ConstValue.d.ts +5 -0
  381. package/dist/lib/plugins/openapi/components/ConstValue.js +6 -0
  382. package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -0
  383. package/dist/lib/plugins/openapi/components/EnumValues.d.ts +5 -0
  384. package/dist/lib/plugins/openapi/components/EnumValues.js +15 -0
  385. package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -0
  386. package/dist/lib/plugins/openapi/components/ResponseContent.d.ts +12 -0
  387. package/dist/lib/plugins/openapi/components/ResponseContent.js +21 -0
  388. package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -0
  389. package/dist/lib/plugins/openapi/components/SelectOnClick.d.ts +5 -0
  390. package/dist/lib/plugins/openapi/components/SelectOnClick.js +16 -0
  391. package/dist/lib/plugins/openapi/components/SelectOnClick.js.map +1 -0
  392. package/dist/lib/plugins/openapi/context.d.ts +3 -3
  393. package/dist/lib/plugins/openapi/graphql/fragment-masking.d.ts +3 -3
  394. package/dist/lib/plugins/openapi/graphql/fragment-masking.js +3 -4
  395. package/dist/lib/plugins/openapi/graphql/fragment-masking.js.map +1 -1
  396. package/dist/lib/plugins/openapi/graphql/gql.d.ts +8 -46
  397. package/dist/lib/plugins/openapi/graphql/gql.js +6 -13
  398. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  399. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +141 -25
  400. package/dist/lib/plugins/openapi/graphql/graphql.js +238 -662
  401. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  402. package/dist/lib/plugins/openapi/index.d.ts +11 -8
  403. package/dist/lib/plugins/openapi/index.js +74 -104
  404. package/dist/lib/plugins/openapi/index.js.map +1 -1
  405. package/dist/lib/plugins/openapi/interfaces.d.ts +57 -3
  406. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +6 -0
  407. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +8 -0
  408. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -0
  409. package/dist/lib/plugins/openapi/playground/Headers.d.ts +4 -4
  410. package/dist/lib/plugins/openapi/playground/Headers.js +84 -5
  411. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  412. package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +11 -0
  413. package/dist/lib/plugins/openapi/playground/IdentityDialog.js +14 -0
  414. package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -0
  415. package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +7 -0
  416. package/dist/lib/plugins/openapi/playground/IdentitySelector.js +8 -0
  417. package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -0
  418. package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +9 -0
  419. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +5 -0
  420. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -0
  421. package/dist/lib/plugins/openapi/playground/PathParams.d.ts +3 -2
  422. package/dist/lib/plugins/openapi/playground/PathParams.js +5 -7
  423. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  424. package/dist/lib/plugins/openapi/playground/Playground.d.ts +37 -2
  425. package/dist/lib/plugins/openapi/playground/Playground.js +133 -70
  426. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  427. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +2 -2
  428. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  429. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +1 -1
  430. package/dist/lib/plugins/openapi/playground/QueryParams.js +24 -18
  431. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  432. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +7 -0
  433. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +8 -0
  434. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -0
  435. package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +7 -0
  436. package/dist/lib/plugins/openapi/playground/SubmitButton.js +22 -0
  437. package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +1 -0
  438. package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +17 -0
  439. package/dist/lib/plugins/openapi/playground/rememberedIdentity.js +11 -0
  440. package/dist/lib/plugins/openapi/playground/rememberedIdentity.js.map +1 -0
  441. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +7 -0
  442. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +11 -0
  443. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +1 -0
  444. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +8 -0
  445. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +101 -0
  446. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -0
  447. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +9 -0
  448. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +17 -0
  449. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -0
  450. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +10 -0
  451. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +32 -0
  452. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -0
  453. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.d.ts +1 -0
  454. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js +56 -0
  455. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js.map +1 -0
  456. package/dist/lib/plugins/openapi/processors/removeExtensions.d.ts +8 -0
  457. package/dist/lib/plugins/openapi/processors/removeExtensions.js +16 -0
  458. package/dist/lib/plugins/openapi/processors/removeExtensions.js.map +1 -0
  459. package/dist/lib/plugins/openapi/processors/removeExtensions.test.d.ts +1 -0
  460. package/dist/lib/plugins/openapi/processors/removeExtensions.test.js +194 -0
  461. package/dist/lib/plugins/openapi/processors/removeExtensions.test.js.map +1 -0
  462. package/dist/lib/plugins/openapi/processors/removeParameters.d.ts +12 -0
  463. package/dist/lib/plugins/openapi/processors/removeParameters.js +66 -0
  464. package/dist/lib/plugins/openapi/processors/removeParameters.js.map +1 -0
  465. package/dist/lib/plugins/openapi/processors/removeParameters.test.d.ts +1 -0
  466. package/dist/lib/plugins/openapi/processors/removeParameters.test.js +159 -0
  467. package/dist/lib/plugins/openapi/processors/removeParameters.test.js.map +1 -0
  468. package/dist/lib/plugins/openapi/processors/removePaths.d.ts +13 -0
  469. package/dist/lib/plugins/openapi/processors/removePaths.js +33 -0
  470. package/dist/lib/plugins/openapi/processors/removePaths.js.map +1 -0
  471. package/dist/lib/plugins/openapi/processors/removePaths.test.d.ts +1 -0
  472. package/dist/lib/plugins/openapi/processors/removePaths.test.js +144 -0
  473. package/dist/lib/plugins/openapi/processors/removePaths.test.js.map +1 -0
  474. package/dist/lib/plugins/openapi/processors/traverse.d.ts +1 -0
  475. package/dist/lib/plugins/openapi/processors/traverse.js +2 -0
  476. package/dist/lib/plugins/openapi/processors/traverse.js.map +1 -0
  477. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +1 -2
  478. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +2 -2
  479. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +1 -1
  480. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +2 -1
  481. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +2 -2
  482. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +1 -1
  483. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.d.ts +0 -1
  484. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +1 -1
  485. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +1 -1
  486. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.d.ts +4 -0
  487. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +15 -0
  488. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -0
  489. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.d.ts +11 -0
  490. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +45 -0
  491. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -0
  492. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +2 -2
  493. package/dist/lib/plugins/openapi/schema/SchemaView.js +38 -49
  494. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  495. package/dist/lib/plugins/openapi/schema/utils.d.ts +8 -1
  496. package/dist/lib/plugins/openapi/schema/utils.js +15 -4
  497. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  498. package/dist/lib/plugins/openapi/state.d.ts +25 -0
  499. package/dist/lib/plugins/openapi/state.js +18 -0
  500. package/dist/lib/plugins/openapi/state.js.map +1 -0
  501. package/dist/lib/plugins/openapi/util/createSidebarCategory.d.ts +9 -0
  502. package/dist/lib/plugins/openapi/util/createSidebarCategory.js +23 -0
  503. package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +1 -0
  504. package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +1 -2
  505. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +80 -39
  506. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  507. package/dist/lib/plugins/openapi/util/getRoutes.d.ts +10 -0
  508. package/dist/lib/plugins/openapi/util/getRoutes.js +117 -0
  509. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -0
  510. package/dist/lib/plugins/openapi/util/methodColorMap.d.ts +2 -0
  511. package/dist/lib/plugins/openapi/util/methodColorMap.js +10 -0
  512. package/dist/lib/plugins/openapi/util/methodColorMap.js.map +1 -0
  513. package/dist/lib/plugins/openapi/util/methodToColor.d.ts +20 -0
  514. package/dist/lib/plugins/openapi/util/methodToColor.js +24 -0
  515. package/dist/lib/plugins/openapi/util/methodToColor.js.map +1 -0
  516. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.d.ts +1 -0
  517. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js +27 -0
  518. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js.map +1 -0
  519. package/dist/lib/plugins/redirect/index.d.ts +4 -7
  520. package/dist/lib/plugins/redirect/index.js +2 -2
  521. package/dist/lib/plugins/redirect/index.js.map +1 -1
  522. package/dist/lib/plugins/search-inkeep/index.d.ts +24 -5
  523. package/dist/lib/plugins/search-inkeep/index.js +41 -5
  524. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  525. package/dist/lib/plugins/search-inkeep/inkeep.d.ts +3 -4
  526. package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
  527. package/dist/lib/plugins/search-pagefind/PagefindSearch.d.ts +6 -0
  528. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +80 -0
  529. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -0
  530. package/dist/lib/plugins/search-pagefind/ResultList.d.ts +8 -0
  531. package/dist/lib/plugins/search-pagefind/ResultList.js +32 -0
  532. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -0
  533. package/dist/lib/plugins/search-pagefind/get-results.d.ts +10 -0
  534. package/dist/lib/plugins/search-pagefind/get-results.js +42 -0
  535. package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -0
  536. package/dist/lib/plugins/search-pagefind/index.d.ts +6 -0
  537. package/dist/lib/plugins/search-pagefind/index.js +9 -0
  538. package/dist/lib/plugins/search-pagefind/index.js.map +1 -0
  539. package/dist/lib/plugins/search-pagefind/types.d.ts +85 -0
  540. package/dist/lib/plugins/search-pagefind/types.js +2 -0
  541. package/dist/lib/plugins/search-pagefind/types.js.map +1 -0
  542. package/dist/lib/shiki.d.ts +35 -0
  543. package/dist/lib/shiki.js +103 -0
  544. package/dist/lib/shiki.js.map +1 -0
  545. package/dist/lib/ui/Accordion.d.ts +7 -0
  546. package/dist/lib/ui/Accordion.js +14 -0
  547. package/dist/lib/ui/Accordion.js.map +1 -0
  548. package/dist/lib/ui/ActionButton.d.ts +4 -0
  549. package/dist/lib/ui/ActionButton.js +10 -0
  550. package/dist/lib/ui/ActionButton.js.map +1 -0
  551. package/dist/lib/ui/Alert.d.ts +8 -0
  552. package/dist/lib/ui/Alert.js +23 -0
  553. package/dist/lib/ui/Alert.js.map +1 -0
  554. package/dist/lib/ui/AlertDialog.d.ts +20 -0
  555. package/dist/lib/ui/AlertDialog.js +27 -0
  556. package/dist/lib/ui/AlertDialog.js.map +1 -0
  557. package/dist/lib/ui/AspectRatio.d.ts +3 -0
  558. package/dist/lib/ui/AspectRatio.js +4 -0
  559. package/dist/lib/ui/AspectRatio.js.map +1 -0
  560. package/dist/lib/ui/Badge.d.ts +9 -0
  561. package/dist/lib/ui/Badge.js +22 -0
  562. package/dist/lib/ui/Badge.js.map +1 -0
  563. package/dist/lib/ui/Breadcrumb.d.ts +19 -0
  564. package/dist/lib/ui/Breadcrumb.js +24 -0
  565. package/dist/lib/ui/Breadcrumb.js.map +1 -0
  566. package/dist/lib/ui/Button.d.ts +4 -5
  567. package/dist/lib/ui/Button.js +9 -6
  568. package/dist/lib/ui/Button.js.map +1 -1
  569. package/dist/lib/ui/Callout.d.ts +38 -36
  570. package/dist/lib/ui/Callout.js +3 -2
  571. package/dist/lib/ui/Callout.js.map +1 -1
  572. package/dist/lib/ui/Card.js +1 -1
  573. package/dist/lib/ui/Card.js.map +1 -1
  574. package/dist/lib/ui/Carousel.d.ts +18 -0
  575. package/dist/lib/ui/Carousel.js +99 -0
  576. package/dist/lib/ui/Carousel.js.map +1 -0
  577. package/dist/lib/ui/Checkbox.d.ts +4 -0
  578. package/dist/lib/ui/Checkbox.js +9 -0
  579. package/dist/lib/ui/Checkbox.js.map +1 -0
  580. package/dist/lib/ui/CodeBlock.d.ts +16 -0
  581. package/dist/lib/ui/CodeBlock.js +18 -0
  582. package/dist/lib/ui/CodeBlock.js.map +1 -0
  583. package/dist/lib/ui/Collapsible.d.ts +5 -0
  584. package/dist/lib/ui/Collapsible.js +6 -0
  585. package/dist/lib/ui/Collapsible.js.map +1 -0
  586. package/dist/lib/ui/Command.d.ts +94 -0
  587. package/dist/lib/ui/Command.js +35 -0
  588. package/dist/lib/ui/Command.js.map +1 -0
  589. package/dist/lib/ui/Dialog.js +23 -0
  590. package/dist/lib/ui/Dialog.js.map +1 -0
  591. package/dist/lib/ui/Drawer.d.ts +8 -10
  592. package/dist/lib/ui/Drawer.js.map +1 -1
  593. package/dist/lib/ui/DropdownMenu.js +4 -4
  594. package/dist/lib/ui/DropdownMenu.js.map +1 -1
  595. package/dist/lib/ui/Form.d.ts +23 -0
  596. package/dist/lib/ui/Form.js +63 -0
  597. package/dist/lib/ui/Form.js.map +1 -0
  598. package/dist/lib/ui/HoverCard.d.ts +6 -0
  599. package/dist/lib/ui/HoverCard.js +10 -0
  600. package/dist/lib/ui/HoverCard.js.map +1 -0
  601. package/dist/lib/ui/Input.d.ts +1 -2
  602. package/dist/lib/ui/Input.js +1 -1
  603. package/dist/lib/ui/Input.js.map +1 -1
  604. package/dist/lib/ui/Label.d.ts +5 -0
  605. package/dist/lib/ui/Label.js +10 -0
  606. package/dist/lib/ui/Label.js.map +1 -0
  607. package/dist/lib/ui/Pagination.d.ts +28 -0
  608. package/dist/lib/ui/Pagination.js +24 -0
  609. package/dist/lib/ui/Pagination.js.map +1 -0
  610. package/dist/lib/ui/Popover.d.ts +6 -0
  611. package/dist/lib/ui/Popover.js +10 -0
  612. package/dist/lib/ui/Popover.js.map +1 -0
  613. package/dist/lib/ui/Progress.d.ts +4 -0
  614. package/dist/lib/ui/Progress.js +8 -0
  615. package/dist/lib/ui/Progress.js.map +1 -0
  616. package/dist/lib/ui/RadioGroup.d.ts +5 -0
  617. package/dist/lib/ui/RadioGroup.js +15 -0
  618. package/dist/lib/ui/RadioGroup.js.map +1 -0
  619. package/dist/lib/ui/ScrollArea.d.ts +5 -0
  620. package/dist/lib/ui/ScrollArea.js +12 -0
  621. package/dist/lib/ui/ScrollArea.js.map +1 -0
  622. package/dist/lib/ui/Select.js +27 -0
  623. package/dist/lib/ui/Select.js.map +1 -0
  624. package/dist/lib/ui/Skeleton.d.ts +2 -0
  625. package/dist/lib/ui/Skeleton.js +7 -0
  626. package/dist/lib/ui/Skeleton.js.map +1 -0
  627. package/dist/lib/ui/Slider.d.ts +4 -0
  628. package/dist/lib/ui/Slider.js +8 -0
  629. package/dist/lib/ui/Slider.js.map +1 -0
  630. package/dist/lib/ui/Stepper.d.ts +3 -0
  631. package/dist/lib/ui/Stepper.js +7 -0
  632. package/dist/lib/ui/Stepper.js.map +1 -0
  633. package/dist/lib/ui/Switch.d.ts +4 -0
  634. package/dist/lib/ui/Switch.js +8 -0
  635. package/dist/lib/ui/Switch.js.map +1 -0
  636. package/dist/lib/ui/SyntaxHighlight.d.ts +10 -0
  637. package/dist/lib/ui/SyntaxHighlight.js +14 -0
  638. package/dist/lib/ui/SyntaxHighlight.js.map +1 -0
  639. package/dist/lib/ui/Tabs.js +2 -2
  640. package/dist/lib/ui/Tabs.js.map +1 -1
  641. package/dist/lib/ui/Textarea.d.ts +4 -0
  642. package/dist/lib/ui/Textarea.js +9 -0
  643. package/dist/lib/ui/Textarea.js.map +1 -0
  644. package/dist/lib/ui/Toggle.d.ts +12 -0
  645. package/dist/lib/ui/Toggle.js +26 -0
  646. package/dist/lib/ui/Toggle.js.map +1 -0
  647. package/dist/lib/ui/ToggleGroup.d.ts +12 -0
  648. package/dist/lib/ui/ToggleGroup.js +21 -0
  649. package/dist/lib/ui/ToggleGroup.js.map +1 -0
  650. package/dist/lib/ui/Tooltip.d.ts +7 -0
  651. package/dist/lib/ui/Tooltip.js +11 -0
  652. package/dist/lib/ui/Tooltip.js.map +1 -0
  653. package/dist/lib/ui/util.d.ts +2 -0
  654. package/dist/lib/ui/util.js +3 -0
  655. package/dist/lib/ui/util.js.map +1 -0
  656. package/dist/lib/util/MdxComponents.d.ts +30 -21
  657. package/dist/lib/util/MdxComponents.js +17 -15
  658. package/dist/lib/util/MdxComponents.js.map +1 -1
  659. package/dist/lib/util/createVariantComponent.d.ts +2 -2
  660. package/dist/lib/util/detectOS.d.ts +1 -0
  661. package/dist/lib/util/detectOS.js +11 -0
  662. package/dist/lib/util/detectOS.js.map +1 -0
  663. package/dist/lib/util/ensureArray.d.ts +1 -0
  664. package/dist/lib/util/ensureArray.js +2 -0
  665. package/dist/lib/util/ensureArray.js.map +1 -0
  666. package/dist/lib/util/invariant.d.ts +9 -0
  667. package/dist/lib/util/invariant.js +7 -3
  668. package/dist/lib/util/invariant.js.map +1 -1
  669. package/dist/lib/util/joinPath.d.ts +3 -0
  670. package/dist/lib/util/joinPath.js +3 -0
  671. package/dist/lib/util/joinPath.js.map +1 -1
  672. package/dist/lib/util/joinUrl.d.ts +1 -0
  673. package/dist/lib/util/joinUrl.js +40 -0
  674. package/dist/lib/util/joinUrl.js.map +1 -0
  675. package/dist/lib/util/joinUrl.test.d.ts +1 -0
  676. package/dist/lib/util/joinUrl.test.js +43 -0
  677. package/dist/lib/util/joinUrl.test.js.map +1 -0
  678. package/dist/lib/util/scrollIntoViewIfNeeded.d.ts +1 -0
  679. package/dist/lib/util/scrollIntoViewIfNeeded.js +14 -0
  680. package/dist/lib/util/scrollIntoViewIfNeeded.js.map +1 -0
  681. package/dist/lib/util/traverse.d.ts +3 -0
  682. package/dist/lib/util/traverse.js +23 -0
  683. package/dist/lib/util/traverse.js.map +1 -0
  684. package/dist/lib/util/types.d.ts +7 -0
  685. package/dist/lib/util/types.js +2 -0
  686. package/dist/lib/util/types.js.map +1 -0
  687. package/dist/lib/util/url.d.ts +4 -0
  688. package/dist/lib/util/url.js +13 -0
  689. package/dist/lib/util/url.js.map +1 -0
  690. package/dist/lib/util/url.test.d.ts +1 -0
  691. package/dist/lib/util/url.test.js +26 -0
  692. package/dist/lib/util/url.test.js.map +1 -0
  693. package/dist/lib/util/useExposedProps.d.ts +9 -0
  694. package/dist/lib/util/useExposedProps.js +9 -0
  695. package/dist/lib/util/useExposedProps.js.map +1 -0
  696. package/dist/lib/util/useIsomorphicLayoutEffect.d.ts +3 -0
  697. package/dist/lib/util/useIsomorphicLayoutEffect.js +4 -0
  698. package/dist/lib/util/useIsomorphicLayoutEffect.js.map +1 -0
  699. package/dist/lib/util/useLatest.d.ts +1 -0
  700. package/dist/lib/util/useLatest.js +15 -0
  701. package/dist/lib/util/useLatest.js.map +1 -0
  702. package/dist/lib/util/useOnScreen.d.ts +5 -0
  703. package/dist/lib/util/useOnScreen.js +19 -0
  704. package/dist/lib/util/useOnScreen.js.map +1 -0
  705. package/dist/lib/util/useScrollToAnchor.d.ts +1 -0
  706. package/dist/lib/util/useScrollToAnchor.js +42 -37
  707. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  708. package/dist/lib/util/useScrollToTop.js +7 -5
  709. package/dist/lib/util/useScrollToTop.js.map +1 -1
  710. package/dist/vite/api/SchemaManager.d.ts +36 -0
  711. package/dist/vite/api/SchemaManager.js +122 -0
  712. package/dist/vite/api/SchemaManager.js.map +1 -0
  713. package/dist/vite/api/SchemaManager.test.d.ts +1 -0
  714. package/dist/vite/api/SchemaManager.test.js +106 -0
  715. package/dist/vite/api/SchemaManager.test.js.map +1 -0
  716. package/dist/vite/api/schema-codegen.d.ts +12 -0
  717. package/dist/vite/api/schema-codegen.js +85 -0
  718. package/dist/vite/api/schema-codegen.js.map +1 -0
  719. package/dist/vite/api/schema-codegen.test.d.ts +1 -0
  720. package/dist/vite/api/schema-codegen.test.js +313 -0
  721. package/dist/vite/api/schema-codegen.test.js.map +1 -0
  722. package/dist/vite/build.js +83 -12
  723. package/dist/vite/build.js.map +1 -1
  724. package/dist/vite/config.d.ts +2 -15
  725. package/dist/vite/config.js +121 -144
  726. package/dist/vite/config.js.map +1 -1
  727. package/dist/vite/config.test.js +12 -6
  728. package/dist/vite/config.test.js.map +1 -1
  729. package/dist/vite/create-pagefind-index.d.ts +4 -0
  730. package/dist/vite/create-pagefind-index.js +12 -0
  731. package/dist/vite/create-pagefind-index.js.map +1 -0
  732. package/dist/vite/css/collect.d.ts +2 -0
  733. package/dist/vite/css/collect.js +27 -0
  734. package/dist/vite/css/collect.js.map +1 -0
  735. package/dist/vite/css/plugin.d.ts +5 -0
  736. package/dist/vite/css/plugin.js +79 -0
  737. package/dist/vite/css/plugin.js.map +1 -0
  738. package/dist/vite/debug.d.ts +1 -0
  739. package/dist/vite/debug.js +10 -0
  740. package/dist/vite/debug.js.map +1 -0
  741. package/dist/vite/dev-server.d.ts +11 -4
  742. package/dist/vite/dev-server.js +83 -22
  743. package/dist/vite/dev-server.js.map +1 -1
  744. package/dist/vite/error-handler.d.ts +1 -1
  745. package/dist/vite/error-handler.js +1 -1
  746. package/dist/vite/error-handler.js.map +1 -1
  747. package/dist/vite/html.d.ts +6 -2
  748. package/dist/vite/html.js +11 -10
  749. package/dist/vite/html.js.map +1 -1
  750. package/dist/vite/output.d.ts +113 -0
  751. package/dist/vite/output.js +60 -0
  752. package/dist/vite/output.js.map +1 -0
  753. package/dist/vite/plugin-api-keys.d.ts +2 -2
  754. package/dist/vite/plugin-api-keys.js +10 -5
  755. package/dist/vite/plugin-api-keys.js.map +1 -1
  756. package/dist/vite/plugin-api.d.ts +2 -2
  757. package/dist/vite/plugin-api.js +145 -32
  758. package/dist/vite/plugin-api.js.map +1 -1
  759. package/dist/vite/plugin-auth.d.ts +2 -2
  760. package/dist/vite/plugin-auth.js +7 -4
  761. package/dist/vite/plugin-auth.js.map +1 -1
  762. package/dist/vite/plugin-component.d.ts +2 -2
  763. package/dist/vite/plugin-component.js +22 -13
  764. package/dist/vite/plugin-component.js.map +1 -1
  765. package/dist/vite/plugin-config-reload.d.ts +4 -4
  766. package/dist/vite/plugin-config-reload.js +15 -8
  767. package/dist/vite/plugin-config-reload.js.map +1 -1
  768. package/dist/vite/plugin-config.d.ts +2 -3
  769. package/dist/vite/plugin-config.js +26 -3
  770. package/dist/vite/plugin-config.js.map +1 -1
  771. package/dist/vite/plugin-configure-tailwind.d.ts +3 -0
  772. package/dist/vite/plugin-configure-tailwind.js +37 -0
  773. package/dist/vite/plugin-configure-tailwind.js.map +1 -0
  774. package/dist/vite/plugin-custom-pages.d.ts +4 -0
  775. package/dist/vite/plugin-custom-pages.js +30 -0
  776. package/dist/vite/plugin-custom-pages.js.map +1 -0
  777. package/dist/vite/plugin-docs.d.ts +3 -3
  778. package/dist/vite/plugin-docs.js +57 -29
  779. package/dist/vite/plugin-docs.js.map +1 -1
  780. package/dist/vite/plugin-docs.test.js +15 -23
  781. package/dist/vite/plugin-docs.test.js.map +1 -1
  782. package/dist/vite/plugin-frontmatter.d.ts +2 -1
  783. package/dist/vite/plugin-frontmatter.js +28 -24
  784. package/dist/vite/plugin-frontmatter.js.map +1 -1
  785. package/dist/vite/plugin-mdx.d.ts +2 -8
  786. package/dist/vite/plugin-mdx.js +96 -13
  787. package/dist/vite/plugin-mdx.js.map +1 -1
  788. package/dist/vite/plugin-redirect.d.ts +2 -2
  789. package/dist/vite/plugin-redirect.js +3 -3
  790. package/dist/vite/plugin-redirect.js.map +1 -1
  791. package/dist/vite/plugin-search.d.ts +3 -0
  792. package/dist/vite/plugin-search.js +30 -0
  793. package/dist/vite/plugin-search.js.map +1 -0
  794. package/dist/vite/plugin-shiki-register.d.ts +3 -0
  795. package/dist/vite/plugin-shiki-register.js +38 -0
  796. package/dist/vite/plugin-shiki-register.js.map +1 -0
  797. package/dist/vite/plugin-sidebar.d.ts +5 -3
  798. package/dist/vite/plugin-sidebar.js +26 -10
  799. package/dist/vite/plugin-sidebar.js.map +1 -1
  800. package/dist/vite/plugin-theme-css.d.ts +6 -0
  801. package/dist/vite/plugin-theme-css.js +118 -0
  802. package/dist/vite/plugin-theme-css.js.map +1 -0
  803. package/dist/vite/plugin.d.ts +2 -3
  804. package/dist/vite/plugin.js +18 -6
  805. package/dist/vite/plugin.js.map +1 -1
  806. package/dist/vite/prerender/FileWritingResponse.d.ts +25 -0
  807. package/dist/vite/prerender/FileWritingResponse.js +51 -0
  808. package/dist/vite/prerender/FileWritingResponse.js.map +1 -0
  809. package/dist/vite/prerender/InMemoryResponse.d.ts +16 -0
  810. package/dist/vite/prerender/InMemoryResponse.js +32 -0
  811. package/dist/vite/prerender/InMemoryResponse.js.map +1 -0
  812. package/dist/vite/prerender/PrerenderResponse.d.ts +10 -0
  813. package/dist/vite/prerender/PrerenderResponse.js +2 -0
  814. package/dist/vite/prerender/PrerenderResponse.js.map +1 -0
  815. package/dist/vite/prerender/prerender.d.ts +15 -0
  816. package/dist/vite/prerender/prerender.js +109 -0
  817. package/dist/vite/prerender/prerender.js.map +1 -0
  818. package/dist/vite/prerender/worker.d.ts +13 -0
  819. package/dist/vite/prerender/worker.js +59 -0
  820. package/dist/vite/prerender/worker.js.map +1 -0
  821. package/dist/vite/remarkStaticGeneration.d.ts +3 -0
  822. package/dist/vite/remarkStaticGeneration.js +125 -0
  823. package/dist/vite/remarkStaticGeneration.js.map +1 -0
  824. package/dist/vite/reporter.d.ts +3 -0
  825. package/dist/vite/reporter.js +33 -0
  826. package/dist/vite/reporter.js.map +1 -0
  827. package/dist/vite/sitemap.d.ts +1 -1
  828. package/dist/vite/sitemap.js +2 -1
  829. package/dist/vite/sitemap.js.map +1 -1
  830. package/dist/zuplo/enrich-with-zuplo.d.ts +5 -0
  831. package/dist/zuplo/enrich-with-zuplo.js +185 -0
  832. package/dist/zuplo/enrich-with-zuplo.js.map +1 -0
  833. package/dist/zuplo/policy-types.d.ts +33 -0
  834. package/dist/zuplo/policy-types.js +8 -0
  835. package/dist/zuplo/policy-types.js.map +1 -0
  836. package/dist/zuplo/with-zuplo-processors.d.ts +3 -0
  837. package/dist/zuplo/with-zuplo-processors.js +26 -0
  838. package/dist/zuplo/with-zuplo-processors.js.map +1 -0
  839. package/dist/zuplo/with-zuplo.d.ts +6 -0
  840. package/dist/zuplo/with-zuplo.js +10 -0
  841. package/dist/zuplo/with-zuplo.js.map +1 -0
  842. package/lib/Button-u7M2QYds.js +51 -0
  843. package/lib/Button-u7M2QYds.js.map +1 -0
  844. package/lib/Callout-CtCQJ6Cc.js +230 -0
  845. package/lib/Callout-CtCQJ6Cc.js.map +1 -0
  846. package/lib/Card-DkH-AU1V.js +61 -0
  847. package/lib/Card-DkH-AU1V.js.map +1 -0
  848. package/lib/CategoryHeading-BA7lKNWz.js +10 -0
  849. package/lib/CategoryHeading-BA7lKNWz.js.map +1 -0
  850. package/lib/ClientOnly-E7hGysn1.js +11 -0
  851. package/lib/ClientOnly-E7hGysn1.js.map +1 -0
  852. package/lib/Dialog-irKZWXGg.js +99 -0
  853. package/lib/Dialog-irKZWXGg.js.map +1 -0
  854. package/lib/Drawer-DZ214i5V.js +1133 -0
  855. package/lib/Drawer-DZ214i5V.js.map +1 -0
  856. package/lib/Markdown-BNG8bTDA.js +7691 -0
  857. package/lib/Markdown-BNG8bTDA.js.map +1 -0
  858. package/lib/MdxPage-C-P_N-H3.js +84 -0
  859. package/lib/MdxPage-C-P_N-H3.js.map +1 -0
  860. package/lib/OasProvider-DjFXGgWa.js +33 -0
  861. package/lib/OasProvider-DjFXGgWa.js.map +1 -0
  862. package/lib/OperationList-CchpZz4h.js +5141 -0
  863. package/lib/OperationList-CchpZz4h.js.map +1 -0
  864. package/lib/Pagination-BbcrfwgM.js +36 -0
  865. package/lib/Pagination-BbcrfwgM.js.map +1 -0
  866. package/lib/RouteGuard-CIyGFkFD.js +55 -0
  867. package/lib/RouteGuard-CIyGFkFD.js.map +1 -0
  868. package/lib/SchemaList-CrQd3KiR.js +160 -0
  869. package/lib/SchemaList-CrQd3KiR.js.map +1 -0
  870. package/lib/SchemaView-CQ_hMc8m.js +375 -0
  871. package/lib/SchemaView-CQ_hMc8m.js.map +1 -0
  872. package/lib/SignUp-DSn8NjRS.js +63 -0
  873. package/lib/SignUp-DSn8NjRS.js.map +1 -0
  874. package/lib/Slot-Dw-g06lX.js +160 -0
  875. package/lib/Slot-Dw-g06lX.js.map +1 -0
  876. package/lib/Spinner-mNLZ6awP.js +7 -0
  877. package/lib/Spinner-mNLZ6awP.js.map +1 -0
  878. package/lib/SyntaxHighlight-DTgNHbGp.js +9107 -0
  879. package/lib/SyntaxHighlight-DTgNHbGp.js.map +1 -0
  880. package/lib/Toc-Ccycwd-T.js +92 -0
  881. package/lib/Toc-Ccycwd-T.js.map +1 -0
  882. package/lib/chunk-BAXFHI7N-C9WnHsLV.js +1839 -0
  883. package/lib/chunk-BAXFHI7N-C9WnHsLV.js.map +1 -0
  884. package/lib/circular-DdByufCW.js +14929 -0
  885. package/lib/circular-DdByufCW.js.map +1 -0
  886. package/lib/cn-BOFVZgHd.js +2744 -0
  887. package/lib/cn-BOFVZgHd.js.map +1 -0
  888. package/lib/createServer-BL0QaN9q.js +12494 -0
  889. package/lib/createServer-BL0QaN9q.js.map +1 -0
  890. package/lib/hook-BpiAQVtd.js +1446 -0
  891. package/lib/hook-BpiAQVtd.js.map +1 -0
  892. package/lib/index--oeBayMa.js +86 -0
  893. package/lib/index--oeBayMa.js.map +1 -0
  894. package/lib/index-BjB1BHZu.js +3268 -0
  895. package/lib/index-BjB1BHZu.js.map +1 -0
  896. package/lib/index-BvvmIczU.js +2094 -0
  897. package/lib/index-BvvmIczU.js.map +1 -0
  898. package/lib/index-C1S4w-gl.js +36 -0
  899. package/lib/index-C1S4w-gl.js.map +1 -0
  900. package/lib/index-CrcNWbel.js +316 -0
  901. package/lib/index-CrcNWbel.js.map +1 -0
  902. package/lib/index-rsSMIHTN.js +4977 -0
  903. package/lib/index-rsSMIHTN.js.map +1 -0
  904. package/lib/index-zddirpDj.js +4822 -0
  905. package/lib/index-zddirpDj.js.map +1 -0
  906. package/lib/index.esm-BFcSKCe-.js +683 -0
  907. package/lib/index.esm-BFcSKCe-.js.map +1 -0
  908. package/lib/index.esm-DSfX_eMP.js +1216 -0
  909. package/lib/index.esm-DSfX_eMP.js.map +1 -0
  910. package/lib/invariant-DAFpPywt.js +48 -0
  911. package/lib/invariant-DAFpPywt.js.map +1 -0
  912. package/lib/jsx-runtime-C5mzlN2N.js +285 -0
  913. package/lib/jsx-runtime-C5mzlN2N.js.map +1 -0
  914. package/lib/mutation-CJrIFMgY.js +196 -0
  915. package/lib/mutation-CJrIFMgY.js.map +1 -0
  916. package/lib/objectEntries-yMIkr2mI.js +5 -0
  917. package/lib/objectEntries-yMIkr2mI.js.map +1 -0
  918. package/lib/processors/removeExtensions.js +11 -0
  919. package/lib/processors/removeExtensions.js.map +1 -0
  920. package/lib/processors/removeParameters.js +47 -0
  921. package/lib/processors/removeParameters.js.map +1 -0
  922. package/lib/processors/removePaths.js +28 -0
  923. package/lib/processors/removePaths.js.map +1 -0
  924. package/lib/processors/traverse.js +17 -0
  925. package/lib/processors/traverse.js.map +1 -0
  926. package/lib/ui/Accordion.js +47 -0
  927. package/lib/ui/Accordion.js.map +1 -0
  928. package/lib/ui/ActionButton.js +25 -0
  929. package/lib/ui/ActionButton.js.map +1 -0
  930. package/lib/ui/Alert.js +51 -0
  931. package/lib/ui/Alert.js.map +1 -0
  932. package/lib/ui/AlertDialog.js +114 -0
  933. package/lib/ui/AlertDialog.js.map +1 -0
  934. package/lib/ui/AspectRatio.js +6 -0
  935. package/lib/ui/AspectRatio.js.map +1 -0
  936. package/lib/ui/Badge.js +28 -0
  937. package/lib/ui/Badge.js.map +1 -0
  938. package/lib/ui/Breadcrumb.js +94 -0
  939. package/lib/ui/Breadcrumb.js.map +1 -0
  940. package/lib/ui/Button.js +52 -0
  941. package/lib/ui/Button.js.map +1 -0
  942. package/lib/ui/Callout.js +96 -0
  943. package/lib/ui/Callout.js.map +1 -0
  944. package/lib/ui/Card.js +62 -0
  945. package/lib/ui/Card.js.map +1 -0
  946. package/lib/ui/Carousel.js +1416 -0
  947. package/lib/ui/Carousel.js.map +1 -0
  948. package/lib/ui/Checkbox.js +29 -0
  949. package/lib/ui/Checkbox.js.map +1 -0
  950. package/lib/ui/CodeBlock.js +83 -0
  951. package/lib/ui/CodeBlock.js.map +1 -0
  952. package/lib/ui/Collapsible.js +8 -0
  953. package/lib/ui/Collapsible.js.map +1 -0
  954. package/lib/ui/Command.js +156 -0
  955. package/lib/ui/Command.js.map +1 -0
  956. package/lib/ui/Dialog.js +101 -0
  957. package/lib/ui/Dialog.js.map +1 -0
  958. package/lib/ui/Drawer.js +17 -0
  959. package/lib/ui/Drawer.js.map +1 -0
  960. package/lib/ui/DropdownMenu.js +145 -0
  961. package/lib/ui/DropdownMenu.js.map +1 -0
  962. package/lib/ui/Form.js +95 -0
  963. package/lib/ui/Form.js.map +1 -0
  964. package/lib/ui/HoverCard.js +24 -0
  965. package/lib/ui/HoverCard.js.map +1 -0
  966. package/lib/ui/Input.js +22 -0
  967. package/lib/ui/Input.js.map +1 -0
  968. package/lib/ui/Label.js +20 -0
  969. package/lib/ui/Label.js.map +1 -0
  970. package/lib/ui/Pagination.js +106 -0
  971. package/lib/ui/Pagination.js.map +1 -0
  972. package/lib/ui/Popover.js +24 -0
  973. package/lib/ui/Popover.js.map +1 -0
  974. package/lib/ui/Progress.js +27 -0
  975. package/lib/ui/Progress.js.map +1 -0
  976. package/lib/ui/RadioGroup.js +32 -0
  977. package/lib/ui/RadioGroup.js.map +1 -0
  978. package/lib/ui/ScrollArea.js +39 -0
  979. package/lib/ui/ScrollArea.js.map +1 -0
  980. package/lib/ui/Select.js +122 -0
  981. package/lib/ui/Select.js.map +1 -0
  982. package/lib/ui/Skeleton.js +18 -0
  983. package/lib/ui/Skeleton.js.map +1 -0
  984. package/lib/ui/Slider.js +24 -0
  985. package/lib/ui/Slider.js.map +1 -0
  986. package/lib/ui/Stepper.js +6 -0
  987. package/lib/ui/Stepper.js.map +1 -0
  988. package/lib/ui/Switch.js +28 -0
  989. package/lib/ui/Switch.js.map +1 -0
  990. package/lib/ui/SyntaxHighlight.js +10 -0
  991. package/lib/ui/SyntaxHighlight.js.map +1 -0
  992. package/lib/ui/Tabs.js +47 -0
  993. package/lib/ui/Tabs.js.map +1 -0
  994. package/lib/ui/Textarea.js +21 -0
  995. package/lib/ui/Textarea.js.map +1 -0
  996. package/lib/ui/Toggle.js +38 -0
  997. package/lib/ui/Toggle.js.map +1 -0
  998. package/lib/ui/ToggleGroup.js +42 -0
  999. package/lib/ui/ToggleGroup.js.map +1 -0
  1000. package/lib/ui/Tooltip.js +24 -0
  1001. package/lib/ui/Tooltip.js.map +1 -0
  1002. package/lib/ui/util.js +6 -0
  1003. package/lib/ui/util.js.map +1 -0
  1004. package/lib/useExposedProps-DG8J6ewJ.js +9 -0
  1005. package/lib/useExposedProps-DG8J6ewJ.js.map +1 -0
  1006. package/lib/useLatest-hmRS46UF.js +11 -0
  1007. package/lib/useLatest-hmRS46UF.js.map +1 -0
  1008. package/lib/useMutation-B2LNwShM.js +97 -0
  1009. package/lib/useMutation-B2LNwShM.js.map +1 -0
  1010. package/lib/zudoku.auth-auth0.js +32 -30
  1011. package/lib/zudoku.auth-auth0.js.map +1 -1
  1012. package/lib/zudoku.auth-clerk.js +115 -58
  1013. package/lib/zudoku.auth-clerk.js.map +1 -1
  1014. package/lib/zudoku.auth-openid.js +628 -628
  1015. package/lib/zudoku.auth-openid.js.map +1 -1
  1016. package/lib/zudoku.components.js +34 -3364
  1017. package/lib/zudoku.components.js.map +1 -1
  1018. package/lib/zudoku.hooks.js +19 -0
  1019. package/lib/zudoku.hooks.js.map +1 -0
  1020. package/lib/zudoku.icons.js +10 -0
  1021. package/lib/zudoku.icons.js.map +1 -1
  1022. package/lib/zudoku.plugin-api-catalog.js +117 -0
  1023. package/lib/zudoku.plugin-api-catalog.js.map +1 -0
  1024. package/lib/zudoku.plugin-api-keys.js +5019 -212
  1025. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  1026. package/lib/zudoku.plugin-custom-pages.js +22 -0
  1027. package/lib/zudoku.plugin-custom-pages.js.map +1 -0
  1028. package/lib/zudoku.plugin-markdown.js +70 -27
  1029. package/lib/zudoku.plugin-markdown.js.map +1 -1
  1030. package/lib/zudoku.plugin-openapi.js +8 -12
  1031. package/lib/zudoku.plugin-openapi.js.map +1 -1
  1032. package/lib/zudoku.plugin-redirect.js +2 -2
  1033. package/lib/zudoku.plugin-redirect.js.map +1 -1
  1034. package/lib/zudoku.plugin-search-inkeep.js +52 -28
  1035. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  1036. package/lib/zudoku.plugin-search-pagefind.js +230 -0
  1037. package/lib/zudoku.plugin-search-pagefind.js.map +1 -0
  1038. package/lib/zudoku.plugins.js +15 -0
  1039. package/lib/zudoku.plugins.js.map +1 -0
  1040. package/package.json +186 -105
  1041. package/src/app/ZuploBuildConfig.ts +33 -0
  1042. package/src/app/defaultTheme.css +54 -0
  1043. package/src/app/demo-cdn.html +31 -31
  1044. package/src/app/demo.html +1 -1
  1045. package/src/app/demo.tsx +1 -5
  1046. package/src/app/entry.client.tsx +71 -3
  1047. package/src/app/entry.server.tsx +81 -60
  1048. package/src/app/env.ts +35 -0
  1049. package/src/app/font.geist.css +73 -0
  1050. package/src/app/main.css +202 -131
  1051. package/src/app/main.tsx +81 -71
  1052. package/src/app/sentry.ts +24 -0
  1053. package/src/app/standalone.tsx +2 -6
  1054. package/src/lib/MissingIcon.tsx +22 -0
  1055. package/src/lib/authentication/AuthenticationPlugin.tsx +22 -5
  1056. package/src/lib/authentication/authentication.ts +5 -6
  1057. package/src/lib/authentication/components/CallbackHandler.tsx +30 -51
  1058. package/src/lib/authentication/components/SignIn.tsx +35 -2
  1059. package/src/lib/authentication/components/SignOut.tsx +3 -2
  1060. package/src/lib/authentication/components/SignUp.tsx +35 -1
  1061. package/src/lib/authentication/hook.ts +13 -4
  1062. package/src/lib/authentication/providers/auth0.tsx +28 -18
  1063. package/src/lib/authentication/providers/clerk.tsx +136 -53
  1064. package/src/lib/authentication/providers/openid.tsx +87 -84
  1065. package/src/lib/authentication/providers/supabase.tsx +157 -0
  1066. package/src/lib/authentication/state.ts +56 -25
  1067. package/src/lib/authentication/use-broadcast/LICENSE.md +9 -0
  1068. package/src/lib/authentication/use-broadcast/shared.ts +372 -0
  1069. package/src/lib/authentication/use-broadcast/useBroadcast.ts +146 -0
  1070. package/src/lib/components/AnchorLink.tsx +13 -8
  1071. package/src/lib/components/Autocomplete.tsx +113 -0
  1072. package/src/lib/components/Banner.tsx +2 -1
  1073. package/src/lib/components/Bootstrap.tsx +43 -16
  1074. package/src/lib/components/BuildCheck.tsx +75 -0
  1075. package/src/lib/components/ClientOnly.tsx +6 -3
  1076. package/src/lib/components/DeveloperHint.tsx +6 -1
  1077. package/src/lib/components/ErrorPage.tsx +1 -1
  1078. package/src/lib/components/Footer.tsx +136 -0
  1079. package/src/lib/components/Header.tsx +108 -55
  1080. package/src/lib/components/Heading.tsx +14 -14
  1081. package/src/lib/components/InlineCode.tsx +13 -16
  1082. package/src/lib/components/Layout.tsx +36 -59
  1083. package/src/lib/components/Main.tsx +51 -0
  1084. package/src/lib/components/Markdown.tsx +33 -29
  1085. package/src/lib/components/MobileTopNavigation.tsx +43 -28
  1086. package/src/lib/components/NotFoundPage.tsx +2 -2
  1087. package/src/lib/components/Pagination.tsx +44 -0
  1088. package/src/lib/components/PathRenderer.tsx +61 -0
  1089. package/src/lib/components/ReactMarkdown.license.txt +21 -0
  1090. package/src/lib/components/ReactMarkdown.tsx +264 -0
  1091. package/src/lib/components/Search.tsx +19 -8
  1092. package/src/lib/components/Slot.test.tsx +456 -0
  1093. package/src/lib/components/Slot.tsx +64 -0
  1094. package/src/lib/components/StatusPage.tsx +91 -0
  1095. package/src/lib/components/ThemeSwitch.tsx +46 -0
  1096. package/src/lib/components/TopNavigation.tsx +95 -25
  1097. package/src/lib/components/Zudoku.tsx +119 -0
  1098. package/src/lib/components/cache.ts +23 -0
  1099. package/src/lib/components/context/BypassProtectedRoutesContext.ts +3 -0
  1100. package/src/lib/components/context/RouterEventsEmitter.tsx +19 -0
  1101. package/src/lib/components/context/SlotProvider.tsx +149 -0
  1102. package/src/lib/components/context/ViewportAnchorContext.tsx +34 -36
  1103. package/src/lib/components/context/ZudokuContext.ts +53 -29
  1104. package/src/lib/components/context/ZudokuProvider.tsx +4 -3
  1105. package/src/lib/components/index.ts +33 -6
  1106. package/src/lib/components/navigation/PoweredByZudoku.tsx +33 -0
  1107. package/src/lib/components/navigation/Sidebar.tsx +39 -30
  1108. package/src/lib/components/navigation/SidebarBadge.tsx +17 -12
  1109. package/src/lib/components/navigation/SidebarCategory.tsx +67 -54
  1110. package/src/lib/components/navigation/SidebarItem.tsx +38 -51
  1111. package/src/lib/components/navigation/SidebarWrapper.tsx +42 -22
  1112. package/src/lib/components/navigation/Toc.tsx +126 -0
  1113. package/src/lib/components/navigation/ZudokuLogo.tsx +25 -0
  1114. package/src/lib/components/navigation/ZuploLogo.tsx +14 -0
  1115. package/src/lib/components/navigation/utils.ts +24 -17
  1116. package/src/lib/core/RouteGuard.tsx +96 -0
  1117. package/src/lib/core/ZudokuContext.ts +198 -0
  1118. package/src/lib/core/plugins.ts +54 -22
  1119. package/src/lib/errors/ErrorAlert.tsx +36 -15
  1120. package/src/lib/errors/RouterError.tsx +1 -1
  1121. package/src/lib/hooks/index.ts +5 -0
  1122. package/src/lib/hooks/useEvent.test.tsx +149 -0
  1123. package/src/lib/hooks/useEvent.ts +41 -0
  1124. package/src/lib/icons.ts +1 -0
  1125. package/src/lib/oas/graphql/circular.ts +58 -0
  1126. package/src/lib/oas/graphql/index.ts +298 -104
  1127. package/src/lib/oas/parser/dereference/index.ts +10 -4
  1128. package/src/lib/oas/parser/index.ts +14 -30
  1129. package/src/lib/oas/parser/upgrade/index.ts +103 -38
  1130. package/src/lib/plugins/api-catalog/Catalog.tsx +73 -0
  1131. package/src/lib/plugins/api-catalog/index.tsx +115 -0
  1132. package/src/lib/plugins/api-keys/CreateApiKey.tsx +63 -47
  1133. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +1 -1
  1134. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +293 -113
  1135. package/src/lib/plugins/api-keys/index.tsx +107 -59
  1136. package/src/lib/plugins/custom-pages/CustomPage.tsx +18 -0
  1137. package/src/lib/plugins/custom-pages/index.tsx +24 -0
  1138. package/src/lib/plugins/markdown/MdxPage.tsx +53 -49
  1139. package/src/lib/plugins/markdown/index.tsx +53 -13
  1140. package/src/lib/plugins/markdown/resolver.ts +59 -0
  1141. package/src/lib/plugins/openapi/CollapsibleCode.tsx +86 -0
  1142. package/src/lib/plugins/openapi/ColorizedParam.tsx +49 -23
  1143. package/src/lib/plugins/openapi/Endpoint.tsx +19 -22
  1144. package/src/lib/plugins/openapi/OasProvider.tsx +51 -0
  1145. package/src/lib/plugins/openapi/OperationList.tsx +240 -70
  1146. package/src/lib/plugins/openapi/OperationListItem.tsx +122 -93
  1147. package/src/lib/plugins/openapi/ParamInfos.tsx +90 -0
  1148. package/src/lib/plugins/openapi/ParameterList.tsx +4 -0
  1149. package/src/lib/plugins/openapi/ParameterListItem.tsx +78 -31
  1150. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +21 -2
  1151. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +15 -33
  1152. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +36 -59
  1153. package/src/lib/plugins/openapi/SchemaList.tsx +163 -0
  1154. package/src/lib/plugins/openapi/Sidecar.tsx +181 -114
  1155. package/src/lib/plugins/openapi/SidecarBox.tsx +4 -16
  1156. package/src/lib/plugins/openapi/SidecarExamples.tsx +168 -0
  1157. package/src/lib/plugins/openapi/SimpleSelect.tsx +1 -1
  1158. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +65 -0
  1159. package/src/lib/plugins/openapi/client/GraphQLContext.tsx +16 -0
  1160. package/src/lib/plugins/openapi/client/createServer.ts +8 -2
  1161. package/src/lib/plugins/openapi/client/useCreateQuery.ts +45 -0
  1162. package/src/lib/plugins/openapi/components/ConstValue.tsx +24 -0
  1163. package/src/lib/plugins/openapi/components/EnumValues.tsx +58 -0
  1164. package/src/lib/plugins/openapi/components/ResponseContent.tsx +104 -0
  1165. package/src/lib/plugins/openapi/components/SelectOnClick.tsx +29 -0
  1166. package/src/lib/plugins/openapi/context.tsx +2 -2
  1167. package/src/lib/plugins/openapi/graphql/fragment-masking.ts +11 -18
  1168. package/src/lib/plugins/openapi/graphql/gql.ts +38 -30
  1169. package/src/lib/plugins/openapi/graphql/graphql.ts +386 -682
  1170. package/src/lib/plugins/openapi/index.tsx +111 -138
  1171. package/src/lib/plugins/openapi/interfaces.ts +58 -3
  1172. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +52 -0
  1173. package/src/lib/plugins/openapi/playground/Headers.tsx +165 -36
  1174. package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +74 -0
  1175. package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +41 -0
  1176. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +13 -0
  1177. package/src/lib/plugins/openapi/playground/PathParams.tsx +39 -64
  1178. package/src/lib/plugins/openapi/playground/Playground.tsx +386 -245
  1179. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +7 -4
  1180. package/src/lib/plugins/openapi/playground/QueryParams.tsx +87 -89
  1181. package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +51 -0
  1182. package/src/lib/plugins/openapi/playground/SubmitButton.tsx +75 -0
  1183. package/src/lib/plugins/openapi/playground/rememberedIdentity.ts +26 -0
  1184. package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +73 -0
  1185. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +230 -0
  1186. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +123 -0
  1187. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.test.ts +64 -0
  1188. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +36 -0
  1189. package/src/lib/plugins/openapi/processors/removeExtensions.test.ts +222 -0
  1190. package/src/lib/plugins/openapi/processors/removeExtensions.ts +29 -0
  1191. package/src/lib/plugins/openapi/processors/removeParameters.test.ts +182 -0
  1192. package/src/lib/plugins/openapi/processors/removeParameters.ts +103 -0
  1193. package/src/lib/plugins/openapi/processors/removePaths.test.ts +167 -0
  1194. package/src/lib/plugins/openapi/processors/removePaths.ts +57 -0
  1195. package/src/lib/plugins/openapi/processors/traverse.ts +1 -0
  1196. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +1 -8
  1197. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.tsx +3 -0
  1198. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx +6 -3
  1199. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +39 -0
  1200. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +160 -0
  1201. package/src/lib/plugins/openapi/schema/SchemaView.tsx +105 -138
  1202. package/src/lib/plugins/openapi/schema/utils.ts +32 -5
  1203. package/src/lib/plugins/openapi/state.ts +36 -0
  1204. package/src/lib/plugins/openapi/util/createSidebarCategory.tsx +37 -0
  1205. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +95 -44
  1206. package/src/lib/plugins/openapi/util/getRoutes.tsx +198 -0
  1207. package/src/lib/plugins/openapi/util/methodColorMap.tsx +11 -0
  1208. package/src/lib/plugins/openapi/util/methodToColor.ts +27 -0
  1209. package/src/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.tsx +32 -0
  1210. package/src/lib/plugins/redirect/index.tsx +6 -10
  1211. package/src/lib/plugins/search-inkeep/index.tsx +80 -25
  1212. package/src/lib/plugins/search-inkeep/inkeep.ts +3 -9
  1213. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +164 -0
  1214. package/src/lib/plugins/search-pagefind/ResultList.tsx +105 -0
  1215. package/src/lib/plugins/search-pagefind/get-results.tsx +75 -0
  1216. package/src/lib/plugins/search-pagefind/index.tsx +21 -0
  1217. package/src/lib/plugins/search-pagefind/types.ts +118 -0
  1218. package/src/lib/shiki.ts +133 -0
  1219. package/src/lib/ui/Accordion.tsx +56 -0
  1220. package/src/lib/ui/ActionButton.tsx +28 -0
  1221. package/src/lib/ui/Alert.tsx +59 -0
  1222. package/src/lib/ui/AlertDialog.tsx +139 -0
  1223. package/src/lib/ui/AspectRatio.tsx +5 -0
  1224. package/src/lib/ui/Badge.tsx +37 -0
  1225. package/src/lib/ui/Breadcrumb.tsx +115 -0
  1226. package/src/lib/ui/Button.tsx +13 -8
  1227. package/src/lib/ui/Callout.tsx +36 -16
  1228. package/src/lib/ui/Card.tsx +1 -1
  1229. package/src/lib/ui/Carousel.tsx +260 -0
  1230. package/src/lib/ui/Checkbox.tsx +29 -0
  1231. package/src/lib/ui/CodeBlock.tsx +102 -0
  1232. package/src/lib/ui/Collapsible.tsx +9 -0
  1233. package/src/lib/ui/Command.tsx +193 -0
  1234. package/src/lib/ui/Dialog.tsx +120 -0
  1235. package/src/lib/ui/Drawer.tsx +38 -36
  1236. package/src/lib/ui/DropdownMenu.tsx +4 -4
  1237. package/src/lib/ui/Form.tsx +177 -0
  1238. package/src/lib/ui/HoverCard.tsx +27 -0
  1239. package/src/lib/ui/Input.tsx +2 -3
  1240. package/src/lib/ui/Label.tsx +24 -0
  1241. package/src/lib/ui/Pagination.tsx +117 -0
  1242. package/src/lib/ui/Popover.tsx +29 -0
  1243. package/src/lib/ui/Progress.tsx +26 -0
  1244. package/src/lib/ui/RadioGroup.tsx +42 -0
  1245. package/src/lib/ui/ScrollArea.tsx +46 -0
  1246. package/src/lib/ui/Select.tsx +157 -0
  1247. package/src/lib/ui/Skeleton.tsx +15 -0
  1248. package/src/lib/ui/Slider.tsx +26 -0
  1249. package/src/lib/ui/Stepper.tsx +8 -0
  1250. package/src/lib/ui/Switch.tsx +27 -0
  1251. package/src/lib/ui/SyntaxHighlight.tsx +27 -0
  1252. package/src/lib/ui/Tabs.tsx +2 -2
  1253. package/src/lib/ui/Textarea.tsx +23 -0
  1254. package/src/lib/ui/Toggle.tsx +43 -0
  1255. package/src/lib/ui/ToggleGroup.tsx +59 -0
  1256. package/src/lib/ui/Tooltip.tsx +28 -0
  1257. package/src/lib/ui/util.tsx +3 -0
  1258. package/src/lib/util/MdxComponents.tsx +37 -24
  1259. package/src/lib/util/createVariantComponent.tsx +2 -2
  1260. package/src/lib/util/detectOS.ts +9 -0
  1261. package/src/lib/util/ensureArray.ts +3 -0
  1262. package/src/lib/util/invariant.ts +15 -3
  1263. package/src/lib/util/joinPath.tsx +3 -0
  1264. package/src/lib/util/joinUrl.test.ts +62 -0
  1265. package/src/lib/util/joinUrl.ts +57 -0
  1266. package/src/lib/util/scrollIntoViewIfNeeded.ts +18 -0
  1267. package/src/lib/util/traverse.ts +34 -0
  1268. package/src/lib/util/types.ts +7 -0
  1269. package/src/lib/util/url.test.ts +51 -0
  1270. package/src/lib/util/url.ts +18 -0
  1271. package/src/lib/util/useExposedProps.tsx +27 -0
  1272. package/src/lib/util/useIsomorphicLayoutEffect.ts +5 -0
  1273. package/src/lib/util/useLatest.ts +18 -0
  1274. package/src/lib/util/useOnScreen.ts +34 -0
  1275. package/src/lib/util/useScrollToAnchor.ts +48 -39
  1276. package/src/lib/util/useScrollToTop.ts +9 -4
  1277. package/src/shiki/langs/abap.js +1 -0
  1278. package/src/shiki/langs/actionscript-3.js +1 -0
  1279. package/src/shiki/langs/ada.js +1 -0
  1280. package/src/shiki/langs/angular-expression.js +1 -0
  1281. package/src/shiki/langs/angular-html.js +1 -0
  1282. package/src/shiki/langs/angular-inline-style.js +1 -0
  1283. package/src/shiki/langs/angular-inline-template.js +1 -0
  1284. package/src/shiki/langs/angular-let-declaration.js +1 -0
  1285. package/src/shiki/langs/angular-template-blocks.js +1 -0
  1286. package/src/shiki/langs/angular-template.js +1 -0
  1287. package/src/shiki/langs/angular-ts.js +1 -0
  1288. package/src/shiki/langs/apache.js +1 -0
  1289. package/src/shiki/langs/apex.js +1 -0
  1290. package/src/shiki/langs/apl.js +1 -0
  1291. package/src/shiki/langs/applescript.js +1 -0
  1292. package/src/shiki/langs/ara.js +1 -0
  1293. package/src/shiki/langs/asciidoc.js +1 -0
  1294. package/src/shiki/langs/asm.js +1 -0
  1295. package/src/shiki/langs/astro.js +1 -0
  1296. package/src/shiki/langs/awk.js +1 -0
  1297. package/src/shiki/langs/ballerina.js +1 -0
  1298. package/src/shiki/langs/bat.js +1 -0
  1299. package/src/shiki/langs/beancount.js +1 -0
  1300. package/src/shiki/langs/berry.js +1 -0
  1301. package/src/shiki/langs/bibtex.js +1 -0
  1302. package/src/shiki/langs/bicep.js +1 -0
  1303. package/src/shiki/langs/blade.js +1 -0
  1304. package/src/shiki/langs/bsl.js +1 -0
  1305. package/src/shiki/langs/c.js +1 -0
  1306. package/src/shiki/langs/cadence.js +1 -0
  1307. package/src/shiki/langs/cairo.js +1 -0
  1308. package/src/shiki/langs/clarity.js +1 -0
  1309. package/src/shiki/langs/clojure.js +1 -0
  1310. package/src/shiki/langs/cmake.js +1 -0
  1311. package/src/shiki/langs/cobol.js +1 -0
  1312. package/src/shiki/langs/codeowners.js +1 -0
  1313. package/src/shiki/langs/codeql.js +1 -0
  1314. package/src/shiki/langs/coffee.js +1 -0
  1315. package/src/shiki/langs/common-lisp.js +1 -0
  1316. package/src/shiki/langs/coq.js +1 -0
  1317. package/src/shiki/langs/cpp-macro.js +1 -0
  1318. package/src/shiki/langs/cpp.js +1 -0
  1319. package/src/shiki/langs/crystal.js +1 -0
  1320. package/src/shiki/langs/csharp.js +1 -0
  1321. package/src/shiki/langs/css.js +1 -0
  1322. package/src/shiki/langs/csv.js +1 -0
  1323. package/src/shiki/langs/cue.js +1 -0
  1324. package/src/shiki/langs/cypher.js +1 -0
  1325. package/src/shiki/langs/d.js +1 -0
  1326. package/src/shiki/langs/dart.js +1 -0
  1327. package/src/shiki/langs/dax.js +1 -0
  1328. package/src/shiki/langs/desktop.js +1 -0
  1329. package/src/shiki/langs/diff.js +1 -0
  1330. package/src/shiki/langs/docker.js +1 -0
  1331. package/src/shiki/langs/dotenv.js +1 -0
  1332. package/src/shiki/langs/dream-maker.js +1 -0
  1333. package/src/shiki/langs/edge.js +1 -0
  1334. package/src/shiki/langs/elixir.js +1 -0
  1335. package/src/shiki/langs/elm.js +1 -0
  1336. package/src/shiki/langs/emacs-lisp.js +1 -0
  1337. package/src/shiki/langs/erb.js +1 -0
  1338. package/src/shiki/langs/erlang.js +1 -0
  1339. package/src/shiki/langs/es-tag-css.js +1 -0
  1340. package/src/shiki/langs/es-tag-glsl.js +1 -0
  1341. package/src/shiki/langs/es-tag-html.js +1 -0
  1342. package/src/shiki/langs/es-tag-sql.js +1 -0
  1343. package/src/shiki/langs/es-tag-xml.js +1 -0
  1344. package/src/shiki/langs/fennel.js +1 -0
  1345. package/src/shiki/langs/fish.js +1 -0
  1346. package/src/shiki/langs/fluent.js +1 -0
  1347. package/src/shiki/langs/fortran-fixed-form.js +1 -0
  1348. package/src/shiki/langs/fortran-free-form.js +1 -0
  1349. package/src/shiki/langs/fsharp.js +1 -0
  1350. package/src/shiki/langs/gdresource.js +1 -0
  1351. package/src/shiki/langs/gdscript.js +1 -0
  1352. package/src/shiki/langs/gdshader.js +1 -0
  1353. package/src/shiki/langs/genie.js +1 -0
  1354. package/src/shiki/langs/gherkin.js +1 -0
  1355. package/src/shiki/langs/git-commit.js +1 -0
  1356. package/src/shiki/langs/git-rebase.js +1 -0
  1357. package/src/shiki/langs/gleam.js +1 -0
  1358. package/src/shiki/langs/glimmer-js.js +1 -0
  1359. package/src/shiki/langs/glimmer-ts.js +1 -0
  1360. package/src/shiki/langs/glsl.js +1 -0
  1361. package/src/shiki/langs/gnuplot.js +1 -0
  1362. package/src/shiki/langs/go.js +1 -0
  1363. package/src/shiki/langs/graphql.js +1 -0
  1364. package/src/shiki/langs/groovy.js +1 -0
  1365. package/src/shiki/langs/hack.js +1 -0
  1366. package/src/shiki/langs/haml.js +1 -0
  1367. package/src/shiki/langs/handlebars.js +1 -0
  1368. package/src/shiki/langs/haskell.js +1 -0
  1369. package/src/shiki/langs/haxe.js +1 -0
  1370. package/src/shiki/langs/hcl.js +1 -0
  1371. package/src/shiki/langs/hjson.js +1 -0
  1372. package/src/shiki/langs/hlsl.js +1 -0
  1373. package/src/shiki/langs/html-derivative.js +1 -0
  1374. package/src/shiki/langs/html.js +1 -0
  1375. package/src/shiki/langs/http.js +1 -0
  1376. package/src/shiki/langs/hxml.js +1 -0
  1377. package/src/shiki/langs/hy.js +1 -0
  1378. package/src/shiki/langs/imba.js +1 -0
  1379. package/src/shiki/langs/ini.js +1 -0
  1380. package/src/shiki/langs/java.js +1 -0
  1381. package/src/shiki/langs/javascript.js +1 -0
  1382. package/src/shiki/langs/jinja-html.js +1 -0
  1383. package/src/shiki/langs/jinja.js +1 -0
  1384. package/src/shiki/langs/jison.js +1 -0
  1385. package/src/shiki/langs/json.js +1 -0
  1386. package/src/shiki/langs/json5.js +1 -0
  1387. package/src/shiki/langs/jsonc.js +1 -0
  1388. package/src/shiki/langs/jsonl.js +1 -0
  1389. package/src/shiki/langs/jsonnet.js +1 -0
  1390. package/src/shiki/langs/jssm.js +1 -0
  1391. package/src/shiki/langs/jsx.js +1 -0
  1392. package/src/shiki/langs/julia.js +1 -0
  1393. package/src/shiki/langs/kotlin.js +1 -0
  1394. package/src/shiki/langs/kusto.js +1 -0
  1395. package/src/shiki/langs/latex.js +1 -0
  1396. package/src/shiki/langs/lean.js +1 -0
  1397. package/src/shiki/langs/less.js +1 -0
  1398. package/src/shiki/langs/liquid.js +1 -0
  1399. package/src/shiki/langs/llvm.js +1 -0
  1400. package/src/shiki/langs/log.js +1 -0
  1401. package/src/shiki/langs/logo.js +1 -0
  1402. package/src/shiki/langs/lua.js +1 -0
  1403. package/src/shiki/langs/luau.js +1 -0
  1404. package/src/shiki/langs/make.js +1 -0
  1405. package/src/shiki/langs/markdown-vue.js +1 -0
  1406. package/src/shiki/langs/markdown.js +1 -0
  1407. package/src/shiki/langs/marko.js +1 -0
  1408. package/src/shiki/langs/matlab.js +1 -0
  1409. package/src/shiki/langs/mdc.js +1 -0
  1410. package/src/shiki/langs/mdx.js +1 -0
  1411. package/src/shiki/langs/mermaid.js +1 -0
  1412. package/src/shiki/langs/mipsasm.js +1 -0
  1413. package/src/shiki/langs/mojo.js +1 -0
  1414. package/src/shiki/langs/move.js +1 -0
  1415. package/src/shiki/langs/narrat.js +1 -0
  1416. package/src/shiki/langs/nextflow.js +1 -0
  1417. package/src/shiki/langs/nginx.js +1 -0
  1418. package/src/shiki/langs/nim.js +1 -0
  1419. package/src/shiki/langs/nix.js +1 -0
  1420. package/src/shiki/langs/nushell.js +1 -0
  1421. package/src/shiki/langs/objective-c.js +1 -0
  1422. package/src/shiki/langs/objective-cpp.js +1 -0
  1423. package/src/shiki/langs/ocaml.js +1 -0
  1424. package/src/shiki/langs/pascal.js +1 -0
  1425. package/src/shiki/langs/perl.js +1 -0
  1426. package/src/shiki/langs/php.js +1 -0
  1427. package/src/shiki/langs/plsql.js +1 -0
  1428. package/src/shiki/langs/po.js +1 -0
  1429. package/src/shiki/langs/polar.js +1 -0
  1430. package/src/shiki/langs/postcss.js +1 -0
  1431. package/src/shiki/langs/powerquery.js +1 -0
  1432. package/src/shiki/langs/powershell.js +1 -0
  1433. package/src/shiki/langs/prisma.js +1 -0
  1434. package/src/shiki/langs/prolog.js +1 -0
  1435. package/src/shiki/langs/proto.js +1 -0
  1436. package/src/shiki/langs/pug.js +1 -0
  1437. package/src/shiki/langs/puppet.js +1 -0
  1438. package/src/shiki/langs/purescript.js +1 -0
  1439. package/src/shiki/langs/python.js +1 -0
  1440. package/src/shiki/langs/qml.js +1 -0
  1441. package/src/shiki/langs/qmldir.js +1 -0
  1442. package/src/shiki/langs/qss.js +1 -0
  1443. package/src/shiki/langs/r.js +1 -0
  1444. package/src/shiki/langs/racket.js +1 -0
  1445. package/src/shiki/langs/raku.js +1 -0
  1446. package/src/shiki/langs/razor.js +1 -0
  1447. package/src/shiki/langs/reg.js +1 -0
  1448. package/src/shiki/langs/regexp.js +1 -0
  1449. package/src/shiki/langs/rel.js +1 -0
  1450. package/src/shiki/langs/riscv.js +1 -0
  1451. package/src/shiki/langs/rst.js +1 -0
  1452. package/src/shiki/langs/ruby.js +1 -0
  1453. package/src/shiki/langs/rust.js +1 -0
  1454. package/src/shiki/langs/sas.js +1 -0
  1455. package/src/shiki/langs/sass.js +1 -0
  1456. package/src/shiki/langs/scala.js +1 -0
  1457. package/src/shiki/langs/scheme.js +1 -0
  1458. package/src/shiki/langs/scss.js +1 -0
  1459. package/src/shiki/langs/sdbl.js +1 -0
  1460. package/src/shiki/langs/shaderlab.js +1 -0
  1461. package/src/shiki/langs/shellscript.js +1 -0
  1462. package/src/shiki/langs/shellsession.js +1 -0
  1463. package/src/shiki/langs/smalltalk.js +1 -0
  1464. package/src/shiki/langs/solidity.js +1 -0
  1465. package/src/shiki/langs/soy.js +1 -0
  1466. package/src/shiki/langs/sparql.js +1 -0
  1467. package/src/shiki/langs/splunk.js +1 -0
  1468. package/src/shiki/langs/sql.js +1 -0
  1469. package/src/shiki/langs/ssh-config.js +1 -0
  1470. package/src/shiki/langs/stata.js +1 -0
  1471. package/src/shiki/langs/stylus.js +1 -0
  1472. package/src/shiki/langs/svelte.js +1 -0
  1473. package/src/shiki/langs/swift.js +1 -0
  1474. package/src/shiki/langs/system-verilog.js +1 -0
  1475. package/src/shiki/langs/systemd.js +1 -0
  1476. package/src/shiki/langs/talonscript.js +1 -0
  1477. package/src/shiki/langs/tasl.js +1 -0
  1478. package/src/shiki/langs/tcl.js +1 -0
  1479. package/src/shiki/langs/templ.js +1 -0
  1480. package/src/shiki/langs/terraform.js +1 -0
  1481. package/src/shiki/langs/tex.js +1 -0
  1482. package/src/shiki/langs/toml.js +1 -0
  1483. package/src/shiki/langs/ts-tags.js +1 -0
  1484. package/src/shiki/langs/tsv.js +1 -0
  1485. package/src/shiki/langs/tsx.js +1 -0
  1486. package/src/shiki/langs/turtle.js +1 -0
  1487. package/src/shiki/langs/twig.js +1 -0
  1488. package/src/shiki/langs/typescript.js +1 -0
  1489. package/src/shiki/langs/typespec.js +1 -0
  1490. package/src/shiki/langs/typst.js +1 -0
  1491. package/src/shiki/langs/v.js +1 -0
  1492. package/src/shiki/langs/vala.js +1 -0
  1493. package/src/shiki/langs/vb.js +1 -0
  1494. package/src/shiki/langs/verilog.js +1 -0
  1495. package/src/shiki/langs/vhdl.js +1 -0
  1496. package/src/shiki/langs/viml.js +1 -0
  1497. package/src/shiki/langs/vue-directives.js +1 -0
  1498. package/src/shiki/langs/vue-html.js +1 -0
  1499. package/src/shiki/langs/vue-interpolations.js +1 -0
  1500. package/src/shiki/langs/vue-sfc-style-variable-injection.js +1 -0
  1501. package/src/shiki/langs/vue.js +1 -0
  1502. package/src/shiki/langs/vyper.js +1 -0
  1503. package/src/shiki/langs/wasm.js +1 -0
  1504. package/src/shiki/langs/wenyan.js +1 -0
  1505. package/src/shiki/langs/wgsl.js +1 -0
  1506. package/src/shiki/langs/wikitext.js +1 -0
  1507. package/src/shiki/langs/wit.js +1 -0
  1508. package/src/shiki/langs/wolfram.js +1 -0
  1509. package/src/shiki/langs/xml.js +1 -0
  1510. package/src/shiki/langs/xsl.js +1 -0
  1511. package/src/shiki/langs/yaml.js +1 -0
  1512. package/src/shiki/langs/zenscript.js +1 -0
  1513. package/src/shiki/langs/zig.js +1 -0
  1514. package/src/shiki/themes/andromeeda.js +1 -0
  1515. package/src/shiki/themes/aurora-x.js +1 -0
  1516. package/src/shiki/themes/ayu-dark.js +1 -0
  1517. package/src/shiki/themes/catppuccin-frappe.js +1 -0
  1518. package/src/shiki/themes/catppuccin-latte.js +1 -0
  1519. package/src/shiki/themes/catppuccin-macchiato.js +1 -0
  1520. package/src/shiki/themes/catppuccin-mocha.js +1 -0
  1521. package/src/shiki/themes/dark-plus.js +1 -0
  1522. package/src/shiki/themes/dracula-soft.js +1 -0
  1523. package/src/shiki/themes/dracula.js +1 -0
  1524. package/src/shiki/themes/everforest-dark.js +1 -0
  1525. package/src/shiki/themes/everforest-light.js +1 -0
  1526. package/src/shiki/themes/github-dark-default.js +1 -0
  1527. package/src/shiki/themes/github-dark-dimmed.js +1 -0
  1528. package/src/shiki/themes/github-dark-high-contrast.js +1 -0
  1529. package/src/shiki/themes/github-dark.js +1 -0
  1530. package/src/shiki/themes/github-light-default.js +1 -0
  1531. package/src/shiki/themes/github-light-high-contrast.js +1 -0
  1532. package/src/shiki/themes/github-light.js +1 -0
  1533. package/src/shiki/themes/gruvbox-dark-hard.js +1 -0
  1534. package/src/shiki/themes/gruvbox-dark-medium.js +1 -0
  1535. package/src/shiki/themes/gruvbox-dark-soft.js +1 -0
  1536. package/src/shiki/themes/gruvbox-light-hard.js +1 -0
  1537. package/src/shiki/themes/gruvbox-light-medium.js +1 -0
  1538. package/src/shiki/themes/gruvbox-light-soft.js +1 -0
  1539. package/src/shiki/themes/houston.js +1 -0
  1540. package/src/shiki/themes/kanagawa-dragon.js +1 -0
  1541. package/src/shiki/themes/kanagawa-lotus.js +1 -0
  1542. package/src/shiki/themes/kanagawa-wave.js +1 -0
  1543. package/src/shiki/themes/laserwave.js +1 -0
  1544. package/src/shiki/themes/light-plus.js +1 -0
  1545. package/src/shiki/themes/material-theme-darker.js +1 -0
  1546. package/src/shiki/themes/material-theme-lighter.js +1 -0
  1547. package/src/shiki/themes/material-theme-ocean.js +1 -0
  1548. package/src/shiki/themes/material-theme-palenight.js +1 -0
  1549. package/src/shiki/themes/material-theme.js +1 -0
  1550. package/src/shiki/themes/min-dark.js +1 -0
  1551. package/src/shiki/themes/min-light.js +1 -0
  1552. package/src/shiki/themes/monokai.js +1 -0
  1553. package/src/shiki/themes/night-owl.js +1 -0
  1554. package/src/shiki/themes/nord.js +1 -0
  1555. package/src/shiki/themes/one-dark-pro.js +1 -0
  1556. package/src/shiki/themes/one-light.js +1 -0
  1557. package/src/shiki/themes/plastic.js +1 -0
  1558. package/src/shiki/themes/poimandres.js +1 -0
  1559. package/src/shiki/themes/red.js +1 -0
  1560. package/src/shiki/themes/rose-pine-dawn.js +1 -0
  1561. package/src/shiki/themes/rose-pine-moon.js +1 -0
  1562. package/src/shiki/themes/rose-pine.js +1 -0
  1563. package/src/shiki/themes/slack-dark.js +1 -0
  1564. package/src/shiki/themes/slack-ochin.js +1 -0
  1565. package/src/shiki/themes/snazzy-light.js +1 -0
  1566. package/src/shiki/themes/solarized-dark.js +1 -0
  1567. package/src/shiki/themes/solarized-light.js +1 -0
  1568. package/src/shiki/themes/synthwave-84.js +1 -0
  1569. package/src/shiki/themes/tokyo-night.js +1 -0
  1570. package/src/shiki/themes/vesper.js +1 -0
  1571. package/src/shiki/themes/vitesse-black.js +1 -0
  1572. package/src/shiki/themes/vitesse-dark.js +1 -0
  1573. package/src/shiki/themes/vitesse-light.js +1 -0
  1574. package/LICENSE.md +0 -9
  1575. package/client.d.ts +0 -1
  1576. package/dist/app/tailwind.d.ts +0 -3
  1577. package/dist/app/tailwind.js +0 -65
  1578. package/dist/app/tailwind.js.map +0 -1
  1579. package/dist/internal.d.ts +0 -1
  1580. package/dist/internal.js +0 -2
  1581. package/dist/internal.js.map +0 -1
  1582. package/dist/lib/components/DevPortal.d.ts +0 -7
  1583. package/dist/lib/components/DevPortal.js +0 -54
  1584. package/dist/lib/components/DevPortal.js.map +0 -1
  1585. package/dist/lib/components/Dialog.js +0 -23
  1586. package/dist/lib/components/Dialog.js.map +0 -1
  1587. package/dist/lib/components/Select.js +0 -27
  1588. package/dist/lib/components/Select.js.map +0 -1
  1589. package/dist/lib/components/SlotletProvider.d.ts +0 -9
  1590. package/dist/lib/components/SlotletProvider.js +0 -16
  1591. package/dist/lib/components/SlotletProvider.js.map +0 -1
  1592. package/dist/lib/components/SyntaxHighlight.d.ts +0 -11
  1593. package/dist/lib/components/SyntaxHighlight.js +0 -50
  1594. package/dist/lib/components/SyntaxHighlight.js.map +0 -1
  1595. package/dist/lib/components/context/PluginSystem.js +0 -2
  1596. package/dist/lib/components/context/PluginSystem.js.map +0 -1
  1597. package/dist/lib/components/context/ThemeContext.d.ts +0 -2
  1598. package/dist/lib/components/context/ThemeContext.js +0 -7
  1599. package/dist/lib/components/context/ThemeContext.js.map +0 -1
  1600. package/dist/lib/components/context/ThemeProvider.d.ts +0 -4
  1601. package/dist/lib/components/context/ThemeProvider.js +0 -23
  1602. package/dist/lib/components/context/ThemeProvider.js.map +0 -1
  1603. package/dist/lib/core/DevPortalContext.d.ts +0 -78
  1604. package/dist/lib/core/DevPortalContext.js +0 -49
  1605. package/dist/lib/core/DevPortalContext.js.map +0 -1
  1606. package/dist/lib/plugins/custom-page/index.d.ts +0 -8
  1607. package/dist/lib/plugins/custom-page/index.js +0 -12
  1608. package/dist/lib/plugins/custom-page/index.js.map +0 -1
  1609. package/dist/lib/plugins/markdown/Toc.js +0 -48
  1610. package/dist/lib/plugins/markdown/Toc.js.map +0 -1
  1611. package/dist/lib/plugins/markdown/generateRoutes.d.ts +0 -3
  1612. package/dist/lib/plugins/markdown/generateRoutes.js +0 -21
  1613. package/dist/lib/plugins/markdown/generateRoutes.js.map +0 -1
  1614. package/dist/lib/plugins/openapi/Route.d.ts +0 -6
  1615. package/dist/lib/plugins/openapi/Route.js +0 -8
  1616. package/dist/lib/plugins/openapi/Route.js.map +0 -1
  1617. package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +0 -12
  1618. package/dist/lib/plugins/openapi/client/createMemoryClient.js +0 -46
  1619. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +0 -1
  1620. package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +0 -10
  1621. package/dist/lib/plugins/openapi/client/createWorkerClient.js +0 -61
  1622. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +0 -1
  1623. package/dist/lib/plugins/openapi/client/interfaces.d.ts +0 -4
  1624. package/dist/lib/plugins/openapi/client/interfaces.js +0 -2
  1625. package/dist/lib/plugins/openapi/client/interfaces.js.map +0 -1
  1626. package/dist/lib/plugins/openapi/client/worker.js +0 -20
  1627. package/dist/lib/plugins/openapi/client/worker.js.map +0 -1
  1628. package/dist/lib/plugins/openapi/playground/Editor.d.ts +0 -1
  1629. package/dist/lib/plugins/openapi/playground/Editor.js +0 -5
  1630. package/dist/lib/plugins/openapi/playground/Editor.js.map +0 -1
  1631. package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +0 -4
  1632. package/dist/lib/plugins/openapi/playground/ResponseTab.js +0 -42
  1633. package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +0 -1
  1634. package/dist/lib/plugins/openapi/schema/SchemaComponents.d.ts +0 -13
  1635. package/dist/lib/plugins/openapi/schema/SchemaComponents.js +0 -28
  1636. package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +0 -1
  1637. package/dist/lib/plugins/openapi/util/urql.d.ts +0 -7
  1638. package/dist/lib/plugins/openapi/util/urql.js +0 -8
  1639. package/dist/lib/plugins/openapi/util/urql.js.map +0 -1
  1640. package/dist/lib/plugins/openapi-worker.d.ts +0 -1
  1641. package/dist/lib/plugins/openapi-worker.js +0 -2
  1642. package/dist/lib/plugins/openapi-worker.js.map +0 -1
  1643. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.d.ts +0 -2
  1644. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js +0 -3
  1645. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js.map +0 -1
  1646. package/dist/lib/themeToggle.d.ts +0 -1
  1647. package/dist/lib/themeToggle.js +0 -7
  1648. package/dist/lib/themeToggle.js.map +0 -1
  1649. package/dist/lib/ui/Note.d.ts +0 -8
  1650. package/dist/lib/ui/Note.js +0 -23
  1651. package/dist/lib/ui/Note.js.map +0 -1
  1652. package/dist/lib/util/createWaitForNotify.d.ts +0 -1
  1653. package/dist/lib/util/createWaitForNotify.js +0 -15
  1654. package/dist/lib/util/createWaitForNotify.js.map +0 -1
  1655. package/dist/vite/plugin-custom-css.d.ts +0 -6
  1656. package/dist/vite/plugin-custom-css.js +0 -55
  1657. package/dist/vite/plugin-custom-css.js.map +0 -1
  1658. package/dist/vite/plugin-html-transform.d.ts +0 -2
  1659. package/dist/vite/plugin-html-transform.js +0 -15
  1660. package/dist/vite/plugin-html-transform.js.map +0 -1
  1661. package/dist/vite/prerender.d.ts +0 -17
  1662. package/dist/vite/prerender.js +0 -87
  1663. package/dist/vite/prerender.js.map +0 -1
  1664. package/lib/AuthenticationPlugin-Bx9FK124.js +0 -55
  1665. package/lib/AuthenticationPlugin-Bx9FK124.js.map +0 -1
  1666. package/lib/CategoryHeading-ovR-zHRq.js +0 -10
  1667. package/lib/CategoryHeading-ovR-zHRq.js.map +0 -1
  1668. package/lib/DeveloperHint-YeWHKvyr.js +0 -16
  1669. package/lib/DeveloperHint-YeWHKvyr.js.map +0 -1
  1670. package/lib/ErrorPage-CsZAN_za.js +0 -16
  1671. package/lib/ErrorPage-CsZAN_za.js.map +0 -1
  1672. package/lib/InkeepCustomTrigger-CE5-K5ex.js +0 -6
  1673. package/lib/InkeepCustomTrigger-CE5-K5ex.js.map +0 -1
  1674. package/lib/Input-CtVUl3eT.js +0 -2198
  1675. package/lib/Input-CtVUl3eT.js.map +0 -1
  1676. package/lib/Markdown-DapSf3wG.js +0 -20281
  1677. package/lib/Markdown-DapSf3wG.js.map +0 -1
  1678. package/lib/MdxPage-BqBWsXZ1.js +0 -172
  1679. package/lib/MdxPage-BqBWsXZ1.js.map +0 -1
  1680. package/lib/OperationList-CYrmxPa8.js +0 -602
  1681. package/lib/OperationList-CYrmxPa8.js.map +0 -1
  1682. package/lib/Route-Q5mqNQrv.js +0 -14
  1683. package/lib/Route-Q5mqNQrv.js.map +0 -1
  1684. package/lib/SidebarBadge-Dx7jtnoA.js +0 -498
  1685. package/lib/SidebarBadge-Dx7jtnoA.js.map +0 -1
  1686. package/lib/SlotletProvider-D3UD5Go3.js +0 -238
  1687. package/lib/SlotletProvider-D3UD5Go3.js.map +0 -1
  1688. package/lib/Spinner-3cQDBVGr.js +0 -7
  1689. package/lib/Spinner-3cQDBVGr.js.map +0 -1
  1690. package/lib/ZudokuContext-cr-pTRY1.js +0 -1084
  1691. package/lib/ZudokuContext-cr-pTRY1.js.map +0 -1
  1692. package/lib/_commonjsHelpers-BkfeUUK-.js +0 -29
  1693. package/lib/_commonjsHelpers-BkfeUUK-.js.map +0 -1
  1694. package/lib/assets/index-B9EWVYfo.js +0 -4790
  1695. package/lib/assets/index-B9EWVYfo.js.map +0 -1
  1696. package/lib/assets/worker-BP8Uzflt.js +0 -17916
  1697. package/lib/assets/worker-BP8Uzflt.js.map +0 -1
  1698. package/lib/index-BG0g4WW0.js +0 -1771
  1699. package/lib/index-BG0g4WW0.js.map +0 -1
  1700. package/lib/index-BlJ2rj99.js +0 -5815
  1701. package/lib/index-BlJ2rj99.js.map +0 -1
  1702. package/lib/index-BngPzhKn.js +0 -124
  1703. package/lib/index-BngPzhKn.js.map +0 -1
  1704. package/lib/index-CLd8ycZz.js +0 -4790
  1705. package/lib/index-CLd8ycZz.js.map +0 -1
  1706. package/lib/index-Dolisrci.js +0 -2814
  1707. package/lib/index-Dolisrci.js.map +0 -1
  1708. package/lib/index-LNp6rxyU.js +0 -2094
  1709. package/lib/index-LNp6rxyU.js.map +0 -1
  1710. package/lib/joinPath-B7kNnUX4.js +0 -8
  1711. package/lib/joinPath-B7kNnUX4.js.map +0 -1
  1712. package/lib/jsx-runtime-B6kdoens.js +0 -635
  1713. package/lib/jsx-runtime-B6kdoens.js.map +0 -1
  1714. package/lib/prism-bash.min-DadFsM4Z.js +0 -7
  1715. package/lib/prism-bash.min-DadFsM4Z.js.map +0 -1
  1716. package/lib/prism-csharp.min-Yizuc34Y.js +0 -35
  1717. package/lib/prism-csharp.min-Yizuc34Y.js.map +0 -1
  1718. package/lib/prism-java.min-d5iT_mOd.js +0 -7
  1719. package/lib/prism-java.min-d5iT_mOd.js.map +0 -1
  1720. package/lib/prism-javascript.min-CEqHqgbm.js +0 -9
  1721. package/lib/prism-javascript.min-CEqHqgbm.js.map +0 -1
  1722. package/lib/prism-json.min-B1GJqK1k.js +0 -2
  1723. package/lib/prism-json.min-B1GJqK1k.js.map +0 -1
  1724. package/lib/prism-markdown.min-F3U-vPBi.js +0 -61
  1725. package/lib/prism-markdown.min-F3U-vPBi.js.map +0 -1
  1726. package/lib/prism-markup-BNGj0Tvm.js +0 -174
  1727. package/lib/prism-markup-BNGj0Tvm.js.map +0 -1
  1728. package/lib/prism-markup-templating-DZrrEs0A.js +0 -62
  1729. package/lib/prism-markup-templating-DZrrEs0A.js.map +0 -1
  1730. package/lib/prism-objectivec.min-BXSWqpJJ.js +0 -2
  1731. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +0 -1
  1732. package/lib/prism-php.min-o7FpoMP_.js +0 -11
  1733. package/lib/prism-php.min-o7FpoMP_.js.map +0 -1
  1734. package/lib/prism-ruby.min-C7LwcKyz.js +0 -10
  1735. package/lib/prism-ruby.min-C7LwcKyz.js.map +0 -1
  1736. package/lib/prism-typescript.min-oSVeWCAd.js +0 -6
  1737. package/lib/prism-typescript.min-oSVeWCAd.js.map +0 -1
  1738. package/lib/router-D2p7Olpn.js +0 -2971
  1739. package/lib/router-D2p7Olpn.js.map +0 -1
  1740. package/lib/state-hNe1dw4B.js +0 -548
  1741. package/lib/state-hNe1dw4B.js.map +0 -1
  1742. package/lib/urql-YhcsXYy8.js +0 -1591
  1743. package/lib/urql-YhcsXYy8.js.map +0 -1
  1744. package/lib/utils-ByIc_KIM.js +0 -749
  1745. package/lib/utils-ByIc_KIM.js.map +0 -1
  1746. package/lib/zudoku.openapi-worker.js +0 -16059
  1747. package/lib/zudoku.openapi-worker.js.map +0 -1
  1748. package/lib/zudoku.plugin-custom-page.js +0 -13
  1749. package/lib/zudoku.plugin-custom-page.js.map +0 -1
  1750. package/src/app/tailwind.ts +0 -68
  1751. package/src/lib/components/DevPortal.tsx +0 -111
  1752. package/src/lib/components/Dialog.tsx +0 -119
  1753. package/src/lib/components/Select.tsx +0 -157
  1754. package/src/lib/components/SlotletProvider.tsx +0 -30
  1755. package/src/lib/components/SyntaxHighlight.tsx +0 -122
  1756. package/src/lib/components/context/PluginSystem.ts +0 -0
  1757. package/src/lib/components/context/ThemeContext.tsx +0 -8
  1758. package/src/lib/components/context/ThemeProvider.tsx +0 -27
  1759. package/src/lib/core/DevPortalContext.ts +0 -135
  1760. package/src/lib/plugins/custom-page/index.tsx +0 -22
  1761. package/src/lib/plugins/markdown/Toc.tsx +0 -135
  1762. package/src/lib/plugins/markdown/generateRoutes.tsx +0 -38
  1763. package/src/lib/plugins/openapi/Route.tsx +0 -21
  1764. package/src/lib/plugins/openapi/client/createMemoryClient.ts +0 -56
  1765. package/src/lib/plugins/openapi/client/createWorkerClient.ts +0 -80
  1766. package/src/lib/plugins/openapi/client/interfaces.ts +0 -5
  1767. package/src/lib/plugins/openapi/client/worker.ts +0 -30
  1768. package/src/lib/plugins/openapi/playground/Editor.tsx +0 -4
  1769. package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -76
  1770. package/src/lib/plugins/openapi/schema/SchemaComponents.tsx +0 -126
  1771. package/src/lib/plugins/openapi/util/urql.ts +0 -8
  1772. package/src/lib/plugins/openapi-worker.ts +0 -1
  1773. package/src/lib/plugins/search-inkeep/InkeepCustomTrigger.tsx +0 -3
  1774. package/src/lib/themeToggle.ts +0 -7
  1775. package/src/lib/ui/Note.tsx +0 -58
  1776. package/src/lib/util/createWaitForNotify.ts +0 -18
  1777. /package/dist/lib/components/{context/PluginSystem.d.ts → Slot.test.d.ts} +0 -0
  1778. /package/dist/lib/{plugins/markdown → components/navigation}/Toc.d.ts +0 -0
  1779. /package/dist/lib/{plugins/openapi/client/worker.d.ts → hooks/useEvent.test.d.ts} +0 -0
  1780. /package/dist/lib/{components → ui}/Dialog.d.ts +0 -0
  1781. /package/dist/lib/{components → ui}/Select.d.ts +0 -0
@@ -1,4790 +0,0 @@
1
- const ut = Symbol.for("yaml.alias"), rt = Symbol.for("yaml.document"), V = Symbol.for("yaml.map"), jt = Symbol.for("yaml.pair"), R = Symbol.for("yaml.scalar"), fe = Symbol.for("yaml.seq"), j = Symbol.for("yaml.node.type"), Z = (s) => !!s && typeof s == "object" && s[j] === ut, ue = (s) => !!s && typeof s == "object" && s[j] === rt, he = (s) => !!s && typeof s == "object" && s[j] === V, I = (s) => !!s && typeof s == "object" && s[j] === jt, E = (s) => !!s && typeof s == "object" && s[j] === R, de = (s) => !!s && typeof s == "object" && s[j] === fe;
2
- function L(s) {
3
- if (s && typeof s == "object")
4
- switch (s[j]) {
5
- case V:
6
- case fe:
7
- return !0;
8
- }
9
- return !1;
10
- }
11
- function $(s) {
12
- if (s && typeof s == "object")
13
- switch (s[j]) {
14
- case ut:
15
- case V:
16
- case R:
17
- case fe:
18
- return !0;
19
- }
20
- return !1;
21
- }
22
- const $s = (s) => (E(s) || L(s)) && !!s.anchor, M = Symbol("break visit"), Kt = Symbol("skip children"), U = Symbol("remove node");
23
- function Y(s, e) {
24
- const t = qt(e);
25
- ue(s) ? se(null, s.contents, t, Object.freeze([s])) === U && (s.contents = null) : se(null, s, t, Object.freeze([]));
26
- }
27
- Y.BREAK = M;
28
- Y.SKIP = Kt;
29
- Y.REMOVE = U;
30
- function se(s, e, t, n) {
31
- const i = Ut(s, e, t, n);
32
- if ($(i) || I(i))
33
- return Ft(s, n, i), se(s, i, t, n);
34
- if (typeof i != "symbol") {
35
- if (L(e)) {
36
- n = Object.freeze(n.concat(e));
37
- for (let r = 0; r < e.items.length; ++r) {
38
- const o = se(r, e.items[r], t, n);
39
- if (typeof o == "number")
40
- r = o - 1;
41
- else {
42
- if (o === M)
43
- return M;
44
- o === U && (e.items.splice(r, 1), r -= 1);
45
- }
46
- }
47
- } else if (I(e)) {
48
- n = Object.freeze(n.concat(e));
49
- const r = se("key", e.key, t, n);
50
- if (r === M)
51
- return M;
52
- r === U && (e.key = null);
53
- const o = se("value", e.value, t, n);
54
- if (o === M)
55
- return M;
56
- o === U && (e.value = null);
57
- }
58
- }
59
- return i;
60
- }
61
- async function Ke(s, e) {
62
- const t = qt(e);
63
- ue(s) ? await ne(null, s.contents, t, Object.freeze([s])) === U && (s.contents = null) : await ne(null, s, t, Object.freeze([]));
64
- }
65
- Ke.BREAK = M;
66
- Ke.SKIP = Kt;
67
- Ke.REMOVE = U;
68
- async function ne(s, e, t, n) {
69
- const i = await Ut(s, e, t, n);
70
- if ($(i) || I(i))
71
- return Ft(s, n, i), ne(s, i, t, n);
72
- if (typeof i != "symbol") {
73
- if (L(e)) {
74
- n = Object.freeze(n.concat(e));
75
- for (let r = 0; r < e.items.length; ++r) {
76
- const o = await ne(r, e.items[r], t, n);
77
- if (typeof o == "number")
78
- r = o - 1;
79
- else {
80
- if (o === M)
81
- return M;
82
- o === U && (e.items.splice(r, 1), r -= 1);
83
- }
84
- }
85
- } else if (I(e)) {
86
- n = Object.freeze(n.concat(e));
87
- const r = await ne("key", e.key, t, n);
88
- if (r === M)
89
- return M;
90
- r === U && (e.key = null);
91
- const o = await ne("value", e.value, t, n);
92
- if (o === M)
93
- return M;
94
- o === U && (e.value = null);
95
- }
96
- }
97
- return i;
98
- }
99
- function qt(s) {
100
- return typeof s == "object" && (s.Collection || s.Node || s.Value) ? Object.assign({
101
- Alias: s.Node,
102
- Map: s.Node,
103
- Scalar: s.Node,
104
- Seq: s.Node
105
- }, s.Value && {
106
- Map: s.Value,
107
- Scalar: s.Value,
108
- Seq: s.Value
109
- }, s.Collection && {
110
- Map: s.Collection,
111
- Seq: s.Collection
112
- }, s) : s;
113
- }
114
- function Ut(s, e, t, n) {
115
- var i, r, o, l, a;
116
- if (typeof t == "function")
117
- return t(s, e, n);
118
- if (he(e))
119
- return (i = t.Map) == null ? void 0 : i.call(t, s, e, n);
120
- if (de(e))
121
- return (r = t.Seq) == null ? void 0 : r.call(t, s, e, n);
122
- if (I(e))
123
- return (o = t.Pair) == null ? void 0 : o.call(t, s, e, n);
124
- if (E(e))
125
- return (l = t.Scalar) == null ? void 0 : l.call(t, s, e, n);
126
- if (Z(e))
127
- return (a = t.Alias) == null ? void 0 : a.call(t, s, e, n);
128
- }
129
- function Ft(s, e, t) {
130
- const n = e[e.length - 1];
131
- if (L(n))
132
- n.items[s] = t;
133
- else if (I(n))
134
- s === "key" ? n.key = t : n.value = t;
135
- else if (ue(n))
136
- n.contents = t;
137
- else {
138
- const i = Z(n) ? "alias" : "scalar";
139
- throw new Error(`Cannot replace node with ${i} parent`);
140
- }
141
- }
142
- const _s = {
143
- "!": "%21",
144
- ",": "%2C",
145
- "[": "%5B",
146
- "]": "%5D",
147
- "{": "%7B",
148
- "}": "%7D"
149
- }, Cs = (s) => s.replace(/[!,[\]{}]/g, (e) => _s[e]);
150
- class B {
151
- constructor(e, t) {
152
- this.docStart = null, this.docEnd = !1, this.yaml = Object.assign({}, B.defaultYaml, e), this.tags = Object.assign({}, B.defaultTags, t);
153
- }
154
- clone() {
155
- const e = new B(this.yaml, this.tags);
156
- return e.docStart = this.docStart, e;
157
- }
158
- /**
159
- * During parsing, get a Directives instance for the current document and
160
- * update the stream state according to the current version's spec.
161
- */
162
- atDocument() {
163
- const e = new B(this.yaml, this.tags);
164
- switch (this.yaml.version) {
165
- case "1.1":
166
- this.atNextDocument = !0;
167
- break;
168
- case "1.2":
169
- this.atNextDocument = !1, this.yaml = {
170
- explicit: B.defaultYaml.explicit,
171
- version: "1.2"
172
- }, this.tags = Object.assign({}, B.defaultTags);
173
- break;
174
- }
175
- return e;
176
- }
177
- /**
178
- * @param onError - May be called even if the action was successful
179
- * @returns `true` on success
180
- */
181
- add(e, t) {
182
- this.atNextDocument && (this.yaml = { explicit: B.defaultYaml.explicit, version: "1.1" }, this.tags = Object.assign({}, B.defaultTags), this.atNextDocument = !1);
183
- const n = e.trim().split(/[ \t]+/), i = n.shift();
184
- switch (i) {
185
- case "%TAG": {
186
- if (n.length !== 2 && (t(0, "%TAG directive should contain exactly two parts"), n.length < 2))
187
- return !1;
188
- const [r, o] = n;
189
- return this.tags[r] = o, !0;
190
- }
191
- case "%YAML": {
192
- if (this.yaml.explicit = !0, n.length !== 1)
193
- return t(0, "%YAML directive should contain exactly one part"), !1;
194
- const [r] = n;
195
- if (r === "1.1" || r === "1.2")
196
- return this.yaml.version = r, !0;
197
- {
198
- const o = /^\d+\.\d+$/.test(r);
199
- return t(6, `Unsupported YAML version ${r}`, o), !1;
200
- }
201
- }
202
- default:
203
- return t(0, `Unknown directive ${i}`, !0), !1;
204
- }
205
- }
206
- /**
207
- * Resolves a tag, matching handles to those defined in %TAG directives.
208
- *
209
- * @returns Resolved tag, which may also be the non-specific tag `'!'` or a
210
- * `'!local'` tag, or `null` if unresolvable.
211
- */
212
- tagName(e, t) {
213
- if (e === "!")
214
- return "!";
215
- if (e[0] !== "!")
216
- return t(`Not a valid tag: ${e}`), null;
217
- if (e[1] === "<") {
218
- const o = e.slice(2, -1);
219
- return o === "!" || o === "!!" ? (t(`Verbatim tags aren't resolved, so ${e} is invalid.`), null) : (e[e.length - 1] !== ">" && t("Verbatim tags must end with a >"), o);
220
- }
221
- const [, n, i] = e.match(/^(.*!)([^!]*)$/s);
222
- i || t(`The ${e} tag has no suffix`);
223
- const r = this.tags[n];
224
- if (r)
225
- try {
226
- return r + decodeURIComponent(i);
227
- } catch (o) {
228
- return t(String(o)), null;
229
- }
230
- return n === "!" ? e : (t(`Could not resolve tag: ${e}`), null);
231
- }
232
- /**
233
- * Given a fully resolved tag, returns its printable string form,
234
- * taking into account current tag prefixes and defaults.
235
- */
236
- tagString(e) {
237
- for (const [t, n] of Object.entries(this.tags))
238
- if (e.startsWith(n))
239
- return t + Cs(e.substring(n.length));
240
- return e[0] === "!" ? e : `!<${e}>`;
241
- }
242
- toString(e) {
243
- const t = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : [], n = Object.entries(this.tags);
244
- let i;
245
- if (e && n.length > 0 && $(e.contents)) {
246
- const r = {};
247
- Y(e.contents, (o, l) => {
248
- $(l) && l.tag && (r[l.tag] = !0);
249
- }), i = Object.keys(r);
250
- } else
251
- i = [];
252
- for (const [r, o] of n)
253
- r === "!!" && o === "tag:yaml.org,2002:" || (!e || i.some((l) => l.startsWith(o))) && t.push(`%TAG ${r} ${o}`);
254
- return t.join(`
255
- `);
256
- }
257
- }
258
- B.defaultYaml = { explicit: !1, version: "1.2" };
259
- B.defaultTags = { "!!": "tag:yaml.org,2002:" };
260
- function Rt(s) {
261
- if (/[\x00-\x19\s,[\]{}]/.test(s)) {
262
- const t = `Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;
263
- throw new Error(t);
264
- }
265
- return !0;
266
- }
267
- function Vt(s) {
268
- const e = /* @__PURE__ */ new Set();
269
- return Y(s, {
270
- Value(t, n) {
271
- n.anchor && e.add(n.anchor);
272
- }
273
- }), e;
274
- }
275
- function Yt(s, e) {
276
- for (let t = 1; ; ++t) {
277
- const n = `${s}${t}`;
278
- if (!e.has(n))
279
- return n;
280
- }
281
- }
282
- function vs(s, e) {
283
- const t = [], n = /* @__PURE__ */ new Map();
284
- let i = null;
285
- return {
286
- onAnchor: (r) => {
287
- t.push(r), i || (i = Vt(s));
288
- const o = Yt(e, i);
289
- return i.add(o), o;
290
- },
291
- /**
292
- * With circular references, the source node is only resolved after all
293
- * of its child nodes are. This is why anchors are set only after all of
294
- * the nodes have been created.
295
- */
296
- setAnchors: () => {
297
- for (const r of t) {
298
- const o = n.get(r);
299
- if (typeof o == "object" && o.anchor && (E(o.node) || L(o.node)))
300
- o.node.anchor = o.anchor;
301
- else {
302
- const l = new Error("Failed to resolve repeated object (this should not happen)");
303
- throw l.source = r, l;
304
- }
305
- }
306
- },
307
- sourceObjects: n
308
- };
309
- }
310
- function ie(s, e, t, n) {
311
- if (n && typeof n == "object")
312
- if (Array.isArray(n))
313
- for (let i = 0, r = n.length; i < r; ++i) {
314
- const o = n[i], l = ie(s, n, String(i), o);
315
- l === void 0 ? delete n[i] : l !== o && (n[i] = l);
316
- }
317
- else if (n instanceof Map)
318
- for (const i of Array.from(n.keys())) {
319
- const r = n.get(i), o = ie(s, n, i, r);
320
- o === void 0 ? n.delete(i) : o !== r && n.set(i, o);
321
- }
322
- else if (n instanceof Set)
323
- for (const i of Array.from(n)) {
324
- const r = ie(s, n, i, i);
325
- r === void 0 ? n.delete(i) : r !== i && (n.delete(i), n.add(r));
326
- }
327
- else
328
- for (const [i, r] of Object.entries(n)) {
329
- const o = ie(s, n, i, r);
330
- o === void 0 ? delete n[i] : o !== r && (n[i] = o);
331
- }
332
- return s.call(e, t, n);
333
- }
334
- function D(s, e, t) {
335
- if (Array.isArray(s))
336
- return s.map((n, i) => D(n, String(i), t));
337
- if (s && typeof s.toJSON == "function") {
338
- if (!t || !$s(s))
339
- return s.toJSON(e, t);
340
- const n = { aliasCount: 0, count: 1, res: void 0 };
341
- t.anchors.set(s, n), t.onCreate = (r) => {
342
- n.res = r, delete t.onCreate;
343
- };
344
- const i = s.toJSON(e, t);
345
- return t.onCreate && t.onCreate(i), i;
346
- }
347
- return typeof s == "bigint" && !(t != null && t.keep) ? Number(s) : s;
348
- }
349
- class ht {
350
- constructor(e) {
351
- Object.defineProperty(this, j, { value: e });
352
- }
353
- /** Create a copy of this node. */
354
- clone() {
355
- const e = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
356
- return this.range && (e.range = this.range.slice()), e;
357
- }
358
- /** A plain JavaScript representation of this node. */
359
- toJS(e, { mapAsMap: t, maxAliasCount: n, onAnchor: i, reviver: r } = {}) {
360
- if (!ue(e))
361
- throw new TypeError("A document argument is required");
362
- const o = {
363
- anchors: /* @__PURE__ */ new Map(),
364
- doc: e,
365
- keep: !0,
366
- mapAsMap: t === !0,
367
- mapKeyWarned: !1,
368
- maxAliasCount: typeof n == "number" ? n : 100
369
- }, l = D(this, "", o);
370
- if (typeof i == "function")
371
- for (const { count: a, res: c } of o.anchors.values())
372
- i(c, a);
373
- return typeof r == "function" ? ie(r, { "": l }, "", l) : l;
374
- }
375
- }
376
- class qe extends ht {
377
- constructor(e) {
378
- super(ut), this.source = e, Object.defineProperty(this, "tag", {
379
- set() {
380
- throw new Error("Alias nodes cannot have tags");
381
- }
382
- });
383
- }
384
- /**
385
- * Resolve the value of this alias within `doc`, finding the last
386
- * instance of the `source` anchor before this node.
387
- */
388
- resolve(e) {
389
- let t;
390
- return Y(e, {
391
- Node: (n, i) => {
392
- if (i === this)
393
- return Y.BREAK;
394
- i.anchor === this.source && (t = i);
395
- }
396
- }), t;
397
- }
398
- toJSON(e, t) {
399
- if (!t)
400
- return { source: this.source };
401
- const { anchors: n, doc: i, maxAliasCount: r } = t, o = this.resolve(i);
402
- if (!o) {
403
- const a = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
404
- throw new ReferenceError(a);
405
- }
406
- let l = n.get(o);
407
- if (l || (D(o, null, t), l = n.get(o)), !l || l.res === void 0) {
408
- const a = "This should not happen: Alias anchor was not resolved?";
409
- throw new ReferenceError(a);
410
- }
411
- if (r >= 0 && (l.count += 1, l.aliasCount === 0 && (l.aliasCount = _e(i, o, n)), l.count * l.aliasCount > r)) {
412
- const a = "Excessive alias count indicates a resource exhaustion attack";
413
- throw new ReferenceError(a);
414
- }
415
- return l.res;
416
- }
417
- toString(e, t, n) {
418
- const i = `*${this.source}`;
419
- if (e) {
420
- if (Rt(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
421
- const r = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
422
- throw new Error(r);
423
- }
424
- if (e.implicitKey)
425
- return `${i} `;
426
- }
427
- return i;
428
- }
429
- }
430
- function _e(s, e, t) {
431
- if (Z(e)) {
432
- const n = e.resolve(s), i = t && n && t.get(n);
433
- return i ? i.count * i.aliasCount : 0;
434
- } else if (L(e)) {
435
- let n = 0;
436
- for (const i of e.items) {
437
- const r = _e(s, i, t);
438
- r > n && (n = r);
439
- }
440
- return n;
441
- } else if (I(e)) {
442
- const n = _e(s, e.key, t), i = _e(s, e.value, t);
443
- return Math.max(n, i);
444
- }
445
- return 1;
446
- }
447
- const Jt = (s) => !s || typeof s != "function" && typeof s != "object";
448
- class O extends ht {
449
- constructor(e) {
450
- super(R), this.value = e;
451
- }
452
- toJSON(e, t) {
453
- return t != null && t.keep ? this.value : D(this.value, e, t);
454
- }
455
- toString() {
456
- return String(this.value);
457
- }
458
- }
459
- O.BLOCK_FOLDED = "BLOCK_FOLDED";
460
- O.BLOCK_LITERAL = "BLOCK_LITERAL";
461
- O.PLAIN = "PLAIN";
462
- O.QUOTE_DOUBLE = "QUOTE_DOUBLE";
463
- O.QUOTE_SINGLE = "QUOTE_SINGLE";
464
- const Bs = "tag:yaml.org,2002:";
465
- function Ms(s, e, t) {
466
- if (e) {
467
- const n = t.filter((r) => r.tag === e), i = n.find((r) => !r.format) ?? n[0];
468
- if (!i)
469
- throw new Error(`Tag ${e} not found`);
470
- return i;
471
- }
472
- return t.find((n) => {
473
- var i;
474
- return ((i = n.identify) == null ? void 0 : i.call(n, s)) && !n.format;
475
- });
476
- }
477
- function Se(s, e, t) {
478
- var f, d, h;
479
- if (ue(s) && (s = s.contents), $(s))
480
- return s;
481
- if (I(s)) {
482
- const y = (d = (f = t.schema[V]).createNode) == null ? void 0 : d.call(f, t.schema, null, t);
483
- return y.items.push(s), y;
484
- }
485
- (s instanceof String || s instanceof Number || s instanceof Boolean || typeof BigInt < "u" && s instanceof BigInt) && (s = s.valueOf());
486
- const { aliasDuplicateObjects: n, onAnchor: i, onTagObj: r, schema: o, sourceObjects: l } = t;
487
- let a;
488
- if (n && s && typeof s == "object") {
489
- if (a = l.get(s), a)
490
- return a.anchor || (a.anchor = i(s)), new qe(a.anchor);
491
- a = { anchor: null, node: null }, l.set(s, a);
492
- }
493
- e != null && e.startsWith("!!") && (e = Bs + e.slice(2));
494
- let c = Ms(s, e, o.tags);
495
- if (!c) {
496
- if (s && typeof s.toJSON == "function" && (s = s.toJSON()), !s || typeof s != "object") {
497
- const y = new O(s);
498
- return a && (a.node = y), y;
499
- }
500
- c = s instanceof Map ? o[V] : Symbol.iterator in Object(s) ? o[fe] : o[V];
501
- }
502
- r && (r(c), delete t.onTagObj);
503
- const m = c != null && c.createNode ? c.createNode(t.schema, s, t) : typeof ((h = c == null ? void 0 : c.nodeClass) == null ? void 0 : h.from) == "function" ? c.nodeClass.from(t.schema, s, t) : new O(s);
504
- return e ? m.tag = e : c.default || (m.tag = c.tag), a && (a.node = m), m;
505
- }
506
- function Me(s, e, t) {
507
- let n = t;
508
- for (let i = e.length - 1; i >= 0; --i) {
509
- const r = e[i];
510
- if (typeof r == "number" && Number.isInteger(r) && r >= 0) {
511
- const o = [];
512
- o[r] = n, n = o;
513
- } else
514
- n = /* @__PURE__ */ new Map([[r, n]]);
515
- }
516
- return Se(n, void 0, {
517
- aliasDuplicateObjects: !1,
518
- keepUndefined: !1,
519
- onAnchor: () => {
520
- throw new Error("This should not happen, please report a bug.");
521
- },
522
- schema: s,
523
- sourceObjects: /* @__PURE__ */ new Map()
524
- });
525
- }
526
- const be = (s) => s == null || typeof s == "object" && !!s[Symbol.iterator]().next().done;
527
- class Gt extends ht {
528
- constructor(e, t) {
529
- super(e), Object.defineProperty(this, "schema", {
530
- value: t,
531
- configurable: !0,
532
- enumerable: !1,
533
- writable: !0
534
- });
535
- }
536
- /**
537
- * Create a copy of this collection.
538
- *
539
- * @param schema - If defined, overwrites the original's schema
540
- */
541
- clone(e) {
542
- const t = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
543
- return e && (t.schema = e), t.items = t.items.map((n) => $(n) || I(n) ? n.clone(e) : n), this.range && (t.range = this.range.slice()), t;
544
- }
545
- /**
546
- * Adds a value to the collection. For `!!map` and `!!omap` the value must
547
- * be a Pair instance or a `{ key, value }` object, which may not have a key
548
- * that already exists in the map.
549
- */
550
- addIn(e, t) {
551
- if (be(e))
552
- this.add(t);
553
- else {
554
- const [n, ...i] = e, r = this.get(n, !0);
555
- if (L(r))
556
- r.addIn(i, t);
557
- else if (r === void 0 && this.schema)
558
- this.set(n, Me(this.schema, i, t));
559
- else
560
- throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`);
561
- }
562
- }
563
- /**
564
- * Removes a value from the collection.
565
- * @returns `true` if the item was found and removed.
566
- */
567
- deleteIn(e) {
568
- const [t, ...n] = e;
569
- if (n.length === 0)
570
- return this.delete(t);
571
- const i = this.get(t, !0);
572
- if (L(i))
573
- return i.deleteIn(n);
574
- throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`);
575
- }
576
- /**
577
- * Returns item at `key`, or `undefined` if not found. By default unwraps
578
- * scalar values from their surrounding node; to disable set `keepScalar` to
579
- * `true` (collections are always returned intact).
580
- */
581
- getIn(e, t) {
582
- const [n, ...i] = e, r = this.get(n, !0);
583
- return i.length === 0 ? !t && E(r) ? r.value : r : L(r) ? r.getIn(i, t) : void 0;
584
- }
585
- hasAllNullValues(e) {
586
- return this.items.every((t) => {
587
- if (!I(t))
588
- return !1;
589
- const n = t.value;
590
- return n == null || e && E(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag;
591
- });
592
- }
593
- /**
594
- * Checks if the collection includes a value with the key `key`.
595
- */
596
- hasIn(e) {
597
- const [t, ...n] = e;
598
- if (n.length === 0)
599
- return this.has(t);
600
- const i = this.get(t, !0);
601
- return L(i) ? i.hasIn(n) : !1;
602
- }
603
- /**
604
- * Sets a value in this collection. For `!!set`, `value` needs to be a
605
- * boolean to add/remove the item from the set.
606
- */
607
- setIn(e, t) {
608
- const [n, ...i] = e;
609
- if (i.length === 0)
610
- this.set(n, t);
611
- else {
612
- const r = this.get(n, !0);
613
- if (L(r))
614
- r.setIn(i, t);
615
- else if (r === void 0 && this.schema)
616
- this.set(n, Me(this.schema, i, t));
617
- else
618
- throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`);
619
- }
620
- }
621
- }
622
- const Ps = (s) => s.replace(/^(?!$)(?: $)?/gm, "#");
623
- function F(s, e) {
624
- return /^\n+$/.test(s) ? s.substring(1) : e ? s.replace(/^(?! *$)/gm, e) : s;
625
- }
626
- const W = (s, e, t) => s.endsWith(`
627
- `) ? F(t, e) : t.includes(`
628
- `) ? `
629
- ` + F(t, e) : (s.endsWith(" ") ? "" : " ") + t, Qt = "flow", ot = "block", Ce = "quoted";
630
- function Ue(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentWidth: r = 20, onFold: o, onOverflow: l } = {}) {
631
- if (!i || i < 0)
632
- return s;
633
- i < r && (r = 0);
634
- const a = Math.max(1 + r, 1 + i - e.length);
635
- if (s.length <= a)
636
- return s;
637
- const c = [], m = {};
638
- let f = i - e.length;
639
- typeof n == "number" && (n > i - Math.max(2, r) ? c.push(0) : f = i - n);
640
- let d, h, y = !1, u = -1, p = -1, g = -1;
641
- t === ot && (u = It(s, u, e.length), u !== -1 && (f = u + a));
642
- for (let N; N = s[u += 1]; ) {
643
- if (t === Ce && N === "\\") {
644
- switch (p = u, s[u + 1]) {
645
- case "x":
646
- u += 3;
647
- break;
648
- case "u":
649
- u += 5;
650
- break;
651
- case "U":
652
- u += 9;
653
- break;
654
- default:
655
- u += 1;
656
- }
657
- g = u;
658
- }
659
- if (N === `
660
- `)
661
- t === ot && (u = It(s, u, e.length)), f = u + e.length + a, d = void 0;
662
- else {
663
- if (N === " " && h && h !== " " && h !== `
664
- ` && h !== " ") {
665
- const S = s[u + 1];
666
- S && S !== " " && S !== `
667
- ` && S !== " " && (d = u);
668
- }
669
- if (u >= f)
670
- if (d)
671
- c.push(d), f = d + a, d = void 0;
672
- else if (t === Ce) {
673
- for (; h === " " || h === " "; )
674
- h = N, N = s[u += 1], y = !0;
675
- const S = u > g + 1 ? u - 2 : p - 1;
676
- if (m[S])
677
- return s;
678
- c.push(S), m[S] = !0, f = S + a, d = void 0;
679
- } else
680
- y = !0;
681
- }
682
- h = N;
683
- }
684
- if (y && l && l(), c.length === 0)
685
- return s;
686
- o && o();
687
- let w = s.slice(0, c[0]);
688
- for (let N = 0; N < c.length; ++N) {
689
- const S = c[N], A = c[N + 1] || s.length;
690
- S === 0 ? w = `
691
- ${e}${s.slice(0, A)}` : (t === Ce && m[S] && (w += `${s[S]}\\`), w += `
692
- ${e}${s.slice(S + 1, A)}`);
693
- }
694
- return w;
695
- }
696
- function It(s, e, t) {
697
- let n = e, i = e + 1, r = s[i];
698
- for (; r === " " || r === " "; )
699
- if (e < i + t)
700
- r = s[++e];
701
- else {
702
- do
703
- r = s[++e];
704
- while (r && r !== `
705
- `);
706
- n = e, i = e + 1, r = s[i];
707
- }
708
- return n;
709
- }
710
- const Fe = (s, e) => ({
711
- indentAtStart: e ? s.indent.length : s.indentAtStart,
712
- lineWidth: s.options.lineWidth,
713
- minContentWidth: s.options.minContentWidth
714
- }), Re = (s) => /^(%|---|\.\.\.)/m.test(s);
715
- function Ds(s, e, t) {
716
- if (!e || e < 0)
717
- return !1;
718
- const n = e - t, i = s.length;
719
- if (i <= n)
720
- return !1;
721
- for (let r = 0, o = 0; r < i; ++r)
722
- if (s[r] === `
723
- `) {
724
- if (r - o > n)
725
- return !0;
726
- if (o = r + 1, i - o <= n)
727
- return !1;
728
- }
729
- return !0;
730
- }
731
- function we(s, e) {
732
- const t = JSON.stringify(s);
733
- if (e.options.doubleQuotedAsJSON)
734
- return t;
735
- const { implicitKey: n } = e, i = e.options.doubleQuotedMinMultiLineLength, r = e.indent || (Re(s) ? " " : "");
736
- let o = "", l = 0;
737
- for (let a = 0, c = t[a]; c; c = t[++a])
738
- if (c === " " && t[a + 1] === "\\" && t[a + 2] === "n" && (o += t.slice(l, a) + "\\ ", a += 1, l = a, c = "\\"), c === "\\")
739
- switch (t[a + 1]) {
740
- case "u":
741
- {
742
- o += t.slice(l, a);
743
- const m = t.substr(a + 2, 4);
744
- switch (m) {
745
- case "0000":
746
- o += "\\0";
747
- break;
748
- case "0007":
749
- o += "\\a";
750
- break;
751
- case "000b":
752
- o += "\\v";
753
- break;
754
- case "001b":
755
- o += "\\e";
756
- break;
757
- case "0085":
758
- o += "\\N";
759
- break;
760
- case "00a0":
761
- o += "\\_";
762
- break;
763
- case "2028":
764
- o += "\\L";
765
- break;
766
- case "2029":
767
- o += "\\P";
768
- break;
769
- default:
770
- m.substr(0, 2) === "00" ? o += "\\x" + m.substr(2) : o += t.substr(a, 6);
771
- }
772
- a += 5, l = a + 1;
773
- }
774
- break;
775
- case "n":
776
- if (n || t[a + 2] === '"' || t.length < i)
777
- a += 1;
778
- else {
779
- for (o += t.slice(l, a) + `
780
-
781
- `; t[a + 2] === "\\" && t[a + 3] === "n" && t[a + 4] !== '"'; )
782
- o += `
783
- `, a += 2;
784
- o += r, t[a + 2] === " " && (o += "\\"), a += 1, l = a + 1;
785
- }
786
- break;
787
- default:
788
- a += 1;
789
- }
790
- return o = l ? o + t.slice(l) : t, n ? o : Ue(o, r, Ce, Fe(e, !1));
791
- }
792
- function lt(s, e) {
793
- if (e.options.singleQuote === !1 || e.implicitKey && s.includes(`
794
- `) || /[ \t]\n|\n[ \t]/.test(s))
795
- return we(s, e);
796
- const t = e.indent || (Re(s) ? " " : ""), n = "'" + s.replace(/'/g, "''").replace(/\n+/g, `$&
797
- ${t}`) + "'";
798
- return e.implicitKey ? n : Ue(n, t, Qt, Fe(e, !1));
799
- }
800
- function re(s, e) {
801
- const { singleQuote: t } = e.options;
802
- let n;
803
- if (t === !1)
804
- n = we;
805
- else {
806
- const i = s.includes('"'), r = s.includes("'");
807
- i && !r ? n = lt : r && !i ? n = we : n = t ? lt : we;
808
- }
809
- return n(s, e);
810
- }
811
- let at;
812
- try {
813
- at = new RegExp(`(^|(?<!
814
- ))
815
- +(?!
816
- |$)`, "g");
817
- } catch {
818
- at = /\n+(?!\n|$)/g;
819
- }
820
- function ve({ comment: s, type: e, value: t }, n, i, r) {
821
- const { blockQuote: o, commentString: l, lineWidth: a } = n.options;
822
- if (!o || /\n[\t ]+$/.test(t) || /^\s*$/.test(t))
823
- return re(t, n);
824
- const c = n.indent || (n.forceBlockIndent || Re(t) ? " " : ""), m = o === "literal" ? !0 : o === "folded" || e === O.BLOCK_FOLDED ? !1 : e === O.BLOCK_LITERAL ? !0 : !Ds(t, a, c.length);
825
- if (!t)
826
- return m ? `|
827
- ` : `>
828
- `;
829
- let f, d;
830
- for (d = t.length; d > 0; --d) {
831
- const k = t[d - 1];
832
- if (k !== `
833
- ` && k !== " " && k !== " ")
834
- break;
835
- }
836
- let h = t.substring(d);
837
- const y = h.indexOf(`
838
- `);
839
- y === -1 ? f = "-" : t === h || y !== h.length - 1 ? (f = "+", r && r()) : f = "", h && (t = t.slice(0, -h.length), h[h.length - 1] === `
840
- ` && (h = h.slice(0, -1)), h = h.replace(at, `$&${c}`));
841
- let u = !1, p, g = -1;
842
- for (p = 0; p < t.length; ++p) {
843
- const k = t[p];
844
- if (k === " ")
845
- u = !0;
846
- else if (k === `
847
- `)
848
- g = p;
849
- else
850
- break;
851
- }
852
- let w = t.substring(0, g < p ? g + 1 : p);
853
- w && (t = t.substring(w.length), w = w.replace(/\n+/g, `$&${c}`));
854
- let S = (m ? "|" : ">") + (u ? c ? "2" : "1" : "") + f;
855
- if (s && (S += " " + l(s.replace(/ ?[\r\n]+/g, " ")), i && i()), m)
856
- return t = t.replace(/\n+/g, `$&${c}`), `${S}
857
- ${c}${w}${t}${h}`;
858
- t = t.replace(/\n+/g, `
859
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${c}`);
860
- const A = Ue(`${w}${t}${h}`, c, ot, Fe(n, !0));
861
- return `${S}
862
- ${c}${A}`;
863
- }
864
- function js(s, e, t, n) {
865
- const { type: i, value: r } = s, { actualString: o, implicitKey: l, indent: a, indentStep: c, inFlow: m } = e;
866
- if (l && r.includes(`
867
- `) || m && /[[\]{},]/.test(r))
868
- return re(r, e);
869
- if (!r || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))
870
- return l || m || !r.includes(`
871
- `) ? re(r, e) : ve(s, e, t, n);
872
- if (!l && !m && i !== O.PLAIN && r.includes(`
873
- `))
874
- return ve(s, e, t, n);
875
- if (Re(r)) {
876
- if (a === "")
877
- return e.forceBlockIndent = !0, ve(s, e, t, n);
878
- if (l && a === c)
879
- return re(r, e);
880
- }
881
- const f = r.replace(/\n+/g, `$&
882
- ${a}`);
883
- if (o) {
884
- const d = (u) => {
885
- var p;
886
- return u.default && u.tag !== "tag:yaml.org,2002:str" && ((p = u.test) == null ? void 0 : p.test(f));
887
- }, { compat: h, tags: y } = e.doc.schema;
888
- if (y.some(d) || h != null && h.some(d))
889
- return re(r, e);
890
- }
891
- return l ? f : Ue(f, a, Qt, Fe(e, !1));
892
- }
893
- function Oe(s, e, t, n) {
894
- const { implicitKey: i, inFlow: r } = e, o = typeof s.value == "string" ? s : Object.assign({}, s, { value: String(s.value) });
895
- let { type: l } = s;
896
- l !== O.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value) && (l = O.QUOTE_DOUBLE);
897
- const a = (m) => {
898
- switch (m) {
899
- case O.BLOCK_FOLDED:
900
- case O.BLOCK_LITERAL:
901
- return i || r ? re(o.value, e) : ve(o, e, t, n);
902
- case O.QUOTE_DOUBLE:
903
- return we(o.value, e);
904
- case O.QUOTE_SINGLE:
905
- return lt(o.value, e);
906
- case O.PLAIN:
907
- return js(o, e, t, n);
908
- default:
909
- return null;
910
- }
911
- };
912
- let c = a(l);
913
- if (c === null) {
914
- const { defaultKeyType: m, defaultStringType: f } = e.options, d = i && m || f;
915
- if (c = a(d), c === null)
916
- throw new Error(`Unsupported default string type ${d}`);
917
- }
918
- return c;
919
- }
920
- function Wt(s, e) {
921
- const t = Object.assign({
922
- blockQuote: !0,
923
- commentString: Ps,
924
- defaultKeyType: null,
925
- defaultStringType: "PLAIN",
926
- directives: null,
927
- doubleQuotedAsJSON: !1,
928
- doubleQuotedMinMultiLineLength: 40,
929
- falseStr: "false",
930
- flowCollectionPadding: !0,
931
- indentSeq: !0,
932
- lineWidth: 80,
933
- minContentWidth: 20,
934
- nullStr: "null",
935
- simpleKeys: !1,
936
- singleQuote: null,
937
- trueStr: "true",
938
- verifyAliasOrder: !0
939
- }, s.schema.toStringOptions, e);
940
- let n;
941
- switch (t.collectionStyle) {
942
- case "block":
943
- n = !1;
944
- break;
945
- case "flow":
946
- n = !0;
947
- break;
948
- default:
949
- n = null;
950
- }
951
- return {
952
- anchors: /* @__PURE__ */ new Set(),
953
- doc: s,
954
- flowCollectionPadding: t.flowCollectionPadding ? " " : "",
955
- indent: "",
956
- indentStep: typeof t.indent == "number" ? " ".repeat(t.indent) : " ",
957
- inFlow: n,
958
- options: t
959
- };
960
- }
961
- function Ks(s, e) {
962
- var i;
963
- if (e.tag) {
964
- const r = s.filter((o) => o.tag === e.tag);
965
- if (r.length > 0)
966
- return r.find((o) => o.format === e.format) ?? r[0];
967
- }
968
- let t, n;
969
- if (E(e)) {
970
- n = e.value;
971
- const r = s.filter((o) => {
972
- var l;
973
- return (l = o.identify) == null ? void 0 : l.call(o, n);
974
- });
975
- t = r.find((o) => o.format === e.format) ?? r.find((o) => !o.format);
976
- } else
977
- n = e, t = s.find((r) => r.nodeClass && n instanceof r.nodeClass);
978
- if (!t) {
979
- const r = ((i = n == null ? void 0 : n.constructor) == null ? void 0 : i.name) ?? typeof n;
980
- throw new Error(`Tag not resolved for ${r} value`);
981
- }
982
- return t;
983
- }
984
- function qs(s, e, { anchors: t, doc: n }) {
985
- if (!n.directives)
986
- return "";
987
- const i = [], r = (E(s) || L(s)) && s.anchor;
988
- r && Rt(r) && (t.add(r), i.push(`&${r}`));
989
- const o = s.tag ? s.tag : e.default ? null : e.tag;
990
- return o && i.push(n.directives.tagString(o)), i.join(" ");
991
- }
992
- function ae(s, e, t, n) {
993
- var a;
994
- if (I(s))
995
- return s.toString(e, t, n);
996
- if (Z(s)) {
997
- if (e.doc.directives)
998
- return s.toString(e);
999
- if ((a = e.resolvedAliases) != null && a.has(s))
1000
- throw new TypeError("Cannot stringify circular structure without alias nodes");
1001
- e.resolvedAliases ? e.resolvedAliases.add(s) : e.resolvedAliases = /* @__PURE__ */ new Set([s]), s = s.resolve(e.doc);
1002
- }
1003
- let i;
1004
- const r = $(s) ? s : e.doc.createNode(s, { onTagObj: (c) => i = c });
1005
- i || (i = Ks(e.doc.schema.tags, r));
1006
- const o = qs(r, i, e);
1007
- o.length > 0 && (e.indentAtStart = (e.indentAtStart ?? 0) + o.length + 1);
1008
- const l = typeof i.stringify == "function" ? i.stringify(r, e, t, n) : E(r) ? Oe(r, e, t, n) : r.toString(e, t, n);
1009
- return o ? E(r) || l[0] === "{" || l[0] === "[" ? `${o} ${l}` : `${o}
1010
- ${e.indent}${l}` : l;
1011
- }
1012
- function Us({ key: s, value: e }, t, n, i) {
1013
- const { allNullValues: r, doc: o, indent: l, indentStep: a, options: { commentString: c, indentSeq: m, simpleKeys: f } } = t;
1014
- let d = $(s) && s.comment || null;
1015
- if (f) {
1016
- if (d)
1017
- throw new Error("With simple keys, key nodes cannot have comments");
1018
- if (L(s) || !$(s) && typeof s == "object") {
1019
- const T = "With simple keys, collection cannot be used as a key value";
1020
- throw new Error(T);
1021
- }
1022
- }
1023
- let h = !f && (!s || d && e == null && !t.inFlow || L(s) || (E(s) ? s.type === O.BLOCK_FOLDED || s.type === O.BLOCK_LITERAL : typeof s == "object"));
1024
- t = Object.assign({}, t, {
1025
- allNullValues: !1,
1026
- implicitKey: !h && (f || !r),
1027
- indent: l + a
1028
- });
1029
- let y = !1, u = !1, p = ae(s, t, () => y = !0, () => u = !0);
1030
- if (!h && !t.inFlow && p.length > 1024) {
1031
- if (f)
1032
- throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
1033
- h = !0;
1034
- }
1035
- if (t.inFlow) {
1036
- if (r || e == null)
1037
- return y && n && n(), p === "" ? "?" : h ? `? ${p}` : p;
1038
- } else if (r && !f || e == null && h)
1039
- return p = `? ${p}`, d && !y ? p += W(p, t.indent, c(d)) : u && i && i(), p;
1040
- y && (d = null), h ? (d && (p += W(p, t.indent, c(d))), p = `? ${p}
1041
- ${l}:`) : (p = `${p}:`, d && (p += W(p, t.indent, c(d))));
1042
- let g, w, N;
1043
- $(e) ? (g = !!e.spaceBefore, w = e.commentBefore, N = e.comment) : (g = !1, w = null, N = null, e && typeof e == "object" && (e = o.createNode(e))), t.implicitKey = !1, !h && !d && E(e) && (t.indentAtStart = p.length + 1), u = !1, !m && a.length >= 2 && !t.inFlow && !h && de(e) && !e.flow && !e.tag && !e.anchor && (t.indent = t.indent.substring(2));
1044
- let S = !1;
1045
- const A = ae(e, t, () => S = !0, () => u = !0);
1046
- let k = " ";
1047
- if (d || g || w) {
1048
- if (k = g ? `
1049
- ` : "", w) {
1050
- const T = c(w);
1051
- k += `
1052
- ${F(T, t.indent)}`;
1053
- }
1054
- A === "" && !t.inFlow ? k === `
1055
- ` && (k = `
1056
-
1057
- `) : k += `
1058
- ${t.indent}`;
1059
- } else if (!h && L(e)) {
1060
- const T = A[0], b = A.indexOf(`
1061
- `), _ = b !== -1, G = t.inFlow ?? e.flow ?? e.items.length === 0;
1062
- if (_ || !G) {
1063
- let x = !1;
1064
- if (_ && (T === "&" || T === "!")) {
1065
- let C = A.indexOf(" ");
1066
- T === "&" && C !== -1 && C < b && A[C + 1] === "!" && (C = A.indexOf(" ", C + 1)), (C === -1 || b < C) && (x = !0);
1067
- }
1068
- x || (k = `
1069
- ${t.indent}`);
1070
- }
1071
- } else (A === "" || A[0] === `
1072
- `) && (k = "");
1073
- return p += k + A, t.inFlow ? S && n && n() : N && !S ? p += W(p, t.indent, c(N)) : u && i && i(), p;
1074
- }
1075
- function Ht(s, e) {
1076
- (s === "debug" || s === "warn") && (typeof process < "u" && process.emitWarning ? process.emitWarning(e) : console.warn(e));
1077
- }
1078
- const Tt = "<<";
1079
- function Xt(s, e, { key: t, value: n }) {
1080
- if (s != null && s.doc.schema.merge && Fs(t))
1081
- if (n = Z(n) ? n.resolve(s.doc) : n, de(n))
1082
- for (const i of n.items)
1083
- Ze(s, e, i);
1084
- else if (Array.isArray(n))
1085
- for (const i of n)
1086
- Ze(s, e, i);
1087
- else
1088
- Ze(s, e, n);
1089
- else {
1090
- const i = D(t, "", s);
1091
- if (e instanceof Map)
1092
- e.set(i, D(n, i, s));
1093
- else if (e instanceof Set)
1094
- e.add(i);
1095
- else {
1096
- const r = Rs(t, i, s), o = D(n, r, s);
1097
- r in e ? Object.defineProperty(e, r, {
1098
- value: o,
1099
- writable: !0,
1100
- enumerable: !0,
1101
- configurable: !0
1102
- }) : e[r] = o;
1103
- }
1104
- }
1105
- return e;
1106
- }
1107
- const Fs = (s) => s === Tt || E(s) && s.value === Tt && (!s.type || s.type === O.PLAIN);
1108
- function Ze(s, e, t) {
1109
- const n = s && Z(t) ? t.resolve(s.doc) : t;
1110
- if (!he(n))
1111
- throw new Error("Merge sources must be maps or map aliases");
1112
- const i = n.toJSON(null, s, Map);
1113
- for (const [r, o] of i)
1114
- e instanceof Map ? e.has(r) || e.set(r, o) : e instanceof Set ? e.add(r) : Object.prototype.hasOwnProperty.call(e, r) || Object.defineProperty(e, r, {
1115
- value: o,
1116
- writable: !0,
1117
- enumerable: !0,
1118
- configurable: !0
1119
- });
1120
- return e;
1121
- }
1122
- function Rs(s, e, t) {
1123
- if (e === null)
1124
- return "";
1125
- if (typeof e != "object")
1126
- return String(e);
1127
- if ($(s) && (t != null && t.doc)) {
1128
- const n = Wt(t.doc, {});
1129
- n.anchors = /* @__PURE__ */ new Set();
1130
- for (const r of t.anchors.keys())
1131
- n.anchors.add(r.anchor);
1132
- n.inFlow = !0, n.inStringifyKey = !0;
1133
- const i = s.toString(n);
1134
- if (!t.mapKeyWarned) {
1135
- let r = JSON.stringify(i);
1136
- r.length > 40 && (r = r.substring(0, 36) + '..."'), Ht(t.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`), t.mapKeyWarned = !0;
1137
- }
1138
- return i;
1139
- }
1140
- return JSON.stringify(e);
1141
- }
1142
- function dt(s, e, t) {
1143
- const n = Se(s, void 0, t), i = Se(e, void 0, t);
1144
- return new v(n, i);
1145
- }
1146
- class v {
1147
- constructor(e, t = null) {
1148
- Object.defineProperty(this, j, { value: jt }), this.key = e, this.value = t;
1149
- }
1150
- clone(e) {
1151
- let { key: t, value: n } = this;
1152
- return $(t) && (t = t.clone(e)), $(n) && (n = n.clone(e)), new v(t, n);
1153
- }
1154
- toJSON(e, t) {
1155
- const n = t != null && t.mapAsMap ? /* @__PURE__ */ new Map() : {};
1156
- return Xt(t, n, this);
1157
- }
1158
- toString(e, t, n) {
1159
- return e != null && e.doc ? Us(this, e, t, n) : JSON.stringify(this);
1160
- }
1161
- }
1162
- function zt(s, e, t) {
1163
- return (e.inFlow ?? s.flow ? Ys : Vs)(s, e, t);
1164
- }
1165
- function Vs({ comment: s, items: e }, t, { blockItemPrefix: n, flowChars: i, itemIndent: r, onChompKeep: o, onComment: l }) {
1166
- const { indent: a, options: { commentString: c } } = t, m = Object.assign({}, t, { indent: r, type: null });
1167
- let f = !1;
1168
- const d = [];
1169
- for (let y = 0; y < e.length; ++y) {
1170
- const u = e[y];
1171
- let p = null;
1172
- if ($(u))
1173
- !f && u.spaceBefore && d.push(""), Pe(t, d, u.commentBefore, f), u.comment && (p = u.comment);
1174
- else if (I(u)) {
1175
- const w = $(u.key) ? u.key : null;
1176
- w && (!f && w.spaceBefore && d.push(""), Pe(t, d, w.commentBefore, f));
1177
- }
1178
- f = !1;
1179
- let g = ae(u, m, () => p = null, () => f = !0);
1180
- p && (g += W(g, r, c(p))), f && p && (f = !1), d.push(n + g);
1181
- }
1182
- let h;
1183
- if (d.length === 0)
1184
- h = i.start + i.end;
1185
- else {
1186
- h = d[0];
1187
- for (let y = 1; y < d.length; ++y) {
1188
- const u = d[y];
1189
- h += u ? `
1190
- ${a}${u}` : `
1191
- `;
1192
- }
1193
- }
1194
- return s ? (h += `
1195
- ` + F(c(s), a), l && l()) : f && o && o(), h;
1196
- }
1197
- function Ys({ items: s }, e, { flowChars: t, itemIndent: n }) {
1198
- const { indent: i, indentStep: r, flowCollectionPadding: o, options: { commentString: l } } = e;
1199
- n += r;
1200
- const a = Object.assign({}, e, {
1201
- indent: n,
1202
- inFlow: !0,
1203
- type: null
1204
- });
1205
- let c = !1, m = 0;
1206
- const f = [];
1207
- for (let y = 0; y < s.length; ++y) {
1208
- const u = s[y];
1209
- let p = null;
1210
- if ($(u))
1211
- u.spaceBefore && f.push(""), Pe(e, f, u.commentBefore, !1), u.comment && (p = u.comment);
1212
- else if (I(u)) {
1213
- const w = $(u.key) ? u.key : null;
1214
- w && (w.spaceBefore && f.push(""), Pe(e, f, w.commentBefore, !1), w.comment && (c = !0));
1215
- const N = $(u.value) ? u.value : null;
1216
- N ? (N.comment && (p = N.comment), N.commentBefore && (c = !0)) : u.value == null && (w != null && w.comment) && (p = w.comment);
1217
- }
1218
- p && (c = !0);
1219
- let g = ae(u, a, () => p = null);
1220
- y < s.length - 1 && (g += ","), p && (g += W(g, n, l(p))), !c && (f.length > m || g.includes(`
1221
- `)) && (c = !0), f.push(g), m = f.length;
1222
- }
1223
- const { start: d, end: h } = t;
1224
- if (f.length === 0)
1225
- return d + h;
1226
- if (!c) {
1227
- const y = f.reduce((u, p) => u + p.length + 2, 2);
1228
- c = e.options.lineWidth > 0 && y > e.options.lineWidth;
1229
- }
1230
- if (c) {
1231
- let y = d;
1232
- for (const u of f)
1233
- y += u ? `
1234
- ${r}${i}${u}` : `
1235
- `;
1236
- return `${y}
1237
- ${i}${h}`;
1238
- } else
1239
- return `${d}${o}${f.join(" ")}${o}${h}`;
1240
- }
1241
- function Pe({ indent: s, options: { commentString: e } }, t, n, i) {
1242
- if (n && i && (n = n.replace(/^\n+/, "")), n) {
1243
- const r = F(e(n), s);
1244
- t.push(r.trimStart());
1245
- }
1246
- }
1247
- function H(s, e) {
1248
- const t = E(e) ? e.value : e;
1249
- for (const n of s)
1250
- if (I(n) && (n.key === e || n.key === t || E(n.key) && n.key.value === t))
1251
- return n;
1252
- }
1253
- class P extends Gt {
1254
- static get tagName() {
1255
- return "tag:yaml.org,2002:map";
1256
- }
1257
- constructor(e) {
1258
- super(V, e), this.items = [];
1259
- }
1260
- /**
1261
- * A generic collection parsing method that can be extended
1262
- * to other node classes that inherit from YAMLMap
1263
- */
1264
- static from(e, t, n) {
1265
- const { keepUndefined: i, replacer: r } = n, o = new this(e), l = (a, c) => {
1266
- if (typeof r == "function")
1267
- c = r.call(t, a, c);
1268
- else if (Array.isArray(r) && !r.includes(a))
1269
- return;
1270
- (c !== void 0 || i) && o.items.push(dt(a, c, n));
1271
- };
1272
- if (t instanceof Map)
1273
- for (const [a, c] of t)
1274
- l(a, c);
1275
- else if (t && typeof t == "object")
1276
- for (const a of Object.keys(t))
1277
- l(a, t[a]);
1278
- return typeof e.sortMapEntries == "function" && o.items.sort(e.sortMapEntries), o;
1279
- }
1280
- /**
1281
- * Adds a value to the collection.
1282
- *
1283
- * @param overwrite - If not set `true`, using a key that is already in the
1284
- * collection will throw. Otherwise, overwrites the previous value.
1285
- */
1286
- add(e, t) {
1287
- var o;
1288
- let n;
1289
- I(e) ? n = e : !e || typeof e != "object" || !("key" in e) ? n = new v(e, e == null ? void 0 : e.value) : n = new v(e.key, e.value);
1290
- const i = H(this.items, n.key), r = (o = this.schema) == null ? void 0 : o.sortMapEntries;
1291
- if (i) {
1292
- if (!t)
1293
- throw new Error(`Key ${n.key} already set`);
1294
- E(i.value) && Jt(n.value) ? i.value.value = n.value : i.value = n.value;
1295
- } else if (r) {
1296
- const l = this.items.findIndex((a) => r(n, a) < 0);
1297
- l === -1 ? this.items.push(n) : this.items.splice(l, 0, n);
1298
- } else
1299
- this.items.push(n);
1300
- }
1301
- delete(e) {
1302
- const t = H(this.items, e);
1303
- return t ? this.items.splice(this.items.indexOf(t), 1).length > 0 : !1;
1304
- }
1305
- get(e, t) {
1306
- const n = H(this.items, e), i = n == null ? void 0 : n.value;
1307
- return (!t && E(i) ? i.value : i) ?? void 0;
1308
- }
1309
- has(e) {
1310
- return !!H(this.items, e);
1311
- }
1312
- set(e, t) {
1313
- this.add(new v(e, t), !0);
1314
- }
1315
- /**
1316
- * @param ctx - Conversion context, originally set in Document#toJS()
1317
- * @param {Class} Type - If set, forces the returned collection type
1318
- * @returns Instance of Type, Map, or Object
1319
- */
1320
- toJSON(e, t, n) {
1321
- const i = n ? new n() : t != null && t.mapAsMap ? /* @__PURE__ */ new Map() : {};
1322
- t != null && t.onCreate && t.onCreate(i);
1323
- for (const r of this.items)
1324
- Xt(t, i, r);
1325
- return i;
1326
- }
1327
- toString(e, t, n) {
1328
- if (!e)
1329
- return JSON.stringify(this);
1330
- for (const i of this.items)
1331
- if (!I(i))
1332
- throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);
1333
- return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), zt(this, e, {
1334
- blockItemPrefix: "",
1335
- flowChars: { start: "{", end: "}" },
1336
- itemIndent: e.indent || "",
1337
- onChompKeep: n,
1338
- onComment: t
1339
- });
1340
- }
1341
- }
1342
- const pe = {
1343
- collection: "map",
1344
- default: !0,
1345
- nodeClass: P,
1346
- tag: "tag:yaml.org,2002:map",
1347
- resolve(s, e) {
1348
- return he(s) || e("Expected a mapping for this tag"), s;
1349
- },
1350
- createNode: (s, e, t) => P.from(s, e, t)
1351
- };
1352
- class J extends Gt {
1353
- static get tagName() {
1354
- return "tag:yaml.org,2002:seq";
1355
- }
1356
- constructor(e) {
1357
- super(fe, e), this.items = [];
1358
- }
1359
- add(e) {
1360
- this.items.push(e);
1361
- }
1362
- /**
1363
- * Removes a value from the collection.
1364
- *
1365
- * `key` must contain a representation of an integer for this to succeed.
1366
- * It may be wrapped in a `Scalar`.
1367
- *
1368
- * @returns `true` if the item was found and removed.
1369
- */
1370
- delete(e) {
1371
- const t = Ie(e);
1372
- return typeof t != "number" ? !1 : this.items.splice(t, 1).length > 0;
1373
- }
1374
- get(e, t) {
1375
- const n = Ie(e);
1376
- if (typeof n != "number")
1377
- return;
1378
- const i = this.items[n];
1379
- return !t && E(i) ? i.value : i;
1380
- }
1381
- /**
1382
- * Checks if the collection includes a value with the key `key`.
1383
- *
1384
- * `key` must contain a representation of an integer for this to succeed.
1385
- * It may be wrapped in a `Scalar`.
1386
- */
1387
- has(e) {
1388
- const t = Ie(e);
1389
- return typeof t == "number" && t < this.items.length;
1390
- }
1391
- /**
1392
- * Sets a value in this collection. For `!!set`, `value` needs to be a
1393
- * boolean to add/remove the item from the set.
1394
- *
1395
- * If `key` does not contain a representation of an integer, this will throw.
1396
- * It may be wrapped in a `Scalar`.
1397
- */
1398
- set(e, t) {
1399
- const n = Ie(e);
1400
- if (typeof n != "number")
1401
- throw new Error(`Expected a valid index, not ${e}.`);
1402
- const i = this.items[n];
1403
- E(i) && Jt(t) ? i.value = t : this.items[n] = t;
1404
- }
1405
- toJSON(e, t) {
1406
- const n = [];
1407
- t != null && t.onCreate && t.onCreate(n);
1408
- let i = 0;
1409
- for (const r of this.items)
1410
- n.push(D(r, String(i++), t));
1411
- return n;
1412
- }
1413
- toString(e, t, n) {
1414
- return e ? zt(this, e, {
1415
- blockItemPrefix: "- ",
1416
- flowChars: { start: "[", end: "]" },
1417
- itemIndent: (e.indent || "") + " ",
1418
- onChompKeep: n,
1419
- onComment: t
1420
- }) : JSON.stringify(this);
1421
- }
1422
- static from(e, t, n) {
1423
- const { replacer: i } = n, r = new this(e);
1424
- if (t && Symbol.iterator in Object(t)) {
1425
- let o = 0;
1426
- for (let l of t) {
1427
- if (typeof i == "function") {
1428
- const a = t instanceof Set ? l : String(o++);
1429
- l = i.call(t, a, l);
1430
- }
1431
- r.items.push(Se(l, void 0, n));
1432
- }
1433
- }
1434
- return r;
1435
- }
1436
- }
1437
- function Ie(s) {
1438
- let e = E(s) ? s.value : s;
1439
- return e && typeof e == "string" && (e = Number(e)), typeof e == "number" && Number.isInteger(e) && e >= 0 ? e : null;
1440
- }
1441
- const me = {
1442
- collection: "seq",
1443
- default: !0,
1444
- nodeClass: J,
1445
- tag: "tag:yaml.org,2002:seq",
1446
- resolve(s, e) {
1447
- return de(s) || e("Expected a sequence for this tag"), s;
1448
- },
1449
- createNode: (s, e, t) => J.from(s, e, t)
1450
- }, Ve = {
1451
- identify: (s) => typeof s == "string",
1452
- default: !0,
1453
- tag: "tag:yaml.org,2002:str",
1454
- resolve: (s) => s,
1455
- stringify(s, e, t, n) {
1456
- return e = Object.assign({ actualString: !0 }, e), Oe(s, e, t, n);
1457
- }
1458
- }, Ye = {
1459
- identify: (s) => s == null,
1460
- createNode: () => new O(null),
1461
- default: !0,
1462
- tag: "tag:yaml.org,2002:null",
1463
- test: /^(?:~|[Nn]ull|NULL)?$/,
1464
- resolve: () => new O(null),
1465
- stringify: ({ source: s }, e) => typeof s == "string" && Ye.test.test(s) ? s : e.options.nullStr
1466
- }, pt = {
1467
- identify: (s) => typeof s == "boolean",
1468
- default: !0,
1469
- tag: "tag:yaml.org,2002:bool",
1470
- test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
1471
- resolve: (s) => new O(s[0] === "t" || s[0] === "T"),
1472
- stringify({ source: s, value: e }, t) {
1473
- if (s && pt.test.test(s)) {
1474
- const n = s[0] === "t" || s[0] === "T";
1475
- if (e === n)
1476
- return s;
1477
- }
1478
- return e ? t.options.trueStr : t.options.falseStr;
1479
- }
1480
- };
1481
- function q({ format: s, minFractionDigits: e, tag: t, value: n }) {
1482
- if (typeof n == "bigint")
1483
- return String(n);
1484
- const i = typeof n == "number" ? n : Number(n);
1485
- if (!isFinite(i))
1486
- return isNaN(i) ? ".nan" : i < 0 ? "-.inf" : ".inf";
1487
- let r = JSON.stringify(n);
1488
- if (!s && e && (!t || t === "tag:yaml.org,2002:float") && /^\d/.test(r)) {
1489
- let o = r.indexOf(".");
1490
- o < 0 && (o = r.length, r += ".");
1491
- let l = e - (r.length - o - 1);
1492
- for (; l-- > 0; )
1493
- r += "0";
1494
- }
1495
- return r;
1496
- }
1497
- const Zt = {
1498
- identify: (s) => typeof s == "number",
1499
- default: !0,
1500
- tag: "tag:yaml.org,2002:float",
1501
- test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
1502
- resolve: (s) => s.slice(-3).toLowerCase() === "nan" ? NaN : s[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
1503
- stringify: q
1504
- }, xt = {
1505
- identify: (s) => typeof s == "number",
1506
- default: !0,
1507
- tag: "tag:yaml.org,2002:float",
1508
- format: "EXP",
1509
- test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,
1510
- resolve: (s) => parseFloat(s),
1511
- stringify(s) {
1512
- const e = Number(s.value);
1513
- return isFinite(e) ? e.toExponential() : q(s);
1514
- }
1515
- }, es = {
1516
- identify: (s) => typeof s == "number",
1517
- default: !0,
1518
- tag: "tag:yaml.org,2002:float",
1519
- test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
1520
- resolve(s) {
1521
- const e = new O(parseFloat(s)), t = s.indexOf(".");
1522
- return t !== -1 && s[s.length - 1] === "0" && (e.minFractionDigits = s.length - t - 1), e;
1523
- },
1524
- stringify: q
1525
- }, Je = (s) => typeof s == "bigint" || Number.isInteger(s), mt = (s, e, t, { intAsBigInt: n }) => n ? BigInt(s) : parseInt(s.substring(e), t);
1526
- function ts(s, e, t) {
1527
- const { value: n } = s;
1528
- return Je(n) && n >= 0 ? t + n.toString(e) : q(s);
1529
- }
1530
- const ss = {
1531
- identify: (s) => Je(s) && s >= 0,
1532
- default: !0,
1533
- tag: "tag:yaml.org,2002:int",
1534
- format: "OCT",
1535
- test: /^0o[0-7]+$/,
1536
- resolve: (s, e, t) => mt(s, 2, 8, t),
1537
- stringify: (s) => ts(s, 8, "0o")
1538
- }, ns = {
1539
- identify: Je,
1540
- default: !0,
1541
- tag: "tag:yaml.org,2002:int",
1542
- test: /^[-+]?[0-9]+$/,
1543
- resolve: (s, e, t) => mt(s, 0, 10, t),
1544
- stringify: q
1545
- }, is = {
1546
- identify: (s) => Je(s) && s >= 0,
1547
- default: !0,
1548
- tag: "tag:yaml.org,2002:int",
1549
- format: "HEX",
1550
- test: /^0x[0-9a-fA-F]+$/,
1551
- resolve: (s, e, t) => mt(s, 2, 16, t),
1552
- stringify: (s) => ts(s, 16, "0x")
1553
- }, Js = [
1554
- pe,
1555
- me,
1556
- Ve,
1557
- Ye,
1558
- pt,
1559
- ss,
1560
- ns,
1561
- is,
1562
- Zt,
1563
- xt,
1564
- es
1565
- ];
1566
- function Lt(s) {
1567
- return typeof s == "bigint" || Number.isInteger(s);
1568
- }
1569
- const Te = ({ value: s }) => JSON.stringify(s), Gs = [
1570
- {
1571
- identify: (s) => typeof s == "string",
1572
- default: !0,
1573
- tag: "tag:yaml.org,2002:str",
1574
- resolve: (s) => s,
1575
- stringify: Te
1576
- },
1577
- {
1578
- identify: (s) => s == null,
1579
- createNode: () => new O(null),
1580
- default: !0,
1581
- tag: "tag:yaml.org,2002:null",
1582
- test: /^null$/,
1583
- resolve: () => null,
1584
- stringify: Te
1585
- },
1586
- {
1587
- identify: (s) => typeof s == "boolean",
1588
- default: !0,
1589
- tag: "tag:yaml.org,2002:bool",
1590
- test: /^true|false$/,
1591
- resolve: (s) => s === "true",
1592
- stringify: Te
1593
- },
1594
- {
1595
- identify: Lt,
1596
- default: !0,
1597
- tag: "tag:yaml.org,2002:int",
1598
- test: /^-?(?:0|[1-9][0-9]*)$/,
1599
- resolve: (s, e, { intAsBigInt: t }) => t ? BigInt(s) : parseInt(s, 10),
1600
- stringify: ({ value: s }) => Lt(s) ? s.toString() : JSON.stringify(s)
1601
- },
1602
- {
1603
- identify: (s) => typeof s == "number",
1604
- default: !0,
1605
- tag: "tag:yaml.org,2002:float",
1606
- test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
1607
- resolve: (s) => parseFloat(s),
1608
- stringify: Te
1609
- }
1610
- ], Qs = {
1611
- default: !0,
1612
- tag: "",
1613
- test: /^/,
1614
- resolve(s, e) {
1615
- return e(`Unresolved plain scalar ${JSON.stringify(s)}`), s;
1616
- }
1617
- }, Ws = [pe, me].concat(Gs, Qs), yt = {
1618
- identify: (s) => s instanceof Uint8Array,
1619
- // Buffer inherits from Uint8Array
1620
- default: !1,
1621
- tag: "tag:yaml.org,2002:binary",
1622
- /**
1623
- * Returns a Buffer in node and an Uint8Array in browsers
1624
- *
1625
- * To use the resulting buffer as an image, you'll want to do something like:
1626
- *
1627
- * const blob = new Blob([buffer], { type: 'image/jpeg' })
1628
- * document.querySelector('#photo').src = URL.createObjectURL(blob)
1629
- */
1630
- resolve(s, e) {
1631
- if (typeof Buffer == "function")
1632
- return Buffer.from(s, "base64");
1633
- if (typeof atob == "function") {
1634
- const t = atob(s.replace(/[\n\r]/g, "")), n = new Uint8Array(t.length);
1635
- for (let i = 0; i < t.length; ++i)
1636
- n[i] = t.charCodeAt(i);
1637
- return n;
1638
- } else
1639
- return e("This environment does not support reading binary tags; either Buffer or atob is required"), s;
1640
- },
1641
- stringify({ comment: s, type: e, value: t }, n, i, r) {
1642
- const o = t;
1643
- let l;
1644
- if (typeof Buffer == "function")
1645
- l = o instanceof Buffer ? o.toString("base64") : Buffer.from(o.buffer).toString("base64");
1646
- else if (typeof btoa == "function") {
1647
- let a = "";
1648
- for (let c = 0; c < o.length; ++c)
1649
- a += String.fromCharCode(o[c]);
1650
- l = btoa(a);
1651
- } else
1652
- throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
1653
- if (e || (e = O.BLOCK_LITERAL), e !== O.QUOTE_DOUBLE) {
1654
- const a = Math.max(n.options.lineWidth - n.indent.length, n.options.minContentWidth), c = Math.ceil(l.length / a), m = new Array(c);
1655
- for (let f = 0, d = 0; f < c; ++f, d += a)
1656
- m[f] = l.substr(d, a);
1657
- l = m.join(e === O.BLOCK_LITERAL ? `
1658
- ` : " ");
1659
- }
1660
- return Oe({ comment: s, type: e, value: l }, n, i, r);
1661
- }
1662
- };
1663
- function rs(s, e) {
1664
- if (de(s))
1665
- for (let t = 0; t < s.items.length; ++t) {
1666
- let n = s.items[t];
1667
- if (!I(n)) {
1668
- if (he(n)) {
1669
- n.items.length > 1 && e("Each pair must have its own sequence indicator");
1670
- const i = n.items[0] || new v(new O(null));
1671
- if (n.commentBefore && (i.key.commentBefore = i.key.commentBefore ? `${n.commentBefore}
1672
- ${i.key.commentBefore}` : n.commentBefore), n.comment) {
1673
- const r = i.value ?? i.key;
1674
- r.comment = r.comment ? `${n.comment}
1675
- ${r.comment}` : n.comment;
1676
- }
1677
- n = i;
1678
- }
1679
- s.items[t] = I(n) ? n : new v(n);
1680
- }
1681
- }
1682
- else
1683
- e("Expected a sequence for this tag");
1684
- return s;
1685
- }
1686
- function os(s, e, t) {
1687
- const { replacer: n } = t, i = new J(s);
1688
- i.tag = "tag:yaml.org,2002:pairs";
1689
- let r = 0;
1690
- if (e && Symbol.iterator in Object(e))
1691
- for (let o of e) {
1692
- typeof n == "function" && (o = n.call(e, String(r++), o));
1693
- let l, a;
1694
- if (Array.isArray(o))
1695
- if (o.length === 2)
1696
- l = o[0], a = o[1];
1697
- else
1698
- throw new TypeError(`Expected [key, value] tuple: ${o}`);
1699
- else if (o && o instanceof Object) {
1700
- const c = Object.keys(o);
1701
- if (c.length === 1)
1702
- l = c[0], a = o[l];
1703
- else
1704
- throw new TypeError(`Expected tuple with one key, not ${c.length} keys`);
1705
- } else
1706
- l = o;
1707
- i.items.push(dt(l, a, t));
1708
- }
1709
- return i;
1710
- }
1711
- const gt = {
1712
- collection: "seq",
1713
- default: !1,
1714
- tag: "tag:yaml.org,2002:pairs",
1715
- resolve: rs,
1716
- createNode: os
1717
- };
1718
- class oe extends J {
1719
- constructor() {
1720
- super(), this.add = P.prototype.add.bind(this), this.delete = P.prototype.delete.bind(this), this.get = P.prototype.get.bind(this), this.has = P.prototype.has.bind(this), this.set = P.prototype.set.bind(this), this.tag = oe.tag;
1721
- }
1722
- /**
1723
- * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
1724
- * but TypeScript won't allow widening the signature of a child method.
1725
- */
1726
- toJSON(e, t) {
1727
- if (!t)
1728
- return super.toJSON(e);
1729
- const n = /* @__PURE__ */ new Map();
1730
- t != null && t.onCreate && t.onCreate(n);
1731
- for (const i of this.items) {
1732
- let r, o;
1733
- if (I(i) ? (r = D(i.key, "", t), o = D(i.value, r, t)) : r = D(i, "", t), n.has(r))
1734
- throw new Error("Ordered maps must not include duplicate keys");
1735
- n.set(r, o);
1736
- }
1737
- return n;
1738
- }
1739
- static from(e, t, n) {
1740
- const i = os(e, t, n), r = new this();
1741
- return r.items = i.items, r;
1742
- }
1743
- }
1744
- oe.tag = "tag:yaml.org,2002:omap";
1745
- const bt = {
1746
- collection: "seq",
1747
- identify: (s) => s instanceof Map,
1748
- nodeClass: oe,
1749
- default: !1,
1750
- tag: "tag:yaml.org,2002:omap",
1751
- resolve(s, e) {
1752
- const t = rs(s, e), n = [];
1753
- for (const { key: i } of t.items)
1754
- E(i) && (n.includes(i.value) ? e(`Ordered maps must not include duplicate keys: ${i.value}`) : n.push(i.value));
1755
- return Object.assign(new oe(), t);
1756
- },
1757
- createNode: (s, e, t) => oe.from(s, e, t)
1758
- };
1759
- function ls({ value: s, source: e }, t) {
1760
- return e && (s ? as : cs).test.test(e) ? e : s ? t.options.trueStr : t.options.falseStr;
1761
- }
1762
- const as = {
1763
- identify: (s) => s === !0,
1764
- default: !0,
1765
- tag: "tag:yaml.org,2002:bool",
1766
- test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
1767
- resolve: () => new O(!0),
1768
- stringify: ls
1769
- }, cs = {
1770
- identify: (s) => s === !1,
1771
- default: !0,
1772
- tag: "tag:yaml.org,2002:bool",
1773
- test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
1774
- resolve: () => new O(!1),
1775
- stringify: ls
1776
- }, Hs = {
1777
- identify: (s) => typeof s == "number",
1778
- default: !0,
1779
- tag: "tag:yaml.org,2002:float",
1780
- test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
1781
- resolve: (s) => s.slice(-3).toLowerCase() === "nan" ? NaN : s[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
1782
- stringify: q
1783
- }, Xs = {
1784
- identify: (s) => typeof s == "number",
1785
- default: !0,
1786
- tag: "tag:yaml.org,2002:float",
1787
- format: "EXP",
1788
- test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,
1789
- resolve: (s) => parseFloat(s.replace(/_/g, "")),
1790
- stringify(s) {
1791
- const e = Number(s.value);
1792
- return isFinite(e) ? e.toExponential() : q(s);
1793
- }
1794
- }, zs = {
1795
- identify: (s) => typeof s == "number",
1796
- default: !0,
1797
- tag: "tag:yaml.org,2002:float",
1798
- test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
1799
- resolve(s) {
1800
- const e = new O(parseFloat(s.replace(/_/g, ""))), t = s.indexOf(".");
1801
- if (t !== -1) {
1802
- const n = s.substring(t + 1).replace(/_/g, "");
1803
- n[n.length - 1] === "0" && (e.minFractionDigits = n.length);
1804
- }
1805
- return e;
1806
- },
1807
- stringify: q
1808
- }, Ae = (s) => typeof s == "bigint" || Number.isInteger(s);
1809
- function Ge(s, e, t, { intAsBigInt: n }) {
1810
- const i = s[0];
1811
- if ((i === "-" || i === "+") && (e += 1), s = s.substring(e).replace(/_/g, ""), n) {
1812
- switch (t) {
1813
- case 2:
1814
- s = `0b${s}`;
1815
- break;
1816
- case 8:
1817
- s = `0o${s}`;
1818
- break;
1819
- case 16:
1820
- s = `0x${s}`;
1821
- break;
1822
- }
1823
- const o = BigInt(s);
1824
- return i === "-" ? BigInt(-1) * o : o;
1825
- }
1826
- const r = parseInt(s, t);
1827
- return i === "-" ? -1 * r : r;
1828
- }
1829
- function wt(s, e, t) {
1830
- const { value: n } = s;
1831
- if (Ae(n)) {
1832
- const i = n.toString(e);
1833
- return n < 0 ? "-" + t + i.substr(1) : t + i;
1834
- }
1835
- return q(s);
1836
- }
1837
- const Zs = {
1838
- identify: Ae,
1839
- default: !0,
1840
- tag: "tag:yaml.org,2002:int",
1841
- format: "BIN",
1842
- test: /^[-+]?0b[0-1_]+$/,
1843
- resolve: (s, e, t) => Ge(s, 2, 2, t),
1844
- stringify: (s) => wt(s, 2, "0b")
1845
- }, xs = {
1846
- identify: Ae,
1847
- default: !0,
1848
- tag: "tag:yaml.org,2002:int",
1849
- format: "OCT",
1850
- test: /^[-+]?0[0-7_]+$/,
1851
- resolve: (s, e, t) => Ge(s, 1, 8, t),
1852
- stringify: (s) => wt(s, 8, "0")
1853
- }, en = {
1854
- identify: Ae,
1855
- default: !0,
1856
- tag: "tag:yaml.org,2002:int",
1857
- test: /^[-+]?[0-9][0-9_]*$/,
1858
- resolve: (s, e, t) => Ge(s, 0, 10, t),
1859
- stringify: q
1860
- }, tn = {
1861
- identify: Ae,
1862
- default: !0,
1863
- tag: "tag:yaml.org,2002:int",
1864
- format: "HEX",
1865
- test: /^[-+]?0x[0-9a-fA-F_]+$/,
1866
- resolve: (s, e, t) => Ge(s, 2, 16, t),
1867
- stringify: (s) => wt(s, 16, "0x")
1868
- };
1869
- class le extends P {
1870
- constructor(e) {
1871
- super(e), this.tag = le.tag;
1872
- }
1873
- add(e) {
1874
- let t;
1875
- I(e) ? t = e : e && typeof e == "object" && "key" in e && "value" in e && e.value === null ? t = new v(e.key, null) : t = new v(e, null), H(this.items, t.key) || this.items.push(t);
1876
- }
1877
- /**
1878
- * If `keepPair` is `true`, returns the Pair matching `key`.
1879
- * Otherwise, returns the value of that Pair's key.
1880
- */
1881
- get(e, t) {
1882
- const n = H(this.items, e);
1883
- return !t && I(n) ? E(n.key) ? n.key.value : n.key : n;
1884
- }
1885
- set(e, t) {
1886
- if (typeof t != "boolean")
1887
- throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);
1888
- const n = H(this.items, e);
1889
- n && !t ? this.items.splice(this.items.indexOf(n), 1) : !n && t && this.items.push(new v(e));
1890
- }
1891
- toJSON(e, t) {
1892
- return super.toJSON(e, t, Set);
1893
- }
1894
- toString(e, t, n) {
1895
- if (!e)
1896
- return JSON.stringify(this);
1897
- if (this.hasAllNullValues(!0))
1898
- return super.toString(Object.assign({}, e, { allNullValues: !0 }), t, n);
1899
- throw new Error("Set items must all have null values");
1900
- }
1901
- static from(e, t, n) {
1902
- const { replacer: i } = n, r = new this(e);
1903
- if (t && Symbol.iterator in Object(t))
1904
- for (let o of t)
1905
- typeof i == "function" && (o = i.call(t, o, o)), r.items.push(dt(o, null, n));
1906
- return r;
1907
- }
1908
- }
1909
- le.tag = "tag:yaml.org,2002:set";
1910
- const St = {
1911
- collection: "map",
1912
- identify: (s) => s instanceof Set,
1913
- nodeClass: le,
1914
- default: !1,
1915
- tag: "tag:yaml.org,2002:set",
1916
- createNode: (s, e, t) => le.from(s, e, t),
1917
- resolve(s, e) {
1918
- if (he(s)) {
1919
- if (s.hasAllNullValues(!0))
1920
- return Object.assign(new le(), s);
1921
- e("Set items must all have null values");
1922
- } else
1923
- e("Expected a mapping for this tag");
1924
- return s;
1925
- }
1926
- };
1927
- function kt(s, e) {
1928
- const t = s[0], n = t === "-" || t === "+" ? s.substring(1) : s, i = (o) => e ? BigInt(o) : Number(o), r = n.replace(/_/g, "").split(":").reduce((o, l) => o * i(60) + i(l), i(0));
1929
- return t === "-" ? i(-1) * r : r;
1930
- }
1931
- function fs(s) {
1932
- let { value: e } = s, t = (o) => o;
1933
- if (typeof e == "bigint")
1934
- t = (o) => BigInt(o);
1935
- else if (isNaN(e) || !isFinite(e))
1936
- return q(s);
1937
- let n = "";
1938
- e < 0 && (n = "-", e *= t(-1));
1939
- const i = t(60), r = [e % i];
1940
- return e < 60 ? r.unshift(0) : (e = (e - r[0]) / i, r.unshift(e % i), e >= 60 && (e = (e - r[0]) / i, r.unshift(e))), n + r.map((o) => String(o).padStart(2, "0")).join(":").replace(/000000\d*$/, "");
1941
- }
1942
- const us = {
1943
- identify: (s) => typeof s == "bigint" || Number.isInteger(s),
1944
- default: !0,
1945
- tag: "tag:yaml.org,2002:int",
1946
- format: "TIME",
1947
- test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
1948
- resolve: (s, e, { intAsBigInt: t }) => kt(s, t),
1949
- stringify: fs
1950
- }, hs = {
1951
- identify: (s) => typeof s == "number",
1952
- default: !0,
1953
- tag: "tag:yaml.org,2002:float",
1954
- format: "TIME",
1955
- test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
1956
- resolve: (s) => kt(s, !1),
1957
- stringify: fs
1958
- }, Qe = {
1959
- identify: (s) => s instanceof Date,
1960
- default: !0,
1961
- tag: "tag:yaml.org,2002:timestamp",
1962
- // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part
1963
- // may be omitted altogether, resulting in a date format. In such a case, the time part is
1964
- // assumed to be 00:00:00Z (start of day, UTC).
1965
- 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})?))?)?$"),
1966
- resolve(s) {
1967
- const e = s.match(Qe.test);
1968
- if (!e)
1969
- throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
1970
- const [, t, n, i, r, o, l] = e.map(Number), a = e[7] ? Number((e[7] + "00").substr(1, 3)) : 0;
1971
- let c = Date.UTC(t, n - 1, i, r || 0, o || 0, l || 0, a);
1972
- const m = e[8];
1973
- if (m && m !== "Z") {
1974
- let f = kt(m, !1);
1975
- Math.abs(f) < 30 && (f *= 60), c -= 6e4 * f;
1976
- }
1977
- return new Date(c);
1978
- },
1979
- stringify: ({ value: s }) => s.toISOString().replace(/((T00:00)?:00)?\.000Z$/, "")
1980
- }, $t = [
1981
- pe,
1982
- me,
1983
- Ve,
1984
- Ye,
1985
- as,
1986
- cs,
1987
- Zs,
1988
- xs,
1989
- en,
1990
- tn,
1991
- Hs,
1992
- Xs,
1993
- zs,
1994
- yt,
1995
- bt,
1996
- gt,
1997
- St,
1998
- us,
1999
- hs,
2000
- Qe
2001
- ], _t = /* @__PURE__ */ new Map([
2002
- ["core", Js],
2003
- ["failsafe", [pe, me, Ve]],
2004
- ["json", Ws],
2005
- ["yaml11", $t],
2006
- ["yaml-1.1", $t]
2007
- ]), Ct = {
2008
- binary: yt,
2009
- bool: pt,
2010
- float: es,
2011
- floatExp: xt,
2012
- floatNaN: Zt,
2013
- floatTime: hs,
2014
- int: ns,
2015
- intHex: is,
2016
- intOct: ss,
2017
- intTime: us,
2018
- map: pe,
2019
- null: Ye,
2020
- omap: bt,
2021
- pairs: gt,
2022
- seq: me,
2023
- set: St,
2024
- timestamp: Qe
2025
- }, sn = {
2026
- "tag:yaml.org,2002:binary": yt,
2027
- "tag:yaml.org,2002:omap": bt,
2028
- "tag:yaml.org,2002:pairs": gt,
2029
- "tag:yaml.org,2002:set": St,
2030
- "tag:yaml.org,2002:timestamp": Qe
2031
- };
2032
- function xe(s, e) {
2033
- let t = _t.get(e);
2034
- if (!t)
2035
- if (Array.isArray(s))
2036
- t = [];
2037
- else {
2038
- const n = Array.from(_t.keys()).filter((i) => i !== "yaml11").map((i) => JSON.stringify(i)).join(", ");
2039
- throw new Error(`Unknown schema "${e}"; use one of ${n} or define customTags array`);
2040
- }
2041
- if (Array.isArray(s))
2042
- for (const n of s)
2043
- t = t.concat(n);
2044
- else typeof s == "function" && (t = s(t.slice()));
2045
- return t.map((n) => {
2046
- if (typeof n != "string")
2047
- return n;
2048
- const i = Ct[n];
2049
- if (i)
2050
- return i;
2051
- const r = Object.keys(Ct).map((o) => JSON.stringify(o)).join(", ");
2052
- throw new Error(`Unknown custom tag "${n}"; use one of ${r}`);
2053
- });
2054
- }
2055
- const nn = (s, e) => s.key < e.key ? -1 : s.key > e.key ? 1 : 0;
2056
- class We {
2057
- constructor({ compat: e, customTags: t, merge: n, resolveKnownTags: i, schema: r, sortMapEntries: o, toStringDefaults: l }) {
2058
- this.compat = Array.isArray(e) ? xe(e, "compat") : e ? xe(null, e) : null, this.merge = !!n, this.name = typeof r == "string" && r || "core", this.knownTags = i ? sn : {}, this.tags = xe(t, this.name), this.toStringOptions = l ?? null, Object.defineProperty(this, V, { value: pe }), Object.defineProperty(this, R, { value: Ve }), Object.defineProperty(this, fe, { value: me }), this.sortMapEntries = typeof o == "function" ? o : o === !0 ? nn : null;
2059
- }
2060
- clone() {
2061
- const e = Object.create(We.prototype, Object.getOwnPropertyDescriptors(this));
2062
- return e.tags = this.tags.slice(), e;
2063
- }
2064
- }
2065
- function rn(s, e) {
2066
- var a;
2067
- const t = [];
2068
- let n = e.directives === !0;
2069
- if (e.directives !== !1 && s.directives) {
2070
- const c = s.directives.toString(s);
2071
- c ? (t.push(c), n = !0) : s.directives.docStart && (n = !0);
2072
- }
2073
- n && t.push("---");
2074
- const i = Wt(s, e), { commentString: r } = i.options;
2075
- if (s.commentBefore) {
2076
- t.length !== 1 && t.unshift("");
2077
- const c = r(s.commentBefore);
2078
- t.unshift(F(c, ""));
2079
- }
2080
- let o = !1, l = null;
2081
- if (s.contents) {
2082
- if ($(s.contents)) {
2083
- if (s.contents.spaceBefore && n && t.push(""), s.contents.commentBefore) {
2084
- const f = r(s.contents.commentBefore);
2085
- t.push(F(f, ""));
2086
- }
2087
- i.forceBlockIndent = !!s.comment, l = s.contents.comment;
2088
- }
2089
- const c = l ? void 0 : () => o = !0;
2090
- let m = ae(s.contents, i, () => l = null, c);
2091
- l && (m += W(m, "", r(l))), (m[0] === "|" || m[0] === ">") && t[t.length - 1] === "---" ? t[t.length - 1] = `--- ${m}` : t.push(m);
2092
- } else
2093
- t.push(ae(s.contents, i));
2094
- if ((a = s.directives) != null && a.docEnd)
2095
- if (s.comment) {
2096
- const c = r(s.comment);
2097
- c.includes(`
2098
- `) ? (t.push("..."), t.push(F(c, ""))) : t.push(`... ${c}`);
2099
- } else
2100
- t.push("...");
2101
- else {
2102
- let c = s.comment;
2103
- c && o && (c = c.replace(/^\n+/, "")), c && ((!o || l) && t[t.length - 1] !== "" && t.push(""), t.push(F(r(c), "")));
2104
- }
2105
- return t.join(`
2106
- `) + `
2107
- `;
2108
- }
2109
- class ye {
2110
- constructor(e, t, n) {
2111
- this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, j, { value: rt });
2112
- let i = null;
2113
- typeof t == "function" || Array.isArray(t) ? i = t : n === void 0 && t && (n = t, t = void 0);
2114
- const r = Object.assign({
2115
- intAsBigInt: !1,
2116
- keepSourceTokens: !1,
2117
- logLevel: "warn",
2118
- prettyErrors: !0,
2119
- strict: !0,
2120
- uniqueKeys: !0,
2121
- version: "1.2"
2122
- }, n);
2123
- this.options = r;
2124
- let { version: o } = r;
2125
- n != null && n._directives ? (this.directives = n._directives.atDocument(), this.directives.yaml.explicit && (o = this.directives.yaml.version)) : this.directives = new B({ version: o }), this.setSchema(o, n), this.contents = e === void 0 ? null : this.createNode(e, i, n);
2126
- }
2127
- /**
2128
- * Create a deep copy of this Document and its contents.
2129
- *
2130
- * Custom Node values that inherit from `Object` still refer to their original instances.
2131
- */
2132
- clone() {
2133
- const e = Object.create(ye.prototype, {
2134
- [j]: { value: rt }
2135
- });
2136
- return e.commentBefore = this.commentBefore, e.comment = this.comment, e.errors = this.errors.slice(), e.warnings = this.warnings.slice(), e.options = Object.assign({}, this.options), this.directives && (e.directives = this.directives.clone()), e.schema = this.schema.clone(), e.contents = $(this.contents) ? this.contents.clone(e.schema) : this.contents, this.range && (e.range = this.range.slice()), e;
2137
- }
2138
- /** Adds a value to the document. */
2139
- add(e) {
2140
- ee(this.contents) && this.contents.add(e);
2141
- }
2142
- /** Adds a value to the document. */
2143
- addIn(e, t) {
2144
- ee(this.contents) && this.contents.addIn(e, t);
2145
- }
2146
- /**
2147
- * Create a new `Alias` node, ensuring that the target `node` has the required anchor.
2148
- *
2149
- * If `node` already has an anchor, `name` is ignored.
2150
- * Otherwise, the `node.anchor` value will be set to `name`,
2151
- * or if an anchor with that name is already present in the document,
2152
- * `name` will be used as a prefix for a new unique anchor.
2153
- * If `name` is undefined, the generated anchor will use 'a' as a prefix.
2154
- */
2155
- createAlias(e, t) {
2156
- if (!e.anchor) {
2157
- const n = Vt(this);
2158
- e.anchor = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
2159
- !t || n.has(t) ? Yt(t || "a", n) : t;
2160
- }
2161
- return new qe(e.anchor);
2162
- }
2163
- createNode(e, t, n) {
2164
- let i;
2165
- if (typeof t == "function")
2166
- e = t.call({ "": e }, "", e), i = t;
2167
- else if (Array.isArray(t)) {
2168
- const p = (w) => typeof w == "number" || w instanceof String || w instanceof Number, g = t.filter(p).map(String);
2169
- g.length > 0 && (t = t.concat(g)), i = t;
2170
- } else n === void 0 && t && (n = t, t = void 0);
2171
- const { aliasDuplicateObjects: r, anchorPrefix: o, flow: l, keepUndefined: a, onTagObj: c, tag: m } = n ?? {}, { onAnchor: f, setAnchors: d, sourceObjects: h } = vs(
2172
- this,
2173
- // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
2174
- o || "a"
2175
- ), y = {
2176
- aliasDuplicateObjects: r ?? !0,
2177
- keepUndefined: a ?? !1,
2178
- onAnchor: f,
2179
- onTagObj: c,
2180
- replacer: i,
2181
- schema: this.schema,
2182
- sourceObjects: h
2183
- }, u = Se(e, m, y);
2184
- return l && L(u) && (u.flow = !0), d(), u;
2185
- }
2186
- /**
2187
- * Convert a key and a value into a `Pair` using the current schema,
2188
- * recursively wrapping all values as `Scalar` or `Collection` nodes.
2189
- */
2190
- createPair(e, t, n = {}) {
2191
- const i = this.createNode(e, null, n), r = this.createNode(t, null, n);
2192
- return new v(i, r);
2193
- }
2194
- /**
2195
- * Removes a value from the document.
2196
- * @returns `true` if the item was found and removed.
2197
- */
2198
- delete(e) {
2199
- return ee(this.contents) ? this.contents.delete(e) : !1;
2200
- }
2201
- /**
2202
- * Removes a value from the document.
2203
- * @returns `true` if the item was found and removed.
2204
- */
2205
- deleteIn(e) {
2206
- return be(e) ? this.contents == null ? !1 : (this.contents = null, !0) : ee(this.contents) ? this.contents.deleteIn(e) : !1;
2207
- }
2208
- /**
2209
- * Returns item at `key`, or `undefined` if not found. By default unwraps
2210
- * scalar values from their surrounding node; to disable set `keepScalar` to
2211
- * `true` (collections are always returned intact).
2212
- */
2213
- get(e, t) {
2214
- return L(this.contents) ? this.contents.get(e, t) : void 0;
2215
- }
2216
- /**
2217
- * Returns item at `path`, or `undefined` if not found. By default unwraps
2218
- * scalar values from their surrounding node; to disable set `keepScalar` to
2219
- * `true` (collections are always returned intact).
2220
- */
2221
- getIn(e, t) {
2222
- return be(e) ? !t && E(this.contents) ? this.contents.value : this.contents : L(this.contents) ? this.contents.getIn(e, t) : void 0;
2223
- }
2224
- /**
2225
- * Checks if the document includes a value with the key `key`.
2226
- */
2227
- has(e) {
2228
- return L(this.contents) ? this.contents.has(e) : !1;
2229
- }
2230
- /**
2231
- * Checks if the document includes a value at `path`.
2232
- */
2233
- hasIn(e) {
2234
- return be(e) ? this.contents !== void 0 : L(this.contents) ? this.contents.hasIn(e) : !1;
2235
- }
2236
- /**
2237
- * Sets a value in this document. For `!!set`, `value` needs to be a
2238
- * boolean to add/remove the item from the set.
2239
- */
2240
- set(e, t) {
2241
- this.contents == null ? this.contents = Me(this.schema, [e], t) : ee(this.contents) && this.contents.set(e, t);
2242
- }
2243
- /**
2244
- * Sets a value in this document. For `!!set`, `value` needs to be a
2245
- * boolean to add/remove the item from the set.
2246
- */
2247
- setIn(e, t) {
2248
- be(e) ? this.contents = t : this.contents == null ? this.contents = Me(this.schema, Array.from(e), t) : ee(this.contents) && this.contents.setIn(e, t);
2249
- }
2250
- /**
2251
- * Change the YAML version and schema used by the document.
2252
- * A `null` version disables support for directives, explicit tags, anchors, and aliases.
2253
- * It also requires the `schema` option to be given as a `Schema` instance value.
2254
- *
2255
- * Overrides all previously set schema options.
2256
- */
2257
- setSchema(e, t = {}) {
2258
- typeof e == "number" && (e = String(e));
2259
- let n;
2260
- switch (e) {
2261
- case "1.1":
2262
- this.directives ? this.directives.yaml.version = "1.1" : this.directives = new B({ version: "1.1" }), n = { merge: !0, resolveKnownTags: !1, schema: "yaml-1.1" };
2263
- break;
2264
- case "1.2":
2265
- case "next":
2266
- this.directives ? this.directives.yaml.version = e : this.directives = new B({ version: e }), n = { merge: !1, resolveKnownTags: !0, schema: "core" };
2267
- break;
2268
- case null:
2269
- this.directives && delete this.directives, n = null;
2270
- break;
2271
- default: {
2272
- const i = JSON.stringify(e);
2273
- throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`);
2274
- }
2275
- }
2276
- if (t.schema instanceof Object)
2277
- this.schema = t.schema;
2278
- else if (n)
2279
- this.schema = new We(Object.assign(n, t));
2280
- else
2281
- throw new Error("With a null YAML version, the { schema: Schema } option is required");
2282
- }
2283
- // json & jsonArg are only used from toJSON()
2284
- toJS({ json: e, jsonArg: t, mapAsMap: n, maxAliasCount: i, onAnchor: r, reviver: o } = {}) {
2285
- const l = {
2286
- anchors: /* @__PURE__ */ new Map(),
2287
- doc: this,
2288
- keep: !e,
2289
- mapAsMap: n === !0,
2290
- mapKeyWarned: !1,
2291
- maxAliasCount: typeof i == "number" ? i : 100
2292
- }, a = D(this.contents, t ?? "", l);
2293
- if (typeof r == "function")
2294
- for (const { count: c, res: m } of l.anchors.values())
2295
- r(m, c);
2296
- return typeof o == "function" ? ie(o, { "": a }, "", a) : a;
2297
- }
2298
- /**
2299
- * A JSON representation of the document `contents`.
2300
- *
2301
- * @param jsonArg Used by `JSON.stringify` to indicate the array index or
2302
- * property name.
2303
- */
2304
- toJSON(e, t) {
2305
- return this.toJS({ json: !0, jsonArg: e, mapAsMap: !1, onAnchor: t });
2306
- }
2307
- /** A YAML representation of the document. */
2308
- toString(e = {}) {
2309
- if (this.errors.length > 0)
2310
- throw new Error("Document with errors cannot be stringified");
2311
- if ("indent" in e && (!Number.isInteger(e.indent) || Number(e.indent) <= 0)) {
2312
- const t = JSON.stringify(e.indent);
2313
- throw new Error(`"indent" option must be a positive integer, not ${t}`);
2314
- }
2315
- return rn(this, e);
2316
- }
2317
- }
2318
- function ee(s) {
2319
- if (L(s))
2320
- return !0;
2321
- throw new Error("Expected a YAML collection as document contents");
2322
- }
2323
- class Nt extends Error {
2324
- constructor(e, t, n, i) {
2325
- super(), this.name = e, this.code = n, this.message = i, this.pos = t;
2326
- }
2327
- }
2328
- class X extends Nt {
2329
- constructor(e, t, n) {
2330
- super("YAMLParseError", e, t, n);
2331
- }
2332
- }
2333
- class ds extends Nt {
2334
- constructor(e, t, n) {
2335
- super("YAMLWarning", e, t, n);
2336
- }
2337
- }
2338
- const De = (s, e) => (t) => {
2339
- if (t.pos[0] === -1)
2340
- return;
2341
- t.linePos = t.pos.map((l) => e.linePos(l));
2342
- const { line: n, col: i } = t.linePos[0];
2343
- t.message += ` at line ${n}, column ${i}`;
2344
- let r = i - 1, o = s.substring(e.lineStarts[n - 1], e.lineStarts[n]).replace(/[\n\r]+$/, "");
2345
- if (r >= 60 && o.length > 80) {
2346
- const l = Math.min(r - 39, o.length - 79);
2347
- o = "…" + o.substring(l), r -= l - 1;
2348
- }
2349
- if (o.length > 80 && (o = o.substring(0, 79) + "…"), n > 1 && /^ *$/.test(o.substring(0, r))) {
2350
- let l = s.substring(e.lineStarts[n - 2], e.lineStarts[n - 1]);
2351
- l.length > 80 && (l = l.substring(0, 79) + `…
2352
- `), o = l + o;
2353
- }
2354
- if (/[^ ]/.test(o)) {
2355
- let l = 1;
2356
- const a = t.linePos[1];
2357
- a && a.line === n && a.col > i && (l = Math.max(1, Math.min(a.col - i, 80 - r)));
2358
- const c = " ".repeat(r) + "^".repeat(l);
2359
- t.message += `:
2360
-
2361
- ${o}
2362
- ${c}
2363
- `;
2364
- }
2365
- };
2366
- function ce(s, { flow: e, indicator: t, next: n, offset: i, onError: r, parentIndent: o, startOnNewline: l }) {
2367
- let a = !1, c = l, m = l, f = "", d = "", h = !1, y = !1, u = null, p = null, g = null, w = null, N = null, S = null, A = null;
2368
- for (const b of s)
2369
- switch (y && (b.type !== "space" && b.type !== "newline" && b.type !== "comma" && r(b.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), y = !1), u && (c && b.type !== "comment" && b.type !== "newline" && r(u, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), u = null), b.type) {
2370
- case "space":
2371
- !e && (t !== "doc-start" || (n == null ? void 0 : n.type) !== "flow-collection") && b.source.includes(" ") && (u = b), m = !0;
2372
- break;
2373
- case "comment": {
2374
- m || r(b, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
2375
- const _ = b.source.substring(1) || " ";
2376
- f ? f += d + _ : f = _, d = "", c = !1;
2377
- break;
2378
- }
2379
- case "newline":
2380
- c ? f ? f += b.source : a = !0 : d += b.source, c = !0, h = !0, (p || g) && (w = b), m = !0;
2381
- break;
2382
- case "anchor":
2383
- p && r(b, "MULTIPLE_ANCHORS", "A node can have at most one anchor"), b.source.endsWith(":") && r(b.offset + b.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", !0), p = b, A === null && (A = b.offset), c = !1, m = !1, y = !0;
2384
- break;
2385
- case "tag": {
2386
- g && r(b, "MULTIPLE_TAGS", "A node can have at most one tag"), g = b, A === null && (A = b.offset), c = !1, m = !1, y = !0;
2387
- break;
2388
- }
2389
- case t:
2390
- (p || g) && r(b, "BAD_PROP_ORDER", `Anchors and tags must be after the ${b.source} indicator`), S && r(b, "UNEXPECTED_TOKEN", `Unexpected ${b.source} in ${e ?? "collection"}`), S = b, c = t === "seq-item-ind" || t === "explicit-key-ind", m = !1;
2391
- break;
2392
- case "comma":
2393
- if (e) {
2394
- N && r(b, "UNEXPECTED_TOKEN", `Unexpected , in ${e}`), N = b, c = !1, m = !1;
2395
- break;
2396
- }
2397
- default:
2398
- r(b, "UNEXPECTED_TOKEN", `Unexpected ${b.type} token`), c = !1, m = !1;
2399
- }
2400
- const k = s[s.length - 1], T = k ? k.offset + k.source.length : i;
2401
- return y && n && n.type !== "space" && n.type !== "newline" && n.type !== "comma" && (n.type !== "scalar" || n.source !== "") && r(n.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), u && (c && u.indent <= o || (n == null ? void 0 : n.type) === "block-map" || (n == null ? void 0 : n.type) === "block-seq") && r(u, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), {
2402
- comma: N,
2403
- found: S,
2404
- spaceBefore: a,
2405
- comment: f,
2406
- hasNewline: h,
2407
- anchor: p,
2408
- tag: g,
2409
- newlineAfterProp: w,
2410
- end: T,
2411
- start: A ?? T
2412
- };
2413
- }
2414
- function ke(s) {
2415
- if (!s)
2416
- return null;
2417
- switch (s.type) {
2418
- case "alias":
2419
- case "scalar":
2420
- case "double-quoted-scalar":
2421
- case "single-quoted-scalar":
2422
- if (s.source.includes(`
2423
- `))
2424
- return !0;
2425
- if (s.end) {
2426
- for (const e of s.end)
2427
- if (e.type === "newline")
2428
- return !0;
2429
- }
2430
- return !1;
2431
- case "flow-collection":
2432
- for (const e of s.items) {
2433
- for (const t of e.start)
2434
- if (t.type === "newline")
2435
- return !0;
2436
- if (e.sep) {
2437
- for (const t of e.sep)
2438
- if (t.type === "newline")
2439
- return !0;
2440
- }
2441
- if (ke(e.key) || ke(e.value))
2442
- return !0;
2443
- }
2444
- return !1;
2445
- default:
2446
- return !0;
2447
- }
2448
- }
2449
- function ct(s, e, t) {
2450
- if ((e == null ? void 0 : e.type) === "flow-collection") {
2451
- const n = e.end[0];
2452
- n.indent === s && (n.source === "]" || n.source === "}") && ke(e) && t(n, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
2453
- }
2454
- }
2455
- function ps(s, e, t) {
2456
- const { uniqueKeys: n } = s.options;
2457
- if (n === !1)
2458
- return !1;
2459
- const i = typeof n == "function" ? n : (r, o) => r === o || E(r) && E(o) && r.value === o.value && !(r.value === "<<" && s.schema.merge);
2460
- return e.some((r) => i(r.key, t));
2461
- }
2462
- const vt = "All mapping items must start at the same column";
2463
- function on({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2464
- var m;
2465
- const o = (r == null ? void 0 : r.nodeClass) ?? P, l = new o(t.schema);
2466
- t.atRoot && (t.atRoot = !1);
2467
- let a = n.offset, c = null;
2468
- for (const f of n.items) {
2469
- const { start: d, key: h, sep: y, value: u } = f, p = ce(d, {
2470
- indicator: "explicit-key-ind",
2471
- next: h ?? (y == null ? void 0 : y[0]),
2472
- offset: a,
2473
- onError: i,
2474
- parentIndent: n.indent,
2475
- startOnNewline: !0
2476
- }), g = !p.found;
2477
- if (g) {
2478
- if (h && (h.type === "block-seq" ? i(a, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in h && h.indent !== n.indent && i(a, "BAD_INDENT", vt)), !p.anchor && !p.tag && !y) {
2479
- c = p.end, p.comment && (l.comment ? l.comment += `
2480
- ` + p.comment : l.comment = p.comment);
2481
- continue;
2482
- }
2483
- (p.newlineAfterProp || ke(h)) && i(h ?? d[d.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
2484
- } else ((m = p.found) == null ? void 0 : m.indent) !== n.indent && i(a, "BAD_INDENT", vt);
2485
- const w = p.end, N = h ? s(t, h, p, i) : e(t, w, d, null, p, i);
2486
- t.schema.compat && ct(n.indent, h, i), ps(t, l.items, N) && i(w, "DUPLICATE_KEY", "Map keys must be unique");
2487
- const S = ce(y ?? [], {
2488
- indicator: "map-value-ind",
2489
- next: u,
2490
- offset: N.range[2],
2491
- onError: i,
2492
- parentIndent: n.indent,
2493
- startOnNewline: !h || h.type === "block-scalar"
2494
- });
2495
- if (a = S.end, S.found) {
2496
- g && ((u == null ? void 0 : u.type) === "block-map" && !S.hasNewline && i(a, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), t.options.strict && p.start < S.found.offset - 1024 && i(N.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
2497
- const A = u ? s(t, u, S, i) : e(t, a, y, null, S, i);
2498
- t.schema.compat && ct(n.indent, u, i), a = A.range[2];
2499
- const k = new v(N, A);
2500
- t.options.keepSourceTokens && (k.srcToken = f), l.items.push(k);
2501
- } else {
2502
- g && i(N.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"), S.comment && (N.comment ? N.comment += `
2503
- ` + S.comment : N.comment = S.comment);
2504
- const A = new v(N);
2505
- t.options.keepSourceTokens && (A.srcToken = f), l.items.push(A);
2506
- }
2507
- }
2508
- return c && c < a && i(c, "IMPOSSIBLE", "Map comment with trailing content"), l.range = [n.offset, a, c ?? a], l;
2509
- }
2510
- function ln({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2511
- const o = (r == null ? void 0 : r.nodeClass) ?? J, l = new o(t.schema);
2512
- t.atRoot && (t.atRoot = !1);
2513
- let a = n.offset, c = null;
2514
- for (const { start: m, value: f } of n.items) {
2515
- const d = ce(m, {
2516
- indicator: "seq-item-ind",
2517
- next: f,
2518
- offset: a,
2519
- onError: i,
2520
- parentIndent: n.indent,
2521
- startOnNewline: !0
2522
- });
2523
- if (!d.found)
2524
- if (d.anchor || d.tag || f)
2525
- f && f.type === "block-seq" ? i(d.end, "BAD_INDENT", "All sequence items must start at the same column") : i(a, "MISSING_CHAR", "Sequence item without - indicator");
2526
- else {
2527
- c = d.end, d.comment && (l.comment = d.comment);
2528
- continue;
2529
- }
2530
- const h = f ? s(t, f, d, i) : e(t, d.end, m, null, d, i);
2531
- t.schema.compat && ct(n.indent, f, i), a = h.range[2], l.items.push(h);
2532
- }
2533
- return l.range = [n.offset, a, c ?? a], l;
2534
- }
2535
- function Ee(s, e, t, n) {
2536
- let i = "";
2537
- if (s) {
2538
- let r = !1, o = "";
2539
- for (const l of s) {
2540
- const { source: a, type: c } = l;
2541
- switch (c) {
2542
- case "space":
2543
- r = !0;
2544
- break;
2545
- case "comment": {
2546
- t && !r && n(l, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
2547
- const m = a.substring(1) || " ";
2548
- i ? i += o + m : i = m, o = "";
2549
- break;
2550
- }
2551
- case "newline":
2552
- i && (o += a), r = !0;
2553
- break;
2554
- default:
2555
- n(l, "UNEXPECTED_TOKEN", `Unexpected ${c} at node end`);
2556
- }
2557
- e += a.length;
2558
- }
2559
- }
2560
- return { comment: i, offset: e };
2561
- }
2562
- const et = "Block collections are not allowed within flow collections", tt = (s) => s && (s.type === "block-map" || s.type === "block-seq");
2563
- function an({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2564
- const o = n.start.source === "{", l = o ? "flow map" : "flow sequence", a = (r == null ? void 0 : r.nodeClass) ?? (o ? P : J), c = new a(t.schema);
2565
- c.flow = !0;
2566
- const m = t.atRoot;
2567
- m && (t.atRoot = !1);
2568
- let f = n.offset + n.start.source.length;
2569
- for (let p = 0; p < n.items.length; ++p) {
2570
- const g = n.items[p], { start: w, key: N, sep: S, value: A } = g, k = ce(w, {
2571
- flow: l,
2572
- indicator: "explicit-key-ind",
2573
- next: N ?? (S == null ? void 0 : S[0]),
2574
- offset: f,
2575
- onError: i,
2576
- parentIndent: n.indent,
2577
- startOnNewline: !1
2578
- });
2579
- if (!k.found) {
2580
- if (!k.anchor && !k.tag && !S && !A) {
2581
- p === 0 && k.comma ? i(k.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${l}`) : p < n.items.length - 1 && i(k.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${l}`), k.comment && (c.comment ? c.comment += `
2582
- ` + k.comment : c.comment = k.comment), f = k.end;
2583
- continue;
2584
- }
2585
- !o && t.options.strict && ke(N) && i(
2586
- N,
2587
- // checked by containsNewline()
2588
- "MULTILINE_IMPLICIT_KEY",
2589
- "Implicit keys of flow sequence pairs need to be on a single line"
2590
- );
2591
- }
2592
- if (p === 0)
2593
- k.comma && i(k.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${l}`);
2594
- else if (k.comma || i(k.start, "MISSING_CHAR", `Missing , between ${l} items`), k.comment) {
2595
- let T = "";
2596
- e: for (const b of w)
2597
- switch (b.type) {
2598
- case "comma":
2599
- case "space":
2600
- break;
2601
- case "comment":
2602
- T = b.source.substring(1);
2603
- break e;
2604
- default:
2605
- break e;
2606
- }
2607
- if (T) {
2608
- let b = c.items[c.items.length - 1];
2609
- I(b) && (b = b.value ?? b.key), b.comment ? b.comment += `
2610
- ` + T : b.comment = T, k.comment = k.comment.substring(T.length + 1);
2611
- }
2612
- }
2613
- if (!o && !S && !k.found) {
2614
- const T = A ? s(t, A, k, i) : e(t, k.end, S, null, k, i);
2615
- c.items.push(T), f = T.range[2], tt(A) && i(T.range, "BLOCK_IN_FLOW", et);
2616
- } else {
2617
- const T = k.end, b = N ? s(t, N, k, i) : e(t, T, w, null, k, i);
2618
- tt(N) && i(b.range, "BLOCK_IN_FLOW", et);
2619
- const _ = ce(S ?? [], {
2620
- flow: l,
2621
- indicator: "map-value-ind",
2622
- next: A,
2623
- offset: b.range[2],
2624
- onError: i,
2625
- parentIndent: n.indent,
2626
- startOnNewline: !1
2627
- });
2628
- if (_.found) {
2629
- if (!o && !k.found && t.options.strict) {
2630
- if (S)
2631
- for (const C of S) {
2632
- if (C === _.found)
2633
- break;
2634
- if (C.type === "newline") {
2635
- i(C, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
2636
- break;
2637
- }
2638
- }
2639
- k.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");
2640
- }
2641
- } else A && ("source" in A && A.source && A.source[0] === ":" ? i(A, "MISSING_CHAR", `Missing space after : in ${l}`) : i(_.start, "MISSING_CHAR", `Missing , or : between ${l} items`));
2642
- const G = A ? s(t, A, _, i) : _.found ? e(t, _.end, S, null, _, i) : null;
2643
- G ? tt(A) && i(G.range, "BLOCK_IN_FLOW", et) : _.comment && (b.comment ? b.comment += `
2644
- ` + _.comment : b.comment = _.comment);
2645
- const x = new v(b, G);
2646
- if (t.options.keepSourceTokens && (x.srcToken = g), o) {
2647
- const C = c;
2648
- ps(t, C.items, b) && i(T, "DUPLICATE_KEY", "Map keys must be unique"), C.items.push(x);
2649
- } else {
2650
- const C = new P(t.schema);
2651
- C.flow = !0, C.items.push(x), c.items.push(C);
2652
- }
2653
- f = G ? G.range[2] : _.end;
2654
- }
2655
- }
2656
- const d = o ? "}" : "]", [h, ...y] = n.end;
2657
- let u = f;
2658
- if (h && h.source === d)
2659
- u = h.offset + h.source.length;
2660
- else {
2661
- const p = l[0].toUpperCase() + l.substring(1), g = m ? `${p} must end with a ${d}` : `${p} in block collection must be sufficiently indented and end with a ${d}`;
2662
- i(f, m ? "MISSING_CHAR" : "BAD_INDENT", g), h && h.source.length !== 1 && y.unshift(h);
2663
- }
2664
- if (y.length > 0) {
2665
- const p = Ee(y, u, t.options.strict, i);
2666
- p.comment && (c.comment ? c.comment += `
2667
- ` + p.comment : c.comment = p.comment), c.range = [n.offset, u, p.offset];
2668
- } else
2669
- c.range = [n.offset, u, u];
2670
- return c;
2671
- }
2672
- function st(s, e, t, n, i, r) {
2673
- const o = t.type === "block-map" ? on(s, e, t, n, r) : t.type === "block-seq" ? ln(s, e, t, n, r) : an(s, e, t, n, r), l = o.constructor;
2674
- return i === "!" || i === l.tagName ? (o.tag = l.tagName, o) : (i && (o.tag = i), o);
2675
- }
2676
- function cn(s, e, t, n, i) {
2677
- var d;
2678
- const r = n.tag, o = r ? e.directives.tagName(r.source, (h) => i(r, "TAG_RESOLVE_FAILED", h)) : null;
2679
- if (t.type === "block-seq") {
2680
- const { anchor: h, newlineAfterProp: y } = n, u = h && r ? h.offset > r.offset ? h : r : h ?? r;
2681
- u && (!y || y.offset < u.offset) && i(u, "MISSING_CHAR", "Missing newline after block sequence props");
2682
- }
2683
- const l = t.type === "block-map" ? "map" : t.type === "block-seq" ? "seq" : t.start.source === "{" ? "map" : "seq";
2684
- if (!r || !o || o === "!" || o === P.tagName && l === "map" || o === J.tagName && l === "seq")
2685
- return st(s, e, t, i, o);
2686
- let a = e.schema.tags.find((h) => h.tag === o && h.collection === l);
2687
- if (!a) {
2688
- const h = e.schema.knownTags[o];
2689
- if (h && h.collection === l)
2690
- e.schema.tags.push(Object.assign({}, h, { default: !1 })), a = h;
2691
- else
2692
- return h != null && h.collection ? i(r, "BAD_COLLECTION_TYPE", `${h.tag} used for ${l} collection, but expects ${h.collection}`, !0) : i(r, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0), st(s, e, t, i, o);
2693
- }
2694
- const c = st(s, e, t, i, o, a), m = ((d = a.resolve) == null ? void 0 : d.call(a, c, (h) => i(r, "TAG_RESOLVE_FAILED", h), e.options)) ?? c, f = $(m) ? m : new O(m);
2695
- return f.range = c.range, f.tag = o, a != null && a.format && (f.format = a.format), f;
2696
- }
2697
- function ms(s, e, t) {
2698
- const n = e.offset, i = fn(e, s.options.strict, t);
2699
- if (!i)
2700
- return { value: "", type: null, comment: "", range: [n, n, n] };
2701
- const r = i.mode === ">" ? O.BLOCK_FOLDED : O.BLOCK_LITERAL, o = e.source ? un(e.source) : [];
2702
- let l = o.length;
2703
- for (let u = o.length - 1; u >= 0; --u) {
2704
- const p = o[u][1];
2705
- if (p === "" || p === "\r")
2706
- l = u;
2707
- else
2708
- break;
2709
- }
2710
- if (l === 0) {
2711
- const u = i.chomp === "+" && o.length > 0 ? `
2712
- `.repeat(Math.max(1, o.length - 1)) : "";
2713
- let p = n + i.length;
2714
- return e.source && (p += e.source.length), { value: u, type: r, comment: i.comment, range: [n, p, p] };
2715
- }
2716
- let a = e.indent + i.indent, c = e.offset + i.length, m = 0;
2717
- for (let u = 0; u < l; ++u) {
2718
- const [p, g] = o[u];
2719
- if (g === "" || g === "\r")
2720
- i.indent === 0 && p.length > a && (a = p.length);
2721
- else {
2722
- p.length < a && t(c + p.length, "MISSING_CHAR", "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"), i.indent === 0 && (a = p.length), m = u, a === 0 && !s.atRoot && t(c, "BAD_INDENT", "Block scalar values in collections must be indented");
2723
- break;
2724
- }
2725
- c += p.length + g.length + 1;
2726
- }
2727
- for (let u = o.length - 1; u >= l; --u)
2728
- o[u][0].length > a && (l = u + 1);
2729
- let f = "", d = "", h = !1;
2730
- for (let u = 0; u < m; ++u)
2731
- f += o[u][0].slice(a) + `
2732
- `;
2733
- for (let u = m; u < l; ++u) {
2734
- let [p, g] = o[u];
2735
- c += p.length + g.length + 1;
2736
- const w = g[g.length - 1] === "\r";
2737
- if (w && (g = g.slice(0, -1)), g && p.length < a) {
2738
- const S = `Block scalar lines must not be less indented than their ${i.indent ? "explicit indentation indicator" : "first line"}`;
2739
- t(c - g.length - (w ? 2 : 1), "BAD_INDENT", S), p = "";
2740
- }
2741
- r === O.BLOCK_LITERAL ? (f += d + p.slice(a) + g, d = `
2742
- `) : p.length > a || g[0] === " " ? (d === " " ? d = `
2743
- ` : !h && d === `
2744
- ` && (d = `
2745
-
2746
- `), f += d + p.slice(a) + g, d = `
2747
- `, h = !0) : g === "" ? d === `
2748
- ` ? f += `
2749
- ` : d = `
2750
- ` : (f += d + g, d = " ", h = !1);
2751
- }
2752
- switch (i.chomp) {
2753
- case "-":
2754
- break;
2755
- case "+":
2756
- for (let u = l; u < o.length; ++u)
2757
- f += `
2758
- ` + o[u][0].slice(a);
2759
- f[f.length - 1] !== `
2760
- ` && (f += `
2761
- `);
2762
- break;
2763
- default:
2764
- f += `
2765
- `;
2766
- }
2767
- const y = n + i.length + e.source.length;
2768
- return { value: f, type: r, comment: i.comment, range: [n, y, y] };
2769
- }
2770
- function fn({ offset: s, props: e }, t, n) {
2771
- if (e[0].type !== "block-scalar-header")
2772
- return n(e[0], "IMPOSSIBLE", "Block scalar header not found"), null;
2773
- const { source: i } = e[0], r = i[0];
2774
- let o = 0, l = "", a = -1;
2775
- for (let d = 1; d < i.length; ++d) {
2776
- const h = i[d];
2777
- if (!l && (h === "-" || h === "+"))
2778
- l = h;
2779
- else {
2780
- const y = Number(h);
2781
- !o && y ? o = y : a === -1 && (a = s + d);
2782
- }
2783
- }
2784
- a !== -1 && n(a, "UNEXPECTED_TOKEN", `Block scalar header includes extra characters: ${i}`);
2785
- let c = !1, m = "", f = i.length;
2786
- for (let d = 1; d < e.length; ++d) {
2787
- const h = e[d];
2788
- switch (h.type) {
2789
- case "space":
2790
- c = !0;
2791
- case "newline":
2792
- f += h.source.length;
2793
- break;
2794
- case "comment":
2795
- t && !c && n(h, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters"), f += h.source.length, m = h.source.substring(1);
2796
- break;
2797
- case "error":
2798
- n(h, "UNEXPECTED_TOKEN", h.message), f += h.source.length;
2799
- break;
2800
- default: {
2801
- const y = `Unexpected token in block scalar header: ${h.type}`;
2802
- n(h, "UNEXPECTED_TOKEN", y);
2803
- const u = h.source;
2804
- u && typeof u == "string" && (f += u.length);
2805
- }
2806
- }
2807
- }
2808
- return { mode: r, indent: o, chomp: l, comment: m, length: f };
2809
- }
2810
- function un(s) {
2811
- const e = s.split(/\n( *)/), t = e[0], n = t.match(/^( *)/), r = [n != null && n[1] ? [n[1], t.slice(n[1].length)] : ["", t]];
2812
- for (let o = 1; o < e.length; o += 2)
2813
- r.push([e[o], e[o + 1]]);
2814
- return r;
2815
- }
2816
- function ys(s, e, t) {
2817
- const { offset: n, type: i, source: r, end: o } = s;
2818
- let l, a;
2819
- const c = (d, h, y) => t(n + d, h, y);
2820
- switch (i) {
2821
- case "scalar":
2822
- l = O.PLAIN, a = hn(r, c);
2823
- break;
2824
- case "single-quoted-scalar":
2825
- l = O.QUOTE_SINGLE, a = dn(r, c);
2826
- break;
2827
- case "double-quoted-scalar":
2828
- l = O.QUOTE_DOUBLE, a = pn(r, c);
2829
- break;
2830
- default:
2831
- return t(s, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${i}`), {
2832
- value: "",
2833
- type: null,
2834
- comment: "",
2835
- range: [n, n + r.length, n + r.length]
2836
- };
2837
- }
2838
- const m = n + r.length, f = Ee(o, m, e, t);
2839
- return {
2840
- value: a,
2841
- type: l,
2842
- comment: f.comment,
2843
- range: [n, m, f.offset]
2844
- };
2845
- }
2846
- function hn(s, e) {
2847
- let t = "";
2848
- switch (s[0]) {
2849
- case " ":
2850
- t = "a tab character";
2851
- break;
2852
- case ",":
2853
- t = "flow indicator character ,";
2854
- break;
2855
- case "%":
2856
- t = "directive indicator character %";
2857
- break;
2858
- case "|":
2859
- case ">": {
2860
- t = `block scalar indicator ${s[0]}`;
2861
- break;
2862
- }
2863
- case "@":
2864
- case "`": {
2865
- t = `reserved character ${s[0]}`;
2866
- break;
2867
- }
2868
- }
2869
- return t && e(0, "BAD_SCALAR_START", `Plain value cannot start with ${t}`), gs(s);
2870
- }
2871
- function dn(s, e) {
2872
- return (s[s.length - 1] !== "'" || s.length === 1) && e(s.length, "MISSING_CHAR", "Missing closing 'quote"), gs(s.slice(1, -1)).replace(/''/g, "'");
2873
- }
2874
- function gs(s) {
2875
- let e, t;
2876
- try {
2877
- e = new RegExp(`(.*?)(?<![ ])[ ]*\r?
2878
- `, "sy"), t = new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
2879
- `, "sy");
2880
- } catch {
2881
- e = /(.*?)[ \t]*\r?\n/sy, t = /[ \t]*(.*?)[ \t]*\r?\n/sy;
2882
- }
2883
- let n = e.exec(s);
2884
- if (!n)
2885
- return s;
2886
- let i = n[1], r = " ", o = e.lastIndex;
2887
- for (t.lastIndex = o; n = t.exec(s); )
2888
- n[1] === "" ? r === `
2889
- ` ? i += r : r = `
2890
- ` : (i += r + n[1], r = " "), o = t.lastIndex;
2891
- const l = /[ \t]*(.*)/sy;
2892
- return l.lastIndex = o, n = l.exec(s), i + r + ((n == null ? void 0 : n[1]) ?? "");
2893
- }
2894
- function pn(s, e) {
2895
- let t = "";
2896
- for (let n = 1; n < s.length - 1; ++n) {
2897
- const i = s[n];
2898
- if (!(i === "\r" && s[n + 1] === `
2899
- `))
2900
- if (i === `
2901
- `) {
2902
- const { fold: r, offset: o } = mn(s, n);
2903
- t += r, n = o;
2904
- } else if (i === "\\") {
2905
- let r = s[++n];
2906
- const o = yn[r];
2907
- if (o)
2908
- t += o;
2909
- else if (r === `
2910
- `)
2911
- for (r = s[n + 1]; r === " " || r === " "; )
2912
- r = s[++n + 1];
2913
- else if (r === "\r" && s[n + 1] === `
2914
- `)
2915
- for (r = s[++n + 1]; r === " " || r === " "; )
2916
- r = s[++n + 1];
2917
- else if (r === "x" || r === "u" || r === "U") {
2918
- const l = { x: 2, u: 4, U: 8 }[r];
2919
- t += gn(s, n + 1, l, e), n += l;
2920
- } else {
2921
- const l = s.substr(n - 1, 2);
2922
- e(n - 1, "BAD_DQ_ESCAPE", `Invalid escape sequence ${l}`), t += l;
2923
- }
2924
- } else if (i === " " || i === " ") {
2925
- const r = n;
2926
- let o = s[n + 1];
2927
- for (; o === " " || o === " "; )
2928
- o = s[++n + 1];
2929
- o !== `
2930
- ` && !(o === "\r" && s[n + 2] === `
2931
- `) && (t += n > r ? s.slice(r, n + 1) : i);
2932
- } else
2933
- t += i;
2934
- }
2935
- return (s[s.length - 1] !== '"' || s.length === 1) && e(s.length, "MISSING_CHAR", 'Missing closing "quote'), t;
2936
- }
2937
- function mn(s, e) {
2938
- let t = "", n = s[e + 1];
2939
- for (; (n === " " || n === " " || n === `
2940
- ` || n === "\r") && !(n === "\r" && s[e + 2] !== `
2941
- `); )
2942
- n === `
2943
- ` && (t += `
2944
- `), e += 1, n = s[e + 1];
2945
- return t || (t = " "), { fold: t, offset: e };
2946
- }
2947
- const yn = {
2948
- 0: "\0",
2949
- // null character
2950
- a: "\x07",
2951
- // bell character
2952
- b: "\b",
2953
- // backspace
2954
- e: "\x1B",
2955
- // escape character
2956
- f: "\f",
2957
- // form feed
2958
- n: `
2959
- `,
2960
- // line feed
2961
- r: "\r",
2962
- // carriage return
2963
- t: " ",
2964
- // horizontal tab
2965
- v: "\v",
2966
- // vertical tab
2967
- N: "…",
2968
- // Unicode next line
2969
- _: " ",
2970
- // Unicode non-breaking space
2971
- L: "\u2028",
2972
- // Unicode line separator
2973
- P: "\u2029",
2974
- // Unicode paragraph separator
2975
- " ": " ",
2976
- '"': '"',
2977
- "/": "/",
2978
- "\\": "\\",
2979
- " ": " "
2980
- };
2981
- function gn(s, e, t, n) {
2982
- const i = s.substr(e, t), o = i.length === t && /^[0-9a-fA-F]+$/.test(i) ? parseInt(i, 16) : NaN;
2983
- if (isNaN(o)) {
2984
- const l = s.substr(e - 2, t + 2);
2985
- return n(e - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${l}`), l;
2986
- }
2987
- return String.fromCodePoint(o);
2988
- }
2989
- function bs(s, e, t, n) {
2990
- const { value: i, type: r, comment: o, range: l } = e.type === "block-scalar" ? ms(s, e, n) : ys(e, s.options.strict, n), a = t ? s.directives.tagName(t.source, (f) => n(t, "TAG_RESOLVE_FAILED", f)) : null, c = t && a ? bn(s.schema, i, a, t, n) : e.type === "scalar" ? wn(s, i, e, n) : s.schema[R];
2991
- let m;
2992
- try {
2993
- const f = c.resolve(i, (d) => n(t ?? e, "TAG_RESOLVE_FAILED", d), s.options);
2994
- m = E(f) ? f : new O(f);
2995
- } catch (f) {
2996
- const d = f instanceof Error ? f.message : String(f);
2997
- n(t ?? e, "TAG_RESOLVE_FAILED", d), m = new O(i);
2998
- }
2999
- return m.range = l, m.source = i, r && (m.type = r), a && (m.tag = a), c.format && (m.format = c.format), o && (m.comment = o), m;
3000
- }
3001
- function bn(s, e, t, n, i) {
3002
- var l;
3003
- if (t === "!")
3004
- return s[R];
3005
- const r = [];
3006
- for (const a of s.tags)
3007
- if (!a.collection && a.tag === t)
3008
- if (a.default && a.test)
3009
- r.push(a);
3010
- else
3011
- return a;
3012
- for (const a of r)
3013
- if ((l = a.test) != null && l.test(e))
3014
- return a;
3015
- const o = s.knownTags[t];
3016
- return o && !o.collection ? (s.tags.push(Object.assign({}, o, { default: !1, test: void 0 })), o) : (i(n, "TAG_RESOLVE_FAILED", `Unresolved tag: ${t}`, t !== "tag:yaml.org,2002:str"), s[R]);
3017
- }
3018
- function wn({ directives: s, schema: e }, t, n, i) {
3019
- const r = e.tags.find((o) => {
3020
- var l;
3021
- return o.default && ((l = o.test) == null ? void 0 : l.test(t));
3022
- }) || e[R];
3023
- if (e.compat) {
3024
- const o = e.compat.find((l) => {
3025
- var a;
3026
- return l.default && ((a = l.test) == null ? void 0 : a.test(t));
3027
- }) ?? e[R];
3028
- if (r.tag !== o.tag) {
3029
- const l = s.tagString(r.tag), a = s.tagString(o.tag), c = `Value may be parsed as either ${l} or ${a}`;
3030
- i(n, "TAG_RESOLVE_FAILED", c, !0);
3031
- }
3032
- }
3033
- return r;
3034
- }
3035
- function Sn(s, e, t) {
3036
- if (e) {
3037
- t === null && (t = e.length);
3038
- for (let n = t - 1; n >= 0; --n) {
3039
- let i = e[n];
3040
- switch (i.type) {
3041
- case "space":
3042
- case "comment":
3043
- case "newline":
3044
- s -= i.source.length;
3045
- continue;
3046
- }
3047
- for (i = e[++n]; (i == null ? void 0 : i.type) === "space"; )
3048
- s += i.source.length, i = e[++n];
3049
- break;
3050
- }
3051
- }
3052
- return s;
3053
- }
3054
- const kn = { composeNode: ws, composeEmptyNode: Ot };
3055
- function ws(s, e, t, n) {
3056
- const { spaceBefore: i, comment: r, anchor: o, tag: l } = t;
3057
- let a, c = !0;
3058
- switch (e.type) {
3059
- case "alias":
3060
- a = Nn(s, e, n), (o || l) && n(e, "ALIAS_PROPS", "An alias node must not specify any properties");
3061
- break;
3062
- case "scalar":
3063
- case "single-quoted-scalar":
3064
- case "double-quoted-scalar":
3065
- case "block-scalar":
3066
- a = bs(s, e, l, n), o && (a.anchor = o.source.substring(1));
3067
- break;
3068
- case "block-map":
3069
- case "block-seq":
3070
- case "flow-collection":
3071
- a = cn(kn, s, e, t, n), o && (a.anchor = o.source.substring(1));
3072
- break;
3073
- default: {
3074
- const m = e.type === "error" ? e.message : `Unsupported token (type: ${e.type})`;
3075
- n(e, "UNEXPECTED_TOKEN", m), a = Ot(s, e.offset, void 0, null, t, n), c = !1;
3076
- }
3077
- }
3078
- return o && a.anchor === "" && n(o, "BAD_ALIAS", "Anchor cannot be an empty string"), i && (a.spaceBefore = !0), r && (e.type === "scalar" && e.source === "" ? a.comment = r : a.commentBefore = r), s.options.keepSourceTokens && c && (a.srcToken = e), a;
3079
- }
3080
- function Ot(s, e, t, n, { spaceBefore: i, comment: r, anchor: o, tag: l, end: a }, c) {
3081
- const m = {
3082
- type: "scalar",
3083
- offset: Sn(e, t, n),
3084
- indent: -1,
3085
- source: ""
3086
- }, f = bs(s, m, l, c);
3087
- return o && (f.anchor = o.source.substring(1), f.anchor === "" && c(o, "BAD_ALIAS", "Anchor cannot be an empty string")), i && (f.spaceBefore = !0), r && (f.comment = r, f.range[2] = a), f;
3088
- }
3089
- function Nn({ options: s }, { offset: e, source: t, end: n }, i) {
3090
- const r = new qe(t.substring(1));
3091
- r.source === "" && i(e, "BAD_ALIAS", "Alias cannot be an empty string"), r.source.endsWith(":") && i(e + t.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", !0);
3092
- const o = e + t.length, l = Ee(n, o, s.strict, i);
3093
- return r.range = [e, o, l.offset], l.comment && (r.comment = l.comment), r;
3094
- }
3095
- function On(s, e, { offset: t, start: n, value: i, end: r }, o) {
3096
- const l = Object.assign({ _directives: e }, s), a = new ye(void 0, l), c = {
3097
- atRoot: !0,
3098
- directives: a.directives,
3099
- options: a.options,
3100
- schema: a.schema
3101
- }, m = ce(n, {
3102
- indicator: "doc-start",
3103
- next: i ?? (r == null ? void 0 : r[0]),
3104
- offset: t,
3105
- onError: o,
3106
- parentIndent: 0,
3107
- startOnNewline: !0
3108
- });
3109
- m.found && (a.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !m.hasNewline && o(m.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), a.contents = i ? ws(c, i, m, o) : Ot(c, m.end, n, null, m, o);
3110
- const f = a.contents.range[2], d = Ee(r, f, !1, o);
3111
- return d.comment && (a.comment = d.comment), a.range = [t, f, d.offset], a;
3112
- }
3113
- function ge(s) {
3114
- if (typeof s == "number")
3115
- return [s, s + 1];
3116
- if (Array.isArray(s))
3117
- return s.length === 2 ? s : [s[0], s[1]];
3118
- const { offset: e, source: t } = s;
3119
- return [e, e + (typeof t == "string" ? t.length : 1)];
3120
- }
3121
- function Bt(s) {
3122
- var i;
3123
- let e = "", t = !1, n = !1;
3124
- for (let r = 0; r < s.length; ++r) {
3125
- const o = s[r];
3126
- switch (o[0]) {
3127
- case "#":
3128
- e += (e === "" ? "" : n ? `
3129
-
3130
- ` : `
3131
- `) + (o.substring(1) || " "), t = !0, n = !1;
3132
- break;
3133
- case "%":
3134
- ((i = s[r + 1]) == null ? void 0 : i[0]) !== "#" && (r += 1), t = !1;
3135
- break;
3136
- default:
3137
- t || (n = !0), t = !1;
3138
- }
3139
- }
3140
- return { comment: e, afterEmptyLine: n };
3141
- }
3142
- class At {
3143
- constructor(e = {}) {
3144
- this.doc = null, this.atDirectives = !1, this.prelude = [], this.errors = [], this.warnings = [], this.onError = (t, n, i, r) => {
3145
- const o = ge(t);
3146
- r ? this.warnings.push(new ds(o, n, i)) : this.errors.push(new X(o, n, i));
3147
- }, this.directives = new B({ version: e.version || "1.2" }), this.options = e;
3148
- }
3149
- decorate(e, t) {
3150
- const { comment: n, afterEmptyLine: i } = Bt(this.prelude);
3151
- if (n) {
3152
- const r = e.contents;
3153
- if (t)
3154
- e.comment = e.comment ? `${e.comment}
3155
- ${n}` : n;
3156
- else if (i || e.directives.docStart || !r)
3157
- e.commentBefore = n;
3158
- else if (L(r) && !r.flow && r.items.length > 0) {
3159
- let o = r.items[0];
3160
- I(o) && (o = o.key);
3161
- const l = o.commentBefore;
3162
- o.commentBefore = l ? `${n}
3163
- ${l}` : n;
3164
- } else {
3165
- const o = r.commentBefore;
3166
- r.commentBefore = o ? `${n}
3167
- ${o}` : n;
3168
- }
3169
- }
3170
- t ? (Array.prototype.push.apply(e.errors, this.errors), Array.prototype.push.apply(e.warnings, this.warnings)) : (e.errors = this.errors, e.warnings = this.warnings), this.prelude = [], this.errors = [], this.warnings = [];
3171
- }
3172
- /**
3173
- * Current stream status information.
3174
- *
3175
- * Mostly useful at the end of input for an empty stream.
3176
- */
3177
- streamInfo() {
3178
- return {
3179
- comment: Bt(this.prelude).comment,
3180
- directives: this.directives,
3181
- errors: this.errors,
3182
- warnings: this.warnings
3183
- };
3184
- }
3185
- /**
3186
- * Compose tokens into documents.
3187
- *
3188
- * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.
3189
- * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.
3190
- */
3191
- *compose(e, t = !1, n = -1) {
3192
- for (const i of e)
3193
- yield* this.next(i);
3194
- yield* this.end(t, n);
3195
- }
3196
- /** Advance the composer by one CST token. */
3197
- *next(e) {
3198
- switch (e.type) {
3199
- case "directive":
3200
- this.directives.add(e.source, (t, n, i) => {
3201
- const r = ge(e);
3202
- r[0] += t, this.onError(r, "BAD_DIRECTIVE", n, i);
3203
- }), this.prelude.push(e.source), this.atDirectives = !0;
3204
- break;
3205
- case "document": {
3206
- const t = On(this.options, this.directives, e, this.onError);
3207
- 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;
3208
- break;
3209
- }
3210
- case "byte-order-mark":
3211
- case "space":
3212
- break;
3213
- case "comment":
3214
- case "newline":
3215
- this.prelude.push(e.source);
3216
- break;
3217
- case "error": {
3218
- const t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new X(ge(e), "UNEXPECTED_TOKEN", t);
3219
- this.atDirectives || !this.doc ? this.errors.push(n) : this.doc.errors.push(n);
3220
- break;
3221
- }
3222
- case "doc-end": {
3223
- if (!this.doc) {
3224
- const n = "Unexpected doc-end without preceding document";
3225
- this.errors.push(new X(ge(e), "UNEXPECTED_TOKEN", n));
3226
- break;
3227
- }
3228
- this.doc.directives.docEnd = !0;
3229
- const t = Ee(e.end, e.offset + e.source.length, this.doc.options.strict, this.onError);
3230
- if (this.decorate(this.doc, !0), t.comment) {
3231
- const n = this.doc.comment;
3232
- this.doc.comment = n ? `${n}
3233
- ${t.comment}` : t.comment;
3234
- }
3235
- this.doc.range[2] = t.offset;
3236
- break;
3237
- }
3238
- default:
3239
- this.errors.push(new X(ge(e), "UNEXPECTED_TOKEN", `Unsupported token ${e.type}`));
3240
- }
3241
- }
3242
- /**
3243
- * Call at end of input to yield any remaining document.
3244
- *
3245
- * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.
3246
- * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.
3247
- */
3248
- *end(e = !1, t = -1) {
3249
- if (this.doc)
3250
- this.decorate(this.doc, !0), yield this.doc, this.doc = null;
3251
- else if (e) {
3252
- const n = Object.assign({ _directives: this.directives }, this.options), i = new ye(void 0, n);
3253
- this.atDirectives && this.onError(t, "MISSING_CHAR", "Missing directives-end indicator line"), i.range = [0, t, t], this.decorate(i, !1), yield i;
3254
- }
3255
- }
3256
- }
3257
- function An(s, e = !0, t) {
3258
- if (s) {
3259
- const n = (i, r, o) => {
3260
- const l = typeof i == "number" ? i : Array.isArray(i) ? i[0] : i.offset;
3261
- if (t)
3262
- t(l, r, o);
3263
- else
3264
- throw new X([l, l + 1], r, o);
3265
- };
3266
- switch (s.type) {
3267
- case "scalar":
3268
- case "single-quoted-scalar":
3269
- case "double-quoted-scalar":
3270
- return ys(s, e, n);
3271
- case "block-scalar":
3272
- return ms({ options: { strict: e } }, s, n);
3273
- }
3274
- }
3275
- return null;
3276
- }
3277
- function En(s, e) {
3278
- const { implicitKey: t = !1, indent: n, inFlow: i = !1, offset: r = -1, type: o = "PLAIN" } = e, l = Oe({ type: o, value: s }, {
3279
- implicitKey: t,
3280
- indent: n > 0 ? " ".repeat(n) : "",
3281
- inFlow: i,
3282
- options: { blockQuote: !0, lineWidth: -1 }
3283
- }), a = e.end ?? [
3284
- { type: "newline", offset: -1, indent: n, source: `
3285
- ` }
3286
- ];
3287
- switch (l[0]) {
3288
- case "|":
3289
- case ">": {
3290
- const c = l.indexOf(`
3291
- `), m = l.substring(0, c), f = l.substring(c + 1) + `
3292
- `, d = [
3293
- { type: "block-scalar-header", offset: r, indent: n, source: m }
3294
- ];
3295
- return Ss(d, a) || d.push({ type: "newline", offset: -1, indent: n, source: `
3296
- ` }), { type: "block-scalar", offset: r, indent: n, props: d, source: f };
3297
- }
3298
- case '"':
3299
- return { type: "double-quoted-scalar", offset: r, indent: n, source: l, end: a };
3300
- case "'":
3301
- return { type: "single-quoted-scalar", offset: r, indent: n, source: l, end: a };
3302
- default:
3303
- return { type: "scalar", offset: r, indent: n, source: l, end: a };
3304
- }
3305
- }
3306
- function In(s, e, t = {}) {
3307
- let { afterKey: n = !1, implicitKey: i = !1, inFlow: r = !1, type: o } = t, l = "indent" in s ? s.indent : null;
3308
- if (n && typeof l == "number" && (l += 2), !o)
3309
- switch (s.type) {
3310
- case "single-quoted-scalar":
3311
- o = "QUOTE_SINGLE";
3312
- break;
3313
- case "double-quoted-scalar":
3314
- o = "QUOTE_DOUBLE";
3315
- break;
3316
- case "block-scalar": {
3317
- const c = s.props[0];
3318
- if (c.type !== "block-scalar-header")
3319
- throw new Error("Invalid block scalar header");
3320
- o = c.source[0] === ">" ? "BLOCK_FOLDED" : "BLOCK_LITERAL";
3321
- break;
3322
- }
3323
- default:
3324
- o = "PLAIN";
3325
- }
3326
- const a = Oe({ type: o, value: e }, {
3327
- implicitKey: i || l === null,
3328
- indent: l !== null && l > 0 ? " ".repeat(l) : "",
3329
- inFlow: r,
3330
- options: { blockQuote: !0, lineWidth: -1 }
3331
- });
3332
- switch (a[0]) {
3333
- case "|":
3334
- case ">":
3335
- Tn(s, a);
3336
- break;
3337
- case '"':
3338
- nt(s, a, "double-quoted-scalar");
3339
- break;
3340
- case "'":
3341
- nt(s, a, "single-quoted-scalar");
3342
- break;
3343
- default:
3344
- nt(s, a, "scalar");
3345
- }
3346
- }
3347
- function Tn(s, e) {
3348
- const t = e.indexOf(`
3349
- `), n = e.substring(0, t), i = e.substring(t + 1) + `
3350
- `;
3351
- if (s.type === "block-scalar") {
3352
- const r = s.props[0];
3353
- if (r.type !== "block-scalar-header")
3354
- throw new Error("Invalid block scalar header");
3355
- r.source = n, s.source = i;
3356
- } else {
3357
- const { offset: r } = s, o = "indent" in s ? s.indent : -1, l = [
3358
- { type: "block-scalar-header", offset: r, indent: o, source: n }
3359
- ];
3360
- Ss(l, "end" in s ? s.end : void 0) || l.push({ type: "newline", offset: -1, indent: o, source: `
3361
- ` });
3362
- for (const a of Object.keys(s))
3363
- a !== "type" && a !== "offset" && delete s[a];
3364
- Object.assign(s, { type: "block-scalar", indent: o, props: l, source: i });
3365
- }
3366
- }
3367
- function Ss(s, e) {
3368
- if (e)
3369
- for (const t of e)
3370
- switch (t.type) {
3371
- case "space":
3372
- case "comment":
3373
- s.push(t);
3374
- break;
3375
- case "newline":
3376
- return s.push(t), !0;
3377
- }
3378
- return !1;
3379
- }
3380
- function nt(s, e, t) {
3381
- switch (s.type) {
3382
- case "scalar":
3383
- case "double-quoted-scalar":
3384
- case "single-quoted-scalar":
3385
- s.type = t, s.source = e;
3386
- break;
3387
- case "block-scalar": {
3388
- const n = s.props.slice(1);
3389
- let i = e.length;
3390
- s.props[0].type === "block-scalar-header" && (i -= s.props[0].source.length);
3391
- for (const r of n)
3392
- r.offset += i;
3393
- delete s.props, Object.assign(s, { type: t, source: e, end: n });
3394
- break;
3395
- }
3396
- case "block-map":
3397
- case "block-seq": {
3398
- const i = { type: "newline", offset: s.offset + e.length, indent: s.indent, source: `
3399
- ` };
3400
- delete s.items, Object.assign(s, { type: t, source: e, end: [i] });
3401
- break;
3402
- }
3403
- default: {
3404
- const n = "indent" in s ? s.indent : -1, i = "end" in s && Array.isArray(s.end) ? s.end.filter((r) => r.type === "space" || r.type === "comment" || r.type === "newline") : [];
3405
- for (const r of Object.keys(s))
3406
- r !== "type" && r !== "offset" && delete s[r];
3407
- Object.assign(s, { type: t, indent: n, source: e, end: i });
3408
- }
3409
- }
3410
- }
3411
- const Ln = (s) => "type" in s ? je(s) : Be(s);
3412
- function je(s) {
3413
- switch (s.type) {
3414
- case "block-scalar": {
3415
- let e = "";
3416
- for (const t of s.props)
3417
- e += je(t);
3418
- return e + s.source;
3419
- }
3420
- case "block-map":
3421
- case "block-seq": {
3422
- let e = "";
3423
- for (const t of s.items)
3424
- e += Be(t);
3425
- return e;
3426
- }
3427
- case "flow-collection": {
3428
- let e = s.start.source;
3429
- for (const t of s.items)
3430
- e += Be(t);
3431
- for (const t of s.end)
3432
- e += t.source;
3433
- return e;
3434
- }
3435
- case "document": {
3436
- let e = Be(s);
3437
- if (s.end)
3438
- for (const t of s.end)
3439
- e += t.source;
3440
- return e;
3441
- }
3442
- default: {
3443
- let e = s.source;
3444
- if ("end" in s && s.end)
3445
- for (const t of s.end)
3446
- e += t.source;
3447
- return e;
3448
- }
3449
- }
3450
- }
3451
- function Be({ start: s, key: e, sep: t, value: n }) {
3452
- let i = "";
3453
- for (const r of s)
3454
- i += r.source;
3455
- if (e && (i += je(e)), t)
3456
- for (const r of t)
3457
- i += r.source;
3458
- return n && (i += je(n)), i;
3459
- }
3460
- const ft = Symbol("break visit"), $n = Symbol("skip children"), ks = Symbol("remove item");
3461
- function z(s, e) {
3462
- "type" in s && s.type === "document" && (s = { start: s.start, value: s.value }), Ns(Object.freeze([]), s, e);
3463
- }
3464
- z.BREAK = ft;
3465
- z.SKIP = $n;
3466
- z.REMOVE = ks;
3467
- z.itemAtPath = (s, e) => {
3468
- let t = s;
3469
- for (const [n, i] of e) {
3470
- const r = t == null ? void 0 : t[n];
3471
- if (r && "items" in r)
3472
- t = r.items[i];
3473
- else
3474
- return;
3475
- }
3476
- return t;
3477
- };
3478
- z.parentCollection = (s, e) => {
3479
- const t = z.itemAtPath(s, e.slice(0, -1)), n = e[e.length - 1][0], i = t == null ? void 0 : t[n];
3480
- if (i && "items" in i)
3481
- return i;
3482
- throw new Error("Parent collection not found");
3483
- };
3484
- function Ns(s, e, t) {
3485
- let n = t(e, s);
3486
- if (typeof n == "symbol")
3487
- return n;
3488
- for (const i of ["key", "value"]) {
3489
- const r = e[i];
3490
- if (r && "items" in r) {
3491
- for (let o = 0; o < r.items.length; ++o) {
3492
- const l = Ns(Object.freeze(s.concat([[i, o]])), r.items[o], t);
3493
- if (typeof l == "number")
3494
- o = l - 1;
3495
- else {
3496
- if (l === ft)
3497
- return ft;
3498
- l === ks && (r.items.splice(o, 1), o -= 1);
3499
- }
3500
- }
3501
- typeof n == "function" && i === "key" && (n = n(e, s));
3502
- }
3503
- }
3504
- return typeof n == "function" ? n(e, s) : n;
3505
- }
3506
- const He = "\uFEFF", Xe = "", ze = "", Ne = "", _n = (s) => !!s && "items" in s, Cn = (s) => !!s && (s.type === "scalar" || s.type === "single-quoted-scalar" || s.type === "double-quoted-scalar" || s.type === "block-scalar");
3507
- function vn(s) {
3508
- switch (s) {
3509
- case He:
3510
- return "<BOM>";
3511
- case Xe:
3512
- return "<DOC>";
3513
- case ze:
3514
- return "<FLOW_END>";
3515
- case Ne:
3516
- return "<SCALAR>";
3517
- default:
3518
- return JSON.stringify(s);
3519
- }
3520
- }
3521
- function Os(s) {
3522
- switch (s) {
3523
- case He:
3524
- return "byte-order-mark";
3525
- case Xe:
3526
- return "doc-mode";
3527
- case ze:
3528
- return "flow-error-end";
3529
- case Ne:
3530
- return "scalar";
3531
- case "---":
3532
- return "doc-start";
3533
- case "...":
3534
- return "doc-end";
3535
- case "":
3536
- case `
3537
- `:
3538
- case `\r
3539
- `:
3540
- return "newline";
3541
- case "-":
3542
- return "seq-item-ind";
3543
- case "?":
3544
- return "explicit-key-ind";
3545
- case ":":
3546
- return "map-value-ind";
3547
- case "{":
3548
- return "flow-map-start";
3549
- case "}":
3550
- return "flow-map-end";
3551
- case "[":
3552
- return "flow-seq-start";
3553
- case "]":
3554
- return "flow-seq-end";
3555
- case ",":
3556
- return "comma";
3557
- }
3558
- switch (s[0]) {
3559
- case " ":
3560
- case " ":
3561
- return "space";
3562
- case "#":
3563
- return "comment";
3564
- case "%":
3565
- return "directive-line";
3566
- case "*":
3567
- return "alias";
3568
- case "&":
3569
- return "anchor";
3570
- case "!":
3571
- return "tag";
3572
- case "'":
3573
- return "single-quoted-scalar";
3574
- case '"':
3575
- return "double-quoted-scalar";
3576
- case "|":
3577
- case ">":
3578
- return "block-scalar-header";
3579
- }
3580
- return null;
3581
- }
3582
- var Bn = /* @__PURE__ */ Object.freeze({
3583
- __proto__: null,
3584
- BOM: He,
3585
- DOCUMENT: Xe,
3586
- FLOW_END: ze,
3587
- SCALAR: Ne,
3588
- createScalarToken: En,
3589
- isCollection: _n,
3590
- isScalar: Cn,
3591
- prettyToken: vn,
3592
- resolveAsScalar: An,
3593
- setScalarValue: In,
3594
- stringify: Ln,
3595
- tokenType: Os,
3596
- visit: z
3597
- });
3598
- function K(s) {
3599
- switch (s) {
3600
- case void 0:
3601
- case " ":
3602
- case `
3603
- `:
3604
- case "\r":
3605
- case " ":
3606
- return !0;
3607
- default:
3608
- return !1;
3609
- }
3610
- }
3611
- const Mt = new Set("0123456789ABCDEFabcdef"), Mn = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), Le = new Set(",[]{}"), Pn = new Set(` ,[]{}
3612
- \r `), it = (s) => !s || Pn.has(s);
3613
- class As {
3614
- constructor() {
3615
- 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;
3616
- }
3617
- /**
3618
- * Generate YAML tokens from the `source` string. If `incomplete`,
3619
- * a part of the last line may be left as a buffer for the next call.
3620
- *
3621
- * @returns A generator of lexical tokens
3622
- */
3623
- *lex(e, t = !1) {
3624
- if (e) {
3625
- if (typeof e != "string")
3626
- throw TypeError("source is not a string");
3627
- this.buffer = this.buffer ? this.buffer + e : e, this.lineEndPos = null;
3628
- }
3629
- this.atEnd = !t;
3630
- let n = this.next ?? "stream";
3631
- for (; n && (t || this.hasChars(1)); )
3632
- n = yield* this.parseNext(n);
3633
- }
3634
- atLineEnd() {
3635
- let e = this.pos, t = this.buffer[e];
3636
- for (; t === " " || t === " "; )
3637
- t = this.buffer[++e];
3638
- return !t || t === "#" || t === `
3639
- ` ? !0 : t === "\r" ? this.buffer[e + 1] === `
3640
- ` : !1;
3641
- }
3642
- charAt(e) {
3643
- return this.buffer[this.pos + e];
3644
- }
3645
- continueScalar(e) {
3646
- let t = this.buffer[e];
3647
- if (this.indentNext > 0) {
3648
- let n = 0;
3649
- for (; t === " "; )
3650
- t = this.buffer[++n + e];
3651
- if (t === "\r") {
3652
- const i = this.buffer[n + e + 1];
3653
- if (i === `
3654
- ` || !i && !this.atEnd)
3655
- return e + n + 1;
3656
- }
3657
- return t === `
3658
- ` || n >= this.indentNext || !t && !this.atEnd ? e + n : -1;
3659
- }
3660
- if (t === "-" || t === ".") {
3661
- const n = this.buffer.substr(e, 3);
3662
- if ((n === "---" || n === "...") && K(this.buffer[e + 3]))
3663
- return -1;
3664
- }
3665
- return e;
3666
- }
3667
- getLine() {
3668
- let e = this.lineEndPos;
3669
- return (typeof e != "number" || e !== -1 && e < this.pos) && (e = this.buffer.indexOf(`
3670
- `, this.pos), this.lineEndPos = e), e === -1 ? this.atEnd ? this.buffer.substring(this.pos) : null : (this.buffer[e - 1] === "\r" && (e -= 1), this.buffer.substring(this.pos, e));
3671
- }
3672
- hasChars(e) {
3673
- return this.pos + e <= this.buffer.length;
3674
- }
3675
- setNext(e) {
3676
- return this.buffer = this.buffer.substring(this.pos), this.pos = 0, this.lineEndPos = null, this.next = e, null;
3677
- }
3678
- peek(e) {
3679
- return this.buffer.substr(this.pos, e);
3680
- }
3681
- *parseNext(e) {
3682
- switch (e) {
3683
- case "stream":
3684
- return yield* this.parseStream();
3685
- case "line-start":
3686
- return yield* this.parseLineStart();
3687
- case "block-start":
3688
- return yield* this.parseBlockStart();
3689
- case "doc":
3690
- return yield* this.parseDocument();
3691
- case "flow":
3692
- return yield* this.parseFlowCollection();
3693
- case "quoted-scalar":
3694
- return yield* this.parseQuotedScalar();
3695
- case "block-scalar":
3696
- return yield* this.parseBlockScalar();
3697
- case "plain-scalar":
3698
- return yield* this.parsePlainScalar();
3699
- }
3700
- }
3701
- *parseStream() {
3702
- let e = this.getLine();
3703
- if (e === null)
3704
- return this.setNext("stream");
3705
- if (e[0] === He && (yield* this.pushCount(1), e = e.substring(1)), e[0] === "%") {
3706
- let t = e.length, n = e.indexOf("#");
3707
- for (; n !== -1; ) {
3708
- const r = e[n - 1];
3709
- if (r === " " || r === " ") {
3710
- t = n - 1;
3711
- break;
3712
- } else
3713
- n = e.indexOf("#", n + 1);
3714
- }
3715
- for (; ; ) {
3716
- const r = e[t - 1];
3717
- if (r === " " || r === " ")
3718
- t -= 1;
3719
- else
3720
- break;
3721
- }
3722
- const i = (yield* this.pushCount(t)) + (yield* this.pushSpaces(!0));
3723
- return yield* this.pushCount(e.length - i), this.pushNewline(), "stream";
3724
- }
3725
- if (this.atLineEnd()) {
3726
- const t = yield* this.pushSpaces(!0);
3727
- return yield* this.pushCount(e.length - t), yield* this.pushNewline(), "stream";
3728
- }
3729
- return yield Xe, yield* this.parseLineStart();
3730
- }
3731
- *parseLineStart() {
3732
- const e = this.charAt(0);
3733
- if (!e && !this.atEnd)
3734
- return this.setNext("line-start");
3735
- if (e === "-" || e === ".") {
3736
- if (!this.atEnd && !this.hasChars(4))
3737
- return this.setNext("line-start");
3738
- const t = this.peek(3);
3739
- if ((t === "---" || t === "...") && K(this.charAt(3)))
3740
- return yield* this.pushCount(3), this.indentValue = 0, this.indentNext = 0, t === "---" ? "doc" : "stream";
3741
- }
3742
- return this.indentValue = yield* this.pushSpaces(!1), this.indentNext > this.indentValue && !K(this.charAt(1)) && (this.indentNext = this.indentValue), yield* this.parseBlockStart();
3743
- }
3744
- *parseBlockStart() {
3745
- const [e, t] = this.peek(2);
3746
- if (!t && !this.atEnd)
3747
- return this.setNext("block-start");
3748
- if ((e === "-" || e === "?" || e === ":") && K(t)) {
3749
- const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(!0));
3750
- return this.indentNext = this.indentValue + 1, this.indentValue += n, yield* this.parseBlockStart();
3751
- }
3752
- return "doc";
3753
- }
3754
- *parseDocument() {
3755
- yield* this.pushSpaces(!0);
3756
- const e = this.getLine();
3757
- if (e === null)
3758
- return this.setNext("doc");
3759
- let t = yield* this.pushIndicators();
3760
- switch (e[t]) {
3761
- case "#":
3762
- yield* this.pushCount(e.length - t);
3763
- case void 0:
3764
- return yield* this.pushNewline(), yield* this.parseLineStart();
3765
- case "{":
3766
- case "[":
3767
- return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel = 1, "flow";
3768
- case "}":
3769
- case "]":
3770
- return yield* this.pushCount(1), "doc";
3771
- case "*":
3772
- return yield* this.pushUntil(it), "doc";
3773
- case '"':
3774
- case "'":
3775
- return yield* this.parseQuotedScalar();
3776
- case "|":
3777
- case ">":
3778
- return t += yield* this.parseBlockScalarHeader(), t += yield* this.pushSpaces(!0), yield* this.pushCount(e.length - t), yield* this.pushNewline(), yield* this.parseBlockScalar();
3779
- default:
3780
- return yield* this.parsePlainScalar();
3781
- }
3782
- }
3783
- *parseFlowCollection() {
3784
- let e, t, n = -1;
3785
- do
3786
- e = yield* this.pushNewline(), e > 0 ? (t = yield* this.pushSpaces(!1), this.indentValue = n = t) : t = 0, t += yield* this.pushSpaces(!0);
3787
- while (e + t > 0);
3788
- const i = this.getLine();
3789
- if (i === null)
3790
- return this.setNext("flow");
3791
- if ((n !== -1 && n < this.indentNext && i[0] !== "#" || n === 0 && (i.startsWith("---") || i.startsWith("...")) && K(i[3])) && !(n === this.indentNext - 1 && this.flowLevel === 1 && (i[0] === "]" || i[0] === "}")))
3792
- return this.flowLevel = 0, yield ze, yield* this.parseLineStart();
3793
- let r = 0;
3794
- for (; i[r] === ","; )
3795
- r += yield* this.pushCount(1), r += yield* this.pushSpaces(!0), this.flowKey = !1;
3796
- switch (r += yield* this.pushIndicators(), i[r]) {
3797
- case void 0:
3798
- return "flow";
3799
- case "#":
3800
- return yield* this.pushCount(i.length - r), "flow";
3801
- case "{":
3802
- case "[":
3803
- return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel += 1, "flow";
3804
- case "}":
3805
- case "]":
3806
- return yield* this.pushCount(1), this.flowKey = !0, this.flowLevel -= 1, this.flowLevel ? "flow" : "doc";
3807
- case "*":
3808
- return yield* this.pushUntil(it), "flow";
3809
- case '"':
3810
- case "'":
3811
- return this.flowKey = !0, yield* this.parseQuotedScalar();
3812
- case ":": {
3813
- const o = this.charAt(1);
3814
- if (this.flowKey || K(o) || o === ",")
3815
- return this.flowKey = !1, yield* this.pushCount(1), yield* this.pushSpaces(!0), "flow";
3816
- }
3817
- default:
3818
- return this.flowKey = !1, yield* this.parsePlainScalar();
3819
- }
3820
- }
3821
- *parseQuotedScalar() {
3822
- const e = this.charAt(0);
3823
- let t = this.buffer.indexOf(e, this.pos + 1);
3824
- if (e === "'")
3825
- for (; t !== -1 && this.buffer[t + 1] === "'"; )
3826
- t = this.buffer.indexOf("'", t + 2);
3827
- else
3828
- for (; t !== -1; ) {
3829
- let r = 0;
3830
- for (; this.buffer[t - 1 - r] === "\\"; )
3831
- r += 1;
3832
- if (r % 2 === 0)
3833
- break;
3834
- t = this.buffer.indexOf('"', t + 1);
3835
- }
3836
- const n = this.buffer.substring(0, t);
3837
- let i = n.indexOf(`
3838
- `, this.pos);
3839
- if (i !== -1) {
3840
- for (; i !== -1; ) {
3841
- const r = this.continueScalar(i + 1);
3842
- if (r === -1)
3843
- break;
3844
- i = n.indexOf(`
3845
- `, r);
3846
- }
3847
- i !== -1 && (t = i - (n[i - 1] === "\r" ? 2 : 1));
3848
- }
3849
- if (t === -1) {
3850
- if (!this.atEnd)
3851
- return this.setNext("quoted-scalar");
3852
- t = this.buffer.length;
3853
- }
3854
- return yield* this.pushToIndex(t + 1, !1), this.flowLevel ? "flow" : "doc";
3855
- }
3856
- *parseBlockScalarHeader() {
3857
- this.blockScalarIndent = -1, this.blockScalarKeep = !1;
3858
- let e = this.pos;
3859
- for (; ; ) {
3860
- const t = this.buffer[++e];
3861
- if (t === "+")
3862
- this.blockScalarKeep = !0;
3863
- else if (t > "0" && t <= "9")
3864
- this.blockScalarIndent = Number(t) - 1;
3865
- else if (t !== "-")
3866
- break;
3867
- }
3868
- return yield* this.pushUntil((t) => K(t) || t === "#");
3869
- }
3870
- *parseBlockScalar() {
3871
- let e = this.pos - 1, t = 0, n;
3872
- e: for (let r = this.pos; n = this.buffer[r]; ++r)
3873
- switch (n) {
3874
- case " ":
3875
- t += 1;
3876
- break;
3877
- case `
3878
- `:
3879
- e = r, t = 0;
3880
- break;
3881
- case "\r": {
3882
- const o = this.buffer[r + 1];
3883
- if (!o && !this.atEnd)
3884
- return this.setNext("block-scalar");
3885
- if (o === `
3886
- `)
3887
- break;
3888
- }
3889
- default:
3890
- break e;
3891
- }
3892
- if (!n && !this.atEnd)
3893
- return this.setNext("block-scalar");
3894
- if (t >= this.indentNext) {
3895
- this.blockScalarIndent === -1 ? this.indentNext = t : this.indentNext = this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext);
3896
- do {
3897
- const r = this.continueScalar(e + 1);
3898
- if (r === -1)
3899
- break;
3900
- e = this.buffer.indexOf(`
3901
- `, r);
3902
- } while (e !== -1);
3903
- if (e === -1) {
3904
- if (!this.atEnd)
3905
- return this.setNext("block-scalar");
3906
- e = this.buffer.length;
3907
- }
3908
- }
3909
- let i = e + 1;
3910
- for (n = this.buffer[i]; n === " "; )
3911
- n = this.buffer[++i];
3912
- if (n === " ") {
3913
- for (; n === " " || n === " " || n === "\r" || n === `
3914
- `; )
3915
- n = this.buffer[++i];
3916
- e = i - 1;
3917
- } else if (!this.blockScalarKeep)
3918
- do {
3919
- let r = e - 1, o = this.buffer[r];
3920
- o === "\r" && (o = this.buffer[--r]);
3921
- const l = r;
3922
- for (; o === " "; )
3923
- o = this.buffer[--r];
3924
- if (o === `
3925
- ` && r >= this.pos && r + 1 + t > l)
3926
- e = r;
3927
- else
3928
- break;
3929
- } while (!0);
3930
- return yield Ne, yield* this.pushToIndex(e + 1, !0), yield* this.parseLineStart();
3931
- }
3932
- *parsePlainScalar() {
3933
- const e = this.flowLevel > 0;
3934
- let t = this.pos - 1, n = this.pos - 1, i;
3935
- for (; i = this.buffer[++n]; )
3936
- if (i === ":") {
3937
- const r = this.buffer[n + 1];
3938
- if (K(r) || e && Le.has(r))
3939
- break;
3940
- t = n;
3941
- } else if (K(i)) {
3942
- let r = this.buffer[n + 1];
3943
- if (i === "\r" && (r === `
3944
- ` ? (n += 1, i = `
3945
- `, r = this.buffer[n + 1]) : t = n), r === "#" || e && Le.has(r))
3946
- break;
3947
- if (i === `
3948
- `) {
3949
- const o = this.continueScalar(n + 1);
3950
- if (o === -1)
3951
- break;
3952
- n = Math.max(n, o - 2);
3953
- }
3954
- } else {
3955
- if (e && Le.has(i))
3956
- break;
3957
- t = n;
3958
- }
3959
- return !i && !this.atEnd ? this.setNext("plain-scalar") : (yield Ne, yield* this.pushToIndex(t + 1, !0), e ? "flow" : "doc");
3960
- }
3961
- *pushCount(e) {
3962
- return e > 0 ? (yield this.buffer.substr(this.pos, e), this.pos += e, e) : 0;
3963
- }
3964
- *pushToIndex(e, t) {
3965
- const n = this.buffer.slice(this.pos, e);
3966
- return n ? (yield n, this.pos += n.length, n.length) : (t && (yield ""), 0);
3967
- }
3968
- *pushIndicators() {
3969
- switch (this.charAt(0)) {
3970
- case "!":
3971
- return (yield* this.pushTag()) + (yield* this.pushSpaces(!0)) + (yield* this.pushIndicators());
3972
- case "&":
3973
- return (yield* this.pushUntil(it)) + (yield* this.pushSpaces(!0)) + (yield* this.pushIndicators());
3974
- case "-":
3975
- case "?":
3976
- case ":": {
3977
- const e = this.flowLevel > 0, t = this.charAt(1);
3978
- if (K(t) || e && Le.has(t))
3979
- return e ? this.flowKey && (this.flowKey = !1) : this.indentNext = this.indentValue + 1, (yield* this.pushCount(1)) + (yield* this.pushSpaces(!0)) + (yield* this.pushIndicators());
3980
- }
3981
- }
3982
- return 0;
3983
- }
3984
- *pushTag() {
3985
- if (this.charAt(1) === "<") {
3986
- let e = this.pos + 2, t = this.buffer[e];
3987
- for (; !K(t) && t !== ">"; )
3988
- t = this.buffer[++e];
3989
- return yield* this.pushToIndex(t === ">" ? e + 1 : e, !1);
3990
- } else {
3991
- let e = this.pos + 1, t = this.buffer[e];
3992
- for (; t; )
3993
- if (Mn.has(t))
3994
- t = this.buffer[++e];
3995
- else if (t === "%" && Mt.has(this.buffer[e + 1]) && Mt.has(this.buffer[e + 2]))
3996
- t = this.buffer[e += 3];
3997
- else
3998
- break;
3999
- return yield* this.pushToIndex(e, !1);
4000
- }
4001
- }
4002
- *pushNewline() {
4003
- const e = this.buffer[this.pos];
4004
- return e === `
4005
- ` ? yield* this.pushCount(1) : e === "\r" && this.charAt(1) === `
4006
- ` ? yield* this.pushCount(2) : 0;
4007
- }
4008
- *pushSpaces(e) {
4009
- let t = this.pos - 1, n;
4010
- do
4011
- n = this.buffer[++t];
4012
- while (n === " " || e && n === " ");
4013
- const i = t - this.pos;
4014
- return i > 0 && (yield this.buffer.substr(this.pos, i), this.pos = t), i;
4015
- }
4016
- *pushUntil(e) {
4017
- let t = this.pos, n = this.buffer[t];
4018
- for (; !e(n); )
4019
- n = this.buffer[++t];
4020
- return yield* this.pushToIndex(t, !1);
4021
- }
4022
- }
4023
- class Es {
4024
- constructor() {
4025
- this.lineStarts = [], this.addNewLine = (e) => this.lineStarts.push(e), this.linePos = (e) => {
4026
- let t = 0, n = this.lineStarts.length;
4027
- for (; t < n; ) {
4028
- const r = t + n >> 1;
4029
- this.lineStarts[r] < e ? t = r + 1 : n = r;
4030
- }
4031
- if (this.lineStarts[t] === e)
4032
- return { line: t + 1, col: 1 };
4033
- if (t === 0)
4034
- return { line: 0, col: e };
4035
- const i = this.lineStarts[t - 1];
4036
- return { line: t, col: e - i + 1 };
4037
- };
4038
- }
4039
- }
4040
- function Q(s, e) {
4041
- for (let t = 0; t < s.length; ++t)
4042
- if (s[t].type === e)
4043
- return !0;
4044
- return !1;
4045
- }
4046
- function Pt(s) {
4047
- for (let e = 0; e < s.length; ++e)
4048
- switch (s[e].type) {
4049
- case "space":
4050
- case "comment":
4051
- case "newline":
4052
- break;
4053
- default:
4054
- return e;
4055
- }
4056
- return -1;
4057
- }
4058
- function Is(s) {
4059
- switch (s == null ? void 0 : s.type) {
4060
- case "alias":
4061
- case "scalar":
4062
- case "single-quoted-scalar":
4063
- case "double-quoted-scalar":
4064
- case "flow-collection":
4065
- return !0;
4066
- default:
4067
- return !1;
4068
- }
4069
- }
4070
- function $e(s) {
4071
- switch (s.type) {
4072
- case "document":
4073
- return s.start;
4074
- case "block-map": {
4075
- const e = s.items[s.items.length - 1];
4076
- return e.sep ?? e.start;
4077
- }
4078
- case "block-seq":
4079
- return s.items[s.items.length - 1].start;
4080
- default:
4081
- return [];
4082
- }
4083
- }
4084
- function te(s) {
4085
- var t;
4086
- if (s.length === 0)
4087
- return [];
4088
- let e = s.length;
4089
- e: for (; --e >= 0; )
4090
- switch (s[e].type) {
4091
- case "doc-start":
4092
- case "explicit-key-ind":
4093
- case "map-value-ind":
4094
- case "seq-item-ind":
4095
- case "newline":
4096
- break e;
4097
- }
4098
- for (; ((t = s[++e]) == null ? void 0 : t.type) === "space"; )
4099
- ;
4100
- return s.splice(e, s.length);
4101
- }
4102
- function Dt(s) {
4103
- if (s.start.type === "flow-seq-start")
4104
- for (const e of s.items)
4105
- e.sep && !e.value && !Q(e.start, "explicit-key-ind") && !Q(e.sep, "map-value-ind") && (e.key && (e.value = e.key), delete e.key, Is(e.value) ? e.value.end ? Array.prototype.push.apply(e.value.end, e.sep) : e.value.end = e.sep : Array.prototype.push.apply(e.start, e.sep), delete e.sep);
4106
- }
4107
- class Et {
4108
- /**
4109
- * @param onNewLine - If defined, called separately with the start position of
4110
- * each new line (in `parse()`, including the start of input).
4111
- */
4112
- constructor(e) {
4113
- this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new As(), this.onNewLine = e;
4114
- }
4115
- /**
4116
- * Parse `source` as a YAML stream.
4117
- * If `incomplete`, a part of the last line may be left as a buffer for the next call.
4118
- *
4119
- * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens.
4120
- *
4121
- * @returns A generator of tokens representing each directive, document, and other structure.
4122
- */
4123
- *parse(e, t = !1) {
4124
- this.onNewLine && this.offset === 0 && this.onNewLine(0);
4125
- for (const n of this.lexer.lex(e, t))
4126
- yield* this.next(n);
4127
- t || (yield* this.end());
4128
- }
4129
- /**
4130
- * Advance the parser by the `source` of one lexical token.
4131
- */
4132
- *next(e) {
4133
- if (this.source = e, this.atScalar) {
4134
- this.atScalar = !1, yield* this.step(), this.offset += e.length;
4135
- return;
4136
- }
4137
- const t = Os(e);
4138
- if (t)
4139
- if (t === "scalar")
4140
- this.atNewLine = !1, this.atScalar = !0, this.type = "scalar";
4141
- else {
4142
- switch (this.type = t, yield* this.step(), t) {
4143
- case "newline":
4144
- this.atNewLine = !0, this.indent = 0, this.onNewLine && this.onNewLine(this.offset + e.length);
4145
- break;
4146
- case "space":
4147
- this.atNewLine && e[0] === " " && (this.indent += e.length);
4148
- break;
4149
- case "explicit-key-ind":
4150
- case "map-value-ind":
4151
- case "seq-item-ind":
4152
- this.atNewLine && (this.indent += e.length);
4153
- break;
4154
- case "doc-mode":
4155
- case "flow-error-end":
4156
- return;
4157
- default:
4158
- this.atNewLine = !1;
4159
- }
4160
- this.offset += e.length;
4161
- }
4162
- else {
4163
- const n = `Not a YAML token: ${e}`;
4164
- yield* this.pop({ type: "error", offset: this.offset, message: n, source: e }), this.offset += e.length;
4165
- }
4166
- }
4167
- /** Call at end of input to push out any remaining constructions */
4168
- *end() {
4169
- for (; this.stack.length > 0; )
4170
- yield* this.pop();
4171
- }
4172
- get sourceToken() {
4173
- return {
4174
- type: this.type,
4175
- offset: this.offset,
4176
- indent: this.indent,
4177
- source: this.source
4178
- };
4179
- }
4180
- *step() {
4181
- const e = this.peek(1);
4182
- if (this.type === "doc-end" && (!e || e.type !== "doc-end")) {
4183
- for (; this.stack.length > 0; )
4184
- yield* this.pop();
4185
- this.stack.push({
4186
- type: "doc-end",
4187
- offset: this.offset,
4188
- source: this.source
4189
- });
4190
- return;
4191
- }
4192
- if (!e)
4193
- return yield* this.stream();
4194
- switch (e.type) {
4195
- case "document":
4196
- return yield* this.document(e);
4197
- case "alias":
4198
- case "scalar":
4199
- case "single-quoted-scalar":
4200
- case "double-quoted-scalar":
4201
- return yield* this.scalar(e);
4202
- case "block-scalar":
4203
- return yield* this.blockScalar(e);
4204
- case "block-map":
4205
- return yield* this.blockMap(e);
4206
- case "block-seq":
4207
- return yield* this.blockSequence(e);
4208
- case "flow-collection":
4209
- return yield* this.flowCollection(e);
4210
- case "doc-end":
4211
- return yield* this.documentEnd(e);
4212
- }
4213
- yield* this.pop();
4214
- }
4215
- peek(e) {
4216
- return this.stack[this.stack.length - e];
4217
- }
4218
- *pop(e) {
4219
- const t = e ?? this.stack.pop();
4220
- if (!t)
4221
- yield { type: "error", offset: this.offset, source: "", message: "Tried to pop an empty stack" };
4222
- else if (this.stack.length === 0)
4223
- yield t;
4224
- else {
4225
- const n = this.peek(1);
4226
- switch (t.type === "block-scalar" ? t.indent = "indent" in n ? n.indent : 0 : t.type === "flow-collection" && n.type === "document" && (t.indent = 0), t.type === "flow-collection" && Dt(t), n.type) {
4227
- case "document":
4228
- n.value = t;
4229
- break;
4230
- case "block-scalar":
4231
- n.props.push(t);
4232
- break;
4233
- case "block-map": {
4234
- const i = n.items[n.items.length - 1];
4235
- if (i.value) {
4236
- n.items.push({ start: [], key: t, sep: [] }), this.onKeyLine = !0;
4237
- return;
4238
- } else if (i.sep)
4239
- i.value = t;
4240
- else {
4241
- Object.assign(i, { key: t, sep: [] }), this.onKeyLine = !i.explicitKey;
4242
- return;
4243
- }
4244
- break;
4245
- }
4246
- case "block-seq": {
4247
- const i = n.items[n.items.length - 1];
4248
- i.value ? n.items.push({ start: [], value: t }) : i.value = t;
4249
- break;
4250
- }
4251
- case "flow-collection": {
4252
- const i = n.items[n.items.length - 1];
4253
- !i || i.value ? n.items.push({ start: [], key: t, sep: [] }) : i.sep ? i.value = t : Object.assign(i, { key: t, sep: [] });
4254
- return;
4255
- }
4256
- default:
4257
- yield* this.pop(), yield* this.pop(t);
4258
- }
4259
- if ((n.type === "document" || n.type === "block-map" || n.type === "block-seq") && (t.type === "block-map" || t.type === "block-seq")) {
4260
- const i = t.items[t.items.length - 1];
4261
- i && !i.sep && !i.value && i.start.length > 0 && Pt(i.start) === -1 && (t.indent === 0 || i.start.every((r) => r.type !== "comment" || r.indent < t.indent)) && (n.type === "document" ? n.end = i.start : n.items.push({ start: i.start }), t.items.splice(-1, 1));
4262
- }
4263
- }
4264
- }
4265
- *stream() {
4266
- switch (this.type) {
4267
- case "directive-line":
4268
- yield { type: "directive", offset: this.offset, source: this.source };
4269
- return;
4270
- case "byte-order-mark":
4271
- case "space":
4272
- case "comment":
4273
- case "newline":
4274
- yield this.sourceToken;
4275
- return;
4276
- case "doc-mode":
4277
- case "doc-start": {
4278
- const e = {
4279
- type: "document",
4280
- offset: this.offset,
4281
- start: []
4282
- };
4283
- this.type === "doc-start" && e.start.push(this.sourceToken), this.stack.push(e);
4284
- return;
4285
- }
4286
- }
4287
- yield {
4288
- type: "error",
4289
- offset: this.offset,
4290
- message: `Unexpected ${this.type} token in YAML stream`,
4291
- source: this.source
4292
- };
4293
- }
4294
- *document(e) {
4295
- if (e.value)
4296
- return yield* this.lineEnd(e);
4297
- switch (this.type) {
4298
- case "doc-start": {
4299
- Pt(e.start) !== -1 ? (yield* this.pop(), yield* this.step()) : e.start.push(this.sourceToken);
4300
- return;
4301
- }
4302
- case "anchor":
4303
- case "tag":
4304
- case "space":
4305
- case "comment":
4306
- case "newline":
4307
- e.start.push(this.sourceToken);
4308
- return;
4309
- }
4310
- const t = this.startBlockValue(e);
4311
- t ? this.stack.push(t) : yield {
4312
- type: "error",
4313
- offset: this.offset,
4314
- message: `Unexpected ${this.type} token in YAML document`,
4315
- source: this.source
4316
- };
4317
- }
4318
- *scalar(e) {
4319
- if (this.type === "map-value-ind") {
4320
- const t = $e(this.peek(2)), n = te(t);
4321
- let i;
4322
- e.end ? (i = e.end, i.push(this.sourceToken), delete e.end) : i = [this.sourceToken];
4323
- const r = {
4324
- type: "block-map",
4325
- offset: e.offset,
4326
- indent: e.indent,
4327
- items: [{ start: n, key: e, sep: i }]
4328
- };
4329
- this.onKeyLine = !0, this.stack[this.stack.length - 1] = r;
4330
- } else
4331
- yield* this.lineEnd(e);
4332
- }
4333
- *blockScalar(e) {
4334
- switch (this.type) {
4335
- case "space":
4336
- case "comment":
4337
- case "newline":
4338
- e.props.push(this.sourceToken);
4339
- return;
4340
- case "scalar":
4341
- if (e.source = this.source, this.atNewLine = !0, this.indent = 0, this.onNewLine) {
4342
- let t = this.source.indexOf(`
4343
- `) + 1;
4344
- for (; t !== 0; )
4345
- this.onNewLine(this.offset + t), t = this.source.indexOf(`
4346
- `, t) + 1;
4347
- }
4348
- yield* this.pop();
4349
- break;
4350
- default:
4351
- yield* this.pop(), yield* this.step();
4352
- }
4353
- }
4354
- *blockMap(e) {
4355
- var n;
4356
- const t = e.items[e.items.length - 1];
4357
- switch (this.type) {
4358
- case "newline":
4359
- if (this.onKeyLine = !1, t.value) {
4360
- const i = "end" in t.value ? t.value.end : void 0, r = Array.isArray(i) ? i[i.length - 1] : void 0;
4361
- (r == null ? void 0 : r.type) === "comment" ? i == null || i.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
4362
- } else t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
4363
- return;
4364
- case "space":
4365
- case "comment":
4366
- if (t.value)
4367
- e.items.push({ start: [this.sourceToken] });
4368
- else if (t.sep)
4369
- t.sep.push(this.sourceToken);
4370
- else {
4371
- if (this.atIndentedComment(t.start, e.indent)) {
4372
- const i = e.items[e.items.length - 2], r = (n = i == null ? void 0 : i.value) == null ? void 0 : n.end;
4373
- if (Array.isArray(r)) {
4374
- Array.prototype.push.apply(r, t.start), r.push(this.sourceToken), e.items.pop();
4375
- return;
4376
- }
4377
- }
4378
- t.start.push(this.sourceToken);
4379
- }
4380
- return;
4381
- }
4382
- if (this.indent >= e.indent) {
4383
- const i = !this.onKeyLine && this.indent === e.indent, r = i && (t.sep || t.explicitKey) && this.type !== "seq-item-ind";
4384
- let o = [];
4385
- if (r && t.sep && !t.value) {
4386
- const l = [];
4387
- for (let a = 0; a < t.sep.length; ++a) {
4388
- const c = t.sep[a];
4389
- switch (c.type) {
4390
- case "newline":
4391
- l.push(a);
4392
- break;
4393
- case "space":
4394
- break;
4395
- case "comment":
4396
- c.indent > e.indent && (l.length = 0);
4397
- break;
4398
- default:
4399
- l.length = 0;
4400
- }
4401
- }
4402
- l.length >= 2 && (o = t.sep.splice(l[1]));
4403
- }
4404
- switch (this.type) {
4405
- case "anchor":
4406
- case "tag":
4407
- r || t.value ? (o.push(this.sourceToken), e.items.push({ start: o }), this.onKeyLine = !0) : t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
4408
- return;
4409
- case "explicit-key-ind":
4410
- !t.sep && !t.explicitKey ? (t.start.push(this.sourceToken), t.explicitKey = !0) : r || t.value ? (o.push(this.sourceToken), e.items.push({ start: o, explicitKey: !0 })) : this.stack.push({
4411
- type: "block-map",
4412
- offset: this.offset,
4413
- indent: this.indent,
4414
- items: [{ start: [this.sourceToken], explicitKey: !0 }]
4415
- }), this.onKeyLine = !0;
4416
- return;
4417
- case "map-value-ind":
4418
- if (t.explicitKey)
4419
- if (t.sep)
4420
- if (t.value)
4421
- e.items.push({ start: [], key: null, sep: [this.sourceToken] });
4422
- else if (Q(t.sep, "map-value-ind"))
4423
- this.stack.push({
4424
- type: "block-map",
4425
- offset: this.offset,
4426
- indent: this.indent,
4427
- items: [{ start: o, key: null, sep: [this.sourceToken] }]
4428
- });
4429
- else if (Is(t.key) && !Q(t.sep, "newline")) {
4430
- const l = te(t.start), a = t.key, c = t.sep;
4431
- c.push(this.sourceToken), delete t.key, delete t.sep, this.stack.push({
4432
- type: "block-map",
4433
- offset: this.offset,
4434
- indent: this.indent,
4435
- items: [{ start: l, key: a, sep: c }]
4436
- });
4437
- } else o.length > 0 ? t.sep = t.sep.concat(o, this.sourceToken) : t.sep.push(this.sourceToken);
4438
- else if (Q(t.start, "newline"))
4439
- Object.assign(t, { key: null, sep: [this.sourceToken] });
4440
- else {
4441
- const l = te(t.start);
4442
- this.stack.push({
4443
- type: "block-map",
4444
- offset: this.offset,
4445
- indent: this.indent,
4446
- items: [{ start: l, key: null, sep: [this.sourceToken] }]
4447
- });
4448
- }
4449
- else
4450
- t.sep ? t.value || r ? e.items.push({ start: o, key: null, sep: [this.sourceToken] }) : Q(t.sep, "map-value-ind") ? this.stack.push({
4451
- type: "block-map",
4452
- offset: this.offset,
4453
- indent: this.indent,
4454
- items: [{ start: [], key: null, sep: [this.sourceToken] }]
4455
- }) : t.sep.push(this.sourceToken) : Object.assign(t, { key: null, sep: [this.sourceToken] });
4456
- this.onKeyLine = !0;
4457
- return;
4458
- case "alias":
4459
- case "scalar":
4460
- case "single-quoted-scalar":
4461
- case "double-quoted-scalar": {
4462
- const l = this.flowScalar(this.type);
4463
- r || t.value ? (e.items.push({ start: o, key: l, sep: [] }), this.onKeyLine = !0) : t.sep ? this.stack.push(l) : (Object.assign(t, { key: l, sep: [] }), this.onKeyLine = !0);
4464
- return;
4465
- }
4466
- default: {
4467
- const l = this.startBlockValue(e);
4468
- if (l) {
4469
- i && l.type !== "block-seq" && e.items.push({ start: o }), this.stack.push(l);
4470
- return;
4471
- }
4472
- }
4473
- }
4474
- }
4475
- yield* this.pop(), yield* this.step();
4476
- }
4477
- *blockSequence(e) {
4478
- var n;
4479
- const t = e.items[e.items.length - 1];
4480
- switch (this.type) {
4481
- case "newline":
4482
- if (t.value) {
4483
- const i = "end" in t.value ? t.value.end : void 0, r = Array.isArray(i) ? i[i.length - 1] : void 0;
4484
- (r == null ? void 0 : r.type) === "comment" ? i == null || i.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
4485
- } else
4486
- t.start.push(this.sourceToken);
4487
- return;
4488
- case "space":
4489
- case "comment":
4490
- if (t.value)
4491
- e.items.push({ start: [this.sourceToken] });
4492
- else {
4493
- if (this.atIndentedComment(t.start, e.indent)) {
4494
- const i = e.items[e.items.length - 2], r = (n = i == null ? void 0 : i.value) == null ? void 0 : n.end;
4495
- if (Array.isArray(r)) {
4496
- Array.prototype.push.apply(r, t.start), r.push(this.sourceToken), e.items.pop();
4497
- return;
4498
- }
4499
- }
4500
- t.start.push(this.sourceToken);
4501
- }
4502
- return;
4503
- case "anchor":
4504
- case "tag":
4505
- if (t.value || this.indent <= e.indent)
4506
- break;
4507
- t.start.push(this.sourceToken);
4508
- return;
4509
- case "seq-item-ind":
4510
- if (this.indent !== e.indent)
4511
- break;
4512
- t.value || Q(t.start, "seq-item-ind") ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
4513
- return;
4514
- }
4515
- if (this.indent > e.indent) {
4516
- const i = this.startBlockValue(e);
4517
- if (i) {
4518
- this.stack.push(i);
4519
- return;
4520
- }
4521
- }
4522
- yield* this.pop(), yield* this.step();
4523
- }
4524
- *flowCollection(e) {
4525
- const t = e.items[e.items.length - 1];
4526
- if (this.type === "flow-error-end") {
4527
- let n;
4528
- do
4529
- yield* this.pop(), n = this.peek(1);
4530
- while (n && n.type === "flow-collection");
4531
- } else if (e.end.length === 0) {
4532
- switch (this.type) {
4533
- case "comma":
4534
- case "explicit-key-ind":
4535
- !t || t.sep ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
4536
- return;
4537
- case "map-value-ind":
4538
- !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] });
4539
- return;
4540
- case "space":
4541
- case "comment":
4542
- case "newline":
4543
- case "anchor":
4544
- case "tag":
4545
- !t || t.value ? e.items.push({ start: [this.sourceToken] }) : t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
4546
- return;
4547
- case "alias":
4548
- case "scalar":
4549
- case "single-quoted-scalar":
4550
- case "double-quoted-scalar": {
4551
- const i = this.flowScalar(this.type);
4552
- !t || t.value ? e.items.push({ start: [], key: i, sep: [] }) : t.sep ? this.stack.push(i) : Object.assign(t, { key: i, sep: [] });
4553
- return;
4554
- }
4555
- case "flow-map-end":
4556
- case "flow-seq-end":
4557
- e.end.push(this.sourceToken);
4558
- return;
4559
- }
4560
- const n = this.startBlockValue(e);
4561
- n ? this.stack.push(n) : (yield* this.pop(), yield* this.step());
4562
- } else {
4563
- const n = this.peek(2);
4564
- if (n.type === "block-map" && (this.type === "map-value-ind" && n.indent === e.indent || this.type === "newline" && !n.items[n.items.length - 1].sep))
4565
- yield* this.pop(), yield* this.step();
4566
- else if (this.type === "map-value-ind" && n.type !== "flow-collection") {
4567
- const i = $e(n), r = te(i);
4568
- Dt(e);
4569
- const o = e.end.splice(1, e.end.length);
4570
- o.push(this.sourceToken);
4571
- const l = {
4572
- type: "block-map",
4573
- offset: e.offset,
4574
- indent: e.indent,
4575
- items: [{ start: r, key: e, sep: o }]
4576
- };
4577
- this.onKeyLine = !0, this.stack[this.stack.length - 1] = l;
4578
- } else
4579
- yield* this.lineEnd(e);
4580
- }
4581
- }
4582
- flowScalar(e) {
4583
- if (this.onNewLine) {
4584
- let t = this.source.indexOf(`
4585
- `) + 1;
4586
- for (; t !== 0; )
4587
- this.onNewLine(this.offset + t), t = this.source.indexOf(`
4588
- `, t) + 1;
4589
- }
4590
- return {
4591
- type: e,
4592
- offset: this.offset,
4593
- indent: this.indent,
4594
- source: this.source
4595
- };
4596
- }
4597
- startBlockValue(e) {
4598
- switch (this.type) {
4599
- case "alias":
4600
- case "scalar":
4601
- case "single-quoted-scalar":
4602
- case "double-quoted-scalar":
4603
- return this.flowScalar(this.type);
4604
- case "block-scalar-header":
4605
- return {
4606
- type: "block-scalar",
4607
- offset: this.offset,
4608
- indent: this.indent,
4609
- props: [this.sourceToken],
4610
- source: ""
4611
- };
4612
- case "flow-map-start":
4613
- case "flow-seq-start":
4614
- return {
4615
- type: "flow-collection",
4616
- offset: this.offset,
4617
- indent: this.indent,
4618
- start: this.sourceToken,
4619
- items: [],
4620
- end: []
4621
- };
4622
- case "seq-item-ind":
4623
- return {
4624
- type: "block-seq",
4625
- offset: this.offset,
4626
- indent: this.indent,
4627
- items: [{ start: [this.sourceToken] }]
4628
- };
4629
- case "explicit-key-ind": {
4630
- this.onKeyLine = !0;
4631
- const t = $e(e), n = te(t);
4632
- return n.push(this.sourceToken), {
4633
- type: "block-map",
4634
- offset: this.offset,
4635
- indent: this.indent,
4636
- items: [{ start: n, explicitKey: !0 }]
4637
- };
4638
- }
4639
- case "map-value-ind": {
4640
- this.onKeyLine = !0;
4641
- const t = $e(e), n = te(t);
4642
- return {
4643
- type: "block-map",
4644
- offset: this.offset,
4645
- indent: this.indent,
4646
- items: [{ start: n, key: null, sep: [this.sourceToken] }]
4647
- };
4648
- }
4649
- }
4650
- return null;
4651
- }
4652
- atIndentedComment(e, t) {
4653
- return this.type !== "comment" || this.indent <= t ? !1 : e.every((n) => n.type === "newline" || n.type === "space");
4654
- }
4655
- *documentEnd(e) {
4656
- this.type !== "doc-mode" && (e.end ? e.end.push(this.sourceToken) : e.end = [this.sourceToken], this.type === "newline" && (yield* this.pop()));
4657
- }
4658
- *lineEnd(e) {
4659
- switch (this.type) {
4660
- case "comma":
4661
- case "doc-start":
4662
- case "doc-end":
4663
- case "flow-seq-end":
4664
- case "flow-map-end":
4665
- case "map-value-ind":
4666
- yield* this.pop(), yield* this.step();
4667
- break;
4668
- case "newline":
4669
- this.onKeyLine = !1;
4670
- case "space":
4671
- case "comment":
4672
- default:
4673
- e.end ? e.end.push(this.sourceToken) : e.end = [this.sourceToken], this.type === "newline" && (yield* this.pop());
4674
- }
4675
- }
4676
- }
4677
- function Ts(s) {
4678
- const e = s.prettyErrors !== !1;
4679
- return { lineCounter: s.lineCounter || e && new Es() || null, prettyErrors: e };
4680
- }
4681
- function Dn(s, e = {}) {
4682
- const { lineCounter: t, prettyErrors: n } = Ts(e), i = new Et(t == null ? void 0 : t.addNewLine), r = new At(e), o = Array.from(r.compose(i.parse(s)));
4683
- if (n && t)
4684
- for (const l of o)
4685
- l.errors.forEach(De(s, t)), l.warnings.forEach(De(s, t));
4686
- return o.length > 0 ? o : Object.assign([], { empty: !0 }, r.streamInfo());
4687
- }
4688
- function Ls(s, e = {}) {
4689
- const { lineCounter: t, prettyErrors: n } = Ts(e), i = new Et(t == null ? void 0 : t.addNewLine), r = new At(e);
4690
- let o = null;
4691
- for (const l of r.compose(i.parse(s), !0, s.length))
4692
- if (!o)
4693
- o = l;
4694
- else if (o.options.logLevel !== "silent") {
4695
- o.errors.push(new X(l.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
4696
- break;
4697
- }
4698
- return n && t && (o.errors.forEach(De(s, t)), o.warnings.forEach(De(s, t))), o;
4699
- }
4700
- function jn(s, e, t) {
4701
- let n;
4702
- typeof e == "function" ? n = e : t === void 0 && e && typeof e == "object" && (t = e);
4703
- const i = Ls(s, t);
4704
- if (!i)
4705
- return null;
4706
- if (i.warnings.forEach((r) => Ht(i.options.logLevel, r)), i.errors.length > 0) {
4707
- if (i.options.logLevel !== "silent")
4708
- throw i.errors[0];
4709
- i.errors = [];
4710
- }
4711
- return i.toJS(Object.assign({ reviver: n }, t));
4712
- }
4713
- function Kn(s, e, t) {
4714
- let n = null;
4715
- if (typeof e == "function" || Array.isArray(e) ? n = e : t === void 0 && e && (t = e), typeof t == "string" && (t = t.length), typeof t == "number") {
4716
- const i = Math.round(t);
4717
- t = i < 1 ? void 0 : i > 8 ? { indent: 8 } : { indent: i };
4718
- }
4719
- if (s === void 0) {
4720
- const { keepUndefined: i } = t ?? e ?? {};
4721
- if (!i)
4722
- return;
4723
- }
4724
- return new ye(s, n, t).toString(t);
4725
- }
4726
- var qn = /* @__PURE__ */ Object.freeze({
4727
- __proto__: null,
4728
- Alias: qe,
4729
- CST: Bn,
4730
- Composer: At,
4731
- Document: ye,
4732
- Lexer: As,
4733
- LineCounter: Es,
4734
- Pair: v,
4735
- Parser: Et,
4736
- Scalar: O,
4737
- Schema: We,
4738
- YAMLError: Nt,
4739
- YAMLMap: P,
4740
- YAMLParseError: X,
4741
- YAMLSeq: J,
4742
- YAMLWarning: ds,
4743
- isAlias: Z,
4744
- isCollection: L,
4745
- isDocument: ue,
4746
- isMap: he,
4747
- isNode: $,
4748
- isPair: I,
4749
- isScalar: E,
4750
- isSeq: de,
4751
- parse: jn,
4752
- parseAllDocuments: Dn,
4753
- parseDocument: Ls,
4754
- stringify: Kn,
4755
- visit: Y,
4756
- visitAsync: Ke
4757
- });
4758
- export {
4759
- qe as Alias,
4760
- Bn as CST,
4761
- At as Composer,
4762
- ye as Document,
4763
- As as Lexer,
4764
- Es as LineCounter,
4765
- v as Pair,
4766
- Et as Parser,
4767
- O as Scalar,
4768
- We as Schema,
4769
- Nt as YAMLError,
4770
- P as YAMLMap,
4771
- X as YAMLParseError,
4772
- J as YAMLSeq,
4773
- ds as YAMLWarning,
4774
- qn as default,
4775
- Z as isAlias,
4776
- L as isCollection,
4777
- ue as isDocument,
4778
- he as isMap,
4779
- $ as isNode,
4780
- I as isPair,
4781
- E as isScalar,
4782
- de as isSeq,
4783
- jn as parse,
4784
- Dn as parseAllDocuments,
4785
- Ls as parseDocument,
4786
- Kn as stringify,
4787
- Y as visit,
4788
- Ke as visitAsync
4789
- };
4790
- //# sourceMappingURL=index-B9EWVYfo.js.map