abstra 3.24.3__py3-none-any.whl → 3.24.5__py3-none-any.whl

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 (248) hide show
  1. abstra/ai.py +2 -0
  2. {abstra-3.24.3.dist-info → abstra-3.24.5.dist-info}/METADATA +2 -1
  3. {abstra-3.24.3.dist-info → abstra-3.24.5.dist-info}/RECORD +195 -192
  4. abstra_internals/contracts_generated.py +3737 -2560
  5. abstra_internals/controllers/workflows.py +42 -0
  6. abstra_internals/interface/sdk/ai.py +69 -0
  7. abstra_internals/repositories/execution.py +3 -6
  8. abstra_internals/repositories/git/native.py +90 -3
  9. abstra_internals/repositories/git/types.py +10 -0
  10. abstra_internals/repositories/linter/rules/env_in_bundle.py +2 -0
  11. abstra_internals/repositories/project/json_migrations/__init__.py +2 -0
  12. abstra_internals/repositories/project/json_migrations/migration_016.py +17 -0
  13. abstra_internals/repositories/project/json_migrations/migration_016_test.py +141 -0
  14. abstra_internals/repositories/project/project.py +62 -17
  15. abstra_internals/repositories/project/project_test.py +279 -0
  16. abstra_internals/repositories/tasks.py +2 -2
  17. abstra_internals/services/fs.py +311 -32
  18. abstra_internals/services/fs_test.py +28 -5
  19. abstra_internals/services/sql_storage.py +236 -0
  20. abstra_internals/services/sql_storage_test.py +112 -0
  21. abstra_internals/utils/file.py +7 -3
  22. abstra_internals/utils/fs_cache.py +173 -0
  23. abstra_statics/dist/assets/{AbstraButton.vue_vue_type_script_setup_true_lang.13670ae7.js → AbstraButton.vue_vue_type_script_setup_true_lang.6c541630.js} +2 -2
  24. abstra_statics/dist/assets/AbstraLogo.vue_vue_type_script_setup_true_lang.e1cfa824.js +2 -0
  25. abstra_statics/dist/assets/{ApiKeys.9b0b18b5.js → ApiKeys.96f96fe2.js} +2 -2
  26. abstra_statics/dist/assets/App.6b1b6a94.js +2 -0
  27. abstra_statics/dist/assets/App.vue_vue_type_style_index_0_lang.08210ecb.js +2 -0
  28. abstra_statics/dist/assets/BaseLayout.2a82be24.js +2 -0
  29. abstra_statics/dist/assets/{Billing.f9062d88.js → Billing.24199f3a.js} +2 -2
  30. abstra_statics/dist/assets/{Breadcrumb.e54636d6.js → Breadcrumb.c8da3019.js} +2 -2
  31. abstra_statics/dist/assets/{Builds.c7363e1b.js → Builds.366d6ceb.js} +2 -2
  32. abstra_statics/dist/assets/{Card.4a8a30bb.js → Card.0d56c597.js} +2 -2
  33. abstra_statics/dist/assets/{CircularLoading.d81a4cac.js → CircularLoading.daf759d9.js} +2 -2
  34. abstra_statics/dist/assets/CloseCircleOutlined.2be0ee6c.js +2 -0
  35. abstra_statics/dist/assets/{ConnectorsView.d4b67e2e.js → ConnectorsView.904ff1c0.js} +2 -2
  36. abstra_statics/dist/assets/ConsoleOmniChat.vue_vue_type_script_setup_true_lang.17fc3e62.js +2 -0
  37. abstra_statics/dist/assets/ContentLayout.c133929b.js +2 -0
  38. abstra_statics/dist/assets/{CrudView.57e8b29a.js → CrudView.789b533f.js} +2 -2
  39. abstra_statics/dist/assets/{DocsButton.vue_vue_type_script_setup_true_lang.108b18e1.js → DocsButton.vue_vue_type_script_setup_true_lang.a2b3eeb7.js} +2 -2
  40. abstra_statics/dist/assets/{EditorLogin.2f00deb7.js → EditorLogin.cac0ed52.js} +2 -2
  41. abstra_statics/dist/assets/{EditorsView.eb87a2d8.js → EditorsView.4b74b13b.js} +2 -2
  42. abstra_statics/dist/assets/EnvVars.0dfba770.js +2 -0
  43. abstra_statics/dist/assets/{Error.98b8036c.js → Error.c7f25d1b.js} +2 -2
  44. abstra_statics/dist/assets/ExclamationCircleOutlined.ad66211a.js +2 -0
  45. abstra_statics/dist/assets/ExecutionContext.91c0e0db.js +2 -0
  46. abstra_statics/dist/assets/ExecutionStatusIcon.vue_vue_type_script_setup_true_lang.31b499a5.js +2 -0
  47. abstra_statics/dist/assets/{Files.9fc8199a.js → Files.4ec90b9a.js} +2 -2
  48. abstra_statics/dist/assets/Form.5a5cac5f.js +2 -0
  49. abstra_statics/dist/assets/Form.7d1b0423.css +1 -0
  50. abstra_statics/dist/assets/FormRunner.4a5270dc.js +2 -0
  51. abstra_statics/dist/assets/{Home.191a6dce.js → Home.1271fb51.js} +2 -2
  52. abstra_statics/dist/assets/Home.f82c1587.js +2 -0
  53. abstra_statics/dist/assets/LoadingContainer.4430af86.js +2 -0
  54. abstra_statics/dist/assets/{LoadingOutlined.4c40acc4.js → LoadingOutlined.2d29f0e1.js} +2 -2
  55. abstra_statics/dist/assets/{Login.edfbdaea.js → Login.180d7b1c.js} +2 -2
  56. abstra_statics/dist/assets/Login.8e13b15d.js +2 -0
  57. abstra_statics/dist/assets/{Login.vue_vue_type_script_setup_true_lang.02acef81.js → Login.vue_vue_type_script_setup_true_lang.ab4402e7.js} +2 -2
  58. abstra_statics/dist/assets/Logo.e86b6b23.js +2 -0
  59. abstra_statics/dist/assets/Logs.03931b09.js +2 -0
  60. abstra_statics/dist/assets/Main.3afc4ba4.js +2 -0
  61. abstra_statics/dist/assets/MockForm.025d99f9.css +1 -0
  62. abstra_statics/dist/assets/{MockForm.091aa4ce.js → MockForm.1fa371d2.js} +2 -2
  63. abstra_statics/dist/assets/{Navbar.24019fd6.js → Navbar.2d7490c1.js} +2 -2
  64. abstra_statics/dist/assets/{NewEditor.f2d1c0c3.css → NewEditor.d2ee5048.css} +1 -1
  65. abstra_statics/dist/assets/NewEditor.dc0e868f.js +8 -0
  66. abstra_statics/dist/assets/OidcLoginCallback.8216e341.js +2 -0
  67. abstra_statics/dist/assets/OidcLogoutCallback.f471ecec.js +2 -0
  68. abstra_statics/dist/assets/{OmniChat.c78c1e51.js → OmniChat.be2d3d92.js} +2 -2
  69. abstra_statics/dist/assets/{OnboardingView.687780ed.js → OnboardingView.4957b5f8.js} +2 -2
  70. abstra_statics/dist/assets/{Organization.0ac1bf79.js → Organization.27e529a7.js} +2 -2
  71. abstra_statics/dist/assets/{Organizations.fc123489.js → Organizations.88897e55.js} +2 -2
  72. abstra_statics/dist/assets/{PhArrowCounterClockwise.vue.6ab1b899.js → PhArrowCounterClockwise.vue.9ad742bf.js} +2 -2
  73. abstra_statics/dist/assets/{PhArrowSquareOut.vue.1cebb708.js → PhArrowSquareOut.vue.2a07a9b3.js} +2 -2
  74. abstra_statics/dist/assets/{PhClockCounterClockwise.vue.dae2e135.js → PhClockCounterClockwise.vue.b4dc22ed.js} +2 -2
  75. abstra_statics/dist/assets/{PhCopy.vue.71703533.js → PhCopy.vue.17ec4184.js} +2 -2
  76. abstra_statics/dist/assets/PhCopySimple.vue.d9213ca9.js +2 -0
  77. abstra_statics/dist/assets/{PhCube.vue.f8549a9b.js → PhCube.vue.027246a6.js} +2 -2
  78. abstra_statics/dist/assets/PhDatabase.vue.a188015f.js +2 -0
  79. abstra_statics/dist/assets/{PhDotsThreeVertical.vue.9d76c4de.js → PhDotsThreeVertical.vue.e9c6f787.js} +2 -2
  80. abstra_statics/dist/assets/{PhDownloadSimple.vue.21156b6d.js → PhDownloadSimple.vue.9ba8ac6f.js} +2 -2
  81. abstra_statics/dist/assets/{PhFileArrowUp.vue.406b22e3.js → PhFileArrowUp.vue.cd3d3139.js} +2 -2
  82. abstra_statics/dist/assets/{PhFilePlus.vue.b180df90.js → PhFilePlus.vue.2464bbea.js} +2 -2
  83. abstra_statics/dist/assets/{PhFolderPlus.vue.b18fd061.js → PhFolderPlus.vue.696aab26.js} +2 -2
  84. abstra_statics/dist/assets/{PhGear.vue.bed38929.js → PhGear.vue.c247e86d.js} +2 -2
  85. abstra_statics/dist/assets/{PhKey.vue.6ef5fdd3.js → PhKey.vue.1a84e5d0.js} +2 -2
  86. abstra_statics/dist/assets/{PhPencil.vue.0fc0fcc0.js → PhPencil.vue.3586175f.js} +2 -2
  87. abstra_statics/dist/assets/{PhPencilSimple.vue.0707effd.js → PhPencilSimple.vue.e88b8fd0.js} +2 -2
  88. abstra_statics/dist/assets/{PhRocket.vue.761192f5.js → PhRocket.vue.8b8080c3.js} +2 -2
  89. abstra_statics/dist/assets/{PhSignOut.vue.8d8dfd96.js → PhSignOut.vue.9eb21b1c.js} +2 -2
  90. abstra_statics/dist/assets/{PhSparkle.vue.18ed0427.js → PhSparkle.vue.70bce97e.js} +2 -2
  91. abstra_statics/dist/assets/{PhTranslate.vue.00a17a08.js → PhTranslate.vue.e579c286.js} +2 -2
  92. abstra_statics/dist/assets/{PhUsersThree.vue.d69f0723.js → PhUsersThree.vue.65e9b349.js} +2 -2
  93. abstra_statics/dist/assets/{PhWarningCircle.vue.20bfeba7.js → PhWarningCircle.vue.3134c1fb.js} +2 -2
  94. abstra_statics/dist/assets/{PhWebhooksLogo.vue.58a98824.js → PhWebhooksLogo.vue.e7321653.js} +2 -2
  95. abstra_statics/dist/assets/{PlayerConfigProvider.ad360920.js → PlayerConfigProvider.f0eaf9f3.js} +2 -2
  96. abstra_statics/dist/assets/{PlayerNavbar.97e8dee9.js → PlayerNavbar.7c0453f2.js} +2 -2
  97. abstra_statics/dist/assets/Project.fad3c835.js +2 -0
  98. abstra_statics/dist/assets/{ProjectLogin.f92a038d.js → ProjectLogin.83ae9c4c.js} +2 -2
  99. abstra_statics/dist/assets/{ProjectSettings.582746dc.js → ProjectSettings.f4e91391.js} +2 -2
  100. abstra_statics/dist/assets/{ProjectsView.a6b3674b.js → ProjectsView.c4e3053a.js} +2 -2
  101. abstra_statics/dist/assets/{SaveButton.c3ad6e9b.js → SaveButton.986667ef.js} +2 -2
  102. abstra_statics/dist/assets/ScrollArea.vue_vue_type_script_setup_true_lang.077a2088.js +2 -0
  103. abstra_statics/dist/assets/{Sidebar.69f9369e.js → Sidebar.b1e6ca23.js} +2 -2
  104. abstra_statics/dist/assets/{Sql.cdefe5b9.js → Sql.24116fa0.js} +4 -4
  105. abstra_statics/dist/assets/Steps.95771774.js +2 -0
  106. abstra_statics/dist/assets/TableCard.981d88c4.js +2 -0
  107. abstra_statics/dist/assets/{TableEditor.fcfa13de.js → TableEditor.a74fc9f4.js} +2 -2
  108. abstra_statics/dist/assets/{Tables.4ee84a7c.js → Tables.870957e7.js} +2 -2
  109. abstra_statics/dist/assets/{TablesDiagram.b1d1579e.js → TablesDiagram.6a217e62.js} +3 -3
  110. abstra_statics/dist/assets/TablesTabs.vue_vue_type_script_setup_true_lang.983777c7.js +2 -0
  111. abstra_statics/dist/assets/{Tasks.fd2605bd.js → Tasks.8fbc0cc0.js} +2 -2
  112. abstra_statics/dist/assets/{UploadOutlined.64837788.js → UploadOutlined.e2352877.js} +2 -2
  113. abstra_statics/dist/assets/{View.b144c5e3.js → View.fd9cb47e.js} +2 -2
  114. abstra_statics/dist/assets/{View.vue_vue_type_script_setup_true_lang.c79117ce.js → View.vue_vue_type_script_setup_true_lang.69e51c6f.js} +2 -2
  115. abstra_statics/dist/assets/{Watermark.c0756030.js → Watermark.b1fed4a7.js} +2 -2
  116. abstra_statics/dist/assets/{WebEditor.774989ad.js → WebEditor.75ce5bd6.js} +2 -2
  117. abstra_statics/dist/assets/{WidgetPreview.4fd6afc0.js → WidgetPreview.5b0abaab.js} +2 -2
  118. abstra_statics/dist/assets/WorkflowViewer.0a209003.css +1 -0
  119. abstra_statics/dist/assets/WorkflowViewer.6f38d23f.js +2 -0
  120. abstra_statics/dist/assets/ant-design.5bd7ec4d.js +2 -0
  121. abstra_statics/dist/assets/{apiKey.ee792d72.js → apiKey.7cf16e08.js} +2 -2
  122. abstra_statics/dist/assets/asyncComputed.febe2b11.js +2 -0
  123. abstra_statics/dist/assets/{build.6e7d77b3.js → build.db7d8668.js} +2 -2
  124. abstra_statics/dist/assets/colorHelpers.939427f5.js +2 -0
  125. abstra_statics/dist/assets/{console.38bda98e.js → console.f402574a.js} +3 -3
  126. abstra_statics/dist/assets/{constants.be8ad36c.js → constants.bbfdfb21.js} +2 -2
  127. abstra_statics/dist/assets/contracts.generated.3f22c968.js +2 -0
  128. abstra_statics/dist/assets/{cssMode.408206bf.js → cssMode.d0c8e26e.js} +2 -2
  129. abstra_statics/dist/assets/{datetime.a6d58ce1.js → datetime.d5fe62ba.js} +2 -2
  130. abstra_statics/dist/assets/{dayjs.703ebc20.js → dayjs.8c9480e7.js} +2 -2
  131. abstra_statics/dist/assets/editor.11a4f0cf.js +2 -0
  132. abstra_statics/dist/assets/editor.main.2f21f781.js +2 -0
  133. abstra_statics/dist/assets/fetch.e0dfa394.js +2 -0
  134. abstra_statics/dist/assets/{files.1c1692f5.js → files.59b464cc.js} +2 -2
  135. abstra_statics/dist/assets/{folder.1b74b12c.js → folder.5b0f3179.js} +2 -2
  136. abstra_statics/dist/assets/{freemarker2.e62e067c.js → freemarker2.03629ab6.js} +2 -2
  137. abstra_statics/dist/assets/{handlebars.604fc901.js → handlebars.1163d9ba.js} +2 -2
  138. abstra_statics/dist/assets/{html.c02f177e.js → html.ef74c7bd.js} +2 -2
  139. abstra_statics/dist/assets/{htmlMode.64078e03.js → htmlMode.8829acd3.js} +2 -2
  140. abstra_statics/dist/assets/{index.2ec95eae.js → index.07e9309d.js} +2 -2
  141. abstra_statics/dist/assets/{index.5197afb2.js → index.12e6cfe2.js} +2 -2
  142. abstra_statics/dist/assets/{index.a12eba98.js → index.2aa34d4f.js} +5 -5
  143. abstra_statics/dist/assets/{index.82590a75.js → index.5eeedb69.js} +2 -2
  144. abstra_statics/dist/assets/{index.b91afb03.js → index.63e70668.js} +2 -2
  145. abstra_statics/dist/assets/index.75a16b09.js +2 -0
  146. abstra_statics/dist/assets/{index.bec0ecd0.js → index.76cbd30f.js} +2 -2
  147. abstra_statics/dist/assets/{index.015caad7.js → index.8995a499.js} +2 -2
  148. abstra_statics/dist/assets/{index.82842143.js → index.d408b03e.js} +2 -2
  149. abstra_statics/dist/assets/{javascript.57026f87.js → javascript.0dfeb7bb.js} +3 -3
  150. abstra_statics/dist/assets/{jsonMode.9b45b375.js → jsonMode.179b6695.js} +2 -2
  151. abstra_statics/dist/assets/{jwt-decode.c5760184.css → jwt-decode.cfe2994b.css} +1 -1
  152. abstra_statics/dist/assets/{jwt-decode.esm.3348bca5.js → jwt-decode.esm.47f59010.js} +88 -54
  153. abstra_statics/dist/assets/linters.9f818fd6.js +2 -0
  154. abstra_statics/dist/assets/{liquid.233d5164.js → liquid.0627704b.js} +3 -3
  155. abstra_statics/dist/assets/{member.d878cf3f.js → member.689a99e8.js} +2 -2
  156. abstra_statics/dist/assets/{metadata.9f7495db.js → metadata.69e468d6.js} +2 -2
  157. abstra_statics/dist/assets/{omniChatStore.40ad0b1b.js → omniChatStore.07f62bd5.js} +2 -2
  158. abstra_statics/dist/assets/{organization.8f08e075.js → organization.298987a0.js} +2 -2
  159. abstra_statics/dist/assets/{os.8ffdbf05.js → os.faa277a9.js} +2 -2
  160. abstra_statics/dist/assets/player.ebf3133f.js +2 -0
  161. abstra_statics/dist/assets/{plotly.min.da87d61b.js → plotly.min.16914e67.js} +2 -2
  162. abstra_statics/dist/assets/polling.96dd15ee.js +2 -0
  163. abstra_statics/dist/assets/{project.2483de10.js → project.8a5a3632.js} +2 -2
  164. abstra_statics/dist/assets/{python.1bdbd404.js → python.3bf17d7f.js} +3 -3
  165. abstra_statics/dist/assets/{razor.be821b87.js → razor.ea162aec.js} +3 -3
  166. abstra_statics/dist/assets/{record.a108da5a.js → record.30ff6eef.js} +2 -2
  167. abstra_statics/dist/assets/{redirect.eedb2bf6.js → redirect.d0ca2136.js} +2 -2
  168. abstra_statics/dist/assets/{repository.48119e01.js → repository.5c0cd878.js} +2 -2
  169. abstra_statics/dist/assets/repository.b1c27c35.js +2 -0
  170. abstra_statics/dist/assets/router.ae5c14de.js +2 -0
  171. abstra_statics/dist/assets/{router.c6e27700.js → router.cfb03f89.js} +5 -5
  172. abstra_statics/dist/assets/{string.998fa621.js → string.39c8a903.js} +2 -2
  173. abstra_statics/dist/assets/{tables.9701f90c.js → tables.34208b7c.js} +2 -2
  174. abstra_statics/dist/assets/tasksController.04461f1a.js +4 -0
  175. abstra_statics/dist/assets/{toggleHighContrast.23d5a1ab.js → toggleHighContrast.fa77fdf8.js} +7 -7
  176. abstra_statics/dist/assets/{tsMode.4558d65a.js → tsMode.a5869619.js} +2 -2
  177. abstra_statics/dist/assets/{typescript.4445d2fa.js → typescript.f2aa2c4b.js} +3 -3
  178. abstra_statics/dist/assets/url.4ba49005.js +2 -0
  179. abstra_statics/dist/assets/{useCodebaseEvents.6ebbc5a2.js → useCodebaseEvents.3542d20f.js} +2 -2
  180. abstra_statics/dist/assets/useTables.3e387cf0.js +2 -0
  181. abstra_statics/dist/assets/userStore.e8304ebc.js +2 -0
  182. abstra_statics/dist/assets/uuid.2075c158.js +2 -0
  183. abstra_statics/dist/assets/{vue-flow-background.f1022925.js → vue-flow-background.32950d16.js} +2 -2
  184. abstra_statics/dist/assets/{vue-flow-core.0de753a6.js → vue-flow-core.d96b7b33.js} +2 -2
  185. abstra_statics/dist/assets/{vue-quill.esm-bundler.8f4ad2b3.js → vue-quill.esm-bundler.42450ff3.js} +2 -2
  186. abstra_statics/dist/assets/{workspaceStore.5d3f2aec.js → workspaceStore.9693f43b.js} +2 -2
  187. abstra_statics/dist/assets/{xml.8a25758b.js → xml.a1244cf9.js} +3 -3
  188. abstra_statics/dist/assets/{yaml.e466330b.js → yaml.759fa896.js} +3 -3
  189. abstra_statics/dist/console.html +15 -15
  190. abstra_statics/dist/editor.html +14 -14
  191. abstra_statics/dist/player.html +10 -10
  192. abstra_internals/services/fs_storage.py +0 -76
  193. abstra_internals/services/fs_storage_test.py +0 -71
  194. abstra_statics/dist/assets/AbstraLogo.vue_vue_type_script_setup_true_lang.1035457c.js +0 -2
  195. abstra_statics/dist/assets/App.9ab9cabb.js +0 -2
  196. abstra_statics/dist/assets/App.vue_vue_type_style_index_0_lang.6713c9c9.js +0 -2
  197. abstra_statics/dist/assets/BaseLayout.28c01b5b.js +0 -2
  198. abstra_statics/dist/assets/CloseCircleOutlined.39b5ab06.js +0 -2
  199. abstra_statics/dist/assets/ConsoleOmniChat.vue_vue_type_script_setup_true_lang.5360224e.js +0 -2
  200. abstra_statics/dist/assets/ContentLayout.10f24838.js +0 -2
  201. abstra_statics/dist/assets/EnvVars.883a4a57.js +0 -2
  202. abstra_statics/dist/assets/ExclamationCircleOutlined.2441b96e.js +0 -2
  203. abstra_statics/dist/assets/Form.5d562f15.js +0 -2
  204. abstra_statics/dist/assets/Form.7493bc0a.css +0 -1
  205. abstra_statics/dist/assets/FormRunner.2b1b3c45.js +0 -2
  206. abstra_statics/dist/assets/Home.8502aa41.js +0 -2
  207. abstra_statics/dist/assets/LoadingContainer.ac03ea28.js +0 -2
  208. abstra_statics/dist/assets/Login.8bd6a07a.js +0 -2
  209. abstra_statics/dist/assets/Logo.fc8ace6c.js +0 -2
  210. abstra_statics/dist/assets/Logs.4c6c0b3a.js +0 -2
  211. abstra_statics/dist/assets/LogsController.a58ca42a.js +0 -2
  212. abstra_statics/dist/assets/Main.e6b2d2d5.js +0 -2
  213. abstra_statics/dist/assets/MockForm.e410c2c1.css +0 -1
  214. abstra_statics/dist/assets/NewEditor.2b6f4ed3.js +0 -8
  215. abstra_statics/dist/assets/OidcLoginCallback.987cebba.js +0 -2
  216. abstra_statics/dist/assets/OidcLogoutCallback.6c00d878.js +0 -2
  217. abstra_statics/dist/assets/PhCopySimple.vue.369eb629.js +0 -2
  218. abstra_statics/dist/assets/PhDatabase.vue.0d3246d7.js +0 -2
  219. abstra_statics/dist/assets/Project.6c4642b5.js +0 -2
  220. abstra_statics/dist/assets/ScrollArea.vue_vue_type_script_setup_true_lang.62178939.js +0 -2
  221. abstra_statics/dist/assets/Steps.82252fc0.js +0 -2
  222. abstra_statics/dist/assets/TableCard.5462c89d.js +0 -2
  223. abstra_statics/dist/assets/TablesTabs.vue_vue_type_script_setup_true_lang.3e5206e0.js +0 -2
  224. abstra_statics/dist/assets/WorkflowViewer.2666936e.js +0 -2
  225. abstra_statics/dist/assets/WorkflowViewer.3b6aee8e.css +0 -1
  226. abstra_statics/dist/assets/ant-design.b3eefa58.js +0 -2
  227. abstra_statics/dist/assets/asyncComputed.c73d027a.js +0 -2
  228. abstra_statics/dist/assets/colorHelpers.5ee17d14.js +0 -2
  229. abstra_statics/dist/assets/contracts.generated.f01de5a3.js +0 -2
  230. abstra_statics/dist/assets/editor.a77b56bd.js +0 -2
  231. abstra_statics/dist/assets/editor.main.a1ebf0ab.js +0 -2
  232. abstra_statics/dist/assets/fetch.cd29ef4c.js +0 -2
  233. abstra_statics/dist/assets/index.b72cb2b3.js +0 -2
  234. abstra_statics/dist/assets/linters.903f3240.js +0 -2
  235. abstra_statics/dist/assets/player.7112583e.js +0 -2
  236. abstra_statics/dist/assets/polling.f547718c.js +0 -2
  237. abstra_statics/dist/assets/repository.353e892d.js +0 -2
  238. abstra_statics/dist/assets/repository.677ca13c.js +0 -2
  239. abstra_statics/dist/assets/router.c7abfb0c.js +0 -2
  240. abstra_statics/dist/assets/tasksController.5db769f7.js +0 -4
  241. abstra_statics/dist/assets/url.5d02a63f.js +0 -2
  242. abstra_statics/dist/assets/useTables.4d5edd80.js +0 -2
  243. abstra_statics/dist/assets/userStore.34b8f1eb.js +0 -2
  244. abstra_statics/dist/assets/uuid.6980e2bb.js +0 -2
  245. {abstra-3.24.3.dist-info → abstra-3.24.5.dist-info}/WHEEL +0 -0
  246. {abstra-3.24.3.dist-info → abstra-3.24.5.dist-info}/entry_points.txt +0 -0
  247. {abstra-3.24.3.dist-info → abstra-3.24.5.dist-info}/top_level.txt +0 -0
  248. /abstra_statics/dist/assets/{LogsController.61f8e22d.css → ExecutionContext.61f8e22d.css} +0 -0
@@ -1,4 +1,4 @@
1
- import{d as me,K as ge,at as mt,eQ as qo,w as he,ab as ht,c as oe,r as ve,bG as _e,U as Le,eR as dr,R as Jo,o as le,ac as pe,f as ze,b as Tn,ae as Ve,u as j,eS as Qo,eT as Gt,aA as Re,eU as de,dy as fr,eV as jo,eh as et,eW as hr,e as tt,ad as ke,h as $e,a as nt,aY as ot,as as Pt,al as gr,t as kn,j as ei,ej as Zn,eE as vr,ax as ti,eX as pr,ep as Kn,c8 as mr,eY as yr,el as _r,g as wr,ed as br,eK as ut,V as xr}from"./jwt-decode.esm.3348bca5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9a86eede-1169-44ed-8fdc-28f737c83274",e._sentryDebugIdIdentifier="sentry-dbid-9a86eede-1169-44ed-8fdc-28f737c83274")}catch{}})();function an(e){return Qo()?(Gt(e),!0):!1}function Oe(e){return typeof e=="function"?e():j(e)}const Sr=typeof window<"u"&&typeof document<"u",Er=e=>typeof e<"u",Nr=Object.prototype.toString,Cr=e=>Nr.call(e)==="[object Object]",Mr=()=>{};function Ir(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 ni=e=>e();function Tr(e=ni){const t=ve(!0);function n(){t.value=!1}function o(){t.value=!0}const i=(...r)=>{t.value&&e(...r)};return{isActive:xr(t),pause:n,resume:o,eventFilter:i}}function so(e,t=!1,n="Timeout"){return new Promise((o,i)=>{setTimeout(t?()=>i(n):o,e)})}function kr(e,t,n={}){const{eventFilter:o=ni,...i}=n;return he(e,Ir(o,t),i)}function lt(e,t,n={}){const{eventFilter:o,...i}=n,{eventFilter:r,pause:s,resume:a,isActive:l}=Tr(o);return{stop:kr(e,t,{...i,eventFilter:r}),pause:s,resume:a,isActive:l}}function $r(e,t={}){if(!Kn(e))return mr(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const o in e.value)n[o]=yr(()=>({get(){return e.value[o]},set(i){var r;if((r=Oe(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 $n(e,t=!1){function n(h,{flush:v="sync",deep:p=!1,timeout:S,throwOnTimeout:y}={}){let w=null;const g=[new Promise(I=>{w=he(e,C=>{h(C)!==t&&(w==null||w(),I(C))},{flush:v,deep:p,immediate:!0})})];return S!=null&&g.push(so(S,y).then(()=>Oe(e)).finally(()=>w==null?void 0:w())),Promise.race(g)}function o(h,v){if(!Kn(h))return n(C=>C===h,v);const{flush:p="sync",deep:S=!1,timeout:y,throwOnTimeout:w}=v!=null?v:{};let x=null;const I=[new Promise(C=>{x=he([e,h],([z,F])=>{t!==(z===F)&&(x==null||x(),C(z))},{flush:p,deep:S,immediate:!0})})];return y!=null&&I.push(so(y,w).then(()=>Oe(e)).finally(()=>(x==null||x(),Oe(e)))),Promise.race(I)}function i(h){return n(v=>Boolean(v),h)}function r(h){return o(null,h)}function s(h){return o(void 0,h)}function a(h){return n(Number.isNaN,h)}function l(h,v){return n(p=>{const S=Array.from(p);return S.includes(h)||S.includes(Oe(h))},v)}function c(h){return u(1,h)}function u(h=1,v){let p=-1;return n(()=>(p+=1,p>=h),v)}return Array.isArray(Oe(e))?{toMatch:n,toContains:l,changed:c,changedTimes:u,get not(){return $n(e,!t)}}:{toMatch:n,toBe:o,toBeTruthy:i,toBeNull:r,toBeNaN:a,toBeUndefined:s,changed:c,changedTimes:u,get not(){return $n(e,!t)}}}function Pn(e){return $n(e)}function Pr(e){var t;const n=Oe(e);return(t=n==null?void 0:n.$el)!=null?t:n}const oi=Sr?window:void 0;function ii(...e){let t,n,o,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,i]=e,t=oi):[t,n,o,i]=e,!t)return Mr;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const r=[],s=()=>{r.forEach(u=>u()),r.length=0},a=(u,h,v,p)=>(u.addEventListener(h,v,p),()=>u.removeEventListener(h,v,p)),l=he(()=>[Pr(t),Oe(i)],([u,h])=>{if(s(),!u)return;const v=Cr(h)?{...h}:h;r.push(...n.flatMap(p=>o.map(S=>a(u,p,S,v))))},{immediate:!0,flush:"post"}),c=()=>{l(),s()};return an(c),c}function Dr(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function ao(...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=oi,eventName:r="keydown",passive:s=!1,dedupe:a=!1}=o,l=Dr(t);return ii(i,r,u=>{u.repeat&&Oe(a)||l(u)&&n(u)},s)}function Ar(e){return JSON.parse(JSON.stringify(e))}function _n(e,t,n,o={}){var i,r,s;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:h,shouldEmit:v}=o,p=Pt(),S=n||(p==null?void 0:p.emit)||((i=p==null?void 0:p.$emit)==null?void 0:i.bind(p))||((s=(r=p==null?void 0:p.proxy)==null?void 0:r.$emit)==null?void 0:s.bind(p==null?void 0:p.proxy));let y=c;t||(t="modelValue"),y=y||`update:${t.toString()}`;const w=I=>a?typeof a=="function"?a(I):Ar(I):I,x=()=>Er(e[t])?w(e[t]):h,g=I=>{v?v(I)&&S(y,I):S(y,I)};if(l){const I=x(),C=ve(I);let z=!1;return he(()=>e[t],F=>{z||(z=!0,C.value=w(F),Re(()=>z=!1))}),he(C,F=>{!z&&(F!==e[t]||u)&&g(F)},{deep:u}),C}else return oe({get(){return x()},set(I){g(I)}})}var Or={value:()=>{}};function ln(){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 Xt(n)}function Xt(e){this._=e}function zr(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}})}Xt.prototype=ln.prototype={constructor:Xt,on:function(e,t){var n=this._,o=zr(e+"",n),i,r=-1,s=o.length;if(arguments.length<2){for(;++r<s;)if((i=(e=o[r]).type)&&(i=Br(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]=lo(n[i],e.name,t);else if(t==null)for(i in n)n[i]=lo(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 Xt(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 Br(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function lo(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=Or,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var Dn="http://www.w3.org/1999/xhtml";const uo={svg:"http://www.w3.org/2000/svg",xhtml:Dn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function un(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),uo.hasOwnProperty(t)?{space:uo[t],local:e}:e}function Rr(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Dn&&t.documentElement.namespaceURI===Dn?t.createElement(e):t.createElementNS(n,e)}}function Vr(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ri(e){var t=un(e);return(t.local?Vr:Rr)(t)}function Hr(){}function Wn(e){return e==null?Hr:function(){return this.querySelector(e)}}function Lr(e){typeof e!="function"&&(e=Wn(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,c,u=0;u<s;++u)(l=r[u])&&(c=e.call(l,l.__data__,u,r))&&("__data__"in l&&(c.__data__=l.__data__),a[u]=c);return new Ee(o,this._parents)}function Fr(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Yr(){return[]}function si(e){return e==null?Yr:function(){return this.querySelectorAll(e)}}function Gr(e){return function(){return Fr(e.apply(this,arguments))}}function Xr(e){typeof e=="function"?e=Gr(e):e=si(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,c=0;c<a;++c)(l=s[c])&&(o.push(e.call(l,l.__data__,c,s)),i.push(l));return new Ee(o,i)}function ai(e){return function(){return this.matches(e)}}function li(e){return function(t){return t.matches(e)}}var Ur=Array.prototype.find;function Zr(e){return function(){return Ur.call(this.children,e)}}function Kr(){return this.firstElementChild}function Wr(e){return this.select(e==null?Kr:Zr(typeof e=="function"?e:li(e)))}var qr=Array.prototype.filter;function Jr(){return Array.from(this.children)}function Qr(e){return function(){return qr.call(this.children,e)}}function jr(e){return this.selectAll(e==null?Jr:Qr(typeof e=="function"?e:li(e)))}function es(e){typeof e!="function"&&(e=ai(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,c=0;c<s;++c)(l=r[c])&&e.call(l,l.__data__,c,r)&&a.push(l);return new Ee(o,this._parents)}function ui(e){return new Array(e.length)}function ts(){return new Ee(this._enter||this._groups.map(ui),this._parents)}function Wt(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Wt.prototype={constructor:Wt,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 ns(e){return function(){return e}}function os(e,t,n,o,i,r){for(var s=0,a,l=t.length,c=r.length;s<c;++s)(a=t[s])?(a.__data__=r[s],o[s]=a):n[s]=new Wt(e,r[s]);for(;s<l;++s)(a=t[s])&&(i[s]=a)}function is(e,t,n,o,i,r,s){var a,l,c=new Map,u=t.length,h=r.length,v=new Array(u),p;for(a=0;a<u;++a)(l=t[a])&&(v[a]=p=s.call(l,l.__data__,a,t)+"",c.has(p)?i[a]=l:c.set(p,l));for(a=0;a<h;++a)p=s.call(e,r[a],a,r)+"",(l=c.get(p))?(o[a]=l,l.__data__=r[a],c.delete(p)):n[a]=new Wt(e,r[a]);for(a=0;a<u;++a)(l=t[a])&&c.get(v[a])===l&&(i[a]=l)}function rs(e){return e.__data__}function ss(e,t){if(!arguments.length)return Array.from(this,rs);var n=t?is:os,o=this._parents,i=this._groups;typeof e!="function"&&(e=ns(e));for(var r=i.length,s=new Array(r),a=new Array(r),l=new Array(r),c=0;c<r;++c){var u=o[c],h=i[c],v=h.length,p=as(e.call(u,u&&u.__data__,c,o)),S=p.length,y=a[c]=new Array(S),w=s[c]=new Array(S),x=l[c]=new Array(v);n(u,h,y,w,x,p,t);for(var g=0,I=0,C,z;g<S;++g)if(C=y[g]){for(g>=I&&(I=g+1);!(z=w[I])&&++I<S;);C._next=z||null}}return s=new Ee(s,o),s._enter=a,s._exit=l,s}function as(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ls(){return new Ee(this._exit||this._groups.map(ui),this._parents)}function us(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 cs(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 c=n[l],u=o[l],h=c.length,v=a[l]=new Array(h),p,S=0;S<h;++S)(p=c[S]||u[S])&&(v[S]=p);for(;l<i;++l)a[l]=n[l];return new Ee(a,this._parents)}function ds(){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 fs(e){e||(e=hs);function t(h,v){return h&&v?e(h.__data__,v.__data__):!h-!v}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),c,u=0;u<a;++u)(c=s[u])&&(l[u]=c);l.sort(t)}return new Ee(i,this._parents).order()}function hs(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function gs(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function vs(){return Array.from(this)}function ps(){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 ms(){let e=0;for(const t of this)++e;return e}function ys(){return!this.node()}function _s(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 ws(e){return function(){this.removeAttribute(e)}}function bs(e){return function(){this.removeAttributeNS(e.space,e.local)}}function xs(e,t){return function(){this.setAttribute(e,t)}}function Ss(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Es(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Ns(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 Cs(e,t){var n=un(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?bs:ws:typeof t=="function"?n.local?Ns:Es:n.local?Ss:xs)(n,t))}function ci(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ms(e){return function(){this.style.removeProperty(e)}}function Is(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Ts(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function ks(e,t,n){return arguments.length>1?this.each((t==null?Ms:typeof t=="function"?Ts:Is)(e,t,n==null?"":n)):gt(this.node(),e)}function gt(e,t){return e.style.getPropertyValue(t)||ci(e).getComputedStyle(e,null).getPropertyValue(t)}function $s(e){return function(){delete this[e]}}function Ps(e,t){return function(){this[e]=t}}function Ds(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function As(e,t){return arguments.length>1?this.each((t==null?$s:typeof t=="function"?Ds:Ps)(e,t)):this.node()[e]}function di(e){return e.trim().split(/^|\s+/)}function qn(e){return e.classList||new fi(e)}function fi(e){this._node=e,this._names=di(e.getAttribute("class")||"")}fi.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 hi(e,t){for(var n=qn(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function gi(e,t){for(var n=qn(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function Os(e){return function(){hi(this,e)}}function zs(e){return function(){gi(this,e)}}function Bs(e,t){return function(){(t.apply(this,arguments)?hi:gi)(this,e)}}function Rs(e,t){var n=di(e+"");if(arguments.length<2){for(var o=qn(this.node()),i=-1,r=n.length;++i<r;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Bs:t?Os:zs)(n,t))}function Vs(){this.textContent=""}function Hs(e){return function(){this.textContent=e}}function Ls(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function Fs(e){return arguments.length?this.each(e==null?Vs:(typeof e=="function"?Ls:Hs)(e)):this.node().textContent}function Ys(){this.innerHTML=""}function Gs(e){return function(){this.innerHTML=e}}function Xs(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function Us(e){return arguments.length?this.each(e==null?Ys:(typeof e=="function"?Xs:Gs)(e)):this.node().innerHTML}function Zs(){this.nextSibling&&this.parentNode.appendChild(this)}function Ks(){return this.each(Zs)}function Ws(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function qs(){return this.each(Ws)}function Js(e){var t=typeof e=="function"?e:ri(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Qs(){return null}function js(e,t){var n=typeof e=="function"?e:ri(e),o=t==null?Qs:typeof t=="function"?t:Wn(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function ea(){var e=this.parentNode;e&&e.removeChild(this)}function ta(){return this.each(ea)}function na(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function oa(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ia(e){return this.select(e?oa:na)}function ra(e){return arguments.length?this.property("__data__",e):this.node().__data__}function sa(e){return function(t){e.call(this,t,this.__data__)}}function aa(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 la(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 ua(e,t,n){return function(){var o=this.__on,i,r=sa(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 ca(e,t,n){var o=aa(e+""),i,r=o.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,u;l<c;++l)for(i=0,u=a[l];i<r;++i)if((s=o[i]).type===u.type&&s.name===u.name)return u.value}return}for(a=t?ua:la,i=0;i<r;++i)this.each(a(o[i],t,n));return this}function vi(e,t,n){var o=ci(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 da(e,t){return function(){return vi(this,e,t)}}function fa(e,t){return function(){return vi(this,e,t.apply(this,arguments))}}function ha(e,t){return this.each((typeof t=="function"?fa:da)(e,t))}function*ga(){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 pi=[null];function Ee(e,t){this._groups=e,this._parents=t}function Dt(){return new Ee([[document.documentElement]],pi)}function va(){return this}Ee.prototype=Dt.prototype={constructor:Ee,select:Lr,selectAll:Xr,selectChild:Wr,selectChildren:jr,filter:es,data:ss,enter:ts,exit:ls,join:us,merge:cs,selection:va,order:ds,sort:fs,call:gs,nodes:vs,node:ps,size:ms,empty:ys,each:_s,attr:Cs,style:ks,property:As,classed:Rs,text:Fs,html:Us,raise:Ks,lower:qs,append:Js,insert:js,remove:ta,clone:ia,datum:ra,on:ca,dispatch:ha,[Symbol.iterator]:ga};function Ne(e){return typeof e=="string"?new Ee([[document.querySelector(e)]],[document.documentElement]):new Ee([[e]],pi)}function pa(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ie(e,t){if(e=pa(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 ma={passive:!1},Ct={capture:!0,passive:!1};function wn(e){e.stopImmediatePropagation()}function ct(e){e.preventDefault(),e.stopImmediatePropagation()}function mi(e){var t=e.document.documentElement,n=Ne(e).on("dragstart.drag",ct,Ct);"onselectstart"in t?n.on("selectstart.drag",ct,Ct):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function yi(e,t){var n=e.document.documentElement,o=Ne(e).on("dragstart.drag",null);t&&(o.on("click.drag",ct,Ct),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 zt=e=>()=>e;function An(e,{sourceEvent:t,subject:n,target:o,identifier:i,active:r,x:s,y:a,dx:l,dy:c,dispatch:u}){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:c,enumerable:!0,configurable:!0},_:{value:u}})}An.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function ya(e){return!e.ctrlKey&&!e.button}function _a(){return this.parentNode}function wa(e,t){return t==null?{x:e.x,y:e.y}:t}function ba(){return navigator.maxTouchPoints||"ontouchstart"in this}function xa(){var e=ya,t=_a,n=wa,o=ba,i={},r=ln("start","drag","end"),s=0,a,l,c,u,h=0;function v(C){C.on("mousedown.drag",p).filter(o).on("touchstart.drag",w).on("touchmove.drag",x,ma).on("touchend.drag touchcancel.drag",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(C,z){if(!(u||!e.call(this,C,z))){var F=I(this,t.call(this,C,z),C,z,"mouse");!F||(Ne(C.view).on("mousemove.drag",S,Ct).on("mouseup.drag",y,Ct),mi(C.view),wn(C),c=!1,a=C.clientX,l=C.clientY,F("start",C))}}function S(C){if(ct(C),!c){var z=C.clientX-a,F=C.clientY-l;c=z*z+F*F>h}i.mouse("drag",C)}function y(C){Ne(C.view).on("mousemove.drag mouseup.drag",null),yi(C.view,c),ct(C),i.mouse("end",C)}function w(C,z){if(!!e.call(this,C,z)){var F=C.changedTouches,R=t.call(this,C,z),q=F.length,G,$;for(G=0;G<q;++G)($=I(this,R,C,z,F[G].identifier,F[G]))&&(wn(C),$("start",C,F[G]))}}function x(C){var z=C.changedTouches,F=z.length,R,q;for(R=0;R<F;++R)(q=i[z[R].identifier])&&(ct(C),q("drag",C,z[R]))}function g(C){var z=C.changedTouches,F=z.length,R,q;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),R=0;R<F;++R)(q=i[z[R].identifier])&&(wn(C),q("end",C,z[R]))}function I(C,z,F,R,q,G){var $=r.copy(),m=Ie(G||F,z),J,ne,_;if((_=n.call(C,new An("beforestart",{sourceEvent:F,target:v,identifier:q,active:s,x:m[0],y:m[1],dx:0,dy:0,dispatch:$}),R))!=null)return J=_.x-m[0]||0,ne=_.y-m[1]||0,function M(E,k,P){var D=m,V;switch(E){case"start":i[q]=M,V=s++;break;case"end":delete i[q],--s;case"drag":m=Ie(P||k,z),V=s;break}$.call(E,C,new An(E,{sourceEvent:k,subject:_,target:v,identifier:q,active:V,x:m[0]+J,y:m[1]+ne,dx:m[0]-D[0],dy:m[1]-D[1],dispatch:$}),R)}}return v.filter=function(C){return arguments.length?(e=typeof C=="function"?C:zt(!!C),v):e},v.container=function(C){return arguments.length?(t=typeof C=="function"?C:zt(C),v):t},v.subject=function(C){return arguments.length?(n=typeof C=="function"?C:zt(C),v):n},v.touchable=function(C){return arguments.length?(o=typeof C=="function"?C:zt(!!C),v):o},v.on=function(){var C=r.on.apply(r,arguments);return C===r?v:C},v.clickDistance=function(C){return arguments.length?(h=(C=+C)*C,v):Math.sqrt(h)},v}function Jn(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function _i(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function At(){}var Mt=.7,qt=1/Mt,dt="\\s*([+-]?\\d+)\\s*",It="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Te="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Sa=/^#([0-9a-f]{3,8})$/,Ea=new RegExp(`^rgb\\(${dt},${dt},${dt}\\)$`),Na=new RegExp(`^rgb\\(${Te},${Te},${Te}\\)$`),Ca=new RegExp(`^rgba\\(${dt},${dt},${dt},${It}\\)$`),Ma=new RegExp(`^rgba\\(${Te},${Te},${Te},${It}\\)$`),Ia=new RegExp(`^hsl\\(${It},${Te},${Te}\\)$`),Ta=new RegExp(`^hsla\\(${It},${Te},${Te},${It}\\)$`),co={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};Jn(At,Tt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:fo,formatHex:fo,formatHex8:ka,formatHsl:$a,formatRgb:ho,toString:ho});function fo(){return this.rgb().formatHex()}function ka(){return this.rgb().formatHex8()}function $a(){return wi(this).formatHsl()}function ho(){return this.rgb().formatRgb()}function Tt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Sa.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?go(t):n===3?new Se(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Bt(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Bt(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=Ea.exec(e))?new Se(t[1],t[2],t[3],1):(t=Na.exec(e))?new Se(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ca.exec(e))?Bt(t[1],t[2],t[3],t[4]):(t=Ma.exec(e))?Bt(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Ia.exec(e))?mo(t[1],t[2]/100,t[3]/100,1):(t=Ta.exec(e))?mo(t[1],t[2]/100,t[3]/100,t[4]):co.hasOwnProperty(e)?go(co[e]):e==="transparent"?new Se(NaN,NaN,NaN,0):null}function go(e){return new Se(e>>16&255,e>>8&255,e&255,1)}function Bt(e,t,n,o){return o<=0&&(e=t=n=NaN),new Se(e,t,n,o)}function Pa(e){return e instanceof At||(e=Tt(e)),e?(e=e.rgb(),new Se(e.r,e.g,e.b,e.opacity)):new Se}function On(e,t,n,o){return arguments.length===1?Pa(e):new Se(e,t,n,o==null?1:o)}function Se(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}Jn(Se,On,_i(At,{brighter(e){return e=e==null?qt:Math.pow(qt,e),new Se(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Mt:Math.pow(Mt,e),new Se(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Se(Qe(this.r),Qe(this.g),Qe(this.b),Jt(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:vo,formatHex:vo,formatHex8:Da,formatRgb:po,toString:po}));function vo(){return`#${Je(this.r)}${Je(this.g)}${Je(this.b)}`}function Da(){return`#${Je(this.r)}${Je(this.g)}${Je(this.b)}${Je((isNaN(this.opacity)?1:this.opacity)*255)}`}function po(){const e=Jt(this.opacity);return`${e===1?"rgb(":"rgba("}${Qe(this.r)}, ${Qe(this.g)}, ${Qe(this.b)}${e===1?")":`, ${e})`}`}function Jt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Qe(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Je(e){return e=Qe(e),(e<16?"0":"")+e.toString(16)}function mo(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ce(e,t,n,o)}function wi(e){if(e instanceof Ce)return new Ce(e.h,e.s,e.l,e.opacity);if(e instanceof At||(e=Tt(e)),!e)return new Ce;if(e instanceof Ce)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 Ce(s,a,l,e.opacity)}function Aa(e,t,n,o){return arguments.length===1?wi(e):new Ce(e,t,n,o==null?1:o)}function Ce(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Jn(Ce,Aa,_i(At,{brighter(e){return e=e==null?qt:Math.pow(qt,e),new Ce(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Mt:Math.pow(Mt,e),new Ce(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 Se(bn(e>=240?e-240:e+120,i,o),bn(e,i,o),bn(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new Ce(yo(this.h),Rt(this.s),Rt(this.l),Jt(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=Jt(this.opacity);return`${e===1?"hsl(":"hsla("}${yo(this.h)}, ${Rt(this.s)*100}%, ${Rt(this.l)*100}%${e===1?")":`, ${e})`}`}}));function yo(e){return e=(e||0)%360,e<0?e+360:e}function Rt(e){return Math.max(0,Math.min(1,e||0))}function bn(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 bi=e=>()=>e;function Oa(e,t){return function(n){return e+n*t}}function za(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 Ba(e){return(e=+e)==1?xi:function(t,n){return n-t?za(t,n,e):bi(isNaN(t)?n:t)}}function xi(e,t){var n=t-e;return n?Oa(e,n):bi(isNaN(e)?t:e)}const _o=function e(t){var n=Ba(t);function o(i,r){var s=n((i=On(i)).r,(r=On(r)).r),a=n(i.g,r.g),l=n(i.b,r.b),c=xi(i.opacity,r.opacity);return function(u){return i.r=s(u),i.g=a(u),i.b=l(u),i.opacity=c(u),i+""}}return o.gamma=e,o}(1);function Xe(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var zn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xn=new RegExp(zn.source,"g");function Ra(e){return function(){return e}}function Va(e){return function(t){return e(t)+""}}function Ha(e,t){var n=zn.lastIndex=xn.lastIndex=0,o,i,r,s=-1,a=[],l=[];for(e=e+"",t=t+"";(o=zn.exec(e))&&(i=xn.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:Xe(o,i)})),n=xn.lastIndex;return n<t.length&&(r=t.slice(n),a[s]?a[s]+=r:a[++s]=r),a.length<2?l[0]?Va(l[0].x):Ra(t):(t=l.length,function(c){for(var u=0,h;u<t;++u)a[(h=l[u]).i]=h.x(c);return a.join("")})}var wo=180/Math.PI,Bn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Si(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)*wo,skewX:Math.atan(l)*wo,scaleX:s,scaleY:a}}var Vt;function La(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Bn:Si(t.a,t.b,t.c,t.d,t.e,t.f)}function Fa(e){return e==null||(Vt||(Vt=document.createElementNS("http://www.w3.org/2000/svg","g")),Vt.setAttribute("transform",e),!(e=Vt.transform.baseVal.consolidate()))?Bn:(e=e.matrix,Si(e.a,e.b,e.c,e.d,e.e,e.f))}function Ei(e,t,n,o){function i(c){return c.length?c.pop()+" ":""}function r(c,u,h,v,p,S){if(c!==h||u!==v){var y=p.push("translate(",null,t,null,n);S.push({i:y-4,x:Xe(c,h)},{i:y-2,x:Xe(u,v)})}else(h||v)&&p.push("translate("+h+t+v+n)}function s(c,u,h,v){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),v.push({i:h.push(i(h)+"rotate(",null,o)-2,x:Xe(c,u)})):u&&h.push(i(h)+"rotate("+u+o)}function a(c,u,h,v){c!==u?v.push({i:h.push(i(h)+"skewX(",null,o)-2,x:Xe(c,u)}):u&&h.push(i(h)+"skewX("+u+o)}function l(c,u,h,v,p,S){if(c!==h||u!==v){var y=p.push(i(p)+"scale(",null,",",null,")");S.push({i:y-4,x:Xe(c,h)},{i:y-2,x:Xe(u,v)})}else(h!==1||v!==1)&&p.push(i(p)+"scale("+h+","+v+")")}return function(c,u){var h=[],v=[];return c=e(c),u=e(u),r(c.translateX,c.translateY,u.translateX,u.translateY,h,v),s(c.rotate,u.rotate,h,v),a(c.skewX,u.skewX,h,v),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,v),c=u=null,function(p){for(var S=-1,y=v.length,w;++S<y;)h[(w=v[S]).i]=w.x(p);return h.join("")}}}var Ya=Ei(La,"px, ","px)","deg)"),Ga=Ei(Fa,", ",")",")"),Xa=1e-12;function bo(e){return((e=Math.exp(e))+1/e)/2}function Ua(e){return((e=Math.exp(e))-1/e)/2}function Za(e){return((e=Math.exp(2*e))-1)/(e+1)}const Ka=function e(t,n,o){function i(r,s){var a=r[0],l=r[1],c=r[2],u=s[0],h=s[1],v=s[2],p=u-a,S=h-l,y=p*p+S*S,w,x;if(y<Xa)x=Math.log(v/c)/t,w=function(R){return[a+R*p,l+R*S,c*Math.exp(t*R*x)]};else{var g=Math.sqrt(y),I=(v*v-c*c+o*y)/(2*c*n*g),C=(v*v-c*c-o*y)/(2*v*n*g),z=Math.log(Math.sqrt(I*I+1)-I),F=Math.log(Math.sqrt(C*C+1)-C);x=(F-z)/t,w=function(R){var q=R*x,G=bo(z),$=c/(n*g)*(G*Za(t*q+z)-Ua(z));return[a+$*p,l+$*S,c*G/bo(t*q+z)]}}return w.duration=x*1e3*t/Math.SQRT2,w}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 vt=0,bt=0,_t=0,Ni=1e3,Qt,xt,jt=0,it=0,cn=0,kt=typeof performance=="object"&&performance.now?performance:Date,Ci=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Qn(){return it||(Ci(Wa),it=kt.now()+cn)}function Wa(){it=0}function en(){this._call=this._time=this._next=null}en.prototype=Mi.prototype={constructor:en,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Qn():+n)+(t==null?0:+t),!this._next&&xt!==this&&(xt?xt._next=this:Qt=this,xt=this),this._call=e,this._time=n,Rn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Rn())}};function Mi(e,t,n){var o=new en;return o.restart(e,t,n),o}function qa(){Qn(),++vt;for(var e=Qt,t;e;)(t=it-e._time)>=0&&e._call.call(void 0,t),e=e._next;--vt}function xo(){it=(jt=kt.now())+cn,vt=bt=0;try{qa()}finally{vt=0,Qa(),it=0}}function Ja(){var e=kt.now(),t=e-jt;t>Ni&&(cn-=t,jt=e)}function Qa(){for(var e,t=Qt,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:Qt=n);xt=e,Rn(o)}function Rn(e){if(!vt){bt&&(bt=clearTimeout(bt));var t=e-it;t>24?(e<1/0&&(bt=setTimeout(xo,e-kt.now()-cn)),_t&&(_t=clearInterval(_t))):(_t||(jt=kt.now(),_t=setInterval(Ja,Ni)),vt=1,Ci(xo))}}function So(e,t,n){var o=new en;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var ja=ln("start","end","cancel","interrupt"),el=[],Ii=0,Eo=1,Vn=2,Ut=3,No=4,Hn=5,Zt=6;function dn(e,t,n,o,i,r){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;tl(e,n,{name:t,index:o,group:i,on:ja,tween:el,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:Ii})}function jn(e,t){var n=Me(e,t);if(n.state>Ii)throw new Error("too late; already scheduled");return n}function Pe(e,t){var n=Me(e,t);if(n.state>Ut)throw new Error("too late; already running");return n}function Me(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function tl(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=Mi(r,0,n.time);function r(c){n.state=Eo,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var u,h,v,p;if(n.state!==Eo)return l();for(u in o)if(p=o[u],p.name===n.name){if(p.state===Ut)return So(s);p.state===No?(p.state=Zt,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete o[u]):+u<t&&(p.state=Zt,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete o[u])}if(So(function(){n.state===Ut&&(n.state=No,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=Vn,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Vn){for(n.state=Ut,i=new Array(v=n.tween.length),u=0,h=-1;u<v;++u)(p=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function a(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=Hn,1),h=-1,v=i.length;++h<v;)i[h].call(e,u);n.state===Hn&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Zt,n.timer.stop(),delete o[t];for(var c in o)return;delete e.__transition}}function Kt(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>Vn&&o.state<Hn,o.state=Zt,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[s]}r&&delete e.__transition}}function nl(e){return this.each(function(){Kt(this,e)})}function ol(e,t){var n,o;return function(){var i=Pe(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 il(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var r=Pe(this,e),s=r.tween;if(s!==o){i=(o=s).slice();for(var a={name:t,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=a;break}l===c&&i.push(a)}r.tween=i}}function rl(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=Me(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?ol:il)(n,e,t))}function eo(e,t,n){var o=e._id;return e.each(function(){var i=Pe(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Me(i,o).value[t]}}function Ti(e,t){var n;return(typeof t=="number"?Xe:t instanceof Tt?_o:(n=Tt(t))?(t=n,_o):Ha)(e,t)}function sl(e){return function(){this.removeAttribute(e)}}function al(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ll(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 ul(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 cl(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 dl(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 fl(e,t){var n=un(e),o=n==="transform"?Ga:Ti;return this.attrTween(e,typeof t=="function"?(n.local?dl:cl)(n,o,eo(this,"attr."+e,t)):t==null?(n.local?al:sl)(n):(n.local?ul:ll)(n,o,t))}function hl(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function gl(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function vl(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&gl(e,r)),n}return i._value=t,i}function pl(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&hl(e,r)),n}return i._value=t,i}function ml(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=un(e);return this.tween(n,(o.local?vl:pl)(o,t))}function yl(e,t){return function(){jn(this,e).delay=+t.apply(this,arguments)}}function _l(e,t){return t=+t,function(){jn(this,e).delay=t}}function wl(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?yl:_l)(t,e)):Me(this.node(),t).delay}function bl(e,t){return function(){Pe(this,e).duration=+t.apply(this,arguments)}}function xl(e,t){return t=+t,function(){Pe(this,e).duration=t}}function Sl(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?bl:xl)(t,e)):Me(this.node(),t).duration}function El(e,t){if(typeof t!="function")throw new Error;return function(){Pe(this,e).ease=t}}function Nl(e){var t=this._id;return arguments.length?this.each(El(t,e)):Me(this.node(),t).ease}function Cl(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Pe(this,e).ease=n}}function Ml(e){if(typeof e!="function")throw new Error;return this.each(Cl(this._id,e))}function Il(e){typeof e!="function"&&(e=ai(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,c=0;c<s;++c)(l=r[c])&&e.call(l,l.__data__,c,r)&&a.push(l);return new He(o,this._parents,this._name,this._id)}function Tl(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],c=n[a],u=l.length,h=s[a]=new Array(u),v,p=0;p<u;++p)(v=l[p]||c[p])&&(h[p]=v);for(;a<o;++a)s[a]=t[a];return new He(s,this._parents,this._name,this._id)}function kl(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 $l(e,t,n){var o,i,r=kl(t)?jn:Pe;return function(){var s=r(this,e),a=s.on;a!==o&&(i=(o=a).copy()).on(t,n),s.on=i}}function Pl(e,t){var n=this._id;return arguments.length<2?Me(this.node(),n).on.on(e):this.each($l(n,e,t))}function Dl(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Al(){return this.on("end.remove",Dl(this._id))}function Ol(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Wn(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,c=r[s]=new Array(l),u,h,v=0;v<l;++v)(u=a[v])&&(h=e.call(u,u.__data__,v,a))&&("__data__"in u&&(h.__data__=u.__data__),c[v]=h,dn(c[v],t,n,v,c,Me(u,n)));return new He(r,this._parents,t,n)}function zl(e){var t=this._name,n=this._id;typeof e!="function"&&(e=si(e));for(var o=this._groups,i=o.length,r=[],s=[],a=0;a<i;++a)for(var l=o[a],c=l.length,u,h=0;h<c;++h)if(u=l[h]){for(var v=e.call(u,u.__data__,h,l),p,S=Me(u,n),y=0,w=v.length;y<w;++y)(p=v[y])&&dn(p,t,n,y,v,S);r.push(v),s.push(u)}return new He(r,s,t,n)}var Bl=Dt.prototype.constructor;function Rl(){return new Bl(this._groups,this._parents)}function Vl(e,t){var n,o,i;return function(){var r=gt(this,e),s=(this.style.removeProperty(e),gt(this,e));return r===s?null:r===n&&s===o?i:i=t(n=r,o=s)}}function ki(e){return function(){this.style.removeProperty(e)}}function Hl(e,t,n){var o,i=n+"",r;return function(){var s=gt(this,e);return s===i?null:s===o?r:r=t(o=s,n)}}function Ll(e,t,n){var o,i,r;return function(){var s=gt(this,e),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(e),gt(this,e))),s===l?null:s===o&&l===i?r:(i=l,r=t(o=s,a))}}function Fl(e,t){var n,o,i,r="style."+t,s="end."+r,a;return function(){var l=Pe(this,e),c=l.on,u=l.value[r]==null?a||(a=ki(t)):void 0;(c!==n||i!==u)&&(o=(n=c).copy()).on(s,i=u),l.on=o}}function Yl(e,t,n){var o=(e+="")=="transform"?Ya:Ti;return t==null?this.styleTween(e,Vl(e,o)).on("end.style."+e,ki(e)):typeof t=="function"?this.styleTween(e,Ll(e,o,eo(this,"style."+e,t))).each(Fl(this._id,e)):this.styleTween(e,Hl(e,o,t),n).on("end.style."+e,null)}function Gl(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function Xl(e,t,n){var o,i;function r(){var s=t.apply(this,arguments);return s!==i&&(o=(i=s)&&Gl(e,s,n)),o}return r._value=t,r}function Ul(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,Xl(e,t,n==null?"":n))}function Zl(e){return function(){this.textContent=e}}function Kl(e){return function(){var t=e(this);this.textContent=t==null?"":t}}function Wl(e){return this.tween("text",typeof e=="function"?Kl(eo(this,"text",e)):Zl(e==null?"":e+""))}function ql(e){return function(t){this.textContent=e.call(this,t)}}function Jl(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&ql(i)),t}return o._value=e,o}function Ql(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,Jl(e))}function jl(){for(var e=this._name,t=this._id,n=$i(),o=this._groups,i=o.length,r=0;r<i;++r)for(var s=o[r],a=s.length,l,c=0;c<a;++c)if(l=s[c]){var u=Me(l,t);dn(l,e,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new He(o,this._parents,e,n)}function eu(){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 c=Pe(this,o),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),c.on=t}),i===0&&r()})}var tu=0;function He(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function $i(){return++tu}var Ae=Dt.prototype;He.prototype={constructor:He,select:Ol,selectAll:zl,selectChild:Ae.selectChild,selectChildren:Ae.selectChildren,filter:Il,merge:Tl,selection:Rl,transition:jl,call:Ae.call,nodes:Ae.nodes,node:Ae.node,size:Ae.size,empty:Ae.empty,each:Ae.each,on:Pl,attr:fl,attrTween:ml,style:Yl,styleTween:Ul,text:Wl,textTween:Ql,remove:Al,tween:rl,delay:wl,duration:Sl,ease:Nl,easeVarying:Ml,end:eu,[Symbol.iterator]:Ae[Symbol.iterator]};function nu(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var ou={time:null,delay:0,duration:250,ease:nu};function iu(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 ru(e){var t,n;e instanceof He?(t=e._id,e=e._name):(t=$i(),(n=ou).time=Qn(),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,c=0;c<a;++c)(l=s[c])&&dn(l,e,t,c,s,n||iu(l,t));return new He(o,this._parents,e,t)}Dt.prototype.interrupt=nl;Dt.prototype.transition=ru;const Ht=e=>()=>e;function su(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 Be(e,t,n){this.k=e,this.x=t,this.y=n}Be.prototype={constructor:Be,scale:function(e){return e===1?this:new Be(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Be(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 pt=new Be(1,0,0);Be.prototype;function Sn(e){e.stopImmediatePropagation()}function wt(e){e.preventDefault(),e.stopImmediatePropagation()}function au(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function lu(){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 Co(){return this.__zoom||pt}function uu(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function cu(){return navigator.maxTouchPoints||"ontouchstart"in this}function du(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 fu(){var e=au,t=lu,n=du,o=uu,i=cu,r=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,l=Ka,c=ln("start","zoom","end"),u,h,v,p=500,S=150,y=0,w=10;function x(_){_.property("__zoom",Co).on("wheel.zoom",q,{passive:!1}).on("mousedown.zoom",G).on("dblclick.zoom",$).filter(i).on("touchstart.zoom",m).on("touchmove.zoom",J).on("touchend.zoom touchcancel.zoom",ne).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}x.transform=function(_,M,E,k){var P=_.selection?_.selection():_;P.property("__zoom",Co),_!==P?z(_,M,E,k):P.interrupt().each(function(){F(this,arguments).event(k).start().zoom(null,typeof M=="function"?M.apply(this,arguments):M).end()})},x.scaleBy=function(_,M,E,k){x.scaleTo(_,function(){var P=this.__zoom.k,D=typeof M=="function"?M.apply(this,arguments):M;return P*D},E,k)},x.scaleTo=function(_,M,E,k){x.transform(_,function(){var P=t.apply(this,arguments),D=this.__zoom,V=E==null?C(P):typeof E=="function"?E.apply(this,arguments):E,B=D.invert(V),Q=typeof M=="function"?M.apply(this,arguments):M;return n(I(g(D,Q),V,B),P,s)},E,k)},x.translateBy=function(_,M,E,k){x.transform(_,function(){return n(this.__zoom.translate(typeof M=="function"?M.apply(this,arguments):M,typeof E=="function"?E.apply(this,arguments):E),t.apply(this,arguments),s)},null,k)},x.translateTo=function(_,M,E,k,P){x.transform(_,function(){var D=t.apply(this,arguments),V=this.__zoom,B=k==null?C(D):typeof k=="function"?k.apply(this,arguments):k;return n(pt.translate(B[0],B[1]).scale(V.k).translate(typeof M=="function"?-M.apply(this,arguments):-M,typeof E=="function"?-E.apply(this,arguments):-E),D,s)},k,P)};function g(_,M){return M=Math.max(r[0],Math.min(r[1],M)),M===_.k?_:new Be(M,_.x,_.y)}function I(_,M,E){var k=M[0]-E[0]*_.k,P=M[1]-E[1]*_.k;return k===_.x&&P===_.y?_:new Be(_.k,k,P)}function C(_){return[(+_[0][0]+ +_[1][0])/2,(+_[0][1]+ +_[1][1])/2]}function z(_,M,E,k){_.on("start.zoom",function(){F(this,arguments).event(k).start()}).on("interrupt.zoom end.zoom",function(){F(this,arguments).event(k).end()}).tween("zoom",function(){var P=this,D=arguments,V=F(P,D).event(k),B=t.apply(P,D),Q=E==null?C(B):typeof E=="function"?E.apply(P,D):E,L=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),O=P.__zoom,U=typeof M=="function"?M.apply(P,D):M,ue=l(O.invert(Q).concat(L/O.k),U.invert(Q).concat(L/U.k));return function(se){if(se===1)se=U;else{var ce=ue(se),te=L/ce[2];se=new Be(te,Q[0]-ce[0]*te,Q[1]-ce[1]*te)}V.zoom(null,se)}})}function F(_,M,E){return!E&&_.__zooming||new R(_,M)}function R(_,M){this.that=_,this.args=M,this.active=0,this.sourceEvent=null,this.extent=t.apply(_,M),this.taps=0}R.prototype={event:function(_){return _&&(this.sourceEvent=_),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(_,M){return this.mouse&&_!=="mouse"&&(this.mouse[1]=M.invert(this.mouse[0])),this.touch0&&_!=="touch"&&(this.touch0[1]=M.invert(this.touch0[0])),this.touch1&&_!=="touch"&&(this.touch1[1]=M.invert(this.touch1[0])),this.that.__zoom=M,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(_){var M=Ne(this.that).datum();c.call(_,this.that,new su(_,{sourceEvent:this.sourceEvent,target:x,type:_,transform:this.that.__zoom,dispatch:c}),M)}};function q(_,...M){if(!e.apply(this,arguments))return;var E=F(this,M).event(_),k=this.__zoom,P=Math.max(r[0],Math.min(r[1],k.k*Math.pow(2,o.apply(this,arguments)))),D=Ie(_);if(E.wheel)(E.mouse[0][0]!==D[0]||E.mouse[0][1]!==D[1])&&(E.mouse[1]=k.invert(E.mouse[0]=D)),clearTimeout(E.wheel);else{if(k.k===P)return;E.mouse=[D,k.invert(D)],Kt(this),E.start()}wt(_),E.wheel=setTimeout(V,S),E.zoom("mouse",n(I(g(k,P),E.mouse[0],E.mouse[1]),E.extent,s));function V(){E.wheel=null,E.end()}}function G(_,...M){if(v||!e.apply(this,arguments))return;var E=_.currentTarget,k=F(this,M,!0).event(_),P=Ne(_.view).on("mousemove.zoom",Q,!0).on("mouseup.zoom",L,!0),D=Ie(_,E),V=_.clientX,B=_.clientY;mi(_.view),Sn(_),k.mouse=[D,this.__zoom.invert(D)],Kt(this),k.start();function Q(O){if(wt(O),!k.moved){var U=O.clientX-V,ue=O.clientY-B;k.moved=U*U+ue*ue>y}k.event(O).zoom("mouse",n(I(k.that.__zoom,k.mouse[0]=Ie(O,E),k.mouse[1]),k.extent,s))}function L(O){P.on("mousemove.zoom mouseup.zoom",null),yi(O.view,k.moved),wt(O),k.event(O).end()}}function $(_,...M){if(!!e.apply(this,arguments)){var E=this.__zoom,k=Ie(_.changedTouches?_.changedTouches[0]:_,this),P=E.invert(k),D=E.k*(_.shiftKey?.5:2),V=n(I(g(E,D),k,P),t.apply(this,M),s);wt(_),a>0?Ne(this).transition().duration(a).call(z,V,k,_):Ne(this).call(x.transform,V,k,_)}}function m(_,...M){if(!!e.apply(this,arguments)){var E=_.touches,k=E.length,P=F(this,M,_.changedTouches.length===k).event(_),D,V,B,Q;for(Sn(_),V=0;V<k;++V)B=E[V],Q=Ie(B,this),Q=[Q,this.__zoom.invert(Q),B.identifier],P.touch0?!P.touch1&&P.touch0[2]!==Q[2]&&(P.touch1=Q,P.taps=0):(P.touch0=Q,D=!0,P.taps=1+!!u);u&&(u=clearTimeout(u)),D&&(P.taps<2&&(h=Q[0],u=setTimeout(function(){u=null},p)),Kt(this),P.start())}}function J(_,...M){if(!!this.__zooming){var E=F(this,M).event(_),k=_.changedTouches,P=k.length,D,V,B,Q;for(wt(_),D=0;D<P;++D)V=k[D],B=Ie(V,this),E.touch0&&E.touch0[2]===V.identifier?E.touch0[0]=B:E.touch1&&E.touch1[2]===V.identifier&&(E.touch1[0]=B);if(V=E.that.__zoom,E.touch1){var L=E.touch0[0],O=E.touch0[1],U=E.touch1[0],ue=E.touch1[1],se=(se=U[0]-L[0])*se+(se=U[1]-L[1])*se,ce=(ce=ue[0]-O[0])*ce+(ce=ue[1]-O[1])*ce;V=g(V,Math.sqrt(se/ce)),B=[(L[0]+U[0])/2,(L[1]+U[1])/2],Q=[(O[0]+ue[0])/2,(O[1]+ue[1])/2]}else if(E.touch0)B=E.touch0[0],Q=E.touch0[1];else return;E.zoom("touch",n(I(V,B,Q),E.extent,s))}}function ne(_,...M){if(!!this.__zooming){var E=F(this,M).event(_),k=_.changedTouches,P=k.length,D,V;for(Sn(_),v&&clearTimeout(v),v=setTimeout(function(){v=null},p),D=0;D<P;++D)V=k[D],E.touch0&&E.touch0[2]===V.identifier?delete E.touch0:E.touch1&&E.touch1[2]===V.identifier&&delete E.touch1;if(E.touch1&&!E.touch0&&(E.touch0=E.touch1,delete E.touch1),E.touch0)E.touch0[1]=this.__zoom.invert(E.touch0[0]);else if(E.end(),E.taps===2&&(V=Ie(V,this),Math.hypot(h[0]-V[0],h[1]-V[1])<w)){var B=Ne(this).on("dblclick.zoom");B&&B.apply(this,arguments)}}}return x.wheelDelta=function(_){return arguments.length?(o=typeof _=="function"?_:Ht(+_),x):o},x.filter=function(_){return arguments.length?(e=typeof _=="function"?_:Ht(!!_),x):e},x.touchable=function(_){return arguments.length?(i=typeof _=="function"?_:Ht(!!_),x):i},x.extent=function(_){return arguments.length?(t=typeof _=="function"?_:Ht([[+_[0][0],+_[0][1]],[+_[1][0],+_[1][1]]]),x):t},x.scaleExtent=function(_){return arguments.length?(r[0]=+_[0],r[1]=+_[1],x):[r[0],r[1]]},x.translateExtent=function(_){return arguments.length?(s[0][0]=+_[0][0],s[1][0]=+_[1][0],s[0][1]=+_[0][1],s[1][1]=+_[1][1],x):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},x.constrain=function(_){return arguments.length?(n=_,x):n},x.duration=function(_){return arguments.length?(a=+_,x):a},x.interpolate=function(_){return arguments.length?(l=_,x):l},x.on=function(){var _=c.on.apply(c,arguments);return _===c?x:_},x.clickDistance=function(_){return arguments.length?(y=(_=+_)*_,x):Math.sqrt(y)},x.tapDistance=function(_){return arguments.length?(w=+_,x):w},x}var K=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(K||{}),to=(e=>(e.Partial="partial",e.Full="full",e))(to||{}),We=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(We||{}),rt=(e=>(e.Strict="strict",e.Loose="loose",e))(rt||{}),Ln=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(Ln||{}),Et=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(Et||{}),hu=(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))(hu||{});function Fn(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==null?void 0:o.hasAttribute)=="function"?o.hasAttribute("contenteditable"):!1,r=typeof(o==null?void 0:o.closest)=="function"?o.closest(".nokey"):null;return["INPUT","SELECT","TEXTAREA"].includes(o==null?void 0:o.nodeName)||i||!!r}function gu(e){return e.ctrlKey||e.metaKey||e.shiftKey}function Mo(e,t,n,o){const i=t.split("+").map(r=>r.trim().toLowerCase());return i.length===1?e.toLowerCase()===t.toLowerCase():(o?n.delete(e.toLowerCase()):n.add(e.toLowerCase()),i.every((r,s)=>n.has(r)&&Array.from(n.values())[s]===i[s]))}function vu(e,t){return n=>{if(!n.code&&!n.key)return!1;const o=pu(n.code,e);return Array.isArray(e)?e.some(i=>Mo(n[o],i,t,n.type==="keyup")):Mo(n[o],e,t,n.type==="keyup")}}function pu(e,t){return typeof t=="string"?e===t?"code":"key":t.includes(e)?"code":"key"}function Nt(e,t){const n=_e(()=>{var u;return(u=de(t==null?void 0:t.actInsideInputWithModifier))!=null?u:!1}),o=_e(()=>{var u;return(u=de(t==null?void 0:t.target))!=null?u:window}),i=ve(de(e)===!0);let r=!1;const s=new Set;let a=c(de(e));he(()=>de(e),(u,h)=>{typeof h=="boolean"&&typeof u!="boolean"&&l(),a=c(u)},{immediate:!0}),Le(()=>{ii(window,["blur","contextmenu"],l)}),ao((...u)=>a(...u),u=>{r=gu(u),!((!r||r&&!n.value)&&Fn(u))&&(u.preventDefault(),i.value=!0)},{eventName:"keydown",target:o}),ao((...u)=>a(...u),u=>{if(i.value){if((!r||r&&!n.value)&&Fn(u))return;l()}},{eventName:"keyup",target:o});function l(){r=!1,s.clear(),i.value=!1}function c(u){return u===null?(l(),()=>!1):typeof u=="boolean"?(l(),i.value=u,()=>!1):Array.isArray(u)||typeof u=="string"?vu(u,s):u}return i}const Pi="vue-flow__node-desc",Di="vue-flow__edge-desc",mu="vue-flow__aria-live",Ai=["Enter"," ","Escape"],ft={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function Yn(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function Gn(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 fn(e){return{width:e.offsetWidth,height:e.offsetHeight}}function st(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function Oi(e,t){return{x:st(e.x,t[0][0],t[1][0]),y:st(e.y,t[0][1],t[1][1])}}function Io(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function Ke(e){return e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e}function je(e){return e&&typeof e=="object"&&"id"in e&&"position"in e&&!Ke(e)}function St(e){return je(e)&&"computedPosition"in e}function Lt(e){return!Number.isNaN(e)&&Number.isFinite(e)}function yu(e){return Lt(e.width)&&Lt(e.height)&&Lt(e.x)&&Lt(e.y)}function _u(e,t,n){var i;const o={id:e.id.toString(),type:(i=e.type)!=null?i:"default",dimensions:ut({width:0,height:0}),computedPosition:ut({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:we(e.data)?e.data:{},events:ut(we(e.events)?e.events:{})};return Object.assign(t!=null?t:o,e,{id:e.id.toString(),parentNode:n})}function zi(e,t,n){var s,a,l,c,u,h,v;var o,i;const r={id:e.id.toString(),type:(a=(s=e.type)!=null?s:t==null?void 0:t.type)!=null?a:"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:(l=e.updatable)!=null?l:n==null?void 0:n.updatable,selectable:(c=e.selectable)!=null?c:n==null?void 0:n.selectable,focusable:(u=e.focusable)!=null?u:n==null?void 0:n.focusable,data:we(e.data)?e.data:{},events:ut(we(e.events)?e.events:{}),label:(h=e.label)!=null?h:"",interactionWidth:(v=e.interactionWidth)!=null?v:n==null?void 0:n.interactionWidth,...n!=null?n:{}};return Object.assign(t!=null?t:r,e,{id:e.id.toString()})}function Bi(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 wu(...e){if(e.length===3){const[r,s,a]=e;return Bi(r,s,a,"target")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(r=>Ke(r)&&r.source===o).map(r=>n.find(s=>je(s)&&s.id===r.target))}function bu(...e){if(e.length===3){const[r,s,a]=e;return Bi(r,s,a,"source")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(r=>Ke(r)&&r.target===o).map(r=>n.find(s=>je(s)&&s.id===r.source))}function Ri({source:e,sourceHandle:t,target:n,targetHandle:o}){return`vueflow__edge-${e}${t!=null?t:""}-${n}${o!=null?o:""}`}function xu(e,t){return t.some(n=>Ke(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 Vi({x:e,y:t},{x:n,y:o,zoom:i}){return{x:e*i+n,y:t*i+o}}function tn({x:e,y:t},{x:n,y:o,zoom:i},r=!1,[s,a]=[1,1]){const l={x:(e-n)/i,y:(t-o)/i};return r?{x:s*Math.round(l.x/s),y:a*Math.round(l.y/a)}:l}function Hi(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 nn({x:e,y:t,width:n,height:o}){return{x:e,y:t,x2:e+n,y2:t+o}}function Li({x:e,y:t,x2:n,y2:o}){return{x:e,y:t,width:n-e,height:o-t}}function wd(e,t){return Li(Hi(nn(e),nn(t)))}function Fi(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=Hi(t,nn({...o.computedPosition,...o.dimensions}))}return Li(t)}function Yi(e,t,n={x:0,y:0,zoom:1},o=!1,i=!1){var a,l,c,u;const r={...tn(t,n),width:t.width/n.zoom,height:t.height/n.zoom},s=[];for(const h of e){const{dimensions:v,selectable:p=!0,hidden:S=!1}=h,y=(l=(a=v.width)!=null?a:h.width)!=null?l:null,w=(u=(c=v.height)!=null?c:h.height)!=null?u:null;if(i&&!p||S)continue;const x=Gn(r,Yn(h)),g=y===null||w===null,I=o&&x>0,C=(y!=null?y:0)*(w!=null?w:0);(g||I||x>=C||h.dragging)&&s.push(h)}return s}function Gi(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 To(e,t,n,o,i,r=.1,s={x:0,y:0}){var y,w;const a=t/(e.width*(1+r)),l=n/(e.height*(1+r)),c=Math.min(a,l),u=st(c,o,i),h=e.x+e.width/2,v=e.y+e.height/2,p=t/2-h*u+((y=s.x)!=null?y:0),S=n/2-v*u+((w=s.y)!=null?w:0);return{x:p,y:S,zoom:u}}function Su(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function Xi(e,t){if(!e.parentNode)return!1;const n=t(e.parentNode);return n?n.selected?!0:Xi(n,t):!1}function $t(e,t){return typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`}function ko(e,t,n){return e<t?st(Math.abs(e-t),1,t)/t:e>n?-st(Math.abs(e-n),1,t)/t:0}function Ui(e,t,n=15,o=40){const i=ko(e.x,o,t.width-o)*n,r=ko(e.y,o,t.height-o)*n;return[i,r]}function En(e,t){var n,o;if(t){const i=e.position.x+e.dimensions.width-t.dimensions.width,r=e.position.y+e.dimensions.height-t.dimensions.height;if(i>0||r>0||e.position.x<0||e.position.y<0){let s={};if(typeof t.style=="function"?s={...t.style(t)}:t.style&&(s={...t.style}),s.width=(n=s.width)!=null?n:`${t.dimensions.width}px`,s.height=(o=s.height)!=null?o:`${t.dimensions.height}px`,i>0)if(typeof s.width=="string"){const a=Number(s.width.replace("px",""));s.width=`${a+i}px`}else s.width+=i;if(r>0)if(typeof s.height=="string"){const a=Number(s.height.replace("px",""));s.height=`${a+r}px`}else s.height+=r;if(e.position.x<0){const a=Math.abs(e.position.x);if(t.position.x=t.position.x-a,typeof s.width=="string"){const l=Number(s.width.replace("px",""));s.width=`${l+a}px`}else s.width+=a;e.position.x=0}if(e.position.y<0){const a=Math.abs(e.position.y);if(t.position.y=t.position.y-a,typeof s.height=="string"){const l=Number(s.height.replace("px",""));s.height=`${l+a}px`}else s.height+=a;e.position.y=0}t.dimensions.width=Number(s.width.toString().replace("px","")),t.dimensions.height=Number(s.height.toString().replace("px","")),typeof t.style=="function"?t.style=a=>{const l=t.style;return{...l(a),...s}}:t.style={...t.style,...s}}}}function $o(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(St(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&&St(l)&&En(s,l)}break;case"dimensions":if(St(s)&&(typeof a.dimensions<"u"&&(s.dimensions=a.dimensions),typeof a.updateStyle<"u"&&(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&&St(l)&&(!!l.dimensions.width&&!!l.dimensions.height?En(s,l):Re(()=>{En(s,l)}))}break}return t}function Ge(e,t){return{id:e,type:"select",selected:t}}function Po(e){return{item:e,type:"add"}}function Do(e){return{id:e,type:"remove"}}function Ao(e,t,n,o,i){return{id:e,source:t,target:n,sourceHandle:o||null,targetHandle:i||null,type:"remove"}}function Ue(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(Ge(r.id,s)))}return o}function H(e){const t=new Set;let n=!1;const o=()=>t.size>0;e&&(n=!0,t.add(e));const i=a=>{t.delete(a)};return{on:a=>{e&&n&&t.delete(e),t.add(a);const l=()=>{i(a),e&&n&&t.add(e)};return an(l),{off:l}},off:i,trigger:a=>Promise.all(Array.from(t).map(l=>l(a))),hasListeners:o,fns:t}}function Oo(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 Eu(e,t,n,o,i){var r,s;const a=[];for(const l of e)(l.selected||l.id===i)&&(!l.parentNode||!Xi(l,o))&&(l.draggable||t&&typeof l.draggable>"u")&&a.push(ut({id:l.id,position:l.position||{x:0,y:0},distance:{x:n.x-((r=l.computedPosition)==null?void 0:r.x)||0,y:n.y-((s=l.computedPosition)==null?void 0:s.y)||0},from:l.computedPosition,extent:l.extent,parentNode:l.parentNode,dimensions:l.dimensions,expandParent:l.expandParent}));return a}function Nn({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 Zi(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 Nu(e,t,n){const[o,i,r,s]=typeof e!="string"?Zi(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 Cu(e,t,n,o){let i=e.extent||n;if((i==="parent"||!Array.isArray(i)&&(i==null?void 0:i.range)==="parent")&&!e.expandParent)if(e.parentNode&&o&&e.dimensions.width&&e.dimensions.height){const r=Nu(i,e,o);r&&(i=r)}else t(new xe(be.NODE_EXTENT_INVALID,e.id)),i=n;else if(Array.isArray(i)){const r=(o==null?void 0:o.computedPosition.x)||0,s=(o==null?void 0: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==null?void 0:i.range)&&Array.isArray(i.range)){const[r,s,a,l]=Zi(i.padding),c=(o==null?void 0:o.computedPosition.x)||0,u=(o==null?void 0:o.computedPosition.y)||0;i=[[i.range[0][0]+c+l,i.range[0][1]+u+r],[i.range[1][0]+c-s,i.range[1][1]+u-a]]}return i==="parent"?[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]]:i}function Mu({width:e,height:t},n){return[n[0],[n[1][0]-(e||0),n[1][1]-(t||0)]]}function no(e,t,n,o,i){const r=Mu(e.dimensions,Cu(e,n,o,i)),s=Oi(t,r);return{position:{x:s.x-((i==null?void 0:i.computedPosition.x)||0),y:s.y-((i==null?void 0:i.computedPosition.y)||0)},computedPosition:s}}function on(e,t,n=K.Left){var l,c,u;const o=((l=t==null?void 0:t.x)!=null?l:0)+e.computedPosition.x,i=((c=t==null?void 0:t.y)!=null?c:0)+e.computedPosition.y,{width:r,height:s}=t!=null?t:ku(e);switch((u=t==null?void 0:t.position)!=null?u:n){case K.Top:return{x:o+r/2,y:i};case K.Right:return{x:o+r,y:i+s/2};case K.Bottom:return{x:o+r/2,y:i+s};case K.Left:return{x:o,y:i+s/2}}}function zo(e=[],t){return e.length&&(t?e.find(n=>n.id===t):e[0])||null}function Iu({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:o,targetWidth:i,targetHeight:r,width:s,height:a,viewport:l}){const c={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)};c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const u=nn({x:(0-l.x)/l.zoom,y:(0-l.y)/l.zoom,width:s/l.zoom,height:a/l.zoom}),h=Math.max(0,Math.min(u.x2,c.x2)-Math.max(u.x,c.x)),v=Math.max(0,Math.min(u.y2,c.y2)-Math.max(u.y,c.y));return Math.ceil(h*v)>0}function Tu(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 be=(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))(be||{});const Bo={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
1
+ import{d as me,K as ge,at as mt,eQ as qo,w as he,ab as ht,c as oe,r as ve,bG as _e,U as Le,eR as dr,R as Jo,o as le,ac as pe,f as ze,b as Tn,ae as Ve,u as j,eS as Qo,eT as Gt,aA as Re,eU as de,dy as fr,eV as jo,eh as et,eW as hr,e as tt,ad as ke,h as $e,a as nt,aY as ot,as as Pt,al as gr,t as kn,j as ei,ej as Zn,eE as vr,ax as ti,eX as pr,ep as Kn,c8 as mr,eY as yr,el as _r,g as wr,ed as br,eK as ut,V as xr}from"./jwt-decode.esm.47f59010.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b3cc7f28-48ef-41e5-99c3-9bbc1626155f",e._sentryDebugIdIdentifier="sentry-dbid-b3cc7f28-48ef-41e5-99c3-9bbc1626155f")}catch{}})();function an(e){return Qo()?(Gt(e),!0):!1}function Oe(e){return typeof e=="function"?e():j(e)}const Sr=typeof window<"u"&&typeof document<"u",Er=e=>typeof e<"u",Nr=Object.prototype.toString,Cr=e=>Nr.call(e)==="[object Object]",Mr=()=>{};function Ir(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 ni=e=>e();function Tr(e=ni){const t=ve(!0);function n(){t.value=!1}function o(){t.value=!0}const i=(...r)=>{t.value&&e(...r)};return{isActive:xr(t),pause:n,resume:o,eventFilter:i}}function so(e,t=!1,n="Timeout"){return new Promise((o,i)=>{setTimeout(t?()=>i(n):o,e)})}function kr(e,t,n={}){const{eventFilter:o=ni,...i}=n;return he(e,Ir(o,t),i)}function lt(e,t,n={}){const{eventFilter:o,...i}=n,{eventFilter:r,pause:s,resume:a,isActive:l}=Tr(o);return{stop:kr(e,t,{...i,eventFilter:r}),pause:s,resume:a,isActive:l}}function $r(e,t={}){if(!Kn(e))return mr(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const o in e.value)n[o]=yr(()=>({get(){return e.value[o]},set(i){var r;if((r=Oe(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 $n(e,t=!1){function n(h,{flush:v="sync",deep:p=!1,timeout:S,throwOnTimeout:y}={}){let w=null;const g=[new Promise(I=>{w=he(e,C=>{h(C)!==t&&(w==null||w(),I(C))},{flush:v,deep:p,immediate:!0})})];return S!=null&&g.push(so(S,y).then(()=>Oe(e)).finally(()=>w==null?void 0:w())),Promise.race(g)}function o(h,v){if(!Kn(h))return n(C=>C===h,v);const{flush:p="sync",deep:S=!1,timeout:y,throwOnTimeout:w}=v!=null?v:{};let x=null;const I=[new Promise(C=>{x=he([e,h],([z,F])=>{t!==(z===F)&&(x==null||x(),C(z))},{flush:p,deep:S,immediate:!0})})];return y!=null&&I.push(so(y,w).then(()=>Oe(e)).finally(()=>(x==null||x(),Oe(e)))),Promise.race(I)}function i(h){return n(v=>Boolean(v),h)}function r(h){return o(null,h)}function s(h){return o(void 0,h)}function a(h){return n(Number.isNaN,h)}function l(h,v){return n(p=>{const S=Array.from(p);return S.includes(h)||S.includes(Oe(h))},v)}function c(h){return u(1,h)}function u(h=1,v){let p=-1;return n(()=>(p+=1,p>=h),v)}return Array.isArray(Oe(e))?{toMatch:n,toContains:l,changed:c,changedTimes:u,get not(){return $n(e,!t)}}:{toMatch:n,toBe:o,toBeTruthy:i,toBeNull:r,toBeNaN:a,toBeUndefined:s,changed:c,changedTimes:u,get not(){return $n(e,!t)}}}function Pn(e){return $n(e)}function Pr(e){var t;const n=Oe(e);return(t=n==null?void 0:n.$el)!=null?t:n}const oi=Sr?window:void 0;function ii(...e){let t,n,o,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,i]=e,t=oi):[t,n,o,i]=e,!t)return Mr;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const r=[],s=()=>{r.forEach(u=>u()),r.length=0},a=(u,h,v,p)=>(u.addEventListener(h,v,p),()=>u.removeEventListener(h,v,p)),l=he(()=>[Pr(t),Oe(i)],([u,h])=>{if(s(),!u)return;const v=Cr(h)?{...h}:h;r.push(...n.flatMap(p=>o.map(S=>a(u,p,S,v))))},{immediate:!0,flush:"post"}),c=()=>{l(),s()};return an(c),c}function Dr(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function ao(...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=oi,eventName:r="keydown",passive:s=!1,dedupe:a=!1}=o,l=Dr(t);return ii(i,r,u=>{u.repeat&&Oe(a)||l(u)&&n(u)},s)}function Ar(e){return JSON.parse(JSON.stringify(e))}function _n(e,t,n,o={}){var i,r,s;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:h,shouldEmit:v}=o,p=Pt(),S=n||(p==null?void 0:p.emit)||((i=p==null?void 0:p.$emit)==null?void 0:i.bind(p))||((s=(r=p==null?void 0:p.proxy)==null?void 0:r.$emit)==null?void 0:s.bind(p==null?void 0:p.proxy));let y=c;t||(t="modelValue"),y=y||`update:${t.toString()}`;const w=I=>a?typeof a=="function"?a(I):Ar(I):I,x=()=>Er(e[t])?w(e[t]):h,g=I=>{v?v(I)&&S(y,I):S(y,I)};if(l){const I=x(),C=ve(I);let z=!1;return he(()=>e[t],F=>{z||(z=!0,C.value=w(F),Re(()=>z=!1))}),he(C,F=>{!z&&(F!==e[t]||u)&&g(F)},{deep:u}),C}else return oe({get(){return x()},set(I){g(I)}})}var Or={value:()=>{}};function ln(){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 Xt(n)}function Xt(e){this._=e}function zr(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}})}Xt.prototype=ln.prototype={constructor:Xt,on:function(e,t){var n=this._,o=zr(e+"",n),i,r=-1,s=o.length;if(arguments.length<2){for(;++r<s;)if((i=(e=o[r]).type)&&(i=Br(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]=lo(n[i],e.name,t);else if(t==null)for(i in n)n[i]=lo(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 Xt(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 Br(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function lo(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=Or,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var Dn="http://www.w3.org/1999/xhtml";const uo={svg:"http://www.w3.org/2000/svg",xhtml:Dn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function un(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),uo.hasOwnProperty(t)?{space:uo[t],local:e}:e}function Rr(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Dn&&t.documentElement.namespaceURI===Dn?t.createElement(e):t.createElementNS(n,e)}}function Vr(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ri(e){var t=un(e);return(t.local?Vr:Rr)(t)}function Hr(){}function Wn(e){return e==null?Hr:function(){return this.querySelector(e)}}function Lr(e){typeof e!="function"&&(e=Wn(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,c,u=0;u<s;++u)(l=r[u])&&(c=e.call(l,l.__data__,u,r))&&("__data__"in l&&(c.__data__=l.__data__),a[u]=c);return new Ee(o,this._parents)}function Fr(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Yr(){return[]}function si(e){return e==null?Yr:function(){return this.querySelectorAll(e)}}function Gr(e){return function(){return Fr(e.apply(this,arguments))}}function Xr(e){typeof e=="function"?e=Gr(e):e=si(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,c=0;c<a;++c)(l=s[c])&&(o.push(e.call(l,l.__data__,c,s)),i.push(l));return new Ee(o,i)}function ai(e){return function(){return this.matches(e)}}function li(e){return function(t){return t.matches(e)}}var Ur=Array.prototype.find;function Zr(e){return function(){return Ur.call(this.children,e)}}function Kr(){return this.firstElementChild}function Wr(e){return this.select(e==null?Kr:Zr(typeof e=="function"?e:li(e)))}var qr=Array.prototype.filter;function Jr(){return Array.from(this.children)}function Qr(e){return function(){return qr.call(this.children,e)}}function jr(e){return this.selectAll(e==null?Jr:Qr(typeof e=="function"?e:li(e)))}function es(e){typeof e!="function"&&(e=ai(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,c=0;c<s;++c)(l=r[c])&&e.call(l,l.__data__,c,r)&&a.push(l);return new Ee(o,this._parents)}function ui(e){return new Array(e.length)}function ts(){return new Ee(this._enter||this._groups.map(ui),this._parents)}function Wt(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Wt.prototype={constructor:Wt,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 ns(e){return function(){return e}}function os(e,t,n,o,i,r){for(var s=0,a,l=t.length,c=r.length;s<c;++s)(a=t[s])?(a.__data__=r[s],o[s]=a):n[s]=new Wt(e,r[s]);for(;s<l;++s)(a=t[s])&&(i[s]=a)}function is(e,t,n,o,i,r,s){var a,l,c=new Map,u=t.length,h=r.length,v=new Array(u),p;for(a=0;a<u;++a)(l=t[a])&&(v[a]=p=s.call(l,l.__data__,a,t)+"",c.has(p)?i[a]=l:c.set(p,l));for(a=0;a<h;++a)p=s.call(e,r[a],a,r)+"",(l=c.get(p))?(o[a]=l,l.__data__=r[a],c.delete(p)):n[a]=new Wt(e,r[a]);for(a=0;a<u;++a)(l=t[a])&&c.get(v[a])===l&&(i[a]=l)}function rs(e){return e.__data__}function ss(e,t){if(!arguments.length)return Array.from(this,rs);var n=t?is:os,o=this._parents,i=this._groups;typeof e!="function"&&(e=ns(e));for(var r=i.length,s=new Array(r),a=new Array(r),l=new Array(r),c=0;c<r;++c){var u=o[c],h=i[c],v=h.length,p=as(e.call(u,u&&u.__data__,c,o)),S=p.length,y=a[c]=new Array(S),w=s[c]=new Array(S),x=l[c]=new Array(v);n(u,h,y,w,x,p,t);for(var g=0,I=0,C,z;g<S;++g)if(C=y[g]){for(g>=I&&(I=g+1);!(z=w[I])&&++I<S;);C._next=z||null}}return s=new Ee(s,o),s._enter=a,s._exit=l,s}function as(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ls(){return new Ee(this._exit||this._groups.map(ui),this._parents)}function us(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 cs(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 c=n[l],u=o[l],h=c.length,v=a[l]=new Array(h),p,S=0;S<h;++S)(p=c[S]||u[S])&&(v[S]=p);for(;l<i;++l)a[l]=n[l];return new Ee(a,this._parents)}function ds(){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 fs(e){e||(e=hs);function t(h,v){return h&&v?e(h.__data__,v.__data__):!h-!v}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),c,u=0;u<a;++u)(c=s[u])&&(l[u]=c);l.sort(t)}return new Ee(i,this._parents).order()}function hs(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function gs(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function vs(){return Array.from(this)}function ps(){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 ms(){let e=0;for(const t of this)++e;return e}function ys(){return!this.node()}function _s(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 ws(e){return function(){this.removeAttribute(e)}}function bs(e){return function(){this.removeAttributeNS(e.space,e.local)}}function xs(e,t){return function(){this.setAttribute(e,t)}}function Ss(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Es(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Ns(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 Cs(e,t){var n=un(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?bs:ws:typeof t=="function"?n.local?Ns:Es:n.local?Ss:xs)(n,t))}function ci(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ms(e){return function(){this.style.removeProperty(e)}}function Is(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Ts(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function ks(e,t,n){return arguments.length>1?this.each((t==null?Ms:typeof t=="function"?Ts:Is)(e,t,n==null?"":n)):gt(this.node(),e)}function gt(e,t){return e.style.getPropertyValue(t)||ci(e).getComputedStyle(e,null).getPropertyValue(t)}function $s(e){return function(){delete this[e]}}function Ps(e,t){return function(){this[e]=t}}function Ds(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function As(e,t){return arguments.length>1?this.each((t==null?$s:typeof t=="function"?Ds:Ps)(e,t)):this.node()[e]}function di(e){return e.trim().split(/^|\s+/)}function qn(e){return e.classList||new fi(e)}function fi(e){this._node=e,this._names=di(e.getAttribute("class")||"")}fi.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 hi(e,t){for(var n=qn(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function gi(e,t){for(var n=qn(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function Os(e){return function(){hi(this,e)}}function zs(e){return function(){gi(this,e)}}function Bs(e,t){return function(){(t.apply(this,arguments)?hi:gi)(this,e)}}function Rs(e,t){var n=di(e+"");if(arguments.length<2){for(var o=qn(this.node()),i=-1,r=n.length;++i<r;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Bs:t?Os:zs)(n,t))}function Vs(){this.textContent=""}function Hs(e){return function(){this.textContent=e}}function Ls(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function Fs(e){return arguments.length?this.each(e==null?Vs:(typeof e=="function"?Ls:Hs)(e)):this.node().textContent}function Ys(){this.innerHTML=""}function Gs(e){return function(){this.innerHTML=e}}function Xs(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function Us(e){return arguments.length?this.each(e==null?Ys:(typeof e=="function"?Xs:Gs)(e)):this.node().innerHTML}function Zs(){this.nextSibling&&this.parentNode.appendChild(this)}function Ks(){return this.each(Zs)}function Ws(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function qs(){return this.each(Ws)}function Js(e){var t=typeof e=="function"?e:ri(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Qs(){return null}function js(e,t){var n=typeof e=="function"?e:ri(e),o=t==null?Qs:typeof t=="function"?t:Wn(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function ea(){var e=this.parentNode;e&&e.removeChild(this)}function ta(){return this.each(ea)}function na(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function oa(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ia(e){return this.select(e?oa:na)}function ra(e){return arguments.length?this.property("__data__",e):this.node().__data__}function sa(e){return function(t){e.call(this,t,this.__data__)}}function aa(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 la(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 ua(e,t,n){return function(){var o=this.__on,i,r=sa(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 ca(e,t,n){var o=aa(e+""),i,r=o.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,u;l<c;++l)for(i=0,u=a[l];i<r;++i)if((s=o[i]).type===u.type&&s.name===u.name)return u.value}return}for(a=t?ua:la,i=0;i<r;++i)this.each(a(o[i],t,n));return this}function vi(e,t,n){var o=ci(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 da(e,t){return function(){return vi(this,e,t)}}function fa(e,t){return function(){return vi(this,e,t.apply(this,arguments))}}function ha(e,t){return this.each((typeof t=="function"?fa:da)(e,t))}function*ga(){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 pi=[null];function Ee(e,t){this._groups=e,this._parents=t}function Dt(){return new Ee([[document.documentElement]],pi)}function va(){return this}Ee.prototype=Dt.prototype={constructor:Ee,select:Lr,selectAll:Xr,selectChild:Wr,selectChildren:jr,filter:es,data:ss,enter:ts,exit:ls,join:us,merge:cs,selection:va,order:ds,sort:fs,call:gs,nodes:vs,node:ps,size:ms,empty:ys,each:_s,attr:Cs,style:ks,property:As,classed:Rs,text:Fs,html:Us,raise:Ks,lower:qs,append:Js,insert:js,remove:ta,clone:ia,datum:ra,on:ca,dispatch:ha,[Symbol.iterator]:ga};function Ne(e){return typeof e=="string"?new Ee([[document.querySelector(e)]],[document.documentElement]):new Ee([[e]],pi)}function pa(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ie(e,t){if(e=pa(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 ma={passive:!1},Ct={capture:!0,passive:!1};function wn(e){e.stopImmediatePropagation()}function ct(e){e.preventDefault(),e.stopImmediatePropagation()}function mi(e){var t=e.document.documentElement,n=Ne(e).on("dragstart.drag",ct,Ct);"onselectstart"in t?n.on("selectstart.drag",ct,Ct):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function yi(e,t){var n=e.document.documentElement,o=Ne(e).on("dragstart.drag",null);t&&(o.on("click.drag",ct,Ct),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 zt=e=>()=>e;function An(e,{sourceEvent:t,subject:n,target:o,identifier:i,active:r,x:s,y:a,dx:l,dy:c,dispatch:u}){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:c,enumerable:!0,configurable:!0},_:{value:u}})}An.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function ya(e){return!e.ctrlKey&&!e.button}function _a(){return this.parentNode}function wa(e,t){return t==null?{x:e.x,y:e.y}:t}function ba(){return navigator.maxTouchPoints||"ontouchstart"in this}function xa(){var e=ya,t=_a,n=wa,o=ba,i={},r=ln("start","drag","end"),s=0,a,l,c,u,h=0;function v(C){C.on("mousedown.drag",p).filter(o).on("touchstart.drag",w).on("touchmove.drag",x,ma).on("touchend.drag touchcancel.drag",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(C,z){if(!(u||!e.call(this,C,z))){var F=I(this,t.call(this,C,z),C,z,"mouse");!F||(Ne(C.view).on("mousemove.drag",S,Ct).on("mouseup.drag",y,Ct),mi(C.view),wn(C),c=!1,a=C.clientX,l=C.clientY,F("start",C))}}function S(C){if(ct(C),!c){var z=C.clientX-a,F=C.clientY-l;c=z*z+F*F>h}i.mouse("drag",C)}function y(C){Ne(C.view).on("mousemove.drag mouseup.drag",null),yi(C.view,c),ct(C),i.mouse("end",C)}function w(C,z){if(!!e.call(this,C,z)){var F=C.changedTouches,R=t.call(this,C,z),q=F.length,G,$;for(G=0;G<q;++G)($=I(this,R,C,z,F[G].identifier,F[G]))&&(wn(C),$("start",C,F[G]))}}function x(C){var z=C.changedTouches,F=z.length,R,q;for(R=0;R<F;++R)(q=i[z[R].identifier])&&(ct(C),q("drag",C,z[R]))}function g(C){var z=C.changedTouches,F=z.length,R,q;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),R=0;R<F;++R)(q=i[z[R].identifier])&&(wn(C),q("end",C,z[R]))}function I(C,z,F,R,q,G){var $=r.copy(),m=Ie(G||F,z),J,ne,_;if((_=n.call(C,new An("beforestart",{sourceEvent:F,target:v,identifier:q,active:s,x:m[0],y:m[1],dx:0,dy:0,dispatch:$}),R))!=null)return J=_.x-m[0]||0,ne=_.y-m[1]||0,function M(E,k,P){var D=m,V;switch(E){case"start":i[q]=M,V=s++;break;case"end":delete i[q],--s;case"drag":m=Ie(P||k,z),V=s;break}$.call(E,C,new An(E,{sourceEvent:k,subject:_,target:v,identifier:q,active:V,x:m[0]+J,y:m[1]+ne,dx:m[0]-D[0],dy:m[1]-D[1],dispatch:$}),R)}}return v.filter=function(C){return arguments.length?(e=typeof C=="function"?C:zt(!!C),v):e},v.container=function(C){return arguments.length?(t=typeof C=="function"?C:zt(C),v):t},v.subject=function(C){return arguments.length?(n=typeof C=="function"?C:zt(C),v):n},v.touchable=function(C){return arguments.length?(o=typeof C=="function"?C:zt(!!C),v):o},v.on=function(){var C=r.on.apply(r,arguments);return C===r?v:C},v.clickDistance=function(C){return arguments.length?(h=(C=+C)*C,v):Math.sqrt(h)},v}function Jn(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function _i(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function At(){}var Mt=.7,qt=1/Mt,dt="\\s*([+-]?\\d+)\\s*",It="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Te="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Sa=/^#([0-9a-f]{3,8})$/,Ea=new RegExp(`^rgb\\(${dt},${dt},${dt}\\)$`),Na=new RegExp(`^rgb\\(${Te},${Te},${Te}\\)$`),Ca=new RegExp(`^rgba\\(${dt},${dt},${dt},${It}\\)$`),Ma=new RegExp(`^rgba\\(${Te},${Te},${Te},${It}\\)$`),Ia=new RegExp(`^hsl\\(${It},${Te},${Te}\\)$`),Ta=new RegExp(`^hsla\\(${It},${Te},${Te},${It}\\)$`),co={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};Jn(At,Tt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:fo,formatHex:fo,formatHex8:ka,formatHsl:$a,formatRgb:ho,toString:ho});function fo(){return this.rgb().formatHex()}function ka(){return this.rgb().formatHex8()}function $a(){return wi(this).formatHsl()}function ho(){return this.rgb().formatRgb()}function Tt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Sa.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?go(t):n===3?new Se(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Bt(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Bt(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=Ea.exec(e))?new Se(t[1],t[2],t[3],1):(t=Na.exec(e))?new Se(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ca.exec(e))?Bt(t[1],t[2],t[3],t[4]):(t=Ma.exec(e))?Bt(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Ia.exec(e))?mo(t[1],t[2]/100,t[3]/100,1):(t=Ta.exec(e))?mo(t[1],t[2]/100,t[3]/100,t[4]):co.hasOwnProperty(e)?go(co[e]):e==="transparent"?new Se(NaN,NaN,NaN,0):null}function go(e){return new Se(e>>16&255,e>>8&255,e&255,1)}function Bt(e,t,n,o){return o<=0&&(e=t=n=NaN),new Se(e,t,n,o)}function Pa(e){return e instanceof At||(e=Tt(e)),e?(e=e.rgb(),new Se(e.r,e.g,e.b,e.opacity)):new Se}function On(e,t,n,o){return arguments.length===1?Pa(e):new Se(e,t,n,o==null?1:o)}function Se(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}Jn(Se,On,_i(At,{brighter(e){return e=e==null?qt:Math.pow(qt,e),new Se(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Mt:Math.pow(Mt,e),new Se(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Se(Qe(this.r),Qe(this.g),Qe(this.b),Jt(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:vo,formatHex:vo,formatHex8:Da,formatRgb:po,toString:po}));function vo(){return`#${Je(this.r)}${Je(this.g)}${Je(this.b)}`}function Da(){return`#${Je(this.r)}${Je(this.g)}${Je(this.b)}${Je((isNaN(this.opacity)?1:this.opacity)*255)}`}function po(){const e=Jt(this.opacity);return`${e===1?"rgb(":"rgba("}${Qe(this.r)}, ${Qe(this.g)}, ${Qe(this.b)}${e===1?")":`, ${e})`}`}function Jt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Qe(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Je(e){return e=Qe(e),(e<16?"0":"")+e.toString(16)}function mo(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ce(e,t,n,o)}function wi(e){if(e instanceof Ce)return new Ce(e.h,e.s,e.l,e.opacity);if(e instanceof At||(e=Tt(e)),!e)return new Ce;if(e instanceof Ce)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 Ce(s,a,l,e.opacity)}function Aa(e,t,n,o){return arguments.length===1?wi(e):new Ce(e,t,n,o==null?1:o)}function Ce(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Jn(Ce,Aa,_i(At,{brighter(e){return e=e==null?qt:Math.pow(qt,e),new Ce(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Mt:Math.pow(Mt,e),new Ce(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 Se(bn(e>=240?e-240:e+120,i,o),bn(e,i,o),bn(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new Ce(yo(this.h),Rt(this.s),Rt(this.l),Jt(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=Jt(this.opacity);return`${e===1?"hsl(":"hsla("}${yo(this.h)}, ${Rt(this.s)*100}%, ${Rt(this.l)*100}%${e===1?")":`, ${e})`}`}}));function yo(e){return e=(e||0)%360,e<0?e+360:e}function Rt(e){return Math.max(0,Math.min(1,e||0))}function bn(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 bi=e=>()=>e;function Oa(e,t){return function(n){return e+n*t}}function za(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 Ba(e){return(e=+e)==1?xi:function(t,n){return n-t?za(t,n,e):bi(isNaN(t)?n:t)}}function xi(e,t){var n=t-e;return n?Oa(e,n):bi(isNaN(e)?t:e)}const _o=function e(t){var n=Ba(t);function o(i,r){var s=n((i=On(i)).r,(r=On(r)).r),a=n(i.g,r.g),l=n(i.b,r.b),c=xi(i.opacity,r.opacity);return function(u){return i.r=s(u),i.g=a(u),i.b=l(u),i.opacity=c(u),i+""}}return o.gamma=e,o}(1);function Xe(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var zn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xn=new RegExp(zn.source,"g");function Ra(e){return function(){return e}}function Va(e){return function(t){return e(t)+""}}function Ha(e,t){var n=zn.lastIndex=xn.lastIndex=0,o,i,r,s=-1,a=[],l=[];for(e=e+"",t=t+"";(o=zn.exec(e))&&(i=xn.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:Xe(o,i)})),n=xn.lastIndex;return n<t.length&&(r=t.slice(n),a[s]?a[s]+=r:a[++s]=r),a.length<2?l[0]?Va(l[0].x):Ra(t):(t=l.length,function(c){for(var u=0,h;u<t;++u)a[(h=l[u]).i]=h.x(c);return a.join("")})}var wo=180/Math.PI,Bn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Si(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)*wo,skewX:Math.atan(l)*wo,scaleX:s,scaleY:a}}var Vt;function La(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Bn:Si(t.a,t.b,t.c,t.d,t.e,t.f)}function Fa(e){return e==null||(Vt||(Vt=document.createElementNS("http://www.w3.org/2000/svg","g")),Vt.setAttribute("transform",e),!(e=Vt.transform.baseVal.consolidate()))?Bn:(e=e.matrix,Si(e.a,e.b,e.c,e.d,e.e,e.f))}function Ei(e,t,n,o){function i(c){return c.length?c.pop()+" ":""}function r(c,u,h,v,p,S){if(c!==h||u!==v){var y=p.push("translate(",null,t,null,n);S.push({i:y-4,x:Xe(c,h)},{i:y-2,x:Xe(u,v)})}else(h||v)&&p.push("translate("+h+t+v+n)}function s(c,u,h,v){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),v.push({i:h.push(i(h)+"rotate(",null,o)-2,x:Xe(c,u)})):u&&h.push(i(h)+"rotate("+u+o)}function a(c,u,h,v){c!==u?v.push({i:h.push(i(h)+"skewX(",null,o)-2,x:Xe(c,u)}):u&&h.push(i(h)+"skewX("+u+o)}function l(c,u,h,v,p,S){if(c!==h||u!==v){var y=p.push(i(p)+"scale(",null,",",null,")");S.push({i:y-4,x:Xe(c,h)},{i:y-2,x:Xe(u,v)})}else(h!==1||v!==1)&&p.push(i(p)+"scale("+h+","+v+")")}return function(c,u){var h=[],v=[];return c=e(c),u=e(u),r(c.translateX,c.translateY,u.translateX,u.translateY,h,v),s(c.rotate,u.rotate,h,v),a(c.skewX,u.skewX,h,v),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,v),c=u=null,function(p){for(var S=-1,y=v.length,w;++S<y;)h[(w=v[S]).i]=w.x(p);return h.join("")}}}var Ya=Ei(La,"px, ","px)","deg)"),Ga=Ei(Fa,", ",")",")"),Xa=1e-12;function bo(e){return((e=Math.exp(e))+1/e)/2}function Ua(e){return((e=Math.exp(e))-1/e)/2}function Za(e){return((e=Math.exp(2*e))-1)/(e+1)}const Ka=function e(t,n,o){function i(r,s){var a=r[0],l=r[1],c=r[2],u=s[0],h=s[1],v=s[2],p=u-a,S=h-l,y=p*p+S*S,w,x;if(y<Xa)x=Math.log(v/c)/t,w=function(R){return[a+R*p,l+R*S,c*Math.exp(t*R*x)]};else{var g=Math.sqrt(y),I=(v*v-c*c+o*y)/(2*c*n*g),C=(v*v-c*c-o*y)/(2*v*n*g),z=Math.log(Math.sqrt(I*I+1)-I),F=Math.log(Math.sqrt(C*C+1)-C);x=(F-z)/t,w=function(R){var q=R*x,G=bo(z),$=c/(n*g)*(G*Za(t*q+z)-Ua(z));return[a+$*p,l+$*S,c*G/bo(t*q+z)]}}return w.duration=x*1e3*t/Math.SQRT2,w}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 vt=0,bt=0,_t=0,Ni=1e3,Qt,xt,jt=0,it=0,cn=0,kt=typeof performance=="object"&&performance.now?performance:Date,Ci=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Qn(){return it||(Ci(Wa),it=kt.now()+cn)}function Wa(){it=0}function en(){this._call=this._time=this._next=null}en.prototype=Mi.prototype={constructor:en,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Qn():+n)+(t==null?0:+t),!this._next&&xt!==this&&(xt?xt._next=this:Qt=this,xt=this),this._call=e,this._time=n,Rn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Rn())}};function Mi(e,t,n){var o=new en;return o.restart(e,t,n),o}function qa(){Qn(),++vt;for(var e=Qt,t;e;)(t=it-e._time)>=0&&e._call.call(void 0,t),e=e._next;--vt}function xo(){it=(jt=kt.now())+cn,vt=bt=0;try{qa()}finally{vt=0,Qa(),it=0}}function Ja(){var e=kt.now(),t=e-jt;t>Ni&&(cn-=t,jt=e)}function Qa(){for(var e,t=Qt,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:Qt=n);xt=e,Rn(o)}function Rn(e){if(!vt){bt&&(bt=clearTimeout(bt));var t=e-it;t>24?(e<1/0&&(bt=setTimeout(xo,e-kt.now()-cn)),_t&&(_t=clearInterval(_t))):(_t||(jt=kt.now(),_t=setInterval(Ja,Ni)),vt=1,Ci(xo))}}function So(e,t,n){var o=new en;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var ja=ln("start","end","cancel","interrupt"),el=[],Ii=0,Eo=1,Vn=2,Ut=3,No=4,Hn=5,Zt=6;function dn(e,t,n,o,i,r){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;tl(e,n,{name:t,index:o,group:i,on:ja,tween:el,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:Ii})}function jn(e,t){var n=Me(e,t);if(n.state>Ii)throw new Error("too late; already scheduled");return n}function Pe(e,t){var n=Me(e,t);if(n.state>Ut)throw new Error("too late; already running");return n}function Me(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function tl(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=Mi(r,0,n.time);function r(c){n.state=Eo,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var u,h,v,p;if(n.state!==Eo)return l();for(u in o)if(p=o[u],p.name===n.name){if(p.state===Ut)return So(s);p.state===No?(p.state=Zt,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete o[u]):+u<t&&(p.state=Zt,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete o[u])}if(So(function(){n.state===Ut&&(n.state=No,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=Vn,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Vn){for(n.state=Ut,i=new Array(v=n.tween.length),u=0,h=-1;u<v;++u)(p=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function a(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=Hn,1),h=-1,v=i.length;++h<v;)i[h].call(e,u);n.state===Hn&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Zt,n.timer.stop(),delete o[t];for(var c in o)return;delete e.__transition}}function Kt(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>Vn&&o.state<Hn,o.state=Zt,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[s]}r&&delete e.__transition}}function nl(e){return this.each(function(){Kt(this,e)})}function ol(e,t){var n,o;return function(){var i=Pe(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 il(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var r=Pe(this,e),s=r.tween;if(s!==o){i=(o=s).slice();for(var a={name:t,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=a;break}l===c&&i.push(a)}r.tween=i}}function rl(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=Me(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?ol:il)(n,e,t))}function eo(e,t,n){var o=e._id;return e.each(function(){var i=Pe(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Me(i,o).value[t]}}function Ti(e,t){var n;return(typeof t=="number"?Xe:t instanceof Tt?_o:(n=Tt(t))?(t=n,_o):Ha)(e,t)}function sl(e){return function(){this.removeAttribute(e)}}function al(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ll(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 ul(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 cl(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 dl(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 fl(e,t){var n=un(e),o=n==="transform"?Ga:Ti;return this.attrTween(e,typeof t=="function"?(n.local?dl:cl)(n,o,eo(this,"attr."+e,t)):t==null?(n.local?al:sl)(n):(n.local?ul:ll)(n,o,t))}function hl(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function gl(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function vl(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&gl(e,r)),n}return i._value=t,i}function pl(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&hl(e,r)),n}return i._value=t,i}function ml(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=un(e);return this.tween(n,(o.local?vl:pl)(o,t))}function yl(e,t){return function(){jn(this,e).delay=+t.apply(this,arguments)}}function _l(e,t){return t=+t,function(){jn(this,e).delay=t}}function wl(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?yl:_l)(t,e)):Me(this.node(),t).delay}function bl(e,t){return function(){Pe(this,e).duration=+t.apply(this,arguments)}}function xl(e,t){return t=+t,function(){Pe(this,e).duration=t}}function Sl(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?bl:xl)(t,e)):Me(this.node(),t).duration}function El(e,t){if(typeof t!="function")throw new Error;return function(){Pe(this,e).ease=t}}function Nl(e){var t=this._id;return arguments.length?this.each(El(t,e)):Me(this.node(),t).ease}function Cl(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Pe(this,e).ease=n}}function Ml(e){if(typeof e!="function")throw new Error;return this.each(Cl(this._id,e))}function Il(e){typeof e!="function"&&(e=ai(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,c=0;c<s;++c)(l=r[c])&&e.call(l,l.__data__,c,r)&&a.push(l);return new He(o,this._parents,this._name,this._id)}function Tl(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],c=n[a],u=l.length,h=s[a]=new Array(u),v,p=0;p<u;++p)(v=l[p]||c[p])&&(h[p]=v);for(;a<o;++a)s[a]=t[a];return new He(s,this._parents,this._name,this._id)}function kl(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 $l(e,t,n){var o,i,r=kl(t)?jn:Pe;return function(){var s=r(this,e),a=s.on;a!==o&&(i=(o=a).copy()).on(t,n),s.on=i}}function Pl(e,t){var n=this._id;return arguments.length<2?Me(this.node(),n).on.on(e):this.each($l(n,e,t))}function Dl(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Al(){return this.on("end.remove",Dl(this._id))}function Ol(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Wn(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,c=r[s]=new Array(l),u,h,v=0;v<l;++v)(u=a[v])&&(h=e.call(u,u.__data__,v,a))&&("__data__"in u&&(h.__data__=u.__data__),c[v]=h,dn(c[v],t,n,v,c,Me(u,n)));return new He(r,this._parents,t,n)}function zl(e){var t=this._name,n=this._id;typeof e!="function"&&(e=si(e));for(var o=this._groups,i=o.length,r=[],s=[],a=0;a<i;++a)for(var l=o[a],c=l.length,u,h=0;h<c;++h)if(u=l[h]){for(var v=e.call(u,u.__data__,h,l),p,S=Me(u,n),y=0,w=v.length;y<w;++y)(p=v[y])&&dn(p,t,n,y,v,S);r.push(v),s.push(u)}return new He(r,s,t,n)}var Bl=Dt.prototype.constructor;function Rl(){return new Bl(this._groups,this._parents)}function Vl(e,t){var n,o,i;return function(){var r=gt(this,e),s=(this.style.removeProperty(e),gt(this,e));return r===s?null:r===n&&s===o?i:i=t(n=r,o=s)}}function ki(e){return function(){this.style.removeProperty(e)}}function Hl(e,t,n){var o,i=n+"",r;return function(){var s=gt(this,e);return s===i?null:s===o?r:r=t(o=s,n)}}function Ll(e,t,n){var o,i,r;return function(){var s=gt(this,e),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(e),gt(this,e))),s===l?null:s===o&&l===i?r:(i=l,r=t(o=s,a))}}function Fl(e,t){var n,o,i,r="style."+t,s="end."+r,a;return function(){var l=Pe(this,e),c=l.on,u=l.value[r]==null?a||(a=ki(t)):void 0;(c!==n||i!==u)&&(o=(n=c).copy()).on(s,i=u),l.on=o}}function Yl(e,t,n){var o=(e+="")=="transform"?Ya:Ti;return t==null?this.styleTween(e,Vl(e,o)).on("end.style."+e,ki(e)):typeof t=="function"?this.styleTween(e,Ll(e,o,eo(this,"style."+e,t))).each(Fl(this._id,e)):this.styleTween(e,Hl(e,o,t),n).on("end.style."+e,null)}function Gl(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function Xl(e,t,n){var o,i;function r(){var s=t.apply(this,arguments);return s!==i&&(o=(i=s)&&Gl(e,s,n)),o}return r._value=t,r}function Ul(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,Xl(e,t,n==null?"":n))}function Zl(e){return function(){this.textContent=e}}function Kl(e){return function(){var t=e(this);this.textContent=t==null?"":t}}function Wl(e){return this.tween("text",typeof e=="function"?Kl(eo(this,"text",e)):Zl(e==null?"":e+""))}function ql(e){return function(t){this.textContent=e.call(this,t)}}function Jl(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&ql(i)),t}return o._value=e,o}function Ql(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,Jl(e))}function jl(){for(var e=this._name,t=this._id,n=$i(),o=this._groups,i=o.length,r=0;r<i;++r)for(var s=o[r],a=s.length,l,c=0;c<a;++c)if(l=s[c]){var u=Me(l,t);dn(l,e,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new He(o,this._parents,e,n)}function eu(){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 c=Pe(this,o),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),c.on=t}),i===0&&r()})}var tu=0;function He(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function $i(){return++tu}var Ae=Dt.prototype;He.prototype={constructor:He,select:Ol,selectAll:zl,selectChild:Ae.selectChild,selectChildren:Ae.selectChildren,filter:Il,merge:Tl,selection:Rl,transition:jl,call:Ae.call,nodes:Ae.nodes,node:Ae.node,size:Ae.size,empty:Ae.empty,each:Ae.each,on:Pl,attr:fl,attrTween:ml,style:Yl,styleTween:Ul,text:Wl,textTween:Ql,remove:Al,tween:rl,delay:wl,duration:Sl,ease:Nl,easeVarying:Ml,end:eu,[Symbol.iterator]:Ae[Symbol.iterator]};function nu(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var ou={time:null,delay:0,duration:250,ease:nu};function iu(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 ru(e){var t,n;e instanceof He?(t=e._id,e=e._name):(t=$i(),(n=ou).time=Qn(),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,c=0;c<a;++c)(l=s[c])&&dn(l,e,t,c,s,n||iu(l,t));return new He(o,this._parents,e,t)}Dt.prototype.interrupt=nl;Dt.prototype.transition=ru;const Ht=e=>()=>e;function su(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 Be(e,t,n){this.k=e,this.x=t,this.y=n}Be.prototype={constructor:Be,scale:function(e){return e===1?this:new Be(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Be(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 pt=new Be(1,0,0);Be.prototype;function Sn(e){e.stopImmediatePropagation()}function wt(e){e.preventDefault(),e.stopImmediatePropagation()}function au(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function lu(){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 Co(){return this.__zoom||pt}function uu(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function cu(){return navigator.maxTouchPoints||"ontouchstart"in this}function du(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 fu(){var e=au,t=lu,n=du,o=uu,i=cu,r=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,l=Ka,c=ln("start","zoom","end"),u,h,v,p=500,S=150,y=0,w=10;function x(_){_.property("__zoom",Co).on("wheel.zoom",q,{passive:!1}).on("mousedown.zoom",G).on("dblclick.zoom",$).filter(i).on("touchstart.zoom",m).on("touchmove.zoom",J).on("touchend.zoom touchcancel.zoom",ne).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}x.transform=function(_,M,E,k){var P=_.selection?_.selection():_;P.property("__zoom",Co),_!==P?z(_,M,E,k):P.interrupt().each(function(){F(this,arguments).event(k).start().zoom(null,typeof M=="function"?M.apply(this,arguments):M).end()})},x.scaleBy=function(_,M,E,k){x.scaleTo(_,function(){var P=this.__zoom.k,D=typeof M=="function"?M.apply(this,arguments):M;return P*D},E,k)},x.scaleTo=function(_,M,E,k){x.transform(_,function(){var P=t.apply(this,arguments),D=this.__zoom,V=E==null?C(P):typeof E=="function"?E.apply(this,arguments):E,B=D.invert(V),Q=typeof M=="function"?M.apply(this,arguments):M;return n(I(g(D,Q),V,B),P,s)},E,k)},x.translateBy=function(_,M,E,k){x.transform(_,function(){return n(this.__zoom.translate(typeof M=="function"?M.apply(this,arguments):M,typeof E=="function"?E.apply(this,arguments):E),t.apply(this,arguments),s)},null,k)},x.translateTo=function(_,M,E,k,P){x.transform(_,function(){var D=t.apply(this,arguments),V=this.__zoom,B=k==null?C(D):typeof k=="function"?k.apply(this,arguments):k;return n(pt.translate(B[0],B[1]).scale(V.k).translate(typeof M=="function"?-M.apply(this,arguments):-M,typeof E=="function"?-E.apply(this,arguments):-E),D,s)},k,P)};function g(_,M){return M=Math.max(r[0],Math.min(r[1],M)),M===_.k?_:new Be(M,_.x,_.y)}function I(_,M,E){var k=M[0]-E[0]*_.k,P=M[1]-E[1]*_.k;return k===_.x&&P===_.y?_:new Be(_.k,k,P)}function C(_){return[(+_[0][0]+ +_[1][0])/2,(+_[0][1]+ +_[1][1])/2]}function z(_,M,E,k){_.on("start.zoom",function(){F(this,arguments).event(k).start()}).on("interrupt.zoom end.zoom",function(){F(this,arguments).event(k).end()}).tween("zoom",function(){var P=this,D=arguments,V=F(P,D).event(k),B=t.apply(P,D),Q=E==null?C(B):typeof E=="function"?E.apply(P,D):E,L=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),O=P.__zoom,U=typeof M=="function"?M.apply(P,D):M,ue=l(O.invert(Q).concat(L/O.k),U.invert(Q).concat(L/U.k));return function(se){if(se===1)se=U;else{var ce=ue(se),te=L/ce[2];se=new Be(te,Q[0]-ce[0]*te,Q[1]-ce[1]*te)}V.zoom(null,se)}})}function F(_,M,E){return!E&&_.__zooming||new R(_,M)}function R(_,M){this.that=_,this.args=M,this.active=0,this.sourceEvent=null,this.extent=t.apply(_,M),this.taps=0}R.prototype={event:function(_){return _&&(this.sourceEvent=_),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(_,M){return this.mouse&&_!=="mouse"&&(this.mouse[1]=M.invert(this.mouse[0])),this.touch0&&_!=="touch"&&(this.touch0[1]=M.invert(this.touch0[0])),this.touch1&&_!=="touch"&&(this.touch1[1]=M.invert(this.touch1[0])),this.that.__zoom=M,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(_){var M=Ne(this.that).datum();c.call(_,this.that,new su(_,{sourceEvent:this.sourceEvent,target:x,type:_,transform:this.that.__zoom,dispatch:c}),M)}};function q(_,...M){if(!e.apply(this,arguments))return;var E=F(this,M).event(_),k=this.__zoom,P=Math.max(r[0],Math.min(r[1],k.k*Math.pow(2,o.apply(this,arguments)))),D=Ie(_);if(E.wheel)(E.mouse[0][0]!==D[0]||E.mouse[0][1]!==D[1])&&(E.mouse[1]=k.invert(E.mouse[0]=D)),clearTimeout(E.wheel);else{if(k.k===P)return;E.mouse=[D,k.invert(D)],Kt(this),E.start()}wt(_),E.wheel=setTimeout(V,S),E.zoom("mouse",n(I(g(k,P),E.mouse[0],E.mouse[1]),E.extent,s));function V(){E.wheel=null,E.end()}}function G(_,...M){if(v||!e.apply(this,arguments))return;var E=_.currentTarget,k=F(this,M,!0).event(_),P=Ne(_.view).on("mousemove.zoom",Q,!0).on("mouseup.zoom",L,!0),D=Ie(_,E),V=_.clientX,B=_.clientY;mi(_.view),Sn(_),k.mouse=[D,this.__zoom.invert(D)],Kt(this),k.start();function Q(O){if(wt(O),!k.moved){var U=O.clientX-V,ue=O.clientY-B;k.moved=U*U+ue*ue>y}k.event(O).zoom("mouse",n(I(k.that.__zoom,k.mouse[0]=Ie(O,E),k.mouse[1]),k.extent,s))}function L(O){P.on("mousemove.zoom mouseup.zoom",null),yi(O.view,k.moved),wt(O),k.event(O).end()}}function $(_,...M){if(!!e.apply(this,arguments)){var E=this.__zoom,k=Ie(_.changedTouches?_.changedTouches[0]:_,this),P=E.invert(k),D=E.k*(_.shiftKey?.5:2),V=n(I(g(E,D),k,P),t.apply(this,M),s);wt(_),a>0?Ne(this).transition().duration(a).call(z,V,k,_):Ne(this).call(x.transform,V,k,_)}}function m(_,...M){if(!!e.apply(this,arguments)){var E=_.touches,k=E.length,P=F(this,M,_.changedTouches.length===k).event(_),D,V,B,Q;for(Sn(_),V=0;V<k;++V)B=E[V],Q=Ie(B,this),Q=[Q,this.__zoom.invert(Q),B.identifier],P.touch0?!P.touch1&&P.touch0[2]!==Q[2]&&(P.touch1=Q,P.taps=0):(P.touch0=Q,D=!0,P.taps=1+!!u);u&&(u=clearTimeout(u)),D&&(P.taps<2&&(h=Q[0],u=setTimeout(function(){u=null},p)),Kt(this),P.start())}}function J(_,...M){if(!!this.__zooming){var E=F(this,M).event(_),k=_.changedTouches,P=k.length,D,V,B,Q;for(wt(_),D=0;D<P;++D)V=k[D],B=Ie(V,this),E.touch0&&E.touch0[2]===V.identifier?E.touch0[0]=B:E.touch1&&E.touch1[2]===V.identifier&&(E.touch1[0]=B);if(V=E.that.__zoom,E.touch1){var L=E.touch0[0],O=E.touch0[1],U=E.touch1[0],ue=E.touch1[1],se=(se=U[0]-L[0])*se+(se=U[1]-L[1])*se,ce=(ce=ue[0]-O[0])*ce+(ce=ue[1]-O[1])*ce;V=g(V,Math.sqrt(se/ce)),B=[(L[0]+U[0])/2,(L[1]+U[1])/2],Q=[(O[0]+ue[0])/2,(O[1]+ue[1])/2]}else if(E.touch0)B=E.touch0[0],Q=E.touch0[1];else return;E.zoom("touch",n(I(V,B,Q),E.extent,s))}}function ne(_,...M){if(!!this.__zooming){var E=F(this,M).event(_),k=_.changedTouches,P=k.length,D,V;for(Sn(_),v&&clearTimeout(v),v=setTimeout(function(){v=null},p),D=0;D<P;++D)V=k[D],E.touch0&&E.touch0[2]===V.identifier?delete E.touch0:E.touch1&&E.touch1[2]===V.identifier&&delete E.touch1;if(E.touch1&&!E.touch0&&(E.touch0=E.touch1,delete E.touch1),E.touch0)E.touch0[1]=this.__zoom.invert(E.touch0[0]);else if(E.end(),E.taps===2&&(V=Ie(V,this),Math.hypot(h[0]-V[0],h[1]-V[1])<w)){var B=Ne(this).on("dblclick.zoom");B&&B.apply(this,arguments)}}}return x.wheelDelta=function(_){return arguments.length?(o=typeof _=="function"?_:Ht(+_),x):o},x.filter=function(_){return arguments.length?(e=typeof _=="function"?_:Ht(!!_),x):e},x.touchable=function(_){return arguments.length?(i=typeof _=="function"?_:Ht(!!_),x):i},x.extent=function(_){return arguments.length?(t=typeof _=="function"?_:Ht([[+_[0][0],+_[0][1]],[+_[1][0],+_[1][1]]]),x):t},x.scaleExtent=function(_){return arguments.length?(r[0]=+_[0],r[1]=+_[1],x):[r[0],r[1]]},x.translateExtent=function(_){return arguments.length?(s[0][0]=+_[0][0],s[1][0]=+_[1][0],s[0][1]=+_[0][1],s[1][1]=+_[1][1],x):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},x.constrain=function(_){return arguments.length?(n=_,x):n},x.duration=function(_){return arguments.length?(a=+_,x):a},x.interpolate=function(_){return arguments.length?(l=_,x):l},x.on=function(){var _=c.on.apply(c,arguments);return _===c?x:_},x.clickDistance=function(_){return arguments.length?(y=(_=+_)*_,x):Math.sqrt(y)},x.tapDistance=function(_){return arguments.length?(w=+_,x):w},x}var K=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(K||{}),to=(e=>(e.Partial="partial",e.Full="full",e))(to||{}),We=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(We||{}),rt=(e=>(e.Strict="strict",e.Loose="loose",e))(rt||{}),Ln=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(Ln||{}),Et=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(Et||{}),hu=(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))(hu||{});function Fn(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==null?void 0:o.hasAttribute)=="function"?o.hasAttribute("contenteditable"):!1,r=typeof(o==null?void 0:o.closest)=="function"?o.closest(".nokey"):null;return["INPUT","SELECT","TEXTAREA"].includes(o==null?void 0:o.nodeName)||i||!!r}function gu(e){return e.ctrlKey||e.metaKey||e.shiftKey}function Mo(e,t,n,o){const i=t.split("+").map(r=>r.trim().toLowerCase());return i.length===1?e.toLowerCase()===t.toLowerCase():(o?n.delete(e.toLowerCase()):n.add(e.toLowerCase()),i.every((r,s)=>n.has(r)&&Array.from(n.values())[s]===i[s]))}function vu(e,t){return n=>{if(!n.code&&!n.key)return!1;const o=pu(n.code,e);return Array.isArray(e)?e.some(i=>Mo(n[o],i,t,n.type==="keyup")):Mo(n[o],e,t,n.type==="keyup")}}function pu(e,t){return typeof t=="string"?e===t?"code":"key":t.includes(e)?"code":"key"}function Nt(e,t){const n=_e(()=>{var u;return(u=de(t==null?void 0:t.actInsideInputWithModifier))!=null?u:!1}),o=_e(()=>{var u;return(u=de(t==null?void 0:t.target))!=null?u:window}),i=ve(de(e)===!0);let r=!1;const s=new Set;let a=c(de(e));he(()=>de(e),(u,h)=>{typeof h=="boolean"&&typeof u!="boolean"&&l(),a=c(u)},{immediate:!0}),Le(()=>{ii(window,["blur","contextmenu"],l)}),ao((...u)=>a(...u),u=>{r=gu(u),!((!r||r&&!n.value)&&Fn(u))&&(u.preventDefault(),i.value=!0)},{eventName:"keydown",target:o}),ao((...u)=>a(...u),u=>{if(i.value){if((!r||r&&!n.value)&&Fn(u))return;l()}},{eventName:"keyup",target:o});function l(){r=!1,s.clear(),i.value=!1}function c(u){return u===null?(l(),()=>!1):typeof u=="boolean"?(l(),i.value=u,()=>!1):Array.isArray(u)||typeof u=="string"?vu(u,s):u}return i}const Pi="vue-flow__node-desc",Di="vue-flow__edge-desc",mu="vue-flow__aria-live",Ai=["Enter"," ","Escape"],ft={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function Yn(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function Gn(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 fn(e){return{width:e.offsetWidth,height:e.offsetHeight}}function st(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function Oi(e,t){return{x:st(e.x,t[0][0],t[1][0]),y:st(e.y,t[0][1],t[1][1])}}function Io(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function Ke(e){return e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e}function je(e){return e&&typeof e=="object"&&"id"in e&&"position"in e&&!Ke(e)}function St(e){return je(e)&&"computedPosition"in e}function Lt(e){return!Number.isNaN(e)&&Number.isFinite(e)}function yu(e){return Lt(e.width)&&Lt(e.height)&&Lt(e.x)&&Lt(e.y)}function _u(e,t,n){var i;const o={id:e.id.toString(),type:(i=e.type)!=null?i:"default",dimensions:ut({width:0,height:0}),computedPosition:ut({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:we(e.data)?e.data:{},events:ut(we(e.events)?e.events:{})};return Object.assign(t!=null?t:o,e,{id:e.id.toString(),parentNode:n})}function zi(e,t,n){var s,a,l,c,u,h,v;var o,i;const r={id:e.id.toString(),type:(a=(s=e.type)!=null?s:t==null?void 0:t.type)!=null?a:"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:(l=e.updatable)!=null?l:n==null?void 0:n.updatable,selectable:(c=e.selectable)!=null?c:n==null?void 0:n.selectable,focusable:(u=e.focusable)!=null?u:n==null?void 0:n.focusable,data:we(e.data)?e.data:{},events:ut(we(e.events)?e.events:{}),label:(h=e.label)!=null?h:"",interactionWidth:(v=e.interactionWidth)!=null?v:n==null?void 0:n.interactionWidth,...n!=null?n:{}};return Object.assign(t!=null?t:r,e,{id:e.id.toString()})}function Bi(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 wu(...e){if(e.length===3){const[r,s,a]=e;return Bi(r,s,a,"target")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(r=>Ke(r)&&r.source===o).map(r=>n.find(s=>je(s)&&s.id===r.target))}function bu(...e){if(e.length===3){const[r,s,a]=e;return Bi(r,s,a,"source")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(r=>Ke(r)&&r.target===o).map(r=>n.find(s=>je(s)&&s.id===r.source))}function Ri({source:e,sourceHandle:t,target:n,targetHandle:o}){return`vueflow__edge-${e}${t!=null?t:""}-${n}${o!=null?o:""}`}function xu(e,t){return t.some(n=>Ke(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 Vi({x:e,y:t},{x:n,y:o,zoom:i}){return{x:e*i+n,y:t*i+o}}function tn({x:e,y:t},{x:n,y:o,zoom:i},r=!1,[s,a]=[1,1]){const l={x:(e-n)/i,y:(t-o)/i};return r?{x:s*Math.round(l.x/s),y:a*Math.round(l.y/a)}:l}function Hi(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 nn({x:e,y:t,width:n,height:o}){return{x:e,y:t,x2:e+n,y2:t+o}}function Li({x:e,y:t,x2:n,y2:o}){return{x:e,y:t,width:n-e,height:o-t}}function wd(e,t){return Li(Hi(nn(e),nn(t)))}function Fi(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=Hi(t,nn({...o.computedPosition,...o.dimensions}))}return Li(t)}function Yi(e,t,n={x:0,y:0,zoom:1},o=!1,i=!1){var a,l,c,u;const r={...tn(t,n),width:t.width/n.zoom,height:t.height/n.zoom},s=[];for(const h of e){const{dimensions:v,selectable:p=!0,hidden:S=!1}=h,y=(l=(a=v.width)!=null?a:h.width)!=null?l:null,w=(u=(c=v.height)!=null?c:h.height)!=null?u:null;if(i&&!p||S)continue;const x=Gn(r,Yn(h)),g=y===null||w===null,I=o&&x>0,C=(y!=null?y:0)*(w!=null?w:0);(g||I||x>=C||h.dragging)&&s.push(h)}return s}function Gi(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 To(e,t,n,o,i,r=.1,s={x:0,y:0}){var y,w;const a=t/(e.width*(1+r)),l=n/(e.height*(1+r)),c=Math.min(a,l),u=st(c,o,i),h=e.x+e.width/2,v=e.y+e.height/2,p=t/2-h*u+((y=s.x)!=null?y:0),S=n/2-v*u+((w=s.y)!=null?w:0);return{x:p,y:S,zoom:u}}function Su(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function Xi(e,t){if(!e.parentNode)return!1;const n=t(e.parentNode);return n?n.selected?!0:Xi(n,t):!1}function $t(e,t){return typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`}function ko(e,t,n){return e<t?st(Math.abs(e-t),1,t)/t:e>n?-st(Math.abs(e-n),1,t)/t:0}function Ui(e,t,n=15,o=40){const i=ko(e.x,o,t.width-o)*n,r=ko(e.y,o,t.height-o)*n;return[i,r]}function En(e,t){var n,o;if(t){const i=e.position.x+e.dimensions.width-t.dimensions.width,r=e.position.y+e.dimensions.height-t.dimensions.height;if(i>0||r>0||e.position.x<0||e.position.y<0){let s={};if(typeof t.style=="function"?s={...t.style(t)}:t.style&&(s={...t.style}),s.width=(n=s.width)!=null?n:`${t.dimensions.width}px`,s.height=(o=s.height)!=null?o:`${t.dimensions.height}px`,i>0)if(typeof s.width=="string"){const a=Number(s.width.replace("px",""));s.width=`${a+i}px`}else s.width+=i;if(r>0)if(typeof s.height=="string"){const a=Number(s.height.replace("px",""));s.height=`${a+r}px`}else s.height+=r;if(e.position.x<0){const a=Math.abs(e.position.x);if(t.position.x=t.position.x-a,typeof s.width=="string"){const l=Number(s.width.replace("px",""));s.width=`${l+a}px`}else s.width+=a;e.position.x=0}if(e.position.y<0){const a=Math.abs(e.position.y);if(t.position.y=t.position.y-a,typeof s.height=="string"){const l=Number(s.height.replace("px",""));s.height=`${l+a}px`}else s.height+=a;e.position.y=0}t.dimensions.width=Number(s.width.toString().replace("px","")),t.dimensions.height=Number(s.height.toString().replace("px","")),typeof t.style=="function"?t.style=a=>{const l=t.style;return{...l(a),...s}}:t.style={...t.style,...s}}}}function $o(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(St(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&&St(l)&&En(s,l)}break;case"dimensions":if(St(s)&&(typeof a.dimensions<"u"&&(s.dimensions=a.dimensions),typeof a.updateStyle<"u"&&(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&&St(l)&&(!!l.dimensions.width&&!!l.dimensions.height?En(s,l):Re(()=>{En(s,l)}))}break}return t}function Ge(e,t){return{id:e,type:"select",selected:t}}function Po(e){return{item:e,type:"add"}}function Do(e){return{id:e,type:"remove"}}function Ao(e,t,n,o,i){return{id:e,source:t,target:n,sourceHandle:o||null,targetHandle:i||null,type:"remove"}}function Ue(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(Ge(r.id,s)))}return o}function H(e){const t=new Set;let n=!1;const o=()=>t.size>0;e&&(n=!0,t.add(e));const i=a=>{t.delete(a)};return{on:a=>{e&&n&&t.delete(e),t.add(a);const l=()=>{i(a),e&&n&&t.add(e)};return an(l),{off:l}},off:i,trigger:a=>Promise.all(Array.from(t).map(l=>l(a))),hasListeners:o,fns:t}}function Oo(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 Eu(e,t,n,o,i){var r,s;const a=[];for(const l of e)(l.selected||l.id===i)&&(!l.parentNode||!Xi(l,o))&&(l.draggable||t&&typeof l.draggable>"u")&&a.push(ut({id:l.id,position:l.position||{x:0,y:0},distance:{x:n.x-((r=l.computedPosition)==null?void 0:r.x)||0,y:n.y-((s=l.computedPosition)==null?void 0:s.y)||0},from:l.computedPosition,extent:l.extent,parentNode:l.parentNode,dimensions:l.dimensions,expandParent:l.expandParent}));return a}function Nn({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 Zi(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 Nu(e,t,n){const[o,i,r,s]=typeof e!="string"?Zi(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 Cu(e,t,n,o){let i=e.extent||n;if((i==="parent"||!Array.isArray(i)&&(i==null?void 0:i.range)==="parent")&&!e.expandParent)if(e.parentNode&&o&&e.dimensions.width&&e.dimensions.height){const r=Nu(i,e,o);r&&(i=r)}else t(new xe(be.NODE_EXTENT_INVALID,e.id)),i=n;else if(Array.isArray(i)){const r=(o==null?void 0:o.computedPosition.x)||0,s=(o==null?void 0: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==null?void 0:i.range)&&Array.isArray(i.range)){const[r,s,a,l]=Zi(i.padding),c=(o==null?void 0:o.computedPosition.x)||0,u=(o==null?void 0:o.computedPosition.y)||0;i=[[i.range[0][0]+c+l,i.range[0][1]+u+r],[i.range[1][0]+c-s,i.range[1][1]+u-a]]}return i==="parent"?[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]]:i}function Mu({width:e,height:t},n){return[n[0],[n[1][0]-(e||0),n[1][1]-(t||0)]]}function no(e,t,n,o,i){const r=Mu(e.dimensions,Cu(e,n,o,i)),s=Oi(t,r);return{position:{x:s.x-((i==null?void 0:i.computedPosition.x)||0),y:s.y-((i==null?void 0:i.computedPosition.y)||0)},computedPosition:s}}function on(e,t,n=K.Left){var l,c,u;const o=((l=t==null?void 0:t.x)!=null?l:0)+e.computedPosition.x,i=((c=t==null?void 0:t.y)!=null?c:0)+e.computedPosition.y,{width:r,height:s}=t!=null?t:ku(e);switch((u=t==null?void 0:t.position)!=null?u:n){case K.Top:return{x:o+r/2,y:i};case K.Right:return{x:o+r,y:i+s/2};case K.Bottom:return{x:o+r/2,y:i+s};case K.Left:return{x:o,y:i+s/2}}}function zo(e=[],t){return e.length&&(t?e.find(n=>n.id===t):e[0])||null}function Iu({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:o,targetWidth:i,targetHeight:r,width:s,height:a,viewport:l}){const c={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)};c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const u=nn({x:(0-l.x)/l.zoom,y:(0-l.y)/l.zoom,width:s/l.zoom,height:a/l.zoom}),h=Math.max(0,Math.min(u.x2,c.x2)-Math.max(u.x,c.x)),v=Math.max(0,Math.min(u.y2,c.y2)-Math.max(u.y,c.y));return Math.ceil(h*v)>0}function Tu(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 be=(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))(be||{});const Bo={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
2
2
  Node: ${e}`,NODE_NOT_FOUND:e=>`Node not found
3
3
  Node: ${e}`,NODE_MISSING_PARENT:(e,t)=>`Node is missing a parent
4
4
  Node: ${e}
@@ -19,4 +19,4 @@ Source: ${t}
19
19
  Target: ${n}`,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or target) and has been removed
20
20
  Edge: ${e}`,EDGE_NOT_FOUND:e=>`Edge not found
21
21
  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 xe extends Error{constructor(t,...n){var o;super((o=Bo[t])==null?void 0:o.call(Bo,...n)),this.name="VueFlowError",this.code=t,this.args=n}}function oo(e){return"clientX"in e}function Ze(e,t){var a,l;var n,o;const i=oo(e),r=i?e.clientX:(n=e.touches)==null?void 0:n[0].clientX,s=i?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:r-((a=t==null?void 0:t.left)!=null?a:0),y:s-((l=t==null?void 0:t.top)!=null?l:0)}}const rn=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function ku(e){var o,i,r,s;var t,n;return{width:(i=(o=(t=e.dimensions)==null?void 0:t.width)!=null?o:e.width)!=null?i:0,height:(s=(r=(n=e.dimensions)==null?void 0:n.height)!=null?r:e.height)!=null?s:0}}function Ki(){return{handleDomNode:null,isValid:!1,connection:{source:"",target:"",sourceHandle:null,targetHandle:null},endHandle:null}}function Cn(e){e==null||e.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function Ro(e,t,n,o){const i=[];for(const r of t[n]||[])if(`${e.id}-${r.id}-${n}`!==o){const{x:s,y:a}=on(e,r);i.push({id:r.id||null,type:n,nodeId:e.id,x:s,y:a})}return i}function $u(e,t,n,o,i,r){const{x:s,y:a}=Ze(e),c=t.elementsFromPoint(s,a).find(S=>S.classList.contains("vue-flow__handle"));if(c){const S=c.getAttribute("data-nodeid");if(S){const y=io(void 0,c),w=c.getAttribute("data-handleid"),x=r({nodeId:S,id:w,type:y});if(x){const g=i.find(I=>I.nodeId===S&&I.type===y&&I.id===w);return{handle:{id:w,type:y,nodeId:S,x:(g==null?void 0:g.x)||n.x,y:(g==null?void 0:g.y)||n.y},validHandleResult:x}}}}let u=[],h=Number.POSITIVE_INFINITY;for(const S of i){const y=Math.sqrt((S.x-n.x)**2+(S.y-n.y)**2);if(y<=o){const w=r(S);y<=h&&(y<h?u=[{handle:S,validHandleResult:w}]:y===h&&u.push({handle:S,validHandleResult:w}),h=y)}}if(!u.length)return{handle:null,validHandleResult:Ki()};if(u.length===1)return u[0];const v=u.some(({validHandleResult:S})=>S.isValid),p=u.some(({handle:S})=>S.type==="target");return u.find(({handle:S,validHandleResult:y})=>p?S.type==="target":v?y.isValid:!0)||u[0]}function Vo(e,t,n,o,i,r,s,a,l,c,u){const h=r==="target",v=a.querySelector(`.vue-flow__handle[data-id="${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`),{x:p,y:S}=Ze(e),y=a.elementFromPoint(p,S),w=y!=null&&y.classList.contains("vue-flow__handle")?y:v,x=Ki();if(w){x.handleDomNode=w;const g=io(void 0,w),I=w.getAttribute("data-nodeid"),C=w.getAttribute("data-handleid"),z=w.classList.contains("connectable"),F=w.classList.contains("connectableend"),R={source:h?I:o,sourceHandle:h?C:i,target:h?o:I,targetHandle:h?i:C};x.connection=R,z&&F&&(n===rt.Strict?h&&g==="source"||!h&&g==="target":I!==o||C!==i)&&(x.isValid=s(R,{edges:l,nodes:c,sourceNode:u(R.source),targetNode:u(R.target)}),x.endHandle={nodeId:I,handleId:C,type:g,position:x.isValid?w.getAttribute("data-handlepos"):null})}return x}function Pu({nodes:e,nodeId:t,handleId:n,handleType:o}){const i=[];for(let r=0;r<e.length;r++){const s=e[r],{handleBounds:a}=s;let l=[],c=[];a&&(l=Ro(s,a,"source",`${t}-${n}-${o}`),c=Ro(s,a,"target",`${t}-${n}-${o}`)),i.push(...l,...c)}return i}function io(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function Du(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}const Au=["production","prod"];function hn(e,...t){Wi()&&console.warn(`[Vue Flow]: ${e}`,...t)}function Wi(){return!Au.includes("production")}function Ho(e,t,n,o){const i=t.querySelectorAll(`.vue-flow__handle${e}`);return Array.from(i).map(s=>{const a=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),position:s.getAttribute("data-handlepos"),x:(a.left-n.left)/o,y:(a.top-n.top)/o,...fn(s)}})}function Xn(e,t,n,o,i,r=!1,s){i.value=!1,e.selected?(r||e.selected&&t)&&(o([e]),Re(()=>{s.blur()})):n([e])}function we(e){return typeof j(e)<"u"}function Ou(e,t,n,o){var r;if(!e||!e.source||!e.target)return n(new xe(be.EDGE_INVALID,(r=e==null?void 0:e.id)!=null?r:"[ID UNKNOWN]")),!1;let i;return Ke(e)?i=e:i={...e,id:Ri(e)},i=zi(i,void 0,o),xu(i,t)?!1:i}function zu(e,t,n,o,i,r){if(!t.source||!t.target)return r(new xe(be.EDGE_INVALID,e.id)),!1;const s=o(e.id);if(!s)return r(new xe(be.EDGE_NOT_FOUND,e.id)),!1;const{id:a,...l}=e,c={...l,id:i?Ri(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.splice(n.indexOf(s),1,c),c}function Lo(e,t,n){const o={},i=[];for(let r=0;r<e.length;++r){const s=e[r];if(!je(s)){n(new xe(be.NODE_INVALID,s==null?void 0:s.id)||`[ID UNKNOWN|INDEX ${r}]`);continue}const a=_u(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 xe(be.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 Fo(e,t){e.clear();for(const n of t){const{id:o,source:i,target:r,sourceHandle:s=null,targetHandle:a=null}=n,l=`${i}-source-${s}`,c=`${r}-target-${a}`,u=e.get(l)||new Map,h=e.get(c)||new Map,v=ut({edgeId:o,source:i,target:r,sourceHandle:s,targetHandle:a});e.set(l,u.set(`${r}-${a}`,v)),e.set(c,h.set(`${i}-${s}`,v))}}function Yo(e,t,n,o,i,r,s,a){const l=[];for(const c of e){const u=Ke(c)?c:Ou(c,a,i,r);if(!u)continue;const h=n(u.source),v=n(u.target);if(!h||!v){i(new xe(be.EDGE_SOURCE_TARGET_MISSING,u.id,u.source,u.target));continue}if(!h){i(new xe(be.EDGE_SOURCE_MISSING,u.id,u.source));continue}if(!v){i(new xe(be.EDGE_TARGET_MISSING,u.id,u.target));continue}if(t&&!t(u,{edges:a,nodes:s,sourceNode:h,targetNode:v})){i(new xe(be.EDGE_INVALID,u.id));continue}const p=o(u.id);l.push({...zi(u,p,r),sourceNode:h,targetNode:v})}return l}const Go=Symbol("vueFlow"),qi=Symbol("nodeId"),Ji=Symbol("nodeRef"),Bu=Symbol("edgeId"),Ru=Symbol("edgeRef"),gn=Symbol("slots");function Qi(e){const{vueFlowRef:t,snapToGrid:n,snapGrid:o,noDragClassName:i,nodes:r,nodeExtent:s,nodeDragThreshold:a,viewport:l,autoPanOnNodeDrag:c,autoPanSpeed:u,nodesDraggable:h,panBy:v,findNode:p,multiSelectionActive:S,nodesSelectionActive:y,selectNodesOnDrag:w,removeSelectedElements:x,addSelectedNodes:g,updateNodePositions:I,emits:C}=ye(),{onStart:z,onDrag:F,onStop:R,onClick:q,el:G,disabled:$,id:m,selectable:J,dragHandle:ne}=e,_=ve(!1);let M=[],E,k=null,P={x:void 0,y:void 0},D={x:0,y:0},V=null,B=!1,Q=0,L=!1;const O=Lu(),U=({x:X,y:W})=>{P={x:X,y:W};let f=!1;if(M=M.map(d=>{const N={x:X-d.distance.x,y:W-d.distance.y};n.value&&(N.x=o.value[0]*Math.round(N.x/o.value[0]),N.y=o.value[1]*Math.round(N.y/o.value[1]));const{computedPosition:b}=no(d,N,C.error,s.value,d.parentNode?p(d.parentNode):void 0);return f=f||d.position.x!==b.x||d.position.y!==b.y,d.position=b,d}),!!f&&(I(M,!0,!0),_.value=!0,V)){const[d,N]=Nn({id:m,dragItems:M,findNode:p});F({event:V,node:d,nodes:N})}},ue=()=>{var f,d;if(!k)return;const[X,W]=Ui(D,k,u.value);if(X!==0||W!==0){const N={x:((f=P.x)!=null?f:0)-X/l.value.zoom,y:((d=P.y)!=null?d:0)-W/l.value.zoom};v({x:X,y:W})&&U(N)}Q=requestAnimationFrame(ue)},se=(X,W)=>{B=!0;const f=p(m);!w.value&&!S.value&&f&&(f.selected||x()),f&&de(J)&&w.value&&Xn(f,S.value,g,x,y,!1,W);const d=O(X);if(P=d,M=Eu(r.value,h.value,d,p,m),M.length){const[N,b]=Nn({id:m,dragItems:M,findNode:p});z({event:X.sourceEvent,node:N,nodes:b})}},ce=(X,W)=>{var f;X.sourceEvent.type==="touchmove"&&X.sourceEvent.touches.length>1||(a.value===0&&se(X,W),P=O(X),k=((f=t.value)==null?void 0:f.getBoundingClientRect())||null,D=Ze(X.sourceEvent,k))},te=(X,W)=>{var d,N;const f=O(X);if(!L&&B&&c.value&&(L=!0,ue()),!B){const b=f.xSnapped-((d=P.x)!=null?d:0),A=f.ySnapped-((N=P.y)!=null?N:0);Math.sqrt(b*b+A*A)>a.value&&se(X,W)}(P.x!==f.xSnapped||P.y!==f.ySnapped)&&M.length&&B&&(V=X.sourceEvent,D=Ze(X.sourceEvent,k),U(f))},ie=X=>{var W,f;if(!B){const d=O(X),N=d.xSnapped-((W=P.x)!=null?W:0),b=d.ySnapped-((f=P.y)!=null?f:0),A=Math.sqrt(N*N+b*b);A!==0&&A<=a.value&&(q==null||q(X.sourceEvent));return}if(_.value=!1,L=!1,B=!1,cancelAnimationFrame(Q),M.length){I(M,!1,!1);const[d,N]=Nn({id:m,dragItems:M,findNode:p});R({event:X.sourceEvent,node:d,nodes:N})}};return he([()=>de($),G],([X,W],f,d)=>{if(W){const N=Ne(W);X||(E=xa().on("start",b=>ce(b,W)).on("drag",b=>te(b,W)).on("end",b=>ie(b)).filter(b=>{const A=b.target,Y=de(ne);return!b.button&&(!i.value||!Oo(A,`.${i.value}`,W)&&(!Y||Oo(A,Y,W)))}),N.call(E)),d(()=>{N.on(".drag",null),E&&(E.on("start",null),E.on("drag",null),E.on("end",null))})}}),_}function Vu(){return{doubleClick:H(),click:H(),mouseEnter:H(),mouseMove:H(),mouseLeave:H(),contextMenu:H(),updateStart:H(),update:H(),updateEnd:H()}}function Hu(e,t){const n=Vu();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 Lu(){const{viewport:e,snapGrid:t,snapToGrid:n}=ye();return({sourceEvent:o})=>{const i=o.touches?o.touches[0].clientX:o.clientX,r=o.touches?o.touches[0].clientY:o.clientY,s={x:(i-e.value.x)/e.value.zoom,y:(r-e.value.y)/e.value.zoom};return{xSnapped:n.value?t.value[0]*Math.round(s.x/t.value[0]):s.x,ySnapped:n.value?t.value[1]*Math.round(s.y/t.value[1]):s.y,...s}}}function Ft(){return!0}function ji({handleId:e,nodeId:t,type:n,isValidConnection:o,edgeUpdaterType:i,onEdgeUpdate:r,onEdgeUpdateEnd:s}){const{vueFlowRef:a,connectionMode:l,connectionRadius:c,connectOnClick:u,connectionClickStartHandle:h,nodesConnectable:v,autoPanOnConnect:p,autoPanSpeed:S,findNode:y,panBy:w,startConnection:x,updateConnection:g,endConnection:I,emits:C,viewport:z,edges:F,nodes:R,isValidConnection:q}=ye();let G=null,$=!1,m=null,J=null;function ne(M){var E;const k=de(n)==="target",P=oo(M),D=Io(M.target);if(P&&M.button===0||!P){let V=function(b){W=Ze(b,ie);const{handle:A,validHandleResult:Y}=$u(b,D,tn(W,z.value,!1,[1,1]),c.value,d,Z=>Vo(b,Z,l.value,de(t),de(e),k?"target":"source",L,D,F.value,R.value,y));if(O=A,f||(N(),f=!0),G=Y.connection,$=Y.isValid,m=Y.handleDomNode,!($&&O&&(J==null?void 0:J.endHandle)&&Y.endHandle&&J.endHandle.type===Y.endHandle.type&&J.endHandle.nodeId===Y.endHandle.nodeId&&J.endHandle.handleId===Y.endHandle.handleId)){if(g(O&&$?Vi({x:O.x,y:O.y},z.value):W,Y.endHandle,Du(!!O,$)),J=Y,!O&&!$&&!m)return Cn(X);G&&G.source!==G.target&&m&&(Cn(X),X=m,m.classList.add("connecting","vue-flow__handle-connecting"),m.classList.toggle("valid",$),m.classList.toggle("vue-flow__handle-valid",$))}},B=function(b){(O||m)&&G&&$&&(r?r(b,G):C.connect(G)),C.connectEnd(b),i&&(s==null||s(b)),Cn(X),cancelAnimationFrame(U),I(b),f=!1,$=!1,G=null,m=null,D.removeEventListener("mousemove",V),D.removeEventListener("mouseup",B),D.removeEventListener("touchmove",V),D.removeEventListener("touchend",B)};const Q=y(de(t));let L=de(o)||q.value||Ft;!L&&Q&&(L=(k?Q.isValidSourcePos:Q.isValidTargetPos)||Ft);let O,U=0;const{x:ue,y:se}=Ze(M),ce=D==null?void 0:D.elementFromPoint(ue,se),te=io(de(i),ce),ie=(E=a.value)==null?void 0:E.getBoundingClientRect();if(!ie||!te)return;let X,W=Ze(M,ie),f=!1;const d=Pu({nodes:R.value,nodeId:de(t),handleId:de(e),handleType:te}),N=()=>{if(!p.value)return;const[b,A]=Ui(W,ie,S.value);w({x:b,y:A}),U=requestAnimationFrame(N)};x({nodeId:de(t),handleId:de(e),type:te,position:(ce==null?void 0:ce.getAttribute("data-handlepos"))||K.Top},{x:ue-ie.left,y:se-ie.top}),C.connectStart({event:M,nodeId:de(t),handleId:de(e),handleType:te}),D.addEventListener("mousemove",V),D.addEventListener("mouseup",B),D.addEventListener("touchmove",V),D.addEventListener("touchend",B)}}function _(M){if(!u.value)return;const E=de(n)==="target";if(!h.value)C.clickConnectStart({event:M,nodeId:de(t),handleId:de(e)}),x({nodeId:de(t),type:de(n),handleId:de(e)},void 0,!0);else{let k=de(o)||q.value||Ft;const P=y(de(t));if(!k&&P&&(k=(E?P.isValidSourcePos:P.isValidTargetPos)||Ft),P&&(typeof P.connectable>"u"?v.value:P.connectable)===!1)return;const D=Io(M.target),{connection:V,isValid:B}=Vo(M,{nodeId:de(t),id:de(e),type:de(n)},l.value,h.value.nodeId,h.value.handleId||null,h.value.type,k,D,F.value,R.value,y),Q=V.source===V.target;B&&!Q&&C.connect(V),C.clickConnectEnd(M),I(M,!0)}}return{handlePointerDown:ne,handleClick:_}}function Fu(){return mt(qi,"")}function er(e){var a;const t=(a=e!=null?e:Fu())!=null?a:"",n=mt(Ji,ve(null)),{findNode:o,edges:i,emits:r}=ye(),s=o(t);return s||r.error(new xe(be.NODE_NOT_FOUND,t)),{id:t,nodeEl:n,node:s,parentNode:oe(()=>o(s.parentNode)),connectedEdges:oe(()=>Gi([s],i.value))}}function Yu(){return{doubleClick:H(),click:H(),mouseEnter:H(),mouseMove:H(),mouseLeave:H(),contextMenu:H(),dragStart:H(),drag:H(),dragStop:H()}}function Gu(e,t){const n=Yu();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 tr(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:n,findNode:o,snapGrid:i,snapToGrid:r,nodesDraggable:s,emits:a}=ye();return(l,c=!1)=>{const u=r.value?i.value[0]:5,h=r.value?i.value[1]:5,v=c?4:1,p=l.x*u*v,S=l.y*h*v,y=[];for(const w of e.value)if(w.draggable||s&&typeof w.draggable>"u"){const x={x:w.computedPosition.x+p,y:w.computedPosition.y+S},{computedPosition:g}=no(w,x,a.error,t.value,w.parentNode?o(w.parentNode):void 0);y.push({id:w.id,position:g,from:w.position,distance:{x:l.x,y:l.y},dimensions:w.dimensions})}n(y,!0,!1)}}const Mn=.1;function Ye(){return hn("Viewport not initialized yet."),Promise.resolve(!1)}const Xu={zoomIn:Ye,zoomOut:Ye,zoomTo:Ye,fitView:Ye,setCenter:Ye,fitBounds:Ye,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:Ye,setTransform:Ye,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function Uu(e){function t(o,i){return new Promise(r=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.scaleBy(In(e.d3Selection,i,()=>{r(!0)}),o):r(!1)})}function n(o,i,r,s){return new Promise(a=>{const{x:l,y:c}=Oi({x:-o,y:-i},e.translateExtent),u=pt.translate(-l,-c).scale(r);e.d3Selection&&e.d3Zoom?e.d3Zoom.transform(In(e.d3Selection,s,()=>{a(!0)}),u):a(!1)})}return oe(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:i=>t(1.2,i==null?void 0:i.duration),zoomOut:i=>t(1/1.2,i==null?void 0:i.duration),zoomTo:(i,r)=>new Promise(s=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.scaleTo(In(e.d3Selection,r==null?void 0:r.duration,()=>{s(!0)}),i):s(!1)}),setViewport:(i,r)=>n(i.x,i.y,i.zoom,r==null?void 0:r.duration),setTransform:(i,r)=>n(i.x,i.y,i.zoom,r==null?void 0:r.duration),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:Mn,includeHiddenNodes:!1,duration:0})=>{var v,p,S;var r,s;const a=[];for(const y of e.nodes)y.dimensions.width&&y.dimensions.height&&((i==null?void 0:i.includeHiddenNodes)||!y.hidden)&&(!((r=i.nodes)!=null&&r.length)||((s=i.nodes)==null?void 0:s.length)&&i.nodes.includes(y.id))&&a.push(y);if(!a.length)return Promise.resolve(!1);const l=Fi(a),{x:c,y:u,zoom:h}=To(l,e.dimensions.width,e.dimensions.height,(v=i.minZoom)!=null?v:e.minZoom,(p=i.maxZoom)!=null?p:e.maxZoom,(S=i.padding)!=null?S:Mn,i.offset);return n(c,u,h,i==null?void 0:i.duration)},setCenter:(i,r,s)=>{const a=typeof(s==null?void 0:s.zoom)<"u"?s.zoom:e.maxZoom,l=e.dimensions.width/2-i*a,c=e.dimensions.height/2-r*a;return n(l,c,a,s==null?void 0:s.duration)},fitBounds:(i,r={padding:Mn})=>{const{x:s,y:a,zoom:l}=To(i,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,r.padding);return n(s,a,l,r==null?void 0:r.duration)},project:i=>tn(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 tn(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 Vi(a,e.viewport)}return{x:0,y:0}}}:Xu)}function In(e,t=0,n){return e.transition().duration(t).on("end",n)}function Zu(e,t,n){const o=qo(!0);return o.run(()=>{const i=()=>{o.run(()=>{let y,w,x=!!(n.nodes.value.length||n.edges.value.length);y=lt([e.modelValue,()=>{var g,I;return(I=(g=e.modelValue)==null?void 0:g.value)==null?void 0:I.length}],([g])=>{g&&Array.isArray(g)&&(w==null||w.pause(),n.setElements(g),!w&&!x&&g.length?x=!0:w==null||w.resume())}),w=lt([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],([g,I])=>{var C;((C=e.modelValue)==null?void 0:C.value)&&Array.isArray(e.modelValue.value)&&(y==null||y.pause(),e.modelValue.value=[...g,...I],Re(()=>{y==null||y.resume()}))},{immediate:x}),Gt(()=>{y==null||y.stop(),w==null||w.stop()})})},r=()=>{o.run(()=>{let y,w,x=!!n.nodes.value.length;y=lt([e.nodes,()=>{var g,I;return(I=(g=e.nodes)==null?void 0:g.value)==null?void 0:I.length}],([g])=>{g&&Array.isArray(g)&&(w==null||w.pause(),n.setNodes(g),!w&&!x&&g.length?x=!0:w==null||w.resume())}),w=lt([n.nodes,()=>n.nodes.value.length],([g])=>{var I;((I=e.nodes)==null?void 0:I.value)&&Array.isArray(e.nodes.value)&&(y==null||y.pause(),e.nodes.value=[...g],Re(()=>{y==null||y.resume()}))},{immediate:x}),Gt(()=>{y==null||y.stop(),w==null||w.stop()})})},s=()=>{o.run(()=>{let y,w,x=!!n.edges.value.length;y=lt([e.edges,()=>{var g,I;return(I=(g=e.edges)==null?void 0:g.value)==null?void 0:I.length}],([g])=>{g&&Array.isArray(g)&&(w==null||w.pause(),n.setEdges(g),!w&&!x&&g.length?x=!0:w==null||w.resume())}),w=lt([n.edges,()=>n.edges.value.length],([g])=>{var I;((I=e.edges)==null?void 0:I.value)&&Array.isArray(e.edges.value)&&(y==null||y.pause(),e.edges.value=[...g],Re(()=>{y==null||y.resume()}))},{immediate:x}),Gt(()=>{y==null||y.stop(),w==null||w.stop()})})},a=()=>{o.run(()=>{he(()=>t.maxZoom,()=>{t.maxZoom&&we(t.maxZoom)&&n.setMaxZoom(t.maxZoom)},{immediate:!0})})},l=()=>{o.run(()=>{he(()=>t.minZoom,()=>{t.minZoom&&we(t.minZoom)&&n.setMinZoom(t.minZoom)},{immediate:!0})})},c=()=>{o.run(()=>{he(()=>t.translateExtent,()=>{t.translateExtent&&we(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)},{immediate:!0})})},u=()=>{o.run(()=>{he(()=>t.nodeExtent,()=>{t.nodeExtent&&we(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)},{immediate:!0})})},h=()=>{o.run(()=>{he(()=>t.applyDefault,()=>{we(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)},{immediate:!0})})},v=()=>{o.run(()=>{const y=async w=>{let x=w;typeof t.autoConnect=="function"&&(x=await t.autoConnect(w)),x!==!1&&n.addEdges([x])};he(()=>t.autoConnect,()=>{we(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)},{immediate:!0}),he(n.autoConnect,(w,x,g)=>{w?n.onConnect(y):n.hooks.value.connect.off(y),g(()=>{n.hooks.value.connect.off(y)})},{immediate:!0})})},p=()=>{const y=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const w of Object.keys(t)){const x=w;if(!y.includes(x)){const g=_e(()=>t[x]),I=n[x];Kn(I)&&o.run(()=>{he(g,C=>{we(C)&&(I.value=C)},{immediate:!0})})}}};(()=>{i(),r(),s(),l(),a(),c(),u(),h(),v(),p()})()}),()=>o.stop()}function Ku(){return{edgesChange:H(),nodesChange:H(),nodeDoubleClick:H(),nodeClick:H(),nodeMouseEnter:H(),nodeMouseMove:H(),nodeMouseLeave:H(),nodeContextMenu:H(),nodeDragStart:H(),nodeDrag:H(),nodeDragStop:H(),nodesInitialized:H(),miniMapNodeClick:H(),miniMapNodeDoubleClick:H(),miniMapNodeMouseEnter:H(),miniMapNodeMouseMove:H(),miniMapNodeMouseLeave:H(),connect:H(),connectStart:H(),connectEnd:H(),clickConnectStart:H(),clickConnectEnd:H(),paneReady:H(),init:H(),move:H(),moveStart:H(),moveEnd:H(),selectionDragStart:H(),selectionDrag:H(),selectionDragStop:H(),selectionContextMenu:H(),selectionStart:H(),selectionEnd:H(),viewportChangeStart:H(),viewportChange:H(),viewportChangeEnd:H(),paneScroll:H(),paneClick:H(),paneContextMenu:H(),paneMouseEnter:H(),paneMouseMove:H(),paneMouseLeave:H(),edgeContextMenu:H(),edgeMouseEnter:H(),edgeMouseMove:H(),edgeMouseLeave:H(),edgeDoubleClick:H(),edgeClick:H(),edgeUpdateStart:H(),edgeUpdate:H(),edgeUpdateEnd:H(),updateNodeInternals:H(),error:H(e=>hn(e.message))}}function Wu(e,t){fr(()=>{for(const[n,o]of Object.entries(t.value)){const i=r=>{e(n,r)};o.fns.add(i),an(()=>{o.off(i)})}})}function nr(){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:to.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:Et.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:We.Bezier,style:{}},connectionMode:rt.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:rn()?"Meta":"Control",zoomActivationKeyCode:rn()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:Ku(),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 qu=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function Ju(e,t,n){const o=Uu(e),i=f=>{const d=f!=null?f:[];e.hooks.updateNodeInternals.trigger(d)},r=f=>bu(f,e.nodes,e.edges),s=f=>wu(f,e.nodes,e.edges),a=f=>Gi(f,e.edges),l=f=>{if(!!f)return t.value.get(f)},c=f=>{if(!!f)return n.value.get(f)},u=(f,d,N)=>{var Z,T;var b,A;const Y=[];for(const ee of f){const re={id:ee.id,type:"position",dragging:N,from:ee.from};if(d&&(re.position=ee.position,ee.parentNode)){const ae=l(ee.parentNode);re.position={x:re.position.x-((Z=(b=ae==null?void 0:ae.computedPosition)==null?void 0:b.x)!=null?Z:0),y:re.position.y-((T=(A=ae==null?void 0:ae.computedPosition)==null?void 0:A.y)!=null?T:0)}}Y.push(re)}Y!=null&&Y.length&&e.hooks.nodesChange.trigger(Y)},h=f=>{if(!e.vueFlowRef)return;const d=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!d)return;const N=window.getComputedStyle(d),{m22:b}=new window.DOMMatrixReadOnly(N.transform),A=[];for(let Y=0;Y<f.length;++Y){const Z=f[Y],T=l(Z.id);if(T){const ee=fn(Z.nodeElement);if(!!(ee.width&&ee.height&&(T.dimensions.width!==ee.width||T.dimensions.height!==ee.height||Z.forceUpdate))){const ae=Z.nodeElement.getBoundingClientRect();T.dimensions=ee,T.handleBounds.source=Ho(".source",Z.nodeElement,ae,b),T.handleBounds.target=Ho(".target",Z.nodeElement,ae,b),A.push({id:T.id,type:"dimensions",dimensions:ee})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&o.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),A.length&&e.hooks.nodesChange.trigger(A)},v=(f,d)=>{const N=new Set,b=new Set;for(const Z of f)je(Z)?N.add(Z.id):Ke(Z)&&b.add(Z.id);const A=Ue(t.value,N,!0),Y=Ue(n.value,b);if(e.multiSelectionActive){for(const Z of N)A.push(Ge(Z,d));for(const Z of b)Y.push(Ge(Z,d))}A.length&&e.hooks.nodesChange.trigger(A),Y.length&&e.hooks.edgesChange.trigger(Y)},p=f=>{if(e.multiSelectionActive){const d=f.map(N=>Ge(N.id,!0));e.hooks.nodesChange.trigger(d);return}e.hooks.nodesChange.trigger(Ue(t.value,new Set(f.map(d=>d.id)),!0)),e.hooks.edgesChange.trigger(Ue(n.value))},S=f=>{if(e.multiSelectionActive){const d=f.map(N=>Ge(N.id,!0));e.hooks.edgesChange.trigger(d);return}e.hooks.edgesChange.trigger(Ue(n.value,new Set(f.map(d=>d.id)))),e.hooks.nodesChange.trigger(Ue(t.value,new Set,!0))},y=f=>{v(f,!0)},w=f=>{const N=(f||e.nodes).map(b=>(b.selected=!1,Ge(b.id,!1)));e.hooks.nodesChange.trigger(N)},x=f=>{const N=(f||e.edges).map(b=>(b.selected=!1,Ge(b.id,!1)));e.hooks.edgesChange.trigger(N)},g=f=>{if(!f||!f.length)return v([],!1);const d=f.reduce((N,b)=>{const A=Ge(b.id,!1);return je(b)?N.nodes.push(A):N.edges.push(A),N},{nodes:[],edges:[]});d.nodes.length&&e.hooks.nodesChange.trigger(d.nodes),d.edges.length&&e.hooks.edgesChange.trigger(d.edges)},I=f=>{var d;(d=e.d3Zoom)==null||d.scaleExtent([f,e.maxZoom]),e.minZoom=f},C=f=>{var d;(d=e.d3Zoom)==null||d.scaleExtent([e.minZoom,f]),e.maxZoom=f},z=f=>{var d;(d=e.d3Zoom)==null||d.translateExtent(f),e.translateExtent=f},F=f=>{e.nodeExtent=f,i()},R=f=>{var d;(d=e.d3Zoom)==null||d.clickDistance(f)},q=f=>{e.nodesDraggable=f,e.nodesConnectable=f,e.elementsSelectable=f},G=f=>{const d=f instanceof Function?f(e.nodes):f;!e.initialized&&!d.length||(e.nodes=Lo(d,l,e.hooks.error.trigger))},$=f=>{const d=f instanceof Function?f(e.edges):f;if(!e.initialized&&!d.length)return;const N=Yo(d,e.isValidConnection,l,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);Fo(e.connectionLookup,N),e.edges=N},m=f=>{const d=f instanceof Function?f([...e.nodes,...e.edges]):f;!e.initialized&&!d.length||(G(d.filter(je)),$(d.filter(Ke)))},J=f=>{let d=f instanceof Function?f(e.nodes):f;d=Array.isArray(d)?d:[d];const N=Lo(d,l,e.hooks.error.trigger),b=[];for(const A of N)b.push(Po(A));b.length&&e.hooks.nodesChange.trigger(b)},ne=f=>{let d=f instanceof Function?f(e.edges):f;d=Array.isArray(d)?d:[d];const N=Yo(d,e.isValidConnection,l,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),b=[];for(const A of N)b.push(Po(A));b.length&&e.hooks.edgesChange.trigger(b)},_=(f,d=!0,N=!1)=>{const b=f instanceof Function?f(e.nodes):f,A=Array.isArray(b)?b:[b],Y=[],Z=[];function T(re){const ae=a(re);for(const fe of ae)(!we(fe.deletable)||fe.deletable)&&Z.push(Ao(fe.id,fe.source,fe.target,fe.sourceHandle,fe.targetHandle))}function ee(re){const ae=[];for(const fe of e.nodes)fe.parentNode===re&&ae.push(fe);if(ae.length){for(const fe of ae)Y.push(Do(fe.id));d&&T(ae);for(const fe of ae)ee(fe.id)}}for(const re of A){const ae=typeof re=="string"?l(re):re;!ae||we(ae.deletable)&&!ae.deletable||(Y.push(Do(ae.id)),d&&T([ae]),N&&ee(ae.id))}Z.length&&e.hooks.edgesChange.trigger(Z),Y.length&&e.hooks.nodesChange.trigger(Y)},M=f=>{const d=f instanceof Function?f(e.edges):f,N=Array.isArray(d)?d:[d],b=[];for(const A of N){const Y=typeof A=="string"?c(A):A;!Y||we(Y.deletable)&&!Y.deletable||b.push(Ao(typeof A=="string"?A:A.id,Y.source,Y.target,Y.sourceHandle,Y.targetHandle))}e.hooks.edgesChange.trigger(b)},E=(f,d,N=!0)=>zu(f,d,e.edges,c,N,e.hooks.error.trigger),k=(f,d,N={replace:!1})=>{const b=c(f);if(!b)return;const A=typeof d=="function"?d(b):d;b.data=N.replace?A:{...b.data,...A}},P=f=>$o(f,e.nodes),D=f=>{const d=$o(f,e.edges);return Fo(e.connectionLookup,d),d},V=(f,d,N={replace:!1})=>{const b=l(f);if(!b)return;const A=typeof d=="function"?d(b):d;N.replace?e.nodes.splice(e.nodes.indexOf(b),1,A):Object.assign(b,A)},B=(f,d,N={replace:!1})=>{const b=l(f);if(!b)return;const A=typeof d=="function"?d(b):d;b.data=N.replace?A:{...b.data,...A}},Q=(f,d,N=!1)=>{N?e.connectionClickStartHandle=f:e.connectionStartHandle=f,e.connectionEndHandle=null,e.connectionStatus=null,d&&(e.connectionPosition=d)},L=(f,d=null,N=null)=>{e.connectionStartHandle&&(e.connectionPosition=f,e.connectionEndHandle=d,e.connectionStatus=N)},O=(f,d)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,d?e.connectionClickStartHandle=null:e.connectionStartHandle=null},U=f=>{const d=yu(f),N=d?null:St(f)?f:l(f.id);return!d&&!N?[null,null,d]:[d?f:Yn(N),N,d]},ue=(f,d=!0,N=e.nodes)=>{const[b,A,Y]=U(f);if(!b)return[];const Z=[];for(const T of N||e.nodes){if(!Y&&(T.id===A.id||!T.computedPosition))continue;const ee=Yn(T),re=Gn(ee,b);(d&&re>0||re>=Number(b.width)*Number(b.height))&&Z.push(T)}return Z},se=(f,d,N=!0)=>{const[b]=U(f);if(!b)return!1;const A=Gn(b,d);return N&&A>0||A>=Number(b.width)*Number(b.height)},ce=f=>{const{viewport:d,dimensions:N,d3Zoom:b,d3Selection:A,translateExtent:Y}=e;if(!b||!A||!f.x&&!f.y)return!1;const Z=pt.translate(d.x+f.x,d.y+f.y).scale(d.zoom),T=[[0,0],[N.width,N.height]],ee=b.constrain()(Z,T,Y),re=e.viewport.x!==ee.x||e.viewport.y!==ee.y||e.viewport.zoom!==ee.k;return b.transform(A,ee),re},te=f=>{const d=f instanceof Function?f(e):f,N=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];we(d.defaultEdgeOptions)&&(e.defaultEdgeOptions=d.defaultEdgeOptions);const b=d.modelValue||d.nodes||d.edges?[]:void 0;b&&(d.modelValue&&b.push(...d.modelValue),d.nodes&&b.push(...d.nodes),d.edges&&b.push(...d.edges),m(b));const A=()=>{we(d.maxZoom)&&C(d.maxZoom),we(d.minZoom)&&I(d.minZoom),we(d.translateExtent)&&z(d.translateExtent)};for(const Y of Object.keys(d)){const Z=Y,T=d[Z];![...qu,...N].includes(Z)&&we(T)&&(e[Z]=T)}Pn(()=>e.d3Zoom).not.toBeNull().then(A),e.initialized||(e.initialized=!0)};return{updateNodePositions:u,updateNodeDimensions:h,setElements:m,setNodes:G,setEdges:$,addNodes:J,addEdges:ne,removeNodes:_,removeEdges:M,findNode:l,findEdge:c,updateEdge:E,updateEdgeData:k,updateNode:V,updateNodeData:B,applyEdgeChanges:D,applyNodeChanges:P,addSelectedElements:y,addSelectedNodes:p,addSelectedEdges:S,setMinZoom:I,setMaxZoom:C,setTranslateExtent:z,setNodeExtent:F,setPaneClickDistance:R,removeSelectedElements:g,removeSelectedNodes:w,removeSelectedEdges:x,startConnection:Q,updateConnection:L,endConnection:O,setInteractive:q,setState:te,getIntersectingNodes:ue,getIncomers:r,getOutgoers:s,getConnectedEdges:a,isNodeIntersecting:se,panBy:ce,fitView:f=>o.value.fitView(f),zoomIn:f=>o.value.zoomIn(f),zoomOut:f=>o.value.zoomOut(f),zoomTo:(f,d)=>o.value.zoomTo(f,d),setViewport:(f,d)=>o.value.setViewport(f,d),setTransform:(f,d)=>o.value.setTransform(f,d),getViewport:()=>o.value.getViewport(),getTransform:()=>o.value.getTransform(),setCenter:(f,d,N)=>o.value.setCenter(f,d,N),fitBounds:(f,d)=>o.value.fitBounds(f,d),project:f=>o.value.project(f),screenToFlowCoordinate:f=>o.value.screenToFlowCoordinate(f),flowToScreenCoordinate:f=>o.value.flowToScreenCoordinate(f),toObject:()=>{const f=[],d=[];for(const N of e.nodes){const{computedPosition:b,handleBounds:A,selected:Y,dimensions:Z,isParent:T,resizing:ee,dragging:re,events:ae,...fe}=N;f.push(fe)}for(const N of e.edges){const{selected:b,sourceNode:A,targetNode:Y,events:Z,...T}=N;d.push(T)}return JSON.parse(JSON.stringify({nodes:f,edges:d,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:f=>new Promise(d=>{const{nodes:N,edges:b,position:A,zoom:Y,viewport:Z}=f;if(N&&G(N),b&&$(b),(Z==null?void 0:Z.x)&&(Z==null?void 0:Z.y)||A){const T=(Z==null?void 0:Z.x)||A[0],ee=(Z==null?void 0:Z.y)||A[1],re=(Z==null?void 0:Z.zoom)||Y||e.viewport.zoom;return Pn(()=>o.value.viewportInitialized).toBe(!0).then(()=>{o.value.setViewport({x:T,y:ee,zoom:re}).then(()=>{d(!0)})})}else d(!0)}),updateNodeInternals:i,viewportHelper:o,$reset:()=>{var d,N,b;const f=nr();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const A=pt.translate((d=f.defaultViewport.x)!=null?d:0,(N=f.defaultViewport.y)!=null?N:0).scale(st((b=f.defaultViewport.zoom)!=null?b:1,f.minZoom,f.maxZoom)),Y=e.viewportRef.getBoundingClientRect(),Z=[[0,0],[Y.width,Y.height]],T=e.d3Zoom.constrain()(A,Z,f.translateExtent);e.d3Zoom.transform(e.d3Selection,T)}te(f)},$destroy:()=>{}}}const Qu=["data-id","data-handleid","data-nodeid","data-handlepos"],ju={name:"Handle",compatConfig:{MODE:3}},sn=me({...ju,props:{id:{default:null},type:{},position:{default:()=>K.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=jo(e,["position","connectable","connectableStart","connectableEnd","id"]),o=_e(()=>{var $;return($=n.type)!=null?$:"source"}),i=_e(()=>{var $;return($=n.isValidConnection)!=null?$:null}),{connectionStartHandle:r,connectionClickStartHandle:s,connectionEndHandle:a,vueFlowRef:l,nodesConnectable:c,noDragClassName:u,noPanClassName:h}=ye(),{id:v,node:p,nodeEl:S,connectedEdges:y}=er(),w=ve(),x=_e(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),g=_e(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),I=_e(()=>{var $,m,J,ne,_,M;return(($=r.value)==null?void 0:$.nodeId)===v&&((m=r.value)==null?void 0:m.handleId)===e.id&&((J=r.value)==null?void 0:J.type)===o.value||((ne=a.value)==null?void 0:ne.nodeId)===v&&((_=a.value)==null?void 0:_.handleId)===e.id&&((M=a.value)==null?void 0:M.type)===o.value}),C=_e(()=>{var $,m,J;return(($=s.value)==null?void 0:$.nodeId)===v&&((m=s.value)==null?void 0:m.handleId)===e.id&&((J=s.value)==null?void 0:J.type)===o.value}),{handlePointerDown:z,handleClick:F}=ji({nodeId:v,handleId:e.id,isValidConnection:i,type:o}),R=oe(()=>typeof e.connectable=="string"&&e.connectable==="single"?!y.value.some($=>{const m=$[`${o.value}Handle`];return $[o.value]!==v?!1:m?m===e.id:!0}):typeof e.connectable=="number"?y.value.filter($=>{const m=$[`${o.value}Handle`];return $[o.value]!==v?!1:m?m===e.id:!0}).length<e.connectable:typeof e.connectable=="function"?e.connectable(p,y.value):we(e.connectable)?e.connectable:c.value);Le(()=>{var P;var $;if(!p.dimensions.width||!p.dimensions.height)return;const m=($=p.handleBounds[o.value])==null?void 0:$.find(D=>D.id===e.id);if(!l.value||m)return;const J=l.value.querySelector(".vue-flow__transformationpane");if(!S.value||!w.value||!J||!e.id)return;const ne=S.value.getBoundingClientRect(),_=w.value.getBoundingClientRect(),M=window.getComputedStyle(J),{m22:E}=new window.DOMMatrixReadOnly(M.transform),k={id:e.id,position:e.position,x:(_.left-ne.left)/E,y:(_.top-ne.top)/E,...fn(w.value)};p.handleBounds[o.value]=[...(P=p.handleBounds[o.value])!=null?P:[],k]}),Jo(()=>{const $=p.handleBounds[o.value];$&&(p.handleBounds[o.value]=$.filter(m=>m.id!==e.id))});function q($){const m=oo($);R.value&&x.value&&(m&&$.button===0||!m)&&z($)}function G($){!v||!s.value&&!x.value||R.value&&F($)}return t({handleClick:F,handlePointerDown:z,onClick:G,onPointerDown:q}),($,m)=>(le(),pe("div",{ref_key:"handle",ref:w,"data-id":`${j(v)}-${e.id}-${o.value}`,"data-handleid":e.id,"data-nodeid":j(v),"data-handlepos":$.position,class:et(["vue-flow__handle",[`vue-flow__handle-${$.position}`,`vue-flow__handle-${e.id}`,j(u),j(h),o.value,{connectable:R.value,connecting:C.value,connectablestart:x.value,connectableend:g.value,connectionindicator:R.value&&(x.value&&!I.value||g.value&&I.value)}]]),onMousedown:q,onTouchstartPassive:q,onClick:G},[Ve($.$slots,"default",{id:$.id})],42,Qu))}}),vn=function({sourcePosition:e=K.Bottom,targetPosition:t=K.Top,label:n,connectable:o=!0,isValidTargetPos:i,isValidSourcePos:r,data:s}){const a=s.label||n;return[ge(sn,{type:"target",position:t,connectable:o,isValidConnection:i}),typeof a!="string"&&a?ge(a):ge("div",{innerHTML:a}),ge(sn,{type:"source",position:e,connectable:o,isValidConnection:r})]};vn.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"];vn.inheritAttrs=!1;vn.compatConfig={MODE:3};const ec=vn,pn=function({targetPosition:e=K.Top,label:t,connectable:n=!0,isValidTargetPos:o,data:i}){const r=i.label||t;return[ge(sn,{type:"target",position:e,connectable:n,isValidConnection:o}),typeof r!="string"&&r?ge(r):ge("div",{innerHTML:r})]};pn.props=["targetPosition","label","isValidTargetPos","connectable","data"];pn.inheritAttrs=!1;pn.compatConfig={MODE:3};const tc=pn,mn=function({sourcePosition:e=K.Bottom,label:t,connectable:n=!0,isValidSourcePos:o,data:i}){const r=i.label||t;return[typeof r!="string"&&r?ge(r):ge("div",{innerHTML:r}),ge(sn,{type:"source",position:e,connectable:n,isValidConnection:o})]};mn.props=["sourcePosition","label","isValidSourcePos","connectable","data"];mn.inheritAttrs=!1;mn.compatConfig={MODE:3};const nc=mn,oc=["transform"],ic=["width","height","x","y","rx","ry"],rc=["y"],sc={name:"EdgeText",compatConfig:{MODE:3}},ac=me({...sc,props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const t=ve({x:0,y:0,width:0,height:0}),n=ve(null),o=oe(()=>`translate(${e.x-t.value.width/2} ${e.y-t.value.height/2})`);Le(i),he([()=>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)=>(le(),pe("g",{transform:o.value,class:"vue-flow__edge-textwrapper"},[r.labelShowBg?(le(),pe("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:ke(r.labelBgStyle),rx:r.labelBgBorderRadius,ry:r.labelBgBorderRadius},null,12,ic)):$e("",!0),tt("text",br(r.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:r.labelStyle}),[Ve(r.$slots,"default",{},()=>[typeof r.label!="string"?(le(),nt(_r(r.label),{key:0})):(le(),pe(ot,{key:1},[wr(kn(r.label),1)],64))])],16,rc)],8,oc))}}),lc=["id","d","marker-end","marker-start"],uc=["d","stroke-width"],cc={name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3}},yn=me({...cc,props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},style:{},labelStyle:{},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:t}){const n=jo(e,["interactionWidth","labelShowBg"]),o=ve(null),i=ve(null),r=ve(null),s=hr();return t({pathEl:o,interactionEl:i,labelEl:r}),(a,l)=>(le(),pe(ot,null,[tt("path",{id:a.id,ref_key:"pathEl",ref:o,d:a.path,style:ke(n.style),class:et(["vue-flow__edge-path",j(s).class]),"marker-end":a.markerEnd,"marker-start":a.markerStart},null,14,lc),a.interactionWidth?(le(),pe("path",{key:0,ref_key:"interactionEl",ref:i,fill:"none",d:a.path,"stroke-width":a.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,uc)):$e("",!0),a.label&&a.labelX&&a.labelY?(le(),nt(ac,{key:1,ref_key:"labelEl",ref:r,x:a.labelX,y:a.labelY,label:a.label,"label-show-bg":a.labelShowBg,"label-bg-style":a.labelBgStyle,"label-bg-padding":a.labelBgPadding,"label-bg-border-radius":a.labelBgBorderRadius,"label-style":a.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):$e("",!0)],64))}});function or({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 ir({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,c=t*.125+r*.375+a*.375+o*.125,u=Math.abs(l-e),h=Math.abs(c-t);return[l,c,u,h]}function Yt(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Xo({pos:e,x1:t,y1:n,x2:o,y2:i,c:r}){let s,a;switch(e){case K.Left:s=t-Yt(t-o,r),a=n;break;case K.Right:s=t+Yt(o-t,r),a=n;break;case K.Top:s=t,a=n-Yt(n-i,r);break;case K.Bottom:s=t,a=n+Yt(i-n,r);break}return[s,a]}function rr(e){const{sourceX:t,sourceY:n,sourcePosition:o=K.Bottom,targetX:i,targetY:r,targetPosition:s=K.Top,curvature:a=.25}=e,[l,c]=Xo({pos:o,x1:t,y1:n,x2:i,y2:r,c:a}),[u,h]=Xo({pos:s,x1:i,y1:r,x2:t,y2:n,c:a}),[v,p,S,y]=ir({sourceX:t,sourceY:n,targetX:i,targetY:r,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:h});return[`M${t},${n} C${l},${c} ${u},${h} ${i},${r}`,v,p,S,y]}function Uo({pos:e,x1:t,y1:n,x2:o,y2:i}){let r,s;switch(e){case K.Left:case K.Right:r=.5*(t+o),s=n;break;case K.Top:case K.Bottom:r=t,s=.5*(n+i);break}return[r,s]}function sr(e){const{sourceX:t,sourceY:n,sourcePosition:o=K.Bottom,targetX:i,targetY:r,targetPosition:s=K.Top}=e,[a,l]=Uo({pos:o,x1:t,y1:n,x2:i,y2:r}),[c,u]=Uo({pos:s,x1:i,y1:r,x2:t,y2:n}),[h,v,p,S]=ir({sourceX:t,sourceY:n,targetX:i,targetY:r,sourceControlX:a,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${t},${n} C${a},${l} ${c},${u} ${i},${r}`,h,v,p,S]}const Zo={[K.Left]:{x:-1,y:0},[K.Right]:{x:1,y:0},[K.Top]:{x:0,y:-1},[K.Bottom]:{x:0,y:1}};function dc({source:e,sourcePosition:t=K.Bottom,target:n}){return t===K.Left||t===K.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 Ko(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function fc({source:e,sourcePosition:t=K.Bottom,target:n,targetPosition:o=K.Top,center:i,offset:r}){var R,q;const s=Zo[t],a=Zo[o],l={x:e.x+s.x*r,y:e.y+s.y*r},c={x:n.x+a.x*r,y:n.y+a.y*r},u=dc({source:l,sourcePosition:t,target:c}),h=u.x!==0?"x":"y",v=u[h];let p,S,y;const w={x:0,y:0},x={x:0,y:0},[g,I,C,z]=or({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[h]*a[h]===-1){S=(R=i.x)!=null?R:g,y=(q=i.y)!=null?q:I;const G=[{x:S,y:l.y},{x:S,y:c.y}],$=[{x:l.x,y},{x:c.x,y}];s[h]===v?p=h==="x"?G:$:p=h==="x"?$:G}else{const G=[{x:l.x,y:c.y}],$=[{x:c.x,y:l.y}];if(h==="x"?p=s.x===v?$:G:p=s.y===v?G:$,t===o){const M=Math.abs(e[h]-n[h]);if(M<=r){const E=Math.min(r-1,r-M);s[h]===v?w[h]=(l[h]>e[h]?-1:1)*E:x[h]=(c[h]>n[h]?-1:1)*E}}if(t!==o){const M=h==="x"?"y":"x",E=s[h]===a[M],k=l[M]>c[M],P=l[M]<c[M];(s[h]===1&&(!E&&k||E&&P)||s[h]!==1&&(!E&&P||E&&k))&&(p=h==="x"?G:$)}const m={x:l.x+w.x,y:l.y+w.y},J={x:c.x+x.x,y:c.y+x.y},ne=Math.max(Math.abs(m.x-p[0].x),Math.abs(J.x-p[0].x)),_=Math.max(Math.abs(m.y-p[0].y),Math.abs(J.y-p[0].y));ne>=_?(S=(m.x+J.x)/2,y=p[0].y):(S=p[0].x,y=(m.y+J.y)/2)}return[[e,{x:l.x+w.x,y:l.y+w.y},...p,{x:c.x+x.x,y:c.y+x.y},n],S,y,C,z]}function hc(e,t,n,o){const i=Math.min(Ko(e,t)/2,Ko(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 c=e.x<n.x?-1:1,u=e.y<n.y?1:-1;return`L ${r+i*c},${s}Q ${r},${s} ${r},${s+i*u}`}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 Un(e){const{sourceX:t,sourceY:n,sourcePosition:o=K.Bottom,targetX:i,targetY:r,targetPosition:s=K.Top,borderRadius:a=5,centerX:l,centerY:c,offset:u=20}=e,[h,v,p,S,y]=fc({source:{x:t,y:n},sourcePosition:o,target:{x:i,y:r},targetPosition:s,center:{x:l,y:c},offset:u});return[h.reduce((x,g,I)=>{let C;return I>0&&I<h.length-1?C=hc(h[I-1],g,h[I+1],a):C=`${I===0?"M":"L"}${g.x} ${g.y}`,x+=C,x},""),v,p,S,y]}function gc(e){const{sourceX:t,sourceY:n,targetX:o,targetY:i}=e,[r,s,a,l]=or({sourceX:t,sourceY:n,targetX:o,targetY:i});return[`M ${t},${n}L ${o},${i}`,r,s,a,l]}const vc=me({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]=gc(e);return ge(yn,{path:n,labelX:o,labelY:i,...t,...e})}}}),pc=vc,mc=me({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()=>{var r,s;const[n,o,i]=Un({...e,sourcePosition:(r=e.sourcePosition)!=null?r:K.Bottom,targetPosition:(s=e.targetPosition)!=null?s:K.Top});return ge(yn,{path:n,labelX:o,labelY:i,...t,...e})}}}),ar=mc,yc=me({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:t}){return()=>ge(ar,{...e,...t,borderRadius:0})}}),_c=yc,wc=me({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()=>{var r,s;const[n,o,i]=rr({...e,sourcePosition:(r=e.sourcePosition)!=null?r:K.Bottom,targetPosition:(s=e.targetPosition)!=null?s:K.Top});return ge(yn,{path:n,labelX:o,labelY:i,...t,...e})}}}),bc=wc,xc=me({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()=>{var r,s;const[n,o,i]=sr({...e,sourcePosition:(r=e.sourcePosition)!=null?r:K.Bottom,targetPosition:(s=e.targetPosition)!=null?s:K.Top});return ge(yn,{path:n,labelX:o,labelY:i,...t,...e})}}}),Sc=xc,Ec={input:nc,default:ec,output:tc},Nc={default:bc,straight:pc,step:_c,smoothstep:ar,simplebezier:Sc};function Cc(e,t,n){const o=oe(()=>y=>t.value.get(y)),i=oe(()=>y=>n.value.get(y)),r=oe(()=>{const y={...Nc,...e.edgeTypes},w=Object.keys(y);for(const x of e.edges)x.type&&!w.includes(x.type)&&(y[x.type]=x.type);return y}),s=oe(()=>{const y={...Ec,...e.nodeTypes},w=Object.keys(y);for(const x of e.nodes)x.type&&!w.includes(x.type)&&(y[x.type]=x.type);return y}),a=oe(()=>e.onlyRenderVisibleElements?Yi(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),l=oe(()=>{if(e.onlyRenderVisibleElements){const y=[];for(const w of e.edges){const x=t.value.get(w.source),g=t.value.get(w.target);Iu({sourcePos:x.computedPosition||{x:0,y:0},targetPos:g.computedPosition||{x:0,y:0},sourceWidth:x.dimensions.width,sourceHeight:x.dimensions.height,targetWidth:g.dimensions.width,targetHeight:g.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&y.push(w)}return y}return e.edges}),c=oe(()=>[...a.value,...l.value]),u=oe(()=>{const y=[];for(const w of e.nodes)w.selected&&y.push(w);return y}),h=oe(()=>{const y=[];for(const w of e.edges)w.selected&&y.push(w);return y}),v=oe(()=>[...u.value,...h.value]),p=oe(()=>{const y=[];for(const w of e.nodes)!!w.dimensions.width&&!!w.dimensions.height&&w.handleBounds!==void 0&&y.push(w);return y}),S=oe(()=>a.value.length>0&&p.value.length===a.value.length);return{getNode:o,getEdge:i,getElements:c,getEdgeTypes:r,getNodeTypes:s,getEdges:l,getNodes:a,getSelectedElements:v,getSelectedNodes:u,getSelectedEdges:h,getNodesInitialized:p,areNodesInitialized:S}}class qe{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var i;var t;const n=(t=Pt())==null?void 0:t.appContext.app,o=(i=n==null?void 0:n.config.globalProperties.$vueFlowStorage)!=null?i:qe.instance;return qe.instance=o!=null?o:new qe,n&&(n.config.globalProperties.$vueFlowStorage=qe.instance),qe.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=nr(),i=gr(o),r={};for(const[v,p]of Object.entries(i.hooks)){const S=`on${v.charAt(0).toUpperCase()+v.slice(1)}`;r[S]=p.on}const s={};for(const[v,p]of Object.entries(i.hooks))s[v]=p.trigger;const a=oe(()=>{const v=new Map;for(const p of i.nodes)v.set(p.id,p);return v}),l=oe(()=>{const v=new Map;for(const p of i.edges)v.set(p.id,p);return v}),c=Cc(i,a,l),u=Ju(i,a,l);u.setState({...i,...n});const h={...r,...c,...u,...$r(i),nodeLookup:a,edgeLookup:l,emits:s,id:t,vueFlowVersion:"1.39.3",$destroy:()=>{this.remove(t)}};return this.set(t,h),h}getId(){return`vue-flow-${this.currentId++}`}}function ye(e){const t=qe.getInstance(),n=Qo(),o=typeof e=="object",i=o?e:{id:e},r=i.id,s=r!=null?r:n==null?void 0:n.vueFlowId;let a;if(n){const l=mt(Go,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!=null?r:t.getId(),c=t.create(l,i);a=c,(n!=null?n:qo(!0)).run(()=>{he(c.applyDefault,(h,v,p)=>{const S=w=>{c.applyNodeChanges(w)},y=w=>{c.applyEdgeChanges(w)};h?(c.onNodesChange(S),c.onEdgesChange(y)):(c.hooks.value.nodesChange.off(S),c.hooks.value.edgesChange.off(y)),p(()=>{c.hooks.value.nodesChange.off(S),c.hooks.value.edgesChange.off(y)})},{immediate:!0}),an(()=>{if(a){const h=t.get(a.id);h?h.$destroy():hn(`No store instance found for id ${a.id} in storage.`)}})})}else o&&a.setState(i);if(n&&(ht(Go,a),n.vueFlowId=a.id),o){const l=Pt();(l==null?void 0:l.type.name)!=="VueFlow"&&a.emits.error(new xe(be.USEVUEFLOW_OPTIONS))}return a}function Mc(e){const{emits:t,dimensions:n}=ye();let o;Le(()=>{const i=e.value,r=()=>{if(!i)return;const s=fn(i);(s.width===0||s.height===0)&&t.error(new xe(be.MISSING_VIEWPORT_DIMENSIONS)),n.value={width:s.width||500,height:s.height||500}};r(),window.addEventListener("resize",r),i&&(o=new ResizeObserver(()=>r()),o.observe(i)),ti(()=>{window.removeEventListener("resize",r),o&&i&&o.unobserve(i)})})}const Ic={name:"UserSelection",compatConfig:{MODE:3}},Tc=me({...Ic,props:{userSelectionRect:{}},setup(e){return(t,n)=>(le(),pe("div",{class:"vue-flow__selection vue-flow__container",style:ke({width:`${t.userSelectionRect.width}px`,height:`${t.userSelectionRect.height}px`,transform:`translate(${t.userSelectionRect.x}px, ${t.userSelectionRect.y}px)`})},null,4))}}),kc=["tabIndex"],$c={name:"NodesSelection",compatConfig:{MODE:3}},Pc=me({...$c,setup(e){const{emits:t,viewport:n,getSelectedNodes:o,noPanClassName:i,disableKeyboardA11y:r,userSelectionActive:s}=ye(),a=tr(),l=ve(null),c=Qi({el:l,onStart(S){t.selectionDragStart(S)},onDrag(S){t.selectionDrag(S)},onStop(S){t.selectionDragStop(S)}});Le(()=>{var S;r.value||(S=l.value)==null||S.focus({preventScroll:!0})});const u=oe(()=>Fi(o.value)),h=oe(()=>({width:`${u.value.width}px`,height:`${u.value.height}px`,top:`${u.value.y}px`,left:`${u.value.x}px`}));function v(S){t.selectionContextMenu({event:S,nodes:o.value})}function p(S){r||ft[S.key]&&a({x:ft[S.key].x,y:ft[S.key].y},S.shiftKey)}return(S,y)=>!j(s)&&u.value.width&&u.value.height?(le(),pe("div",{key:0,class:et(["vue-flow__nodesselection vue-flow__container",j(i)]),style:ke({transform:`translate(${j(n).x}px,${j(n).y}px) scale(${j(n).zoom})`})},[tt("div",{ref_key:"el",ref:l,class:et([{dragging:j(c)},"vue-flow__nodesselection-rect"]),style:ke(h.value),tabIndex:j(r)?void 0:-1,onContextmenu:v,onKeydown:p},null,46,kc)],6)):$e("",!0)}});function Dc(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const Ac={name:"Pane",compatConfig:{MODE:3}},Oc=me({...Ac,props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:t,nodes:n,viewport:o,emits:i,userSelectionActive:r,removeSelectedElements:s,panOnDrag:a,userSelectionRect:l,elementsSelectable:c,nodesSelectionActive:u,getSelectedEdges:h,getSelectedNodes:v,removeNodes:p,removeEdges:S,selectionMode:y,deleteKeyCode:w,multiSelectionKeyCode:x,multiSelectionActive:g,edgeLookup:I,nodeLookup:C}=ye(),z=ve(null),F=ve(0),R=ve(0),q=ve(),G=ve(new Map),$=_e(()=>c.value&&(e.isSelecting||r.value));let m=!1,J=!1;const ne=Nt(w,{actInsideInputWithModifier:!1}),_=Nt(x);he(ne,L=>{!L||(p(v.value),S(h.value),u.value=!1)}),he(_,L=>{g.value=L});function M(L,O){return U=>{U.target===O&&(L==null||L(U))}}function E(){r.value=!1,l.value=null,F.value=0,R.value=0}function k(L){if(m){m=!1;return}i.paneClick(L),s(),u.value=!1}function P(L){var O;if(Array.isArray(a.value)&&((O=a.value)==null?void 0:O.includes(2))){L.preventDefault();return}i.paneContextMenu(L)}function D(L){i.paneScroll(L)}function V(L){var O,U,ue,se,ce;if(q.value=(O=t.value)==null?void 0:O.getBoundingClientRect(),!c.value||!e.isSelecting||L.button!==0||L.target!==z.value||!q.value)return;(ue=(U=L.target)==null?void 0:U.setPointerCapture)==null||ue.call(U,L.pointerId);const{x:te,y:ie}=Dc(L,q.value);J=!0,m=!1,G.value=new Map;for(const[X,W]of I.value)G.value.set(W.source,((se=G.value.get(W.source))==null?void 0:se.add(X))||new Set([X])),G.value.set(W.target,((ce=G.value.get(W.target))==null?void 0:ce.add(X))||new Set([X]));s(),l.value={width:0,height:0,startX:te,startY:ie,x:te,y:ie},r.value=!0,u.value=!1,i.selectionStart(L)}function B(L){if(!q.value||!l.value)return;m=!0;const{x:O,y:U}=Ze(L,q.value),{startX:ue=0,startY:se=0}=l.value,ce={startX:ue,startY:se,x:O<ue?O:ue,y:U<se?U:se,width:Math.abs(O-ue),height:Math.abs(U-se)},te=Yi(n.value,ce,o.value,y.value===to.Partial,!0),ie=new Set,X=new Set;for(const W of te){X.add(W.id);const f=G.value.get(W.id);if(f)for(const d of f)ie.add(d)}if(F.value!==X.size){F.value=X.size;const W=Ue(C.value,X,!0);i.nodesChange(W)}if(R.value!==ie.size){R.value=ie.size;const W=Ue(I.value,ie);i.edgesChange(W)}l.value=ce,r.value=!0,u.value=!1}function Q(L){var O;L.button!==0||!J||((O=L.target)==null||O.releasePointerCapture(L.pointerId),!r.value&&l.value&&L.target===z.value&&k(L),F.value>0&&(u.value=!0),E(),i.selectionEnd(L),e.selectionKeyPressed&&(m=!1),J=!1)}return(L,O)=>(le(),pe("div",{ref_key:"container",ref:z,class:et(["vue-flow__pane vue-flow__container",{selection:L.isSelecting}]),onClick:O[0]||(O[0]=U=>$.value?void 0:M(k,z.value)(U)),onContextmenu:O[1]||(O[1]=U=>M(P,z.value)(U)),onWheelPassive:O[2]||(O[2]=U=>M(D,z.value)(U)),onPointerenter:O[3]||(O[3]=U=>$.value?void 0:j(i).paneMouseEnter(U)),onPointerdown:O[4]||(O[4]=U=>$.value?V(U):j(i).paneMouseMove(U)),onPointermove:O[5]||(O[5]=U=>$.value?B(U):j(i).paneMouseMove(U)),onPointerup:O[6]||(O[6]=U=>$.value?Q(U):void 0),onPointerleave:O[7]||(O[7]=U=>j(i).paneMouseLeave(U))},[Ve(L.$slots,"default"),j(r)&&j(l)?(le(),nt(Tc,{key:0,"user-selection-rect":j(l)},null,8,["user-selection-rect"])):$e("",!0),j(u)&&j(v).length?(le(),nt(Pc,{key:1})):$e("",!0)],34))}}),zc={name:"Transform",compatConfig:{MODE:3}},Bc=me({...zc,setup(e){const{viewport:t,fitViewOnInit:n,fitViewOnInitDone:o}=ye(),i=oe(()=>n.value?!o.value:!1),r=oe(()=>`translate(${t.value.x}px,${t.value.y}px) scale(${t.value.zoom})`);return(s,a)=>(le(),pe("div",{class:"vue-flow__transformationpane vue-flow__container",style:ke({transform:r.value,opacity:i.value?0:void 0})},[Ve(s.$slots,"default")],4))}}),Rc={name:"Viewport",compatConfig:{MODE:3}},Vc=me({...Rc,setup(e){const{minZoom:t,maxZoom:n,defaultViewport:o,translateExtent:i,zoomActivationKeyCode:r,selectionKeyCode:s,panActivationKeyCode:a,panOnScroll:l,panOnScrollMode:c,panOnScrollSpeed:u,panOnDrag:h,zoomOnDoubleClick:v,zoomOnPinch:p,zoomOnScroll:S,preventScrolling:y,noWheelClassName:w,noPanClassName:x,emits:g,connectionStartHandle:I,userSelectionActive:C,paneDragging:z,d3Zoom:F,d3Selection:R,d3ZoomHandler:q,viewport:G,viewportRef:$,paneClickDistance:m}=ye();Mc($);const J=ve(!1),ne=ve(!1);let _=null,M=!1,E=0,k={x:0,y:0,zoom:0};const P=Nt(a),D=Nt(s),V=Nt(r),B=_e(()=>P.value||h.value),Q=_e(()=>P.value||l.value),L=_e(()=>D.value||s.value===!0&&B.value!==!0);Le(()=>{var A,Y,Z;if(!$.value){hn("Viewport element is missing");return}const te=$.value,ie=te.getBoundingClientRect(),X=fu().clickDistance(m.value).scaleExtent([t.value,n.value]).translateExtent(i.value),W=Ne(te).call(X),f=W.on("wheel.zoom"),d=pt.translate((A=o.value.x)!=null?A:0,(Y=o.value.y)!=null?Y:0).scale(st((Z=o.value.zoom)!=null?Z:1,t.value,n.value)),N=[[0,0],[ie.width,ie.height]],b=X.constrain()(d,N,i.value);X.transform(W,b),X.wheelDelta(U),F.value=X,R.value=W,q.value=f,G.value={x:b.x,y:b.y,zoom:b.k},X.on("start",T=>{var ee;if(!T.sourceEvent)return null;E=T.sourceEvent.button,J.value=!0;const re=se(T.transform);((ee=T.sourceEvent)==null?void 0:ee.type)==="mousedown"&&(z.value=!0),k=re,g.viewportChangeStart(re),g.moveStart({event:T,flowTransform:re})}),X.on("end",T=>{if(!T.sourceEvent)return null;if(J.value=!1,z.value=!1,O(B.value,E!=null?E:0)&&!M&&g.paneContextMenu(T.sourceEvent),M=!1,ue(k,T.transform)){const ee=se(T.transform);k=ee,g.viewportChangeEnd(ee),g.moveEnd({event:T,flowTransform:ee})}}),X.filter(T=>{var ee,re,ae;const fe=V.value||S.value,De=p.value&&T.ctrlKey,Fe=T.button;if((B.value===!0||Array.isArray(B.value)&&B.value.includes(1))&&Fe===1&&T.type==="mousedown"&&(((ee=T.target)==null?void 0:ee.closest(".vue-flow__node"))||((re=T.target)==null?void 0:re.closest(".vue-flow__edge"))))return!0;if(!B.value&&!fe&&!Q.value&&!v.value&&!p.value||C.value||!v.value&&T.type==="dblclick"||ce(T,w.value)&&T.type==="wheel"||ce(T,x.value)&&(T.type!=="wheel"||Q.value&&T.type==="wheel"&&!V.value)||!p.value&&T.ctrlKey&&T.type==="wheel"||!fe&&!Q.value&&!De&&T.type==="wheel")return!1;if(!p&&T.type==="touchstart"&&((ae=T.touches)==null?void 0:ae.length)>1)return T.preventDefault(),!1;if(!B.value&&(T.type==="mousedown"||T.type==="touchstart")||Array.isArray(B.value)&&!B.value.includes(Fe)&&(T.type==="mousedown"||T.type==="touchstart"))return!1;const yt=Array.isArray(B.value)&&B.value.includes(Fe)||!Fe||Fe<=1;return(!T.ctrlKey||T.type==="wheel")&&yt}),he([C,B],()=>{C.value&&!J.value?X.on("zoom",null):C.value||X.on("zoom",T=>{G.value={x:T.transform.x,y:T.transform.y,zoom:T.transform.k};const ee=se(T.transform);M=O(B.value,E!=null?E:0),g.viewportChange(ee),g.move({event:T,flowTransform:ee})})},{immediate:!0}),he([C,Q,c,V,p,y,w],()=>{Q.value&&!V.value&&!C.value?W.on("wheel.zoom",T=>{if(ce(T,w.value))return!1;const ee=V.value||S.value,re=p.value&&T.ctrlKey;if(!(!y.value||Q.value||ee||re))return!1;T.preventDefault(),T.stopImmediatePropagation();const fe=W.property("__zoom").k||1,De=rn();if(T.ctrlKey&&p.value&&De){const lr=Ie(T),ur=U(T),cr=fe*2**ur;X.scaleTo(W,cr,lr,T);return}const Fe=T.deltaMode===1?20:1;let yt=c.value===Et.Vertical?0:T.deltaX*Fe,Ot=c.value===Et.Horizontal?0:T.deltaY*Fe;!De&&T.shiftKey&&c.value!==Et.Vertical&&!yt&&Ot&&(yt=Ot,Ot=0),X.translateBy(W,-(yt/fe)*u.value,-(Ot/fe)*u.value);const at=se(W.property("__zoom"));_&&clearTimeout(_),ne.value?(g.move({event:T,flowTransform:at}),g.viewportChange(at),_=setTimeout(()=>{g.moveEnd({event:T,flowTransform:at}),g.viewportChangeEnd(at),ne.value=!1},150)):(ne.value=!0,g.moveStart({event:T,flowTransform:at}),g.viewportChangeStart(at))},{passive:!1}):typeof f<"u"&&W.on("wheel.zoom",function(T,ee){const re=!y.value&&T.type==="wheel"&&!T.ctrlKey,ae=V.value||S.value,fe=p.value&&T.ctrlKey;if(!ae&&!l.value&&!fe&&T.type==="wheel"||re||ce(T,w.value))return null;T.preventDefault(),f.call(this,T,ee)},{passive:!1})},{immediate:!0})});function O(te,ie){return ie===2&&Array.isArray(te)&&te.includes(2)}function U(te){const ie=te.ctrlKey&&rn()?10:1;return-te.deltaY*(te.deltaMode===1?.05:te.deltaMode?1:.002)*ie}function ue(te,ie){return te.x!==ie.x&&!Number.isNaN(ie.x)||te.y!==ie.y&&!Number.isNaN(ie.y)||te.zoom!==ie.k&&!Number.isNaN(ie.k)}function se(te){return{x:te.x,y:te.y,zoom:te.k}}function ce(te,ie){return te.target.closest(`.${ie}`)}return(te,ie)=>(le(),pe("div",{ref_key:"viewportRef",ref:$,class:"vue-flow__viewport vue-flow__container"},[ze(Oc,{"is-selecting":L.value,"selection-key-pressed":j(D),class:et({connecting:!!j(I),dragging:j(z),draggable:B.value})},{default:Tn(()=>[ze(Bc,null,{default:Tn(()=>[Ve(te.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),Hc=["id"],Lc=["id"],Fc=["id"],Yc={name:"A11yDescriptions",compatConfig:{MODE:3}},Gc=me({...Yc,setup(e){const{id:t,disableKeyboardA11y:n,ariaLiveMessage:o}=ye();return(i,r)=>(le(),pe(ot,null,[tt("div",{id:`${j(Pi)}-${j(t)}`,style:{display:"none"}}," Press enter or space to select a node. "+kn(j(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,Hc),tt("div",{id:`${j(Di)}-${j(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,Lc),j(n)?$e("",!0):(le(),pe("div",{key:0,id:`${j(mu)}-${j(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%)"}},kn(j(o)),9,Fc))],64))}});function Xc(){const e=ye();he(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function Uc(e,t,n){return n===K.Left?e-t:n===K.Right?e+t:e}function Zc(e,t,n){return n===K.Top?e-t:n===K.Bottom?e+t:e}const ro=function({radius:e=10,centerX:t=0,centerY:n=0,position:o=K.Top,type:i}){return ge("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${i}`,cx:Uc(t,e,o),cy:Zc(n,e,o),r:e,stroke:"transparent",fill:"transparent"})};ro.props=["radius","centerX","centerY","position","type"];ro.compatConfig={MODE:3};const Wo=ro,Kc=me({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:c,findEdge:u,findNode:h,isValidConnection:v,multiSelectionActive:p,disableKeyboardA11y:S,elementsSelectable:y,edgesUpdatable:w,edgesFocusable:x}=ye(),g=oe(()=>u(e.id)),I=Hu(g.value,r),C=mt(gn),z=Pt(),F=ve(!1),R=ve(!1),q=ve(""),G=ve(null),$=ve("source"),m=ve(null),J=_e(()=>typeof g.value.selectable>"u"?y.value:g.value.selectable),ne=_e(()=>typeof g.value.updatable>"u"?w.value:g.value.updatable),_=_e(()=>typeof g.value.focusable>"u"?x.value:g.value.focusable);ht(Bu,e.id),ht(Ru,m);const M=oe(()=>g.value.class instanceof Function?g.value.class(g.value):g.value.class),E=oe(()=>g.value.style instanceof Function?g.value.style(g.value):g.value.style),k=oe(()=>{var b;const f=g.value.type||"default",d=C==null?void 0:C[`edge-${f}`];if(d)return d;let N=(b=g.value.template)!=null?b:l.value[f];if(typeof N=="string"&&z){const A=Object.keys(z.appContext.components);A&&A.includes(f)&&(N=ei(f,!1))}return N&&typeof N!="string"?N:(r.error(new xe(be.EDGE_TYPE_MISSING,N)),!1)}),{handlePointerDown:P}=ji({nodeId:q,handleId:G,type:$,isValidConnection:v,edgeUpdaterType:$,onEdgeUpdate:B,onEdgeUpdateEnd:Q});return()=>{const f=h(g.value.source),d=h(g.value.target),N="pathOptions"in g.value?g.value.pathOptions:{};if(!f&&!d)return r.error(new xe(be.EDGE_SOURCE_TARGET_MISSING,g.value.id,g.value.source,g.value.target)),null;if(!f)return r.error(new xe(be.EDGE_SOURCE_MISSING,g.value.id,g.value.source)),null;if(!d)return r.error(new xe(be.EDGE_TARGET_MISSING,g.value.id,g.value.target)),null;if(!g.value||g.value.hidden||f.hidden||d.hidden)return null;let b;o.value===rt.Strict?b=f.handleBounds.source:b=[...f.handleBounds.source||[],...f.handleBounds.target||[]];const A=zo(b,g.value.sourceHandle);let Y;o.value===rt.Strict?Y=d.handleBounds.target:Y=[...d.handleBounds.target||[],...d.handleBounds.source||[]];const Z=zo(Y,g.value.targetHandle),T=(A==null?void 0:A.position)||K.Bottom,ee=(Z==null?void 0:Z.position)||K.Top,{x:re,y:ae}=on(f,A,T),{x:fe,y:De}=on(d,Z,ee);return g.value.sourceX=re,g.value.sourceY=ae,g.value.targetX=fe,g.value.targetY=De,ge("g",{ref:m,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${k.value===!1?"default":g.value.type||"default"}`,a.value,M.value,{updating:F.value,selected:g.value.selected,animated:g.value.animated,inactive:!J.value}],onClick:O,onContextmenu:U,onDblclick:ue,onMouseenter:se,onMousemove:ce,onMouseleave:te,onKeyDown:_.value?W:void 0,tabIndex:_.value?0:void 0,"aria-label":g.value.ariaLabel===null?void 0:g.value.ariaLabel||`Edge from ${g.value.source} to ${g.value.target}`,"aria-describedby":_.value?`${Di}-${t}`:void 0,role:_.value?"button":"img"},[R.value?null:ge(k.value===!1?l.value.default:k.value,{id:e.id,sourceNode:f,targetNode:d,source:g.value.source,target:g.value.target,type:g.value.type,updatable:ne.value,selected:g.value.selected,animated:g.value.animated,label:g.value.label,labelStyle:g.value.labelStyle,labelShowBg:g.value.labelShowBg,labelBgStyle:g.value.labelBgStyle,labelBgPadding:g.value.labelBgPadding,labelBgBorderRadius:g.value.labelBgBorderRadius,data:g.value.data,events:{...g.value.events,...I.on},style:E.value,markerStart:`url('#${$t(g.value.markerStart,t)}')`,markerEnd:`url('#${$t(g.value.markerEnd,t)}')`,sourcePosition:T,targetPosition:ee,sourceX:re,sourceY:ae,targetX:fe,targetY:De,sourceHandleId:g.value.sourceHandle,targetHandleId:g.value.targetHandle,interactionWidth:g.value.interactionWidth,...N}),[ne.value==="source"||ne.value===!0?[ge("g",{onMousedown:ie,onMouseenter:D,onMouseout:V},ge(Wo,{position:T,centerX:re,centerY:ae,radius:i.value,type:"source","data-type":"source"}))]:null,ne.value==="target"||ne.value===!0?[ge("g",{onMousedown:X,onMouseenter:D,onMouseout:V},ge(Wo,{position:ee,centerX:fe,centerY:De,radius:i.value,type:"target","data-type":"target"}))]:null]])};function D(){F.value=!0}function V(){F.value=!1}function B(f,d){I.emit.update({event:f,edge:g.value,connection:d})}function Q(f){I.emit.updateEnd({event:f,edge:g.value}),R.value=!1}function L(f,d){var N;f.button===0&&(R.value=!0,q.value=d?g.value.target:g.value.source,G.value=(N=d?g.value.targetHandle:g.value.sourceHandle)!=null?N:"",$.value=d?"target":"source",I.emit.updateStart({event:f,edge:g.value}),P(f))}function O(f){var d;const N={event:f,edge:g.value};J.value&&(s.value=!1,g.value.selected&&p.value?(c([g.value]),(d=m.value)==null||d.blur()):n([g.value])),I.emit.click(N)}function U(f){I.emit.contextMenu({event:f,edge:g.value})}function ue(f){I.emit.doubleClick({event:f,edge:g.value})}function se(f){I.emit.mouseEnter({event:f,edge:g.value})}function ce(f){I.emit.mouseMove({event:f,edge:g.value})}function te(f){I.emit.mouseLeave({event:f,edge:g.value})}function ie(f){L(f,!0)}function X(f){L(f,!1)}function W(f){var d;!S.value&&Ai.includes(f.key)&&J.value&&(f.key==="Escape"?((d=m.value)==null||d.blur(),c([u(e.id)])):n([u(e.id)]))}}}),Wc=Kc,qc={[K.Left]:K.Right,[K.Right]:K.Left,[K.Top]:K.Bottom,[K.Bottom]:K.Top},Jc=me({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:c,viewport:u,findNode:h}=ye(),v=(e=mt(gn))==null?void 0:e["connection-line"],p=oe(()=>{var g;return h((g=o.value)==null?void 0:g.nodeId)}),S=oe(()=>{var I;var g;return(I=h((g=i.value)==null?void 0:g.nodeId))!=null?I:null}),y=oe(()=>({x:(r.value.x-u.value.x)/u.value.zoom,y:(r.value.y-u.value.y)/u.value.zoom})),w=oe(()=>l.value.markerStart?`url(#${$t(l.value.markerStart,t)})`:""),x=oe(()=>l.value.markerEnd?`url(#${$t(l.value.markerEnd,t)})`:"");return()=>{var D,V,B,Q;var g,I,C,z;if(!p.value||!o.value)return null;const F=o.value.handleId,R=o.value.type,q=p.value.handleBounds;let G=q==null?void 0:q[R];if(n.value===rt.Loose&&(G=G||(q==null?void 0:q[R==="source"?"target":"source"])),!G)return null;const $=(D=F?G.find(L=>L.id===F):G[0])!=null?D:null,m=($==null?void 0:$.position)||K.Top,{x:J,y:ne}=on(p.value,$,m);let _=null;S.value&&((g=i.value)==null?void 0:g.handleId)&&(n.value===rt.Strict?_=((I=S.value.handleBounds[R==="source"?"target":"source"])==null?void 0:I.find(L=>{var O;return L.id===((O=i.value)==null?void 0:O.handleId)}))||null:_=((C=[...S.value.handleBounds.source||[],...S.value.handleBounds.target||[]])==null?void 0:C.find(L=>{var O;return L.id===((O=i.value)==null?void 0:O.handleId)}))||null);const M=(V=(z=i.value)==null?void 0:z.position)!=null?V:m?qc[m]:null;if(!m||!M)return null;const E=(Q=(B=s.value)!=null?B:l.value.type)!=null?Q:We.Bezier;let k="";const P={sourceX:J,sourceY:ne,sourcePosition:m,targetX:y.value.x,targetY:y.value.y,targetPosition:M};return E===We.Bezier?[k]=rr(P):E===We.Step?[k]=Un({...P,borderRadius:0}):E===We.SmoothStep?[k]=Un(P):E===We.SimpleBezier?[k]=sr(P):k=`M${J},${ne} ${y.value.x},${y.value.y}`,ge("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},ge("g",{class:"vue-flow__connection"},v?ge(v,{sourceX:J,sourceY:ne,sourcePosition:m,targetX:y.value.x,targetY:y.value.y,targetPosition:M,sourceNode:p.value,sourceHandle:$,targetNode:S.value,targetHandle:_,markerEnd:x.value,markerStart:w.value,connectionStatus:c.value}):ge("path",{d:k,class:[l.value.class,c,"vue-flow__connection-path"],style:{...a.value,...l.value.style},"marker-end":x.value,"marker-start":w.value})))}}}),Qc=Jc,jc=["id","markerWidth","markerHeight","markerUnits","orient"],ed={name:"MarkerType",compatConfig:{MODE:3}},td=me({...ed,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)=>(le(),pe("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===j(Ln).ArrowClosed?(le(),pe("polyline",{key:0,style:ke({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)):$e("",!0),t.type===j(Ln).Arrow?(le(),pe("polyline",{key:1,style:ke({stroke:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):$e("",!0)],8,jc))}}),nd={class:"vue-flow__marker vue-flow__container"},od={name:"MarkerDefinitions",compatConfig:{MODE:3}},id=me({...od,setup(e){const{id:t,edges:n,connectionLineOptions:o,defaultMarkerColor:i}=ye(),r=oe(()=>{const s=new Set,a=[],l=c=>{if(c){const u=$t(c,t);s.has(u)||(typeof c=="object"?a.push({...c,id:u,color:c.color||i.value}):a.push({id:u,color:i.value,type:c}),s.add(u))}};for(const c of[o.value.markerEnd,o.value.markerStart])l(c);for(const c of n.value)for(const u of[c.markerStart,c.markerEnd])l(u);return a.sort((c,u)=>c.id.localeCompare(u.id))});return(s,a)=>(le(),pe("svg",nd,[tt("defs",null,[(le(!0),pe(ot,null,Zn(r.value,l=>(le(),nt(td,{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))])]))}}),rd={name:"Edges",compatConfig:{MODE:3}},sd=me({...rd,setup(e){const{findNode:t,getEdges:n,elevateEdgesOnSelect:o}=ye();return(i,r)=>(le(),pe(ot,null,[ze(id),(le(!0),pe(ot,null,Zn(j(n),s=>(le(),pe("svg",{key:s.id,class:"vue-flow__edges vue-flow__container",style:ke({zIndex:j(Tu)(s,j(t),j(o))})},[ze(j(Wc),{id:s.id},null,8,["id"])],4))),128)),ze(j(Qc))],64))}}),ad=me({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:c,onUpdateNodeInternals:u,getNodeTypes:h,nodeExtent:v,elevateNodesOnSelect:p,disableKeyboardA11y:S,ariaLiveMessage:y,snapToGrid:w,snapGrid:x,nodeDragThreshold:g,nodesDraggable:I,elementsSelectable:C,nodesConnectable:z,nodesFocusable:F}=ye(),R=ve(null);ht(Ji,R),ht(qi,e.id);const q=mt(gn),G=Pt(),$=tr(),{node:m,parentNode:J}=er(e.id),ne=_e(()=>typeof m.draggable>"u"?I.value:m.draggable),_=_e(()=>typeof m.selectable>"u"?C.value:m.selectable),M=_e(()=>typeof m.connectable>"u"?z.value:m.connectable),E=_e(()=>typeof m.focusable>"u"?F.value:m.focusable),k=_e(()=>!!m.dimensions.width&&!!m.dimensions.height),P=oe(()=>{const d=m.type||"default",N=q==null?void 0:q[`node-${d}`];if(N)return N;let b=m.template||h.value[d];if(typeof b=="string"&&G){const A=Object.keys(G.appContext.components);A&&A.includes(d)&&(b=ei(d,!1))}return b&&typeof b!="string"?b:(s.error(new xe(be.NODE_TYPE_MISSING,b)),!1)}),{emit:D,on:V}=Gu(m,s),B=Qi({id:e.id,el:R,disabled:()=>!ne.value,selectable:_,dragHandle:()=>m.dragHandle,onStart(d){D.dragStart(d)},onDrag(d){D.drag(d)},onStop(d){D.dragStop(d)},onClick(d){W(d)}}),Q=oe(()=>m.class instanceof Function?m.class(m):m.class),L=oe(()=>{const d=(m.style instanceof Function?m.style(m):m.style)||{},N=m.width instanceof Function?m.width(m):m.width,b=m.height instanceof Function?m.height(m):m.height;return N&&(d.width=typeof N=="string"?N:`${N}px`),b&&(d.height=typeof b=="string"?b:`${b}px`),d}),O=_e(()=>{var d,N;return Number((N=(d=m.zIndex)!=null?d:L.value.zIndex)!=null?N:0)});return u(d=>{(d.includes(e.id)||!d.length)&&ue()}),Le(()=>{he(()=>m.hidden,(d=!1,N,b)=>{!d&&R.value&&(e.resizeObserver.observe(R.value),b(()=>{R.value&&e.resizeObserver.unobserve(R.value)}))},{immediate:!0,flush:"post"})}),he([()=>m.type,()=>m.sourcePosition,()=>m.targetPosition],()=>{Re(()=>{c([{id:e.id,nodeElement:R.value,forceUpdate:!0}])})}),he([()=>m.position.x,()=>m.position.y,()=>{var d;return(d=J.value)==null?void 0:d.computedPosition.x},()=>{var d;return(d=J.value)==null?void 0:d.computedPosition.y},()=>{var d;return(d=J.value)==null?void 0:d.computedPosition.z},O,()=>m.selected,()=>m.dimensions.height,()=>m.dimensions.width,()=>{var d;return(d=J.value)==null?void 0:d.dimensions.height},()=>{var d;return(d=J.value)==null?void 0:d.dimensions.width}],([d,N,b,A,Y,Z])=>{const T={x:d,y:N,z:Z+(p.value&&m.selected?1e3:0)};typeof b<"u"&&typeof A<"u"?m.computedPosition=Su({x:b,y:A,z:Y},T):m.computedPosition=T},{flush:"post",immediate:!0}),he([()=>m.extent,v],([d,N],[b,A])=>{(d!==b||N!==A)&&U()}),m.extent==="parent"||typeof m.extent=="object"&&"range"in m.extent&&m.extent.range==="parent"?Pn(()=>k).toBe(!0).then(U):U(),()=>{var d,N;return m.hidden?null:ge("div",{ref:R,"data-id":m.id,class:["vue-flow__node",`vue-flow__node-${P.value===!1?"default":m.type||"default"}`,{[n.value]:ne.value,dragging:B==null?void 0:B.value,draggable:ne.value,selected:m.selected,selectable:_.value,parent:m.isParent},Q.value],style:{visibility:k.value?"visible":"hidden",zIndex:(d=m.computedPosition.z)!=null?d:O.value,transform:`translate(${m.computedPosition.x}px,${m.computedPosition.y}px)`,pointerEvents:_.value||ne.value?"all":"none",...L.value},tabIndex:E.value?0:void 0,role:E.value?"button":void 0,"aria-describedby":S.value?void 0:`${Pi}-${t}`,"aria-label":m.ariaLabel,onMouseenter:se,onMousemove:ce,onMouseleave:te,onContextmenu:ie,onClick:W,onDblclick:X,onKeydown:f},[ge(P.value===!1?h.value.default:P.value,{id:m.id,type:m.type,data:m.data,events:{...m.events,...V},selected:m.selected,resizing:m.resizing,dragging:B.value,connectable:M.value,position:m.computedPosition,dimensions:m.dimensions,isValidTargetPos:m.isValidTargetPos,isValidSourcePos:m.isValidSourcePos,parent:m.parentNode,parentNodeId:m.parentNode,zIndex:(N=m.computedPosition.z)!=null?N:O.value,targetPosition:m.targetPosition,sourcePosition:m.sourcePosition,label:m.label,dragHandle:m.dragHandle,onUpdateNodeInternals:ue})])};function U(){const d=m.computedPosition;w.value&&(d.x=x.value[0]*Math.round(d.x/x.value[0]),d.y=x.value[1]*Math.round(d.y/x.value[1]));const{computedPosition:N,position:b}=no(m,d,s.error,v.value,J.value);(m.computedPosition.x!==N.x||m.computedPosition.y!==N.y)&&(m.computedPosition={...m.computedPosition,...N}),(m.position.x!==b.x||m.position.y!==b.y)&&(m.position=b)}function ue(){R.value&&c([{id:e.id,nodeElement:R.value,forceUpdate:!0}])}function se(d){B!=null&&B.value||D.mouseEnter({event:d,node:m})}function ce(d){B!=null&&B.value||D.mouseMove({event:d,node:m})}function te(d){B!=null&&B.value||D.mouseLeave({event:d,node:m})}function ie(d){return D.contextMenu({event:d,node:m})}function X(d){return D.doubleClick({event:d,node:m})}function W(d){_.value&&(!o.value||!ne.value||g.value>0)&&Xn(m,r.value,l,a,i,!1,R.value),D.click({event:d,node:m})}function f(d){if(!(Fn(d)||S.value))if(Ai.includes(d.key)&&_.value){const N=d.key==="Escape";Xn(m,r.value,l,a,i,N,R.value)}else ne.value&&m.selected&&ft[d.key]&&(y.value=`Moved selected node ${d.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~m.position.x}, y: ${~~m.position.y}`,$({x:ft[d.key].x,y:ft[d.key].y},d.shiftKey))}}}),ld=ad,ud={height:"0",width:"0"},cd={name:"EdgeLabelRenderer",compatConfig:{MODE:3}},bd=me({...cd,setup(e){const{viewportRef:t}=ye(),n=_e(()=>{var o;return(o=t.value)==null?void 0:o.getElementsByClassName("vue-flow__edge-labels")[0]});return(o,i)=>(le(),pe("svg",null,[(le(),pe("foreignObject",ud,[(le(),nt(vr,{to:n.value,disabled:!n.value},[Ve(o.$slots,"default")],8,["to","disabled"]))]))]))}});function dd(e={includeHiddenNodes:!1}){const{nodes:t}=ye();return oe(()=>{if(t.value.length===0)return!1;for(const n of t.value)if((e.includeHiddenNodes||!n.hidden)&&((n==null?void 0:n.handleBounds)===void 0||n.dimensions.width===0||n.dimensions.height===0))return!1;return!0})}const fd={class:"vue-flow__nodes vue-flow__container"},hd={name:"Nodes",compatConfig:{MODE:3}},gd=me({...hd,setup(e){const{getNodes:t,updateNodeDimensions:n,emits:o}=ye(),i=dd(),r=ve();return he(i,s=>{s&&Re(()=>{o.nodesInitialized(t.value)})},{immediate:!0}),Le(()=>{r.value=new ResizeObserver(s=>{const a=s.map(l=>({id:l.target.getAttribute("data-id"),nodeElement:l.target,forceUpdate:!0}));Re(()=>n(a))})}),ti(()=>{var s;return(s=r.value)==null?void 0:s.disconnect()}),(s,a)=>(le(),pe("div",fd,[r.value?(le(!0),pe(ot,{key:0},Zn(j(t),(l,c,u,h)=>{const v=[l.id];if(h&&h.key===l.id&&pr(h,v))return h;const p=(le(),nt(j(ld),{id:l.id,key:l.id,"resize-observer":r.value},null,8,["id","resize-observer"]));return p.memo=v,p},a,0),128)):$e("",!0)]))}});function vd(){const{emits:e}=ye();Le(()=>{if(Wi()){const t=document.querySelector(".vue-flow__pane");t&&window.getComputedStyle(t).zIndex!=="1"&&e.error(new xe(be.MISSING_STYLES))}})}const pd=tt("div",{class:"vue-flow__edge-labels"},null,-1),md={name:"VueFlow",compatConfig:{MODE:3}},xd=me({...md,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:{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","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneReady","init","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","updateNodeInternals","error","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdate","edgeUpdateEnd","nodeDoubleClick","nodeClick","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeContextMenu","nodeDragStart","nodeDrag","nodeDragStop","update:modelValue","update:nodes","update:edges"],setup(e,{expose:t,emit:n}){const o=e,i=dr(),r=_n(o,"modelValue",n),s=_n(o,"nodes",n),a=_n(o,"edges",n),l=ye(o),c=Zu({modelValue:r,nodes:s,edges:a},o,l);return Wu(n,l.hooks),Xc(),vd(),ht(gn,i),Jo(()=>{c()}),t(l),(u,h)=>(le(),pe("div",{ref:j(l).vueFlowRef,class:"vue-flow"},[ze(Vc,null,{default:Tn(()=>[ze(sd),pd,ze(gd),Ve(u.$slots,"zoom-pane")]),_:3}),Ve(u.$slots,"default"),ze(Gc)],512))}}),yd={name:"Panel",compatConfig:{MODE:3}},Sd=me({...yd,props:{position:{}},setup(e){const t=e,{userSelectionActive:n}=ye(),o=oe(()=>`${t.position}`.split("-"));return(i,r)=>(le(),pe("div",{class:et(["vue-flow__panel",o.value]),style:ke({pointerEvents:j(n)?"none":"all"})},[Ve(i.$slots,"default")],6))}});export{Ln as M,qi as N,hu as P,Sd as _,yn as a,bd as b,K as c,Fi as d,xd as e,sn as f,gc as g,wd as h,Gi as i,ye as u};
22
- //# sourceMappingURL=vue-flow-core.0de753a6.js.map
22
+ //# sourceMappingURL=vue-flow-core.d96b7b33.js.map