@a-company/paradigm 5.38.0 → 6.0.2

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 (328) hide show
  1. package/dist/{accept-orchestration-OATWIRHP.js → accept-orchestration-QQISPINV.js} +1 -1
  2. package/dist/add-UOR4INIV.js +8 -0
  3. package/dist/{agent-loader-RIVI6QPP.js → agent-loader-2WJHD46U.js} +1 -1
  4. package/dist/{agent-loader-RJRVO5GQ.js → agent-loader-YKS2PQWO.js} +1 -1
  5. package/dist/{ambient-76YMUA5Q.js → ambient-BE3SQXNN.js} +1 -1
  6. package/dist/{ambient-WTLYUAQM.js → ambient-NVKQCW2A.js} +12 -12
  7. package/dist/{assess-UFPYEJKP.js → assess-63WXHWJV.js} +1 -1
  8. package/dist/{calibration-OLJYB5HN.js → calibration-BDHGYJOK.js} +1 -1
  9. package/dist/{chunk-5QOCKWK5.js → chunk-4PSD5R7N.js} +2 -2
  10. package/dist/{chunk-HOBHJPTL.js → chunk-6SKSV5B2.js} +1 -1
  11. package/dist/{chunk-4L7665QV.js → chunk-FEYOQMZ5.js} +1 -1
  12. package/dist/{chunk-NEJ4ZLCY.js → chunk-GAFKOFAV.js} +1 -1
  13. package/dist/chunk-GRZQIKST.js +2 -0
  14. package/dist/{chunk-RLCH7DXQ.js → chunk-K7X3Z3GL.js} +1 -1
  15. package/dist/{chunk-4VKSEOXZ.js → chunk-LPBCQM5Y.js} +3 -3
  16. package/dist/{chunk-74SGKSRQ.js → chunk-M2HKWR25.js} +1 -1
  17. package/dist/{chunk-BOYQAMGC.js → chunk-M3PPXJU4.js} +1 -1
  18. package/dist/chunk-PHEX6LU4.js +111 -0
  19. package/dist/chunk-Q527BPUF.js +2 -0
  20. package/dist/chunk-R5ECMBIV.js +11 -0
  21. package/dist/{chunk-X3U3IGYT.js → chunk-TBWWFRL5.js} +1 -1
  22. package/dist/{chunk-MQIG6SMF.js → chunk-TNVWGPCE.js} +1 -1
  23. package/dist/chunk-TZDYIPVU.js +521 -0
  24. package/dist/{chunk-3XGNXXCT.js → chunk-UZ5H7K6Q.js} +1 -1
  25. package/dist/chunk-VIG5LSGZ.js +2 -0
  26. package/dist/chunk-VNIX5KBT.js +3 -0
  27. package/dist/{chunk-AGFPVSX5.js → chunk-VXIIVMTM.js} +1 -1
  28. package/dist/{chunk-ORDKEGII.js → chunk-WESTEMIM.js} +1 -1
  29. package/dist/{chunk-DOCDDDTD.js → chunk-YNDPSWOE.js} +5 -5
  30. package/dist/chunk-Z5QW6USC.js +2 -0
  31. package/dist/{compliance-D7GD6ZYC.js → compliance-BNFWQPKM.js} +1 -1
  32. package/dist/config-schema-FLHRVZMI.js +2 -0
  33. package/dist/{context-audit-XRPT3OU2.js → context-audit-JVCA6GSV.js} +1 -1
  34. package/dist/{cursorrules-U5O4G5T4.js → cursorrules-ZXPXPZ3P.js} +1 -1
  35. package/dist/decision-loader-HELL2AMX.js +2 -0
  36. package/dist/{delete-P5VULXR4.js → delete-2C6ALLYY.js} +1 -1
  37. package/dist/{diff-YGHBIJY5.js → diff-MF55KQZH.js} +1 -1
  38. package/dist/{dist-KGRCLBJP-2QAPFYNF.js → dist-GQ42YS5N-4HIJZVBB.js} +10 -10
  39. package/dist/{docs-USDAF26F.js → docs-O37YLLRN.js} +1 -1
  40. package/dist/doctor-IG5XM4C4.js +2 -0
  41. package/dist/{edit-GUU3HBVW.js → edit-P3MDAZLU.js} +1 -1
  42. package/dist/{flow-FVZR3YJ4.js → flow-BGXOVE2V.js} +1 -1
  43. package/dist/index.js +6 -6
  44. package/dist/init-M44SO65G.js +2 -0
  45. package/dist/{init-XYB62Q3X.js → init-V4KSEKPK.js} +1 -1
  46. package/dist/{list-YKIQNKGB.js → list-2XIWUEMA.js} +1 -1
  47. package/dist/list-CFHINXIS.js +12 -0
  48. package/dist/lore-loader-D2ISOASW.js +2 -0
  49. package/dist/lore-loader-PXFKMKAN.js +2 -0
  50. package/dist/mcp.js +4 -4
  51. package/dist/metrics-UESGUHTA.js +2 -0
  52. package/dist/migrate-assessments-YSITX7KM.js +4 -0
  53. package/dist/migrate-decisions-NPLQOEEH.js +6 -0
  54. package/dist/migrate-plsat-EM2ACIQ3.js +6 -0
  55. package/dist/{nomination-engine-EALA5MGI.js → nomination-engine-QPZJH6XO.js} +1 -1
  56. package/dist/{notebook-loader-PXNRBBXD.js → notebook-loader-3J2OFMS3.js} +1 -1
  57. package/dist/{orchestrate-M5PBZBJQ.js → orchestrate-RID7HHHH.js} +1 -1
  58. package/dist/{platform-server-DNAMH4YI.js → platform-server-UD45NTGV.js} +1 -1
  59. package/dist/{portal-check-ZMLVBIGW.js → portal-check-DV2VSJ5E.js} +1 -1
  60. package/dist/portal-compliance-JONQ4SOP.js +2 -0
  61. package/dist/{probe-3FTG6LYO.js → probe-5HAXULAD.js} +1 -1
  62. package/dist/{providers-AWA7WLLM.js → providers-4PXMWA7V.js} +1 -1
  63. package/dist/quiz-WYIZJG5K.js +10 -0
  64. package/dist/{record-YXPB34MY.js → record-N3VNYYKJ.js} +1 -1
  65. package/dist/reindex-FWPD2VGM.js +2 -0
  66. package/dist/{retag-N5XF3KXP.js → retag-72R2OSZV.js} +1 -1
  67. package/dist/{review-77QI6VOC.js → review-2INNWLTW.js} +1 -1
  68. package/dist/{sentinel-HYAZ3CO5.js → sentinel-EFPEX246.js} +1 -1
  69. package/dist/{sentinel-bridge-VR357PKL.js → sentinel-bridge-UR2MKARY.js} +1 -1
  70. package/dist/{serve-U47GULB6.js → serve-MO35XIZE.js} +1 -1
  71. package/dist/serve-OQYUO7CR.js +12 -0
  72. package/dist/{server-4YNUIK4W.js → server-4D77LCST.js} +1 -1
  73. package/dist/server-FGUL2FWQ.js +7 -0
  74. package/dist/session-tracker-KGORN6B5.js +2 -0
  75. package/dist/{session-work-log-PAKXOFGL.js → session-work-log-4IEVE4KK.js} +1 -1
  76. package/dist/{session-work-log-ZP45TREI.js → session-work-log-EE4UIZ33.js} +1 -1
  77. package/dist/{setup-FEWSYS3Y.js → setup-ZSEC72BS.js} +1 -1
  78. package/dist/{shift-PC6C7NUX.js → shift-TVNY2CQF.js} +6 -6
  79. package/dist/{show-PJ5LFLIL.js → show-JH7LJ5MT.js} +1 -1
  80. package/dist/show-WVHAL4VU.js +7 -0
  81. package/dist/{spawn-M5BAV252.js → spawn-UH5RENSE.js} +1 -1
  82. package/dist/status-S7Z5FVIE.js +6 -0
  83. package/dist/{summary-PYTEIJ4U.js → summary-WLI3NF4G.js} +2 -2
  84. package/dist/{sweep-HU74OPVW.js → sweep-7TZFN5NS.js} +1 -1
  85. package/dist/sync-55U6QPIA.js +2 -0
  86. package/dist/{sync-llms-7CAI74QL.js → sync-llms-GF7DDQDI.js} +1 -1
  87. package/dist/{team-PDK64JXI.js → team-MGT66HZQ.js} +1 -1
  88. package/dist/{timeline-K3ZFKJ3R.js → timeline-RK7O2SCM.js} +1 -1
  89. package/dist/tools-QJHAVYI6.js +2 -0
  90. package/dist/university-content/notes/N-para-001-build-something.md +126 -0
  91. package/dist/university-content/notes/N-para-001-meet-the-team.md +85 -0
  92. package/dist/university-content/notes/N-para-001-shift-setup.md +74 -0
  93. package/dist/university-content/notes/N-para-101-component-types.md +99 -0
  94. package/dist/university-content/notes/N-para-101-first-steps.md +134 -0
  95. package/dist/university-content/notes/N-para-101-five-symbols.md +128 -0
  96. package/dist/university-content/notes/N-para-101-paradigm-logger.md +89 -0
  97. package/dist/university-content/notes/N-para-101-portal-yaml.md +112 -0
  98. package/dist/university-content/notes/N-para-101-project-structure.md +143 -0
  99. package/dist/university-content/notes/N-para-101-purpose-files.md +121 -0
  100. package/dist/university-content/notes/N-para-101-tags-and-classification.md +93 -0
  101. package/dist/university-content/notes/N-para-101-welcome.md +51 -0
  102. package/dist/university-content/notes/N-para-201-architecture-review.md +175 -0
  103. package/dist/university-content/notes/N-para-201-aspect-graph.md +79 -0
  104. package/dist/university-content/notes/N-para-201-aspects-and-anchors.md +112 -0
  105. package/dist/university-content/notes/N-para-201-component-patterns.md +138 -0
  106. package/dist/university-content/notes/N-para-201-cross-cutting-concerns.md +145 -0
  107. package/dist/university-content/notes/N-para-201-disciplines.md +187 -0
  108. package/dist/university-content/notes/N-para-201-flows-deep-dive.md +119 -0
  109. package/dist/university-content/notes/N-para-201-gates-deep-dive.md +165 -0
  110. package/dist/university-content/notes/N-para-201-portal-protocol.md +133 -0
  111. package/dist/university-content/notes/N-para-201-signal-patterns.md +159 -0
  112. package/dist/university-content/notes/N-para-201-symbol-naming.md +149 -0
  113. package/dist/university-content/notes/N-para-301-context-management.md +53 -0
  114. package/dist/university-content/notes/N-para-301-decisions.md +99 -0
  115. package/dist/university-content/notes/N-para-301-doctor-and-validation.md +70 -0
  116. package/dist/university-content/notes/N-para-301-enforcement-levels.md +102 -0
  117. package/dist/university-content/notes/N-para-301-fragility-tracking.md +50 -0
  118. package/dist/university-content/notes/N-para-301-history-system.md +42 -0
  119. package/dist/university-content/notes/N-para-301-navigation-system.md +55 -0
  120. package/dist/university-content/notes/N-para-301-operations-review.md +55 -0
  121. package/dist/university-content/notes/N-para-301-paradigm-shift.md +93 -0
  122. package/dist/university-content/notes/N-para-301-protocols.md +113 -0
  123. package/dist/university-content/notes/N-para-301-ripple-analysis.md +53 -0
  124. package/dist/university-content/notes/N-para-301-sentinel-observability.md +87 -0
  125. package/dist/university-content/notes/N-para-301-sync-and-maintenance.md +57 -0
  126. package/dist/university-content/notes/N-para-301-wisdom-system.md +89 -0
  127. package/dist/university-content/notes/N-para-401-agent-identity.md +99 -0
  128. package/dist/university-content/notes/N-para-401-agent-interop.md +87 -0
  129. package/dist/university-content/notes/N-para-401-agent-roles.md +107 -0
  130. package/dist/university-content/notes/N-para-401-commit-conventions.md +82 -0
  131. package/dist/university-content/notes/N-para-401-mastery-review.md +71 -0
  132. package/dist/university-content/notes/N-para-401-mcp-tools-overview.md +102 -0
  133. package/dist/university-content/notes/N-para-401-multi-agent-coordination.md +80 -0
  134. package/dist/university-content/notes/N-para-401-notebooks-permissions.md +66 -0
  135. package/dist/university-content/notes/N-para-401-orchestration-workflow.md +101 -0
  136. package/dist/university-content/notes/N-para-401-pm-governance.md +71 -0
  137. package/dist/university-content/notes/N-para-401-provider-cascade.md +75 -0
  138. package/dist/university-content/notes/N-para-401-quick-check.md +95 -0
  139. package/dist/university-content/notes/N-para-501-advanced-workflows.md +122 -0
  140. package/dist/university-content/notes/N-para-501-aspect-graph-advanced.md +195 -0
  141. package/dist/university-content/notes/N-para-501-aspect-graph-internals.md +97 -0
  142. package/dist/university-content/notes/N-para-501-assessment-loops.md +116 -0
  143. package/dist/university-content/notes/N-para-501-conductor-workspace.md +77 -0
  144. package/dist/university-content/notes/N-para-501-habits-practice.md +164 -0
  145. package/dist/university-content/notes/N-para-501-hook-enforcement.md +100 -0
  146. package/dist/university-content/notes/N-para-501-lore-system.md +155 -0
  147. package/dist/university-content/notes/N-para-501-platform-agent-ui.md +108 -0
  148. package/dist/university-content/notes/N-para-501-review-compliance.md +72 -0
  149. package/dist/university-content/notes/N-para-501-sentinel-deep-dive.md +173 -0
  150. package/dist/university-content/notes/N-para-501-session-intelligence.md +104 -0
  151. package/dist/university-content/notes/N-para-501-symphony-a-mail.md +120 -0
  152. package/dist/university-content/notes/N-para-501-symphony-networking.md +119 -0
  153. package/dist/university-content/notes/N-para-501-task-management.md +100 -0
  154. package/dist/university-content/notes/N-para-601-agent-renaissance.md +121 -0
  155. package/dist/university-content/notes/N-para-601-attention-scoring.md +129 -0
  156. package/dist/university-content/notes/N-para-601-context-composition.md +146 -0
  157. package/dist/university-content/notes/N-para-601-data-sovereignty.md +140 -0
  158. package/dist/university-content/notes/N-para-601-event-stream.md +126 -0
  159. package/dist/university-content/notes/N-para-601-knowledge-streams.md +144 -0
  160. package/dist/university-content/notes/N-para-601-learning-loop.md +68 -0
  161. package/dist/university-content/notes/N-para-601-maestro-team-collab.md +136 -0
  162. package/dist/university-content/notes/N-para-601-nominations-debates.md +115 -0
  163. package/dist/university-content/notes/N-para-701-agent-notebooks.md +131 -0
  164. package/dist/university-content/notes/N-para-701-agent-pods-nevrland.md +182 -0
  165. package/dist/university-content/notes/N-para-701-agent-profiles.md +197 -0
  166. package/dist/university-content/notes/N-para-701-agent-roster.md +82 -0
  167. package/dist/university-content/notes/N-para-701-agent-state.md +180 -0
  168. package/dist/university-content/notes/N-para-701-learning-feedback-loop.md +188 -0
  169. package/dist/university-content/notes/N-para-701-model-tier-resolution.md +204 -0
  170. package/dist/university-content/notes/N-para-701-orchestration-enforcement.md +169 -0
  171. package/dist/university-content/notes/N-para-701-per-project-rosters.md +198 -0
  172. package/dist/university-content/notes/N-para-701-symphony-visibility.md +142 -0
  173. package/dist/university-content/paths/LP-para-001.yaml +29 -0
  174. package/dist/university-content/paths/LP-para-101.yaml +59 -0
  175. package/dist/university-content/paths/LP-para-201.yaml +69 -0
  176. package/dist/university-content/paths/LP-para-301.yaml +84 -0
  177. package/dist/university-content/paths/LP-para-401.yaml +74 -0
  178. package/dist/university-content/paths/LP-para-501.yaml +89 -0
  179. package/dist/university-content/paths/LP-para-601.yaml +59 -0
  180. package/dist/university-content/paths/LP-para-701.yaml +64 -0
  181. package/dist/university-content/quizzes/Q-para-001-build-something.yaml +46 -0
  182. package/dist/university-content/quizzes/Q-para-001-meet-the-team.yaml +46 -0
  183. package/dist/university-content/quizzes/Q-para-001-shift-setup.yaml +46 -0
  184. package/dist/university-content/quizzes/Q-para-101-component-types.yaml +46 -0
  185. package/dist/university-content/quizzes/Q-para-101-first-steps.yaml +56 -0
  186. package/dist/university-content/quizzes/Q-para-101-five-symbols.yaml +66 -0
  187. package/dist/university-content/quizzes/Q-para-101-paradigm-logger.yaml +56 -0
  188. package/dist/university-content/quizzes/Q-para-101-portal-yaml.yaml +56 -0
  189. package/dist/university-content/quizzes/Q-para-101-project-structure.yaml +66 -0
  190. package/dist/university-content/quizzes/Q-para-101-purpose-files.yaml +56 -0
  191. package/dist/university-content/quizzes/Q-para-101-tags-and-classification.yaml +56 -0
  192. package/dist/university-content/quizzes/Q-para-101-welcome.yaml +56 -0
  193. package/dist/university-content/quizzes/Q-para-201-architecture-review.yaml +66 -0
  194. package/dist/university-content/quizzes/Q-para-201-aspect-graph.yaml +46 -0
  195. package/dist/university-content/quizzes/Q-para-201-aspects-and-anchors.yaml +56 -0
  196. package/dist/university-content/quizzes/Q-para-201-component-patterns.yaml +56 -0
  197. package/dist/university-content/quizzes/Q-para-201-cross-cutting-concerns.yaml +56 -0
  198. package/dist/university-content/quizzes/Q-para-201-disciplines.yaml +66 -0
  199. package/dist/university-content/quizzes/Q-para-201-flows-deep-dive.yaml +66 -0
  200. package/dist/university-content/quizzes/Q-para-201-gates-deep-dive.yaml +66 -0
  201. package/dist/university-content/quizzes/Q-para-201-portal-protocol.yaml +56 -0
  202. package/dist/university-content/quizzes/Q-para-201-signal-patterns.yaml +56 -0
  203. package/dist/university-content/quizzes/Q-para-201-symbol-naming.yaml +66 -0
  204. package/dist/university-content/quizzes/Q-para-301-context-management.yaml +56 -0
  205. package/dist/university-content/quizzes/Q-para-301-decisions.yaml +76 -0
  206. package/dist/university-content/quizzes/Q-para-301-doctor-and-validation.yaml +66 -0
  207. package/dist/university-content/quizzes/Q-para-301-enforcement-levels.yaml +46 -0
  208. package/dist/university-content/quizzes/Q-para-301-fragility-tracking.yaml +46 -0
  209. package/dist/university-content/quizzes/Q-para-301-history-system.yaml +56 -0
  210. package/dist/university-content/quizzes/Q-para-301-navigation-system.yaml +56 -0
  211. package/dist/university-content/quizzes/Q-para-301-operations-review.yaml +66 -0
  212. package/dist/university-content/quizzes/Q-para-301-paradigm-shift.yaml +46 -0
  213. package/dist/university-content/quizzes/Q-para-301-protocols.yaml +56 -0
  214. package/dist/university-content/quizzes/Q-para-301-ripple-analysis.yaml +56 -0
  215. package/dist/university-content/quizzes/Q-para-301-sentinel-observability.yaml +46 -0
  216. package/dist/university-content/quizzes/Q-para-301-sync-and-maintenance.yaml +46 -0
  217. package/dist/university-content/quizzes/Q-para-301-wisdom-system.yaml +56 -0
  218. package/dist/university-content/quizzes/Q-para-401-agent-identity.yaml +66 -0
  219. package/dist/university-content/quizzes/Q-para-401-agent-interop.yaml +46 -0
  220. package/dist/university-content/quizzes/Q-para-401-agent-roles.yaml +56 -0
  221. package/dist/university-content/quizzes/Q-para-401-commit-conventions.yaml +56 -0
  222. package/dist/university-content/quizzes/Q-para-401-mastery-review.yaml +66 -0
  223. package/dist/university-content/quizzes/Q-para-401-mcp-tools-overview.yaml +66 -0
  224. package/dist/university-content/quizzes/Q-para-401-multi-agent-coordination.yaml +76 -0
  225. package/dist/university-content/quizzes/Q-para-401-notebooks-permissions.yaml +61 -0
  226. package/dist/university-content/quizzes/Q-para-401-orchestration-workflow.yaml +66 -0
  227. package/dist/university-content/quizzes/Q-para-401-pm-governance.yaml +66 -0
  228. package/dist/university-content/quizzes/Q-para-401-provider-cascade.yaml +56 -0
  229. package/dist/university-content/quizzes/Q-para-401-quick-check.yaml +46 -0
  230. package/dist/university-content/quizzes/Q-para-501-advanced-workflows.yaml +66 -0
  231. package/dist/university-content/quizzes/Q-para-501-aspect-graph-advanced.yaml +66 -0
  232. package/dist/university-content/quizzes/Q-para-501-aspect-graph-internals.yaml +66 -0
  233. package/dist/university-content/quizzes/Q-para-501-assessment-loops.yaml +46 -0
  234. package/dist/university-content/quizzes/Q-para-501-conductor-workspace.yaml +46 -0
  235. package/dist/university-content/quizzes/Q-para-501-habits-practice.yaml +56 -0
  236. package/dist/university-content/quizzes/Q-para-501-hook-enforcement.yaml +66 -0
  237. package/dist/university-content/quizzes/Q-para-501-lore-system.yaml +66 -0
  238. package/dist/university-content/quizzes/Q-para-501-platform-agent-ui.yaml +66 -0
  239. package/dist/university-content/quizzes/Q-para-501-review-compliance.yaml +61 -0
  240. package/dist/university-content/quizzes/Q-para-501-sentinel-deep-dive.yaml +86 -0
  241. package/dist/university-content/quizzes/Q-para-501-session-intelligence.yaml +66 -0
  242. package/dist/university-content/quizzes/Q-para-501-symphony-a-mail.yaml +66 -0
  243. package/dist/university-content/quizzes/Q-para-501-symphony-networking.yaml +66 -0
  244. package/dist/university-content/quizzes/Q-para-501-task-management.yaml +46 -0
  245. package/dist/university-content/quizzes/Q-para-601-agent-renaissance.yaml +66 -0
  246. package/dist/university-content/quizzes/Q-para-601-attention-scoring.yaml +56 -0
  247. package/dist/university-content/quizzes/Q-para-601-context-composition.yaml +66 -0
  248. package/dist/university-content/quizzes/Q-para-601-data-sovereignty.yaml +56 -0
  249. package/dist/university-content/quizzes/Q-para-601-event-stream.yaml +66 -0
  250. package/dist/university-content/quizzes/Q-para-601-knowledge-streams.yaml +66 -0
  251. package/dist/university-content/quizzes/Q-para-601-learning-loop.yaml +56 -0
  252. package/dist/university-content/quizzes/Q-para-601-maestro-team-collab.yaml +86 -0
  253. package/dist/university-content/quizzes/Q-para-601-nominations-debates.yaml +66 -0
  254. package/dist/university-content/quizzes/Q-para-701-agent-notebooks.yaml +66 -0
  255. package/dist/university-content/quizzes/Q-para-701-agent-pods-nevrland.yaml +66 -0
  256. package/dist/university-content/quizzes/Q-para-701-agent-profiles.yaml +66 -0
  257. package/dist/university-content/quizzes/Q-para-701-agent-roster.yaml +66 -0
  258. package/dist/university-content/quizzes/Q-para-701-agent-state.yaml +66 -0
  259. package/dist/university-content/quizzes/Q-para-701-learning-feedback-loop.yaml +66 -0
  260. package/dist/university-content/quizzes/Q-para-701-model-tier-resolution.yaml +66 -0
  261. package/dist/university-content/quizzes/Q-para-701-orchestration-enforcement.yaml +66 -0
  262. package/dist/university-content/quizzes/Q-para-701-per-project-rosters.yaml +66 -0
  263. package/dist/university-content/quizzes/Q-para-701-symphony-visibility.yaml +66 -0
  264. package/dist/university-content/quizzes/Q-plsat-v2.yaml +904 -0
  265. package/dist/university-content/quizzes/Q-plsat-v3.yaml +2909 -0
  266. package/dist/university-content/reference.json +2 -2
  267. package/dist/university-ui/assets/{index-CecQrfSn.js → index-nNgzO1il.js} +2 -2
  268. package/dist/university-ui/assets/{index-CecQrfSn.js.map → index-nNgzO1il.js.map} +1 -1
  269. package/dist/university-ui/index.html +1 -1
  270. package/dist/{upgrade-GX56QE3C.js → upgrade-NKN63VTY.js} +2 -2
  271. package/dist/validate-XUQZTF3H.js +9 -0
  272. package/dist/{watch-YCODNIET.js → watch-25GJHQYT.js} +1 -1
  273. package/lore-ui/dist/assets/{index-Bk-K0qgN.js → index-DKhNxgtW.js} +10 -10
  274. package/lore-ui/dist/index.html +1 -1
  275. package/package.json +2 -2
  276. package/platform-ui/dist/assets/{AmbientSection-BYjt75R1.js → AmbientSection-CwatqcBD.js} +1 -1
  277. package/platform-ui/dist/assets/{CanvasSection-rKvA_vZj.js → CanvasSection-dFAthehN.js} +1 -1
  278. package/platform-ui/dist/assets/{DocsSection-CI9K73M-.js → DocsSection-BZ2SFJBZ.js} +1 -1
  279. package/platform-ui/dist/assets/{GitSection-DSGj_c6S.js → GitSection-MNNYU1tO.js} +1 -1
  280. package/platform-ui/dist/assets/{GraphSection-CawN7pC5.js → GraphSection-COYjb4Pt.js} +1 -1
  281. package/platform-ui/dist/assets/LoreSection-B0hUbfsJ.js +1 -0
  282. package/platform-ui/dist/assets/{SentinelSection-DNgoYMH0.js → SentinelSection-BCxW1DCp.js} +1 -1
  283. package/platform-ui/dist/assets/{SymphonySection-C0zfcqv3.js → SymphonySection-BsucZRqy.js} +1 -1
  284. package/platform-ui/dist/assets/{TeamSection-Bzd3Dt9Q.js → TeamSection-C0QNTudW.js} +1 -1
  285. package/platform-ui/dist/assets/{UniversitySection-tBr62R0S.js → UniversitySection-DN1-g9pw.js} +1 -1
  286. package/platform-ui/dist/assets/{index-BaOmyn11.js → index-DwUT8pju.js} +2 -2
  287. package/platform-ui/dist/index.html +1 -1
  288. package/dist/add-P76GEMGF.js +0 -8
  289. package/dist/chunk-JQKKVAAN.js +0 -2
  290. package/dist/chunk-NQ47TA6C.js +0 -111
  291. package/dist/chunk-ODVKPZZ4.js +0 -2
  292. package/dist/chunk-Q2J542ST.js +0 -2
  293. package/dist/chunk-RBLK34IA.js +0 -11
  294. package/dist/chunk-RN4VE6P3.js +0 -521
  295. package/dist/chunk-WS2N27RX.js +0 -3
  296. package/dist/config-schema-GUQY2QN7.js +0 -2
  297. package/dist/decision-loader-2XPZE4EZ.js +0 -2
  298. package/dist/doctor-WMVULMQD.js +0 -2
  299. package/dist/list-5IUGP3ZB.js +0 -7
  300. package/dist/lore-loader-RVQI5GXL.js +0 -2
  301. package/dist/lore-loader-XY5MZRR2.js +0 -2
  302. package/dist/migrate-assessments-GEI5WMI2.js +0 -4
  303. package/dist/portal-compliance-6YR27IQU.js +0 -2
  304. package/dist/quiz-FE5UGAY2.js +0 -10
  305. package/dist/reindex-I6LPAKCC.js +0 -2
  306. package/dist/serve-OY6XYL7F.js +0 -12
  307. package/dist/server-2MNROHF6.js +0 -7
  308. package/dist/session-tracker-MWJAJA6Z.js +0 -2
  309. package/dist/show-BOAVWZPZ.js +0 -7
  310. package/dist/status-A37ECYNJ.js +0 -6
  311. package/dist/sync-DLUBV5HQ.js +0 -2
  312. package/dist/tools-5ITPEPSV.js +0 -2
  313. package/dist/university-content/courses/.purpose +0 -492
  314. package/dist/university-content/courses/para-001.json +0 -166
  315. package/dist/university-content/courses/para-101.json +0 -615
  316. package/dist/university-content/courses/para-201.json +0 -794
  317. package/dist/university-content/courses/para-301.json +0 -830
  318. package/dist/university-content/courses/para-401.json +0 -868
  319. package/dist/university-content/courses/para-501.json +0 -1166
  320. package/dist/university-content/courses/para-601.json +0 -719
  321. package/dist/university-content/courses/para-701.json +0 -807
  322. package/dist/university-content/plsat/.purpose +0 -162
  323. package/dist/university-content/plsat/v2.0.json +0 -760
  324. package/dist/university-content/plsat/v3.0.json +0 -3453
  325. package/dist/validate-C6SMKGYD.js +0 -9
  326. package/platform-ui/dist/assets/LoreSection-oO5dCe6O.js +0 -1
  327. /package/dist/{chunk-BV5PRPLB.js → chunk-IZSBGW6E.js} +0 -0
  328. /package/templates/paradigm/specs/{scan.md → probe.md} +0 -0
@@ -1,24 +1,24 @@
1
1
  #!/usr/bin/env node
2
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
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+`
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 D=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
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
6
  `,a+=O.repeat("-",e.indent+c+3+h.pos)+`^
7
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(`
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 D('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 D('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 D("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.forEach(function(r){if(!(r instanceof $))throw new D("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(r.loadKind&&r.loadKind!=="scalar")throw new D("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 D("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 D("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 Wr(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 Dr(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:Wr,predicate:Dr,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=/[,\[\]\{\}]/,Wi=/^(?:!|!!|![a-z\-]+!)$/i,Di=/^(?:!|[^,\[\]\{\}])(?:%[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 D(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],Wi.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'),Di.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
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
12
  `,n?1+l:l):r===de&&n&&(t.result+=`
13
13
  `);break}for(s?pt(u)?(h=true,t.result+=O.repeat(`
14
14
  `,n?1+l:l)):h?(h=false,t.result+=O.repeat(`
15
15
  `,l+1)):l===0?n&&(t.result+=" "):t.result+=O.repeat(`
16
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(`
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),Wi.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&&!Di.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 Wn(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:Wn(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 Dn(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;)Dn(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 D("expected a single document in the stream, but found more")}}var Bn=zn,Un={load:Bn},Gi=Object.prototype.toString,Yi=Object.prototype.hasOwnProperty,We=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 D("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
19
  `,s),r===-1?(o=t.slice(s),s=a):(o=t.slice(s,r+1),s=r+1),o.length&&o!==`
20
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]===`
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!==We||65536<=t&&t<=1114111}function Je(t){return Nt(t)&&t!==We&&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!==We&&!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 D("impossible error: invalid scalar style")}})();}function Xe(t,e){var i=Ji(t)?String(e):"",s=t[t.length-1]===`
22
22
  `,r=s&&(t[t.length-2]===`
23
23
  `||t===`
24
24
  `),n=r?"+":s?"":"-";return i+n+`
@@ -29,10 +29,10 @@ import'./chunk-5TAVYPOV.js';import*as lt from'fs';import {realpathSync,readlinkS
29
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
30
  `+t.slice(r,n),r=n+1),o=a;return l+=`
31
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(`
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 D("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 D("!<"+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 D("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",De="\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(De,"g"),$o=new RegExp(rs,"g"),Po=new RegExp(ns,"g"),Io=/\\\\/g,Ro=/\\{/g,Lo=/\\}/g,No=/\\,/g,Wo=/\\./g,Do=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,De).replace(No,rs).replace(Wo,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=Do}=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+De+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="(?!(?:^|/)\\.\\.?(?:$|/))",Dt="(?!\\.)",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?Dt:"";}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||!Dt?"":this.#f(true);o===n&&(o=""),o&&(n=`(?:${n})(?:${o})*?`);let a="";if(this.type==="!"&&this.#c)a=(this.isStart()&&!i?Dt:"")+li;else {let l=this.type==="!"?"))"+(this.isStart()&&!i&&!e?Dt:"")+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
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:
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.#W=(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=()=>{};#W=()=>{};#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.#D=(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)=>{};#D=(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.#D(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.#W(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",Wa=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,Da=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(Da(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(Wa(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"),W=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}}#W(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();}#D(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.#D(r.code),i.provisional=0;else {for(let o of n)this.#_(o,i);this.#W(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.#W(t);}catch(s){this.#D(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.#W(t);}catch(i){this.#D(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 W{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 W{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 W||(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 W||(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 W||(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 W||(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 W||(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 W||(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 W||(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 W||(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 W||(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 W||(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 W||(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 W||(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 Ws(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 Ds(t,e={}){return new ft(t,e).iterate()}var nl=le,ol=Object.assign(Ns,{sync:le}),al=he,ll=Object.assign(Ds,{sync:he}),hl=Object.assign(Ws,{stream:le,iterate:he}),Wt=Object.assign(Ai,{glob:Ai,globSync:Ws,sync:hl,globStream:Ns,stream:ol,globStreamSync:le,streamSync:nl,globIterate:Ds,iterate:ll,globIterateSync:he,iterateSync:al,Glob:ft,hasMagic:rl,escape:ls,unescape:vt});Wt.glob=Wt;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 Wt("**/.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)){let u=h.startsWith("^")?h.slice(1):h;n.push(Pe(u,c));}if(r.include)for(let h of r.include){let c=L.join(i,h),u=await Wt(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){let s=i.id,r=s.startsWith("^")?s.slice(1):s;return [Pe(r,i)]}if(i.gates){let s=[];for(let[r,n]of Object.entries(i.gates)){let o=r.startsWith("^")?r.slice(1):r;s.push(Pe(o,n));}return s}return []}function Pe(t,e){let i=[];if(e.locks)for(let r of e.locks)i.push(Wl(r));let s=[];if(e.prizes)for(let r of e.prizes)s.push(Dl(r));return {id:t,description:e.description,locks:i,prizes:s,position:e.position}}function Wl(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 Dl(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 Wt("**/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){let i=t.id.startsWith("^")?t.id.slice(1):t.id;return q({id:`gate-${i}`,symbol:`^${i}`,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
36
 
37
37
  js-yaml/dist/js-yaml.mjs:
38
38
  (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)