businesslens 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) hide show
  1. package/.output/nitro.json +15 -0
  2. package/.output/public/_nuxt/ANTr5GBv.js +1 -0
  3. package/.output/public/_nuxt/B3Z-Zt7l.js +37 -0
  4. package/.output/public/_nuxt/Bd76-HGM.js +1 -0
  5. package/.output/public/_nuxt/Bf4VrETn.js +1 -0
  6. package/.output/public/_nuxt/CR3jGlpM.js +1 -0
  7. package/.output/public/_nuxt/CntoM1kL.js +1 -0
  8. package/.output/public/_nuxt/DogqooqX.js +1 -0
  9. package/.output/public/_nuxt/Zsu92SSr.js +1 -0
  10. package/.output/public/_nuxt/builds/latest.json +1 -0
  11. package/.output/public/_nuxt/builds/meta/e74555da-0c18-4e95-b959-2bdcc538677b.json +1 -0
  12. package/.output/public/_nuxt/default.CRZmPCG_.css +1 -0
  13. package/.output/public/_nuxt/e3lOfLH3.js +1 -0
  14. package/.output/public/_nuxt/entry.SgkJh-3P.css +1 -0
  15. package/.output/public/_nuxt/error-404.CTIGkQtd.css +1 -0
  16. package/.output/public/_nuxt/error-500.CKBWIF4V.css +1 -0
  17. package/.output/public/_nuxt/fCd72uLR.js +1 -0
  18. package/.output/public/_nuxt/inter-cyrillic-ext-wght-normal.BOeWTOD4.woff2 +0 -0
  19. package/.output/public/_nuxt/inter-cyrillic-wght-normal.DqGufNeO.woff2 +0 -0
  20. package/.output/public/_nuxt/inter-greek-ext-wght-normal.DlzME5K_.woff2 +0 -0
  21. package/.output/public/_nuxt/inter-greek-wght-normal.CkhJZR-_.woff2 +0 -0
  22. package/.output/public/_nuxt/inter-latin-ext-wght-normal.DO1Apj_S.woff2 +0 -0
  23. package/.output/public/_nuxt/inter-latin-wght-normal.Dx4kXJAl.woff2 +0 -0
  24. package/.output/public/_nuxt/inter-vietnamese-wght-normal.CBcvBZtf.woff2 +0 -0
  25. package/.output/public/_nuxt/vk0fkBN0.js +1 -0
  26. package/.output/public/_nuxt/zg6VsE4d.js +39 -0
  27. package/.output/public/brand/logo/businesslens-mark.svg +20 -0
  28. package/.output/public/favicon.svg +13 -0
  29. package/.output/server/chunks/_/error-500.mjs +19 -0
  30. package/.output/server/chunks/_/error-500.mjs.map +1 -0
  31. package/.output/server/chunks/_/icons.mjs +6150 -0
  32. package/.output/server/chunks/_/icons.mjs.map +1 -0
  33. package/.output/server/chunks/build/Card-DJ5Lo0Cn.mjs +161 -0
  34. package/.output/server/chunks/build/Card-DJ5Lo0Cn.mjs.map +1 -0
  35. package/.output/server/chunks/build/EntityInspector-fTjbuYoq.mjs +4412 -0
  36. package/.output/server/chunks/build/EntityInspector-fTjbuYoq.mjs.map +1 -0
  37. package/.output/server/chunks/build/Slideover-KOfskX1l.mjs +4226 -0
  38. package/.output/server/chunks/build/Slideover-KOfskX1l.mjs.map +1 -0
  39. package/.output/server/chunks/build/Tooltip-DkxwLaX6.mjs +1338 -0
  40. package/.output/server/chunks/build/Tooltip-DkxwLaX6.mjs.map +1 -0
  41. package/.output/server/chunks/build/client.precomputed.mjs +4 -0
  42. package/.output/server/chunks/build/client.precomputed.mjs.map +1 -0
  43. package/.output/server/chunks/build/default-BJSthw3t.mjs +8999 -0
  44. package/.output/server/chunks/build/default-BJSthw3t.mjs.map +1 -0
  45. package/.output/server/chunks/build/default-styles.BYgqaNao.mjs +8 -0
  46. package/.output/server/chunks/build/default-styles.BYgqaNao.mjs.map +1 -0
  47. package/.output/server/chunks/build/error-404-BOiGLcfP.mjs +96 -0
  48. package/.output/server/chunks/build/error-404-BOiGLcfP.mjs.map +1 -0
  49. package/.output/server/chunks/build/error-404-styles.DA-UkGXW.mjs +8 -0
  50. package/.output/server/chunks/build/error-404-styles.DA-UkGXW.mjs.map +1 -0
  51. package/.output/server/chunks/build/error-500-Bwyw373t.mjs +79 -0
  52. package/.output/server/chunks/build/error-500-Bwyw373t.mjs.map +1 -0
  53. package/.output/server/chunks/build/error-500-styles.De7qbKJ2.mjs +8 -0
  54. package/.output/server/chunks/build/error-500-styles.De7qbKJ2.mjs.map +1 -0
  55. package/.output/server/chunks/build/index-BuhKSZfH.mjs +313 -0
  56. package/.output/server/chunks/build/index-BuhKSZfH.mjs.map +1 -0
  57. package/.output/server/chunks/build/journeys-DHHOyxCM.mjs +244 -0
  58. package/.output/server/chunks/build/journeys-DHHOyxCM.mjs.map +1 -0
  59. package/.output/server/chunks/build/server.mjs +14099 -0
  60. package/.output/server/chunks/build/server.mjs.map +1 -0
  61. package/.output/server/chunks/build/styles.mjs +9 -0
  62. package/.output/server/chunks/build/styles.mjs.map +1 -0
  63. package/.output/server/chunks/build/topology-BJfDB_jA.mjs +295 -0
  64. package/.output/server/chunks/build/topology-BJfDB_jA.mjs.map +1 -0
  65. package/.output/server/chunks/build/useReport-pDAk-ETG.mjs +406 -0
  66. package/.output/server/chunks/build/useReport-pDAk-ETG.mjs.map +1 -0
  67. package/.output/server/chunks/nitro/nitro.mjs +5770 -0
  68. package/.output/server/chunks/nitro/nitro.mjs.map +1 -0
  69. package/.output/server/chunks/routes/api/report.get.mjs +617 -0
  70. package/.output/server/chunks/routes/api/report.get.mjs.map +1 -0
  71. package/.output/server/chunks/routes/renderer.mjs +451 -0
  72. package/.output/server/chunks/routes/renderer.mjs.map +1 -0
  73. package/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
  74. package/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
  75. package/.output/server/index.mjs +12 -0
  76. package/.output/server/index.mjs.map +1 -0
  77. package/.output/server/node_modules/.nitro/hookable@5.5.3/dist/index.mjs +290 -0
  78. package/.output/server/node_modules/.nitro/hookable@5.5.3/package.json +49 -0
  79. package/.output/server/node_modules/.nitro/hookable@6.1.1/dist/index.mjs +257 -0
  80. package/.output/server/node_modules/.nitro/hookable@6.1.1/package.json +53 -0
  81. package/.output/server/node_modules/@babel/parser/lib/index.js +14599 -0
  82. package/.output/server/node_modules/@babel/parser/package.json +50 -0
  83. package/.output/server/node_modules/@iconify/utils/lib/colors/index.js +295 -0
  84. package/.output/server/node_modules/@iconify/utils/lib/colors/keywords.js +701 -0
  85. package/.output/server/node_modules/@iconify/utils/lib/css/common.js +75 -0
  86. package/.output/server/node_modules/@iconify/utils/lib/css/format.js +39 -0
  87. package/.output/server/node_modules/@iconify/utils/lib/css/icon.js +47 -0
  88. package/.output/server/node_modules/@iconify/utils/lib/css/icons.js +128 -0
  89. package/.output/server/node_modules/@iconify/utils/lib/customisations/bool.js +19 -0
  90. package/.output/server/node_modules/@iconify/utils/lib/customisations/defaults.js +13 -0
  91. package/.output/server/node_modules/@iconify/utils/lib/customisations/flip.js +17 -0
  92. package/.output/server/node_modules/@iconify/utils/lib/customisations/merge.js +16 -0
  93. package/.output/server/node_modules/@iconify/utils/lib/customisations/rotate.js +30 -0
  94. package/.output/server/node_modules/@iconify/utils/lib/emoji/cleanup.js +78 -0
  95. package/.output/server/node_modules/@iconify/utils/lib/emoji/convert.js +100 -0
  96. package/.output/server/node_modules/@iconify/utils/lib/emoji/data.js +28 -0
  97. package/.output/server/node_modules/@iconify/utils/lib/emoji/format.js +58 -0
  98. package/.output/server/node_modules/@iconify/utils/lib/emoji/parse.js +48 -0
  99. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/base.js +203 -0
  100. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/create.js +33 -0
  101. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.js +132 -0
  102. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/similar.js +165 -0
  103. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/tree.js +79 -0
  104. package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/find.js +92 -0
  105. package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/replace.js +26 -0
  106. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/components.js +76 -0
  107. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/missing.js +66 -0
  108. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/name.js +45 -0
  109. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/parse.js +103 -0
  110. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/similar.js +36 -0
  111. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/tree.js +92 -0
  112. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/variations.js +62 -0
  113. package/.output/server/node_modules/@iconify/utils/lib/icon/defaults.js +25 -0
  114. package/.output/server/node_modules/@iconify/utils/lib/icon/merge.js +16 -0
  115. package/.output/server/node_modules/@iconify/utils/lib/icon/name.js +57 -0
  116. package/.output/server/node_modules/@iconify/utils/lib/icon/square.js +33 -0
  117. package/.output/server/node_modules/@iconify/utils/lib/icon/transformations.js +12 -0
  118. package/.output/server/node_modules/@iconify/utils/lib/icon-set/convert-info.js +125 -0
  119. package/.output/server/node_modules/@iconify/utils/lib/icon-set/expand.js +19 -0
  120. package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icon.js +25 -0
  121. package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icons.js +36 -0
  122. package/.output/server/node_modules/@iconify/utils/lib/icon-set/minify.js +91 -0
  123. package/.output/server/node_modules/@iconify/utils/lib/icon-set/parse.js +46 -0
  124. package/.output/server/node_modules/@iconify/utils/lib/icon-set/tree.js +23 -0
  125. package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.js +42 -0
  126. package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate.js +123 -0
  127. package/.output/server/node_modules/@iconify/utils/lib/index.js +52 -0
  128. package/.output/server/node_modules/@iconify/utils/lib/loader/custom.js +30 -0
  129. package/.output/server/node_modules/@iconify/utils/lib/loader/loader.js +26 -0
  130. package/.output/server/node_modules/@iconify/utils/lib/loader/modern.js +27 -0
  131. package/.output/server/node_modules/@iconify/utils/lib/loader/utils.js +105 -0
  132. package/.output/server/node_modules/@iconify/utils/lib/misc/objects.js +26 -0
  133. package/.output/server/node_modules/@iconify/utils/lib/misc/strings.js +26 -0
  134. package/.output/server/node_modules/@iconify/utils/lib/misc/title.js +9 -0
  135. package/.output/server/node_modules/@iconify/utils/lib/svg/build.js +113 -0
  136. package/.output/server/node_modules/@iconify/utils/lib/svg/defs.js +31 -0
  137. package/.output/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js +13 -0
  138. package/.output/server/node_modules/@iconify/utils/lib/svg/html.js +9 -0
  139. package/.output/server/node_modules/@iconify/utils/lib/svg/id.js +41 -0
  140. package/.output/server/node_modules/@iconify/utils/lib/svg/inner-html.js +22 -0
  141. package/.output/server/node_modules/@iconify/utils/lib/svg/parse.js +67 -0
  142. package/.output/server/node_modules/@iconify/utils/lib/svg/pretty.js +54 -0
  143. package/.output/server/node_modules/@iconify/utils/lib/svg/size.js +27 -0
  144. package/.output/server/node_modules/@iconify/utils/lib/svg/trim.js +7 -0
  145. package/.output/server/node_modules/@iconify/utils/lib/svg/url.js +22 -0
  146. package/.output/server/node_modules/@iconify/utils/lib/svg/viewbox.js +8 -0
  147. package/.output/server/node_modules/@iconify/utils/package.json +119 -0
  148. package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6759 -0
  149. package/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
  150. package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +689 -0
  151. package/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
  152. package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1413 -0
  153. package/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
  154. package/.output/server/node_modules/@vue/devtools-api/dist/index.js +2 -0
  155. package/.output/server/node_modules/@vue/devtools-api/package.json +34 -0
  156. package/.output/server/node_modules/@vue/devtools-kit/dist/index.js +5670 -0
  157. package/.output/server/node_modules/@vue/devtools-kit/package.json +44 -0
  158. package/.output/server/node_modules/@vue/devtools-shared/dist/index.js +239 -0
  159. package/.output/server/node_modules/@vue/devtools-shared/package.json +33 -0
  160. package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1899 -0
  161. package/.output/server/node_modules/@vue/reactivity/package.json +55 -0
  162. package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6940 -0
  163. package/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
  164. package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1822 -0
  165. package/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
  166. package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +896 -0
  167. package/.output/server/node_modules/@vue/server-renderer/package.json +55 -0
  168. package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +604 -0
  169. package/.output/server/node_modules/@vue/shared/package.json +47 -0
  170. package/.output/server/node_modules/@vue-flow/core/dist/vue-flow-core.mjs +10186 -0
  171. package/.output/server/node_modules/@vue-flow/core/package.json +95 -0
  172. package/.output/server/node_modules/ajv/dist/2020.js +55 -0
  173. package/.output/server/node_modules/ajv/dist/ajv.js +50 -0
  174. package/.output/server/node_modules/ajv/dist/compile/codegen/code.js +156 -0
  175. package/.output/server/node_modules/ajv/dist/compile/codegen/index.js +697 -0
  176. package/.output/server/node_modules/ajv/dist/compile/codegen/scope.js +143 -0
  177. package/.output/server/node_modules/ajv/dist/compile/errors.js +123 -0
  178. package/.output/server/node_modules/ajv/dist/compile/index.js +242 -0
  179. package/.output/server/node_modules/ajv/dist/compile/names.js +28 -0
  180. package/.output/server/node_modules/ajv/dist/compile/ref_error.js +12 -0
  181. package/.output/server/node_modules/ajv/dist/compile/resolve.js +155 -0
  182. package/.output/server/node_modules/ajv/dist/compile/rules.js +26 -0
  183. package/.output/server/node_modules/ajv/dist/compile/util.js +178 -0
  184. package/.output/server/node_modules/ajv/dist/compile/validate/applicability.js +19 -0
  185. package/.output/server/node_modules/ajv/dist/compile/validate/boolSchema.js +50 -0
  186. package/.output/server/node_modules/ajv/dist/compile/validate/dataType.js +203 -0
  187. package/.output/server/node_modules/ajv/dist/compile/validate/defaults.js +35 -0
  188. package/.output/server/node_modules/ajv/dist/compile/validate/index.js +520 -0
  189. package/.output/server/node_modules/ajv/dist/compile/validate/keyword.js +124 -0
  190. package/.output/server/node_modules/ajv/dist/compile/validate/subschema.js +81 -0
  191. package/.output/server/node_modules/ajv/dist/core.js +618 -0
  192. package/.output/server/node_modules/ajv/dist/refs/data.json +13 -0
  193. package/.output/server/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +30 -0
  194. package/.output/server/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +48 -0
  195. package/.output/server/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +17 -0
  196. package/.output/server/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +51 -0
  197. package/.output/server/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
  198. package/.output/server/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +37 -0
  199. package/.output/server/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
  200. package/.output/server/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +90 -0
  201. package/.output/server/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +55 -0
  202. package/.output/server/node_modules/ajv/dist/refs/json-schema-draft-07.json +151 -0
  203. package/.output/server/node_modules/ajv/dist/runtime/equal.js +7 -0
  204. package/.output/server/node_modules/ajv/dist/runtime/ucs2length.js +24 -0
  205. package/.output/server/node_modules/ajv/dist/runtime/uri.js +6 -0
  206. package/.output/server/node_modules/ajv/dist/runtime/validation_error.js +11 -0
  207. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +49 -0
  208. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +106 -0
  209. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/allOf.js +23 -0
  210. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +12 -0
  211. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/contains.js +95 -0
  212. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +85 -0
  213. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +11 -0
  214. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/if.js +66 -0
  215. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/index.js +44 -0
  216. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/items.js +52 -0
  217. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/items2020.js +30 -0
  218. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/not.js +26 -0
  219. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +60 -0
  220. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +75 -0
  221. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +12 -0
  222. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/properties.js +54 -0
  223. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +38 -0
  224. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +13 -0
  225. package/.output/server/node_modules/ajv/dist/vocabularies/code.js +131 -0
  226. package/.output/server/node_modules/ajv/dist/vocabularies/core/id.js +10 -0
  227. package/.output/server/node_modules/ajv/dist/vocabularies/core/index.js +16 -0
  228. package/.output/server/node_modules/ajv/dist/vocabularies/core/ref.js +122 -0
  229. package/.output/server/node_modules/ajv/dist/vocabularies/discriminator/index.js +104 -0
  230. package/.output/server/node_modules/ajv/dist/vocabularies/discriminator/types.js +9 -0
  231. package/.output/server/node_modules/ajv/dist/vocabularies/draft2020.js +23 -0
  232. package/.output/server/node_modules/ajv/dist/vocabularies/draft7.js +17 -0
  233. package/.output/server/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +30 -0
  234. package/.output/server/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +51 -0
  235. package/.output/server/node_modules/ajv/dist/vocabularies/dynamic/index.js +9 -0
  236. package/.output/server/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +16 -0
  237. package/.output/server/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +10 -0
  238. package/.output/server/node_modules/ajv/dist/vocabularies/format/format.js +92 -0
  239. package/.output/server/node_modules/ajv/dist/vocabularies/format/index.js +6 -0
  240. package/.output/server/node_modules/ajv/dist/vocabularies/metadata.js +18 -0
  241. package/.output/server/node_modules/ajv/dist/vocabularies/next.js +8 -0
  242. package/.output/server/node_modules/ajv/dist/vocabularies/unevaluated/index.js +7 -0
  243. package/.output/server/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +40 -0
  244. package/.output/server/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +65 -0
  245. package/.output/server/node_modules/ajv/dist/vocabularies/validation/const.js +25 -0
  246. package/.output/server/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +12 -0
  247. package/.output/server/node_modules/ajv/dist/vocabularies/validation/enum.js +48 -0
  248. package/.output/server/node_modules/ajv/dist/vocabularies/validation/index.js +33 -0
  249. package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitContains.js +15 -0
  250. package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitItems.js +24 -0
  251. package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitLength.js +27 -0
  252. package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +27 -0
  253. package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +24 -0
  254. package/.output/server/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +26 -0
  255. package/.output/server/node_modules/ajv/dist/vocabularies/validation/pattern.js +24 -0
  256. package/.output/server/node_modules/ajv/dist/vocabularies/validation/required.js +79 -0
  257. package/.output/server/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +64 -0
  258. package/.output/server/node_modules/ajv/package.json +126 -0
  259. package/.output/server/node_modules/ajv-formats/dist/formats.js +208 -0
  260. package/.output/server/node_modules/ajv-formats/dist/index.js +37 -0
  261. package/.output/server/node_modules/ajv-formats/dist/limit.js +69 -0
  262. package/.output/server/node_modules/ajv-formats/package.json +74 -0
  263. package/.output/server/node_modules/birpc/dist/index.mjs +291 -0
  264. package/.output/server/node_modules/birpc/package.json +57 -0
  265. package/.output/server/node_modules/consola/dist/chunks/prompt.mjs +280 -0
  266. package/.output/server/node_modules/consola/dist/core.mjs +512 -0
  267. package/.output/server/node_modules/consola/dist/index.mjs +651 -0
  268. package/.output/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
  269. package/.output/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
  270. package/.output/server/node_modules/consola/package.json +136 -0
  271. package/.output/server/node_modules/devalue/index.js +4 -0
  272. package/.output/server/node_modules/devalue/package.json +40 -0
  273. package/.output/server/node_modules/devalue/src/base64.js +60 -0
  274. package/.output/server/node_modules/devalue/src/constants.js +12 -0
  275. package/.output/server/node_modules/devalue/src/parse.js +283 -0
  276. package/.output/server/node_modules/devalue/src/stringify.js +401 -0
  277. package/.output/server/node_modules/devalue/src/uneval.js +552 -0
  278. package/.output/server/node_modules/devalue/src/utils.js +160 -0
  279. package/.output/server/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
  280. package/.output/server/node_modules/entities/dist/commonjs/decode.js +568 -0
  281. package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
  282. package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
  283. package/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
  284. package/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
  285. package/.output/server/node_modules/entities/dist/commonjs/package.json +3 -0
  286. package/.output/server/node_modules/entities/package.json +120 -0
  287. package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
  288. package/.output/server/node_modules/estree-walker/package.json +37 -0
  289. package/.output/server/node_modules/fast-deep-equal/index.js +46 -0
  290. package/.output/server/node_modules/fast-deep-equal/package.json +61 -0
  291. package/.output/server/node_modules/fast-uri/index.js +406 -0
  292. package/.output/server/node_modules/fast-uri/lib/schemes.js +267 -0
  293. package/.output/server/node_modules/fast-uri/lib/utils.js +443 -0
  294. package/.output/server/node_modules/fast-uri/package.json +68 -0
  295. package/.output/server/node_modules/json-schema-traverse/index.js +93 -0
  296. package/.output/server/node_modules/json-schema-traverse/package.json +43 -0
  297. package/.output/server/node_modules/perfect-debounce/dist/index.mjs +89 -0
  298. package/.output/server/node_modules/perfect-debounce/package.json +41 -0
  299. package/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
  300. package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  301. package/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
  302. package/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
  303. package/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
  304. package/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
  305. package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
  306. package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
  307. package/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
  308. package/.output/server/node_modules/source-map-js/lib/util.js +594 -0
  309. package/.output/server/node_modules/source-map-js/package.json +71 -0
  310. package/.output/server/node_modules/source-map-js/source-map.js +8 -0
  311. package/.output/server/node_modules/tailwindcss/dist/chunk-X4GG3EDV.mjs +1 -0
  312. package/.output/server/node_modules/tailwindcss/dist/colors.mjs +1 -0
  313. package/.output/server/node_modules/tailwindcss/package.json +89 -0
  314. package/.output/server/node_modules/ufo/dist/index.mjs +645 -0
  315. package/.output/server/node_modules/ufo/package.json +48 -0
  316. package/.output/server/node_modules/unhead/dist/index.mjs +9 -0
  317. package/.output/server/node_modules/unhead/dist/parser.mjs +508 -0
  318. package/.output/server/node_modules/unhead/dist/plugins.mjs +101 -0
  319. package/.output/server/node_modules/unhead/dist/scripts.mjs +30 -0
  320. package/.output/server/node_modules/unhead/dist/server.mjs +180 -0
  321. package/.output/server/node_modules/unhead/dist/shared/unhead.B3VbJo7Y.mjs +207 -0
  322. package/.output/server/node_modules/unhead/dist/shared/unhead.BYvz9V1x.mjs +43 -0
  323. package/.output/server/node_modules/unhead/dist/shared/unhead.BnoAbrHA.mjs +269 -0
  324. package/.output/server/node_modules/unhead/dist/shared/unhead.CaI5ZD4O.mjs +182 -0
  325. package/.output/server/node_modules/unhead/dist/shared/unhead.CbpEuj3y.mjs +71 -0
  326. package/.output/server/node_modules/unhead/dist/shared/unhead.D4vSFytZ.mjs +236 -0
  327. package/.output/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
  328. package/.output/server/node_modules/unhead/dist/shared/unhead.Dh1cQCTe.mjs +44 -0
  329. package/.output/server/node_modules/unhead/dist/shared/unhead.TxTMM7cM.mjs +166 -0
  330. package/.output/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
  331. package/.output/server/node_modules/unhead/dist/utils.mjs +5 -0
  332. package/.output/server/node_modules/unhead/package.json +105 -0
  333. package/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
  334. package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
  335. package/.output/server/node_modules/vue/index.js +7 -0
  336. package/.output/server/node_modules/vue/index.mjs +1 -0
  337. package/.output/server/node_modules/vue/package.json +112 -0
  338. package/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
  339. package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +249 -0
  340. package/.output/server/node_modules/vue-bundle-renderer/package.json +57 -0
  341. package/.output/server/node_modules/vue-router/dist/devtools-DCoWQoU_.js +1034 -0
  342. package/.output/server/node_modules/vue-router/dist/useApi-s_02lHjl.js +181 -0
  343. package/.output/server/node_modules/vue-router/dist/vue-router.js +1499 -0
  344. package/.output/server/node_modules/vue-router/package.json +226 -0
  345. package/.output/server/node_modules/vue-router/vue-router.node.mjs +2 -0
  346. package/.output/server/package.json +41 -0
  347. package/README.md +114 -0
  348. package/THIRD_PARTY_NOTICES.md +28 -0
  349. package/bin/businesslens.mjs +181 -0
  350. package/package.json +68 -0
  351. package/packages/report-schema/schemas/report.schema.json +235 -0
  352. package/packages/report-schema/types/index.ts +1 -0
  353. package/packages/report-schema/types/report.ts +101 -0
  354. package/packages/report-schema/validate.mjs +111 -0
@@ -0,0 +1,39 @@
1
+ import{z as At,A as Gr,B as we,f as ve,C as Ur,D as za,o as J,c as ae,b as fe,w as Ie,E as xe,k as P,G as mt,H as He,I as Pa,J as me,x as be,y as re,K as Ut,L as Wr,M as Fn,N as Oa,a as oe,F as Te,r as $n,s as ze,O as qe,P as Zr,Q as Ba,p as Me,q as Se,R as gt,t as Ee,S as Ra,n as Pt,T as Va,U as Ha,V as Mt,W as _e,X as pe,Y as Yn,Z as La,$ as qr,a0 as vi,a1 as eo,a2 as yt,d as Xn,j as Fa,a3 as Jt,l as mi,g as Ya,h as Xa,m as Ga,a4 as Mn,a5 as Ua,i as Wa}from"./B3Z-Zt7l.js";import{_ as Za,a as qa,E as Ka}from"./Zsu92SSr.js";import{_ as Ja}from"./CntoM1kL.js";import{u as Kr}from"./Bf4VrETn.js";import"./fCd72uLR.js";function an(e){return Wr()?(Fn(e),!0):!1}function nt(e){return typeof e=="function"?e():P(e)}const Qa=typeof window<"u"&&typeof document<"u",ja=e=>typeof e<"u",el=Object.prototype.toString,tl=e=>el.call(e)==="[object Object]",nl=()=>{};function ol(e,t){function n(...o){return new Promise((i,r)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(i).catch(r)})}return n}const Jr=e=>e();function il(e=Jr){const t=be(!0);function n(){t.value=!1}function o(){t.value=!0}const i=(...r)=>{t.value&&e(...r)};return{isActive:La(t),pause:n,resume:o,eventFilter:i}}function Ri(e,t=!1,n="Timeout"){return new Promise((o,i)=>{setTimeout(t?()=>i(n):o,e)})}function rl(e,t,n={}){const{eventFilter:o=Jr,...i}=n;return we(e,ol(o,t),i)}function Dt(e,t,n={}){const{eventFilter:o,...i}=n,{eventFilter:r,pause:s,resume:a,isActive:l}=il(o);return{stop:rl(e,t,{...i,eventFilter:r}),pause:s,resume:a,isActive:l}}function sl(e,t={}){if(!Pt(e))return Va(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const o in e.value)n[o]=Ha(()=>({get(){return e.value[o]},set(i){var r;if((r=nt(t.replaceRef))!=null?r:!0)if(Array.isArray(e.value)){const a=[...e.value];a[o]=i,e.value=a}else{const a={...e.value,[o]:i};Object.setPrototypeOf(a,Object.getPrototypeOf(e.value)),e.value=a}else e.value[o]=i}}));return n}function Uo(e,t=!1){function n(d,{flush:h="sync",deep:g=!1,timeout:b,throwOnTimeout:_}={}){let E=null;const D=[new Promise(m=>{E=we(e,k=>{d(k)!==t&&(E?.(),m(k))},{flush:h,deep:g,immediate:!0})})];return b!=null&&D.push(Ri(b,_).then(()=>nt(e)).finally(()=>E?.())),Promise.race(D)}function o(d,h){if(!Pt(d))return n(k=>k===d,h);const{flush:g="sync",deep:b=!1,timeout:_,throwOnTimeout:E}=h??{};let $=null;const m=[new Promise(k=>{$=we([e,d],([B,U])=>{t!==(B===U)&&($?.(),k(B))},{flush:g,deep:b,immediate:!0})})];return _!=null&&m.push(Ri(_,E).then(()=>nt(e)).finally(()=>($?.(),nt(e)))),Promise.race(m)}function i(d){return n(h=>!!h,d)}function r(d){return o(null,d)}function s(d){return o(void 0,d)}function a(d){return n(Number.isNaN,d)}function l(d,h){return n(g=>{const b=Array.from(g);return b.includes(d)||b.includes(nt(d))},h)}function u(d){return c(1,d)}function c(d=1,h){let g=-1;return n(()=>(g+=1,g>=d),h)}return Array.isArray(nt(e))?{toMatch:n,toContains:l,changed:u,changedTimes:c,get not(){return Uo(e,!t)}}:{toMatch:n,toBe:o,toBeTruthy:i,toBeNull:r,toBeNaN:a,toBeUndefined:s,changed:u,changedTimes:c,get not(){return Uo(e,!t)}}}function Wo(e){return Uo(e)}function al(e){var t;const n=nt(e);return(t=n?.$el)!=null?t:n}const Qr=Qa?window:void 0;function jr(...e){let t,n,o,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,i]=e,t=Qr):[t,n,o,i]=e,!t)return nl;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const r=[],s=()=>{r.forEach(c=>c()),r.length=0},a=(c,d,h,g)=>(c.addEventListener(d,h,g),()=>c.removeEventListener(d,h,g)),l=we(()=>[al(t),nt(i)],([c,d])=>{if(s(),!c)return;const h=tl(d)?{...d}:d;r.push(...n.flatMap(g=>o.map(b=>a(c,g,b,h))))},{immediate:!0,flush:"post"}),u=()=>{l(),s()};return an(u),u}function ll(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Vi(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:i=Qr,eventName:r="keydown",passive:s=!1,dedupe:a=!1}=o,l=ll(t);return jr(i,r,c=>{c.repeat&&nt(a)||l(c)&&n(c)},s)}function ul(e){return JSON.parse(JSON.stringify(e))}function Ao(e,t,n,o={}){var i,r,s;const{clone:a=!1,passive:l=!1,eventName:u,deep:c=!1,defaultValue:d,shouldEmit:h}=o,g=Ut(),b=n||g?.emit||((i=g?.$emit)==null?void 0:i.bind(g))||((s=(r=g?.proxy)==null?void 0:r.$emit)==null?void 0:s.bind(g?.proxy));let _=u;t||(t="modelValue"),_=_||`update:${t.toString()}`;const E=m=>a?typeof a=="function"?a(m):ul(m):m,$=()=>ja(e[t])?E(e[t]):d,D=m=>{h?h(m)&&b(_,m):b(_,m)};if(l){const m=$(),k=be(m);let B=!1;return we(()=>e[t],U=>{B||(B=!0,k.value=E(U),qe(()=>B=!1))}),we(k,U=>{!B&&(U!==e[t]||c)&&D(U)},{deep:c}),k}else return re({get(){return $()},set(m){D(m)}})}var cl={value:()=>{}};function yo(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Gn(n)}function Gn(e){this._=e}function dl(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Gn.prototype=yo.prototype={constructor:Gn,on:function(e,t){var n=this._,o=dl(e+"",n),i,r=-1,s=o.length;if(arguments.length<2){for(;++r<s;)if((i=(e=o[r]).type)&&(i=fl(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++r<s;)if(i=(e=o[r]).type)n[i]=Hi(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Hi(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 Gn(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),o=0,i,r;o<i;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,r=o.length;i<r;++i)o[i].value.apply(t,n)}};function fl(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function Hi(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=cl,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var Zo="http://www.w3.org/1999/xhtml";const Li={svg:"http://www.w3.org/2000/svg",xhtml:Zo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function wo(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Li.hasOwnProperty(t)?{space:Li[t],local:e}:e}function hl(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Zo&&t.documentElement.namespaceURI===Zo?t.createElement(e):t.createElementNS(n,e)}}function gl(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function es(e){var t=wo(e);return(t.local?gl:hl)(t)}function pl(){}function yi(e){return e==null?pl:function(){return this.querySelector(e)}}function vl(e){typeof e!="function"&&(e=yi(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,a=o[i]=new Array(s),l,u,c=0;c<s;++c)(l=r[c])&&(u=e.call(l,l.__data__,c,r))&&("__data__"in l&&(u.__data__=l.__data__),a[c]=u);return new Pe(o,this._parents)}function ml(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function yl(){return[]}function ts(e){return e==null?yl:function(){return this.querySelectorAll(e)}}function wl(e){return function(){return ml(e.apply(this,arguments))}}function _l(e){typeof e=="function"?e=wl(e):e=ts(e);for(var t=this._groups,n=t.length,o=[],i=[],r=0;r<n;++r)for(var s=t[r],a=s.length,l,u=0;u<a;++u)(l=s[u])&&(o.push(e.call(l,l.__data__,u,s)),i.push(l));return new Pe(o,i)}function ns(e){return function(){return this.matches(e)}}function os(e){return function(t){return t.matches(e)}}var $l=Array.prototype.find;function bl(e){return function(){return $l.call(this.children,e)}}function xl(){return this.firstElementChild}function El(e){return this.select(e==null?xl:bl(typeof e=="function"?e:os(e)))}var Sl=Array.prototype.filter;function Nl(){return Array.from(this.children)}function Ml(e){return function(){return Sl.call(this.children,e)}}function Cl(e){return this.selectAll(e==null?Nl:Ml(typeof e=="function"?e:os(e)))}function kl(e){typeof e!="function"&&(e=ns(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,a=o[i]=[],l,u=0;u<s;++u)(l=r[u])&&e.call(l,l.__data__,u,r)&&a.push(l);return new Pe(o,this._parents)}function is(e){return new Array(e.length)}function Il(){return new Pe(this._enter||this._groups.map(is),this._parents)}function to(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}to.prototype={constructor:to,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 Tl(e){return function(){return e}}function Al(e,t,n,o,i,r){for(var s=0,a,l=t.length,u=r.length;s<u;++s)(a=t[s])?(a.__data__=r[s],o[s]=a):n[s]=new to(e,r[s]);for(;s<l;++s)(a=t[s])&&(i[s]=a)}function Dl(e,t,n,o,i,r,s){var a,l,u=new Map,c=t.length,d=r.length,h=new Array(c),g;for(a=0;a<c;++a)(l=t[a])&&(h[a]=g=s.call(l,l.__data__,a,t)+"",u.has(g)?i[a]=l:u.set(g,l));for(a=0;a<d;++a)g=s.call(e,r[a],a,r)+"",(l=u.get(g))?(o[a]=l,l.__data__=r[a],u.delete(g)):n[a]=new to(e,r[a]);for(a=0;a<c;++a)(l=t[a])&&u.get(h[a])===l&&(i[a]=l)}function zl(e){return e.__data__}function Pl(e,t){if(!arguments.length)return Array.from(this,zl);var n=t?Dl:Al,o=this._parents,i=this._groups;typeof e!="function"&&(e=Tl(e));for(var r=i.length,s=new Array(r),a=new Array(r),l=new Array(r),u=0;u<r;++u){var c=o[u],d=i[u],h=d.length,g=Ol(e.call(c,c&&c.__data__,u,o)),b=g.length,_=a[u]=new Array(b),E=s[u]=new Array(b),$=l[u]=new Array(h);n(c,d,_,E,$,g,t);for(var D=0,m=0,k,B;D<b;++D)if(k=_[D]){for(D>=m&&(m=D+1);!(B=E[m])&&++m<b;);k._next=B||null}}return s=new Pe(s,o),s._enter=a,s._exit=l,s}function Ol(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Bl(){return new Pe(this._exit||this._groups.map(is),this._parents)}function Rl(e,t,n){var o=this.enter(),i=this,r=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?r.remove():n(r),o&&i?o.merge(i).order():i}function Vl(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,r=o.length,s=Math.min(i,r),a=new Array(i),l=0;l<s;++l)for(var u=n[l],c=o[l],d=u.length,h=a[l]=new Array(d),g,b=0;b<d;++b)(g=u[b]||c[b])&&(h[b]=g);for(;l<i;++l)a[l]=n[l];return new Pe(a,this._parents)}function Hl(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],i=o.length-1,r=o[i],s;--i>=0;)(s=o[i])&&(r&&s.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(s,r),r=s);return this}function Ll(e){e||(e=Fl);function t(d,h){return d&&h?e(d.__data__,h.__data__):!d-!h}for(var n=this._groups,o=n.length,i=new Array(o),r=0;r<o;++r){for(var s=n[r],a=s.length,l=i[r]=new Array(a),u,c=0;c<a;++c)(u=s[c])&&(l[c]=u);l.sort(t)}return new Pe(i,this._parents).order()}function Fl(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Yl(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Xl(){return Array.from(this)}function Gl(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length;i<r;++i){var s=o[i];if(s)return s}return null}function Ul(){let e=0;for(const t of this)++e;return e}function Wl(){return!this.node()}function Zl(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i=t[n],r=0,s=i.length,a;r<s;++r)(a=i[r])&&e.call(a,a.__data__,r,i);return this}function ql(e){return function(){this.removeAttribute(e)}}function Kl(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Jl(e,t){return function(){this.setAttribute(e,t)}}function Ql(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function jl(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function eu(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 tu(e,t){var n=wo(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?Kl:ql:typeof t=="function"?n.local?eu:jl:n.local?Ql:Jl)(n,t))}function rs(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function nu(e){return function(){this.style.removeProperty(e)}}function ou(e,t,n){return function(){this.style.setProperty(e,t,n)}}function iu(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function ru(e,t,n){return arguments.length>1?this.each((t==null?nu:typeof t=="function"?iu:ou)(e,t,n??"")):Ht(this.node(),e)}function Ht(e,t){return e.style.getPropertyValue(t)||rs(e).getComputedStyle(e,null).getPropertyValue(t)}function su(e){return function(){delete this[e]}}function au(e,t){return function(){this[e]=t}}function lu(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function uu(e,t){return arguments.length>1?this.each((t==null?su:typeof t=="function"?lu:au)(e,t)):this.node()[e]}function ss(e){return e.trim().split(/^|\s+/)}function wi(e){return e.classList||new as(e)}function as(e){this._node=e,this._names=ss(e.getAttribute("class")||"")}as.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 ls(e,t){for(var n=wi(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function us(e,t){for(var n=wi(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function cu(e){return function(){ls(this,e)}}function du(e){return function(){us(this,e)}}function fu(e,t){return function(){(t.apply(this,arguments)?ls:us)(this,e)}}function hu(e,t){var n=ss(e+"");if(arguments.length<2){for(var o=wi(this.node()),i=-1,r=n.length;++i<r;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?fu:t?cu:du)(n,t))}function gu(){this.textContent=""}function pu(e){return function(){this.textContent=e}}function vu(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function mu(e){return arguments.length?this.each(e==null?gu:(typeof e=="function"?vu:pu)(e)):this.node().textContent}function yu(){this.innerHTML=""}function wu(e){return function(){this.innerHTML=e}}function _u(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function $u(e){return arguments.length?this.each(e==null?yu:(typeof e=="function"?_u:wu)(e)):this.node().innerHTML}function bu(){this.nextSibling&&this.parentNode.appendChild(this)}function xu(){return this.each(bu)}function Eu(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Su(){return this.each(Eu)}function Nu(e){var t=typeof e=="function"?e:es(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Mu(){return null}function Cu(e,t){var n=typeof e=="function"?e:es(e),o=t==null?Mu:typeof t=="function"?t:yi(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function ku(){var e=this.parentNode;e&&e.removeChild(this)}function Iu(){return this.each(ku)}function Tu(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Au(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Du(e){return this.select(e?Au:Tu)}function zu(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Pu(e){return function(t){e.call(this,t,this.__data__)}}function Ou(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function Bu(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,r;n<i;++n)r=t[n],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):t[++o]=r;++o?t.length=o:delete this.__on}}}function Ru(e,t,n){return function(){var o=this.__on,i,r=Pu(t);if(o){for(var s=0,a=o.length;s<a;++s)if((i=o[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=r,i.options=n),i.value=t;return}}this.addEventListener(e.type,r,n),i={type:e.type,name:e.name,value:t,listener:r,options:n},o?o.push(i):this.__on=[i]}}function Vu(e,t,n){var o=Ou(e+""),i,r=o.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,u=a.length,c;l<u;++l)for(i=0,c=a[l];i<r;++i)if((s=o[i]).type===c.type&&s.name===c.name)return c.value}return}for(a=t?Ru:Bu,i=0;i<r;++i)this.each(a(o[i],t,n));return this}function cs(e,t,n){var o=rs(e),i=o.CustomEvent;typeof i=="function"?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Hu(e,t){return function(){return cs(this,e,t)}}function Lu(e,t){return function(){return cs(this,e,t.apply(this,arguments))}}function Fu(e,t){return this.each((typeof t=="function"?Lu:Hu)(e,t))}function*Yu(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length,s;i<r;++i)(s=o[i])&&(yield s)}var ds=[null];function Pe(e,t){this._groups=e,this._parents=t}function bn(){return new Pe([[document.documentElement]],ds)}function Xu(){return this}Pe.prototype=bn.prototype={constructor:Pe,select:vl,selectAll:_l,selectChild:El,selectChildren:Cl,filter:kl,data:Pl,enter:Il,exit:Bl,join:Rl,merge:Vl,selection:Xu,order:Hl,sort:Ll,call:Yl,nodes:Xl,node:Gl,size:Ul,empty:Wl,each:Zl,attr:tu,style:ru,property:uu,classed:hu,text:mu,html:$u,raise:xu,lower:Su,append:Nu,insert:Cu,remove:Iu,clone:Du,datum:zu,on:Vu,dispatch:Fu,[Symbol.iterator]:Yu};function Be(e){return typeof e=="string"?new Pe([[document.querySelector(e)]],[document.documentElement]):new Pe([[e]],ds)}function Gu(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ge(e,t){if(e=Gu(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.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 Uu={passive:!1},ln={capture:!0,passive:!1};function Do(e){e.stopImmediatePropagation()}function Ot(e){e.preventDefault(),e.stopImmediatePropagation()}function fs(e){var t=e.document.documentElement,n=Be(e).on("dragstart.drag",Ot,ln);"onselectstart"in t?n.on("selectstart.drag",Ot,ln):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function hs(e,t){var n=e.document.documentElement,o=Be(e).on("dragstart.drag",null);t&&(o.on("click.drag",Ot,ln),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Cn=e=>()=>e;function qo(e,{sourceEvent:t,subject:n,target:o,identifier:i,active:r,x:s,y:a,dx:l,dy:u,dispatch:c}){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:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:r,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}qo.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Wu(e){return!e.ctrlKey&&!e.button}function Zu(){return this.parentNode}function qu(e,t){return t??{x:e.x,y:e.y}}function Ku(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ju(){var e=Wu,t=Zu,n=qu,o=Ku,i={},r=yo("start","drag","end"),s=0,a,l,u,c,d=0;function h(k){k.on("mousedown.drag",g).filter(o).on("touchstart.drag",E).on("touchmove.drag",$,Uu).on("touchend.drag touchcancel.drag",D).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(k,B){if(!(c||!e.call(this,k,B))){var U=m(this,t.call(this,k,B),k,B,"mouse");U&&(Be(k.view).on("mousemove.drag",b,ln).on("mouseup.drag",_,ln),fs(k.view),Do(k),u=!1,a=k.clientX,l=k.clientY,U("start",k))}}function b(k){if(Ot(k),!u){var B=k.clientX-a,U=k.clientY-l;u=B*B+U*U>d}i.mouse("drag",k)}function _(k){Be(k.view).on("mousemove.drag mouseup.drag",null),hs(k.view,u),Ot(k),i.mouse("end",k)}function E(k,B){if(e.call(this,k,B)){var U=k.changedTouches,L=t.call(this,k,B),X=U.length,ee,F;for(ee=0;ee<X;++ee)(F=m(this,L,k,B,U[ee].identifier,U[ee]))&&(Do(k),F("start",k,U[ee]))}}function $(k){var B=k.changedTouches,U=B.length,L,X;for(L=0;L<U;++L)(X=i[B[L].identifier])&&(Ot(k),X("drag",k,B[L]))}function D(k){var B=k.changedTouches,U=B.length,L,X;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),L=0;L<U;++L)(X=i[B[L].identifier])&&(Do(k),X("end",k,B[L]))}function m(k,B,U,L,X,ee){var F=r.copy(),G=Ge(ee||U,B),M,te,f;if((f=n.call(k,new qo("beforestart",{sourceEvent:U,target:h,identifier:X,active:s,x:G[0],y:G[1],dx:0,dy:0,dispatch:F}),L))!=null)return M=f.x-G[0]||0,te=f.y-G[1]||0,function N(p,I,S){var z=G,w;switch(p){case"start":i[X]=N,w=s++;break;case"end":delete i[X],--s;case"drag":G=Ge(S||I,B),w=s;break}F.call(p,k,new qo(p,{sourceEvent:I,subject:f,target:h,identifier:X,active:w,x:G[0]+M,y:G[1]+te,dx:G[0]-z[0],dy:G[1]-z[1],dispatch:F}),L)}}return h.filter=function(k){return arguments.length?(e=typeof k=="function"?k:Cn(!!k),h):e},h.container=function(k){return arguments.length?(t=typeof k=="function"?k:Cn(k),h):t},h.subject=function(k){return arguments.length?(n=typeof k=="function"?k:Cn(k),h):n},h.touchable=function(k){return arguments.length?(o=typeof k=="function"?k:Cn(!!k),h):o},h.on=function(){var k=r.on.apply(r,arguments);return k===r?h:k},h.clickDistance=function(k){return arguments.length?(d=(k=+k)*k,h):Math.sqrt(d)},h}function _i(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function gs(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function xn(){}var un=.7,no=1/un,Bt="\\s*([+-]?\\d+)\\s*",cn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ke="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qu=/^#([0-9a-f]{3,8})$/,ju=new RegExp(`^rgb\\(${Bt},${Bt},${Bt}\\)$`),ec=new RegExp(`^rgb\\(${Ke},${Ke},${Ke}\\)$`),tc=new RegExp(`^rgba\\(${Bt},${Bt},${Bt},${cn}\\)$`),nc=new RegExp(`^rgba\\(${Ke},${Ke},${Ke},${cn}\\)$`),oc=new RegExp(`^hsl\\(${cn},${Ke},${Ke}\\)$`),ic=new RegExp(`^hsla\\(${cn},${Ke},${Ke},${cn}\\)$`),Fi={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};_i(xn,Ct,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Yi,formatHex:Yi,formatHex8:rc,formatHsl:sc,formatRgb:Xi,toString:Xi});function Yi(){return this.rgb().formatHex()}function rc(){return this.rgb().formatHex8()}function sc(){return ps(this).formatHsl()}function Xi(){return this.rgb().formatRgb()}function Ct(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Qu.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Gi(t):n===3?new Ae(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?kn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?kn(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=ju.exec(e))?new Ae(t[1],t[2],t[3],1):(t=ec.exec(e))?new Ae(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=tc.exec(e))?kn(t[1],t[2],t[3],t[4]):(t=nc.exec(e))?kn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=oc.exec(e))?Zi(t[1],t[2]/100,t[3]/100,1):(t=ic.exec(e))?Zi(t[1],t[2]/100,t[3]/100,t[4]):Fi.hasOwnProperty(e)?Gi(Fi[e]):e==="transparent"?new Ae(NaN,NaN,NaN,0):null}function Gi(e){return new Ae(e>>16&255,e>>8&255,e&255,1)}function kn(e,t,n,o){return o<=0&&(e=t=n=NaN),new Ae(e,t,n,o)}function ac(e){return e instanceof xn||(e=Ct(e)),e?(e=e.rgb(),new Ae(e.r,e.g,e.b,e.opacity)):new Ae}function Ko(e,t,n,o){return arguments.length===1?ac(e):new Ae(e,t,n,o??1)}function Ae(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}_i(Ae,Ko,gs(xn,{brighter(e){return e=e==null?no:Math.pow(no,e),new Ae(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?un:Math.pow(un,e),new Ae(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ae(Et(this.r),Et(this.g),Et(this.b),oo(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:Ui,formatHex:Ui,formatHex8:lc,formatRgb:Wi,toString:Wi}));function Ui(){return`#${bt(this.r)}${bt(this.g)}${bt(this.b)}`}function lc(){return`#${bt(this.r)}${bt(this.g)}${bt(this.b)}${bt((isNaN(this.opacity)?1:this.opacity)*255)}`}function Wi(){const e=oo(this.opacity);return`${e===1?"rgb(":"rgba("}${Et(this.r)}, ${Et(this.g)}, ${Et(this.b)}${e===1?")":`, ${e})`}`}function oo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Et(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function bt(e){return e=Et(e),(e<16?"0":"")+e.toString(16)}function Zi(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Re(e,t,n,o)}function ps(e){if(e instanceof Re)return new Re(e.h,e.s,e.l,e.opacity);if(e instanceof xn||(e=Ct(e)),!e)return new Re;if(e instanceof Re)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),r=Math.max(t,n,o),s=NaN,a=r-i,l=(r+i)/2;return a?(t===r?s=(n-o)/a+(n<o)*6:n===r?s=(o-t)/a+2:s=(t-n)/a+4,a/=l<.5?r+i:2-r-i,s*=60):a=l>0&&l<1?0:s,new Re(s,a,l,e.opacity)}function uc(e,t,n,o){return arguments.length===1?ps(e):new Re(e,t,n,o??1)}function Re(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}_i(Re,uc,gs(xn,{brighter(e){return e=e==null?no:Math.pow(no,e),new Re(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?un:Math.pow(un,e),new Re(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,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new Ae(zo(e>=240?e-240:e+120,i,o),zo(e,i,o),zo(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new Re(qi(this.h),In(this.s),In(this.l),oo(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=oo(this.opacity);return`${e===1?"hsl(":"hsla("}${qi(this.h)}, ${In(this.s)*100}%, ${In(this.l)*100}%${e===1?")":`, ${e})`}`}}));function qi(e){return e=(e||0)%360,e<0?e+360:e}function In(e){return Math.max(0,Math.min(1,e||0))}function zo(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 $i=e=>()=>e;function cc(e,t){return function(n){return e+n*t}}function dc(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function fc(e){return(e=+e)==1?vs:function(t,n){return n-t?dc(t,n,e):$i(isNaN(t)?n:t)}}function vs(e,t){var n=t-e;return n?cc(e,n):$i(isNaN(e)?t:e)}const io=(function e(t){var n=fc(t);function o(i,r){var s=n((i=Ko(i)).r,(r=Ko(r)).r),a=n(i.g,r.g),l=n(i.b,r.b),u=vs(i.opacity,r.opacity);return function(c){return i.r=s(c),i.g=a(c),i.b=l(c),i.opacity=u(c),i+""}}return o.gamma=e,o})(1);function hc(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),i;return function(r){for(i=0;i<n;++i)o[i]=e[i]*(1-r)+t[i]*r;return o}}function gc(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function pc(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,i=new Array(o),r=new Array(n),s;for(s=0;s<o;++s)i[s]=on(e[s],t[s]);for(;s<n;++s)r[s]=t[s];return function(a){for(s=0;s<o;++s)r[s]=i[s](a);return r}}function vc(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function Ue(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function mc(e,t){var n={},o={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=on(e[i],t[i]):o[i]=t[i];return function(r){for(i in n)o[i]=n[i](r);return o}}var Jo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Po=new RegExp(Jo.source,"g");function yc(e){return function(){return e}}function wc(e){return function(t){return e(t)+""}}function ms(e,t){var n=Jo.lastIndex=Po.lastIndex=0,o,i,r,s=-1,a=[],l=[];for(e=e+"",t=t+"";(o=Jo.exec(e))&&(i=Po.exec(t));)(r=i.index)>n&&(r=t.slice(n,r),a[s]?a[s]+=r:a[++s]=r),(o=o[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:Ue(o,i)})),n=Po.lastIndex;return n<t.length&&(r=t.slice(n),a[s]?a[s]+=r:a[++s]=r),a.length<2?l[0]?wc(l[0].x):yc(t):(t=l.length,function(u){for(var c=0,d;c<t;++c)a[(d=l[c]).i]=d.x(u);return a.join("")})}function on(e,t){var n=typeof t,o;return t==null||n==="boolean"?$i(t):(n==="number"?Ue:n==="string"?(o=Ct(t))?(t=o,io):ms:t instanceof Ct?io:t instanceof Date?vc:gc(t)?hc:Array.isArray(t)?pc:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?mc:Ue)(e,t)}var Ki=180/Math.PI,Qo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ys(e,t,n,o,i,r){var s,a,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*o)&&(n-=e*l,o-=t*l),(a=Math.sqrt(n*n+o*o))&&(n/=a,o/=a,l/=a),e*o<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:i,translateY:r,rotate:Math.atan2(t,e)*Ki,skewX:Math.atan(l)*Ki,scaleX:s,scaleY:a}}var Tn;function _c(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Qo:ys(t.a,t.b,t.c,t.d,t.e,t.f)}function $c(e){return e==null||(Tn||(Tn=document.createElementNS("http://www.w3.org/2000/svg","g")),Tn.setAttribute("transform",e),!(e=Tn.transform.baseVal.consolidate()))?Qo:(e=e.matrix,ys(e.a,e.b,e.c,e.d,e.e,e.f))}function ws(e,t,n,o){function i(u){return u.length?u.pop()+" ":""}function r(u,c,d,h,g,b){if(u!==d||c!==h){var _=g.push("translate(",null,t,null,n);b.push({i:_-4,x:Ue(u,d)},{i:_-2,x:Ue(c,h)})}else(d||h)&&g.push("translate("+d+t+h+n)}function s(u,c,d,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:d.push(i(d)+"rotate(",null,o)-2,x:Ue(u,c)})):c&&d.push(i(d)+"rotate("+c+o)}function a(u,c,d,h){u!==c?h.push({i:d.push(i(d)+"skewX(",null,o)-2,x:Ue(u,c)}):c&&d.push(i(d)+"skewX("+c+o)}function l(u,c,d,h,g,b){if(u!==d||c!==h){var _=g.push(i(g)+"scale(",null,",",null,")");b.push({i:_-4,x:Ue(u,d)},{i:_-2,x:Ue(c,h)})}else(d!==1||h!==1)&&g.push(i(g)+"scale("+d+","+h+")")}return function(u,c){var d=[],h=[];return u=e(u),c=e(c),r(u.translateX,u.translateY,c.translateX,c.translateY,d,h),s(u.rotate,c.rotate,d,h),a(u.skewX,c.skewX,d,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,h),u=c=null,function(g){for(var b=-1,_=h.length,E;++b<_;)d[(E=h[b]).i]=E.x(g);return d.join("")}}}var bc=ws(_c,"px, ","px)","deg)"),xc=ws($c,", ",")",")"),Ec=1e-12;function Ji(e){return((e=Math.exp(e))+1/e)/2}function Sc(e){return((e=Math.exp(e))-1/e)/2}function Nc(e){return((e=Math.exp(2*e))-1)/(e+1)}const Un=(function e(t,n,o){function i(r,s){var a=r[0],l=r[1],u=r[2],c=s[0],d=s[1],h=s[2],g=c-a,b=d-l,_=g*g+b*b,E,$;if(_<Ec)$=Math.log(h/u)/t,E=function(L){return[a+L*g,l+L*b,u*Math.exp(t*L*$)]};else{var D=Math.sqrt(_),m=(h*h-u*u+o*_)/(2*u*n*D),k=(h*h-u*u-o*_)/(2*h*n*D),B=Math.log(Math.sqrt(m*m+1)-m),U=Math.log(Math.sqrt(k*k+1)-k);$=(U-B)/t,E=function(L){var X=L*$,ee=Ji(B),F=u/(n*D)*(ee*Nc(t*X+B)-Sc(B));return[a+F*g,l+F*b,u*ee/Ji(t*X+B)]}}return E.duration=$*1e3*t/Math.SQRT2,E}return i.rho=function(r){var s=Math.max(.001,+r),a=s*s,l=a*a;return e(s,a,l)},i})(Math.SQRT2,2,4);var Lt=0,Qt=0,Wt=0,_s=1e3,ro,jt,so=0,kt=0,_o=0,dn=typeof performance=="object"&&performance.now?performance:Date,$s=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function bi(){return kt||($s(Mc),kt=dn.now()+_o)}function Mc(){kt=0}function ao(){this._call=this._time=this._next=null}ao.prototype=bs.prototype={constructor:ao,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?bi():+n)+(t==null?0:+t),!this._next&&jt!==this&&(jt?jt._next=this:ro=this,jt=this),this._call=e,this._time=n,jo()},stop:function(){this._call&&(this._call=null,this._time=1/0,jo())}};function bs(e,t,n){var o=new ao;return o.restart(e,t,n),o}function Cc(){bi(),++Lt;for(var e=ro,t;e;)(t=kt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Lt}function Qi(){kt=(so=dn.now())+_o,Lt=Qt=0;try{Cc()}finally{Lt=0,Ic(),kt=0}}function kc(){var e=dn.now(),t=e-so;t>_s&&(_o-=t,so=e)}function Ic(){for(var e,t=ro,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ro=n);jt=e,jo(o)}function jo(e){if(!Lt){Qt&&(Qt=clearTimeout(Qt));var t=e-kt;t>24?(e<1/0&&(Qt=setTimeout(Qi,e-dn.now()-_o)),Wt&&(Wt=clearInterval(Wt))):(Wt||(so=dn.now(),Wt=setInterval(kc,_s)),Lt=1,$s(Qi))}}function ji(e,t,n){var o=new ao;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var Tc=yo("start","end","cancel","interrupt"),Ac=[],xs=0,er=1,ei=2,Wn=3,tr=4,ti=5,Zn=6;function $o(e,t,n,o,i,r){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;Dc(e,n,{name:t,index:o,group:i,on:Tc,tween:Ac,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:xs})}function xi(e,t){var n=Fe(e,t);if(n.state>xs)throw new Error("too late; already scheduled");return n}function Qe(e,t){var n=Fe(e,t);if(n.state>Wn)throw new Error("too late; already running");return n}function Fe(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Dc(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=bs(r,0,n.time);function r(u){n.state=er,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,d,h,g;if(n.state!==er)return l();for(c in o)if(g=o[c],g.name===n.name){if(g.state===Wn)return ji(s);g.state===tr?(g.state=Zn,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete o[c]):+c<t&&(g.state=Zn,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete o[c])}if(ji(function(){n.state===Wn&&(n.state=tr,n.timer.restart(a,n.delay,n.time),a(u))}),n.state=ei,n.on.call("start",e,e.__data__,n.index,n.group),n.state===ei){for(n.state=Wn,i=new Array(h=n.tween.length),c=0,d=-1;c<h;++c)(g=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=g);i.length=d+1}}function a(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=ti,1),d=-1,h=i.length;++d<h;)i[d].call(e,c);n.state===ti&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Zn,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function qn(e,t){var n=e.__transition,o,i,r=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((o=n[s]).name!==t){r=!1;continue}i=o.state>ei&&o.state<ti,o.state=Zn,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[s]}r&&delete e.__transition}}function zc(e){return this.each(function(){qn(this,e)})}function Pc(e,t){var n,o;return function(){var i=Qe(this,e),r=i.tween;if(r!==n){o=n=r;for(var s=0,a=o.length;s<a;++s)if(o[s].name===t){o=o.slice(),o.splice(s,1);break}}i.tween=o}}function Oc(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var r=Qe(this,e),s=r.tween;if(s!==o){i=(o=s).slice();for(var a={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=a;break}l===u&&i.push(a)}r.tween=i}}function Bc(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=Fe(this.node(),n).tween,i=0,r=o.length,s;i<r;++i)if((s=o[i]).name===e)return s.value;return null}return this.each((t==null?Pc:Oc)(n,e,t))}function Ei(e,t,n){var o=e._id;return e.each(function(){var i=Qe(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Fe(i,o).value[t]}}function Es(e,t){var n;return(typeof t=="number"?Ue:t instanceof Ct?io:(n=Ct(t))?(t=n,io):ms)(e,t)}function Rc(e){return function(){this.removeAttribute(e)}}function Vc(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Hc(e,t,n){var o,i=n+"",r;return function(){var s=this.getAttribute(e);return s===i?null:s===o?r:r=t(o=s,n)}}function Lc(e,t,n){var o,i=n+"",r;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===o?r:r=t(o=s,n)}}function Fc(e,t,n){var o,i,r;return function(){var s,a=n(this),l;return a==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=a+"",s===l?null:s===o&&l===i?r:(i=l,r=t(o=s,a)))}}function Yc(e,t,n){var o,i,r;return function(){var s,a=n(this),l;return a==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=a+"",s===l?null:s===o&&l===i?r:(i=l,r=t(o=s,a)))}}function Xc(e,t){var n=wo(e),o=n==="transform"?xc:Es;return this.attrTween(e,typeof t=="function"?(n.local?Yc:Fc)(n,o,Ei(this,"attr."+e,t)):t==null?(n.local?Vc:Rc)(n):(n.local?Lc:Hc)(n,o,t))}function Gc(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Uc(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Wc(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&Uc(e,r)),n}return i._value=t,i}function Zc(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&Gc(e,r)),n}return i._value=t,i}function qc(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 o=wo(e);return this.tween(n,(o.local?Wc:Zc)(o,t))}function Kc(e,t){return function(){xi(this,e).delay=+t.apply(this,arguments)}}function Jc(e,t){return t=+t,function(){xi(this,e).delay=t}}function Qc(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Kc:Jc)(t,e)):Fe(this.node(),t).delay}function jc(e,t){return function(){Qe(this,e).duration=+t.apply(this,arguments)}}function ed(e,t){return t=+t,function(){Qe(this,e).duration=t}}function td(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?jc:ed)(t,e)):Fe(this.node(),t).duration}function nd(e,t){if(typeof t!="function")throw new Error;return function(){Qe(this,e).ease=t}}function od(e){var t=this._id;return arguments.length?this.each(nd(t,e)):Fe(this.node(),t).ease}function id(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Qe(this,e).ease=n}}function rd(e){if(typeof e!="function")throw new Error;return this.each(id(this._id,e))}function sd(e){typeof e!="function"&&(e=ns(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,a=o[i]=[],l,u=0;u<s;++u)(l=r[u])&&e.call(l,l.__data__,u,r)&&a.push(l);return new rt(o,this._parents,this._name,this._id)}function ad(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,r=Math.min(o,i),s=new Array(o),a=0;a<r;++a)for(var l=t[a],u=n[a],c=l.length,d=s[a]=new Array(c),h,g=0;g<c;++g)(h=l[g]||u[g])&&(d[g]=h);for(;a<o;++a)s[a]=t[a];return new rt(s,this._parents,this._name,this._id)}function ld(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 ud(e,t,n){var o,i,r=ld(t)?xi:Qe;return function(){var s=r(this,e),a=s.on;a!==o&&(i=(o=a).copy()).on(t,n),s.on=i}}function cd(e,t){var n=this._id;return arguments.length<2?Fe(this.node(),n).on.on(e):this.each(ud(n,e,t))}function dd(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function fd(){return this.on("end.remove",dd(this._id))}function hd(e){var t=this._name,n=this._id;typeof e!="function"&&(e=yi(e));for(var o=this._groups,i=o.length,r=new Array(i),s=0;s<i;++s)for(var a=o[s],l=a.length,u=r[s]=new Array(l),c,d,h=0;h<l;++h)(c=a[h])&&(d=e.call(c,c.__data__,h,a))&&("__data__"in c&&(d.__data__=c.__data__),u[h]=d,$o(u[h],t,n,h,u,Fe(c,n)));return new rt(r,this._parents,t,n)}function gd(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ts(e));for(var o=this._groups,i=o.length,r=[],s=[],a=0;a<i;++a)for(var l=o[a],u=l.length,c,d=0;d<u;++d)if(c=l[d]){for(var h=e.call(c,c.__data__,d,l),g,b=Fe(c,n),_=0,E=h.length;_<E;++_)(g=h[_])&&$o(g,t,n,_,h,b);r.push(h),s.push(c)}return new rt(r,s,t,n)}var pd=bn.prototype.constructor;function vd(){return new pd(this._groups,this._parents)}function md(e,t){var n,o,i;return function(){var r=Ht(this,e),s=(this.style.removeProperty(e),Ht(this,e));return r===s?null:r===n&&s===o?i:i=t(n=r,o=s)}}function Ss(e){return function(){this.style.removeProperty(e)}}function yd(e,t,n){var o,i=n+"",r;return function(){var s=Ht(this,e);return s===i?null:s===o?r:r=t(o=s,n)}}function wd(e,t,n){var o,i,r;return function(){var s=Ht(this,e),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(e),Ht(this,e))),s===l?null:s===o&&l===i?r:(i=l,r=t(o=s,a))}}function _d(e,t){var n,o,i,r="style."+t,s="end."+r,a;return function(){var l=Qe(this,e),u=l.on,c=l.value[r]==null?a||(a=Ss(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(s,i=c),l.on=o}}function $d(e,t,n){var o=(e+="")=="transform"?bc:Es;return t==null?this.styleTween(e,md(e,o)).on("end.style."+e,Ss(e)):typeof t=="function"?this.styleTween(e,wd(e,o,Ei(this,"style."+e,t))).each(_d(this._id,e)):this.styleTween(e,yd(e,o,t),n).on("end.style."+e,null)}function bd(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function xd(e,t,n){var o,i;function r(){var s=t.apply(this,arguments);return s!==i&&(o=(i=s)&&bd(e,s,n)),o}return r._value=t,r}function Ed(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,xd(e,t,n??""))}function Sd(e){return function(){this.textContent=e}}function Nd(e){return function(){var t=e(this);this.textContent=t??""}}function Md(e){return this.tween("text",typeof e=="function"?Nd(Ei(this,"text",e)):Sd(e==null?"":e+""))}function Cd(e){return function(t){this.textContent=e.call(this,t)}}function kd(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&Cd(i)),t}return o._value=e,o}function Id(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,kd(e))}function Td(){for(var e=this._name,t=this._id,n=Ns(),o=this._groups,i=o.length,r=0;r<i;++r)for(var s=o[r],a=s.length,l,u=0;u<a;++u)if(l=s[u]){var c=Fe(l,t);$o(l,e,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new rt(o,this._parents,e,n)}function Ad(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(r,s){var a={value:s},l={value:function(){--i===0&&r()}};n.each(function(){var u=Qe(this,o),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),u.on=t}),i===0&&r()})}var Dd=0;function rt(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function Ns(){return++Dd}var et=bn.prototype;rt.prototype={constructor:rt,select:hd,selectAll:gd,selectChild:et.selectChild,selectChildren:et.selectChildren,filter:sd,merge:ad,selection:vd,transition:Td,call:et.call,nodes:et.nodes,node:et.node,size:et.size,empty:et.empty,each:et.each,on:cd,attr:Xc,attrTween:qc,style:$d,styleTween:Ed,text:Md,textTween:Id,remove:fd,tween:Bc,delay:Qc,duration:td,ease:od,easeVarying:rd,end:Ad,[Symbol.iterator]:et[Symbol.iterator]};function zd(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Pd={time:null,delay:0,duration:250,ease:zd};function Od(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 Bd(e){var t,n;e instanceof rt?(t=e._id,e=e._name):(t=Ns(),(n=Pd).time=bi(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,r=0;r<i;++r)for(var s=o[r],a=s.length,l,u=0;u<a;++u)(l=s[u])&&$o(l,e,t,u,s,n||Od(l,t));return new rt(o,this._parents,e,t)}bn.prototype.interrupt=zc;bn.prototype.transition=Bd;const An=e=>()=>e;function Rd(e,{sourceEvent:t,target:n,transform:o,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:o,enumerable:!0,configurable:!0},_:{value:i}})}function ot(e,t,n){this.k=e,this.x=t,this.y=n}ot.prototype={constructor:ot,scale:function(e){return e===1?this:new ot(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ot(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 Ft=new ot(1,0,0);ot.prototype;function Oo(e){e.stopImmediatePropagation()}function Zt(e){e.preventDefault(),e.stopImmediatePropagation()}function Vd(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Hd(){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 nr(){return this.__zoom||Ft}function Ld(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Fd(){return navigator.maxTouchPoints||"ontouchstart"in this}function Yd(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s))}function Xd(){var e=Vd,t=Hd,n=Yd,o=Ld,i=Fd,r=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,l=Un,u=yo("start","zoom","end"),c,d,h,g=500,b=150,_=0,E=10;function $(f){f.property("__zoom",nr).on("wheel.zoom",X,{passive:!1}).on("mousedown.zoom",ee).on("dblclick.zoom",F).filter(i).on("touchstart.zoom",G).on("touchmove.zoom",M).on("touchend.zoom touchcancel.zoom",te).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}$.transform=function(f,N,p,I){var S=f.selection?f.selection():f;S.property("__zoom",nr),f!==S?B(f,N,p,I):S.interrupt().each(function(){U(this,arguments).event(I).start().zoom(null,typeof N=="function"?N.apply(this,arguments):N).end()})},$.scaleBy=function(f,N,p,I){$.scaleTo(f,function(){var S=this.__zoom.k,z=typeof N=="function"?N.apply(this,arguments):N;return S*z},p,I)},$.scaleTo=function(f,N,p,I){$.transform(f,function(){var S=t.apply(this,arguments),z=this.__zoom,w=p==null?k(S):typeof p=="function"?p.apply(this,arguments):p,T=z.invert(w),R=typeof N=="function"?N.apply(this,arguments):N;return n(m(D(z,R),w,T),S,s)},p,I)},$.translateBy=function(f,N,p,I){$.transform(f,function(){return n(this.__zoom.translate(typeof N=="function"?N.apply(this,arguments):N,typeof p=="function"?p.apply(this,arguments):p),t.apply(this,arguments),s)},null,I)},$.translateTo=function(f,N,p,I,S){$.transform(f,function(){var z=t.apply(this,arguments),w=this.__zoom,T=I==null?k(z):typeof I=="function"?I.apply(this,arguments):I;return n(Ft.translate(T[0],T[1]).scale(w.k).translate(typeof N=="function"?-N.apply(this,arguments):-N,typeof p=="function"?-p.apply(this,arguments):-p),z,s)},I,S)};function D(f,N){return N=Math.max(r[0],Math.min(r[1],N)),N===f.k?f:new ot(N,f.x,f.y)}function m(f,N,p){var I=N[0]-p[0]*f.k,S=N[1]-p[1]*f.k;return I===f.x&&S===f.y?f:new ot(f.k,I,S)}function k(f){return[(+f[0][0]+ +f[1][0])/2,(+f[0][1]+ +f[1][1])/2]}function B(f,N,p,I){f.on("start.zoom",function(){U(this,arguments).event(I).start()}).on("interrupt.zoom end.zoom",function(){U(this,arguments).event(I).end()}).tween("zoom",function(){var S=this,z=arguments,w=U(S,z).event(I),T=t.apply(S,z),R=p==null?k(T):typeof p=="function"?p.apply(S,z):p,Z=Math.max(T[1][0]-T[0][0],T[1][1]-T[0][1]),Y=S.__zoom,O=typeof N=="function"?N.apply(S,z):N,V=l(Y.invert(R).concat(Z/Y.k),O.invert(R).concat(Z/O.k));return function(W){if(W===1)W=O;else{var H=V(W),de=Z/H[2];W=new ot(de,R[0]-H[0]*de,R[1]-H[1]*de)}w.zoom(null,W)}})}function U(f,N,p){return!p&&f.__zooming||new L(f,N)}function L(f,N){this.that=f,this.args=N,this.active=0,this.sourceEvent=null,this.extent=t.apply(f,N),this.taps=0}L.prototype={event:function(f){return f&&(this.sourceEvent=f),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(f,N){return this.mouse&&f!=="mouse"&&(this.mouse[1]=N.invert(this.mouse[0])),this.touch0&&f!=="touch"&&(this.touch0[1]=N.invert(this.touch0[0])),this.touch1&&f!=="touch"&&(this.touch1[1]=N.invert(this.touch1[0])),this.that.__zoom=N,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(f){var N=Be(this.that).datum();u.call(f,this.that,new Rd(f,{sourceEvent:this.sourceEvent,target:$,transform:this.that.__zoom,dispatch:u}),N)}};function X(f,...N){if(!e.apply(this,arguments))return;var p=U(this,N).event(f),I=this.__zoom,S=Math.max(r[0],Math.min(r[1],I.k*Math.pow(2,o.apply(this,arguments)))),z=Ge(f);if(p.wheel)(p.mouse[0][0]!==z[0]||p.mouse[0][1]!==z[1])&&(p.mouse[1]=I.invert(p.mouse[0]=z)),clearTimeout(p.wheel);else{if(I.k===S)return;p.mouse=[z,I.invert(z)],qn(this),p.start()}Zt(f),p.wheel=setTimeout(w,b),p.zoom("mouse",n(m(D(I,S),p.mouse[0],p.mouse[1]),p.extent,s));function w(){p.wheel=null,p.end()}}function ee(f,...N){if(h||!e.apply(this,arguments))return;var p=f.currentTarget,I=U(this,N,!0).event(f),S=Be(f.view).on("mousemove.zoom",R,!0).on("mouseup.zoom",Z,!0),z=Ge(f,p),w=f.clientX,T=f.clientY;fs(f.view),Oo(f),I.mouse=[z,this.__zoom.invert(z)],qn(this),I.start();function R(Y){if(Zt(Y),!I.moved){var O=Y.clientX-w,V=Y.clientY-T;I.moved=O*O+V*V>_}I.event(Y).zoom("mouse",n(m(I.that.__zoom,I.mouse[0]=Ge(Y,p),I.mouse[1]),I.extent,s))}function Z(Y){S.on("mousemove.zoom mouseup.zoom",null),hs(Y.view,I.moved),Zt(Y),I.event(Y).end()}}function F(f,...N){if(e.apply(this,arguments)){var p=this.__zoom,I=Ge(f.changedTouches?f.changedTouches[0]:f,this),S=p.invert(I),z=p.k*(f.shiftKey?.5:2),w=n(m(D(p,z),I,S),t.apply(this,N),s);Zt(f),a>0?Be(this).transition().duration(a).call(B,w,I,f):Be(this).call($.transform,w,I,f)}}function G(f,...N){if(e.apply(this,arguments)){var p=f.touches,I=p.length,S=U(this,N,f.changedTouches.length===I).event(f),z,w,T,R;for(Oo(f),w=0;w<I;++w)T=p[w],R=Ge(T,this),R=[R,this.__zoom.invert(R),T.identifier],S.touch0?!S.touch1&&S.touch0[2]!==R[2]&&(S.touch1=R,S.taps=0):(S.touch0=R,z=!0,S.taps=1+!!c);c&&(c=clearTimeout(c)),z&&(S.taps<2&&(d=R[0],c=setTimeout(function(){c=null},g)),qn(this),S.start())}}function M(f,...N){if(this.__zooming){var p=U(this,N).event(f),I=f.changedTouches,S=I.length,z,w,T,R;for(Zt(f),z=0;z<S;++z)w=I[z],T=Ge(w,this),p.touch0&&p.touch0[2]===w.identifier?p.touch0[0]=T:p.touch1&&p.touch1[2]===w.identifier&&(p.touch1[0]=T);if(w=p.that.__zoom,p.touch1){var Z=p.touch0[0],Y=p.touch0[1],O=p.touch1[0],V=p.touch1[1],W=(W=O[0]-Z[0])*W+(W=O[1]-Z[1])*W,H=(H=V[0]-Y[0])*H+(H=V[1]-Y[1])*H;w=D(w,Math.sqrt(W/H)),T=[(Z[0]+O[0])/2,(Z[1]+O[1])/2],R=[(Y[0]+V[0])/2,(Y[1]+V[1])/2]}else if(p.touch0)T=p.touch0[0],R=p.touch0[1];else return;p.zoom("touch",n(m(w,T,R),p.extent,s))}}function te(f,...N){if(this.__zooming){var p=U(this,N).event(f),I=f.changedTouches,S=I.length,z,w;for(Oo(f),h&&clearTimeout(h),h=setTimeout(function(){h=null},g),z=0;z<S;++z)w=I[z],p.touch0&&p.touch0[2]===w.identifier?delete p.touch0:p.touch1&&p.touch1[2]===w.identifier&&delete p.touch1;if(p.touch1&&!p.touch0&&(p.touch0=p.touch1,delete p.touch1),p.touch0)p.touch0[1]=this.__zoom.invert(p.touch0[0]);else if(p.end(),p.taps===2&&(w=Ge(w,this),Math.hypot(d[0]-w[0],d[1]-w[1])<E)){var T=Be(this).on("dblclick.zoom");T&&T.apply(this,arguments)}}}return $.wheelDelta=function(f){return arguments.length?(o=typeof f=="function"?f:An(+f),$):o},$.filter=function(f){return arguments.length?(e=typeof f=="function"?f:An(!!f),$):e},$.touchable=function(f){return arguments.length?(i=typeof f=="function"?f:An(!!f),$):i},$.extent=function(f){return arguments.length?(t=typeof f=="function"?f:An([[+f[0][0],+f[0][1]],[+f[1][0],+f[1][1]]]),$):t},$.scaleExtent=function(f){return arguments.length?(r[0]=+f[0],r[1]=+f[1],$):[r[0],r[1]]},$.translateExtent=function(f){return arguments.length?(s[0][0]=+f[0][0],s[1][0]=+f[1][0],s[0][1]=+f[0][1],s[1][1]=+f[1][1],$):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},$.constrain=function(f){return arguments.length?(n=f,$):n},$.duration=function(f){return arguments.length?(a=+f,$):a},$.interpolate=function(f){return arguments.length?(l=f,$):l},$.on=function(){var f=u.on.apply(u,arguments);return f===u?$:f},$.clickDistance=function(f){return arguments.length?(_=(f=+f)*f,$):Math.sqrt(_)},$.tapDistance=function(f){return arguments.length?(E=+f,$):E},$}var j=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(j||{}),Si=(e=>(e.Partial="partial",e.Full="full",e))(Si||{}),wt=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(wt||{}),pt=(e=>(e.Strict="strict",e.Loose="loose",e))(pt||{}),fn=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(fn||{}),rn=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(rn||{}),Ms=(e=>(e.TopLeft="top-left",e.TopCenter="top-center",e.TopRight="top-right",e.BottomLeft="bottom-left",e.BottomCenter="bottom-center",e.BottomRight="bottom-right",e))(Ms||{});const Gd=["INPUT","SELECT","TEXTAREA"],Ud=typeof document<"u"?document:null;function ni(e){var t,n;const o=((n=(t=e.composedPath)==null?void 0:t.call(e))==null?void 0:n[0])||e.target,i=typeof o?.hasAttribute=="function"?o.hasAttribute("contenteditable"):!1,r=typeof o?.closest=="function"?o.closest(".nokey"):null;return Gd.includes(o?.nodeName)||i||!!r}function Wd(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function or(e,t,n,o){const i=t.replace("+",`
2
+ `).replace(`
3
+
4
+ `,`
5
+ +`).split(`
6
+ `).map(s=>s.trim().toLowerCase());if(i.length===1)return e.toLowerCase()===t.toLowerCase();o||n.add(e.toLowerCase());const r=i.every((s,a)=>n.has(s)&&Array.from(n.values())[a]===i[a]);return o&&n.delete(e.toLowerCase()),r}function Zd(e,t){return n=>{if(!n.code&&!n.key)return!1;const o=qd(n.code,e);return Array.isArray(e)?e.some(i=>or(n[o],i,t,n.type==="keyup")):or(n[o],e,t,n.type==="keyup")}}function qd(e,t){return t.includes(e)?"code":"key"}function sn(e,t){const n=re(()=>pe(t?.target)??Ud),o=gt(pe(e)===!0);let i=!1;const r=new Set;let s=l(pe(e));we(()=>pe(e),(u,c)=>{typeof c=="boolean"&&typeof u!="boolean"&&a(),s=l(u)},{immediate:!0}),jr(["blur","contextmenu"],a),Vi((...u)=>s(...u),u=>{var c,d;const h=pe(t?.actInsideInputWithModifier)??!0,g=pe(t?.preventDefault)??!1;if(i=Wd(u),(!i||i&&!h)&&ni(u))return;const _=((d=(c=u.composedPath)==null?void 0:c.call(u))==null?void 0:d[0])||u.target,E=_?.nodeName==="BUTTON"||_?.nodeName==="A";!g&&(i||!E)&&u.preventDefault(),o.value=!0},{eventName:"keydown",target:n}),Vi((...u)=>s(...u),u=>{const c=pe(t?.actInsideInputWithModifier)??!0;if(o.value){if((!i||i&&!c)&&ni(u))return;i=!1,o.value=!1}},{eventName:"keyup",target:n});function a(){i=!1,r.clear(),o.value=pe(e)===!0}function l(u){return u===null?(a(),()=>!1):typeof u=="boolean"?(a(),o.value=u,()=>!1):Array.isArray(u)||typeof u=="string"?Zd(u,r):u}return o}const Cs="vue-flow__node-desc",ks="vue-flow__edge-desc",Kd="vue-flow__aria-live",Is=["Enter"," ","Escape"],Rt={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function lo(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function uo(e,t){const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)}function bo(e){return{width:e.offsetWidth,height:e.offsetHeight}}function It(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function Ts(e,t){return{x:It(e.x,t[0][0],t[1][0]),y:It(e.y,t[0][1],t[1][1])}}function ir(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function vt(e){return e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e}function St(e){return e&&typeof e=="object"&&"id"in e&&"position"in e&&!vt(e)}function en(e){return St(e)&&"computedPosition"in e}function Dn(e){return!Number.isNaN(e)&&Number.isFinite(e)}function Jd(e){return Dn(e.width)&&Dn(e.height)&&Dn(e.x)&&Dn(e.y)}function Qd(e,t,n){const o={id:e.id.toString(),type:e.type??"default",dimensions:Yn({width:0,height:0}),computedPosition:Yn({z:0,...e.position}),handleBounds:{source:[],target:[]},draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:Ne(e.data)?e.data:{},events:Yn(Ne(e.events)?e.events:{})};return Object.assign(t??o,e,{id:e.id.toString(),parentNode:n})}function As(e,t,n){var o,i;const r={id:e.id.toString(),type:e.type??t?.type??"default",source:e.source.toString(),target:e.target.toString(),sourceHandle:(o=e.sourceHandle)==null?void 0:o.toString(),targetHandle:(i=e.targetHandle)==null?void 0:i.toString(),updatable:e.updatable??n?.updatable,selectable:e.selectable??n?.selectable,focusable:e.focusable??n?.focusable,data:Ne(e.data)?e.data:{},events:Yn(Ne(e.events)?e.events:{}),label:e.label??"",interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??r,e,{id:e.id.toString()})}function Ds(e,t,n,o){const i=typeof e=="string"?e:e.id,r=new Set,s=o==="source"?"target":"source";for(const a of n)a[s]===i&&r.add(a[o]);return t.filter(a=>r.has(a.id))}function jd(...e){if(e.length===3){const[r,s,a]=e;return Ds(r,s,a,"target")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(r=>vt(r)&&r.source===o).map(r=>n.find(s=>St(s)&&s.id===r.target))}function ef(...e){if(e.length===3){const[r,s,a]=e;return Ds(r,s,a,"source")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(r=>vt(r)&&r.target===o).map(r=>n.find(s=>St(s)&&s.id===r.source))}function zs({source:e,sourceHandle:t,target:n,targetHandle:o}){return`vueflow__edge-${e}${t??""}-${n}${o??""}`}function tf(e,t){return t.some(n=>vt(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))}function hn({x:e,y:t},{x:n,y:o,zoom:i}){return{x:e*i+n,y:t*i+o}}function gn({x:e,y:t},{x:n,y:o,zoom:i},r=!1,s=[1,1]){const a={x:(e-n)/i,y:(t-o)/i};return r?xo(a,s):a}function Ps(e,t){return{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)}}function co({x:e,y:t,width:n,height:o}){return{x:e,y:t,x2:e+n,y2:t+o}}function Os({x:e,y:t,x2:n,y2:o}){return{x:e,y:t,width:n-e,height:o-t}}function nf(e,t){return Os(Ps(co(e),co(t)))}function Ni(e){let t={x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY,x2:Number.NEGATIVE_INFINITY,y2:Number.NEGATIVE_INFINITY};for(let n=0;n<e.length;n++){const o=e[n];t=Ps(t,co({...o.computedPosition,...o.dimensions}))}return Os(t)}function Bs(e,t,n={x:0,y:0,zoom:1},o=!1,i=!1){const r={...gn(t,n),width:t.width/n.zoom,height:t.height/n.zoom},s=[];for(const a of e){const{dimensions:l,selectable:u=!0,hidden:c=!1}=a,d=l.width??a.width??null,h=l.height??a.height??null;if(i&&!u||c)continue;const g=uo(r,lo(a)),b=d===null||h===null,_=o&&g>0,E=(d??0)*(h??0);(b||_||g>=E||a.dragging)&&s.push(a)}return s}function _t(e,t){const n=new Set;if(typeof e=="string")n.add(e);else if(e.length>=1)for(const o of e)n.add(o.id);return t.filter(o=>n.has(o.source)||n.has(o.target))}function zt(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=Number.parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=Number.parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return En(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function of(e,t,n){if(typeof e=="string"||typeof e=="number"){const o=zt(e,n),i=zt(e,t);return{top:o,right:i,bottom:o,left:i,x:i*2,y:o*2}}if(typeof e=="object"){const o=zt(e.top??e.y??0,n),i=zt(e.bottom??e.y??0,n),r=zt(e.left??e.x??0,t),s=zt(e.right??e.x??0,t);return{top:o,right:s,bottom:i,left:r,x:r+s,y:o+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function rf(e,t,n,o,i,r){const{x:s,y:a}=hn(e,{x:t,y:n,zoom:o}),{x:l,y:u}=hn({x:e.x+e.width,y:e.y+e.height},{x:t,y:n,zoom:o}),c=i-l,d=r-u;return{left:Math.floor(s),top:Math.floor(a),right:Math.floor(c),bottom:Math.floor(d)}}function rr(e,t,n,o,i,r=.1){const s=of(r,t,n),a=(t-s.x)/e.width,l=(n-s.y)/e.height,u=Math.min(a,l),c=It(u,o,i),d=e.x+e.width/2,h=e.y+e.height/2,g=t/2-d*c,b=n/2-h*c,_=rf(e,g,b,c,t,n),E={left:Math.min(_.left-s.left,0),top:Math.min(_.top-s.top,0),right:Math.min(_.right-s.right,0),bottom:Math.min(_.bottom-s.bottom,0)};return{x:g-E.left+E.right,y:b-E.top+E.bottom,zoom:c}}function sf(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function Rs(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return n?n.selected?!0:Rs(n,t):!1}function pn(e,t){return typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`}function oi(e){const t=e.ctrlKey&&vn()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t}function sr(e,t,n){return e<t?It(Math.abs(e-t),1,t)/t:e>n?-It(Math.abs(e-n),1,t)/t:0}function Vs(e,t,n=15,o=40){const i=sr(e.x,o,t.width-o)*n,r=sr(e.y,o,t.height-o)*n;return[i,r]}function Bo(e,t){if(t){const n=e.position.x+e.dimensions.width-t.dimensions.width,o=e.position.y+e.dimensions.height-t.dimensions.height;if(n>0||o>0||e.position.x<0||e.position.y<0){let i={};if(typeof t.style=="function"?i={...t.style(t)}:t.style&&(i={...t.style}),i.width=i.width??`${t.dimensions.width}px`,i.height=i.height??`${t.dimensions.height}px`,n>0)if(typeof i.width=="string"){const r=Number(i.width.replace("px",""));i.width=`${r+n}px`}else i.width+=n;if(o>0)if(typeof i.height=="string"){const r=Number(i.height.replace("px",""));i.height=`${r+o}px`}else i.height+=o;if(e.position.x<0){const r=Math.abs(e.position.x);if(t.position.x=t.position.x-r,typeof i.width=="string"){const s=Number(i.width.replace("px",""));i.width=`${s+r}px`}else i.width+=r;e.position.x=0}if(e.position.y<0){const r=Math.abs(e.position.y);if(t.position.y=t.position.y-r,typeof i.height=="string"){const s=Number(i.height.replace("px",""));i.height=`${s+r}px`}else i.height+=r;e.position.y=0}t.dimensions.width=Number(i.width.toString().replace("px","")),t.dimensions.height=Number(i.height.toString().replace("px","")),typeof t.style=="function"?t.style=r=>{const s=t.style;return{...s(r),...i}}:t.style={...t.style,...i}}}}function ar(e,t){var n,o;const i=e.filter(s=>s.type==="add"||s.type==="remove");for(const s of i)if(s.type==="add")t.findIndex(l=>l.id===s.item.id)===-1&&t.push(s.item);else if(s.type==="remove"){const a=t.findIndex(l=>l.id===s.id);a!==-1&&t.splice(a,1)}const r=t.map(s=>s.id);for(const s of t)for(const a of e)if(a.id===s.id)switch(a.type){case"select":s.selected=a.selected;break;case"position":if(en(s)&&(typeof a.position<"u"&&(s.position=a.position),typeof a.dragging<"u"&&(s.dragging=a.dragging),s.expandParent&&s.parentNode)){const l=t[r.indexOf(s.parentNode)];l&&en(l)&&Bo(s,l)}break;case"dimensions":if(en(s)&&(typeof a.dimensions<"u"&&(s.dimensions=a.dimensions),typeof a.updateStyle<"u"&&a.updateStyle&&(s.style={...s.style||{},width:`${(n=a.dimensions)==null?void 0:n.width}px`,height:`${(o=a.dimensions)==null?void 0:o.height}px`}),typeof a.resizing<"u"&&(s.resizing=a.resizing),s.expandParent&&s.parentNode)){const l=t[r.indexOf(s.parentNode)];l&&en(l)&&(!!l.dimensions.width&&!!l.dimensions.height?Bo(s,l):qe(()=>{Bo(s,l)}))}break}return t}function ut(e,t){return{id:e,type:"select",selected:t}}function lr(e){return{item:e,type:"add"}}function ur(e){return{id:e,type:"remove"}}function cr(e,t,n,o,i){return{id:e,source:t,target:n,sourceHandle:o||null,targetHandle:i||null,type:"remove"}}function dt(e,t=new Set,n=!1){const o=[];for(const[i,r]of e){const s=t.has(i);!(r.selected===void 0&&!s)&&r.selected!==s&&(n&&(r.selected=s),o.push(ut(r.id,s)))}return o}const dr=()=>{};function q(e){const t=new Set;let n=dr,o=()=>!1;const i=()=>t.size>0||o(),r=h=>{n=h},s=()=>{n=dr},a=h=>{o=h},l=()=>{o=()=>!1},u=h=>{t.delete(h)};return{on:h=>{t.add(h);const g=()=>u(h);return an(g),{off:g}},off:u,trigger:h=>{const g=[n];return i()?g.push(...t):e&&g.push(e),Promise.allSettled(g.map(b=>b(h)))},hasListeners:i,listeners:t,setEmitter:r,removeEmitter:s,setHasEmitListeners:a,removeHasEmitListeners:l}}function fr(e,t,n){let o=e;do{if(o&&o.matches(t))return!0;if(o===n)return!1;o=o.parentElement}while(o);return!1}function af(e,t,n,o){var i,r;const s=new Map;for(const[a,l]of e)(l.selected||l.id===o)&&(!l.parentNode||!Rs(l,e))&&(l.draggable||t&&typeof l.draggable>"u")&&e.get(a)&&s.set(a,{id:l.id,position:l.position||{x:0,y:0},distance:{x:n.x-((i=l.computedPosition)==null?void 0:i.x)||0,y:n.y-((r=l.computedPosition)==null?void 0:r.y)||0},from:{x:l.computedPosition.x,y:l.computedPosition.y},extent:l.extent,parentNode:l.parentNode,dimensions:{...l.dimensions},expandParent:l.expandParent});return Array.from(s.values())}function Ro({id:e,dragItems:t,findNode:n}){const o=[];for(const i of t){const r=n(i.id);r&&o.push(r)}return[e?o.find(i=>i.id===e):o[0],o]}function Hs(e){if(Array.isArray(e))switch(e.length){case 1:return[e[0],e[0],e[0],e[0]];case 2:return[e[0],e[1],e[0],e[1]];case 3:return[e[0],e[1],e[2],e[1]];case 4:return e;default:return[0,0,0,0]}return[e,e,e,e]}function lf(e,t,n){const[o,i,r,s]=typeof e!="string"?Hs(e.padding):[0,0,0,0];return n&&typeof n.computedPosition.x<"u"&&typeof n.computedPosition.y<"u"&&typeof n.dimensions.width<"u"&&typeof n.dimensions.height<"u"?[[n.computedPosition.x+s,n.computedPosition.y+o],[n.computedPosition.x+n.dimensions.width-i,n.computedPosition.y+n.dimensions.height-r]]:!1}function uf(e,t,n,o){let i=e.extent||n;if((i==="parent"||!Array.isArray(i)&&i?.range==="parent")&&!e.expandParent)if(e.parentNode&&o&&e.dimensions.width&&e.dimensions.height){const r=lf(i,e,o);r&&(i=r)}else t(new ke(Ce.NODE_EXTENT_INVALID,e.id)),i=n;else if(Array.isArray(i)){const r=o?.computedPosition.x||0,s=o?.computedPosition.y||0;i=[[i[0][0]+r,i[0][1]+s],[i[1][0]+r,i[1][1]+s]]}else if(i!=="parent"&&i?.range&&Array.isArray(i.range)){const[r,s,a,l]=Hs(i.padding),u=o?.computedPosition.x||0,c=o?.computedPosition.y||0;i=[[i.range[0][0]+u+l,i.range[0][1]+c+r],[i.range[1][0]+u-s,i.range[1][1]+c-a]]}return i==="parent"?[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]]:i}function cf({width:e,height:t},n){return[n[0],[n[1][0]-(e||0),n[1][1]-(t||0)]]}function Mi(e,t,n,o,i){const r=cf(e.dimensions,uf(e,n,o,i)),s=Ts(t,r);return{position:{x:s.x-(i?.computedPosition.x||0),y:s.y-(i?.computedPosition.y||0)},computedPosition:s}}function Yt(e,t,n=j.Left,o=!1){const i=(t?.x??0)+e.computedPosition.x,r=(t?.y??0)+e.computedPosition.y,{width:s,height:a}=t??gf(e);if(o)return{x:i+s/2,y:r+a/2};switch(t?.position??n){case j.Top:return{x:i+s/2,y:r};case j.Right:return{x:i+s,y:r+a/2};case j.Bottom:return{x:i+s/2,y:r+a};case j.Left:return{x:i,y:r+a/2}}}function hr(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function df({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:o,targetWidth:i,targetHeight:r,width:s,height:a,viewport:l}){const u={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+i),y2:Math.max(e.y+o,t.y+r)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c=co({x:(0-l.x)/l.zoom,y:(0-l.y)/l.zoom,width:s/l.zoom,height:a/l.zoom}),d=Math.max(0,Math.min(c.x2,u.x2)-Math.max(c.x,u.x)),h=Math.max(0,Math.min(c.y2,u.y2)-Math.max(c.y,u.y));return Math.ceil(d*h)>0}function ff(e,t,n=!1){const o=typeof e.zIndex=="number";let i=o?e.zIndex:0;const r=t(e.source),s=t(e.target);return!r||!s?0:(n&&(i=o?e.zIndex:Math.max(r.computedPosition.z||0,s.computedPosition.z||0)),i)}var Ce=(e=>(e.MISSING_STYLES="MISSING_STYLES",e.MISSING_VIEWPORT_DIMENSIONS="MISSING_VIEWPORT_DIMENSIONS",e.NODE_INVALID="NODE_INVALID",e.NODE_NOT_FOUND="NODE_NOT_FOUND",e.NODE_MISSING_PARENT="NODE_MISSING_PARENT",e.NODE_TYPE_MISSING="NODE_TYPE_MISSING",e.NODE_EXTENT_INVALID="NODE_EXTENT_INVALID",e.EDGE_INVALID="EDGE_INVALID",e.EDGE_NOT_FOUND="EDGE_NOT_FOUND",e.EDGE_SOURCE_MISSING="EDGE_SOURCE_MISSING",e.EDGE_TARGET_MISSING="EDGE_TARGET_MISSING",e.EDGE_TYPE_MISSING="EDGE_TYPE_MISSING",e.EDGE_SOURCE_TARGET_SAME="EDGE_SOURCE_TARGET_SAME",e.EDGE_SOURCE_TARGET_MISSING="EDGE_SOURCE_TARGET_MISSING",e.EDGE_ORPHANED="EDGE_ORPHANED",e.USEVUEFLOW_OPTIONS="USEVUEFLOW_OPTIONS",e))(Ce||{});const gr={MISSING_STYLES:()=>"It seems that you haven't loaded the necessary styles. Please import '@vue-flow/core/dist/style.css' to ensure that the graph is rendered correctly",MISSING_VIEWPORT_DIMENSIONS:()=>"The Vue Flow parent container needs a width and a height to render the graph",NODE_INVALID:e=>`Node is invalid
7
+ Node: ${e}`,NODE_NOT_FOUND:e=>`Node not found
8
+ Node: ${e}`,NODE_MISSING_PARENT:(e,t)=>`Node is missing a parent
9
+ Node: ${e}
10
+ Parent: ${t}`,NODE_TYPE_MISSING:e=>`Node type is missing
11
+ Type: ${e}`,NODE_EXTENT_INVALID:e=>`Only child nodes can use a parent extent
12
+ Node: ${e}`,EDGE_INVALID:e=>`An edge needs a source and a target
13
+ Edge: ${e}`,EDGE_SOURCE_MISSING:(e,t)=>`Edge source is missing
14
+ Edge: ${e}
15
+ Source: ${t}`,EDGE_TARGET_MISSING:(e,t)=>`Edge target is missing
16
+ Edge: ${e}
17
+ Target: ${t}`,EDGE_TYPE_MISSING:e=>`Edge type is missing
18
+ Type: ${e}`,EDGE_SOURCE_TARGET_SAME:(e,t,n)=>`Edge source and target are the same
19
+ Edge: ${e}
20
+ Source: ${t}
21
+ Target: ${n}`,EDGE_SOURCE_TARGET_MISSING:(e,t,n)=>`Edge source or target is missing
22
+ Edge: ${e}
23
+ Source: ${t}
24
+ Target: ${n}`,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or target) and has been removed
25
+ Edge: ${e}`,EDGE_NOT_FOUND:e=>`Edge not found
26
+ Edge: ${e}`,USEVUEFLOW_OPTIONS:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"};class ke extends Error{constructor(t,...n){var o;super((o=gr[t])==null?void 0:o.call(gr,...n)),this.name="VueFlowError",this.code=t,this.args=n}}function Ci(e){return"clientX"in e}function hf(e){return"sourceEvent"in e}function We(e,t){const n=Ci(e);let o,i;return n?(o=e.clientX,i=e.clientY):"touches"in e&&e.touches.length>0?(o=e.touches[0].clientX,i=e.touches[0].clientY):"changedTouches"in e&&e.changedTouches.length>0?(o=e.changedTouches[0].clientX,i=e.changedTouches[0].clientY):(o=0,i=0),{x:o-(t?.left??0),y:i-(t?.top??0)}}const vn=()=>{var e;return typeof navigator<"u"&&((e=navigator?.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function gf(e){var t,n;return{width:((t=e.dimensions)==null?void 0:t.width)??e.width??0,height:((n=e.dimensions)==null?void 0:n.height)??e.height??0}}function xo(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}const pf=()=>!0;function Vo(e){e?.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function vf(e,t,n){const o=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const r of t.values())uo(i,lo(r))>0&&o.push(r);return o}const mf=250;function yf(e,t,n,o){var i,r;let s=[],a=Number.POSITIVE_INFINITY;const l=vf(e,n,t+mf);for(const u of l){const c=[...((i=u.handleBounds)==null?void 0:i.source)??[],...((r=u.handleBounds)==null?void 0:r.target)??[]];for(const d of c){if(o.nodeId===d.nodeId&&o.type===d.type&&o.id===d.id)continue;const{x:h,y:g}=Yt(u,d,d.position,!0),b=Math.sqrt((h-e.x)**2+(g-e.y)**2);b>t||(b<a?(s=[{...d,x:h,y:g}],a=b):b===a&&s.push({...d,x:h,y:g}))}}if(!s.length)return null;if(s.length>1){const u=o.type==="source"?"target":"source";return s.find(c=>c.type===u)??s[0]}return s[0]}function pr(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:i,fromType:r,doc:s,lib:a,flowId:l,isValidConnection:u=pf},c,d,h,g){const b=r==="target",_=t?s.querySelector(`.${a}-flow__handle[data-id="${l}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:E,y:$}=We(e),D=s.elementFromPoint(E,$),m=D?.classList.contains(`${a}-flow__handle`)?D:_,k={handleDomNode:m,isValid:!1,connection:null,toHandle:null};if(m){const B=Ls(void 0,m),U=m.getAttribute("data-nodeid"),L=m.getAttribute("data-handleid"),X=m.classList.contains("connectable"),ee=m.classList.contains("connectableend");if(!U||!B)return k;const F={source:b?U:o,sourceHandle:b?L:i,target:b?o:U,targetHandle:b?i:L};k.connection=F;const M=X&&ee&&(n===pt.Strict?b&&B==="source"||!b&&B==="target":U!==o||L!==i);k.isValid=M&&u(F,{nodes:d,edges:c,sourceNode:h(F.source),targetNode:h(F.target)}),k.toHandle=Fs(U,B,L,g,n,!0)}return k}function Ls(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function wf(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function _f(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function Fs(e,t,n,o,i,r=!1){var s,a,l;const u=o.get(e);if(!u)return null;const c=i===pt.Strict?(s=u.handleBounds)==null?void 0:s[t]:[...((a=u.handleBounds)==null?void 0:a.source)??[],...((l=u.handleBounds)==null?void 0:l.target)??[]],d=(n?c?.find(h=>h.id===n):c?.[0])??null;return d&&r?{...d,...Yt(u,d,d.position,!0)}:d}const ii={[j.Left]:j.Right,[j.Right]:j.Left,[j.Top]:j.Bottom,[j.Bottom]:j.Top},$f=["production","prod"];function En(e,...t){Ys()&&console.warn(`[Vue Flow]: ${e}`,...t)}function Ys(){return!$f.includes("production")}function vr(e,t,n,o,i){const r=t.querySelectorAll(`.vue-flow__handle.${e}`);return r?.length?Array.from(r).map(s=>{const a=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:i,position:s.getAttribute("data-handlepos"),x:(a.left-n.left)/o,y:(a.top-n.top)/o,...bo(s)}}):null}function ri(e,t,n,o,i,r=!1,s){i.value=!1,e.selected?(r||e.selected&&t)&&(o([e]),qe(()=>{s.blur()})):n([e])}function Ne(e){return typeof P(e)<"u"}function bf(e,t,n,o){if(!e||!e.source||!e.target)return n(new ke(Ce.EDGE_INVALID,e?.id??"[ID UNKNOWN]")),!1;let i;return vt(e)?i=e:i={...e,id:zs(e)},i=As(i,void 0,o),tf(i,t)?!1:i}function xf(e,t,n,o,i){if(!t.source||!t.target)return i(new ke(Ce.EDGE_INVALID,e.id)),!1;if(!n)return i(new ke(Ce.EDGE_NOT_FOUND,e.id)),!1;const{id:r,...s}=e;return{...s,id:o?zs(t):r,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function mr(e,t,n){const o={},i=[];for(let r=0;r<e.length;++r){const s=e[r];if(!St(s)){n(new ke(Ce.NODE_INVALID,s?.id)||`[ID UNKNOWN|INDEX ${r}]`);continue}const a=Qd(s,t(s.id),s.parentNode);s.parentNode&&(o[s.parentNode]=!0),i[r]=a}for(const r of i){const s=t(r.parentNode)||i.find(a=>a.id===r.parentNode);r.parentNode&&!s&&n(new ke(Ce.NODE_MISSING_PARENT,r.id,r.parentNode)),(r.parentNode||o[r.id])&&(o[r.id]&&(r.isParent=!0),s&&(s.isParent=!0))}return i}function yr(e,t,n,o,i,r){let s=i;const a=o.get(s)||new Map;o.set(s,a.set(n,t)),s=`${i}-${e}`;const l=o.get(s)||new Map;if(o.set(s,l.set(n,t)),r){s=`${i}-${e}-${r}`;const u=o.get(s)||new Map;o.set(s,u.set(n,t))}}function Ho(e,t,n){e.clear();for(const o of n){const{source:i,target:r,sourceHandle:s=null,targetHandle:a=null}=o,l={edgeId:o.id,source:i,target:r,sourceHandle:s,targetHandle:a},u=`${i}-${s}--${r}-${a}`,c=`${r}-${a}--${i}-${s}`;yr("source",l,c,e,i,s),yr("target",l,u,e,r,a)}}function wr(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Lo(e,t,n,o,i,r,s,a){const l=[];for(const u of e){const c=vt(u)?u:bf(u,a,i,r);if(!c)continue;const d=n(c.source),h=n(c.target);if(!d||!h){i(new ke(Ce.EDGE_SOURCE_TARGET_MISSING,c.id,c.source,c.target));continue}if(!d){i(new ke(Ce.EDGE_SOURCE_MISSING,c.id,c.source));continue}if(!h){i(new ke(Ce.EDGE_TARGET_MISSING,c.id,c.target));continue}if(t&&!t(c,{edges:a,nodes:s,sourceNode:d,targetNode:h})){i(new ke(Ce.EDGE_INVALID,c.id));continue}const g=o(c.id);l.push({...As(c,g,r),sourceNode:d,targetNode:h})}return l}const _r=Symbol("vueFlow"),Xs=Symbol("nodeId"),Gs=Symbol("nodeRef"),Ef=Symbol("edgeId"),Sf=Symbol("edgeRef"),Eo=Symbol("slots");function Us(e){const{vueFlowRef:t,snapToGrid:n,snapGrid:o,noDragClassName:i,nodeLookup:r,nodeExtent:s,nodeDragThreshold:a,viewport:l,autoPanOnNodeDrag:u,autoPanSpeed:c,nodesDraggable:d,panBy:h,findNode:g,multiSelectionActive:b,nodesSelectionActive:_,selectNodesOnDrag:E,removeSelectedElements:$,addSelectedNodes:D,updateNodePositions:m,emits:k}=$e(),{onStart:B,onDrag:U,onStop:L,onClick:X,el:ee,disabled:F,id:G,selectable:M,dragHandle:te}=e,f=gt(!1);let N=[],p,I=null,S={x:void 0,y:void 0},z={x:0,y:0},w=null,T=!1,R=!1,Z=0,Y=!1;const O=Cf(),V=({x:se,y:ue})=>{S={x:se,y:ue};let y=!1;if(N=N.map(v=>{const x={x:se-v.distance.x,y:ue-v.distance.y},{computedPosition:A}=Mi(v,n.value?xo(x,o.value):x,k.error,s.value,v.parentNode?g(v.parentNode):void 0);return y=y||v.position.x!==A.x||v.position.y!==A.y,v.position=A,v}),R=R||y,!!y&&(m(N,!0,!0),f.value=!0,w)){const[v,x]=Ro({id:G,dragItems:N,findNode:g});U({event:w,node:v,nodes:x})}},W=()=>{if(!I)return;const[se,ue]=Vs(z,I,c.value);if(se!==0||ue!==0){const y={x:(S.x??0)-se/l.value.zoom,y:(S.y??0)-ue/l.value.zoom};h({x:se,y:ue})&&V(y)}Z=requestAnimationFrame(W)},H=(se,ue)=>{T=!0;const y=g(G);!E.value&&!b.value&&y&&(y.selected||$()),y&&pe(M)&&E.value&&ri(y,b.value,D,$,_,!1,ue);const v=O(se.sourceEvent);if(S=v,N=af(r.value,d.value,v,G),N.length){const[x,A]=Ro({id:G,dragItems:N,findNode:g});B({event:se.sourceEvent,node:x,nodes:A})}},de=(se,ue)=>{var y;se.sourceEvent.type==="touchmove"&&se.sourceEvent.touches.length>1||(R=!1,a.value===0&&H(se,ue),S=O(se.sourceEvent),I=((y=t.value)==null?void 0:y.getBoundingClientRect())||null,z=We(se.sourceEvent,I))},ce=(se,ue)=>{const y=O(se.sourceEvent);if(!Y&&T&&u.value&&(Y=!0,W()),!T){const v=y.xSnapped-(S.x??0),x=y.ySnapped-(S.y??0);Math.sqrt(v*v+x*x)>a.value&&H(se,ue)}(S.x!==y.xSnapped||S.y!==y.ySnapped)&&N.length&&T&&(w=se.sourceEvent,z=We(se.sourceEvent,I),V(y))},he=se=>{let ue=!1;if(!T&&!f.value&&!b.value){const y=se.sourceEvent,v=O(y),x=v.xSnapped-(S.x??0),A=v.ySnapped-(S.y??0),C=Math.sqrt(x*x+A*A);C!==0&&C<=a.value&&(X?.(y),ue=!0)}if(N.length&&!ue){R&&(m(N,!1,!1),R=!1);const[y,v]=Ro({id:G,dragItems:N,findNode:g});L({event:se.sourceEvent,node:y,nodes:v})}N=[],f.value=!1,Y=!1,T=!1,S={x:void 0,y:void 0},cancelAnimationFrame(Z)};return we([()=>pe(F),ee],([se,ue],y,v)=>{if(ue){const x=Be(ue);se||(p=Ju().on("start",A=>de(A,ue)).on("drag",A=>ce(A,ue)).on("end",A=>he(A)).filter(A=>{const C=A.target,K=pe(te);return!A.button&&(!i.value||!fr(C,`.${i.value}`,ue)&&(!K||fr(C,K,ue)))}),x.call(p)),v(()=>{x.on(".drag",null),p&&(p.on("start",null),p.on("drag",null),p.on("end",null))})}}),f}function Nf(){return{doubleClick:q(),click:q(),mouseEnter:q(),mouseMove:q(),mouseLeave:q(),contextMenu:q(),updateStart:q(),update:q(),updateEnd:q()}}function Mf(e,t){const n=Nf();return n.doubleClick.on(o=>{var i,r;t.edgeDoubleClick(o),(r=(i=e.events)==null?void 0:i.doubleClick)==null||r.call(i,o)}),n.click.on(o=>{var i,r;t.edgeClick(o),(r=(i=e.events)==null?void 0:i.click)==null||r.call(i,o)}),n.mouseEnter.on(o=>{var i,r;t.edgeMouseEnter(o),(r=(i=e.events)==null?void 0:i.mouseEnter)==null||r.call(i,o)}),n.mouseMove.on(o=>{var i,r;t.edgeMouseMove(o),(r=(i=e.events)==null?void 0:i.mouseMove)==null||r.call(i,o)}),n.mouseLeave.on(o=>{var i,r;t.edgeMouseLeave(o),(r=(i=e.events)==null?void 0:i.mouseLeave)==null||r.call(i,o)}),n.contextMenu.on(o=>{var i,r;t.edgeContextMenu(o),(r=(i=e.events)==null?void 0:i.contextMenu)==null||r.call(i,o)}),n.updateStart.on(o=>{var i,r;t.edgeUpdateStart(o),(r=(i=e.events)==null?void 0:i.updateStart)==null||r.call(i,o)}),n.update.on(o=>{var i,r;t.edgeUpdate(o),(r=(i=e.events)==null?void 0:i.update)==null||r.call(i,o)}),n.updateEnd.on(o=>{var i,r;t.edgeUpdateEnd(o),(r=(i=e.events)==null?void 0:i.updateEnd)==null||r.call(i,o)}),Object.entries(n).reduce((o,[i,r])=>(o.emit[i]=r.trigger,o.on[i]=r.on,o),{emit:{},on:{}})}function Cf(){const{viewport:e,snapGrid:t,snapToGrid:n,vueFlowRef:o}=$e();return i=>{var r;const s=((r=o.value)==null?void 0:r.getBoundingClientRect())??{left:0,top:0},a=hf(i)?i.sourceEvent:i,{x:l,y:u}=We(a,s),c=gn({x:l,y:u},e.value),{x:d,y:h}=n.value?xo(c,t.value):c;return{xSnapped:d,ySnapped:h,...c}}}function zn(){return!0}function Ws({handleId:e,nodeId:t,type:n,isValidConnection:o,edgeUpdaterType:i,onEdgeUpdate:r,onEdgeUpdateEnd:s}){const{id:a,vueFlowRef:l,connectionMode:u,connectionRadius:c,connectOnClick:d,connectionClickStartHandle:h,nodesConnectable:g,autoPanOnConnect:b,autoPanSpeed:_,findNode:E,panBy:$,startConnection:D,updateConnection:m,endConnection:k,emits:B,viewport:U,edges:L,nodes:X,isValidConnection:ee,nodeLookup:F}=$e();let G=null,M=!1,te=null;function f(p){var I;const S=pe(n)==="target",z=Ci(p),w=ir(p.target),T=p.currentTarget;if(T&&(z&&p.button===0||!z)){let R=function(ne){y=We(ne,he),V=yf(gn(y,U.value,!1,[1,1]),c.value,F.value,A),v||(x(),v=!0);const le=pr(ne,{handle:V,connectionMode:u.value,fromNodeId:pe(t),fromHandleId:pe(e),fromType:S?"target":"source",isValidConnection:O,doc:w,lib:"vue",flowId:a,nodeLookup:F.value},L.value,X.value,E,F.value);te=le.handleDomNode,G=le.connection,M=_f(!!V,le.isValid);const ge={...ie,isValid:M,to:le.toHandle&&M?hn({x:le.toHandle.x,y:le.toHandle.y},U.value):y,toHandle:le.toHandle,toPosition:M&&le.toHandle?le.toHandle.position:ii[A.position],toNode:le.toHandle?F.value.get(le.toHandle.nodeId):null};if(M&&V&&ie?.toHandle&&ge.toHandle&&ie.toHandle.type===ge.toHandle.type&&ie.toHandle.nodeId===ge.toHandle.nodeId&&ie.toHandle.id===ge.toHandle.id&&ie.to.x===ge.to.x&&ie.to.y===ge.to.y)return;const ye=V??le.toHandle;if(m(ye&&M?hn({x:ye.x,y:ye.y},U.value):y,ye,wf(!!ye,M)),ie=ge,!V&&!M&&!te)return Vo(ue);G&&G.source!==G.target&&te&&(Vo(ue),ue=te,te.classList.add("connecting","vue-flow__handle-connecting"),te.classList.toggle("valid",!!M),te.classList.toggle("vue-flow__handle-valid",!!M))},Z=function(ne){"touches"in ne&&ne.touches.length>0||((V||te)&&G&&M&&(r?r(ne,G):B.connect(G)),B.connectEnd(ne),i&&s?.(ne),Vo(ue),cancelAnimationFrame(W),k(ne),v=!1,M=!1,G=null,te=null,w.removeEventListener("mousemove",R),w.removeEventListener("mouseup",Z),w.removeEventListener("touchmove",R),w.removeEventListener("touchend",Z))};const Y=E(pe(t));let O=pe(o)||ee.value||zn;!O&&Y&&(O=(S?Y.isValidSourcePos:Y.isValidTargetPos)||zn);let V,W=0;const{x:H,y:de}=We(p),ce=Ls(pe(i),T),he=(I=l.value)==null?void 0:I.getBoundingClientRect();if(!he||!ce)return;const se=Fs(pe(t),ce,pe(e),F.value,u.value);if(!se)return;let ue,y=We(p,he),v=!1;const x=()=>{if(!b.value)return;const[ne,le]=Vs(y,he,_.value);$({x:ne,y:le}),W=requestAnimationFrame(x)},A={...se,nodeId:pe(t),type:ce,position:se.position},C=F.value.get(pe(t)),Q={inProgress:!0,isValid:null,from:Yt(C,A,j.Left,!0),fromHandle:A,fromPosition:A.position,fromNode:C,to:y,toHandle:null,toPosition:ii[A.position],toNode:null};D({nodeId:pe(t),id:pe(e),type:ce,position:T?.getAttribute("data-handlepos")||j.Top,...y},{x:H-he.left,y:de-he.top}),B.connectStart({event:p,nodeId:pe(t),handleId:pe(e),handleType:ce});let ie=Q;w.addEventListener("mousemove",R),w.addEventListener("mouseup",Z),w.addEventListener("touchmove",R),w.addEventListener("touchend",Z)}}function N(p){var I,S;if(!d.value)return;const z=pe(n)==="target";if(!h.value){B.clickConnectStart({event:p,nodeId:pe(t),handleId:pe(e)}),D({nodeId:pe(t),type:pe(n),id:pe(e),position:j.Top,...We(p)},void 0,!0);return}let w=pe(o)||ee.value||zn;const T=E(pe(t));if(!w&&T&&(w=(z?T.isValidSourcePos:T.isValidTargetPos)||zn),T&&(typeof T.connectable>"u"?g.value:T.connectable)===!1)return;const R=ir(p.target),Z=pr(p,{handle:{nodeId:pe(t),id:pe(e),type:pe(n),position:j.Top,...We(p)},connectionMode:u.value,fromNodeId:h.value.nodeId,fromHandleId:h.value.id??null,fromType:h.value.type,isValidConnection:w,doc:R,lib:"vue",flowId:a,nodeLookup:F.value},L.value,X.value,E,F.value),Y=((I=Z.connection)==null?void 0:I.source)===((S=Z.connection)==null?void 0:S.target);Z.isValid&&Z.connection&&!Y&&B.connect(Z.connection),B.clickConnectEnd(p),k(p,!0)}return{handlePointerDown:f,handleClick:N}}function kf(){return At(Xs,"")}function Zs(e){const t=e??kf()??"",n=At(Gs,be(null)),{findNode:o,edges:i,emits:r}=$e(),s=o(t);return s||r.error(new ke(Ce.NODE_NOT_FOUND,t)),{id:t,nodeEl:n,node:s,parentNode:re(()=>o(s.parentNode)),connectedEdges:re(()=>_t([s],i.value))}}function If(){return{doubleClick:q(),click:q(),mouseEnter:q(),mouseMove:q(),mouseLeave:q(),contextMenu:q(),dragStart:q(),drag:q(),dragStop:q()}}function Tf(e,t){const n=If();return n.doubleClick.on(o=>{var i,r;t.nodeDoubleClick(o),(r=(i=e.events)==null?void 0:i.doubleClick)==null||r.call(i,o)}),n.click.on(o=>{var i,r;t.nodeClick(o),(r=(i=e.events)==null?void 0:i.click)==null||r.call(i,o)}),n.mouseEnter.on(o=>{var i,r;t.nodeMouseEnter(o),(r=(i=e.events)==null?void 0:i.mouseEnter)==null||r.call(i,o)}),n.mouseMove.on(o=>{var i,r;t.nodeMouseMove(o),(r=(i=e.events)==null?void 0:i.mouseMove)==null||r.call(i,o)}),n.mouseLeave.on(o=>{var i,r;t.nodeMouseLeave(o),(r=(i=e.events)==null?void 0:i.mouseLeave)==null||r.call(i,o)}),n.contextMenu.on(o=>{var i,r;t.nodeContextMenu(o),(r=(i=e.events)==null?void 0:i.contextMenu)==null||r.call(i,o)}),n.dragStart.on(o=>{var i,r;t.nodeDragStart(o),(r=(i=e.events)==null?void 0:i.dragStart)==null||r.call(i,o)}),n.drag.on(o=>{var i,r;t.nodeDrag(o),(r=(i=e.events)==null?void 0:i.drag)==null||r.call(i,o)}),n.dragStop.on(o=>{var i,r;t.nodeDragStop(o),(r=(i=e.events)==null?void 0:i.dragStop)==null||r.call(i,o)}),Object.entries(n).reduce((o,[i,r])=>(o.emit[i]=r.trigger,o.on[i]=r.on,o),{emit:{},on:{}})}function qs(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:n,findNode:o,snapGrid:i,snapToGrid:r,nodesDraggable:s,emits:a}=$e();return(l,u=!1)=>{const c=r.value?i.value[0]:5,d=r.value?i.value[1]:5,h=u?4:1,g=l.x*c*h,b=l.y*d*h,_=[];for(const E of e.value)if(E.draggable||s&&typeof E.draggable>"u"){const $={x:E.computedPosition.x+g,y:E.computedPosition.y+b},{position:D}=Mi(E,$,a.error,t.value,E.parentNode?o(E.parentNode):void 0);_.push({id:E.id,position:D,from:E.position,distance:{x:l.x,y:l.y},dimensions:E.dimensions})}n(_,!0,!1)}}const Pn=.1,Af=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function lt(){return En("Viewport not initialized yet."),Promise.resolve(!1)}const Df={zoomIn:lt,zoomOut:lt,zoomTo:lt,fitView:lt,setCenter:lt,fitBounds:lt,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:lt,setTransform:lt,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function zf(e){function t(o,i){return new Promise(r=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(i?.interpolate==="linear"?on:Un).scaleBy(Fo(e.d3Selection,i?.duration,i?.ease,()=>{r(!0)}),o):r(!1)})}function n(o,i,r,s){return new Promise(a=>{var l;const{x:u,y:c}=Ts({x:-o,y:-i},e.translateExtent),d=Ft.translate(-u,-c).scale(r);e.d3Selection&&e.d3Zoom?(l=e.d3Zoom)==null||l.interpolate(s?.interpolate==="linear"?on:Un).transform(Fo(e.d3Selection,s?.duration,s?.ease,()=>{a(!0)}),d):a(!1)})}return re(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:i=>t(1.2,i),zoomOut:i=>t(1/1.2,i),zoomTo:(i,r)=>new Promise(s=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(r?.interpolate==="linear"?on:Un).scaleTo(Fo(e.d3Selection,r?.duration,r?.ease,()=>{s(!0)}),i):s(!1)}),setViewport:(i,r)=>n(i.x,i.y,i.zoom,r),setTransform:(i,r)=>n(i.x,i.y,i.zoom,r),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:(i={padding:Pn,includeHiddenNodes:!1,duration:0})=>{var r,s;const a=[];for(const h of e.nodes)h.dimensions.width&&h.dimensions.height&&(i?.includeHiddenNodes||!h.hidden)&&(!((r=i.nodes)!=null&&r.length)||(s=i.nodes)!=null&&s.length&&i.nodes.includes(h.id))&&a.push(h);if(!a.length)return Promise.resolve(!1);const l=Ni(a),{x:u,y:c,zoom:d}=rr(l,e.dimensions.width,e.dimensions.height,i.minZoom??e.minZoom,i.maxZoom??e.maxZoom,i.padding??Pn);return n(u,c,d,i)},setCenter:(i,r,s)=>{const a=typeof s?.zoom<"u"?s.zoom:e.maxZoom,l=e.dimensions.width/2-i*a,u=e.dimensions.height/2-r*a;return n(l,u,a,s)},fitBounds:(i,r={padding:Pn})=>{const{x:s,y:a,zoom:l}=rr(i,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,r.padding??Pn);return n(s,a,l,r)},project:i=>gn(i,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:i=>{if(e.vueFlowRef){const{x:r,y:s}=e.vueFlowRef.getBoundingClientRect(),a={x:i.x-r,y:i.y-s};return gn(a,e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:i=>{if(e.vueFlowRef){const{x:r,y:s}=e.vueFlowRef.getBoundingClientRect(),a={x:i.x+r,y:i.y+s};return hn(a,e.viewport)}return{x:0,y:0}}}:Df)}function Fo(e,t=0,n=Af,o=()=>{}){const i=typeof t=="number"&&t>0;return i||o(),i?e.transition().duration(t).ease(n).on("end",o):e}function Pf(e,t,n){const o=Gr(!0);return o.run(()=>{const i=()=>{o.run(()=>{let _,E,$=!!(n.nodes.value.length||n.edges.value.length);_=Dt([e.modelValue,()=>{var D,m;return(m=(D=e.modelValue)==null?void 0:D.value)==null?void 0:m.length}],([D])=>{D&&Array.isArray(D)&&(E?.pause(),n.setElements(D),!E&&!$&&D.length?$=!0:E?.resume())}),E=Dt([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],([D,m])=>{var k;(k=e.modelValue)!=null&&k.value&&Array.isArray(e.modelValue.value)&&(_?.pause(),e.modelValue.value=[...D,...m],qe(()=>{_?.resume()}))},{immediate:$}),Fn(()=>{_?.stop(),E?.stop()})})},r=()=>{o.run(()=>{let _,E,$=!!n.nodes.value.length;_=Dt([e.nodes,()=>{var D,m;return(m=(D=e.nodes)==null?void 0:D.value)==null?void 0:m.length}],([D])=>{D&&Array.isArray(D)&&(E?.pause(),n.setNodes(D),!E&&!$&&D.length?$=!0:E?.resume())}),E=Dt([n.nodes,()=>n.nodes.value.length],([D])=>{var m;(m=e.nodes)!=null&&m.value&&Array.isArray(e.nodes.value)&&(_?.pause(),e.nodes.value=[...D],qe(()=>{_?.resume()}))},{immediate:$}),Fn(()=>{_?.stop(),E?.stop()})})},s=()=>{o.run(()=>{let _,E,$=!!n.edges.value.length;_=Dt([e.edges,()=>{var D,m;return(m=(D=e.edges)==null?void 0:D.value)==null?void 0:m.length}],([D])=>{D&&Array.isArray(D)&&(E?.pause(),n.setEdges(D),!E&&!$&&D.length?$=!0:E?.resume())}),E=Dt([n.edges,()=>n.edges.value.length],([D])=>{var m;(m=e.edges)!=null&&m.value&&Array.isArray(e.edges.value)&&(_?.pause(),e.edges.value=[...D],qe(()=>{_?.resume()}))},{immediate:$}),Fn(()=>{_?.stop(),E?.stop()})})},a=()=>{o.run(()=>{we(()=>t.maxZoom,()=>{t.maxZoom&&Ne(t.maxZoom)&&n.setMaxZoom(t.maxZoom)},{immediate:!0})})},l=()=>{o.run(()=>{we(()=>t.minZoom,()=>{t.minZoom&&Ne(t.minZoom)&&n.setMinZoom(t.minZoom)},{immediate:!0})})},u=()=>{o.run(()=>{we(()=>t.translateExtent,()=>{t.translateExtent&&Ne(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)},{immediate:!0})})},c=()=>{o.run(()=>{we(()=>t.nodeExtent,()=>{t.nodeExtent&&Ne(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)},{immediate:!0})})},d=()=>{o.run(()=>{we(()=>t.applyDefault,()=>{Ne(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)},{immediate:!0})})},h=()=>{o.run(()=>{const _=async E=>{let $=E;typeof t.autoConnect=="function"&&($=await t.autoConnect(E)),$!==!1&&n.addEdges([$])};we(()=>t.autoConnect,()=>{Ne(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)},{immediate:!0}),we(n.autoConnect,(E,$,D)=>{E?n.onConnect(_):n.hooks.value.connect.off(_),D(()=>{n.hooks.value.connect.off(_)})},{immediate:!0})})},g=()=>{const _=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const E of Object.keys(t)){const $=E;if(!_.includes($)){const D=me(()=>t[$]),m=n[$];Pt(m)&&o.run(()=>{we(D,k=>{Ne(k)&&(m.value=k)},{immediate:!0})})}}};i(),r(),s(),l(),a(),u(),c(),d(),h(),g()}),()=>o.stop()}function Of(){return{edgesChange:q(),nodesChange:q(),nodeDoubleClick:q(),nodeClick:q(),nodeMouseEnter:q(),nodeMouseMove:q(),nodeMouseLeave:q(),nodeContextMenu:q(),nodeDragStart:q(),nodeDrag:q(),nodeDragStop:q(),nodesInitialized:q(),miniMapNodeClick:q(),miniMapNodeDoubleClick:q(),miniMapNodeMouseEnter:q(),miniMapNodeMouseMove:q(),miniMapNodeMouseLeave:q(),connect:q(),connectStart:q(),connectEnd:q(),clickConnectStart:q(),clickConnectEnd:q(),paneReady:q(),init:q(),move:q(),moveStart:q(),moveEnd:q(),selectionDragStart:q(),selectionDrag:q(),selectionDragStop:q(),selectionContextMenu:q(),selectionStart:q(),selectionEnd:q(),viewportChangeStart:q(),viewportChange:q(),viewportChangeEnd:q(),paneScroll:q(),paneClick:q(),paneContextMenu:q(),paneMouseEnter:q(),paneMouseMove:q(),paneMouseLeave:q(),edgeContextMenu:q(),edgeMouseEnter:q(),edgeMouseMove:q(),edgeMouseLeave:q(),edgeDoubleClick:q(),edgeClick:q(),edgeUpdateStart:q(),edgeUpdate:q(),edgeUpdateEnd:q(),updateNodeInternals:q(),error:q(e=>En(e.message))}}function Bf(e,t){const n=Ut();Oa(()=>{for(const[i,r]of Object.entries(t.value)){const s=a=>{e(i,a)};r.setEmitter(s),an(r.removeEmitter),r.setHasEmitListeners(()=>o(i)),an(r.removeHasEmitListeners)}});function o(i){var r;const s=Rf(i);return!!((r=n?.vnode.props)==null?void 0:r[s])}}function Rf(e){const[t,...n]=e.split(":");return`on${t.replace(/(?:^|-)(\w)/g,(i,r)=>r.toUpperCase())}${n.length?`:${n.join(":")}`:""}`}function Ks(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],connectionLookup:new Map,nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:Si.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:rn.Free,paneClickDistance:0,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:wt.Bezier,style:{}},connectionMode:pt.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:Number.NaN,y:Number.NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,nodeDragThreshold:1,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:vn()?"Meta":"Control",zoomActivationKeyCode:vn()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:Of(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,fitViewOnInitDone:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,autoPanSpeed:15,disableKeyboardA11y:!1,ariaLiveMessage:""}}const Vf=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function Hf(e,t,n){const o=zf(e),i=y=>{const v=y??[];e.hooks.updateNodeInternals.trigger(v)},r=y=>ef(y,e.nodes,e.edges),s=y=>jd(y,e.nodes,e.edges),a=y=>_t(y,e.edges),l=({id:y,type:v,nodeId:x})=>{var A;const C=y?`-${v}-${y}`:`-${v}`;return Array.from(((A=e.connectionLookup.get(`${x}${C}`))==null?void 0:A.values())??[])},u=y=>{if(y)return t.value.get(y)},c=y=>{if(y)return n.value.get(y)},d=(y,v,x)=>{var A,C;const K=[];for(const Q of y){const ie={id:Q.id,type:"position",dragging:x,from:Q.from};if(v&&(ie.position=Q.position,Q.parentNode)){const ne=u(Q.parentNode);ie.position={x:ie.position.x-(((A=ne?.computedPosition)==null?void 0:A.x)??0),y:ie.position.y-(((C=ne?.computedPosition)==null?void 0:C.y)??0)}}K.push(ie)}K?.length&&e.hooks.nodesChange.trigger(K)},h=y=>{if(!e.vueFlowRef)return;const v=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!v)return;const x=window.getComputedStyle(v),{m22:A}=new window.DOMMatrixReadOnly(x.transform),C=[];for(const K of y){const Q=K,ie=u(Q.id);if(ie){const ne=bo(Q.nodeElement);if(!!(ne.width&&ne.height&&(ie.dimensions.width!==ne.width||ie.dimensions.height!==ne.height||Q.forceUpdate))){const ge=Q.nodeElement.getBoundingClientRect();ie.dimensions=ne,ie.handleBounds.source=vr("source",Q.nodeElement,ge,A,ie.id),ie.handleBounds.target=vr("target",Q.nodeElement,ge,A,ie.id),C.push({id:ie.id,type:"dimensions",dimensions:ne})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&o.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),C.length&&e.hooks.nodesChange.trigger(C)},g=(y,v)=>{const x=new Set,A=new Set;for(const Q of y)St(Q)?x.add(Q.id):vt(Q)&&A.add(Q.id);const C=dt(t.value,x,!0),K=dt(n.value,A);if(e.multiSelectionActive){for(const Q of x)C.push(ut(Q,v));for(const Q of A)K.push(ut(Q,v))}C.length&&e.hooks.nodesChange.trigger(C),K.length&&e.hooks.edgesChange.trigger(K)},b=y=>{if(e.multiSelectionActive){const v=y.map(x=>ut(x.id,!0));e.hooks.nodesChange.trigger(v);return}e.hooks.nodesChange.trigger(dt(t.value,new Set(y.map(v=>v.id)),!0)),e.hooks.edgesChange.trigger(dt(n.value))},_=y=>{if(e.multiSelectionActive){const v=y.map(x=>ut(x.id,!0));e.hooks.edgesChange.trigger(v);return}e.hooks.edgesChange.trigger(dt(n.value,new Set(y.map(v=>v.id)))),e.hooks.nodesChange.trigger(dt(t.value,new Set,!0))},E=y=>{g(y,!0)},$=y=>{const x=(y||e.nodes).map(A=>(A.selected=!1,ut(A.id,!1)));e.hooks.nodesChange.trigger(x)},D=y=>{const x=(y||e.edges).map(A=>(A.selected=!1,ut(A.id,!1)));e.hooks.edgesChange.trigger(x)},m=y=>{if(!y||!y.length)return g([],!1);const v=y.reduce((x,A)=>{const C=ut(A.id,!1);return St(A)?x.nodes.push(C):x.edges.push(C),x},{nodes:[],edges:[]});v.nodes.length&&e.hooks.nodesChange.trigger(v.nodes),v.edges.length&&e.hooks.edgesChange.trigger(v.edges)},k=y=>{var v;(v=e.d3Zoom)==null||v.scaleExtent([y,e.maxZoom]),e.minZoom=y},B=y=>{var v;(v=e.d3Zoom)==null||v.scaleExtent([e.minZoom,y]),e.maxZoom=y},U=y=>{var v;(v=e.d3Zoom)==null||v.translateExtent(y),e.translateExtent=y},L=y=>{e.nodeExtent=y,i()},X=y=>{var v;(v=e.d3Zoom)==null||v.clickDistance(y)},ee=y=>{e.nodesDraggable=y,e.nodesConnectable=y,e.elementsSelectable=y},F=y=>{const v=y instanceof Function?y(e.nodes):y;!e.initialized&&!v.length||(e.nodes=mr(v,u,e.hooks.error.trigger))},G=y=>{const v=y instanceof Function?y(e.edges):y;if(!e.initialized&&!v.length)return;const x=Lo(v,e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);Ho(e.connectionLookup,n.value,x),e.edges=x},M=y=>{const v=y instanceof Function?y([...e.nodes,...e.edges]):y;!e.initialized&&!v.length||(F(v.filter(St)),G(v.filter(vt)))},te=y=>{let v=y instanceof Function?y(e.nodes):y;v=Array.isArray(v)?v:[v];const x=mr(v,u,e.hooks.error.trigger),A=[];for(const C of x)A.push(lr(C));A.length&&e.hooks.nodesChange.trigger(A)},f=y=>{let v=y instanceof Function?y(e.edges):y;v=Array.isArray(v)?v:[v];const x=Lo(v,e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),A=[];for(const C of x)A.push(lr(C));A.length&&e.hooks.edgesChange.trigger(A)},N=(y,v=!0,x=!1)=>{const A=y instanceof Function?y(e.nodes):y,C=Array.isArray(A)?A:[A],K=[],Q=[];function ie(le){const ge=a(le);for(const ye of ge)(!Ne(ye.deletable)||ye.deletable)&&Q.push(cr(ye.id,ye.source,ye.target,ye.sourceHandle,ye.targetHandle))}function ne(le){const ge=[];for(const ye of e.nodes)ye.parentNode===le&&ge.push(ye);if(ge.length){for(const ye of ge)K.push(ur(ye.id));v&&ie(ge);for(const ye of ge)ne(ye.id)}}for(const le of C){const ge=typeof le=="string"?u(le):le;ge&&(Ne(ge.deletable)&&!ge.deletable||(K.push(ur(ge.id)),v&&ie([ge]),x&&ne(ge.id)))}Q.length&&e.hooks.edgesChange.trigger(Q),K.length&&e.hooks.nodesChange.trigger(K)},p=y=>{const v=y instanceof Function?y(e.edges):y,x=Array.isArray(v)?v:[v],A=[];for(const C of x){const K=typeof C=="string"?c(C):C;K&&(Ne(K.deletable)&&!K.deletable||A.push(cr(typeof C=="string"?C:C.id,K.source,K.target,K.sourceHandle,K.targetHandle)))}e.hooks.edgesChange.trigger(A)},I=(y,v,x=!0)=>{const A=c(y.id);if(!A)return!1;const C=e.edges.indexOf(A),K=xf(y,v,A,x,e.hooks.error.trigger);if(K){const[Q]=Lo([K],e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);return e.edges=e.edges.map((ie,ne)=>ne===C?Q:ie),Ho(e.connectionLookup,n.value,[Q]),Q}return!1},S=(y,v,x={replace:!1})=>{const A=c(y);if(!A)return;const C=typeof v=="function"?v(A):v;A.data=x.replace?C:{...A.data,...C}},z=y=>ar(y,e.nodes),w=y=>{const v=ar(y,e.edges);return Ho(e.connectionLookup,n.value,v),v},T=(y,v,x={replace:!1})=>{const A=u(y);if(!A)return;const C=typeof v=="function"?v(A):v;x.replace?e.nodes.splice(e.nodes.indexOf(A),1,C):Object.assign(A,C)},R=(y,v,x={replace:!1})=>{const A=u(y);if(!A)return;const C=typeof v=="function"?v(A):v;A.data=x.replace?C:{...A.data,...C}},Z=(y,v,x=!1)=>{x?e.connectionClickStartHandle=y:e.connectionStartHandle=y,e.connectionEndHandle=null,e.connectionStatus=null,v&&(e.connectionPosition=v)},Y=(y,v=null,x=null)=>{e.connectionStartHandle&&(e.connectionPosition=y,e.connectionEndHandle=v,e.connectionStatus=x)},O=(y,v)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,v?e.connectionClickStartHandle=null:e.connectionStartHandle=null},V=y=>{const v=Jd(y),x=v?null:en(y)?y:u(y.id);return!v&&!x?[null,null,v]:[v?y:lo(x),x,v]},W=(y,v=!0,x=e.nodes)=>{const[A,C,K]=V(y);if(!A)return[];const Q=[];for(const ie of x||e.nodes){if(!K&&(ie.id===C.id||!ie.computedPosition))continue;const ne=lo(ie),le=uo(ne,A);(v&&le>0||le>=ne.width*ne.height||le>=Number(A.width)*Number(A.height))&&Q.push(ie)}return Q},H=(y,v,x=!0)=>{const[A]=V(y);if(!A)return!1;const C=uo(A,v);return x&&C>0||C>=Number(A.width)*Number(A.height)},de=y=>{const{viewport:v,dimensions:x,d3Zoom:A,d3Selection:C,translateExtent:K}=e;if(!A||!C||!y.x&&!y.y)return!1;const Q=Ft.translate(v.x+y.x,v.y+y.y).scale(v.zoom),ie=[[0,0],[x.width,x.height]],ne=A.constrain()(Q,ie,K),le=e.viewport.x!==ne.x||e.viewport.y!==ne.y||e.viewport.zoom!==ne.k;return A.transform(C,ne),le},ce=y=>{const v=y instanceof Function?y(e):y,x=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];Ne(v.defaultEdgeOptions)&&(e.defaultEdgeOptions=v.defaultEdgeOptions);const A=v.modelValue||v.nodes||v.edges?[]:void 0;A&&(v.modelValue&&A.push(...v.modelValue),v.nodes&&A.push(...v.nodes),v.edges&&A.push(...v.edges),M(A));const C=()=>{Ne(v.maxZoom)&&B(v.maxZoom),Ne(v.minZoom)&&k(v.minZoom),Ne(v.translateExtent)&&U(v.translateExtent)};for(const K of Object.keys(v)){const Q=K,ie=v[Q];![...Vf,...x].includes(Q)&&Ne(ie)&&(e[Q]=ie)}Wo(()=>e.d3Zoom).not.toBeNull().then(C),e.initialized||(e.initialized=!0)};return{updateNodePositions:d,updateNodeDimensions:h,setElements:M,setNodes:F,setEdges:G,addNodes:te,addEdges:f,removeNodes:N,removeEdges:p,findNode:u,findEdge:c,updateEdge:I,updateEdgeData:S,updateNode:T,updateNodeData:R,applyEdgeChanges:w,applyNodeChanges:z,addSelectedElements:E,addSelectedNodes:b,addSelectedEdges:_,setMinZoom:k,setMaxZoom:B,setTranslateExtent:U,setNodeExtent:L,setPaneClickDistance:X,removeSelectedElements:m,removeSelectedNodes:$,removeSelectedEdges:D,startConnection:Z,updateConnection:Y,endConnection:O,setInteractive:ee,setState:ce,getIntersectingNodes:W,getIncomers:r,getOutgoers:s,getConnectedEdges:a,getHandleConnections:l,isNodeIntersecting:H,panBy:de,fitView:y=>o.value.fitView(y),zoomIn:y=>o.value.zoomIn(y),zoomOut:y=>o.value.zoomOut(y),zoomTo:(y,v)=>o.value.zoomTo(y,v),setViewport:(y,v)=>o.value.setViewport(y,v),setTransform:(y,v)=>o.value.setTransform(y,v),getViewport:()=>o.value.getViewport(),getTransform:()=>o.value.getTransform(),setCenter:(y,v,x)=>o.value.setCenter(y,v,x),fitBounds:(y,v)=>o.value.fitBounds(y,v),project:y=>o.value.project(y),screenToFlowCoordinate:y=>o.value.screenToFlowCoordinate(y),flowToScreenCoordinate:y=>o.value.flowToScreenCoordinate(y),toObject:()=>{const y=[],v=[];for(const x of e.nodes){const{computedPosition:A,handleBounds:C,selected:K,dimensions:Q,isParent:ie,resizing:ne,dragging:le,events:ge,...ye}=x;y.push(ye)}for(const x of e.edges){const{selected:A,sourceNode:C,targetNode:K,events:Q,...ie}=x;v.push(ie)}return JSON.parse(JSON.stringify({nodes:y,edges:v,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:y=>new Promise(v=>{const{nodes:x,edges:A,position:C,zoom:K,viewport:Q}=y;x&&F(x),A&&G(A);const[ie,ne]=Q?.x&&Q?.y?[Q.x,Q.y]:C??[null,null];if(ie&&ne){const le=Q?.zoom||K||e.viewport.zoom;return Wo(()=>o.value.viewportInitialized).toBe(!0).then(()=>{o.value.setViewport({x:ie,y:ne,zoom:le}).then(()=>{v(!0)})})}else v(!0)}),updateNodeInternals:i,viewportHelper:o,$reset:()=>{const y=Ks();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const v=Ft.translate(y.defaultViewport.x??0,y.defaultViewport.y??0).scale(It(y.defaultViewport.zoom??1,y.minZoom,y.maxZoom)),x=e.viewportRef.getBoundingClientRect(),A=[[0,0],[x.width,x.height]],C=e.d3Zoom.constrain()(v,A,y.translateExtent);e.d3Zoom.transform(e.d3Selection,C)}ce(y)},$destroy:()=>{}}}const Lf=["data-id","data-handleid","data-nodeid","data-handlepos"],Ff={name:"Handle",compatConfig:{MODE:3}},Le=ve({...Ff,props:{id:{default:null},type:{},position:{default:()=>j.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,Number,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e,{expose:t}){const n=Pa(e,["position","connectable","connectableStart","connectableEnd","id"]),o=me(()=>n.type??"source"),i=me(()=>n.isValidConnection??null),{id:r,connectionStartHandle:s,connectionClickStartHandle:a,connectionEndHandle:l,vueFlowRef:u,nodesConnectable:c,noDragClassName:d,noPanClassName:h}=$e(),{id:g,node:b,nodeEl:_,connectedEdges:E}=Zs(),$=be(),D=me(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),m=me(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),k=me(()=>{var G,M,te,f,N,p;return((G=s.value)==null?void 0:G.nodeId)===g&&((M=s.value)==null?void 0:M.id)===e.id&&((te=s.value)==null?void 0:te.type)===o.value||((f=l.value)==null?void 0:f.nodeId)===g&&((N=l.value)==null?void 0:N.id)===e.id&&((p=l.value)==null?void 0:p.type)===o.value}),B=me(()=>{var G,M,te;return((G=a.value)==null?void 0:G.nodeId)===g&&((M=a.value)==null?void 0:M.id)===e.id&&((te=a.value)==null?void 0:te.type)===o.value}),{handlePointerDown:U,handleClick:L}=Ws({nodeId:g,handleId:e.id,isValidConnection:i,type:o}),X=re(()=>typeof e.connectable=="string"&&e.connectable==="single"?!E.value.some(G=>{const M=G[`${o.value}Handle`];return G[o.value]!==g?!1:M?M===e.id:!0}):typeof e.connectable=="number"?E.value.filter(G=>{const M=G[`${o.value}Handle`];return G[o.value]!==g?!1:M?M===e.id:!0}).length<e.connectable:typeof e.connectable=="function"?e.connectable(b,E.value):Ne(e.connectable)?e.connectable:c.value);mt(()=>{var G;if(!b.dimensions.width||!b.dimensions.height)return;const M=(G=b.handleBounds[o.value])==null?void 0:G.find(z=>z.id===e.id);if(!u.value||M)return;const te=u.value.querySelector(".vue-flow__transformationpane");if(!_.value||!$.value||!te||!e.id)return;const f=_.value.getBoundingClientRect(),N=$.value.getBoundingClientRect(),p=window.getComputedStyle(te),{m22:I}=new window.DOMMatrixReadOnly(p.transform),S={id:e.id,position:e.position,x:(N.left-f.left)/I,y:(N.top-f.top)/I,type:o.value,nodeId:g,...bo($.value)};b.handleBounds[o.value]=[...b.handleBounds[o.value]??[],S]});function ee(G){const M=Ci(G);X.value&&D.value&&(M&&G.button===0||!M)&&U(G)}function F(G){!g||!a.value&&!D.value||X.value&&L(G)}return t({handleClick:L,handlePointerDown:U,onClick:F,onPointerDown:ee}),(G,M)=>(J(),ae("div",{ref_key:"handle",ref:$,"data-id":`${P(r)}-${P(g)}-${e.id}-${o.value}`,"data-handleid":e.id,"data-nodeid":P(g),"data-handlepos":G.position,class:He(["vue-flow__handle",[`vue-flow__handle-${G.position}`,`vue-flow__handle-${e.id}`,P(d),P(h),o.value,{connectable:X.value,connecting:B.value,connectablestart:D.value,connectableend:m.value,connectionindicator:X.value&&(D.value&&!k.value||m.value&&k.value)}]]),onMousedown:ee,onTouchstartPassive:ee,onClick:F},[xe(G.$slots,"default",{id:G.id})],42,Lf))}}),So=function({sourcePosition:e=j.Bottom,targetPosition:t=j.Top,label:n,connectable:o=!0,isValidTargetPos:i,isValidSourcePos:r,data:s}){const a=s.label??n;return[_e(Le,{type:"target",position:t,connectable:o,isValidConnection:i}),typeof a!="string"&&a?_e(a):_e(Te,[a]),_e(Le,{type:"source",position:e,connectable:o,isValidConnection:r})]};So.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"];So.inheritAttrs=!1;So.compatConfig={MODE:3};const Yf=So,No=function({targetPosition:e=j.Top,label:t,connectable:n=!0,isValidTargetPos:o,data:i}){const r=i.label??t;return[_e(Le,{type:"target",position:e,connectable:n,isValidConnection:o}),typeof r!="string"&&r?_e(r):_e(Te,[r])]};No.props=["targetPosition","label","isValidTargetPos","connectable","data"];No.inheritAttrs=!1;No.compatConfig={MODE:3};const Xf=No,Mo=function({sourcePosition:e=j.Bottom,label:t,connectable:n=!0,isValidSourcePos:o,data:i}){const r=i.label??t;return[typeof r!="string"&&r?_e(r):_e(Te,[r]),_e(Le,{type:"source",position:e,connectable:n,isValidConnection:o})]};Mo.props=["sourcePosition","label","isValidSourcePos","connectable","data"];Mo.inheritAttrs=!1;Mo.compatConfig={MODE:3};const Gf=Mo,Uf=["transform"],Wf=["width","height","x","y","rx","ry"],Zf=["y"],qf={name:"EdgeText",compatConfig:{MODE:3}},Kf=ve({...qf,props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const t=be({x:0,y:0,width:0,height:0}),n=be(null),o=re(()=>`translate(${e.x-t.value.width/2} ${e.y-t.value.height/2})`);mt(i),we([()=>e.x,()=>e.y,n,()=>e.label],i);function i(){if(!n.value)return;const r=n.value.getBBox();(r.width!==t.value.width||r.height!==t.value.height)&&(t.value=r)}return(r,s)=>(J(),ae("g",{transform:o.value,class:"vue-flow__edge-textwrapper"},[r.labelShowBg?(J(),ae("rect",{key:0,class:"vue-flow__edge-textbg",width:`${t.value.width+2*r.labelBgPadding[0]}px`,height:`${t.value.height+2*r.labelBgPadding[1]}px`,x:-r.labelBgPadding[0],y:-r.labelBgPadding[1],style:ze(r.labelBgStyle),rx:r.labelBgBorderRadius,ry:r.labelBgBorderRadius},null,12,Wf)):Se("",!0),oe("text",eo(r.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:r.labelStyle}),[xe(r.$slots,"default",{},()=>[typeof r.label!="string"?(J(),Me(yt(r.label),{key:0})):(J(),ae(Te,{key:1},[Xn(Ee(r.label),1)],64))])],16,Zf)],8,Uf))}}),Jf=["id","d","marker-end","marker-start"],Qf=["d","stroke-width"],jf={name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3}},Co=ve({...jf,props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:t}){const n=be(null),o=be(null),i=be(null),r=vi();return t({pathEl:n,interactionEl:o,labelEl:i}),(s,a)=>(J(),ae(Te,null,[oe("path",eo(P(r),{id:s.id,ref_key:"pathEl",ref:n,d:s.path,class:"vue-flow__edge-path","marker-end":s.markerEnd,"marker-start":s.markerStart}),null,16,Jf),s.interactionWidth?(J(),ae("path",{key:0,ref_key:"interactionEl",ref:o,fill:"none",d:s.path,"stroke-width":s.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,Qf)):Se("",!0),s.label&&s.labelX&&s.labelY?(J(),Me(Kf,{key:1,ref_key:"labelEl",ref:i,x:s.labelX,y:s.labelY,label:s.label,"label-show-bg":s.labelShowBg,"label-bg-style":s.labelBgStyle,"label-bg-padding":s.labelBgPadding,"label-bg-border-radius":s.labelBgBorderRadius,"label-style":s.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):Se("",!0)],64))}});function Js({sourceX:e,sourceY:t,targetX:n,targetY:o}){const i=Math.abs(n-e)/2,r=n<e?n+i:n-i,s=Math.abs(o-t)/2,a=o<t?o+s:o-s;return[r,a,i,s]}function Qs({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:i,sourceControlY:r,targetControlX:s,targetControlY:a}){const l=e*.125+i*.375+s*.375+n*.125,u=t*.125+r*.375+a*.375+o*.125,c=Math.abs(l-e),d=Math.abs(u-t);return[l,u,c,d]}function On(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function $r({pos:e,x1:t,y1:n,x2:o,y2:i,c:r}){let s,a;switch(e){case j.Left:s=t-On(t-o,r),a=n;break;case j.Right:s=t+On(o-t,r),a=n;break;case j.Top:s=t,a=n-On(n-i,r);break;case j.Bottom:s=t,a=n+On(i-n,r);break}return[s,a]}function js(e){const{sourceX:t,sourceY:n,sourcePosition:o=j.Bottom,targetX:i,targetY:r,targetPosition:s=j.Top,curvature:a=.25}=e,[l,u]=$r({pos:o,x1:t,y1:n,x2:i,y2:r,c:a}),[c,d]=$r({pos:s,x1:i,y1:r,x2:t,y2:n,c:a}),[h,g,b,_]=Qs({sourceX:t,sourceY:n,targetX:i,targetY:r,sourceControlX:l,sourceControlY:u,targetControlX:c,targetControlY:d});return[`M${t},${n} C${l},${u} ${c},${d} ${i},${r}`,h,g,b,_]}function br({pos:e,x1:t,y1:n,x2:o,y2:i}){let r,s;switch(e){case j.Left:case j.Right:r=.5*(t+o),s=n;break;case j.Top:case j.Bottom:r=t,s=.5*(n+i);break}return[r,s]}function ea(e){const{sourceX:t,sourceY:n,sourcePosition:o=j.Bottom,targetX:i,targetY:r,targetPosition:s=j.Top}=e,[a,l]=br({pos:o,x1:t,y1:n,x2:i,y2:r}),[u,c]=br({pos:s,x1:i,y1:r,x2:t,y2:n}),[d,h,g,b]=Qs({sourceX:t,sourceY:n,targetX:i,targetY:r,sourceControlX:a,sourceControlY:l,targetControlX:u,targetControlY:c});return[`M${t},${n} C${a},${l} ${u},${c} ${i},${r}`,d,h,g,b]}const xr={[j.Left]:{x:-1,y:0},[j.Right]:{x:1,y:0},[j.Top]:{x:0,y:-1},[j.Bottom]:{x:0,y:1}};function eh({source:e,sourcePosition:t=j.Bottom,target:n}){return t===j.Left||t===j.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}}function Er(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function th({source:e,sourcePosition:t=j.Bottom,target:n,targetPosition:o=j.Top,center:i,offset:r}){const s=xr[t],a=xr[o],l={x:e.x+s.x*r,y:e.y+s.y*r},u={x:n.x+a.x*r,y:n.y+a.y*r},c=eh({source:l,sourcePosition:t,target:u}),d=c.x!==0?"x":"y",h=c[d];let g,b,_;const E={x:0,y:0},$={x:0,y:0},[D,m,k,B]=Js({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[d]*a[d]===-1){b=i.x??D,_=i.y??m;const L=[{x:b,y:l.y},{x:b,y:u.y}],X=[{x:l.x,y:_},{x:u.x,y:_}];s[d]===h?g=d==="x"?L:X:g=d==="x"?X:L}else{const L=[{x:l.x,y:u.y}],X=[{x:u.x,y:l.y}];if(d==="x"?g=s.x===h?X:L:g=s.y===h?L:X,t===o){const te=Math.abs(e[d]-n[d]);if(te<=r){const f=Math.min(r-1,r-te);s[d]===h?E[d]=(l[d]>e[d]?-1:1)*f:$[d]=(u[d]>n[d]?-1:1)*f}}if(t!==o){const te=d==="x"?"y":"x",f=s[d]===a[te],N=l[te]>u[te],p=l[te]<u[te];(s[d]===1&&(!f&&N||f&&p)||s[d]!==1&&(!f&&p||f&&N))&&(g=d==="x"?L:X)}const ee={x:l.x+E.x,y:l.y+E.y},F={x:u.x+$.x,y:u.y+$.y},G=Math.max(Math.abs(ee.x-g[0].x),Math.abs(F.x-g[0].x)),M=Math.max(Math.abs(ee.y-g[0].y),Math.abs(F.y-g[0].y));G>=M?(b=(ee.x+F.x)/2,_=g[0].y):(b=g[0].x,_=(ee.y+F.y)/2)}return[[e,{x:l.x+E.x,y:l.y+E.y},...g,{x:u.x+$.x,y:u.y+$.y},n],b,_,k,B]}function nh(e,t,n,o){const i=Math.min(Er(e,t)/2,Er(t,n)/2,o),{x:r,y:s}=t;if(e.x===r&&r===n.x||e.y===s&&s===n.y)return`L${r} ${s}`;if(e.y===s){const u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${r+i*u},${s}Q ${r},${s} ${r},${s+i*c}`}const a=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${r},${s+i*l}Q ${r},${s} ${r+i*a},${s}`}function si(e){const{sourceX:t,sourceY:n,sourcePosition:o=j.Bottom,targetX:i,targetY:r,targetPosition:s=j.Top,borderRadius:a=5,centerX:l,centerY:u,offset:c=20}=e,[d,h,g,b,_]=th({source:{x:t,y:n},sourcePosition:o,target:{x:i,y:r},targetPosition:s,center:{x:l,y:u},offset:c});return[d.reduce(($,D,m)=>{let k;return m>0&&m<d.length-1?k=nh(d[m-1],D,d[m+1],a):k=`${m===0?"M":"L"}${D.x} ${D.y}`,$+=k,$},""),h,g,b,_]}function oh(e){const{sourceX:t,sourceY:n,targetX:o,targetY:i}=e,[r,s,a,l]=Js({sourceX:t,sourceY:n,targetX:o,targetY:i});return[`M ${t},${n}L ${o},${i}`,r,s,a,l]}const ih=ve({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=oh(e);return _e(Co,{path:n,labelX:o,labelY:i,...t,...e})}}}),rh=ih,sh=ve({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=si({...e,sourcePosition:e.sourcePosition??j.Bottom,targetPosition:e.targetPosition??j.Top});return _e(Co,{path:n,labelX:o,labelY:i,...t,...e})}}}),ta=sh,ah=ve({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:t}){return()=>_e(ta,{...e,...t,borderRadius:0})}}),lh=ah,uh=ve({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=js({...e,sourcePosition:e.sourcePosition??j.Bottom,targetPosition:e.targetPosition??j.Top});return _e(Co,{path:n,labelX:o,labelY:i,...t,...e})}}}),ch=uh,dh=ve({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=ea({...e,sourcePosition:e.sourcePosition??j.Bottom,targetPosition:e.targetPosition??j.Top});return _e(Co,{path:n,labelX:o,labelY:i,...t,...e})}}}),fh=dh,hh={input:Gf,default:Yf,output:Xf},gh={default:ch,straight:rh,step:lh,smoothstep:ta,simplebezier:fh};function ph(e,t,n){const o=re(()=>_=>t.value.get(_)),i=re(()=>_=>n.value.get(_)),r=re(()=>{const _={...gh,...e.edgeTypes},E=Object.keys(_);for(const $ of e.edges)$.type&&!E.includes($.type)&&(_[$.type]=$.type);return _}),s=re(()=>{const _={...hh,...e.nodeTypes},E=Object.keys(_);for(const $ of e.nodes)$.type&&!E.includes($.type)&&(_[$.type]=$.type);return _}),a=re(()=>e.onlyRenderVisibleElements?Bs(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),l=re(()=>{if(e.onlyRenderVisibleElements){const _=[];for(const E of e.edges){const $=t.value.get(E.source),D=t.value.get(E.target);df({sourcePos:$.computedPosition||{x:0,y:0},targetPos:D.computedPosition||{x:0,y:0},sourceWidth:$.dimensions.width,sourceHeight:$.dimensions.height,targetWidth:D.dimensions.width,targetHeight:D.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&_.push(E)}return _}return e.edges}),u=re(()=>[...a.value,...l.value]),c=re(()=>{const _=[];for(const E of e.nodes)E.selected&&_.push(E);return _}),d=re(()=>{const _=[];for(const E of e.edges)E.selected&&_.push(E);return _}),h=re(()=>[...c.value,...d.value]),g=re(()=>{const _=[];for(const E of e.nodes)E.dimensions.width&&E.dimensions.height&&E.handleBounds!==void 0&&_.push(E);return _}),b=re(()=>a.value.length>0&&g.value.length===a.value.length);return{getNode:o,getEdge:i,getElements:u,getEdgeTypes:r,getNodeTypes:s,getEdges:l,getNodes:a,getSelectedElements:h,getSelectedNodes:c,getSelectedEdges:d,getNodesInitialized:g,areNodesInitialized:b}}class $t{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var t;const n=(t=Ut())==null?void 0:t.appContext.app,o=n?.config.globalProperties.$vueFlowStorage??$t.instance;return $t.instance=o??new $t,n&&(n.config.globalProperties.$vueFlowStorage=$t.instance),$t.instance}set(t,n){return this.flows.set(t,n)}get(t){return this.flows.get(t)}remove(t){return this.flows.delete(t)}create(t,n){const o=Ks(),i=Ra(o),r={};for(const[h,g]of Object.entries(i.hooks)){const b=`on${h.charAt(0).toUpperCase()+h.slice(1)}`;r[b]=g.on}const s={};for(const[h,g]of Object.entries(i.hooks))s[h]=g.trigger;const a=re(()=>{const h=new Map;for(const g of i.nodes)h.set(g.id,g);return h}),l=re(()=>{const h=new Map;for(const g of i.edges)h.set(g.id,g);return h}),u=ph(i,a,l),c=Hf(i,a,l);c.setState({...i,...n});const d={...r,...u,...c,...sl(i),nodeLookup:a,edgeLookup:l,emits:s,id:t,vueFlowVersion:"1.48.2",$destroy:()=>{this.remove(t)}};return this.set(t,d),d}getId(){return`vue-flow-${this.currentId++}`}}function $e(e){const t=$t.getInstance(),n=Wr(),o=typeof e=="object",i=o?e:{id:e},r=i.id,s=r??n?.vueFlowId;let a;if(n){const l=At(_r,null);typeof l<"u"&&l!==null&&(!s||l.id===s)&&(a=l)}if(a||s&&(a=t.get(s)),!a||s&&a.id!==s){const l=r??t.getId(),u=t.create(l,i);a=u,(n??Gr(!0)).run(()=>{we(u.applyDefault,(d,h,g)=>{const b=E=>{u.applyNodeChanges(E)},_=E=>{u.applyEdgeChanges(E)};d?(u.onNodesChange(b),u.onEdgesChange(_)):(u.hooks.value.nodesChange.off(b),u.hooks.value.edgesChange.off(_)),g(()=>{u.hooks.value.nodesChange.off(b),u.hooks.value.edgesChange.off(_)})},{immediate:!0}),an(()=>{if(a){const d=t.get(a.id);d?d.$destroy():En(`No store instance found for id ${a.id} in storage.`)}})})}else o&&a.setState(i);if(n&&(Mt(_r,a),n.vueFlowId=a.id),o){const l=Ut();l?.type.name!=="VueFlow"&&a.emits.error(new ke(Ce.USEVUEFLOW_OPTIONS))}return a}function vh(e){const{emits:t,dimensions:n}=$e();let o;mt(()=>{const i=()=>{var r,s;if(!e.value||!(((s=(r=e.value).checkVisibility)==null?void 0:s.call(r))??!0))return;const a=bo(e.value);(a.width===0||a.height===0)&&t.error(new ke(Ce.MISSING_VIEWPORT_DIMENSIONS)),n.value={width:a.width||500,height:a.height||500}};i(),window.addEventListener("resize",i),e.value&&(o=new ResizeObserver(()=>i()),o.observe(e.value)),Zr(()=>{window.removeEventListener("resize",i),o&&e.value&&o.unobserve(e.value)})})}const mh={name:"UserSelection",compatConfig:{MODE:3}},yh=ve({...mh,props:{userSelectionRect:{}},setup(e){return(t,n)=>(J(),ae("div",{class:"vue-flow__selection vue-flow__container",style:ze({width:`${t.userSelectionRect.width}px`,height:`${t.userSelectionRect.height}px`,transform:`translate(${t.userSelectionRect.x}px, ${t.userSelectionRect.y}px)`})},null,4))}}),wh=["tabIndex"],_h={name:"NodesSelection",compatConfig:{MODE:3}},$h=ve({..._h,setup(e){const{emits:t,viewport:n,getSelectedNodes:o,noPanClassName:i,disableKeyboardA11y:r,userSelectionActive:s}=$e(),a=qs(),l=be(null),u=Us({el:l,onStart(b){t.selectionDragStart(b),t.nodeDragStart(b)},onDrag(b){t.selectionDrag(b),t.nodeDrag(b)},onStop(b){t.selectionDragStop(b),t.nodeDragStop(b)}});mt(()=>{var b;r.value||(b=l.value)==null||b.focus({preventScroll:!0})});const c=re(()=>Ni(o.value)),d=re(()=>({width:`${c.value.width}px`,height:`${c.value.height}px`,top:`${c.value.y}px`,left:`${c.value.x}px`}));function h(b){t.selectionContextMenu({event:b,nodes:o.value})}function g(b){r.value||Rt[b.key]&&(b.preventDefault(),a({x:Rt[b.key].x,y:Rt[b.key].y},b.shiftKey))}return(b,_)=>!P(s)&&c.value.width&&c.value.height?(J(),ae("div",{key:0,class:He(["vue-flow__nodesselection vue-flow__container",P(i)]),style:ze({transform:`translate(${P(n).x}px,${P(n).y}px) scale(${P(n).zoom})`})},[oe("div",{ref_key:"el",ref:l,class:He([{dragging:P(u)},"vue-flow__nodesselection-rect"]),style:ze(d.value),tabIndex:P(r)?void 0:-1,onContextmenu:h,onKeydown:g},null,46,wh)],6)):Se("",!0)}});function bh(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const xh={name:"Pane",compatConfig:{MODE:3}},Eh=ve({...xh,props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:t,nodes:n,viewport:o,emits:i,userSelectionActive:r,removeSelectedElements:s,userSelectionRect:a,elementsSelectable:l,nodesSelectionActive:u,getSelectedEdges:c,getSelectedNodes:d,removeNodes:h,removeEdges:g,selectionMode:b,deleteKeyCode:_,multiSelectionKeyCode:E,multiSelectionActive:$,edgeLookup:D,nodeLookup:m,connectionLookup:k,defaultEdgeOptions:B,connectionStartHandle:U,panOnDrag:L}=$e(),X=gt(null),ee=gt(new Set),F=gt(new Set),G=gt(null),M=me(()=>l.value&&(e.isSelecting||r.value)),te=me(()=>U.value!==null);let f=!1,N=!1;const p=sn(_,{actInsideInputWithModifier:!1}),I=sn(E);we(p,O=>{O&&(h(d.value),g(c.value),u.value=!1)}),we(I,O=>{$.value=O});function S(O,V){return W=>{W.target===V&&O?.(W)}}function z(O){if(f||te.value){f=!1;return}i.paneClick(O),s(),u.value=!1}function w(O){var V;if(Array.isArray(L.value)&&((V=L.value)!=null&&V.includes(2))){O.preventDefault();return}i.paneContextMenu(O)}function T(O){i.paneScroll(O)}function R(O){var V,W,H;if(G.value=((V=t.value)==null?void 0:V.getBoundingClientRect())??null,!l.value||!e.isSelecting||O.button!==0||O.target!==X.value||!G.value)return;(H=(W=O.target)==null?void 0:W.setPointerCapture)==null||H.call(W,O.pointerId);const{x:de,y:ce}=bh(O,G.value);N=!0,f=!1,s(),a.value={width:0,height:0,startX:de,startY:ce,x:de,y:ce},i.selectionStart(O)}function Z(O){var V;if(!G.value||!a.value)return;f=!0;const{x:W,y:H}=We(O,G.value),{startX:de=0,startY:ce=0}=a.value,he={startX:de,startY:ce,x:W<de?W:de,y:H<ce?H:ce,width:Math.abs(W-de),height:Math.abs(H-ce)},se=ee.value,ue=F.value;ee.value=new Set(Bs(n.value,he,o.value,b.value===Si.Partial,!0).map(v=>v.id)),F.value=new Set;const y=((V=B.value)==null?void 0:V.selectable)??!0;for(const v of ee.value){const x=k.value.get(v);if(x)for(const{edgeId:A}of x.values()){const C=D.value.get(A);C&&(C.selectable??y)&&F.value.add(A)}}if(!wr(se,ee.value)){const v=dt(m.value,ee.value,!0);i.nodesChange(v)}if(!wr(ue,F.value)){const v=dt(D.value,F.value);i.edgesChange(v)}a.value=he,r.value=!0,u.value=!1}function Y(O){var V;O.button!==0||!N||((V=O.target)==null||V.releasePointerCapture(O.pointerId),!r.value&&a.value&&O.target===X.value&&z(O),r.value=!1,a.value=null,u.value=ee.value.size>0,i.selectionEnd(O),e.selectionKeyPressed&&(f=!1),N=!1)}return(O,V)=>(J(),ae("div",{ref_key:"container",ref:X,class:He(["vue-flow__pane vue-flow__container",{selection:O.isSelecting}]),onClick:V[0]||(V[0]=W=>M.value?void 0:S(z,X.value)(W)),onContextmenu:V[1]||(V[1]=W=>S(w,X.value)(W)),onWheelPassive:V[2]||(V[2]=W=>S(T,X.value)(W)),onPointerenter:V[3]||(V[3]=W=>M.value?void 0:P(i).paneMouseEnter(W)),onPointerdown:V[4]||(V[4]=W=>M.value?R(W):P(i).paneMouseMove(W)),onPointermove:V[5]||(V[5]=W=>M.value?Z(W):P(i).paneMouseMove(W)),onPointerup:V[6]||(V[6]=W=>M.value?Y(W):void 0),onPointerleave:V[7]||(V[7]=W=>P(i).paneMouseLeave(W))},[xe(O.$slots,"default"),P(r)&&P(a)?(J(),Me(yh,{key:0,"user-selection-rect":P(a)},null,8,["user-selection-rect"])):Se("",!0),P(u)&&P(d).length?(J(),Me($h,{key:1})):Se("",!0)],34))}}),Sh={name:"Transform",compatConfig:{MODE:3}},Nh=ve({...Sh,setup(e){const{viewport:t,fitViewOnInit:n,fitViewOnInitDone:o}=$e(),i=re(()=>n.value?!o.value:!1),r=re(()=>`translate(${t.value.x}px,${t.value.y}px) scale(${t.value.zoom})`);return(s,a)=>(J(),ae("div",{class:"vue-flow__transformationpane vue-flow__container",style:ze({transform:r.value,opacity:i.value?0:void 0})},[xe(s.$slots,"default")],4))}}),Mh={name:"Viewport",compatConfig:{MODE:3}},Ch=ve({...Mh,setup(e){const{minZoom:t,maxZoom:n,defaultViewport:o,translateExtent:i,zoomActivationKeyCode:r,selectionKeyCode:s,panActivationKeyCode:a,panOnScroll:l,panOnScrollMode:u,panOnScrollSpeed:c,panOnDrag:d,zoomOnDoubleClick:h,zoomOnPinch:g,zoomOnScroll:b,preventScrolling:_,noWheelClassName:E,noPanClassName:$,emits:D,connectionStartHandle:m,userSelectionActive:k,paneDragging:B,d3Zoom:U,d3Selection:L,d3ZoomHandler:X,viewport:ee,viewportRef:F,paneClickDistance:G}=$e();vh(F);const M=gt(!1),te=gt(!1);let f=null,N=!1,p=0,I={x:0,y:0,zoom:0};const S=sn(a),z=sn(s),w=sn(r),T=me(()=>(!z.value||z.value&&s.value===!0)&&(S.value||d.value)),R=me(()=>S.value||l.value),Z=me(()=>s.value===!0&&T.value!==!0),Y=me(()=>z.value&&s.value!==!0||k.value||Z.value),O=me(()=>m.value!==null);mt(()=>{if(!F.value){En("Viewport element is missing");return}const ce=F.value,he=ce.getBoundingClientRect(),se=Xd().clickDistance(G.value).scaleExtent([t.value,n.value]).translateExtent(i.value),ue=Be(ce).call(se),y=ue.on("wheel.zoom"),v=Ft.translate(o.value.x??0,o.value.y??0).scale(It(o.value.zoom??1,t.value,n.value)),x=[[0,0],[he.width,he.height]],A=se.constrain()(v,x,i.value);se.transform(ue,A),se.wheelDelta(oi),U.value=se,L.value=ue,X.value=y,ee.value={x:A.x,y:A.y,zoom:A.k},se.on("start",C=>{var K;if(!C.sourceEvent)return null;p=C.sourceEvent.button,M.value=!0;const Q=H(C.transform);((K=C.sourceEvent)==null?void 0:K.type)==="mousedown"&&(B.value=!0),I=Q,D.viewportChangeStart(Q),D.moveStart({event:C,flowTransform:Q})}),se.on("end",C=>{if(!C.sourceEvent)return null;if(M.value=!1,B.value=!1,V(T.value,p??0)&&!N&&D.paneContextMenu(C.sourceEvent),N=!1,W(I,C.transform)){const K=H(C.transform);I=K,D.viewportChangeEnd(K),D.moveEnd({event:C,flowTransform:K})}}),se.filter(C=>{var K;const Q=w.value||b.value,ie=g.value&&C.ctrlKey,ne=C.button,le=C.type==="wheel";if(ne===1&&C.type==="mousedown"&&(de(C,"vue-flow__node")||de(C,"vue-flow__edge")))return!0;if(!T.value&&!Q&&!R.value&&!h.value&&!g.value||k.value||O.value&&!le||!h.value&&C.type==="dblclick"||de(C,E.value)&&le||de(C,$.value)&&(!le||R.value&&le&&!w.value)||!g.value&&C.ctrlKey&&le||!Q&&!R.value&&!ie&&le)return!1;if(!g&&C.type==="touchstart"&&((K=C.touches)==null?void 0:K.length)>1)return C.preventDefault(),!1;if(!T.value&&(C.type==="mousedown"||C.type==="touchstart")||Z.value&&Array.isArray(d.value)&&d.value.includes(0)&&ne===0||Array.isArray(d.value)&&!d.value.includes(ne)&&(C.type==="mousedown"||C.type==="touchstart"))return!1;const ge=Array.isArray(d.value)&&d.value.includes(ne)||s.value===!0&&Array.isArray(d.value)&&!d.value.includes(0)||!ne||ne<=1;return(!C.ctrlKey||S.value||le)&&ge}),we([k,T],()=>{k.value&&!M.value?se.on("zoom",null):k.value||se.on("zoom",C=>{ee.value={x:C.transform.x,y:C.transform.y,zoom:C.transform.k};const K=H(C.transform);N=V(T.value,p??0),D.viewportChange(K),D.move({event:C,flowTransform:K})})},{immediate:!0}),we([k,R,u,w,g,_,E],()=>{R.value&&!w.value&&!k.value?ue.on("wheel.zoom",C=>{if(de(C,E.value))return!1;const K=w.value||b.value,Q=g.value&&C.ctrlKey;if(!(!_.value||R.value||K||Q))return!1;C.preventDefault(),C.stopImmediatePropagation();const ne=ue.property("__zoom").k||1,le=vn();if(!S.value&&C.ctrlKey&&g.value&&le){const Ta=Ge(C),Aa=oi(C),Da=ne*2**Aa;se.scaleTo(ue,Da,Ta,C);return}const ge=C.deltaMode===1?20:1;let ye=u.value===rn.Vertical?0:C.deltaX*ge,at=u.value===rn.Horizontal?0:C.deltaY*ge;!le&&C.shiftKey&&u.value!==rn.Vertical&&!ye&&at&&(ye=at,at=0),se.translateBy(ue,-(ye/ne)*c.value,-(at/ne)*c.value);const Xe=H(ue.property("__zoom"));f&&clearTimeout(f),te.value?(D.move({event:C,flowTransform:Xe}),D.viewportChange(Xe),f=setTimeout(()=>{D.moveEnd({event:C,flowTransform:Xe}),D.viewportChangeEnd(Xe),te.value=!1},150)):(te.value=!0,D.moveStart({event:C,flowTransform:Xe}),D.viewportChangeStart(Xe))},{passive:!1}):typeof y<"u"&&ue.on("wheel.zoom",function(C,K){const Q=!_.value&&C.type==="wheel"&&!C.ctrlKey,ie=w.value||b.value,ne=g.value&&C.ctrlKey;if(!ie&&!l.value&&!ne&&C.type==="wheel"||Q||de(C,E.value))return null;C.preventDefault(),y.call(this,C,K)},{passive:!1})},{immediate:!0})});function V(ce,he){return he===2&&Array.isArray(ce)&&ce.includes(2)}function W(ce,he){return ce.x!==he.x&&!Number.isNaN(he.x)||ce.y!==he.y&&!Number.isNaN(he.y)||ce.zoom!==he.k&&!Number.isNaN(he.k)}function H(ce){return{x:ce.x,y:ce.y,zoom:ce.k}}function de(ce,he){return ce.target.closest(`.${he}`)}return(ce,he)=>(J(),ae("div",{ref_key:"viewportRef",ref:F,class:"vue-flow__viewport vue-flow__container"},[fe(Eh,{"is-selecting":Y.value,"selection-key-pressed":P(z),class:He({connecting:O.value,dragging:P(B),draggable:P(d)===!0||Array.isArray(P(d))&&P(d).includes(0)})},{default:Ie(()=>[fe(Nh,null,{default:Ie(()=>[xe(ce.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),kh=["id"],Ih=["id"],Th=["id"],Ah={name:"A11yDescriptions",compatConfig:{MODE:3}},Dh=ve({...Ah,setup(e){const{id:t,disableKeyboardA11y:n,ariaLiveMessage:o}=$e();return(i,r)=>(J(),ae(Te,null,[oe("div",{id:`${P(Cs)}-${P(t)}`,style:{display:"none"}}," Press enter or space to select a node. "+Ee(P(n)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,kh),oe("div",{id:`${P(ks)}-${P(t)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,Ih),P(n)?Se("",!0):(J(),ae("div",{key:0,id:`${P(Kd)}-${P(t)}`,"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},Ee(P(o)),9,Th))],64))}});function zh(){const e=$e();we(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function Ph(e,t,n){return n===j.Left?e-t:n===j.Right?e+t:e}function Oh(e,t,n){return n===j.Top?e-t:n===j.Bottom?e+t:e}const ki=function({radius:e=10,centerX:t=0,centerY:n=0,position:o=j.Top,type:i}){return _e("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${i}`,cx:Ph(t,e,o),cy:Oh(n,e,o),r:e,stroke:"transparent",fill:"transparent"})};ki.props=["radius","centerX","centerY","position","type"];ki.compatConfig={MODE:3};const Sr=ki,Bh=ve({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const{id:t,addSelectedEdges:n,connectionMode:o,edgeUpdaterRadius:i,emits:r,nodesSelectionActive:s,noPanClassName:a,getEdgeTypes:l,removeSelectedEdges:u,findEdge:c,findNode:d,isValidConnection:h,multiSelectionActive:g,disableKeyboardA11y:b,elementsSelectable:_,edgesUpdatable:E,edgesFocusable:$,hooks:D}=$e(),m=re(()=>c(e.id)),{emit:k,on:B}=Mf(m.value,r),U=At(Eo),L=Ut(),X=be(!1),ee=be(!1),F=be(""),G=be(null),M=be("source"),te=be(null),f=me(()=>typeof m.value.selectable>"u"?_.value:m.value.selectable),N=me(()=>typeof m.value.updatable>"u"?E.value:m.value.updatable),p=me(()=>typeof m.value.focusable>"u"?$.value:m.value.focusable);Mt(Ef,e.id),Mt(Sf,te);const I=re(()=>m.value.class instanceof Function?m.value.class(m.value):m.value.class),S=re(()=>m.value.style instanceof Function?m.value.style(m.value):m.value.style),z=re(()=>{const v=m.value.type||"default",x=U?.[`edge-${v}`];if(x)return x;let A=m.value.template??l.value[v];if(typeof A=="string"&&L){const C=Object.keys(L.appContext.components);C&&C.includes(v)&&(A=qr(v,!1))}return A&&typeof A!="string"?A:(r.error(new ke(Ce.EDGE_TYPE_MISSING,A)),!1)}),{handlePointerDown:w}=Ws({nodeId:F,handleId:G,type:M,isValidConnection:h,edgeUpdaterType:M,onEdgeUpdate:Z,onEdgeUpdateEnd:Y});return()=>{const v=d(m.value.source),x=d(m.value.target),A="pathOptions"in m.value?m.value.pathOptions:{};if(!v&&!x)return r.error(new ke(Ce.EDGE_SOURCE_TARGET_MISSING,m.value.id,m.value.source,m.value.target)),null;if(!v)return r.error(new ke(Ce.EDGE_SOURCE_MISSING,m.value.id,m.value.source)),null;if(!x)return r.error(new ke(Ce.EDGE_TARGET_MISSING,m.value.id,m.value.target)),null;if(!m.value||m.value.hidden||v.hidden||x.hidden)return null;let C;o.value===pt.Strict?C=v.handleBounds.source:C=[...v.handleBounds.source||[],...v.handleBounds.target||[]];const K=hr(C,m.value.sourceHandle);let Q;o.value===pt.Strict?Q=x.handleBounds.target:Q=[...x.handleBounds.target||[],...x.handleBounds.source||[]];const ie=hr(Q,m.value.targetHandle),ne=K?.position||j.Bottom,le=ie?.position||j.Top,{x:ge,y:ye}=Yt(v,K,ne),{x:at,y:Xe}=Yt(x,ie,le);return m.value.sourceX=ge,m.value.sourceY=ye,m.value.targetX=at,m.value.targetY=Xe,_e("g",{ref:te,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${z.value===!1?"default":m.value.type||"default"}`,a.value,I.value,{updating:X.value,selected:m.value.selected,animated:m.value.animated,inactive:!f.value&&!D.value.edgeClick.hasListeners()}],tabIndex:p.value?0:void 0,"aria-label":m.value.ariaLabel===null?void 0:m.value.ariaLabel??`Edge from ${m.value.source} to ${m.value.target}`,"aria-describedby":p.value?`${ks}-${t}`:void 0,"aria-roledescription":"edge",role:p.value?"group":"img",...m.value.domAttributes,onClick:V,onContextmenu:W,onDblclick:H,onMouseenter:de,onMousemove:ce,onMouseleave:he,onKeyDown:p.value?y:void 0},[ee.value?null:_e(z.value===!1?l.value.default:z.value,{id:e.id,sourceNode:v,targetNode:x,source:m.value.source,target:m.value.target,type:m.value.type,updatable:N.value,selected:m.value.selected,animated:m.value.animated,label:m.value.label,labelStyle:m.value.labelStyle,labelShowBg:m.value.labelShowBg,labelBgStyle:m.value.labelBgStyle,labelBgPadding:m.value.labelBgPadding,labelBgBorderRadius:m.value.labelBgBorderRadius,data:m.value.data,events:{...m.value.events,...B},style:S.value,markerStart:`url('#${pn(m.value.markerStart,t)}')`,markerEnd:`url('#${pn(m.value.markerEnd,t)}')`,sourcePosition:ne,targetPosition:le,sourceX:ge,sourceY:ye,targetX:at,targetY:Xe,sourceHandleId:m.value.sourceHandle,targetHandleId:m.value.targetHandle,interactionWidth:m.value.interactionWidth,...A}),[N.value==="source"||N.value===!0?[_e("g",{onMousedown:se,onMouseenter:T,onMouseout:R},_e(Sr,{position:ne,centerX:ge,centerY:ye,radius:i.value,type:"source","data-type":"source"}))]:null,N.value==="target"||N.value===!0?[_e("g",{onMousedown:ue,onMouseenter:T,onMouseout:R},_e(Sr,{position:le,centerX:at,centerY:Xe,radius:i.value,type:"target","data-type":"target"}))]:null]])};function T(){X.value=!0}function R(){X.value=!1}function Z(v,x){k.update({event:v,edge:m.value,connection:x})}function Y(v){k.updateEnd({event:v,edge:m.value}),ee.value=!1}function O(v,x){v.button===0&&(ee.value=!0,F.value=x?m.value.target:m.value.source,G.value=(x?m.value.targetHandle:m.value.sourceHandle)??null,M.value=x?"target":"source",k.updateStart({event:v,edge:m.value}),w(v))}function V(v){var x;const A={event:v,edge:m.value};f.value&&(s.value=!1,m.value.selected&&g.value?(u([m.value]),(x=te.value)==null||x.blur()):n([m.value])),k.click(A)}function W(v){k.contextMenu({event:v,edge:m.value})}function H(v){k.doubleClick({event:v,edge:m.value})}function de(v){k.mouseEnter({event:v,edge:m.value})}function ce(v){k.mouseMove({event:v,edge:m.value})}function he(v){k.mouseLeave({event:v,edge:m.value})}function se(v){O(v,!0)}function ue(v){O(v,!1)}function y(v){var x;!b.value&&Is.includes(v.key)&&f.value&&(v.key==="Escape"?((x=te.value)==null||x.blur(),u([c(e.id)])):n([c(e.id)]))}}}),Rh=Bh,Vh=ve({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:t,connectionMode:n,connectionStartHandle:o,connectionEndHandle:i,connectionPosition:r,connectionLineType:s,connectionLineStyle:a,connectionLineOptions:l,connectionStatus:u,viewport:c,findNode:d}=$e(),h=(e=At(Eo))==null?void 0:e["connection-line"],g=re(()=>{var D;return d((D=o.value)==null?void 0:D.nodeId)}),b=re(()=>{var D;return d((D=i.value)==null?void 0:D.nodeId)??null}),_=re(()=>({x:(r.value.x-c.value.x)/c.value.zoom,y:(r.value.y-c.value.y)/c.value.zoom})),E=re(()=>l.value.markerStart?`url(#${pn(l.value.markerStart,t)})`:""),$=re(()=>l.value.markerEnd?`url(#${pn(l.value.markerEnd,t)})`:"");return()=>{var D,m,k;if(!g.value||!o.value)return null;const B=o.value.id,U=o.value.type,L=g.value.handleBounds;let X=L?.[U]??[];if(n.value===pt.Loose){const S=L?.[U==="source"?"target":"source"]??[];X=[...X,...S]}if(!X)return null;const ee=(B?X.find(S=>S.id===B):X[0])??null,F=ee?.position??j.Top,{x:G,y:M}=Yt(g.value,ee,F);let te=null;b.value&&(n.value===pt.Strict?te=((D=b.value.handleBounds[U==="source"?"target":"source"])==null?void 0:D.find(S=>{var z;return S.id===((z=i.value)==null?void 0:z.id)}))||null:te=((m=[...b.value.handleBounds.source??[],...b.value.handleBounds.target??[]])==null?void 0:m.find(S=>{var z;return S.id===((z=i.value)==null?void 0:z.id)}))||null);const f=((k=i.value)==null?void 0:k.position)??(F?ii[F]:null);if(!F||!f)return null;const N=s.value??l.value.type??wt.Bezier;let p="";const I={sourceX:G,sourceY:M,sourcePosition:F,targetX:_.value.x,targetY:_.value.y,targetPosition:f};return N===wt.Bezier?[p]=js(I):N===wt.Step?[p]=si({...I,borderRadius:0}):N===wt.SmoothStep?[p]=si(I):N===wt.SimpleBezier?[p]=ea(I):p=`M${G},${M} ${_.value.x},${_.value.y}`,_e("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},_e("g",{class:"vue-flow__connection"},h?_e(h,{sourceX:G,sourceY:M,sourcePosition:F,targetX:_.value.x,targetY:_.value.y,targetPosition:f,sourceNode:g.value,sourceHandle:ee,targetNode:b.value,targetHandle:te,markerEnd:$.value,markerStart:E.value,connectionStatus:u.value}):_e("path",{d:p,class:[l.value.class,u.value,"vue-flow__connection-path"],style:{...a.value,...l.value.style},"marker-end":$.value,"marker-start":E.value})))}}}),Hh=Vh,Lh=["id","markerWidth","markerHeight","markerUnits","orient"],Fh={name:"MarkerType",compatConfig:{MODE:3}},Yh=ve({...Fh,props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(t,n)=>(J(),ae("marker",{id:t.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${t.width}`,markerHeight:`${t.height}`,markerUnits:t.markerUnits,orient:t.orient},[t.type===P(fn).ArrowClosed?(J(),ae("polyline",{key:0,style:ze({stroke:t.color,fill:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):Se("",!0),t.type===P(fn).Arrow?(J(),ae("polyline",{key:1,style:ze({stroke:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):Se("",!0)],8,Lh))}}),Xh={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},Gh={name:"MarkerDefinitions",compatConfig:{MODE:3}},Uh=ve({...Gh,setup(e){const{id:t,edges:n,connectionLineOptions:o,defaultMarkerColor:i}=$e(),r=re(()=>{const s=new Set,a=[],l=u=>{if(u){const c=pn(u,t);s.has(c)||(typeof u=="object"?a.push({...u,id:c,color:u.color||i.value}):a.push({id:c,color:i.value,type:u}),s.add(c))}};for(const u of[o.value.markerEnd,o.value.markerStart])l(u);for(const u of n.value)for(const c of[u.markerStart,u.markerEnd])l(c);return a.sort((u,c)=>u.id.localeCompare(c.id))});return(s,a)=>(J(),ae("svg",Xh,[oe("defs",null,[(J(!0),ae(Te,null,$n(r.value,l=>(J(),Me(Yh,{id:l.id,key:l.id,type:l.type,color:l.color,width:l.width,height:l.height,markerUnits:l.markerUnits,"stroke-width":l.strokeWidth,orient:l.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))])]))}}),Wh={name:"Edges",compatConfig:{MODE:3}},Zh=ve({...Wh,setup(e){const{findNode:t,getEdges:n,elevateEdgesOnSelect:o}=$e();return(i,r)=>(J(),ae(Te,null,[fe(Uh),(J(!0),ae(Te,null,$n(P(n),s=>(J(),ae("svg",{key:s.id,class:"vue-flow__edges vue-flow__container",style:ze({zIndex:P(ff)(s,P(t),P(o))})},[fe(P(Rh),{id:s.id},null,8,["id"])],4))),128)),fe(P(Hh))],64))}}),qh=ve({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const{id:t,noPanClassName:n,selectNodesOnDrag:o,nodesSelectionActive:i,multiSelectionActive:r,emits:s,removeSelectedNodes:a,addSelectedNodes:l,updateNodeDimensions:u,onUpdateNodeInternals:c,getNodeTypes:d,nodeExtent:h,elevateNodesOnSelect:g,disableKeyboardA11y:b,ariaLiveMessage:_,snapToGrid:E,snapGrid:$,nodeDragThreshold:D,nodesDraggable:m,elementsSelectable:k,nodesConnectable:B,nodesFocusable:U,hooks:L}=$e(),X=be(null);Mt(Gs,X),Mt(Xs,e.id);const ee=At(Eo),F=Ut(),G=qs(),{node:M,parentNode:te}=Zs(e.id),{emit:f,on:N}=Tf(M,s),p=me(()=>typeof M.draggable>"u"?m.value:M.draggable),I=me(()=>typeof M.selectable>"u"?k.value:M.selectable),S=me(()=>typeof M.connectable>"u"?B.value:M.connectable),z=me(()=>typeof M.focusable>"u"?U.value:M.focusable),w=re(()=>I.value||p.value||L.value.nodeClick.hasListeners()||L.value.nodeDoubleClick.hasListeners()||L.value.nodeMouseEnter.hasListeners()||L.value.nodeMouseMove.hasListeners()||L.value.nodeMouseLeave.hasListeners()),T=me(()=>!!M.dimensions.width&&!!M.dimensions.height),R=re(()=>{const x=M.type||"default",A=ee?.[`node-${x}`];if(A)return A;let C=M.template||d.value[x];if(typeof C=="string"&&F){const K=Object.keys(F.appContext.components);K&&K.includes(x)&&(C=qr(x,!1))}return C&&typeof C!="string"?C:(s.error(new ke(Ce.NODE_TYPE_MISSING,C)),!1)}),Z=Us({id:e.id,el:X,disabled:()=>!p.value,selectable:I,dragHandle:()=>M.dragHandle,onStart(x){f.dragStart(x)},onDrag(x){f.drag(x)},onStop(x){f.dragStop(x)},onClick(x){y(x)}}),Y=re(()=>M.class instanceof Function?M.class(M):M.class),O=re(()=>{const x=(M.style instanceof Function?M.style(M):M.style)||{},A=M.width instanceof Function?M.width(M):M.width,C=M.height instanceof Function?M.height(M):M.height;return!x.width&&A&&(x.width=typeof A=="string"?A:`${A}px`),!x.height&&C&&(x.height=typeof C=="string"?C:`${C}px`),x}),V=me(()=>Number(M.zIndex??O.value.zIndex??0));return c(x=>{(x.includes(e.id)||!x.length)&&H()}),mt(()=>{we(()=>M.hidden,(x=!1,A,C)=>{!x&&X.value&&(e.resizeObserver.observe(X.value),C(()=>{X.value&&e.resizeObserver.unobserve(X.value)}))},{immediate:!0,flush:"post"})}),we([()=>M.type,()=>M.sourcePosition,()=>M.targetPosition],()=>{qe(()=>{u([{id:e.id,nodeElement:X.value,forceUpdate:!0}])})}),we([()=>M.position.x,()=>M.position.y,()=>{var x;return(x=te.value)==null?void 0:x.computedPosition.x},()=>{var x;return(x=te.value)==null?void 0:x.computedPosition.y},()=>{var x;return(x=te.value)==null?void 0:x.computedPosition.z},V,()=>M.selected,()=>M.dimensions.height,()=>M.dimensions.width,()=>{var x;return(x=te.value)==null?void 0:x.dimensions.height},()=>{var x;return(x=te.value)==null?void 0:x.dimensions.width}],([x,A,C,K,Q,ie])=>{const ne={x,y:A,z:ie+(g.value&&M.selected?1e3:0)};typeof C<"u"&&typeof K<"u"?M.computedPosition=sf({x:C,y:K,z:Q},ne):M.computedPosition=ne},{flush:"post",immediate:!0}),we([()=>M.extent,h],([x,A],[C,K])=>{(x!==C||A!==K)&&W()}),M.extent==="parent"||typeof M.extent=="object"&&"range"in M.extent&&M.extent.range==="parent"?Wo(()=>T).toBe(!0).then(W):W(),()=>M.hidden?null:_e("div",{ref:X,"data-id":M.id,class:["vue-flow__node",`vue-flow__node-${R.value===!1?"default":M.type||"default"}`,{[n.value]:p.value,dragging:Z?.value,draggable:p.value,selected:M.selected,selectable:I.value,parent:M.isParent},Y.value],style:{visibility:T.value?"visible":"hidden",zIndex:M.computedPosition.z??V.value,transform:`translate(${M.computedPosition.x}px,${M.computedPosition.y}px)`,pointerEvents:w.value?"all":"none",...O.value},tabIndex:z.value?0:void 0,role:z.value?"group":void 0,"aria-describedby":b.value?void 0:`${Cs}-${t}`,"aria-label":M.ariaLabel,"aria-roledescription":"node",...M.domAttributes,onMouseenter:de,onMousemove:ce,onMouseleave:he,onContextmenu:se,onClick:y,onDblclick:ue,onKeydown:v},[_e(R.value===!1?d.value.default:R.value,{id:M.id,type:M.type,data:M.data,events:{...M.events,...N},selected:M.selected,resizing:M.resizing,dragging:Z.value,connectable:S.value,position:M.computedPosition,dimensions:M.dimensions,isValidTargetPos:M.isValidTargetPos,isValidSourcePos:M.isValidSourcePos,parent:M.parentNode,parentNodeId:M.parentNode,zIndex:M.computedPosition.z??V.value,targetPosition:M.targetPosition,sourcePosition:M.sourcePosition,label:M.label,dragHandle:M.dragHandle,onUpdateNodeInternals:H})]);function W(){const x=M.computedPosition,{computedPosition:A,position:C}=Mi(M,E.value?xo(x,$.value):x,s.error,h.value,te.value);(M.computedPosition.x!==A.x||M.computedPosition.y!==A.y)&&(M.computedPosition={...M.computedPosition,...A}),(M.position.x!==C.x||M.position.y!==C.y)&&(M.position=C)}function H(){X.value&&u([{id:e.id,nodeElement:X.value,forceUpdate:!0}])}function de(x){Z?.value||f.mouseEnter({event:x,node:M})}function ce(x){Z?.value||f.mouseMove({event:x,node:M})}function he(x){Z?.value||f.mouseLeave({event:x,node:M})}function se(x){return f.contextMenu({event:x,node:M})}function ue(x){return f.doubleClick({event:x,node:M})}function y(x){I.value&&(!o.value||!p.value||D.value>0)&&ri(M,r.value,l,a,i,!1,X.value),f.click({event:x,node:M})}function v(x){if(!(ni(x)||b.value))if(Is.includes(x.key)&&I.value){const A=x.key==="Escape";ri(M,r.value,l,a,i,A,X.value)}else p.value&&M.selected&&Rt[x.key]&&(x.preventDefault(),_.value=`Moved selected node ${x.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~M.position.x}, y: ${~~M.position.y}`,G({x:Rt[x.key].x,y:Rt[x.key].y},x.shiftKey))}}}),Kh=qh;function Jh(e={includeHiddenNodes:!1}){const{nodes:t}=$e();return re(()=>{if(t.value.length===0)return!1;for(const n of t.value)if((e.includeHiddenNodes||!n.hidden)&&(n?.handleBounds===void 0||n.dimensions.width===0||n.dimensions.height===0))return!1;return!0})}const Qh={class:"vue-flow__nodes vue-flow__container"},jh={name:"Nodes",compatConfig:{MODE:3}},eg=ve({...jh,setup(e){const{getNodes:t,updateNodeDimensions:n,emits:o}=$e(),i=Jh(),r=be();return we(i,s=>{s&&qe(()=>{o.nodesInitialized(t.value)})},{immediate:!0}),mt(()=>{r.value=new ResizeObserver(s=>{const a=s.map(l=>({id:l.target.getAttribute("data-id"),nodeElement:l.target,forceUpdate:!0}));qe(()=>n(a))})}),Zr(()=>{var s;return(s=r.value)==null?void 0:s.disconnect()}),(s,a)=>(J(),ae("div",Qh,[r.value?(J(!0),ae(Te,{key:0},$n(P(t),(l,u,c,d)=>{const h=[l.id];if(d&&d.key===l.id&&Ba(d,h))return d;const g=(J(),Me(P(Kh),{id:l.id,key:l.id,"resize-observer":r.value},null,8,["id","resize-observer"]));return g.memo=h,g},a,0),128)):Se("",!0)]))}});function tg(){const{emits:e}=$e();mt(()=>{if(Ys()){const t=document.querySelector(".vue-flow__pane");t&&window.getComputedStyle(t).zIndex!=="1"&&e.error(new ke(Ce.MISSING_STYLES))}})}const ng=oe("div",{class:"vue-flow__edge-labels"},null,-1),og={name:"VueFlow",compatConfig:{MODE:3}},ig=ve({...og,props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{type:[Boolean,null],default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},paneClickDistance:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},autoPanSpeed:{}},emits:["nodesChange","edgesChange","nodesInitialized","paneReady","init","updateNodeInternals","error","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeUpdate","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdateEnd","nodeContextMenu","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeDoubleClick","nodeClick","nodeDragStart","nodeDrag","nodeDragStop","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","update:modelValue","update:nodes","update:edges"],setup(e,{expose:t,emit:n}){const o=e,i=Ur(),r=Ao(o,"modelValue",n),s=Ao(o,"nodes",n),a=Ao(o,"edges",n),l=$e(o),u=Pf({modelValue:r,nodes:s,edges:a},o,l);return Bf(n,l.hooks),zh(),tg(),Mt(Eo,i),za(u),t(l),(c,d)=>(J(),ae("div",{ref:P(l).vueFlowRef,class:"vue-flow"},[fe(Ch,null,{default:Ie(()=>[fe(Zh),ng,fe(eg),xe(c.$slots,"zoom-pane")]),_:3}),xe(c.$slots,"default"),fe(Dh)],512))}}),rg={name:"Panel",compatConfig:{MODE:3}},na=ve({...rg,props:{position:{}},setup(e){const t=e,{userSelectionActive:n}=$e(),o=re(()=>`${t.position}`.split("-"));return(i,r)=>(J(),ae("div",{class:He(["vue-flow__panel",o.value]),style:ze({pointerEvents:P(n)?"none":"all"})},[xe(i.$slots,"default")],6))}});var Ze=(e=>(e.Lines="lines",e.Dots="dots",e))(Ze||{});const oa=function({dimensions:e,size:t,color:n}){return _e("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},ia=function({radius:e,color:t}){return _e("circle",{cx:e,cy:e,r:e,fill:t})};Ze.Lines+"",Ze.Dots+"";const sg={[Ze.Dots]:"#81818a",[Ze.Lines]:"#eee"},ag=["id","x","y","width","height","patternTransform"],lg={key:2,height:"100",width:"100"},ug=["fill"],cg=["x","y","fill"],dg={name:"Background",compatConfig:{MODE:3}},fg=ve({...dg,props:{id:{},variant:{default:()=>Ze.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const{id:t,viewport:n}=$e(),o=re(()=>{const s=n.value.zoom,[a,l]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],u=[a*s||1,l*s||1],c=e.size*s,[d,h]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],g=[d*s||1+u[0]/2,h*s||1+u[1]/2];return{scaledGap:u,offset:g,size:c}}),i=me(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),r=me(()=>e.color||e.patternColor||sg[e.variant||Ze.Dots]);return(s,a)=>(J(),ae("svg",{class:"vue-flow__background vue-flow__container",style:ze({height:`${s.height>100?100:s.height}%`,width:`${s.width>100?100:s.width}%`})},[xe(s.$slots,"pattern-container",{id:i.value},()=>[oe("pattern",{id:i.value,x:P(n).x%o.value.scaledGap[0],y:P(n).y%o.value.scaledGap[1],width:o.value.scaledGap[0],height:o.value.scaledGap[1],patternTransform:`translate(-${o.value.offset[0]},-${o.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[xe(s.$slots,"pattern",{},()=>[s.variant===P(Ze).Lines?(J(),Me(P(oa),{key:0,size:s.lineWidth,color:r.value,dimensions:o.value.scaledGap},null,8,["size","color","dimensions"])):s.variant===P(Ze).Dots?(J(),Me(P(ia),{key:1,color:r.value,radius:o.value.size/2},null,8,["color","radius"])):Se("",!0),s.bgColor?(J(),ae("svg",lg,[oe("rect",{width:"100%",height:"100%",fill:s.bgColor},null,8,ug)])):Se("",!0)])],8,ag)]),oe("rect",{x:s.x,y:s.y,width:"100%",height:"100%",fill:`url(#${i.value})`},null,8,cg),xe(s.$slots,"default",{id:i.value})],4))}}),hg={name:"ControlButton",compatConfig:{MODE:3}},gg=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},pg={type:"button",class:"vue-flow__controls-button"};function vg(e,t,n,o,i,r){return J(),ae("button",pg,[xe(e.$slots,"default")])}const Bn=gg(hg,[["render",vg]]),mg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},yg=oe("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),wg=[yg];function _g(e,t){return J(),ae("svg",mg,wg)}const $g={render:_g},bg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},xg=oe("path",{d:"M0 0h32v4.2H0z"},null,-1),Eg=[xg];function Sg(e,t){return J(),ae("svg",bg,Eg)}const Ng={render:Sg},Mg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},Cg=oe("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 0 0 27.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.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1),kg=[Cg];function Ig(e,t){return J(),ae("svg",Mg,kg)}const Tg={render:Ig},Ag={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},Dg=oe("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 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-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"},null,-1),zg=[Dg];function Pg(e,t){return J(),ae("svg",Ag,zg)}const Og={render:Pg},Bg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},Rg=oe("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 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1),Vg=[Rg];function Hg(e,t){return J(),ae("svg",Bg,Vg)}const Lg={render:Hg},Fg={name:"Controls",compatConfig:{MODE:3}},Yg=ve({...Fg,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:{},position:{default:()=>Ms.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(e,{emit:t}){const{nodesDraggable:n,nodesConnectable:o,elementsSelectable:i,setInteractive:r,zoomIn:s,zoomOut:a,fitView:l,viewport:u,minZoom:c,maxZoom:d}=$e(),h=me(()=>n.value||o.value||i.value),g=me(()=>u.value.zoom<=c.value),b=me(()=>u.value.zoom>=d.value);function _(){s(),t("zoomIn")}function E(){a(),t("zoomOut")}function $(){l(e.fitViewParams),t("fitView")}function D(){r(!h.value),t("interactionChange",!h.value)}return(m,k)=>(J(),Me(P(na),{class:"vue-flow__controls",position:m.position},{default:Ie(()=>[xe(m.$slots,"top"),m.showZoom?(J(),ae(Te,{key:0},[xe(m.$slots,"control-zoom-in",{},()=>[fe(Bn,{class:"vue-flow__controls-zoomin",disabled:b.value,onClick:_},{default:Ie(()=>[xe(m.$slots,"icon-zoom-in",{},()=>[(J(),Me(yt(P($g))))])]),_:3},8,["disabled"])]),xe(m.$slots,"control-zoom-out",{},()=>[fe(Bn,{class:"vue-flow__controls-zoomout",disabled:g.value,onClick:E},{default:Ie(()=>[xe(m.$slots,"icon-zoom-out",{},()=>[(J(),Me(yt(P(Ng))))])]),_:3},8,["disabled"])])],64)):Se("",!0),m.showFitView?xe(m.$slots,"control-fit-view",{key:1},()=>[fe(Bn,{class:"vue-flow__controls-fitview",onClick:$},{default:Ie(()=>[xe(m.$slots,"icon-fit-view",{},()=>[(J(),Me(yt(P(Tg))))])]),_:3})]):Se("",!0),m.showInteractive?xe(m.$slots,"control-interactive",{key:2},()=>[m.showInteractive?(J(),Me(Bn,{key:0,class:"vue-flow__controls-interactive",onClick:D},{default:Ie(()=>[h.value?xe(m.$slots,"icon-unlock",{key:0},()=>[(J(),Me(yt(P(Lg))))]):Se("",!0),h.value?Se("",!0):xe(m.$slots,"icon-lock",{key:1},()=>[(J(),Me(yt(P(Og))))])]),_:3})):Se("",!0)]):Se("",!0),xe(m.$slots,"default")]),_:3},8,["position"]))}});var Xg={value:()=>{}};function Ii(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Kn(n)}function Kn(e){this._=e}function Gg(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Kn.prototype=Ii.prototype={constructor:Kn,on:function(e,t){var n=this._,o=Gg(e+"",n),i,r=-1,s=o.length;if(arguments.length<2){for(;++r<s;)if((i=(e=o[r]).type)&&(i=Ug(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++r<s;)if(i=(e=o[r]).type)n[i]=Nr(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Nr(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 Kn(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),o=0,i,r;o<i;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,r=o.length;i<r;++i)o[i].value.apply(t,n)}};function Ug(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function Nr(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=Xg,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var ai="http://www.w3.org/1999/xhtml";const Mr={svg:"http://www.w3.org/2000/svg",xhtml:ai,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ko(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Mr.hasOwnProperty(t)?{space:Mr[t],local:e}:e}function Wg(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ai&&t.documentElement.namespaceURI===ai?t.createElement(e):t.createElementNS(n,e)}}function Zg(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ra(e){var t=ko(e);return(t.local?Zg:Wg)(t)}function qg(){}function Ti(e){return e==null?qg:function(){return this.querySelector(e)}}function Kg(e){typeof e!="function"&&(e=Ti(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,a=o[i]=new Array(s),l,u,c=0;c<s;++c)(l=r[c])&&(u=e.call(l,l.__data__,c,r))&&("__data__"in l&&(u.__data__=l.__data__),a[c]=u);return new Oe(o,this._parents)}function Jg(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Qg(){return[]}function sa(e){return e==null?Qg:function(){return this.querySelectorAll(e)}}function jg(e){return function(){return Jg(e.apply(this,arguments))}}function ep(e){typeof e=="function"?e=jg(e):e=sa(e);for(var t=this._groups,n=t.length,o=[],i=[],r=0;r<n;++r)for(var s=t[r],a=s.length,l,u=0;u<a;++u)(l=s[u])&&(o.push(e.call(l,l.__data__,u,s)),i.push(l));return new Oe(o,i)}function aa(e){return function(){return this.matches(e)}}function la(e){return function(t){return t.matches(e)}}var tp=Array.prototype.find;function np(e){return function(){return tp.call(this.children,e)}}function op(){return this.firstElementChild}function ip(e){return this.select(e==null?op:np(typeof e=="function"?e:la(e)))}var rp=Array.prototype.filter;function sp(){return Array.from(this.children)}function ap(e){return function(){return rp.call(this.children,e)}}function lp(e){return this.selectAll(e==null?sp:ap(typeof e=="function"?e:la(e)))}function up(e){typeof e!="function"&&(e=aa(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,a=o[i]=[],l,u=0;u<s;++u)(l=r[u])&&e.call(l,l.__data__,u,r)&&a.push(l);return new Oe(o,this._parents)}function ua(e){return new Array(e.length)}function cp(){return new Oe(this._enter||this._groups.map(ua),this._parents)}function fo(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}fo.prototype={constructor:fo,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 dp(e){return function(){return e}}function fp(e,t,n,o,i,r){for(var s=0,a,l=t.length,u=r.length;s<u;++s)(a=t[s])?(a.__data__=r[s],o[s]=a):n[s]=new fo(e,r[s]);for(;s<l;++s)(a=t[s])&&(i[s]=a)}function hp(e,t,n,o,i,r,s){var a,l,u=new Map,c=t.length,d=r.length,h=new Array(c),g;for(a=0;a<c;++a)(l=t[a])&&(h[a]=g=s.call(l,l.__data__,a,t)+"",u.has(g)?i[a]=l:u.set(g,l));for(a=0;a<d;++a)g=s.call(e,r[a],a,r)+"",(l=u.get(g))?(o[a]=l,l.__data__=r[a],u.delete(g)):n[a]=new fo(e,r[a]);for(a=0;a<c;++a)(l=t[a])&&u.get(h[a])===l&&(i[a]=l)}function gp(e){return e.__data__}function pp(e,t){if(!arguments.length)return Array.from(this,gp);var n=t?hp:fp,o=this._parents,i=this._groups;typeof e!="function"&&(e=dp(e));for(var r=i.length,s=new Array(r),a=new Array(r),l=new Array(r),u=0;u<r;++u){var c=o[u],d=i[u],h=d.length,g=vp(e.call(c,c&&c.__data__,u,o)),b=g.length,_=a[u]=new Array(b),E=s[u]=new Array(b),$=l[u]=new Array(h);n(c,d,_,E,$,g,t);for(var D=0,m=0,k,B;D<b;++D)if(k=_[D]){for(D>=m&&(m=D+1);!(B=E[m])&&++m<b;);k._next=B||null}}return s=new Oe(s,o),s._enter=a,s._exit=l,s}function vp(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function mp(){return new Oe(this._exit||this._groups.map(ua),this._parents)}function yp(e,t,n){var o=this.enter(),i=this,r=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?r.remove():n(r),o&&i?o.merge(i).order():i}function wp(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,r=o.length,s=Math.min(i,r),a=new Array(i),l=0;l<s;++l)for(var u=n[l],c=o[l],d=u.length,h=a[l]=new Array(d),g,b=0;b<d;++b)(g=u[b]||c[b])&&(h[b]=g);for(;l<i;++l)a[l]=n[l];return new Oe(a,this._parents)}function _p(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],i=o.length-1,r=o[i],s;--i>=0;)(s=o[i])&&(r&&s.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(s,r),r=s);return this}function $p(e){e||(e=bp);function t(d,h){return d&&h?e(d.__data__,h.__data__):!d-!h}for(var n=this._groups,o=n.length,i=new Array(o),r=0;r<o;++r){for(var s=n[r],a=s.length,l=i[r]=new Array(a),u,c=0;c<a;++c)(u=s[c])&&(l[c]=u);l.sort(t)}return new Oe(i,this._parents).order()}function bp(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function xp(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ep(){return Array.from(this)}function Sp(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length;i<r;++i){var s=o[i];if(s)return s}return null}function Np(){let e=0;for(const t of this)++e;return e}function Mp(){return!this.node()}function Cp(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i=t[n],r=0,s=i.length,a;r<s;++r)(a=i[r])&&e.call(a,a.__data__,r,i);return this}function kp(e){return function(){this.removeAttribute(e)}}function Ip(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Tp(e,t){return function(){this.setAttribute(e,t)}}function Ap(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Dp(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function zp(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 Pp(e,t){var n=ko(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?Ip:kp:typeof t=="function"?n.local?zp:Dp:n.local?Ap:Tp)(n,t))}function ca(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Op(e){return function(){this.style.removeProperty(e)}}function Bp(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Rp(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Vp(e,t,n){return arguments.length>1?this.each((t==null?Op:typeof t=="function"?Rp:Bp)(e,t,n??"")):Xt(this.node(),e)}function Xt(e,t){return e.style.getPropertyValue(t)||ca(e).getComputedStyle(e,null).getPropertyValue(t)}function Hp(e){return function(){delete this[e]}}function Lp(e,t){return function(){this[e]=t}}function Fp(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Yp(e,t){return arguments.length>1?this.each((t==null?Hp:typeof t=="function"?Fp:Lp)(e,t)):this.node()[e]}function da(e){return e.trim().split(/^|\s+/)}function Ai(e){return e.classList||new fa(e)}function fa(e){this._node=e,this._names=da(e.getAttribute("class")||"")}fa.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 ha(e,t){for(var n=Ai(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function ga(e,t){for(var n=Ai(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function Xp(e){return function(){ha(this,e)}}function Gp(e){return function(){ga(this,e)}}function Up(e,t){return function(){(t.apply(this,arguments)?ha:ga)(this,e)}}function Wp(e,t){var n=da(e+"");if(arguments.length<2){for(var o=Ai(this.node()),i=-1,r=n.length;++i<r;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Up:t?Xp:Gp)(n,t))}function Zp(){this.textContent=""}function qp(e){return function(){this.textContent=e}}function Kp(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Jp(e){return arguments.length?this.each(e==null?Zp:(typeof e=="function"?Kp:qp)(e)):this.node().textContent}function Qp(){this.innerHTML=""}function jp(e){return function(){this.innerHTML=e}}function ev(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function tv(e){return arguments.length?this.each(e==null?Qp:(typeof e=="function"?ev:jp)(e)):this.node().innerHTML}function nv(){this.nextSibling&&this.parentNode.appendChild(this)}function ov(){return this.each(nv)}function iv(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function rv(){return this.each(iv)}function sv(e){var t=typeof e=="function"?e:ra(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function av(){return null}function lv(e,t){var n=typeof e=="function"?e:ra(e),o=t==null?av:typeof t=="function"?t:Ti(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function uv(){var e=this.parentNode;e&&e.removeChild(this)}function cv(){return this.each(uv)}function dv(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function fv(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function hv(e){return this.select(e?fv:dv)}function gv(e){return arguments.length?this.property("__data__",e):this.node().__data__}function pv(e){return function(t){e.call(this,t,this.__data__)}}function vv(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function mv(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,r;n<i;++n)r=t[n],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):t[++o]=r;++o?t.length=o:delete this.__on}}}function yv(e,t,n){return function(){var o=this.__on,i,r=pv(t);if(o){for(var s=0,a=o.length;s<a;++s)if((i=o[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=r,i.options=n),i.value=t;return}}this.addEventListener(e.type,r,n),i={type:e.type,name:e.name,value:t,listener:r,options:n},o?o.push(i):this.__on=[i]}}function wv(e,t,n){var o=vv(e+""),i,r=o.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,u=a.length,c;l<u;++l)for(i=0,c=a[l];i<r;++i)if((s=o[i]).type===c.type&&s.name===c.name)return c.value}return}for(a=t?yv:mv,i=0;i<r;++i)this.each(a(o[i],t,n));return this}function pa(e,t,n){var o=ca(e),i=o.CustomEvent;typeof i=="function"?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function _v(e,t){return function(){return pa(this,e,t)}}function $v(e,t){return function(){return pa(this,e,t.apply(this,arguments))}}function bv(e,t){return this.each((typeof t=="function"?$v:_v)(e,t))}function*xv(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length,s;i<r;++i)(s=o[i])&&(yield s)}var va=[null];function Oe(e,t){this._groups=e,this._parents=t}function Sn(){return new Oe([[document.documentElement]],va)}function Ev(){return this}Oe.prototype=Sn.prototype={constructor:Oe,select:Kg,selectAll:ep,selectChild:ip,selectChildren:lp,filter:up,data:pp,enter:cp,exit:mp,join:yp,merge:wp,selection:Ev,order:_p,sort:$p,call:xp,nodes:Ep,node:Sp,size:Np,empty:Mp,each:Cp,attr:Pp,style:Vp,property:Yp,classed:Wp,text:Jp,html:tv,raise:ov,lower:rv,append:sv,insert:lv,remove:cv,clone:hv,datum:gv,on:wv,dispatch:bv,[Symbol.iterator]:xv};function ht(e){return typeof e=="string"?new Oe([[document.querySelector(e)]],[document.documentElement]):new Oe([[e]],va)}function Sv(e){let t;for(;t=e.sourceEvent;)e=t;return e}function ct(e,t){if(e=Sv(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.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 li={capture:!0,passive:!1};function ui(e){e.preventDefault(),e.stopImmediatePropagation()}function Nv(e){var t=e.document.documentElement,n=ht(e).on("dragstart.drag",ui,li);"onselectstart"in t?n.on("selectstart.drag",ui,li):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Mv(e,t){var n=e.document.documentElement,o=ht(e).on("dragstart.drag",null);t&&(o.on("click.drag",ui,li),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Di(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ma(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Nn(){}var mn=.7,ho=1/mn,Vt="\\s*([+-]?\\d+)\\s*",yn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Je="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Cv=/^#([0-9a-f]{3,8})$/,kv=new RegExp(`^rgb\\(${Vt},${Vt},${Vt}\\)$`),Iv=new RegExp(`^rgb\\(${Je},${Je},${Je}\\)$`),Tv=new RegExp(`^rgba\\(${Vt},${Vt},${Vt},${yn}\\)$`),Av=new RegExp(`^rgba\\(${Je},${Je},${Je},${yn}\\)$`),Dv=new RegExp(`^hsl\\(${yn},${Je},${Je}\\)$`),zv=new RegExp(`^hsla\\(${yn},${Je},${Je},${yn}\\)$`),Cr={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};Di(Nn,wn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:kr,formatHex:kr,formatHex8:Pv,formatHsl:Ov,formatRgb:Ir,toString:Ir});function kr(){return this.rgb().formatHex()}function Pv(){return this.rgb().formatHex8()}function Ov(){return ya(this).formatHsl()}function Ir(){return this.rgb().formatRgb()}function wn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Cv.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Tr(t):n===3?new De(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Rn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Rn(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=kv.exec(e))?new De(t[1],t[2],t[3],1):(t=Iv.exec(e))?new De(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Tv.exec(e))?Rn(t[1],t[2],t[3],t[4]):(t=Av.exec(e))?Rn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Dv.exec(e))?zr(t[1],t[2]/100,t[3]/100,1):(t=zv.exec(e))?zr(t[1],t[2]/100,t[3]/100,t[4]):Cr.hasOwnProperty(e)?Tr(Cr[e]):e==="transparent"?new De(NaN,NaN,NaN,0):null}function Tr(e){return new De(e>>16&255,e>>8&255,e&255,1)}function Rn(e,t,n,o){return o<=0&&(e=t=n=NaN),new De(e,t,n,o)}function Bv(e){return e instanceof Nn||(e=wn(e)),e?(e=e.rgb(),new De(e.r,e.g,e.b,e.opacity)):new De}function ci(e,t,n,o){return arguments.length===1?Bv(e):new De(e,t,n,o??1)}function De(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}Di(De,ci,ma(Nn,{brighter(e){return e=e==null?ho:Math.pow(ho,e),new De(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?mn:Math.pow(mn,e),new De(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new De(Nt(this.r),Nt(this.g),Nt(this.b),go(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:Ar,formatHex:Ar,formatHex8:Rv,formatRgb:Dr,toString:Dr}));function Ar(){return`#${xt(this.r)}${xt(this.g)}${xt(this.b)}`}function Rv(){return`#${xt(this.r)}${xt(this.g)}${xt(this.b)}${xt((isNaN(this.opacity)?1:this.opacity)*255)}`}function Dr(){const e=go(this.opacity);return`${e===1?"rgb(":"rgba("}${Nt(this.r)}, ${Nt(this.g)}, ${Nt(this.b)}${e===1?")":`, ${e})`}`}function go(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Nt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xt(e){return e=Nt(e),(e<16?"0":"")+e.toString(16)}function zr(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ve(e,t,n,o)}function ya(e){if(e instanceof Ve)return new Ve(e.h,e.s,e.l,e.opacity);if(e instanceof Nn||(e=wn(e)),!e)return new Ve;if(e instanceof Ve)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),r=Math.max(t,n,o),s=NaN,a=r-i,l=(r+i)/2;return a?(t===r?s=(n-o)/a+(n<o)*6:n===r?s=(o-t)/a+2:s=(t-n)/a+4,a/=l<.5?r+i:2-r-i,s*=60):a=l>0&&l<1?0:s,new Ve(s,a,l,e.opacity)}function Vv(e,t,n,o){return arguments.length===1?ya(e):new Ve(e,t,n,o??1)}function Ve(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Di(Ve,Vv,ma(Nn,{brighter(e){return e=e==null?ho:Math.pow(ho,e),new Ve(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?mn:Math.pow(mn,e),new Ve(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,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new De(Yo(e>=240?e-240:e+120,i,o),Yo(e,i,o),Yo(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new Ve(Pr(this.h),Vn(this.s),Vn(this.l),go(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=go(this.opacity);return`${e===1?"hsl(":"hsla("}${Pr(this.h)}, ${Vn(this.s)*100}%, ${Vn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Pr(e){return e=(e||0)%360,e<0?e+360:e}function Vn(e){return Math.max(0,Math.min(1,e||0))}function Yo(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 wa=e=>()=>e;function Hv(e,t){return function(n){return e+n*t}}function Lv(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function Fv(e){return(e=+e)==1?_a:function(t,n){return n-t?Lv(t,n,e):wa(isNaN(t)?n:t)}}function _a(e,t){var n=t-e;return n?Hv(e,n):wa(isNaN(e)?t:e)}const Or=(function e(t){var n=Fv(t);function o(i,r){var s=n((i=ci(i)).r,(r=ci(r)).r),a=n(i.g,r.g),l=n(i.b,r.b),u=_a(i.opacity,r.opacity);return function(c){return i.r=s(c),i.g=a(c),i.b=l(c),i.opacity=u(c),i+""}}return o.gamma=e,o})(1);function ft(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var di=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xo=new RegExp(di.source,"g");function Yv(e){return function(){return e}}function Xv(e){return function(t){return e(t)+""}}function Gv(e,t){var n=di.lastIndex=Xo.lastIndex=0,o,i,r,s=-1,a=[],l=[];for(e=e+"",t=t+"";(o=di.exec(e))&&(i=Xo.exec(t));)(r=i.index)>n&&(r=t.slice(n,r),a[s]?a[s]+=r:a[++s]=r),(o=o[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:ft(o,i)})),n=Xo.lastIndex;return n<t.length&&(r=t.slice(n),a[s]?a[s]+=r:a[++s]=r),a.length<2?l[0]?Xv(l[0].x):Yv(t):(t=l.length,function(u){for(var c=0,d;c<t;++c)a[(d=l[c]).i]=d.x(u);return a.join("")})}var Br=180/Math.PI,fi={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function $a(e,t,n,o,i,r){var s,a,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*o)&&(n-=e*l,o-=t*l),(a=Math.sqrt(n*n+o*o))&&(n/=a,o/=a,l/=a),e*o<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:i,translateY:r,rotate:Math.atan2(t,e)*Br,skewX:Math.atan(l)*Br,scaleX:s,scaleY:a}}var Hn;function Uv(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?fi:$a(t.a,t.b,t.c,t.d,t.e,t.f)}function Wv(e){return e==null||(Hn||(Hn=document.createElementNS("http://www.w3.org/2000/svg","g")),Hn.setAttribute("transform",e),!(e=Hn.transform.baseVal.consolidate()))?fi:(e=e.matrix,$a(e.a,e.b,e.c,e.d,e.e,e.f))}function ba(e,t,n,o){function i(u){return u.length?u.pop()+" ":""}function r(u,c,d,h,g,b){if(u!==d||c!==h){var _=g.push("translate(",null,t,null,n);b.push({i:_-4,x:ft(u,d)},{i:_-2,x:ft(c,h)})}else(d||h)&&g.push("translate("+d+t+h+n)}function s(u,c,d,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:d.push(i(d)+"rotate(",null,o)-2,x:ft(u,c)})):c&&d.push(i(d)+"rotate("+c+o)}function a(u,c,d,h){u!==c?h.push({i:d.push(i(d)+"skewX(",null,o)-2,x:ft(u,c)}):c&&d.push(i(d)+"skewX("+c+o)}function l(u,c,d,h,g,b){if(u!==d||c!==h){var _=g.push(i(g)+"scale(",null,",",null,")");b.push({i:_-4,x:ft(u,d)},{i:_-2,x:ft(c,h)})}else(d!==1||h!==1)&&g.push(i(g)+"scale("+d+","+h+")")}return function(u,c){var d=[],h=[];return u=e(u),c=e(c),r(u.translateX,u.translateY,c.translateX,c.translateY,d,h),s(u.rotate,c.rotate,d,h),a(u.skewX,c.skewX,d,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,h),u=c=null,function(g){for(var b=-1,_=h.length,E;++b<_;)d[(E=h[b]).i]=E.x(g);return d.join("")}}}var Zv=ba(Uv,"px, ","px)","deg)"),qv=ba(Wv,", ",")",")"),Kv=1e-12;function Rr(e){return((e=Math.exp(e))+1/e)/2}function Jv(e){return((e=Math.exp(e))-1/e)/2}function Qv(e){return((e=Math.exp(2*e))-1)/(e+1)}const jv=(function e(t,n,o){function i(r,s){var a=r[0],l=r[1],u=r[2],c=s[0],d=s[1],h=s[2],g=c-a,b=d-l,_=g*g+b*b,E,$;if(_<Kv)$=Math.log(h/u)/t,E=function(L){return[a+L*g,l+L*b,u*Math.exp(t*L*$)]};else{var D=Math.sqrt(_),m=(h*h-u*u+o*_)/(2*u*n*D),k=(h*h-u*u-o*_)/(2*h*n*D),B=Math.log(Math.sqrt(m*m+1)-m),U=Math.log(Math.sqrt(k*k+1)-k);$=(U-B)/t,E=function(L){var X=L*$,ee=Rr(B),F=u/(n*D)*(ee*Qv(t*X+B)-Jv(B));return[a+F*g,l+F*b,u*ee/Rr(t*X+B)]}}return E.duration=$*1e3*t/Math.SQRT2,E}return i.rho=function(r){var s=Math.max(.001,+r),a=s*s,l=a*a;return e(s,a,l)},i})(Math.SQRT2,2,4);var Gt=0,tn=0,qt=0,xa=1e3,po,nn,vo=0,Tt=0,Io=0,_n=typeof performance=="object"&&performance.now?performance:Date,Ea=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function zi(){return Tt||(Ea(em),Tt=_n.now()+Io)}function em(){Tt=0}function mo(){this._call=this._time=this._next=null}mo.prototype=Sa.prototype={constructor:mo,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?zi():+n)+(t==null?0:+t),!this._next&&nn!==this&&(nn?nn._next=this:po=this,nn=this),this._call=e,this._time=n,hi()},stop:function(){this._call&&(this._call=null,this._time=1/0,hi())}};function Sa(e,t,n){var o=new mo;return o.restart(e,t,n),o}function tm(){zi(),++Gt;for(var e=po,t;e;)(t=Tt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Gt}function Vr(){Tt=(vo=_n.now())+Io,Gt=tn=0;try{tm()}finally{Gt=0,om(),Tt=0}}function nm(){var e=_n.now(),t=e-vo;t>xa&&(Io-=t,vo=e)}function om(){for(var e,t=po,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:po=n);nn=e,hi(o)}function hi(e){if(!Gt){tn&&(tn=clearTimeout(tn));var t=e-Tt;t>24?(e<1/0&&(tn=setTimeout(Vr,e-_n.now()-Io)),qt&&(qt=clearInterval(qt))):(qt||(vo=_n.now(),qt=setInterval(nm,xa)),Gt=1,Ea(Vr))}}function Hr(e,t,n){var o=new mo;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var im=Ii("start","end","cancel","interrupt"),rm=[],Na=0,Lr=1,gi=2,Jn=3,Fr=4,pi=5,Qn=6;function To(e,t,n,o,i,r){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;sm(e,n,{name:t,index:o,group:i,on:im,tween:rm,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:Na})}function Pi(e,t){var n=Ye(e,t);if(n.state>Na)throw new Error("too late; already scheduled");return n}function je(e,t){var n=Ye(e,t);if(n.state>Jn)throw new Error("too late; already running");return n}function Ye(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function sm(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=Sa(r,0,n.time);function r(u){n.state=Lr,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,d,h,g;if(n.state!==Lr)return l();for(c in o)if(g=o[c],g.name===n.name){if(g.state===Jn)return Hr(s);g.state===Fr?(g.state=Qn,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete o[c]):+c<t&&(g.state=Qn,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete o[c])}if(Hr(function(){n.state===Jn&&(n.state=Fr,n.timer.restart(a,n.delay,n.time),a(u))}),n.state=gi,n.on.call("start",e,e.__data__,n.index,n.group),n.state===gi){for(n.state=Jn,i=new Array(h=n.tween.length),c=0,d=-1;c<h;++c)(g=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=g);i.length=d+1}}function a(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=pi,1),d=-1,h=i.length;++d<h;)i[d].call(e,c);n.state===pi&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Qn,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function jn(e,t){var n=e.__transition,o,i,r=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((o=n[s]).name!==t){r=!1;continue}i=o.state>gi&&o.state<pi,o.state=Qn,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[s]}r&&delete e.__transition}}function am(e){return this.each(function(){jn(this,e)})}function lm(e,t){var n,o;return function(){var i=je(this,e),r=i.tween;if(r!==n){o=n=r;for(var s=0,a=o.length;s<a;++s)if(o[s].name===t){o=o.slice(),o.splice(s,1);break}}i.tween=o}}function um(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var r=je(this,e),s=r.tween;if(s!==o){i=(o=s).slice();for(var a={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=a;break}l===u&&i.push(a)}r.tween=i}}function cm(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=Ye(this.node(),n).tween,i=0,r=o.length,s;i<r;++i)if((s=o[i]).name===e)return s.value;return null}return this.each((t==null?lm:um)(n,e,t))}function Oi(e,t,n){var o=e._id;return e.each(function(){var i=je(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Ye(i,o).value[t]}}function Ma(e,t){var n;return(typeof t=="number"?ft:t instanceof wn?Or:(n=wn(t))?(t=n,Or):Gv)(e,t)}function dm(e){return function(){this.removeAttribute(e)}}function fm(e){return function(){this.removeAttributeNS(e.space,e.local)}}function hm(e,t,n){var o,i=n+"",r;return function(){var s=this.getAttribute(e);return s===i?null:s===o?r:r=t(o=s,n)}}function gm(e,t,n){var o,i=n+"",r;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===o?r:r=t(o=s,n)}}function pm(e,t,n){var o,i,r;return function(){var s,a=n(this),l;return a==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=a+"",s===l?null:s===o&&l===i?r:(i=l,r=t(o=s,a)))}}function vm(e,t,n){var o,i,r;return function(){var s,a=n(this),l;return a==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=a+"",s===l?null:s===o&&l===i?r:(i=l,r=t(o=s,a)))}}function mm(e,t){var n=ko(e),o=n==="transform"?qv:Ma;return this.attrTween(e,typeof t=="function"?(n.local?vm:pm)(n,o,Oi(this,"attr."+e,t)):t==null?(n.local?fm:dm)(n):(n.local?gm:hm)(n,o,t))}function ym(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function wm(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function _m(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&wm(e,r)),n}return i._value=t,i}function $m(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&ym(e,r)),n}return i._value=t,i}function bm(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 o=ko(e);return this.tween(n,(o.local?_m:$m)(o,t))}function xm(e,t){return function(){Pi(this,e).delay=+t.apply(this,arguments)}}function Em(e,t){return t=+t,function(){Pi(this,e).delay=t}}function Sm(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?xm:Em)(t,e)):Ye(this.node(),t).delay}function Nm(e,t){return function(){je(this,e).duration=+t.apply(this,arguments)}}function Mm(e,t){return t=+t,function(){je(this,e).duration=t}}function Cm(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Nm:Mm)(t,e)):Ye(this.node(),t).duration}function km(e,t){if(typeof t!="function")throw new Error;return function(){je(this,e).ease=t}}function Im(e){var t=this._id;return arguments.length?this.each(km(t,e)):Ye(this.node(),t).ease}function Tm(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;je(this,e).ease=n}}function Am(e){if(typeof e!="function")throw new Error;return this.each(Tm(this._id,e))}function Dm(e){typeof e!="function"&&(e=aa(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,a=o[i]=[],l,u=0;u<s;++u)(l=r[u])&&e.call(l,l.__data__,u,r)&&a.push(l);return new st(o,this._parents,this._name,this._id)}function zm(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,r=Math.min(o,i),s=new Array(o),a=0;a<r;++a)for(var l=t[a],u=n[a],c=l.length,d=s[a]=new Array(c),h,g=0;g<c;++g)(h=l[g]||u[g])&&(d[g]=h);for(;a<o;++a)s[a]=t[a];return new st(s,this._parents,this._name,this._id)}function Pm(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 Om(e,t,n){var o,i,r=Pm(t)?Pi:je;return function(){var s=r(this,e),a=s.on;a!==o&&(i=(o=a).copy()).on(t,n),s.on=i}}function Bm(e,t){var n=this._id;return arguments.length<2?Ye(this.node(),n).on.on(e):this.each(Om(n,e,t))}function Rm(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Vm(){return this.on("end.remove",Rm(this._id))}function Hm(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Ti(e));for(var o=this._groups,i=o.length,r=new Array(i),s=0;s<i;++s)for(var a=o[s],l=a.length,u=r[s]=new Array(l),c,d,h=0;h<l;++h)(c=a[h])&&(d=e.call(c,c.__data__,h,a))&&("__data__"in c&&(d.__data__=c.__data__),u[h]=d,To(u[h],t,n,h,u,Ye(c,n)));return new st(r,this._parents,t,n)}function Lm(e){var t=this._name,n=this._id;typeof e!="function"&&(e=sa(e));for(var o=this._groups,i=o.length,r=[],s=[],a=0;a<i;++a)for(var l=o[a],u=l.length,c,d=0;d<u;++d)if(c=l[d]){for(var h=e.call(c,c.__data__,d,l),g,b=Ye(c,n),_=0,E=h.length;_<E;++_)(g=h[_])&&To(g,t,n,_,h,b);r.push(h),s.push(c)}return new st(r,s,t,n)}var Fm=Sn.prototype.constructor;function Ym(){return new Fm(this._groups,this._parents)}function Xm(e,t){var n,o,i;return function(){var r=Xt(this,e),s=(this.style.removeProperty(e),Xt(this,e));return r===s?null:r===n&&s===o?i:i=t(n=r,o=s)}}function Ca(e){return function(){this.style.removeProperty(e)}}function Gm(e,t,n){var o,i=n+"",r;return function(){var s=Xt(this,e);return s===i?null:s===o?r:r=t(o=s,n)}}function Um(e,t,n){var o,i,r;return function(){var s=Xt(this,e),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(e),Xt(this,e))),s===l?null:s===o&&l===i?r:(i=l,r=t(o=s,a))}}function Wm(e,t){var n,o,i,r="style."+t,s="end."+r,a;return function(){var l=je(this,e),u=l.on,c=l.value[r]==null?a||(a=Ca(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(s,i=c),l.on=o}}function Zm(e,t,n){var o=(e+="")=="transform"?Zv:Ma;return t==null?this.styleTween(e,Xm(e,o)).on("end.style."+e,Ca(e)):typeof t=="function"?this.styleTween(e,Um(e,o,Oi(this,"style."+e,t))).each(Wm(this._id,e)):this.styleTween(e,Gm(e,o,t),n).on("end.style."+e,null)}function qm(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function Km(e,t,n){var o,i;function r(){var s=t.apply(this,arguments);return s!==i&&(o=(i=s)&&qm(e,s,n)),o}return r._value=t,r}function Jm(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,Km(e,t,n??""))}function Qm(e){return function(){this.textContent=e}}function jm(e){return function(){var t=e(this);this.textContent=t??""}}function ey(e){return this.tween("text",typeof e=="function"?jm(Oi(this,"text",e)):Qm(e==null?"":e+""))}function ty(e){return function(t){this.textContent=e.call(this,t)}}function ny(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&ty(i)),t}return o._value=e,o}function oy(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,ny(e))}function iy(){for(var e=this._name,t=this._id,n=ka(),o=this._groups,i=o.length,r=0;r<i;++r)for(var s=o[r],a=s.length,l,u=0;u<a;++u)if(l=s[u]){var c=Ye(l,t);To(l,e,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new st(o,this._parents,e,n)}function ry(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(r,s){var a={value:s},l={value:function(){--i===0&&r()}};n.each(function(){var u=je(this,o),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),u.on=t}),i===0&&r()})}var sy=0;function st(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function ka(){return++sy}var tt=Sn.prototype;st.prototype={constructor:st,select:Hm,selectAll:Lm,selectChild:tt.selectChild,selectChildren:tt.selectChildren,filter:Dm,merge:zm,selection:Ym,transition:iy,call:tt.call,nodes:tt.nodes,node:tt.node,size:tt.size,empty:tt.empty,each:tt.each,on:Bm,attr:mm,attrTween:bm,style:Zm,styleTween:Jm,text:ey,textTween:oy,remove:Vm,tween:cm,delay:Sm,duration:Cm,ease:Im,easeVarying:Am,end:ry,[Symbol.iterator]:tt[Symbol.iterator]};function ay(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var ly={time:null,delay:0,duration:250,ease:ay};function uy(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 cy(e){var t,n;e instanceof st?(t=e._id,e=e._name):(t=ka(),(n=ly).time=zi(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,r=0;r<i;++r)for(var s=o[r],a=s.length,l,u=0;u<a;++u)(l=s[u])&&To(l,e,t,u,s,n||uy(l,t));return new st(o,this._parents,e,t)}Sn.prototype.interrupt=am;Sn.prototype.transition=cy;const Ln=e=>()=>e;function dy(e,{sourceEvent:t,target:n,transform:o,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:o,enumerable:!0,configurable:!0},_:{value:i}})}function it(e,t,n){this.k=e,this.x=t,this.y=n}it.prototype={constructor:it,scale:function(e){return e===1?this:new it(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new it(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 Bi=new it(1,0,0);it.prototype;function Go(e){e.stopImmediatePropagation()}function Kt(e){e.preventDefault(),e.stopImmediatePropagation()}function fy(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function hy(){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 Yr(){return this.__zoom||Bi}function gy(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function py(){return navigator.maxTouchPoints||"ontouchstart"in this}function vy(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s))}function my(){var e=fy,t=hy,n=vy,o=gy,i=py,r=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,l=jv,u=Ii("start","zoom","end"),c,d,h,g=500,b=150,_=0,E=10;function $(f){f.property("__zoom",Yr).on("wheel.zoom",X,{passive:!1}).on("mousedown.zoom",ee).on("dblclick.zoom",F).filter(i).on("touchstart.zoom",G).on("touchmove.zoom",M).on("touchend.zoom touchcancel.zoom",te).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}$.transform=function(f,N,p,I){var S=f.selection?f.selection():f;S.property("__zoom",Yr),f!==S?B(f,N,p,I):S.interrupt().each(function(){U(this,arguments).event(I).start().zoom(null,typeof N=="function"?N.apply(this,arguments):N).end()})},$.scaleBy=function(f,N,p,I){$.scaleTo(f,function(){var S=this.__zoom.k,z=typeof N=="function"?N.apply(this,arguments):N;return S*z},p,I)},$.scaleTo=function(f,N,p,I){$.transform(f,function(){var S=t.apply(this,arguments),z=this.__zoom,w=p==null?k(S):typeof p=="function"?p.apply(this,arguments):p,T=z.invert(w),R=typeof N=="function"?N.apply(this,arguments):N;return n(m(D(z,R),w,T),S,s)},p,I)},$.translateBy=function(f,N,p,I){$.transform(f,function(){return n(this.__zoom.translate(typeof N=="function"?N.apply(this,arguments):N,typeof p=="function"?p.apply(this,arguments):p),t.apply(this,arguments),s)},null,I)},$.translateTo=function(f,N,p,I,S){$.transform(f,function(){var z=t.apply(this,arguments),w=this.__zoom,T=I==null?k(z):typeof I=="function"?I.apply(this,arguments):I;return n(Bi.translate(T[0],T[1]).scale(w.k).translate(typeof N=="function"?-N.apply(this,arguments):-N,typeof p=="function"?-p.apply(this,arguments):-p),z,s)},I,S)};function D(f,N){return N=Math.max(r[0],Math.min(r[1],N)),N===f.k?f:new it(N,f.x,f.y)}function m(f,N,p){var I=N[0]-p[0]*f.k,S=N[1]-p[1]*f.k;return I===f.x&&S===f.y?f:new it(f.k,I,S)}function k(f){return[(+f[0][0]+ +f[1][0])/2,(+f[0][1]+ +f[1][1])/2]}function B(f,N,p,I){f.on("start.zoom",function(){U(this,arguments).event(I).start()}).on("interrupt.zoom end.zoom",function(){U(this,arguments).event(I).end()}).tween("zoom",function(){var S=this,z=arguments,w=U(S,z).event(I),T=t.apply(S,z),R=p==null?k(T):typeof p=="function"?p.apply(S,z):p,Z=Math.max(T[1][0]-T[0][0],T[1][1]-T[0][1]),Y=S.__zoom,O=typeof N=="function"?N.apply(S,z):N,V=l(Y.invert(R).concat(Z/Y.k),O.invert(R).concat(Z/O.k));return function(W){if(W===1)W=O;else{var H=V(W),de=Z/H[2];W=new it(de,R[0]-H[0]*de,R[1]-H[1]*de)}w.zoom(null,W)}})}function U(f,N,p){return!p&&f.__zooming||new L(f,N)}function L(f,N){this.that=f,this.args=N,this.active=0,this.sourceEvent=null,this.extent=t.apply(f,N),this.taps=0}L.prototype={event:function(f){return f&&(this.sourceEvent=f),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(f,N){return this.mouse&&f!=="mouse"&&(this.mouse[1]=N.invert(this.mouse[0])),this.touch0&&f!=="touch"&&(this.touch0[1]=N.invert(this.touch0[0])),this.touch1&&f!=="touch"&&(this.touch1[1]=N.invert(this.touch1[0])),this.that.__zoom=N,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(f){var N=ht(this.that).datum();u.call(f,this.that,new dy(f,{sourceEvent:this.sourceEvent,target:$,transform:this.that.__zoom,dispatch:u}),N)}};function X(f,...N){if(!e.apply(this,arguments))return;var p=U(this,N).event(f),I=this.__zoom,S=Math.max(r[0],Math.min(r[1],I.k*Math.pow(2,o.apply(this,arguments)))),z=ct(f);if(p.wheel)(p.mouse[0][0]!==z[0]||p.mouse[0][1]!==z[1])&&(p.mouse[1]=I.invert(p.mouse[0]=z)),clearTimeout(p.wheel);else{if(I.k===S)return;p.mouse=[z,I.invert(z)],jn(this),p.start()}Kt(f),p.wheel=setTimeout(w,b),p.zoom("mouse",n(m(D(I,S),p.mouse[0],p.mouse[1]),p.extent,s));function w(){p.wheel=null,p.end()}}function ee(f,...N){if(h||!e.apply(this,arguments))return;var p=f.currentTarget,I=U(this,N,!0).event(f),S=ht(f.view).on("mousemove.zoom",R,!0).on("mouseup.zoom",Z,!0),z=ct(f,p),w=f.clientX,T=f.clientY;Nv(f.view),Go(f),I.mouse=[z,this.__zoom.invert(z)],jn(this),I.start();function R(Y){if(Kt(Y),!I.moved){var O=Y.clientX-w,V=Y.clientY-T;I.moved=O*O+V*V>_}I.event(Y).zoom("mouse",n(m(I.that.__zoom,I.mouse[0]=ct(Y,p),I.mouse[1]),I.extent,s))}function Z(Y){S.on("mousemove.zoom mouseup.zoom",null),Mv(Y.view,I.moved),Kt(Y),I.event(Y).end()}}function F(f,...N){if(e.apply(this,arguments)){var p=this.__zoom,I=ct(f.changedTouches?f.changedTouches[0]:f,this),S=p.invert(I),z=p.k*(f.shiftKey?.5:2),w=n(m(D(p,z),I,S),t.apply(this,N),s);Kt(f),a>0?ht(this).transition().duration(a).call(B,w,I,f):ht(this).call($.transform,w,I,f)}}function G(f,...N){if(e.apply(this,arguments)){var p=f.touches,I=p.length,S=U(this,N,f.changedTouches.length===I).event(f),z,w,T,R;for(Go(f),w=0;w<I;++w)T=p[w],R=ct(T,this),R=[R,this.__zoom.invert(R),T.identifier],S.touch0?!S.touch1&&S.touch0[2]!==R[2]&&(S.touch1=R,S.taps=0):(S.touch0=R,z=!0,S.taps=1+!!c);c&&(c=clearTimeout(c)),z&&(S.taps<2&&(d=R[0],c=setTimeout(function(){c=null},g)),jn(this),S.start())}}function M(f,...N){if(this.__zooming){var p=U(this,N).event(f),I=f.changedTouches,S=I.length,z,w,T,R;for(Kt(f),z=0;z<S;++z)w=I[z],T=ct(w,this),p.touch0&&p.touch0[2]===w.identifier?p.touch0[0]=T:p.touch1&&p.touch1[2]===w.identifier&&(p.touch1[0]=T);if(w=p.that.__zoom,p.touch1){var Z=p.touch0[0],Y=p.touch0[1],O=p.touch1[0],V=p.touch1[1],W=(W=O[0]-Z[0])*W+(W=O[1]-Z[1])*W,H=(H=V[0]-Y[0])*H+(H=V[1]-Y[1])*H;w=D(w,Math.sqrt(W/H)),T=[(Z[0]+O[0])/2,(Z[1]+O[1])/2],R=[(Y[0]+V[0])/2,(Y[1]+V[1])/2]}else if(p.touch0)T=p.touch0[0],R=p.touch0[1];else return;p.zoom("touch",n(m(w,T,R),p.extent,s))}}function te(f,...N){if(this.__zooming){var p=U(this,N).event(f),I=f.changedTouches,S=I.length,z,w;for(Go(f),h&&clearTimeout(h),h=setTimeout(function(){h=null},g),z=0;z<S;++z)w=I[z],p.touch0&&p.touch0[2]===w.identifier?delete p.touch0:p.touch1&&p.touch1[2]===w.identifier&&delete p.touch1;if(p.touch1&&!p.touch0&&(p.touch0=p.touch1,delete p.touch1),p.touch0)p.touch0[1]=this.__zoom.invert(p.touch0[0]);else if(p.end(),p.taps===2&&(w=ct(w,this),Math.hypot(d[0]-w[0],d[1]-w[1])<E)){var T=ht(this).on("dblclick.zoom");T&&T.apply(this,arguments)}}}return $.wheelDelta=function(f){return arguments.length?(o=typeof f=="function"?f:Ln(+f),$):o},$.filter=function(f){return arguments.length?(e=typeof f=="function"?f:Ln(!!f),$):e},$.touchable=function(f){return arguments.length?(i=typeof f=="function"?f:Ln(!!f),$):i},$.extent=function(f){return arguments.length?(t=typeof f=="function"?f:Ln([[+f[0][0],+f[0][1]],[+f[1][0],+f[1][1]]]),$):t},$.scaleExtent=function(f){return arguments.length?(r[0]=+f[0],r[1]=+f[1],$):[r[0],r[1]]},$.translateExtent=function(f){return arguments.length?(s[0][0]=+f[0][0],s[1][0]=+f[1][0],s[0][1]=+f[0][1],s[1][1]=+f[1][1],$):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},$.constrain=function(f){return arguments.length?(n=f,$):n},$.duration=function(f){return arguments.length?(a=+f,$):a},$.interpolate=function(f){return arguments.length?(l=f,$):l},$.on=function(){var f=u.on.apply(u,arguments);return f===u?$:f},$.clickDistance=function(f){return arguments.length?(_=(f=+f)*f,$):Math.sqrt(_)},$.tapDistance=function(f){return arguments.length?(E=+f,$):E},$}const Ia=Symbol("MiniMapSlots"),yy=["id","x","y","rx","ry","width","height","fill","stroke","stroke-width","shape-rendering"],wy={name:"MiniMapNode",compatConfig:{MODE:3},inheritAttrs:!1},_y=ve({...wy,props:{id:{},type:{},selected:{type:Boolean},dragging:{type:Boolean},position:{},dimensions:{},borderRadius:{},color:{},shapeRendering:{},strokeColor:{},strokeWidth:{},hidden:{type:Boolean}},emits:["click","dblclick","mouseenter","mousemove","mouseleave"],setup(e,{emit:t}){const n=e,o=At(Ia),i=vi(),r=me(()=>i.style??{});function s(d){t("click",d)}function a(d){t("dblclick",d)}function l(d){t("mouseenter",d)}function u(d){t("mousemove",d)}function c(d){t("mouseleave",d)}return(d,h)=>!d.hidden&&d.dimensions.width!==0&&d.dimensions.height!==0?(J(),ae(Te,{key:0},[P(o)[`node-${n.type}`]?(J(),Me(yt(P(o)[`node-${n.type}`]),Jt(eo({key:0},{...n,...d.$attrs})),null,16)):(J(),ae("rect",eo({key:1,id:d.id},d.$attrs,{class:["vue-flow__minimap-node",{selected:d.selected,dragging:d.dragging}],x:d.position.x,y:d.position.y,rx:d.borderRadius,ry:d.borderRadius,width:d.dimensions.width,height:d.dimensions.height,fill:d.color||r.value.background||r.value.backgroundColor,stroke:d.strokeColor,"stroke-width":d.strokeWidth,"shape-rendering":d.shapeRendering,onClick:s,onDblclick:a,onMouseenter:l,onMousemove:u,onMouseleave:c}),null,16,yy))],64)):Se("",!0)}}),$y=["width","height","viewBox","aria-labelledby"],by=["id"],xy=["d","fill","stroke","stroke-width"],Ey={name:"MiniMap",compatConfig:{MODE:3}},Sy=ve({...Ey,props:{nodeColor:{type:[String,Function],default:"#e2e2e2"},nodeStrokeColor:{type:[String,Function],default:"transparent"},nodeClassName:{type:[String,Function]},nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:"rgb(240, 240, 240, 0.6)"},maskStrokeColor:{default:"none"},maskStrokeWidth:{default:1},position:{default:"bottom-right"},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:{},height:{},ariaLabel:{default:"Vue Flow mini map"},inversePan:{type:Boolean,default:!1},zoomStep:{default:1},offsetScale:{default:5},maskBorderRadius:{default:0}},emits:["click","nodeClick","nodeDblclick","nodeMouseenter","nodeMousemove","nodeMouseleave"],setup(e,{emit:t}){const n=Ur(),o=vi(),i=200,r=150,{id:s,edges:a,viewport:l,translateExtent:u,dimensions:c,emits:d,d3Selection:h,d3Zoom:g,getNodesInitialized:b}=$e(),_=be();Mt(Ia,n);const E=me(()=>{var S;return e.width??((S=o.style)==null?void 0:S.width)??i}),$=me(()=>{var S;return e.height??((S=o.style)==null?void 0:S.height)??r}),D=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision",m=re(()=>typeof e.nodeColor=="string"?()=>e.nodeColor:e.nodeColor),k=re(()=>typeof e.nodeStrokeColor=="string"?()=>e.nodeStrokeColor:e.nodeStrokeColor),B=re(()=>typeof e.nodeClassName=="string"?()=>e.nodeClassName:typeof e.nodeClassName=="function"?e.nodeClassName:()=>""),U=re(()=>Ni(b.value.filter(S=>!S.hidden))),L=re(()=>({x:-l.value.x/l.value.zoom,y:-l.value.y/l.value.zoom,width:c.value.width/l.value.zoom,height:c.value.height/l.value.zoom})),X=re(()=>b.value&&b.value.length?nf(U.value,L.value):L.value),ee=re(()=>{const S=X.value.width/E.value,z=X.value.height/$.value;return Math.max(S,z)}),F=re(()=>{const S=ee.value*E.value,z=ee.value*$.value,w=e.offsetScale*ee.value;return{offset:w,x:X.value.x-(S-X.value.width)/2-w,y:X.value.y-(z-X.value.height)/2-w,width:S+w*2,height:z+w*2}}),G=re(()=>!F.value.x||!F.value.y?"":`
27
+ M${F.value.x-F.value.offset},${F.value.y-F.value.offset}
28
+ h${F.value.width+F.value.offset*2}
29
+ v${F.value.height+F.value.offset*2}
30
+ h${-F.value.width-F.value.offset*2}z
31
+ M${L.value.x+e.maskBorderRadius},${L.value.y}
32
+ h${L.value.width-2*e.maskBorderRadius}
33
+ a${e.maskBorderRadius},${e.maskBorderRadius} 0 0 1 ${e.maskBorderRadius},${e.maskBorderRadius}
34
+ v${L.value.height-2*e.maskBorderRadius}
35
+ a${e.maskBorderRadius},${e.maskBorderRadius} 0 0 1 -${e.maskBorderRadius},${e.maskBorderRadius}
36
+ h${-(L.value.width-2*e.maskBorderRadius)}
37
+ a${e.maskBorderRadius},${e.maskBorderRadius} 0 0 1 -${e.maskBorderRadius},-${e.maskBorderRadius}
38
+ v${-(L.value.height-2*e.maskBorderRadius)}
39
+ a${e.maskBorderRadius},${e.maskBorderRadius} 0 0 1 ${e.maskBorderRadius},-${e.maskBorderRadius}z`);Fa(S=>{if(_.value){const z=ht(_.value),w=Z=>{if(Z.sourceEvent.type!=="wheel"||!h.value||!g.value)return;const Y=Z.sourceEvent.ctrlKey&&vn()?10:1,O=-Z.sourceEvent.deltaY*(Z.sourceEvent.deltaMode===1?.05:Z.sourceEvent.deltaMode?1:.002)*e.zoomStep,V=l.value.zoom*2**(O*Y);g.value.scaleTo(h.value,V)},T=Z=>{if(Z.sourceEvent.type!=="mousemove"||!h.value||!g.value)return;const Y=ee.value*Math.max(1,l.value.zoom)*(e.inversePan?-1:1),O={x:l.value.x-Z.sourceEvent.movementX*Y,y:l.value.y-Z.sourceEvent.movementY*Y},V=[[0,0],[c.value.width,c.value.height]],W=Bi.translate(O.x,O.y).scale(l.value.zoom),H=g.value.constrain()(W,V,u.value);g.value.transform(h.value,H)},R=my().wheelDelta(Z=>oi(Z)*(e.zoomStep/10)).on("zoom",e.pannable?T:()=>{}).on("zoom.wheel",e.zoomable?w:()=>{});z.call(R),S(()=>{z.on("zoom",null)})}},{flush:"post"});function M(S){const[z,w]=ct(S);t("click",{event:S,position:{x:z,y:w}})}function te(S,z){const w={event:S,node:z,connectedEdges:_t([z],a.value)};d.miniMapNodeClick(w),t("nodeClick",w)}function f(S,z){const w={event:S,node:z,connectedEdges:_t([z],a.value)};d.miniMapNodeDoubleClick(w),t("nodeDblclick",w)}function N(S,z){const w={event:S,node:z,connectedEdges:_t([z],a.value)};d.miniMapNodeMouseEnter(w),t("nodeMouseenter",w)}function p(S,z){const w={event:S,node:z,connectedEdges:_t([z],a.value)};d.miniMapNodeMouseMove(w),t("nodeMousemove",w)}function I(S,z){const w={event:S,node:z,connectedEdges:_t([z],a.value)};d.miniMapNodeMouseLeave(w),t("nodeMouseleave",w)}return(S,z)=>(J(),Me(P(na),{position:S.position,class:He(["vue-flow__minimap",{pannable:S.pannable,zoomable:S.zoomable}])},{default:Ie(()=>[(J(),ae("svg",{ref_key:"el",ref:_,width:E.value,height:$.value,viewBox:[F.value.x,F.value.y,F.value.width,F.value.height].join(" "),role:"img","aria-labelledby":`vue-flow__minimap-${P(s)}`,onClick:M},[S.ariaLabel?(J(),ae("title",{key:0,id:`vue-flow__minimap-${P(s)}`},Ee(S.ariaLabel),9,by)):Se("",!0),(J(!0),ae(Te,null,$n(P(b),w=>(J(),Me(_y,{id:w.id,key:w.id,f:"",position:w.computedPosition,dimensions:w.dimensions,selected:w.selected,dragging:w.dragging,style:ze(w.style),class:He(B.value(w)),color:m.value(w),"border-radius":S.nodeBorderRadius,"stroke-color":k.value(w),"stroke-width":S.nodeStrokeWidth,"shape-rendering":P(D),type:w.type,hidden:w.hidden,onClick:T=>te(T,w),onDblclick:T=>f(T,w),onMouseenter:T=>N(T,w),onMousemove:T=>p(T,w),onMouseleave:T=>I(T,w)},null,8,["id","position","dimensions","selected","dragging","style","class","color","border-radius","stroke-color","stroke-width","shape-rendering","type","hidden","onClick","onDblclick","onMouseenter","onMousemove","onMouseleave"]))),128)),oe("path",{class:"vue-flow__minimap-mask",d:G.value,fill:S.maskColor,stroke:S.maskStrokeColor,"stroke-width":S.maskStrokeWidth,"fill-rule":"evenodd"},null,8,xy)],8,$y))]),_:1},8,["position","class"]))}}),Ny={class:"topology-domain-node__code"},My=ve({__name:"DomainMapNode",props:{data:{}},setup(e){return(t,n)=>{const o=mi;return J(),ae("div",{class:He(["topology-domain-node",{"is-muted":e.data.muted}]),style:ze({"--node-color":e.data.color})},[fe(P(Le),{type:"target",position:P(j).Left,class:"map-handle"},null,8,["position"]),oe("span",Ny,Ee(e.data.code),1),oe("div",null,[oe("strong",null,Ee(e.data.label),1),oe("small",null,Ee(e.data.count)+" "+Ee(e.data.count===1?"item":"items"),1)]),fe(o,{name:"i-lucide-chevron-right","aria-hidden":"true"}),fe(P(Le),{type:"source",position:P(j).Right,class:"map-handle"},null,8,["position"])],6)}}}),Cy=Object.assign(My,{__name:"ProductMapDomainMapNode"}),ky={class:"topology-journey-node__index"},Iy={class:"topology-journey-node__copy"},Ty=ve({__name:"JourneyMapNode",props:{data:{}},setup(e){return(t,n)=>(J(),ae("div",{class:He(["topology-journey-node",{"is-muted":e.data.muted,"is-focused":e.data.focused}]),style:ze({"--node-color":e.data.color})},[fe(P(Le),{type:"target",position:P(j).Left,class:"map-handle"},null,8,["position"]),oe("span",ky,Ee(String(e.data.index).padStart(2,"0")),1),oe("div",Iy,[oe("small",null,Ee(e.data.domain),1),oe("strong",null,Ee(e.data.label),1),oe("span",null,Ee(e.data.scenarios)+" scenarios",1)]),fe(P(Le),{type:"source",position:P(j).Right,class:"map-handle"},null,8,["position"])],6))}}),Ay=Object.assign(Ty,{__name:"ProductMapJourneyMapNode"}),Dy={class:"topology-root-node"},zy=ve({__name:"RootNode",props:{data:{}},setup(e){return(t,n)=>(J(),ae("div",Dy,[n[1]||(n[1]=oe("div",{class:"topology-root-node__mark","aria-hidden":"true"},[oe("i"),oe("i"),oe("i"),oe("i")],-1)),oe("div",null,[n[0]||(n[0]=oe("span",null,"System root",-1)),oe("strong",null,Ee(e.data.label),1),oe("small",null,Ee(e.data.subtitle),1)]),oe("b",null,Ee(e.data.count),1),fe(P(Le),{type:"source",position:P(j).Right,class:"map-handle"},null,8,["position"])]))}}),Py=Object.assign(zy,{__name:"ProductMapRootNode"}),Oy={class:"topology-scenario-node__index"},By=ve({__name:"ScenarioMapNode",props:{data:{}},setup(e){return(t,n)=>(J(),ae("div",{class:He(["topology-scenario-node",{"is-muted":e.data.muted}]),style:ze({"--node-color":e.data.color})},[fe(P(Le),{type:"target",position:P(j).Left,class:"map-handle"},null,8,["position"]),oe("span",Oy,Ee(String(e.data.index).padStart(2,"0")),1),oe("div",null,[oe("small",null,Ee(e.data.eyebrow),1),oe("strong",null,Ee(e.data.label),1),oe("span",null,Ee(e.data.meta),1)]),fe(P(Le),{type:"source",position:P(j).Right,class:"map-handle"},null,8,["position"])],6))}}),Ry=Object.assign(By,{__name:"ProductMapScenarioMapNode"}),Vy={class:"topology-workspace","aria-label":"Interactive report topology"},Hy={class:"topology-toolbar"},Ly={class:"flex gap-1"},Fy={class:"toolbar-count"},Yy={class:"topology-canvas"},Xy={class:"loading-state"},Gy={class:"topology-legend","aria-label":"Topology legend"},Uy={class:"topology-legend__hint"},Xr="businesslens-report-map",Wy=ve({__name:"ReportTopology",setup(e){const{report:t,model:n,actorById:o,domainById:i,journeyById:r,scenariosByJourney:s,domainColor:a,categoryColor:l}=Kr(),u=Ya(),c=Xa(),{fitView:d}=$e(Xr),h=u.query.mode==="trace"?"trace":"journeys",g=typeof u.query.journey=="string"&&n.value?.journeys.some(w=>w.id===u.query.journey)?u.query.journey:n.value?.journeys[0]?.id||"",b=be(h),_=be(g),E=be(""),$=be("all"),D=be(!1),m=be(null),k=be(null),B=[{value:"journeys",label:"Journey map",icon:"i-lucide-route"},{value:"trace",label:"Selected trace",icon:"i-lucide-git-fork"}],U=re(()=>(n.value?.journeys||[]).map(w=>({label:w.title,value:w.id}))),L=re(()=>E.value.trim().toLowerCase()),X=re(()=>[{label:"All domains",value:"all"},...(n.value?.domains||[]).map(w=>({label:w.name,value:w.id}))]);function ee(w){const T=w.split(/[^a-z0-9]+/i).filter(R=>R&&!["and","of","the"].includes(R.toLowerCase()));return T.length>1?`${T[0][0]}${T[1][0]}`.toUpperCase():T[0]?.slice(0,2).toUpperCase()||"--"}function F(w){const V={};let W=0;for(let H=0;H<w.length;H+=3){const de=w.slice(H,H+3),ce=Math.max(...de.map(he=>Math.max(1,he.count)));de.forEach((he,se)=>{const ue=Math.max(1,he.count)*108,y=420+se*680;V[he.id]={groupX:y,groupY:W+(ue-108)/2,itemX:y+320,itemStartY:W}}),W+=ce*108+130}return{positions:V,totalHeight:Math.max(108,W-130)}}function G(w){const T=r.value[w];return $.value!=="all"&&T.domainId!==$.value?!1:L.value?[T.title,T.summary,...T.actorIds.map(R=>o.value[R].name)].join(" ").toLowerCase().includes(L.value):!0}function M(){if(!n.value||!t.value)return{nodes:[],edges:[]};const w=n.value.domains.map(Y=>({id:Y.id,count:n.value.journeys.filter(O=>O.domainId===Y.id).length})),T=F(w),R=[{id:"root",type:"root",position:{x:0,y:T.totalHeight/2},data:{label:t.value.title,subtitle:"Product journey topology",count:n.value.journeys.length},draggable:!1,selectable:!1}],Z=[];for(const Y of n.value.domains){const O=n.value.journeys.filter(H=>H.domainId===Y.id),V=T.positions[Y.id],W=O.some(H=>G(H.id));R.push({id:`group:${Y.id}`,type:"domain",position:{x:V.groupX,y:V.groupY},data:{entityType:"group",entityId:Y.id,label:Y.name,code:ee(Y.name),count:O.length,color:a(Y.id),muted:!W},draggable:!1}),Z.push({id:`root:${Y.id}`,source:"root",target:`group:${Y.id}`,type:"smoothstep",style:{stroke:a(Y.id),strokeWidth:1.25,opacity:W?.42:.06}}),O.forEach((H,de)=>{const ce=G(H.id);R.push({id:`journey:${H.id}`,type:"journey",position:{x:V.itemX,y:V.itemStartY+de*108},data:{entityType:"journey",entityId:H.id,label:H.title,index:n.value.journeys.indexOf(H)+1,domain:Y.name,scenarios:(s.value[H.id]||[]).length,color:a(Y.id),muted:!ce,focused:D.value&&m.value===H.id},draggable:!1}),Z.push({id:`${Y.id}:${H.id}`,source:`group:${Y.id}`,target:`journey:${H.id}`,type:"smoothstep",markerEnd:{type:fn.ArrowClosed,color:a(Y.id),width:14,height:14},style:{stroke:a(Y.id),strokeWidth:1.5,opacity:ce?.62:.08}})})}return{nodes:R,edges:Z}}function te(){if(!n.value||!t.value||!_.value)return{nodes:[],edges:[]};const w=r.value[_.value];if(!w)return{nodes:[],edges:[]};const T=s.value[w.id]||[],R=i.value[w.domainId],Z=[{id:`journey:${w.id}`,type:"journey",position:{x:0,y:Math.max(0,(T.length-1)*55)},data:{entityType:"journey",entityId:w.id,label:w.title,index:n.value.journeys.indexOf(w)+1,domain:R.name,scenarios:T.length,color:a(w.domainId),focused:!0},draggable:!1}],Y=[];return T.forEach((O,V)=>{const W=n.value.taxonomies.scenarioKinds.find(H=>H.id===O.kindId);Z.push({id:`scenario:${O.id}`,type:"scenario",position:{x:430,y:V*110},data:{entityType:"scenario",entityId:O.id,journeyId:w.id,label:O.title,index:V+1,eyebrow:W.name,meta:`${O.steps.length} steps · ${O.edgeCases.length} edge cases`,color:l(W.colorSlot||1)},draggable:!1}),Y.push({id:`${w.id}:${O.id}`,source:`journey:${w.id}`,target:`scenario:${O.id}`,type:"smoothstep",markerEnd:{type:fn.ArrowClosed,color:a(w.domainId),width:14,height:14},style:{stroke:a(w.domainId),strokeWidth:1.5,opacity:.62}})}),{nodes:Z,edges:Y}}const f=re(()=>b.value==="trace"?te():M()),N=re(()=>b.value==="trace"?s.value[_.value]?.length||0:(n.value?.journeys||[]).filter(w=>G(w.id)).length);function p(w){b.value=w,E.value="",$.value="all",c.replace({query:w==="trace"?{mode:"trace",journey:_.value}:{}})}function I(w){const T=w.node.data;if(T.entityType==="group"&&T.entityId){$.value=$.value===T.entityId?"all":T.entityId;return}if(T.entityType==="scenario"&&T.entityId&&T.journeyId){m.value=T.journeyId,k.value=T.entityId,D.value=!0;return}T.entityType==="journey"&&T.entityId&&(m.value=T.entityId,k.value=null,D.value=!0)}function S(w){return w.data.color||"#64748b"}async function z(){await d({padding:.16,duration:350})}return we(_,w=>{b.value==="trace"&&c.replace({query:{mode:"trace",journey:w}})}),we(b,async()=>{await qe(),window.setTimeout(()=>d({padding:.16,duration:350}),80)}),(w,T)=>{const R=Ga,Z=qa,Y=Za,O=Ja,V=mi,W=Ua;return J(),ae("section",Vy,[oe("div",Hy,[oe("div",Ly,[(J(),ae(Te,null,$n(B,H=>fe(R,{key:H.value,icon:H.icon,label:H.label,color:P(b)===H.value?"primary":"neutral",variant:P(b)===H.value?"soft":"ghost",size:"sm",onClick:de=>p(H.value)},null,8,["icon","label","color","variant","onClick"])),64))]),P(b)==="trace"?(J(),Me(Z,{key:0,modelValue:P(_),"onUpdate:modelValue":T[0]||(T[0]=H=>Pt(_)?_.value=H:null),items:P(U),"value-key":"value",class:"min-w-64","aria-label":"Choose journey"},null,8,["modelValue","items"])):(J(),ae(Te,{key:1},[fe(Y,{modelValue:P(E),"onUpdate:modelValue":T[1]||(T[1]=H=>Pt(E)?E.value=H:null),icon:"i-lucide-search",placeholder:"Search the map",class:"min-w-64"},null,8,["modelValue"]),fe(Z,{modelValue:P($),"onUpdate:modelValue":T[2]||(T[2]=H=>Pt($)?$.value=H:null),items:P(X),"value-key":"value","aria-label":"Filter map"},null,8,["modelValue","items"])],64)),oe("span",Fy,Ee(P(N))+" "+Ee(P(b)==="trace"?"scenarios":"journeys"),1),fe(O,{text:"Fit graph to viewport"},{default:Ie(()=>[fe(R,{icon:"i-lucide-scan",color:"neutral",variant:"ghost","aria-label":"Fit graph to viewport",onClick:z})]),_:1})]),oe("div",Yy,[fe(W,null,{fallback:Ie(()=>[oe("div",Xy,[fe(V,{name:"i-lucide-loader-circle",class:"animate-spin"}),T[4]||(T[4]=oe("span",null,"Preparing topology…",-1))])]),default:Ie(()=>[(J(),Me(P(ig),{id:Xr,key:P(b),nodes:P(f).nodes,edges:P(f).edges,"min-zoom":.1,"max-zoom":1.6,"nodes-draggable":!1,"nodes-connectable":!1,"zoom-on-double-click":!1,"default-edge-options":{selectable:!1},"fit-view-on-init":"",class:"business-flow",onNodeClick:I},{"node-root":Ie(H=>[fe(Py,Jt(Mn(H)),null,16)]),"node-domain":Ie(H=>[fe(Cy,Jt(Mn(H)),null,16)]),"node-journey":Ie(H=>[fe(Ay,Jt(Mn(H)),null,16)]),"node-scenario":Ie(H=>[fe(Ry,Jt(Mn(H)),null,16)]),default:Ie(()=>[fe(P(fg),{variant:P(Ze).Dots,gap:26,size:1,"pattern-color":"var(--topology-grid)"},null,8,["variant"]),fe(P(Sy),{"node-color":S,pannable:"",zoomable:"",position:"bottom-right"}),fe(P(Yg),{position:"bottom-left","show-interactive":!1})]),_:1},8,["nodes","edges"]))]),_:1})]),oe("div",Gy,[T[7]||(T[7]=oe("span",null,[oe("i",{class:"is-domain"}),Xn("Domain")],-1)),oe("span",null,[T[5]||(T[5]=oe("i",{class:"is-journey"},null,-1)),Xn(Ee(P(b)==="trace"?"Scenario":"Journey"),1)]),oe("span",Uy,[fe(V,{name:"i-lucide-mouse-pointer-2","aria-hidden":"true"}),T[6]||(T[6]=Xn(" Select a node to inspect it",-1))])]),fe(Ka,{open:P(D),"entity-id":P(m),"scenario-id":P(k),"onUpdate:open":T[3]||(T[3]=H=>D.value=H)},null,8,["open","entity-id","scenario-id"])])}}}),Zy=Object.assign(Wy,{__name:"ProductReportTopology"}),qy={class:"page-shell"},Ky={key:0,class:"loading-state"},n0=ve({__name:"topology",setup(e){const{report:t,status:n}=Kr();return Wa({title:()=>t.value?`Topology · ${t.value.title} · BusinessLens`:"Topology · BusinessLens"}),(o,i)=>{const r=mi;return J(),ae("div",qy,[P(n)==="pending"?(J(),ae("div",Ky,[fe(r,{name:"i-lucide-loader-circle",class:"animate-spin"}),i[0]||(i[0]=oe("span",null,"Loading topology…",-1))])):P(t)?(J(),ae(Te,{key:1},[i[1]||(i[1]=oe("header",{class:"page-heading"},[oe("div",null,[oe("span",{class:"page-eyebrow"},"Interactive product model"),oe("h1",null,"Topology"),oe("p",null,"Move between the complete journey landscape and the scenarios that make up a selected user goal.")])],-1)),fe(Zy)],64)):Se("",!0)])}}});export{n0 as default};