cli-jaw 2.0.5 → 2.0.6

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 (614) hide show
  1. package/README.ja.md +229 -315
  2. package/README.ko.md +248 -315
  3. package/README.md +103 -186
  4. package/README.zh-CN.md +282 -296
  5. package/dist/bin/commands/browser-web-ai.js +4 -2
  6. package/dist/bin/commands/browser-web-ai.js.map +1 -1
  7. package/dist/bin/commands/browser.js +76 -0
  8. package/dist/bin/commands/browser.js.map +1 -1
  9. package/dist/bin/commands/doctor.js +122 -4
  10. package/dist/bin/commands/doctor.js.map +1 -1
  11. package/dist/bin/commands/skill.js +5 -3
  12. package/dist/bin/commands/skill.js.map +1 -1
  13. package/dist/bin/postinstall.js +507 -89
  14. package/dist/bin/postinstall.js.map +1 -1
  15. package/dist/lib/mcp/format-converters.js +32 -4
  16. package/dist/lib/mcp/format-converters.js.map +1 -1
  17. package/dist/lib/mcp/mcp-install.js +5 -0
  18. package/dist/lib/mcp/mcp-install.js.map +1 -1
  19. package/dist/lib/mcp/skills-distribution.js +52 -53
  20. package/dist/lib/mcp/skills-distribution.js.map +1 -1
  21. package/dist/lib/mcp/skills-reset.js +29 -16
  22. package/dist/lib/mcp/skills-reset.js.map +1 -1
  23. package/dist/lib/mcp/skills-utils.js +64 -2
  24. package/dist/lib/mcp/skills-utils.js.map +1 -1
  25. package/dist/lib/mcp/unified-config.js +7 -3
  26. package/dist/lib/mcp/unified-config.js.map +1 -1
  27. package/dist/scripts/fresh-install-smoke.js +1 -1
  28. package/dist/scripts/fresh-install-smoke.js.map +1 -1
  29. package/dist/server.js +44 -4
  30. package/dist/server.js.map +1 -1
  31. package/dist/src/agent/args.js +148 -1
  32. package/dist/src/agent/args.js.map +1 -1
  33. package/dist/src/agent/claude-e-runtime.js +42 -0
  34. package/dist/src/agent/claude-e-runtime.js.map +1 -0
  35. package/dist/src/agent/claude-i-runtime.js +42 -0
  36. package/dist/src/agent/claude-i-runtime.js.map +1 -0
  37. package/dist/src/agent/cli-helpers.js +9 -0
  38. package/dist/src/agent/cli-helpers.js.map +1 -0
  39. package/dist/src/agent/codex-app-client.js +240 -0
  40. package/dist/src/agent/codex-app-client.js.map +1 -0
  41. package/dist/src/agent/codex-app-events.js +268 -0
  42. package/dist/src/agent/codex-app-events.js.map +1 -0
  43. package/dist/src/agent/error-classifier.js +8 -2
  44. package/dist/src/agent/error-classifier.js.map +1 -1
  45. package/dist/src/agent/events/acp.js +200 -0
  46. package/dist/src/agent/events/acp.js.map +1 -0
  47. package/dist/src/agent/events/claude.js +200 -0
  48. package/dist/src/agent/events/claude.js.map +1 -0
  49. package/dist/src/agent/events/codex.js +118 -0
  50. package/dist/src/agent/events/codex.js.map +1 -0
  51. package/dist/src/agent/events/gemini.js +100 -0
  52. package/dist/src/agent/events/gemini.js.map +1 -0
  53. package/dist/src/agent/events/grok.js +298 -0
  54. package/dist/src/agent/events/grok.js.map +1 -0
  55. package/dist/src/agent/events/helpers.js +237 -0
  56. package/dist/src/agent/events/helpers.js.map +1 -0
  57. package/dist/src/agent/events/index.js +315 -0
  58. package/dist/src/agent/events/index.js.map +1 -0
  59. package/dist/src/agent/events/opencode.js +171 -0
  60. package/dist/src/agent/events/opencode.js.map +1 -0
  61. package/dist/src/agent/events/summary.js +128 -0
  62. package/dist/src/agent/events/summary.js.map +1 -0
  63. package/dist/src/agent/events/tool-labels.js +299 -0
  64. package/dist/src/agent/events/tool-labels.js.map +1 -0
  65. package/dist/src/agent/events/types.js +3 -0
  66. package/dist/src/agent/events/types.js.map +1 -0
  67. package/dist/src/agent/events.js +2 -1487
  68. package/dist/src/agent/events.js.map +1 -1
  69. package/dist/src/agent/grok-trace-backfill.js +153 -0
  70. package/dist/src/agent/grok-trace-backfill.js.map +1 -0
  71. package/dist/src/agent/lifecycle-handler.js +60 -16
  72. package/dist/src/agent/lifecycle-handler.js.map +1 -1
  73. package/dist/src/agent/live-run-state.js +1 -1
  74. package/dist/src/agent/live-run-state.js.map +1 -1
  75. package/dist/src/agent/memory-flush-controller.js +26 -0
  76. package/dist/src/agent/memory-flush-controller.js.map +1 -1
  77. package/dist/src/agent/resume-classifier.js +9 -0
  78. package/dist/src/agent/resume-classifier.js.map +1 -1
  79. package/dist/src/agent/session-persistence.js +7 -2
  80. package/dist/src/agent/session-persistence.js.map +1 -1
  81. package/dist/src/agent/spawn/process-kill.js +29 -0
  82. package/dist/src/agent/spawn/process-kill.js.map +1 -0
  83. package/dist/src/agent/spawn/queue.js +273 -0
  84. package/dist/src/agent/spawn/queue.js.map +1 -0
  85. package/dist/src/agent/spawn/resume.js +56 -0
  86. package/dist/src/agent/spawn/resume.js.map +1 -0
  87. package/dist/src/agent/spawn.js +435 -371
  88. package/dist/src/agent/spawn.js.map +1 -1
  89. package/dist/src/agent/watchdog.js +5 -1
  90. package/dist/src/agent/watchdog.js.map +1 -1
  91. package/dist/src/browser/adaptive-fetch/browser-escalation.js +177 -0
  92. package/dist/src/browser/adaptive-fetch/browser-escalation.js.map +1 -0
  93. package/dist/src/browser/adaptive-fetch/browser-runtime.js +38 -0
  94. package/dist/src/browser/adaptive-fetch/browser-runtime.js.map +1 -0
  95. package/dist/src/browser/adaptive-fetch/browser-session.js +97 -0
  96. package/dist/src/browser/adaptive-fetch/browser-session.js.map +1 -0
  97. package/dist/src/browser/adaptive-fetch/challenge-detector.js +88 -0
  98. package/dist/src/browser/adaptive-fetch/challenge-detector.js.map +1 -0
  99. package/dist/src/browser/adaptive-fetch/content-scorer.js +145 -0
  100. package/dist/src/browser/adaptive-fetch/content-scorer.js.map +1 -0
  101. package/dist/src/browser/adaptive-fetch/endpoint-resolvers.js +382 -0
  102. package/dist/src/browser/adaptive-fetch/endpoint-resolvers.js.map +1 -0
  103. package/dist/src/browser/adaptive-fetch/fetcher.js +105 -0
  104. package/dist/src/browser/adaptive-fetch/fetcher.js.map +1 -0
  105. package/dist/src/browser/adaptive-fetch/human-loop.js +101 -0
  106. package/dist/src/browser/adaptive-fetch/human-loop.js.map +1 -0
  107. package/dist/src/browser/adaptive-fetch/index.js +586 -0
  108. package/dist/src/browser/adaptive-fetch/index.js.map +1 -0
  109. package/dist/src/browser/adaptive-fetch/metadata.js +169 -0
  110. package/dist/src/browser/adaptive-fetch/metadata.js.map +1 -0
  111. package/dist/src/browser/adaptive-fetch/output.js +71 -0
  112. package/dist/src/browser/adaptive-fetch/output.js.map +1 -0
  113. package/dist/src/browser/adaptive-fetch/reader-adapters.js +135 -0
  114. package/dist/src/browser/adaptive-fetch/reader-adapters.js.map +1 -0
  115. package/dist/src/browser/adaptive-fetch/safety.js +296 -0
  116. package/dist/src/browser/adaptive-fetch/safety.js.map +1 -0
  117. package/dist/src/browser/adaptive-fetch/third-party-readers.js +43 -0
  118. package/dist/src/browser/adaptive-fetch/third-party-readers.js.map +1 -0
  119. package/dist/src/browser/adaptive-fetch/trace.js +61 -0
  120. package/dist/src/browser/adaptive-fetch/trace.js.map +1 -0
  121. package/dist/src/browser/adaptive-fetch/transforms.js +81 -0
  122. package/dist/src/browser/adaptive-fetch/transforms.js.map +1 -0
  123. package/dist/src/browser/adaptive-fetch/validators.js +108 -0
  124. package/dist/src/browser/adaptive-fetch/validators.js.map +1 -0
  125. package/dist/src/browser/adaptive-fetch/waf-profiles.js +135 -0
  126. package/dist/src/browser/adaptive-fetch/waf-profiles.js.map +1 -0
  127. package/dist/src/browser/index.js +1 -0
  128. package/dist/src/browser/index.js.map +1 -1
  129. package/dist/src/browser/web-ai/gemini-model.js +42 -15
  130. package/dist/src/browser/web-ai/gemini-model.js.map +1 -1
  131. package/dist/src/cli/claude-models.js +1 -1
  132. package/dist/src/cli/claude-models.js.map +1 -1
  133. package/dist/src/cli/compact.js +2 -0
  134. package/dist/src/cli/compact.js.map +1 -1
  135. package/dist/src/cli/handlers-completions.js +3 -0
  136. package/dist/src/cli/handlers-completions.js.map +1 -1
  137. package/dist/src/cli/handlers-runtime.js +5 -2
  138. package/dist/src/cli/handlers-runtime.js.map +1 -1
  139. package/dist/src/cli/readiness.js +43 -1
  140. package/dist/src/cli/readiness.js.map +1 -1
  141. package/dist/src/cli/registry.js +58 -0
  142. package/dist/src/cli/registry.js.map +1 -1
  143. package/dist/src/core/browser-open.js +4 -1
  144. package/dist/src/core/browser-open.js.map +1 -1
  145. package/dist/src/core/claude-install.js +4 -0
  146. package/dist/src/core/claude-install.js.map +1 -1
  147. package/dist/src/core/cli-detect.js +61 -13
  148. package/dist/src/core/cli-detect.js.map +1 -1
  149. package/dist/src/core/compact.js +295 -63
  150. package/dist/src/core/compact.js.map +1 -1
  151. package/dist/src/core/config.js +151 -11
  152. package/dist/src/core/config.js.map +1 -1
  153. package/dist/src/core/db.js +10 -1
  154. package/dist/src/core/db.js.map +1 -1
  155. package/dist/src/core/employees.js +1 -1
  156. package/dist/src/core/employees.js.map +1 -1
  157. package/dist/src/core/logger.js +28 -9
  158. package/dist/src/core/logger.js.map +1 -1
  159. package/dist/src/core/runtime-settings.js +32 -5
  160. package/dist/src/core/runtime-settings.js.map +1 -1
  161. package/dist/src/manager/memory/embedding/state-machine.js +2 -1
  162. package/dist/src/manager/memory/embedding/state-machine.js.map +1 -1
  163. package/dist/src/manager/memory/embedding/sync.js +52 -33
  164. package/dist/src/manager/memory/embedding/sync.js.map +1 -1
  165. package/dist/src/manager/memory/embedding/vec-store.js +10 -10
  166. package/dist/src/manager/memory/embedding/vec-store.js.map +1 -1
  167. package/dist/src/manager/routes/dashboard-memory.js +43 -16
  168. package/dist/src/manager/routes/dashboard-memory.js.map +1 -1
  169. package/dist/src/manager/server.js +11 -0
  170. package/dist/src/manager/server.js.map +1 -1
  171. package/dist/src/memory/indexing.js +6 -1
  172. package/dist/src/memory/indexing.js.map +1 -1
  173. package/dist/src/orchestrator/distribute.js +5 -4
  174. package/dist/src/orchestrator/distribute.js.map +1 -1
  175. package/dist/src/prompt/builder.js +12 -1
  176. package/dist/src/prompt/builder.js.map +1 -1
  177. package/dist/src/prompt/runtime-context.js +69 -0
  178. package/dist/src/prompt/runtime-context.js.map +1 -0
  179. package/dist/src/routes/browser.js +33 -0
  180. package/dist/src/routes/browser.js.map +1 -1
  181. package/dist/src/routes/employees.js +1 -1
  182. package/dist/src/routes/employees.js.map +1 -1
  183. package/dist/src/routes/memory.js +1 -1
  184. package/dist/src/routes/memory.js.map +1 -1
  185. package/dist/src/routes/orchestrate.js +37 -10
  186. package/dist/src/routes/orchestrate.js.map +1 -1
  187. package/dist/src/routes/quota.js +91 -1
  188. package/dist/src/routes/quota.js.map +1 -1
  189. package/dist/src/routes/runtime-context.js +43 -0
  190. package/dist/src/routes/runtime-context.js.map +1 -0
  191. package/dist/src/routes/security-audit.js +14 -0
  192. package/dist/src/routes/security-audit.js.map +1 -0
  193. package/dist/src/routes/settings.js +8 -1
  194. package/dist/src/routes/settings.js.map +1 -1
  195. package/dist/src/security/security-audit-log.js +99 -0
  196. package/dist/src/security/security-audit-log.js.map +1 -0
  197. package/dist/src/telegram/bot.js +4 -2
  198. package/dist/src/telegram/bot.js.map +1 -1
  199. package/dist/src/types/cli-engine.js +4 -0
  200. package/dist/src/types/cli-engine.js.map +1 -1
  201. package/dist/src/types/cli-events.js +1 -1
  202. package/dist/src/types/cli-events.js.map +1 -1
  203. package/package.json +9 -3
  204. package/public/assets/providers/antigravity-color.svg +1 -0
  205. package/public/assets/providers/antigravity.svg +1 -0
  206. package/public/assets/providers/copilot-color.svg +1 -1
  207. package/public/assets/providers/copilot.svg +1 -1
  208. package/public/assets/providers/grok-color.svg +1 -0
  209. package/public/assets/providers/grok.svg +1 -0
  210. package/public/css/chat-search.css +168 -0
  211. package/public/css/chat.css +43 -1
  212. package/public/css/modals.css +41 -0
  213. package/public/dist/assets/{AdvancedExport-BAdZUC-6.js → AdvancedExport-CBvz4_IZ.js} +1 -1
  214. package/public/dist/assets/Agent-DlUqCMXJ.js +1 -0
  215. package/public/dist/assets/{Browser-BsdxDVgM.js → Browser-66BpLQck.js} +1 -1
  216. package/public/dist/assets/{ChannelsDiscord-Dg_jto6l.js → ChannelsDiscord-BifT2Dum.js} +1 -1
  217. package/public/dist/assets/{ChannelsTelegram-DGyZfJGS.js → ChannelsTelegram-CK6tYQ8k.js} +1 -1
  218. package/public/dist/assets/DashboardEmbeddingSection-6F8zSSja.js +2 -0
  219. package/public/dist/assets/{DashboardMeta-CAH9ONTb.js → DashboardMeta-Cc03HT5R.js} +1 -1
  220. package/public/dist/assets/{Display-DM_yvyKL.js → Display-arOjcMQZ.js} +1 -1
  221. package/public/dist/assets/Employees-YbW-mI67.js +1 -0
  222. package/public/dist/assets/{HealthBadge-Dtr-dDnw.js → HealthBadge-DEPFkcA0.js} +1 -1
  223. package/public/dist/assets/Heartbeat-CW4eIhtJ.js +1 -0
  224. package/public/dist/assets/{InlineWarn-E64UaKFh.js → InlineWarn-DoJS7AgM.js} +1 -1
  225. package/public/dist/assets/{Mcp-Dlp2X7X7.js → Mcp-ZQ6ARQb6.js} +1 -1
  226. package/public/dist/assets/Memory-BAUWJMqc.js +1 -0
  227. package/public/dist/assets/{MilkdownWysiwygEditor-Ctww8i0L.js → MilkdownWysiwygEditor-IAqFtXvM.js} +1 -1
  228. package/public/dist/assets/ModelProvider-DUtmFh0J.js +1 -0
  229. package/public/dist/assets/{Network-Df1R2YcQ.js → Network-B_4E82zQ.js} +1 -1
  230. package/public/dist/assets/{Permissions-BKJ5K6EL.js → Permissions-BkADXjQ4.js} +1 -1
  231. package/public/dist/assets/{Permissions-CcWZoOVP.js → Permissions-DvUCB8wA.js} +1 -1
  232. package/public/dist/assets/{Profile-DZ7xf1WZ.js → Profile-BcnTCSYM.js} +1 -1
  233. package/public/dist/assets/{Prompts-Bh5DYt8e.js → Prompts-CUs_RoRE.js} +1 -1
  234. package/public/dist/assets/{SpeechKeys-CQwtVxOP.js → SpeechKeys-qxc-ROWN.js} +1 -1
  235. package/public/dist/assets/agent-meta-Du8y6mSM.js +1 -0
  236. package/public/dist/assets/app-CGqTcIeF.js +39 -0
  237. package/public/dist/assets/app-Dpk6cE6C.css +1 -0
  238. package/public/dist/assets/architecture-7EHR7CIX-wVaUQezY.js +1 -0
  239. package/public/dist/assets/architectureDiagram-3BPJPVTR-kYIVzmWe.js +36 -0
  240. package/public/dist/assets/blockDiagram-GPEHLZMM-B204CPhe.js +132 -0
  241. package/public/dist/assets/{c4Diagram-AHTNJAMY-Bp2QLC-s.js → c4Diagram-AAUBKEIU-DAv6TAjg.js} +6 -6
  242. package/public/dist/assets/channel-CCQujL1n.js +1 -0
  243. package/public/dist/assets/{chunk-EDXVE4YY-COudQKkJ.js → chunk-2J33WTMH-xiPJWKcl.js} +1 -1
  244. package/public/dist/assets/chunk-3OPIFGDE-DOAvk9x8.js +62 -0
  245. package/public/dist/assets/{chunk-4BX2VUAB-Cm3KqBkS.js → chunk-4BX2VUAB-6lTRwyT0.js} +1 -1
  246. package/public/dist/assets/chunk-4EGX6M5U-DXtAEgX6.js +1 -0
  247. package/public/dist/assets/chunk-55IACEB6-Dx2JkQLw.js +1 -0
  248. package/public/dist/assets/chunk-5DO6E6H7-DDcMHB95.js +1 -0
  249. package/public/dist/assets/chunk-5ZQYHXKU-Bd-RFO5i.js +2 -0
  250. package/public/dist/assets/chunk-727SXJPM-BrsRzj8z.js +206 -0
  251. package/public/dist/assets/{chunk-AGHRB4JF-DIMn8T3_.js → chunk-AGHRB4JF-CYdXVA2-.js} +1 -1
  252. package/public/dist/assets/chunk-AQP2D5EJ-Di6Gstk-.js +231 -0
  253. package/public/dist/assets/{chunk-LIHQZDEY-Xw9ZX8of.js → chunk-BR22UD5L-CVuYkAd1.js} +1 -1
  254. package/public/dist/assets/{chunk-BSJP7CBP-DnSYKjii.js → chunk-BSJP7CBP-B47GpxcW.js} +1 -1
  255. package/public/dist/assets/chunk-CSCIHK7Q-CAE1p4Em.js +123 -0
  256. package/public/dist/assets/chunk-FHYWG6QK-CxZt-yZZ.js +1 -0
  257. package/public/dist/assets/{chunk-FMBD7UC4-6yXYicjw.js → chunk-FMBD7UC4-CwqBlx0l.js} +1 -1
  258. package/public/dist/assets/chunk-KSCS5N6A-D9a4ZkOy.js +10 -0
  259. package/public/dist/assets/{chunk-ZZ45TVLE-D5oxCC1O.js → chunk-L5ZTLDWV-D208QbfC.js} +1 -1
  260. package/public/dist/assets/{chunk-336JU56O-CAt5aBOe.js → chunk-LZXEDZCA-CE2KFduj.js} +1 -1
  261. package/public/dist/assets/chunk-MPE355IW-Bp4qAOUf.js +1 -0
  262. package/public/dist/assets/chunk-MZUSXYTE-DAU-v-0c.js +1 -0
  263. package/public/dist/assets/chunk-N66VUXT2-CpPz1L5u.js +1 -0
  264. package/public/dist/assets/chunk-ND2GUHAM-zZ7h1CPf.js +1 -0
  265. package/public/dist/assets/chunk-NNHCCRGN-BaiX9a5F.js +159 -0
  266. package/public/dist/assets/{chunk-X2U36JSP-CoMFMVNF.js → chunk-NZK2D7GU-CTqFQ8K5.js} +1 -1
  267. package/public/dist/assets/chunk-O5CBEL6O-BTuvXKFi.js +11 -0
  268. package/public/dist/assets/chunk-PUPMXCY4-ppZvktf-.js +1 -0
  269. package/public/dist/assets/chunk-QZHKN3VN-CBAtPPT7.js +1 -0
  270. package/public/dist/assets/chunk-UIBZB4QT-rJZEVBX0.js +1 -0
  271. package/public/dist/assets/chunk-WCWK7LTN-CGvUyB8h.js +1 -0
  272. package/public/dist/assets/chunk-WU5MYG2G-C3fKlSvP.js +1 -0
  273. package/public/dist/assets/{chunk-XPW4576I-CmAz5C-j.js → chunk-XPW4576I-BaQfzRci.js} +1 -1
  274. package/public/dist/assets/classDiagram-4FO5ZUOK-Cb-qL5u3.js +1 -0
  275. package/public/dist/assets/classDiagram-v2-Q7XG4LA2-BPhGdj15.js +1 -0
  276. package/public/dist/assets/constants-BxG09J6S.js +1 -0
  277. package/public/dist/assets/cose-bilkent-S5V4N54A-D1zmarou.js +1 -0
  278. package/public/dist/assets/dagre-BM42HDAG-BVkBttzA.js +4 -0
  279. package/public/dist/assets/dagre-DnoxfNXr.js +1 -0
  280. package/public/dist/assets/diagram-2AECGRRQ-Bs32KPnT.js +43 -0
  281. package/public/dist/assets/{diagram-5BDNPKRD-Cl4PzCD0.js → diagram-5GNKFQAL-YDYgPOQj.js} +2 -2
  282. package/public/dist/assets/diagram-KO2AKTUF-1tIdFl26.js +3 -0
  283. package/public/dist/assets/{diagram-TYMM5635-B_Xoa1Gp.js → diagram-LMA3HP47-B1y15kav.js} +1 -1
  284. package/public/dist/assets/diagram-OG6HWLK6-C25j1jGg.js +24 -0
  285. package/public/dist/assets/{dist-C9LWf2uC.js → dist-0v1UKkQ3.js} +1 -1
  286. package/public/dist/assets/dist-BMi_buEb.js +1 -0
  287. package/public/dist/assets/{dist-B6G8pbap.js → dist-BQNQk-1M.js} +1 -1
  288. package/public/dist/assets/{dist-CCKktDoF.js → dist-BVpa_e6W.js} +1 -1
  289. package/public/dist/assets/dist-BkrbW_LS.js +1 -0
  290. package/public/dist/assets/{dist-CkMC2PPt.js → dist-C1VqWrYZ.js} +1 -1
  291. package/public/dist/assets/{dist-BA7sRne4.js → dist-C3vh7d65.js} +1 -1
  292. package/public/dist/assets/{dist-BhzKO6nt2.js → dist-CE4s7vg82.js} +1 -1
  293. package/public/dist/assets/{dist-BDMNMdPF.js → dist-CjPin7Mr.js} +1 -1
  294. package/public/dist/assets/{dist-W7IGn2ug.js → dist-Ck6PnIlo.js} +1 -1
  295. package/public/dist/assets/{dist-B1rKu9eP.js → dist-CnIrGAPx.js} +1 -1
  296. package/public/dist/assets/{dist-CEDX2HGI.js → dist-Cv8S3FhF.js} +1 -1
  297. package/public/dist/assets/{dist-55MYVjjj.js → dist-D0PYXGt2.js} +1 -1
  298. package/public/dist/assets/{dist-C0sOT_UM.js → dist-D5GUqT-6.js} +1 -1
  299. package/public/dist/assets/{dist-C5S-Rbvc.js → dist-D66X8iAn.js} +1 -1
  300. package/public/dist/assets/dist-D815C1Fv.js +1 -0
  301. package/public/dist/assets/{dist-Ch6JG5jE.js → dist-DDDFJ8jG.js} +1 -1
  302. package/public/dist/assets/{dist-2oDfqE98.js → dist-DHQI31dn.js} +1 -1
  303. package/public/dist/assets/{dist-BTp_Oy_x.js → dist-DTQW91xt.js} +1 -1
  304. package/public/dist/assets/{dist-BuaQLcgQ.js → dist-Dm7RAaUo.js} +1 -1
  305. package/public/dist/assets/{dist-BJyDhGpS.js → dist-DrIWh2fi.js} +1 -1
  306. package/public/dist/assets/{dist-BGzHP3f8.js → dist-DzT7frM2.js} +1 -1
  307. package/public/dist/assets/{dist-wdLr2dSH.js → dist-Qs7HHNCC.js} +1 -1
  308. package/public/dist/assets/{dist-BjqyutOM.js → dist-Rs_Khtjb.js} +1 -1
  309. package/public/dist/assets/{dist-DdhWu7OM.js → dist-fJAyK82z.js} +1 -1
  310. package/public/dist/assets/{dist-G7QUHtDS.js → dist-jcptfm_T.js} +1 -1
  311. package/public/dist/assets/dist-sOV2kBhQ.js +1 -0
  312. package/public/dist/assets/{dist-BoG5I6U5.js → dist-vQskrHxt.js} +1 -1
  313. package/public/dist/assets/{dockerfile-CrC2HXHP.js → dockerfile-DAfh5qoE.js} +1 -1
  314. package/public/dist/assets/{employees-CIkIyvtL.js → employees-DRmX2RDd.js} +2 -2
  315. package/public/dist/assets/{erDiagram-SMLLAGMA-BvtqhMsS.js → erDiagram-TEJ5UH35-CRvCbztR.js} +6 -6
  316. package/public/dist/assets/{error-normalize-CkhPeQYx.js → error-normalize-CNbPE4lO.js} +1 -1
  317. package/public/dist/assets/eventmodeling-FCH6USID-Cq0nylxO.js +1 -0
  318. package/public/dist/assets/{factor-1CttFx2G.js → factor-BpoYJieo.js} +1 -1
  319. package/public/dist/assets/fields-DUawAHWZ.js +1 -0
  320. package/public/dist/assets/flowDiagram-I6XJVG4X-CzvVnib_.js +162 -0
  321. package/public/dist/assets/ganttDiagram-6RSMTGT7-BbUYP6iv.js +292 -0
  322. package/public/dist/assets/gitGraph-WXDBUCRP-DDq6-3D3.js +1 -0
  323. package/public/dist/assets/gitGraphDiagram-PVQCEYII-CbKdM7nW.js +106 -0
  324. package/public/dist/assets/graphlib-BLOO0H5r.js +1 -0
  325. package/public/dist/assets/info-J43DQDTF-OUnqwpUV.js +1 -0
  326. package/public/dist/assets/infoDiagram-5YYISTIA-BrZmg1At.js +2 -0
  327. package/public/dist/assets/{ishikawaDiagram-UXIWVN3A-DZW-Nqsf.js → ishikawaDiagram-YF4QCWOH-BDWXqJi5.js} +2 -2
  328. package/public/dist/assets/javascript-CZjRNq5R.js +1 -0
  329. package/public/dist/assets/{journeyDiagram-VCZTEJTY-ByVRJxVF.js → journeyDiagram-JHISSGLW-CPFRd_M3.js} +6 -6
  330. package/public/dist/assets/{jsx-runtime-BjL7qHh8.js → jsx-runtime-BZmCptaP.js} +1 -1
  331. package/public/dist/assets/{kanban-definition-6JOO6SKY-xwN0YCW2.js → kanban-definition-UN3LZRKU-BcQbBplS.js} +10 -10
  332. package/public/dist/assets/katex-CF5bGce6.js +1 -0
  333. package/public/dist/assets/manager-B5OmizBL.css +1 -0
  334. package/public/dist/assets/manager-Cs3eMBcx.js +25 -0
  335. package/public/dist/assets/{memory-CnBc2_Va.js → memory-BA-ki3gn.js} +1 -1
  336. package/public/dist/assets/memory-DLQbyBA3.js +1 -0
  337. package/public/dist/assets/mermaid-loader-BVPsKrpr.js +1 -0
  338. package/public/dist/assets/mermaid-parser.core-C62NUJRb.js +3 -0
  339. package/public/dist/assets/mermaid.core-ArqR5iFa.js +9 -0
  340. package/public/dist/assets/mermaid.core-BAwu4U2Y.js +1 -0
  341. package/public/dist/assets/{mindmap-definition-QFDTVHPH-Chqgsh1N.js → mindmap-definition-RKZ34NQL-C35cGkNU.js} +29 -29
  342. package/public/dist/assets/{nsis-_CjIiUyF.js → nsis-Ch4QINLN.js} +1 -1
  343. package/public/dist/assets/packet-YPE3B663-Bb9hBQ06.js +1 -0
  344. package/public/dist/assets/{page-shell-CTxVDJ8Y.js → page-shell-CVAobxbP.js} +1 -1
  345. package/public/dist/assets/pie-LRSECV5Y-CNRQnRNZ.js +1 -0
  346. package/public/dist/assets/pieDiagram-4H26LBE5-B8C_hoqJ.js +30 -0
  347. package/public/dist/assets/provider-icons-dxT69zGg.js +8 -0
  348. package/public/dist/assets/{pug-CbR8lCtK.js → pug-CXYqmmpP.js} +1 -1
  349. package/public/dist/assets/quadrantDiagram-W4KKPZXB-BEPrine5.js +7 -0
  350. package/public/dist/assets/radar-GUYGQ44K-BxngU2v0.js +1 -0
  351. package/public/dist/assets/{render-lpTpN1El.js → render-C7_e0J_X.js} +3 -3
  352. package/public/dist/assets/{requirementDiagram-MS252O5E-wnPtv0LG.js → requirementDiagram-4Y6WPE33-ClDDon9c.js} +4 -4
  353. package/public/dist/assets/rolldown-runtime-XQCOJYun.js +1 -0
  354. package/public/dist/assets/sankeyDiagram-5OEKKPKP-Bjs3OE-1.js +40 -0
  355. package/public/dist/assets/sequenceDiagram-3UESZ5HK-BM8IAaEe.js +162 -0
  356. package/public/dist/assets/settings-DjyKdqev.js +1 -0
  357. package/public/dist/assets/settings-pUJzyeX2.js +42 -0
  358. package/public/dist/assets/{sidebar-Cwt0FxQl.js → sidebar-CO9Qjj6v.js} +2 -2
  359. package/public/dist/assets/skills-CX3qJ77s.js +1 -0
  360. package/public/dist/assets/{skills-DDmTyywh.js → skills-Dq7fD8I3.js} +1 -1
  361. package/public/dist/assets/{slash-commands-D5y5AVvS.js → slash-commands-DRsKtuGT.js} +1 -1
  362. package/public/dist/assets/slash-commands-UbS8w9ij.js +1 -0
  363. package/public/dist/assets/stateDiagram-AJRCARHV-BvNABuXE.js +1 -0
  364. package/public/dist/assets/stateDiagram-v2-BHNVJYJU-CCIo81qy.js +1 -0
  365. package/public/dist/assets/{timeline-definition-GMOUNBTQ-DUz1-iOx.js → timeline-definition-PNZ67QCA-CIvTvac3.js} +8 -8
  366. package/public/dist/assets/trace-drawer-DDFdU07_.js +15 -0
  367. package/public/dist/assets/treeView-BLDUP644-cXRzPGzz.js +1 -0
  368. package/public/dist/assets/treemap-LRROVOQU-BsZE5HPE.js +1 -0
  369. package/public/dist/assets/ui-CeBmBBZM.js +140 -0
  370. package/public/dist/assets/ui-TMXjvH0r.js +1 -0
  371. package/public/dist/assets/{vendor-render-DEStnpJ8.js → vendor-render-DCb9B75Q.js} +38 -37
  372. package/public/dist/assets/vendor-utils-BnxL60_-.js +1 -0
  373. package/public/dist/assets/vennDiagram-CIIHVFJN-C5cbS2KC.js +34 -0
  374. package/public/dist/assets/wardley-L42UT6IY-D_qm0cZD.js +1 -0
  375. package/public/dist/assets/{wardleyDiagram-NUSXRM2D-CLAhOzap.js → wardleyDiagram-YWT4CUSO-BsRBBGFP.js} +61 -3
  376. package/public/dist/assets/{wiki-link-suggestions-LQuYT22G.js → wiki-link-suggestions-BHwNQXT_.js} +2 -2
  377. package/public/dist/assets/{xychartDiagram-5P7HB3ND-DLnY9i8z.js → xychartDiagram-2RQKCTM6-B6rqui6F.js} +6 -6
  378. package/public/dist/index.html +102 -3
  379. package/public/dist/manager/index.html +2 -2
  380. package/public/index.html +101 -1
  381. package/public/js/constants.ts +72 -0
  382. package/public/js/diagram/iframe-renderer.ts +7 -0
  383. package/public/js/features/chat-scroll.ts +31 -0
  384. package/public/js/features/chat-search.ts +223 -0
  385. package/public/js/features/help-content.ts +20 -2
  386. package/public/js/features/help-dialog.ts +38 -2
  387. package/public/js/features/pending-queue.ts +6 -0
  388. package/public/js/features/process-block.ts +20 -0
  389. package/public/js/features/settings-channel.ts +3 -1
  390. package/public/js/features/settings-cli-status.ts +24 -3
  391. package/public/js/features/settings-core.ts +134 -21
  392. package/public/js/features/settings-types.ts +12 -1
  393. package/public/js/features/settings.ts +1 -1
  394. package/public/js/features/trace-drawer.ts +2 -1
  395. package/public/js/features/voice-recorder.ts +222 -42
  396. package/public/js/main.ts +58 -4
  397. package/public/js/provider-icons.ts +46 -27
  398. package/public/js/render/markdown.ts +6 -0
  399. package/public/js/ui.ts +33 -7
  400. package/public/js/ws.ts +5 -1
  401. package/public/locales/en.json +31 -7
  402. package/public/locales/ja.json +31 -7
  403. package/public/locales/ko.json +31 -7
  404. package/public/locales/zh.json +31 -7
  405. package/public/manager/src/App.tsx +19 -55
  406. package/public/manager/src/InstancePreview.tsx +46 -1
  407. package/public/manager/src/components/InstanceDetailPanel.tsx +7 -2
  408. package/public/manager/src/components/InstanceLogsPanel.tsx +138 -0
  409. package/public/manager/src/dashboard-settings/DashboardEmbeddingSection.tsx +37 -7
  410. package/public/manager/src/jaw-ceo/useJawCeoDashboardBridge.tsx +1 -0
  411. package/public/manager/src/manager-components.css +76 -0
  412. package/public/manager/src/preview.ts +26 -3
  413. package/public/manager/src/settings/fields/SelectField.tsx +51 -17
  414. package/public/manager/src/settings/pages/Agent.tsx +37 -2
  415. package/public/manager/src/settings/pages/Heartbeat.tsx +3 -2
  416. package/public/manager/src/settings/pages/Memory.tsx +3 -2
  417. package/public/manager/src/settings/pages/components/EmployeeRow.tsx +8 -4
  418. package/public/manager/src/settings/pages/components/PerCliRow.tsx +31 -5
  419. package/public/manager/src/settings/pages/components/agent/FlushAgentSection.tsx +4 -2
  420. package/public/manager/src/settings/pages/components/agent/RuntimeEmployeeRow.tsx +1 -1
  421. package/public/manager/src/settings/pages/components/agent/RuntimeHeader.tsx +23 -1
  422. package/public/manager/src/settings/pages/components/agent/agent-meta.ts +49 -0
  423. package/public/manager/src/settings/pages/components/employees-helpers.ts +6 -1
  424. package/public/manager/src/settings/pages/components/heartbeat-helpers.ts +11 -1
  425. package/public/manager/src/settings-controls.css +25 -0
  426. package/public/manager/src/usePreviewShortcutMessages.ts +30 -0
  427. package/public/manager/src/usePreviewSttLifecycle.ts +31 -0
  428. package/scripts/fresh-install-smoke.ts +1 -1
  429. package/scripts/install-officecli.ps1 +33 -5
  430. package/scripts/install-officecli.sh +52 -8
  431. package/scripts/install-wsl.sh +96 -24
  432. package/scripts/install.sh +82 -11
  433. package/scripts/postinstall-guard.cjs +57 -30
  434. package/public/dist/assets/Agent-DNpehKB2.js +0 -1
  435. package/public/dist/assets/DashboardEmbeddingSection-BYdGgqg7.js +0 -2
  436. package/public/dist/assets/Employees-CuYuTy0R.js +0 -1
  437. package/public/dist/assets/Heartbeat-C-vq02MW.js +0 -1
  438. package/public/dist/assets/Memory-BPKWJDXK.js +0 -1
  439. package/public/dist/assets/ModelProvider-Bd6vGkXT.js +0 -1
  440. package/public/dist/assets/agent-meta-C1pQzExf.js +0 -1
  441. package/public/dist/assets/app-BxsIleo0.js +0 -32
  442. package/public/dist/assets/app-CB9n5A77.css +0 -1
  443. package/public/dist/assets/architecture-YZFGNWBL-BRI-0IaU.js +0 -1
  444. package/public/dist/assets/architectureDiagram-Q4EWVU46-z0JCgZrJ.js +0 -36
  445. package/public/dist/assets/blockDiagram-DXYQGD6D-KaOz3aFS.js +0 -132
  446. package/public/dist/assets/channel-jLopKIgm.js +0 -1
  447. package/public/dist/assets/chunk-2KRD3SAO-C8hJZPJu.js +0 -1
  448. package/public/dist/assets/chunk-426QAEUC-atJRhvKN.js +0 -1
  449. package/public/dist/assets/chunk-4TB4RGXK-BD7UhIN8.js +0 -206
  450. package/public/dist/assets/chunk-55IACEB6-CAWcPDdr.js +0 -1
  451. package/public/dist/assets/chunk-5FUZZQ4R-Cg1pzs6p.js +0 -62
  452. package/public/dist/assets/chunk-5PVQY5BW-otv3HwE_.js +0 -2
  453. package/public/dist/assets/chunk-67CJDMHE-AU2iOKLT.js +0 -1
  454. package/public/dist/assets/chunk-7N4EOEYR-BTIS4jBw.js +0 -1
  455. package/public/dist/assets/chunk-AA7GKIK3-c9UUJO_T.js +0 -1
  456. package/public/dist/assets/chunk-CIAEETIT-Dwbln6rM.js +0 -1
  457. package/public/dist/assets/chunk-ENJZ2VHE-PT_jAckw.js +0 -10
  458. package/public/dist/assets/chunk-FOC6F5B3-BqDmFFeg.js +0 -1
  459. package/public/dist/assets/chunk-ICPOFSXX-P6V6jqiT.js +0 -122
  460. package/public/dist/assets/chunk-K5T4RW27-C42sOmZR.js +0 -27
  461. package/public/dist/assets/chunk-KGLVRYIC-K-BVa8b2.js +0 -1
  462. package/public/dist/assets/chunk-ORNJ4GCN-CEXU6WaD.js +0 -1
  463. package/public/dist/assets/chunk-OYMX7WX6-DmJG2z1S.js +0 -231
  464. package/public/dist/assets/chunk-QZHKN3VN-BkVLii_3.js +0 -1
  465. package/public/dist/assets/chunk-U2HBQHQK-Ny6UwUgK.js +0 -11
  466. package/public/dist/assets/chunk-YZCP3GAM-c7FYtZME.js +0 -1
  467. package/public/dist/assets/classDiagram-6PBFFD2Q-BgOyAynm.js +0 -1
  468. package/public/dist/assets/classDiagram-v2-HSJHXN6E-5gBdoVH9.js +0 -1
  469. package/public/dist/assets/constants-4A2GptQT.js +0 -1
  470. package/public/dist/assets/cose-bilkent-S5V4N54A-CvH6qY_r.js +0 -1
  471. package/public/dist/assets/dagre--20B2-ZQ.js +0 -1
  472. package/public/dist/assets/dagre-KV5264BT-CQ0wo0ma.js +0 -4
  473. package/public/dist/assets/diagram-G4DWMVQ6-_aP6kMTh.js +0 -24
  474. package/public/dist/assets/diagram-MMDJMWI5-J1l6Q0JG.js +0 -43
  475. package/public/dist/assets/dist-B1p80u1b.js +0 -1
  476. package/public/dist/assets/dist-BKyzWv22.js +0 -1
  477. package/public/dist/assets/dist-CxJpXP6s.js +0 -1
  478. package/public/dist/assets/dist-DNLFuTrS.js +0 -1
  479. package/public/dist/assets/fields-BISouxp2.js +0 -1
  480. package/public/dist/assets/flowDiagram-DWJPFMVM-C_F0rqqT.js +0 -162
  481. package/public/dist/assets/ganttDiagram-T4ZO3ILL-B5S8EZRg.js +0 -292
  482. package/public/dist/assets/gitGraph-7Q5UKJZL-DTTW6pxr.js +0 -1
  483. package/public/dist/assets/gitGraphDiagram-UUTBAWPF-DMGzYJeb.js +0 -106
  484. package/public/dist/assets/graphlib-CZk_Ii16.js +0 -1
  485. package/public/dist/assets/info-OMHHGYJF-BU-iuaSm.js +0 -1
  486. package/public/dist/assets/infoDiagram-42DDH7IO-dzSaYFFK.js +0 -2
  487. package/public/dist/assets/javascript-BhB45e0W.js +0 -1
  488. package/public/dist/assets/katex-DamPUmTE.js +0 -1
  489. package/public/dist/assets/manager-B84u-pcn.js +0 -25
  490. package/public/dist/assets/manager-DMg_sTEP.css +0 -1
  491. package/public/dist/assets/memory-BV62wlsG.js +0 -1
  492. package/public/dist/assets/mermaid-loader-DxFGz4EE.js +0 -1
  493. package/public/dist/assets/mermaid-parser.core-CMIZ0my_.js +0 -3
  494. package/public/dist/assets/mermaid.core-CicVBD9l.js +0 -1
  495. package/public/dist/assets/mermaid.core-Dj6viEzN.js +0 -11
  496. package/public/dist/assets/packet-4T2RLAQJ-DzmBsAf0.js +0 -1
  497. package/public/dist/assets/pie-ZZUOXDRM-DyG1KzTn.js +0 -1
  498. package/public/dist/assets/pieDiagram-DEJITSTG-DJLiSymi.js +0 -30
  499. package/public/dist/assets/quadrantDiagram-34T5L4WZ-qcnWmcRr.js +0 -7
  500. package/public/dist/assets/radar-PYXPWWZC-CEBZARUu.js +0 -1
  501. package/public/dist/assets/rolldown-runtime-DE9SaGGd.js +0 -1
  502. package/public/dist/assets/sankeyDiagram-XADWPNL6-Bn3pUd_K.js +0 -10
  503. package/public/dist/assets/sequenceDiagram-FGHM5R23-DfxcHSdj.js +0 -157
  504. package/public/dist/assets/settings-CfAXLa8a.js +0 -1
  505. package/public/dist/assets/settings-FWgmcubl.js +0 -40
  506. package/public/dist/assets/skills-D-qUVJ-e.js +0 -1
  507. package/public/dist/assets/slash-commands-BfI19vIz.js +0 -1
  508. package/public/dist/assets/stateDiagram-FHFEXIEX-CiR7P2OG.js +0 -1
  509. package/public/dist/assets/stateDiagram-v2-QKLJ7IA2-BaWWpysK.js +0 -1
  510. package/public/dist/assets/trace-drawer-DVF5F1df.js +0 -15
  511. package/public/dist/assets/treeView-SZITEDCU-D5-TP7Qp.js +0 -1
  512. package/public/dist/assets/treemap-W4RFUUIX-BQhm_ZSp.js +0 -1
  513. package/public/dist/assets/ui-BJXY16Dk.js +0 -140
  514. package/public/dist/assets/ui-BXm3OPPh.js +0 -1
  515. package/public/dist/assets/vendor-utils-IVTPs69f.js +0 -68
  516. package/public/dist/assets/vennDiagram-DHZGUBPP-CYu7SDdG.js +0 -34
  517. package/public/dist/assets/wardley-RL74JXVD-CpnBMRe0.js +0 -1
  518. package/public/manager/src/settings/pages/Embedding.tsx +0 -382
  519. /package/public/dist/assets/{apl-HYRstREL.js → apl-CieDeb7B.js} +0 -0
  520. /package/public/dist/assets/{asciiarmor-BDXCrhAK.js → asciiarmor-BRTyulZY.js} +0 -0
  521. /package/public/dist/assets/{asn1-CnSBhb0M.js → asn1-DoNAtQ5o.js} +0 -0
  522. /package/public/dist/assets/{asterisk-AqV7rnIi.js → asterisk-CR7oKPxi.js} +0 -0
  523. /package/public/dist/assets/{brainfuck-Dv46-iL9.js → brainfuck-abzPcrOz.js} +0 -0
  524. /package/public/dist/assets/{clike-GRffz5hY.js → clike-B71Zq38G.js} +0 -0
  525. /package/public/dist/assets/{clojure-DzgT_fqE.js → clojure-Zm0UzHPq.js} +0 -0
  526. /package/public/dist/assets/{cmake-Co1237r5.js → cmake-D3UNdg6L.js} +0 -0
  527. /package/public/dist/assets/{cobol-rUaLketb.js → cobol-4fYvwQR0.js} +0 -0
  528. /package/public/dist/assets/{coffeescript-DQyfHE86.js → coffeescript-Ct6bZdRU.js} +0 -0
  529. /package/public/dist/assets/{commonlisp-Buue1PGW.js → commonlisp-CrgXVPcd.js} +0 -0
  530. /package/public/dist/assets/{crystal-BMWO0kOJ.js → crystal-bGOl67VM.js} +0 -0
  531. /package/public/dist/assets/{css-DaxibPo5.js → css-B_EV3Xq2.js} +0 -0
  532. /package/public/dist/assets/{cypher-CmpGfiBR.js → cypher-DXDlHTYf.js} +0 -0
  533. /package/public/dist/assets/{cytoscape.esm-zT8GwLFm.js → cytoscape.esm-BK7ao2Ti.js} +0 -0
  534. /package/public/dist/assets/{d-qmdtoIzU.js → d-RL5ynsiz.js} +0 -0
  535. /package/public/dist/assets/{diff-B40m6u1h.js → diff-B5McBGjz.js} +0 -0
  536. /package/public/dist/assets/{dtd-569ynYVj.js → dtd-l3sK4p_C.js} +0 -0
  537. /package/public/dist/assets/{dylan-Dxolp30i.js → dylan-WjJGY-rW.js} +0 -0
  538. /package/public/dist/assets/{ebnf-BZiX9Iq3.js → ebnf-BGY79HOS.js} +0 -0
  539. /package/public/dist/assets/{ecl-B8F1Q0oZ.js → ecl-BKh7OE1d.js} +0 -0
  540. /package/public/dist/assets/{eiffel-Bv8Kvgh1.js → eiffel-Bzvlg3oK.js} +0 -0
  541. /package/public/dist/assets/{elm-QWXQaIis.js → elm-5_BqNmKu.js} +0 -0
  542. /package/public/dist/assets/{erlang-CuDGzTGm.js → erlang-BdVwz8I8.js} +0 -0
  543. /package/public/dist/assets/{fcl-BiFeqtHf.js → fcl-B9cnfODD.js} +0 -0
  544. /package/public/dist/assets/{forth-R7Uc2VcL.js → forth-wZbbnGzb.js} +0 -0
  545. /package/public/dist/assets/{fortran-kDRG6BzW.js → fortran-BAJZrRfU.js} +0 -0
  546. /package/public/dist/assets/{gas-CyRkuC5T.js → gas-D60ZhBat.js} +0 -0
  547. /package/public/dist/assets/{gherkin-BE0p00ey.js → gherkin-B8tKjAAi.js} +0 -0
  548. /package/public/dist/assets/{groovy-B_Sh3D1t.js → groovy-BAG9eJUD.js} +0 -0
  549. /package/public/dist/assets/{haskell-DWXgCy4o.js → haskell-Cj4TmWbg.js} +0 -0
  550. /package/public/dist/assets/{haxe-xGxZ54Hv.js → haxe-8chnvz-o.js} +0 -0
  551. /package/public/dist/assets/{http-CKv9cSBA.js → http-DDYeO71z.js} +0 -0
  552. /package/public/dist/assets/{idl-DmlI3XzS.js → idl-D1hY-Gp_.js} +0 -0
  553. /package/public/dist/assets/{javascript-j6r5uf_k.js → javascript-Sh0ZUMP2.js} +0 -0
  554. /package/public/dist/assets/{julia-CQSp9Qa0.js → julia-BibioBF2.js} +0 -0
  555. /package/public/dist/assets/{livescript-CqvtVTlb.js → livescript-CSZrB6F4.js} +0 -0
  556. /package/public/dist/assets/{lua-DazQKUZ0.js → lua-BvTlo5w3.js} +0 -0
  557. /package/public/dist/assets/{mathematica-DqhJVCs9.js → mathematica-Bexv8BWZ.js} +0 -0
  558. /package/public/dist/assets/{mbox-Dsyo1_UL.js → mbox-BAhbA8z2.js} +0 -0
  559. /package/public/dist/assets/{mirc-D7ThhoF-.js → mirc-BzT5Kh4S.js} +0 -0
  560. /package/public/dist/assets/{mllike-EPZ6pqQD.js → mllike-DeoJnUZQ.js} +0 -0
  561. /package/public/dist/assets/{modelica-PU45hbqg.js → modelica-FD_-Fxlc.js} +0 -0
  562. /package/public/dist/assets/{mscgen-DEnh2Ojr.js → mscgen-C-OyhbwB.js} +0 -0
  563. /package/public/dist/assets/{mumps-8GhR7rRa.js → mumps-BxkCDTK7.js} +0 -0
  564. /package/public/dist/assets/{nginx-CXwagpwp.js → nginx-2JaV__gC.js} +0 -0
  565. /package/public/dist/assets/{ntriples-BDQxxstw.js → ntriples--rhhCzqb.js} +0 -0
  566. /package/public/dist/assets/{octave-2c90WnyU.js → octave-rS4nMzRe.js} +0 -0
  567. /package/public/dist/assets/{oz-CO0rQ8EL.js → oz-I4fMb_NC.js} +0 -0
  568. /package/public/dist/assets/{pascal-CcVwOGeN.js → pascal-BEghJs8t.js} +0 -0
  569. /package/public/dist/assets/{path-utils-DySmCVZK.js → path-utils-r2bJIu28.js} +0 -0
  570. /package/public/dist/assets/{perl-B9UvGoAV.js → perl-BRO9ZFo9.js} +0 -0
  571. /package/public/dist/assets/{pig-Cd1f86ZJ.js → pig-L4Ii6KI0.js} +0 -0
  572. /package/public/dist/assets/{powershell-DV4cOnkJ.js → powershell-BBeqUCRp.js} +0 -0
  573. /package/public/dist/assets/{properties-DaSVPhrZ.js → properties-Boi0jF2J.js} +0 -0
  574. /package/public/dist/assets/{protobuf-CEtFnY22.js → protobuf-fB2aGypX.js} +0 -0
  575. /package/public/dist/assets/{puppet-Ca0DHfcW.js → puppet-BRmsErtO.js} +0 -0
  576. /package/public/dist/assets/{python-ydzCwWG-.js → python-Be4P9Dgp.js} +0 -0
  577. /package/public/dist/assets/{q-Cl8kzQmk.js → q-DZGhDLYt.js} +0 -0
  578. /package/public/dist/assets/{r-DKZPJFrD.js → r-B4NERjRM.js} +0 -0
  579. /package/public/dist/assets/{rough.esm-Dnk3WN4D.js → rough.esm-C0Gkx4O1.js} +0 -0
  580. /package/public/dist/assets/{rpm-D0lqeHoZ.js → rpm-e-QbHJ1q.js} +0 -0
  581. /package/public/dist/assets/{ruby-RVmtmNDw.js → ruby-BSVP_v59.js} +0 -0
  582. /package/public/dist/assets/{sas-CEzodAB7.js → sas-DHlU4v4g.js} +0 -0
  583. /package/public/dist/assets/{scheme-Pqmt6dh3.js → scheme-BGXbz5Hz.js} +0 -0
  584. /package/public/dist/assets/{settings-client-BN3XzwEo.js → settings-client-DPuJroyk.js} +0 -0
  585. /package/public/dist/assets/{shell-CLG3zy-u.js → shell-yonx6xY2.js} +0 -0
  586. /package/public/dist/assets/{sieve-C95IWC3O.js → sieve-ClPJUZyi.js} +0 -0
  587. /package/public/dist/assets/{simple-mode-B9ErAHMD.js → simple-mode-CjViblDK.js} +0 -0
  588. /package/public/dist/assets/{smalltalk-4cL-gRJb.js → smalltalk-CHXubeqS.js} +0 -0
  589. /package/public/dist/assets/{solr-CEA7oOx_.js → solr-C6q6YwPz.js} +0 -0
  590. /package/public/dist/assets/{sparql-w8kHjP6I.js → sparql-CcspZvEd.js} +0 -0
  591. /package/public/dist/assets/{spreadsheet-C8bDfTgC.js → spreadsheet-DH3a4LBS.js} +0 -0
  592. /package/public/dist/assets/{sql-BrKz8968.js → sql-meoY6gNi.js} +0 -0
  593. /package/public/dist/assets/{stex-xFw1nXeT.js → stex-D2bn6Zsh.js} +0 -0
  594. /package/public/dist/assets/{stylus-gS_68vPk.js → stylus-DbXGih0S.js} +0 -0
  595. /package/public/dist/assets/{swift-D5lXmY2d.js → swift-Ch391uOd.js} +0 -0
  596. /package/public/dist/assets/{tcl-D-41REtC.js → tcl-CQBgGWDP.js} +0 -0
  597. /package/public/dist/assets/{textile-D-Znao0j.js → textile-4i3oG3tg.js} +0 -0
  598. /package/public/dist/assets/{tiddlywiki-Co8lXJKd.js → tiddlywiki-CXG1-CcK.js} +0 -0
  599. /package/public/dist/assets/{tiki-DsiNRYMP.js → tiki-DJqKUhA-.js} +0 -0
  600. /package/public/dist/assets/{toml-CaVZGou4.js → toml-C1FnyICQ.js} +0 -0
  601. /package/public/dist/assets/{troff-DJvDVr-d.js → troff-Cp8NvRO0.js} +0 -0
  602. /package/public/dist/assets/{ttcn-DAC92l4d.js → ttcn-NlmW_fji.js} +0 -0
  603. /package/public/dist/assets/{ttcn-cfg-C0X-mYlr.js → ttcn-cfg-BVuxfGZf.js} +0 -0
  604. /package/public/dist/assets/{turtle-D6WHyCrL.js → turtle-Ba9ERlnm.js} +0 -0
  605. /package/public/dist/assets/{vb-CEo_ccq3.js → vb-DDs4gjJb.js} +0 -0
  606. /package/public/dist/assets/{vbscript-B_PKDV1v.js → vbscript-gOFmdMJN.js} +0 -0
  607. /package/public/dist/assets/{velocity-ClKnKBLH.js → velocity-DtSNZA7i.js} +0 -0
  608. /package/public/dist/assets/{verilog-Pnuspgw6.js → verilog-Pldmtxe7.js} +0 -0
  609. /package/public/dist/assets/{vhdl-CZnyY4fs.js → vhdl-BFfSgWGp.js} +0 -0
  610. /package/public/dist/assets/{w3c-keyname-DJlC6DTY.js → w3c-keyname-BggQEPNo.js} +0 -0
  611. /package/public/dist/assets/{webidl-DHr762Dm.js → webidl-B6ZFYE2L.js} +0 -0
  612. /package/public/dist/assets/{xquery-5-FiyUtN.js → xquery-DhxUT98N.js} +0 -0
  613. /package/public/dist/assets/{yacas-GlqsXIeT.js → yacas-jSkQeF1Q.js} +0 -0
  614. /package/public/dist/assets/{z80-CI7N40Oo.js → z80-D7Lt6v61.js} +0 -0
@@ -1,68 +0,0 @@
1
- function e(e){return e.charCodeAt(0)}function t(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function n(e,t){if(e[t]===!0)throw`duplicate flag `+t;e[t],e[t]=!0}function r(e){if(e===void 0)throw Error(`Internal Error - Should never get here!`);return!0}function i(){throw Error(`Internal Error - Should never get here!`)}function a(e){return e.type===`Character`}var o=[];for(let t=e(`0`);t<=e(`9`);t++)o.push(t);var s=[e(`_`)].concat(o);for(let t=e(`a`);t<=e(`z`);t++)s.push(t);for(let t=e(`A`);t<=e(`Z`);t++)s.push(t);var c=[e(` `),e(`\f`),e(`
2
- `),e(`\r`),e(` `),e(`\v`),e(` `),e(`\xA0`),e(` `),e(` `),e(` `),e(` `),e(` `),e(` `),e(` `),e(` `),e(` `),e(` `),e(` `),e(` `),e(`\u2028`),e(`\u2029`),e(` `),e(` `),e(` `),e(``)],l=/[0-9a-fA-F]/,u=/[0-9]/,d=/[1-9]/,f=class{constructor(){this.idx=0,this.input=``,this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar(`/`);let t=this.disjunction();this.consumeChar(`/`);let r={type:`Flags`,loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case`g`:n(r,`global`);break;case`i`:n(r,`ignoreCase`);break;case`m`:n(r,`multiLine`);break;case`u`:n(r,`unicode`);break;case`y`:n(r,`sticky`);break}if(this.idx!==this.input.length)throw Error(`Redundant input: `+this.input.substring(this.idx));return{type:`Pattern`,flags:r,value:t,loc:this.loc(0)}}disjunction(){let e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()===`|`;)this.consumeChar(`|`),e.push(this.alternative());return{type:`Disjunction`,value:e,loc:this.loc(t)}}alternative(){let e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:`Alternative`,value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case`^`:return{type:`StartAnchor`,loc:this.loc(e)};case`$`:return{type:`EndAnchor`,loc:this.loc(e)};case`\\`:switch(this.popChar()){case`b`:return{type:`WordBoundary`,loc:this.loc(e)};case`B`:return{type:`NonWordBoundary`,loc:this.loc(e)}}throw Error(`Invalid Assertion Escape`);case`(`:this.consumeChar(`?`);let t;switch(this.popChar()){case`=`:t=`Lookahead`;break;case`!`:t=`NegativeLookahead`;break;case`<`:switch(this.popChar()){case`=`:t=`Lookbehind`;break;case`!`:t=`NegativeLookbehind`}break}r(t);let n=this.disjunction();return this.consumeChar(`)`),{type:t,value:n,loc:this.loc(e)}}return i()}quantifier(e=!1){let t,n=this.idx;switch(this.popChar()){case`*`:t={atLeast:0,atMost:1/0};break;case`+`:t={atLeast:1,atMost:1/0};break;case`?`:t={atLeast:0,atMost:1};break;case`{`:let n=this.integerIncludingZero();switch(this.popChar()){case`}`:t={atLeast:n,atMost:n};break;case`,`:let e;this.isDigit()?(e=this.integerIncludingZero(),t={atLeast:n,atMost:e}):t={atLeast:n,atMost:1/0},this.consumeChar(`}`);break}if(e===!0&&t===void 0)return;r(t);break}if(!(e===!0&&t===void 0)&&r(t))return this.peekChar(0)===`?`?(this.consumeChar(`?`),t.greedy=!1):t.greedy=!0,t.type=`Quantifier`,t.loc=this.loc(n),t}atom(){let e,t=this.idx;switch(this.peekChar()){case`.`:e=this.dotAll();break;case`\\`:e=this.atomEscape();break;case`[`:e=this.characterClass();break;case`(`:e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),r(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):i()}dotAll(){return this.consumeChar(`.`),{type:`Set`,complement:!0,value:[e(`
3
- `),e(`\r`),e(`\u2028`),e(`\u2029`)]}}atomEscape(){switch(this.consumeChar(`\\`),this.peekChar()){case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:return this.decimalEscapeAtom();case`d`:case`D`:case`s`:case`S`:case`w`:case`W`:return this.characterClassEscape();case`f`:case`n`:case`r`:case`t`:case`v`:return this.controlEscapeAtom();case`c`:return this.controlLetterEscapeAtom();case`0`:return this.nulCharacterAtom();case`x`:return this.hexEscapeSequenceAtom();case`u`:return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:`GroupBackReference`,value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case`d`:e=o;break;case`D`:e=o,t=!0;break;case`s`:e=c;break;case`S`:e=c,t=!0;break;case`w`:e=s;break;case`W`:e=s,t=!0;break}return r(e)?{type:`Set`,value:e,complement:t}:i()}controlEscapeAtom(){let t;switch(this.popChar()){case`f`:t=e(`\f`);break;case`n`:t=e(`
4
- `);break;case`r`:t=e(`\r`);break;case`t`:t=e(` `);break;case`v`:t=e(`\v`);break}return r(t)?{type:`Character`,value:t}:i()}controlLetterEscapeAtom(){this.consumeChar(`c`);let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error(`Invalid `);return{type:`Character`,value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar(`0`),{type:`Character`,value:e(`\0`)}}hexEscapeSequenceAtom(){return this.consumeChar(`x`),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar(`u`),this.parseHexDigits(4)}identityEscapeAtom(){return{type:`Character`,value:e(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case`
5
- `:case`\r`:case`\u2028`:case`\u2029`:case`\\`:case`]`:throw Error(`TBD`);default:return{type:`Character`,value:e(this.popChar())}}}characterClass(){let n=[],r=!1;for(this.consumeChar(`[`),this.peekChar(0)===`^`&&(this.consumeChar(`^`),r=!0);this.isClassAtom();){let r=this.classAtom();if(r.type,a(r)&&this.isRangeDash()){this.consumeChar(`-`);let i=this.classAtom();if(i.type,a(i)){if(i.value<r.value)throw Error(`Range out of order in character class`);n.push({from:r.value,to:i.value})}else t(r.value,n),n.push(e(`-`)),t(i.value,n)}else t(r.value,n)}return this.consumeChar(`]`),{type:`Set`,complement:r,value:n}}classAtom(){switch(this.peekChar()){case`]`:case`
6
- `:case`\r`:case`\u2028`:case`\u2029`:throw Error(`TBD`);case`\\`:return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar(`\\`),this.peekChar()){case`b`:return this.consumeChar(`b`),{type:`Character`,value:e(`\b`)};case`d`:case`D`:case`s`:case`S`:case`w`:case`W`:return this.characterClassEscape();case`f`:case`n`:case`r`:case`t`:case`v`:return this.controlEscapeAtom();case`c`:return this.controlLetterEscapeAtom();case`0`:return this.nulCharacterAtom();case`x`:return this.hexEscapeSequenceAtom();case`u`:return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;switch(this.consumeChar(`(`),this.peekChar(0)){case`?`:this.consumeChar(`?`),this.consumeChar(`:`),e=!1;break;default:this.groupIdx++;break}let t=this.disjunction();this.consumeChar(`)`);let n={type:`Group`,capturing:e,value:t};return e&&(n.idx=this.groupIdx),n}positiveInteger(){let e=this.popChar();if(d.test(e)===!1)throw Error(`Expecting a positive integer`);for(;u.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(u.test(e)===!1)throw Error(`Expecting an integer`);for(;u.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){let t=this.popChar();switch(t){case`
7
- `:case`\r`:case`\u2028`:case`\u2029`:case`^`:case`$`:case`\\`:case`.`:case`*`:case`+`:case`?`:case`(`:case`)`:case`[`:case`|`:throw Error(`TBD`);default:return{type:`Character`,value:e(t)}}}isRegExpFlag(){switch(this.peekChar(0)){case`g`:case`i`:case`m`:case`u`:case`y`:return!0;default:return!1}}isRangeDash(){return this.peekChar()===`-`&&this.isClassAtom(1)}isDigit(){return u.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case`]`:case`
8
- `:case`\r`:case`\u2028`:case`\u2029`:return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case`.`:case`\\`:case`[`:case`(`:return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case`^`:case`$`:return!0;case`\\`:switch(this.peekChar(1)){case`b`:case`B`:return!0;default:return!1}case`(`:return this.peekChar(1)===`?`&&(this.peekChar(2)===`=`||this.peekChar(2)===`!`||this.peekChar(2)===`<`&&(this.peekChar(3)===`=`||this.peekChar(3)===`!`));default:return!1}}isQuantifier(){let e=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case`^`:case`$`:case`\\`:case`.`:case`*`:case`+`:case`?`:case`(`:case`)`:case`[`:case`|`:case`/`:case`
9
- `:case`\r`:case`\u2028`:case`\u2029`:return!1;default:return!0}}parseHexDigits(e){let t=``;for(let n=0;n<e;n++){let e=this.popChar();if(l.test(e)===!1)throw Error(`Expecting a HexDecimal digits`);t+=e}return{type:`Character`,value:parseInt(t,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){let e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(e!==void 0&&this.input[this.idx]!==e)throw Error(`Expected: '`+e+`' but found: '`+this.input[this.idx]+`' at offset: `+this.idx);if(this.idx>=this.input.length)throw Error(`Unexpected end of input`);this.idx++}loc(e){return{begin:e,end:this.idx}}},p=class{visitChildren(e){for(let t in e){let n=e[t];e.hasOwnProperty(t)&&(n.type===void 0?Array.isArray(n)&&n.forEach(e=>{this.visit(e)},this):this.visit(n))}}visit(e){switch(e.type){case`Pattern`:this.visitPattern(e);break;case`Flags`:this.visitFlags(e);break;case`Disjunction`:this.visitDisjunction(e);break;case`Alternative`:this.visitAlternative(e);break;case`StartAnchor`:this.visitStartAnchor(e);break;case`EndAnchor`:this.visitEndAnchor(e);break;case`WordBoundary`:this.visitWordBoundary(e);break;case`NonWordBoundary`:this.visitNonWordBoundary(e);break;case`Lookahead`:this.visitLookahead(e);break;case`NegativeLookahead`:this.visitNegativeLookahead(e);break;case`Lookbehind`:this.visitLookbehind(e);break;case`NegativeLookbehind`:this.visitNegativeLookbehind(e);break;case`Character`:this.visitCharacter(e);break;case`Set`:this.visitSet(e);break;case`Group`:this.visitGroup(e);break;case`GroupBackReference`:this.visitGroupBackReference(e);break;case`Quantifier`:this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}};function m(e){console&&console.error&&console.error(`Error: ${e}`)}function h(e){console&&console.warn&&console.warn(`Warning: ${e}`)}function g(e){let t=new Date().getTime(),n=e();return{time:new Date().getTime()-t,value:n}}function _(e){function t(){}t.prototype=e;let n=new t;function r(){return typeof n.bar}return r(),r(),e}function v(e){return y(e)?e.LABEL:e.name}function y(e){return typeof e.LABEL==`string`&&e.LABEL!==``}var b=class{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),this.definition.forEach(t=>{t.accept(e)})}},x=class extends b{constructor(e){super([]),this.idx=1,Object.assign(this,N(e))}set definition(e){}get definition(){return this.referencedRule===void 0?[]:this.referencedRule.definition}accept(e){e.visit(this)}},S=class extends b{constructor(e){super(e.definition),this.orgText=``,Object.assign(this,N(e))}},C=class extends b{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Object.assign(this,N(e))}},w=class extends b{constructor(e){super(e.definition),this.idx=1,Object.assign(this,N(e))}},T=class extends b{constructor(e){super(e.definition),this.idx=1,Object.assign(this,N(e))}},E=class extends b{constructor(e){super(e.definition),this.idx=1,Object.assign(this,N(e))}},D=class extends b{constructor(e){super(e.definition),this.idx=1,Object.assign(this,N(e))}},O=class extends b{constructor(e){super(e.definition),this.idx=1,Object.assign(this,N(e))}},k=class extends b{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Object.assign(this,N(e))}},A=class{constructor(e){this.idx=1,Object.assign(this,N(e))}accept(e){e.visit(this)}};function j(e){return e.map(M)}function M(e){function t(e){return e.map(M)}if(e instanceof x){let t={type:`NonTerminal`,name:e.nonTerminalName,idx:e.idx};return typeof e.label==`string`&&(t.label=e.label),t}else if(e instanceof C)return{type:`Alternative`,definition:t(e.definition)};else if(e instanceof w)return{type:`Option`,idx:e.idx,definition:t(e.definition)};else if(e instanceof T)return{type:`RepetitionMandatory`,idx:e.idx,definition:t(e.definition)};else if(e instanceof E)return{type:`RepetitionMandatoryWithSeparator`,idx:e.idx,separator:M(new A({terminalType:e.separator})),definition:t(e.definition)};else if(e instanceof O)return{type:`RepetitionWithSeparator`,idx:e.idx,separator:M(new A({terminalType:e.separator})),definition:t(e.definition)};else if(e instanceof D)return{type:`Repetition`,idx:e.idx,definition:t(e.definition)};else if(e instanceof k)return{type:`Alternation`,idx:e.idx,definition:t(e.definition)};else if(e instanceof A){let t={type:`Terminal`,name:e.terminalType.name,label:v(e.terminalType),idx:e.idx};typeof e.label==`string`&&(t.terminalLabel=e.label);let n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=n instanceof RegExp?n.source:n),t}else if(e instanceof S)return{type:`Rule`,name:e.name,orgText:e.orgText,definition:t(e.definition)};else throw Error(`non exhaustive match`)}function N(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0))}var P=class{visit(e){let t=e;switch(t.constructor){case x:return this.visitNonTerminal(t);case C:return this.visitAlternative(t);case w:return this.visitOption(t);case T:return this.visitRepetitionMandatory(t);case E:return this.visitRepetitionMandatoryWithSeparator(t);case O:return this.visitRepetitionWithSeparator(t);case D:return this.visitRepetition(t);case k:return this.visitAlternation(t);case A:return this.visitTerminal(t);case S:return this.visitRule(t);default:throw Error(`non exhaustive match`)}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}};function ee(e){return e instanceof C||e instanceof w||e instanceof D||e instanceof T||e instanceof E||e instanceof O||e instanceof A||e instanceof S}function te(e,t=[]){return e instanceof w||e instanceof D||e instanceof O?!0:e instanceof k?e.definition.some(e=>te(e,t)):e instanceof x&&t.includes(e)?!1:e instanceof b?(e instanceof x&&t.push(e),e.definition.every(e=>te(e,t))):!1}function F(e){return e instanceof k}function I(e){if(e instanceof x)return`SUBRULE`;if(e instanceof w)return`OPTION`;if(e instanceof k)return`OR`;if(e instanceof T)return`AT_LEAST_ONE`;if(e instanceof E)return`AT_LEAST_ONE_SEP`;if(e instanceof O)return`MANY_SEP`;if(e instanceof D)return`MANY`;if(e instanceof A)return`CONSUME`;throw Error(`non exhaustive match`)}var ne=class{walk(e,t=[]){e.definition.forEach((n,r)=>{let i=e.definition.slice(r+1);if(n instanceof x)this.walkProdRef(n,i,t);else if(n instanceof A)this.walkTerminal(n,i,t);else if(n instanceof C)this.walkFlat(n,i,t);else if(n instanceof w)this.walkOption(n,i,t);else if(n instanceof T)this.walkAtLeastOne(n,i,t);else if(n instanceof E)this.walkAtLeastOneSep(n,i,t);else if(n instanceof O)this.walkManySep(n,i,t);else if(n instanceof D)this.walkMany(n,i,t);else if(n instanceof k)this.walkOr(n,i,t);else throw Error(`non exhaustive match`)})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){let r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){let r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){let r=[new w({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){let r=L(e,t,n);this.walk(e,r)}walkMany(e,t,n){let r=[new w({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){let r=L(e,t,n);this.walk(e,r)}walkOr(e,t,n){let r=t.concat(n);e.definition.forEach(e=>{let t=new C({definition:[e]});this.walk(t,r)})}};function L(e,t,n){return[new w({definition:[new A({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}function re(e){if(e instanceof x)return re(e.referencedRule);if(e instanceof A)return oe(e);if(ee(e))return ie(e);if(F(e))return ae(e);throw Error(`non exhaustive match`)}function ie(e){let t=[],n=e.definition,r=0,i=n.length>r,a,o=!0;for(;i&&o;)a=n[r],o=te(a),t=t.concat(re(a)),r+=1,i=n.length>r;return[...new Set(t)]}function ae(e){let t=e.definition.map(e=>re(e));return[...new Set(t.flat())]}function oe(e){return[e.terminalType]}var se=`_~IN~_`,ce=class extends ne{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){let r=ue(e.referencedRule,e.idx)+this.topProd.name,i=re(new C({definition:t.concat(n)}));this.follows[r]=i}};function le(e){let t={};return e.forEach(e=>{let n=new ce(e).startWalking();Object.assign(t,n)}),t}function ue(e,t){return e.name+t+se}var de={},fe=new f;function pe(e){let t=e.toString();if(de.hasOwnProperty(t))return de[t];{let e=fe.pattern(t);return de[t]=e,e}}function me(){de={}}var he=`Complement Sets are not supported for first char optimization`,ge=`Unable to use "first char" lexer optimizations:
10
- `;function _e(e,t=!1){try{let t=pe(e);return ve(t.value,{},t.flags.ignoreCase)}catch(n){if(n.message===he)t&&h(`${ge}\tUnable to optimize: < ${e.toString()} >\n Complement Sets cannot be automatically optimized.
11
- This will disable the lexer's first char optimizations.
12
- See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n=``;t&&(n=`
13
- This will disable the lexer's first char optimizations.
14
- See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),m(`${ge}\n\tFailed parsing: < ${e.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function ve(e,t,n){switch(e.type){case`Disjunction`:for(let r=0;r<e.value.length;r++)ve(e.value[r],t,n);break;case`Alternative`:let r=e.value;for(let e=0;e<r.length;e++){let i=r[e];switch(i.type){case`EndAnchor`:case`GroupBackReference`:case`Lookahead`:case`NegativeLookahead`:case`Lookbehind`:case`NegativeLookbehind`:case`StartAnchor`:case`WordBoundary`:case`NonWordBoundary`:continue}let a=i;switch(a.type){case`Character`:ye(a.value,t,n);break;case`Set`:if(a.complement===!0)throw Error(he);a.value.forEach(e=>{if(typeof e==`number`)ye(e,t,n);else{let r=e;if(n===!0)for(let e=r.from;e<=r.to;e++)ye(e,t,n);else{for(let e=r.from;e<=r.to&&e<256;e++)ye(e,t,n);if(r.to>=256){let e=r.from>=256?r.from:256,n=r.to,i=it(e),a=it(n);for(let e=i;e<=a;e++)t[e]=e}}}});break;case`Group`:ve(a.value,t,n);break;default:throw Error(`Non Exhaustive Match`)}let o=a.quantifier!==void 0&&a.quantifier.atLeast===0;if(a.type===`Group`&&Se(a)===!1||a.type!==`Group`&&o===!1)break}break;default:throw Error(`non exhaustive match!`)}return Object.values(t)}function ye(e,t,n){let r=it(e);t[r]=r,n===!0&&be(e,t)}function be(e,t){let n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){let e=it(r.charCodeAt(0));t[e]=e}else{let e=n.toLowerCase();if(e!==n){let n=it(e.charCodeAt(0));t[n]=n}}}function xe(e,t){return e.value.find(e=>{if(typeof e==`number`)return t.includes(e);{let n=e;return t.find(e=>n.from<=e&&e<=n.to)!==void 0}})}function Se(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?Array.isArray(e.value)?e.value.every(Se):Se(e.value):!1}var Ce=class extends p{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case`Lookahead`:this.visitLookahead(e);return;case`NegativeLookahead`:this.visitNegativeLookahead(e);return;case`Lookbehind`:this.visitLookbehind(e);return;case`NegativeLookbehind`:this.visitNegativeLookbehind(e);return}super.visitChildren(e)}}visitCharacter(e){this.targetCharCodes.includes(e.value)&&(this.found=!0)}visitSet(e){e.complement?xe(e,this.targetCharCodes)===void 0&&(this.found=!0):xe(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};function we(e,t){if(t instanceof RegExp){let n=pe(t),r=new Ce(e);return r.visit(n),r.found}else{for(let n of t){let t=n.charCodeAt(0);if(e.includes(t))return!0}return!1}}var Te=`PATTERN`,Ee=`defaultMode`,De=`modes`;function Oe(e,t){t=Object.assign({safeMode:!1,positionTracking:`full`,lineTerminatorCharacters:[`\r`,`
15
- `],tracer:(e,t)=>t()},t);let n=t.tracer;n(`initCharCodeToOptimizedIndexMap`,()=>{at()});let r;n(`Reject Lexer.NA`,()=>{r=e.filter(e=>e[Te]!==z.NA)});let i=!1,a;n(`Transform Patterns`,()=>{i=!1,a=r.map(e=>{let t=e[Te];if(t instanceof RegExp){let e=t.source;return e.length===1&&e!==`^`&&e!==`$`&&e!==`.`&&!t.ignoreCase?e:e.length===2&&e[0]===`\\`&&![`d`,`D`,`s`,`S`,`t`,`r`,`n`,`t`,`0`,`c`,`b`,`B`,`f`,`v`,`w`,`W`].includes(e[1])?e[1]:Ke(t)}else if(typeof t==`function`)return i=!0,{exec:t};else if(typeof t==`object`)return i=!0,t;else if(typeof t==`string`){if(t.length===1)return t;{let e=t.replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`);return Ke(new RegExp(e))}}else throw Error(`non exhaustive match`)})});let o,s,c,l,u;n(`misc mapping`,()=>{o=r.map(e=>e.tokenTypeIdx),s=r.map(e=>{let t=e.GROUP;if(t!==z.SKIPPED){if(typeof t==`string`)return t;if(t===void 0)return!1;throw Error(`non exhaustive match`)}}),c=r.map(e=>{let t=e.LONGER_ALT;if(t)return Array.isArray(t)?t.map(e=>r.indexOf(e)):[r.indexOf(t)]}),l=r.map(e=>e.PUSH_MODE),u=r.map(e=>Object.hasOwn(e,`POP_MODE`))});let d;n(`Line Terminator Handling`,()=>{let e=tt(t.lineTerminatorCharacters);d=r.map(e=>!1),t.positionTracking!==`onlyOffset`&&(d=r.map(t=>Object.hasOwn(t,`LINE_BREAKS`)?!!t.LINE_BREAKS:$e(t,e)===!1&&we(e,t.PATTERN)))});let f,p,h,g;n(`Misc Mapping #2`,()=>{f=r.map(Xe),p=a.map(Ze),h=r.reduce((e,t)=>{let n=t.GROUP;return typeof n==`string`&&n!==z.SKIPPED&&(e[n]=[]),e},{}),g=a.map((e,t)=>({pattern:a[t],longerAlt:c[t],canLineTerminator:d[t],isCustom:f[t],short:p[t],group:s[t],push:l[t],pop:u[t],tokenTypeIdx:o[t],tokenType:r[t]}))});let _=!0,v=[];return t.safeMode||n(`First Char Optimization`,()=>{v=r.reduce((e,n,r)=>{if(typeof n.PATTERN==`string`)nt(e,it(n.PATTERN.charCodeAt(0)),g[r]);else if(Array.isArray(n.START_CHARS_HINT)){let t;n.START_CHARS_HINT.forEach(n=>{let i=it(typeof n==`string`?n.charCodeAt(0):n);t!==i&&(t=i,nt(e,i,g[r]))})}else if(n.PATTERN instanceof RegExp)if(n.PATTERN.unicode)_=!1,t.ensureOptimizations&&m(`${ge}\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n The regexp unicode flag is not currently supported by the regexp-to-ast library.
16
- This will disable the lexer's first char optimizations.
17
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let i=_e(n.PATTERN,t.ensureOptimizations);i.length===0&&(_=!1),i.forEach(t=>{nt(e,t,g[r])})}else t.ensureOptimizations&&m(`${ge}\tTokenType: <${n.name}> is using a custom token pattern without providing <start_chars_hint> parameter.\n This will disable the lexer's first char optimizations.
18
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),_=!1;return e},[])}),{emptyGroups:h,patternIdxToConfig:g,charCodeToPatternIdxToConfig:v,hasCustom:i,canBeOptimized:_}}function ke(e,t){let n=[],r=je(e);n=n.concat(r.errors);let i=Me(r.valid),a=i.valid;return n=n.concat(i.errors),n=n.concat(Ae(a)),n=n.concat(Be(a)),n=n.concat(Ve(a,t)),n=n.concat(He(a)),n}function Ae(e){let t=[],n=e.filter(e=>e[Te]instanceof RegExp);return t=t.concat(Pe(n)),t=t.concat(Le(n)),t=t.concat(Re(n)),t=t.concat(ze(n)),t=t.concat(Fe(n)),t}function je(e){let t=e.filter(e=>!Object.hasOwn(e,Te));return{errors:t.map(e=>({message:`Token Type: ->`+e.name+`<- missing static 'PATTERN' property`,type:R.MISSING_PATTERN,tokenTypes:[e]})),valid:e.filter(e=>!t.includes(e))}}function Me(e){let t=e.filter(e=>{let t=e[Te];return!(t instanceof RegExp)&&typeof t!=`function`&&!Object.hasOwn(t,`exec`)&&typeof t!=`string`});return{errors:t.map(e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.`,type:R.INVALID_PATTERN,tokenTypes:[e]})),valid:e.filter(e=>!t.includes(e))}}var Ne=/[^\\][$]/;function Pe(e){class t extends p{constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}return e.filter(e=>{let n=e.PATTERN;try{let e=pe(n),r=new t;return r.visit(e),r.found}catch{return Ne.test(n.source)}}).map(e=>({message:`Unexpected RegExp Anchor Error:
19
- Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
20
- See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:R.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}function Fe(e){return e.filter(e=>e.PATTERN.test(``)).map(e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' must not match an empty string`,type:R.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}var Ie=/[^\\[][\^]|^\^/;function Le(e){class t extends p{constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}return e.filter(e=>{let n=e.PATTERN;try{let e=pe(n),r=new t;return r.visit(e),r.found}catch{return Ie.test(n.source)}}).map(e=>({message:`Unexpected RegExp Anchor Error:
21
- Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
22
- See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:R.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}function Re(e){return e.filter(e=>{let t=e[Te];return t instanceof RegExp&&(t.multiline||t.global)}).map(e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' may NOT contain global('g') or multiline('m')`,type:R.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}function ze(e){let t=[],n=e.map(n=>e.reduce((e,r)=>n.PATTERN.source===r.PATTERN.source&&!t.includes(r)&&r.PATTERN!==z.NA?(t.push(r),e.push(r),e):e,[]));return n=n.filter(Boolean),n.filter(e=>e.length>1).map(e=>{let t=e.map(e=>e.name);return{message:`The same RegExp pattern ->${e[0].PATTERN}<-has been used in all of the following Token Types: ${t.join(`, `)} <-`,type:R.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}function Be(e){return e.filter(e=>{if(!Object.hasOwn(e,`GROUP`))return!1;let t=e.GROUP;return t!==z.SKIPPED&&t!==z.NA&&typeof t!=`string`}).map(e=>({message:`Token Type: ->`+e.name+`<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String`,type:R.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}function Ve(e,t){return e.filter(e=>e.PUSH_MODE!==void 0&&!t.includes(e.PUSH_MODE)).map(e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:R.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}function He(e){let t=[],n=e.reduce((e,t,n)=>{let r=t.PATTERN;return r===z.NA||(typeof r==`string`?e.push({str:r,idx:n,tokenType:t}):r instanceof RegExp&&We(r)&&e.push({str:r.source,idx:n,tokenType:t})),e},[]);return e.forEach((e,r)=>{n.forEach(({str:n,idx:i,tokenType:a})=>{if(r<i&&Ue(n,e.PATTERN)){let n=`Token: ->${a.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:R.UNREACHABLE_PATTERN,tokenTypes:[e,a]})}})}),t}function Ue(e,t){if(t instanceof RegExp){if(Ge(t))return!1;let n=t.exec(e);return n!==null&&n.index===0}else if(typeof t==`function`)return t(e,0,[],{});else if(Object.hasOwn(t,`exec`))return t.exec(e,0,[],{});else if(typeof t==`string`)return t===e;else throw Error(`non exhaustive match`)}function We(e){return[`.`,`\\`,`[`,`]`,`|`,`^`,`$`,`(`,`)`,`?`,`*`,`+`,`{`].find(t=>e.source.indexOf(t)!==-1)===void 0}function Ge(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(e.source)}function Ke(e){let t=e.ignoreCase?`iy`:`y`;return RegExp(`${e.source}`,t)}function qe(e,t,n){let r=[];return Object.hasOwn(e,`defaultMode`)||r.push({message:`A MultiMode Lexer cannot be initialized without a <`+Ee+`> property in its definition
23
- `,type:R.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Object.hasOwn(e,`modes`)||r.push({message:`A MultiMode Lexer cannot be initialized without a <`+De+`> property in its definition
24
- `,type:R.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Object.hasOwn(e,`modes`)&&Object.hasOwn(e,`defaultMode`)&&!Object.hasOwn(e.modes,e.defaultMode)&&r.push({message:`A MultiMode Lexer cannot be initialized with a ${Ee}: <${e.defaultMode}>which does not exist\n`,type:R.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Object.hasOwn(e,`modes`)&&Object.keys(e.modes).forEach(t=>{let n=e.modes[t];n.forEach((e,i)=>{e===void 0?r.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${t}> at index: <${i}>\n`,type:R.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):Object.hasOwn(e,`LONGER_ALT`)&&(Array.isArray(e.LONGER_ALT)?e.LONGER_ALT:[e.LONGER_ALT]).forEach(i=>{i!==void 0&&!n.includes(i)&&r.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${e.name}> outside of mode <${t}>\n`,type:R.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})})}),r}function Je(e,t,n){let r=[],i=!1,a=Object.values(e.modes||{}).flat().filter(Boolean).filter(e=>e[Te]!==z.NA),o=tt(n);return t&&a.forEach(e=>{let t=$e(e,o);if(t!==!1){let n={message:et(e,t),type:t.issue,tokenType:e};r.push(n)}else Object.hasOwn(e,`LINE_BREAKS`)?e.LINE_BREAKS===!0&&(i=!0):we(o,e.PATTERN)&&(i=!0)}),t&&!i&&r.push({message:`Warning: No LINE_BREAKS Found.
25
- This Lexer has been defined to track line and column information,
26
- But none of the Token Types can be identified as matching a line terminator.
27
- See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
28
- for details.`,type:R.NO_LINE_BREAKS_FLAGS}),r}function Ye(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];if(Array.isArray(r))t[n]=[];else throw Error(`non exhaustive match`)}),t}function Xe(e){let t=e.PATTERN;if(t instanceof RegExp)return!1;if(typeof t==`function`||Object.hasOwn(t,`exec`))return!0;if(typeof t==`string`)return!1;throw Error(`non exhaustive match`)}function Ze(e){return typeof e==`string`&&e.length===1?e.charCodeAt(0):!1}var Qe={test:function(e){let t=e.length;for(let n=this.lastIndex;n<t;n++){let t=e.charCodeAt(n);if(t===10)return this.lastIndex=n+1,!0;if(t===13)return e.charCodeAt(n+1)===10?this.lastIndex=n+2:this.lastIndex=n+1,!0}return!1},lastIndex:0};function $e(e,t){if(Object.hasOwn(e,`LINE_BREAKS`))return!1;if(e.PATTERN instanceof RegExp){try{we(t,e.PATTERN)}catch(e){return{issue:R.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}else if(typeof e.PATTERN==`string`)return!1;else if(Xe(e))return{issue:R.CUSTOM_LINE_BREAK};else throw Error(`non exhaustive match`)}function et(e,t){if(t.issue===R.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
29
- \tThe problem is in the <${e.name}> Token Type\n\t Root cause: ${t.errMsg}.\n For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===R.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
30
- \tThe problem is in the <${e.name}> Token Type\n For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error(`non exhaustive match`)}function tt(e){return e.map(e=>typeof e==`string`?e.charCodeAt(0):e)}function nt(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}var rt=[];function it(e){return e<256?e:rt[e]}function at(){if(rt.length===0){rt=Array(65536);for(let e=0;e<65536;e++)rt[e]=e>255?255+~~(e/255):e}}function ot(e,t){let n=e.tokenTypeIdx;return n===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[n]===!0}function st(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var ct=1,lt={};function ut(e){let t=dt(e);ft(t),mt(t),pt(t),t.forEach(e=>{e.isParent=e.categoryMatches.length>0})}function dt(e){let t=[...e],n=e,r=!0;for(;r;){n=n.map(e=>e.CATEGORIES).flat().filter(Boolean);let e=n.filter(e=>!t.includes(e));t=t.concat(e),e.length===0?r=!1:n=e}return t}function ft(e){e.forEach(e=>{gt(e)||(lt[ct]=e,e.tokenTypeIdx=ct++),_t(e)&&!Array.isArray(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),_t(e)||(e.CATEGORIES=[]),vt(e)||(e.categoryMatches=[]),yt(e)||(e.categoryMatchesMap={})})}function pt(e){e.forEach(e=>{e.categoryMatches=[],Object.keys(e.categoryMatchesMap).forEach(t=>{e.categoryMatches.push(lt[t].tokenTypeIdx)})})}function mt(e){e.forEach(e=>{ht([],e)})}function ht(e,t){e.forEach(e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0}),t.CATEGORIES.forEach(n=>{let r=e.concat(t);r.includes(n)||ht(r,n)})}function gt(e){return Object.hasOwn(e??{},`tokenTypeIdx`)}function _t(e){return Object.hasOwn(e??{},`CATEGORIES`)}function vt(e){return Object.hasOwn(e??{},`categoryMatches`)}function yt(e){return Object.hasOwn(e??{},`categoryMatchesMap`)}function bt(e){return Object.hasOwn(e??{},`tokenTypeIdx`)}var xt={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,n,r,i,a){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`}},R;(function(e){e[e.MISSING_PATTERN=0]=`MISSING_PATTERN`,e[e.INVALID_PATTERN=1]=`INVALID_PATTERN`,e[e.EOI_ANCHOR_FOUND=2]=`EOI_ANCHOR_FOUND`,e[e.UNSUPPORTED_FLAGS_FOUND=3]=`UNSUPPORTED_FLAGS_FOUND`,e[e.DUPLICATE_PATTERNS_FOUND=4]=`DUPLICATE_PATTERNS_FOUND`,e[e.INVALID_GROUP_TYPE_FOUND=5]=`INVALID_GROUP_TYPE_FOUND`,e[e.PUSH_MODE_DOES_NOT_EXIST=6]=`PUSH_MODE_DOES_NOT_EXIST`,e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]=`MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE`,e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]=`MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY`,e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]=`MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST`,e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]=`LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED`,e[e.SOI_ANCHOR_FOUND=11]=`SOI_ANCHOR_FOUND`,e[e.EMPTY_MATCH_PATTERN=12]=`EMPTY_MATCH_PATTERN`,e[e.NO_LINE_BREAKS_FLAGS=13]=`NO_LINE_BREAKS_FLAGS`,e[e.UNREACHABLE_PATTERN=14]=`UNREACHABLE_PATTERN`,e[e.IDENTIFY_TERMINATOR=15]=`IDENTIFY_TERMINATOR`,e[e.CUSTOM_LINE_BREAK=16]=`CUSTOM_LINE_BREAK`,e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]=`MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE`})(R||={});var St={deferDefinitionErrorsHandling:!1,positionTracking:`full`,lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
31
- `,`\r`],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:xt,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(St);var z=class{constructor(e,t=St){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let n=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);let{time:r,value:i}=g(t),a=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${n}<-- <${e}> time: ${r}ms`),this.traceInitIndent--,i}else return t()},typeof t==`boolean`)throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
32
- a boolean 2nd argument is no longer supported`);this.config=Object.assign({},St,t);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n==`number`&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT(`Lexer Constructor`,()=>{let n,r=!0;this.TRACE_INIT(`Lexer Config handling`,()=>{if(this.config.lineTerminatorsPattern===St.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Qe;else if(this.config.lineTerminatorCharacters===St.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
33
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error(`"safeMode" and "ensureOptimizations" flags are mutually exclusive.`);this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),Array.isArray(e)?n={modes:{defaultMode:[...e]},defaultMode:Ee}:(r=!1,n=Object.assign({},e))}),this.config.skipValidations===!1&&(this.TRACE_INIT(`performRuntimeChecks`,()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(qe(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT(`performWarningRuntimeChecks`,()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(Je(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},Object.entries(n.modes).forEach(([e,t])=>{n.modes[e]=t.filter(e=>e!==void 0)});let i=Object.keys(n.modes);if(Object.entries(n.modes).forEach(([e,n])=>{this.TRACE_INIT(`Mode: <${e}> processing`,()=>{if(this.modes.push(e),this.config.skipValidations===!1&&this.TRACE_INIT(`validatePatterns`,()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(ke(n,i))}),this.lexerDefinitionErrors.length===0){ut(n);let r;this.TRACE_INIT(`analyzeTokenTypes`,()=>{r=Oe(n,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[e]=r.patternIdxToConfig,this.charCodeToPatternIdxToConfig[e]=r.charCodeToPatternIdxToConfig,this.emptyGroups=Object.assign({},this.emptyGroups,r.emptyGroups),this.hasCustom=r.hasCustom||this.hasCustom,this.canModeBeOptimized[e]=r.canBeOptimized}})}),this.defaultMode=n.defaultMode,this.lexerDefinitionErrors.length>0&&!this.config.deferDefinitionErrorsHandling){let e=this.lexerDefinitionErrors.map(e=>e.message).join(`-----------------------
34
- `);throw Error(`Errors detected in definition of Lexer:
35
- `+e)}this.lexerDefinitionWarning.forEach(e=>{h(e.message)}),this.TRACE_INIT(`Choosing sub-methods implementations`,()=>{if(r&&(this.handleModes=()=>{}),this.trackStartLines===!1&&(this.computeNewColumn=e=>e),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=()=>{}),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT(`Failed Optimization Warnings`,()=>{let e=Object.entries(this.canModeBeOptimized).reduce((e,[t,n])=>(n===!1&&e.push(t),e),[]);if(t.ensureOptimizations&&e.length>0)throw Error(`Lexer Modes: < ${e.join(`, `)} > cannot be optimized.\n Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
36
- Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT(`clearRegExpParserCache`,()=>{me()}),this.TRACE_INIT(`toFastProperties`,()=>{_(this)})})}tokenize(e,t=this.defaultMode){if(this.lexerDefinitionErrors.length>0){let e=this.lexerDefinitionErrors.map(e=>e.message).join(`-----------------------
37
- `);throw Error(`Unable to Tokenize because Errors detected in definition of Lexer:
38
- `+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_=e,v=_.length,y=0,b=0,x=this.hasCustom?0:Math.floor(e.length/10),S=Array(x),C=[],w=this.trackStartLines?1:void 0,T=this.trackStartLines?1:void 0,E=Ye(this.emptyGroups),D=this.trackStartLines,O=this.config.lineTerminatorsPattern,k=0,A=[],j=[],M=[],N=[];Object.freeze(N);let P=!1,ee=e=>{if(M.length===1&&e.tokenType.PUSH_MODE===void 0){let t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);C.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{M.pop();let e=M.at(-1);A=this.patternIdxToConfig[e],j=this.charCodeToPatternIdxToConfig[e],k=A.length;let t=this.canModeBeOptimized[e]&&this.config.safeMode===!1;P=!!(j&&t)}};function te(e){M.push(e),j=this.charCodeToPatternIdxToConfig[e],A=this.patternIdxToConfig[e],k=A.length,k=A.length;let t=this.canModeBeOptimized[e]&&this.config.safeMode===!1;P=!!(j&&t)}te.call(this,t);let F,I=this.config.recoveryEnabled;for(;y<v;){s=null,u=-1;let t=_.charCodeAt(y),x;if(P){let e=it(t),n=j[e];x=n===void 0?N:n}else x=A;let ne=x.length;for(n=0;n<ne;n++){F=x[n];let r=F.pattern;c=null;let d=F.short;if(d===!1?F.isCustom===!0?(g=r.exec(_,y,S,E),g===null?s=null:(s=g[0],u=s.length,g.payload!==void 0&&(c=g.payload))):(r.lastIndex=y,u=this.matchLength(r,e,y)):t===d&&(u=1,s=r),u!==-1){if(o=F.longerAlt,o!==void 0){s=e.substring(y,y+u);let t=o.length;for(i=0;i<t;i++){let t=A[o[i]],n=t.pattern;if(l=null,t.isCustom===!0?(g=n.exec(_,y,S,E),g===null?a=null:(a=g[0],g.payload!==void 0&&(l=g.payload))):(n.lastIndex=y,a=this.match(n,e,y)),a&&a.length>s.length){s=a,u=a.length,c=l,F=t;break}}}break}}if(u!==-1){if(d=F.group,d!==void 0&&(s=s===null?e.substring(y,y+u):s,f=F.tokenTypeIdx,p=this.createTokenInstance(s,y,f,F.tokenType,w,T,u),this.handlePayload(p,c),d===!1?b=this.addToken(S,b,p):E[d].push(p)),D===!0&&F.canLineTerminator===!0){let t=0,n,r;O.lastIndex=0;do s=s===null?e.substring(y,y+u):s,n=O.test(s),n===!0&&(r=O.lastIndex-1,t++);while(n===!0);t===0?T=this.computeNewColumn(T,u):(w+=t,T=u-r,this.updateTokenEndLineColumnLocation(p,d,r,t,w,T,u))}else T=this.computeNewColumn(T,u);y+=u,this.handleModes(F,ee,te,p)}else{let t=y,n=w,i=T,a=I===!1;for(;a===!1&&y<v;)for(y++,r=0;r<k;r++){let t=A[r],n=t.pattern,i=t.short;if(i===!1?t.isCustom===!0?a=n.exec(_,y,S,E)!==null:(n.lastIndex=y,a=n.exec(e)!==null):_.charCodeAt(y)===i&&(a=!0),a===!0)break}if(m=y-t,T=this.computeNewColumn(T,m),h=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(_,t,m,n,i,M.at(-1)),C.push({offset:t,line:n,column:i,length:m,message:h}),I===!1)break}}return this.hasCustom||(S.length=b),{tokens:S,groups:E,errors:C}}handleModes(e,t,n,r){if(e.pop===!0){let i=e.push;t(r),i!==void 0&&n.call(this,i)}else e.push!==void 0&&n.call(this,e.push)}updateTokenEndLineColumnLocation(e,t,n,r,i,a,o){let s,c;t!==void 0&&(s=n===o-1,c=s?-1:0,r===1&&s===!0||(e.endLine=i+c,e.endColumn=a-1+-c))}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,n,r){return{image:e,startOffset:t,tokenTypeIdx:n,tokenType:r}}createStartOnlyToken(e,t,n,r,i,a){return{image:e,startOffset:t,startLine:i,startColumn:a,tokenTypeIdx:n,tokenType:r}}createFullToken(e,t,n,r,i,a,o){return{image:e,startOffset:t,endOffset:t+o-1,startLine:i,endLine:i,startColumn:a,endColumn:a+o-1,tokenTypeIdx:n,tokenType:r}}addTokenUsingPush(e,t,n){return e.push(n),t}addTokenUsingMemberAccess(e,t,n){return e[t]=n,t++,t}handlePayloadNoCustom(e,t){}handlePayloadWithCustom(e,t){t!==null&&(e.payload=t)}match(e,t,n){return e.test(t)===!0?t.substring(n,e.lastIndex):null}matchLength(e,t,n){return e.test(t)===!0?e.lastIndex-n:-1}};z.SKIPPED=`This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.`,z.NA=/NOT_APPLICABLE/;function Ct(e){return wt(e)?e.LABEL:e.name}function wt(e){return typeof e.LABEL==`string`&&e.LABEL!==``}var Tt=`parent`,Et=`categories`,Dt=`label`,Ot=`group`,kt=`push_mode`,At=`pop_mode`,jt=`longer_alt`,Mt=`line_breaks`,Nt=`start_chars_hint`;function Pt(e){return Ft(e)}function Ft(e){let t=e.pattern,n={};if(n.name=e.name,t!==void 0&&(n.PATTERN=t),Object.hasOwn(e,Tt))throw`The parent property is no longer supported.
39
- See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return Object.hasOwn(e,Et)&&(n.CATEGORIES=e[Et]),ut([n]),Object.hasOwn(e,Dt)&&(n.LABEL=e[Dt]),Object.hasOwn(e,Ot)&&(n.GROUP=e[Ot]),Object.hasOwn(e,At)&&(n.POP_MODE=e[At]),Object.hasOwn(e,kt)&&(n.PUSH_MODE=e[kt]),Object.hasOwn(e,jt)&&(n.LONGER_ALT=e[jt]),Object.hasOwn(e,Mt)&&(n.LINE_BREAKS=e[Mt]),Object.hasOwn(e,Nt)&&(n.START_CHARS_HINT=e[Nt]),n}var It=Pt({name:`EOF`,pattern:z.NA});ut([It]);function Lt(e,t,n,r,i,a,o,s){return{image:t,startOffset:n,endOffset:r,startLine:i,endLine:a,startColumn:o,endColumn:s,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function Rt(e,t){return ot(e,t)}var zt={buildMismatchTokenMessage({expected:e,actual:t,previous:n,ruleName:r}){return`Expecting ${wt(e)?`--> ${Ct(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return`Redundant input, expecting EOF but found: `+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:r,ruleName:i}){let a=`
40
- but found: '`+t[0].image+`'`;return r?`Expecting: `+r+a:`Expecting: one of these possible Token sequences:\n${e.reduce((e,t)=>e.concat(t),[]).map(e=>`[${e.map(e=>Ct(e)).join(`, `)}]`).map((e,t)=>` ${t+1}. ${e}`).join(`
41
- `)}`+a},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:r}){let i=`
42
- but found: '`+t[0].image+`'`;return n?`Expecting: `+n+i:`Expecting: expecting at least one iteration which starts with one of these possible Token sequences::\n <${e.map(e=>`[${e.map(e=>Ct(e)).join(`,`)}]`).join(` ,`)}>`+i}};Object.freeze(zt);var Bt={buildRuleNotFoundError(e,t){return`Invalid grammar, reference to a rule which is not defined: ->`+t.nonTerminalName+`<-
43
- inside top level rule: ->`+e.name+`<-`}},Vt={buildDuplicateFoundError(e,t){function n(e){return e instanceof A?e.terminalType.name:e instanceof x?e.nonTerminalName:``}let r=e.name,i=t[0],a=i.idx,o=I(i),s=n(i),c=`->${o}${a>0?a:``}<- ${s?`with argument: ->${s}<-`:``}
44
- appears more than once (${t.length} times) in the top level rule: ->${r}<-.
45
- For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
46
- `;return c=c.replace(/[ \t]+/g,` `),c=c.replace(/\s\s+/g,`
47
- `),c},buildNamespaceConflictError(e){return`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){let t=e.prefixPath.map(e=>Ct(e)).join(`, `),n=e.alternation.idx===0?``:e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(` ,`)}> due to common lookahead prefix\nin <OR${n}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(e){let t=e.alternation.idx===0?``:e.alternation.idx,n=e.prefixPath.length===0,r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(` ,`)}> in <OR${t}> inside <${e.topLevelRule.name}> Rule,\n`;if(n)r+=`These alternatives are all empty (match no tokens), making them indistinguishable.
48
- Only the last alternative may be empty.
49
- `;else{let t=e.prefixPath.map(e=>Ct(e)).join(`, `);r+=`<${t}> may appears as a prefix path in all these alternatives.\n`}return r+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
50
- For Further details.`,r},buildEmptyRepetitionError(e){let t=I(e.repetition);return e.repetition.idx!==0&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError(e){return`deprecated`},buildEmptyAlternationError(e){return`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives:\n<OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\n has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){let t=e.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${t}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${`${t} --> ${e.leftRecursionPath.map(e=>e.name).concat([t]).join(` --> `)}`}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return`deprecated`},buildDuplicateRuleNameError(e){let t;return t=e.topLevelRule instanceof S?e.topLevelRule.name:e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function Ht(e,t){let n=new Ut(e,t);return n.resolveRefs(),n.errors}var Ut=class extends P{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){Object.values(this.nameToTopRule).forEach(e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{let t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:V.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},Wt=class extends ne{constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName=``,this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error(`The path does not start with the walker's top Rule!`);return this.ruleStack=[...this.path.ruleStack].reverse(),this.occurrenceStack=[...this.path.occurrenceStack].reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}}updateExpectedNext(){this.ruleStack.length===0?(this.nextProductionName=``,this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},Gt=class extends Wt{constructor(e,t){super(e,t),this.path=t,this.nextTerminalName=``,this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,n){this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found&&(this.possibleTokTypes=re(new C({definition:t.concat(n)})),this.found=!0)}},Kt=class extends ne{constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},qt=class extends Kt{walkMany(e,t,n){if(e.idx===this.occurrence){let e=t.concat(n)[0];this.result.isEndOfRule=e===void 0,e instanceof A&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkMany(e,t,n)}},Jt=class extends Kt{walkManySep(e,t,n){if(e.idx===this.occurrence){let e=t.concat(n)[0];this.result.isEndOfRule=e===void 0,e instanceof A&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkManySep(e,t,n)}},Yt=class extends Kt{walkAtLeastOne(e,t,n){if(e.idx===this.occurrence){let e=t.concat(n)[0];this.result.isEndOfRule=e===void 0,e instanceof A&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOne(e,t,n)}},Xt=class extends Kt{walkAtLeastOneSep(e,t,n){if(e.idx===this.occurrence){let e=t.concat(n)[0];this.result.isEndOfRule=e===void 0,e instanceof A&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOneSep(e,t,n)}};function Zt(e,t,n=[]){n=[...n];let r=[],i=0;function a(t){return t.concat(e.slice(i+1))}function o(e){let i=Zt(a(e),t,n);return r.concat(i)}for(;n.length<t&&i<e.length;){let t=e[i];if(t instanceof C||t instanceof x)return o(t.definition);if(t instanceof w)r=o(t.definition);else if(t instanceof T)return o(t.definition.concat([new D({definition:t.definition})]));else if(t instanceof E)return o([new C({definition:t.definition}),new D({definition:[new A({terminalType:t.separator})].concat(t.definition)})]);else if(t instanceof O)r=o(t.definition.concat([new D({definition:[new A({terminalType:t.separator})].concat(t.definition)})]));else if(t instanceof D)r=o(t.definition.concat([new D({definition:t.definition})]));else if(t instanceof k)return t.definition.forEach(e=>{e.definition.length!==0&&(r=o(e.definition))}),r;else if(t instanceof A)n.push(t.terminalType);else throw Error(`non exhaustive match`);i++}return r.push({partialPath:n,suffixDef:e.slice(i)}),r}function Qt(e,t,n,r){let i=`EXIT_NONE_TERMINAL`,a=[i],o=`EXIT_ALTERNATIVE`,s=!1,c=t.length,l=c-r-1,u=[],d=[];for(d.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});d.length!==0;){let e=d.pop();if(e===o){s&&d.at(-1).idx<=l&&d.pop();continue}let r=e.def,f=e.idx,p=e.ruleStack,m=e.occurrenceStack;if(r.length===0)continue;let h=r[0];if(h===i){let e={idx:f,def:r.slice(1),ruleStack:p.slice(0,-1),occurrenceStack:m.slice(0,-1)};d.push(e)}else if(h instanceof A)if(f<c-1){let e=f+1,i=t[e];if(n(i,h.terminalType)){let t={idx:e,def:r.slice(1),ruleStack:p,occurrenceStack:m};d.push(t)}}else if(f===c-1)u.push({nextTokenType:h.terminalType,nextTokenOccurrence:h.idx,ruleStack:p,occurrenceStack:m}),s=!0;else throw Error(`non exhaustive match`);else if(h instanceof x){let e=[...p];e.push(h.nonTerminalName);let t=[...m];t.push(h.idx);let n={idx:f,def:h.definition.concat(a,r.slice(1)),ruleStack:e,occurrenceStack:t};d.push(n)}else if(h instanceof w){let e={idx:f,def:r.slice(1),ruleStack:p,occurrenceStack:m};d.push(e),d.push(o);let t={idx:f,def:h.definition.concat(r.slice(1)),ruleStack:p,occurrenceStack:m};d.push(t)}else if(h instanceof T){let e=new D({definition:h.definition,idx:h.idx}),t={idx:f,def:h.definition.concat([e],r.slice(1)),ruleStack:p,occurrenceStack:m};d.push(t)}else if(h instanceof E){let e=new D({definition:[new A({terminalType:h.separator})].concat(h.definition),idx:h.idx}),t={idx:f,def:h.definition.concat([e],r.slice(1)),ruleStack:p,occurrenceStack:m};d.push(t)}else if(h instanceof O){let e={idx:f,def:r.slice(1),ruleStack:p,occurrenceStack:m};d.push(e),d.push(o);let t=new D({definition:[new A({terminalType:h.separator})].concat(h.definition),idx:h.idx}),n={idx:f,def:h.definition.concat([t],r.slice(1)),ruleStack:p,occurrenceStack:m};d.push(n)}else if(h instanceof D){let e={idx:f,def:r.slice(1),ruleStack:p,occurrenceStack:m};d.push(e),d.push(o);let t=new D({definition:h.definition,idx:h.idx}),n={idx:f,def:h.definition.concat([t],r.slice(1)),ruleStack:p,occurrenceStack:m};d.push(n)}else if(h instanceof k)for(let e=h.definition.length-1;e>=0;e--){let t={idx:f,def:h.definition[e].definition.concat(r.slice(1)),ruleStack:p,occurrenceStack:m};d.push(t),d.push(o)}else if(h instanceof C)d.push({idx:f,def:h.definition.concat(r.slice(1)),ruleStack:p,occurrenceStack:m});else if(h instanceof S)d.push($t(h,f,p,m));else throw Error(`non exhaustive match`)}return u}function $t(e,t,n,r){let i=[...n];i.push(e.name);let a=[...r];return a.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:a}}var B;(function(e){e[e.OPTION=0]=`OPTION`,e[e.REPETITION=1]=`REPETITION`,e[e.REPETITION_MANDATORY=2]=`REPETITION_MANDATORY`,e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]=`REPETITION_MANDATORY_WITH_SEPARATOR`,e[e.REPETITION_WITH_SEPARATOR=4]=`REPETITION_WITH_SEPARATOR`,e[e.ALTERNATION=5]=`ALTERNATION`})(B||={});function en(e){if(e instanceof w||e===`Option`)return B.OPTION;if(e instanceof D||e===`Repetition`)return B.REPETITION;if(e instanceof T||e===`RepetitionMandatory`)return B.REPETITION_MANDATORY;if(e instanceof E||e===`RepetitionMandatoryWithSeparator`)return B.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof O||e===`RepetitionWithSeparator`)return B.REPETITION_WITH_SEPARATOR;if(e instanceof k||e===`Alternation`)return B.ALTERNATION;throw Error(`non exhaustive match`)}function tn(e){let{occurrence:t,rule:n,prodType:r,maxLookahead:i}=e,a=en(r);return a===B.ALTERNATION?pn(t,n,i):mn(t,n,a,i)}function nn(e,t,n,r,i,a){let o=pn(e,t,n);return a(o,r,_n(o)?st:ot,i)}function rn(e,t,n,r,i,a){let o=mn(e,t,i,n),s=_n(o)?st:ot;return a(o[0],s,r)}function an(e,t,n,r){let i=e.length,a=e.every(e=>e.every(e=>e.length===1));if(t)return function(t){let r=t.map(e=>e.GATE);for(let t=0;t<i;t++){let i=e[t],a=i.length,o=r[t];if(!(o!==void 0&&o.call(this)===!1))nextPath:for(let e=0;e<a;e++){let r=i[e],a=r.length;for(let e=0;e<a;e++)if(n(this.LA_FAST(e+1),r[e])===!1)continue nextPath;return t}}};if(a&&!r){let t=e.map(e=>e.flat()).reduce((e,t,n)=>(t.forEach(t=>{t.tokenTypeIdx in e||(e[t.tokenTypeIdx]=n),t.categoryMatches.forEach(t=>{Object.hasOwn(e,t)||(e[t]=n)})}),e),{});return function(){return t[this.LA_FAST(1).tokenTypeIdx]}}else return function(){for(let t=0;t<i;t++){let r=e[t],i=r.length;nextPath:for(let e=0;e<i;e++){let i=r[e],a=i.length;for(let e=0;e<a;e++)if(n(this.LA_FAST(e+1),i[e])===!1)continue nextPath;return t}}}}function on(e,t,n){let r=e.every(e=>e.length===1),i=e.length;if(r&&!n){let t=e.flat();if(t.length===1&&t[0].categoryMatches.length===0){let e=t[0].tokenTypeIdx;return function(){return this.LA_FAST(1).tokenTypeIdx===e}}else{let e=t.reduce((e,t,n)=>(e[t.tokenTypeIdx]=!0,t.categoryMatches.forEach(t=>{e[t]=!0}),e),[]);return function(){return e[this.LA_FAST(1).tokenTypeIdx]===!0}}}else return function(){nextPath:for(let n=0;n<i;n++){let r=e[n],i=r.length;for(let e=0;e<i;e++)if(t(this.LA_FAST(e+1),r[e])===!1)continue nextPath;return!0}return!1}}var sn=class extends ne{constructor(e,t,n){super(),this.topProd=e,this.targetOccurrence=t,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,n,r){return e.idx===this.targetOccurrence&&this.targetProdType===t?(this.restDef=n.concat(r),!0):!1}walkOption(e,t,n){this.checkIsTarget(e,B.OPTION,t,n)||super.walkOption(e,t,n)}walkAtLeastOne(e,t,n){this.checkIsTarget(e,B.REPETITION_MANDATORY,t,n)||super.walkOption(e,t,n)}walkAtLeastOneSep(e,t,n){this.checkIsTarget(e,B.REPETITION_MANDATORY_WITH_SEPARATOR,t,n)||super.walkOption(e,t,n)}walkMany(e,t,n){this.checkIsTarget(e,B.REPETITION,t,n)||super.walkOption(e,t,n)}walkManySep(e,t,n){this.checkIsTarget(e,B.REPETITION_WITH_SEPARATOR,t,n)||super.walkOption(e,t,n)}},cn=class extends P{constructor(e,t,n){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=n,this.result=[]}checkIsTarget(e,t){e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,B.OPTION)}visitRepetition(e){this.checkIsTarget(e,B.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,B.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,B.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,B.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,B.ALTERNATION)}};function ln(e){let t=Array(e);for(let n=0;n<e;n++)t[n]=[];return t}function un(e){let t=[``];for(let n=0;n<e.length;n++){let r=e[n],i=[];for(let e=0;e<t.length;e++){let n=t[e];i.push(n+`_`+r.tokenTypeIdx);for(let e=0;e<r.categoryMatches.length;e++){let t=`_`+r.categoryMatches[e];i.push(n+t)}}t=i}return t}function dn(e,t,n){for(let r=0;r<e.length;r++){if(r===n)continue;let i=e[r];for(let e=0;e<t.length;e++)if(i[t[e]]===!0)return!1}return!0}function fn(e,t){let n=e.map(e=>Zt([e],1)),r=ln(n.length),i=n.map(e=>{let t={};return e.forEach(e=>{un(e.partialPath).forEach(e=>{t[e]=!0})}),t}),a=n;for(let e=1;e<=t;e++){let n=a;a=ln(n.length);for(let o=0;o<n.length;o++){let s=n[o];for(let n=0;n<s.length;n++){let c=s[n].partialPath,l=s[n].suffixDef,u=un(c);if(dn(i,u,o)||l.length===0||c.length===t){let e=r[o];if(hn(e,c)===!1){e.push(c);for(let e=0;e<u.length;e++){let t=u[e];i[o][t]=!0}}}else{let t=Zt(l,e+1,c);a[o]=a[o].concat(t),t.forEach(e=>{un(e.partialPath).forEach(e=>{i[o][e]=!0})})}}}}return r}function pn(e,t,n,r){let i=new cn(e,B.ALTERNATION,r);return t.accept(i),fn(i.result,n)}function mn(e,t,n,r){let i=new cn(e,n);t.accept(i);let a=i.result,o=new sn(t,e,n).startWalking();return fn([new C({definition:a}),new C({definition:o})],r)}function hn(e,t){compareOtherPath:for(let n=0;n<e.length;n++){let r=e[n];if(r.length===t.length){for(let e=0;e<r.length;e++){let n=t[e],i=r[e];if(!(n===i||i.categoryMatchesMap[n.tokenTypeIdx]!==void 0))continue compareOtherPath}return!0}}return!1}function gn(e,t){return e.length<t.length&&e.every((e,n)=>{let r=t[n];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]})}function _n(e){return e.every(e=>e.every(e=>e.every(e=>e.categoryMatches.length===0)))}function vn(e){return e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}).map(e=>Object.assign({type:V.CUSTOM_LOOKAHEAD_VALIDATION},e))}function yn(e,t,n,r){let i=e.flatMap(e=>bn(e,n)),a=In(e,t,n),o=e.flatMap(e=>Mn(e,n)),s=e.flatMap(t=>wn(t,e,r,n));return i.concat(a,o,s)}function bn(e,t){let n=new Cn;e.accept(n);let r=n.allProductions,i=Object.groupBy(r,xn),a=Object.fromEntries(Object.entries(i).filter(([e,t])=>t.length>1));return Object.values(a).map(n=>{let r=n[0],i=t.buildDuplicateFoundError(e,n),a=I(r),o={message:i,type:V.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:a,occurrence:r.idx},s=Sn(r);return s&&(o.parameter=s),o})}function xn(e){return`${I(e)}_#_${e.idx}_#_${Sn(e)}`}function Sn(e){return e instanceof A?e.terminalType.name:e instanceof x?e.nonTerminalName:``}var Cn=class extends P{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};function wn(e,t,n,r){let i=[];if(t.reduce((t,n)=>n.name===e.name?t+1:t,0)>1){let t=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});i.push({message:t,type:V.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}function Tn(e,t,n){let r=[],i;return t.includes(e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,r.push({message:i,type:V.INVALID_RULE_OVERRIDE,ruleName:e})),r}function En(e,t,n,r=[]){let i=[],a=Dn(t.definition);if(a.length===0)return[];{let t=e.name;a.includes(e)&&i.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:V.LEFT_RECURSION,ruleName:t});let o=r.concat([e]),s=a.filter(e=>!o.includes(e)).flatMap(t=>{let i=[...r];return i.push(t),En(e,t,n,i)});return i.concat(s)}}function Dn(e){let t=[];if(e.length===0)return t;let n=e[0];if(n instanceof x)t.push(n.referencedRule);else if(n instanceof C||n instanceof w||n instanceof T||n instanceof E||n instanceof O||n instanceof D)t=t.concat(Dn(n.definition));else if(n instanceof k)t=n.definition.map(e=>Dn(e.definition)).flat();else if(!(n instanceof A))throw Error(`non exhaustive match`);let r=te(n),i=e.length>1;if(r&&i){let n=e.slice(1);return t.concat(Dn(n))}else return t}var On=class extends P{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};function kn(e,t){let n=new On;return e.accept(n),n.alternations.flatMap(n=>n.definition.slice(0,-1).flatMap((r,i)=>Qt([r],[],ot,1).length===0?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:i}),type:V.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:i+1}]:[]))}function An(e,t,n){let r=new On;e.accept(r);let i=r.alternations;return i=i.filter(e=>e.ignoreAmbiguities!==!0),i.flatMap(r=>{let i=r.idx,a=pn(i,e,r.maxLookahead||t,r),o=Pn(a,r,e,n),s=Fn(a,r,e,n);return o.concat(s)})}var jn=class extends P{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}};function Mn(e,t){let n=new On;return e.accept(n),n.alternations.flatMap(n=>n.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:V.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]:[])}function Nn(e,t,n){let r=[];return e.forEach(e=>{let i=new jn;e.accept(i),i.allProductions.forEach(i=>{let a=en(i),o=i.maxLookahead||t,s=i.idx;if(mn(s,e,a,o)[0].flat().length===0){let t=n.buildEmptyRepetitionError({topLevelRule:e,repetition:i});r.push({message:t,type:V.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),r}function Pn(e,t,n,r){let i=[];return e.reduce((n,r,a)=>(t.definition[a].ignoreAmbiguities===!0||r.forEach(r=>{let o=[a];e.forEach((e,n)=>{a!==n&&hn(e,r)&&t.definition[n].ignoreAmbiguities!==!0&&o.push(n)}),o.length>1&&!hn(i,r)&&(i.push(r),n.push({alts:o,path:r}))}),n),[]).map(e=>{let i=e.alts.map(e=>e+1);return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:V.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:e.alts}})}function Fn(e,t,n,r){let i=e.reduce((e,t,n)=>{let r=t.map(e=>({idx:n,path:e}));return e.concat(r)},[]);return i.flatMap(e=>{if(t.definition[e.idx].ignoreAmbiguities===!0)return[];let a=e.idx,o=e.path;return i.filter(e=>t.definition[e.idx].ignoreAmbiguities!==!0&&e.idx<a&&gn(e.path,o)).map(e=>{let i=[e.idx+1,a+1],o=t.idx===0?``:t.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:V.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:o,alternatives:i}})})}function In(e,t,n){let r=[],i=t.map(e=>e.name);return e.forEach(e=>{let t=e.name;if(i.includes(t)){let i=n.buildNamespaceConflictError(e);r.push({message:i,type:V.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),r}function Ln(e){let t=Object.assign({errMsgProvider:Bt},e),n={};return e.rules.forEach(e=>{n[e.name]=e}),Ht(n,t.errMsgProvider)}function Rn(e){let t=e.errMsgProvider??Vt;return yn(e.rules,e.tokenTypes,t,e.grammarName)}var zn=`MismatchedTokenException`,Bn=`NoViableAltException`,Vn=`EarlyExitException`,Hn=`NotAllInputParsedException`,Un=[zn,Bn,Vn,Hn];Object.freeze(Un);function Wn(e){return Un.includes(e.name)}var Gn=class extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},Kn=class extends Gn{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=zn}},qn=class extends Gn{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=Bn}},Jn=class extends Gn{constructor(e,t){super(e,t),this.name=Hn}},Yn=class extends Gn{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=Vn}},Xn={},Zn=`InRuleRecoveryException`,Qn=class extends Error{constructor(e){super(e),this.name=Zn}},$n=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Object.hasOwn(e,`recoveryEnabled`)?e.recoveryEnabled:Br.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=er)}getTokenToInsert(e){let t=Lt(e,``,NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,n,r){let i=this.findReSyncTokenType(),a=this.exportLexerState(),o=[],s=!1,c=this.LA_FAST(1),l=this.LA_FAST(1),u=()=>{let e=this.LA(0),t=new Kn(this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:c,previous:e,ruleName:this.getCurrRuleFullName()}),c,this.LA(0));t.resyncedTokens=o.slice(0,-1),this.SAVE_ERROR(t)};for(;!s;)if(this.tokenMatcher(l,r)){u();return}else if(n.call(this)){u(),e.apply(this,t);return}else this.tokenMatcher(l,i)?s=!0:(l=this.SKIP_TOKEN(),this.addToResyncTokens(l,o));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,t,n){return!(n===!1||this.tokenMatcher(this.LA_FAST(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getNextPossibleTokenTypes(e){let t=e.ruleStack[0],n=this.getGAstProductions()[t];return new Gt(n,e).startWalking()}getFollowsForInRuleRecovery(e,t){let n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new Qn(`sad sad panda`)}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||t.length===0)return!1;let n=this.LA_FAST(1);return t.find(e=>this.tokenMatcher(n,e))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let t=this.getCurrFollowKey();return this.getFollowSetFromFollowKey(t).includes(e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA_FAST(1),n=2;for(;;){let r=e.find(e=>Rt(t,e));if(r!==void 0)return r;t=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK_IDX===0)return Xn;let e=this.currRuleShortName,t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK,n=this.RULE_STACK_IDX+1,r=Array(n);for(let i=0;i<n;i++)i===0?r[i]=Xn:r[i]={ruleName:this.shortRuleNameToFullName(e[i]),idxInCallingRule:t[i],inRule:this.shortRuleNameToFullName(e[i-1])};return r}flattenFollowSet(){return this.buildFullFollowKeyStack().map(e=>this.getFollowSetFromFollowKey(e)).flat()}getFollowSetFromFollowKey(e){if(e===Xn)return[It];let t=e.ruleName+e.idxInCallingRule+se+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,It)||t.push(e),t}reSyncTo(e){let t=[],n=this.LA_FAST(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return t.slice(0,-1)}attemptInRepetitionRecovery(e,t,n,r,i,a,o){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:this.RULE_OCCURRENCE_STACK.slice(0,this.RULE_OCCURRENCE_STACK_IDX+1),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){let e=this.RULE_STACK_IDX+1,t=Array(e);for(let n=0;n<e;n++)t[n]=this.shortRuleNameToFullName(this.RULE_STACK[n]);return t}};function er(e,t,n,r,i,a,o){let s=this.getKeyForAutomaticLookahead(r,i),c=this.firstAfterRepMap[s];if(c===void 0){let e=this.getCurrRuleFullName(),t=this.getGAstProductions()[e];c=new a(t,i).startWalking(),this.firstAfterRepMap[s]=c}let l=c.token,u=c.occurrence,d=c.isEndOfRule;this.RULE_STACK_IDX===0&&d&&l===void 0&&(l=It,u=1),!(l===void 0||u===void 0)&&this.shouldInRepetitionRecoveryBeTried(l,u,o)&&this.tryInRepetitionRecovery(e,t,n,l)}var tr=1024,nr=1280,rr=1536;function ir(e,t,n){return n|t|e}var ar=class{constructor(e){this.maxLookahead=e?.maxLookahead??Br.maxLookahead}validate(e){let t=this.validateNoLeftRecursion(e.rules);if(t.length===0){let n=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...n,...r,...i]}return t}validateNoLeftRecursion(e){return e.flatMap(e=>En(e,e,Vt))}validateEmptyOrAlternatives(e){return e.flatMap(e=>kn(e,Vt))}validateAmbiguousAlternationAlternatives(e,t){return e.flatMap(e=>An(e,t,Vt))}validateSomeNonEmptyLookaheadPath(e,t){return Nn(e,t,Vt)}buildLookaheadForAlternation(e){return nn(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,an)}buildLookaheadForOptional(e){return rn(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,en(e.prodType),on)}},or=class{initLooksAhead(e){this.dynamicTokensEnabled=Object.hasOwn(e,`dynamicTokensEnabled`)?e.dynamicTokensEnabled:Br.dynamicTokensEnabled,this.maxLookahead=Object.hasOwn(e,`maxLookahead`)?e.maxLookahead:Br.maxLookahead,this.lookaheadStrategy=Object.hasOwn(e,`lookaheadStrategy`)?e.lookaheadStrategy:new ar({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){e.forEach(e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,()=>{let{alternation:t,repetition:n,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:a,repetitionWithSeparator:o}=cr(e);t.forEach(t=>{let n=t.idx===0?``:t.idx;this.TRACE_INIT(`${I(t)}${n}`,()=>{let n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),r=ir(this.fullRuleNameToShort[e.name],256,t.idx);this.setLaFuncCache(r,n)})}),n.forEach(t=>{this.computeLookaheadFunc(e,t.idx,768,`Repetition`,t.maxLookahead,I(t))}),r.forEach(t=>{this.computeLookaheadFunc(e,t.idx,512,`Option`,t.maxLookahead,I(t))}),i.forEach(t=>{this.computeLookaheadFunc(e,t.idx,tr,`RepetitionMandatory`,t.maxLookahead,I(t))}),a.forEach(t=>{this.computeLookaheadFunc(e,t.idx,rr,`RepetitionMandatoryWithSeparator`,t.maxLookahead,I(t))}),o.forEach(t=>{this.computeLookaheadFunc(e,t.idx,nr,`RepetitionWithSeparator`,t.maxLookahead,I(t))})})})}computeLookaheadFunc(e,t,n,r,i,a){this.TRACE_INIT(`${a}${t===0?``:t}`,()=>{let a=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),o=ir(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(o,a)})}getKeyForAutomaticLookahead(e,t){return ir(this.currRuleShortName,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},sr=new class extends P{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}};function cr(e){sr.reset(),e.accept(sr);let t=sr.dslMethods;return sr.reset(),t}function lr(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}function ur(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function dr(e,t,n){e.children[n]===void 0?e.children[n]=[t]:e.children[n].push(t)}function fr(e,t,n){e.children[t]===void 0?e.children[t]=[n]:e.children[t].push(n)}var pr=`name`;function mr(e,t){Object.defineProperty(e,pr,{enumerable:!1,configurable:!0,writable:!1,value:t})}function hr(e,t){let n=Object.keys(e),r=n.length;for(let i=0;i<r;i++){let r=e[n[i]],a=r.length;for(let e=0;e<a;e++){let n=r[e];n.tokenTypeIdx===void 0&&this[n.name](n.children,t)}}}function gr(e,t){let n=function(){};return mr(n,e+`BaseSemantics`),n.prototype={visit:function(e,t){if(Array.isArray(e)&&(e=e[0]),e!==void 0)return this[e.name](e.children,t)},validateVisitor:function(){let e=yr(this,t);if(e.length!==0){let t=e.map(e=>e.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${t.join(`
51
-
52
- `).replace(/\n/g,`
53
- `)}`)}}},n.prototype.constructor=n,n._RULE_NAMES=t,n}function _r(e,t,n){let r=function(){};mr(r,e+`BaseSemanticsWithDefaults`);let i=Object.create(n.prototype);return t.forEach(e=>{i[e]=hr}),r.prototype=i,r.prototype.constructor=r,r}var vr;(function(e){e[e.REDUNDANT_METHOD=0]=`REDUNDANT_METHOD`,e[e.MISSING_METHOD=1]=`MISSING_METHOD`})(vr||={});function yr(e,t){return br(e,t)}function br(e,t){return t.filter(t=>typeof e[t]!=`function`).map(t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:vr.MISSING_METHOD,methodName:t})).filter(Boolean)}var xr=class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Object.hasOwn(e,`nodeLocationTracking`)?e.nodeLocationTracking:Br.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=()=>{},this.cstFinallyStateUpdate=()=>{},this.cstPostTerminal=()=>{},this.cstPostNonTerminal=()=>{},this.cstPostRule=()=>{};else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=ur,this.setNodeLocationFromNode=ur,this.cstPostRule=()=>{},this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=lr,this.setNodeLocationFromNode=lr,this.cstPostRule=()=>{},this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=()=>{},this.setInitialNodeLocation=()=>{};else throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA_FAST(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let t=this.LA_FAST(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){let t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?n.endOffset=t.endOffset:n.startOffset=NaN}cstPostTerminal(e,t){let n=this.CST_STACK[this.CST_STACK.length-1];dr(n,t,e),this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){let n=this.CST_STACK[this.CST_STACK.length-1];fr(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(this.baseCstVisitorConstructor===void 0){let e=gr(this.className,Object.keys(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(this.baseCstVisitorWithDefaultsConstructor===void 0){let e=_r(this.className,Object.keys(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getPreviousExplicitRuleShortName(){return this.RULE_STACK[this.RULE_STACK_IDX-1]}getLastExplicitRuleOccurrenceIndex(){return this.RULE_OCCURRENCE_STACK[this.RULE_OCCURRENCE_STACK_IDX]}},Sr=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error(`Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.`);this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVectorLength-2?(this.consumeToken(),this.LA_FAST(1)):zr}LA_FAST(e){let t=this.currIdx+e;return this.tokVector[t]}LA(e){let t=this.currIdx+e;return t<0||this.tokVectorLength<=t?zr:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVectorLength-1}getLexerPosition(){return this.exportLexerState()}},Cr=class{ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=Vr){if(this.definedRulesNames.includes(e)){let t={message:Vt.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:V.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);let r=this.defineRule(e,t,n);return this[e]=r,r}OVERRIDE_RULE(e,t,n=Vr){let r=Tn(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);let i=this.defineRule(e,t,n);return this[e]=i,i}BACKTRACK(e,t){let n=e.coreRule??e;return function(){this.isBackTrackingStack.push(1);let e=this.saveRecogState();try{return n.apply(this,t),!0}catch(e){if(Wn(e))return!1;throw e}finally{this.reloadRecogState(e),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return j(Object.values(this.gastProductionsCache))}},wr=class{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=st,this.subruleIdx=0,this.currRuleShortName=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_STACK_IDX=-1,this.RULE_OCCURRENCE_STACK=[],this.RULE_OCCURRENCE_STACK_IDX=-1,this.gastProductionsCache={},Object.hasOwn(t,`serializedGrammar`))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
54
- See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
55
- For Further details.`);if(Array.isArray(e)){if(e.length===0)throw Error(`A Token Vocabulary cannot be empty.
56
- Note that the first argument for the parser constructor
57
- is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset==`number`)throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
58
- See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
59
- For Further details.`)}if(Array.isArray(e))this.tokensMap=e.reduce((e,t)=>(e[t.name]=t,e),{});else if(Object.hasOwn(e,`modes`)&&Object.values(e.modes).flat().every(bt)){let t=Object.values(e.modes).flat();this.tokensMap=[...new Set(t)].reduce((e,t)=>(e[t.name]=t,e),{})}else if(typeof e==`object`&&e)this.tokensMap=Object.assign({},e);else throw Error(`<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition`);this.tokensMap.EOF=It,this.tokenMatcher=(Object.hasOwn(e,`modes`)?Object.values(e.modes).flat():Object.values(e)).every(e=>e.categoryMatches?.length==0)?st:ot,ut(Object.values(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let r=Object.hasOwn(n,`resyncEnabled`)?n.resyncEnabled:Vr.resyncEnabled,i=Object.hasOwn(n,`recoveryValueFunc`)?n.recoveryValueFunc:Vr.recoveryValueFunc,a=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=e,this.fullRuleNameToShort[e]=a;let o;return o=this.outputCst===!0?function(...n){try{this.ruleInvocationStateUpdate(a,e,this.subruleIdx),t.apply(this,n);let r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}catch(e){return this.invokeRuleCatch(e,r,i)}finally{this.ruleFinallyStateUpdate()}}:function(...n){try{return this.ruleInvocationStateUpdate(a,e,this.subruleIdx),t.apply(this,n)}catch(e){return this.invokeRuleCatch(e,r,i)}finally{this.ruleFinallyStateUpdate()}},Object.assign(function(...t){this.onBeforeParse(e);try{return o.apply(this,t)}finally{this.onAfterParse(e)}},{ruleName:e,originalGrammarAction:t,coreRule:o})}invokeRuleCatch(e,t,n){let r=this.RULE_STACK_IDX===0,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(Wn(e)){let t=e;if(i){let r=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(r))if(t.resyncedTokens=this.reSyncTo(r),this.outputCst){let e=this.CST_STACK[this.CST_STACK.length-1];return e.recoveredNode=!0,e}else return n(e);else{if(this.outputCst){let e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=!0,t.partialCstResult=e}throw t}}else if(r)return this.moveToTerminatedState(),n(e);else throw t}else throw e}optionInternal(e,t){let n=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,n)}optionInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),i;if(typeof e!=`function`){i=e.DEF;let t=e.GATE;if(t!==void 0){let e=r;r=()=>t.call(this)&&e.call(this)}}else i=e;if(r.call(this)===!0)return i.call(this)}atLeastOneInternal(e,t){let n=this.getKeyForAutomaticLookahead(tr,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),i;if(typeof t!=`function`){i=t.DEF;let e=t.GATE;if(e!==void 0){let t=r;r=()=>e.call(this)&&t.call(this)}}else i=t;if(r.call(this)===!0){let e=this.doSingleRepetition(i);for(;r.call(this)===!0&&e===!0;)e=this.doSingleRepetition(i)}else throw this.raiseEarlyExitException(e,B.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],r,tr,e,Yt)}atLeastOneSepFirstInternal(e,t){let n=this.getKeyForAutomaticLookahead(rr,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){let r=t.DEF,i=t.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){r.call(this);let t=()=>this.tokenMatcher(this.LA_FAST(1),i);for(;this.tokenMatcher(this.LA_FAST(1),i)===!0;)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,Xt],t,rr,e,Xt)}else throw this.raiseEarlyExitException(e,B.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){let n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),i;if(typeof t!=`function`){i=t.DEF;let e=t.GATE;if(e!==void 0){let t=r;r=()=>e.call(this)&&t.call(this)}}else i=t;let a=!0;for(;r.call(this)===!0&&a===!0;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],r,768,e,qt,a)}manySepFirstInternal(e,t){let n=this.getKeyForAutomaticLookahead(nr,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){let r=t.DEF,i=t.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){r.call(this);let t=()=>this.tokenMatcher(this.LA_FAST(1),i);for(;this.tokenMatcher(this.LA_FAST(1),i)===!0;)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,Jt],t,nr,e,Jt)}}repetitionSepSecondInternal(e,t,n,r,i){for(;n();)this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,rr,e,i)}doSingleRepetition(e){let t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){let n=this.getKeyForAutomaticLookahead(256,t),r=Array.isArray(e)?e:e.DEF,i=this.getLaFuncFromCache(n).call(this,r);if(i!==void 0)return r[i].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){this.RULE_STACK_IDX--,this.RULE_OCCURRENCE_STACK_IDX--,this.RULE_STACK_IDX>=0&&(this.currRuleShortName=this.RULE_STACK[this.RULE_STACK_IDX]),this.cstFinallyStateUpdate()}subruleInternal(e,t,n){let r;try{let i=n===void 0?void 0:n.ARGS;return this.subruleIdx=t,r=e.coreRule.apply(this,i),this.cstPostNonTerminal(r,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),r}catch(t){throw this.subruleInternalError(t,n,e.ruleName)}}subruleInternalError(e,t,n){throw Wn(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,t,n){let r;try{let t=this.LA_FAST(1);this.tokenMatcher(t,e)===!0?(this.consumeToken(),r=t):this.consumeInternalError(e,t,n)}catch(n){r=this.consumeInternalRecovery(e,t,n)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,r),r}consumeInternalError(e,t,n){let r,i=this.LA(0);throw r=n!==void 0&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Kn(r,t,i))}consumeInternalRecovery(e,t,n){if(this.recoveryEnabled&&n.name===`MismatchedTokenException`&&!this.isBackTracking()){let r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(e){throw e.name===`InRuleRecoveryException`?n:e}}else throw n}saveRecogState(){let e=this.errors,t=this.RULE_STACK.slice(0,this.RULE_STACK_IDX+1);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState);let t=e.RULE_STACK;for(let e=0;e<t.length;e++)this.RULE_STACK[e]=t[e];this.RULE_STACK_IDX=t.length-1,this.RULE_STACK_IDX>=0&&(this.currRuleShortName=this.RULE_STACK[this.RULE_STACK_IDX])}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK[++this.RULE_OCCURRENCE_STACK_IDX]=n,this.RULE_STACK[++this.RULE_STACK_IDX]=e,this.currRuleShortName=e,this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.currRuleShortName;return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),It)}reset(){this.resetLexerState(),this.subruleIdx=0,this.currRuleShortName=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK_IDX=-1,this.RULE_OCCURRENCE_STACK_IDX=-1,this.CST_STACK=[]}onBeforeParse(e){for(let e=0;e<this.maxLookahead+1;e++)this.tokVector.push(zr)}onAfterParse(e){if(this.isAtEndOfInput()===!1){let e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Jn(t,e))}for(;this.tokVector.at(-1)===zr;)this.tokVector.pop()}},Tr=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=Object.hasOwn(e,`errorMessageProvider`)?e.errorMessageProvider:Br.errorMessageProvider}SAVE_ERROR(e){if(Wn(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:this.RULE_OCCURRENCE_STACK.slice(0,this.RULE_OCCURRENCE_STACK_IDX+1)},this._errors.push(e),e;throw Error(`Trying to save an Error which is not a RecognitionException`)}get errors(){return[...this._errors]}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){let r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],a=mn(e,i,t,this.maxLookahead)[0],o=[];for(let e=1;e<=this.maxLookahead;e++)o.push(this.LA(e));let s=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:o,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new Yn(s,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){let n=this.getCurrRuleFullName(),r=this.getGAstProductions()[n],i=pn(e,r,this.maxLookahead),a=[];for(let e=1;e<=this.maxLookahead;e++)a.push(this.LA(e));let o=this.LA(0),s=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:a,previous:o,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new qn(s,this.LA(1),o))}},Er={description:`This Object indicates the Parser is during Recording Phase`};Object.freeze(Er);var Dr=!0,Or=2**8-1,kr=Pt({name:`RECORDING_PHASE_TOKEN`,pattern:z.NA});ut([kr]);var Ar=Lt(kr,`This IToken indicates the Parser is in Recording Phase
60
- See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(Ar);var jr={name:`This CSTNode indicates the Parser is in Recording Phase
61
- See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Mr=class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT(`Enable Recording`,()=>{for(let e=0;e<10;e++){let t=e>0?e:``;this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)},this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},this.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT(`Deleting Recording methods`,()=>{let e=this;for(let t=0;t<10;t++){let n=t>0?t:``;delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return zr}topLevelRuleRecord(e,t){try{let n=new S({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(e){if(e.KNOWN_RECORDER_ERROR!==!0)try{e.message+=`
62
- This error was thrown during the "grammar recording phase" For more info see:
63
- https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw e}throw e}}optionInternalRecord(e,t){return Nr.call(this,w,e,t)}atLeastOneInternalRecord(e,t){Nr.call(this,T,t,e)}atLeastOneSepFirstInternalRecord(e,t){Nr.call(this,E,t,e,Dr)}manyInternalRecord(e,t){Nr.call(this,D,t,e)}manySepFirstInternalRecord(e,t){Nr.call(this,O,t,e,Dr)}orInternalRecord(e,t){return Pr.call(this,e,t)}subruleInternalRecord(e,t,n){if(Ir(t),!e||!Object.hasOwn(e,`ruleName`)){let n=Error(`<SUBRULE${Fr(t)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}let r=this.recordingProdStack.at(-1),i=e.ruleName,a=new x({idx:t,nonTerminalName:i,label:n?.LABEL,referencedRule:void 0});return r.definition.push(a),this.outputCst?jr:Er}consumeInternalRecord(e,t,n){if(Ir(t),!gt(e)){let n=Error(`<CONSUME${Fr(t)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}let r=this.recordingProdStack.at(-1),i=new A({idx:t,terminalType:e,label:n?.LABEL});return r.definition.push(i),Ar}};function Nr(e,t,n,r=!1){Ir(n);let i=this.recordingProdStack.at(-1),a=typeof t==`function`?t:t.DEF,o=new e({definition:[],idx:n});return r&&(o.separator=t.SEP),Object.hasOwn(t,`MAX_LOOKAHEAD`)&&(o.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(o),a.call(this),i.definition.push(o),this.recordingProdStack.pop(),Er}function Pr(e,t){Ir(t);let n=this.recordingProdStack.at(-1),r=Array.isArray(e)===!1,i=r===!1?e:e.DEF,a=new k({definition:[],idx:t,ignoreAmbiguities:r&&e.IGNORE_AMBIGUITIES===!0});return Object.hasOwn(e,`MAX_LOOKAHEAD`)&&(a.maxLookahead=e.MAX_LOOKAHEAD),a.hasPredicates=i.some(e=>typeof e.GATE==`function`),n.definition.push(a),i.forEach(e=>{let t=new C({definition:[]});a.definition.push(t),Object.hasOwn(e,`IGNORE_AMBIGUITIES`)?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:Object.hasOwn(e,`GATE`)&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),Er}function Fr(e){return e===0?``:`${e}`}function Ir(e){if(e<0||e>Or){let t=Error(`Invalid DSL Method idx value: <${e}>\n\tIdx value must be a none negative value smaller than ${Or+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}var Lr=class{initPerformanceTracer(e){if(Object.hasOwn(e,`traceInitPerf`)){let t=e.traceInitPerf,n=typeof t==`number`;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Br.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);let{time:r,value:i}=g(t),a=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${n}<-- <${e}> time: ${r}ms`),this.traceInitIndent--,i}else return t()}};function Rr(e,t){t.forEach(t=>{let n=t.prototype;Object.getOwnPropertyNames(n).forEach(r=>{if(r===`constructor`)return;let i=Object.getOwnPropertyDescriptor(n,r);i&&(i.get||i.set)?Object.defineProperty(e.prototype,r,i):e.prototype[r]=t.prototype[r]})})}var zr=Lt(It,``,NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(zr);var Br=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:zt,nodeLocationTracking:`none`,traceInitPerf:!1,skipValidations:!1}),Vr=Object.freeze({recoveryValueFunc:()=>void 0,resyncEnabled:!0}),V;(function(e){e[e.INVALID_RULE_NAME=0]=`INVALID_RULE_NAME`,e[e.DUPLICATE_RULE_NAME=1]=`DUPLICATE_RULE_NAME`,e[e.INVALID_RULE_OVERRIDE=2]=`INVALID_RULE_OVERRIDE`,e[e.DUPLICATE_PRODUCTIONS=3]=`DUPLICATE_PRODUCTIONS`,e[e.UNRESOLVED_SUBRULE_REF=4]=`UNRESOLVED_SUBRULE_REF`,e[e.LEFT_RECURSION=5]=`LEFT_RECURSION`,e[e.NONE_LAST_EMPTY_ALT=6]=`NONE_LAST_EMPTY_ALT`,e[e.AMBIGUOUS_ALTS=7]=`AMBIGUOUS_ALTS`,e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]=`CONFLICT_TOKENS_RULES_NAMESPACE`,e[e.INVALID_TOKEN_NAME=9]=`INVALID_TOKEN_NAME`,e[e.NO_NON_EMPTY_LOOKAHEAD=10]=`NO_NON_EMPTY_LOOKAHEAD`,e[e.AMBIGUOUS_PREFIX_ALTS=11]=`AMBIGUOUS_PREFIX_ALTS`,e[e.TOO_MANY_ALTS=12]=`TOO_MANY_ALTS`,e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]=`CUSTOM_LOOKAHEAD_VALIDATION`})(V||={});function Hr(e=void 0){return function(){return e}}var Ur=class e{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT(`performSelfAnalysis`,()=>{let t;this.selfAnalysisDone=!0;let n=this.className;this.TRACE_INIT(`toFastProps`,()=>{_(this)}),this.TRACE_INIT(`Grammar Recording`,()=>{try{this.enableRecording(),this.definedRulesNames.forEach(e=>{let t=this[e].originalGrammarAction,n;this.TRACE_INIT(`${e} Rule`,()=>{n=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=n})}finally{this.disableRecording()}});let r=[];if(this.TRACE_INIT(`Grammar Resolving`,()=>{r=Ln({rules:Object.values(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT(`Grammar Validations`,()=>{if(r.length===0&&this.skipValidations===!1){let e=Rn({rules:Object.values(this.gastProductionsCache),tokenTypes:Object.values(this.tokensMap),errMsgProvider:Vt,grammarName:n}),t=vn({lookaheadStrategy:this.lookaheadStrategy,rules:Object.values(this.gastProductionsCache),tokenTypes:Object.values(this.tokensMap),grammarName:n});this.definitionErrors=this.definitionErrors.concat(e,t)}}),this.definitionErrors.length===0&&(this.recoveryEnabled&&this.TRACE_INIT(`computeAllProdsFollows`,()=>{this.resyncFollows=le(Object.values(this.gastProductionsCache))}),this.TRACE_INIT(`ComputeLookaheadFunctions`,()=>{var e,t;(t=(e=this.lookaheadStrategy).initialize)==null||t.call(e,{rules:Object.values(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Object.values(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&this.definitionErrors.length!==0)throw t=this.definitionErrors.map(e=>e.message),Error(`Parser Definition Errors detected:\n ${t.join(`
64
- -------------------------------
65
- `)}`)})}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(t),n.initLexerAdapter(),n.initLooksAhead(t),n.initRecognizerEngine(e,t),n.initRecoverable(t),n.initTreeBuilder(t),n.initGastRecorder(t),n.initPerformanceTracer(t),Object.hasOwn(t,`ignoredIssues`))throw Error(`The <ignoredIssues> IParserConfig property has been deprecated.
66
- Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
67
- See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
68
- For further details.`);this.skipValidations=Object.hasOwn(t,`skipValidations`)?t.skipValidations:Br.skipValidations}};Ur.DEFER_DEFINITION_ERRORS_HANDLING=!1,Rr(Ur,[$n,or,xr,Sr,wr,Cr,Tr,Mr,Lr]);var Wr=class extends Ur{constructor(e,t=Br){let n=Object.assign({},t);n.outputCst=!1,super(e,n)}};function Gr(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Kr(){this.__data__=[],this.size=0}function qr(e,t){return e===t||e!==e&&t!==t}function Jr(e,t){for(var n=e.length;n--;)if(qr(e[n][0],t))return n;return-1}var Yr=Array.prototype.splice;function Xr(e){var t=this.__data__,n=Jr(t,e);return n<0?!1:(n==t.length-1?t.pop():Yr.call(t,n,1),--this.size,!0)}function Zr(e){var t=this.__data__,n=Jr(t,e);return n<0?void 0:t[n][1]}function Qr(e){return Jr(this.__data__,e)>-1}function $r(e,t){var n=this.__data__,r=Jr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ei(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ei.prototype.clear=Kr,ei.prototype.delete=Xr,ei.prototype.get=Zr,ei.prototype.has=Qr,ei.prototype.set=$r;function ti(){this.__data__=new ei,this.size=0}function ni(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ri(e){return this.__data__.get(e)}function ii(e){return this.__data__.has(e)}var ai=typeof global==`object`&&global&&global.Object===Object&&global,oi=typeof self==`object`&&self&&self.Object===Object&&self,si=ai||oi||Function(`return this`)(),ci=si.Symbol,li=Object.prototype,ui=li.hasOwnProperty,di=li.toString,fi=ci?ci.toStringTag:void 0;function pi(e){var t=ui.call(e,fi),n=e[fi];try{e[fi]=void 0;var r=!0}catch{}var i=di.call(e);return r&&(t?e[fi]=n:delete e[fi]),i}var mi=Object.prototype.toString;function hi(e){return mi.call(e)}var gi=`[object Null]`,_i=`[object Undefined]`,vi=ci?ci.toStringTag:void 0;function yi(e){return e==null?e===void 0?_i:gi:vi&&vi in Object(e)?pi(e):hi(e)}function H(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var bi=`[object AsyncFunction]`,xi=`[object Function]`,Si=`[object GeneratorFunction]`,Ci=`[object Proxy]`;function wi(e){if(!H(e))return!1;var t=yi(e);return t==xi||t==Si||t==bi||t==Ci}var Ti=si[`__core-js_shared__`],Ei=function(){var e=/[^.]+$/.exec(Ti&&Ti.keys&&Ti.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function Di(e){return!!Ei&&Ei in e}var Oi=Function.prototype.toString;function ki(e){if(e!=null){try{return Oi.call(e)}catch{}try{return e+``}catch{}}return``}var Ai=/[\\^$.*+?()[\]{}|]/g,ji=/^\[object .+?Constructor\]$/,Mi=Function.prototype,Ni=Object.prototype,Pi=Mi.toString,Fi=Ni.hasOwnProperty,Ii=RegExp(`^`+Pi.call(Fi).replace(Ai,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function Li(e){return!H(e)||Di(e)?!1:(wi(e)?Ii:ji).test(ki(e))}function Ri(e,t){return e?.[t]}function zi(e,t){var n=Ri(e,t);return Li(n)?n:void 0}var Bi=zi(si,`Map`),Vi=zi(Object,`create`);function Hi(){this.__data__=Vi?Vi(null):{},this.size=0}function Ui(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var Wi=`__lodash_hash_undefined__`,Gi=Object.prototype.hasOwnProperty;function Ki(e){var t=this.__data__;if(Vi){var n=t[e];return n===Wi?void 0:n}return Gi.call(t,e)?t[e]:void 0}var qi=Object.prototype.hasOwnProperty;function Ji(e){var t=this.__data__;return Vi?t[e]!==void 0:qi.call(t,e)}var Yi=`__lodash_hash_undefined__`;function Xi(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=Vi&&t===void 0?Yi:t,this}function Zi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Zi.prototype.clear=Hi,Zi.prototype.delete=Ui,Zi.prototype.get=Ki,Zi.prototype.has=Ji,Zi.prototype.set=Xi;function Qi(){this.size=0,this.__data__={hash:new Zi,map:new(Bi||ei),string:new Zi}}function $i(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function ea(e,t){var n=e.__data__;return $i(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function ta(e){var t=ea(this,e).delete(e);return this.size-=+!!t,t}function na(e){return ea(this,e).get(e)}function ra(e){return ea(this,e).has(e)}function ia(e,t){var n=ea(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function aa(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}aa.prototype.clear=Qi,aa.prototype.delete=ta,aa.prototype.get=na,aa.prototype.has=ra,aa.prototype.set=ia;var oa=200;function sa(e,t){var n=this.__data__;if(n instanceof ei){var r=n.__data__;if(!Bi||r.length<oa-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new aa(r)}return n.set(e,t),this.size=n.size,this}function ca(e){this.size=(this.__data__=new ei(e)).size}ca.prototype.clear=ti,ca.prototype.delete=ni,ca.prototype.get=ri,ca.prototype.has=ii,ca.prototype.set=sa;var la=`__lodash_hash_undefined__`;function ua(e){return this.__data__.set(e,la),this}function da(e){return this.__data__.has(e)}function fa(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new aa;++t<n;)this.add(e[t])}fa.prototype.add=fa.prototype.push=ua,fa.prototype.has=da;function pa(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function ma(e,t){return e.has(t)}var ha=1,ga=2;function _a(e,t,n,r,i,a){var o=n&ha,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&ga?new fa:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!pa(t,function(e,t){if(!ma(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var va=si.Uint8Array;function ya(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function ba(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var xa=1,Sa=2,Ca=`[object Boolean]`,wa=`[object Date]`,Ta=`[object Error]`,Ea=`[object Map]`,Da=`[object Number]`,Oa=`[object RegExp]`,ka=`[object Set]`,Aa=`[object String]`,ja=`[object Symbol]`,Ma=`[object ArrayBuffer]`,Na=`[object DataView]`,Pa=ci?ci.prototype:void 0,Fa=Pa?Pa.valueOf:void 0;function Ia(e,t,n,r,i,a,o){switch(n){case Na:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ma:return!(e.byteLength!=t.byteLength||!a(new va(e),new va(t)));case Ca:case wa:case Da:return qr(+e,+t);case Ta:return e.name==t.name&&e.message==t.message;case Oa:case Aa:return e==t+``;case Ea:var s=ya;case ka:var c=r&xa;if(s||=ba,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=Sa,o.set(e,t);var u=_a(s(e),s(t),r,i,a,o);return o.delete(e),u;case ja:if(Fa)return Fa.call(e)==Fa.call(t)}return!1}function La(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var U=Array.isArray;function Ra(e,t,n){var r=t(e);return U(e)?r:La(r,n(e))}function za(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function Ba(){return[]}var Va=Object.prototype.propertyIsEnumerable,Ha=Object.getOwnPropertySymbols,Ua=Ha?function(e){return e==null?[]:(e=Object(e),za(Ha(e),function(t){return Va.call(e,t)}))}:Ba;function Wa(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ga(e){return typeof e==`object`&&!!e}var Ka=`[object Arguments]`;function qa(e){return Ga(e)&&yi(e)==Ka}var Ja=Object.prototype,Ya=Ja.hasOwnProperty,Xa=Ja.propertyIsEnumerable,Za=qa(function(){return arguments}())?qa:function(e){return Ga(e)&&Ya.call(e,`callee`)&&!Xa.call(e,`callee`)};function Qa(){return!1}var $a=typeof exports==`object`&&exports&&!exports.nodeType&&exports,eo=$a&&typeof module==`object`&&module&&!module.nodeType&&module,to=eo&&eo.exports===$a?si.Buffer:void 0,no=(to?to.isBuffer:void 0)||Qa,ro=9007199254740991,io=/^(?:0|[1-9]\d*)$/;function ao(e,t){var n=typeof e;return t??=ro,!!t&&(n==`number`||n!=`symbol`&&io.test(e))&&e>-1&&e%1==0&&e<t}var oo=9007199254740991;function so(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=oo}var co=`[object Arguments]`,lo=`[object Array]`,uo=`[object Boolean]`,fo=`[object Date]`,po=`[object Error]`,mo=`[object Function]`,ho=`[object Map]`,go=`[object Number]`,_o=`[object Object]`,vo=`[object RegExp]`,yo=`[object Set]`,bo=`[object String]`,xo=`[object WeakMap]`,So=`[object ArrayBuffer]`,Co=`[object DataView]`,wo=`[object Float32Array]`,To=`[object Float64Array]`,Eo=`[object Int8Array]`,Do=`[object Int16Array]`,Oo=`[object Int32Array]`,ko=`[object Uint8Array]`,Ao=`[object Uint8ClampedArray]`,jo=`[object Uint16Array]`,Mo=`[object Uint32Array]`,W={};W[wo]=W[To]=W[Eo]=W[Do]=W[Oo]=W[ko]=W[Ao]=W[jo]=W[Mo]=!0,W[co]=W[lo]=W[So]=W[uo]=W[Co]=W[fo]=W[po]=W[mo]=W[ho]=W[go]=W[_o]=W[vo]=W[yo]=W[bo]=W[xo]=!1;function No(e){return Ga(e)&&so(e.length)&&!!W[yi(e)]}function Po(e){return function(t){return e(t)}}var Fo=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Io=Fo&&typeof module==`object`&&module&&!module.nodeType&&module,Lo=Io&&Io.exports===Fo&&ai.process,Ro=function(){try{return Io&&Io.require&&Io.require(`util`).types||Lo&&Lo.binding&&Lo.binding(`util`)}catch{}}(),zo=Ro&&Ro.isTypedArray,Bo=zo?Po(zo):No,Vo=Object.prototype.hasOwnProperty;function Ho(e,t){var n=U(e),r=!n&&Za(e),i=!n&&!r&&no(e),a=!n&&!r&&!i&&Bo(e),o=n||r||i||a,s=o?Wa(e.length,String):[],c=s.length;for(var l in e)(t||Vo.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||ao(l,c)))&&s.push(l);return s}var Uo=Object.prototype;function Wo(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||Uo)}function Go(e,t){return function(n){return e(t(n))}}var Ko=Go(Object.keys,Object),qo=Object.prototype.hasOwnProperty;function Jo(e){if(!Wo(e))return Ko(e);var t=[];for(var n in Object(e))qo.call(e,n)&&n!=`constructor`&&t.push(n);return t}function Yo(e){return e!=null&&so(e.length)&&!wi(e)}function Xo(e){return Yo(e)?Ho(e):Jo(e)}function Zo(e){return Ra(e,Xo,Ua)}var Qo=1,$o=Object.prototype.hasOwnProperty;function es(e,t,n,r,i,a){var o=n&Qo,s=Zo(e),c=s.length;if(c!=Zo(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:$o.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var ts=zi(si,`DataView`),ns=zi(si,`Promise`),rs=zi(si,`Set`),is=zi(si,`WeakMap`),as=`[object Map]`,os=`[object Object]`,ss=`[object Promise]`,cs=`[object Set]`,ls=`[object WeakMap]`,us=`[object DataView]`,ds=ki(ts),fs=ki(Bi),ps=ki(ns),ms=ki(rs),hs=ki(is),gs=yi;(ts&&gs(new ts(new ArrayBuffer(1)))!=us||Bi&&gs(new Bi)!=as||ns&&gs(ns.resolve())!=ss||rs&&gs(new rs)!=cs||is&&gs(new is)!=ls)&&(gs=function(e){var t=yi(e),n=t==os?e.constructor:void 0,r=n?ki(n):``;if(r)switch(r){case ds:return us;case fs:return as;case ps:return ss;case ms:return cs;case hs:return ls}return t});var _s=gs,vs=1,ys=`[object Arguments]`,bs=`[object Array]`,xs=`[object Object]`,Ss=Object.prototype.hasOwnProperty;function Cs(e,t,n,r,i,a){var o=U(e),s=U(t),c=o?bs:_s(e),l=s?bs:_s(t);c=c==ys?xs:c,l=l==ys?xs:l;var u=c==xs,d=l==xs,f=c==l;if(f&&no(e)){if(!no(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new ca,o||Bo(e)?_a(e,t,n,r,i,a):Ia(e,t,c,n,r,i,a);if(!(n&vs)){var p=u&&Ss.call(e,`__wrapped__`),m=d&&Ss.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new ca,i(h,g,n,r,a)}}return f?(a||=new ca,es(e,t,n,r,i,a)):!1}function ws(e,t,n,r,i){return e===t?!0:e==null||t==null||!Ga(e)&&!Ga(t)?e!==e&&t!==t:Cs(e,t,n,r,ws,i)}var Ts=1,Es=2;function Ds(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new ca;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?ws(u,l,Ts|Es,r,d):f))return!1}}return!0}function Os(e){return e===e&&!H(e)}function ks(e){for(var t=Xo(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Os(i)]}return t}function As(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function js(e){var t=ks(e);return t.length==1&&t[0][2]?As(t[0][0],t[0][1]):function(n){return n===e||Ds(n,e,t)}}var Ms=`[object Symbol]`;function Ns(e){return typeof e==`symbol`||Ga(e)&&yi(e)==Ms}var Ps=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fs=/^\w*$/;function Is(e,t){if(U(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||Ns(e)?!0:Fs.test(e)||!Ps.test(e)||t!=null&&e in Object(t)}var Ls=`Expected a function`;function Rs(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(Ls);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Rs.Cache||aa),n}Rs.Cache=aa;var zs=500;function Bs(e){var t=Rs(e,function(e){return n.size===zs&&n.clear(),e}),n=t.cache;return t}var Vs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hs=/\\(\\)?/g,Us=Bs(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Vs,function(e,n,r,i){t.push(r?i.replace(Hs,`$1`):n||e)}),t}),Ws=1/0,Gs=ci?ci.prototype:void 0,Ks=Gs?Gs.toString:void 0;function qs(e){if(typeof e==`string`)return e;if(U(e))return Gr(e,qs)+``;if(Ns(e))return Ks?Ks.call(e):``;var t=e+``;return t==`0`&&1/e==-Ws?`-0`:t}function Js(e){return e==null?``:qs(e)}function Ys(e,t){return U(e)?e:Is(e,t)?[e]:Us(Js(e))}var Xs=1/0;function Zs(e){if(typeof e==`string`||Ns(e))return e;var t=e+``;return t==`0`&&1/e==-Xs?`-0`:t}function Qs(e,t){t=Ys(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Zs(t[n++])];return n&&n==r?e:void 0}function $s(e,t,n){var r=e==null?void 0:Qs(e,t);return r===void 0?n:r}function ec(e,t){return e!=null&&t in Object(e)}function tc(e,t,n){t=Ys(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=Zs(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&so(i)&&ao(o,i)&&(U(e)||Za(e)))}function nc(e,t){return e!=null&&tc(e,t,ec)}var rc=1,ic=2;function ac(e,t){return Is(e)&&Os(t)?As(Zs(e),t):function(n){var r=$s(n,e);return r===void 0&&r===t?nc(n,e):ws(t,r,rc|ic)}}function oc(e){return e}function sc(e){return function(t){return t?.[e]}}function cc(e){return function(t){return Qs(t,e)}}function lc(e){return Is(e)?sc(Zs(e)):cc(e)}function uc(e){return typeof e==`function`?e:e==null?oc:typeof e==`object`?U(e)?ac(e[0],e[1]):js(e):lc(e)}function dc(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var fc=dc();function pc(e,t){return e&&fc(e,t,Xo)}function mc(e,t){return function(n,r){if(n==null)return n;if(!Yo(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var hc=mc(pc);function gc(e,t){var n=-1,r=Yo(e)?Array(e.length):[];return hc(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function _c(e,t){return(U(e)?Gr:gc)(e,uc(t,3))}function vc(e,t){var n=[];return hc(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function yc(e,t){return(U(e)?za:vc)(e,uc(t,3))}function bc(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(o!=null&&(s===void 0?o===o&&!Ns(o):n(o,s)))var s=o,c=a}return c}function xc(e,t){return e<t}function Sc(e){return e&&e.length?bc(e,oc,xc):void 0}var Cc=ci?ci.isConcatSpreadable:void 0;function wc(e){return U(e)||Za(e)||!!(Cc&&e&&e[Cc])}function Tc(e,t,n,r,i){var a=-1,o=e.length;for(n||=wc,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?Tc(s,t-1,n,r,i):La(i,s):r||(i[i.length]=s)}return i}function Ec(e,t){return Tc(_c(e,t),1)}function Dc(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function Oc(e){return e!==e}function kc(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function Ac(e,t,n){return t===t?kc(e,t,n):Dc(e,Oc,n)}function jc(e,t){return!!(e!=null&&e.length)&&Ac(e,t,0)>-1}function Mc(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Nc(){}var Pc=rs&&1/ba(new rs([,-0]))[1]==1/0?function(e){return new rs(e)}:Nc,Fc=200;function Ic(e,t,n){var r=-1,i=jc,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=Mc;else if(a>=Fc){var l=t?null:Pc(e);if(l)return ba(l);o=!1,i=ma,c=new fa}else c=t?[]:s;outer:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue outer;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}function Lc(e,t){return e&&e.length?Ic(e,uc(t,2)):[]}function Rc(e){return e!=null&&e.length?Tc(e,1):[]}function zc(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function Bc(e){return typeof e==`function`?e:oc}function Vc(e,t){return(U(e)?zc:hc)(e,Bc(t))}var Hc=`[object Map]`,Uc=`[object Set]`,Wc=Object.prototype.hasOwnProperty;function Gc(e){if(e==null)return!0;if(Yo(e)&&(U(e)||typeof e==`string`||typeof e.splice==`function`||no(e)||Bo(e)||Za(e)))return!e.length;var t=_s(e);if(t==Hc||t==Uc)return!e.size;if(Wo(e))return!Jo(e).length;for(var n in e)if(Wc.call(e,n))return!1;return!0}function Kc(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function qc(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function Jc(e,t,n){var r=U(e)?Kc:qc,i=arguments.length<3;return r(e,uc(t,4),n,i,hc)}function Yc(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Xc(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Zc(e){let t,n,r;e.length===2?(t=e===Yc||e===Xc?e:Qc,n=e,r=e):(t=Yc,n=(t,n)=>Yc(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function Qc(){return 0}function $c(e){return e===null?NaN:+e}var el=Zc(Yc),tl=el.right;el.left,Zc($c).center;var nl=class extends Map{constructor(e,t=ol){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(rl(this,e))}has(e){return super.has(rl(this,e))}set(e,t){return super.set(il(this,e),t)}delete(e){return super.delete(al(this,e))}};function rl({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function il({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function al({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function ol(e){return typeof e==`object`&&e?e.valueOf():e}var sl=Math.sqrt(50),cl=Math.sqrt(10),ll=Math.sqrt(2);function ul(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=sl?10:a>=cl?5:a>=ll?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?ul(e,t,n*2):[s,c,l]}function dl(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?ul(t,e,n):ul(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function fl(e,t,n){return t=+t,e=+e,n=+n,ul(e,t,n)[2]}function pl(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?fl(t,e,n):fl(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function ml(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function hl(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function gl(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function _l(e){return e}var vl=1,yl=2,bl=3,xl=4,Sl=1e-6;function Cl(e){return`translate(`+e+`,0)`}function wl(e){return`translate(0,`+e+`)`}function Tl(e){return t=>+e(t)}function El(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function Dl(){return!this.__axis}function Ol(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,c=typeof window<`u`&&window.devicePixelRatio>1?0:.5,l=e===vl||e===xl?-1:1,u=e===xl||e===yl?`x`:`y`,d=e===vl||e===bl?Cl:wl;function f(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):_l),h=Math.max(a,0)+s,g=t.range(),_=+g[0]+c,v=+g[g.length-1]+c,y=(t.bandwidth?El:Tl)(t.copy(),c),b=f.selection?f.selection():f,x=b.selectAll(`.domain`).data([null]),S=b.selectAll(`.tick`).data(p,t).order(),C=S.exit(),w=S.enter().append(`g`).attr(`class`,`tick`),T=S.select(`line`),E=S.select(`text`);x=x.merge(x.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),S=S.merge(w),T=T.merge(w.append(`line`).attr(`stroke`,`currentColor`).attr(u+`2`,l*a)),E=E.merge(w.append(`text`).attr(`fill`,`currentColor`).attr(u,l*h).attr(`dy`,e===vl?`0em`:e===bl?`0.71em`:`0.32em`)),f!==b&&(x=x.transition(f),S=S.transition(f),T=T.transition(f),E=E.transition(f),C=C.transition(f).attr(`opacity`,Sl).attr(`transform`,function(e){return isFinite(e=y(e))?d(e+c):this.getAttribute(`transform`)}),w.attr(`opacity`,Sl).attr(`transform`,function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:y(e))+c)})),C.remove(),x.attr(`d`,e===xl||e===yl?o?`M`+l*o+`,`+_+`H`+c+`V`+v+`H`+l*o:`M`+c+`,`+_+`V`+v:o?`M`+_+`,`+l*o+`V`+c+`H`+v+`V`+l*o:`M`+_+`,`+c+`H`+v),S.attr(`opacity`,1).attr(`transform`,function(e){return d(y(e)+c)}),T.attr(u+`2`,l*a),E.attr(u,l*h).text(m),b.filter(Dl).attr(`fill`,`none`).attr(`font-size`,10).attr(`font-family`,`sans-serif`).attr(`text-anchor`,e===yl?`start`:e===xl?`end`:`middle`),b.each(function(){this.__axis=y})}return f.scale=function(e){return arguments.length?(t=e,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(e){return arguments.length?(n=e==null?[]:Array.from(e),f):n.slice()},f.tickValues=function(e){return arguments.length?(r=e==null?null:Array.from(e),f):r&&r.slice()},f.tickFormat=function(e){return arguments.length?(i=e,f):i},f.tickSize=function(e){return arguments.length?(a=o=+e,f):a},f.tickSizeInner=function(e){return arguments.length?(a=+e,f):a},f.tickSizeOuter=function(e){return arguments.length?(o=+e,f):o},f.tickPadding=function(e){return arguments.length?(s=+e,f):s},f.offset=function(e){return arguments.length?(c=+e,f):c},f}function kl(e){return Ol(vl,e)}function Al(e){return Ol(bl,e)}var jl={value:()=>{}};function Ml(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new Nl(n)}function Nl(e){this._=e}function Pl(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}Nl.prototype=Ml.prototype={constructor:Nl,on:function(e,t){var n=this._,r=Pl(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=Fl(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=Il(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Il(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Nl(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function Fl(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Il(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=jl,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Ll={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function Rl(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),Ll.hasOwnProperty(t)?{space:Ll[t],local:e}:e}function zl(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function Bl(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Vl(e){var t=Rl(e);return(t.local?Bl:zl)(t)}function Hl(){}function Ul(e){return e==null?Hl:function(){return this.querySelector(e)}}function Wl(e){typeof e!=`function`&&(e=Ul(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new G(r,this._parents)}function Gl(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Kl(){return[]}function ql(e){return e==null?Kl:function(){return this.querySelectorAll(e)}}function Jl(e){return function(){return Gl(e.apply(this,arguments))}}function Yl(e){e=typeof e==`function`?Jl(e):ql(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new G(r,i)}function Xl(e){return function(){return this.matches(e)}}function Zl(e){return function(t){return t.matches(e)}}var Ql=Array.prototype.find;function $l(e){return function(){return Ql.call(this.children,e)}}function eu(){return this.firstElementChild}function tu(e){return this.select(e==null?eu:$l(typeof e==`function`?e:Zl(e)))}var nu=Array.prototype.filter;function ru(){return Array.from(this.children)}function iu(e){return function(){return nu.call(this.children,e)}}function au(e){return this.selectAll(e==null?ru:iu(typeof e==`function`?e:Zl(e)))}function ou(e){typeof e!=`function`&&(e=Xl(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new G(r,this._parents)}function su(e){return Array(e.length)}function cu(){return new G(this._enter||this._groups.map(su),this._parents)}function lu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}lu.prototype={constructor:lu,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function uu(e){return function(){return e}}function du(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new lu(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function fu(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new lu(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function pu(e){return e.__data__}function mu(e,t){if(!arguments.length)return Array.from(this,pu);var n=t?fu:du,r=this._parents,i=this._groups;typeof e!=`function`&&(e=uu(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=hu(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new G(o,r),o._enter=s,o._exit=c,o}function hu(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function gu(){return new G(this._exit||this._groups.map(su),this._parents)}function _u(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function vu(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new G(s,this._parents)}function yu(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function bu(e){e||=xu;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new G(i,this._parents).order()}function xu(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Su(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Cu(){return Array.from(this)}function wu(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function Tu(){let e=0;for(let t of this)++e;return e}function Eu(){return!this.node()}function Du(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function Ou(e){return function(){this.removeAttribute(e)}}function ku(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Au(e,t){return function(){this.setAttribute(e,t)}}function ju(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Mu(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Nu(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Pu(e,t){var n=Rl(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?ku:Ou:typeof t==`function`?n.local?Nu:Mu:n.local?ju:Au)(n,t))}function Fu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Iu(e){return function(){this.style.removeProperty(e)}}function Lu(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Ru(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function zu(e,t,n){return arguments.length>1?this.each((t==null?Iu:typeof t==`function`?Ru:Lu)(e,t,n??``)):Bu(this.node(),e)}function Bu(e,t){return e.style.getPropertyValue(t)||Fu(e).getComputedStyle(e,null).getPropertyValue(t)}function Vu(e){return function(){delete this[e]}}function Hu(e,t){return function(){this[e]=t}}function Uu(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Wu(e,t){return arguments.length>1?this.each((t==null?Vu:typeof t==`function`?Uu:Hu)(e,t)):this.node()[e]}function Gu(e){return e.trim().split(/^|\s+/)}function Ku(e){return e.classList||new qu(e)}function qu(e){this._node=e,this._names=Gu(e.getAttribute(`class`)||``)}qu.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function Ju(e,t){for(var n=Ku(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Yu(e,t){for(var n=Ku(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Xu(e){return function(){Ju(this,e)}}function Zu(e){return function(){Yu(this,e)}}function Qu(e,t){return function(){(t.apply(this,arguments)?Ju:Yu)(this,e)}}function $u(e,t){var n=Gu(e+``);if(arguments.length<2){for(var r=Ku(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?Qu:t?Xu:Zu)(n,t))}function ed(){this.textContent=``}function td(e){return function(){this.textContent=e}}function nd(e){return function(){this.textContent=e.apply(this,arguments)??``}}function rd(e){return arguments.length?this.each(e==null?ed:(typeof e==`function`?nd:td)(e)):this.node().textContent}function id(){this.innerHTML=``}function ad(e){return function(){this.innerHTML=e}}function od(e){return function(){this.innerHTML=e.apply(this,arguments)??``}}function sd(e){return arguments.length?this.each(e==null?id:(typeof e==`function`?od:ad)(e)):this.node().innerHTML}function cd(){this.nextSibling&&this.parentNode.appendChild(this)}function ld(){return this.each(cd)}function ud(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function dd(){return this.each(ud)}function fd(e){var t=typeof e==`function`?e:Vl(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function pd(){return null}function md(e,t){var n=typeof e==`function`?e:Vl(e),r=t==null?pd:typeof t==`function`?t:Ul(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function hd(){var e=this.parentNode;e&&e.removeChild(this)}function gd(){return this.each(hd)}function _d(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function vd(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function yd(e){return this.select(e?vd:_d)}function bd(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function xd(e){return function(t){e.call(this,t,this.__data__)}}function Sd(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function Cd(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function wd(e,t,n){return function(){var r=this.__on,i,a=xd(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function Td(e,t,n){var r=Sd(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?wd:Cd,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function Ed(e,t,n){var r=Fu(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Dd(e,t){return function(){return Ed(this,e,t)}}function Od(e,t){return function(){return Ed(this,e,t.apply(this,arguments))}}function kd(e,t){return this.each((typeof t==`function`?Od:Dd)(e,t))}function*Ad(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var jd=[null];function G(e,t){this._groups=e,this._parents=t}function Md(){return new G([[document.documentElement]],jd)}function Nd(){return this}G.prototype=Md.prototype={constructor:G,select:Wl,selectAll:Yl,selectChild:tu,selectChildren:au,filter:ou,data:mu,enter:cu,exit:gu,join:_u,merge:vu,selection:Nd,order:yu,sort:bu,call:Su,nodes:Cu,node:wu,size:Tu,empty:Eu,each:Du,attr:Pu,style:zu,property:Wu,classed:$u,text:rd,html:sd,raise:ld,lower:dd,append:fd,insert:md,remove:gd,clone:yd,datum:bd,on:Td,dispatch:kd,[Symbol.iterator]:Ad};function Pd(e){return typeof e==`string`?new G([[document.querySelector(e)]],[document.documentElement]):new G([[e]],jd)}function Fd(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Id(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ld(){}var Rd=.7,zd=1/Rd,Bd=`\\s*([+-]?\\d+)\\s*`,Vd=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,Hd=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,Ud=/^#([0-9a-f]{3,8})$/,Wd=RegExp(`^rgb\\(${Bd},${Bd},${Bd}\\)$`),Gd=RegExp(`^rgb\\(${Hd},${Hd},${Hd}\\)$`),Kd=RegExp(`^rgba\\(${Bd},${Bd},${Bd},${Vd}\\)$`),qd=RegExp(`^rgba\\(${Hd},${Hd},${Hd},${Vd}\\)$`),Jd=RegExp(`^hsl\\(${Vd},${Hd},${Hd}\\)$`),Yd=RegExp(`^hsla\\(${Vd},${Hd},${Hd},${Vd}\\)$`),Xd={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Fd(Ld,tf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Zd,formatHex:Zd,formatHex8:Qd,formatHsl:$d,formatRgb:ef,toString:ef});function Zd(){return this.rgb().formatHex()}function Qd(){return this.rgb().formatHex8()}function $d(){return mf(this).formatHsl()}function ef(){return this.rgb().formatRgb()}function tf(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=Ud.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?nf(t):n===3?new K(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?rf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?rf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Wd.exec(e))?new K(t[1],t[2],t[3],1):(t=Gd.exec(e))?new K(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Kd.exec(e))?rf(t[1],t[2],t[3],t[4]):(t=qd.exec(e))?rf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Jd.exec(e))?pf(t[1],t[2]/100,t[3]/100,1):(t=Yd.exec(e))?pf(t[1],t[2]/100,t[3]/100,t[4]):Xd.hasOwnProperty(e)?nf(Xd[e]):e===`transparent`?new K(NaN,NaN,NaN,0):null}function nf(e){return new K(e>>16&255,e>>8&255,e&255,1)}function rf(e,t,n,r){return r<=0&&(e=t=n=NaN),new K(e,t,n,r)}function af(e){return e instanceof Ld||(e=tf(e)),e?(e=e.rgb(),new K(e.r,e.g,e.b,e.opacity)):new K}function of(e,t,n,r){return arguments.length===1?af(e):new K(e,t,n,r??1)}function K(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Fd(K,of,Id(Ld,{brighter(e){return e=e==null?zd:zd**+e,new K(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Rd:Rd**+e,new K(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new K(df(this.r),df(this.g),df(this.b),uf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:sf,formatHex:sf,formatHex8:cf,formatRgb:lf,toString:lf}));function sf(){return`#${ff(this.r)}${ff(this.g)}${ff(this.b)}`}function cf(){return`#${ff(this.r)}${ff(this.g)}${ff(this.b)}${ff((isNaN(this.opacity)?1:this.opacity)*255)}`}function lf(){let e=uf(this.opacity);return`${e===1?`rgb(`:`rgba(`}${df(this.r)}, ${df(this.g)}, ${df(this.b)}${e===1?`)`:`, ${e})`}`}function uf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function df(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ff(e){return e=df(e),(e<16?`0`:``)+e.toString(16)}function pf(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new gf(e,t,n,r)}function mf(e){if(e instanceof gf)return new gf(e.h,e.s,e.l,e.opacity);if(e instanceof Ld||(e=tf(e)),!e)return new gf;if(e instanceof gf)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new gf(o,s,c,e.opacity)}function hf(e,t,n,r){return arguments.length===1?mf(e):new gf(e,t,n,r??1)}function gf(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Fd(gf,hf,Id(Ld,{brighter(e){return e=e==null?zd:zd**+e,new gf(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Rd:Rd**+e,new gf(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new K(yf(e>=240?e-240:e+120,i,r),yf(e,i,r),yf(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new gf(_f(this.h),vf(this.s),vf(this.l),uf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=uf(this.opacity);return`${e===1?`hsl(`:`hsla(`}${_f(this.h)}, ${vf(this.s)*100}%, ${vf(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function _f(e){return e=(e||0)%360,e<0?e+360:e}function vf(e){return Math.max(0,Math.min(1,e||0))}function yf(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var bf=Math.PI/180,xf=180/Math.PI,Sf=18,Cf=.96422,wf=1,Tf=.82521,Ef=4/29,Df=6/29,Of=3*Df*Df,kf=Df*Df*Df;function Af(e){if(e instanceof Mf)return new Mf(e.l,e.a,e.b,e.opacity);if(e instanceof zf)return Bf(e);e instanceof K||(e=af(e));var t=If(e.r),n=If(e.g),r=If(e.b),i=Nf((.2225045*t+.7168786*n+.0606169*r)/wf),a,o;return t===n&&n===r?a=o=i:(a=Nf((.4360747*t+.3850649*n+.1430804*r)/Cf),o=Nf((.0139322*t+.0971045*n+.7141733*r)/Tf)),new Mf(116*i-16,500*(a-i),200*(i-o),e.opacity)}function jf(e,t,n,r){return arguments.length===1?Af(e):new Mf(e,t,n,r??1)}function Mf(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}Fd(Mf,jf,Id(Ld,{brighter(e){return new Mf(this.l+Sf*(e??1),this.a,this.b,this.opacity)},darker(e){return new Mf(this.l-Sf*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=Cf*Pf(t),e=wf*Pf(e),n=Tf*Pf(n),new K(Ff(3.1338561*t-1.6168667*e-.4906146*n),Ff(-.9787684*t+1.9161415*e+.033454*n),Ff(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function Nf(e){return e>kf?e**(1/3):e/Of+Ef}function Pf(e){return e>Df?e*e*e:Of*(e-Ef)}function Ff(e){return 255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055)}function If(e){return(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4}function Lf(e){if(e instanceof zf)return new zf(e.h,e.c,e.l,e.opacity);if(e instanceof Mf||(e=Af(e)),e.a===0&&e.b===0)return new zf(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*xf;return new zf(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Rf(e,t,n,r){return arguments.length===1?Lf(e):new zf(e,t,n,r??1)}function zf(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Bf(e){if(isNaN(e.h))return new Mf(e.l,0,0,e.opacity);var t=e.h*bf;return new Mf(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Fd(zf,Rf,Id(Ld,{brighter(e){return new zf(this.h,this.c,this.l+Sf*(e??1),this.opacity)},darker(e){return new zf(this.h,this.c,this.l-Sf*(e??1),this.opacity)},rgb(){return Bf(this).rgb()}}));var Vf=e=>()=>e;function Hf(e,t){return function(n){return e+n*t}}function Uf(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function Wf(e,t){var n=t-e;return n?Hf(e,n>180||n<-180?n-360*Math.round(n/360):n):Vf(isNaN(e)?t:e)}function Gf(e){return(e=+e)==1?Kf:function(t,n){return n-t?Uf(t,n,e):Vf(isNaN(t)?n:t)}}function Kf(e,t){var n=t-e;return n?Hf(e,n):Vf(isNaN(e)?t:e)}var qf=(function e(t){var n=Gf(t);function r(e,t){var r=n((e=of(e)).r,(t=of(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=Kf(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function Jf(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function Yf(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Xf(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=ap(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function Zf(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Qf(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function $f(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=ap(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var ep=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tp=new RegExp(ep.source,`g`);function np(e){return function(){return e}}function rp(e){return function(t){return e(t)+``}}function ip(e,t){var n=ep.lastIndex=tp.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=ep.exec(e))&&(i=tp.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:Qf(r,i)})),n=tp.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?rp(c[0].x):np(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function ap(e,t){var n=typeof t,r;return t==null||n===`boolean`?Vf(t):(n===`number`?Qf:n===`string`?(r=tf(t))?(t=r,qf):ip:t instanceof tf?qf:t instanceof Date?Zf:Yf(t)?Jf:Array.isArray(t)?Xf:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?$f:Qf)(e,t)}function op(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var sp=180/Math.PI,cp={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function lp(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*sp,skewX:Math.atan(c)*sp,scaleX:o,scaleY:s}}var up;function dp(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?cp:lp(t.a,t.b,t.c,t.d,t.e,t.f)}function fp(e){return e==null||(up||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),up.setAttribute(`transform`,e),!(e=up.transform.baseVal.consolidate()))?cp:(e=e.matrix,lp(e.a,e.b,e.c,e.d,e.e,e.f))}function pp(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:Qf(e,i)},{i:c-2,x:Qf(r,a)})}else (i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:Qf(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:Qf(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:Qf(e,n)},{i:s-2,x:Qf(t,r)})}else (n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var mp=pp(dp,`px, `,`px)`,`deg)`),hp=pp(fp,`, `,`)`,`)`);function gp(e){return function(t,n){var r=e((t=Rf(t)).h,(n=Rf(n)).h),i=Kf(t.c,n.c),a=Kf(t.l,n.l),o=Kf(t.opacity,n.opacity);return function(e){return t.h=r(e),t.c=i(e),t.l=a(e),t.opacity=o(e),t+``}}}var _p=gp(Wf),vp=0,yp=0,bp=0,xp=1e3,Sp,Cp,wp=0,Tp=0,Ep=0,Dp=typeof performance==`object`&&performance.now?performance:Date,Op=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function kp(){return Tp||=(Op(Ap),Dp.now()+Ep)}function Ap(){Tp=0}function jp(){this._call=this._time=this._next=null}jp.prototype=Mp.prototype={constructor:jp,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?kp():+n)+(t==null?0:+t),!this._next&&Cp!==this&&(Cp?Cp._next=this:Sp=this,Cp=this),this._call=e,this._time=n,Lp()},stop:function(){this._call&&(this._call=null,this._time=1/0,Lp())}};function Mp(e,t,n){var r=new jp;return r.restart(e,t,n),r}function Np(){kp(),++vp;for(var e=Sp,t;e;)(t=Tp-e._time)>=0&&e._call.call(void 0,t),e=e._next;--vp}function Pp(){Tp=(wp=Dp.now())+Ep,vp=yp=0;try{Np()}finally{vp=0,Ip(),Tp=0}}function Fp(){var e=Dp.now(),t=e-wp;t>xp&&(Ep-=t,wp=e)}function Ip(){for(var e,t=Sp,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Sp=n);Cp=e,Lp(r)}function Lp(e){vp||(yp&&=clearTimeout(yp),e-Tp>24?(e<1/0&&(yp=setTimeout(Pp,e-Dp.now()-Ep)),bp&&=clearInterval(bp)):(bp||=(wp=Dp.now(),setInterval(Fp,xp)),vp=1,Op(Pp)))}function Rp(e,t,n){var r=new jp;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var zp=Ml(`start`,`end`,`cancel`,`interrupt`),Bp=[];function Vp(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Gp(e,n,{name:t,index:r,group:i,on:zp,tween:Bp,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Hp(e,t){var n=Wp(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function Up(e,t){var n=Wp(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function Wp(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function Gp(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Mp(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return Rp(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(Rp(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function Kp(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function qp(e){return this.each(function(){Kp(this,e)})}function Jp(e,t){var n,r;return function(){var i=Up(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Yp(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=Up(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function Xp(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=Wp(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?Jp:Yp)(n,e,t))}function Zp(e,t,n){var r=e._id;return e.each(function(){var e=Up(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return Wp(e,r).value[t]}}function Qp(e,t){var n;return(typeof t==`number`?Qf:t instanceof tf?qf:(n=tf(t))?(t=n,qf):ip)(e,t)}function $p(e){return function(){this.removeAttribute(e)}}function em(e){return function(){this.removeAttributeNS(e.space,e.local)}}function tm(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function nm(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function rm(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function im(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function am(e,t){var n=Rl(e),r=n===`transform`?hp:Qp;return this.attrTween(e,typeof t==`function`?(n.local?im:rm)(n,r,Zp(this,`attr.`+e,t)):t==null?(n.local?em:$p)(n):(n.local?nm:tm)(n,r,t))}function om(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function sm(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function cm(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&sm(e,i)),n}return i._value=t,i}function lm(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&om(e,i)),n}return i._value=t,i}function um(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=Rl(e);return this.tween(n,(r.local?cm:lm)(r,t))}function dm(e,t){return function(){Hp(this,e).delay=+t.apply(this,arguments)}}function fm(e,t){return t=+t,function(){Hp(this,e).delay=t}}function pm(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?dm:fm)(t,e)):Wp(this.node(),t).delay}function mm(e,t){return function(){Up(this,e).duration=+t.apply(this,arguments)}}function hm(e,t){return t=+t,function(){Up(this,e).duration=t}}function gm(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?mm:hm)(t,e)):Wp(this.node(),t).duration}function _m(e,t){if(typeof t!=`function`)throw Error();return function(){Up(this,e).ease=t}}function vm(e){var t=this._id;return arguments.length?this.each(_m(t,e)):Wp(this.node(),t).ease}function ym(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();Up(this,e).ease=n}}function bm(e){if(typeof e!=`function`)throw Error();return this.each(ym(this._id,e))}function xm(e){typeof e!=`function`&&(e=Xl(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Xm(r,this._parents,this._name,this._id)}function Sm(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new Xm(o,this._parents,this._name,this._id)}function Cm(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function wm(e,t,n){var r,i,a=Cm(t)?Hp:Up;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function Tm(e,t){var n=this._id;return arguments.length<2?Wp(this.node(),n).on.on(e):this.each(wm(n,e,t))}function Em(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Dm(){return this.on(`end.remove`,Em(this._id))}function Om(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=Ul(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,Vp(l[f],t,n,f,l,Wp(u,n)));return new Xm(a,this._parents,t,n)}function km(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=ql(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=Wp(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&Vp(p,t,n,h,f,m);a.push(f),o.push(u)}return new Xm(a,o,t,n)}var Am=Md.prototype.constructor;function jm(){return new Am(this._groups,this._parents)}function Mm(e,t){var n,r,i;return function(){var a=Bu(this,e),o=(this.style.removeProperty(e),Bu(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function Nm(e){return function(){this.style.removeProperty(e)}}function Pm(e,t,n){var r,i=n+``,a;return function(){var o=Bu(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function Fm(e,t,n){var r,i,a;return function(){var o=Bu(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),Bu(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function Im(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=Up(this,e),l=c.on,u=c.value[a]==null?s||=Nm(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function Lm(e,t,n){var r=(e+=``)==`transform`?mp:Qp;return t==null?this.styleTween(e,Mm(e,r)).on(`end.style.`+e,Nm(e)):typeof t==`function`?this.styleTween(e,Fm(e,r,Zp(this,`style.`+e,t))).each(Im(this._id,e)):this.styleTween(e,Pm(e,r,t),n).on(`end.style.`+e,null)}function Rm(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function zm(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Rm(e,a,n)),r}return a._value=t,a}function Bm(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,zm(e,t,n??``))}function Vm(e){return function(){this.textContent=e}}function Hm(e){return function(){this.textContent=e(this)??``}}function Um(e){return this.tween(`text`,typeof e==`function`?Hm(Zp(this,`text`,e)):Vm(e==null?``:e+``))}function Wm(e){return function(t){this.textContent=e.call(this,t)}}function Gm(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Wm(r)),t}return r._value=e,r}function Km(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,Gm(e))}function qm(){for(var e=this._name,t=this._id,n=Qm(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=Wp(c,t);Vp(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Xm(r,this._parents,e,n)}function Jm(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=Up(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var Ym=0;function Xm(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Zm(e){return Md().transition(e)}function Qm(){return++Ym}var $m=Md.prototype;Xm.prototype=Zm.prototype={constructor:Xm,select:Om,selectAll:km,selectChild:$m.selectChild,selectChildren:$m.selectChildren,filter:xm,merge:Sm,selection:jm,transition:qm,call:$m.call,nodes:$m.nodes,node:$m.node,size:$m.size,empty:$m.empty,each:$m.each,on:Tm,attr:am,attrTween:um,style:Lm,styleTween:Bm,text:Um,textTween:Km,remove:Dm,tween:Xp,delay:pm,duration:gm,ease:vm,easeVarying:bm,end:Jm,[Symbol.iterator]:$m[Symbol.iterator]};function eh(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var th={time:null,delay:0,duration:250,ease:eh};function nh(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function rh(e){var t,n;e instanceof Xm?(t=e._id,e=e._name):(t=Qm(),(n=th).time=kp(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&Vp(c,e,t,l,o,n||nh(c,t));return new Xm(r,this._parents,e,t)}Md.prototype.interrupt=qp,Md.prototype.transition=rh;var{abs:ih,max:ah,min:oh}=Math;[`w`,`e`].map(sh),[`n`,`s`].map(sh),[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(sh);function sh(e){return{type:e}}var ch=Math.PI,lh=2*ch,uh=1e-6,dh=lh-uh;function fh(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function ph(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return fh;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var mh=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?fh:ph(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>uh)if(!(Math.abs(u*s-c*l)>uh)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((ch-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>uh&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>uh||Math.abs(this._y1-l)>uh)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%lh+lh),d>dh?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>uh&&this._append`A${n},${n},0,${+(d>=ch)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function hh(){return new mh}hh.prototype=mh.prototype;function gh(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function _h(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function vh(e){return e=_h(Math.abs(e)),e?e[1]:NaN}function yh(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function bh(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var xh=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Sh(e){if(!(t=xh.exec(e)))throw Error(`invalid format: `+e);var t;return new Ch({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Sh.prototype=Ch.prototype;function Ch(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}Ch.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function wh(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Th;function Eh(e,t){var n=_h(e,t);if(!n)return Th=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(Th=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+_h(e,Math.max(0,t+a-1))[0]}function Dh(e,t){var n=_h(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var Oh={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:gh,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Dh(e*100,t),r:Dh,s:Eh,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function kh(e){return e}var Ah=Array.prototype.map,jh=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function Mh(e){var t=e.grouping===void 0||e.thousands===void 0?kh:yh(Ah.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?kh:bh(Ah.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=Sh(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):Oh[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=Oh[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=wh(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&Th!==void 0?jh[8+Th/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r;break}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(vh(t)/3)))*3,r=10**-n,i=l((e=Sh(e),e.type=`f`,e),{suffix:jh[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var Nh,Ph,Fh;Ih({thousands:`,`,grouping:[3],currency:[`$`,``]});function Ih(e){return Nh=Mh(e),Ph=Nh.format,Fh=Nh.formatPrefix,Nh}function Lh(e){return Math.max(0,-vh(Math.abs(e)))}function Rh(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(vh(t)/3)))*3-vh(Math.abs(e)))}function zh(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vh(t)-vh(e))+1}function Bh(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function Vh(){return this.eachAfter(Bh)}function Hh(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function Uh(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function Wh(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function Gh(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function Kh(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function qh(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function Jh(e){for(var t=this,n=Yh(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function Yh(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function Xh(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function Zh(){return Array.from(this)}function Qh(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function $h(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*eg(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function tg(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=ig)):t===void 0&&(t=rg);for(var n=new sg(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new sg(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(og)}function ng(){return tg(this).eachBefore(ag)}function rg(e){return e.children}function ig(e){return Array.isArray(e)?e[1]:null}function ag(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function og(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function sg(e){this.data=e,this.depth=this.height=0,this.parent=null}sg.prototype=tg.prototype={constructor:sg,count:Vh,each:Hh,eachAfter:Wh,eachBefore:Uh,find:Gh,sum:Kh,sort:qh,path:Jh,ancestors:Xh,descendants:Zh,leaves:Qh,links:$h,copy:ng,[Symbol.iterator]:eg};function cg(e){if(typeof e!=`function`)throw Error();return e}function lg(){return 0}function ug(e){return function(){return e}}function dg(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function fg(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++s<c;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*l}function pg(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(i-n)/e.value;++s<c;)o=a[s],o.x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*l}var mg=(1+Math.sqrt(5))/2;function hg(e,t,n,r,i,a){for(var o=[],s=t.children,c,l,u=0,d=0,f=s.length,p,m,h=t.value,g,_,v,y,b,x,S;u<f;){p=i-n,m=a-r;do g=s[d++].value;while(!g&&d<f);for(_=v=g,x=Math.max(m/p,p/m)/(h*e),S=g*g*x,b=Math.max(v/S,S/_);d<f;++d){if(g+=l=s[d].value,l<_&&(_=l),l>v&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p<m,children:s.slice(u,d)}),c.dice?fg(c,n,r,i,h?r+=m*g/h:a):pg(c,n,r,h?n+=p*g/h:i,a),h-=g,u=d}return o}var gg=(function e(t){function n(e,n,r,i,a){hg(t,e,n,r,i,a)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n})(mg);function _g(){var e=gg,t=!1,n=1,r=1,i=[0],a=lg,o=lg,s=lg,c=lg,l=lg;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(dg),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),t.x0=r,t.y0=u,t.x1=d,t.y1=f,t.children&&(n=i[t.depth+1]=a(t)/2,r+=l(t)-n,u+=o(t)-n,d-=s(t)-n,f-=c(t)-n,d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),e(t,r,u,d,f))}return u.round=function(e){return arguments.length?(t=!!e,u):t},u.size=function(e){return arguments.length?(n=+e[0],r=+e[1],u):[n,r]},u.tile=function(t){return arguments.length?(e=cg(t),u):e},u.padding=function(e){return arguments.length?u.paddingInner(e).paddingOuter(e):u.paddingInner()},u.paddingInner=function(e){return arguments.length?(a=typeof e==`function`?e:ug(+e),u):a},u.paddingOuter=function(e){return arguments.length?u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):u.paddingTop()},u.paddingTop=function(e){return arguments.length?(o=typeof e==`function`?e:ug(+e),u):o},u.paddingRight=function(e){return arguments.length?(s=typeof e==`function`?e:ug(+e),u):s},u.paddingBottom=function(e){return arguments.length?(c=typeof e==`function`?e:ug(+e),u):c},u.paddingLeft=function(e){return arguments.length?(l=typeof e==`function`?e:ug(+e),u):l},u}function vg(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var yg=Symbol(`implicit`);function bg(){var e=new nl,t=[],n=[],r=yg;function i(i){let a=e.get(i);if(a===void 0){if(r!==yg)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new nl;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return bg(t,n).unknown(r)},vg.apply(i,arguments),i}function xg(){var e=bg().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=gl(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return xg(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},vg.apply(d(),arguments)}function Sg(e){return function(){return e}}function Cg(e){return+e}var wg=[0,1];function Tg(e){return e}function Eg(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Sg(isNaN(t)?NaN:.5)}function Dg(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function Og(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=Eg(i,r),a=n(o,a)):(r=Eg(r,i),a=n(a,o)),function(e){return a(r(e))}}function kg(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=Eg(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=tl(e,t,1,r)-1;return a[n](i[n](t))}}function Ag(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function jg(){var e=wg,t=wg,n=ap,r,i,a,o=Tg,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==Tg&&(o=Dg(e[0],e[n-1])),s=n>2?kg:Og,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),Qf))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,Cg),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=op,u()},d.clamp=function(e){return arguments.length?(o=e?!0:Tg,u()):o!==Tg},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function Mg(){return jg()(Tg,Tg)}function Ng(e,t,n,r){var i=pl(e,t,n),a;switch(r=Sh(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=Rh(i,o))&&(r.precision=a),Fh(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=zh(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=Lh(i))&&(r.precision=a-(r.type===`%`)*2);break}return Ph(r)}function Pg(e){var t=e.domain;return e.ticks=function(e){var n=t();return dl(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return Ng(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-- >0;){if(l=fl(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function Fg(){var e=Mg();return e.copy=function(){return Ag(e,Fg())},vg.apply(e,arguments),Pg(e)}function Ig(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}var Lg=new Date,Rg=new Date;function q(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>q(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(Lg.setTime(+t),Rg.setTime(+r),e(Lg),e(Rg),Math.floor(n(Lg,Rg))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var zg=q(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);zg.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?q(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):zg),zg.range;var Bg=1e3,J=Bg*60,Vg=J*60,Hg=Vg*24,Ug=Hg*7,Wg=Hg*30,Gg=Hg*365,Kg=q(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Bg)},(e,t)=>(t-e)/Bg,e=>e.getUTCSeconds());Kg.range;var qg=q(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Bg)},(e,t)=>{e.setTime(+e+t*J)},(e,t)=>(t-e)/J,e=>e.getMinutes());qg.range;var Jg=q(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*J)},(e,t)=>(t-e)/J,e=>e.getUTCMinutes());Jg.range;var Yg=q(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Bg-e.getMinutes()*J)},(e,t)=>{e.setTime(+e+t*Vg)},(e,t)=>(t-e)/Vg,e=>e.getHours());Yg.range;var Xg=q(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Vg)},(e,t)=>(t-e)/Vg,e=>e.getUTCHours());Xg.range;var Zg=q(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*J)/Hg,e=>e.getDate()-1);Zg.range;var Qg=q(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Hg,e=>e.getUTCDate()-1);Qg.range;var $g=q(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Hg,e=>Math.floor(e/Hg));$g.range;function e_(e){return q(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*J)/Ug)}var t_=e_(0),n_=e_(1),r_=e_(2),i_=e_(3),a_=e_(4),o_=e_(5),s_=e_(6);t_.range,n_.range,r_.range,i_.range,a_.range,o_.range,s_.range;function c_(e){return q(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Ug)}var l_=c_(0),u_=c_(1),d_=c_(2),f_=c_(3),p_=c_(4),m_=c_(5),h_=c_(6);l_.range,u_.range,d_.range,f_.range,p_.range,m_.range,h_.range;var g_=q(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());g_.range;var __=q(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());__.range;var v_=q(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());v_.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:q(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),v_.range;var y_=q(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());y_.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:q(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),y_.range;function b_(e,t,n,r,i,a){let o=[[Kg,1,Bg],[Kg,5,5*Bg],[Kg,15,15*Bg],[Kg,30,30*Bg],[a,1,J],[a,5,5*J],[a,15,15*J],[a,30,30*J],[i,1,Vg],[i,3,3*Vg],[i,6,6*Vg],[i,12,12*Vg],[r,1,Hg],[r,2,2*Hg],[n,1,Ug],[t,1,Wg],[t,3,3*Wg],[e,1,Gg]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=Zc(([,,e])=>e).right(o,i);if(a===o.length)return e.every(pl(t/Gg,n/Gg,r));if(a===0)return zg.every(Math.max(pl(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[x_,S_]=b_(y_,__,l_,$g,Xg,Jg),[C_,w_]=b_(v_,g_,t_,Zg,Yg,qg);function T_(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function E_(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function D_(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function O_(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=N_(i),u=P_(i),d=N_(a),f=P_(a),p=N_(o),m=P_(o),h=N_(s),g=P_(s),_=N_(c),v=P_(c),y={a:N,A:P,b:ee,B:te,c:null,d:tv,e:tv,f:ov,g:_v,G:yv,H:nv,I:rv,j:iv,L:av,m:sv,M:cv,p:F,q:I,Q:Hv,s:Uv,S:lv,u:uv,U:dv,V:pv,w:mv,W:hv,x:null,X:null,y:gv,Y:vv,Z:bv,"%":Vv},b={a:ne,A:L,b:re,B:ie,c:null,d:xv,e:xv,f:Ev,g:Lv,G:zv,H:Sv,I:Cv,j:wv,L:Tv,m:Dv,M:Ov,p:ae,q:oe,Q:Hv,s:Uv,S:kv,u:Av,U:jv,V:Nv,w:Pv,W:Fv,x:null,X:null,y:Iv,Y:Rv,Z:Bv,"%":Vv},x={a:E,A:D,b:O,B:k,c:A,d:G_,e:G_,f:Z_,g:V_,G:B_,H:q_,I:q_,j:K_,L:X_,m:W_,M:J_,p:T,q:U_,Q:$_,s:ev,S:Y_,u:I_,U:L_,V:R_,w:F_,W:z_,x:j,X:M,y:V_,Y:B_,Z:H_,"%":Q_};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=k_[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=D_(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=E_(D_(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?u_.ceil(a):u_(a),a=Qg.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=T_(D_(r.y,0,1)),o=a.getDay(),a=o>4||o===0?n_.ceil(a):n_(a),a=Zg.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else (`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?E_(D_(r.y,0,1)).getUTCDay():T_(D_(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,E_(r)):T_(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in k_?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function M(e,t,n){return w(e,r,t,n)}function N(e){return o[e.getDay()]}function P(e){return a[e.getDay()]}function ee(e){return c[e.getMonth()]}function te(e){return s[e.getMonth()]}function F(e){return i[+(e.getHours()>=12)]}function I(e){return 1+~~(e.getMonth()/3)}function ne(e){return o[e.getUTCDay()]}function L(e){return a[e.getUTCDay()]}function re(e){return c[e.getUTCMonth()]}function ie(e){return s[e.getUTCMonth()]}function ae(e){return i[+(e.getUTCHours()>=12)]}function oe(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var k_={"-":``,_:` `,0:`0`},Y=/^\s*\d+/,A_=/^%/,j_=/[\\^$*+?|[\]().{}]/g;function X(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function M_(e){return e.replace(j_,`\\$&`)}function N_(e){return RegExp(`^(?:`+e.map(M_).join(`|`)+`)`,`i`)}function P_(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function F_(e,t,n){var r=Y.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function I_(e,t,n){var r=Y.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function L_(e,t,n){var r=Y.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function R_(e,t,n){var r=Y.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function z_(e,t,n){var r=Y.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function B_(e,t,n){var r=Y.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function V_(e,t,n){var r=Y.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function H_(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function U_(e,t,n){var r=Y.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function W_(e,t,n){var r=Y.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function G_(e,t,n){var r=Y.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function K_(e,t,n){var r=Y.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function q_(e,t,n){var r=Y.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function J_(e,t,n){var r=Y.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Y_(e,t,n){var r=Y.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function X_(e,t,n){var r=Y.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Z_(e,t,n){var r=Y.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Q_(e,t,n){var r=A_.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function $_(e,t,n){var r=Y.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ev(e,t,n){var r=Y.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function tv(e,t){return X(e.getDate(),t,2)}function nv(e,t){return X(e.getHours(),t,2)}function rv(e,t){return X(e.getHours()%12||12,t,2)}function iv(e,t){return X(1+Zg.count(v_(e),e),t,3)}function av(e,t){return X(e.getMilliseconds(),t,3)}function ov(e,t){return av(e,t)+`000`}function sv(e,t){return X(e.getMonth()+1,t,2)}function cv(e,t){return X(e.getMinutes(),t,2)}function lv(e,t){return X(e.getSeconds(),t,2)}function uv(e){var t=e.getDay();return t===0?7:t}function dv(e,t){return X(t_.count(v_(e)-1,e),t,2)}function fv(e){var t=e.getDay();return t>=4||t===0?a_(e):a_.ceil(e)}function pv(e,t){return e=fv(e),X(a_.count(v_(e),e)+(v_(e).getDay()===4),t,2)}function mv(e){return e.getDay()}function hv(e,t){return X(n_.count(v_(e)-1,e),t,2)}function gv(e,t){return X(e.getFullYear()%100,t,2)}function _v(e,t){return e=fv(e),X(e.getFullYear()%100,t,2)}function vv(e,t){return X(e.getFullYear()%1e4,t,4)}function yv(e,t){var n=e.getDay();return e=n>=4||n===0?a_(e):a_.ceil(e),X(e.getFullYear()%1e4,t,4)}function bv(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+X(t/60|0,`0`,2)+X(t%60,`0`,2)}function xv(e,t){return X(e.getUTCDate(),t,2)}function Sv(e,t){return X(e.getUTCHours(),t,2)}function Cv(e,t){return X(e.getUTCHours()%12||12,t,2)}function wv(e,t){return X(1+Qg.count(y_(e),e),t,3)}function Tv(e,t){return X(e.getUTCMilliseconds(),t,3)}function Ev(e,t){return Tv(e,t)+`000`}function Dv(e,t){return X(e.getUTCMonth()+1,t,2)}function Ov(e,t){return X(e.getUTCMinutes(),t,2)}function kv(e,t){return X(e.getUTCSeconds(),t,2)}function Av(e){var t=e.getUTCDay();return t===0?7:t}function jv(e,t){return X(l_.count(y_(e)-1,e),t,2)}function Mv(e){var t=e.getUTCDay();return t>=4||t===0?p_(e):p_.ceil(e)}function Nv(e,t){return e=Mv(e),X(p_.count(y_(e),e)+(y_(e).getUTCDay()===4),t,2)}function Pv(e){return e.getUTCDay()}function Fv(e,t){return X(u_.count(y_(e)-1,e),t,2)}function Iv(e,t){return X(e.getUTCFullYear()%100,t,2)}function Lv(e,t){return e=Mv(e),X(e.getUTCFullYear()%100,t,2)}function Rv(e,t){return X(e.getUTCFullYear()%1e4,t,4)}function zv(e,t){var n=e.getUTCDay();return e=n>=4||n===0?p_(e):p_.ceil(e),X(e.getUTCFullYear()%1e4,t,4)}function Bv(){return`+0000`}function Vv(){return`%`}function Hv(e){return+e}function Uv(e){return Math.floor(e/1e3)}var Wv,Gv;Kv({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function Kv(e){return Wv=O_(e),Gv=Wv.format,Wv.parse,Wv.utcFormat,Wv.utcParse,Wv}function qv(e){return new Date(e)}function Jv(e){return e instanceof Date?+e:+new Date(+e)}function Yv(e,t,n,r,i,a,o,s,c,l){var u=Mg(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,Jv)):f().map(qv)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(Ig(n,e)):u},u.copy=function(){return Ag(u,Yv(e,t,n,r,i,a,o,s,c,l))},u}function Xv(){return vg.apply(Yv(C_,w_,v_,g_,t_,Zg,Yg,qg,Kg,Gv).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Zv(e){for(var t=e.length/6|0,n=Array(t),r=0;r<t;)n[r]=`#`+e.slice(r*6,++r*6);return n}var Qv=Zv(`4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab`);function Z(e){return function(){return e}}var $v=Math.abs,Q=Math.atan2,ey=Math.cos,ty=Math.max,ny=Math.min,ry=Math.sin,iy=Math.sqrt,ay=Math.PI,oy=ay/2,sy=2*ay;function cy(e){return e>1?0:e<-1?ay:Math.acos(e)}function ly(e){return e>=1?oy:e<=-1?-oy:Math.asin(e)}function uy(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new mh(t)}function dy(e){return e.innerRadius}function fy(e){return e.outerRadius}function py(e){return e.startAngle}function my(e){return e.endAngle}function hy(e){return e&&e.padAngle}function gy(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function _y(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/iy(s*s+c*c),u=l*c,d=-l*s,f=e+u,p=t+d,m=n+u,h=r+d,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=v*v+y*y,x=i-a,S=f*h-m*p,C=(y<0?-1:1)*iy(ty(0,x*x*b-S*S)),w=(S*y-v*C)/b,T=(-S*v-y*C)/b,E=(S*y+v*C)/b,D=(-S*v+y*C)/b,O=w-g,k=T-_,A=E-g,j=D-_;return O*O+k*k>A*A+j*j&&(w=E,T=D),{cx:w,cy:T,x01:-u,y01:-d,x11:w*(i/x-1),y11:T*(i/x-1)}}function vy(){var e=dy,t=fy,n=Z(0),r=null,i=py,a=my,o=hy,s=null,c=uy(l);function l(){var l,u,d=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-oy,m=a.apply(this,arguments)-oy,h=$v(m-p),g=m>p;if(s||=l=c(),f<d&&(u=f,f=d,d=u),!(f>1e-12))s.moveTo(0,0);else if(h>sy-1e-12)s.moveTo(f*ey(p),f*ry(p)),s.arc(0,0,f,p,m,!g),d>1e-12&&(s.moveTo(d*ey(m),d*ry(m)),s.arc(0,0,d,m,p,g));else{var _=p,v=m,y=p,b=m,x=h,S=h,C=o.apply(this,arguments)/2,w=C>1e-12&&(r?+r.apply(this,arguments):iy(d*d+f*f)),T=ny($v(f-d)/2,+n.apply(this,arguments)),E=T,D=T,O,k;if(w>1e-12){var A=ly(w/d*ry(C)),j=ly(w/f*ry(C));(x-=A*2)>1e-12?(A*=g?1:-1,y+=A,b-=A):(x=0,y=b=(p+m)/2),(S-=j*2)>1e-12?(j*=g?1:-1,_+=j,v-=j):(S=0,_=v=(p+m)/2)}var M=f*ey(_),N=f*ry(_),P=d*ey(b),ee=d*ry(b);if(T>1e-12){var te=f*ey(v),F=f*ry(v),I=d*ey(y),ne=d*ry(y),L;if(h<ay)if(L=gy(M,N,I,ne,te,F,P,ee)){var re=M-L[0],ie=N-L[1],ae=te-L[0],oe=F-L[1],se=1/ry(cy((re*ae+ie*oe)/(iy(re*re+ie*ie)*iy(ae*ae+oe*oe)))/2),ce=iy(L[0]*L[0]+L[1]*L[1]);E=ny(T,(d-ce)/(se-1)),D=ny(T,(f-ce)/(se+1))}else E=D=0}S>1e-12?D>1e-12?(O=_y(I,ne,M,N,f,D,g),k=_y(te,F,P,ee,f,D,g),s.moveTo(O.cx+O.x01,O.cy+O.y01),D<T?s.arc(O.cx,O.cy,D,Q(O.y01,O.x01),Q(k.y01,k.x01),!g):(s.arc(O.cx,O.cy,D,Q(O.y01,O.x01),Q(O.y11,O.x11),!g),s.arc(0,0,f,Q(O.cy+O.y11,O.cx+O.x11),Q(k.cy+k.y11,k.cx+k.x11),!g),s.arc(k.cx,k.cy,D,Q(k.y11,k.x11),Q(k.y01,k.x01),!g))):(s.moveTo(M,N),s.arc(0,0,f,_,v,!g)):s.moveTo(M,N),!(d>1e-12)||!(x>1e-12)?s.lineTo(P,ee):E>1e-12?(O=_y(P,ee,te,F,d,-E,g),k=_y(M,N,I,ne,d,-E,g),s.lineTo(O.cx+O.x01,O.cy+O.y01),E<T?s.arc(O.cx,O.cy,E,Q(O.y01,O.x01),Q(k.y01,k.x01),!g):(s.arc(O.cx,O.cy,E,Q(O.y01,O.x01),Q(O.y11,O.x11),!g),s.arc(0,0,d,Q(O.cy+O.y11,O.cx+O.x11),Q(k.cy+k.y11,k.cx+k.x11),g),s.arc(k.cx,k.cy,E,Q(k.y11,k.x11),Q(k.y01,k.x01),!g))):s.arc(0,0,d,b,y,g)}if(s.closePath(),l)return s=null,l+``||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-ay/2;return[ey(r)*n,ry(r)*n]},l.innerRadius=function(t){return arguments.length?(e=typeof t==`function`?t:Z(+t),l):e},l.outerRadius=function(e){return arguments.length?(t=typeof e==`function`?e:Z(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n=typeof e==`function`?e:Z(+e),l):n},l.padRadius=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:Z(+e),l):r},l.startAngle=function(e){return arguments.length?(i=typeof e==`function`?e:Z(+e),l):i},l.endAngle=function(e){return arguments.length?(a=typeof e==`function`?e:Z(+e),l):a},l.padAngle=function(e){return arguments.length?(o=typeof e==`function`?e:Z(+e),l):o},l.context=function(e){return arguments.length?(s=e??null,l):s},l}Array.prototype.slice;function yy(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function by(e){this._context=e}by.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function xy(e){return new by(e)}function Sy(e){return e[0]}function Cy(e){return e[1]}function wy(e,t){var n=Z(!0),r=null,i=xy,a=null,o=uy(s);e=typeof e==`function`?e:e===void 0?Sy:Z(e),t=typeof t==`function`?t:t===void 0?Cy:Z(t);function s(s){var c,l=(s=yy(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:Z(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:Z(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:Z(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function Ty(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function Ey(e){return e}function Dy(){var e=Ey,t=Ty,n=null,r=Z(0),i=Z(sy),a=Z(0);function o(o){var s,c=(o=yy(o)).length,l,u,d=0,f=Array(c),p=Array(c),m=+r.apply(this,arguments),h=Math.min(sy,Math.max(-sy,i.apply(this,arguments)-m)),g,_=Math.min(Math.abs(h)/c,a.apply(this,arguments)),v=_*(h<0?-1:1),y;for(s=0;s<c;++s)(y=p[f[s]=s]=+e(o[s],s,o))>0&&(d+=y);for(t==null?n!=null&&f.sort(function(e,t){return n(o[e],o[t])}):f.sort(function(e,n){return t(p[e],p[n])}),s=0,u=d?(h-c*v)/d:0;s<c;++s,m=g)l=f[s],y=p[l],g=m+(y>0?y*u:0)+v,p[l]={data:o[l],index:s,value:y,startAngle:m,endAngle:g,padAngle:_};return p}return o.value=function(t){return arguments.length?(e=typeof t==`function`?t:Z(+t),o):e},o.sortValues=function(e){return arguments.length?(t=e,n=null,o):t},o.sort=function(e){return arguments.length?(n=e,t=null,o):n},o.startAngle=function(e){return arguments.length?(r=typeof e==`function`?e:Z(+e),o):r},o.endAngle=function(e){return arguments.length?(i=typeof e==`function`?e:Z(+e),o):i},o.padAngle=function(e){return arguments.length?(a=typeof e==`function`?e:Z(+e),o):a},o}var Oy=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function ky(e){return new Oy(e,!0)}function Ay(e){return new Oy(e,!1)}function jy(){}function My(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Ny(e){this._context=e}Ny.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:My(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:My(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Py(e){return new Ny(e)}function Fy(e){this._context=e}Fy.prototype={areaStart:jy,areaEnd:jy,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:My(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Iy(e){return new Fy(e)}function Ly(e){this._context=e}Ly.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:My(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ry(e){return new Ly(e)}function zy(e,t){this._basis=new Ny(e),this._beta=t}zy.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var By=(function e(t){function n(e){return t===1?new Ny(e):new zy(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function Vy(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Hy(e,t){this._context=e,this._k=(1-t)/6}Hy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Vy(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Vy(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Uy=(function e(t){function n(e){return new Hy(e,t)}return n.tension=function(t){return e(+t)},n})(0);function Wy(e,t){this._context=e,this._k=(1-t)/6}Wy.prototype={areaStart:jy,areaEnd:jy,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Vy(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Gy=(function e(t){function n(e){return new Wy(e,t)}return n.tension=function(t){return e(+t)},n})(0);function Ky(e,t){this._context=e,this._k=(1-t)/6}Ky.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Vy(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var qy=(function e(t){function n(e){return new Ky(e,t)}return n.tension=function(t){return e(+t)},n})(0);function Jy(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function Yy(e,t){this._context=e,this._alpha=t}Yy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Jy(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Xy=(function e(t){function n(e){return t?new Yy(e,t):new Hy(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Zy(e,t){this._context=e,this._alpha=t}Zy.prototype={areaStart:jy,areaEnd:jy,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Jy(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Qy=(function e(t){function n(e){return t?new Zy(e,t):new Wy(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function $y(e,t){this._context=e,this._alpha=t}$y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Jy(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var eb=(function e(t){function n(e){return t?new $y(e,t):new Ky(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function tb(e){this._context=e}tb.prototype={areaStart:jy,areaEnd:jy,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function nb(e){return new tb(e)}function rb(e){return e<0?-1:1}function ib(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(rb(a)+rb(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function ab(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ob(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function sb(e){this._context=e}sb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ob(this,this._t0,ab(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ob(this,ab(this,n=ib(this,e,t)),n);break;default:ob(this,this._t0,n=ib(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function cb(e){this._context=new lb(e)}(cb.prototype=Object.create(sb.prototype)).point=function(e,t){sb.prototype.point.call(this,t,e)};function lb(e){this._context=e}lb.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function ub(e){return new sb(e)}function db(e){return new cb(e)}function fb(e){this._context=e}fb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=pb(e),i=pb(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function pb(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function mb(e){return new fb(e)}function hb(e,t){this._context=e,this._t=t}hb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function gb(e){return new hb(e,.5)}function _b(e){return new hb(e,0)}function vb(e){return new hb(e,1)}function yb(e,t,n){this.k=e,this.x=t,this.y=n}yb.prototype={constructor:yb,scale:function(e){return e===1?this:new yb(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new yb(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var bb=new yb(1,0,0);xb.prototype=yb.prototype;function xb(e){for(;!e.__zoom;)if(!(e=e.parentNode))return bb;return e.__zoom}var Sb=function(){try{var e=zi(Object,`defineProperty`);return e({},``,{}),e}catch{}}();function Cb(e,t,n){t==`__proto__`&&Sb?Sb(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function wb(e,t,n){(n!==void 0&&!qr(e[t],n)||n===void 0&&!(t in e))&&Cb(e,t,n)}var Tb=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Eb=Tb&&typeof module==`object`&&module&&!module.nodeType&&module,Db=Eb&&Eb.exports===Tb?si.Buffer:void 0,Ob=Db?Db.allocUnsafe:void 0;function kb(e,t){if(t)return e.slice();var n=e.length,r=Ob?Ob(n):new e.constructor(n);return e.copy(r),r}function Ab(e){var t=new e.constructor(e.byteLength);return new va(t).set(new va(e)),t}function jb(e,t){var n=t?Ab(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Mb(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var Nb=Object.create,Pb=function(){function e(){}return function(t){if(!H(t))return{};if(Nb)return Nb(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Fb=Go(Object.getPrototypeOf,Object);function Ib(e){return typeof e.constructor==`function`&&!Wo(e)?Pb(Fb(e)):{}}function Lb(e){return Ga(e)&&Yo(e)}var Rb=`[object Object]`,zb=Function.prototype,Bb=Object.prototype,Vb=zb.toString,Hb=Bb.hasOwnProperty,Ub=Vb.call(Object);function Wb(e){if(!Ga(e)||yi(e)!=Rb)return!1;var t=Fb(e);if(t===null)return!0;var n=Hb.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Vb.call(n)==Ub}function Gb(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}var Kb=Object.prototype.hasOwnProperty;function qb(e,t,n){var r=e[t];(!(Kb.call(e,t)&&qr(r,n))||n===void 0&&!(t in e))&&Cb(e,t,n)}function Jb(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?Cb(n,s,c):qb(n,s,c)}return n}function Yb(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Xb=Object.prototype.hasOwnProperty;function Zb(e){if(!H(e))return Yb(e);var t=Wo(e),n=[];for(var r in e)r==`constructor`&&(t||!Xb.call(e,r))||n.push(r);return n}function Qb(e){return Yo(e)?Ho(e,!0):Zb(e)}function $b(e){return Jb(e,Qb(e))}function ex(e,t,n,r,i,a,o){var s=Gb(e,n),c=Gb(t,n),l=o.get(c);if(l){wb(e,n,l);return}var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=U(c),p=!f&&no(c),m=!f&&!p&&Bo(c);u=c,f||p||m?U(s)?u=s:Lb(s)?u=Mb(s):p?(d=!1,u=kb(c,!0)):m?(d=!1,u=jb(c,!0)):u=[]:Wb(c)||Za(c)?(u=s,Za(s)?u=$b(s):(!H(s)||wi(s))&&(u=Ib(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),wb(e,n,u)}function tx(e,t,n,r,i){e!==t&&fc(t,function(a,o){if(i||=new ca,H(a))ex(e,t,o,n,tx,r,i);else{var s=r?r(Gb(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),wb(e,o,s)}},Qb)}function nx(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var rx=Math.max;function ix(e,t,n){return t=rx(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=rx(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),nx(e,this,s)}}function ax(e){return function(){return e}}var ox=Sb?function(e,t){return Sb(e,`toString`,{configurable:!0,enumerable:!1,value:ax(t),writable:!0})}:oc,sx=800,cx=16,lx=Date.now;function ux(e){var t=0,n=0;return function(){var r=lx(),i=cx-(r-n);if(n=r,i>0){if(++t>=sx)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var dx=ux(ox);function fx(e,t){return dx(ix(e,t,oc),e+``)}function px(e,t,n){if(!H(n))return!1;var r=typeof t;return(r==`number`?Yo(n)&&ao(t,n.length):r==`string`&&t in n)?qr(n[t],e):!1}function mx(e){return fx(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&px(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var hx=mx(function(e,t,n){tx(e,t,n)});function gx(e,t){return e&&Jb(t,Xo(t),e)}function _x(e,t){return e&&Jb(t,Qb(t),e)}function vx(e,t){return Jb(e,Ua(e),t)}var yx=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)La(t,Ua(e)),e=Fb(e);return t}:Ba;function bx(e,t){return Jb(e,yx(e),t)}function xx(e){return Ra(e,Qb,yx)}var Sx=Object.prototype.hasOwnProperty;function Cx(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&Sx.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}function wx(e,t){var n=t?Ab(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Tx=/\w*$/;function Ex(e){var t=new e.constructor(e.source,Tx.exec(e));return t.lastIndex=e.lastIndex,t}var Dx=ci?ci.prototype:void 0,Ox=Dx?Dx.valueOf:void 0;function kx(e){return Ox?Object(Ox.call(e)):{}}var Ax=`[object Boolean]`,jx=`[object Date]`,Mx=`[object Map]`,Nx=`[object Number]`,Px=`[object RegExp]`,Fx=`[object Set]`,Ix=`[object String]`,Lx=`[object Symbol]`,Rx=`[object ArrayBuffer]`,zx=`[object DataView]`,Bx=`[object Float32Array]`,Vx=`[object Float64Array]`,Hx=`[object Int8Array]`,Ux=`[object Int16Array]`,Wx=`[object Int32Array]`,Gx=`[object Uint8Array]`,Kx=`[object Uint8ClampedArray]`,qx=`[object Uint16Array]`,Jx=`[object Uint32Array]`;function Yx(e,t,n){var r=e.constructor;switch(t){case Rx:return Ab(e);case Ax:case jx:return new r(+e);case zx:return wx(e,n);case Bx:case Vx:case Hx:case Ux:case Wx:case Gx:case Kx:case qx:case Jx:return jb(e,n);case Mx:return new r;case Nx:case Ix:return new r(e);case Px:return Ex(e);case Fx:return new r;case Lx:return kx(e)}}var Xx=`[object Map]`;function Zx(e){return Ga(e)&&_s(e)==Xx}var Qx=Ro&&Ro.isMap,$x=Qx?Po(Qx):Zx,eS=`[object Set]`;function tS(e){return Ga(e)&&_s(e)==eS}var nS=Ro&&Ro.isSet,rS=nS?Po(nS):tS,iS=1,aS=2,oS=4,sS=`[object Arguments]`,cS=`[object Array]`,lS=`[object Boolean]`,uS=`[object Date]`,dS=`[object Error]`,fS=`[object Function]`,pS=`[object GeneratorFunction]`,mS=`[object Map]`,hS=`[object Number]`,gS=`[object Object]`,_S=`[object RegExp]`,vS=`[object Set]`,yS=`[object String]`,bS=`[object Symbol]`,xS=`[object WeakMap]`,SS=`[object ArrayBuffer]`,CS=`[object DataView]`,wS=`[object Float32Array]`,TS=`[object Float64Array]`,ES=`[object Int8Array]`,DS=`[object Int16Array]`,OS=`[object Int32Array]`,kS=`[object Uint8Array]`,AS=`[object Uint8ClampedArray]`,jS=`[object Uint16Array]`,MS=`[object Uint32Array]`,$={};$[sS]=$[cS]=$[SS]=$[CS]=$[lS]=$[uS]=$[wS]=$[TS]=$[ES]=$[DS]=$[OS]=$[mS]=$[hS]=$[gS]=$[_S]=$[vS]=$[yS]=$[bS]=$[kS]=$[AS]=$[jS]=$[MS]=!0,$[dS]=$[fS]=$[xS]=!1;function NS(e,t,n,r,i,a){var o,s=t&iS,c=t&aS,l=t&oS;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!H(e))return e;var u=U(e);if(u){if(o=Cx(e),!s)return Mb(e,o)}else{var d=_s(e),f=d==fS||d==pS;if(no(e))return kb(e,s);if(d==gS||d==sS||f&&!i){if(o=c||f?{}:Ib(e),!s)return c?bx(e,_x(o,e)):vx(e,gx(o,e))}else{if(!$[d])return i?e:{};o=Yx(e,d,s)}}a||=new ca;var p=a.get(e);if(p)return p;a.set(e,o),rS(e)?e.forEach(function(r){o.add(NS(r,t,n,r,e,a))}):$x(e)&&e.forEach(function(r,i){o.set(i,NS(r,t,n,i,e,a))});var m=u?void 0:(l?c?xx:Zo:c?Qb:Xo)(e);return zc(m||e,function(r,i){m&&(i=r,r=e[i]),qb(o,i,NS(r,t,n,i,e,a))}),o}var PS=4;function FS(e){return NS(e,PS)}var IS=/\s/;function LS(e){for(var t=e.length;t--&&IS.test(e.charAt(t)););return t}var RS=/^\s+/;function zS(e){return e&&e.slice(0,LS(e)+1).replace(RS,``)}var BS=NaN,VS=/^[-+]0x[0-9a-f]+$/i,HS=/^0b[01]+$/i,US=/^0o[0-7]+$/i,WS=parseInt;function GS(e){if(typeof e==`number`)return e;if(Ns(e))return BS;if(H(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=H(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=zS(e);var n=HS.test(e);return n||US.test(e)?WS(e.slice(2),n?2:8):VS.test(e)?BS:+e}var KS=1/0,qS=17976931348623157e292;function JS(e){return e?(e=GS(e),e===KS||e===-KS?(e<0?-1:1)*qS:e===e?e:0):e===0?e:0}function YS(e){var t=JS(e),n=t%1;return t===t?n?t-n:t:0}function XS(e){return dx(ix(e,void 0,Rc),e+``)}var ZS=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function QS(e){return ZS.test(e)}var $S=1,eC=4;function tC(e){return NS(e,$S|eC)}var nC=function(){return si.Date.now()},rC=`Expected a function`,iC=Math.max,aC=Math.min;function oC(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0;if(typeof e!=`function`)throw TypeError(rC);t=GS(t)||0,H(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?iC(GS(n.maxWait)||0,t):a,f=`trailing`in n?!!n.trailing:f);function p(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function m(e){return l=e,s=setTimeout(_,t),u?p(e):o}function h(e){var n=e-c,r=e-l,i=t-n;return d?aC(i,a-r):i}function g(e){var n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function _(){var e=nC();if(g(e))return v(e);s=setTimeout(_,h(e))}function v(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function y(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function b(){return s===void 0?o:v(nC())}function x(){var e=nC(),n=g(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return m(c);if(d)return clearTimeout(s),s=setTimeout(_,t),p(c)}return s===void 0&&(s=setTimeout(_,t)),o}return x.cancel=y,x.flush=b,x}var sC=Object.prototype,cC=sC.hasOwnProperty,lC=fx(function(e,t){e=Object(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&px(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],o=Qb(a),s=-1,c=o.length;++s<c;){var l=o[s],u=e[l];(u===void 0||qr(u,sC[l])&&!cC.call(e,l))&&(e[l]=a[l])}return e});function uC(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function dC(e){return function(t,n,r){var i=Object(t);if(!Yo(t)){var a=uc(n,3);t=Xo(t),n=function(e){return a(i[e],e,i)}}var o=e(t,n,r);return o>-1?i[a?t[o]:o]:void 0}}var fC=Math.max;function pC(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:YS(n);return i<0&&(i=fC(r+i,0)),Dc(e,uc(t,3),i)}var mC=dC(pC);function hC(e,t){return e==null?e:fc(e,Bc(t),Qb)}function gC(e,t){return e&&pc(e,Bc(t))}function _C(e,t){return e>t}var vC=Object.prototype.hasOwnProperty;function yC(e,t){return e!=null&&vC.call(e,t)}function bC(e,t){return e!=null&&tc(e,t,yC)}var xC=`[object String]`;function SC(e){return typeof e==`string`||!U(e)&&Ga(e)&&yi(e)==xC}function CC(e,t){return Gr(t,function(t){return e[t]})}function wC(e){return e==null?[]:CC(e,Xo(e))}function TC(e){return e===void 0}function EC(e,t){var n={};return t=uc(t,3),pc(e,function(e,r,i){Cb(n,r,t(e,r,i))}),n}function DC(e){return e&&e.length?bc(e,oc,_C):void 0}function OC(e,t){return e&&e.length?bc(e,uc(t,2),xc):void 0}function kC(e,t,n,r){if(!H(e))return e;t=Ys(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=Zs(t[i]),l=n;if(c===`__proto__`||c===`constructor`||c===`prototype`)return e;if(i!=o){var u=s[c];l=r?r(u,c,s):void 0,l===void 0&&(l=H(u)?u:ao(t[i+1])?[]:{})}qb(s,c,l),s=s[c]}return e}function AC(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=Qs(e,o);n(s,o)&&kC(a,Ys(o,e),s)}return a}function jC(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function MC(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,a=Ns(e),o=t!==void 0,s=t===null,c=t===t,l=Ns(t);if(!s&&!l&&!a&&e>t||a&&o&&c&&!s&&!l||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||s&&n&&i||!o&&i||!c)return-1}return 0}function NC(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=MC(i[r],a[r]);if(c)return r>=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function PC(e,t,n){t=t.length?Gr(t,function(e){return U(e)?function(t){return Qs(t,e.length===1?e[0]:e)}:e}):[oc];var r=-1;return t=Gr(t,Po(uc)),jC(gc(e,function(e,n,i){return{criteria:Gr(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return NC(e,t,n)})}var FC=sc(`length`),IC=`\\ud800-\\udfff`,LC=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,RC=`\\ufe0e\\ufe0f`,zC=`[`+IC+`]`,BC=`[`+LC+`]`,VC=`\\ud83c[\\udffb-\\udfff]`,HC=`(?:`+BC+`|`+VC+`)`,UC=`[^`+IC+`]`,WC=`(?:\\ud83c[\\udde6-\\uddff]){2}`,GC=`[\\ud800-\\udbff][\\udc00-\\udfff]`,KC=`\\u200d`,qC=HC+`?`,JC=`[`+RC+`]?`,YC=`(?:`+KC+`(?:`+[UC,WC,GC].join(`|`)+`)`+JC+qC+`)*`,XC=JC+qC+YC,ZC=`(?:`+[UC+BC+`?`,BC,WC,GC,zC].join(`|`)+`)`,QC=RegExp(VC+`(?=`+VC+`)|`+ZC+XC,`g`);function $C(e){for(var t=QC.lastIndex=0;QC.test(e);)++t;return t}function ew(e){return QS(e)?$C(e):FC(e)}function tw(e,t){return AC(e,t,function(t,n){return nc(e,n)})}var nw=XS(function(e,t){return e==null?{}:tw(e,t)}),rw=Math.ceil,iw=Math.max;function aw(e,t,n,r){for(var i=-1,a=iw(rw((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}function ow(e){return function(t,n,r){return r&&typeof r!=`number`&&px(t,n,r)&&(n=r=void 0),t=JS(t),n===void 0?(n=t,t=0):n=JS(n),r=r===void 0?t<n?1:-1:JS(r),aw(t,n,r,e)}}var sw=ow(),cw=`[object Map]`,lw=`[object Set]`;function uw(e){if(e==null)return 0;if(Yo(e))return SC(e)?ew(e):e.length;var t=_s(e);return t==cw||t==lw?e.size:Jo(e).length}var dw=fx(function(e,t){if(e==null)return[];var n=t.length;return n>1&&px(e,t[0],t[1])?t=[]:n>2&&px(t[0],t[1],t[2])&&(t=[t[0]]),PC(e,Tc(t,1),[])}),fw=fx(function(e){return Ic(Tc(e,1,Lb,!0))}),pw=0;function mw(e){var t=++pw;return Js(e)+t}function hw(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:void 0;n(o,e[r],s)}return o}function gw(e,t){return hw(e||[],t||[],qb)}function _w(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function vw(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function yw(e,t){let n=0;if(t===void 0)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function bw(e){return e.target.depth}function xw(e){return e.depth}function Sw(e,t){return t-1-e.height}function Cw(e,t){return e.sourceLinks.length?e.depth:t-1}function ww(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?vw(e.sourceLinks,bw)-1:0}function Tw(e){return function(){return e}}function Ew(e,t){return Ow(e.source,t.source)||e.index-t.index}function Dw(e,t){return Ow(e.target,t.target)||e.index-t.index}function Ow(e,t){return e.y0-t.y0}function kw(e){return e.value}function Aw(e){return e.index}function jw(e){return e.nodes}function Mw(e){return e.links}function Nw(e,t){let n=e.get(t);if(!n)throw Error(`missing: `+t);return n}function Pw({nodes:e}){for(let t of e){let e=t.y0,n=e;for(let n of t.sourceLinks)n.y0=e+n.width/2,e+=n.width;for(let e of t.targetLinks)e.y1=n+e.width/2,n+=e.width}}function Fw(){let e=0,t=0,n=1,r=1,i=24,a=8,o,s=Aw,c=Cw,l,u,d=jw,f=Mw,p=6;function m(){let e={nodes:d.apply(null,arguments),links:f.apply(null,arguments)};return h(e),g(e),_(e),v(e),x(e),Pw(e),e}m.update=function(e){return Pw(e),e},m.nodeId=function(e){return arguments.length?(s=typeof e==`function`?e:Tw(e),m):s},m.nodeAlign=function(e){return arguments.length?(c=typeof e==`function`?e:Tw(e),m):c},m.nodeSort=function(e){return arguments.length?(l=e,m):l},m.nodeWidth=function(e){return arguments.length?(i=+e,m):i},m.nodePadding=function(e){return arguments.length?(a=o=+e,m):a},m.nodes=function(e){return arguments.length?(d=typeof e==`function`?e:Tw(e),m):d},m.links=function(e){return arguments.length?(f=typeof e==`function`?e:Tw(e),m):f},m.linkSort=function(e){return arguments.length?(u=e,m):u},m.size=function(i){return arguments.length?(e=t=0,n=+i[0],r=+i[1],m):[n-e,r-t]},m.extent=function(i){return arguments.length?(e=+i[0][0],n=+i[1][0],t=+i[0][1],r=+i[1][1],m):[[e,t],[n,r]]},m.iterations=function(e){return arguments.length?(p=+e,m):p};function h({nodes:e,links:t}){for(let[t,n]of e.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];let n=new Map(e.map((t,n)=>[s(t,n,e),t]));for(let[e,r]of t.entries()){r.index=e;let{source:t,target:i}=r;typeof t!=`object`&&(t=r.source=Nw(n,t)),typeof i!=`object`&&(i=r.target=Nw(n,i)),t.sourceLinks.push(r),i.targetLinks.push(r)}if(u!=null)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(u),n.sort(u)}function g({nodes:e}){for(let t of e)t.value=t.fixedValue===void 0?Math.max(yw(t.sourceLinks,kw),yw(t.targetLinks,kw)):t.fixedValue}function _({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.depth=i;for(let{target:t}of e.sourceLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function v({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.height=i;for(let{source:t}of e.targetLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function y({nodes:t}){let r=_w(t,e=>e.depth)+1,a=(n-e-i)/(r-1),o=Array(r);for(let n of t){let t=Math.max(0,Math.min(r-1,Math.floor(c.call(null,n,r))));n.layer=t,n.x0=e+t*a,n.x1=n.x0+i,o[t]?o[t].push(n):o[t]=[n]}if(l)for(let e of o)e.sort(l);return o}function b(e){let n=vw(e,e=>(r-t-(e.length-1)*o)/yw(e,kw));for(let i of e){let e=t;for(let t of i){t.y0=e,t.y1=e+t.value*n,e=t.y1+o;for(let e of t.sourceLinks)e.width=e.value*n}e=(r-e+o)/(i.length+1);for(let t=0;t<i.length;++t){let n=i[t];n.y0+=e*(t+1),n.y1+=e*(t+1)}O(i)}}function x(e){let n=y(e);o=Math.min(a,(r-t)/(_w(n,e=>e.length)-1)),b(n);for(let e=0;e<p;++e){let t=.99**e,r=Math.max(1-t,(e+1)/p);C(n,t,r),S(n,t,r)}}function S(e,t,n){for(let r=1,i=e.length;r<i;++r){let i=e[r];for(let e of i){let n=0,r=0;for(let{source:t,value:i}of e.targetLinks){let a=i*(e.layer-t.layer);n+=k(t,e)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,D(e)}l===void 0&&i.sort(Ow),w(i,n)}}function C(e,t,n){for(let r=e.length-2;r>=0;--r){let i=e[r];for(let e of i){let n=0,r=0;for(let{target:t,value:i}of e.sourceLinks){let a=i*(t.layer-e.layer);n+=A(e,t)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,D(e)}l===void 0&&i.sort(Ow),w(i,n)}}function w(e,n){let i=e.length>>1,a=e[i];E(e,a.y0-o,i-1,n),T(e,a.y1+o,i+1,n),E(e,r,e.length-1,n),T(e,t,0,n)}function T(e,t,n,r){for(;n<e.length;++n){let i=e[n],a=(t-i.y0)*r;a>1e-6&&(i.y0+=a,i.y1+=a),t=i.y1+o}}function E(e,t,n,r){for(;n>=0;--n){let i=e[n],a=(i.y1-t)*r;a>1e-6&&(i.y0-=a,i.y1-=a),t=i.y0-o}}function D({sourceLinks:e,targetLinks:t}){if(u===void 0){for(let{source:{sourceLinks:e}}of t)e.sort(Dw);for(let{target:{targetLinks:t}}of e)t.sort(Ew)}}function O(e){if(u===void 0)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(Dw),n.sort(Ew)}function k(e,t){let n=e.y0-(e.sourceLinks.length-1)*o/2;for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n+=i+o}for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n-=i}return n}function A(e,t){let n=t.y0-(t.targetLinks.length-1)*o/2;for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n+=i+o}for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n-=i}return n}return m}var Iw=Math.PI,Lw=2*Iw,Rw=1e-6,zw=Lw-Rw;function Bw(){this._x0=this._y0=this._x1=this._y1=null,this._=``}function Vw(){return new Bw}Bw.prototype=Vw.prototype={constructor:Bw,moveTo:function(e,t){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+=`Z`)},lineTo:function(e,t){this._+=`L`+(this._x1=+e)+`,`+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+=`Q`+ +e+`,`+ +t+`,`+(this._x1=+n)+`,`+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+=`C`+ +e+`,`+ +t+`,`+ +n+`,`+ +r+`,`+(this._x1=+i)+`,`+(this._y1=+a)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(i<0)throw Error(`negative radius: `+i);if(this._x1===null)this._+=`M`+(this._x1=e)+`,`+(this._y1=t);else if(d>Rw)if(!(Math.abs(u*s-c*l)>Rw)||!i)this._+=`L`+(this._x1=e)+`,`+(this._y1=t);else{var f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Iw-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Rw&&(this._+=`L`+(e+y*l)+`,`+(t+y*u)),this._+=`A`+i+`,`+i+`,0,0,`+ +(u*f>l*p)+`,`+(this._x1=e+b*s)+`,`+(this._y1=t+b*c)}},arc:function(e,t,n,r,i,a){e=+e,t=+t,n=+n,a=!!a;var o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;if(n<0)throw Error(`negative radius: `+n);this._x1===null?this._+=`M`+c+`,`+l:(Math.abs(this._x1-c)>Rw||Math.abs(this._y1-l)>Rw)&&(this._+=`L`+c+`,`+l),n&&(d<0&&(d=d%Lw+Lw),d>zw?this._+=`A`+n+`,`+n+`,0,1,`+u+`,`+(e-o)+`,`+(t-s)+`A`+n+`,`+n+`,0,1,`+u+`,`+(this._x1=c)+`,`+(this._y1=l):d>Rw&&(this._+=`A`+n+`,`+n+`,0,`+ +(d>=Iw)+`,`+u+`,`+(this._x1=e+n*Math.cos(i))+`,`+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)+`h`+ +n+`v`+ +r+`h`+-n+`Z`},toString:function(){return this._}};function Hw(e){return function(){return e}}function Uw(e){return e[0]}function Ww(e){return e[1]}var Gw=Array.prototype.slice;function Kw(e){return e.source}function qw(e){return e.target}function Jw(e){var t=Kw,n=qw,r=Uw,i=Ww,a=null;function o(){var o,s=Gw.call(arguments),c=t.apply(this,s),l=n.apply(this,s);if(a||=o=Vw(),e(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=l,s)),+i.apply(this,s)),o)return a=null,o+``||null}return o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(e){return arguments.length?(n=e,o):n},o.x=function(e){return arguments.length?(r=typeof e==`function`?e:Hw(+e),o):r},o.y=function(e){return arguments.length?(i=typeof e==`function`?e:Hw(+e),o):i},o.context=function(e){return arguments.length?(a=e??null,o):a},o}function Yw(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function Xw(){return Jw(Yw)}function Zw(e){return[e.source.x1,e.y0]}function Qw(e){return[e.target.x0,e.y1]}function $w(){return Xw().source(Zw).target(Qw)}export{vy as $,w as $t,ax as A,Vc as At,Xy as B,wi as Bt,uC as C,Pd as Ct,tC as D,ml as Dt,nC as E,hl as Et,ub as F,yc as Ft,Ry as G,zt as Gt,Gy as H,Wr as Ht,db as I,_c as It,ky as J,Rt as Jt,Iy as K,It as Kt,nb as L,Rs as Lt,_b as M,Lc as Mt,gb as N,Ec as Nt,FS as O,Jc as Ot,mb as P,Sc as Pt,xy as Q,x as Qt,eb as R,Xo as Rt,mC as S,_p as St,oC as T,kl as Tt,Uy as U,ar as Ut,qy as V,Hr as Vt,By as W,tn as Wt,Dy as X,xt as Xt,Ay as Y,z as Yt,wy as Z,k as Zt,TC as _,xg as _t,xw as a,p as an,n_ as at,gC as b,tg as bt,mw as c,a_ as ct,uw as d,Zg as dt,D as en,Qv as et,sw as f,Yg as ft,EC as g,Fg as gt,DC as h,zg as ht,Cw as i,A as in,o_ as it,vb as j,Rc as jt,hx as k,Gc as kt,fw as l,r_ as lt,OC as m,Kg as mt,Fw as n,E as nn,Gv as nt,Sw as o,f as on,s_ as ot,nw as p,qg as pt,Py as q,Ct as qt,ww as r,O as rn,g_ as rt,gw as s,t_ as st,$w as t,T as tn,Xv as tt,dw as u,i_ as ut,wC as v,bg as vt,lC as w,Al as wt,hC as x,Ph as xt,bC as y,_g as yt,Qy as z,U as zt};