@reqvire-org/reqvire 0.15.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (374) hide show
  1. package/artifacts/reqvire-darwin-arm64.tar.gz +0 -0
  2. package/artifacts/reqvire-darwin-x86_64.tar.gz +0 -0
  3. package/artifacts/reqvire-linux-x86_64.tar.gz +0 -0
  4. package/explorer-dist/assets/android-chrome-192x192.png +0 -0
  5. package/explorer-dist/assets/apple-touch-icon.png +0 -0
  6. package/explorer-dist/assets/browserconfig.xml +9 -0
  7. package/explorer-dist/assets/explorer-abap.js +1 -0
  8. package/explorer-dist/assets/explorer-actionscript-3.js +1 -0
  9. package/explorer-dist/assets/explorer-ada.js +1 -0
  10. package/explorer-dist/assets/explorer-andromeeda.js +1 -0
  11. package/explorer-dist/assets/explorer-angular-html.js +1 -0
  12. package/explorer-dist/assets/explorer-angular-ts.js +1 -0
  13. package/explorer-dist/assets/explorer-apache.js +1 -0
  14. package/explorer-dist/assets/explorer-apex.js +1 -0
  15. package/explorer-dist/assets/explorer-apl.js +1 -0
  16. package/explorer-dist/assets/explorer-applescript.js +1 -0
  17. package/explorer-dist/assets/explorer-ara.js +1 -0
  18. package/explorer-dist/assets/explorer-architectureDiagram-3BPJPVTR.js +36 -0
  19. package/explorer-dist/assets/explorer-asciidoc.js +1 -0
  20. package/explorer-dist/assets/explorer-asm.js +1 -0
  21. package/explorer-dist/assets/explorer-astro.js +1 -0
  22. package/explorer-dist/assets/explorer-aurora-x.js +1 -0
  23. package/explorer-dist/assets/explorer-awk.js +1 -0
  24. package/explorer-dist/assets/explorer-ayu-dark.js +1 -0
  25. package/explorer-dist/assets/explorer-ayu-light.js +1 -0
  26. package/explorer-dist/assets/explorer-ayu-mirage.js +1 -0
  27. package/explorer-dist/assets/explorer-ballerina.js +1 -0
  28. package/explorer-dist/assets/explorer-bat.js +1 -0
  29. package/explorer-dist/assets/explorer-beancount.js +1 -0
  30. package/explorer-dist/assets/explorer-berry.js +1 -0
  31. package/explorer-dist/assets/explorer-bibtex.js +1 -0
  32. package/explorer-dist/assets/explorer-bicep.js +1 -0
  33. package/explorer-dist/assets/explorer-bird2.js +1 -0
  34. package/explorer-dist/assets/explorer-blade.js +1 -0
  35. package/explorer-dist/assets/explorer-blockDiagram-GPEHLZMM.js +132 -0
  36. package/explorer-dist/assets/explorer-bsl.js +1 -0
  37. package/explorer-dist/assets/explorer-c.js +1 -0
  38. package/explorer-dist/assets/explorer-c3.js +1 -0
  39. package/explorer-dist/assets/explorer-c4Diagram-AAUBKEIU.js +10 -0
  40. package/explorer-dist/assets/explorer-cadence.js +1 -0
  41. package/explorer-dist/assets/explorer-cairo.js +1 -0
  42. package/explorer-dist/assets/explorer-catppuccin-frappe.js +1 -0
  43. package/explorer-dist/assets/explorer-catppuccin-latte.js +1 -0
  44. package/explorer-dist/assets/explorer-catppuccin-macchiato.js +1 -0
  45. package/explorer-dist/assets/explorer-catppuccin-mocha.js +1 -0
  46. package/explorer-dist/assets/explorer-channel.js +1 -0
  47. package/explorer-dist/assets/explorer-chunk-2J33WTMH.js +1 -0
  48. package/explorer-dist/assets/explorer-chunk-4BX2VUAB.js +1 -0
  49. package/explorer-dist/assets/explorer-chunk-55IACEB6.js +1 -0
  50. package/explorer-dist/assets/explorer-chunk-727SXJPM.js +206 -0
  51. package/explorer-dist/assets/explorer-chunk-AQP2D5EJ.js +231 -0
  52. package/explorer-dist/assets/explorer-chunk-FMBD7UC4.js +15 -0
  53. package/explorer-dist/assets/explorer-chunk-ND2GUHAM.js +1 -0
  54. package/explorer-dist/assets/explorer-chunk-QZHKN3VN.js +1 -0
  55. package/explorer-dist/assets/explorer-clarity.js +1 -0
  56. package/explorer-dist/assets/explorer-classDiagram-4FO5ZUOK.js +1 -0
  57. package/explorer-dist/assets/explorer-classDiagram-v2-Q7XG4LA2.js +1 -0
  58. package/explorer-dist/assets/explorer-clojure.js +1 -0
  59. package/explorer-dist/assets/explorer-cmake.js +1 -0
  60. package/explorer-dist/assets/explorer-cobol.js +1 -0
  61. package/explorer-dist/assets/explorer-codeowners.js +1 -0
  62. package/explorer-dist/assets/explorer-codeql.js +1 -0
  63. package/explorer-dist/assets/explorer-coffee.js +1 -0
  64. package/explorer-dist/assets/explorer-common-lisp.js +1 -0
  65. package/explorer-dist/assets/explorer-coq.js +1 -0
  66. package/explorer-dist/assets/explorer-cose-bilkent-S5V4N54A.js +1 -0
  67. package/explorer-dist/assets/explorer-cpp.js +1 -0
  68. package/explorer-dist/assets/explorer-crystal.js +1 -0
  69. package/explorer-dist/assets/explorer-csharp.js +1 -0
  70. package/explorer-dist/assets/explorer-css.js +1 -0
  71. package/explorer-dist/assets/explorer-csv.js +1 -0
  72. package/explorer-dist/assets/explorer-cue.js +1 -0
  73. package/explorer-dist/assets/explorer-cypher.js +1 -0
  74. package/explorer-dist/assets/explorer-cytoscape.esm.js +331 -0
  75. package/explorer-dist/assets/explorer-d.js +1 -0
  76. package/explorer-dist/assets/explorer-dagre-BM42HDAG.js +4 -0
  77. package/explorer-dist/assets/explorer-dark-plus.js +1 -0
  78. package/explorer-dist/assets/explorer-dart.js +1 -0
  79. package/explorer-dist/assets/explorer-dax.js +1 -0
  80. package/explorer-dist/assets/explorer-defaultLocale.js +1 -0
  81. package/explorer-dist/assets/explorer-desktop.js +1 -0
  82. package/explorer-dist/assets/explorer-diagram-2AECGRRQ.js +43 -0
  83. package/explorer-dist/assets/explorer-diagram-5GNKFQAL.js +10 -0
  84. package/explorer-dist/assets/explorer-diagram-KO2AKTUF.js +3 -0
  85. package/explorer-dist/assets/explorer-diagram-LMA3HP47.js +24 -0
  86. package/explorer-dist/assets/explorer-diagram-OG6HWLK6.js +24 -0
  87. package/explorer-dist/assets/explorer-diff.js +1 -0
  88. package/explorer-dist/assets/explorer-docker.js +1 -0
  89. package/explorer-dist/assets/explorer-dotenv.js +1 -0
  90. package/explorer-dist/assets/explorer-dracula-soft.js +1 -0
  91. package/explorer-dist/assets/explorer-dracula.js +1 -0
  92. package/explorer-dist/assets/explorer-dream-maker.js +1 -0
  93. package/explorer-dist/assets/explorer-edge.js +1 -0
  94. package/explorer-dist/assets/explorer-elixir.js +1 -0
  95. package/explorer-dist/assets/explorer-elm.js +1 -0
  96. package/explorer-dist/assets/explorer-emacs-lisp.js +1 -0
  97. package/explorer-dist/assets/explorer-erDiagram-TEJ5UH35.js +85 -0
  98. package/explorer-dist/assets/explorer-erb.js +1 -0
  99. package/explorer-dist/assets/explorer-erlang.js +1 -0
  100. package/explorer-dist/assets/explorer-everforest-dark.js +1 -0
  101. package/explorer-dist/assets/explorer-everforest-light.js +1 -0
  102. package/explorer-dist/assets/explorer-fennel.js +1 -0
  103. package/explorer-dist/assets/explorer-fish.js +1 -0
  104. package/explorer-dist/assets/explorer-flowDiagram-I6XJVG4X.js +162 -0
  105. package/explorer-dist/assets/explorer-fluent.js +1 -0
  106. package/explorer-dist/assets/explorer-fortran-fixed-form.js +1 -0
  107. package/explorer-dist/assets/explorer-fortran-free-form.js +1 -0
  108. package/explorer-dist/assets/explorer-fsharp.js +1 -0
  109. package/explorer-dist/assets/explorer-ganttDiagram-6RSMTGT7.js +292 -0
  110. package/explorer-dist/assets/explorer-gdresource.js +1 -0
  111. package/explorer-dist/assets/explorer-gdscript.js +1 -0
  112. package/explorer-dist/assets/explorer-gdshader.js +1 -0
  113. package/explorer-dist/assets/explorer-genie.js +1 -0
  114. package/explorer-dist/assets/explorer-gherkin.js +1 -0
  115. package/explorer-dist/assets/explorer-git-commit.js +1 -0
  116. package/explorer-dist/assets/explorer-git-rebase.js +1 -0
  117. package/explorer-dist/assets/explorer-gitGraphDiagram-PVQCEYII.js +106 -0
  118. package/explorer-dist/assets/explorer-github-dark-default.js +1 -0
  119. package/explorer-dist/assets/explorer-github-dark-dimmed.js +1 -0
  120. package/explorer-dist/assets/explorer-github-dark-high-contrast.js +1 -0
  121. package/explorer-dist/assets/explorer-github-dark.js +1 -0
  122. package/explorer-dist/assets/explorer-github-light-default.js +1 -0
  123. package/explorer-dist/assets/explorer-github-light-high-contrast.js +1 -0
  124. package/explorer-dist/assets/explorer-github-light.js +1 -0
  125. package/explorer-dist/assets/explorer-gleam.js +1 -0
  126. package/explorer-dist/assets/explorer-glimmer-js.js +1 -0
  127. package/explorer-dist/assets/explorer-glimmer-ts.js +1 -0
  128. package/explorer-dist/assets/explorer-glsl.js +1 -0
  129. package/explorer-dist/assets/explorer-gn.js +1 -0
  130. package/explorer-dist/assets/explorer-gnuplot.js +1 -0
  131. package/explorer-dist/assets/explorer-go.js +1 -0
  132. package/explorer-dist/assets/explorer-graph.js +1 -0
  133. package/explorer-dist/assets/explorer-graphql.js +1 -0
  134. package/explorer-dist/assets/explorer-groovy.js +1 -0
  135. package/explorer-dist/assets/explorer-gruvbox-dark-hard.js +1 -0
  136. package/explorer-dist/assets/explorer-gruvbox-dark-medium.js +1 -0
  137. package/explorer-dist/assets/explorer-gruvbox-dark-soft.js +1 -0
  138. package/explorer-dist/assets/explorer-gruvbox-light-hard.js +1 -0
  139. package/explorer-dist/assets/explorer-gruvbox-light-medium.js +1 -0
  140. package/explorer-dist/assets/explorer-gruvbox-light-soft.js +1 -0
  141. package/explorer-dist/assets/explorer-hack.js +1 -0
  142. package/explorer-dist/assets/explorer-haml.js +1 -0
  143. package/explorer-dist/assets/explorer-handlebars.js +1 -0
  144. package/explorer-dist/assets/explorer-haskell.js +1 -0
  145. package/explorer-dist/assets/explorer-haxe.js +1 -0
  146. package/explorer-dist/assets/explorer-hcl.js +1 -0
  147. package/explorer-dist/assets/explorer-hjson.js +1 -0
  148. package/explorer-dist/assets/explorer-hlsl.js +1 -0
  149. package/explorer-dist/assets/explorer-horizon-bright.js +1 -0
  150. package/explorer-dist/assets/explorer-horizon.js +1 -0
  151. package/explorer-dist/assets/explorer-houston.js +1 -0
  152. package/explorer-dist/assets/explorer-html-derivative.js +1 -0
  153. package/explorer-dist/assets/explorer-html.js +1 -0
  154. package/explorer-dist/assets/explorer-http.js +1 -0
  155. package/explorer-dist/assets/explorer-hurl.js +1 -0
  156. package/explorer-dist/assets/explorer-hxml.js +1 -0
  157. package/explorer-dist/assets/explorer-hy.js +1 -0
  158. package/explorer-dist/assets/explorer-imba.js +1 -0
  159. package/explorer-dist/assets/explorer-infoDiagram-5YYISTIA.js +2 -0
  160. package/explorer-dist/assets/explorer-ini.js +1 -0
  161. package/explorer-dist/assets/explorer-ishikawaDiagram-YF4QCWOH.js +70 -0
  162. package/explorer-dist/assets/explorer-java.js +1 -0
  163. package/explorer-dist/assets/explorer-javascript.js +1 -0
  164. package/explorer-dist/assets/explorer-jinja.js +1 -0
  165. package/explorer-dist/assets/explorer-jison.js +1 -0
  166. package/explorer-dist/assets/explorer-journeyDiagram-JHISSGLW.js +139 -0
  167. package/explorer-dist/assets/explorer-json.js +1 -0
  168. package/explorer-dist/assets/explorer-json5.js +1 -0
  169. package/explorer-dist/assets/explorer-jsonc.js +1 -0
  170. package/explorer-dist/assets/explorer-jsonl.js +1 -0
  171. package/explorer-dist/assets/explorer-jsonnet.js +1 -0
  172. package/explorer-dist/assets/explorer-jssm.js +1 -0
  173. package/explorer-dist/assets/explorer-jsx.js +1 -0
  174. package/explorer-dist/assets/explorer-julia.js +1 -0
  175. package/explorer-dist/assets/explorer-just.js +1 -0
  176. package/explorer-dist/assets/explorer-kanagawa-dragon.js +1 -0
  177. package/explorer-dist/assets/explorer-kanagawa-lotus.js +1 -0
  178. package/explorer-dist/assets/explorer-kanagawa-wave.js +1 -0
  179. package/explorer-dist/assets/explorer-kanban-definition-UN3LZRKU.js +89 -0
  180. package/explorer-dist/assets/explorer-katex.js +257 -0
  181. package/explorer-dist/assets/explorer-kdl.js +1 -0
  182. package/explorer-dist/assets/explorer-kotlin.js +1 -0
  183. package/explorer-dist/assets/explorer-kusto.js +1 -0
  184. package/explorer-dist/assets/explorer-laserwave.js +1 -0
  185. package/explorer-dist/assets/explorer-latex.js +1 -0
  186. package/explorer-dist/assets/explorer-layout.js +1 -0
  187. package/explorer-dist/assets/explorer-lean.js +1 -0
  188. package/explorer-dist/assets/explorer-less.js +1 -0
  189. package/explorer-dist/assets/explorer-light-plus.js +1 -0
  190. package/explorer-dist/assets/explorer-linear.js +1 -0
  191. package/explorer-dist/assets/explorer-liquid.js +1 -0
  192. package/explorer-dist/assets/explorer-llvm.js +1 -0
  193. package/explorer-dist/assets/explorer-log.js +1 -0
  194. package/explorer-dist/assets/explorer-logo.js +1 -0
  195. package/explorer-dist/assets/explorer-lua.js +1 -0
  196. package/explorer-dist/assets/explorer-luau.js +1 -0
  197. package/explorer-dist/assets/explorer-make.js +1 -0
  198. package/explorer-dist/assets/explorer-markdown.js +1 -0
  199. package/explorer-dist/assets/explorer-marko.js +1 -0
  200. package/explorer-dist/assets/explorer-material-theme-darker.js +1 -0
  201. package/explorer-dist/assets/explorer-material-theme-lighter.js +1 -0
  202. package/explorer-dist/assets/explorer-material-theme-ocean.js +1 -0
  203. package/explorer-dist/assets/explorer-material-theme-palenight.js +1 -0
  204. package/explorer-dist/assets/explorer-material-theme.js +1 -0
  205. package/explorer-dist/assets/explorer-matlab.js +1 -0
  206. package/explorer-dist/assets/explorer-mdc.js +1 -0
  207. package/explorer-dist/assets/explorer-mdx.js +1 -0
  208. package/explorer-dist/assets/explorer-mermaid.core.js +309 -0
  209. package/explorer-dist/assets/explorer-mermaid.js +1 -0
  210. package/explorer-dist/assets/explorer-min-dark.js +1 -0
  211. package/explorer-dist/assets/explorer-min-light.js +1 -0
  212. package/explorer-dist/assets/explorer-mindmap-definition-RKZ34NQL.js +96 -0
  213. package/explorer-dist/assets/explorer-mipsasm.js +1 -0
  214. package/explorer-dist/assets/explorer-mojo.js +1 -0
  215. package/explorer-dist/assets/explorer-monokai.js +1 -0
  216. package/explorer-dist/assets/explorer-moonbit.js +1 -0
  217. package/explorer-dist/assets/explorer-move.js +1 -0
  218. package/explorer-dist/assets/explorer-narrat.js +1 -0
  219. package/explorer-dist/assets/explorer-nextflow-groovy.js +1 -0
  220. package/explorer-dist/assets/explorer-nextflow.js +1 -0
  221. package/explorer-dist/assets/explorer-nginx.js +1 -0
  222. package/explorer-dist/assets/explorer-night-owl-light.js +1 -0
  223. package/explorer-dist/assets/explorer-night-owl.js +1 -0
  224. package/explorer-dist/assets/explorer-nim.js +1 -0
  225. package/explorer-dist/assets/explorer-nix.js +1 -0
  226. package/explorer-dist/assets/explorer-nord.js +1 -0
  227. package/explorer-dist/assets/explorer-nushell.js +1 -0
  228. package/explorer-dist/assets/explorer-objective-c.js +1 -0
  229. package/explorer-dist/assets/explorer-objective-cpp.js +1 -0
  230. package/explorer-dist/assets/explorer-ocaml.js +1 -0
  231. package/explorer-dist/assets/explorer-odin.js +1 -0
  232. package/explorer-dist/assets/explorer-one-dark-pro.js +1 -0
  233. package/explorer-dist/assets/explorer-one-light.js +1 -0
  234. package/explorer-dist/assets/explorer-openscad.js +1 -0
  235. package/explorer-dist/assets/explorer-pascal.js +1 -0
  236. package/explorer-dist/assets/explorer-perl.js +1 -0
  237. package/explorer-dist/assets/explorer-php.js +1 -0
  238. package/explorer-dist/assets/explorer-pieDiagram-4H26LBE5.js +30 -0
  239. package/explorer-dist/assets/explorer-pkl.js +1 -0
  240. package/explorer-dist/assets/explorer-plastic.js +1 -0
  241. package/explorer-dist/assets/explorer-plsql.js +1 -0
  242. package/explorer-dist/assets/explorer-po.js +1 -0
  243. package/explorer-dist/assets/explorer-poimandres.js +1 -0
  244. package/explorer-dist/assets/explorer-polar.js +1 -0
  245. package/explorer-dist/assets/explorer-postcss.js +1 -0
  246. package/explorer-dist/assets/explorer-powerquery.js +1 -0
  247. package/explorer-dist/assets/explorer-powershell.js +1 -0
  248. package/explorer-dist/assets/explorer-prisma.js +1 -0
  249. package/explorer-dist/assets/explorer-prolog.js +1 -0
  250. package/explorer-dist/assets/explorer-proto.js +1 -0
  251. package/explorer-dist/assets/explorer-pug.js +1 -0
  252. package/explorer-dist/assets/explorer-puppet.js +1 -0
  253. package/explorer-dist/assets/explorer-purescript.js +1 -0
  254. package/explorer-dist/assets/explorer-python.js +1 -0
  255. package/explorer-dist/assets/explorer-qml.js +1 -0
  256. package/explorer-dist/assets/explorer-qmldir.js +1 -0
  257. package/explorer-dist/assets/explorer-qss.js +1 -0
  258. package/explorer-dist/assets/explorer-quadrantDiagram-W4KKPZXB.js +7 -0
  259. package/explorer-dist/assets/explorer-r.js +1 -0
  260. package/explorer-dist/assets/explorer-racket.js +1 -0
  261. package/explorer-dist/assets/explorer-raku.js +1 -0
  262. package/explorer-dist/assets/explorer-razor.js +1 -0
  263. package/explorer-dist/assets/explorer-red.js +1 -0
  264. package/explorer-dist/assets/explorer-reg.js +1 -0
  265. package/explorer-dist/assets/explorer-regexp.js +1 -0
  266. package/explorer-dist/assets/explorer-rel.js +1 -0
  267. package/explorer-dist/assets/explorer-requirementDiagram-4Y6WPE33.js +84 -0
  268. package/explorer-dist/assets/explorer-riscv.js +1 -0
  269. package/explorer-dist/assets/explorer-ron.js +1 -0
  270. package/explorer-dist/assets/explorer-rose-pine-dawn.js +1 -0
  271. package/explorer-dist/assets/explorer-rose-pine-moon.js +1 -0
  272. package/explorer-dist/assets/explorer-rose-pine.js +1 -0
  273. package/explorer-dist/assets/explorer-rosmsg.js +1 -0
  274. package/explorer-dist/assets/explorer-rst.js +1 -0
  275. package/explorer-dist/assets/explorer-ruby.js +1 -0
  276. package/explorer-dist/assets/explorer-rust.js +1 -0
  277. package/explorer-dist/assets/explorer-sankeyDiagram-5OEKKPKP.js +40 -0
  278. package/explorer-dist/assets/explorer-sas.js +1 -0
  279. package/explorer-dist/assets/explorer-sass.js +1 -0
  280. package/explorer-dist/assets/explorer-scala.js +1 -0
  281. package/explorer-dist/assets/explorer-scheme.js +1 -0
  282. package/explorer-dist/assets/explorer-scss.js +1 -0
  283. package/explorer-dist/assets/explorer-sdbl.js +1 -0
  284. package/explorer-dist/assets/explorer-sequenceDiagram-3UESZ5HK.js +162 -0
  285. package/explorer-dist/assets/explorer-shaderlab.js +1 -0
  286. package/explorer-dist/assets/explorer-shellscript.js +1 -0
  287. package/explorer-dist/assets/explorer-shellsession.js +1 -0
  288. package/explorer-dist/assets/explorer-slack-dark.js +1 -0
  289. package/explorer-dist/assets/explorer-slack-ochin.js +1 -0
  290. package/explorer-dist/assets/explorer-smalltalk.js +1 -0
  291. package/explorer-dist/assets/explorer-snazzy-light.js +1 -0
  292. package/explorer-dist/assets/explorer-solarized-dark.js +1 -0
  293. package/explorer-dist/assets/explorer-solarized-light.js +1 -0
  294. package/explorer-dist/assets/explorer-solidity.js +1 -0
  295. package/explorer-dist/assets/explorer-soy.js +1 -0
  296. package/explorer-dist/assets/explorer-sparql.js +1 -0
  297. package/explorer-dist/assets/explorer-splunk.js +1 -0
  298. package/explorer-dist/assets/explorer-sql.js +1 -0
  299. package/explorer-dist/assets/explorer-ssh-config.js +1 -0
  300. package/explorer-dist/assets/explorer-stata.js +1 -0
  301. package/explorer-dist/assets/explorer-stateDiagram-AJRCARHV.js +1 -0
  302. package/explorer-dist/assets/explorer-stateDiagram-v2-BHNVJYJU.js +1 -0
  303. package/explorer-dist/assets/explorer-stylus.js +1 -0
  304. package/explorer-dist/assets/explorer-surrealql.js +1 -0
  305. package/explorer-dist/assets/explorer-svelte.js +1 -0
  306. package/explorer-dist/assets/explorer-swift.js +1 -0
  307. package/explorer-dist/assets/explorer-synthwave-84.js +1 -0
  308. package/explorer-dist/assets/explorer-system-verilog.js +1 -0
  309. package/explorer-dist/assets/explorer-systemd.js +1 -0
  310. package/explorer-dist/assets/explorer-talonscript.js +1 -0
  311. package/explorer-dist/assets/explorer-tasl.js +1 -0
  312. package/explorer-dist/assets/explorer-tcl.js +1 -0
  313. package/explorer-dist/assets/explorer-templ.js +1 -0
  314. package/explorer-dist/assets/explorer-terraform.js +1 -0
  315. package/explorer-dist/assets/explorer-tex.js +1 -0
  316. package/explorer-dist/assets/explorer-timeline-definition-PNZ67QCA.js +120 -0
  317. package/explorer-dist/assets/explorer-tokyo-night.js +1 -0
  318. package/explorer-dist/assets/explorer-toml.js +1 -0
  319. package/explorer-dist/assets/explorer-ts-tags.js +1 -0
  320. package/explorer-dist/assets/explorer-tsv.js +1 -0
  321. package/explorer-dist/assets/explorer-tsx.js +1 -0
  322. package/explorer-dist/assets/explorer-turtle.js +1 -0
  323. package/explorer-dist/assets/explorer-twig.js +1 -0
  324. package/explorer-dist/assets/explorer-typescript.js +1 -0
  325. package/explorer-dist/assets/explorer-typespec.js +1 -0
  326. package/explorer-dist/assets/explorer-typst.js +1 -0
  327. package/explorer-dist/assets/explorer-v.js +1 -0
  328. package/explorer-dist/assets/explorer-vala.js +1 -0
  329. package/explorer-dist/assets/explorer-vb.js +1 -0
  330. package/explorer-dist/assets/explorer-vennDiagram-CIIHVFJN.js +34 -0
  331. package/explorer-dist/assets/explorer-verilog.js +1 -0
  332. package/explorer-dist/assets/explorer-vesper.js +1 -0
  333. package/explorer-dist/assets/explorer-vhdl.js +1 -0
  334. package/explorer-dist/assets/explorer-viml.js +1 -0
  335. package/explorer-dist/assets/explorer-vitesse-black.js +1 -0
  336. package/explorer-dist/assets/explorer-vitesse-dark.js +1 -0
  337. package/explorer-dist/assets/explorer-vitesse-light.js +1 -0
  338. package/explorer-dist/assets/explorer-vue-html.js +1 -0
  339. package/explorer-dist/assets/explorer-vue-vine.js +1 -0
  340. package/explorer-dist/assets/explorer-vue.js +1 -0
  341. package/explorer-dist/assets/explorer-vyper.js +1 -0
  342. package/explorer-dist/assets/explorer-wardley-L42UT6IY.js +173 -0
  343. package/explorer-dist/assets/explorer-wardleyDiagram-YWT4CUSO.js +78 -0
  344. package/explorer-dist/assets/explorer-wasm.js +1 -0
  345. package/explorer-dist/assets/explorer-wasm2.js +1 -0
  346. package/explorer-dist/assets/explorer-wenyan.js +1 -0
  347. package/explorer-dist/assets/explorer-wgsl.js +1 -0
  348. package/explorer-dist/assets/explorer-wikitext.js +1 -0
  349. package/explorer-dist/assets/explorer-wit.js +1 -0
  350. package/explorer-dist/assets/explorer-wolfram.js +1 -0
  351. package/explorer-dist/assets/explorer-xml.js +1 -0
  352. package/explorer-dist/assets/explorer-xsl.js +1 -0
  353. package/explorer-dist/assets/explorer-xychartDiagram-2RQKCTM6.js +7 -0
  354. package/explorer-dist/assets/explorer-yaml.js +1 -0
  355. package/explorer-dist/assets/explorer-zenscript.js +1 -0
  356. package/explorer-dist/assets/explorer-zig.js +1 -0
  357. package/explorer-dist/assets/explorer.css +1 -0
  358. package/explorer-dist/assets/explorer.js +1180 -0
  359. package/explorer-dist/assets/favicon-16x16.png +0 -0
  360. package/explorer-dist/assets/favicon-32x32.png +0 -0
  361. package/explorer-dist/assets/favicon.ico +0 -0
  362. package/explorer-dist/assets/fonts/Geist-Variable.woff2 +0 -0
  363. package/explorer-dist/assets/fonts/GeistMono-Variable.woff2 +0 -0
  364. package/explorer-dist/assets/icon-192.png +0 -0
  365. package/explorer-dist/assets/icon-512.png +0 -0
  366. package/explorer-dist/assets/logo-mark.svg +28 -0
  367. package/explorer-dist/assets/logo.png +0 -0
  368. package/explorer-dist/assets/mstile-150x150.png +0 -0
  369. package/explorer-dist/assets/searchIndex.worker-BWOUMmPT.js +1 -0
  370. package/explorer-dist/assets/site.webmanifest +22 -0
  371. package/explorer-dist/fonts/Geist-Variable.woff2 +0 -0
  372. package/explorer-dist/fonts/GeistMono-Variable.woff2 +0 -0
  373. package/explorer-dist/index.html +47 -0
  374. package/package.json +7 -2
@@ -0,0 +1,1180 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./explorer-angular-html.js","./explorer-html.js","./explorer-javascript.js","./explorer-css.js","./explorer-angular-ts.js","./explorer-scss.js","./explorer-apl.js","./explorer-xml.js","./explorer-java.js","./explorer-json.js","./explorer-astro.js","./explorer-typescript.js","./explorer-postcss.js","./explorer-tsx.js","./explorer-blade.js","./explorer-html-derivative.js","./explorer-sql.js","./explorer-bsl.js","./explorer-sdbl.js","./explorer-cairo.js","./explorer-python.js","./explorer-cobol.js","./explorer-coffee.js","./explorer-cpp.js","./explorer-regexp.js","./explorer-glsl.js","./explorer-c.js","./explorer-crystal.js","./explorer-shellscript.js","./explorer-edge.js","./explorer-elixir.js","./explorer-elm.js","./explorer-erb.js","./explorer-ruby.js","./explorer-haml.js","./explorer-graphql.js","./explorer-jsx.js","./explorer-lua.js","./explorer-yaml.js","./explorer-erlang.js","./explorer-markdown.js","./explorer-fortran-fixed-form.js","./explorer-fortran-free-form.js","./explorer-fsharp.js","./explorer-gdresource.js","./explorer-gdshader.js","./explorer-gdscript.js","./explorer-git-commit.js","./explorer-diff.js","./explorer-git-rebase.js","./explorer-glimmer-js.js","./explorer-glimmer-ts.js","./explorer-hack.js","./explorer-handlebars.js","./explorer-http.js","./explorer-hurl.js","./explorer-csv.js","./explorer-hxml.js","./explorer-haxe.js","./explorer-jinja.js","./explorer-jison.js","./explorer-julia.js","./explorer-r.js","./explorer-just.js","./explorer-perl.js","./explorer-latex.js","./explorer-tex.js","./explorer-liquid.js","./explorer-marko.js","./explorer-less.js","./explorer-mdc.js","./explorer-nextflow.js","./explorer-nextflow-groovy.js","./explorer-nginx.js","./explorer-nim.js","./explorer-php.js","./explorer-pug.js","./explorer-qml.js","./explorer-razor.js","./explorer-csharp.js","./explorer-rst.js","./explorer-cmake.js","./explorer-sas.js","./explorer-shaderlab.js","./explorer-hlsl.js","./explorer-shellsession.js","./explorer-soy.js","./explorer-sparql.js","./explorer-turtle.js","./explorer-stata.js","./explorer-surrealql.js","./explorer-svelte.js","./explorer-templ.js","./explorer-go.js","./explorer-ts-tags.js","./explorer-twig.js","./explorer-vue.js","./explorer-vue-html.js","./explorer-vue-vine.js","./explorer-stylus.js","./explorer-xsl.js"])))=>i.map(i=>d[i]);
2
+ var c3=Object.defineProperty;var f3=Object.getPrototypeOf;var d3=Reflect.get;var Tk=e=>{throw TypeError(e)};var h3=(e,t,n)=>t in e?c3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var be=(e,t,n)=>h3(e,typeof t!="symbol"?t+"":t,n),xg=(e,t,n)=>t.has(e)||Tk("Cannot "+n);var Vn=(e,t,n)=>(xg(e,t,"read from private field"),n?n.call(e):t.get(e)),ss=(e,t,n)=>t.has(e)?Tk("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Jr=(e,t,n,r)=>(xg(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),wg=(e,t,n)=>(xg(e,t,"access private method"),n);var jk=(e,t,n)=>d3(f3(e),n,t);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function Ea(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kg={exports:{}},fc={};/**
3
+ * @license React
4
+ * react-jsx-runtime.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var Ak;function m3(){if(Ak)return fc;Ak=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var s=null;if(o!==void 0&&(s=""+o),i.key!==void 0&&(s=""+i.key),"key"in i){o={};for(var u in i)u!=="key"&&(o[u]=i[u])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:s,ref:i!==void 0?i:null,props:o}}return fc.Fragment=t,fc.jsx=n,fc.jsxs=n,fc}var Rk;function p3(){return Rk||(Rk=1,kg.exports=m3()),kg.exports}var y=p3(),Eg={exports:{}},Ze={};/**
11
+ * @license React
12
+ * react.production.js
13
+ *
14
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var Nk;function _3(){if(Nk)return Ze;Nk=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),_=Symbol.iterator;function g(B){return B===null||typeof B!="object"?null:(B=_&&B[_]||B["@@iterator"],typeof B=="function"?B:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,C={};function w(B,ee,O){this.props=B,this.context=ee,this.refs=C,this.updater=O||b}w.prototype.isReactComponent={},w.prototype.setState=function(B,ee){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,ee,"setState")},w.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function T(){}T.prototype=w.prototype;function k(B,ee,O){this.props=B,this.context=ee,this.refs=C,this.updater=O||b}var S=k.prototype=new T;S.constructor=k,E(S,w.prototype),S.isPureReactComponent=!0;var z=Array.isArray;function R(){}var M={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function F(B,ee,O){var ie=O.ref;return{$$typeof:e,type:B,key:ee,ref:ie!==void 0?ie:null,props:O}}function I(B,ee){return F(B.type,ee,B.props)}function U(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function G(B){var ee={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(O){return ee[O]})}var q=/\/+/g;function $(B,ee){return typeof B=="object"&&B!==null&&B.key!=null?G(""+B.key):ee.toString(36)}function Z(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(R,R):(B.status="pending",B.then(function(ee){B.status==="pending"&&(B.status="fulfilled",B.value=ee)},function(ee){B.status==="pending"&&(B.status="rejected",B.reason=ee)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function A(B,ee,O,ie,oe){var me=typeof B;(me==="undefined"||me==="boolean")&&(B=null);var we=!1;if(B===null)we=!0;else switch(me){case"bigint":case"string":case"number":we=!0;break;case"object":switch(B.$$typeof){case e:case t:we=!0;break;case h:return we=B._init,A(we(B._payload),ee,O,ie,oe)}}if(we)return oe=oe(B),we=ie===""?"."+$(B,0):ie,z(oe)?(O="",we!=null&&(O=we.replace(q,"$&/")+"/"),A(oe,ee,O,"",function(le){return le})):oe!=null&&(U(oe)&&(oe=I(oe,O+(oe.key==null||B&&B.key===oe.key?"":(""+oe.key).replace(q,"$&/")+"/")+we)),ee.push(oe)),1;we=0;var ne=ie===""?".":ie+":";if(z(B))for(var de=0;de<B.length;de++)ie=B[de],me=ne+$(ie,de),we+=A(ie,ee,O,me,oe);else if(de=g(B),typeof de=="function")for(B=de.call(B),de=0;!(ie=B.next()).done;)ie=ie.value,me=ne+$(ie,de++),we+=A(ie,ee,O,me,oe);else if(me==="object"){if(typeof B.then=="function")return A(Z(B),ee,O,ie,oe);throw ee=String(B),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.")}return we}function N(B,ee,O){if(B==null)return B;var ie=[],oe=0;return A(B,ie,"","",function(me){return ee.call(O,me,oe++)}),ie}function H(B){if(B._status===-1){var ee=B._result;ee=ee(),ee.then(function(O){(B._status===0||B._status===-1)&&(B._status=1,B._result=O)},function(O){(B._status===0||B._status===-1)&&(B._status=2,B._result=O)}),B._status===-1&&(B._status=0,B._result=ee)}if(B._status===1)return B._result.default;throw B._result}var Q=typeof reportError=="function"?reportError:function(B){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ee=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B),error:B});if(!window.dispatchEvent(ee))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",B);return}console.error(B)},D={map:N,forEach:function(B,ee,O){N(B,function(){ee.apply(this,arguments)},O)},count:function(B){var ee=0;return N(B,function(){ee++}),ee},toArray:function(B){return N(B,function(ee){return ee})||[]},only:function(B){if(!U(B))throw Error("React.Children.only expected to receive a single React element child.");return B}};return Ze.Activity=m,Ze.Children=D,Ze.Component=w,Ze.Fragment=n,Ze.Profiler=i,Ze.PureComponent=k,Ze.StrictMode=r,Ze.Suspense=c,Ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Ze.__COMPILER_RUNTIME={__proto__:null,c:function(B){return M.H.useMemoCache(B)}},Ze.cache=function(B){return function(){return B.apply(null,arguments)}},Ze.cacheSignal=function(){return null},Ze.cloneElement=function(B,ee,O){if(B==null)throw Error("The argument must be a React element, but you passed "+B+".");var ie=E({},B.props),oe=B.key;if(ee!=null)for(me in ee.key!==void 0&&(oe=""+ee.key),ee)!X.call(ee,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&ee.ref===void 0||(ie[me]=ee[me]);var me=arguments.length-2;if(me===1)ie.children=O;else if(1<me){for(var we=Array(me),ne=0;ne<me;ne++)we[ne]=arguments[ne+2];ie.children=we}return F(B.type,oe,ie)},Ze.createContext=function(B){return B={$$typeof:s,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:o,_context:B},B},Ze.createElement=function(B,ee,O){var ie,oe={},me=null;if(ee!=null)for(ie in ee.key!==void 0&&(me=""+ee.key),ee)X.call(ee,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(oe[ie]=ee[ie]);var we=arguments.length-2;if(we===1)oe.children=O;else if(1<we){for(var ne=Array(we),de=0;de<we;de++)ne[de]=arguments[de+2];oe.children=ne}if(B&&B.defaultProps)for(ie in we=B.defaultProps,we)oe[ie]===void 0&&(oe[ie]=we[ie]);return F(B,me,oe)},Ze.createRef=function(){return{current:null}},Ze.forwardRef=function(B){return{$$typeof:u,render:B}},Ze.isValidElement=U,Ze.lazy=function(B){return{$$typeof:h,_payload:{_status:-1,_result:B},_init:H}},Ze.memo=function(B,ee){return{$$typeof:f,type:B,compare:ee===void 0?null:ee}},Ze.startTransition=function(B){var ee=M.T,O={};M.T=O;try{var ie=B(),oe=M.S;oe!==null&&oe(O,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(R,Q)}catch(me){Q(me)}finally{ee!==null&&O.types!==null&&(ee.types=O.types),M.T=ee}},Ze.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Ze.use=function(B){return M.H.use(B)},Ze.useActionState=function(B,ee,O){return M.H.useActionState(B,ee,O)},Ze.useCallback=function(B,ee){return M.H.useCallback(B,ee)},Ze.useContext=function(B){return M.H.useContext(B)},Ze.useDebugValue=function(){},Ze.useDeferredValue=function(B,ee){return M.H.useDeferredValue(B,ee)},Ze.useEffect=function(B,ee){return M.H.useEffect(B,ee)},Ze.useEffectEvent=function(B){return M.H.useEffectEvent(B)},Ze.useId=function(){return M.H.useId()},Ze.useImperativeHandle=function(B,ee,O){return M.H.useImperativeHandle(B,ee,O)},Ze.useInsertionEffect=function(B,ee){return M.H.useInsertionEffect(B,ee)},Ze.useLayoutEffect=function(B,ee){return M.H.useLayoutEffect(B,ee)},Ze.useMemo=function(B,ee){return M.H.useMemo(B,ee)},Ze.useOptimistic=function(B,ee){return M.H.useOptimistic(B,ee)},Ze.useReducer=function(B,ee,O){return M.H.useReducer(B,ee,O)},Ze.useRef=function(B){return M.H.useRef(B)},Ze.useState=function(B){return M.H.useState(B)},Ze.useSyncExternalStore=function(B,ee,O){return M.H.useSyncExternalStore(B,ee,O)},Ze.useTransition=function(){return M.H.useTransition()},Ze.version="19.2.7",Ze}var Lk;function pf(){return Lk||(Lk=1,Eg.exports=_3()),Eg.exports}var K=pf();const g3=Ea(K);var Sg={exports:{}},dc={},Cg={exports:{}},Tg={};/**
19
+ * @license React
20
+ * scheduler.production.js
21
+ *
22
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var zk;function y3(){return zk||(zk=1,(function(e){function t(A,N){var H=A.length;A.push(N);e:for(;0<H;){var Q=H-1>>>1,D=A[Q];if(0<i(D,N))A[Q]=N,A[H]=D,H=Q;else break e}}function n(A){return A.length===0?null:A[0]}function r(A){if(A.length===0)return null;var N=A[0],H=A.pop();if(H!==N){A[0]=H;e:for(var Q=0,D=A.length,B=D>>>1;Q<B;){var ee=2*(Q+1)-1,O=A[ee],ie=ee+1,oe=A[ie];if(0>i(O,H))ie<D&&0>i(oe,O)?(A[Q]=oe,A[ie]=H,Q=ie):(A[Q]=O,A[ee]=H,Q=ee);else if(ie<D&&0>i(oe,H))A[Q]=oe,A[ie]=H,Q=ie;else break e}}return N}function i(A,N){var H=A.sortIndex-N.sortIndex;return H!==0?H:A.id-N.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var c=[],f=[],h=1,m=null,_=3,g=!1,b=!1,E=!1,C=!1,w=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function S(A){for(var N=n(f);N!==null;){if(N.callback===null)r(f);else if(N.startTime<=A)r(f),N.sortIndex=N.expirationTime,t(c,N);else break;N=n(f)}}function z(A){if(E=!1,S(A),!b)if(n(c)!==null)b=!0,R||(R=!0,G());else{var N=n(f);N!==null&&Z(z,N.startTime-A)}}var R=!1,M=-1,X=5,F=-1;function I(){return C?!0:!(e.unstable_now()-F<X)}function U(){if(C=!1,R){var A=e.unstable_now();F=A;var N=!0;try{e:{b=!1,E&&(E=!1,T(M),M=-1),g=!0;var H=_;try{t:{for(S(A),m=n(c);m!==null&&!(m.expirationTime>A&&I());){var Q=m.callback;if(typeof Q=="function"){m.callback=null,_=m.priorityLevel;var D=Q(m.expirationTime<=A);if(A=e.unstable_now(),typeof D=="function"){m.callback=D,S(A),N=!0;break t}m===n(c)&&r(c),S(A)}else r(c);m=n(c)}if(m!==null)N=!0;else{var B=n(f);B!==null&&Z(z,B.startTime-A),N=!1}}break e}finally{m=null,_=H,g=!1}N=void 0}}finally{N?G():R=!1}}}var G;if(typeof k=="function")G=function(){k(U)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,$=q.port2;q.port1.onmessage=U,G=function(){$.postMessage(null)}}else G=function(){w(U,0)};function Z(A,N){M=w(function(){A(e.unstable_now())},N)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(A){A.callback=null},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return _},e.unstable_next=function(A){switch(_){case 1:case 2:case 3:var N=3;break;default:N=_}var H=_;_=N;try{return A()}finally{_=H}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(A,N){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var H=_;_=A;try{return N()}finally{_=H}},e.unstable_scheduleCallback=function(A,N,H){var Q=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?Q+H:Q):H=Q,A){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=H+D,A={id:h++,callback:N,priorityLevel:A,startTime:H,expirationTime:D,sortIndex:-1},H>Q?(A.sortIndex=H,t(f,A),n(c)===null&&A===n(f)&&(E?(T(M),M=-1):E=!0,Z(z,H-Q))):(A.sortIndex=D,t(c,A),b||g||(b=!0,R||(R=!0,G()))),A},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(A){var N=_;return function(){var H=_;_=N;try{return A.apply(this,arguments)}finally{_=H}}}})(Tg)),Tg}var Mk;function v3(){return Mk||(Mk=1,Cg.exports=y3()),Cg.exports}var jg={exports:{}},zn={};/**
27
+ * @license React
28
+ * react-dom.production.js
29
+ *
30
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var Dk;function b3(){if(Dk)return zn;Dk=1;var e=pf();function t(c){var f="https://react.dev/errors/"+c;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+c+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(c,f,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:m==null?null:""+m,children:c,containerInfo:f,implementation:h}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(c,f){if(c==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return zn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,zn.createPortal=function(c,f){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return o(c,f,null,h)},zn.flushSync=function(c){var f=s.T,h=r.p;try{if(s.T=null,r.p=2,c)return c()}finally{s.T=f,r.p=h,r.d.f()}},zn.preconnect=function(c,f){typeof c=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(c,f))},zn.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},zn.preinit=function(c,f){if(typeof c=="string"&&f&&typeof f.as=="string"){var h=f.as,m=u(h,f.crossOrigin),_=typeof f.integrity=="string"?f.integrity:void 0,g=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(c,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:m,integrity:_,fetchPriority:g}):h==="script"&&r.d.X(c,{crossOrigin:m,integrity:_,fetchPriority:g,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},zn.preinitModule=function(c,f){if(typeof c=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=u(f.as,f.crossOrigin);r.d.M(c,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(c)},zn.preload=function(c,f){if(typeof c=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,m=u(h,f.crossOrigin);r.d.L(c,h,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},zn.preloadModule=function(c,f){if(typeof c=="string")if(f){var h=u(f.as,f.crossOrigin);r.d.m(c,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(c)},zn.requestFormReset=function(c){r.d.r(c)},zn.unstable_batchedUpdates=function(c,f){return c(f)},zn.useFormState=function(c,f,h){return s.H.useFormState(c,f,h)},zn.useFormStatus=function(){return s.H.useHostTransitionStatus()},zn.version="19.2.7",zn}var Ok;function uT(){if(Ok)return jg.exports;Ok=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),jg.exports=b3(),jg.exports}/**
35
+ * @license React
36
+ * react-dom-client.production.js
37
+ *
38
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
39
+ *
40
+ * This source code is licensed under the MIT license found in the
41
+ * LICENSE file in the root directory of this source tree.
42
+ */var qk;function x3(){if(qk)return dc;qk=1;var e=v3(),t=pf(),n=uT();function r(a){var l="https://react.dev/errors/"+a;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+a+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function o(a){var l=a,d=a;if(a.alternate)for(;l.return;)l=l.return;else{a=l;do l=a,(l.flags&4098)!==0&&(d=l.return),a=l.return;while(a)}return l.tag===3?d:null}function s(a){if(a.tag===13){var l=a.memoizedState;if(l===null&&(a=a.alternate,a!==null&&(l=a.memoizedState)),l!==null)return l.dehydrated}return null}function u(a){if(a.tag===31){var l=a.memoizedState;if(l===null&&(a=a.alternate,a!==null&&(l=a.memoizedState)),l!==null)return l.dehydrated}return null}function c(a){if(o(a)!==a)throw Error(r(188))}function f(a){var l=a.alternate;if(!l){if(l=o(a),l===null)throw Error(r(188));return l!==a?null:a}for(var d=a,p=l;;){var v=d.return;if(v===null)break;var x=v.alternate;if(x===null){if(p=v.return,p!==null){d=p;continue}break}if(v.child===x.child){for(x=v.child;x;){if(x===d)return c(v),a;if(x===p)return c(v),l;x=x.sibling}throw Error(r(188))}if(d.return!==p.return)d=v,p=x;else{for(var L=!1,V=v.child;V;){if(V===d){L=!0,d=v,p=x;break}if(V===p){L=!0,p=v,d=x;break}V=V.sibling}if(!L){for(V=x.child;V;){if(V===d){L=!0,d=x,p=v;break}if(V===p){L=!0,p=x,d=v;break}V=V.sibling}if(!L)throw Error(r(189))}}if(d.alternate!==p)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?a:l}function h(a){var l=a.tag;if(l===5||l===26||l===27||l===6)return a;for(a=a.child;a!==null;){if(l=h(a),l!==null)return l;a=a.sibling}return null}var m=Object.assign,_=Symbol.for("react.element"),g=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),k=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function G(a){return a===null||typeof a!="object"?null:(a=U&&a[U]||a["@@iterator"],typeof a=="function"?a:null)}var q=Symbol.for("react.client.reference");function $(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===q?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case E:return"Fragment";case w:return"Profiler";case C:return"StrictMode";case z:return"Suspense";case R:return"SuspenseList";case F:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case b:return"Portal";case k:return a.displayName||"Context";case T:return(a._context.displayName||"Context")+".Consumer";case S:var l=a.render;return a=a.displayName,a||(a=l.displayName||l.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case M:return l=a.displayName||null,l!==null?l:$(a.type)||"Memo";case X:l=a._payload,a=a._init;try{return $(a(l))}catch{}}return null}var Z=Array.isArray,A=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},Q=[],D=-1;function B(a){return{current:a}}function ee(a){0>D||(a.current=Q[D],Q[D]=null,D--)}function O(a,l){D++,Q[D]=a.current,a.current=l}var ie=B(null),oe=B(null),me=B(null),we=B(null);function ne(a,l){switch(O(me,l),O(oe,a),O(ie,null),l.nodeType){case 9:case 11:a=(a=l.documentElement)&&(a=a.namespaceURI)?Kw(a):0;break;default:if(a=l.tagName,l=l.namespaceURI)l=Kw(l),a=Qw(l,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}ee(ie),O(ie,a)}function de(){ee(ie),ee(oe),ee(me)}function le(a){a.memoizedState!==null&&O(we,a);var l=ie.current,d=Qw(l,a.type);l!==d&&(O(oe,a),O(ie,d))}function ke(a){oe.current===a&&(ee(ie),ee(oe)),we.current===a&&(ee(we),sc._currentValue=H)}var ge,Ae;function Ce(a){if(ge===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);ge=l&&l[1]||"",Ae=-1<d.stack.indexOf(`
43
+ at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
44
+ `+ge+a+Ae}var Te=!1;function ue(a,l){if(!a||Te)return"";Te=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(l){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(pe){var he=pe}Reflect.construct(a,[],Se)}else{try{Se.call()}catch(pe){he=pe}a.call(Se.prototype)}}else{try{throw Error()}catch(pe){he=pe}(Se=a())&&typeof Se.catch=="function"&&Se.catch(function(){})}}catch(pe){if(pe&&he&&typeof pe.stack=="string")return[pe.stack,he.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=p.DetermineComponentFrameRoot(),L=x[0],V=x[1];if(L&&V){var te=L.split(`
45
+ `),fe=V.split(`
46
+ `);for(v=p=0;p<te.length&&!te[p].includes("DetermineComponentFrameRoot");)p++;for(;v<fe.length&&!fe[v].includes("DetermineComponentFrameRoot");)v++;if(p===te.length||v===fe.length)for(p=te.length-1,v=fe.length-1;1<=p&&0<=v&&te[p]!==fe[v];)v--;for(;1<=p&&0<=v;p--,v--)if(te[p]!==fe[v]){if(p!==1||v!==1)do if(p--,v--,0>v||te[p]!==fe[v]){var ve=`
47
+ `+te[p].replace(" at new "," at ");return a.displayName&&ve.includes("<anonymous>")&&(ve=ve.replace("<anonymous>",a.displayName)),ve}while(1<=p&&0<=v);break}}}finally{Te=!1,Error.prepareStackTrace=d}return(d=a?a.displayName||a.name:"")?Ce(d):""}function it(a,l){switch(a.tag){case 26:case 27:case 5:return Ce(a.type);case 16:return Ce("Lazy");case 13:return a.child!==l&&l!==null?Ce("Suspense Fallback"):Ce("Suspense");case 19:return Ce("SuspenseList");case 0:case 15:return ue(a.type,!1);case 11:return ue(a.type.render,!1);case 1:return ue(a.type,!0);case 31:return Ce("Activity");default:return""}}function wt(a){try{var l="",d=null;do l+=it(a,d),d=a,a=a.return;while(a);return l}catch(p){return`
48
+ Error generating stack: `+p.message+`
49
+ `+p.stack}}var kt=Object.prototype.hasOwnProperty,Tt=e.unstable_scheduleCallback,pt=e.unstable_cancelCallback,Gt=e.unstable_shouldYield,an=e.unstable_requestPaint,ft=e.unstable_now,Ft=e.unstable_getCurrentPriorityLevel,_e=e.unstable_ImmediatePriority,Re=e.unstable_UserBlockingPriority,qe=e.unstable_NormalPriority,He=e.unstable_LowPriority,nt=e.unstable_IdlePriority,Kt=e.log,Rn=e.unstable_setDisableYieldValue,yt=null,Ht=null;function Jt(a){if(typeof Kt=="function"&&Rn(a),Ht&&typeof Ht.setStrictMode=="function")try{Ht.setStrictMode(yt,a)}catch{}}var vt=Math.clz32?Math.clz32:vu,ar=Math.log,Fn=Math.LN2;function vu(a){return a>>>=0,a===0?32:31-(ar(a)/Fn|0)|0}var ja=256,Aa=262144,Ra=4194304;function br(a){var l=a&42;if(l!==0)return l;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function Pi(a,l,d){var p=a.pendingLanes;if(p===0)return 0;var v=0,x=a.suspendedLanes,L=a.pingedLanes;a=a.warmLanes;var V=p&134217727;return V!==0?(p=V&~x,p!==0?v=br(p):(L&=V,L!==0?v=br(L):d||(d=V&~a,d!==0&&(v=br(d))))):(V=p&~x,V!==0?v=br(V):L!==0?v=br(L):d||(d=p&~a,d!==0&&(v=br(d)))),v===0?0:l!==0&&l!==v&&(l&x)===0&&(x=v&-v,d=l&-l,x>=d||x===32&&(d&4194048)!==0)?l:v}function $i(a,l){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&l)===0}function Is(a,l){switch(a){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Lo(){var a=Ra;return Ra<<=1,(Ra&62914560)===0&&(Ra=4194304),a}function zo(a){for(var l=[],d=0;31>d;d++)l.push(a);return l}function Bi(a,l){a.pendingLanes|=l,l!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function Ps(a,l,d,p,v,x){var L=a.pendingLanes;a.pendingLanes=d,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=d,a.entangledLanes&=d,a.errorRecoveryDisabledLanes&=d,a.shellSuspendCounter=0;var V=a.entanglements,te=a.expirationTimes,fe=a.hiddenUpdates;for(d=L&~d;0<d;){var ve=31-vt(d),Se=1<<ve;V[ve]=0,te[ve]=-1;var he=fe[ve];if(he!==null)for(fe[ve]=null,ve=0;ve<he.length;ve++){var pe=he[ve];pe!==null&&(pe.lane&=-536870913)}d&=~Se}p!==0&&Na(a,p,0),x!==0&&v===0&&a.tag!==0&&(a.suspendedLanes|=x&~(L&~l))}function Na(a,l,d){a.pendingLanes|=l,a.suspendedLanes&=~l;var p=31-vt(l);a.entangledLanes|=l,a.entanglements[p]=a.entanglements[p]|1073741824|d&261930}function Ui(a,l){var d=a.entangledLanes|=l;for(a=a.entanglements;d;){var p=31-vt(d),v=1<<p;v&l|a[p]&l&&(a[p]|=l),d&=~v}}function hi(a,l){var d=l&-l;return d=(d&42)!==0?1:Mo(d),(d&(a.suspendedLanes|l))!==0?0:d}function Mo(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function Do(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function Gi(){var a=N.p;return a!==0?a:(a=window.event,a===void 0?32:bk(a.type))}function $s(a,l){var d=N.p;try{return N.p=a,l()}finally{N.p=d}}var xr=Math.random().toString(36).slice(2),en="__reactFiber$"+xr,De="__reactProps$"+xr,Fr="__reactContainer$"+xr,La="__reactEvents$"+xr,Hr="__reactListeners$"+xr,Fi="__reactHandles$"+xr,Bs="__reactResources$"+xr,Vt="__reactMarker$"+xr;function Hi(a){delete a[en],delete a[De],delete a[La],delete a[Hr],delete a[Fi]}function mi(a){var l=a[en];if(l)return l;for(var d=a.parentNode;d;){if(l=d[Fr]||d[en]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(a=ik(a);a!==null;){if(d=a[en])return d;a=ik(a)}return l}a=d,d=a.parentNode}return null}function pi(a){if(a=a[en]||a[Fr]){var l=a.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return a}return null}function _i(a){var l=a.tag;if(l===5||l===26||l===27||l===6)return a.stateNode;throw Error(r(33))}function wr(a){var l=a[Bs];return l||(l=a[Bs]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function Xt(a){a[Vt]=!0}var Us=new Set,Gs={};function kr(a,l){gi(a,l),gi(a+"Capture",l)}function gi(a,l){for(Gs[a]=l,a=0;a<l.length;a++)Us.add(l[a])}var za=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Vr={},Oo={};function bu(a){return kt.call(Oo,a)?!0:kt.call(Vr,a)?!1:za.test(a)?Oo[a]=!0:(Vr[a]=!0,!1)}function Ma(a,l,d){if(bu(l))if(d===null)a.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":a.removeAttribute(l);return;case"boolean":var p=l.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){a.removeAttribute(l);return}}a.setAttribute(l,""+d)}}function Da(a,l,d){if(d===null)a.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(l);return}a.setAttribute(l,""+d)}}function or(a,l,d,p){if(p===null)a.removeAttribute(d);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(d);return}a.setAttributeNS(l,d,""+p)}}function Nn(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function Fs(a){var l=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Hs(a,l,d){var p=Object.getOwnPropertyDescriptor(a.constructor.prototype,l);if(!a.hasOwnProperty(l)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var v=p.get,x=p.set;return Object.defineProperty(a,l,{configurable:!0,get:function(){return v.call(this)},set:function(L){d=""+L,x.call(this,L)}}),Object.defineProperty(a,l,{enumerable:p.enumerable}),{getValue:function(){return d},setValue:function(L){d=""+L},stopTracking:function(){a._valueTracker=null,delete a[l]}}}}function qo(a){if(!a._valueTracker){var l=Fs(a)?"checked":"value";a._valueTracker=Hs(a,l,""+a[l])}}function Vi(a){if(!a)return!1;var l=a._valueTracker;if(!l)return!0;var d=l.getValue(),p="";return a&&(p=Fs(a)?a.checked?"true":"false":a.value),a=p,a!==d?(l.setValue(a),!0):!1}function Xi(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var Vs=/[\n"\\]/g;function Ln(a){return a.replace(Vs,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Io(a,l,d,p,v,x,L,V){a.name="",L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?a.type=L:a.removeAttribute("type"),l!=null?L==="number"?(l===0&&a.value===""||a.value!=l)&&(a.value=""+Nn(l)):a.value!==""+Nn(l)&&(a.value=""+Nn(l)):L!=="submit"&&L!=="reset"||a.removeAttribute("value"),l!=null?Po(a,L,Nn(l)):d!=null?Po(a,L,Nn(d)):p!=null&&a.removeAttribute("value"),v==null&&x!=null&&(a.defaultChecked=!!x),v!=null&&(a.checked=v&&typeof v!="function"&&typeof v!="symbol"),V!=null&&typeof V!="function"&&typeof V!="symbol"&&typeof V!="boolean"?a.name=""+Nn(V):a.removeAttribute("name")}function Oa(a,l,d,p,v,x,L,V){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(a.type=x),l!=null||d!=null){if(!(x!=="submit"&&x!=="reset"||l!=null)){qo(a);return}d=d!=null?""+Nn(d):"",l=l!=null?""+Nn(l):d,V||l===a.value||(a.value=l),a.defaultValue=l}p=p??v,p=typeof p!="function"&&typeof p!="symbol"&&!!p,a.checked=V?a.checked:!!p,a.defaultChecked=!!p,L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"&&(a.name=L),qo(a)}function Po(a,l,d){l==="number"&&Xi(a.ownerDocument)===a||a.defaultValue===""+d||(a.defaultValue=""+d)}function yi(a,l,d,p){if(a=a.options,l){l={};for(var v=0;v<d.length;v++)l["$"+d[v]]=!0;for(d=0;d<a.length;d++)v=l.hasOwnProperty("$"+a[d].value),a[d].selected!==v&&(a[d].selected=v),v&&p&&(a[d].defaultSelected=!0)}else{for(d=""+Nn(d),l=null,v=0;v<a.length;v++){if(a[v].value===d){a[v].selected=!0,p&&(a[v].defaultSelected=!0);return}l!==null||a[v].disabled||(l=a[v])}l!==null&&(l.selected=!0)}}function $o(a,l,d){if(l!=null&&(l=""+Nn(l),l!==a.value&&(a.value=l),d==null)){a.defaultValue!==l&&(a.defaultValue=l);return}a.defaultValue=d!=null?""+Nn(d):""}function xu(a,l,d,p){if(l==null){if(p!=null){if(d!=null)throw Error(r(92));if(Z(p)){if(1<p.length)throw Error(r(93));p=p[0]}d=p}d==null&&(d=""),l=d}d=Nn(l),a.defaultValue=d,p=a.textContent,p===d&&p!==""&&p!==null&&(a.value=p),qo(a)}function Ot(a,l){if(l){var d=a.firstChild;if(d&&d===a.lastChild&&d.nodeType===3){d.nodeValue=l;return}}a.textContent=l}var qa=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Lf(a,l,d){var p=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?p?a.setProperty(l,""):l==="float"?a.cssFloat="":a[l]="":p?a.setProperty(l,d):typeof d!="number"||d===0||qa.has(l)?l==="float"?a.cssFloat=d:a[l]=(""+d).trim():a[l]=d+"px"}function zf(a,l,d){if(l!=null&&typeof l!="object")throw Error(r(62));if(a=a.style,d!=null){for(var p in d)!d.hasOwnProperty(p)||l!=null&&l.hasOwnProperty(p)||(p.indexOf("--")===0?a.setProperty(p,""):p==="float"?a.cssFloat="":a[p]="");for(var v in l)p=l[v],l.hasOwnProperty(v)&&d[v]!==p&&Lf(a,v,p)}else for(var x in l)l.hasOwnProperty(x)&&Lf(a,x,l[x])}function wu(a){if(a.indexOf("-")===-1)return!1;switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ep=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Mf=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Xs(a){return Mf.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function Xr(){}var ku=null;function Eu(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Yi=null,sr=null;function Su(a){var l=pi(a);if(l&&(a=l.stateNode)){var d=a[De]||null;e:switch(a=l.stateNode,l.type){case"input":if(Io(a,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=a;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+Ln(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var p=d[l];if(p!==a&&p.form===a.form){var v=p[De]||null;if(!v)throw Error(r(90));Io(p,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(l=0;l<d.length;l++)p=d[l],p.form===a.form&&Vi(p)}break e;case"textarea":$o(a,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&yi(a,!!d.multiple,l,!1)}}}var Ys=!1;function Df(a,l,d){if(Ys)return a(l,d);Ys=!0;try{var p=a(l);return p}finally{if(Ys=!1,(Yi!==null||sr!==null)&&(yd(),Yi&&(l=Yi,a=sr,sr=Yi=null,Su(l),a)))for(l=0;l<a.length;l++)Su(a[l])}}function Bo(a,l){var d=a.stateNode;if(d===null)return null;var p=d[De]||null;if(p===null)return null;d=p[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(a=a.type,p=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!p;break e;default:a=!1}if(a)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var Yr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yt=!1;if(Yr)try{var Uo={};Object.defineProperty(Uo,"passive",{get:function(){Yt=!0}}),window.addEventListener("test",Uo,Uo),window.removeEventListener("test",Uo,Uo)}catch{Yt=!1}var vi=null,Ia=null,Pa=null;function Wr(){if(Pa)return Pa;var a,l=Ia,d=l.length,p,v="value"in vi?vi.value:vi.textContent,x=v.length;for(a=0;a<d&&l[a]===v[a];a++);var L=d-a;for(p=1;p<=L&&l[d-p]===v[x-p];p++);return Pa=v.slice(a,1<p?1-p:void 0)}function $a(a){var l=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&l===13&&(a=13)):a=l,a===10&&(a=13),32<=a||a===13?a:0}function Ba(){return!0}function Cu(){return!1}function kn(a){function l(d,p,v,x,L){this._reactName=d,this._targetInst=v,this.type=p,this.nativeEvent=x,this.target=L,this.currentTarget=null;for(var V in a)a.hasOwnProperty(V)&&(d=a[V],this[V]=d?d(x):x[V]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?Ba:Cu,this.isPropagationStopped=Cu,this}return m(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=Ba)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Ba)},persist:function(){},isPersistent:Ba}),l}var bi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Go=kn(bi),Fo=m({},bi,{view:0,detail:0}),Sp=kn(Fo),Ws,j,P,Y=m({},Fo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wi,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==P&&(P&&a.type==="mousemove"?(Ws=a.screenX-P.screenX,j=a.screenY-P.screenY):j=Ws=0,P=a),Ws)},movementY:function(a){return"movementY"in a?a.movementY:j}}),se=kn(Y),ye=m({},Y,{dataTransfer:0}),Ee=kn(ye),$e=m({},Fo,{relatedTarget:0}),Ge=kn($e),Ke=m({},bi,{animationName:0,elapsedTime:0,pseudoElement:0}),Me=kn(Ke),Wt=m({},bi,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),dn=kn(Wt),xt=m({},bi,{data:0}),mt=kn(xt),qt={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xi={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Ho={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Tu(a){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(a):(a=Ho[a])?!!l[a]:!1}function wi(){return Tu}var Ks=m({},Fo,{key:function(a){if(a.key){var l=qt[a.key]||a.key;if(l!=="Unidentified")return l}return a.type==="keypress"?(a=$a(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?xi[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wi,charCode:function(a){return a.type==="keypress"?$a(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?$a(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),Yn=kn(Ks),Cp=m({},Y,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Of=kn(Cp),ki=m({},Fo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wi}),SL=kn(ki),CL=m({},bi,{propertyName:0,elapsedTime:0,pseudoElement:0}),TL=kn(CL),jL=m({},Y,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),AL=kn(jL),RL=m({},bi,{newState:0,oldState:0}),NL=kn(RL),LL=[9,13,27,32],Tp=Yr&&"CompositionEvent"in window,ju=null;Yr&&"documentMode"in document&&(ju=document.documentMode);var zL=Yr&&"TextEvent"in window&&!ju,nb=Yr&&(!Tp||ju&&8<ju&&11>=ju),rb=" ",ib=!1;function ab(a,l){switch(a){case"keyup":return LL.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ob(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Qs=!1;function ML(a,l){switch(a){case"compositionend":return ob(l);case"keypress":return l.which!==32?null:(ib=!0,rb);case"textInput":return a=l.data,a===rb&&ib?null:a;default:return null}}function DL(a,l){if(Qs)return a==="compositionend"||!Tp&&ab(a,l)?(a=Wr(),Pa=Ia=vi=null,Qs=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return nb&&l.locale!=="ko"?null:l.data;default:return null}}var OL={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function sb(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l==="input"?!!OL[a.type]:l==="textarea"}function lb(a,l,d,p){Yi?sr?sr.push(p):sr=[p]:Yi=p,l=Sd(l,"onChange"),0<l.length&&(d=new Go("onChange","change",null,d,p),a.push({event:d,listeners:l}))}var Au=null,Ru=null;function qL(a){Fw(a,0)}function qf(a){var l=_i(a);if(Vi(l))return a}function ub(a,l){if(a==="change")return l}var cb=!1;if(Yr){var jp;if(Yr){var Ap="oninput"in document;if(!Ap){var fb=document.createElement("div");fb.setAttribute("oninput","return;"),Ap=typeof fb.oninput=="function"}jp=Ap}else jp=!1;cb=jp&&(!document.documentMode||9<document.documentMode)}function db(){Au&&(Au.detachEvent("onpropertychange",hb),Ru=Au=null)}function hb(a){if(a.propertyName==="value"&&qf(Ru)){var l=[];lb(l,Ru,a,Eu(a)),Df(qL,l)}}function IL(a,l,d){a==="focusin"?(db(),Au=l,Ru=d,Au.attachEvent("onpropertychange",hb)):a==="focusout"&&db()}function PL(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return qf(Ru)}function $L(a,l){if(a==="click")return qf(l)}function BL(a,l){if(a==="input"||a==="change")return qf(l)}function UL(a,l){return a===l&&(a!==0||1/a===1/l)||a!==a&&l!==l}var lr=typeof Object.is=="function"?Object.is:UL;function Nu(a,l){if(lr(a,l))return!0;if(typeof a!="object"||a===null||typeof l!="object"||l===null)return!1;var d=Object.keys(a),p=Object.keys(l);if(d.length!==p.length)return!1;for(p=0;p<d.length;p++){var v=d[p];if(!kt.call(l,v)||!lr(a[v],l[v]))return!1}return!0}function mb(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function pb(a,l){var d=mb(a);a=0;for(var p;d;){if(d.nodeType===3){if(p=a+d.textContent.length,a<=l&&p>=l)return{node:d,offset:l-a};a=p}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=mb(d)}}function _b(a,l){return a&&l?a===l?!0:a&&a.nodeType===3?!1:l&&l.nodeType===3?_b(a,l.parentNode):"contains"in a?a.contains(l):a.compareDocumentPosition?!!(a.compareDocumentPosition(l)&16):!1:!1}function gb(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var l=Xi(a.document);l instanceof a.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)a=l.contentWindow;else break;l=Xi(a.document)}return l}function Rp(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l&&(l==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||l==="textarea"||a.contentEditable==="true")}var GL=Yr&&"documentMode"in document&&11>=document.documentMode,Zs=null,Np=null,Lu=null,Lp=!1;function yb(a,l,d){var p=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Lp||Zs==null||Zs!==Xi(p)||(p=Zs,"selectionStart"in p&&Rp(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),Lu&&Nu(Lu,p)||(Lu=p,p=Sd(Np,"onSelect"),0<p.length&&(l=new Go("onSelect","select",null,l,d),a.push({event:l,listeners:p}),l.target=Zs)))}function Vo(a,l){var d={};return d[a.toLowerCase()]=l.toLowerCase(),d["Webkit"+a]="webkit"+l,d["Moz"+a]="moz"+l,d}var Js={animationend:Vo("Animation","AnimationEnd"),animationiteration:Vo("Animation","AnimationIteration"),animationstart:Vo("Animation","AnimationStart"),transitionrun:Vo("Transition","TransitionRun"),transitionstart:Vo("Transition","TransitionStart"),transitioncancel:Vo("Transition","TransitionCancel"),transitionend:Vo("Transition","TransitionEnd")},zp={},vb={};Yr&&(vb=document.createElement("div").style,"AnimationEvent"in window||(delete Js.animationend.animation,delete Js.animationiteration.animation,delete Js.animationstart.animation),"TransitionEvent"in window||delete Js.transitionend.transition);function Xo(a){if(zp[a])return zp[a];if(!Js[a])return a;var l=Js[a],d;for(d in l)if(l.hasOwnProperty(d)&&d in vb)return zp[a]=l[d];return a}var bb=Xo("animationend"),xb=Xo("animationiteration"),wb=Xo("animationstart"),FL=Xo("transitionrun"),HL=Xo("transitionstart"),VL=Xo("transitioncancel"),kb=Xo("transitionend"),Eb=new Map,Mp="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Mp.push("scrollEnd");function Kr(a,l){Eb.set(a,l),kr(l,[a])}var If=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Er=[],el=0,Dp=0;function Pf(){for(var a=el,l=Dp=el=0;l<a;){var d=Er[l];Er[l++]=null;var p=Er[l];Er[l++]=null;var v=Er[l];Er[l++]=null;var x=Er[l];if(Er[l++]=null,p!==null&&v!==null){var L=p.pending;L===null?v.next=v:(v.next=L.next,L.next=v),p.pending=v}x!==0&&Sb(d,v,x)}}function $f(a,l,d,p){Er[el++]=a,Er[el++]=l,Er[el++]=d,Er[el++]=p,Dp|=p,a.lanes|=p,a=a.alternate,a!==null&&(a.lanes|=p)}function Op(a,l,d,p){return $f(a,l,d,p),Bf(a)}function Yo(a,l){return $f(a,null,null,l),Bf(a)}function Sb(a,l,d){a.lanes|=d;var p=a.alternate;p!==null&&(p.lanes|=d);for(var v=!1,x=a.return;x!==null;)x.childLanes|=d,p=x.alternate,p!==null&&(p.childLanes|=d),x.tag===22&&(a=x.stateNode,a===null||a._visibility&1||(v=!0)),a=x,x=x.return;return a.tag===3?(x=a.stateNode,v&&l!==null&&(v=31-vt(d),a=x.hiddenUpdates,p=a[v],p===null?a[v]=[l]:p.push(l),l.lane=d|536870912),x):null}function Bf(a){if(50<ec)throw ec=0,H_=null,Error(r(185));for(var l=a.return;l!==null;)a=l,l=a.return;return a.tag===3?a.stateNode:null}var tl={};function XL(a,l,d,p){this.tag=a,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ur(a,l,d,p){return new XL(a,l,d,p)}function qp(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Wi(a,l){var d=a.alternate;return d===null?(d=ur(a.tag,l,a.key,a.mode),d.elementType=a.elementType,d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=l,d.type=a.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=a.flags&65011712,d.childLanes=a.childLanes,d.lanes=a.lanes,d.child=a.child,d.memoizedProps=a.memoizedProps,d.memoizedState=a.memoizedState,d.updateQueue=a.updateQueue,l=a.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=a.sibling,d.index=a.index,d.ref=a.ref,d.refCleanup=a.refCleanup,d}function Cb(a,l){a.flags&=65011714;var d=a.alternate;return d===null?(a.childLanes=0,a.lanes=l,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=d.childLanes,a.lanes=d.lanes,a.child=d.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=d.memoizedProps,a.memoizedState=d.memoizedState,a.updateQueue=d.updateQueue,a.type=d.type,l=d.dependencies,a.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),a}function Uf(a,l,d,p,v,x){var L=0;if(p=a,typeof a=="function")qp(a)&&(L=1);else if(typeof a=="string")L=Zz(a,d,ie.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case F:return a=ur(31,d,l,v),a.elementType=F,a.lanes=x,a;case E:return Wo(d.children,v,x,l);case C:L=8,v|=24;break;case w:return a=ur(12,d,l,v|2),a.elementType=w,a.lanes=x,a;case z:return a=ur(13,d,l,v),a.elementType=z,a.lanes=x,a;case R:return a=ur(19,d,l,v),a.elementType=R,a.lanes=x,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case k:L=10;break e;case T:L=9;break e;case S:L=11;break e;case M:L=14;break e;case X:L=16,p=null;break e}L=29,d=Error(r(130,a===null?"null":typeof a,"")),p=null}return l=ur(L,d,l,v),l.elementType=a,l.type=p,l.lanes=x,l}function Wo(a,l,d,p){return a=ur(7,a,p,l),a.lanes=d,a}function Ip(a,l,d){return a=ur(6,a,null,l),a.lanes=d,a}function Tb(a){var l=ur(18,null,null,0);return l.stateNode=a,l}function Pp(a,l,d){return l=ur(4,a.children!==null?a.children:[],a.key,l),l.lanes=d,l.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},l}var jb=new WeakMap;function Sr(a,l){if(typeof a=="object"&&a!==null){var d=jb.get(a);return d!==void 0?d:(l={value:a,source:l,stack:wt(l)},jb.set(a,l),l)}return{value:a,source:l,stack:wt(l)}}var nl=[],rl=0,Gf=null,zu=0,Cr=[],Tr=0,Ua=null,Ei=1,Si="";function Ki(a,l){nl[rl++]=zu,nl[rl++]=Gf,Gf=a,zu=l}function Ab(a,l,d){Cr[Tr++]=Ei,Cr[Tr++]=Si,Cr[Tr++]=Ua,Ua=a;var p=Ei;a=Si;var v=32-vt(p)-1;p&=~(1<<v),d+=1;var x=32-vt(l)+v;if(30<x){var L=v-v%5;x=(p&(1<<L)-1).toString(32),p>>=L,v-=L,Ei=1<<32-vt(l)+v|d<<v|p,Si=x+a}else Ei=1<<x|d<<v|p,Si=a}function $p(a){a.return!==null&&(Ki(a,1),Ab(a,1,0))}function Bp(a){for(;a===Gf;)Gf=nl[--rl],nl[rl]=null,zu=nl[--rl],nl[rl]=null;for(;a===Ua;)Ua=Cr[--Tr],Cr[Tr]=null,Si=Cr[--Tr],Cr[Tr]=null,Ei=Cr[--Tr],Cr[Tr]=null}function Rb(a,l){Cr[Tr++]=Ei,Cr[Tr++]=Si,Cr[Tr++]=Ua,Ei=l.id,Si=l.overflow,Ua=a}var En=null,It=null,ct=!1,Ga=null,jr=!1,Up=Error(r(519));function Fa(a){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Mu(Sr(l,a)),Up}function Nb(a){var l=a.stateNode,d=a.type,p=a.memoizedProps;switch(l[en]=a,l[De]=p,d){case"dialog":ot("cancel",l),ot("close",l);break;case"iframe":case"object":case"embed":ot("load",l);break;case"video":case"audio":for(d=0;d<nc.length;d++)ot(nc[d],l);break;case"source":ot("error",l);break;case"img":case"image":case"link":ot("error",l),ot("load",l);break;case"details":ot("toggle",l);break;case"input":ot("invalid",l),Oa(l,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":ot("invalid",l);break;case"textarea":ot("invalid",l),xu(l,p.value,p.defaultValue,p.children)}d=p.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||p.suppressHydrationWarning===!0||Yw(l.textContent,d)?(p.popover!=null&&(ot("beforetoggle",l),ot("toggle",l)),p.onScroll!=null&&ot("scroll",l),p.onScrollEnd!=null&&ot("scrollend",l),p.onClick!=null&&(l.onclick=Xr),l=!0):l=!1,l||Fa(a,!0)}function Lb(a){for(En=a.return;En;)switch(En.tag){case 5:case 31:case 13:jr=!1;return;case 27:case 3:jr=!0;return;default:En=En.return}}function il(a){if(a!==En)return!1;if(!ct)return Lb(a),ct=!0,!1;var l=a.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=a.type,d=!(d!=="form"&&d!=="button")||og(a.type,a.memoizedProps)),d=!d),d&&It&&Fa(a),Lb(a),l===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));It=rk(a)}else if(l===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));It=rk(a)}else l===27?(l=It,io(a.type)?(a=fg,fg=null,It=a):It=l):It=En?Rr(a.stateNode.nextSibling):null;return!0}function Ko(){It=En=null,ct=!1}function Gp(){var a=Ga;return a!==null&&(Zn===null?Zn=a:Zn.push.apply(Zn,a),Ga=null),a}function Mu(a){Ga===null?Ga=[a]:Ga.push(a)}var Fp=B(null),Qo=null,Qi=null;function Ha(a,l,d){O(Fp,l._currentValue),l._currentValue=d}function Zi(a){a._currentValue=Fp.current,ee(Fp)}function Hp(a,l,d){for(;a!==null;){var p=a.alternate;if((a.childLanes&l)!==l?(a.childLanes|=l,p!==null&&(p.childLanes|=l)):p!==null&&(p.childLanes&l)!==l&&(p.childLanes|=l),a===d)break;a=a.return}}function Vp(a,l,d,p){var v=a.child;for(v!==null&&(v.return=a);v!==null;){var x=v.dependencies;if(x!==null){var L=v.child;x=x.firstContext;e:for(;x!==null;){var V=x;x=v;for(var te=0;te<l.length;te++)if(V.context===l[te]){x.lanes|=d,V=x.alternate,V!==null&&(V.lanes|=d),Hp(x.return,d,a),p||(L=null);break e}x=V.next}}else if(v.tag===18){if(L=v.return,L===null)throw Error(r(341));L.lanes|=d,x=L.alternate,x!==null&&(x.lanes|=d),Hp(L,d,a),L=null}else L=v.child;if(L!==null)L.return=v;else for(L=v;L!==null;){if(L===a){L=null;break}if(v=L.sibling,v!==null){v.return=L.return,L=v;break}L=L.return}v=L}}function al(a,l,d,p){a=null;for(var v=l,x=!1;v!==null;){if(!x){if((v.flags&524288)!==0)x=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var L=v.alternate;if(L===null)throw Error(r(387));if(L=L.memoizedProps,L!==null){var V=v.type;lr(v.pendingProps.value,L.value)||(a!==null?a.push(V):a=[V])}}else if(v===we.current){if(L=v.alternate,L===null)throw Error(r(387));L.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(a!==null?a.push(sc):a=[sc])}v=v.return}a!==null&&Vp(l,a,d,p),l.flags|=262144}function Ff(a){for(a=a.firstContext;a!==null;){if(!lr(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function Zo(a){Qo=a,Qi=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function Sn(a){return zb(Qo,a)}function Hf(a,l){return Qo===null&&Zo(a),zb(a,l)}function zb(a,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},Qi===null){if(a===null)throw Error(r(308));Qi=l,a.dependencies={lanes:0,firstContext:l},a.flags|=524288}else Qi=Qi.next=l;return d}var YL=typeof AbortController<"u"?AbortController:function(){var a=[],l=this.signal={aborted:!1,addEventListener:function(d,p){a.push(p)}};this.abort=function(){l.aborted=!0,a.forEach(function(d){return d()})}},WL=e.unstable_scheduleCallback,KL=e.unstable_NormalPriority,on={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xp(){return{controller:new YL,data:new Map,refCount:0}}function Du(a){a.refCount--,a.refCount===0&&WL(KL,function(){a.controller.abort()})}var Ou=null,Yp=0,ol=0,sl=null;function QL(a,l){if(Ou===null){var d=Ou=[];Yp=0,ol=Q_(),sl={status:"pending",value:void 0,then:function(p){d.push(p)}}}return Yp++,l.then(Mb,Mb),l}function Mb(){if(--Yp===0&&Ou!==null){sl!==null&&(sl.status="fulfilled");var a=Ou;Ou=null,ol=0,sl=null;for(var l=0;l<a.length;l++)(0,a[l])()}}function ZL(a,l){var d=[],p={status:"pending",value:null,reason:null,then:function(v){d.push(v)}};return a.then(function(){p.status="fulfilled",p.value=l;for(var v=0;v<d.length;v++)(0,d[v])(l)},function(v){for(p.status="rejected",p.reason=v,v=0;v<d.length;v++)(0,d[v])(void 0)}),p}var Db=A.S;A.S=function(a,l){yw=ft(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&QL(a,l),Db!==null&&Db(a,l)};var Jo=B(null);function Wp(){var a=Jo.current;return a!==null?a:Nt.pooledCache}function Vf(a,l){l===null?O(Jo,Jo.current):O(Jo,l.pool)}function Ob(){var a=Wp();return a===null?null:{parent:on._currentValue,pool:a}}var ll=Error(r(460)),Kp=Error(r(474)),Xf=Error(r(542)),Yf={then:function(){}};function qb(a){return a=a.status,a==="fulfilled"||a==="rejected"}function Ib(a,l,d){switch(d=a[d],d===void 0?a.push(l):d!==l&&(l.then(Xr,Xr),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw a=l.reason,$b(a),a;default:if(typeof l.status=="string")l.then(Xr,Xr);else{if(a=Nt,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=l,a.status="pending",a.then(function(p){if(l.status==="pending"){var v=l;v.status="fulfilled",v.value=p}},function(p){if(l.status==="pending"){var v=l;v.status="rejected",v.reason=p}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw a=l.reason,$b(a),a}throw ts=l,ll}}function es(a){try{var l=a._init;return l(a._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(ts=d,ll):d}}var ts=null;function Pb(){if(ts===null)throw Error(r(459));var a=ts;return ts=null,a}function $b(a){if(a===ll||a===Xf)throw Error(r(483))}var ul=null,qu=0;function Wf(a){var l=qu;return qu+=1,ul===null&&(ul=[]),Ib(ul,a,l)}function Iu(a,l){l=l.props.ref,a.ref=l!==void 0?l:null}function Kf(a,l){throw l.$$typeof===_?Error(r(525)):(a=Object.prototype.toString.call(l),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":a)))}function Bb(a){function l(ae,re){if(a){var ce=ae.deletions;ce===null?(ae.deletions=[re],ae.flags|=16):ce.push(re)}}function d(ae,re){if(!a)return null;for(;re!==null;)l(ae,re),re=re.sibling;return null}function p(ae){for(var re=new Map;ae!==null;)ae.key!==null?re.set(ae.key,ae):re.set(ae.index,ae),ae=ae.sibling;return re}function v(ae,re){return ae=Wi(ae,re),ae.index=0,ae.sibling=null,ae}function x(ae,re,ce){return ae.index=ce,a?(ce=ae.alternate,ce!==null?(ce=ce.index,ce<re?(ae.flags|=67108866,re):ce):(ae.flags|=67108866,re)):(ae.flags|=1048576,re)}function L(ae){return a&&ae.alternate===null&&(ae.flags|=67108866),ae}function V(ae,re,ce,xe){return re===null||re.tag!==6?(re=Ip(ce,ae.mode,xe),re.return=ae,re):(re=v(re,ce),re.return=ae,re)}function te(ae,re,ce,xe){var Fe=ce.type;return Fe===E?ve(ae,re,ce.props.children,xe,ce.key):re!==null&&(re.elementType===Fe||typeof Fe=="object"&&Fe!==null&&Fe.$$typeof===X&&es(Fe)===re.type)?(re=v(re,ce.props),Iu(re,ce),re.return=ae,re):(re=Uf(ce.type,ce.key,ce.props,null,ae.mode,xe),Iu(re,ce),re.return=ae,re)}function fe(ae,re,ce,xe){return re===null||re.tag!==4||re.stateNode.containerInfo!==ce.containerInfo||re.stateNode.implementation!==ce.implementation?(re=Pp(ce,ae.mode,xe),re.return=ae,re):(re=v(re,ce.children||[]),re.return=ae,re)}function ve(ae,re,ce,xe,Fe){return re===null||re.tag!==7?(re=Wo(ce,ae.mode,xe,Fe),re.return=ae,re):(re=v(re,ce),re.return=ae,re)}function Se(ae,re,ce){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return re=Ip(""+re,ae.mode,ce),re.return=ae,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case g:return ce=Uf(re.type,re.key,re.props,null,ae.mode,ce),Iu(ce,re),ce.return=ae,ce;case b:return re=Pp(re,ae.mode,ce),re.return=ae,re;case X:return re=es(re),Se(ae,re,ce)}if(Z(re)||G(re))return re=Wo(re,ae.mode,ce,null),re.return=ae,re;if(typeof re.then=="function")return Se(ae,Wf(re),ce);if(re.$$typeof===k)return Se(ae,Hf(ae,re),ce);Kf(ae,re)}return null}function he(ae,re,ce,xe){var Fe=re!==null?re.key:null;if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return Fe!==null?null:V(ae,re,""+ce,xe);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case g:return ce.key===Fe?te(ae,re,ce,xe):null;case b:return ce.key===Fe?fe(ae,re,ce,xe):null;case X:return ce=es(ce),he(ae,re,ce,xe)}if(Z(ce)||G(ce))return Fe!==null?null:ve(ae,re,ce,xe,null);if(typeof ce.then=="function")return he(ae,re,Wf(ce),xe);if(ce.$$typeof===k)return he(ae,re,Hf(ae,ce),xe);Kf(ae,ce)}return null}function pe(ae,re,ce,xe,Fe){if(typeof xe=="string"&&xe!==""||typeof xe=="number"||typeof xe=="bigint")return ae=ae.get(ce)||null,V(re,ae,""+xe,Fe);if(typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case g:return ae=ae.get(xe.key===null?ce:xe.key)||null,te(re,ae,xe,Fe);case b:return ae=ae.get(xe.key===null?ce:xe.key)||null,fe(re,ae,xe,Fe);case X:return xe=es(xe),pe(ae,re,ce,xe,Fe)}if(Z(xe)||G(xe))return ae=ae.get(ce)||null,ve(re,ae,xe,Fe,null);if(typeof xe.then=="function")return pe(ae,re,ce,Wf(xe),Fe);if(xe.$$typeof===k)return pe(ae,re,ce,Hf(re,xe),Fe);Kf(re,xe)}return null}function Ie(ae,re,ce,xe){for(var Fe=null,_t=null,Be=re,rt=re=0,ut=null;Be!==null&&rt<ce.length;rt++){Be.index>rt?(ut=Be,Be=null):ut=Be.sibling;var gt=he(ae,Be,ce[rt],xe);if(gt===null){Be===null&&(Be=ut);break}a&&Be&&gt.alternate===null&&l(ae,Be),re=x(gt,re,rt),_t===null?Fe=gt:_t.sibling=gt,_t=gt,Be=ut}if(rt===ce.length)return d(ae,Be),ct&&Ki(ae,rt),Fe;if(Be===null){for(;rt<ce.length;rt++)Be=Se(ae,ce[rt],xe),Be!==null&&(re=x(Be,re,rt),_t===null?Fe=Be:_t.sibling=Be,_t=Be);return ct&&Ki(ae,rt),Fe}for(Be=p(Be);rt<ce.length;rt++)ut=pe(Be,ae,rt,ce[rt],xe),ut!==null&&(a&&ut.alternate!==null&&Be.delete(ut.key===null?rt:ut.key),re=x(ut,re,rt),_t===null?Fe=ut:_t.sibling=ut,_t=ut);return a&&Be.forEach(function(uo){return l(ae,uo)}),ct&&Ki(ae,rt),Fe}function Ye(ae,re,ce,xe){if(ce==null)throw Error(r(151));for(var Fe=null,_t=null,Be=re,rt=re=0,ut=null,gt=ce.next();Be!==null&&!gt.done;rt++,gt=ce.next()){Be.index>rt?(ut=Be,Be=null):ut=Be.sibling;var uo=he(ae,Be,gt.value,xe);if(uo===null){Be===null&&(Be=ut);break}a&&Be&&uo.alternate===null&&l(ae,Be),re=x(uo,re,rt),_t===null?Fe=uo:_t.sibling=uo,_t=uo,Be=ut}if(gt.done)return d(ae,Be),ct&&Ki(ae,rt),Fe;if(Be===null){for(;!gt.done;rt++,gt=ce.next())gt=Se(ae,gt.value,xe),gt!==null&&(re=x(gt,re,rt),_t===null?Fe=gt:_t.sibling=gt,_t=gt);return ct&&Ki(ae,rt),Fe}for(Be=p(Be);!gt.done;rt++,gt=ce.next())gt=pe(Be,ae,rt,gt.value,xe),gt!==null&&(a&&gt.alternate!==null&&Be.delete(gt.key===null?rt:gt.key),re=x(gt,re,rt),_t===null?Fe=gt:_t.sibling=gt,_t=gt);return a&&Be.forEach(function(u3){return l(ae,u3)}),ct&&Ki(ae,rt),Fe}function Rt(ae,re,ce,xe){if(typeof ce=="object"&&ce!==null&&ce.type===E&&ce.key===null&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case g:e:{for(var Fe=ce.key;re!==null;){if(re.key===Fe){if(Fe=ce.type,Fe===E){if(re.tag===7){d(ae,re.sibling),xe=v(re,ce.props.children),xe.return=ae,ae=xe;break e}}else if(re.elementType===Fe||typeof Fe=="object"&&Fe!==null&&Fe.$$typeof===X&&es(Fe)===re.type){d(ae,re.sibling),xe=v(re,ce.props),Iu(xe,ce),xe.return=ae,ae=xe;break e}d(ae,re);break}else l(ae,re);re=re.sibling}ce.type===E?(xe=Wo(ce.props.children,ae.mode,xe,ce.key),xe.return=ae,ae=xe):(xe=Uf(ce.type,ce.key,ce.props,null,ae.mode,xe),Iu(xe,ce),xe.return=ae,ae=xe)}return L(ae);case b:e:{for(Fe=ce.key;re!==null;){if(re.key===Fe)if(re.tag===4&&re.stateNode.containerInfo===ce.containerInfo&&re.stateNode.implementation===ce.implementation){d(ae,re.sibling),xe=v(re,ce.children||[]),xe.return=ae,ae=xe;break e}else{d(ae,re);break}else l(ae,re);re=re.sibling}xe=Pp(ce,ae.mode,xe),xe.return=ae,ae=xe}return L(ae);case X:return ce=es(ce),Rt(ae,re,ce,xe)}if(Z(ce))return Ie(ae,re,ce,xe);if(G(ce)){if(Fe=G(ce),typeof Fe!="function")throw Error(r(150));return ce=Fe.call(ce),Ye(ae,re,ce,xe)}if(typeof ce.then=="function")return Rt(ae,re,Wf(ce),xe);if(ce.$$typeof===k)return Rt(ae,re,Hf(ae,ce),xe);Kf(ae,ce)}return typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint"?(ce=""+ce,re!==null&&re.tag===6?(d(ae,re.sibling),xe=v(re,ce),xe.return=ae,ae=xe):(d(ae,re),xe=Ip(ce,ae.mode,xe),xe.return=ae,ae=xe),L(ae)):d(ae,re)}return function(ae,re,ce,xe){try{qu=0;var Fe=Rt(ae,re,ce,xe);return ul=null,Fe}catch(Be){if(Be===ll||Be===Xf)throw Be;var _t=ur(29,Be,null,ae.mode);return _t.lanes=xe,_t.return=ae,_t}finally{}}}var ns=Bb(!0),Ub=Bb(!1),Va=!1;function Qp(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Zp(a,l){a=a.updateQueue,l.updateQueue===a&&(l.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Xa(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function Ya(a,l,d){var p=a.updateQueue;if(p===null)return null;if(p=p.shared,(bt&2)!==0){var v=p.pending;return v===null?l.next=l:(l.next=v.next,v.next=l),p.pending=l,l=Bf(a),Sb(a,null,d),l}return $f(a,p,l,d),Bf(a)}function Pu(a,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var p=l.lanes;p&=a.pendingLanes,d|=p,l.lanes=d,Ui(a,d)}}function Jp(a,l){var d=a.updateQueue,p=a.alternate;if(p!==null&&(p=p.updateQueue,d===p)){var v=null,x=null;if(d=d.firstBaseUpdate,d!==null){do{var L={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};x===null?v=x=L:x=x.next=L,d=d.next}while(d!==null);x===null?v=x=l:x=x.next=l}else v=x=l;d={baseState:p.baseState,firstBaseUpdate:v,lastBaseUpdate:x,shared:p.shared,callbacks:p.callbacks},a.updateQueue=d;return}a=d.lastBaseUpdate,a===null?d.firstBaseUpdate=l:a.next=l,d.lastBaseUpdate=l}var e_=!1;function $u(){if(e_){var a=sl;if(a!==null)throw a}}function Bu(a,l,d,p){e_=!1;var v=a.updateQueue;Va=!1;var x=v.firstBaseUpdate,L=v.lastBaseUpdate,V=v.shared.pending;if(V!==null){v.shared.pending=null;var te=V,fe=te.next;te.next=null,L===null?x=fe:L.next=fe,L=te;var ve=a.alternate;ve!==null&&(ve=ve.updateQueue,V=ve.lastBaseUpdate,V!==L&&(V===null?ve.firstBaseUpdate=fe:V.next=fe,ve.lastBaseUpdate=te))}if(x!==null){var Se=v.baseState;L=0,ve=fe=te=null,V=x;do{var he=V.lane&-536870913,pe=he!==V.lane;if(pe?(lt&he)===he:(p&he)===he){he!==0&&he===ol&&(e_=!0),ve!==null&&(ve=ve.next={lane:0,tag:V.tag,payload:V.payload,callback:null,next:null});e:{var Ie=a,Ye=V;he=l;var Rt=d;switch(Ye.tag){case 1:if(Ie=Ye.payload,typeof Ie=="function"){Se=Ie.call(Rt,Se,he);break e}Se=Ie;break e;case 3:Ie.flags=Ie.flags&-65537|128;case 0:if(Ie=Ye.payload,he=typeof Ie=="function"?Ie.call(Rt,Se,he):Ie,he==null)break e;Se=m({},Se,he);break e;case 2:Va=!0}}he=V.callback,he!==null&&(a.flags|=64,pe&&(a.flags|=8192),pe=v.callbacks,pe===null?v.callbacks=[he]:pe.push(he))}else pe={lane:he,tag:V.tag,payload:V.payload,callback:V.callback,next:null},ve===null?(fe=ve=pe,te=Se):ve=ve.next=pe,L|=he;if(V=V.next,V===null){if(V=v.shared.pending,V===null)break;pe=V,V=pe.next,pe.next=null,v.lastBaseUpdate=pe,v.shared.pending=null}}while(!0);ve===null&&(te=Se),v.baseState=te,v.firstBaseUpdate=fe,v.lastBaseUpdate=ve,x===null&&(v.shared.lanes=0),Ja|=L,a.lanes=L,a.memoizedState=Se}}function Gb(a,l){if(typeof a!="function")throw Error(r(191,a));a.call(l)}function Fb(a,l){var d=a.callbacks;if(d!==null)for(a.callbacks=null,a=0;a<d.length;a++)Gb(d[a],l)}var cl=B(null),Qf=B(0);function Hb(a,l){a=sa,O(Qf,a),O(cl,l),sa=a|l.baseLanes}function t_(){O(Qf,sa),O(cl,cl.current)}function n_(){sa=Qf.current,ee(cl),ee(Qf)}var cr=B(null),Ar=null;function Wa(a){var l=a.alternate;O(tn,tn.current&1),O(cr,a),Ar===null&&(l===null||cl.current!==null||l.memoizedState!==null)&&(Ar=a)}function r_(a){O(tn,tn.current),O(cr,a),Ar===null&&(Ar=a)}function Vb(a){a.tag===22?(O(tn,tn.current),O(cr,a),Ar===null&&(Ar=a)):Ka()}function Ka(){O(tn,tn.current),O(cr,cr.current)}function fr(a){ee(cr),Ar===a&&(Ar=null),ee(tn)}var tn=B(0);function Zf(a){for(var l=a;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||ug(d)||cg(d)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Ji=0,tt=null,jt=null,sn=null,Jf=!1,fl=!1,rs=!1,ed=0,Uu=0,dl=null,JL=0;function Qt(){throw Error(r(321))}function i_(a,l){if(l===null)return!1;for(var d=0;d<l.length&&d<a.length;d++)if(!lr(a[d],l[d]))return!1;return!0}function a_(a,l,d,p,v,x){return Ji=x,tt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,A.H=a===null||a.memoizedState===null?Ax:b_,rs=!1,x=d(p,v),rs=!1,fl&&(x=Yb(l,d,p,v)),Xb(a),x}function Xb(a){A.H=Hu;var l=jt!==null&&jt.next!==null;if(Ji=0,sn=jt=tt=null,Jf=!1,Uu=0,dl=null,l)throw Error(r(300));a===null||ln||(a=a.dependencies,a!==null&&Ff(a)&&(ln=!0))}function Yb(a,l,d,p){tt=a;var v=0;do{if(fl&&(dl=null),Uu=0,fl=!1,25<=v)throw Error(r(301));if(v+=1,sn=jt=null,a.updateQueue!=null){var x=a.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}A.H=Rx,x=l(d,p)}while(fl);return x}function ez(){var a=A.H,l=a.useState()[0];return l=typeof l.then=="function"?Gu(l):l,a=a.useState()[0],(jt!==null?jt.memoizedState:null)!==a&&(tt.flags|=1024),l}function o_(){var a=ed!==0;return ed=0,a}function s_(a,l,d){l.updateQueue=a.updateQueue,l.flags&=-2053,a.lanes&=~d}function l_(a){if(Jf){for(a=a.memoizedState;a!==null;){var l=a.queue;l!==null&&(l.pending=null),a=a.next}Jf=!1}Ji=0,sn=jt=tt=null,fl=!1,Uu=ed=0,dl=null}function Hn(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return sn===null?tt.memoizedState=sn=a:sn=sn.next=a,sn}function nn(){if(jt===null){var a=tt.alternate;a=a!==null?a.memoizedState:null}else a=jt.next;var l=sn===null?tt.memoizedState:sn.next;if(l!==null)sn=l,jt=a;else{if(a===null)throw tt.alternate===null?Error(r(467)):Error(r(310));jt=a,a={memoizedState:jt.memoizedState,baseState:jt.baseState,baseQueue:jt.baseQueue,queue:jt.queue,next:null},sn===null?tt.memoizedState=sn=a:sn=sn.next=a}return sn}function td(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gu(a){var l=Uu;return Uu+=1,dl===null&&(dl=[]),a=Ib(dl,a,l),l=tt,(sn===null?l.memoizedState:sn.next)===null&&(l=l.alternate,A.H=l===null||l.memoizedState===null?Ax:b_),a}function nd(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Gu(a);if(a.$$typeof===k)return Sn(a)}throw Error(r(438,String(a)))}function u_(a){var l=null,d=tt.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var p=tt.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(l={data:p.data.map(function(v){return v.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=td(),tt.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(a),p=0;p<a;p++)d[p]=I;return l.index++,d}function ea(a,l){return typeof l=="function"?l(a):l}function rd(a){var l=nn();return c_(l,jt,a)}function c_(a,l,d){var p=a.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=d;var v=a.baseQueue,x=p.pending;if(x!==null){if(v!==null){var L=v.next;v.next=x.next,x.next=L}l.baseQueue=v=x,p.pending=null}if(x=a.baseState,v===null)a.memoizedState=x;else{l=v.next;var V=L=null,te=null,fe=l,ve=!1;do{var Se=fe.lane&-536870913;if(Se!==fe.lane?(lt&Se)===Se:(Ji&Se)===Se){var he=fe.revertLane;if(he===0)te!==null&&(te=te.next={lane:0,revertLane:0,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null}),Se===ol&&(ve=!0);else if((Ji&he)===he){fe=fe.next,he===ol&&(ve=!0);continue}else Se={lane:0,revertLane:fe.revertLane,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},te===null?(V=te=Se,L=x):te=te.next=Se,tt.lanes|=he,Ja|=he;Se=fe.action,rs&&d(x,Se),x=fe.hasEagerState?fe.eagerState:d(x,Se)}else he={lane:Se,revertLane:fe.revertLane,gesture:fe.gesture,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},te===null?(V=te=he,L=x):te=te.next=he,tt.lanes|=Se,Ja|=Se;fe=fe.next}while(fe!==null&&fe!==l);if(te===null?L=x:te.next=V,!lr(x,a.memoizedState)&&(ln=!0,ve&&(d=sl,d!==null)))throw d;a.memoizedState=x,a.baseState=L,a.baseQueue=te,p.lastRenderedState=x}return v===null&&(p.lanes=0),[a.memoizedState,p.dispatch]}function f_(a){var l=nn(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=a;var p=d.dispatch,v=d.pending,x=l.memoizedState;if(v!==null){d.pending=null;var L=v=v.next;do x=a(x,L.action),L=L.next;while(L!==v);lr(x,l.memoizedState)||(ln=!0),l.memoizedState=x,l.baseQueue===null&&(l.baseState=x),d.lastRenderedState=x}return[x,p]}function Wb(a,l,d){var p=tt,v=nn(),x=ct;if(x){if(d===void 0)throw Error(r(407));d=d()}else d=l();var L=!lr((jt||v).memoizedState,d);if(L&&(v.memoizedState=d,ln=!0),v=v.queue,m_(Zb.bind(null,p,v,a),[a]),v.getSnapshot!==l||L||sn!==null&&sn.memoizedState.tag&1){if(p.flags|=2048,hl(9,{destroy:void 0},Qb.bind(null,p,v,d,l),null),Nt===null)throw Error(r(349));x||(Ji&127)!==0||Kb(p,l,d)}return d}function Kb(a,l,d){a.flags|=16384,a={getSnapshot:l,value:d},l=tt.updateQueue,l===null?(l=td(),tt.updateQueue=l,l.stores=[a]):(d=l.stores,d===null?l.stores=[a]:d.push(a))}function Qb(a,l,d,p){l.value=d,l.getSnapshot=p,Jb(l)&&ex(a)}function Zb(a,l,d){return d(function(){Jb(l)&&ex(a)})}function Jb(a){var l=a.getSnapshot;a=a.value;try{var d=l();return!lr(a,d)}catch{return!0}}function ex(a){var l=Yo(a,2);l!==null&&Jn(l,a,2)}function d_(a){var l=Hn();if(typeof a=="function"){var d=a;if(a=d(),rs){Jt(!0);try{d()}finally{Jt(!1)}}}return l.memoizedState=l.baseState=a,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:a},l}function tx(a,l,d,p){return a.baseState=d,c_(a,jt,typeof p=="function"?p:ea)}function tz(a,l,d,p,v){if(od(a))throw Error(r(485));if(a=l.action,a!==null){var x={payload:v,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(L){x.listeners.push(L)}};A.T!==null?d(!0):x.isTransition=!1,p(x),d=l.pending,d===null?(x.next=l.pending=x,nx(l,x)):(x.next=d.next,l.pending=d.next=x)}}function nx(a,l){var d=l.action,p=l.payload,v=a.state;if(l.isTransition){var x=A.T,L={};A.T=L;try{var V=d(v,p),te=A.S;te!==null&&te(L,V),rx(a,l,V)}catch(fe){h_(a,l,fe)}finally{x!==null&&L.types!==null&&(x.types=L.types),A.T=x}}else try{x=d(v,p),rx(a,l,x)}catch(fe){h_(a,l,fe)}}function rx(a,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(p){ix(a,l,p)},function(p){return h_(a,l,p)}):ix(a,l,d)}function ix(a,l,d){l.status="fulfilled",l.value=d,ax(l),a.state=d,l=a.pending,l!==null&&(d=l.next,d===l?a.pending=null:(d=d.next,l.next=d,nx(a,d)))}function h_(a,l,d){var p=a.pending;if(a.pending=null,p!==null){p=p.next;do l.status="rejected",l.reason=d,ax(l),l=l.next;while(l!==p)}a.action=null}function ax(a){a=a.listeners;for(var l=0;l<a.length;l++)(0,a[l])()}function ox(a,l){return l}function sx(a,l){if(ct){var d=Nt.formState;if(d!==null){e:{var p=tt;if(ct){if(It){t:{for(var v=It,x=jr;v.nodeType!==8;){if(!x){v=null;break t}if(v=Rr(v.nextSibling),v===null){v=null;break t}}x=v.data,v=x==="F!"||x==="F"?v:null}if(v){It=Rr(v.nextSibling),p=v.data==="F!";break e}}Fa(p)}p=!1}p&&(l=d[0])}}return d=Hn(),d.memoizedState=d.baseState=l,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ox,lastRenderedState:l},d.queue=p,d=Cx.bind(null,tt,p),p.dispatch=d,p=d_(!1),x=v_.bind(null,tt,!1,p.queue),p=Hn(),v={state:l,dispatch:null,action:a,pending:null},p.queue=v,d=tz.bind(null,tt,v,x,d),v.dispatch=d,p.memoizedState=a,[l,d,!1]}function lx(a){var l=nn();return ux(l,jt,a)}function ux(a,l,d){if(l=c_(a,l,ox)[0],a=rd(ea)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var p=Gu(l)}catch(L){throw L===ll?Xf:L}else p=l;l=nn();var v=l.queue,x=v.dispatch;return d!==l.memoizedState&&(tt.flags|=2048,hl(9,{destroy:void 0},nz.bind(null,v,d),null)),[p,x,a]}function nz(a,l){a.action=l}function cx(a){var l=nn(),d=jt;if(d!==null)return ux(l,d,a);nn(),l=l.memoizedState,d=nn();var p=d.queue.dispatch;return d.memoizedState=a,[l,p,!1]}function hl(a,l,d,p){return a={tag:a,create:d,deps:p,inst:l,next:null},l=tt.updateQueue,l===null&&(l=td(),tt.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=a.next=a:(p=d.next,d.next=a,a.next=p,l.lastEffect=a),a}function fx(){return nn().memoizedState}function id(a,l,d,p){var v=Hn();tt.flags|=a,v.memoizedState=hl(1|l,{destroy:void 0},d,p===void 0?null:p)}function ad(a,l,d,p){var v=nn();p=p===void 0?null:p;var x=v.memoizedState.inst;jt!==null&&p!==null&&i_(p,jt.memoizedState.deps)?v.memoizedState=hl(l,x,d,p):(tt.flags|=a,v.memoizedState=hl(1|l,x,d,p))}function dx(a,l){id(8390656,8,a,l)}function m_(a,l){ad(2048,8,a,l)}function rz(a){tt.flags|=4;var l=tt.updateQueue;if(l===null)l=td(),tt.updateQueue=l,l.events=[a];else{var d=l.events;d===null?l.events=[a]:d.push(a)}}function hx(a){var l=nn().memoizedState;return rz({ref:l,nextImpl:a}),function(){if((bt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function mx(a,l){return ad(4,2,a,l)}function px(a,l){return ad(4,4,a,l)}function _x(a,l){if(typeof l=="function"){a=a();var d=l(a);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return a=a(),l.current=a,function(){l.current=null}}function gx(a,l,d){d=d!=null?d.concat([a]):null,ad(4,4,_x.bind(null,l,a),d)}function p_(){}function yx(a,l){var d=nn();l=l===void 0?null:l;var p=d.memoizedState;return l!==null&&i_(l,p[1])?p[0]:(d.memoizedState=[a,l],a)}function vx(a,l){var d=nn();l=l===void 0?null:l;var p=d.memoizedState;if(l!==null&&i_(l,p[1]))return p[0];if(p=a(),rs){Jt(!0);try{a()}finally{Jt(!1)}}return d.memoizedState=[p,l],p}function __(a,l,d){return d===void 0||(Ji&1073741824)!==0&&(lt&261930)===0?a.memoizedState=l:(a.memoizedState=d,a=bw(),tt.lanes|=a,Ja|=a,d)}function bx(a,l,d,p){return lr(d,l)?d:cl.current!==null?(a=__(a,d,p),lr(a,l)||(ln=!0),a):(Ji&42)===0||(Ji&1073741824)!==0&&(lt&261930)===0?(ln=!0,a.memoizedState=d):(a=bw(),tt.lanes|=a,Ja|=a,l)}function xx(a,l,d,p,v){var x=N.p;N.p=x!==0&&8>x?x:8;var L=A.T,V={};A.T=V,v_(a,!1,l,d);try{var te=v(),fe=A.S;if(fe!==null&&fe(V,te),te!==null&&typeof te=="object"&&typeof te.then=="function"){var ve=ZL(te,p);Fu(a,l,ve,mr(a))}else Fu(a,l,p,mr(a))}catch(Se){Fu(a,l,{then:function(){},status:"rejected",reason:Se},mr())}finally{N.p=x,L!==null&&V.types!==null&&(L.types=V.types),A.T=L}}function iz(){}function g_(a,l,d,p){if(a.tag!==5)throw Error(r(476));var v=wx(a).queue;xx(a,v,l,H,d===null?iz:function(){return kx(a),d(p)})}function wx(a){var l=a.memoizedState;if(l!==null)return l;l={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:H},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:d},next:null},a.memoizedState=l,a=a.alternate,a!==null&&(a.memoizedState=l),l}function kx(a){var l=wx(a);l.next===null&&(l=a.alternate.memoizedState),Fu(a,l.next.queue,{},mr())}function y_(){return Sn(sc)}function Ex(){return nn().memoizedState}function Sx(){return nn().memoizedState}function az(a){for(var l=a.return;l!==null;){switch(l.tag){case 24:case 3:var d=mr();a=Xa(d);var p=Ya(l,a,d);p!==null&&(Jn(p,l,d),Pu(p,l,d)),l={cache:Xp()},a.payload=l;return}l=l.return}}function oz(a,l,d){var p=mr();d={lane:p,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},od(a)?Tx(l,d):(d=Op(a,l,d,p),d!==null&&(Jn(d,a,p),jx(d,l,p)))}function Cx(a,l,d){var p=mr();Fu(a,l,d,p)}function Fu(a,l,d,p){var v={lane:p,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(od(a))Tx(l,v);else{var x=a.alternate;if(a.lanes===0&&(x===null||x.lanes===0)&&(x=l.lastRenderedReducer,x!==null))try{var L=l.lastRenderedState,V=x(L,d);if(v.hasEagerState=!0,v.eagerState=V,lr(V,L))return $f(a,l,v,0),Nt===null&&Pf(),!1}catch{}finally{}if(d=Op(a,l,v,p),d!==null)return Jn(d,a,p),jx(d,l,p),!0}return!1}function v_(a,l,d,p){if(p={lane:2,revertLane:Q_(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},od(a)){if(l)throw Error(r(479))}else l=Op(a,d,p,2),l!==null&&Jn(l,a,2)}function od(a){var l=a.alternate;return a===tt||l!==null&&l===tt}function Tx(a,l){fl=Jf=!0;var d=a.pending;d===null?l.next=l:(l.next=d.next,d.next=l),a.pending=l}function jx(a,l,d){if((d&4194048)!==0){var p=l.lanes;p&=a.pendingLanes,d|=p,l.lanes=d,Ui(a,d)}}var Hu={readContext:Sn,use:nd,useCallback:Qt,useContext:Qt,useEffect:Qt,useImperativeHandle:Qt,useLayoutEffect:Qt,useInsertionEffect:Qt,useMemo:Qt,useReducer:Qt,useRef:Qt,useState:Qt,useDebugValue:Qt,useDeferredValue:Qt,useTransition:Qt,useSyncExternalStore:Qt,useId:Qt,useHostTransitionStatus:Qt,useFormState:Qt,useActionState:Qt,useOptimistic:Qt,useMemoCache:Qt,useCacheRefresh:Qt};Hu.useEffectEvent=Qt;var Ax={readContext:Sn,use:nd,useCallback:function(a,l){return Hn().memoizedState=[a,l===void 0?null:l],a},useContext:Sn,useEffect:dx,useImperativeHandle:function(a,l,d){d=d!=null?d.concat([a]):null,id(4194308,4,_x.bind(null,l,a),d)},useLayoutEffect:function(a,l){return id(4194308,4,a,l)},useInsertionEffect:function(a,l){id(4,2,a,l)},useMemo:function(a,l){var d=Hn();l=l===void 0?null:l;var p=a();if(rs){Jt(!0);try{a()}finally{Jt(!1)}}return d.memoizedState=[p,l],p},useReducer:function(a,l,d){var p=Hn();if(d!==void 0){var v=d(l);if(rs){Jt(!0);try{d(l)}finally{Jt(!1)}}}else v=l;return p.memoizedState=p.baseState=v,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:v},p.queue=a,a=a.dispatch=oz.bind(null,tt,a),[p.memoizedState,a]},useRef:function(a){var l=Hn();return a={current:a},l.memoizedState=a},useState:function(a){a=d_(a);var l=a.queue,d=Cx.bind(null,tt,l);return l.dispatch=d,[a.memoizedState,d]},useDebugValue:p_,useDeferredValue:function(a,l){var d=Hn();return __(d,a,l)},useTransition:function(){var a=d_(!1);return a=xx.bind(null,tt,a.queue,!0,!1),Hn().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,l,d){var p=tt,v=Hn();if(ct){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),Nt===null)throw Error(r(349));(lt&127)!==0||Kb(p,l,d)}v.memoizedState=d;var x={value:d,getSnapshot:l};return v.queue=x,dx(Zb.bind(null,p,x,a),[a]),p.flags|=2048,hl(9,{destroy:void 0},Qb.bind(null,p,x,d,l),null),d},useId:function(){var a=Hn(),l=Nt.identifierPrefix;if(ct){var d=Si,p=Ei;d=(p&~(1<<32-vt(p)-1)).toString(32)+d,l="_"+l+"R_"+d,d=ed++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=JL++,l="_"+l+"r_"+d.toString(32)+"_";return a.memoizedState=l},useHostTransitionStatus:y_,useFormState:sx,useActionState:sx,useOptimistic:function(a){var l=Hn();l.memoizedState=l.baseState=a;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=v_.bind(null,tt,!0,d),d.dispatch=l,[a,l]},useMemoCache:u_,useCacheRefresh:function(){return Hn().memoizedState=az.bind(null,tt)},useEffectEvent:function(a){var l=Hn(),d={impl:a};return l.memoizedState=d,function(){if((bt&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},b_={readContext:Sn,use:nd,useCallback:yx,useContext:Sn,useEffect:m_,useImperativeHandle:gx,useInsertionEffect:mx,useLayoutEffect:px,useMemo:vx,useReducer:rd,useRef:fx,useState:function(){return rd(ea)},useDebugValue:p_,useDeferredValue:function(a,l){var d=nn();return bx(d,jt.memoizedState,a,l)},useTransition:function(){var a=rd(ea)[0],l=nn().memoizedState;return[typeof a=="boolean"?a:Gu(a),l]},useSyncExternalStore:Wb,useId:Ex,useHostTransitionStatus:y_,useFormState:lx,useActionState:lx,useOptimistic:function(a,l){var d=nn();return tx(d,jt,a,l)},useMemoCache:u_,useCacheRefresh:Sx};b_.useEffectEvent=hx;var Rx={readContext:Sn,use:nd,useCallback:yx,useContext:Sn,useEffect:m_,useImperativeHandle:gx,useInsertionEffect:mx,useLayoutEffect:px,useMemo:vx,useReducer:f_,useRef:fx,useState:function(){return f_(ea)},useDebugValue:p_,useDeferredValue:function(a,l){var d=nn();return jt===null?__(d,a,l):bx(d,jt.memoizedState,a,l)},useTransition:function(){var a=f_(ea)[0],l=nn().memoizedState;return[typeof a=="boolean"?a:Gu(a),l]},useSyncExternalStore:Wb,useId:Ex,useHostTransitionStatus:y_,useFormState:cx,useActionState:cx,useOptimistic:function(a,l){var d=nn();return jt!==null?tx(d,jt,a,l):(d.baseState=a,[a,d.queue.dispatch])},useMemoCache:u_,useCacheRefresh:Sx};Rx.useEffectEvent=hx;function x_(a,l,d,p){l=a.memoizedState,d=d(p,l),d=d==null?l:m({},l,d),a.memoizedState=d,a.lanes===0&&(a.updateQueue.baseState=d)}var w_={enqueueSetState:function(a,l,d){a=a._reactInternals;var p=mr(),v=Xa(p);v.payload=l,d!=null&&(v.callback=d),l=Ya(a,v,p),l!==null&&(Jn(l,a,p),Pu(l,a,p))},enqueueReplaceState:function(a,l,d){a=a._reactInternals;var p=mr(),v=Xa(p);v.tag=1,v.payload=l,d!=null&&(v.callback=d),l=Ya(a,v,p),l!==null&&(Jn(l,a,p),Pu(l,a,p))},enqueueForceUpdate:function(a,l){a=a._reactInternals;var d=mr(),p=Xa(d);p.tag=2,l!=null&&(p.callback=l),l=Ya(a,p,d),l!==null&&(Jn(l,a,d),Pu(l,a,d))}};function Nx(a,l,d,p,v,x,L){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(p,x,L):l.prototype&&l.prototype.isPureReactComponent?!Nu(d,p)||!Nu(v,x):!0}function Lx(a,l,d,p){a=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,p),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,p),l.state!==a&&w_.enqueueReplaceState(l,l.state,null)}function is(a,l){var d=l;if("ref"in l){d={};for(var p in l)p!=="ref"&&(d[p]=l[p])}if(a=a.defaultProps){d===l&&(d=m({},d));for(var v in a)d[v]===void 0&&(d[v]=a[v])}return d}function zx(a){If(a)}function Mx(a){console.error(a)}function Dx(a){If(a)}function sd(a,l){try{var d=a.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(p){setTimeout(function(){throw p})}}function Ox(a,l,d){try{var p=a.onCaughtError;p(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function k_(a,l,d){return d=Xa(d),d.tag=3,d.payload={element:null},d.callback=function(){sd(a,l)},d}function qx(a){return a=Xa(a),a.tag=3,a}function Ix(a,l,d,p){var v=d.type.getDerivedStateFromError;if(typeof v=="function"){var x=p.value;a.payload=function(){return v(x)},a.callback=function(){Ox(l,d,p)}}var L=d.stateNode;L!==null&&typeof L.componentDidCatch=="function"&&(a.callback=function(){Ox(l,d,p),typeof v!="function"&&(eo===null?eo=new Set([this]):eo.add(this));var V=p.stack;this.componentDidCatch(p.value,{componentStack:V!==null?V:""})})}function sz(a,l,d,p,v){if(d.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(l=d.alternate,l!==null&&al(l,d,v,!0),d=cr.current,d!==null){switch(d.tag){case 31:case 13:return Ar===null?vd():d.alternate===null&&Zt===0&&(Zt=3),d.flags&=-257,d.flags|=65536,d.lanes=v,p===Yf?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([p]):l.add(p),Y_(a,p,v)),!1;case 22:return d.flags|=65536,p===Yf?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([p])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([p]):d.add(p)),Y_(a,p,v)),!1}throw Error(r(435,d.tag))}return Y_(a,p,v),vd(),!1}if(ct)return l=cr.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=v,p!==Up&&(a=Error(r(422),{cause:p}),Mu(Sr(a,d)))):(p!==Up&&(l=Error(r(423),{cause:p}),Mu(Sr(l,d))),a=a.current.alternate,a.flags|=65536,v&=-v,a.lanes|=v,p=Sr(p,d),v=k_(a.stateNode,p,v),Jp(a,v),Zt!==4&&(Zt=2)),!1;var x=Error(r(520),{cause:p});if(x=Sr(x,d),Ju===null?Ju=[x]:Ju.push(x),Zt!==4&&(Zt=2),l===null)return!0;p=Sr(p,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,a=v&-v,d.lanes|=a,a=k_(d.stateNode,p,a),Jp(d,a),!1;case 1:if(l=d.type,x=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(eo===null||!eo.has(x))))return d.flags|=65536,v&=-v,d.lanes|=v,v=qx(v),Ix(v,a,d,p),Jp(d,v),!1}d=d.return}while(d!==null);return!1}var E_=Error(r(461)),ln=!1;function Cn(a,l,d,p){l.child=a===null?Ub(l,null,d,p):ns(l,a.child,d,p)}function Px(a,l,d,p,v){d=d.render;var x=l.ref;if("ref"in p){var L={};for(var V in p)V!=="ref"&&(L[V]=p[V])}else L=p;return Zo(l),p=a_(a,l,d,L,x,v),V=o_(),a!==null&&!ln?(s_(a,l,v),ta(a,l,v)):(ct&&V&&$p(l),l.flags|=1,Cn(a,l,p,v),l.child)}function $x(a,l,d,p,v){if(a===null){var x=d.type;return typeof x=="function"&&!qp(x)&&x.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=x,Bx(a,l,x,p,v)):(a=Uf(d.type,null,p,l,l.mode,v),a.ref=l.ref,a.return=l,l.child=a)}if(x=a.child,!L_(a,v)){var L=x.memoizedProps;if(d=d.compare,d=d!==null?d:Nu,d(L,p)&&a.ref===l.ref)return ta(a,l,v)}return l.flags|=1,a=Wi(x,p),a.ref=l.ref,a.return=l,l.child=a}function Bx(a,l,d,p,v){if(a!==null){var x=a.memoizedProps;if(Nu(x,p)&&a.ref===l.ref)if(ln=!1,l.pendingProps=p=x,L_(a,v))(a.flags&131072)!==0&&(ln=!0);else return l.lanes=a.lanes,ta(a,l,v)}return S_(a,l,d,p,v)}function Ux(a,l,d,p){var v=p.children,x=a!==null?a.memoizedState:null;if(a===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((l.flags&128)!==0){if(x=x!==null?x.baseLanes|d:d,a!==null){for(p=l.child=a.child,v=0;p!==null;)v=v|p.lanes|p.childLanes,p=p.sibling;p=v&~x}else p=0,l.child=null;return Gx(a,l,x,d,p)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},a!==null&&Vf(l,x!==null?x.cachePool:null),x!==null?Hb(l,x):t_(),Vb(l);else return p=l.lanes=536870912,Gx(a,l,x!==null?x.baseLanes|d:d,d,p)}else x!==null?(Vf(l,x.cachePool),Hb(l,x),Ka(),l.memoizedState=null):(a!==null&&Vf(l,null),t_(),Ka());return Cn(a,l,v,d),l.child}function Vu(a,l){return a!==null&&a.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function Gx(a,l,d,p,v){var x=Wp();return x=x===null?null:{parent:on._currentValue,pool:x},l.memoizedState={baseLanes:d,cachePool:x},a!==null&&Vf(l,null),t_(),Vb(l),a!==null&&al(a,l,p,!0),l.childLanes=v,null}function ld(a,l){return l=cd({mode:l.mode,children:l.children},a.mode),l.ref=a.ref,a.child=l,l.return=a,l}function Fx(a,l,d){return ns(l,a.child,null,d),a=ld(l,l.pendingProps),a.flags|=2,fr(l),l.memoizedState=null,a}function lz(a,l,d){var p=l.pendingProps,v=(l.flags&128)!==0;if(l.flags&=-129,a===null){if(ct){if(p.mode==="hidden")return a=ld(l,p),l.lanes=536870912,Vu(null,a);if(r_(l),(a=It)?(a=nk(a,jr),a=a!==null&&a.data==="&"?a:null,a!==null&&(l.memoizedState={dehydrated:a,treeContext:Ua!==null?{id:Ei,overflow:Si}:null,retryLane:536870912,hydrationErrors:null},d=Tb(a),d.return=l,l.child=d,En=l,It=null)):a=null,a===null)throw Fa(l);return l.lanes=536870912,null}return ld(l,p)}var x=a.memoizedState;if(x!==null){var L=x.dehydrated;if(r_(l),v)if(l.flags&256)l.flags&=-257,l=Fx(a,l,d);else if(l.memoizedState!==null)l.child=a.child,l.flags|=128,l=null;else throw Error(r(558));else if(ln||al(a,l,d,!1),v=(d&a.childLanes)!==0,ln||v){if(p=Nt,p!==null&&(L=hi(p,d),L!==0&&L!==x.retryLane))throw x.retryLane=L,Yo(a,L),Jn(p,a,L),E_;vd(),l=Fx(a,l,d)}else a=x.treeContext,It=Rr(L.nextSibling),En=l,ct=!0,Ga=null,jr=!1,a!==null&&Rb(l,a),l=ld(l,p),l.flags|=4096;return l}return a=Wi(a.child,{mode:p.mode,children:p.children}),a.ref=l.ref,l.child=a,a.return=l,a}function ud(a,l){var d=l.ref;if(d===null)a!==null&&a.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(r(284));(a===null||a.ref!==d)&&(l.flags|=4194816)}}function S_(a,l,d,p,v){return Zo(l),d=a_(a,l,d,p,void 0,v),p=o_(),a!==null&&!ln?(s_(a,l,v),ta(a,l,v)):(ct&&p&&$p(l),l.flags|=1,Cn(a,l,d,v),l.child)}function Hx(a,l,d,p,v,x){return Zo(l),l.updateQueue=null,d=Yb(l,p,d,v),Xb(a),p=o_(),a!==null&&!ln?(s_(a,l,x),ta(a,l,x)):(ct&&p&&$p(l),l.flags|=1,Cn(a,l,d,x),l.child)}function Vx(a,l,d,p,v){if(Zo(l),l.stateNode===null){var x=tl,L=d.contextType;typeof L=="object"&&L!==null&&(x=Sn(L)),x=new d(p,x),l.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=w_,l.stateNode=x,x._reactInternals=l,x=l.stateNode,x.props=p,x.state=l.memoizedState,x.refs={},Qp(l),L=d.contextType,x.context=typeof L=="object"&&L!==null?Sn(L):tl,x.state=l.memoizedState,L=d.getDerivedStateFromProps,typeof L=="function"&&(x_(l,d,L,p),x.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(L=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),L!==x.state&&w_.enqueueReplaceState(x,x.state,null),Bu(l,p,x,v),$u(),x.state=l.memoizedState),typeof x.componentDidMount=="function"&&(l.flags|=4194308),p=!0}else if(a===null){x=l.stateNode;var V=l.memoizedProps,te=is(d,V);x.props=te;var fe=x.context,ve=d.contextType;L=tl,typeof ve=="object"&&ve!==null&&(L=Sn(ve));var Se=d.getDerivedStateFromProps;ve=typeof Se=="function"||typeof x.getSnapshotBeforeUpdate=="function",V=l.pendingProps!==V,ve||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(V||fe!==L)&&Lx(l,x,p,L),Va=!1;var he=l.memoizedState;x.state=he,Bu(l,p,x,v),$u(),fe=l.memoizedState,V||he!==fe||Va?(typeof Se=="function"&&(x_(l,d,Se,p),fe=l.memoizedState),(te=Va||Nx(l,d,te,p,he,fe,L))?(ve||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(l.flags|=4194308)):(typeof x.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=p,l.memoizedState=fe),x.props=p,x.state=fe,x.context=L,p=te):(typeof x.componentDidMount=="function"&&(l.flags|=4194308),p=!1)}else{x=l.stateNode,Zp(a,l),L=l.memoizedProps,ve=is(d,L),x.props=ve,Se=l.pendingProps,he=x.context,fe=d.contextType,te=tl,typeof fe=="object"&&fe!==null&&(te=Sn(fe)),V=d.getDerivedStateFromProps,(fe=typeof V=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(L!==Se||he!==te)&&Lx(l,x,p,te),Va=!1,he=l.memoizedState,x.state=he,Bu(l,p,x,v),$u();var pe=l.memoizedState;L!==Se||he!==pe||Va||a!==null&&a.dependencies!==null&&Ff(a.dependencies)?(typeof V=="function"&&(x_(l,d,V,p),pe=l.memoizedState),(ve=Va||Nx(l,d,ve,p,he,pe,te)||a!==null&&a.dependencies!==null&&Ff(a.dependencies))?(fe||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(p,pe,te),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(p,pe,te)),typeof x.componentDidUpdate=="function"&&(l.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof x.componentDidUpdate!="function"||L===a.memoizedProps&&he===a.memoizedState||(l.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||L===a.memoizedProps&&he===a.memoizedState||(l.flags|=1024),l.memoizedProps=p,l.memoizedState=pe),x.props=p,x.state=pe,x.context=te,p=ve):(typeof x.componentDidUpdate!="function"||L===a.memoizedProps&&he===a.memoizedState||(l.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||L===a.memoizedProps&&he===a.memoizedState||(l.flags|=1024),p=!1)}return x=p,ud(a,l),p=(l.flags&128)!==0,x||p?(x=l.stateNode,d=p&&typeof d.getDerivedStateFromError!="function"?null:x.render(),l.flags|=1,a!==null&&p?(l.child=ns(l,a.child,null,v),l.child=ns(l,null,d,v)):Cn(a,l,d,v),l.memoizedState=x.state,a=l.child):a=ta(a,l,v),a}function Xx(a,l,d,p){return Ko(),l.flags|=256,Cn(a,l,d,p),l.child}var C_={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function T_(a){return{baseLanes:a,cachePool:Ob()}}function j_(a,l,d){return a=a!==null?a.childLanes&~d:0,l&&(a|=hr),a}function Yx(a,l,d){var p=l.pendingProps,v=!1,x=(l.flags&128)!==0,L;if((L=x)||(L=a!==null&&a.memoizedState===null?!1:(tn.current&2)!==0),L&&(v=!0,l.flags&=-129),L=(l.flags&32)!==0,l.flags&=-33,a===null){if(ct){if(v?Wa(l):Ka(),(a=It)?(a=nk(a,jr),a=a!==null&&a.data!=="&"?a:null,a!==null&&(l.memoizedState={dehydrated:a,treeContext:Ua!==null?{id:Ei,overflow:Si}:null,retryLane:536870912,hydrationErrors:null},d=Tb(a),d.return=l,l.child=d,En=l,It=null)):a=null,a===null)throw Fa(l);return cg(a)?l.lanes=32:l.lanes=536870912,null}var V=p.children;return p=p.fallback,v?(Ka(),v=l.mode,V=cd({mode:"hidden",children:V},v),p=Wo(p,v,d,null),V.return=l,p.return=l,V.sibling=p,l.child=V,p=l.child,p.memoizedState=T_(d),p.childLanes=j_(a,L,d),l.memoizedState=C_,Vu(null,p)):(Wa(l),A_(l,V))}var te=a.memoizedState;if(te!==null&&(V=te.dehydrated,V!==null)){if(x)l.flags&256?(Wa(l),l.flags&=-257,l=R_(a,l,d)):l.memoizedState!==null?(Ka(),l.child=a.child,l.flags|=128,l=null):(Ka(),V=p.fallback,v=l.mode,p=cd({mode:"visible",children:p.children},v),V=Wo(V,v,d,null),V.flags|=2,p.return=l,V.return=l,p.sibling=V,l.child=p,ns(l,a.child,null,d),p=l.child,p.memoizedState=T_(d),p.childLanes=j_(a,L,d),l.memoizedState=C_,l=Vu(null,p));else if(Wa(l),cg(V)){if(L=V.nextSibling&&V.nextSibling.dataset,L)var fe=L.dgst;L=fe,p=Error(r(419)),p.stack="",p.digest=L,Mu({value:p,source:null,stack:null}),l=R_(a,l,d)}else if(ln||al(a,l,d,!1),L=(d&a.childLanes)!==0,ln||L){if(L=Nt,L!==null&&(p=hi(L,d),p!==0&&p!==te.retryLane))throw te.retryLane=p,Yo(a,p),Jn(L,a,p),E_;ug(V)||vd(),l=R_(a,l,d)}else ug(V)?(l.flags|=192,l.child=a.child,l=null):(a=te.treeContext,It=Rr(V.nextSibling),En=l,ct=!0,Ga=null,jr=!1,a!==null&&Rb(l,a),l=A_(l,p.children),l.flags|=4096);return l}return v?(Ka(),V=p.fallback,v=l.mode,te=a.child,fe=te.sibling,p=Wi(te,{mode:"hidden",children:p.children}),p.subtreeFlags=te.subtreeFlags&65011712,fe!==null?V=Wi(fe,V):(V=Wo(V,v,d,null),V.flags|=2),V.return=l,p.return=l,p.sibling=V,l.child=p,Vu(null,p),p=l.child,V=a.child.memoizedState,V===null?V=T_(d):(v=V.cachePool,v!==null?(te=on._currentValue,v=v.parent!==te?{parent:te,pool:te}:v):v=Ob(),V={baseLanes:V.baseLanes|d,cachePool:v}),p.memoizedState=V,p.childLanes=j_(a,L,d),l.memoizedState=C_,Vu(a.child,p)):(Wa(l),d=a.child,a=d.sibling,d=Wi(d,{mode:"visible",children:p.children}),d.return=l,d.sibling=null,a!==null&&(L=l.deletions,L===null?(l.deletions=[a],l.flags|=16):L.push(a)),l.child=d,l.memoizedState=null,d)}function A_(a,l){return l=cd({mode:"visible",children:l},a.mode),l.return=a,a.child=l}function cd(a,l){return a=ur(22,a,null,l),a.lanes=0,a}function R_(a,l,d){return ns(l,a.child,null,d),a=A_(l,l.pendingProps.children),a.flags|=2,l.memoizedState=null,a}function Wx(a,l,d){a.lanes|=l;var p=a.alternate;p!==null&&(p.lanes|=l),Hp(a.return,l,d)}function N_(a,l,d,p,v,x){var L=a.memoizedState;L===null?a.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:p,tail:d,tailMode:v,treeForkCount:x}:(L.isBackwards=l,L.rendering=null,L.renderingStartTime=0,L.last=p,L.tail=d,L.tailMode=v,L.treeForkCount=x)}function Kx(a,l,d){var p=l.pendingProps,v=p.revealOrder,x=p.tail;p=p.children;var L=tn.current,V=(L&2)!==0;if(V?(L=L&1|2,l.flags|=128):L&=1,O(tn,L),Cn(a,l,p,d),p=ct?zu:0,!V&&a!==null&&(a.flags&128)!==0)e:for(a=l.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&Wx(a,d,l);else if(a.tag===19)Wx(a,d,l);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===l)break e;for(;a.sibling===null;){if(a.return===null||a.return===l)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(v){case"forwards":for(d=l.child,v=null;d!==null;)a=d.alternate,a!==null&&Zf(a)===null&&(v=d),d=d.sibling;d=v,d===null?(v=l.child,l.child=null):(v=d.sibling,d.sibling=null),N_(l,!1,v,d,x,p);break;case"backwards":case"unstable_legacy-backwards":for(d=null,v=l.child,l.child=null;v!==null;){if(a=v.alternate,a!==null&&Zf(a)===null){l.child=v;break}a=v.sibling,v.sibling=d,d=v,v=a}N_(l,!0,d,null,x,p);break;case"together":N_(l,!1,null,null,void 0,p);break;default:l.memoizedState=null}return l.child}function ta(a,l,d){if(a!==null&&(l.dependencies=a.dependencies),Ja|=l.lanes,(d&l.childLanes)===0)if(a!==null){if(al(a,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(a!==null&&l.child!==a.child)throw Error(r(153));if(l.child!==null){for(a=l.child,d=Wi(a,a.pendingProps),l.child=d,d.return=l;a.sibling!==null;)a=a.sibling,d=d.sibling=Wi(a,a.pendingProps),d.return=l;d.sibling=null}return l.child}function L_(a,l){return(a.lanes&l)!==0?!0:(a=a.dependencies,!!(a!==null&&Ff(a)))}function uz(a,l,d){switch(l.tag){case 3:ne(l,l.stateNode.containerInfo),Ha(l,on,a.memoizedState.cache),Ko();break;case 27:case 5:le(l);break;case 4:ne(l,l.stateNode.containerInfo);break;case 10:Ha(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,r_(l),null;break;case 13:var p=l.memoizedState;if(p!==null)return p.dehydrated!==null?(Wa(l),l.flags|=128,null):(d&l.child.childLanes)!==0?Yx(a,l,d):(Wa(l),a=ta(a,l,d),a!==null?a.sibling:null);Wa(l);break;case 19:var v=(a.flags&128)!==0;if(p=(d&l.childLanes)!==0,p||(al(a,l,d,!1),p=(d&l.childLanes)!==0),v){if(p)return Kx(a,l,d);l.flags|=128}if(v=l.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),O(tn,tn.current),p)break;return null;case 22:return l.lanes=0,Ux(a,l,d,l.pendingProps);case 24:Ha(l,on,a.memoizedState.cache)}return ta(a,l,d)}function Qx(a,l,d){if(a!==null)if(a.memoizedProps!==l.pendingProps)ln=!0;else{if(!L_(a,d)&&(l.flags&128)===0)return ln=!1,uz(a,l,d);ln=(a.flags&131072)!==0}else ln=!1,ct&&(l.flags&1048576)!==0&&Ab(l,zu,l.index);switch(l.lanes=0,l.tag){case 16:e:{var p=l.pendingProps;if(a=es(l.elementType),l.type=a,typeof a=="function")qp(a)?(p=is(a,p),l.tag=1,l=Vx(null,l,a,p,d)):(l.tag=0,l=S_(null,l,a,p,d));else{if(a!=null){var v=a.$$typeof;if(v===S){l.tag=11,l=Px(null,l,a,p,d);break e}else if(v===M){l.tag=14,l=$x(null,l,a,p,d);break e}}throw l=$(a)||a,Error(r(306,l,""))}}return l;case 0:return S_(a,l,l.type,l.pendingProps,d);case 1:return p=l.type,v=is(p,l.pendingProps),Vx(a,l,p,v,d);case 3:e:{if(ne(l,l.stateNode.containerInfo),a===null)throw Error(r(387));p=l.pendingProps;var x=l.memoizedState;v=x.element,Zp(a,l),Bu(l,p,null,d);var L=l.memoizedState;if(p=L.cache,Ha(l,on,p),p!==x.cache&&Vp(l,[on],d,!0),$u(),p=L.element,x.isDehydrated)if(x={element:p,isDehydrated:!1,cache:L.cache},l.updateQueue.baseState=x,l.memoizedState=x,l.flags&256){l=Xx(a,l,p,d);break e}else if(p!==v){v=Sr(Error(r(424)),l),Mu(v),l=Xx(a,l,p,d);break e}else{switch(a=l.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(It=Rr(a.firstChild),En=l,ct=!0,Ga=null,jr=!0,d=Ub(l,null,p,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling}else{if(Ko(),p===v){l=ta(a,l,d);break e}Cn(a,l,p,d)}l=l.child}return l;case 26:return ud(a,l),a===null?(d=lk(l.type,null,l.pendingProps,null))?l.memoizedState=d:ct||(d=l.type,a=l.pendingProps,p=Cd(me.current).createElement(d),p[en]=l,p[De]=a,Tn(p,d,a),Xt(p),l.stateNode=p):l.memoizedState=lk(l.type,a.memoizedProps,l.pendingProps,a.memoizedState),null;case 27:return le(l),a===null&&ct&&(p=l.stateNode=ak(l.type,l.pendingProps,me.current),En=l,jr=!0,v=It,io(l.type)?(fg=v,It=Rr(p.firstChild)):It=v),Cn(a,l,l.pendingProps.children,d),ud(a,l),a===null&&(l.flags|=4194304),l.child;case 5:return a===null&&ct&&((v=p=It)&&(p=Pz(p,l.type,l.pendingProps,jr),p!==null?(l.stateNode=p,En=l,It=Rr(p.firstChild),jr=!1,v=!0):v=!1),v||Fa(l)),le(l),v=l.type,x=l.pendingProps,L=a!==null?a.memoizedProps:null,p=x.children,og(v,x)?p=null:L!==null&&og(v,L)&&(l.flags|=32),l.memoizedState!==null&&(v=a_(a,l,ez,null,null,d),sc._currentValue=v),ud(a,l),Cn(a,l,p,d),l.child;case 6:return a===null&&ct&&((a=d=It)&&(d=$z(d,l.pendingProps,jr),d!==null?(l.stateNode=d,En=l,It=null,a=!0):a=!1),a||Fa(l)),null;case 13:return Yx(a,l,d);case 4:return ne(l,l.stateNode.containerInfo),p=l.pendingProps,a===null?l.child=ns(l,null,p,d):Cn(a,l,p,d),l.child;case 11:return Px(a,l,l.type,l.pendingProps,d);case 7:return Cn(a,l,l.pendingProps,d),l.child;case 8:return Cn(a,l,l.pendingProps.children,d),l.child;case 12:return Cn(a,l,l.pendingProps.children,d),l.child;case 10:return p=l.pendingProps,Ha(l,l.type,p.value),Cn(a,l,p.children,d),l.child;case 9:return v=l.type._context,p=l.pendingProps.children,Zo(l),v=Sn(v),p=p(v),l.flags|=1,Cn(a,l,p,d),l.child;case 14:return $x(a,l,l.type,l.pendingProps,d);case 15:return Bx(a,l,l.type,l.pendingProps,d);case 19:return Kx(a,l,d);case 31:return lz(a,l,d);case 22:return Ux(a,l,d,l.pendingProps);case 24:return Zo(l),p=Sn(on),a===null?(v=Wp(),v===null&&(v=Nt,x=Xp(),v.pooledCache=x,x.refCount++,x!==null&&(v.pooledCacheLanes|=d),v=x),l.memoizedState={parent:p,cache:v},Qp(l),Ha(l,on,v)):((a.lanes&d)!==0&&(Zp(a,l),Bu(l,null,null,d),$u()),v=a.memoizedState,x=l.memoizedState,v.parent!==p?(v={parent:p,cache:p},l.memoizedState=v,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=v),Ha(l,on,p)):(p=x.cache,Ha(l,on,p),p!==v.cache&&Vp(l,[on],d,!0))),Cn(a,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function na(a){a.flags|=4}function z_(a,l,d,p,v){if((l=(a.mode&32)!==0)&&(l=!1),l){if(a.flags|=16777216,(v&335544128)===v)if(a.stateNode.complete)a.flags|=8192;else if(Ew())a.flags|=8192;else throw ts=Yf,Kp}else a.flags&=-16777217}function Zx(a,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!hk(l))if(Ew())a.flags|=8192;else throw ts=Yf,Kp}function fd(a,l){l!==null&&(a.flags|=4),a.flags&16384&&(l=a.tag!==22?Lo():536870912,a.lanes|=l,gl|=l)}function Xu(a,l){if(!ct)switch(a.tailMode){case"hidden":l=a.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?a.tail=null:d.sibling=null;break;case"collapsed":d=a.tail;for(var p=null;d!==null;)d.alternate!==null&&(p=d),d=d.sibling;p===null?l||a.tail===null?a.tail=null:a.tail.sibling=null:p.sibling=null}}function Pt(a){var l=a.alternate!==null&&a.alternate.child===a.child,d=0,p=0;if(l)for(var v=a.child;v!==null;)d|=v.lanes|v.childLanes,p|=v.subtreeFlags&65011712,p|=v.flags&65011712,v.return=a,v=v.sibling;else for(v=a.child;v!==null;)d|=v.lanes|v.childLanes,p|=v.subtreeFlags,p|=v.flags,v.return=a,v=v.sibling;return a.subtreeFlags|=p,a.childLanes=d,l}function cz(a,l,d){var p=l.pendingProps;switch(Bp(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pt(l),null;case 1:return Pt(l),null;case 3:return d=l.stateNode,p=null,a!==null&&(p=a.memoizedState.cache),l.memoizedState.cache!==p&&(l.flags|=2048),Zi(on),de(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(a===null||a.child===null)&&(il(l)?na(l):a===null||a.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Gp())),Pt(l),null;case 26:var v=l.type,x=l.memoizedState;return a===null?(na(l),x!==null?(Pt(l),Zx(l,x)):(Pt(l),z_(l,v,null,p,d))):x?x!==a.memoizedState?(na(l),Pt(l),Zx(l,x)):(Pt(l),l.flags&=-16777217):(a=a.memoizedProps,a!==p&&na(l),Pt(l),z_(l,v,a,p,d)),null;case 27:if(ke(l),d=me.current,v=l.type,a!==null&&l.stateNode!=null)a.memoizedProps!==p&&na(l);else{if(!p){if(l.stateNode===null)throw Error(r(166));return Pt(l),null}a=ie.current,il(l)?Nb(l):(a=ak(v,p,d),l.stateNode=a,na(l))}return Pt(l),null;case 5:if(ke(l),v=l.type,a!==null&&l.stateNode!=null)a.memoizedProps!==p&&na(l);else{if(!p){if(l.stateNode===null)throw Error(r(166));return Pt(l),null}if(x=ie.current,il(l))Nb(l);else{var L=Cd(me.current);switch(x){case 1:x=L.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:x=L.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":x=L.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":x=L.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":x=L.createElement("div"),x.innerHTML="<script><\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof p.is=="string"?L.createElement("select",{is:p.is}):L.createElement("select"),p.multiple?x.multiple=!0:p.size&&(x.size=p.size);break;default:x=typeof p.is=="string"?L.createElement(v,{is:p.is}):L.createElement(v)}}x[en]=l,x[De]=p;e:for(L=l.child;L!==null;){if(L.tag===5||L.tag===6)x.appendChild(L.stateNode);else if(L.tag!==4&&L.tag!==27&&L.child!==null){L.child.return=L,L=L.child;continue}if(L===l)break e;for(;L.sibling===null;){if(L.return===null||L.return===l)break e;L=L.return}L.sibling.return=L.return,L=L.sibling}l.stateNode=x;e:switch(Tn(x,v,p),v){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&na(l)}}return Pt(l),z_(l,l.type,a===null?null:a.memoizedProps,l.pendingProps,d),null;case 6:if(a&&l.stateNode!=null)a.memoizedProps!==p&&na(l);else{if(typeof p!="string"&&l.stateNode===null)throw Error(r(166));if(a=me.current,il(l)){if(a=l.stateNode,d=l.memoizedProps,p=null,v=En,v!==null)switch(v.tag){case 27:case 5:p=v.memoizedProps}a[en]=l,a=!!(a.nodeValue===d||p!==null&&p.suppressHydrationWarning===!0||Yw(a.nodeValue,d)),a||Fa(l,!0)}else a=Cd(a).createTextNode(p),a[en]=l,l.stateNode=a}return Pt(l),null;case 31:if(d=l.memoizedState,a===null||a.memoizedState!==null){if(p=il(l),d!==null){if(a===null){if(!p)throw Error(r(318));if(a=l.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[en]=l}else Ko(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Pt(l),a=!1}else d=Gp(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=d),a=!0;if(!a)return l.flags&256?(fr(l),l):(fr(l),null);if((l.flags&128)!==0)throw Error(r(558))}return Pt(l),null;case 13:if(p=l.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(v=il(l),p!==null&&p.dehydrated!==null){if(a===null){if(!v)throw Error(r(318));if(v=l.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(r(317));v[en]=l}else Ko(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Pt(l),v=!1}else v=Gp(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=v),v=!0;if(!v)return l.flags&256?(fr(l),l):(fr(l),null)}return fr(l),(l.flags&128)!==0?(l.lanes=d,l):(d=p!==null,a=a!==null&&a.memoizedState!==null,d&&(p=l.child,v=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(v=p.alternate.memoizedState.cachePool.pool),x=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(x=p.memoizedState.cachePool.pool),x!==v&&(p.flags|=2048)),d!==a&&d&&(l.child.flags|=8192),fd(l,l.updateQueue),Pt(l),null);case 4:return de(),a===null&&tg(l.stateNode.containerInfo),Pt(l),null;case 10:return Zi(l.type),Pt(l),null;case 19:if(ee(tn),p=l.memoizedState,p===null)return Pt(l),null;if(v=(l.flags&128)!==0,x=p.rendering,x===null)if(v)Xu(p,!1);else{if(Zt!==0||a!==null&&(a.flags&128)!==0)for(a=l.child;a!==null;){if(x=Zf(a),x!==null){for(l.flags|=128,Xu(p,!1),a=x.updateQueue,l.updateQueue=a,fd(l,a),l.subtreeFlags=0,a=d,d=l.child;d!==null;)Cb(d,a),d=d.sibling;return O(tn,tn.current&1|2),ct&&Ki(l,p.treeForkCount),l.child}a=a.sibling}p.tail!==null&&ft()>_d&&(l.flags|=128,v=!0,Xu(p,!1),l.lanes=4194304)}else{if(!v)if(a=Zf(x),a!==null){if(l.flags|=128,v=!0,a=a.updateQueue,l.updateQueue=a,fd(l,a),Xu(p,!0),p.tail===null&&p.tailMode==="hidden"&&!x.alternate&&!ct)return Pt(l),null}else 2*ft()-p.renderingStartTime>_d&&d!==536870912&&(l.flags|=128,v=!0,Xu(p,!1),l.lanes=4194304);p.isBackwards?(x.sibling=l.child,l.child=x):(a=p.last,a!==null?a.sibling=x:l.child=x,p.last=x)}return p.tail!==null?(a=p.tail,p.rendering=a,p.tail=a.sibling,p.renderingStartTime=ft(),a.sibling=null,d=tn.current,O(tn,v?d&1|2:d&1),ct&&Ki(l,p.treeForkCount),a):(Pt(l),null);case 22:case 23:return fr(l),n_(),p=l.memoizedState!==null,a!==null?a.memoizedState!==null!==p&&(l.flags|=8192):p&&(l.flags|=8192),p?(d&536870912)!==0&&(l.flags&128)===0&&(Pt(l),l.subtreeFlags&6&&(l.flags|=8192)):Pt(l),d=l.updateQueue,d!==null&&fd(l,d.retryQueue),d=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(d=a.memoizedState.cachePool.pool),p=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),p!==d&&(l.flags|=2048),a!==null&&ee(Jo),null;case 24:return d=null,a!==null&&(d=a.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),Zi(on),Pt(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function fz(a,l){switch(Bp(l),l.tag){case 1:return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 3:return Zi(on),de(),a=l.flags,(a&65536)!==0&&(a&128)===0?(l.flags=a&-65537|128,l):null;case 26:case 27:case 5:return ke(l),null;case 31:if(l.memoizedState!==null){if(fr(l),l.alternate===null)throw Error(r(340));Ko()}return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 13:if(fr(l),a=l.memoizedState,a!==null&&a.dehydrated!==null){if(l.alternate===null)throw Error(r(340));Ko()}return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 19:return ee(tn),null;case 4:return de(),null;case 10:return Zi(l.type),null;case 22:case 23:return fr(l),n_(),a!==null&&ee(Jo),a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 24:return Zi(on),null;case 25:return null;default:return null}}function Jx(a,l){switch(Bp(l),l.tag){case 3:Zi(on),de();break;case 26:case 27:case 5:ke(l);break;case 4:de();break;case 31:l.memoizedState!==null&&fr(l);break;case 13:fr(l);break;case 19:ee(tn);break;case 10:Zi(l.type);break;case 22:case 23:fr(l),n_(),a!==null&&ee(Jo);break;case 24:Zi(on)}}function Yu(a,l){try{var d=l.updateQueue,p=d!==null?d.lastEffect:null;if(p!==null){var v=p.next;d=v;do{if((d.tag&a)===a){p=void 0;var x=d.create,L=d.inst;p=x(),L.destroy=p}d=d.next}while(d!==v)}}catch(V){St(l,l.return,V)}}function Qa(a,l,d){try{var p=l.updateQueue,v=p!==null?p.lastEffect:null;if(v!==null){var x=v.next;p=x;do{if((p.tag&a)===a){var L=p.inst,V=L.destroy;if(V!==void 0){L.destroy=void 0,v=l;var te=d,fe=V;try{fe()}catch(ve){St(v,te,ve)}}}p=p.next}while(p!==x)}}catch(ve){St(l,l.return,ve)}}function ew(a){var l=a.updateQueue;if(l!==null){var d=a.stateNode;try{Fb(l,d)}catch(p){St(a,a.return,p)}}}function tw(a,l,d){d.props=is(a.type,a.memoizedProps),d.state=a.memoizedState;try{d.componentWillUnmount()}catch(p){St(a,l,p)}}function Wu(a,l){try{var d=a.ref;if(d!==null){switch(a.tag){case 26:case 27:case 5:var p=a.stateNode;break;case 30:p=a.stateNode;break;default:p=a.stateNode}typeof d=="function"?a.refCleanup=d(p):d.current=p}}catch(v){St(a,l,v)}}function Ci(a,l){var d=a.ref,p=a.refCleanup;if(d!==null)if(typeof p=="function")try{p()}catch(v){St(a,l,v)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(v){St(a,l,v)}else d.current=null}function nw(a){var l=a.type,d=a.memoizedProps,p=a.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&p.focus();break e;case"img":d.src?p.src=d.src:d.srcSet&&(p.srcset=d.srcSet)}}catch(v){St(a,a.return,v)}}function M_(a,l,d){try{var p=a.stateNode;zz(p,a.type,d,l),p[De]=l}catch(v){St(a,a.return,v)}}function rw(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&io(a.type)||a.tag===4}function D_(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||rw(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&io(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function O_(a,l,d){var p=a.tag;if(p===5||p===6)a=a.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(a,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(a),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=Xr));else if(p!==4&&(p===27&&io(a.type)&&(d=a.stateNode,l=null),a=a.child,a!==null))for(O_(a,l,d),a=a.sibling;a!==null;)O_(a,l,d),a=a.sibling}function dd(a,l,d){var p=a.tag;if(p===5||p===6)a=a.stateNode,l?d.insertBefore(a,l):d.appendChild(a);else if(p!==4&&(p===27&&io(a.type)&&(d=a.stateNode),a=a.child,a!==null))for(dd(a,l,d),a=a.sibling;a!==null;)dd(a,l,d),a=a.sibling}function iw(a){var l=a.stateNode,d=a.memoizedProps;try{for(var p=a.type,v=l.attributes;v.length;)l.removeAttributeNode(v[0]);Tn(l,p,d),l[en]=a,l[De]=d}catch(x){St(a,a.return,x)}}var ra=!1,un=!1,q_=!1,aw=typeof WeakSet=="function"?WeakSet:Set,bn=null;function dz(a,l){if(a=a.containerInfo,ig=zd,a=gb(a),Rp(a)){if("selectionStart"in a)var d={start:a.selectionStart,end:a.selectionEnd};else e:{d=(d=a.ownerDocument)&&d.defaultView||window;var p=d.getSelection&&d.getSelection();if(p&&p.rangeCount!==0){d=p.anchorNode;var v=p.anchorOffset,x=p.focusNode;p=p.focusOffset;try{d.nodeType,x.nodeType}catch{d=null;break e}var L=0,V=-1,te=-1,fe=0,ve=0,Se=a,he=null;t:for(;;){for(var pe;Se!==d||v!==0&&Se.nodeType!==3||(V=L+v),Se!==x||p!==0&&Se.nodeType!==3||(te=L+p),Se.nodeType===3&&(L+=Se.nodeValue.length),(pe=Se.firstChild)!==null;)he=Se,Se=pe;for(;;){if(Se===a)break t;if(he===d&&++fe===v&&(V=L),he===x&&++ve===p&&(te=L),(pe=Se.nextSibling)!==null)break;Se=he,he=Se.parentNode}Se=pe}d=V===-1||te===-1?null:{start:V,end:te}}else d=null}d=d||{start:0,end:0}}else d=null;for(ag={focusedElem:a,selectionRange:d},zd=!1,bn=l;bn!==null;)if(l=bn,a=l.child,(l.subtreeFlags&1028)!==0&&a!==null)a.return=l,bn=a;else for(;bn!==null;){switch(l=bn,x=l.alternate,a=l.flags,l.tag){case 0:if((a&4)!==0&&(a=l.updateQueue,a=a!==null?a.events:null,a!==null))for(d=0;d<a.length;d++)v=a[d],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&x!==null){a=void 0,d=l,v=x.memoizedProps,x=x.memoizedState,p=d.stateNode;try{var Ie=is(d.type,v);a=p.getSnapshotBeforeUpdate(Ie,x),p.__reactInternalSnapshotBeforeUpdate=a}catch(Ye){St(d,d.return,Ye)}}break;case 3:if((a&1024)!==0){if(a=l.stateNode.containerInfo,d=a.nodeType,d===9)lg(a);else if(d===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":lg(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=l.sibling,a!==null){a.return=l.return,bn=a;break}bn=l.return}}function ow(a,l,d){var p=d.flags;switch(d.tag){case 0:case 11:case 15:aa(a,d),p&4&&Yu(5,d);break;case 1:if(aa(a,d),p&4)if(a=d.stateNode,l===null)try{a.componentDidMount()}catch(L){St(d,d.return,L)}else{var v=is(d.type,l.memoizedProps);l=l.memoizedState;try{a.componentDidUpdate(v,l,a.__reactInternalSnapshotBeforeUpdate)}catch(L){St(d,d.return,L)}}p&64&&ew(d),p&512&&Wu(d,d.return);break;case 3:if(aa(a,d),p&64&&(a=d.updateQueue,a!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{Fb(a,l)}catch(L){St(d,d.return,L)}}break;case 27:l===null&&p&4&&iw(d);case 26:case 5:aa(a,d),l===null&&p&4&&nw(d),p&512&&Wu(d,d.return);break;case 12:aa(a,d);break;case 31:aa(a,d),p&4&&uw(a,d);break;case 13:aa(a,d),p&4&&cw(a,d),p&64&&(a=d.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(d=xz.bind(null,d),Bz(a,d))));break;case 22:if(p=d.memoizedState!==null||ra,!p){l=l!==null&&l.memoizedState!==null||un,v=ra;var x=un;ra=p,(un=l)&&!x?oa(a,d,(d.subtreeFlags&8772)!==0):aa(a,d),ra=v,un=x}break;case 30:break;default:aa(a,d)}}function sw(a){var l=a.alternate;l!==null&&(a.alternate=null,sw(l)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(l=a.stateNode,l!==null&&Hi(l)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var $t=null,Wn=!1;function ia(a,l,d){for(d=d.child;d!==null;)lw(a,l,d),d=d.sibling}function lw(a,l,d){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(yt,d)}catch{}switch(d.tag){case 26:un||Ci(d,l),ia(a,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:un||Ci(d,l);var p=$t,v=Wn;io(d.type)&&($t=d.stateNode,Wn=!1),ia(a,l,d),ic(d.stateNode),$t=p,Wn=v;break;case 5:un||Ci(d,l);case 6:if(p=$t,v=Wn,$t=null,ia(a,l,d),$t=p,Wn=v,$t!==null)if(Wn)try{($t.nodeType===9?$t.body:$t.nodeName==="HTML"?$t.ownerDocument.body:$t).removeChild(d.stateNode)}catch(x){St(d,l,x)}else try{$t.removeChild(d.stateNode)}catch(x){St(d,l,x)}break;case 18:$t!==null&&(Wn?(a=$t,ek(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,d.stateNode),Sl(a)):ek($t,d.stateNode));break;case 4:p=$t,v=Wn,$t=d.stateNode.containerInfo,Wn=!0,ia(a,l,d),$t=p,Wn=v;break;case 0:case 11:case 14:case 15:Qa(2,d,l),un||Qa(4,d,l),ia(a,l,d);break;case 1:un||(Ci(d,l),p=d.stateNode,typeof p.componentWillUnmount=="function"&&tw(d,l,p)),ia(a,l,d);break;case 21:ia(a,l,d);break;case 22:un=(p=un)||d.memoizedState!==null,ia(a,l,d),un=p;break;default:ia(a,l,d)}}function uw(a,l){if(l.memoizedState===null&&(a=l.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{Sl(a)}catch(d){St(l,l.return,d)}}}function cw(a,l){if(l.memoizedState===null&&(a=l.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Sl(a)}catch(d){St(l,l.return,d)}}function hz(a){switch(a.tag){case 31:case 13:case 19:var l=a.stateNode;return l===null&&(l=a.stateNode=new aw),l;case 22:return a=a.stateNode,l=a._retryCache,l===null&&(l=a._retryCache=new aw),l;default:throw Error(r(435,a.tag))}}function hd(a,l){var d=hz(a);l.forEach(function(p){if(!d.has(p)){d.add(p);var v=wz.bind(null,a,p);p.then(v,v)}})}function Kn(a,l){var d=l.deletions;if(d!==null)for(var p=0;p<d.length;p++){var v=d[p],x=a,L=l,V=L;e:for(;V!==null;){switch(V.tag){case 27:if(io(V.type)){$t=V.stateNode,Wn=!1;break e}break;case 5:$t=V.stateNode,Wn=!1;break e;case 3:case 4:$t=V.stateNode.containerInfo,Wn=!0;break e}V=V.return}if($t===null)throw Error(r(160));lw(x,L,v),$t=null,Wn=!1,x=v.alternate,x!==null&&(x.return=null),v.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)fw(l,a),l=l.sibling}var Qr=null;function fw(a,l){var d=a.alternate,p=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Kn(l,a),Qn(a),p&4&&(Qa(3,a,a.return),Yu(3,a),Qa(5,a,a.return));break;case 1:Kn(l,a),Qn(a),p&512&&(un||d===null||Ci(d,d.return)),p&64&&ra&&(a=a.updateQueue,a!==null&&(p=a.callbacks,p!==null&&(d=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=d===null?p:d.concat(p))));break;case 26:var v=Qr;if(Kn(l,a),Qn(a),p&512&&(un||d===null||Ci(d,d.return)),p&4){var x=d!==null?d.memoizedState:null;if(p=a.memoizedState,d===null)if(p===null)if(a.stateNode===null){e:{p=a.type,d=a.memoizedProps,v=v.ownerDocument||v;t:switch(p){case"title":x=v.getElementsByTagName("title")[0],(!x||x[Vt]||x[en]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=v.createElement(p),v.head.insertBefore(x,v.querySelector("head > title"))),Tn(x,p,d),x[en]=a,Xt(x),p=x;break e;case"link":var L=fk("link","href",v).get(p+(d.href||""));if(L){for(var V=0;V<L.length;V++)if(x=L[V],x.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&x.getAttribute("rel")===(d.rel==null?null:d.rel)&&x.getAttribute("title")===(d.title==null?null:d.title)&&x.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){L.splice(V,1);break t}}x=v.createElement(p),Tn(x,p,d),v.head.appendChild(x);break;case"meta":if(L=fk("meta","content",v).get(p+(d.content||""))){for(V=0;V<L.length;V++)if(x=L[V],x.getAttribute("content")===(d.content==null?null:""+d.content)&&x.getAttribute("name")===(d.name==null?null:d.name)&&x.getAttribute("property")===(d.property==null?null:d.property)&&x.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&x.getAttribute("charset")===(d.charSet==null?null:d.charSet)){L.splice(V,1);break t}}x=v.createElement(p),Tn(x,p,d),v.head.appendChild(x);break;default:throw Error(r(468,p))}x[en]=a,Xt(x),p=x}a.stateNode=p}else dk(v,a.type,a.stateNode);else a.stateNode=ck(v,p,a.memoizedProps);else x!==p?(x===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):x.count--,p===null?dk(v,a.type,a.stateNode):ck(v,p,a.memoizedProps)):p===null&&a.stateNode!==null&&M_(a,a.memoizedProps,d.memoizedProps)}break;case 27:Kn(l,a),Qn(a),p&512&&(un||d===null||Ci(d,d.return)),d!==null&&p&4&&M_(a,a.memoizedProps,d.memoizedProps);break;case 5:if(Kn(l,a),Qn(a),p&512&&(un||d===null||Ci(d,d.return)),a.flags&32){v=a.stateNode;try{Ot(v,"")}catch(Ie){St(a,a.return,Ie)}}p&4&&a.stateNode!=null&&(v=a.memoizedProps,M_(a,v,d!==null?d.memoizedProps:v)),p&1024&&(q_=!0);break;case 6:if(Kn(l,a),Qn(a),p&4){if(a.stateNode===null)throw Error(r(162));p=a.memoizedProps,d=a.stateNode;try{d.nodeValue=p}catch(Ie){St(a,a.return,Ie)}}break;case 3:if(Ad=null,v=Qr,Qr=Td(l.containerInfo),Kn(l,a),Qr=v,Qn(a),p&4&&d!==null&&d.memoizedState.isDehydrated)try{Sl(l.containerInfo)}catch(Ie){St(a,a.return,Ie)}q_&&(q_=!1,dw(a));break;case 4:p=Qr,Qr=Td(a.stateNode.containerInfo),Kn(l,a),Qn(a),Qr=p;break;case 12:Kn(l,a),Qn(a);break;case 31:Kn(l,a),Qn(a),p&4&&(p=a.updateQueue,p!==null&&(a.updateQueue=null,hd(a,p)));break;case 13:Kn(l,a),Qn(a),a.child.flags&8192&&a.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(pd=ft()),p&4&&(p=a.updateQueue,p!==null&&(a.updateQueue=null,hd(a,p)));break;case 22:v=a.memoizedState!==null;var te=d!==null&&d.memoizedState!==null,fe=ra,ve=un;if(ra=fe||v,un=ve||te,Kn(l,a),un=ve,ra=fe,Qn(a),p&8192)e:for(l=a.stateNode,l._visibility=v?l._visibility&-2:l._visibility|1,v&&(d===null||te||ra||un||as(a)),d=null,l=a;;){if(l.tag===5||l.tag===26){if(d===null){te=d=l;try{if(x=te.stateNode,v)L=x.style,typeof L.setProperty=="function"?L.setProperty("display","none","important"):L.display="none";else{V=te.stateNode;var Se=te.memoizedProps.style,he=Se!=null&&Se.hasOwnProperty("display")?Se.display:null;V.style.display=he==null||typeof he=="boolean"?"":(""+he).trim()}}catch(Ie){St(te,te.return,Ie)}}}else if(l.tag===6){if(d===null){te=l;try{te.stateNode.nodeValue=v?"":te.memoizedProps}catch(Ie){St(te,te.return,Ie)}}}else if(l.tag===18){if(d===null){te=l;try{var pe=te.stateNode;v?tk(pe,!0):tk(te.stateNode,!1)}catch(Ie){St(te,te.return,Ie)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===a)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break e;for(;l.sibling===null;){if(l.return===null||l.return===a)break e;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}p&4&&(p=a.updateQueue,p!==null&&(d=p.retryQueue,d!==null&&(p.retryQueue=null,hd(a,d))));break;case 19:Kn(l,a),Qn(a),p&4&&(p=a.updateQueue,p!==null&&(a.updateQueue=null,hd(a,p)));break;case 30:break;case 21:break;default:Kn(l,a),Qn(a)}}function Qn(a){var l=a.flags;if(l&2){try{for(var d,p=a.return;p!==null;){if(rw(p)){d=p;break}p=p.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var v=d.stateNode,x=D_(a);dd(a,x,v);break;case 5:var L=d.stateNode;d.flags&32&&(Ot(L,""),d.flags&=-33);var V=D_(a);dd(a,V,L);break;case 3:case 4:var te=d.stateNode.containerInfo,fe=D_(a);O_(a,fe,te);break;default:throw Error(r(161))}}catch(ve){St(a,a.return,ve)}a.flags&=-3}l&4096&&(a.flags&=-4097)}function dw(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var l=a;dw(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),a=a.sibling}}function aa(a,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)ow(a,l.alternate,l),l=l.sibling}function as(a){for(a=a.child;a!==null;){var l=a;switch(l.tag){case 0:case 11:case 14:case 15:Qa(4,l,l.return),as(l);break;case 1:Ci(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&tw(l,l.return,d),as(l);break;case 27:ic(l.stateNode);case 26:case 5:Ci(l,l.return),as(l);break;case 22:l.memoizedState===null&&as(l);break;case 30:as(l);break;default:as(l)}a=a.sibling}}function oa(a,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var p=l.alternate,v=a,x=l,L=x.flags;switch(x.tag){case 0:case 11:case 15:oa(v,x,d),Yu(4,x);break;case 1:if(oa(v,x,d),p=x,v=p.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(fe){St(p,p.return,fe)}if(p=x,v=p.updateQueue,v!==null){var V=p.stateNode;try{var te=v.shared.hiddenCallbacks;if(te!==null)for(v.shared.hiddenCallbacks=null,v=0;v<te.length;v++)Gb(te[v],V)}catch(fe){St(p,p.return,fe)}}d&&L&64&&ew(x),Wu(x,x.return);break;case 27:iw(x);case 26:case 5:oa(v,x,d),d&&p===null&&L&4&&nw(x),Wu(x,x.return);break;case 12:oa(v,x,d);break;case 31:oa(v,x,d),d&&L&4&&uw(v,x);break;case 13:oa(v,x,d),d&&L&4&&cw(v,x);break;case 22:x.memoizedState===null&&oa(v,x,d),Wu(x,x.return);break;case 30:break;default:oa(v,x,d)}l=l.sibling}}function I_(a,l){var d=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(d=a.memoizedState.cachePool.pool),a=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(a=l.memoizedState.cachePool.pool),a!==d&&(a!=null&&a.refCount++,d!=null&&Du(d))}function P_(a,l){a=null,l.alternate!==null&&(a=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==a&&(l.refCount++,a!=null&&Du(a))}function Zr(a,l,d,p){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)hw(a,l,d,p),l=l.sibling}function hw(a,l,d,p){var v=l.flags;switch(l.tag){case 0:case 11:case 15:Zr(a,l,d,p),v&2048&&Yu(9,l);break;case 1:Zr(a,l,d,p);break;case 3:Zr(a,l,d,p),v&2048&&(a=null,l.alternate!==null&&(a=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==a&&(l.refCount++,a!=null&&Du(a)));break;case 12:if(v&2048){Zr(a,l,d,p),a=l.stateNode;try{var x=l.memoizedProps,L=x.id,V=x.onPostCommit;typeof V=="function"&&V(L,l.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(te){St(l,l.return,te)}}else Zr(a,l,d,p);break;case 31:Zr(a,l,d,p);break;case 13:Zr(a,l,d,p);break;case 23:break;case 22:x=l.stateNode,L=l.alternate,l.memoizedState!==null?x._visibility&2?Zr(a,l,d,p):Ku(a,l):x._visibility&2?Zr(a,l,d,p):(x._visibility|=2,ml(a,l,d,p,(l.subtreeFlags&10256)!==0||!1)),v&2048&&I_(L,l);break;case 24:Zr(a,l,d,p),v&2048&&P_(l.alternate,l);break;default:Zr(a,l,d,p)}}function ml(a,l,d,p,v){for(v=v&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var x=a,L=l,V=d,te=p,fe=L.flags;switch(L.tag){case 0:case 11:case 15:ml(x,L,V,te,v),Yu(8,L);break;case 23:break;case 22:var ve=L.stateNode;L.memoizedState!==null?ve._visibility&2?ml(x,L,V,te,v):Ku(x,L):(ve._visibility|=2,ml(x,L,V,te,v)),v&&fe&2048&&I_(L.alternate,L);break;case 24:ml(x,L,V,te,v),v&&fe&2048&&P_(L.alternate,L);break;default:ml(x,L,V,te,v)}l=l.sibling}}function Ku(a,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=a,p=l,v=p.flags;switch(p.tag){case 22:Ku(d,p),v&2048&&I_(p.alternate,p);break;case 24:Ku(d,p),v&2048&&P_(p.alternate,p);break;default:Ku(d,p)}l=l.sibling}}var Qu=8192;function pl(a,l,d){if(a.subtreeFlags&Qu)for(a=a.child;a!==null;)mw(a,l,d),a=a.sibling}function mw(a,l,d){switch(a.tag){case 26:pl(a,l,d),a.flags&Qu&&a.memoizedState!==null&&Jz(d,Qr,a.memoizedState,a.memoizedProps);break;case 5:pl(a,l,d);break;case 3:case 4:var p=Qr;Qr=Td(a.stateNode.containerInfo),pl(a,l,d),Qr=p;break;case 22:a.memoizedState===null&&(p=a.alternate,p!==null&&p.memoizedState!==null?(p=Qu,Qu=16777216,pl(a,l,d),Qu=p):pl(a,l,d));break;default:pl(a,l,d)}}function pw(a){var l=a.alternate;if(l!==null&&(a=l.child,a!==null)){l.child=null;do l=a.sibling,a.sibling=null,a=l;while(a!==null)}}function Zu(a){var l=a.deletions;if((a.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var p=l[d];bn=p,gw(p,a)}pw(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)_w(a),a=a.sibling}function _w(a){switch(a.tag){case 0:case 11:case 15:Zu(a),a.flags&2048&&Qa(9,a,a.return);break;case 3:Zu(a);break;case 12:Zu(a);break;case 22:var l=a.stateNode;a.memoizedState!==null&&l._visibility&2&&(a.return===null||a.return.tag!==13)?(l._visibility&=-3,md(a)):Zu(a);break;default:Zu(a)}}function md(a){var l=a.deletions;if((a.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var p=l[d];bn=p,gw(p,a)}pw(a)}for(a=a.child;a!==null;){switch(l=a,l.tag){case 0:case 11:case 15:Qa(8,l,l.return),md(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,md(l));break;default:md(l)}a=a.sibling}}function gw(a,l){for(;bn!==null;){var d=bn;switch(d.tag){case 0:case 11:case 15:Qa(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var p=d.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:Du(d.memoizedState.cache)}if(p=d.child,p!==null)p.return=d,bn=p;else e:for(d=a;bn!==null;){p=bn;var v=p.sibling,x=p.return;if(sw(p),p===d){bn=null;break e}if(v!==null){v.return=x,bn=v;break e}bn=x}}}var mz={getCacheForType:function(a){var l=Sn(on),d=l.data.get(a);return d===void 0&&(d=a(),l.data.set(a,d)),d},cacheSignal:function(){return Sn(on).controller.signal}},pz=typeof WeakMap=="function"?WeakMap:Map,bt=0,Nt=null,at=null,lt=0,Et=0,dr=null,Za=!1,_l=!1,$_=!1,sa=0,Zt=0,Ja=0,os=0,B_=0,hr=0,gl=0,Ju=null,Zn=null,U_=!1,pd=0,yw=0,_d=1/0,gd=null,eo=null,hn=0,to=null,yl=null,la=0,G_=0,F_=null,vw=null,ec=0,H_=null;function mr(){return(bt&2)!==0&&lt!==0?lt&-lt:A.T!==null?Q_():Gi()}function bw(){if(hr===0)if((lt&536870912)===0||ct){var a=Aa;Aa<<=1,(Aa&3932160)===0&&(Aa=262144),hr=a}else hr=536870912;return a=cr.current,a!==null&&(a.flags|=32),hr}function Jn(a,l,d){(a===Nt&&(Et===2||Et===9)||a.cancelPendingCommit!==null)&&(vl(a,0),no(a,lt,hr,!1)),Bi(a,d),((bt&2)===0||a!==Nt)&&(a===Nt&&((bt&2)===0&&(os|=d),Zt===4&&no(a,lt,hr,!1)),Ti(a))}function xw(a,l,d){if((bt&6)!==0)throw Error(r(327));var p=!d&&(l&127)===0&&(l&a.expiredLanes)===0||$i(a,l),v=p?yz(a,l):X_(a,l,!0),x=p;do{if(v===0){_l&&!p&&no(a,l,0,!1);break}else{if(d=a.current.alternate,x&&!_z(d)){v=X_(a,l,!1),x=!1;continue}if(v===2){if(x=l,a.errorRecoveryDisabledLanes&x)var L=0;else L=a.pendingLanes&-536870913,L=L!==0?L:L&536870912?536870912:0;if(L!==0){l=L;e:{var V=a;v=Ju;var te=V.current.memoizedState.isDehydrated;if(te&&(vl(V,L).flags|=256),L=X_(V,L,!1),L!==2){if($_&&!te){V.errorRecoveryDisabledLanes|=x,os|=x,v=4;break e}x=Zn,Zn=v,x!==null&&(Zn===null?Zn=x:Zn.push.apply(Zn,x))}v=L}if(x=!1,v!==2)continue}}if(v===1){vl(a,0),no(a,l,0,!0);break}e:{switch(p=a,x=v,x){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:no(p,l,hr,!Za);break e;case 2:Zn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(v=pd+300-ft(),10<v)){if(no(p,l,hr,!Za),Pi(p,0,!0)!==0)break e;la=l,p.timeoutHandle=Zw(ww.bind(null,p,d,Zn,gd,U_,l,hr,os,gl,Za,x,"Throttled",-0,0),v);break e}ww(p,d,Zn,gd,U_,l,hr,os,gl,Za,x,null,-0,0)}}break}while(!0);Ti(a)}function ww(a,l,d,p,v,x,L,V,te,fe,ve,Se,he,pe){if(a.timeoutHandle=-1,Se=l.subtreeFlags,Se&8192||(Se&16785408)===16785408){Se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xr},mw(l,x,Se);var Ie=(x&62914560)===x?pd-ft():(x&4194048)===x?yw-ft():0;if(Ie=e3(Se,Ie),Ie!==null){la=x,a.cancelPendingCommit=Ie(Rw.bind(null,a,l,x,d,p,v,L,V,te,ve,Se,null,he,pe)),no(a,x,L,!fe);return}}Rw(a,l,x,d,p,v,L,V,te)}function _z(a){for(var l=a;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var p=0;p<d.length;p++){var v=d[p],x=v.getSnapshot;v=v.value;try{if(!lr(x(),v))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function no(a,l,d,p){l&=~B_,l&=~os,a.suspendedLanes|=l,a.pingedLanes&=~l,p&&(a.warmLanes|=l),p=a.expirationTimes;for(var v=l;0<v;){var x=31-vt(v),L=1<<x;p[x]=-1,v&=~L}d!==0&&Na(a,d,l)}function yd(){return(bt&6)===0?(tc(0),!1):!0}function V_(){if(at!==null){if(Et===0)var a=at.return;else a=at,Qi=Qo=null,l_(a),ul=null,qu=0,a=at;for(;a!==null;)Jx(a.alternate,a),a=a.return;at=null}}function vl(a,l){var d=a.timeoutHandle;d!==-1&&(a.timeoutHandle=-1,Oz(d)),d=a.cancelPendingCommit,d!==null&&(a.cancelPendingCommit=null,d()),la=0,V_(),Nt=a,at=d=Wi(a.current,null),lt=l,Et=0,dr=null,Za=!1,_l=$i(a,l),$_=!1,gl=hr=B_=os=Ja=Zt=0,Zn=Ju=null,U_=!1,(l&8)!==0&&(l|=l&32);var p=a.entangledLanes;if(p!==0)for(a=a.entanglements,p&=l;0<p;){var v=31-vt(p),x=1<<v;l|=a[v],p&=~x}return sa=l,Pf(),d}function kw(a,l){tt=null,A.H=Hu,l===ll||l===Xf?(l=Pb(),Et=3):l===Kp?(l=Pb(),Et=4):Et=l===E_?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,dr=l,at===null&&(Zt=1,sd(a,Sr(l,a.current)))}function Ew(){var a=cr.current;return a===null?!0:(lt&4194048)===lt?Ar===null:(lt&62914560)===lt||(lt&536870912)!==0?a===Ar:!1}function Sw(){var a=A.H;return A.H=Hu,a===null?Hu:a}function Cw(){var a=A.A;return A.A=mz,a}function vd(){Zt=4,Za||(lt&4194048)!==lt&&cr.current!==null||(_l=!0),(Ja&134217727)===0&&(os&134217727)===0||Nt===null||no(Nt,lt,hr,!1)}function X_(a,l,d){var p=bt;bt|=2;var v=Sw(),x=Cw();(Nt!==a||lt!==l)&&(gd=null,vl(a,l)),l=!1;var L=Zt;e:do try{if(Et!==0&&at!==null){var V=at,te=dr;switch(Et){case 8:V_(),L=6;break e;case 3:case 2:case 9:case 6:cr.current===null&&(l=!0);var fe=Et;if(Et=0,dr=null,bl(a,V,te,fe),d&&_l){L=0;break e}break;default:fe=Et,Et=0,dr=null,bl(a,V,te,fe)}}gz(),L=Zt;break}catch(ve){kw(a,ve)}while(!0);return l&&a.shellSuspendCounter++,Qi=Qo=null,bt=p,A.H=v,A.A=x,at===null&&(Nt=null,lt=0,Pf()),L}function gz(){for(;at!==null;)Tw(at)}function yz(a,l){var d=bt;bt|=2;var p=Sw(),v=Cw();Nt!==a||lt!==l?(gd=null,_d=ft()+500,vl(a,l)):_l=$i(a,l);e:do try{if(Et!==0&&at!==null){l=at;var x=dr;t:switch(Et){case 1:Et=0,dr=null,bl(a,l,x,1);break;case 2:case 9:if(qb(x)){Et=0,dr=null,jw(l);break}l=function(){Et!==2&&Et!==9||Nt!==a||(Et=7),Ti(a)},x.then(l,l);break e;case 3:Et=7;break e;case 4:Et=5;break e;case 7:qb(x)?(Et=0,dr=null,jw(l)):(Et=0,dr=null,bl(a,l,x,7));break;case 5:var L=null;switch(at.tag){case 26:L=at.memoizedState;case 5:case 27:var V=at;if(L?hk(L):V.stateNode.complete){Et=0,dr=null;var te=V.sibling;if(te!==null)at=te;else{var fe=V.return;fe!==null?(at=fe,bd(fe)):at=null}break t}}Et=0,dr=null,bl(a,l,x,5);break;case 6:Et=0,dr=null,bl(a,l,x,6);break;case 8:V_(),Zt=6;break e;default:throw Error(r(462))}}vz();break}catch(ve){kw(a,ve)}while(!0);return Qi=Qo=null,A.H=p,A.A=v,bt=d,at!==null?0:(Nt=null,lt=0,Pf(),Zt)}function vz(){for(;at!==null&&!Gt();)Tw(at)}function Tw(a){var l=Qx(a.alternate,a,sa);a.memoizedProps=a.pendingProps,l===null?bd(a):at=l}function jw(a){var l=a,d=l.alternate;switch(l.tag){case 15:case 0:l=Hx(d,l,l.pendingProps,l.type,void 0,lt);break;case 11:l=Hx(d,l,l.pendingProps,l.type.render,l.ref,lt);break;case 5:l_(l);default:Jx(d,l),l=at=Cb(l,sa),l=Qx(d,l,sa)}a.memoizedProps=a.pendingProps,l===null?bd(a):at=l}function bl(a,l,d,p){Qi=Qo=null,l_(l),ul=null,qu=0;var v=l.return;try{if(sz(a,v,l,d,lt)){Zt=1,sd(a,Sr(d,a.current)),at=null;return}}catch(x){if(v!==null)throw at=v,x;Zt=1,sd(a,Sr(d,a.current)),at=null;return}l.flags&32768?(ct||p===1?a=!0:_l||(lt&536870912)!==0?a=!1:(Za=a=!0,(p===2||p===9||p===3||p===6)&&(p=cr.current,p!==null&&p.tag===13&&(p.flags|=16384))),Aw(l,a)):bd(l)}function bd(a){var l=a;do{if((l.flags&32768)!==0){Aw(l,Za);return}a=l.return;var d=cz(l.alternate,l,sa);if(d!==null){at=d;return}if(l=l.sibling,l!==null){at=l;return}at=l=a}while(l!==null);Zt===0&&(Zt=5)}function Aw(a,l){do{var d=fz(a.alternate,a);if(d!==null){d.flags&=32767,at=d;return}if(d=a.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(a=a.sibling,a!==null)){at=a;return}at=a=d}while(a!==null);Zt=6,at=null}function Rw(a,l,d,p,v,x,L,V,te){a.cancelPendingCommit=null;do xd();while(hn!==0);if((bt&6)!==0)throw Error(r(327));if(l!==null){if(l===a.current)throw Error(r(177));if(x=l.lanes|l.childLanes,x|=Dp,Ps(a,d,x,L,V,te),a===Nt&&(at=Nt=null,lt=0),yl=l,to=a,la=d,G_=x,F_=v,vw=p,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,kz(qe,function(){return Dw(),null})):(a.callbackNode=null,a.callbackPriority=0),p=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||p){p=A.T,A.T=null,v=N.p,N.p=2,L=bt,bt|=4;try{dz(a,l,d)}finally{bt=L,N.p=v,A.T=p}}hn=1,Nw(),Lw(),zw()}}function Nw(){if(hn===1){hn=0;var a=to,l=yl,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=A.T,A.T=null;var p=N.p;N.p=2;var v=bt;bt|=4;try{fw(l,a);var x=ag,L=gb(a.containerInfo),V=x.focusedElem,te=x.selectionRange;if(L!==V&&V&&V.ownerDocument&&_b(V.ownerDocument.documentElement,V)){if(te!==null&&Rp(V)){var fe=te.start,ve=te.end;if(ve===void 0&&(ve=fe),"selectionStart"in V)V.selectionStart=fe,V.selectionEnd=Math.min(ve,V.value.length);else{var Se=V.ownerDocument||document,he=Se&&Se.defaultView||window;if(he.getSelection){var pe=he.getSelection(),Ie=V.textContent.length,Ye=Math.min(te.start,Ie),Rt=te.end===void 0?Ye:Math.min(te.end,Ie);!pe.extend&&Ye>Rt&&(L=Rt,Rt=Ye,Ye=L);var ae=pb(V,Ye),re=pb(V,Rt);if(ae&&re&&(pe.rangeCount!==1||pe.anchorNode!==ae.node||pe.anchorOffset!==ae.offset||pe.focusNode!==re.node||pe.focusOffset!==re.offset)){var ce=Se.createRange();ce.setStart(ae.node,ae.offset),pe.removeAllRanges(),Ye>Rt?(pe.addRange(ce),pe.extend(re.node,re.offset)):(ce.setEnd(re.node,re.offset),pe.addRange(ce))}}}}for(Se=[],pe=V;pe=pe.parentNode;)pe.nodeType===1&&Se.push({element:pe,left:pe.scrollLeft,top:pe.scrollTop});for(typeof V.focus=="function"&&V.focus(),V=0;V<Se.length;V++){var xe=Se[V];xe.element.scrollLeft=xe.left,xe.element.scrollTop=xe.top}}zd=!!ig,ag=ig=null}finally{bt=v,N.p=p,A.T=d}}a.current=l,hn=2}}function Lw(){if(hn===2){hn=0;var a=to,l=yl,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=A.T,A.T=null;var p=N.p;N.p=2;var v=bt;bt|=4;try{ow(a,l.alternate,l)}finally{bt=v,N.p=p,A.T=d}}hn=3}}function zw(){if(hn===4||hn===3){hn=0,an();var a=to,l=yl,d=la,p=vw;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?hn=5:(hn=0,yl=to=null,Mw(a,a.pendingLanes));var v=a.pendingLanes;if(v===0&&(eo=null),Do(d),l=l.stateNode,Ht&&typeof Ht.onCommitFiberRoot=="function")try{Ht.onCommitFiberRoot(yt,l,void 0,(l.current.flags&128)===128)}catch{}if(p!==null){l=A.T,v=N.p,N.p=2,A.T=null;try{for(var x=a.onRecoverableError,L=0;L<p.length;L++){var V=p[L];x(V.value,{componentStack:V.stack})}}finally{A.T=l,N.p=v}}(la&3)!==0&&xd(),Ti(a),v=a.pendingLanes,(d&261930)!==0&&(v&42)!==0?a===H_?ec++:(ec=0,H_=a):ec=0,tc(0)}}function Mw(a,l){(a.pooledCacheLanes&=l)===0&&(l=a.pooledCache,l!=null&&(a.pooledCache=null,Du(l)))}function xd(){return Nw(),Lw(),zw(),Dw()}function Dw(){if(hn!==5)return!1;var a=to,l=G_;G_=0;var d=Do(la),p=A.T,v=N.p;try{N.p=32>d?32:d,A.T=null,d=F_,F_=null;var x=to,L=la;if(hn=0,yl=to=null,la=0,(bt&6)!==0)throw Error(r(331));var V=bt;if(bt|=4,_w(x.current),hw(x,x.current,L,d),bt=V,tc(0,!1),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(yt,x)}catch{}return!0}finally{N.p=v,A.T=p,Mw(a,l)}}function Ow(a,l,d){l=Sr(d,l),l=k_(a.stateNode,l,2),a=Ya(a,l,2),a!==null&&(Bi(a,2),Ti(a))}function St(a,l,d){if(a.tag===3)Ow(a,a,d);else for(;l!==null;){if(l.tag===3){Ow(l,a,d);break}else if(l.tag===1){var p=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(eo===null||!eo.has(p))){a=Sr(d,a),d=qx(2),p=Ya(l,d,2),p!==null&&(Ix(d,p,l,a),Bi(p,2),Ti(p));break}}l=l.return}}function Y_(a,l,d){var p=a.pingCache;if(p===null){p=a.pingCache=new pz;var v=new Set;p.set(l,v)}else v=p.get(l),v===void 0&&(v=new Set,p.set(l,v));v.has(d)||($_=!0,v.add(d),a=bz.bind(null,a,l,d),l.then(a,a))}function bz(a,l,d){var p=a.pingCache;p!==null&&p.delete(l),a.pingedLanes|=a.suspendedLanes&d,a.warmLanes&=~d,Nt===a&&(lt&d)===d&&(Zt===4||Zt===3&&(lt&62914560)===lt&&300>ft()-pd?(bt&2)===0&&vl(a,0):B_|=d,gl===lt&&(gl=0)),Ti(a)}function qw(a,l){l===0&&(l=Lo()),a=Yo(a,l),a!==null&&(Bi(a,l),Ti(a))}function xz(a){var l=a.memoizedState,d=0;l!==null&&(d=l.retryLane),qw(a,d)}function wz(a,l){var d=0;switch(a.tag){case 31:case 13:var p=a.stateNode,v=a.memoizedState;v!==null&&(d=v.retryLane);break;case 19:p=a.stateNode;break;case 22:p=a.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(l),qw(a,d)}function kz(a,l){return Tt(a,l)}var wd=null,xl=null,W_=!1,kd=!1,K_=!1,ro=0;function Ti(a){a!==xl&&a.next===null&&(xl===null?wd=xl=a:xl=xl.next=a),kd=!0,W_||(W_=!0,Sz())}function tc(a,l){if(!K_&&kd){K_=!0;do for(var d=!1,p=wd;p!==null;){if(a!==0){var v=p.pendingLanes;if(v===0)var x=0;else{var L=p.suspendedLanes,V=p.pingedLanes;x=(1<<31-vt(42|a)+1)-1,x&=v&~(L&~V),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(d=!0,Bw(p,x))}else x=lt,x=Pi(p,p===Nt?x:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(x&3)===0||$i(p,x)||(d=!0,Bw(p,x));p=p.next}while(d);K_=!1}}function Ez(){Iw()}function Iw(){kd=W_=!1;var a=0;ro!==0&&Dz()&&(a=ro);for(var l=ft(),d=null,p=wd;p!==null;){var v=p.next,x=Pw(p,l);x===0?(p.next=null,d===null?wd=v:d.next=v,v===null&&(xl=d)):(d=p,(a!==0||(x&3)!==0)&&(kd=!0)),p=v}hn!==0&&hn!==5||tc(a),ro!==0&&(ro=0)}function Pw(a,l){for(var d=a.suspendedLanes,p=a.pingedLanes,v=a.expirationTimes,x=a.pendingLanes&-62914561;0<x;){var L=31-vt(x),V=1<<L,te=v[L];te===-1?((V&d)===0||(V&p)!==0)&&(v[L]=Is(V,l)):te<=l&&(a.expiredLanes|=V),x&=~V}if(l=Nt,d=lt,d=Pi(a,a===l?d:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),p=a.callbackNode,d===0||a===l&&(Et===2||Et===9)||a.cancelPendingCommit!==null)return p!==null&&p!==null&&pt(p),a.callbackNode=null,a.callbackPriority=0;if((d&3)===0||$i(a,d)){if(l=d&-d,l===a.callbackPriority)return l;switch(p!==null&&pt(p),Do(d)){case 2:case 8:d=Re;break;case 32:d=qe;break;case 268435456:d=nt;break;default:d=qe}return p=$w.bind(null,a),d=Tt(d,p),a.callbackPriority=l,a.callbackNode=d,l}return p!==null&&p!==null&&pt(p),a.callbackPriority=2,a.callbackNode=null,2}function $w(a,l){if(hn!==0&&hn!==5)return a.callbackNode=null,a.callbackPriority=0,null;var d=a.callbackNode;if(xd()&&a.callbackNode!==d)return null;var p=lt;return p=Pi(a,a===Nt?p:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),p===0?null:(xw(a,p,l),Pw(a,ft()),a.callbackNode!=null&&a.callbackNode===d?$w.bind(null,a):null)}function Bw(a,l){if(xd())return null;xw(a,l,!0)}function Sz(){qz(function(){(bt&6)!==0?Tt(_e,Ez):Iw()})}function Q_(){if(ro===0){var a=ol;a===0&&(a=ja,ja<<=1,(ja&261888)===0&&(ja=256)),ro=a}return ro}function Uw(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Xs(""+a)}function Gw(a,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,a.id&&d.setAttribute("form",a.id),l.parentNode.insertBefore(d,l),a=new FormData(a),d.parentNode.removeChild(d),a}function Cz(a,l,d,p,v){if(l==="submit"&&d&&d.stateNode===v){var x=Uw((v[De]||null).action),L=p.submitter;L&&(l=(l=L[De]||null)?Uw(l.formAction):L.getAttribute("formAction"),l!==null&&(x=l,L=null));var V=new Go("action","action",null,p,v);a.push({event:V,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(ro!==0){var te=L?Gw(v,L):new FormData(v);g_(d,{pending:!0,data:te,method:v.method,action:x},null,te)}}else typeof x=="function"&&(V.preventDefault(),te=L?Gw(v,L):new FormData(v),g_(d,{pending:!0,data:te,method:v.method,action:x},x,te))},currentTarget:v}]})}}for(var Z_=0;Z_<Mp.length;Z_++){var J_=Mp[Z_],Tz=J_.toLowerCase(),jz=J_[0].toUpperCase()+J_.slice(1);Kr(Tz,"on"+jz)}Kr(bb,"onAnimationEnd"),Kr(xb,"onAnimationIteration"),Kr(wb,"onAnimationStart"),Kr("dblclick","onDoubleClick"),Kr("focusin","onFocus"),Kr("focusout","onBlur"),Kr(FL,"onTransitionRun"),Kr(HL,"onTransitionStart"),Kr(VL,"onTransitionCancel"),Kr(kb,"onTransitionEnd"),gi("onMouseEnter",["mouseout","mouseover"]),gi("onMouseLeave",["mouseout","mouseover"]),gi("onPointerEnter",["pointerout","pointerover"]),gi("onPointerLeave",["pointerout","pointerover"]),kr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),kr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),kr("onBeforeInput",["compositionend","keypress","textInput","paste"]),kr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),kr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),kr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var nc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Az=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(nc));function Fw(a,l){l=(l&4)!==0;for(var d=0;d<a.length;d++){var p=a[d],v=p.event;p=p.listeners;e:{var x=void 0;if(l)for(var L=p.length-1;0<=L;L--){var V=p[L],te=V.instance,fe=V.currentTarget;if(V=V.listener,te!==x&&v.isPropagationStopped())break e;x=V,v.currentTarget=fe;try{x(v)}catch(ve){If(ve)}v.currentTarget=null,x=te}else for(L=0;L<p.length;L++){if(V=p[L],te=V.instance,fe=V.currentTarget,V=V.listener,te!==x&&v.isPropagationStopped())break e;x=V,v.currentTarget=fe;try{x(v)}catch(ve){If(ve)}v.currentTarget=null,x=te}}}}function ot(a,l){var d=l[La];d===void 0&&(d=l[La]=new Set);var p=a+"__bubble";d.has(p)||(Hw(l,a,2,!1),d.add(p))}function eg(a,l,d){var p=0;l&&(p|=4),Hw(d,a,p,l)}var Ed="_reactListening"+Math.random().toString(36).slice(2);function tg(a){if(!a[Ed]){a[Ed]=!0,Us.forEach(function(d){d!=="selectionchange"&&(Az.has(d)||eg(d,!1,a),eg(d,!0,a))});var l=a.nodeType===9?a:a.ownerDocument;l===null||l[Ed]||(l[Ed]=!0,eg("selectionchange",!1,l))}}function Hw(a,l,d,p){switch(bk(l)){case 2:var v=r3;break;case 8:v=i3;break;default:v=_g}d=v.bind(null,l,d,a),v=void 0,!Yt||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(v=!0),p?v!==void 0?a.addEventListener(l,d,{capture:!0,passive:v}):a.addEventListener(l,d,!0):v!==void 0?a.addEventListener(l,d,{passive:v}):a.addEventListener(l,d,!1)}function ng(a,l,d,p,v){var x=p;if((l&1)===0&&(l&2)===0&&p!==null)e:for(;;){if(p===null)return;var L=p.tag;if(L===3||L===4){var V=p.stateNode.containerInfo;if(V===v)break;if(L===4)for(L=p.return;L!==null;){var te=L.tag;if((te===3||te===4)&&L.stateNode.containerInfo===v)return;L=L.return}for(;V!==null;){if(L=mi(V),L===null)return;if(te=L.tag,te===5||te===6||te===26||te===27){p=x=L;continue e}V=V.parentNode}}p=p.return}Df(function(){var fe=x,ve=Eu(d),Se=[];e:{var he=Eb.get(a);if(he!==void 0){var pe=Go,Ie=a;switch(a){case"keypress":if($a(d)===0)break e;case"keydown":case"keyup":pe=Yn;break;case"focusin":Ie="focus",pe=Ge;break;case"focusout":Ie="blur",pe=Ge;break;case"beforeblur":case"afterblur":pe=Ge;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":pe=se;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":pe=Ee;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":pe=SL;break;case bb:case xb:case wb:pe=Me;break;case kb:pe=TL;break;case"scroll":case"scrollend":pe=Sp;break;case"wheel":pe=AL;break;case"copy":case"cut":case"paste":pe=dn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":pe=Of;break;case"toggle":case"beforetoggle":pe=NL}var Ye=(l&4)!==0,Rt=!Ye&&(a==="scroll"||a==="scrollend"),ae=Ye?he!==null?he+"Capture":null:he;Ye=[];for(var re=fe,ce;re!==null;){var xe=re;if(ce=xe.stateNode,xe=xe.tag,xe!==5&&xe!==26&&xe!==27||ce===null||ae===null||(xe=Bo(re,ae),xe!=null&&Ye.push(rc(re,xe,ce))),Rt)break;re=re.return}0<Ye.length&&(he=new pe(he,Ie,null,d,ve),Se.push({event:he,listeners:Ye}))}}if((l&7)===0){e:{if(he=a==="mouseover"||a==="pointerover",pe=a==="mouseout"||a==="pointerout",he&&d!==ku&&(Ie=d.relatedTarget||d.fromElement)&&(mi(Ie)||Ie[Fr]))break e;if((pe||he)&&(he=ve.window===ve?ve:(he=ve.ownerDocument)?he.defaultView||he.parentWindow:window,pe?(Ie=d.relatedTarget||d.toElement,pe=fe,Ie=Ie?mi(Ie):null,Ie!==null&&(Rt=o(Ie),Ye=Ie.tag,Ie!==Rt||Ye!==5&&Ye!==27&&Ye!==6)&&(Ie=null)):(pe=null,Ie=fe),pe!==Ie)){if(Ye=se,xe="onMouseLeave",ae="onMouseEnter",re="mouse",(a==="pointerout"||a==="pointerover")&&(Ye=Of,xe="onPointerLeave",ae="onPointerEnter",re="pointer"),Rt=pe==null?he:_i(pe),ce=Ie==null?he:_i(Ie),he=new Ye(xe,re+"leave",pe,d,ve),he.target=Rt,he.relatedTarget=ce,xe=null,mi(ve)===fe&&(Ye=new Ye(ae,re+"enter",Ie,d,ve),Ye.target=ce,Ye.relatedTarget=Rt,xe=Ye),Rt=xe,pe&&Ie)t:{for(Ye=Rz,ae=pe,re=Ie,ce=0,xe=ae;xe;xe=Ye(xe))ce++;xe=0;for(var Fe=re;Fe;Fe=Ye(Fe))xe++;for(;0<ce-xe;)ae=Ye(ae),ce--;for(;0<xe-ce;)re=Ye(re),xe--;for(;ce--;){if(ae===re||re!==null&&ae===re.alternate){Ye=ae;break t}ae=Ye(ae),re=Ye(re)}Ye=null}else Ye=null;pe!==null&&Vw(Se,he,pe,Ye,!1),Ie!==null&&Rt!==null&&Vw(Se,Rt,Ie,Ye,!0)}}e:{if(he=fe?_i(fe):window,pe=he.nodeName&&he.nodeName.toLowerCase(),pe==="select"||pe==="input"&&he.type==="file")var _t=ub;else if(sb(he))if(cb)_t=BL;else{_t=PL;var Be=IL}else pe=he.nodeName,!pe||pe.toLowerCase()!=="input"||he.type!=="checkbox"&&he.type!=="radio"?fe&&wu(fe.elementType)&&(_t=ub):_t=$L;if(_t&&(_t=_t(a,fe))){lb(Se,_t,d,ve);break e}Be&&Be(a,he,fe),a==="focusout"&&fe&&he.type==="number"&&fe.memoizedProps.value!=null&&Po(he,"number",he.value)}switch(Be=fe?_i(fe):window,a){case"focusin":(sb(Be)||Be.contentEditable==="true")&&(Zs=Be,Np=fe,Lu=null);break;case"focusout":Lu=Np=Zs=null;break;case"mousedown":Lp=!0;break;case"contextmenu":case"mouseup":case"dragend":Lp=!1,yb(Se,d,ve);break;case"selectionchange":if(GL)break;case"keydown":case"keyup":yb(Se,d,ve)}var rt;if(Tp)e:{switch(a){case"compositionstart":var ut="onCompositionStart";break e;case"compositionend":ut="onCompositionEnd";break e;case"compositionupdate":ut="onCompositionUpdate";break e}ut=void 0}else Qs?ab(a,d)&&(ut="onCompositionEnd"):a==="keydown"&&d.keyCode===229&&(ut="onCompositionStart");ut&&(nb&&d.locale!=="ko"&&(Qs||ut!=="onCompositionStart"?ut==="onCompositionEnd"&&Qs&&(rt=Wr()):(vi=ve,Ia="value"in vi?vi.value:vi.textContent,Qs=!0)),Be=Sd(fe,ut),0<Be.length&&(ut=new mt(ut,a,null,d,ve),Se.push({event:ut,listeners:Be}),rt?ut.data=rt:(rt=ob(d),rt!==null&&(ut.data=rt)))),(rt=zL?ML(a,d):DL(a,d))&&(ut=Sd(fe,"onBeforeInput"),0<ut.length&&(Be=new mt("onBeforeInput","beforeinput",null,d,ve),Se.push({event:Be,listeners:ut}),Be.data=rt)),Cz(Se,a,fe,d,ve)}Fw(Se,l)})}function rc(a,l,d){return{instance:a,listener:l,currentTarget:d}}function Sd(a,l){for(var d=l+"Capture",p=[];a!==null;){var v=a,x=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||x===null||(v=Bo(a,d),v!=null&&p.unshift(rc(a,v,x)),v=Bo(a,l),v!=null&&p.push(rc(a,v,x))),a.tag===3)return p;a=a.return}return[]}function Rz(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function Vw(a,l,d,p,v){for(var x=l._reactName,L=[];d!==null&&d!==p;){var V=d,te=V.alternate,fe=V.stateNode;if(V=V.tag,te!==null&&te===p)break;V!==5&&V!==26&&V!==27||fe===null||(te=fe,v?(fe=Bo(d,x),fe!=null&&L.unshift(rc(d,fe,te))):v||(fe=Bo(d,x),fe!=null&&L.push(rc(d,fe,te)))),d=d.return}L.length!==0&&a.push({event:l,listeners:L})}var Nz=/\r\n?/g,Lz=/\u0000|\uFFFD/g;function Xw(a){return(typeof a=="string"?a:""+a).replace(Nz,`
50
+ `).replace(Lz,"")}function Yw(a,l){return l=Xw(l),Xw(a)===l}function At(a,l,d,p,v,x){switch(d){case"children":typeof p=="string"?l==="body"||l==="textarea"&&p===""||Ot(a,p):(typeof p=="number"||typeof p=="bigint")&&l!=="body"&&Ot(a,""+p);break;case"className":Da(a,"class",p);break;case"tabIndex":Da(a,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":Da(a,d,p);break;case"style":zf(a,p,x);break;case"data":if(l!=="object"){Da(a,"data",p);break}case"src":case"href":if(p===""&&(l!=="a"||d!=="href")){a.removeAttribute(d);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){a.removeAttribute(d);break}p=Xs(""+p),a.setAttribute(d,p);break;case"action":case"formAction":if(typeof p=="function"){a.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof x=="function"&&(d==="formAction"?(l!=="input"&&At(a,l,"name",v.name,v,null),At(a,l,"formEncType",v.formEncType,v,null),At(a,l,"formMethod",v.formMethod,v,null),At(a,l,"formTarget",v.formTarget,v,null)):(At(a,l,"encType",v.encType,v,null),At(a,l,"method",v.method,v,null),At(a,l,"target",v.target,v,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){a.removeAttribute(d);break}p=Xs(""+p),a.setAttribute(d,p);break;case"onClick":p!=null&&(a.onclick=Xr);break;case"onScroll":p!=null&&ot("scroll",a);break;case"onScrollEnd":p!=null&&ot("scrollend",a);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(d=p.__html,d!=null){if(v.children!=null)throw Error(r(60));a.innerHTML=d}}break;case"multiple":a.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":a.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){a.removeAttribute("xlink:href");break}d=Xs(""+p),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(d,""+p):a.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":p&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(d,""):a.removeAttribute(d);break;case"capture":case"download":p===!0?a.setAttribute(d,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(d,p):a.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?a.setAttribute(d,p):a.removeAttribute(d);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?a.removeAttribute(d):a.setAttribute(d,p);break;case"popover":ot("beforetoggle",a),ot("toggle",a),Ma(a,"popover",p);break;case"xlinkActuate":or(a,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":or(a,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":or(a,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":or(a,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":or(a,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":or(a,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":or(a,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":or(a,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":or(a,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":Ma(a,"is",p);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=Ep.get(d)||d,Ma(a,d,p))}}function rg(a,l,d,p,v,x){switch(d){case"style":zf(a,p,x);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(d=p.__html,d!=null){if(v.children!=null)throw Error(r(60));a.innerHTML=d}}break;case"children":typeof p=="string"?Ot(a,p):(typeof p=="number"||typeof p=="bigint")&&Ot(a,""+p);break;case"onScroll":p!=null&&ot("scroll",a);break;case"onScrollEnd":p!=null&&ot("scrollend",a);break;case"onClick":p!=null&&(a.onclick=Xr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Gs.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(v=d.endsWith("Capture"),l=d.slice(2,v?d.length-7:void 0),x=a[De]||null,x=x!=null?x[d]:null,typeof x=="function"&&a.removeEventListener(l,x,v),typeof p=="function")){typeof x!="function"&&x!==null&&(d in a?a[d]=null:a.hasAttribute(d)&&a.removeAttribute(d)),a.addEventListener(l,p,v);break e}d in a?a[d]=p:p===!0?a.setAttribute(d,""):Ma(a,d,p)}}}function Tn(a,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ot("error",a),ot("load",a);var p=!1,v=!1,x;for(x in d)if(d.hasOwnProperty(x)){var L=d[x];if(L!=null)switch(x){case"src":p=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:At(a,l,x,L,d,null)}}v&&At(a,l,"srcSet",d.srcSet,d,null),p&&At(a,l,"src",d.src,d,null);return;case"input":ot("invalid",a);var V=x=L=v=null,te=null,fe=null;for(p in d)if(d.hasOwnProperty(p)){var ve=d[p];if(ve!=null)switch(p){case"name":v=ve;break;case"type":L=ve;break;case"checked":te=ve;break;case"defaultChecked":fe=ve;break;case"value":x=ve;break;case"defaultValue":V=ve;break;case"children":case"dangerouslySetInnerHTML":if(ve!=null)throw Error(r(137,l));break;default:At(a,l,p,ve,d,null)}}Oa(a,x,V,te,fe,L,v,!1);return;case"select":ot("invalid",a),p=L=x=null;for(v in d)if(d.hasOwnProperty(v)&&(V=d[v],V!=null))switch(v){case"value":x=V;break;case"defaultValue":L=V;break;case"multiple":p=V;default:At(a,l,v,V,d,null)}l=x,d=L,a.multiple=!!p,l!=null?yi(a,!!p,l,!1):d!=null&&yi(a,!!p,d,!0);return;case"textarea":ot("invalid",a),x=v=p=null;for(L in d)if(d.hasOwnProperty(L)&&(V=d[L],V!=null))switch(L){case"value":p=V;break;case"defaultValue":v=V;break;case"children":x=V;break;case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(91));break;default:At(a,l,L,V,d,null)}xu(a,p,v,x);return;case"option":for(te in d)if(d.hasOwnProperty(te)&&(p=d[te],p!=null))switch(te){case"selected":a.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:At(a,l,te,p,d,null)}return;case"dialog":ot("beforetoggle",a),ot("toggle",a),ot("cancel",a),ot("close",a);break;case"iframe":case"object":ot("load",a);break;case"video":case"audio":for(p=0;p<nc.length;p++)ot(nc[p],a);break;case"image":ot("error",a),ot("load",a);break;case"details":ot("toggle",a);break;case"embed":case"source":case"link":ot("error",a),ot("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(fe in d)if(d.hasOwnProperty(fe)&&(p=d[fe],p!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:At(a,l,fe,p,d,null)}return;default:if(wu(l)){for(ve in d)d.hasOwnProperty(ve)&&(p=d[ve],p!==void 0&&rg(a,l,ve,p,d,void 0));return}}for(V in d)d.hasOwnProperty(V)&&(p=d[V],p!=null&&At(a,l,V,p,d,null))}function zz(a,l,d,p){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,x=null,L=null,V=null,te=null,fe=null,ve=null;for(pe in d){var Se=d[pe];if(d.hasOwnProperty(pe)&&Se!=null)switch(pe){case"checked":break;case"value":break;case"defaultValue":te=Se;default:p.hasOwnProperty(pe)||At(a,l,pe,null,p,Se)}}for(var he in p){var pe=p[he];if(Se=d[he],p.hasOwnProperty(he)&&(pe!=null||Se!=null))switch(he){case"type":x=pe;break;case"name":v=pe;break;case"checked":fe=pe;break;case"defaultChecked":ve=pe;break;case"value":L=pe;break;case"defaultValue":V=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(r(137,l));break;default:pe!==Se&&At(a,l,he,pe,p,Se)}}Io(a,L,V,te,fe,ve,x,v);return;case"select":pe=L=V=he=null;for(x in d)if(te=d[x],d.hasOwnProperty(x)&&te!=null)switch(x){case"value":break;case"multiple":pe=te;default:p.hasOwnProperty(x)||At(a,l,x,null,p,te)}for(v in p)if(x=p[v],te=d[v],p.hasOwnProperty(v)&&(x!=null||te!=null))switch(v){case"value":he=x;break;case"defaultValue":V=x;break;case"multiple":L=x;default:x!==te&&At(a,l,v,x,p,te)}l=V,d=L,p=pe,he!=null?yi(a,!!d,he,!1):!!p!=!!d&&(l!=null?yi(a,!!d,l,!0):yi(a,!!d,d?[]:"",!1));return;case"textarea":pe=he=null;for(V in d)if(v=d[V],d.hasOwnProperty(V)&&v!=null&&!p.hasOwnProperty(V))switch(V){case"value":break;case"children":break;default:At(a,l,V,null,p,v)}for(L in p)if(v=p[L],x=d[L],p.hasOwnProperty(L)&&(v!=null||x!=null))switch(L){case"value":he=v;break;case"defaultValue":pe=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==x&&At(a,l,L,v,p,x)}$o(a,he,pe);return;case"option":for(var Ie in d)if(he=d[Ie],d.hasOwnProperty(Ie)&&he!=null&&!p.hasOwnProperty(Ie))switch(Ie){case"selected":a.selected=!1;break;default:At(a,l,Ie,null,p,he)}for(te in p)if(he=p[te],pe=d[te],p.hasOwnProperty(te)&&he!==pe&&(he!=null||pe!=null))switch(te){case"selected":a.selected=he&&typeof he!="function"&&typeof he!="symbol";break;default:At(a,l,te,he,p,pe)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ye in d)he=d[Ye],d.hasOwnProperty(Ye)&&he!=null&&!p.hasOwnProperty(Ye)&&At(a,l,Ye,null,p,he);for(fe in p)if(he=p[fe],pe=d[fe],p.hasOwnProperty(fe)&&he!==pe&&(he!=null||pe!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,l));break;default:At(a,l,fe,he,p,pe)}return;default:if(wu(l)){for(var Rt in d)he=d[Rt],d.hasOwnProperty(Rt)&&he!==void 0&&!p.hasOwnProperty(Rt)&&rg(a,l,Rt,void 0,p,he);for(ve in p)he=p[ve],pe=d[ve],!p.hasOwnProperty(ve)||he===pe||he===void 0&&pe===void 0||rg(a,l,ve,he,p,pe);return}}for(var ae in d)he=d[ae],d.hasOwnProperty(ae)&&he!=null&&!p.hasOwnProperty(ae)&&At(a,l,ae,null,p,he);for(Se in p)he=p[Se],pe=d[Se],!p.hasOwnProperty(Se)||he===pe||he==null&&pe==null||At(a,l,Se,he,p,pe)}function Ww(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Mz(){if(typeof performance.getEntriesByType=="function"){for(var a=0,l=0,d=performance.getEntriesByType("resource"),p=0;p<d.length;p++){var v=d[p],x=v.transferSize,L=v.initiatorType,V=v.duration;if(x&&V&&Ww(L)){for(L=0,V=v.responseEnd,p+=1;p<d.length;p++){var te=d[p],fe=te.startTime;if(fe>V)break;var ve=te.transferSize,Se=te.initiatorType;ve&&Ww(Se)&&(te=te.responseEnd,L+=ve*(te<V?1:(V-fe)/(te-fe)))}if(--p,l+=8*(x+L)/(v.duration/1e3),a++,10<a)break}}if(0<a)return l/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var ig=null,ag=null;function Cd(a){return a.nodeType===9?a:a.ownerDocument}function Kw(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Qw(a,l){if(a===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&l==="foreignObject"?0:a}function og(a,l){return a==="textarea"||a==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var sg=null;function Dz(){var a=window.event;return a&&a.type==="popstate"?a===sg?!1:(sg=a,!0):(sg=null,!1)}var Zw=typeof setTimeout=="function"?setTimeout:void 0,Oz=typeof clearTimeout=="function"?clearTimeout:void 0,Jw=typeof Promise=="function"?Promise:void 0,qz=typeof queueMicrotask=="function"?queueMicrotask:typeof Jw<"u"?function(a){return Jw.resolve(null).then(a).catch(Iz)}:Zw;function Iz(a){setTimeout(function(){throw a})}function io(a){return a==="head"}function ek(a,l){var d=l,p=0;do{var v=d.nextSibling;if(a.removeChild(d),v&&v.nodeType===8)if(d=v.data,d==="/$"||d==="/&"){if(p===0){a.removeChild(v),Sl(l);return}p--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")p++;else if(d==="html")ic(a.ownerDocument.documentElement);else if(d==="head"){d=a.ownerDocument.head,ic(d);for(var x=d.firstChild;x;){var L=x.nextSibling,V=x.nodeName;x[Vt]||V==="SCRIPT"||V==="STYLE"||V==="LINK"&&x.rel.toLowerCase()==="stylesheet"||d.removeChild(x),x=L}}else d==="body"&&ic(a.ownerDocument.body);d=v}while(d);Sl(l)}function tk(a,l){var d=a;a=0;do{var p=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),p&&p.nodeType===8)if(d=p.data,d==="/$"){if(a===0)break;a--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||a++;d=p}while(d)}function lg(a){var l=a.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":lg(d),Hi(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}a.removeChild(d)}}function Pz(a,l,d,p){for(;a.nodeType===1;){var v=d;if(a.nodeName.toLowerCase()!==l.toLowerCase()){if(!p&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(p){if(!a[Vt])switch(l){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(x=a.getAttribute("rel"),x==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(x!==v.rel||a.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||a.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||a.getAttribute("title")!==(v.title==null?null:v.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(x=a.getAttribute("src"),(x!==(v.src==null?null:v.src)||a.getAttribute("type")!==(v.type==null?null:v.type)||a.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&x&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(l==="input"&&a.type==="hidden"){var x=v.name==null?null:""+v.name;if(v.type==="hidden"&&a.getAttribute("name")===x)return a}else return a;if(a=Rr(a.nextSibling),a===null)break}return null}function $z(a,l,d){if(l==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!d||(a=Rr(a.nextSibling),a===null))return null;return a}function nk(a,l){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!l||(a=Rr(a.nextSibling),a===null))return null;return a}function ug(a){return a.data==="$?"||a.data==="$~"}function cg(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function Bz(a,l){var d=a.ownerDocument;if(a.data==="$~")a._reactRetry=l;else if(a.data!=="$?"||d.readyState!=="loading")l();else{var p=function(){l(),d.removeEventListener("DOMContentLoaded",p)};d.addEventListener("DOMContentLoaded",p),a._reactRetry=p}}function Rr(a){for(;a!=null;a=a.nextSibling){var l=a.nodeType;if(l===1||l===3)break;if(l===8){if(l=a.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return a}var fg=null;function rk(a){a=a.nextSibling;for(var l=0;a;){if(a.nodeType===8){var d=a.data;if(d==="/$"||d==="/&"){if(l===0)return Rr(a.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}a=a.nextSibling}return null}function ik(a){a=a.previousSibling;for(var l=0;a;){if(a.nodeType===8){var d=a.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return a;l--}else d!=="/$"&&d!=="/&"||l++}a=a.previousSibling}return null}function ak(a,l,d){switch(l=Cd(d),a){case"html":if(a=l.documentElement,!a)throw Error(r(452));return a;case"head":if(a=l.head,!a)throw Error(r(453));return a;case"body":if(a=l.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function ic(a){for(var l=a.attributes;l.length;)a.removeAttributeNode(l[0]);Hi(a)}var Nr=new Map,ok=new Set;function Td(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var ua=N.d;N.d={f:Uz,r:Gz,D:Fz,C:Hz,L:Vz,m:Xz,X:Wz,S:Yz,M:Kz};function Uz(){var a=ua.f(),l=yd();return a||l}function Gz(a){var l=pi(a);l!==null&&l.tag===5&&l.type==="form"?kx(l):ua.r(a)}var wl=typeof document>"u"?null:document;function sk(a,l,d){var p=wl;if(p&&typeof l=="string"&&l){var v=Ln(l);v='link[rel="'+a+'"][href="'+v+'"]',typeof d=="string"&&(v+='[crossorigin="'+d+'"]'),ok.has(v)||(ok.add(v),a={rel:a,crossOrigin:d,href:l},p.querySelector(v)===null&&(l=p.createElement("link"),Tn(l,"link",a),Xt(l),p.head.appendChild(l)))}}function Fz(a){ua.D(a),sk("dns-prefetch",a,null)}function Hz(a,l){ua.C(a,l),sk("preconnect",a,l)}function Vz(a,l,d){ua.L(a,l,d);var p=wl;if(p&&a&&l){var v='link[rel="preload"][as="'+Ln(l)+'"]';l==="image"&&d&&d.imageSrcSet?(v+='[imagesrcset="'+Ln(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(v+='[imagesizes="'+Ln(d.imageSizes)+'"]')):v+='[href="'+Ln(a)+'"]';var x=v;switch(l){case"style":x=kl(a);break;case"script":x=El(a)}Nr.has(x)||(a=m({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:a,as:l},d),Nr.set(x,a),p.querySelector(v)!==null||l==="style"&&p.querySelector(ac(x))||l==="script"&&p.querySelector(oc(x))||(l=p.createElement("link"),Tn(l,"link",a),Xt(l),p.head.appendChild(l)))}}function Xz(a,l){ua.m(a,l);var d=wl;if(d&&a){var p=l&&typeof l.as=="string"?l.as:"script",v='link[rel="modulepreload"][as="'+Ln(p)+'"][href="'+Ln(a)+'"]',x=v;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=El(a)}if(!Nr.has(x)&&(a=m({rel:"modulepreload",href:a},l),Nr.set(x,a),d.querySelector(v)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(oc(x)))return}p=d.createElement("link"),Tn(p,"link",a),Xt(p),d.head.appendChild(p)}}}function Yz(a,l,d){ua.S(a,l,d);var p=wl;if(p&&a){var v=wr(p).hoistableStyles,x=kl(a);l=l||"default";var L=v.get(x);if(!L){var V={loading:0,preload:null};if(L=p.querySelector(ac(x)))V.loading=5;else{a=m({rel:"stylesheet",href:a,"data-precedence":l},d),(d=Nr.get(x))&&dg(a,d);var te=L=p.createElement("link");Xt(te),Tn(te,"link",a),te._p=new Promise(function(fe,ve){te.onload=fe,te.onerror=ve}),te.addEventListener("load",function(){V.loading|=1}),te.addEventListener("error",function(){V.loading|=2}),V.loading|=4,jd(L,l,p)}L={type:"stylesheet",instance:L,count:1,state:V},v.set(x,L)}}}function Wz(a,l){ua.X(a,l);var d=wl;if(d&&a){var p=wr(d).hoistableScripts,v=El(a),x=p.get(v);x||(x=d.querySelector(oc(v)),x||(a=m({src:a,async:!0},l),(l=Nr.get(v))&&hg(a,l),x=d.createElement("script"),Xt(x),Tn(x,"link",a),d.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},p.set(v,x))}}function Kz(a,l){ua.M(a,l);var d=wl;if(d&&a){var p=wr(d).hoistableScripts,v=El(a),x=p.get(v);x||(x=d.querySelector(oc(v)),x||(a=m({src:a,async:!0,type:"module"},l),(l=Nr.get(v))&&hg(a,l),x=d.createElement("script"),Xt(x),Tn(x,"link",a),d.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},p.set(v,x))}}function lk(a,l,d,p){var v=(v=me.current)?Td(v):null;if(!v)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=kl(d.href),d=wr(v).hoistableStyles,p=d.get(l),p||(p={type:"style",instance:null,count:0,state:null},d.set(l,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){a=kl(d.href);var x=wr(v).hoistableStyles,L=x.get(a);if(L||(v=v.ownerDocument||v,L={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(a,L),(x=v.querySelector(ac(a)))&&!x._p&&(L.instance=x,L.state.loading=5),Nr.has(a)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},Nr.set(a,d),x||Qz(v,a,d,L.state))),l&&p===null)throw Error(r(528,""));return L}if(l&&p!==null)throw Error(r(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=El(d),d=wr(v).hoistableScripts,p=d.get(l),p||(p={type:"script",instance:null,count:0,state:null},d.set(l,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function kl(a){return'href="'+Ln(a)+'"'}function ac(a){return'link[rel="stylesheet"]['+a+"]"}function uk(a){return m({},a,{"data-precedence":a.precedence,precedence:null})}function Qz(a,l,d,p){a.querySelector('link[rel="preload"][as="style"]['+l+"]")?p.loading=1:(l=a.createElement("link"),p.preload=l,l.addEventListener("load",function(){return p.loading|=1}),l.addEventListener("error",function(){return p.loading|=2}),Tn(l,"link",d),Xt(l),a.head.appendChild(l))}function El(a){return'[src="'+Ln(a)+'"]'}function oc(a){return"script[async]"+a}function ck(a,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var p=a.querySelector('style[data-href~="'+Ln(d.href)+'"]');if(p)return l.instance=p,Xt(p),p;var v=m({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return p=(a.ownerDocument||a).createElement("style"),Xt(p),Tn(p,"style",v),jd(p,d.precedence,a),l.instance=p;case"stylesheet":v=kl(d.href);var x=a.querySelector(ac(v));if(x)return l.state.loading|=4,l.instance=x,Xt(x),x;p=uk(d),(v=Nr.get(v))&&dg(p,v),x=(a.ownerDocument||a).createElement("link"),Xt(x);var L=x;return L._p=new Promise(function(V,te){L.onload=V,L.onerror=te}),Tn(x,"link",p),l.state.loading|=4,jd(x,d.precedence,a),l.instance=x;case"script":return x=El(d.src),(v=a.querySelector(oc(x)))?(l.instance=v,Xt(v),v):(p=d,(v=Nr.get(x))&&(p=m({},d),hg(p,v)),a=a.ownerDocument||a,v=a.createElement("script"),Xt(v),Tn(v,"link",p),a.head.appendChild(v),l.instance=v);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(p=l.instance,l.state.loading|=4,jd(p,d.precedence,a));return l.instance}function jd(a,l,d){for(var p=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=p.length?p[p.length-1]:null,x=v,L=0;L<p.length;L++){var V=p[L];if(V.dataset.precedence===l)x=V;else if(x!==v)break}x?x.parentNode.insertBefore(a,x.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(a,l.firstChild))}function dg(a,l){a.crossOrigin==null&&(a.crossOrigin=l.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=l.referrerPolicy),a.title==null&&(a.title=l.title)}function hg(a,l){a.crossOrigin==null&&(a.crossOrigin=l.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=l.referrerPolicy),a.integrity==null&&(a.integrity=l.integrity)}var Ad=null;function fk(a,l,d){if(Ad===null){var p=new Map,v=Ad=new Map;v.set(d,p)}else v=Ad,p=v.get(d),p||(p=new Map,v.set(d,p));if(p.has(a))return p;for(p.set(a,null),d=d.getElementsByTagName(a),v=0;v<d.length;v++){var x=d[v];if(!(x[Vt]||x[en]||a==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var L=x.getAttribute(l)||"";L=a+L;var V=p.get(L);V?V.push(x):p.set(L,[x])}}return p}function dk(a,l,d){a=a.ownerDocument||a,a.head.insertBefore(d,l==="title"?a.querySelector("head > title"):null)}function Zz(a,l,d){if(d===1||l.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return a=l.disabled,typeof l.precedence=="string"&&a==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function hk(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function Jz(a,l,d,p){if(d.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var v=kl(p.href),x=l.querySelector(ac(v));if(x){l=x._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(a.count++,a=Rd.bind(a),l.then(a,a)),d.state.loading|=4,d.instance=x,Xt(x);return}x=l.ownerDocument||l,p=uk(p),(v=Nr.get(v))&&dg(p,v),x=x.createElement("link"),Xt(x);var L=x;L._p=new Promise(function(V,te){L.onload=V,L.onerror=te}),Tn(x,"link",p),d.instance=x}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(a.count++,d=Rd.bind(a),l.addEventListener("load",d),l.addEventListener("error",d))}}var mg=0;function e3(a,l){return a.stylesheets&&a.count===0&&Ld(a,a.stylesheets),0<a.count||0<a.imgCount?function(d){var p=setTimeout(function(){if(a.stylesheets&&Ld(a,a.stylesheets),a.unsuspend){var x=a.unsuspend;a.unsuspend=null,x()}},6e4+l);0<a.imgBytes&&mg===0&&(mg=62500*Mz());var v=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&Ld(a,a.stylesheets),a.unsuspend)){var x=a.unsuspend;a.unsuspend=null,x()}},(a.imgBytes>mg?50:800)+l);return a.unsuspend=d,function(){a.unsuspend=null,clearTimeout(p),clearTimeout(v)}}:null}function Rd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ld(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Nd=null;function Ld(a,l){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Nd=new Map,l.forEach(t3,a),Nd=null,Rd.call(a))}function t3(a,l){if(!(l.state.loading&4)){var d=Nd.get(a);if(d)var p=d.get(null);else{d=new Map,Nd.set(a,d);for(var v=a.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<v.length;x++){var L=v[x];(L.nodeName==="LINK"||L.getAttribute("media")!=="not all")&&(d.set(L.dataset.precedence,L),p=L)}p&&d.set(null,p)}v=l.instance,L=v.getAttribute("data-precedence"),x=d.get(L)||p,x===p&&d.set(null,v),d.set(L,v),this.count++,p=Rd.bind(this),v.addEventListener("load",p),v.addEventListener("error",p),x?x.parentNode.insertBefore(v,x.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(v,a.firstChild)),l.state.loading|=4}}var sc={$$typeof:k,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function n3(a,l,d,p,v,x,L,V,te){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=zo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zo(0),this.hiddenUpdates=zo(null),this.identifierPrefix=p,this.onUncaughtError=v,this.onCaughtError=x,this.onRecoverableError=L,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=te,this.incompleteTransitions=new Map}function mk(a,l,d,p,v,x,L,V,te,fe,ve,Se){return a=new n3(a,l,d,L,te,fe,ve,Se,V),l=1,x===!0&&(l|=24),x=ur(3,null,null,l),a.current=x,x.stateNode=a,l=Xp(),l.refCount++,a.pooledCache=l,l.refCount++,x.memoizedState={element:p,isDehydrated:d,cache:l},Qp(x),a}function pk(a){return a?(a=tl,a):tl}function _k(a,l,d,p,v,x){v=pk(v),p.context===null?p.context=v:p.pendingContext=v,p=Xa(l),p.payload={element:d},x=x===void 0?null:x,x!==null&&(p.callback=x),d=Ya(a,p,l),d!==null&&(Jn(d,a,l),Pu(d,a,l))}function gk(a,l){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var d=a.retryLane;a.retryLane=d!==0&&d<l?d:l}}function pg(a,l){gk(a,l),(a=a.alternate)&&gk(a,l)}function yk(a){if(a.tag===13||a.tag===31){var l=Yo(a,67108864);l!==null&&Jn(l,a,67108864),pg(a,67108864)}}function vk(a){if(a.tag===13||a.tag===31){var l=mr();l=Mo(l);var d=Yo(a,l);d!==null&&Jn(d,a,l),pg(a,l)}}var zd=!0;function r3(a,l,d,p){var v=A.T;A.T=null;var x=N.p;try{N.p=2,_g(a,l,d,p)}finally{N.p=x,A.T=v}}function i3(a,l,d,p){var v=A.T;A.T=null;var x=N.p;try{N.p=8,_g(a,l,d,p)}finally{N.p=x,A.T=v}}function _g(a,l,d,p){if(zd){var v=gg(p);if(v===null)ng(a,l,p,Md,d),xk(a,p);else if(o3(v,a,l,d,p))p.stopPropagation();else if(xk(a,p),l&4&&-1<a3.indexOf(a)){for(;v!==null;){var x=pi(v);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var L=br(x.pendingLanes);if(L!==0){var V=x;for(V.pendingLanes|=2,V.entangledLanes|=2;L;){var te=1<<31-vt(L);V.entanglements[1]|=te,L&=~te}Ti(x),(bt&6)===0&&(_d=ft()+500,tc(0))}}break;case 31:case 13:V=Yo(x,2),V!==null&&Jn(V,x,2),yd(),pg(x,2)}if(x=gg(p),x===null&&ng(a,l,p,Md,d),x===v)break;v=x}v!==null&&p.stopPropagation()}else ng(a,l,p,null,d)}}function gg(a){return a=Eu(a),yg(a)}var Md=null;function yg(a){if(Md=null,a=mi(a),a!==null){var l=o(a);if(l===null)a=null;else{var d=l.tag;if(d===13){if(a=s(l),a!==null)return a;a=null}else if(d===31){if(a=u(l),a!==null)return a;a=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;a=null}else l!==a&&(a=null)}}return Md=a,null}function bk(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ft()){case _e:return 2;case Re:return 8;case qe:case He:return 32;case nt:return 268435456;default:return 32}default:return 32}}var vg=!1,ao=null,oo=null,so=null,lc=new Map,uc=new Map,lo=[],a3="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function xk(a,l){switch(a){case"focusin":case"focusout":ao=null;break;case"dragenter":case"dragleave":oo=null;break;case"mouseover":case"mouseout":so=null;break;case"pointerover":case"pointerout":lc.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":uc.delete(l.pointerId)}}function cc(a,l,d,p,v,x){return a===null||a.nativeEvent!==x?(a={blockedOn:l,domEventName:d,eventSystemFlags:p,nativeEvent:x,targetContainers:[v]},l!==null&&(l=pi(l),l!==null&&yk(l)),a):(a.eventSystemFlags|=p,l=a.targetContainers,v!==null&&l.indexOf(v)===-1&&l.push(v),a)}function o3(a,l,d,p,v){switch(l){case"focusin":return ao=cc(ao,a,l,d,p,v),!0;case"dragenter":return oo=cc(oo,a,l,d,p,v),!0;case"mouseover":return so=cc(so,a,l,d,p,v),!0;case"pointerover":var x=v.pointerId;return lc.set(x,cc(lc.get(x)||null,a,l,d,p,v)),!0;case"gotpointercapture":return x=v.pointerId,uc.set(x,cc(uc.get(x)||null,a,l,d,p,v)),!0}return!1}function wk(a){var l=mi(a.target);if(l!==null){var d=o(l);if(d!==null){if(l=d.tag,l===13){if(l=s(d),l!==null){a.blockedOn=l,$s(a.priority,function(){vk(d)});return}}else if(l===31){if(l=u(d),l!==null){a.blockedOn=l,$s(a.priority,function(){vk(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){a.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Dd(a){if(a.blockedOn!==null)return!1;for(var l=a.targetContainers;0<l.length;){var d=gg(a.nativeEvent);if(d===null){d=a.nativeEvent;var p=new d.constructor(d.type,d);ku=p,d.target.dispatchEvent(p),ku=null}else return l=pi(d),l!==null&&yk(l),a.blockedOn=d,!1;l.shift()}return!0}function kk(a,l,d){Dd(a)&&d.delete(l)}function s3(){vg=!1,ao!==null&&Dd(ao)&&(ao=null),oo!==null&&Dd(oo)&&(oo=null),so!==null&&Dd(so)&&(so=null),lc.forEach(kk),uc.forEach(kk)}function Od(a,l){a.blockedOn===l&&(a.blockedOn=null,vg||(vg=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,s3)))}var qd=null;function Ek(a){qd!==a&&(qd=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){qd===a&&(qd=null);for(var l=0;l<a.length;l+=3){var d=a[l],p=a[l+1],v=a[l+2];if(typeof p!="function"){if(yg(p||d)===null)continue;break}var x=pi(d);x!==null&&(a.splice(l,3),l-=3,g_(x,{pending:!0,data:v,method:d.method,action:p},p,v))}}))}function Sl(a){function l(te){return Od(te,a)}ao!==null&&Od(ao,a),oo!==null&&Od(oo,a),so!==null&&Od(so,a),lc.forEach(l),uc.forEach(l);for(var d=0;d<lo.length;d++){var p=lo[d];p.blockedOn===a&&(p.blockedOn=null)}for(;0<lo.length&&(d=lo[0],d.blockedOn===null);)wk(d),d.blockedOn===null&&lo.shift();if(d=(a.ownerDocument||a).$$reactFormReplay,d!=null)for(p=0;p<d.length;p+=3){var v=d[p],x=d[p+1],L=v[De]||null;if(typeof x=="function")L||Ek(d);else if(L){var V=null;if(x&&x.hasAttribute("formAction")){if(v=x,L=x[De]||null)V=L.formAction;else if(yg(v)!==null)continue}else V=L.action;typeof V=="function"?d[p+1]=V:(d.splice(p,3),p-=3),Ek(d)}}}function Sk(){function a(x){x.canIntercept&&x.info==="react-transition"&&x.intercept({handler:function(){return new Promise(function(L){return v=L})},focusReset:"manual",scroll:"manual"})}function l(){v!==null&&(v(),v=null),p||setTimeout(d,20)}function d(){if(!p&&!navigation.transition){var x=navigation.currentEntry;x&&x.url!=null&&navigation.navigate(x.url,{state:x.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,v=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){p=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),v!==null&&(v(),v=null)}}}function bg(a){this._internalRoot=a}Id.prototype.render=bg.prototype.render=function(a){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,p=mr();_k(d,p,a,l,null,null)},Id.prototype.unmount=bg.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var l=a.containerInfo;_k(a.current,2,null,a,null,null),yd(),l[Fr]=null}};function Id(a){this._internalRoot=a}Id.prototype.unstable_scheduleHydration=function(a){if(a){var l=Gi();a={blockedOn:null,target:a,priority:l};for(var d=0;d<lo.length&&l!==0&&l<lo[d].priority;d++);lo.splice(d,0,a),d===0&&wk(a)}};var Ck=t.version;if(Ck!=="19.2.7")throw Error(r(527,Ck,"19.2.7"));N.findDOMNode=function(a){var l=a._reactInternals;if(l===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=f(l),a=a!==null?h(a):null,a=a===null?null:a.stateNode,a};var l3={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pd.isDisabled&&Pd.supportsFiber)try{yt=Pd.inject(l3),Ht=Pd}catch{}}return dc.createRoot=function(a,l){if(!i(a))throw Error(r(299));var d=!1,p="",v=zx,x=Mx,L=Dx;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(v=l.onUncaughtError),l.onCaughtError!==void 0&&(x=l.onCaughtError),l.onRecoverableError!==void 0&&(L=l.onRecoverableError)),l=mk(a,1,!1,null,null,d,p,null,v,x,L,Sk),a[Fr]=l.current,tg(a),new bg(l)},dc.hydrateRoot=function(a,l,d){if(!i(a))throw Error(r(299));var p=!1,v="",x=zx,L=Mx,V=Dx,te=null;return d!=null&&(d.unstable_strictMode===!0&&(p=!0),d.identifierPrefix!==void 0&&(v=d.identifierPrefix),d.onUncaughtError!==void 0&&(x=d.onUncaughtError),d.onCaughtError!==void 0&&(L=d.onCaughtError),d.onRecoverableError!==void 0&&(V=d.onRecoverableError),d.formState!==void 0&&(te=d.formState)),l=mk(a,1,!0,l,d??null,p,v,te,x,L,V,Sk),l.context=pk(null),d=l.current,p=mr(),p=Mo(p),v=Xa(p),v.callback=null,Ya(d,v,p),d=p,l.current.lanes=d,Bi(l,d),Ti(l),a[Fr]=l.current,tg(a),new Id(l)},dc.version="19.2.7",dc}var Ik;function w3(){if(Ik)return Sg.exports;Ik=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Sg.exports=x3(),Sg.exports}var k3=w3(),E3=function(){const t=Array.prototype.slice.call(arguments).filter(Boolean),n={},r=[];t.forEach(o=>{(o?o.split(" "):[]).forEach(u=>{if(u.startsWith("atm_")){const[,c]=u.split("_");n[c]=u}else r.push(u)})});const i=[];for(const o in n)Object.prototype.hasOwnProperty.call(n,o)&&i.push(n[o]);return i.push(...r),i.join(" ")},W=E3;const S3="atm_9s_116y0ak atm_jb_1yvxh5s atm_e2_tel60m atm_h_1h6ojuz atm_fc_1h6ojuz atm_l8_9wwvsf atm_5j_1i9d2r atm_c8_1o6fbio atm_cp_1ts48j8 atm_cs_1d1fc98 atm_g3_kb7nvz",Pk="atm_26_yzuxxm atm_7l_1uoma54",C3="atm_26_rnzfq9 atm_7l_hq4ovn",T3="atm_26_fqxs1t atm_7l_4fh4vv atm_f7ac6m_xtbq9y atm_17yse2l_1u1jrmn",j3="atm_jb_idpfg4 atm_vy_kn8yyo atm_e2_kn8yyo atm_l8_idpfg4",A3={default:Pk,accent:C3,solid:T3,dot:W(Pk,j3)};function _f({children:e,variant:t="default",className:n="",...r}){const i=W("ds-badge",S3,A3[t],t!=="default"?`ds-badge--${t}`:"",n);return y.jsx("span",{className:i,...r,children:t==="dot"?null:e})}const R3="data:image/svg+xml,%3csvg%20width='200'%20height='200'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20transform='translate(16%2016)%20scale(1.14)'%3e%3cg%20transform='rotate(0)'%3e%3ccircle%20cx='0'%20cy='-9.5'%20r='3.3'%20fill='%232e90fa'/%3e%3cpath%20d='M-0.9%20-7L0.9%20-7L0%20-0.9Z'%20fill='%232e90fa'/%3e%3c/g%3e%3cg%20transform='rotate(60)'%3e%3ccircle%20cx='0'%20cy='-9.5'%20r='3.3'%20fill='%238b5cf6'/%3e%3cpath%20d='M-0.9%20-7L0.9%20-7L0%20-0.9Z'%20fill='%238b5cf6'/%3e%3c/g%3e%3cg%20transform='rotate(120)'%3e%3ccircle%20cx='0'%20cy='-9.5'%20r='3.3'%20fill='%231f9d57'/%3e%3cpath%20d='M-0.9%20-7L0.9%20-7L0%20-0.9Z'%20fill='%231f9d57'/%3e%3c/g%3e%3cg%20transform='rotate(180)'%3e%3ccircle%20cx='0'%20cy='-9.5'%20r='3.3'%20fill='%23e07b14'/%3e%3cpath%20d='M-0.9%20-7L0.9%20-7L0%20-0.9Z'%20fill='%23e07b14'/%3e%3c/g%3e%3cg%20transform='rotate(240)'%3e%3ccircle%20cx='0'%20cy='-9.5'%20r='3.3'%20fill='%23e0a90b'/%3e%3cpath%20d='M-0.9%20-7L0.9%20-7L0%20-0.9Z'%20fill='%23e0a90b'/%3e%3c/g%3e%3cg%20transform='rotate(300)'%3e%3ccircle%20cx='0'%20cy='-9.5'%20r='3.3'%20fill='%238a7d1f'/%3e%3cpath%20d='M-0.9%20-7L0.9%20-7L0%20-0.9Z'%20fill='%238a7d1f'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",N3="atm_9s_1ulexfb atm_vy_1c988v4 atm_e2_1c988v4 atm_jp_1f51e7f";function cT({className:e="",decorative:t=!1,alt:n="Reqvire",...r}){return y.jsx("img",{src:R3,className:W("ds-brandmark",N3,e),alt:t?"":n,"aria-hidden":t||void 0,...r})}const L3={primary:"ds-btn--primary",accent:"ds-btn--accent",secondary:"ds-btn--secondary",ghost:"ds-btn--ghost",danger:"ds-btn--danger",link:"ds-btn--link"},z3={sm:"ds-btn--sm",md:"",lg:"ds-btn--lg"},M3="atm_9s_116y0ak atm_e2_15fao4p atm_h_1h6ojuz atm_fc_1h6ojuz atm_cx_tx1for atm_l8_1yx7vd1 atm_3f_e8f45q atm_5j_ab5uq2 atm_9j_tlke0l atm_bx_rhlbdi atm_c8_1m800s6 atm_cs_19dj2kj atm_g3_kb7nvz atm_rd_glywfm atm_vb_glywfm atm_vv_1q9ccgz atm_uc_yfy9nd atm_6tqpqf_1ulexfb atm_1pqnrs9_1aou828 atm_1dlbvfv_1aou828 atm_yqcrq0_12336oc atm_17yrrpa_glywfm atm_1yl5u20_13i1o1w atm_1jhk75u_3g36qu atm_1vt4hf4_glywfm",D3="atm_26_1u1jrmn atm_4b_1u1jrmn atm_7l_4fh4vv atm_1tgqd35_wrwb40 atm_18vqbco_wrwb40 atm_1kevezh_7oqvg0 atm_f7ac6m_4fh4vv atm_18b2yil_4fh4vv atm_17yse2l_1u1jrmn atm_s2sod9_1dy96rj atm_1sjwpa0_1dy96rj",O3="atm_26_hq4ovn atm_4b_hq4ovn atm_7l_9541rp atm_1tgqd35_iq6dbe atm_18vqbco_iq6dbe atm_1kevezh_1bhb51v",q3="atm_26_1u3842e atm_4b_icygq7 atm_7l_an4usv atm_70_1xzuvaq atm_1tgqd35_8o97w atm_18vqbco_1627y59 atm_1kevezh_cr53r2",I3="atm_26_1j28jx2 atm_7l_1uoma54 atm_1tgqd35_8o97w atm_18uqgji_1r1dq30 atm_1kevezh_cr53r2",P3="atm_26_1ox2th8 atm_4b_1ox2th8 atm_7l_4fh4vv atm_dzm1xb_1y7bjl8",$3="atm_e2_1mv84c8 atm_l8_1vxnein atm_5j_mrub5a atm_c8_ouk0ow",B3="atm_e2_qp9j9c atm_l8_16ggvab atm_c8_1c8rstr",U3="atm_9s_1txwivl atm_vy_1osqo2v",$k="atm_9s_116y0ak",G3="atm_e2_1wugsn5 atm_l8_14k80hk atm_3f_idpfg4 atm_26_1j28jx2 atm_7l_1uoma54 atm_18uqgji_1r1dq30",F3={primary:D3,accent:O3,secondary:q3,ghost:I3,danger:P3,link:G3},H3={sm:$3,md:"",lg:B3};function Eo({children:e,tone:t="secondary",size:n="md",iconLeft:r,iconRight:i,block:o=!1,className:s="",type:u="button",...c}){return y.jsxs("button",{type:u,className:W("ds-btn",M3,F3[t],L3[t],H3[n],z3[n],o?U3:"",o?"ds-btn--block":"",s),...c,children:[r?y.jsx("span",{className:W("ds-btn__icon",$k),children:r}):null,e?y.jsx("span",{className:"ds-btn__label",children:e}):null,i?y.jsx("span",{className:W("ds-btn__icon",$k),children:i}):null]})}const V3="atm_mk_h2mmj6 atm_uc_1skjoc2 atm_6tqpqf_1ulexfb atm_yqcrq0_12336oc",X3="atm_26_hqzwp4 atm_3f_xbw5ta atm_5j_1pr0uq2 atm_70_1xzuvaq",Y3="atm_l8_1doep66",W3="atm_9j_tlke0l atm_18vqbco_1627y59 atm_raf0b7_3p501a",K3="atm_26_11e0c7w atm_4b_md3425 atm_70_1q7zb atm_18vqbco_3h7s58 atm_raf0b7_11o4pai",Q3="atm_mk_stnw88 atm_tk_idpfg4 atm_6i_idpfg4 atm_fq_idpfg4 atm_vy_12flxjw atm_5j_amy8ow atm_26_z7ltq2",Z3="atm_wqwwid_hq4ovn atm_17ek204_ob1ic4 atm_1m42hzi_18o30sh atm_1ke6a83_1ukkuzo atm_sx5p8j_vda1xk atm_hlv8he_dilh6o atm_cqituh_1423x9t atm_70r1a7_1pqzlyb atm_90xhky_k6z0tu";function qm({children:e,interactive:t=!1,selected:n=!1,padded:r=!0,accentColorToken:i,className:o="",...s}){return y.jsxs("div",{className:W("ds-card",V3,X3,r?Y3:"",r?"ds-card--pad":"",t?W3:"",t?"ds-card--interactive":"",n?K3:"",n?"ds-card--selected":"",i?Z3:"",o),"data-accent-token":i,...s,children:[i?y.jsx("span",{className:W("ds-card__accent",Q3)}):null,e]})}const J3={search:'<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>',x:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',plus:'<path d="M5 12h14"/><path d="M12 5v14"/>',minus:'<path d="M5 12h14"/>',check:'<path d="M20 6 9 17l-5-5"/>',"chevron-right":'<path d="m9 18 6-6-6-6"/>',"chevron-left":'<path d="m15 18-6-6 6-6"/>',"chevron-down":'<path d="m6 9 6 6 6-6"/>',"chevron-up":'<path d="m18 15-6-6-6 6"/>',"arrow-up-right":'<path d="M7 7h10v10"/><path d="M7 17 17 7"/>',"alert-triangle":'<path d="m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/>',archive:'<rect width="20" height="5" x="2" y="3" rx="1"/><path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8"/><path d="M10 12h4"/>',folder:'<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/>',"folder-open":'<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"/>',file:'<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/>',"file-text":'<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/><path d="M16 13H8"/><path d="M16 17H8"/><path d="M10 9H8"/>',"external-link":'<path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>',box:'<path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z"/><path d="m3.3 7 8.7 5 8.7-5"/><path d="M12 22V12"/>',database:'<ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M3 5v14a9 3 0 0 0 18 0V5"/><path d="M3 12a9 3 0 0 0 18 0"/>',tags:'<path d="m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4l-5.6 5.6a2.4 2.4 0 0 1-3.4 0L6 14V5z"/><path d="M9.5 9.5h.01"/><path d="m3 7 8.6 8.6"/>',network:'<circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><path d="m8.6 13.5 6.8 3.9"/><path d="m15.4 6.5-6.8 3.9"/>',globe:'<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/>',activity:'<path d="M22 12h-4l-3 9L9 3l-3 9H2"/>',grid:'<rect width="7" height="7" x="3" y="3" rx="1"/><rect width="7" height="7" x="14" y="3" rx="1"/><rect width="7" height="7" x="14" y="14" rx="1"/><rect width="7" height="7" x="3" y="14" rx="1"/>',"layout-grid":'<rect width="7" height="7" x="3" y="3" rx="1"/><rect width="7" height="7" x="14" y="3" rx="1"/><rect width="7" height="7" x="14" y="14" rx="1"/><rect width="7" height="7" x="3" y="14" rx="1"/>',list:'<path d="M8 6h13"/><path d="M8 12h13"/><path d="M8 18h13"/><path d="M3 6h.01"/><path d="M3 12h.01"/><path d="M3 18h.01"/>',"layout-list":'<rect width="7" height="7" x="3" y="3" rx="1"/><path d="M14 4h7"/><path d="M14 9h7"/><rect width="7" height="7" x="3" y="14" rx="1"/><path d="M14 15h7"/><path d="M14 20h7"/>',table:'<path d="M12 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M3 9h18"/><path d="M3 15h18"/>',"pie-chart":'<path d="M21 12c.6 0 1-.4.9-1A10 10 0 0 0 13 2.1c-.6-.1-1 .4-1 .9v8a1 1 0 0 0 1 1z"/><path d="M21.2 15a10 10 0 1 1-12.2-12"/>',"rotate-ccw":'<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.7 2.7L3 8"/><path d="M3 3v5h5"/>',settings:'<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/>',sliders:'<path d="M4 21v-7"/><path d="M4 10V3"/><path d="M12 21v-9"/><path d="M12 8V3"/><path d="M20 21v-5"/><path d="M20 12V3"/><path d="M2 14h4"/><path d="M10 8h4"/><path d="M18 16h4"/>',download:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="m7 10 5 5 5-5"/><path d="M12 15V3"/>',"git-branch":'<path d="M6 3v12"/><circle cx="18" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><path d="M18 9a9 9 0 0 1-9 9"/>',target:'<circle cx="12" cy="12" r="10"/><circle cx="12" cy="12" r="6"/><circle cx="12" cy="12" r="2"/>',sun:'<circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/>',moon:'<path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/>',"help-circle":'<circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><path d="M12 17h.01"/>',filter:'<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"/>',diamond:'<path d="M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41L13.7 2.71a2.41 2.41 0 0 0-3.41 0Z"/>',layers:'<path d="m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z"/><path d="m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65"/><path d="m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65"/>',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',"wrap-text":'<path d="M3 6h18"/><path d="M3 12h15a3 3 0 1 1 0 6h-4"/><path d="m16 16-2 2 2 2"/><path d="M3 18h7"/>',circle:'<circle cx="12" cy="12" r="10"/>'},e6="atm_9s_1ulexfb atm_am_12336oc";function et({name:e,size:t=18,strokeWidth:n=2,className:r="",...i}){const o=J3[e];return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,fill:"none",stroke:"currentColor",strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",className:W("ds-icon",e6,r),"aria-hidden":"true",dangerouslySetInnerHTML:{__html:o},...i})}const t6="atm_9s_116y0ak atm_vy_15fao4p atm_e2_15fao4p atm_h_1h6ojuz atm_fc_1h6ojuz atm_3f_e8f45q atm_5j_ab5uq2 atm_9j_tlke0l atm_uc_jb2mq9 atm_6tqpqf_1ulexfb atm_1pqnrs9_fjcok3 atm_1dlbvfv_fjcok3 atm_yqcrq0_12336oc atm_17yrrpa_glywfm atm_1yl5u20_13i1o1w atm_1jhk75u_3g36qu atm_1vt4hf4_glywfm",n6="atm_26_1j28jx2 atm_7l_1mqbmot atm_1tgqd35_8o97w atm_18uqgji_1r1dq30 atm_1kevezh_cr53r2 atm_fezvbd_rnzfq9 atm_1cm2nw2_hq4ovn",r6="atm_1tgqd35_1j28jx2 atm_18uqgji_1r1dq30",i6="atm_vy_1mv84c8 atm_e2_1mv84c8 atm_1pqnrs9_1aou828 atm_1dlbvfv_1aou828";function Xl({children:e,size:t="md",tone:n="secondary",active:r=!1,className:i="",type:o="button",...s}){return y.jsx("button",{type:o,className:W("ds-iconbtn",t6,n6,t==="sm"?i6:"",t==="sm"?"ds-iconbtn--sm":"",n==="ghost"?r6:"",n==="ghost"?"ds-iconbtn--ghost":"",r?"is-active":"",i),"aria-pressed":r||void 0,...s,children:e})}const a6="atm_mxgsde_1aou828 atm_9s_1o8liyq atm_vy_1i43xdk atm_e2_1i43xdk atm_am_12336oc atm_5j_1i9d2r atm_p_ko83al atm_3oljv3_fjcok3",o6="atm_3f_ag7trk atm_68_hq4ovn atm_7l_hq4ovn";function fT({size:e="sm",label:t="Loading",className:n="",...r}){return y.jsx("span",{"data-size":e,role:"status","aria-label":t,className:W("ds-spinner",a6,o6,n),...r})}var s6=uT();const dT=K.createContext(null),hT=K.createContext(null),l6="atm_uio85f_127d50b atm_lylcde_13pr3wf atm_mk_1n9t6rb atm_f3_idpfg4 atm_wq_1lpfmp2 atm_9s_1txwivl atm_73_usvi9m atm_h_1y6m0gg atm_fc_1h6ojuz atm_ks_1wugsn5 atm_l8_1qtjdrn atm_26_qsh5ud atm_20_isg5lq",u6="atm_1a8o0m0_cpeews atm_9s_1txwivl atm_vy_1i0w06v atm_iy_jk6imf atm_ar_1bp4okc atm_ks_15vqwwr atm_3f_ag7trk atm_5j_19ma0su atm_26_198lp58 atm_7l_an4usv atm_70_dxqsf1 atm_6tqpqf_1ulexfb atm_yqcrq0_12336oc",c6="atm_9s_1txwivl atm_am_12336oc atm_h_1h6ojuz atm_cx_1aqtv8w atm_l8_jvtp5e atm_40_xbw5ta atm_26_1u3842e",f6="atm_am_ggq5uc atm_j6_idpfg4 atm_ks_1wugsn5 atm_l8_198x15b",d6="atm_9s_1txwivl atm_am_12336oc atm_h_1h6ojuz atm_cx_1aqtv8w atm_l8_1d3q60g atm_67_xbw5ta atm_26_198lp58",h6="atm_am_ggq5uc atm_jb_idpfg4 atm_c8_asey3o";function v1({open:e,onOpenChange:t,children:n}){return K.useEffect(()=>{if(!e)return;const r=i=>{i.key==="Escape"&&(t==null||t(!1))};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[t,e]),y.jsx(dT.Provider,{value:{open:e,onOpenChange:t},children:n})}function b1({className:e="",children:t,showCloseButton:n,"aria-describedby":r,...i}){const o=K.useContext(dT);return o!=null&&o.open?s6.createPortal(y.jsx(hT.Provider,{value:o,children:y.jsx("div",{className:W("ds-modal__overlay",l6),role:"presentation",onMouseDown:s=>{var u;s.target===s.currentTarget&&((u=o.onOpenChange)==null||u.call(o,!1))},children:y.jsx("div",{className:W("ds-modal",u6,e),role:"dialog","aria-modal":"true","aria-describedby":r,tabIndex:-1,...i,children:t})})}),document.body):null}function Im({className:e="",children:t,...n}){return y.jsx("div",{className:W("ds-modal__head",c6,e),...n,children:t})}function Qh({className:e="",children:t,...n}){return y.jsx("div",{className:W("ds-modal__body",f6,e),...n,children:t})}function x1({className:e="",children:t,...n}){return y.jsx("div",{className:W("ds-modal__foot",d6,e),...n,children:t})}function Pm({className:e="",children:t,...n}){return y.jsx("h2",{className:W("ds-modal__title",h6,e),...n,children:t})}function Yl({asChild:e=!1,children:t,onClick:n,...r}){const i=K.useContext(hT),o=()=>{var s;return(s=i==null?void 0:i.onOpenChange)==null?void 0:s.call(i,!1)};if(e&&K.isValidElement(t)){const s=t;return K.cloneElement(s,{...r,onClick:u=>{var c,f;(f=(c=s.props).onClick)==null||f.call(c,u),n==null||n(u),u.defaultPrevented||o()}})}return y.jsx("button",{type:"button",onClick:s=>{n==null||n(s),s.defaultPrevented||o()},...r,children:t})}const m6="atm_mk_h2mmj6 atm_9s_1txwivl atm_h_1h6ojuz atm_vy_1osqo2v atm_l5yjj2_1osqo2v atm_10v1dpd_twvvju atm_1mn6vw9_1gu3nbf atm_g5371v_rhlbdi atm_13kqde0_8q8ejr atm_dsllz1_glywfm atm_qt8kjj_craoge atm_17u6gxd_tqb53b atm_5rvr21_ly2sax atm_1pzn1aw_stnw88 atm_n3sdp0_3qeuor atm_7hkyni_116y0ak atm_18pqx7h_glywfm atm_1junx1r_bsk7q5 atm_1syykut_bsk7q5 atm_1i0r3uh_stnw88 atm_4dief4_ek2tx5 atm_gi5rv4_ohusjj atm_8ygghq_l6f2xw atm_vf0s2d_1o6fbio atm_1eryx3b_ecmuoo atm_6tqpqf_1ulexfb atm_yqcrq0_12336oc",p6="atm_107uv0v_1onyx65 atm_1odutdl_1udocy6 atm_3hx951_14oi5nx atm_1dxv5io_19ngvdh atm_12b3elg_15gap19 atm_xtsype_12k0ett atm_hckj7y_1mqtkib atm_1m2wwse_5pxrf4 atm_uqn6ho_1y5v5r3 atm_w78jez_e726ol atm_1vbphwy_19vs8gd atm_8ocf17_suuzbj",_6="atm_10v1dpd_qp9j9c atm_18civp3_motwzl atm_13kqde0_1c8rstr atm_n3sdp0_1aqtv8w atm_1junx1r_fjcok3 atm_1syykut_fjcok3";function mT({size:e="md",icon:t,kbd:n,className:r="",type:i="text",...o}){return y.jsxs("div",{className:W("ds-search",m6,p6,e==="lg"&&"ds-search--lg",e==="lg"&&_6,r),children:[y.jsx("span",{className:"ds-search__icon","aria-hidden":"true",children:t??y.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[y.jsx("circle",{cx:"11",cy:"11",r:"8"}),y.jsx("path",{d:"m21 21-4.3-4.3"})]})}),y.jsx("input",{className:"ds-search__input",type:i,...o}),n?y.jsx("span",{className:"ds-search__kbd",children:n}):null]})}const g6="atm_9s_116y0ak atm_h_1h6ojuz atm_cx_1xi6ry0 atm_l8_3kbd78 atm_3f_xbw5ta atm_5j_ab5uq2 atm_6tqpqf_1ulexfb atm_yqcrq0_12336oc",y6="atm_9s_116y0ak atm_h_1h6ojuz atm_cx_tx1for atm_e2_hxdwz8 atm_l8_vb8vu1 atm_3f_idpfg4 atm_5j_mrub5a atm_c8_ouk0ow atm_cs_19dj2kj atm_vv_1q9ccgz atm_9j_tlke0l atm_uc_142lsp5 atm_umrj8i_116y0ak atm_1pqnrs9_1aou828 atm_1dlbvfv_1aou828",v6="atm_26_yzuxxm atm_1w6k2uc_1uoma54 atm_17huow9_1j28jx2 atm_173k4ye_1r1dq30 atm_1s2e1af_1gxx8tw atm_11ogxtl_1r1dq30 atm_103tymd_1xzuvaq";function pT({items:e,value:t,onChange:n,className:r="",ariaLabel:i}){return y.jsx("div",{className:W("ds-segmented",g6,v6,r),role:"group","aria-label":i,children:e.map(o=>{const s=o.value===t;return y.jsxs("button",{type:"button","aria-pressed":s,className:W("ds-segmented__item",y6,s&&"is-active"),onClick:()=>n(o.value),children:[o.icon?y.jsx("span",{className:"ds-segmented__icon",children:o.icon}):null,o.label?y.jsx("span",{children:o.label}):null]},o.value)})})}const b6="atm_9s_1txwivl atm_h_1fhbwtr atm_cx_1xi6ry0 atm_mk_h2mmj6 atm_e2_1vsscdl atm_6tqpqf_1ulexfb atm_yqcrq0_12336oc",x6="atm_9s_116y0ak atm_mk_h2mmj6 atm_h_1h6ojuz atm_cx_ek2tx5 atm_e2_sgc5uu atm_l8_vb8vu1 atm_3f_idpfg4 atm_c8_1m800s6 atm_cs_19dj2kj atm_vv_1q9ccgz atm_9j_tlke0l atm_uc_1flctpa atm_1pqnrs9_1aou828 atm_1dlbvfv_1aou828 atm_f7m7nm_pwduj4 atm_10fmpuy_116y0ak atm_mvfadj_1mqbmot atm_1ak0vmh_1o6fbio atm_1bbx2l1_1ts48j8",w6="atm_40_csoyjr",k6="atm_7l_1uoma54 atm_26_1j28jx2 atm_18uqgji_1r1dq30 atm_1938jqx_b3btdj atm_2zt8x3_stnw88 atm_1gmmsae_ynj908 atm_1hhqkaf_idpfg4 atm_89ifzh_ynj908 atm_1054lsl_13tcsv8 atm_7otamn_1l5q1qu atm_135rde5_1j28jx2 atm_rxbg8t_1gderh0 atm_1id5f2l_1r1dq30 atm_1pt1mng_hq4ovn atm_18e30ls_kb7nvz atm_1i91w7s_hq4ovn",E6="atm_cx_iqvn5y atm_l8_3kbd78 atm_3f_idpfg4 atm_5j_ab5uq2 atm_26_yzuxxm",S6="atm_e2_1mv84c8 atm_l8_vb8vu1 atm_5j_mrub5a atm_7l_1uoma54 atm_26_1j28jx2 atm_18uqgji_1r1dq30 atm_1id5f2l_1gxx8tw atm_mf4jcj_1r1dq30 atm_yfv1tv_1xzuvaq atm_f035cg_1gxx8tw atm_11xrbmu_1gxx8tw atm_1pt1mng_1gxx8tw atm_18e30ls_kb7nvz";function C6({items:e=[],value:t,onChange:n,variant:r="underline",className:i="",...o}){const s=W("ds-tabs",b6,`ds-tabs--${r}`,r==="underline"&&w6,r==="pill"&&E6,i);return y.jsx("div",{className:s,role:"tablist",...o,children:e.map(u=>{const c=u.value===t,f=r==="pill"?S6:k6;return y.jsxs("button",{type:"button",role:"tab","aria-selected":c,className:W("ds-tab",x6,f,c&&"is-active"),onClick:()=>n==null?void 0:n(u.value),children:[u.icon?y.jsx("span",{className:"ds-tab__icon",children:u.icon}):null,y.jsx("span",{children:u.label??u.value}),u.badge!=null?y.jsx("span",{className:"ds-tab__badge",children:u.badge}):null]},u.value)})})}const T6="atm_9s_116y0ak atm_vy_dyyhha atm_e2_dyyhha atm_am_glywfm atm_5j_1ymv7hy atm_26_q4qxsi atm_70_1uanll8",w1="atm_1iusgg0_hq4ovn atm_1h0kfrz_iq6dbe atm_po5r9r_1bhb51v atm_1nf85lq_rnzfq9 atm_1hy98_zfbly4 atm_3u5iah_6lcubb atm_1dukbe5_1u3842e atm_10ha597_hqzwp4 atm_1tckthx_198lp58 atm_1i2mm3p_yzuxxm atm_1kk0yk8_8o97w atm_hpsos6_cr53r2 atm_jqr15c_1c05cp1 atm_w5iopd_1tizr4b atm_1r6fby5_189kj12 atm_1a3w2w3_dwx51l atm_8e6t6l_6glbde atm_1smp3gu_1ox2th8 atm_d916u2_1muz9yu atm_1cqyysr_1fhzt1z atm_19jh8f4_8gp6io atm_yoex2e_1r1dq30 atm_d7rmf6_an4usv atm_8j1fl1_1uoma54 atm_1lae84l_1mqbmot atm_1dty34b_ole0cg atm_1f2ffma_1gxx8tw atm_4atth8_127xd9b atm_1w69mli_tlqex5 atm_1674f0z_21k9f7 atm_1xc8ml3_icygq7 atm_1hnprr3_1627y59 atm_1x3onn_2iq75o atm_4avs1z_ylntdi atm_12xev63_ob1ic4 atm_172s4j0_1jzg480 atm_1fcp51o_qwzapi atm_1y2spxa_18o30sh atm_tihlcl_c8z8bz atm_lqxz48_l869cw atm_1iaq0g2_1ukkuzo atm_172b242_4b91tz atm_1nvgyfl_1o4rrys atm_qoa53z_vda1xk atm_1as7e7_qjhoaz atm_1k3etme_12ibgig atm_1s88ph4_dilh6o atm_klca8c_94psdl atm_10dwbvn_176n7gj atm_ph3cjg_1423x9t atm_12ns0xz_1kp8x2i atm_2j4w22_x7afls atm_17712nv_1pqzlyb atm_th538q_15a6j9h atm_15rbqob_5un85m atm_17qadlg_k6z0tu atm_i3klx0_1o35fvf atm_fs7j3c_13cj5v1 atm_pvxovx_18kz8gp atm_uf9tfd_1p9ft20 atm_1hvwg6c_1tjvulq atm_fgjv53_axydeg atm_3c6epm_pfmuvc atm_o11lzx_1rxe704 atm_1rqttee_p87gnr atm_njex7d_183027q atm_6xzp5y_1b2jb5k atm_ysx01c_yy8ct5 atm_rmqxow_ocqx2n atm_1vvwg4q_1vv9rbh atm_5yhjyl_o0jq0o atm_1bjn2fx_jzynhh atm_1h6hxuv_67kmyi atm_uifzt6_wif9fk atm_z8ag0t_1vky53y atm_169n2up_8zxu4w atm_u68wbh_1xbx5xr atm_nhxplr_m3ec7v atm_1xyatij_ytdjbw atm_7j72g2_1ngrtye atm_11zsjju_1as38wo atm_17it5en_15udj5h atm_1l3sflo_1xg740 atm_gsa58x_192rwf5 atm_1xxrxzd_nt4cwc atm_v333hr_nt4cwc atm_5k1gjx_nt4cwc",j6="atm_9s_11p5wf0 atm_mg_1h6ojuz atm_b7es6b_1ekttcd atm_pk41y9_1osqo2v atm_1gn284m_1osqo2v atm_f05zka_2i467f atm_1ewr2w9_glywfm atm_r8u2rv_yzuxxm atm_11yzlo7_ek2tx5 atm_7d06w9_glywfm atm_1dpnt45_1597ol6 atm_34rk24_ek2tx5 atm_iqcj7f_121ixow atm_14b5yhw_1ekttcd atm_oqyrqk_feh88b",A6="atm_9s_1ulexfb atm_1s861g7_1ulexfb atm_98bfb1_1osqo2v atm_1vjurx4_1osqo2v atm_191fk33_tmmlot";function _T(e){return Math.max(0,Math.min(100,Number.isFinite(e)?e:0))}function Zh({colorToken:e,className:t="",...n}){return y.jsx("span",{className:W("ds-token-swatch",T6,w1,t),"data-color-token":e,...n})}function R6({percent:e,colorToken:t,className:n="",children:r,...i}){const o=_T(e);return y.jsxs("div",{className:W("ds-donut",j6,w1,n),"data-color-token":t,...i,children:[y.jsxs("svg",{className:"ds-donut__svg",viewBox:"0 0 100 100","aria-hidden":"true",children:[y.jsx("circle",{className:"ds-donut__track",cx:"50",cy:"50",r:"40"}),y.jsx("circle",{className:"ds-donut__fill",cx:"50",cy:"50",r:"40",pathLength:100,strokeDasharray:`${o} ${100-o}`})]}),y.jsx("span",{className:"ds-donut__content",children:r})]})}function N6({value:e,colorToken:t,className:n="",...r}){const i=_T(e);return y.jsx("span",{className:W("ds-bar",A6,w1,n),"data-color-token":t,...r,children:y.jsx("svg",{className:"ds-bar__svg",viewBox:"0 0 100 1",preserveAspectRatio:"none","aria-hidden":"true",children:y.jsx("rect",{className:"ds-bar__fill",x:"0",y:"0",width:i,height:"1"})})})}const L6="atm_9s_1txwivl atm_h_1h6ojuz atm_fc_1x0r81l atm_cx_65h41v atm_vy_1osqo2v atm_e2_92zl2a atm_j6_wyofes atm_l8_1gr00ck atm_c8_1m800s6 atm_cs_19dj2kj atm_r3_1e5hqsa atm_9j_tlke0l atm_uc_1hzgs2p atm_3dt8w5_glywfm atm_hahm9h_w63zqx atm_1wddu4c_14eiutg atm_1ilv14g_g3cdbo atm_3yf2dh_suuzbj atm_8b6ihz_y12phr atm_am3sse_y12phr atm_1lxonxj_un7t6q atm_qeoxmu_116y0ak atm_1tsxn61_glywfm atm_1xeiqmf_1h6ojuz atm_1n8v75d_1h6ojuz atm_1sk9z68_fjcok3 atm_1nutier_fjcok3 atm_1aljmbo_ggq5uc atm_1c24c03_1mwiday atm_d4nhzu_106mb6 atm_18z50w2_jfauhi atm_1j0xo6e_rk0qi2 atm_ob0ufj_pwfbaq atm_1qsxssm_1en0nkw atm_mb3wyg_1j4gn9x atm_phtlsz_1ccli84 atm_1dladoi_pmnlpg atm_n9eb9h_9bezhr atm_di7ddg_9rgtx8 atm_lree9d_1o6fbio atm_k09av4_7na0uz atm_14askjy_1ts48j8 atm_16egwwr_1csiron atm_6tqpqf_1ulexfb atm_yqcrq0_12336oc",z6="atm_7l_an4usv atm_26_lfxt8n atm_3f_1x7fh1e atm_5j_1fhonsn atm_70_tnh052 atm_14ahry7_hf7dd6 atm_bi99t3_pl2gqr atm_1tgqd35_1ja4rbq atm_18vqbco_t04iwo atm_11j0j21_98gn7e atm_1xsyii8_1mk7fn1 atm_1rwa4ld_1c2kefl atm_10dpn9e_rw9xxe atm_9nmhpg_hq4ovn atm_19dm1vf_hq4ovn atm_1uhn9w2_1856fub atm_1sjpren_ji4qki atm_1s5gpbp_11angqw atm_qyac2j_kwex7x atm_jzzl9h_1hk5ijr atm_1350egl_kjsyl3 atm_1b78w19_148oem8 atm_fspp6l_3ygida atm_1fouj4k_1hcdn24 atm_1yd0fxm_1fcei97 atm_16yefxm_10elt2 atm_14emf48_1j28jx2 atm_jjvlfz_1j28jx2 atm_ni45fz_122t8kk atm_o0c8im_1j28jx2 atm_zfngys_1j28jx2",M6="atm_j2fhl8_ytqdwr atm_1ljptmp_blxe3z atm_1cwp11u_18by0e2 atm_62vbd9_zlw10r atm_1g5ffml_idpfg4 atm_3f_idpfg4 atm_7l_146zx9l atm_26_1j28jx2 atm_1tgqd35_1j28jx2 atm_1ilv14g_idpfg4 atm_mwejjp_1u132tq atm_am3sse_1la8bsr atm_3yf2dh_idpfg4 atm_8b6ihz_1n9petn atm_1lxonxj_glywfm",D6="atm_9j_hmp3cb atm_1tgqd35_6yz816 atm_18vqbco_1jk0t39",O6="atm_1muvceb_1j28jx2 atm_l9n1dy_8o97w atm_3snx7x_8o97w atm_2632s2_8o97w";function Rc({label:e,colorToken:t,icon:n,meta:r,on:i=!0,line:o=!1,static:s=!1,variant:u="default",className:c="",onToggle:f,onClick:h,...m}){const _=c.split(/\s+/).includes("ds-togglerow--static"),g=b=>{h==null||h(b),b.defaultPrevented||f==null||f()};return y.jsxs("button",{type:"button",className:W("ds-togglerow",L6,z6,o&&"ds-togglerow--line",o&&M6,u==="filter"&&O6,(s||_)&&"ds-togglerow--static",(s||_)&&D6,i&&"is-on",!i&&"is-off",c),"aria-pressed":i,"data-color-token":t,...m,onClick:g,children:[n?y.jsx("span",{className:"ds-togglerow__icon",children:n}):t?y.jsx(Zh,{colorToken:t,className:"ds-togglerow__swatch"}):y.jsx("span",{className:"ds-togglerow__swatch"}),y.jsx("span",{className:"ds-togglerow__label",children:e}),r!=null?y.jsx(_f,{className:"ds-togglerow__meta",children:r}):null]})}const q6="atm_9s_1o8liyq atm_jb_i19uzh atm_j3_1osqo2v atm_l8_1m019qc atm_5j_mrub5a atm_26_8xaiz7 atm_7l_12hgb06 atm_bx_l6f2xw atm_c8_1kw7nm4 atm_g3_yv70g4 atm_kz_qqvjny atm_r3_vv0mcu atm_vv_4dq2uc";function Or({children:e,className:t="",...n}){return y.jsx("code",{className:W("ds-coderef",q6,t),...n,children:e})}const gT={capability:{fill:"--capability",ink:"--capability-ink",tint:"--capability-tint"},requirement:{fill:"--requirement",ink:"--requirement-ink",tint:"--requirement-tint"},contract:{fill:"--contract",ink:"--contract-ink",tint:"--contract-tint"},source:{fill:"--contract",ink:"--contract-ink",tint:"--contract-tint"},constraint:{fill:"--contract",ink:"--contract-ink",tint:"--contract-tint"},behavior:{fill:"--contract",ink:"--contract-ink",tint:"--contract-tint"},state:{fill:"--contract",ink:"--contract-ink",tint:"--contract-tint"},"input-output":{fill:"--contract",ink:"--contract-ink",tint:"--contract-tint"},"verification-objective":{fill:"--verification-objective",ink:"--verification-objective-ink",tint:"--verification-objective-tint"},"test-verification":{fill:"--verification",ink:"--verification-ink",tint:"--verification-tint"},"formal-proof-verification":{fill:"--verification",ink:"--verification-ink",tint:"--verification-tint"},"analysis-verification":{fill:"--verification",ink:"--verification-ink",tint:"--verification-tint"},"inspection-verification":{fill:"--verification",ink:"--verification-ink",tint:"--verification-tint"},"demonstration-verification":{fill:"--verification",ink:"--verification-ink",tint:"--verification-tint"},verification:{fill:"--verification",ink:"--verification-ink",tint:"--verification-tint"},specification:{fill:"--contract",ink:"--contract-ink",tint:"--contract-tint"},"semantic-contract":{fill:"--semantic-contract",ink:"--semantic-contract-ink",tint:"--semantic-contract-tint"},ontology:{fill:"--ontology",ink:"--ontology-ink",tint:"--ontology-tint"},concept:{fill:"--concept",ink:"--concept-ink",tint:"--concept-tint"},"concept-scheme":{fill:"--concept-scheme",ink:"--concept-scheme-ink",tint:"--concept-scheme-tint"},"concept-reference":{fill:"--concept-reference",ink:"--concept-reference-ink",tint:"--concept-reference-tint"},resource:{fill:"--resource",ink:"--resource-ink",tint:"--resource-tint"},other:{fill:"--other",ink:"--other-ink",tint:"--other-tint"}},wo={capability:{color:"var(--capability)",shape:"square",role:"capability"},requirement:{color:"var(--requirement)",shape:"square",role:"requirement"},contract:{color:"var(--contract)",shape:"diamond",role:"contract",glyph:"C"},source:{color:"var(--contract)",shape:"diamond",role:"source",glyph:"↗"},constraint:{color:"var(--contract)",shape:"diamond",role:"constraint",glyph:"!"},behavior:{color:"var(--contract)",shape:"diamond",role:"behavior",glyph:"→"},state:{color:"var(--contract)",shape:"diamond",role:"state",glyph:"●"},"input-output":{color:"var(--contract)",shape:"diamond",role:"input-output",glyph:"↔"},"verification-objective":{color:"var(--verification-objective)",shape:"square",role:"verification-objective"},"test-verification":{color:"var(--verification)",shape:"square",role:"verification",glyph:"T"},"formal-proof-verification":{color:"var(--verification)",shape:"square",role:"verification",glyph:"FP"},"analysis-verification":{color:"var(--verification)",shape:"square",role:"verification",glyph:"A"},"inspection-verification":{color:"var(--verification)",shape:"square",role:"verification",glyph:"I"},"demonstration-verification":{color:"var(--verification)",shape:"square",role:"verification",glyph:"D"},verification:{color:"var(--verification)",shape:"square",role:"verification"},specification:{color:"var(--contract)",shape:"diamond",role:"specification",glyph:"≡"},"semantic-contract":{color:"var(--semantic-contract)",shape:"square",role:"semantic-contract"},ontology:{color:"var(--ontology)",shape:"square",role:"ontology"},concept:{color:"var(--concept)",shape:"square",role:"concept"},"concept-scheme":{color:"var(--concept-scheme)",shape:"square",role:"concept-scheme"},"concept-reference":{color:"var(--concept-reference)",shape:"square",role:"concept-reference"},resource:{color:"var(--resource)",shape:"square",role:"resource"}},k1={"--capability":"#bbdefb","--capability-ink":"#1565c0","--capability-tint":"#e3f2fd","--requirement":"#673ab7","--requirement-ink":"#512da8","--requirement-tint":"#ede7f6","--contract":"#ff9800","--contract-ink":"#e65100","--contract-tint":"#fff3e0","--semantic-contract":"#d32f2f","--semantic-contract-ink":"#b71c1c","--semantic-contract-tint":"#ffebee","--verification":"#4caf50","--verification-ink":"#2e7d32","--verification-tint":"#e8f5e9","--verification-objective":"#1b5e20","--verification-objective-ink":"#0b3d12","--verification-objective-tint":"#d7ead8","--ontology":"#b08a00","--ontology-ink":"#6f5600","--ontology-tint":"#f4e3a1","--concept":"#e7c94a","--concept-ink":"#6f5600","--concept-tint":"#fbf1cf","--concept-scheme":"#cda83a","--concept-scheme-ink":"#6f5600","--concept-scheme-tint":"#f7e7b4","--resource":"#ffca28","--resource-ink":"#8d6e00","--resource-tint":"#fff3cf","--other":"#9e9e9e","--other-ink":"#616161","--other-tint":"#ececec","--node-generic-fill":"#eceff1","--edge-default":"#c0c8d4","--edge-derive":"#673ab7","--edge-satisfy":"#4caf50","--edge-trace":"#97a2b4","--edge-reuse":"#2196f3","--bg-canvas":"#fbfaf7","--bg-sunken":"#f3f1eb","--bg-surface":"#ffffff","--border-default":"#d8d2c6","--accent":"#e11d48","--accent-ring":"rgba(225,29,72,0.32)","--rdf-class":"#94a3b8","--rdf-concept":"#e7c94a","--rdf-concept-scheme":"#cda83a","--concept-reference":"#a77718","--concept-reference-ink":"#4a3608","--concept-reference-tint":"#fbf1cf","--rdf-objprop":"#64748b","--rdf-dtprop":"#0f766e","--rdf-rdfprop":"#115e59","--rdf-individual":"#7c3aed","--rdf-datatype":"#d6a43f","--rdf-restriction":"#cbd5e1","--rdf-classexpr":"#e2e8f0","--rdf-nodeshape":"#dc2626","--rdf-propshape":"#be123c","--rdf-resource":"#14b8a6","--rdf-shacl":"#ef4444","--success":"#1f9d57","--slate-0":"#ffffff","--slate-950":"#0d1119","--text-body":"#232b37","--text-faint":"#97a2b4","--text-muted":"#6b7688","--text-strong":"#161d27"},I6=new Set(["source","specification","constraint","behavior","state","input-output"]);function $m(e,t){const n=(e??"").toLowerCase(),r=(t??"").toLowerCase();return n in wo?wo[n].role:n.includes("capability")||r==="capability"?"capability":n.includes("verification")||r==="verification"?"verification":n.includes("ontology")||r==="ontology"?"ontology":n==="evidence-file"||n.includes("evidence")?"other":n==="concept"?"concept":n==="concept-scheme"?"concept-scheme":n==="concept-reference"||n.includes("concept-reference")?"concept-reference":n.includes("resource")||n==="file"||r==="resource"?"resource":I6.has(n)&&n in wo?wo[n].role:n==="contract"||r==="contract"?"contract":n.includes("requirement")||r==="requirement"?"requirement":n.includes("contract")?"semantic-contract":n.includes("specification")?"specification":"other"}function P6(e,t="fill"){return gT[$m(e)][t]}function Bk(e,t="fill"){return Ve(P6(e,t))}function Ve(e){if(typeof window>"u")return`var(${e})`;const t=E1(e);return S1(t)??t}function E1(e,t=new Set){if(t.has(e))return`var(${e})`;t.add(e);const n=window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();return n?$6(n,t):k1[e]??`var(${e})`}function $6(e,t=new Set){const n=e.trim(),r=n.match(/^var\((--[a-z0-9-]+)(?:,\s*([^)]+))?\)$/i);return r?E1(r[1],t):n}function B6(e){return e.replace(/var\((--[a-z0-9-]+)\)/gi,(t,n)=>{const r=n;return S1(E1(n))??k1[r]??t})}function U6(){const e=(t,n,r="2px")=>{const i=gT[n];return` classDef ${t} fill:${Ag(i.tint)},stroke:${Ag(i.fill)},stroke-width:${r},color:${Ag("--text-body")};`};return[e("capability","capability","2.5px"),e("systemRequirement","requirement","2px"),e("requirement","requirement","2px"),e("contract","contract","2px"),e("source","source","2px"),e("constraint","constraint","2px"),e("behavior","behavior","2px"),e("state","state","2px"),e("inputOutput","input-output","2px"),e("specification","specification","2px"),e("semanticContract","semantic-contract","2px"),e("verificationObjective","verification-objective","2px"),e("verification","verification","2px"),e("ontology","ontology","2px"),e("resource","resource","2px"),e("file","resource","2px"),e("folder","resource","2px"),e("default","other","1.5px")]}function Ag(e){const t=S1(Ve(e));if(t)return t;const n=k1[e];if(n)return n;throw new Error(`Missing Mermaid-safe CSS token value for ${e}`)}function S1(e){var o;if(!e||typeof document>"u")return null;const t=document.createElement("span");if(t.style.color="",t.style.color=e.trim(),!t.style.color)return null;(document.body??document.documentElement).appendChild(t);const r=window.getComputedStyle(t).color;t.remove();const i=G6(r);if(i)return i;if(/\bjsdom\b/i.test(((o=window.navigator)==null?void 0:o.userAgent)??""))return null;try{const s=document.createElement("canvas");s.width=s.height=1;const u=s.getContext("2d");if(!u)return null;u.fillStyle=r,u.fillRect(0,0,1,1);const[c,f,h]=u.getImageData(0,0,1,1).data;return`#${c.toString(16).padStart(2,"0")}${f.toString(16).padStart(2,"0")}${h.toString(16).padStart(2,"0")}`}catch{return null}}function G6(e){const t=e.match(/^rgba?\(\s*([0-9.]+)\s*,\s*([0-9.]+)\s*,\s*([0-9.]+)(?:\s*,\s*([0-9.]+))?\s*\)$/i);if(!t)return null;const[n,r,i]=t.slice(1,4).map(c=>{const f=Number.parseFloat(c);return Number.isFinite(f)?Math.max(0,Math.min(255,Math.round(f))):null});if(n===null||r===null||i===null)return null;const o=t[4]===void 0?1:Number.parseFloat(t[4]),s=[n,r,i].map(c=>c.toString(16).padStart(2,"0")).join("");if(!Number.isFinite(o)||o>=1)return`#${s}`;const u=Math.max(0,Math.min(255,Math.round(o*255))).toString(16).padStart(2,"0");return`#${s}${u}`}const F6="atm_a3dd4b_z0onc3 atm_ent53u_b62f0m atm_m91vh0_705yeh atm_9s_116y0ak atm_h_1h6ojuz atm_fc_1h6ojuz atm_am_glywfm atm_vy_1vx9jc2 atm_e2_1vx9jc2 atm_5j_suuzbj atm_1pqnrs9_1nrftia atm_1dlbvfv_1nrftia atm_nyq9zu_116y0ak atm_gcz429_1h6ojuz atm_1bknayf_1h6ojuz atm_l6d64d_1osqo2v atm_4l26lw_1osqo2v atm_1jcqdhi_l6f2xw atm_1x3ssnv_1ha41sg atm_rhfka_1mvar2t atm_1iosvla_idpfg4 atm_ku3ywk_kb7nvz atm_hdngs8_uauh2f atm_1m8nm4r_jhfywp atm_1txkrek_38t29w atm_psydcp_mrub5a atm_h7i5yi_wddbar atm_19w6stl_1tpwk13 atm_10joq6r_1e9fziy atm_1q11kel_1l0d4wk atm_1bouas6_zk8bua atm_1g6i0n2_wn1dc8 atm_it7fai_utna8q atm_ekbsmm_utna8q atm_1bz2fa8_1ssbidh",H6="atm_7l_4fh4vv atm_26_ygerxk atm_70_14cigfu atm_5eapdu_1r1dq30 atm_21kv04_1u1jrmn atm_oxmxd1_1o64miw atm_f485ly_5ho45x",V6="atm_kc50cj_ob1ic4 atm_1blwtic_18o30sh atm_1uthcj7_1ukkuzo atm_okgt86_vda1xk atm_kv026o_1qotw4 atm_1r98dev_dilh6o atm_wyz73l_1423x9t atm_13gbnp6_1b2jb5k atm_1l1em64_1vv9rbh atm_muebh2_67kmyi atm_vo76f7_1pqzlyb atm_1mqcluo_k6z0tu",X6=new Set(["source","specification","constraint","behavior","state","input-output"]);function yn({type:e,family:t,size:n="md",className:r="",title:i,shape:o,glyph:s,...u}){const c=$m(e,t),f=(e??"").toLowerCase(),h=f in wo?wo[f]:null,m=o??(h==null?void 0:h.shape)??(X6.has(f)?"diamond":"square"),_=s??(h==null?void 0:h.glyph)??null,g=m==="diamond",b=m==="hub",E=!!(_&&[..._].length>1),C=W("ds-elemicon",F6,H6,V6,n!=="md"?`ds-elemicon--${n}`:void 0,g?"ds-elemicon--diamond":void 0,b?"ds-elemicon--hub":void 0,E?"ds-elemicon--wide-glyph":void 0,r);return y.jsxs("span",{className:C,"data-element-role":c,title:i??e??c,"aria-label":e??c,...u,children:[b?y.jsx("span",{className:"ds-elemicon__pip"}):null,!b&&_?y.jsx("span",{className:"ds-elemicon__glyph",children:_}):null]})}const Y6="atm_j6_idpfg4 atm_ks_1wugsn5",W6="atm_26_n1na9d atm_3f_16wmnwb atm_5j_geazv7",K6="atm_9s_5mfbs0 atm_vy_1osqo2v atm_jb_zudyve atm_4a_cfaqiv atm_c8_1m800s6",Q6="atm_7l_an4usv",Z6="atm_9s_zh62nn",J6="atm_9s_8xuz71",e5="atm_9s_2e77qe",t5="atm_1f2n1bj_gjv5lv atm_1clex5o_1r1dq30 atm_1b7glui_1wu1lss",n5="atm_mk_1if85x1 atm_tk_idpfg4 atm_wq_feh88b atm_9s_dav6mi atm_l8_25h4do atm_r3_1e5hqsa atm_h7hwvs_idpfg4",r5="atm_7l_1uoma54 atm_26_1nn0ihp atm_40_zp8cu4 atm_cs_19w01x4",i5="atm_9s_dav6mi atm_l8_1s07rtz atm_vh_nkobfv",a5="atm_40_to1h0g atm_ctwle1_idpfg4",o5="atm_9s_1txwivl atm_vy_1osqo2v atm_h_1h6ojuz atm_fc_1yb4nlp atm_cx_ek2tx5 atm_l8_25h4do atm_3f_idpfg4 atm_r3_1e5hqsa atm_bv_1kw7nm4 atm_9j_tlke0l atm_1qlq76a_1o6fbio atm_1cjp85g_1d1fc98",s5="atm_7l_1kw7nm4 atm_26_1j28jx2 atm_18uqgji_1r1dq30 atm_pyurd2_1r1dq30";function l5({children:e,className:t="",...n}){return y.jsx("div",{className:W("ds-tablewrap",Y6,W6,t),...n,children:e})}function u5({children:e,className:t="",...n}){return y.jsx("table",{className:W("ds-table",K6,Q6,t),...n,children:e})}function c5({children:e,className:t="",...n}){return y.jsx("thead",{className:W(Z6,t),...n,children:e})}function f5({children:e,className:t="",...n}){return y.jsx("tbody",{className:W(J6,t),...n,children:e})}function Uk({children:e,selected:t=!1,className:n="",...r}){return y.jsx("tr",{className:W(e5,t5,t?"is-selected":void 0,n),...r,children:e})}function d5({children:e,className:t="",...n}){return y.jsx("th",{className:W(n5,r5,t),...n,children:e})}function $d({children:e,className:t="",...n}){return y.jsx("td",{className:W(i5,a5,t),...n,children:e})}function h5({children:e,direction:t,className:n="",...r}){return y.jsxs("button",{type:"button",className:W("ds-table__sort",o5,s5,n),...r,children:[y.jsx("span",{children:e}),t?y.jsx("span",{className:"ds-table__sortdir",children:t}):null]})}const m5="atm_9s_116y0ak atm_h_1h6ojuz atm_cx_owgaek atm_e2_3cxs9l atm_l8_3ofa5r atm_5j_mrub5a atm_c8_1o6fbio atm_cs_19dj2kj atm_g3_kb7nvz atm_vv_1q9ccgz atm_16803i4_116y0ak atm_19tafd3_1h6ojuz atm_113t0oo_1h6ojuz atm_7yfrpi_glywfm atm_bl3evz_7hyak2 atm_1ro766l_7hyak2 atm_jh4idr_1az89lo atm_14wvpfi_l6f2xw atm_1y1eyv0_1o6fbio atm_1r3unkb_1mvar2t atm_1j4bcgg_idpfg4 atm_dcszb1_kb7nvz atm_1miskve_1d4bnt0 atm_myfq1w_uauh2f atm_kh7cl5_1r1dq30 atm_1f6wdz9_1687kf3 atm_ypob0s_116y0ak atm_1nfawgy_1h6ojuz atm_di9v7v_1h6ojuz atm_19vb7bo_zk8bua",p5="atm_7l_1uoma54 atm_26_yzuxxm atm_jdr78w_1tv5sgz atm_8sjwfw_17abx8h atm_1rurjgk_1mazdkv",_5="atm_16gywjv_ob1ic4 atm_1nh8uwv_1jzg480 atm_vpu41p_qwzapi atm_42lboc_18o30sh atm_23cq5u_c8z8bz atm_1daabjz_l869cw atm_i2iux_1ukkuzo atm_1p0gpe_4b91tz atm_1wejisk_1o4rrys atm_324i7b_vda1xk atm_hu33cw_qjhoaz atm_ce8t89_12ibgig atm_3cqic8_1qotw4 atm_1522tqu_d1amxh atm_rdrsqd_1nodl4x atm_117jmas_dilh6o atm_1pbiepb_94psdl atm_vrva8a_176n7gj atm_1z0nhgb_1423x9t atm_1qkw5bh_1kp8x2i atm_oibu0z_x7afls atm_124rpx8_1b2jb5k atm_1h9xyhp_ocqx2n atm_168xpuf_yy8ct5 atm_3bk0ip_1vv9rbh atm_inir8d_jzynhh atm_v6zrg6_o0jq0o atm_1al3vbk_67kmyi atm_1udyqtx_6iwefs atm_1liu2im_31ud19 atm_blortm_1pqzlyb atm_7p1w8y_15a6j9h atm_1rb7nwg_5un85m atm_5sz0ww_k6z0tu atm_1b6ox03_1o35fvf atm_bkry1c_13cj5v1";function yr({type:e,family:t,children:n,dot:r=!0,tinted:i=!1,className:o="",...s}){const u=$m(e,t),c=(e??"").toLowerCase(),f=c in wo?wo[c]:null,h=(f==null?void 0:f.shape)??"square",m=(f==null?void 0:f.glyph)??null,_=!!(m&&[...m].length>1);return y.jsxs("span",{className:W("ds-typebadge",m5,p5,_5,i?"ds-typebadge--tinted":void 0,o),"data-element-role":u,...s,children:[r?y.jsx("span",{className:W("ds-typebadge__dot",h==="diamond"?"ds-typebadge__dot--diamond":void 0,m?"ds-typebadge__dot--glyph":void 0,_?"ds-typebadge__dot--wide-glyph":void 0),children:m?y.jsx("span",{className:"ds-typebadge__glyph",children:m}):null}):null,n??e]})}const g5="atm_9s_1txwivl atm_jb_idpfg4 atm_ar_1bp4okc atm_cx_129m9ft atm_13knuqb_1txwivl atm_8v0qpk_idpfg4 atm_qx45pz_1h6ojuz atm_ej65wx_1yb4nlp atm_18ouobx_ynj908 atm_1od1q8l_idpfg4 atm_18n3bky_15vqwwr atm_efklur_1l2sidv atm_a70gov_1q9ccgz atm_14lov02_116y0ak atm_kj3ukg_12336oc atm_rmuwbn_1h6ojuz atm_9vec3v_1txwivl atm_ef3r1i_idpfg4 atm_g0mby4_1bp4okc atm_kkf6g8_ffsgmn atm_6tqpqf_1ulexfb atm_yqcrq0_12336oc",y5="atm_11ummen_th8d35 atm_nyn20a_1mqbmot atm_kq9ymx_1o6fbio atm_pcar64_1d1fc98 atm_1tsf9w7_1lzc1s3 atm_1jetfa8_3szr2b atm_oespae_angws6 atm_bovmug_127xd9b atm_1sbtyby_ouk0ow atm_1wj2uia_3szr2b";function v5({title:e,action:t,children:n,className:r="",...i}){return y.jsxs("section",{className:W("ds-section",g5,y5,r),...i,children:[e||t?y.jsxs("div",{className:"ds-section__head",children:[e?y.jsx("span",{className:"ds-section__title",children:e}):y.jsx("span",{}),t?y.jsx("span",{className:"ds-section__action",children:t}):null]}):null,y.jsx("div",{className:"ds-section__body",children:n})]})}const b5="atm_73_usvi9m atm_9s_1txwivl atm_vy_3g8w0h atm_jb_idpfg4 atm_e2_jinvi8 atm_h_1h6ojuz atm_cx_1edz5vk atm_lb_idpfg4 atm_lh_zdm8jh atm_lj_1ck5efj atm_5e_13x2ym7 atm_5j_sl7ugj atm_c8_1m800s6 atm_g3_7nxbvg atm_9j_tlke0l atm_vb_glywfm atm_uc_11sbhvv atm_1tgqd35_i6sjcc atm_17yrrpa_glywfm atm_1yl5u20_13i1o1w atm_18zg0qy_1c4g2fu atm_19s06m1_1u4gdat atm_1emii6y_car6c6 atm_yctv6h_1tgii9k atm_5vq8h2_116y0ak atm_nmyny7_movtkq atm_dxi3la_1aou828 atm_1qo80uz_1vw34wn atm_m7nknt_1h6ojuz atm_cpq6vx_1h6ojuz atm_jkduch_y88kzl atm_ku70x_1ropadh atm_15akl6q_14uhfce atm_1qb69va_14uhfce atm_196658b_14w8a5s atm_4jpiig_116y0ak atm_so4c4i_12336oc atm_1v60znn_1h6ojuz atm_1f4tuc1_1h6ojuz atm_12g7gaw_1lqqplv atm_nhn8hu_1aou828 atm_2yjr2o_1aou828 atm_fzqsuh_uixm4p atm_rs2mb2_idpfg4 atm_1nycnki_1qsfvvr atm_1entnyf_15vqwwr atm_189kvwi_1l2sidv atm_1mzeuna_1q9ccgz atm_d1b9ho_116y0ak atm_11js0b4_12336oc atm_xjatqo_fzv2vq atm_pgm8nq_12336oc atm_1nrjvku_jp7aw9 atm_oo4na7_12d6awd atm_6oibm6_1g68dh6 atm_13loh2e_5zoav2 atm_otrr60_1n1zkut atm_1epv0jd_nmzknh atm_6tqpqf_1ulexfb atm_yqcrq0_12336oc",x5="atm_7l_an4usv atm_26_1j28jx2",w5="atm_18hli6x_5un85m atm_b9wcxg_fjcok3 atm_1fsixnt_fjcok3 atm_nvqu25_suuzbj atm_9f185o_15a6j9h atm_myjxmd_an4usv atm_fzqsuh_5un85m atm_i61ux4_15a6j9h",k5="atm_8qei1c_8o97w atm_ul58c7_1c05cp1 atm_7l_1uoma54 atm_18fmhfi_1xi6ry0 atm_myjxmd_1uoma54 atm_1ujvao3_1r1dq30";function jo({label:e,icon:t,count:n,depth:r=0,open:i=!1,selected:o=!1,expandable:s=!1,kind:u="folder",onToggle:c,onSelect:f,className:h="",onClick:m,..._}){const g=`ds-treeitem--depth-${Math.min(Math.max(0,r),6)}`,b=E=>{m==null||m(E),E.defaultPrevented||f==null||f()};return y.jsxs("div",{className:W("ds-treeitem",b5,x5,u==="file"?w5:void 0,u==="element"?k5:void 0,`ds-treeitem--${u}`,g,i?"is-open":void 0,o?"is-selected":void 0,h),..._,onClick:b,children:[y.jsx("span",{className:"ds-treeitem__twist",onClick:E=>{E.stopPropagation(),c==null||c()},children:s?y.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:y.jsx("path",{d:"m9 18 6-6-6-6"})}):null}),t?y.jsx("span",{className:"ds-treeitem__icon",children:t}):null,y.jsx("span",{className:"ds-treeitem__label",children:e}),n!=null?y.jsx("span",{className:"ds-treeitem__count",children:y.jsx(_f,{children:n})}):null]})}const E5="atm_73_usvi9m",S5="atm_mk_stnw88 atm_tk_ek2tx5 atm_fq_1ssbidh atm_9s_1ulexfb atm_vy_1q4684i atm_e2_1q4684i atm_tr_zr6sja",C5="atm_mk_pfqszd atm_tk_1wugsn5 atm_fq_1wugsn5 atm_9s_1ulexfb atm_am_12336oc atm_vy_14k5dlv atm_e2_14k5dlv atm_tr_glywfm",T5="atm_9s_1txwivl atm_am_12336oc atm_h_1h6ojuz atm_cx_ek2tx5 atm_j6_10y9mp3 atm_l8_1yx7vd1 atm_1jnihqa_116y0ak atm_13oh2ge_1h6ojuz atm_au8vxp_ouk0ow atm_5vy2xq_1mvar2t atm_2q1y0j_v3rtn5 atm_1i76or1_kb7nvz atm_w7jtjl_angws6 atm_e5ifxj_glywfm",j5="atm_40_xbw5ta atm_26_1u3842e atm_7l_1r1dq30";function yT({className:e="",placement:t="rail"}){return y.jsx(cT,{className:W(E5,S5,t==="inline"&&C5,e),"data-product-pattern":"reqvire-rail-mark","data-placement":t,decorative:!0})}function A5({title:e}){return y.jsxs("div",{className:W("ux-pane-chrome-header",T5,j5),"data-product-pattern":"pane-chrome-header",children:[y.jsx(yT,{placement:"inline"}),y.jsx("span",{children:e})]})}const R5="atm_73_usvi9m",N5="atm_7l_1kw7nm4";function L5({className:e="",leading:t,title:n,description:r,meta:i,actions:o,children:s,...u}){return y.jsxs("div",{...u,className:W("ux-workspace-toolbar","ux-graph-control-panel",R5,N5,e),"data-product-pattern":"workspace-toolbar",children:[t!=null?y.jsx("div",{"data-product-pattern-slot":"leading",children:t}):null,n!=null||r!=null||i!=null?y.jsxs("div",{"data-product-pattern-slot":"summary",children:[n!=null?y.jsx("div",{"data-product-pattern-slot":"title",children:n}):null,r!=null?y.jsx("div",{"data-product-pattern-slot":"description",children:r}):null,i!=null?y.jsx("div",{"data-product-pattern-slot":"meta",children:i}):null]}):null,s,o!=null?y.jsx("div",{"data-product-pattern-slot":"actions",children:o}):null]})}const z5="ux-source-code-preview__toolbar",M5="ux-source-code-preview__title",D5="ux-source-code-preview__kind",O5="ux-source-code-preview__actions",Gk="ux-source-code-preview__button",q5="ux-source-code-preview__body",I5="ux-source-code-preview__collapsed",P5="ux-source-code-preview__code",$5="ux-source-code-preview__fallback",B5="atm_9s_11p5wf0 atm_5j_1pr0uq2 atm_rlxjd7_1if85x1 atm_r2y4nl_idpfg4 atm_14cg7id_ke7gi9 atm_vck24y_1txwivl atm_11ve1qk_idpfg4 atm_i9mt2d_1h6ojuz atm_1kjnh0r_1yb4nlp atm_dkvy2h_ek2tx5 atm_1s1kub7_5vcghk atm_8zkzoi_tvxayk atm_t26cqb_1txwivl atm_3v123l_idpfg4 atm_1ukmqx1_ggq5uc atm_1ethvz0_1h6ojuz atm_tawn8s_tx1for atm_ds559m_idpfg4 atm_17chmrh_idpfg4 atm_1srbz5f_tlke0l atm_1d9jsad_ouk0ow atm_hhova6_1e5hqsa atm_1nj4www_1aou828 atm_18jxqf0_1aou828 atm_1yzbnxd_12336oc atm_mxwtbq_idpfg4 atm_kmhl2q_15vqwwr atm_4sc2ty_l6f2xw atm_1a1diav_ouk0ow atm_ckzzxw_1d1fc98 atm_r1woy3_1l2sidv atm_1lebw16_1q9ccgz atm_10y06tk_12336oc atm_1p3vhg_1i9d2r atm_1izdd7x_ohusjj atm_getkfg_1mvar2t atm_77utgy_116y0ak atm_eg9w3c_12336oc atm_1s6zjgd_1h6ojuz atm_ig6bjb_owgaek atm_ctkdzy_116y0ak atm_7mpws7_1ym253d atm_13srhu6_1h6ojuz atm_1l98py9_owgaek atm_1osvloc_ab5uq2 atm_af8ki9_o0ucy6 atm_1mem8sh_tlke0l atm_1em17te_ouk0ow atm_pbo3lr_1mvar2t atm_1ldrjpy_idpfg4 atm_1r13q6g_ewfl5b atm_meekf9_1osqo2v atm_95h1k4_1wugsn5 atm_4bl57x_ewfl5b atm_qqboie_idpfg4 atm_j9vty2_1aqtv8w atm_ya1aq4_l6f2xw atm_6f4ixp_ouk0ow atm_1a17x3_1sx85p0 atm_16k6692_cs5v99 atm_7az72q_1risgsc atm_h3v5kx_1osqo2v atm_1rxoi0y_1wugsn5 atm_1ap86ni_ewfl5b atm_16a7xlq_1kw7nm4 atm_1yzgbo6_ek2tx5 atm_k74eil_ouk0ow",U5="atm_3f_xbw5ta atm_26_1u3842e atm_70_1xzuvaq atm_13xrw5z_xbw5ta atm_oqq1o6_1u3842e atm_qoupc9_1j28jx2 atm_19dvvdx_1mqbmot atm_bhvvh4_an4usv atm_19u0imh_yzuxxm atm_1mt6dv0_1mqbmot atm_rzhigz_xbw5ta atm_1m0xyir_6lcubb atm_1qro7lj_1mqbmot atm_1u3zxdm_1627y59 atm_nyo18c_8o97w atm_15tq64w_an4usv atm_11my16c_ylntdi atm_1bgysyq_1c05cp1 atm_v9utu8_an4usv atm_t3j43_yzuxxm atm_zs72hj_1j28jx2 atm_2hd35e_an4usv atm_o6gavh_1mqbmot atm_mx8pxj_xbw5ta atm_1n7x8zq_yzuxxm",G5="atm_162yzw4_idpfg4 atm_1epzofa_fg65tv atm_1nq4x11_1jtmq4";function F5({wrapped:e=!1,children:t,className:n="",...r}){return y.jsx("section",{className:W("ux-source-code-preview",B5,U5,e?G5:"",n),"data-product-pattern":"code-preview-frame",...r,children:t})}function H5({expanded:e,onToggleExpanded:t,kind:n,path:r,showPath:i=!0,languageLabel:o,lineCount:s,relationTypes:u=[],wrapped:c,copied:f,onToggleWrap:h,onCopy:m,className:_="",...g}){return y.jsxs("div",{className:W(z5,_),"data-product-pattern-slot":"toolbar",...g,children:[y.jsxs("button",{type:"button",className:M5,"aria-expanded":e,onClick:t,children:[e?y.jsx(et,{name:"chevron-down"}):y.jsx(et,{name:"chevron-right"}),y.jsx("span",{className:D5,children:n}),i?y.jsx("strong",{children:r||"source"}):null,y.jsx("span",{children:o}),y.jsxs("span",{children:[s," lines"]}),u.length>0?y.jsxs("span",{children:["via ",u.join(", ")]}):null]}),y.jsxs("div",{className:O5,children:[y.jsx(Eo,{tone:"secondary",size:"sm",className:Gk,"aria-label":c?"Disable line wrap":"Enable line wrap","aria-pressed":c,onClick:h,title:c?"Disable line wrap":"Enable line wrap",children:y.jsx(et,{name:"wrap-text"})}),y.jsx(Eo,{tone:"secondary",size:"sm",className:Gk,"aria-label":f?"Copied":"Copy source",onClick:m,title:f?"Copied!":"Copy source",children:f?y.jsx(et,{name:"check"}):y.jsx(et,{name:"copy"})})]})]})}function Fk({collapsed:e=!1,lineCount:t=0,children:n,className:r="",...i}){return e?y.jsx("div",{className:W(I5,r),"data-product-pattern-slot":"collapsed",...i,children:n??`${t} lines hidden`}):y.jsx("div",{className:W(q5,r),"data-product-pattern-slot":"body",...i,children:n})}const V5="atm_8liq13_1lk486g atm_gi_1j63nv9 atm_ks_1wugsn5 atm_l8_ek2tx5 atm_6tqpqf_1ulexfb atm_1pqnrs9_1osqo2v atm_1wqwlc2_193pygy",X5="atm_3f_xbw5ta atm_5j_ab5uq2 atm_26_1u3842e";function C1({children:e,className:t="",...n}){return y.jsx("div",{className:W("ux-diagram-block-frame",V5,X5,t),"data-product-pattern":"diagram-block-frame",...n,children:e})}const Y5="atm_mk_h2mmj6 atm_9s_11p5wf0 atm_73_usvi9m atm_dz_i47zc9 atm_84_idpfg4 atm_e2_1kxcs5u atm_j6_idpfg4 atm_ll_idpfg4 atm_lk_l705tw atm_1415qz7_1osqo2v atm_d0vgki_idpfg4 atm_1dan2p0_15vqwwr atm_11n9v5k_idpfg4 atm_13uyt28_idpfg4",W5="atm_26_6lcubb atm_7l_an4usv atm_1g05x3d_6lcubb",K5="atm_am_ggq5uc atm_e2_1osqo2v atm_j6_idpfg4 atm_lk_idpfg4",Q5="atm_mk_h2mmj6 atm_73_usvi9m atm_jb_idpfg4 atm_j6_idpfg4 atm_ks_1wugsn5 atm_l8_1h5vprv atm_1415qz7_1osqo2v atm_d0vgki_idpfg4 atm_1dan2p0_1wugsn5 atm_kxr2ln_1ru0ig4",Z5="atm_5q_19lzvi5 atm_5e_19lzvi5 atm_26_1u3842e atm_10w44b5_idpfg4 atm_1hfqlcp_idpfg4 atm_1g05x3d_1u3842e",J5="atm_9s_1txwivl atm_h_1h6ojuz atm_fc_1yb4nlp atm_cx_ynj908 atm_gq_1aqtv8w atm_l8_1hh10yn atm_dur37s_11p5wf0 atm_1e5nxn4_idpfg4 atm_kmbmcf_1xi6ry0 atm_19fc0t4_1o6fbio atm_6adg5r_1mvar2t atm_1qr6m1c_idpfg4 atm_1xf982h_angws6 atm_13q3c41_idpfg4 atm_16mg600_15vqwwr atm_syjkcl_1c8rstr atm_10wcbon_1l2sidv atm_1if9keh_1q9ccgz",e8="atm_40_xbw5ta atm_k425c2_1mqbmot atm_dig3yl_an4usv",t8="atm_3f_idpfg4 atm_5j_ab5uq2 atm_l8_1vz6rot atm_9j_tlke0l atm_c8_1m800s6 atm_r3_1e5hqsa atm_rd_glywfm",n8="atm_26_hq4ovn atm_7l_9541rp";function Bd({toolbar:e,children:t,layout:n="page",className:r="",...i}){return y.jsx("div",{className:W("ux-content-route",Y5,n==="embedded"&&K5,W5,r),"data-product-pattern":"document-panel","data-layout":n,...i,children:y.jsxs("section",{className:W("ux-content-document-panel",Q5,Z5),children:[e?y.jsx(vT,{...e}):null,t]})})}function vT({label:e="Source page",title:t,actionHref:n,actionLabel:r}){const i=n&&r;return y.jsxs("div",{className:W("ux-content-page__toolbar",J5,e8),children:[y.jsxs("div",{className:"ux-content-page__title",children:[y.jsx("span",{children:e}),y.jsx("strong",{children:t||"Unknown file"})]}),i?y.jsx("a",{className:W("ux-content-page__command",t8,n8),href:n,children:r}):null]})}const r8="atm_73_usvi9m atm_mk_h2mmj6 atm_9s_11p5wf0 atm_dz_i47zc9 atm_84_idpfg4 atm_e2_1kxcs5u atm_j6_idpfg4 atm_lk_l705tw atm_ll_idpfg4 atm_og4esw_ggq5uc atm_1gssvx3_1wugsn5 atm_101uomu_1osqo2v atm_1luas71_idpfg4 atm_10w7pc2_15vqwwr atm_7j151f_idpfg4 atm_1jtv9z9_idpfg4",i8="atm_26_1u3842e atm_7l_an4usv",a8="atm_mk_h2mmj6 atm_jb_idpfg4 atm_j6_idpfg4 atm_ks_15vqwwr",o8="atm_26_6lcubb",s8="atm_9s_1ulexfb atm_vy_1osqo2v atm_e2_1osqo2v atm_j6_idpfg4 atm_3r4ecv_1lk486g atm_fi8d2z_1a3zy5o",l8="atm_26_6lcubb",u8="atm_mk_stnw88 atm_tk_1ssbidh atm_fq_1ssbidh atm_9s_116y0ak atm_h_1h6ojuz atm_cx_tx1for atm_c8_1c8rstr atm_cd_1m30gqx atm_tr_1ooetej",c8="atm_7l_1mqbmot";function T1({embedded:e=!1,children:t,className:n="",...r}){return y.jsx("div",{"data-product-pattern":"graph-route","data-embedded":e?"true":void 0,className:W("ux-graph-route",r8,i8,n),...r,children:t})}function j1({children:e,className:t="",...n}){return y.jsx("div",{"data-product-pattern":"graph-canvas-frame",className:W("ux-graph-canvas-frame",a8,o8,t),...n,children:e})}const bT=K.forwardRef(function({variant:t="knowledge",className:n="",...r},i){return y.jsx("div",{ref:i,"data-product-pattern":"graph-canvas-surface","data-graph-surface":t,className:W("ux-graph-canvas-surface",s8,l8,n),...r})});function A1({children:e,className:t="",...n}){return y.jsx("div",{"data-product-pattern":"graph-canvas-notice",className:W("ux-graph-canvas-notice",u8,c8,t),...n,children:e})}const f8="ux-markdown-table-wrap",d8="atm_bq1472_1aqtv8w atm_1w2t34u_iqvn5y atm_c8_dtbmau atm_g3_zc8ygv atm_19zh4bz_idpfg4 atm_1y0imk_idpfg4 atm_1lw6bl4_1l8d0ps atm_ql6csr_1d1fc98 atm_1rgm2zr_10nfu4p atm_1ik9yws_1heflvk atm_19hgg51_asey3o atm_10jxl4n_1ye8rbs atm_gon3un_1c8rstr atm_dwpvdg_1tbrl4p atm_2fe0xc_idpfg4 atm_bveobi_glywfm atm_o46ohl_h2mmj6 atm_425m93_ynkk2f atm_67nu5e_bffgoz atm_uo82e7_ynkk2f atm_10zy8nm_177qeyn atm_w2i1ve_b3btdj atm_1wtb738_stnw88 atm_16sfhk1_iqvn5y atm_1m89ilf_1swohsp atm_c37wi0_177ah3i atm_prx2yt_177ah3i atm_1mmy5t_1i9d2r atm_5ar3rq_1wdt8vi atm_hpockt_1wdt8vi atm_1e2w4x8_m8pcc8 atm_muzcs1_stnw88 atm_1infl1i_idpfg4 atm_1gbk6qc_idpfg4 atm_1rvazdw_ynj908 atm_s68k9l_usich2 atm_1qn3x30_1m800s6 atm_gmu1v2_19dj2kj atm_1b707sb_1kw7nm4 atm_1kqc8kk_8stvzk atm_1l5jvtr_1xi6ry0 atm_sjz5bo_1ulexfb atm_17hnt88_1osqo2v atm_12unxwb_1wugsn5 atm_e2bpx4_1j63nv9 atm_1fafjcd_ab5uq2 atm_8m8je0_bqp6sg atm_2i224p_w4wse3 atm_23oz9t_1wugsn5 atm_1ii5m9r_ab5uq2 atm_5nzslz_ek2tx5 atm_aujn1z_idpfg4 atm_husugj_ek2tx5 atm_4szxr0_1wugsn5 atm_1vi0v7b_1osqo2v atm_1xqubnc_cfaqiv atm_1npyiia_bg8mon atm_73wglx_1vz6rot atm_ce0fnb_1e5hqsa atm_1rnbxcd_jp4btk",h8="atm_7l_an4usv atm_99d6af_an4usv atm_dlv3ej_127xd9b atm_1wc41so_iq6dbe atm_zcqchd_xbw5ta atm_8i26bz_yzuxxm atm_1iryd98_1j28jx2 atm_xz3cpx_1viig0m atm_1w0fi5a_1mqbmot atm_44xr0n_1mqbmot atm_1x9wr5e_1mqbmot atm_weabrt_xbw5ta atm_1okwm0h_yzuxxm atm_1uh4tmn_1d1fc98",m8="atm_h3_iqvn5y atm_9s_cj1kg8 atm_ks_15vqwwr atm_6w_1e54zos atm_fy_cs5v99 atm_t868qm_idpfg4",p8="atm_7l_1mqbmot";function _8({variant:e="detail",children:t,className:n="",...r}){return y.jsx("div",{className:W("ux-markdown",`ux-markdown-${e}`,d8,h8,e==="preview"&&m8,e==="preview"&&p8,n),"data-product-pattern":"markdown-frame","data-variant":e,...r,children:t})}const g8="atm_mk_stnw88 atm_wq_18g0jgm atm_9j_uf7jqg atm_tl_glywfm atm_6hjprp_stnw88 atm_1aj71h3_1j28jx2 atm_lzn0r3_b3btdj atm_1pe8nox_1627y59 atm_17yrrpa_glywfm",y8="atm_tk_idpfg4 atm_6i_idpfg4 atm_fq_ejos9l atm_vy_owgaek atm_tr_zr6sja atm_2stpi8_idpfg4 atm_mbezp2_idpfg4 atm_44hr8e_1ssbidh atm_1v8yup7_1ohcsmr atm_69el5p_zr6sja",v8="atm_n3_idpfg4 atm_6i_16zoofi atm_fq_idpfg4 atm_e2_owgaek atm_9j_mivt1e atm_tr_pqlc17 atm_2stpi8_1ssbidh atm_gloser_idpfg4 atm_44hr8e_idpfg4 atm_1oletfx_1ohcsmr atm_69el5p_1i34xl8";function b8({orientation:e="vertical",active:t=!1,role:n="separator",className:r="",...i}){return y.jsx("div",{"data-product-pattern":"pane-resizer","data-orientation":e,"data-active":t||void 0,role:n,className:W("ux-pane-resizer",g8,e==="vertical"?y8:v8,r),...i})}const x8="atm_mk_h2mmj6 atm_am_ggq5uc atm_jb_idpfg4 atm_j6_idpfg4 atm_ks_15vqwwr atm_26_6lcubb",w8="atm_mk_stnw88 atm_tk_1aqtv8w atm_n3_1aqtv8w atm_fq_1aqtv8w atm_wq_1du6iyk",k8="atm_9s_1txwivl atm_h_1h6ojuz atm_cx_ek2tx5 atm_gi_tx1for atm_l8_5z7wz8 atm_yqcrq0_glywfm",E8="atm_3f_moqrwa atm_5j_ab5uq2 atm_26_1muz9yu atm_7l_1r1dq30 atm_70_1xzuvaq atm_tej1as_1ox2th8",S8="atm_vy_1aqtv8w atm_e2_1aqtv8w atm_am_glywfm";function C8({warning:e,children:t,className:n="",...r}){return y.jsxs("main",{"data-product-pattern":"shell-main","data-product-pattern-slot":"main",className:W("ux-shell-main",x8,n),...r,children:[e!=null?y.jsx("div",{className:W(w8),children:y.jsxs("div",{role:"alert",className:W(k8,E8),children:[y.jsx(et,{name:"alert-triangle",className:W(S8)}),y.jsx("span",{children:e})]})}):null,t]})}const T8="atm_9s_1txwivl atm_jb_idpfg4 atm_j6_idpfg4",j8="atm_am_14je7hw atm_vy_l705tw atm_e2_1osqo2v",A8="atm_mk_h2mmj6 atm_am_ggq5uc atm_e2_1osqo2v",R8="atm_am_1nshikl atm_vy_1vchpkz atm_e2_1osqo2v",N8="atm_9s_glywfm";function Hk({placement:e="main",collapsed:t=!1,children:n,className:r="",...i}){return y.jsx("section",{"data-product-pattern":"shell-pane","data-product-pattern-slot":`${e}-pane`,"data-placement":e,"data-collapsed":t||void 0,className:W("ux-shell-pane",T8,e==="start"&&j8,e==="main"&&A8,e==="end"&&R8,t&&N8,r),...i,children:n})}const L8="atm_3ux45p_xilxc7 atm_7enurt_1ul9x4n atm_xrwmvn_1sa4g6l atm_131t7x5_1pnai9a atm_jijb4g_mpnfgn atm_5f7sk5_grho7r atm_mk_stnw88 atm_f3_idpfg4 atm_9s_1txwivl atm_ar_1bp4okc atm_ks_15vqwwr atm_bx_rhlbdi atm_rdikh7_16f6m6j atm_1x84mu2_grho7r atm_c55rhu_uf7jqg atm_1uhjr1p_glywfm atm_ecihg_glywfm atm_10ksiv3_1txwivl atm_1kijzu3_h2mmj6 atm_1iefpba_1wugsn5 atm_yaxn93_1wugsn5 atm_ko42wp_1fhbwtr atm_10lsymm_14je7hw atm_1rvq92s_l705tw atm_172uwyg_idpfg4 atm_1fvgr9n_idpfg4 atm_1bph1dv_1osqo2v atm_9ddw67_glywfm atm_1gubk6t_1txwivl atm_1sp0tzn_ggq5uc atm_1bc2xyu_1bp4okc atm_1fcxf65_1osqo2v atm_v7xi9x_1osqo2v atm_71pju9_idpfg4 atm_1h37yxn_15vqwwr atm_1y4zt3u_glywfm atm_1w7swc1_1osqo2v atm_15knt46_idpfg4 atm_hqz9gm_15vqwwr atm_1goo8mn_idpfg4 atm_2cta3c_idpfg4 atm_1efuv80_99d5r0 atm_nc44ax_1osqo2v atm_hyk4gq_idpfg4 atm_1o7ctz5_1wugsn5 atm_1s3qamy_1ru0ig4 atm_93f6k7_1xhgn5n atm_1meko8n_16f6m6j",z8="atm_26_6lcubb atm_7l_an4usv atm_dszr3u_xbw5ta atm_gabbo7_1u3842e atm_1yhh93k_an4usv atm_djtcek_21k9f7 atm_1oh3oos_6lcubb atm_1al7dlc_idpfg4 atm_1encuka_idpfg4 atm_vqlst0_1u3842e",M8="atm_wq_18g0jgm atm_9s_1txwivl atm_am_mn6g6n atm_h_1fhbwtr atm_e2_1eorbtc atm_lttsoj_idpfg4",D8="atm_40_xbw5ta atm_26_1u3842e",O8="atm_10gvs4z_jijo1b atm_9s_1txwivl atm_am_14je7hw atm_h_1h6ojuz atm_cx_ek2tx5 atm_73_usvi9m atm_5q_xbw5ta atm_l8_13lkfmx atm_10a8e0q_1wugsn5 atm_7v5fnw_1wugsn5 atm_140bc1r_4qz7n2",q8="atm_mk_pfqszd atm_tk_1wugsn5 atm_fq_1wugsn5 atm_9s_1ulexfb atm_am_12336oc atm_vy_1q4684i atm_e2_1q4684i atm_tr_glywfm",I8="atm_17j569w_wh2yj2 atm_9s_116y0ak atm_h_1h6ojuz atm_7l_1r1dq30 atm_c8_dtbmau atm_cs_1d1fc98 atm_fr_j8soc3 atm_g3_kb7nvz atm_tr_1f1pu16",P8="atm_9s_1txwivl atm_am_ggq5uc atm_jb_idpfg4 atm_h_1fhbwtr atm_l0_1wugsn5 atm_l1_15vqwwr atm_lk_1rqgide atm_zufo0v_1osqo2v atm_jlg94s_idpfg4 atm_1lln3pn_1osqo2v",$8="atm_9s_1txwivl atm_am_12336oc atm_h_1h6ojuz atm_cx_iqvn5y atm_l8_1ytysue atm_lttsoj_ynj908",B8="atm_mk_h2mmj6 atm_9s_1txwivl atm_am_ggq5uc atm_j6_idpfg4 atm_26_6lcubb",U8="atm_mk_stnw88 atm_tk_1ssbidh atm_fq_10ksde3 atm_wq_6m60ty atm_9s_116y0ak atm_vy_1doep66 atm_e2_1ru0ig4 atm_h_1h6ojuz atm_fc_1h6ojuz atm_9j_tlke0l atm_tr_1i34xl8 atm_nwhuwt_ynj908 atm_17yrrpa_glywfm atm_6tqpqf_1ulexfb atm_1pqnrs9_1aou828 atm_1dlbvfv_1aou828",G8="atm_3f_ag7trk atm_5j_ab5uq2 atm_26_1u3842e atm_70_1xzuvaq atm_7l_1mqbmot atm_syj2lh_1627y59 atm_1sx18ul_1r1dq30",F8=K.forwardRef(function({brandLabel:t="REQVIRE",toolbar:n,navigationItems:r=[],activeNavigationValue:i,headerActions:o=[],sidePane:s,main:u,detailPane:c,mainWarning:f,leftPaneOpen:h=!0,leftPaneResizing:m=!1,leftPaneWidth:_,leftPaneMinWidth:g,leftPaneMaxWidth:b,leftPaneCollapseLabel:E="Collapse pane",leftPaneExpandLabel:C="Expand pane",leftPaneResizeLabel:w="Resize pane",onNavigate:T,onToggleLeftPane:k,onLeftPaneResizePointerDown:S,onLeftPaneResizeKeyDown:z,className:R="",children:M,...X},F){const I=!!(S||z),U=h?E:C;return y.jsxs("div",{ref:F,"data-product-pattern":"app-shell",className:W("ux-app",L8,z8,!h&&"is-left-collapsed",m&&"is-left-resizing",R),...X,children:[n??y.jsx(H8,{brandLabel:t,navigationItems:r,activeNavigationValue:i,headerActions:o,onNavigate:T}),y.jsxs("div",{"data-product-pattern-slot":"body",className:W(B8),children:[s!=null?y.jsx(Hk,{placement:"start",collapsed:!h,children:s}):null,s!=null&&k!=null?y.jsx("button",{type:"button",className:W(U8,G8,!h&&"is-collapsed"),"aria-label":U,"aria-expanded":h,title:U,onClick:k,children:h?y.jsx(et,{name:"chevron-left"}):y.jsx(et,{name:"chevron-right"})}):null,s!=null&&I?y.jsx(b8,{active:m,orientation:"vertical","aria-label":w,"aria-orientation":"vertical","aria-valuemin":g,"aria-valuemax":b,"aria-valuenow":_,tabIndex:h?0:-1,onPointerDown:S,onKeyDown:z}):null,y.jsx(C8,{warning:f,children:u}),c!=null?y.jsx(Hk,{placement:"end",children:c}):null]}),M]})});function H8({brandLabel:e,navigationItems:t,activeNavigationValue:n,headerActions:r,onNavigate:i}){const o=t.map(s=>({value:s.value,label:s.label,icon:s.icon!=null?y.jsx(et,{name:s.icon}):void 0,badge:s.badge}));return y.jsxs("header",{"data-product-pattern":"shell-header",className:W(M8,D8),children:[y.jsxs("div",{className:W(O8),children:[y.jsx(cT,{className:W(q8),decorative:!0}),e!=null?y.jsx("span",{className:W(I8),children:e}):null]}),y.jsx("nav",{className:W(P8),"aria-label":"Explorer views",children:y.jsx(C6,{items:o,value:n,onChange:i,variant:"underline"})}),r.length>0?y.jsx("div",{className:W($8),children:r.map(s=>y.jsx(Xl,{"aria-label":s.label,title:s.label,active:s.active??!1,disabled:s.disabled,onClick:s.onClick,children:y.jsx(et,{name:s.icon})},s.id))}):null]})}const V8="atm_mk_stnw88 atm_f3_idpfg4 atm_ks_15vqwwr atm_z96mp2_15vqwwr atm_tx6wa3_1osqo2v atm_c23icw_idpfg4 atm_15sh1ry_15vqwwr atm_xl2yni_idpfg4 atm_18wqs0h_15vqwwr atm_1yf7k5_1wugsn5 atm_6hyzq9_1osqo2v atm_1e3sxn3_idpfg4 atm_v30pd_1osqo2v atm_1p85neu_idpfg4 atm_pyoxlp_15vqwwr atm_gm77m6_idpfg4",X8="atm_26_6lcubb",Y8="atm_73_usvi9m atm_mk_h2mmj6 atm_9s_11p5wf0 atm_dz_i47zc9 atm_84_idpfg4 atm_e2_1kxcs5u atm_j6_idpfg4 atm_lk_l705tw atm_ll_idpfg4 atm_1kiqiet_i47zc9 atm_1phjbih_idpfg4 atm_101uomu_1osqo2v atm_1luas71_idpfg4 atm_10w7pc2_15vqwwr atm_7j151f_idpfg4 atm_1jtv9z9_idpfg4",W8="atm_26_6lcubb atm_7l_an4usv atm_1jnj122_6lcubb",K8="atm_mk_h2mmj6 atm_73_usvi9m atm_jb_idpfg4 atm_j6_idpfg4 atm_ks_1wugsn5 atm_l8_1h5vprv atm_101uomu_1osqo2v atm_1luas71_idpfg4 atm_10w7pc2_1wugsn5 atm_gjhvm_1ru0ig4",Q8="atm_5e_19lzvi5 atm_5q_19lzvi5 atm_26_1u3842e atm_ul853p_idpfg4 atm_84ju44_idpfg4 atm_1jnj122_1u3842e";function Qy({viewId:e,children:t,className:n="",...r}){return y.jsx("main",{"data-product-pattern":"route-frame","data-view":e,className:W("ux-route-frame",V8,X8,n),...r,children:t})}function Ao({layout:e="single",children:t,className:n="",...r}){return y.jsx("div",{"data-product-pattern":"route-layout","data-route-frame":!0,"data-route-layout":e,className:W("ux-route-layout",Y8,W8,n),...r,children:t})}function Cs({children:e,className:t="",...n}){return y.jsx("section",{"data-product-pattern":"route-panel",className:W("ux-route-panel",K8,Q8,t),...n,children:e})}const Z8="atm_1seo907_1178luh atm_i15q6e_13i4f3j atm_nahwog_ghg70p atm_9s_1txwivl atm_e2_1osqo2v atm_ar_1bp4okc atm_cx_1wz40ms atm_ks_15vqwwr atm_10w7pc2_1wugsn5",J8="atm_7l_an4usv",eM="atm_9s_1txwivl atm_j6_10y9mp3 atm_h_1h6ojuz atm_fc_1yb4nlp atm_cx_ynj908 atm_l8_1uaqrqd atm_5ct0mx_1fhbwtr atm_5xse3x_1bp4okc",tM="atm_40_ag7trk atm_26_1u3842e atm_1qej8ob_idpfg4",nM="atm_9s_1txwivl atm_jb_idpfg4 atm_am_ggq5uc atm_h_1h6ojuz atm_cx_1xi6ry0 atm_ks_15vqwwr atm_c8_1m800s6",rM="atm_7l_1mqbmot",Vk="atm_9s_116y0ak atm_jb_idpfg4 atm_h_1h6ojuz atm_cx_1xi6ry0 atm_e8xyln_1htp2ug atm_ndbjza_15vqwwr atm_940ars_1l2sidv atm_n1dgfq_1q9ccgz atm_19slny5_idpfg4 atm_cears4_1j28jx2 atm_ugfq01_tlke0l atm_x9nt3f_1o8liyq atm_1n5gmj0_1ki2a5u atm_1319o0l_19dj2kj",Xk="atm_5netkm_an4usv atm_vuoyfh_8stvzk atm_3jenh3_1r1dq30 atm_1u9zfio_hieimq",iM="atm_9s_1txwivl atm_jb_1jrqg69 atm_h_1h6ojuz atm_fc_esu3gu atm_cx_ek2tx5 atm_be_1g80g66 atm_7v5fnw_1osqo2v atm_140bc1r_idpfg4",aM="atm_c8_ouk0ow atm_g3_19ii325",oM="atm_7l_1mqbmot",sM="atm_1n57bn5_6lcubb";function Zy({rootLabel:e,currentLabel:t,countLabel:n,controls:r,children:i,breadcrumbLabel:o="Workspace breadcrumbs",onRootClick:s,tone:u="surface",showDivider:c=!0}){const f=!!(s||t),h=f||!!n||!!r;return y.jsxs(Cs,{"data-panel":"document","data-workspace-shell":!0,"data-workspace-tone":u,className:W("ux-workspace-shell",Z8,J8,sM),children:[h?y.jsxs("div",{className:W("ux-workspace-shell__toolbar",eM,tM),"data-workspace-divider":c?"true":"false",children:[f?y.jsxs("div",{className:W("ux-workspace-shell__breadcrumbs",nM,rM),"aria-label":o,children:[y.jsx("span",{className:W("ux-workspace-shell__crumb",Vk,Xk),children:s?y.jsx("button",{type:"button",onClick:s,children:e}):y.jsx("span",{"data-workspace-crumb-current":t?void 0:!0,children:e})}),t?y.jsxs("span",{className:W("ux-workspace-shell__crumb",Vk,Xk),children:[y.jsx("span",{"data-workspace-crumb-separator":!0,children:"/"}),y.jsx("span",{"data-workspace-crumb-current":!0,children:t})]}):null]}):null,f?null:y.jsx("span",{"aria-hidden":"true"}),y.jsxs("div",{className:W("ux-workspace-shell__actions",iM),children:[n?y.jsx("span",{className:W("ux-workspace-shell__count",aM,oM),children:n}):null,r]})]}):null,i]})}const lM="atm_c8_1m800s6 atm_g3_5cyyty atm_154eppz_1ulexfb atm_1olll9p_owgaek atm_rwqn34_an4usv atm_eubwdv_1d1fc98 atm_1aif5c9_1osqo2v atm_23oz9t_1wugsn5 atm_yxvol1_pm3ebf atm_1ii5m9r_ab5uq2 atm_5nzslz_ek2tx5 atm_127v0y0_l6f2xw atm_2i224p_ouk0ow atm_kgv4wj_1sx85p0",uM="atm_7l_1mqbmot atm_vr8p5l_1m30gqx atm_adzrtd_yzuxxm atm_19poeq1_an4usv",cM="atm_c8_1m800s6 atm_g3_5cyyty",fM="atm_7l_1mqbmot atm_vr8p5l_1m30gqx";function Bm({inline:e=!1,title:t,tone:n="notice",children:r,className:i="",...o}){return e?y.jsxs("span",{className:W("ux-renderer-notice",cM,fM,i),"data-product-pattern":"renderer-notice","data-tone":n,...o,children:[t?y.jsx("strong",{children:t}):null,r]}):y.jsxs("div",{className:W("ux-renderer-notice",lM,uM,i),"data-product-pattern":"renderer-notice","data-tone":n,...o,children:[t?y.jsx("strong",{children:t}):null,r]})}const dM="atm_2q2ca2_16vdio1 atm_w45qbn_4na889 atm_p6ty3p_ktbqgd atm_1o55f4c_fbo0bp atm_12vi6d1_1osqo2v atm_vy_1qbcdo8 atm_j3_1qbcdo8 atm_iy_1rfco4h atm_1r3l6p7_1yi2ddt atm_15lheid_1yi2ddt atm_156wnpb_1sqy07v",hM="atm_3f_ag7trk atm_5j_19ma0su atm_26_198lp58 atm_7l_an4usv atm_70_dxqsf1 atm_1ysnjrq_xbw5ta atm_nki6h4_yzuxxm atm_ghbvc0_yzuxxm atm_1erdyab_fyrtqx atm_1ti5f86_an4usv atm_1m9pog3_1m800s6 atm_q5r5c6_1mvar2t atm_1dxf9mt_8x1siq atm_7i6odd_yv70g4",mM="atm_9s_11p5wf0 atm_cx_iqvn5y atm_l8_119u37u atm_jj5qda_mp6wvn",pM="atm_40_xbw5ta atm_26_198lp58",_M="atm_iy_18nqavb atm_ks_1wugsn5 atm_l8_1h5vprv atm_156wnpb_3m3u69 atm_jj5qda_1aqtv8w",gM="atm_26_1u3842e",yM="atm_9s_1txwivl atm_vy_1osqo2v atm_jb_idpfg4 atm_h_1h6ojuz atm_cx_iqvn5y atm_lbduw3_ggq5uc atm_1rs6lid_idpfg4",vM="atm_vy_1q4684i atm_e2_1q4684i atm_am_12336oc atm_5j_mrub5a",bM="atm_am_12336oc atm_gz_1wugsn5 atm_h0_1wa8fux atm_1pqnrs9_1aou828 atm_1dlbvfv_1aou828",Jh="atm_9s_1txwivl atm_vy_1osqo2v atm_ar_1bp4okc atm_cx_hwm9mu",xM="atm_9s_11p5wf0 atm_cx_tx1for atm_1t41yt8_idpfg4 atm_aemo9v_1r1dq30 atm_10jxl4n_dtbmau atm_1slhzjn_1d1fc98 atm_112yvym_idpfg4 atm_5q05o8_3szr2b",wM="atm_gi_idpfg4 atm_7l_1mqbmot atm_c8_1m800s6",kM="atm_9s_1txwivl atm_be_1g80g66 atm_cx_xyed2j",EM="atm_9s_116y0ak atm_h_1q9ycp6 atm_cx_owgaek atm_l8_1k2i9i8 atm_c8_1m800s6",SM="atm_5j_mrub5a atm_26_1j28jx2",CM="atm_7l_1mqbmot",TM="atm_7l_an4usv atm_cs_1ermehx",jM="atm_5j_1i9d2r atm_26_1j28jx2 atm_l8_idpfg4 atm_7l_ole0cg atm_c8_1m800s6",AM="atm_9s_1txwivl atm_ar_1bp4okc atm_cx_1rgb3qj",R1="atm_9s_11p5wf0 atm_dz_11ouabr atm_h_1h6ojuz atm_84_ek2tx5 atm_cx_1rgb3qj",N1="atm_9s_1bgihbq",RM="atm_9s_1txwivl atm_h_1h6ojuz atm_cx_owgaek atm_jb_idpfg4 atm_l8_14k80hk",NM="atm_40_xbw5ta atm_18kh1rq_idpfg4",LM="atm_jb_idpfg4 atm_7l_1mqbmot atm_c8_1m800s6 atm_kz_fg65tv",L1="atm_9s_116y0ak atm_h_1h6ojuz atm_fg_v2br90 atm_cx_owgaek atm_l8_zedqrz atm_bx_l6f2xw atm_c8_ouk0ow atm_g3_5cyyty",z1="atm_5j_1i9d2r atm_26_yzuxxm atm_7l_1mqbmot",Jy="atm_9s_116y0ak atm_fg_v2br90 atm_jb_idpfg4 atm_j3_ing5cs atm_h_1h6ojuz atm_cx_owgaek atm_l8_ohusjj atm_3f_idpfg4 atm_bx_1kw7nm4 atm_c8_1m800s6 atm_cs_19dj2kj atm_g3_5cyyty atm_rd_glywfm atm_kz_fg65tv atm_1lzv4lt_tlke0l",ev="atm_5j_mrub5a atm_26_1j28jx2 atm_7l_1r1dq30 atm_1tgqd35_8o97w atm_pgg0nz_glywfm",tv="atm_jb_idpfg4 atm_kz_fg65tv",zM="atm_l8_1xwy84n atm_jj5qda_5z7wz8",MM="atm_67_xbw5ta atm_26_198lp58",DM="atm_9s_1txwivl atm_vy_1osqo2v atm_h_1h6ojuz atm_fc_1yb4nlp atm_cx_1aqtv8w",OM="atm_9s_116y0ak atm_h_1h6ojuz atm_cx_owgaek atm_jb_idpfg4 atm_c8_1m800s6 atm_cs_1d1fc98 atm_rd_glywfm atm_kz_fg65tv",qM="atm_7l_hq4ovn atm_pgg0nz_8stvzk atm_vbltw0_1xi6ry0",IM="atm_vy_1aqtv8w atm_e2_1aqtv8w atm_am_glywfm";function Os({title:e,children:t}){return y.jsxs("section",{className:W(xM),children:[y.jsx("h3",{children:e}),t]})}function Um({endpoint:e,onOpenElement:t,onOpenResource:n}){const r=W(Jy,ev),i=y.jsxs(y.Fragment,{children:[e.kind==="element"?y.jsx(yn,{type:e.elementType,family:e.typeFamily,title:e.elementType,size:"sm"}):y.jsx(yn,{type:e.kind,title:e.kind,size:"sm"}),y.jsx("span",{className:W(tv),children:e.label})]});return e.kind==="element"&&e.href?y.jsx("a",{className:r,href:e.href,title:e.id,onClick:o=>{o.preventDefault(),t(e.id)},children:i}):e.href?y.jsx("a",{className:r,href:e.href,title:e.id,onClick:o=>PM(o,e,n),...e.external?{target:"_blank",rel:"noreferrer"}:{},children:i}):y.jsx("span",{className:r,title:e.id,children:i})}function PM(e,t,n){t.external||!t.href||!n||(e.preventDefault(),n(t.href,$M(t,t.href)))}function $M(e,t){return{id:e.id,href:t,kind:e.kind,label:e.label}}function xT({title:e="Reused Contract Context",reused_contract_context:t,onOpenElement:n,onOpenResource:r}){return t.length===0?null:y.jsx(Os,{title:e,children:y.jsx("div",{className:W(R1),children:t.map(i=>y.jsx(BM,{reused_contract_context:i,onOpenElement:n,onOpenResource:r},i.id))})})}function BM({reused_contract_context:e,onOpenElement:t,onOpenResource:n}){return y.jsxs("div",{className:W(N1),children:[y.jsx("span",{className:W(L1,z1),children:e.kind}),y.jsx(Um,{endpoint:{id:e.targetId,label:e.label,kind:e.resourceKind??e.kind,elementType:e.elementType,typeFamily:e.typeFamily,href:e.href,external:e.external},onOpenElement:t,onOpenResource:n})]})}function nv({title:e="Concept references",references:t,onOpenConceptReference:n}){return t.length===0?null:y.jsx(Os,{title:e,children:y.jsx("div",{className:W(AM),children:t.map(r=>{const i=r.ontologyLabel??r.label,o=Yk(i)!==Yk(r.label);return y.jsxs("div",{className:W(RM,NM),children:[r.ontologyNodeId&&n?y.jsxs("button",{type:"button",className:W(Jy,ev),title:r.iri,onClick:()=>n(r),children:[y.jsx(yn,{type:"concept",family:"ontology",title:"concept",size:"sm"}),y.jsx("span",{className:W(tv),children:i})]}):y.jsxs("span",{className:W(Jy,ev),title:r.iri,children:[y.jsx(yn,{type:"concept-reference",family:"resource",title:"concept reference",size:"sm"}),y.jsx("span",{className:W(tv),children:i})]}),o?y.jsxs("span",{className:W(LM),children:["(",r.label,")"]}):null]},r.id)})})})}function Yk(e){return String(e??"").toLowerCase().replace(/[^a-z0-9]/g,"")}function wT({badges:e}){return e.length===0?null:y.jsx("div",{className:W(kM),children:e.map(({key:t,value:n,provenance:r})=>y.jsxs("span",{className:W(EM,SM),children:[y.jsx("span",{className:W(CM),children:t}),y.jsx("span",{className:W(TM),children:n}),y.jsxs("span",{className:W(jM),children:["(",r,")"]})]},`meta-${t}`))})}function kT({title:e="Relations",relations:t,onOpenElement:n,onOpenResource:r}){return t.length===0?null:y.jsx(Os,{title:e,children:y.jsx("div",{className:W(R1),children:t.map((i,o)=>y.jsxs("div",{className:W(N1),children:[y.jsx("span",{className:W(L1,z1),children:i.label}),y.jsx(Um,{endpoint:i.target,onOpenElement:n,onOpenResource:r})]},i.id??`${i.label}-${i.target.id}-${o}`))})})}const UM="atm_9s_11p5wf0 atm_dz_11ouabr atm_h_1q9ycp6 atm_cx_1xuivj5",GM="atm_9s_1bgihbq",FM="atm_7l_1mqbmot atm_c8_ouk0ow atm_cs_1d1fc98 atm_t9_angws6",HM="atm_jb_idpfg4 atm_7l_an4usv atm_c8_1m800s6 atm_g3_51xnb6",VM="atm_9s_1txwivl atm_jb_idpfg4 atm_be_1g80g66 atm_cx_owgaek",XM="atm_9s_116y0ak atm_h_1h6ojuz atm_j6_lafzln atm_5j_mrub5a atm_l8_o0ucy6 atm_26_ocqx2n atm_7l_an4usv atm_c8_1m800s6";function YM({metaBadges:e=[],definition:t,scheme:n,altLabels:r=[],scopeNote:i,examples:o=[],topConcepts:s=[],broader:u=[],narrower:c=[],related:f=[],exactMatches:h=[],closeMatches:m=[],mappedOntologyTerms:_=[],usedByModel:g=[],relations:b=[],reused_contract_context:E=[],conceptReferences:C=[],onOpenElement:w,onOpenConceptReference:T,onOpenResource:k}){return y.jsxs("div",{className:W(Jh),children:[y.jsx(wT,{badges:e}),y.jsxs("div",{className:W(Jh),children:[y.jsx(Os,{title:"Definition",children:t}),y.jsx(WM,{scheme:n,altLabels:r,scopeNote:i,examples:o,onOpenElement:w,onOpenResource:k}),y.jsx(ls,{title:"Top concepts",relationLabel:"top concept",endpoints:s,onOpenElement:w,onOpenResource:k}),y.jsx(ls,{title:"Broader concepts",relationLabel:"broader",endpoints:u,onOpenElement:w,onOpenResource:k}),y.jsx(ls,{title:"Narrower concepts",relationLabel:"narrower",endpoints:c,onOpenElement:w,onOpenResource:k}),y.jsx(ls,{title:"Related concepts",relationLabel:"related",endpoints:f,onOpenElement:w,onOpenResource:k}),y.jsx(ls,{title:"Exact matches",relationLabel:"exactMatch",endpoints:h,onOpenElement:w,onOpenResource:k}),y.jsx(ls,{title:"Close matches",relationLabel:"closeMatch",endpoints:m,onOpenElement:w,onOpenResource:k}),y.jsx(nv,{title:"Mapped ontology terms",references:_,onOpenConceptReference:T}),y.jsx(ls,{title:"Used by model",relationLabel:"references",endpoints:g,onOpenElement:w,onOpenResource:k}),y.jsx(kT,{title:"Authored relations",relations:b,onOpenElement:w,onOpenResource:k}),y.jsx(xT,{reused_contract_context:E,onOpenElement:w,onOpenResource:k}),y.jsx(nv,{references:C,onOpenConceptReference:T})]})]})}function WM({scheme:e,altLabels:t,scopeNote:n,examples:r,onOpenElement:i,onOpenResource:o}){return!e&&t.length===0&&!n&&r.length===0?null:y.jsx(Os,{title:"Concept properties",children:y.jsxs("div",{className:W(UM),children:[e?y.jsx(Ud,{label:"Scheme",children:y.jsx(Um,{endpoint:e,onOpenElement:i,onOpenResource:o})}):null,t.length>0?y.jsx(Ud,{label:"Alt labels",children:y.jsx(Wk,{values:t})}):null,n?y.jsx(Ud,{label:"Scope note",children:n}):null,r.length>0?y.jsx(Ud,{label:"Examples",children:y.jsx(Wk,{values:r})}):null]})})}function Ud({label:e,children:t}){return y.jsxs("div",{className:W(GM),children:[y.jsx("span",{className:W(FM),children:e}),y.jsx("span",{className:W(HM),children:t})]})}function Wk({values:e}){return y.jsx("span",{className:W(VM),children:e.map(t=>y.jsx("span",{className:W(XM),children:t},t))})}function ls({title:e,relationLabel:t,endpoints:n,onOpenElement:r,onOpenResource:i}){return n.length===0?null:y.jsx(Os,{title:e,children:y.jsx("div",{className:W(R1),children:n.map(o=>y.jsxs("div",{className:W(N1),children:[y.jsx("span",{className:W(L1,z1),children:t}),y.jsx(Um,{endpoint:o,onOpenElement:r,onOpenResource:i})]},`${t}-${o.id}`))})})}function KM({open:e,onOpenChange:t,title:n,typeFamily:r,elementType:i,showHeaderClose:o=!0,sourceHref:s,sourceLabel:u="Open source page",closeLabel:c="Close",backLabel:f="Back",onNavigateBack:h,onOpenSource:m,children:_}){return y.jsx(v1,{open:e,onOpenChange:t,children:y.jsxs(b1,{className:W(dM,hM),showCloseButton:!1,children:[y.jsx(Im,{className:W(mM,pM),children:y.jsxs("div",{className:W(yM),children:[h?y.jsx(Xl,{tone:"secondary",size:"sm",className:W(vM),"aria-label":f,title:f,onClick:h,children:y.jsx(et,{name:"chevron-left"})}):null,i?y.jsx(yr,{type:i,family:r,tinted:!0,dot:!1,children:i}):null,y.jsx(Pm,{children:n}),o?y.jsx(Yl,{asChild:!0,children:y.jsx(Xl,{tone:"ghost",className:W(bM),"aria-label":"Close",children:y.jsx(et,{name:"x"})})}):null]})}),y.jsx(Qh,{className:W(_M,gM),children:_}),s?y.jsx(x1,{className:W(zM,MM),children:y.jsxs("div",{className:W(DM),children:[y.jsxs("a",{href:s,className:W(OM,qM),onClick:g=>{m&&(g.preventDefault(),m(s))},children:[y.jsx(et,{name:"external-link",className:W(IM)})," ",u]}),y.jsx(Yl,{asChild:!0,children:y.jsx(Eo,{tone:"primary",size:"sm",children:c})})]})}):null]})})}function QM({metaBadges:e=[],content:t,relations:n=[],reused_contract_context:r=[],conceptReferences:i=[],onOpenElement:o,onOpenConceptReference:s,onOpenResource:u}){return y.jsxs("div",{className:W(Jh),children:[y.jsx(wT,{badges:e}),y.jsxs("div",{className:W(Jh),children:[y.jsx(Os,{title:"Content",children:t}),y.jsx(kT,{relations:n,onOpenElement:o,onOpenResource:u}),y.jsx(xT,{reused_contract_context:r,onOpenElement:o,onOpenResource:u}),y.jsx(nv,{references:i,onOpenConceptReference:s})]})]})}function ZM({identifier:e}){return y.jsxs("p",{className:W(wM),children:["No Project Store element matches ",y.jsx(Or,{children:e}),"."]})}const JM="atm_1wb223w_16vdio1 atm_q68q8s_4na889 atm_vww6vl_ktbqgd atm_1jc77wn_fbo0bp atm_9vskfe_1l4s3gx atm_i97n1m_1lfve6u atm_vy_1p9nis4 atm_j3_1p9nis4 atm_iy_9ull9o atm_1r3l6p7_1yi2ddt atm_15lheid_1yi2ddt atm_156wnpb_1sqy07v",eD="atm_3f_ag7trk atm_5j_19ma0su atm_26_198lp58 atm_7l_an4usv atm_70_dxqsf1",tD="atm_1hkc3dz_r4lf6c atm_11hxu0t_ukw8rw atm_vy_1n6gcyj atm_2p2na2_bldqeu",ET="atm_l8_119u37u atm_jj5qda_mp6wvn",ST="atm_40_xbw5ta atm_26_198lp58",Kk="atm_iy_1ed1odl atm_ks_1wugsn5 atm_l8_1h5vprv atm_156wnpb_r9ddfb atm_jj5qda_1aqtv8w",Qk="atm_26_1u3842e",Zk="atm_l8_1ru0ig4",nD="atm_9s_1txwivl atm_vy_1osqo2v atm_jb_idpfg4 atm_h_1h6ojuz atm_cx_1aqtv8w atm_lbduw3_ggq5uc atm_1rs6lid_idpfg4",rD="atm_am_12336oc",iD="atm_am_12336oc atm_gz_1wugsn5 atm_h0_1wa8fux atm_1pqnrs9_1aou828 atm_1dlbvfv_1aou828",aD="atm_9s_11p5wf0 atm_cx_tx1for atm_1t41yt8_idpfg4 atm_aemo9v_1r1dq30 atm_10jxl4n_dtbmau atm_1slhzjn_1d1fc98 atm_112yvym_idpfg4 atm_5q05o8_3szr2b",oD="atm_gi_idpfg4 atm_7l_1mqbmot atm_c8_1m800s6",CT="atm_7l_1mqbmot atm_c8_ouk0ow atm_g3_19ii325",sD="atm_l8_1xwy84n atm_jj5qda_5z7wz8",lD="atm_67_xbw5ta atm_26_198lp58",uD="atm_9s_1txwivl atm_vy_1osqo2v atm_h_1h6ojuz atm_fc_1yb4nlp atm_cx_1aqtv8w",cD="atm_9s_116y0ak atm_h_1h6ojuz atm_cx_owgaek atm_jb_idpfg4 atm_c8_1m800s6 atm_cs_1d1fc98 atm_rd_glywfm atm_kz_fg65tv",fD="atm_7l_hq4ovn atm_pgg0nz_8stvzk atm_vbltw0_1xi6ry0",dD="atm_vy_1aqtv8w atm_e2_1aqtv8w atm_am_glywfm",hD="atm_ks_15vqwwr",mD="atm_3f_xbw5ta atm_5j_1pr0uq2 atm_26_1u3842e",Gd="atm_9s_11p5wf0 atm_dz_162fmhv atm_cx_1aqtv8w atm_l8_zv440n atm_c8_1m800s6",Fd="atm_5rng3w_xbw5ta",Hd="atm_7l_1mqbmot atm_cs_19dj2kj",Vd="atm_jb_idpfg4 atm_kz_fg65tv",Xd="atm_7l_an4usv",pD="atm_9s_1txwivl atm_be_1g80g66 atm_cx_tx1for atm_gq_idpfg4",_D="atm_9s_1o8liyq atm_l8_1r3tyjr atm_gi_yaqoro atm_c8_1o6fbio atm_rd_glywfm",gD="atm_3f_xbw5ta atm_5j_mrub5a atm_26_yzuxxm atm_7l_an4usv atm_1tgqd35_8o97w",yD="atm_9s_116y0ak atm_j3_1osqo2v atm_h_1h6ojuz atm_cx_tx1for atm_l8_idpfg4 atm_9j_tlke0l atm_15eufem_idpfg4 atm_glyiex_fg65tv atm_x7uwtx_1e5hqsa atm_12tmyg6_4jg895 atm_1pqnrs9_1aou828 atm_1dlbvfv_1aou828 atm_yqcrq0_12336oc",vD="atm_3f_idpfg4 atm_5j_ab5uq2 atm_26_1j28jx2 atm_7l_an4usv atm_tej1as_1mqbmot atm_fuldz0_1r1dq30",bD="atm_9s_11p5wf0 atm_dz_i47zc9 atm_cx_1doep66 atm_h_v2br90",Jk="atm_9s_1txwivl atm_jb_idpfg4 atm_ar_1bp4okc atm_cx_1doep66",xD="atm_vy_1osqo2v",wD="atm_gi_idpfg4 atm_7l_an4usv atm_c8_1m800s6 atm_g3_1sx85p0",Gm="atm_9s_1txwivl atm_jb_idpfg4 atm_be_1g80g66 atm_h_1h6ojuz atm_cx_ek2tx5",kD="atm_9s_116y0ak atm_h_1h6ojuz atm_cx_owgaek atm_l8_1r3tyjr atm_c8_ouk0ow atm_cs_19dj2kj",ED="atm_3f_ag7trk atm_5j_1i9d2r atm_26_yzuxxm atm_7l_1uoma54",gs="atm_9s_11p5wf0 atm_cx_1wz40ms",Wl="atm_9s_11p5wf0 atm_jb_idpfg4 atm_cx_ynj908 atm_l8_1aqtv8w",Kl="atm_3f_xbw5ta atm_5j_ab5uq2 atm_26_yzuxxm",rv="atm_9s_1txwivl atm_h_1h6ojuz atm_cx_1wz40ms atm_be_1g80g66 atm_l8_vboibz",M1="atm_9s_1txwivl atm_jb_idpfg4 atm_h_1h6ojuz atm_fc_1yb4nlp atm_cx_1aqtv8w atm_vwm2pu_idpfg4 atm_rwqn34_1r1dq30 atm_15ff2r5_fg65tv",iv="atm_l8_1r3tyjr atm_bx_l6f2xw atm_c8_1o6fbio atm_cs_19dj2kj atm_fr_11be1h0 atm_g3_19ii325 atm_vv_1q9ccgz",av="atm_5j_mrub5a atm_26_yzuxxm atm_7l_1mqbmot",TT="atm_9s_116y0ak atm_h_1h6ojuz atm_cx_owgaek atm_l8_1r3tyjr atm_bx_l6f2xw atm_c8_ouk0ow atm_blassl_1mqbmot atm_au8vxp_1d0in48 atm_5vy2xq_19dj2kj",jT="atm_3f_xbw5ta atm_5j_1i9d2r atm_26_1u3842e atm_7l_1r1dq30",SD="atm_9s_116y0ak atm_jb_idpfg4 atm_h_1h6ojuz atm_cx_ynj908 atm_7l_1r1dq30 atm_cs_1d1fc98 atm_kz_fg65tv",CD="atm_9s_116y0ak atm_jb_1ym253d atm_e2_1doep66 atm_h_1h6ojuz atm_fc_1h6ojuz atm_bx_l6f2xw atm_c8_ouk0ow atm_cs_1d1fc98 atm_g3_kb7nvz",TD="atm_3f_ttpn82 atm_5j_1i9d2r atm_26_mz5b4w atm_7l_1r1dq30",jD="atm_9s_11p5wf0 atm_cx_1rgb3qj atm_gi_idpfg4",AD="atm_1fgasju_l6f2xw atm_dofr1p_ouk0ow",RD="atm_9s_11p5wf0 atm_dz_8dkps9 atm_cx_1wz40ms atm_h_1q9ycp6 atm_jb_idpfg4 atm_7l_an4usv atm_c8_1m800s6 atm_ytqxye_1mqbmot atm_5ttxvg_l6f2xw atm_1vuatxq_ouk0ow atm_bty7t0_1d1fc98 atm_ar39vb_14oeali atm_suz1ov_1qyhxd5 atm_cvz7ex_idpfg4 atm_uwqblm_idpfg4 atm_1jz47d3_fg65tv",ND="atm_9s_116y0ak atm_jb_idpfg4 atm_h_1h6ojuz atm_cx_owgaek atm_l8_1r3tyjr atm_c8_ouk0ow atm_cs_19dj2kj atm_kz_fg65tv atm_blassl_1mqbmot atm_au8vxp_1d0in48 atm_5vy2xq_19dj2kj",LD="atm_3f_xbw5ta atm_5j_1i9d2r atm_26_1u3842e atm_7l_1r1dq30",Yd="atm_3f_ag7trk atm_26_1u3842e atm_7l_1uoma54",zD="atm_4b_1l9gd27 atm_7l_wif9fk",MD="atm_4b_woiobm atm_7l_1vky53y",DD="atm_4b_1ikhubk atm_7l_192rwf5",OD="atm_9s_11p5wf0 atm_cx_tx1for atm_l8_1aqtv8w atm_rd_glywfm",qD="atm_3f_xbw5ta atm_5j_1pr0uq2 atm_26_yzuxxm atm_7l_an4usv atm_18vqbco_icygq7 atm_1tgqd35_8o97w",ID="atm_9s_1txwivl atm_jb_idpfg4 atm_h_1h6ojuz atm_cx_ek2tx5 atm_be_1g80g66",PD="atm_jb_idpfg4 atm_7l_1r1dq30 atm_cs_1d1fc98 atm_kz_fg65tv",$D="atm_7l_1uoma54 atm_c8_ouk0ow atm_kz_fg65tv",D1="atm_bx_l6f2xw atm_c8_w4wse3 atm_fr_11be1h0 atm_by_chl9tp";function BD({open:e,onOpenChange:t,children:n,contentClassName:r}){return y.jsx(v1,{open:e,onOpenChange:t,children:y.jsx(b1,{className:W(JM,eD,r),showCloseButton:!1,children:n})})}function UD({open:e,onOpenChange:t,node:n,nodes:r=[],missingNodeId:i=null,copiedUri:o,onCopyUri:s,onOpenSource:u}){var f,h;const c=((f=n==null?void 0:n.sources)==null?void 0:f.find(m=>m.link))??((h=n==null?void 0:n.sources)==null?void 0:h[0]);return y.jsx(BD,{open:e,onOpenChange:t,contentClassName:W(tD),children:n?y.jsxs(y.Fragment,{children:[y.jsx(YD,{node:n}),y.jsx(Qh,{className:W(Kk,Qk,Zk),children:y.jsx(GD,{node:n,nodes:r,copiedUri:o,onCopyUri:s,onOpenSource:u})}),y.jsx(x1,{className:W(sD,lD),children:y.jsxs("div",{className:W(uD),children:[c!=null&&c.link?y.jsxs("a",{href:c.link,className:W(cD,fD),onClick:m=>{m.preventDefault(),u(c)},children:[y.jsx(et,{name:"external-link",className:W(dD)})," Open ontology source"]}):y.jsx("span",{}),y.jsx(Yl,{asChild:!0,children:y.jsx(Eo,{tone:"primary",size:"sm",children:"Close"})})]})})]}):y.jsxs(y.Fragment,{children:[y.jsx(Im,{className:W(ET,ST),children:y.jsx(Pm,{children:"Ontology node not found"})}),y.jsx(Qh,{className:W(Kk,Qk,Zk),children:y.jsxs("p",{className:W(oD),children:["No exported ontology graph node matches ",y.jsx(Or,{children:i??""}),"."]})})]})})}function GD({node:e,nodes:t,copiedUri:n,onCopyUri:r,onOpenSource:i}){var o,s,u,c,f,h,m,_,g,b;return y.jsxs("div",{className:W(bD),children:[y.jsxs("section",{className:W(Jk,xD),"aria-label":"Ontology node summary",children:[y.jsx(FD,{node:e,copiedUri:n,onCopyUri:r}),e.comment?y.jsx(ma,{title:"Description",children:y.jsx("p",{className:W(wD),children:e.comment})}):null,(o=e.badges)!=null&&o.length?y.jsx(ma,{title:"Notation",children:y.jsx("div",{className:W(Gm),children:e.badges.map(E=>y.jsxs("span",{className:W(kD,ED),children:[y.jsx("span",{"aria-hidden":"true",children:E.symbol}),E.label]},`${E.kind}-${E.symbol}`))})}):null]}),y.jsxs("main",{className:W(Jk),children:[y.jsx(HD,{node:e,nodes:t}),Mh(e)&&((((s=e.domain)==null?void 0:s.length)??0)>0||(((u=e.range)==null?void 0:u.length)??0)>0)?y.jsx(ma,{title:"Domain / range",children:y.jsxs("div",{className:W(gs),children:[(c=e.domain)!=null&&c.length?y.jsx(tE,{kind:"domain",terms:e.domain}):null,(f=e.range)!=null&&f.length?y.jsx(tE,{kind:"range",terms:e.range}):null]})}):null,(h=e.slot_facets)!=null&&h.length?y.jsx(ma,{title:Mh(e)?"Used as slot / facets":"Slots / facets",children:y.jsx("div",{className:W(gs),children:e.slot_facets.map((E,C)=>y.jsx(WD,{slot:E,propertyContext:Mh(e)},`${E.slot_iri}-${E.source_shape_iri}-${C}`))})}):null,(m=e.constructs)!=null&&m.length?y.jsx(ma,{title:"Projection constructs",children:y.jsx(VD,{constructs:tO(e)})}):null,(_=e.literal_values)!=null&&_.length?y.jsx(ma,{title:"Literal values",children:y.jsx("div",{className:W(gs),children:e.literal_values.map((E,C)=>y.jsxs("div",{className:W(Wl,Kl,rv),children:[y.jsx("span",{className:W(iv,av),children:E.predicate||"value"}),y.jsx("strong",{children:E.value})]},`${E.predicate}-${C}`))})}):null,(g=e.constraints)!=null&&g.length?y.jsx(ma,{title:"Raw SHACL evidence",children:y.jsx("div",{className:W(gs),children:e.constraints.map(E=>y.jsxs("div",{className:W(Wl,Kl,rv),children:[y.jsx("span",{className:W(iv,av),children:E.property}),y.jsx(Or,{children:E.value})]},`${E.property}-${E.value}`))})}):null,(b=e.sources)!=null&&b.length?y.jsx(ma,{title:"Sources",children:y.jsx(XD,{sources:e.sources,onOpenSource:i})}):null]})]})}function FD({node:e,copiedUri:t,onCopyUri:n}){var s;const r=e.full_uri||e.id,i=Array.from(new Set([ov(e),...(s=e.rdf_types)!=null&&s.length?e.rdf_types:[e.type||ov(e)]].filter(Boolean).map(u=>String(u).toLowerCase()))),o=JD(e);return y.jsxs("div",{className:W(hD,mD),children:[y.jsxs("div",{className:W(Gd,Fd),children:[y.jsx("span",{className:W(Hd),children:"Origin"}),y.jsx("span",{className:W(Vd,Xd),children:o})]}),y.jsxs("div",{className:W(Gd,Fd),children:[y.jsx("span",{className:W(Hd),children:"RDF type"}),y.jsx("span",{className:W(Vd,Xd,pD),children:i.map(u=>y.jsx("span",{className:W(_D,gD),children:u},u))})]}),y.jsxs("div",{className:W(Gd,Fd),children:[y.jsx("span",{className:W(Hd),children:"Full URI"}),y.jsx("span",{className:W(Vd,Xd),children:y.jsxs("button",{type:"button",className:W(yD,vD),onClick:()=>n(r),title:"Copy URI",children:[y.jsx(Or,{children:r}),y.jsx(et,{name:t?"check":"copy"})]})})]}),e.ontology_document?y.jsxs("div",{className:W(Gd,Fd),children:[y.jsx("span",{className:W(Hd),children:"OWL document"}),y.jsx("span",{className:W(Vd,Xd),children:y.jsx(Or,{children:e.ontology_document})})]}):null]})}function HD({node:e,nodes:t}){const n=eO(e,t);return n.length?y.jsx(ma,{title:"Properties",children:y.jsx("div",{className:W(gs),children:n.map(r=>y.jsxs("div",{className:W(Wl,Kl),children:[y.jsxs("div",{className:W(M1),children:[y.jsx("strong",{className:W(D1),title:r.property.full_uri||r.property.id,children:r.property.label||Oc(r.property.id)}),y.jsx(yr,{type:r.property.semantic_type,family:"ontology",dot:!1,className:RT(r.property.semantic_type),children:nO(r.property.semantic_type)})]}),y.jsx(O1,{rows:[{key:"role",value:r.role},{key:"domain",value:y.jsx(eE,{terms:r.domains,emptyLabel:"Any"})},{key:"range",value:y.jsx(eE,{terms:r.ranges,emptyLabel:"Any"})}]}),r.facets.length?y.jsx("div",{className:W(Gm),children:r.facets.flatMap(i=>i.facets??[]).map((i,o)=>y.jsxs("span",{className:W(TT,jT),children:[y.jsx("span",{children:i.name}),i.value]},`${i.name}-${i.value}-${o}`))}):null]},`${r.property.id}-${r.role}`))})}):null}function VD({constructs:e}){return y.jsx("div",{className:W(gs),children:e.map(t=>y.jsx(KD,{construct:t},t.id))})}function XD({sources:e,onOpenSource:t}){return y.jsx("div",{className:W(gs),children:QD(e).map((n,r)=>y.jsx(ZD,{source:n,onOpenSource:t},`${n.link}-${r}`))})}function eE({terms:e,emptyLabel:t}){return e.length?y.jsx("span",{className:W(Gm),children:e.map(n=>y.jsx(em,{term:n},`${n.iri}-${n.kind}`))}):y.jsx("span",{className:W(CT),children:t})}function YD({node:e}){const t=ov(e);return y.jsx(Im,{className:W(ET,ST),children:y.jsxs("div",{className:W(nD),children:[y.jsx(yr,{type:"ontology",family:"ontology",tinted:!0,className:W(rD),children:"ontology"}),t!=="ontology"?y.jsx(yr,{type:t,family:"ontology",tinted:!0,children:t}):null,y.jsx(Pm,{children:e.label||e.id}),y.jsx(Yl,{asChild:!0,children:y.jsx(Xl,{tone:"ghost",className:W(iD),"aria-label":"Close",children:y.jsx(et,{name:"x"})})})]})})}function ma({title:e,children:t}){return y.jsxs("section",{className:W(aD),children:[y.jsx("h3",{children:e}),t]})}function tE({kind:e,terms:t}){return y.jsx(y.Fragment,{children:t.map(n=>y.jsxs("div",{className:W(Wl,Kl,rv),children:[y.jsx("span",{className:W(iv,av),children:e}),y.jsx(em,{term:n})]},`${e}-${n.iri}`))})}function WD({slot:e,propertyContext:t}){var i;const n=t?e.target_class_label||Oc(e.target_class_iri):e.slot_label||Oc(e.slot_iri)||"slot",r=[t?{key:"path",value:e.slot_label||Oc(e.slot_iri)}:e.target_class_label?{key:"applies to",value:y.jsx(em,{term:{label:e.target_class_label,iri:e.target_class_iri,kind:"class"}})}:null,e.source_shape_label?{key:"shape",value:y.jsx(em,{term:{label:e.source_shape_label,iri:e.source_shape_iri,kind:"node shape"}})}:null].filter(AT);return y.jsxs("div",{className:W(Wl,Kl),children:[y.jsx("div",{className:W(M1),children:y.jsx("strong",{className:W(D1),title:t?e.target_class_iri:e.slot_iri,children:n})}),r.length?y.jsx(O1,{rows:r}):null,(i=e.facets)!=null&&i.length?y.jsx("div",{className:W(Gm),children:e.facets.map(o=>y.jsxs("span",{className:W(TT,jT),children:[y.jsx("span",{children:o.name}),o.value]},`${o.name}-${o.value}`))}):y.jsx("span",{className:W(CT),children:"No explicit facets."})]})}function KD({construct:e}){var o,s,u;const t=e.label||e.kind||e.family||"construct",n=((o=e.badge)==null?void 0:o.symbol)||rO(e),r=((s=e.badge)==null?void 0:s.label)||t,i=[e.subject?{key:"subject",value:e.subject}:null,e.predicate?{key:"predicate",value:e.predicate}:null,e.property?{key:"property",value:e.property}:null,e.object?{key:"object",value:e.object}:null,(u=e.members)!=null&&u.length?{key:"members",value:e.members.join(" -> ")}:null,e.source?{key:"source",value:`${e.source.source_name||e.source.source||e.source.file_path}${e.source.line_number?`:${e.source.line_number}`:""}`}:null].filter(AT);return y.jsxs("div",{className:W(Wl,Kl),children:[y.jsxs("div",{className:W(M1),children:[y.jsxs("span",{className:W(SD),children:[n?y.jsx("span",{className:W(CD,TD),title:r,"aria-label":r,children:n}):null,y.jsx("span",{children:t})]}),y.jsx(yr,{type:e.kind||e.family,family:"ontology",dot:!1,className:RT(e.kind||e.family),children:e.kind||e.family})]}),i.length?y.jsx(O1,{rows:i,mono:!0}):null]})}function O1({rows:e,mono:t=!1}){return y.jsx("dl",{className:W(jD,t?AD:void 0),children:e.map(n=>y.jsxs("div",{className:W(RD),children:[y.jsx("dt",{children:n.key}),y.jsx("dd",{children:n.value})]},n.key))})}function AT(e){return e!==null}function QD(e){const t=new Map;for(const n of e){const r=`${n.file_path}:${n.line_number??""}`,i=t.get(r);(!i||!i.kind&&n.kind)&&t.set(r,n)}return[...t.values()]}function ZD({source:e,onOpenSource:t}){return y.jsxs("a",{className:W(OD,qD),href:e.link||"#",onClick:n=>{n.preventDefault(),t(e)},children:[y.jsxs("span",{className:W(ID),children:[y.jsx("span",{className:W(PD),children:e.source_name||e.source||e.file_path}),e.kind?y.jsx(yr,{type:"ontology",family:"ontology",tinted:!0,dot:!1,children:e.kind}):null]}),y.jsxs("span",{className:W($D,D1),children:[e.file_path,e.line_number?`:${e.line_number}`:""]})]})}function ov(e){return e.semantic_type||e.node_type||e.type||"resource"}function JD(e){return e.layer==="external-source"||e.source_kind==="external-ontology"?"External used subset":e.layer==="reqvire-context"||e.source_kind==="model-context"?"Generated semantic context":e.layer==="concepts"?"Concept layer":e.source_kind==="shape"?"Generated construct":"Authored ontology"}function Mh(e){var t,n;return String(e.semantic_type||"").endsWith("property")||!!((t=e.domain)!=null&&t.length)||!!((n=e.range)!=null&&n.length)}function eO(e,t){return t.filter(Mh).flatMap(n=>{const r=n.domain??[],i=n.range??[],o=r.some(c=>nE(c,e)),s=i.some(c=>nE(c,e));return!o&&!s?[]:[{property:n,role:o&&s?"domain/range":o?"domain":"range",domains:r,ranges:i,facets:o?(e.slot_facets??[]).filter(c=>c.slot_iri===n.id||c.slot_iri===n.full_uri):[]}]}).sort((n,r)=>(n.property.label||n.property.id).localeCompare(r.property.label||r.property.id)||n.role.localeCompare(r.role))}function nE(e,t){const n=new Set([t.id,t.full_uri,t.label].filter(Boolean));return n.has(e.iri)||n.has(e.label)}function em({term:e}){return y.jsxs("span",{className:W(ND,LD),title:e.iri||e.label,children:[e.label||Oc(e.iri),y.jsx("span",{children:e.kind||"term"})]})}function RT(e){const t=e??"";return t.includes("object")?W(Yd,zD):t.includes("datatype")?W(Yd,MD):t.includes("shape")?W(Yd,DD):W(Yd)}function tO(e){return(e.constructs??[]).filter(t=>e.semantic_type==="class-expression"?!["class-expression","property-domain","property-range"].includes(t.kind??""):!0)}function nO(e){return{"object-property":"object property","datatype-property":"datatype property","rdf-property":"RDF property",class:"class","named-individual":"individual","node-shape":"node shape","property-shape":"property shape",restriction:"restriction","class-expression":"class expression",datatype:"datatype",literal:"literal",resource:"resource"}[e??""]??e??"resource"}function rO(e){const t=e.kind||"",n=e.family||"";return t==="property-domain"||t==="property-range"||n==="property-domain-range"?"D/R":t==="subclass-inclusion"?"⊆":t==="membership"?"∈":t==="disjointness"?"⟂":t==="equivalence-group"?"⇔":t==="inverse-property"?"⟲":t==="property-chain"||n==="property-chain"?"∘":t==="property-characteristic"||n==="property-characteristic"?"→":t==="restriction"||n==="restriction"?"∀":t==="class-expression"||n==="class-expression"?"∩":t==="shape-overlay"||n==="shape-overlay"?"SH":""}function Oc(e){const t=e??"";return t.includes("#")?t.slice(t.lastIndexOf("#")+1):t.includes("/")?t.slice(t.lastIndexOf("/")+1):t}const iO="atm_9s_1txwivl atm_ar_1bp4okc atm_cx_1ru0ig4",rE="atm_9s_1txwivl atm_ar_1bp4okc atm_cx_1aqtv8w atm_1t41yt8_idpfg4 atm_aemo9v_1r1dq30 atm_10jxl4n_1ye8rbs atm_1slhzjn_1d1fc98 atm_1l593wz_idpfg4 atm_1mm667_1mqbmot atm_gon3un_1o6fbio atm_1kgx0or_1d1fc98 atm_1gu7kzg_1lzc1s3 atm_16n53n5_angws6",iE="atm_1h3bg4v_1h0h4qb atm_9s_11p5wf0 atm_dz_17o049t atm_cx_hwm9mu",Wd="atm_9s_1txwivl atm_ar_1bp4okc atm_cx_1rgb3qj atm_h3_ek2tx5",aO="atm_bw3q04_viql5b atm_9s_1txwivl atm_j6_thn2i5 atm_h_1h6ojuz atm_cx_ynj908 atm_5j_mrub5a atm_l8_4baac9",oO="atm_9s_116y0ak atm_vy_1q4684i atm_h_1h6ojuz atm_fc_1h6ojuz atm_am_glywfm",sO="atm_jb_idpfg4 atm_7l_an4usv atm_c8_1m800s6",lO="atm_9s_116y0ak atm_jb_1q4684i atm_h_1h6ojuz atm_fc_1h6ojuz atm_7l_hq4ovn atm_bx_l6f2xw atm_c8_ouk0ow atm_cs_1d1fc98",uO=[["capability","Capability"],["requirement","Requirement"],["behavior","Behavior"],["constraint","Constraint"],["verification-objective","Verification Objective"],["test-verification","Test Verification"],["formal-proof-verification","Formal Proof Verification"],["analysis-verification","Analysis Verification"],["inspection-verification","Inspection Verification"],["demonstration-verification","Demonstration Verification"],["specification","Specification"],["semantic-contract","Semantic Contract"],["ontology","Ontology"],["concept-scheme","Concept Scheme"],["concept","Concept"],["concept-reference","Concept Reference"],["evidence-file","Evidence File"]],cO=[["file","Files","--resource"],["element","Elements","--requirement"],["resource","Resources","--ontology"],["ontology","Ontology terms","--rdf-resource"]],fO=[["--rdf-class","Class"],["--rdf-concept","SKOS concept"],["--rdf-concept-scheme","SKOS concept scheme"],["--rdf-objprop","Object property"],["--rdf-dtprop","Datatype property"],["--rdf-individual","Individual"],["--rdf-datatype","Datatype"],["--rdf-restriction","Restriction"],["--rdf-classexpr","Class expression"],["--rdf-nodeshape","Node shape"],["--rdf-propshape","Property shape"],["--rdf-resource","Resource"]],dO=[["D/R","Domain/range"],["⊆","Subclass"],["∈","Membership"],["⟂","Disjoint"],["⇔","Equivalence"],["⟲","Inverse"],["∘","Property chain"],["∩","Class expression"],["SH","SHACL overlay"]];function hO(){return y.jsxs("div",{className:W(iO),"data-product-pattern":"help-content",children:[y.jsxs("section",{className:W(rE),children:[y.jsx("h3",{children:"Model Legend"}),y.jsxs("div",{className:W(iE),children:[y.jsxs("div",{children:[y.jsx("h4",{children:"Result kinds"}),y.jsx("div",{className:W(Wd),children:cO.map(([e,t,n])=>y.jsx(Kd,{marker:y.jsx(Zh,{colorToken:n}),label:t},e))})]}),y.jsxs("div",{children:[y.jsx("h4",{children:"Element types"}),y.jsx("div",{className:W(Wd),children:uO.map(([e,t])=>y.jsx(Kd,{marker:y.jsx(yn,{type:mO(e),size:"sm"}),label:y.jsx(yr,{type:pO(e),tinted:!0,children:t})},e))})]})]})]}),y.jsxs("section",{className:W(rE),children:[y.jsx("h3",{children:"Ontology Legend"}),y.jsxs("div",{className:W(iE),children:[y.jsxs("div",{children:[y.jsx("h4",{children:"Node types"}),y.jsx("div",{className:W(Wd),children:fO.map(([e,t])=>y.jsx(Kd,{marker:y.jsx(Zh,{colorToken:e}),label:t},t))})]}),y.jsxs("div",{children:[y.jsx("h4",{children:"Notation"}),y.jsx("div",{className:W(Wd),children:dO.map(([e,t])=>y.jsx(Kd,{marker:y.jsx("span",{className:W(lO),children:e}),label:t},t))})]})]})]})]})}function Kd({marker:e,label:t}){return y.jsxs("div",{className:W(aO),children:[y.jsx("span",{className:W(oO),children:e}),y.jsx("span",{className:W(sO),children:t})]})}function mO(e){return e==="evidence-file"?"other":e}function pO(e){return e==="evidence-file"?"other":e}const _O="atm_1elxmd0_16vdio1 atm_vy_1nw23wt atm_j3_1nw23wt",gO="atm_h_1h6ojuz atm_lbduw3_ggq5uc",yO="atm_am_ggq5uc";function vO({open:e,onOpenChange:t}){return y.jsx(v1,{open:e,onOpenChange:t,children:y.jsxs(b1,{className:W(_O),"aria-label":"Help","data-product-pattern":"help-dialog",children:[y.jsxs(Im,{className:W(gO),children:[y.jsx(Pm,{children:"Help"}),y.jsx(Yl,{asChild:!0,children:y.jsx(Xl,{tone:"ghost","aria-label":"Close help",children:y.jsx(et,{name:"x"})})})]}),y.jsx(Qh,{children:y.jsx(hO,{})}),y.jsxs(x1,{children:[y.jsx("span",{className:W(yO)}),y.jsx(Yl,{asChild:!0,children:y.jsx(Eo,{tone:"primary",children:"Close"})})]})]})})}const bO="atm_9s_1txwivl atm_j6_1kxcs5u atm_h_1y6m0gg atm_fc_1y6m0gg atm_l8_10y9mp3 atm_vkfxb1_1doep66",xO="atm_26_6lcubb",wO="atm_vt6g99_ukw8rw atm_9s_1txwivl atm_vy_13qg8og atm_ar_1bp4okc atm_cx_1doep66 atm_l8_1ru0ig4",kO="atm_26_hqzwp4 atm_3f_xbw5ta atm_5j_1pr0uq2 atm_70_1fjsgd1",EO="atm_9s_1txwivl atm_h_1h6ojuz atm_cx_ynj908",SO="atm_9s_116y0ak atm_vy_15fao4p atm_e2_15fao4p atm_am_12336oc atm_h_1h6ojuz atm_fc_1h6ojuz",CO="atm_26_1muz9yu atm_3f_moqrwa atm_5j_ab5uq2 atm_7l_1ox2th8",TO="atm_9s_1txwivl atm_ar_1bp4okc atm_cx_1xi6ry0 atm_jb_idpfg4",jO="atm_1nan1x6_idpfg4 atm_13kkh23_1r1dq30 atm_1ik9yws_asey3o atm_1d0k133_1d1fc98 atm_1r1uuzm_3szr2b atm_1cuh98_idpfg4 atm_103nyla_1mqbmot atm_3ozq8t_1m800s6 atm_hz7si0_ecmuoo",AO="atm_9s_1txwivl atm_h_1y6m0gg atm_cx_ek2tx5 atm_l8_lyk9k3 atm_c8_1m800s6 atm_g3_sqnntc atm_1pqnrs9_1aou828 atm_1dlbvfv_1aou828 atm_yqcrq0_glywfm",RO="atm_3f_moqrwa atm_5j_ab5uq2 atm_26_1muz9yu atm_7l_1r1dq30 atm_tej1as_1ox2th8",NO="atm_9s_1txwivl atm_ar_1bp4okc atm_cx_1wz40ms",LO="atm_1cuh98_idpfg4 atm_103nyla_1uoma54 atm_3ozq8t_1m800s6 atm_hz7si0_sqnntc",zO="atm_kz_fg65tv",MO="atm_7l_an4usv",DO="atm_9s_11p5wf0 atm_dz_13mtsfm atm_cx_ynj908 atm_1s5i1e6_hkllrs",Rg="atm_9s_1txwivl atm_jb_idpfg4 atm_ar_1bp4okc atm_cx_owgaek atm_l8_1aqtv8w",Ng="atm_26_1u3842e atm_3f_xbw5ta atm_5j_ab5uq2 atm_blassl_1mqbmot atm_au8vxp_ouk0ow atm_1i76or1_ecmuoo";function OO({reason:e,detail:t}){return y.jsx("div",{className:W(bO,xO),"data-product-pattern":"store-notice",children:y.jsxs("section",{className:W(wO,kO),"aria-labelledby":"store-notice-title",children:[y.jsxs("div",{className:W(EO),children:[y.jsx("span",{className:W(SO,CO),"aria-hidden":"true",children:y.jsx(et,{name:"alert-triangle"})}),y.jsxs("div",{className:W(TO,jO),children:[y.jsx("h1",{id:"store-notice-title",children:"Reqvire Explorer"}),y.jsx("p",{children:"Project Store seed is unavailable."})]})]}),y.jsxs("div",{className:W(AO,RO),role:"alert",children:[y.jsx(et,{name:"alert-triangle","aria-hidden":"true"}),y.jsx("span",{children:e})]}),y.jsxs("div",{className:W(NO,LO),children:[t?y.jsx("p",{className:W(zO,MO),children:t}):null,y.jsxs("p",{children:["Explorer expects a browser-local seed at ",y.jsx(Or,{children:"assets/project-store.js"}),". Use one of the supported entry points below so the seed and app bundle are served from the same output."]}),y.jsxs("div",{className:W(DO),"aria-label":"Supported Explorer entry points",children:[y.jsxs("div",{className:W(Rg,Ng),children:[y.jsx(Or,{children:"reqvire serve"}),y.jsx("span",{children:"Browse the live workspace Explorer."})]}),y.jsxs("div",{className:W(Rg,Ng),children:[y.jsx(Or,{children:"reqvire export"}),y.jsx("span",{children:"Open the generated Explorer output directory."})]}),y.jsxs("div",{className:W(Rg,Ng),children:[y.jsx(Or,{children:"npm run dev"}),y.jsxs("span",{children:["Run from ",y.jsx(Or,{children:"explorer/"})," for fixture-backed development."]})]})]})]})]})})}const qO="atm_1409lcl_1178luh atm_12fk315_13i4f3j atm_18coois_ghg70p atm_ly4pcj_ktbqgd atm_oyymjy_1gwvivf atm_m44u6z_163w7gr atm_136n87i_15e782c atm_14cublb_cae7k5 atm_1xbb1uv_1n1ank9 atm_9s_1txwivl atm_ar_1bp4okc atm_cx_1wz40ms atm_ks_ewfl5b atm_10w7pc2_1wugsn5",IO="atm_7l_an4usv",PO="atm_9s_1txwivl atm_j6_10y9mp3 atm_h_1h6ojuz atm_fc_1yb4nlp atm_cx_ynj908 atm_l8_1uaqrqd atm_1w0o1gr_1txwivl atm_4jrahp_17p0pw0 atm_ozcxmn_1h6ojuz atm_spgblm_esu3gu atm_1wuexhk_ek2tx5 atm_1tqomfg_1g80g66 atm_gapxdd_1txwivl atm_jobybm_idpfg4 atm_jxfu01_ggq5uc atm_1rew43f_1h6ojuz atm_19atimv_1xi6ry0 atm_lyevjl_15vqwwr atm_1bksikj_1m800s6 atm_a676de_116y0ak atm_17delu7_idpfg4 atm_ypxmp6_1h6ojuz atm_poyjxn_1xi6ry0 atm_1mfkxlz_1kfq4m4 atm_z40fje_15vqwwr atm_ha9fpz_idpfg4 atm_rgob7a_1j28jx2 atm_yy2na7_1l2sidv atm_1r41f9b_1q9ccgz atm_1kuqp5o_tlke0l atm_vcp44l_1o8liyq atm_h48yi1_jhz9wq atm_qg10oe_15vqwwr atm_8n2m6u_1l2sidv atm_kxbmhl_1q9ccgz atm_5ct0mx_1fhbwtr atm_5xse3x_1bp4okc atm_p85r4j_1osqo2v atm_zge04l_idpfg4",$O="atm_40_ag7trk atm_26_1u3842e atm_3ae88u_1mqbmot atm_1s21w70_an4usv atm_2re32h_8stvzk atm_1lvoshk_1r1dq30 atm_1lax2pj_19dj2kj atm_6crqs1_hieimq atm_je6jvp_1mqbmot atm_ap0rk4_ouk0ow atm_17g7u94_19ii325",BO="atm_j6_idpfg4 atm_ks_ewfl5b atm_70_glywfm atm_1h6teo0_idpfg4 atm_61o100_idpfg4 atm_1crxji5_1j28jx2 atm_16fc8ok_15o6nlx atm_11u7ayr_1mbzo3t atm_1uh4tmn_1mvar2t atm_31jcbr_1txwivl atm_emqiv2_1h6ojuz atm_392in2_owgaek atm_4v2xby_idpfg4 atm_fuo25m_1ipl8vf atm_1q5cyu3_15vqwwr atm_1gl3ksx_1l2sidv atm_iarrix_1q9ccgz",UO="atm_objg8j_1j28jx2 atm_qbr9uz_1j28jx2 atm_s87sft_1mvar2t atm_ztyt6v_1j28jx2 atm_1okwm0h_1j28jx2 atm_ce6d6_1mqbmot atm_pqxxe3_1j28jx2 atm_1eon1p2_1j28jx2 atm_icha4w_glywfm atm_1s7hsjh_glywfm",GO="atm_9s_11p5wf0 atm_dz_111aga5 atm_cx_1aqtv8w atm_zb6j4z_h2mmj6 atm_1cxkias_1txwivl atm_q88rlh_1bp4okc atm_15kua51_prv2mz atm_k4gsbs_ek2tx5 atm_kgv0fr_usvi9m atm_w5f1kf_1wz40ms atm_1y63ebc_tlke0l atm_ehgn7h_prv2mz atm_odnzhz_idpfg4 atm_1ra894s_idpfg4 atm_mm4rzq_1c8rstr atm_cevt1d_1d1fc98 atm_9h0gdk_stnw88 atm_1191cxx_ek2tx5 atm_10izak0_ek2tx5 atm_1mlizs7_cj1kg8 atm_1h2hoac_idpfg4 atm_lkbxp6_15vqwwr atm_11q52ew_fg65tv atm_1o8qkx8_ouk0ow atm_70l6pg_yv70g4 atm_17yjgzc_1e54zos atm_mtuc5y_cs5v99 atm_16azox1_116y0ak atm_69arei_1ns9ob4 atm_1imfr6m_1h6ojuz atm_1kp5lq4_1r3tyjr atm_13u4wd_ouk0ow atm_dvcf0s_1mvar2t atm_hhjaf3_cjiytx",FO="atm_the0h2_icygq7 atm_16dutti_mrub5a atm_16f07ak_hqzwp4 atm_1ocjpsg_1xzuvaq atm_74hmm4_icygq7 atm_ylladh_8o97w atm_1nsub7l_1xzuvaq atm_1u63k2_qg4tl7 atm_1d9pikh_icygq7 atm_ngta2y_1c05cp1 atm_55qmkk_1xzuvaq atm_b68ik3_glywfm atm_ae74bz_13i1o1w atm_1rrq15e_mrub5a atm_u71xy2_1j28jx2 atm_1e6ux83_1j28jx2 atm_yza11_1mqbmot atm_s8ghq0_1i9d2r atm_1624inj_yzuxxm atm_1ob0irv_1mqbmot",NT="atm_9s_1txwivl atm_vy_1osqo2v atm_jb_idpfg4 atm_h_1h6ojuz atm_cx_tx1for atm_73_usvi9m atm_l8_1wp4pgp atm_r3_1e5hqsa atm_rd_glywfm atm_c8_1m800s6 atm_cs_19dj2kj atm_9j_tlke0l",LT="atm_3f_e8f45q atm_5j_ab5uq2 atm_26_1j28jx2 atm_7l_an4usv atm_18vqbco_21k9f7 atm_1tgqd35_8o97w",HO="atm_jb_idpfg4 atm_am_ggq5uc atm_ks_15vqwwr atm_sq_1l2sidv atm_vv_1q9ccgz",aE="atm_vy_1aou828 atm_e2_1aou828 atm_am_12336oc",VO="atm_9s_116y0ak atm_am_12336oc atm_vy_1doep66 atm_e2_1doep66 atm_h_1h6ojuz atm_fc_1h6ojuz atm_rd_glywfm atm_k4_1k3teh atm_uc_8qpxcf atm_6tqpqf_1ulexfb atm_yqcrq0_12336oc atm_1pqnrs9_1wz40ms atm_1dlbvfv_1wz40ms",XO="atm_3f_idpfg4 atm_5j_suuzbj atm_26_1j28jx2 atm_7l_1mqbmot atm_lvd7fl_1j28jx2 atm_1sx18ul_1r1dq30 atm_oq6yql_kb7nvz atm_1c7dk87_glywfm atm_1yl5u20_13i1o1w",YO="atm_lo_1q4684i atm_fg95e3_1txwivl atm_dvczuh_1bp4okc atm_12hg4o7_1rgb3qj atm_rwhpkk_ynj908 atm_ukaons_11p5wf0 atm_1wr4vdk_111aga5 atm_c8x704_1wz40ms atm_1ug3pfy_1wz40ms atm_xmkqjw_11p5wf0 atm_107vfdn_1uta5my atm_1ajqhg1_v2br90 atm_pgrb9r_owgaek atm_4xa2uj_1jpay5e atm_yx8lfu_usvi9m atm_17dtgbh_ynj908 atm_1imkvq0_1e5hqsa atm_1936j9i_tlke0l atm_164xeqo_1icw8ht atm_13f6ikb_11p5wf0 atm_dlv1a_idpfg4 atm_1dor7qc_iqvn5y atm_1ux9l8q_cj1kg8 atm_lcm3dc_15vqwwr atm_qupje0_1m800s6 atm_11m76l_19dj2kj atm_ys46a1_nqt0r7 atm_vwxabi_1e54zos atm_oa74c_cs5v99 atm_ca6cu_1txwivl atm_1ucf1pa_1osqo2v atm_o1kp2l_idpfg4 atm_od4313_1h6ojuz atm_fecyja_tx1for atm_yb5waq_usvi9m atm_1qf0d83_tvxayk atm_f6yxng_1e5hqsa",WO="atm_67_ag7trk atm_9topbb_ag7trk atm_jsvd99_mrub5a atm_l0suuk_1u3842e atm_mvqa3k_an4usv atm_3uwwjf_icygq7 atm_nv14rc_8o97w atm_1k8dd43_qg4tl7 atm_lnhq0k_an4usv atm_l6spuk_e8f45q atm_pprzhr_ab5uq2 atm_1k17b3i_1j28jx2 atm_vto6yi_an4usv atm_119l662_1j28jx2 atm_1nx8fwe_8o97w atm_1kbjo1t_1j28jx2 atm_10ea4em_1c05cp1 atm_1h3j8co_an4usv",KO="atm_c8_1m800s6 atm_cd_1m30gqx atm_g3_5cyyty",QO="atm_7l_1mqbmot",ZO="atm_c8_1m800s6",JO="atm_7l_1mqbmot",eq="atm_l8_bqp6sg atm_c8_ouk0ow",tq="atm_5j_suuzbj atm_26_yzuxxm";function nq({children:e,className:t="",...n}){return y.jsx(Ao,{layout:"single",children:y.jsx(Cs,{children:y.jsx("div",{"data-product-pattern":"file-browser",className:W("ux-file-browser",qO,IO,t),...n,children:e})})})}function rq({breadcrumbs:e,selectedFile:t,layout:n,resultCount:r,showResultCount:i=!0,onOpenFolder:o,onLayoutChange:s}){return y.jsxs("div",{className:W("ux-file-browser__toolbar",PO,$O),children:[y.jsxs("div",{className:"ux-file-browser__breadcrumbs","aria-label":"File breadcrumbs",children:[e.map((u,c)=>y.jsxs("span",{className:"ux-file-browser__crumb",children:[c>0&&y.jsx("span",{className:"ux-file-browser__crumb-separator",children:"/"}),y.jsx("button",{type:"button",onClick:()=>o(u.path),children:u.label})]},u.path)),t?y.jsxs("span",{className:W("ux-file-browser__crumb","ux-file-browser__crumb-current"),children:[y.jsx("span",{className:"ux-file-browser__crumb-separator",children:"/"}),y.jsx("span",{title:t.title,children:t.name})]}):null]}),y.jsxs("div",{className:"ux-file-browser__toolbar-actions",children:[i?y.jsxs("span",{className:"ux-file-browser__count",children:[r," items"]}):null,y.jsx(pT,{ariaLabel:"Model layout",value:n,onChange:s,items:[{value:"list",label:"List",icon:y.jsx(et,{name:"list"})},{value:"grid",label:"Grid",icon:y.jsx(et,{name:"layout-grid"})},{value:"graph",label:"Graph",icon:y.jsx(et,{name:"git-branch"})}]})]})]})}function iq({path:e}){return y.jsxs("span",{className:W("ux-file-browser__missing",ZO,JO),children:["No file container for"," ",y.jsx("code",{className:W("ux-file-browser__missing-path",eq,tq),children:e}),"."]})}function aq({items:e,sortKey:t,sortDirection:n,onSort:r,onOpenFolder:i,onOpenFile:o}){return y.jsxs(l5,{className:W("ux-file-browser__table",BO,UO),children:[y.jsxs(u5,{children:[y.jsx(c5,{children:y.jsxs(Uk,{children:[y.jsx(Qd,{label:"Name",sortKey:"name",activeKey:t,direction:n,onSort:r}),y.jsx(Qd,{label:"Type",sortKey:"type",activeKey:t,direction:n,onSort:r}),y.jsx(Qd,{label:"Elements",sortKey:"elements",activeKey:t,direction:n,onSort:r}),y.jsx(Qd,{label:"Path",sortKey:"path",activeKey:t,direction:n,onSort:r})]})}),y.jsx(f5,{children:e.map(s=>y.jsxs(Uk,{selected:!!s.selected,children:[y.jsx($d,{children:y.jsxs("div",{className:"ux-file-browser__name-cell",children:[y.jsx(dq,{item:s,onOpenFolder:i,onOpenFile:o}),y.jsx(uq,{item:s})]})}),y.jsx($d,{children:y.jsx(yr,{type:s.kind,family:s.kind,children:s.kind})}),y.jsx($d,{children:s.elementCount}),y.jsx($d,{className:"ux-file-browser__path",children:s.displayPath})]},s.id))})]}),e.length===0?y.jsx(q1,{children:"No files or folders match the current filter."}):null]})}function oq({items:e,onOpenFolder:t,onOpenFile:n}){return y.jsxs("div",{className:W("ux-file-browser__grid",GO,FO),children:[e.map(r=>y.jsxs(qm,{interactive:!0,selected:!!r.selected,role:"button",tabIndex:0,"aria-label":`Open ${r.name}`,onClick:()=>zT(r,t,n),onKeyDown:i=>cq(i,r,t,n),className:W("ux-file-browser__card",r.selected?"is-selected":"",r.emptyFile?"is-empty-file":""),children:[y.jsx(fq,{item:r,selected:!!r.selected}),(r.kind==="folder"||r.elementCount>0)&&y.jsx("span",{className:"ux-file-browser__count-badge",children:r.kind==="folder"?`${r.childCount} children`:`${r.elementCount} elements`}),y.jsx("span",{className:"ux-file-browser__card-path",children:r.displayPath})]},r.id)),e.length===0?y.jsx(q1,{children:"No files or folders match the current filter."}):null]})}function Lg({children:e}){return y.jsx("div",{className:W("ux-file-browser__elements",YO,WO),children:e})}function sq({layout:e,children:t}){return y.jsx("div",{className:e==="grid"?"ux-file-browser__elements-grid":"ux-file-browser__elements-list",children:t})}function lq({layout:e,name:t,type:n,family:r,onOpen:i}){return e==="grid"?y.jsxs("button",{type:"button",onClick:i,className:"ux-file-browser__element-card",children:[n?y.jsx(yn,{type:n,family:r,title:n,size:"sm"}):y.jsx(yn,{type:"other",size:"sm"}),y.jsxs("span",{className:"ux-file-browser__element-card-main",children:[y.jsx("span",{className:"ux-file-browser__element-card-title",children:t}),n?y.jsx(yr,{type:n,family:r,tinted:!0,dot:!1,children:n}):null]})]}):y.jsxs("button",{type:"button",onClick:i,className:"ux-file-browser__element-row",children:[n?y.jsx(yn,{type:n,family:r,title:n,size:"sm"}):y.jsx(yn,{type:"other",size:"sm"}),y.jsx("span",{children:t})]})}function q1({children:e}){return y.jsx("span",{className:W("ux-file-browser__empty",KO,QO),children:e})}function Qd({label:e,sortKey:t,activeKey:n,direction:r,onSort:i}){const o=t===n;return y.jsx(d5,{children:y.jsx(h5,{direction:o?r:void 0,onClick:()=>i(t),children:e})})}function uq({item:e}){return e.contentHref?y.jsx("a",{href:e.contentHref,className:W("ux-file-browser__open-link",VO,XO),"aria-label":`Open content for ${e.name}`,title:"Open content",onClick:t=>t.stopPropagation(),children:y.jsx(et,{name:"external-link"})}):null}function zT(e,t,n){if(e.kind==="folder"){t(e.path);return}if(n){n(e.path);return}e.href&&(window.location.hash=e.href.startsWith("#")?e.href.slice(1):e.href)}function cq(e,t,n,r){e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),zT(t,n,r))}function fq({item:e,selected:t=!1}){return y.jsx("span",{className:W("ux-file-browser__item-action",NT,LT,t?"is-selected":""),children:y.jsx(Dh,{item:e})})}function Dh({item:e}){return y.jsxs(y.Fragment,{children:[e.kind==="folder"?y.jsx(et,{name:"folder",className:W("ux-file-browser__kind-folder","ux-file-browser__item-icon",aE)}):y.jsx(et,{name:"file",className:W("ux-file-browser__kind-file","ux-file-browser__item-icon",aE)}),y.jsx("span",{className:W("ux-file-browser__item-name",HO),children:e.name})]})}function dq({item:e,onOpenFolder:t,onOpenFile:n}){const r=W("ux-file-browser__item-action",NT,LT,e.selected?"is-selected":"");return e.kind==="folder"?y.jsx("button",{type:"button",className:r,onClick:()=>t(e.path),children:y.jsx(Dh,{item:e})}):n?y.jsx("button",{type:"button",className:r,onClick:()=>n(e.path),children:y.jsx(Dh,{item:e})}):y.jsx("a",{href:e.href,className:r,children:y.jsx(Dh,{item:e})})}const hq="atm_1q8xg06_mgvxuy atm_hdcxl8_1lk486g atm_rljqdg_c3hh1s atm_mk_h2mmj6 atm_73_usvi9m atm_9s_1txwivl atm_jb_idpfg4 atm_j6_idpfg4 atm_e2_1osqo2v atm_ar_1bp4okc atm_cx_ek2tx5 atm_ks_15vqwwr atm_l8_99d5r0 atm_gj7w2h_1osqo2v atm_1pwlzco_idpfg4 atm_vl5521_15vqwwr atm_1d2fdry_ggq5uc atm_16zsy4r_idpfg4 atm_kokri7_15vqwwr atm_tiywpm_1wugsn5 atm_1bwiiej_1f51e7f atm_1ig85du_1osqo2v atm_8p2dsw_1txwivl atm_ln70qs_1bp4okc atm_oacpwr_hwm9mu atm_crcvbx_1q4684i atm_vpzxga_idpfg4 atm_178a0l7_1txwivl atm_1712n68_1q9ycp6 atm_kjcj5i_1yb4nlp atm_r77gii_ynj908 atm_1a4g2q7_ynj908 atm_1umtxve_idpfg4 atm_191z6mp_1ye8rbs atm_1k4im0a_1d1fc98 atm_jrvx99_idpfg4 atm_5s3vbh_12336oc atm_gmfhu2_1i9d2r atm_1q6hsq2_ouk0ow atm_1hh1u0c_1d1fc98 atm_1gdg67q_kb7nvz atm_1nlwyui_4baac9 atm_7x1wu3_116y0ak atm_1jixwg2_1h6ojuz atm_6mt1wi_1r3tyjr atm_17icxyf_1txwivl atm_enxzda_1bp4okc atm_1spm4pk_1rgb3qj atm_1146qoq_1txwivl atm_17zyv1g_1bp4okc atm_1uyymi1_ek2tx5 atm_1se5une_e8f45q atm_136zcdn_bz7yrd atm_1kot9l8_1or503 atm_1n9y5pn_121jvl4 atm_1ujdvze_1txwivl atm_11z4bu0_1h6ojuz atm_14ktms4_1yb4nlp atm_wa50bs_ynj908 atm_1k8tltr_1g80g66 atm_1bzor0w_idpfg4 atm_18bwwxb_1j28jx2 atm_i3myot_idpfg4 atm_17gl2km_tlke0l atm_jbxllk_dtbmau atm_i5zijf_1d1fc98 atm_10v7upl_1e5hqsa atm_nj23ex_11p5wf0 atm_1uvksyq_1jihsl0 atm_10kru7m_6skkmd atm_1qxyk79_idpfg4 atm_167gtp0_ouk0ow atm_1rnov2u_1txwivl atm_15f197_owgaek atm_avv5ki_idpfg4 atm_lq6l50_h2mmj6 atm_1x3eobk_usvi9m atm_zsr9xs_1txwivl atm_1xhi513_12nyi53 atm_181s2ry_idpfg4 atm_zast95_1dz14ax atm_108fved_1bp4okc atm_sywji8_15vqwwr atm_1raka4r_ynj908 atm_xga8dq_ggq5uc atm_e2h0o0_1osqo2v atm_943p74_idpfg4 atm_pr5w0h_1osqo2v atm_19u9hx3_1osqo2v atm_hela37_1h6ojuz atm_1ddsoy2_1osqo2v atm_191cxy_tlke0l atm_1wapavw_11p5wf0 atm_m8snuy_ggq5uc atm_hwvsey_idpfg4 atm_sl6b7z_1osqo2v atm_1xzrq0k_1h6ojuz atm_syxash_1m800s6",mq="atm_26_1u3842e atm_1f2r046_1mqbmot atm_f58jc_1c8rstr atm_1id7hw7_19ii325 atm_2dpulf_xbw5ta atm_1kxemwq_1j28jx2 atm_k7vb92_idpfg4 atm_uzc1t3_an4usv atm_grvm7u_yzuxxm atm_13qs6u4_1uoma54 atm_1cqqrzp_1c05cp1 atm_1ja6jlp_hq4ovn atm_ub3h3h_xbw5ta atm_245cth_ab5uq2 atm_1hmhxe7_1j28jx2 atm_1fcarla_8o97w atm_1p01mjt_1c05cp1 atm_zplw0w_1j28jx2 atm_19hi0fu_idpfg4 atm_13s6n31_hq4ovn atm_16h43s5_8stvzk atm_zkbpmh_1xi6ry0 atm_1rxjohq_1mvar2t atm_1r3dwn_1mqbmot atm_gutxq0_xbw5ta atm_14a8y5_1pr0uq2 atm_x05zcl_1u3842e atm_wyjofn_1u3842e atm_o9n30z_1y8q9jh atm_14s26yd_ab5uq2 atm_onh5xk_1mqbmot",pq="atm_mk_h2mmj6 atm_73_usvi9m atm_9s_1txwivl atm_jb_idpfg4 atm_j6_idpfg4 atm_ar_1bp4okc atm_cx_1doep66 atm_ks_1wugsn5 atm_e2_1osqo2v atm_l8_1ru0ig4 atm_16qzf8f_1osqo2v atm_16hgatw_idpfg4 atm_s79kuu_1txwivl atm_upxcn5_1doep66 atm_gdhxk3_1y6m0gg atm_1gw68b9_1yb4nlp atm_19zys37_1q4684i atm_1o1490g_1q4684i atm_12w3iva_1a670m8 atm_1akiuan_1txwivl atm_179ec1s_idpfg4 atm_oysjh3_1bp4okc atm_vt7ri4_owgaek atm_1pmj39d_idpfg4 atm_1ynvq5u_1heflvk atm_1jbna7v_1d1fc98 atm_1fuwg7c_3szr2b atm_1wrptf8_1o6fbio atm_zeitw0_1d1fc98 atm_b68n1g_1lzc1s3 atm_pxi6mh_3szr2b atm_1sflsux_angws6 atm_11zeveu_11p5wf0 atm_1egq5ur_1aqtv8w atm_12qq0ll_orlc2p atm_11rbfa3_9syeg7 atm_mobo38_35s0z1 atm_1cwepcp_1txwivl atm_1d4m930_1doep66 atm_1itxlmi_1bp4okc atm_1u52t5b_1aqtv8w atm_nnt8qk_1q4684i atm_1021zs7_ipugus atm_1dt0a2k_1txwivl atm_viqq1n_1h6ojuz atm_1l8bud5_ek2tx5 atm_1dlzf6p_1q9ycp6 atm_62ifaf_1yb4nlp atm_j5ej13_ynj908 atm_7ro9xd_idpfg4 atm_1qs8ag5_1d1fc98 atm_ixaya7_3szr2b atm_14ldwhn_1ye8rbs atm_1m8wmlw_1txwivl atm_1bedh_1h6ojuz atm_1rkpgw4_1aqtv8w atm_hwhfb5_1aqtv8w atm_518ovi_idpfg4 atm_1pgst7o_11p5wf0 atm_1qnatoq_glywfm atm_1edqfx8_1h6ojuz atm_1ondaw6_1i9d2r atm_l9q13j_de01jl atm_1v8gbg3_de01jl atm_dp66q1_b3btdj atm_1icia4i_1ekttcd atm_1pj69eo_1kw7nm4 atm_1y5i79y_3t9i6g atm_1wa9i89_3t9i6g atm_1v33xk1_12env5p atm_meyyhk_12env5p atm_1du1qrb_feh88b atm_mff19y_1ekttcd atm_bjgdx5_1m800s6 atm_iq2317_1mvar2t atm_4euwiz_1txwivl atm_12oa4bx_1bp4okc atm_opqhw8_idpfg4 atm_luidp9_iqvn5y atm_1r3jliy_1m800s6 atm_1wsbm6b_1d1fc98 atm_s3n0ke_ouk0ow atm_z1a9nm_sqnntc atm_1pbrxmw_11p5wf0 atm_1uaiyso_i47zc9 atm_1am7wvd_1h6ojuz atm_1d4s3u6_1aqtv8w atm_15casas_1gl9ivt atm_1dn4dbq_x3in9x atm_13z6vhf_x3in9x atm_e39zeq_1txwivl atm_aa6s3r_1bp4okc atm_twdnhp_1rgb3qj atm_bkdipt_1yb4nlp atm_11c42oo_glywfm atm_1sqk8mt_idpfg4 atm_dcbzgo_ggq5uc atm_1pjel7k_15vqwwr atm_zbhidq_1l2sidv atm_1u6no5y_1q9ccgz atm_1pq8s0p_owgaek atm_9wp5r4_1ulexfb atm_16u8h9v_15vqwwr atm_1vo6wh6_1osqo2v atm_19op2yv_owgaek atm_13vcubm_1i9d2r atm_21zyc_1ulexfb atm_kqm3e2_1osqo2v atm_2ka0ol_1osqo2v atm_xfcryy_1kw7nm4 atm_pvelsu_1osqo2v atm_nk502j_idpfg4 atm_1gd0hjo_tlke0l atm_4zail9_1kw7nm4 atm_1c5ktrb_1e5hqsa atm_6bg4ex_11p5wf0 atm_8d8153_1vz9f6i atm_4qgwrm_1h6ojuz atm_da8jr_1aqtv8w atm_1nrzrdi_ynj908 atm_1ystriz_idpfg4 atm_uub5vx_1d1fc98 atm_ec89ii_11p5wf0 atm_19hlx6l_9syeg7 atm_wuq7hb_1aqtv8w atm_grk4v7_glywfm atm_1ttxwh2_1i9d2r atm_1j664iy_1r3tyjr atm_17y3nrm_ouk0ow atm_t8d10r_1d1fc98 atm_u7w9n9_3szr2b atm_scp2in_1y6m0gg atm_vetada_idpfg4 atm_9uxpd1_tlke0l atm_dc1ljm_1kw7nm4 atm_16lw4cz_ynj908 atm_mucqsn_idpfg4 atm_cy5ikl_1m800s6 atm_x5u14r_1txwivl atm_1c2v2rd_1h6ojuz atm_1ppupa5_ynj908 atm_msuz6q_ek2tx5 atm_2ssp3k_1xi6ry0 atm_btykul_15vqwwr atm_rjrptx_1d1fc98 atm_10jrzv9_1l2sidv atm_2xjbx4_1q9ccgz atm_qc31b9_1txwivl atm_g1s8rr_1y6m0gg atm_1a4spmv_1aqtv8w atm_1wericl_1doep66 atm_139r6rf_14k5dlv atm_18tkw4i_14k5dlv atm_oskx72_glywfm atm_j27hkz_vdehge atm_1fhsp6w_1ye8rbs atm_xyqn0_1d1fc98 atm_tryaef_idpfg4 atm_14kz0dd_i47zc9",_q="atm_26_1u3842e atm_aj4994_xbw5ta atm_1i2zhfk_1pr0uq2 atm_1nvper2_e8f45q atm_1cgq0r1_bz7yrd atm_14dg8oy_1r1dq30 atm_r8gpnb_yzuxxm atm_1sh3kzc_1mqbmot atm_765tg8_xbw5ta atm_bavcqc_1pr0uq2 atm_v4ergx_1u3842e atm_12wa4pc_1xzuvaq atm_1ibfenb_1u3842e atm_2ydke1_1mqbmot atm_1kupvtt_1j28jx2 atm_2w8gs5_an4usv atm_4vcras_ab5uq2 atm_csbkfg_8o97w atm_nikrrs_1uoma54 atm_1vcrccz_8o97w atm_1urjais_1r1dq30 atm_h606t2_9snglw atm_197gpb0_1xi6ry0 atm_1pamdo0_ab5uq2 atm_6y9qdl_1mqbmot";function MT({children:e,className:t="",...n}){return y.jsx(Ao,{className:W("ux-report-route",t),layout:"single",...n,children:e})}function gq({children:e,className:t="",...n}){return y.jsx(Cs,{"data-panel":"main",className:W("ux-report-trace-panel","trace-main-panel",hq,mq,t),...n,children:e})}function yq({children:e,className:t="",...n}){return y.jsx("div",{className:W("trace-content-scroll",t),...n,children:e})}const oE=K.forwardRef(function({children:t,className:n="",...r},i){return y.jsx("div",{ref:i,className:W("trace-report-view",n),...r,children:t})});function vq({children:e,className:t="",...n}){return y.jsx("section",{className:W("trace-row-group",t),...n,children:e})}function bq({file:e,countLabel:t}){return y.jsxs("div",{className:"trace-file-header",children:[y.jsx("h2",{className:"trace-file-heading",children:e}),y.jsx("span",{className:"trace-file-count",children:t})]})}function xq({children:e}){return y.jsx("div",{className:"trace-verification-list",children:e})}function wq({selected:e=!1,children:t,className:n="",...r}){return y.jsx("article",{className:W("trace-verification-card",e?"is-selected":void 0,n),...r,children:t})}function kq({children:e}){return y.jsx("div",{className:"trace-verification-header",children:e})}function Eq({children:e,className:t="",...n}){return y.jsx("button",{type:"button",className:W("trace-verification-title",t),...n,children:e})}function Sq({children:e}){return y.jsx("span",{className:"trace-tree-count-badge",children:e})}function Cq({rows:e}){return y.jsx("dl",{className:"trace-verification-meta",children:e.map((t,n)=>y.jsxs("div",{children:[y.jsx("dt",{children:t.label}),y.jsx("dd",{children:t.value})]},n))})}const Tq=K.forwardRef(function({children:t,className:n="",...r},i){return y.jsx("div",{ref:i,className:W("trace-rollup-diagram",n),...r,children:t})});function jq({children:e}){return y.jsx("div",{className:"trace-rollup-placeholder",children:e})}function Aq({children:e}){return y.jsx("span",{className:"empty-note",children:e})}function Rq({children:e,className:t="",...n}){return y.jsx(Cs,{"data-panel":"document",className:W("ux-report-coverage-dashboard","coverage-dashboard",pq,_q,t),...n,children:e})}function Nq({id:e,title:t,eyebrow:n}){return y.jsx("header",{id:e,className:"coverage-header",children:y.jsxs("div",{className:"coverage-title-block",children:[y.jsx("span",{className:"coverage-eyebrow",children:n}),y.jsx("h1",{children:t})]})})}function Lq({title:e,children:t}){return y.jsxs("div",{className:"coverage-empty",children:[y.jsx(et,{name:"pie-chart"}),y.jsxs("div",{children:[y.jsx("h2",{children:e}),y.jsx("p",{children:t})]})]})}function zq({children:e}){return y.jsx("section",{className:"coverage-kpi-grid","aria-label":"Coverage summary",children:e})}function Mq({children:e}){return y.jsx("section",{className:"coverage-grid","aria-label":"Coverage breakdown",children:e})}function Dq({children:e}){return y.jsx("section",{className:"coverage-gap-grid","aria-label":"Coverage gaps",children:e})}function Oq({label:e,detail:t,shown:n,ringPercent:r,token:i}){return y.jsxs("div",{className:"coverage-kpi",children:[y.jsx(qq,{percent:r,token:i,children:n}),y.jsxs("div",{className:"coverage-kpi__copy",children:[y.jsx("span",{className:"coverage-kpi__label",children:e}),y.jsx("span",{className:"coverage-kpi__detail",children:t})]})]})}function qq({percent:e,token:t,children:n}){return y.jsx(R6,{className:"coverage-donut",percent:e,colorToken:t,"aria-hidden":"true",children:y.jsx("span",{className:"coverage-donut__center",children:n})})}function zg({title:e,span:t="default",className:n="",children:r,...i}){return y.jsxs("section",{className:W("coverage-panel",t==="wide"?"coverage-panel--wide":void 0,n),...i,children:[y.jsx("header",{className:"coverage-panel__head",children:y.jsx("h2",{children:e})}),r]})}function Iq({pie:e,children:t}){return y.jsxs("div",{className:"coverage-breakdown","data-has-pie":e?"true":void 0,children:[e,y.jsx("div",{className:"coverage-breakdown__legend",children:t})]})}function Pq({label:e,value:t,type:n}){return y.jsxs("div",{className:"coverage-legend-row",children:[y.jsx(yn,{className:"coverage-legend-row__icon",type:n,size:"sm"}),y.jsx("span",{children:e}),y.jsx("strong",{children:t})]})}function $q({children:e}){return y.jsx("div",{className:"coverage-bar-list",children:e})}function Bq({label:e,value:t,children:n}){return y.jsxs("div",{className:"coverage-source-row",children:[y.jsxs("div",{className:"coverage-source-row__head",children:[y.jsx("span",{children:e}),y.jsx("span",{children:t})]}),n]})}function Uq({children:e}){return y.jsx("div",{className:"coverage-capability-list",children:e})}function Gq({name:e,mark:t,children:n,className:r="",...i}){return y.jsxs("button",{type:"button",className:W("coverage-capability-row",r),...i,children:[y.jsxs("div",{className:"coverage-capability-row__title",children:[y.jsx(yn,{type:"capability",size:"sm"}),y.jsx("span",{children:e}),t?y.jsx(Fq,{children:t}):null]}),y.jsx("div",{className:"coverage-capability-row__bars",children:n})]})}function Fq({children:e}){return y.jsx("span",{className:"coverage-mark",children:e})}function Hq({id:e,title:t,count:n,children:r}){return y.jsxs("section",{id:e,className:"coverage-panel coverage-gap-list",children:[y.jsxs("header",{className:"coverage-gap-list__head",children:[y.jsx("h3",{children:t}),y.jsx("span",{children:n})]}),r]})}function DT({children:e}){return y.jsx("p",{className:"coverage-empty-note",children:e})}function Vq({children:e}){return y.jsx("div",{className:"coverage-gap-list__rows",children:e})}function Xq({type:e,family:t,title:n,file:r,typeLabel:i,className:o="",...s}){return y.jsxs("button",{type:"button",className:W("coverage-gap-row",o),...s,children:[y.jsx(yn,{type:e,family:t,size:"sm"}),y.jsxs("span",{className:"coverage-gap-row__copy",children:[y.jsx("span",{className:"coverage-gap-row__title",children:n}),y.jsx("span",{className:"coverage-gap-row__file",children:r})]}),y.jsx(yr,{type:e,family:t,tinted:!0,children:i})]})}function Yq({children:e,className:t="",...n}){return y.jsx("button",{type:"button",className:W("coverage-more",t),...n,children:e})}function Wq({label:e,value:t,children:n}){return y.jsxs("div",{className:"coverage-labeled-bar",children:[y.jsxs("div",{className:"coverage-labeled-bar__head",children:[y.jsx("span",{children:e}),y.jsx("span",{children:t})]}),n]})}function Kq({value:e,token:t}){return y.jsx("span",{className:"coverage-bar","aria-hidden":"true",children:y.jsx(N6,{className:"coverage-bar__fill",value:e,colorToken:t})})}const sv="atm_c8_1m800s6 atm_rd_glywfm",lv="atm_7l_1uoma54 atm_18uqgji_1r1dq30 atm_pgg0nz_8stvzk",Qq="atm_9s_1txwivl atm_h_1h6ojuz atm_be_1g80g66 atm_cx_ynj908 atm_c8_ouk0ow",Zq="atm_7l_1mqbmot atm_70_glywfm",Jq="atm_9s_1txwivl atm_h_1h6ojuz atm_be_1g80g66 atm_cx_ynj908 atm_gq_1q4684i",eI="atm_gi_idpfg4 atm_c8_1ye8rbs atm_cs_1d1fc98 atm_g3_10nfu4p",tI="atm_7l_an4usv",nI="atm_9s_1txwivl atm_ar_1bp4okc atm_cx_1rgb3qj atm_ya027c_1txwivl atm_gf2rle_1h6ojuz atm_jjyyxr_1g80g66 atm_idre7l_ynj908 atm_nvjkf4_ouk0ow",rI="atm_igyrtf_glywfm atm_1gekrss_1mqbmot",iI="atm_c8_1m800s6 atm_cd_1m30gqx atm_g3_5cyyty",aI="atm_7l_1mqbmot";function oI({title:e="Resources",count:t}){return y.jsxs("div",{className:W("ux-resources-header",Jq),children:[y.jsx("h1",{className:W("ux-resources-title",eI,tI),children:e}),y.jsxs(_f,{children:[t," resources"]})]})}function sI({resources:e,emptyMessage:t="No resources in store."}){return y.jsxs("div",{className:W("ux-resource-list",nI,rI),children:[e.map(n=>{var r,i;return y.jsx(qm,{className:"ux-resource-list-card",children:y.jsxs("div",{className:"ux-resource-list-card-row",children:[y.jsx(yr,{type:n.kind,family:n.kind,children:n.kind}),y.jsx(uI,{resource:n}),(((r=n.relationTypes)==null?void 0:r.length)??0)>0?y.jsxs("span",{className:"ux-resource-list-card-meta",children:["via ",(i=n.relationTypes)==null?void 0:i.join(", ")]}):null]})},n.id)}),e.length===0?y.jsx(OT,{children:t}):null]})}function lI({kind:e,target:t,externalUrl:n}){return y.jsxs(qm,{className:W("ux-resource-detail-card",Qq,Zq),children:[y.jsx(yr,{type:e,family:e,children:e}),n?y.jsx("a",{href:n,target:"_blank",rel:"noreferrer",className:W("ux-resource-link",sv,lv),children:n}):y.jsx(Or,{children:t})]})}function OT({children:e}){return y.jsx("span",{className:W("ux-resource-empty",iI,aI),children:e})}function uI({resource:e}){return e.externalUrl?y.jsx("a",{href:e.externalUrl,target:"_blank",rel:"noreferrer",className:W("ux-resource-link",sv,lv),children:e.display}):e.href?y.jsx("a",{href:e.href,className:W("ux-resource-link",sv,lv),children:e.display}):y.jsx(Or,{children:e.target})}const cI="atm_mk_1if85x1 atm_tk_idpfg4 atm_wq_7nb5ka atm_9s_11p5wf0 atm_cx_ynj908 atm_l8_1wz40ms atm_1b3orxf_1txwivl atm_1g9h1b9_1q9ycp6 atm_g22e72_tx1for atm_441hv5_1m800s6 atm_468rbt_1mvar2t atm_g6gnno_ouk0ow atm_yup0c9_19dj2kj atm_135cpzu_idpfg4 atm_okt143_1m800s6",fI="atm_3f_xbw5ta atm_5j_1pr0uq2 atm_26_1u3842e atm_70_3p501a atm_jw2roz_1r1dq30 atm_13bxw0w_1mqbmot",dI="atm_9s_1txwivl atm_ar_1bp4okc atm_cx_1rgb3qj atm_h3_1aqtv8w atm_1svqb58_15vqwwr atm_1yzsv6k_11p5wf0 atm_d6zurq_1umn398 atm_15f7s85_v2br90 atm_sdsfa_ynj908 atm_1hdw3lq_1osqo2v atm_1r42gjb_usvi9m atm_sdpqu7_c5qxkp atm_i0p208_tlke0l atm_1b6ma3i_1e5hqsa atm_22y29z_glywfm atm_casjrx_11p5wf0 atm_sgmuic_idpfg4 atm_9g5aim_iqvn5y atm_r86fc9_1txwivl atm_jmqrth_1h6ojuz atm_y7kpln_idpfg4 atm_17zaorj_1ym253d atm_871rgh_tx1for atm_t7nf53_idpfg4 atm_1oykbke_15vqwwr atm_dpdovi_1c8rstr atm_1gqrwyf_1mvar2t atm_6kn9v4_yv70g4 atm_p6xvx1_1l2sidv atm_18vkied_1q9ccgz atm_1y4vfru_1ulexfb atm_1w7wswo_idpfg4 atm_7u2042_15vqwwr atm_1fu1ub6_l6f2xw atm_1igych4_ouk0ow atm_1fald7j_yv70g4 atm_1tl918l_1l2sidv atm_hnli5o_1q9ccgz atm_zohnyv_cj1kg8 atm_xxdqm3_15vqwwr atm_udpfbl_1m800s6 atm_6znv68_5cyyty atm_d1x23j_1e54zos atm_3l80s_cs5v99 atm_1v375uf_owgaek atm_19rtxr7_v2br90 atm_154h6wp_1aqtv8w atm_opkufy_1aqtv8w atm_ips429_owgaek",hI="atm_1hx3c3t_1pr0uq2 atm_k5zkfc_8o97w atm_1phshlq_idpfg4 atm_st9q9i_1j28jx2 atm_kh0rqp_an4usv atm_1l60l41_an4usv atm_1rn28h_1mqbmot",mI="atm_t9_1dk0nxm",pI="atm_c8_1m800s6",_I="atm_7l_1mqbmot";function gI({query:e,resultSummary:t,statusText:n,onQueryChange:r,onSubmit:i}){return y.jsxs(L5,{"aria-label":"Search controls",className:W("ux-search-page-toolbar",cI,fI),children:[y.jsxs("div",{className:"ux-search-active-controls",children:[y.jsx("span",{className:"ux-search-page-title",children:"Search"}),y.jsx("span",{className:"ux-search-result-count",children:t})]}),y.jsx("form",{className:"ux-search-page-form",role:"search",onSubmit:i,children:y.jsx(mT,{size:"lg",type:"search","aria-label":"Search project",placeholder:"Search elements, files, resources, ontology terms...",value:e,onChange:o=>r(o.target.value)})}),y.jsx("span",{className:"ux-search-page-query",children:n})]})}function yI({results:e,emptyMessage:t}){return y.jsxs("div",{className:W("ux-search-results",dI,hI),children:[e.map(n=>y.jsx(qm,{interactive:!0,padded:!1,className:"ux-search-result-card",children:y.jsxs(bI,{action:n.action,children:[y.jsxs("div",{className:"ux-search-result-main",children:[y.jsxs("div",{className:"ux-search-result-heading",children:[n.badge.type?y.jsx(yr,{type:n.badge.type,family:n.badge.family,tinted:n.badge.tinted,children:n.badge.label}):y.jsx(_f,{className:W("ux-search-kind-badge",mI),children:n.badge.label}),y.jsx("span",{className:"ux-search-result-title",children:n.title})]}),n.route?y.jsx("span",{className:"ux-search-result-route",children:n.route}):null,typeof n.preview=="string"?y.jsx("span",{className:"ux-search-result-preview",children:n.preview}):n.preview]}),y.jsx(et,{name:"arrow-up-right",className:"ux-search-result-arrow","aria-hidden":"true"})]})},n.key)),t?y.jsx(vI,{children:t}):null]})}function vI({children:e}){return y.jsx("span",{className:W("ux-search-empty",pI,_I),children:e})}function bI({action:e,children:t}){return e.kind==="button"?y.jsx("button",{type:"button",className:"ux-search-result-action",onClick:e.onClick,children:t}):y.jsx("a",{className:"ux-search-result-action",href:e.href,children:t})}const xI="atm_73_usvi9m atm_9s_1txwivl atm_jb_idpfg4 atm_j6_idpfg4 atm_am_ggq5uc atm_ar_1bp4okc atm_vy_15mqm6d",wI="atm_9s_1txwivl atm_am_ggq5uc atm_ar_1bp4okc atm_vy_1osqo2v atm_e2_1osqo2v atm_j6_idpfg4 atm_ks_15vqwwr",kI="atm_73_usvi9m atm_1fw4lds_1xi6ry0 atm_1mhppym_1ru0ig4 atm_37uaou_1pywi5l atm_1qq83nt_cjiytx atm_o16tt2_13hosy3 atm_1blg4jb_13hosy3 atm_1auwxrf_1wz40ms atm_18hli6x_1uoma54 atm_j6_idpfg4 atm_am_ggq5uc atm_l0_15vqwwr atm_l1_1wugsn5 atm_l8_1jleg3m atm_p5_p27btl",EI="atm_73_usvi9m",SI="atm_73_usvi9m",CI="atm_73_usvi9m",TI="atm_73_usvi9m",jI="atm_73_usvi9m atm_am_12336oc atm_gi_kms8ld",AI="atm_73_usvi9m",RI="atm_73_usvi9m",NI="atm_73_usvi9m atm_9s_1txwivl atm_am_ggq5uc atm_j6_idpfg4 atm_ar_1bp4okc atm_cx_tx1for atm_l0_15vqwwr atm_l1_1wugsn5 atm_l8_12agla7 atm_p5_p27btl atm_1sem00y_1y6m0gg atm_1ljptmp_15fao4p atm_12kxo5o_idpfg4 atm_1lui1k7_idpfg4 atm_13ao8ge_glywfm atm_8dwbmj_idpfg4 atm_qf1qgm_15vqwwr atm_4rfdlb_1l2sidv atm_re7vzp_1q9ccgz atm_1htcehx_116y0ak atm_2izftk_lafzln atm_yrx48s_lafzln atm_1q3w28d_1h6ojuz atm_647v0_1h6ojuz atm_t120g4_9wwvsf atm_ntpepn_1i9d2r atm_dc5zkb_1d1fc98 atm_1r7yxy_kb7nvz atm_1n9kc8_1mv84c8 atm_jh6kw4_73adwj",LI="atm_73_usvi9m atm_gi_1jleg3m atm_c8_1ye8rbs atm_cs_1d1fc98 atm_fr_idpfg4 atm_g3_3szr2b",zI="atm_73_usvi9m atm_17h295e_idpfg4 atm_9s_1txwivl atm_ar_1bp4okc atm_be_1q9ccgz atm_h_1fhbwtr atm_cx_ek2tx5",MI="atm_73_usvi9m atm_am_12336oc atm_gi_alvhgt atm_l8_j88d2",DI="atm_73_usvi9m atm_9s_11p5wf0 atm_dz_13q8nqj atm_cx_6skkmd atm_vy_1osqo2v atm_149fxs_1txwivl atm_1i67h6h_idpfg4 atm_1edmiya_1q9ycp6 atm_z2lffp_1yb4nlp atm_189x41a_owgaek atm_tayqn5_idpfg4 atm_ip9w8z_15vqwwr atm_1cjxpdl_1mqbmot atm_1p6qd7x_ouk0ow atm_d9pmjv_1l2sidv atm_13p6k9c_1q9ccgz atm_o141di_1r1dq30 atm_odiiu_ouk0ow atm_4xcta6_1ts48j8 atm_qrmekp_1d1fc98",OI="atm_73_usvi9m atm_9s_1txwivl atm_ar_1bp4okc atm_cx_1rgb3qj",qI="atm_73_usvi9m atm_ks_15vqwwr atm_c8_1m800s6 atm_cs_19dj2kj atm_sq_1l2sidv atm_vv_1q9ccgz",II="atm_73_usvi9m atm_9s_11p5wf0 atm_dz_1gpoo8t atm_h_1h6ojuz atm_cx_ek2tx5 atm_vy_1osqo2v atm_j6_15fao4p atm_l8_3ofa5r atm_1s_glywfm atm_3f_idpfg4 atm_5j_ab5uq2 atm_26_1j28jx2 atm_7l_1kw7nm4 atm_9j_tlke0l atm_bv_1kw7nm4 atm_r3_1e5hqsa atm_lvd7fl_8o97w atm_19s06m1_1c05cp1 atm_1emii6y_1r1dq30 atm_x3767u_1r1dq30 atm_zq1xoj_1d1fc98 atm_17yrrpa_9snglw atm_6zeuib_1xi6ry0",PI="atm_73_usvi9m atm_9s_116y0ak atm_h_1h6ojuz atm_fc_1h6ojuz",$I="atm_73_usvi9m atm_9s_116y0ak atm_jb_lafzln atm_e2_lafzln atm_h_1h6ojuz atm_fc_1h6ojuz atm_l8_9wwvsf atm_5j_1i9d2r atm_c8_1o6fbio atm_cs_1d1fc98 atm_g3_kb7nvz",BI="atm_73_usvi9m atm_9s_1txwivl atm_be_1g80g66 atm_cx_ek2tx5 atm_gi_idpfg4",UI="atm_73_usvi9m atm_9s_116y0ak atm_e2_1mv84c8 atm_h_1h6ojuz atm_cx_tx1for atm_l8_1vxnein atm_5j_mrub5a atm_c8_ouk0ow atm_cs_19dj2kj atm_rd_glywfm",qT="atm_73_usvi9m atm_9s_11p5wf0 atm_cx_1rgb3qj",GI="atm_73_usvi9m atm_9s_11p5wf0 atm_dz_1m62g02 atm_h_v2br90 atm_cx_8p4f3e",FI="atm_73_usvi9m atm_dz_9syeg7",HI="atm_73_usvi9m atm_9s_1txwivl atm_h_1h6ojuz atm_cx_ynj908 atm_j6_1mv84c8 atm_l8_vb8vu1",VI="atm_73_usvi9m atm_c8_ouk0ow atm_g3_nqt0r7",XI="atm_73_usvi9m atm_9s_116y0ak atm_h_1h6ojuz atm_fc_1h6ojuz atm_jb_15fao4p atm_e2_14k5dlv atm_3f_xbw5ta atm_5j_ab5uq2 atm_26_yzuxxm atm_7l_127xd9b atm_c8_1o6fbio atm_cs_1mvar2t atm_g3_kb7nvz",YI="atm_9s_116y0ak atm_am_12336oc atm_vy_1rmyi83 atm_e2_1rmyi83 atm_73_usvi9m atm_3f_1tr7wzy atm_5j_suuzbj",WI="atm_73_usvi9m",KI="atm_73_usvi9m atm_1s_glywfm atm_9s_116y0ak atm_vy_1osqo2v atm_jb_idpfg4 atm_h_1h6ojuz atm_fc_1y6m0gg atm_cx_owgaek atm_3f_ag7trk atm_5j_mrub5a atm_l8_1kxw53v atm_26_1u3842e atm_7l_an4usv atm_bv_1kw7nm4 atm_c8_1m800s6 atm_cs_19dj2kj atm_r3_1e5hqsa atm_rd_glywfm atm_9j_tlke0l atm_uc_qr76gm atm_18vqbco_1627y59 atm_1tgqd35_8o97w",QI="atm_73_usvi9m atm_9s_1txwivl atm_jb_idpfg4 atm_h_1h6ojuz atm_cx_iqvn5y",ZI="atm_73_usvi9m atm_am_ggq5uc atm_jb_idpfg4 atm_ks_15vqwwr atm_sq_1l2sidv atm_vv_1q9ccgz",JI="atm_73_usvi9m atm_am_12336oc atm_ks_ewfl5b atm_5j_1i9d2r atm_l8_ohusjj atm_26_yzuxxm atm_7l_1mqbmot atm_c8_1o6fbio atm_cs_1d1fc98 atm_g3_cjiytx",e9="atm_73_usvi9m atm_am_12336oc atm_7l_1mqbmot",t9="atm_73_usvi9m atm_gi_idpfg4 atm_7l_1mqbmot atm_c8_ouk0ow",n9="atm_73_usvi9m atm_9s_1ulexfb atm_gi_60uowd atm_c8_1o6fbio atm_cs_1d1fc98 atm_fr_v3rtn5 atm_g3_kb7nvz atm_t9_angws6",r9="atm_73_usvi9m",i9="atm_73_usvi9m atm_c8_1m800s6 atm_cd_1m30gqx atm_g3_5cyyty",a9="atm_mk_1n9t6rb atm_f3_irm9pb atm_wq_1q74syn atm_9s_1txwivl atm_vy_l705tw atm_73_usvi9m atm_ar_vrvcex atm_ks_15vqwwr atm_7kq2ir_xilxc7 atm_891o4a_1ul9x4n atm_1kouppm_mpnfgn atm_zc6wpu_glywfm atm_puepzc_h2mmj6 atm_hq95hj_1wugsn5 atm_ti0hoy_1wugsn5 atm_rvs1et_1fhbwtr atm_1alhlr5_14je7hw atm_tetfku_l705tw atm_qj4z5l_idpfg4 atm_d0vgki_idpfg4 atm_1415qz7_1osqo2v atm_bns2av_glywfm atm_1bswydb_1txwivl atm_1wsnyk0_idpfg4 atm_4x1cc9_idpfg4 atm_11o1fx4_ggq5uc atm_lh4e6a_1bp4okc atm_wwiibs_15mqm6d atm_1298wmq_1txwivl atm_1hb8izi_ggq5uc atm_1duszap_1bp4okc atm_ov1oto_1osqo2v atm_124dkh3_1osqo2v atm_ch5on0_idpfg4 atm_17oqew3_15vqwwr atm_1rogwi2_h2mmj6 atm_i5p90e_1txwivl atm_5zqc5k_idpfg4 atm_pigph6_126gte8 atm_14ddov_16f6m6j atm_i3s7r2_1y6m0gg atm_jtkc60_1h6ojuz atm_jmyevp_ek2tx5 atm_e61uyl_idpfg4 atm_nqtmco_idpfg4 atm_utokza_tlke0l atm_1vvt2ne_glywfm atm_tspak1_glywfm atm_1eacelv_1o8liyq atm_95eig_hwm9mu atm_19nxqn6_1rlkksh atm_91w3cs_1o6fbio atm_lxshbk_1mvar2t atm_16pcalf_7n2z1h atm_sjpqsc_angws6 atm_1cehlre_stnw88 atm_8b5tuo_1ssbidh atm_d6u19e_1ssbidh atm_1hi61sk_1txwivl atm_q5azmx_1h6ojuz atm_xhn9lv_1h6ojuz atm_b5x0fo_14k5dlv atm_1ujbdzl_14k5dlv atm_czc6vo_1ooetej atm_bhk1u9_h2mmj6 atm_1i8w2wp_qp9j9c atm_169smvq_m5fiu3 atm_gvrfs6_1c8rstr atm_zn26i8_1aqtv8w atm_1m2xdba_fjcok3 atm_10k8oth_7upmk4 atm_q4s3y9_1n56hfp atm_ntcmjf_15vqwwr atm_vtfc7h_1wugsn5 atm_1xlxrut_1f51e7f atm_17jazoq_6e9m65 atm_6irxux_iqvn5y atm_h65plv_glywfm atm_zchfbp_p27btl atm_1b2o21r_glywfm atm_wd0iva_glywfm atm_bgl7g7_11p5wf0 atm_1rufn74_1osqo2v atm_95pxxp_usvi9m atm_15zzex4_1xi6ry0 atm_pmix6n_1vz6rot atm_j6fz9w_idpfg4 atm_1q3p7mw_mrub5a atm_11tdqu1_1e5hqsa atm_11xlh1h_glywfm atm_soh4f0_tlke0l atm_bpso89_1o6fbio atm_qos7kf_11p5wf0 atm_864isq_nm9r2f atm_t35ltd_1h6ojuz atm_19nuq8r_idpfg4 atm_1bqdq8y_owgaek atm_153c2xn_mrub5a atm_v7m8t0_1vz6rot atm_1hzxc1b_tlke0l atm_12ukyl7_ouk0ow atm_6ydzha_glywfm atm_1r4ielu_116y0ak atm_1ibp0kq_1h6ojuz atm_521k3u_1h6ojuz atm_tpecvk_1aou828 atm_94u64e_1aou828 atm_1dym7v1_suuzbj atm_1po3tke_xbw5ta atm_9lp6jr_1xg740 atm_57j6kv_idpfg4 atm_hxis8i_15vqwwr atm_14yq0rr_1l2sidv atm_au898_1q9ccgz atm_gorl0g_116y0ak atm_mg8zc4_1h6ojuz atm_1kpjso5_1h6ojuz atm_dwqhqc_idpfg4 atm_27nbcp_1q4684i atm_dqx8mq_lafzln atm_1xlef5z_1i9d2r atm_7n9vd_xbw5ta atm_1s9m77a_9wwvsf atm_1sjr5i9_1o6fbio atm_18nmf3x_1mvar2t atm_1eucn0f_kb7nvz atm_r08jt2_11p5wf0 atm_1x4ru42_12336oc atm_82903e_tx1for atm_ydczek_12agla7 atm_r118ih_1y6m0gg atm_t66mdv_15fao4p atm_19yajut_idpfg4 atm_16176em_idpfg4 atm_1ipnpzi_glywfm atm_gorhsh_idpfg4 atm_i1uul3_15vqwwr atm_ww3efi_1l2sidv atm_ard02a_1q9ccgz atm_hkslwp_116y0ak atm_1clbfh7_lafzln atm_1qjfdj0_lafzln atm_1nv07ty_1h6ojuz atm_um6okn_1h6ojuz atm_i8safy_9wwvsf atm_1k3kljw_1i9d2r atm_1i0ejrq_1d1fc98 atm_sy2aik_kb7nvz atm_e08xmv_1mv84c8 atm_ky845a_73adwj atm_nglzqu_1rgb3qj atm_1oy1h9a_1h9s8qi atm_1611u6i_1jleg3m atm_w92nwr_1ye8rbs atm_ul9p39_1d1fc98 atm_78iser_idpfg4 atm_1kmwij5_3szr2b atm_xfzmkm_1ulexfb atm_p4j5d3_60uowd atm_r4dlmk_1o6fbio atm_cz9poa_1d1fc98 atm_jkfpky_v3rtn5 atm_83xmhf_angws6 atm_w854as_20g1vd atm_q6qthp_1k2i9i8 atm_tpwinc_1lzc1s3 atm_v7hz1m_kb7nvz atm_u2verv_11p5wf0 atm_tuz8ta_1rgb3qj atm_v58g8l_11p5wf0 atm_7qamtw_1m62g02 atm_9ryp9a_v2br90 atm_1inwp0w_8p4f3e atm_145nqpa_9syeg7 atm_1vlwadu_idpfg4 atm_17gzycs_1mv84c8 atm_rwxsxp_1mv84c8 atm_qyulhv_ynj908 atm_10y1f4j_1lx6yz3 atm_8skp4v_1mv84c8 atm_1w08zb2_1mv84c8 atm_7kv6q6_1lx6yz3 atm_w1nh2c_1rmyi83 atm_1ud7l6d_1mqbmot atm_1slg1in_1txwivl atm_pn29rg_1bp4okc atm_12pwg6l_1rgb3qj atm_17szu4v_idpfg4 atm_1pycox2_1txwivl atm_5ogo8t_1g80g66 atm_17xinw3_1q9ycp6 atm_1ng65ab_tx1for atm_16ncngf_1bp4okc atm_bt90hr_1q9ccgz atm_cpx867_1fhbwtr atm_1ehbqd_ek2tx5 atm_jvhfch_lxkxdv atm_1827ab1_alvhgt atm_gvu4yr_j88d2 atm_j0s7td_alvhgt atm_qfj2xq_j88d2 atm_1o5fh5r_1rr1le1 atm_1adtrc1_idpfg4 atm_1csh7mn_idpfg4 atm_4bp0fv_1txwivl atm_1j5xjxk_1h6ojuz atm_1tc18qi_ynj908 atm_l3u3yl_1mv84c8 atm_yyaw0s_vb8vu1 atm_1pt8us7_ouk0ow atm_1rm3mzb_nqt0r7 atm_caksfm_1xi6ry0 atm_1u09hw0_1ru0ig4 atm_whvsex_1pywi5l atm_1psdtvg_cjiytx atm_u7crzg_13hosy3 atm_er3qdy_13hosy3 atm_1dtsxxq_1wz40ms atm_1x8w0sn_1uoma54 atm_h25iip_idpfg4 atm_1c0xhjg_ggq5uc atm_1drsts6_15vqwwr atm_hhwhsx_1wugsn5 atm_12hupao_1jleg3m atm_1mion3d_p27btl atm_11zu1wa_idpfg4 atm_xhkvs9_idpfg4 atm_mwftrf_idpfg4 atm_4df937_idpfg4 atm_1x5rzsk_idpfg4 atm_bqcznk_idpfg4 atm_192zjf3_glywfm atm_gmqoa3_glywfm atm_1ylx0uk_11p5wf0 atm_ez0xrg_ek2tx5 atm_1kpv9iz_idpfg4 atm_1ozgn2f_idpfg4 atm_1iwok9s_116y0ak atm_12w6k7d_1osqo2v atm_lrkolk_idpfg4 atm_1ive6ie_1h6ojuz atm_13fw54n_1y6m0gg atm_d3jpzt_owgaek atm_1pay1vv_1kxw53v atm_855kca_mrub5a atm_r06cra_1m800s6 atm_1ewqs1t_19dj2kj atm_16in3ne_1e5hqsa atm_ctwiro_glywfm atm_ssdmsa_tlke0l atm_1de9t0x_1t8awia atm_1v3gmq7_idpfg4 atm_1kywkel_15vqwwr atm_y5vzgc_1l2sidv atm_tu5i3e_1q9ccgz atm_861f9e_1txwivl atm_1mnmxqo_idpfg4 atm_zppjp5_1h6ojuz atm_10xh1c7_iqvn5y atm_7y1nu9_ggq5uc atm_1pp9kfu_ggq5uc atm_bkur2v_idpfg4 atm_146dmk7_15vqwwr atm_1898ghx_1l2sidv atm_tmlnly_1q9ccgz atm_1dop1p2_12336oc atm_njgncv_ewfl5b atm_1vnxy3u_ohusjj atm_4ng8uo_1i9d2r atm_smkn3f_1o6fbio atm_g6a7e4_1d1fc98 atm_f19836_cjiytx atm_84078s_12336oc atm_lk00js_idpfg4 atm_qqgml4_ouk0ow atm_z2r8hl_1txwivl atm_og53fo_1g80g66 atm_fu1xn9_ek2tx5 atm_b5949w_idpfg4 atm_q4lk2a_116y0ak atm_1a29d69_1mv84c8 atm_6se9oe_1h6ojuz atm_14ni561_tx1for atm_n81m19_1vxnein atm_dfh2xf_mrub5a atm_15fiq5l_ouk0ow atm_tr0053_19dj2kj atm_uzz936_glywfm atm_mxgnnm_1ulexfb atm_1psg67t_1aou828 atm_dowbrz_1aou828 atm_4ei15f_12336oc atm_1plfbyv_1m800s6 atm_13lo6hb_1m30gqx atm_amggex_5cyyty",o9="atm_mk_h2mmj6 atm_f3_1wugsn5 atm_wq_1wugsn5 atm_j_1fhbwtr atm_am_14je7hw atm_vy_l705tw atm_jb_idpfg4 atm_j6_idpfg4 atm_e2_1osqo2v",s9="atm_5q_xbw5ta atm_26_1u3842e atm_7l_an4usv atm_11ce9ju_1u3842e atm_q8byzp_1uoma54 atm_t698w_8o97w atm_d1l6do_1uoma54 atm_1q6pkiy_idpfg4 atm_13jafcn_1mqbmot atm_13eg02y_xbw5ta atm_g3zm4h_6lcubb atm_1y4h838_an4usv atm_1o6rrea_1mqbmot atm_1bddege_xbw5ta atm_1445nlk_ab5uq2 atm_3jy5gp_1u3842e atm_1l5oy84_weu1m6 atm_1ammlil_1j28jx2 atm_1wevwv0_an4usv atm_j9ewpz_8o97w atm_45l4vz_1mqbmot atm_ju3d16_8o97w atm_1gpawsl_1mqbmot atm_7fjpt_yzuxxm atm_wcr4f2_1ox2th8 atm_9lp6jr_1xg740 atm_qjwp0k_1rxe704 atm_1cbjtzq_p87gnr atm_xixc9i_183027q atm_kcstqh_1xbx5xr atm_px016g_m3ec7v atm_9z4z2m_1ngrtye atm_taipwz_1as38wo atm_1d09vxi_15udj5h atm_7yuv3j_wif9fk atm_5knjok_1vky53y atm_9c11cf_8zxu4w atm_wquao9_1j28jx2 atm_1c6wupc_yzuxxm atm_oh8wr_1uoma54 atm_1ex0n9o_1r31cwp atm_e5h7nd_1j28jx2 atm_4a4cf2_1r1dq30 atm_8khcuu_1mqbmot atm_153v1we_1mqbmot atm_elafns_ag7trk atm_16g3dso_1u3842e atm_9qmbvk_an4usv atm_12wau0s_1627y59 atm_lk97y3_8o97w atm_1ccxwdk_yzuxxm atm_hux4z0_1mqbmot atm_17jynao_1mqbmot atm_19maqxz_an4usv atm_hp33h4_yzuxxm atm_8ecijd_1uoma54 atm_19flawi_1j28jx2 atm_toypuv_1uoma54 atm_1jsx0uw_8o97w atm_u0poy8_1r1dq30";function l9({className:e="",...t}){return y.jsx("div",{className:W("ux-pane-action-row",BI,e),...t})}function u9({className:e="",...t}){return y.jsx("a",{className:W("ux-pane-ghost-link",UI,e),...t})}function Zd({title:e,className:t="",children:n,...r}){return y.jsxs("section",{className:W("ux-pane-controls",NI,t),...r,children:[e!=null?y.jsx("h2",{className:W("ux-pane-controls-title",LI),children:e}):null,n]})}function pa({label:e,children:t}){return y.jsxs(y.Fragment,{children:[y.jsx("span",{className:W("ux-pane-section-label",n9),children:e}),t]})}function c9({className:e="",columns:t="auto",...n}){return y.jsx("div",{className:W("ux-pane-filter-grid",GI,t==="two"&&FI,e),...n})}function Fm({searchInputId:e,inputLabel:t,placeholder:n,value:r,resultsId:i,onQueryChange:o,onSubmit:s,children:u}){return y.jsxs("form",{className:W("ux-global-search",jI),role:"search",onSubmit:s,children:[y.jsx(mT,{id:e,className:W("ux-global-search-control",AI),size:"lg","aria-label":t,type:"search",autoComplete:"off",spellCheck:!1,placeholder:n,value:r,onChange:c=>o(c.target.value)}),y.jsx("ul",{id:i,className:W("ontology-graph-results",RI),children:u})]})}function f9({className:e="",...t}){return y.jsx("div",{className:W("ux-pane-nav-list",OI,e),...t})}function d9({icon:e,label:t,count:n,selected:r=!1,className:i="",...o}){return y.jsxs("button",{type:"button",className:W("ux-pane-nav-row",II,r&&"is-selected",i),"aria-current":r?"page":void 0,...o,children:[y.jsx("span",{className:W("ux-pane-nav-row__icon",PI),"aria-hidden":"true",children:y.jsx(et,{name:e})}),y.jsx("span",{className:W("ux-pane-nav-row__label",qI),children:t}),y.jsx(_f,{className:W("ux-pane-nav-row__count",$I),children:n})]})}function sE({rows:e}){return y.jsx("div",{className:W("ux-pane-legend",qT),children:e.map(t=>y.jsx(Rc,{label:t.label,colorToken:t.colorToken,line:t.line,static:!0},t.id))})}function h9({rows:e}){return y.jsx("div",{className:W("ux-pane-legend",qT),children:e.map((t,n)=>y.jsxs("div",{className:W("ux-pane-legend-row",HI),children:[y.jsx("span",{className:W("ux-pane-symbol",XI),children:t.symbol}),y.jsx("span",{className:W("ux-pane-legend-text",VI),children:t.label})]},n))})}function IT({ariaLabel:e,emptyMessage:t,selection:n,openTitle:r="Open details",clearLabel:i="Clear selection",onOpen:o,onClear:s}){return y.jsx("section",{className:W("ux-pane-selected-element",WI),"aria-label":e,children:y.jsx(pa,{label:"Selection",children:n==null?y.jsx("p",{className:W(i9,"ux-pane-selection-hint",t9),children:t}):y.jsxs("div",{className:W("ux-pane-selection-row",QI),children:[y.jsxs("button",{type:"button",className:W("ux-pane-selected-element-link",KI),onClick:o,title:r,children:[n.icon??y.jsx("span",{className:W("ux-graph-control-swatch",YI)}),y.jsx("span",{className:W("ux-pane-selection-name",ZI),children:n.name}),n.kind!=null?y.jsx("span",{className:W("ux-pane-selection-kind",JI),children:n.kind}):null,y.jsx(et,{name:"arrow-up-right",size:13,className:W("ux-pane-selection-open",e9)})]}),s?y.jsx(Xl,{size:"sm",tone:"ghost","aria-label":i,title:i,onClick:s,children:y.jsx(et,{name:"x"})}):null]})})})}function Pl({title:e="Summary",ariaLabel:t=e,items:n,placement:r="default"}){return y.jsx(v5,{title:e,className:W("ux-pane-summary",zI,r==="footer"&&"ux-pane-summary--footer",r==="footer"&&MI),"aria-label":t,children:y.jsx("div",{className:W("ux-summary",DI),children:n.map(i=>y.jsxs("span",{className:"ux-summary__item",title:i.title,children:[y.jsx("span",{className:"ux-summary__label",children:i.label}),y.jsx("span",{className:"ux-summary__value",children:i.value})]},i.label))})})}function uv({className:e="",...t}){return y.jsx("div",{role:"tree",className:W("ux-tree",kI,e),...t})}function du({className:e="",...t}){return y.jsx("div",{className:W(r9,e),...t})}function m9({open:e,chrome:t="standalone",header:n,railMark:r,tabLabel:i="Explorer",onToggle:o,className:s="",children:u,...c}){const f=t==="app",h=t==="standalone";return y.jsxs("aside",{className:W("ux-side-pane",a9,s9,f?o9:"is-standalone",!e&&"is-collapsed",s),...c,children:[y.jsxs("div",{className:W("ux-side-content",xI,f&&wI),children:[h?n:null,u]}),h?y.jsxs("button",{type:"button",className:W("ux-tree-tab",EI),"aria-label":e?"Collapse explorer pane":"Expand explorer pane","aria-expanded":e,onClick:o,children:[r!=null?y.jsx("span",{className:W("ux-tree-tab-mark",TI),children:r}):null,y.jsx("span",{className:W("ux-tree-tab-label",SI),children:i}),y.jsx("span",{className:W("ux-tree-toggle",CI),"aria-hidden":"true",children:e?y.jsx(et,{name:"chevron-left"}):y.jsx(et,{name:"chevron-right"})})]}):null]})}function fn(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=fn(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var p9={value:()=>{}};function Hm(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Oh(n)}function Oh(e){this._=e}function _9(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Oh.prototype=Hm.prototype={constructor:Oh,on:function(e,t){var n=this._,r=_9(e+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(e=r[o]).type)&&(i=g9(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<s;)if(i=(e=r[o]).type)n[i]=lE(n[i],e.name,t);else if(t==null)for(i in n)n[i]=lE(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 Oh(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function g9(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function lE(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=p9,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var cv="http://www.w3.org/1999/xhtml";const uE={svg:"http://www.w3.org/2000/svg",xhtml:cv,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Vm(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),uE.hasOwnProperty(t)?{space:uE[t],local:e}:e}function y9(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===cv&&t.documentElement.namespaceURI===cv?t.createElement(e):t.createElementNS(n,e)}}function v9(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function PT(e){var t=Vm(e);return(t.local?v9:y9)(t)}function b9(){}function I1(e){return e==null?b9:function(){return this.querySelector(e)}}function x9(e){typeof e!="function"&&(e=I1(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,u=r[i]=new Array(s),c,f,h=0;h<s;++h)(c=o[h])&&(f=e.call(c,c.__data__,h,o))&&("__data__"in c&&(f.__data__=c.__data__),u[h]=f);return new vr(r,this._parents)}function w9(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function k9(){return[]}function $T(e){return e==null?k9:function(){return this.querySelectorAll(e)}}function E9(e){return function(){return w9(e.apply(this,arguments))}}function S9(e){typeof e=="function"?e=E9(e):e=$T(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var s=t[o],u=s.length,c,f=0;f<u;++f)(c=s[f])&&(r.push(e.call(c,c.__data__,f,s)),i.push(c));return new vr(r,i)}function BT(e){return function(){return this.matches(e)}}function UT(e){return function(t){return t.matches(e)}}var C9=Array.prototype.find;function T9(e){return function(){return C9.call(this.children,e)}}function j9(){return this.firstElementChild}function A9(e){return this.select(e==null?j9:T9(typeof e=="function"?e:UT(e)))}var R9=Array.prototype.filter;function N9(){return Array.from(this.children)}function L9(e){return function(){return R9.call(this.children,e)}}function z9(e){return this.selectAll(e==null?N9:L9(typeof e=="function"?e:UT(e)))}function M9(e){typeof e!="function"&&(e=BT(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,u=r[i]=[],c,f=0;f<s;++f)(c=o[f])&&e.call(c,c.__data__,f,o)&&u.push(c);return new vr(r,this._parents)}function GT(e){return new Array(e.length)}function D9(){return new vr(this._enter||this._groups.map(GT),this._parents)}function tm(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}tm.prototype={constructor:tm,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 O9(e){return function(){return e}}function q9(e,t,n,r,i,o){for(var s=0,u,c=t.length,f=o.length;s<f;++s)(u=t[s])?(u.__data__=o[s],r[s]=u):n[s]=new tm(e,o[s]);for(;s<c;++s)(u=t[s])&&(i[s]=u)}function I9(e,t,n,r,i,o,s){var u,c,f=new Map,h=t.length,m=o.length,_=new Array(h),g;for(u=0;u<h;++u)(c=t[u])&&(_[u]=g=s.call(c,c.__data__,u,t)+"",f.has(g)?i[u]=c:f.set(g,c));for(u=0;u<m;++u)g=s.call(e,o[u],u,o)+"",(c=f.get(g))?(r[u]=c,c.__data__=o[u],f.delete(g)):n[u]=new tm(e,o[u]);for(u=0;u<h;++u)(c=t[u])&&f.get(_[u])===c&&(i[u]=c)}function P9(e){return e.__data__}function $9(e,t){if(!arguments.length)return Array.from(this,P9);var n=t?I9:q9,r=this._parents,i=this._groups;typeof e!="function"&&(e=O9(e));for(var o=i.length,s=new Array(o),u=new Array(o),c=new Array(o),f=0;f<o;++f){var h=r[f],m=i[f],_=m.length,g=B9(e.call(h,h&&h.__data__,f,r)),b=g.length,E=u[f]=new Array(b),C=s[f]=new Array(b),w=c[f]=new Array(_);n(h,m,E,C,w,g,t);for(var T=0,k=0,S,z;T<b;++T)if(S=E[T]){for(T>=k&&(k=T+1);!(z=C[k])&&++k<b;);S._next=z||null}}return s=new vr(s,r),s._enter=u,s._exit=c,s}function B9(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function U9(){return new vr(this._exit||this._groups.map(GT),this._parents)}function G9(e,t,n){var r=this.enter(),i=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function F9(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,s=Math.min(i,o),u=new Array(i),c=0;c<s;++c)for(var f=n[c],h=r[c],m=f.length,_=u[c]=new Array(m),g,b=0;b<m;++b)(g=f[b]||h[b])&&(_[b]=g);for(;c<i;++c)u[c]=n[c];return new vr(u,this._parents)}function H9(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],s;--i>=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function V9(e){e||(e=X9);function t(m,_){return m&&_?e(m.__data__,_.__data__):!m-!_}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s=n[o],u=s.length,c=i[o]=new Array(u),f,h=0;h<u;++h)(f=s[h])&&(c[h]=f);c.sort(t)}return new vr(i,this._parents).order()}function X9(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Y9(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function W9(){return Array.from(this)}function K9(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null}function Q9(){let e=0;for(const t of this)++e;return e}function Z9(){return!this.node()}function J9(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,s=i.length,u;o<s;++o)(u=i[o])&&e.call(u,u.__data__,o,i);return this}function eP(e){return function(){this.removeAttribute(e)}}function tP(e){return function(){this.removeAttributeNS(e.space,e.local)}}function nP(e,t){return function(){this.setAttribute(e,t)}}function rP(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function iP(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function aP(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 oP(e,t){var n=Vm(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?tP:eP:typeof t=="function"?n.local?aP:iP:n.local?rP:nP)(n,t))}function FT(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function sP(e){return function(){this.style.removeProperty(e)}}function lP(e,t,n){return function(){this.style.setProperty(e,t,n)}}function uP(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function cP(e,t,n){return arguments.length>1?this.each((t==null?sP:typeof t=="function"?uP:lP)(e,t,n??"")):Ql(this.node(),e)}function Ql(e,t){return e.style.getPropertyValue(t)||FT(e).getComputedStyle(e,null).getPropertyValue(t)}function fP(e){return function(){delete this[e]}}function dP(e,t){return function(){this[e]=t}}function hP(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function mP(e,t){return arguments.length>1?this.each((t==null?fP:typeof t=="function"?hP:dP)(e,t)):this.node()[e]}function HT(e){return e.trim().split(/^|\s+/)}function P1(e){return e.classList||new VT(e)}function VT(e){this._node=e,this._names=HT(e.getAttribute("class")||"")}VT.prototype={add:function(e){var t=this._names.indexOf(e);t<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 XT(e,t){for(var n=P1(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function YT(e,t){for(var n=P1(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function pP(e){return function(){XT(this,e)}}function _P(e){return function(){YT(this,e)}}function gP(e,t){return function(){(t.apply(this,arguments)?XT:YT)(this,e)}}function yP(e,t){var n=HT(e+"");if(arguments.length<2){for(var r=P1(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?gP:t?pP:_P)(n,t))}function vP(){this.textContent=""}function bP(e){return function(){this.textContent=e}}function xP(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function wP(e){return arguments.length?this.each(e==null?vP:(typeof e=="function"?xP:bP)(e)):this.node().textContent}function kP(){this.innerHTML=""}function EP(e){return function(){this.innerHTML=e}}function SP(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function CP(e){return arguments.length?this.each(e==null?kP:(typeof e=="function"?SP:EP)(e)):this.node().innerHTML}function TP(){this.nextSibling&&this.parentNode.appendChild(this)}function jP(){return this.each(TP)}function AP(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function RP(){return this.each(AP)}function NP(e){var t=typeof e=="function"?e:PT(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function LP(){return null}function zP(e,t){var n=typeof e=="function"?e:PT(e),r=t==null?LP:typeof t=="function"?t:I1(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function MP(){var e=this.parentNode;e&&e.removeChild(this)}function DP(){return this.each(MP)}function OP(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function qP(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function IP(e){return this.select(e?qP:OP)}function PP(e){return arguments.length?this.property("__data__",e):this.node().__data__}function $P(e){return function(t){e.call(this,t,this.__data__)}}function BP(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function UP(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function GP(e,t,n){return function(){var r=this.__on,i,o=$P(t);if(r){for(var s=0,u=r.length;s<u;++s)if((i=r[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=t;return}}this.addEventListener(e.type,o,n),i={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(i):this.__on=[i]}}function FP(e,t,n){var r=BP(e+""),i,o=r.length,s;if(arguments.length<2){var u=this.node().__on;if(u){for(var c=0,f=u.length,h;c<f;++c)for(i=0,h=u[c];i<o;++i)if((s=r[i]).type===h.type&&s.name===h.name)return h.value}return}for(u=t?GP:UP,i=0;i<o;++i)this.each(u(r[i],t,n));return this}function WT(e,t,n){var r=FT(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 HP(e,t){return function(){return WT(this,e,t)}}function VP(e,t){return function(){return WT(this,e,t.apply(this,arguments))}}function XP(e,t){return this.each((typeof t=="function"?VP:HP)(e,t))}function*YP(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length,s;i<o;++i)(s=r[i])&&(yield s)}var KT=[null];function vr(e,t){this._groups=e,this._parents=t}function gf(){return new vr([[document.documentElement]],KT)}function WP(){return this}vr.prototype=gf.prototype={constructor:vr,select:x9,selectAll:S9,selectChild:A9,selectChildren:z9,filter:M9,data:$9,enter:D9,exit:U9,join:G9,merge:F9,selection:WP,order:H9,sort:V9,call:Y9,nodes:W9,node:K9,size:Q9,empty:Z9,each:J9,attr:oP,style:cP,property:mP,classed:yP,text:wP,html:CP,raise:jP,lower:RP,append:NP,insert:zP,remove:DP,clone:IP,datum:PP,on:FP,dispatch:XP,[Symbol.iterator]:YP};function nr(e){return typeof e=="string"?new vr([[document.querySelector(e)]],[document.documentElement]):new vr([[e]],KT)}function KP(e){let t;for(;t=e.sourceEvent;)e=t;return e}function ni(e,t){if(e=KP(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const QP={passive:!1},Xc={capture:!0,passive:!1};function Mg(e){e.stopImmediatePropagation()}function Gl(e){e.preventDefault(),e.stopImmediatePropagation()}function QT(e){var t=e.document.documentElement,n=nr(e).on("dragstart.drag",Gl,Xc);"onselectstart"in t?n.on("selectstart.drag",Gl,Xc):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function ZT(e,t){var n=e.document.documentElement,r=nr(e).on("dragstart.drag",null);t&&(r.on("click.drag",Gl,Xc),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Jd=e=>()=>e;function fv(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:s,y:u,dx:c,dy:f,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:f,enumerable:!0,configurable:!0},_:{value:h}})}fv.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function ZP(e){return!e.ctrlKey&&!e.button}function JP(){return this.parentNode}function e7(e,t){return t??{x:e.x,y:e.y}}function t7(){return navigator.maxTouchPoints||"ontouchstart"in this}function JT(){var e=ZP,t=JP,n=e7,r=t7,i={},o=Hm("start","drag","end"),s=0,u,c,f,h,m=0;function _(S){S.on("mousedown.drag",g).filter(r).on("touchstart.drag",C).on("touchmove.drag",w,QP).on("touchend.drag touchcancel.drag",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(S,z){if(!(h||!e.call(this,S,z))){var R=k(this,t.call(this,S,z),S,z,"mouse");R&&(nr(S.view).on("mousemove.drag",b,Xc).on("mouseup.drag",E,Xc),QT(S.view),Mg(S),f=!1,u=S.clientX,c=S.clientY,R("start",S))}}function b(S){if(Gl(S),!f){var z=S.clientX-u,R=S.clientY-c;f=z*z+R*R>m}i.mouse("drag",S)}function E(S){nr(S.view).on("mousemove.drag mouseup.drag",null),ZT(S.view,f),Gl(S),i.mouse("end",S)}function C(S,z){if(e.call(this,S,z)){var R=S.changedTouches,M=t.call(this,S,z),X=R.length,F,I;for(F=0;F<X;++F)(I=k(this,M,S,z,R[F].identifier,R[F]))&&(Mg(S),I("start",S,R[F]))}}function w(S){var z=S.changedTouches,R=z.length,M,X;for(M=0;M<R;++M)(X=i[z[M].identifier])&&(Gl(S),X("drag",S,z[M]))}function T(S){var z=S.changedTouches,R=z.length,M,X;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),M=0;M<R;++M)(X=i[z[M].identifier])&&(Mg(S),X("end",S,z[M]))}function k(S,z,R,M,X,F){var I=o.copy(),U=ni(F||R,z),G,q,$;if(($=n.call(S,new fv("beforestart",{sourceEvent:R,target:_,identifier:X,active:s,x:U[0],y:U[1],dx:0,dy:0,dispatch:I}),M))!=null)return G=$.x-U[0]||0,q=$.y-U[1]||0,function Z(A,N,H){var Q=U,D;switch(A){case"start":i[X]=Z,D=s++;break;case"end":delete i[X],--s;case"drag":U=ni(H||N,z),D=s;break}I.call(A,S,new fv(A,{sourceEvent:N,subject:$,target:_,identifier:X,active:D,x:U[0]+G,y:U[1]+q,dx:U[0]-Q[0],dy:U[1]-Q[1],dispatch:I}),M)}}return _.filter=function(S){return arguments.length?(e=typeof S=="function"?S:Jd(!!S),_):e},_.container=function(S){return arguments.length?(t=typeof S=="function"?S:Jd(S),_):t},_.subject=function(S){return arguments.length?(n=typeof S=="function"?S:Jd(S),_):n},_.touchable=function(S){return arguments.length?(r=typeof S=="function"?S:Jd(!!S),_):r},_.on=function(){var S=o.on.apply(o,arguments);return S===o?_:S},_.clickDistance=function(S){return arguments.length?(m=(S=+S)*S,_):Math.sqrt(m)},_}function $1(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ej(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function yf(){}var Yc=.7,nm=1/Yc,Fl="\\s*([+-]?\\d+)\\s*",Wc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Di="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",n7=/^#([0-9a-f]{3,8})$/,r7=new RegExp(`^rgb\\(${Fl},${Fl},${Fl}\\)$`),i7=new RegExp(`^rgb\\(${Di},${Di},${Di}\\)$`),a7=new RegExp(`^rgba\\(${Fl},${Fl},${Fl},${Wc}\\)$`),o7=new RegExp(`^rgba\\(${Di},${Di},${Di},${Wc}\\)$`),s7=new RegExp(`^hsl\\(${Wc},${Di},${Di}\\)$`),l7=new RegExp(`^hsla\\(${Wc},${Di},${Di},${Wc}\\)$`),cE={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};$1(yf,Ts,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:fE,formatHex:fE,formatHex8:u7,formatHsl:c7,formatRgb:dE,toString:dE});function fE(){return this.rgb().formatHex()}function u7(){return this.rgb().formatHex8()}function c7(){return tj(this).formatHsl()}function dE(){return this.rgb().formatRgb()}function Ts(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=n7.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?hE(t):n===3?new rr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?eh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?eh(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=r7.exec(e))?new rr(t[1],t[2],t[3],1):(t=i7.exec(e))?new rr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=a7.exec(e))?eh(t[1],t[2],t[3],t[4]):(t=o7.exec(e))?eh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=s7.exec(e))?_E(t[1],t[2]/100,t[3]/100,1):(t=l7.exec(e))?_E(t[1],t[2]/100,t[3]/100,t[4]):cE.hasOwnProperty(e)?hE(cE[e]):e==="transparent"?new rr(NaN,NaN,NaN,0):null}function hE(e){return new rr(e>>16&255,e>>8&255,e&255,1)}function eh(e,t,n,r){return r<=0&&(e=t=n=NaN),new rr(e,t,n,r)}function f7(e){return e instanceof yf||(e=Ts(e)),e?(e=e.rgb(),new rr(e.r,e.g,e.b,e.opacity)):new rr}function dv(e,t,n,r){return arguments.length===1?f7(e):new rr(e,t,n,r??1)}function rr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}$1(rr,dv,ej(yf,{brighter(e){return e=e==null?nm:Math.pow(nm,e),new rr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Yc:Math.pow(Yc,e),new rr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new rr(ks(this.r),ks(this.g),ks(this.b),rm(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:mE,formatHex:mE,formatHex8:d7,formatRgb:pE,toString:pE}));function mE(){return`#${ys(this.r)}${ys(this.g)}${ys(this.b)}`}function d7(){return`#${ys(this.r)}${ys(this.g)}${ys(this.b)}${ys((isNaN(this.opacity)?1:this.opacity)*255)}`}function pE(){const e=rm(this.opacity);return`${e===1?"rgb(":"rgba("}${ks(this.r)}, ${ks(this.g)}, ${ks(this.b)}${e===1?")":`, ${e})`}`}function rm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ks(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ys(e){return e=ks(e),(e<16?"0":"")+e.toString(16)}function _E(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ii(e,t,n,r)}function tj(e){if(e instanceof ii)return new ii(e.h,e.s,e.l,e.opacity);if(e instanceof yf||(e=Ts(e)),!e)return new ii;if(e instanceof ii)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,u=o-i,c=(o+i)/2;return u?(t===o?s=(n-r)/u+(n<r)*6:n===o?s=(r-t)/u+2:s=(t-n)/u+4,u/=c<.5?o+i:2-o-i,s*=60):u=c>0&&c<1?0:s,new ii(s,u,c,e.opacity)}function h7(e,t,n,r){return arguments.length===1?tj(e):new ii(e,t,n,r??1)}function ii(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}$1(ii,h7,ej(yf,{brighter(e){return e=e==null?nm:Math.pow(nm,e),new ii(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yc:Math.pow(Yc,e),new ii(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 rr(Dg(e>=240?e-240:e+120,i,r),Dg(e,i,r),Dg(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ii(gE(this.h),th(this.s),th(this.l),rm(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(){const e=rm(this.opacity);return`${e===1?"hsl(":"hsla("}${gE(this.h)}, ${th(this.s)*100}%, ${th(this.l)*100}%${e===1?")":`, ${e})`}`}}));function gE(e){return e=(e||0)%360,e<0?e+360:e}function th(e){return Math.max(0,Math.min(1,e||0))}function Dg(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Xm=e=>()=>e;function nj(e,t){return function(n){return e+n*t}}function m7(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Pue(e,t){var n=t-e;return n?nj(e,n>180||n<-180?n-360*Math.round(n/360):n):Xm(isNaN(e)?t:e)}function p7(e){return(e=+e)==1?rj:function(t,n){return n-t?m7(t,n,e):Xm(isNaN(t)?n:t)}}function rj(e,t){var n=t-e;return n?nj(e,n):Xm(isNaN(e)?t:e)}const im=(function e(t){var n=p7(t);function r(i,o){var s=n((i=dv(i)).r,(o=dv(o)).r),u=n(i.g,o.g),c=n(i.b,o.b),f=rj(i.opacity,o.opacity);return function(h){return i.r=s(h),i.g=u(h),i.b=c(h),i.opacity=f(h),i+""}}return r.gamma=e,r})(1);function _7(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function g7(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function y7(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),s;for(s=0;s<r;++s)i[s]=qc(e[s],t[s]);for(;s<n;++s)o[s]=t[s];return function(u){for(s=0;s<r;++s)o[s]=i[s](u);return o}}function v7(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Mi(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function b7(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=qc(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var hv=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Og=new RegExp(hv.source,"g");function x7(e){return function(){return e}}function w7(e){return function(t){return e(t)+""}}function ij(e,t){var n=hv.lastIndex=Og.lastIndex=0,r,i,o,s=-1,u=[],c=[];for(e=e+"",t=t+"";(r=hv.exec(e))&&(i=Og.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),u[s]?u[s]+=o:u[++s]=o),(r=r[0])===(i=i[0])?u[s]?u[s]+=i:u[++s]=i:(u[++s]=null,c.push({i:s,x:Mi(r,i)})),n=Og.lastIndex;return n<t.length&&(o=t.slice(n),u[s]?u[s]+=o:u[++s]=o),u.length<2?c[0]?w7(c[0].x):x7(t):(t=c.length,function(f){for(var h=0,m;h<t;++h)u[(m=c[h]).i]=m.x(f);return u.join("")})}function qc(e,t){var n=typeof t,r;return t==null||n==="boolean"?Xm(t):(n==="number"?Mi:n==="string"?(r=Ts(t))?(t=r,im):ij:t instanceof Ts?im:t instanceof Date?v7:g7(t)?_7:Array.isArray(t)?y7:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?b7:Mi)(e,t)}var yE=180/Math.PI,mv={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function aj(e,t,n,r,i,o){var s,u,c;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,c/=u),e*r<t*n&&(e=-e,t=-t,c=-c,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*yE,skewX:Math.atan(c)*yE,scaleX:s,scaleY:u}}var nh;function k7(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?mv:aj(t.a,t.b,t.c,t.d,t.e,t.f)}function E7(e){return e==null||(nh||(nh=document.createElementNS("http://www.w3.org/2000/svg","g")),nh.setAttribute("transform",e),!(e=nh.transform.baseVal.consolidate()))?mv:(e=e.matrix,aj(e.a,e.b,e.c,e.d,e.e,e.f))}function oj(e,t,n,r){function i(f){return f.length?f.pop()+" ":""}function o(f,h,m,_,g,b){if(f!==m||h!==_){var E=g.push("translate(",null,t,null,n);b.push({i:E-4,x:Mi(f,m)},{i:E-2,x:Mi(h,_)})}else(m||_)&&g.push("translate("+m+t+_+n)}function s(f,h,m,_){f!==h?(f-h>180?h+=360:h-f>180&&(f+=360),_.push({i:m.push(i(m)+"rotate(",null,r)-2,x:Mi(f,h)})):h&&m.push(i(m)+"rotate("+h+r)}function u(f,h,m,_){f!==h?_.push({i:m.push(i(m)+"skewX(",null,r)-2,x:Mi(f,h)}):h&&m.push(i(m)+"skewX("+h+r)}function c(f,h,m,_,g,b){if(f!==m||h!==_){var E=g.push(i(g)+"scale(",null,",",null,")");b.push({i:E-4,x:Mi(f,m)},{i:E-2,x:Mi(h,_)})}else(m!==1||_!==1)&&g.push(i(g)+"scale("+m+","+_+")")}return function(f,h){var m=[],_=[];return f=e(f),h=e(h),o(f.translateX,f.translateY,h.translateX,h.translateY,m,_),s(f.rotate,h.rotate,m,_),u(f.skewX,h.skewX,m,_),c(f.scaleX,f.scaleY,h.scaleX,h.scaleY,m,_),f=h=null,function(g){for(var b=-1,E=_.length,C;++b<E;)m[(C=_[b]).i]=C.x(g);return m.join("")}}}var S7=oj(k7,"px, ","px)","deg)"),C7=oj(E7,", ",")",")"),T7=1e-12;function vE(e){return((e=Math.exp(e))+1/e)/2}function j7(e){return((e=Math.exp(e))-1/e)/2}function A7(e){return((e=Math.exp(2*e))-1)/(e+1)}const qh=(function e(t,n,r){function i(o,s){var u=o[0],c=o[1],f=o[2],h=s[0],m=s[1],_=s[2],g=h-u,b=m-c,E=g*g+b*b,C,w;if(E<T7)w=Math.log(_/f)/t,C=function(M){return[u+M*g,c+M*b,f*Math.exp(t*M*w)]};else{var T=Math.sqrt(E),k=(_*_-f*f+r*E)/(2*f*n*T),S=(_*_-f*f-r*E)/(2*_*n*T),z=Math.log(Math.sqrt(k*k+1)-k),R=Math.log(Math.sqrt(S*S+1)-S);w=(R-z)/t,C=function(M){var X=M*w,F=vE(z),I=f/(n*T)*(F*A7(t*X+z)-j7(z));return[u+I*g,c+I*b,f*F/vE(t*X+z)]}}return C.duration=w*1e3*t/Math.SQRT2,C}return i.rho=function(o){var s=Math.max(.001,+o),u=s*s,c=u*u;return e(s,u,c)},i})(Math.SQRT2,2,4);var Zl=0,Nc=0,hc=0,sj=1e3,am,Lc,om=0,js=0,Ym=0,Kc=typeof performance=="object"&&performance.now?performance:Date,lj=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function B1(){return js||(lj(R7),js=Kc.now()+Ym)}function R7(){js=0}function sm(){this._call=this._time=this._next=null}sm.prototype=uj.prototype={constructor:sm,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?B1():+n)+(t==null?0:+t),!this._next&&Lc!==this&&(Lc?Lc._next=this:am=this,Lc=this),this._call=e,this._time=n,pv()},stop:function(){this._call&&(this._call=null,this._time=1/0,pv())}};function uj(e,t,n){var r=new sm;return r.restart(e,t,n),r}function N7(){B1(),++Zl;for(var e=am,t;e;)(t=js-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Zl}function bE(){js=(om=Kc.now())+Ym,Zl=Nc=0;try{N7()}finally{Zl=0,z7(),js=0}}function L7(){var e=Kc.now(),t=e-om;t>sj&&(Ym-=t,om=e)}function z7(){for(var e,t=am,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:am=n);Lc=e,pv(r)}function pv(e){if(!Zl){Nc&&(Nc=clearTimeout(Nc));var t=e-js;t>24?(e<1/0&&(Nc=setTimeout(bE,e-Kc.now()-Ym)),hc&&(hc=clearInterval(hc))):(hc||(om=Kc.now(),hc=setInterval(L7,sj)),Zl=1,lj(bE))}}function xE(e,t,n){var r=new sm;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var M7=Hm("start","end","cancel","interrupt"),D7=[],cj=0,wE=1,_v=2,Ih=3,kE=4,gv=5,Ph=6;function Wm(e,t,n,r,i,o){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;O7(e,n,{name:t,index:r,group:i,on:M7,tween:D7,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:cj})}function U1(e,t){var n=di(e,t);if(n.state>cj)throw new Error("too late; already scheduled");return n}function qi(e,t){var n=di(e,t);if(n.state>Ih)throw new Error("too late; already running");return n}function di(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function O7(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=uj(o,0,n.time);function o(f){n.state=wE,n.timer.restart(s,n.delay,n.time),n.delay<=f&&s(f-n.delay)}function s(f){var h,m,_,g;if(n.state!==wE)return c();for(h in r)if(g=r[h],g.name===n.name){if(g.state===Ih)return xE(s);g.state===kE?(g.state=Ph,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[h]):+h<t&&(g.state=Ph,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete r[h])}if(xE(function(){n.state===Ih&&(n.state=kE,n.timer.restart(u,n.delay,n.time),u(f))}),n.state=_v,n.on.call("start",e,e.__data__,n.index,n.group),n.state===_v){for(n.state=Ih,i=new Array(_=n.tween.length),h=0,m=-1;h<_;++h)(g=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(i[++m]=g);i.length=m+1}}function u(f){for(var h=f<n.duration?n.ease.call(null,f/n.duration):(n.timer.restart(c),n.state=gv,1),m=-1,_=i.length;++m<_;)i[m].call(e,h);n.state===gv&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=Ph,n.timer.stop(),delete r[t];for(var f in r)return;delete e.__transition}}function $h(e,t){var n=e.__transition,r,i,o=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){o=!1;continue}i=r.state>_v&&r.state<gv,r.state=Ph,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}o&&delete e.__transition}}function q7(e){return this.each(function(){$h(this,e)})}function I7(e,t){var n,r;return function(){var i=qi(this,e),o=i.tween;if(o!==n){r=n=o;for(var s=0,u=r.length;s<u;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function P7(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=qi(this,e),s=o.tween;if(s!==r){i=(r=s).slice();for(var u={name:t,value:n},c=0,f=i.length;c<f;++c)if(i[c].name===t){i[c]=u;break}c===f&&i.push(u)}o.tween=i}}function $7(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=di(this.node(),n).tween,i=0,o=r.length,s;i<o;++i)if((s=r[i]).name===e)return s.value;return null}return this.each((t==null?I7:P7)(n,e,t))}function G1(e,t,n){var r=e._id;return e.each(function(){var i=qi(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return di(i,r).value[t]}}function fj(e,t){var n;return(typeof t=="number"?Mi:t instanceof Ts?im:(n=Ts(t))?(t=n,im):ij)(e,t)}function B7(e){return function(){this.removeAttribute(e)}}function U7(e){return function(){this.removeAttributeNS(e.space,e.local)}}function G7(e,t,n){var r,i=n+"",o;return function(){var s=this.getAttribute(e);return s===i?null:s===r?o:o=t(r=s,n)}}function F7(e,t,n){var r,i=n+"",o;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===r?o:o=t(r=s,n)}}function H7(e,t,n){var r,i,o;return function(){var s,u=n(this),c;return u==null?void this.removeAttribute(e):(s=this.getAttribute(e),c=u+"",s===c?null:s===r&&c===i?o:(i=c,o=t(r=s,u)))}}function V7(e,t,n){var r,i,o;return function(){var s,u=n(this),c;return u==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),c=u+"",s===c?null:s===r&&c===i?o:(i=c,o=t(r=s,u)))}}function X7(e,t){var n=Vm(e),r=n==="transform"?C7:fj;return this.attrTween(e,typeof t=="function"?(n.local?V7:H7)(n,r,G1(this,"attr."+e,t)):t==null?(n.local?U7:B7)(n):(n.local?F7:G7)(n,r,t))}function Y7(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function W7(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function K7(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&W7(e,o)),n}return i._value=t,i}function Q7(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&Y7(e,o)),n}return i._value=t,i}function Z7(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 new Error;var r=Vm(e);return this.tween(n,(r.local?K7:Q7)(r,t))}function J7(e,t){return function(){U1(this,e).delay=+t.apply(this,arguments)}}function e$(e,t){return t=+t,function(){U1(this,e).delay=t}}function t$(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?J7:e$)(t,e)):di(this.node(),t).delay}function n$(e,t){return function(){qi(this,e).duration=+t.apply(this,arguments)}}function r$(e,t){return t=+t,function(){qi(this,e).duration=t}}function i$(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?n$:r$)(t,e)):di(this.node(),t).duration}function a$(e,t){if(typeof t!="function")throw new Error;return function(){qi(this,e).ease=t}}function o$(e){var t=this._id;return arguments.length?this.each(a$(t,e)):di(this.node(),t).ease}function s$(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;qi(this,e).ease=n}}function l$(e){if(typeof e!="function")throw new Error;return this.each(s$(this._id,e))}function u$(e){typeof e!="function"&&(e=BT(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,u=r[i]=[],c,f=0;f<s;++f)(c=o[f])&&e.call(c,c.__data__,f,o)&&u.push(c);return new ka(r,this._parents,this._name,this._id)}function c$(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),s=new Array(r),u=0;u<o;++u)for(var c=t[u],f=n[u],h=c.length,m=s[u]=new Array(h),_,g=0;g<h;++g)(_=c[g]||f[g])&&(m[g]=_);for(;u<r;++u)s[u]=t[u];return new ka(s,this._parents,this._name,this._id)}function f$(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function d$(e,t,n){var r,i,o=f$(t)?U1:qi;return function(){var s=o(this,e),u=s.on;u!==r&&(i=(r=u).copy()).on(t,n),s.on=i}}function h$(e,t){var n=this._id;return arguments.length<2?di(this.node(),n).on.on(e):this.each(d$(n,e,t))}function m$(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function p$(){return this.on("end.remove",m$(this._id))}function _$(e){var t=this._name,n=this._id;typeof e!="function"&&(e=I1(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var u=r[s],c=u.length,f=o[s]=new Array(c),h,m,_=0;_<c;++_)(h=u[_])&&(m=e.call(h,h.__data__,_,u))&&("__data__"in h&&(m.__data__=h.__data__),f[_]=m,Wm(f[_],t,n,_,f,di(h,n)));return new ka(o,this._parents,t,n)}function g$(e){var t=this._name,n=this._id;typeof e!="function"&&(e=$T(e));for(var r=this._groups,i=r.length,o=[],s=[],u=0;u<i;++u)for(var c=r[u],f=c.length,h,m=0;m<f;++m)if(h=c[m]){for(var _=e.call(h,h.__data__,m,c),g,b=di(h,n),E=0,C=_.length;E<C;++E)(g=_[E])&&Wm(g,t,n,E,_,b);o.push(_),s.push(h)}return new ka(o,s,t,n)}var y$=gf.prototype.constructor;function v$(){return new y$(this._groups,this._parents)}function b$(e,t){var n,r,i;return function(){var o=Ql(this,e),s=(this.style.removeProperty(e),Ql(this,e));return o===s?null:o===n&&s===r?i:i=t(n=o,r=s)}}function dj(e){return function(){this.style.removeProperty(e)}}function x$(e,t,n){var r,i=n+"",o;return function(){var s=Ql(this,e);return s===i?null:s===r?o:o=t(r=s,n)}}function w$(e,t,n){var r,i,o;return function(){var s=Ql(this,e),u=n(this),c=u+"";return u==null&&(c=u=(this.style.removeProperty(e),Ql(this,e))),s===c?null:s===r&&c===i?o:(i=c,o=t(r=s,u))}}function k$(e,t){var n,r,i,o="style."+t,s="end."+o,u;return function(){var c=qi(this,e),f=c.on,h=c.value[o]==null?u||(u=dj(t)):void 0;(f!==n||i!==h)&&(r=(n=f).copy()).on(s,i=h),c.on=r}}function E$(e,t,n){var r=(e+="")=="transform"?S7:fj;return t==null?this.styleTween(e,b$(e,r)).on("end.style."+e,dj(e)):typeof t=="function"?this.styleTween(e,w$(e,r,G1(this,"style."+e,t))).each(k$(this._id,e)):this.styleTween(e,x$(e,r,t),n).on("end.style."+e,null)}function S$(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function C$(e,t,n){var r,i;function o(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&S$(e,s,n)),r}return o._value=t,o}function T$(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 new Error;return this.tween(r,C$(e,t,n??""))}function j$(e){return function(){this.textContent=e}}function A$(e){return function(){var t=e(this);this.textContent=t??""}}function R$(e){return this.tween("text",typeof e=="function"?A$(G1(this,"text",e)):j$(e==null?"":e+""))}function N$(e){return function(t){this.textContent=e.call(this,t)}}function L$(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&N$(i)),t}return r._value=e,r}function z$(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 new Error;return this.tween(t,L$(e))}function M$(){for(var e=this._name,t=this._id,n=hj(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],u=s.length,c,f=0;f<u;++f)if(c=s[f]){var h=di(c,t);Wm(c,e,n,f,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new ka(r,this._parents,e,n)}function D$(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var u={value:s},c={value:function(){--i===0&&o()}};n.each(function(){var f=qi(this,r),h=f.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(u),t._.interrupt.push(u),t._.end.push(c)),f.on=t}),i===0&&o()})}var O$=0;function ka(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function hj(){return++O$}var ca=gf.prototype;ka.prototype={constructor:ka,select:_$,selectAll:g$,selectChild:ca.selectChild,selectChildren:ca.selectChildren,filter:u$,merge:c$,selection:v$,transition:M$,call:ca.call,nodes:ca.nodes,node:ca.node,size:ca.size,empty:ca.empty,each:ca.each,on:h$,attr:X7,attrTween:Z7,style:E$,styleTween:T$,text:R$,textTween:z$,remove:p$,tween:$7,delay:t$,duration:i$,ease:o$,easeVarying:l$,end:D$,[Symbol.iterator]:ca[Symbol.iterator]};function q$(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var I$={time:null,delay:0,duration:250,ease:q$};function P$(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function $$(e){var t,n;e instanceof ka?(t=e._id,e=e._name):(t=hj(),(n=I$).time=B1(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],u=s.length,c,f=0;f<u;++f)(c=s[f])&&Wm(c,e,t,f,s,n||P$(c,t));return new ka(r,this._parents,e,t)}gf.prototype.interrupt=q7;gf.prototype.transition=$$;const rh=e=>()=>e;function B$(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function ba(e,t,n){this.k=e,this.x=t,this.y=n}ba.prototype={constructor:ba,scale:function(e){return e===1?this:new ba(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ba(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 Km=new ba(1,0,0);mj.prototype=ba.prototype;function mj(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Km;return e.__zoom}function qg(e){e.stopImmediatePropagation()}function mc(e){e.preventDefault(),e.stopImmediatePropagation()}function U$(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function G$(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function EE(){return this.__zoom||Km}function F$(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function H$(){return navigator.maxTouchPoints||"ontouchstart"in this}function V$(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function pj(){var e=U$,t=G$,n=V$,r=F$,i=H$,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],u=250,c=qh,f=Hm("start","zoom","end"),h,m,_,g=500,b=150,E=0,C=10;function w($){$.property("__zoom",EE).on("wheel.zoom",X,{passive:!1}).on("mousedown.zoom",F).on("dblclick.zoom",I).filter(i).on("touchstart.zoom",U).on("touchmove.zoom",G).on("touchend.zoom touchcancel.zoom",q).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function($,Z,A,N){var H=$.selection?$.selection():$;H.property("__zoom",EE),$!==H?z($,Z,A,N):H.interrupt().each(function(){R(this,arguments).event(N).start().zoom(null,typeof Z=="function"?Z.apply(this,arguments):Z).end()})},w.scaleBy=function($,Z,A,N){w.scaleTo($,function(){var H=this.__zoom.k,Q=typeof Z=="function"?Z.apply(this,arguments):Z;return H*Q},A,N)},w.scaleTo=function($,Z,A,N){w.transform($,function(){var H=t.apply(this,arguments),Q=this.__zoom,D=A==null?S(H):typeof A=="function"?A.apply(this,arguments):A,B=Q.invert(D),ee=typeof Z=="function"?Z.apply(this,arguments):Z;return n(k(T(Q,ee),D,B),H,s)},A,N)},w.translateBy=function($,Z,A,N){w.transform($,function(){return n(this.__zoom.translate(typeof Z=="function"?Z.apply(this,arguments):Z,typeof A=="function"?A.apply(this,arguments):A),t.apply(this,arguments),s)},null,N)},w.translateTo=function($,Z,A,N,H){w.transform($,function(){var Q=t.apply(this,arguments),D=this.__zoom,B=N==null?S(Q):typeof N=="function"?N.apply(this,arguments):N;return n(Km.translate(B[0],B[1]).scale(D.k).translate(typeof Z=="function"?-Z.apply(this,arguments):-Z,typeof A=="function"?-A.apply(this,arguments):-A),Q,s)},N,H)};function T($,Z){return Z=Math.max(o[0],Math.min(o[1],Z)),Z===$.k?$:new ba(Z,$.x,$.y)}function k($,Z,A){var N=Z[0]-A[0]*$.k,H=Z[1]-A[1]*$.k;return N===$.x&&H===$.y?$:new ba($.k,N,H)}function S($){return[(+$[0][0]+ +$[1][0])/2,(+$[0][1]+ +$[1][1])/2]}function z($,Z,A,N){$.on("start.zoom",function(){R(this,arguments).event(N).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(N).end()}).tween("zoom",function(){var H=this,Q=arguments,D=R(H,Q).event(N),B=t.apply(H,Q),ee=A==null?S(B):typeof A=="function"?A.apply(H,Q):A,O=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),ie=H.__zoom,oe=typeof Z=="function"?Z.apply(H,Q):Z,me=c(ie.invert(ee).concat(O/ie.k),oe.invert(ee).concat(O/oe.k));return function(we){if(we===1)we=oe;else{var ne=me(we),de=O/ne[2];we=new ba(de,ee[0]-ne[0]*de,ee[1]-ne[1]*de)}D.zoom(null,we)}})}function R($,Z,A){return!A&&$.__zooming||new M($,Z)}function M($,Z){this.that=$,this.args=Z,this.active=0,this.sourceEvent=null,this.extent=t.apply($,Z),this.taps=0}M.prototype={event:function($){return $&&(this.sourceEvent=$),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function($,Z){return this.mouse&&$!=="mouse"&&(this.mouse[1]=Z.invert(this.mouse[0])),this.touch0&&$!=="touch"&&(this.touch0[1]=Z.invert(this.touch0[0])),this.touch1&&$!=="touch"&&(this.touch1[1]=Z.invert(this.touch1[0])),this.that.__zoom=Z,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function($){var Z=nr(this.that).datum();f.call($,this.that,new B$($,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:f}),Z)}};function X($,...Z){if(!e.apply(this,arguments))return;var A=R(this,Z).event($),N=this.__zoom,H=Math.max(o[0],Math.min(o[1],N.k*Math.pow(2,r.apply(this,arguments)))),Q=ni($);if(A.wheel)(A.mouse[0][0]!==Q[0]||A.mouse[0][1]!==Q[1])&&(A.mouse[1]=N.invert(A.mouse[0]=Q)),clearTimeout(A.wheel);else{if(N.k===H)return;A.mouse=[Q,N.invert(Q)],$h(this),A.start()}mc($),A.wheel=setTimeout(D,b),A.zoom("mouse",n(k(T(N,H),A.mouse[0],A.mouse[1]),A.extent,s));function D(){A.wheel=null,A.end()}}function F($,...Z){if(_||!e.apply(this,arguments))return;var A=$.currentTarget,N=R(this,Z,!0).event($),H=nr($.view).on("mousemove.zoom",ee,!0).on("mouseup.zoom",O,!0),Q=ni($,A),D=$.clientX,B=$.clientY;QT($.view),qg($),N.mouse=[Q,this.__zoom.invert(Q)],$h(this),N.start();function ee(ie){if(mc(ie),!N.moved){var oe=ie.clientX-D,me=ie.clientY-B;N.moved=oe*oe+me*me>E}N.event(ie).zoom("mouse",n(k(N.that.__zoom,N.mouse[0]=ni(ie,A),N.mouse[1]),N.extent,s))}function O(ie){H.on("mousemove.zoom mouseup.zoom",null),ZT(ie.view,N.moved),mc(ie),N.event(ie).end()}}function I($,...Z){if(e.apply(this,arguments)){var A=this.__zoom,N=ni($.changedTouches?$.changedTouches[0]:$,this),H=A.invert(N),Q=A.k*($.shiftKey?.5:2),D=n(k(T(A,Q),N,H),t.apply(this,Z),s);mc($),u>0?nr(this).transition().duration(u).call(z,D,N,$):nr(this).call(w.transform,D,N,$)}}function U($,...Z){if(e.apply(this,arguments)){var A=$.touches,N=A.length,H=R(this,Z,$.changedTouches.length===N).event($),Q,D,B,ee;for(qg($),D=0;D<N;++D)B=A[D],ee=ni(B,this),ee=[ee,this.__zoom.invert(ee),B.identifier],H.touch0?!H.touch1&&H.touch0[2]!==ee[2]&&(H.touch1=ee,H.taps=0):(H.touch0=ee,Q=!0,H.taps=1+!!h);h&&(h=clearTimeout(h)),Q&&(H.taps<2&&(m=ee[0],h=setTimeout(function(){h=null},g)),$h(this),H.start())}}function G($,...Z){if(this.__zooming){var A=R(this,Z).event($),N=$.changedTouches,H=N.length,Q,D,B,ee;for(mc($),Q=0;Q<H;++Q)D=N[Q],B=ni(D,this),A.touch0&&A.touch0[2]===D.identifier?A.touch0[0]=B:A.touch1&&A.touch1[2]===D.identifier&&(A.touch1[0]=B);if(D=A.that.__zoom,A.touch1){var O=A.touch0[0],ie=A.touch0[1],oe=A.touch1[0],me=A.touch1[1],we=(we=oe[0]-O[0])*we+(we=oe[1]-O[1])*we,ne=(ne=me[0]-ie[0])*ne+(ne=me[1]-ie[1])*ne;D=T(D,Math.sqrt(we/ne)),B=[(O[0]+oe[0])/2,(O[1]+oe[1])/2],ee=[(ie[0]+me[0])/2,(ie[1]+me[1])/2]}else if(A.touch0)B=A.touch0[0],ee=A.touch0[1];else return;A.zoom("touch",n(k(D,B,ee),A.extent,s))}}function q($,...Z){if(this.__zooming){var A=R(this,Z).event($),N=$.changedTouches,H=N.length,Q,D;for(qg($),_&&clearTimeout(_),_=setTimeout(function(){_=null},g),Q=0;Q<H;++Q)D=N[Q],A.touch0&&A.touch0[2]===D.identifier?delete A.touch0:A.touch1&&A.touch1[2]===D.identifier&&delete A.touch1;if(A.touch1&&!A.touch0&&(A.touch0=A.touch1,delete A.touch1),A.touch0)A.touch0[1]=this.__zoom.invert(A.touch0[0]);else if(A.end(),A.taps===2&&(D=ni(D,this),Math.hypot(m[0]-D[0],m[1]-D[1])<C)){var B=nr(this).on("dblclick.zoom");B&&B.apply(this,arguments)}}}return w.wheelDelta=function($){return arguments.length?(r=typeof $=="function"?$:rh(+$),w):r},w.filter=function($){return arguments.length?(e=typeof $=="function"?$:rh(!!$),w):e},w.touchable=function($){return arguments.length?(i=typeof $=="function"?$:rh(!!$),w):i},w.extent=function($){return arguments.length?(t=typeof $=="function"?$:rh([[+$[0][0],+$[0][1]],[+$[1][0],+$[1][1]]]),w):t},w.scaleExtent=function($){return arguments.length?(o[0]=+$[0],o[1]=+$[1],w):[o[0],o[1]]},w.translateExtent=function($){return arguments.length?(s[0][0]=+$[0][0],s[1][0]=+$[1][0],s[0][1]=+$[0][1],s[1][1]=+$[1][1],w):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},w.constrain=function($){return arguments.length?(n=$,w):n},w.duration=function($){return arguments.length?(u=+$,w):u},w.interpolate=function($){return arguments.length?(c=$,w):c},w.on=function(){var $=f.on.apply(f,arguments);return $===f?w:$},w.clickDistance=function($){return arguments.length?(E=($=+$)*$,w):Math.sqrt(E)},w.tapDistance=function($){return arguments.length?(C=+$,w):C},w}const fi={error001:(e="react")=>`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},Qc=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],_j=["Enter"," ","Escape"],gj={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Jl;(function(e){e.Strict="strict",e.Loose="loose"})(Jl||(Jl={}));var Es;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Es||(Es={}));var Zc;(function(e){e.Partial="partial",e.Full="full"})(Zc||(Zc={}));const yj={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var vo;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(vo||(vo={}));var lm;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(lm||(lm={}));var Pe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Pe||(Pe={}));const SE={[Pe.Left]:Pe.Right,[Pe.Right]:Pe.Left,[Pe.Top]:Pe.Bottom,[Pe.Bottom]:Pe.Top};function vj(e){return e===null?null:e?"valid":"invalid"}const bj=e=>"id"in e&&"source"in e&&"target"in e,X$=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),F1=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),vf=(e,t=[0,0])=>{const{width:n,height:r}=Sa(e),i=e.origin??t,o=n*i[0],s=r*i[1];return{x:e.position.x-o,y:e.position.y-s}},Y$=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const o=typeof i=="string";let s=!t.nodeLookup&&!o?i:void 0;t.nodeLookup&&(s=o?t.nodeLookup.get(i):F1(i)?i:t.nodeLookup.get(i.id));const u=s?um(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Qm(r,u)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Zm(n)},bf=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(i=>{(t.filter===void 0||t.filter(i))&&(n=Qm(n,um(i)),r=!0)}),r?Zm(n):{x:0,y:0,width:0,height:0}},H1=(e,t,[n,r,i]=[0,0,1],o=!1,s=!1)=>{const u=(t.x-n)/i,c=(t.y-r)/i,f=t.width/i,h=t.height/i,m=[];for(const _ of e.values()){const{measured:g,selectable:b=!0,hidden:E=!1}=_;if(s&&!b||E)continue;const C=g.width??_.width??_.initialWidth??0,w=g.height??_.height??_.initialHeight??0,{x:T,y:k}=_.internals.positionAbsolute,S=Ej(u,c,f,h,T,k,C,w),z=C*w,R=o&&S>0;(!_.internals.handleBounds||R||S>=z||_.dragging)&&m.push(_)}return m},W$=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function K$(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!i.hidden)&&(!r||r.has(i.id))&&n.set(i.id,i)}),n}async function Q$({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:o},s){if(e.size===0)return!0;const u=K$(e,s),c=bf(u),f=X1(c,t,n,(s==null?void 0:s.minZoom)??i,(s==null?void 0:s.maxZoom)??o,(s==null?void 0:s.padding)??.1);return await r.setViewport(f,{duration:s==null?void 0:s.duration,ease:s==null?void 0:s.ease,interpolate:s==null?void 0:s.interpolate}),!0}function xj({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:o}){const s=n.get(e),u=s.parentId?n.get(s.parentId):void 0,{x:c,y:f}=u?u.internals.positionAbsolute:{x:0,y:0},h=s.origin??r;let m=s.extent||i;if(s.extent==="parent"&&!s.expandParent)if(!u)o==null||o("005",fi.error005());else{const g=u.measured.width,b=u.measured.height;g&&b&&(m=[[c,f],[c+g,f+b]])}else u&&Rs(s.extent)&&(m=[[s.extent[0][0]+c,s.extent[0][1]+f],[s.extent[1][0]+c,s.extent[1][1]+f]]);const _=Rs(m)?As(t,m,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&(o==null||o("015",fi.error015())),{position:{x:_.x-c+(s.measured.width??0)*h[0],y:_.y-f+(s.measured.height??0)*h[1]},positionAbsolute:_}}async function Z$({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){const o=new Set(e.map(_=>_.id)),s=[];for(const _ of n){if(_.deletable===!1)continue;const g=o.has(_.id),b=!g&&_.parentId&&s.find(E=>E.id===_.parentId);(g||b)&&s.push(_)}const u=new Set(t.map(_=>_.id)),c=r.filter(_=>_.deletable!==!1),h=W$(s,c);for(const _ of c)u.has(_.id)&&!h.find(b=>b.id===_.id)&&h.push(_);if(!i)return{edges:h,nodes:s};const m=await i({nodes:s,edges:h});return typeof m=="boolean"?m?{edges:h,nodes:s}:{edges:[],nodes:[]}:m}const eu=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),As=(e={x:0,y:0},t,n)=>({x:eu(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:eu(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function wj(e,t,n){const{width:r,height:i}=Sa(n),{x:o,y:s}=n.internals.positionAbsolute;return As(e,[[o,s],[o+r,s+i]],t)}const CE=(e,t,n)=>e<t?eu(Math.abs(e-t),1,t)/t:e>n?-eu(Math.abs(e-n),1,t)/t:0,V1=(e,t,n=15,r=40)=>{const i=CE(e.x,r,t.width-r)*n,o=CE(e.y,r,t.height-r)*n;return[i,o]},Qm=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),yv=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Zm=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Jc=(e,t=[0,0])=>{var i,o;const{x:n,y:r}=F1(e)?e.internals.positionAbsolute:vf(e,t);return{x:n,y:r,width:((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0,height:((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0}},um=(e,t=[0,0])=>{var i,o;const{x:n,y:r}=F1(e)?e.internals.positionAbsolute:vf(e,t);return{x:n,y:r,x2:n+(((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0),y2:r+(((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0)}},kj=(e,t)=>Zm(Qm(yv(e),yv(t))),Ej=(e,t,n,r,i,o,s,u)=>{const c=Math.max(0,Math.min(e+n,i+s)-Math.max(e,i)),f=Math.max(0,Math.min(t+r,o+u)-Math.max(t,o));return Math.ceil(c*f)},cm=(e,t)=>Ej(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),TE=e=>si(e.width)&&si(e.height)&&si(e.x)&&si(e.y),si=e=>!isNaN(e)&&isFinite(e),Sj=(e,t)=>(n,r)=>{},xf=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),wf=({x:e,y:t},[n,r,i],o=!1,s=[1,1])=>{const u={x:(e-n)/i,y:(t-r)/i};return o?xf(u,s):u},tu=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function Cl(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function J$(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Cl(e,n),i=Cl(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e=="object"){const r=Cl(e.top??e.y??0,n),i=Cl(e.bottom??e.y??0,n),o=Cl(e.left??e.x??0,t),s=Cl(e.right??e.x??0,t);return{top:r,right:s,bottom:i,left:o,x:o+s,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function eB(e,t,n,r,i,o){const{x:s,y:u}=tu(e,[t,n,r]),{x:c,y:f}=tu({x:e.x+e.width,y:e.y+e.height},[t,n,r]),h=i-c,m=o-f;return{left:Math.floor(s),top:Math.floor(u),right:Math.floor(h),bottom:Math.floor(m)}}const X1=(e,t,n,r,i,o)=>{const s=J$(o,t,n),u=(t-s.x)/e.width,c=(n-s.y)/e.height,f=Math.min(u,c),h=eu(f,r,i),m=e.x+e.width/2,_=e.y+e.height/2,g=t/2-m*h,b=n/2-_*h,E=eB(e,g,b,h,t,n),C={left:Math.min(E.left-s.left,0),top:Math.min(E.top-s.top,0),right:Math.min(E.right-s.right,0),bottom:Math.min(E.bottom-s.bottom,0)};return{x:g-C.left+C.right,y:b-C.top+C.bottom,zoom:h}},ef=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Rs(e){return e!=null&&e!=="parent"}function Sa(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function Cj(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function Tj(e,t={width:0,height:0},n,r,i){const o={...e},s=r.get(n);if(s){const u=s.origin||i;o.x+=s.internals.positionAbsolute.x-(t.width??0)*u[0],o.y+=s.internals.positionAbsolute.y-(t.height??0)*u[1]}return o}function jE(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function tB(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}function nB(e){return{...gj,...e||{}}}function Ic(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){const{x:o,y:s}=li(e),u=wf({x:o-((i==null?void 0:i.left)??0),y:s-((i==null?void 0:i.top)??0)},r),{x:c,y:f}=n?xf(u,t):u;return{xSnapped:c,ySnapped:f,...u}}const Y1=e=>({width:e.offsetWidth,height:e.offsetHeight}),jj=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},rB=["INPUT","SELECT","TEXTAREA"];function Aj(e){var r,i;const t=((i=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:i[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:rB.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Rj=e=>"clientX"in e,li=(e,t)=>{var o,s;const n=Rj(e),r=n?e.clientX:(o=e.touches)==null?void 0:o[0].clientX,i=n?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},AE=(e,t,n,r,i)=>{const o=t.querySelectorAll(`.${e}`);return!o||!o.length?null:Array.from(o).map(s=>{const u=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:i,position:s.getAttribute("data-handlepos"),x:(u.left-n.left)/r,y:(u.top-n.top)/r,...Y1(s)}})};function Nj({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:o,targetControlX:s,targetControlY:u}){const c=e*.125+i*.375+s*.375+n*.125,f=t*.125+o*.375+u*.375+r*.125,h=Math.abs(c-e),m=Math.abs(f-t);return[c,f,h,m]}function ih(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function RE({pos:e,x1:t,y1:n,x2:r,y2:i,c:o}){switch(e){case Pe.Left:return[t-ih(t-r,o),n];case Pe.Right:return[t+ih(r-t,o),n];case Pe.Top:return[t,n-ih(n-i,o)];case Pe.Bottom:return[t,n+ih(i-n,o)]}}function Lj({sourceX:e,sourceY:t,sourcePosition:n=Pe.Bottom,targetX:r,targetY:i,targetPosition:o=Pe.Top,curvature:s=.25}){const[u,c]=RE({pos:n,x1:e,y1:t,x2:r,y2:i,c:s}),[f,h]=RE({pos:o,x1:r,y1:i,x2:e,y2:t,c:s}),[m,_,g,b]=Nj({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:u,sourceControlY:c,targetControlX:f,targetControlY:h});return[`M${e},${t} C${u},${c} ${f},${h} ${r},${i}`,m,_,g,b]}function zj({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,o=n<e?n+i:n-i,s=Math.abs(r-t)/2,u=r<t?r+s:r-s;return[o,u,i,s]}function iB({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:o="basic"}){if(o==="manual")return r;const s=i&&n?r+1e3:r,u=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return s+u}function aB({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){const o=Qm(um(e),um(t));o.x===o.x2&&(o.x2+=1),o.y===o.y2&&(o.y2+=1);const s={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]};return cm(s,Zm(o))>0}const oB=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,sB=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),lB=(e,t,n={})=>{var o;if(!e.source||!e.target)return(o=n.onError)==null||o.call(n,"006",fi.error006()),t;const r=n.getEdgeId||oB;let i;return bj(e)?i={...e}:i={...e,id:r(e)},sB(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function Mj({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,o,s,u]=zj({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,o,s,u]}const NE={[Pe.Left]:{x:-1,y:0},[Pe.Right]:{x:1,y:0},[Pe.Top]:{x:0,y:-1},[Pe.Bottom]:{x:0,y:1}},uB=({source:e,sourcePosition:t=Pe.Bottom,target:n})=>t===Pe.Left||t===Pe.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},LE=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function cB({source:e,sourcePosition:t=Pe.Bottom,target:n,targetPosition:r=Pe.Top,center:i,offset:o,stepPosition:s}){const u=NE[t],c=NE[r],f={x:e.x+u.x*o,y:e.y+u.y*o},h={x:n.x+c.x*o,y:n.y+c.y*o},m=uB({source:f,sourcePosition:t,target:h}),_=m.x!==0?"x":"y",g=m[_];let b=[],E,C;const w={x:0,y:0},T={x:0,y:0},[,,k,S]=zj({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(u[_]*c[_]===-1){_==="x"?(E=i.x??f.x+(h.x-f.x)*s,C=i.y??(f.y+h.y)/2):(E=i.x??(f.x+h.x)/2,C=i.y??f.y+(h.y-f.y)*s);const X=[{x:E,y:f.y},{x:E,y:h.y}],F=[{x:f.x,y:C},{x:h.x,y:C}];u[_]===g?b=_==="x"?X:F:b=_==="x"?F:X}else{const X=[{x:f.x,y:h.y}],F=[{x:h.x,y:f.y}];if(_==="x"?b=u.x===g?F:X:b=u.y===g?X:F,t===r){const $=Math.abs(e[_]-n[_]);if($<=o){const Z=Math.min(o-1,o-$);u[_]===g?w[_]=(f[_]>e[_]?-1:1)*Z:T[_]=(h[_]>n[_]?-1:1)*Z}}if(t!==r){const $=_==="x"?"y":"x",Z=u[_]===c[$],A=f[$]>h[$],N=f[$]<h[$];(u[_]===1&&(!Z&&A||Z&&N)||u[_]!==1&&(!Z&&N||Z&&A))&&(b=_==="x"?X:F)}const I={x:f.x+w.x,y:f.y+w.y},U={x:h.x+T.x,y:h.y+T.y},G=Math.max(Math.abs(I.x-b[0].x),Math.abs(U.x-b[0].x)),q=Math.max(Math.abs(I.y-b[0].y),Math.abs(U.y-b[0].y));G>=q?(E=(I.x+U.x)/2,C=b[0].y):(E=b[0].x,C=(I.y+U.y)/2)}const z={x:f.x+w.x,y:f.y+w.y},R={x:h.x+T.x,y:h.y+T.y};return[[e,...z.x!==b[0].x||z.y!==b[0].y?[z]:[],...b,...R.x!==b[b.length-1].x||R.y!==b[b.length-1].y?[R]:[],n],E,C,k,S]}function fB(e,t,n,r){const i=Math.min(LE(e,t)/2,LE(t,n)/2,r),{x:o,y:s}=t;if(e.x===o&&o===n.x||e.y===s&&s===n.y)return`L${o} ${s}`;if(e.y===s){const f=e.x<n.x?-1:1,h=e.y<n.y?1:-1;return`L ${o+i*f},${s}Q ${o},${s} ${o},${s+i*h}`}const u=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${o},${s+i*c}Q ${o},${s} ${o+i*u},${s}`}function vv({sourceX:e,sourceY:t,sourcePosition:n=Pe.Bottom,targetX:r,targetY:i,targetPosition:o=Pe.Top,borderRadius:s=5,centerX:u,centerY:c,offset:f=20,stepPosition:h=.5}){const[m,_,g,b,E]=cB({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:o,center:{x:u,y:c},offset:f,stepPosition:h});let C=`M${m[0].x} ${m[0].y}`;for(let w=1;w<m.length-1;w++)C+=fB(m[w-1],m[w],m[w+1],s);return C+=`L${m[m.length-1].x} ${m[m.length-1].y}`,[C,_,g,b,E]}function zE(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function dB(e){var m;const{sourceNode:t,targetNode:n}=e;if(!zE(t)||!zE(n))return null;const r=t.internals.handleBounds||ME(t.handles),i=n.internals.handleBounds||ME(n.handles),o=DE((r==null?void 0:r.source)??[],e.sourceHandle),s=DE(e.connectionMode===Jl.Strict?(i==null?void 0:i.target)??[]:((i==null?void 0:i.target)??[]).concat((i==null?void 0:i.source)??[]),e.targetHandle);if(!o||!s)return(m=e.onError)==null||m.call(e,"008",fi.error008(o?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const u=(o==null?void 0:o.position)||Pe.Bottom,c=(s==null?void 0:s.position)||Pe.Top,f=Ns(t,o,u),h=Ns(n,s,c);return{sourceX:f.x,sourceY:f.y,targetX:h.x,targetY:h.y,sourcePosition:u,targetPosition:c}}function ME(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function Ns(e,t,n=Pe.Left,r=!1){const i=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,o=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:s,height:u}=t??Sa(e);if(r)return{x:i+s/2,y:o+u/2};switch((t==null?void 0:t.position)??n){case Pe.Top:return{x:i+s/2,y:o};case Pe.Right:return{x:i+s,y:o+u/2};case Pe.Bottom:return{x:i+s/2,y:o+u};case Pe.Left:return{x:i,y:o+u/2}}}function DE(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function bv(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function hB(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){const o=new Set;return e.reduce((s,u)=>([u.markerStart||r,u.markerEnd||i].forEach(c=>{if(c&&typeof c=="object"){const f=bv(c,t);o.has(f)||(s.push({id:f,color:c.color||n,...c}),o.add(f))}}),s),[]).sort((s,u)=>s.id.localeCompare(u.id))}const Dj=1e3,mB=10,W1={nodeOrigin:[0,0],nodeExtent:Qc,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},pB={...W1,checkEquality:!0};function K1(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function _B(e,t,n){const r=K1(W1,n);for(const i of e.values())if(i.parentId)Z1(i,e,t,r);else{const o=vf(i,r.nodeOrigin),s=Rs(i.extent)?i.extent:r.nodeExtent,u=As(o,s,Sa(i));i.internals.positionAbsolute=u}}function gB(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const i of e.handles){const o={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?n.push(o):i.type==="target"&&r.push(o)}return{source:n,target:r}}function Q1(e){return e==="manual"}function xv(e,t,n,r={}){var h,m;const i=K1(pB,r),o={i:0},s=new Map(t),u=i!=null&&i.elevateNodesOnSelect&&!Q1(i.zIndexMode)?Dj:0;let c=e.length>0,f=!1;t.clear(),n.clear();for(const _ of e){let g=s.get(_.id);if(i.checkEquality&&_===(g==null?void 0:g.internals.userNode))t.set(_.id,g);else{const b=vf(_,i.nodeOrigin),E=Rs(_.extent)?_.extent:i.nodeExtent,C=As(b,E,Sa(_));g={...i.defaults,..._,measured:{width:(h=_.measured)==null?void 0:h.width,height:(m=_.measured)==null?void 0:m.height},internals:{positionAbsolute:C,handleBounds:gB(_,g),z:Oj(_,u,i.zIndexMode),userNode:_}},t.set(_.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(c=!1),_.parentId&&Z1(g,t,n,r,o),f||(f=_.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:f}}function yB(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Z1(e,t,n,r,i){const{elevateNodesOnSelect:o,nodeOrigin:s,nodeExtent:u,zIndexMode:c}=K1(W1,r),f=e.parentId,h=t.get(f);if(!h){console.warn(`Parent node ${f} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}yB(e,n),i&&!h.parentId&&h.internals.rootParentIndex===void 0&&c==="auto"&&(h.internals.rootParentIndex=++i.i,h.internals.z=h.internals.z+i.i*mB),i&&h.internals.rootParentIndex!==void 0&&(i.i=h.internals.rootParentIndex);const m=o&&!Q1(c)?Dj:0,{x:_,y:g,z:b}=vB(e,h,s,u,m,c),{positionAbsolute:E}=e.internals,C=_!==E.x||g!==E.y;(C||b!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:C?{x:_,y:g}:E,z:b}})}function Oj(e,t,n){const r=si(e.zIndex)?e.zIndex:0;return Q1(n)?r:r+(e.selected?t:0)}function vB(e,t,n,r,i,o){const{x:s,y:u}=t.internals.positionAbsolute,c=Sa(e),f=vf(e,n),h=Rs(e.extent)?As(f,e.extent,c):f;let m=As({x:s+h.x,y:u+h.y},r,c);e.extent==="parent"&&(m=wj(m,c,t));const _=Oj(e,i,o),g=t.internals.z??0;return{x:m.x,y:m.y,z:g>=_?g+1:_}}function J1(e,t,n,r=[0,0]){var s;const i=[],o=new Map;for(const u of e){const c=t.get(u.parentId);if(!c)continue;const f=((s=o.get(u.parentId))==null?void 0:s.expandedRect)??Jc(c),h=kj(f,u.rect);o.set(u.parentId,{expandedRect:h,parent:c})}return o.size>0&&o.forEach(({expandedRect:u,parent:c},f)=>{var k;const h=c.internals.positionAbsolute,m=Sa(c),_=c.origin??r,g=u.x<h.x?Math.round(Math.abs(h.x-u.x)):0,b=u.y<h.y?Math.round(Math.abs(h.y-u.y)):0,E=Math.max(m.width,Math.round(u.width)),C=Math.max(m.height,Math.round(u.height)),w=(E-m.width)*_[0],T=(C-m.height)*_[1];(g>0||b>0||w||T)&&(i.push({id:f,type:"position",position:{x:c.position.x-g+w,y:c.position.y-b+T}}),(k=n.get(f))==null||k.forEach(S=>{e.some(z=>z.id===S.id)||i.push({id:S.id,type:"position",position:{x:S.position.x+g,y:S.position.y+b}})})),(m.width<u.width||m.height<u.height||g||b)&&i.push({id:f,type:"dimensions",setAttributes:!0,dimensions:{width:E+(g?_[0]*g-w:0),height:C+(b?_[1]*b-T:0)}})}),i}function bB(e,t,n,r,i,o,s){const u=r==null?void 0:r.querySelector(".xyflow__viewport");let c=!1;if(!u)return{changes:[],updatedInternals:c};const f=[],h=window.getComputedStyle(u),{m22:m}=new window.DOMMatrixReadOnly(h.transform),_=[];for(const g of e.values()){const b=t.get(g.id);if(!b)continue;if(b.hidden){t.set(b.id,{...b,internals:{...b.internals,handleBounds:void 0}}),c=!0;continue}const E=Y1(g.nodeElement),C=b.measured.width!==E.width||b.measured.height!==E.height;if(!!(E.width&&E.height&&(C||!b.internals.handleBounds||g.force))){const T=g.nodeElement.getBoundingClientRect(),k=Rs(b.extent)?b.extent:o;let{positionAbsolute:S}=b.internals;b.parentId&&b.extent==="parent"?S=wj(S,E,t.get(b.parentId)):k&&(S=As(S,k,E));const z={...b,measured:E,internals:{...b.internals,positionAbsolute:S,handleBounds:{source:AE("source",g.nodeElement,T,m,b.id),target:AE("target",g.nodeElement,T,m,b.id)}}};t.set(b.id,z),b.parentId&&Z1(z,t,n,{nodeOrigin:i,zIndexMode:s}),c=!0,C&&(f.push({id:b.id,type:"dimensions",dimensions:E}),b.expandParent&&b.parentId&&_.push({id:b.id,parentId:b.parentId,rect:Jc(z,i)}))}}if(_.length>0){const g=J1(_,t,n,i);f.push(...g)}return{changes:f,updatedInternals:c}}async function xB({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:o}){if(!t||!e.x&&!e.y)return!1;const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,o]],r);return!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2])}function OE(e,t,n,r,i,o){let s=i;const u=r.get(s)||new Map;r.set(s,u.set(n,t)),s=`${i}-${e}`;const c=r.get(s)||new Map;if(r.set(s,c.set(n,t)),o){s=`${i}-${e}-${o}`;const f=r.get(s)||new Map;r.set(s,f.set(n,t))}}function qj(e,t,n){e.clear(),t.clear();for(const r of n){const{source:i,target:o,sourceHandle:s=null,targetHandle:u=null}=r,c={edgeId:r.id,source:i,target:o,sourceHandle:s,targetHandle:u},f=`${i}-${s}--${o}-${u}`,h=`${o}-${u}--${i}-${s}`;OE("source",c,h,e,i,s),OE("target",c,f,e,o,u),t.set(r.id,r)}}function Ij(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Ij(n,t):!1}function qE(e,t,n){var i;let r=e;do{if((i=r==null?void 0:r.matches)!=null&&i.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function wB(e,t,n,r){const i=new Map;for(const[o,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!Ij(s,e))&&(s.draggable||t&&typeof s.draggable>"u")){const u=e.get(o);u&&i.set(o,{id:o,position:u.position||{x:0,y:0},distance:{x:n.x-u.internals.positionAbsolute.x,y:n.y-u.internals.positionAbsolute.y},extent:u.extent,parentId:u.parentId,origin:u.origin,expandParent:u.expandParent,internals:{positionAbsolute:u.internals.positionAbsolute||{x:0,y:0}},measured:{width:u.measured.width??0,height:u.measured.height??0}})}return i}function Ig({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var s,u,c;const i=[];for(const[f,h]of t){const m=(s=n.get(f))==null?void 0:s.internals.userNode;m&&i.push({...m,position:h.position,dragging:r})}if(!e)return[i[0],i];const o=(u=n.get(e))==null?void 0:u.internals.userNode;return[o?{...o,position:((c=t.get(e))==null?void 0:c.position)||o.position,dragging:r}:i[0],i]}function kB({dragItems:e,snapGrid:t,x:n,y:r}){const i=e.values().next().value;if(!i)return null;const o={x:n-i.distance.x,y:r-i.distance.y},s=xf(o,t);return{x:s.x-o.x,y:s.y-o.y}}function EB({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let o={x:null,y:null},s=0,u=new Map,c=!1,f={x:0,y:0},h=null,m=!1,_=null,g=!1,b=!1,E=null;function C({noDragClassName:T,handleSelector:k,domNode:S,isSelectable:z,nodeId:R,nodeClickDistance:M=0}){_=nr(S);function X({x:G,y:q}){const{nodeLookup:$,nodeExtent:Z,snapGrid:A,snapToGrid:N,nodeOrigin:H,onNodeDrag:Q,onSelectionDrag:D,onError:B,updateNodePositions:ee}=t();o={x:G,y:q};let O=!1;const ie=u.size>1,oe=ie&&Z?yv(bf(u)):null,me=ie&&N?kB({dragItems:u,snapGrid:A,x:G,y:q}):null;for(const[we,ne]of u){if(!$.has(we))continue;let de={x:G-ne.distance.x,y:q-ne.distance.y};N&&(de=me?{x:Math.round(de.x+me.x),y:Math.round(de.y+me.y)}:xf(de,A));let le=null;if(ie&&Z&&!ne.extent&&oe){const{positionAbsolute:Ae}=ne.internals,Ce=Ae.x-oe.x+Z[0][0],Te=Ae.x+ne.measured.width-oe.x2+Z[1][0],ue=Ae.y-oe.y+Z[0][1],it=Ae.y+ne.measured.height-oe.y2+Z[1][1];le=[[Ce,ue],[Te,it]]}const{position:ke,positionAbsolute:ge}=xj({nodeId:we,nextPosition:de,nodeLookup:$,nodeExtent:le||Z,nodeOrigin:H,onError:B});O=O||ne.position.x!==ke.x||ne.position.y!==ke.y,ne.position=ke,ne.internals.positionAbsolute=ge}if(b=b||O,!!O&&(ee(u,!0),E&&(r||Q||!R&&D))){const[we,ne]=Ig({nodeId:R,dragItems:u,nodeLookup:$});r==null||r(E,u,we,ne),Q==null||Q(E,we,ne),R||D==null||D(E,ne)}}async function F(){if(!h)return;const{transform:G,panBy:q,autoPanSpeed:$,autoPanOnNodeDrag:Z}=t();if(!Z){c=!1,cancelAnimationFrame(s);return}const[A,N]=V1(f,h,$);(A!==0||N!==0)&&(o.x=(o.x??0)-A/G[2],o.y=(o.y??0)-N/G[2],await q({x:A,y:N})&&X(o)),s=requestAnimationFrame(F)}function I(G){var ie;const{nodeLookup:q,multiSelectionActive:$,nodesDraggable:Z,transform:A,snapGrid:N,snapToGrid:H,selectNodesOnDrag:Q,onNodeDragStart:D,onSelectionDragStart:B,unselectNodesAndEdges:ee}=t();m=!0,(!Q||!z)&&!$&&R&&((ie=q.get(R))!=null&&ie.selected||ee()),z&&Q&&R&&(e==null||e(R));const O=Ic(G.sourceEvent,{transform:A,snapGrid:N,snapToGrid:H,containerBounds:h});if(o=O,u=wB(q,Z,O,R),u.size>0&&(n||D||!R&&B)){const[oe,me]=Ig({nodeId:R,dragItems:u,nodeLookup:q});n==null||n(G.sourceEvent,u,oe,me),D==null||D(G.sourceEvent,oe,me),R||B==null||B(G.sourceEvent,me)}}const U=JT().clickDistance(M).on("start",G=>{const{domNode:q,nodeDragThreshold:$,transform:Z,snapGrid:A,snapToGrid:N}=t();h=(q==null?void 0:q.getBoundingClientRect())||null,g=!1,b=!1,E=G.sourceEvent,$===0&&I(G),o=Ic(G.sourceEvent,{transform:Z,snapGrid:A,snapToGrid:N,containerBounds:h}),f=li(G.sourceEvent,h)}).on("drag",G=>{const{autoPanOnNodeDrag:q,transform:$,snapGrid:Z,snapToGrid:A,nodeDragThreshold:N,nodeLookup:H}=t(),Q=Ic(G.sourceEvent,{transform:$,snapGrid:Z,snapToGrid:A,containerBounds:h});if(E=G.sourceEvent,(G.sourceEvent.type==="touchmove"&&G.sourceEvent.touches.length>1||R&&!H.has(R))&&(g=!0),!g){if(!c&&q&&m&&(c=!0,F()),!m){const D=li(G.sourceEvent,h),B=D.x-f.x,ee=D.y-f.y;Math.sqrt(B*B+ee*ee)>N&&I(G)}(o.x!==Q.xSnapped||o.y!==Q.ySnapped)&&u&&m&&(f=li(G.sourceEvent,h),X(Q))}}).on("end",G=>{if(!m||g){g&&u.size>0&&t().updateNodePositions(u,!1);return}if(c=!1,m=!1,cancelAnimationFrame(s),u.size>0){const{nodeLookup:q,updateNodePositions:$,onNodeDragStop:Z,onSelectionDragStop:A}=t();if(b&&($(u,!1),b=!1),i||Z||!R&&A){const[N,H]=Ig({nodeId:R,dragItems:u,nodeLookup:q,dragging:!1});i==null||i(G.sourceEvent,u,N,H),Z==null||Z(G.sourceEvent,N,H),R||A==null||A(G.sourceEvent,H)}}}).filter(G=>{const q=G.target;return!G.button&&(!T||!qE(q,`.${T}`,S))&&(!k||qE(q,k,S))});_.call(U)}function w(){_==null||_.on(".drag",null)}return{update:C,destroy:w}}function SB(e,t,n){const r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const o of t.values())cm(i,Jc(o))>0&&r.push(o);return r}const CB=250;function TB(e,t,n,r){var u,c;let i=[],o=1/0;const s=SB(e,n,t+CB);for(const f of s){const h=[...((u=f.internals.handleBounds)==null?void 0:u.source)??[],...((c=f.internals.handleBounds)==null?void 0:c.target)??[]];for(const m of h){if(r.nodeId===m.nodeId&&r.type===m.type&&r.id===m.id)continue;const{x:_,y:g}=Ns(f,m,m.position,!0),b=Math.sqrt(Math.pow(_-e.x,2)+Math.pow(g-e.y,2));b>t||(b<o?(i=[{...m,x:_,y:g}],o=b):b===o&&i.push({...m,x:_,y:g}))}}if(!i.length)return null;if(i.length>1){const f=r.type==="source"?"target":"source";return i.find(h=>h.type===f)??i[0]}return i[0]}function Pj(e,t,n,r,i,o=!1){var f,h,m;const s=r.get(e);if(!s)return null;const u=i==="strict"?(f=s.internals.handleBounds)==null?void 0:f[t]:[...((h=s.internals.handleBounds)==null?void 0:h.source)??[],...((m=s.internals.handleBounds)==null?void 0:m.target)??[]],c=(n?u==null?void 0:u.find(_=>_.id===n):u==null?void 0:u[0])??null;return c&&o?{...c,...Ns(s,c,c.position,!0)}:c}function $j(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function jB(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Bj=()=>!0;function AB(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:o,isTarget:s,domNode:u,nodeLookup:c,lib:f,autoPanOnConnect:h,flowId:m,panBy:_,cancelConnection:g,onConnectStart:b,onConnect:E,onConnectEnd:C,isValidConnection:w=Bj,onReconnectEnd:T,updateConnection:k,getTransform:S,getFromHandle:z,autoPanSpeed:R,dragThreshold:M=1,handleDomNode:X}){const F=jj(e.target);let I=0,U;const{x:G,y:q}=li(e),$=$j(o,X),Z=u==null?void 0:u.getBoundingClientRect();let A=!1;if(!Z||!$)return;const N=Pj(i,$,r,c,t);if(!N)return;let H=li(e,Z),Q=!1,D=null,B=!1,ee=null;function O(){if(!h||!Z)return;const[ke,ge]=V1(H,Z,R);_({x:ke,y:ge}),I=requestAnimationFrame(O)}const ie={...N,nodeId:i,type:$,position:N.position},oe=c.get(i);let we={inProgress:!0,isValid:null,from:Ns(oe,ie,Pe.Left,!0),fromHandle:ie,fromPosition:ie.position,fromNode:oe,to:H,toHandle:null,toPosition:SE[ie.position],toNode:null,pointer:H};function ne(){A=!0,k(we),b==null||b(e,{nodeId:i,handleId:r,handleType:$})}M===0&&ne();function de(ke){if(!A){const{x:it,y:wt}=li(ke),kt=it-G,Tt=wt-q;if(!(kt*kt+Tt*Tt>M*M))return;ne()}if(!z()||!ie){le(ke);return}const ge=S();H=li(ke,Z),U=TB(wf(H,ge,!1,[1,1]),n,c,ie),Q||(O(),Q=!0);const Ae=Uj(ke,{handle:U,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:s?"target":"source",isValidConnection:w,doc:F,lib:f,flowId:m,nodeLookup:c});ee=Ae.handleDomNode,D=Ae.connection,B=jB(!!U,Ae.isValid);const Ce=c.get(i),Te=Ce?Ns(Ce,ie,Pe.Left,!0):we.from,ue={...we,from:Te,isValid:B,to:Ae.toHandle&&B?tu({x:Ae.toHandle.x,y:Ae.toHandle.y},ge):H,toHandle:Ae.toHandle,toPosition:B&&Ae.toHandle?Ae.toHandle.position:SE[ie.position],toNode:Ae.toHandle?c.get(Ae.toHandle.nodeId):null,pointer:H};k(ue),we=ue}function le(ke){if(!("touches"in ke&&ke.touches.length>0)){if(A){(U||ee)&&D&&B&&(E==null||E(D));const{inProgress:ge,...Ae}=we,Ce={...Ae,toPosition:we.toHandle?we.toPosition:null};C==null||C(ke,Ce),o&&(T==null||T(ke,Ce))}g(),cancelAnimationFrame(I),Q=!1,B=!1,D=null,ee=null,F.removeEventListener("mousemove",de),F.removeEventListener("mouseup",le),F.removeEventListener("touchmove",de),F.removeEventListener("touchend",le)}}F.addEventListener("mousemove",de),F.addEventListener("mouseup",le),F.addEventListener("touchmove",de),F.addEventListener("touchend",le)}function Uj(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:o,doc:s,lib:u,flowId:c,isValidConnection:f=Bj,nodeLookup:h}){const m=o==="target",_=t?s.querySelector(`.${u}-flow__handle[data-id="${c}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:g,y:b}=li(e),E=s.elementFromPoint(g,b),C=E!=null&&E.classList.contains(`${u}-flow__handle`)?E:_,w={handleDomNode:C,isValid:!1,connection:null,toHandle:null};if(C){const T=$j(void 0,C),k=C.getAttribute("data-nodeid"),S=C.getAttribute("data-handleid"),z=C.classList.contains("connectable"),R=C.classList.contains("connectableend");if(!k||!T)return w;const M={source:m?k:r,sourceHandle:m?S:i,target:m?r:k,targetHandle:m?i:S};w.connection=M;const F=z&&R&&(n===Jl.Strict?m&&T==="source"||!m&&T==="target":k!==r||S!==i);w.isValid=F&&f(M),w.toHandle=Pj(k,T,S,h,n,!0)}return w}const wv={onPointerDown:AB,isValid:Uj};function RB({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const i=nr(e);function o({translateExtent:u,width:c,height:f,zoomStep:h=1,pannable:m=!0,zoomable:_=!0,inversePan:g=!1}){const b=k=>{if(k.sourceEvent.type!=="wheel"||!t)return;const S=n(),z=k.sourceEvent.ctrlKey&&ef()?10:1,R=-k.sourceEvent.deltaY*(k.sourceEvent.deltaMode===1?.05:k.sourceEvent.deltaMode?1:.002)*h,M=S[2]*Math.pow(2,R*z);t.scaleTo(M)};let E=[0,0];const C=k=>{(k.sourceEvent.type==="mousedown"||k.sourceEvent.type==="touchstart")&&(E=[k.sourceEvent.clientX??k.sourceEvent.touches[0].clientX,k.sourceEvent.clientY??k.sourceEvent.touches[0].clientY])},w=k=>{const S=n();if(k.sourceEvent.type!=="mousemove"&&k.sourceEvent.type!=="touchmove"||!t)return;const z=[k.sourceEvent.clientX??k.sourceEvent.touches[0].clientX,k.sourceEvent.clientY??k.sourceEvent.touches[0].clientY],R=[z[0]-E[0],z[1]-E[1]];E=z;const M=r()*Math.max(S[2],Math.log(S[2]))*(g?-1:1),X={x:S[0]-R[0]*M,y:S[1]-R[1]*M},F=[[0,0],[c,f]];t.setViewportConstrained({x:X.x,y:X.y,zoom:S[2]},F,u)},T=pj().on("start",C).on("zoom",m?w:null).on("zoom.wheel",_?b:null);i.call(T,{})}function s(){i.on("zoom",null)}return{update:o,destroy:s,pointer:ni}}const Jm=e=>({x:e.x,y:e.y,zoom:e.k}),Pg=({x:e,y:t,zoom:n})=>Km.translate(e,t).scale(n),$l=(e,t)=>e.target.closest(`.${t}`),Gj=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),NB=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,$g=(e,t=0,n=NB,r=()=>{})=>{const i=typeof t=="number"&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on("end",r):e},Fj=e=>{const t=e.ctrlKey&&ef()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function LB({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:o,zoomOnPinch:s,onPanZoomStart:u,onPanZoom:c,onPanZoomEnd:f}){return h=>{if($l(h,t))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const m=n.property("__zoom").k||1;if(h.ctrlKey&&s){const C=ni(h),w=Fj(h),T=m*Math.pow(2,w);r.scaleTo(n,T,C,h);return}const _=h.deltaMode===1?20:1;let g=i===Es.Vertical?0:h.deltaX*_,b=i===Es.Horizontal?0:h.deltaY*_;!ef()&&h.shiftKey&&i!==Es.Vertical&&(g=h.deltaY*_,b=0),r.translateBy(n,-(g/m)*o,-(b/m)*o,{internal:!0});const E=Jm(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(h,E),e.panScrollTimeout=setTimeout(()=>{f==null||f(h,E),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,u==null||u(h,E))}}function zB({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){const o=r.type==="wheel",s=!t&&o&&!r.ctrlKey,u=$l(r,e);if(r.ctrlKey&&o&&u&&r.preventDefault(),s||u)return null;r.preventDefault(),n.call(this,r,i)}}function MB({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var o,s,u;if((o=r.sourceEvent)!=null&&o.internal)return;const i=Jm(r.transform);e.mouseButton=((s=r.sourceEvent)==null?void 0:s.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=i,((u=r.sourceEvent)==null?void 0:u.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,i))}}function DB({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return o=>{var s,u;e.usedRightMouseButton=!!(n&&Gj(t,e.mouseButton??0)),(s=o.sourceEvent)!=null&&s.sync||r([o.transform.x,o.transform.y,o.transform.k]),i&&!((u=o.sourceEvent)!=null&&u.internal)&&(i==null||i(o.sourceEvent,Jm(o.transform)))}}function OB({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:o}){return s=>{var u;if(!((u=s.sourceEvent)!=null&&u.internal)&&(e.isZoomingOrPanning=!1,o&&Gj(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&o(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){const c=Jm(s.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(s.sourceEvent,c)},n?150:0)}}}function qB({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:o,userSelectionActive:s,noWheelClassName:u,noPanClassName:c,lib:f,connectionInProgress:h}){return m=>{var C;const _=e||t,g=n&&m.ctrlKey,b=m.type==="wheel";if(m.button===1&&m.type==="mousedown"&&($l(m,`${f}-flow__node`)||$l(m,`${f}-flow__edge`)))return!0;if(!r&&!_&&!i&&!o&&!n||s||h&&!b||$l(m,u)&&b||$l(m,c)&&(!b||i&&b&&!e)||!n&&m.ctrlKey&&b)return!1;if(!n&&m.type==="touchstart"&&((C=m.touches)==null?void 0:C.length)>1)return m.preventDefault(),!1;if(!_&&!i&&!g&&b||!r&&(m.type==="mousedown"||m.type==="touchstart")||Array.isArray(r)&&!r.includes(m.button)&&m.type==="mousedown")return!1;const E=Array.isArray(r)&&r.includes(m.button)||!m.button||m.button<=1;return(!m.ctrlKey||b)&&E}}function IB({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:o,onPanZoomStart:s,onPanZoomEnd:u,onDraggingChange:c}){const f={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),m=pj().scaleExtent([t,n]).translateExtent(r),_=nr(e).call(m);T({x:i.x,y:i.y,zoom:eu(i.zoom,t,n)},[[0,0],[h.width,h.height]],r);const g=_.on("wheel.zoom"),b=_.on("dblclick.zoom");m.wheelDelta(Fj);async function E(U,G){return _?new Promise(q=>{m==null||m.interpolate((G==null?void 0:G.interpolate)==="linear"?qc:qh).transform($g(_,G==null?void 0:G.duration,G==null?void 0:G.ease,()=>q(!0)),U)}):!1}function C({noWheelClassName:U,noPanClassName:G,onPaneContextMenu:q,userSelectionActive:$,panOnScroll:Z,panOnDrag:A,panOnScrollMode:N,panOnScrollSpeed:H,preventScrolling:Q,zoomOnPinch:D,zoomOnScroll:B,zoomOnDoubleClick:ee,zoomActivationKeyPressed:O,lib:ie,onTransformChange:oe,connectionInProgress:me,paneClickDistance:we,selectionOnDrag:ne}){$&&!f.isZoomingOrPanning&&w();const de=Z&&!O&&!$;m.clickDistance(ne?1/0:!si(we)||we<0?0:we);const le=de?LB({zoomPanValues:f,noWheelClassName:U,d3Selection:_,d3Zoom:m,panOnScrollMode:N,panOnScrollSpeed:H,zoomOnPinch:D,onPanZoomStart:s,onPanZoom:o,onPanZoomEnd:u}):zB({noWheelClassName:U,preventScrolling:Q,d3ZoomHandler:g});_.on("wheel.zoom",le,{passive:!1});const ke=MB({zoomPanValues:f,onDraggingChange:c,onPanZoomStart:s});m.on("start",ke);const ge=DB({zoomPanValues:f,panOnDrag:A,onPaneContextMenu:!!q,onPanZoom:o,onTransformChange:oe});m.on("zoom",ge);const Ae=OB({zoomPanValues:f,panOnDrag:A,panOnScroll:Z,onPaneContextMenu:q,onPanZoomEnd:u,onDraggingChange:c});m.on("end",Ae);const Ce=qB({zoomActivationKeyPressed:O,panOnDrag:A,zoomOnScroll:B,panOnScroll:Z,zoomOnDoubleClick:ee,zoomOnPinch:D,userSelectionActive:$,noPanClassName:G,noWheelClassName:U,lib:ie,connectionInProgress:me});m.filter(Ce),ee?_.on("dblclick.zoom",b):_.on("dblclick.zoom",null)}function w(){m.on("zoom",null)}async function T(U,G,q){const $=Pg(U),Z=m==null?void 0:m.constrain()($,G,q);return Z&&await E(Z),Z}async function k(U,G){const q=Pg(U);return await E(q,G),q}function S(U){if(_){const G=Pg(U),q=_.property("__zoom");(q.k!==U.zoom||q.x!==U.x||q.y!==U.y)&&(m==null||m.transform(_,G,null,{sync:!0}))}}function z(){const U=_?mj(_.node()):{x:0,y:0,k:1};return{x:U.x,y:U.y,zoom:U.k}}async function R(U,G){return _?new Promise(q=>{m==null||m.interpolate((G==null?void 0:G.interpolate)==="linear"?qc:qh).scaleTo($g(_,G==null?void 0:G.duration,G==null?void 0:G.ease,()=>q(!0)),U)}):!1}async function M(U,G){return _?new Promise(q=>{m==null||m.interpolate((G==null?void 0:G.interpolate)==="linear"?qc:qh).scaleBy($g(_,G==null?void 0:G.duration,G==null?void 0:G.ease,()=>q(!0)),U)}):!1}function X(U){m==null||m.scaleExtent(U)}function F(U){m==null||m.translateExtent(U)}function I(U){const G=!si(U)||U<0?0:U;m==null||m.clickDistance(G)}return{update:C,destroy:w,setViewport:k,setViewportConstrained:T,getViewport:z,scaleTo:R,scaleBy:M,setScaleExtent:X,setTranslateExtent:F,syncViewport:S,setClickDistance:I}}var nu;(function(e){e.Line="line",e.Handle="handle"})(nu||(nu={}));function PB({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:o}){const s=e-t,u=n-r,c=[s>0?1:s<0?-1:0,u>0?1:u<0?-1:0];return s&&i&&(c[0]=c[0]*-1),u&&o&&(c[1]=c[1]*-1),c}function IE(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:i}}function co(e,t){return Math.max(0,t-e)}function fo(e,t){return Math.max(0,e-t)}function ah(e,t,n){return Math.max(0,t-e,e-n)}function PE(e,t){return e?!t:t}function $B(e,t,n,r,i,o,s,u){let{affectsX:c,affectsY:f}=t;const{isHorizontal:h,isVertical:m}=t,_=h&&m,{xSnapped:g,ySnapped:b}=n,{minWidth:E,maxWidth:C,minHeight:w,maxHeight:T}=r,{x:k,y:S,width:z,height:R,aspectRatio:M}=e;let X=Math.floor(h?g-e.pointerX:0),F=Math.floor(m?b-e.pointerY:0);const I=z+(c?-X:X),U=R+(f?-F:F),G=-o[0]*z,q=-o[1]*R;let $=ah(I,E,C),Z=ah(U,w,T);if(s){let H=0,Q=0;c&&X<0?H=co(k+X+G,s[0][0]):!c&&X>0&&(H=fo(k+I+G,s[1][0])),f&&F<0?Q=co(S+F+q,s[0][1]):!f&&F>0&&(Q=fo(S+U+q,s[1][1])),$=Math.max($,H),Z=Math.max(Z,Q)}if(u){let H=0,Q=0;c&&X>0?H=fo(k+X,u[0][0]):!c&&X<0&&(H=co(k+I,u[1][0])),f&&F>0?Q=fo(S+F,u[0][1]):!f&&F<0&&(Q=co(S+U,u[1][1])),$=Math.max($,H),Z=Math.max(Z,Q)}if(i){if(h){const H=ah(I/M,w,T)*M;if($=Math.max($,H),s){let Q=0;!c&&!f||c&&!f&&_?Q=fo(S+q+I/M,s[1][1])*M:Q=co(S+q+(c?X:-X)/M,s[0][1])*M,$=Math.max($,Q)}if(u){let Q=0;!c&&!f||c&&!f&&_?Q=co(S+I/M,u[1][1])*M:Q=fo(S+(c?X:-X)/M,u[0][1])*M,$=Math.max($,Q)}}if(m){const H=ah(U*M,E,C)/M;if(Z=Math.max(Z,H),s){let Q=0;!c&&!f||f&&!c&&_?Q=fo(k+U*M+G,s[1][0])/M:Q=co(k+(f?F:-F)*M+G,s[0][0])/M,Z=Math.max(Z,Q)}if(u){let Q=0;!c&&!f||f&&!c&&_?Q=co(k+U*M,u[1][0])/M:Q=fo(k+(f?F:-F)*M,u[0][0])/M,Z=Math.max(Z,Q)}}}F=F+(F<0?Z:-Z),X=X+(X<0?$:-$),i&&(_?I>U*M?F=(PE(c,f)?-X:X)/M:X=(PE(c,f)?-F:F)*M:h?(F=X/M,f=c):(X=F*M,c=f));const A=c?k+X:k,N=f?S+F:S;return{width:z+(c?-X:X),height:R+(f?-F:F),x:o[0]*X*(c?-1:1)+A,y:o[1]*F*(f?-1:1)+N}}const Hj={width:0,height:0,x:0,y:0},BB={...Hj,pointerX:0,pointerY:0,aspectRatio:1};function UB(e,t,n){const r=t.position.x+e.position.x,i=t.position.y+e.position.y,o=e.measured.width??0,s=e.measured.height??0,u=n[0]*o,c=n[1]*s;return[[r-u,i-c],[r+o-u,i+s-c]]}function GB({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){const o=nr(e);let s={controlDirection:IE("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function u({controlPosition:f,boundaries:h,keepAspectRatio:m,resizeDirection:_,onResizeStart:g,onResize:b,onResizeEnd:E,shouldResize:C}){let w={...Hj},T={...BB};s={boundaries:h,resizeDirection:_,keepAspectRatio:m,controlDirection:IE(f)};let k,S=null,z=[],R,M,X,F=!1;const I=JT().on("start",U=>{const{nodeLookup:G,transform:q,snapGrid:$,snapToGrid:Z,nodeOrigin:A,paneDomNode:N}=n();if(k=G.get(t),!k)return;S=(N==null?void 0:N.getBoundingClientRect())??null;const{xSnapped:H,ySnapped:Q}=Ic(U.sourceEvent,{transform:q,snapGrid:$,snapToGrid:Z,containerBounds:S});w={width:k.measured.width??0,height:k.measured.height??0,x:k.position.x??0,y:k.position.y??0},T={...w,pointerX:H,pointerY:Q,aspectRatio:w.width/w.height},R=void 0,M=Rs(k.extent)?k.extent:void 0,k.parentId&&(k.extent==="parent"||k.expandParent)&&(R=G.get(k.parentId)),R&&k.extent==="parent"&&(M=[[0,0],[R.measured.width,R.measured.height]]),z=[],X=void 0;for(const[D,B]of G)if(B.parentId===t&&(z.push({id:D,position:{...B.position},extent:B.extent}),B.extent==="parent"||B.expandParent)){const ee=UB(B,k,B.origin??A);X?X=[[Math.min(ee[0][0],X[0][0]),Math.min(ee[0][1],X[0][1])],[Math.max(ee[1][0],X[1][0]),Math.max(ee[1][1],X[1][1])]]:X=ee}g==null||g(U,{...w})}).on("drag",U=>{const{transform:G,snapGrid:q,snapToGrid:$,nodeOrigin:Z}=n(),A=Ic(U.sourceEvent,{transform:G,snapGrid:q,snapToGrid:$,containerBounds:S}),N=[];if(!k)return;const{x:H,y:Q,width:D,height:B}=w,ee={},O=k.origin??Z,{width:ie,height:oe,x:me,y:we}=$B(T,s.controlDirection,A,s.boundaries,s.keepAspectRatio,O,M,X),ne=ie!==D,de=oe!==B,le=me!==H&&ne,ke=we!==Q&&de;if(!le&&!ke&&!ne&&!de)return;if((le||ke||O[0]===1||O[1]===1)&&(ee.x=le?me:w.x,ee.y=ke?we:w.y,w.x=ee.x,w.y=ee.y,z.length>0)){const Te=me-H,ue=we-Q;for(const it of z)it.position={x:it.position.x-Te+O[0]*(ie-D),y:it.position.y-ue+O[1]*(oe-B)},N.push(it)}if((ne||de)&&(ee.width=ne&&(!s.resizeDirection||s.resizeDirection==="horizontal")?ie:w.width,ee.height=de&&(!s.resizeDirection||s.resizeDirection==="vertical")?oe:w.height,w.width=ee.width,w.height=ee.height),R&&k.expandParent){const Te=O[0]*(ee.width??0);ee.x&&ee.x<Te&&(w.x=Te,T.x=T.x-(ee.x-Te));const ue=O[1]*(ee.height??0);ee.y&&ee.y<ue&&(w.y=ue,T.y=T.y-(ee.y-ue))}const ge=PB({width:w.width,prevWidth:D,height:w.height,prevHeight:B,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),Ae={...w,direction:ge};(C==null?void 0:C(U,Ae))!==!1&&(F=!0,b==null||b(U,Ae),r(ee,N))}).on("end",U=>{F&&(E==null||E(U,{...w}),i==null||i({...w}),F=!1)});o.call(I)}function c(){o.on(".drag",null)}return{update:u,destroy:c}}var Bg={exports:{}},Ug={},Gg={exports:{}},Fg={};/**
51
+ * @license React
52
+ * use-sync-external-store-shim.production.js
53
+ *
54
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
55
+ *
56
+ * This source code is licensed under the MIT license found in the
57
+ * LICENSE file in the root directory of this source tree.
58
+ */var $E;function FB(){if($E)return Fg;$E=1;var e=pf();function t(m,_){return m===_&&(m!==0||1/m===1/_)||m!==m&&_!==_}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function u(m,_){var g=_(),b=r({inst:{value:g,getSnapshot:_}}),E=b[0].inst,C=b[1];return o(function(){E.value=g,E.getSnapshot=_,c(E)&&C({inst:E})},[m,g,_]),i(function(){return c(E)&&C({inst:E}),m(function(){c(E)&&C({inst:E})})},[m]),s(g),g}function c(m){var _=m.getSnapshot;m=m.value;try{var g=_();return!n(m,g)}catch{return!0}}function f(m,_){return _()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return Fg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,Fg}var BE;function HB(){return BE||(BE=1,Gg.exports=FB()),Gg.exports}/**
59
+ * @license React
60
+ * use-sync-external-store-shim/with-selector.production.js
61
+ *
62
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
63
+ *
64
+ * This source code is licensed under the MIT license found in the
65
+ * LICENSE file in the root directory of this source tree.
66
+ */var UE;function VB(){if(UE)return Ug;UE=1;var e=pf(),t=HB();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,s=e.useEffect,u=e.useMemo,c=e.useDebugValue;return Ug.useSyncExternalStoreWithSelector=function(f,h,m,_,g){var b=o(null);if(b.current===null){var E={hasValue:!1,value:null};b.current=E}else E=b.current;b=u(function(){function w(R){if(!T){if(T=!0,k=R,R=_(R),g!==void 0&&E.hasValue){var M=E.value;if(g(M,R))return S=M}return S=R}if(M=S,r(k,R))return M;var X=_(R);return g!==void 0&&g(M,X)?(k=R,M):(k=R,S=X)}var T=!1,k,S,z=m===void 0?null:m;return[function(){return w(h())},z===null?void 0:function(){return w(z())}]},[h,m,_,g]);var C=i(f,b[0],b[1]);return s(function(){E.hasValue=!0,E.value=C},[C]),c(C),C},Ug}var GE;function XB(){return GE||(GE=1,Bg.exports=VB()),Bg.exports}var YB=XB();const WB=Ea(YB),KB={},FE=e=>{let t;const n=new Set,r=(h,m)=>{const _=typeof h=="function"?h(t):h;if(!Object.is(_,t)){const g=t;t=m??(typeof _!="object"||_===null)?_:Object.assign({},t,_),n.forEach(b=>b(t,g))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>f,subscribe:h=>(n.add(h),()=>n.delete(h)),destroy:()=>{(KB?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},f=t=e(r,i,c);return c},QB=e=>e?FE(e):FE,{useDebugValue:ZB}=g3,{useSyncExternalStoreWithSelector:JB}=WB,eU=e=>e;function Vj(e,t=eU,n){const r=JB(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return ZB(r),r}const HE=(e,t)=>{const n=QB(e),r=(i,o=t)=>Vj(n,i,o);return Object.assign(r,n),r},tU=(e,t)=>e?HE(e,t):HE;function Bt(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const ep=K.createContext(null),nU=ep.Provider,Xj=fi.error001("react");function ht(e,t){const n=K.useContext(ep);if(n===null)throw new Error(Xj);return Vj(n,e,t)}function Ut(){const e=K.useContext(ep);if(e===null)throw new Error(Xj);return K.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const VE={display:"none"},rU={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Yj="react-flow__node-desc",Wj="react-flow__edge-desc",iU="react-flow__aria-live",aU=e=>e.ariaLiveMessage,oU=e=>e.ariaLabelConfig;function sU({rfId:e}){const t=ht(aU);return y.jsx("div",{id:`${iU}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:rU,children:t})}function lU({rfId:e,disableKeyboardA11y:t}){const n=ht(oU);return y.jsxs(y.Fragment,{children:[y.jsx("div",{id:`${Yj}-${e}`,style:VE,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),y.jsx("div",{id:`${Wj}-${e}`,style:VE,children:n["edge.a11yDescription.default"]}),!t&&y.jsx(sU,{rfId:e})]})}const tp=K.forwardRef(({position:e="top-left",children:t,className:n,style:r,...i},o)=>{const s=`${e}`.split("-");return y.jsx("div",{className:fn(["react-flow__panel",n,...s]),style:r,ref:o,...i,children:t})});tp.displayName="Panel";const XE="https://reactflow.dev?utm_source=attribution";function uU({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:y.jsx(tp,{position:t,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${XE}`,children:y.jsx("a",{href:XE,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const cU=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},oh=e=>e.id;function fU(e,t){return Bt(e.selectedNodes.map(oh),t.selectedNodes.map(oh))&&Bt(e.selectedEdges.map(oh),t.selectedEdges.map(oh))}function dU({onSelectionChange:e}){const t=Ut(),{selectedNodes:n,selectedEdges:r}=ht(cU,fU);return K.useEffect(()=>{const i={nodes:n,edges:r};e==null||e(i),t.getState().onSelectionChangeHandlers.forEach(o=>o(i))},[n,r,e]),null}const hU=e=>!!e.onSelectionChangeHandlers;function mU({onSelectionChange:e}){const t=ht(hU);return e||t?y.jsx(dU,{onSelectionChange:e}):null}const Kj=[0,0],pU={x:0,y:0,zoom:1},_U=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],YE=[..._U,"rfId"],gU=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),WE={translateExtent:Qc,nodeOrigin:Kj,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function yU(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:o,setNodeExtent:s,reset:u,setDefaultNodesAndEdges:c}=ht(gU,Bt),f=Ut();K.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{h.current=WE,u()}),[]);const h=K.useRef(WE);return K.useEffect(()=>{for(const m of YE){const _=e[m],g=h.current[m];_!==g&&(typeof e[m]>"u"||(m==="nodes"?t(_):m==="edges"?n(_):m==="minZoom"?r(_):m==="maxZoom"?i(_):m==="translateExtent"?o(_):m==="nodeExtent"?s(_):m==="ariaLabelConfig"?f.setState({ariaLabelConfig:nB(_)}):m==="fitView"?f.setState({fitViewQueued:_}):m==="fitViewOptions"?f.setState({fitViewOptions:_}):f.setState({[m]:_})))}h.current=e},YE.map(m=>e[m])),null}function KE(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function vU(e){var r;const[t,n]=K.useState(e==="system"?null:e);return K.useEffect(()=>{if(e!=="system"){n(e);return}const i=KE(),o=()=>n(i!=null&&i.matches?"dark":"light");return o(),i==null||i.addEventListener("change",o),()=>{i==null||i.removeEventListener("change",o)}},[e]),t!==null?t:(r=KE())!=null&&r.matches?"dark":"light"}const QE=typeof document<"u"?document:null;function tf(e=null,t={target:QE,actInsideInputWithModifier:!0}){const[n,r]=K.useState(!1),i=K.useRef(!1),o=K.useRef(new Set([])),[s,u]=K.useMemo(()=>{if(e!==null){const f=(Array.isArray(e)?e:[e]).filter(m=>typeof m=="string").map(m=>m.replace("+",`
67
+ `).replace(`
68
+
69
+ `,`
70
+ +`).split(`
71
+ `)),h=f.reduce((m,_)=>m.concat(..._),[]);return[f,h]}return[[],[]]},[e]);return K.useEffect(()=>{const c=(t==null?void 0:t.target)??QE,f=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const h=g=>{var C,w;if(i.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!i.current||i.current&&!f)&&Aj(g))return!1;const E=JE(g.code,u);if(o.current.add(g[E]),ZE(s,o.current,!1)){const T=((w=(C=g.composedPath)==null?void 0:C.call(g))==null?void 0:w[0])||g.target,k=(T==null?void 0:T.nodeName)==="BUTTON"||(T==null?void 0:T.nodeName)==="A";t.preventDefault!==!1&&(i.current||!k)&&g.preventDefault(),r(!0)}},m=g=>{const b=JE(g.code,u);ZE(s,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(g[b]),g.key==="Meta"&&o.current.clear(),i.current=!1},_=()=>{o.current.clear(),r(!1)};return c==null||c.addEventListener("keydown",h),c==null||c.addEventListener("keyup",m),window.addEventListener("blur",_),window.addEventListener("contextmenu",_),()=>{c==null||c.removeEventListener("keydown",h),c==null||c.removeEventListener("keyup",m),window.removeEventListener("blur",_),window.removeEventListener("contextmenu",_)}}},[e,r]),n}function ZE(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function JE(e,t){return t.includes(e)?"code":"key"}const bU=()=>{const e=Ut();return K.useMemo(()=>({zoomIn:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):!1},zoomOut:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):!1},zoomTo:async(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,i,o],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??o},n),!0):!1},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:i,minZoom:o,maxZoom:s,panZoom:u}=e.getState(),c=X1(t,r,i,o,s,(n==null?void 0:n.padding)??.1);return u?(await u.setViewport(c,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),!0):!1},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:i,snapToGrid:o,domNode:s}=e.getState();if(!s)return t;const{x:u,y:c}=s.getBoundingClientRect(),f={x:t.x-u,y:t.y-c},h=n.snapGrid??i,m=n.snapToGrid??o;return wf(f,r,m,h)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:i,y:o}=r.getBoundingClientRect(),s=tu(t,n);return{x:s.x+i,y:s.y+o}}}),[])};function Qj(e,t){const n=[],r=new Map,i=[];for(const o of e)if(o.type==="add"){i.push(o);continue}else if(o.type==="remove"||o.type==="replace")r.set(o.id,[o]);else{const s=r.get(o.id);s?s.push(o):r.set(o.id,[o])}for(const o of t){const s=r.get(o.id);if(!s){n.push(o);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}const u={...o};for(const c of s)xU(c,u);n.push(u)}return i.length&&i.forEach(o=>{o.index!==void 0?n.splice(o.index,0,{...o.item}):n.push({...o.item})}),n}function xU(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function wU(e,t){return Qj(e,t)}function kU(e,t){return Qj(e,t)}function ms(e,t){return{id:e,type:"select",selected:t}}function Bl(e,t=new Set,n=!1){const r=[];for(const[i,o]of e){const s=t.has(i);!(o.selected===void 0&&!s)&&o.selected!==s&&(n&&(o.selected=s),r.push(ms(o.id,s)))}return r}function eS({items:e=[],lookup:t}){var i;const n=[],r=new Map(e.map(o=>[o.id,o]));for(const[o,s]of e.entries()){const u=t.get(s.id),c=((i=u==null?void 0:u.internals)==null?void 0:i.userNode)??u;c!==void 0&&c!==s&&n.push({id:s.id,item:s,type:"replace"}),c===void 0&&n.push({item:s,type:"add",index:o})}for(const[o]of t)r.get(o)===void 0&&n.push({id:o,type:"remove"});return n}function tS(e){return{id:e.id,type:"remove"}}const EU=Sj();function SU(e,t,n={}){return lB(e,t,{...n,onError:n.onError??EU})}const nS=e=>X$(e),CU=e=>bj(e);function Zj(e){return K.forwardRef(e)}const TU=typeof window<"u"?K.useLayoutEffect:K.useEffect;function rS(e){const[t,n]=K.useState(BigInt(0)),[r]=K.useState(()=>jU(()=>n(i=>i+BigInt(1))));return TU(()=>{const i=r.get();i.length&&(e(i),r.reset())},[t]),r}function jU(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const Jj=K.createContext(null);function AU({children:e}){const t=Ut(),n=K.useCallback(u=>{const{nodes:c=[],setNodes:f,hasDefaultNodes:h,onNodesChange:m,nodeLookup:_,fitViewQueued:g,onNodesChangeMiddlewareMap:b}=t.getState();let E=c;for(const w of u)E=typeof w=="function"?w(E):w;let C=eS({items:E,lookup:_});for(const w of b.values())C=w(C);h&&f(E),C.length>0?m==null||m(C):g&&window.requestAnimationFrame(()=>{const{fitViewQueued:w,nodes:T,setNodes:k}=t.getState();w&&k(T)})},[]),r=rS(n),i=K.useCallback(u=>{const{edges:c=[],setEdges:f,hasDefaultEdges:h,onEdgesChange:m,edgeLookup:_}=t.getState();let g=c;for(const b of u)g=typeof b=="function"?b(g):b;h?f(g):m&&m(eS({items:g,lookup:_}))},[]),o=rS(i),s=K.useMemo(()=>({nodeQueue:r,edgeQueue:o}),[]);return y.jsx(Jj.Provider,{value:s,children:e})}function RU(){const e=K.useContext(Jj);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const NU=e=>!!e.panZoom;function e0(){const e=bU(),t=Ut(),n=RU(),r=ht(NU),i=K.useMemo(()=>{const o=m=>t.getState().nodeLookup.get(m),s=m=>{n.nodeQueue.push(m)},u=m=>{n.edgeQueue.push(m)},c=m=>{var w,T;const{nodeLookup:_,nodeOrigin:g}=t.getState(),b=nS(m)?m:_.get(m.id),E=b.parentId?Tj(b.position,b.measured,b.parentId,_,g):b.position,C={...b,position:E,width:((w=b.measured)==null?void 0:w.width)??b.width,height:((T=b.measured)==null?void 0:T.height)??b.height};return Jc(C)},f=(m,_,g={replace:!1})=>{s(b=>b.map(E=>{if(E.id===m){const C=typeof _=="function"?_(E):_;return g.replace&&nS(C)?C:{...E,...C}}return E}))},h=(m,_,g={replace:!1})=>{u(b=>b.map(E=>{if(E.id===m){const C=typeof _=="function"?_(E):_;return g.replace&&CU(C)?C:{...E,...C}}return E}))};return{getNodes:()=>t.getState().nodes.map(m=>({...m})),getNode:m=>{var _;return(_=o(m))==null?void 0:_.internals.userNode},getInternalNode:o,getEdges:()=>{const{edges:m=[]}=t.getState();return m.map(_=>({..._}))},getEdge:m=>t.getState().edgeLookup.get(m),setNodes:s,setEdges:u,addNodes:m=>{const _=Array.isArray(m)?m:[m];n.nodeQueue.push(g=>[...g,..._])},addEdges:m=>{const _=Array.isArray(m)?m:[m];n.edgeQueue.push(g=>[...g,..._])},toObject:()=>{const{nodes:m=[],edges:_=[],transform:g}=t.getState(),[b,E,C]=g;return{nodes:m.map(w=>({...w})),edges:_.map(w=>({...w})),viewport:{x:b,y:E,zoom:C}}},deleteElements:async({nodes:m=[],edges:_=[]})=>{const{nodes:g,edges:b,onNodesDelete:E,onEdgesDelete:C,triggerNodeChanges:w,triggerEdgeChanges:T,onDelete:k,onBeforeDelete:S}=t.getState(),{nodes:z,edges:R}=await Z$({nodesToRemove:m,edgesToRemove:_,nodes:g,edges:b,onBeforeDelete:S}),M=R.length>0,X=z.length>0;if(M){const F=R.map(tS);C==null||C(R),T(F)}if(X){const F=z.map(tS);E==null||E(z),w(F)}return(X||M)&&(k==null||k({nodes:z,edges:R})),{deletedNodes:z,deletedEdges:R}},getIntersectingNodes:(m,_=!0,g)=>{const b=TE(m),E=b?m:c(m),C=g!==void 0;return E?(g||t.getState().nodes).filter(w=>{const T=t.getState().nodeLookup.get(w.id);if(T&&!b&&(w.id===m.id||!T.internals.positionAbsolute))return!1;const k=Jc(C?w:T),S=cm(k,E);return _&&S>0||S>=k.width*k.height||S>=E.width*E.height}):[]},isNodeIntersecting:(m,_,g=!0)=>{const E=TE(m)?m:c(m);if(!E)return!1;const C=cm(E,_);return g&&C>0||C>=_.width*_.height||C>=E.width*E.height},updateNode:f,updateNodeData:(m,_,g={replace:!1})=>{f(m,b=>{const E=typeof _=="function"?_(b):_;return g.replace?{...b,data:E}:{...b,data:{...b.data,...E}}},g)},updateEdge:h,updateEdgeData:(m,_,g={replace:!1})=>{h(m,b=>{const E=typeof _=="function"?_(b):_;return g.replace?{...b,data:E}:{...b,data:{...b.data,...E}}},g)},getNodesBounds:m=>{const{nodeLookup:_,nodeOrigin:g}=t.getState();return Y$(m,{nodeLookup:_,nodeOrigin:g})},getHandleConnections:({type:m,id:_,nodeId:g})=>{var b;return Array.from(((b=t.getState().connectionLookup.get(`${g}-${m}${_?`-${_}`:""}`))==null?void 0:b.values())??[])},getNodeConnections:({type:m,handleId:_,nodeId:g})=>{var b;return Array.from(((b=t.getState().connectionLookup.get(`${g}${m?_?`-${m}-${_}`:`-${m}`:""}`))==null?void 0:b.values())??[])},fitView:async m=>{const _=t.getState().fitViewResolver??tB();return t.setState({fitViewQueued:!0,fitViewOptions:m,fitViewResolver:_}),n.nodeQueue.push(g=>[...g]),_.promise}}},[]);return K.useMemo(()=>({...i,...e,viewportInitialized:r}),[r])}const iS=e=>e.selected,LU=typeof window<"u"?window:void 0;function zU({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Ut(),{deleteElements:r}=e0(),i=tf(e,{actInsideInputWithModifier:!1}),o=tf(t,{target:LU});K.useEffect(()=>{if(i){const{edges:s,nodes:u}=n.getState();r({nodes:u.filter(iS),edges:s.filter(iS)}),n.setState({nodesSelectionActive:!1})}},[i]),K.useEffect(()=>{n.setState({multiSelectionActive:o})},[o])}function MU(e){const t=Ut();K.useEffect(()=>{const n=()=>{var i,o,s,u;if(!e.current||!(((o=(i=e.current).checkVisibility)==null?void 0:o.call(i))??!0))return!1;const r=Y1(e.current);(r.height===0||r.width===0)&&((u=(s=t.getState()).onError)==null||u.call(s,"004",fi.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const np={position:"absolute",width:"100%",height:"100%",top:0,left:0},DU=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function OU({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:o=Es.Free,zoomOnDoubleClick:s=!0,panOnDrag:u=!0,defaultViewport:c,translateExtent:f,minZoom:h,maxZoom:m,zoomActivationKeyCode:_,preventScrolling:g=!0,children:b,noWheelClassName:E,noPanClassName:C,onViewportChange:w,isControlledViewport:T,paneClickDistance:k,selectionOnDrag:S}){const z=Ut(),R=K.useRef(null),{userSelectionActive:M,lib:X,connectionInProgress:F}=ht(DU,Bt),I=tf(_),U=K.useRef();MU(R);const G=K.useCallback(q=>{w==null||w({x:q[0],y:q[1],zoom:q[2]}),T||z.setState({transform:q})},[w,T]);return K.useEffect(()=>{if(R.current){U.current=IB({domNode:R.current,minZoom:h,maxZoom:m,translateExtent:f,viewport:c,onDraggingChange:A=>z.setState(N=>N.paneDragging===A?N:{paneDragging:A}),onPanZoomStart:(A,N)=>{const{onViewportChangeStart:H,onMoveStart:Q}=z.getState();Q==null||Q(A,N),H==null||H(N)},onPanZoom:(A,N)=>{const{onViewportChange:H,onMove:Q}=z.getState();Q==null||Q(A,N),H==null||H(N)},onPanZoomEnd:(A,N)=>{const{onViewportChangeEnd:H,onMoveEnd:Q}=z.getState();Q==null||Q(A,N),H==null||H(N)}});const{x:q,y:$,zoom:Z}=U.current.getViewport();return z.setState({panZoom:U.current,transform:[q,$,Z],domNode:R.current.closest(".react-flow")}),()=>{var A;(A=U.current)==null||A.destroy()}}},[]),K.useEffect(()=>{var q;(q=U.current)==null||q.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:o,zoomOnDoubleClick:s,panOnDrag:u,zoomActivationKeyPressed:I,preventScrolling:g,noPanClassName:C,userSelectionActive:M,noWheelClassName:E,lib:X,onTransformChange:G,connectionInProgress:F,selectionOnDrag:S,paneClickDistance:k})},[e,t,n,r,i,o,s,u,I,g,C,M,E,X,G,F,S,k]),y.jsx("div",{className:"react-flow__renderer",ref:R,style:np,children:b})}const qU=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function IU(){const{userSelectionActive:e,userSelectionRect:t}=ht(qU,Bt);return e&&t?y.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const Hg=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},PU=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function $U({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Zc.Full,panOnDrag:r,autoPanOnSelection:i,paneClickDistance:o,selectionOnDrag:s,onSelectionStart:u,onSelectionEnd:c,onPaneClick:f,onPaneContextMenu:h,onPaneScroll:m,onPaneMouseEnter:_,onPaneMouseMove:g,onPaneMouseLeave:b,children:E}){const C=K.useRef(0),w=Ut(),{userSelectionActive:T,elementsSelectable:k,dragging:S,panBy:z,autoPanSpeed:R}=ht(PU,Bt),M=k&&(e||T),X=K.useRef(null),F=K.useRef(),I=K.useRef(new Set),U=K.useRef(new Set),G=K.useRef(!1),q=K.useRef(!1),$=K.useRef({x:0,y:0}),Z=K.useRef(!1),A=ne=>{if(q.current||G.current||w.getState().connection.inProgress){q.current=!1,G.current=!1;return}f==null||f(ne),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1})},N=ne=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){ne.preventDefault();return}h==null||h(ne)},H=m?ne=>m(ne):void 0,Q=ne=>{q.current&&(ne.stopPropagation(),q.current=!1)},D=ne=>{var it,wt;const{domNode:de,transform:le}=w.getState();if(F.current=de==null?void 0:de.getBoundingClientRect(),!F.current)return;const ke=ne.target===X.current;if(!ke&&!!ne.target.closest(".nokey")||!e||!(s&&ke||t)||ne.button!==0||!ne.isPrimary)return;(wt=(it=ne.target)==null?void 0:it.setPointerCapture)==null||wt.call(it,ne.pointerId),q.current=!1;const{x:Ce,y:Te}=li(ne.nativeEvent,F.current),ue=wf({x:Ce,y:Te},le);w.setState({userSelectionRect:{width:0,height:0,startX:ue.x,startY:ue.y,x:Ce,y:Te}}),ke||(ne.stopPropagation(),ne.preventDefault())};function B(ne,de){const{userSelectionRect:le}=w.getState();if(!le)return;const{transform:ke,nodeLookup:ge,edgeLookup:Ae,connectionLookup:Ce,triggerNodeChanges:Te,triggerEdgeChanges:ue,defaultEdgeOptions:it}=w.getState(),wt={x:le.startX,y:le.startY},{x:kt,y:Tt}=tu(wt,ke),pt={startX:wt.x,startY:wt.y,x:ne<kt?ne:kt,y:de<Tt?de:Tt,width:Math.abs(ne-kt),height:Math.abs(de-Tt)},Gt=I.current,an=U.current;I.current=new Set(H1(ge,pt,ke,n===Zc.Partial,!0).map(Ft=>Ft.id)),U.current=new Set;const ft=(it==null?void 0:it.selectable)??!0;for(const Ft of I.current){const _e=Ce.get(Ft);if(_e)for(const{edgeId:Re}of _e.values()){const qe=Ae.get(Re);qe&&(qe.selectable??ft)&&U.current.add(Re)}}if(!jE(Gt,I.current)){const Ft=Bl(ge,I.current,!0);Te(Ft)}if(!jE(an,U.current)){const Ft=Bl(Ae,U.current);ue(Ft)}w.setState({userSelectionRect:pt,userSelectionActive:!0,nodesSelectionActive:!1})}function ee(){if(!i||!F.current)return;const[ne,de]=V1($.current,F.current,R);z({x:ne,y:de}).then(le=>{if(!q.current||!le){C.current=requestAnimationFrame(ee);return}const{x:ke,y:ge}=$.current;B(ke,ge),C.current=requestAnimationFrame(ee)})}const O=()=>{cancelAnimationFrame(C.current),C.current=0,Z.current=!1};K.useEffect(()=>()=>O(),[]);const ie=ne=>{const{userSelectionRect:de,transform:le,resetSelectedElements:ke}=w.getState();if(!F.current||!de)return;const{x:ge,y:Ae}=li(ne.nativeEvent,F.current);$.current={x:ge,y:Ae};const Ce=tu({x:de.startX,y:de.startY},le);if(!q.current){const Te=t?0:o;if(Math.hypot(ge-Ce.x,Ae-Ce.y)<=Te)return;ke(),u==null||u(ne)}q.current=!0,Z.current||(ee(),Z.current=!0),B(ge,Ae)},oe=ne=>{var de,le;if(!M){ne.target===X.current&&w.getState().connection.inProgress&&(G.current=!0);return}ne.button===0&&((le=(de=ne.target)==null?void 0:de.releasePointerCapture)==null||le.call(de,ne.pointerId),!T&&ne.target===X.current&&w.getState().userSelectionRect&&(A==null||A(ne)),w.setState({userSelectionActive:!1,userSelectionRect:null}),q.current&&(c==null||c(ne),w.setState({nodesSelectionActive:I.current.size>0})),O())},me=ne=>{var de,le;(le=(de=ne.target)==null?void 0:de.releasePointerCapture)==null||le.call(de,ne.pointerId),O()},we=r===!0||Array.isArray(r)&&r.includes(0);return y.jsxs("div",{className:fn(["react-flow__pane",{draggable:we,dragging:S,selection:e}]),onClick:M?void 0:Hg(A,X),onContextMenu:Hg(N,X),onWheel:Hg(H,X),onPointerEnter:M?void 0:_,onPointerMove:M?ie:g,onPointerUp:oe,onPointerCancel:M?me:void 0,onPointerDownCapture:M?D:void 0,onClickCapture:M?Q:void 0,onPointerLeave:b,ref:X,style:np,children:[E,y.jsx(IU,{})]})}function kv({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:o,multiSelectionActive:s,nodeLookup:u,onError:c}=t.getState(),f=u.get(e);if(!f){c==null||c("012",fi.error012(e));return}t.setState({nodesSelectionActive:!1}),f.selected?(n||f.selected&&s)&&(o({nodes:[f],edges:[]}),requestAnimationFrame(()=>{var h;return(h=r==null?void 0:r.current)==null?void 0:h.blur()})):i([e])}function eA({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:o,nodeClickDistance:s}){const u=Ut(),[c,f]=K.useState(!1),h=K.useRef();return K.useEffect(()=>{h.current=EB({getStoreItems:()=>u.getState(),onNodeMouseDown:m=>{kv({id:m,store:u,nodeRef:e})},onDragStart:()=>{f(!0)},onDragStop:()=>{f(!1)}})},[]),K.useEffect(()=>{if(!(t||!e.current||!h.current))return h.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:o,nodeId:i,nodeClickDistance:s}),()=>{var m;(m=h.current)==null||m.destroy()}},[n,r,t,o,e,i,s]),c}const BU=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function tA(){const e=Ut();return K.useCallback(n=>{const{nodeExtent:r,snapToGrid:i,snapGrid:o,nodesDraggable:s,onError:u,updateNodePositions:c,nodeLookup:f,nodeOrigin:h}=e.getState(),m=new Map,_=BU(s),g=i?o[0]:5,b=i?o[1]:5,E=n.direction.x*g*n.factor,C=n.direction.y*b*n.factor;for(const[,w]of f){if(!_(w))continue;let T={x:w.internals.positionAbsolute.x+E,y:w.internals.positionAbsolute.y+C};i&&(T=xf(T,o));const{position:k,positionAbsolute:S}=xj({nodeId:w.id,nextPosition:T,nodeLookup:f,nodeExtent:r,nodeOrigin:h,onError:u});w.position=k,w.internals.positionAbsolute=S,m.set(w.id,w)}c(m)},[])}const t0=K.createContext(null),UU=t0.Provider;t0.Consumer;const nA=()=>K.useContext(t0),GU=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),rA=K.createContext(null);function FU({children:e}){const t=ht(GU,Bt);return y.jsx(rA.Provider,{value:t,children:e})}function HU(){const e=K.useContext(rA);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const VU={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},XU=(e,t,n)=>r=>{const{connectionClickStartHandle:i,connectionMode:o,connection:s}=r,{fromHandle:u,toHandle:c,isValid:f}=s;if(!u&&!i)return VU;const h=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n;return{connectingFrom:(u==null?void 0:u.nodeId)===e&&(u==null?void 0:u.id)===t&&(u==null?void 0:u.type)===n,connectingTo:h,clickConnecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.id)===t&&(i==null?void 0:i.type)===n,isPossibleEndHandle:o===Jl.Strict?(u==null?void 0:u.type)!==n:e!==(u==null?void 0:u.nodeId)||t!==(u==null?void 0:u.id),connectionInProcess:!!u,clickConnectionInProcess:!!i,valid:h&&f}};function YU({type:e="source",position:t=Pe.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:o=!0,id:s,onConnect:u,children:c,className:f,onMouseDown:h,onTouchStart:m,..._},g){var Z,A;const b=s||null,E=e==="target",C=Ut(),w=nA(),{connectOnClick:T,noPanClassName:k,rfId:S}=HU(),{connectingFrom:z,connectingTo:R,clickConnecting:M,isPossibleEndHandle:X,connectionInProcess:F,clickConnectionInProcess:I,valid:U}=ht(XU(w,b,e),Bt);w||(A=(Z=C.getState()).onError)==null||A.call(Z,"010",fi.error010());const G=N=>{const{defaultEdgeOptions:H,onConnect:Q,hasDefaultEdges:D}=C.getState(),B={...H,...N};if(D){const{edges:ee,setEdges:O,onError:ie}=C.getState();O(SU(B,ee,{onError:ie}))}Q==null||Q(B),u==null||u(B)},q=N=>{if(!w)return;const H=Rj(N.nativeEvent);if(i&&(H&&N.button===0||!H)){const Q=C.getState();wv.onPointerDown(N.nativeEvent,{handleDomNode:N.currentTarget,autoPanOnConnect:Q.autoPanOnConnect,connectionMode:Q.connectionMode,connectionRadius:Q.connectionRadius,domNode:Q.domNode,nodeLookup:Q.nodeLookup,lib:Q.lib,isTarget:E,handleId:b,nodeId:w,flowId:Q.rfId,panBy:Q.panBy,cancelConnection:Q.cancelConnection,onConnectStart:Q.onConnectStart,onConnectEnd:(...D)=>{var B,ee;return(ee=(B=C.getState()).onConnectEnd)==null?void 0:ee.call(B,...D)},updateConnection:Q.updateConnection,onConnect:G,isValidConnection:n||((...D)=>{var B,ee;return((ee=(B=C.getState()).isValidConnection)==null?void 0:ee.call(B,...D))??!0}),getTransform:()=>C.getState().transform,getFromHandle:()=>C.getState().connection.fromHandle,autoPanSpeed:Q.autoPanSpeed,dragThreshold:Q.connectionDragThreshold})}H?h==null||h(N):m==null||m(N)},$=N=>{const{onClickConnectStart:H,onClickConnectEnd:Q,connectionClickStartHandle:D,connectionMode:B,isValidConnection:ee,lib:O,rfId:ie,nodeLookup:oe,connection:me}=C.getState();if(!w||!D&&!i)return;if(!D){H==null||H(N.nativeEvent,{nodeId:w,handleId:b,handleType:e}),C.setState({connectionClickStartHandle:{nodeId:w,type:e,id:b}});return}const we=jj(N.target),ne=n||ee,{connection:de,isValid:le}=wv.isValid(N.nativeEvent,{handle:{nodeId:w,id:b,type:e},connectionMode:B,fromNodeId:D.nodeId,fromHandleId:D.id||null,fromType:D.type,isValidConnection:ne,flowId:ie,doc:we,lib:O,nodeLookup:oe});le&&de&&G(de);const ke=structuredClone(me);delete ke.inProgress,ke.toPosition=ke.toHandle?ke.toHandle.position:null,Q==null||Q(N,ke),C.setState({connectionClickStartHandle:null})};return y.jsx("div",{"data-handleid":b,"data-nodeid":w,"data-handlepos":t,"data-id":`${S}-${w}-${b}-${e}`,className:fn(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",k,f,{source:!E,target:E,connectable:r,connectablestart:i,connectableend:o,clickconnecting:M,connectingfrom:z,connectingto:R,valid:U,connectionindicator:r&&(!F||X)&&(F||I?o:i)}]),onMouseDown:q,onTouchStart:q,onClick:T?$:void 0,ref:g,..._,children:c})}const ko=K.memo(Zj(YU));function WU({data:e,isConnectable:t,sourcePosition:n=Pe.Bottom}){return y.jsxs(y.Fragment,{children:[e==null?void 0:e.label,y.jsx(ko,{type:"source",position:n,isConnectable:t})]})}function KU({data:e,isConnectable:t,targetPosition:n=Pe.Top,sourcePosition:r=Pe.Bottom}){return y.jsxs(y.Fragment,{children:[y.jsx(ko,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,y.jsx(ko,{type:"source",position:r,isConnectable:t})]})}function QU(){return null}function ZU({data:e,isConnectable:t,targetPosition:n=Pe.Top}){return y.jsxs(y.Fragment,{children:[y.jsx(ko,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const fm={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},aS={input:WU,default:KU,output:ZU,group:QU};function JU(e){var t,n,r,i;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((i=e.style)==null?void 0:i.height)}}const eG=e=>{const{width:t,height:n,x:r,y:i}=bf(e.nodeLookup,{filter:o=>!!o.selected});return{width:si(t)?t:null,height:si(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function tG({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Ut(),{width:i,height:o,transformString:s,userSelectionActive:u}=ht(eG,Bt),c=tA(),f=K.useRef(null);K.useEffect(()=>{var g;n||(g=f.current)==null||g.focus({preventScroll:!0})},[n]);const h=!u&&i!==null&&o!==null;if(eA({nodeRef:f,disabled:!h}),!h)return null;const m=e?g=>{const b=r.getState().nodes.filter(E=>E.selected);e(g,b)}:void 0,_=g=>{Object.prototype.hasOwnProperty.call(fm,g.key)&&(g.preventDefault(),c({direction:fm[g.key],factor:g.shiftKey?4:1}))};return y.jsx("div",{className:fn(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:y.jsx("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:m,tabIndex:n?void 0:-1,onKeyDown:n?void 0:_,style:{width:i,height:o}})})}const oS=typeof window<"u"?window:void 0,nG=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function iA({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:s,paneClickDistance:u,deleteKeyCode:c,selectionKeyCode:f,selectionOnDrag:h,selectionMode:m,onSelectionStart:_,onSelectionEnd:g,multiSelectionKeyCode:b,panActivationKeyCode:E,zoomActivationKeyCode:C,elementsSelectable:w,zoomOnScroll:T,zoomOnPinch:k,panOnScroll:S,panOnScrollSpeed:z,panOnScrollMode:R,zoomOnDoubleClick:M,panOnDrag:X,autoPanOnSelection:F,defaultViewport:I,translateExtent:U,minZoom:G,maxZoom:q,preventScrolling:$,onSelectionContextMenu:Z,noWheelClassName:A,noPanClassName:N,disableKeyboardA11y:H,onViewportChange:Q,isControlledViewport:D}){const{nodesSelectionActive:B,userSelectionActive:ee}=ht(nG,Bt),O=tf(f,{target:oS}),ie=tf(E,{target:oS}),oe=ie||X,me=ie||S,we=h&&oe!==!0,ne=O||ee||we;return zU({deleteKeyCode:c,multiSelectionKeyCode:b}),y.jsx(OU,{onPaneContextMenu:o,elementsSelectable:w,zoomOnScroll:T,zoomOnPinch:k,panOnScroll:me,panOnScrollSpeed:z,panOnScrollMode:R,zoomOnDoubleClick:M,panOnDrag:!O&&oe,defaultViewport:I,translateExtent:U,minZoom:G,maxZoom:q,zoomActivationKeyCode:C,preventScrolling:$,noWheelClassName:A,noPanClassName:N,onViewportChange:Q,isControlledViewport:D,paneClickDistance:u,selectionOnDrag:we,children:y.jsxs($U,{onSelectionStart:_,onSelectionEnd:g,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:s,panOnDrag:oe,autoPanOnSelection:F,isSelecting:!!ne,selectionMode:m,selectionKeyPressed:O,paneClickDistance:u,selectionOnDrag:we,children:[e,B&&y.jsx(tG,{onSelectionContextMenu:Z,noPanClassName:N,disableKeyboardA11y:H})]})})}iA.displayName="FlowRenderer";const rG=K.memo(iA),iG=e=>t=>e?H1(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function aG(e){return ht(K.useCallback(iG(e),[e]),Bt)}const oG=e=>e.updateNodeInternals;function sG(){const e=ht(oG),[t]=K.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(i=>{const o=i.target.getAttribute("data-id");r.set(o,{id:o,nodeElement:i.target,force:!0})}),e(r)}));return K.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function lG({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const i=Ut(),o=K.useRef(null),s=K.useRef(null),u=K.useRef(e.sourcePosition),c=K.useRef(e.targetPosition),f=K.useRef(t),h=n&&!!e.internals.handleBounds;return K.useEffect(()=>{o.current&&!e.hidden&&(!h||s.current!==o.current)&&(s.current&&(r==null||r.unobserve(s.current)),r==null||r.observe(o.current),s.current=o.current)},[h,e.hidden]),K.useEffect(()=>()=>{s.current&&(r==null||r.unobserve(s.current),s.current=null)},[]),K.useEffect(()=>{if(o.current){const m=f.current!==t,_=u.current!==e.sourcePosition,g=c.current!==e.targetPosition;(m||_||g)&&(f.current=t,u.current=e.sourcePosition,c.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:o.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),o}function uG({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:o,onDoubleClick:s,nodesDraggable:u,elementsSelectable:c,nodesConnectable:f,nodesFocusable:h,resizeObserver:m,noDragClassName:_,noPanClassName:g,disableKeyboardA11y:b,rfId:E,nodeTypes:C,nodeClickDistance:w,onError:T}){const{node:k,internals:S,isParent:z}=ht(ne=>{const de=ne.nodeLookup.get(e),le=ne.parentLookup.has(e);return{node:de,internals:de.internals,isParent:le}},Bt);let R=k.type||"default",M=(C==null?void 0:C[R])||aS[R];M===void 0&&(T==null||T("003",fi.error003(R)),R="default",M=(C==null?void 0:C.default)||aS.default);const X=!!(k.draggable||u&&typeof k.draggable>"u"),F=!!(k.selectable||c&&typeof k.selectable>"u"),I=!!(k.connectable||f&&typeof k.connectable>"u"),U=!!(k.focusable||h&&typeof k.focusable>"u"),G=Ut(),q=Cj(k),$=lG({node:k,nodeType:R,hasDimensions:q,resizeObserver:m}),Z=eA({nodeRef:$,disabled:k.hidden||!X,noDragClassName:_,handleSelector:k.dragHandle,nodeId:e,isSelectable:F,nodeClickDistance:w}),A=tA();if(k.hidden)return null;const N=Sa(k),H=JU(k),Q=F||X||t||n||r||i,D=n?ne=>n(ne,{...S.userNode}):void 0,B=r?ne=>r(ne,{...S.userNode}):void 0,ee=i?ne=>i(ne,{...S.userNode}):void 0,O=o?ne=>o(ne,{...S.userNode}):void 0,ie=s?ne=>s(ne,{...S.userNode}):void 0,oe=ne=>{const{selectNodesOnDrag:de,nodeDragThreshold:le}=G.getState();F&&(!de||!X||le>0)&&kv({id:e,store:G,nodeRef:$}),t&&t(ne,{...S.userNode})},me=ne=>{if(!(Aj(ne.nativeEvent)||b)){if(_j.includes(ne.key)&&F){const de=ne.key==="Escape";kv({id:e,store:G,unselect:de,nodeRef:$})}else if(X&&k.selected&&Object.prototype.hasOwnProperty.call(fm,ne.key)){ne.preventDefault();const{ariaLabelConfig:de}=G.getState();G.setState({ariaLiveMessage:de["node.a11yDescription.ariaLiveMessage"]({direction:ne.key.replace("Arrow","").toLowerCase(),x:~~S.positionAbsolute.x,y:~~S.positionAbsolute.y})}),A({direction:fm[ne.key],factor:ne.shiftKey?4:1})}}},we=()=>{var Ce;if(b||!((Ce=$.current)!=null&&Ce.matches(":focus-visible")))return;const{transform:ne,width:de,height:le,autoPanOnNodeFocus:ke,setCenter:ge}=G.getState();if(!ke)return;H1(new Map([[e,k]]),{x:0,y:0,width:de,height:le},ne,!0).length>0||ge(k.position.x+N.width/2,k.position.y+N.height/2,{zoom:ne[2]})};return y.jsx("div",{className:fn(["react-flow__node",`react-flow__node-${R}`,{[g]:X},k.className,{selected:k.selected,selectable:F,parent:z,draggable:X,dragging:Z}]),ref:$,style:{zIndex:S.z,transform:`translate(${S.positionAbsolute.x}px,${S.positionAbsolute.y}px)`,pointerEvents:Q?"all":"none",visibility:q?"visible":"hidden",...k.style,...H},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:D,onMouseMove:B,onMouseLeave:ee,onContextMenu:O,onClick:oe,onDoubleClick:ie,onKeyDown:U?me:void 0,tabIndex:U?0:void 0,onFocus:U?we:void 0,role:k.ariaRole??(U?"group":void 0),"aria-roledescription":"node","aria-describedby":b?void 0:`${Yj}-${E}`,"aria-label":k.ariaLabel,...k.domAttributes,children:y.jsx(UU,{value:e,children:y.jsx(M,{id:e,data:k.data,type:R,positionAbsoluteX:S.positionAbsolute.x,positionAbsoluteY:S.positionAbsolute.y,selected:k.selected??!1,selectable:F,draggable:X,deletable:k.deletable??!0,isConnectable:I,sourcePosition:k.sourcePosition,targetPosition:k.targetPosition,dragging:Z,dragHandle:k.dragHandle,zIndex:S.z,parentId:k.parentId,...N})})})}var cG=K.memo(uG);const fG=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function aA(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:o}=ht(fG,Bt),s=aG(e.onlyRenderVisibleElements),u=sG();return y.jsx("div",{className:"react-flow__nodes",style:np,children:s.map(c=>y.jsx(cG,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:u,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:o},c))})}aA.displayName="NodeRenderer";const dG=K.memo(aA);function hG(e){return ht(K.useCallback(n=>{if(!e)return n.edges.map(i=>i.id);const r=[];if(n.width&&n.height)for(const i of n.edges){const o=n.nodeLookup.get(i.source),s=n.nodeLookup.get(i.target);o&&s&&aB({sourceNode:o,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(i.id)}return r},[e]),Bt)}const mG=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return y.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},pG=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return y.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},sS={[lm.Arrow]:mG,[lm.ArrowClosed]:pG};function _G(e){const t=Ut();return K.useMemo(()=>{var i,o;return Object.prototype.hasOwnProperty.call(sS,e)?sS[e]:((o=(i=t.getState()).onError)==null||o.call(i,"009",fi.error009(e)),null)},[e])}const gG=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:o="strokeWidth",strokeWidth:s,orient:u="auto-start-reverse"})=>{const c=_G(t);return c?y.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:o,orient:u,refX:"0",refY:"0",children:y.jsx(c,{color:n,strokeWidth:s})}):null},oA=({defaultColor:e,rfId:t})=>{const n=ht(o=>o.edges),r=ht(o=>o.defaultEdgeOptions),i=K.useMemo(()=>hB(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return i.length?y.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:y.jsx("defs",{children:i.map(o=>y.jsx(gG,{id:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient},o.id))})}):null};oA.displayName="MarkerDefinitions";var yG=K.memo(oA);function sA({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:o,labelBgPadding:s=[2,4],labelBgBorderRadius:u=2,children:c,className:f,...h}){const[m,_]=K.useState({x:1,y:0,width:0,height:0}),g=fn(["react-flow__edge-textwrapper",f]),b=K.useRef(null);return K.useEffect(()=>{if(b.current){const E=b.current.getBBox();_({x:E.x,y:E.y,width:E.width,height:E.height})}},[n]),n?y.jsxs("g",{transform:`translate(${e-m.width/2} ${t-m.height/2})`,className:g,visibility:m.width?"visible":"hidden",...h,children:[i&&y.jsx("rect",{width:m.width+2*s[0],x:-s[0],y:-s[1],height:m.height+2*s[1],className:"react-flow__edge-textbg",style:o,rx:u,ry:u}),y.jsx("text",{className:"react-flow__edge-text",y:m.height/2,dy:"0.3em",ref:b,style:r,children:n}),c]}):null}sA.displayName="EdgeText";const vG=K.memo(sA);function kf({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:o,labelBgStyle:s,labelBgPadding:u,labelBgBorderRadius:c,interactionWidth:f=20,...h}){return y.jsxs(y.Fragment,{children:[y.jsx("path",{...h,d:e,fill:"none",className:fn(["react-flow__edge-path",h.className])}),f?y.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:f,className:"react-flow__edge-interaction"}):null,r&&si(t)&&si(n)?y.jsx(vG,{x:t,y:n,label:r,labelStyle:i,labelShowBg:o,labelBgStyle:s,labelBgPadding:u,labelBgBorderRadius:c}):null]})}function lS({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===Pe.Left||e===Pe.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function lA({sourceX:e,sourceY:t,sourcePosition:n=Pe.Bottom,targetX:r,targetY:i,targetPosition:o=Pe.Top}){const[s,u]=lS({pos:n,x1:e,y1:t,x2:r,y2:i}),[c,f]=lS({pos:o,x1:r,y1:i,x2:e,y2:t}),[h,m,_,g]=Nj({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:u,targetControlX:c,targetControlY:f});return[`M${e},${t} C${s},${u} ${c},${f} ${r},${i}`,h,m,_,g]}function uA(e){return K.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,sourcePosition:s,targetPosition:u,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:m,labelBgPadding:_,labelBgBorderRadius:g,style:b,markerEnd:E,markerStart:C,interactionWidth:w})=>{const[T,k,S]=lA({sourceX:n,sourceY:r,sourcePosition:s,targetX:i,targetY:o,targetPosition:u}),z=e.isInternal?void 0:t;return y.jsx(kf,{id:z,path:T,labelX:k,labelY:S,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:m,labelBgPadding:_,labelBgBorderRadius:g,style:b,markerEnd:E,markerStart:C,interactionWidth:w})})}const bG=uA({isInternal:!1}),cA=uA({isInternal:!0});bG.displayName="SimpleBezierEdge";cA.displayName="SimpleBezierEdgeInternal";function fA(e){return K.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:m,style:_,sourcePosition:g=Pe.Bottom,targetPosition:b=Pe.Top,markerEnd:E,markerStart:C,pathOptions:w,interactionWidth:T})=>{const[k,S,z]=vv({sourceX:n,sourceY:r,sourcePosition:g,targetX:i,targetY:o,targetPosition:b,borderRadius:w==null?void 0:w.borderRadius,offset:w==null?void 0:w.offset,stepPosition:w==null?void 0:w.stepPosition}),R=e.isInternal?void 0:t;return y.jsx(kf,{id:R,path:k,labelX:S,labelY:z,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:m,style:_,markerEnd:E,markerStart:C,interactionWidth:T})})}const dA=fA({isInternal:!1}),hA=fA({isInternal:!0});dA.displayName="SmoothStepEdge";hA.displayName="SmoothStepEdgeInternal";function mA(e){return K.memo(({id:t,...n})=>{var i;const r=e.isInternal?void 0:t;return y.jsx(dA,{...n,id:r,pathOptions:K.useMemo(()=>{var o;return{borderRadius:0,offset:(o=n.pathOptions)==null?void 0:o.offset}},[(i=n.pathOptions)==null?void 0:i.offset])})})}const xG=mA({isInternal:!1}),pA=mA({isInternal:!0});xG.displayName="StepEdge";pA.displayName="StepEdgeInternal";function _A(e){return K.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:m,style:_,markerEnd:g,markerStart:b,interactionWidth:E})=>{const[C,w,T]=Mj({sourceX:n,sourceY:r,targetX:i,targetY:o}),k=e.isInternal?void 0:t;return y.jsx(kf,{id:k,path:C,labelX:w,labelY:T,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:m,style:_,markerEnd:g,markerStart:b,interactionWidth:E})})}const wG=_A({isInternal:!1}),gA=_A({isInternal:!0});wG.displayName="StraightEdge";gA.displayName="StraightEdgeInternal";function yA(e){return K.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,sourcePosition:s=Pe.Bottom,targetPosition:u=Pe.Top,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:m,labelBgPadding:_,labelBgBorderRadius:g,style:b,markerEnd:E,markerStart:C,pathOptions:w,interactionWidth:T})=>{const[k,S,z]=Lj({sourceX:n,sourceY:r,sourcePosition:s,targetX:i,targetY:o,targetPosition:u,curvature:w==null?void 0:w.curvature}),R=e.isInternal?void 0:t;return y.jsx(kf,{id:R,path:k,labelX:S,labelY:z,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:m,labelBgPadding:_,labelBgBorderRadius:g,style:b,markerEnd:E,markerStart:C,interactionWidth:T})})}const kG=yA({isInternal:!1}),vA=yA({isInternal:!0});kG.displayName="BezierEdge";vA.displayName="BezierEdgeInternal";const uS={default:vA,straight:gA,step:pA,smoothstep:hA,simplebezier:cA},cS={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},EG=(e,t,n)=>n===Pe.Left?e-t:n===Pe.Right?e+t:e,SG=(e,t,n)=>n===Pe.Top?e-t:n===Pe.Bottom?e+t:e,fS="react-flow__edgeupdater";function dS({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:o,onMouseOut:s,type:u}){return y.jsx("circle",{onMouseDown:i,onMouseEnter:o,onMouseOut:s,className:fn([fS,`${fS}-${u}`]),cx:EG(t,r,e),cy:SG(n,r,e),r,stroke:"transparent",fill:"transparent"})}function CG({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:o,targetY:s,sourcePosition:u,targetPosition:c,onReconnect:f,onReconnectStart:h,onReconnectEnd:m,setReconnecting:_,setUpdateHover:g}){const b=Ut(),E=(S,z)=>{if(S.button!==0)return;const{autoPanOnConnect:R,domNode:M,connectionMode:X,connectionRadius:F,lib:I,onConnectStart:U,cancelConnection:G,nodeLookup:q,rfId:$,panBy:Z,updateConnection:A}=b.getState(),N=z.type==="target",H=(B,ee)=>{_(!1),m==null||m(B,n,z.type,ee)},Q=B=>f==null?void 0:f(n,B),D=(B,ee)=>{_(!0),h==null||h(S,n,z.type),U==null||U(B,ee)};wv.onPointerDown(S.nativeEvent,{autoPanOnConnect:R,connectionMode:X,connectionRadius:F,domNode:M,handleId:z.id,nodeId:z.nodeId,nodeLookup:q,isTarget:N,edgeUpdaterType:z.type,lib:I,flowId:$,cancelConnection:G,panBy:Z,isValidConnection:(...B)=>{var ee,O;return((O=(ee=b.getState()).isValidConnection)==null?void 0:O.call(ee,...B))??!0},onConnect:Q,onConnectStart:D,onConnectEnd:(...B)=>{var ee,O;return(O=(ee=b.getState()).onConnectEnd)==null?void 0:O.call(ee,...B)},onReconnectEnd:H,updateConnection:A,getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,dragThreshold:b.getState().connectionDragThreshold,handleDomNode:S.currentTarget})},C=S=>E(S,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),w=S=>E(S,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),T=()=>g(!0),k=()=>g(!1);return y.jsxs(y.Fragment,{children:[(e===!0||e==="source")&&y.jsx(dS,{position:u,centerX:r,centerY:i,radius:t,onMouseDown:C,onMouseEnter:T,onMouseOut:k,type:"source"}),(e===!0||e==="target")&&y.jsx(dS,{position:c,centerX:o,centerY:s,radius:t,onMouseDown:w,onMouseEnter:T,onMouseOut:k,type:"target"})]})}function TG({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:o,onContextMenu:s,onMouseEnter:u,onMouseMove:c,onMouseLeave:f,reconnectRadius:h,onReconnect:m,onReconnectStart:_,onReconnectEnd:g,rfId:b,edgeTypes:E,noPanClassName:C,onError:w,disableKeyboardA11y:T}){let k=ht(ge=>ge.edgeLookup.get(e));const S=ht(ge=>ge.defaultEdgeOptions);k=S?{...S,...k}:k;let z=k.type||"default",R=(E==null?void 0:E[z])||uS[z];R===void 0&&(w==null||w("011",fi.error011(z)),z="default",R=(E==null?void 0:E.default)||uS.default);const M=!!(k.focusable||t&&typeof k.focusable>"u"),X=typeof m<"u"&&(k.reconnectable||n&&typeof k.reconnectable>"u"),F=!!(k.selectable||r&&typeof k.selectable>"u"),I=K.useRef(null),[U,G]=K.useState(!1),[q,$]=K.useState(!1),Z=Ut(),{zIndex:A=k.zIndex,sourceX:N,sourceY:H,targetX:Q,targetY:D,sourcePosition:B,targetPosition:ee}=ht(K.useCallback(ge=>{const Ae=ge.nodeLookup.get(k.source),Ce=ge.nodeLookup.get(k.target);if(!Ae||!Ce)return cS;const Te=dB({id:e,sourceNode:Ae,targetNode:Ce,sourceHandle:k.sourceHandle||null,targetHandle:k.targetHandle||null,connectionMode:ge.connectionMode,onError:w}),ue=iB({selected:k.selected,zIndex:k.zIndex,sourceNode:Ae,targetNode:Ce,elevateOnSelect:ge.elevateEdgesOnSelect,zIndexMode:ge.zIndexMode});return{...Te||cS,zIndex:ue}},[k.source,k.target,k.sourceHandle,k.targetHandle,k.selected,k.zIndex]),Bt),O=K.useMemo(()=>k.markerStart?`url('#${bv(k.markerStart,b)}')`:void 0,[k.markerStart,b]),ie=K.useMemo(()=>k.markerEnd?`url('#${bv(k.markerEnd,b)}')`:void 0,[k.markerEnd,b]);if(k.hidden||N===null||H===null||Q===null||D===null)return null;const oe=ge=>{var ue;const{addSelectedEdges:Ae,unselectNodesAndEdges:Ce,multiSelectionActive:Te}=Z.getState();F&&(Z.setState({nodesSelectionActive:!1}),k.selected&&Te?(Ce({nodes:[],edges:[k]}),(ue=I.current)==null||ue.blur()):Ae([e])),i&&i(ge,k)},me=o?ge=>{o(ge,{...k})}:void 0,we=s?ge=>{s(ge,{...k})}:void 0,ne=u?ge=>{u(ge,{...k})}:void 0,de=c?ge=>{c(ge,{...k})}:void 0,le=f?ge=>{f(ge,{...k})}:void 0,ke=ge=>{var Ae;if(!T&&_j.includes(ge.key)&&F){const{unselectNodesAndEdges:Ce,addSelectedEdges:Te}=Z.getState();ge.key==="Escape"?((Ae=I.current)==null||Ae.blur(),Ce({edges:[k]})):Te([e])}};return y.jsx("svg",{style:{zIndex:A},children:y.jsxs("g",{className:fn(["react-flow__edge",`react-flow__edge-${z}`,k.className,C,{selected:k.selected,animated:k.animated,inactive:!F&&!i,updating:U,selectable:F}]),onClick:oe,onDoubleClick:me,onContextMenu:we,onMouseEnter:ne,onMouseMove:de,onMouseLeave:le,onKeyDown:M?ke:void 0,tabIndex:M?0:void 0,role:k.ariaRole??(M?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":k.ariaLabel===null?void 0:k.ariaLabel||`Edge from ${k.source} to ${k.target}`,"aria-describedby":M?`${Wj}-${b}`:void 0,ref:I,...k.domAttributes,children:[!q&&y.jsx(R,{id:e,source:k.source,target:k.target,type:k.type,selected:k.selected,animated:k.animated,selectable:F,deletable:k.deletable??!0,label:k.label,labelStyle:k.labelStyle,labelShowBg:k.labelShowBg,labelBgStyle:k.labelBgStyle,labelBgPadding:k.labelBgPadding,labelBgBorderRadius:k.labelBgBorderRadius,sourceX:N,sourceY:H,targetX:Q,targetY:D,sourcePosition:B,targetPosition:ee,data:k.data,style:k.style,sourceHandleId:k.sourceHandle,targetHandleId:k.targetHandle,markerStart:O,markerEnd:ie,pathOptions:"pathOptions"in k?k.pathOptions:void 0,interactionWidth:k.interactionWidth}),X&&y.jsx(CG,{edge:k,isReconnectable:X,reconnectRadius:h,onReconnect:m,onReconnectStart:_,onReconnectEnd:g,sourceX:N,sourceY:H,targetX:Q,targetY:D,sourcePosition:B,targetPosition:ee,setUpdateHover:G,setReconnecting:$})]})})}var jG=K.memo(TG);const AG=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function bA({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:o,onEdgeContextMenu:s,onEdgeMouseEnter:u,onEdgeMouseMove:c,onEdgeMouseLeave:f,onEdgeClick:h,reconnectRadius:m,onEdgeDoubleClick:_,onReconnectStart:g,onReconnectEnd:b,disableKeyboardA11y:E}){const{edgesFocusable:C,edgesReconnectable:w,elementsSelectable:T,onError:k}=ht(AG,Bt),S=hG(t);return y.jsxs("div",{className:"react-flow__edges",children:[y.jsx(yG,{defaultColor:e,rfId:n}),S.map(z=>y.jsx(jG,{id:z,edgesFocusable:C,edgesReconnectable:w,elementsSelectable:T,noPanClassName:i,onReconnect:o,onContextMenu:s,onMouseEnter:u,onMouseMove:c,onMouseLeave:f,onClick:h,reconnectRadius:m,onDoubleClick:_,onReconnectStart:g,onReconnectEnd:b,rfId:n,onError:k,edgeTypes:r,disableKeyboardA11y:E},z))]})}bA.displayName="EdgeRenderer";const RG=K.memo(bA),NG=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function LG({children:e}){const t=ht(NG);return y.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function zG(e){const t=e0(),n=K.useRef(!1);K.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const MG=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function DG(e){const t=ht(MG),n=Ut();return K.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function OG(e){return e.connection.inProgress?{...e.connection,to:wf(e.connection.to,e.transform)}:{...e.connection}}function qG(e){return OG}function IG(e){const t=qG();return ht(t,Bt)}const PG=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function $G({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:i,width:o,height:s,isValid:u,inProgress:c}=ht(PG,Bt);return!(o&&i&&c)?null:y.jsx("svg",{style:e,width:o,height:s,className:"react-flow__connectionline react-flow__container",children:y.jsx("g",{className:fn(["react-flow__connection",vj(u)]),children:y.jsx(xA,{style:t,type:n,CustomComponent:r,isValid:u})})})}const xA=({style:e,type:t=vo.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:i,from:o,fromNode:s,fromHandle:u,fromPosition:c,to:f,toNode:h,toHandle:m,toPosition:_,pointer:g}=IG();if(!i)return;if(n)return y.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:u,fromX:o.x,fromY:o.y,toX:f.x,toY:f.y,fromPosition:c,toPosition:_,connectionStatus:vj(r),toNode:h,toHandle:m,pointer:g});let b="";const E={sourceX:o.x,sourceY:o.y,sourcePosition:c,targetX:f.x,targetY:f.y,targetPosition:_};switch(t){case vo.Bezier:[b]=Lj(E);break;case vo.SimpleBezier:[b]=lA(E);break;case vo.Step:[b]=vv({...E,borderRadius:0});break;case vo.SmoothStep:[b]=vv(E);break;default:[b]=Mj(E)}return y.jsx("path",{d:b,fill:"none",className:"react-flow__connection-path",style:e})};xA.displayName="ConnectionLine";const BG={};function hS(e=BG){K.useRef(e),Ut(),K.useEffect(()=>{},[e])}function UG(){Ut(),K.useRef(!1),K.useEffect(()=>{},[])}function wA({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:o,onEdgeDoubleClick:s,onNodeMouseEnter:u,onNodeMouseMove:c,onNodeMouseLeave:f,onNodeContextMenu:h,onSelectionContextMenu:m,onSelectionStart:_,onSelectionEnd:g,connectionLineType:b,connectionLineStyle:E,connectionLineComponent:C,connectionLineContainerStyle:w,selectionKeyCode:T,selectionOnDrag:k,selectionMode:S,multiSelectionKeyCode:z,panActivationKeyCode:R,zoomActivationKeyCode:M,deleteKeyCode:X,onlyRenderVisibleElements:F,elementsSelectable:I,defaultViewport:U,translateExtent:G,minZoom:q,maxZoom:$,preventScrolling:Z,defaultMarkerColor:A,zoomOnScroll:N,zoomOnPinch:H,panOnScroll:Q,panOnScrollSpeed:D,panOnScrollMode:B,zoomOnDoubleClick:ee,panOnDrag:O,autoPanOnSelection:ie,onPaneClick:oe,onPaneMouseEnter:me,onPaneMouseMove:we,onPaneMouseLeave:ne,onPaneScroll:de,onPaneContextMenu:le,paneClickDistance:ke,nodeClickDistance:ge,onEdgeContextMenu:Ae,onEdgeMouseEnter:Ce,onEdgeMouseMove:Te,onEdgeMouseLeave:ue,reconnectRadius:it,onReconnect:wt,onReconnectStart:kt,onReconnectEnd:Tt,noDragClassName:pt,noWheelClassName:Gt,noPanClassName:an,disableKeyboardA11y:ft,nodeExtent:Ft,rfId:_e,viewport:Re,onViewportChange:qe}){return hS(e),hS(t),UG(),zG(n),DG(Re),y.jsx(rG,{onPaneClick:oe,onPaneMouseEnter:me,onPaneMouseMove:we,onPaneMouseLeave:ne,onPaneContextMenu:le,onPaneScroll:de,paneClickDistance:ke,deleteKeyCode:X,selectionKeyCode:T,selectionOnDrag:k,selectionMode:S,onSelectionStart:_,onSelectionEnd:g,multiSelectionKeyCode:z,panActivationKeyCode:R,zoomActivationKeyCode:M,elementsSelectable:I,zoomOnScroll:N,zoomOnPinch:H,zoomOnDoubleClick:ee,panOnScroll:Q,panOnScrollSpeed:D,panOnScrollMode:B,panOnDrag:O,autoPanOnSelection:ie,defaultViewport:U,translateExtent:G,minZoom:q,maxZoom:$,onSelectionContextMenu:m,preventScrolling:Z,noDragClassName:pt,noWheelClassName:Gt,noPanClassName:an,disableKeyboardA11y:ft,onViewportChange:qe,isControlledViewport:!!Re,children:y.jsxs(LG,{children:[y.jsx(RG,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:s,onReconnect:wt,onReconnectStart:kt,onReconnectEnd:Tt,onlyRenderVisibleElements:F,onEdgeContextMenu:Ae,onEdgeMouseEnter:Ce,onEdgeMouseMove:Te,onEdgeMouseLeave:ue,reconnectRadius:it,defaultMarkerColor:A,noPanClassName:an,disableKeyboardA11y:ft,rfId:_e}),y.jsx($G,{style:E,type:b,component:C,containerStyle:w}),y.jsx("div",{className:"react-flow__edgelabel-renderer"}),y.jsx(dG,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:o,onNodeMouseEnter:u,onNodeMouseMove:c,onNodeMouseLeave:f,onNodeContextMenu:h,nodeClickDistance:ge,onlyRenderVisibleElements:F,noPanClassName:an,noDragClassName:pt,disableKeyboardA11y:ft,nodeExtent:Ft,rfId:_e}),y.jsx("div",{className:"react-flow__viewport-portal"})]})})}wA.displayName="GraphView";const GG=K.memo(wA),FG=Sj(),mS=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:s,fitViewOptions:u,minZoom:c=.5,maxZoom:f=2,nodeOrigin:h,nodeExtent:m,zIndexMode:_="basic"}={})=>{const g=new Map,b=new Map,E=new Map,C=new Map,w=r??t??[],T=n??e??[],k=h??[0,0],S=m??Qc;qj(E,C,w);const{nodesInitialized:z}=xv(T,g,b,{nodeOrigin:k,nodeExtent:S,zIndexMode:_});let R=[0,0,1];if(s&&i&&o){const M=bf(g,{filter:U=>!!((U.width||U.initialWidth)&&(U.height||U.initialHeight))}),{x:X,y:F,zoom:I}=X1(M,i,o,c,f,(u==null?void 0:u.padding)??.1);R=[X,F,I]}return{rfId:"1",width:i??0,height:o??0,transform:R,nodes:T,nodesInitialized:z,nodeLookup:g,parentLookup:b,edges:w,edgeLookup:C,connectionLookup:E,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:f,translateExtent:Qc,nodeExtent:S,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Jl.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:k,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:s??!1,fitViewOptions:u,fitViewResolver:null,connection:{...yj},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:FG,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:gj,zIndexMode:_,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},HG=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:s,fitViewOptions:u,minZoom:c,maxZoom:f,nodeOrigin:h,nodeExtent:m,zIndexMode:_})=>tU((g,b)=>{async function E(){const{nodeLookup:C,panZoom:w,fitViewOptions:T,fitViewResolver:k,width:S,height:z,minZoom:R,maxZoom:M}=b();w&&(await Q$({nodes:C,width:S,height:z,panZoom:w,minZoom:R,maxZoom:M},T),k==null||k.resolve(!0),g({fitViewResolver:null}))}return{...mS({nodes:e,edges:t,width:i,height:o,fitView:s,fitViewOptions:u,minZoom:c,maxZoom:f,nodeOrigin:h,nodeExtent:m,defaultNodes:n,defaultEdges:r,zIndexMode:_}),setNodes:C=>{const{nodeLookup:w,parentLookup:T,nodeOrigin:k,elevateNodesOnSelect:S,fitViewQueued:z,zIndexMode:R,nodesSelectionActive:M}=b(),{nodesInitialized:X,hasSelectedNodes:F}=xv(C,w,T,{nodeOrigin:k,nodeExtent:m,elevateNodesOnSelect:S,checkEquality:!0,zIndexMode:R}),I=M&&F;z&&X?(E(),g({nodes:C,nodesInitialized:X,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:I})):g({nodes:C,nodesInitialized:X,nodesSelectionActive:I})},setEdges:C=>{const{connectionLookup:w,edgeLookup:T}=b();qj(w,T,C),g({edges:C})},setDefaultNodesAndEdges:(C,w)=>{if(C){const{setNodes:T}=b();T(C),g({hasDefaultNodes:!0})}if(w){const{setEdges:T}=b();T(w),g({hasDefaultEdges:!0})}},updateNodeInternals:C=>{const{triggerNodeChanges:w,nodeLookup:T,parentLookup:k,domNode:S,nodeOrigin:z,nodeExtent:R,debug:M,fitViewQueued:X,zIndexMode:F}=b(),{changes:I,updatedInternals:U}=bB(C,T,k,S,z,R,F);U&&(_B(T,k,{nodeOrigin:z,nodeExtent:R,zIndexMode:F}),X?(E(),g({fitViewQueued:!1,fitViewOptions:void 0})):g({}),(I==null?void 0:I.length)>0&&(M&&console.log("React Flow: trigger node changes",I),w==null||w(I)))},updateNodePositions:(C,w=!1)=>{const T=[];let k=[];const{nodeLookup:S,triggerNodeChanges:z,connection:R,updateConnection:M,onNodesChangeMiddlewareMap:X}=b();for(const[F,I]of C){const U=S.get(F),G=!!(U!=null&&U.expandParent&&(U!=null&&U.parentId)&&(I!=null&&I.position)),q={id:F,type:"position",position:G?{x:Math.max(0,I.position.x),y:Math.max(0,I.position.y)}:I.position,dragging:w};if(U&&R.inProgress&&R.fromNode.id===U.id){const $=Ns(U,R.fromHandle,Pe.Left,!0);M({...R,from:$})}G&&U.parentId&&T.push({id:F,parentId:U.parentId,rect:{...I.internals.positionAbsolute,width:I.measured.width??0,height:I.measured.height??0}}),k.push(q)}if(T.length>0){const{parentLookup:F,nodeOrigin:I}=b(),U=J1(T,S,F,I);k.push(...U)}for(const F of X.values())k=F(k);z(k)},triggerNodeChanges:C=>{const{onNodesChange:w,setNodes:T,nodes:k,hasDefaultNodes:S,debug:z}=b();if(C!=null&&C.length){if(S){const R=wU(C,k);T(R)}z&&console.log("React Flow: trigger node changes",C),w==null||w(C)}},triggerEdgeChanges:C=>{const{onEdgesChange:w,setEdges:T,edges:k,hasDefaultEdges:S,debug:z}=b();if(C!=null&&C.length){if(S){const R=kU(C,k);T(R)}z&&console.log("React Flow: trigger edge changes",C),w==null||w(C)}},addSelectedNodes:C=>{const{multiSelectionActive:w,edgeLookup:T,nodeLookup:k,triggerNodeChanges:S,triggerEdgeChanges:z}=b();if(w){const R=C.map(M=>ms(M,!0));S(R);return}S(Bl(k,new Set([...C]),!0)),z(Bl(T))},addSelectedEdges:C=>{const{multiSelectionActive:w,edgeLookup:T,nodeLookup:k,triggerNodeChanges:S,triggerEdgeChanges:z}=b();if(w){const R=C.map(M=>ms(M,!0));z(R);return}z(Bl(T,new Set([...C]))),S(Bl(k,new Set,!0))},unselectNodesAndEdges:({nodes:C,edges:w}={})=>{const{edges:T,nodes:k,nodeLookup:S,triggerNodeChanges:z,triggerEdgeChanges:R}=b(),M=C||k,X=w||T,F=[];for(const U of M){if(!U.selected)continue;const G=S.get(U.id);G&&(G.selected=!1),F.push(ms(U.id,!1))}const I=[];for(const U of X)U.selected&&I.push(ms(U.id,!1));z(F),R(I)},setMinZoom:C=>{const{panZoom:w,maxZoom:T}=b();w==null||w.setScaleExtent([C,T]),g({minZoom:C})},setMaxZoom:C=>{const{panZoom:w,minZoom:T}=b();w==null||w.setScaleExtent([T,C]),g({maxZoom:C})},setTranslateExtent:C=>{var w;(w=b().panZoom)==null||w.setTranslateExtent(C),g({translateExtent:C})},resetSelectedElements:()=>{const{edges:C,nodes:w,triggerNodeChanges:T,triggerEdgeChanges:k,elementsSelectable:S}=b();if(!S)return;const z=w.reduce((M,X)=>X.selected?[...M,ms(X.id,!1)]:M,[]),R=C.reduce((M,X)=>X.selected?[...M,ms(X.id,!1)]:M,[]);T(z),k(R)},setNodeExtent:C=>{const{nodes:w,nodeLookup:T,parentLookup:k,nodeOrigin:S,elevateNodesOnSelect:z,nodeExtent:R,zIndexMode:M}=b();C[0][0]===R[0][0]&&C[0][1]===R[0][1]&&C[1][0]===R[1][0]&&C[1][1]===R[1][1]||(xv(w,T,k,{nodeOrigin:S,nodeExtent:C,elevateNodesOnSelect:z,checkEquality:!1,zIndexMode:M}),g({nodeExtent:C}))},panBy:C=>{const{transform:w,width:T,height:k,panZoom:S,translateExtent:z}=b();return xB({delta:C,panZoom:S,transform:w,translateExtent:z,width:T,height:k})},setCenter:async(C,w,T)=>{const{width:k,height:S,maxZoom:z,panZoom:R}=b();if(!R)return!1;const M=typeof(T==null?void 0:T.zoom)<"u"?T.zoom:z;return await R.setViewport({x:k/2-C*M,y:S/2-w*M,zoom:M},{duration:T==null?void 0:T.duration,ease:T==null?void 0:T.ease,interpolate:T==null?void 0:T.interpolate}),!0},cancelConnection:()=>{g({connection:{...yj}})},updateConnection:C=>{g({connection:C})},reset:()=>g({...mS()})}},Object.is);function VG({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:o,initialMinZoom:s,initialMaxZoom:u,initialFitViewOptions:c,fitView:f,nodeOrigin:h,nodeExtent:m,zIndexMode:_,children:g}){const[b]=K.useState(()=>HG({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:f,minZoom:s,maxZoom:u,fitViewOptions:c,nodeOrigin:h,nodeExtent:m,zIndexMode:_}));return y.jsx(nU,{value:b,children:y.jsx(AU,{children:y.jsx(FU,{children:g})})})}function XG({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:o,height:s,fitView:u,fitViewOptions:c,minZoom:f,maxZoom:h,nodeOrigin:m,nodeExtent:_,zIndexMode:g}){return K.useContext(ep)?y.jsx(y.Fragment,{children:e}):y.jsx(VG,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:o,initialHeight:s,fitView:u,initialFitViewOptions:c,initialMinZoom:f,initialMaxZoom:h,nodeOrigin:m,nodeExtent:_,zIndexMode:g,children:e})}const YG={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function WG({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:o,edgeTypes:s,onNodeClick:u,onEdgeClick:c,onInit:f,onMove:h,onMoveStart:m,onMoveEnd:_,onConnect:g,onConnectStart:b,onConnectEnd:E,onClickConnectStart:C,onClickConnectEnd:w,onNodeMouseEnter:T,onNodeMouseMove:k,onNodeMouseLeave:S,onNodeContextMenu:z,onNodeDoubleClick:R,onNodeDragStart:M,onNodeDrag:X,onNodeDragStop:F,onNodesDelete:I,onEdgesDelete:U,onDelete:G,onSelectionChange:q,onSelectionDragStart:$,onSelectionDrag:Z,onSelectionDragStop:A,onSelectionContextMenu:N,onSelectionStart:H,onSelectionEnd:Q,onBeforeDelete:D,connectionMode:B,connectionLineType:ee=vo.Bezier,connectionLineStyle:O,connectionLineComponent:ie,connectionLineContainerStyle:oe,deleteKeyCode:me="Backspace",selectionKeyCode:we="Shift",selectionOnDrag:ne=!1,selectionMode:de=Zc.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:ke=ef()?"Meta":"Control",zoomActivationKeyCode:ge=ef()?"Meta":"Control",snapToGrid:Ae,snapGrid:Ce,onlyRenderVisibleElements:Te=!1,selectNodesOnDrag:ue,nodesDraggable:it,autoPanOnNodeFocus:wt,nodesConnectable:kt,nodesFocusable:Tt,nodeOrigin:pt=Kj,edgesFocusable:Gt,edgesReconnectable:an,elementsSelectable:ft=!0,defaultViewport:Ft=pU,minZoom:_e=.5,maxZoom:Re=2,translateExtent:qe=Qc,preventScrolling:He=!0,nodeExtent:nt,defaultMarkerColor:Kt="#b1b1b7",zoomOnScroll:Rn=!0,zoomOnPinch:yt=!0,panOnScroll:Ht=!1,panOnScrollSpeed:Jt=.5,panOnScrollMode:vt=Es.Free,zoomOnDoubleClick:ar=!0,panOnDrag:Fn=!0,onPaneClick:vu,onPaneMouseEnter:ja,onPaneMouseMove:Aa,onPaneMouseLeave:Ra,onPaneScroll:br,onPaneContextMenu:Pi,paneClickDistance:$i=1,nodeClickDistance:Is=0,children:Lo,onReconnect:zo,onReconnectStart:Bi,onReconnectEnd:Ps,onEdgeContextMenu:Na,onEdgeDoubleClick:Ui,onEdgeMouseEnter:hi,onEdgeMouseMove:Mo,onEdgeMouseLeave:Do,reconnectRadius:Gi=10,onNodesChange:$s,onEdgesChange:xr,noDragClassName:en="nodrag",noWheelClassName:De="nowheel",noPanClassName:Fr="nopan",fitView:La,fitViewOptions:Hr,connectOnClick:Fi,attributionPosition:Bs,proOptions:Vt,defaultEdgeOptions:Hi,elevateNodesOnSelect:mi=!0,elevateEdgesOnSelect:pi=!1,disableKeyboardA11y:_i=!1,autoPanOnConnect:wr,autoPanOnNodeDrag:Xt,autoPanOnSelection:Us=!0,autoPanSpeed:Gs,connectionRadius:kr,isValidConnection:gi,onError:za,style:Vr,id:Oo,nodeDragThreshold:bu,connectionDragThreshold:Ma,viewport:Da,onViewportChange:or,width:Nn,height:Fs,colorMode:Hs="light",debug:qo,onScroll:Vi,ariaLabelConfig:Xi,zIndexMode:Vs="basic",...Ln},Io){const Oa=Oo||"1",Po=vU(Hs),yi=K.useCallback($o=>{$o.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Vi==null||Vi($o)},[Vi]);return y.jsx("div",{"data-testid":"rf__wrapper",...Ln,onScroll:yi,style:{...Vr,...YG},ref:Io,className:fn(["react-flow",i,Po]),id:Oo,role:"application",children:y.jsxs(XG,{nodes:e,edges:t,width:Nn,height:Fs,fitView:La,fitViewOptions:Hr,minZoom:_e,maxZoom:Re,nodeOrigin:pt,nodeExtent:nt,zIndexMode:Vs,children:[y.jsx(yU,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:g,onConnectStart:b,onConnectEnd:E,onClickConnectStart:C,onClickConnectEnd:w,nodesDraggable:it,autoPanOnNodeFocus:wt,nodesConnectable:kt,nodesFocusable:Tt,edgesFocusable:Gt,edgesReconnectable:an,elementsSelectable:ft,elevateNodesOnSelect:mi,elevateEdgesOnSelect:pi,minZoom:_e,maxZoom:Re,nodeExtent:nt,onNodesChange:$s,onEdgesChange:xr,snapToGrid:Ae,snapGrid:Ce,connectionMode:B,translateExtent:qe,connectOnClick:Fi,defaultEdgeOptions:Hi,fitView:La,fitViewOptions:Hr,onNodesDelete:I,onEdgesDelete:U,onDelete:G,onNodeDragStart:M,onNodeDrag:X,onNodeDragStop:F,onSelectionDrag:Z,onSelectionDragStart:$,onSelectionDragStop:A,onMove:h,onMoveStart:m,onMoveEnd:_,noPanClassName:Fr,nodeOrigin:pt,rfId:Oa,autoPanOnConnect:wr,autoPanOnNodeDrag:Xt,autoPanSpeed:Gs,onError:za,connectionRadius:kr,isValidConnection:gi,selectNodesOnDrag:ue,nodeDragThreshold:bu,connectionDragThreshold:Ma,onBeforeDelete:D,debug:qo,ariaLabelConfig:Xi,zIndexMode:Vs}),y.jsx(GG,{onInit:f,onNodeClick:u,onEdgeClick:c,onNodeMouseEnter:T,onNodeMouseMove:k,onNodeMouseLeave:S,onNodeContextMenu:z,onNodeDoubleClick:R,nodeTypes:o,edgeTypes:s,connectionLineType:ee,connectionLineStyle:O,connectionLineComponent:ie,connectionLineContainerStyle:oe,selectionKeyCode:we,selectionOnDrag:ne,selectionMode:de,deleteKeyCode:me,multiSelectionKeyCode:ke,panActivationKeyCode:le,zoomActivationKeyCode:ge,onlyRenderVisibleElements:Te,defaultViewport:Ft,translateExtent:qe,minZoom:_e,maxZoom:Re,preventScrolling:He,zoomOnScroll:Rn,zoomOnPinch:yt,zoomOnDoubleClick:ar,panOnScroll:Ht,panOnScrollSpeed:Jt,panOnScrollMode:vt,panOnDrag:Fn,autoPanOnSelection:Us,onPaneClick:vu,onPaneMouseEnter:ja,onPaneMouseMove:Aa,onPaneMouseLeave:Ra,onPaneScroll:br,onPaneContextMenu:Pi,paneClickDistance:$i,nodeClickDistance:Is,onSelectionContextMenu:N,onSelectionStart:H,onSelectionEnd:Q,onReconnect:zo,onReconnectStart:Bi,onReconnectEnd:Ps,onEdgeContextMenu:Na,onEdgeDoubleClick:Ui,onEdgeMouseEnter:hi,onEdgeMouseMove:Mo,onEdgeMouseLeave:Do,reconnectRadius:Gi,defaultMarkerColor:Kt,noDragClassName:en,noWheelClassName:De,noPanClassName:Fr,rfId:Oa,disableKeyboardA11y:_i,nodeExtent:nt,viewport:Da,onViewportChange:or}),y.jsx(mU,{onSelectionChange:q}),Lo,y.jsx(uU,{proOptions:Vt,position:Bs}),y.jsx(lU,{rfId:Oa,disableKeyboardA11y:_i})]})})}var KG=Zj(WG);function QG({dimensions:e,lineWidth:t,variant:n,className:r}){return y.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:fn(["react-flow__background-pattern",n,r])})}function ZG({radius:e,className:t}){return y.jsx("circle",{cx:e,cy:e,r:e,className:fn(["react-flow__background-pattern","dots",t])})}var So;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(So||(So={}));const JG={[So.Dots]:1,[So.Lines]:1,[So.Cross]:6},eF=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function kA({id:e,variant:t=So.Dots,gap:n=20,size:r,lineWidth:i=1,offset:o=0,color:s,bgColor:u,style:c,className:f,patternClassName:h}){const m=K.useRef(null),{transform:_,patternId:g}=ht(eF,Bt),b=r||JG[t],E=t===So.Dots,C=t===So.Cross,w=Array.isArray(n)?n:[n,n],T=[w[0]*_[2]||1,w[1]*_[2]||1],k=b*_[2],S=Array.isArray(o)?o:[o,o],z=C?[k,k]:T,R=[S[0]*_[2]||1+z[0]/2,S[1]*_[2]||1+z[1]/2],M=`${g}${e||""}`;return y.jsxs("svg",{className:fn(["react-flow__background",f]),style:{...c,...np,"--xy-background-color-props":u,"--xy-background-pattern-color-props":s},ref:m,"data-testid":"rf__background",children:[y.jsx("pattern",{id:M,x:_[0]%T[0],y:_[1]%T[1],width:T[0],height:T[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${R[0]},-${R[1]})`,children:E?y.jsx(ZG,{radius:k/2,className:h}):y.jsx(QG,{dimensions:z,lineWidth:i,variant:t,className:h})}),y.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${M})`})]})}kA.displayName="Background";K.memo(kA);function tF(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:y.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function nF(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:y.jsx("path",{d:"M0 0h32v4.2H0z"})})}function rF(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:y.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function iF(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:y.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function aF(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:y.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function sh({children:e,className:t,...n}){return y.jsx("button",{type:"button",className:fn(["react-flow__controls-button",t]),...n,children:e})}const oF=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function EA({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:o,onZoomOut:s,onFitView:u,onInteractiveChange:c,className:f,children:h,position:m="bottom-left",orientation:_="vertical","aria-label":g}){const b=Ut(),{isInteractive:E,minZoomReached:C,maxZoomReached:w,ariaLabelConfig:T}=ht(oF,Bt),{zoomIn:k,zoomOut:S,fitView:z}=e0(),R=()=>{k(),o==null||o()},M=()=>{S(),s==null||s()},X=()=>{z(i),u==null||u()},F=()=>{b.setState({nodesDraggable:!E,nodesConnectable:!E,elementsSelectable:!E}),c==null||c(!E)},I=_==="horizontal"?"horizontal":"vertical";return y.jsxs(tp,{className:fn(["react-flow__controls",I,f]),position:m,style:e,"data-testid":"rf__controls","aria-label":g??T["controls.ariaLabel"],children:[t&&y.jsxs(y.Fragment,{children:[y.jsx(sh,{onClick:R,className:"react-flow__controls-zoomin",title:T["controls.zoomIn.ariaLabel"],"aria-label":T["controls.zoomIn.ariaLabel"],disabled:w,children:y.jsx(tF,{})}),y.jsx(sh,{onClick:M,className:"react-flow__controls-zoomout",title:T["controls.zoomOut.ariaLabel"],"aria-label":T["controls.zoomOut.ariaLabel"],disabled:C,children:y.jsx(nF,{})})]}),n&&y.jsx(sh,{className:"react-flow__controls-fitview",onClick:X,title:T["controls.fitView.ariaLabel"],"aria-label":T["controls.fitView.ariaLabel"],children:y.jsx(rF,{})}),r&&y.jsx(sh,{className:"react-flow__controls-interactive",onClick:F,title:T["controls.interactive.ariaLabel"],"aria-label":T["controls.interactive.ariaLabel"],children:E?y.jsx(aF,{}):y.jsx(iF,{})}),h]})}EA.displayName="Controls";K.memo(EA);function sF({id:e,x:t,y:n,width:r,height:i,style:o,color:s,strokeColor:u,strokeWidth:c,className:f,borderRadius:h,shapeRendering:m,selected:_,onClick:g}){const{background:b,backgroundColor:E}=o||{},C=s||b||E;return y.jsx("rect",{className:fn(["react-flow__minimap-node",{selected:_},f]),x:t,y:n,rx:h,ry:h,width:r,height:i,style:{fill:C,stroke:u,strokeWidth:c},shapeRendering:m,onClick:g?w=>g(w,e):void 0})}const lF=K.memo(sF),uF=e=>e.nodes.map(t=>t.id),Vg=e=>e instanceof Function?e:()=>e;function cF({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:o=lF,onClick:s}){const u=ht(uF,Bt),c=Vg(t),f=Vg(e),h=Vg(n),m=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return y.jsx(y.Fragment,{children:u.map(_=>y.jsx(dF,{id:_,nodeColorFunc:c,nodeStrokeColorFunc:f,nodeClassNameFunc:h,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:o,onClick:s,shapeRendering:m},_))})}function fF({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:o,shapeRendering:s,NodeComponent:u,onClick:c}){const{node:f,x:h,y:m,width:_,height:g}=ht(b=>{const E=b.nodeLookup.get(e);if(!E)return{node:void 0,x:0,y:0,width:0,height:0};const C=E.internals.userNode,{x:w,y:T}=E.internals.positionAbsolute,{width:k,height:S}=Sa(C);return{node:C,x:w,y:T,width:k,height:S}},Bt);return!f||f.hidden||!Cj(f)?null:y.jsx(u,{x:h,y:m,width:_,height:g,style:f.style,selected:!!f.selected,className:r(f),color:t(f),borderRadius:i,strokeColor:n(f),strokeWidth:o,shapeRendering:s,onClick:c,id:f.id})}const dF=K.memo(fF);var hF=K.memo(cF);const mF=200,pF=150,_F=e=>!e.hidden,gF=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?kj(bf(e.nodeLookup,{filter:_F}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},yF="react-flow__minimap-desc";function SA({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i="",nodeBorderRadius:o=5,nodeStrokeWidth:s,nodeComponent:u,bgColor:c,maskColor:f,maskStrokeColor:h,maskStrokeWidth:m,position:_="bottom-right",onClick:g,onNodeClick:b,pannable:E=!1,zoomable:C=!1,ariaLabel:w,inversePan:T,zoomStep:k=1,offsetScale:S=5}){const z=Ut(),R=K.useRef(null),{boundingRect:M,viewBB:X,rfId:F,panZoom:I,translateExtent:U,flowWidth:G,flowHeight:q,ariaLabelConfig:$}=ht(gF,Bt),Z=(e==null?void 0:e.width)??mF,A=(e==null?void 0:e.height)??pF,N=M.width/Z,H=M.height/A,Q=Math.max(N,H),D=Q*Z,B=Q*A,ee=S*Q,O=M.x-(D-M.width)/2-ee,ie=M.y-(B-M.height)/2-ee,oe=D+ee*2,me=B+ee*2,we=`${yF}-${F}`,ne=K.useRef(0),de=K.useRef();ne.current=Q,K.useEffect(()=>{if(R.current&&I)return de.current=RB({domNode:R.current,panZoom:I,getTransform:()=>z.getState().transform,getViewScale:()=>ne.current}),()=>{var Ae;(Ae=de.current)==null||Ae.destroy()}},[I]),K.useEffect(()=>{var Ae;(Ae=de.current)==null||Ae.update({translateExtent:U,width:G,height:q,inversePan:T,pannable:E,zoomStep:k,zoomable:C})},[E,C,T,k,U,G,q]);const le=g?Ae=>{var ue;const[Ce,Te]=((ue=de.current)==null?void 0:ue.pointer(Ae))||[0,0];g(Ae,{x:Ce,y:Te})}:void 0,ke=b?K.useCallback((Ae,Ce)=>{const Te=z.getState().nodeLookup.get(Ce).internals.userNode;b(Ae,Te)},[]):void 0,ge=w??$["minimap.ariaLabel"];return y.jsx(tp,{position:_,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-stroke-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-width-props":typeof m=="number"?m*Q:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof s=="number"?s:void 0},className:fn(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:y.jsxs("svg",{width:Z,height:A,viewBox:`${O} ${ie} ${oe} ${me}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":we,ref:R,onClick:le,children:[ge&&y.jsx("title",{id:we,children:ge}),y.jsx(hF,{onClick:ke,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:o,nodeClassName:i,nodeStrokeWidth:s,nodeComponent:u}),y.jsx("path",{className:"react-flow__minimap-mask",d:`M${O-ee},${ie-ee}h${oe+ee*2}v${me+ee*2}h${-oe-ee*2}z
72
+ M${X.x},${X.y}h${X.width}v${X.height}h${-X.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}SA.displayName="MiniMap";K.memo(SA);const vF=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,bF={[nu.Line]:"right",[nu.Handle]:"bottom-right"};function xF({nodeId:e,position:t,variant:n=nu.Handle,className:r,style:i=void 0,children:o,color:s,minWidth:u=10,minHeight:c=10,maxWidth:f=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:m=!1,resizeDirection:_,autoScale:g=!0,shouldResize:b,onResizeStart:E,onResize:C,onResizeEnd:w}){const T=nA(),k=typeof e=="string"?e:T,S=Ut(),z=K.useRef(null),R=n===nu.Handle,M=ht(K.useCallback(vF(R&&g),[R,g]),Bt),X=K.useRef(null),F=t??bF[n];K.useEffect(()=>{if(!(!z.current||!k))return X.current||(X.current=GB({domNode:z.current,nodeId:k,getStoreItems:()=>{const{nodeLookup:U,transform:G,snapGrid:q,snapToGrid:$,nodeOrigin:Z,domNode:A}=S.getState();return{nodeLookup:U,transform:G,snapGrid:q,snapToGrid:$,nodeOrigin:Z,paneDomNode:A}},onChange:(U,G)=>{const{triggerNodeChanges:q,nodeLookup:$,parentLookup:Z,nodeOrigin:A}=S.getState(),N=[],H={x:U.x,y:U.y},Q=$.get(k);if(Q&&Q.expandParent&&Q.parentId){const D=Q.origin??A,B=U.width??Q.measured.width??0,ee=U.height??Q.measured.height??0,O={id:Q.id,parentId:Q.parentId,rect:{width:B,height:ee,...Tj({x:U.x??Q.position.x,y:U.y??Q.position.y},{width:B,height:ee},Q.parentId,$,D)}},ie=J1([O],$,Z,A);N.push(...ie),H.x=U.x?Math.max(D[0]*B,U.x):void 0,H.y=U.y?Math.max(D[1]*ee,U.y):void 0}if(H.x!==void 0&&H.y!==void 0){const D={id:k,type:"position",position:{...H}};N.push(D)}if(U.width!==void 0&&U.height!==void 0){const B={id:k,type:"dimensions",resizing:!0,setAttributes:_?_==="horizontal"?"width":"height":!0,dimensions:{width:U.width,height:U.height}};N.push(B)}for(const D of G){const B={...D,type:"position"};N.push(B)}q(N)},onEnd:({width:U,height:G})=>{const q={id:k,type:"dimensions",resizing:!1,dimensions:{width:U,height:G}};S.getState().triggerNodeChanges([q])}})),X.current.update({controlPosition:F,boundaries:{minWidth:u,minHeight:c,maxWidth:f,maxHeight:h},keepAspectRatio:m,resizeDirection:_,onResizeStart:E,onResize:C,onResizeEnd:w,shouldResize:b}),()=>{var U;(U=X.current)==null||U.destroy()}},[F,u,c,f,h,m,E,C,w,b]);const I=F.split("-");return y.jsx("div",{className:fn(["react-flow__resize-control","nodrag",...I,n,r]),ref:z,style:{...i,scale:M,...s&&{[R?"backgroundColor":"borderColor"]:s}},children:o})}K.memo(xF);const pS="atm_9s_1ulexfb atm_j6_idpfg4 atm_e2_1osqo2v atm_atidsa_idpfg4 atm_4eg7rx_idpfg4 atm_rvfy4g_9kgoat atm_1txa2cb_1m800s6 atm_lpau4n_11p5wf0 atm_1i96kan_i47zc9 atm_a1su7h_15vqwwr atm_189jej2_11p5wf0 atm_1w44ka3_idpfg4 atm_1kff14x_owgaek atm_tlooae_1aqtv8w atm_ssrz9u_1txwivl atm_1wgfypk_1h6ojuz atm_dcyoej_owgaek atm_x5xt6_idpfg4 atm_aygr12_asey3o atm_18jdptc_3szr2b atm_c0qd0z_cpeews atm_181p0vp_idpfg4 atm_r8g1dj_1c8rstr atm_s8rkb1_51xnb6 atm_1vqm6ju_1txwivl atm_fot5ro_1g80g66 atm_1vgdny9_tx1for atm_14r18e5_11p5wf0 atm_xjxbld_1yfb7q0 atm_1jpaak4_idpfg4 atm_md8k10_1q4684i atm_bjlnip_15vqwwr atm_hsush7_idpfg4 atm_g7x97f_1wugsn5 atm_bf70nb_1txwivl atm_12osj6n_1bp4okc atm_hirk9l_11p5wf0 atm_pckn7_1cqe4qf atm_n9chts_ek2tx5 atm_16sq3g0_1504ia9 atm_yx7lle_ouk0ow atm_1lz8c6u_1mvar2t atm_9daukb_angws6 atm_u86kk1_idpfg4 atm_5x8twk_1m800s6 atm_1xgtowf_51xnb6 atm_1orvp3r_1txwivl atm_10p7huq_idpfg4 atm_1abhn29_1g80g66 atm_1gwmv5s_owgaek atm_of0n4u_116y0ak atm_v7jpvs_1h6ojuz atm_xv7pkn_1aqtv8w atm_14pmtmt_mrub5a atm_3klg97_o0ucy6 atm_15lyp6i_1m800s6 atm_1022d67_19dj2kj atm_1j3snl2_116y0ak atm_1nqe09o_1h6ojuz atm_z342np_idpfg4 atm_qvafqh_1aqtv8w atm_1484bor_owgaek atm_qb072e_idpfg4 atm_1eysede_mrub5a atm_ausfqq_9wwvsf atm_1r1jyla_tlke0l atm_zyntao_1e5hqsa atm_16a2jd3_idpfg4 atm_yz3yit_15vqwwr atm_1ukevse_1l2sidv atm_8zn77s_1q9ccgz atm_cai87b_11p5wf0 atm_f27bjb_orlc2p atm_136rarb_v2br90 atm_uvnszw_ynj908 atm_v6j8gj_1txwivl atm_18oef3g_idpfg4 atm_2hb01h_1bp4okc atm_t1au3c_tx1for atm_1ufdyae_ouk0ow atm_1o4x713_1mvar2t atm_rjdigx_angws6 atm_c6uzni_1txwivl atm_1nzbpgp_idpfg4 atm_yprub4_qp9j9c atm_embba4_1h6ojuz atm_1d7gr30_tx1for atm_9zrb37_ab5uq2 atm_9i0yuu_tx1for atm_y8i5od_tlke0l atm_p1bz6o_1e5hqsa atm_1n1xk7w_4apokj atm_zzuk95_idpfg4 atm_br45tf_15vqwwr atm_987rxu_1m800s6 atm_rylxle_1mvar2t atm_159bz1a_1l2sidv atm_14e0i1d_1q9ccgz atm_1hc0mca_ab5uq2 atm_7lwqbu_ek2tx5 atm_1hvze7g_1m800s6 atm_pec5rm_11p5wf0 atm_104fxea_1osqo2v atm_o2d76m_idpfg4 atm_9vegfj_i47zc9 atm_bv60p9_15vqwwr atm_onb89c_1txwivl atm_7g5rf5_h9n0ih atm_d4xe4r_1yb4nlp atm_1de0vdb_ynj908 atm_1dqnoph_idpfg4 atm_11vcluw_asey3o atm_j40db6_3szr2b atm_oixpp0_177qeyn atm_1itz4yx_1m800s6 atm_1d5m0t6_1ulexfb atm_18adqwc_1osqo2v atm_9hag3b_idpfg4 atm_jpelxq_1osqo2v atm_1razlbh_1pr0uq2 atm_1584brk_1osqo2v atm_tlheiy_1osqo2v atm_1y7yntj_1qgj8bu atm_hhfjqc_5szmup atm_1nczk8a_11p5wf0 atm_19ymffe_idpfg4 atm_6prmug_1rgb3qj atm_t0tzqu_1r1dq30 atm_mtpr34_h2mmj6 atm_uqysk4_15vqwwr atm_14uvl6p_1c8rstr atm_ex2fhn_1mvar2t atm_15z9d0t_3szr2b atm_eiiqem_1l2sidv atm_1jb5gi6_1q9ccgz atm_166ez42_1mqbmot atm_q2ll7u_1o6fbio atm_57o9w3_19dj2kj atm_1n03s3l_l10qc1 atm_o8a2hy_1gnru8i atm_h4dd3_angws6 atm_1oed8rv_1lxgiqu atm_xfs7pm_codn69 atm_iq4b4a_mrub5a atm_kfb3l8_tvxayk atm_1den0wi_aw1g3r atm_x39p15_x1pkw6 atm_1pzlpa9_xbw5ta atm_1ngwb7m_ab5uq2 atm_1tey17b_1vz6rot atm_co9zra_yzuxxm atm_28uhfm_1ulexfb atm_1s6f59s_1osqo2v atm_e5lhhf_13tcsv8 atm_tiuwby_iqvn5y atm_19kwmfh_1i9d2r atm_18qlx95_1b2jb5k atm_1jtbep4_b3btdj atm_1sips26_1b2jb5k atm_bgs52_vda1xk atm_1t1kc8b_1423x9t atm_1c57bdn_dilh6o atm_wunmpl_ob1ic4 atm_fjgjo1_1r1dq30 atm_wkpf89_1r1dq30 atm_1jcp6s2_glywfm atm_1yfmk53_11wpgbn atm_9kn9qw_892tqg atm_kknx3v_glywfm atm_s2s177_cs5v99 atm_3mu4ui_892tqg atm_3ktq96_id0eeu atm_8vrog6_tlke0l atm_1spofsc_ab5uq2 atm_18pzd5y_1ohcsmr atm_ysm0po_1ohcsmr atm_jxnbsr_11wpgbn atm_mo6z1j_892tqg atm_1ozjmqn_1c8rstr atm_1mbilef_1mvar2t atm_194m4vo_nkobfv atm_1ubcgm0_glywfm atm_1s04ikz_1o6fbio atm_yvnlfo_19dj2kj atm_1o60awi_nkobfv atm_18dhlq3_glywfm atm_1iv6oaa_angws6 atm_1gdv06_i47zc9",_S="atm_7l_an4usv atm_1toxs1s_1mqbmot atm_1s9nf6a_1r1dq30 atm_1urxgbb_xbw5ta atm_939xgn_xbw5ta atm_4accit_yzuxxm atm_208uz1_an4usv atm_ilkchh_yzuxxm atm_fft1x_an4usv atm_10imi40_8o97w atm_10q3j4c_1r1dq30 atm_1b5nczx_1b2jb5k atm_qexjw8_1c05cp1 atm_wpfom1_1r1dq30 atm_14uc0hi_1mqbmot atm_xly5l8_1j28jx2 atm_1rkntu1_1b2jb5k atm_f0x601_1bupu91 atm_19qo66i_892tqg atm_4atig2_1mqbmot atm_fg7w3y_id0eeu atm_ve2nqd_13tcsv8 atm_11f95zr_1b2jb5k atm_12sd03g_vda1xk atm_1yu2aie_1423x9t atm_h532vi_dilh6o atm_1ui4rfv_ob1ic4 atm_ppsh0k_1mqbmot atm_1ej45wu_idpfg4 atm_1dkyeer_1b2jb5k atm_gqsv7d_1mqbmot atm_14qt83g_yzuxxm atm_y8q6qs_1b2jb5k atm_1qlq6q9_1b2jb5k atm_1cc7109_1r1dq30 atm_1igqysf_1r1dq30 atm_nx8qx8_1mqbmot atm_1woqpdo_1b2jb5k atm_1ywj47d_ouk0ow atm_n96wga_19dj2kj atm_1xpoqll_cs5v99 atm_zh4wzn_1c05cp1 atm_1v6b36k_1b2jb5k atm_13rjd3j_1r1dq30 atm_h8i0yz_1r1dq30 atm_1b105vw_1u3842e atm_1v2qvku_1b2jb5k";function wF({concepts:e,selectedId:t,onSelectConcept:n,onOpenConcept:r}){var f,h;const i=new Map(e.map(m=>[m.id,m])),o=t?i.get(t):e[0],s=(o==null?void 0:o.schemeId)??((f=e[0])==null?void 0:f.schemeId)??"",u=(o==null?void 0:o.schemeLabel)??((h=e[0])==null?void 0:h.schemeLabel)??"Thesaurus",c=e.filter(m=>m.schemeId===s);return o?y.jsx(Qy,{viewId:"thesaurus",children:y.jsx(Ao,{children:y.jsx(Zy,{rootLabel:"Thesaurus",breadcrumbLabel:"Thesaurus breadcrumbs",tone:"canvas",showDivider:!1,children:y.jsx("div",{className:W("ux-thesaurus",pS,_S),children:y.jsx(kF,{concepts:c,schemeLabel:u,selectedId:o.id,onSelect:n,onOpenConcept:r})})})})}):y.jsx(Qy,{viewId:"thesaurus",children:y.jsx(Ao,{children:y.jsx(Zy,{rootLabel:"Thesaurus",breadcrumbLabel:"Thesaurus breadcrumbs",tone:"canvas",showDivider:!1,children:y.jsx("div",{className:W("ux-thesaurus",pS,_S),children:y.jsx("div",{className:"ux-thesaurus-empty",children:"No SKOS concepts were exported for this model."})})})})})}function kF({concepts:e,schemeLabel:t,selectedId:n,onSelect:r,onOpenConcept:i}){const o=K.useMemo(()=>RF(e,t,n),[e,t,n]),s=K.useMemo(()=>o.nodes.map(m=>m.id).join("|"),[o.nodes]),[u,c]=K.useState(null),f=K.useRef(null),h=K.useRef(null);return K.useEffect(()=>{!u||f.current===s||(f.current=s,window.requestAnimationFrame(()=>{u.fitView({padding:.02,duration:0})}))},[u,s]),K.useEffect(()=>{var w,T;if(!u||h.current===n)return;const m=u.getNode(n)??o.nodes.find(k=>k.id===n);if(!m)return;h.current=n;const _=u.getViewport(),g=((w=m.measured)==null?void 0:w.width)??m.width??CF,b=((T=m.measured)==null?void 0:T.height)??m.height??TF,E=m.position.x+g/2,C=m.position.y+b/2;window.requestAnimationFrame(()=>{u.setCenter(E,C,{zoom:_.zoom,duration:jF})})},[u,o.nodes,n]),y.jsx("main",{className:"ux-thesaurus-scheme-map","aria-label":"Concept scheme map",children:y.jsx("div",{className:"ux-thesaurus-scheme-map-canvas",role:"img","aria-label":`${t} concept map`,children:y.jsx(KG,{nodes:o.nodes,edges:o.edges,nodeTypes:EF,edgeTypes:SF,nodesDraggable:!0,nodesConnectable:!1,elementsSelectable:!0,proOptions:{hideAttribution:!0},onInit:c,onNodeClick:(m,_)=>{const g=vS(_);if(g){i==null||i(g);return}_.type==="concept"&&r(String(_.id))},onNodeDoubleClick:(m,_)=>{const g=vS(_);g&&(i==null||i(g))}})})})}const Bh="__scheme__",EF={scheme:yS,concept:yS},SF={mindmap:AF},dm=240,Ev=112,gS=56,CF=180,TF=44,jF=260;function yS({data:e,type:t}){return y.jsxs("div",{className:W("ux-thesaurus-flow-node",t==="scheme"?"is-scheme":"is-concept",e.selected&&"is-selected"),children:[y.jsx(ko,{type:"target",position:Pe.Left}),y.jsx(ko,{type:"target",position:Pe.Right}),y.jsx("div",{className:"ux-thesaurus-flow-node__label",children:e.label}),e.meta?y.jsx("div",{className:"ux-thesaurus-flow-node__meta",children:e.meta}):null,y.jsx(ko,{type:"source",position:Pe.Left}),y.jsx(ko,{type:"source",position:Pe.Right})]})}function AF({id:e,sourceX:t,sourceY:n,targetX:r,targetY:i}){const o=r>=t?1:-1,s=Math.max(Math.abs(r-t)*.52,dm*.25),u=[`M ${t} ${n}`,`C ${t+s*o} ${n}`,`${r-s*o} ${i}`,`${r} ${i}`].join(" ");return y.jsx(kf,{id:e,path:u})}function RF(e,t,n){var _;const r=new Set(e.map(g=>g.id)),i=new Map(e.map(g=>[g.id,g])),o=e.filter(g=>!g.parentId||!r.has(g.parentId)).map(g=>g.id),s=new Map(o.map((g,b)=>[g,`branch-${b%5}`])),u=new Map(o.map((g,b)=>[g,b%2===0?1:-1])),c=((_=e.find(g=>g.schemeSourceElementId))==null?void 0:_.schemeSourceElementId)??null,f=NF(e,o,r,u),h=[{id:Bh,type:"scheme",position:{x:0,y:0},data:{label:t,meta:"Concept scheme",selected:!1,sourceElementId:c},sourcePosition:Pe.Right,targetPosition:Pe.Left}],m=[];for(const g of e){const b=!g.parentId||!r.has(g.parentId),E=LF(g,i,r),C=s.get(E)??"branch-0",w=f.get(g.id)??{x:dm,y:0},T=w.x>=0?1:-1;h.push({id:g.id,type:"concept",className:C,position:w,data:{label:g.label,meta:"",selected:g.id===n,sourceElementId:g.sourceElementId??null},sourcePosition:T>0?Pe.Right:Pe.Left,targetPosition:T>0?Pe.Left:Pe.Right}),m.push({id:`${b?Bh:g.parentId}-${g.id}`,source:b?Bh:g.parentId,target:g.id,type:"mindmap",className:`taxonomy ${C}`})}return{nodes:h,edges:m}}function NF(e,t,n,r){const i=new Map,o=new Map(e.map(c=>[c.id,c]));for(const c of e){const f=c.parentId&&n.has(c.parentId)?c.parentId:Bh,h=i.get(f)??[];h.push(c),i.set(f,h)}for(const c of i.values())c.sort((f,h)=>f.label.localeCompare(h.label));const s=new Map,u=(c,f)=>{const h=c.reduce((g,b)=>g+TA(b,i),0),m=f>0?-gS:gS;let _=-((Math.max(h,1)-1)*Ev)/2+m;for(const g of c){const b=o.get(g);b&&(_=CA(b,f,1,_,i,s))}};return u(t.filter(c=>r.get(c)===-1),-1),u(t.filter(c=>r.get(c)!==-1),1),s}function CA(e,t,n,r,i,o){const s=i.get(e.id)??[];if(s.length===0)return o.set(e.id,{x:t*n*dm,y:r}),r+Ev;const u=r;let c=r;for(const h of s)c=CA(h,t,n+1,c,i,o);const f=c-Ev;return o.set(e.id,{x:t*n*dm,y:(u+f)/2}),c}function TA(e,t){const n=t.get(e)??[];return n.length===0?1:n.reduce((r,i)=>r+TA(i.id,t),0)}function LF(e,t,n){let r=e;const i=new Set([e.id]);for(;r.parentId&&n.has(r.parentId)&&!i.has(r.parentId);)i.add(r.parentId),r=t.get(r.parentId)??r;return r.id}function vS(e){var n;const t=(n=e.data)==null?void 0:n.sourceElementId;return typeof t=="string"&&t.length>0?t:null}const bS="2026-06-23.project-store.v2",zF=["project","folders","files","resources","elements","relations","reused_contract_context","concept_refs","submodels","traces","coverage","ontology","knowledge_graph","search","summaries","routes"],MF=["folders","files","resources","elements","relations","reused_contract_context","concept_refs","search"];function DF(){if(typeof window<"u"&&window.reqvireProjectStore!==void 0)return window.reqvireProjectStore}function OF(e){const t=[];if(typeof e!="object"||e===null)return["seed is not an object"];const n=e;for(const r of zF)r in n||t.push(`missing required section "${r}"`);for(const r of MF)r in n&&!Array.isArray(n[r])&&t.push(`section "${r}" must be an array`);if("project"in n){const r=n.project;(typeof r!="object"||r===null)&&t.push('section "project" must be an object')}return t}function qF(e){let t=DF();if(t===void 0)return{ok:!1,reason:"No Reqvire Project Store seed found.",detail:"Expected window.reqvireProjectStore from assets/project-store.js. Open this Explorer from reqvire serve, a reqvire export output directory, or npm run dev."};const n=OF(t);if(n.length>0)return{ok:!1,reason:"Reqvire Project Store seed is malformed.",detail:n.join("; ")};const r=t,i=r.schema_version===bS?null:`seed schema "${r.schema_version??"unknown"}" != expected "${bS}"`;return{ok:!0,store:r,schemaMismatch:i}}const jA=K.createContext(null);function IF({store:e,schemaMismatch:t,children:n}){const r=K.useMemo(()=>{const i=new Map;for(const o of e.elements)i.set(o.id,o);return{store:e,schemaMismatch:t,elementById:o=>i.get(o)}},[e,t]);return y.jsx(jA.Provider,{value:r,children:n})}function $n(){const e=K.useContext(jA);if(!e)throw new Error("useStore must be used within a StoreProvider");return e}function PF(e){return y.jsx(OO,{...e})}function $F(e){return y.jsx(vO,{...e})}const Pc="model",BF=[{id:"thesaurus",label:"Thesaurus"},{id:"model",label:"Model"}],UF=[{id:"ontologies",label:"Ontologies"},{id:"traces",label:"Traces"},{id:"coverage",label:"Coverage"}],GF=["resources","files","search","content"],FF=new Set([...BF.map(e=>e.id),...UF.map(e=>e.id),...GF]),AA={model:"Model",thesaurus:"Thesaurus",traces:"Traces",ontologies:"Ontologies",coverage:"Coverage",resources:"Resources",files:"Model",search:"Search",content:"Content"};function HF(e){return FF.has(e)}function Uh(e){return`#/${e}`}function Ef(e){return`#/elements/${e}`}function nf(e){return`#/content/${e}`}function VF(e){const t=e.trim();return t?`#/search/${encodeURIComponent(t)}`:"#/search"}function XF(e,t){let n=e.startsWith("#")?e.slice(1):e;if(n.startsWith("/")&&(n=n.slice(1)),n==="")return{view:Pc,param:null,elementId:null};if(n.startsWith("elements/")){const i=n.slice(9);return{view:t,param:null,elementId:i.length>0?i:null}}if(n.startsWith("files/"))return{view:"files",param:n.slice(6),elementId:null};if(n.startsWith("content/"))return{view:"content",param:n.slice(8),elementId:null};if(n.startsWith("resources/"))return{view:"resources",param:n.slice(10),elementId:null};if(n==="search"||n.startsWith("search/")||n.startsWith("search?")){const i=n.startsWith("search/")||n.startsWith("search?")?n.slice(7):"";let o=i;try{o=decodeURIComponent(i)}catch{o=i}return{view:"search",param:o||null,elementId:null}}const r=n.split("/")[0];return r==="knowledge-graph"?{view:Pc,param:null,elementId:null}:HF(r)?{view:r,param:null,elementId:null}:{view:Pc,param:null,elementId:null}}const YF="modulepreload",WF=function(e,t){return new URL(e,t).href},xS={},J=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let s=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(_=>({status:"fulfilled",value:_}),_=>({status:"rejected",reason:_}))))};const u=document.getElementsByTagName("link"),c=document.querySelector("meta[property=csp-nonce]"),f=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=s(n.map(h=>{if(h=WF(h,r),h in xS)return;xS[h]=!0;const m=h.endsWith(".css"),_=m?'[rel="stylesheet"]':"";if(!!r)for(let E=u.length-1;E>=0;E--){const C=u[E];if(C.href===h&&(!m||C.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${h}"]${_}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":YF,m||(b.as="script"),b.crossOrigin="",b.href=h,f&&b.setAttribute("nonce",f),document.head.appendChild(b),m)return new Promise((E,C)=>{b.addEventListener("load",E),b.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(s){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=s,window.dispatchEvent(u),!u.defaultPrevented)throw s}return i.then(s=>{for(const u of s||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})};class wS extends Map{constructor(t,n=ZF){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(kS(this,t))}has(t){return super.has(kS(this,t))}set(t,n){return super.set(KF(this,t),n)}delete(t){return super.delete(QF(this,t))}}function kS({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function KF({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function QF({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function ZF(e){return e!==null&&typeof e=="object"?e.valueOf():e}const Sv=Math.PI,Cv=2*Sv,ps=1e-6,JF=Cv-ps;function RA(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function eH(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return RA;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class tH{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?RA:eH(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,s){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+s}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,u=this._y1,c=r-t,f=i-n,h=s-t,m=u-n,_=h*h+m*m;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(_>ps)if(!(Math.abs(m*c-f*h)>ps)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let g=r-s,b=i-u,E=c*c+f*f,C=g*g+b*b,w=Math.sqrt(E),T=Math.sqrt(_),k=o*Math.tan((Sv-Math.acos((E+_-C)/(2*w*T)))/2),S=k/T,z=k/w;Math.abs(S-1)>ps&&this._append`L${t+S*h},${n+S*m}`,this._append`A${o},${o},0,0,${+(m*g>h*b)},${this._x1=t+z*c},${this._y1=n+z*f}`}}arc(t,n,r,i,o,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let u=r*Math.cos(i),c=r*Math.sin(i),f=t+u,h=n+c,m=1^s,_=s?i-o:o-i;this._x1===null?this._append`M${f},${h}`:(Math.abs(this._x1-f)>ps||Math.abs(this._y1-h)>ps)&&this._append`L${f},${h}`,r&&(_<0&&(_=_%Cv+Cv),_>JF?this._append`A${r},${r},0,1,${m},${t-u},${n-c}A${r},${r},0,1,${m},${this._x1=f},${this._y1=h}`:_>ps&&this._append`A${r},${r},0,${+(_>=Sv)},${m},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function nH(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 rH(){return this.eachAfter(nH)}function iH(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function aH(e,t){for(var n=this,r=[n],i,o,s=-1;n=r.pop();)if(e.call(t,n,++s,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function oH(e,t){for(var n=this,r=[n],i=[],o,s,u,c=-1;n=r.pop();)if(i.push(n),o=n.children)for(s=0,u=o.length;s<u;++s)r.push(o[s]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function sH(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function lH(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 uH(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function cH(e){for(var t=this,n=fH(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 fH(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 dH(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function hH(){return Array.from(this)}function mH(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function pH(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*_H(){var e=this,t,n=[e],r,i,o;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function n0(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=vH)):t===void 0&&(t=yH);for(var n=new rf(e),r,i=[n],o,s,u,c;r=i.pop();)if((s=t(r.data))&&(c=(s=Array.from(s)).length))for(r.children=s,u=c-1;u>=0;--u)i.push(o=s[u]=new rf(s[u])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(xH)}function gH(){return n0(this).eachBefore(bH)}function yH(e){return e.children}function vH(e){return Array.isArray(e)?e[1]:null}function bH(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function xH(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function rf(e){this.data=e,this.depth=this.height=0,this.parent=null}rf.prototype=n0.prototype={constructor:rf,count:rH,each:iH,eachAfter:oH,eachBefore:aH,find:sH,sum:lH,sort:uH,path:cH,ancestors:dH,descendants:hH,leaves:mH,links:pH,copy:gH,[Symbol.iterator]:_H};function wH(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 kH(e,t,n,r,i){for(var o=e.children,s,u=-1,c=o.length,f=e.value&&(r-t)/e.value;++u<c;)s=o[u],s.y0=n,s.y1=i,s.x0=t,s.x1=t+=s.value*f}function EH(){var e=1,t=1,n=0,r=!1;function i(s){var u=s.height+1;return s.x0=s.y0=n,s.x1=e,s.y1=t/u,s.eachBefore(o(t,u)),r&&s.eachBefore(wH),s}function o(s,u){return function(c){c.children&&kH(c,c.x0,s*(c.depth+1)/u,c.x1,s*(c.depth+2)/u);var f=c.x0,h=c.y0,m=c.x1-n,_=c.y1-n;m<f&&(f=m=(f+m)/2),_<h&&(h=_=(h+_)/2),c.x0=f,c.y0=h,c.x1=m,c.y1=_}}return i.round=function(s){return arguments.length?(r=!!s,i):r},i.size=function(s){return arguments.length?(e=+s[0],t=+s[1],i):[e,t]},i.padding=function(s){return arguments.length?(n=+s,i):n},i}function SH(e,t){return e.parent===t.parent?1:2}function Xg(e){var t=e.children;return t?t[0]:e.t}function Yg(e){var t=e.children;return t?t[t.length-1]:e.t}function CH(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function TH(e){for(var t=0,n=0,r=e.children,i=r.length,o;--i>=0;)o=r[i],o.z+=t,o.m+=t,t+=o.s+(n+=o.c)}function jH(e,t,n){return e.a.parent===t.parent?e.a:n}function Gh(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}Gh.prototype=Object.create(rf.prototype);function AH(e){for(var t=new Gh(e,0),n,r=[t],i,o,s,u;n=r.pop();)if(o=n._.children)for(n.children=new Array(u=o.length),s=u-1;s>=0;--s)r.push(i=n.children[s]=new Gh(o[s],s)),i.parent=n;return(t.parent=new Gh(null,0)).children=[t],t}function RH(){var e=SH,t=1,n=1,r=null;function i(f){var h=AH(f);if(h.eachAfter(o),h.parent.m=-h.z,h.eachBefore(s),r)f.eachBefore(c);else{var m=f,_=f,g=f;f.eachBefore(function(T){T.x<m.x&&(m=T),T.x>_.x&&(_=T),T.depth>g.depth&&(g=T)});var b=m===_?1:e(m,_)/2,E=b-m.x,C=t/(_.x+b+E),w=n/(g.depth||1);f.eachBefore(function(T){T.x=(T.x+E)*C,T.y=T.depth*w})}return f}function o(f){var h=f.children,m=f.parent.children,_=f.i?m[f.i-1]:null;if(h){TH(f);var g=(h[0].z+h[h.length-1].z)/2;_?(f.z=_.z+e(f._,_._),f.m=f.z-g):f.z=g}else _&&(f.z=_.z+e(f._,_._));f.parent.A=u(f,_,f.parent.A||m[0])}function s(f){f._.x=f.z+f.parent.m,f.m+=f.parent.m}function u(f,h,m){if(h){for(var _=f,g=f,b=h,E=_.parent.children[0],C=_.m,w=g.m,T=b.m,k=E.m,S;b=Yg(b),_=Xg(_),b&&_;)E=Xg(E),g=Yg(g),g.a=f,S=b.z+T-_.z-C+e(b._,_._),S>0&&(CH(jH(b,f,m),f,S),C+=S,w+=S),T+=b.m,C+=_.m,k+=E.m,w+=g.m;b&&!Yg(g)&&(g.t=b,g.m+=T-w),_&&!Xg(E)&&(E.t=_,E.m+=C-k,m=f)}return m}function c(f){f.x*=t,f.y=f.depth*n}return i.separation=function(f){return arguments.length?(e=f,i):e},i.size=function(f){return arguments.length?(r=!1,t=+f[0],n=+f[1],i):r?null:[t,n]},i.nodeSize=function(f){return arguments.length?(r=!0,t=+f[0],n=+f[1],i):r?[t,n]:null},i}function NH(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const ES=Symbol("implicit");function NA(){var e=new wS,t=[],n=[],r=ES;function i(o){let s=e.get(o);if(s===void 0){if(r!==ES)return r;e.set(o,s=t.push(o)-1)}return n[s%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new wS;for(const s of o)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return NA(t,n).unknown(r)},NH.apply(i,arguments),i}function LH(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}const zH=LH("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Li(e){return function(){return e}}const SS=Math.abs,Mn=Math.atan2,us=Math.cos,MH=Math.max,Wg=Math.min,ji=Math.sin,Ul=Math.sqrt,er=1e-12,af=Math.PI,hm=af/2,DH=2*af;function OH(e){return e>1?0:e<-1?af:Math.acos(e)}function CS(e){return e>=1?hm:e<=-1?-hm:Math.asin(e)}function LA(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new tH(t)}function qH(e){return e.innerRadius}function IH(e){return e.outerRadius}function PH(e){return e.startAngle}function $H(e){return e.endAngle}function BH(e){return e&&e.padAngle}function UH(e,t,n,r,i,o,s,u){var c=n-e,f=r-t,h=s-i,m=u-o,_=m*c-h*f;if(!(_*_<er))return _=(h*(t-o)-m*(e-i))/_,[e+_*c,t+_*f]}function lh(e,t,n,r,i,o,s){var u=e-n,c=t-r,f=(s?o:-o)/Ul(u*u+c*c),h=f*c,m=-f*u,_=e+h,g=t+m,b=n+h,E=r+m,C=(_+b)/2,w=(g+E)/2,T=b-_,k=E-g,S=T*T+k*k,z=i-o,R=_*E-b*g,M=(k<0?-1:1)*Ul(MH(0,z*z*S-R*R)),X=(R*k-T*M)/S,F=(-R*T-k*M)/S,I=(R*k+T*M)/S,U=(-R*T+k*M)/S,G=X-C,q=F-w,$=I-C,Z=U-w;return G*G+q*q>$*$+Z*Z&&(X=I,F=U),{cx:X,cy:F,x01:-h,y01:-m,x11:X*(i/z-1),y11:F*(i/z-1)}}function GH(){var e=qH,t=IH,n=Li(0),r=null,i=PH,o=$H,s=BH,u=null,c=LA(f);function f(){var h,m,_=+e.apply(this,arguments),g=+t.apply(this,arguments),b=i.apply(this,arguments)-hm,E=o.apply(this,arguments)-hm,C=SS(E-b),w=E>b;if(u||(u=h=c()),g<_&&(m=g,g=_,_=m),!(g>er))u.moveTo(0,0);else if(C>DH-er)u.moveTo(g*us(b),g*ji(b)),u.arc(0,0,g,b,E,!w),_>er&&(u.moveTo(_*us(E),_*ji(E)),u.arc(0,0,_,E,b,w));else{var T=b,k=E,S=b,z=E,R=C,M=C,X=s.apply(this,arguments)/2,F=X>er&&(r?+r.apply(this,arguments):Ul(_*_+g*g)),I=Wg(SS(g-_)/2,+n.apply(this,arguments)),U=I,G=I,q,$;if(F>er){var Z=CS(F/_*ji(X)),A=CS(F/g*ji(X));(R-=Z*2)>er?(Z*=w?1:-1,S+=Z,z-=Z):(R=0,S=z=(b+E)/2),(M-=A*2)>er?(A*=w?1:-1,T+=A,k-=A):(M=0,T=k=(b+E)/2)}var N=g*us(T),H=g*ji(T),Q=_*us(z),D=_*ji(z);if(I>er){var B=g*us(k),ee=g*ji(k),O=_*us(S),ie=_*ji(S),oe;if(C<af)if(oe=UH(N,H,O,ie,B,ee,Q,D)){var me=N-oe[0],we=H-oe[1],ne=B-oe[0],de=ee-oe[1],le=1/ji(OH((me*ne+we*de)/(Ul(me*me+we*we)*Ul(ne*ne+de*de)))/2),ke=Ul(oe[0]*oe[0]+oe[1]*oe[1]);U=Wg(I,(_-ke)/(le-1)),G=Wg(I,(g-ke)/(le+1))}else U=G=0}M>er?G>er?(q=lh(O,ie,N,H,g,G,w),$=lh(B,ee,Q,D,g,G,w),u.moveTo(q.cx+q.x01,q.cy+q.y01),G<I?u.arc(q.cx,q.cy,G,Mn(q.y01,q.x01),Mn($.y01,$.x01),!w):(u.arc(q.cx,q.cy,G,Mn(q.y01,q.x01),Mn(q.y11,q.x11),!w),u.arc(0,0,g,Mn(q.cy+q.y11,q.cx+q.x11),Mn($.cy+$.y11,$.cx+$.x11),!w),u.arc($.cx,$.cy,G,Mn($.y11,$.x11),Mn($.y01,$.x01),!w))):(u.moveTo(N,H),u.arc(0,0,g,T,k,!w)):u.moveTo(N,H),!(_>er)||!(R>er)?u.lineTo(Q,D):U>er?(q=lh(Q,D,B,ee,_,-U,w),$=lh(N,H,O,ie,_,-U,w),u.lineTo(q.cx+q.x01,q.cy+q.y01),U<I?u.arc(q.cx,q.cy,U,Mn(q.y01,q.x01),Mn($.y01,$.x01),!w):(u.arc(q.cx,q.cy,U,Mn(q.y01,q.x01),Mn(q.y11,q.x11),!w),u.arc(0,0,_,Mn(q.cy+q.y11,q.cx+q.x11),Mn($.cy+$.y11,$.cx+$.x11),w),u.arc($.cx,$.cy,U,Mn($.y11,$.x11),Mn($.y01,$.x01),!w))):u.arc(0,0,_,z,S,w)}if(u.closePath(),h)return u=null,h+""||null}return f.centroid=function(){var h=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,m=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-af/2;return[us(m)*h,ji(m)*h]},f.innerRadius=function(h){return arguments.length?(e=typeof h=="function"?h:Li(+h),f):e},f.outerRadius=function(h){return arguments.length?(t=typeof h=="function"?h:Li(+h),f):t},f.cornerRadius=function(h){return arguments.length?(n=typeof h=="function"?h:Li(+h),f):n},f.padRadius=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:Li(+h),f):r},f.startAngle=function(h){return arguments.length?(i=typeof h=="function"?h:Li(+h),f):i},f.endAngle=function(h){return arguments.length?(o=typeof h=="function"?h:Li(+h),f):o},f.padAngle=function(h){return arguments.length?(s=typeof h=="function"?h:Li(+h),f):s},f.context=function(h){return arguments.length?(u=h??null,f):u},f}var FH=Array.prototype.slice;function $ue(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function HH(e){return e[0]}function VH(e){return e[1]}class zA{constructor(t,n){this._context=t,this._x=n}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(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function XH(e){return new zA(e,!0)}function Bue(e){return new zA(e,!1)}function YH(e){return e.source}function WH(e){return e.target}function KH(e){let t=YH,n=WH,r=HH,i=VH,o=null,s=null,u=LA(c);function c(){let f;const h=FH.call(arguments),m=t.apply(this,h),_=n.apply(this,h);if(o==null&&(s=e(f=u())),s.lineStart(),h[0]=m,s.point(+r.apply(this,h),+i.apply(this,h)),h[0]=_,s.point(+r.apply(this,h),+i.apply(this,h)),s.lineEnd(),f)return s=null,f+""||null}return c.source=function(f){return arguments.length?(t=f,c):t},c.target=function(f){return arguments.length?(n=f,c):n},c.x=function(f){return arguments.length?(r=typeof f=="function"?f:Li(+f),c):r},c.y=function(f){return arguments.length?(i=typeof f=="function"?f:Li(+f),c):i},c.context=function(f){return arguments.length?(f==null?o=s=null:s=e(o=f),c):o},c}function QH(){return KH(XH)}function MA(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ZH=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,JH=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eV={};function TS(e,t){return(eV.jsx?JH:ZH).test(e)}const tV=/[ \t\n\f\r]/g;function rp(e){return typeof e=="object"?e.type==="text"?jS(e.value):!1:jS(e)}function jS(e){return e.replace(tV,"")===""}class Sf{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Sf.prototype.normal={};Sf.prototype.property={};Sf.prototype.space=void 0;function DA(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Sf(n,r,t)}function Tv(e){return e.toLowerCase()}class ir{constructor(t,n){this.attribute=n,this.property=t}}ir.prototype.attribute="";ir.prototype.booleanish=!1;ir.prototype.boolean=!1;ir.prototype.commaOrSpaceSeparated=!1;ir.prototype.commaSeparated=!1;ir.prototype.defined=!1;ir.prototype.mustUseProperty=!1;ir.prototype.number=!1;ir.prototype.overloadedBoolean=!1;ir.prototype.property="";ir.prototype.spaceSeparated=!1;ir.prototype.space=void 0;let nV=0;const Qe=qs(),cn=qs(),jv=qs(),Ne=qs(),Lt=qs(),Ss=qs(),pr=qs();function qs(){return 2**++nV}const Av=Object.freeze(Object.defineProperty({__proto__:null,boolean:Qe,booleanish:cn,commaOrSpaceSeparated:pr,commaSeparated:Ss,number:Ne,overloadedBoolean:jv,spaceSeparated:Lt},Symbol.toStringTag,{value:"Module"})),Kg=Object.keys(Av);class r0 extends ir{constructor(t,n,r,i){let o=-1;if(super(t,n),AS(this,"space",i),typeof r=="number")for(;++o<Kg.length;){const s=Kg[o];AS(this,Kg[o],(r&Av[s])===Av[s])}}}r0.prototype.defined=!0;function AS(e,t,n){n&&(e[t]=n)}function hu(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new r0(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Tv(r)]=r,n[Tv(o.attribute)]=r}return new Sf(t,n,e.space)}const OA=hu({properties:{ariaActiveDescendant:null,ariaAtomic:cn,ariaAutoComplete:null,ariaBusy:cn,ariaChecked:cn,ariaColCount:Ne,ariaColIndex:Ne,ariaColSpan:Ne,ariaControls:Lt,ariaCurrent:null,ariaDescribedBy:Lt,ariaDetails:null,ariaDisabled:cn,ariaDropEffect:Lt,ariaErrorMessage:null,ariaExpanded:cn,ariaFlowTo:Lt,ariaGrabbed:cn,ariaHasPopup:null,ariaHidden:cn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Lt,ariaLevel:Ne,ariaLive:null,ariaModal:cn,ariaMultiLine:cn,ariaMultiSelectable:cn,ariaOrientation:null,ariaOwns:Lt,ariaPlaceholder:null,ariaPosInSet:Ne,ariaPressed:cn,ariaReadOnly:cn,ariaRelevant:null,ariaRequired:cn,ariaRoleDescription:Lt,ariaRowCount:Ne,ariaRowIndex:Ne,ariaRowSpan:Ne,ariaSelected:cn,ariaSetSize:Ne,ariaSort:null,ariaValueMax:Ne,ariaValueMin:Ne,ariaValueNow:Ne,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function qA(e,t){return t in e?e[t]:t}function IA(e,t){return qA(e,t.toLowerCase())}const rV=hu({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ss,acceptCharset:Lt,accessKey:Lt,action:null,allow:null,allowFullScreen:Qe,allowPaymentRequest:Qe,allowUserMedia:Qe,alpha:Qe,alt:null,as:null,async:Qe,autoCapitalize:null,autoComplete:Lt,autoFocus:Qe,autoPlay:Qe,blocking:Lt,capture:null,charSet:null,checked:Qe,cite:null,className:Lt,closedBy:null,colorSpace:null,cols:Ne,colSpan:Ne,command:null,commandFor:null,content:null,contentEditable:cn,controls:Qe,controlsList:Lt,coords:Ne|Ss,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Qe,defer:Qe,dir:null,dirName:null,disabled:Qe,download:jv,draggable:cn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Qe,formTarget:null,headers:Lt,height:Ne,hidden:jv,high:Ne,href:null,hrefLang:null,htmlFor:Lt,httpEquiv:Lt,id:null,imageSizes:null,imageSrcSet:null,inert:Qe,inputMode:null,integrity:null,is:null,isMap:Qe,itemId:null,itemProp:Lt,itemRef:Lt,itemScope:Qe,itemType:Lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Qe,low:Ne,manifest:null,max:null,maxLength:Ne,media:null,method:null,min:null,minLength:Ne,multiple:Qe,muted:Qe,name:null,nonce:null,noModule:Qe,noValidate:Qe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Qe,optimum:Ne,pattern:null,ping:Lt,placeholder:null,playsInline:Qe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Qe,referrerPolicy:null,rel:Lt,required:Qe,reversed:Qe,rows:Ne,rowSpan:Ne,sandbox:Lt,scope:null,scoped:Qe,seamless:Qe,selected:Qe,shadowRootClonable:Qe,shadowRootCustomElementRegistry:Qe,shadowRootDelegatesFocus:Qe,shadowRootMode:null,shadowRootSerializable:Qe,shape:null,size:Ne,sizes:null,slot:null,span:Ne,spellCheck:cn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ne,step:null,style:null,tabIndex:Ne,target:null,title:null,translate:null,type:null,typeMustMatch:Qe,useMap:null,value:cn,width:Ne,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Lt,axis:null,background:null,bgColor:null,border:Ne,borderColor:null,bottomMargin:Ne,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Qe,declare:Qe,event:null,face:null,frame:null,frameBorder:null,hSpace:Ne,leftMargin:Ne,link:null,longDesc:null,lowSrc:null,marginHeight:Ne,marginWidth:Ne,noResize:Qe,noHref:Qe,noShade:Qe,noWrap:Qe,object:null,profile:null,prompt:null,rev:null,rightMargin:Ne,rules:null,scheme:null,scrolling:cn,standby:null,summary:null,text:null,topMargin:Ne,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ne,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Qe,disablePictureInPicture:Qe,disableRemotePlayback:Qe,exportParts:Ss,part:Lt,prefix:null,property:null,results:Ne,security:null,unselectable:null},space:"html",transform:IA}),iV=hu({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:pr,accentHeight:Ne,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ne,amplitude:Ne,arabicForm:null,ascent:Ne,attributeName:null,attributeType:null,azimuth:Ne,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ne,by:null,calcMode:null,capHeight:Ne,className:Lt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ne,diffuseConstant:Ne,direction:null,display:null,dur:null,divisor:Ne,dominantBaseline:null,download:Qe,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ne,enableBackground:null,end:null,event:null,exponent:Ne,externalResourcesRequired:null,fill:null,fillOpacity:Ne,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ss,g2:Ss,glyphName:Ss,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ne,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ne,horizOriginX:Ne,horizOriginY:Ne,id:null,ideographic:Ne,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ne,k:Ne,k1:Ne,k2:Ne,k3:Ne,k4:Ne,kernelMatrix:pr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ne,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ne,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ne,overlineThickness:Ne,paintOrder:null,panose1:null,path:null,pathLength:Ne,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ne,pointsAtY:Ne,pointsAtZ:Ne,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:pr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:pr,rev:pr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:pr,requiredFeatures:pr,requiredFonts:pr,requiredFormats:pr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ne,specularExponent:Ne,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ne,strikethroughThickness:Ne,string:null,stroke:null,strokeDashArray:pr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ne,strokeOpacity:Ne,strokeWidth:null,style:null,surfaceScale:Ne,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:pr,tabIndex:Ne,tableValues:null,target:null,targetX:Ne,targetY:Ne,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:pr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ne,underlineThickness:Ne,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ne,values:null,vAlphabetic:Ne,vMathematical:Ne,vectorEffect:null,vHanging:Ne,vIdeographic:Ne,version:null,vertAdvY:Ne,vertOriginX:Ne,vertOriginY:Ne,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ne,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:qA}),PA=hu({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),$A=hu({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:IA}),BA=hu({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),aV={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},oV=/[A-Z]/g,RS=/-[a-z]/g,sV=/^data[-\w.:]+$/i;function UA(e,t){const n=Tv(t);let r=t,i=ir;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&sV.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(RS,uV);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!RS.test(o)){let s=o.replace(oV,lV);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=r0}return new i(r,t)}function lV(e){return"-"+e.toLowerCase()}function uV(e){return e.charAt(1).toUpperCase()}const GA=DA([OA,rV,PA,$A,BA],"html"),Cf=DA([OA,iV,PA,$A,BA],"svg");function FA(e){return e.join(" ").trim()}var Tl={},Qg,NS;function cV(){if(NS)return Qg;NS=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,c=`
73
+ `,f="/",h="*",m="",_="comment",g="declaration";function b(C,w){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];w=w||{};var T=1,k=1;function S($){var Z=$.match(t);Z&&(T+=Z.length);var A=$.lastIndexOf(c);k=~A?$.length-A:k+$.length}function z(){var $={line:T,column:k};return function(Z){return Z.position=new R($),F(),Z}}function R($){this.start=$,this.end={line:T,column:k},this.source=w.source}R.prototype.content=C;function M($){var Z=new Error(w.source+":"+T+":"+k+": "+$);if(Z.reason=$,Z.filename=w.source,Z.line=T,Z.column=k,Z.source=C,!w.silent)throw Z}function X($){var Z=$.exec(C);if(Z){var A=Z[0];return S(A),C=C.slice(A.length),Z}}function F(){X(n)}function I($){var Z;for($=$||[];Z=U();)Z!==!1&&$.push(Z);return $}function U(){var $=z();if(!(f!=C.charAt(0)||h!=C.charAt(1))){for(var Z=2;m!=C.charAt(Z)&&(h!=C.charAt(Z)||f!=C.charAt(Z+1));)++Z;if(Z+=2,m===C.charAt(Z-1))return M("End of comment missing");var A=C.slice(2,Z-2);return k+=2,S(A),C=C.slice(Z),k+=2,$({type:_,comment:A})}}function G(){var $=z(),Z=X(r);if(Z){if(U(),!X(i))return M("property missing ':'");var A=X(o),N=$({type:g,property:E(Z[0].replace(e,m)),value:A?E(A[0].replace(e,m)):m});return X(s),N}}function q(){var $=[];I($);for(var Z;Z=G();)Z!==!1&&($.push(Z),I($));return $}return F(),q()}function E(C){return C?C.replace(u,m):m}return Qg=b,Qg}var LS;function fV(){if(LS)return Tl;LS=1;var e=Tl&&Tl.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Tl,"__esModule",{value:!0}),Tl.default=n;const t=e(cV());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const s=(0,t.default)(r),u=typeof i=="function";return s.forEach(c=>{if(c.type!=="declaration")return;const{property:f,value:h}=c;u?i(f,h,c):h&&(o=o||{},o[f]=h)}),o}return Tl}var pc={},zS;function dV(){if(zS)return pc;zS=1,Object.defineProperty(pc,"__esModule",{value:!0}),pc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(f){return!f||n.test(f)||e.test(f)},s=function(f,h){return h.toUpperCase()},u=function(f,h){return"".concat(h,"-")},c=function(f,h){return h===void 0&&(h={}),o(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(i,u):f=f.replace(r,u),f.replace(t,s))};return pc.camelCase=c,pc}var _c,MS;function hV(){if(MS)return _c;MS=1;var e=_c&&_c.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(fV()),n=dV();function r(i,o){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(u,c){u&&c&&(s[(0,n.camelCase)(u,o)]=c)}),s}return r.default=r,_c=r,_c}var mV=hV();const pV=Ea(mV),HA=VA("end"),i0=VA("start");function VA(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function _V(e){const t=i0(e),n=HA(e);if(t&&n)return{start:t,end:n}}function $c(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?DS(e.position):"start"in e||"end"in e?DS(e):"line"in e||"column"in e?Rv(e):""}function Rv(e){return OS(e&&e.line)+":"+OS(e&&e.column)}function DS(e){return Rv(e&&e.start)+"-"+Rv(e&&e.end)}function OS(e){return e&&typeof e=="number"?e:1}class Bn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?o.ruleId=r:(o.source=r.slice(0,c),o.ruleId=r.slice(c+1))}if(!o.place&&o.ancestors&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.position)}const u=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=$c(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Bn.prototype.file="";Bn.prototype.name="";Bn.prototype.reason="";Bn.prototype.message="";Bn.prototype.stack="";Bn.prototype.column=void 0;Bn.prototype.line=void 0;Bn.prototype.ancestors=void 0;Bn.prototype.cause=void 0;Bn.prototype.fatal=void 0;Bn.prototype.place=void 0;Bn.prototype.ruleId=void 0;Bn.prototype.source=void 0;const a0={}.hasOwnProperty,gV=new Map,yV=/[A-Z]/g,vV=new Set(["table","tbody","thead","tfoot","tr"]),bV=new Set(["td","th"]),XA="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xV(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=AV(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=jV(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Cf:GA,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=YA(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function YA(e,t,n){if(t.type==="element")return wV(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return kV(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return SV(e,t,n);if(t.type==="mdxjsEsm")return EV(e,t);if(t.type==="root")return CV(e,t,n);if(t.type==="text")return TV(e,t)}function wV(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Cf,e.schema=i),e.ancestors.push(t);const o=KA(e,t.tagName,!1),s=RV(e,t);let u=s0(e,t);return vV.has(t.tagName)&&(u=u.filter(function(c){return typeof c=="string"?!rp(c):!0})),WA(e,s,o,t),o0(s,u),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function kV(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}of(e,t.position)}function EV(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);of(e,t.position)}function SV(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Cf,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:KA(e,t.name,!0),s=NV(e,t),u=s0(e,t);return WA(e,s,o,t),o0(s,u),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function CV(e,t,n){const r={};return o0(r,s0(e,t)),e.create(t,e.Fragment,r,n)}function TV(e,t){return t.value}function WA(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function o0(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function jV(e,t,n){return r;function r(i,o,s,u){const f=Array.isArray(s.children)?n:t;return u?f(o,s,u):f(o,s)}}function AV(e,t){return n;function n(r,i,o,s){const u=Array.isArray(o.children),c=i0(r);return t(i,o,s,u,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function RV(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&a0.call(t.properties,i)){const o=LV(e,i,t.properties[i]);if(o){const[s,u]=o;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&bV.has(t.tagName)?r=u:n[s]=u}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function NV(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const u=s.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else of(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,o=e.evaluater.evaluateExpression(u.expression)}else of(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function s0(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:gV;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const c=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(c){const f=i.get(c)||0;s=c+"-"+f,i.set(c,f+1)}}const u=YA(e,o,s);u!==void 0&&n.push(u)}return n}function LV(e,t,n){const r=UA(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?MA(n):FA(n)),r.property==="style"){let i=typeof n=="object"?n:zV(e,String(n));return e.stylePropertyNameCase==="css"&&(i=MV(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?aV[r.property]||r.property:r.attribute,n]}}function zV(e,t){try{return pV(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Bn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=XA+"#cannot-parse-style-attribute",i}}function KA(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const u=TS(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(o&&u.type==="Literal"),optional:!1}:u}r=s}else r=TS(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return a0.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);of(e)}function of(e,t){const n=new Bn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=XA+"#cannot-handle-mdx-estrees-without-createevaluater",n}function MV(e){const t={};let n;for(n in e)a0.call(e,n)&&(t[DV(n)]=e[n]);return t}function DV(e){let t=e.replace(yV,OV);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function OV(e){return"-"+e.toLowerCase()}const Zg={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},qV={};function l0(e,t){const n=qV,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return QA(e,r,i)}function QA(e,t,n){if(IV(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return qS(e.children,t,n)}return Array.isArray(e)?qS(e,t,n):""}function qS(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=QA(e[i],t,n);return r.join("")}function IV(e){return!!(e&&typeof e=="object")}const IS=document.createElement("i");function u0(e){const t="&"+e+";";IS.innerHTML=t;const n=IS.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function gr(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function Mr(e,t){return e.length>0?(gr(e,e.length,0,t),e):t}const PS={}.hasOwnProperty;function ZA(e){const t={};let n=-1;for(;++n<e.length;)PV(t,e[n]);return t}function PV(e,t){let n;for(n in t){const i=(PS.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){PS.call(i,s)||(i[s]=[]);const u=o[s];$V(i[s],Array.isArray(u)?u:u?[u]:[])}}}function $V(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);gr(e,0,0,r)}function JA(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ui(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Xn=Ro(/[A-Za-z]/),Pn=Ro(/[\dA-Za-z]/),BV=Ro(/[#-'*+\--9=?A-Z^-~]/);function mm(e){return e!==null&&(e<32||e===127)}const Nv=Ro(/\d/),UV=Ro(/[\dA-Fa-f]/),GV=Ro(/[!-/:-@[-`{-~]/);function Xe(e){return e!==null&&e<-2}function zt(e){return e!==null&&(e<0||e===32)}function st(e){return e===-2||e===-1||e===32}const ip=Ro(new RegExp("\\p{P}|\\p{S}","u")),Ls=Ro(/\s/);function Ro(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function mu(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&Pn(e.charCodeAt(n+1))&&Pn(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const u=e.charCodeAt(n+1);o<56320&&u>56319&&u<57344?(s=String.fromCharCode(o,u),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function dt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(c){return st(c)?(e.enter(n),u(c)):t(c)}function u(c){return st(c)&&o++<i?(e.consume(c),u):(e.exit(n),t(c))}}const FV={tokenize:HV};function HV(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),dt(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),o(u)}function o(u){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Xe(u)?(e.consume(u),e.exit("chunkText"),o):(e.consume(u),s)}}const VV={tokenize:XV},$S={tokenize:YV};function XV(e){const t=this,n=[];let r=0,i,o,s;return u;function u(k){if(r<n.length){const S=n[r];return t.containerState=S[1],e.attempt(S[0].continuation,c,f)(k)}return f(k)}function c(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&T();const S=t.events.length;let z=S,R;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){R=t.events[z][1].end;break}w(r);let M=S;for(;M<t.events.length;)t.events[M][1].end={...R},M++;return gr(t.events,z+1,0,t.events.slice(S)),t.events.length=M,f(k)}return u(k)}function f(k){if(r===n.length){if(!i)return _(k);if(i.currentConstruct&&i.currentConstruct.concrete)return b(k);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check($S,h,m)(k)}function h(k){return i&&T(),w(r),_(k)}function m(k){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(k)}function _(k){return t.containerState={},e.attempt($S,g,b)(k)}function g(k){return r++,n.push([t.currentConstruct,t.containerState]),_(k)}function b(k){if(k===null){i&&T(),w(0),e.consume(k);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),E(k)}function E(k){if(k===null){C(e.exit("chunkFlow"),!0),w(0),e.consume(k);return}return Xe(k)?(e.consume(k),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(k),E)}function C(k,S){const z=t.sliceStream(k);if(S&&z.push(null),k.previous=o,o&&(o.next=k),o=k,i.defineSkip(k.start),i.write(z),t.parser.lazy[k.start.line]){let R=i.events.length;for(;R--;)if(i.events[R][1].start.offset<s&&(!i.events[R][1].end||i.events[R][1].end.offset>s))return;const M=t.events.length;let X=M,F,I;for(;X--;)if(t.events[X][0]==="exit"&&t.events[X][1].type==="chunkFlow"){if(F){I=t.events[X][1].end;break}F=!0}for(w(r),R=M;R<t.events.length;)t.events[R][1].end={...I},R++;gr(t.events,X+1,0,t.events.slice(M)),t.events.length=R}}function w(k){let S=n.length;for(;S-- >k;){const z=n[S];t.containerState=z[1],z[0].exit.call(t,e)}n.length=k}function T(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function YV(e,t,n){return dt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ru(e){if(e===null||zt(e)||Ls(e))return 1;if(ip(e))return 2}function ap(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Lv={name:"attention",resolveAll:WV,tokenize:KV};function WV(e,t){let n=-1,r,i,o,s,u,c,f,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},_={...e[n][1].start};BS(m,-c),BS(_,c),s={type:c>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},u={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:_},o={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...s.start},end:{...u.end}},e[r][1].end={...s.start},e[n][1].start={...u.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=Mr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=Mr(f,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),f=Mr(f,ap(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=Mr(f,[["exit",o,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,f=Mr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,gr(e,r-1,n-r+3,f),n=r+f.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function KV(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ru(r);let o;return s;function s(c){return o=c,e.enter("attentionSequence"),u(c)}function u(c){if(c===o)return e.consume(c),u;const f=e.exit("attentionSequence"),h=ru(c),m=!h||h===2&&i||n.includes(c),_=!i||i===2&&h||n.includes(r);return f._open=!!(o===42?m:m&&(i||!_)),f._close=!!(o===42?_:_&&(h||!m)),t(c)}}function BS(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const QV={name:"autolink",tokenize:ZV};function ZV(e,t,n){let r=0;return i;function i(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(g){return Xn(g)?(e.consume(g),s):g===64?n(g):f(g)}function s(g){return g===43||g===45||g===46||Pn(g)?(r=1,u(g)):f(g)}function u(g){return g===58?(e.consume(g),r=0,c):(g===43||g===45||g===46||Pn(g))&&r++<32?(e.consume(g),u):(r=0,f(g))}function c(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):g===null||g===32||g===60||mm(g)?n(g):(e.consume(g),c)}function f(g){return g===64?(e.consume(g),h):BV(g)?(e.consume(g),f):n(g)}function h(g){return Pn(g)?m(g):n(g)}function m(g){return g===46?(e.consume(g),r=0,h):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):_(g)}function _(g){if((g===45||Pn(g))&&r++<63){const b=g===45?_:m;return e.consume(g),b}return n(g)}}const Tf={partial:!0,tokenize:JV};function JV(e,t,n){return r;function r(o){return st(o)?dt(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Xe(o)?t(o):n(o)}}const eR={continuation:{tokenize:tX},exit:nX,name:"blockQuote",tokenize:eX};function eX(e,t,n){const r=this;return i;function i(s){if(s===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return st(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function tX(e,t,n){const r=this;return i;function i(s){return st(s)?dt(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(eR,t,n)(s)}}function nX(e){e.exit("blockQuote")}const tR={name:"characterEscape",tokenize:rX};function rX(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return GV(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const nR={name:"characterReference",tokenize:iX};function iX(e,t,n){const r=this;let i=0,o,s;return u;function u(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),c}function c(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),o=31,s=Pn,h(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=UV,h):(e.enter("characterReferenceValue"),o=7,s=Nv,h(m))}function h(m){if(m===59&&i){const _=e.exit("characterReferenceValue");return s===Pn&&!u0(r.sliceSerialize(_))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(m)&&i++<o?(e.consume(m),h):n(m)}}const US={partial:!0,tokenize:oX},GS={concrete:!0,name:"codeFenced",tokenize:aX};function aX(e,t,n){const r=this,i={partial:!0,tokenize:z};let o=0,s=0,u;return c;function c(R){return f(R)}function f(R){const M=r.events[r.events.length-1];return o=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,u=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(R)}function h(R){return R===u?(s++,e.consume(R),h):s<3?n(R):(e.exit("codeFencedFenceSequence"),st(R)?dt(e,m,"whitespace")(R):m(R))}function m(R){return R===null||Xe(R)?(e.exit("codeFencedFence"),r.interrupt?t(R):e.check(US,E,S)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),_(R))}function _(R){return R===null||Xe(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(R)):st(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),dt(e,g,"whitespace")(R)):R===96&&R===u?n(R):(e.consume(R),_)}function g(R){return R===null||Xe(R)?m(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(R))}function b(R){return R===null||Xe(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(R)):R===96&&R===u?n(R):(e.consume(R),b)}function E(R){return e.attempt(i,S,C)(R)}function C(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),w}function w(R){return o>0&&st(R)?dt(e,T,"linePrefix",o+1)(R):T(R)}function T(R){return R===null||Xe(R)?e.check(US,E,S)(R):(e.enter("codeFlowValue"),k(R))}function k(R){return R===null||Xe(R)?(e.exit("codeFlowValue"),T(R)):(e.consume(R),k)}function S(R){return e.exit("codeFenced"),t(R)}function z(R,M,X){let F=0;return I;function I(Z){return R.enter("lineEnding"),R.consume(Z),R.exit("lineEnding"),U}function U(Z){return R.enter("codeFencedFence"),st(Z)?dt(R,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):G(Z)}function G(Z){return Z===u?(R.enter("codeFencedFenceSequence"),q(Z)):X(Z)}function q(Z){return Z===u?(F++,R.consume(Z),q):F>=s?(R.exit("codeFencedFenceSequence"),st(Z)?dt(R,$,"whitespace")(Z):$(Z)):X(Z)}function $(Z){return Z===null||Xe(Z)?(R.exit("codeFencedFence"),M(Z)):X(Z)}}}function oX(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Jg={name:"codeIndented",tokenize:lX},sX={partial:!0,tokenize:uX};function lX(e,t,n){const r=this;return i;function i(f){return e.enter("codeIndented"),dt(e,o,"linePrefix",5)(f)}function o(f){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?s(f):n(f)}function s(f){return f===null?c(f):Xe(f)?e.attempt(sX,s,c)(f):(e.enter("codeFlowValue"),u(f))}function u(f){return f===null||Xe(f)?(e.exit("codeFlowValue"),s(f)):(e.consume(f),u)}function c(f){return e.exit("codeIndented"),t(f)}}function uX(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Xe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):dt(e,o,"linePrefix",5)(s)}function o(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):Xe(s)?i(s):n(s)}}const cX={name:"codeText",previous:dX,resolve:fX,tokenize:hX};function fX(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function dX(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function hX(e,t,n){let r=0,i,o;return s;function s(m){return e.enter("codeText"),e.enter("codeTextSequence"),u(m)}function u(m){return m===96?(e.consume(m),r++,u):(e.exit("codeTextSequence"),c(m))}function c(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),c):m===96?(o=e.enter("codeTextSequence"),i=0,h(m)):Xe(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),c):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||Xe(m)?(e.exit("codeTextData"),c(m)):(e.consume(m),f)}function h(m){return m===96?(e.consume(m),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(o.type="codeTextData",f(m))}}class mX{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&gc(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),gc(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),gc(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);gc(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);gc(this.left,n.reverse())}}}function gc(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function rR(e){const t={};let n=-1,r,i,o,s,u,c,f;const h=new mX(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,o=0,o<c.length&&c[o][1].type==="lineEndingBlank"&&(o+=2),o<c.length&&c[o][1].type==="content"))for(;++o<c.length&&c[o][1].type!=="content";)c[o][1].type==="chunkText"&&(c[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,pX(h,n)),n=t[n],f=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=h.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},u=h.slice(i,n),u.unshift(r),h.splice(i,n-i+1,u))}}return gr(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function pX(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const u=s.events,c=[],f={};let h,m,_=-1,g=n,b=0,E=0;const C=[E];for(;g;){for(;e.get(++i)[1]!==g;);o.push(i),g._tokenizer||(h=r.sliceStream(g),g.next||h.push(null),m&&s.defineSkip(g.start),g._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(h),g._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),m=g,g=g.next}for(g=n;++_<u.length;)u[_][0]==="exit"&&u[_-1][0]==="enter"&&u[_][1].type===u[_-1][1].type&&u[_][1].start.line!==u[_][1].end.line&&(E=_+1,C.push(E),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(s.events=[],g?(g._tokenizer=void 0,g.previous=void 0):C.pop(),_=C.length;_--;){const w=u.slice(C[_],C[_+1]),T=o.pop();c.push([T,T+w.length-1]),e.splice(T,2,w)}for(c.reverse(),_=-1;++_<c.length;)f[b+c[_][0]]=b+c[_][1],b+=c[_][1]-c[_][0]-1;return f}const _X={resolve:yX,tokenize:vX},gX={partial:!0,tokenize:bX};function yX(e){return rR(e),e}function vX(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?o(u):Xe(u)?e.check(gX,s,o)(u):(e.consume(u),i)}function o(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function bX(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),dt(e,o,"linePrefix")}function o(s){if(s===null||Xe(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function iR(e,t,n,r,i,o,s,u,c){const f=c||Number.POSITIVE_INFINITY;let h=0;return m;function m(w){return w===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(w),e.exit(o),_):w===null||w===32||w===41||mm(w)?n(w):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),E(w))}function _(w){return w===62?(e.enter(o),e.consume(w),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),g(w))}function g(w){return w===62?(e.exit("chunkString"),e.exit(u),_(w)):w===null||w===60||Xe(w)?n(w):(e.consume(w),w===92?b:g)}function b(w){return w===60||w===62||w===92?(e.consume(w),g):g(w)}function E(w){return!h&&(w===null||w===41||zt(w))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(w)):h<f&&w===40?(e.consume(w),h++,E):w===41?(e.consume(w),h--,E):w===null||w===32||w===40||mm(w)?n(w):(e.consume(w),w===92?C:E)}function C(w){return w===40||w===41||w===92?(e.consume(w),E):E(w)}}function aR(e,t,n,r,i,o){const s=this;let u=0,c;return f;function f(g){return e.enter(r),e.enter(i),e.consume(g),e.exit(i),e.enter(o),h}function h(g){return u>999||g===null||g===91||g===93&&!c||g===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(g):g===93?(e.exit(o),e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):Xe(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),m(g))}function m(g){return g===null||g===91||g===93||Xe(g)||u++>999?(e.exit("chunkString"),h(g)):(e.consume(g),c||(c=!st(g)),g===92?_:m)}function _(g){return g===91||g===92||g===93?(e.consume(g),u++,m):m(g)}}function oR(e,t,n,r,i,o){let s;return u;function u(_){return _===34||_===39||_===40?(e.enter(r),e.enter(i),e.consume(_),e.exit(i),s=_===40?41:_,c):n(_)}function c(_){return _===s?(e.enter(i),e.consume(_),e.exit(i),e.exit(r),t):(e.enter(o),f(_))}function f(_){return _===s?(e.exit(o),c(s)):_===null?n(_):Xe(_)?(e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),dt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(_))}function h(_){return _===s||_===null||Xe(_)?(e.exit("chunkString"),f(_)):(e.consume(_),_===92?m:h)}function m(_){return _===s||_===92?(e.consume(_),h):h(_)}}function Bc(e,t){let n;return r;function r(i){return Xe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):st(i)?dt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const xX={name:"definition",tokenize:kX},wX={partial:!0,tokenize:EX};function kX(e,t,n){const r=this;let i;return o;function o(g){return e.enter("definition"),s(g)}function s(g){return aR.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function u(g){return i=ui(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),c):n(g)}function c(g){return zt(g)?Bc(e,f)(g):f(g)}function f(g){return iR(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function h(g){return e.attempt(wX,m,m)(g)}function m(g){return st(g)?dt(e,_,"whitespace")(g):_(g)}function _(g){return g===null||Xe(g)?(e.exit("definition"),r.parser.defined.push(i),t(g)):n(g)}}function EX(e,t,n){return r;function r(u){return zt(u)?Bc(e,i)(u):n(u)}function i(u){return oR(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function o(u){return st(u)?dt(e,s,"whitespace")(u):s(u)}function s(u){return u===null||Xe(u)?t(u):n(u)}}const SX={name:"hardBreakEscape",tokenize:CX};function CX(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Xe(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const TX={name:"headingAtx",resolve:jX,tokenize:AX};function jX(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},gr(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function AX(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),o(h)}function o(h){return e.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&r++<6?(e.consume(h),s):h===null||zt(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||Xe(h)?(e.exit("atxHeading"),t(h)):st(h)?dt(e,u,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),u(h))}function f(h){return h===null||h===35||zt(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),f)}}const RX=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],FS=["pre","script","style","textarea"],NX={concrete:!0,name:"htmlFlow",resolveTo:MX,tokenize:DX},LX={partial:!0,tokenize:qX},zX={partial:!0,tokenize:OX};function MX(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function DX(e,t,n){const r=this;let i,o,s,u,c;return f;function f(O){return h(O)}function h(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),m}function m(O){return O===33?(e.consume(O),_):O===47?(e.consume(O),o=!0,E):O===63?(e.consume(O),i=3,r.interrupt?t:D):Xn(O)?(e.consume(O),s=String.fromCharCode(O),C):n(O)}function _(O){return O===45?(e.consume(O),i=2,g):O===91?(e.consume(O),i=5,u=0,b):Xn(O)?(e.consume(O),i=4,r.interrupt?t:D):n(O)}function g(O){return O===45?(e.consume(O),r.interrupt?t:D):n(O)}function b(O){const ie="CDATA[";return O===ie.charCodeAt(u++)?(e.consume(O),u===ie.length?r.interrupt?t:G:b):n(O)}function E(O){return Xn(O)?(e.consume(O),s=String.fromCharCode(O),C):n(O)}function C(O){if(O===null||O===47||O===62||zt(O)){const ie=O===47,oe=s.toLowerCase();return!ie&&!o&&FS.includes(oe)?(i=1,r.interrupt?t(O):G(O)):RX.includes(s.toLowerCase())?(i=6,ie?(e.consume(O),w):r.interrupt?t(O):G(O)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):o?T(O):k(O))}return O===45||Pn(O)?(e.consume(O),s+=String.fromCharCode(O),C):n(O)}function w(O){return O===62?(e.consume(O),r.interrupt?t:G):n(O)}function T(O){return st(O)?(e.consume(O),T):I(O)}function k(O){return O===47?(e.consume(O),I):O===58||O===95||Xn(O)?(e.consume(O),S):st(O)?(e.consume(O),k):I(O)}function S(O){return O===45||O===46||O===58||O===95||Pn(O)?(e.consume(O),S):z(O)}function z(O){return O===61?(e.consume(O),R):st(O)?(e.consume(O),z):k(O)}function R(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),c=O,M):st(O)?(e.consume(O),R):X(O)}function M(O){return O===c?(e.consume(O),c=null,F):O===null||Xe(O)?n(O):(e.consume(O),M)}function X(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||zt(O)?z(O):(e.consume(O),X)}function F(O){return O===47||O===62||st(O)?k(O):n(O)}function I(O){return O===62?(e.consume(O),U):n(O)}function U(O){return O===null||Xe(O)?G(O):st(O)?(e.consume(O),U):n(O)}function G(O){return O===45&&i===2?(e.consume(O),A):O===60&&i===1?(e.consume(O),N):O===62&&i===4?(e.consume(O),B):O===63&&i===3?(e.consume(O),D):O===93&&i===5?(e.consume(O),Q):Xe(O)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(LX,ee,q)(O)):O===null||Xe(O)?(e.exit("htmlFlowData"),q(O)):(e.consume(O),G)}function q(O){return e.check(zX,$,ee)(O)}function $(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),Z}function Z(O){return O===null||Xe(O)?q(O):(e.enter("htmlFlowData"),G(O))}function A(O){return O===45?(e.consume(O),D):G(O)}function N(O){return O===47?(e.consume(O),s="",H):G(O)}function H(O){if(O===62){const ie=s.toLowerCase();return FS.includes(ie)?(e.consume(O),B):G(O)}return Xn(O)&&s.length<8?(e.consume(O),s+=String.fromCharCode(O),H):G(O)}function Q(O){return O===93?(e.consume(O),D):G(O)}function D(O){return O===62?(e.consume(O),B):O===45&&i===2?(e.consume(O),D):G(O)}function B(O){return O===null||Xe(O)?(e.exit("htmlFlowData"),ee(O)):(e.consume(O),B)}function ee(O){return e.exit("htmlFlow"),t(O)}}function OX(e,t,n){const r=this;return i;function i(s){return Xe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function qX(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Tf,t,n)}}const IX={name:"htmlText",tokenize:PX};function PX(e,t,n){const r=this;let i,o,s;return u;function u(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),c}function c(D){return D===33?(e.consume(D),f):D===47?(e.consume(D),z):D===63?(e.consume(D),k):Xn(D)?(e.consume(D),X):n(D)}function f(D){return D===45?(e.consume(D),h):D===91?(e.consume(D),o=0,b):Xn(D)?(e.consume(D),T):n(D)}function h(D){return D===45?(e.consume(D),g):n(D)}function m(D){return D===null?n(D):D===45?(e.consume(D),_):Xe(D)?(s=m,N(D)):(e.consume(D),m)}function _(D){return D===45?(e.consume(D),g):m(D)}function g(D){return D===62?A(D):D===45?_(D):m(D)}function b(D){const B="CDATA[";return D===B.charCodeAt(o++)?(e.consume(D),o===B.length?E:b):n(D)}function E(D){return D===null?n(D):D===93?(e.consume(D),C):Xe(D)?(s=E,N(D)):(e.consume(D),E)}function C(D){return D===93?(e.consume(D),w):E(D)}function w(D){return D===62?A(D):D===93?(e.consume(D),w):E(D)}function T(D){return D===null||D===62?A(D):Xe(D)?(s=T,N(D)):(e.consume(D),T)}function k(D){return D===null?n(D):D===63?(e.consume(D),S):Xe(D)?(s=k,N(D)):(e.consume(D),k)}function S(D){return D===62?A(D):k(D)}function z(D){return Xn(D)?(e.consume(D),R):n(D)}function R(D){return D===45||Pn(D)?(e.consume(D),R):M(D)}function M(D){return Xe(D)?(s=M,N(D)):st(D)?(e.consume(D),M):A(D)}function X(D){return D===45||Pn(D)?(e.consume(D),X):D===47||D===62||zt(D)?F(D):n(D)}function F(D){return D===47?(e.consume(D),A):D===58||D===95||Xn(D)?(e.consume(D),I):Xe(D)?(s=F,N(D)):st(D)?(e.consume(D),F):A(D)}function I(D){return D===45||D===46||D===58||D===95||Pn(D)?(e.consume(D),I):U(D)}function U(D){return D===61?(e.consume(D),G):Xe(D)?(s=U,N(D)):st(D)?(e.consume(D),U):F(D)}function G(D){return D===null||D===60||D===61||D===62||D===96?n(D):D===34||D===39?(e.consume(D),i=D,q):Xe(D)?(s=G,N(D)):st(D)?(e.consume(D),G):(e.consume(D),$)}function q(D){return D===i?(e.consume(D),i=void 0,Z):D===null?n(D):Xe(D)?(s=q,N(D)):(e.consume(D),q)}function $(D){return D===null||D===34||D===39||D===60||D===61||D===96?n(D):D===47||D===62||zt(D)?F(D):(e.consume(D),$)}function Z(D){return D===47||D===62||zt(D)?F(D):n(D)}function A(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),t):n(D)}function N(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),H}function H(D){return st(D)?dt(e,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):Q(D)}function Q(D){return e.enter("htmlTextData"),s(D)}}const c0={name:"labelEnd",resolveAll:GX,resolveTo:FX,tokenize:HX},$X={tokenize:VX},BX={tokenize:XX},UX={tokenize:YX};function GX(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&gr(e,0,e.length,n),e}function FX(e,t){let n=e.length,r=0,i,o,s,u;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const c={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},h={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return u=[["enter",c,t],["enter",f,t]],u=Mr(u,e.slice(o+1,o+r+3)),u=Mr(u,[["enter",h,t]]),u=Mr(u,ap(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),u=Mr(u,[["exit",h,t],e[s-2],e[s-1],["exit",f,t]]),u=Mr(u,e.slice(s+1)),u=Mr(u,[["exit",c,t]]),gr(e,o,e.length,u),e}function HX(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return u;function u(_){return o?o._inactive?m(_):(s=r.parser.defined.includes(ui(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(_),e.exit("labelMarker"),e.exit("labelEnd"),c):n(_)}function c(_){return _===40?e.attempt($X,h,s?h:m)(_):_===91?e.attempt(BX,h,s?f:m)(_):s?h(_):m(_)}function f(_){return e.attempt(UX,h,m)(_)}function h(_){return t(_)}function m(_){return o._balanced=!0,n(_)}}function VX(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),i}function i(m){return zt(m)?Bc(e,o)(m):o(m)}function o(m){return m===41?h(m):iR(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function s(m){return zt(m)?Bc(e,c)(m):h(m)}function u(m){return n(m)}function c(m){return m===34||m===39||m===40?oR(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):h(m)}function f(m){return zt(m)?Bc(e,h)(m):h(m)}function h(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function XX(e,t,n){const r=this;return i;function i(u){return aR.call(r,e,o,s,"reference","referenceMarker","referenceString")(u)}function o(u){return r.parser.defined.includes(ui(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function YX(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const WX={name:"labelStartImage",resolveAll:c0.resolveAll,tokenize:KX};function KX(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),o}function o(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const QX={name:"labelStartLink",resolveAll:c0.resolveAll,tokenize:ZX};function ZX(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const ey={name:"lineEnding",tokenize:JX};function JX(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),dt(e,t,"linePrefix")}}const Fh={name:"thematicBreak",tokenize:eY};function eY(e,t,n){let r=0,i;return o;function o(f){return e.enter("thematicBreak"),s(f)}function s(f){return i=f,u(f)}function u(f){return f===i?(e.enter("thematicBreakSequence"),c(f)):r>=3&&(f===null||Xe(f))?(e.exit("thematicBreak"),t(f)):n(f)}function c(f){return f===i?(e.consume(f),r++,c):(e.exit("thematicBreakSequence"),st(f)?dt(e,u,"whitespace")(f):u(f))}}const tr={continuation:{tokenize:iY},exit:oY,name:"list",tokenize:rY},tY={partial:!0,tokenize:sY},nY={partial:!0,tokenize:aY};function rY(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return u;function u(g){const b=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:Nv(g)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(Fh,n,f)(g):f(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(g)}return n(g)}function c(g){return Nv(g)&&++s<10?(e.consume(g),c):(!r.interrupt||s<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),f(g)):n(g)}function f(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(Tf,r.interrupt?n:h,e.attempt(tY,_,m))}function h(g){return r.containerState.initialBlankLine=!0,o++,_(g)}function m(g){return st(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),_):n(g)}function _(g){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function iY(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Tf,i,o);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,dt(e,t,"listItemIndent",r.containerState.size+1)(u)}function o(u){return r.containerState.furtherBlankLines||!st(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(nY,t,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,dt(e,e.attempt(tr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function aY(e,t,n){const r=this;return dt(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function oY(e){e.exit(this.containerState.type)}function sY(e,t,n){const r=this;return dt(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!st(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const HS={name:"setextUnderline",resolveTo:lY,tokenize:uY};function lY(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function uY(e,t,n){const r=this;let i;return o;function o(f){let h=r.events.length,m;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){m=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),i=f,s(f)):n(f)}function s(f){return e.enter("setextHeadingLineSequence"),u(f)}function u(f){return f===i?(e.consume(f),u):(e.exit("setextHeadingLineSequence"),st(f)?dt(e,c,"lineSuffix")(f):c(f))}function c(f){return f===null||Xe(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const cY={tokenize:fY};function fY(e){const t=this,n=e.attempt(Tf,r,e.attempt(this.parser.constructs.flowInitial,i,dt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(_X,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const dY={resolveAll:lR()},hY=sR("string"),mY=sR("text");function sR(e){return{resolveAll:lR(e==="text"?pY:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,u);return s;function s(h){return f(h)?o(h):u(h)}function u(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),c}function c(h){return f(h)?(n.exit("data"),o(h)):(n.consume(h),c)}function f(h){if(h===null)return!0;const m=i[h];let _=-1;if(m)for(;++_<m.length;){const g=m[_];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function lR(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function pY(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,u=0,c;for(;o--;){const f=i[o];if(typeof f=="string"){for(s=f.length;f.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(f===-2)c=!0,u++;else if(f!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const f={type:n===e.length||c||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const _Y={42:tr,43:tr,45:tr,48:tr,49:tr,50:tr,51:tr,52:tr,53:tr,54:tr,55:tr,56:tr,57:tr,62:eR},gY={91:xX},yY={[-2]:Jg,[-1]:Jg,32:Jg},vY={35:TX,42:Fh,45:[HS,Fh],60:NX,61:HS,95:Fh,96:GS,126:GS},bY={38:nR,92:tR},xY={[-5]:ey,[-4]:ey,[-3]:ey,33:WX,38:nR,42:Lv,60:[QV,IX],91:QX,92:[SX,tR],93:c0,95:Lv,96:cX},wY={null:[Lv,dY]},kY={null:[42,95]},EY={null:[]},SY=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:kY,contentInitial:gY,disable:EY,document:_Y,flow:vY,flowInitial:yY,insideSpan:wY,string:bY,text:xY},Symbol.toStringTag,{value:"Module"}));function CY(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],u=[];const c={attempt:M(z),check:M(R),consume:T,enter:k,exit:S,interrupt:M(R,{interrupt:!0})},f={code:null,containerState:{},defineSkip:E,events:[],now:b,parser:e,previous:null,sliceSerialize:_,sliceStream:g,write:m};let h=t.tokenize.call(f,c);return t.resolveAll&&o.push(t),f;function m(U){return s=Mr(s,U),C(),s[s.length-1]!==null?[]:(X(t,0),f.events=ap(o,f.events,f),f.events)}function _(U,G){return jY(g(U),G)}function g(U){return TY(s,U)}function b(){const{_bufferIndex:U,_index:G,line:q,column:$,offset:Z}=r;return{_bufferIndex:U,_index:G,line:q,column:$,offset:Z}}function E(U){i[U.line]=U.column,I()}function C(){let U;for(;r._index<s.length;){const G=s[r._index];if(typeof G=="string")for(U=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<G.length;)w(G.charCodeAt(r._bufferIndex));else w(G)}}function w(U){h=h(U)}function T(U){Xe(U)?(r.line++,r.column=1,r.offset+=U===-3?2:1,I()):U!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=U}function k(U,G){const q=G||{};return q.type=U,q.start=b(),f.events.push(["enter",q,f]),u.push(q),q}function S(U){const G=u.pop();return G.end=b(),f.events.push(["exit",G,f]),G}function z(U,G){X(U,G.from)}function R(U,G){G.restore()}function M(U,G){return q;function q($,Z,A){let N,H,Q,D;return Array.isArray($)?ee($):"tokenize"in $?ee([$]):B($);function B(me){return we;function we(ne){const de=ne!==null&&me[ne],le=ne!==null&&me.null,ke=[...Array.isArray(de)?de:de?[de]:[],...Array.isArray(le)?le:le?[le]:[]];return ee(ke)(ne)}}function ee(me){return N=me,H=0,me.length===0?A:O(me[H])}function O(me){return we;function we(ne){return D=F(),Q=me,me.partial||(f.currentConstruct=me),me.name&&f.parser.constructs.disable.null.includes(me.name)?oe():me.tokenize.call(G?Object.assign(Object.create(f),G):f,c,ie,oe)(ne)}}function ie(me){return U(Q,D),Z}function oe(me){return D.restore(),++H<N.length?O(N[H]):A}}}function X(U,G){U.resolveAll&&!o.includes(U)&&o.push(U),U.resolve&&gr(f.events,G,f.events.length-G,U.resolve(f.events.slice(G),f)),U.resolveTo&&(f.events=U.resolveTo(f.events,f))}function F(){const U=b(),G=f.previous,q=f.currentConstruct,$=f.events.length,Z=Array.from(u);return{from:$,restore:A};function A(){r=U,f.previous=G,f.currentConstruct=q,f.events.length=$,u=Z,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function TY(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function jY(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
74
+ `;break}case-3:{s=`\r
75
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function AY(e){const r={constructs:ZA([SY,...(e||{}).extensions||[]]),content:i(FV),defined:[],document:i(VV),flow:i(cY),lazy:{},string:i(hY),text:i(mY)};return r;function i(o){return s;function s(u){return CY(r,o,u)}}}function RY(e){for(;!rR(e););return e}const VS=/[\0\t\n\r]/g;function NY(){let e=1,t="",n=!0,r;return i;function i(o,s,u){const c=[];let f,h,m,_,g;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),m=0,t="",n&&(o.charCodeAt(0)===65279&&m++,n=void 0);m<o.length;){if(VS.lastIndex=m,f=VS.exec(o),_=f&&f.index!==void 0?f.index:o.length,g=o.charCodeAt(_),!f){t=o.slice(m);break}if(g===10&&m===_&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),m<_&&(c.push(o.slice(m,_)),e+=_-m),g){case 0:{c.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,c.push(-2);e++<h;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}m=_+1}return u&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const LY=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function zY(e){return e.replace(LY,MY)}function MY(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return JA(n.slice(o?2:1),o?16:10)}return u0(n)||e}const uR={}.hasOwnProperty;function DY(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),OY(n)(RY(AY(n).document().write(NY()(e,t,!0))))}function OY(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(kt),autolinkProtocol:F,autolinkEmail:F,atxHeading:o(Te),blockQuote:o(le),characterEscape:F,characterReference:F,codeFenced:o(ke),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(ke,s),codeText:o(ge,s),codeTextData:F,data:F,codeFlowValue:F,definition:o(Ae),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(Ce),hardBreakEscape:o(ue),hardBreakTrailing:o(ue),htmlFlow:o(it,s),htmlFlowData:F,htmlText:o(it,s),htmlTextData:F,image:o(wt),label:s,link:o(kt),listItem:o(pt),listItemValue:_,listOrdered:o(Tt,m),listUnordered:o(Tt),paragraph:o(Gt),reference:O,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Te),strong:o(an),thematicBreak:o(Ft)},exit:{atxHeading:c(),atxHeadingSequence:z,autolink:c(),autolinkEmail:de,autolinkProtocol:ne,blockQuote:c(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:me,characterReference:we,codeFenced:c(C),codeFencedFence:E,codeFencedFenceInfo:g,codeFencedFenceMeta:b,codeFlowValue:I,codeIndented:c(w),codeText:c(Z),codeTextData:I,data:I,definition:c(),definitionDestinationString:S,definitionLabelString:T,definitionTitleString:k,emphasis:c(),hardBreakEscape:c(G),hardBreakTrailing:c(G),htmlFlow:c(q),htmlFlowData:I,htmlText:c($),htmlTextData:I,image:c(N),label:Q,labelText:H,lineEnding:U,link:c(A),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ie,resourceDestinationString:D,resourceTitleString:B,resource:ee,setextHeading:c(X),setextHeadingLineSequence:M,setextHeadingText:R,strong:c(),thematicBreak:c()}};cR(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(_e){let Re={type:"root",children:[]};const qe={stack:[Re],tokenStack:[],config:t,enter:u,exit:f,buffer:s,resume:h,data:n},He=[];let nt=-1;for(;++nt<_e.length;)if(_e[nt][1].type==="listOrdered"||_e[nt][1].type==="listUnordered")if(_e[nt][0]==="enter")He.push(nt);else{const Kt=He.pop();nt=i(_e,Kt,nt)}for(nt=-1;++nt<_e.length;){const Kt=t[_e[nt][0]];uR.call(Kt,_e[nt][1].type)&&Kt[_e[nt][1].type].call(Object.assign({sliceSerialize:_e[nt][2].sliceSerialize},qe),_e[nt][1])}if(qe.tokenStack.length>0){const Kt=qe.tokenStack[qe.tokenStack.length-1];(Kt[1]||XS).call(qe,void 0,Kt[0])}for(Re.position={start:ho(_e.length>0?_e[0][1].start:{line:1,column:1,offset:0}),end:ho(_e.length>0?_e[_e.length-2][1].end:{line:1,column:1,offset:0})},nt=-1;++nt<t.transforms.length;)Re=t.transforms[nt](Re)||Re;return Re}function i(_e,Re,qe){let He=Re-1,nt=-1,Kt=!1,Rn,yt,Ht,Jt;for(;++He<=qe;){const vt=_e[He];switch(vt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{vt[0]==="enter"?nt++:nt--,Jt=void 0;break}case"lineEndingBlank":{vt[0]==="enter"&&(Rn&&!Jt&&!nt&&!Ht&&(Ht=He),Jt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Jt=void 0}if(!nt&&vt[0]==="enter"&&vt[1].type==="listItemPrefix"||nt===-1&&vt[0]==="exit"&&(vt[1].type==="listUnordered"||vt[1].type==="listOrdered")){if(Rn){let ar=He;for(yt=void 0;ar--;){const Fn=_e[ar];if(Fn[1].type==="lineEnding"||Fn[1].type==="lineEndingBlank"){if(Fn[0]==="exit")continue;yt&&(_e[yt][1].type="lineEndingBlank",Kt=!0),Fn[1].type="lineEnding",yt=ar}else if(!(Fn[1].type==="linePrefix"||Fn[1].type==="blockQuotePrefix"||Fn[1].type==="blockQuotePrefixWhitespace"||Fn[1].type==="blockQuoteMarker"||Fn[1].type==="listItemIndent"))break}Ht&&(!yt||Ht<yt)&&(Rn._spread=!0),Rn.end=Object.assign({},yt?_e[yt][1].start:vt[1].end),_e.splice(yt||He,0,["exit",Rn,vt[2]]),He++,qe++}if(vt[1].type==="listItemPrefix"){const ar={type:"listItem",_spread:!1,start:Object.assign({},vt[1].start),end:void 0};Rn=ar,_e.splice(He,0,["enter",ar,vt[2]]),He++,qe++,Ht=void 0,Jt=!0}}}return _e[Re][1]._spread=Kt,qe}function o(_e,Re){return qe;function qe(He){u.call(this,_e(He),He),Re&&Re.call(this,He)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(_e,Re,qe){this.stack[this.stack.length-1].children.push(_e),this.stack.push(_e),this.tokenStack.push([Re,qe||void 0]),_e.position={start:ho(Re.start),end:void 0}}function c(_e){return Re;function Re(qe){_e&&_e.call(this,qe),f.call(this,qe)}}function f(_e,Re){const qe=this.stack.pop(),He=this.tokenStack.pop();if(He)He[0].type!==_e.type&&(Re?Re.call(this,_e,He[0]):(He[1]||XS).call(this,_e,He[0]));else throw new Error("Cannot close `"+_e.type+"` ("+$c({start:_e.start,end:_e.end})+"): it’s not open");qe.position.end=ho(_e.end)}function h(){return l0(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function _(_e){if(this.data.expectingFirstListItemValue){const Re=this.stack[this.stack.length-2];Re.start=Number.parseInt(this.sliceSerialize(_e),10),this.data.expectingFirstListItemValue=void 0}}function g(){const _e=this.resume(),Re=this.stack[this.stack.length-1];Re.lang=_e}function b(){const _e=this.resume(),Re=this.stack[this.stack.length-1];Re.meta=_e}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const _e=this.resume(),Re=this.stack[this.stack.length-1];Re.value=_e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const _e=this.resume(),Re=this.stack[this.stack.length-1];Re.value=_e.replace(/(\r?\n|\r)$/g,"")}function T(_e){const Re=this.resume(),qe=this.stack[this.stack.length-1];qe.label=Re,qe.identifier=ui(this.sliceSerialize(_e)).toLowerCase()}function k(){const _e=this.resume(),Re=this.stack[this.stack.length-1];Re.title=_e}function S(){const _e=this.resume(),Re=this.stack[this.stack.length-1];Re.url=_e}function z(_e){const Re=this.stack[this.stack.length-1];if(!Re.depth){const qe=this.sliceSerialize(_e).length;Re.depth=qe}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function M(_e){const Re=this.stack[this.stack.length-1];Re.depth=this.sliceSerialize(_e).codePointAt(0)===61?1:2}function X(){this.data.setextHeadingSlurpLineEnding=void 0}function F(_e){const qe=this.stack[this.stack.length-1].children;let He=qe[qe.length-1];(!He||He.type!=="text")&&(He=ft(),He.position={start:ho(_e.start),end:void 0},qe.push(He)),this.stack.push(He)}function I(_e){const Re=this.stack.pop();Re.value+=this.sliceSerialize(_e),Re.position.end=ho(_e.end)}function U(_e){const Re=this.stack[this.stack.length-1];if(this.data.atHardBreak){const qe=Re.children[Re.children.length-1];qe.position.end=ho(_e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Re.type)&&(F.call(this,_e),I.call(this,_e))}function G(){this.data.atHardBreak=!0}function q(){const _e=this.resume(),Re=this.stack[this.stack.length-1];Re.value=_e}function $(){const _e=this.resume(),Re=this.stack[this.stack.length-1];Re.value=_e}function Z(){const _e=this.resume(),Re=this.stack[this.stack.length-1];Re.value=_e}function A(){const _e=this.stack[this.stack.length-1];if(this.data.inReference){const Re=this.data.referenceType||"shortcut";_e.type+="Reference",_e.referenceType=Re,delete _e.url,delete _e.title}else delete _e.identifier,delete _e.label;this.data.referenceType=void 0}function N(){const _e=this.stack[this.stack.length-1];if(this.data.inReference){const Re=this.data.referenceType||"shortcut";_e.type+="Reference",_e.referenceType=Re,delete _e.url,delete _e.title}else delete _e.identifier,delete _e.label;this.data.referenceType=void 0}function H(_e){const Re=this.sliceSerialize(_e),qe=this.stack[this.stack.length-2];qe.label=zY(Re),qe.identifier=ui(Re).toLowerCase()}function Q(){const _e=this.stack[this.stack.length-1],Re=this.resume(),qe=this.stack[this.stack.length-1];if(this.data.inReference=!0,qe.type==="link"){const He=_e.children;qe.children=He}else qe.alt=Re}function D(){const _e=this.resume(),Re=this.stack[this.stack.length-1];Re.url=_e}function B(){const _e=this.resume(),Re=this.stack[this.stack.length-1];Re.title=_e}function ee(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function ie(_e){const Re=this.resume(),qe=this.stack[this.stack.length-1];qe.label=Re,qe.identifier=ui(this.sliceSerialize(_e)).toLowerCase(),this.data.referenceType="full"}function oe(_e){this.data.characterReferenceType=_e.type}function me(_e){const Re=this.sliceSerialize(_e),qe=this.data.characterReferenceType;let He;qe?(He=JA(Re,qe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):He=u0(Re);const nt=this.stack[this.stack.length-1];nt.value+=He}function we(_e){const Re=this.stack.pop();Re.position.end=ho(_e.end)}function ne(_e){I.call(this,_e);const Re=this.stack[this.stack.length-1];Re.url=this.sliceSerialize(_e)}function de(_e){I.call(this,_e);const Re=this.stack[this.stack.length-1];Re.url="mailto:"+this.sliceSerialize(_e)}function le(){return{type:"blockquote",children:[]}}function ke(){return{type:"code",lang:null,meta:null,value:""}}function ge(){return{type:"inlineCode",value:""}}function Ae(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ce(){return{type:"emphasis",children:[]}}function Te(){return{type:"heading",depth:0,children:[]}}function ue(){return{type:"break"}}function it(){return{type:"html",value:""}}function wt(){return{type:"image",title:null,url:"",alt:null}}function kt(){return{type:"link",title:null,url:"",children:[]}}function Tt(_e){return{type:"list",ordered:_e.type==="listOrdered",start:null,spread:_e._spread,children:[]}}function pt(_e){return{type:"listItem",spread:_e._spread,checked:null,children:[]}}function Gt(){return{type:"paragraph",children:[]}}function an(){return{type:"strong",children:[]}}function ft(){return{type:"text",value:""}}function Ft(){return{type:"thematicBreak"}}}function ho(e){return{line:e.line,column:e.column,offset:e.offset}}function cR(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?cR(e,r):qY(e,r)}}function qY(e,t){let n;for(n in t)if(uR.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function XS(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+$c({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+$c({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+$c({start:t.start,end:t.end})+") is still open")}function IY(e){const t=this;t.parser=n;function n(r){return DY(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function PY(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function $Y(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
76
+ `}]}function BY(e,t){const n=t.value?t.value+`
77
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function UY(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GY(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function FY(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=mu(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let s,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+1,u+=1,e.footnoteCounts.set(r,u);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,c);const f={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,f),e.applyData(t,f)}function HY(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VY(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function fR(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function XY(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return fR(e,t);const i={src:mu(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function YY(e,t){const n={src:mu(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function WY(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function KY(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return fR(e,t);const i={href:mu(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function QY(e,t){const n={href:mu(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ZY(e,t,n){const r=e.all(t),i=n?JY(n):dR(t),o={},s=[];if(typeof t.checked=="boolean"){const h=r[0];let m;h&&h.type==="element"&&h.tagName==="p"?m=h:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const h=r[u];(i||u!==0||h.type!=="element"||h.tagName!=="p")&&s.push({type:"text",value:`
78
+ `}),h.type==="element"&&h.tagName==="p"&&!i?s.push(...h.children):s.push(h)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
79
+ `});const f={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,f),e.applyData(t,f)}function JY(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=dR(n[r])}return t}function dR(e){const t=e.spread;return t??e.children.length>1}function eW(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function tW(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nW(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function rW(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iW(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=i0(t.children[1]),c=HA(t.children[t.children.length-1]);u&&c&&(s.position={start:u,end:c}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function aW(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,u=s?s.length:t.children.length;let c=-1;const f=[];for(;++c<u;){const m=t.children[c],_={},g=s?s[c]:void 0;g&&(_.align=g);let b={type:"element",tagName:o,properties:_,children:[]};m&&(b.children=e.all(m),e.patch(m,b),b=e.applyData(m,b)),f.push(b)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,h),e.applyData(t,h)}function oW(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const YS=9,WS=32;function sW(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(KS(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(KS(t.slice(i),i>0,!1)),o.join("")}function KS(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===YS||o===WS;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===YS||o===WS;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function lW(e,t){const n={type:"text",value:sW(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function uW(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const cW={blockquote:PY,break:$Y,code:BY,delete:UY,emphasis:GY,footnoteReference:FY,heading:HY,html:VY,imageReference:XY,image:YY,inlineCode:WY,linkReference:KY,link:QY,listItem:ZY,list:eW,paragraph:tW,root:nW,strong:rW,table:iW,tableCell:oW,tableRow:aW,text:lW,thematicBreak:uW,toml:uh,yaml:uh,definition:uh,footnoteDefinition:uh};function uh(){}const hR=-1,op=0,Uc=1,pm=2,f0=3,d0=4,h0=5,m0=6,mR=7,pR=8,fW=typeof self=="object"?self:globalThis,QS=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new fW[e](t)},dW=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case op:case hR:return n(s,i);case Uc:{const u=n([],i);for(const c of s)u.push(r(c));return u}case pm:{const u=n({},i);for(const[c,f]of s)u[r(c)]=r(f);return u}case f0:return n(new Date(s),i);case d0:{const{source:u,flags:c}=s;return n(new RegExp(u,c),i)}case h0:{const u=n(new Map,i);for(const[c,f]of s)u.set(r(c),r(f));return u}case m0:{const u=n(new Set,i);for(const c of s)u.add(r(c));return u}case mR:{const{name:u,message:c}=s;return n(QS(u,c),i)}case pR:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:u}=new Uint8Array(s);return n(new DataView(u),s)}}return n(QS(o,s),i)};return r},ZS=e=>dW(new Map,e)(0),jl="",{toString:hW}={},{keys:mW}=Object,yc=e=>{const t=typeof e;if(t!=="object"||!e)return[op,t];const n=hW.call(e).slice(8,-1);switch(n){case"Array":return[Uc,jl];case"Object":return[pm,jl];case"Date":return[f0,jl];case"RegExp":return[d0,jl];case"Map":return[h0,jl];case"Set":return[m0,jl];case"DataView":return[Uc,n]}return n.includes("Array")?[Uc,n]:n.includes("Error")?[mR,n]:[pm,n]},ch=([e,t])=>e===op&&(t==="function"||t==="symbol"),pW=(e,t,n,r)=>{const i=(s,u)=>{const c=r.push(s)-1;return n.set(u,c),c},o=s=>{if(n.has(s))return n.get(s);let[u,c]=yc(s);switch(u){case op:{let h=s;switch(c){case"bigint":u=pR,h=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return i([hR],s)}return i([u,h],s)}case Uc:{if(c){let _=s;return c==="DataView"?_=new Uint8Array(s.buffer):c==="ArrayBuffer"&&(_=new Uint8Array(s)),i([c,[..._]],s)}const h=[],m=i([u,h],s);for(const _ of s)h.push(o(_));return m}case pm:{if(c)switch(c){case"BigInt":return i([c,s.toString()],s);case"Boolean":case"Number":case"String":return i([c,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const h=[],m=i([u,h],s);for(const _ of mW(s))(e||!ch(yc(s[_])))&&h.push([o(_),o(s[_])]);return m}case f0:return i([u,s.toISOString()],s);case d0:{const{source:h,flags:m}=s;return i([u,{source:h,flags:m}],s)}case h0:{const h=[],m=i([u,h],s);for(const[_,g]of s)(e||!(ch(yc(_))||ch(yc(g))))&&h.push([o(_),o(g)]);return m}case m0:{const h=[],m=i([u,h],s);for(const _ of s)(e||!ch(yc(_)))&&h.push(o(_));return m}}const{message:f}=s;return i([u,{name:c,message:f}],s)};return o},JS=(e,{json:t,lossy:n}={})=>{const r=[];return pW(!(t||n),!!t,new Map,r)(e),r},_m=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ZS(JS(e,t)):structuredClone(e):(e,t)=>ZS(JS(e,t));function _W(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function gW(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function yW(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||_W,r=e.options.footnoteBackLabel||gW,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let c=-1;for(;++c<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[c]);if(!f)continue;const h=e.all(f),m=String(f.identifier).toUpperCase(),_=mu(m.toLowerCase());let g=0;const b=[],E=e.footnoteCounts.get(m);for(;E!==void 0&&++g<=E;){b.length>0&&b.push({type:"text",value:" "});let T=typeof n=="string"?n:n(c,g);typeof T=="string"&&(T={type:"text",value:T}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+_+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,g),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const C=h[h.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const T=C.children[C.children.length-1];T&&T.type==="text"?T.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...b)}else h.push(...b);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+_},children:e.wrap(h,!0)};e.patch(f,w),u.push(w)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{..._m(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
80
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
81
+ `}]}}const sp=(function(e){if(e==null)return wW;if(typeof e=="function")return lp(e);if(typeof e=="object")return Array.isArray(e)?vW(e):bW(e);if(typeof e=="string")return xW(e);throw new Error("Expected function, string, or object as test")});function vW(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=sp(e[n]);return lp(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function bW(e){const t=e;return lp(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function xW(e){return lp(t);function t(n){return n&&n.type===e}}function lp(e){return t;function t(n,r,i){return!!(kW(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function wW(){return!0}function kW(e){return e!==null&&typeof e=="object"&&"type"in e}const _R=[],EW=!0,zv=!1,SW="skip";function gR(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=sp(i),s=r?-1:1;u(e,void 0,[])();function u(c,f,h){const m=c&&typeof c=="object"?c:{};if(typeof m.type=="string"){const g=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(_,"name",{value:"node ("+(c.type+(g?"<"+g+">":""))+")"})}return _;function _(){let g=_R,b,E,C;if((!t||o(c,f,h[h.length-1]||void 0))&&(g=CW(n(c,h)),g[0]===zv))return g;if("children"in c&&c.children){const w=c;if(w.children&&g[0]!==SW)for(E=(r?w.children.length:-1)+s,C=h.concat(w);E>-1&&E<w.children.length;){const T=w.children[E];if(b=u(T,E,C)(),b[0]===zv)return b;E=typeof b[1]=="number"?b[1]:E+s}}return g}}}function CW(e){return Array.isArray(e)?e:typeof e=="number"?[EW,e]:e==null?_R:[e]}function p0(e,t,n,r){let i,o,s;typeof t=="function"&&typeof n!="function"?(o=void 0,s=t,i=n):(o=t,s=n,i=r),gR(e,o,u,i);function u(c,f){const h=f[f.length-1],m=h?h.children.indexOf(c):void 0;return s(c,m,h)}}const Mv={}.hasOwnProperty,TW={};function jW(e,t){const n=t||TW,r=new Map,i=new Map,o=new Map,s={...cW,...n.handlers},u={all:f,applyData:RW,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:c,options:n,patch:AW,wrap:LW};return p0(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const m=h.type==="definition"?r:i,_=String(h.identifier).toUpperCase();m.has(_)||m.set(_,h)}}),u;function c(h,m){const _=h.type,g=u.handlers[_];if(Mv.call(u.handlers,_)&&g)return g(u,h,m);if(u.options.passThrough&&u.options.passThrough.includes(_)){if("children"in h){const{children:E,...C}=h,w=_m(C);return w.children=u.all(h),w}return _m(h)}return(u.options.unknownHandler||NW)(u,h,m)}function f(h){const m=[];if("children"in h){const _=h.children;let g=-1;for(;++g<_.length;){const b=u.one(_[g],h);if(b){if(g&&_[g-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=e2(b.value)),!Array.isArray(b)&&b.type==="element")){const E=b.children[0];E&&E.type==="text"&&(E.value=e2(E.value))}Array.isArray(b)?m.push(...b):m.push(b)}}}return m}}function AW(e,t){e.position&&(t.position=_V(e))}function RW(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,_m(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function NW(e,t){const n=t.data||{},r="value"in t&&!(Mv.call(n,"hProperties")||Mv.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function LW(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
82
+ `});++r<e.length;)r&&n.push({type:"text",value:`
83
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
84
+ `}),n}function e2(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function t2(e,t){const n=jW(e,t),r=n.one(e,void 0),i=yW(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
85
+ `},i),o}function zW(e,t){return e&&"run"in e?async function(n,r){const i=t2(n,{file:r,...t});await e.run(i,r)}:function(n,r){return t2(n,{file:r,...e||t})}}function n2(e){if(e)throw e}var ty,r2;function MW(){if(r2)return ty;r2=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},o=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var h=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!h&&!m)return!1;var _;for(_ in f);return typeof _>"u"||e.call(f,_)},s=function(f,h){n&&h.name==="__proto__"?n(f,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):f[h.name]=h.newValue},u=function(f,h){if(h==="__proto__")if(e.call(f,h)){if(r)return r(f,h).value}else return;return f[h]};return ty=function c(){var f,h,m,_,g,b,E=arguments[0],C=1,w=arguments.length,T=!1;for(typeof E=="boolean"&&(T=E,E=arguments[1]||{},C=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});C<w;++C)if(f=arguments[C],f!=null)for(h in f)m=u(E,h),_=u(f,h),E!==_&&(T&&_&&(o(_)||(g=i(_)))?(g?(g=!1,b=m&&i(m)?m:[]):b=m&&o(m)?m:{},s(E,{name:h,newValue:c(T,b,_)})):typeof _<"u"&&s(E,{name:h,newValue:_}));return E},ty}var DW=MW();const ny=Ea(DW);function Dv(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function OW(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);u(null,...i);function u(c,...f){const h=e[++o];let m=-1;if(c){s(c);return}for(;++m<i.length;)(f[m]===null||f[m]===void 0)&&(f[m]=i[m]);i=f,h?qW(h,u)(...f):s(null,...f)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function qW(e,t){let n;return r;function r(...s){const u=e.length>s.length;let c;u&&s.push(i);try{c=e.apply(this,s)}catch(f){const h=f;if(u&&n)throw h;return i(h)}u||(c&&c.then&&typeof c.then=="function"?c.then(o,i):c instanceof Error?i(c):o(c))}function i(s,...u){n||(n=!0,t(s,...u))}function o(s){i(null,s)}}const zi={basename:IW,dirname:PW,extname:$W,join:BW,sep:"/"};function IW(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');jf(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function PW(e){if(jf(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function $W(e){jf(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function BW(...e){let t=-1,n;for(;++t<e.length;)jf(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":UW(n)}function UW(e){jf(e);const t=e.codePointAt(0)===47;let n=GW(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function GW(e,t){let n="",r=0,i=-1,o=0,s=-1,u,c;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else u===46&&o>-1?o++:o=-1}return n}function jf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const FW={cwd:HW};function HW(){return"/"}function Ov(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function VW(e){if(typeof e=="string")e=new URL(e);else if(!Ov(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return XW(e)}function XW(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const ry=["history","path","basename","stem","extname","dirname"];class yR{constructor(t){let n;t?Ov(t)?n={path:t}:typeof t=="string"||YW(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":FW.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ry.length;){const o=ry[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)ry.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?zi.basename(this.path):void 0}set basename(t){ay(t,"basename"),iy(t,"basename"),this.path=zi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?zi.dirname(this.path):void 0}set dirname(t){i2(this.basename,"dirname"),this.path=zi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?zi.extname(this.path):void 0}set extname(t){if(iy(t,"extname"),i2(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=zi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ov(t)&&(t=VW(t)),ay(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?zi.basename(this.path,this.extname):void 0}set stem(t){ay(t,"stem"),iy(t,"stem"),this.path=zi.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Bn(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function iy(e,t){if(e&&e.includes(zi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+zi.sep+"`")}function ay(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function i2(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function YW(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const WW=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),KW={}.hasOwnProperty;class _0 extends WW{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=OW()}copy(){const t=new _0;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ny(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ly("data",this.frozen),this.namespace[t]=n,this):KW.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ly("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=fh(t),r=this.parser||this.Parser;return oy("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),oy("process",this.parser||this.Parser),sy("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const u=fh(t),c=r.parse(u);r.run(c,u,function(h,m,_){if(h||!m||!_)return f(h);const g=m,b=r.stringify(g,_);JW(b)?_.value=b:_.result=b,f(h,_)});function f(h,m){h||!m?s(h):o?o(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),oy("processSync",this.parser||this.Parser),sy("processSync",this.compiler||this.Compiler),this.process(t,i),o2("processSync","process",n),r;function i(o,s){n=!0,n2(o),r=s}}run(t,n,r){a2(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,u){const c=fh(n);i.run(t,c,f);function f(h,m,_){const g=m||t;h?u(h):s?s(g):r(void 0,g,_)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),o2("runSync","run",r),i;function o(s,u){n2(s),i=u,r=!0}}stringify(t,n){this.freeze();const r=fh(n),i=this.compiler||this.Compiler;return sy("stringify",i),a2(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(ly("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(f){if(typeof f=="function")c(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[h,...m]=f;c(h,m)}else s(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function s(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(f.plugins),f.settings&&(i.settings=ny(!0,i.settings,f.settings))}function u(f){let h=-1;if(f!=null)if(Array.isArray(f))for(;++h<f.length;){const m=f[h];o(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function c(f,h){let m=-1,_=-1;for(;++m<r.length;)if(r[m][0]===f){_=m;break}if(_===-1)r.push([f,...h]);else if(h.length>0){let[g,...b]=h;const E=r[_][1];Dv(E)&&Dv(g)&&(g=ny(!0,E,g)),r[_]=[f,g,...b]}}}}const QW=new _0().freeze();function oy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function sy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ly(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function a2(e){if(!Dv(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function o2(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function fh(e){return ZW(e)?e:new yR(e)}function ZW(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function JW(e){return typeof e=="string"||eK(e)}function eK(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const tK="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",s2=[],l2={allowDangerousHtml:!0},nK=/^(https?|ircs?|mailto|xmpp)$/i,rK=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function iK(e){const t=aK(e),n=oK(e);return sK(t.runSync(t.parse(n),n),e)}function aK(e){const t=e.rehypePlugins||s2,n=e.remarkPlugins||s2,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...l2}:l2;return QW().use(IY).use(n).use(zW,r).use(t)}function oK(e){const t=e.children||"",n=new yR;return typeof t=="string"&&(n.value=t),n}function sK(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,u=t.unwrapDisallowed,c=t.urlTransform||vR;for(const h of rK)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+tK+h.id,void 0);return p0(e,f),xV(e,{Fragment:y.Fragment,components:i,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function f(h,m,_){if(h.type==="raw"&&_&&typeof m=="number")return s?_.children.splice(m,1):_.children[m]={type:"text",value:h.value},m;if(h.type==="element"){let g;for(g in Zg)if(Object.hasOwn(Zg,g)&&Object.hasOwn(h.properties,g)){const b=h.properties[g],E=Zg[g];(E===null||E.includes(h.tagName))&&(h.properties[g]=c(String(b||""),g,h))}}if(h.type==="element"){let g=n?!n.includes(h.tagName):o?o.includes(h.tagName):!1;if(!g&&r&&typeof m=="number"&&(g=!r(h,m,_)),g&&_&&typeof m=="number")return u&&h.children?_.children.splice(m,1,...h.children):_.children.splice(m,1),m}}}function vR(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||nK.test(e.slice(0,t))?e:""}function gm(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function lK(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function uK(e,t,n){const i=sp((n||{}).ignore||[]),o=cK(t);let s=-1;for(;++s<o.length;)gR(e,"text",u);function u(f,h){let m=-1,_;for(;++m<h.length;){const g=h[m],b=_?_.children:void 0;if(i(g,b?b.indexOf(g):void 0,_))return;_=g}if(_)return c(f,h)}function c(f,h){const m=h[h.length-1],_=o[s][0],g=o[s][1];let b=0;const C=m.children.indexOf(f);let w=!1,T=[];_.lastIndex=0;let k=_.exec(f.value);for(;k;){const S=k.index,z={index:k.index,input:k.input,stack:[...h,f]};let R=g(...k,z);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?_.lastIndex=S+1:(b!==S&&T.push({type:"text",value:f.value.slice(b,S)}),Array.isArray(R)?T.push(...R):R&&T.push(R),b=S+k[0].length,w=!0),!_.global)break;k=_.exec(f.value)}return w?(b<f.value.length&&T.push({type:"text",value:f.value.slice(b)}),m.children.splice(C,1,...T)):T=[f],C+T.length}}function cK(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([fK(i[0]),dK(i[1])])}return t}function fK(e){return typeof e=="string"?new RegExp(lK(e),"g"):e}function dK(e){return typeof e=="function"?e:function(){return e}}const uy="phrasing",cy=["autolink","link","image","label"];function hK(){return{transforms:[bK],enter:{literalAutolink:pK,literalAutolinkEmail:fy,literalAutolinkHttp:fy,literalAutolinkWww:fy},exit:{literalAutolink:vK,literalAutolinkEmail:yK,literalAutolinkHttp:_K,literalAutolinkWww:gK}}}function mK(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:uy,notInConstruct:cy},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:uy,notInConstruct:cy},{character:":",before:"[ps]",after:"\\/",inConstruct:uy,notInConstruct:cy}]}}function pK(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function fy(e){this.config.enter.autolinkProtocol.call(this,e)}function _K(e){this.config.exit.autolinkProtocol.call(this,e)}function gK(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function yK(e){this.config.exit.autolinkEmail.call(this,e)}function vK(e){this.exit(e)}function bK(e){uK(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,xK],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),wK]],{ignore:["link","linkReference"]})}function xK(e,t,n,r,i){let o="";if(!bR(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!kK(n)))return!1;const s=EK(n+r);if(!s[0])return!1;const u={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[u,{type:"text",value:s[1]}]:u}function wK(e,t,n,r){return!bR(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function kK(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function EK(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=gm(e,"(");let o=gm(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function bR(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ls(n)||ip(n))&&(!t||n!==47)}xR.peek=zK;function SK(){this.buffer()}function CK(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function TK(){this.buffer()}function jK(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function AK(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ui(this.sliceSerialize(e)).toLowerCase(),n.label=t}function RK(e){this.exit(e)}function NK(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ui(this.sliceSerialize(e)).toLowerCase(),n.label=t}function LK(e){this.exit(e)}function zK(){return"["}function xR(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteReference"),u=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),u(),s(),o+=i.move("]"),o}function MK(){return{enter:{gfmFootnoteCallString:SK,gfmFootnoteCall:CK,gfmFootnoteDefinitionLabelString:TK,gfmFootnoteDefinition:jK},exit:{gfmFootnoteCallString:AK,gfmFootnoteCall:RK,gfmFootnoteDefinitionLabelString:NK,gfmFootnoteDefinition:LK}}}function DK(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:xR},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,s){const u=o.createTracker(s);let c=u.move("[^");const f=o.enter("footnoteDefinition"),h=o.enter("label");return c+=u.move(o.safe(o.associationId(r),{before:c,after:"]"})),h(),c+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),c+=u.move((t?`
86
+ `:" ")+o.indentLines(o.containerFlow(r,u.current()),t?wR:OK))),f(),c}}function OK(e,t,n){return t===0?e:wR(e,t,n)}function wR(e,t,n){return(n?"":" ")+e}const qK=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];kR.peek=UK;function IK(){return{canContainEols:["delete"],enter:{strikethrough:$K},exit:{strikethrough:BK}}}function PK(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:qK}],handlers:{delete:kR}}}function $K(e){this.enter({type:"delete",children:[]},e)}function BK(e){this.exit(e)}function kR(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function UK(){return"~"}function GK(e){return e.length}function FK(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||GK,o=[],s=[],u=[],c=[];let f=0,h=-1;for(;++h<e.length;){const E=[],C=[];let w=-1;for(e[h].length>f&&(f=e[h].length);++w<e[h].length;){const T=HK(e[h][w]);if(n.alignDelimiters!==!1){const k=i(T);C[w]=k,(c[w]===void 0||k>c[w])&&(c[w]=k)}E.push(T)}s[h]=E,u[h]=C}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)o[m]=u2(r[m]);else{const E=u2(r);for(;++m<f;)o[m]=E}m=-1;const _=[],g=[];for(;++m<f;){const E=o[m];let C="",w="";E===99?(C=":",w=":"):E===108?C=":":E===114&&(w=":");let T=n.alignDelimiters===!1?1:Math.max(1,c[m]-C.length-w.length);const k=C+"-".repeat(T)+w;n.alignDelimiters!==!1&&(T=C.length+T+w.length,T>c[m]&&(c[m]=T),g[m]=T),_[m]=k}s.splice(1,0,_),u.splice(1,0,g),h=-1;const b=[];for(;++h<s.length;){const E=s[h],C=u[h];m=-1;const w=[];for(;++m<f;){const T=E[m]||"";let k="",S="";if(n.alignDelimiters!==!1){const z=c[m]-(C[m]||0),R=o[m];R===114?k=" ".repeat(z):R===99?z%2?(k=" ".repeat(z/2+.5),S=" ".repeat(z/2-.5)):(k=" ".repeat(z/2),S=k):S=" ".repeat(z)}n.delimiterStart!==!1&&!m&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&T==="")&&(n.delimiterStart!==!1||m)&&w.push(" "),n.alignDelimiters!==!1&&w.push(k),w.push(T),n.alignDelimiters!==!1&&w.push(S),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&w.push("|")}b.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return b.join(`
87
+ `)}function HK(e){return e==null?"":String(e)}function u2(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const c2={}.hasOwnProperty;function VK(e,t){const n=t||{};function r(i,...o){let s=r.invalid;const u=r.handlers;if(i&&c2.call(i,e)){const c=String(i[e]);s=c2.call(u,c)?u[c]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function XK(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),YK);return i(),s}function YK(e,t,n){return">"+(n?"":" ")+e}function WK(e,t){return f2(e,t.inConstruct,!0)&&!f2(e,t.notInConstruct,!1)}function f2(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function d2(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
88
+ `&&WK(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
89
+ `}function KK(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function QK(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function ZK(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function JK(e,t,n,r){const i=ZK(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(QK(e,n)){const m=n.enter("codeIndented"),_=n.indentLines(o,eQ);return m(),_}const u=n.createTracker(r),c=i.repeat(Math.max(KK(o,i)+1,3)),f=n.enter("codeFenced");let h=u.move(c);if(e.lang){const m=n.enter(`codeFencedLang${s}`);h+=u.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...u.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${s}`);h+=u.move(" "),h+=u.move(n.safe(e.meta,{before:h,after:`
90
+ `,encode:["`"],...u.current()})),m()}return h+=u.move(`
91
+ `),o&&(h+=u.move(o+`
92
+ `)),h+=u.move(c),f(),h}function eQ(e,t,n){return(n?"":" ")+e}function g0(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function tQ(e,t,n,r){const i=g0(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let u=n.enter("label");const c=n.createTracker(r);let f=c.move("[");return f+=c.move(n.safe(n.associationId(e),{before:f,after:"]",...c.current()})),f+=c.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(u=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":`
93
+ `,...c.current()}))),u(),e.title&&(u=n.enter(`title${o}`),f+=c.move(" "+i),f+=c.move(n.safe(e.title,{before:f,after:i,...c.current()})),f+=c.move(i),u()),s(),f}function nQ(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function sf(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ym(e,t,n){const r=ru(e),i=ru(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ER.peek=rQ;function ER(e,t,n,r){const i=nQ(n),o=n.enter("emphasis"),s=n.createTracker(r),u=s.move(i);let c=s.move(n.containerPhrasing(e,{after:i,before:u,...s.current()}));const f=c.charCodeAt(0),h=ym(r.before.charCodeAt(r.before.length-1),f,i);h.inside&&(c=sf(f)+c.slice(1));const m=c.charCodeAt(c.length-1),_=ym(r.after.charCodeAt(0),m,i);_.inside&&(c=c.slice(0,-1)+sf(m));const g=s.move(i);return o(),n.attentionEncodeSurroundingInfo={after:_.outside,before:h.outside},u+c+g}function rQ(e,t,n){return n.options.emphasis||"*"}function iQ(e,t){let n=!1;return p0(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,zv}),!!((!e.depth||e.depth<3)&&l0(e)&&(t.options.setext||n))}function aQ(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(iQ(e,n)){const h=n.enter("headingSetext"),m=n.enter("phrasing"),_=n.containerPhrasing(e,{...o.current(),before:`
94
+ `,after:`
95
+ `});return m(),h(),_+`
96
+ `+(i===1?"=":"-").repeat(_.length-(Math.max(_.lastIndexOf("\r"),_.lastIndexOf(`
97
+ `))+1))}const s="#".repeat(i),u=n.enter("headingAtx"),c=n.enter("phrasing");o.move(s+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
98
+ `,...o.current()});return/^[\t ]/.test(f)&&(f=sf(f.charCodeAt(0))+f.slice(1)),f=f?s+" "+f:s,n.options.closeAtx&&(f+=" "+s),c(),u(),f}SR.peek=oQ;function SR(e){return e.value||""}function oQ(){return"<"}CR.peek=sQ;function CR(e,t,n,r){const i=g0(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let u=n.enter("label");const c=n.createTracker(r);let f=c.move("![");return f+=c.move(n.safe(e.alt,{before:f,after:"]",...c.current()})),f+=c.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(u=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":")",...c.current()}))),u(),e.title&&(u=n.enter(`title${o}`),f+=c.move(" "+i),f+=c.move(n.safe(e.title,{before:f,after:i,...c.current()})),f+=c.move(i),u()),f+=c.move(")"),s(),f}function sQ(){return"!"}TR.peek=lQ;function TR(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const u=n.createTracker(r);let c=u.move("![");const f=n.safe(e.alt,{before:c,after:"]",...u.current()});c+=u.move(f+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const m=n.safe(n.associationId(e),{before:c,after:"]",...u.current()});return s(),n.stack=h,o(),i==="full"||!f||f!==m?c+=u.move(m+"]"):i==="shortcut"?c=c.slice(0,-1):c+=u.move("]"),c}function lQ(){return"!"}jR.peek=uQ;function jR(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],u=n.compilePattern(s);let c;if(s.atBreak)for(;c=u.exec(r);){let f=c.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(c.index+1)}}return i+r+i}function uQ(){return"`"}function AR(e,t){const n=l0(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}RR.peek=cQ;function RR(e,t,n,r){const i=g0(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let u,c;if(AR(e,n)){const h=n.stack;n.stack=[],u=n.enter("autolink");let m=s.move("<");return m+=s.move(n.containerPhrasing(e,{before:m,after:">",...s.current()})),m+=s.move(">"),u(),n.stack=h,m}u=n.enter("link"),c=n.enter("label");let f=s.move("[");return f+=s.move(n.containerPhrasing(e,{before:f,after:"](",...s.current()})),f+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=s.move("<"),f+=s.move(n.safe(e.url,{before:f,after:">",...s.current()})),f+=s.move(">")):(c=n.enter("destinationRaw"),f+=s.move(n.safe(e.url,{before:f,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=n.enter(`title${o}`),f+=s.move(" "+i),f+=s.move(n.safe(e.title,{before:f,after:i,...s.current()})),f+=s.move(i),c()),f+=s.move(")"),u(),f}function cQ(e,t,n){return AR(e,n)?"<":"["}NR.peek=fQ;function NR(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const u=n.createTracker(r);let c=u.move("[");const f=n.containerPhrasing(e,{before:c,after:"]",...u.current()});c+=u.move(f+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const m=n.safe(n.associationId(e),{before:c,after:"]",...u.current()});return s(),n.stack=h,o(),i==="full"||!f||f!==m?c+=u.move(m+"]"):i==="shortcut"?c=c.slice(0,-1):c+=u.move("]"),c}function fQ(){return"["}function y0(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function dQ(e){const t=y0(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function hQ(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function LR(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function mQ(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?hQ(n):y0(n);const u=e.ordered?s==="."?")":".":dQ(n);let c=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),LR(n)===s&&h){let m=-1;for(;++m<e.children.length;){const _=e.children[m];if(_&&_.type==="listItem"&&_.children&&_.children[0]&&_.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(s=u),n.bulletCurrent=s;const f=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),f}function pQ(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function _Q(e,t,n,r){const i=pQ(n);let o=n.bulletCurrent||y0(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const u=n.createTracker(r);u.move(o+" ".repeat(s-o.length)),u.shift(s);const c=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,u.current()),h);return c(),f;function h(m,_,g){return _?(g?"":" ".repeat(s))+m:(g?o:o+" ".repeat(s-o.length))+m}}function gQ(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const yQ=sp(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function vQ(e,t,n,r){return(e.children.some(function(s){return yQ(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function bQ(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}zR.peek=xQ;function zR(e,t,n,r){const i=bQ(n),o=n.enter("strong"),s=n.createTracker(r),u=s.move(i+i);let c=s.move(n.containerPhrasing(e,{after:i,before:u,...s.current()}));const f=c.charCodeAt(0),h=ym(r.before.charCodeAt(r.before.length-1),f,i);h.inside&&(c=sf(f)+c.slice(1));const m=c.charCodeAt(c.length-1),_=ym(r.after.charCodeAt(0),m,i);_.inside&&(c=c.slice(0,-1)+sf(m));const g=s.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:_.outside,before:h.outside},u+c+g}function xQ(e,t,n){return n.options.strong||"*"}function wQ(e,t,n,r){return n.safe(e.value,r)}function kQ(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function EQ(e,t,n){const r=(LR(n)+(n.options.ruleSpaces?" ":"")).repeat(kQ(n));return n.options.ruleSpaces?r.slice(0,-1):r}const MR={blockquote:XK,break:d2,code:JK,definition:tQ,emphasis:ER,hardBreak:d2,heading:aQ,html:SR,image:CR,imageReference:TR,inlineCode:jR,link:RR,linkReference:NR,list:mQ,listItem:_Q,paragraph:gQ,root:vQ,strong:zR,text:wQ,thematicBreak:EQ};function SQ(){return{enter:{table:CQ,tableData:h2,tableHeader:h2,tableRow:jQ},exit:{codeText:AQ,table:TQ,tableData:dy,tableHeader:dy,tableRow:dy}}}function CQ(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function TQ(e){this.exit(e),this.data.inTable=void 0}function jQ(e){this.enter({type:"tableRow",children:[]},e)}function dy(e){this.exit(e)}function h2(e){this.enter({type:"tableCell",children:[]},e)}function AQ(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,RQ));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function RQ(e,t){return t==="|"?t:e}function NQ(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
99
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:_,table:s,tableCell:c,tableRow:u}};function s(g,b,E,C){return f(h(g,E,C),g.align)}function u(g,b,E,C){const w=m(g,E,C),T=f([w]);return T.slice(0,T.indexOf(`
100
+ `))}function c(g,b,E,C){const w=E.enter("tableCell"),T=E.enter("phrasing"),k=E.containerPhrasing(g,{...C,before:o,after:o});return T(),w(),k}function f(g,b){return FK(g,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function h(g,b,E){const C=g.children;let w=-1;const T=[],k=b.enter("table");for(;++w<C.length;)T[w]=m(C[w],b,E);return k(),T}function m(g,b,E){const C=g.children;let w=-1;const T=[],k=b.enter("tableRow");for(;++w<C.length;)T[w]=c(C[w],g,b,E);return k(),T}function _(g,b,E){let C=MR.inlineCode(g,b,E);return E.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function LQ(){return{exit:{taskListCheckValueChecked:m2,taskListCheckValueUnchecked:m2,paragraph:MQ}}}function zQ(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:DQ}}}function m2(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function MQ(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++o<i.length;){const u=i[o];if(u.type==="paragraph"){s=u;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function DQ(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);o&&u.move(s);let c=MR.listItem(e,t,n,{...r,...u.current()});return o&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),c;function f(h){return h+s}}function OQ(){return[hK(),MK(),IK(),SQ(),LQ()]}function qQ(e){return{extensions:[mK(),DK(e),PK(),NQ(e),zQ()]}}const IQ={tokenize:FQ,partial:!0},DR={tokenize:HQ,partial:!0},OR={tokenize:VQ,partial:!0},qR={tokenize:XQ,partial:!0},PQ={tokenize:YQ,partial:!0},IR={name:"wwwAutolink",tokenize:UQ,previous:$R},PR={name:"protocolAutolink",tokenize:GQ,previous:BR},Ca={name:"emailAutolink",tokenize:BQ,previous:UR},Ii={};function $Q(){return{text:Ii}}let cs=48;for(;cs<123;)Ii[cs]=Ca,cs++,cs===58?cs=65:cs===91&&(cs=97);Ii[43]=Ca;Ii[45]=Ca;Ii[46]=Ca;Ii[95]=Ca;Ii[72]=[Ca,PR];Ii[104]=[Ca,PR];Ii[87]=[Ca,IR];Ii[119]=[Ca,IR];function BQ(e,t,n){const r=this;let i,o;return s;function s(m){return!qv(m)||!UR.call(r,r.previous)||v0(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(m))}function u(m){return qv(m)?(e.consume(m),u):m===64?(e.consume(m),c):n(m)}function c(m){return m===46?e.check(PQ,h,f)(m):m===45||m===95||Pn(m)?(o=!0,e.consume(m),c):h(m)}function f(m){return e.consume(m),i=!0,c}function h(m){return o&&i&&Xn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function UQ(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!$R.call(r,r.previous)||v0(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(IQ,e.attempt(DR,e.attempt(OR,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function GQ(e,t,n){const r=this;let i="",o=!1;return s;function s(m){return(m===72||m===104)&&BR.call(r,r.previous)&&!v0(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(m),e.consume(m),u):n(m)}function u(m){if(Xn(m)&&i.length<5)return i+=String.fromCodePoint(m),e.consume(m),u;if(m===58){const _=i.toLowerCase();if(_==="http"||_==="https")return e.consume(m),c}return n(m)}function c(m){return m===47?(e.consume(m),o?f:(o=!0,c)):n(m)}function f(m){return m===null||mm(m)||zt(m)||Ls(m)||ip(m)?n(m):e.attempt(DR,e.attempt(OR,h),n)(m)}function h(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function FQ(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),o):n(s)}function o(s){return s===null?n(s):t(s)}}function HQ(e,t,n){let r,i,o;return s;function s(f){return f===46||f===95?e.check(qR,c,u)(f):f===null||zt(f)||Ls(f)||f!==45&&ip(f)?c(f):(o=!0,e.consume(f),s)}function u(f){return f===95?r=!0:(i=r,r=void 0),e.consume(f),s}function c(f){return i||r||!o?n(f):t(f)}}function VQ(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(qR,t,o)(s):s===null||zt(s)||Ls(s)?t(s):(e.consume(s),i)}function o(s){return s===41&&r++,e.consume(s),i}}function XQ(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),o):u===93?(e.consume(u),i):u===60||u===null||zt(u)||Ls(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||zt(u)||Ls(u)?t(u):r(u)}function o(u){return Xn(u)?s(u):n(u)}function s(u){return u===59?(e.consume(u),r):Xn(u)?(e.consume(u),s):n(u)}}function YQ(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return Pn(o)?n(o):t(o)}}function $R(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||zt(e)}function BR(e){return!Xn(e)}function UR(e){return!(e===47||qv(e))}function qv(e){return e===43||e===45||e===46||e===95||Pn(e)}function v0(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const WQ={tokenize:rZ,partial:!0};function KQ(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:eZ,continuation:{tokenize:tZ},exit:nZ}},text:{91:{name:"gfmFootnoteCall",tokenize:JQ},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:QQ,resolveTo:ZQ}}}}function QQ(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){s=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return u;function u(c){if(!s||!s._balanced)return n(c);const f=ui(r.sliceSerialize({start:s.end,end:r.now()}));return f.codePointAt(0)!==94||!o.includes(f.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function ZQ(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function JQ(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return u;function u(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),c}function c(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(o>999||m===93&&!s||m===null||m===91||zt(m))return n(m);if(m===93){e.exit("chunkString");const _=e.exit("gfmFootnoteCallString");return i.includes(ui(r.sliceSerialize(_)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return zt(m)||(s=!0),o++,e.consume(m),m===92?h:f}function h(m){return m===91||m===92||m===93?(e.consume(m),o++,f):f(m)}}function eZ(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,u;return c;function c(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(b)}function h(b){if(s>999||b===93&&!u||b===null||b===91||zt(b))return n(b);if(b===93){e.exit("chunkString");const E=e.exit("gfmFootnoteDefinitionLabelString");return o=ui(r.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),_}return zt(b)||(u=!0),s++,e.consume(b),b===92?m:h}function m(b){return b===91||b===92||b===93?(e.consume(b),s++,h):h(b)}function _(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(o)||i.push(o),dt(e,g,"gfmFootnoteDefinitionWhitespace")):n(b)}function g(b){return t(b)}}function tZ(e,t,n){return e.check(Tf,t,e.attempt(WQ,t,n))}function nZ(e){e.exit("gfmFootnoteDefinition")}function rZ(e,t,n){const r=this;return dt(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(o):n(o)}}function iZ(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,u){let c=-1;for(;++c<s.length;)if(s[c][0]==="enter"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._close){let f=c;for(;f--;)if(s[f][0]==="exit"&&s[f][1].type==="strikethroughSequenceTemporary"&&s[f][1]._open&&s[c][1].end.offset-s[c][1].start.offset===s[f][1].end.offset-s[f][1].start.offset){s[c][1].type="strikethroughSequence",s[f][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},s[f][1].start),end:Object.assign({},s[c][1].end)},m={type:"strikethroughText",start:Object.assign({},s[f][1].end),end:Object.assign({},s[c][1].start)},_=[["enter",h,u],["enter",s[f][1],u],["exit",s[f][1],u],["enter",m,u]],g=u.parser.constructs.insideSpan.null;g&&gr(_,_.length,0,ap(g,s.slice(f+1,c),u)),gr(_,_.length,0,[["exit",m,u],["enter",s[c][1],u],["exit",s[c][1],u],["exit",h,u]]),gr(s,f-1,c-f+3,_),c=f+_.length-2;break}}for(c=-1;++c<s.length;)s[c][1].type==="strikethroughSequenceTemporary"&&(s[c][1].type="data");return s}function o(s,u,c){const f=this.previous,h=this.events;let m=0;return _;function _(b){return f===126&&h[h.length-1][1].type!=="characterEscape"?c(b):(s.enter("strikethroughSequenceTemporary"),g(b))}function g(b){const E=ru(f);if(b===126)return m>1?c(b):(s.consume(b),m++,g);if(m<2&&!n)return c(b);const C=s.exit("strikethroughSequenceTemporary"),w=ru(b);return C._open=!w||w===2&&!!E,C._close=!E||E===2&&!!w,u(b)}}}class aZ{constructor(){this.map=[]}add(t,n,r){oZ(this,t,n,r)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function oZ(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function sZ(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function lZ(){return{flow:{null:{name:"table",tokenize:uZ,resolveAll:cZ}}}}function uZ(e,t,n){const r=this;let i=0,o=0,s;return u;function u(I){let U=r.events.length-1;for(;U>-1;){const $=r.events[U][1].type;if($==="lineEnding"||$==="linePrefix")U--;else break}const G=U>-1?r.events[U][1].type:null,q=G==="tableHead"||G==="tableRow"?R:c;return q===R&&r.parser.lazy[r.now().line]?n(I):q(I)}function c(I){return e.enter("tableHead"),e.enter("tableRow"),f(I)}function f(I){return I===124||(s=!0,o+=1),h(I)}function h(I){return I===null?n(I):Xe(I)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),g):n(I):st(I)?dt(e,h,"whitespace")(I):(o+=1,s&&(s=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),s=!0,h):(e.enter("data"),m(I)))}function m(I){return I===null||I===124||zt(I)?(e.exit("data"),h(I)):(e.consume(I),I===92?_:m)}function _(I){return I===92||I===124?(e.consume(I),m):m(I)}function g(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),s=!1,st(I)?dt(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):b(I))}function b(I){return I===45||I===58?C(I):I===124?(s=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),E):z(I)}function E(I){return st(I)?dt(e,C,"whitespace")(I):C(I)}function C(I){return I===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),w):I===45?(o+=1,w(I)):I===null||Xe(I)?S(I):z(I)}function w(I){return I===45?(e.enter("tableDelimiterFiller"),T(I)):z(I)}function T(I){return I===45?(e.consume(I),T):I===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(I))}function k(I){return st(I)?dt(e,S,"whitespace")(I):S(I)}function S(I){return I===124?b(I):I===null||Xe(I)?!s||i!==o?z(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):z(I)}function z(I){return n(I)}function R(I){return e.enter("tableRow"),M(I)}function M(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),M):I===null||Xe(I)?(e.exit("tableRow"),t(I)):st(I)?dt(e,M,"whitespace")(I):(e.enter("data"),X(I))}function X(I){return I===null||I===124||zt(I)?(e.exit("data"),M(I)):(e.consume(I),I===92?F:X)}function F(I){return I===92||I===124?(e.consume(I),X):X(I)}}function cZ(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],u=!1,c=0,f,h,m;const _=new aZ;for(;++n<e.length;){const g=e[n],b=g[1];g[0]==="enter"?b.type==="tableHead"?(u=!1,c!==0&&(p2(_,t,c,f,h),h=void 0,c=0),f={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},_.add(n,0,[["enter",f,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,m=void 0,o=[0,0,0,0],s=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},_.add(n,0,[["enter",h,t]])),i=b.type==="tableDelimiterRow"?2:h?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],m=dh(_,t,o,i,void 0,m),o=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],m=dh(_,t,o,i,void 0,m)),o=s,s=[o[1],n,0,0])):b.type==="tableHead"?(u=!0,c=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(c=n,o[1]!==0?(s[0]=s[1],m=dh(_,t,o,i,n,m)):s[1]!==0&&(m=dh(_,t,s,i,n,m)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(c!==0&&p2(_,t,c,f,h),_.consume(t.events),n=-1;++n<t.events.length;){const g=t.events[n];g[0]==="enter"&&g[1].type==="table"&&(g[1]._align=sZ(t.events,n))}return e}function dh(e,t,n,r,i,o){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(o.end=Object.assign({},Dl(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const c=Dl(t.events,n[1]);if(o={type:s,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const f=Dl(t.events,n[2]),h=Dl(t.events,n[3]),m={type:u,start:Object.assign({},f),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const _=t.events[n[2]],g=t.events[n[3]];if(_[1].end=Object.assign({},g[1].end),_[1].type="chunkText",_[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,E=n[3]-n[2]-1;e.add(b,E,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return i!==void 0&&(o.end=Object.assign({},Dl(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function p2(e,t,n,r,i){const o=[],s=Dl(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function Dl(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const fZ={name:"tasklistCheck",tokenize:hZ};function dZ(){return{text:{91:fZ}}}function hZ(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),o)}function o(c){return zt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),s):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),s):n(c)}function s(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(c)}function u(c){return Xe(c)?t(c):st(c)?e.check({tokenize:mZ},t,n)(c):n(c)}}function mZ(e,t,n){return dt(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function pZ(e){return ZA([$Q(),KQ(),iZ(e),lZ(),dZ()])}const _Z={};function gZ(e){const t=this,n=e||_Z,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(pZ(n)),o.push(OQ()),s.push(qQ(n))}const _2=420,yZ=["p","strong","em","a","code","br","ul","ol","li"];function vm({markdown:e,sourceFilePath:t,sourceAnchor:n,variant:r="detail",scrollToAnchor:i}){const o=Iv(t),s=wZ(vZ(e)),u=r==="preview"?xZ(s):s.trim(),c=K.useMemo(()=>jZ({variant:r}),[r]);return K.useEffect(()=>{if(!i)return;const f=window.requestAnimationFrame(()=>{var h;(h=document.getElementById(i))==null||h.scrollIntoView({behavior:"smooth"})});return()=>window.cancelAnimationFrame(f)},[u,i]),u?y.jsx(_8,{variant:r,children:y.jsx(iK,{remarkPlugins:[gZ],skipHtml:!0,unwrapDisallowed:r==="preview",allowedElements:r==="preview"?yZ:void 0,urlTransform:f=>bZ(f,{sourceFilePath:t,sourceHtmlPath:o}),components:c,children:u})}):y.jsx(Bm,{inline:!0,tone:"empty",children:"-"})}function vZ(e){var r;const n=e.replace(/^\uFEFF/,"").split(/\r?\n/);if(((r=n[0])==null?void 0:r.trim())!=="---")return e;for(let i=1;i<n.length;i+=1)if(n[i].trim()==="---"){const o=n.slice(1,i).join(`
101
+ `);return/^[A-Za-z0-9_-]+\s*:/m.test(o)?n.slice(i+1).join(`
102
+ `).replace(/^\s+/,""):e}return e}function bZ(e,t){const n=vR(e);if(!n)return"";if(GR(n)||n.startsWith("/")||n.startsWith("#/"))return n;const r=EZ(t.sourceHtmlPath||Iv(t.sourceFilePath));if(n.startsWith("#")||n.startsWith("?"))return r?`${r}${n}`:n;const{path:i,suffix:o}=SZ(n);if(!i)return`${r}${o}`;const s=TZ(CZ(t.sourceFilePath),i);return s.toLowerCase().endsWith(".md")?`${Iv(s)}${o}`:`${s}${o}`}function xZ(e){const t=e.trim().replace(/\s+/g," ");return t.length>_2?`${t.slice(0,_2).trimEnd()}...`:t}function wZ(e){return kZ(e)}function kZ(e){return e.replace(/^\s*#\s+Elements?\s*(?:\r?\n)+/i,"")}function Iv(e){return`#/content/${e}`}function GR(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function EZ(e){return GR(e)?"":e}function SZ(e){const t=e.indexOf("#"),n=e.indexOf("?"),r=t===-1?n:n===-1?t:Math.min(t,n);return r===-1?{path:e,suffix:""}:{path:e.slice(0,r),suffix:e.slice(r)}}function CZ(e){const t=e.lastIndexOf("/");return t===-1?"":e.slice(0,t)}function TZ(e,t){const n=`${e?`${e}/`:""}${t}`.split("/"),r=[];for(const i of n)if(!(!i||i===".")){if(i===".."){r.length>0?r.pop():r.push(i);continue}r.push(i)}return r.join("/")}function jZ({variant:e}){return{a({href:n,children:r,node:i,...o}){const s=!!(n&&/^[a-z][a-z0-9+.-]*:/i.test(n));return y.jsx("a",{...o,href:n,target:s?"_blank":void 0,rel:s?"noreferrer":void 0,children:r})},table({children:n,node:r,...i}){return y.jsx("div",{className:f8,children:y.jsx("table",{...i,children:n})})},img({src:n,alt:r,node:i,...o}){return n?y.jsx("img",{...o,src:n,alt:r??""}):null},h1({children:n,node:r,...i}){return y.jsx("h1",{id:mh(n),...i,children:n})},h2({children:n,node:r,...i}){return y.jsx("h2",{id:mh(n),...i,children:n})},h3({children:n,node:r,...i}){return y.jsx("h3",{id:mh(n),...i,children:n})},h4({children:n,node:r,...i}){return y.jsx("h4",{id:mh(n),...i,children:n})},pre({children:n,node:r,...i}){const o=AZ(n);return o&&e==="detail"&&o.language==="mermaid"?y.jsx(FR,{code:o.code}):o&&e==="detail"&&["d3-tree","d3-sunburst","d3-icicle"].includes(o.language)?y.jsx(PZ,{code:o.code,mode:o.language.replace("d3-","")}):y.jsx("pre",{...i,children:n})},code({className:n,children:r,node:i,...o}){return y.jsx("code",{className:n,...o,children:r})}}}function AZ(e){var i;const t=K.Children.toArray(e)[0];if(!K.isValidElement(t))return null;const n=t,r=((i=/language-([a-z0-9-]+)/i.exec(n.props.className??""))==null?void 0:i[1])??"";return r?{language:r,code:String(n.props.children??"").replace(/\n$/,"")}:null}let hh=null;function RZ(){return window.mermaid?Promise.resolve(window.mermaid):(hh||(hh=J(async()=>{const{default:e}=await import("./explorer-mermaid.core.js").then(t=>t.aV);return{default:e}},[],import.meta.url).then(({default:e})=>(e.initialize({startOnLoad:!1,theme:"neutral",maxTextSize:5e6,maxEdges:5e4,flowchart:{useMaxWidth:!0,htmlLabels:!0,curve:"basis"},securityLevel:"loose",logLevel:"error"}),window.mermaid=e,e)).catch(e=>{throw hh=null,e})),hh)}function FR({code:e,nodeClickTargets:t,onNodeClick:n,onRenderSettled:r}){const i=K.useRef(null),o=K.useId().replace(/[^a-zA-Z0-9_-]/g,""),s=K.useMemo(()=>NZ(e),[e]),[u,c]=K.useState(!1);return K.useEffect(()=>{if(!i.current)return;let f=!1;const h=i.current;let m,_,g=!1;const b=()=>{g||(g=!0,r==null||r())};return h.textContent="",c(!1),RZ().then(E=>f?null:E.render(`reqvire-mermaid-${o}`,s)).then(E=>{var w;if(!E)return;if(f){b();return}const C=typeof E=="string"?E:E.svg;LZ(h,C),c(!1),typeof E!="string"&&((w=E.bindFunctions)==null||w.call(E,h)),_=zZ(h,t,n);try{m=DZ(h)}catch(T){console.warn("[Reqvire Explorer] Mermaid interaction setup failed",T)}b()}).catch(E=>{if(f){b();return}console.warn("[Reqvire Explorer] Mermaid render failed",E),c(!0),b()}),()=>{f=!0,m==null||m(),_==null||_(),b()}},[t,n,r,s,o]),y.jsxs(y.Fragment,{children:[y.jsx("div",{ref:i,className:"mermaid",hidden:u}),u?y.jsx(C1,{"data-diagram-kind":"fallback",children:y.jsx(Bm,{children:"Unable to render Mermaid diagram."})}):null]})}function NZ(e){return B6(e)}function LZ(e,t){const n=document.createElement("template");n.innerHTML=t.trim();const r=n.content.querySelector("svg");if(!r)throw new Error("Mermaid did not return an SVG document");e.replaceChildren(document.importNode(r,!0))}function zZ(e,t,n){if(!t||t.size===0||!n)return;const r=e.querySelector("svg");if(!(r instanceof SVGSVGElement))return;const i=[...r.querySelectorAll(".node")],o=[];for(const[c,f]of t.entries())for(const h of i)MZ(h,c)&&(h.dataset.reqvireElementId=f,h.classList.add("is-reqvire-clickable-node"),h.setAttribute("role","link"),h.setAttribute("tabindex","0"),o.push(h));const s=c=>{const f=c.target;if(!(f instanceof Element))return;const h=f.closest("[data-reqvire-element-id]"),m=h==null?void 0:h.dataset.reqvireElementId;m&&(c.preventDefault(),c.stopPropagation(),n(m))},u=c=>{if(c.key!=="Enter"&&c.key!==" ")return;const f=c.target;if(!(f instanceof Element))return;const h=f.closest("[data-reqvire-element-id]"),m=h==null?void 0:h.dataset.reqvireElementId;m&&(c.preventDefault(),c.stopPropagation(),n(m))};return r.addEventListener("click",s),r.addEventListener("keydown",u),()=>{r.removeEventListener("click",s),r.removeEventListener("keydown",u);for(const c of o)delete c.dataset.reqvireElementId,c.classList.remove("is-reqvire-clickable-node"),c.removeAttribute("role"),c.removeAttribute("tabindex")}}function MZ(e,t){return[e.id,e.getAttribute("data-id"),e.getAttribute("data-node-id")].filter(Boolean).some(r=>r===t||r===`flowchart-${t}`||(r==null?void 0:r.includes(`-${t}-`))||(r==null?void 0:r.includes(t)))}function DZ(e){const t=e.querySelector("svg");if(!(t instanceof SVGSVGElement))return()=>{};e.classList.add("mermaid-interactive");const n=qZ(t);if(!n)return()=>{};const r=48,i={x:n.x-r/2,y:n.y-r/2,width:Math.max(1,n.width+r),height:Math.max(1,n.height+r)};let o={...i},s={...i},u=!1,c=null;const f=()=>{t.setAttribute("viewBox",`${s.x} ${s.y} ${s.width} ${s.height}`)};t.removeAttribute("width"),t.removeAttribute("height"),t.style.maxWidth="none",t.style.width="100%",t.style.height="100%",requestAnimationFrame(()=>{const k=e.clientWidth||720,S=OZ(e),z=S!==null,R=S===null?460:Math.min(260,S),M=S??Math.max(460,window.innerHeight-180),X=Math.ceil(i.height+24),F=Math.min(Math.max(R,X),M),I=i.width>k||X>F;if(e.style.minHeight="0",e.style.height=I?`${F}px`:`${Math.min(Math.max(R,X),M)}px`,z){o={...i},s={...o},f();return}if(I){o={x:i.x,y:i.y,width:Math.min(i.width,Math.max(760,k)),height:Math.min(i.height,F)},s={...o},f();return}o={...i},s={...o},f()});const h=(k,S,z)=>{const R=t.getBoundingClientRect(),M=S===void 0||R.width===0?.5:(S-R.left)/R.width,X=z===void 0||R.height===0?.5:(z-R.top)/R.height,F=g2(s.width*k,o.width/8,i.width*4),I=g2(s.height*k,o.height/8,i.height*4),U=s.x+s.width*M,G=s.y+s.height*X;s={x:U-F*M,y:G-I*X,width:F,height:I},f()},m=(k,S)=>{s={...s,x:s.x+k,y:s.y+S},f()},_=()=>{s={...o},f()},g=document.createElement("div");g.className="diagram-nav-buttons",[["zoom-in","+","Zoom in"],["zoom-out","-","Zoom out"],["reset","Reset","Reset diagram view"],["up","Up","Pan up"],["down","Down","Pan down"],["left","Left","Pan left"],["right","Right","Pan right"]].forEach(([k,S,z])=>{const R=document.createElement("button");R.className="diagram-nav-btn",R.type="button",R.dataset.action=k,R.setAttribute("aria-label",z),R.textContent=S,g.appendChild(R)}),e.appendChild(g);const b=k=>{const S=k.target.closest("[data-action]");if(!S)return;k.preventDefault();const z=s.width*.12,R=s.height*.12;switch(S.dataset.action){case"zoom-in":h(.8);break;case"zoom-out":h(1.25);break;case"reset":_();break;case"up":m(0,-R);break;case"down":m(0,R);break;case"left":m(-z,0);break;case"right":m(z,0);break}},E=k=>{!k.ctrlKey&&!k.metaKey||(k.preventDefault(),h(k.deltaY<0?.88:1.14,k.clientX,k.clientY))},C=k=>{if(k.button!==0)return;const S=k.target;S instanceof Element&&S.closest("[data-reqvire-element-id], a[href]")||(u=!0,c={x:k.clientX,y:k.clientY,viewBox:{...s}},t.setPointerCapture(k.pointerId),e.classList.add("is-panning"))},w=k=>{if(!u||!c)return;const S=t.getBoundingClientRect();if(S.width===0||S.height===0)return;const z=(k.clientX-c.x)/S.width*c.viewBox.width,R=(k.clientY-c.y)/S.height*c.viewBox.height;s={...c.viewBox,x:c.viewBox.x-z,y:c.viewBox.y-R},f()},T=k=>{u=!1,c=null,e.classList.remove("is-panning"),t.hasPointerCapture(k.pointerId)&&t.releasePointerCapture(k.pointerId)};return g.addEventListener("click",b),t.addEventListener("wheel",E,{passive:!1}),t.addEventListener("pointerdown",C),t.addEventListener("pointermove",w),t.addEventListener("pointerup",T),t.addEventListener("pointercancel",T),IZ(t),()=>{g.removeEventListener("click",b),g.remove(),t.removeEventListener("wheel",E),t.removeEventListener("pointerdown",C),t.removeEventListener("pointermove",w),t.removeEventListener("pointerup",T),t.removeEventListener("pointercancel",T)}}function OZ(e){const t=e.closest(".trace-rollup-diagram");if(!(t instanceof HTMLElement))return null;const n=window.getComputedStyle(t),r=Number.parseFloat(n.paddingTop||"0")+Number.parseFloat(n.paddingBottom||"0");return Math.max(1,t.clientHeight-r)}function qZ(e){var n;try{const r=e.getBBox();if(r.width>0&&r.height>0)return r}catch{}const t=(n=e.viewBox)==null?void 0:n.baseVal;return t&&t.width>0&&t.height>0?t:null}function IZ(e){const t=[...e.querySelectorAll(".node")],n=[...e.querySelectorAll("path.flowchart-link, .edges path")],r=()=>{n.forEach(i=>i.classList.remove("edge-highlighted")),t.forEach(i=>{i.style.filter=""})};t.forEach(i=>{i.addEventListener("mouseenter",()=>{r(),i.style.filter="var(--filter-highlight-glow)",n.forEach(o=>o.classList.add("edge-highlighted"))}),i.addEventListener("mouseleave",r)})}function g2(e,t,n){return Math.min(Math.max(e,t),n)}function PZ({code:e,mode:t}){const n=K.useRef(null),r=K.useMemo(()=>BZ(e),[e]);return K.useEffect(()=>{const i=n.current;!i||!r.ok||UZ(i,r.data,t)},[t,r]),r.ok?y.jsx(C1,{"data-diagram-kind":t,children:y.jsx("svg",{ref:n,role:"img","aria-label":`D3 ${t} diagram`})}):y.jsx($Z,{code:e,label:`D3 ${t}`})}function $Z({code:e,label:t}){return y.jsx(C1,{"data-diagram-kind":"fallback",children:y.jsx(Bm,{title:t,children:y.jsx("pre",{children:y.jsx("code",{children:e})})})})}function BZ(e){try{const t=JSON.parse(e);return!t||typeof t!="object"?{ok:!1}:{ok:!0,data:t}}catch{return{ok:!1}}}function UZ(e,t,n){var g;const r=Math.max(680,((g=e.parentElement)==null?void 0:g.clientWidth)??680),i=n==="tree"?460:560,o=nr(e);o.selectAll("*").remove(),o.attr("viewBox",`0 0 ${r} ${i}`).attr("width","100%").attr("height",i);const s=n0(t).sum(b=>b.value??1);if(n==="tree"){const E=RH().size([i-60,r-180])(s),C=o.append("g").attr("transform","translate(80,30)");C.selectAll("path").data(E.links()).join("path").attr("d",QH().x(T=>T.y).y(T=>T.x)).attr("fill","none").attr("stroke",Ve("--edge-default"));const w=C.selectAll("g").data(E.descendants()).join("g").attr("transform",T=>`translate(${T.y},${T.x})`);w.append("circle").attr("r",5).attr("fill",Ve("--accent")),w.append("text").attr("x",9).attr("dy","0.32em").attr("font-size",12).text(T=>GZ(T.data.name??"node",34));return}const u=Math.min(r,i)/2-18,f=EH().size([2*Math.PI,u])(s),h=o.append("g").attr("transform",`translate(${r/2},${i/2})`),m=NA(zH),_=GH().startAngle(b=>b.x0).endAngle(b=>b.x1).innerRadius(b=>n==="sunburst"?b.y0:b.y0*.92).outerRadius(b=>n==="sunburst"?b.y1:b.y1*.92);h.selectAll("path").data(f.descendants().filter(b=>b.depth>0)).join("path").attr("d",_).attr("fill",b=>m(String(b.depth))).attr("stroke",Ve("--bg-surface")).append("title").text(b=>b.ancestors().reverse().map(E=>E.data.name??"node").join(" / ")),h.append("text").attr("text-anchor","middle").attr("font-size",13).attr("font-weight",700).text(t.name??"root")}function mh(e){return String(e).trim().toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-")}function GZ(e,t){return e.length>t?`${e.slice(0,Math.max(1,t-1))}...`:e}function FZ({identifier:e,onClose:t,onOpenElement:n,onOpenOntologyNode:r,onNavigateBack:i,previousElementLabel:o}){var R,M,X;const{store:s,elementById:u}=$n(),c=e?u(e):void 0,f=K.useMemo(()=>new Map(s.resources.map(F=>[F.id,F])),[s.resources]),h=K.useMemo(()=>{var I;const F=new Map;for(const U of((I=s.ontology.graph_data)==null?void 0:I.nodes)??[]){const G={id:U.id,label:U.label||U.full_uri||U.id};F.set(U.full_uri,G),F.set(U.id,G)}return F},[(R=s.ontology.graph_data)==null?void 0:R.nodes]),{relations:m,reused_contract_context:_,conceptRefs:g}=K.useMemo(()=>e?{relations:s.relations.filter(F=>F.source_id===e||F.target_id===e),reused_contract_context:s.reused_contract_context.filter(F=>F.source_id===e),conceptRefs:s.concept_refs.filter(F=>F.source_id===e)}:{relations:[],reused_contract_context:[],conceptRefs:[]},[e,s]),b=K.useMemo(()=>c?m.filter(F=>!nJ(c,F)).map(F=>rJ(F,c.id,u,f)).filter(tJ):[],[c,u,m,f]),E=K.useMemo(()=>_.map(F=>{const I=lJ(F,u,f);return{id:F.id,targetId:F.target,kind:F.target_kind,resourceKind:I.resourceKind,label:I.label,elementType:I.elementType,typeFamily:I.typeFamily,href:I.href,external:I.external}}),[_,u,f]),C=K.useMemo(()=>g.map(F=>{const I=h.get(F.iri);return{id:F.id,label:F.label,iri:F.iri,ontologyNodeId:I==null?void 0:I.id,ontologyLabel:I==null?void 0:I.label}}),[g,h]),w=K.useMemo(()=>{var F,I;return!c||c.element_type!=="concept"&&c.element_type!=="concept-scheme"?null:XZ({element:c,elements:s.elements,ontologyNodes:((F=s.ontology.graph_data)==null?void 0:F.nodes)??[],ontologyEdges:((I=s.ontology.graph_data)==null?void 0:I.edges)??[],conceptRefs:s.concept_refs,elementById:u})},[c,u,s.concept_refs,s.elements,(M=s.ontology.graph_data)==null?void 0:M.edges,(X=s.ontology.graph_data)==null?void 0:X.nodes]),T=F=>{window.location.hash=F},k=e!==null,S=o?u(o):void 0,z=(S==null?void 0:S.name)??o??void 0;return y.jsx(KM,{open:k,onOpenChange:F=>!F&&t(),title:c?c.name:"Element not found",typeFamily:c==null?void 0:c.type_family,elementType:c==null?void 0:c.element_type,showHeaderClose:!!c,sourceHref:c?VZ(c.source_anchor,c.file_path):null,backLabel:z?`Back to ${z}`:void 0,onNavigateBack:i,onOpenSource:T,children:c?w?y.jsx(YM,{metaBadges:y2(c),definition:y.jsx(vm,{markdown:w.definition||c.content,sourceFilePath:c.file_path,sourceAnchor:c.source_anchor}),scheme:w.scheme,altLabels:w.altLabels,scopeNote:w.scopeNote,examples:w.examples,topConcepts:w.topConcepts,broader:w.broader,narrower:w.narrower,related:w.related,exactMatches:w.exactMatches,closeMatches:w.closeMatches,mappedOntologyTerms:w.mappedOntologyTerms,usedByModel:w.usedByModel,relations:b,reused_contract_context:E,conceptReferences:C,onOpenElement:n,onOpenConceptReference:F=>{F.ontologyNodeId&&r(F.ontologyNodeId)},onOpenResource:T}):y.jsx(QM,{metaBadges:y2(c),content:y.jsx(vm,{markdown:c.content,sourceFilePath:c.file_path,sourceAnchor:c.source_anchor}),relations:b,reused_contract_context:E,conceptReferences:C,onOpenElement:n,onOpenConceptReference:F=>{F.ontologyNodeId&&r(F.ontologyNodeId)},onOpenResource:T}):y.jsx(ZM,{identifier:e??""})})}function y2(e){const t=[];for(const[r,i]of Object.entries(e.metadata))r==="type"&&i===e.element_type||t.push({key:r,value:i,provenance:"explicit"});const n=new Set(t.map(r=>r.key.toLowerCase()));for(const[r,i]of Object.entries(e.governance)){if(n.has(r.toLowerCase()))continue;const{value:o,provenance:s}=HZ(i);t.push({key:r,value:o,provenance:s})}return t}function HZ(e){const t=e.match(/^(.*?)\s*\(explicit\)$/);if(t)return{value:t[1].trim(),provenance:"explicit"};const n=e.match(/^(.*?)\s*\(inherited(?:,\s*from\s+[^)]*)?\)$/);return n?{value:n[1].trim(),provenance:"inherited"}:{value:e,provenance:"inherited"}}function VZ(e,t){if(e.startsWith("#/content/"))return e;if(e.startsWith("#"))return`${nf(t)}${e}`;const n=e.indexOf("#"),r=n===-1?e:e.slice(0,n),i=n===-1?"":e.slice(n),o=r.endsWith(".html")?`${r.slice(0,-5)}.md`:r;return`${nf(o||t)}${i}`}function XZ({element:e,elements:t,ontologyNodes:n,ontologyEdges:r,conceptRefs:i,elementById:o}){const s=n.filter(S=>S.semantic_type==="skos-concept"),u=n.filter(S=>S.semantic_type==="skos-concept-scheme"),c=new Map(n.map(S=>[S.id,S]));if(e.element_type==="concept-scheme"){const S=u.find(R=>v2(R,e))??u.find(R=>bm(R)===e.name);if(!S)return{definition:e.content,scheme:null,altLabels:[],scopeNote:"",examples:[],topConcepts:[],broader:[],narrower:[],related:[],exactMatches:[],closeMatches:[],mappedOntologyTerms:[],usedByModel:[]};const z=YZ(S,s,r,c);return{definition:Mc(S,"definition")||e.content||S.comment,scheme:null,altLabels:zc(S,"altLabel"),scopeNote:Mc(S,"scopeNote"),examples:zc(S,"example"),topConcepts:Al(z.map(R=>k(R,t)).filter(eJ)),broader:[],narrower:[],related:[],exactMatches:[],closeMatches:[],mappedOntologyTerms:[],usedByModel:[]}}const f=s.find(S=>v2(S,e))??s.find(S=>bm(S)===e.name),h=new Set(s.map(S=>S.id));if(!f)return{definition:e.content,scheme:null,altLabels:[],scopeNote:"",examples:[],topConcepts:[],broader:[],narrower:[],related:[],exactMatches:[],closeMatches:[],mappedOntologyTerms:[],usedByModel:[]};const m=f.scheme_iri?c.get(f.scheme_iri):void 0,_=[],g=[],b=[],E=[],C=[],w=[];for(const S of r){if(S.label==="broader"){S.source===f.id&&T(_,k(c.get(S.target),t)),S.target===f.id&&T(g,k(c.get(S.source),t));continue}if(S.label==="narrower"){S.source===f.id&&T(g,k(c.get(S.target),t)),S.target===f.id&&T(_,k(c.get(S.source),t));continue}if(S.label==="related"){S.source===f.id&&T(b,k(c.get(S.target),t)),S.target===f.id&&T(b,k(c.get(S.source),t));continue}if(S.label==="exactMatch"){S.source===f.id&&T(E,k(c.get(S.target),t)),S.target===f.id&&T(E,k(c.get(S.source),t));continue}if(S.label==="closeMatch"){S.source===f.id&&T(C,k(c.get(S.target),t)),S.target===f.id&&T(C,k(c.get(S.source),t));continue}if(S.label==="mapsToConcept"||S.label==="mappedFrom"){const z=S.source===f.id,R=S.target===f.id;if(!z&&!R)continue;const M=c.get(z?S.target:S.source);M&&!h.has(M.id)&&w.push({id:`mapped-${f.id}-${M.id}`,label:M.label,iri:M.full_uri||M.id,ontologyNodeId:M.id,ontologyLabel:M.label})}}return{definition:Mc(f,"definition")||e.content||f.comment,scheme:m?k(m,t):null,altLabels:zc(f,"altLabel"),scopeNote:Mc(f,"scopeNote"),examples:zc(f,"example"),topConcepts:[],broader:Al(_),narrower:Al(g),related:Al(b),exactMatches:Al(E),closeMatches:Al(C),mappedOntologyTerms:QZ(w),usedByModel:i.filter(S=>KZ(S.iri,f)).map(S=>o(S.source_id)).filter(ZZ).map(S=>b2(S))};function T(S,z){z&&S.push(z)}function k(S,z){if(!S)return null;const R=WZ(S,z);return R?b2(R):{id:S.id,label:S.label,kind:S.semantic_type||"concept",elementType:S.semantic_type,typeFamily:"concept",href:null,external:!1}}}function YZ(e,t,n,r){const i=new Set,o=new Set;for(const s of n)s.label==="broader"&&o.add(s.source),s.label==="hasTopConcept"&&s.source===e.id&&i.add(s.target),s.label==="topConceptOf"&&s.target===e.id&&i.add(s.source);return i.size>0?[...i].map(s=>r.get(s)).filter(JZ):t.filter(s=>s.scheme_iri===e.id&&!o.has(s.id))}function v2(e,t){return e.sources.some(n=>n.source===t.id)?!0:bm(e)===t.name&&e.sources.some(n=>n.file_path===t.file_path)}function WZ(e,t){var u;const n=bm(e),r=e.semantic_type==="skos-concept-scheme"?"concept-scheme":"concept",i=e.sources.map(c=>c.source).find(c=>t.some(f=>f.id===c&&f.element_type===r));if(i)return t.find(c=>c.id===i);const o=t.filter(c=>c.element_type===r&&c.name===n),s=(u=e.sources[0])==null?void 0:u.file_path;return o.find(c=>c.file_path===s)??(o.length===1?o[0]:void 0)}function b2(e){return{id:e.id,label:e.name,kind:"element",elementType:e.element_type,typeFamily:e.type_family,href:Ef(e.id),external:!1}}function bm(e){return Mc(e,"prefLabel")||e.label}function zc(e,t){return(e.literal_values??[]).filter(n=>n.predicate.endsWith(t)).map(n=>n.value).filter(Boolean)}function Mc(e,t){return zc(e,t)[0]??""}function KZ(e,t){return e===t.full_uri||e===t.id||x2(e)===x2(t.full_uri)}function x2(e){return e.startsWith("concept:")?e.slice(8):e}function Al(e){return Array.from(new Map(e.map(t=>[t.id,t])).values())}function QZ(e){return Array.from(new Map(e.map(t=>[t.ontologyNodeId??t.iri,t])).values())}function ZZ(e){return!!e}function JZ(e){return!!e}function eJ(e){return!!e}function tJ(e){return e!==null}function nJ(e,t){if(e.element_type!=="concept"&&e.element_type!=="concept-scheme"||t.source_id!==e.id&&t.target_id!==e.id)return!1;const n=t.canonical_relation_type||t.relation_type;return["broader","narrower","related","exactMatch","closeMatch"].includes(n)}function rJ(e,t,n,r){return e.source_id===t?{id:e.id,label:e.canonical_relation_type,target:sJ(e,n,r)}:e.target_id===t?{id:e.id,label:iJ(e),target:oJ(e,n)}:null}function iJ(e){return e.source_relation_types.find(t=>t!==e.canonical_relation_type)??aJ(e.relation_type||e.canonical_relation_type)}function aJ(e){return{constrain:"constrainedBy",constrainedBy:"constrain",define:"definedBy",definedBy:"define",derive:"derivedFrom",derivedFrom:"derive",satisfy:"satisfiedBy",satisfiedBy:"satisfy",specify:"specifiedBy",specifiedBy:"specify",use:"usedBy",usedBy:"use",verify:"verifiedBy",verifiedBy:"verify"}[e]??e}function oJ(e,t){const n=t(e.source_id);return{id:e.source_id,label:(n==null?void 0:n.name)??e.source_id,kind:"element",elementType:n==null?void 0:n.element_type,typeFamily:n==null?void 0:n.type_family,href:Ef(e.source_id),external:!1}}function sJ(e,t,n){if(e.target_kind==="element"){const r=t(e.target_id);return{id:e.target_id,label:(r==null?void 0:r.name)??e.target_id,kind:"element",elementType:r==null?void 0:r.element_type,typeFamily:r==null?void 0:r.type_family,href:Ef(e.target_id),external:!1}}if(e.resource_id){const r=n.get(e.resource_id);if(r!=null&&r.external_url)return{id:e.resource_id,label:r.display||r.target,kind:r.kind,href:r.external_url,external:!0};if(r!=null&&r.file_path)return{id:e.resource_id,label:r.display||r.target,kind:r.kind,href:nf(r.file_path),external:!1};if(r)return{id:e.resource_id,label:r.display||r.target,kind:r.kind,href:null,external:!1}}return{id:e.target_id,label:e.target_id,kind:e.target_kind,href:null,external:!1}}function lJ(e,t,n){if(e.target_kind==="element"){const r=t(e.target);return{label:(r==null?void 0:r.name)??e.target,elementType:r==null?void 0:r.element_type,typeFamily:r==null?void 0:r.type_family,href:Ef(e.target),external:!1}}if(e.resource_id){const r=n.get(e.resource_id);if(r)return r.external_url?{label:r.display||r.target,resourceKind:r.kind,href:r.external_url,external:!0}:r.file_path?{label:r.display||r.target,resourceKind:r.kind,href:nf(r.file_path),external:!1}:{label:r.display||r.target,resourceKind:r.kind,href:null,external:!1}}return{label:e.target,href:null,external:!1}}function uJ({nodeId:e,onClose:t}){var u,c;const{store:n}=$n(),r=e?(((u=n.ontology.graph_data)==null?void 0:u.nodes)??[]).find(f=>f.id===e):void 0,i=((c=n.ontology.graph_data)==null?void 0:c.nodes)??[],[o,s]=K.useState(!1);return y.jsx(UD,{open:e!==null,onOpenChange:f=>{f||t()},node:r,nodes:i,missingNodeId:e,copiedUri:o,onCopyUri:f=>{var h;(h=navigator.clipboard)==null||h.writeText(f),s(!0),window.setTimeout(()=>s(!1),1400)},onOpenSource:f=>{f.link&&(window.location.hash=f.link,t())}})}const Pv=["file","element","resource","ontology"],cJ=["cross","verification","trace"],w2=["class","object-property","datatype-property","property","named-individual","datatype","restriction","class-expression","node-shape","property-shape","resource"],fJ=[["layer-authored","Ontologies","authored"],["layer-concepts","Concepts","concepts"],["layer-reqvire-context","Semantic Context","semantic"],["layer-external-source","External Sources","external"]],k2=["layer-authored","layer-concepts","ontology-term","shacl-shape","resource","external-reference","class-membership","class-disjointness","class-expressions","domain-range","subclass","membership","disjoint","equivalence","inverse","property-chain","property-characteristic","class-expression","shape-overlay","authored","registry","construct"],b0=K.createContext(null);function dJ({children:e}){const{store:t}=$n(),n=K.useMemo(()=>Array.from(new Set(t.elements.map(oe=>oe.element_type).filter(Boolean))).sort(),[t.elements]),r=K.useMemo(()=>Array.from(new Set((t.knowledge_graph.nodes??[]).map(oe=>oe.element_type||oe.node_type||oe.type||"other").filter(Boolean))).sort(),[t.knowledge_graph.nodes]),[i,o]=K.useState("grid"),[s,u]=K.useState("__root__"),[c,f]=K.useState(""),[h,m]=K.useState(()=>new Set(r)),[_,g]=K.useState(()=>new Set(cJ)),[b,E]=K.useState(()=>new Set(w2)),[C,w]=K.useState(()=>new Set(k2)),[T,k]=K.useState(0),[S,z]=K.useState(()=>new Set(Pv)),[R,M]=K.useState(()=>new Set(n)),[X,F]=K.useState(null),[I,U]=K.useState(null),[G,q]=K.useState(null),[$,Z]=K.useState(""),[A,N]=K.useState("overview"),[H,Q]=K.useState(null),[D,B]=K.useState(null),[ee,O]=K.useState(""),ie=K.useMemo(()=>({modelMode:i,setModelMode:o,modelSelectionId:s,setModelSelectionId:u,modelTreeQuery:c,setModelTreeQuery:f,modelTypes:h,toggleModelType:oe=>m(me=>Rl(me,oe)),resetModelTypes:()=>m(new Set(r)),modelOverlays:_,toggleModelOverlay:oe=>g(me=>Rl(me,oe)),ontologyRoles:b,toggleOntologyRole:oe=>E(me=>Rl(me,oe)),resetOntologyRoles:()=>E(new Set(w2)),ontologyFilters:C,toggleOntologyFilter:oe=>w(me=>Rl(me,oe)),resetOntologyFilters:()=>w(new Set(k2)),ontologyLayoutNonce:T,resetOntologyLayout:()=>k(oe=>oe+1),searchKinds:S,toggleSearchKind:oe=>z(me=>Rl(me,oe)),searchElementTypes:R,toggleSearchElementType:oe=>M(me=>Rl(me,oe)),resetSearchKinds:()=>{z(new Set(Pv)),M(new Set(n))},knowledgeGraphSelectionId:X,setKnowledgeGraphSelectionId:F,ontologySelectionId:I,setOntologySelectionId:U,thesaurusSelectionId:G,setThesaurusSelectionId:q,thesaurusQuery:$,setThesaurusQuery:Z,coverageSectionId:A,setCoverageSectionId:N,traceFilePath:H,setTraceFilePath:Q,traceSelectionId:D,setTraceSelectionId:B,traceTreeQuery:ee,setTraceTreeQuery:O}),[X,I,G,$,A,H,D,ee,i,s,c,_,r,h,C,T,b,S,R,n]);return y.jsx(b0.Provider,{value:ie,children:e})}function An(){const e=K.useContext(b0);if(!e)throw new Error("Explorer UI state is missing");return e}function hJ(){return K.useContext(b0)}function Rl(e,t){const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function E2(e){return e.type_family==="verification"||e.element_type.toLowerCase().includes("verification")}function HR(e){var s;const t=((s=e.traces)==null?void 0:s.files)??{},n=Object.entries(t).sort((u,c)=>u[0].localeCompare(c[0]));if(n.length>0)return n.map(([u,c])=>({file:u,verifications:(c.verifications??[]).map(f=>({id:f.identifier,name:f.name,file:f.file||u,directCount:f.directly_verified_count??0,totalCount:f.total_requirements_in_tree??0,requirementIds:f.directly_verified_requirements??[],traceTree:f.trace_tree,verificationType:f.type}))}));const r=new Map(e.elements.map(u=>[u.id,u])),i=new Map;for(const u of e.relations){if(!(u.canonical_relation_type||u.relation_type||"").toLowerCase().includes("verify"))continue;const f=r.get(u.source_id),h=r.get(u.target_id);if(!f||!h||!E2(f))continue;const m=i.get(f.id)??[];m.push(h.id),i.set(f.id,m)}const o=new Map;for(const u of e.elements.filter(E2)){const c=i.get(u.id)??[],f=o.get(u.file_path)??[];f.push({id:u.id,name:u.name,file:u.file_path,directCount:c.length,totalCount:c.length,requirementIds:c,verificationType:u.element_type}),o.set(u.file_path,f)}return[...o.entries()].sort((u,c)=>u[0].localeCompare(c[0])).map(([u,c])=>({file:u,verifications:c}))}const Pr="__root__";function mJ({activeView:e,open:t,chrome:n="standalone",onToggle:r,onNavigate:i,onOpenElement:o,onOpenOntologyNode:s}){const{store:u,elementById:c}=$n(),f=An(),h=zJ(u),m=K.useMemo(()=>TJ(u.files,h),[h,u.files]),_=K.useMemo(()=>jJ(m,f.modelTreeQuery,c),[c,m,f.modelTreeQuery]),g=K.useMemo(()=>HR(u),[u]),b=K.useMemo(()=>LJ(g,h),[h,g]),E=K.useMemo(()=>RJ(b,f.traceTreeQuery),[b,f.traceTreeQuery]),C=e==="model"&&f.modelMode==="graph",w=(e==="model"||e==="files")&&!C,T=C?"Graph Explorer":`${AA[e]} Explorer`;return y.jsxs(m9,{open:t,chrome:n,header:y.jsx(A5,{title:T}),railMark:y.jsx(yT,{}),onToggle:r,"aria-label":"Explorer navigation",children:[e==="ontologies"&&y.jsx(gJ,{}),e==="thesaurus"&&y.jsx(yJ,{}),w&&y.jsx(vJ,{}),e==="traces"&&y.jsx(bJ,{}),y.jsx(xJ,{activeView:e,onOpenElement:o,onOpenOntologyNode:s}),e==="traces"&&y.jsx(uv,{"aria-label":"Verification trace tree",id:"trace-tree",children:y.jsx(XR,{folder:E,depth:0,query:f.traceTreeQuery})}),e==="traces"?y.jsx(_J,{files:g}):null,w&&y.jsx(uv,{"aria-label":"Project tree",children:y.jsx(VR,{folder:_,activeView:e,elementById:c,onNavigate:i,onOpenElement:o,depth:0,query:f.modelTreeQuery})}),w&&e==="model"?y.jsx(pJ,{}):null]})}function pJ(){const{store:e}=$n(),t=e.knowledge_graph.summary,n=[{label:"Elements",value:Mt((t==null?void 0:t.elements)??e.elements.length)},{label:"Relations",value:Mt((t==null?void 0:t.relations)??e.relations.length)},{label:"Files",value:Mt(e.files.length)},{label:"Resources",value:Mt(e.resources.length)}];return y.jsx(Pl,{items:n,placement:"footer"})}function _J({files:e}){const t=e.reduce((r,i)=>{r.files+=1,r.verifications+=i.verifications.length;for(const o of i.verifications)r.directRequirements+=o.directCount,r.rollupRequirements+=o.totalCount;return r},{files:0,verifications:0,directRequirements:0,rollupRequirements:0}),n=[{label:"Files",value:Mt(t.files)},{label:"Verifications",value:Mt(t.verifications)},{label:"Direct reqs",value:Mt(t.directRequirements)},{label:"Rollup reqs",value:Mt(t.rollupRequirements)}];return y.jsx(Pl,{items:n,placement:"footer"})}function gJ(){const[e,t]=K.useState("");K.useEffect(()=>{var r;(r=window.filterOntologyGraph)==null||r.call(window,e)},[e]);function n(r){var i;r.preventDefault(),(i=window.filterOntologyGraph)==null||i.call(window,e)}return y.jsx(Fm,{searchInputId:"ontology-graph-search",inputLabel:"Search Explorer",placeholder:"Search ontology graph...",value:e,resultsId:"ontology-graph-results",onQueryChange:t,onSubmit:n})}function yJ(){const e=An();return y.jsx(Fm,{searchInputId:"thesaurus-search",inputLabel:"Filter concepts",placeholder:"Filter concepts...",value:e.thesaurusQuery,resultsId:"thesaurus-tree",onQueryChange:e.setThesaurusQuery,onSubmit:t=>t.preventDefault()})}function vJ(){const e=An();return y.jsx(Fm,{searchInputId:"project-tree-search",inputLabel:"Filter project tree",placeholder:"Filter model tree...",value:e.modelTreeQuery,resultsId:"project-tree",onQueryChange:e.setModelTreeQuery,onSubmit:t=>t.preventDefault()})}function bJ(){const e=An();return y.jsx(Fm,{searchInputId:"trace-tree-search",inputLabel:"Filter trace tree",placeholder:"Filter trace tree...",value:e.traceTreeQuery,resultsId:"trace-tree",onQueryChange:e.setTraceTreeQuery,onSubmit:t=>t.preventDefault()})}function xJ({activeView:e,onOpenElement:t,onOpenOntologyNode:n}){var h,m,_,g,b,E,C,w;const r=An(),{store:i,elementById:o}=$n(),s=e==="model"&&r.modelMode==="graph",u=K.useMemo(()=>MJ(i.knowledge_graph.nodes??[],o),[o,i.knowledge_graph.nodes]),c=K.useMemo(()=>$J(i.elements),[i.elements]),f=K.useMemo(()=>OJ(i),[i.elements.length,i.files.length,i.resources.length,(h=i.ontology.graph_data)==null?void 0:h.nodes]);if((e==="model"||e==="files")&&!s)return null;if(s){const T=[{label:"Submodels",value:Mt(((m=i.knowledge_graph.summary)==null?void 0:m.submodels)??((_=i.knowledge_graph.submodels)==null?void 0:_.length)??0)},{label:"Elements",value:Mt(((g=i.knowledge_graph.summary)==null?void 0:g.elements)??i.elements.length)},{label:"Relations",value:Mt(((b=i.knowledge_graph.summary)==null?void 0:b.relations)??i.relations.length)},{label:"Reused Context",value:Mt(((E=i.knowledge_graph.summary)==null?void 0:E.reused_contract_context)??i.reused_contract_context.length)}];return y.jsxs(y.Fragment,{children:[y.jsxs(Zd,{"aria-label":"Graph controls",children:[y.jsx(wJ,{selectedNodeId:r.knowledgeGraphSelectionId,nodes:i.knowledge_graph.nodes??[],elementById:o,onOpenElement:t,onClear:()=>r.setKnowledgeGraphSelectionId(null)}),y.jsxs(pa,{label:"Show",children:[y.jsx(Eo,{size:"sm",onClick:r.resetModelTypes,children:"Reset filters"}),u.map(k=>y.jsx(Rc,{label:S2(k.type),on:r.modelTypes.has(k.type),variant:"filter",icon:y.jsx(yn,{type:k.type,family:k.family,size:"sm"}),meta:vc(k.count),onToggle:()=>r.toggleModelType(k.type)},k.type))]})]}),y.jsx(Pl,{items:T,placement:"footer"})]})}if(e==="traces")return null;if(e==="thesaurus"){const T=BJ(i),k=UJ(T,r.thesaurusQuery),S=T.reduce((R,M)=>R+M.concepts.length,0),z=[{label:"Schemes",value:Mt(T.length)},{label:"Concepts",value:Mt(S)}];return y.jsxs(y.Fragment,{children:[y.jsx(uv,{"aria-label":"Concept hierarchy",id:"thesaurus-tree",children:k.map(R=>y.jsx(CJ,{scheme:R,selectedId:r.thesaurusSelectionId,query:r.thesaurusQuery,onSelectConcept:r.setThesaurusSelectionId},R.id))}),y.jsx(Pl,{items:z,placement:"footer"})]})}if(e==="coverage"){const T=qJ(i),k=zs(i.coverage)?i.coverage:{},S=zs(k.summary)?k.summary:{},z=[{label:"Requirements",value:Mt(_o(S.total_requirements_in_scope))},{label:"Leaf reqs",value:Mt(_o(S.total_leaf_requirements))},{label:"Verifications",value:Mt(_o(S.total_verifications))}];return y.jsxs(y.Fragment,{children:[y.jsx(Zd,{"aria-label":"Coverage explorer",children:y.jsx(pa,{label:"Coverage",children:y.jsx(f9,{children:T.map(R=>y.jsx(d9,{icon:R.icon,label:R.label,count:vc(R.count),selected:r.coverageSectionId===R.id,onClick:()=>{r.setCoverageSectionId(R.id),IJ(R.id)}},R.id))})})}),y.jsx(Pl,{items:z,placement:"footer"})]})}if(e==="search")return y.jsxs(Zd,{"aria-label":"Search controls",title:"Filter by",children:[y.jsx(Eo,{size:"sm",onClick:r.resetSearchKinds,children:"Reset filters"}),y.jsx(pa,{label:"Result types",children:Pv.map(T=>y.jsx(Rc,{label:KJ(T),on:r.searchKinds.has(T),variant:"filter",colorToken:QJ(T),meta:vc(f[T]??0),onToggle:()=>r.toggleSearchKind(T)},T))}),c.length>0?y.jsx(pa,{label:"Element types",children:c.map(T=>y.jsx(Rc,{label:S2(T.type),on:r.searchElementTypes.has(T.type),variant:"filter",icon:y.jsx(yn,{type:T.type,family:T.family,size:"sm"}),meta:vc(T.count),onToggle:()=>r.toggleSearchElementType(T.type)},T.type))}):null]});if(e==="ontologies"){const T=i.ontology.summary??{},k=i.ontology.external_counts??{},S=_o(k.declared_external_source_count),z=_o(k.used_external_source_count),R=_o(k.materialized_external_term_count),M=_o(k.materialized_external_triple_count),X=[{label:"Ontologies",value:Mt(T.ontology_blocks??0)},{label:"Shapes",value:Mt(T.shape_blocks??0)},{label:"Quads",value:Mt(T.total_quads??0),title:"RDF statements (subject-predicate-object, with graph context)"},{label:"Blocks",value:Mt(T.total_blocks??0),title:"Ontology and shape source blocks discovered in the model"}];S>0&&X.push({label:"Ext Sources",value:Mt(z),title:`${Mt(S)} declared external source(s); ${Mt(z)} contribute to the used subset`},{label:"Ext Terms",value:Mt(R),title:"External terms materialized into the Explorer used subset"},{label:"Ext Triples",value:Mt(M),title:"External triples materialized into the Explorer used subset"});const F=new Map;for(const I of((C=i.ontology.graph_data)==null?void 0:C.nodes)??[])F.set(I.layer,(F.get(I.layer)??0)+1);return y.jsxs(y.Fragment,{children:[y.jsxs(Zd,{"aria-label":"Ontology controls",children:[y.jsx(kJ,{selectedNodeId:r.ontologySelectionId,nodes:((w=i.ontology.graph_data)==null?void 0:w.nodes)??[],onOpenOntologyNode:n,onClear:()=>{var I;r.setOntologySelectionId(null),(I=window.clearOntologySelection)==null||I.call(window)}}),y.jsx(pa,{label:"Graph",children:y.jsxs(l9,{children:[i.ontology.ttl_href?y.jsxs(u9,{href:i.ontology.ttl_href,title:"Download the exported ontology as Turtle (ontologies.ttl)",children:[y.jsx(et,{name:"download"}),"Download .ttl"]}):null,y.jsx(Eo,{tone:"ghost",size:"sm",iconLeft:y.jsx(et,{name:"rotate-ccw"}),onClick:()=>{var I;return(I=window.resetOntologyGraphLayout)==null?void 0:I.call(window)},children:"Reset layout"})]})}),y.jsx(pa,{label:"Overlays",children:fJ.map(([I,U])=>{const G=I.replace("layer-",""),q=vc(F.get(G)??0);return y.jsx(Rc,{label:U,colorToken:ZJ(I),on:r.ontologyFilters.has(I),variant:"filter",meta:q,title:JJ(I),onToggle:()=>r.toggleOntologyFilter(I)},I)})}),y.jsxs(c9,{columns:"two",children:[y.jsx("div",{children:y.jsxs(pa,{label:"Types",children:[y.jsx(sE,{rows:[{id:"class",label:"Class",colorToken:Ai("class")},{id:"skos-concept",label:"Concept",colorToken:Ai("skos-concept")},{id:"skos-concept-scheme",label:"Concept Scheme",colorToken:Ai("skos-concept-scheme")},{id:"named-individual",label:"Individual",colorToken:Ai("named-individual")},{id:"datatype",label:"Datatype",colorToken:Ai("datatype")},{id:"class-expression",label:"Class expr.",colorToken:Ai("class-expression")},{id:"node-shape",label:"Node shape",colorToken:Ai("node-shape")},{id:"property-shape",label:"Property shape",colorToken:Ai("property-shape")},{id:"resource",label:"Resource",colorToken:Ai("resource")}]}),y.jsx(sE,{rows:[{id:"relation",label:"Relation",colorToken:"--text-muted",line:!0}]})]})}),y.jsx("div",{children:y.jsx(pa,{label:"Notation",children:y.jsx(h9,{rows:[{symbol:"D/R",label:"Domain/range"},{symbol:"⊆",label:"Subclass"},{symbol:"∈",label:"Membership"},{symbol:"⟂",label:"Disjoint"},{symbol:"⇔",label:"Equivalence"},{symbol:"⟲",label:"Inverse"},{symbol:"∘",label:"Property chain"},{symbol:"∩",label:"Class expr."},{symbol:"SH",label:"SHACL overlay"}]})})})]})]}),y.jsx(Pl,{items:X,placement:"footer"})]})}return null}function wJ({selectedNodeId:e,nodes:t,elementById:n,onOpenElement:r,onClear:i}){const o=e?t.find(c=>c.id===e):void 0,s=o!=null&&o.identifier?n(o.identifier):void 0,u=(s==null?void 0:s.element_type)||(o==null?void 0:o.element_type)||(o==null?void 0:o.node_type)||(o==null?void 0:o.type)||"element";return y.jsx(IT,{ariaLabel:"Selected graph element",emptyMessage:"Select a graph node to inspect its details.",selection:s?{icon:y.jsx(yn,{type:s.element_type,family:s.type_family,title:s.element_type,size:"sm"}),name:s.name,kind:u}:void 0,openTitle:"Open element details",onOpen:s?()=>r(s.id):void 0,onClear:i})}function kJ({selectedNodeId:e,nodes:t,onOpenOntologyNode:n,onClear:r}){const i=e?t.find(s=>s.id===e):void 0,o=i?i.semantic_type||i.node_type||i.type||"resource":"";return y.jsx(IT,{ariaLabel:"Selected ontology node",emptyMessage:"Select a graph node to inspect its details.",selection:i?{icon:y.jsx(Zh,{colorToken:Ai(o),title:o}),name:i.label||i.id,kind:o}:void 0,openTitle:"Open node details",onOpen:i?()=>n(i.id):void 0,onClear:r})}function VR({folder:e,activeView:t,elementById:n,onNavigate:r,onOpenElement:i,depth:o,query:s}){const[u,c]=K.useState(o===0),f=An(),h=e.path===Pr?"__root__":`folder:${e.path}`,m=!!s.trim()||u;function _(){f.setModelSelectionId(h),t==="files"&&r("model")}return y.jsxs(du,{children:[y.jsx(jo,{kind:"folder",label:e.name,icon:m?y.jsx(et,{name:"folder-open",className:"file-kind-folder"}):y.jsx(et,{name:"folder",className:"file-kind-folder"}),count:e.files.length+e.folders.length,depth:o,open:m,expandable:e.files.length+e.folders.length>0,selected:f.modelSelectionId===h,onToggle:()=>c(g=>!g),onSelect:_}),m&&y.jsxs(y.Fragment,{children:[e.folders.map(g=>y.jsx(VR,{folder:g,activeView:t,elementById:n,onNavigate:r,onOpenElement:i,depth:o+1,query:s},g.path)),e.files.map(g=>y.jsx(SJ,{file:g,activeView:t,elementById:n,onNavigate:r,onOpenElement:i,depth:o+1,query:s},g.path))]})]})}function XR({folder:e,depth:t,query:n}){const r=An(),i=r.traceFilePath,o=i?JR(e,i):!1,[s,u]=K.useState(t<2||o),c=!!n.trim()||s;return K.useEffect(()=>{o&&u(!0)},[o]),y.jsxs(du,{children:[y.jsx(jo,{kind:"folder",label:e.name,icon:c?y.jsx(et,{name:"folder-open",className:"file-kind-folder"}):y.jsx(et,{name:"folder",className:"file-kind-folder"}),count:ZR(e),depth:t,open:c,expandable:e.files.length+e.folders.length>0,selected:e.path===Pr&&!i,onToggle:()=>u(f=>!f),onSelect:()=>{r.setTraceFilePath(null),r.setTraceSelectionId(null)}}),c&&y.jsxs(y.Fragment,{children:[e.folders.map(f=>y.jsx(XR,{folder:f,depth:t+1,query:n},f.path)),e.files.map(f=>y.jsx(EJ,{file:f,depth:t+1,query:n},f.path))]})]})}function EJ({file:e,depth:t,query:n}){const r=An(),i=r.traceFilePath===e.path,o=i?r.traceSelectionId:null,[s,u]=K.useState(!0),c=!!n.trim()||s;function f(){r.setTraceFilePath(e.path),r.setTraceSelectionId(null)}function h(m){r.setTraceFilePath(e.path),r.setTraceSelectionId(m)}return y.jsxs(du,{children:[y.jsx(jo,{kind:"file",label:e.name,icon:y.jsx(et,{name:"file",className:"file-kind-file"}),count:e.verifications.length,depth:t,open:c,expandable:e.verifications.length>0,selected:i&&!o,onToggle:()=>u(m=>!m),onSelect:f}),c&&e.verifications.map(m=>y.jsx(jo,{kind:"element",label:m.name,icon:y.jsx(yn,{type:m.type??"verification",family:"verification",size:"sm"}),depth:t+1,selected:o===m.id,onSelect:()=>h(m.id)},m.id))]})}function SJ({file:e,activeView:t,elementById:n,onNavigate:r,onOpenElement:i,depth:o,query:s}){const u=An(),c=e.element_ids.map(n).filter(Boolean),f=c.length>0,[h,m]=K.useState(f),_=!!s.trim()||h,g=`file:${e.path}`;function b(){u.setModelSelectionId(g),t==="files"&&r("model")}function E(C){u.setModelSelectionId(C),t==="files"&&r("model"),i(C)}return y.jsxs(du,{children:[y.jsx(jo,{kind:"file",label:iu(e.display_path||e.path),icon:y.jsx(et,{name:"file",className:"file-kind-file"}),count:c.length>0?c.length:void 0,depth:o,open:_,expandable:f,selected:u.modelSelectionId===g,onToggle:()=>m(C=>!C),onSelect:b}),_&&f&&c.map(C=>y.jsx(jo,{kind:"element",label:C.name,icon:y.jsx(yn,{type:C.element_type,family:C.type_family,title:C.element_type,size:"sm"}),depth:o+1,selected:u.modelSelectionId===C.id,onSelect:()=>E(C.id)},C.id))]})}function CJ({scheme:e,selectedId:t,query:n,onSelectConcept:r}){const i=t?e.concepts.some(f=>f.id===t):!1,[o,s]=K.useState(i||e.concepts.length<=8);K.useEffect(()=>{i&&s(!0)},[i]);const u=WJ(e.concepts),c=!!n.trim()||o;return y.jsxs(du,{children:[y.jsx(jo,{kind:"element",label:e.label,icon:y.jsx(yn,{type:"concept-scheme",size:"sm"}),count:e.concepts.length,depth:0,open:c,expandable:u.length>0,selected:!1,onToggle:()=>s(f=>!f),onSelect:()=>{const f=u[0]??e.concepts[0];f&&r(f.id)}}),c&&u.map(f=>y.jsx(YR,{concept:f,concepts:e.concepts,selectedId:t,query:n,onSelectConcept:r,depth:1},f.id))]})}function YR({concept:e,concepts:t,selectedId:n,query:r,onSelectConcept:i,depth:o}){const s=t.filter(m=>m.parentId===e.id),u=n?tN(t,e.id,n):!1,[c,f]=K.useState(o<2||u),h=!!r.trim()||c;return K.useEffect(()=>{u&&f(!0)},[u]),y.jsxs(du,{children:[y.jsx(jo,{kind:"element",label:e.label,icon:y.jsx(yn,{type:"concept",size:"sm"}),count:s.length>0?s.length:void 0,depth:o,open:h,expandable:s.length>0,selected:n===e.id,onToggle:()=>f(m=>!m),onSelect:()=>i(e.id),title:e.description||e.label}),h&&s.map(m=>y.jsx(YR,{concept:m,concepts:t,selectedId:n,query:r,onSelectConcept:i,depth:o+1},m.id))]})}function Mt(e){return typeof e=="number"?e.toLocaleString():e}function TJ(e,t){var i;const n={path:Pr,name:t,folders:[],files:[]},r=new Map([[Pr,n]]);for(const o of e){const s=o.parent_folder||Pr;eN(s,r,n),(i=r.get(s))==null||i.files.push(o)}for(const o of r.values())o.folders.sort((s,u)=>s.name.localeCompare(u.name)),o.files.sort((s,u)=>iu(s.display_path||s.path).localeCompare(iu(u.display_path||u.path)));return n}function jJ(e,t,n){const r=t.trim().toLowerCase();return r?WR(e,r,n,!0)??{...e,folders:[],files:[]}:e}function WR(e,t,n,r=!1){if(!r&&au(t,e.name,e.path))return e;const o=e.folders.map(u=>WR(u,t,n)).filter(Boolean),s=e.files.map(u=>AJ(u,t,n)).filter(Boolean);return o.length===0&&s.length===0&&!r?null:{...e,folders:o,files:s}}function AJ(e,t,n){if(au(t,e.display_path,e.path,e.markdown_content))return e;const r=e.element_ids.filter(i=>{const o=n(i);return o?au(t,o.name,o.element_type,o.type_family,o.content):i.toLowerCase().includes(t)});return r.length>0?{...e,element_ids:r}:null}function RJ(e,t){const n=t.trim().toLowerCase();return n?KR(e,n,!0)??{...e,folders:[],files:[]}:e}function KR(e,t,n=!1){if(!n&&au(t,e.name,e.path))return e;const i=e.folders.map(s=>KR(s,t)).filter(Boolean),o=e.files.map(s=>NJ(s,t)).filter(Boolean);return i.length===0&&o.length===0&&!n?null:{...e,folders:i,files:o}}function NJ(e,t){if(au(t,e.name,e.path))return e;const n=e.verifications.filter(r=>au(t,r.name,r.type,r.id));return n.length>0?{...e,verifications:n}:null}function LJ(e,t){const n={path:Pr,name:t,folders:[],files:[]},r=new Map([[Pr,n]]);for(const i of e){const o=i.file,s=x0(o)||Pr;QR(s,r,n).files.push({path:o,name:iu(o),verifications:(i.verifications??[]).map(c=>({id:c.id,name:c.name,type:c.verificationType})).sort((c,f)=>c.name.localeCompare(f.name))})}for(const i of r.values())i.folders.sort((o,s)=>o.name.localeCompare(s.name)),i.files.sort((o,s)=>o.name.localeCompare(s.name));return n}function zJ(e){var r,i;const t=(r=e.project.repository)==null?void 0:r.trim(),n=(i=e.project.branch)==null?void 0:i.trim();return t&&n?`${t} @ ${n}`:e.project.root_label||t||"Project"}function QR(e,t,n){if(e===Pr||e==="")return n;const r=t.get(e);if(r)return r;const i=x0(e)||Pr,o=QR(i,t,n),s={path:e,name:iu(e),folders:[],files:[]};return t.set(e,s),o.folders.push(s),s}function ZR(e){return e.files.reduce((t,n)=>t+n.verifications.length,0)+e.folders.reduce((t,n)=>t+ZR(n),0)}function JR(e,t){return e.files.some(n=>n.path===t)||e.folders.some(n=>JR(n,t))}function eN(e,t,n){if(e===Pr||e==="")return n;const r=t.get(e);if(r)return r;const i=x0(e)||Pr,o=eN(i,t,n),s={path:e,name:iu(e),folders:[],files:[]};return t.set(e,s),o.folders.push(s),s}function iu(e){const t=e.replace(/\\/g,"/").replace(/\/$/,"");return t.split("/").pop()||t||"Project"}function au(e,...t){return t.some(n=>n==null?void 0:n.toLowerCase().includes(e))}function x0(e){const t=e.replace(/\\/g,"/").replace(/\/$/,""),n=t.lastIndexOf("/");return n>0?t.slice(0,n):""}function S2(e){return e.replace(/-/g," ").replace(/\b\w/g,t=>t.toUpperCase())}const hy=["capability","requirement","contract","verification-objective","verification","test-verification","formal-proof-verification","analysis-verification","inspection-verification","demonstration-verification","specification","semantic-contract","ontology","resource","other"];function MJ(e,t){const n=new Map;for(const r of e){const i=DJ(r),o=r.identifier?t(r.identifier):void 0,s=(o==null?void 0:o.type_family)||r.node_type||r.type||i,u=n.get(i);u?u.count+=1:n.set(i,{type:i,family:s,count:1})}return Array.from(n.values()).sort((r,i)=>{const o=xm(r.type,r.family),s=xm(i.type,i.family);return o-s||r.type.localeCompare(i.type)})}function DJ(e){return e.element_type||e.node_type||e.type||"other"}function OJ(e){var t,n;return{file:e.files.length,element:e.elements.length,resource:e.resources.length,ontology:((n=(t=e.ontology.graph_data)==null?void 0:t.nodes)==null?void 0:n.length)??0}}function qJ(e){const t=zs(e.coverage)?e.coverage:{},n=zs(t.summary)?t.summary:{};return[{id:"overview",label:"Overview",count:_o(n.total_requirements_in_scope,e.elements.length),icon:"pie-chart"},{id:"capability-coverage",label:"Capability coverage",count:PJ(t.capability_coverage),icon:"box"},{id:"unverified-requirements",label:"Unverified requirements",count:ph(t.unverified_leaf_requirements),icon:"file"},{id:"unimplemented-requirements",label:"Unimplemented requirements",count:ph(t.uncovered_requirements),icon:"activity"},{id:"unsatisfied-verifications",label:"Unsatisfied verifications",count:ph(t.unsatisfied_test_verifications),icon:"x"},{id:"orphaned-verifications",label:"Orphaned verifications",count:ph(t.orphaned_verifications),icon:"help-circle"}]}function IJ(e){window.dispatchEvent(new CustomEvent("reqvire:coverage-navigate",{detail:{section:e}}))}function ph(e){return!zs(e)||!zs(e.files)?0:Object.values(e.files).reduce((t,n)=>t+(Array.isArray(n)?n.length:0),0)}function PJ(e){return!zs(e)||!Array.isArray(e.capabilities)?0:e.capabilities.length}function _o(e,t=0){return typeof e=="number"&&Number.isFinite(e)?e:t}function zs(e){return typeof e=="object"&&e!==null}function $J(e){const t=new Map;for(const n of e){if(!n.element_type)continue;const r=t.get(n.element_type);r?r.count+=1:t.set(n.element_type,{type:n.element_type,family:n.type_family||n.element_type,count:1})}return Array.from(t.values()).sort((n,r)=>{const i=xm(n.type,n.family),o=xm(r.type,r.family);return i-o||n.type.localeCompare(r.type)})}function BJ(e){var c,f;const t=((c=e.ontology.graph_data)==null?void 0:c.nodes)??[],n=((f=e.ontology.graph_data)==null?void 0:f.edges)??[],r=t.filter(HJ).sort((h,m)=>my(h).localeCompare(my(m))),i=new Set(t.filter(VJ).map(h=>h.id)),o=new Set(r.map(h=>h.id)),s=new Map;for(const h of n)h.label==="broader"&&o.has(h.source)&&o.has(h.target)&&s.set(h.source,h.target);const u=new Map;for(const h of r){const m=h.scheme_iri,_=h.scheme_label;if(!m||!_||!i.has(m))continue;GJ(u,m,_).concepts.push({id:h.id,label:my(h),parentId:s.get(h.id)??null,schemeId:m,description:XJ(h)})}return FJ(Array.from(u.values()).filter(h=>h.concepts.length>0))}function UJ(e,t){const n=t.trim().toLowerCase();return n?e.map(r=>{var s;const i=new Set,o=new Map(r.concepts.map(u=>[u.id,u]));for(const u of r.concepts){if(!YJ(u,n))continue;i.add(u.id);let c=u.parentId;for(;c;)i.add(c),c=((s=o.get(c))==null?void 0:s.parentId)??null}return{...r,concepts:r.concepts.filter(u=>i.has(u.id))}}).filter(r=>r.concepts.length>0):[...e]}function GJ(e,t,n){const r=e.get(t);if(r)return r;const i={id:t,label:n,concepts:[]};return e.set(t,i),i}function FJ(e){return e.map(t=>({...t,concepts:[...t.concepts].sort((n,r)=>{const i=C2(t.concepts,n.id),o=C2(t.concepts,r.id);return i-o||n.label.localeCompare(r.label)})})).sort((t,n)=>t.label.localeCompare(n.label))}function HJ(e){return e.semantic_type==="skos-concept"}function VJ(e){return e.semantic_type==="skos-concept-scheme"}function my(e){return $v(e,"prefLabel")||e.label}function XJ(e){return $v(e,"definition")||$v(e,"scopeNote")||e.comment}function $v(e,t){var n;return((n=(e.literal_values??[]).find(r=>r.predicate.endsWith(t)))==null?void 0:n.value)??""}function C2(e,t){const n=new Map(e.map(s=>[s.id,s.parentId]));let r=0,i=n.get(t);const o=new Set([t]);for(;i&&!o.has(i);)o.add(i),r+=1,i=n.get(i)??null;return r}function tN(e,t,n){return t===n?!0:e.filter(i=>i.parentId===t).some(i=>tN(e,i.id,n))}function YJ(e,t){return e.label.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)}function WJ(e){const t=new Set(e.map(n=>n.id));return e.filter(n=>n.parentId===null||!t.has(n.parentId))}function xm(e,t){const n=hy.indexOf(e);if(n>=0)return n;const r=hy.indexOf(t);return r>=0?r+.5:hy.length}function vc(e){return e>=1e6?`${T2(e/1e6)}M`:e>=1e3?`${T2(e/1e3)}K`:e.toLocaleString()}function T2(e){return e>=10?Math.round(e).toString():e.toFixed(1).replace(/\.0$/,"")}function KJ(e){return{file:"Files",element:"Elements",resource:"Resources",ontology:"Ontology terms"}[e]}function QJ(e){return{file:"--resource",element:"--requirement",resource:"--ontology",ontology:"--rdf-resource"}[e]}function Ai(e){const t={class:"--rdf-class","object-property":"--rdf-objprop","datatype-property":"--rdf-dtprop","rdf-property":"--rdf-rdfprop",property:"--rdf-objprop","named-individual":"--rdf-individual","skos-concept":"--rdf-concept","skos-concept-scheme":"--rdf-concept-scheme",datatype:"--rdf-datatype",restriction:"--rdf-restriction","class-expression":"--rdf-classexpr","node-shape":"--rdf-nodeshape","property-shape":"--rdf-propshape",resource:"--rdf-resource",relation:"--edge-default"};return t[e]??t.resource}function ZJ(e){return{"layer-authored":"--ontology","layer-concepts":"--rdf-concept","layer-reqvire-context":"--info","layer-external-source":"--other"}[e]??"--text-muted"}function JJ(e){return{"layer-authored":"Authored OWL/RDFS/SHACL structural ontology nodes and projection edges.","layer-concepts":"Curated SKOS concept nodes, concept taxonomy edges, and mapsToConcept bridge edges.","layer-reqvire-context":"Semantic context: model elements that declare or reference ontology terms.","layer-external-source":"Used external ontology subset triples derived from declared external sources."}[e]??""}function nN(e,t,n){return e.kind==="file"&&t.has(e.id)&&!n.has(e.id)?"resource":e.kind}const rN=K.createContext(null);function eee({children:e}){const{store:t}=$n(),[n,r]=K.useState("building"),[i,o]=K.useState(null),[s,u]=K.useState(0),c=K.useRef(null),f=K.useRef(0),h=K.useRef(new Map),m=K.useMemo(()=>{const b=new Map;for(const w of t.resources)b.set(w.target,w),w.file_path&&b.set(w.file_path,w);const E=new Set(t.elements.map(w=>w.file_path)),C=new Map(t.elements.map(w=>[w.id,w.element_type]));return t.search.map(w=>({...w,displayKind:nN(w,b,E),elementType:w.kind==="element"?C.get(w.id):void 0}))},[t.elements,t.resources,t.search]);K.useEffect(()=>{r("building"),o(null),u(0);const b=new Worker(new URL(""+new URL("searchIndex.worker-BWOUMmPT.js",import.meta.url).href,import.meta.url),{type:"module"});c.current=b,b.onmessage=C=>{const w=C.data;if(w.type==="ready"){u(w.documentCount),r("ready");return}if(w.type==="results"){const T=h.current.get(w.requestId);T&&(T.resolve(w.results),h.current.delete(w.requestId));return}if(w.type==="error")if(w.requestId!==void 0){const T=h.current.get(w.requestId);T&&(T.reject(new Error(w.message)),h.current.delete(w.requestId))}else o(w.message),r("error")},b.onerror=C=>{o(C.message),r("error")};const E=window.setTimeout(()=>{b.postMessage({type:"build",documents:m})},0);return()=>{window.clearTimeout(E);for(const C of h.current.values())C.reject(new Error("Search index worker was stopped."));h.current.clear(),b.terminate(),c.current===b&&(c.current=null)}},[m]);const _=K.useCallback((b,E,C)=>{if(n!=="ready"||!c.current)return Promise.resolve([]);const w=f.current+1;return f.current=w,new Promise((T,k)=>{var S;h.current.set(w,{resolve:T,reject:k}),(S=c.current)==null||S.postMessage({type:"search",requestId:w,query:b,enabledKinds:Array.from(E),enabledElementTypes:Array.from(C)})})},[n]),g=K.useMemo(()=>({status:n,error:i,documentCount:s,search:_}),[s,i,_,n]);return y.jsx(rN.Provider,{value:g,children:e})}function tee(){const e=K.useContext(rN);if(!e)throw new Error("useSearchIndex must be used within SearchIndexProvider");return e}function nee(){const e=K.useRef(Pc),t=K.useCallback(()=>{const c=XF(typeof window<"u"?window.location.hash:"",e.current);return e.current=c.view,c},[]),[n,r]=K.useState(t),i=K.useCallback(c=>{window.location.hash=c,r(t())},[t]);K.useEffect(()=>{const c=()=>r(t());return window.addEventListener("hashchange",c),window.location.hash||window.location.replace(Uh(Pc)),()=>window.removeEventListener("hashchange",c)},[t]);const o=K.useCallback(c=>{i(Uh(c))},[i]),s=K.useCallback(c=>{i(Ef(c))},[i]),u=K.useCallback(()=>{i(Uh(e.current))},[i]);return{route:n,navigateView:o,openElement:s,closeElement:u}}function Oi({testId:e,children:t}){return y.jsx(Qy,{viewId:e,children:t})}var Bv=Object.defineProperty,ree=Object.getOwnPropertyDescriptor,iee=Object.getOwnPropertyNames,aee=Object.prototype.hasOwnProperty,w0=(e,t)=>{let n={};for(var r in e)Bv(n,r,{get:e[r],enumerable:!0});return Bv(n,Symbol.toStringTag,{value:"Module"}),n},oee=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=iee(t),o=0,s=i.length,u;o<s;o++)u=i[o],!aee.call(e,u)&&u!==n&&Bv(e,u,{get:(c=>t[c]).bind(null,u),enumerable:!(r=ree(t,u))||r.enumerable});return e},iN=(e,t,n)=>(oee(e,t,"default"),n);const up=[{id:"abap",name:"ABAP",import:(()=>J(()=>import("./explorer-abap.js"),[],import.meta.url))},{id:"actionscript-3",name:"ActionScript",import:(()=>J(()=>import("./explorer-actionscript-3.js"),[],import.meta.url))},{id:"ada",name:"Ada",import:(()=>J(()=>import("./explorer-ada.js"),[],import.meta.url))},{id:"angular-html",name:"Angular HTML",import:(()=>J(()=>import("./explorer-angular-html.js").then(e=>e.f),__vite__mapDeps([0,1,2,3]),import.meta.url))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>J(()=>import("./explorer-angular-ts.js"),__vite__mapDeps([4,0,1,2,3,5]),import.meta.url))},{id:"apache",name:"Apache Conf",import:(()=>J(()=>import("./explorer-apache.js"),[],import.meta.url))},{id:"apex",name:"Apex",import:(()=>J(()=>import("./explorer-apex.js"),[],import.meta.url))},{id:"apl",name:"APL",import:(()=>J(()=>import("./explorer-apl.js"),__vite__mapDeps([6,1,2,3,7,8,9]),import.meta.url))},{id:"applescript",name:"AppleScript",import:(()=>J(()=>import("./explorer-applescript.js"),[],import.meta.url))},{id:"ara",name:"Ara",import:(()=>J(()=>import("./explorer-ara.js"),[],import.meta.url))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>J(()=>import("./explorer-asciidoc.js"),[],import.meta.url))},{id:"asm",name:"Assembly",import:(()=>J(()=>import("./explorer-asm.js"),[],import.meta.url))},{id:"astro",name:"Astro",import:(()=>J(()=>import("./explorer-astro.js"),__vite__mapDeps([10,9,2,11,3,12,13]),import.meta.url))},{id:"awk",name:"AWK",import:(()=>J(()=>import("./explorer-awk.js"),[],import.meta.url))},{id:"ballerina",name:"Ballerina",import:(()=>J(()=>import("./explorer-ballerina.js"),[],import.meta.url))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>J(()=>import("./explorer-bat.js"),[],import.meta.url))},{id:"beancount",name:"Beancount",import:(()=>J(()=>import("./explorer-beancount.js"),[],import.meta.url))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>J(()=>import("./explorer-berry.js"),[],import.meta.url))},{id:"bibtex",name:"BibTeX",import:(()=>J(()=>import("./explorer-bibtex.js"),[],import.meta.url))},{id:"bicep",name:"Bicep",import:(()=>J(()=>import("./explorer-bicep.js"),[],import.meta.url))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>J(()=>import("./explorer-bird2.js"),[],import.meta.url))},{id:"blade",name:"Blade",import:(()=>J(()=>import("./explorer-blade.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9]),import.meta.url))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>J(()=>import("./explorer-bsl.js"),__vite__mapDeps([17,18]),import.meta.url))},{id:"c",name:"C",import:(()=>J(()=>import("./explorer-c.js"),[],import.meta.url))},{id:"c3",name:"C3",import:(()=>J(()=>import("./explorer-c3.js"),[],import.meta.url))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>J(()=>import("./explorer-cadence.js"),[],import.meta.url))},{id:"cairo",name:"Cairo",import:(()=>J(()=>import("./explorer-cairo.js"),__vite__mapDeps([19,20]),import.meta.url))},{id:"clarity",name:"Clarity",import:(()=>J(()=>import("./explorer-clarity.js"),[],import.meta.url))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>J(()=>import("./explorer-clojure.js"),[],import.meta.url))},{id:"cmake",name:"CMake",import:(()=>J(()=>import("./explorer-cmake.js"),[],import.meta.url))},{id:"cobol",name:"COBOL",import:(()=>J(()=>import("./explorer-cobol.js"),__vite__mapDeps([21,1,2,3,8]),import.meta.url))},{id:"codeowners",name:"CODEOWNERS",import:(()=>J(()=>import("./explorer-codeowners.js"),[],import.meta.url))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>J(()=>import("./explorer-codeql.js"),[],import.meta.url))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>J(()=>import("./explorer-coffee.js"),__vite__mapDeps([22,2]),import.meta.url))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>J(()=>import("./explorer-common-lisp.js"),[],import.meta.url))},{id:"coq",name:"Coq",import:(()=>J(()=>import("./explorer-coq.js"),[],import.meta.url))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>J(()=>import("./explorer-cpp.js"),__vite__mapDeps([23,24,25,26,16]),import.meta.url))},{id:"crystal",name:"Crystal",import:(()=>J(()=>import("./explorer-crystal.js"),__vite__mapDeps([27,1,2,3,16,26,28]),import.meta.url))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>J(()=>import("./explorer-csharp.js"),[],import.meta.url))},{id:"css",name:"CSS",import:(()=>J(()=>import("./explorer-css.js"),[],import.meta.url))},{id:"csv",name:"CSV",import:(()=>J(()=>import("./explorer-csv.js"),[],import.meta.url))},{id:"cue",name:"CUE",import:(()=>J(()=>import("./explorer-cue.js"),[],import.meta.url))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>J(()=>import("./explorer-cypher.js"),[],import.meta.url))},{id:"d",name:"D",import:(()=>J(()=>import("./explorer-d.js"),[],import.meta.url))},{id:"dart",name:"Dart",import:(()=>J(()=>import("./explorer-dart.js"),[],import.meta.url))},{id:"dax",name:"DAX",import:(()=>J(()=>import("./explorer-dax.js"),[],import.meta.url))},{id:"desktop",name:"Desktop",import:(()=>J(()=>import("./explorer-desktop.js"),[],import.meta.url))},{id:"diff",name:"Diff",import:(()=>J(()=>import("./explorer-diff.js"),[],import.meta.url))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>J(()=>import("./explorer-docker.js"),[],import.meta.url))},{id:"dotenv",name:"dotEnv",import:(()=>J(()=>import("./explorer-dotenv.js"),[],import.meta.url))},{id:"dream-maker",name:"Dream Maker",import:(()=>J(()=>import("./explorer-dream-maker.js"),[],import.meta.url))},{id:"edge",name:"Edge",import:(()=>J(()=>import("./explorer-edge.js"),__vite__mapDeps([29,11,1,2,3,15]),import.meta.url))},{id:"elixir",name:"Elixir",import:(()=>J(()=>import("./explorer-elixir.js"),__vite__mapDeps([30,1,2,3]),import.meta.url))},{id:"elm",name:"Elm",import:(()=>J(()=>import("./explorer-elm.js"),__vite__mapDeps([31,25,26]),import.meta.url))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>J(()=>import("./explorer-emacs-lisp.js"),[],import.meta.url))},{id:"erb",name:"ERB",import:(()=>J(()=>import("./explorer-erb.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38]),import.meta.url))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>J(()=>import("./explorer-erlang.js"),__vite__mapDeps([39,40]),import.meta.url))},{id:"fennel",name:"Fennel",import:(()=>J(()=>import("./explorer-fennel.js"),[],import.meta.url))},{id:"fish",name:"Fish",import:(()=>J(()=>import("./explorer-fish.js"),[],import.meta.url))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>J(()=>import("./explorer-fluent.js"),[],import.meta.url))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>J(()=>import("./explorer-fortran-fixed-form.js"),__vite__mapDeps([41,42]),import.meta.url))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>J(()=>import("./explorer-fortran-free-form.js"),[],import.meta.url))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>J(()=>import("./explorer-fsharp.js"),__vite__mapDeps([43,40]),import.meta.url))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>J(()=>import("./explorer-gdresource.js"),__vite__mapDeps([44,45,46]),import.meta.url))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>J(()=>import("./explorer-gdscript.js"),[],import.meta.url))},{id:"gdshader",name:"GDShader",import:(()=>J(()=>import("./explorer-gdshader.js"),[],import.meta.url))},{id:"genie",name:"Genie",import:(()=>J(()=>import("./explorer-genie.js"),[],import.meta.url))},{id:"gherkin",name:"Gherkin",import:(()=>J(()=>import("./explorer-gherkin.js"),[],import.meta.url))},{id:"git-commit",name:"Git Commit Message",import:(()=>J(()=>import("./explorer-git-commit.js"),__vite__mapDeps([47,48]),import.meta.url))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>J(()=>import("./explorer-git-rebase.js"),__vite__mapDeps([49,28]),import.meta.url))},{id:"gleam",name:"Gleam",import:(()=>J(()=>import("./explorer-gleam.js"),[],import.meta.url))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>J(()=>import("./explorer-glimmer-js.js"),__vite__mapDeps([50,2,11,3,1]),import.meta.url))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>J(()=>import("./explorer-glimmer-ts.js"),__vite__mapDeps([51,11,3,2,1]),import.meta.url))},{id:"glsl",name:"GLSL",import:(()=>J(()=>import("./explorer-glsl.js"),__vite__mapDeps([25,26]),import.meta.url))},{id:"gn",name:"GN",import:(()=>J(()=>import("./explorer-gn.js"),[],import.meta.url))},{id:"gnuplot",name:"Gnuplot",import:(()=>J(()=>import("./explorer-gnuplot.js"),[],import.meta.url))},{id:"go",name:"Go",import:(()=>J(()=>import("./explorer-go.js"),[],import.meta.url))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>J(()=>import("./explorer-graphql.js"),__vite__mapDeps([35,2,11,36,13]),import.meta.url))},{id:"groovy",name:"Groovy",import:(()=>J(()=>import("./explorer-groovy.js"),[],import.meta.url))},{id:"hack",name:"Hack",import:(()=>J(()=>import("./explorer-hack.js"),__vite__mapDeps([52,1,2,3,16]),import.meta.url))},{id:"haml",name:"Ruby Haml",import:(()=>J(()=>import("./explorer-haml.js"),__vite__mapDeps([34,2,3]),import.meta.url))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>J(()=>import("./explorer-handlebars.js"),__vite__mapDeps([53,1,2,3,38]),import.meta.url))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>J(()=>import("./explorer-haskell.js"),[],import.meta.url))},{id:"haxe",name:"Haxe",import:(()=>J(()=>import("./explorer-haxe.js"),[],import.meta.url))},{id:"hcl",name:"HashiCorp HCL",import:(()=>J(()=>import("./explorer-hcl.js"),[],import.meta.url))},{id:"hjson",name:"Hjson",import:(()=>J(()=>import("./explorer-hjson.js"),[],import.meta.url))},{id:"hlsl",name:"HLSL",import:(()=>J(()=>import("./explorer-hlsl.js"),[],import.meta.url))},{id:"html",name:"HTML",import:(()=>J(()=>import("./explorer-html.js"),__vite__mapDeps([1,2,3]),import.meta.url))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>J(()=>import("./explorer-html-derivative.js"),__vite__mapDeps([15,1,2,3]),import.meta.url))},{id:"http",name:"HTTP",import:(()=>J(()=>import("./explorer-http.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13]),import.meta.url))},{id:"hurl",name:"Hurl",import:(()=>J(()=>import("./explorer-hurl.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56]),import.meta.url))},{id:"hxml",name:"HXML",import:(()=>J(()=>import("./explorer-hxml.js"),__vite__mapDeps([57,58]),import.meta.url))},{id:"hy",name:"Hy",import:(()=>J(()=>import("./explorer-hy.js"),[],import.meta.url))},{id:"imba",name:"Imba",import:(()=>J(()=>import("./explorer-imba.js"),[],import.meta.url))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>J(()=>import("./explorer-ini.js"),[],import.meta.url))},{id:"java",name:"Java",import:(()=>J(()=>import("./explorer-java.js"),[],import.meta.url))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>J(()=>import("./explorer-javascript.js"),[],import.meta.url))},{id:"jinja",name:"Jinja",import:(()=>J(()=>import("./explorer-jinja.js"),__vite__mapDeps([59,1,2,3]),import.meta.url))},{id:"jison",name:"Jison",import:(()=>J(()=>import("./explorer-jison.js"),__vite__mapDeps([60,2]),import.meta.url))},{id:"json",name:"JSON",import:(()=>J(()=>import("./explorer-json.js"),[],import.meta.url))},{id:"json5",name:"JSON5",import:(()=>J(()=>import("./explorer-json5.js"),[],import.meta.url))},{id:"jsonc",name:"JSON with Comments",import:(()=>J(()=>import("./explorer-jsonc.js"),[],import.meta.url))},{id:"jsonl",name:"JSON Lines",import:(()=>J(()=>import("./explorer-jsonl.js"),[],import.meta.url))},{id:"jsonnet",name:"Jsonnet",import:(()=>J(()=>import("./explorer-jsonnet.js"),[],import.meta.url))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>J(()=>import("./explorer-jssm.js"),[],import.meta.url))},{id:"jsx",name:"JSX",import:(()=>J(()=>import("./explorer-jsx.js"),[],import.meta.url))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>J(()=>import("./explorer-julia.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62]),import.meta.url))},{id:"just",name:"Just",import:(()=>J(()=>import("./explorer-just.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38]),import.meta.url))},{id:"kdl",name:"KDL",import:(()=>J(()=>import("./explorer-kdl.js"),[],import.meta.url))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>J(()=>import("./explorer-kotlin.js"),[],import.meta.url))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>J(()=>import("./explorer-kusto.js"),[],import.meta.url))},{id:"latex",name:"LaTeX",import:(()=>J(()=>import("./explorer-latex.js"),__vite__mapDeps([65,66,62]),import.meta.url))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>J(()=>import("./explorer-lean.js"),[],import.meta.url))},{id:"less",name:"Less",import:(()=>J(()=>import("./explorer-less.js"),[],import.meta.url))},{id:"liquid",name:"Liquid",import:(()=>J(()=>import("./explorer-liquid.js"),__vite__mapDeps([67,1,2,3,9]),import.meta.url))},{id:"llvm",name:"LLVM IR",import:(()=>J(()=>import("./explorer-llvm.js"),[],import.meta.url))},{id:"log",name:"Log file",import:(()=>J(()=>import("./explorer-log.js"),[],import.meta.url))},{id:"logo",name:"Logo",import:(()=>J(()=>import("./explorer-logo.js"),[],import.meta.url))},{id:"lua",name:"Lua",import:(()=>J(()=>import("./explorer-lua.js"),__vite__mapDeps([37,26]),import.meta.url))},{id:"luau",name:"Luau",import:(()=>J(()=>import("./explorer-luau.js"),[],import.meta.url))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>J(()=>import("./explorer-make.js"),[],import.meta.url))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>J(()=>import("./explorer-markdown.js"),[],import.meta.url))},{id:"marko",name:"Marko",import:(()=>J(()=>import("./explorer-marko.js"),__vite__mapDeps([68,3,69,5,11]),import.meta.url))},{id:"matlab",name:"MATLAB",import:(()=>J(()=>import("./explorer-matlab.js"),[],import.meta.url))},{id:"mdc",name:"MDC",import:(()=>J(()=>import("./explorer-mdc.js"),__vite__mapDeps([70,40,38,15,1,2,3]),import.meta.url))},{id:"mdx",name:"MDX",import:(()=>J(()=>import("./explorer-mdx.js"),[],import.meta.url))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>J(()=>import("./explorer-mermaid.js"),[],import.meta.url))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>J(()=>import("./explorer-mipsasm.js"),[],import.meta.url))},{id:"mojo",name:"Mojo",import:(()=>J(()=>import("./explorer-mojo.js"),[],import.meta.url))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>J(()=>import("./explorer-moonbit.js"),[],import.meta.url))},{id:"move",name:"Move",import:(()=>J(()=>import("./explorer-move.js"),[],import.meta.url))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>J(()=>import("./explorer-narrat.js"),[],import.meta.url))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>J(()=>import("./explorer-nextflow.js"),__vite__mapDeps([71,72]),import.meta.url))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>J(()=>import("./explorer-nextflow-groovy.js"),[],import.meta.url))},{id:"nginx",name:"Nginx",import:(()=>J(()=>import("./explorer-nginx.js"),__vite__mapDeps([73,37,26]),import.meta.url))},{id:"nim",name:"Nim",import:(()=>J(()=>import("./explorer-nim.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40]),import.meta.url))},{id:"nix",name:"Nix",import:(()=>J(()=>import("./explorer-nix.js"),[],import.meta.url))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>J(()=>import("./explorer-nushell.js"),[],import.meta.url))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>J(()=>import("./explorer-objective-c.js"),[],import.meta.url))},{id:"objective-cpp",name:"Objective-C++",import:(()=>J(()=>import("./explorer-objective-cpp.js"),[],import.meta.url))},{id:"ocaml",name:"OCaml",import:(()=>J(()=>import("./explorer-ocaml.js"),[],import.meta.url))},{id:"odin",name:"Odin",import:(()=>J(()=>import("./explorer-odin.js"),[],import.meta.url))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>J(()=>import("./explorer-openscad.js"),[],import.meta.url))},{id:"pascal",name:"Pascal",import:(()=>J(()=>import("./explorer-pascal.js"),[],import.meta.url))},{id:"perl",name:"Perl",import:(()=>J(()=>import("./explorer-perl.js"),__vite__mapDeps([64,1,2,3,7,8,16]),import.meta.url))},{id:"php",name:"PHP",import:(()=>J(()=>import("./explorer-php.js"),__vite__mapDeps([75,1,2,3,7,8,16,9]),import.meta.url))},{id:"pkl",name:"Pkl",import:(()=>J(()=>import("./explorer-pkl.js"),[],import.meta.url))},{id:"plsql",name:"PL/SQL",import:(()=>J(()=>import("./explorer-plsql.js"),[],import.meta.url))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>J(()=>import("./explorer-po.js"),[],import.meta.url))},{id:"polar",name:"Polar",import:(()=>J(()=>import("./explorer-polar.js"),[],import.meta.url))},{id:"postcss",name:"PostCSS",import:(()=>J(()=>import("./explorer-postcss.js"),[],import.meta.url))},{id:"powerquery",name:"PowerQuery",import:(()=>J(()=>import("./explorer-powerquery.js"),[],import.meta.url))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>J(()=>import("./explorer-powershell.js"),[],import.meta.url))},{id:"prisma",name:"Prisma",import:(()=>J(()=>import("./explorer-prisma.js"),[],import.meta.url))},{id:"prolog",name:"Prolog",import:(()=>J(()=>import("./explorer-prolog.js"),[],import.meta.url))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>J(()=>import("./explorer-proto.js"),[],import.meta.url))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>J(()=>import("./explorer-pug.js"),__vite__mapDeps([76,2,3,1]),import.meta.url))},{id:"puppet",name:"Puppet",import:(()=>J(()=>import("./explorer-puppet.js"),[],import.meta.url))},{id:"purescript",name:"PureScript",import:(()=>J(()=>import("./explorer-purescript.js"),[],import.meta.url))},{id:"python",name:"Python",aliases:["py"],import:(()=>J(()=>import("./explorer-python.js"),[],import.meta.url))},{id:"qml",name:"QML",import:(()=>J(()=>import("./explorer-qml.js"),__vite__mapDeps([77,2]),import.meta.url))},{id:"qmldir",name:"QML Directory",import:(()=>J(()=>import("./explorer-qmldir.js"),[],import.meta.url))},{id:"qss",name:"Qt Style Sheets",import:(()=>J(()=>import("./explorer-qss.js"),[],import.meta.url))},{id:"r",name:"R",import:(()=>J(()=>import("./explorer-r.js"),[],import.meta.url))},{id:"racket",name:"Racket",import:(()=>J(()=>import("./explorer-racket.js"),[],import.meta.url))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>J(()=>import("./explorer-raku.js"),[],import.meta.url))},{id:"razor",name:"ASP.NET Razor",import:(()=>J(()=>import("./explorer-razor.js"),__vite__mapDeps([78,1,2,3,79]),import.meta.url))},{id:"reg",name:"Windows Registry Script",import:(()=>J(()=>import("./explorer-reg.js"),[],import.meta.url))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>J(()=>import("./explorer-regexp.js"),[],import.meta.url))},{id:"rel",name:"Rel",import:(()=>J(()=>import("./explorer-rel.js"),[],import.meta.url))},{id:"riscv",name:"RISC-V",import:(()=>J(()=>import("./explorer-riscv.js"),[],import.meta.url))},{id:"ron",name:"RON",import:(()=>J(()=>import("./explorer-ron.js"),[],import.meta.url))},{id:"rosmsg",name:"ROS Interface",import:(()=>J(()=>import("./explorer-rosmsg.js"),[],import.meta.url))},{id:"rst",name:"reStructuredText",import:(()=>J(()=>import("./explorer-rst.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37]),import.meta.url))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>J(()=>import("./explorer-ruby.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38]),import.meta.url))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>J(()=>import("./explorer-rust.js"),[],import.meta.url))},{id:"sas",name:"SAS",import:(()=>J(()=>import("./explorer-sas.js"),__vite__mapDeps([82,16]),import.meta.url))},{id:"sass",name:"Sass",import:(()=>J(()=>import("./explorer-sass.js"),[],import.meta.url))},{id:"scala",name:"Scala",import:(()=>J(()=>import("./explorer-scala.js"),[],import.meta.url))},{id:"scheme",name:"Scheme",import:(()=>J(()=>import("./explorer-scheme.js"),[],import.meta.url))},{id:"scss",name:"SCSS",import:(()=>J(()=>import("./explorer-scss.js"),__vite__mapDeps([5,3]),import.meta.url))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>J(()=>import("./explorer-sdbl.js"),[],import.meta.url))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>J(()=>import("./explorer-shaderlab.js"),__vite__mapDeps([83,84]),import.meta.url))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>J(()=>import("./explorer-shellscript.js"),[],import.meta.url))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>J(()=>import("./explorer-shellsession.js"),__vite__mapDeps([85,28]),import.meta.url))},{id:"smalltalk",name:"Smalltalk",import:(()=>J(()=>import("./explorer-smalltalk.js"),[],import.meta.url))},{id:"solidity",name:"Solidity",import:(()=>J(()=>import("./explorer-solidity.js"),[],import.meta.url))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>J(()=>import("./explorer-soy.js"),__vite__mapDeps([86,1,2,3]),import.meta.url))},{id:"sparql",name:"SPARQL",import:(()=>J(()=>import("./explorer-sparql.js"),__vite__mapDeps([87,88]),import.meta.url))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>J(()=>import("./explorer-splunk.js"),[],import.meta.url))},{id:"sql",name:"SQL",import:(()=>J(()=>import("./explorer-sql.js"),[],import.meta.url))},{id:"ssh-config",name:"SSH Config",import:(()=>J(()=>import("./explorer-ssh-config.js"),[],import.meta.url))},{id:"stata",name:"Stata",import:(()=>J(()=>import("./explorer-stata.js"),__vite__mapDeps([89,16]),import.meta.url))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>J(()=>import("./explorer-stylus.js"),[],import.meta.url))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>J(()=>import("./explorer-surrealql.js"),__vite__mapDeps([90,2]),import.meta.url))},{id:"svelte",name:"Svelte",import:(()=>J(()=>import("./explorer-svelte.js"),__vite__mapDeps([91,2,11,3,12]),import.meta.url))},{id:"swift",name:"Swift",import:(()=>J(()=>import("./explorer-swift.js"),[],import.meta.url))},{id:"system-verilog",name:"SystemVerilog",import:(()=>J(()=>import("./explorer-system-verilog.js"),[],import.meta.url))},{id:"systemd",name:"Systemd Units",import:(()=>J(()=>import("./explorer-systemd.js"),[],import.meta.url))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>J(()=>import("./explorer-talonscript.js"),[],import.meta.url))},{id:"tasl",name:"Tasl",import:(()=>J(()=>import("./explorer-tasl.js"),[],import.meta.url))},{id:"tcl",name:"Tcl",import:(()=>J(()=>import("./explorer-tcl.js"),[],import.meta.url))},{id:"templ",name:"Templ",import:(()=>J(()=>import("./explorer-templ.js"),__vite__mapDeps([92,93,2,3]),import.meta.url))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>J(()=>import("./explorer-terraform.js"),[],import.meta.url))},{id:"tex",name:"TeX",import:(()=>J(()=>import("./explorer-tex.js"),__vite__mapDeps([66,62]),import.meta.url))},{id:"toml",name:"TOML",import:(()=>J(()=>import("./explorer-toml.js"),[],import.meta.url))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>J(()=>import("./explorer-ts-tags.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8]),import.meta.url))},{id:"tsv",name:"TSV",import:(()=>J(()=>import("./explorer-tsv.js"),[],import.meta.url))},{id:"tsx",name:"TSX",import:(()=>J(()=>import("./explorer-tsx.js"),[],import.meta.url))},{id:"turtle",name:"Turtle",import:(()=>J(()=>import("./explorer-turtle.js"),[],import.meta.url))},{id:"twig",name:"Twig",import:(()=>J(()=>import("./explorer-twig.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38]),import.meta.url))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>J(()=>import("./explorer-typescript.js"),[],import.meta.url))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>J(()=>import("./explorer-typespec.js"),[],import.meta.url))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>J(()=>import("./explorer-typst.js"),[],import.meta.url))},{id:"v",name:"V",import:(()=>J(()=>import("./explorer-v.js"),[],import.meta.url))},{id:"vala",name:"Vala",import:(()=>J(()=>import("./explorer-vala.js"),[],import.meta.url))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>J(()=>import("./explorer-vb.js"),[],import.meta.url))},{id:"verilog",name:"Verilog",import:(()=>J(()=>import("./explorer-verilog.js"),[],import.meta.url))},{id:"vhdl",name:"VHDL",import:(()=>J(()=>import("./explorer-vhdl.js"),[],import.meta.url))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>J(()=>import("./explorer-viml.js"),[],import.meta.url))},{id:"vue",name:"Vue",import:(()=>J(()=>import("./explorer-vue.js"),__vite__mapDeps([96,3,2,11,9,1,15]),import.meta.url))},{id:"vue-html",name:"Vue HTML",import:(()=>J(()=>import("./explorer-vue-html.js"),__vite__mapDeps([97,2]),import.meta.url))},{id:"vue-vine",name:"Vue Vine",import:(()=>J(()=>import("./explorer-vue-vine.js"),__vite__mapDeps([98,3,5,69,99,12,2]),import.meta.url))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>J(()=>import("./explorer-vyper.js"),[],import.meta.url))},{id:"wasm",name:"WebAssembly",import:(()=>J(()=>import("./explorer-wasm2.js"),[],import.meta.url))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>J(()=>import("./explorer-wenyan.js"),[],import.meta.url))},{id:"wgsl",name:"WGSL",import:(()=>J(()=>import("./explorer-wgsl.js"),[],import.meta.url))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>J(()=>import("./explorer-wikitext.js"),[],import.meta.url))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>J(()=>import("./explorer-wit.js"),[],import.meta.url))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>J(()=>import("./explorer-wolfram.js"),[],import.meta.url))},{id:"xml",name:"XML",import:(()=>J(()=>import("./explorer-xml.js"),__vite__mapDeps([7,8]),import.meta.url))},{id:"xsl",name:"XSL",import:(()=>J(()=>import("./explorer-xsl.js"),__vite__mapDeps([100,7,8]),import.meta.url))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>J(()=>import("./explorer-yaml.js"),[],import.meta.url))},{id:"zenscript",name:"ZenScript",import:(()=>J(()=>import("./explorer-zenscript.js"),[],import.meta.url))},{id:"zig",name:"Zig",import:(()=>J(()=>import("./explorer-zig.js"),[],import.meta.url))}],k0=Object.fromEntries(up.map(e=>[e.id,e.import])),E0=Object.fromEntries(up.flatMap(e=>{var t;return((t=e.aliases)==null?void 0:t.map(n=>[n,e.import]))||[]})),S0={...k0,...E0},C0=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>J(()=>import("./explorer-andromeeda.js"),[],import.meta.url))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>J(()=>import("./explorer-aurora-x.js"),[],import.meta.url))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>J(()=>import("./explorer-ayu-dark.js"),[],import.meta.url))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>J(()=>import("./explorer-ayu-light.js"),[],import.meta.url))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>J(()=>import("./explorer-ayu-mirage.js"),[],import.meta.url))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>J(()=>import("./explorer-catppuccin-frappe.js"),[],import.meta.url))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>J(()=>import("./explorer-catppuccin-latte.js"),[],import.meta.url))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>J(()=>import("./explorer-catppuccin-macchiato.js"),[],import.meta.url))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>J(()=>import("./explorer-catppuccin-mocha.js"),[],import.meta.url))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>J(()=>import("./explorer-dark-plus.js"),[],import.meta.url))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>J(()=>import("./explorer-dracula.js"),[],import.meta.url))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>J(()=>import("./explorer-dracula-soft.js"),[],import.meta.url))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>J(()=>import("./explorer-everforest-dark.js"),[],import.meta.url))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>J(()=>import("./explorer-everforest-light.js"),[],import.meta.url))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>J(()=>import("./explorer-github-dark.js"),[],import.meta.url))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>J(()=>import("./explorer-github-dark-default.js"),[],import.meta.url))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>J(()=>import("./explorer-github-dark-dimmed.js"),[],import.meta.url))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>J(()=>import("./explorer-github-dark-high-contrast.js"),[],import.meta.url))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>J(()=>import("./explorer-github-light.js"),[],import.meta.url))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>J(()=>import("./explorer-github-light-default.js"),[],import.meta.url))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>J(()=>import("./explorer-github-light-high-contrast.js"),[],import.meta.url))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>J(()=>import("./explorer-gruvbox-dark-hard.js"),[],import.meta.url))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>J(()=>import("./explorer-gruvbox-dark-medium.js"),[],import.meta.url))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>J(()=>import("./explorer-gruvbox-dark-soft.js"),[],import.meta.url))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>J(()=>import("./explorer-gruvbox-light-hard.js"),[],import.meta.url))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>J(()=>import("./explorer-gruvbox-light-medium.js"),[],import.meta.url))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>J(()=>import("./explorer-gruvbox-light-soft.js"),[],import.meta.url))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>J(()=>import("./explorer-horizon.js"),[],import.meta.url))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>J(()=>import("./explorer-horizon-bright.js"),[],import.meta.url))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>J(()=>import("./explorer-houston.js"),[],import.meta.url))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>J(()=>import("./explorer-kanagawa-dragon.js"),[],import.meta.url))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>J(()=>import("./explorer-kanagawa-lotus.js"),[],import.meta.url))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>J(()=>import("./explorer-kanagawa-wave.js"),[],import.meta.url))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>J(()=>import("./explorer-laserwave.js"),[],import.meta.url))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>J(()=>import("./explorer-light-plus.js"),[],import.meta.url))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>J(()=>import("./explorer-material-theme.js"),[],import.meta.url))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>J(()=>import("./explorer-material-theme-darker.js"),[],import.meta.url))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>J(()=>import("./explorer-material-theme-lighter.js"),[],import.meta.url))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>J(()=>import("./explorer-material-theme-ocean.js"),[],import.meta.url))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>J(()=>import("./explorer-material-theme-palenight.js"),[],import.meta.url))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>J(()=>import("./explorer-min-dark.js"),[],import.meta.url))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>J(()=>import("./explorer-min-light.js"),[],import.meta.url))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>J(()=>import("./explorer-monokai.js"),[],import.meta.url))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>J(()=>import("./explorer-night-owl.js"),[],import.meta.url))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>J(()=>import("./explorer-night-owl-light.js"),[],import.meta.url))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>J(()=>import("./explorer-nord.js"),[],import.meta.url))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>J(()=>import("./explorer-one-dark-pro.js"),[],import.meta.url))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>J(()=>import("./explorer-one-light.js"),[],import.meta.url))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>J(()=>import("./explorer-plastic.js"),[],import.meta.url))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>J(()=>import("./explorer-poimandres.js"),[],import.meta.url))},{id:"red",displayName:"Red",type:"dark",import:(()=>J(()=>import("./explorer-red.js"),[],import.meta.url))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>J(()=>import("./explorer-rose-pine.js"),[],import.meta.url))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>J(()=>import("./explorer-rose-pine-dawn.js"),[],import.meta.url))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>J(()=>import("./explorer-rose-pine-moon.js"),[],import.meta.url))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>J(()=>import("./explorer-slack-dark.js"),[],import.meta.url))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>J(()=>import("./explorer-slack-ochin.js"),[],import.meta.url))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>J(()=>import("./explorer-snazzy-light.js"),[],import.meta.url))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>J(()=>import("./explorer-solarized-dark.js"),[],import.meta.url))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>J(()=>import("./explorer-solarized-light.js"),[],import.meta.url))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>J(()=>import("./explorer-synthwave-84.js"),[],import.meta.url))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>J(()=>import("./explorer-tokyo-night.js"),[],import.meta.url))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>J(()=>import("./explorer-vesper.js"),[],import.meta.url))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>J(()=>import("./explorer-vitesse-black.js"),[],import.meta.url))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>J(()=>import("./explorer-vitesse-dark.js"),[],import.meta.url))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>J(()=>import("./explorer-vitesse-light.js"),[],import.meta.url))}],T0=Object.fromEntries(C0.map(e=>[e.id,e.import]));var j0=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function see(){return 2147483648}function lee(){return typeof performance<"u"?performance.now():Date.now()}const uee=(e,t)=>e+(t-e%t)%t;async function cee(e){let t,n;const r={};function i(g){n=g,r.HEAPU8=new Uint8Array(g),r.HEAPU32=new Uint32Array(g)}function o(g,b,E){r.HEAPU8.copyWithin(g,b,b+E)}function s(g){try{return t.grow(g-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function u(g){const b=r.HEAPU8.length;g=g>>>0;const E=see();if(g>E)return!1;for(let C=1;C<=4;C*=2){let w=b*(1+.2/C);w=Math.min(w,g+100663296);const T=Math.min(E,uee(Math.max(g,w),65536));if(s(T))return!0}return!1}const c=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function f(g,b,E=1024){const C=b+E;let w=b;for(;g[w]&&!(w>=C);)++w;if(w-b>16&&g.buffer&&c)return c.decode(g.subarray(b,w));let T="";for(;b<w;){let k=g[b++];if(!(k&128)){T+=String.fromCharCode(k);continue}const S=g[b++]&63;if((k&224)===192){T+=String.fromCharCode((k&31)<<6|S);continue}const z=g[b++]&63;if((k&240)===224?k=(k&15)<<12|S<<6|z:k=(k&7)<<18|S<<12|z<<6|g[b++]&63,k<65536)T+=String.fromCharCode(k);else{const R=k-65536;T+=String.fromCharCode(55296|R>>10,56320|R&1023)}}return T}function h(g,b){return g?f(r.HEAPU8,g,b):""}const m={emscripten_get_now:lee,emscripten_memcpy_big:o,emscripten_resize_heap:u,fd_write:()=>0};async function _(){const b=await e({env:m,wasi_snapshot_preview1:m});t=b.memory,i(t.buffer),Object.assign(r,b),r.UTF8ToString=h}return await _(),r}var fee=Object.defineProperty,dee=(e,t,n)=>t in e?fee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mn=(e,t,n)=>dee(e,typeof t!="symbol"?t+"":t,n);let xn=null;function hee(e){throw new j0(e.UTF8ToString(e.getLastOnigError()))}class cp{constructor(t){mn(this,"utf16Length"),mn(this,"utf8Length"),mn(this,"utf16Value"),mn(this,"utf8Value"),mn(this,"utf16OffsetToUtf8"),mn(this,"utf8OffsetToUtf16");const n=t.length,r=cp._utf8ByteLength(t),i=r!==n,o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const u=new Uint8Array(r);let c=0;for(let f=0;f<n;f++){const h=t.charCodeAt(f);let m=h,_=!1;if(h>=55296&&h<=56319&&f+1<n){const g=t.charCodeAt(f+1);g>=56320&&g<=57343&&(m=(h-55296<<10)+65536|g-56320,_=!0)}i&&(o[f]=c,_&&(o[f+1]=c),m<=127?s[c+0]=f:m<=2047?(s[c+0]=f,s[c+1]=f):m<=65535?(s[c+0]=f,s[c+1]=f,s[c+2]=f):(s[c+0]=f,s[c+1]=f,s[c+2]=f,s[c+3]=f)),m<=127?u[c++]=m:m<=2047?(u[c++]=192|(m&1984)>>>6,u[c++]=128|(m&63)>>>0):m<=65535?(u[c++]=224|(m&61440)>>>12,u[c++]=128|(m&4032)>>>6,u[c++]=128|(m&63)>>>0):(u[c++]=240|(m&1835008)>>>18,u[c++]=128|(m&258048)>>>12,u[c++]=128|(m&4032)>>>6,u[c++]=128|(m&63)>>>0),_&&f++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=u,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=s}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r<i;r++){const o=t.charCodeAt(r);let s=o,u=!1;if(o>=55296&&o<=56319&&r+1<i){const c=t.charCodeAt(r+1);c>=56320&&c<=57343&&(s=(o-55296<<10)+65536|c-56320,u=!0)}s<=127?n+=1:s<=2047?n+=2:s<=65535?n+=3:n+=4,u&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const fp=class Ri{constructor(t){if(mn(this,"id",++Ri.LAST_ID),mn(this,"_onigBinding"),mn(this,"content"),mn(this,"utf16Length"),mn(this,"utf8Length"),mn(this,"utf16OffsetToUtf8"),mn(this,"utf8OffsetToUtf16"),mn(this,"ptr"),!xn)throw new j0("Must invoke loadWasm first.");this._onigBinding=xn,this.content=t;const n=new cp(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Ri._sharedPtrInUse?(Ri._sharedPtr||(Ri._sharedPtr=xn.omalloc(1e4)),Ri._sharedPtrInUse=!0,xn.HEAPU8.set(n.utf8Value,Ri._sharedPtr),this.ptr=Ri._sharedPtr):this.ptr=n.createString(xn)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Ri._sharedPtr?Ri._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};mn(fp,"LAST_ID",0);mn(fp,"_sharedPtr",0);mn(fp,"_sharedPtrInUse",!1);let aN=fp;class mee{constructor(t){if(mn(this,"_onigBinding"),mn(this,"_ptr"),!xn)throw new j0("Must invoke loadWasm first.");const n=[],r=[];for(let u=0,c=t.length;u<c;u++){const f=new cp(t[u]);n[u]=f.createString(xn),r[u]=f.utf8Length}const i=xn.omalloc(4*t.length);xn.HEAPU32.set(n,i/4);const o=xn.omalloc(4*t.length);xn.HEAPU32.set(r,o/4);const s=xn.createOnigScanner(i,o,t.length);for(let u=0,c=t.length;u<c;u++)xn.ofree(n[u]);xn.ofree(o),xn.ofree(i),s===0&&hee(xn),this._onigBinding=xn,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof t=="string"){t=new aN(t);const o=this._findNextMatchSync(t,n,!1,i);return t.dispose(),o}return this._findNextMatchSync(t,n,!1,i)}_findNextMatchSync(t,n,r,i){const o=this._onigBinding,s=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),i);if(s===0)return null;const u=o.HEAPU32;let c=s/4;const f=u[c++],h=u[c++],m=[];for(let _=0;_<h;_++){const g=t.convertUtf8OffsetToUtf16(u[c++]),b=t.convertUtf8OffsetToUtf16(u[c++]);m[_]={start:g,end:b,length:b-g}}return{index:f,captureIndices:m}}}function pee(e){return typeof e.instantiator=="function"}function _ee(e){return typeof e.default=="function"}function gee(e){return typeof e.data<"u"}function yee(e){return typeof Response<"u"&&e instanceof Response}function vee(e){var t;return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&((t=Buffer.isBuffer)==null?void 0:t.call(Buffer,e))||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let _h;function A0(e){if(_h)return _h;async function t(){xn=await cee(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),pee(r)?r=await r.instantiator(n):_ee(r)?r=await r.default(n):(gee(r)&&(r=r.data),yee(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await bee(r)(n):r=await xee(r)(n):vee(r)?r=await py(r)(n):r instanceof WebAssembly.Module?r=await py(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await py(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return _h=t(),_h}function py(e){return t=>WebAssembly.instantiate(e,t)}function bee(e){return t=>WebAssembly.instantiateStreaming(e,t)}function xee(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let oN;function wee(e){oN=e}function kee(){return oN}async function sN(e){return e&&await A0(e),{createScanner(t){return new mee(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new aN(t)}}}const Eee=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:sN,getDefaultWasmLoader:kee,loadWasm:A0,setDefaultWasmLoader:wee},Symbol.toStringTag,{value:"Module"}));var lN=w0({});iN(lN,Eee);var Dt=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function See(e){return R0(e)}function R0(e){return Array.isArray(e)?Cee(e):e instanceof RegExp?e:typeof e=="object"?Tee(e):e}function Cee(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=R0(e[n]);return t}function Tee(e){let t={};for(let n in e)t[n]=R0(e[n]);return t}function uN(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function cN(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?cN(e.substring(0,e.length-1)):e.substr(~t+1)}var _y=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,gh=class{static hasCaptures(e){return e===null?!1:(_y.lastIndex=0,_y.test(e))}static replaceCaptures(e,t,n){return e.replace(_y,(r,i,o,s)=>{let u=n[parseInt(i||o,10)];if(u){let c=t.substring(u.start,u.end);for(;c[0]===".";)c=c.substring(1);switch(s){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return r})}};function fN(e,t){return e<t?-1:e>t?1:0}function dN(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;i<n;i++){let o=fN(e[i],t[i]);if(o!==0)return o}return 0}return n-r}function j2(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function hN(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var mN=class{constructor(e){be(this,"cache",new Map);this.fn=e}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},wm=class{constructor(e,t,n){be(this,"_cachedMatchRoot",new mN(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Ree(e),t)}static createFromParsedTheme(e,t){return Lee(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>jee(e.parent,i.parentScopes));return r?new pN(r.fontStyle,r.foreground,r.background):null}},gy=class Hh{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Hh(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new Hh(n,t[r]);return n}push(t){return new Hh(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function jee(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Aee(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Aee(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var pN=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Ree(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,o=t.length;i<o;i++){let s=t[i];if(!s.settings)continue;let u;if(typeof s.scope=="string"){let m=s.scope;m=m.replace(/^[,]+/,""),m=m.replace(/[,]+$/,""),u=m.split(",")}else Array.isArray(s.scope)?u=s.scope:u=[""];let c=-1;if(typeof s.settings.fontStyle=="string"){c=0;let m=s.settings.fontStyle.split(" ");for(let _=0,g=m.length;_<g;_++)switch(m[_]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let f=null;typeof s.settings.foreground=="string"&&j2(s.settings.foreground)&&(f=s.settings.foreground);let h=null;typeof s.settings.background=="string"&&j2(s.settings.background)&&(h=s.settings.background);for(let m=0,_=u.length;m<_;m++){let b=u[m].trim().split(" "),E=b[b.length-1],C=null;b.length>1&&(C=b.slice(0,b.length-1),C.reverse()),n[r++]=new Nee(E,C,i,c,f,h)}}return n}var Nee=class{constructor(e,t,n,r,i,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},In=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(In||{});function Lee(e,t){e.sort((c,f)=>{let h=fN(c.scope,f.scope);return h!==0||(h=dN(c.parentScopes,f.parentScopes),h!==0)?h:c.index-f.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let c=e.shift();c.fontStyle!==-1&&(n=c.fontStyle),c.foreground!==null&&(r=c.foreground),c.background!==null&&(i=c.background)}let o=new zee(t),s=new pN(n,o.getId(r),o.getId(i)),u=new Dee(new Uv(0,null,-1,0,0),[]);for(let c=0,f=e.length;c<f;c++){let h=e[c];u.insert(0,h.scope,h.parentScopes,h.fontStyle,o.getId(h.foreground),o.getId(h.background))}return new wm(o,s,u)}var zee=class{constructor(e){be(this,"_isFrozen");be(this,"_lastColorId");be(this,"_id2color");be(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Mee=Object.freeze([]),Uv=class _N{constructor(t,n,r,i,o){be(this,"scopeDepth");be(this,"parentScopes");be(this,"fontStyle");be(this,"foreground");be(this,"background");this.scopeDepth=t,this.parentScopes=n||Mee,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new _N(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},Dee=class Gv{constructor(t,n=[],r={}){be(this,"_rulesWithParentScopes");this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-t.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,o;if(r===-1?(i=t,o=""):(i=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Gv._cmpBySpecificity),n}insert(t,n,r,i,o,s){if(n===""){this._doInsertHere(t,r,i,o,s);return}let u=n.indexOf("."),c,f;u===-1?(c=n,f=""):(c=n.substring(0,u),f=n.substring(u+1));let h;this._children.hasOwnProperty(c)?h=this._children[c]:(h=new Gv(this._mainRule.clone(),Uv.cloneArr(this._rulesWithParentScopes)),this._children[c]=h),h.insert(t+1,f,r,i,o,s)}_doInsertHere(t,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(t,r,i,o);return}for(let s=0,u=this._rulesWithParentScopes.length;s<u;s++){let c=this._rulesWithParentScopes[s];if(dN(c.parentScopes,n)===0){c.acceptOverwrite(t,r,i,o);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Uv(t,n,r,i,o))}},ou=class zr{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=zr.getLanguageId(t),r=zr.getTokenType(t),i=zr.getFontStyle(t),o=zr.getForeground(t),s=zr.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:o,background:s})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,o,s,u){let c=zr.getLanguageId(t),f=zr.getTokenType(t),h=zr.containsBalancedBrackets(t)?1:0,m=zr.getFontStyle(t),_=zr.getForeground(t),g=zr.getBackground(t);return n!==0&&(c=n),r!==8&&(f=r),i!==null&&(h=i?1:0),o!==-1&&(m=o),s!==0&&(_=s),u!==0&&(g=u),(c<<0|f<<8|h<<10|m<<11|_<<15|g<<24)>>>0}};function km(e,t){const n=[],r=Oee(e);let i=r.next();for(;i!==null;){let c=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let f=s();if(n.push({matcher:f,priority:c}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const c=o();return f=>!!c&&!c(f)}if(i==="("){i=r.next();const c=u();return i===")"&&(i=r.next()),c}if(A2(i)){const c=[];do c.push(i),i=r.next();while(A2(i));return f=>t(c,f)}return null}function s(){const c=[];let f=o();for(;f;)c.push(f),f=o();return h=>c.every(m=>m(h))}function u(){const c=[];let f=s();for(;f&&(c.push(f),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");f=s()}return h=>c.some(m=>m(h))}}function A2(e){return!!e&&!!e.match(/[\w\.:]+/)}function Oee(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function gN(e){typeof e.dispose=="function"&&e.dispose()}var lf=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},qee=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Iee=class{constructor(){be(this,"_references",[]);be(this,"_seenReferenceKeys",new Set);be(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Pee=class{constructor(e,t){be(this,"seenFullScopeRequests",new Set);be(this,"seenPartialScopeRequests",new Set);be(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new lf(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new Iee;for(const n of e)$ee(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof lf){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function $ee(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof lf?Vh({baseGrammar:o,selfGrammar:i},r):Fv(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=n.injections(e.scopeName);if(s)for(const u of s)r.add(new lf(u))}function Fv(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Em([r],t,n)}}function Vh(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Em(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Em(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Em(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?uN({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Em(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const s=yN(o);switch(s.kind){case 0:Vh({...t,selfGrammar:t.baseGrammar},n);break;case 1:Vh(t,n);break;case 2:Fv(s.ruleName,{...t,repository:i},n);break;case 3:case 4:const u=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(u){const c={baseGrammar:t.baseGrammar,selfGrammar:u,repository:i};s.kind===4?Fv(s.ruleName,c,n):Vh(c,n)}else s.kind===4?n.add(new qee(s.scopeName,s.ruleName)):n.add(new lf(s.scopeName));break}}}var Bee=class{constructor(){be(this,"kind",0)}},Uee=class{constructor(){be(this,"kind",1)}},Gee=class{constructor(e){be(this,"kind",2);this.ruleName=e}},Fee=class{constructor(e){be(this,"kind",3);this.scopeName=e}},Hee=class{constructor(e,t){be(this,"kind",4);this.scopeName=e,this.ruleName=t}};function yN(e){if(e==="$base")return new Bee;if(e==="$self")return new Uee;const t=e.indexOf("#");if(t===-1)return new Fee(e);if(t===0)return new Gee(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new Hee(n,r)}}var Vee=/\\(\d+)/,R2=/\\(\d+)/g,Xee=-1,vN=-2;var Af=class{constructor(e,t,n,r){be(this,"$location");be(this,"id");be(this,"_nameIsCapturing");be(this,"_name");be(this,"_contentNameIsCapturing");be(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=gh.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=gh.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${cN(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:gh.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:gh.replaceCaptures(this._contentName,e,t)}},Yee=class extends Af{constructor(t,n,r,i,o){super(t,n,r,i);be(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,r,i){throw new Error("Not supported!")}},Wee=class extends Af{constructor(t,n,r,i,o){super(t,n,r,null);be(this,"_match");be(this,"captures");be(this,"_cachedCompiledPatterns");this._match=new uf(i,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t).compileAG(t,r,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new cf,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},N2=class extends Af{constructor(t,n,r,i,o){super(t,n,r,i);be(this,"hasMissingPatterns");be(this,"patterns");be(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const r of this.patterns)t.getRule(r).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t).compileAG(t,r,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new cf,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Hv=class extends Af{constructor(t,n,r,i,o,s,u,c,f,h){super(t,n,r,i);be(this,"_begin");be(this,"beginCaptures");be(this,"_end");be(this,"endHasBackReferences");be(this,"endCaptures");be(this,"applyEndPatternLast");be(this,"hasMissingPatterns");be(this,"patterns");be(this,"_cachedCompiledPatterns");this._begin=new uf(o,this.id),this.beginCaptures=s,this._end=new uf(u||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=f||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t,n).compileAG(t,r,i)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new cf;for(const r of this.patterns)t.getRule(r).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},Sm=class extends Af{constructor(t,n,r,i,o,s,u,c,f){super(t,n,r,i);be(this,"_begin");be(this,"beginCaptures");be(this,"whileCaptures");be(this,"_while");be(this,"whileHasBackReferences");be(this,"hasMissingPatterns");be(this,"patterns");be(this,"_cachedCompiledPatterns");be(this,"_cachedCompiledWhilePatterns");this._begin=new uf(o,this.id),this.beginCaptures=s,this.whileCaptures=c,this._while=new uf(u,vN),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=f.patterns,this.hasMissingPatterns=f.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t).compileAG(t,r,i)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new cf;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,r,i){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,r,i)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new cf,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||"￿"),this._cachedCompiledWhilePatterns}},bN=class Dn{static createCaptureRule(t,n,r,i,o){return t.registerRule(s=>new Yee(n,s,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Wee(t.$vscodeTextmateLocation,t.id,t.name,t.match,Dn._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=uN({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new N2(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Dn._compilePatterns(o,n,r))}return t.while?new Sm(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Dn._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,Dn._compileCaptures(t.whileCaptures||t.captures,n,r),Dn._compilePatterns(t.patterns,n,r)):new Hv(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Dn._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,Dn._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,Dn._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let o=0;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const u=parseInt(s,10);u>o&&(o=u)}for(let s=0;s<=o;s++)i[s]=null;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const u=parseInt(s,10);let c=0;t[s].patterns&&(c=Dn.getCompiledRuleId(t[s],n,r)),i[u]=Dn.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,c)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let o=0,s=t.length;o<s;o++){const u=t[o];let c=-1;if(u.include){const f=yN(u.include);switch(f.kind){case 0:case 1:c=Dn.getCompiledRuleId(r[u.include],n,r);break;case 2:let h=r[f.ruleName];h&&(c=Dn.getCompiledRuleId(h,n,r));break;case 3:case 4:const m=f.scopeName,_=f.kind===4?f.ruleName:null,g=n.getExternalGrammar(m,r);if(g)if(_){let b=g.repository[_];b&&(c=Dn.getCompiledRuleId(b,n,g.repository))}else c=Dn.getCompiledRuleId(g.repository.$self,n,g.repository);break}}else c=Dn.getCompiledRuleId(u,n,r);if(c!==-1){const f=n.getRule(c);let h=!1;if((f instanceof N2||f instanceof Hv||f instanceof Sm)&&f.hasMissingPatterns&&f.patterns.length===0&&(h=!0),h)continue;i.push(c)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},uf=class xN{constructor(t,n){be(this,"source");be(this,"ruleId");be(this,"hasAnchor");be(this,"hasBackReferences");be(this,"_anchorCache");if(t&&typeof t=="string"){const r=t.length;let i=0,o=[],s=!1;for(let u=0;u<r;u++)if(t.charAt(u)==="\\"&&u+1<r){const f=t.charAt(u+1);f==="z"?(o.push(t.substring(i,u)),o.push("$(?!\\n)(?<!\\n)"),i=u+2):(f==="A"||f==="G")&&(s=!0),u++}this.hasAnchor=s,i===0?this.source=t:(o.push(t.substring(i,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Vee.test(this.source):this.hasBackReferences=!1}clone(){return new xN(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>t.substring(i.start,i.end));return R2.lastIndex=0,this.source.replace(R2,(i,o)=>hN(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],o,s,u,c;for(o=0,s=this.source.length;o<s;o++)u=this.source.charAt(o),t[o]=u,n[o]=u,r[o]=u,i[o]=u,u==="\\"&&o+1<s&&(c=this.source.charAt(o+1),c==="A"?(t[o+1]="￿",n[o+1]="￿",r[o+1]="A",i[o+1]="A"):c==="G"?(t[o+1]="￿",n[o+1]="G",r[o+1]="￿",i[o+1]="G"):(t[o+1]=c,n[o+1]=c,r[o+1]=c,i[o+1]=c),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},cf=class{constructor(){be(this,"_items");be(this,"_hasAnchors");be(this,"_cached");be(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new L2(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new L2(e,r,this._items.map(i=>i.ruleId))}},L2=class{constructor(e,t,n){be(this,"scanner");this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
103
+ `)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},yy=class{constructor(e,t){this.languageId=e,this.tokenType=t}},va,Kee=(va=class{constructor(t,n){be(this,"_defaultAttributes");be(this,"_embeddedLanguagesMatcher");be(this,"_getBasicScopeAttributes",new mN(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new yy(n,r)}));this._defaultAttributes=new yy(t,8),this._embeddedLanguagesMatcher=new Qee(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?va._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(va.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},be(va,"_NULL_SCOPE_METADATA",new yy(0,0)),be(va,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),va),Qee=class{constructor(e){be(this,"values");be(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>hN(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},z2=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function wN(e,t,n,r,i,o,s,u){const c=t.content.length;let f=!1,h=-1;if(s){const g=Zee(e,t,n,r,i,o);i=g.stack,r=g.linePos,n=g.isFirstLine,h=g.anchorPosition}const m=Date.now();for(;!f;){if(u!==0&&Date.now()-m>u)return new z2(i,!0);_()}return new z2(i,!1);function _(){const g=Jee(e,t,n,r,i,h);if(!g){o.produce(i,c),f=!0;return}const b=g.captureIndices,E=g.matchedRuleId,C=b&&b.length>0?b[0].end>r:!1;if(E===Xee){const w=i.getRule(e);o.produce(i,b[0].start),i=i.withContentNameScopesList(i.nameScopesList),Dc(e,t,n,i,o,w.endCaptures,b),o.produce(i,b[0].end);const T=i;if(i=i.parent,h=T.getAnchorPos(),!C&&T.getEnterPos()===r){i=T,o.produce(i,c),f=!0;return}}else{const w=e.getRule(E);o.produce(i,b[0].start);const T=i,k=w.getName(t.content,b),S=i.contentNameScopesList.pushAttributed(k,e);if(i=i.push(E,r,h,b[0].end===c,null,S,S),w instanceof Hv){const z=w;Dc(e,t,n,i,o,z.beginCaptures,b),o.produce(i,b[0].end),h=b[0].end;const R=z.getContentName(t.content,b),M=S.pushAttributed(R,e);if(i=i.withContentNameScopesList(M),z.endHasBackReferences&&(i=i.withEndRule(z.getEndWithResolvedBackReferences(t.content,b))),!C&&T.hasSameRuleAs(i)){i=i.pop(),o.produce(i,c),f=!0;return}}else if(w instanceof Sm){const z=w;Dc(e,t,n,i,o,z.beginCaptures,b),o.produce(i,b[0].end),h=b[0].end;const R=z.getContentName(t.content,b),M=S.pushAttributed(R,e);if(i=i.withContentNameScopesList(M),z.whileHasBackReferences&&(i=i.withEndRule(z.getWhileWithResolvedBackReferences(t.content,b))),!C&&T.hasSameRuleAs(i)){i=i.pop(),o.produce(i,c),f=!0;return}}else if(Dc(e,t,n,i,o,w.captures,b),o.produce(i,b[0].end),i=i.pop(),!C){i=i.safePop(),o.produce(i,c),f=!0;return}}b[0].end>r&&(r=b[0].end,n=!1)}}function Zee(e,t,n,r,i,o){let s=i.beginRuleCapturedEOL?0:-1;const u=[];for(let c=i;c;c=c.pop()){const f=c.getRule(e);f instanceof Sm&&u.push({rule:f,stack:c})}for(let c=u.pop();c;c=u.pop()){const{ruleScanner:f,findOptions:h}=nte(c.rule,e,c.stack.endRule,n,r===s),m=f.findNextMatchSync(t,r,h);if(m){if(m.ruleId!==vN){i=c.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(o.produce(c.stack,m.captureIndices[0].start),Dc(e,t,n,c.stack,o,c.rule.whileCaptures,m.captureIndices),o.produce(c.stack,m.captureIndices[0].end),s=m.captureIndices[0].end,m.captureIndices[0].end>r&&(r=m.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:s,isFirstLine:n}}function Jee(e,t,n,r,i,o){const s=ete(e,t,n,r,i,o),u=e.getInjections();if(u.length===0)return s;const c=tte(u,e,t,n,r,i,o);if(!c)return s;if(!s)return c;const f=s.captureIndices[0].start,h=c.captureIndices[0].start;return h<f||c.priorityMatch&&h===f?c:s}function ete(e,t,n,r,i,o){const s=i.getRule(e),{ruleScanner:u,findOptions:c}=kN(s,e,i.endRule,n,r===o),f=u.findNextMatchSync(t,r,c);return f?{captureIndices:f.captureIndices,matchedRuleId:f.ruleId}:null}function tte(e,t,n,r,i,o,s){let u=Number.MAX_VALUE,c=null,f,h=0;const m=o.contentNameScopesList.getScopeNames();for(let _=0,g=e.length;_<g;_++){const b=e[_];if(!b.matcher(m))continue;const E=t.getRule(b.ruleId),{ruleScanner:C,findOptions:w}=kN(E,t,null,r,i===s),T=C.findNextMatchSync(n,i,w);if(!T)continue;const k=T.captureIndices[0].start;if(!(k>=u)&&(u=k,c=T.captureIndices,f=T.ruleId,h=b.priority,u===i))break}return c?{priorityMatch:h===-1,captureIndices:c,matchedRuleId:f}:null}function kN(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function nte(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Dc(e,t,n,r,i,o,s){if(o.length===0)return;const u=t.content,c=Math.min(o.length,s.length),f=[],h=s[0].end;for(let m=0;m<c;m++){const _=o[m];if(_===null)continue;const g=s[m];if(g.length===0)continue;if(g.start>h)break;for(;f.length>0&&f[f.length-1].endPos<=g.start;)i.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop();if(f.length>0?i.produceFromScopes(f[f.length-1].scopes,g.start):i.produce(r,g.start),_.retokenizeCapturedWithRuleId){const E=_.getName(u,s),C=r.contentNameScopesList.pushAttributed(E,e),w=_.getContentName(u,s),T=C.pushAttributed(w,e),k=r.push(_.retokenizeCapturedWithRuleId,g.start,-1,!1,null,C,T),S=e.createOnigString(u.substring(0,g.end));wN(e,S,n&&g.start===0,g.start,k,i,!1,0),gN(S);continue}const b=_.getName(u,s);if(b!==null){const C=(f.length>0?f[f.length-1].scopes:r.contentNameScopesList).pushAttributed(b,e);f.push(new rte(C,g.end))}}for(;f.length>0;)i.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop()}var rte=class{constructor(e,t){be(this,"scopes");be(this,"endPos");this.scopes=e,this.endPos=t}};function ite(e,t,n,r,i,o,s,u){return new ote(e,t,n,r,i,o,s,u)}function M2(e,t,n,r,i){const o=km(t,Cm),s=bN.getCompiledRuleId(n,r,i.repository);for(const u of o)e.push({debugSelector:t,matcher:u.matcher,ruleId:s,grammar:i,priority:u.priority})}function Cm(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let i=n;i<t.length;i++)if(ate(t[i],r))return n=i+1,!0;return!1})}function ate(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var ote=class{constructor(e,t,n,r,i,o,s,u){be(this,"_rootId");be(this,"_lastRuleId");be(this,"_ruleId2desc");be(this,"_includedGrammars");be(this,"_grammarRepository");be(this,"_grammar");be(this,"_injections");be(this,"_basicScopeAttributesProvider");be(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=u,this._basicScopeAttributesProvider=new Kee(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=D2(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const c of Object.keys(i)){const f=km(c,Cm);for(const h of f)this._tokenTypeMatchers.push({matcher:h.matcher,type:i[c]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const i=r.injections;if(i)for(let s in i)M2(t,s,i[s],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(s=>{const u=this.getExternalGrammar(s);if(u){const c=u.injectionSelector;c&&M2(t,c,u,this,u)}})}return t.sort((i,o)=>i.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=D2(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=bN.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Vv.NULL){i=!0;const f=this._basicScopeAttributesProvider.getDefaultAttributes(),h=this.themeProvider.getDefaults(),m=ou.set(0,f.languageId,f.tokenType,null,h.fontStyle,h.foregroundId,h.backgroundId),_=this.getRule(this._rootId).getName(null,null);let g;_?g=Gc.createRootAndLookUpScopeName(_,m,this):g=Gc.createRoot("unknown",m),t=new Vv(null,this._rootId,-1,-1,!1,null,g,g)}else i=!1,t.reset();e=e+`
104
+ `;const o=this.createOnigString(e),s=o.content.length,u=new lte(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=wN(this,o,i,0,t,u,!0,r);return gN(o),{lineLength:s,lineTokens:u,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function D2(e,t){return e=See(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Gc=class Ni{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=(t==null?void 0:t.scopePath)??null;for(const o of n)i=gy.push(i,o.scopeNames),r=new Ni(r,i,o.encodedTokenAttributes);return r}static createRoot(t,n){return new Ni(null,new gy(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),o=new gy(null,t),s=r.themeProvider.themeMatch(o),u=Ni.mergeAttributes(n,i,s);return new Ni(null,o,u)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Ni.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let i=-1,o=0,s=0;return r!==null&&(i=r.fontStyle,o=r.foregroundId,s=r.backgroundId),ou.set(t,n.languageId,n.tokenType,null,i,o,s)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Ni._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const o of r)i=Ni._pushAttributed(i,o,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),o=t.scopePath.push(n),s=r.themeProvider.themeMatch(o),u=Ni.mergeAttributes(t.tokenAttributes,i,s);return new Ni(t,o,u)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var i;const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(((i=r.parent)==null?void 0:i.scopePath)??null)}),r=r.parent;return r===t?n.reverse():void 0}},Dr,Vv=(Dr=class{constructor(t,n,r,i,o,s,u,c){be(this,"_stackElementBrand");be(this,"_enterPos");be(this,"_anchorPos");be(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=s,this.nameScopesList=u,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}equals(t){return t===null?!1:Dr._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Gc.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Dr._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,o,s,u){return new Dr(this,t,n,r,i,o,s,u)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){var r,i;return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${(r=this.nameScopesList)==null?void 0:r.toString()}, ${(i=this.contentNameScopesList)==null?void 0:i.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Dr(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var t,n,r;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((t=this.parent)==null?void 0:t.nameScopesList)??null))??[],contentNameScopesList:((r=this.contentNameScopesList)==null?void 0:r.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(t,n){const r=Gc.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new Dr(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Gc.fromExtension(r,n.contentNameScopesList))}},be(Dr,"NULL",new Dr(null,0,0,0,!1,null,null,null)),Dr),ste=class{constructor(e,t){be(this,"balancedBracketScopes");be(this,"unbalancedBracketScopes");be(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):km(n,Cm).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>km(n,Cm).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},lte=class{constructor(e,t,n,r){be(this,"_emitBinaryTokens");be(this,"_lineText");be(this,"_tokens");be(this,"_binaryTokens");be(this,"_lastTokenEndIndex");be(this,"_tokenTypeOverrides");this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){var r;if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let i=(e==null?void 0:e.tokenAttributes)??0,o=!1;if((r=this.balancedBracketSelectors)!=null&&r.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=(e==null?void 0:e.getScopeNames())??[];for(const u of this._tokenTypeOverrides)u.matcher(s)&&(i=ou.set(i,0,u.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(s))}if(o&&(i=ou.set(i,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=t;return}const n=(e==null?void 0:e.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},ute=class{constructor(e,t){be(this,"_grammars",new Map);be(this,"_rawGrammars",new Map);be(this,"_injectionGrammars",new Map);be(this,"_theme");this._onigLib=t,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,ite(e,o,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},cte=class{constructor(t){be(this,"_options");be(this,"_syncRegistry");be(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new ute(wm.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(wm.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new ste(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,i,o){const s=new Pee(this._syncRegistry,t);for(;s.Q.length>0;)s.Q.map(u=>this._loadSingleGrammar(u.scopeName)),s.processQueue();return this._grammarForScopeName(t,n,r,i,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,i=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,i)}_grammarForScopeName(t,n=0,r=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,o)}},Xv=Vv.NULL;function Tm(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,o]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof o=="string"?n[i]=o:i===r&&Object.assign(n,o);return n}function Co(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function fte(e){return Array.isArray(e)?e:[e]}async function EN(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function dp(e){return!e||["plaintext","txt","text","plain"].includes(e)}function SN(e){return e==="ansi"||dp(e)}function hp(e){return e==="none"}function CN(e){return hp(e)}const dte=/(\r?\n)/g;function mp(e,t=!1){var o;if(e.length===0)return[["",0]];const n=e.split(dte);let r=0;const i=[];for(let s=0;s<n.length;s+=2){const u=t?n[s]+(n[s+1]||""):n[s];i.push([u,r]),r+=n[s].length,r+=((o=n[s+1])==null?void 0:o.length)||0}return i}const O2={light:"#333333",dark:"#bbbbbb"},q2={light:"#fffffe",dark:"#1e1e1e"},I2="__shiki_resolved";function N0(e){var u,c,f,h,m;if(e!=null&&e[I2])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:n,fg:r}=t;if(!n||!r){const _=t.settings?t.settings.find(g=>!g.name&&!g.scope):void 0;(u=_==null?void 0:_.settings)!=null&&u.foreground&&(r=_.settings.foreground),(c=_==null?void 0:_.settings)!=null&&c.background&&(n=_.settings.background),!r&&((f=t==null?void 0:t.colors)!=null&&f["editor.foreground"])&&(r=t.colors["editor.foreground"]),!n&&((h=t==null?void 0:t.colors)!=null&&h["editor.background"])&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?O2.light:O2.dark),n||(n=t.type==="light"?q2.light:q2.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0;const o=new Map;function s(_){var b;if(o.has(_))return o.get(_);i+=1;const g=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return(b=t.colorReplacements)!=null&&b[`#${g}`]?s(_):(o.set(_,g),g)}t.settings=t.settings.map(_=>{var C,w;const g=((C=_.settings)==null?void 0:C.foreground)&&!_.settings.foreground.startsWith("#"),b=((w=_.settings)==null?void 0:w.background)&&!_.settings.background.startsWith("#");if(!g&&!b)return _;const E={..._,settings:{..._.settings}};if(g){const T=s(_.settings.foreground);t.colorReplacements[T]=_.settings.foreground,E.settings.foreground=T}if(b){const T=s(_.settings.background);t.colorReplacements[T]=_.settings.background,E.settings.background=T}return E});for(const _ of Object.keys(t.colors||{}))if((_==="editor.foreground"||_==="editor.background"||_.startsWith("terminal.ansi"))&&!((m=t.colors[_])!=null&&m.startsWith("#"))){const g=s(t.colors[_]);t.colorReplacements[g]=t.colors[_],t.colors[_]=g}return Object.defineProperty(t,I2,{enumerable:!1,writable:!1,value:!0}),t}async function TN(e){return[...new Set((await Promise.all(e.filter(t=>!SN(t)).map(async t=>await EN(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function jN(e){return(await Promise.all(e.map(async t=>CN(t)?null:N0(await EN(t))))).filter(t=>!!t)}function AN(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Dt(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var hte=class extends cte{constructor(t,n,r,i={}){super(t);be(this,"_resolver");be(this,"_themes");be(this,"_langs");be(this,"_alias");be(this,"_resolvedThemes",new Map);be(this,"_resolvedGrammars",new Map);be(this,"_langMap",new Map);be(this,"_langGraph",new Map);be(this,"_textmateThemeCache",new WeakMap);be(this,"_loadedThemesCache",null);be(this,"_loadedLanguagesCache",null);this._resolver=t,this._themes=n,this._langs=r,this._alias=i,this._themes.map(o=>this.loadTheme(o)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=N0(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=wm.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){return t=AN(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){var o,s,u,c;if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(f=>{var h;return(h=f.embeddedLangsLazy)==null?void 0:h.includes(t.name)}));this._resolver.addLanguage(t);const r={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const i=this.loadGrammarWithConfiguration(t.scopeName,1,r);if(i.name=t.name,this._resolvedGrammars.set(t.name,i),t.aliases&&t.aliases.forEach(f=>{this._alias[f]=t.name}),this._loadedLanguagesCache=null,n.size)for(const f of n)this._resolvedGrammars.delete(f.name),this._loadedLanguagesCache=null,(s=(o=this._syncRegistry)==null?void 0:o._injectionGrammars)==null||s.delete(f.scopeName),(c=(u=this._syncRegistry)==null?void 0:u._grammars)==null||c.delete(f.scopeName),this.loadLanguage(this._langMap.get(f.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const i of t)this.resolveEmbeddedLanguages(i);const n=[...this._langGraph.entries()],r=n.filter(([i,o])=>!o);if(r.length){const i=n.filter(([o,s])=>{var u;return s?(u=s.embeddedLanguages||s.embeddedLangs)==null?void 0:u.some(c=>r.map(([f])=>f).includes(c)):!1}).filter(o=>!r.includes(o));throw new Dt(`Missing languages ${r.map(([o])=>`\`${o}\``).join(", ")}, required by ${i.map(([o])=>`\`${o}\``).join(", ")}`)}for(const[i,o]of n)this._resolver.addLanguage(o);for(const[i,o]of n)this.loadLanguage(o)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const n=t.embeddedLanguages??t.embeddedLangs;if(n)for(const r of n)this._langGraph.set(r,this._langMap.get(r))}},mte=class{constructor(e,t){be(this,"_langs",new Map);be(this,"_scopeToLang",new Map);be(this,"_injections",new Map);be(this,"_onigLib");this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let r=1;r<=t.length;r++){const i=t.slice(0,r).join(".");n=[...n,...this._injections.get(i)||[]]}return n}};let bc=0;function pte(e){bc+=1,e.warnings!==!1&&bc>=10&&bc%10===0&&console.warn(`[Shiki] ${bc} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Dt("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(N0),i=new hte(new mte(e.engine,n),r,n,e.langAlias);let o;function s(T){return AN(T,e.langAlias)}function u(T){C();const k=i.getGrammar(typeof T=="string"?T:T.name);if(!k)throw new Dt(`Language \`${T}\` not found, you may need to load it first`);return k}function c(T){if(T==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};C();const k=i.getTheme(T);if(!k)throw new Dt(`Theme \`${T}\` not found, you may need to load it first`);return k}function f(T){C();const k=c(T);return o!==T&&(i.setTheme(k),o=T),{theme:k,colorMap:i.getColorMap()}}function h(){return C(),i.getLoadedThemes()}function m(){return C(),i.getLoadedLanguages()}function _(...T){C(),i.loadLanguages(T.flat(1))}async function g(...T){return _(await TN(T))}function b(...T){C();for(const k of T.flat(1))i.loadTheme(k)}async function E(...T){return C(),b(await jN(T))}function C(){if(t)throw new Dt("Shiki instance has been disposed")}function w(){t||(t=!0,i.dispose(),bc-=1)}return{setTheme:f,getTheme:c,getLanguage:u,getLoadedThemes:h,getLoadedLanguages:m,resolveLangAlias:s,loadLanguage:g,loadLanguageSync:_,loadTheme:E,loadThemeSync:b,dispose:w,[Symbol.dispose]:w}}async function _te(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([jN(e.themes||[]),TN(e.langs||[]),e.engine]);return pte({...e,themes:t,langs:n,engine:r})}const RN=new WeakMap;function pp(e,t){RN.set(e,t)}function ff(e){return RN.get(e)}var _p=class NN{constructor(...t){be(this,"_stacks",{});be(this,"lang");if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,i]=t;this.lang=r,this._stacks={[i]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new NN(Object.fromEntries(fte(n).map(r=>[r,Xv])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return gte(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function gte(e){const t=[],n=new Set;function r(i){var s;if(n.has(i))return;n.add(i);const o=(s=i==null?void 0:i.nameScopesList)==null?void 0:s.scopeName;o&&t.push(o),i.parent&&r(i.parent)}return r(e),t}function yte(e,t){if(!(e instanceof _p))throw new Dt("Invalid grammar state");return e.getInternalStack(t)}const vte=/,/,bte=/ /;function LN(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if(dp(e.resolveLangAlias(n.lang||"text"))||hp(r))return mp(t).map(u=>[{content:u[0],offset:u[1]}]);const{theme:i,colorMap:o}=e.setTheme(r),s=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==s.name)throw new Dt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(i.name))throw new Dt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return wte(t,s,i,o,n)}function xte(...e){if(e.length===2)return ff(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:o=t.getLoadedThemes()[0]}=r;if(dp(i)||hp(o))throw new Dt("Plain language does not have grammar state");if(i==="ansi")throw new Dt("ANSI language does not have grammar state");const{theme:s,colorMap:u}=t.setTheme(o),c=t.getLanguage(i);return new _p(L0(n,c,s,u,r).stateStack,c.name,s.name)}function wte(e,t,n,r,i){const o=L0(e,t,n,r,i),s=new _p(o.stateStack,t.name,n.name);return pp(o.tokens,s),o.tokens}function L0(e,t,n,r,i){const o=Tm(n,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:u=500}=i,c=mp(e);let f=i.grammarState?yte(i.grammarState,n.name)??Xv:i.grammarContextCode!=null?L0(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:Xv,h=[];const m=[];for(let _=0,g=c.length;_<g;_++){const[b,E]=c[_];if(b===""){h=[],m.push([]);continue}if(s>0&&b.length>=s){h=[],m.push([{content:b,offset:E,color:"",fontStyle:0}]);continue}let C,w,T;i.includeExplanation&&(C=t.tokenizeLine(b,f,u),w=C.tokens,T=0);const k=t.tokenizeLine2(b,f,u),S=k.tokens.length/2;for(let z=0;z<S;z++){const R=k.tokens[2*z],M=z+1<S?k.tokens[2*z+2]:b.length;if(R===M)continue;const X=k.tokens[2*z+1],F=Co(r[ou.getForeground(X)],o),I=ou.getFontStyle(X),U={content:b.substring(R,M),offset:E+R,color:F,fontStyle:I};if(i.includeExplanation){const G=[];if(i.includeExplanation!=="scopeName")for(const $ of n.settings){let Z;switch(typeof $.scope){case"string":Z=$.scope.split(vte).map(A=>A.trim());break;case"object":Z=$.scope;break;default:continue}G.push({settings:$,selectors:Z.map(A=>A.split(bte))})}U.explanation=[];let q=0;for(;R+q<M;){const $=w[T],Z=b.substring($.startIndex,$.endIndex);q+=Z.length,U.explanation.push({content:Z,scopes:i.includeExplanation==="scopeName"?kte($.scopes):Ete(G,$.scopes)}),T+=1}}h.push(U)}m.push(h),h=[],f=k.ruleStack}return{tokens:m,stateStack:f}}function kte(e){return e.map(t=>({scopeName:t}))}function Ete(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const o=t[r];n[r]={scopeName:o,themeMatches:Cte(e,o,t.slice(0,r))}}return n}function P2(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function Ste(e,t,n){if(!P2(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)P2(e[r],n[i])&&(r-=1),i-=1;return r===-1}function Cte(e,t,n){const r=[];for(const{selectors:i,settings:o}of e)for(const s of i)if(Ste(s,t,n)){r.push(o);break}return r}function zN(e,t,n,r=LN){const i=Object.entries(n.themes).filter(f=>f[1]).map(f=>({color:f[0],theme:f[1]})),o=i.map(f=>{const h=r(e,t,{...n,theme:f.theme});return{tokens:h,state:ff(h),theme:typeof f.theme=="string"?f.theme:f.theme.name}}),s=Tte(...o.map(f=>f.tokens)),u=s[0].map((f,h)=>f.map((m,_)=>{const g={content:m.content,variants:{},offset:m.offset};return"includeExplanation"in n&&n.includeExplanation&&(g.explanation=m.explanation),s.forEach((b,E)=>{const{content:C,explanation:w,offset:T,...k}=b[h][_];g.variants[i[E].color]=k}),g})),c=o[0].state?new _p(Object.fromEntries(o.map(f=>{var h;return[f.theme,(h=f.state)==null?void 0:h.getInternalStack(f.theme)]})),o[0].state.lang):void 0;return c&&pp(u,c),u}function Tte(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const i=e.map(c=>c[r]),o=t.map(()=>[]);t.forEach((c,f)=>c.push(o[f]));const s=i.map(()=>0),u=i.map(c=>c[0]);for(;u.every(c=>c);){const c=Math.min(...u.map(f=>f.content.length));for(let f=0;f<n;f++){const h=u[f];h.content.length===c?(o[f].push(h),s[f]+=1,u[f]=i[f][s[f]]):(o[f].push({...h,content:h.content.slice(0,c)}),u[f]={...h,content:h.content.slice(c),offset:h.offset+c})}}}return t}const jte=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Ate=/["&'<>`]/g,Rte=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Nte=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Lte=/[|\\{}()[\]^$+*?.]/g,$2=new WeakMap;function zte(e,t){if(e=e.replace(t.subset?Mte(t.subset):Ate,r),t.subset||t.escapeOnly)return e;return e.replace(Rte,n).replace(Nte,r);function n(i,o,s){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),t)}function r(i,o,s){return t.format(i.charCodeAt(0),s.charCodeAt(o+1),t)}}function Mte(e){let t=$2.get(e);return t||(t=Dte(e),$2.set(e,t)),t}function Dte(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(Lte,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const Ote=/[\dA-Fa-f]/;function qte(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!Ote.test(String.fromCharCode(t))?r:r+";"}const Ite=/\d/;function Pte(e,t,n){const r="&#"+String(e);return n&&t&&!Ite.test(String.fromCharCode(t))?r:r+";"}const $te=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],vy={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Bte=["cent","copy","divide","gt","lt","not","para","times"],MN={}.hasOwnProperty,Yv={};let yh;for(yh in vy)MN.call(vy,yh)&&(Yv[vy[yh]]=yh);const Ute=/[^\dA-Za-z]/;function Gte(e,t,n,r){const i=String.fromCharCode(e);if(MN.call(Yv,i)){const o=Yv[i],s="&"+o;return n&&$te.includes(o)&&!Bte.includes(o)&&(!r||t&&t!==61&&Ute.test(String.fromCharCode(t)))?s:s+";"}return""}function Fte(e,t,n){let r=qte(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Gte(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=Pte(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Hl(e,t){return zte(e,Object.assign({format:Fte},t))}const Hte=/^>|^->|<!--|-->|--!>|<!-$/g,Vte=[">"],Xte=["<",">"];function Yte(e,t,n,r){return r.settings.bogusComments?"<?"+Hl(e.value,Object.assign({},r.settings.characterReferences,{subset:Vte}))+">":"<!--"+e.value.replace(Hte,i)+"-->";function i(o){return Hl(o,Object.assign({},r.settings.characterReferences,{subset:Xte}))}}function Wte(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}const vn=ON(1),DN=ON(-1),Kte=[];function ON(e){return t;function t(n,r,i){const o=n?n.children:Kte;let s=(r||0)+e,u=o[s];if(!i)for(;u&&rp(u);)s+=e,u=o[s];return u}}const Qte={}.hasOwnProperty;function qN(e){return t;function t(n,r,i){return Qte.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const z0=qN({body:Jte,caption:by,colgroup:by,dd:rne,dt:nne,head:by,html:Zte,li:tne,optgroup:ine,option:ane,p:ene,rp:B2,rt:B2,tbody:sne,td:U2,tfoot:lne,th:U2,thead:one,tr:une});function by(e,t,n){const r=vn(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&rp(r.value.charAt(0)))}function Zte(e,t,n){const r=vn(n,t);return!r||r.type!=="comment"}function Jte(e,t,n){const r=vn(n,t);return!r||r.type!=="comment"}function ene(e,t,n){const r=vn(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function tne(e,t,n){const r=vn(n,t);return!r||r.type==="element"&&r.tagName==="li"}function nne(e,t,n){const r=vn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function rne(e,t,n){const r=vn(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function B2(e,t,n){const r=vn(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function ine(e,t,n){const r=vn(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function ane(e,t,n){const r=vn(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function one(e,t,n){const r=vn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function sne(e,t,n){const r=vn(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function lne(e,t,n){return!vn(n,t)}function une(e,t,n){const r=vn(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function U2(e,t,n){const r=vn(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const cne=qN({body:hne,colgroup:mne,head:dne,html:fne,tbody:pne});function fne(e){const t=vn(e,-1);return!t||t.type!=="comment"}function dne(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function hne(e){const t=vn(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&rp(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function mne(e,t,n){const r=DN(n,t),i=vn(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&z0(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function pne(e,t,n){const r=DN(n,t),i=vn(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&z0(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const vh={name:[[`
105
+ \f\r &/=>`.split(""),`
106
+ \f\r "&'/=>\``.split("")],[`\0
107
+ \f\r "&'/<=>`.split(""),`\0
108
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
109
+ \f\r &>`.split(""),`\0
110
+ \f\r "&'<=>\``.split("")],[`\0
111
+ \f\r "&'<=>\``.split(""),`\0
112
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function _ne(e,t,n,r){const i=r.schema,o=i.space==="svg"?!1:r.settings.omitOptionalTags;let s=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const u=[];let c;i.space==="html"&&e.tagName==="svg"&&(r.schema=Cf);const f=gne(r,e.properties),h=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,h&&(s=!1),(f||!o||!cne(e,t,n))&&(u.push("<",e.tagName,f?" "+f:""),s&&(i.space==="svg"||r.settings.closeSelfClosing)&&(c=f.charAt(f.length-1),(!r.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&u.push(" "),u.push("/")),u.push(">")),u.push(h),!s&&(!o||!z0(e,t,n))&&u.push("</"+e.tagName+">"),u.join("")}function gne(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const o=yne(e,i,t[i]);o&&n.push(o)}}for(;++r<n.length;){const o=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&o!=='"'&&o!=="'"&&(n[r]+=" ")}return n.join("")}function yne(e,t,n){const r=UA(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let s=e.quote,u;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const c=Hl(r.attribute,Object.assign({},e.settings.characterReferences,{subset:vh.name[i][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?MA:FA)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(u=Hl(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:vh.unquoted[i][o]}))),u!==n&&(e.settings.quoteSmart&&gm(n,s)>gm(n,e.alternative)&&(s=e.alternative),u=s+Hl(n,Object.assign({},e.settings.characterReferences,{subset:(s==="'"?vh.single:vh.double)[i][o],attribute:!0}))+s),c+(u&&"="+u))}const vne=["<","&"];function IN(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Hl(e.value,Object.assign({},r.settings.characterReferences,{subset:vne}))}function bne(e,t,n,r){return r.settings.allowDangerousHtml?e.value:IN(e,t,n,r)}function xne(e,t,n,r){return r.all(e)}const wne=VK("type",{invalid:kne,unknown:Ene,handlers:{comment:Yte,doctype:Wte,element:_ne,raw:bne,root:xne,text:IN}});function kne(e){throw new Error("Expected node, not `"+e+"`")}function Ene(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const Sne={},Cne={},Tne=[];function jne(e,t){const n=t||Sne,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Ane,all:Rne,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||jte,characterReferences:n.characterReferences||Cne,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Cf:GA,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Ane(e,t,n){return wne(e,t,n,this)}function Rne(e){const t=[],n=e&&e.children||Tne;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}const G2=/\s+/g;function PN(e,t){var r;if(!t)return e;e.properties||(e.properties={}),(r=e.properties).class||(r.class=[]),typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(G2)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(G2);for(const i of n)i&&!e.properties.class.includes(i)&&e.properties.class.push(i);return e}const Nne=/:?lang=["']([^"']+)["']/g,Lne=/(?:```|~~~)([\w-]+)/g,zne=/\\begin\{([\w-]+)\}/g,Mne=/<script\s+(?:type|lang)=["']([^"']+)["']/gi;function Dne(e){const t=mp(e,!0).map(([i])=>i);function n(i){if(i===e.length)return{line:t.length-1,character:t.at(-1).length};let o=i,s=0;for(const u of t){if(o<u.length)break;o-=u.length,s++}return{line:s,character:o}}function r(i,o){let s=0;for(let u=0;u<i;u++)s+=t[u].length;return s+=o,s}return{lines:t,indexToPos:n,posToIndex:r}}function One(e,t,n){const r=new Set;for(const o of e.matchAll(Nne)){const s=o[1].toLowerCase().trim();s&&r.add(s)}for(const o of e.matchAll(Lne)){const s=o[1].toLowerCase().trim();s&&r.add(s)}for(const o of e.matchAll(zne)){const s=o[1].toLowerCase().trim();s&&r.add(s)}for(const o of e.matchAll(Mne)){const s=o[1].toLowerCase().trim(),u=s.includes("/")?s.split("/").pop():s;u&&r.add(u)}if(!n)return[...r];const i=n.getBundledLanguages();return[...r].filter(o=>o&&i[o])}const qne=["color","background-color"];function Ine(e,t){let n=0;const r=[];for(const i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function Pne(e,t){const n=[...t instanceof Set?t:new Set(t)].sort((r,i)=>r-i);return n.length?e.map(r=>r.flatMap(i=>{const o=n.filter(s=>i.offset<s&&s<i.offset+i.content.length).map(s=>s-i.offset).sort((s,u)=>s-u);return o.length?Ine(i,o):i})):e}function $ne(e,t,n,r,i="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},s=t.map(h=>jm(e.variants[h])),u=new Set(s.flatMap(h=>Object.keys(h))),c={},f=(h,m)=>{const _=m==="color"?"":m==="background-color"?"-bg":`-${m}`;return n+t[h]+(m==="color"?"":_)};return s.forEach((h,m)=>{for(const _ of u){const g=h[_]||"inherit";if(m===0&&r&&qne.includes(_))if(r==="light-dark()"&&s.length>1){const b=t.findIndex(C=>C==="light"),E=t.findIndex(C=>C==="dark");if(b===-1||E===-1)throw new Dt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[_]=`light-dark(${s[b][_]||"inherit"}, ${s[E][_]||"inherit"})`,i==="css-vars"&&(c[f(m,_)]=g)}else c[_]=g;else i==="css-vars"&&(c[f(m,_)]=g)}}),o.htmlStyle=c,o}function jm(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&In.Italic&&(t["font-style"]="italic"),e.fontStyle&In.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&In.Underline&&n.push("underline"),e.fontStyle&In.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Wv(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function Bne(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let i=function(s){if(typeof s=="number"){if(s<0||s>n.source.length)throw new Dt(`Invalid decoration offset: ${s}. Code length: ${n.source.length}`);return{...r.indexToPos(s),offset:s}}else{const u=r.lines[s.line];if(u===void 0)throw new Dt(`Invalid decoration position ${JSON.stringify(s)}. Lines length: ${r.lines.length}`);let c=s.character;if(c<0&&(c=u.length+c),c<0||c>u.length)throw new Dt(`Invalid decoration position ${JSON.stringify(s)}. Line ${s.line} length: ${u.length}`);return{...s,character:c,offset:r.posToIndex(s.line,c)}}};const r=Dne(n.source),o=(n.options.decorations||[]).map(s=>({...s,start:i(s.start),end:i(s.end)}));Une(o),e.set(n.meta,{decorations:o,converter:r,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){var r;if((r=this.options.decorations)!=null&&r.length)return Pne(n,t(this).decorations.flatMap(i=>[i.start.offset,i.end.offset]))},code(n){var h;if(!((h=this.options.decorations)!=null&&h.length))return;const r=t(this),i=[...n.children].filter(m=>m.type==="element"&&m.tagName==="span");if(i.length!==r.converter.lines.length)throw new Dt(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function o(m,_,g,b){const E=i[m];let C="",w=-1,T=-1;if(_===0&&(w=0),g===0&&(T=0),g===Number.POSITIVE_INFINITY&&(T=E.children.length),w===-1||T===-1)for(let S=0;S<E.children.length;S++)C+=$N(E.children[S]),w===-1&&C.length===_&&(w=S+1),T===-1&&C.length===g&&(T=S+1);if(w===-1)throw new Dt(`Failed to find start index for decoration ${JSON.stringify(b.start)}`);if(T===-1)throw new Dt(`Failed to find end index for decoration ${JSON.stringify(b.end)}`);const k=E.children.slice(w,T);if(!b.alwaysWrap&&k.length===E.children.length)u(E,b,"line");else if(!b.alwaysWrap&&k.length===1&&k[0].type==="element")u(k[0],b,"token");else{const S={type:"element",tagName:"span",properties:{},children:k};u(S,b,"wrapper"),E.children.splice(w,k.length,S)}}function s(m,_){i[m]=u(i[m],_,"line")}function u(m,_,g){var C;const b=_.properties||{},E=_.transform||(w=>w);return m.tagName=_.tagName||"span",m.properties={...m.properties,...b,class:m.properties.class},(C=_.properties)!=null&&C.class&&PN(m,_.properties.class),m=E(m,g)||m,m}const c=[],f=r.decorations.sort((m,_)=>_.start.offset-m.start.offset||m.end.offset-_.end.offset);for(const m of f){const{start:_,end:g}=m;if(_.line===g.line)o(_.line,_.character,g.character,m);else if(_.line<g.line){o(_.line,_.character,Number.POSITIVE_INFINITY,m);for(let b=_.line+1;b<g.line;b++)c.unshift(()=>s(b,m));o(g.line,0,g.character,m)}}c.forEach(m=>m())}}}function Une(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new Dt(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const i=e[r],o=n.start.offset<=i.start.offset&&i.start.offset<n.end.offset,s=n.start.offset<i.end.offset&&i.end.offset<=n.end.offset,u=i.start.offset<=n.start.offset&&n.start.offset<i.end.offset,c=i.start.offset<n.end.offset&&n.end.offset<=i.end.offset;if(o||s||u||c){if(o&&s||u&&c||u&&n.start.offset===n.end.offset||s&&i.start.offset===i.end.offset)continue;throw new Dt(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function $N(e){return e.type==="text"?e.value:e.type==="element"?e.children.map($N).join(""):""}const Gne=[Bne()];function Am(e){const t=Fne(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...Gne]}function Fne(e){const t=[],n=[],r=[];for(const i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var vs=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],xy={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Hne(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function F2(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function Vne(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)xy[r]&&t.push({type:"setDecoration",value:xy[r]});else if(r<=29){const i=xy[r-20];i&&(t.push({type:"resetDecoration",value:i}),i==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:vs[r-30]}});else if(r===38){const i=F2(e);i&&t.push({type:"setForegroundColor",value:i})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:vs[r-40]}});else if(r===48){const i=F2(e);i&&t.push({type:"setBackgroundColor",value:i})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:vs[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:vs[r-100+8]}})}return t}function Xne(){let e=null,t=null,n=new Set;return{parse(r){const i=[];let o=0;do{const s=Hne(r,o),u=s.sequence?r.substring(o,s.startPosition):r.substring(o);if(u.length>0&&i.push({value:u,foreground:e,background:t,decorations:new Set(n)}),s.sequence){const c=Vne(s.sequence);for(const f of c)f.type==="resetAll"?(e=null,t=null,n.clear()):f.type==="resetForegroundColor"?e=null:f.type==="resetBackgroundColor"?t=null:f.type==="resetDecoration"&&n.delete(f.value);for(const f of c)f.type==="setForegroundColor"?e=f.value:f.type==="setBackgroundColor"?t=f.value:f.type==="setDecoration"&&n.add(f.value)}o=s.position}while(o<r.length);return i}}}var Yne={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function Wne(e=Yne){function t(u){return e[u]}function n(u){return`#${u.map(c=>Math.max(0,Math.min(c,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let f=0;f<vs.length;f++)r.push(t(vs[f]));let u=[0,95,135,175,215,255];for(let f=0;f<6;f++)for(let h=0;h<6;h++)for(let m=0;m<6;m++)r.push(n([u[f],u[h],u[m]]));let c=8;for(let f=0;f<24;f++,c+=10)r.push(n([c,c,c]));return r}function o(u){return i()[u]}function s(u){switch(u.type){case"named":return t(u.name);case"rgb":return n(u.rgb);case"table":return o(u.index)}}return{value:s}}const Kne=/#([0-9a-f]{3,8})/i,Qne=/var\((--[\w-]+-ansi-[\w-]+)\)/,Zne={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function Jne(e,t,n){const r=Tm(e,n),i=mp(t),o=Wne(Object.fromEntries(vs.map(u=>{var f;const c=`terminal.ansi${u[0].toUpperCase()}${u.substring(1)}`;return[u,((f=e.colors)==null?void 0:f[c])||Zne[u]]}))),s=Xne();return i.map(u=>s.parse(u[0]).map(c=>{let f,h;c.decorations.has("reverse")?(f=c.background?o.value(c.background):e.bg,h=c.foreground?o.value(c.foreground):e.fg):(f=c.foreground?o.value(c.foreground):e.fg,h=c.background?o.value(c.background):void 0),f=Co(f,r),h=Co(h,r),c.decorations.has("dim")&&(f=ere(f));let m=In.None;return c.decorations.has("bold")&&(m|=In.Bold),c.decorations.has("italic")&&(m|=In.Italic),c.decorations.has("underline")&&(m|=In.Underline),c.decorations.has("strikethrough")&&(m|=In.Strikethrough),{content:c.value,offset:u[1],color:f,bgColor:h,fontStyle:m}}))}function ere(e){const t=e.match(Kne);if(t){const r=t[1];if(r.length===8){const i=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${i}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const i=r[0],o=r[1],s=r[2],u=r[3];return`#${i}${i}${o}${o}${s}${s}${Math.round(Number.parseInt(`${u}${u}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){const i=r[0],o=r[1],s=r[2];return`#${i}${i}${o}${o}${s}${s}80`}}}const n=e.match(Qne);return n?`var(${n[1]}-dim)`:e}function Kv(e,t,n={}){const r=e.resolveLangAlias(n.lang||"text"),{theme:i=e.getLoadedThemes()[0]}=n;if(!dp(r)&&!hp(i)&&r==="ansi"){const{theme:o}=e.setTheme(i);return Jne(o,t,n)}return LN(e,t,n)}function Rm(e,t,n){let r,i,o,s,u,c;if("themes"in n){const{defaultColor:f="light",cssVariablePrefix:h="--shiki-",colorsRendering:m="css-vars"}=n,_=Object.entries(n.themes).filter(w=>w[1]).map(w=>({color:w[0],theme:w[1]})).sort((w,T)=>w.color===f?-1:T.color===f?1:0);if(_.length===0)throw new Dt("`themes` option must not be empty");const g=zN(e,t,n,Kv);if(c=ff(g),f&&f!=="light-dark()"&&!_.some(w=>w.color===f))throw new Dt(`\`themes\` option must contain the defaultColor key \`${f}\``);const b=_.map(w=>e.getTheme(w.theme)),E=_.map(w=>w.color);o=g.map(w=>w.map(T=>$ne(T,E,h,f,m))),c&&pp(o,c);const C=_.map(w=>Tm(w.theme,n));i=H2(_,b,C,h,f,"fg",m),r=H2(_,b,C,h,f,"bg",m),s=`shiki-themes ${b.map(w=>w.name).join(" ")}`,u=f?void 0:[i,r].join(";")}else if("theme"in n){const f=Tm(n.theme,n);o=Kv(e,t,n);const h=e.getTheme(n.theme);r=Co(h.bg,f),i=Co(h.fg,f),s=h.name,c=ff(o)}else throw new Dt("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:i,bg:r,themeName:s,rootStyle:u,grammarState:c}}function H2(e,t,n,r,i,o,s){return e.map((u,c)=>{const f=Co(t[c][o],n[c])||"inherit",h=`${r+u.color}${o==="bg"?"-bg":""}:${f}`;if(c===0&&i){if(i==="light-dark()"&&e.length>1){const m=e.findIndex(g=>g.color==="light"),_=e.findIndex(g=>g.color==="dark");if(m===-1||_===-1)throw new Dt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Co(t[m][o],n[m])||"inherit"}, ${Co(t[_][o],n[_])||"inherit"});${h}`}return f}return s==="css-vars"?h:null}).filter(u=>!!u).join(";")}const BN=/^\s+$/,tre=/^(\s*)(.*?)(\s*)$/;function Nm(e,t,n,r={meta:{},options:n,codeToHast:(i,o)=>Nm(e,i,o),codeToTokens:(i,o)=>Rm(e,i,o)}){var b,E;let i=t;for(const C of Am(n))i=((b=C.preprocess)==null?void 0:b.call(r,i,n))||i;let{tokens:o,fg:s,bg:u,themeName:c,rootStyle:f,grammarState:h}=Rm(e,i,n);const{mergeWhitespaces:m=!0,mergeSameStyleTokens:_=!1}=n;m===!0?o=rre(o):m==="never"&&(o=ire(o)),_&&(o=are(o));const g={...r,get source(){return i}};for(const C of Am(n))o=((E=C.tokens)==null?void 0:E.call(g,o))||o;return nre(o,{...n,fg:s,bg:u,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??f},g,h)}function nre(e,t,n,r=ff(e)){var E,C,w,T;const i=Am(t),o=[],s={type:"root",children:[]},{structure:u="classic",tabindex:c="0"}=t,f={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?f.style=t.rootStyle:f.style=`background-color:${t.bg};color:${t.fg}`),c!==!1&&c!=null&&(f.tabindex=c.toString());for(const[k,S]of Object.entries(t.meta||{}))k.startsWith("_")||(f[k]=S);let h={type:"element",tagName:"pre",properties:f,children:[],data:t.data},m={type:"element",tagName:"code",properties:{},children:o};const _=[],g={...n,structure:u,addClassToHast:PN,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return s},get pre(){return h},get code(){return m},get lines(){return _}};if(e.forEach((k,S)=>{var M,X;S&&(u==="inline"?s.children.push({type:"element",tagName:"br",properties:{},children:[]}):u==="classic"&&o.push({type:"text",value:`
113
+ `}));let z={type:"element",tagName:"span",properties:{class:"line"},children:[]},R=0;for(const F of k){let I={type:"element",tagName:"span",properties:{...F.htmlAttrs},children:[{type:"text",value:F.content}]};const U=Wv(F.htmlStyle||jm(F));U&&(I.properties.style=U);for(const G of i)I=((M=G==null?void 0:G.span)==null?void 0:M.call(g,I,S+1,R,z,F))||I;u==="inline"?s.children.push(I):u==="classic"&&z.children.push(I),R+=F.content.length}if(u==="classic"){for(const F of i)z=((X=F==null?void 0:F.line)==null?void 0:X.call(g,z,S+1))||z;_.push(z),o.push(z)}else u==="inline"&&_.push(z)}),u==="classic"){for(const k of i)m=((E=k==null?void 0:k.code)==null?void 0:E.call(g,m))||m;h.children.push(m);for(const k of i)h=((C=k==null?void 0:k.pre)==null?void 0:C.call(g,h))||h;s.children.push(h)}else if(u==="inline"){const k=[];let S={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const R of s.children)R.type==="element"&&R.tagName==="br"?(k.push(S),S={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(R.type==="element"||R.type==="text")&&S.children.push(R);k.push(S);let z={type:"element",tagName:"code",properties:{},children:k};for(const R of i)z=((w=R==null?void 0:R.code)==null?void 0:w.call(g,z))||z;s.children=[];for(let R=0;R<z.children.length;R++){R>0&&s.children.push({type:"element",tagName:"br",properties:{},children:[]});const M=z.children[R];M.type==="element"&&s.children.push(...M.children)}}let b=s;for(const k of i)b=((T=k==null?void 0:k.root)==null?void 0:T.call(g,b))||b;return r&&pp(b,r),b}function rre(e){return e.map(t=>{const n=[];let r="",i;return t.forEach((o,s)=>{const u=!(o.fontStyle&&(o.fontStyle&In.Underline||o.fontStyle&In.Strikethrough));u&&BN.test(o.content)&&t[s+1]?(i===void 0&&(i=o.offset),r+=o.content):r?(u?n.push({...o,offset:i,content:r+o.content}):n.push({content:r,offset:i},o),i=void 0,r=""):n.push(o)}),n})}function ire(e){return e.map(t=>t.flatMap(n=>{if(BN.test(n.content))return n;const r=n.content.match(tre);if(!r)return n;const[,i,o,s]=r;if(!i&&!s)return n;const u=[{...n,offset:n.offset+i.length,content:o}];return i&&u.unshift({content:i,offset:n.offset}),s&&u.push({content:s,offset:n.offset+i.length+o.length}),u}))}function are(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const i=n.at(-1),o=Wv(i.htmlStyle||jm(i)),s=Wv(r.htmlStyle||jm(r)),u=i.fontStyle&&(i.fontStyle&In.Underline||i.fontStyle&In.Strikethrough),c=r.fontStyle&&(r.fontStyle&In.Underline||r.fontStyle&In.Strikethrough);!u&&!c&&o===s?i.content+=r.content:n.push({...r})}return n})}const ore=jne;function sre(e,t,n){var o;const r={meta:{},options:n,codeToHast:(s,u)=>Nm(e,s,u),codeToTokens:(s,u)=>Rm(e,s,u)};let i=ore(Nm(e,t,n,r));for(const s of Am(n))i=((o=s.postprocess)==null?void 0:o.call(r,i,n))||i;return i}async function lre(e){const t=await _te(e);return{getLastGrammarState:(...n)=>xte(t,...n),codeToTokensBase:(n,r)=>Kv(t,n,r),codeToTokensWithThemes:(n,r)=>zN(t,n,r),codeToTokens:(n,r)=>Rm(t,n,r),codeToHast:(n,r)=>Nm(t,n,r),codeToHtml:(n,r)=>sre(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function ure(e){const t=e.langs,n=e.themes,r=e.engine;async function i(o){function s(m){var _;if(typeof m=="string"){if(m=((_=o.langAlias)==null?void 0:_[m])||m,SN(m))return[];const g=t[m];if(!g)throw new Dt(`Language \`${m}\` is not included in this bundle. You may want to load it from external source.`);return g}return m}function u(m){if(CN(m))return"none";if(typeof m=="string"){const _=n[m];if(!_)throw new Dt(`Theme \`${m}\` is not included in this bundle. You may want to load it from external source.`);return _}return m}const c=(o.themes??[]).map(m=>u(m)),f=(o.langs??[]).map(m=>s(m)),h=await lre({engine:o.engine??r(),...o,themes:c,langs:f});return{...h,loadLanguage(...m){return h.loadLanguage(...m.map(s))},loadTheme(...m){return h.loadTheme(...m.map(u))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function cre(e){let t;async function n(r={}){if(t){const i=await t;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}else{t=e({...r,themes:[],langs:[]});const i=await t;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}}return n}function fre(e,t){const n=cre(e);async function r(i,o){var c;const s=await n({langs:[o.lang],themes:"theme"in o?[o.theme]:Object.values(o.themes)}),u=await((c=t==null?void 0:t.guessEmbeddedLanguages)==null?void 0:c.call(t,i,o.lang,s));return u&&await s.loadLanguage(...u),s}return{getSingletonHighlighter(i){return n(i)},async codeToHtml(i,o){return(await r(i,o)).codeToHtml(i,o)},async codeToHast(i,o){return(await r(i,o)).codeToHast(i,o)},async codeToTokens(i,o){return(await r(i,o)).codeToTokens(i,o)},async codeToTokensBase(i,o){return(await r(i,o)).codeToTokensBase(i,o)},async codeToTokensWithThemes(i,o){return(await r(i,o)).codeToTokensWithThemes(i,o)},async getLastGrammarState(i,o){return(await n({langs:[o.lang],themes:[o.theme]})).getLastGrammarState(i,o)}}}var dre=w0({bundledLanguages:()=>S0,bundledLanguagesAlias:()=>E0,bundledLanguagesBase:()=>k0,bundledLanguagesInfo:()=>up,bundledThemes:()=>T0,bundledThemesInfo:()=>C0,codeToHast:()=>UN,codeToHtml:()=>D0,codeToTokens:()=>GN,codeToTokensBase:()=>FN,codeToTokensWithThemes:()=>HN,createHighlighter:()=>M0,getLastGrammarState:()=>XN,getSingletonHighlighter:()=>VN});const M0=ure({langs:S0,themes:T0,engine:()=>(0,lN.createOnigurumaEngine)(J(()=>import("./explorer-wasm.js"),[],import.meta.url))}),{codeToHtml:D0,codeToHast:UN,codeToTokens:GN,codeToTokensBase:FN,codeToTokensWithThemes:HN,getSingletonHighlighter:VN,getLastGrammarState:XN}=fre(M0,{guessEmbeddedLanguages:One}),V2=4294967295;var hre=class{constructor(e,t={}){be(this,"patterns");be(this,"options");be(this,"regexps");this.patterns=e,this.options=t;const{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(o=>{if(typeof o!="string")return o;const s=r==null?void 0:r.get(o);if(s){if(s instanceof RegExp)return s;if(n)return null;throw s}try{const u=i(o);return r==null||r.set(o,u),u}catch(u){if(r==null||r.set(o,u),n)return null;throw u}})}findNextMatchSync(e,t,n){const r=typeof e=="string"?e:e.content,i=[];function o(s,u,c=0){return{index:s,captureIndices:u.indices.map(f=>f==null?{start:V2,end:V2,length:0}:{start:f[0]+c,end:f[1]+c,length:f[1]-f[0]})}}for(let s=0;s<this.regexps.length;s++){const u=this.regexps[s];if(u)try{u.lastIndex=t;const c=u.exec(r);if(!c)continue;if(c.index===t)return o(s,c,0);i.push([s,c,0])}catch(c){if(this.options.forgiving)continue;throw c}}if(i.length){const s=Math.min(...i.map(u=>u[1].index));for(const[u,c,f]of i)if(c.index===s)return o(u,c,f)}return null}};function pu(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function mre(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const O0=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),wn=String.raw;function _u(e,t){if(e==null)throw new Error(t??"Value expected");return e}const YN=wn`\[\^?`,WN=`c.? | C(?:-.?)?|${wn`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${wn`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${wn`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${wn`o\{[^\}]*\}?`}|${wn`\d{1,3}`}`,q0=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,bh=new RegExp(wn`
114
+ \\ (?:
115
+ ${WN}
116
+ | [gk]<[^>]*>?
117
+ | [gk]'[^']*'?
118
+ | .
119
+ )
120
+ | \( (?:
121
+ \? (?:
122
+ [:=!>({]
123
+ | <[=!]
124
+ | <[^>]*>
125
+ | '[^']*'
126
+ | ~\|?
127
+ | #(?:[^)\\]|\\.?)*
128
+ | [^:)]*[:)]
129
+ )?
130
+ | \*[^\)]*\)?
131
+ )?
132
+ | (?:${q0.source})+
133
+ | ${YN}
134
+ | .
135
+ `.replace(/\s+/g,""),"gsu"),wy=new RegExp(wn`
136
+ \\ (?:
137
+ ${WN}
138
+ | .
139
+ )
140
+ | \[:(?:\^?\p{Alpha}+|\^):\]
141
+ | ${YN}
142
+ | &&
143
+ | .
144
+ `.replace(/\s+/g,""),"gsu");function pre(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const r=Mre(n.flags),i=[r.extended],o={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(m){i.push(m)},replaceCurrentModX(m){i[i.length-1]=m},singleline:n.rules.singleline};let s=[],u;for(bh.lastIndex=0;u=bh.exec(e);){const m=_re(o,e,u[0],bh.lastIndex);m.tokens?s.push(...m.tokens):m.token&&s.push(m.token),m.lastIndex!==void 0&&(bh.lastIndex=m.lastIndex)}const c=[];let f=0;s.filter(m=>m.type==="GroupOpen").forEach(m=>{m.kind==="capturing"?m.number=++f:m.raw==="("&&c.push(m)}),f||c.forEach((m,_)=>{m.kind="capturing",m.number=_+1});const h=f||c.length;return{tokens:s.map(m=>m.type==="EscapedNumber"?Ore(m,h):m).flat(),flags:r}}function _re(e,t,n,r){const[i,o]=n;if(n==="["||n==="[^"){const s=gre(t,n,r);return{tokens:s.tokens,lastIndex:s.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(o))return{token:X2(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Tre(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:QN(n)}}if(o==="K")return{token:ZN("keep",n)};if(o==="N"||o==="R")return{token:bs("newline",n,{negate:o==="N"})};if(o==="O")return{token:bs("any",n)};if(o==="X")return{token:bs("text_segment",n)};const s=KN(n,{inCharClass:!1});return Array.isArray(s)?{tokens:s}:{token:s}}if(i==="("){if(o==="*")return{token:Nre(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:Rre(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:Ol("group",n)};if(n==="(?>")return{token:Ol("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:Ol(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:Ol("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:Ol("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:Ere(n)}}if(e.getCurrentModX()){if(n==="#"){const s=t.indexOf(`
145
+ `,r);return{lastIndex:s===-1?t.length:s}}if(/^\s$/.test(n)){const s=/\s+/y;return s.lastIndex=r,{lastIndex:s.exec(t)?s.lastIndex:r}}}if(n===".")return{token:bs("dot",n)};if(n==="^"||n==="$"){const s=e.singleline?{"^":wn`\A`,$:wn`\Z`}[n]:n;return{token:X2(s,n)}}return n==="|"?{token:vre(n)}:q0.test(n)?{tokens:qre(n)}:{token:xa(pu(n),n)}}function gre(e,t,n){const r=[Y2(t[1]==="^",t)];let i=1,o;for(wy.lastIndex=n;o=wy.exec(e);){const s=o[0];if(s[0]==="["&&s[1]!==":")i++,r.push(Y2(s[1]==="^",s));else if(s==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(xa(93,s));else if(i--,r.push(bre(s)),!i)break}else{const u=yre(s);Array.isArray(u)?r.push(...u):r.push(u)}}return{tokens:r,lastIndex:wy.lastIndex||e.length}}function yre(e){if(e[0]==="\\")return KN(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!O0.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return bs("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?xre(e):e==="&&"?wre(e):xa(pu(e),e)}function KN(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return Are(e);if("dDhHsSwW".includes(n))return Lre(e);if(e.startsWith(wn`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return zre(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const r=e.split(/\\x/).slice(1).map(s=>parseInt(s,16)),i=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),o=new TextEncoder;return[...i].map(s=>{const u=[...o.encode(s)].map(c=>`\\x${c.toString(16)}`).join("");return xa(pu(s),u)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return xa(Dre(e),e);if(W2.has(n))return xa(W2.get(n),e);if(/\d/.test(n))return kre(t,e);if(e==="\\")throw new Error(wn`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return xa(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function vre(e){return{type:"Alternator",raw:e}}function X2(e,t){return{type:"Assertion",kind:e,raw:t}}function QN(e){return{type:"Backreference",raw:e}}function xa(e,t){return{type:"Character",value:e,raw:t}}function bre(e){return{type:"CharacterClassClose",raw:e}}function xre(e){return{type:"CharacterClassHyphen",raw:e}}function wre(e){return{type:"CharacterClassIntersector",raw:e}}function Y2(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function bs(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function ZN(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:_u(n.flags),raw:t}}function kre(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function Ere(e){return{type:"GroupClose",raw:e}}function Ol(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function Sre(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function Cre(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function Tre(e){return{type:"Subroutine",raw:e}}const jre=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),W2=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Are(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return xa(pu(t.toUpperCase())-64,e)}function Rre(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??(r="");const i=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),o=Q2(n),s=Q2(r),u={};if(o&&(u.enable=o),s&&(u.disable=s),e.endsWith(")"))return t.replaceCurrentModX(i),ZN("flags",e,{flags:u});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,Ol("group",e,{...(o||s)&&{flags:u}});throw new Error(`Unexpected flag modifier "${e}"`)}function Nre(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:r,args:i}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const o=i?i.split(",").filter(h=>h!=="").map(h=>/^[+-]?\d+$/.test(h)?+h:h):[],[s,u,c]=o,f=jre.has(n)?n.toLowerCase():"custom";switch(f){case"fail":case"mismatch":case"skip":if(o.length>0)throw new Error(`Named callout arguments not allowed "${o}"`);break;case"error":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(typeof s=="string")throw new Error(`Named callout argument must be a number "${s}"`);break;case"max":if(!o.length||o.length>2)throw new Error(`Named callout must have one or two arguments "${o}"`);if(typeof s=="string"&&!/^[A-Za-z_]\w*$/.test(s))throw new Error(`Named callout argument one must be a tag or number "${s}"`);if(o.length===2&&(typeof u=="number"||!/^[<>X]$/.test(u)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${u}"`);break;case"count":case"total_count":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(o.length===1&&(typeof s=="number"||!/^[<>X]$/.test(s)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${s}"`);break;case"cmp":if(o.length!==3)throw new Error(`Named callout must have three arguments "${o}"`);if(typeof s=="string"&&!/^[A-Za-z_]\w*$/.test(s))throw new Error(`Named callout argument one must be a tag or number "${s}"`);if(typeof u=="number"||!/^(?:[<>!=]=|[<>])$/.test(u))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${u}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument three must be a tag or number "${c}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${f}"`)}return Sre(f,r??null,(i==null?void 0:i.split(","))??null,e)}function K2(e){let t=null,n,r;if(e[0]==="{"){const{minStr:i,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,s=1e5;if(+i>s||o&&+o>s)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+i,r=o===void 0?+i:o===""?1/0:+o,n>r&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,r=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return Cre(t,n,r,e)}function Lre(e){const t=e[1].toLowerCase();return bs({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function zre(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return bs("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function Q2(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function Mre(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const r=e[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return t}function Dre(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function Ore(e,t){const{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!=="0"&&i.length===1||i[0]!=="0"&&+i<=t))return[QN(n)];const o=[],s=i.match(/^[0-7]+|\d/g);for(let u=0;u<s.length;u++){const c=s[u];let f;if(u===0&&c!=="8"&&c!=="9"){if(f=parseInt(c,8),f>127)throw new Error(wn`Octal encoded byte above 177 unsupported "${n}"`)}else f=pu(c);o.push(xa(f,(u===0?"\\":"")+c))}return o}function qre(e){const t=[],n=new RegExp(q0,"gy");let r;for(;r=n.exec(e);){const i=r[0];if(i[0]==="{"){const o=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(i);if(o){const{min:s,max:u}=o.groups;if(+s>+u&&i.endsWith("?")){n.lastIndex--,t.push(K2(i.slice(0,-1)));continue}}}t.push(K2(i))}return t}function JN(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(r=>t[r]===n[r])}function Ire(e){return Pre.has(e.type)}const Pre=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function e4(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=pre(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(_,g)=>{const b=r.tokens[o.nextIndex];switch(o.parent=_,o.nextIndex++,b.type){case"Alternator":return Ms();case"Assertion":return $re(b);case"Backreference":return Bre(b,o);case"Character":return gp(b.value,{useLastValid:!!g.isCheckingRangeEnd});case"CharacterClassHyphen":return Ure(b,o,g);case"CharacterClassOpen":return Gre(b,o,g);case"CharacterSet":return Fre(b,o);case"Directive":return Kre(b.kind,{flags:b.flags});case"GroupOpen":return Hre(b,o,g);case"NamedCallout":return Zre(b.kind,b.tag,b.arguments);case"Quantifier":return Vre(b,o);case"Subroutine":return Xre(b,o);default:throw new Error(`Unexpected token type "${b.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},s=eie(Qre(r.flags));let u=s.body[0];for(;o.nextIndex<r.tokens.length;){const _=i(u,{});_.type==="Alternative"?(s.body.push(_),u=_):u.body.push(_)}const{capturingGroups:c,hasNumberedRef:f,namedGroupsByName:h,subroutines:m}=o;if(f&&h.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:_}of m)if(typeof _=="number"){if(_>c.length)throw new Error("Subroutine uses a group number that's not defined");_&&(c[_-1].isSubroutined=!0)}else if(h.has(_)){if(h.get(_).length>1)throw new Error(wn`Subroutine uses a duplicate group name "\g<${_}>"`);h.get(_)[0].isSubroutined=!0}else throw new Error(wn`Subroutine uses a group name that's not defined "\g<${_}>"`);return s}function $re({kind:e}){return Qv(_u({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===wn`\B`||e===wn`\Y`})}function Bre({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(o,s=!1)=>{const u=t.capturingGroups.length;let c=!1;if(o>u)if(t.skipBackrefValidation)c=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,Zv(s?u+1-o:o,{orphan:c})};if(n){const o=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(o)return i(+o.groups.num,!!o.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${e}"`);return Zv(r)}return i(+r)}function Ure(e,t,n){const{tokens:r,walk:i}=t,o=t.parent,s=o.body.at(-1),u=r[t.nextIndex];if(!n.isCheckingRangeEnd&&s&&s.type!=="CharacterClass"&&s.type!=="CharacterClassRange"&&u&&u.type!=="CharacterClassOpen"&&u.type!=="CharacterClassClose"&&u.type!=="CharacterClassIntersector"){const c=i(o,{...n,isCheckingRangeEnd:!0});if(s.type==="Character"&&c.type==="Character")return o.body.pop(),Wre(s,c);throw new Error("Invalid character class range")}return gp(pu("-"))}function Gre({negate:e},t,n){const{tokens:r,walk:i}=t,o=[Xh()],s=r[t.nextIndex];let u=eC(s);for(;u.type!=="CharacterClassClose";){if(u.type==="CharacterClassIntersector")o.push(Xh()),t.nextIndex++;else{const f=o.at(-1);f.body.push(i(f,n))}u=eC(r[t.nextIndex],s)}const c=Xh({negate:e});return o.length===1?c.body=o[0].body:(c.kind="intersection",c.body=o.map(f=>f.body.length===1?f.body[0]:f)),t.nextIndex++,c}function Fre({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:s}=r;if(e==="property"){const u=yp(n);if(O0.has(u)&&!(s!=null&&s.has(u)))e="posix",n=u;else return ql(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:s})}return e==="posix"?Jre(n,{negate:t}):Jv(e,{negate:t})}function Hre(e,t,n){const{tokens:r,capturingGroups:i,namedGroupsByName:o,skipLookbehindValidation:s,walk:u}=t,c=tie(e),f=c.type==="AbsenceFunction",h=J2(c),m=h&&c.negate;if(c.type==="CapturingGroup"&&(i.push(c),c.name&&mre(o,c.name,[]).push(c)),f&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let _=tC(r[t.nextIndex]);for(;_.type!=="GroupClose";){if(_.type==="Alternator")c.body.push(Ms()),t.nextIndex++;else{const g=c.body.at(-1),b=u(g,{...n,isInAbsenceFunction:n.isInAbsenceFunction||f,isInLookbehind:n.isInLookbehind||h,isInNegLookbehind:n.isInNegLookbehind||m});if(g.body.push(b),(h||n.isInLookbehind)&&!s){const E="Lookbehind includes a pattern not allowed by Oniguruma";if(m||n.isInNegLookbehind){if(Z2(b)||b.type==="CapturingGroup")throw new Error(E)}else if(Z2(b)||J2(b)&&b.negate)throw new Error(E)}}_=tC(r[t.nextIndex])}return t.nextIndex++,c}function Vre({kind:e,min:t,max:n},r){const i=r.parent,o=i.body.at(-1);if(!o||!Ire(o))throw new Error("Quantifier requires a repeatable token");const s=n4(e,t,n,o);return i.body.pop(),s}function Xre({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let i=e.slice(3,-1);const o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(o){const u=+o.groups.num,c=n.length;if(t.hasNumberedRef=!0,i={"":u,"+":c+u,"-":c+1-u}[o.groups.sign],i<1)throw new Error("Invalid subroutine number")}else i==="0"&&(i=0);const s=r4(i);return r.push(s),s}function Yre(e,t){return{type:"AbsenceFunction",kind:e,body:Rf(t==null?void 0:t.body)}}function Ms(e){return{type:"Alternative",body:i4(e==null?void 0:e.body)}}function Qv(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!(t!=null&&t.negate)),n}function Zv(e,t){const n=!!(t!=null&&t.orphan);return{type:"Backreference",ref:e,...n&&{orphan:n}}}function t4(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!nie(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Rf(t==null?void 0:t.body)}}function gp(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:e}}function Xh(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:i4(e==null?void 0:e.body)}}function Wre(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function Jv(e,t){const n=!!(t!=null&&t.negate),r={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(r.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(r.variableLength=!0),r}function Kre(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:_u(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function Qre(e){return{type:"Flags",...e}}function ai(e){const t=e==null?void 0:e.atomic,n=e==null?void 0:e.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:Rf(e==null?void 0:e.body)}}function _s(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Rf(e==null?void 0:e.body)}}function Zre(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function Jre(e,t){const n=!!(t!=null&&t.negate);if(!O0.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function n4(e,t,n,r){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function eie(e,t){return{type:"Regex",body:Rf(t==null?void 0:t.body),flags:e}}function r4(e){return{type:"Subroutine",ref:e}}function ql(e,t){var i;const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=(i=n.unicodePropertyMap)==null?void 0:i.get(yp(e));if(!r){if(n.normalizeUnknownPropertyNames)r=rie(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(wn`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function tie({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case"absence_repeater":return Yre("repeater");case"atomic":return ai({atomic:!0});case"capturing":return t4(i,{name:n});case"group":return ai({flags:e});case"lookahead":case"lookbehind":return _s({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function Rf(e){if(e===void 0)e=[Ms()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function i4(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function Z2(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function J2(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function nie(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function rie(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function yp(e){return e.replace(/[- _]+/g,"").toLowerCase()}function eC(e,t){const n=t;return _u(e,`Unclosed character class${(n==null?void 0:n.type)==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function tC(e){return _u(e,"Unclosed group")}function Fc(e,t,n=null){function r(o,s){for(let u=0;u<o.length;u++){const c=i(o[u],s,u,o);u=Math.max(-1,u+c)}}function i(o,s=null,u=null,c=null){var w,T;let f=0,h=!1;const m={node:o,parent:s,key:u,container:c,root:e,remove(){xh(c).splice(Math.max(0,Nl(u)+f),1),f--,h=!0},removeAllNextSiblings(){return xh(c).splice(Nl(u)+1)},removeAllPrevSiblings(){const k=Nl(u)+f;return f-=k,xh(c).splice(0,Math.max(0,k))},replaceWith(k,S={}){const z=!!S.traverse;c?c[Math.max(0,Nl(u)+f)]=k:_u(s,"Can't replace root node")[u]=k,z&&i(k,s,u,c),h=!0},replaceWithMultiple(k,S={}){const z=!!S.traverse;if(xh(c).splice(Math.max(0,Nl(u)+f),1,...k),f+=k.length-1,z){let R=0;for(let M=0;M<k.length;M++)R+=i(k[M],s,Nl(u)+M+R,c)}h=!0},skip(){h=!0}},{type:_}=o,g=t["*"],b=t[_],E=typeof g=="function"?g:g==null?void 0:g.enter,C=typeof b=="function"?b:b==null?void 0:b.enter;if(E==null||E(m,n),C==null||C(m,n),!h)switch(_){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":r(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":i(o.min,o,"min"),i(o.max,o,"max");break;case"Quantifier":i(o.body,o,"body");break;case"Regex":r(o.body,o),i(o.flags,o,"flags");break;default:throw new Error(`Unexpected node type "${_}"`)}return(w=b==null?void 0:b.exit)==null||w.call(b,m,n),(T=g==null?void 0:g.exit)==null||T.call(g,m,n),f}return i(e),e}function xh(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Nl(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const iie=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function aie(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function oie(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const Ir=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function I0(e,t,n,r){const i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1];let s=0,u="";for(const c of e.matchAll(i)){const{0:f,groups:{$skip:h}}=c;if(!h&&(!r||r===Ir.DEFAULT==!s)){n instanceof Function?u+=n(c,{context:s?Ir.CHAR_CLASS:Ir.DEFAULT,negated:o[o.length-1]}):u+=n;continue}f[0]==="["?(s++,o.push(f[1]==="^")):f==="]"&&s&&(s--,o.pop()),u+=f}return u}function a4(e,t,n,r){I0(e,t,n,r)}function sie(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const i=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");i.lastIndex=n;let o=0,s;for(;s=i.exec(e);){const{0:u,groups:{$skip:c}}=s;if(!c&&(!r||r===Ir.DEFAULT==!o))return s;u==="["?o++:u==="]"&&o&&o--,i.lastIndex==s.index&&i.lastIndex++}return null}function wh(e,t,n){return!!sie(e,t,0,n)}function lie(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,o=1,s;for(;s=n.exec(e);){const[u]=s;if(u==="[")i++;else if(i)u==="]"&&i--;else if(u==="(")o++;else if(u===")"&&(o--,!o)){r=s.index;break}}return e.slice(t,r)}const nC=new RegExp(String.raw`(?<noncapturingStart>${iie})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function uie(e,t){const n=(t==null?void 0:t.hiddenCaptures)??[];let r=(t==null?void 0:t.captureTransfers)??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};const i="(?>",o="(?:(?=(",s=[0],u=[];let c=0,f=0,h=NaN,m;do{m=!1;let _=0,g=0,b=!1,E;for(nC.lastIndex=Number.isNaN(h)?0:h+o.length;E=nC.exec(e);){const{0:C,index:w,groups:{capturingStart:T,noncapturingStart:k}}=E;if(C==="[")_++;else if(_)C==="]"&&_--;else if(C===i&&!b)h=w,b=!0;else if(b&&k)g++;else if(T)b?g++:(c++,s.push(c+f));else if(C===")"&&b){if(!g){f++;const S=c+f;if(e=`${e.slice(0,h)}${o}${e.slice(h+i.length,w)}))<$$${S}>)${e.slice(w+1)}`,m=!0,u.push(S),aie(n,S),r.size){const z=new Map;r.forEach((R,M)=>{z.set(M>=S?M+1:M,R.map(X=>X>=S?X+1:X))}),r=z}break}g--}}}while(m);return n.push(...u),e=I0(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:_,groups:{backrefNum:g,wrappedBackrefNum:b}})=>{if(g){const E=+g;if(E>s.length-1)throw new Error(`Backref "${_}" greater than number of captures`);return`\\${s[E]}`}return`\\${b}`},Ir.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const o4=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,ky=new RegExp(String.raw`
146
+ \\(?: \d+
147
+ | c[A-Za-z]
148
+ | [gk]<[^>]+>
149
+ | [pPu]\{[^\}]+\}
150
+ | u[A-Fa-f\d]{4}
151
+ | x[A-Fa-f\d]{2}
152
+ )
153
+ | \((?: \? (?: [:=!>]
154
+ | <(?:[=!]|[^>]+>)
155
+ | [A-Za-z\-]+:
156
+ | \(DEFINE\)
157
+ ))?
158
+ | (?<qBase>${o4})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
159
+ | \\?.
160
+ `.replace(/\s+/g,""),"gsu");function cie(e){if(!new RegExp(`${o4}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,i="",o=0,s;for(ky.lastIndex=0;s=ky.exec(e);){const{0:u,index:c,groups:{qBase:f,qMod:h,invalidQ:m}}=s;if(u==="[")o||(r=c),o++;else if(u==="]")o?o--:r=null;else if(!o)if(h==="+"&&i&&!i.startsWith("(")){if(m)throw new Error(`Invalid quantifier "${u}"`);let _=-1;if(/^\{\d+\}$/.test(f))e=oie(e,c+f.length,h,"");else{if(i===")"||i==="]"){const g=i===")"?n:r;if(g===null)throw new Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,g)}(?>${e.slice(g,c)}${f})${e.slice(c+u.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${f})${e.slice(c+u.length)}`;_+=4}ky.lastIndex+=_}else u[0]==="("?t.push(c):u===")"&&(n=t.length?t.pop():null);i=u}return{pattern:e}}const qr=String.raw,fie=qr`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,e1=qr`\(\?R=(?<rDepth>[^\)]+)\)|${fie}`,vp=qr`\(\?<(?![=!])(?<captureName>[^>]+)>`,s4=qr`${vp}|(?<unnamed>\()(?!\?)`,fs=new RegExp(qr`${vp}|${e1}|\(\?|\\?.`,"gsu"),Ey="Cannot use multiple overlapping recursions";function die(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let i=(t==null?void 0:t.captureTransfers)??new Map;if(!new RegExp(e1,"su").test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r==="plugin"&&wh(e,qr`\(\?\(DEFINE\)`,Ir.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const o=[],s=wh(e,qr`\\[1-9]`,Ir.DEFAULT),u=new Map,c=[];let f=!1,h=0,m=0,_;for(fs.lastIndex=0;_=fs.exec(e);){const{0:g,groups:{captureName:b,rDepth:E,gRNameOrNum:C,gRDepth:w}}=_;if(g==="[")h++;else if(h)g==="]"&&h--;else if(E){if(rC(E),f)throw new Error(Ey);if(s)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const T=e.slice(0,_.index),k=e.slice(fs.lastIndex);if(wh(k,e1,Ir.DEFAULT))throw new Error(Ey);const S=+E-1;e=iC(T,k,S,!1,n,o,m),i=oC(i,T,S,o.length,0,m);break}else if(C){rC(w);let T=!1;for(const G of c)if(G.name===C||G.num===+C){if(T=!0,G.hasRecursedWithin)throw new Error(Ey);break}if(!T)throw new Error(qr`Recursive \g cannot be used outside the referenced group "${r==="external"?C:qr`\g<${C}&R=${w}>`}"`);const k=u.get(C),S=lie(e,k);if(s&&wh(S,qr`${vp}|\((?!\?)`,Ir.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const z=e.slice(k,_.index),R=S.slice(z.length+g.length),M=o.length,X=+w-1,F=iC(z,R,X,!0,n,o,m);i=oC(i,z,X,o.length-M,M,m);const I=e.slice(0,k),U=e.slice(k+S.length);e=`${I}${F}${U}`,fs.lastIndex+=F.length-g.length-z.length-R.length,c.forEach(G=>G.hasRecursedWithin=!0),f=!0}else if(b)m++,u.set(String(m),fs.lastIndex),u.set(b,fs.lastIndex),c.push({num:m,name:b});else if(g[0]==="("){const T=g==="(";T&&(m++,u.set(String(m),fs.lastIndex)),c.push(T?{num:m}:{})}else g===")"&&c.pop()}return n.push(...o),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function rC(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function iC(e,t,n,r,i,o,s){const u=new Set;r&&a4(e+t,vp,({groups:{captureName:f}})=>{u.add(f)},Ir.DEFAULT);const c=[n,r?u:null,i,o,s];return`${e}${aC(`(?:${e}`,"forward",...c)}(?:)${aC(`${t})`,"backward",...c)}${t}`}function aC(e,t,n,r,i,o,s){const c=h=>t==="forward"?h+2:n-h+2-1;let f="";for(let h=0;h<n;h++){const m=c(h);f+=I0(e,qr`${s4}|\\k<(?<backref>[^>]+)>`,({0:_,groups:{captureName:g,unnamed:b,backref:E}})=>{if(E&&r&&!r.has(E))return _;const C=`_$${m}`;if(b||g){const w=s+o.length+1;return o.push(w),hie(i,w),b?_:`(?<${g}${C}>`}return qr`\k<${E}${C}>`},Ir.DEFAULT)}return f}function hie(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function oC(e,t,n,r,i,o){if(e.size&&r){let s=0;a4(t,s4,()=>s++,Ir.DEFAULT);const u=o-s+i,c=new Map;return e.forEach((f,h)=>{const m=(r-s*n)/n,_=s*n,g=h>u+s?h+r:h,b=[];for(const E of f)if(E<=u)b.push(E);else if(E>u+s+m)b.push(E+r);else if(E<=u+s)for(let C=0;C<=n;C++)b.push(E+s*C);else for(let C=0;C<=n;C++)b.push(E+_+m*C);c.set(g,b)}),c}return e}var pn=String.fromCodePoint,Je=String.raw,ci={},bp=globalThis.RegExp;ci.flagGroups=(()=>{try{new bp("(?i:)")}catch{return!1}return!0})();ci.unicodeSets=(()=>{try{new bp("[[]]","v")}catch{return!1}return!0})();ci.bugFlagVLiteralHyphenIsRange=ci.unicodeSets?(()=>{try{new bp(Je`[\d\-a]`,"v")}catch{return!0}return!1})():!1;ci.bugNestedClassIgnoresNegation=ci.unicodeSets&&new bp("[[^a]]","v").test("a");function Lm(e,{enable:t,disable:n}){return{dotAll:!(n!=null&&n.dotAll)&&!!(t!=null&&t.dotAll||e.dotAll),ignoreCase:!(n!=null&&n.ignoreCase)&&!!(t!=null&&t.ignoreCase||e.ignoreCase)}}function df(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function t1(e,t){return sC[e]>=sC[t]}function mie(e,t){if(e==null)throw new Error(t??"Value expected");return e}var sC={ES2025:2025,ES2024:2024,ES2018:2018},pie={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function l4(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!pie[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=ci.flagGroups?"ES2025":ci.unicodeSets?"ES2024":"ES2018"),t}var _ie="[ -\r ]",gie=new Set([pn(304),pn(305)]),fa=Je`[\p{L}\p{M}\p{N}\p{Pc}]`;function u4(e){if(gie.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=bie.get(n),o=yie.get(n),s=vie.get(n);return[...r].length===1&&t.add(r),s&&t.add(s),i&&t.add(i),t.add(n),o&&t.add(o),[...t]}var P0=new Map(`C Other
161
+ Cc Control cntrl
162
+ Cf Format
163
+ Cn Unassigned
164
+ Co Private_Use
165
+ Cs Surrogate
166
+ L Letter
167
+ LC Cased_Letter
168
+ Ll Lowercase_Letter
169
+ Lm Modifier_Letter
170
+ Lo Other_Letter
171
+ Lt Titlecase_Letter
172
+ Lu Uppercase_Letter
173
+ M Mark Combining_Mark
174
+ Mc Spacing_Mark
175
+ Me Enclosing_Mark
176
+ Mn Nonspacing_Mark
177
+ N Number
178
+ Nd Decimal_Number digit
179
+ Nl Letter_Number
180
+ No Other_Number
181
+ P Punctuation punct
182
+ Pc Connector_Punctuation
183
+ Pd Dash_Punctuation
184
+ Pe Close_Punctuation
185
+ Pf Final_Punctuation
186
+ Pi Initial_Punctuation
187
+ Po Other_Punctuation
188
+ Ps Open_Punctuation
189
+ S Symbol
190
+ Sc Currency_Symbol
191
+ Sk Modifier_Symbol
192
+ Sm Math_Symbol
193
+ So Other_Symbol
194
+ Z Separator
195
+ Zl Line_Separator
196
+ Zp Paragraph_Separator
197
+ Zs Space_Separator
198
+ ASCII
199
+ ASCII_Hex_Digit AHex
200
+ Alphabetic Alpha
201
+ Any
202
+ Assigned
203
+ Bidi_Control Bidi_C
204
+ Bidi_Mirrored Bidi_M
205
+ Case_Ignorable CI
206
+ Cased
207
+ Changes_When_Casefolded CWCF
208
+ Changes_When_Casemapped CWCM
209
+ Changes_When_Lowercased CWL
210
+ Changes_When_NFKC_Casefolded CWKCF
211
+ Changes_When_Titlecased CWT
212
+ Changes_When_Uppercased CWU
213
+ Dash
214
+ Default_Ignorable_Code_Point DI
215
+ Deprecated Dep
216
+ Diacritic Dia
217
+ Emoji
218
+ Emoji_Component EComp
219
+ Emoji_Modifier EMod
220
+ Emoji_Modifier_Base EBase
221
+ Emoji_Presentation EPres
222
+ Extended_Pictographic ExtPict
223
+ Extender Ext
224
+ Grapheme_Base Gr_Base
225
+ Grapheme_Extend Gr_Ext
226
+ Hex_Digit Hex
227
+ IDS_Binary_Operator IDSB
228
+ IDS_Trinary_Operator IDST
229
+ ID_Continue IDC
230
+ ID_Start IDS
231
+ Ideographic Ideo
232
+ Join_Control Join_C
233
+ Logical_Order_Exception LOE
234
+ Lowercase Lower
235
+ Math
236
+ Noncharacter_Code_Point NChar
237
+ Pattern_Syntax Pat_Syn
238
+ Pattern_White_Space Pat_WS
239
+ Quotation_Mark QMark
240
+ Radical
241
+ Regional_Indicator RI
242
+ Sentence_Terminal STerm
243
+ Soft_Dotted SD
244
+ Terminal_Punctuation Term
245
+ Unified_Ideograph UIdeo
246
+ Uppercase Upper
247
+ Variation_Selector VS
248
+ White_Space space
249
+ XID_Continue XIDC
250
+ XID_Start XIDS`.split(/\s/).map(e=>[yp(e),e])),yie=new Map([["s",pn(383)],[pn(383),"s"]]),vie=new Map([[pn(223),pn(7838)],[pn(107),pn(8490)],[pn(229),pn(8491)],[pn(969),pn(8486)]]),bie=new Map([go(453),go(456),go(459),go(498),...Sy(8072,8079),...Sy(8088,8095),...Sy(8104,8111),go(8124),go(8140),go(8188)]),xie=new Map([["alnum",Je`[\p{Alpha}\p{Nd}]`],["alpha",Je`\p{Alpha}`],["ascii",Je`\p{ASCII}`],["blank",Je`[\p{Zs}\t]`],["cntrl",Je`\p{Cc}`],["digit",Je`\p{Nd}`],["graph",Je`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",Je`\p{Lower}`],["print",Je`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",Je`[\p{P}\p{S}]`],["space",Je`\p{space}`],["upper",Je`\p{Upper}`],["word",Je`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",Je`\p{AHex}`]]);function wie(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function go(e){const t=pn(e);return[t.toLowerCase(),t]}function Sy(e,t){return wie(e,t).map(n=>go(n))}var c4=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function kie(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};f4(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:t1(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Fc(e,Eie,r);const i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},o={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};Fc(e,Sie,o);const s={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return Fc(e,Cie,s),e._originMap=o.groupOriginByCopy,e._strategy=r.strategy,e}var Eie={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:i}=e;if(i==="repeater"){const o=ai();o.body[0].body.push(_s({negate:!0,body:r}),ql("Any"));const s=ai();s.body[0].body.push(n4("greedy",0,1/0,o)),n(rn(s,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const i=e.body.filter(o=>o.kind==="flags");for(let o=n+1;o<t.body.length;o++){const s=t.body[o];df(r,s,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){var n;if((n=t.get(e))!=null&&n.length){const r=h4(t.get(e));if(r){const i=ai({flags:r});i.body[0].body=e.body,e.body=[rn(i,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:o,replaceWith:s},u){const{kind:c,negate:f}=e,{asciiWordBoundaries:h,avoidSubclass:m,supportedGNodes:_,wordIsAscii:g}=u;if(c==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${f?"Y":"y"}"`);if(c==="line_end")s(rn(_s({body:[Ms({body:[Qv("string_end")]}),Ms({body:[gp(10)]})]}),t));else if(c==="line_start")s(rn(da(Je`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c==="search_start")if(_.has(e))i.flags.sticky=!0,o();else{const b=r[n-1];if(b&&Lie(b))s(rn(_s({negate:!0}),t));else{if(m)throw new Error(Je`Uses "\G" in a way that requires a subclass`);s(yo(Qv("string_start"),t)),u.strategy="clip_search"}}else if(!(c==="string_end"||c==="string_start"))if(c==="string_end_newline")s(rn(da(Je`(?=\n?\z)`),t));else if(c==="word_boundary"){if(!g&&!h){const b=`(?:(?<=${fa})(?!${fa})|(?<!${fa})(?=${fa}))`,E=`(?:(?<=${fa})(?=${fa})|(?<!${fa})(?!${fa}))`;s(rn(da(f?E:b),t))}}else throw new Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Ty(n)&&(n=Cy(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!Ty(r)&&(r=Cy(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const r=Xh({body:[e]});n(rn(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:o,spaceIsAscii:s,wordIsAscii:u}){const{kind:c,negate:f,value:h}=e;if(o&&(c==="digit"||h==="digit")){n(yo(Jv("digit",{negate:f}),t));return}if(s&&(c==="space"||h==="space")){n(rn(jy(da(_ie),f),t));return}if(u&&(c==="word"||h==="word")){n(yo(Jv("word",{negate:f}),t));return}if(c==="any")n(yo(ql("Any"),t));else if(c==="digit")n(yo(ql("Nd",{negate:f}),t));else if(c!=="dot")if(c==="text_segment"){if(r==="strict")throw new Error(Je`Use of "\X" requires non-strict accuracy`);const m="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",_=Je`\p{RI}{2}|${m}(?:\u200D${m})*`;n(rn(da(Je`(?>\r\n|${i?Je`\p{RGI_Emoji}`:_}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c==="hex")n(yo(ql("AHex",{negate:f}),t));else if(c==="newline")n(rn(da(f?`[^
251
+ ]`:`(?>\r
252
+ ?|[
253
+ \v\f…\u2028\u2029])`),t));else if(c==="posix")if(!i&&(h==="graph"||h==="print")){if(r==="strict")throw new Error(`POSIX class "${h}" requires min target ES2024 or non-strict accuracy`);let m={graph:"!-~",print:" -~"}[h];f&&(m=`\0-${pn(m.codePointAt(0)-1)}${pn(m.codePointAt(2)+1)}-􏿿`),n(rn(da(`[${m}]`),t))}else n(rn(jy(da(xie.get(h)),f),t));else if(c==="property")P0.has(yp(h))||(e.key="sc");else if(c==="space")n(yo(ql("space",{negate:f}),t));else if(c==="word")n(rn(jy(da(fa),f),t));else throw new Error(`Unexpected character set kind "${c}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:o,removeAllNextSiblings:s}){const{kind:u,flags:c}=e;if(u==="flags")if(!c.enable&&!c.disable)r();else{const f=ai({flags:c});f.body[0].body=s(),i(rn(f,t),{traverse:!0})}else if(u==="keep"){const f=n.body[0],m=n.body.length===1&&JN(f,{type:"Group"})&&f.body[0].body.length===1?f.body[0]:n;if(t.parent!==m||m.body.length>1)throw new Error(Je`Uses "\K" in a way that's unsupported`);const _=_s({behind:!0});_.body[0].body=o(),i(rn(_,t))}else throw new Error(`Unexpected directive kind "${u}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t!=null&&t.extended&&delete t.extended,n!=null&&n.extended&&delete n.extended,t!=null&&t.dotAll&&(n!=null&&n.dotAll)&&delete t.dotAll,t!=null&&t.ignoreCase&&(n!=null&&n.ignoreCase)&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:r}=e;if(r==="fail")n(rn(_s({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=ai();t.body[0].body.push(e.body),e.body=rn(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,i=!1;for(const o of e.body)if(o.body.length===1&&o.body[0].kind==="search_start")o.body.pop();else{const s=p4(o.body);s?(r=!0,Array.isArray(s)?n.push(...s):n.push(s)):i=!0}r&&!i&&n.forEach(o=>t.add(o))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(Je`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Ty(n)&&(n=Cy(n,t),e.ref=n)}},Sie={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:o})=>o)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:o,multiplexCapturesToLeftByRef:s,openRefs:u,reffedNodesByReferencer:c}){const f=i.get(e);if(f&&u.has(e.number)){const m=yo(lC(e.number),t);c.set(m,u.get(e.number)),n(m);return}u.set(e.number,e),s.set(e.number,[]),e.name&&df(s,e.name,[]);const h=s.get(e.name??e.number);for(let m=0;m<h.length;m++){const _=h[m];if(f===_.node||f&&f===_.origin||e===_.origin){h.splice(m,1);break}}if(s.get(e.number).push({node:e,origin:f}),e.name&&s.get(e.name).push({node:e,origin:f}),e.name){const m=df(o,e.name,new Map);let _=!1;if(f)_=!0;else for(const g of m.values())if(!g.hasDuplicateNameToRemove){_=!0;break}o.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:_})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Lm(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:i,ref:o}=e;if(i){let h=t;for(;(h=h.parent)&&!(h.type==="CapturingGroup"&&(h.name===o||h.number===o)););r.reffedNodesByReferencer.set(e,h);return}const s=r.subroutineRefMap.get(o),u=o===0,c=u?lC(0):d4(s,r.groupOriginByCopy,null);let f=c;if(!u){const h=h4(Aie(s,_=>_.type==="Group"&&!!_.flags)),m=h?Lm(r.globalFlags,h):r.globalFlags;Tie(m,r.currentFlags)||(f=ai({flags:Rie(m)}),f.body[0].body.push(c))}n(rn(f,t),{traverse:!u})}},Cie={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const o=r.reffedNodesByReferencer.get(e).filter(s=>jie(s,e));if(!o.length)n(rn(_s({negate:!0}),t));else if(o.length>1){const s=ai({atomic:!0,body:o.reverse().map(u=>Ms({body:[Zv(u.number)]}))});n(rn(s,t))}else e.ref=o[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r<n;r++){const i=t4();e.body.at(-1).body.push(i)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function f4(e){Fc(e,{"*"({node:t,parent:n}){t.parent=n}})}function Tie(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function jie(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=m4(n.parent);for(const i of r){if(i===n)break;if(i===e||_4(i,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function d4(e,t,n,r){const i=Array.isArray(e)?[]:{};for(const[o,s]of Object.entries(e))o==="parent"?i.parent=Array.isArray(n)?r:n:s&&typeof s=="object"?i[o]=d4(s,t,i,n):(o==="type"&&s==="CapturingGroup"&&t.set(i,t.get(e)??e),i[o]=s);return i}function lC(e){const t=r4(e);return t.isRecursive=!0,t}function Aie(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Cy(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function h4(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(i=>{var o,s;(o=r.enable)!=null&&o[i]&&(delete n.disable[i],n.enable[i]=!0),(s=r.disable)!=null&&s[i]&&(n.disable[i]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function Rie({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function m4(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function p4(e){const t=e.find(n=>n.kind==="search_start"||zie(n,{negate:!1})||!Nie(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const r of t.body){const i=p4(r.body);if(!i)return null;Array.isArray(i)?n.push(...i):n.push(i)}return n}return null}function _4(e,t){const n=m4(e)??[];for(const r of n)if(r===t||_4(r,t))return!0;return!1}function Nie({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function Lie(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function zie(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&JN(e.body[0],{type:"Assertion",kind:"search_start"})}function Ty(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function da(e,t){const r=e4(e,{...t,unicodePropertyMap:P0}).body;return r.length>1||r[0].body.length>1?ai({body:r}):r[0].body[0]}function jy(e,t){return e.negate=t,e}function yo(e,t){return e.parent=t,e}function rn(e,t){return f4(e),e.parent=t,e}function Mie(e,t){const n=l4(t),r=t1(n.target,"ES2024"),i=t1(n.target,"ES2025"),o=n.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw new Error("Invalid recursionLimit; use 2-20");let s=null,u=null;if(!i){const g=[e.flags.ignoreCase];Fc(e,Die,{getCurrentModI:()=>g.at(-1),popModI(){g.pop()},pushModI(b){g.push(b)},setHasCasedChar(){g.at(-1)?s=!0:u=!0}})}const c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||s)&&!u)};let f=e;const h={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:f,originMap:e._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!i&&s&&u),useFlagMods:i,useFlagV:r,verbose:n.verbose};function m(g){return h.lastNode=f,f=g,mie(Oie[g.type],`Unexpected node type "${g.type}"`)(g,h,m)}const _={pattern:e.body.map(m).join("|"),flags:m(e.flags),options:{...e.options}};return r||(delete _.options.force.v,_.options.disable.v=!0,_.options.unicodeSetsPlugin=null),_._captureTransfers=new Map,_._hiddenCaptures=[],h.captureMap.forEach((g,b)=>{g.hidden&&_._hiddenCaptures.push(b),g.transferTo&&df(_._captureTransfers,g.transferTo,[]).push(b)}),_}var Die={"*":{enter({node:e},t){if(cC(e)){const n=t.getCurrentModI();t.pushModI(e.flags?Lm({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){cC(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){$0(pn(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),g4(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&c4.has(e.value)&&t.setHasCasedChar()}},Oie={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?Je`\B`:Je`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:r,name:i,number:o}=e,s={ignoreCase:t.currentFlags.ignoreCase},u=t.originMap.get(e);return u&&(s.hidden=!0,o>u.number&&(s.transferTo=u.number)),t.captureMap.set(o,s),`(${i?`?<${i}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=pn(e),r=Ll(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&$0(n)){const i=u4(n);return t.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:i,parent:o}=e;let{body:s}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");ci.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&s.some(fC)&&(s=[gp(45),...s.filter(f=>!fC(f))]);const u=()=>`[${i?"^":""}${s.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||ci.bugNestedClassIgnoresNegation)&&!i){const h=s.filter(m=>m.type==="CharacterClass"&&m.kind==="union"&&m.negate);if(h.length){const m=ai(),_=m.body[0];return m.parent=o,_.parent=m,s=s.filter(g=>!h.includes(g)),e.body=s,s.length?(e.parent=_,_.body.push(e)):m.body.pop(),h.forEach(g=>{const b=Ms({body:[g]});g.parent=b,b.parent=m,m.body.push(b)}),n(m)}}t.inCharClass=!0;const f=u();return t.inCharClass=!1,f}const c=s[0];if(r==="union"&&!i&&c&&((!t.useFlagV||!t.verbose)&&o.kind==="union"&&!(ci.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&o.kind==="intersection"&&s.length===1&&c.type!=="CharacterClassRange"))return s.map(n).join("");if(!t.useFlagV&&o.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return u()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},o=Ll(n,i),s=Ll(r,i),u=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const c=g4(e);Bie(c).forEach(h=>{u.add(Array.isArray(h)?`${Ll(h[0],i)}-${Ll(h[1],i)}`:Ll(h,i))})}return`${o}-${s}${[...u].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":Je`[^\n]`;if(e==="digit")return t?Je`\D`:Je`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&c4.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?Je`\P`:Je`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?Je`\W`:Je`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},i,o){const s=i.currentFlags;n&&(i.currentFlags=Lm(s,n));const u=t.map(o).join("|"),c=!i.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!i.useFlagMods||!n)?u:`(?${Uie(e,n,i.useFlagMods)}${u})`;return i.currentFlags=s,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(i).join("|")})`},Quantifier(e,t,n){return n(e.body)+Gie(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:Je`\g<${t}&R=${r}>`}},qie=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),Iie=new Set(["-","\\","]","^","["]),Pie=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),uC=new Map([[9,Je`\t`],[10,Je`\n`],[11,Je`\v`],[12,Je`\f`],[13,Je`\r`],[8232,Je`\u2028`],[8233,Je`\u2029`],[65279,Je`\uFEFF`]]),$ie=new RegExp("^\\p{Cased}$","u");function $0(e){return $ie.test(e)}function g4(e,t){const n=!!(t!=null&&t.firstOnly),r=e.min.value,i=e.max.value,o=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return o;for(let s=r;s<=i;s++){const u=pn(s);if(!$0(u))continue;const c=u4(u).filter(f=>{const h=f.codePointAt(0);return h<r||h>i});if(c.length&&(o.push(...c),n))break}return o}function Ll(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(uC.has(e))return uC.get(e);if(e<32||e>126&&e<160||e>262143||t&&Fie(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=n?r?Pie:Iie:qie,o=pn(e);return(i.has(o)?"\\":"")+o}function Bie(e){const t=e.map(i=>i.codePointAt(0)).sort((i,o)=>i-o),n=[];let r=null;for(let i=0;i<t.length;i++)t[i+1]===t[i]+1?r??(r=t[i]):r===null?n.push(t[i]):(n.push([r,t[i]]),r=null);return n}function Uie(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:i,disable:o}=t;r=(i!=null&&i.ignoreCase?"i":"")+(i!=null&&i.dotAll?"s":"")+(o?"-":"")+(o!=null&&o.ignoreCase?"i":"")+(o!=null&&o.dotAll?"s":"")}return`${r}:`}function Gie({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function cC({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function Fie(e){return e>47&&e<58}function fC({type:e,value:t}){return e==="Character"&&t===45}var bo,ga,xs,xo,ws,mf,n1,To,Hie=(To=class extends RegExp{constructor(n,r,i){var t=(...Tce)=>(super(...Tce),ss(this,mf),ss(this,bo,new Map),ss(this,ga,null),ss(this,xs),ss(this,xo,null),ss(this,ws,null),be(this,"rawOptions",{}),this);const o=!!(i!=null&&i.lazyCompile);if(n instanceof RegExp){if(i)throw new Error("Cannot provide options when copying a regexp");const s=n;t(s,r),Jr(this,xs,s.source),s instanceof To&&(Jr(this,bo,Vn(s,bo)),Jr(this,xo,Vn(s,xo)),Jr(this,ws,Vn(s,ws)),this.rawOptions=s.rawOptions)}else{const s={hiddenCaptures:[],strategy:null,transfers:[],...i};t(o?"":n,r),Jr(this,xs,n),Jr(this,bo,Xie(s.hiddenCaptures,s.transfers)),Jr(this,ws,s.strategy),this.rawOptions=i??{}}o||Jr(this,ga,this)}get source(){return Vn(this,xs)||"(?:)"}exec(n){if(!Vn(this,ga)){const{lazyCompile:o,...s}=this.rawOptions;Jr(this,ga,new To(Vn(this,xs),this.flags,s))}const r=this.global||this.sticky,i=this.lastIndex;if(Vn(this,ws)==="clip_search"&&r&&i){this.lastIndex=0;const o=wg(this,mf,n1).call(this,n.slice(i));return o&&(Vie(o,i,n,this.hasIndices),this.lastIndex+=i),o}return wg(this,mf,n1).call(this,n)}},bo=new WeakMap,ga=new WeakMap,xs=new WeakMap,xo=new WeakMap,ws=new WeakMap,mf=new WeakSet,n1=function(n){Vn(this,ga).lastIndex=this.lastIndex;const r=jk(To.prototype,this,"exec").call(Vn(this,ga),n);if(this.lastIndex=Vn(this,ga).lastIndex,!r||!Vn(this,bo).size)return r;const i=[...r];r.length=1;let o;this.hasIndices&&(o=[...r.indices],r.indices.length=1);const s=[0];for(let u=1;u<i.length;u++){const{hidden:c,transferTo:f}=Vn(this,bo).get(u)??{};if(c?s.push(null):(s.push(r.length),r.push(i[u]),this.hasIndices&&r.indices.push(o[u])),f&&i[u]!==void 0){const h=s[f];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(r[h]=i[u],this.hasIndices&&(r.indices[h]=o[u]),r.groups){Vn(this,xo)||Jr(this,xo,Yie(this.source));const m=Vn(this,xo).get(f);m&&(r.groups[m]=i[u],this.hasIndices&&(r.indices.groups[m]=o[u]))}}}return r},To);function Vie(e,t,n,r){if(e.index+=t,e.input=n,r){const i=e.indices;for(let s=0;s<i.length;s++){const u=i[s];u&&(i[s]=[u[0]+t,u[1]+t])}const o=i.groups;o&&Object.keys(o).forEach(s=>{const u=o[s];u&&(o[s]=[u[0]+t,u[1]+t])})}}function Xie(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,i]of t)for(const o of i)df(n,o,{}).transferTo=r;return n}function Yie(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,i=0,o;for(;o=t.exec(e);){const{0:s,groups:{capture:u,name:c}}=o;s==="["?r++:r?s==="]"&&r--:u&&(i++,c&&n.set(i,c))}return n}function Wie(e,t){const n=Kie(e,t);return n.options?new Hie(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function Kie(e,t){const n=l4(t),r=e4(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:P0}),i=kie(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),o=Mie(i,n),s=die(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),u=cie(s.pattern),c=uie(u.pattern,{captureTransfers:s.captureTransfers,hiddenCaptures:s.hiddenCaptures}),f={pattern:c.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${o.flags}${o.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const h=c.hiddenCaptures.sort((b,E)=>b-E),m=Array.from(c.captureTransfers),_=i._strategy,g=f.pattern.length>=n.lazyCompileLength;(h.length||m.length||_||g)&&(f.options={...h.length&&{hiddenCaptures:h},...m.length&&{transfers:m},..._&&{strategy:_},...g&&{lazyCompile:g}})}return f}function y4(e,t){return Wie(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function Qie(e={}){const t={target:"auto",cache:new Map,...e};return t.regexConstructor||(t.regexConstructor=n=>y4(n,{target:t.target})),{createScanner(n){return new hre(n,t)},createString(n){return{content:n}}}}iN(w0({bundledLanguages:()=>S0,bundledLanguagesAlias:()=>E0,bundledLanguagesBase:()=>k0,bundledLanguagesInfo:()=>up,bundledThemes:()=>T0,bundledThemesInfo:()=>C0,codeToHast:()=>UN,codeToHtml:()=>D0,codeToTokens:()=>GN,codeToTokensBase:()=>FN,codeToTokensWithThemes:()=>HN,createHighlighter:()=>M0,createJavaScriptRegexEngine:()=>Qie,createOnigurumaEngine:()=>sN,defaultJavaScriptRegexConstructor:()=>y4,getLastGrammarState:()=>XN,getSingletonHighlighter:()=>VN,loadWasm:()=>A0}),dre);function Zie({html:e,className:t="",...n}){return y.jsx("div",{className:t,dangerouslySetInnerHTML:{__html:e},...n})}function zm({path:e,content:t,kind:n="source file",relationTypes:r=[],defaultExpanded:i=!0,showPath:o=!0}){const s=K.useMemo(()=>Jie(e,t),[t,e]),u=K.useMemo(()=>nae(t),[t]),[c,f]=K.useState(i),[h,m]=K.useState(!1),[_,g]=K.useState(!1),[b,E]=K.useState(null);K.useEffect(()=>{let w=!1;E(null);const T=eae(s);if(!T){E(dC(t));return}return D0(t,{lang:T,themes:{light:"github-light",dark:"github-dark"},defaultColor:!1}).then(k=>{w||E(k)}).catch(()=>{w||E(dC(t))}),()=>{w=!0}},[t,s]);async function C(){var w;(w=navigator.clipboard)!=null&&w.writeText&&(await navigator.clipboard.writeText(t),g(!0),window.setTimeout(()=>g(!1),1400))}return y.jsxs(F5,{wrapped:h,children:[y.jsx(H5,{expanded:c,onToggleExpanded:()=>f(w=>!w),kind:n,path:e,showPath:o,languageLabel:tae(s),lineCount:u,relationTypes:r,wrapped:h,copied:_,onToggleWrap:()=>m(w=>!w),onCopy:C}),c&&y.jsx(Fk,{children:b?y.jsx(Zie,{html:b,className:P5,"aria-label":"Source code"}):y.jsx("pre",{className:$5,"aria-label":"Source code",children:y.jsx("code",{children:t})})}),!c&&y.jsx(Fk,{collapsed:!0,lineCount:u})]})}function Jie(e,t){const n=e.toLowerCase();if(n.endsWith(".rs"))return"rust";if(/\.(ts|tsx|mts|cts|js|jsx)$/.test(n))return"typescript";if(n.endsWith(".py"))return"python";if(/\.(md|markdown)$/.test(n))return"markdown";if(/\.(yaml|yml)$/.test(n))return"yaml";if(n.endsWith(".toml"))return"toml";if(n.endsWith(".json"))return"json";if(n.endsWith(".css"))return"css";if(/\.(html|htm)$/.test(n))return"html";if(/\.(sh|bash|zsh|ksh)$/.test(n))return"bash";const r=t.trim();return r.startsWith("{")||r.startsWith("[")?"json":/^#!\/.*\b(?:bash|sh|zsh|ksh)\b/m.test(r)?"bash":/\b(fn|impl|struct|enum|trait|pub|let mut|use|match)\b/.test(r)?"rust":/\b(import|export|const|let|interface|type)\b/.test(r)?"typescript":"text"}function eae(e){return e==="text"?null:e}function tae(e){switch(e){case"typescript":return"TypeScript";case"markdown":return"Markdown";case"yaml":return"YAML";case"json":return"JSON";case"html":return"HTML";case"css":return"CSS";case"toml":return"TOML";case"bash":return"Shell";case"python":return"Python";case"rust":return"Rust";default:return"Text"}}function nae(e){return e?e.split(/\r?\n/).length:0}function dC(e){return`<pre class="shiki"><code>${e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}</code></pre>`}function rae({resourceId:e}={}){const{store:t}=$n(),n=e?t.resources.find(i=>i.id===e):void 0;if(e)return y.jsx(Oi,{testId:"resources",children:y.jsx(Ao,{children:y.jsxs(Cs,{children:[y.jsx(vT,{label:"Resource",title:(n==null?void 0:n.display)??e,actionHref:"#/model",actionLabel:"Back to model"}),n!=null&&n.source_text?y.jsx(zm,{path:n.file_path??n.target,content:n.source_text,kind:n.kind,relationTypes:n.relation_types}):n?y.jsx(lI,{kind:n.kind,target:n.target,externalUrl:n.external_url}):y.jsxs(OT,{children:["Resource not found: ",e]})]})})});const r=t.resources.map(i=>({id:i.id,kind:i.kind,display:i.display,target:i.target,href:i.file_path?`#/content/${i.file_path}`:null,externalUrl:i.external_url,relationTypes:i.relation_types}));return y.jsx(Oi,{testId:"resources",children:y.jsx(Ao,{children:y.jsxs(Cs,{children:[y.jsx(oI,{count:r.length}),y.jsx(sI,{resources:r})]})})})}function iae({initialQuery:e,onOpenElement:t}){const{store:n,elementById:r}=$n(),{searchElementTypes:i,searchKinds:o}=An(),s=tee(),[u,c]=K.useState(e??""),[f,h]=K.useState([]),[m,_]=K.useState(null),g=K.useRef(0);K.useEffect(()=>{c(e??"")},[e]);function b(k){k.preventDefault(),window.location.hash=VF(u)}const E=K.useMemo(()=>{const k=new Map;for(const S of n.resources)k.set(S.target,S),S.file_path&&k.set(S.file_path,S);return k},[n.resources]),C=K.useMemo(()=>new Set(n.elements.map(k=>k.file_path)),[n.elements]);K.useEffect(()=>{if(s.status!=="ready"){g.current+=1,h([]);return}const k=g.current+1;g.current=k,_(null),s.search(u,o,i).then(S=>{g.current===k&&h(S)}).catch(S=>{g.current===k&&(h([]),_(S instanceof Error?S.message:String(S)))})},[u,i,s,o]);const w=f.map(k=>{const S=k.kind==="element"?r(k.id):void 0,z=oae(k,E,C),R=nN(k,E,C),M=(S==null?void 0:S.source_anchor)??(z?`#/resources/${z.id}`:k.route),X=sae(M),F=S?null:uae(k.text,[k.title,X,M]);return{key:`${k.kind}:${k.id}`,title:k.title,route:lae(X,k.title,R)??void 0,preview:S?y.jsx(vm,{markdown:S.content,sourceFilePath:S.file_path,sourceAnchor:S.source_anchor,variant:"preview"}):F??void 0,badge:S?{label:S.element_type,type:S.element_type,family:S.type_family,tinted:!0}:{label:aae(R)},action:S?{kind:"button",onClick:()=>t(k.id)}:{kind:"link",href:M}}}),T=s.status!=="ready"?"Building ranked search index...":m||(f.length===0?"No matches.":void 0);return y.jsx(Oi,{testId:"search",children:y.jsx(Ao,{children:y.jsxs(Cs,{children:[y.jsx(gI,{query:u,resultSummary:s.status==="ready"?`${f.length} results`:"Indexing",statusText:cae(s.status,u,s.documentCount,s.error??m),onQueryChange:c,onSubmit:b}),y.jsx(yI,{results:w,emptyMessage:T})]})})})}function aae(e){return e.replace(/[-_]/g," ")}function oae(e,t,n){if(!(e.kind!=="file"||n.has(e.id)))return t.get(e.id)}function sae(e){return e.replace(/^#\/content\//,"").replace(/^#\/elements\//,"").replace(/^#\/resources\//,"resource:").replace(/^#\//,"")}function lae(e,t,n){return n==="resource"||Mm(e)===Mm(t)?null:e}function uae(e,t){const n=Mm(e);return n?t.some(r=>Mm(r)===n)?null:e:null}function Mm(e){return e.trim().replace(/^#\/content\//,"").replace(/^#\//,"").toLowerCase()}function cae(e,t,n,r){return e==="building"?"Preparing ranked search index.":e==="error"?r?`Search index failed: ${r}`:"Search index failed.":t?`Filtering by "${t}"`:`Search ${n.toLocaleString()} indexed documents.`}const gn="__root__";function v4({path:e,forcedLayout:t,onOpenElement:n}){const{store:r,elementById:i}=$n(),o=hJ(),s=K.useMemo(()=>fae(r),[r]),u=!!(t&&o),c=(o==null?void 0:o.modelSelectionId)??"__root__",f=u?b4(c,s,r):e?s.fileByPath.get(e):void 0,[h,m]=K.useState(gn),[_,g]=K.useState("list"),[b,E]=K.useState("name"),[C,w]=K.useState("asc");K.useEffect(()=>{if(u){const G=_ae(c,s,r);m(G);return}if(!f)return;const U=f.parent_folder||gn;m(s.folderByPath.has(U)?U:gn)},[s,s.folderByPath,c,f,u,r]);const T=s.folderByPath.get(h)??s.root,k=t??_,S=f?r1(f.display_path||f.path):void 0,z=K.useMemo(()=>{const U=q=>({kind:"folder",id:q.id,name:q.name,path:q.path,displayPath:q.path===gn?r.project.root_label||"Project root":q.path,elementCount:s.folderElementCounts.get(q.path)??0,childCount:q.folders.length+q.files.length,folder:q}),G=q=>({kind:"file",id:`file:${q.path}`,name:r1(q.display_path||q.path),path:q.path,displayPath:q.display_path||q.path,elementCount:q.element_ids.length,childCount:q.element_ids.length,file:q});return[...T.folders.map(U),...T.files.map(G)].sort((q,$)=>pae(q,$,b,C))},[T,s.folderElementCounts,C,b,r.project.root_label]),R=K.useMemo(()=>z.map(U=>({kind:U.kind,id:U.id,name:U.name,path:U.path,displayPath:U.displayPath,elementCount:U.elementCount,childCount:U.childCount,selected:dae(U,f),emptyFile:U.kind==="file"&&U.elementCount===0,href:U.kind==="file"?`#/files/${U.path}`:void 0,contentHref:U.kind==="file"?nf(U.path):void 0})),[z,f]);function M(U){U===b?w(G=>G==="asc"?"desc":"asc"):(E(U),w("asc"))}function X(U){u&&o&&o.setModelSelectionId(U===gn?"__root__":`folder:${U}`),m(U)}function F(U){u&&o&&o.setModelSelectionId(`file:${U}`)}function I(U){if(u&&o){o.setModelMode(U);return}U!=="graph"&&g(U)}return y.jsx(Oi,{testId:"files",children:y.jsxs(nq,{children:[y.jsx(rq,{breadcrumbs:mae(T,r.project.root_label||"Project root"),selectedFile:f&&S?{name:S,title:f.display_path||f.path}:void 0,layout:k,resultCount:z.length,showResultCount:!u,onOpenFolder:X,onLayoutChange:I}),e&&!f?y.jsx(iq,{path:e}):y.jsxs(y.Fragment,{children:[k==="list"?y.jsx(aq,{items:R,sortKey:b,sortDirection:C,onSort:M,onOpenFolder:X,onOpenFile:u?F:void 0}):y.jsx(oq,{items:R,onOpenFolder:X,onOpenFile:u?F:void 0}),y.jsx(hae,{file:f,layout:k,onOpenElement:n,elementById:i})]})]})})}function fae(e){const t={kind:"folder",id:"folder:__root__",path:gn,name:e.project.root_label||"Project root",parent:null,folders:[],files:[]},n=new Map([[gn,t]]);for(const s of e.folders){const u=xc(s.path);u!==gn&&n.set(u,{kind:"folder",id:`folder:${u}`,path:u,name:r1(u),parent:xc(s.parent),folders:[],files:[]})}for(const s of e.folders){const u=xc(s.path);if(u===gn)continue;const c=n.get(u);if(!c)continue;const f=xc(s.parent);((f===gn?t:n.get(f))??t).folders.push(c)}const r=new Map;for(const s of e.files){r.set(s.path,s);const u=xc(s.parent_folder);(n.get(u)??t).files.push(s)}for(const s of n.values())s.folders.sort((u,c)=>u.name.localeCompare(c.name)),s.files.sort((u,c)=>u.display_path.localeCompare(c.display_path));const i=new Map;function o(s){const u=s.files.reduce((h,m)=>h+m.element_ids.length,0),c=s.folders.reduce((h,m)=>h+o(m),0),f=u+c;return i.set(s.path,f),f}return o(t),{root:t,folderByPath:n,fileByPath:r,folderElementCounts:i}}function xc(e){return(e??"").replace(/^\/+|\/+$/g,"")||gn}function dae(e,t){return!!(e.file&&t&&e.file.path===t.path)}function hae({file:e,layout:t,onOpenElement:n,elementById:r}){return e?e.element_ids.length===0?y.jsx(Lg,{children:y.jsx(zm,{path:e.path,content:e.markdown_content,kind:"source file",defaultExpanded:!0,showPath:!0})}):y.jsx(Lg,{children:y.jsx(sq,{layout:t,children:e.element_ids.map(i=>{const o=r(i);return y.jsx(lq,{layout:t,name:(o==null?void 0:o.name)??i,type:o==null?void 0:o.element_type,family:o==null?void 0:o.type_family,onOpen:()=>n(i)},i)})})}):y.jsx(Lg,{children:y.jsx(q1,{children:"Select a file row to inspect its modeled elements."})})}function mae(e,t){if(e.path===gn)return[{path:gn,label:t}];const n=e.path.split("/").filter(Boolean),r=[{path:gn,label:t}];let i="";for(const o of n)i=i?`${i}/${o}`:o,r.push({path:i,label:o});return r}function pae(e,t,n,r){if(e.kind!==t.kind&&n!=="type")return e.kind==="folder"?-1:1;let i=0;return n==="elements"?i=e.elementCount-t.elementCount:n==="type"?i=e.kind.localeCompare(t.kind)||e.name.localeCompare(t.name):n==="path"?i=e.displayPath.localeCompare(t.displayPath):i=e.name.localeCompare(t.name),r==="asc"?i:-i}function r1(e){return e.split("/").filter(Boolean).at(-1)??e}function b4(e,t,n){if(e.startsWith("file:"))return t.fileByPath.get(e.slice(5));const r=n.elements.find(i=>i.id===e);return r?t.fileByPath.get(r.file_path):void 0}function _ae(e,t,n){if(e==="__root__")return gn;if(e.startsWith("folder:")){const i=e.slice(7);return t.folderByPath.has(i)?i:gn}const r=b4(e,t,n);if(r){const i=r.parent_folder||gn;return t.folderByPath.has(i)?i:gn}return gn}var kh={exports:{}},hC;function gae(){if(hC)return kh.exports;hC=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(z,R,M){return Function.prototype.apply.call(z,R,M)},n;e&&typeof e.ownKeys=="function"?n=e.ownKeys:Object.getOwnPropertySymbols?n=function(z){return Object.getOwnPropertyNames(z).concat(Object.getOwnPropertySymbols(z))}:n=function(z){return Object.getOwnPropertyNames(z)};function r(S){console&&console.warn&&console.warn(S)}var i=Number.isNaN||function(z){return z!==z};function o(){o.init.call(this)}kh.exports=o,kh.exports.once=w,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function u(S){if(typeof S!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof S)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(S){if(typeof S!="number"||S<0||i(S))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+S+".");s=S}}),o.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(z){if(typeof z!="number"||z<0||i(z))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+z+".");return this._maxListeners=z,this};function c(S){return S._maxListeners===void 0?o.defaultMaxListeners:S._maxListeners}o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(z){for(var R=[],M=1;M<arguments.length;M++)R.push(arguments[M]);var X=z==="error",F=this._events;if(F!==void 0)X=X&&F.error===void 0;else if(!X)return!1;if(X){var I;if(R.length>0&&(I=R[0]),I instanceof Error)throw I;var U=new Error("Unhandled error."+(I?" ("+I.message+")":""));throw U.context=I,U}var G=F[z];if(G===void 0)return!1;if(typeof G=="function")t(G,this,R);else for(var q=G.length,$=b(G,q),M=0;M<q;++M)t($[M],this,R);return!0};function f(S,z,R,M){var X,F,I;if(u(R),F=S._events,F===void 0?(F=S._events=Object.create(null),S._eventsCount=0):(F.newListener!==void 0&&(S.emit("newListener",z,R.listener?R.listener:R),F=S._events),I=F[z]),I===void 0)I=F[z]=R,++S._eventsCount;else if(typeof I=="function"?I=F[z]=M?[R,I]:[I,R]:M?I.unshift(R):I.push(R),X=c(S),X>0&&I.length>X&&!I.warned){I.warned=!0;var U=new Error("Possible EventEmitter memory leak detected. "+I.length+" "+String(z)+" listeners added. Use emitter.setMaxListeners() to increase limit");U.name="MaxListenersExceededWarning",U.emitter=S,U.type=z,U.count=I.length,r(U)}return S}o.prototype.addListener=function(z,R){return f(this,z,R,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(z,R){return f(this,z,R,!0)};function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(S,z,R){var M={fired:!1,wrapFn:void 0,target:S,type:z,listener:R},X=h.bind(M);return X.listener=R,M.wrapFn=X,X}o.prototype.once=function(z,R){return u(R),this.on(z,m(this,z,R)),this},o.prototype.prependOnceListener=function(z,R){return u(R),this.prependListener(z,m(this,z,R)),this},o.prototype.removeListener=function(z,R){var M,X,F,I,U;if(u(R),X=this._events,X===void 0)return this;if(M=X[z],M===void 0)return this;if(M===R||M.listener===R)--this._eventsCount===0?this._events=Object.create(null):(delete X[z],X.removeListener&&this.emit("removeListener",z,M.listener||R));else if(typeof M!="function"){for(F=-1,I=M.length-1;I>=0;I--)if(M[I]===R||M[I].listener===R){U=M[I].listener,F=I;break}if(F<0)return this;F===0?M.shift():E(M,F),M.length===1&&(X[z]=M[0]),X.removeListener!==void 0&&this.emit("removeListener",z,U||R)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(z){var R,M,X;if(M=this._events,M===void 0)return this;if(M.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):M[z]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete M[z]),this;if(arguments.length===0){var F=Object.keys(M),I;for(X=0;X<F.length;++X)I=F[X],I!=="removeListener"&&this.removeAllListeners(I);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(R=M[z],typeof R=="function")this.removeListener(z,R);else if(R!==void 0)for(X=R.length-1;X>=0;X--)this.removeListener(z,R[X]);return this};function _(S,z,R){var M=S._events;if(M===void 0)return[];var X=M[z];return X===void 0?[]:typeof X=="function"?R?[X.listener||X]:[X]:R?C(X):b(X,X.length)}o.prototype.listeners=function(z){return _(this,z,!0)},o.prototype.rawListeners=function(z){return _(this,z,!1)},o.listenerCount=function(S,z){return typeof S.listenerCount=="function"?S.listenerCount(z):g.call(S,z)},o.prototype.listenerCount=g;function g(S){var z=this._events;if(z!==void 0){var R=z[S];if(typeof R=="function")return 1;if(R!==void 0)return R.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function b(S,z){for(var R=new Array(z),M=0;M<z;++M)R[M]=S[M];return R}function E(S,z){for(;z+1<S.length;z++)S[z]=S[z+1];S.pop()}function C(S){for(var z=new Array(S.length),R=0;R<z.length;++R)z[R]=S[R].listener||S[R];return z}function w(S,z){return new Promise(function(R,M){function X(I){S.removeListener(z,F),M(I)}function F(){typeof S.removeListener=="function"&&S.removeListener("error",X),R([].slice.call(arguments))}k(S,z,F,{once:!0}),z!=="error"&&T(S,X,{once:!0})})}function T(S,z,R){typeof S.on=="function"&&k(S,"error",z,R)}function k(S,z,R,M){if(typeof S.on=="function")M.once?S.once(z,R):S.on(z,R);else if(typeof S.addEventListener=="function")S.addEventListener(z,function X(F){M.once&&S.removeEventListener(z,X),R(F)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof S)}return kh.exports}var B0=gae(),Ay,mC;function U0(){if(mC)return Ay;mC=1;function e(t){if(typeof t!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=t}return typeof Symbol<"u"&&(e.prototype[Symbol.iterator]=function(){return this}),e.of=function(){var t=arguments,n=t.length,r=0;return new e(function(){return r>=n?{done:!0}:{done:!1,value:t[r++]}})},e.empty=function(){var t=new e(function(){return{done:!0}});return t},e.fromSequence=function(t){var n=0,r=t.length;return new e(function(){return n>=r?{done:!0}:{done:!1,value:t[n++]}})},e.is=function(t){return t instanceof e?!0:typeof t=="object"&&t!==null&&typeof t.next=="function"},Ay=e,Ay}var yae=U0();const Br=Ea(yae);var Eh={},pC;function vae(){return pC||(pC=1,Eh.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",Eh.SYMBOL_SUPPORT=typeof Symbol<"u"),Eh}var Ry,_C;function x4(){if(_C)return Ry;_C=1;var e=U0(),t=vae(),n=t.ARRAY_BUFFER_SUPPORT,r=t.SYMBOL_SUPPORT;function i(o){return typeof o=="string"||Array.isArray(o)||n&&ArrayBuffer.isView(o)?e.fromSequence(o):typeof o!="object"||o===null?null:r&&typeof o[Symbol.iterator]=="function"?o[Symbol.iterator]():typeof o.next=="function"?o:null}return Ry=function(s){var u=i(s);if(!u)throw new Error("obliterator: target is not iterable nor a valid iterator.");return u},Ry}var Ny,gC;function bae(){if(gC)return Ny;gC=1;var e=x4();return Ny=function(n,r){for(var i=arguments.length>1?r:1/0,o=i!==1/0?new Array(i):[],s,u=0,c=e(n);;){if(u===i)return o;if(s=c.next(),s.done)return u!==r&&(o.length=u),o;o[u++]=s.value}},Ny}var xae=bae();const w4=Ea(xae);var Ly,yC;function wae(){if(yC)return Ly;yC=1;var e=U0(),t=x4();return Ly=function(){var r=arguments,i=null,o=-1;return new e(function(){var u=null;do{if(i===null){if(o++,o>=r.length)return{done:!0};i=t(r[o])}if(u=i.next(),u.done===!0){i=null;continue}break}while(!0);return u})},Ly}var kae=wae();const wa=Ea(kae);function Eae(){const e=arguments[0];for(let t=1,n=arguments.length;t<n;t++)if(arguments[t])for(const r in arguments[t])e[r]=arguments[t][r];return e}let _n=Eae;typeof Object.assign=="function"&&(_n=Object.assign);function $r(e,t,n,r){const i=e._nodes.get(t);let o=null;return i&&(r==="mixed"?o=i.out&&i.out[n]||i.undirected&&i.undirected[n]:r==="directed"?o=i.out&&i.out[n]:o=i.undirected&&i.undirected[n]),o}function jn(e){return typeof e=="object"&&e!==null}function k4(e){let t;for(t in e)return!1;return!0}function Lr(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!1,writable:!0,value:n})}function ei(e,t,n){const r={enumerable:!0,configurable:!0};typeof n=="function"?r.get=n:(r.value=n,r.writable=!1),Object.defineProperty(e,t,r)}function vC(e){return!(!jn(e)||e.attributes&&!Array.isArray(e.attributes))}function Sae(){let e=Math.floor(Math.random()*256)&255;return()=>e++}class G0 extends Error{constructor(t){super(),this.name="GraphError",this.message=t}}class Oe extends G0{constructor(t){super(t),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Oe.prototype.constructor)}}class ze extends G0{constructor(t){super(t),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ze.prototype.constructor)}}class We extends G0{constructor(t){super(t),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,We.prototype.constructor)}}function E4(e,t){this.key=e,this.attributes=t,this.clear()}E4.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function S4(e,t){this.key=e,this.attributes=t,this.clear()}S4.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function C4(e,t){this.key=e,this.attributes=t,this.clear()}C4.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function gu(e,t,n,r,i){this.key=t,this.attributes=i,this.undirected=e,this.source=n,this.target=r}gu.prototype.attach=function(){let e="out",t="in";this.undirected&&(e=t="undirected");const n=this.source.key,r=this.target.key;this.source[e][r]=this,!(this.undirected&&n===r)&&(this.target[t][n]=this)};gu.prototype.attachMulti=function(){let e="out",t="in";const n=this.source.key,r=this.target.key;this.undirected&&(e=t="undirected");const i=this.source[e],o=i[r];if(typeof o>"u"){i[r]=this,this.undirected&&n===r||(this.target[t][n]=this);return}o.previous=this,this.next=o,i[r]=this,this.target[t][n]=this};gu.prototype.detach=function(){const e=this.source.key,t=this.target.key;let n="out",r="in";this.undirected&&(n=r="undirected"),delete this.source[n][t],delete this.target[r][e]};gu.prototype.detachMulti=function(){const e=this.source.key,t=this.target.key;let n="out",r="in";this.undirected&&(n=r="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[n][t],delete this.target[r][e]):(this.next.previous=void 0,this.source[n][t]=this.next,this.target[r][e]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};const T4=0,j4=1,Cae=2,A4=3;function Ta(e,t,n,r,i,o,s){let u,c,f,h;if(r=""+r,n===T4){if(u=e._nodes.get(r),!u)throw new ze(`Graph.${t}: could not find the "${r}" node in the graph.`);f=i,h=o}else if(n===A4){if(i=""+i,c=e._edges.get(i),!c)throw new ze(`Graph.${t}: could not find the "${i}" edge in the graph.`);const m=c.source.key,_=c.target.key;if(r===m)u=c.target;else if(r===_)u=c.source;else throw new ze(`Graph.${t}: the "${r}" node is not attached to the "${i}" edge (${m}, ${_}).`);f=o,h=s}else{if(c=e._edges.get(r),!c)throw new ze(`Graph.${t}: could not find the "${r}" edge in the graph.`);n===j4?u=c.source:u=c.target,f=i,h=o}return[u,f,h]}function Tae(e,t,n){e.prototype[t]=function(r,i,o){const[s,u]=Ta(this,t,n,r,i,o);return s.attributes[u]}}function jae(e,t,n){e.prototype[t]=function(r,i){const[o]=Ta(this,t,n,r,i);return o.attributes}}function Aae(e,t,n){e.prototype[t]=function(r,i,o){const[s,u]=Ta(this,t,n,r,i,o);return s.attributes.hasOwnProperty(u)}}function Rae(e,t,n){e.prototype[t]=function(r,i,o,s){const[u,c,f]=Ta(this,t,n,r,i,o,s);return u.attributes[c]=f,this.emit("nodeAttributesUpdated",{key:u.key,type:"set",attributes:u.attributes,name:c}),this}}function Nae(e,t,n){e.prototype[t]=function(r,i,o,s){const[u,c,f]=Ta(this,t,n,r,i,o,s);if(typeof f!="function")throw new Oe(`Graph.${t}: updater should be a function.`);const h=u.attributes,m=f(h[c]);return h[c]=m,this.emit("nodeAttributesUpdated",{key:u.key,type:"set",attributes:u.attributes,name:c}),this}}function Lae(e,t,n){e.prototype[t]=function(r,i,o){const[s,u]=Ta(this,t,n,r,i,o);return delete s.attributes[u],this.emit("nodeAttributesUpdated",{key:s.key,type:"remove",attributes:s.attributes,name:u}),this}}function zae(e,t,n){e.prototype[t]=function(r,i,o){const[s,u]=Ta(this,t,n,r,i,o);if(!jn(u))throw new Oe(`Graph.${t}: provided attributes are not a plain object.`);return s.attributes=u,this.emit("nodeAttributesUpdated",{key:s.key,type:"replace",attributes:s.attributes}),this}}function Mae(e,t,n){e.prototype[t]=function(r,i,o){const[s,u]=Ta(this,t,n,r,i,o);if(!jn(u))throw new Oe(`Graph.${t}: provided attributes are not a plain object.`);return _n(s.attributes,u),this.emit("nodeAttributesUpdated",{key:s.key,type:"merge",attributes:s.attributes,data:u}),this}}function Dae(e,t,n){e.prototype[t]=function(r,i,o){const[s,u]=Ta(this,t,n,r,i,o);if(typeof u!="function")throw new Oe(`Graph.${t}: provided updater is not a function.`);return s.attributes=u(s.attributes),this.emit("nodeAttributesUpdated",{key:s.key,type:"update",attributes:s.attributes}),this}}const Oae=[{name:e=>`get${e}Attribute`,attacher:Tae},{name:e=>`get${e}Attributes`,attacher:jae},{name:e=>`has${e}Attribute`,attacher:Aae},{name:e=>`set${e}Attribute`,attacher:Rae},{name:e=>`update${e}Attribute`,attacher:Nae},{name:e=>`remove${e}Attribute`,attacher:Lae},{name:e=>`replace${e}Attributes`,attacher:zae},{name:e=>`merge${e}Attributes`,attacher:Mae},{name:e=>`update${e}Attributes`,attacher:Dae}];function qae(e){Oae.forEach(function({name:t,attacher:n}){n(e,t("Node"),T4),n(e,t("Source"),j4),n(e,t("Target"),Cae),n(e,t("Opposite"),A4)})}function Iae(e,t,n){e.prototype[t]=function(r,i){let o;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new We(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new We(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+r,u=""+i;if(i=arguments[2],o=$r(this,s,u,n),!o)throw new ze(`Graph.${t}: could not find an edge for the given path ("${s}" - "${u}").`)}else{if(n!=="mixed")throw new We(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new ze(`Graph.${t}: could not find the "${r}" edge in the graph.`)}return o.attributes[i]}}function Pae(e,t,n){e.prototype[t]=function(r){let i;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new We(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new We(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+r,s=""+arguments[1];if(i=$r(this,o,s,n),!i)throw new ze(`Graph.${t}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(n!=="mixed")throw new We(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,i=this._edges.get(r),!i)throw new ze(`Graph.${t}: could not find the "${r}" edge in the graph.`)}return i.attributes}}function $ae(e,t,n){e.prototype[t]=function(r,i){let o;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new We(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new We(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+r,u=""+i;if(i=arguments[2],o=$r(this,s,u,n),!o)throw new ze(`Graph.${t}: could not find an edge for the given path ("${s}" - "${u}").`)}else{if(n!=="mixed")throw new We(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new ze(`Graph.${t}: could not find the "${r}" edge in the graph.`)}return o.attributes.hasOwnProperty(i)}}function Bae(e,t,n){e.prototype[t]=function(r,i,o){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new We(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new We(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const u=""+r,c=""+i;if(i=arguments[2],o=arguments[3],s=$r(this,u,c,n),!s)throw new ze(`Graph.${t}: could not find an edge for the given path ("${u}" - "${c}").`)}else{if(n!=="mixed")throw new We(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,s=this._edges.get(r),!s)throw new ze(`Graph.${t}: could not find the "${r}" edge in the graph.`)}return s.attributes[i]=o,this.emit("edgeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:i}),this}}function Uae(e,t,n){e.prototype[t]=function(r,i,o){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new We(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new We(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const u=""+r,c=""+i;if(i=arguments[2],o=arguments[3],s=$r(this,u,c,n),!s)throw new ze(`Graph.${t}: could not find an edge for the given path ("${u}" - "${c}").`)}else{if(n!=="mixed")throw new We(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,s=this._edges.get(r),!s)throw new ze(`Graph.${t}: could not find the "${r}" edge in the graph.`)}if(typeof o!="function")throw new Oe(`Graph.${t}: updater should be a function.`);return s.attributes[i]=o(s.attributes[i]),this.emit("edgeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:i}),this}}function Gae(e,t,n){e.prototype[t]=function(r,i){let o;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new We(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new We(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+r,u=""+i;if(i=arguments[2],o=$r(this,s,u,n),!o)throw new ze(`Graph.${t}: could not find an edge for the given path ("${s}" - "${u}").`)}else{if(n!=="mixed")throw new We(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new ze(`Graph.${t}: could not find the "${r}" edge in the graph.`)}return delete o.attributes[i],this.emit("edgeAttributesUpdated",{key:o.key,type:"remove",attributes:o.attributes,name:i}),this}}function Fae(e,t,n){e.prototype[t]=function(r,i){let o;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new We(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new We(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+r,u=""+i;if(i=arguments[2],o=$r(this,s,u,n),!o)throw new ze(`Graph.${t}: could not find an edge for the given path ("${s}" - "${u}").`)}else{if(n!=="mixed")throw new We(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new ze(`Graph.${t}: could not find the "${r}" edge in the graph.`)}if(!jn(i))throw new Oe(`Graph.${t}: provided attributes are not a plain object.`);return o.attributes=i,this.emit("edgeAttributesUpdated",{key:o.key,type:"replace",attributes:o.attributes}),this}}function Hae(e,t,n){e.prototype[t]=function(r,i){let o;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new We(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new We(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+r,u=""+i;if(i=arguments[2],o=$r(this,s,u,n),!o)throw new ze(`Graph.${t}: could not find an edge for the given path ("${s}" - "${u}").`)}else{if(n!=="mixed")throw new We(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new ze(`Graph.${t}: could not find the "${r}" edge in the graph.`)}if(!jn(i))throw new Oe(`Graph.${t}: provided attributes are not a plain object.`);return _n(o.attributes,i),this.emit("edgeAttributesUpdated",{key:o.key,type:"merge",attributes:o.attributes,data:i}),this}}function Vae(e,t,n){e.prototype[t]=function(r,i){let o;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new We(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new We(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+r,u=""+i;if(i=arguments[2],o=$r(this,s,u,n),!o)throw new ze(`Graph.${t}: could not find an edge for the given path ("${s}" - "${u}").`)}else{if(n!=="mixed")throw new We(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new ze(`Graph.${t}: could not find the "${r}" edge in the graph.`)}if(typeof i!="function")throw new Oe(`Graph.${t}: provided updater is not a function.`);return o.attributes=i(o.attributes),this.emit("edgeAttributesUpdated",{key:o.key,type:"update",attributes:o.attributes}),this}}const Xae=[{name:e=>`get${e}Attribute`,attacher:Iae},{name:e=>`get${e}Attributes`,attacher:Pae},{name:e=>`has${e}Attribute`,attacher:$ae},{name:e=>`set${e}Attribute`,attacher:Bae},{name:e=>`update${e}Attribute`,attacher:Uae},{name:e=>`remove${e}Attribute`,attacher:Gae},{name:e=>`replace${e}Attributes`,attacher:Fae},{name:e=>`merge${e}Attributes`,attacher:Hae},{name:e=>`update${e}Attributes`,attacher:Vae}];function Yae(e){Xae.forEach(function({name:t,attacher:n}){n(e,t("Edge"),"mixed"),n(e,t("DirectedEdge"),"directed"),n(e,t("UndirectedEdge"),"undirected")})}const Wae=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function Kae(e,t,n,r){let i=!1;for(const o in t){if(o===r)continue;const s=t[o];if(i=n(s.key,s.attributes,s.source.key,s.target.key,s.source.attributes,s.target.attributes,s.undirected),e&&i)return s.key}}function Qae(e,t,n,r){let i,o,s,u=!1;for(const c in t)if(c!==r){i=t[c];do{if(o=i.source,s=i.target,u=n(i.key,i.attributes,o.key,s.key,o.attributes,s.attributes,i.undirected),e&&u)return i.key;i=i.next}while(i!==void 0)}}function zy(e,t){const n=Object.keys(e),r=n.length;let i,o=0;return new Br(function(){do if(i)i=i.next;else{if(o>=r)return{done:!0};const u=n[o++];if(u===t){i=void 0;continue}i=e[u]}while(!i);return{done:!1,value:{edge:i.key,attributes:i.attributes,source:i.source.key,target:i.target.key,sourceAttributes:i.source.attributes,targetAttributes:i.target.attributes,undirected:i.undirected}}})}function Zae(e,t,n,r){const i=t[n];if(!i)return;const o=i.source,s=i.target;if(r(i.key,i.attributes,o.key,s.key,o.attributes,s.attributes,i.undirected)&&e)return i.key}function Jae(e,t,n,r){let i=t[n];if(!i)return;let o=!1;do{if(o=r(i.key,i.attributes,i.source.key,i.target.key,i.source.attributes,i.target.attributes,i.undirected),e&&o)return i.key;i=i.next}while(i!==void 0)}function My(e,t){let n=e[t];return n.next!==void 0?new Br(function(){if(!n)return{done:!0};const r={edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected};return n=n.next,{done:!1,value:r}}):Br.of({edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected})}function eoe(e,t){if(e.size===0)return[];if(t==="mixed"||t===e.type)return typeof Array.from=="function"?Array.from(e._edges.keys()):w4(e._edges.keys(),e._edges.size);const n=t==="undirected"?e.undirectedSize:e.directedSize,r=new Array(n),i=t==="undirected",o=e._edges.values();let s=0,u,c;for(;u=o.next(),u.done!==!0;)c=u.value,c.undirected===i&&(r[s++]=c.key);return r}function R4(e,t,n,r){if(t.size===0)return;const i=n!=="mixed"&&n!==t.type,o=n==="undirected";let s,u,c=!1;const f=t._edges.values();for(;s=f.next(),s.done!==!0;){if(u=s.value,i&&u.undirected!==o)continue;const{key:h,attributes:m,source:_,target:g}=u;if(c=r(h,m,_.key,g.key,_.attributes,g.attributes,u.undirected),e&&c)return h}}function toe(e,t){if(e.size===0)return Br.empty();const n=t!=="mixed"&&t!==e.type,r=t==="undirected",i=e._edges.values();return new Br(function(){let s,u;for(;;){if(s=i.next(),s.done)return s;if(u=s.value,!(n&&u.undirected!==r))break}return{value:{edge:u.key,attributes:u.attributes,source:u.source.key,target:u.target.key,sourceAttributes:u.source.attributes,targetAttributes:u.target.attributes,undirected:u.undirected},done:!1}})}function F0(e,t,n,r,i,o){const s=t?Qae:Kae;let u;if(n!=="undirected"&&(r!=="out"&&(u=s(e,i.in,o),e&&u)||r!=="in"&&(u=s(e,i.out,o,r?void 0:i.key),e&&u))||n!=="directed"&&(u=s(e,i.undirected,o),e&&u))return u}function noe(e,t,n,r){const i=[];return F0(!1,e,t,n,r,function(o){i.push(o)}),i}function roe(e,t,n){let r=Br.empty();return e!=="undirected"&&(t!=="out"&&typeof n.in<"u"&&(r=wa(r,zy(n.in))),t!=="in"&&typeof n.out<"u"&&(r=wa(r,zy(n.out,t?void 0:n.key)))),e!=="directed"&&typeof n.undirected<"u"&&(r=wa(r,zy(n.undirected))),r}function H0(e,t,n,r,i,o,s){const u=n?Jae:Zae;let c;if(t!=="undirected"&&(typeof i.in<"u"&&r!=="out"&&(c=u(e,i.in,o,s),e&&c)||typeof i.out<"u"&&r!=="in"&&(r||i.key!==o)&&(c=u(e,i.out,o,s),e&&c))||t!=="directed"&&typeof i.undirected<"u"&&(c=u(e,i.undirected,o,s),e&&c))return c}function ioe(e,t,n,r,i){const o=[];return H0(!1,e,t,n,r,i,function(s){o.push(s)}),o}function aoe(e,t,n,r){let i=Br.empty();return e!=="undirected"&&(typeof n.in<"u"&&t!=="out"&&r in n.in&&(i=wa(i,My(n.in,r))),typeof n.out<"u"&&t!=="in"&&r in n.out&&(t||n.key!==r)&&(i=wa(i,My(n.out,r)))),e!=="directed"&&typeof n.undirected<"u"&&r in n.undirected&&(i=wa(i,My(n.undirected,r))),i}function ooe(e,t){const{name:n,type:r,direction:i}=t;e.prototype[n]=function(o,s){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return[];if(!arguments.length)return eoe(this,r);if(arguments.length===1){o=""+o;const u=this._nodes.get(o);if(typeof u>"u")throw new ze(`Graph.${n}: could not find the "${o}" node in the graph.`);return noe(this.multi,r==="mixed"?this.type:r,i,u)}if(arguments.length===2){o=""+o,s=""+s;const u=this._nodes.get(o);if(!u)throw new ze(`Graph.${n}: could not find the "${o}" source node in the graph.`);if(!this._nodes.has(s))throw new ze(`Graph.${n}: could not find the "${s}" target node in the graph.`);return ioe(r,this.multi,i,u,s)}throw new Oe(`Graph.${n}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function soe(e,t){const{name:n,type:r,direction:i}=t,o="forEach"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[o]=function(f,h,m){if(!(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)){if(arguments.length===1)return m=f,R4(!1,this,r,m);if(arguments.length===2){f=""+f,m=h;const _=this._nodes.get(f);if(typeof _>"u")throw new ze(`Graph.${o}: could not find the "${f}" node in the graph.`);return F0(!1,this.multi,r==="mixed"?this.type:r,i,_,m)}if(arguments.length===3){f=""+f,h=""+h;const _=this._nodes.get(f);if(!_)throw new ze(`Graph.${o}: could not find the "${f}" source node in the graph.`);if(!this._nodes.has(h))throw new ze(`Graph.${o}: could not find the "${h}" target node in the graph.`);return H0(!1,r,this.multi,i,_,h,m)}throw new Oe(`Graph.${o}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const s="map"+n[0].toUpperCase()+n.slice(1);e.prototype[s]=function(){const f=Array.prototype.slice.call(arguments),h=f.pop();let m;if(f.length===0){let _=0;r!=="directed"&&(_+=this.undirectedSize),r!=="undirected"&&(_+=this.directedSize),m=new Array(_);let g=0;f.push((b,E,C,w,T,k,S)=>{m[g++]=h(b,E,C,w,T,k,S)})}else m=[],f.push((_,g,b,E,C,w,T)=>{m.push(h(_,g,b,E,C,w,T))});return this[o].apply(this,f),m};const u="filter"+n[0].toUpperCase()+n.slice(1);e.prototype[u]=function(){const f=Array.prototype.slice.call(arguments),h=f.pop(),m=[];return f.push((_,g,b,E,C,w,T)=>{h(_,g,b,E,C,w,T)&&m.push(_)}),this[o].apply(this,f),m};const c="reduce"+n[0].toUpperCase()+n.slice(1);e.prototype[c]=function(){let f=Array.prototype.slice.call(arguments);if(f.length<2||f.length>4)throw new Oe(`Graph.${c}: invalid number of arguments (expecting 2, 3 or 4 and got ${f.length}).`);if(typeof f[f.length-1]=="function"&&typeof f[f.length-2]!="function")throw new Oe(`Graph.${c}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let h,m;f.length===2?(h=f[0],m=f[1],f=[]):f.length===3?(h=f[1],m=f[2],f=[f[0]]):f.length===4&&(h=f[2],m=f[3],f=[f[0],f[1]]);let _=m;return f.push((g,b,E,C,w,T,k)=>{_=h(_,g,b,E,C,w,T,k)}),this[o].apply(this,f),_}}function loe(e,t){const{name:n,type:r,direction:i}=t,o="find"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[o]=function(c,f,h){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return!1;if(arguments.length===1)return h=c,R4(!0,this,r,h);if(arguments.length===2){c=""+c,h=f;const m=this._nodes.get(c);if(typeof m>"u")throw new ze(`Graph.${o}: could not find the "${c}" node in the graph.`);return F0(!0,this.multi,r==="mixed"?this.type:r,i,m,h)}if(arguments.length===3){c=""+c,f=""+f;const m=this._nodes.get(c);if(!m)throw new ze(`Graph.${o}: could not find the "${c}" source node in the graph.`);if(!this._nodes.has(f))throw new ze(`Graph.${o}: could not find the "${f}" target node in the graph.`);return H0(!0,r,this.multi,i,m,f,h)}throw new Oe(`Graph.${o}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const s="some"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[s]=function(){const c=Array.prototype.slice.call(arguments),f=c.pop();return c.push((m,_,g,b,E,C,w)=>f(m,_,g,b,E,C,w)),!!this[o].apply(this,c)};const u="every"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[u]=function(){const c=Array.prototype.slice.call(arguments),f=c.pop();return c.push((m,_,g,b,E,C,w)=>!f(m,_,g,b,E,C,w)),!this[o].apply(this,c)}}function uoe(e,t){const{name:n,type:r,direction:i}=t,o=n.slice(0,-1)+"Entries";e.prototype[o]=function(s,u){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return Br.empty();if(!arguments.length)return toe(this,r);if(arguments.length===1){s=""+s;const c=this._nodes.get(s);if(!c)throw new ze(`Graph.${o}: could not find the "${s}" node in the graph.`);return roe(r,i,c)}if(arguments.length===2){s=""+s,u=""+u;const c=this._nodes.get(s);if(!c)throw new ze(`Graph.${o}: could not find the "${s}" source node in the graph.`);if(!this._nodes.has(u))throw new ze(`Graph.${o}: could not find the "${u}" target node in the graph.`);return aoe(r,i,c,u)}throw new Oe(`Graph.${o}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function coe(e){Wae.forEach(t=>{ooe(e,t),soe(e,t),loe(e,t),uoe(e,t)})}const foe=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function xp(){this.A=null,this.B=null}xp.prototype.wrap=function(e){this.A===null?this.A=e:this.B===null&&(this.B=e)};xp.prototype.has=function(e){return this.A!==null&&e in this.A||this.B!==null&&e in this.B};function wc(e,t,n,r,i){for(const o in r){const s=r[o],u=s.source,c=s.target,f=u===n?c:u;if(t&&t.has(f.key))continue;const h=i(f.key,f.attributes);if(e&&h)return f.key}}function V0(e,t,n,r,i){if(t!=="mixed"){if(t==="undirected")return wc(e,null,r,r.undirected,i);if(typeof n=="string")return wc(e,null,r,r[n],i)}const o=new xp;let s;if(t!=="undirected"){if(n!=="out"){if(s=wc(e,null,r,r.in,i),e&&s)return s;o.wrap(r.in)}if(n!=="in"){if(s=wc(e,o,r,r.out,i),e&&s)return s;o.wrap(r.out)}}if(t!=="directed"&&(s=wc(e,o,r,r.undirected,i),e&&s))return s}function doe(e,t,n){if(e!=="mixed"){if(e==="undirected")return Object.keys(n.undirected);if(typeof t=="string")return Object.keys(n[t])}const r=[];return V0(!1,e,t,n,function(i){r.push(i)}),r}function kc(e,t,n){const r=Object.keys(n),i=r.length;let o=0;return new Br(function(){let u=null;do{if(o>=i)return e&&e.wrap(n),{done:!0};const c=n[r[o++]],f=c.source,h=c.target;if(u=f===t?h:f,e&&e.has(u.key)){u=null;continue}}while(u===null);return{done:!1,value:{neighbor:u.key,attributes:u.attributes}}})}function hoe(e,t,n){if(e!=="mixed"){if(e==="undirected")return kc(null,n,n.undirected);if(typeof t=="string")return kc(null,n,n[t])}let r=Br.empty();const i=new xp;return e!=="undirected"&&(t!=="out"&&(r=wa(r,kc(i,n,n.in))),t!=="in"&&(r=wa(r,kc(i,n,n.out)))),e!=="directed"&&(r=wa(r,kc(i,n,n.undirected))),r}function moe(e,t){const{name:n,type:r,direction:i}=t;e.prototype[n]=function(o){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return[];o=""+o;const s=this._nodes.get(o);if(typeof s>"u")throw new ze(`Graph.${n}: could not find the "${o}" node in the graph.`);return doe(r==="mixed"?this.type:r,i,s)}}function poe(e,t){const{name:n,type:r,direction:i}=t,o="forEach"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[o]=function(f,h){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return;f=""+f;const m=this._nodes.get(f);if(typeof m>"u")throw new ze(`Graph.${o}: could not find the "${f}" node in the graph.`);V0(!1,r==="mixed"?this.type:r,i,m,h)};const s="map"+n[0].toUpperCase()+n.slice(1);e.prototype[s]=function(f,h){const m=[];return this[o](f,(_,g)=>{m.push(h(_,g))}),m};const u="filter"+n[0].toUpperCase()+n.slice(1);e.prototype[u]=function(f,h){const m=[];return this[o](f,(_,g)=>{h(_,g)&&m.push(_)}),m};const c="reduce"+n[0].toUpperCase()+n.slice(1);e.prototype[c]=function(f,h,m){if(arguments.length<3)throw new Oe(`Graph.${c}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let _=m;return this[o](f,(g,b)=>{_=h(_,g,b)}),_}}function _oe(e,t){const{name:n,type:r,direction:i}=t,o=n[0].toUpperCase()+n.slice(1,-1),s="find"+o;e.prototype[s]=function(f,h){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return;f=""+f;const m=this._nodes.get(f);if(typeof m>"u")throw new ze(`Graph.${s}: could not find the "${f}" node in the graph.`);return V0(!0,r==="mixed"?this.type:r,i,m,h)};const u="some"+o;e.prototype[u]=function(f,h){return!!this[s](f,h)};const c="every"+o;e.prototype[c]=function(f,h){return!this[s](f,(_,g)=>!h(_,g))}}function goe(e,t){const{name:n,type:r,direction:i}=t,o=n.slice(0,-1)+"Entries";e.prototype[o]=function(s){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return Br.empty();s=""+s;const u=this._nodes.get(s);if(typeof u>"u")throw new ze(`Graph.${o}: could not find the "${s}" node in the graph.`);return hoe(r==="mixed"?this.type:r,i,u)}}function yoe(e){foe.forEach(t=>{moe(e,t),poe(e,t),_oe(e,t),goe(e,t)})}function Sh(e,t,n,r,i){const o=r._nodes.values(),s=r.type;let u,c,f,h,m,_;for(;u=o.next(),u.done!==!0;){let g=!1;if(c=u.value,s!=="undirected"){h=c.out;for(f in h){m=h[f];do _=m.target,g=!0,i(c.key,_.key,c.attributes,_.attributes,m.key,m.attributes,m.undirected),m=m.next;while(m)}}if(s!=="directed"){h=c.undirected;for(f in h)if(!(t&&c.key>f)){m=h[f];do _=m.target,_.key!==f&&(_=m.source),g=!0,i(c.key,_.key,c.attributes,_.attributes,m.key,m.attributes,m.undirected),m=m.next;while(m)}}n&&!g&&i(c.key,null,c.attributes,null,null,null,null)}}function voe(e,t){const n={key:e};return k4(t.attributes)||(n.attributes=_n({},t.attributes)),n}function boe(e,t,n){const r={key:t,source:n.source.key,target:n.target.key};return k4(n.attributes)||(r.attributes=_n({},n.attributes)),e==="mixed"&&n.undirected&&(r.undirected=!0),r}function xoe(e){if(!jn(e))throw new Oe('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in e))throw new Oe("Graph.import: serialized node is missing its key.");if("attributes"in e&&(!jn(e.attributes)||e.attributes===null))throw new Oe("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function woe(e){if(!jn(e))throw new Oe('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in e))throw new Oe("Graph.import: serialized edge is missing its source.");if(!("target"in e))throw new Oe("Graph.import: serialized edge is missing its target.");if("attributes"in e&&(!jn(e.attributes)||e.attributes===null))throw new Oe("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in e&&typeof e.undirected!="boolean")throw new Oe("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const koe=Sae(),Eoe=new Set(["directed","undirected","mixed"]),bC=new Set(["domain","_events","_eventsCount","_maxListeners"]),Soe=[{name:e=>`${e}Edge`,generateKey:!0},{name:e=>`${e}DirectedEdge`,generateKey:!0,type:"directed"},{name:e=>`${e}UndirectedEdge`,generateKey:!0,type:"undirected"},{name:e=>`${e}EdgeWithKey`},{name:e=>`${e}DirectedEdgeWithKey`,type:"directed"},{name:e=>`${e}UndirectedEdgeWithKey`,type:"undirected"}],Coe={allowSelfLoops:!0,multi:!1,type:"mixed"};function Toe(e,t,n){if(n&&!jn(n))throw new Oe(`Graph.addNode: invalid attributes. Expecting an object but got "${n}"`);if(t=""+t,n=n||{},e._nodes.has(t))throw new We(`Graph.addNode: the "${t}" node already exist in the graph.`);const r=new e.NodeDataClass(t,n);return e._nodes.set(t,r),e.emit("nodeAdded",{key:t,attributes:n}),r}function xC(e,t,n){const r=new e.NodeDataClass(t,n);return e._nodes.set(t,r),e.emit("nodeAdded",{key:t,attributes:n}),r}function N4(e,t,n,r,i,o,s,u){if(!r&&e.type==="undirected")throw new We(`Graph.${t}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(r&&e.type==="directed")throw new We(`Graph.${t}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(u&&!jn(u))throw new Oe(`Graph.${t}: invalid attributes. Expecting an object but got "${u}"`);if(o=""+o,s=""+s,u=u||{},!e.allowSelfLoops&&o===s)throw new We(`Graph.${t}: source & target are the same ("${o}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const c=e._nodes.get(o),f=e._nodes.get(s);if(!c)throw new ze(`Graph.${t}: source node "${o}" not found.`);if(!f)throw new ze(`Graph.${t}: target node "${s}" not found.`);const h={key:null,undirected:r,source:o,target:s,attributes:u};if(n)i=e._edgeKeyGenerator();else if(i=""+i,e._edges.has(i))throw new We(`Graph.${t}: the "${i}" edge already exists in the graph.`);if(!e.multi&&(r?typeof c.undirected[s]<"u":typeof c.out[s]<"u"))throw new We(`Graph.${t}: an edge linking "${o}" to "${s}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);const m=new gu(r,i,c,f,u);e._edges.set(i,m);const _=o===s;return r?(c.undirectedDegree++,f.undirectedDegree++,_&&(c.undirectedLoops++,e._undirectedSelfLoopCount++)):(c.outDegree++,f.inDegree++,_&&(c.directedLoops++,e._directedSelfLoopCount++)),e.multi?m.attachMulti():m.attach(),r?e._undirectedSize++:e._directedSize++,h.key=i,e.emit("edgeAdded",h),i}function joe(e,t,n,r,i,o,s,u,c){if(!r&&e.type==="undirected")throw new We(`Graph.${t}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(r&&e.type==="directed")throw new We(`Graph.${t}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(u){if(c){if(typeof u!="function")throw new Oe(`Graph.${t}: invalid updater function. Expecting a function but got "${u}"`)}else if(!jn(u))throw new Oe(`Graph.${t}: invalid attributes. Expecting an object but got "${u}"`)}o=""+o,s=""+s;let f;if(c&&(f=u,u=void 0),!e.allowSelfLoops&&o===s)throw new We(`Graph.${t}: source & target are the same ("${o}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let h=e._nodes.get(o),m=e._nodes.get(s),_,g;if(!n&&(_=e._edges.get(i),_)){if((_.source.key!==o||_.target.key!==s)&&(!r||_.source.key!==s||_.target.key!==o))throw new We(`Graph.${t}: inconsistency detected when attempting to merge the "${i}" edge with "${o}" source & "${s}" target vs. ("${_.source.key}", "${_.target.key}").`);g=_}if(!g&&!e.multi&&h&&(g=r?h.undirected[s]:h.out[s]),g){const T=[g.key,!1,!1,!1];if(c?!f:!u)return T;if(c){const k=g.attributes;g.attributes=f(k),e.emit("edgeAttributesUpdated",{type:"replace",key:g.key,attributes:g.attributes})}else _n(g.attributes,u),e.emit("edgeAttributesUpdated",{type:"merge",key:g.key,attributes:g.attributes,data:u});return T}u=u||{},c&&f&&(u=f(u));const b={key:null,undirected:r,source:o,target:s,attributes:u};if(n)i=e._edgeKeyGenerator();else if(i=""+i,e._edges.has(i))throw new We(`Graph.${t}: the "${i}" edge already exists in the graph.`);let E=!1,C=!1;h||(h=xC(e,o,{}),E=!0,o===s&&(m=h,C=!0)),m||(m=xC(e,s,{}),C=!0),_=new gu(r,i,h,m,u),e._edges.set(i,_);const w=o===s;return r?(h.undirectedDegree++,m.undirectedDegree++,w&&(h.undirectedLoops++,e._undirectedSelfLoopCount++)):(h.outDegree++,m.inDegree++,w&&(h.directedLoops++,e._directedSelfLoopCount++)),e.multi?_.attachMulti():_.attach(),r?e._undirectedSize++:e._directedSize++,b.key=i,e.emit("edgeAdded",b),[i,!0,E,C]}function zl(e,t){e._edges.delete(t.key);const{source:n,target:r,attributes:i}=t,o=t.undirected,s=n===r;o?(n.undirectedDegree--,r.undirectedDegree--,s&&(n.undirectedLoops--,e._undirectedSelfLoopCount--)):(n.outDegree--,r.inDegree--,s&&(n.directedLoops--,e._directedSelfLoopCount--)),e.multi?t.detachMulti():t.detach(),o?e._undirectedSize--:e._directedSize--,e.emit("edgeDropped",{key:t.key,attributes:i,source:n.key,target:r.key,undirected:o})}class Ct extends B0.EventEmitter{constructor(t){if(super(),t=_n({},Coe,t),typeof t.multi!="boolean")throw new Oe(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${t.multi}".`);if(!Eoe.has(t.type))throw new Oe(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${t.type}".`);if(typeof t.allowSelfLoops!="boolean")throw new Oe(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${t.allowSelfLoops}".`);const n=t.type==="mixed"?E4:t.type==="directed"?S4:C4;Lr(this,"NodeDataClass",n);const r="geid_"+koe()+"_";let i=0;const o=()=>{let s;do s=r+i++;while(this._edges.has(s));return s};Lr(this,"_attributes",{}),Lr(this,"_nodes",new Map),Lr(this,"_edges",new Map),Lr(this,"_directedSize",0),Lr(this,"_undirectedSize",0),Lr(this,"_directedSelfLoopCount",0),Lr(this,"_undirectedSelfLoopCount",0),Lr(this,"_edgeKeyGenerator",o),Lr(this,"_options",t),bC.forEach(s=>Lr(this,s,this[s])),ei(this,"order",()=>this._nodes.size),ei(this,"size",()=>this._edges.size),ei(this,"directedSize",()=>this._directedSize),ei(this,"undirectedSize",()=>this._undirectedSize),ei(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),ei(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),ei(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),ei(this,"multi",this._options.multi),ei(this,"type",this._options.type),ei(this,"allowSelfLoops",this._options.allowSelfLoops),ei(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(t){return this._nodes.has(""+t)}hasDirectedEdge(t,n){if(this.type==="undirected")return!1;if(arguments.length===1){const r=""+t,i=this._edges.get(r);return!!i&&!i.undirected}else if(arguments.length===2){t=""+t,n=""+n;const r=this._nodes.get(t);return r?r.out.hasOwnProperty(n):!1}throw new Oe(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(t,n){if(this.type==="directed")return!1;if(arguments.length===1){const r=""+t,i=this._edges.get(r);return!!i&&i.undirected}else if(arguments.length===2){t=""+t,n=""+n;const r=this._nodes.get(t);return r?r.undirected.hasOwnProperty(n):!1}throw new Oe(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(t,n){if(arguments.length===1){const r=""+t;return this._edges.has(r)}else if(arguments.length===2){t=""+t,n=""+n;const r=this._nodes.get(t);return r?typeof r.out<"u"&&r.out.hasOwnProperty(n)||typeof r.undirected<"u"&&r.undirected.hasOwnProperty(n):!1}throw new Oe(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(t,n){if(this.type==="undirected")return;if(t=""+t,n=""+n,this.multi)throw new We("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const r=this._nodes.get(t);if(!r)throw new ze(`Graph.directedEdge: could not find the "${t}" source node in the graph.`);if(!this._nodes.has(n))throw new ze(`Graph.directedEdge: could not find the "${n}" target node in the graph.`);const i=r.out&&r.out[n]||void 0;if(i)return i.key}undirectedEdge(t,n){if(this.type==="directed")return;if(t=""+t,n=""+n,this.multi)throw new We("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const r=this._nodes.get(t);if(!r)throw new ze(`Graph.undirectedEdge: could not find the "${t}" source node in the graph.`);if(!this._nodes.has(n))throw new ze(`Graph.undirectedEdge: could not find the "${n}" target node in the graph.`);const i=r.undirected&&r.undirected[n]||void 0;if(i)return i.key}edge(t,n){if(this.multi)throw new We("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new ze(`Graph.edge: could not find the "${t}" source node in the graph.`);if(!this._nodes.has(n))throw new ze(`Graph.edge: could not find the "${n}" target node in the graph.`);const i=r.out&&r.out[n]||r.undirected&&r.undirected[n]||void 0;if(i)return i.key}areDirectedNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new ze(`Graph.areDirectedNeighbors: could not find the "${t}" node in the graph.`);return this.type==="undirected"?!1:n in r.in||n in r.out}areOutNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new ze(`Graph.areOutNeighbors: could not find the "${t}" node in the graph.`);return this.type==="undirected"?!1:n in r.out}areInNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new ze(`Graph.areInNeighbors: could not find the "${t}" node in the graph.`);return this.type==="undirected"?!1:n in r.in}areUndirectedNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new ze(`Graph.areUndirectedNeighbors: could not find the "${t}" node in the graph.`);return this.type==="directed"?!1:n in r.undirected}areNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new ze(`Graph.areNeighbors: could not find the "${t}" node in the graph.`);return this.type!=="undirected"&&(n in r.in||n in r.out)||this.type!=="directed"&&n in r.undirected}areInboundNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new ze(`Graph.areInboundNeighbors: could not find the "${t}" node in the graph.`);return this.type!=="undirected"&&n in r.in||this.type!=="directed"&&n in r.undirected}areOutboundNeighbors(t,n){t=""+t,n=""+n;const r=this._nodes.get(t);if(!r)throw new ze(`Graph.areOutboundNeighbors: could not find the "${t}" node in the graph.`);return this.type!=="undirected"&&n in r.out||this.type!=="directed"&&n in r.undirected}inDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new ze(`Graph.inDegree: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.inDegree}outDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new ze(`Graph.outDegree: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.outDegree}directedDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new ze(`Graph.directedDegree: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.inDegree+n.outDegree}undirectedDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new ze(`Graph.undirectedDegree: could not find the "${t}" node in the graph.`);return this.type==="directed"?0:n.undirectedDegree}inboundDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new ze(`Graph.inboundDegree: could not find the "${t}" node in the graph.`);let r=0;return this.type!=="directed"&&(r+=n.undirectedDegree),this.type!=="undirected"&&(r+=n.inDegree),r}outboundDegree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new ze(`Graph.outboundDegree: could not find the "${t}" node in the graph.`);let r=0;return this.type!=="directed"&&(r+=n.undirectedDegree),this.type!=="undirected"&&(r+=n.outDegree),r}degree(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new ze(`Graph.degree: could not find the "${t}" node in the graph.`);let r=0;return this.type!=="directed"&&(r+=n.undirectedDegree),this.type!=="undirected"&&(r+=n.inDegree+n.outDegree),r}inDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new ze(`Graph.inDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.inDegree-n.directedLoops}outDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new ze(`Graph.outDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.outDegree-n.directedLoops}directedDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new ze(`Graph.directedDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);return this.type==="undirected"?0:n.inDegree+n.outDegree-n.directedLoops*2}undirectedDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new ze(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);return this.type==="directed"?0:n.undirectedDegree-n.undirectedLoops*2}inboundDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new ze(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);let r=0,i=0;return this.type!=="directed"&&(r+=n.undirectedDegree,i+=n.undirectedLoops*2),this.type!=="undirected"&&(r+=n.inDegree,i+=n.directedLoops),r-i}outboundDegreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new ze(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);let r=0,i=0;return this.type!=="directed"&&(r+=n.undirectedDegree,i+=n.undirectedLoops*2),this.type!=="undirected"&&(r+=n.outDegree,i+=n.directedLoops),r-i}degreeWithoutSelfLoops(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new ze(`Graph.degreeWithoutSelfLoops: could not find the "${t}" node in the graph.`);let r=0,i=0;return this.type!=="directed"&&(r+=n.undirectedDegree,i+=n.undirectedLoops*2),this.type!=="undirected"&&(r+=n.inDegree+n.outDegree,i+=n.directedLoops*2),r-i}source(t){t=""+t;const n=this._edges.get(t);if(!n)throw new ze(`Graph.source: could not find the "${t}" edge in the graph.`);return n.source.key}target(t){t=""+t;const n=this._edges.get(t);if(!n)throw new ze(`Graph.target: could not find the "${t}" edge in the graph.`);return n.target.key}extremities(t){t=""+t;const n=this._edges.get(t);if(!n)throw new ze(`Graph.extremities: could not find the "${t}" edge in the graph.`);return[n.source.key,n.target.key]}opposite(t,n){t=""+t,n=""+n;const r=this._edges.get(n);if(!r)throw new ze(`Graph.opposite: could not find the "${n}" edge in the graph.`);const i=r.source.key,o=r.target.key;if(t===i)return o;if(t===o)return i;throw new ze(`Graph.opposite: the "${t}" node is not attached to the "${n}" edge (${i}, ${o}).`)}hasExtremity(t,n){t=""+t,n=""+n;const r=this._edges.get(t);if(!r)throw new ze(`Graph.hasExtremity: could not find the "${t}" edge in the graph.`);return r.source.key===n||r.target.key===n}isUndirected(t){t=""+t;const n=this._edges.get(t);if(!n)throw new ze(`Graph.isUndirected: could not find the "${t}" edge in the graph.`);return n.undirected}isDirected(t){t=""+t;const n=this._edges.get(t);if(!n)throw new ze(`Graph.isDirected: could not find the "${t}" edge in the graph.`);return!n.undirected}isSelfLoop(t){t=""+t;const n=this._edges.get(t);if(!n)throw new ze(`Graph.isSelfLoop: could not find the "${t}" edge in the graph.`);return n.source===n.target}addNode(t,n){return Toe(this,t,n).key}mergeNode(t,n){if(n&&!jn(n))throw new Oe(`Graph.mergeNode: invalid attributes. Expecting an object but got "${n}"`);t=""+t,n=n||{};let r=this._nodes.get(t);return r?(n&&(_n(r.attributes,n),this.emit("nodeAttributesUpdated",{type:"merge",key:t,attributes:r.attributes,data:n})),[t,!1]):(r=new this.NodeDataClass(t,n),this._nodes.set(t,r),this.emit("nodeAdded",{key:t,attributes:n}),[t,!0])}updateNode(t,n){if(n&&typeof n!="function")throw new Oe(`Graph.updateNode: invalid updater function. Expecting a function but got "${n}"`);t=""+t;let r=this._nodes.get(t);if(r){if(n){const o=r.attributes;r.attributes=n(o),this.emit("nodeAttributesUpdated",{type:"replace",key:t,attributes:r.attributes})}return[t,!1]}const i=n?n({}):{};return r=new this.NodeDataClass(t,i),this._nodes.set(t,r),this.emit("nodeAdded",{key:t,attributes:i}),[t,!0]}dropNode(t){t=""+t;const n=this._nodes.get(t);if(!n)throw new ze(`Graph.dropNode: could not find the "${t}" node in the graph.`);let r;if(this.type!=="undirected"){for(const i in n.out){r=n.out[i];do zl(this,r),r=r.next;while(r)}for(const i in n.in){r=n.in[i];do zl(this,r),r=r.next;while(r)}}if(this.type!=="directed")for(const i in n.undirected){r=n.undirected[i];do zl(this,r),r=r.next;while(r)}this._nodes.delete(t),this.emit("nodeDropped",{key:t,attributes:n.attributes})}dropEdge(t){let n;if(arguments.length>1){const r=""+arguments[0],i=""+arguments[1];if(n=$r(this,r,i,this.type),!n)throw new ze(`Graph.dropEdge: could not find the "${r}" -> "${i}" edge in the graph.`)}else if(t=""+t,n=this._edges.get(t),!n)throw new ze(`Graph.dropEdge: could not find the "${t}" edge in the graph.`);return zl(this,n),this}dropDirectedEdge(t,n){if(arguments.length<2)throw new We("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new We("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");t=""+t,n=""+n;const r=$r(this,t,n,"directed");if(!r)throw new ze(`Graph.dropDirectedEdge: could not find a "${t}" -> "${n}" edge in the graph.`);return zl(this,r),this}dropUndirectedEdge(t,n){if(arguments.length<2)throw new We("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new We("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const r=$r(this,t,n,"undirected");if(!r)throw new ze(`Graph.dropUndirectedEdge: could not find a "${t}" -> "${n}" edge in the graph.`);return zl(this,r),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const t=this._nodes.values();let n;for(;n=t.next(),n.done!==!0;)n.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(t){return this._attributes[t]}getAttributes(){return this._attributes}hasAttribute(t){return this._attributes.hasOwnProperty(t)}setAttribute(t,n){return this._attributes[t]=n,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:t}),this}updateAttribute(t,n){if(typeof n!="function")throw new Oe("Graph.updateAttribute: updater should be a function.");const r=this._attributes[t];return this._attributes[t]=n(r),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:t}),this}removeAttribute(t){return delete this._attributes[t],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:t}),this}replaceAttributes(t){if(!jn(t))throw new Oe("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=t,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(t){if(!jn(t))throw new Oe("Graph.mergeAttributes: provided attributes are not a plain object.");return _n(this._attributes,t),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:t}),this}updateAttributes(t){if(typeof t!="function")throw new Oe("Graph.updateAttributes: provided updater is not a function.");return this._attributes=t(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(t,n){if(typeof t!="function")throw new Oe("Graph.updateEachNodeAttributes: expecting an updater function.");if(n&&!vC(n))throw new Oe("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const r=this._nodes.values();let i,o;for(;i=r.next(),i.done!==!0;)o=i.value,o.attributes=t(o.key,o.attributes);this.emit("eachNodeAttributesUpdated",{hints:n||null})}updateEachEdgeAttributes(t,n){if(typeof t!="function")throw new Oe("Graph.updateEachEdgeAttributes: expecting an updater function.");if(n&&!vC(n))throw new Oe("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const r=this._edges.values();let i,o,s,u;for(;i=r.next(),i.done!==!0;)o=i.value,s=o.source,u=o.target,o.attributes=t(o.key,o.attributes,s.key,u.key,s.attributes,u.attributes,o.undirected);this.emit("eachEdgeAttributesUpdated",{hints:n||null})}forEachAdjacencyEntry(t){if(typeof t!="function")throw new Oe("Graph.forEachAdjacencyEntry: expecting a callback.");Sh(!1,!1,!1,this,t)}forEachAdjacencyEntryWithOrphans(t){if(typeof t!="function")throw new Oe("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");Sh(!1,!1,!0,this,t)}forEachAssymetricAdjacencyEntry(t){if(typeof t!="function")throw new Oe("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");Sh(!1,!0,!1,this,t)}forEachAssymetricAdjacencyEntryWithOrphans(t){if(typeof t!="function")throw new Oe("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");Sh(!1,!0,!0,this,t)}nodes(){return typeof Array.from=="function"?Array.from(this._nodes.keys()):w4(this._nodes.keys(),this._nodes.size)}forEachNode(t){if(typeof t!="function")throw new Oe("Graph.forEachNode: expecting a callback.");const n=this._nodes.values();let r,i;for(;r=n.next(),r.done!==!0;)i=r.value,t(i.key,i.attributes)}findNode(t){if(typeof t!="function")throw new Oe("Graph.findNode: expecting a callback.");const n=this._nodes.values();let r,i;for(;r=n.next(),r.done!==!0;)if(i=r.value,t(i.key,i.attributes))return i.key}mapNodes(t){if(typeof t!="function")throw new Oe("Graph.mapNode: expecting a callback.");const n=this._nodes.values();let r,i;const o=new Array(this.order);let s=0;for(;r=n.next(),r.done!==!0;)i=r.value,o[s++]=t(i.key,i.attributes);return o}someNode(t){if(typeof t!="function")throw new Oe("Graph.someNode: expecting a callback.");const n=this._nodes.values();let r,i;for(;r=n.next(),r.done!==!0;)if(i=r.value,t(i.key,i.attributes))return!0;return!1}everyNode(t){if(typeof t!="function")throw new Oe("Graph.everyNode: expecting a callback.");const n=this._nodes.values();let r,i;for(;r=n.next(),r.done!==!0;)if(i=r.value,!t(i.key,i.attributes))return!1;return!0}filterNodes(t){if(typeof t!="function")throw new Oe("Graph.filterNodes: expecting a callback.");const n=this._nodes.values();let r,i;const o=[];for(;r=n.next(),r.done!==!0;)i=r.value,t(i.key,i.attributes)&&o.push(i.key);return o}reduceNodes(t,n){if(typeof t!="function")throw new Oe("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new Oe("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let r=n;const i=this._nodes.values();let o,s;for(;o=i.next(),o.done!==!0;)s=o.value,r=t(r,s.key,s.attributes);return r}nodeEntries(){const t=this._nodes.values();return new Br(()=>{const n=t.next();if(n.done)return n;const r=n.value;return{value:{node:r.key,attributes:r.attributes},done:!1}})}export(){const t=new Array(this._nodes.size);let n=0;this._nodes.forEach((i,o)=>{t[n++]=voe(o,i)});const r=new Array(this._edges.size);return n=0,this._edges.forEach((i,o)=>{r[n++]=boe(this.type,o,i)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:t,edges:r}}import(t,n=!1){if(t instanceof Ct)return t.forEachNode((c,f)=>{n?this.mergeNode(c,f):this.addNode(c,f)}),t.forEachEdge((c,f,h,m,_,g,b)=>{n?b?this.mergeUndirectedEdgeWithKey(c,h,m,f):this.mergeDirectedEdgeWithKey(c,h,m,f):b?this.addUndirectedEdgeWithKey(c,h,m,f):this.addDirectedEdgeWithKey(c,h,m,f)}),this;if(!jn(t))throw new Oe("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(t.attributes){if(!jn(t.attributes))throw new Oe("Graph.import: invalid attributes. Expecting a plain object.");n?this.mergeAttributes(t.attributes):this.replaceAttributes(t.attributes)}let r,i,o,s,u;if(t.nodes){if(o=t.nodes,!Array.isArray(o))throw new Oe("Graph.import: invalid nodes. Expecting an array.");for(r=0,i=o.length;r<i;r++){s=o[r],xoe(s);const{key:c,attributes:f}=s;n?this.mergeNode(c,f):this.addNode(c,f)}}if(t.edges){let c=!1;if(this.type==="undirected"&&(c=!0),o=t.edges,!Array.isArray(o))throw new Oe("Graph.import: invalid edges. Expecting an array.");for(r=0,i=o.length;r<i;r++){u=o[r],woe(u);const{source:f,target:h,attributes:m,undirected:_=c}=u;let g;"key"in u?(g=n?_?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:_?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey,g.call(this,u.key,f,h,m)):(g=n?_?this.mergeUndirectedEdge:this.mergeDirectedEdge:_?this.addUndirectedEdge:this.addDirectedEdge,g.call(this,f,h,m))}}return this}nullCopy(t){const n=new Ct(_n({},this._options,t));return n.replaceAttributes(_n({},this.getAttributes())),n}emptyCopy(t){const n=this.nullCopy(t);return this._nodes.forEach((r,i)=>{const o=_n({},r.attributes);r=new n.NodeDataClass(i,o),n._nodes.set(i,r)}),n}copy(t){if(t=t||{},typeof t.type=="string"&&t.type!==this.type&&t.type!=="mixed")throw new We(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${t.type}" because this would mean losing information about the current graph.`);if(typeof t.multi=="boolean"&&t.multi!==this.multi&&t.multi!==!0)throw new We("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof t.allowSelfLoops=="boolean"&&t.allowSelfLoops!==this.allowSelfLoops&&t.allowSelfLoops!==!0)throw new We("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const n=this.emptyCopy(t),r=this._edges.values();let i,o;for(;i=r.next(),i.done!==!0;)o=i.value,N4(n,"copy",!1,o.undirected,o.key,o.source.key,o.target.key,_n({},o.attributes));return n}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const t={};this._nodes.forEach((o,s)=>{t[s]=o.attributes});const n={},r={};this._edges.forEach((o,s)=>{const u=o.undirected?"--":"->";let c="",f=o.source.key,h=o.target.key,m;o.undirected&&f>h&&(m=f,f=h,h=m);const _=`(${f})${u}(${h})`;s.startsWith("geid_")?this.multi&&(typeof r[_]>"u"?r[_]=0:r[_]++,c+=`${r[_]}. `):c+=`[${s}]: `,c+=_,n[c]=o.attributes});const i={};for(const o in this)this.hasOwnProperty(o)&&!bC.has(o)&&typeof this[o]!="function"&&typeof o!="symbol"&&(i[o]=this[o]);return i.attributes=this._attributes,i.nodes=t,i.edges=n,Lr(i,"constructor",this.constructor),i}}typeof Symbol<"u"&&(Ct.prototype[Symbol.for("nodejs.util.inspect.custom")]=Ct.prototype.inspect);Soe.forEach(e=>{["add","merge","update"].forEach(t=>{const n=e.name(t),r=t==="add"?N4:joe;e.generateKey?Ct.prototype[n]=function(i,o,s){return r(this,n,!0,(e.type||this.type)==="undirected",null,i,o,s,t==="update")}:Ct.prototype[n]=function(i,o,s,u){return r(this,n,!1,(e.type||this.type)==="undirected",i,o,s,u,t==="update")}})});qae(Ct);Yae(Ct);coe(Ct);yoe(Ct);class L4 extends Ct{constructor(t){const n=_n({type:"directed"},t);if("multi"in n&&n.multi!==!1)throw new Oe("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(n.type!=="directed")throw new Oe('DirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class z4 extends Ct{constructor(t){const n=_n({type:"undirected"},t);if("multi"in n&&n.multi!==!1)throw new Oe("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(n.type!=="undirected")throw new Oe('UndirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class M4 extends Ct{constructor(t){const n=_n({multi:!0},t);if("multi"in n&&n.multi!==!0)throw new Oe("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(n)}}class D4 extends Ct{constructor(t){const n=_n({type:"directed",multi:!0},t);if("multi"in n&&n.multi!==!0)throw new Oe("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(n.type!=="directed")throw new Oe('MultiDirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class O4 extends Ct{constructor(t){const n=_n({type:"undirected",multi:!0},t);if("multi"in n&&n.multi!==!0)throw new Oe("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(n.type!=="undirected")throw new Oe('MultiUndirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}function yu(e){e.from=function(t,n){const r=_n({},t.options,n),i=new e(r);return i.import(t),i}}yu(Ct);yu(L4);yu(z4);yu(M4);yu(D4);yu(O4);Ct.Graph=Ct;Ct.DirectedGraph=L4;Ct.UndirectedGraph=z4;Ct.MultiGraph=M4;Ct.MultiDirectedGraph=D4;Ct.MultiUndirectedGraph=O4;Ct.InvalidArgumentsGraphError=Oe;Ct.NotFoundGraphError=ze;Ct.UsageGraphError=We;function Aoe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hc(e){var t=Aoe(e,"string");return typeof t=="symbol"?t:t+""}function Un(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Hc(r.key),r)}}function Gn(e,t,n){return t&&wC(e.prototype,t),n&&wC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function su(e){return su=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},su(e)}function q4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(q4=function(){return!!e})()}function Le(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Roe(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Le(e)}function Ur(e,t,n){return t=su(t),Roe(e,q4()?Reflect.construct(t,n||[],su(e).constructor):t.apply(e,n))}function i1(e,t){return i1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},i1(e,t)}function Gr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i1(e,t)}function Noe(e){if(Array.isArray(e))return e}function Loe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,u=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function a1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function I4(e,t){if(e){if(typeof e=="string")return a1(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a1(e,t):void 0}}function zoe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
254
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lu(e,t){return Noe(e)||Loe(e,t)||I4(e,t)||zoe()}var Dy={black:"#000000",silver:"#C0C0C0",gray:"#808080",grey:"#808080",white:"#FFFFFF",maroon:"#800000",red:"#FF0000",purple:"#800080",fuchsia:"#FF00FF",green:"#008000",lime:"#00FF00",olive:"#808000",yellow:"#FFFF00",navy:"#000080",blue:"#0000FF",teal:"#008080",aqua:"#00FFFF",darkblue:"#00008B",mediumblue:"#0000CD",darkgreen:"#006400",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",rebeccapurple:"#663399",mediumaquamarine:"#66CDAA",dimgray:"#696969",dimgrey:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",slategrey:"#708090",lightslategray:"#778899",lightslategrey:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370DB",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",palevioletred:"#DB7093",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",lightyellow:"#FFFFE0",ivory:"#FFFFF0"},P4=new Int8Array(4),Oy=new Int32Array(P4.buffer,0,1),Moe=new Float32Array(P4.buffer,0,1),Doe=/^\s*rgba?\s*\(/,Ooe=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function qoe(e){var t=0,n=0,r=0,i=1;if(e[0]==="#")e.length===4?(t=parseInt(e.charAt(1)+e.charAt(1),16),n=parseInt(e.charAt(2)+e.charAt(2),16),r=parseInt(e.charAt(3)+e.charAt(3),16)):(t=parseInt(e.charAt(1)+e.charAt(2),16),n=parseInt(e.charAt(3)+e.charAt(4),16),r=parseInt(e.charAt(5)+e.charAt(6),16)),e.length===9&&(i=parseInt(e.charAt(7)+e.charAt(8),16)/255);else if(Doe.test(e)){var o=e.match(Ooe);o&&(t=+o[1],n=+o[2],r=+o[3],o[4]&&(i=+o[4]))}return{r:t,g:n,b:r,a:i}}var Vl={};for(var Ch in Dy)Vl[Ch]=No(Dy[Ch]),Vl[Dy[Ch]]=Vl[Ch];function $4(e,t,n,r,i){return Oy[0]=r<<24|n<<16|t<<8|e,Oy[0]=Oy[0]&4278190079,Moe[0]}function No(e){if(e=e.toLowerCase(),typeof Vl[e]<"u")return Vl[e];var t=qoe(e),n=t.r,r=t.g,i=t.b,o=t.a;o=o*255|0;var s=$4(n,r,i,o);return Vl[e]=s,s}var qy={};function B4(e){if(typeof qy[e]<"u")return qy[e];var t=(e&16711680)>>>16,n=(e&65280)>>>8,r=e&255,i=255,o=$4(t,n,r,i);return qy[e]=o,o}function kC(e,t,n,r){return n+(t<<8)+(e<<16)}function EC(e,t,n,r,i,o){var s=Math.floor(n/o*i),u=Math.floor(e.drawingBufferHeight/o-r/o*i),c=new Uint8Array(4);e.bindFramebuffer(e.FRAMEBUFFER,t),e.readPixels(s,u,1,1,e.RGBA,e.UNSIGNED_BYTE,c);var f=lu(c,4),h=f[0],m=f[1],_=f[2],g=f[3];return[h,m,_,g]}function je(e,t,n){return(t=Hc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ue(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SC(Object(n),!0).forEach(function(r){je(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ioe(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=su(e))!==null;);return e}function o1(){return o1=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=Ioe(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},o1.apply(null,arguments)}function U4(e,t,n,r){var i=o1(su(e.prototype),t,n);return typeof i=="function"?function(o){return i.apply(n,o)}:i}function Poe(e){return e.normalized?1:e.size}function Iy(e){var t=0;return e.forEach(function(n){return t+=Poe(n)}),t}function G4(e,t,n){var r=e==="VERTEX"?t.VERTEX_SHADER:t.FRAGMENT_SHADER,i=t.createShader(r);if(i===null)throw new Error("loadShader: error while creating the shader");t.shaderSource(i,n),t.compileShader(i);var o=t.getShaderParameter(i,t.COMPILE_STATUS);if(!o){var s=t.getShaderInfoLog(i);throw t.deleteShader(i),new Error(`loadShader: error while compiling the shader:
255
+ `.concat(s,`
256
+ `).concat(n))}return i}function $oe(e,t){return G4("VERTEX",e,t)}function Boe(e,t){return G4("FRAGMENT",e,t)}function Uoe(e,t){var n=e.createProgram();if(n===null)throw new Error("loadProgram: error while creating the program.");var r,i;for(r=0,i=t.length;r<i;r++)e.attachShader(n,t[r]);e.linkProgram(n);var o=e.getProgramParameter(n,e.LINK_STATUS);if(!o)throw e.deleteProgram(n),new Error("loadProgram: error while linking the program.");return n}function CC(e){var t=e.gl,n=e.buffer,r=e.program,i=e.vertexShader,o=e.fragmentShader;t.deleteShader(i),t.deleteShader(o),t.deleteProgram(r),t.deleteBuffer(n)}var TC=`#define PICKING_MODE
257
+ `,Goe=je(je(je(je(je(je(je(je({},WebGL2RenderingContext.BOOL,1),WebGL2RenderingContext.BYTE,1),WebGL2RenderingContext.UNSIGNED_BYTE,1),WebGL2RenderingContext.SHORT,2),WebGL2RenderingContext.UNSIGNED_SHORT,2),WebGL2RenderingContext.INT,4),WebGL2RenderingContext.UNSIGNED_INT,4),WebGL2RenderingContext.FLOAT,4),F4=(function(){function e(t,n,r){Un(this,e),je(this,"array",new Float32Array),je(this,"constantArray",new Float32Array),je(this,"capacity",0),je(this,"verticesCount",0);var i=this.getDefinition();if(this.VERTICES=i.VERTICES,this.VERTEX_SHADER_SOURCE=i.VERTEX_SHADER_SOURCE,this.FRAGMENT_SHADER_SOURCE=i.FRAGMENT_SHADER_SOURCE,this.UNIFORMS=i.UNIFORMS,this.ATTRIBUTES=i.ATTRIBUTES,this.METHOD=i.METHOD,this.CONSTANT_ATTRIBUTES="CONSTANT_ATTRIBUTES"in i?i.CONSTANT_ATTRIBUTES:[],this.CONSTANT_DATA="CONSTANT_DATA"in i?i.CONSTANT_DATA:[],this.isInstanced="CONSTANT_ATTRIBUTES"in i,this.ATTRIBUTES_ITEMS_COUNT=Iy(this.ATTRIBUTES),this.STRIDE=this.VERTICES*this.ATTRIBUTES_ITEMS_COUNT,this.renderer=r,this.normalProgram=this.getProgramInfo("normal",t,i.VERTEX_SHADER_SOURCE,i.FRAGMENT_SHADER_SOURCE,null),this.pickProgram=n?this.getProgramInfo("pick",t,TC+i.VERTEX_SHADER_SOURCE,TC+i.FRAGMENT_SHADER_SOURCE,n):null,this.isInstanced){var o=Iy(this.CONSTANT_ATTRIBUTES);if(this.CONSTANT_DATA.length!==this.VERTICES)throw new Error("Program: error while getting constant data (expected ".concat(this.VERTICES," items, received ").concat(this.CONSTANT_DATA.length," instead)"));this.constantArray=new Float32Array(this.CONSTANT_DATA.length*o);for(var s=0;s<this.CONSTANT_DATA.length;s++){var u=this.CONSTANT_DATA[s];if(u.length!==o)throw new Error("Program: error while getting constant data (one vector has ".concat(u.length," items instead of ").concat(o,")"));for(var c=0;c<u.length;c++)this.constantArray[s*o+c]=u[c]}this.STRIDE=this.ATTRIBUTES_ITEMS_COUNT}}return Gn(e,[{key:"kill",value:function(){CC(this.normalProgram),this.pickProgram&&(CC(this.pickProgram),this.pickProgram=null)}},{key:"getProgramInfo",value:function(n,r,i,o,s){var u=this.getDefinition(),c=r.createBuffer();if(c===null)throw new Error("Program: error while creating the WebGL buffer.");var f=$oe(r,i),h=Boe(r,o),m=Uoe(r,[f,h]),_={};u.UNIFORMS.forEach(function(E){var C=r.getUniformLocation(m,E);C&&(_[E]=C)});var g={};u.ATTRIBUTES.forEach(function(E){g[E.name]=r.getAttribLocation(m,E.name)});var b;if("CONSTANT_ATTRIBUTES"in u&&(u.CONSTANT_ATTRIBUTES.forEach(function(E){g[E.name]=r.getAttribLocation(m,E.name)}),b=r.createBuffer(),b===null))throw new Error("Program: error while creating the WebGL constant buffer.");return{name:n,program:m,gl:r,frameBuffer:s,buffer:c,constantBuffer:b||{},uniformLocations:_,attributeLocations:g,isPicking:n==="pick",vertexShader:f,fragmentShader:h}}},{key:"bindProgram",value:function(n){var r=this,i=0,o=n.gl,s=n.buffer;this.isInstanced?(o.bindBuffer(o.ARRAY_BUFFER,n.constantBuffer),i=0,this.CONSTANT_ATTRIBUTES.forEach(function(u){return i+=r.bindAttribute(u,n,i,!1)}),o.bufferData(o.ARRAY_BUFFER,this.constantArray,o.STATIC_DRAW),o.bindBuffer(o.ARRAY_BUFFER,n.buffer),i=0,this.ATTRIBUTES.forEach(function(u){return i+=r.bindAttribute(u,n,i,!0)}),o.bufferData(o.ARRAY_BUFFER,this.array,o.DYNAMIC_DRAW)):(o.bindBuffer(o.ARRAY_BUFFER,s),i=0,this.ATTRIBUTES.forEach(function(u){return i+=r.bindAttribute(u,n,i)}),o.bufferData(o.ARRAY_BUFFER,this.array,o.DYNAMIC_DRAW)),o.bindBuffer(o.ARRAY_BUFFER,null)}},{key:"unbindProgram",value:function(n){var r=this;this.isInstanced?(this.CONSTANT_ATTRIBUTES.forEach(function(i){return r.unbindAttribute(i,n,!1)}),this.ATTRIBUTES.forEach(function(i){return r.unbindAttribute(i,n,!0)})):this.ATTRIBUTES.forEach(function(i){return r.unbindAttribute(i,n)})}},{key:"bindAttribute",value:function(n,r,i,o){var s=Goe[n.type];if(typeof s!="number")throw new Error('Program.bind: yet unsupported attribute type "'.concat(n.type,'"'));var u=r.attributeLocations[n.name],c=r.gl;if(u!==-1){c.enableVertexAttribArray(u);var f=this.isInstanced?(o?this.ATTRIBUTES_ITEMS_COUNT:Iy(this.CONSTANT_ATTRIBUTES))*Float32Array.BYTES_PER_ELEMENT:this.ATTRIBUTES_ITEMS_COUNT*Float32Array.BYTES_PER_ELEMENT;if(c.vertexAttribPointer(u,n.size,n.type,n.normalized||!1,f,i),this.isInstanced&&o)if(c instanceof WebGL2RenderingContext)c.vertexAttribDivisor(u,1);else{var h=c.getExtension("ANGLE_instanced_arrays");h&&h.vertexAttribDivisorANGLE(u,1)}}return n.size*s}},{key:"unbindAttribute",value:function(n,r,i){var o=r.attributeLocations[n.name],s=r.gl;if(o!==-1&&(s.disableVertexAttribArray(o),this.isInstanced&&i))if(s instanceof WebGL2RenderingContext)s.vertexAttribDivisor(o,0);else{var u=s.getExtension("ANGLE_instanced_arrays");u&&u.vertexAttribDivisorANGLE(o,0)}}},{key:"reallocate",value:function(n){n!==this.capacity&&(this.capacity=n,this.verticesCount=this.VERTICES*n,this.array=new Float32Array(this.isInstanced?this.capacity*this.ATTRIBUTES_ITEMS_COUNT:this.verticesCount*this.ATTRIBUTES_ITEMS_COUNT))}},{key:"hasNothingToRender",value:function(){return this.verticesCount===0}},{key:"renderProgram",value:function(n,r){var i=r.gl,o=r.program;i.enable(i.BLEND),i.useProgram(o),this.setUniforms(n,r),this.drawWebGL(this.METHOD,r)}},{key:"render",value:function(n){this.hasNothingToRender()||(this.pickProgram&&(this.pickProgram.gl.viewport(0,0,n.width*n.pixelRatio/n.downSizingRatio,n.height*n.pixelRatio/n.downSizingRatio),this.bindProgram(this.pickProgram),this.renderProgram(Ue(Ue({},n),{},{pixelRatio:n.pixelRatio/n.downSizingRatio}),this.pickProgram),this.unbindProgram(this.pickProgram)),this.normalProgram.gl.viewport(0,0,n.width*n.pixelRatio,n.height*n.pixelRatio),this.bindProgram(this.normalProgram),this.renderProgram(n,this.normalProgram),this.unbindProgram(this.normalProgram))}},{key:"drawWebGL",value:function(n,r){var i=r.gl,o=r.frameBuffer;if(i.bindFramebuffer(i.FRAMEBUFFER,o),!this.isInstanced)i.drawArrays(n,0,this.verticesCount);else if(i instanceof WebGL2RenderingContext)i.drawArraysInstanced(n,0,this.VERTICES,this.capacity);else{var s=i.getExtension("ANGLE_instanced_arrays");s&&s.drawArraysInstancedANGLE(n,0,this.VERTICES,this.capacity)}}}]),e})(),H4=(function(e){Gr(t,e);function t(){return Un(this,t),Ur(this,t,arguments)}return Gn(t,[{key:"kill",value:function(){U4(t,"kill",this)([])}},{key:"process",value:function(r,i,o){var s=i*this.STRIDE;if(o.hidden){for(var u=s+this.STRIDE;s<u;s++)this.array[s]=0;return}return this.processVisibleItem(B4(r),s,o)}}]),t})(F4),Nf=(function(e){Gr(t,e);function t(){var n;Un(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=Ur(this,t,[].concat(i)),je(Le(n),"drawLabel",void 0),n}return Gn(t,[{key:"kill",value:function(){U4(t,"kill",this)([])}},{key:"process",value:function(r,i,o,s,u){var c=i*this.STRIDE;if(u.hidden||o.hidden||s.hidden){for(var f=c+this.STRIDE;c<f;c++)this.array[c]=0;return}return this.processVisibleItem(B4(r),c,o,s,u)}}]),t})(F4);function Foe(e,t){return(function(){function n(r,i,o){Un(this,n),je(this,"drawLabel",t),this.programs=e.map(function(s){return new s(r,i,o)})}return Gn(n,[{key:"reallocate",value:function(i){this.programs.forEach(function(o){return o.reallocate(i)})}},{key:"process",value:function(i,o,s,u,c){this.programs.forEach(function(f){return f.process(i,o,s,u,c)})}},{key:"render",value:function(i){this.programs.forEach(function(o){return o.render(i)})}},{key:"kill",value:function(){this.programs.forEach(function(i){return i.kill()})}}]),n})()}function Hoe(e,t,n,r,i){var o=i.edgeLabelSize,s=i.edgeLabelFont,u=i.edgeLabelWeight,c=i.edgeLabelColor.attribute?t[i.edgeLabelColor.attribute]||i.edgeLabelColor.color||"#000":i.edgeLabelColor.color,f=t.label;if(f){e.fillStyle=c,e.font="".concat(u," ").concat(o,"px ").concat(s);var h=n.size,m=r.size,_=n.x,g=n.y,b=r.x,E=r.y,C=(_+b)/2,w=(g+E)/2,T=b-_,k=E-g,S=Math.sqrt(T*T+k*k);if(!(S<h+m)){_+=T*h/S,g+=k*h/S,b-=T*m/S,E-=k*m/S,C=(_+b)/2,w=(g+E)/2,T=b-_,k=E-g,S=Math.sqrt(T*T+k*k);var z=e.measureText(f).width;if(z>S){var R="…";for(f=f+R,z=e.measureText(f).width;z>S&&f.length>1;)f=f.slice(0,-2)+R,z=e.measureText(f).width;if(f.length<4)return}var M;T>0?k>0?M=Math.acos(T/S):M=Math.asin(k/S):k>0?M=Math.acos(T/S)+Math.PI:M=Math.asin(T/S)+Math.PI/2,e.save(),e.translate(C,w),e.rotate(M),e.fillText(f,-z/2,t.size/2+o),e.restore()}}}function V4(e,t,n){if(t.label){var r=n.labelSize,i=n.labelFont,o=n.labelWeight,s=n.labelColor.attribute?t[n.labelColor.attribute]||n.labelColor.color||"#000":n.labelColor.color;e.fillStyle=s,e.font="".concat(o," ").concat(r,"px ").concat(i),e.fillText(t.label,t.x+t.size+3,t.y+r/3)}}function Voe(e,t,n){var r=n.labelSize,i=n.labelFont,o=n.labelWeight;e.font="".concat(o," ").concat(r,"px ").concat(i),e.fillStyle="#FFF",e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=8,e.shadowColor="#000";var s=2;if(typeof t.label=="string"){var u=e.measureText(t.label).width,c=Math.round(u+5),f=Math.round(r+2*s),h=Math.max(t.size,r/2)+s,m=Math.asin(f/2/h),_=Math.sqrt(Math.abs(Math.pow(h,2)-Math.pow(f/2,2)));e.beginPath(),e.moveTo(t.x+_,t.y+f/2),e.lineTo(t.x+h+c,t.y+f/2),e.lineTo(t.x+h+c,t.y-f/2),e.lineTo(t.x+_,t.y-f/2),e.arc(t.x,t.y,h,m,-m),e.closePath(),e.fill()}else e.beginPath(),e.arc(t.x,t.y,t.size+s,0,Math.PI*2),e.closePath(),e.fill();e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=0,V4(e,t,n)}var Xoe=`
258
+ precision highp float;
259
+
260
+ varying vec4 v_color;
261
+ varying vec2 v_diffVector;
262
+ varying float v_radius;
263
+
264
+ uniform float u_correctionRatio;
265
+
266
+ const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);
267
+
268
+ void main(void) {
269
+ float border = u_correctionRatio * 2.0;
270
+ float dist = length(v_diffVector) - v_radius + border;
271
+
272
+ // No antialiasing for picking mode:
273
+ #ifdef PICKING_MODE
274
+ if (dist > border)
275
+ gl_FragColor = transparent;
276
+ else
277
+ gl_FragColor = v_color;
278
+
279
+ #else
280
+ float t = 0.0;
281
+ if (dist > border)
282
+ t = 1.0;
283
+ else if (dist > 0.0)
284
+ t = dist / border;
285
+
286
+ gl_FragColor = mix(v_color, transparent, t);
287
+ #endif
288
+ }
289
+ `,Yoe=Xoe,Woe=`
290
+ attribute vec4 a_id;
291
+ attribute vec4 a_color;
292
+ attribute vec2 a_position;
293
+ attribute float a_size;
294
+ attribute float a_angle;
295
+
296
+ uniform mat3 u_matrix;
297
+ uniform float u_sizeRatio;
298
+ uniform float u_correctionRatio;
299
+
300
+ varying vec4 v_color;
301
+ varying vec2 v_diffVector;
302
+ varying float v_radius;
303
+ varying float v_border;
304
+
305
+ const float bias = 255.0 / 254.0;
306
+
307
+ void main() {
308
+ float size = a_size * u_correctionRatio / u_sizeRatio * 4.0;
309
+ vec2 diffVector = size * vec2(cos(a_angle), sin(a_angle));
310
+ vec2 position = a_position + diffVector;
311
+ gl_Position = vec4(
312
+ (u_matrix * vec3(position, 1)).xy,
313
+ 0,
314
+ 1
315
+ );
316
+
317
+ v_diffVector = diffVector;
318
+ v_radius = size / 2.0;
319
+
320
+ #ifdef PICKING_MODE
321
+ // For picking mode, we use the ID as the color:
322
+ v_color = a_id;
323
+ #else
324
+ // For normal mode, we use the color:
325
+ v_color = a_color;
326
+ #endif
327
+
328
+ v_color.a *= bias;
329
+ }
330
+ `,Koe=Woe,X4=WebGLRenderingContext,jC=X4.UNSIGNED_BYTE,Py=X4.FLOAT,Qoe=["u_sizeRatio","u_correctionRatio","u_matrix"],wp=(function(e){Gr(t,e);function t(){return Un(this,t),Ur(this,t,arguments)}return Gn(t,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:Koe,FRAGMENT_SHADER_SOURCE:Yoe,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:Qoe,ATTRIBUTES:[{name:"a_position",size:2,type:Py},{name:"a_size",size:1,type:Py},{name:"a_color",size:4,type:jC,normalized:!0},{name:"a_id",size:4,type:jC,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_angle",size:1,type:Py}],CONSTANT_DATA:[[t.ANGLE_1],[t.ANGLE_2],[t.ANGLE_3]]}}},{key:"processVisibleItem",value:function(r,i,o){var s=this.array,u=No(o.color);s[i++]=o.x,s[i++]=o.y,s[i++]=o.size,s[i++]=u,s[i++]=r}},{key:"setUniforms",value:function(r,i){var o=i.gl,s=i.uniformLocations,u=s.u_sizeRatio,c=s.u_correctionRatio,f=s.u_matrix;o.uniform1f(c,r.correctionRatio),o.uniform1f(u,r.sizeRatio),o.uniformMatrix3fv(f,!1,r.matrix)}}]),t})(H4);je(wp,"ANGLE_1",0);je(wp,"ANGLE_2",2*Math.PI/3);je(wp,"ANGLE_3",4*Math.PI/3);var Zoe=`
331
+ precision mediump float;
332
+
333
+ varying vec4 v_color;
334
+
335
+ void main(void) {
336
+ gl_FragColor = v_color;
337
+ }
338
+ `,Joe=Zoe,ese=`
339
+ attribute vec2 a_position;
340
+ attribute vec2 a_normal;
341
+ attribute float a_radius;
342
+ attribute vec3 a_barycentric;
343
+
344
+ #ifdef PICKING_MODE
345
+ attribute vec4 a_id;
346
+ #else
347
+ attribute vec4 a_color;
348
+ #endif
349
+
350
+ uniform mat3 u_matrix;
351
+ uniform float u_sizeRatio;
352
+ uniform float u_correctionRatio;
353
+ uniform float u_minEdgeThickness;
354
+ uniform float u_lengthToThicknessRatio;
355
+ uniform float u_widenessToThicknessRatio;
356
+
357
+ varying vec4 v_color;
358
+
359
+ const float bias = 255.0 / 254.0;
360
+
361
+ void main() {
362
+ float minThickness = u_minEdgeThickness;
363
+
364
+ float normalLength = length(a_normal);
365
+ vec2 unitNormal = a_normal / normalLength;
366
+
367
+ // These first computations are taken from edge.vert.glsl and
368
+ // edge.clamped.vert.glsl. Please read it to get better comments on what's
369
+ // happening:
370
+ float pixelsThickness = max(normalLength / u_sizeRatio, minThickness);
371
+ float webGLThickness = pixelsThickness * u_correctionRatio;
372
+ float webGLNodeRadius = a_radius * 2.0 * u_correctionRatio / u_sizeRatio;
373
+ float webGLArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0;
374
+ float webGLArrowHeadThickness = webGLThickness * u_widenessToThicknessRatio;
375
+
376
+ float da = a_barycentric.x;
377
+ float db = a_barycentric.y;
378
+ float dc = a_barycentric.z;
379
+
380
+ vec2 delta = vec2(
381
+ da * (webGLNodeRadius * unitNormal.y)
382
+ + db * ((webGLNodeRadius + webGLArrowHeadLength) * unitNormal.y + webGLArrowHeadThickness * unitNormal.x)
383
+ + dc * ((webGLNodeRadius + webGLArrowHeadLength) * unitNormal.y - webGLArrowHeadThickness * unitNormal.x),
384
+
385
+ da * (-webGLNodeRadius * unitNormal.x)
386
+ + db * (-(webGLNodeRadius + webGLArrowHeadLength) * unitNormal.x + webGLArrowHeadThickness * unitNormal.y)
387
+ + dc * (-(webGLNodeRadius + webGLArrowHeadLength) * unitNormal.x - webGLArrowHeadThickness * unitNormal.y)
388
+ );
389
+
390
+ vec2 position = (u_matrix * vec3(a_position + delta, 1)).xy;
391
+
392
+ gl_Position = vec4(position, 0, 1);
393
+
394
+ #ifdef PICKING_MODE
395
+ // For picking mode, we use the ID as the color:
396
+ v_color = a_id;
397
+ #else
398
+ // For normal mode, we use the color:
399
+ v_color = a_color;
400
+ #endif
401
+
402
+ v_color.a *= bias;
403
+ }
404
+ `,tse=ese,Y4=WebGLRenderingContext,AC=Y4.UNSIGNED_BYTE,Th=Y4.FLOAT,nse=["u_matrix","u_sizeRatio","u_correctionRatio","u_minEdgeThickness","u_lengthToThicknessRatio","u_widenessToThicknessRatio"],kp={extremity:"target",lengthToThicknessRatio:2.5,widenessToThicknessRatio:2};function W4(e){var t=Ue(Ue({},kp),{});return(function(n){Gr(r,n);function r(){return Un(this,r),Ur(this,r,arguments)}return Gn(r,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:tse,FRAGMENT_SHADER_SOURCE:Joe,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:nse,ATTRIBUTES:[{name:"a_position",size:2,type:Th},{name:"a_normal",size:2,type:Th},{name:"a_radius",size:1,type:Th},{name:"a_color",size:4,type:AC,normalized:!0},{name:"a_id",size:4,type:AC,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_barycentric",size:3,type:Th}],CONSTANT_DATA:[[1,0,0],[0,1,0],[0,0,1]]}}},{key:"processVisibleItem",value:function(o,s,u,c,f){if(t.extremity==="source"){var h=[c,u];u=h[0],c=h[1]}var m=f.size||1,_=c.size||1,g=u.x,b=u.y,E=c.x,C=c.y,w=No(f.color),T=E-g,k=C-b,S=T*T+k*k,z=0,R=0;S&&(S=1/Math.sqrt(S),z=-k*S*m,R=T*S*m);var M=this.array;M[s++]=E,M[s++]=C,M[s++]=-z,M[s++]=-R,M[s++]=_,M[s++]=w,M[s++]=o}},{key:"setUniforms",value:function(o,s){var u=s.gl,c=s.uniformLocations,f=c.u_matrix,h=c.u_sizeRatio,m=c.u_correctionRatio,_=c.u_minEdgeThickness,g=c.u_lengthToThicknessRatio,b=c.u_widenessToThicknessRatio;u.uniformMatrix3fv(f,!1,o.matrix),u.uniform1f(h,o.sizeRatio),u.uniform1f(m,o.correctionRatio),u.uniform1f(_,o.minEdgeThickness),u.uniform1f(g,t.lengthToThicknessRatio),u.uniform1f(b,t.widenessToThicknessRatio)}}]),r})(Nf)}W4();var rse=`
405
+ precision mediump float;
406
+
407
+ varying vec4 v_color;
408
+ varying vec2 v_normal;
409
+ varying float v_thickness;
410
+ varying float v_feather;
411
+
412
+ const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);
413
+
414
+ void main(void) {
415
+ // We only handle antialiasing for normal mode:
416
+ #ifdef PICKING_MODE
417
+ gl_FragColor = v_color;
418
+ #else
419
+ float dist = length(v_normal) * v_thickness;
420
+
421
+ float t = smoothstep(
422
+ v_thickness - v_feather,
423
+ v_thickness,
424
+ dist
425
+ );
426
+
427
+ gl_FragColor = mix(v_color, transparent, t);
428
+ #endif
429
+ }
430
+ `,K4=rse,ise=`
431
+ attribute vec4 a_id;
432
+ attribute vec4 a_color;
433
+ attribute vec2 a_normal;
434
+ attribute float a_normalCoef;
435
+ attribute vec2 a_positionStart;
436
+ attribute vec2 a_positionEnd;
437
+ attribute float a_positionCoef;
438
+ attribute float a_radius;
439
+ attribute float a_radiusCoef;
440
+
441
+ uniform mat3 u_matrix;
442
+ uniform float u_zoomRatio;
443
+ uniform float u_sizeRatio;
444
+ uniform float u_pixelRatio;
445
+ uniform float u_correctionRatio;
446
+ uniform float u_minEdgeThickness;
447
+ uniform float u_lengthToThicknessRatio;
448
+ uniform float u_feather;
449
+
450
+ varying vec4 v_color;
451
+ varying vec2 v_normal;
452
+ varying float v_thickness;
453
+ varying float v_feather;
454
+
455
+ const float bias = 255.0 / 254.0;
456
+
457
+ void main() {
458
+ float minThickness = u_minEdgeThickness;
459
+
460
+ float radius = a_radius * a_radiusCoef;
461
+ vec2 normal = a_normal * a_normalCoef;
462
+ vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef;
463
+
464
+ float normalLength = length(normal);
465
+ vec2 unitNormal = normal / normalLength;
466
+
467
+ // These first computations are taken from edge.vert.glsl. Please read it to
468
+ // get better comments on what's happening:
469
+ float pixelsThickness = max(normalLength, minThickness * u_sizeRatio);
470
+ float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio;
471
+
472
+ // Here, we move the point to leave space for the arrow head:
473
+ float direction = sign(radius);
474
+ float webGLNodeRadius = direction * radius * 2.0 * u_correctionRatio / u_sizeRatio;
475
+ float webGLArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0;
476
+
477
+ vec2 compensationVector = vec2(-direction * unitNormal.y, direction * unitNormal.x) * (webGLNodeRadius + webGLArrowHeadLength);
478
+
479
+ // Here is the proper position of the vertex
480
+ gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness + compensationVector, 1)).xy, 0, 1);
481
+
482
+ v_thickness = webGLThickness / u_zoomRatio;
483
+
484
+ v_normal = unitNormal;
485
+
486
+ v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0;
487
+
488
+ #ifdef PICKING_MODE
489
+ // For picking mode, we use the ID as the color:
490
+ v_color = a_id;
491
+ #else
492
+ // For normal mode, we use the color:
493
+ v_color = a_color;
494
+ #endif
495
+
496
+ v_color.a *= bias;
497
+ }
498
+ `,ase=ise,Q4=WebGLRenderingContext,RC=Q4.UNSIGNED_BYTE,ds=Q4.FLOAT,ose=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness","u_lengthToThicknessRatio"],sse={lengthToThicknessRatio:kp.lengthToThicknessRatio};function Z4(e){var t=Ue(Ue({},sse),{});return(function(n){Gr(r,n);function r(){return Un(this,r),Ur(this,r,arguments)}return Gn(r,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:ase,FRAGMENT_SHADER_SOURCE:K4,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:ose,ATTRIBUTES:[{name:"a_positionStart",size:2,type:ds},{name:"a_positionEnd",size:2,type:ds},{name:"a_normal",size:2,type:ds},{name:"a_color",size:4,type:RC,normalized:!0},{name:"a_id",size:4,type:RC,normalized:!0},{name:"a_radius",size:1,type:ds}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:ds},{name:"a_normalCoef",size:1,type:ds},{name:"a_radiusCoef",size:1,type:ds}],CONSTANT_DATA:[[0,1,0],[0,-1,0],[1,1,1],[1,1,1],[0,-1,0],[1,-1,-1]]}}},{key:"processVisibleItem",value:function(o,s,u,c,f){var h=f.size||1,m=u.x,_=u.y,g=c.x,b=c.y,E=No(f.color),C=g-m,w=b-_,T=c.size||1,k=C*C+w*w,S=0,z=0;k&&(k=1/Math.sqrt(k),S=-w*k*h,z=C*k*h);var R=this.array;R[s++]=m,R[s++]=_,R[s++]=g,R[s++]=b,R[s++]=S,R[s++]=z,R[s++]=E,R[s++]=o,R[s++]=T}},{key:"setUniforms",value:function(o,s){var u=s.gl,c=s.uniformLocations,f=c.u_matrix,h=c.u_zoomRatio,m=c.u_feather,_=c.u_pixelRatio,g=c.u_correctionRatio,b=c.u_sizeRatio,E=c.u_minEdgeThickness,C=c.u_lengthToThicknessRatio;u.uniformMatrix3fv(f,!1,o.matrix),u.uniform1f(h,o.zoomRatio),u.uniform1f(b,o.sizeRatio),u.uniform1f(g,o.correctionRatio),u.uniform1f(_,o.pixelRatio),u.uniform1f(m,o.antiAliasingFeather),u.uniform1f(E,o.minEdgeThickness),u.uniform1f(C,t.lengthToThicknessRatio)}}]),r})(Nf)}Z4();function lse(e){return Foe([Z4(),W4()])}var use=lse(),cse=use,fse=`
499
+ attribute vec4 a_id;
500
+ attribute vec4 a_color;
501
+ attribute vec2 a_normal;
502
+ attribute float a_normalCoef;
503
+ attribute vec2 a_positionStart;
504
+ attribute vec2 a_positionEnd;
505
+ attribute float a_positionCoef;
506
+
507
+ uniform mat3 u_matrix;
508
+ uniform float u_sizeRatio;
509
+ uniform float u_zoomRatio;
510
+ uniform float u_pixelRatio;
511
+ uniform float u_correctionRatio;
512
+ uniform float u_minEdgeThickness;
513
+ uniform float u_feather;
514
+
515
+ varying vec4 v_color;
516
+ varying vec2 v_normal;
517
+ varying float v_thickness;
518
+ varying float v_feather;
519
+
520
+ const float bias = 255.0 / 254.0;
521
+
522
+ void main() {
523
+ float minThickness = u_minEdgeThickness;
524
+
525
+ vec2 normal = a_normal * a_normalCoef;
526
+ vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef;
527
+
528
+ float normalLength = length(normal);
529
+ vec2 unitNormal = normal / normalLength;
530
+
531
+ // We require edges to be at least "minThickness" pixels thick *on screen*
532
+ // (so we need to compensate the size ratio):
533
+ float pixelsThickness = max(normalLength, minThickness * u_sizeRatio);
534
+
535
+ // Then, we need to retrieve the normalized thickness of the edge in the WebGL
536
+ // referential (in a ([0, 1], [0, 1]) space), using our "magic" correction
537
+ // ratio:
538
+ float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio;
539
+
540
+ // Here is the proper position of the vertex
541
+ gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness, 1)).xy, 0, 1);
542
+
543
+ // For the fragment shader though, we need a thickness that takes the "magic"
544
+ // correction ratio into account (as in webGLThickness), but so that the
545
+ // antialiasing effect does not depend on the zoom level. So here's yet
546
+ // another thickness version:
547
+ v_thickness = webGLThickness / u_zoomRatio;
548
+
549
+ v_normal = unitNormal;
550
+
551
+ v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0;
552
+
553
+ #ifdef PICKING_MODE
554
+ // For picking mode, we use the ID as the color:
555
+ v_color = a_id;
556
+ #else
557
+ // For normal mode, we use the color:
558
+ v_color = a_color;
559
+ #endif
560
+
561
+ v_color.a *= bias;
562
+ }
563
+ `,dse=fse,J4=WebGLRenderingContext,NC=J4.UNSIGNED_BYTE,Ec=J4.FLOAT,hse=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness"],mse=(function(e){Gr(t,e);function t(){return Un(this,t),Ur(this,t,arguments)}return Gn(t,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:dse,FRAGMENT_SHADER_SOURCE:K4,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:hse,ATTRIBUTES:[{name:"a_positionStart",size:2,type:Ec},{name:"a_positionEnd",size:2,type:Ec},{name:"a_normal",size:2,type:Ec},{name:"a_color",size:4,type:NC,normalized:!0},{name:"a_id",size:4,type:NC,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:Ec},{name:"a_normalCoef",size:1,type:Ec}],CONSTANT_DATA:[[0,1],[0,-1],[1,1],[1,1],[0,-1],[1,-1]]}}},{key:"processVisibleItem",value:function(r,i,o,s,u){var c=u.size||1,f=o.x,h=o.y,m=s.x,_=s.y,g=No(u.color),b=m-f,E=_-h,C=b*b+E*E,w=0,T=0;C&&(C=1/Math.sqrt(C),w=-E*C*c,T=b*C*c);var k=this.array;k[i++]=f,k[i++]=h,k[i++]=m,k[i++]=_,k[i++]=w,k[i++]=T,k[i++]=g,k[i++]=r}},{key:"setUniforms",value:function(r,i){var o=i.gl,s=i.uniformLocations,u=s.u_matrix,c=s.u_zoomRatio,f=s.u_feather,h=s.u_pixelRatio,m=s.u_correctionRatio,_=s.u_sizeRatio,g=s.u_minEdgeThickness;o.uniformMatrix3fv(u,!1,r.matrix),o.uniform1f(c,r.zoomRatio),o.uniform1f(_,r.sizeRatio),o.uniform1f(m,r.correctionRatio),o.uniform1f(h,r.pixelRatio),o.uniform1f(f,r.antiAliasingFeather),o.uniform1f(g,r.minEdgeThickness)}}]),t})(Nf),X0=(function(e){Gr(t,e);function t(){var n;return Un(this,t),n=Ur(this,t),n.rawEmitter=Le(n),n}return Gn(t)})(B0.EventEmitter),$y,LC;function eL(){return LC||(LC=1,$y=function(t){return t!==null&&typeof t=="object"&&typeof t.addUndirectedEdgeWithKey=="function"&&typeof t.dropNode=="function"&&typeof t.multi=="boolean"}),$y}var pse=eL();const _se=Ea(pse);var gse=function(t){return t},yse=function(t){return t*t},vse=function(t){return t*(2-t)},bse=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},xse=function(t){return t*t*t},wse=function(t){return--t*t*t+1},kse=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},Ese={linear:gse,quadraticIn:yse,quadraticOut:vse,quadraticInOut:bse,cubicIn:xse,cubicOut:wse,cubicInOut:kse},Sse={easing:"quadraticInOut",duration:150};function ti(){return Float32Array.of(1,0,0,0,1,0,0,0,1)}function jh(e,t,n){return e[0]=t,e[4]=typeof n=="number"?n:t,e}function zC(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[3]=-n,e[4]=r,e}function MC(e,t,n){return e[6]=t,e[7]=n,e}function mo(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],u=e[5],c=e[6],f=e[7],h=e[8],m=t[0],_=t[1],g=t[2],b=t[3],E=t[4],C=t[5],w=t[6],T=t[7],k=t[8];return e[0]=m*n+_*o+g*c,e[1]=m*r+_*s+g*f,e[2]=m*i+_*u+g*h,e[3]=b*n+E*o+C*c,e[4]=b*r+E*s+C*f,e[5]=b*i+E*u+C*h,e[6]=w*n+T*o+k*c,e[7]=w*r+T*s+k*f,e[8]=w*i+T*u+k*h,e}function s1(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=e[0],i=e[1],o=e[3],s=e[4],u=e[6],c=e[7],f=t.x,h=t.y;return{x:f*r+h*o+u*n,y:f*i+h*s+c*n}}function Cse(e,t){var n=e.height/e.width,r=t.height/t.width;return n<1&&r>1||n>1&&r<1?1:Math.min(Math.max(r,1/r),Math.max(1/n,n))}function Sc(e,t,n,r,i){var o=e.angle,s=e.ratio,u=e.x,c=e.y,f=t.width,h=t.height,m=ti(),_=Math.min(f,h)-2*r,g=Cse(t,n);return i?(mo(m,MC(ti(),u,c)),mo(m,jh(ti(),s)),mo(m,zC(ti(),o)),mo(m,jh(ti(),f/_/2/g,h/_/2/g))):(mo(m,jh(ti(),2*(_/f)*g,2*(_/h)*g)),mo(m,zC(ti(),-o)),mo(m,jh(ti(),1/s)),mo(m,MC(ti(),-u,-c))),m}function Tse(e,t,n){var r=s1(e,{x:Math.cos(t.angle),y:Math.sin(t.angle)},0),i=r.x,o=r.y;return 1/Math.sqrt(Math.pow(i,2)+Math.pow(o,2))/n.width}function jse(e){if(!e.order)return{x:[0,1],y:[0,1]};var t=1/0,n=-1/0,r=1/0,i=-1/0;return e.forEachNode(function(o,s){var u=s.x,c=s.y;u<t&&(t=u),u>n&&(n=u),c<r&&(r=c),c>i&&(i=c)}),{x:[t,n],y:[r,i]}}function Ase(e){if(!_se(e))throw new Error("Sigma: invalid graph instance.");e.forEachNode(function(t,n){if(!Number.isFinite(n.x)||!Number.isFinite(n.y))throw new Error("Sigma: Coordinates of node ".concat(t," are invalid. A node must have a numeric 'x' and 'y' attribute."))})}function Rse(e,t,n){var r=document.createElement(e);if(t)for(var i in t)r.style[i]=t[i];if(n)for(var o in n)r.setAttribute(o,n[o]);return r}function DC(){return typeof window.devicePixelRatio<"u"?window.devicePixelRatio:1}function OC(e,t,n){return n.sort(function(r,i){var o=t(r)||0,s=t(i)||0;return o<s?-1:o>s?1:0})}function qC(e){var t=lu(e.x,2),n=t[0],r=t[1],i=lu(e.y,2),o=i[0],s=i[1],u=Math.max(r-n,s-o),c=(r+n)/2,f=(s+o)/2;(u===0||Math.abs(u)===1/0||isNaN(u))&&(u=1),isNaN(c)&&(c=0),isNaN(f)&&(f=0);var h=function(_){return{x:.5+(_.x-c)/u,y:.5+(_.y-f)/u}};return h.applyTo=function(m){m.x=.5+(m.x-c)/u,m.y=.5+(m.y-f)/u},h.inverse=function(m){return{x:c+u*(m.x-.5),y:f+u*(m.y-.5)}},h.ratio=u,h}function l1(e){"@babel/helpers - typeof";return l1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l1(e)}function IC(e,t){var n=t.size;if(n!==0){var r=e.length;e.length+=n;var i=0;t.forEach(function(o){e[r+i]=o,i++})}}function By(e){e=e||{};for(var t=0,n=arguments.length<=1?0:arguments.length-1;t<n;t++){var r=t+1<1||arguments.length<=t+1?void 0:arguments[t+1];r&&Object.assign(e,r)}return e}var Y0={hideEdgesOnMove:!1,hideLabelsOnMove:!1,renderLabels:!0,renderEdgeLabels:!1,enableEdgeEvents:!1,defaultNodeColor:"#999",defaultNodeType:"circle",defaultEdgeColor:"#ccc",defaultEdgeType:"line",labelFont:"Arial",labelSize:14,labelWeight:"normal",labelColor:{color:"#000"},edgeLabelFont:"Arial",edgeLabelSize:14,edgeLabelWeight:"normal",edgeLabelColor:{attribute:"color"},stagePadding:30,defaultDrawEdgeLabel:Hoe,defaultDrawNodeLabel:V4,defaultDrawNodeHover:Voe,minEdgeThickness:1.7,antiAliasingFeather:1,dragTimeout:100,draggedEventsTolerance:3,inertiaDuration:200,inertiaRatio:3,zoomDuration:250,zoomingRatio:1.7,doubleClickTimeout:300,doubleClickZoomingRatio:2.2,doubleClickZoomingDuration:200,tapMoveTolerance:10,zoomToSizeRatioFunction:Math.sqrt,itemSizesReference:"screen",autoRescale:!0,autoCenter:!0,labelDensity:1,labelGridCellSize:100,labelRenderedSizeThreshold:6,nodeReducer:null,edgeReducer:null,zIndex:!1,minCameraRatio:null,maxCameraRatio:null,enableCameraZooming:!0,enableCameraPanning:!0,enableCameraRotation:!0,cameraPanBoundaries:null,allowInvalidContainer:!1,nodeProgramClasses:{},nodeHoverProgramClasses:{},edgeProgramClasses:{}},Nse={circle:wp},Lse={arrow:cse,line:mse};function Uy(e){if(typeof e.labelDensity!="number"||e.labelDensity<0)throw new Error("Settings: invalid `labelDensity`. Expecting a positive number.");var t=e.minCameraRatio,n=e.maxCameraRatio;if(typeof t=="number"&&typeof n=="number"&&n<t)throw new Error("Settings: invalid camera ratio boundaries. Expecting `maxCameraRatio` to be greater than `minCameraRatio`.")}function zse(e){var t=By({},Y0,e);return t.nodeProgramClasses=By({},Nse,t.nodeProgramClasses),t.edgeProgramClasses=By({},Lse,t.edgeProgramClasses),t}var Ah=1.5,PC=(function(e){Gr(t,e);function t(){var n;return Un(this,t),n=Ur(this,t),je(Le(n),"x",.5),je(Le(n),"y",.5),je(Le(n),"angle",0),je(Le(n),"ratio",1),je(Le(n),"minRatio",null),je(Le(n),"maxRatio",null),je(Le(n),"enabledZooming",!0),je(Le(n),"enabledPanning",!0),je(Le(n),"enabledRotation",!0),je(Le(n),"clean",null),je(Le(n),"nextFrame",null),je(Le(n),"previousState",null),je(Le(n),"enabled",!0),n.previousState=n.getState(),n}return Gn(t,[{key:"enable",value:function(){return this.enabled=!0,this}},{key:"disable",value:function(){return this.enabled=!1,this}},{key:"getState",value:function(){return{x:this.x,y:this.y,angle:this.angle,ratio:this.ratio}}},{key:"hasState",value:function(r){return this.x===r.x&&this.y===r.y&&this.ratio===r.ratio&&this.angle===r.angle}},{key:"getPreviousState",value:function(){var r=this.previousState;return r?{x:r.x,y:r.y,angle:r.angle,ratio:r.ratio}:null}},{key:"getBoundedRatio",value:function(r){var i=r;return typeof this.minRatio=="number"&&(i=Math.max(i,this.minRatio)),typeof this.maxRatio=="number"&&(i=Math.min(i,this.maxRatio)),i}},{key:"validateState",value:function(r){var i={};return this.enabledPanning&&typeof r.x=="number"&&(i.x=r.x),this.enabledPanning&&typeof r.y=="number"&&(i.y=r.y),this.enabledZooming&&typeof r.ratio=="number"&&(i.ratio=this.getBoundedRatio(r.ratio)),this.enabledRotation&&typeof r.angle=="number"&&(i.angle=r.angle),this.clean?this.clean(Ue(Ue({},this.getState()),i)):i}},{key:"isAnimated",value:function(){return!!this.nextFrame}},{key:"setState",value:function(r){if(!this.enabled)return this;this.previousState=this.getState();var i=this.validateState(r);return typeof i.x=="number"&&(this.x=i.x),typeof i.y=="number"&&(this.y=i.y),typeof i.ratio=="number"&&(this.ratio=i.ratio),typeof i.angle=="number"&&(this.angle=i.angle),this.hasState(this.previousState)||this.emit("updated",this.getState()),this}},{key:"updateState",value:function(r){return this.setState(r(this.getState())),this}},{key:"animate",value:function(r){var i=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2?arguments[2]:void 0;if(!s)return new Promise(function(g){return i.animate(r,o,g)});if(this.enabled){var u=Ue(Ue({},Sse),o),c=this.validateState(r),f=typeof u.easing=="function"?u.easing:Ese[u.easing],h=Date.now(),m=this.getState(),_=function g(){var b=(Date.now()-h)/u.duration;if(b>=1){i.nextFrame=null,i.setState(c),i.animationCallback&&(i.animationCallback.call(null),i.animationCallback=void 0);return}var E=f(b),C={};typeof c.x=="number"&&(C.x=m.x+(c.x-m.x)*E),typeof c.y=="number"&&(C.y=m.y+(c.y-m.y)*E),i.enabledRotation&&typeof c.angle=="number"&&(C.angle=m.angle+(c.angle-m.angle)*E),typeof c.ratio=="number"&&(C.ratio=m.ratio+(c.ratio-m.ratio)*E),i.setState(C),i.nextFrame=requestAnimationFrame(g)};this.nextFrame?(cancelAnimationFrame(this.nextFrame),this.animationCallback&&this.animationCallback.call(null),this.nextFrame=requestAnimationFrame(_)):_(),this.animationCallback=s}}},{key:"animatedZoom",value:function(r){return r?typeof r=="number"?this.animate({ratio:this.ratio/r}):this.animate({ratio:this.ratio/(r.factor||Ah)},r):this.animate({ratio:this.ratio/Ah})}},{key:"animatedUnzoom",value:function(r){return r?typeof r=="number"?this.animate({ratio:this.ratio*r}):this.animate({ratio:this.ratio*(r.factor||Ah)},r):this.animate({ratio:this.ratio*Ah})}},{key:"animatedReset",value:function(r){return this.animate({x:.5,y:.5,ratio:1,angle:0},r)}},{key:"copy",value:function(){return t.from(this.getState())}}],[{key:"from",value:function(r){var i=new t;return i.setState(r)}}]),t})(X0);function oi(e,t){var n=t.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}function _a(e,t){var n=Ue(Ue({},oi(e,t)),{},{sigmaDefaultPrevented:!1,preventSigmaDefault:function(){n.sigmaDefaultPrevented=!0},original:e});return n}function Cc(e){var t="x"in e?e:Ue(Ue({},e.touches[0]||e.previousTouches[0]),{},{original:e.original,sigmaDefaultPrevented:e.sigmaDefaultPrevented,preventSigmaDefault:function(){e.sigmaDefaultPrevented=!0,t.sigmaDefaultPrevented=!0}});return t}function Mse(e,t){return Ue(Ue({},_a(e,t)),{},{delta:tL(e)})}var Dse=2;function Yh(e){for(var t=[],n=0,r=Math.min(e.length,Dse);n<r;n++)t.push(e[n]);return t}function Tc(e,t,n){var r={touches:Yh(e.touches).map(function(i){return oi(i,n)}),previousTouches:t.map(function(i){return oi(i,n)}),sigmaDefaultPrevented:!1,preventSigmaDefault:function(){r.sigmaDefaultPrevented=!0},original:e};return r}function tL(e){if(typeof e.deltaY<"u")return e.deltaY*-3/360;if(typeof e.detail<"u")return e.detail/-9;throw new Error("Captor: could not extract delta from event.")}var nL=(function(e){Gr(t,e);function t(n,r){var i;return Un(this,t),i=Ur(this,t),i.container=n,i.renderer=r,i}return Gn(t)})(X0),Ose=["doubleClickTimeout","doubleClickZoomingDuration","doubleClickZoomingRatio","dragTimeout","draggedEventsTolerance","inertiaDuration","inertiaRatio","zoomDuration","zoomingRatio"],qse=Ose.reduce(function(e,t){return Ue(Ue({},e),{},je({},t,Y0[t]))},{}),Ise=(function(e){Gr(t,e);function t(n,r){var i;return Un(this,t),i=Ur(this,t,[n,r]),je(Le(i),"enabled",!0),je(Le(i),"draggedEvents",0),je(Le(i),"downStartTime",null),je(Le(i),"lastMouseX",null),je(Le(i),"lastMouseY",null),je(Le(i),"isMouseDown",!1),je(Le(i),"isMoving",!1),je(Le(i),"movingTimeout",null),je(Le(i),"startCameraState",null),je(Le(i),"clicks",0),je(Le(i),"doubleClickTimeout",null),je(Le(i),"currentWheelDirection",0),je(Le(i),"settings",qse),i.handleClick=i.handleClick.bind(Le(i)),i.handleRightClick=i.handleRightClick.bind(Le(i)),i.handleDown=i.handleDown.bind(Le(i)),i.handleUp=i.handleUp.bind(Le(i)),i.handleMove=i.handleMove.bind(Le(i)),i.handleWheel=i.handleWheel.bind(Le(i)),i.handleLeave=i.handleLeave.bind(Le(i)),i.handleEnter=i.handleEnter.bind(Le(i)),n.addEventListener("click",i.handleClick,{capture:!1}),n.addEventListener("contextmenu",i.handleRightClick,{capture:!1}),n.addEventListener("mousedown",i.handleDown,{capture:!1}),n.addEventListener("wheel",i.handleWheel,{capture:!1}),n.addEventListener("mouseleave",i.handleLeave,{capture:!1}),n.addEventListener("mouseenter",i.handleEnter,{capture:!1}),document.addEventListener("mousemove",i.handleMove,{capture:!1}),document.addEventListener("mouseup",i.handleUp,{capture:!1}),i}return Gn(t,[{key:"kill",value:function(){var r=this.container;r.removeEventListener("click",this.handleClick),r.removeEventListener("contextmenu",this.handleRightClick),r.removeEventListener("mousedown",this.handleDown),r.removeEventListener("wheel",this.handleWheel),r.removeEventListener("mouseleave",this.handleLeave),r.removeEventListener("mouseenter",this.handleEnter),document.removeEventListener("mousemove",this.handleMove),document.removeEventListener("mouseup",this.handleUp)}},{key:"handleClick",value:function(r){var i=this;if(this.enabled){if(this.clicks++,this.clicks===2)return this.clicks=0,typeof this.doubleClickTimeout=="number"&&(clearTimeout(this.doubleClickTimeout),this.doubleClickTimeout=null),this.handleDoubleClick(r);setTimeout(function(){i.clicks=0,i.doubleClickTimeout=null},this.settings.doubleClickTimeout),this.draggedEvents<this.settings.draggedEventsTolerance&&this.emit("click",_a(r,this.container))}}},{key:"handleRightClick",value:function(r){this.enabled&&this.emit("rightClick",_a(r,this.container))}},{key:"handleDoubleClick",value:function(r){if(this.enabled){r.preventDefault(),r.stopPropagation();var i=_a(r,this.container);if(this.emit("doubleClick",i),!i.sigmaDefaultPrevented){var o=this.renderer.getCamera(),s=o.getBoundedRatio(o.getState().ratio/this.settings.doubleClickZoomingRatio);o.animate(this.renderer.getViewportZoomedState(oi(r,this.container),s),{easing:"quadraticInOut",duration:this.settings.doubleClickZoomingDuration})}}}},{key:"handleDown",value:function(r){if(this.enabled){if(r.button===0){this.startCameraState=this.renderer.getCamera().getState();var i=oi(r,this.container),o=i.x,s=i.y;this.lastMouseX=o,this.lastMouseY=s,this.draggedEvents=0,this.downStartTime=Date.now(),this.isMouseDown=!0}this.emit("mousedown",_a(r,this.container))}}},{key:"handleUp",value:function(r){var i=this;if(!(!this.enabled||!this.isMouseDown)){var o=this.renderer.getCamera();this.isMouseDown=!1,typeof this.movingTimeout=="number"&&(clearTimeout(this.movingTimeout),this.movingTimeout=null);var s=oi(r,this.container),u=s.x,c=s.y,f=o.getState(),h=o.getPreviousState()||{x:0,y:0};this.isMoving?o.animate({x:f.x+this.settings.inertiaRatio*(f.x-h.x),y:f.y+this.settings.inertiaRatio*(f.y-h.y)},{duration:this.settings.inertiaDuration,easing:"quadraticOut"}):(this.lastMouseX!==u||this.lastMouseY!==c)&&o.setState({x:f.x,y:f.y}),this.isMoving=!1,setTimeout(function(){var m=i.draggedEvents>0;i.draggedEvents=0,m&&i.renderer.refresh()},0),this.emit("mouseup",_a(r,this.container))}}},{key:"handleMove",value:function(r){var i=this;if(this.enabled){var o=_a(r,this.container);if(this.emit("mousemovebody",o),(r.target===this.container||r.composedPath()[0]===this.container)&&this.emit("mousemove",o),!o.sigmaDefaultPrevented&&this.isMouseDown){this.isMoving=!0,this.draggedEvents++,typeof this.movingTimeout=="number"&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout(function(){i.movingTimeout=null,i.isMoving=!1},this.settings.dragTimeout);var s=this.renderer.getCamera(),u=oi(r,this.container),c=u.x,f=u.y,h=this.renderer.viewportToFramedGraph({x:this.lastMouseX,y:this.lastMouseY}),m=this.renderer.viewportToFramedGraph({x:c,y:f}),_=h.x-m.x,g=h.y-m.y,b=s.getState(),E=b.x+_,C=b.y+g;s.setState({x:E,y:C}),this.lastMouseX=c,this.lastMouseY=f,r.preventDefault(),r.stopPropagation()}}}},{key:"handleLeave",value:function(r){this.emit("mouseleave",_a(r,this.container))}},{key:"handleEnter",value:function(r){this.emit("mouseenter",_a(r,this.container))}},{key:"handleWheel",value:function(r){var i=this,o=this.renderer.getCamera();if(!(!this.enabled||!o.enabledZooming)){var s=tL(r);if(s){var u=Mse(r,this.container);if(this.emit("wheel",u),u.sigmaDefaultPrevented){r.preventDefault(),r.stopPropagation();return}var c=o.getState().ratio,f=s>0?1/this.settings.zoomingRatio:this.settings.zoomingRatio,h=o.getBoundedRatio(c*f),m=s>0?1:-1,_=Date.now();c!==h&&(r.preventDefault(),r.stopPropagation(),!(this.currentWheelDirection===m&&this.lastWheelTriggerTime&&_-this.lastWheelTriggerTime<this.settings.zoomDuration/5)&&(o.animate(this.renderer.getViewportZoomedState(oi(r,this.container),h),{easing:"quadraticOut",duration:this.settings.zoomDuration},function(){i.currentWheelDirection=0}),this.currentWheelDirection=m,this.lastWheelTriggerTime=_))}}}},{key:"setSettings",value:function(r){this.settings=r}}]),t})(nL),Pse=["dragTimeout","inertiaDuration","inertiaRatio","doubleClickTimeout","doubleClickZoomingRatio","doubleClickZoomingDuration","tapMoveTolerance"],$se=Pse.reduce(function(e,t){return Ue(Ue({},e),{},je({},t,Y0[t]))},{}),Bse=(function(e){Gr(t,e);function t(n,r){var i;return Un(this,t),i=Ur(this,t,[n,r]),je(Le(i),"enabled",!0),je(Le(i),"isMoving",!1),je(Le(i),"hasMoved",!1),je(Le(i),"touchMode",0),je(Le(i),"startTouchesPositions",[]),je(Le(i),"lastTouches",[]),je(Le(i),"lastTap",null),je(Le(i),"settings",$se),i.handleStart=i.handleStart.bind(Le(i)),i.handleLeave=i.handleLeave.bind(Le(i)),i.handleMove=i.handleMove.bind(Le(i)),n.addEventListener("touchstart",i.handleStart,{capture:!1}),n.addEventListener("touchcancel",i.handleLeave,{capture:!1}),document.addEventListener("touchend",i.handleLeave,{capture:!1,passive:!1}),document.addEventListener("touchmove",i.handleMove,{capture:!1,passive:!1}),i}return Gn(t,[{key:"kill",value:function(){var r=this.container;r.removeEventListener("touchstart",this.handleStart),r.removeEventListener("touchcancel",this.handleLeave),document.removeEventListener("touchend",this.handleLeave),document.removeEventListener("touchmove",this.handleMove)}},{key:"getDimensions",value:function(){return{width:this.container.offsetWidth,height:this.container.offsetHeight}}},{key:"handleStart",value:function(r){var i=this;if(this.enabled){r.preventDefault();var o=Yh(r.touches);if(this.touchMode=o.length,this.startCameraState=this.renderer.getCamera().getState(),this.startTouchesPositions=o.map(function(g){return oi(g,i.container)}),this.touchMode===2){var s=lu(this.startTouchesPositions,2),u=s[0],c=u.x,f=u.y,h=s[1],m=h.x,_=h.y;this.startTouchesAngle=Math.atan2(_-f,m-c),this.startTouchesDistance=Math.sqrt(Math.pow(m-c,2)+Math.pow(_-f,2))}this.emit("touchdown",Tc(r,this.lastTouches,this.container)),this.lastTouches=o,this.lastTouchesPositions=this.startTouchesPositions}}},{key:"handleLeave",value:function(r){if(!(!this.enabled||!this.startTouchesPositions.length)){switch(r.cancelable&&r.preventDefault(),this.movingTimeout&&(this.isMoving=!1,clearTimeout(this.movingTimeout)),this.touchMode){case 2:if(r.touches.length===1){this.handleStart(r),r.preventDefault();break}case 1:if(this.isMoving){var i=this.renderer.getCamera(),o=i.getState(),s=i.getPreviousState()||{x:0,y:0};i.animate({x:o.x+this.settings.inertiaRatio*(o.x-s.x),y:o.y+this.settings.inertiaRatio*(o.y-s.y)},{duration:this.settings.inertiaDuration,easing:"quadraticOut"})}this.hasMoved=!1,this.isMoving=!1,this.touchMode=0;break}if(this.emit("touchup",Tc(r,this.lastTouches,this.container)),!r.touches.length){var u=oi(this.lastTouches[0],this.container),c=this.startTouchesPositions[0],f=Math.pow(u.x-c.x,2)+Math.pow(u.y-c.y,2);if(!r.touches.length&&f<Math.pow(this.settings.tapMoveTolerance,2))if(this.lastTap&&Date.now()-this.lastTap.time<this.settings.doubleClickTimeout){var h=Tc(r,this.lastTouches,this.container);if(this.emit("doubletap",h),this.lastTap=null,!h.sigmaDefaultPrevented){var m=this.renderer.getCamera(),_=m.getBoundedRatio(m.getState().ratio/this.settings.doubleClickZoomingRatio);m.animate(this.renderer.getViewportZoomedState(u,_),{easing:"quadraticInOut",duration:this.settings.doubleClickZoomingDuration})}}else{var g=Tc(r,this.lastTouches,this.container);this.emit("tap",g),this.lastTap={time:Date.now(),position:g.touches[0]||g.previousTouches[0]}}}this.lastTouches=Yh(r.touches),this.startTouchesPositions=[]}}},{key:"handleMove",value:function(r){var i=this;if(!(!this.enabled||!this.startTouchesPositions.length)){r.preventDefault();var o=Yh(r.touches),s=o.map(function(B){return oi(B,i.container)}),u=this.lastTouches;this.lastTouches=o,this.lastTouchesPositions=s;var c=Tc(r,u,this.container);if(this.emit("touchmove",c),!c.sigmaDefaultPrevented&&(this.hasMoved||(this.hasMoved=s.some(function(B,ee){var O=i.startTouchesPositions[ee];return O&&(B.x!==O.x||B.y!==O.y)})),!!this.hasMoved)){this.isMoving=!0,this.movingTimeout&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout(function(){i.isMoving=!1},this.settings.dragTimeout);var f=this.renderer.getCamera(),h=this.startCameraState,m=this.renderer.getSetting("stagePadding");switch(this.touchMode){case 1:{var _=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0]),g=_.x,b=_.y,E=this.renderer.viewportToFramedGraph(s[0]),C=E.x,w=E.y;f.setState({x:h.x+g-C,y:h.y+b-w});break}case 2:{var T={x:.5,y:.5,angle:0,ratio:1},k=s[0],S=k.x,z=k.y,R=s[1],M=R.x,X=R.y,F=Math.atan2(X-z,M-S)-this.startTouchesAngle,I=Math.hypot(X-z,M-S)/this.startTouchesDistance,U=f.getBoundedRatio(h.ratio/I);T.ratio=U,T.angle=h.angle+F;var G=this.getDimensions(),q=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0],{cameraState:h}),$=Math.min(G.width,G.height)-2*m,Z=$/G.width,A=$/G.height,N=U/$,H=S-$/2/Z,Q=z-$/2/A,D=[H*Math.cos(-T.angle)-Q*Math.sin(-T.angle),Q*Math.cos(-T.angle)+H*Math.sin(-T.angle)];H=D[0],Q=D[1],T.x=q.x-H*N,T.y=q.y+Q*N,f.setState(T);break}}}}}},{key:"setSettings",value:function(r){this.settings=r}}]),t})(nL);function Use(e){if(Array.isArray(e))return a1(e)}function Gse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Fse(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
564
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $C(e){return Use(e)||Gse(e)||I4(e)||Fse()}function Hse(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function Gy(e,t){if(e==null)return{};var n,r,i=Hse(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var BC=(function(){function e(t,n){Un(this,e),this.key=t,this.size=n}return Gn(e,null,[{key:"compare",value:function(n,r){return n.size>r.size?-1:n.size<r.size||n.key>r.key?1:-1}}]),e})(),UC=(function(){function e(){Un(this,e),je(this,"width",0),je(this,"height",0),je(this,"cellSize",0),je(this,"columns",0),je(this,"rows",0),je(this,"cells",{})}return Gn(e,[{key:"resizeAndClear",value:function(n,r){this.width=n.width,this.height=n.height,this.cellSize=r,this.columns=Math.ceil(n.width/r),this.rows=Math.ceil(n.height/r),this.cells={}}},{key:"getIndex",value:function(n){var r=Math.floor(n.x/this.cellSize),i=Math.floor(n.y/this.cellSize);return i*this.columns+r}},{key:"add",value:function(n,r,i){var o=new BC(n,r),s=this.getIndex(i),u=this.cells[s];u||(u=[],this.cells[s]=u),u.push(o)}},{key:"organize",value:function(){for(var n in this.cells){var r=this.cells[n];r.sort(BC.compare)}}},{key:"getLabelsToDisplay",value:function(n,r){var i=this.cellSize*this.cellSize,o=i/n/n,s=o*r/i,u=Math.ceil(s),c=[];for(var f in this.cells)for(var h=this.cells[f],m=0;m<Math.min(u,h.length);m++)c.push(h[m].key);return c}}]),e})();function Vse(e){var t=e.graph,n=e.hoveredNode,r=e.highlightedNodes,i=e.displayedNodeLabels,o=[];return t.forEachEdge(function(s,u,c,f){(c===n||f===n||r.has(c)||r.has(f)||i.has(c)&&i.has(f))&&o.push(s)}),o}var GC=150,FC=50,ya=Object.prototype.hasOwnProperty;function Xse(e,t,n){if(!ya.call(n,"x")||!ya.call(n,"y"))throw new Error('Sigma: could not find a valid position (x, y) for node "'.concat(t,'". All your nodes must have a number "x" and "y". Maybe your forgot to apply a layout or your "nodeReducer" is not returning the correct data?'));return n.color||(n.color=e.defaultNodeColor),!n.label&&n.label!==""&&(n.label=null),n.label!==void 0&&n.label!==null?n.label=""+n.label:n.label=null,n.size||(n.size=2),ya.call(n,"hidden")||(n.hidden=!1),ya.call(n,"highlighted")||(n.highlighted=!1),ya.call(n,"forceLabel")||(n.forceLabel=!1),(!n.type||n.type==="")&&(n.type=e.defaultNodeType),n.zIndex||(n.zIndex=0),n}function Yse(e,t,n){return n.color||(n.color=e.defaultEdgeColor),n.label||(n.label=""),n.size||(n.size=.5),ya.call(n,"hidden")||(n.hidden=!1),ya.call(n,"forceLabel")||(n.forceLabel=!1),(!n.type||n.type==="")&&(n.type=e.defaultEdgeType),n.zIndex||(n.zIndex=0),n}var Wse=(function(e){Gr(t,e);function t(n,r){var i,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(Un(this,t),i=Ur(this,t),je(Le(i),"elements",{}),je(Le(i),"canvasContexts",{}),je(Le(i),"webGLContexts",{}),je(Le(i),"pickingLayers",new Set),je(Le(i),"textures",{}),je(Le(i),"frameBuffers",{}),je(Le(i),"activeListeners",{}),je(Le(i),"labelGrid",new UC),je(Le(i),"nodeDataCache",{}),je(Le(i),"edgeDataCache",{}),je(Le(i),"nodeProgramIndex",{}),je(Le(i),"edgeProgramIndex",{}),je(Le(i),"nodesWithForcedLabels",new Set),je(Le(i),"edgesWithForcedLabels",new Set),je(Le(i),"nodeExtent",{x:[0,1],y:[0,1]}),je(Le(i),"nodeZExtent",[1/0,-1/0]),je(Le(i),"edgeZExtent",[1/0,-1/0]),je(Le(i),"matrix",ti()),je(Le(i),"invMatrix",ti()),je(Le(i),"correctionRatio",1),je(Le(i),"customBBox",null),je(Le(i),"normalizationFunction",qC({x:[0,1],y:[0,1]})),je(Le(i),"graphToViewportRatio",1),je(Le(i),"itemIDsIndex",{}),je(Le(i),"nodeIndices",{}),je(Le(i),"edgeIndices",{}),je(Le(i),"width",0),je(Le(i),"height",0),je(Le(i),"pixelRatio",DC()),je(Le(i),"pickingDownSizingRatio",2*i.pixelRatio),je(Le(i),"displayedNodeLabels",new Set),je(Le(i),"displayedEdgeLabels",new Set),je(Le(i),"highlightedNodes",new Set),je(Le(i),"hoveredNode",null),je(Le(i),"hoveredEdge",null),je(Le(i),"renderFrame",null),je(Le(i),"renderHighlightedNodesFrame",null),je(Le(i),"needToProcess",!1),je(Le(i),"checkEdgesEventsFrame",null),je(Le(i),"nodePrograms",{}),je(Le(i),"nodeHoverPrograms",{}),je(Le(i),"edgePrograms",{}),i.settings=zse(o),Uy(i.settings),Ase(n),!(r instanceof HTMLElement))throw new Error("Sigma: container should be an html element.");i.graph=n,i.container=r,i.createWebGLContext("edges",{picking:o.enableEdgeEvents}),i.createCanvasContext("edgeLabels"),i.createWebGLContext("nodes",{picking:!0}),i.createCanvasContext("labels"),i.createCanvasContext("hovers"),i.createWebGLContext("hoverNodes"),i.createCanvasContext("mouse",{style:{touchAction:"none",userSelect:"none"}}),i.resize();for(var s in i.settings.nodeProgramClasses)i.registerNodeProgram(s,i.settings.nodeProgramClasses[s],i.settings.nodeHoverProgramClasses[s]);for(var u in i.settings.edgeProgramClasses)i.registerEdgeProgram(u,i.settings.edgeProgramClasses[u]);return i.camera=new PC,i.bindCameraHandlers(),i.mouseCaptor=new Ise(i.elements.mouse,Le(i)),i.mouseCaptor.setSettings(i.settings),i.touchCaptor=new Bse(i.elements.mouse,Le(i)),i.touchCaptor.setSettings(i.settings),i.bindEventHandlers(),i.bindGraphHandlers(),i.handleSettingsUpdate(),i.refresh(),i}return Gn(t,[{key:"registerNodeProgram",value:function(r,i,o){return this.nodePrograms[r]&&this.nodePrograms[r].kill(),this.nodeHoverPrograms[r]&&this.nodeHoverPrograms[r].kill(),this.nodePrograms[r]=new i(this.webGLContexts.nodes,this.frameBuffers.nodes,this),this.nodeHoverPrograms[r]=new(o||i)(this.webGLContexts.hoverNodes,null,this),this}},{key:"registerEdgeProgram",value:function(r,i){return this.edgePrograms[r]&&this.edgePrograms[r].kill(),this.edgePrograms[r]=new i(this.webGLContexts.edges,this.frameBuffers.edges,this),this}},{key:"unregisterNodeProgram",value:function(r){if(this.nodePrograms[r]){var i=this.nodePrograms,o=i[r],s=Gy(i,[r].map(Hc));o.kill(),this.nodePrograms=s}if(this.nodeHoverPrograms[r]){var u=this.nodeHoverPrograms,c=u[r],f=Gy(u,[r].map(Hc));c.kill(),this.nodePrograms=f}return this}},{key:"unregisterEdgeProgram",value:function(r){if(this.edgePrograms[r]){var i=this.edgePrograms,o=i[r],s=Gy(i,[r].map(Hc));o.kill(),this.edgePrograms=s}return this}},{key:"resetWebGLTexture",value:function(r){var i=this.webGLContexts[r],o=this.frameBuffers[r],s=this.textures[r];s&&i.deleteTexture(s);var u=i.createTexture();return i.bindFramebuffer(i.FRAMEBUFFER,o),i.bindTexture(i.TEXTURE_2D,u),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,this.width,this.height,0,i.RGBA,i.UNSIGNED_BYTE,null),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,u,0),this.textures[r]=u,this}},{key:"bindCameraHandlers",value:function(){var r=this;return this.activeListeners.camera=function(){r.scheduleRender()},this.camera.on("updated",this.activeListeners.camera),this}},{key:"unbindCameraHandlers",value:function(){return this.camera.removeListener("updated",this.activeListeners.camera),this}},{key:"getNodeAtPosition",value:function(r){var i=r.x,o=r.y,s=EC(this.webGLContexts.nodes,this.frameBuffers.nodes,i,o,this.pixelRatio,this.pickingDownSizingRatio),u=kC.apply(void 0,$C(s)),c=this.itemIDsIndex[u];return c&&c.type==="node"?c.id:null}},{key:"bindEventHandlers",value:function(){var r=this;this.activeListeners.handleResize=function(){r.scheduleRefresh()},window.addEventListener("resize",this.activeListeners.handleResize),this.activeListeners.handleMove=function(o){var s=Cc(o),u={event:s,preventSigmaDefault:function(){s.preventSigmaDefault()}},c=r.getNodeAtPosition(s);if(c&&r.hoveredNode!==c&&!r.nodeDataCache[c].hidden){r.hoveredNode&&r.emit("leaveNode",Ue(Ue({},u),{},{node:r.hoveredNode})),r.hoveredNode=c,r.emit("enterNode",Ue(Ue({},u),{},{node:c})),r.scheduleHighlightedNodesRender();return}if(r.hoveredNode&&r.getNodeAtPosition(s)!==r.hoveredNode){var f=r.hoveredNode;r.hoveredNode=null,r.emit("leaveNode",Ue(Ue({},u),{},{node:f})),r.scheduleHighlightedNodesRender();return}if(r.settings.enableEdgeEvents){var h=r.hoveredNode?null:r.getEdgeAtPoint(u.event.x,u.event.y);h!==r.hoveredEdge&&(r.hoveredEdge&&r.emit("leaveEdge",Ue(Ue({},u),{},{edge:r.hoveredEdge})),h&&r.emit("enterEdge",Ue(Ue({},u),{},{edge:h})),r.hoveredEdge=h)}},this.activeListeners.handleMoveBody=function(o){var s=Cc(o);r.emit("moveBody",{event:s,preventSigmaDefault:function(){s.preventSigmaDefault()}})},this.activeListeners.handleLeave=function(o){var s=Cc(o),u={event:s,preventSigmaDefault:function(){s.preventSigmaDefault()}};r.hoveredNode&&(r.emit("leaveNode",Ue(Ue({},u),{},{node:r.hoveredNode})),r.scheduleHighlightedNodesRender()),r.settings.enableEdgeEvents&&r.hoveredEdge&&(r.emit("leaveEdge",Ue(Ue({},u),{},{edge:r.hoveredEdge})),r.scheduleHighlightedNodesRender()),r.emit("leaveStage",Ue({},u))},this.activeListeners.handleEnter=function(o){var s=Cc(o),u={event:s,preventSigmaDefault:function(){s.preventSigmaDefault()}};r.emit("enterStage",Ue({},u))};var i=function(s){return function(u){var c=Cc(u),f={event:c,preventSigmaDefault:function(){c.preventSigmaDefault()}},h=r.getNodeAtPosition(c);if(h)return r.emit("".concat(s,"Node"),Ue(Ue({},f),{},{node:h}));if(r.settings.enableEdgeEvents){var m=r.getEdgeAtPoint(c.x,c.y);if(m)return r.emit("".concat(s,"Edge"),Ue(Ue({},f),{},{edge:m}))}return r.emit("".concat(s,"Stage"),f)}};return this.activeListeners.handleClick=i("click"),this.activeListeners.handleRightClick=i("rightClick"),this.activeListeners.handleDoubleClick=i("doubleClick"),this.activeListeners.handleWheel=i("wheel"),this.activeListeners.handleDown=i("down"),this.activeListeners.handleUp=i("up"),this.mouseCaptor.on("mousemove",this.activeListeners.handleMove),this.mouseCaptor.on("mousemovebody",this.activeListeners.handleMoveBody),this.mouseCaptor.on("click",this.activeListeners.handleClick),this.mouseCaptor.on("rightClick",this.activeListeners.handleRightClick),this.mouseCaptor.on("doubleClick",this.activeListeners.handleDoubleClick),this.mouseCaptor.on("wheel",this.activeListeners.handleWheel),this.mouseCaptor.on("mousedown",this.activeListeners.handleDown),this.mouseCaptor.on("mouseup",this.activeListeners.handleUp),this.mouseCaptor.on("mouseleave",this.activeListeners.handleLeave),this.mouseCaptor.on("mouseenter",this.activeListeners.handleEnter),this.touchCaptor.on("touchdown",this.activeListeners.handleDown),this.touchCaptor.on("touchdown",this.activeListeners.handleMove),this.touchCaptor.on("touchup",this.activeListeners.handleUp),this.touchCaptor.on("touchmove",this.activeListeners.handleMove),this.touchCaptor.on("tap",this.activeListeners.handleClick),this.touchCaptor.on("doubletap",this.activeListeners.handleDoubleClick),this.touchCaptor.on("touchmove",this.activeListeners.handleMoveBody),this}},{key:"bindGraphHandlers",value:function(){var r=this,i=this.graph,o=new Set(["x","y","zIndex","type"]);return this.activeListeners.eachNodeAttributesUpdatedGraphUpdate=function(s){var u,c=(u=s.hints)===null||u===void 0?void 0:u.attributes;r.graph.forEachNode(function(h){return r.updateNode(h)});var f=!c||c.some(function(h){return o.has(h)});r.refresh({partialGraph:{nodes:i.nodes()},skipIndexation:!f,schedule:!0})},this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate=function(s){var u,c=(u=s.hints)===null||u===void 0?void 0:u.attributes;r.graph.forEachEdge(function(h){return r.updateEdge(h)});var f=c&&["zIndex","type"].some(function(h){return c==null?void 0:c.includes(h)});r.refresh({partialGraph:{edges:i.edges()},skipIndexation:!f,schedule:!0})},this.activeListeners.addNodeGraphUpdate=function(s){var u=s.key;r.addNode(u),r.refresh({partialGraph:{nodes:[u]},skipIndexation:!1,schedule:!0})},this.activeListeners.updateNodeGraphUpdate=function(s){var u=s.key;r.refresh({partialGraph:{nodes:[u]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropNodeGraphUpdate=function(s){var u=s.key;r.removeNode(u),r.refresh({schedule:!0})},this.activeListeners.addEdgeGraphUpdate=function(s){var u=s.key;r.addEdge(u),r.refresh({partialGraph:{edges:[u]},schedule:!0})},this.activeListeners.updateEdgeGraphUpdate=function(s){var u=s.key;r.refresh({partialGraph:{edges:[u]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropEdgeGraphUpdate=function(s){var u=s.key;r.removeEdge(u),r.refresh({schedule:!0})},this.activeListeners.clearEdgesGraphUpdate=function(){r.clearEdgeState(),r.clearEdgeIndices(),r.refresh({schedule:!0})},this.activeListeners.clearGraphUpdate=function(){r.clearEdgeState(),r.clearNodeState(),r.clearEdgeIndices(),r.clearNodeIndices(),r.refresh({schedule:!0})},i.on("nodeAdded",this.activeListeners.addNodeGraphUpdate),i.on("nodeDropped",this.activeListeners.dropNodeGraphUpdate),i.on("nodeAttributesUpdated",this.activeListeners.updateNodeGraphUpdate),i.on("eachNodeAttributesUpdated",this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),i.on("edgeAdded",this.activeListeners.addEdgeGraphUpdate),i.on("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),i.on("edgeAttributesUpdated",this.activeListeners.updateEdgeGraphUpdate),i.on("eachEdgeAttributesUpdated",this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),i.on("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),i.on("cleared",this.activeListeners.clearGraphUpdate),this}},{key:"unbindGraphHandlers",value:function(){var r=this.graph;r.removeListener("nodeAdded",this.activeListeners.addNodeGraphUpdate),r.removeListener("nodeDropped",this.activeListeners.dropNodeGraphUpdate),r.removeListener("nodeAttributesUpdated",this.activeListeners.updateNodeGraphUpdate),r.removeListener("eachNodeAttributesUpdated",this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),r.removeListener("edgeAdded",this.activeListeners.addEdgeGraphUpdate),r.removeListener("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),r.removeListener("edgeAttributesUpdated",this.activeListeners.updateEdgeGraphUpdate),r.removeListener("eachEdgeAttributesUpdated",this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),r.removeListener("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),r.removeListener("cleared",this.activeListeners.clearGraphUpdate)}},{key:"getEdgeAtPoint",value:function(r,i){var o=EC(this.webGLContexts.edges,this.frameBuffers.edges,r,i,this.pixelRatio,this.pickingDownSizingRatio),s=kC.apply(void 0,$C(o)),u=this.itemIDsIndex[s];return u&&u.type==="edge"?u.id:null}},{key:"process",value:function(){var r=this;this.emit("beforeProcess");var i=this.graph,o=this.settings,s=this.getDimensions();if(this.nodeExtent=jse(this.graph),!this.settings.autoRescale){var u=s.width,c=s.height,f=this.nodeExtent,h=f.x,m=f.y;this.nodeExtent={x:[(h[0]+h[1])/2-u/2,(h[0]+h[1])/2+u/2],y:[(m[0]+m[1])/2-c/2,(m[0]+m[1])/2+c/2]}}this.normalizationFunction=qC(this.customBBox||this.nodeExtent);var _=new PC,g=Sc(_.getState(),s,this.getGraphDimensions(),this.getStagePadding());this.labelGrid.resizeAndClear(s,o.labelGridCellSize);for(var b={},E={},C={},w={},T=1,k=i.nodes(),S=0,z=k.length;S<z;S++){var R=k[S],M=this.nodeDataCache[R],X=i.getNodeAttributes(R);M.x=X.x,M.y=X.y,this.normalizationFunction.applyTo(M),typeof M.label=="string"&&!M.hidden&&this.labelGrid.add(R,M.size,this.framedGraphToViewport(M,{matrix:g})),b[M.type]=(b[M.type]||0)+1}this.labelGrid.organize();for(var F in this.nodePrograms){if(!ya.call(this.nodePrograms,F))throw new Error('Sigma: could not find a suitable program for node type "'.concat(F,'"!'));this.nodePrograms[F].reallocate(b[F]||0),b[F]=0}this.settings.zIndex&&this.nodeZExtent[0]!==this.nodeZExtent[1]&&(k=OC(this.nodeZExtent,function(oe){return r.nodeDataCache[oe].zIndex},k));for(var I=0,U=k.length;I<U;I++){var G=k[I];E[G]=T,w[E[G]]={type:"node",id:G},T++;var q=this.nodeDataCache[G];this.addNodeToProgram(G,E[G],b[q.type]++)}for(var $={},Z=i.edges(),A=0,N=Z.length;A<N;A++){var H=Z[A],Q=this.edgeDataCache[H];$[Q.type]=($[Q.type]||0)+1}this.settings.zIndex&&this.edgeZExtent[0]!==this.edgeZExtent[1]&&(Z=OC(this.edgeZExtent,function(oe){return r.edgeDataCache[oe].zIndex},Z));for(var D in this.edgePrograms){if(!ya.call(this.edgePrograms,D))throw new Error('Sigma: could not find a suitable program for edge type "'.concat(D,'"!'));this.edgePrograms[D].reallocate($[D]||0),$[D]=0}for(var B=0,ee=Z.length;B<ee;B++){var O=Z[B];C[O]=T,w[C[O]]={type:"edge",id:O},T++;var ie=this.edgeDataCache[O];this.addEdgeToProgram(O,C[O],$[ie.type]++)}return this.itemIDsIndex=w,this.nodeIndices=E,this.edgeIndices=C,this.emit("afterProcess"),this}},{key:"handleSettingsUpdate",value:function(r){var i=this,o=this.settings;if(this.camera.minRatio=o.minCameraRatio,this.camera.maxRatio=o.maxCameraRatio,this.camera.enabledZooming=o.enableCameraZooming,this.camera.enabledPanning=o.enableCameraPanning,this.camera.enabledRotation=o.enableCameraRotation,o.cameraPanBoundaries?this.camera.clean=function(h){return i.cleanCameraState(h,o.cameraPanBoundaries&&l1(o.cameraPanBoundaries)==="object"?o.cameraPanBoundaries:{})}:this.camera.clean=null,this.camera.setState(this.camera.validateState(this.camera.getState())),r){if(r.edgeProgramClasses!==o.edgeProgramClasses){for(var s in o.edgeProgramClasses)o.edgeProgramClasses[s]!==r.edgeProgramClasses[s]&&this.registerEdgeProgram(s,o.edgeProgramClasses[s]);for(var u in r.edgeProgramClasses)o.edgeProgramClasses[u]||this.unregisterEdgeProgram(u)}if(r.nodeProgramClasses!==o.nodeProgramClasses||r.nodeHoverProgramClasses!==o.nodeHoverProgramClasses){for(var c in o.nodeProgramClasses)(o.nodeProgramClasses[c]!==r.nodeProgramClasses[c]||o.nodeHoverProgramClasses[c]!==r.nodeHoverProgramClasses[c])&&this.registerNodeProgram(c,o.nodeProgramClasses[c],o.nodeHoverProgramClasses[c]);for(var f in r.nodeProgramClasses)o.nodeProgramClasses[f]||this.unregisterNodeProgram(f)}}return this.mouseCaptor.setSettings(this.settings),this.touchCaptor.setSettings(this.settings),this}},{key:"cleanCameraState",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.tolerance,s=o===void 0?0:o,u=i.boundaries,c=Ue({},r),f=u||this.nodeExtent,h=lu(f.x,2),m=h[0],_=h[1],g=lu(f.y,2),b=g[0],E=g[1],C=[this.graphToViewport({x:m,y:b},{cameraState:r}),this.graphToViewport({x:_,y:b},{cameraState:r}),this.graphToViewport({x:m,y:E},{cameraState:r}),this.graphToViewport({x:_,y:E},{cameraState:r})],w=1/0,T=-1/0,k=1/0,S=-1/0;C.forEach(function($){var Z=$.x,A=$.y;w=Math.min(w,Z),T=Math.max(T,Z),k=Math.min(k,A),S=Math.max(S,A)});var z=T-w,R=S-k,M=this.getDimensions(),X=M.width,F=M.height,I=0,U=0;if(z>=X?T<X-s?I=T-(X-s):w>s&&(I=w-s):T>X+s?I=T-(X+s):w<-s&&(I=w+s),R>=F?S<F-s?U=S-(F-s):k>s&&(U=k-s):S>F+s?U=S-(F+s):k<-s&&(U=k+s),I||U){var G=this.viewportToFramedGraph({x:0,y:0},{cameraState:r}),q=this.viewportToFramedGraph({x:I,y:U},{cameraState:r});I=q.x-G.x,U=q.y-G.y,c.x+=I,c.y+=U}return c}},{key:"renderLabels",value:function(){if(!this.settings.renderLabels)return this;var r=this.camera.getState(),i=this.labelGrid.getLabelsToDisplay(r.ratio,this.settings.labelDensity);IC(i,this.nodesWithForcedLabels),this.displayedNodeLabels=new Set;for(var o=this.canvasContexts.labels,s=0,u=i.length;s<u;s++){var c=i[s],f=this.nodeDataCache[c];if(!this.displayedNodeLabels.has(c)&&!f.hidden){var h=this.framedGraphToViewport(f),m=h.x,_=h.y,g=this.scaleSize(f.size);if(!(!f.forceLabel&&g<this.settings.labelRenderedSizeThreshold)&&!(m<-GC||m>this.width+GC||_<-FC||_>this.height+FC)){this.displayedNodeLabels.add(c);var b=this.settings.defaultDrawNodeLabel,E=this.nodePrograms[f.type],C=(E==null?void 0:E.drawLabel)||b;C(o,Ue(Ue({key:c},f),{},{size:g,x:m,y:_}),this.settings)}}}return this}},{key:"renderEdgeLabels",value:function(){if(!this.settings.renderEdgeLabels)return this;var r=this.canvasContexts.edgeLabels;r.clearRect(0,0,this.width,this.height);var i=Vse({graph:this.graph,hoveredNode:this.hoveredNode,displayedNodeLabels:this.displayedNodeLabels,highlightedNodes:this.highlightedNodes});IC(i,this.edgesWithForcedLabels);for(var o=new Set,s=0,u=i.length;s<u;s++){var c=i[s],f=this.graph.extremities(c),h=this.nodeDataCache[f[0]],m=this.nodeDataCache[f[1]],_=this.edgeDataCache[c];if(!o.has(c)&&!(_.hidden||h.hidden||m.hidden)){var g=this.settings.defaultDrawEdgeLabel,b=this.edgePrograms[_.type],E=(b==null?void 0:b.drawLabel)||g;E(r,Ue(Ue({key:c},_),{},{size:this.scaleSize(_.size)}),Ue(Ue(Ue({key:f[0]},h),this.framedGraphToViewport(h)),{},{size:this.scaleSize(h.size)}),Ue(Ue(Ue({key:f[1]},m),this.framedGraphToViewport(m)),{},{size:this.scaleSize(m.size)}),this.settings),o.add(c)}}return this.displayedEdgeLabels=o,this}},{key:"renderHighlightedNodes",value:function(){var r=this,i=this.canvasContexts.hovers;i.clearRect(0,0,this.width,this.height);var o=function(g){var b=r.nodeDataCache[g],E=r.framedGraphToViewport(b),C=E.x,w=E.y,T=r.scaleSize(b.size),k=r.settings.defaultDrawNodeHover,S=r.nodePrograms[b.type],z=(S==null?void 0:S.drawHover)||k;z(i,Ue(Ue({key:g},b),{},{size:T,x:C,y:w}),r.settings)},s=[];this.hoveredNode&&!this.nodeDataCache[this.hoveredNode].hidden&&s.push(this.hoveredNode),this.highlightedNodes.forEach(function(_){_!==r.hoveredNode&&s.push(_)}),s.forEach(function(_){return o(_)});var u={};s.forEach(function(_){var g=r.nodeDataCache[_].type;u[g]=(u[g]||0)+1});for(var c in this.nodeHoverPrograms)this.nodeHoverPrograms[c].reallocate(u[c]||0),u[c]=0;s.forEach(function(_){var g=r.nodeDataCache[_];r.nodeHoverPrograms[g.type].process(0,u[g.type]++,g)}),this.webGLContexts.hoverNodes.clear(this.webGLContexts.hoverNodes.COLOR_BUFFER_BIT);var f=this.getRenderParams();for(var h in this.nodeHoverPrograms){var m=this.nodeHoverPrograms[h];m.render(f)}}},{key:"scheduleHighlightedNodesRender",value:function(){var r=this;this.renderHighlightedNodesFrame||this.renderFrame||(this.renderHighlightedNodesFrame=requestAnimationFrame(function(){r.renderHighlightedNodesFrame=null,r.renderHighlightedNodes(),r.renderEdgeLabels()}))}},{key:"render",value:function(){var r=this;this.emit("beforeRender");var i=function(){return r.emit("afterRender"),r};if(this.renderFrame&&(cancelAnimationFrame(this.renderFrame),this.renderFrame=null),this.resize(),this.needToProcess&&this.process(),this.needToProcess=!1,this.clear(),this.pickingLayers.forEach(function(C){return r.resetWebGLTexture(C)}),!this.graph.order)return i();var o=this.mouseCaptor,s=this.camera.isAnimated()||o.isMoving||o.draggedEvents||o.currentWheelDirection,u=this.camera.getState(),c=this.getDimensions(),f=this.getGraphDimensions(),h=this.getStagePadding();this.matrix=Sc(u,c,f,h),this.invMatrix=Sc(u,c,f,h,!0),this.correctionRatio=Tse(this.matrix,u,c),this.graphToViewportRatio=this.getGraphToViewportRatio();var m=this.getRenderParams();for(var _ in this.nodePrograms){var g=this.nodePrograms[_];g.render(m)}if(!this.settings.hideEdgesOnMove||!s)for(var b in this.edgePrograms){var E=this.edgePrograms[b];E.render(m)}return this.settings.hideLabelsOnMove&&s||(this.renderLabels(),this.renderEdgeLabels(),this.renderHighlightedNodes()),i()}},{key:"addNode",value:function(r){var i=Object.assign({},this.graph.getNodeAttributes(r));this.settings.nodeReducer&&(i=this.settings.nodeReducer(r,i));var o=Xse(this.settings,r,i);this.nodeDataCache[r]=o,this.nodesWithForcedLabels.delete(r),o.forceLabel&&!o.hidden&&this.nodesWithForcedLabels.add(r),this.highlightedNodes.delete(r),o.highlighted&&!o.hidden&&this.highlightedNodes.add(r),this.settings.zIndex&&(o.zIndex<this.nodeZExtent[0]&&(this.nodeZExtent[0]=o.zIndex),o.zIndex>this.nodeZExtent[1]&&(this.nodeZExtent[1]=o.zIndex))}},{key:"updateNode",value:function(r){this.addNode(r);var i=this.nodeDataCache[r];this.normalizationFunction.applyTo(i)}},{key:"removeNode",value:function(r){delete this.nodeDataCache[r],delete this.nodeProgramIndex[r],this.highlightedNodes.delete(r),this.hoveredNode===r&&(this.hoveredNode=null),this.nodesWithForcedLabels.delete(r)}},{key:"addEdge",value:function(r){var i=Object.assign({},this.graph.getEdgeAttributes(r));this.settings.edgeReducer&&(i=this.settings.edgeReducer(r,i));var o=Yse(this.settings,r,i);this.edgeDataCache[r]=o,this.edgesWithForcedLabels.delete(r),o.forceLabel&&!o.hidden&&this.edgesWithForcedLabels.add(r),this.settings.zIndex&&(o.zIndex<this.edgeZExtent[0]&&(this.edgeZExtent[0]=o.zIndex),o.zIndex>this.edgeZExtent[1]&&(this.edgeZExtent[1]=o.zIndex))}},{key:"updateEdge",value:function(r){this.addEdge(r)}},{key:"removeEdge",value:function(r){delete this.edgeDataCache[r],delete this.edgeProgramIndex[r],this.hoveredEdge===r&&(this.hoveredEdge=null),this.edgesWithForcedLabels.delete(r)}},{key:"clearNodeIndices",value:function(){this.labelGrid=new UC,this.nodeExtent={x:[0,1],y:[0,1]},this.nodeDataCache={},this.edgeProgramIndex={},this.nodesWithForcedLabels=new Set,this.nodeZExtent=[1/0,-1/0]}},{key:"clearEdgeIndices",value:function(){this.edgeDataCache={},this.edgeProgramIndex={},this.edgesWithForcedLabels=new Set,this.edgeZExtent=[1/0,-1/0]}},{key:"clearIndices",value:function(){this.clearEdgeIndices(),this.clearNodeIndices()}},{key:"clearNodeState",value:function(){this.displayedNodeLabels=new Set,this.highlightedNodes=new Set,this.hoveredNode=null}},{key:"clearEdgeState",value:function(){this.displayedEdgeLabels=new Set,this.highlightedNodes=new Set,this.hoveredEdge=null}},{key:"clearState",value:function(){this.clearEdgeState(),this.clearNodeState()}},{key:"addNodeToProgram",value:function(r,i,o){var s=this.nodeDataCache[r],u=this.nodePrograms[s.type];if(!u)throw new Error('Sigma: could not find a suitable program for node type "'.concat(s.type,'"!'));u.process(i,o,s),this.nodeProgramIndex[r]=o}},{key:"addEdgeToProgram",value:function(r,i,o){var s=this.edgeDataCache[r],u=this.edgePrograms[s.type];if(!u)throw new Error('Sigma: could not find a suitable program for edge type "'.concat(s.type,'"!'));var c=this.graph.extremities(r),f=this.nodeDataCache[c[0]],h=this.nodeDataCache[c[1]];u.process(i,o,f,h,s),this.edgeProgramIndex[r]=o}},{key:"getRenderParams",value:function(){return{matrix:this.matrix,invMatrix:this.invMatrix,width:this.width,height:this.height,pixelRatio:this.pixelRatio,zoomRatio:this.camera.ratio,cameraAngle:this.camera.angle,sizeRatio:1/this.scaleSize(),correctionRatio:this.correctionRatio,downSizingRatio:this.pickingDownSizingRatio,minEdgeThickness:this.settings.minEdgeThickness,antiAliasingFeather:this.settings.antiAliasingFeather}}},{key:"getStagePadding",value:function(){var r=this.settings,i=r.stagePadding,o=r.autoRescale;return o&&i||0}},{key:"createLayer",value:function(r,i){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.elements[r])throw new Error('Sigma: a layer named "'.concat(r,'" already exists'));var s=Rse(i,{position:"absolute"},{class:"sigma-".concat(r)});return o.style&&Object.assign(s.style,o.style),this.elements[r]=s,"beforeLayer"in o&&o.beforeLayer?this.elements[o.beforeLayer].before(s):"afterLayer"in o&&o.afterLayer?this.elements[o.afterLayer].after(s):this.container.appendChild(s),s}},{key:"createCanvas",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.createLayer(r,"canvas",i)}},{key:"createCanvasContext",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.createCanvas(r,i),s={preserveDrawingBuffer:!1,antialias:!1};return this.canvasContexts[r]=o.getContext("2d",s),this}},{key:"createWebGLContext",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=(i==null?void 0:i.canvas)||this.createCanvas(r,i);i.hidden&&o.remove();var s=Ue({preserveDrawingBuffer:!1,antialias:!1},i),u;u=o.getContext("webgl2",s),u||(u=o.getContext("webgl",s)),u||(u=o.getContext("experimental-webgl",s));var c=u;if(this.webGLContexts[r]=c,c.blendFunc(c.ONE,c.ONE_MINUS_SRC_ALPHA),i.picking){this.pickingLayers.add(r);var f=c.createFramebuffer();if(!f)throw new Error("Sigma: cannot create a new frame buffer for layer ".concat(r));this.frameBuffers[r]=f}return c}},{key:"killLayer",value:function(r){var i=this.elements[r];if(!i)throw new Error("Sigma: cannot kill layer ".concat(r,", which does not exist"));if(this.webGLContexts[r]){var o,s=this.webGLContexts[r];(o=s.getExtension("WEBGL_lose_context"))===null||o===void 0||o.loseContext(),delete this.webGLContexts[r]}else this.canvasContexts[r]&&delete this.canvasContexts[r];return i.remove(),delete this.elements[r],this}},{key:"getCamera",value:function(){return this.camera}},{key:"setCamera",value:function(r){this.unbindCameraHandlers(),this.camera=r,this.bindCameraHandlers()}},{key:"getContainer",value:function(){return this.container}},{key:"getGraph",value:function(){return this.graph}},{key:"setGraph",value:function(r){r!==this.graph&&(this.hoveredNode&&!r.hasNode(this.hoveredNode)&&(this.hoveredNode=null),this.hoveredEdge&&!r.hasEdge(this.hoveredEdge)&&(this.hoveredEdge=null),this.unbindGraphHandlers(),this.checkEdgesEventsFrame!==null&&(cancelAnimationFrame(this.checkEdgesEventsFrame),this.checkEdgesEventsFrame=null),this.graph=r,this.bindGraphHandlers(),this.refresh())}},{key:"getMouseCaptor",value:function(){return this.mouseCaptor}},{key:"getTouchCaptor",value:function(){return this.touchCaptor}},{key:"getDimensions",value:function(){return{width:this.width,height:this.height}}},{key:"getGraphDimensions",value:function(){var r=this.customBBox||this.nodeExtent;return{width:r.x[1]-r.x[0]||1,height:r.y[1]-r.y[0]||1}}},{key:"getNodeDisplayData",value:function(r){var i=this.nodeDataCache[r];return i?Object.assign({},i):void 0}},{key:"getEdgeDisplayData",value:function(r){var i=this.edgeDataCache[r];return i?Object.assign({},i):void 0}},{key:"getNodeDisplayedLabels",value:function(){return new Set(this.displayedNodeLabels)}},{key:"getEdgeDisplayedLabels",value:function(){return new Set(this.displayedEdgeLabels)}},{key:"getSettings",value:function(){return Ue({},this.settings)}},{key:"getSetting",value:function(r){return this.settings[r]}},{key:"setSetting",value:function(r,i){var o=Ue({},this.settings);return this.settings[r]=i,Uy(this.settings),this.handleSettingsUpdate(o),this.scheduleRefresh(),this}},{key:"updateSetting",value:function(r,i){return this.setSetting(r,i(this.settings[r])),this}},{key:"setSettings",value:function(r){var i=Ue({},this.settings);return this.settings=Ue(Ue({},this.settings),r),Uy(this.settings),this.handleSettingsUpdate(i),this.scheduleRefresh(),this}},{key:"resize",value:function(r){var i=this.width,o=this.height;if(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,this.pixelRatio=DC(),this.width===0)if(this.settings.allowInvalidContainer)this.width=1;else throw new Error("Sigma: Container has no width. You can set the allowInvalidContainer setting to true to stop seeing this error.");if(this.height===0)if(this.settings.allowInvalidContainer)this.height=1;else throw new Error("Sigma: Container has no height. You can set the allowInvalidContainer setting to true to stop seeing this error.");if(!r&&i===this.width&&o===this.height)return this;for(var s in this.elements){var u=this.elements[s];u.style.width=this.width+"px",u.style.height=this.height+"px"}for(var c in this.canvasContexts)this.elements[c].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[c].setAttribute("height",this.height*this.pixelRatio+"px"),this.pixelRatio!==1&&this.canvasContexts[c].scale(this.pixelRatio,this.pixelRatio);for(var f in this.webGLContexts){this.elements[f].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[f].setAttribute("height",this.height*this.pixelRatio+"px");var h=this.webGLContexts[f];if(h.viewport(0,0,this.width*this.pixelRatio,this.height*this.pixelRatio),this.pickingLayers.has(f)){var m=this.textures[f];m&&h.deleteTexture(m)}}return this.emit("resize"),this}},{key:"clear",value:function(){return this.emit("beforeClear"),this.webGLContexts.nodes.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.nodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.edges.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.edges.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.hoverNodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.canvasContexts.labels.clearRect(0,0,this.width,this.height),this.canvasContexts.hovers.clearRect(0,0,this.width,this.height),this.canvasContexts.edgeLabels.clearRect(0,0,this.width,this.height),this.emit("afterClear"),this}},{key:"refresh",value:function(r){var i=this,o=(r==null?void 0:r.skipIndexation)!==void 0?r==null?void 0:r.skipIndexation:!1,s=(r==null?void 0:r.schedule)!==void 0?r.schedule:!1,u=!r||!r.partialGraph;if(u)this.clearEdgeIndices(),this.clearNodeIndices(),this.graph.forEachNode(function(S){return i.addNode(S)}),this.graph.forEachEdge(function(S){return i.addEdge(S)});else{for(var c,f,h=((c=r.partialGraph)===null||c===void 0?void 0:c.nodes)||[],m=0,_=(h==null?void 0:h.length)||0;m<_;m++){var g=h[m];if(this.updateNode(g),o){var b=this.nodeProgramIndex[g];if(b===void 0)throw new Error('Sigma: node "'.concat(g,`" can't be repaint`));this.addNodeToProgram(g,this.nodeIndices[g],b)}}for(var E=(r==null||(f=r.partialGraph)===null||f===void 0?void 0:f.edges)||[],C=0,w=E.length;C<w;C++){var T=E[C];if(this.updateEdge(T),o){var k=this.edgeProgramIndex[T];if(k===void 0)throw new Error('Sigma: edge "'.concat(T,`" can't be repaint`));this.addEdgeToProgram(T,this.edgeIndices[T],k)}}}return(u||!o)&&(this.needToProcess=!0),s?this.scheduleRender():this.render(),this}},{key:"scheduleRender",value:function(){var r=this;return this.renderFrame||(this.renderFrame=requestAnimationFrame(function(){r.render()})),this}},{key:"scheduleRefresh",value:function(r){return this.refresh(Ue(Ue({},r),{},{schedule:!0}))}},{key:"getViewportZoomedState",value:function(r,i){var o=this.camera.getState(),s=o.ratio,u=o.angle,c=o.x,f=o.y,h=this.settings,m=h.minCameraRatio,_=h.maxCameraRatio;typeof _=="number"&&(i=Math.min(i,_)),typeof m=="number"&&(i=Math.max(i,m));var g=i/s,b={x:this.width/2,y:this.height/2},E=this.viewportToFramedGraph(r),C=this.viewportToFramedGraph(b);return{angle:u,x:(E.x-C.x)*(1-g)+c,y:(E.y-C.y)*(1-g)+f,ratio:i}}},{key:"viewRectangle",value:function(){var r=this.viewportToFramedGraph({x:0,y:0}),i=this.viewportToFramedGraph({x:this.width,y:0}),o=this.viewportToFramedGraph({x:0,y:this.height});return{x1:r.x,y1:r.y,x2:i.x,y2:i.y,height:i.y-o.y}}},{key:"framedGraphToViewport",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=!!i.cameraState||!!i.viewportDimensions||!!i.graphDimensions,s=i.matrix?i.matrix:o?Sc(i.cameraState||this.camera.getState(),i.viewportDimensions||this.getDimensions(),i.graphDimensions||this.getGraphDimensions(),i.padding||this.getStagePadding()):this.matrix,u=s1(s,r);return{x:(1+u.x)*this.width/2,y:(1-u.y)*this.height/2}}},{key:"viewportToFramedGraph",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=!!i.cameraState||!!i.viewportDimensions||!i.graphDimensions,s=i.matrix?i.matrix:o?Sc(i.cameraState||this.camera.getState(),i.viewportDimensions||this.getDimensions(),i.graphDimensions||this.getGraphDimensions(),i.padding||this.getStagePadding(),!0):this.invMatrix,u=s1(s,{x:r.x/this.width*2-1,y:1-r.y/this.height*2});return isNaN(u.x)&&(u.x=0),isNaN(u.y)&&(u.y=0),u}},{key:"viewportToGraph",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.normalizationFunction.inverse(this.viewportToFramedGraph(r,i))}},{key:"graphToViewport",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.framedGraphToViewport(this.normalizationFunction(r),i)}},{key:"getGraphToViewportRatio",value:function(){var r={x:0,y:0},i={x:1,y:1},o=Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2)),s=this.graphToViewport(r),u=this.graphToViewport(i),c=Math.sqrt(Math.pow(s.x-u.x,2)+Math.pow(s.y-u.y,2));return c/o}},{key:"getBBox",value:function(){return this.nodeExtent}},{key:"getCustomBBox",value:function(){return this.customBBox}},{key:"setCustomBBox",value:function(r){return this.customBBox=r,this.scheduleRender(),this}},{key:"kill",value:function(){this.emit("kill"),this.removeAllListeners(),this.unbindCameraHandlers(),window.removeEventListener("resize",this.activeListeners.handleResize),this.mouseCaptor.kill(),this.touchCaptor.kill(),this.unbindGraphHandlers(),this.clearIndices(),this.clearState(),this.nodeDataCache={},this.edgeDataCache={},this.highlightedNodes.clear(),this.renderFrame&&(cancelAnimationFrame(this.renderFrame),this.renderFrame=null),this.renderHighlightedNodesFrame&&(cancelAnimationFrame(this.renderHighlightedNodesFrame),this.renderHighlightedNodesFrame=null);for(var r=this.container;r.firstChild;)r.removeChild(r.firstChild);this.canvasContexts={},this.webGLContexts={},this.elements={};for(var i in this.nodePrograms)this.nodePrograms[i].kill();for(var o in this.nodeHoverPrograms)this.nodeHoverPrograms[o].kill();for(var s in this.edgePrograms)this.edgePrograms[s].kill();this.nodePrograms={},this.nodeHoverPrograms={},this.edgePrograms={};for(var u in this.elements)this.killLayer(u)}},{key:"scaleSize",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.camera.ratio;return r/this.settings.zoomToSizeRatioFunction(i)*(this.getSetting("itemSizesReference")==="positions"?i*this.graphToViewportRatio:1)}},{key:"getCanvases",value:function(){var r={};for(var i in this.elements)this.elements[i]instanceof HTMLCanvasElement&&(r[i]=this.elements[i]);return r}}]),t})(X0),rL=Wse,jc={},HC;function Kse(){if(HC)return jc;HC=1;function e(r){return typeof r!="number"||isNaN(r)?1:r}function t(r,i){var o={},s=function(f){return typeof f>"u"?i:f};typeof i=="function"&&(s=i);var u=function(f){return s(f[r])},c=function(){return s(void 0)};return typeof r=="string"?(o.fromAttributes=u,o.fromGraph=function(f,h){return u(f.getNodeAttributes(h))},o.fromEntry=function(f,h){return u(h)}):typeof r=="function"?(o.fromAttributes=function(){throw new Error("graphology-utils/getters/createNodeValueGetter: irrelevant usage.")},o.fromGraph=function(f,h){return s(r(h,f.getNodeAttributes(h)))},o.fromEntry=function(f,h){return s(r(f,h))}):(o.fromAttributes=c,o.fromGraph=c,o.fromEntry=c),o}function n(r,i){var o={},s=function(f){return typeof f>"u"?i:f};typeof i=="function"&&(s=i);var u=function(f){return s(f[r])},c=function(){return s(void 0)};return typeof r=="string"?(o.fromAttributes=u,o.fromGraph=function(f,h){return u(f.getEdgeAttributes(h))},o.fromEntry=function(f,h){return u(h)},o.fromPartialEntry=o.fromEntry,o.fromMinimalEntry=o.fromEntry):typeof r=="function"?(o.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},o.fromGraph=function(f,h){var m=f.extremities(h);return s(r(h,f.getEdgeAttributes(h),m[0],m[1],f.getNodeAttributes(m[0]),f.getNodeAttributes(m[1]),f.isUndirected(h)))},o.fromEntry=function(f,h,m,_,g,b,E){return s(r(f,h,m,_,g,b,E))},o.fromPartialEntry=function(f,h,m,_){return s(r(f,h,m,_))},o.fromMinimalEntry=function(f,h){return s(r(f,h))}):(o.fromAttributes=c,o.fromGraph=c,o.fromEntry=c,o.fromMinimalEntry=c),o}return jc.createNodeValueGetter=t,jc.createEdgeValueGetter=n,jc.createEdgeWeightGetter=function(r){return n(r,e)},jc}var Fy,VC;function Qse(){if(VC)return Fy;VC=1;var e=0,t=1,n=2,r=3,i=4,o=5,s=6,u=7,c=8,f=9,h=0,m=1,_=2,g=0,b=1,E=2,C=3,w=4,T=5,k=6,S=7,z=8,R=3,M=10,X=3,F=9,I=10;return Fy=function(G,q,$){var Z,A,N,H,Q,D,B,ee,O,ie,oe=q.length,me=$.length,we=G.adjustSizes,ne=G.barnesHutTheta*G.barnesHutTheta,de,le,ke,ge,Ae,Ce,Te,ue=[];for(N=0;N<oe;N+=M)q[N+i]=q[N+n],q[N+o]=q[N+r],q[N+n]=0,q[N+r]=0;if(G.outboundAttractionDistribution){for(de=0,N=0;N<oe;N+=M)de+=q[N+s];de/=oe/M}if(G.barnesHutOptimize){var it=1/0,wt=-1/0,kt=1/0,Tt=-1/0,pt,Gt,an;for(N=0;N<oe;N+=M)it=Math.min(it,q[N+e]),wt=Math.max(wt,q[N+e]),kt=Math.min(kt,q[N+t]),Tt=Math.max(Tt,q[N+t]);var ft=wt-it,Ft=Tt-kt;for(ft>Ft?(kt-=(ft-Ft)/2,Tt=kt+ft):(it-=(Ft-ft)/2,wt=it+Ft),ue[0+g]=-1,ue[0+b]=(it+wt)/2,ue[0+E]=(kt+Tt)/2,ue[0+C]=Math.max(wt-it,Tt-kt),ue[0+w]=-1,ue[0+T]=-1,ue[0+k]=0,ue[0+S]=0,ue[0+z]=0,Z=1,N=0;N<oe;N+=M)for(A=0,an=R;;)if(ue[A+T]>=0){q[N+e]<ue[A+b]?q[N+t]<ue[A+E]?pt=ue[A+T]:pt=ue[A+T]+F:q[N+t]<ue[A+E]?pt=ue[A+T]+F*2:pt=ue[A+T]+F*3,ue[A+S]=(ue[A+S]*ue[A+k]+q[N+e]*q[N+s])/(ue[A+k]+q[N+s]),ue[A+z]=(ue[A+z]*ue[A+k]+q[N+t]*q[N+s])/(ue[A+k]+q[N+s]),ue[A+k]+=q[N+s],A=pt;continue}else if(ue[A+g]<0){ue[A+g]=N;break}else{if(ue[A+T]=Z*F,ee=ue[A+C]/2,O=ue[A+T],ue[O+g]=-1,ue[O+b]=ue[A+b]-ee,ue[O+E]=ue[A+E]-ee,ue[O+C]=ee,ue[O+w]=O+F,ue[O+T]=-1,ue[O+k]=0,ue[O+S]=0,ue[O+z]=0,O+=F,ue[O+g]=-1,ue[O+b]=ue[A+b]-ee,ue[O+E]=ue[A+E]+ee,ue[O+C]=ee,ue[O+w]=O+F,ue[O+T]=-1,ue[O+k]=0,ue[O+S]=0,ue[O+z]=0,O+=F,ue[O+g]=-1,ue[O+b]=ue[A+b]+ee,ue[O+E]=ue[A+E]-ee,ue[O+C]=ee,ue[O+w]=O+F,ue[O+T]=-1,ue[O+k]=0,ue[O+S]=0,ue[O+z]=0,O+=F,ue[O+g]=-1,ue[O+b]=ue[A+b]+ee,ue[O+E]=ue[A+E]+ee,ue[O+C]=ee,ue[O+w]=ue[A+w],ue[O+T]=-1,ue[O+k]=0,ue[O+S]=0,ue[O+z]=0,Z+=4,q[ue[A+g]+e]<ue[A+b]?q[ue[A+g]+t]<ue[A+E]?pt=ue[A+T]:pt=ue[A+T]+F:q[ue[A+g]+t]<ue[A+E]?pt=ue[A+T]+F*2:pt=ue[A+T]+F*3,ue[A+k]=q[ue[A+g]+s],ue[A+S]=q[ue[A+g]+e],ue[A+z]=q[ue[A+g]+t],ue[pt+g]=ue[A+g],ue[A+g]=-1,q[N+e]<ue[A+b]?q[N+t]<ue[A+E]?Gt=ue[A+T]:Gt=ue[A+T]+F:q[N+t]<ue[A+E]?Gt=ue[A+T]+F*2:Gt=ue[A+T]+F*3,pt===Gt)if(an--){A=pt;continue}else{an=R;break}ue[Gt+g]=N;break}}if(G.barnesHutOptimize)for(le=G.scalingRatio,N=0;N<oe;N+=M)for(A=0;;)if(ue[A+T]>=0)if(Ce=Math.pow(q[N+e]-ue[A+S],2)+Math.pow(q[N+t]-ue[A+z],2),ie=ue[A+C],4*ie*ie/Ce<ne){if(ke=q[N+e]-ue[A+S],ge=q[N+t]-ue[A+z],we===!0?Ce>0?(Te=le*q[N+s]*ue[A+k]/Ce,q[N+n]+=ke*Te,q[N+r]+=ge*Te):Ce<0&&(Te=-le*q[N+s]*ue[A+k]/Math.sqrt(Ce),q[N+n]+=ke*Te,q[N+r]+=ge*Te):Ce>0&&(Te=le*q[N+s]*ue[A+k]/Ce,q[N+n]+=ke*Te,q[N+r]+=ge*Te),A=ue[A+w],A<0)break;continue}else{A=ue[A+T];continue}else{if(D=ue[A+g],D>=0&&D!==N&&(ke=q[N+e]-q[D+e],ge=q[N+t]-q[D+t],Ce=ke*ke+ge*ge,we===!0?Ce>0?(Te=le*q[N+s]*q[D+s]/Ce,q[N+n]+=ke*Te,q[N+r]+=ge*Te):Ce<0&&(Te=-le*q[N+s]*q[D+s]/Math.sqrt(Ce),q[N+n]+=ke*Te,q[N+r]+=ge*Te):Ce>0&&(Te=le*q[N+s]*q[D+s]/Ce,q[N+n]+=ke*Te,q[N+r]+=ge*Te)),A=ue[A+w],A<0)break;continue}else for(le=G.scalingRatio,H=0;H<oe;H+=M)for(Q=0;Q<H;Q+=M)ke=q[H+e]-q[Q+e],ge=q[H+t]-q[Q+t],we===!0?(Ce=Math.sqrt(ke*ke+ge*ge)-q[H+c]-q[Q+c],Ce>0?(Te=le*q[H+s]*q[Q+s]/Ce/Ce,q[H+n]+=ke*Te,q[H+r]+=ge*Te,q[Q+n]-=ke*Te,q[Q+r]-=ge*Te):Ce<0&&(Te=100*le*q[H+s]*q[Q+s],q[H+n]+=ke*Te,q[H+r]+=ge*Te,q[Q+n]-=ke*Te,q[Q+r]-=ge*Te)):(Ce=Math.sqrt(ke*ke+ge*ge),Ce>0&&(Te=le*q[H+s]*q[Q+s]/Ce/Ce,q[H+n]+=ke*Te,q[H+r]+=ge*Te,q[Q+n]-=ke*Te,q[Q+r]-=ge*Te));for(O=G.gravity/G.scalingRatio,le=G.scalingRatio,N=0;N<oe;N+=M)Te=0,ke=q[N+e],ge=q[N+t],Ce=Math.sqrt(Math.pow(ke,2)+Math.pow(ge,2)),G.strongGravityMode?Ce>0&&(Te=le*q[N+s]*O):Ce>0&&(Te=le*q[N+s]*O/Ce),q[N+n]-=ke*Te,q[N+r]-=ge*Te;for(le=1*(G.outboundAttractionDistribution?de:1),B=0;B<me;B+=X)H=$[B+h],Q=$[B+m],ee=$[B+_],Ae=Math.pow(ee,G.edgeWeightInfluence),ke=q[H+e]-q[Q+e],ge=q[H+t]-q[Q+t],we===!0?(Ce=Math.sqrt(ke*ke+ge*ge)-q[H+c]-q[Q+c],G.linLogMode?G.outboundAttractionDistribution?Ce>0&&(Te=-le*Ae*Math.log(1+Ce)/Ce/q[H+s]):Ce>0&&(Te=-le*Ae*Math.log(1+Ce)/Ce):G.outboundAttractionDistribution?Ce>0&&(Te=-le*Ae/q[H+s]):Ce>0&&(Te=-le*Ae)):(Ce=Math.sqrt(Math.pow(ke,2)+Math.pow(ge,2)),G.linLogMode?G.outboundAttractionDistribution?Ce>0&&(Te=-le*Ae*Math.log(1+Ce)/Ce/q[H+s]):Ce>0&&(Te=-le*Ae*Math.log(1+Ce)/Ce):G.outboundAttractionDistribution?(Ce=1,Te=-le*Ae/q[H+s]):(Ce=1,Te=-le*Ae)),Ce>0&&(q[H+n]+=ke*Te,q[H+r]+=ge*Te,q[Q+n]-=ke*Te,q[Q+r]-=ge*Te);var _e,Re,qe,He,nt,Kt;if(we===!0)for(N=0;N<oe;N+=M)q[N+f]!==1&&(_e=Math.sqrt(Math.pow(q[N+n],2)+Math.pow(q[N+r],2)),_e>I&&(q[N+n]=q[N+n]*I/_e,q[N+r]=q[N+r]*I/_e),Re=q[N+s]*Math.sqrt((q[N+i]-q[N+n])*(q[N+i]-q[N+n])+(q[N+o]-q[N+r])*(q[N+o]-q[N+r])),qe=Math.sqrt((q[N+i]+q[N+n])*(q[N+i]+q[N+n])+(q[N+o]+q[N+r])*(q[N+o]+q[N+r]))/2,He=.1*Math.log(1+qe)/(1+Math.sqrt(Re)),nt=q[N+e]+q[N+n]*(He/G.slowDown),q[N+e]=nt,Kt=q[N+t]+q[N+r]*(He/G.slowDown),q[N+t]=Kt);else for(N=0;N<oe;N+=M)q[N+f]!==1&&(Re=q[N+s]*Math.sqrt((q[N+i]-q[N+n])*(q[N+i]-q[N+n])+(q[N+o]-q[N+r])*(q[N+o]-q[N+r])),qe=Math.sqrt((q[N+i]+q[N+n])*(q[N+i]+q[N+n])+(q[N+o]+q[N+r])*(q[N+o]+q[N+r]))/2,He=q[N+u]*Math.log(1+qe)/(1+Math.sqrt(Re)),q[N+u]=Math.min(1,Math.sqrt(He*(Math.pow(q[N+n],2)+Math.pow(q[N+r],2))/(1+Math.sqrt(Re)))),nt=q[N+e]+q[N+n]*(He/G.slowDown),q[N+e]=nt,Kt=q[N+t]+q[N+r]*(He/G.slowDown),q[N+t]=Kt);return{}},Fy}var ha={},XC;function Zse(){if(XC)return ha;XC=1;var e=10,t=3;return ha.assign=function(n){n=n||{};var r=Array.prototype.slice.call(arguments).slice(1),i,o,s;for(i=0,s=r.length;i<s;i++)if(r[i])for(o in r[i])n[o]=r[i][o];return n},ha.validateSettings=function(n){return"linLogMode"in n&&typeof n.linLogMode!="boolean"?{message:"the `linLogMode` setting should be a boolean."}:"outboundAttractionDistribution"in n&&typeof n.outboundAttractionDistribution!="boolean"?{message:"the `outboundAttractionDistribution` setting should be a boolean."}:"adjustSizes"in n&&typeof n.adjustSizes!="boolean"?{message:"the `adjustSizes` setting should be a boolean."}:"edgeWeightInfluence"in n&&typeof n.edgeWeightInfluence!="number"?{message:"the `edgeWeightInfluence` setting should be a number."}:"scalingRatio"in n&&!(typeof n.scalingRatio=="number"&&n.scalingRatio>=0)?{message:"the `scalingRatio` setting should be a number >= 0."}:"strongGravityMode"in n&&typeof n.strongGravityMode!="boolean"?{message:"the `strongGravityMode` setting should be a boolean."}:"gravity"in n&&!(typeof n.gravity=="number"&&n.gravity>=0)?{message:"the `gravity` setting should be a number >= 0."}:"slowDown"in n&&!(typeof n.slowDown=="number"||n.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in n&&typeof n.barnesHutOptimize!="boolean"?{message:"the `barnesHutOptimize` setting should be a boolean."}:"barnesHutTheta"in n&&!(typeof n.barnesHutTheta=="number"&&n.barnesHutTheta>=0)?{message:"the `barnesHutTheta` setting should be a number >= 0."}:null},ha.graphToByteArrays=function(n,r){var i=n.order,o=n.size,s={},u,c=new Float32Array(i*e),f=new Float32Array(o*t);return u=0,n.forEachNode(function(h,m){s[h]=u,c[u]=m.x,c[u+1]=m.y,c[u+2]=0,c[u+3]=0,c[u+4]=0,c[u+5]=0,c[u+6]=1,c[u+7]=1,c[u+8]=m.size||1,c[u+9]=m.fixed?1:0,u+=e}),u=0,n.forEachEdge(function(h,m,_,g,b,E,C){var w=s[_],T=s[g],k=r(h,m,_,g,b,E,C);c[w+6]+=k,c[T+6]+=k,f[u]=w,f[u+1]=T,f[u+2]=k,u+=t}),{nodes:c,edges:f}},ha.assignLayoutChanges=function(n,r,i){var o=0;n.updateEachNodeAttributes(function(s,u){return u.x=r[o],u.y=r[o+1],o+=e,i?i(s,u):u})},ha.readGraphPositions=function(n,r){var i=0;n.forEachNode(function(o,s){r[i]=s.x,r[i+1]=s.y,i+=e})},ha.collectLayoutChanges=function(n,r,i){for(var o=n.nodes(),s={},u=0,c=0,f=r.length;u<f;u+=e){if(i){var h=Object.assign({},n.getNodeAttributes(o[c]));h.x=r[u],h.y=r[u+1],h=i(o[c],h),s[o[c]]={x:h.x,y:h.y}}else s[o[c]]={x:r[u],y:r[u+1]};c++}return s},ha.createWorker=function(r){var i=window.URL||window.webkitURL,o=r.toString(),s=i.createObjectURL(new Blob(["("+o+").call(this);"],{type:"text/javascript"})),u=new Worker(s);return i.revokeObjectURL(s),u},ha}var Hy,YC;function Jse(){return YC||(YC=1,Hy={linLogMode:!1,outboundAttractionDistribution:!1,adjustSizes:!1,edgeWeightInfluence:1,scalingRatio:1,strongGravityMode:!1,gravity:1,slowDown:1,barnesHutOptimize:!1,barnesHutTheta:.5}),Hy}var Vy,WC;function ele(){if(WC)return Vy;WC=1;var e=eL(),t=Kse().createEdgeWeightGetter,n=Qse(),r=Zse(),i=Jse();function o(c,f,h){if(!e(f))throw new Error("graphology-layout-forceatlas2: the given graph is not a valid graphology instance.");typeof h=="number"&&(h={iterations:h});var m=h.iterations;if(typeof m!="number")throw new Error("graphology-layout-forceatlas2: invalid number of iterations.");if(m<=0)throw new Error("graphology-layout-forceatlas2: you should provide a positive number of iterations.");var _=t("getEdgeWeight"in h?h.getEdgeWeight:"weight").fromEntry,g=typeof h.outputReducer=="function"?h.outputReducer:null,b=r.assign({},i,h.settings),E=r.validateSettings(b);if(E)throw new Error("graphology-layout-forceatlas2: "+E.message);var C=r.graphToByteArrays(f,_),w;for(w=0;w<m;w++)n(b,C.nodes,C.edges);if(c){r.assignLayoutChanges(f,C.nodes,g);return}return r.collectLayoutChanges(f,C.nodes)}function s(c){var f=typeof c=="number"?c:c.order;return{barnesHutOptimize:f>2e3,strongGravityMode:!0,gravity:.05,scalingRatio:10,slowDown:1+Math.log(f)}}var u=o.bind(null,!1);return u.assign=o.bind(null,!0),u.inferSettings=s,Vy=u,Vy}var tle=ele();const Dm=Ea(tle);function uu(e){return e.element_type||e.node_type||e.type||"other"}function nle(e){return{fill:Bk(e),border:Bk(e,"ink")}}function W0(e){const t=String(e.label||"").toLowerCase(),n=String(e.kind||"").toLowerCase();return n==="reused_contract_context"||t==="reuses contract"?"reuse":n==="concept-reference"||t==="conceptref"?"concept-reference":t.includes("derive")?"derive":t.includes("specif")?"specify":t.includes("defin")?"define":t.includes("verif")?"verify":t.includes("satisf")?"satisfy":(t.includes("trace"),"trace")}function rle(e){const t=String(e.label||"");return String(e.kind||"").toLowerCase()==="reused_contract_context"||t.toLowerCase()==="reuses contract"?"reused context":t}function ile(e,t){return e==="reuse"||e==="concept-reference"?t.has("cross"):e==="verify"||e==="satisfy"?t.has("verification"):e==="trace"?t.has("trace"):!0}function ale(e,t){const n=e??"";return n.length>t?`${n.slice(0,Math.max(1,t-1))}...`:n}function ole(e){return["capability","requirement","ontology"].includes(uu(e))?26:34}function sle(e,t){const n=t.get(e.id)??0;return Math.min(16,4+Math.sqrt(n+1)*1.6)}function KC(e,t){const n=QC(e),r=QC(Ve("--bg-canvas"));if(!n||!r)return e;const i=Math.round(n.r*t+r.r*(1-t)),o=Math.round(n.g*t+r.g*(1-t)),s=Math.round(n.b*t+r.b*(1-t));return`#${[i,o,s].map(u=>u.toString(16).padStart(2,"0")).join("")}`}function QC(e){if(!e.startsWith("#"))return null;const t=e.slice(1),n=t.length===3?t.split("").map(s=>s+s).join(""):t.padEnd(6,"0").slice(0,6),r=Number.parseInt(n.slice(0,2),16),i=Number.parseInt(n.slice(2,4),16),o=Number.parseInt(n.slice(4,6),16);return[r,i,o].some(s=>Number.isNaN(s))?null:{r,g:i,b:o}}function lle(){return{labelColor:{color:Ve("--slate-950")},edgeLabelColor:{color:Ve("--text-muted")},labelWeight:"600",edgeLabelWeight:"600"}}function Xy(e){const t=typeof e.relCategory=="string"?e.relCategory:W0(e);return Ve(t==="concept-reference"?"--concept-reference":t==="reuse"?"--edge-reuse":t==="derive"?"--edge-derive":t==="satisfy"||t==="verify"?"--edge-satisfy":t==="trace"?"--edge-trace":"--edge-default")}function ule(e){return e!=null&&e.identifier?uu(e)!=="resource":!1}function cle(e){const t=(e==null?void 0:e.nodes)??[],n=Array.from(new Map(t.map(c=>[c.id,{...c,node_type:uu(c)}])).values()),r=new Map(n.map(c=>[c.id,c])),i=((e==null?void 0:e.edges)??[]).filter(c=>r.has(c.source)&&r.has(c.target)).map(c=>({...c,relCategory:W0(c)})),o=new Map,s=new Map,u=(c,f)=>{o.set(c,(o.get(c)??0)+1),s.set(c,[...s.get(c)??[],f])};return i.forEach(c=>{u(c.source,c),c.target!==c.source&&u(c.target,c)}),{nodes:n,nodeById:r,edges:i,degreeByNode:o,edgeAdjacency:s}}function fle(e){const t=new Map;e.forEach(r=>{const i=uu(r);t.set(i,[...t.get(i)??[],r])});const n={capability:[-8,-5],requirement:[-1,-2],contract:[3,2],verification:[8,5],ontology:[-5,-8],resource:[10,8],concept:[11,9],other:[0,0]};t.forEach((r,i)=>{const[o,s]=n[i]??n.other,u=Math.max(2.5,Math.sqrt(r.length)*.9);r.forEach((c,f)=>{const h=f/Math.max(r.length,1)*Math.PI*2,m=u*(.45+f%11/11);c.x=o+Math.cos(h)*m,c.y=s+Math.sin(h)*m})})}function dle({frameTestId:e="model-graph",embedded:t=!1,onOpenElement:n}){const{store:r}=$n(),{modelTypes:i,modelOverlays:o,knowledgeGraphSelectionId:s,setKnowledgeGraphSelectionId:u}=An(),{nodes:c,nodeById:f,edges:h,degreeByNode:m,edgeAdjacency:_}=K.useMemo(()=>cle(r.knowledge_graph),[r.knowledge_graph]),g=K.useRef(null),b=K.useRef(null),E=K.useRef(null),C=K.useRef(null),w=K.useRef(null),T=K.useRef(i),k=K.useRef(o),S=K.useRef(0),[z,R]=K.useState(()=>c.length>0?"Loading graph...":null),M=I=>T.current.has(uu(I)),X=I=>{const U=f.get(I.source),G=f.get(I.target);return!!(U&&G)&&!!(U&&M(U))&&!!(G&&M(G))&&ile(I.relCategory??W0(I),k.current)};K.useEffect(()=>{T.current=i,k.current=o,S.current+=1},[i,o]),K.useEffect(()=>{var I;C.current=s,(I=E.current)==null||I.refresh()},[s]),K.useEffect(()=>{const I=b.current,U=E.current;I&&(c.forEach(G=>{I.hasNode(G.id)&&I.setNodeAttribute(G.id,"hidden",!M(G))}),h.forEach((G,q)=>{const $=`e${q}`;I.hasEdge($)&&I.setEdgeAttribute($,"hidden",!X(G))}),U==null||U.refresh())},[i,o,h,c]),K.useEffect(()=>{const I=g.current;if(!I||c.length===0){R(c.length===0?"No project graph nodes were exported.":null);return}let U=null,G=null,q=!1,$=!1,Z=null,A=null,N=!1,H=!1;const Q=new Map,D=ie=>{I.style.cursor=ie,I.querySelectorAll("canvas").forEach(oe=>{oe.style.cursor=ie})},B=()=>{q=!0,Z!==null&&window.clearTimeout(Z),Z=window.setTimeout(()=>{q=!1,Z=null},0)};R("Loading graph...");let ee=null;const O=window.requestAnimationFrame(()=>{ee=window.setTimeout(()=>{try{const ie=c.map(ne=>({...ne}));fle(ie),U=new Ct({type:"directed",multi:!0,allowSelfLoops:!0}),ie.forEach(ne=>{const de=uu(ne),le=ne;U==null||U.addNode(ne.id,{...ne,type:"circle",reqvireType:de,label:ale(ne.label,ole(ne)),fullLabel:ne.label,x:le.x,y:le.y,size:sle(ne,m),color:nle(de).fill,hidden:!M(ne)})}),h.forEach((ne,de)=>{U==null||U.addDirectedEdgeWithKey(`e${de}`,ne.source,ne.target,{...ne,type:"arrow",label:rle(ne),size:ne.kind==="reused_contract_context"||ne.kind==="concept-reference"?.8:1.1,color:Xy(ne),hidden:!X(ne)})});try{const ne=Dm.inferSettings(U);Dm.assign(U,{iterations:U.order>650?120:U.order>350?150:180,settings:{...ne,adjustSizes:!0,barnesHutOptimize:!0,gravity:1.6,scalingRatio:18,slowDown:2}})}catch(ne){console.warn("[Reqvire KG] ForceAtlas2 layout failed",ne)}const oe=ne=>{const de=`${S.current}|${[...ne].sort().join("")}`,le=Q.get(de);if(le)return le;const ke=new Set;return ne.forEach(ge=>{ke.add(ge),(_.get(ge)??[]).forEach(Ae=>{X(Ae)&&(Ae.source===ge&&ke.add(Ae.target),Ae.target===ge&&ke.add(Ae.source))})}),Q.set(de,ke),ke},me=(ne,de,le)=>{const ke=String(ne.source??""),ge=String(ne.target??"");return le.has(ke)&&le.has(ge)&&de.some(Ae=>ke===Ae||ge===Ae)};G=new rL(U,I,{allowInvalidContainer:!0,defaultEdgeType:"arrow",renderEdgeLabels:!0,zIndex:!0,...lle(),labelDensity:.12,labelGridCellSize:80,labelRenderedSizeThreshold:9,nodeReducer:(ne,de)=>{const le={...de};if(de.hidden)return le.label="",le.highlighted=!1,le.forceLabel=!1,le;const ke=C.current,ge=w.current,Ae=A===ne,Ce=ke?oe([ke]):new Set,Te=!!(ke&&ge&&Ce.has(ge)),ue=ge?oe([ge]):new Set;if(ke){const Gt=Ce.has(ne),an=Te&&ue.has(ne);return Gt||an||Ae?(le.hidden=!1,Te&&Gt&&!an&&!Ae?(le.color=KC(String(de.color??Ve("--text-faint")),.2),le.label="",le.highlighted=!1,le.forceLabel=!1,le.zIndex=0,le):(le.label=de.fullLabel??de.label??"",le.highlighted=!0,le.forceLabel=!0,le.zIndex=Ae||ne===ke||ne===ge?20:10,le)):(le.hidden=!0,le.label="",le.highlighted=!1,le.forceLabel=!1,le.zIndex=0,le)}const it=[A].filter(Gt=>!!Gt),wt=[...ge?[ge]:[],...it],kt=wt.length>0,pt=oe(wt).has(ne);return kt?pt||Ae?(le.label=de.fullLabel??de.label??"",le.highlighted=!0,le.forceLabel=!0,le.zIndex=Ae?20:10):(le.color=KC(String(de.color??Ve("--text-faint")),.2),le.label="",le.highlighted=!1,le.forceLabel=!1,le.zIndex=0):(le.label="",le.highlighted=!1,le.forceLabel=!1),le},edgeReducer:(ne,de)=>{const le={...de},ke=C.current,ge=w.current;if(de.hidden)return le.hidden=!0,le;if(ke){const Ce=oe([ke]),Te=!!(ge&&Ce.has(ge)),ue=Te&&ge?[ge]:[ke],it=Te&&ge?oe([ge]):Ce;return me(de,ue,it)?(le.hidden=!1,le.color=Xy(de),le.size=Math.max(1.1,Number(de.size??1)*1.15),le.forceLabel=!0,le):(le.hidden=!0,le.label="",le)}const Ae=[ge,A].filter(Ce=>!!Ce);return Ae.length===0||!me(de,Ae,oe(Ae))?(le.hidden=!0,le.label=""):(le.hidden=!1,le.color=Xy(de),le.size=Math.max(1.1,Number(de.size??1)*1.15),le.forceLabel=!0),le}}),b.current=U,E.current=G,R(null),G.on("clickNode",ne=>{if($){$=!1,B();return}B(),u(ne.node)}),G.on("doubleClickNode",ne=>{const de=f.get(ne.node);ule(de)&&(n==null||n(de.identifier))}),G.on("clickStage",()=>{if(D(""),q){q=!1,Z!==null&&(window.clearTimeout(Z),Z=null);return}u(null)}),G.on("enterNode",ne=>{w.current=ne.node,Q.clear(),D("pointer"),G==null||G.refresh()}),G.on("leaveNode",ne=>{w.current===ne.node&&(w.current=null),Q.clear(),D(""),G==null||G.refresh()}),G.on("downNode",ne=>{!(U!=null&&U.hasNode(ne.node))||U.getNodeAttribute(ne.node,"hidden")||(D("grabbing"),N=!0,A=ne.node,H=!1,B(),G!=null&&G.getCustomBBox()||G==null||G.setCustomBBox(G.getBBox()),G==null||G.refresh())}),G.on("moveBody",({event:ne})=>{var ke,ge,Ae,Ce,Te;if(!N||!A||!(U!=null&&U.hasNode(A)))return;const de=G==null?void 0:G.viewportToGraph(ne);if(!de)return;U.mergeNodeAttributes(A,{x:de.x,y:de.y}),H=!0,G==null||G.refresh();const le=ne;(ke=le.preventSigmaDefault)==null||ke.call(le),(Ae=(ge=le.original)==null?void 0:ge.preventDefault)==null||Ae.call(ge),(Te=(Ce=le.original)==null?void 0:Ce.stopPropagation)==null||Te.call(Ce)});const we=()=>{!N&&!A||(H&&($=!0,B()),N=!1,A=null,H=!1,D(w.current?"pointer":""),G==null||G.refresh())};G.on("upNode",we),G.on("upStage",we),G.getCamera().animatedReset({duration:250})}catch(ie){console.error("[Reqvire KG] Sigma/Graphology renderer failed",ie),R("Graph renderer failed. Check the browser console for details.")}},0)});return()=>{var ie;window.cancelAnimationFrame(O),ee!==null&&(window.clearTimeout(ee),ee=null),(ie=g.current)==null||ie.querySelectorAll("canvas").forEach(oe=>{var we;const me=oe.getContext("webgl")??oe.getContext("webgl2");(we=me==null?void 0:me.getExtension("WEBGL_lose_context"))==null||we.loseContext()}),Z!==null&&(window.clearTimeout(Z),Z=null),D(""),G==null||G.kill(),b.current=null,E.current=null,U=null,G=null}},[m,_,h,f,c,n,u]);const F=y.jsx(T1,{embedded:t,children:y.jsxs(j1,{children:[y.jsx(bT,{ref:g,"data-testid":"kg-sigma-canvas",role:"img","aria-label":"Actual project elements and facts graph"}),z?y.jsxs(A1,{children:[z==="Loading graph..."?y.jsx(fT,{label:z}):null,y.jsx("span",{children:z})]}):null]})});return t?F:y.jsx(Oi,{testId:e,children:F})}function ZC({onOpenElement:e}){const{modelMode:t}=An();return t==="graph"?y.jsx(hle,{onOpenElement:e}):y.jsx(v4,{path:null,forcedLayout:t,onOpenElement:e})}function hle({onOpenElement:e}){const t=An();return y.jsx(Oi,{testId:"model",children:y.jsx(Ao,{children:y.jsx(Zy,{rootLabel:"Model",currentLabel:"Graph",controls:y.jsx(mle,{value:t.modelMode,onChange:t.setModelMode}),breadcrumbLabel:"Model graph breadcrumbs",onRootClick:()=>t.setModelMode("grid"),children:y.jsx(dle,{embedded:!0,frameTestId:"model",onOpenElement:e})})})})}function mle({value:e,onChange:t}){return y.jsx(pT,{ariaLabel:"Model layout",value:e,onChange:t,items:[{value:"list",label:"List",icon:y.jsx(et,{name:"list"})},{value:"grid",label:"Grid",icon:y.jsx(et,{name:"layout-grid"})},{value:"graph",label:"Graph",icon:y.jsx(et,{name:"git-branch"})}]})}function ple({onOpenElement:e}){const{store:t}=$n(),n=An(),{thesaurusSelectionId:r,setThesaurusSelectionId:i}=n,o=K.useMemo(()=>_le(t.thesaurus),[t.thesaurus]),s=r;return K.useEffect(()=>{var u;r&&o.some(c=>c.id===r)||i(((u=o[0])==null?void 0:u.id)??null)},[o,i,r]),y.jsx(wF,{concepts:o,selectedId:s,onSelectConcept:i,onOpenConcept:u=>e==null?void 0:e(u)})}function _le(e){if(!e)return[];const t=new Map(e.schemes.map(r=>[r.id,r])),n=new Map(e.concepts.map(r=>[r.id,r]));return e.concepts.map(r=>{const i=t.get(r.scheme_id);return{id:r.id,label:r.label,schemeId:r.scheme_id,schemeLabel:r.scheme_label||(i==null?void 0:i.label)||"Thesaurus",schemeSourceElementId:(i==null?void 0:i.element_id)||r.scheme_element_id||null,parentId:r.parent_id,depth:gle(r,n),definition:r.definition,altLabels:r.alt_labels,scopeNote:r.scope_note,relatedIds:r.related_ids,usedBy:r.used_by.map(JC),mapsTo:r.maps_to.map(JC),sourceElementId:r.element_id,sourceHref:r.source_href,sourceLabel:r.source_label}}).sort((r,i)=>r.depth-i.depth||r.label.localeCompare(i.label))}function JC(e){return{id:e.id,label:e.label,type:e.type}}function gle(e,t){var o;let n=0,r=e.parent_id;const i=new Set([e.id]);for(;r&&!i.has(r);)i.add(r),n+=1,r=((o=t.get(r))==null?void 0:o.parent_id)??null;return Math.min(n,2)}const Vc=[];let Rh=!1;function yle(e){let t=!1;const n=r=>{if(t){r();return}e(r)};return Vc.push(n),iL(),()=>{t=!0;const r=Vc.indexOf(n);r>=0&&Vc.splice(r,1)}}function iL(){if(Rh||Vc.length===0)return;const e=()=>{if(Rh)return;const t=Vc.shift();if(!t)return;Rh=!0;let n=!1;t(()=>{n||(n=!0,Rh=!1,iL())})};typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(e,{timeout:600}):globalThis.setTimeout(e,16)}function vle({onOpenElement:e}){const{store:t}=$n(),{traceFilePath:n,setTraceFilePath:r,traceSelectionId:i,setTraceSelectionId:o}=An(),s=K.useMemo(()=>new Map(t.elements.map(f=>[f.id,f])),[t.elements]),u=K.useMemo(()=>HR(t),[t]),c=K.useMemo(()=>u.find(f=>f.file===n)??u[0],[n,u]);return K.useEffect(()=>{if(u.length===0){n!==null&&r(null),i!==null&&o(null);return}(n?u.some(h=>h.file===n):!1)||(r(u[0].file),o(null))},[o,r,n,u,i]),y.jsx(Oi,{testId:"traces",children:y.jsx(MT,{children:y.jsx(gq,{children:y.jsxs(yq,{children:[y.jsx(ble,{file:c,elementById:s,onOpenElement:e,onSelect:o,selectedVerificationId:i}),u.length===0&&y.jsx(Aq,{children:"No verification traces in store."})]})})})})}function ble({file:e,elementById:t,onOpenElement:n,onSelect:r,selectedVerificationId:i}){const o=K.useRef(null);return K.useEffect(()=>{var u;if(!i)return;const s=(u=o.current)==null?void 0:u.querySelector(`#${eT(i)}`);s==null||s.scrollIntoView({block:"start",behavior:"smooth"})},[e==null?void 0:e.file,i]),e?y.jsx(oE,{ref:o,"data-testid":"trace-rows",children:y.jsxs(vq,{children:[y.jsx(bq,{file:e.file,countLabel:`${e.verifications.length} ${e.verifications.length===1?"verification":"verifications"}`}),y.jsx(xq,{children:e.verifications.map(s=>y.jsxs(wq,{id:eT(s.id),selected:i===s.id,children:[y.jsxs(kq,{children:[y.jsx(Eq,{onClick:()=>{r(s.id)},children:s.name}),y.jsxs(Sq,{children:[s.totalCount," in tree"]})]}),y.jsx(Cq,{rows:[{label:"Type",value:s.verificationType??"verification"},{label:"Directly Verified",value:`${s.directCount} requirements`},{label:"Total in Tree",value:`${s.totalCount} requirements`}]}),y.jsx(xle,{verification:s,elementById:t,onOpenElement:n})]},s.id))})]})}):y.jsx(oE,{"data-testid":"trace-rows"})}const xle=K.memo(function({verification:t,elementById:n,onOpenElement:r}){const i=K.useRef(null),o=K.useRef(null),s=K.useRef(null),[u,c]=K.useState(!1),[f,h]=K.useState(null),m=K.useCallback(()=>{u||f||o.current||s.current||(o.current=yle(b=>{o.current=null,s.current=b,h(Ele(t,n)),c(!0)}))},[n,f,u,t]),_=K.useCallback(()=>{var b;(b=s.current)==null||b.call(s),s.current=null},[]),g=K.useCallback(b=>{const E=b.target;if(!(E instanceof Element))return;const C=E.closest("[data-reqvire-element-id]"),w=(C==null?void 0:C.dataset.reqvireElementId)??wle(E);!w||!n.has(w)||(b.preventDefault(),b.stopPropagation(),r(w))},[n,r]);return K.useEffect(()=>()=>{var b,E;(b=o.current)==null||b.call(o),o.current=null,(E=s.current)==null||E.call(s),s.current=null},[]),K.useEffect(()=>{const b=i.current;if(!b||u)return;let E,C;if(!("IntersectionObserver"in window))return E=globalThis.setTimeout(m,0),()=>globalThis.clearTimeout(E);const w=new IntersectionObserver(T=>{T.some(k=>k.isIntersecting)&&(w.disconnect(),"requestIdleCallback"in window?C=window.requestIdleCallback(m,{timeout:250}):E=globalThis.setTimeout(m,0))},{rootMargin:"320px 0px"});return w.observe(b),()=>{w.disconnect(),C!==void 0&&"cancelIdleCallback"in window&&window.cancelIdleCallback(C),E!==void 0&&globalThis.clearTimeout(E)}},[u,m]),y.jsx(Tq,{ref:i,onClickCapture:g,children:u&&f?y.jsx(FR,{code:f.code,nodeClickTargets:f.nodeClickTargets,onNodeClick:r,onRenderSettled:_}):y.jsx(jq,{children:"Diagram queued. Rows remain interactive while rendering continues."})})});function wle(e){const t=e.closest("a[href]");return t?kle(t.getAttribute("href")??t.href):null}function kle(e){const t="#/content/";let n=e;if(!n.startsWith("#"))try{n=new URL(e,window.location.href).hash}catch{return null}if(!n.startsWith(t))return null;const r=n.slice(t.length);try{return decodeURIComponent(r)}catch{return r}}function Ele(e,t){const n=new Map;return{code:Sle(e,t,n),nodeClickTargets:n}}function Sle(e,t,n=new Map){var m;const r=new Map,i=new Set,o=[],s=_=>{r.set(_.id,_)},u=(_,g,b)=>{const E=`${_}\0${g}\0${b}`;i.has(E)||(i.add(E),o.push(` ${Il(_)} -->|${g}| ${Il(b)};`))};s({id:e.id,name:e.name,type:"verification"});const c=_=>{s({id:_.id,name:_.name,type:_.type}),_.is_directly_verified&&u(e.id,"verifies",_.id);for(const g of _.children??[])c(g),u(_.id,"derivedFrom",g.id)};if((m=e.traceTree)!=null&&m.requirements.length)for(const _ of e.traceTree.requirements)c(_);else for(const _ of e.requirementIds){const g=t.get(_);s({id:_,name:(g==null?void 0:g.name)??_,type:(g==null?void 0:g.element_type)??"requirement"}),u(e.id,"verifies",_)}const f=Cle([...r.values()]),h=["graph TD",...U6(),""];for(const[_,g]of f){const b=Il(`folder:${_}`);h.push(` subgraph ${b}["${Yy(_||"root")}"]`);for(const[E,C]of g){const w=Il(`file:${_}:${E}`);h.push(` subgraph ${w}["${Yy(E)}"]`);for(const T of C){const k=Il(T.id);n.set(k,T.id),h.push(` ${k}["${Yy(T.name)}"]:::${Tle(T.type)}`),h.push(` click ${k} "${Ale(T.id)}";`)}h.push(" end")}h.push(" end")}return h.push(...o),h.join(`
565
+ `)}function Cle(e){const t=new Map;for(const n of e){const r=n.id.split("#")[0]||n.id,i=r.lastIndexOf("/"),o=i>=0?r.slice(0,i):"",s=i>=0?r.slice(i+1):r,u=t.get(o)??new Map,c=u.get(s)??[];c.push(n),u.set(s,c),t.set(o,u)}return[...t.entries()].sort(([n],[r])=>n.localeCompare(r)).map(([n,r])=>[n,new Map([...r.entries()].sort(([i],[o])=>i.localeCompare(o)).map(([i,o])=>[i,o.sort((s,u)=>s.id.localeCompare(u.id))]))])}function Tle(e){return e.toLowerCase()==="system-requirement"?"systemRequirement":jle($m(e))}function jle(e){switch(e){case"input-output":return"inputOutput";case"semantic-contract":return"semanticContract";case"verification-objective":return"verificationObjective";default:return e==="other"?"default":e}}function Il(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return`n${(t>>>0).toString(16)}`}function eT(e){return`trace-verification-${Il(e).slice(1)}`}function Yy(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g," ")}function Ale(e){const[t,n]=e.split("#");return n?`#/content/${t}#${n}`:`#/content/${t}`}function Rle({onOpenElement:e}={}){var g;const{store:t,elementById:n}=$n(),r=t.coverage??{},i=r.summary??{},o=[...((g=r.capability_coverage)==null?void 0:g.capabilities)??[]].sort((b,E)=>(E.implementation_coverage_percentage??0)-(b.implementation_coverage_percentage??0)||b.name.localeCompare(E.name)),s=Ml(r.unverified_leaf_requirements),u=Ml(r.uncovered_requirements),c=Ml(r.unsatisfied_test_verifications),f=Ml(r.orphaned_verifications),h=Ml(r.covered_requirements),m=Ml(r.satisfied_test_verifications),_=Object.keys(i).length>0||o.length>0||s.length>0||u.length>0||c.length>0||f.length>0||h.length>0||m.length>0;return K.useEffect(()=>{function b(E){var T;const C=(T=E.detail)==null?void 0:T.section;if(!C)return;const w=document.getElementById(hs(C));w&&w.scrollIntoView({block:"start",behavior:"smooth"})}return window.addEventListener("reqvire:coverage-navigate",b),()=>window.removeEventListener("reqvire:coverage-navigate",b)},[]),y.jsx(Oi,{testId:"coverage",children:y.jsx(MT,{children:y.jsxs(Rq,{children:[y.jsx(Nq,{id:hs("overview"),eyebrow:"Coverage",title:"Verification Coverage"}),_?y.jsxs(y.Fragment,{children:[y.jsxs(zq,{children:[y.jsx(Nh,{label:"Leaf verification",value:i.leaf_requirements_coverage_percentage,detail:`${On(i.verified_leaf_requirements)} / ${On(i.total_leaf_requirements)} verified`,token:"--requirement"}),y.jsx(Nh,{label:"Implementation",value:i.implementation_coverage_percentage,detail:`${On(i.covered_requirements)} / ${On(i.total_requirements_in_scope)} covered`,token:"--resource"}),y.jsx(Nh,{label:"Test evidence",value:i.test_verifications_satisfaction_percentage,detail:`${On(i.satisfied_test_verifications)} / ${On(i.total_test_verifications)} satisfied`,token:"--verification"}),y.jsx(Nh,{label:"Orphaned verifications",value:i.orphaned_verifications_percentage,detail:`${On(i.orphaned_verifications)} / ${On(i.total_verifications)} orphaned`,token:"--contract",inverted:!0})]}),y.jsxs(Mq,{children:[y.jsx(zg,{title:"Verification types",children:y.jsx(Nle,{values:i.verification_types??{},rows:[["test","Test","test-verification"],["formal_proof","Formal proof","formal-proof-verification"],["analysis","Analysis","analysis-verification"],["inspection","Inspection","inspection-verification"],["demonstration","Demonstration","demonstration-verification"]]})}),y.jsx(zg,{title:"Coverage sources",children:y.jsx(Lle,{values:i.coverage_sources??{}})}),y.jsx(zg,{id:hs("capability-coverage"),title:"Capability coverage",span:"wide",children:y.jsx(zle,{capabilities:o,onOpenElement:e})})]}),y.jsxs(Dq,{children:[y.jsx(Lh,{id:hs("unverified-requirements"),title:"Unverified requirements",items:s,emptyLabel:"All leaf requirements have verification.",defaultType:"requirement",elementById:n,onOpenElement:e}),y.jsx(Lh,{id:hs("unimplemented-requirements"),title:"Unimplemented requirements",items:u,emptyLabel:"All requirements in scope have implementation evidence.",defaultType:"requirement",elementById:n,onOpenElement:e}),y.jsx(Lh,{id:hs("unsatisfied-verifications"),title:"Unsatisfied verifications",items:c,emptyLabel:"All test verifications have evidence.",defaultType:"test-verification",elementById:n,onOpenElement:e}),y.jsx(Lh,{id:hs("orphaned-verifications"),title:"Orphaned verifications",items:f,emptyLabel:"Every verification links to a requirement or capability.",defaultType:"test-verification",elementById:n,onOpenElement:e})]})]}):y.jsx(Lq,{title:"No coverage report in this Explorer seed",children:"Serve or open a Project Store generated by Reqvire to inspect requirement and verification coverage."})]})})})}function Nh({label:e,value:t,detail:n,token:r,inverted:i=!1}){const o=oL(t??0),s=typeof t=="number"?sL(t):"—",u=i?100-o:o;return y.jsx(Oq,{label:e,detail:n,shown:s,ringPercent:u,token:r})}function Nle({values:e,rows:t}){return y.jsx(Iq,{children:t.map(([n,r,i])=>y.jsx(Pq,{label:r,value:On(e[n]??0),type:i},n))})}function Lle({values:e}){const t=[["direct_satisfied","Direct evidence","--resource"],["contract_satisfied_via_reused_contract_context","Reused contract","--ontology"],["contract_satisfied_via_child","Child contract","--capability"]],n=Math.max(1,...t.map(([r])=>e[r]??0));return y.jsx($q,{children:t.map(([r,i,o])=>{const s=e[r]??0;return y.jsx(Bq,{label:i,value:On(s),children:y.jsx(aL,{value:s/n*100,token:o})},r)})})}function zle({capabilities:e,onOpenElement:t}){return e.length===0?y.jsx(DT,{children:"No capability coverage rows were reported."}):y.jsx(Uq,{children:e.map(n=>y.jsxs(Gq,{name:n.name||lL(n.identifier),mark:n.mark,onClick:()=>t==null?void 0:t(n.identifier),children:[y.jsx(tT,{label:"Verification",value:n.verification_coverage_percentage,count:`${On(n.aggregate_verified_leaf_requirements)} / ${On(n.aggregate_leaf_requirements)}`,token:"--requirement"}),y.jsx(tT,{label:"Implementation",value:n.implementation_coverage_percentage,count:`${On(n.aggregate_covered_requirements)} / ${On(n.aggregate_requirements)}`,token:"--resource"})]},n.identifier))})}function Lh({id:e,title:t,items:n,emptyLabel:r,defaultType:i,elementById:o,onOpenElement:s}){const[u,c]=K.useState(!1),f=8,h=u?n:n.slice(0,f),m=Math.max(0,n.length-h.length);return y.jsx(Hq,{id:e,title:t,count:On(n.length),children:n.length===0?y.jsx(DT,{children:r}):y.jsxs(Vq,{children:[h.map(_=>{const g=o(_.identifier),b=(g==null?void 0:g.element_type)??i,E=(g==null?void 0:g.type_family)??i;return y.jsx(Xq,{type:b,family:E,title:_.name||lL(_.identifier),file:_.file,typeLabel:Dle(b),onClick:()=>s==null?void 0:s(_.identifier)},`${_.file}:${_.identifier}`)}),n.length>f?y.jsx(Yq,{"aria-expanded":u,onClick:()=>c(_=>!_),children:u?"Show fewer":`+ ${On(m)} more`}):null]})})}function hs(e){return`coverage-section-${e}`}function tT({label:e,value:t,count:n,token:r}){return y.jsx(Wq,{label:e,value:`${sL(t)} · ${n}`,children:y.jsx(aL,{value:t??0,token:r})})}function aL({value:e,token:t}){return y.jsx(Kq,{value:oL(e),token:t})}function Ml(e){if(!Wy(e)||!Wy(e.files))return[];const t=[];for(const[n,r]of Object.entries(e.files))if(Array.isArray(r))for(const i of r)Wy(i)&&t.push({file:n,...i});return t.sort((n,r)=>{const i=String(n.name??""),o=String(r.name??"");return n.file.localeCompare(r.file)||i.localeCompare(o)})}function Wy(e){return typeof e=="object"&&e!==null}function oL(e){return Number.isFinite(e)?Math.max(0,Math.min(100,e)):0}function sL(e){return typeof e!="number"||!Number.isFinite(e)?"—":`${Mle(e)}%`}function Mle(e){return Number.isInteger(e)?e.toString():e.toFixed(1).replace(/\.0$/,"")}function On(e){return typeof e=="number"&&Number.isFinite(e)?e.toLocaleString():"0"}function lL(e){const t=e.split("#").pop();return t?t.replace(/-/g," "):e}function Dle(e){return e.replace(/-/g," ")}function Ole(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uL(e){var t=Ole(e,"string");return typeof t=="symbol"?t:t+""}function cL(e,t,n){return(t=uL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nT(Object(n),!0).forEach(function(r){cL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ile(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uL(r.key),r)}}function Ple(e,t,n){return t&&Ile(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Om(e){return Om=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Om(e)}function fL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fL=function(){return!!e})()}function dL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $le(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dL(e)}function Ble(e,t,n){return t=Om(t),$le(e,fL()?Reflect.construct(t,n||[],Om(e).constructor):t.apply(e,n))}function u1(e,t){return u1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},u1(e,t)}function Ule(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u1(e,t)}function c1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Gle(e){if(Array.isArray(e))return c1(e)}function Fle(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Hle(e,t){if(e){if(typeof e=="string")return c1(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c1(e,t):void 0}}function Vle(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
566
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ky(e){return Gle(e)||Fle(e)||Hle(e)||Vle()}function hL(e,t,n,r){var i=Math.pow(1-e,2)*t.x+2*(1-e)*e*n.x+Math.pow(e,2)*r.x,o=Math.pow(1-e,2)*t.y+2*(1-e)*e*n.y+Math.pow(e,2)*r.y;return{x:i,y:o}}function Xle(e,t,n){for(var r=20,i=0,o=e,s=0;s<r;s++){var u=hL((s+1)/r,e,t,n);i+=Math.sqrt(Math.pow(o.x-u.x,2)+Math.pow(o.y-u.y,2)),o=u}return i}function mL(e){var t=e.curvatureAttribute,n=e.defaultCurvature,r=e.keepLabelUpright,i=r===void 0?!0:r;return function(o,s,u,c,f){var h=f.edgeLabelSize,m=s[t]||n,_=f.edgeLabelFont,g=f.edgeLabelWeight,b=f.edgeLabelColor.attribute?s[f.edgeLabelColor.attribute]||f.edgeLabelColor.color||"#000":f.edgeLabelColor.color,E=s.label;if(E){o.fillStyle=b,o.font="".concat(g," ").concat(h,"px ").concat(_);var C=!i||u.x<c.x,w=C?u.x:c.x,T=C?u.y:c.y,k=C?c.x:u.x,S=C?c.y:u.y,z=(w+k)/2,R=(T+S)/2,M=k-w,X=S-T,F=Math.sqrt(Math.pow(M,2)+Math.pow(X,2)),I=C?1:-1,U=z+X*m*I,G=R-M*m*I,q=s.size*.7+5,$={x:G-T,y:-(U-w)},Z=Math.sqrt(Math.pow($.x,2)+Math.pow($.y,2)),A={x:S-G,y:-(k-U)},N=Math.sqrt(Math.pow(A.x,2)+Math.pow(A.y,2));w+=q*$.x/Z,T+=q*$.y/Z,k+=q*A.x/N,S+=q*A.y/N,U+=q*X/F,G-=q*M/F;var H={x:U,y:G},Q={x:w,y:T},D={x:k,y:S},B=Xle(Q,H,D);if(!(B<u.size+c.size)){var ee=o.measureText(E).width,O=B-u.size-c.size;if(ee>O){var ie="…";for(E=E+ie,ee=o.measureText(E).width;ee>O&&E.length>1;)E=E.slice(0,-2)+ie,ee=o.measureText(E).width;if(E.length<4)return}for(var oe={},me=0,we=E.length;me<we;me++){var ne=E[me];oe[ne]||(oe[ne]=o.measureText(ne).width*(1+m*.35))}for(var de=.5-ee/B/2,le=0,ke=E.length;le<ke;le++){var ge=E[le],Ae=hL(de,Q,H,D),Ce=2*(1-de)*(U-w)+2*de*(k-U),Te=2*(1-de)*(G-T)+2*de*(S-G),ue=Math.atan2(Te,Ce);o.save(),o.translate(Ae.x,Ae.y),o.rotate(ue),o.fillText(ge,0,0),o.restore(),de+=oe[ge]/B}}}}}function Yle(e){var t=e.arrowHead,n=(t==null?void 0:t.extremity)==="target"||(t==null?void 0:t.extremity)==="both",r=(t==null?void 0:t.extremity)==="source"||(t==null?void 0:t.extremity)==="both",i=`
567
+ precision highp float;
568
+
569
+ varying vec4 v_color;
570
+ varying float v_thickness;
571
+ varying float v_feather;
572
+ varying vec2 v_cpA;
573
+ varying vec2 v_cpB;
574
+ varying vec2 v_cpC;
575
+ `.concat(n?`
576
+ varying float v_targetSize;
577
+ varying vec2 v_targetPoint;`:"",`
578
+ `).concat(r?`
579
+ varying float v_sourceSize;
580
+ varying vec2 v_sourcePoint;`:"",`
581
+ `).concat(t?`
582
+ uniform float u_lengthToThicknessRatio;
583
+ uniform float u_widenessToThicknessRatio;`:"",`
584
+
585
+ float det(vec2 a, vec2 b) {
586
+ return a.x * b.y - b.x * a.y;
587
+ }
588
+
589
+ vec2 getDistanceVector(vec2 b0, vec2 b1, vec2 b2) {
590
+ float a = det(b0, b2), b = 2.0 * det(b1, b0), d = 2.0 * det(b2, b1);
591
+ float f = b * d - a * a;
592
+ vec2 d21 = b2 - b1, d10 = b1 - b0, d20 = b2 - b0;
593
+ vec2 gf = 2.0 * (b * d21 + d * d10 + a * d20);
594
+ gf = vec2(gf.y, -gf.x);
595
+ vec2 pp = -f * gf / dot(gf, gf);
596
+ vec2 d0p = b0 - pp;
597
+ float ap = det(d0p, d20), bp = 2.0 * det(d10, d0p);
598
+ float t = clamp((ap + bp) / (2.0 * a + b + d), 0.0, 1.0);
599
+ return mix(mix(b0, b1, t), mix(b1, b2, t), t);
600
+ }
601
+
602
+ float distToQuadraticBezierCurve(vec2 p, vec2 b0, vec2 b1, vec2 b2) {
603
+ return length(getDistanceVector(b0 - p, b1 - p, b2 - p));
604
+ }
605
+
606
+ const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);
607
+
608
+ void main(void) {
609
+ float dist = distToQuadraticBezierCurve(gl_FragCoord.xy, v_cpA, v_cpB, v_cpC);
610
+ float thickness = v_thickness;
611
+ `).concat(n?`
612
+ float distToTarget = length(gl_FragCoord.xy - v_targetPoint);
613
+ float targetArrowLength = v_targetSize + thickness * u_lengthToThicknessRatio;
614
+ if (distToTarget < targetArrowLength) {
615
+ thickness = (distToTarget - v_targetSize) / (targetArrowLength - v_targetSize) * u_widenessToThicknessRatio * thickness;
616
+ }`:"",`
617
+ `).concat(r?`
618
+ float distToSource = length(gl_FragCoord.xy - v_sourcePoint);
619
+ float sourceArrowLength = v_sourceSize + thickness * u_lengthToThicknessRatio;
620
+ if (distToSource < sourceArrowLength) {
621
+ thickness = (distToSource - v_sourceSize) / (sourceArrowLength - v_sourceSize) * u_widenessToThicknessRatio * thickness;
622
+ }`:"",`
623
+
624
+ float halfThickness = thickness / 2.0;
625
+ if (dist < halfThickness) {
626
+ #ifdef PICKING_MODE
627
+ gl_FragColor = v_color;
628
+ #else
629
+ float t = smoothstep(
630
+ halfThickness - v_feather,
631
+ halfThickness,
632
+ dist
633
+ );
634
+
635
+ gl_FragColor = mix(v_color, transparent, t);
636
+ #endif
637
+ } else {
638
+ gl_FragColor = transparent;
639
+ }
640
+ }
641
+ `);return i}function Wle(e){var t=e.arrowHead,n=(t==null?void 0:t.extremity)==="target"||(t==null?void 0:t.extremity)==="both",r=(t==null?void 0:t.extremity)==="source"||(t==null?void 0:t.extremity)==="both",i=`
642
+ attribute vec4 a_id;
643
+ attribute vec4 a_color;
644
+ attribute float a_direction;
645
+ attribute float a_thickness;
646
+ attribute vec2 a_source;
647
+ attribute vec2 a_target;
648
+ attribute float a_current;
649
+ attribute float a_curvature;
650
+ `.concat(n?`attribute float a_targetSize;
651
+ `:"",`
652
+ `).concat(r?`attribute float a_sourceSize;
653
+ `:"",`
654
+
655
+ uniform mat3 u_matrix;
656
+ uniform float u_sizeRatio;
657
+ uniform float u_pixelRatio;
658
+ uniform vec2 u_dimensions;
659
+ uniform float u_minEdgeThickness;
660
+ uniform float u_feather;
661
+
662
+ varying vec4 v_color;
663
+ varying float v_thickness;
664
+ varying float v_feather;
665
+ varying vec2 v_cpA;
666
+ varying vec2 v_cpB;
667
+ varying vec2 v_cpC;
668
+ `).concat(n?`
669
+ varying float v_targetSize;
670
+ varying vec2 v_targetPoint;`:"",`
671
+ `).concat(r?`
672
+ varying float v_sourceSize;
673
+ varying vec2 v_sourcePoint;`:"",`
674
+ `).concat(t?`
675
+ uniform float u_widenessToThicknessRatio;`:"",`
676
+
677
+ const float bias = 255.0 / 254.0;
678
+ const float epsilon = 0.7;
679
+
680
+ vec2 clipspaceToViewport(vec2 pos, vec2 dimensions) {
681
+ return vec2(
682
+ (pos.x + 1.0) * dimensions.x / 2.0,
683
+ (pos.y + 1.0) * dimensions.y / 2.0
684
+ );
685
+ }
686
+
687
+ vec2 viewportToClipspace(vec2 pos, vec2 dimensions) {
688
+ return vec2(
689
+ pos.x / dimensions.x * 2.0 - 1.0,
690
+ pos.y / dimensions.y * 2.0 - 1.0
691
+ );
692
+ }
693
+
694
+ void main() {
695
+ float minThickness = u_minEdgeThickness;
696
+
697
+ // Selecting the correct position
698
+ // Branchless "position = a_source if a_current == 1.0 else a_target"
699
+ vec2 position = a_source * max(0.0, a_current) + a_target * max(0.0, 1.0 - a_current);
700
+ position = (u_matrix * vec3(position, 1)).xy;
701
+
702
+ vec2 source = (u_matrix * vec3(a_source, 1)).xy;
703
+ vec2 target = (u_matrix * vec3(a_target, 1)).xy;
704
+
705
+ vec2 viewportPosition = clipspaceToViewport(position, u_dimensions);
706
+ vec2 viewportSource = clipspaceToViewport(source, u_dimensions);
707
+ vec2 viewportTarget = clipspaceToViewport(target, u_dimensions);
708
+
709
+ vec2 delta = viewportTarget.xy - viewportSource.xy;
710
+ float len = length(delta);
711
+ vec2 normal = vec2(-delta.y, delta.x) * a_direction;
712
+ vec2 unitNormal = normal / len;
713
+ float boundingBoxThickness = len * a_curvature;
714
+
715
+ float curveThickness = max(minThickness, a_thickness / u_sizeRatio);
716
+ v_thickness = curveThickness * u_pixelRatio;
717
+ v_feather = u_feather;
718
+
719
+ v_cpA = viewportSource;
720
+ v_cpB = 0.5 * (viewportSource + viewportTarget) + unitNormal * a_direction * boundingBoxThickness;
721
+ v_cpC = viewportTarget;
722
+
723
+ vec2 viewportOffsetPosition = (
724
+ viewportPosition +
725
+ unitNormal * (boundingBoxThickness / 2.0 + sign(boundingBoxThickness) * (`).concat(t?"curveThickness * u_widenessToThicknessRatio":"curveThickness",` + epsilon)) *
726
+ max(0.0, a_direction) // NOTE: cutting the bounding box in half to avoid overdraw
727
+ );
728
+
729
+ position = viewportToClipspace(viewportOffsetPosition, u_dimensions);
730
+ gl_Position = vec4(position, 0, 1);
731
+
732
+ `).concat(n?`
733
+ v_targetSize = a_targetSize * u_pixelRatio / u_sizeRatio;
734
+ v_targetPoint = viewportTarget;
735
+ `:"",`
736
+ `).concat(r?`
737
+ v_sourceSize = a_sourceSize * u_pixelRatio / u_sizeRatio;
738
+ v_sourcePoint = viewportSource;
739
+ `:"",`
740
+
741
+ #ifdef PICKING_MODE
742
+ // For picking mode, we use the ID as the color:
743
+ v_color = a_id;
744
+ #else
745
+ // For normal mode, we use the color:
746
+ v_color = a_color;
747
+ #endif
748
+
749
+ v_color.a *= bias;
750
+ }
751
+ `);return i}var pL=.25,Kle={arrowHead:null,curvatureAttribute:"curvature",defaultCurvature:pL},Qle={edgeIndexAttribute:"parallelIndex",edgeMinIndexAttribute:"parallelMinIndex",edgeMaxIndexAttribute:"parallelMaxIndex"};function Zle(e,t){var n=cu(cu({},Qle),{}),r={},i={},o={},s=0;e.forEachNode(function(R){r[R]=++s+""}),e.forEachEdge(function(R,M,X,F){var I=r[X],U=r[F],G=[I,U].join("-");i[R]=G,o[G]=[I,U].sort().join("-")});var u={},c={};e.forEachEdge(function(R){var M=i[R],X=o[M];u[M]=u[M]||[],u[M].push(R),c[X]=c[X]||[],c[X].push(R)});for(var f in u){var h=u[f],m=h.length,_=c[o[f]].length;if(m===1&&_===1){var g=h[0];e.setEdgeAttribute(g,n.edgeIndexAttribute,null),e.setEdgeAttribute(g,n.edgeMaxIndexAttribute,null)}else if(m===1){var b=h[0];e.setEdgeAttribute(b,n.edgeIndexAttribute,1),e.setEdgeAttribute(b,n.edgeMaxIndexAttribute,1)}else if(m===_)for(var E=(m-1)/2,C=-E,w=0;w<m;w++){var T=h[w],k=-(m-1)/2+w;e.setEdgeAttribute(T,n.edgeIndexAttribute,k),e.setEdgeAttribute(T,n.edgeMinIndexAttribute,C),e.setEdgeAttribute(T,n.edgeMaxIndexAttribute,E)}else for(var S=0;S<m;S++){var z=h[S];e.setEdgeAttribute(z,n.edgeIndexAttribute,S+1),e.setEdgeAttribute(z,n.edgeMaxIndexAttribute,m)}}}var _L=WebGLRenderingContext,rT=_L.UNSIGNED_BYTE,po=_L.FLOAT;function hf(e){var t=cu(cu({},Kle),e||{}),n=t,r=n.arrowHead,i=n.curvatureAttribute,o=n.drawLabel,s=(r==null?void 0:r.extremity)==="target"||(r==null?void 0:r.extremity)==="both",u=(r==null?void 0:r.extremity)==="source"||(r==null?void 0:r.extremity)==="both",c=["u_matrix","u_sizeRatio","u_dimensions","u_pixelRatio","u_feather","u_minEdgeThickness"].concat(Ky(r?["u_lengthToThicknessRatio","u_widenessToThicknessRatio"]:[]));return(function(f){Ule(h,f);function h(){var m;qle(this,h);for(var _=arguments.length,g=new Array(_),b=0;b<_;b++)g[b]=arguments[b];return m=Ble(this,h,[].concat(g)),cL(dL(m),"drawLabel",o||mL(t)),m}return Ple(h,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:Wle(t),FRAGMENT_SHADER_SOURCE:Yle(t),METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:c,ATTRIBUTES:[{name:"a_source",size:2,type:po},{name:"a_target",size:2,type:po}].concat(Ky(s?[{name:"a_targetSize",size:1,type:po}]:[]),Ky(u?[{name:"a_sourceSize",size:1,type:po}]:[]),[{name:"a_thickness",size:1,type:po},{name:"a_curvature",size:1,type:po},{name:"a_color",size:4,type:rT,normalized:!0},{name:"a_id",size:4,type:rT,normalized:!0}]),CONSTANT_ATTRIBUTES:[{name:"a_current",size:1,type:po},{name:"a_direction",size:1,type:po}],CONSTANT_DATA:[[0,1],[0,-1],[1,1],[0,-1],[1,1],[1,-1]]}}},{key:"processVisibleItem",value:function(_,g,b,E,C){var w,T=C.size||1,k=b.x,S=b.y,z=E.x,R=E.y,M=No(C.color),X=(w=C[i])!==null&&w!==void 0?w:pL,F=this.array;F[g++]=k,F[g++]=S,F[g++]=z,F[g++]=R,s&&(F[g++]=E.size),u&&(F[g++]=b.size),F[g++]=T,F[g++]=X,F[g++]=M,F[g++]=_}},{key:"setUniforms",value:function(_,g){var b=g.gl,E=g.uniformLocations,C=E.u_matrix,w=E.u_pixelRatio,T=E.u_feather,k=E.u_sizeRatio,S=E.u_dimensions,z=E.u_minEdgeThickness;if(b.uniformMatrix3fv(C,!1,_.matrix),b.uniform1f(w,_.pixelRatio),b.uniform1f(k,_.sizeRatio),b.uniform1f(T,_.antiAliasingFeather),b.uniform2f(S,_.width*_.pixelRatio,_.height*_.pixelRatio),b.uniform1f(z,_.minEdgeThickness),r){var R=E.u_lengthToThicknessRatio,M=E.u_widenessToThicknessRatio;b.uniform1f(R,r.lengthToThicknessRatio),b.uniform1f(M,r.widenessToThicknessRatio)}}}]),h})(Nf)}hf();hf({arrowHead:kp});hf({arrowHead:cu(cu({},kp),{},{extremity:"both"})});function f1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Jle(e){if(Array.isArray(e))return f1(e)}function eue(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tue(e,t){if(e){if(typeof e=="string")return f1(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f1(e,t):void 0}}function nue(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
752
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K0(e){return Jle(e)||eue(e)||tue(e)||nue()}function Q0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gL(e){var t=rue(e,"string");return typeof t=="symbol"?t:t+""}function iue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gL(r.key),r)}}function Z0(e,t,n){return t&&iue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function fu(e){return fu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fu(e)}function yL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yL=function(){return!!e})()}function ri(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aue(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ri(e)}function vL(e,t,n){return t=fu(t),aue(e,yL()?Reflect.construct(t,n||[],fu(e).constructor):t.apply(e,n))}function oue(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=fu(e))!==null;);return e}function d1(){return d1=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=oue(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},d1.apply(null,arguments)}function iT(e,t,n,r){var i=d1(fu(e.prototype),t,n);return typeof i=="function"?function(o){return i.apply(n,o)}:i}function h1(e,t){return h1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},h1(e,t)}function bL(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h1(e,t)}function qn(e,t,n){return(t=gL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sue(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function lue(e,t){if(e==null)return{};var n,r,i=sue(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function aT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _r(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aT(Object(n),!0).forEach(function(r){qn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uue(e){var t=e.texturesCount,n=`
753
+ precision highp float;
754
+
755
+ varying vec4 v_color;
756
+ varying vec2 v_diffVector;
757
+ varying float v_radius;
758
+ varying vec4 v_texture;
759
+ varying float v_textureIndex;
760
+
761
+ uniform sampler2D u_atlas[`.concat(t,`];
762
+ uniform float u_correctionRatio;
763
+ uniform float u_cameraAngle;
764
+ uniform float u_percentagePadding;
765
+ uniform bool u_colorizeImages;
766
+ uniform bool u_keepWithinCircle;
767
+
768
+ const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);
769
+
770
+ const float radius = 0.5;
771
+
772
+ void main(void) {
773
+ float border = 2.0 * u_correctionRatio;
774
+ float dist = length(v_diffVector);
775
+ vec4 color = gl_FragColor;
776
+
777
+ float c = cos(-u_cameraAngle);
778
+ float s = sin(-u_cameraAngle);
779
+ vec2 diffVector = mat2(c, s, -s, c) * (v_diffVector);
780
+
781
+ // No antialiasing for picking mode:
782
+ #ifdef PICKING_MODE
783
+ border = 0.0;
784
+ color = v_color;
785
+
786
+ #else
787
+ // First case: No image to display
788
+ if (v_texture.w <= 0.0) {
789
+ if (!u_colorizeImages) {
790
+ color = v_color;
791
+ }
792
+ }
793
+
794
+ // Second case: Image loaded into the texture
795
+ else {
796
+ float paddingRatio = 1.0 + 2.0 * u_percentagePadding;
797
+ float coef = u_keepWithinCircle ? 1.0 : `).concat(Math.SQRT2,`;
798
+ vec2 coordinateInTexture = diffVector * vec2(paddingRatio, -paddingRatio) / v_radius / 2.0 * coef + vec2(0.5, 0.5);
799
+ int index = int(v_textureIndex + 0.5); // +0.5 avoid rounding errors
800
+
801
+ bool noTextureFound = false;
802
+ vec4 texel;
803
+
804
+ `).concat(K0(new Array(t)).map(function(r,i){return"if (index == ".concat(i,") texel = texture2D(u_atlas[").concat(i,"], (v_texture.xy + coordinateInTexture * v_texture.zw), -1.0);")}).join(`
805
+ else `)+`else {
806
+ texel = texture2D(u_atlas[0], (v_texture.xy + coordinateInTexture * v_texture.zw), -1.0);
807
+ noTextureFound = true;
808
+ }`,`
809
+
810
+ if (noTextureFound) {
811
+ color = v_color;
812
+ } else {
813
+ // Colorize all visible image pixels:
814
+ if (u_colorizeImages) {
815
+ color = mix(gl_FragColor, v_color, texel.a);
816
+ }
817
+
818
+ // Colorize background pixels, keep image pixel colors:
819
+ else {
820
+ color = vec4(mix(v_color, texel, texel.a).rgb, max(texel.a, v_color.a));
821
+ }
822
+
823
+ // Erase pixels "in the padding":
824
+ if (abs(diffVector.x) > v_radius / paddingRatio || abs(diffVector.y) > v_radius / paddingRatio) {
825
+ color = u_colorizeImages ? gl_FragColor : v_color;
826
+ }
827
+ }
828
+ }
829
+ #endif
830
+
831
+ // Crop in a circle when u_keepWithinCircle is truthy:
832
+ if (u_keepWithinCircle) {
833
+ if (dist < v_radius - border) {
834
+ gl_FragColor = color;
835
+ } else if (dist < v_radius) {
836
+ gl_FragColor = mix(transparent, color, (v_radius - dist) / border);
837
+ }
838
+ }
839
+
840
+ // Crop in a square else:
841
+ else {
842
+ float squareHalfSize = v_radius * `).concat(Math.SQRT1_2*Math.cos(Math.PI/12),`;
843
+ if (abs(diffVector.x) > squareHalfSize || abs(diffVector.y) > squareHalfSize) {
844
+ gl_FragColor = transparent;
845
+ } else {
846
+ gl_FragColor = color;
847
+ }
848
+ }
849
+ }
850
+ `);return n}var cue=`
851
+ attribute vec4 a_id;
852
+ attribute vec4 a_color;
853
+ attribute vec2 a_position;
854
+ attribute float a_size;
855
+ attribute float a_angle;
856
+ attribute vec4 a_texture;
857
+ attribute float a_textureIndex;
858
+
859
+ uniform mat3 u_matrix;
860
+ uniform float u_sizeRatio;
861
+ uniform float u_correctionRatio;
862
+
863
+ varying vec4 v_color;
864
+ varying vec2 v_diffVector;
865
+ varying float v_radius;
866
+ varying vec4 v_texture;
867
+ varying float v_textureIndex;
868
+
869
+ const float bias = 255.0 / 254.0;
870
+ const float marginRatio = 1.05;
871
+
872
+ void main() {
873
+ float size = a_size * u_correctionRatio / u_sizeRatio * 4.0;
874
+ vec2 diffVector = size * vec2(cos(a_angle), sin(a_angle));
875
+ vec2 position = a_position + diffVector * marginRatio;
876
+ gl_Position = vec4(
877
+ (u_matrix * vec3(position, 1)).xy,
878
+ 0,
879
+ 1
880
+ );
881
+
882
+ v_diffVector = diffVector;
883
+ v_radius = size / 2.0 / marginRatio;
884
+
885
+ #ifdef PICKING_MODE
886
+ // For picking mode, we use the ID as the color:
887
+ v_color = a_id;
888
+ #else
889
+ // For normal mode, we use the color:
890
+ v_color = a_color;
891
+
892
+ // Pass the texture coordinates:
893
+ v_textureIndex = a_textureIndex;
894
+ v_texture = a_texture;
895
+ #endif
896
+
897
+ v_color.a *= bias;
898
+ }
899
+ `,fue=cue;function Ds(){Ds=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(A,N,H){A[N]=H.value},o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function f(A,N,H){return Object.defineProperty(A,N,{value:H,enumerable:!0,configurable:!0,writable:!0}),A[N]}try{f({},"")}catch{f=function(N,H,Q){return N[H]=Q}}function h(A,N,H,Q){var D=N&&N.prototype instanceof w?N:w,B=Object.create(D.prototype),ee=new $(Q||[]);return i(B,"_invoke",{value:I(A,H,ee)}),B}function m(A,N,H){try{return{type:"normal",arg:A.call(N,H)}}catch(Q){return{type:"throw",arg:Q}}}t.wrap=h;var _="suspendedStart",g="suspendedYield",b="executing",E="completed",C={};function w(){}function T(){}function k(){}var S={};f(S,s,function(){return this});var z=Object.getPrototypeOf,R=z&&z(z(Z([])));R&&R!==n&&r.call(R,s)&&(S=R);var M=k.prototype=w.prototype=Object.create(S);function X(A){["next","throw","return"].forEach(function(N){f(A,N,function(H){return this._invoke(N,H)})})}function F(A,N){function H(D,B,ee,O){var ie=m(A[D],A,B);if(ie.type!=="throw"){var oe=ie.arg,me=oe.value;return me&&typeof me=="object"&&r.call(me,"__await")?N.resolve(me.__await).then(function(we){H("next",we,ee,O)},function(we){H("throw",we,ee,O)}):N.resolve(me).then(function(we){oe.value=we,ee(oe)},function(we){return H("throw",we,ee,O)})}O(ie.arg)}var Q;i(this,"_invoke",{value:function(D,B){function ee(){return new N(function(O,ie){H(D,B,O,ie)})}return Q=Q?Q.then(ee,ee):ee()}})}function I(A,N,H){var Q=_;return function(D,B){if(Q===b)throw Error("Generator is already running");if(Q===E){if(D==="throw")throw B;return{value:e,done:!0}}for(H.method=D,H.arg=B;;){var ee=H.delegate;if(ee){var O=U(ee,H);if(O){if(O===C)continue;return O}}if(H.method==="next")H.sent=H._sent=H.arg;else if(H.method==="throw"){if(Q===_)throw Q=E,H.arg;H.dispatchException(H.arg)}else H.method==="return"&&H.abrupt("return",H.arg);Q=b;var ie=m(A,N,H);if(ie.type==="normal"){if(Q=H.done?E:g,ie.arg===C)continue;return{value:ie.arg,done:H.done}}ie.type==="throw"&&(Q=E,H.method="throw",H.arg=ie.arg)}}}function U(A,N){var H=N.method,Q=A.iterator[H];if(Q===e)return N.delegate=null,H==="throw"&&A.iterator.return&&(N.method="return",N.arg=e,U(A,N),N.method==="throw")||H!=="return"&&(N.method="throw",N.arg=new TypeError("The iterator does not provide a '"+H+"' method")),C;var D=m(Q,A.iterator,N.arg);if(D.type==="throw")return N.method="throw",N.arg=D.arg,N.delegate=null,C;var B=D.arg;return B?B.done?(N[A.resultName]=B.value,N.next=A.nextLoc,N.method!=="return"&&(N.method="next",N.arg=e),N.delegate=null,C):B:(N.method="throw",N.arg=new TypeError("iterator result is not an object"),N.delegate=null,C)}function G(A){var N={tryLoc:A[0]};1 in A&&(N.catchLoc=A[1]),2 in A&&(N.finallyLoc=A[2],N.afterLoc=A[3]),this.tryEntries.push(N)}function q(A){var N=A.completion||{};N.type="normal",delete N.arg,A.completion=N}function $(A){this.tryEntries=[{tryLoc:"root"}],A.forEach(G,this),this.reset(!0)}function Z(A){if(A||A===""){var N=A[s];if(N)return N.call(A);if(typeof A.next=="function")return A;if(!isNaN(A.length)){var H=-1,Q=function D(){for(;++H<A.length;)if(r.call(A,H))return D.value=A[H],D.done=!1,D;return D.value=e,D.done=!0,D};return Q.next=Q}}throw new TypeError(typeof A+" is not iterable")}return T.prototype=k,i(M,"constructor",{value:k,configurable:!0}),i(k,"constructor",{value:T,configurable:!0}),T.displayName=f(k,c,"GeneratorFunction"),t.isGeneratorFunction=function(A){var N=typeof A=="function"&&A.constructor;return!!N&&(N===T||(N.displayName||N.name)==="GeneratorFunction")},t.mark=function(A){return Object.setPrototypeOf?Object.setPrototypeOf(A,k):(A.__proto__=k,f(A,c,"GeneratorFunction")),A.prototype=Object.create(M),A},t.awrap=function(A){return{__await:A}},X(F.prototype),f(F.prototype,u,function(){return this}),t.AsyncIterator=F,t.async=function(A,N,H,Q,D){D===void 0&&(D=Promise);var B=new F(h(A,N,H,Q),D);return t.isGeneratorFunction(N)?B:B.next().then(function(ee){return ee.done?ee.value:B.next()})},X(M),f(M,c,"Generator"),f(M,s,function(){return this}),f(M,"toString",function(){return"[object Generator]"}),t.keys=function(A){var N=Object(A),H=[];for(var Q in N)H.push(Q);return H.reverse(),function D(){for(;H.length;){var B=H.pop();if(B in N)return D.value=B,D.done=!1,D}return D.done=!0,D}},t.values=Z,$.prototype={constructor:$,reset:function(A){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(q),!A)for(var N in this)N.charAt(0)==="t"&&r.call(this,N)&&!isNaN(+N.slice(1))&&(this[N]=e)},stop:function(){this.done=!0;var A=this.tryEntries[0].completion;if(A.type==="throw")throw A.arg;return this.rval},dispatchException:function(A){if(this.done)throw A;var N=this;function H(ie,oe){return B.type="throw",B.arg=A,N.next=ie,oe&&(N.method="next",N.arg=e),!!oe}for(var Q=this.tryEntries.length-1;Q>=0;--Q){var D=this.tryEntries[Q],B=D.completion;if(D.tryLoc==="root")return H("end");if(D.tryLoc<=this.prev){var ee=r.call(D,"catchLoc"),O=r.call(D,"finallyLoc");if(ee&&O){if(this.prev<D.catchLoc)return H(D.catchLoc,!0);if(this.prev<D.finallyLoc)return H(D.finallyLoc)}else if(ee){if(this.prev<D.catchLoc)return H(D.catchLoc,!0)}else{if(!O)throw Error("try statement without catch or finally");if(this.prev<D.finallyLoc)return H(D.finallyLoc)}}}},abrupt:function(A,N){for(var H=this.tryEntries.length-1;H>=0;--H){var Q=this.tryEntries[H];if(Q.tryLoc<=this.prev&&r.call(Q,"finallyLoc")&&this.prev<Q.finallyLoc){var D=Q;break}}D&&(A==="break"||A==="continue")&&D.tryLoc<=N&&N<=D.finallyLoc&&(D=null);var B=D?D.completion:{};return B.type=A,B.arg=N,D?(this.method="next",this.next=D.finallyLoc,C):this.complete(B)},complete:function(A,N){if(A.type==="throw")throw A.arg;return A.type==="break"||A.type==="continue"?this.next=A.arg:A.type==="return"?(this.rval=this.arg=A.arg,this.method="return",this.next="end"):A.type==="normal"&&N&&(this.next=N),C},finish:function(A){for(var N=this.tryEntries.length-1;N>=0;--N){var H=this.tryEntries[N];if(H.finallyLoc===A)return this.complete(H.completion,H.afterLoc),q(H),C}},catch:function(A){for(var N=this.tryEntries.length-1;N>=0;--N){var H=this.tryEntries[N];if(H.tryLoc===A){var Q=H.completion;if(Q.type==="throw"){var D=Q.arg;q(H)}return D}}throw Error("illegal catch attempt")},delegateYield:function(A,N,H){return this.delegate={iterator:Z(A),resultName:N,nextLoc:H},this.method==="next"&&(this.arg=e),C}},t}function oT(e,t,n,r,i,o,s){try{var u=e[o](s),c=u.value}catch(f){return void n(f)}u.done?t(c):Promise.resolve(c).then(r,i)}function J0(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(c){oT(o,r,i,s,u,"next",c)}function u(c){oT(o,r,i,s,u,"throw",c)}s(void 0)})}}var eb={size:{mode:"max",value:512},objectFit:"cover",correctCentering:!1,maxTextureSize:4096,debounceTimeout:500,crossOrigin:"anonymous"},due=1;function m1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.crossOrigin;return new Promise(function(r,i){var o=new Image;o.addEventListener("load",function(){r(o)},{once:!0}),o.addEventListener("error",function(s){i(s.error)},{once:!0}),n&&o.setAttribute("crossOrigin",n),o.src=e})}function hue(e){return p1.apply(this,arguments)}function p1(){return p1=J0(Ds().mark(function e(t){var n,r,i,o,s,u,c,f,h,m,_,g,b,E=arguments;return Ds().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(n=E.length>1&&E[1]!==void 0?E[1]:{},r=n.size,i=n.crossOrigin,i!=="use-credentials"){w.next=7;break}return w.next=4,fetch(t,{credentials:"include"});case 4:o=w.sent,w.next=10;break;case 7:return w.next=9,fetch(t);case 9:o=w.sent;case 10:return w.next=12,o.text();case 12:if(s=w.sent,u=new DOMParser().parseFromString(s,"image/svg+xml"),c=u.documentElement,f=c.getAttribute("width"),h=c.getAttribute("height"),!(!f||!h)){w.next=19;break}throw new Error("loadSVGImage: cannot use `size` if target SVG has no definite dimensions.");case 19:return typeof r=="number"&&(c.setAttribute("width",""+r),c.setAttribute("height",""+r)),m=new XMLSerializer().serializeToString(u),_=new Blob([m],{type:"image/svg+xml"}),g=URL.createObjectURL(_),b=m1(g),b.finally(function(){return URL.revokeObjectURL(g)}),w.abrupt("return",b);case 26:case"end":return w.stop()}},e)})),p1.apply(this,arguments)}function mue(e){return _1.apply(this,arguments)}function _1(){return _1=J0(Ds().mark(function e(t){var n,r,i,o,s,u,c=arguments;return Ds().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(r=c.length>1&&c[1]!==void 0?c[1]:{},i=r.size,o=r.crossOrigin,s=((n=t.split(/[#?]/)[0].split(".").pop())===null||n===void 0?void 0:n.trim().toLowerCase())==="svg",!(s&&i)){h.next=16;break}return h.prev=3,h.next=6,hue(t,{size:i,crossOrigin:o});case 6:u=h.sent,h.next=14;break;case 9:return h.prev=9,h.t0=h.catch(3),h.next=13,m1(t,{crossOrigin:o});case 13:u=h.sent;case 14:h.next=19;break;case 16:return h.next=18,m1(t,{crossOrigin:o});case 18:u=h.sent;case 19:return h.abrupt("return",u);case 20:case"end":return h.stop()}},e,null,[[3,9]])})),_1.apply(this,arguments)}function pue(e,t,n){var r=n.objectFit,i=n.size,o=n.correctCentering,s=r==="contain"?Math.max(e.width,e.height):Math.min(e.width,e.height),u=i.mode==="auto"?s:i.mode==="force"?i.value:Math.min(i.value,s),c=(e.width-s)/2,f=(e.height-s)/2;if(o){var h=t.getCorrectionOffset(e,s);c=h.x,f=h.y}return{sourceX:c,sourceY:f,sourceSize:s,destinationSize:u}}function _ue(e,t,n){for(var r=t.canvas,i=r.width,o=r.height,s=[],u=n.x,c=n.y,f=n.rowHeight,h=n.maxRowWidth,m={},_=0,g=e.length;_<g;_++){var b=e[_],E=b.key,C=b.image,w=b.sourceSize,T=b.sourceX,k=b.sourceY,S=b.destinationSize,z=S+due;c+z>o||u+z>i&&c+z+f>o||(u+z>i&&(h=Math.max(h,u),u=0,c+=f,f=z),s.push({key:E,image:C,sourceX:T,sourceY:k,sourceSize:w,destinationX:u,destinationY:c,destinationSize:S}),m[E]={x:u,y:c,size:S},u+=z,f=Math.max(f,z))}h=Math.max(h,u);for(var R=h,M=c+f,X=0,F=s.length;X<F;X++){var I=s[X],U=I.image,G=I.sourceSize,q=I.sourceX,$=I.sourceY,Z=I.destinationSize,A=I.destinationX,N=I.destinationY;t.drawImage(U,q,$,G,G,A,N,Z,Z)}return{atlas:m,texture:t.getImageData(0,0,R,M),cursor:{x:u,y:c,rowHeight:f,maxRowWidth:h}}}function gue(e,t,n){var r=e.atlas,i=e.textures,o=e.cursor,s={atlas:_r({},r),textures:K0(i.slice(0,-1)),cursor:_r({},o)},u=[];for(var c in t){var f,h=t[c];if(h.status==="ready"){var m=(f=r[c])===null||f===void 0?void 0:f.textureIndex;typeof m!="number"&&u.push(_r({key:c},h))}}for(var _=function(){var b=_ue(u,n,s.cursor),E=b.atlas,C=b.texture,w=b.cursor;s.cursor=w;var T=[];u.forEach(function(k){E[k.key]?s.atlas[k.key]=_r(_r({},E[k.key]),{},{textureIndex:s.textures.length}):T.push(k)}),s.textures.push(C),u=T,u.length&&(s.cursor={x:0,y:0,rowHeight:0,maxRowWidth:0},n.clearRect(0,0,n.canvas.width,n.canvas.height))};u.length;)_();return s}var yue=(function(){function e(){Q0(this,e),this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",{willReadFrequently:!0})}return Z0(e,[{key:"getCorrectionOffset",value:function(n,r){this.canvas.width=r,this.canvas.height=r,this.context.clearRect(0,0,r,r),this.context.drawImage(n,0,0,r,r);for(var i=this.context.getImageData(0,0,r,r).data,o=new Uint8ClampedArray(i.length/4),s=0;s<i.length;s++)o[s]=i[s*4+3];for(var u=0,c=0,f=0,h=0;h<r;h++)for(var m=0;m<r;m++){var _=o[h*r+m];f+=_,u+=_*m,c+=_*h}var g=u/f,b=c/f;return{x:g-r/2,y:b-r/2}}}]),e})(),Wh=(function(e){bL(t,e);function t(){var n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Q0(this,t),n=vL(this,t),qn(ri(n),"canvas",document.createElement("canvas")),qn(ri(n),"ctx",n.canvas.getContext("2d",{willReadFrequently:!0})),qn(ri(n),"corrector",new yue),qn(ri(n),"imageStates",{}),qn(ri(n),"textures",[n.ctx.getImageData(0,0,1,1)]),qn(ri(n),"lastTextureCursor",{x:0,y:0,rowHeight:0,maxRowWidth:0}),qn(ri(n),"atlas",{}),n.options=_r(_r({},eb),r),n.canvas.width=n.options.maxTextureSize,n.canvas.height=n.options.maxTextureSize,n}return Z0(t,[{key:"scheduleGenerateTexture",value:function(){var r=this;typeof this.frameId!="number"&&(typeof this.options.debounceTimeout=="number"?this.frameId=window.setTimeout(function(){r.generateTextures(),r.frameId=void 0},this.options.debounceTimeout):this.generateTextures())}},{key:"generateTextures",value:function(){var r=gue({atlas:this.atlas,textures:this.textures,cursor:this.lastTextureCursor},this.imageStates,this.ctx),i=r.atlas,o=r.textures,s=r.cursor;this.atlas=i,this.textures=o,this.lastTextureCursor=s,this.emit(t.NEW_TEXTURE_EVENT,{atlas:i,textures:o})}},{key:"registerImage",value:(function(){var n=J0(Ds().mark(function i(o){var s,u;return Ds().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(!this.imageStates[o]){f.next=2;break}return f.abrupt("return");case 2:return this.imageStates[o]={status:"loading"},f.prev=3,s=this.options.size,f.next=7,mue(o,{size:s.mode==="force"?s.value:void 0,crossOrigin:this.options.crossOrigin||void 0});case 7:u=f.sent,this.imageStates[o]=_r({status:"ready",image:u},pue(u,this.corrector,this.options)),this.scheduleGenerateTexture(),f.next=15;break;case 12:f.prev=12,f.t0=f.catch(3),this.imageStates[o]={status:"error"};case 15:case"end":return f.stop()}},i,this,[[3,12]])}));function r(i){return n.apply(this,arguments)}return r})()},{key:"getAtlas",value:function(){return this.atlas}},{key:"getTextures",value:function(){return this.textures}}]),t})(B0.EventEmitter);qn(Wh,"NEW_TEXTURE_EVENT","newTexture");var vue=["drawHover","drawLabel","drawingMode","keepWithinCircle","padding","colorAttribute","imageAttribute"],xL=WebGLRenderingContext,sT=xL.UNSIGNED_BYTE,Ac=xL.FLOAT,bue=_r(_r({},eb),{},{drawingMode:"background",keepWithinCircle:!0,drawLabel:void 0,drawHover:void 0,padding:0,colorAttribute:"color",imageAttribute:"image"}),xue=["u_sizeRatio","u_correctionRatio","u_cameraAngle","u_percentagePadding","u_matrix","u_colorizeImages","u_keepWithinCircle","u_atlas"];function tb(e){var t,n=document.createElement("canvas").getContext("webgl"),r=Math.min(n.getParameter(n.MAX_TEXTURE_SIZE),eb.maxTextureSize);n.canvas.remove();var i=_r(_r(_r({},bue),{maxTextureSize:r}),e||{}),o=i.drawHover,s=i.drawLabel,u=i.drawingMode,c=i.keepWithinCircle,f=i.padding,h=i.colorAttribute,m=i.imageAttribute,_=lue(i,vue),g=new Wh(_);return t=(function(b){bL(E,b);function E(C,w,T){var k;return Q0(this,E),k=vL(this,E,[C,w,T]),qn(ri(k),"drawLabel",s),qn(ri(k),"drawHover",o),qn(ri(k),"textureManagerCallback",null),k.textureManagerCallback=function(S){var z=S.atlas,R=S.textures,M=R.length!==k.textures.length;k.atlas=z,k.textureImages=R,M&&k.upgradeShaders(),k.bindTextures(),k.latestRenderParams&&k.render(k.latestRenderParams),k.renderer&&k.renderer.refresh&&k.renderer.refresh()},g.on(Wh.NEW_TEXTURE_EVENT,k.textureManagerCallback),k.atlas=g.getAtlas(),k.textureImages=g.getTextures(),k.textures=k.textureImages.map(function(){return C.createTexture()}),k.bindTextures(),k}return Z0(E,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:fue,FRAGMENT_SHADER_SOURCE:uue({texturesCount:g.getTextures().length}),METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:xue,ATTRIBUTES:[{name:"a_position",size:2,type:Ac},{name:"a_size",size:1,type:Ac},{name:"a_color",size:4,type:sT,normalized:!0},{name:"a_id",size:4,type:sT,normalized:!0},{name:"a_texture",size:4,type:Ac},{name:"a_textureIndex",size:1,type:Ac}],CONSTANT_ATTRIBUTES:[{name:"a_angle",size:1,type:Ac}],CONSTANT_DATA:[[E.ANGLE_1],[E.ANGLE_2],[E.ANGLE_3]]}}},{key:"upgradeShaders",value:function(){var w=this.getDefinition(),T=this.normalProgram,k=T.program,S=T.buffer,z=T.vertexShader,R=T.fragmentShader,M=T.gl;M.deleteProgram(k),M.deleteBuffer(S),M.deleteShader(z),M.deleteShader(R),this.normalProgram=this.getProgramInfo("normal",M,w.VERTEX_SHADER_SOURCE,w.FRAGMENT_SHADER_SOURCE,null)}},{key:"kill",value:function(){var w,T=(w=this.normalProgram)===null||w===void 0?void 0:w.gl;if(T)for(var k=0;k<this.textures.length;k++)T.deleteTexture(this.textures[k]);this.textureManagerCallback&&(g.off(Wh.NEW_TEXTURE_EVENT,this.textureManagerCallback),this.textureManagerCallback=null),iT(E,"kill",this)([])}},{key:"bindTextures",value:function(){for(var w=this.normalProgram.gl,T=0;T<this.textureImages.length;T++){if(T>=this.textures.length){var k=w.createTexture();k&&this.textures.push(k)}w.activeTexture(w.TEXTURE0+T),w.bindTexture(w.TEXTURE_2D,this.textures[T]),w.texImage2D(w.TEXTURE_2D,0,w.RGBA,w.RGBA,w.UNSIGNED_BYTE,this.textureImages[T]),w.generateMipmap(w.TEXTURE_2D)}}},{key:"renderProgram",value:function(w,T){if(!T.isPicking)for(var k=T.gl,S=0;S<this.textureImages.length;S++)k.activeTexture(k.TEXTURE0+S),k.bindTexture(k.TEXTURE_2D,this.textures[S]);iT(E,"renderProgram",this)([w,T])}},{key:"processVisibleItem",value:function(w,T,k){var S=this.array,z=No(k[h]),R=k[m],M=R?this.atlas[R]:void 0;if(typeof R=="string"&&!M&&g.registerImage(R),S[T++]=k.x,S[T++]=k.y,S[T++]=k.size,S[T++]=z,S[T++]=w,M&&typeof M.textureIndex=="number"){var X=this.textureImages[M.textureIndex],F=X.width,I=X.height;S[T++]=M.x/F,S[T++]=M.y/I,S[T++]=M.size/F,S[T++]=M.size/I,S[T++]=M.textureIndex}else S[T++]=0,S[T++]=0,S[T++]=0,S[T++]=0,S[T++]=0}},{key:"setUniforms",value:function(w,T){var k=T.gl,S=T.uniformLocations,z=S.u_sizeRatio,R=S.u_correctionRatio,M=S.u_matrix,X=S.u_atlas,F=S.u_colorizeImages,I=S.u_keepWithinCircle,U=S.u_cameraAngle,G=S.u_percentagePadding;this.latestRenderParams=w,k.uniform1f(R,w.correctionRatio),k.uniform1f(z,c?w.sizeRatio:w.sizeRatio/Math.SQRT2),k.uniform1f(U,w.cameraAngle),k.uniform1f(G,f),k.uniformMatrix3fv(M,!1,w.matrix),k.uniform1iv(X,K0(new Array(this.textureImages.length)).map(function(q,$){return $})),k.uniform1i(F,u==="color"?1:0),k.uniform1i(I,c?1:0)}}]),E})(H4),qn(t,"ANGLE_1",0),qn(t,"ANGLE_2",2*Math.PI/3),qn(t,"ANGLE_3",4*Math.PI/3),qn(t,"textureManager",g),t}tb();tb({keepWithinCircle:!1,size:{mode:"force",value:256},drawingMode:"color",correctCentering:!0});function wue(e,t,n={}){const r=n.onSelect;t={nodes:(t==null?void 0:t.nodes)??[],edges:(t==null?void 0:t.edges)??[]};const i={destroy(){},filter(){},focusNode(){},clearSelection(){},resetLayout(){},setFilter(){}};function o({drawLabel:j,marker:P="diamond"}={}){const{UNSIGNED_BYTE:Y,FLOAT:se}=WebGLRenderingContext,ye=P==="hollowTriangle"?2:1,Ee=P==="diamond"?1:0,$e=8,Ge=16,Ke=`
900
+ attribute vec4 a_id;
901
+ attribute vec4 a_color;
902
+ attribute float a_direction;
903
+ attribute float a_thickness;
904
+ attribute vec2 a_source;
905
+ attribute vec2 a_target;
906
+ attribute float a_current;
907
+ attribute float a_curvature;
908
+ attribute float a_sourceSize;
909
+ attribute float a_targetSize;
910
+
911
+ uniform mat3 u_matrix;
912
+ uniform float u_sizeRatio;
913
+ uniform float u_pixelRatio;
914
+ uniform vec2 u_dimensions;
915
+ uniform float u_minEdgeThickness;
916
+ uniform float u_feather;
917
+ uniform float u_widenessToThicknessRatio;
918
+
919
+ varying vec4 v_color;
920
+ varying float v_thickness;
921
+ varying float v_feather;
922
+ varying vec2 v_cpA;
923
+ varying vec2 v_cpB;
924
+ varying vec2 v_cpC;
925
+ varying vec2 v_sourcePoint;
926
+ varying vec2 v_targetPoint;
927
+ varying float v_sourceSize;
928
+ varying float v_targetSize;
929
+
930
+ const float bias = 255.0 / 254.0;
931
+ const float epsilon = 0.7;
932
+
933
+ vec2 clipspaceToViewport(vec2 pos, vec2 dimensions) {
934
+ return vec2((pos.x + 1.0) * dimensions.x / 2.0, (pos.y + 1.0) * dimensions.y / 2.0);
935
+ }
936
+
937
+ vec2 viewportToClipspace(vec2 pos, vec2 dimensions) {
938
+ return vec2(pos.x / dimensions.x * 2.0 - 1.0, pos.y / dimensions.y * 2.0 - 1.0);
939
+ }
940
+
941
+ void main() {
942
+ vec2 position = a_source * max(0.0, a_current) + a_target * max(0.0, 1.0 - a_current);
943
+ position = (u_matrix * vec3(position, 1)).xy;
944
+
945
+ vec2 source = (u_matrix * vec3(a_source, 1)).xy;
946
+ vec2 target = (u_matrix * vec3(a_target, 1)).xy;
947
+
948
+ vec2 viewportPosition = clipspaceToViewport(position, u_dimensions);
949
+ vec2 viewportSource = clipspaceToViewport(source, u_dimensions);
950
+ vec2 viewportTarget = clipspaceToViewport(target, u_dimensions);
951
+
952
+ vec2 delta = viewportTarget.xy - viewportSource.xy;
953
+ float len = max(1.0, length(delta));
954
+ vec2 normal = vec2(-delta.y, delta.x) * a_direction;
955
+ vec2 unitNormal = normal / len;
956
+ float boundingBoxThickness = len * a_curvature;
957
+
958
+ float curveThickness = max(u_minEdgeThickness, a_thickness);
959
+ v_thickness = curveThickness * u_pixelRatio;
960
+ v_feather = u_feather;
961
+
962
+ v_cpA = viewportSource;
963
+ v_cpB = 0.5 * (viewportSource + viewportTarget) + unitNormal * a_direction * boundingBoxThickness;
964
+ v_cpC = viewportTarget;
965
+ v_sourcePoint = viewportSource;
966
+ v_targetPoint = viewportTarget;
967
+ v_sourceSize = a_sourceSize * u_pixelRatio / u_sizeRatio;
968
+ v_targetSize = a_targetSize * u_pixelRatio / u_sizeRatio;
969
+
970
+ vec2 viewportOffsetPosition = (
971
+ viewportPosition +
972
+ unitNormal * (boundingBoxThickness / 2.0 + sign(boundingBoxThickness) * (curveThickness * u_widenessToThicknessRatio + 28.0 + epsilon)) *
973
+ max(0.0, a_direction)
974
+ );
975
+
976
+ position = viewportToClipspace(viewportOffsetPosition, u_dimensions);
977
+ gl_Position = vec4(position, 0, 1);
978
+
979
+ #ifdef PICKING_MODE
980
+ v_color = a_id;
981
+ #else
982
+ v_color = a_color;
983
+ #endif
984
+ v_color.a *= bias;
985
+ }
986
+ `,Me=`
987
+ precision highp float;
988
+
989
+ varying vec4 v_color;
990
+ varying float v_thickness;
991
+ varying float v_feather;
992
+ varying vec2 v_cpA;
993
+ varying vec2 v_cpB;
994
+ varying vec2 v_cpC;
995
+ varying vec2 v_sourcePoint;
996
+ varying vec2 v_targetPoint;
997
+ varying float v_sourceSize;
998
+ varying float v_targetSize;
999
+
1000
+ uniform float u_lengthToThicknessRatio;
1001
+ uniform float u_widenessToThicknessRatio;
1002
+ uniform float u_markerKind;
1003
+ uniform float u_targetArrowFill;
1004
+ uniform float u_dashLength;
1005
+ uniform float u_dashPeriod;
1006
+ uniform float u_pixelRatio;
1007
+
1008
+ const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);
1009
+
1010
+ float det(vec2 a, vec2 b) {
1011
+ return a.x * b.y - b.x * a.y;
1012
+ }
1013
+
1014
+ vec2 getDistanceVector(vec2 b0, vec2 b1, vec2 b2) {
1015
+ float a = det(b0, b2), b = 2.0 * det(b1, b0), d = 2.0 * det(b2, b1);
1016
+ float f = b * d - a * a;
1017
+ vec2 d21 = b2 - b1, d10 = b1 - b0, d20 = b2 - b0;
1018
+ vec2 gf = 2.0 * (b * d21 + d * d10 + a * d20);
1019
+ gf = vec2(gf.y, -gf.x);
1020
+ vec2 pp = -f * gf / dot(gf, gf);
1021
+ vec2 d0p = b0 - pp;
1022
+ float ap = det(d0p, d20), bp = 2.0 * det(d10, d0p);
1023
+ float t = clamp((ap + bp) / (2.0 * a + b + d), 0.0, 1.0);
1024
+ return mix(mix(b0, b1, t), mix(b1, b2, t), t);
1025
+ }
1026
+
1027
+ float distToQuadraticBezierCurve(vec2 p, vec2 b0, vec2 b1, vec2 b2) {
1028
+ return length(getDistanceVector(b0 - p, b1 - p, b2 - p));
1029
+ }
1030
+
1031
+ float distToSegment(vec2 p, vec2 a, vec2 b) {
1032
+ vec2 pa = p - a;
1033
+ vec2 ba = b - a;
1034
+ float h = clamp(dot(pa, ba) / max(dot(ba, ba), 1.0), 0.0, 1.0);
1035
+ return length(pa - ba * h);
1036
+ }
1037
+
1038
+ float approximateCurveT(vec2 p) {
1039
+ vec2 chord = v_cpC - v_cpA;
1040
+ float chordLength = max(1.0, dot(chord, chord));
1041
+ return clamp(dot(p - v_cpA, chord) / chordLength, 0.0, 1.0);
1042
+ }
1043
+
1044
+ void main(void) {
1045
+ vec2 p = gl_FragCoord.xy;
1046
+ vec2 sourceTangentSeed = mix(v_cpB - v_cpA, v_cpC - v_cpB, 0.08);
1047
+ if (length(sourceTangentSeed) < 0.5) sourceTangentSeed = v_cpC - v_cpA;
1048
+ vec2 sourceTangent = normalize(sourceTangentSeed);
1049
+ vec2 sourceNormal = vec2(-sourceTangent.y, sourceTangent.x);
1050
+ vec2 targetTangentSeed = mix(v_cpB - v_cpA, v_cpC - v_cpB, 0.92);
1051
+ if (length(targetTangentSeed) < 0.5) targetTangentSeed = v_cpC - v_cpA;
1052
+ vec2 targetTangent = normalize(targetTangentSeed);
1053
+ vec2 targetNormal = vec2(-targetTangent.y, targetTangent.x);
1054
+
1055
+ float diamondRadius = 7.5 * u_pixelRatio;
1056
+ float diamondStroke = max(1.15 * u_pixelRatio, v_thickness * 0.45);
1057
+ vec2 diamondCenter = v_sourcePoint + sourceTangent * (v_sourceSize + diamondRadius + 3.0 * u_pixelRatio);
1058
+ vec2 diamondRel = p - diamondCenter;
1059
+ float diamondSignedDistance = abs(dot(diamondRel, sourceTangent)) + abs(dot(diamondRel, sourceNormal)) - diamondRadius;
1060
+ bool diamondStrokeHit = u_markerKind < 1.5 && abs(diamondSignedDistance) <= diamondStroke;
1061
+
1062
+ float triangleLength = 11.0 * u_pixelRatio;
1063
+ float triangleWidth = 6.6 * u_pixelRatio;
1064
+ float triangleStroke = max(1.05 * u_pixelRatio, v_thickness * 0.4);
1065
+ vec2 triangleTip = v_targetPoint - targetTangent * (v_targetSize + 3.0 * u_pixelRatio);
1066
+ vec2 triangleBase = triangleTip - targetTangent * triangleLength;
1067
+ vec2 triangleLeft = triangleBase + targetNormal * triangleWidth;
1068
+ vec2 triangleRight = triangleBase - targetNormal * triangleWidth;
1069
+ float triangleDistance = min(
1070
+ distToSegment(p, triangleTip, triangleLeft),
1071
+ min(distToSegment(p, triangleTip, triangleRight), distToSegment(p, triangleLeft, triangleRight))
1072
+ );
1073
+ bool triangleStrokeHit = u_markerKind > 1.5 && triangleDistance <= triangleStroke;
1074
+
1075
+ float dist = distToQuadraticBezierCurve(p, v_cpA, v_cpB, v_cpC);
1076
+ float thickness = v_thickness;
1077
+ float distToTarget = length(p - v_targetPoint);
1078
+ float targetArrowLength = v_targetSize + thickness * u_lengthToThicknessRatio;
1079
+ if (u_targetArrowFill > 0.5 && distToTarget < targetArrowLength) {
1080
+ thickness = (distToTarget - v_targetSize) / (targetArrowLength - v_targetSize) * u_widenessToThicknessRatio * thickness;
1081
+ }
1082
+
1083
+ float t = approximateCurveT(p);
1084
+ float dashPosition = mod(t * length(v_cpC - v_cpA), u_dashPeriod);
1085
+ bool dashVisible = dashPosition < u_dashLength || (u_targetArrowFill > 0.5 && distToTarget < targetArrowLength);
1086
+ float halfThickness = thickness / 2.0;
1087
+
1088
+ if (diamondStrokeHit || triangleStrokeHit || (dashVisible && dist < halfThickness)) {
1089
+ #ifdef PICKING_MODE
1090
+ gl_FragColor = v_color;
1091
+ #else
1092
+ float edgeAlpha = 1.0 - smoothstep(max(halfThickness - v_feather, 0.0), halfThickness, dist);
1093
+ float diamondAlpha = 1.0 - smoothstep(max(diamondStroke - v_feather, 0.0), diamondStroke, abs(diamondSignedDistance));
1094
+ float triangleAlpha = 1.0 - smoothstep(max(triangleStroke - v_feather, 0.0), triangleStroke, triangleDistance);
1095
+ gl_FragColor = vec4(v_color.rgb, v_color.a * max(edgeAlpha, max(diamondAlpha, triangleAlpha)));
1096
+ #endif
1097
+ } else {
1098
+ gl_FragColor = transparent;
1099
+ }
1100
+ }
1101
+ `;return class extends Nf{constructor(){super(...arguments);be(this,"drawLabel",j)}getDefinition(){return{VERTICES:6,VERTEX_SHADER_SOURCE:Ke,FRAGMENT_SHADER_SOURCE:Me,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:["u_matrix","u_sizeRatio","u_dimensions","u_pixelRatio","u_feather","u_minEdgeThickness","u_lengthToThicknessRatio","u_widenessToThicknessRatio","u_markerKind","u_targetArrowFill","u_dashLength","u_dashPeriod"],ATTRIBUTES:[{name:"a_source",size:2,type:se},{name:"a_target",size:2,type:se},{name:"a_sourceSize",size:1,type:se},{name:"a_targetSize",size:1,type:se},{name:"a_thickness",size:1,type:se},{name:"a_curvature",size:1,type:se},{name:"a_color",size:4,type:Y,normalized:!0},{name:"a_id",size:4,type:Y,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_current",size:1,type:se},{name:"a_direction",size:1,type:se}],CONSTANT_DATA:[[0,1],[0,-1],[1,1],[0,-1],[1,1],[1,-1]]}}processVisibleItem(xt,mt,qt,xi,Ho){const Tu=No(Ho.color),wi=Number(Ho.curvature??.25),Ks=Number(Ho.size||1),Yn=this.array;Yn[mt++]=qt.x,Yn[mt++]=qt.y,Yn[mt++]=xi.x,Yn[mt++]=xi.y,Yn[mt++]=qt.size,Yn[mt++]=xi.size,Yn[mt++]=Ks,Yn[mt++]=wi,Yn[mt++]=Tu,Yn[mt++]=xt}setUniforms(xt,{gl:mt,uniformLocations:qt}){mt.uniformMatrix3fv(qt.u_matrix,!1,xt.matrix),mt.uniform1f(qt.u_pixelRatio,xt.pixelRatio),mt.uniform1f(qt.u_sizeRatio,xt.sizeRatio),mt.uniform1f(qt.u_feather,xt.antiAliasingFeather),mt.uniform2f(qt.u_dimensions,xt.width*xt.pixelRatio,xt.height*xt.pixelRatio),mt.uniform1f(qt.u_minEdgeThickness,xt.minEdgeThickness),mt.uniform1f(qt.u_lengthToThicknessRatio,3.2),mt.uniform1f(qt.u_widenessToThicknessRatio,2.1),mt.uniform1f(qt.u_markerKind,ye),mt.uniform1f(qt.u_targetArrowFill,Ee),mt.uniform1f(qt.u_dashLength,$e*xt.pixelRatio),mt.uniform1f(qt.u_dashPeriod,Ge*xt.pixelRatio)}}}function s(j={}){return o({...j,marker:"diamond"})}function u(j={}){return o({...j,marker:"hollowTriangle"})}if(!t||!t.nodes.length)return i;const c=Ve("--bg-sunken"),f=Ve("--text-strong"),h=Ve("--text-body"),m=Ve("--text-muted"),_=Ve("--slate-0"),g=Ve("--slate-950"),b=Ve("--edge-default"),E={class:{fill:Ve("--rdf-class"),stroke:f,text:f},"object-property":{fill:Ve("--rdf-objprop"),stroke:h,text:f},"datatype-property":{fill:Ve("--rdf-dtprop"),stroke:h,text:_},"rdf-property":{fill:Ve("--rdf-rdfprop"),stroke:h,text:_},"skos-concept":{fill:Ve("--rdf-concept"),stroke:Ve("--ontology-ink"),text:f},"named-individual":{fill:Ve("--rdf-individual"),stroke:Ve("--requirement-ink"),text:_},datatype:{fill:Ve("--rdf-datatype"),stroke:Ve("--ontology-ink"),text:f},restriction:{fill:Ve("--rdf-restriction"),stroke:f,text:f},"class-expression":{fill:Ve("--rdf-classexpr"),stroke:f,text:f},"node-shape":{fill:Ve("--rdf-nodeshape"),stroke:Ve("--rdf-propshape"),text:_},"property-shape":{fill:Ve("--rdf-propshape"),stroke:Ve("--rdf-nodeshape"),text:_},resource:{fill:c,stroke:Ve("--other-ink"),text:f}},C={concepts:{fill:Ve("--rdf-concept"),stroke:Ve("--ontology-ink"),text:f},"reqvire-context":{fill:Ve("--info"),stroke:Ve("--info-border"),text:_},"external-source":{fill:Ve("--other"),stroke:Ve("--other-ink"),text:f}},w={mutedNode:-10,base:0,focusedEdge:100,focusedNeighborNode:200,focusedNode:300},T=mL({curvatureAttribute:"curvature",defaultCurvature:.08,keepLabelUpright:!0});function k(j){return j.layer&&j.layer!=="authored"?C[j.layer]||E.resource:E[j.semantic_type]||E.resource}const S=new Map;t.edges.forEach(j=>{S.set(j.source,(S.get(j.source)||0)+1),S.set(j.target,(S.get(j.target)||0)+1)});const z=t.nodes.map(j=>{const P=Vt(j),Y=xr(j),se=String(P||"").length,ye=S.get(j.id)||0,Ee=Math.max(46,Math.min(92,46+Math.sqrt(ye)*9)),$e=Math.max(86,Math.min(238,se*6.5+26));return{...j,display_label:P,shape:Y,width:Y==="class-anchor"?Ee:$e,height:Y==="class-anchor"?Ee:34}}),R=new Map(z.map(j=>[j.id,j])),M=z.filter(hi),X=z.filter(j=>!hi(j)),F=Bi(t.edges,R,M),I=new Map(X.map(j=>[j.id,j])),U=Mo(X,F),G=new Map(X.map(j=>[j.id,new Set([j.id])])),q=new Map(X.map(j=>[j.id,[]]));F.forEach(j=>{const P=typeof j.source=="string"?j.source:j.source.id,Y=typeof j.target=="string"?j.target:j.target.id;G.has(P)&&G.get(P).add(Y),G.has(Y)&&G.get(Y).add(P),q.has(P)&&q.get(P).push(j),Y!==P&&q.has(Y)&&q.get(Y).push(j)});const $={role:new Set(["ontology-term","shacl-shape","resource","external-reference"]),origin:new Set(["authored","registry","construct"]),layer:new Set(["layer-authored","layer-concepts"]),construct:new Set(["domain-range","subclass","membership","disjoint","equivalence","inverse","property-chain","property-characteristic","class-expression","shape-overlay"])},Z=new Set(["class-membership","class-disjointness","class-expressions"]);z.forEach(j=>{j._ontologyRoles=Lf(j),j._ontologyConstructs=ku(j),j._ontologyOrigins=zf(j),j._ontologyLayers=wu(j)}),F.forEach(j=>{j._ontologyConstructs=Eu(j),j._ontologyLayers=Ep(j)});let A=new Set(X.map(j=>j.id)),N=null,H=null,Q=null,D=null,B=null,ee=!1,O=!1,ie=!1,oe=!1,me=null,we=0,ne="",de=new Set;function le(j){e.style.cursor=j,e.querySelectorAll("canvas").forEach(P=>{P.style.cursor=j})}ke();function ke(){e&&(Ce(),H=new Ct({type:"directed",multi:!0,allowSelfLoops:!0}),Te(X),X.forEach(j=>{const P=k(j),Y=Rn(j);H.addNode(j.id,{...j,type:Y?"constructGlyph":"circle",image:Y?He(j):void 0,mutedImage:Y?He(j,!0):void 0,label:br(j),fullLabel:Pi(j),x:j.x,y:j.y,size:wt(j),color:P.fill,borderColor:P.stroke,hidden:!Ys(j)})}),F.forEach((j,P)=>{const Y=Ot(j.source),se=Ot(j.target);!H.hasNode(Y)||!H.hasNode(se)||H.addDirectedEdgeWithKey(`o${P}`,Y,se,{...j,source:Y,target:se,type:an(j),label:Gi(j),size:Tt(j),color:pt(j),hidden:!Ia(j)})}),Re(),ue(),Q=new rL(H,e,{allowInvalidContainer:!0,defaultEdgeType:"curvedArrow",zIndex:!0,nodeProgramClasses:{constructGlyph:tb({objectFit:"contain",keepWithinCircle:!0,correctCentering:!0,padding:.08,drawingMode:"background",size:{mode:"force",value:256}})},edgeProgramClasses:{curvedArrow:hf({arrowHead:{extremity:"target",lengthToThicknessRatio:2.5,widenessToThicknessRatio:2},drawLabel:qe}),subclassTriangleArrow:u({drawLabel:qe}),restrictionConnectorArrow:hf({arrowHead:{extremity:"target",lengthToThicknessRatio:2.8,widenessToThicknessRatio:1.8},drawLabel:qe}),constructDiamondArrow:s({drawLabel:qe})},renderEdgeLabels:!0,labelColor:{color:g},labelWeight:"600",edgeLabelSize:12,edgeLabelWeight:"600",edgeLabelColor:{color:f},labelDensity:.14,labelGridCellSize:88,labelRenderedSizeThreshold:8,nodeReducer:(j,P)=>{const Y={...P},se=$a(),ye=Cu(),Ee=Ba(),$e=kn(),Ge=se.length>0,Ke=Ge&&Ee.some(qt=>ye.has(qt)),Me=Ge||Ee.length>0,Wt=Rn(P),dn=D===j,xt=B===j;if(Ge){const qt=ye.has(j),xi=Ke&&$e.has(j);if(!qt&&!xi&&!xt)return Y.hidden=!0,Y.label="",Y.forceLabel=!1,Y.highlighted=!1,Y.zIndex=w.base,Y;Y.hidden=!1,Y.focused=Ke?Ee.includes(j):se.includes(j),Y.inFocusNeighborhood=Ke?xi:qt}else Y.focused=Ee.includes(j),Y.inFocusNeighborhood=$e.has(j);const mt=Ge&&Ke?ye.has(j)&&!$e.has(j)&&!xt:Me&&!Y.inFocusNeighborhood&&!xt;return Y.highlighted=Me&&(Y.inFocusNeighborhood||xt||dn),Y.zIndex=Y.focused||xt?w.focusedNode:Y.inFocusNeighborhood?w.focusedNeighborNode:w.base,!Me&&!xt?(Y.label="",Y.forceLabel=!1):(Y.inFocusNeighborhood||xt||dn)&&(Y.label=Wt?P.label||Jt(P):P.fullLabel||P.label||"",Y.forceLabel=!0),mt&&(Y.color=$i(P.color||Ve("--other"),.2),Y.label="",Y.forceLabel=!1,Y.zIndex=w.mutedNode),Wt&&(Y.image=mt?P.mutedImage||He(P,!0):P.image||He(P),Y.color=mt?Y.color:P.color||k(P).fill,Me&&Y.inFocusNeighborhood&&!mt&&!Y.label&&(Y.label=P.label||Jt(P),Y.forceLabel=!0)),Y},edgeReducer:(j,P)=>{const Y={...P},se=$a(),ye=Cu(),Ee=Ba(),$e=kn(),Ge=se.length>0,Ke=Ge&&Ee.some(xt=>ye.has(xt)),Me=Ge||Ee.length>0,Wt=Ke?Ee:se,dn=Ke?$e:ye;return Y.hidden=!Ia(P)||!Me||(Ge?!Go(P,Wt,dn):!Go(P,Ee,$e)),Y.zIndex=Y.hidden?w.base:w.focusedEdge,Y.hidden?(Y.label="",Y.forceLabel=!1,Y):(Y.color=Gt(P),Y.size=Math.max(.8,Number(P.size||Tt(P))),Y.label=Me?Gi(P):"",Y.forceLabel=Me,Y)}}),Q.on("clickNode",j=>{if(oe){oe=!1,Ae();return}Ae(),window.focusOntologyNode(j.node)}),Q.on("clickStage",()=>{if(le(""),ie){ie=!1,me&&(window.clearTimeout(me),me=null);return}window.clearOntologySelection()}),Q.on("enterNode",j=>{D=j.node,le("pointer"),Q.refresh()}),Q.on("leaveNode",j=>{D===j.node&&(D=null,Q.refresh()),le("")}),ge())}function ge(){if(!Q||!H)return;Q.on("downNode",P=>{A.has(P.node)&&(le("grabbing"),ee=!0,B=P.node,O=!1,Ae(),Q.getCustomBBox()||Q.setCustomBBox(Q.getBBox()),Wr())}),Q.on("moveBody",({event:P})=>{if(!ee||!B||!H.hasNode(B))return;const Y=Q.viewportToGraph(P);H.mergeNodeAttributes(B,{x:Y.x,y:Y.y}),O=!0,Wr(),P.preventSigmaDefault&&P.preventSigmaDefault(),P.original&&(P.original.preventDefault(),P.original.stopPropagation())});const j=()=>{!ee&&!B||(O&&(oe=!0,Ae()),ee=!1,B=null,O=!1,le(D?"pointer":""),Wr())};Q.on("upNode",j),Q.on("upStage",j)}function Ae(){ie=!0,me&&window.clearTimeout(me),me=window.setTimeout(()=>{ie=!1,me=null},0)}function Ce(){const j=Math.max(window.innerHeight-50,520);(!e.clientHeight||e.clientHeight<20)&&(e.style.height=`${j}px`)}function Te(j){const P=new Map;j.forEach(se=>{const ye=$s(se);P.has(ye)||P.set(ye,[]),P.get(ye).push(se)});const Y={shacl:[-7,-5],concept:[-1,0],value:[6,2],construct:[2,6]};for(const[se,ye]of P.entries()){const[Ee,$e]=Y[se]||Y.concept,Ge=Math.max(2.5,Math.sqrt(ye.length)*.85);ye.forEach((Ke,Me)=>{const Wt=Me/Math.max(ye.length,1)*Math.PI*2,dn=Ge*(.42+Me%13/13);Ke.x=Ee+Math.cos(Wt)*dn,Ke.y=$e+Math.sin(Wt)*dn})}}function ue(){try{const j=Dm.inferSettings(H);Dm.assign(H,{iterations:H.order>650?90:H.order>350?130:190,settings:{...j,adjustSizes:!0,barnesHutOptimize:!0,gravity:1.45,scalingRatio:16,slowDown:2}}),it()}catch{}}function it(){const j=new Map;H.forEachNode((P,Y)=>{const se=`${Math.round(Y.x*10)}:${Math.round(Y.y*10)}`,ye=j.get(se)||0;j.set(se,ye+1),ye>0&&H.mergeNodeAttributes(P,{x:Y.x+Math.cos(ye)*ye*.12,y:Y.y+Math.sin(ye)*ye*.12})})}function wt(j){const P=U.get(j.id)||0,Y=j.shape==="class-anchor"?8:6;return Math.max(5,Math.min(18,Y+Math.sqrt(P)*1.7))}function kt(j){return j.shape==="class-anchor"?120:160}function Tt(j){return j.rendered_kind==="property"?1.55:ft(j)||Yt(j,"subclass")?1.35:Yt(j,"disjoint")?1.2:1}function pt(j){return j.rendered_kind==="property"||ft(j)||Yt(j,"subclass")?f:Yt(j,"disjoint")?Ve("--rdf-nodeshape"):Yt(j,"inverse")?Ve("--rdf-individual"):b}function Gt(j){return ft(j)||j.rendered_kind==="property"||Yt(j,"subclass")?f:Yt(j,"disjoint")?Ve("--rdf-nodeshape"):m}function an(j){return Ft(j)?"constructDiamondArrow":Yt(j,"subclass")?"subclassTriangleArrow":Yt(j,"restriction")?"restrictionConnectorArrow":"curvedArrow"}function ft(j){return Ft(j)}function Ft(j){return Yt(j,"class-expression")}function _e(j){const P=Number(j.parallelIndex);if(!Number.isFinite(P))return .22;const Y=Math.max(1,Math.abs(Number(j.parallelMaxIndex)||0),Math.abs(Number(j.parallelMinIndex)||0)),se=P/Y;return Math.abs(se)<.01?.08:Math.max(-.48,Math.min(.48,se*.28))}function Re(){Zle(H),H.forEachEdge((j,P)=>{H.setEdgeAttribute(j,"curvature",_e(P))})}function qe(j,P,Y,se,ye){if(!P.label)return;const Ee=Aa(P);Ee&&T(j,{...P,label:Ee},Y,se,{...ye,edgeLabelColor:{color:Yt(P,"subclass")?m:h}})}function He(j,P=!1){const Y=Jt(j),se=yt(j,"restriction"),ye=P?m:f,Ee=P?"0.2":"1",Ge=`<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 256 256">
1102
+ ${se?Kt(Y,ye,Ee):nt(ja({label:Y}),ye,Ee)}
1103
+ </svg>`;return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(Ge)}`}function nt(j,P,Y){const se=Hr(j||"U");return`<text x="128" y="142" font-family="Arial, Helvetica, sans-serif" font-size="112" font-weight="800" text-anchor="middle" fill="${Hr(P)}" fill-opacity="${Hr(Y)}">${se}</text>`}function Kt(j,P,Y){const se=Hr(j||"R");return`<text x="128" y="142" font-family="Arial, Helvetica, sans-serif" font-size="112" font-weight="800" text-anchor="middle" fill="${Hr(P)}" fill-opacity="${Hr(Y)}">${se}</text>`}function Rn(j){return yt(j,"class-expression")||yt(j,"restriction")}function yt(j,P){return Ht(j).has(P)}function Ht(j){const P=new Set;if(!j)return P;const Y=String(j.semantic_type||"");return Y==="restriction"&&P.add("restriction"),Y==="class-expression"&&P.add("class-expression"),(j.constructs||[]).forEach(se=>{Yi(se).forEach(ye=>P.add(ye))}),P}function Jt(j){return yt(j,"restriction")?Fn(j):ar(j)}function vt(j){if(yt(j,"restriction"))return vu(j);const P=String(ar(j)||"").toLowerCase();return P.includes("intersection")?"Intersection":P.includes("complement")?"Complement":P.includes("union")?"Union":"Class expression"}function ar(j){const P=(j.constructs||[]).find(Y=>{const se=String(Y.kind||""),ye=String(Y.family||""),Ee=String(Y.label||Y.class_expression_kind||Y.classExpressionKind||"").toLowerCase();return se==="class-expression"||ye==="class-expression"||Ee==="union"||Ee==="intersection"||Ee==="complement"});return P?P.label||P.class_expression_kind||P.classExpressionKind||"":Vt(j)}function Fn(j){const P=(j.constructs||[]).find(se=>{const ye=String(se.kind||""),Ee=String(se.family||"");return ye==="restriction"||Ee==="restriction"}),Y=String(P&&(P.label||P.restriction_kind||P.restrictionKind)||Vt(j)||"").toLowerCase();return Y.includes("universal")?"∀":Y.includes("existential")?"∃":Y.includes("min")?"≥":Y.includes("max")?"≤":Y.includes("cardinality")?"=":"R"}function vu(j){const P=(j.constructs||[]).find(se=>{const ye=String(se.kind||""),Ee=String(se.family||"");return ye==="restriction"||Ee==="restriction"}),Y=String(P&&(P.label||P.restriction_kind||P.restrictionKind)||Vt(j)||"").toLowerCase();return Y.includes("universal")?"Universal restriction":Y.includes("existential")?"Existential restriction":Y.includes("min")?"Min cardinality":Y.includes("max")?"Max cardinality":Y.includes("cardinality")?"Cardinality restriction":"Restriction"}function ja(j){const P=String(Gi(j)||j.class_expression_kind||j.classExpressionKind||"").toLowerCase();return P.includes("intersection")?"∩":P.includes("complement")?"¬":P.includes("union")?"∪":"U"}function Aa(j){const P=Gi(j);return ft(j)||Yt(j,"shape-overlay")&&Ra(P)?"":Yt(j,"subclass")?"Subclass of":Yt(j,"membership")?"member":P}function Ra(j){return String(j||"").toLowerCase().includes("shape overlay")}function br(j){if(Rn(j))return Jt(j);const P=en(j.display_label||Vt(j),kt(j)),Y=wr(j);return Y?`${P} ${Y}`:P}function Pi(j){if(Rn(j))return vt(j);const P=j.display_label||Vt(j),Y=wr(j);return Y?`${P} ${Y}`:P}function $i(j,P){const Y=Lo(Is(j)),se=Lo(Ve("--bg-canvas"));if(!Y||!se)return j;const ye=Math.round(Y.r*P+se.r*(1-P)),Ee=Math.round(Y.g*P+se.g*(1-P)),$e=Math.round(Y.b*P+se.b*(1-P));return`#${[ye,Ee,$e].map(Ge=>Ge.toString(16).padStart(2,"0")).join("")}`}function Is(j){if(!j)return"";const P=String(j).trim();if(P.startsWith("var(")){const Y=P.match(/^var\((--[a-z0-9-]+)(?:,\s*([^)]+))?\)$/i);if(Y)return Ve(Y[1])}return P}function Lo(j){var Ge;const P=Is(j);if(!P)return null;if(P.startsWith("#"))return zo(P);const Y=P.match(/rgba?\(\s*([\d.]+)(?:,|\s+)\s*([\d.]+)(?:,|\s+)\s*([\d.]+)(?:\s*[,/]\s*([\d.]+%?))?/i);if(!Y)return null;const se=Number(Y[1]),ye=Number(Y[2]),Ee=Number(Y[3]),$e=(Ge=Y[4])!=null&&Ge.endsWith("%")?Number(Y[4].slice(0,-1))/100:Y[4]===void 0?1:Number(Y[4]);return!Number.isNaN($e)&&$e<=0||[se,ye,Ee].some(Ke=>Number.isNaN(Ke))?null:{r:se,g:ye,b:Ee}}function zo(j){const P=j.slice(1),Y=P.length===3?P.split("").map($e=>$e+$e).join(""):P.padEnd(6,"0").slice(0,6),se=parseInt(Y.slice(0,2),16),ye=parseInt(Y.slice(2,4),16),Ee=parseInt(Y.slice(4,6),16);return[se,ye,Ee].some($e=>Number.isNaN($e))?null:{r:se,g:ye,b:Ee}}function Bi(j,P,Y){const se=[],ye=new Set;return j.forEach(Ee=>{const $e=Ot(Ee.source),Ge=Ot(Ee.target);!$e||!Ge||hi(P.get($e))||hi(P.get(Ge))||Ps(se,ye,{...Ee,source:$e,target:Ge,rendered_kind:"construct"})}),Y.forEach(Ee=>{const $e=Ui(Ee.domain),Ge=Ui(Ee.range);$e.forEach(Ke=>{Ge.forEach(Me=>{Ke.iri!==Me.iri&&Ps(se,ye,{source:Ke.iri,target:Me.iri,label:Vt(Ee),rendered_kind:"property",property_node_id:Ee.id,property_kind:Ee.semantic_type||"rdf-property"})})})}),se}function Ps(j,P,Y){const se=Ot(Y.source),ye=Ot(Y.target);if(!se||!ye||!Na(se)||!Na(ye))return;const Ee=[se,ye,Y.label||"",Y.rendered_kind||"",Y.property_node_id||""].join("|");P.has(Ee)||(P.add(Ee),j.push(Y))}function Na(j){const P=R.get(j);return!!(P&&!hi(P))}function Ui(j){return(j||[]).filter(P=>P&&P.iri&&Na(P.iri))}function hi(j){const P=String(j&&j.semantic_type||"");return P==="object-property"||P==="datatype-property"||P==="rdf-property"}function Mo(j,P){const Y=new Map(j.map(se=>[se.id,0]));return P.forEach(se=>{if(!Do(se))return;const ye=Ot(se.source),Ee=Ot(se.target);Y.has(ye)&&Y.set(ye,Y.get(ye)+1),Y.has(Ee)&&Ee!==ye&&Y.set(Ee,Y.get(Ee)+1)}),Y}function Do(j){return j.property_kind!=="datatype-property"}function Gi(j){return j.display_label||j.label||""}function $s(j){const P=String(j.semantic_type||"");return P==="node-shape"||P==="property-shape"?"shacl":P.endsWith("property")?"property":P==="named-individual"||P==="datatype"||P==="resource"?"value":yt(j,"restriction")||yt(j,"class-expression")?"construct":"concept"}function xr(j){return String(j.semantic_type||"")==="class"||yt(j,"restriction")||yt(j,"class-expression")?"class-anchor":"box"}function en(j,P){const Y=String(j||""),se=Math.max(8,Math.floor((P-20)/7));return Y.length>se?`${Y.slice(0,se-1)}...`:Y}function De(j){return String(j||"").replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}function Fr(j,P){const Y=new DOMParser().parseFromString(`<body>${P}</body>`,"text/html");j.replaceChildren(...Array.from(Y.body.childNodes))}function La(j){const P=document.createElement("p");P.className="text-gray-500 italic m-0",P.textContent="Search or select a graph node to inspect URI, RDF type, comments, and SHACL constraints.",j.replaceChildren(P)}function Hr(j){return De(j)}function Fi(j){const P=String(j||""),Y=P.split(/[/#]/).filter(Boolean);return Y.length?Y[Y.length-1]:P}function Bs(j){const P=(j.constructs||[]).find(ye=>ye.kind==="class-expression"),Y=P?P.members||[]:[];if(!Y.length)return j.label||"Class expression";const se=P.label==="Intersection"?" ∩ ":P.label==="Complement"?" ∖ ":" ∪ ";return Y.map(Fi).join(se)}function Vt(j){if(!j||j.semantic_type!=="class-expression")return j&&(j.label||j.id)||"";const P=(j.constructs||[]).find(Ee=>Ee.kind==="property-domain"||Ee.kind==="property-range"),Y=Bs(j);if(!P)return Y;const se=Fi(P.subject||P.property||""),ye=P.kind==="property-domain"?"domain":"range";return se?`${se} ${ye}: ${Y}`:`${ye}: ${Y}`}function Hi(j){return`${j.label} (symbol ${j.symbol})`}function mi(j){return!j||!j.length?"":`<div class="ontology-badge-row">${j.map(Y=>{const se=De(Hi(Y));return`<span class="ontology-badge" role="img" aria-label="${se}" title="${se}"><span class="ontology-badge-symbol" aria-hidden="true">${De(Y.symbol)}</span><span class="ontology-badge-text">${De(Y.label)}</span></span>`}).join("")}</div>`}function pi(j){const P=String(j&&j.kind||"");return P==="subset-or-equal"?"subclass":P==="member-of"?"membership":P==="disjointness"?"disjoint":P==="logical-equivalence"?"equivalence":P==="inverse-property"?"inverse":["functional","inverse-functional","symmetric","asymmetric","reflexive","irreflexive","transitive"].includes(P)?"property-characteristic":P==="universal-restriction"||P==="existential-restriction"?"restriction":P==="intersection"||P==="union"||P==="set-difference"?"class-expression":""}function _i(j){return(j.badges||[]).filter(P=>{const Y=pi(P);return Y?$.construct.has(Y)&&Uo(Y):!0})}function wr(j){return _i(j).map(P=>P.symbol).join(" ")}function Xt(j){return j.constructs||[]}function Us(j){return j.slot_facets||[]}function Gs(j){const P=String(j||""),Y=P.startsWith("equivalence:")?P.slice(12):P;return Y?Y.split("|").filter(Boolean):[]}function kr(j){return!j||!j.length?'<span class="text-gray-400 italic">None</span>':j.map(P=>`<span class="ontology-rel-pill" title="${De(P)}">${De(Fi(P))}</span>`).join("")}const gi={"object-property":"Object property","datatype-property":"Datatype property","rdf-property":"RDF property",class:"Class","named-individual":"Named individual","node-shape":"SHACL node shape","property-shape":"SHACL property shape",restriction:"OWL restriction","class-expression":"Class expression",datatype:"Datatype","skos-concept":"SKOS concept","skos-concept-scheme":"SKOS concept scheme",literal:"Literal",resource:"Resource"};function za(j){return gi[j]||j||"Resource"}function Vr(j,P){return!j||!j.length?`<span class="text-gray-400 italic">${De(P)}</span>`:j.map(Y=>{const se=String(Y.kind||"class"),ye=De(Y.iri||Y.label||"");return`<span class="ontology-term-ref ontology-term-${De(se)}" title="${ye}">${De(Y.label||Y.iri||"")}<span class="ontology-term-kind">${De(se)}</span></span>`}).join("")}function Oo(j){return!j||!j.length?"":`<div class="ontology-meta-section">
1104
+ <div class="ontology-meta-title">Literal Values</div>
1105
+ ${j.map(P=>`<div class="ontology-literal-value"><span>${De(P.predicate||"value")}</span><strong>${De(P.value||"")}</strong></div>`).join("")}
1106
+ </div>`}function bu(j){return!j||!j.length?'<span class="text-gray-400 italic">No source recorded.</span>':j.map(P=>{const Y=P.source_name||P.source||P.file_path||"source",se=P.line_number?`${P.file_path}:${P.line_number}`:P.file_path||"",ye=P.kind?`<span class="ontology-source-kind">${De(P.kind)}</span>`:"",Ee=P.link?De(P.link):"",$e=De(P.source||se||Y),Ge=Ee?`<a class="ontology-source-name" href="${Ee}" title="${$e}">${De(Y)}</a>`:`<span>${De(Y)}</span>`,Ke=Ee?`<a class="ontology-source-loc" href="${Ee}" title="${$e}">${De(se)}</a>`:`<span class="ontology-source-loc">${De(se)}</span>`;return`<div class="ontology-source"><span>${Ge}${ye}</span>${Ke}</div>`}).join("")}function Ma(j){const P=(j.members||[]).map(ye=>De(Fi(ye))),Y=P.length?P.join('<span class="ontology-chain-sep">∘</span>'):'<span class="text-gray-400 italic">Empty chain</span>',se=j.source?`<div class="ontology-chain-source">${De(j.source)}</div>`:"";return`<div class="ontology-chain"><div>${Y}</div>${se}</div>`}function Da(j){const P=j.id,Y=[];return M.forEach(se=>{const ye=Ui(se.domain),Ee=Ui(se.range),$e=ye.some(Ke=>Ke.iri===P),Ge=Ee.some(Ke=>Ke.iri===P);!$e&&!Ge||Y.push({isDomain:$e,isRange:Ge,property:se,domains:ye,ranges:Ee,facets:$e?or(se,j):[]})}),Y.sort((se,ye)=>{const Ee=Vt(se.property).localeCompare(Vt(ye.property));if(Ee)return Ee;const $e=Hs(se),Ge=Hs(ye);return $e.localeCompare(Ge)}),Y}function or(j,P){return(P.slot_facets||[]).filter(Y=>Y.slot_iri===j.id)}function Nn(j){const P=Da(j);return P.length?`<div class="ontology-meta-section">
1107
+ <div class="ontology-meta-title">Properties</div>
1108
+ ${P.map(Fs).join("")}
1109
+ </div>`:""}function Fs(j){const P=j.property,Y=Vt(P)||P.id,se=za(P.semantic_type),ye=j.facets&&j.facets.length?`<div class="ontology-slot-facet-values">${j.facets.flatMap(Ee=>Ee.facets||[]).map(Ee=>`<span class="ontology-slot-facet-pill"><span>${De(Ee.name)}</span>${De(Ee.value)}</span>`).join("")}</div>`:"";return`<div class="ontology-property-usage"><div class="ontology-property-usage-title"><strong title="${De(P.full_uri||P.id)}">${De(Y)}</strong><span class="ontology-property-kind">${De(se)}</span></div><div class="ontology-property-usage-body">${qo(j)}</div>`+ye+"</div>"}function Hs(j){return j.isDomain&&j.isRange?"domain and range":j.isDomain?"domain":"range"}function qo(j){return j.isDomain&&j.isRange?`<span>domain/range</span> property; Domain ${Vr(j.domains,"Any")}; Range ${Vr(j.ranges,"Any")}`:j.isDomain?`<span>domain</span> property; Range ${Vr(j.ranges,"Any")}`:`<span>range</span> property; Domain ${Vr(j.domains,"Any")}`}function Vi(j){if(j.kind==="class-expression")return Xi(j);const P=j.badge?`<span class="ontology-construct-symbol" title="${De(Hi(j.badge))}">${De(j.badge.symbol)}</span>`:"",Y=[];j.subject&&Y.push(`subject=${j.subject}`),j.predicate&&Y.push(`predicate=${j.predicate}`),j.property&&Y.push(`property=${j.property}`),j.object&&Y.push(`object=${j.object}`),j.members&&j.members.length&&Y.push(`members=${j.members.join(" -> ")}`);const se=j.source&&(j.source.source_name||j.source.source||j.source.file_path)?`source=${j.source.source_name||j.source.source||j.source.file_path}${j.source.line_number?":"+j.source.line_number:""}`:"";se&&Y.push(se);const ye=Y.length?`<div class="ontology-construct-meta">${De(Y.join(" | "))}</div>`:"";return`<div class="ontology-construct"><div class="ontology-construct-title">${P}<span>${De(j.label||j.kind||"Construct")}</span></div>`+ye+"</div>"}function Xi(j){const P=j.badge?`<span class="ontology-construct-symbol" title="${De(Hi(j.badge))}">${De(j.badge.symbol)}</span>`:"",Y=(j.members||[]).length?`<div class="ontology-construct-members">${j.members.map((ye,Ee)=>`<div class="ontology-construct-member"><strong>${Ee+1}.</strong> ${De(Fi(ye))}</div>`).join("")}</div>`:'<span class="text-gray-400 italic">No members recorded.</span>',se=j.source&&(j.source.source_name||j.source.source||j.source.file_path)?`<div class="ontology-construct-meta">source=${De(j.source.source_name||j.source.source||j.source.file_path)}${j.source.line_number?":"+De(j.source.line_number):""}</div>`:"";return`<div class="ontology-construct"><div class="ontology-construct-title">${P}<span>${De(j.label||"Class expression")}</span></div>`+Y+se+"</div>"}function Vs(j){return String(j||"").startsWith("_:")}function Ln(j){return Xt(j).filter(P=>P.kind==="class-expression")}function Io(j){const P=j.id;return F.filter(Y=>Ot(Y.source)===P||Ot(Y.target)===P).map(Y=>{const se=Ot(Y.source),ye=Ot(Y.target),Ee=I.get(se),$e=I.get(ye),Ge=se===P?"to":"from",Ke=se===P?$e:Ee;return{label:Y.label||"relation",direction:Ge,other:Ke?Ke.label||Ke.id:Ge==="to"?ye:se}})}function Oa(j){if(j.semantic_type!=="class-expression")return"";const P=Ln(j),Y=P.length?`<div class="ontology-meta-section">
1110
+ <div class="ontology-meta-title">Expression Members</div>
1111
+ ${P.map(Xi).join("")}
1112
+ </div>`:"",se=Io(j).filter(Ee=>!["union","intersection","complement"].includes(String(Ee.label||""))),ye=se.length?`<div class="ontology-meta-section">
1113
+ <div class="ontology-meta-title">Used As</div>
1114
+ <div class="ontology-construct-usages">${se.map(Ee=>`<div class="ontology-construct-usage"><strong>${De(Ee.label)}</strong> ${De(Ee.direction)} ${De(Ee.other)}</div>`).join("")}</div>
1115
+ </div>`:"";return Y+ye}function Po(j,P){const Y=j.full_uri||"";return Vs(Y)&&j.semantic_type==="class-expression"?`<details class="ontology-raw-details">
1116
+ <summary>Raw Details</summary>
1117
+ <div class="ontology-meta-title">Blank Node Identifier</div>
1118
+ <div class="ontology-uri-block">${De(Y)}</div>
1119
+ </details>`:`<div class="ontology-meta-section">
1120
+ <div class="ontology-meta-title">${De(P)}</div>
1121
+ <div class="ontology-uri-block">${De(Y)}</div>
1122
+ </div>`}function yi(j,P){const Y=P==="property",se=(j.facets||[]).length?`<div class="ontology-slot-facet-values">${j.facets.map(Me=>`<span class="ontology-slot-facet-pill"><span>${De(Me.name)}</span>${De(Me.value)}</span>`).join("")}</div>`:'<span class="text-gray-400 italic">No explicit facets.</span>',ye=j.slot_label||j.slot_iri||"slot",Ee=j.target_class_label||j.target_class_iri||"target class",$e=Y?`Class ${Ee}`:ye,Ge=Y?j.target_class_iri||j.target_class_label||"":j.slot_iri||j.slot_label||"",Ke=Y?`<div class="ontology-slot-facet-target">Path ${De(ye)}</div>`:j.target_class_label?`<div class="ontology-slot-facet-target">Class ${De(j.target_class_label)}</div>`:"";return`<div class="ontology-slot-facet"><div class="ontology-slot-facet-title"><strong title="${De(Ge)}">${De($e)}</strong><span class="ontology-slot-facet-source">${De(j.source_shape_label||"shape")}</span></div>`+Ke+se+"</div>"}function $o(j){const P=(j.badges||[]).map(Me=>`${Me.label} ${Me.symbol} ${Me.code_point}`).join(" "),Y=(j.property_chains||[]).map(Me=>`${(Me.members||[]).join(" ")} ${Me.source||""}`).join(" "),se=[].concat(j.domain||[],j.range||[]).map(Me=>`${Me.label||""} ${Me.iri||""} ${Me.kind||""}`).join(" "),ye=(j.constraints||[]).map(Me=>`${Me.property||""} ${Me.value||""}`).join(" "),Ee=(j.sources||[]).map(Me=>`${Me.source||""} ${Me.source_name||""} ${Me.file_path||""} ${Me.kind||""}`).join(" "),$e=(j.constructs||[]).map(Me=>[Me.id,Me.family,Me.kind,Me.label,Me.subject,Me.predicate,Me.object,Me.property,(Me.members||[]).join(" "),Me.source?`${Me.source.source||""} ${Me.source.source_name||""} ${Me.source.file_path||""}`:"",Me.badge?`${Me.badge.label||""} ${Me.badge.symbol||""} ${Me.badge.code_point||""}`:""].join(" ")).join(" "),Ge=(j.slot_facets||[]).map(Me=>[Me.slot_label,Me.slot_iri,Me.target_class_label,Me.target_class_iri,Me.source_shape_label,Me.source_shape_iri,(Me.facets||[]).map(Wt=>`${Wt.name} ${Wt.value}`).join(" ")].join(" ")).join(" "),Ke=(j.literal_values||[]).map(Me=>`${Me.predicate||""} ${Me.value||""} ${Me.source&&(Me.source.source_name||Me.source.source||Me.source.file_path)||""}`).join(" ");return[Vt(j),j.label,j.full_uri,j.ontology_document||"",j.type||"",j.semantic_type||"",(j.rdf_types||[]).join(" "),P,j.equivalence_group||"",(j.inverse_properties||[]).join(" "),Y,se,ye,Ke,Ge,Ee,$e].join(" ").toLowerCase()}function xu(j){r==null||r(j);const P=document.getElementById("ontology-inspector-title"),Y=document.getElementById("ontology-inspector-body"),se=document.getElementById("ontology-inspector-clear");if(!P||!Y||!se)return;P.textContent=Vt(j)||j.id,se.style.display="block";const ye=String(j.full_uri||"").startsWith("_:")?"Blank Node Identifier":"Full URI",Ee=j.rdf_types&&j.rdf_types.length?j.rdf_types.map(ki=>`<span class="ontology-type-pill">${De(ki)}</span>`).join(""):`<span class="text-gray-400 italic">Implicit ${De(j.type)} entity</span>`,$e=j.constraints&&j.constraints.length?`<div class="ontology-meta-section">
1123
+ <div class="ontology-meta-title">Raw SHACL Evidence</div>
1124
+ ${j.constraints.map(ki=>`<div class="ontology-constraint"><span>${De(ki.property)}</span><strong>${De(ki.value)}</strong></div>`).join("")}
1125
+ </div>`:"",Ge=mi(j.badges||[]),Ke=j.equivalence_group?`<div class="ontology-meta-section">
1126
+ <div class="ontology-meta-title">Equivalence Group</div>
1127
+ <div>${kr(Gs(j.equivalence_group))}</div>
1128
+ </div>`:"",Me=j.inverse_properties&&j.inverse_properties.length?`<div class="ontology-meta-section">
1129
+ <div class="ontology-meta-title">Inverse Properties</div>
1130
+ <div>${kr(j.inverse_properties)}</div>
1131
+ </div>`:"",Wt=j.property_chains&&j.property_chains.length?`<div class="ontology-meta-section">
1132
+ <div class="ontology-meta-title">Property Chains</div>
1133
+ ${j.property_chains.map(Ma).join("")}
1134
+ </div>`:"",dn=Xt(j).filter(ki=>j.semantic_type!=="class-expression"?!0:!["class-expression","property-domain","property-range"].includes(ki.kind)),xt=dn.length?`<div class="ontology-meta-section">
1135
+ <div class="ontology-meta-title">Projection Constructs</div>
1136
+ ${dn.map(Vi).join("")}
1137
+ </div>`:"",mt=Oa(j),qt=Oo(j.literal_values),xi=Po(j,ye),Ho=j.ontology_document?`<div class="ontology-meta-section">
1138
+ <div class="ontology-meta-title">OWL Document</div>
1139
+ <div class="ontology-uri-block">${De(j.ontology_document)}</div>
1140
+ </div>`:"",Tu=Nn(j),wi=String(j.semantic_type||"").endsWith("property")||j.domain&&j.domain.length||j.range&&j.range.length,Ks=Us(j),Yn=Ks.length?`<div class="ontology-meta-section">
1141
+ <div class="ontology-meta-title">${wi?"Used As Slot / Facets":"Slots / Facets"}</div>
1142
+ ${Ks.map(ki=>yi(ki,wi?"property":"class")).join("")}
1143
+ </div>`:"",Cp=wi?`<div class="ontology-meta-section">
1144
+ <div class="ontology-meta-title">Domain</div>
1145
+ <div>${Vr(j.domain,"Any (unconstrained)")}</div>
1146
+ </div>`:"",Of=wi?`<div class="ontology-meta-section">
1147
+ <div class="ontology-meta-title">Range</div>
1148
+ <div>${Vr(j.range,"Any (unconstrained)")}</div>
1149
+ </div>`:"";Fr(Y,`
1150
+ ${Ge}
1151
+ <div class="ontology-meta-section">
1152
+ <div class="ontology-meta-title">Kind</div>
1153
+ <div><span class="ontology-kind-pill">${De(za(j.semantic_type))}</span></div>
1154
+ </div>
1155
+ <div class="ontology-meta-section">
1156
+ <div class="ontology-meta-title">RDF Type</div>
1157
+ <div>${Ee}</div>
1158
+ </div>
1159
+ ${xi}
1160
+ ${Ho}
1161
+ <div class="ontology-meta-section">
1162
+ <div class="ontology-meta-title">Description</div>
1163
+ <p class="m-0">${De(j.comment||"None specified.")}</p>
1164
+ </div>
1165
+ ${qt}
1166
+ ${mt}
1167
+ ${Tu}
1168
+ ${Cp}
1169
+ ${Of}
1170
+ ${Yn}
1171
+ ${Ke}
1172
+ ${Me}
1173
+ ${Wt}
1174
+ ${xt}
1175
+ <div class="ontology-meta-section">
1176
+ <div class="ontology-meta-title">Sources</div>
1177
+ ${bu(j.sources)}
1178
+ </div>
1179
+ ${$e}
1180
+ `)}function Ot(j){return typeof j=="string"?j:j&&j.id?j.id:""}function qa(j,P){for(const Y of j||[])if(P.has(Y))return!0;return!1}function Lf(j){return new Set([Xs(j)])}function zf(j){const P=new Set;return sr(j)&&P.add("construct"),Su(j)&&P.add("authored"),P.size||P.add("registry"),P}function wu(j){return new Set([Mf(j&&j.layer)])}function Ep(j){return new Set([Mf(j&&j.layer)])}function Mf(j){return j==="concepts"?"layer-concepts":j==="reqvire-context"?"layer-reqvire-context":j==="external-source"?"layer-external-source":"layer-authored"}function Xs(j){if(Xr(j))return"external-reference";const P=j.semantic_type||"resource";return["object-property","datatype-property","rdf-property"].includes(P)?"property":["node-shape","property-shape"].includes(P)?"shacl-shape":P==="resource"?"resource":"ontology-term"}function Xr(j){const P=String(j.full_uri||j.id||"");return P.startsWith("http://www.w3.org/2001/XMLSchema#")||P.startsWith("http://www.w3.org/1999/02/22-rdf-syntax-ns#")||P.startsWith("http://www.w3.org/2000/01/rdf-schema#")||P.startsWith("http://www.w3.org/2002/07/owl#")||P.startsWith("http://www.w3.org/ns/shacl#")}function ku(j){const P=new Set,Y=String(j.semantic_type||"");return Y==="restriction"&&P.add("restriction"),Y==="class-expression"&&P.add("class-expression"),(j.constructs||[]).forEach(se=>{Yi(se).forEach(ye=>P.add(ye))}),(j.inverse_properties||[]).length&&P.add("inverse"),(j.property_chains||[]).length&&P.add("property-chain"),((j.domain||[]).length||(j.range||[]).length)&&P.add("domain-range"),(j.slot_facets||[]).length&&P.add("shape-overlay"),P}function Eu(j){const P=new Set,Y=String(j.label||"");return j.rendered_kind==="property"&&P.add("domain-range"),(Y==="domain"||Y==="range")&&P.add("domain-range"),Y==="subclass"&&P.add("subclass"),Y==="member"&&P.add("membership"),Y==="disjoint"&&P.add("disjoint"),Y==="inverse"&&P.add("inverse"),(Y==="on property"||Y.endsWith("restriction"))&&P.add("restriction"),["intersection","union","complement","class-expression"].includes(Y)&&P.add("class-expression"),Y.includes("shape overlay")&&P.add("shape-overlay"),P}function Yi(j){const P=String(j&&j.kind||""),Y=String(j&&j.family||""),se=new Set;return(P==="property-domain"||P==="property-range"||Y==="property-domain-range")&&se.add("domain-range"),P==="subclass-inclusion"&&se.add("subclass"),P==="membership"&&se.add("membership"),P==="disjointness"&&se.add("disjoint"),P==="equivalence-group"&&se.add("equivalence"),P==="inverse-property"&&se.add("inverse"),(P==="property-chain"||Y==="property-chain")&&se.add("property-chain"),(P==="property-characteristic"||Y==="property-characteristic")&&se.add("property-characteristic"),(P==="restriction"||Y==="restriction")&&se.add("restriction"),(P==="class-expression"||Y==="class-expression")&&se.add("class-expression"),(P==="shape-overlay"||Y==="shape-overlay")&&se.add("shape-overlay"),se}function sr(j){const P=String(j.id||j.full_uri||"");return yt(j,"restriction")||yt(j,"class-expression")?!0:P.startsWith("urn:reqvire:ontology-construct")||P.startsWith("urn:reqvire:ontology-member")||P.startsWith("urn:reqvire:ontology-symbol")}function Su(j){return(j.sources||[]).some(P=>P.kind==="ontology"||P.kind==="shapes")}function Ys(j){return!qa(j._ontologyLayers,$.layer)||!qa(j._ontologyRoles,$.role)||!qa(j._ontologyOrigins,$.origin)||!Bo(j)?!1:sr(j)?qa(j._ontologyConstructs,$.construct):(j.layer||"authored")!=="authored"?!0:Su(j)}function Df(j){const P=j._ontologyConstructs&&j._ontologyConstructs.size>0;return!qa(j._ontologyLayers,$.layer)||!Yr(j)?!1:(j.layer||"authored")!=="authored"?!0:P&&qa(j._ontologyConstructs,$.construct)}function Bo(j){return!(!Z.has("class-expressions")&&yt(j,"class-expression")||!Z.has("restrictions")&&yt(j,"restriction"))}function Yr(j){return!(!Z.has("class-disjointness")&&Yt(j,"disjoint")||!Z.has("class-membership")&&Yt(j,"membership")||!Z.has("restrictions")&&Yt(j,"restriction")||!Z.has("class-expressions")&&Yt(j,"class-expression")||!$.role.has("shacl-shape")&&Yt(j,"shape-overlay"))}function Yt(j,P){return!!(j._ontologyConstructs&&j._ontologyConstructs.has(P))}function Uo(j){return!(j==="membership"&&!Z.has("class-membership")||j==="disjoint"&&!Z.has("class-disjointness")||j==="restriction"&&!Z.has("restrictions")||j==="class-expression"&&!Z.has("class-expressions")||j==="shape-overlay"&&!$.role.has("shacl-shape"))}function vi(){const j=new Set;return X.forEach(P=>{Ys(P)&&j.add(P.id)}),j}function Ia(j){const P=Ot(j.source),Y=Ot(j.target);return Df(j)&&A.has(P)&&A.has(Y)}function Pa(){A=vi(),we+=1,ne="",H&&(X.forEach(P=>{H.hasNode(P.id)&&(H.setNodeAttribute(P.id,"hidden",!A.has(P.id)),H.setNodeAttribute(P.id,"label",br(P)),H.setNodeAttribute(P.id,"fullLabel",Pi(P)))}),F.forEach((P,Y)=>{const se=`o${Y}`;H.hasEdge(se)&&H.setEdgeAttribute(se,"hidden",!Ia(P))})),document.querySelectorAll(".ontology-filter-toggle").forEach(P=>{const Y=P.dataset.filterCategory,se=P.dataset.filterValue,ye=Y==="relation"?Z.has(se):!!($[Y]&&$[Y].has(se));P.classList.toggle("is-active",ye),P.setAttribute("aria-pressed",ye?"true":"false")});const j=document.getElementById("ontology-graph-search");j&&j.value.trim()&&window.filterOntologyGraph(j.value),N&&I.has(N)&&xu(I.get(N)),Wr()}window.filterOntologyGraph=function(j){const P=document.getElementById("ontology-graph-results");if(!P)return;const Y=j.trim().toLowerCase();if(!Y){P.style.display="none",P.replaceChildren();return}P.style.listStyle="none",P.style.overflowY="auto";const se=X.filter(ye=>A.has(ye.id)&&$o(ye).includes(Y)).slice(0,40);if(!se.length){const ye=document.createElement("li");ye.className="ontology-graph-result text-gray-400",ye.style.listStyle="none",ye.textContent="No matching nodes found",P.replaceChildren(ye),P.style.display="block";return}P.replaceChildren(...se.map(ye=>{const Ee=document.createElement("li");Ee.style.listStyle="none",Ee.setAttribute("role","presentation");const $e=document.createElement("button");$e.type="button",$e.className="ontology-graph-result",Ee.style.listStyle="none",$e.setAttribute("aria-label",`Focus ${Vt(ye)} (${za(ye.semantic_type)})`),$e.addEventListener("click",()=>window.focusOntologyNode(ye.id));const Ge=document.createElement("span");Ge.className="ontology-graph-result-label",Ge.textContent=Vt(ye),Ge.title=Vt(ye);const Ke=document.createElement("span");Ke.className="ontology-graph-result-glyph",Ke.setAttribute("data-semantic-type",String(ye.semantic_type||ye.node_type||"resource")),Ke.title=za(ye.semantic_type);const Me=wr(ye);if(Me){const Wt=document.createElement("span");Wt.className="ontology-graph-badge",Wt.textContent=Me,Wt.title=Me,$e.append(Ke,Ge,Wt)}else $e.append(Ke,Ge);return Ee.append($e),Ee})),P.style.display="block"},window.focusOntologyNode=function(j){const P=I.get(j);if(!P||!A.has(j)||!H||!H.hasNode(j))return;N=j,r==null||r(P);const Y=document.getElementById("ontology-graph-results"),se=document.getElementById("ontology-graph-search");Y&&(Y.style.display="none"),se&&(se.value=""),xu(P),Fo(j),Wr()},window.clearOntologySelection=function(){N=null,D=null,r==null||r(null);const j=document.getElementById("ontology-inspector-clear"),P=document.getElementById("ontology-inspector-title"),Y=document.getElementById("ontology-inspector-body");j&&(j.style.display="none"),P&&(P.textContent="Node Inspector"),Y&&La(Y),Wr()},window.fitOntologyGraph=function(){!Q||!H||Q.getCamera().animatedReset({duration:250})},window.resetOntologyGraphLayout=function(){H&&(Te(X),X.forEach(j=>{H.hasNode(j.id)&&H.mergeNodeAttributes(j.id,{x:j.x,y:j.y})}),ue(),Wr(),window.fitOntologyGraph())};function Wr(){Q&&Q.refresh()}function $a(){const j=[];return N&&j.push(N),j}function Ba(){const j=[];return D&&D!==N&&j.push(D),j}function Cu(){const j=$a().filter(Y=>A.has(Y));if(!j.length)return new Set;const P=`${we}|${j.join("")}`;return ne===P||(ne=P,de=bi(j)),de}function kn(){const j=Ba().filter(P=>A.has(P));return j.length?bi(j):new Set}function bi(j){const P=new Set(j),Y=new Set,se=[],ye=new Set;for(j.forEach(Ee=>{A.has(Ee)&&(Y.add(Ee),se.push(Ee))});se.length;){const Ee=se.shift();if(ye.has(Ee))continue;const $e=I.get(Ee);(P.has(Ee)||$e&&sr($e))&&(ye.add(Ee),(q.get(Ee)||[]).forEach(Ke=>{if(!Ia(Ke))return;const Me=Ot(Ke.source),Wt=Ot(Ke.target);if(Me!==Ee&&Wt!==Ee)return;const dn=Me===Ee?Wt:Me;if(!A.has(dn))return;Y.add(dn);const xt=I.get(dn);xt&&sr(xt)&&!ye.has(dn)&&se.push(dn)}))}return Y}function Go(j,P,Y){const se=Ot(j.source),ye=Ot(j.target);if(!Y.has(se)||!Y.has(ye))return!1;if(P.some(Ge=>se===Ge||ye===Ge))return!0;const Ee=I.get(se),$e=I.get(ye);return!!(Ee&&sr(Ee)||$e&&sr($e))}function Fo(j){if(!Q||!H||!H.hasNode(j))return;const P=Q.getNodeDisplayData(j);if(!P)return;const Y=Q.getCamera(),se=Y.getState();Y.animate({x:P.x,y:P.y,ratio:Math.min(se.ratio,.9)},{duration:280})}window.setOntologyGraphFilter=function(j,P,Y){if(!P)return;const se=j==="relation"?Z:$[j];se&&(Y?se.add(P):se.delete(P),Pa())},window.syncOntologyGraphFilters=function(j){const P=new Set(j||[]);$.role.clear(),$.construct.clear(),$.origin.clear(),$.layer.clear(),Z.clear(),$.role.add("ontology-term"),$.role.add("shacl-shape"),$.role.add("resource"),$.role.add("external-reference"),Z.add("class-membership"),["shacl-shape","resource","external-reference"].forEach(Y=>{P.has(Y)&&$.role.add(Y)}),["domain-range","subclass","membership","disjoint","equivalence","inverse","property-chain","property-characteristic","class-expression","shape-overlay"].forEach(Y=>{P.has(Y)&&$.construct.add(Y)}),["authored","registry","construct"].forEach(Y=>{P.has(Y)&&$.origin.add(Y)}),["layer-authored","layer-concepts","layer-reqvire-context","layer-external-source"].forEach(Y=>{P.has(Y)&&$.layer.add(Y)}),["class-disjointness","class-expressions"].forEach(Y=>{P.has(Y)&&Z.add(Y)}),Pa()},Pa();const Sp=window.setTimeout(window.fitOntologyGraph,550),Ws=()=>Wr();return window.addEventListener("resize",Ws),{destroy(){window.clearTimeout(Sp),me&&(window.clearTimeout(me),me=null),window.removeEventListener("resize",Ws),Q&&(le(""),Q.kill()),delete window.filterOntologyGraph,delete window.focusOntologyNode,delete window.clearOntologySelection,delete window.fitOntologyGraph,delete window.resetOntologyGraphLayout,delete window.setOntologyGraphFilter,delete window.syncOntologyGraphFilters},filter(j){var P;(P=window.filterOntologyGraph)==null||P.call(window,j)},focusNode(j){var P;(P=window.focusOntologyNode)==null||P.call(window,j)},clearSelection(){var j;(j=window.clearOntologySelection)==null||j.call(window)},resetLayout(){var j;(j=window.resetOntologyGraphLayout)==null||j.call(window)},setFilter(j,P,Y){var se;(se=window.setOntologyGraphFilter)==null||se.call(window,j,P,Y)}}}function kue(e={}){var i,o;const{store:t}=$n(),n=An(),r=(i=t.ontology)==null?void 0:i.graph_data;return r&&(((o=r.nodes)==null?void 0:o.length)??0)>0?y.jsx(Sue,{graphData:r,activeFilters:[...n.ontologyFilters]}):y.jsx(Eue,{})}function Eue(){return y.jsx(Oi,{testId:"ontologies",children:y.jsx(T1,{children:y.jsx(j1,{children:y.jsx(A1,{children:"Ontology graph data was not exported."})})})})}function Sue({graphData:e,activeFilters:t}){const n=K.useRef(null),r=K.useRef(null),i=K.useRef(t),{setOntologySelectionId:o}=An(),[s,u]=K.useState("Loading ontology graph...");return K.useEffect(()=>{i.current=t},[t]),K.useEffect(()=>{const c=n.current;if(!c)return;u("Loading ontology graph...");let f=null;const h=window.requestAnimationFrame(()=>{f=window.setTimeout(()=>{var m;try{const _=wue(c,e,{onSelect:g=>o((g==null?void 0:g.id)??null)});r.current=_,(m=window.syncOntologyGraphFilters)==null||m.call(window,i.current),u(null)}catch(_){console.error("[Reqvire Ontologies] Sigma/Graphology renderer failed",_),u("Ontology graph renderer failed. Check the browser console for details.")}},0)});return()=>{var m;window.cancelAnimationFrame(h),f!==null&&(window.clearTimeout(f),f=null),(m=r.current)==null||m.destroy(),r.current=null}},[e,o]),K.useEffect(()=>{var c;(c=window.syncOntologyGraphFilters)==null||c.call(window,t)},[t]),y.jsx(Oi,{testId:"ontologies",children:y.jsx(T1,{children:y.jsxs(j1,{"aria-label":"Ontology graph explorer",children:[y.jsx(bT,{ref:n,id:"ontology-graph-container",variant:"ontology",role:"img","aria-label":"Ontology and SHACL relationship graph"}),s?y.jsxs(A1,{children:[s==="Loading ontology graph..."?y.jsx(fT,{label:s}):null,y.jsx("span",{children:s})]}):null]})})})}function Cue({path:e}){const{store:t}=$n(),[n,r]=Tue(e),i=t.files.find(u=>u.path===n),o=t.resources.find(u=>u.file_path===n||u.target===n),s=(o==null?void 0:o.file_path)??(o==null?void 0:o.target)??n;return i?i.element_ids.length===0||o!=null&&o.source_text?y.jsx(Bd,{toolbar:zh(i.path,"Source file"),children:y.jsx(zm,{path:i.path,content:(o==null?void 0:o.source_text)??i.markdown_content,kind:(o==null?void 0:o.kind)??"source file",relationTypes:(o==null?void 0:o.relation_types)??[],showPath:!1})}):y.jsx(Bd,{toolbar:zh(i.path),children:y.jsx(vm,{markdown:i.markdown_content,sourceFilePath:i.path,sourceAnchor:r?`#/content/${i.path}#${r}`:`#/content/${i.path}`,scrollToAnchor:r})}):o!=null&&o.source_text?y.jsx(Bd,{toolbar:zh(s,"Source file"),children:y.jsx(zm,{path:s,content:o.source_text,kind:o.kind,relationTypes:o.relation_types,showPath:!1})}):y.jsx(Bd,{toolbar:zh(n),children:y.jsxs(Bm,{tone:"empty",children:["File not found: ",n]})})}function zh(e,t="Source page"){return{label:t,title:e,actionHref:Uh("model"),actionLabel:"Back to model"}}function Tue(e){const t=e.indexOf("#");return t===-1?[e,null]:[e.slice(0,t),e.slice(t+1)||null]}const wL="reqvire-explorer-theme";function jue(){if(typeof window>"u")return"light";const e=localStorage.getItem(wL);return e==="light"||e==="dark"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Aue(e){const t=document.documentElement;e==="dark"?(t.classList.add("dark"),t.dataset.theme="dark"):(t.classList.remove("dark"),t.dataset.theme="light")}function Rue(){const[e,t]=K.useState(jue);K.useEffect(()=>{Aue(e)},[e]);const n=K.useCallback(i=>{localStorage.setItem(wL,i),t(i)},[]),r=K.useCallback(()=>{n(e==="light"?"dark":"light")},[e,n]);return{theme:e,setTheme:n,toggleTheme:r,isDark:e==="dark"}}const lT=380,g1=300,y1=720,kL="reqvire:explorer:left-pane-width",Nue=[{value:"thesaurus",label:"Thesaurus",icon:"tags"},{value:"model",label:"Model",icon:"folder"},{value:"ontologies",label:"Ontologies",icon:"globe"},{value:"traces",label:"Traces",icon:"activity"},{value:"coverage",label:"Coverage",icon:"pie-chart"}];function Lue(){const e=K.useMemo(()=>qF(),[]);return e.ok?y.jsx(IF,{store:e.store,schemaMismatch:e.schemaMismatch,children:y.jsx(eee,{children:y.jsx(dJ,{children:y.jsx(zue,{schemaMismatch:e.schemaMismatch})})})}):y.jsx(PF,{reason:e.reason,detail:e.detail})}function zue({schemaMismatch:e}){const{route:t,navigateView:n,openElement:r,closeElement:i}=nee(),[o,s]=K.useState(!1),[u,c]=K.useState(!0),[f,h]=K.useState(!1),[m,_]=K.useState(Mue),[g,b]=K.useState([]),[E,C]=K.useState(null),w=K.useRef(null),T=K.useRef(m),{isDark:k,toggleTheme:S}=Rue(),z=t.view==="content"||t.view==="resources"&&t.param?"model":t.view,R=t.view==="files"||t.view==="content"||t.view==="resources"?"model":t.view;K.useEffect(()=>{document.title=`Reqvire Explorer — ${AA[t.view]}`},[t.view]),K.useEffect(()=>{t.elementId||b([])},[t.elementId]),K.useEffect(()=>{var A;T.current=m,(A=w.current)==null||A.style.setProperty("--ux-left-pane-width",`${m}px`),window.localStorage.setItem(kL,String(m))},[m]),K.useEffect(()=>{function A(){_(N=>Kh(N))}return window.addEventListener("resize",A),()=>window.removeEventListener("resize",A)},[]);function M(){c(A=>!A)}function X(A){n(A)}function F(A){b([]),r(A)}function I(A){A!==t.elementId&&(b(N=>t.elementId?[...N,t.elementId]:N),r(A))}function U(){const A=g.at(-1);A&&(b(N=>N.slice(0,-1)),r(A))}function G(){b([]),i()}function q(A){if(!u||A.button!==0)return;const N=A.clientX,H=T.current;let Q=H;h(!0),document.body.style.cursor="ew-resize",document.body.style.userSelect="none";function D(ee){var ie;const O=ee.clientX-N;Q=Kh(H+O),(ie=w.current)==null||ie.style.setProperty("--ux-left-pane-width",`${Q}px`)}function B(){window.removeEventListener("pointermove",D),window.removeEventListener("pointerup",B),window.removeEventListener("pointercancel",B),document.body.style.cursor="",document.body.style.userSelect="",h(!1),T.current=Q,_(Q)}window.addEventListener("pointermove",D),window.addEventListener("pointerup",B),window.addEventListener("pointercancel",B)}function $(A){if(u&&(A.key==="ArrowLeft"||A.key==="ArrowRight")){A.preventDefault();const N=A.key==="ArrowLeft"?-1:1,H=A.shiftKey?40:16;_(Q=>Kh(Q+N*H))}}const Z=[{id:"search",label:"Search",icon:"search",onClick:()=>n("search")},{id:"theme",label:k?"Switch to light mode":"Switch to dark mode",icon:k?"sun":"moon",onClick:S},{id:"help",label:"Help",icon:"help-circle",onClick:()=>s(!0)}];return y.jsxs(F8,{ref:w,navigationItems:Nue,activeNavigationValue:R,headerActions:Z,leftPaneOpen:u,leftPaneResizing:f,leftPaneWidth:m,leftPaneMinWidth:g1,leftPaneMaxWidth:y1,leftPaneCollapseLabel:"Collapse explorer",leftPaneExpandLabel:"Expand explorer",leftPaneResizeLabel:"Resize explorer pane",onNavigate:X,onToggleLeftPane:M,onLeftPaneResizePointerDown:q,onLeftPaneResizeKeyDown:$,mainWarning:e?`Store schema mismatch: ${e}`:null,sidePane:y.jsx(mJ,{activeView:z,open:u,chrome:"app",onToggle:M,onNavigate:n,onOpenElement:F,onOpenOntologyNode:C}),main:y.jsx(Due,{view:t.view,param:t.param,onNavigate:n,onOpenElement:F}),children:[y.jsx($F,{open:o,onOpenChange:s}),y.jsx(FZ,{identifier:t.elementId,onClose:G,onOpenElement:I,onOpenOntologyNode:C,onNavigateBack:g.length>0?U:void 0,previousElementLabel:g.at(-1)}),y.jsx(uJ,{nodeId:E,onClose:()=>C(null)})]})}function Mue(){if(typeof window>"u")return lT;const e=Number(window.localStorage.getItem(kL));return Kh(Number.isFinite(e)?e:lT)}function Kh(e){const t=typeof window>"u"?y1:Math.max(g1,Math.min(y1,window.innerWidth-420));return Math.round(Math.min(Math.max(e,g1),t))}function Due({view:e,param:t,onNavigate:n,onOpenElement:r}){switch(e){case"model":return y.jsx(ZC,{onOpenElement:r});case"thesaurus":return y.jsx(ple,{onOpenElement:r});case"traces":return y.jsx(vle,{activeView:e,onNavigate:n,onOpenElement:r});case"ontologies":return y.jsx(kue,{activeView:e,onNavigate:n});case"coverage":return y.jsx(Rle,{activeView:e,onNavigate:n,onOpenElement:r});case"resources":return y.jsx(rae,{resourceId:t,activeView:e,onNavigate:n});case"files":return y.jsx(v4,{path:t,activeView:e,onNavigate:n,onOpenElement:r});case"content":return y.jsx(Cue,{path:t??""});case"search":return y.jsx(iae,{initialQuery:t,activeView:e,onNavigate:n,onOpenElement:r});default:return y.jsx(ZC,{onOpenElement:r})}}const EL=document.getElementById("root");if(!EL)throw new Error("Reqvire Explorer: #root mount point not found");function Oue(){return new Promise(e=>{if(window.reqvireProjectStore!==void 0){e();return}const t=que();let n=0;function r(){if(window.reqvireProjectStore!==void 0||n>=t.length){e();return}const i=document.createElement("script");i.src=t[n],i.async=!1,i.onload=()=>e(),i.onerror=()=>{i.remove(),n+=1,r()},document.head.appendChild(i)}r()})}function que(){const e=new Set,t=new URL(import.meta.url);return t.pathname.includes("/assets/")&&e.add(new URL("project-store.js",t).toString()),e.add(new URL("assets/project-store.js",document.baseURI).toString()),e.add(new URL("assets/project-store.js",window.location.href).toString()),e.add("assets/project-store.js"),[...e]}Oue().then(()=>{k3.createRoot(EL).render(y.jsx(K.StrictMode,{children:y.jsx(Lue,{})}))});export{yf as C,rr as R,J as _,$ue as a,kH as b,Li as c,GH as d,zH as e,Mi as f,Ea as g,n0 as h,NH as i,qc as j,f7 as k,$1 as l,ej as m,rj as n,NA as o,Pue as p,er as q,wH as r,nr as s,DH as t,Bue as u,XH as v,LA as w,HH as x,VH as y};