rnxsim 0.1.375 → 0.1.377

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 (295) hide show
  1. package/README.md +28 -25
  2. package/cli/app-config.ts +9 -12
  3. package/cli/app-fonts.ts +3 -3
  4. package/cli/app-project.ts +8 -8
  5. package/cli/auth.ts +7 -9
  6. package/cli/bin.ts +16 -31
  7. package/cli/bridge-flow-runner.ts +3 -3
  8. package/cli/browser-backend.ts +44 -0
  9. package/cli/command-contract.ts +221 -0
  10. package/cli/command-registry.ts +291 -0
  11. package/cli/commands/agent-wrapper.ts +2 -2
  12. package/cli/commands/app-fonts.ts +2 -2
  13. package/cli/commands/assert.ts +3 -3
  14. package/cli/commands/auth.ts +1 -1
  15. package/cli/commands/box/cloud-box.ts +1 -1
  16. package/cli/commands/box/plane-share.ts +2 -2
  17. package/cli/commands/box.ts +4 -6
  18. package/cli/commands/compat.ts +1 -1
  19. package/cli/commands/config.ts +2 -2
  20. package/cli/commands/control.ts +42 -28
  21. package/cli/commands/cpu-profile.ts +7 -7
  22. package/cli/commands/daemon-mac-app.ts +7 -7
  23. package/cli/commands/daemon.ts +10 -10
  24. package/cli/commands/debug.ts +11 -11
  25. package/cli/commands/detox.ts +13 -13
  26. package/cli/commands/diagnose.ts +6 -6
  27. package/cli/commands/do-chain.ts +1 -2
  28. package/cli/commands/electron.ts +1 -3
  29. package/cli/commands/film.ts +3 -3
  30. package/cli/commands/flow.ts +43 -43
  31. package/cli/commands/inspect/count.ts +1 -1
  32. package/cli/commands/inspect/describe.ts +1 -1
  33. package/cli/commands/inspect/env.ts +2 -2
  34. package/cli/commands/inspect/get-layout.ts +1 -1
  35. package/cli/commands/inspect/keyboard.ts +1 -1
  36. package/cli/commands/inspect/list.ts +1 -1
  37. package/cli/commands/inspect/memory.ts +1 -1
  38. package/cli/commands/inspect/resolve-target.ts +1 -1
  39. package/cli/commands/inspect/screens.ts +1 -1
  40. package/cli/commands/inspect/tree.ts +1 -1
  41. package/cli/commands/inspect/url.ts +1 -1
  42. package/cli/commands/inspect/wait-event.ts +5 -5
  43. package/cli/commands/inspect.ts +34 -34
  44. package/cli/commands/install-desktop.ts +3 -3
  45. package/cli/commands/login.ts +6 -6
  46. package/cli/commands/maestro-generate.ts +5 -5
  47. package/cli/commands/maestro.ts +5 -5
  48. package/cli/commands/profile.ts +1 -1
  49. package/cli/commands/record.ts +9 -9
  50. package/cli/commands/runtime.ts +18 -18
  51. package/cli/commands/screenshot-command.ts +1 -1
  52. package/cli/commands/screenshot-layers.ts +5 -5
  53. package/cli/commands/screenshot-mode.ts +1 -1
  54. package/cli/commands/screenshot.ts +8 -8
  55. package/cli/commands/screenshots-capture.ts +5 -5
  56. package/cli/commands/serve.ts +3 -3
  57. package/cli/commands/setup.ts +20 -12
  58. package/cli/commands/skills.ts +5 -5
  59. package/cli/commands/slides.ts +1 -1
  60. package/cli/commands/telemetry.ts +1 -1
  61. package/cli/commands/three-mode.ts +1 -1
  62. package/cli/commands/timeline.ts +8 -8
  63. package/cli/commands/upgrade.ts +116 -131
  64. package/cli/commands/upload.ts +12 -12
  65. package/cli/commands/version.ts +7 -7
  66. package/cli/commands/what-happened.ts +9 -9
  67. package/cli/current-sim.ts +3 -3
  68. package/cli/desktop-companion.ts +1 -1
  69. package/cli/drivers/playwright.ts +9 -9
  70. package/cli/drivers/registry.ts +1 -1
  71. package/cli/drivers/types.ts +1 -1
  72. package/cli/flow-file.ts +2 -2
  73. package/cli/flow-session.ts +1 -1
  74. package/cli/help-core.ts +136 -0
  75. package/cli/help.ts +17 -53
  76. package/cli/hints.ts +5 -5
  77. package/cli/inspect-notice-state.ts +1 -1
  78. package/cli/maestro-js.ts +1 -1
  79. package/cli/outbound-endpoints.ts +23 -5
  80. package/cli/parse-args.ts +19 -66
  81. package/cli/recording-access.ts +1 -1
  82. package/cli/registry.ts +1 -0
  83. package/cli/run-registry.ts +1 -1
  84. package/cli/run-rnx-core.ts +148 -0
  85. package/cli/run-rnx.ts +6 -9
  86. package/cli/runtime-notes.ts +3 -3
  87. package/cli/standalone.ts +4 -0
  88. package/cli/ws-bridge.ts +8 -8
  89. package/detox/config-loader.ts +2 -2
  90. package/detox/index.ts +8 -8
  91. package/detox/jest-preset.cjs +1 -1
  92. package/detox/navigation.ts +2 -2
  93. package/dist-lib/agent-daemon-client.cjs +5 -5
  94. package/dist-lib/agent-events.cjs +1 -1
  95. package/dist-lib/agent-identity.cjs +2 -2
  96. package/dist-lib/agent-sessions.cjs +10 -10
  97. package/dist-lib/attached-projects.cjs +6 -6
  98. package/dist-lib/auth/shared-session.cjs +6 -6
  99. package/dist-lib/backend-origin.cjs +1 -1
  100. package/dist-lib/beta.cjs +1 -1
  101. package/dist-lib/beta.mjs +1 -1
  102. package/dist-lib/bridge-constants.cjs +1 -1
  103. package/dist-lib/bridge-contract-input.cjs +1 -1
  104. package/dist-lib/bridge-contract-input.mjs +1 -1
  105. package/dist-lib/bridge-contract.cjs +1 -1
  106. package/dist-lib/bridge-contract.mjs +1 -1
  107. package/dist-lib/cli-constants.cjs +1 -1
  108. package/dist-lib/config.cjs +25 -25
  109. package/dist-lib/detox/index.cjs +9 -9
  110. package/dist-lib/detox/jest-preset.cjs +1 -1
  111. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  112. package/dist-lib/home-paths.cjs +29 -29
  113. package/dist-lib/host/bridge-host.cjs +274 -181
  114. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  115. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  116. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  117. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  118. package/dist-lib/host/websocket-proxy.cjs +1 -1
  119. package/dist-lib/index.cjs +14 -14
  120. package/dist-lib/jump-to-source-babel.cjs +1 -1
  121. package/dist-lib/menu.cjs +1 -1
  122. package/dist-lib/menu.mjs +1 -1
  123. package/dist-lib/metro-production-bundle.cjs +1 -1
  124. package/dist-lib/metro-production-bundle.mjs +1 -1
  125. package/dist-lib/metro.cjs +8 -8
  126. package/dist-lib/profiles.cjs +12 -12
  127. package/dist-lib/public-brand.cjs +1 -1
  128. package/dist-lib/react-native-host-modules.cjs +1 -1
  129. package/dist-lib/react-native-host-modules.mjs +1 -1
  130. package/dist-lib/render-mode.cjs +1 -1
  131. package/dist-lib/scripts/dev-server-scanner.cjs +25 -11
  132. package/dist-lib/sdk.cjs +1 -1
  133. package/dist-lib/sdk.mjs +1 -1
  134. package/dist-lib/skills.cjs +470 -322
  135. package/dist-lib/vite.cjs +9 -9
  136. package/package.json +4 -11
  137. package/scripts/dev-server-scanner.ts +25 -7
  138. package/scripts/optional-demo-registry.ts +1 -1
  139. package/skills/contrast/SKILL.md +3 -3
  140. package/skills/rnx-debug/SKILL.md +1 -1
  141. package/skills/rnx-test/SKILL.md +2 -2
  142. package/src/agent-identity.ts +1 -1
  143. package/src/agent-sessions.ts +7 -5
  144. package/src/cli-version.ts +12 -4
  145. package/src/config.ts +26 -28
  146. package/src/disk-cleanup.ts +11 -11
  147. package/src/home-paths.ts +28 -28
  148. package/src/host/bridge-host.ts +16 -16
  149. package/src/metro-plugin.ts +2 -2
  150. package/src/profiles.ts +2 -2
  151. package/src/runtime-assets.ts +7 -7
  152. package/src/runtime-delivery.ts +13 -13
  153. package/src/screenshots/orchestrate.ts +1 -1
  154. package/src/screenshots/schema.ts +2 -2
  155. package/src/skills/builtin/a11y-review.ts +2 -2
  156. package/src/skills/builtin/compat-check.ts +2 -2
  157. package/src/skills/builtin/maestro-test.ts +2 -2
  158. package/src/skills/builtin/perf-profile.ts +2 -2
  159. package/src/skills/builtin/screenshot-all.ts +2 -2
  160. package/src/skills/builtin/visual-diff.ts +2 -2
  161. package/src/skills/registry.ts +8 -8
  162. package/src/skills/types.ts +1 -1
  163. package/src/vite-plugin-one.ts +3 -3
  164. package/src/vite-plugin.ts +15 -2
  165. package/dist-cli/bin.js +0 -15
  166. package/dist-cli/chunks/agent-JJN7U6FR.js +0 -48
  167. package/dist-cli/chunks/agent-wrapper-AVVUJ3WF.js +0 -17
  168. package/dist-cli/chunks/app-fonts-QJ22CNAZ.js +0 -4
  169. package/dist-cli/chunks/assert-PZZKIY3K.js +0 -49
  170. package/dist-cli/chunks/auth-5AVDJO33.js +0 -12
  171. package/dist-cli/chunks/beta-PFRGP266.js +0 -4
  172. package/dist-cli/chunks/box-ILC2O7ZO.js +0 -1730
  173. package/dist-cli/chunks/camera-J3V62PP7.js +0 -33
  174. package/dist-cli/chunks/chunk-25KRGDZT.js +0 -4
  175. package/dist-cli/chunks/chunk-2BRBFLWA.js +0 -38
  176. package/dist-cli/chunks/chunk-2GXNAZHB.js +0 -74
  177. package/dist-cli/chunks/chunk-2IUMRRYV.js +0 -7
  178. package/dist-cli/chunks/chunk-4ALPWIMP.js +0 -10
  179. package/dist-cli/chunks/chunk-4CEZZKRY.js +0 -4
  180. package/dist-cli/chunks/chunk-4EUKOIAV.js +0 -4
  181. package/dist-cli/chunks/chunk-4IKE4YUS.js +0 -32
  182. package/dist-cli/chunks/chunk-4ZXR2M3D.js +0 -4
  183. package/dist-cli/chunks/chunk-5CGJFU27.js +0 -7
  184. package/dist-cli/chunks/chunk-5HHWECGT.js +0 -4
  185. package/dist-cli/chunks/chunk-5PZVYF42.js +0 -312
  186. package/dist-cli/chunks/chunk-7NCPUZ52.js +0 -27
  187. package/dist-cli/chunks/chunk-7OSIJCBR.js +0 -107
  188. package/dist-cli/chunks/chunk-AQ5TMOAI.js +0 -4
  189. package/dist-cli/chunks/chunk-BQCEI37V.js +0 -5
  190. package/dist-cli/chunks/chunk-C6B5FOP3.js +0 -4
  191. package/dist-cli/chunks/chunk-CCMZSHJB.js +0 -71
  192. package/dist-cli/chunks/chunk-CX7VCKAT.js +0 -14
  193. package/dist-cli/chunks/chunk-DQUPSAHE.js +0 -4
  194. package/dist-cli/chunks/chunk-DSD2UBZI.js +0 -4
  195. package/dist-cli/chunks/chunk-EWPAI4MO.js +0 -7
  196. package/dist-cli/chunks/chunk-EZXV6U2N.js +0 -497
  197. package/dist-cli/chunks/chunk-F5F7FIPM.js +0 -6
  198. package/dist-cli/chunks/chunk-FUTYK55H.js +0 -30
  199. package/dist-cli/chunks/chunk-FW6AN7I2.js +0 -3
  200. package/dist-cli/chunks/chunk-FZDRA7Z4.js +0 -4
  201. package/dist-cli/chunks/chunk-GDLE4NIV.js +0 -4
  202. package/dist-cli/chunks/chunk-GEX7RVHY.js +0 -5
  203. package/dist-cli/chunks/chunk-H4MYYOYJ.js +0 -5
  204. package/dist-cli/chunks/chunk-HEV7BAPE.js +0 -11
  205. package/dist-cli/chunks/chunk-HNDWYCND.js +0 -506
  206. package/dist-cli/chunks/chunk-HNPHODBD.js +0 -4
  207. package/dist-cli/chunks/chunk-HWDVC6YA.js +0 -11
  208. package/dist-cli/chunks/chunk-JOHJZUGG.js +0 -4
  209. package/dist-cli/chunks/chunk-JWUDT4QK.js +0 -5
  210. package/dist-cli/chunks/chunk-K7QQWKGE.js +0 -4
  211. package/dist-cli/chunks/chunk-LAOKTKT4.js +0 -4
  212. package/dist-cli/chunks/chunk-LD7I266X.js +0 -24
  213. package/dist-cli/chunks/chunk-LMHBU5LZ.js +0 -4
  214. package/dist-cli/chunks/chunk-LSOGXSDV.js +0 -535
  215. package/dist-cli/chunks/chunk-MP2GPO4T.js +0 -4
  216. package/dist-cli/chunks/chunk-MXJ2UWRV.js +0 -4
  217. package/dist-cli/chunks/chunk-OJNKRIZF.js +0 -15
  218. package/dist-cli/chunks/chunk-PBOWUNXO.js +0 -4
  219. package/dist-cli/chunks/chunk-PNRJFHX4.js +0 -4
  220. package/dist-cli/chunks/chunk-QJQOK34O.js +0 -28
  221. package/dist-cli/chunks/chunk-RLCQLMFF.js +0 -142
  222. package/dist-cli/chunks/chunk-S65CK3RI.js +0 -9
  223. package/dist-cli/chunks/chunk-SWBUNMQS.js +0 -4
  224. package/dist-cli/chunks/chunk-SXBFGGAM.js +0 -4
  225. package/dist-cli/chunks/chunk-T4ISWS5H.js +0 -4
  226. package/dist-cli/chunks/chunk-TPPVAA7Z.js +0 -5
  227. package/dist-cli/chunks/chunk-USM3P74H.js +0 -4
  228. package/dist-cli/chunks/chunk-V4EJJHF5.js +0 -4
  229. package/dist-cli/chunks/chunk-V7RGRZOL.js +0 -423
  230. package/dist-cli/chunks/chunk-XUBV77WH.js +0 -130
  231. package/dist-cli/chunks/chunk-XYSDYGKC.js +0 -4
  232. package/dist-cli/chunks/chunk-YNHRSDVG.js +0 -5
  233. package/dist-cli/chunks/chunk-YX52RJKO.js +0 -4
  234. package/dist-cli/chunks/chunk-Z5O5H4O7.js +0 -99
  235. package/dist-cli/chunks/chunk-Z6LOIW46.js +0 -7
  236. package/dist-cli/chunks/chunk-ZXFVBYJY.js +0 -5
  237. package/dist-cli/chunks/cleanup-KPUW4SFK.js +0 -25
  238. package/dist-cli/chunks/cli-version-APGT6GAT.js +0 -4
  239. package/dist-cli/chunks/compat-XXRFD2TW.js +0 -23
  240. package/dist-cli/chunks/config-DDMFDQ7F.js +0 -13
  241. package/dist-cli/chunks/connect-IPG47YXM.js +0 -4
  242. package/dist-cli/chunks/control-O22Z3UJ5.js +0 -4
  243. package/dist-cli/chunks/daemon-PADUIMJV.js +0 -4
  244. package/dist-cli/chunks/debug-MYIP46TM.js +0 -200
  245. package/dist-cli/chunks/desktop-ENFFBQAA.js +0 -31
  246. package/dist-cli/chunks/detox-J5WVK6OH.js +0 -52
  247. package/dist-cli/chunks/device-RAVQVL75.js +0 -18
  248. package/dist-cli/chunks/diagnose-PJMPXKJY.js +0 -43
  249. package/dist-cli/chunks/disk-cleanup-YLAY445J.js +0 -4
  250. package/dist-cli/chunks/do-chain-UBE7GIOU.js +0 -5
  251. package/dist-cli/chunks/drivers-ZFNX3T5Z.js +0 -4
  252. package/dist-cli/chunks/env-Y5XJSNRD.js +0 -4
  253. package/dist-cli/chunks/film-W3V6VURB.js +0 -74
  254. package/dist-cli/chunks/flow-VMLI7BYM.js +0 -4
  255. package/dist-cli/chunks/help-PKZCWHJJ.js +0 -4
  256. package/dist-cli/chunks/hidden-runtime-alias-S5DJ7EDF.js +0 -4
  257. package/dist-cli/chunks/home-paths-5O4IZPYV.js +0 -4
  258. package/dist-cli/chunks/inspect-LT4MXK37.js +0 -4
  259. package/dist-cli/chunks/install-desktop-EXCFMXFS.js +0 -4
  260. package/dist-cli/chunks/login-V6TZ54ZH.js +0 -26
  261. package/dist-cli/chunks/logout-SPMLFWYA.js +0 -4
  262. package/dist-cli/chunks/maestro-5ISTBAZE.js +0 -108
  263. package/dist-cli/chunks/maestro-generate-WUI64NHR.js +0 -36
  264. package/dist-cli/chunks/mode-QPNBYXUF.js +0 -26
  265. package/dist-cli/chunks/optional-demo-registry-CBSYF4CG.js +0 -4
  266. package/dist-cli/chunks/perf-T6N5PVYV.js +0 -48
  267. package/dist-cli/chunks/permissions-YZ7RRSZJ.js +0 -13
  268. package/dist-cli/chunks/platform-XDQAA72X.js +0 -6
  269. package/dist-cli/chunks/privacy-54FIGXLT.js +0 -4
  270. package/dist-cli/chunks/record-QGYXRUKP.js +0 -72
  271. package/dist-cli/chunks/report-issue-VUUTGX7V.js +0 -29
  272. package/dist-cli/chunks/reset-CGO52KBW.js +0 -4
  273. package/dist-cli/chunks/resolve-target-NNQCALDM.js +0 -4
  274. package/dist-cli/chunks/runtime-4EP6YJVL.js +0 -4
  275. package/dist-cli/chunks/screenshot-command-NZCMSJ4P.js +0 -159
  276. package/dist-cli/chunks/screenshot-layers-VMTQ6XIU.js +0 -20
  277. package/dist-cli/chunks/screenshots-capture-K3MWIDBK.js +0 -42
  278. package/dist-cli/chunks/serve-QJRIB2BV.js +0 -56
  279. package/dist-cli/chunks/setup-6XXEJQVF.js +0 -4
  280. package/dist-cli/chunks/sim-client-5YUVL45C.js +0 -4
  281. package/dist-cli/chunks/skills-T3CS7CXK.js +0 -50
  282. package/dist-cli/chunks/state-AJC3VK3G.js +0 -14
  283. package/dist-cli/chunks/storage-KVGZKC3Y.js +0 -37
  284. package/dist-cli/chunks/store-AWUMOQUH.js +0 -4
  285. package/dist-cli/chunks/telemetry-W5ZDGWK6.js +0 -4
  286. package/dist-cli/chunks/timeline-DXDCAZUA.js +0 -24
  287. package/dist-cli/chunks/upgrade-SRPTJACU.js +0 -7
  288. package/dist-cli/chunks/upload-ZDV4BFED.js +0 -4
  289. package/dist-cli/chunks/version-SOLPSBMG.js +0 -6
  290. package/dist-cli/chunks/web-RT75LD7A.js +0 -4
  291. package/dist-cli/chunks/welcome-IJ55EC7U.js +0 -5
  292. package/dist-cli/chunks/what-happened-CEIWJIWK.js +0 -25
  293. package/dist-cli/chunks/ws-bridge-YK5R3HOI.js +0 -4
  294. package/scripts/postinstall.cjs +0 -3
  295. package/scripts/preuninstall.cjs +0 -118
@@ -1,4 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import i from"node:fs";import r from"node:path";var e=["app.config.js","app.config.ts","app.config.cjs","app.config.mjs","app.json"],p=["sootsim.config.ts","sootsim.config.js","sootsim.config.mjs","sootsim.config.cjs"];function c(n,t){for(let o of t){let s=r.join(n,o);try{if(i.statSync(s).isFile())return s}catch{}}return null}function f(n){return c(n,e)}function l(n){return c(n,p)}function u(n){let t=r.resolve(n);try{if(!i.statSync(t).isDirectory())return null}catch{return null}let o=l(t);return!o&&!f(t)&&!i.existsSync(r.join(t,"package.json"))?null:{appDir:t,configPath:o}}export{u as a};
@@ -1,4 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- function a(){console.error(" no rnx desktop companion found."),console.error(""),console.error(" install the desktop app:"),console.error(" rnx desktop install"),console.error(""),console.error(" or install the recommended background service:"),console.error(" rnx daemon install"),console.error("")}function t(r){console.error(""),console.error(` no sim is connected to the rnx bridge on port ${r}.`),console.error(""),console.error(" start your app dev server, then open it in rnx:"),console.error(" npx expo start --localhost --port 8081"),console.error(" rnx open 8081"),console.error(""),console.error(" then inspect the live app:"),console.error(" rnx describe")}async function d(r,n,s){let e=[];try{e=await r.listSims()}catch{}if(console.error(""),e.length===0){t(n);return}console.error(` no sim with id "${s}" is connected to the bridge on port ${n}.`),console.error(""),console.error(" connected sims:");for(let o of e){let i=[o.isPrimary?"primary":null,o.readyState,o.userVisible===!1?"hidden":o.userVisible===!0?"visible":null,o.userFocused?"focused":null].filter(Boolean).join(", ");console.error(` ${o.id} (${i})`)}console.error(""),console.error(" pass a valid --sim id, or run `rnx list` to see all sessions.")}export{a,t as b,d as c};
@@ -1,15 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import{m as a}from"./chunk-2BRBFLWA.js";import{t as l,v as i}from"./chunk-7NCPUZ52.js";function c(r){if(!r||typeof r!="object")return!1;let t=Reflect.get(r,"strategy");return typeof Reflect.get(r,"ok")=="boolean"&&(t==="data"||t==="full")&&Array.isArray(Reflect.get(r,"cleared"))&&typeof Reflect.get(r,"relaunched")=="boolean"}function d(){console.log(`
5
- rnx reset - clear the current guest app and relaunch it
6
-
7
- usage:
8
- rnx reset [--full] [--json] [--sim <id>]
9
-
10
- options:
11
- --full also clear keychain, user defaults, and permissions
12
- --json print the structured reset result
13
- --sim <id> target a specific sim
14
- --port <p> WS bridge port
15
- `)}async function f(r,t={}){if(r.includes("--help")||r.includes("-h"))return d(),0;let o=l(r,{port:t.port,stripBooleanFlags:["--full","--json"]});if(o.positional.length>0)return console.error(` unexpected reset argument: ${o.positional[0]}`),1;let n=i(o);try{let e=await n.send({type:"reset",resetOptions:{strategy:r.includes("--full")?"full":"data"}});if(!c(e))throw new Error("reset bridge returned an invalid result");if(r.includes("--json"))console.log(JSON.stringify(e));else{console.log(` ${e.strategy} reset ${e.ok?"complete":"failed"}`),console.log(e.cleared.length>0?` cleared: ${e.cleared.join(", ")}`:" cleared: none");for(let s of e.skipped??[])console.log(` skipped ${s.store}: ${s.reason}`);console.log(` app: ${e.relaunched?"relaunched":"not relaunched"}`),console.log(` worker: ${e.workerReloaded?"restarted":"preserved in place"}`),e.error&&console.error(` error: ${e.error}`)}return e.ok?0:1}catch(e){return console.error(` reset failed: ${e instanceof Error?e.message:e}`),await a(n),1}finally{n.close()}}export{f as a};
@@ -1,4 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as c}from"./chunk-MP2GPO4T.js";import{a as f}from"./chunk-F5F7FIPM.js";import{a as i}from"./chunk-25KRGDZT.js";import{createRequire as p}from"node:module";import s from"node:path";import{createJiti as a}from"jiti";var g=p(import.meta.url);function r(e){return e===void 0||e!==null&&typeof e=="object"&&!Array.isArray(e)}function l(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;let t=Reflect.get(e,"runtimeVersion"),o=Reflect.get(e,"network");return(t===void 0||typeof t=="string"&&t===t.trim()&&f(t))&&r(Reflect.get(e,"modules"))&&r(Reflect.get(e,"turboModules"))&&r(Reflect.get(e,"nativeModules"))&&r(Reflect.get(e,"env"))&&r(o)&&r(Reflect.get(e,"settings"))&&r(Reflect.get(e,"initialState"))}function d(e,t){if(!e.modules)return e;let o=s.dirname(t);return{...e,modules:Object.fromEntries(Object.entries(e.modules).map(([m,n])=>[m,n&&typeof n=="object"&&"file"in n?{...n,file:s.resolve(o,n.file)}:n]))}}async function u(e){if(e?.configPath)try{let o=await a(import.meta.url,{interopDefault:!0,alias:{[`${i.packageName}/config`]:g.resolve(`${i.packageName}/config`)}}).import(e.configPath,{default:!0});if(!l(o))throw new Error("the default export must be an rnx config object");return d(o,e.configPath)}catch(t){let o=t instanceof Error?t.message:String(t);throw new Error(`could not load ${e.configPath}: ${o}`)}}async function b(e=process.cwd()){let t=c(e);return{project:t,config:await u(t)}}export{u as a,b};
@@ -1,4 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- var t=Object.freeze({id:"ios",displayName:"iOS",isIOS:!0,isAndroid:!1,select:e=>e.ios}),r=Object.freeze({id:"android",displayName:"Android",isIOS:!1,isAndroid:!0,select:e=>e.android}),i=Object.freeze({ios:t,android:r});
@@ -1,28 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import{e as p}from"./chunk-Z5O5H4O7.js";import{a as l,b as u}from"./chunk-HEV7BAPE.js";import{a as c}from"./chunk-JWUDT4QK.js";import{c as i}from"./chunk-T4ISWS5H.js";async function d(e,t){if(t)return t.replace(/\/$/,"");if(e.kind==="session"&&e.origin)return e.origin.replace(/\/$/,"");let r=c();return r?.origin?r.origin.replace(/\/$/,""):(await p()).replace(/\/$/,"")}async function x(e,t={}){let r=l();if(r||(process.stderr.write(`
5
- rnx ${e} needs auth before it can check recording access.
6
-
7
- pick one:
8
- \u2022 run \`rnx login\`
9
- \u2022 set RNX_API_KEY=sk_rnx_... (recommended for CI)
10
-
11
- `),i(1)),r.kind==="github"&&t.allowGitHubAuth)return;let o=await d(r,t.originOverride),n;try{n=await fetch(`${o}/api/sootsim/billing/subscription`,{headers:{authorization:u(r)}})}catch(s){process.stderr.write(`
12
- rnx ${e} couldn't verify recording access.
13
- ${s instanceof Error?s.message:String(s)}
14
-
15
- `),i(1)}if(n.status===401&&(process.stderr.write(`
16
- rnx ${e} couldn't verify recording access with the current auth against ${o}.
17
- sign in again for that origin, or provide a valid RNX_API_KEY.
18
-
19
- `),i(1)),!n.ok){let s=await n.text().catch(()=>"");process.stderr.write(`
20
- rnx ${e} couldn't verify recording access (${n.status}).
21
- ${s||"unexpected billing response"}
22
-
23
- `),i(1)}let a=await n.json();if(a.entitlements?.desktopRecording===!0)return;let g=a.plan??"free";process.stderr.write(`
24
- rnx ${e} recording requires Personal, Team, or an active trial.
25
- current plan: ${g}.
26
- free keeps basic 3d mode; the trial unlocks the full Personal surface.
27
-
28
- `),i(1)}export{x as a};
@@ -1,142 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import{c as ms}from"./chunk-DQUPSAHE.js";var hs={};ms(hs,{Alias:()=>ee,CST:()=>cs,Composer:()=>be,Document:()=>se,Lexer:()=>Be,LineCounter:()=>De,Pair:()=>v,Parser:()=>we,Scalar:()=>y,Schema:()=>ve,YAMLError:()=>_e,YAMLMap:()=>$,YAMLParseError:()=>R,YAMLSeq:()=>B,YAMLWarning:()=>Pe,isAlias:()=>F,isCollection:()=>L,isDocument:()=>x,isMap:()=>U,isNode:()=>I,isPair:()=>T,isScalar:()=>E,isSeq:()=>V,parse:()=>un,parseAllDocuments:()=>fn,parseDocument:()=>us,stringify:()=>hn,visit:()=>Q,visitAsync:()=>je});var tt=Symbol.for("yaml.alias"),st=Symbol.for("yaml.document"),Y=Symbol.for("yaml.map"),qt=Symbol.for("yaml.pair"),q=Symbol.for("yaml.scalar"),re=Symbol.for("yaml.seq"),K=Symbol.for("yaml.node.type"),F=s=>!!s&&typeof s=="object"&&s[K]===tt,x=s=>!!s&&typeof s=="object"&&s[K]===st,U=s=>!!s&&typeof s=="object"&&s[K]===Y,T=s=>!!s&&typeof s=="object"&&s[K]===qt,E=s=>!!s&&typeof s=="object"&&s[K]===q,V=s=>!!s&&typeof s=="object"&&s[K]===re;function L(s){if(s&&typeof s=="object")switch(s[K]){case Y:case re:return!0}return!1}function I(s){if(s&&typeof s=="object")switch(s[K]){case tt:case Y:case q:case re:return!0}return!1}var nt=s=>(E(s)||L(s))&&!!s.anchor;var j=Symbol("break visit"),ds=Symbol("skip children"),z=Symbol("remove node");function Q(s,e){let t=gs(e);x(s)?ke(null,s.contents,t,Object.freeze([s]))===z&&(s.contents=null):ke(null,s,t,Object.freeze([]))}Q.BREAK=j;Q.SKIP=ds;Q.REMOVE=z;function ke(s,e,t,n){let i=ys(s,e,t,n);if(I(i)||T(i))return bs(s,n,i),ke(s,i,t,n);if(typeof i!="symbol"){if(L(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=ke(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===j)return j;o===z&&(e.items.splice(r,1),r-=1)}}}else if(T(e)){n=Object.freeze(n.concat(e));let r=ke("key",e.key,t,n);if(r===j)return j;r===z&&(e.key=null);let o=ke("value",e.value,t,n);if(o===j)return j;o===z&&(e.value=null)}}return i}async function je(s,e){let t=gs(e);x(s)?await Ne(null,s.contents,t,Object.freeze([s]))===z&&(s.contents=null):await Ne(null,s,t,Object.freeze([]))}je.BREAK=j;je.SKIP=ds;je.REMOVE=z;async function Ne(s,e,t,n){let i=await ys(s,e,t,n);if(I(i)||T(i))return bs(s,n,i),Ne(s,i,t,n);if(typeof i!="symbol"){if(L(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=await Ne(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===j)return j;o===z&&(e.items.splice(r,1),r-=1)}}}else if(T(e)){n=Object.freeze(n.concat(e));let r=await Ne("key",e.key,t,n);if(r===j)return j;r===z&&(e.key=null);let o=await Ne("value",e.value,t,n);if(o===j)return j;o===z&&(e.value=null)}}return i}function gs(s){return typeof s=="object"&&(s.Collection||s.Node||s.Value)?Object.assign({Alias:s.Node,Map:s.Node,Scalar:s.Node,Seq:s.Node},s.Value&&{Map:s.Value,Scalar:s.Value,Seq:s.Value},s.Collection&&{Map:s.Collection,Seq:s.Collection},s):s}function ys(s,e,t,n){if(typeof t=="function")return t(s,e,n);if(U(e))return t.Map?.(s,e,n);if(V(e))return t.Seq?.(s,e,n);if(T(e))return t.Pair?.(s,e,n);if(E(e))return t.Scalar?.(s,e,n);if(F(e))return t.Alias?.(s,e,n)}function bs(s,e,t){let n=e[e.length-1];if(L(n))n.items[s]=t;else if(T(n))s==="key"?n.key=t:n.value=t;else if(x(n))n.contents=t;else{let i=F(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}var pn={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},mn=s=>s.replace(/[!,[\]{}]/g,e=>pn[e]),Z=class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){let e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[r,o]=n;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[r]=n;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{let o=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);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)}let[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);let r=this.tags[n];if(r)try{return r+decodeURIComponent(i)}catch(o){return t(String(o)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+mn(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),i;if(e&&n.length>0&&I(e.contents)){let r={};Q(e.contents,(o,l)=>{I(l)&&l.tag&&(r[l.tag]=!0)}),i=Object.keys(r)}else i=[];for(let[r,o]of n)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(l=>l.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(`
5
- `)}};Z.defaultYaml={explicit:!1,version:"1.2"};Z.defaultTags={"!!":"tag:yaml.org,2002:"};function it(s){if(/[\x00-\x19\s,[\]{}]/.test(s)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;throw new Error(t)}return!0}function Rt(s){let e=new Set;return Q(s,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function Ft(s,e){for(let t=1;;++t){let n=`${s}${t}`;if(!e.has(n))return n}}function ws(s,e){let t=[],n=new Map,i=null;return{onAnchor:r=>{t.push(r),i??(i=Rt(s));let o=Ft(e,i);return i.add(o),o},setAnchors:()=>{for(let r of t){let o=n.get(r);if(typeof o=="object"&&o.anchor&&(E(o.node)||L(o.node)))o.node.anchor=o.anchor;else{let l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=r,l}}},sourceObjects:n}}function fe(s,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,r=n.length;i<r;++i){let o=n[i],l=fe(s,n,String(i),o);l===void 0?delete n[i]:l!==o&&(n[i]=l)}else if(n instanceof Map)for(let i of Array.from(n.keys())){let r=n.get(i),o=fe(s,n,i,r);o===void 0?n.delete(i):o!==r&&n.set(i,o)}else if(n instanceof Set)for(let i of Array.from(n)){let r=fe(s,n,i,i);r===void 0?n.delete(i):r!==i&&(n.delete(i),n.add(r))}else for(let[i,r]of Object.entries(n)){let o=fe(s,n,i,r);o===void 0?delete n[i]:o!==r&&(n[i]=o)}return s.call(e,t,n)}function M(s,e,t){if(Array.isArray(s))return s.map((n,i)=>M(n,String(i),t));if(s&&typeof s.toJSON=="function"){if(!t||!nt(s))return s.toJSON(e,t);let n={aliasCount:0,count:1,res:void 0};t.anchors.set(s,n),t.onCreate=r=>{n.res=r,delete t.onCreate};let i=s.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof s=="bigint"&&!t?.keep?Number(s):s}var ue=class{constructor(e){Object.defineProperty(this,K,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:i,reviver:r}={}){if(!x(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=M(this,"",o);if(typeof i=="function")for(let{count:a,res:c}of o.anchors.values())i(c,a);return typeof r=="function"?fe(r,{"":l},"",l):l}};var ee=class extends ue{constructor(e){super(tt),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){if(t?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],Q(e,{Node:(r,o)=>{(F(o)||nt(o))&&n.push(o)}}),t&&(t.aliasResolveCache=n));let i;for(let r of n){if(r===this)break;r.anchor===this.source&&(i=r)}return i}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:r}=t,o=this.resolve(i,t);if(!o){let a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(a)}let l=n.get(o);if(l||(M(o,null,t),l=n.get(o)),l?.res===void 0){let a="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(a)}if(r>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=rt(i,o,n)),l.count*l.aliasCount>r)){let a="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(a)}return l.res}toString(e,t,n){let i=`*${this.source}`;if(e){if(it(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${i} `}return i}};function rt(s,e,t){if(F(e)){let n=e.resolve(s),i=t&&n&&t.get(n);return i?i.count*i.aliasCount:0}else if(L(e)){let n=0;for(let i of e.items){let r=rt(s,i,t);r>n&&(n=r)}return n}else if(T(e)){let n=rt(s,e.key,t),i=rt(s,e.value,t);return Math.max(n,i)}return 1}var ot=s=>!s||typeof s!="function"&&typeof s!="object",y=class extends ue{constructor(e){super(q),this.value=e}toJSON(e,t){return t?.keep?this.value:M(this.value,e,t)}toString(){return String(this.value)}};y.BLOCK_FOLDED="BLOCK_FOLDED";y.BLOCK_LITERAL="BLOCK_LITERAL";y.PLAIN="PLAIN";y.QUOTE_DOUBLE="QUOTE_DOUBLE";y.QUOTE_SINGLE="QUOTE_SINGLE";var dn="tag:yaml.org,2002:";function gn(s,e,t){if(e){let n=t.filter(r=>r.tag===e),i=n.find(r=>!r.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(n=>n.identify?.(s)&&!n.format)}function oe(s,e,t){if(x(s)&&(s=s.contents),I(s))return s;if(T(s)){let f=t.schema[Y].createNode?.(t.schema,null,t);return f.items.push(s),f}(s instanceof String||s instanceof Number||s instanceof Boolean||typeof BigInt<"u"&&s instanceof BigInt)&&(s=s.valueOf());let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:r,schema:o,sourceObjects:l}=t,a;if(n&&s&&typeof s=="object"){if(a=l.get(s),a)return a.anchor??(a.anchor=i(s)),new ee(a.anchor);a={anchor:null,node:null},l.set(s,a)}e?.startsWith("!!")&&(e=dn+e.slice(2));let c=gn(s,e,o.tags);if(!c){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){let f=new y(s);return a&&(a.node=f),f}c=s instanceof Map?o[Y]:Symbol.iterator in Object(s)?o[re]:o[Y]}r&&(r(c),delete t.onTagObj);let p=c?.createNode?c.createNode(t.schema,s,t):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(t.schema,s,t):new y(s);return e?p.tag=e:c.default||(p.tag=c.tag),a&&(a.node=p),p}function qe(s,e,t){let n=t;for(let i=e.length-1;i>=0;--i){let r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){let o=[];o[r]=n,n=o}else n=new Map([[r,n]])}return oe(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:s,sourceObjects:new Map})}var Ae=s=>s==null||typeof s=="object"&&!!s[Symbol.iterator]().next().done,Oe=class extends ue{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>I(n)||T(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Ae(e))this.add(t);else{let[n,...i]=e,r=this.get(n,!0);if(L(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(n,qe(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let i=this.get(t,!0);if(L(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...i]=e,r=this.get(n,!0);return i.length===0?!t&&E(r)?r.value:r:L(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!T(t))return!1;let n=t.value;return n==null||e&&E(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let i=this.get(t,!0);return L(i)?i.hasIn(n):!1}setIn(e,t){let[n,...i]=e;if(i.length===0)this.set(n,t);else{let r=this.get(n,!0);if(L(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(n,qe(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};var Ss=s=>s.replace(/^(?!$)(?: $)?/gm,"#");function J(s,e){return/^\n+$/.test(s)?s.substring(1):e?s.replace(/^(?! *$)/gm,e):s}var te=(s,e,t)=>s.endsWith(`
6
- `)?J(t,e):t.includes(`
7
- `)?`
8
- `+J(t,e):(s.endsWith(" ")?"":" ")+t;var xt="flow",lt="block",Re="quoted";function Fe(s,e,t="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:r=20,onFold:o,onOverflow:l}={}){if(!i||i<0)return s;i<r&&(r=0);let a=Math.max(1+r,1+i-e.length);if(s.length<=a)return s;let c=[],p={},f=i-e.length;typeof n=="number"&&(n>i-Math.max(2,r)?c.push(0):f=i-n);let u,d,g=!1,h=-1,m=-1,w=-1;t===lt&&(h=ks(s,h,e.length),h!==-1&&(f=h+a));for(let k;k=s[h+=1];){if(t===Re&&k==="\\"){switch(m=h,s[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}w=h}if(k===`
9
- `)t===lt&&(h=ks(s,h,e.length)),f=h+e.length+a,u=void 0;else{if(k===" "&&d&&d!==" "&&d!==`
10
- `&&d!==" "){let N=s[h+1];N&&N!==" "&&N!==`
11
- `&&N!==" "&&(u=h)}if(h>=f)if(u)c.push(u),f=u+a,u=void 0;else if(t===Re){for(;d===" "||d===" ";)d=k,k=s[h+=1],g=!0;let N=h>w+1?h-2:m-1;if(p[N])return s;c.push(N),p[N]=!0,f=N+a,u=void 0}else g=!0}d=k}if(g&&l&&l(),c.length===0)return s;o&&o();let S=s.slice(0,c[0]);for(let k=0;k<c.length;++k){let N=c[k],O=c[k+1]||s.length;N===0?S=`
12
- ${e}${s.slice(0,O)}`:(t===Re&&p[N]&&(S+=`${s[N]}\\`),S+=`
13
- ${e}${s.slice(N+1,O)}`)}return S}function ks(s,e,t){let n=e,i=e+1,r=s[i];for(;r===" "||r===" ";)if(e<i+t)r=s[++e];else{do r=s[++e];while(r&&r!==`
14
- `);n=e,i=e+1,r=s[i]}return n}var ct=(s,e)=>({indentAtStart:e?s.indent.length:s.indentAtStart,lineWidth:s.options.lineWidth,minContentWidth:s.options.minContentWidth}),ft=s=>/^(%|---|\.\.\.)/m.test(s);function yn(s,e,t){if(!e||e<0)return!1;let n=e-t,i=s.length;if(i<=n)return!1;for(let r=0,o=0;r<i;++r)if(s[r]===`
15
- `){if(r-o>n)return!0;if(o=r+1,i-o<=n)return!1}return!0}function xe(s,e){let t=JSON.stringify(s);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:n}=e,i=e.options.doubleQuotedMinMultiLineLength,r=e.indent||(ft(s)?" ":""),o="",l=0;for(let a=0,c=t[a];c;c=t[++a])if(c===" "&&t[a+1]==="\\"&&t[a+2]==="n"&&(o+=t.slice(l,a)+"\\ ",a+=1,l=a,c="\\"),c==="\\")switch(t[a+1]){case"u":{o+=t.slice(l,a);let p=t.substr(a+2,4);switch(p){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:p.substr(0,2)==="00"?o+="\\x"+p.substr(2):o+=t.substr(a,6)}a+=5,l=a+1}break;case"n":if(n||t[a+2]==='"'||t.length<i)a+=1;else{for(o+=t.slice(l,a)+`
16
-
17
- `;t[a+2]==="\\"&&t[a+3]==="n"&&t[a+4]!=='"';)o+=`
18
- `,a+=2;o+=r,t[a+2]===" "&&(o+="\\"),a+=1,l=a+1}break;default:a+=1}return o=l?o+t.slice(l):t,n?o:Fe(o,r,Re,ct(e,!1))}function Ut(s,e){if(e.options.singleQuote===!1||e.implicitKey&&s.includes(`
19
- `)||/[ \t]\n|\n[ \t]/.test(s))return xe(s,e);let t=e.indent||(ft(s)?" ":""),n="'"+s.replace(/'/g,"''").replace(/\n+/g,`$&
20
- ${t}`)+"'";return e.implicitKey?n:Fe(n,t,xt,ct(e,!1))}function Ee(s,e){let{singleQuote:t}=e.options,n;if(t===!1)n=xe;else{let i=s.includes('"'),r=s.includes("'");i&&!r?n=Ut:r&&!i?n=xe:n=t?Ut:xe}return n(s,e)}var Vt;try{Vt=new RegExp(`(^|(?<!
21
- ))
22
- +(?!
23
- |$)`,"g")}catch{Vt=/\n+(?!\n|$)/g}function at({comment:s,type:e,value:t},n,i,r){let{blockQuote:o,commentString:l,lineWidth:a}=n.options;if(!o||/\n[\t ]+$/.test(t))return Ee(t,n);let c=n.indent||(n.forceBlockIndent||ft(t)?" ":""),p=o==="literal"?!0:o==="folded"||e===y.BLOCK_FOLDED?!1:e===y.BLOCK_LITERAL?!0:!yn(t,a,c.length);if(!t)return p?`|
24
- `:`>
25
- `;let f,u;for(u=t.length;u>0;--u){let O=t[u-1];if(O!==`
26
- `&&O!==" "&&O!==" ")break}let d=t.substring(u),g=d.indexOf(`
27
- `);g===-1?f="-":t===d||g!==d.length-1?(f="+",r&&r()):f="",d&&(t=t.slice(0,-d.length),d[d.length-1]===`
28
- `&&(d=d.slice(0,-1)),d=d.replace(Vt,`$&${c}`));let h=!1,m,w=-1;for(m=0;m<t.length;++m){let O=t[m];if(O===" ")h=!0;else if(O===`
29
- `)w=m;else break}let S=t.substring(0,w<m?w+1:m);S&&(t=t.substring(S.length),S=S.replace(/\n+/g,`$&${c}`));let N=(h?c?"2":"1":"")+f;if(s&&(N+=" "+l(s.replace(/ ?[\r\n]+/g," ")),i&&i()),!p){let O=t.replace(/\n+/g,`
30
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),A=!1,C=ct(n,!0);o!=="folded"&&e!==y.BLOCK_FOLDED&&(C.onOverflow=()=>{A=!0});let b=Fe(`${S}${O}${d}`,c,lt,C);if(!A)return`>${N}
31
- ${c}${b}`}return t=t.replace(/\n+/g,`$&${c}`),`|${N}
32
- ${c}${S}${t}${d}`}function bn(s,e,t,n){let{type:i,value:r}=s,{actualString:o,implicitKey:l,indent:a,indentStep:c,inFlow:p}=e;if(l&&r.includes(`
33
- `)||p&&/[[\]{},]/.test(r))return Ee(r,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return l||p||!r.includes(`
34
- `)?Ee(r,e):at(s,e,t,n);if(!l&&!p&&i!==y.PLAIN&&r.includes(`
35
- `))return at(s,e,t,n);if(ft(r)){if(a==="")return e.forceBlockIndent=!0,at(s,e,t,n);if(l&&a===c)return Ee(r,e)}let f=r.replace(/\n+/g,`$&
36
- ${a}`);if(o){let u=h=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(f),{compat:d,tags:g}=e.doc.schema;if(g.some(u)||d?.some(u))return Ee(r,e)}return l?f:Fe(f,a,xt,ct(e,!1))}function le(s,e,t,n){let{implicitKey:i,inFlow:r}=e,o=typeof s.value=="string"?s:Object.assign({},s,{value:String(s.value)}),{type:l}=s;l!==y.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(l=y.QUOTE_DOUBLE);let a=p=>{switch(p){case y.BLOCK_FOLDED:case y.BLOCK_LITERAL:return i||r?Ee(o.value,e):at(o,e,t,n);case y.QUOTE_DOUBLE:return xe(o.value,e);case y.QUOTE_SINGLE:return Ut(o.value,e);case y.PLAIN:return bn(o,e,t,n);default:return null}},c=a(l);if(c===null){let{defaultKeyType:p,defaultStringType:f}=e.options,u=i&&p||f;if(c=a(u),c===null)throw new Error(`Unsupported default string type ${u}`)}return c}function ut(s,e){let t=Object.assign({blockQuote:!0,commentString:Ss,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},s.schema.toStringOptions,e),n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:s,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}function wn(s,e){if(e.tag){let i=s.filter(r=>r.tag===e.tag);if(i.length>0)return i.find(r=>r.format===e.format)??i[0]}let t,n;if(E(e)){n=e.value;let i=s.filter(r=>r.identify?.(n));if(i.length>1){let r=i.filter(o=>o.test);r.length>0&&(i=r)}t=i.find(r=>r.format===e.format)??i.find(r=>!r.format)}else n=e,t=s.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!t){let i=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${i} value`)}return t}function Sn(s,e,{anchors:t,doc:n}){if(!n.directives)return"";let i=[],r=(E(s)||L(s))&&s.anchor;r&&it(r)&&(t.add(r),i.push(`&${r}`));let o=s.tag??(e.default?null:e.tag);return o&&i.push(n.directives.tagString(o)),i.join(" ")}function ae(s,e,t,n){if(T(s))return s.toString(e,t,n);if(F(s)){if(e.doc.directives)return s.toString(e);if(e.resolvedAliases?.has(s))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(s):e.resolvedAliases=new Set([s]),s=s.resolve(e.doc)}let i,r=I(s)?s:e.doc.createNode(s,{onTagObj:a=>i=a});i??(i=wn(e.doc.schema.tags,r));let o=Sn(r,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let l=typeof i.stringify=="function"?i.stringify(r,e,t,n):E(r)?le(r,e,t,n):r.toString(e,t,n);return o?E(r)||l[0]==="{"||l[0]==="["?`${o} ${l}`:`${o}
37
- ${e.indent}${l}`:l}function Ns({key:s,value:e},t,n,i){let{allNullValues:r,doc:o,indent:l,indentStep:a,options:{commentString:c,indentSeq:p,simpleKeys:f}}=t,u=I(s)&&s.comment||null;if(f){if(u)throw new Error("With simple keys, key nodes cannot have comments");if(L(s)||!I(s)&&typeof s=="object"){let C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let d=!f&&(!s||u&&e==null&&!t.inFlow||L(s)||(E(s)?s.type===y.BLOCK_FOLDED||s.type===y.BLOCK_LITERAL:typeof s=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!d&&(f||!r),indent:l+a});let g=!1,h=!1,m=ae(s,t,()=>g=!0,()=>h=!0);if(!d&&!t.inFlow&&m.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");d=!0}if(t.inFlow){if(r||e==null)return g&&n&&n(),m===""?"?":d?`? ${m}`:m}else if(r&&!f||e==null&&d)return m=`? ${m}`,u&&!g?m+=te(m,t.indent,c(u)):h&&i&&i(),m;g&&(u=null),d?(u&&(m+=te(m,t.indent,c(u))),m=`? ${m}
38
- ${l}:`):(m=`${m}:`,u&&(m+=te(m,t.indent,c(u))));let w,S,k;I(e)?(w=!!e.spaceBefore,S=e.commentBefore,k=e.comment):(w=!1,S=null,k=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!d&&!u&&E(e)&&(t.indentAtStart=m.length+1),h=!1,!p&&a.length>=2&&!t.inFlow&&!d&&V(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let N=!1,O=ae(e,t,()=>N=!0,()=>h=!0),A=" ";if(u||w||S){if(A=w?`
39
- `:"",S){let C=c(S);A+=`
40
- ${J(C,t.indent)}`}O===""&&!t.inFlow?A===`
41
- `&&k&&(A=`
42
-
43
- `):A+=`
44
- ${t.indent}`}else if(!d&&L(e)){let C=O[0],b=O.indexOf(`
45
- `),_=b!==-1,ce=t.inFlow??e.flow??e.items.length===0;if(_||!ce){let Se=!1;if(_&&(C==="&"||C==="!")){let P=O.indexOf(" ");C==="&"&&P!==-1&&P<b&&O[P+1]==="!"&&(P=O.indexOf(" ",P+1)),(P===-1||b<P)&&(Se=!0)}Se||(A=`
46
- ${t.indent}`)}}else(O===""||O[0]===`
47
- `)&&(A="");return m+=A+O,t.inFlow?N&&n&&n():k&&!N?m+=te(m,t.indent,c(k)):h&&i&&i(),m}function ht(s,e){(s==="debug"||s==="warn")&&console.warn(e)}var pt="<<",G={identify:s=>s===pt||typeof s=="symbol"&&s.description===pt,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new y(Symbol(pt)),{addToJSMap:Yt}),stringify:()=>pt},Os=(s,e)=>(G.identify(e)||E(e)&&(!e.type||e.type===y.PLAIN)&&G.identify(e.value))&&s?.doc.schema.tags.some(t=>t.tag===G.tag&&t.default);function Yt(s,e,t){let n=As(s,t);if(V(n))for(let i of n.items)Jt(s,e,i);else if(Array.isArray(n))for(let i of n)Jt(s,e,i);else Jt(s,e,n)}function Jt(s,e,t){let n=As(s,t);if(!U(n))throw new Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,s,Map);for(let[r,o]of i)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,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function As(s,e){return s&&F(e)?e.resolve(s.doc,s):e}function mt(s,e,{key:t,value:n}){if(I(t)&&t.addToJSMap)t.addToJSMap(s,e,n);else if(Os(s,t))Yt(s,e,n);else{let i=M(t,"",s);if(e instanceof Map)e.set(i,M(n,i,s));else if(e instanceof Set)e.add(i);else{let r=kn(t,i,s),o=M(n,r,s);r in e?Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[r]=o}}return e}function kn(s,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(I(s)&&t?.doc){let n=ut(t.doc,{});n.anchors=new Set;for(let r of t.anchors.keys())n.anchors.add(r.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=s.toString(n);if(!t.mapKeyWarned){let r=JSON.stringify(i);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}return i}return JSON.stringify(e)}function Te(s,e,t){let n=oe(s,void 0,t),i=oe(e,void 0,t);return new v(n,i)}var v=class s{constructor(e,t=null){Object.defineProperty(this,K,{value:qt}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return I(t)&&(t=t.clone(e)),I(n)&&(n=n.clone(e)),new s(t,n)}toJSON(e,t){let n=t?.mapAsMap?new Map:{};return mt(t,n,this)}toString(e,t,n){return e?.doc?Ns(this,e,t,n):JSON.stringify(this)}};function gt(s,e,t){return(e.inFlow??s.flow?On:Nn)(s,e,t)}function Nn({comment:s,items:e},t,{blockItemPrefix:n,flowChars:i,itemIndent:r,onChompKeep:o,onComment:l}){let{indent:a,options:{commentString:c}}=t,p=Object.assign({},t,{indent:r,type:null}),f=!1,u=[];for(let g=0;g<e.length;++g){let h=e[g],m=null;if(I(h))!f&&h.spaceBefore&&u.push(""),dt(t,u,h.commentBefore,f),h.comment&&(m=h.comment);else if(T(h)){let S=I(h.key)?h.key:null;S&&(!f&&S.spaceBefore&&u.push(""),dt(t,u,S.commentBefore,f))}f=!1;let w=ae(h,p,()=>m=null,()=>f=!0);m&&(w+=te(w,r,c(m))),f&&m&&(f=!1),u.push(n+w)}let d;if(u.length===0)d=i.start+i.end;else{d=u[0];for(let g=1;g<u.length;++g){let h=u[g];d+=h?`
48
- ${a}${h}`:`
49
- `}}return s?(d+=`
50
- `+J(c(s),a),l&&l()):f&&o&&o(),d}function On({items:s},e,{flowChars:t,itemIndent:n}){let{indent:i,indentStep:r,flowCollectionPadding:o,options:{commentString:l}}=e;n+=r;let a=Object.assign({},e,{indent:n,inFlow:!0,type:null}),c=!1,p=0,f=[];for(let g=0;g<s.length;++g){let h=s[g],m=null;if(I(h))h.spaceBefore&&f.push(""),dt(e,f,h.commentBefore,!1),h.comment&&(m=h.comment);else if(T(h)){let S=I(h.key)?h.key:null;S&&(S.spaceBefore&&f.push(""),dt(e,f,S.commentBefore,!1),S.comment&&(c=!0));let k=I(h.value)?h.value:null;k?(k.comment&&(m=k.comment),k.commentBefore&&(c=!0)):h.value==null&&S?.comment&&(m=S.comment)}m&&(c=!0);let w=ae(h,a,()=>m=null);c||(c=f.length>p||w.includes(`
51
- `)),g<s.length-1?w+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(c||(c=f.reduce((S,k)=>S+k.length+2,2)+(w.length+2)>e.options.lineWidth)),c&&(w+=",")),m&&(w+=te(w,n,l(m))),f.push(w),p=f.length}let{start:u,end:d}=t;if(f.length===0)return u+d;if(!c){let g=f.reduce((h,m)=>h+m.length+2,2);c=e.options.lineWidth>0&&g>e.options.lineWidth}if(c){let g=u;for(let h of f)g+=h?`
52
- ${r}${i}${h}`:`
53
- `;return`${g}
54
- ${i}${d}`}else return`${u}${o}${f.join(" ")}${o}${d}`}function dt({indent:s,options:{commentString:e}},t,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let r=J(e(n),s);t.push(r.trimStart())}}function he(s,e){let t=E(e)?e.value:e;for(let n of s)if(T(n)&&(n.key===e||n.key===t||E(n.key)&&n.key.value===t))return n}var $=class extends Oe{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Y,e),this.items=[]}static from(e,t,n){let{keepUndefined:i,replacer:r}=n,o=new this(e),l=(a,c)=>{if(typeof r=="function")c=r.call(t,a,c);else if(Array.isArray(r)&&!r.includes(a))return;(c!==void 0||i)&&o.items.push(Te(a,c,n))};if(t instanceof Map)for(let[a,c]of t)l(a,c);else if(t&&typeof t=="object")for(let a of Object.keys(t))l(a,t[a]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){let n;T(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new v(e,e?.value):n=new v(e.key,e.value);let i=he(this.items,n.key),r=this.schema?.sortMapEntries;if(i){if(!t)throw new Error(`Key ${n.key} already set`);E(i.value)&&ot(n.value)?i.value.value=n.value:i.value=n.value}else if(r){let o=this.items.findIndex(l=>r(n,l)<0);o===-1?this.items.push(n):this.items.splice(o,0,n)}else this.items.push(n)}delete(e){let t=he(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let i=he(this.items,e)?.value;return(!t&&E(i)?i.value:i)??void 0}has(e){return!!he(this.items,e)}set(e,t){this.add(new v(e,t),!0)}toJSON(e,t,n){let i=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(i);for(let r of this.items)mt(t,i,r);return i}toString(e,t,n){if(!e)return JSON.stringify(this);for(let i of this.items)if(!T(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),gt(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}};var W={collection:"map",default:!0,nodeClass:$,tag:"tag:yaml.org,2002:map",resolve(s,e){return U(s)||e("Expected a mapping for this tag"),s},createNode:(s,e,t)=>$.from(s,e,t)};var B=class extends Oe{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(re,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=yt(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let n=yt(e);if(typeof n!="number")return;let i=this.items[n];return!t&&E(i)?i.value:i}has(e){let t=yt(e);return typeof t=="number"&&t<this.items.length}set(e,t){let n=yt(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);let i=this.items[n];E(i)&&ot(t)?i.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let i=0;for(let r of this.items)n.push(M(r,String(i++),t));return n}toString(e,t,n){return e?gt(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let l of t){if(typeof i=="function"){let a=t instanceof Set?l:String(o++);l=i.call(t,a,l)}r.items.push(oe(l,void 0,n))}}return r}};function yt(s){let e=E(s)?s.value:s;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}var H={collection:"seq",default:!0,nodeClass:B,tag:"tag:yaml.org,2002:seq",resolve(s,e){return V(s)||e("Expected a sequence for this tag"),s},createNode:(s,e,t)=>B.from(s,e,t)};var pe={identify:s=>typeof s=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:s=>s,stringify(s,e,t,n){return e=Object.assign({actualString:!0},e),le(s,e,t,n)}};var ye={identify:s=>s==null,createNode:()=>new y(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new y(null),stringify:({source:s},e)=>typeof s=="string"&&ye.test.test(s)?s:e.options.nullStr};var Ue={identify:s=>typeof s=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:s=>new y(s[0]==="t"||s[0]==="T"),stringify({source:s,value:e},t){if(s&&Ue.test.test(s)){let n=s[0]==="t"||s[0]==="T";if(e===n)return s}return e?t.options.trueStr:t.options.falseStr}};function D({format:s,minFractionDigits:e,tag:t,value:n}){if(typeof n=="bigint")return String(n);let i=typeof n=="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=Object.is(n,-0)?"-0":JSON.stringify(n);if(!s&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^-?\d/.test(r)&&!r.includes("e")){let o=r.indexOf(".");o<0&&(o=r.length,r+=".");let l=e-(r.length-o-1);for(;l-- >0;)r+="0"}return r}var bt={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:D},wt={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():D(s)}},St={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(s){let e=new y(parseFloat(s)),t=s.indexOf(".");return t!==-1&&s[s.length-1]==="0"&&(e.minFractionDigits=s.length-t-1),e},stringify:D};var kt=s=>typeof s=="bigint"||Number.isInteger(s),Qt=(s,e,t,{intAsBigInt:n})=>n?BigInt(s):parseInt(s.substring(e),t);function Es(s,e,t){let{value:n}=s;return kt(n)&&n>=0?t+n.toString(e):D(s)}var Nt={identify:s=>kt(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(s,e,t)=>Qt(s,2,8,t),stringify:s=>Es(s,8,"0o")},Ot={identify:kt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(s,e,t)=>Qt(s,0,10,t),stringify:D},At={identify:s=>kt(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(s,e,t)=>Qt(s,2,16,t),stringify:s=>Es(s,16,"0x")};var Ts=[W,H,pe,ye,Ue,Nt,Ot,At,bt,wt,St];function Is(s){return typeof s=="bigint"||Number.isInteger(s)}var Et=({value:s})=>JSON.stringify(s),An=[{identify:s=>typeof s=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:s=>s,stringify:Et},{identify:s=>s==null,createNode:()=>new y(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Et},{identify:s=>typeof s=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:s=>s==="true",stringify:Et},{identify:Is,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(s,e,{intAsBigInt:t})=>t?BigInt(s):parseInt(s,10),stringify:({value:s})=>Is(s)?s.toString():JSON.stringify(s)},{identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:s=>parseFloat(s),stringify:Et}],En={default:!0,tag:"",test:/^/,resolve(s,e){return e(`Unresolved plain scalar ${JSON.stringify(s)}`),s}},Ls=[W,H].concat(An,En);var Ve={identify:s=>s instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(s,e){if(typeof atob=="function"){let t=atob(s.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),s},stringify({comment:s,type:e,value:t},n,i,r){if(!t)return"";let o=t,l;if(typeof btoa=="function"){let a="";for(let c=0;c<o.length;++c)a+=String.fromCharCode(o[c]);l=btoa(a)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=y.BLOCK_LITERAL),e!==y.QUOTE_DOUBLE){let a=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),c=Math.ceil(l.length/a),p=new Array(c);for(let f=0,u=0;f<c;++f,u+=a)p[f]=l.substr(u,a);l=p.join(e===y.BLOCK_LITERAL?`
55
- `:" ")}return le({comment:s,type:e,value:l},n,i,r)}};function Gt(s,e){if(V(s))for(let t=0;t<s.items.length;++t){let n=s.items[t];if(!T(n)){if(U(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let i=n.items[0]||new v(new y(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
56
- ${i.key.commentBefore}`:n.commentBefore),n.comment){let r=i.value??i.key;r.comment=r.comment?`${n.comment}
57
- ${r.comment}`:n.comment}n=i}s.items[t]=T(n)?n:new v(n)}}else e("Expected a sequence for this tag");return s}function Wt(s,e,t){let{replacer:n}=t,i=new B(s);i.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof n=="function"&&(o=n.call(e,String(r++),o));let l,a;if(Array.isArray(o))if(o.length===2)l=o[0],a=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)l=c[0],a=o[l];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else l=o;i.items.push(Te(l,a,t))}return i}var Je={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Gt,createNode:Wt};var Ie=class s extends B{constructor(){super(),this.add=$.prototype.add.bind(this),this.delete=$.prototype.delete.bind(this),this.get=$.prototype.get.bind(this),this.has=$.prototype.has.bind(this),this.set=$.prototype.set.bind(this),this.tag=s.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let i of this.items){let r,o;if(T(i)?(r=M(i.key,"",t),o=M(i.value,r,t)):r=M(i,"",t),n.has(r))throw new Error("Ordered maps must not include duplicate keys");n.set(r,o)}return n}static from(e,t,n){let i=Wt(e,t,n),r=new this;return r.items=i.items,r}};Ie.tag="tag:yaml.org,2002:omap";var Ye={collection:"seq",identify:s=>s instanceof Map,nodeClass:Ie,default:!1,tag:"tag:yaml.org,2002:omap",resolve(s,e){let t=Gt(s,e),n=[];for(let{key:i}of t.items)E(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new Ie,t)},createNode:(s,e,t)=>Ie.from(s,e,t)};function Cs({value:s,source:e},t){return e&&(s?Ht:Xt).test.test(e)?e:s?t.options.trueStr:t.options.falseStr}var Ht={identify:s=>s===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new y(!0),stringify:Cs},Xt={identify:s=>s===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new y(!1),stringify:Cs};var vs={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:D},$s={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s.replace(/_/g,"")),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():D(s)}},_s={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(s){let e=new y(parseFloat(s.replace(/_/g,""))),t=s.indexOf(".");if(t!==-1){let n=s.substring(t+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:D};var Qe=s=>typeof s=="bigint"||Number.isInteger(s);function Tt(s,e,t,{intAsBigInt:n}){let i=s[0];if((i==="-"||i==="+")&&(e+=1),s=s.substring(e).replace(/_/g,""),n){switch(t){case 2:s=`0b${s}`;break;case 8:s=`0o${s}`;break;case 16:s=`0x${s}`;break}let o=BigInt(s);return i==="-"?BigInt(-1)*o:o}let r=parseInt(s,t);return i==="-"?-1*r:r}function zt(s,e,t){let{value:n}=s;if(Qe(n)){let i=n.toString(e);return n<0?"-"+t+i.substr(1):t+i}return D(s)}var Ps={identify:Qe,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(s,e,t)=>Tt(s,2,2,t),stringify:s=>zt(s,2,"0b")},Ms={identify:Qe,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(s,e,t)=>Tt(s,1,8,t),stringify:s=>zt(s,8,"0")},Bs={identify:Qe,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(s,e,t)=>Tt(s,0,10,t),stringify:D},Ds={identify:Qe,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(s,e,t)=>Tt(s,2,16,t),stringify:s=>zt(s,16,"0x")};var Le=class s extends ${constructor(e){super(e),this.tag=s.tag}add(e){let t;T(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),he(this.items,t.key)||this.items.push(t)}get(e,t){let n=he(this.items,e);return!t&&T(n)?E(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=he(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new v(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){let{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof i=="function"&&(o=i.call(t,o,o)),r.items.push(Te(o,null,n));return r}};Le.tag="tag:yaml.org,2002:set";var Ge={collection:"map",identify:s=>s instanceof Set,nodeClass:Le,default:!1,tag:"tag:yaml.org,2002:set",createNode:(s,e,t)=>Le.from(s,e,t),resolve(s,e){if(U(s)){if(s.hasAllNullValues(!0))return Object.assign(new Le,s);e("Set items must all have null values")}else e("Expected a mapping for this tag");return s}};function Zt(s,e){let 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));return t==="-"?i(-1)*r:r}function Ks(s){let{value:e}=s,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return D(s);let n="";e<0&&(n="-",e*=t(-1));let i=t(60),r=[e%i];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*$/,"")}var It={identify:s=>typeof s=="bigint"||Number.isInteger(s),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(s,e,{intAsBigInt:t})=>Zt(s,t),stringify:Ks},Lt={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:s=>Zt(s,!1),stringify:Ks},Ce={identify:s=>s instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(s){let e=s.match(Ce.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,n,i,r,o,l]=e.map(Number),a=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(t,n-1,i,r||0,o||0,l||0,a),p=e[8];if(p&&p!=="Z"){let f=Zt(p,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:s})=>s?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};var es=[W,H,pe,ye,Ht,Xt,Ps,Ms,Bs,Ds,vs,$s,_s,Ve,G,Ye,Je,Ge,It,Lt,Ce];var js=new Map([["core",Ts],["failsafe",[W,H,pe]],["json",Ls],["yaml11",es],["yaml-1.1",es]]),qs={binary:Ve,bool:Ue,float:St,floatExp:wt,floatNaN:bt,floatTime:Lt,int:Ot,intHex:At,intOct:Nt,intTime:It,map:W,merge:G,null:ye,omap:Ye,pairs:Je,seq:H,set:Ge,timestamp:Ce},Rs={"tag:yaml.org,2002:binary":Ve,"tag:yaml.org,2002:merge":G,"tag:yaml.org,2002:omap":Ye,"tag:yaml.org,2002:pairs":Je,"tag:yaml.org,2002:set":Ge,"tag:yaml.org,2002:timestamp":Ce};function Ct(s,e,t){let n=js.get(e);if(n&&!s)return t&&!n.includes(G)?n.concat(G):n.slice();let i=n;if(!i)if(Array.isArray(s))i=[];else{let r=Array.from(js.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`)}if(Array.isArray(s))for(let r of s)i=i.concat(r);else typeof s=="function"&&(i=s(i.slice()));return t&&(i=i.concat(G)),i.reduce((r,o)=>{let l=typeof o=="string"?qs[o]:o;if(!l){let a=JSON.stringify(o),c=Object.keys(qs).map(p=>JSON.stringify(p)).join(", ");throw new Error(`Unknown custom tag ${a}; use one of ${c}`)}return r.includes(l)||r.push(l),r},[])}var Tn=(s,e)=>s.key<e.key?-1:s.key>e.key?1:0,ve=class s{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:i,schema:r,sortMapEntries:o,toStringDefaults:l}){this.compat=Array.isArray(e)?Ct(e,"compat"):e?Ct(null,e):null,this.name=typeof r=="string"&&r||"core",this.knownTags=i?Rs:{},this.tags=Ct(t,this.name,n),this.toStringOptions=l??null,Object.defineProperty(this,Y,{value:W}),Object.defineProperty(this,q,{value:pe}),Object.defineProperty(this,re,{value:H}),this.sortMapEntries=typeof o=="function"?o:o===!0?Tn:null}clone(){let e=Object.create(s.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};function Fs(s,e){let t=[],n=e.directives===!0;if(e.directives!==!1&&s.directives){let a=s.directives.toString(s);a?(t.push(a),n=!0):s.directives.docStart&&(n=!0)}n&&t.push("---");let i=ut(s,e),{commentString:r}=i.options;if(s.commentBefore){t.length!==1&&t.unshift("");let a=r(s.commentBefore);t.unshift(J(a,""))}let o=!1,l=null;if(s.contents){if(I(s.contents)){if(s.contents.spaceBefore&&n&&t.push(""),s.contents.commentBefore){let p=r(s.contents.commentBefore);t.push(J(p,""))}i.forceBlockIndent=!!s.comment,l=s.contents.comment}let a=l?void 0:()=>o=!0,c=ae(s.contents,i,()=>l=null,a);l&&(c+=te(c,"",r(l))),(c[0]==="|"||c[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${c}`:t.push(c)}else t.push(ae(s.contents,i));if(s.directives?.docEnd)if(s.comment){let a=r(s.comment);a.includes(`
58
- `)?(t.push("..."),t.push(J(a,""))):t.push(`... ${a}`)}else t.push("...");else{let a=s.comment;a&&o&&(a=a.replace(/^\n+/,"")),a&&((!o||l)&&t[t.length-1]!==""&&t.push(""),t.push(J(r(a),"")))}return t.join(`
59
- `)+`
60
- `}var se=class s{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,K,{value:st});let i=null;typeof t=="function"||Array.isArray(t)?i=t:n===void 0&&t&&(n=t,t=void 0);let r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=r;let{version:o}=r;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Z({version:o}),this.setSchema(o,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){let e=Object.create(s.prototype,{[K]:{value:st}});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=I(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){$e(this.contents)&&this.contents.add(e)}addIn(e,t){$e(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=Rt(this);e.anchor=!t||n.has(t)?Ft(t||"a",n):t}return new ee(e.anchor)}createNode(e,t,n){let i;if(typeof t=="function")e=t.call({"":e},"",e),i=t;else if(Array.isArray(t)){let m=S=>typeof S=="number"||S instanceof String||S instanceof Number,w=t.filter(m).map(String);w.length>0&&(t=t.concat(w)),i=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:r,anchorPrefix:o,flow:l,keepUndefined:a,onTagObj:c,tag:p}=n??{},{onAnchor:f,setAnchors:u,sourceObjects:d}=ws(this,o||"a"),g={aliasDuplicateObjects:r??!0,keepUndefined:a??!1,onAnchor:f,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:d},h=oe(e,p,g);return l&&L(h)&&(h.flow=!0),u(),h}createPair(e,t,n={}){let i=this.createNode(e,null,n),r=this.createNode(t,null,n);return new v(i,r)}delete(e){return $e(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ae(e)?this.contents==null?!1:(this.contents=null,!0):$e(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return L(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Ae(e)?!t&&E(this.contents)?this.contents.value:this.contents:L(this.contents)?this.contents.getIn(e,t):void 0}has(e){return L(this.contents)?this.contents.has(e):!1}hasIn(e){return Ae(e)?this.contents!==void 0:L(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=qe(this.schema,[e],t):$e(this.contents)&&this.contents.set(e,t)}setIn(e,t){Ae(e)?this.contents=t:this.contents==null?this.contents=qe(this.schema,Array.from(e),t):$e(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Z({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Z({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new ve(Object.assign(n,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:i,onAnchor:r,reviver:o}={}){let l={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},a=M(this.contents,t??"",l);if(typeof r=="function")for(let{count:c,res:p}of l.anchors.values())r(p,c);return typeof o=="function"?fe(o,{"":a},"",a):a}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return Fs(this,e)}};function $e(s){if(L(s))return!0;throw new Error("Expected a YAML collection as document contents")}var _e=class extends Error{constructor(e,t,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=t}},R=class extends _e{constructor(e,t,n){super("YAMLParseError",e,t,n)}},Pe=class extends _e{constructor(e,t,n){super("YAMLWarning",e,t,n)}},We=(s,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(l=>e.linePos(l));let{line:n,col:i}=t.linePos[0];t.message+=` at line ${n}, column ${i}`;let r=i-1,o=s.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){let l=Math.min(r-39,o.length-79);o="\u2026"+o.substring(l),r-=l-1}if(o.length>80&&(o=o.substring(0,79)+"\u2026"),n>1&&/^ *$/.test(o.substring(0,r))){let l=s.substring(e.lineStarts[n-2],e.lineStarts[n-1]);l.length>80&&(l=l.substring(0,79)+`\u2026
61
- `),o=l+o}if(/[^ ]/.test(o)){let l=1,a=t.linePos[1];a?.line===n&&a.col>i&&(l=Math.max(1,Math.min(a.col-i,80-r)));let c=" ".repeat(r)+"^".repeat(l);t.message+=`:
62
-
63
- ${o}
64
- ${c}
65
- `}};function ne(s,{flow:e,indicator:t,next:n,offset:i,onError:r,parentIndent:o,startOnNewline:l}){let a=!1,c=l,p=l,f="",u="",d=!1,g=!1,h=null,m=null,w=null,S=null,k=null,N=null,O=null;for(let b of s)switch(g&&(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"),g=!1),h&&(c&&b.type!=="comment"&&b.type!=="newline"&&r(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),b.type){case"space":!e&&(t!=="doc-start"||n?.type!=="flow-collection")&&b.source.includes(" ")&&(h=b),p=!0;break;case"comment":{p||r(b,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let _=b.source.substring(1)||" ";f?f+=u+_:f=_,u="",c=!1;break}case"newline":c?f?f+=b.source:(!N||t!=="seq-item-ind")&&(a=!0):u+=b.source,c=!0,d=!0,(m||w)&&(S=b),p=!0;break;case"anchor":m&&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),m=b,O??(O=b.offset),c=!1,p=!1,g=!0;break;case"tag":{w&&r(b,"MULTIPLE_TAGS","A node can have at most one tag"),w=b,O??(O=b.offset),c=!1,p=!1,g=!0;break}case t:(m||w)&&r(b,"BAD_PROP_ORDER",`Anchors and tags must be after the ${b.source} indicator`),N&&r(b,"UNEXPECTED_TOKEN",`Unexpected ${b.source} in ${e??"collection"}`),N=b,c=t==="seq-item-ind"||t==="explicit-key-ind",p=!1;break;case"comma":if(e){k&&r(b,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),k=b,c=!1,p=!1;break}default:r(b,"UNEXPECTED_TOKEN",`Unexpected ${b.type} token`),c=!1,p=!1}let A=s[s.length-1],C=A?A.offset+A.source.length:i;return g&&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"),h&&(c&&h.indent<=o||n?.type==="block-map"||n?.type==="block-seq")&&r(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:k,found:N,spaceBefore:a,comment:f,hasNewline:d,anchor:m,tag:w,newlineAfterProp:S,end:C,start:O??C}}function me(s){if(!s)return null;switch(s.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(s.source.includes(`
66
- `))return!0;if(s.end){for(let e of s.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of s.items){for(let t of e.start)if(t.type==="newline")return!0;if(e.sep){for(let t of e.sep)if(t.type==="newline")return!0}if(me(e.key)||me(e.value))return!0}return!1;default:return!0}}function He(s,e,t){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===s&&(n.source==="]"||n.source==="}")&&me(e)&&t(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function vt(s,e,t){let{uniqueKeys:n}=s.options;if(n===!1)return!1;let i=typeof n=="function"?n:(r,o)=>r===o||E(r)&&E(o)&&r.value===o.value;return e.some(r=>i(r.key,t))}var xs="All mapping items must start at the same column";function Us({composeNode:s,composeEmptyNode:e},t,n,i,r){let o=r?.nodeClass??$,l=new o(t.schema);t.atRoot&&(t.atRoot=!1);let a=n.offset,c=null;for(let p of n.items){let{start:f,key:u,sep:d,value:g}=p,h=ne(f,{indicator:"explicit-key-ind",next:u??d?.[0],offset:a,onError:i,parentIndent:n.indent,startOnNewline:!0}),m=!h.found;if(m){if(u&&(u.type==="block-seq"?i(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in u&&u.indent!==n.indent&&i(a,"BAD_INDENT",xs)),!h.anchor&&!h.tag&&!d){c=h.end,h.comment&&(l.comment?l.comment+=`
67
- `+h.comment:l.comment=h.comment);continue}(h.newlineAfterProp||me(u))&&i(u??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else h.found?.indent!==n.indent&&i(a,"BAD_INDENT",xs);t.atKey=!0;let w=h.end,S=u?s(t,u,h,i):e(t,w,f,null,h,i);t.schema.compat&&He(n.indent,u,i),t.atKey=!1,vt(t,l.items,S)&&i(w,"DUPLICATE_KEY","Map keys must be unique");let k=ne(d??[],{indicator:"map-value-ind",next:g,offset:S.range[2],onError:i,parentIndent:n.indent,startOnNewline:!u||u.type==="block-scalar"});if(a=k.end,k.found){m&&(g?.type==="block-map"&&!k.hasNewline&&i(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&h.start<k.found.offset-1024&&i(S.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let N=g?s(t,g,k,i):e(t,a,d,null,k,i);t.schema.compat&&He(n.indent,g,i),a=N.range[2];let O=new v(S,N);t.options.keepSourceTokens&&(O.srcToken=p),l.items.push(O)}else{m&&i(S.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),k.comment&&(S.comment?S.comment+=`
68
- `+k.comment:S.comment=k.comment);let N=new v(S);t.options.keepSourceTokens&&(N.srcToken=p),l.items.push(N)}}return c&&c<a&&i(c,"IMPOSSIBLE","Map comment with trailing content"),l.range=[n.offset,a,c??a],l}function Vs({composeNode:s,composeEmptyNode:e},t,n,i,r){let o=r?.nodeClass??B,l=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let a=n.offset,c=null;for(let{start:p,value:f}of n.items){let u=ne(p,{indicator:"seq-item-ind",next:f,offset:a,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!u.found)if(u.anchor||u.tag||f)f?.type==="block-seq"?i(u.end,"BAD_INDENT","All sequence items must start at the same column"):i(a,"MISSING_CHAR","Sequence item without - indicator");else{c=u.end,u.comment&&(l.comment=u.comment);continue}let d=f?s(t,f,u,i):e(t,u.end,p,null,u,i);t.schema.compat&&He(n.indent,f,i),a=d.range[2],l.items.push(d)}return l.range=[n.offset,a,c??a],l}function ie(s,e,t,n){let i="";if(s){let r=!1,o="";for(let l of s){let{source:a,type:c}=l;switch(c){case"space":r=!0;break;case"comment":{t&&!r&&n(l,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let p=a.substring(1)||" ";i?i+=o+p:i=p,o="";break}case"newline":i&&(o+=a),r=!0;break;default:n(l,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=a.length}}return{comment:i,offset:e}}var ts="Block collections are not allowed within flow collections",ss=s=>s&&(s.type==="block-map"||s.type==="block-seq");function Js({composeNode:s,composeEmptyNode:e},t,n,i,r){let o=n.start.source==="{",l=o?"flow map":"flow sequence",a=r?.nodeClass??(o?$:B),c=new a(t.schema);c.flow=!0;let p=t.atRoot;p&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let f=n.offset+n.start.source.length;for(let m=0;m<n.items.length;++m){let w=n.items[m],{start:S,key:k,sep:N,value:O}=w,A=ne(S,{flow:l,indicator:"explicit-key-ind",next:k??N?.[0],offset:f,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!A.found){if(!A.anchor&&!A.tag&&!N&&!O){m===0&&A.comma?i(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`):m<n.items.length-1&&i(A.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${l}`),A.comment&&(c.comment?c.comment+=`
69
- `+A.comment:c.comment=A.comment),f=A.end;continue}!o&&t.options.strict&&me(k)&&i(k,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(m===0)A.comma&&i(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`);else if(A.comma||i(A.start,"MISSING_CHAR",`Missing , between ${l} items`),A.comment){let C="";e:for(let b of S)switch(b.type){case"comma":case"space":break;case"comment":C=b.source.substring(1);break e;default:break e}if(C){let b=c.items[c.items.length-1];T(b)&&(b=b.value??b.key),b.comment?b.comment+=`
70
- `+C:b.comment=C,A.comment=A.comment.substring(C.length+1)}}if(!o&&!N&&!A.found){let C=O?s(t,O,A,i):e(t,A.end,N,null,A,i);c.items.push(C),f=C.range[2],ss(O)&&i(C.range,"BLOCK_IN_FLOW",ts)}else{t.atKey=!0;let C=A.end,b=k?s(t,k,A,i):e(t,C,S,null,A,i);ss(k)&&i(b.range,"BLOCK_IN_FLOW",ts),t.atKey=!1;let _=ne(N??[],{flow:l,indicator:"map-value-ind",next:O,offset:b.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(_.found){if(!o&&!A.found&&t.options.strict){if(N)for(let P of N){if(P===_.found)break;if(P.type==="newline"){i(P,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}A.start<_.found.offset-1024&&i(_.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else O&&("source"in O&&O.source?.[0]===":"?i(O,"MISSING_CHAR",`Missing space after : in ${l}`):i(_.start,"MISSING_CHAR",`Missing , or : between ${l} items`));let ce=O?s(t,O,_,i):_.found?e(t,_.end,N,null,_,i):null;ce?ss(O)&&i(ce.range,"BLOCK_IN_FLOW",ts):_.comment&&(b.comment?b.comment+=`
71
- `+_.comment:b.comment=_.comment);let Se=new v(b,ce);if(t.options.keepSourceTokens&&(Se.srcToken=w),o){let P=c;vt(t,P.items,b)&&i(C,"DUPLICATE_KEY","Map keys must be unique"),P.items.push(Se)}else{let P=new $(t.schema);P.flow=!0,P.items.push(Se);let ps=(ce??b).range;P.range=[b.range[0],ps[1],ps[2]],c.items.push(P)}f=ce?ce.range[2]:_.end}}let u=o?"}":"]",[d,...g]=n.end,h=f;if(d?.source===u)h=d.offset+d.source.length;else{let m=l[0].toUpperCase()+l.substring(1),w=p?`${m} must end with a ${u}`:`${m} in block collection must be sufficiently indented and end with a ${u}`;i(f,p?"MISSING_CHAR":"BAD_INDENT",w),d&&d.source.length!==1&&g.unshift(d)}if(g.length>0){let m=ie(g,h,t.options.strict,i);m.comment&&(c.comment?c.comment+=`
72
- `+m.comment:c.comment=m.comment),c.range=[n.offset,h,m.offset]}else c.range=[n.offset,h,h];return c}function ns(s,e,t,n,i,r){let o=t.type==="block-map"?Us(s,e,t,n,r):t.type==="block-seq"?Vs(s,e,t,n,r):Js(s,e,t,n,r),l=o.constructor;return i==="!"||i===l.tagName?(o.tag=l.tagName,o):(i&&(o.tag=i),o)}function Ys(s,e,t,n,i){let r=n.tag,o=r?e.directives.tagName(r.source,u=>i(r,"TAG_RESOLVE_FAILED",u)):null;if(t.type==="block-seq"){let{anchor:u,newlineAfterProp:d}=n,g=u&&r?u.offset>r.offset?u:r:u??r;g&&(!d||d.offset<g.offset)&&i(g,"MISSING_CHAR","Missing newline after block sequence props")}let l=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!r||!o||o==="!"||o===$.tagName&&l==="map"||o===B.tagName&&l==="seq")return ns(s,e,t,i,o);let a=e.schema.tags.find(u=>u.tag===o&&u.collection===l);if(!a){let u=e.schema.knownTags[o];if(u?.collection===l)e.schema.tags.push(Object.assign({},u,{default:!1})),a=u;else return u?i(r,"BAD_COLLECTION_TYPE",`${u.tag} used for ${l} collection, but expects ${u.collection??"scalar"}`,!0):i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),ns(s,e,t,i,o)}let c=ns(s,e,t,i,o,a),p=a.resolve?.(c,u=>i(r,"TAG_RESOLVE_FAILED",u),e.options)??c,f=I(p)?p:new y(p);return f.range=c.range,f.tag=o,a?.format&&(f.format=a.format),f}function $t(s,e,t){let n=e.offset,i=In(e,s.options.strict,t);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let r=i.mode===">"?y.BLOCK_FOLDED:y.BLOCK_LITERAL,o=e.source?Ln(e.source):[],l=o.length;for(let h=o.length-1;h>=0;--h){let m=o[h][1];if(m===""||m==="\r")l=h;else break}if(l===0){let h=i.chomp==="+"&&o.length>0?`
73
- `.repeat(Math.max(1,o.length-1)):"",m=n+i.length;return e.source&&(m+=e.source.length),{value:h,type:r,comment:i.comment,range:[n,m,m]}}let a=e.indent+i.indent,c=e.offset+i.length,p=0;for(let h=0;h<l;++h){let[m,w]=o[h];if(w===""||w==="\r")i.indent===0&&m.length>a&&(a=m.length);else{m.length<a&&t(c+m.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(a=m.length),p=h,a===0&&!s.atRoot&&t(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=m.length+w.length+1}for(let h=o.length-1;h>=l;--h)o[h][0].length>a&&(l=h+1);let f="",u="",d=!1;for(let h=0;h<p;++h)f+=o[h][0].slice(a)+`
74
- `;for(let h=p;h<l;++h){let[m,w]=o[h];c+=m.length+w.length+1;let S=w[w.length-1]==="\r";if(S&&(w=w.slice(0,-1)),w&&m.length<a){let N=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;t(c-w.length-(S?2:1),"BAD_INDENT",N),m=""}r===y.BLOCK_LITERAL?(f+=u+m.slice(a)+w,u=`
75
- `):m.length>a||w[0]===" "?(u===" "?u=`
76
- `:!d&&u===`
77
- `&&(u=`
78
-
79
- `),f+=u+m.slice(a)+w,u=`
80
- `,d=!0):w===""?u===`
81
- `?f+=`
82
- `:u=`
83
- `:(f+=u+w,u=" ",d=!1)}switch(i.chomp){case"-":break;case"+":for(let h=l;h<o.length;++h)f+=`
84
- `+o[h][0].slice(a);f[f.length-1]!==`
85
- `&&(f+=`
86
- `);break;default:f+=`
87
- `}let g=n+i.length+e.source.length;return{value:f,type:r,comment:i.comment,range:[n,g,g]}}function In({offset:s,props:e},t,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=e[0],r=i[0],o=0,l="",a=-1;for(let u=1;u<i.length;++u){let d=i[u];if(!l&&(d==="-"||d==="+"))l=d;else{let g=Number(d);!o&&g?o=g:a===-1&&(a=s+u)}}a!==-1&&n(a,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,p="",f=i.length;for(let u=1;u<e.length;++u){let d=e[u];switch(d.type){case"space":c=!0;case"newline":f+=d.source.length;break;case"comment":t&&!c&&n(d,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=d.source.length,p=d.source.substring(1);break;case"error":n(d,"UNEXPECTED_TOKEN",d.message),f+=d.source.length;break;default:{let g=`Unexpected token in block scalar header: ${d.type}`;n(d,"UNEXPECTED_TOKEN",g);let h=d.source;h&&typeof h=="string"&&(f+=h.length)}}}return{mode:r,indent:o,chomp:l,comment:p,length:f}}function Ln(s){let e=s.split(/\n( *)/),t=e[0],n=t.match(/^( *)/),r=[n?.[1]?[n[1],t.slice(n[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)r.push([e[o],e[o+1]]);return r}function _t(s,e,t){let{offset:n,type:i,source:r,end:o}=s,l,a,c=(u,d,g)=>t(n+u,d,g);switch(i){case"scalar":l=y.PLAIN,a=Cn(r,c);break;case"single-quoted-scalar":l=y.QUOTE_SINGLE,a=vn(r,c);break;case"double-quoted-scalar":l=y.QUOTE_DOUBLE,a=$n(r,c);break;default:return t(s,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+r.length,n+r.length]}}let p=n+r.length,f=ie(o,p,e,t);return{value:a,type:l,comment:f.comment,range:[n,p,f.offset]}}function Cn(s,e){let t="";switch(s[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${s[0]}`;break}case"@":case"`":{t=`reserved character ${s[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Qs(s)}function vn(s,e){return(s[s.length-1]!=="'"||s.length===1)&&e(s.length,"MISSING_CHAR","Missing closing 'quote"),Qs(s.slice(1,-1)).replace(/''/g,"'")}function Qs(s){let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
88
- `,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
89
- `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=e.exec(s);if(!n)return s;let i=n[1],r=" ",o=e.lastIndex;for(t.lastIndex=o;n=t.exec(s);)n[1]===""?r===`
90
- `?i+=r:r=`
91
- `:(i+=r+n[1],r=" "),o=t.lastIndex;let l=/[ \t]*(.*)/sy;return l.lastIndex=o,n=l.exec(s),i+r+(n?.[1]??"")}function $n(s,e){let t="";for(let n=1;n<s.length-1;++n){let i=s[n];if(!(i==="\r"&&s[n+1]===`
92
- `))if(i===`
93
- `){let{fold:r,offset:o}=_n(s,n);t+=r,n=o}else if(i==="\\"){let r=s[++n],o=Pn[r];if(o)t+=o;else if(r===`
94
- `)for(r=s[n+1];r===" "||r===" ";)r=s[++n+1];else if(r==="\r"&&s[n+1]===`
95
- `)for(r=s[++n+1];r===" "||r===" ";)r=s[++n+1];else if(r==="x"||r==="u"||r==="U"){let l=r==="x"?2:r==="u"?4:8;t+=Mn(s,n+1,l,e),n+=l}else{let l=s.substr(n-1,2);e(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),t+=l}}else if(i===" "||i===" "){let r=n,o=s[n+1];for(;o===" "||o===" ";)o=s[++n+1];o!==`
96
- `&&!(o==="\r"&&s[n+2]===`
97
- `)&&(t+=n>r?s.slice(r,n+1):i)}else t+=i}return(s[s.length-1]!=='"'||s.length===1)&&e(s.length,"MISSING_CHAR",'Missing closing "quote'),t}function _n(s,e){let t="",n=s[e+1];for(;(n===" "||n===" "||n===`
98
- `||n==="\r")&&!(n==="\r"&&s[e+2]!==`
99
- `);)n===`
100
- `&&(t+=`
101
- `),e+=1,n=s[e+1];return t||(t=" "),{fold:t,offset:e}}var Pn={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
102
- `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Mn(s,e,t,n){let i=s.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(o)}catch{let l=s.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),l}}function is(s,e,t,n){let{value:i,type:r,comment:o,range:l}=e.type==="block-scalar"?$t(s,e,n):_t(e,s.options.strict,n),a=t?s.directives.tagName(t.source,f=>n(t,"TAG_RESOLVE_FAILED",f)):null,c;s.options.stringKeys&&s.atKey?c=s.schema[q]:a?c=Bn(s.schema,i,a,t,n):e.type==="scalar"?c=Dn(s,i,e,n):c=s.schema[q];let p;try{let f=c.resolve(i,u=>n(t??e,"TAG_RESOLVE_FAILED",u),s.options);p=E(f)?f:new y(f)}catch(f){let u=f instanceof Error?f.message:String(f);n(t??e,"TAG_RESOLVE_FAILED",u),p=new y(i)}return p.range=l,p.source=i,r&&(p.type=r),a&&(p.tag=a),c.format&&(p.format=c.format),o&&(p.comment=o),p}function Bn(s,e,t,n,i){if(t==="!")return s[q];let r=[];for(let l of s.tags)if(!l.collection&&l.tag===t)if(l.default&&l.test)r.push(l);else return l;for(let l of r)if(l.test?.test(e))return l;let o=s.knownTags[t];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[q])}function Dn({atKey:s,directives:e,schema:t},n,i,r){let o=t.tags.find(l=>(l.default===!0||s&&l.default==="key")&&l.test?.test(n))||t[q];if(t.compat){let l=t.compat.find(a=>a.default&&a.test?.test(n))??t[q];if(o.tag!==l.tag){let a=e.tagString(o.tag),c=e.tagString(l.tag),p=`Value may be parsed as either ${a} or ${c}`;r(i,"TAG_RESOLVE_FAILED",p,!0)}}return o}function Gs(s,e,t){if(e){t??(t=e.length);for(let n=t-1;n>=0;--n){let i=e[n];switch(i.type){case"space":case"comment":case"newline":s-=i.source.length;continue}for(i=e[++n];i?.type==="space";)s+=i.source.length,i=e[++n];break}}return s}var Kn={composeNode:rs,composeEmptyNode:Pt};function rs(s,e,t,n){let i=s.atKey,{spaceBefore:r,comment:o,anchor:l,tag:a}=t,c,p=!0;switch(e.type){case"alias":c=jn(s,e,n),(l||a)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=is(s,e,a,n),l&&(c.anchor=l.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=Ys(Kn,s,e,t,n),l&&(c.anchor=l.source.substring(1))}catch(f){let u=f instanceof Error?f.message:String(f);n(e,"RESOURCE_EXHAUSTION",u)}break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",f),p=!1}}return c??(c=Pt(s,e.offset,void 0,null,t,n)),l&&c.anchor===""&&n(l,"BAD_ALIAS","Anchor cannot be an empty string"),i&&s.options.stringKeys&&(!E(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&n(a??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),r&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),s.options.keepSourceTokens&&p&&(c.srcToken=e),c}function Pt(s,e,t,n,{spaceBefore:i,comment:r,anchor:o,tag:l,end:a},c){let p={type:"scalar",offset:Gs(e,t,n),indent:-1,source:""},f=is(s,p,l,c);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}function jn({options:s},{offset:e,source:t,end:n},i){let r=new ee(t.substring(1));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);let o=e+t.length,l=ie(n,o,s.strict,i);return r.range=[e,o,l.offset],l.comment&&(r.comment=l.comment),r}function Ws(s,e,{offset:t,start:n,value:i,end:r},o){let l=Object.assign({_directives:e},s),a=new se(void 0,l),c={atKey:!1,atRoot:!0,directives:a.directives,options:a.options,schema:a.schema},p=ne(n,{indicator:"doc-start",next:i??r?.[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});p.found&&(a.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!p.hasNewline&&o(p.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),a.contents=i?rs(c,i,p,o):Pt(c,p.end,n,null,p,o);let f=a.contents.range[2],u=ie(r,f,!1,o);return u.comment&&(a.comment=u.comment),a.range=[t,f,u.offset],a}function Xe(s){if(typeof s=="number")return[s,s+1];if(Array.isArray(s))return s.length===2?s:[s[0],s[1]];let{offset:e,source:t}=s;return[e,e+(typeof t=="string"?t.length:1)]}function Hs(s){let e="",t=!1,n=!1;for(let i=0;i<s.length;++i){let r=s[i];switch(r[0]){case"#":e+=(e===""?"":n?`
103
-
104
- `:`
105
- `)+(r.substring(1)||" "),t=!0,n=!1;break;case"%":s[i+1]?.[0]!=="#"&&(i+=1),t=!1;break;default:t||(n=!0),t=!1}}return{comment:e,afterEmptyLine:n}}var be=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,n,i,r)=>{let o=Xe(t);r?this.warnings.push(new Pe(o,n,i)):this.errors.push(new R(o,n,i))},this.directives=new Z({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:i}=Hs(this.prelude);if(n){let r=e.contents;if(t)e.comment=e.comment?`${e.comment}
106
- ${n}`:n;else if(i||e.directives.docStart||!r)e.commentBefore=n;else if(L(r)&&!r.flow&&r.items.length>0){let o=r.items[0];T(o)&&(o=o.key);let l=o.commentBefore;o.commentBefore=l?`${n}
107
- ${l}`:n}else{let o=r.commentBefore;r.commentBefore=o?`${n}
108
- ${o}`:n}}if(t){for(let r=0;r<this.errors.length;++r)e.errors.push(this.errors[r]);for(let r=0;r<this.warnings.length;++r)e.warnings.push(this.warnings[r])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Hs(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let i of e)yield*this.next(i);yield*this.end(t,n)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,n,i)=>{let r=Xe(e);r[0]+=t,this.onError(r,"BAD_DIRECTIVE",n,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=Ws(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new R(Xe(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new R(Xe(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let t=ie(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let n=this.doc.comment;this.doc.comment=n?`${n}
109
- ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new R(Xe(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let n=Object.assign({_directives:this.directives},this.options),i=new se(void 0,n);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,t,t],this.decorate(i,!1),yield i}}};var cs={};ms(cs,{BOM:()=>ze,DOCUMENT:()=>Ze,FLOW_END:()=>et,SCALAR:()=>Me,createScalarToken:()=>zs,isCollection:()=>Fn,isScalar:()=>xn,prettyToken:()=>Un,resolveAsScalar:()=>Xs,setScalarValue:()=>Zs,stringify:()=>tn,tokenType:()=>as,visit:()=>de});function Xs(s,e=!0,t){if(s){let n=(i,r,o)=>{let l=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(t)t(l,r,o);else throw new R([l,l+1],r,o)};switch(s.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return _t(s,e,n);case"block-scalar":return $t({options:{strict:e}},s,n)}}return null}function zs(s,e){let{implicitKey:t=!1,indent:n,inFlow:i=!1,offset:r=-1,type:o="PLAIN"}=e,l=le({type:o,value:s},{implicitKey:t,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),a=e.end??[{type:"newline",offset:-1,indent:n,source:`
110
- `}];switch(l[0]){case"|":case">":{let c=l.indexOf(`
111
- `),p=l.substring(0,c),f=l.substring(c+1)+`
112
- `,u=[{type:"block-scalar-header",offset:r,indent:n,source:p}];return en(u,a)||u.push({type:"newline",offset:-1,indent:n,source:`
113
- `}),{type:"block-scalar",offset:r,indent:n,props:u,source:f}}case'"':return{type:"double-quoted-scalar",offset:r,indent:n,source:l,end:a};case"'":return{type:"single-quoted-scalar",offset:r,indent:n,source:l,end:a};default:return{type:"scalar",offset:r,indent:n,source:l,end:a}}}function Zs(s,e,t={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:r=!1,type:o}=t,l="indent"in s?s.indent:null;if(n&&typeof l=="number"&&(l+=2),!o)switch(s.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=s.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let a=le({type:o,value:e},{implicitKey:i||l===null,indent:l!==null&&l>0?" ".repeat(l):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(a[0]){case"|":case">":qn(s,a);break;case'"':os(s,a,"double-quoted-scalar");break;case"'":os(s,a,"single-quoted-scalar");break;default:os(s,a,"scalar")}}function qn(s,e){let t=e.indexOf(`
114
- `),n=e.substring(0,t),i=e.substring(t+1)+`
115
- `;if(s.type==="block-scalar"){let r=s.props[0];if(r.type!=="block-scalar-header")throw new Error("Invalid block scalar header");r.source=n,s.source=i}else{let{offset:r}=s,o="indent"in s?s.indent:-1,l=[{type:"block-scalar-header",offset:r,indent:o,source:n}];en(l,"end"in s?s.end:void 0)||l.push({type:"newline",offset:-1,indent:o,source:`
116
- `});for(let a of Object.keys(s))a!=="type"&&a!=="offset"&&delete s[a];Object.assign(s,{type:"block-scalar",indent:o,props:l,source:i})}}function en(s,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":s.push(t);break;case"newline":return s.push(t),!0}return!1}function os(s,e,t){switch(s.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":s.type=t,s.source=e;break;case"block-scalar":{let n=s.props.slice(1),i=e.length;s.props[0].type==="block-scalar-header"&&(i-=s.props[0].source.length);for(let r of n)r.offset+=i;delete s.props,Object.assign(s,{type:t,source:e,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:s.offset+e.length,indent:s.indent,source:`
117
- `};delete s.items,Object.assign(s,{type:t,source:e,end:[i]});break}default:{let 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"):[];for(let r of Object.keys(s))r!=="type"&&r!=="offset"&&delete s[r];Object.assign(s,{type:t,indent:n,source:e,end:i})}}}var tn=s=>"type"in s?Bt(s):Mt(s);function Bt(s){switch(s.type){case"block-scalar":{let e="";for(let t of s.props)e+=Bt(t);return e+s.source}case"block-map":case"block-seq":{let e="";for(let t of s.items)e+=Mt(t);return e}case"flow-collection":{let e=s.start.source;for(let t of s.items)e+=Mt(t);for(let t of s.end)e+=t.source;return e}case"document":{let e=Mt(s);if(s.end)for(let t of s.end)e+=t.source;return e}default:{let e=s.source;if("end"in s&&s.end)for(let t of s.end)e+=t.source;return e}}}function Mt({start:s,key:e,sep:t,value:n}){let i="";for(let r of s)i+=r.source;if(e&&(i+=Bt(e)),t)for(let r of t)i+=r.source;return n&&(i+=Bt(n)),i}var ls=Symbol("break visit"),Rn=Symbol("skip children"),sn=Symbol("remove item");function de(s,e){"type"in s&&s.type==="document"&&(s={start:s.start,value:s.value}),nn(Object.freeze([]),s,e)}de.BREAK=ls;de.SKIP=Rn;de.REMOVE=sn;de.itemAtPath=(s,e)=>{let t=s;for(let[n,i]of e){let r=t?.[n];if(r&&"items"in r)t=r.items[i];else return}return t};de.parentCollection=(s,e)=>{let t=de.itemAtPath(s,e.slice(0,-1)),n=e[e.length-1][0],i=t?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function nn(s,e,t){let n=t(e,s);if(typeof n=="symbol")return n;for(let i of["key","value"]){let r=e[i];if(r&&"items"in r){for(let o=0;o<r.items.length;++o){let l=nn(Object.freeze(s.concat([[i,o]])),r.items[o],t);if(typeof l=="number")o=l-1;else{if(l===ls)return ls;l===sn&&(r.items.splice(o,1),o-=1)}}typeof n=="function"&&i==="key"&&(n=n(e,s))}}return typeof n=="function"?n(e,s):n}var ze="\uFEFF",Ze="",et="",Me="",Fn=s=>!!s&&"items"in s,xn=s=>!!s&&(s.type==="scalar"||s.type==="single-quoted-scalar"||s.type==="double-quoted-scalar"||s.type==="block-scalar");function Un(s){switch(s){case ze:return"<BOM>";case Ze:return"<DOC>";case et:return"<FLOW_END>";case Me:return"<SCALAR>";default:return JSON.stringify(s)}}function as(s){switch(s){case ze:return"byte-order-mark";case Ze:return"doc-mode";case et:return"flow-error-end";case Me:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
118
- `:case`\r
119
- `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(s[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function X(s){switch(s){case void 0:case" ":case`
120
- `:case"\r":case" ":return!0;default:return!1}}var rn=new Set("0123456789ABCDEFabcdef"),Vn=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Dt=new Set(",[]{}"),Jn=new Set(` ,[]{}
121
- \r `),fs=s=>!s||Jn.has(s),Be=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
122
- `?!0:t==="\r"?this.buffer[e+1]===`
123
- `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===" ";)t=this.buffer[++n+e];if(t==="\r"){let i=this.buffer[n+e+1];if(i===`
124
- `||!i&&!this.atEnd)return e+n+1}return t===`
125
- `||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t==="-"||t==="."){let n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&X(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
126
- `,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))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===ze&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,n=e.indexOf("#");for(;n!==-1;){let r=e[n-1];if(r===" "||r===" "){t=n-1;break}else n=e.indexOf("#",n+1)}for(;;){let r=e[t-1];if(r===" "||r===" ")t-=1;else break}let i=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield Ze,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&X(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!X(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&X(t)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(fs),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&i[0]!=="#"||n===0&&(i.startsWith("---")||i.startsWith("..."))&&X(i[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield et,yield*this.parseLineStart();let r=0;for(;i[r]===",";)r+=yield*this.pushCount(1),r+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(r+=yield*this.pushIndicators(),i[r]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-r),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(fs),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||X(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let r=0;for(;this.buffer[t-1-r]==="\\";)r+=1;if(r%2===0)break;t=this.buffer.indexOf('"',t+1)}let n=this.buffer.substring(0,t),i=n.indexOf(`
127
- `,this.pos);if(i!==-1){for(;i!==-1;){let r=this.continueScalar(i+1);if(r===-1)break;i=n.indexOf(`
128
- `,r)}i!==-1&&(t=i-(n[i-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>X(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,n;e:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case" ":t+=1;break;case`
129
- `:e=r,t=0;break;case"\r":{let o=this.buffer[r+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
130
- `)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let r=this.continueScalar(e+1);if(r===-1)break;e=this.buffer.indexOf(`
131
- `,r)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(n=this.buffer[i];n===" ";)n=this.buffer[++i];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===`
132
- `;)n=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let r=e-1,o=this.buffer[r];o==="\r"&&(o=this.buffer[--r]);let l=r;for(;o===" ";)o=this.buffer[--r];if(o===`
133
- `&&r>=this.pos&&r+1+t>l)e=r;else break}while(!0);return yield Me,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){let r=this.buffer[n+1];if(X(r)||e&&Dt.has(r))break;t=n}else if(X(i)){let r=this.buffer[n+1];if(i==="\r"&&(r===`
134
- `?(n+=1,i=`
135
- `,r=this.buffer[n+1]):t=n),r==="#"||e&&Dt.has(r))break;if(i===`
136
- `){let o=this.continueScalar(n+1);if(o===-1)break;n=Math.max(n,o-2)}}else{if(e&&Dt.has(i))break;t=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield Me,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(fs),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,n=this.charAt(1);if(X(n)||t&&Dt.has(n)){t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!X(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(Vn.has(t))t=this.buffer[++e];else if(t==="%"&&rn.has(this.buffer[e+1])&&rn.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
137
- `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
138
- `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===" "||e&&n===" ");let i=t-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=t),i}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};var De=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let i=this.lineStarts[t-1];return{line:t,col:e-i+1}}}};function ge(s,e){for(let t=0;t<s.length;++t)if(s[t].type===e)return!0;return!1}function on(s){for(let e=0;e<s.length;++e)switch(s[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function an(s){switch(s?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Kt(s){switch(s.type){case"document":return s.start;case"block-map":{let e=s.items[s.items.length-1];return e.sep??e.start}case"block-seq":return s.items[s.items.length-1].start;default:return[]}}function Ke(s){if(s.length===0)return[];let e=s.length;e:for(;--e>=0;)switch(s[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;s[++e]?.type==="space";);return s.splice(e,s.length)}function jt(s,e){if(e.length<1e5)Array.prototype.push.apply(s,e);else for(let t=0;t<e.length;++t)s.push(e[t])}function ln(s){if(s.start.type==="flow-seq-start")for(let e of s.items)e.sep&&!e.value&&!ge(e.start,"explicit-key-ind")&&!ge(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,an(e.value)?e.value.end?jt(e.value.end,e.sep):e.value.end=e.sep:jt(e.start,e.sep),delete e.sep)}var we=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Be,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=as(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let n=this.peek(1);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"&&ln(t),n.type){case"document":n.value=t;break;case"block-scalar":n.props.push(t);break;case"block-map":{let i=n.items[n.items.length-1];if(i.value){n.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=t;else{Object.assign(i,{key:t,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{let i=n.items[n.items.length-1];i.value?n.items.push({start:[],value:t}):i.value=t;break}case"flow-collection":{let i=n.items[n.items.length-1];!i||i.value?n.items.push({start:[],key:t,sep:[]}):i.sep?i.value=t:Object.assign(i,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let i=t.items[t.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&on(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))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{on(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let t=Kt(this.peek(2)),n=Ke(t),i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];let r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
139
- `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
140
- `,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let n="end"in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){jt(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,i=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",r=[];if(i&&t.sep&&!t.value){let o=[];for(let l=0;l<t.sep.length;++l){let a=t.sep[l];switch(a.type){case"newline":o.push(l);break;case"space":break;case"comment":a.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(r=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):i||t.value?(r.push(this.sourceToken),e.items.push({start:r,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ge(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(an(t.key)&&!ge(t.sep,"newline")){let o=Ke(t.start),l=t.key,a=t.sep;a.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:l,sep:a}]})}else r.length>0?t.sep=t.sep.concat(r,this.sourceToken):t.sep.push(this.sourceToken);else if(ge(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=Ke(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:r,key:null,sep:[this.sourceToken]}):ge(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);i||t.value?(e.items.push({start:r,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!t.explicitKey&&t.sep&&!ge(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else n&&e.items.push({start:r});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let n="end"in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){jt(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||ge(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:i,sep:[]}):t.sep?this.stack.push(i):Object.assign(t,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let i=Kt(n),r=Ke(i);ln(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let l={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
141
- `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
142
- `,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=Kt(e),n=Ke(t);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=Kt(e),n=Ke(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function cn(s){let e=s.prettyErrors!==!1;return{lineCounter:s.lineCounter||e&&new De||null,prettyErrors:e}}function fn(s,e={}){let{lineCounter:t,prettyErrors:n}=cn(e),i=new we(t?.addNewLine),r=new be(e),o=Array.from(r.compose(i.parse(s)));if(n&&t)for(let l of o)l.errors.forEach(We(s,t)),l.warnings.forEach(We(s,t));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}function us(s,e={}){let{lineCounter:t,prettyErrors:n}=cn(e),i=new we(t?.addNewLine),r=new be(e),o=null;for(let l of r.compose(i.parse(s),!0,s.length))if(!o)o=l;else if(o.options.logLevel!=="silent"){o.errors.push(new R(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&t&&(o.errors.forEach(We(s,t)),o.warnings.forEach(We(s,t))),o}function un(s,e,t){let n;typeof e=="function"?n=e:t===void 0&&e&&typeof e=="object"&&(t=e);let i=us(s,t);if(!i)return null;if(i.warnings.forEach(r=>ht(i.options.logLevel,r)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},t))}function hn(s,e,t){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let i=Math.round(t);t=i<1?void 0:i>8?{indent:8}:{indent:i}}if(s===void 0){let{keepUndefined:i}=t??e??{};if(!i)return}return x(s)&&!n?s.toString(t):new se(s,n,t).toString(t)}var Sc=hs;export{Sc as a};
@@ -1,9 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- var f="\x1B[0m",p="\x1B[1m",a="\x1B[2m",m="\x1B[38;2;42;95;255m",x="\x1B[38;5;84m",d="\x1B[38;5;203m";function c(n,t){return!process.stdout.isTTY||process.env.NO_COLOR!==void 0?t:`${n}${t}${f}`}function s(n){return c(m,n)}function u(n){return c(p,n)}function i(n){return c(a,n)}function w(n){return c(x,n)}function h(n){return c(d,n)}function v(n){console.log(),console.log(` ${s("\u25E4\u25E2")} ${u("rnx")}`),n&&console.log(` ${i(n)}`)}function y(n,t){console.log(`
5
- ${s("\u25C6")} ${u(n)}`);for(let r of t)console.log(` ${i(r)}`)}async function P(n,t){if(!process.stdout.isTTY)return console.log(` ${n}...`),t();let r=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],o=0,e=()=>{process.stdout.write(`\r\x1B[2K ${s(r[o++%r.length])} ${n}`)};e();let $=setInterval(e,80);try{let g=await t();return clearInterval($),process.stdout.write(`\r\x1B[2K ${w("\u2713")} ${n}
6
- `),g}catch(g){throw clearInterval($),process.stdout.write(`\r\x1B[2K ${h("\xD7")} ${n}
7
- `),g}}import{createInterface as T}from"readline";var b=()=>T({input:process.stdin,output:process.stdout});function l(n){return new Promise(t=>{let r=b();r.question(n,o=>{r.close(),t(o.trim())})})}async function R(n,t=!0){let r=t?"Y/n":"y/N";if(!process.stdin.isTTY)return console.log(` ${n} (${r}) ${t?"y":"n"} ${i("(non-interactive)")}`),t;let o=await l(` ${s("?")} ${u(n)} ${i(`(${r})`)} ${s("\u203A")} `);return o===""?t:o.toLowerCase().startsWith("y")}async function C(n,t){console.log(`
8
- ${s("?")} ${u(n)}
9
- `);for(let e=0;e<t.length;e++)console.log(` ${s(String(e+1))} ${t[e]}`);if(console.log(),!process.stdin.isTTY)return console.log(` Choose (1-${t.length}): 1 ${i("(non-interactive)")}`),0;let r=await l(` ${i(`Choose 1-${t.length}`)} ${s("\u203A")} `),o=parseInt(r,10);return o>=1&&o<=t.length?o-1:0}export{s as a,u as b,i as c,w as d,h as e,v as f,y as g,P as h,R as i,C as j};
@@ -1,4 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as i}from"./chunk-25KRGDZT.js";import{spawn as m}from"node:child_process";import c from"node:fs";import t from"node:path";function b(n){let e=t.resolve(n),r=null;for(;;){if(!r&&c.existsSync(t.join(e,"package.json"))&&(r=e),c.existsSync(t.join(e,".git")))return r;let s=t.dirname(e);if(s===e)return null;e=s}}function g(n){let e=t.resolve(n);for(;;){if(c.existsSync(t.join(e,"bun.lock"))||c.existsSync(t.join(e,"bun.lockb")))return"bun";if(c.existsSync(t.join(e,"pnpm-lock.yaml")))return"pnpm";if(c.existsSync(t.join(e,"package-lock.json")))return"npm";let r=t.dirname(e);if(r===e)return"npm";e=r}}function j(n){let e=t.resolve(n.appDir),r=u(t.join(e,"package.json")),s=`${i.commandName} open`,o=r.scripts?.[i.commandName];if(o&&o!==s)throw new Error(`package.json already defines scripts.${i.commandName} as ${JSON.stringify(o)}; resolve that conflict before setup`);let a=g(e),p=[];return r.devDependencies?.[i.packageName]!==n.cliVersion&&p.push(f(a,n.cliVersion)),o!==s&&p.push(S(a)),{appDir:e,packageManager:a,operations:p}}async function w(n,e){for(let r of n.operations)e.dryRun||await y(r,n.appDir,e.json)}function O(n){return n.operations.map(e=>`${e.command} ${e.args.map(l).join(" ")}`)}function u(n){let e;try{e=JSON.parse(c.readFileSync(n,"utf8"))}catch(o){let a=o instanceof Error?o.message:String(o);throw new Error(`could not read ${n}: ${a}`)}if(!e||typeof e!="object"||Array.isArray(e))throw new Error(`${n} must contain a JSON object`);let r=d(Reflect.get(e,"scripts")),s=d(Reflect.get(e,"devDependencies"));return{...r?{scripts:r}:{},...s?{devDependencies:s}:{}}}function d(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let e=Object.entries(n).filter(r=>typeof r[1]=="string");return Object.fromEntries(e)}function f(n,e){let r=`${i.packageName}@${e}`;switch(n){case"bun":return{command:"bun",args:["add","--dev","--exact",r],description:`install ${r} as an exact dev dependency`};case"pnpm":return{command:"pnpm",args:["add","--save-dev","--save-exact",r],description:`install ${r} as an exact dev dependency`};case"npm":return{command:"npm",args:["install","--save-dev","--save-exact",r],description:`install ${r} as an exact dev dependency`}}}function l(n){return/^[a-zA-Z0-9_./@=-]+$/.test(n)?n:JSON.stringify(n)}function y(n,e,r){return new Promise((s,o)=>{let a=m(n.command,n.args,{cwd:e,stdio:r?["ignore",2,"inherit"]:"inherit"});a.once("error",o),a.once("exit",p=>{p===0?s():o(new Error(`${n.command} exited with code ${p??"unknown"}`))})})}function S(n){return{command:n,args:n==="bun"?["pm","pkg","set",`scripts.${i.commandName}=${i.commandName} open`]:["pkg","set",`scripts.${i.commandName}=${i.commandName} open`],description:`add the \`${i.commandName}\` package script`}}export{b as a,j as b,w as c,O as d};
@@ -1,4 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import{execFileSync as y}from"node:child_process";import a from"node:fs";import l from"node:path";var d=class extends Error{},g=8192,v=1e4;function P(n,t){if(t===0)return!1;let r;try{r=a.openSync(n,"r");let e=Buffer.alloc(Math.min(g,t)),s=a.readSync(r,e,0,e.length,0);return e.subarray(0,s).includes(0)}catch{return!1}finally{r!==void 0&&a.closeSync(r)}}var f=class{root;entries=new Map;sniffed=new Map;listTimeoutMs;constructor(t,r={}){this.root=l.resolve(t),this.listTimeoutMs=r.listTimeoutMs??v}index(){return this.entries}async refresh(){let t;try{t=y("git",["ls-files","-co","--exclude-standard","-z"],{cwd:this.root,encoding:"utf8",maxBuffer:64*1024*1024,timeout:this.listTimeoutMs,env:process.env})}catch(s){let i=s instanceof Error?s.message:String(s),o=s instanceof Error&&"signal"in s&&s.signal==="SIGTERM";throw new d(o?`git did not list the project's files in ${this.root} within ${this.listTimeoutMs/1e3}s, so the box has no file set to serve. the checkout may be on a stalled filesystem, or this machine may be too loaded to start a subprocess.`:`could not list the project's files with git in ${this.root}: ${i}`)}if(t.length===0)throw new d(`git listed no files in ${this.root}. either git tracks nothing there and nothing untracked is visible to it, or this machine could not read the child process's output.`);let r=new Map,e=new Map;for(let s of t.split("\0")){if(!s)continue;let i;try{i=a.statSync(l.join(this.root,s))}catch{continue}if(!i.isFile())continue;let o=this.sniffed.get(s),c=o&&o.size===i.size&&o.mtimeMs===i.mtimeMs?o.binary:P(l.join(this.root,s),i.size);e.set(s,{size:i.size,mtimeMs:i.mtimeMs,binary:c}),r.set(s,{size:i.size,readOnly:!1,binary:c})}this.entries=r,this.sniffed=e}absolute(t){let r=l.resolve(this.root,t);if(r!==this.root&&!r.startsWith(`${this.root}${l.sep}`))throw new Error(`path escapes the project: ${t}`);return r}async read(t){return a.promises.readFile(this.absolute(t),"utf8")}async readBytes(t){return a.promises.readFile(this.absolute(t))}async write(t,r){let e=this.absolute(t);await a.promises.mkdir(l.dirname(e),{recursive:!0}),await a.promises.writeFile(e,r),this.entries.set(t,{size:r.byteLength,readOnly:!1,binary:r.subarray(0,g).includes(0)})}async delete(t){await a.promises.rm(this.absolute(t),{force:!0}),this.entries.delete(t)}};function u(n){let t="";for(let e=0;e<n.length;e+=32768)t+=String.fromCharCode(...n.subarray(e,e+32768));return btoa(t)}function h(n){let t=atob(n),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r}function p(n){let t=2166136261,r=16777619;for(let e of[...n.keys()].sort()){let s=n.get(e);if(!s)continue;let i=`${e} ${s.size} ${s.readOnly?1:0}${s.binary?1:0}`;for(let o=0;o<i.length;o++){let c=i.charCodeAt(o);t=Math.imul(t^c,16777619),r=Math.imul(r+c,2246822507)^r>>>13}}return`${(t>>>0).toString(36)}${(r>>>0).toString(36)}-${n.size}`}function m(n){let t=[];for(let[r,e]of n)t.push([r,e.size,(e.readOnly?1:0)|(e.binary?2:0)]);return t}async function w(n,t,r){switch(t){case"plane:index":{await n.refresh();let e=p(n.index());return r.sinceVersion&&r.sinceVersion===e?{result:{version:e,unchanged:!0},version:e}:{result:{version:e,entries:m(n.index())},version:e}}case"plane:read":return{result:{content:await n.read(String(r.path))}};case"plane:read-bytes":return{result:{base64:u(await n.readBytes(String(r.path)))}};case"plane:write":{await n.write(String(r.path),h(String(r.base64??"")));let e=p(n.index());return{result:{version:e},version:e}}case"plane:delete":{await n.delete(String(r.path));let e=p(n.index());return{result:{version:e},version:e}}default:return null}}export{p as a,w as b,d as c,f as d};
@@ -1,4 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import{AsyncLocalStorage as n}from"node:async_hooks";var t=class extends Error{code;constructor(e){super(`rnx exited with code ${e}`),this.name="RnxExit",this.code=e}},s=new n;function i(r){if(r instanceof t)throw r}function c(r){throw new t(r)}export{t as a,i as b,c};
@@ -1,5 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import{n}from"./chunk-H4MYYOYJ.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
5
- `)}export{g as a};
@@ -1,4 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as k}from"./chunk-MP2GPO4T.js";import{createHash as L}from"node:crypto";import{createRequire as j}from"node:module";var P=/(^|\/)expo-splash-screen$/,w=/(^|\/)react-native-bootsplash$/;function A(n,e){let r=e.replace(/\/+$/,""),t=n.replace(/^\.\//,"").replace(/^\/+/,"");if(t)return`${r}/assets/${t}`}function d(n,e,r){return r?r(n):A(n,e)}function y(n){if(n==="cover")return"cover";if(n==="contain"||n==="native")return"contain"}function c(n){return typeof n=="string"&&n.length>0?n:void 0}function S(n){return typeof n=="number"&&Number.isFinite(n)?n:void 0}function R(n,e,r){if(!n||typeof n!="object")return null;let t=n,o={source:"expo-splash-screen",backgroundColor:c(t.backgroundColor)??"#ffffff"},i=c(t.image);i&&(o.imageUrl=d(i,e,r));let s=S(t.imageWidth);s!=null&&(o.imageWidthPx=s);let l=y(t.resizeMode);l&&(o.resizeMode=l);let p=t.dark;if(p&&typeof p=="object"){let u=p,g=c(u.backgroundColor),f=c(u.image);(g||f)&&(o.dark={},g&&(o.dark.backgroundColor=g),f&&(o.dark.imageUrl=d(f,e,r)))}return o}function O(n,e,r,t){let a=n[e],o=a&&typeof a=="object"?a.splash:void 0,i=n.splash,s=o&&typeof o=="object"?o:i;if(!s||typeof s!="object")return null;let p={source:"expo-legacy",backgroundColor:c(s.backgroundColor)??"#ffffff",imageWidthPx:S(s.imageWidth)??200,resizeMode:y(s.resizeMode)??"contain"},u=c(s.image);u&&(p.imageUrl=d(u,r,t));let g=s.dark;if(g&&typeof g=="object"){let f=g,m=c(f.backgroundColor),h=c(f.image);(m||h)&&(p.dark={},m&&(p.dark.backgroundColor=m),h&&(p.dark.imageUrl=d(h,r,t)))}return p}function v(n,e,r){if(!n||typeof n!="object")return null;let t=n,a=c(t.logo);if(!a)return null;let o={source:"react-native-bootsplash",backgroundColor:c(t.background)??"#fff",imageUrl:d(a,e,r),imageWidthPx:S(t.logoWidth)??100,resizeMode:"contain"},i=c(t.darkBackground),s=c(t.darkLogo);return(i||s)&&(o.dark={},i&&(o.dark.backgroundColor=i),s&&(o.dark.imageUrl=d(s,e,r))),o}function C(n,e,r,t={}){if(!n||typeof n!="object")return null;let a=n,o=a.plugins,i=null,s=null;if(Array.isArray(o))for(let l of o){let p=Array.isArray(l)?l[0]:l;if(typeof p!="string")continue;let u=Array.isArray(l)?l[1]??{}:{};!i&&P.test(p)?i=R(u,r,t.resolveAssetUrl):!s&&w.test(p)&&(s=v(u,r,t.resolveAssetUrl))}return s||i||O(a,e,r,t.resolveAssetUrl)}var b=j(import.meta.url);function E(n){try{let e=new URL(n),r=e.hostname.replace(/^\[|\]$/g,"").toLowerCase();if(r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r))return e.origin}catch{}return null}function G(n){let e=E(n.bundleUrl);if(!e)return null;let t=k(n.projectDir)?.appDir??null;if(!t)return null;let a=(n.platform||process.env.CONTRAST_PLATFORM||"ios").toLowerCase(),o=null;try{let s=b.resolve("@expo/config",{paths:[t]}),l=b(s);typeof l.getConfig=="function"&&(o=l.getConfig)}catch{}if(!o)return null;let i;try{let s=o(t,{skipSDKVersionRequirement:!0});s?.exp&&typeof s.exp=="object"&&(i=s.exp)}catch{}return!i||typeof i!="object"?null:C(i,a==="android"?"android":"ios",e)}function q(n){return encodeURIComponent(JSON.stringify(n))}function z(n){if(!n)return null;try{let e=JSON.parse(decodeURIComponent(n));if(!e||typeof e!="object")return null;let r=e;return r.source!=="expo-splash-screen"&&r.source!=="expo-legacy"&&r.source!=="react-native-bootsplash"||typeof r.backgroundColor!="string"?null:e}catch{return null}}function I(n){let e=new Set;return n.imageUrl&&e.add(n.imageUrl),n.dark?.imageUrl&&e.add(n.dark.imageUrl),[...e]}function M(n){let e=(n.split("?")[0].split(".").pop()||"").toLowerCase();return e==="png"?"image/png":e==="jpg"||e==="jpeg"?"image/jpeg":e==="webp"?"image/webp":e==="gif"?"image/gif":e==="svg"?"image/svg+xml":"application/octet-stream"}async function H(n,e){let r=z(n);if(!r)return[];let t=[],a=new Set;for(let o of I(r)){let i=L("sha256").update(o).digest("hex");if(!a.has(i)){a.add(i);try{let s=await fetch(o);if(!s.ok){e?.onError?.(o,new Error(`${s.status} ${s.statusText}`));continue}let l=new Uint8Array(await s.arrayBuffer());t.push({url:o,urlhash:i,contentType:M(o),bytes:l}),e?.onStaged?.({url:o,byteLength:l.byteLength})}catch(s){e?.onError?.(o,s)}}}return t}import{spawn as D}from"child_process";function U(n,e={}){if(!n)throw new Error("openUrl requires a url");let r=e.platform??process.platform;return r==="darwin"?{command:"open",args:e.background===!1?[n]:["-g",n],via:"system"}:r==="win32"?{command:"cmd",args:["/c","start","",n],via:"system"}:{command:"xdg-open",args:[n],via:"system"}}async function W(n,e,r){return new Promise((t,a)=>{let o=D(n,e,{detached:r,stdio:"ignore"});o.once("error",a),o.once("spawn",()=>{r&&o.unref(),t(o.pid)})})}async function x(n,e={}){let r=U(n,e),t=await W(r.command,r.args,e.detached??!0);return{...r,pid:t,attachUrl:n}}async function F(n,e={}){await x(n,e)}export{G as a,q as b,H as c,F as d};