@a-company/paradigm 5.10.0 → 5.21.0

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 (409) hide show
  1. package/dist/accept-orchestration-IUAWQZUN.js +18 -0
  2. package/dist/add-P76GEMGF.js +8 -0
  3. package/dist/agent-UUTYOFTH.js +33 -0
  4. package/dist/agent-loader-EPXURMO7.js +2 -0
  5. package/dist/agent-loader-PYGPX6D2.js +2 -0
  6. package/dist/agent-state-KSQ3S7OB.js +2 -0
  7. package/dist/agents-suggest-HYTFMQD3.js +10 -0
  8. package/dist/aggregate-W66DM3GA.js +10 -0
  9. package/dist/ambient-HYZR42NX.js +35 -0
  10. package/dist/assess-UFPYEJKP.js +9 -0
  11. package/dist/auto-RHJXOZFL.js +14 -0
  12. package/dist/beacon-5QVYV5DF.js +13 -0
  13. package/dist/calibration-OLJYB5HN.js +7 -0
  14. package/dist/check-THVGY4R5.js +14 -0
  15. package/dist/chunk-22ISTMKI.js +31 -0
  16. package/dist/chunk-2QO33NYK.js +3 -0
  17. package/dist/chunk-33LKBMVK.js +134 -0
  18. package/dist/chunk-4QADCWPU.js +7 -0
  19. package/dist/chunk-4TXOVRWD.js +3 -0
  20. package/dist/chunk-4UJ4NIEQ.js +4 -0
  21. package/dist/chunk-4ZGGWZ32.js +3 -0
  22. package/dist/chunk-5TAVYPOV.js +2 -0
  23. package/dist/chunk-6EX37L4Q.js +8 -0
  24. package/dist/chunk-AD5TAD2A.js +5 -0
  25. package/dist/chunk-AGVAHVUA.js +2 -0
  26. package/dist/chunk-AO7ZSRME.js +13 -0
  27. package/dist/chunk-BFD3GFRK.js +2 -0
  28. package/dist/chunk-D34YFK4M.js +6 -0
  29. package/dist/chunk-DVZWCXB6.js +2 -0
  30. package/dist/chunk-EKZDFEJW.js +2 -0
  31. package/dist/chunk-ET5XJTSX.js +2 -0
  32. package/dist/chunk-FYDRENK7.js +3 -0
  33. package/dist/chunk-HMQ5BHP2.js +743 -0
  34. package/dist/chunk-HXKWL3VK.js +29 -0
  35. package/dist/chunk-IZSBGW6E.js +2 -0
  36. package/dist/chunk-J32OPJEX.js +2 -0
  37. package/dist/chunk-JBDMCRPP.js +7 -0
  38. package/dist/chunk-JIXHEBGK.js +7 -0
  39. package/dist/chunk-JNSJVCTU.js +2 -0
  40. package/dist/chunk-JQKKVAAN.js +2 -0
  41. package/dist/chunk-KLBH26PA.js +429 -0
  42. package/dist/chunk-L6K5HNDL.js +24 -0
  43. package/dist/chunk-LKAT7IAK.js +2 -0
  44. package/dist/chunk-M4UMM6DC.js +5 -0
  45. package/dist/chunk-NKYNHSA5.js +424 -0
  46. package/dist/chunk-NW6OKHE6.js +5 -0
  47. package/dist/chunk-NXRVR37G.js +60 -0
  48. package/dist/chunk-ODVKPZZ4.js +2 -0
  49. package/dist/chunk-PUBB7LIT.js +5 -0
  50. package/dist/chunk-Q2J542ST.js +2 -0
  51. package/dist/chunk-QGZRM6ZB.js +2 -0
  52. package/dist/chunk-QNZEG7IT.js +13 -0
  53. package/dist/chunk-QT2LKB3P.js +7 -0
  54. package/dist/chunk-RVRARWSY.js +9 -0
  55. package/dist/chunk-T6IDXUUA.js +2 -0
  56. package/dist/chunk-TYWB5IQJ.js +3 -0
  57. package/dist/chunk-UIKLE3WD.js +2 -0
  58. package/dist/chunk-V7K6CQVX.js +111 -0
  59. package/dist/chunk-VCKKJDLP.js +8 -0
  60. package/dist/chunk-VG7FN2TU.js +4 -0
  61. package/dist/chunk-W5IWDW4Y.js +16 -0
  62. package/dist/chunk-W7C6FFMO.js +8 -0
  63. package/dist/chunk-WESTEMIM.js +10 -0
  64. package/dist/chunk-WR6D3SC6.js +5 -0
  65. package/dist/chunk-WS2N27RX.js +3 -0
  66. package/dist/chunk-XMAV5AG6.js +2 -0
  67. package/dist/chunk-XROULIQN.js +2 -0
  68. package/dist/chunk-XUFYOXOU.js +3 -0
  69. package/dist/chunk-Y4XFVDZC.js +3 -0
  70. package/dist/chunk-Y6KXTQBG.js +2 -0
  71. package/dist/{chunk-GTR2TBIJ.js → chunk-Z2UZUCY6.js} +237 -1047
  72. package/dist/chunk-Z34K6GY2.js +8 -0
  73. package/dist/claude-4LR3LJQZ.js +13 -0
  74. package/dist/claude-cli-UP6HGH7C.js +6 -0
  75. package/dist/claude-code-RLJ4GX77.js +11 -0
  76. package/dist/claude-code-teams-R37HJY3Y.js +29 -0
  77. package/dist/commands-LMUD5L6R.js +455 -0
  78. package/dist/compliance-GZ7UAOG3.js +6 -0
  79. package/dist/conductor-Y5IXELTL.js +4 -0
  80. package/dist/config-schema-HR7LDEQ6.js +2 -0
  81. package/dist/constellation-CG7C4WFE.js +13 -0
  82. package/dist/context-audit-RSSRX6XC.js +6 -0
  83. package/dist/cost-IDNVMAEV.js +10 -0
  84. package/dist/cost-PK4KIF7R.js +2 -0
  85. package/dist/cursor-cli-QKF7Z6M2.js +4 -0
  86. package/dist/cursorrules-U5O4G5T4.js +14 -0
  87. package/dist/decision-loader-2XPZE4EZ.js +2 -0
  88. package/dist/delete-P5VULXR4.js +14 -0
  89. package/dist/diff-RTFUKJHF.js +9 -0
  90. package/dist/discipline-H7LDI6NT.js +2 -0
  91. package/dist/dist-3ZCH25SG.js +2 -0
  92. package/dist/dist-KGRCLBJP-2QAPFYNF.js +39 -0
  93. package/dist/dist-R3RWD35F.js +2 -0
  94. package/dist/dist-VGFSP3XM.js +2 -0
  95. package/dist/dist-VXCZWVVJ.js +2 -0
  96. package/dist/dist-W3XCATBJ.js +2 -0
  97. package/dist/docs-EDQ2STFK.js +2 -0
  98. package/dist/docs-RXPN6CK7.js +12 -0
  99. package/dist/doctor-2T2QL6VM.js +2 -0
  100. package/dist/drift-ILZE5BFJ.js +13 -0
  101. package/dist/echo-UPTQUEDU.js +46 -0
  102. package/dist/edit-GUU3HBVW.js +9 -0
  103. package/dist/event-Y3VXC2RV.js +3 -0
  104. package/dist/explain-files-3GPZUETV.js +4 -0
  105. package/dist/export-CV5KCTPS.js +2 -0
  106. package/dist/flow-S3RQ4YPY.js +11 -0
  107. package/dist/global-C44FW4G2.js +13 -0
  108. package/dist/graduate-3BBSC27A.js +5 -0
  109. package/dist/graph-CNDE5TAT.js +2 -0
  110. package/dist/graph-server-COZR5C3Z.js +14 -0
  111. package/dist/habits-4J2KRYUL.js +42 -0
  112. package/dist/history-UW454SDP.js +12 -0
  113. package/dist/hooks-XH52VGOU.js +2 -0
  114. package/dist/index.js +15 -1039
  115. package/dist/init-24MAQJFM.js +2 -0
  116. package/dist/integrity-UYDOOJDP.js +7 -0
  117. package/dist/integrity-checker-DHGMZQDG.js +2 -0
  118. package/dist/journal-loader-GLH7XFTK.js +2 -0
  119. package/dist/lint-IGKE6UPS.js +26 -0
  120. package/dist/list-5IUGP3ZB.js +7 -0
  121. package/dist/list-YKIQNKGB.js +6 -0
  122. package/dist/lore-loader-RVQI5GXL.js +2 -0
  123. package/dist/lore-loader-XY5MZRR2.js +2 -0
  124. package/dist/lore-server-FC2GMDLT.js +14 -0
  125. package/dist/manual-RXSPSFLL.js +20 -0
  126. package/dist/mcp.js +93 -20484
  127. package/dist/migrate-X5OMAFAQ.js +59 -0
  128. package/dist/migrate-assessments-GEI5WMI2.js +4 -0
  129. package/dist/model-discovery-HMB3YI4L.js +2 -0
  130. package/dist/nomination-engine-XF7TWPAP.js +2 -0
  131. package/dist/notebook-PE3JSYZI.js +11 -0
  132. package/dist/notebook-loader-CENTDDUJ.js +2 -0
  133. package/dist/orchestrate-35HBQ3O3.js +8 -0
  134. package/dist/peers-P2KXU7ZK.js +5 -0
  135. package/dist/persona-STQWZH5P.js +29 -0
  136. package/dist/pipeline-MZUITRVN.js +4 -0
  137. package/dist/platform-server-2KXHGHFV.js +25 -0
  138. package/dist/plugin-update-checker-M7PW434O.js +2 -0
  139. package/dist/portal-check-3JVNLOEP.js +8 -0
  140. package/dist/portal-compliance-2UG4VKWH.js +2 -0
  141. package/dist/probe-5L5BQDGE.js +6 -0
  142. package/dist/project-type-SURTOIG7.js +2 -0
  143. package/dist/promote-NJQDZBZA.js +8 -0
  144. package/dist/providers-4PXMWA7V.js +8 -0
  145. package/dist/quiz-FE5UGAY2.js +10 -0
  146. package/dist/record-YXPB34MY.js +6 -0
  147. package/dist/reindex-PGDQSM42.js +2 -0
  148. package/dist/remember-MJRNTXYS.js +14 -0
  149. package/dist/retag-N5XF3KXP.js +6 -0
  150. package/dist/review-6UAH6V3R.js +11 -0
  151. package/dist/review-77QI6VOC.js +6 -0
  152. package/dist/ripple-ZGDITCGB.js +10 -0
  153. package/dist/roster-FLRZ5J42.js +2 -0
  154. package/dist/sentinel-HYAZ3CO5.js +19 -0
  155. package/dist/sentinel-bridge-VR357PKL.js +2 -0
  156. package/dist/sentinel-mcp.js +38 -3808
  157. package/dist/sentinel.js +1 -34
  158. package/dist/serve-JE6UF5P2.js +8 -0
  159. package/dist/serve-L52ZUTU6.js +10 -0
  160. package/dist/serve-OY6XYL7F.js +12 -0
  161. package/dist/server-2MNROHF6.js +7 -0
  162. package/dist/server-4YNUIK4W.js +8 -0
  163. package/dist/session-tracker-SKOMBDOW.js +2 -0
  164. package/dist/session-work-log-3MNUDEZ6.js +2 -0
  165. package/dist/session-work-log-J2H5OZBR.js +2 -0
  166. package/dist/setup-3F5IK7MO.js +31 -0
  167. package/dist/setup-KPIMRZ4Q.js +2 -0
  168. package/dist/shift-6GCNH666.js +11 -0
  169. package/dist/show-BOAVWZPZ.js +7 -0
  170. package/dist/show-PJ5LFLIL.js +5 -0
  171. package/dist/snapshot-L2G56RPL.js +8 -0
  172. package/dist/spawn-UH5RENSE.js +12 -0
  173. package/dist/status-77M3SDIF.js +8 -0
  174. package/dist/status-A37ECYNJ.js +6 -0
  175. package/dist/summary-ZJLQ6KHB.js +7 -0
  176. package/dist/sweep-HU74OPVW.js +17 -0
  177. package/dist/switch-CTW4PDGI.js +17 -0
  178. package/dist/symphony-3QMBGCZY.js +2 -0
  179. package/dist/symphony-QI63XL62.js +53 -0
  180. package/dist/symphony-loader-XACVV2E3.js +2 -0
  181. package/dist/symphony-peers-U4KHMKGI.js +2 -0
  182. package/dist/symphony-peers-X5NGWXFP.js +2 -0
  183. package/dist/symphony-relay-5GY5JIPT.js +3 -0
  184. package/dist/sync-QRDSFETO.js +2 -0
  185. package/dist/sync-llms-HL5PPW3M.js +15 -0
  186. package/dist/task-loader-NZFDTUQ5.js +2 -0
  187. package/dist/team-WGERKGNP.js +2 -0
  188. package/dist/test-BQJMS4Y2.js +111 -0
  189. package/dist/thread-HFXK65D4.js +41 -0
  190. package/dist/timeline-K3ZFKJ3R.js +6 -0
  191. package/dist/triage-FCWOZASE.js +18 -0
  192. package/dist/tutorial-UC6YQMNN.js +305 -0
  193. package/dist/university-content/courses/.purpose +74 -5
  194. package/dist/university-content/courses/para-701.json +807 -0
  195. package/dist/university-content/plsat/.purpose +3 -2
  196. package/dist/university-ui/assets/{index-BjewBB6s.js → index-CGFJczb1.js} +2 -2
  197. package/dist/university-ui/assets/{index-BjewBB6s.js.map → index-CGFJczb1.js.map} +1 -1
  198. package/dist/university-ui/index.html +1 -1
  199. package/dist/upgrade-B4IOLZYK.js +53 -0
  200. package/dist/validate-C6SMKGYD.js +9 -0
  201. package/dist/validate-LSCDOLBO.js +13 -0
  202. package/dist/validate-VZXTJHGO.js +6 -0
  203. package/dist/watch-LRM5XD46.js +8 -0
  204. package/dist/watch-PZCCUP6K.js +9 -0
  205. package/dist/wisdom-XZ3QKPNP.js +7 -0
  206. package/dist/work-log-loader-DL5GZ2BQ.js +2 -0
  207. package/dist/workspace-2ODL5WLY.js +2 -0
  208. package/package.json +1 -1
  209. package/platform-ui/dist/assets/AmbientSection-DqQ2mfCO.js +1 -0
  210. package/platform-ui/dist/assets/{CanvasSection-DwPTRdIN.js → CanvasSection-DLW0s-Bu.js} +1 -1
  211. package/platform-ui/dist/assets/{DocsSection-BJc_ws4I.js → DocsSection-BQ9Hi51g.js} +1 -1
  212. package/platform-ui/dist/assets/{GitSection-DhqBo1xc.js → GitSection-QQeUX6o3.js} +1 -1
  213. package/platform-ui/dist/assets/{GraphSection-D9fhVnZ0.js → GraphSection-0c9C-w7K.js} +2 -2
  214. package/platform-ui/dist/assets/{GraphSection-BlgXTl53.css → GraphSection-Bbs2a8sC.css} +1 -1
  215. package/platform-ui/dist/assets/LoreSection--t56kCj2.js +1 -0
  216. package/platform-ui/dist/assets/LoreSection-qnmm3o4y.css +1 -0
  217. package/platform-ui/dist/assets/SentinelSection-C4OoME9U.js +1 -0
  218. package/platform-ui/dist/assets/{SymphonySection-BRoBaUSS.js → SymphonySection-B-rvsLxq.js} +1 -1
  219. package/platform-ui/dist/assets/TeamSection-CBFmNEEo.js +1 -0
  220. package/platform-ui/dist/assets/index-Bxp0TVaf.css +1 -0
  221. package/platform-ui/dist/assets/index-DPpOdAtC.js +57 -0
  222. package/platform-ui/dist/index.html +2 -2
  223. package/dist/accept-orchestration-UQLM7PTQ.js +0 -189
  224. package/dist/add-FZRKEGH4.js +0 -81
  225. package/dist/agent-WERIO2XV.js +0 -523
  226. package/dist/agent-loader-TFIANSF4.js +0 -44
  227. package/dist/agent-state-S5DAWPTF.js +0 -24
  228. package/dist/agents-suggest-DNSYJ6IA.js +0 -83
  229. package/dist/aggregate-H57K7PNV.js +0 -88
  230. package/dist/assess-4WVXZLZQ.js +0 -68
  231. package/dist/auto-QFS5NHQU.js +0 -504
  232. package/dist/beacon-KXZXYQHX.js +0 -251
  233. package/dist/calibration-V46G7JTY.js +0 -135
  234. package/dist/check-OWAIWV23.js +0 -175
  235. package/dist/chunk-2IO7JAG2.js +0 -148
  236. package/dist/chunk-2T6BTYBN.js +0 -712
  237. package/dist/chunk-36TKPM5Z.js +0 -400
  238. package/dist/chunk-45MUDW6E.js +0 -804
  239. package/dist/chunk-4BLYIB7J.js +0 -5701
  240. package/dist/chunk-4L3UTYQX.js +0 -677
  241. package/dist/chunk-4NCFWYGG.js +0 -110
  242. package/dist/chunk-54LTTQBH.js +0 -138
  243. package/dist/chunk-5EWAQHFY.js +0 -269
  244. package/dist/chunk-5JGJACDU.js +0 -37
  245. package/dist/chunk-5OUOLN6M.js +0 -659
  246. package/dist/chunk-5VKJBNJL.js +0 -444
  247. package/dist/chunk-6N3JTACN.js +0 -2260
  248. package/dist/chunk-6QC3YGB6.js +0 -114
  249. package/dist/chunk-7N7GSU6K.js +0 -34
  250. package/dist/chunk-ABVQGRF7.js +0 -268
  251. package/dist/chunk-CL7JSK52.js +0 -129
  252. package/dist/chunk-CSD7IHSN.js +0 -152
  253. package/dist/chunk-EDOAWN7J.js +0 -717
  254. package/dist/chunk-EKGMAM62.js +0 -525
  255. package/dist/chunk-EZ3GOCYC.js +0 -132
  256. package/dist/chunk-F3BCHPYT.js +0 -143
  257. package/dist/chunk-FKJUBQU3.js +0 -3081
  258. package/dist/chunk-GT5QGC2H.js +0 -253
  259. package/dist/chunk-GZDFVP2N.js +0 -540
  260. package/dist/chunk-IRKUEJVW.js +0 -405
  261. package/dist/chunk-J2JEQRT3.js +0 -164
  262. package/dist/chunk-JASGXLK3.js +0 -679
  263. package/dist/chunk-KVDYJLTC.js +0 -121
  264. package/dist/chunk-L27I3CPZ.js +0 -357
  265. package/dist/chunk-LHLIAYQ3.js +0 -185
  266. package/dist/chunk-MCMOGQMU.js +0 -145
  267. package/dist/chunk-NQKQG45G.js +0 -688
  268. package/dist/chunk-PBHIFAL4.js +0 -259
  269. package/dist/chunk-PDX44BCA.js +0 -11
  270. package/dist/chunk-PMXRGPRQ.js +0 -305
  271. package/dist/chunk-RAB5IKPR.js +0 -487
  272. package/dist/chunk-RJE5G7WO.js +0 -590
  273. package/dist/chunk-RTHA3XRE.js +0 -880
  274. package/dist/chunk-S2HO5MLR.js +0 -621
  275. package/dist/chunk-S3ORKP3V.js +0 -716
  276. package/dist/chunk-TAIJOFOE.js +0 -124
  277. package/dist/chunk-TXESEO7Y.js +0 -245
  278. package/dist/chunk-UPLDI7CN.js +0 -1334
  279. package/dist/chunk-VL67H5IC.js +0 -506
  280. package/dist/chunk-VPPK3SY4.js +0 -1136
  281. package/dist/chunk-YMDLDELF.js +0 -314
  282. package/dist/chunk-YO6DVTL7.js +0 -99
  283. package/dist/chunk-YRZ5RPEB.js +0 -1561
  284. package/dist/chunk-ZDHLG5VP.js +0 -5676
  285. package/dist/chunk-ZGUAAVMA.js +0 -756
  286. package/dist/chunk-ZSYVKSY6.js +0 -2602
  287. package/dist/claude-FRRWJSTJ.js +0 -362
  288. package/dist/claude-cli-XJLK2X4L.js +0 -276
  289. package/dist/claude-code-HTBA4XRB.js +0 -126
  290. package/dist/claude-code-teams-T4SP24MD.js +0 -199
  291. package/dist/commands-5N4ILTPH.js +0 -5859
  292. package/dist/conductor-CQVGTEQN.js +0 -161
  293. package/dist/config-schema-EA4XALGG.js +0 -154
  294. package/dist/constellation-A26CCGQS.js +0 -225
  295. package/dist/context-audit-RLO3ETRP.js +0 -682
  296. package/dist/cost-BGM32XJU.js +0 -93
  297. package/dist/cost-VI46A4XL.js +0 -174
  298. package/dist/cursor-cli-JVEZGHWQ.js +0 -269
  299. package/dist/cursorrules-HLIKJJZT.js +0 -84
  300. package/dist/decision-loader-WWCLIQPJ.js +0 -20
  301. package/dist/delete-KBRPQLPC.js +0 -56
  302. package/dist/diff-D4X53HAC.js +0 -126
  303. package/dist/discipline-FA4OZXIS.js +0 -24
  304. package/dist/dist-34NA5RS5.js +0 -74
  305. package/dist/dist-5QE2BB2B-5S3T6Y3T.js +0 -6919
  306. package/dist/dist-77JDTVAY.js +0 -62
  307. package/dist/dist-OGTSAZ55.js +0 -1358
  308. package/dist/dist-QK4SQAK7.js +0 -64
  309. package/dist/dist-TA6LSC2Q.js +0 -20
  310. package/dist/docs-PBZB7LYP.js +0 -89
  311. package/dist/docs-QIYKO3BR.js +0 -155
  312. package/dist/doctor-ULBOHEIC.js +0 -11
  313. package/dist/drift-R5NRKFHI.js +0 -251
  314. package/dist/echo-O2LY7CC2.js +0 -248
  315. package/dist/edit-R2HNLMOG.js +0 -63
  316. package/dist/event-25OJKDCE.js +0 -31
  317. package/dist/export-IWVL7XLF.js +0 -38
  318. package/dist/flow-CRRVV3O3.js +0 -185
  319. package/dist/global-3NG5JXUB.js +0 -136
  320. package/dist/graduate-USAWGBJM.js +0 -160
  321. package/dist/graph-VHUMAAS6.js +0 -12
  322. package/dist/graph-server-YL22VBBN.js +0 -116
  323. package/dist/habits-OL5NGPXO.js +0 -1405
  324. package/dist/history-WOWC573W.js +0 -277
  325. package/dist/hooks-HFWSCGPV.js +0 -12
  326. package/dist/integrity-IHO4FZTS.js +0 -194
  327. package/dist/integrity-checker-PSKJA5SB.js +0 -12
  328. package/dist/journal-loader-5EYSBFFY.js +0 -18
  329. package/dist/lint-K6CJGGPH.js +0 -456
  330. package/dist/list-4YK7QKFF.js +0 -57
  331. package/dist/list-ENR7Q4CR.js +0 -56
  332. package/dist/lore-loader-7NO6N6FT.js +0 -26
  333. package/dist/lore-server-UNJY5KC3.js +0 -118
  334. package/dist/manual-G6FISID5.js +0 -204
  335. package/dist/migrate-LS45DNEV.js +0 -889
  336. package/dist/migrate-assessments-RGH4O6IX.js +0 -97
  337. package/dist/model-discovery-D2H3VBGC.js +0 -8
  338. package/dist/nomination-engine-RV5CNO5B.js +0 -42
  339. package/dist/notebook-YWIYGEHV.js +0 -155
  340. package/dist/orchestrate-JLILBBJE.js +0 -324
  341. package/dist/peers-DEOUIZM6.js +0 -82
  342. package/dist/persona-UHAHIVST.js +0 -390
  343. package/dist/pipeline-L4HCSBGN.js +0 -263
  344. package/dist/platform-server-H5YO3DQD.js +0 -1475
  345. package/dist/plugin-update-checker-KRRSGXMV.js +0 -12
  346. package/dist/portal-check-NPYGII2D.js +0 -42
  347. package/dist/portal-compliance-J7DGAPFX.js +0 -18
  348. package/dist/probe-MHL5HQZ2.js +0 -167
  349. package/dist/promote-F6ZYZZAL.js +0 -182
  350. package/dist/providers-GK7PB2OL.js +0 -104
  351. package/dist/quiz-M66SC7F7.js +0 -99
  352. package/dist/record-RA4WR2BO.js +0 -49
  353. package/dist/reindex-5LTD53ZC.js +0 -16
  354. package/dist/remember-HBWJ655S.js +0 -77
  355. package/dist/retag-3OLCVDEQ.js +0 -62
  356. package/dist/review-27ATYTD2.js +0 -33
  357. package/dist/review-57QMURZV.js +0 -334
  358. package/dist/ripple-JPBXP5I3.js +0 -215
  359. package/dist/sentinel-4XIG4STA.js +0 -63
  360. package/dist/sentinel-bridge-MDUXTQRL.js +0 -109
  361. package/dist/serve-CAH3PHE7.js +0 -33
  362. package/dist/serve-INL7SNBK.js +0 -36
  363. package/dist/serve-KBSE36PL.js +0 -49
  364. package/dist/server-54SKYFFY.js +0 -1647
  365. package/dist/server-XUOIO7E6.js +0 -338
  366. package/dist/session-tracker-C4BMD5WG.js +0 -13
  367. package/dist/session-work-log-MZ47OAPB.js +0 -20
  368. package/dist/setup-EDS27WUR.js +0 -25
  369. package/dist/setup-KO5AFC4K.js +0 -296
  370. package/dist/shift-D2JOHHBF.js +0 -668
  371. package/dist/show-5PV5KFJE.js +0 -176
  372. package/dist/show-NQKYX6WQ.js +0 -82
  373. package/dist/snapshot-BK4RBPCG.js +0 -62
  374. package/dist/spawn-RCHNXDHE.js +0 -196
  375. package/dist/status-WGIAQODY.js +0 -71
  376. package/dist/summary-NIRABMF5.js +0 -140
  377. package/dist/sweep-QMHNSIY5.js +0 -934
  378. package/dist/switch-6EJPZDIA.js +0 -232
  379. package/dist/symphony-4OCY36AI.js +0 -791
  380. package/dist/symphony-B75X2MME.js +0 -326
  381. package/dist/symphony-loader-UZGON56V.js +0 -90
  382. package/dist/symphony-peers-2ZQYLRNI.js +0 -34
  383. package/dist/symphony-peers-OL7F6M5S.js +0 -121
  384. package/dist/symphony-relay-UJYUXN65.js +0 -710
  385. package/dist/sync-VEHUH4OA.js +0 -11
  386. package/dist/sync-llms-YHCFIE6X.js +0 -166
  387. package/dist/task-loader-LDYWQSLM.js +0 -20
  388. package/dist/team-O5MIIFMA.js +0 -34
  389. package/dist/test-566CP5KC.js +0 -1017
  390. package/dist/thread-N754I4D5.js +0 -274
  391. package/dist/timeline-M3CICQFE.js +0 -112
  392. package/dist/triage-HHYGT3HY.js +0 -671
  393. package/dist/tutorial-KD22SUNO.js +0 -666
  394. package/dist/upgrade-H5PF32BW.js +0 -551
  395. package/dist/validate-CNKEKO6A.js +0 -134
  396. package/dist/validate-MB5ULIHS.js +0 -39
  397. package/dist/validate-QH3LADM6.js +0 -64
  398. package/dist/watch-2TKP5PVL.js +0 -199
  399. package/dist/watch-ZF4ML6CD.js +0 -111
  400. package/dist/wisdom-AATMGNFA.js +0 -319
  401. package/dist/work-log-loader-5L45XNYZ.js +0 -14
  402. package/dist/workspace-6E6OSRNU.js +0 -21
  403. package/platform-ui/dist/assets/AmbientSection-WtHfNedO.js +0 -1
  404. package/platform-ui/dist/assets/LoreSection-C3EixkjW.css +0 -1
  405. package/platform-ui/dist/assets/LoreSection-CwDDHrz9.js +0 -1
  406. package/platform-ui/dist/assets/SentinelSection-Cl7e5oZ6.js +0 -1
  407. package/platform-ui/dist/assets/TeamSection-CqSIMrKz.js +0 -1
  408. package/platform-ui/dist/assets/index-CfpZFjea.css +0 -1
  409. package/platform-ui/dist/assets/index-F0KL9xrN.js +0 -57
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env node
2
+ import'./chunk-5TAVYPOV.js';import*as lt from'fs';import {realpathSync,readlinkSync,readdirSync,readdir as readdir$1,lstatSync}from'fs';import {z as z$1}from'zod';import*as L from'path';import {win32,posix}from'path';import {fileURLToPath}from'url';import {realpath,readlink,readdir,lstat}from'fs/promises';import {EventEmitter}from'events';import Fi from'stream';import {StringDecoder}from'string_decoder';function Mi(t){return typeof t>"u"||t===null}function sr(t){return typeof t=="object"&&t!==null}function rr(t){return Array.isArray(t)?t:Mi(t)?[]:[t]}function nr(t,e){var i,s,r,n;if(e)for(n=Object.keys(e),i=0,s=n.length;i<s;i+=1)r=n[i],t[r]=e[r];return t}function or(t,e){var i="",s;for(s=0;s<e;s+=1)i+=t;return i}function ar(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var lr=Mi,hr=sr,ur=rr,cr=or,pr=ar,fr=nr,O={isNothing:lr,isObject:hr,toArray:ur,repeat:cr,isNegativeZero:pr,extend:fr};function $i(t,e){var i="",s=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(i+=`
3
+
4
+ `+t.mark.snippet),s+" "+i):s}function It(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=$i(this,false),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"";}It.prototype=Object.create(Error.prototype);It.prototype.constructor=It;It.prototype.toString=function(t){return this.name+": "+$i(this,t)};var W=It;function pe(t,e,i,s,r){var n="",o="",a=Math.floor(r/2)-1;return s-e>a&&(n=" ... ",e=s-a+n.length),i-s>a&&(o=" ...",i=s+a-o.length),{str:n+t.slice(e,i).replace(/\t/g,"\u2192")+o,pos:s-e+n.length}}function fe(t,e){return O.repeat(" ",e-t.length)+t}function dr(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var i=/\r?\n|\r|\0/g,s=[0],r=[],n,o=-1;n=i.exec(t.buffer);)r.push(n.index),s.push(n.index+n[0].length),t.position<=n.index&&o<0&&(o=s.length-2);o<0&&(o=s.length-1);var a="",l,h,c=Math.min(t.line+e.linesAfter,r.length).toString().length,u=e.maxLength-(e.indent+c+3);for(l=1;l<=e.linesBefore&&!(o-l<0);l++)h=pe(t.buffer,s[o-l],r[o-l],t.position-(s[o]-s[o-l]),u),a=O.repeat(" ",e.indent)+fe((t.line-l+1).toString(),c)+" | "+h.str+`
5
+ `+a;for(h=pe(t.buffer,s[o],r[o],t.position,u),a+=O.repeat(" ",e.indent)+fe((t.line+1).toString(),c)+" | "+h.str+`
6
+ `,a+=O.repeat("-",e.indent+c+3+h.pos)+`^
7
+ `,l=1;l<=e.linesAfter&&!(o+l>=r.length);l++)h=pe(t.buffer,s[o+l],r[o+l],t.position-(s[o]-s[o+l]),u),a+=O.repeat(" ",e.indent)+fe((t.line+l+1).toString(),c)+" | "+h.str+`
8
+ `;return a.replace(/\n$/,"")}var gr=dr,mr=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],yr=["scalar","sequence","mapping"];function wr(t){var e={};return t!==null&&Object.keys(t).forEach(function(i){t[i].forEach(function(s){e[String(s)]=i;});}),e}function br(t,e){if(e=e||{},Object.keys(e).forEach(function(i){if(mr.indexOf(i)===-1)throw new W('Unknown option "'+i+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return true},this.construct=e.construct||function(i){return i},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||false,this.styleAliases=wr(e.styleAliases||null),yr.indexOf(this.kind)===-1)throw new W('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var $=br;function Ue(t,e){var i=[];return t[e].forEach(function(s){var r=i.length;i.forEach(function(n,o){n.tag===s.tag&&n.kind===s.kind&&n.multi===s.multi&&(r=o);}),i[r]=s;}),i}function vr(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,i;function s(r){r.multi?(t.multi[r.kind].push(r),t.multi.fallback.push(r)):t[r.kind][r.tag]=t.fallback[r.tag]=r;}for(e=0,i=arguments.length;e<i;e+=1)arguments[e].forEach(s);return t}function Ee(t){return this.extend(t)}Ee.prototype.extend=function(t){var e=[],i=[];if(t instanceof $)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new W("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.forEach(function(r){if(!(r instanceof $))throw new W("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(r.loadKind&&r.loadKind!=="scalar")throw new W("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(r.multi)throw new W("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(r){if(!(r instanceof $))throw new W("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(Ee.prototype);return s.implicit=(this.implicit||[]).concat(e),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=Ue(s,"implicit"),s.compiledExplicit=Ue(s,"explicit"),s.compiledTypeMap=vr(s.compiledImplicit,s.compiledExplicit),s};var Sr=Ee,kr=new $("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),xr=new $("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),Cr=new $("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Ar=new Sr({explicit:[kr,xr,Cr]});function Er(t){if(t===null)return true;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function Or(){return null}function Tr(t){return t===null}var jr=new $("tag:yaml.org,2002:null",{kind:"scalar",resolve:Er,construct:Or,predicate:Tr,represent:{canonical:function(){return "~"},lowercase:function(){return "null"},uppercase:function(){return "NULL"},camelcase:function(){return "Null"},empty:function(){return ""}},defaultStyle:"lowercase"});function Fr(t){if(t===null)return false;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function Mr(t){return t==="true"||t==="True"||t==="TRUE"}function $r(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var Pr=new $("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Fr,construct:Mr,predicate:$r,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function Ir(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function Rr(t){return 48<=t&&t<=55}function Lr(t){return 48<=t&&t<=57}function Nr(t){if(t===null)return false;var e=t.length,i=0,s=false,r;if(!e)return false;if(r=t[i],(r==="-"||r==="+")&&(r=t[++i]),r==="0"){if(i+1===e)return true;if(r=t[++i],r==="b"){for(i++;i<e;i++)if(r=t[i],r!=="_"){if(r!=="0"&&r!=="1")return false;s=true;}return s&&r!=="_"}if(r==="x"){for(i++;i<e;i++)if(r=t[i],r!=="_"){if(!Ir(t.charCodeAt(i)))return false;s=true;}return s&&r!=="_"}if(r==="o"){for(i++;i<e;i++)if(r=t[i],r!=="_"){if(!Rr(t.charCodeAt(i)))return false;s=true;}return s&&r!=="_"}}if(r==="_")return false;for(;i<e;i++)if(r=t[i],r!=="_"){if(!Lr(t.charCodeAt(i)))return false;s=true;}return !(!s||r==="_")}function Dr(t){var e=t,i=1,s;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),s=e[0],(s==="-"||s==="+")&&(s==="-"&&(i=-1),e=e.slice(1),s=e[0]),e==="0")return 0;if(s==="0"){if(e[1]==="b")return i*parseInt(e.slice(2),2);if(e[1]==="x")return i*parseInt(e.slice(2),16);if(e[1]==="o")return i*parseInt(e.slice(2),8)}return i*parseInt(e,10)}function Wr(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!O.isNegativeZero(t)}var _r=new $("tag:yaml.org,2002:int",{kind:"scalar",resolve:Nr,construct:Dr,predicate:Wr,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),zr=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Br(t){return !(t===null||!zr.test(t)||t[t.length-1]==="_")}function Ur(t){var e,i;return e=t.replace(/_/g,"").toLowerCase(),i=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:i*parseFloat(e,10)}var Gr=/^[-+]?[0-9]+e/;function Yr(t,e){var i;if(isNaN(t))switch(e){case "lowercase":return ".nan";case "uppercase":return ".NAN";case "camelcase":return ".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case "lowercase":return ".inf";case "uppercase":return ".INF";case "camelcase":return ".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case "lowercase":return "-.inf";case "uppercase":return "-.INF";case "camelcase":return "-.Inf"}else if(O.isNegativeZero(t))return "-0.0";return i=t.toString(10),Gr.test(i)?i.replace("e",".e"):i}function qr(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||O.isNegativeZero(t))}var Vr=new $("tag:yaml.org,2002:float",{kind:"scalar",resolve:Br,construct:Ur,predicate:qr,represent:Yr,defaultStyle:"lowercase"}),Kr=Ar.extend({implicit:[jr,Pr,_r,Vr]}),Zr=Kr,Pi=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ii=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Hr(t){return t===null?false:Pi.exec(t)!==null||Ii.exec(t)!==null}function Jr(t){var e,i,s,r,n,o,a,l=0,h=null,c,u,f;if(e=Pi.exec(t),e===null&&(e=Ii.exec(t)),e===null)throw new Error("Date resolve error");if(i=+e[1],s=+e[2]-1,r=+e[3],!e[4])return new Date(Date.UTC(i,s,r));if(n=+e[4],o=+e[5],a=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l;}return e[9]&&(c=+e[10],u=+(e[11]||0),h=(c*60+u)*6e4,e[9]==="-"&&(h=-h)),f=new Date(Date.UTC(i,s,r,n,o,a,l)),h&&f.setTime(f.getTime()-h),f}function Qr(t){return t.toISOString()}var Xr=new $("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Hr,construct:Jr,instanceOf:Date,represent:Qr});function tn(t){return t==="<<"||t===null}var en=new $("tag:yaml.org,2002:merge",{kind:"scalar",resolve:tn}),Re=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
9
+ \r`;function sn(t){if(t===null)return false;var e,i,s=0,r=t.length,n=Re;for(i=0;i<r;i++)if(e=n.indexOf(t.charAt(i)),!(e>64)){if(e<0)return false;s+=6;}return s%8===0}function rn(t){var e,i,s=t.replace(/[\r\n=]/g,""),r=s.length,n=Re,o=0,a=[];for(e=0;e<r;e++)e%4===0&&e&&(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|n.indexOf(s.charAt(e));return i=r%4*6,i===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):i===18?(a.push(o>>10&255),a.push(o>>2&255)):i===12&&a.push(o>>4&255),new Uint8Array(a)}function nn(t){var e="",i=0,s,r,n=t.length,o=Re;for(s=0;s<n;s++)s%3===0&&s&&(e+=o[i>>18&63],e+=o[i>>12&63],e+=o[i>>6&63],e+=o[i&63]),i=(i<<8)+t[s];return r=n%3,r===0?(e+=o[i>>18&63],e+=o[i>>12&63],e+=o[i>>6&63],e+=o[i&63]):r===2?(e+=o[i>>10&63],e+=o[i>>4&63],e+=o[i<<2&63],e+=o[64]):r===1&&(e+=o[i>>2&63],e+=o[i<<4&63],e+=o[64],e+=o[64]),e}function on(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var an=new $("tag:yaml.org,2002:binary",{kind:"scalar",resolve:sn,construct:rn,predicate:on,represent:nn}),ln=Object.prototype.hasOwnProperty,hn=Object.prototype.toString;function un(t){if(t===null)return true;var e=[],i,s,r,n,o,a=t;for(i=0,s=a.length;i<s;i+=1){if(r=a[i],o=false,hn.call(r)!=="[object Object]")return false;for(n in r)if(ln.call(r,n))if(!o)o=true;else return false;if(!o)return false;if(e.indexOf(n)===-1)e.push(n);else return false}return true}function cn(t){return t!==null?t:[]}var pn=new $("tag:yaml.org,2002:omap",{kind:"sequence",resolve:un,construct:cn}),fn=Object.prototype.toString;function dn(t){if(t===null)return true;var e,i,s,r,n,o=t;for(n=new Array(o.length),e=0,i=o.length;e<i;e+=1){if(s=o[e],fn.call(s)!=="[object Object]"||(r=Object.keys(s),r.length!==1))return false;n[e]=[r[0],s[r[0]]];}return true}function gn(t){if(t===null)return [];var e,i,s,r,n,o=t;for(n=new Array(o.length),e=0,i=o.length;e<i;e+=1)s=o[e],r=Object.keys(s),n[e]=[r[0],s[r[0]]];return n}var mn=new $("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:dn,construct:gn}),yn=Object.prototype.hasOwnProperty;function wn(t){if(t===null)return true;var e,i=t;for(e in i)if(yn.call(i,e)&&i[e]!==null)return false;return true}function bn(t){return t!==null?t:{}}var vn=new $("tag:yaml.org,2002:set",{kind:"mapping",resolve:wn,construct:bn}),Ri=Zr.extend({implicit:[Xr,en],explicit:[an,pn,mn,vn]}),ot=Object.prototype.hasOwnProperty,Zt=1,Li=2,Ni=3,Ht=4,de=1,Sn=2,Ge=3,kn=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,xn=/[\x85\u2028\u2029]/,Cn=/[,\[\]\{\}]/,Di=/^(?:!|!!|![a-z\-]+!)$/i,Wi=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ye(t){return Object.prototype.toString.call(t)}function Q(t){return t===10||t===13}function pt(t){return t===9||t===32}function _(t){return t===9||t===32||t===10||t===13}function wt(t){return t===44||t===91||t===93||t===123||t===125}function An(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function En(t){return t===120?2:t===117?4:t===85?8:0}function On(t){return 48<=t&&t<=57?t-48:-1}function qe(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
10
+ `:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function Tn(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function _i(t,e,i){e==="__proto__"?Object.defineProperty(t,e,{configurable:true,enumerable:true,writable:true,value:i}):t[e]=i;}var zi=new Array(256),Bi=new Array(256);for(ht=0;ht<256;ht++)zi[ht]=qe(ht)?1:0,Bi[ht]=qe(ht);var ht;function jn(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Ri,this.onWarning=e.onWarning||null,this.legacy=e.legacy||false,this.json=e.json||false,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[];}function Ui(t,e){var i={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return i.snippet=gr(i),new W(e,i)}function k(t,e){throw Ui(t,e)}function Jt(t,e){t.onWarning&&t.onWarning.call(null,Ui(t,e));}var Ve={YAML:function(t,e,i){var s,r,n;t.version!==null&&k(t,"duplication of %YAML directive"),i.length!==1&&k(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&k(t,"ill-formed argument of the YAML directive"),r=parseInt(s[1],10),n=parseInt(s[2],10),r!==1&&k(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=n<2,n!==1&&n!==2&&Jt(t,"unsupported YAML version of the document");},TAG:function(t,e,i){var s,r;i.length!==2&&k(t,"TAG directive accepts exactly two arguments"),s=i[0],r=i[1],Di.test(s)||k(t,"ill-formed tag handle (first argument) of the TAG directive"),ot.call(t.tagMap,s)&&k(t,'there is a previously declared suffix for "'+s+'" tag handle'),Wi.test(r)||k(t,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r);}catch{k(t,"tag prefix is malformed: "+r);}t.tagMap[s]=r;}};function nt(t,e,i,s){var r,n,o,a;if(e<i){if(a=t.input.slice(e,i),s)for(r=0,n=a.length;r<n;r+=1)o=a.charCodeAt(r),o===9||32<=o&&o<=1114111||k(t,"expected valid JSON character");else kn.test(a)&&k(t,"the stream contains non-printable characters");t.result+=a;}}function Ke(t,e,i,s){var r,n,o,a;for(O.isObject(i)||k(t,"cannot merge mappings; the provided source object is unacceptable"),r=Object.keys(i),o=0,a=r.length;o<a;o+=1)n=r[o],ot.call(e,n)||(_i(e,n,i[n]),s[n]=true);}function bt(t,e,i,s,r,n,o,a,l){var h,c;if(Array.isArray(r))for(r=Array.prototype.slice.call(r),h=0,c=r.length;h<c;h+=1)Array.isArray(r[h])&&k(t,"nested arrays are not supported inside keys"),typeof r=="object"&&Ye(r[h])==="[object Object]"&&(r[h]="[object Object]");if(typeof r=="object"&&Ye(r)==="[object Object]"&&(r="[object Object]"),r=String(r),e===null&&(e={}),s==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(h=0,c=n.length;h<c;h+=1)Ke(t,e,n[h],i);else Ke(t,e,n,i);else !t.json&&!ot.call(i,r)&&ot.call(e,r)&&(t.line=o||t.line,t.lineStart=a||t.lineStart,t.position=l||t.position,k(t,"duplicated mapping key")),_i(e,r,n),delete i[r];return e}function Le(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):k(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1;}function E(t,e,i){for(var s=0,r=t.input.charCodeAt(t.position);r!==0;){for(;pt(r);)r===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),r=t.input.charCodeAt(++t.position);if(e&&r===35)do r=t.input.charCodeAt(++t.position);while(r!==10&&r!==13&&r!==0);if(Q(r))for(Le(t),r=t.input.charCodeAt(t.position),s++,t.lineIndent=0;r===32;)t.lineIndent++,r=t.input.charCodeAt(++t.position);else break}return i!==-1&&s!==0&&t.lineIndent<i&&Jt(t,"deficient indentation"),s}function ne(t){var e=t.position,i;return i=t.input.charCodeAt(e),!!((i===45||i===46)&&i===t.input.charCodeAt(e+1)&&i===t.input.charCodeAt(e+2)&&(e+=3,i=t.input.charCodeAt(e),i===0||_(i)))}function Ne(t,e){e===1?t.result+=" ":e>1&&(t.result+=O.repeat(`
11
+ `,e-1));}function Fn(t,e,i){var s,r,n,o,a,l,h,c,u=t.kind,f=t.result,d;if(d=t.input.charCodeAt(t.position),_(d)||wt(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(r=t.input.charCodeAt(t.position+1),_(r)||i&&wt(r)))return false;for(t.kind="scalar",t.result="",n=o=t.position,a=false;d!==0;){if(d===58){if(r=t.input.charCodeAt(t.position+1),_(r)||i&&wt(r))break}else if(d===35){if(s=t.input.charCodeAt(t.position-1),_(s))break}else {if(t.position===t.lineStart&&ne(t)||i&&wt(d))break;if(Q(d))if(l=t.line,h=t.lineStart,c=t.lineIndent,E(t,false,-1),t.lineIndent>=e){a=true,d=t.input.charCodeAt(t.position);continue}else {t.position=o,t.line=l,t.lineStart=h,t.lineIndent=c;break}}a&&(nt(t,n,o,false),Ne(t,t.line-l),n=o=t.position,a=false),pt(d)||(o=t.position+1),d=t.input.charCodeAt(++t.position);}return nt(t,n,o,false),t.result?true:(t.kind=u,t.result=f,false)}function Mn(t,e){var i,s,r;if(i=t.input.charCodeAt(t.position),i!==39)return false;for(t.kind="scalar",t.result="",t.position++,s=r=t.position;(i=t.input.charCodeAt(t.position))!==0;)if(i===39)if(nt(t,s,t.position,true),i=t.input.charCodeAt(++t.position),i===39)s=t.position,t.position++,r=t.position;else return true;else Q(i)?(nt(t,s,r,true),Ne(t,E(t,false,e)),s=r=t.position):t.position===t.lineStart&&ne(t)?k(t,"unexpected end of the document within a single quoted scalar"):(t.position++,r=t.position);k(t,"unexpected end of the stream within a single quoted scalar");}function $n(t,e){var i,s,r,n,o,a;if(a=t.input.charCodeAt(t.position),a!==34)return false;for(t.kind="scalar",t.result="",t.position++,i=s=t.position;(a=t.input.charCodeAt(t.position))!==0;){if(a===34)return nt(t,i,t.position,true),t.position++,true;if(a===92){if(nt(t,i,t.position,true),a=t.input.charCodeAt(++t.position),Q(a))E(t,false,e);else if(a<256&&zi[a])t.result+=Bi[a],t.position++;else if((o=En(a))>0){for(r=o,n=0;r>0;r--)a=t.input.charCodeAt(++t.position),(o=An(a))>=0?n=(n<<4)+o:k(t,"expected hexadecimal character");t.result+=Tn(n),t.position++;}else k(t,"unknown escape sequence");i=s=t.position;}else Q(a)?(nt(t,i,s,true),Ne(t,E(t,false,e)),i=s=t.position):t.position===t.lineStart&&ne(t)?k(t,"unexpected end of the document within a double quoted scalar"):(t.position++,s=t.position);}k(t,"unexpected end of the stream within a double quoted scalar");}function Pn(t,e){var i=true,s,r,n,o=t.tag,a,l=t.anchor,h,c,u,f,d,g=Object.create(null),m,b,v,y;if(y=t.input.charCodeAt(t.position),y===91)c=93,d=false,a=[];else if(y===123)c=125,d=true,a={};else return false;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),y=t.input.charCodeAt(++t.position);y!==0;){if(E(t,true,e),y=t.input.charCodeAt(t.position),y===c)return t.position++,t.tag=o,t.anchor=l,t.kind=d?"mapping":"sequence",t.result=a,true;i?y===44&&k(t,"expected the node content, but found ','"):k(t,"missed comma between flow collection entries"),b=m=v=null,u=f=false,y===63&&(h=t.input.charCodeAt(t.position+1),_(h)&&(u=f=true,t.position++,E(t,true,e))),s=t.line,r=t.lineStart,n=t.position,St(t,e,Zt,false,true),b=t.tag,m=t.result,E(t,true,e),y=t.input.charCodeAt(t.position),(f||t.line===s)&&y===58&&(u=true,y=t.input.charCodeAt(++t.position),E(t,true,e),St(t,e,Zt,false,true),v=t.result),d?bt(t,a,g,b,m,v,s,r,n):u?a.push(bt(t,null,g,b,m,v,s,r,n)):a.push(m),E(t,true,e),y=t.input.charCodeAt(t.position),y===44?(i=true,y=t.input.charCodeAt(++t.position)):i=false;}k(t,"unexpected end of the stream within a flow collection");}function In(t,e){var i,s,r=de,n=false,o=false,a=e,l=0,h=false,c,u;if(u=t.input.charCodeAt(t.position),u===124)s=false;else if(u===62)s=true;else return false;for(t.kind="scalar",t.result="";u!==0;)if(u=t.input.charCodeAt(++t.position),u===43||u===45)de===r?r=u===43?Ge:Sn:k(t,"repeat of a chomping mode identifier");else if((c=On(u))>=0)c===0?k(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?k(t,"repeat of an indentation width identifier"):(a=e+c-1,o=true);else break;if(pt(u)){do u=t.input.charCodeAt(++t.position);while(pt(u));if(u===35)do u=t.input.charCodeAt(++t.position);while(!Q(u)&&u!==0)}for(;u!==0;){for(Le(t),t.lineIndent=0,u=t.input.charCodeAt(t.position);(!o||t.lineIndent<a)&&u===32;)t.lineIndent++,u=t.input.charCodeAt(++t.position);if(!o&&t.lineIndent>a&&(a=t.lineIndent),Q(u)){l++;continue}if(t.lineIndent<a){r===Ge?t.result+=O.repeat(`
12
+ `,n?1+l:l):r===de&&n&&(t.result+=`
13
+ `);break}for(s?pt(u)?(h=true,t.result+=O.repeat(`
14
+ `,n?1+l:l)):h?(h=false,t.result+=O.repeat(`
15
+ `,l+1)):l===0?n&&(t.result+=" "):t.result+=O.repeat(`
16
+ `,l):t.result+=O.repeat(`
17
+ `,n?1+l:l),n=true,o=true,l=0,i=t.position;!Q(u)&&u!==0;)u=t.input.charCodeAt(++t.position);nt(t,i,t.position,false);}return true}function Ze(t,e){var i,s=t.tag,r=t.anchor,n=[],o,a=false,l;if(t.firstTabInLine!==-1)return false;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,k(t,"tab characters must not be used in indentation")),!(l!==45||(o=t.input.charCodeAt(t.position+1),!_(o))));){if(a=true,t.position++,E(t,true,-1)&&t.lineIndent<=e){n.push(null),l=t.input.charCodeAt(t.position);continue}if(i=t.line,St(t,e,Ni,false,true),n.push(t.result),E(t,true,-1),l=t.input.charCodeAt(t.position),(t.line===i||t.lineIndent>e)&&l!==0)k(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return a?(t.tag=s,t.anchor=r,t.kind="sequence",t.result=n,true):false}function Rn(t,e,i){var s,r,n,o,a,l,h=t.tag,c=t.anchor,u={},f=Object.create(null),d=null,g=null,m=null,b=false,v=false,y;if(t.firstTabInLine!==-1)return false;for(t.anchor!==null&&(t.anchorMap[t.anchor]=u),y=t.input.charCodeAt(t.position);y!==0;){if(!b&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,k(t,"tab characters must not be used in indentation")),s=t.input.charCodeAt(t.position+1),n=t.line,(y===63||y===58)&&_(s))y===63?(b&&(bt(t,u,f,d,g,null,o,a,l),d=g=m=null),v=true,b=true,r=true):b?(b=false,r=true):k(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,y=s;else {if(o=t.line,a=t.lineStart,l=t.position,!St(t,i,Li,false,true))break;if(t.line===n){for(y=t.input.charCodeAt(t.position);pt(y);)y=t.input.charCodeAt(++t.position);if(y===58)y=t.input.charCodeAt(++t.position),_(y)||k(t,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(bt(t,u,f,d,g,null,o,a,l),d=g=m=null),v=true,b=false,r=false,d=t.tag,g=t.result;else if(v)k(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=h,t.anchor=c,true}else if(v)k(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=h,t.anchor=c,true}if((t.line===n||t.lineIndent>e)&&(b&&(o=t.line,a=t.lineStart,l=t.position),St(t,e,Ht,true,r)&&(b?g=t.result:m=t.result),b||(bt(t,u,f,d,g,m,o,a,l),d=g=m=null),E(t,true,-1),y=t.input.charCodeAt(t.position)),(t.line===n||t.lineIndent>e)&&y!==0)k(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return b&&bt(t,u,f,d,g,null,o,a,l),v&&(t.tag=h,t.anchor=c,t.kind="mapping",t.result=u),v}function Ln(t){var e,i=false,s=false,r,n,o;if(o=t.input.charCodeAt(t.position),o!==33)return false;if(t.tag!==null&&k(t,"duplication of a tag property"),o=t.input.charCodeAt(++t.position),o===60?(i=true,o=t.input.charCodeAt(++t.position)):o===33?(s=true,r="!!",o=t.input.charCodeAt(++t.position)):r="!",e=t.position,i){do o=t.input.charCodeAt(++t.position);while(o!==0&&o!==62);t.position<t.length?(n=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):k(t,"unexpected end of the stream within a verbatim tag");}else {for(;o!==0&&!_(o);)o===33&&(s?k(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),Di.test(r)||k(t,"named tag handle cannot contain such characters"),s=true,e=t.position+1)),o=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),Cn.test(n)&&k(t,"tag suffix cannot contain flow indicator characters");}n&&!Wi.test(n)&&k(t,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n);}catch{k(t,"tag name is malformed: "+n);}return i?t.tag=n:ot.call(t.tagMap,r)?t.tag=t.tagMap[r]+n:r==="!"?t.tag="!"+n:r==="!!"?t.tag="tag:yaml.org,2002:"+n:k(t,'undeclared tag handle "'+r+'"'),true}function Nn(t){var e,i;if(i=t.input.charCodeAt(t.position),i!==38)return false;for(t.anchor!==null&&k(t,"duplication of an anchor property"),i=t.input.charCodeAt(++t.position),e=t.position;i!==0&&!_(i)&&!wt(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&k(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),true}function Dn(t){var e,i,s;if(s=t.input.charCodeAt(t.position),s!==42)return false;for(s=t.input.charCodeAt(++t.position),e=t.position;s!==0&&!_(s)&&!wt(s);)s=t.input.charCodeAt(++t.position);return t.position===e&&k(t,"name of an alias node must contain at least one character"),i=t.input.slice(e,t.position),ot.call(t.anchorMap,i)||k(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],E(t,true,-1),true}function St(t,e,i,s,r){var n,o,a,l=1,h=false,c=false,u,f,d,g,m,b;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n=o=a=Ht===i||Ni===i,s&&E(t,true,-1)&&(h=true,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;Ln(t)||Nn(t);)E(t,true,-1)?(h=true,a=n,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):a=false;if(a&&(a=h||r),(l===1||Ht===i)&&(Zt===i||Li===i?m=e:m=e+1,b=t.position-t.lineStart,l===1?a&&(Ze(t,b)||Rn(t,b,m))||Pn(t,m)?c=true:(o&&In(t,m)||Mn(t,m)||$n(t,m)?c=true:Dn(t)?(c=true,(t.tag!==null||t.anchor!==null)&&k(t,"alias node should not have any properties")):Fn(t,m,Zt===i)&&(c=true,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(c=a&&Ze(t,b))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&k(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),u=0,f=t.implicitTypes.length;u<f;u+=1)if(g=t.implicitTypes[u],g.resolve(t.result)){t.result=g.construct(t.result),t.tag=g.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(ot.call(t.typeMap[t.kind||"fallback"],t.tag))g=t.typeMap[t.kind||"fallback"][t.tag];else for(g=null,d=t.typeMap.multi[t.kind||"fallback"],u=0,f=d.length;u<f;u+=1)if(t.tag.slice(0,d[u].tag.length)===d[u].tag){g=d[u];break}g||k(t,"unknown tag !<"+t.tag+">"),t.result!==null&&g.kind!==t.kind&&k(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+g.kind+'", not "'+t.kind+'"'),g.resolve(t.result,t.tag)?(t.result=g.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):k(t,"cannot resolve a node with !<"+t.tag+"> explicit tag");}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||c}function Wn(t){var e=t.position,i,s,r,n=false,o;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(o=t.input.charCodeAt(t.position))!==0&&(E(t,true,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||o!==37));){for(n=true,o=t.input.charCodeAt(++t.position),i=t.position;o!==0&&!_(o);)o=t.input.charCodeAt(++t.position);for(s=t.input.slice(i,t.position),r=[],s.length<1&&k(t,"directive name must not be less than one character in length");o!==0;){for(;pt(o);)o=t.input.charCodeAt(++t.position);if(o===35){do o=t.input.charCodeAt(++t.position);while(o!==0&&!Q(o));break}if(Q(o))break;for(i=t.position;o!==0&&!_(o);)o=t.input.charCodeAt(++t.position);r.push(t.input.slice(i,t.position));}o!==0&&Le(t),ot.call(Ve,s)?Ve[s](t,s,r):Jt(t,'unknown document directive "'+s+'"');}if(E(t,true,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,E(t,true,-1)):n&&k(t,"directives end mark is expected"),St(t,t.lineIndent-1,Ht,false,true),E(t,true,-1),t.checkLineBreaks&&xn.test(t.input.slice(e,t.position))&&Jt(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&ne(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,E(t,true,-1));return}if(t.position<t.length-1)k(t,"end of the stream or a document separator is expected");else return}function _n(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
18
+ `),t.charCodeAt(0)===65279&&(t=t.slice(1)));var i=new jn(t,e),s=t.indexOf("\0");for(s!==-1&&(i.position=s,k(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)Wn(i);return i.documents}function zn(t,e){var i=_n(t,e);if(i.length!==0){if(i.length===1)return i[0];throw new W("expected a single document in the stream, but found more")}}var Bn=zn,Un={load:Bn},Gi=Object.prototype.toString,Yi=Object.prototype.hasOwnProperty,De=65279,Gn=9,Rt=10,Yn=13,qn=32,Vn=33,Kn=34,Oe=35,Zn=37,Hn=38,Jn=39,Qn=42,qi=44,Xn=45,Qt=58,to=61,eo=62,io=63,so=64,Vi=91,Ki=93,ro=96,Zi=123,no=124,Hi=125,P={};P[0]="\\0";P[7]="\\a";P[8]="\\b";P[9]="\\t";P[10]="\\n";P[11]="\\v";P[12]="\\f";P[13]="\\r";P[27]="\\e";P[34]='\\"';P[92]="\\\\";P[133]="\\N";P[160]="\\_";P[8232]="\\L";P[8233]="\\P";var oo=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],ao=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function lo(t,e){var i,s,r,n,o,a,l;if(e===null)return {};for(i={},s=Object.keys(e),r=0,n=s.length;r<n;r+=1)o=s[r],a=String(e[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=t.compiledTypeMap.fallback[o],l&&Yi.call(l.styleAliases,a)&&(a=l.styleAliases[a]),i[o]=a;return i}function ho(t){var e,i,s;if(e=t.toString(16).toUpperCase(),t<=255)i="x",s=2;else if(t<=65535)i="u",s=4;else if(t<=4294967295)i="U",s=8;else throw new W("code point within a string may not be greater than 0xFFFFFFFF");return "\\"+i+O.repeat("0",s-e.length)+e}var uo=1,Lt=2;function co(t){this.schema=t.schema||Ri,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||false,this.skipInvalid=t.skipInvalid||false,this.flowLevel=O.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=lo(this.schema,t.styles||null),this.sortKeys=t.sortKeys||false,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||false,this.noCompatMode=t.noCompatMode||false,this.condenseFlow=t.condenseFlow||false,this.quotingType=t.quotingType==='"'?Lt:uo,this.forceQuotes=t.forceQuotes||false,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null;}function He(t,e){for(var i=O.repeat(" ",e),s=0,r=-1,n="",o,a=t.length;s<a;)r=t.indexOf(`
19
+ `,s),r===-1?(o=t.slice(s),s=a):(o=t.slice(s,r+1),s=r+1),o.length&&o!==`
20
+ `&&(n+=i),n+=o;return n}function Te(t,e){return `
21
+ `+O.repeat(" ",t.indent*e)}function po(t,e){var i,s,r;for(i=0,s=t.implicitTypes.length;i<s;i+=1)if(r=t.implicitTypes[i],r.resolve(e))return true;return false}function Xt(t){return t===qn||t===Gn}function Nt(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==De||65536<=t&&t<=1114111}function Je(t){return Nt(t)&&t!==De&&t!==Yn&&t!==Rt}function Qe(t,e,i){var s=Je(t),r=s&&!Xt(t);return (i?s:s&&t!==qi&&t!==Vi&&t!==Ki&&t!==Zi&&t!==Hi)&&t!==Oe&&!(e===Qt&&!r)||Je(e)&&!Xt(e)&&t===Oe||e===Qt&&r}function fo(t){return Nt(t)&&t!==De&&!Xt(t)&&t!==Xn&&t!==io&&t!==Qt&&t!==qi&&t!==Vi&&t!==Ki&&t!==Zi&&t!==Hi&&t!==Oe&&t!==Hn&&t!==Qn&&t!==Vn&&t!==no&&t!==to&&t!==eo&&t!==Jn&&t!==Kn&&t!==Zn&&t!==so&&t!==ro}function go(t){return !Xt(t)&&t!==Qt}function Tt(t,e){var i=t.charCodeAt(e),s;return i>=55296&&i<=56319&&e+1<t.length&&(s=t.charCodeAt(e+1),s>=56320&&s<=57343)?(i-55296)*1024+s-56320+65536:i}function Ji(t){var e=/^\n* /;return e.test(t)}var Qi=1,je=2,Xi=3,ts=4,mt=5;function mo(t,e,i,s,r,n,o,a){var l,h=0,c=null,u=false,f=false,d=s!==-1,g=-1,m=fo(Tt(t,0))&&go(Tt(t,t.length-1));if(e||o)for(l=0;l<t.length;h>=65536?l+=2:l++){if(h=Tt(t,l),!Nt(h))return mt;m=m&&Qe(h,c,a),c=h;}else {for(l=0;l<t.length;h>=65536?l+=2:l++){if(h=Tt(t,l),h===Rt)u=true,d&&(f=f||l-g-1>s&&t[g+1]!==" ",g=l);else if(!Nt(h))return mt;m=m&&Qe(h,c,a),c=h;}f=f||d&&l-g-1>s&&t[g+1]!==" ";}return !u&&!f?m&&!o&&!r(t)?Qi:n===Lt?mt:je:i>9&&Ji(t)?mt:o?n===Lt?mt:je:f?ts:Xi}function yo(t,e,i,s,r){t.dump=(function(){if(e.length===0)return t.quotingType===Lt?'""':"''";if(!t.noCompatMode&&(oo.indexOf(e)!==-1||ao.test(e)))return t.quotingType===Lt?'"'+e+'"':"'"+e+"'";var n=t.indent*Math.max(1,i),o=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-n),a=s||t.flowLevel>-1&&i>=t.flowLevel;function l(h){return po(t,h)}switch(mo(e,a,t.indent,o,l,t.quotingType,t.forceQuotes&&!s,r)){case Qi:return e;case je:return "'"+e.replace(/'/g,"''")+"'";case Xi:return "|"+Xe(e,t.indent)+ti(He(e,n));case ts:return ">"+Xe(e,t.indent)+ti(He(wo(e,o),n));case mt:return '"'+bo(e)+'"';default:throw new W("impossible error: invalid scalar style")}})();}function Xe(t,e){var i=Ji(t)?String(e):"",s=t[t.length-1]===`
22
+ `,r=s&&(t[t.length-2]===`
23
+ `||t===`
24
+ `),n=r?"+":s?"":"-";return i+n+`
25
+ `}function ti(t){return t[t.length-1]===`
26
+ `?t.slice(0,-1):t}function wo(t,e){for(var i=/(\n+)([^\n]*)/g,s=(function(){var h=t.indexOf(`
27
+ `);return h=h!==-1?h:t.length,i.lastIndex=h,ei(t.slice(0,h),e)})(),r=t[0]===`
28
+ `||t[0]===" ",n,o;o=i.exec(t);){var a=o[1],l=o[2];n=l[0]===" ",s+=a+(!r&&!n&&l!==""?`
29
+ `:"")+ei(l,e),r=n;}return s}function ei(t,e){if(t===""||t[0]===" ")return t;for(var i=/ [^ ]/g,s,r=0,n,o=0,a=0,l="";s=i.exec(t);)a=s.index,a-r>e&&(n=o>r?o:a,l+=`
30
+ `+t.slice(r,n),r=n+1),o=a;return l+=`
31
+ `,t.length-r>e&&o>r?l+=t.slice(r,o)+`
32
+ `+t.slice(o+1):l+=t.slice(r),l.slice(1)}function bo(t){for(var e="",i=0,s,r=0;r<t.length;i>=65536?r+=2:r++)i=Tt(t,r),s=P[i],!s&&Nt(i)?(e+=t[r],i>=65536&&(e+=t[r+1])):e+=s||ho(i);return e}function vo(t,e,i){var s="",r=t.tag,n,o,a;for(n=0,o=i.length;n<o;n+=1)a=i[n],t.replacer&&(a=t.replacer.call(i,String(n),a)),(et(t,e,a,false,false)||typeof a>"u"&&et(t,e,null,false,false))&&(s!==""&&(s+=","+(t.condenseFlow?"":" ")),s+=t.dump);t.tag=r,t.dump="["+s+"]";}function ii(t,e,i,s){var r="",n=t.tag,o,a,l;for(o=0,a=i.length;o<a;o+=1)l=i[o],t.replacer&&(l=t.replacer.call(i,String(o),l)),(et(t,e+1,l,true,true,false,true)||typeof l>"u"&&et(t,e+1,null,true,true,false,true))&&((!s||r!=="")&&(r+=Te(t,e)),t.dump&&Rt===t.dump.charCodeAt(0)?r+="-":r+="- ",r+=t.dump);t.tag=n,t.dump=r||"[]";}function So(t,e,i){var s="",r=t.tag,n=Object.keys(i),o,a,l,h,c;for(o=0,a=n.length;o<a;o+=1)c="",s!==""&&(c+=", "),t.condenseFlow&&(c+='"'),l=n[o],h=i[l],t.replacer&&(h=t.replacer.call(i,l,h)),et(t,e,l,false,false)&&(t.dump.length>1024&&(c+="? "),c+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),et(t,e,h,false,false)&&(c+=t.dump,s+=c));t.tag=r,t.dump="{"+s+"}";}function ko(t,e,i,s){var r="",n=t.tag,o=Object.keys(i),a,l,h,c,u,f;if(t.sortKeys===true)o.sort();else if(typeof t.sortKeys=="function")o.sort(t.sortKeys);else if(t.sortKeys)throw new W("sortKeys must be a boolean or a function");for(a=0,l=o.length;a<l;a+=1)f="",(!s||r!=="")&&(f+=Te(t,e)),h=o[a],c=i[h],t.replacer&&(c=t.replacer.call(i,h,c)),et(t,e+1,h,true,true,true)&&(u=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,u&&(t.dump&&Rt===t.dump.charCodeAt(0)?f+="?":f+="? "),f+=t.dump,u&&(f+=Te(t,e)),et(t,e+1,c,true,u)&&(t.dump&&Rt===t.dump.charCodeAt(0)?f+=":":f+=": ",f+=t.dump,r+=f));t.tag=n,t.dump=r||"{}";}function si(t,e,i){var s,r,n,o,a,l;for(r=i?t.explicitTypes:t.implicitTypes,n=0,o=r.length;n<o;n+=1)if(a=r[n],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof e=="object"&&e instanceof a.instanceOf)&&(!a.predicate||a.predicate(e))){if(i?a.multi&&a.representName?t.tag=a.representName(e):t.tag=a.tag:t.tag="?",a.represent){if(l=t.styleMap[a.tag]||a.defaultStyle,Gi.call(a.represent)==="[object Function]")s=a.represent(e,l);else if(Yi.call(a.represent,l))s=a.represent[l](e,l);else throw new W("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');t.dump=s;}return true}return false}function et(t,e,i,s,r,n,o){t.tag=null,t.dump=i,si(t,i,false)||si(t,i,true);var a=Gi.call(t.dump),l=s,h;s&&(s=t.flowLevel<0||t.flowLevel>e);var c=a==="[object Object]"||a==="[object Array]",u,f;if(c&&(u=t.duplicates.indexOf(i),f=u!==-1),(t.tag!==null&&t.tag!=="?"||f||t.indent!==2&&e>0)&&(r=false),f&&t.usedDuplicates[u])t.dump="*ref_"+u;else {if(c&&f&&!t.usedDuplicates[u]&&(t.usedDuplicates[u]=true),a==="[object Object]")s&&Object.keys(t.dump).length!==0?(ko(t,e,t.dump,r),f&&(t.dump="&ref_"+u+t.dump)):(So(t,e,t.dump),f&&(t.dump="&ref_"+u+" "+t.dump));else if(a==="[object Array]")s&&t.dump.length!==0?(t.noArrayIndent&&!o&&e>0?ii(t,e-1,t.dump,r):ii(t,e,t.dump,r),f&&(t.dump="&ref_"+u+t.dump)):(vo(t,e,t.dump),f&&(t.dump="&ref_"+u+" "+t.dump));else if(a==="[object String]")t.tag!=="?"&&yo(t,t.dump,e,n,l);else {if(a==="[object Undefined]"||t.skipInvalid)return false;throw new W("unacceptable kind of an object to dump "+a)}t.tag!==null&&t.tag!=="?"&&(h=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",t.dump=h+" "+t.dump);}return true}function xo(t,e){var i=[],s=[],r,n;for(Fe(t,i,s),r=0,n=s.length;r<n;r+=1)e.duplicates.push(i[s[r]]);e.usedDuplicates=new Array(n);}function Fe(t,e,i){var s,r,n;if(t!==null&&typeof t=="object")if(r=e.indexOf(t),r!==-1)i.indexOf(r)===-1&&i.push(r);else if(e.push(t),Array.isArray(t))for(r=0,n=t.length;r<n;r+=1)Fe(t[r],e,i);else for(s=Object.keys(t),r=0,n=s.length;r<n;r+=1)Fe(t[s[r]],e,i);}function Co(t,e){e=e||{};var i=new co(e);i.noRefs||xo(t,i);var s=t;return i.replacer&&(s=i.replacer.call({"":s},"",s)),et(i,0,s,true,true)?i.dump+`
33
+ `:""}var Ao=Co,Eo={dump:Ao},oe=Un.load,Oo=Eo.dump,es=(t,e,i)=>{let s=t instanceof RegExp?ri(t,i):t,r=e instanceof RegExp?ri(e,i):e,n=s!==null&&r!=null&&To(s,r,i);return n&&{start:n[0],end:n[1],pre:i.slice(0,n[0]),body:i.slice(n[0]+s.length,n[1]),post:i.slice(n[1]+r.length)}},ri=(t,e)=>{let i=e.match(t);return i?i[0]:null},To=(t,e,i)=>{let s,r,n,o,a,l=i.indexOf(t),h=i.indexOf(e,l+1),c=l;if(l>=0&&h>0){if(t===e)return [l,h];for(s=[],n=i.length;c>=0&&!a;){if(c===l)s.push(c),l=i.indexOf(t,c+1);else if(s.length===1){let u=s.pop();u!==void 0&&(a=[u,h]);}else r=s.pop(),r!==void 0&&r<n&&(n=r,o=h),h=i.indexOf(e,c+1);c=l<h&&l>=0?l:h;}s.length&&o!==void 0&&(a=[n,o]);}return a},is="\0SLASH"+Math.random()+"\0",ss="\0OPEN"+Math.random()+"\0",We="\0CLOSE"+Math.random()+"\0",rs="\0COMMA"+Math.random()+"\0",ns="\0PERIOD"+Math.random()+"\0",jo=new RegExp(is,"g"),Fo=new RegExp(ss,"g"),Mo=new RegExp(We,"g"),$o=new RegExp(rs,"g"),Po=new RegExp(ns,"g"),Io=/\\\\/g,Ro=/\\{/g,Lo=/\\}/g,No=/\\,/g,Do=/\\./g,Wo=1e5;function ge(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function _o(t){return t.replace(Io,is).replace(Ro,ss).replace(Lo,We).replace(No,rs).replace(Do,ns)}function zo(t){return t.replace(jo,"\\").replace(Fo,"{").replace(Mo,"}").replace($o,",").replace(Po,".")}function os(t){if(!t)return [""];let e=[],i=es("{","}",t);if(!i)return t.split(",");let{pre:s,body:r,post:n}=i,o=s.split(",");o[o.length-1]+="{"+r+"}";let a=os(n);return n.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function Bo(t,e={}){if(!t)return [];let{max:i=Wo}=e;return t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),jt(_o(t),i,true).map(zo)}function Uo(t){return "{"+t+"}"}function Go(t){return /^-?0\d/.test(t)}function Yo(t,e){return t<=e}function qo(t,e){return t>=e}function jt(t,e,i){let s=[],r=es("{","}",t);if(!r)return [t];let n=r.pre,o=r.post.length?jt(r.post,e,false):[""];if(/\$$/.test(r.pre))for(let a=0;a<o.length&&a<e;a++){let l=n+"{"+r.body+"}"+o[a];s.push(l);}else {let a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),h=a||l,c=r.body.indexOf(",")>=0;if(!h&&!c)return r.post.match(/,(?!,).*\}/)?(t=r.pre+"{"+r.body+We+r.post,jt(t,e,true)):[t];let u;if(h)u=r.body.split(/\.\./);else if(u=os(r.body),u.length===1&&u[0]!==void 0&&(u=jt(u[0],e,false).map(Uo),u.length===1))return o.map(d=>r.pre+u[0]+d);let f;if(h&&u[0]!==void 0&&u[1]!==void 0){let d=ge(u[0]),g=ge(u[1]),m=Math.max(u[0].length,u[1].length),b=u.length===3&&u[2]!==void 0?Math.abs(ge(u[2])):1,v=Yo;g<d&&(b*=-1,v=qo);let y=u.some(Go);f=[];for(let x=d;v(x,g);x+=b){let w;if(l)w=String.fromCharCode(x),w==="\\"&&(w="");else if(w=String(x),y){let S=m-w.length;if(S>0){let C=new Array(S+1).join("0");x<0?w="-"+C+w.slice(1):w=C+w;}}f.push(w);}}else {f=[];for(let d=0;d<u.length;d++)f.push.apply(f,jt(u[d],e,false));}for(let d=0;d<f.length;d++)for(let g=0;g<o.length&&s.length<e;g++){let m=n+f[d]+o[g];(!i||h||m)&&s.push(m);}}return s}var te=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},Vo={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",true],"[:alpha:]":["\\p{L}\\p{Nl}",true],"[:ascii:]":["\\x00-\\x7f",false],"[:blank:]":["\\p{Zs}\\t",true],"[:cntrl:]":["\\p{Cc}",true],"[:digit:]":["\\p{Nd}",true],"[:graph:]":["\\p{Z}\\p{C}",true,true],"[:lower:]":["\\p{Ll}",true],"[:print:]":["\\p{C}",true],"[:punct:]":["\\p{P}",true],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",true],"[:upper:]":["\\p{Lu}",true],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",true],"[:xdigit:]":["A-Fa-f0-9",false]},kt=t=>t.replace(/[[\]\\-]/g,"\\$&"),Ko=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ni=t=>t.join(""),Zo=(t,e)=>{let i=e;if(t.charAt(i)!=="[")throw new Error("not in a brace expression");let s=[],r=[],n=i+1,o=false,a=false,l=false,h=false,c=i,u="";t:for(;n<t.length;){let g=t.charAt(n);if((g==="!"||g==="^")&&n===i+1){h=true,n++;continue}if(g==="]"&&o&&!l){c=n+1;break}if(o=true,g==="\\"&&!l){l=true,n++;continue}if(g==="["&&!l){for(let[m,[b,v,y]]of Object.entries(Vo))if(t.startsWith(m,n)){if(u)return ["$.",false,t.length-i,true];n+=m.length,y?r.push(b):s.push(b),a=a||v;continue t}}if(l=false,u){g>u?s.push(kt(u)+"-"+kt(g)):g===u&&s.push(kt(g)),u="",n++;continue}if(t.startsWith("-]",n+1)){s.push(kt(g+"-")),n+=2;continue}if(t.startsWith("-",n+1)){u=g,n+=2;continue}s.push(kt(g)),n++;}if(c<n)return ["",false,0,false];if(!s.length&&!r.length)return ["$.",false,t.length-i,true];if(r.length===0&&s.length===1&&/^\\?.$/.test(s[0])&&!h){let g=s[0].length===2?s[0].slice(-1):s[0];return [Ko(g),false,c-i,false]}let f="["+(h?"^":"")+ni(s)+"]",d="["+(h?"":"^")+ni(r)+"]";return [s.length&&r.length?"("+f+"|"+d+")":s.length?f:d,a,c-i,true]},vt=(t,{windowsPathsNoEscape:e=false,magicalBraces:i=true}={})=>i?e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):e?t.replace(/\[([^\/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1"),Ho=new Set(["!","?","+","*","@"]),oi=t=>Ho.has(t),Jo="(?!(?:^|/)\\.\\.?(?:$|/))",Wt="(?!\\.)",Qo=new Set(["[","."]),Xo=new Set(["..","."]),ta=new Set("().*{}+?[]^$\\!"),ea=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),_e="[^/]",ai=_e+"*?",li=_e+"+?",as=class B{type;#t;#i;#n=false;#r=[];#o;#v;#y;#u=false;#a;#p;#c=false;constructor(e,i,s={}){this.type=e,e&&(this.#i=true),this.#o=i,this.#t=this.#o?this.#o.#t:this,this.#a=this.#t===this?s:this.#t.#a,this.#y=this.#t===this?[]:this.#t.#y,e==="!"&&!this.#t.#u&&this.#y.push(this),this.#v=this.#o?this.#o.#r.length:0;}get hasMagic(){if(this.#i!==void 0)return this.#i;for(let e of this.#r)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#i=true;return this.#i}toString(){return this.#p!==void 0?this.#p:this.type?this.#p=this.type+"("+this.#r.map(e=>String(e)).join("|")+")":this.#p=this.#r.map(e=>String(e)).join("")}#l(){if(this!==this.#t)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=true;let e;for(;e=this.#y.pop();){if(e.type!=="!")continue;let i=e,s=i.#o;for(;s;){for(let r=i.#v+1;!s.type&&r<s.#r.length;r++)for(let n of e.#r){if(typeof n=="string")throw new Error("string part in extglob AST??");n.copyIn(s.#r[r]);}i=s,s=i.#o;}}return this}push(...e){for(let i of e)if(i!==""){if(typeof i!="string"&&!(i instanceof B&&i.#o===this))throw new Error("invalid part: "+i);this.#r.push(i);}}toJSON(){let e=this.type===null?this.#r.slice().map(i=>typeof i=="string"?i:i.toJSON()):[this.type,...this.#r.map(i=>i.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#u&&this.#o?.type==="!")&&e.push({}),e}isStart(){if(this.#t===this)return true;if(!this.#o?.isStart())return false;if(this.#v===0)return true;let e=this.#o;for(let i=0;i<this.#v;i++){let s=e.#r[i];if(!(s instanceof B&&s.type==="!"))return false}return true}isEnd(){if(this.#t===this||this.#o?.type==="!")return true;if(!this.#o?.isEnd())return false;if(!this.type)return this.#o?.isEnd();let e=this.#o?this.#o.#r.length:0;return this.#v===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this));}clone(e){let i=new B(this.type,e);for(let s of this.#r)i.copyIn(s);return i}static#s(e,i,s,r){let n=false,o=false,a=-1,l=false;if(i.type===null){let d=s,g="";for(;d<e.length;){let m=e.charAt(d++);if(n||m==="\\"){n=!n,g+=m;continue}if(o){d===a+1?(m==="^"||m==="!")&&(l=true):m==="]"&&!(d===a+2&&l)&&(o=false),g+=m;continue}else if(m==="["){o=true,a=d,l=false,g+=m;continue}if(!r.noext&&oi(m)&&e.charAt(d)==="("){i.push(g),g="";let b=new B(m,i);d=B.#s(e,b,d,r),i.push(b);continue}g+=m;}return i.push(g),d}let h=s+1,c=new B(null,i),u=[],f="";for(;h<e.length;){let d=e.charAt(h++);if(n||d==="\\"){n=!n,f+=d;continue}if(o){h===a+1?(d==="^"||d==="!")&&(l=true):d==="]"&&!(h===a+2&&l)&&(o=false),f+=d;continue}else if(d==="["){o=true,a=h,l=false,f+=d;continue}if(oi(d)&&e.charAt(h)==="("){c.push(f),f="";let g=new B(d,c);c.push(g),h=B.#s(e,g,h,r);continue}if(d==="|"){c.push(f),f="",u.push(c),c=new B(null,i);continue}if(d===")")return f===""&&i.#r.length===0&&(i.#c=true),c.push(f),f="",i.push(...u,c),h;f+=d;}return i.type=null,i.#i=void 0,i.#r=[e.substring(s-1)],h}static fromGlob(e,i={}){let s=new B(null,void 0,i);return B.#s(e,s,0,i),s}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let e=this.toString(),[i,s,r,n]=this.toRegExpSource();if(!(r||this.#i||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return s;let o=(this.#a.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${i}$`,o),{_src:i,_glob:e})}get options(){return this.#a}toRegExpSource(e){let i=e??!!this.#a.dot;if(this.#t===this&&this.#l(),!this.type){let l=this.isStart()&&this.isEnd()&&!this.#r.some(f=>typeof f!="string"),h=this.#r.map(f=>{let[d,g,m,b]=typeof f=="string"?B.#S(f,this.#i,l):f.toRegExpSource(e);return this.#i=this.#i||m,this.#n=this.#n||b,d}).join(""),c="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&Xo.has(this.#r[0]))){let f=Qo,d=i&&f.has(h.charAt(0))||h.startsWith("\\.")&&f.has(h.charAt(2))||h.startsWith("\\.\\.")&&f.has(h.charAt(4)),g=!i&&!e&&f.has(h.charAt(0));c=d?Jo:g?Wt:"";}let u="";return this.isEnd()&&this.#t.#u&&this.#o?.type==="!"&&(u="(?:$|\\/)"),[c+h+u,vt(h),this.#i=!!this.#i,this.#n]}let s=this.type==="*"||this.type==="+",r=this.type==="!"?"(?:(?!(?:":"(?:",n=this.#f(i);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){let l=this.toString();return this.#r=[l],this.type=null,this.#i=void 0,[l,vt(this.toString()),false,false]}let o=!s||e||i||!Wt?"":this.#f(true);o===n&&(o=""),o&&(n=`(?:${n})(?:${o})*?`);let a="";if(this.type==="!"&&this.#c)a=(this.isStart()&&!i?Wt:"")+li;else {let l=this.type==="!"?"))"+(this.isStart()&&!i&&!e?Wt:"")+ai+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=r+n+l;}return [a,vt(n),this.#i=!!this.#i,this.#n]}#f(e){return this.#r.map(i=>{if(typeof i=="string")throw new Error("string type in extglob ast??");let[s,r,n,o]=i.toRegExpSource(e);return this.#n=this.#n||o,s}).filter(i=>!(this.isStart()&&this.isEnd())||!!i).join("|")}static#S(e,i,s=false){let r=false,n="",o=false,a=false;for(let l=0;l<e.length;l++){let h=e.charAt(l);if(r){r=false,n+=(ta.has(h)?"\\":"")+h;continue}if(h==="*"){if(a)continue;a=true,n+=s&&/^[*]+$/.test(e)?li:ai,i=true;continue}else a=false;if(h==="\\"){l===e.length-1?n+="\\\\":r=true;continue}if(h==="["){let[c,u,f,d]=Zo(e,l);if(f){n+=c,o=o||u,l+=f-1,i=i||d;continue}}if(h==="?"){n+=_e,i=true;continue}n+=ea(h);}return [n,vt(e),!!i,o]}},ls=(t,{windowsPathsNoEscape:e=false,magicalBraces:i=false}={})=>i?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),N=(t,e,i={})=>(te(e),!i.nocomment&&e.charAt(0)==="#"?false:new at(e,i).match(t)),ia=/^\*+([^+@!?\*\[\(]*)$/,sa=t=>e=>!e.startsWith(".")&&e.endsWith(t),ra=t=>e=>e.endsWith(t),na=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),oa=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),aa=/^\*+\.\*+$/,la=t=>!t.startsWith(".")&&t.includes("."),ha=t=>t!=="."&&t!==".."&&t.includes("."),ua=/^\.\*+$/,ca=t=>t!=="."&&t!==".."&&t.startsWith("."),pa=/^\*+$/,fa=t=>t.length!==0&&!t.startsWith("."),da=t=>t.length!==0&&t!=="."&&t!=="..",ga=/^\?+([^+@!?\*\[\(]*)?$/,ma=([t,e=""])=>{let i=hs([t]);return e?(e=e.toLowerCase(),s=>i(s)&&s.toLowerCase().endsWith(e)):i},ya=([t,e=""])=>{let i=us([t]);return e?(e=e.toLowerCase(),s=>i(s)&&s.toLowerCase().endsWith(e)):i},wa=([t,e=""])=>{let i=us([t]);return e?s=>i(s)&&s.endsWith(e):i},ba=([t,e=""])=>{let i=hs([t]);return e?s=>i(s)&&s.endsWith(e):i},hs=([t])=>{let e=t.length;return i=>i.length===e&&!i.startsWith(".")},us=([t])=>{let e=t.length;return i=>i.length===e&&i!=="."&&i!==".."},cs=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",hi={win32:{sep:"\\"},posix:{sep:"/"}},va=cs==="win32"?hi.win32.sep:hi.posix.sep;N.sep=va;var R=Symbol("globstar **");N.GLOBSTAR=R;var Sa="[^/]",ka=Sa+"*?",xa="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Ca="(?:(?!(?:\\/|^)\\.).)*?",Aa=(t,e={})=>i=>N(i,t,e);N.filter=Aa;var G=(t,e={})=>Object.assign({},t,e),Ea=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return N;let e=N;return Object.assign((i,s,r={})=>e(i,s,G(t,r)),{Minimatch:class extends e.Minimatch{constructor(i,s={}){super(i,G(t,s));}static defaults(i){return e.defaults(G(t,i)).Minimatch}},AST:class extends e.AST{constructor(i,s,r={}){super(i,s,G(t,r));}static fromGlob(i,s={}){return e.AST.fromGlob(i,G(t,s))}},unescape:(i,s={})=>e.unescape(i,G(t,s)),escape:(i,s={})=>e.escape(i,G(t,s)),filter:(i,s={})=>e.filter(i,G(t,s)),defaults:i=>e.defaults(G(t,i)),makeRe:(i,s={})=>e.makeRe(i,G(t,s)),braceExpand:(i,s={})=>e.braceExpand(i,G(t,s)),match:(i,s,r={})=>e.match(i,s,G(t,r)),sep:e.sep,GLOBSTAR:R})};N.defaults=Ea;var ps=(t,e={})=>(te(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:Bo(t,{max:e.braceExpandMax}));N.braceExpand=ps;var Oa=(t,e={})=>new at(t,e).makeRe();N.makeRe=Oa;var Ta=(t,e,i={})=>{let s=new at(e,i);return t=t.filter(r=>s.match(r)),s.options.nonull&&!t.length&&t.push(e),t};N.match=Ta;var ui=/[?*]|[+@!]\(.*?\)|\[|\]/,ja=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),at=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){te(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||cs,this.isWindows=this.platform==="win32";let i="allowWindowsEscape";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e[i]===false,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=false,this.nonegate=!!e.nonegate,this.comment=false,this.empty=false,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make();}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return true;for(let t of this.set)for(let e of t)if(typeof e!="string")return true;return false}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=true;return}if(!t){this.empty=true;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let s=this.globParts.map((r,n,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=r[0]===""&&r[1]===""&&(r[2]==="?"||!ui.test(r[2]))&&!ui.test(r[3]),l=/^[a-z]:/i.test(r[0]);if(a)return [...r.slice(0,4),...r.slice(4).map(h=>this.parse(h))];if(l)return [r[0],...r.slice(1).map(h=>this.parse(h))]}return r.map(a=>this.parse(a))});if(this.debug(this.pattern,s),this.set=s.filter(r=>r.indexOf(false)===-1),this.isWindows)for(let r=0;r<this.set.length;r++){let n=this.set[r];n[0]===""&&n[1]===""&&this.globParts[r][2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3])&&(n[2]="?");}this.debug(this.pattern,this.set);}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let s=0;s<t[i].length;s++)t[i][s]==="**"&&(t[i][s]="*");let{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let i=-1;for(;(i=e.indexOf("**",i+1))!==-1;){let s=i;for(;e[s+1]==="**";)s++;s!==i&&e.splice(i,s-i);}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((i,s)=>{let r=i[i.length-1];return s==="**"&&r==="**"?i:s===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(i.pop(),i):(i.push(s),i)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=false;do{if(e=false,!this.preserveMultipleSlashes){for(let s=1;s<t.length-1;s++){let r=t[s];s===1&&r===""&&t[0]===""||(r==="."||r==="")&&(e=true,t.splice(s,1),s--);}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=true,t.pop());}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){let s=t[i-1];s&&s!=="."&&s!==".."&&s!=="**"&&(e=true,t.splice(i-1,2),i-=2);}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=false;do{e=false;for(let i of t){let s=-1;for(;(s=i.indexOf("**",s+1))!==-1;){let n=s;for(;i[n+1]==="**";)n++;n>s&&i.splice(s+1,n-s);let o=i[s+1],a=i[s+2],l=i[s+3];if(o!==".."||!a||a==="."||a===".."||!l||l==="."||l==="..")continue;e=true,i.splice(s,1);let h=i.slice(0);h[s]="**",t.push(h),s--;}if(!this.preserveMultipleSlashes){for(let n=1;n<i.length-1;n++){let o=i[n];n===1&&o===""&&i[0]===""||(o==="."||o==="")&&(e=true,i.splice(n,1),n--);}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(e=true,i.pop());}let r=0;for(;(r=i.indexOf("..",r+1))!==-1;){let n=i[r-1];if(n&&n!=="."&&n!==".."&&n!=="**"){e=true;let o=r===1&&i[r+1]==="**"?["."]:[];i.splice(r-1,2,...o),i.length===0&&i.push(""),r-=2;}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let i=e+1;i<t.length;i++){let s=this.partsMatch(t[e],t[i],!this.preserveMultipleSlashes);if(s){t[e]=[],t[i]=s;break}}return t.filter(e=>e.length)}partsMatch(t,e,i=false){let s=0,r=0,n=[],o="";for(;s<t.length&&r<e.length;)if(t[s]===e[r])n.push(o==="b"?e[r]:t[s]),s++,r++;else if(i&&t[s]==="**"&&e[r]===t[s+1])n.push(t[s]),s++;else if(i&&e[r]==="**"&&t[s]===e[r+1])n.push(e[r]),r++;else if(t[s]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(o==="b")return false;o="a",n.push(t[s]),s++,r++;}else if(e[r]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(o==="a")return false;o="b",n.push(e[r]),s++,r++;}else return false;return t.length===e.length&&n}parseNegate(){if(this.nonegate)return;let t=this.pattern,e=false,i=0;for(let s=0;s<t.length&&t.charAt(s)==="!";s++)e=!e,i++;i&&(this.pattern=t.slice(i)),this.negate=e;}matchOne(t,e,i=false){let s=this.options;if(this.isWindows){let g=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),m=!g&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),b=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),v=!b&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),y=m?3:g?0:void 0,x=v?3:b?0:void 0;if(typeof y=="number"&&typeof x=="number"){let[w,S]=[t[y],e[x]];w.toLowerCase()===S.toLowerCase()&&(e[x]=w,x>y?e=e.slice(x):y>x&&(t=t.slice(y)));}}let{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var n=0,o=0,a=t.length,l=e.length;n<a&&o<l;n++,o++){this.debug("matchOne loop");var h=e[o],c=t[n];if(this.debug(e,h,c),h===false)return false;if(h===R){this.debug("GLOBSTAR",[e,h,c]);var u=n,f=o+1;if(f===l){for(this.debug("** at the end");n<a;n++)if(t[n]==="."||t[n]===".."||!s.dot&&t[n].charAt(0)===".")return false;return true}for(;u<a;){var d=t[u];if(this.debug(`
34
+ globstar while`,t,u,e,f,d),this.matchOne(t.slice(u),e.slice(f),i))return this.debug("globstar found match!",u,a,d),true;if(d==="."||d===".."||!s.dot&&d.charAt(0)==="."){this.debug("dot detected!",t,u,e,f);break}this.debug("globstar swallow a segment, and continue"),u++;}return !!(i&&(this.debug(`
35
+ >>> no match, partial?`,t,u,e,f),u===a))}let g;if(typeof h=="string"?(g=c===h,this.debug("string match",h,c,g)):(g=h.test(c),this.debug("pattern match",h,c,g)),!g)return false}if(n===a&&o===l)return true;if(n===a)return i;if(o===l)return n===a-1&&t[n]==="";throw new Error("wtf?")}braceExpand(){return ps(this.pattern,this.options)}parse(t){te(t);let e=this.options;if(t==="**")return R;if(t==="")return "";let i,s=null;(i=t.match(pa))?s=e.dot?da:fa:(i=t.match(ia))?s=(e.nocase?e.dot?oa:na:e.dot?ra:sa)(i[1]):(i=t.match(ga))?s=(e.nocase?e.dot?ya:ma:e.dot?wa:ba)(i):(i=t.match(aa))?s=e.dot?ha:la:(i=t.match(ua))&&(s=ca);let r=as.fromGlob(t,this.options).toMMPattern();return s&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:s}),r}makeRe(){if(this.regexp||this.regexp===false)return this.regexp;let t=this.set;if(!t.length)return this.regexp=false,this.regexp;let e=this.options,i=e.noglobstar?ka:e.dot?xa:Ca,s=new Set(e.nocase?["i"]:[]),r=t.map(a=>{let l=a.map(c=>{if(c instanceof RegExp)for(let u of c.flags.split(""))s.add(u);return typeof c=="string"?ja(c):c===R?R:c._src});l.forEach((c,u)=>{let f=l[u+1],d=l[u-1];c!==R||d===R||(d===void 0?f!==void 0&&f!==R?l[u+1]="(?:\\/|"+i+"\\/)?"+f:l[u]=i:f===void 0?l[u-1]=d+"(?:\\/|\\/"+i+")?":f!==R&&(l[u-1]=d+"(?:\\/|\\/"+i+"\\/)"+f,l[u+1]=R));});let h=l.filter(c=>c!==R);if(this.partial&&h.length>=1){let c=[];for(let u=1;u<=h.length;u++)c.push(h.slice(0,u).join("/"));return "(?:"+c.join("|")+")"}return h.join("/")}).join("|"),[n,o]=t.length>1?["(?:",")"]:["",""];r="^"+n+r+o+"$",this.partial&&(r="^(?:\\/|"+n+r.slice(1,-1)+o+")$"),this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...s].join(""));}catch{this.regexp=false;}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return false;if(this.empty)return t==="";if(t==="/"&&e)return true;let i=this.options;this.isWindows&&(t=t.split("\\").join("/"));let s=this.slashSplit(t);this.debug(this.pattern,"split",s);let r=this.set;this.debug(this.pattern,"set",r);let n=s[s.length-1];if(!n)for(let o=s.length-2;!n&&o>=0;o--)n=s[o];for(let o=0;o<r.length;o++){let a=r[o],l=s;if(i.matchBase&&a.length===1&&(l=[n]),this.matchOne(l,a,e))return i.flipNegate?true:!this.negate}return i.flipNegate?false:this.negate}static defaults(t){return N.defaults(t).Minimatch}};N.AST=as;N.Minimatch=at;N.escape=ls;N.unescape=vt;var Fa=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,fs=new Set,Me=typeof process=="object"&&process?process:{},ds=(t,e,i,s)=>{typeof Me.emitWarning=="function"?Me.emitWarning(t,e,i,s):console.error(`[${i}] ${e}: ${t}`);},ee=globalThis.AbortController,ci=globalThis.AbortSignal;if(typeof ee>"u"){ci=class{onabort;_onabort=[];reason;aborted=false;addEventListener(i,s){this._onabort.push(s);}},ee=class{constructor(){e();}signal=new ci;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=true;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i);}}};let t=Me.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=false,ds("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e));};}var Ma=t=>!fs.has(t),rt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),gs=t=>rt(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Vt:null:null,Vt=class extends Array{constructor(t){super(t),this.fill(0);}},$a=class Ft{heap;length;static#t=false;static create(e){let i=gs(e);if(!i)return [];Ft.#t=true;let s=new Ft(e,i);return Ft.#t=false,s}constructor(e,i){if(!Ft.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new i(e),this.length=0;}push(e){this.heap[this.length++]=e;}pop(){return this.heap[--this.length]}},ae=class ms{#t;#i;#n;#r;#o;#v;#y;#u;get perf(){return this.#u}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#p;#c;#l;#s;#f;#S;#b;#d;#T;#g;#C;#A;#m;#w;#k;#E;#e;#I;static unsafeExposeInternals(e){return {starts:e.#A,ttls:e.#m,autopurgeTimers:e.#w,sizes:e.#C,keyMap:e.#c,keyList:e.#l,valList:e.#s,next:e.#f,prev:e.#S,get head(){return e.#b},get tail(){return e.#d},free:e.#T,isBackgroundFetch:i=>e.#h(i),backgroundFetch:(i,s,r,n)=>e.#B(i,s,r,n),moveToTail:i=>e.#L(i),indexes:i=>e.#F(i),rindexes:i=>e.#M(i),isStale:i=>e.#x(i)}}get max(){return this.#t}get maxSize(){return this.#i}get calculatedSize(){return this.#p}get size(){return this.#a}get fetchMethod(){return this.#v}get memoMethod(){return this.#y}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#o}constructor(e){let{max:i=0,ttl:s,ttlResolution:r=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:h,onInsert:c,disposeAfter:u,noDisposeOnSet:f,noUpdateTTL:d,maxSize:g=0,maxEntrySize:m=0,sizeCalculation:b,fetchMethod:v,memoMethod:y,noDeleteOnFetchRejection:x,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:C,ignoreFetchAbort:U,perf:it}=e;if(it!==void 0&&typeof it?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#u=it??Fa,i!==0&&!rt(i))throw new TypeError("max option must be a nonnegative integer");let dt=i?gs(i):Array;if(!dt)throw new Error("invalid max value: "+i);if(this.#t=i,this.#i=g,this.maxEntrySize=m||this.#i,this.sizeCalculation=b,this.sizeCalculation){if(!this.#i&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(y!==void 0&&typeof y!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#y=y,v!==void 0&&typeof v!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#v=v,this.#E=!!v,this.#c=new Map,this.#l=new Array(i).fill(void 0),this.#s=new Array(i).fill(void 0),this.#f=new dt(i),this.#S=new dt(i),this.#b=0,this.#d=0,this.#T=$a.create(i),this.#a=0,this.#p=0,typeof h=="function"&&(this.#n=h),typeof c=="function"&&(this.#r=c),typeof u=="function"?(this.#o=u,this.#g=[]):(this.#o=void 0,this.#g=void 0),this.#k=!!this.#n,this.#I=!!this.#r,this.#e=!!this.#o,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!x,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!C,this.ignoreFetchAbort=!!U,this.maxEntrySize!==0){if(this.#i!==0&&!rt(this.#i))throw new TypeError("maxSize must be a positive integer if specified");if(!rt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#G();}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=rt(r)||r===0?r:1,this.ttlAutopurge=!!n,this.ttl=s||0,this.ttl){if(!rt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#$();}if(this.#t===0&&this.ttl===0&&this.#i===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#i){let ce="LRU_CACHE_UNBOUNDED";Ma(ce)&&(fs.add(ce),ds("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",ce,ms));}}getRemainingTTL(e){return this.#c.has(e)?1/0:0}#$(){let e=new Vt(this.#t),i=new Vt(this.#t);this.#m=e,this.#A=i;let s=this.ttlAutopurge?new Array(this.#t):void 0;this.#w=s,this.#D=(o,a,l=this.#u.now())=>{if(i[o]=a!==0?l:0,e[o]=a,s?.[o]&&(clearTimeout(s[o]),s[o]=void 0),a!==0&&s){let h=setTimeout(()=>{this.#x(o)&&this.#j(this.#l[o],"expire");},a+1);h.unref&&h.unref(),s[o]=h;}},this.#O=o=>{i[o]=e[o]!==0?this.#u.now():0;},this.#P=(o,a)=>{if(e[a]){let l=e[a],h=i[a];if(!l||!h)return;o.ttl=l,o.start=h,o.now=r||n();let c=o.now-h;o.remainingTTL=l-c;}};let r=0,n=()=>{let o=this.#u.now();if(this.ttlResolution>0){r=o;let a=setTimeout(()=>r=0,this.ttlResolution);a.unref&&a.unref();}return o};this.getRemainingTTL=o=>{let a=this.#c.get(o);if(a===void 0)return 0;let l=e[a],h=i[a];if(!l||!h)return 1/0;let c=(r||n())-h;return l-c},this.#x=o=>{let a=i[o],l=e[o];return !!l&&!!a&&(r||n())-a>l};}#O=()=>{};#P=()=>{};#D=()=>{};#x=()=>false;#G(){let e=new Vt(this.#t);this.#p=0,this.#C=e,this.#N=i=>{this.#p-=e[i],e[i]=0;},this.#W=(i,s,r,n)=>{if(this.#h(s))return 0;if(!rt(r))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(r=n(s,i),!rt(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return r},this.#R=(i,s,r)=>{if(e[i]=s,this.#i){let n=this.#i-e[i];for(;this.#p>n;)this.#z(true);}this.#p+=e[i],r&&(r.entrySize=s,r.totalCalculatedSize=this.#p);};}#N=e=>{};#R=(e,i,s)=>{};#W=(e,i,s,r)=>{if(s||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#F({allowStale:e=this.allowStale}={}){if(this.#a)for(let i=this.#d;!(!this.#_(i)||((e||!this.#x(i))&&(yield i),i===this.#b));)i=this.#S[i];}*#M({allowStale:e=this.allowStale}={}){if(this.#a)for(let i=this.#b;!(!this.#_(i)||((e||!this.#x(i))&&(yield i),i===this.#d));)i=this.#f[i];}#_(e){return e!==void 0&&this.#c.get(this.#l[e])===e}*entries(){for(let e of this.#F())this.#s[e]!==void 0&&this.#l[e]!==void 0&&!this.#h(this.#s[e])&&(yield [this.#l[e],this.#s[e]]);}*rentries(){for(let e of this.#M())this.#s[e]!==void 0&&this.#l[e]!==void 0&&!this.#h(this.#s[e])&&(yield [this.#l[e],this.#s[e]]);}*keys(){for(let e of this.#F()){let i=this.#l[e];i!==void 0&&!this.#h(this.#s[e])&&(yield i);}}*rkeys(){for(let e of this.#M()){let i=this.#l[e];i!==void 0&&!this.#h(this.#s[e])&&(yield i);}}*values(){for(let e of this.#F())this.#s[e]!==void 0&&!this.#h(this.#s[e])&&(yield this.#s[e]);}*rvalues(){for(let e of this.#M())this.#s[e]!==void 0&&!this.#h(this.#s[e])&&(yield this.#s[e]);}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,i={}){for(let s of this.#F()){let r=this.#s[s],n=this.#h(r)?r.__staleWhileFetching:r;if(n!==void 0&&e(n,this.#l[s],this))return this.get(this.#l[s],i)}}forEach(e,i=this){for(let s of this.#F()){let r=this.#s[s],n=this.#h(r)?r.__staleWhileFetching:r;n!==void 0&&e.call(i,n,this.#l[s],this);}}rforEach(e,i=this){for(let s of this.#M()){let r=this.#s[s],n=this.#h(r)?r.__staleWhileFetching:r;n!==void 0&&e.call(i,n,this.#l[s],this);}}purgeStale(){let e=false;for(let i of this.#M({allowStale:true}))this.#x(i)&&(this.#j(this.#l[i],"expire"),e=true);return e}info(e){let i=this.#c.get(e);if(i===void 0)return;let s=this.#s[i],r=this.#h(s)?s.__staleWhileFetching:s;if(r===void 0)return;let n={value:r};if(this.#m&&this.#A){let o=this.#m[i],a=this.#A[i];if(o&&a){let l=o-(this.#u.now()-a);n.ttl=l,n.start=Date.now();}}return this.#C&&(n.size=this.#C[i]),n}dump(){let e=[];for(let i of this.#F({allowStale:true})){let s=this.#l[i],r=this.#s[i],n=this.#h(r)?r.__staleWhileFetching:r;if(n===void 0||s===void 0)continue;let o={value:n};if(this.#m&&this.#A){o.ttl=this.#m[i];let a=this.#u.now()-this.#A[i];o.start=Math.floor(Date.now()-a);}this.#C&&(o.size=this.#C[i]),e.unshift([s,o]);}return e}load(e){this.clear();for(let[i,s]of e){if(s.start){let r=Date.now()-s.start;s.start=this.#u.now()-r;}this.set(i,s.value,s);}}set(e,i,s={}){if(i===void 0)return this.delete(e),this;let{ttl:r=this.ttl,start:n,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:l}=s,{noUpdateTTL:h=this.noUpdateTTL}=s,c=this.#W(e,i,s.size||0,a);if(this.maxEntrySize&&c>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=true),this.#j(e,"set"),this;let u=this.#a===0?void 0:this.#c.get(e);if(u===void 0)u=this.#a===0?this.#d:this.#T.length!==0?this.#T.pop():this.#a===this.#t?this.#z(false):this.#a,this.#l[u]=e,this.#s[u]=i,this.#c.set(e,u),this.#f[this.#d]=u,this.#S[u]=this.#d,this.#d=u,this.#a++,this.#R(u,c,l),l&&(l.set="add"),h=false,this.#I&&this.#r?.(i,e,"add");else {this.#L(u);let f=this.#s[u];if(i!==f){if(this.#E&&this.#h(f)){f.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:d}=f;d!==void 0&&!o&&(this.#k&&this.#n?.(d,e,"set"),this.#e&&this.#g?.push([d,e,"set"]));}else o||(this.#k&&this.#n?.(f,e,"set"),this.#e&&this.#g?.push([f,e,"set"]));if(this.#N(u),this.#R(u,c,l),this.#s[u]=i,l){l.set="replace";let d=f&&this.#h(f)?f.__staleWhileFetching:f;d!==void 0&&(l.oldValue=d);}}else l&&(l.set="update");this.#I&&this.onInsert?.(i,e,i===f?"update":"replace");}if(r!==0&&!this.#m&&this.#$(),this.#m&&(h||this.#D(u,r,n),l&&this.#P(l,u)),!o&&this.#e&&this.#g){let f=this.#g,d;for(;d=f?.shift();)this.#o?.(...d);}return this}pop(){try{for(;this.#a;){let e=this.#s[this.#b];if(this.#z(!0),this.#h(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#e&&this.#g){let e=this.#g,i;for(;i=e?.shift();)this.#o?.(...i);}}}#z(e){let i=this.#b,s=this.#l[i],r=this.#s[i];return this.#E&&this.#h(r)?r.__abortController.abort(new Error("evicted")):(this.#k||this.#e)&&(this.#k&&this.#n?.(r,s,"evict"),this.#e&&this.#g?.push([r,s,"evict"])),this.#N(i),this.#w?.[i]&&(clearTimeout(this.#w[i]),this.#w[i]=void 0),e&&(this.#l[i]=void 0,this.#s[i]=void 0,this.#T.push(i)),this.#a===1?(this.#b=this.#d=0,this.#T.length=0):this.#b=this.#f[i],this.#c.delete(s),this.#a--,i}has(e,i={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:r}=i,n=this.#c.get(e);if(n!==void 0){let o=this.#s[n];if(this.#h(o)&&o.__staleWhileFetching===void 0)return false;if(this.#x(n))r&&(r.has="stale",this.#P(r,n));else return s&&this.#O(n),r&&(r.has="hit",this.#P(r,n)),true}else r&&(r.has="miss");return false}peek(e,i={}){let{allowStale:s=this.allowStale}=i,r=this.#c.get(e);if(r===void 0||!s&&this.#x(r))return;let n=this.#s[r];return this.#h(n)?n.__staleWhileFetching:n}#B(e,i,s,r){let n=i===void 0?void 0:this.#s[i];if(this.#h(n))return n;let o=new ee,{signal:a}=s;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let l={signal:o.signal,options:s,context:r},h=(m,b=false)=>{let{aborted:v}=o.signal,y=s.ignoreFetchAbort&&m!==void 0,x=s.ignoreFetchAbort||!!(s.allowStaleOnFetchAbort&&m!==void 0);if(s.status&&(v&&!b?(s.status.fetchAborted=true,s.status.fetchError=o.signal.reason,y&&(s.status.fetchAbortIgnored=true)):s.status.fetchResolved=true),v&&!y&&!b)return u(o.signal.reason,x);let w=d,S=this.#s[i];return (S===d||y&&b&&S===void 0)&&(m===void 0?w.__staleWhileFetching!==void 0?this.#s[i]=w.__staleWhileFetching:this.#j(e,"fetch"):(s.status&&(s.status.fetchUpdated=true),this.set(e,m,l.options))),m},c=m=>(s.status&&(s.status.fetchRejected=true,s.status.fetchError=m),u(m,false)),u=(m,b)=>{let{aborted:v}=o.signal,y=v&&s.allowStaleOnFetchAbort,x=y||s.allowStaleOnFetchRejection,w=x||s.noDeleteOnFetchRejection,S=d;if(this.#s[i]===d&&(!w||!b&&S.__staleWhileFetching===void 0?this.#j(e,"fetch"):y||(this.#s[i]=S.__staleWhileFetching)),x)return s.status&&S.__staleWhileFetching!==void 0&&(s.status.returnedStale=true),S.__staleWhileFetching;if(S.__returned===S)throw m},f=(m,b)=>{let v=this.#v?.(e,n,l);v&&v instanceof Promise&&v.then(y=>m(y===void 0?void 0:y),b),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(m(void 0),s.allowStaleOnFetchAbort&&(m=y=>h(y,true)));});};s.status&&(s.status.fetchDispatched=true);let d=new Promise(f).then(h,c),g=Object.assign(d,{__abortController:o,__staleWhileFetching:n,__returned:void 0});return i===void 0?(this.set(e,g,{...l.options,status:void 0}),i=this.#c.get(e)):this.#s[i]=g,g}#h(e){if(!this.#E)return false;let i=e;return !!i&&i instanceof Promise&&i.hasOwnProperty("__staleWhileFetching")&&i.__abortController instanceof ee}async fetch(e,i={}){let{allowStale:s=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:m,forceRefresh:b=false,status:v,signal:y}=i;if(!this.#E)return v&&(v.fetch="get"),this.get(e,{allowStale:s,updateAgeOnGet:r,noDeleteOnStaleGet:n,status:v});let x={allowStale:s,updateAgeOnGet:r,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:h,noUpdateTTL:c,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:g,ignoreFetchAbort:d,status:v,signal:y},w=this.#c.get(e);if(w===void 0){v&&(v.fetch="miss");let S=this.#B(e,w,x,m);return S.__returned=S}else {let S=this.#s[w];if(this.#h(S)){let dt=s&&S.__staleWhileFetching!==void 0;return v&&(v.fetch="inflight",dt&&(v.returnedStale=true)),dt?S.__staleWhileFetching:S.__returned=S}let C=this.#x(w);if(!b&&!C)return v&&(v.fetch="hit"),this.#L(w),r&&this.#O(w),v&&this.#P(v,w),S;let U=this.#B(e,w,x,m),it=U.__staleWhileFetching!==void 0&&s;return v&&(v.fetch=C?"stale":"refresh",it&&C&&(v.returnedStale=true)),it?U.__staleWhileFetching:U.__returned=U}}async forceFetch(e,i={}){let s=await this.fetch(e,i);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(e,i={}){let s=this.#y;if(!s)throw new Error("no memoMethod provided to constructor");let{context:r,forceRefresh:n,...o}=i,a=this.get(e,o);if(!n&&a!==void 0)return a;let l=s(e,a,{options:o,context:r});return this.set(e,l,o),l}get(e,i={}){let{allowStale:s=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:o}=i,a=this.#c.get(e);if(a!==void 0){let l=this.#s[a],h=this.#h(l);return o&&this.#P(o,a),this.#x(a)?(o&&(o.get="stale"),h?(o&&s&&l.__staleWhileFetching!==void 0&&(o.returnedStale=true),s?l.__staleWhileFetching:void 0):(n||this.#j(e,"expire"),o&&s&&(o.returnedStale=true),s?l:void 0)):(o&&(o.get="hit"),h?l.__staleWhileFetching:(this.#L(a),r&&this.#O(a),l))}else o&&(o.get="miss");}#U(e,i){this.#S[i]=e,this.#f[e]=i;}#L(e){e!==this.#d&&(e===this.#b?this.#b=this.#f[e]:this.#U(this.#S[e],this.#f[e]),this.#U(this.#d,e),this.#d=e);}delete(e){return this.#j(e,"delete")}#j(e,i){let s=false;if(this.#a!==0){let r=this.#c.get(e);if(r!==void 0)if(this.#w?.[r]&&(clearTimeout(this.#w?.[r]),this.#w[r]=void 0),s=true,this.#a===1)this.#Y(i);else {this.#N(r);let n=this.#s[r];if(this.#h(n)?n.__abortController.abort(new Error("deleted")):(this.#k||this.#e)&&(this.#k&&this.#n?.(n,e,i),this.#e&&this.#g?.push([n,e,i])),this.#c.delete(e),this.#l[r]=void 0,this.#s[r]=void 0,r===this.#d)this.#d=this.#S[r];else if(r===this.#b)this.#b=this.#f[r];else {let o=this.#S[r];this.#f[o]=this.#f[r];let a=this.#f[r];this.#S[a]=this.#S[r];}this.#a--,this.#T.push(r);}}if(this.#e&&this.#g?.length){let r=this.#g,n;for(;n=r?.shift();)this.#o?.(...n);}return s}clear(){return this.#Y("delete")}#Y(e){for(let i of this.#M({allowStale:true})){let s=this.#s[i];if(this.#h(s))s.__abortController.abort(new Error("deleted"));else {let r=this.#l[i];this.#k&&this.#n?.(s,r,e),this.#e&&this.#g?.push([s,r,e]);}}if(this.#c.clear(),this.#s.fill(void 0),this.#l.fill(void 0),this.#m&&this.#A){this.#m.fill(0),this.#A.fill(0);for(let i of this.#w??[])i!==void 0&&clearTimeout(i);this.#w?.fill(void 0);}if(this.#C&&this.#C.fill(0),this.#b=0,this.#d=0,this.#T.length=0,this.#p=0,this.#a=0,this.#e&&this.#g){let i=this.#g,s;for(;s=i?.shift();)this.#o?.(...s);}}},pi=typeof process=="object"&&process?process:{stdout:null,stderr:null},Pa=t=>!!t&&typeof t=="object"&&(t instanceof ie||t instanceof Fi||Ia(t)||Ra(t)),Ia=t=>!!t&&typeof t=="object"&&t instanceof EventEmitter&&typeof t.pipe=="function"&&t.pipe!==Fi.Writable.prototype.pipe,Ra=t=>!!t&&typeof t=="object"&&t instanceof EventEmitter&&typeof t.write=="function"&&typeof t.end=="function",X=Symbol("EOF"),tt=Symbol("maybeEmitEnd"),st=Symbol("emittedEnd"),_t=Symbol("emittingEnd"),xt=Symbol("emittedError"),zt=Symbol("closed"),fi=Symbol("read"),Bt=Symbol("flush"),di=Symbol("flushChunk"),K=Symbol("encoding"),gt=Symbol("decoder"),T=Symbol("flowing"),Ct=Symbol("paused"),yt=Symbol("resume"),j=Symbol("buffer"),I=Symbol("pipes"),F=Symbol("bufferLength"),me=Symbol("bufferPush"),Ut=Symbol("bufferShift"),M=Symbol("objectMode"),A=Symbol("destroyed"),ye=Symbol("error"),we=Symbol("emitData"),gi=Symbol("emitEnd"),be=Symbol("emitEnd2"),H=Symbol("async"),ve=Symbol("abort"),Gt=Symbol("aborted"),At=Symbol("signal"),ut=Symbol("dataListeners"),z=Symbol("discarded"),Et=t=>Promise.resolve().then(t),La=t=>t(),Na=t=>t==="end"||t==="finish"||t==="prefinish",Da=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,Wa=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),ys=class{src;dest;opts;ondrain;constructor(t,e,i){this.src=t,this.dest=e,this.opts=i,this.ondrain=()=>t[yt](),this.dest.on("drain",this.ondrain);}unpipe(){this.dest.removeListener("drain",this.ondrain);}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end();}},_a=class extends ys{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe();}constructor(t,e,i){super(t,e,i),this.proxyErrors=s=>this.dest.emit("error",s),t.on("error",this.proxyErrors);}},za=t=>!!t.objectMode,Ba=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",ie=class extends EventEmitter{[T]=false;[Ct]=false;[I]=[];[j]=[];[M];[K];[H];[gt];[X]=false;[st]=false;[_t]=false;[zt]=false;[xt]=null;[F]=0;[A]=false;[At];[Gt]=false;[ut]=0;[z]=false;writable=true;readable=true;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&typeof e.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");za(e)?(this[M]=true,this[K]=null):Ba(e)?(this[K]=e.encoding,this[M]=false):(this[M]=false,this[K]=null),this[H]=!!e.async,this[gt]=this[K]?new StringDecoder(this[K]):null,e&&e.debugExposeBuffer===true&&Object.defineProperty(this,"buffer",{get:()=>this[j]}),e&&e.debugExposePipes===true&&Object.defineProperty(this,"pipes",{get:()=>this[I]});let{signal:i}=e;i&&(this[At]=i,i.aborted?this[ve]():i.addEventListener("abort",()=>this[ve]()));}get bufferLength(){return this[F]}get encoding(){return this[K]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[M]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[H]}set async(t){this[H]=this[H]||!!t;}[ve](){this[Gt]=true,this.emit("abort",this[At]?.reason),this.destroy(this[At]?.reason);}get aborted(){return this[Gt]}set aborted(t){}write(t,e,i){if(this[Gt])return false;if(this[X])throw new Error("write after end");if(this[A])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),true;typeof e=="function"&&(i=e,e="utf8"),e||(e="utf8");let s=this[H]?Et:La;if(!this[M]&&!Buffer.isBuffer(t)){if(Wa(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(Da(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[M]?(this[T]&&this[F]!==0&&this[Bt](true),this[T]?this.emit("data",t):this[me](t),this[F]!==0&&this.emit("readable"),i&&s(i),this[T]):t.length?(typeof t=="string"&&!(e===this[K]&&!this[gt]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[K]&&(t=this[gt].write(t)),this[T]&&this[F]!==0&&this[Bt](true),this[T]?this.emit("data",t):this[me](t),this[F]!==0&&this.emit("readable"),i&&s(i),this[T]):(this[F]!==0&&this.emit("readable"),i&&s(i),this[T])}read(t){if(this[A])return null;if(this[z]=false,this[F]===0||t===0||t&&t>this[F])return this[tt](),null;this[M]&&(t=null),this[j].length>1&&!this[M]&&(this[j]=[this[K]?this[j].join(""):Buffer.concat(this[j],this[F])]);let e=this[fi](t||null,this[j][0]);return this[tt](),e}[fi](t,e){if(this[M])this[Ut]();else {let i=e;t===i.length||t===null?this[Ut]():typeof i=="string"?(this[j][0]=i.slice(t),e=i.slice(0,t),this[F]-=t):(this[j][0]=i.subarray(t),e=i.subarray(0,t),this[F]-=t);}return this.emit("data",e),!this[j].length&&!this[X]&&this.emit("drain"),e}end(t,e,i){return typeof t=="function"&&(i=t,t=void 0),typeof e=="function"&&(i=e,e="utf8"),t!==void 0&&this.write(t,e),i&&this.once("end",i),this[X]=true,this.writable=false,(this[T]||!this[Ct])&&this[tt](),this}[yt](){this[A]||(!this[ut]&&!this[I].length&&(this[z]=true),this[Ct]=false,this[T]=true,this.emit("resume"),this[j].length?this[Bt]():this[X]?this[tt]():this.emit("drain"));}resume(){return this[yt]()}pause(){this[T]=false,this[Ct]=true,this[z]=false;}get destroyed(){return this[A]}get flowing(){return this[T]}get paused(){return this[Ct]}[me](t){this[M]?this[F]+=1:this[F]+=t.length,this[j].push(t);}[Ut](){return this[M]?this[F]-=1:this[F]-=this[j][0].length,this[j].shift()}[Bt](t=false){do;while(this[di](this[Ut]())&&this[j].length);!t&&!this[j].length&&!this[X]&&this.emit("drain");}[di](t){return this.emit("data",t),this[T]}pipe(t,e){if(this[A])return t;this[z]=false;let i=this[st];return e=e||{},t===pi.stdout||t===pi.stderr?e.end=false:e.end=e.end!==false,e.proxyErrors=!!e.proxyErrors,i?e.end&&t.end():(this[I].push(e.proxyErrors?new _a(this,t,e):new ys(this,t,e)),this[H]?Et(()=>this[yt]()):this[yt]()),t}unpipe(t){let e=this[I].find(i=>i.dest===t);e&&(this[I].length===1?(this[T]&&this[ut]===0&&(this[T]=false),this[I]=[]):this[I].splice(this[I].indexOf(e),1),e.unpipe());}addListener(t,e){return this.on(t,e)}on(t,e){let i=super.on(t,e);if(t==="data")this[z]=false,this[ut]++,!this[I].length&&!this[T]&&this[yt]();else if(t==="readable"&&this[F]!==0)super.emit("readable");else if(Na(t)&&this[st])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[xt]){let s=e;this[H]?Et(()=>s.call(this,this[xt])):s.call(this,this[xt]);}return i}removeListener(t,e){return this.off(t,e)}off(t,e){let i=super.off(t,e);return t==="data"&&(this[ut]=this.listeners("data").length,this[ut]===0&&!this[z]&&!this[I].length&&(this[T]=false)),i}removeAllListeners(t){let e=super.removeAllListeners(t);return (t==="data"||t===void 0)&&(this[ut]=0,!this[z]&&!this[I].length&&(this[T]=false)),e}get emittedEnd(){return this[st]}[tt](){!this[_t]&&!this[st]&&!this[A]&&this[j].length===0&&this[X]&&(this[_t]=true,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[zt]&&this.emit("close"),this[_t]=false);}emit(t,...e){let i=e[0];if(t!=="error"&&t!=="close"&&t!==A&&this[A])return false;if(t==="data")return !this[M]&&!i?false:this[H]?(Et(()=>this[we](i)),true):this[we](i);if(t==="end")return this[gi]();if(t==="close"){if(this[zt]=true,!this[st]&&!this[A])return false;let r=super.emit("close");return this.removeAllListeners("close"),r}else if(t==="error"){this[xt]=i,super.emit(ye,i);let r=!this[At]||this.listeners("error").length?super.emit("error",i):false;return this[tt](),r}else if(t==="resume"){let r=super.emit("resume");return this[tt](),r}else if(t==="finish"||t==="prefinish"){let r=super.emit(t);return this.removeAllListeners(t),r}let s=super.emit(t,...e);return this[tt](),s}[we](t){for(let i of this[I])i.dest.write(t)===false&&this.pause();let e=this[z]?false:super.emit("data",t);return this[tt](),e}[gi](){return this[st]?false:(this[st]=true,this.readable=false,this[H]?(Et(()=>this[be]()),true):this[be]())}[be](){if(this[gt]){let e=this[gt].end();if(e){for(let i of this[I])i.dest.write(e);this[z]||super.emit("data",e);}}for(let e of this[I])e.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[M]||(t.dataLength=0);let e=this.promise();return this.on("data",i=>{t.push(i),this[M]||(t.dataLength+=i.length);}),await e,t}async concat(){if(this[M])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[K]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(A,()=>e(new Error("stream destroyed"))),this.on("error",i=>e(i)),this.on("end",()=>t());})}[Symbol.asyncIterator](){this[z]=false;let t=false,e=async()=>(this.pause(),t=true,{value:void 0,done:true});return {next:()=>{if(t)return e();let i=this.read();if(i!==null)return Promise.resolve({done:false,value:i});if(this[X])return e();let s,r,n=h=>{this.off("data",o),this.off("end",a),this.off(A,l),e(),r(h);},o=h=>{this.off("error",n),this.off("end",a),this.off(A,l),this.pause(),s({value:h,done:!!this[X]});},a=()=>{this.off("error",n),this.off("data",o),this.off(A,l),e(),s({done:true,value:void 0});},l=()=>n(new Error("stream destroyed"));return new Promise((h,c)=>{r=c,s=h,this.once(A,l),this.once("error",n),this.once("end",a),this.once("data",o);})},throw:e,return:e,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[z]=false;let t=false,e=()=>(this.pause(),this.off(ye,e),this.off(A,e),this.off("end",e),t=true,{done:true,value:void 0}),i=()=>{if(t)return e();let s=this.read();return s===null?e():{done:false,value:s}};return this.once("end",e),this.once(ye,e),this.once(A,e),{next:i,throw:e,return:e,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(t){if(this[A])return t?this.emit("error",t):this.emit(A),this;this[A]=true,this[z]=true,this[j].length=0,this[F]=0;let e=this;return typeof e.close=="function"&&!this[zt]&&e.close(),t?this.emit("error",t):this.emit(A),this}static get isStream(){return Pa}},Ua=realpathSync.native,Mt={lstatSync:lstatSync,readdir:readdir$1,readdirSync:readdirSync,readlinkSync:readlinkSync,realpathSync:Ua,promises:{lstat:lstat,readdir:readdir,readlink:readlink,realpath:realpath}},ws=t=>!t||t===Mt||t===lt?Mt:{...Mt,...t,promises:{...Mt.promises,...t.promises||{}}},bs=/^\\\\\?\\([a-z]:)\\?$/i,Ga=t=>t.replace(/\//g,"\\").replace(bs,"$1\\"),Ya=/[\\\/]/,V=0,vs=1,Ss=2,J=4,ks=6,xs=8,ct=10,Cs=12,Y=15,Ot=~Y,Se=16,mi=32,$t=64,Z=128,Yt=256,Kt=512,yi=$t|Z|Kt,qa=1023,ke=t=>t.isFile()?xs:t.isDirectory()?J:t.isSymbolicLink()?ct:t.isCharacterDevice()?Ss:t.isBlockDevice()?ks:t.isSocket()?Cs:t.isFIFO()?vs:V,wi=new ae({max:2**12}),Pt=t=>{let e=wi.get(t);if(e)return e;let i=t.normalize("NFKD");return wi.set(t,i),i},bi=new ae({max:2**12}),qt=t=>{let e=bi.get(t);if(e)return e;let i=Pt(t.toLowerCase());return bi.set(t,i),i},vi=class extends ae{constructor(){super({max:256});}},Va=class extends ae{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1});}},As=Symbol("PathScurry setAsCwd"),D=class{name;root;roots;parent;nocase;isCWD=false;#t;#i;get dev(){return this.#i}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#o;get uid(){return this.#o}#v;get gid(){return this.#v}#y;get rdev(){return this.#y}#u;get blksize(){return this.#u}#a;get ino(){return this.#a}#p;get size(){return this.#p}#c;get blocks(){return this.#c}#l;get atimeMs(){return this.#l}#s;get mtimeMs(){return this.#s}#f;get ctimeMs(){return this.#f}#S;get birthtimeMs(){return this.#S}#b;get atime(){return this.#b}#d;get mtime(){return this.#d}#T;get ctime(){return this.#T}#g;get birthtime(){return this.#g}#C;#A;#m;#w;#k;#E;#e;#I;#$;#O;get parentPath(){return (this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=V,i,s,r,n,o){this.name=t,this.#C=r?qt(t):Pt(t),this.#e=e&qa,this.nocase=r,this.roots=s,this.root=i||this,this.#I=n,this.#m=o.fullpath,this.#k=o.relative,this.#E=o.relativePosix,this.parent=o.parent,this.parent?this.#t=this.parent.#t:this.#t=ws(o.fs);}depth(){return this.#A!==void 0?this.#A:this.parent?this.#A=this.parent.depth()+1:this.#A=0}childrenCache(){return this.#I}resolve(t){if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#P(i):this.#P(i)}#P(t){let e=this;for(let i of t)e=e.child(i);return e}children(){let t=this.#I.get(this);if(t)return t;let e=Object.assign([],{provisional:0});return this.#I.set(this,e),this.#e&=~Se,e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let i=this.children(),s=this.nocase?qt(t):Pt(t);for(let a of i)if(a.#C===s)return a;let r=this.parent?this.sep:"",n=this.#m?this.#m+r+t:void 0,o=this.newChild(t,V,{...e,parent:this,fullpath:n});return this.canReaddir()||(o.#e|=Z),i.push(o),o}relative(){if(this.isCWD)return "";if(this.#k!==void 0)return this.#k;let t=this.name,e=this.parent;if(!e)return this.#k=this.name;let i=e.relative();return i+(!i||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return "";if(this.#E!==void 0)return this.#E;let t=this.name,e=this.parent;if(!e)return this.#E=this.fullpathPosix();let i=e.relativePosix();return i+(!i||!e.parent?"":"/")+t}fullpath(){if(this.#m!==void 0)return this.#m;let t=this.name,e=this.parent;if(!e)return this.#m=this.name;let i=e.fullpath()+(e.parent?this.sep:"")+t;return this.#m=i}fullpathPosix(){if(this.#w!==void 0)return this.#w;if(this.sep==="/")return this.#w=this.fullpath();if(!this.parent){let s=this.fullpath().replace(/\\/g,"/");return /^[a-z]:\//i.test(s)?this.#w=`//?/${s}`:this.#w=s}let t=this.parent,e=t.fullpathPosix(),i=e+(!e||!t.parent?"":"/")+this.name;return this.#w=i}isUnknown(){return (this.#e&Y)===V}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return (this.#e&Y)===xs}isDirectory(){return (this.#e&Y)===J}isCharacterDevice(){return (this.#e&Y)===Ss}isBlockDevice(){return (this.#e&Y)===ks}isFIFO(){return (this.#e&Y)===vs}isSocket(){return (this.#e&Y)===Cs}isSymbolicLink(){return (this.#e&ct)===ct}lstatCached(){return this.#e&mi?this:void 0}readlinkCached(){return this.#$}realpathCached(){return this.#O}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#$)return true;if(!this.parent)return false;let t=this.#e&Y;return !(t!==V&&t!==ct||this.#e&Yt||this.#e&Z)}calledReaddir(){return !!(this.#e&Se)}isENOENT(){return !!(this.#e&Z)}isNamed(t){return this.nocase?this.#C===qt(t):this.#C===Pt(t)}async readlink(){let t=this.#$;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=await this.#t.promises.readlink(this.fullpath()),i=(await this.parent.realpath())?.resolve(e);if(i)return this.#$=i}catch(e){this.#M(e.code);return}}readlinkSync(){let t=this.#$;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=this.#t.readlinkSync(this.fullpath()),i=this.parent.realpathSync()?.resolve(e);if(i)return this.#$=i}catch(e){this.#M(e.code);return}}#D(t){this.#e|=Se;for(let e=t.provisional;e<t.length;e++){let i=t[e];i&&i.#x();}}#x(){this.#e&Z||(this.#e=(this.#e|Z)&Ot,this.#G());}#G(){let t=this.children();t.provisional=0;for(let e of t)e.#x();}#N(){this.#e|=Kt,this.#R();}#R(){if(this.#e&$t)return;let t=this.#e;(t&Y)===J&&(t&=Ot),this.#e=t|$t,this.#G();}#W(t=""){t==="ENOTDIR"||t==="EPERM"?this.#R():t==="ENOENT"?this.#x():this.children().provisional=0;}#F(t=""){t==="ENOTDIR"?this.parent.#R():t==="ENOENT"&&this.#x();}#M(t=""){let e=this.#e;e|=Yt,t==="ENOENT"&&(e|=Z),(t==="EINVAL"||t==="UNKNOWN")&&(e&=Ot),this.#e=e,t==="ENOTDIR"&&this.parent&&this.parent.#R();}#_(t,e){return this.#B(t,e)||this.#z(t,e)}#z(t,e){let i=ke(t),s=this.newChild(t.name,i,{parent:this}),r=s.#e&Y;return r!==J&&r!==ct&&r!==V&&(s.#e|=$t),e.unshift(s),e.provisional++,s}#B(t,e){for(let i=e.provisional;i<e.length;i++){let s=e[i];if((this.nocase?qt(t.name):Pt(t.name))===s.#C)return this.#h(t,s,i,e)}}#h(t,e,i,s){let r=e.name;return e.#e=e.#e&Ot|ke(t),r!==t.name&&(e.name=t.name),i!==s.provisional&&(i===s.length-1?s.pop():s.splice(i,1),s.unshift(e)),s.provisional++,e}async lstat(){if((this.#e&Z)===0)try{return this.#U(await this.#t.promises.lstat(this.fullpath())),this}catch(t){this.#F(t.code);}}lstatSync(){if((this.#e&Z)===0)try{return this.#U(this.#t.lstatSync(this.fullpath())),this}catch(t){this.#F(t.code);}}#U(t){let{atime:e,atimeMs:i,birthtime:s,birthtimeMs:r,blksize:n,blocks:o,ctime:a,ctimeMs:l,dev:h,gid:c,ino:u,mode:f,mtime:d,mtimeMs:g,nlink:m,rdev:b,size:v,uid:y}=t;this.#b=e,this.#l=i,this.#g=s,this.#S=r,this.#u=n,this.#c=o,this.#T=a,this.#f=l,this.#i=h,this.#v=c,this.#a=u,this.#n=f,this.#d=d,this.#s=g,this.#r=m,this.#y=b,this.#p=v,this.#o=y;let x=ke(t);this.#e=this.#e&Ot|x|mi,x!==V&&x!==J&&x!==ct&&(this.#e|=$t);}#L=[];#j=false;#Y(t){this.#j=false;let e=this.#L.slice();this.#L.length=0,e.forEach(i=>i(null,t));}readdirCB(t,e=false){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let i=this.children();if(this.calledReaddir()){let r=i.slice(0,i.provisional);e?t(null,r):queueMicrotask(()=>t(null,r));return}if(this.#L.push(t),this.#j)return;this.#j=true;let s=this.fullpath();this.#t.readdir(s,{withFileTypes:true},(r,n)=>{if(r)this.#W(r.code),i.provisional=0;else {for(let o of n)this.#_(o,i);this.#D(i);}this.#Y(i.slice(0,i.provisional));});}#q;async readdir(){if(!this.canReaddir())return [];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(this.#q)await this.#q;else {let i=()=>{};this.#q=new Promise(s=>i=s);try{for(let s of await this.#t.promises.readdir(e,{withFileTypes:!0}))this.#_(s,t);this.#D(t);}catch(s){this.#W(s.code),t.provisional=0;}this.#q=void 0,i();}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return [];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let i of this.#t.readdirSync(e,{withFileTypes:!0}))this.#_(i,t);this.#D(t);}catch(i){this.#W(i.code),t.provisional=0;}return t.slice(0,t.provisional)}canReaddir(){if(this.#e&yi)return false;let t=Y&this.#e;return t===V||t===J||t===ct}shouldWalk(t,e){return (this.#e&J)===J&&!(this.#e&yi)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#O)return this.#O;if(!((Kt|Yt|Z)&this.#e))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#O=this.resolve(t)}catch{this.#N();}}realpathSync(){if(this.#O)return this.#O;if(!((Kt|Yt|Z)&this.#e))try{let t=this.#t.realpathSync(this.fullpath());return this.#O=this.resolve(t)}catch{this.#N();}}[As](t){if(t===this)return;t.isCWD=false,this.isCWD=true;let e=new Set([]),i=[],s=this;for(;s&&s.parent;)e.add(s),s.#k=i.join(this.sep),s.#E=i.join("/"),s=s.parent,i.push("..");for(s=t;s&&s.parent&&!e.has(s);)s.#k=void 0,s.#E=void 0,s=s.parent;}},Es=class Os extends D{sep="\\";splitSep=Ya;constructor(e,i=V,s,r,n,o,a){super(e,i,s,r,n,o,a);}newChild(e,i=V,s={}){return new Os(e,i,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(e){return win32.parse(e).root}getRoot(e){if(e=Ga(e.toUpperCase()),e===this.root.name)return this.root;for(let[i,s]of Object.entries(this.roots))if(this.sameRoot(e,i))return this.roots[e]=s;return this.roots[e]=new ze(e,this).root}sameRoot(e,i=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(bs,"$1\\"),e===i}},Ts=class js extends D{splitSep="/";sep="/";constructor(e,i=V,s,r,n,o,a){super(e,i,s,r,n,o,a);}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,i=V,s={}){return new js(e,i,this.root,this.roots,this.nocase,this.childrenCache(),s)}},Fs=class{root;rootPath;roots;cwd;#t;#i;#n;nocase;#r;constructor(t=process.cwd(),e,i,{nocase:s,childrenCacheSize:r=16*1024,fs:n=Mt}={}){this.#r=ws(n),(t instanceof URL||t.startsWith("file://"))&&(t=fileURLToPath(t));let o=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#t=new vi,this.#i=new vi,this.#n=new Va(r);let a=o.substring(this.rootPath.length).split(i);if(a.length===1&&!a[0]&&a.pop(),s===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=s,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let l=this.root,h=a.length-1,c=e.sep,u=this.rootPath,f=false;for(let d of a){let g=h--;l=l.child(d,{relative:new Array(g).fill("..").join(c),relativePosix:new Array(g).fill("..").join("/"),fullpath:u+=(f?"":c)+d}),f=true;}this.cwd=l;}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#n}resolve(...t){let e="";for(let r=t.length-1;r>=0;r--){let n=t[r];if(!(!n||n===".")&&(e=e?`${n}/${e}`:n,this.isAbsolute(n)))break}let i=this.#t.get(e);if(i!==void 0)return i;let s=this.cwd.resolve(e).fullpath();return this.#t.set(e,s),s}resolvePosix(...t){let e="";for(let r=t.length-1;r>=0;r--){let n=t[r];if(!(!n||n===".")&&(e=e?`${n}/${e}`:n,this.isAbsolute(n)))break}let i=this.#i.get(e);if(i!==void 0)return i;let s=this.cwd.resolve(e).fullpathPosix();return this.#i.set(e,s),s}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:true}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof D||(e=t,t=this.cwd);let{withFileTypes:i}=e;if(t.canReaddir()){let s=await t.readdir();return i?s:s.map(r=>r.name)}else return []}readdirSync(t=this.cwd,e={withFileTypes:true}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof D||(e=t,t=this.cwd);let{withFileTypes:i=true}=e;return t.canReaddir()?i?t.readdirSync():t.readdirSync().map(s=>s.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof D||(e=t.withFileTypes,t=this.cwd);let i=await t.readlink();return e?i:i?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof D||(e=t.withFileTypes,t=this.cwd);let i=t.readlinkSync();return e?i:i?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof D||(e=t.withFileTypes,t=this.cwd);let i=await t.realpath();return e?i:i?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof D||(e=t.withFileTypes,t=this.cwd);let i=t.realpathSync();return e?i:i?.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof D||(e=t,t=this.cwd);let{withFileTypes:i=true,follow:s=false,filter:r,walkFilter:n}=e,o=[];(!r||r(t))&&o.push(i?t:t.fullpath());let a=new Set,l=(c,u)=>{a.add(c),c.readdirCB((f,d)=>{if(f)return u(f);let g=d.length;if(!g)return u();let m=()=>{--g===0&&u();};for(let b of d)(!r||r(b))&&o.push(i?b:b.fullpath()),s&&b.isSymbolicLink()?b.realpath().then(v=>v?.isUnknown()?v.lstat():v).then(v=>v?.shouldWalk(a,n)?l(v,m):m()):b.shouldWalk(a,n)?l(b,m):m();},true);},h=t;return new Promise((c,u)=>{l(h,f=>{if(f)return u(f);c(o);});})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof D||(e=t,t=this.cwd);let{withFileTypes:i=true,follow:s=false,filter:r,walkFilter:n}=e,o=[];(!r||r(t))&&o.push(i?t:t.fullpath());let a=new Set([t]);for(let l of a){let h=l.readdirSync();for(let c of h){(!r||r(c))&&o.push(i?c:c.fullpath());let u=c;if(c.isSymbolicLink()){if(!(s&&(u=c.realpathSync())))continue;u.isUnknown()&&u.lstatSync();}u.shouldWalk(a,n)&&a.add(u);}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof D||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof D||(e=t,t=this.cwd);let{withFileTypes:i=true,follow:s=false,filter:r,walkFilter:n}=e;(!r||r(t))&&(yield i?t:t.fullpath());let o=new Set([t]);for(let a of o){let l=a.readdirSync();for(let h of l){(!r||r(h))&&(yield i?h:h.fullpath());let c=h;if(h.isSymbolicLink()){if(!(s&&(c=h.realpathSync())))continue;c.isUnknown()&&c.lstatSync();}c.shouldWalk(o,n)&&o.add(c);}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof D||(e=t,t=this.cwd);let{withFileTypes:i=true,follow:s=false,filter:r,walkFilter:n}=e,o=new ie({objectMode:true});(!r||r(t))&&o.write(i?t:t.fullpath());let a=new Set,l=[t],h=0,c=()=>{let u=false;for(;!u;){let f=l.shift();if(!f){h===0&&o.end();return}h++,a.add(f);let d=(m,b,v=false)=>{if(m)return o.emit("error",m);if(s&&!v){let y=[];for(let x of b)x.isSymbolicLink()&&y.push(x.realpath().then(w=>w?.isUnknown()?w.lstat():w));if(y.length){Promise.all(y).then(()=>d(null,b,true));return}}for(let y of b)y&&(!r||r(y))&&(o.write(i?y:y.fullpath())||(u=true));h--;for(let y of b){let x=y.realpathCached()||y;x.shouldWalk(a,n)&&l.push(x);}u&&!o.flowing?o.once("drain",c):g||c();},g=true;f.readdirCB(d,true),g=false;}};return c(),o}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof D||(e=t,t=this.cwd);let{withFileTypes:i=true,follow:s=false,filter:r,walkFilter:n}=e,o=new ie({objectMode:true}),a=new Set;(!r||r(t))&&o.write(i?t:t.fullpath());let l=[t],h=0,c=()=>{let u=false;for(;!u;){let f=l.shift();if(!f){h===0&&o.end();return}h++,a.add(f);let d=f.readdirSync();for(let g of d)(!r||r(g))&&(o.write(i?g:g.fullpath())||(u=true));h--;for(let g of d){let m=g;if(g.isSymbolicLink()){if(!(s&&(m=g.realpathSync())))continue;m.isUnknown()&&m.lstatSync();}m.shouldWalk(a,n)&&l.push(m);}}u&&!o.flowing&&o.once("drain",c);};return c(),o}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[As](e);}},ze=class extends Fs{sep="\\";constructor(t=process.cwd(),e={}){let{nocase:i=true}=e;super(t,win32,"\\",{...e,nocase:i}),this.nocase=i;for(let s=this.cwd;s;s=s.parent)s.nocase=this.nocase;}parseRootPath(t){return win32.parse(t).root.toUpperCase()}newRoot(t){return new Es(this.rootPath,J,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}},Be=class extends Fs{sep="/";constructor(t=process.cwd(),e={}){let{nocase:i=false}=e;super(t,posix,"/",{...e,nocase:i}),this.nocase=i;}parseRootPath(t){return "/"}newRoot(t){return new Ts(this.rootPath,J,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}},Ms=class extends Be{constructor(t=process.cwd(),e={}){let{nocase:i=true}=e;super(t,{...e,nocase:i});}};process.platform;var Ka=process.platform==="win32"?ze:process.platform==="darwin"?Ms:Be,Za=t=>t.length>=1,Ha=t=>t.length>=1,Ja=Symbol.for("nodejs.util.inspect.custom"),$s=class Ps{#t;#i;#n;length;#r;#o;#v;#y;#u;#a;#p=true;constructor(e,i,s,r){if(!Za(e))throw new TypeError("empty pattern list");if(!Ha(i))throw new TypeError("empty glob list");if(i.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#t=e,this.#i=i,this.#n=s,this.#r=r,this.#n===0){if(this.isUNC()){let[n,o,a,l,...h]=this.#t,[c,u,f,d,...g]=this.#i;h[0]===""&&(h.shift(),g.shift());let m=[n,o,a,l,""].join("/"),b=[c,u,f,d,""].join("/");this.#t=[m,...h],this.#i=[b,...g],this.length=this.#t.length;}else if(this.isDrive()||this.isAbsolute()){let[n,...o]=this.#t,[a,...l]=this.#i;o[0]===""&&(o.shift(),l.shift());let h=n+"/",c=a+"/";this.#t=[h,...o],this.#i=[c,...l],this.length=this.#t.length;}}}[Ja](){return "Pattern <"+this.#i.slice(this.#n).join("/")+">"}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]=="string"}isGlobstar(){return this.#t[this.#n]===R}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#v=this.#v||(this.#n===0?this.isAbsolute()?this.#i[0]+this.#i.slice(1).join("/"):this.#i.join("/"):this.#i.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new Ps(this.#t,this.#i,this.#n+1,this.#r),this.#o.#a=this.#a,this.#o.#u=this.#u,this.#o.#y=this.#y,this.#o):this.#o=null}isUNC(){let e=this.#t;return this.#u!==void 0?this.#u:this.#u=this.#r==="win32"&&this.#n===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#t;return this.#y!==void 0?this.#y:this.#y=this.#r==="win32"&&this.#n===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#t;return this.#a!==void 0?this.#a:this.#a=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#t[0];return typeof e=="string"&&this.isAbsolute()&&this.#n===0?e:""}checkFollowGlobstar(){return !(this.#n===0||!this.isGlobstar()||!this.#p)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#p?false:(this.#p=false,true)}},Qa=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Si=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:i,noext:s,noglobstar:r,platform:n=Qa}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=n,this.mmopts={dot:true,nobrace:e,nocase:i,noext:s,noglobstar:r,optimizationLevel:2,platform:n,nocomment:true,nonegate:true};for(let o of t)this.add(o);}add(t){let e=new at(t,this.mmopts);for(let i=0;i<e.set.length;i++){let s=e.set[i],r=e.globParts[i];if(!s||!r)throw new Error("invalid pattern object");for(;s[0]==="."&&r[0]===".";)s.shift(),r.shift();let n=new $s(s,r,0,this.platform),o=new at(n.globString(),this.mmopts),a=r[r.length-1]==="**",l=n.isAbsolute();l?this.absolute.push(o):this.relative.push(o),a&&(l?this.absoluteChildren.push(o):this.relativeChildren.push(o));}}ignored(t){let e=t.fullpath(),i=`${e}/`,s=t.relative()||".",r=`${s}/`;for(let n of this.relative)if(n.match(s)||n.match(r))return true;for(let n of this.absolute)if(n.match(e)||n.match(i))return true;return false}childrenIgnored(t){let e=t.fullpath()+"/",i=(t.relative()||".")+"/";for(let s of this.relativeChildren)if(s.match(i))return true;for(let s of this.absoluteChildren)if(s.match(e))return true;return false}},Xa=class Is{store;constructor(e=new Map){this.store=e;}copy(){return new Is(new Map(this.store))}hasWalked(e,i){return this.store.get(e.fullpath())?.has(i.globString())}storeWalked(e,i){let s=e.fullpath(),r=this.store.get(s);r?r.add(i.globString()):this.store.set(s,new Set([i.globString()]));}},tl=class{store=new Map;add(t,e,i){let s=(e?2:0)|(i?1:0),r=this.store.get(t);this.store.set(t,r===void 0?s:s&r);}entries(){return [...this.store.entries()].map(([t,e])=>[t,!!(e&2),!!(e&1)])}},el=class{store=new Map;add(t,e){if(!t.canReaddir())return;let i=this.store.get(t);i?i.find(s=>s.globString()===e.globString())||i.push(e):this.store.set(t,[e]);}get(t){let e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return [...this.store.keys()].filter(t=>t.canReaddir())}},ki=class Rs{hasWalkedCache;matches=new tl;subwalks=new el;patterns;follow;dot;opts;constructor(e,i){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=i?i.copy():new Xa;}processPatterns(e,i){this.patterns=i;let s=i.map(r=>[e,r]);for(let[r,n]of s){this.hasWalkedCache.storeWalked(r,n);let o=n.root(),a=n.isAbsolute()&&this.opts.absolute!==false;if(o){r=r.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let u=n.rest();if(u)n=u;else {this.matches.add(r,true,false);continue}}if(r.isENOENT())continue;let l,h,c=false;for(;typeof(l=n.pattern())=="string"&&(h=n.rest());)r=r.resolve(l),n=h,c=true;if(l=n.pattern(),h=n.rest(),c){if(this.hasWalkedCache.hasWalked(r,n))continue;this.hasWalkedCache.storeWalked(r,n);}if(typeof l=="string"){let u=l===".."||l===""||l===".";this.matches.add(r.resolve(l),a,u);continue}else if(l===R){(!r.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(r,n);let u=h?.pattern(),f=h?.rest();if(!h||(u===""||u===".")&&!f)this.matches.add(r,a,u===""||u===".");else if(u===".."){let d=r.parent||r;f?this.hasWalkedCache.hasWalked(d,f)||this.subwalks.add(d,f):this.matches.add(d,a,true);}}else l instanceof RegExp&&this.subwalks.add(r,n);}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new Rs(this.opts,this.hasWalkedCache)}filterEntries(e,i){let s=this.subwalks.get(e),r=this.child();for(let n of i)for(let o of s){let a=o.isAbsolute(),l=o.pattern(),h=o.rest();l===R?r.testGlobstar(n,o,h,a):l instanceof RegExp?r.testRegExp(n,l,h,a):r.testString(n,l,h,a);}return r}testGlobstar(e,i,s,r){if((this.dot||!e.name.startsWith("."))&&(i.hasMore()||this.matches.add(e,r,false),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,i):e.isSymbolicLink()&&(s&&i.checkFollowGlobstar()?this.subwalks.add(e,s):i.markFollowGlobstar()&&this.subwalks.add(e,i)))),s){let n=s.pattern();if(typeof n=="string"&&n!==".."&&n!==""&&n!==".")this.testString(e,n,s.rest(),r);else if(n===".."){let o=e.parent||e;this.subwalks.add(o,s);}else n instanceof RegExp&&this.testRegExp(e,n,s.rest(),r);}}testRegExp(e,i,s,r){i.test(e.name)&&(s?this.subwalks.add(e,s):this.matches.add(e,r,false));}testString(e,i,s,r){e.isNamed(i)&&(s?this.subwalks.add(e,s):this.matches.add(e,r,false));}},il=(t,e)=>typeof t=="string"?new Si([t],e):Array.isArray(t)?new Si(t,e):t,Ls=class{path;patterns;opts;seen=new Set;paused=false;aborted=false;#t=[];#i;#n;signal;maxDepth;includeChildMatches;constructor(t,e,i){if(this.patterns=t,this.path=e,this.opts=i,this.#n=!i.posix&&i.platform==="win32"?"\\":"/",this.includeChildMatches=i.includeChildMatches!==false,(i.ignore||!this.includeChildMatches)&&(this.#i=il(i.ignore??[],i),!this.includeChildMatches&&typeof this.#i.add!="function")){let s="cannot ignore child matches, ignore lacks add() method.";throw new Error(s)}this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0;}));}#r(t){return this.seen.has(t)||!!this.#i?.ignored?.(t)}#o(t){return !!this.#i?.childrenIgnored?.(t)}pause(){this.paused=true;}resume(){if(this.signal?.aborted)return;this.paused=false;let t;for(;!this.paused&&(t=this.#t.shift());)t();}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t());}async matchCheck(t,e){if(e&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=t.realpathCached()||await t.realpath(),!i)return;t=i;}let s=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let r=await s.realpath();r&&(r.isUnknown()||this.opts.stat)&&await r.lstat();}return this.matchCheckTest(s,e)}matchCheckTest(t,e){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#r(t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=t.realpathCached()||t.realpathSync(),!i)return;t=i;}let s=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let r=s.realpathSync();r&&(r?.isUnknown()||this.opts.stat)&&r.lstatSync();}return this.matchCheckTest(s,e)}matchFinish(t,e){if(this.#r(t))return;if(!this.includeChildMatches&&this.#i?.add){let r=`${t.relativePosix()}/**`;this.#i.add(r);}let i=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let s=this.opts.mark&&t.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(i){let r=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(r+s);}else {let r=this.opts.posix?t.relativePosix():t.relative(),n=this.opts.dotRelative&&!r.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(r?n+r+s:"."+s);}}async match(t,e,i){let s=await this.matchCheck(t,i);s&&this.matchFinish(s,e);}matchSync(t,e,i){let s=this.matchCheckSync(t,i);s&&this.matchFinish(s,e);}walkCB(t,e,i){this.signal?.aborted&&i(),this.walkCB2(t,e,new ki(this.opts),i);}walkCB2(t,e,i,s){if(this.#o(t))return s();if(this.signal?.aborted&&s(),this.paused){this.onResume(()=>this.walkCB2(t,e,i,s));return}i.processPatterns(t,e);let r=1,n=()=>{--r===0&&s();};for(let[o,a,l]of i.matches.entries())this.#r(o)||(r++,this.match(o,a,l).then(()=>n()));for(let o of i.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;r++;let a=o.readdirCached();o.calledReaddir()?this.walkCB3(o,a,i,n):o.readdirCB((l,h)=>this.walkCB3(o,h,i,n),true);}n();}walkCB3(t,e,i,s){i=i.filterEntries(t,e);let r=1,n=()=>{--r===0&&s();};for(let[o,a,l]of i.matches.entries())this.#r(o)||(r++,this.match(o,a,l).then(()=>n()));for(let[o,a]of i.subwalks.entries())r++,this.walkCB2(o,a,i.child(),n);n();}walkCBSync(t,e,i){this.signal?.aborted&&i(),this.walkCB2Sync(t,e,new ki(this.opts),i);}walkCB2Sync(t,e,i,s){if(this.#o(t))return s();if(this.signal?.aborted&&s(),this.paused){this.onResume(()=>this.walkCB2Sync(t,e,i,s));return}i.processPatterns(t,e);let r=1,n=()=>{--r===0&&s();};for(let[o,a,l]of i.matches.entries())this.#r(o)||this.matchSync(o,a,l);for(let o of i.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;r++;let a=o.readdirSync();this.walkCB3Sync(o,a,i,n);}n();}walkCB3Sync(t,e,i,s){i=i.filterEntries(t,e);let r=1,n=()=>{--r===0&&s();};for(let[o,a,l]of i.matches.entries())this.#r(o)||this.matchSync(o,a,l);for(let[o,a]of i.subwalks.entries())r++,this.walkCB2Sync(o,a,i.child(),n);n();}},xi=class extends Ls{matches=new Set;constructor(t,e,i){super(t,e,i);}matchEmit(t){this.matches.add(t);}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):t(this.matches);});}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},Ci=class extends Ls{results;constructor(t,e,i){super(t,e,i),this.results=new ie({signal:this.signal,objectMode:true}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume());}matchEmit(t){this.results.write(t),this.results.flowing||this.pause();}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end());}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}},sl=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",ft=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(t,e){if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=fileURLToPath(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==false,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===false,this.windowsPathsNoEscape&&(t=t.map(a=>a.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(a=>a.includes("/")?a:`./**/${a}`);}if(this.pattern=t,this.platform=e.platform||sl,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else {let a=e.platform==="win32"?ze:e.platform==="darwin"?Ms:e.platform?Be:Ka;this.scurry=new a(this.cwd,{nocase:e.nocase,fs:e.fs});}this.nocase=this.scurry.nocase;let i=this.platform==="darwin"||this.platform==="win32",s={braceExpandMax:1e4,...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:i,nocomment:true,noext:this.noext,nonegate:true,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},r=this.pattern.map(a=>new at(a,s)),[n,o]=r.reduce((a,l)=>(a[0].push(...l.set),a[1].push(...l.globParts),a),[[],[]]);this.patterns=n.map((a,l)=>{let h=o[l];if(!h)throw new Error("invalid pattern object");return new $s(a,h,0,this.platform)});}async walk(){return [...await new xi(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return [...new xi(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Ci(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Ci(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}},rl=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let i of t)if(new at(i,e).hasMagic())return true;return false};function le(t,e={}){return new ft(t,e).streamSync()}function Ns(t,e={}){return new ft(t,e).stream()}function Ds(t,e={}){return new ft(t,e).walkSync()}async function Ai(t,e={}){return new ft(t,e).walk()}function he(t,e={}){return new ft(t,e).iterateSync()}function Ws(t,e={}){return new ft(t,e).iterate()}var nl=le,ol=Object.assign(Ns,{sync:le}),al=he,ll=Object.assign(Ws,{sync:he}),hl=Object.assign(Ds,{stream:le,iterate:he}),Dt=Object.assign(Ai,{glob:Ai,globSync:Ds,sync:hl,globStream:Ns,stream:ol,globStreamSync:le,streamSync:nl,globIterate:Ws,iterate:ll,globIterateSync:he,iterateSync:al,Glob:ft,hasMagic:rl,escape:ls,unescape:vt});Dt.glob=Dt;var $e=z$1.object({description:z$1.string(),type:z$1.string().optional(),parent:z$1.string().optional(),anchors:z$1.array(z$1.string()).optional(),tags:z$1.array(z$1.string()).optional(),endpoints:z$1.array(z$1.string()).optional(),tests:z$1.array(z$1.string()).optional(),rules:z$1.record(z$1.unknown()).optional(),aspects:z$1.array(z$1.string()).optional(),flows:z$1.array(z$1.string()).optional(),gates:z$1.array(z$1.string()).optional(),signals:z$1.array(z$1.string()).optional(),states:z$1.array(z$1.string()).optional(),components:z$1.array(z$1.string()).optional(),location:z$1.string().optional(),locations:z$1.array(z$1.string()).optional(),uses:z$1.array(z$1.string()).optional(),"used-by":z$1.array(z$1.string()).optional(),"used-for":z$1.array(z$1.string()).optional(),exports:z$1.array(z$1.string()).optional(),status:z$1.string().optional(),properties:z$1.record(z$1.unknown()).optional(),handles:z$1.array(z$1.string()).optional()}).passthrough(),Ei=$e.extend({id:z$1.string()}),ul=z$1.object({description:z$1.string().optional(),category:z$1.string().optional(),severity:z$1.enum(["info","warn","error"]).optional(),emitters:z$1.array(z$1.string()).optional(),related:z$1.array(z$1.string()).optional(),data:z$1.record(z$1.unknown()).optional()}),cl=z$1.union([ul,z$1.string().transform(t=>({description:t}))]),pl=z$1.object({from:z$1.string(),to:z$1.string(),type:z$1.string(),description:z$1.string().optional()}),fl=z$1.union([pl,z$1.string()]),dl=z$1.object({component:z$1.string(),action:z$1.string(),description:z$1.string().optional()}),_s=z$1.union([dl,z$1.string()]),gl=z$1.object({name:z$1.string(),description:z$1.string().optional(),steps:z$1.array(_s)}),ml=z$1.object({description:z$1.string().optional(),gates:z$1.array(z$1.string()).optional(),signals:z$1.array(z$1.string()).optional(),components:z$1.array(z$1.string()).optional(),steps:z$1.array(_s).optional()}),yl=z$1.object({description:z$1.string().optional(),requires:z$1.array(z$1.string()).optional(),keys:z$1.array(z$1.string()).optional(),signals:z$1.array(z$1.string()).optional()}),wl=z$1.object({description:z$1.string().optional(),default:z$1.unknown().optional(),type:z$1.string().optional()}),bl=z$1.object({description:z$1.string().optional(),tags:z$1.array(z$1.string()).optional(),anchors:z$1.array(z$1.string()).optional(),"applies-to":z$1.array(z$1.string()).optional(),enforcement:z$1.string().optional()}),vl=z$1.object({target:z$1.string(),type:z$1.string(),path:z$1.string()}),Sl=z$1.object({version:z$1.string().optional(),description:z$1.string().optional(),apiSpec:z$1.string().optional(),context:z$1.array(z$1.string()).optional(),rules:z$1.record(z$1.unknown()).optional(),features:z$1.union([z$1.array(Ei),z$1.record($e)]).optional(),components:z$1.union([z$1.array(Ei),z$1.record($e)]).optional(),gates:z$1.record(yl).optional(),states:z$1.record(wl).optional(),signals:z$1.record(cl).optional(),aspects:z$1.record(bl).optional(),relationships:z$1.array(fl).optional(),flows:z$1.union([z$1.array(gl),z$1.record(ml)]).optional(),references:z$1.array(vl).optional()});function kl(t){let e=xl(t);return {data:e.data,errors:e.errors}}function xl(t){let e=[],i=[],s;try{s=lt.readFileSync(t,"utf8");}catch(a){let l=`Cannot read file: ${a.message}`;return e.push(l),i.push({message:l,type:"file"}),{data:null,errors:e,detailedErrors:i,rawContent:void 0,isYamlValid:false}}let r=s.replace(/^([#~!$^][\w-]+):/gm,'"$1":').replace(/^(\s*-\s+)([!#][\w-]+)$/gm,'$1"$2"'),n=null;try{n=oe(r);}catch(a){let l=a,h=l.mark?.line?l.mark.line+1:void 0,c=`YAML syntax error: ${l.reason||a.message}`;return e.push(`${c}${h?` (line ${h})`:""}`),i.push({message:c,line:h,type:"yaml"}),{data:null,errors:e,detailedErrors:i,rawContent:s,isYamlValid:false}}if(n==null)return {data:{},errors:[],detailedErrors:[],rawContent:s,isYamlValid:true};if(typeof n=="object"&&n!==null){let a=n,l={"#":"components",$:"flows","^":"gates","!":"signals","~":"aspects"};for(let h of Object.keys(a)){let c=h[0],u=l[c];if(!u||h.length<2)continue;let f=h.slice(1),d=a[h];if(typeof d!="object"||d===null)continue;let g=a[u]||{};u in a||(a[u]=g),f in g||(g[f]=d),delete a[h];}}let o=Sl.safeParse(n);if(!o.success){for(let a of o.error.issues){let l=a.path.join("."),h=a.message;e.push(`Schema error at ${l||"/"}: ${h}`),i.push({message:h,path:l||"/",type:"schema"});}return {data:n,errors:e,detailedErrors:i,rawContent:s,isYamlValid:true}}return {data:o.data,errors:[],detailedErrors:[],rawContent:s,isYamlValid:true}}function se(t){return t?Array.isArray(t)?t.map(e=>[e.id,e]):Object.entries(t):[]}async function Cl(t){let e=L.resolve(t);return (await Dt("**/.purpose",{cwd:e,absolute:true,ignore:["**/node_modules/**","**/dist/**","**/.git/**"]})).sort((i,s)=>{let r=i.split(L.sep).length,n=s.split(L.sep).length;return r-n})}async function Al(t){let e=await Cl(t),i=[];for(let s of e){let{data:r,errors:n}=kl(s);r&&(i.push({filePath:s,data:r}),n.length>0&&console.warn(`Warnings parsing ${s}:`,n));}return i}function El(t){let e=new Map;for(let{filePath:i,data:s}of t){let r=se(s.features);for(let[n,o]of r)e.set(n,{item:o,filePath:i});}return e}function Ol(t){let e=new Map;for(let{filePath:i,data:s}of t){let r=se(s.components);for(let[n,o]of r)e.set(n,{item:o,filePath:i});}return e}function Tl(t){let e=new Map;for(let{filePath:i,data:s}of t)if(s.gates)for(let[r,n]of Object.entries(s.gates))e.set(r,{item:n,filePath:i});return e}function jl(t){let e=new Map;for(let{filePath:i,data:s}of t)if(s.states)for(let[r,n]of Object.entries(s.states))e.set(r,{item:n,filePath:i});return e}function Fl(t){let e=new Map;for(let{filePath:i,data:s}of t)if(s.flows)if(Array.isArray(s.flows))for(let r of s.flows)e.set(r.name,{item:{id:r.name,description:r.description,steps:r.steps},filePath:i});else for(let[r,n]of Object.entries(s.flows))e.set(r,{item:{id:r,description:n.description,gates:n.gates,signals:n.signals,components:n.components,steps:n.steps},filePath:i});return e}function Ml(t){let e=new Map;for(let{filePath:i,data:s}of t)if(s.signals)for(let[r,n]of Object.entries(s.signals))e.set(r,{item:n,filePath:i});return e}function $l(t){let e=new Map;for(let{filePath:i,data:s}of t)if(s.aspects)for(let[r,n]of Object.entries(s.aspects))e.set(r,{item:n,filePath:i});return e}function Pl(t){let e=[],i=new Set;for(let{filePath:s,data:r}of t){let n=se(r.features);for(let[a,l]of n)Oi(`#${a}`,l,s,e,i);let o=se(r.components);for(let[a,l]of o)Oi(`#${a}`,l,s,e,i);}return e}function Oi(t,e,i,s,r){if(e.flows)for(let n of e.flows){let o=n.startsWith("$")?n:`$${n}`;r.has(o)||(r.add(o),s.push({symbol:o,type:"flow",sourceSymbol:t,filePath:i}));}if(e.gates)for(let n of e.gates){let o=n.startsWith("^")?n:`^${n}`;r.has(o)||(r.add(o),s.push({symbol:o,type:"gate",sourceSymbol:t,filePath:i}));}if(e.signals)for(let n of e.signals){let o=n.startsWith("!")?n:`!${n}`;r.has(o)||(r.add(o),s.push({symbol:o,type:"signal",sourceSymbol:t,filePath:i}));}if(e.states)for(let n of e.states){let o=n.startsWith("#")?n:n.startsWith("%")?`#${n.slice(1)}`:`#${n}`;r.has(o)||(r.add(o),s.push({symbol:o,type:"component",sourceSymbol:t,filePath:i}));}if(e.components)for(let n of e.components){let o=n.startsWith("#")?n:`#${n}`;r.has(o)||(r.add(o),s.push({symbol:o,type:"component",sourceSymbol:t,filePath:i}));}if(e.aspects)for(let n of e.aspects){let o=n.startsWith("~")?n:`~${n}`;r.has(o)||(r.add(o),s.push({symbol:o,type:"aspect",sourceSymbol:t,filePath:i}));}if(e.description){let n=Rl(e.description);for(let{symbol:o,type:a}of n)r.has(o)||(r.add(o),s.push({symbol:o,type:a,sourceSymbol:t,filePath:i}));}}var Il=new Set(["$lib","$env","$app","$service-worker","$virtual","$schema","$ref","$id","$type"]);function Rl(t){let e=[],i=/([$^!#~%])([a-zA-Z][a-zA-Z0-9._-]*)/g,s;for(;(s=i.exec(t))!==null;){let r=s[1],n=s[2],o,a;switch(r){case "#":a="component",o=`#${n}`;break;case "$":a="flow",o=`$${n}`;break;case "^":a="gate",o=`^${n}`;break;case "!":a="signal",o=`!${n}`;break;case "~":a="aspect",o=`~${n}`;break;case "%":a="component",o=`#${n}`;break;default:continue}Il.has(o)||e.push({symbol:o,type:a});}return e}var Ll={visualizerPort:42195,watcherPort:42196,autoConnect:true};async function xe(t){let e=L.resolve(t),i=L.dirname(e);if(!lt.existsSync(e))throw new Error(`Gate config not found: ${e}`);let s=lt.readFileSync(e,"utf8"),r=oe(s);if(!r.version)throw new Error('Gate config missing required "version" field');let n=[],o=r,a=r.gates||o.portals;if(a)for(let[h,c]of Object.entries(a))n.push(Pe(h,c));if(r.include)for(let h of r.include){let c=L.join(i,h),u=await Dt(c.replace(/\\/g,"/"));for(let f of u){let d=await Nl(f);n.push(...d);}}let l=[];if(r.flows)for(let[h,c]of Object.entries(r.flows))l.push(_l(h,c));return {version:r.version,gates:n,flows:l,settings:{dev:{...Ll,...r.settings?.dev}}}}async function Nl(t){let e=lt.readFileSync(t,"utf8"),i=oe(e);if(i.id)return [Pe(i.id,i)];if(i.gates){let s=[];for(let[r,n]of Object.entries(i.gates))s.push(Pe(r,n));return s}return []}function Pe(t,e){let i=[];if(e.locks)for(let r of e.locks)i.push(Dl(r));let s=[];if(e.prizes)for(let r of e.prizes)s.push(Wl(r));return {id:t,description:e.description,locks:i,prizes:s,position:e.position}}function Dl(t){let e=t,i=[];if(e.keys){for(let s of e.keys)if(typeof s=="string")i.push({expression:s});else if(s.expression){let r=s;i.push({expression:r.expression,description:r.description});}}return {id:e.id,description:e.description,keys:i,mode:e.mode||"all"}}function Wl(t){let e=t;return {id:e.id,oneTime:e.oneTime??false,metadata:e.metadata}}function _l(t,e){return {id:t,description:e.description,gates:e.gates||[],forkable:e.forkable}}async function zl(t){let e=L.resolve(t);return await Dt("**/portal.yaml",{cwd:e,absolute:true,ignore:["**/node_modules/**","**/dist/**","**/.git/**"]})}var Bl={component:"#",flow:"$",gate:"^",signal:"!",aspect:"~"},Ul={"#":"component",$:"flow","^":"gate","!":"signal","~":"aspect"},Gl=["#","$","^","!","~"];function Yl(t){return Gl.includes(t)}var ql=z$1.object({x:z$1.number(),y:z$1.number()}),Vl=z$1.object({x:z$1.number(),y:z$1.number(),zoom:z$1.number()}),Ti=z$1.object({path:z$1.string(),include:z$1.array(z$1.string()).optional(),exclude:z$1.array(z$1.string()).optional()}),zs=z$1.object({id:z$1.string(),symbol:z$1.string(),type:z$1.enum(["feature","component","flow","state","aspect","gate","signal","idea"]),content:z$1.string().optional(),position:ql,tags:z$1.array(z$1.string()).optional(),created:z$1.string(),modified:z$1.string().optional()}),Bs=z$1.object({from:z$1.string(),to:z$1.string(),label:z$1.string().optional(),type:z$1.string().optional()}),Kl=z$1.object({id:z$1.string(),name:z$1.string(),nodes:z$1.array(z$1.string()),color:z$1.string().optional()}),Us=z$1.object({viewport:Vl,groups:z$1.array(Kl).optional()}),Zl=z$1.object({nodes:z$1.array(zs),connections:z$1.array(Bs),layout:Us}),Hl=z$1.object({id:z$1.string(),name:z$1.string(),timestamp:z$1.string(),description:z$1.string().optional(),state:Zl}),Jl=z$1.object({version:z$1.string(),metadata:z$1.object({name:z$1.string(),created:z$1.string(),modified:z$1.string()}),sources:z$1.object({purpose:z$1.array(Ti).optional(),portal:z$1.array(Ti).optional()}),nodes:z$1.array(zs),connections:z$1.array(Bs),layout:Us,snapshots:z$1.array(Hl).optional()});function gh(t){let e=[],i;try{i=lt.readFileSync(t,"utf8");}catch(s){return e.push(`Cannot read file: ${s.message}`),{data:null,errors:e,rawContent:void 0}}return Ql(i)}function Ql(t){let e=[],i=null;try{i=oe(t);}catch(r){let n=r,o=n.mark?.line?n.mark.line+1:void 0;return e.push(`YAML syntax error: ${n.reason||r.message}${o?` (line ${o})`:""}`),{data:null,errors:e,rawContent:t}}if(i==null)return {data:Gs(),errors:[],rawContent:t};let s=Jl.safeParse(i);if(!s.success){for(let r of s.error.issues){let n=r.path.join(".");e.push(`Schema error at ${n||"/"}: ${r.message}`);}return {data:i,errors:e,rawContent:t}}return {data:s.data,errors:[],rawContent:t}}function Gs(t="Untitled"){let e=new Date().toISOString();return {version:"1.0.0",metadata:{name:t,created:e,modified:e},sources:{purpose:[{path:"./"}],portal:[{path:"./portal.yaml"}]},nodes:[],connections:[],layout:{viewport:{x:0,y:0,zoom:1}}}}function Xl(t){return t.metadata.modified=new Date().toISOString(),Oo(t,{indent:2,lineWidth:-1,noRefs:true,sortKeys:false})}function mh(t="My Project"){return Xl(Gs(t))}function yh(t,e){return {...t,nodes:[...t.nodes,e],metadata:{...t.metadata,modified:new Date().toISOString()}}}function wh(t,e,i){return {...t,nodes:t.nodes.map(s=>s.id===e?{...s,position:i,modified:new Date().toISOString()}:s),metadata:{...t.metadata,modified:new Date().toISOString()}}}function bh(t,e){return t.connections.some(i=>i.from===e.from&&i.to===e.to)?t:{...t,connections:[...t.connections,e],metadata:{...t.metadata,modified:new Date().toISOString()}}}function vh(t,e,i){let s={id:`snap-${Date.now()}`,name:e,timestamp:new Date().toISOString(),description:i,state:{nodes:[...t.nodes],connections:[...t.connections],layout:{...t.layout}}};return {...t,snapshots:[...t.snapshots||[],s],metadata:{...t.metadata,modified:new Date().toISOString()}}}async function th(t,e){let i=[],s=[],r=[],n=[];if(t.sources.purpose)for(let l of t.sources.purpose){let h=L.resolve(e,l.path);try{let c=await Al(h);r.push(...c.map(w=>w.filePath));let u=El(c);for(let[w,{item:S,filePath:C}]of u){let U=["feature",...S.tags||[]];i.push(q({id:`purpose-feature-${w}`,symbol:`#${w}`,type:"component",source:"purpose",filePath:C,data:S,description:S.description,tags:U,componentType:S.type,parentSymbol:S.parent,anchors:S.anchors?.map(it=>Ce(it))}));}let f=Ol(c);for(let[w,{item:S,filePath:C}]of f)i.push(q({id:`purpose-component-${w}`,symbol:`#${w}`,type:"component",source:"purpose",filePath:C,data:S,description:S.description,tags:S.tags,componentType:S.type,parentSymbol:S.parent,anchors:S.anchors?.map(U=>Ce(U))}));let d=Tl(c);for(let[w,{item:S,filePath:C}]of d)i.push(q({id:`purpose-gate-${w}`,symbol:`^${w}`,type:"gate",source:"purpose",filePath:C,data:S,description:S.description}));let g=jl(c);for(let[w,{item:S,filePath:C}]of g)i.push(q({id:`purpose-state-${w}`,symbol:`#${w}`,type:"component",source:"purpose",filePath:C,data:S,description:S.description,tags:["state"]}));let m=Fl(c);for(let[w,{item:S,filePath:C}]of m)i.push(q({id:`purpose-flow-${w}`,symbol:`$${w}`,type:"flow",source:"purpose",filePath:C,data:S,description:S.description}));let b=Ml(c);for(let[w,{item:S,filePath:C}]of b)i.push(q({id:`purpose-signal-${w}`,symbol:`!${w}`,type:"signal",source:"purpose",filePath:C,data:S,description:S.description}));let v=$l(c);for(let[w,{item:S,filePath:C}]of v)i.push(q({id:`purpose-aspect-${w}`,symbol:`~${w}`,type:"aspect",source:"purpose",filePath:C,data:S,description:S.description,anchors:S.anchors?.map(U=>Ce(U)),appliesTo:S["applies-to"],tags:S.tags,enforcement:S.enforcement}));let y=Pl(c),x=new Set(i.map(w=>w.symbol));for(let w of y)x.has(w.symbol)||(x.add(w.symbol),i.push(q({id:`purpose-ref-${w.type}-${w.symbol.slice(1)}`,symbol:w.symbol,type:w.type,source:"purpose",filePath:w.filePath,data:{referencedFrom:w.sourceSymbol},description:`Referenced from ${w.sourceSymbol}`})));}catch(c){s.push({source:"purpose",filePath:h,message:c.message});}}if(t.sources.portal)for(let l of t.sources.portal){let h=L.resolve(e,l.path);try{let c;if(h.endsWith(".yaml")||h.endsWith(".yml"))c=await xe(h),n.push(h);else {let u=await zl(h);if(n.push(...u),u.length>0){c=await xe(u[0]);for(let f=1;f<u.length;f++){let d=await xe(u[f]);c.gates.push(...d.gates),c.flows.push(...d.flows);}}else continue}for(let u of c.gates){i.push(eh(u,h));for(let f of u.prizes)i.push(q({id:`gate-signal-${u.id}-${f.id}`,symbol:`!${f.id}`,type:"signal",source:"portal",filePath:h,data:f,description:`Signal from gate ${u.id}`}));}for(let u of c.flows)i.push(ih(u,h));}catch(c){s.push({source:"portal",filePath:h,message:c.message});}}for(let l of t.nodes){let h=l.tags?.includes("idea");if(!l.content&&!h){let c=i.find(u=>u.symbol===l.symbol);if(c){c.position=l.position,c.tags=l.tags;continue}}i.push(q({id:l.id,symbol:l.symbol,type:l.type,source:"premise",filePath:".premise",data:l,description:l.content,position:l.position,tags:l.tags,created:l.created,modified:l.modified}));}rh(i);let o=new Map;for(let l of i){let h=o.get(l.symbol)||[];h.includes(l.filePath)||h.push(l.filePath),o.set(l.symbol,h);}let a=[];for(let[l,h]of o)h.length>1&&a.push({symbol:l,files:h});return {symbols:i,purposeFiles:r,portalFiles:n,errors:s,timestamp:Date.now(),...a.length>0?{duplicateSymbols:a}:{}}}function q(t){return {...t,data:t.data??null,references:t.references??[],referencedBy:t.referencedBy??[]}}function eh(t,e){return q({id:`gate-${t.id}`,symbol:`^${t.id}`,type:"gate",source:"portal",filePath:e,data:t,description:t.description,position:t.position})}function ih(t,e){return q({id:`gate-flow-${t.id}`,symbol:`$${t.id}`,type:"flow",source:"portal",filePath:e,data:t,description:t.description})}function Ce(t){let e=t.lastIndexOf(":");if(e===-1||e===t.length-1)return {path:t,lines:0,raw:t};let i=t.slice(e+1),s=t.slice(0,e);if(!/^[\d,\- ]+$/.test(i))return {path:t,lines:0,raw:t};if(i.includes("-")){let[r,n]=i.split("-").map(Number);return {path:s,lines:[r,n],raw:t}}else if(i.includes(",")){let r=i.split(",").map(Number);return {path:s,lines:r,raw:t}}else return {path:s,lines:Number(i),raw:t}}var sh=new Set(["$lib","$env","$app","$service-worker","$virtual","$schema","$ref","$id","$type"]);function rh(t){let e=new Map(t.map(i=>[i.symbol,i]));for(let i of t){let s=JSON.stringify(i.data),r=/(?:\?[@#$%~^!]|[@#$%~^!?])[a-zA-Z][\w-]*/g,n=(s.match(r)||[]).filter(o=>!sh.has(o));for(let o of n)if(o!==i.symbol&&e.has(o)){i.references.includes(o)||i.references.push(o);let a=e.get(o);a&&!a.referencedBy.includes(i.symbol)&&a.referencedBy.push(i.symbol);}}}async function Sh(t){let e={metadata:{name:L.basename(t),created:new Date().toISOString(),modified:new Date().toISOString()},sources:{purpose:[{path:"./"}],portal:[{path:"./"}]},nodes:[]};return th(e,t)}function nh(){return {entries:new Map,byType:new Map,bySource:new Map,timestamp:0}}function kh(t){let e=nh();e.timestamp=t.timestamp;for(let i of t.symbols)e.entries.set(i.id,i),e.byType.has(i.type)||e.byType.set(i.type,[]),e.byType.get(i.type).push(i),e.bySource.has(i.source)||e.bySource.set(i.source,[]),e.bySource.get(i.source).push(i);return e}function re(t,e){for(let i of t.entries.values())if(i.symbol===e)return i}function xh(t,e){return t.entries.get(e)}function ue(t,e){return t.byType.get(e)||[]}function Ch(t,e){return t.bySource.get(e)||[]}function oh(t,e){let i=e.toLowerCase(),s=[];for(let r of t.entries.values()){if(r.symbol.toLowerCase().includes(i)){s.push(r);continue}if(r.description?.toLowerCase().includes(i)){s.push(r);continue}if(r.tags?.some(n=>n.toLowerCase().includes(i))){s.push(r);continue}if(r.componentType?.toLowerCase().includes(i)){s.push(r);continue}}return s}function Ah(t,e){return ue(t,"component").filter(i=>i.componentType===e)}function Eh(t){let e=new Set,i=ue(t,"component");for(let s of i)s.componentType&&e.add(s.componentType);return Array.from(e).sort()}function Oh(t,e){return ue(t,"component").filter(i=>i.parentSymbol===e)}function Th(t,e){let i=re(t,e);return i?i.referencedBy.map(s=>re(t,s)).filter(s=>s!==void 0):[]}function jh(t,e){let i=re(t,e);return i?i.references.map(s=>re(t,s)).filter(s=>s!==void 0):[]}function Fh(t,e){let i=[];for(let s of t.entries.values())s.tags?.includes(e)&&i.push(s);return i}function Mh(t){let e=new Set;for(let i of t.entries.values())for(let s of i.tags||[])e.add(s);return Array.from(e).sort()}function $h(t){let e={component:0,flow:0,gate:0,signal:0,aspect:0};for(let[i,s]of t.byType)i in e&&(e[i]=s.length);return e}function Ph(t){return Array.from(t.entries.values())}function Ys(t){if(t.length<2)return null;let e=t[0],i=t.slice(1);return Yl(e)?{type:Ul[e],name:i}:null}function Ih(t,e){return `${Bl[t]}${e}`}function Rh(t){return Ys(t)!==null}function Lh(t,e,i=10){let s=e.toLowerCase(),r=Ys(e);return r?ue(t,r.type).filter(n=>n.symbol.toLowerCase().includes(s)).slice(0,i):oh(t,e).slice(0,i)}/*! Bundled license information:
36
+
37
+ js-yaml/dist/js-yaml.mjs:
38
+ (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
39
+ */export{Ul as PREFIX_TO_TYPE,Bl as SYMBOL_PREFIXES,bh as addConnection,yh as addPremiseNode,Sh as aggregateFromDirectory,th as aggregateFromPremise,kh as buildSymbolIndex,Gs as createEmptyPremiseFile,vh as createSnapshot,nh as createSymbolIndex,Ih as createSymbolString,Eh as getAllComponentTypes,Ph as getAllSymbols,Mh as getAllTags,Lh as getAutocompleteSuggestions,Oh as getChildComponents,Ah as getComponentsByType,mh as getDefaultPremiseContent,jh as getReferencesFrom,Th as getReferencesTo,re as getSymbol,xh as getSymbolById,$h as getSymbolCounts,Ch as getSymbolsBySource,Fh as getSymbolsByTag,ue as getSymbolsByType,Rh as isValidSymbol,Ql as parsePremiseContent,gh as parsePremiseFile,Ys as parseSymbol,oh as searchSymbols,Xl as serializePremiseFile,wh as updateNodePosition};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import*as x from'fs';import*as C from'js-yaml';import {z as z$1}from'zod';import*as S from'path';import {glob}from'glob';var O=z$1.object({description:z$1.string(),type:z$1.string().optional(),parent:z$1.string().optional(),anchors:z$1.array(z$1.string()).optional(),tags:z$1.array(z$1.string()).optional(),endpoints:z$1.array(z$1.string()).optional(),tests:z$1.array(z$1.string()).optional(),rules:z$1.record(z$1.unknown()).optional(),aspects:z$1.array(z$1.string()).optional(),flows:z$1.array(z$1.string()).optional(),gates:z$1.array(z$1.string()).optional(),signals:z$1.array(z$1.string()).optional(),states:z$1.array(z$1.string()).optional(),components:z$1.array(z$1.string()).optional(),location:z$1.string().optional(),locations:z$1.array(z$1.string()).optional(),uses:z$1.array(z$1.string()).optional(),"used-by":z$1.array(z$1.string()).optional(),"used-for":z$1.array(z$1.string()).optional(),exports:z$1.array(z$1.string()).optional(),status:z$1.string().optional(),properties:z$1.record(z$1.unknown()).optional(),handles:z$1.array(z$1.string()).optional()}).passthrough(),L=O.extend({id:z$1.string()}),fe=z$1.object({description:z$1.string().optional(),category:z$1.string().optional(),severity:z$1.enum(["info","warn","error"]).optional(),emitters:z$1.array(z$1.string()).optional(),related:z$1.array(z$1.string()).optional(),data:z$1.record(z$1.unknown()).optional()}),le=z$1.union([fe,z$1.string().transform(t=>({description:t}))]),ue=z$1.object({from:z$1.string(),to:z$1.string(),type:z$1.string(),description:z$1.string().optional()}),de=z$1.union([ue,z$1.string()]),me=z$1.object({component:z$1.string(),action:z$1.string(),description:z$1.string().optional()}),B=z$1.union([me,z$1.string()]),ge=z$1.object({name:z$1.string(),description:z$1.string().optional(),steps:z$1.array(B)}),he=z$1.object({description:z$1.string().optional(),gates:z$1.array(z$1.string()).optional(),signals:z$1.array(z$1.string()).optional(),components:z$1.array(z$1.string()).optional(),steps:z$1.array(B).optional()}),ye=z$1.object({description:z$1.string().optional(),requires:z$1.array(z$1.string()).optional(),keys:z$1.array(z$1.string()).optional(),signals:z$1.array(z$1.string()).optional()}),$e=z$1.object({description:z$1.string().optional(),default:z$1.unknown().optional(),type:z$1.string().optional()}),we=z$1.object({description:z$1.string().optional(),tags:z$1.array(z$1.string()).optional(),anchors:z$1.array(z$1.string()).optional(),"applies-to":z$1.array(z$1.string()).optional(),enforcement:z$1.string().optional()}),be=z$1.object({target:z$1.string(),type:z$1.string(),path:z$1.string()}),Se=z$1.object({version:z$1.string().optional(),description:z$1.string().optional(),apiSpec:z$1.string().optional(),context:z$1.array(z$1.string()).optional(),rules:z$1.record(z$1.unknown()).optional(),features:z$1.union([z$1.array(L),z$1.record(O)]).optional(),components:z$1.union([z$1.array(L),z$1.record(O)]).optional(),gates:z$1.record(ye).optional(),states:z$1.record($e).optional(),signals:z$1.record(le).optional(),aspects:z$1.record(we).optional(),relationships:z$1.array(de).optional(),flows:z$1.union([z$1.array(ge),z$1.record(he)]).optional(),references:z$1.array(be).optional()});function ve(t){let e=Pe(t);return {data:e.data,errors:e.errors}}function Pe(t){let e=[],o=[],n;try{n=x.readFileSync(t,"utf8");}catch(l){let p=`Cannot read file: ${l.message}`;return e.push(p),o.push({message:p,type:"file"}),{data:null,errors:e,detailedErrors:o,rawContent:void 0,isYamlValid:false}}let r=n.replace(/^([#~!$^][\w-]+):/gm,'"$1":').replace(/^(\s*-\s+)([!#][\w-]+)$/gm,'$1"$2"'),a=null;try{a=C.load(r);}catch(l){let p=l,f=p.mark?.line?p.mark.line+1:void 0,u=`YAML syntax error: ${p.reason||l.message}`;return e.push(`${u}${f?` (line ${f})`:""}`),o.push({message:u,line:f,type:"yaml"}),{data:null,errors:e,detailedErrors:o,rawContent:n,isYamlValid:false}}if(a==null)return {data:{},errors:[],detailedErrors:[],rawContent:n,isYamlValid:true};if(typeof a=="object"&&a!==null){let l=a,p={"#":"components",$:"flows","^":"gates","!":"signals","~":"aspects"};for(let f of Object.keys(l)){let u=f[0],g=p[u];if(!g||f.length<2)continue;let h=f.slice(1),w=l[f];if(typeof w!="object"||w===null)continue;let v=l[g]||{};g in l||(l[g]=v),h in v||(v[h]=w),delete l[f];}}let i=Se.safeParse(a);if(!i.success){for(let l of i.error.issues){let p=l.path.join("."),f=l.message;e.push(`Schema error at ${p||"/"}: ${f}`),o.push({message:f,path:p||"/",type:"schema"});}return {data:a,errors:e,detailedErrors:o,rawContent:n,isYamlValid:true}}return {data:i.data,errors:[],detailedErrors:[],rawContent:n,isYamlValid:true}}function k(t){return t?Array.isArray(t)?t.map(e=>[e.id,e]):Object.entries(t):[]}async function je(t){let e=S.resolve(t);return (await glob("**/.purpose",{cwd:e,absolute:true,ignore:["**/node_modules/**","**/dist/**","**/.git/**"]})).sort((n,r)=>{let a=n.split(S.sep).length,i=r.split(S.sep).length;return a-i})}async function V(t){let e=await je(t),o=[];for(let n of e){let{data:r,errors:a}=ve(n);r&&(o.push({filePath:n,data:r}),a.length>0&&console.warn(`Warnings parsing ${n}:`,a));}return o}function Y(t){let e=new Map;for(let{filePath:o,data:n}of t){let r=k(n.features);for(let[a,i]of r)e.set(a,{item:i,filePath:o});}return e}function W(t){let e=new Map;for(let{filePath:o,data:n}of t){let r=k(n.components);for(let[a,i]of r)e.set(a,{item:i,filePath:o});}return e}function _(t){let e=new Map;for(let{filePath:o,data:n}of t)if(n.gates)for(let[r,a]of Object.entries(n.gates))e.set(r,{item:a,filePath:o});return e}function N(t){let e=new Map;for(let{filePath:o,data:n}of t)if(n.states)for(let[r,a]of Object.entries(n.states))e.set(r,{item:a,filePath:o});return e}function K(t){let e=new Map;for(let{filePath:o,data:n}of t)if(n.flows)if(Array.isArray(n.flows))for(let r of n.flows)e.set(r.name,{item:{id:r.name,description:r.description,steps:r.steps},filePath:o});else for(let[r,a]of Object.entries(n.flows))e.set(r,{item:{id:r,description:a.description,gates:a.gates,signals:a.signals,components:a.components,steps:a.steps},filePath:o});return e}function q(t){let e=new Map;for(let{filePath:o,data:n}of t)if(n.signals)for(let[r,a]of Object.entries(n.signals))e.set(r,{item:a,filePath:o});return e}function Z(t){let e=new Map;for(let{filePath:o,data:n}of t)if(n.aspects)for(let[r,a]of Object.entries(n.aspects))e.set(r,{item:a,filePath:o});return e}function U(t){let e=[],o=new Set;for(let{filePath:n,data:r}of t){let a=k(r.features);for(let[l,p]of a)M(`#${l}`,p,n,e,o);let i=k(r.components);for(let[l,p]of i)M(`#${l}`,p,n,e,o);}return e}function M(t,e,o,n,r){if(e.flows)for(let a of e.flows){let i=a.startsWith("$")?a:`$${a}`;r.has(i)||(r.add(i),n.push({symbol:i,type:"flow",sourceSymbol:t,filePath:o}));}if(e.gates)for(let a of e.gates){let i=a.startsWith("^")?a:`^${a}`;r.has(i)||(r.add(i),n.push({symbol:i,type:"gate",sourceSymbol:t,filePath:o}));}if(e.signals)for(let a of e.signals){let i=a.startsWith("!")?a:`!${a}`;r.has(i)||(r.add(i),n.push({symbol:i,type:"signal",sourceSymbol:t,filePath:o}));}if(e.states)for(let a of e.states){let i=a.startsWith("#")?a:a.startsWith("%")?`#${a.slice(1)}`:`#${a}`;r.has(i)||(r.add(i),n.push({symbol:i,type:"component",sourceSymbol:t,filePath:o}));}if(e.components)for(let a of e.components){let i=a.startsWith("#")?a:`#${a}`;r.has(i)||(r.add(i),n.push({symbol:i,type:"component",sourceSymbol:t,filePath:o}));}if(e.aspects)for(let a of e.aspects){let i=a.startsWith("~")?a:`~${a}`;r.has(i)||(r.add(i),n.push({symbol:i,type:"aspect",sourceSymbol:t,filePath:o}));}if(e.description){let a=Ce(e.description);for(let{symbol:i,type:l}of a)r.has(i)||(r.add(i),n.push({symbol:i,type:l,sourceSymbol:t,filePath:o}));}}var ke=new Set(["$lib","$env","$app","$service-worker","$virtual","$schema","$ref","$id","$type"]);function Ce(t){let e=[],o=/([$^!#~%])([a-zA-Z][a-zA-Z0-9._-]*)/g,n;for(;(n=o.exec(t))!==null;){let r=n[1],a=n[2],i,l;switch(r){case "#":l="component",i=`#${a}`;break;case "$":l="flow",i=`$${a}`;break;case "^":l="gate",i=`^${a}`;break;case "!":l="signal",i=`!${a}`;break;case "~":l="aspect",i=`~${a}`;break;case "%":l="component",i=`#${a}`;break;default:continue}ke.has(i)||e.push({symbol:i,type:l});}return e}var Ie={visualizerPort:42195,watcherPort:42196,autoConnect:true};async function I(t){let e=S.resolve(t),o=S.dirname(e);if(!x.existsSync(e))throw new Error(`Gate config not found: ${e}`);let n=x.readFileSync(e,"utf8"),r=C.load(n);if(!r.version)throw new Error('Gate config missing required "version" field');let a=[],i=r,l=r.gates||i.portals;if(l)for(let[f,u]of Object.entries(l))a.push(F(f,u));if(r.include)for(let f of r.include){let u=S.join(o,f),g=await glob(u.replace(/\\/g,"/"));for(let h of g){let w=await Ae(h);a.push(...w);}}let p=[];if(r.flows)for(let[f,u]of Object.entries(r.flows))p.push(Oe(f,u));return {version:r.version,gates:a,flows:p,settings:{dev:{...Ie,...r.settings?.dev}}}}async function Ae(t){let e=x.readFileSync(t,"utf8"),o=C.load(e);if(o.id)return [F(o.id,o)];if(o.gates){let n=[];for(let[r,a]of Object.entries(o.gates))n.push(F(r,a));return n}return []}function F(t,e){let o=[];if(e.locks)for(let r of e.locks)o.push(De(r));let n=[];if(e.prizes)for(let r of e.prizes)n.push(ze(r));return {id:t,description:e.description,locks:o,prizes:n,position:e.position}}function De(t){let e=t,o=[];if(e.keys){for(let n of e.keys)if(typeof n=="string")o.push({expression:n});else if(n.expression){let r=n;o.push({expression:r.expression,description:r.description});}}return {id:e.id,description:e.description,keys:o,mode:e.mode||"all"}}function ze(t){let e=t;return {id:e.id,oneTime:e.oneTime??false,metadata:e.metadata}}function Oe(t,e){return {id:t,description:e.description,gates:e.gates||[],forkable:e.forkable}}async function H(t){let e=S.resolve(t);return await glob("**/portal.yaml",{cwd:e,absolute:true,ignore:["**/node_modules/**","**/dist/**","**/.git/**"]})}var Ee={component:"#",flow:"$",gate:"^",signal:"!",aspect:"~"},Fe={"#":"component",$:"flow","^":"gate","!":"signal","~":"aspect"},Te=["#","$","^","!","~"];function Re(t){return Te.includes(t)}var Le=z$1.object({x:z$1.number(),y:z$1.number()}),Me=z$1.object({x:z$1.number(),y:z$1.number(),zoom:z$1.number()}),J=z$1.object({path:z$1.string(),include:z$1.array(z$1.string()).optional(),exclude:z$1.array(z$1.string()).optional()}),ee=z$1.object({id:z$1.string(),symbol:z$1.string(),type:z$1.enum(["feature","component","flow","state","aspect","gate","signal","idea"]),content:z$1.string().optional(),position:Le,tags:z$1.array(z$1.string()).optional(),created:z$1.string(),modified:z$1.string().optional()}),te=z$1.object({from:z$1.string(),to:z$1.string(),label:z$1.string().optional(),type:z$1.string().optional()}),Ge=z$1.object({id:z$1.string(),name:z$1.string(),nodes:z$1.array(z$1.string()),color:z$1.string().optional()}),oe=z$1.object({viewport:Me,groups:z$1.array(Ge).optional()}),Be=z$1.object({nodes:z$1.array(ee),connections:z$1.array(te),layout:oe}),Ve=z$1.object({id:z$1.string(),name:z$1.string(),timestamp:z$1.string(),description:z$1.string().optional(),state:Be}),Ye=z$1.object({version:z$1.string(),metadata:z$1.object({name:z$1.string(),created:z$1.string(),modified:z$1.string()}),sources:z$1.object({purpose:z$1.array(J).optional(),portal:z$1.array(J).optional()}),nodes:z$1.array(ee),connections:z$1.array(te),layout:oe,snapshots:z$1.array(Ve).optional()});function nt(t){let e=[],o;try{o=x.readFileSync(t,"utf8");}catch(n){return e.push(`Cannot read file: ${n.message}`),{data:null,errors:e,rawContent:void 0}}return We(o)}function We(t){let e=[],o=null;try{o=C.load(t);}catch(r){let a=r,i=a.mark?.line?a.mark.line+1:void 0;return e.push(`YAML syntax error: ${a.reason||r.message}${i?` (line ${i})`:""}`),{data:null,errors:e,rawContent:t}}if(o==null)return {data:se(),errors:[],rawContent:t};let n=Ye.safeParse(o);if(!n.success){for(let r of n.error.issues){let a=r.path.join(".");e.push(`Schema error at ${a||"/"}: ${r.message}`);}return {data:o,errors:e,rawContent:t}}return {data:n.data,errors:[],rawContent:t}}function se(t="Untitled"){let e=new Date().toISOString();return {version:"1.0.0",metadata:{name:t,created:e,modified:e},sources:{purpose:[{path:"./"}],portal:[{path:"./portal.yaml"}]},nodes:[],connections:[],layout:{viewport:{x:0,y:0,zoom:1}}}}function _e(t){return t.metadata.modified=new Date().toISOString(),C.dump(t,{indent:2,lineWidth:-1,noRefs:true,sortKeys:false})}function rt(t="My Project"){return _e(se(t))}function at(t,e){return {...t,nodes:[...t.nodes,e],metadata:{...t.metadata,modified:new Date().toISOString()}}}function it(t,e,o){return {...t,nodes:t.nodes.map(n=>n.id===e?{...n,position:o,modified:new Date().toISOString()}:n),metadata:{...t.metadata,modified:new Date().toISOString()}}}function ct(t,e){return t.connections.some(n=>n.from===e.from&&n.to===e.to)?t:{...t,connections:[...t.connections,e],metadata:{...t.metadata,modified:new Date().toISOString()}}}function pt(t,e,o){let n={id:`snap-${Date.now()}`,name:e,timestamp:new Date().toISOString(),description:o,state:{nodes:[...t.nodes],connections:[...t.connections],layout:{...t.layout}}};return {...t,snapshots:[...t.snapshots||[],n],metadata:{...t.metadata,modified:new Date().toISOString()}}}async function Ne(t,e){let o=[],n=[],r=[],a=[];if(t.sources.purpose)for(let p of t.sources.purpose){let f=S.resolve(e,p.path);try{let u=await V(f);r.push(...u.map(d=>d.filePath));let g=Y(u);for(let[d,{item:m,filePath:y}]of g){let P=["feature",...m.tags||[]];o.push($({id:`purpose-feature-${d}`,symbol:`#${d}`,type:"component",source:"purpose",filePath:y,data:m,description:m.description,tags:P,componentType:m.type,parentSymbol:m.parent,anchors:m.anchors?.map(pe=>T(pe))}));}let h=W(u);for(let[d,{item:m,filePath:y}]of h)o.push($({id:`purpose-component-${d}`,symbol:`#${d}`,type:"component",source:"purpose",filePath:y,data:m,description:m.description,tags:m.tags,componentType:m.type,parentSymbol:m.parent,anchors:m.anchors?.map(P=>T(P))}));let w=_(u);for(let[d,{item:m,filePath:y}]of w)o.push($({id:`purpose-gate-${d}`,symbol:`^${d}`,type:"gate",source:"purpose",filePath:y,data:m,description:m.description}));let v=N(u);for(let[d,{item:m,filePath:y}]of v)o.push($({id:`purpose-state-${d}`,symbol:`#${d}`,type:"component",source:"purpose",filePath:y,data:m,description:m.description,tags:["state"]}));let re=K(u);for(let[d,{item:m,filePath:y}]of re)o.push($({id:`purpose-flow-${d}`,symbol:`$${d}`,type:"flow",source:"purpose",filePath:y,data:m,description:m.description}));let ae=q(u);for(let[d,{item:m,filePath:y}]of ae)o.push($({id:`purpose-signal-${d}`,symbol:`!${d}`,type:"signal",source:"purpose",filePath:y,data:m,description:m.description}));let ie=Z(u);for(let[d,{item:m,filePath:y}]of ie)o.push($({id:`purpose-aspect-${d}`,symbol:`~${d}`,type:"aspect",source:"purpose",filePath:y,data:m,description:m.description,anchors:m.anchors?.map(P=>T(P)),appliesTo:m["applies-to"],tags:m.tags,enforcement:m.enforcement}));let ce=U(u),R=new Set(o.map(d=>d.symbol));for(let d of ce)R.has(d.symbol)||(R.add(d.symbol),o.push($({id:`purpose-ref-${d.type}-${d.symbol.slice(1)}`,symbol:d.symbol,type:d.type,source:"purpose",filePath:d.filePath,data:{referencedFrom:d.sourceSymbol},description:`Referenced from ${d.sourceSymbol}`})));}catch(u){n.push({source:"purpose",filePath:f,message:u.message});}}if(t.sources.portal)for(let p of t.sources.portal){let f=S.resolve(e,p.path);try{let u;if(f.endsWith(".yaml")||f.endsWith(".yml"))u=await I(f),a.push(f);else {let g=await H(f);if(a.push(...g),g.length>0){u=await I(g[0]);for(let h=1;h<g.length;h++){let w=await I(g[h]);u.gates.push(...w.gates),u.flows.push(...w.flows);}}else continue}for(let g of u.gates){o.push(Ke(g,f));for(let h of g.prizes)o.push($({id:`gate-signal-${g.id}-${h.id}`,symbol:`!${h.id}`,type:"signal",source:"portal",filePath:f,data:h,description:`Signal from gate ${g.id}`}));}for(let g of u.flows)o.push(qe(g,f));}catch(u){n.push({source:"portal",filePath:f,message:u.message});}}for(let p of t.nodes){let f=p.tags?.includes("idea");if(!p.content&&!f){let u=o.find(g=>g.symbol===p.symbol);if(u){u.position=p.position,u.tags=p.tags;continue}}o.push($({id:p.id,symbol:p.symbol,type:p.type,source:"premise",filePath:".premise",data:p,description:p.content,position:p.position,tags:p.tags,created:p.created,modified:p.modified}));}Ue(o);let i=new Map;for(let p of o){let f=i.get(p.symbol)||[];f.includes(p.filePath)||f.push(p.filePath),i.set(p.symbol,f);}let l=[];for(let[p,f]of i)f.length>1&&l.push({symbol:p,files:f});return {symbols:o,purposeFiles:r,portalFiles:a,errors:n,timestamp:Date.now(),...l.length>0?{duplicateSymbols:l}:{}}}function $(t){return {...t,data:t.data??null,references:t.references??[],referencedBy:t.referencedBy??[]}}function Ke(t,e){return $({id:`gate-${t.id}`,symbol:`^${t.id}`,type:"gate",source:"portal",filePath:e,data:t,description:t.description,position:t.position})}function qe(t,e){return $({id:`gate-flow-${t.id}`,symbol:`$${t.id}`,type:"flow",source:"portal",filePath:e,data:t,description:t.description})}function T(t){let e=t.lastIndexOf(":");if(e===-1||e===t.length-1)return {path:t,lines:0,raw:t};let o=t.slice(e+1),n=t.slice(0,e);if(!/^[\d,\- ]+$/.test(o))return {path:t,lines:0,raw:t};if(o.includes("-")){let[r,a]=o.split("-").map(Number);return {path:n,lines:[r,a],raw:t}}else if(o.includes(",")){let r=o.split(",").map(Number);return {path:n,lines:r,raw:t}}else return {path:n,lines:Number(o),raw:t}}var Ze=new Set(["$lib","$env","$app","$service-worker","$virtual","$schema","$ref","$id","$type"]);function Ue(t){let e=new Map(t.map(o=>[o.symbol,o]));for(let o of t){let n=JSON.stringify(o.data),r=/(?:\?[@#$%~^!]|[@#$%~^!?])[a-zA-Z][\w-]*/g,a=(n.match(r)||[]).filter(i=>!Ze.has(i));for(let i of a)if(i!==o.symbol&&e.has(i)){o.references.includes(i)||o.references.push(i);let l=e.get(i);l&&!l.referencedBy.includes(o.symbol)&&l.referencedBy.push(o.symbol);}}}async function ut(t){let e={metadata:{name:S.basename(t),created:new Date().toISOString(),modified:new Date().toISOString()},sources:{purpose:[{path:"./"}],portal:[{path:"./"}]},nodes:[]};return Ne(e,t)}function Xe(){return {entries:new Map,byType:new Map,bySource:new Map,timestamp:0}}function dt(t){let e=Xe();e.timestamp=t.timestamp;for(let o of t.symbols)e.entries.set(o.id,o),e.byType.has(o.type)||e.byType.set(o.type,[]),e.byType.get(o.type).push(o),e.bySource.has(o.source)||e.bySource.set(o.source,[]),e.bySource.get(o.source).push(o);return e}function A(t,e){for(let o of t.entries.values())if(o.symbol===e)return o}function mt(t,e){return t.entries.get(e)}function z(t,e){return t.byType.get(e)||[]}function gt(t,e){return t.bySource.get(e)||[]}function He(t,e){let o=e.toLowerCase(),n=[];for(let r of t.entries.values()){if(r.symbol.toLowerCase().includes(o)){n.push(r);continue}if(r.description?.toLowerCase().includes(o)){n.push(r);continue}if(r.tags?.some(a=>a.toLowerCase().includes(o))){n.push(r);continue}if(r.componentType?.toLowerCase().includes(o)){n.push(r);continue}}return n}function ht(t,e){return z(t,"component").filter(n=>n.componentType===e)}function yt(t){let e=new Set,o=z(t,"component");for(let n of o)n.componentType&&e.add(n.componentType);return Array.from(e).sort()}function $t(t,e){return z(t,"component").filter(n=>n.parentSymbol===e)}function wt(t,e){let o=A(t,e);return o?o.referencedBy.map(n=>A(t,n)).filter(n=>n!==void 0):[]}function bt(t,e){let o=A(t,e);return o?o.references.map(n=>A(t,n)).filter(n=>n!==void 0):[]}function St(t,e){let o=[];for(let n of t.entries.values())n.tags?.includes(e)&&o.push(n);return o}function vt(t){let e=new Set;for(let o of t.entries.values())for(let n of o.tags||[])e.add(n);return Array.from(e).sort()}function Pt(t){let e={component:0,flow:0,gate:0,signal:0,aspect:0};for(let[o,n]of t.byType)o in e&&(e[o]=n.length);return e}function xt(t){return Array.from(t.entries.values())}function ne(t){if(t.length<2)return null;let e=t[0],o=t.slice(1);return Re(e)?{type:Fe[e],name:o}:null}function jt(t,e){return `${Ee[t]}${e}`}function kt(t){return ne(t)!==null}function Ct(t,e,o=10){let n=e.toLowerCase(),r=ne(e);return r?z(t,r.type).filter(i=>i.symbol.toLowerCase().includes(n)).slice(0,o):He(t,e).slice(0,o)}export{Fe as PREFIX_TO_TYPE,Ee as SYMBOL_PREFIXES,ct as addConnection,at as addPremiseNode,ut as aggregateFromDirectory,Ne as aggregateFromPremise,dt as buildSymbolIndex,se as createEmptyPremiseFile,pt as createSnapshot,Xe as createSymbolIndex,jt as createSymbolString,yt as getAllComponentTypes,xt as getAllSymbols,vt as getAllTags,Ct as getAutocompleteSuggestions,$t as getChildComponents,ht as getComponentsByType,rt as getDefaultPremiseContent,bt as getReferencesFrom,wt as getReferencesTo,A as getSymbol,mt as getSymbolById,Pt as getSymbolCounts,gt as getSymbolsBySource,St as getSymbolsByTag,z as getSymbolsByType,kt as isValidSymbol,We as parsePremiseContent,nt as parsePremiseFile,ne as parseSymbol,He as searchSymbols,_e as serializePremiseFile,it as updateNodePosition};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export{q as ContextEnricher,j as FlowTracker,n as IncidentGrouper,s as PatternImporter,f as PatternMatcher,r as PatternSuggester,k as Sentinel,a as SentinelClient,c as SentinelTransport,p as StatsCalculator,o as TimelineBuilder,b as createSentinelClient,d as createSentinelTransport,l as detectSymbols,e as enableSentinel,m as generateConfig,i as loadAllSeedPatterns,h as loadParadigmPatterns,g as loadUniversalPatterns}from'./chunk-4QADCWPU.js';export{b as DEFAULT_AUTH_CONFIG,c as DEFAULT_RATE_LIMIT_CONFIG,d as DEFAULT_SERVER_CONFIG,h as PARADIGM_SCHEMA,i as SYMPHONY_SCHEMA,a as SentinelStorage,e as loadConfig,g as loadServerConfig,f as writeConfig}from'./chunk-NKYNHSA5.js';import'./chunk-5TAVYPOV.js';
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export{e as findGateFiles,g as formatValidationResult,d as getDefaultGateConfig,a as parseGateConfig,b as parseGateFile,c as serializeGateConfig,f as validateGateConfig}from'./chunk-QT2LKB3P.js';import'./chunk-5TAVYPOV.js';
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export{z as ContextEnricher,g as DEFAULT_AUTH_CONFIG,h as DEFAULT_RATE_LIMIT_CONFIG,i as DEFAULT_SERVER_CONFIG,s as FlowTracker,w as IncidentGrouper,m as PARADIGM_SCHEMA,B as PatternImporter,o as PatternMatcher,A as PatternSuggester,n as SYMPHONY_SCHEMA,t as Sentinel,a as SentinelClient,f as SentinelStorage,c as SentinelTransport,y as StatsCalculator,x as TimelineBuilder,b as createSentinelClient,d as createSentinelTransport,u as detectSymbols,e as enableSentinel,v as generateConfig,r as loadAllSeedPatterns,j as loadConfig,q as loadParadigmPatterns,l as loadServerConfig,p as loadUniversalPatterns,k as writeConfig}from'./chunk-KLBH26PA.js';import'./chunk-5TAVYPOV.js';
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import {a,d,e,f,g,c,h}from'./chunk-BFD3GFRK.js';import'./chunk-5TAVYPOV.js';import {Router}from'express';function y(e$1){let a$1=Router();return a$1.get("/manifest",(o,s)=>{try{let t=a(e$1),n=d(e$1,t);s.json(n);}catch(t){s.status(500).json({error:"Failed to build docs manifest",detail:String(t)});}}),a$1.get("/symbol/:id",(o,s)=>{try{let t=e(e$1,o.params.id);if(!t){s.status(404).json({error:`Symbol "${o.params.id}" not found`});return}s.json(t);}catch(t){s.status(500).json({error:"Failed to build symbol page",detail:String(t)});}}),a$1.get("/flow/:id",(o,s)=>{try{let t=f(e$1,o.params.id);if(!t){s.status(404).json({error:`Flow "${o.params.id}" not found`});return}s.json(t);}catch(t){s.status(500).json({error:"Failed to build flow page",detail:String(t)});}}),a$1.get("/portal",(o,s)=>{try{let t=g(e$1);s.json(t);}catch(t){s.status(500).json({error:"Failed to build portal page",detail:String(t)});}}),a$1.get("/page/:slug",(o,s)=>{try{let t=a(e$1),n=c(e$1,o.params.slug,t);if(!n){s.status(404).json({error:`Page "${o.params.slug}" not found`});return}s.json(n);}catch(t){s.status(500).json({error:"Failed to load custom page",detail:String(t)});}}),a$1.get("/search",(o,s)=>{try{let t=o.query.q||"";if(!t){s.json({count:0,results:[]});return}let n=o.query.limit?parseInt(o.query.limit,10):20,u=h(e$1,t,n);s.json({count:u.length,results:u});}catch(t){s.status(500).json({error:"Failed to search docs",detail:String(t)});}}),a$1}export{y as createDocsRouter};
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ import {a,d,e,f,g,b}from'./chunk-BFD3GFRK.js';import'./chunk-5TAVYPOV.js';import n from'chalk';import*as t from'fs';import*as o from'path';import {fileURLToPath}from'url';async function C(c){let s=process.cwd(),e=parseInt(c.port||"3850",10),p=c.open!==false;console.log(n.cyan(`
3
+ Starting Paradigm Docs...
4
+ `));try{let{startPlatformServer:i}=await import('./platform-server-2KXHGHFV.js');await i({projectDir:s,port:e,open:p,sections:["overview","docs"]}),console.log(n.green(` Docs running at ${n.bold(`http://localhost:${e}`)}`)),console.log(n.gray(` Press Ctrl+C to stop
5
+ `)),await new Promise(()=>{});}catch(i){i.code==="EADDRINUSE"?(console.error(n.red(`
6
+ Error: Port ${e} is already in use.`)),console.log(n.gray(` Try: paradigm docs serve --port ${e+1}
7
+ `))):console.error(n.red(`
8
+ Failed to start Paradigm Docs:`),i),process.exit(1);}}var k=fileURLToPath(import.meta.url),v=o.dirname(k);async function F(c){let s=process.cwd();for(;s!=="/"&&!t.existsSync(o.join(s,".paradigm"));)s=o.dirname(s);s==="/"&&(console.error(n.red(" Not in a Paradigm project (no .paradigm/ directory found)")),process.exit(1));let e$1=a(s),p=c.output||e$1.output||".paradigm/docs-site",i=o.resolve(s,p),r=o.join(i,"_data");console.log(n.cyan(`
9
+ Building docs to ${n.white(i)}...
10
+ `)),t.mkdirSync(o.join(r,"symbols"),{recursive:true}),t.mkdirSync(o.join(r,"flows"),{recursive:true}),t.mkdirSync(o.join(r,"pages"),{recursive:true});let u=d(s,e$1);t.writeFileSync(o.join(r,"manifest.json"),JSON.stringify(u,null,2),"utf8"),console.log(n.gray(` manifest.json (${u.totalSymbols} symbols)`));let g$1=0;for(let f$1 of u.groups){let h=[...f$1.items];if(f$1.subgroups)for(let a of f$1.subgroups)h.push(...a.items);for(let a of h)if(["component","signal","aspect","gate"].includes(a.kind)){let d=e(s,a.id);d&&(t.writeFileSync(o.join(r,"symbols",`${a.id}.json`),JSON.stringify(d,null,2),"utf8"),g$1++);}else if(a.kind==="flow"){let d=f(s,a.id);d&&t.writeFileSync(o.join(r,"flows",`${a.id}.json`),JSON.stringify(d,null,2),"utf8");}}let $=g(s);t.writeFileSync(o.join(r,"portal.json"),JSON.stringify($,null,2),"utf8");let y=b(s,e$1.customContent);for(let f of y)t.writeFileSync(o.join(r,"pages",`${f.slug}.json`),JSON.stringify(f,null,2),"utf8");let m=o.join(v,"..","..","platform-ui","dist");t.existsSync(m)||(m=o.join(v,"..","..","..","platform-ui","dist")),t.existsSync(m)&&(x(m,i),console.log(n.gray(" Copied SPA shell"))),console.log(n.gray(` ${g$1} symbol pages`)),console.log(n.gray(` ${y.length} custom pages`)),console.log(n.gray(" portal.json")),console.log(n.green(`
11
+ Docs built to ${i}
12
+ `));}function x(c,s){t.mkdirSync(s,{recursive:true});for(let e of t.readdirSync(c,{withFileTypes:true})){let p=o.join(c,e.name),i=o.join(s,e.name);e.isDirectory()?e.name!=="_data"&&x(p,i):t.copyFileSync(p,i);}}export{F as docsBuildCommand,C as docsServeCommand};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export{a as doctorCommand}from'./chunk-RVRARWSY.js';import'./chunk-HMQ5BHP2.js';import'./chunk-JQKKVAAN.js';import'./chunk-LKAT7IAK.js';import'./chunk-5TAVYPOV.js';
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ import'./chunk-5TAVYPOV.js';import*as d from'fs';import*as m from'path';import*as _ from'crypto';import {execSync}from'child_process';import u from'chalk';function x(o){return o.split(`
3
+ `).map(a=>a.trimEnd()).filter(a=>a.trim().length>0).join(`
4
+ `).replace(/\s+/g," ").trim()}function j(o){let a=[],l=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/gm,i;for(;(i=l.exec(o))!==null;)a.push({oldStart:parseInt(i[1],10),oldCount:i[2]!==void 0?parseInt(i[2],10):1,newCount:i[4]!==void 0?parseInt(i[4],10):1});return a}function T(o,a,l,i,c){let h;try{h=execSync(`git diff ${l}..HEAD --unified=0 -- "${a}"`,{cwd:o,encoding:"utf8",timeout:5e3});}catch{return null}if(!h.trim())return null;let p=j(h),s=0;for(let t of p){if(t.oldStart+t.oldCount<=i){s+=t.newCount-t.oldCount;continue}if(t.oldStart<c)return null;break}return s===0?null:{newStart:i+s,newEnd:c+s}}function F(o,a,l,i,c,h,p){let s=m.isAbsolute(a)?a:m.join(o,a);if(!d.existsSync(s))return false;try{let t=d.readFileSync(s,"utf8"),r=i===c?`${l}:${i}`:`${l}:${i}-${c}`,n=h===p?`${l}:${h}`:`${l}:${h}-${p}`;return t.includes(r)?(d.writeFileSync(s,t.replace(r,n),"utf8"),!0):!1}catch{return false}}async function W(o){let a=process.cwd(),l=m.join(a,".paradigm","aspect-graph.db");if(!d.existsSync(l)){o.json?console.log(JSON.stringify({driftedCount:0,healedCount:0,cleanCount:0,missingCount:0,details:[]})):console.log(u.gray("No aspect-graph.db found. Run paradigm_aspect_check to initialize."));return}let i=o.autoHeal!==false;try{let c=(await import('sql.js')).default,h=await c(),p=d.readFileSync(l),s=new h.Database(p),t=[];try{let n=s.prepare("SELECT id, aspect_id, file_path, start_line, end_line, content_hash, normalized_hash, materialized_at_commit, drifted FROM anchors"),g=[];for(;n.step();){let e=n.getAsObject();g.push(e);}n.free();for(let e of g){let S=m.isAbsolute(e.file_path)?e.file_path:m.join(a,e.file_path);if(!d.existsSync(S)){t.push({aspectId:e.aspect_id,path:e.file_path,startLine:e.start_line,endLine:e.end_line,status:"missing"});continue}let C=d.readFileSync(S,"utf8").split(`
5
+ `),D=Math.max(0,e.start_line-1),R=Math.min(C.length,e.end_line),y=C.slice(D,R).join(`
6
+ `),E=_.createHash("sha256").update(y).digest("hex");if(e.content_hash!=null&&E===e.content_hash){e.drifted===1&&s.run("UPDATE anchors SET drifted = 0 WHERE id = ?",[e.id]),t.push({aspectId:e.aspect_id,path:e.file_path,startLine:e.start_line,endLine:e.end_line,status:"clean"});continue}let H=_.createHash("sha256").update(x(y)).digest("hex");if(e.normalized_hash!=null&&H===e.normalized_hash){s.run("UPDATE anchors SET content_hash = ?, drifted = 0 WHERE id = ?",[E,e.id]),t.push({aspectId:e.aspect_id,path:e.file_path,startLine:e.start_line,endLine:e.end_line,status:"cosmetic"});continue}if(e.content_hash==null&&e.normalized_hash==null){s.run("UPDATE anchors SET content_hash = ?, normalized_hash = ?, drifted = 0 WHERE id = ?",[E,H,e.id]),t.push({aspectId:e.aspect_id,path:e.file_path,startLine:e.start_line,endLine:e.end_line,status:"clean"});continue}let $=!1;if(e.materialized_at_commit){let f=T(a,e.file_path,e.materialized_at_commit,e.start_line,e.end_line);if(f){let w=C.slice(Math.max(0,f.newStart-1),Math.min(C.length,f.newEnd)).join(`
7
+ `),L=_.createHash("sha256").update(w).digest("hex");if(e.content_hash!=null&&L===e.content_hash||e.normalized_hash!=null&&_.createHash("sha256").update(x(w)).digest("hex")===e.normalized_hash){if(i){let k=_.createHash("sha256").update(w).digest("hex");s.run("UPDATE anchors SET start_line = ?, end_line = ?, content_hash = ?, drifted = 0 WHERE id = ?",[f.newStart,f.newEnd,k,e.id]);let b=s.prepare("SELECT defined_in FROM aspects WHERE id = ?");if(b.bind([e.aspect_id]),b.step()){let z=b.getAsObject();F(a,z.defined_in,e.file_path,e.start_line,e.end_line,f.newStart,f.newEnd);}b.free();}t.push({aspectId:e.aspect_id,path:e.file_path,startLine:i?f.newStart:e.start_line,endLine:i?f.newEnd:e.end_line,status:"shifted",autoHealed:i}),$=!0;}}}$||(s.run("UPDATE anchors SET drifted = 1 WHERE id = ?",[e.id]),t.push({aspectId:e.aspect_id,path:e.file_path,startLine:e.start_line,endLine:e.end_line,status:"modified"}));}let A=s.export();d.writeFileSync(l,Buffer.from(A));}finally{s.close();}let r={driftedCount:t.filter(n=>n.status==="modified").length,healedCount:t.filter(n=>n.status==="shifted"&&n.autoHealed).length,cleanCount:t.filter(n=>n.status==="clean"||n.status==="cosmetic").length,missingCount:t.filter(n=>n.status==="missing").length,details:t};if(o.json)console.log(JSON.stringify(r));else {if(console.log(u.blue(`
8
+ Aspect Drift Check
9
+ `)),r.healedCount>0&&console.log(u.green(` Auto-healed: ${r.healedCount} shifted anchor(s)`)),r.cleanCount>0&&console.log(u.green(` Clean: ${r.cleanCount} anchor(s)`)),r.driftedCount>0){console.log(u.red(` Drifted: ${r.driftedCount} anchor(s) (content changed)`));for(let n of t.filter(g=>g.status==="modified"))console.log(u.red(` ${n.aspectId}: ${n.path}:${n.startLine}-${n.endLine}`));}r.missingCount>0&&console.log(u.yellow(` Missing: ${r.missingCount} anchor file(s) deleted`)),r.driftedCount===0&&r.missingCount===0?console.log(u.green(`
10
+ All anchors are clean.
11
+ `)):console.log(u.gray(`
12
+ Run paradigm_aspect_check to review and fix.
13
+ `));}}catch(c){o.json?console.log(JSON.stringify({driftedCount:0,healedCount:0,cleanCount:0,missingCount:0,details:[],error:String(c)})):console.log(u.red(`Drift check failed: ${c}`));}}export{W as driftCheckCommand};