mage-ai 0.9.70__py3-none-any.whl → 0.9.71__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.

Potentially problematic release.


This version of mage-ai might be problematic. Click here for more details.

Files changed (568) hide show
  1. mage_ai/ai/utils/xgboost.py +222 -0
  2. mage_ai/api/errors.py +37 -25
  3. mage_ai/api/operations/base.py +13 -1
  4. mage_ai/api/parsers/PipelineScheduleParser.py +1 -1
  5. mage_ai/api/policies/BlockOutputPolicy.py +40 -17
  6. mage_ai/api/policies/GlobalDataProductPolicy.py +91 -41
  7. mage_ai/api/policies/KernelPolicy.py +55 -32
  8. mage_ai/api/policies/KernelProcessPolicy.py +56 -0
  9. mage_ai/api/policies/OutputPolicy.py +73 -41
  10. mage_ai/api/policies/PipelinePolicy.py +206 -138
  11. mage_ai/api/presenters/BlockLayoutItemPresenter.py +9 -7
  12. mage_ai/api/presenters/BlockPresenter.py +1 -1
  13. mage_ai/api/presenters/GlobalDataProductPresenter.py +6 -1
  14. mage_ai/api/presenters/KernelPresenter.py +5 -26
  15. mage_ai/api/presenters/KernelProcessPresenter.py +28 -0
  16. mage_ai/api/presenters/PipelinePresenter.py +18 -5
  17. mage_ai/api/presenters/StatusPresenter.py +2 -0
  18. mage_ai/api/presenters/SyncPresenter.py +25 -0
  19. mage_ai/api/resources/AutocompleteItemResource.py +1 -1
  20. mage_ai/api/resources/BlockLayoutItemResource.py +90 -44
  21. mage_ai/api/resources/BlockOutputResource.py +42 -9
  22. mage_ai/api/resources/BlockResource.py +4 -3
  23. mage_ai/api/resources/BlockRunResource.py +27 -22
  24. mage_ai/api/resources/ClusterResource.py +4 -1
  25. mage_ai/api/resources/CustomTemplateResource.py +34 -14
  26. mage_ai/api/resources/DataProviderResource.py +1 -1
  27. mage_ai/api/resources/ExecutionStateResource.py +3 -1
  28. mage_ai/api/resources/FileContentResource.py +8 -2
  29. mage_ai/api/resources/FileResource.py +10 -4
  30. mage_ai/api/resources/FileVersionResource.py +3 -1
  31. mage_ai/api/resources/GitBranchResource.py +46 -9
  32. mage_ai/api/resources/GlobalDataProductResource.py +44 -7
  33. mage_ai/api/resources/GlobalHookResource.py +4 -1
  34. mage_ai/api/resources/IntegrationDestinationResource.py +6 -2
  35. mage_ai/api/resources/IntegrationSourceResource.py +8 -4
  36. mage_ai/api/resources/IntegrationSourceStreamResource.py +6 -2
  37. mage_ai/api/resources/KernelProcessResource.py +44 -0
  38. mage_ai/api/resources/KernelResource.py +25 -3
  39. mage_ai/api/resources/OutputResource.py +33 -11
  40. mage_ai/api/resources/PageBlockLayoutResource.py +34 -23
  41. mage_ai/api/resources/PipelineInteractionResource.py +31 -15
  42. mage_ai/api/resources/PipelineResource.py +250 -123
  43. mage_ai/api/resources/PipelineRunResource.py +11 -3
  44. mage_ai/api/resources/PipelineScheduleResource.py +7 -2
  45. mage_ai/api/resources/PipelineTriggerResource.py +6 -1
  46. mage_ai/api/resources/ProjectResource.py +18 -7
  47. mage_ai/api/resources/SecretResource.py +1 -1
  48. mage_ai/api/resources/SeedResource.py +8 -1
  49. mage_ai/api/resources/StatusResource.py +21 -6
  50. mage_ai/api/resources/SyncResource.py +6 -8
  51. mage_ai/api/resources/VariableResource.py +46 -26
  52. mage_ai/api/resources/VersionControlProjectResource.py +9 -2
  53. mage_ai/api/resources/WidgetResource.py +1 -1
  54. mage_ai/api/resources/WorkspaceResource.py +1 -1
  55. mage_ai/api/views.py +47 -40
  56. mage_ai/authentication/permissions/seed.py +16 -2
  57. mage_ai/authentication/providers/oidc.py +21 -1
  58. mage_ai/autocomplete/utils.py +13 -9
  59. mage_ai/cache/base.py +1 -1
  60. mage_ai/cache/block.py +18 -12
  61. mage_ai/cache/block_action_object/__init__.py +32 -4
  62. mage_ai/cache/file.py +22 -19
  63. mage_ai/cache/pipeline.py +18 -12
  64. mage_ai/cli/main.py +1 -0
  65. mage_ai/cluster_manager/aws/emr_cluster_manager.py +9 -5
  66. mage_ai/cluster_manager/config.py +2 -2
  67. mage_ai/cluster_manager/manage.py +1 -1
  68. mage_ai/cluster_manager/workspace/base.py +1 -1
  69. mage_ai/command_center/applications/factory.py +10 -7
  70. mage_ai/command_center/files/factory.py +17 -15
  71. mage_ai/command_center/utils.py +25 -13
  72. mage_ai/data/__init__.py +0 -0
  73. mage_ai/data/constants.py +45 -0
  74. mage_ai/data/models/__init__.py +0 -0
  75. mage_ai/data/models/base.py +119 -0
  76. mage_ai/data/models/constants.py +1 -0
  77. mage_ai/data/models/generator.py +115 -0
  78. mage_ai/data/models/manager.py +168 -0
  79. mage_ai/data/models/pyarrow/__init__.py +0 -0
  80. mage_ai/data/models/pyarrow/record_batch.py +55 -0
  81. mage_ai/data/models/pyarrow/shared.py +21 -0
  82. mage_ai/data/models/pyarrow/table.py +8 -0
  83. mage_ai/data/models/reader.py +103 -0
  84. mage_ai/data/models/utils.py +59 -0
  85. mage_ai/data/models/writer.py +91 -0
  86. mage_ai/data/tabular/__init__.py +0 -0
  87. mage_ai/data/tabular/constants.py +23 -0
  88. mage_ai/data/tabular/mocks.py +19 -0
  89. mage_ai/data/tabular/models.py +126 -0
  90. mage_ai/data/tabular/reader.py +602 -0
  91. mage_ai/data/tabular/utils.py +102 -0
  92. mage_ai/data/tabular/writer.py +266 -0
  93. mage_ai/data/variables/__init__.py +0 -0
  94. mage_ai/data/variables/wrapper.py +54 -0
  95. mage_ai/data_cleaner/analysis/charts.py +61 -39
  96. mage_ai/data_cleaner/column_types/column_type_detector.py +53 -31
  97. mage_ai/data_cleaner/estimators/encoders.py +5 -2
  98. mage_ai/data_integrations/utils/scheduler.py +16 -11
  99. mage_ai/data_preparation/decorators.py +1 -0
  100. mage_ai/data_preparation/executors/block_executor.py +237 -155
  101. mage_ai/data_preparation/executors/streaming_pipeline_executor.py +1 -1
  102. mage_ai/data_preparation/git/__init__.py +27 -7
  103. mage_ai/data_preparation/git/api.py +7 -1
  104. mage_ai/data_preparation/git/utils.py +22 -16
  105. mage_ai/data_preparation/logging/logger_manager.py +4 -3
  106. mage_ai/data_preparation/models/block/__init__.py +1542 -878
  107. mage_ai/data_preparation/models/block/data_integration/mixins.py +4 -3
  108. mage_ai/data_preparation/models/block/dynamic/__init__.py +17 -6
  109. mage_ai/data_preparation/models/block/dynamic/child.py +41 -102
  110. mage_ai/data_preparation/models/block/dynamic/constants.py +1 -0
  111. mage_ai/data_preparation/models/block/dynamic/counter.py +296 -0
  112. mage_ai/data_preparation/models/block/dynamic/data.py +16 -0
  113. mage_ai/data_preparation/models/block/dynamic/factory.py +163 -0
  114. mage_ai/data_preparation/models/block/dynamic/models.py +19 -0
  115. mage_ai/data_preparation/models/block/dynamic/shared.py +92 -0
  116. mage_ai/data_preparation/models/block/dynamic/utils.py +291 -168
  117. mage_ai/data_preparation/models/block/dynamic/variables.py +384 -144
  118. mage_ai/data_preparation/models/block/dynamic/wrappers.py +77 -0
  119. mage_ai/data_preparation/models/block/extension/utils.py +10 -1
  120. mage_ai/data_preparation/models/block/global_data_product/__init__.py +10 -1
  121. mage_ai/data_preparation/models/block/integration/__init__.py +6 -2
  122. mage_ai/data_preparation/models/block/outputs.py +722 -0
  123. mage_ai/data_preparation/models/block/platform/mixins.py +7 -8
  124. mage_ai/data_preparation/models/block/r/__init__.py +56 -38
  125. mage_ai/data_preparation/models/block/settings/__init__.py +0 -0
  126. mage_ai/data_preparation/models/block/settings/dynamic/__init__.py +0 -0
  127. mage_ai/data_preparation/models/block/settings/dynamic/constants.py +7 -0
  128. mage_ai/data_preparation/models/block/settings/dynamic/mixins.py +118 -0
  129. mage_ai/data_preparation/models/block/settings/dynamic/models.py +31 -0
  130. mage_ai/data_preparation/models/block/settings/global_data_products/__init__.py +0 -0
  131. mage_ai/data_preparation/models/block/settings/global_data_products/mixins.py +20 -0
  132. mage_ai/data_preparation/models/block/settings/global_data_products/models.py +46 -0
  133. mage_ai/data_preparation/models/block/settings/variables/__init__.py +0 -0
  134. mage_ai/data_preparation/models/block/settings/variables/mixins.py +74 -0
  135. mage_ai/data_preparation/models/block/settings/variables/models.py +49 -0
  136. mage_ai/data_preparation/models/block/spark/mixins.py +2 -1
  137. mage_ai/data_preparation/models/block/sql/__init__.py +30 -5
  138. mage_ai/data_preparation/models/block/sql/utils/shared.py +21 -3
  139. mage_ai/data_preparation/models/block/utils.py +127 -70
  140. mage_ai/data_preparation/models/constants.py +19 -14
  141. mage_ai/data_preparation/models/custom_templates/custom_block_template.py +18 -13
  142. mage_ai/data_preparation/models/custom_templates/custom_pipeline_template.py +33 -16
  143. mage_ai/data_preparation/models/custom_templates/utils.py +1 -1
  144. mage_ai/data_preparation/models/file.py +41 -28
  145. mage_ai/data_preparation/models/global_data_product/__init__.py +88 -58
  146. mage_ai/data_preparation/models/global_hooks/models.py +1 -0
  147. mage_ai/data_preparation/models/interfaces.py +29 -0
  148. mage_ai/data_preparation/models/pipeline.py +365 -180
  149. mage_ai/data_preparation/models/pipelines/integration_pipeline.py +1 -2
  150. mage_ai/data_preparation/models/pipelines/seed.py +1 -1
  151. mage_ai/data_preparation/models/project/__init__.py +66 -18
  152. mage_ai/data_preparation/models/project/constants.py +2 -0
  153. mage_ai/data_preparation/models/triggers/__init__.py +120 -24
  154. mage_ai/data_preparation/models/utils.py +467 -17
  155. mage_ai/data_preparation/models/variable.py +1028 -137
  156. mage_ai/data_preparation/models/variables/__init__.py +0 -0
  157. mage_ai/data_preparation/models/variables/cache.py +149 -0
  158. mage_ai/data_preparation/models/variables/constants.py +72 -0
  159. mage_ai/data_preparation/models/variables/summarizer.py +336 -0
  160. mage_ai/data_preparation/models/variables/utils.py +77 -0
  161. mage_ai/data_preparation/models/widget/__init__.py +63 -41
  162. mage_ai/data_preparation/models/widget/charts.py +40 -27
  163. mage_ai/data_preparation/models/widget/constants.py +2 -0
  164. mage_ai/data_preparation/models/widget/utils.py +3 -3
  165. mage_ai/data_preparation/preferences.py +3 -3
  166. mage_ai/data_preparation/repo_manager.py +55 -21
  167. mage_ai/data_preparation/storage/base_storage.py +2 -2
  168. mage_ai/data_preparation/storage/gcs_storage.py +7 -4
  169. mage_ai/data_preparation/storage/local_storage.py +6 -3
  170. mage_ai/data_preparation/storage/s3_storage.py +5 -2
  171. mage_ai/data_preparation/templates/data_exporters/streaming/oracledb.yaml +8 -0
  172. mage_ai/data_preparation/variable_manager.py +281 -76
  173. mage_ai/io/base.py +3 -2
  174. mage_ai/io/bigquery.py +1 -0
  175. mage_ai/io/redshift.py +7 -5
  176. mage_ai/kernels/__init__.py +0 -0
  177. mage_ai/kernels/models.py +188 -0
  178. mage_ai/kernels/utils.py +169 -0
  179. mage_ai/orchestration/concurrency.py +6 -2
  180. mage_ai/orchestration/db/__init__.py +1 -0
  181. mage_ai/orchestration/db/migrations/versions/0227396a216c_add_userproject_table.py +38 -0
  182. mage_ai/orchestration/db/models/dynamic/__init__.py +0 -0
  183. mage_ai/orchestration/db/models/dynamic/controller.py +67 -0
  184. mage_ai/orchestration/db/models/oauth.py +2 -9
  185. mage_ai/orchestration/db/models/projects.py +10 -0
  186. mage_ai/orchestration/db/models/schedules.py +204 -187
  187. mage_ai/orchestration/db/models/schedules_project_platform.py +18 -12
  188. mage_ai/orchestration/db/models/utils.py +46 -5
  189. mage_ai/orchestration/metrics/pipeline_run.py +8 -9
  190. mage_ai/orchestration/notification/sender.py +1 -0
  191. mage_ai/orchestration/pipeline_scheduler_original.py +32 -8
  192. mage_ai/orchestration/pipeline_scheduler_project_platform.py +1 -1
  193. mage_ai/orchestration/run_status_checker.py +11 -4
  194. mage_ai/orchestration/triggers/api.py +12 -1
  195. mage_ai/presenters/charts/data_sources/base.py +4 -2
  196. mage_ai/presenters/charts/data_sources/block.py +15 -9
  197. mage_ai/presenters/charts/data_sources/chart_code.py +8 -5
  198. mage_ai/presenters/charts/data_sources/constants.py +1 -0
  199. mage_ai/presenters/charts/data_sources/system_metrics.py +22 -0
  200. mage_ai/presenters/interactions/models.py +11 -7
  201. mage_ai/presenters/pages/loaders/pipelines.py +5 -3
  202. mage_ai/presenters/pages/models/page_components/pipeline_schedules.py +3 -1
  203. mage_ai/presenters/utils.py +2 -0
  204. mage_ai/server/api/blocks.py +2 -1
  205. mage_ai/server/api/downloads.py +5 -1
  206. mage_ai/server/api/triggers.py +3 -1
  207. mage_ai/server/constants.py +1 -1
  208. mage_ai/server/frontend_dist/404.html +5 -5
  209. mage_ai/server/frontend_dist/_next/static/UZLabyPgcxtZvp0O0EUUS/_buildManifest.js +1 -0
  210. mage_ai/server/frontend_dist/_next/static/chunks/1376-22de38b4ad008d8a.js +1 -0
  211. mage_ai/server/frontend_dist/_next/static/chunks/{1557-b3502f3f1aa92ac7.js → 1557-25a7d985d5564fd3.js} +1 -1
  212. mage_ai/server/frontend_dist/_next/static/chunks/1668-30b4619b9534519b.js +1 -0
  213. mage_ai/server/frontend_dist/_next/static/chunks/1799-c42db95a015689ee.js +1 -0
  214. mage_ai/server/frontend_dist/_next/static/chunks/2996-2108b53b9d371d8d.js +1 -0
  215. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3763-61b542dafdbf5754.js → frontend_dist/_next/static/chunks/3763-40780c6d1e4b261d.js} +1 -1
  216. mage_ai/server/frontend_dist/_next/static/chunks/3782-129dd2a2448a2e36.js +1 -0
  217. mage_ai/server/frontend_dist/_next/static/chunks/3958-bcdfa414ccfa1eb2.js +1 -0
  218. mage_ai/server/frontend_dist/_next/static/chunks/4168-97fd1578d1a38315.js +1 -0
  219. mage_ai/server/frontend_dist/_next/static/chunks/4982-fa5a238b139fbdd2.js +1 -0
  220. mage_ai/server/frontend_dist/_next/static/chunks/5699-176f445e1313f001.js +1 -0
  221. mage_ai/server/frontend_dist/_next/static/chunks/7162-7dd03f0f605de721.js +1 -0
  222. mage_ai/server/frontend_dist/_next/static/chunks/7779-68d2b72a90c5f925.js +1 -0
  223. mage_ai/server/frontend_dist/_next/static/chunks/7966-5446a8e43711e2f9.js +1 -0
  224. mage_ai/server/frontend_dist/_next/static/chunks/8023-6c2f172f48dcb99b.js +1 -0
  225. mage_ai/server/frontend_dist/_next/static/chunks/8095-c351b8a735d73e0c.js +1 -0
  226. mage_ai/server/frontend_dist/_next/static/chunks/{main-77fe248a6fbd12d8.js → main-b99d4e30a88d9dc7.js} +1 -1
  227. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-9fe2d9d07c94e968.js +1 -0
  228. mage_ai/server/frontend_dist/_next/static/chunks/pages/{block-layout-14f952f66964022f.js → block-layout-7f4b735c67115df5.js} +1 -1
  229. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/[...slug]-e7d48e6b0c3068ac.js +1 -0
  230. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products-b943f31f050fc3a4.js +1 -0
  231. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/overview-597b74828bf105db.js → frontend_dist/_next/static/chunks/pages/overview-9f1ac4ec003884f3.js} +1 -1
  232. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-7181b086c93784d2.js → [...slug]-7e737f6fc7e83e9b.js} +1 -1
  233. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-d94488e3f2eeef36.js +1 -0
  234. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-cc641a7fa8473796.js +1 -0
  235. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-a5c0362763a21fa8.js → block-runs-284309877f3c5a5a.js} +1 -1
  236. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-26250e5335194ade.js +1 -0
  237. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-7acc7afc00df17c2.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-5f4c8128b2413fd8.js} +1 -1
  238. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-4ebfc8e400315dda.js +1 -0
  239. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-e5e0150a256aadb3.js +1 -0
  240. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/{profile-3f0df3decc856ee9.js → profile-3ae43c932537b254.js} +1 -1
  241. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-32985f3f7c7dd3ab.js → frontend_dist/_next/static/chunks/pages/settings/platform/preferences-b603d7fe4b175256.js} +1 -1
  242. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js → frontend_dist/_next/static/chunks/pages/settings/platform/settings-319ddbabc239e91b.js} +1 -1
  243. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-47b64ced27c24985.js → [...slug]-5c360f72e4498855.js} +1 -1
  244. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{permissions-e5a4d3d815cec25d.js → permissions-fb29fa6c2bd90bb0.js} +1 -1
  245. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-3b76fa959ffa09d3.js +1 -0
  246. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-379e1ee292504842.js → [...slug]-3b787b42f1093b1f.js} +1 -1
  247. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles-0b83fbdd39e85f5b.js +1 -0
  248. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-a1e6950974d643a8.js +1 -0
  249. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-2af9afbe727d88aa.js → [...slug]-0aa019d87db8b0b8.js} +1 -1
  250. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-a4db8710f703c729.js → users-88c694d19207f2ec.js} +1 -1
  251. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-31d0d50f7f30462b.js +1 -0
  252. mage_ai/server/frontend_dist/_next/static/chunks/{webpack-d079359c241db804.js → webpack-ac7fdc472bedf682.js} +1 -1
  253. mage_ai/server/frontend_dist/block-layout.html +3 -3
  254. mage_ai/server/frontend_dist/compute.html +6 -6
  255. mage_ai/server/frontend_dist/files.html +6 -6
  256. mage_ai/server/frontend_dist/global-data-products/[...slug].html +6 -6
  257. mage_ai/server/frontend_dist/global-data-products.html +6 -6
  258. mage_ai/server/frontend_dist/global-hooks/[...slug].html +6 -6
  259. mage_ai/server/frontend_dist/global-hooks.html +6 -6
  260. mage_ai/server/frontend_dist/index.html +3 -3
  261. mage_ai/server/frontend_dist/manage/files.html +6 -6
  262. mage_ai/server/frontend_dist/manage/settings.html +6 -6
  263. mage_ai/server/frontend_dist/manage/users/[user].html +6 -6
  264. mage_ai/server/frontend_dist/manage/users/new.html +6 -6
  265. mage_ai/server/frontend_dist/manage/users.html +6 -6
  266. mage_ai/server/frontend_dist/manage.html +6 -6
  267. mage_ai/server/frontend_dist/oauth.html +5 -5
  268. mage_ai/server/frontend_dist/overview.html +6 -6
  269. mage_ai/server/frontend_dist/pipeline-runs.html +6 -6
  270. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +6 -6
  271. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +6 -6
  272. mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +6 -6
  273. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +3 -3
  274. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +6 -6
  275. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +6 -6
  276. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
  277. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +6 -6
  278. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +6 -6
  279. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +6 -6
  280. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +6 -6
  281. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +6 -6
  282. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +6 -6
  283. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +6 -6
  284. mage_ai/server/frontend_dist/pipelines/[pipeline].html +3 -3
  285. mage_ai/server/frontend_dist/pipelines.html +6 -6
  286. mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +6 -6
  287. mage_ai/server/frontend_dist/platform/global-hooks.html +6 -6
  288. mage_ai/server/frontend_dist/settings/account/profile.html +6 -6
  289. mage_ai/server/frontend_dist/settings/platform/preferences.html +6 -6
  290. mage_ai/server/frontend_dist/settings/platform/settings.html +6 -6
  291. mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +6 -6
  292. mage_ai/server/frontend_dist/settings/workspace/permissions.html +6 -6
  293. mage_ai/server/frontend_dist/settings/workspace/preferences.html +6 -6
  294. mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +6 -6
  295. mage_ai/server/frontend_dist/settings/workspace/roles.html +6 -6
  296. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +6 -6
  297. mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +6 -6
  298. mage_ai/server/frontend_dist/settings/workspace/users.html +6 -6
  299. mage_ai/server/frontend_dist/settings.html +3 -3
  300. mage_ai/server/frontend_dist/sign-in.html +12 -12
  301. mage_ai/server/frontend_dist/templates/[...slug].html +6 -6
  302. mage_ai/server/frontend_dist/templates.html +6 -6
  303. mage_ai/server/frontend_dist/terminal.html +6 -6
  304. mage_ai/server/frontend_dist/test.html +3 -3
  305. mage_ai/server/frontend_dist/triggers.html +6 -6
  306. mage_ai/server/frontend_dist/version-control.html +6 -6
  307. mage_ai/server/frontend_dist_base_path_template/404.html +5 -5
  308. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1376-22de38b4ad008d8a.js +1 -0
  309. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1557-b3502f3f1aa92ac7.js → 1557-25a7d985d5564fd3.js} +1 -1
  310. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1668-30b4619b9534519b.js +1 -0
  311. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1799-c42db95a015689ee.js +1 -0
  312. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2996-2108b53b9d371d8d.js +1 -0
  313. mage_ai/server/{frontend_dist/_next/static/chunks/3763-61b542dafdbf5754.js → frontend_dist_base_path_template/_next/static/chunks/3763-40780c6d1e4b261d.js} +1 -1
  314. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-129dd2a2448a2e36.js +1 -0
  315. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3958-bcdfa414ccfa1eb2.js +1 -0
  316. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4168-97fd1578d1a38315.js +1 -0
  317. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4982-fa5a238b139fbdd2.js +1 -0
  318. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-176f445e1313f001.js +1 -0
  319. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7162-7dd03f0f605de721.js +1 -0
  320. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7779-68d2b72a90c5f925.js +1 -0
  321. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-5446a8e43711e2f9.js +1 -0
  322. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8023-6c2f172f48dcb99b.js +1 -0
  323. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8095-c351b8a735d73e0c.js +1 -0
  324. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{main-70b78159c2bb3fe1.js → main-384298e9133cec76.js} +1 -1
  325. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-13a578bce3b7f30c.js +1 -0
  326. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{block-layout-14f952f66964022f.js → block-layout-7f4b735c67115df5.js} +1 -1
  327. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/[...slug]-e7d48e6b0c3068ac.js +1 -0
  328. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products-b943f31f050fc3a4.js +1 -0
  329. mage_ai/server/{frontend_dist/_next/static/chunks/pages/overview-597b74828bf105db.js → frontend_dist_base_path_template/_next/static/chunks/pages/overview-9f1ac4ec003884f3.js} +1 -1
  330. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-7181b086c93784d2.js → [...slug]-7e737f6fc7e83e9b.js} +1 -1
  331. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-d94488e3f2eeef36.js +1 -0
  332. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-cc641a7fa8473796.js +1 -0
  333. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-a5c0362763a21fa8.js → block-runs-284309877f3c5a5a.js} +1 -1
  334. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-26250e5335194ade.js +1 -0
  335. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-7acc7afc00df17c2.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-5f4c8128b2413fd8.js} +1 -1
  336. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-4ebfc8e400315dda.js +1 -0
  337. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-e5e0150a256aadb3.js +1 -0
  338. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/{profile-3f0df3decc856ee9.js → profile-3ae43c932537b254.js} +1 -1
  339. mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/platform/preferences-32985f3f7c7dd3ab.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-b603d7fe4b175256.js} +1 -1
  340. mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-319ddbabc239e91b.js} +1 -1
  341. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-47b64ced27c24985.js → [...slug]-5c360f72e4498855.js} +1 -1
  342. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{permissions-e5a4d3d815cec25d.js → permissions-fb29fa6c2bd90bb0.js} +1 -1
  343. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-3b76fa959ffa09d3.js +1 -0
  344. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-379e1ee292504842.js → [...slug]-3b787b42f1093b1f.js} +1 -1
  345. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles-0b83fbdd39e85f5b.js +1 -0
  346. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-a1e6950974d643a8.js +1 -0
  347. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-2af9afbe727d88aa.js → [...slug]-0aa019d87db8b0b8.js} +1 -1
  348. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-a4db8710f703c729.js → users-88c694d19207f2ec.js} +1 -1
  349. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-31d0d50f7f30462b.js +1 -0
  350. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{webpack-68c003fb6a175cd7.js → webpack-481689d9989710cd.js} +1 -1
  351. mage_ai/server/frontend_dist_base_path_template/_next/static/kcptwoOU-JJJg6Vwpkfmx/_buildManifest.js +1 -0
  352. mage_ai/server/frontend_dist_base_path_template/block-layout.html +3 -3
  353. mage_ai/server/frontend_dist_base_path_template/compute.html +6 -6
  354. mage_ai/server/frontend_dist_base_path_template/files.html +6 -6
  355. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +6 -6
  356. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +6 -6
  357. mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +6 -6
  358. mage_ai/server/frontend_dist_base_path_template/global-hooks.html +6 -6
  359. mage_ai/server/frontend_dist_base_path_template/index.html +3 -3
  360. mage_ai/server/frontend_dist_base_path_template/manage/files.html +6 -6
  361. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +6 -6
  362. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +6 -6
  363. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +6 -6
  364. mage_ai/server/frontend_dist_base_path_template/manage/users.html +6 -6
  365. mage_ai/server/frontend_dist_base_path_template/manage.html +6 -6
  366. mage_ai/server/frontend_dist_base_path_template/oauth.html +5 -5
  367. mage_ai/server/frontend_dist_base_path_template/overview.html +6 -6
  368. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +6 -6
  369. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +6 -6
  370. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +6 -6
  371. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +6 -6
  372. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +3 -3
  373. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +6 -6
  374. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +6 -6
  375. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
  376. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +6 -6
  377. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +6 -6
  378. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +6 -6
  379. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +6 -6
  380. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +6 -6
  381. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +6 -6
  382. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +6 -6
  383. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +3 -3
  384. mage_ai/server/frontend_dist_base_path_template/pipelines.html +6 -6
  385. mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +6 -6
  386. mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +6 -6
  387. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +6 -6
  388. mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +6 -6
  389. mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +6 -6
  390. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +6 -6
  391. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +6 -6
  392. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +6 -6
  393. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +6 -6
  394. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +6 -6
  395. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +6 -6
  396. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +6 -6
  397. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +6 -6
  398. mage_ai/server/frontend_dist_base_path_template/settings.html +3 -3
  399. mage_ai/server/frontend_dist_base_path_template/sign-in.html +12 -12
  400. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +6 -6
  401. mage_ai/server/frontend_dist_base_path_template/templates.html +6 -6
  402. mage_ai/server/frontend_dist_base_path_template/terminal.html +6 -6
  403. mage_ai/server/frontend_dist_base_path_template/test.html +3 -3
  404. mage_ai/server/frontend_dist_base_path_template/triggers.html +6 -6
  405. mage_ai/server/frontend_dist_base_path_template/version-control.html +6 -6
  406. mage_ai/server/kernel_output_parser.py +4 -1
  407. mage_ai/server/scheduler_manager.py +9 -0
  408. mage_ai/server/server.py +35 -31
  409. mage_ai/server/utils/custom_output.py +284 -0
  410. mage_ai/server/utils/execute_custom_code.py +245 -0
  411. mage_ai/server/utils/output_display.py +123 -289
  412. mage_ai/server/websocket_server.py +116 -69
  413. mage_ai/services/k8s/config.py +23 -0
  414. mage_ai/services/k8s/job_manager.py +6 -1
  415. mage_ai/services/ssh/aws/emr/utils.py +8 -8
  416. mage_ai/settings/keys/auth.py +1 -0
  417. mage_ai/settings/platform/__init__.py +159 -38
  418. mage_ai/settings/platform/constants.py +5 -0
  419. mage_ai/settings/platform/utils.py +53 -10
  420. mage_ai/settings/repo.py +26 -12
  421. mage_ai/settings/server.py +128 -37
  422. mage_ai/shared/array.py +24 -1
  423. mage_ai/shared/complex.py +45 -0
  424. mage_ai/shared/config.py +2 -1
  425. mage_ai/shared/custom_logger.py +11 -0
  426. mage_ai/shared/dates.py +10 -6
  427. mage_ai/shared/files.py +63 -8
  428. mage_ai/shared/hash.py +33 -9
  429. mage_ai/shared/io.py +9 -5
  430. mage_ai/shared/models.py +82 -24
  431. mage_ai/shared/outputs.py +87 -0
  432. mage_ai/shared/parsers.py +141 -15
  433. mage_ai/shared/path_fixer.py +11 -7
  434. mage_ai/shared/singletons/__init__.py +0 -0
  435. mage_ai/shared/singletons/base.py +47 -0
  436. mage_ai/shared/singletons/memory.py +38 -0
  437. mage_ai/shared/strings.py +34 -1
  438. mage_ai/shared/yaml.py +24 -0
  439. mage_ai/streaming/sinks/oracledb.py +57 -0
  440. mage_ai/streaming/sinks/sink_factory.py +4 -0
  441. mage_ai/system/__init__.py +0 -0
  442. mage_ai/system/constants.py +14 -0
  443. mage_ai/system/memory/__init__.py +0 -0
  444. mage_ai/system/memory/constants.py +1 -0
  445. mage_ai/system/memory/manager.py +174 -0
  446. mage_ai/system/memory/presenters.py +158 -0
  447. mage_ai/system/memory/process.py +216 -0
  448. mage_ai/system/memory/samples.py +13 -0
  449. mage_ai/system/memory/utils.py +656 -0
  450. mage_ai/system/memory/wrappers.py +177 -0
  451. mage_ai/system/models.py +58 -0
  452. mage_ai/system/storage/__init__.py +0 -0
  453. mage_ai/system/storage/utils.py +29 -0
  454. mage_ai/tests/api/endpoints/mixins.py +2 -2
  455. mage_ai/tests/api/endpoints/test_blocks.py +2 -1
  456. mage_ai/tests/api/endpoints/test_custom_designs.py +4 -4
  457. mage_ai/tests/api/endpoints/test_pipeline_runs.py +2 -2
  458. mage_ai/tests/api/endpoints/test_projects.py +2 -1
  459. mage_ai/tests/api/operations/base/test_base.py +27 -27
  460. mage_ai/tests/api/operations/base/test_base_with_user_authentication.py +27 -27
  461. mage_ai/tests/api/operations/base/test_base_with_user_permissions.py +23 -23
  462. mage_ai/tests/api/operations/test_syncs.py +6 -4
  463. mage_ai/tests/api/resources/test_pipeline_resource.py +9 -2
  464. mage_ai/tests/authentication/providers/test_oidc.py +59 -0
  465. mage_ai/tests/base_test.py +2 -2
  466. mage_ai/tests/data/__init__.py +0 -0
  467. mage_ai/tests/data/models/__init__.py +0 -0
  468. mage_ai/tests/data_preparation/executors/test_block_executor.py +23 -16
  469. mage_ai/tests/data_preparation/git/test_git.py +4 -1
  470. mage_ai/tests/data_preparation/models/block/dynamic/test_combos.py +305 -0
  471. mage_ai/tests/data_preparation/models/block/dynamic/test_counter.py +212 -0
  472. mage_ai/tests/data_preparation/models/block/dynamic/test_factory.py +360 -0
  473. mage_ai/tests/data_preparation/models/block/dynamic/test_variables.py +332 -0
  474. mage_ai/tests/data_preparation/models/block/hook/test_hook_block.py +2 -2
  475. mage_ai/tests/data_preparation/models/block/platform/test_mixins.py +1 -1
  476. mage_ai/tests/data_preparation/models/block/sql/utils/test_shared.py +26 -1
  477. mage_ai/tests/data_preparation/models/block/test_global_data_product.py +3 -2
  478. mage_ai/tests/data_preparation/models/custom_templates/test_utils.py +5 -4
  479. mage_ai/tests/data_preparation/models/global_hooks/test_hook.py +3 -0
  480. mage_ai/tests/data_preparation/models/global_hooks/test_predicates.py +9 -3
  481. mage_ai/tests/data_preparation/models/test_block.py +115 -120
  482. mage_ai/tests/data_preparation/models/test_blocks_helper.py +114 -0
  483. mage_ai/tests/data_preparation/models/test_global_data_product.py +41 -24
  484. mage_ai/tests/data_preparation/models/test_pipeline.py +9 -6
  485. mage_ai/tests/data_preparation/models/test_project.py +4 -1
  486. mage_ai/tests/data_preparation/models/test_utils.py +80 -0
  487. mage_ai/tests/data_preparation/models/test_variable.py +242 -69
  488. mage_ai/tests/data_preparation/models/variables/__init__.py +0 -0
  489. mage_ai/tests/data_preparation/models/variables/test_summarizer.py +481 -0
  490. mage_ai/tests/data_preparation/storage/shared/__init__.py +0 -0
  491. mage_ai/tests/data_preparation/test_repo_manager.py +6 -7
  492. mage_ai/tests/data_preparation/test_variable_manager.py +57 -48
  493. mage_ai/tests/factory.py +64 -43
  494. mage_ai/tests/orchestration/db/models/test_schedules.py +3 -3
  495. mage_ai/tests/orchestration/db/models/test_schedules_dynamic_blocks.py +279 -0
  496. mage_ai/tests/orchestration/test_pipeline_scheduler.py +1 -0
  497. mage_ai/tests/orchestration/triggers/test_global_data_product.py +3 -2
  498. mage_ai/tests/orchestration/triggers/test_utils.py +3 -2
  499. mage_ai/tests/services/k8s/test_job_manager.py +18 -0
  500. mage_ai/tests/streaming/sinks/test_oracledb.py +38 -0
  501. mage_ai/tests/test_shared.py +61 -0
  502. mage_ai/usage_statistics/logger.py +7 -2
  503. mage_ai/utils/code.py +33 -19
  504. {mage_ai-0.9.70.dist-info → mage_ai-0.9.71.dist-info}/METADATA +5 -2
  505. {mage_ai-0.9.70.dist-info → mage_ai-0.9.71.dist-info}/RECORD +513 -417
  506. mage_ai/data_preparation/models/global_data_product/constants.py +0 -6
  507. mage_ai/server/frontend_dist/_next/static/RhDiJSkcjCsh4xxX4BFBk/_buildManifest.js +0 -1
  508. mage_ai/server/frontend_dist/_next/static/chunks/2631-b9f9bea3f1cf906d.js +0 -1
  509. mage_ai/server/frontend_dist/_next/static/chunks/3782-ef4cd4f0b52072d0.js +0 -1
  510. mage_ai/server/frontend_dist/_next/static/chunks/4783-422429203610c318.js +0 -1
  511. mage_ai/server/frontend_dist/_next/static/chunks/5699-6d708c6b2153ea08.js +0 -1
  512. mage_ai/server/frontend_dist/_next/static/chunks/635-0d6b7c8804bcd2dc.js +0 -1
  513. mage_ai/server/frontend_dist/_next/static/chunks/7022-0d52dd8868621fb0.js +0 -1
  514. mage_ai/server/frontend_dist/_next/static/chunks/7361-8a23dd8360593e7a.js +0 -1
  515. mage_ai/server/frontend_dist/_next/static/chunks/7966-b9b85ba10667e654.js +0 -1
  516. mage_ai/server/frontend_dist/_next/static/chunks/8095-bdce03896ef9639a.js +0 -1
  517. mage_ai/server/frontend_dist/_next/static/chunks/8146-6bed4e7401e067e6.js +0 -1
  518. mage_ai/server/frontend_dist/_next/static/chunks/9265-d2a1aaec75ec69b8.js +0 -1
  519. mage_ai/server/frontend_dist/_next/static/chunks/9440-4069842b90d4b801.js +0 -1
  520. mage_ai/server/frontend_dist/_next/static/chunks/9832-67896490f6e8a014.js +0 -1
  521. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-2a69553d8c6eeb53.js +0 -1
  522. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/[...slug]-591abd392dc50ed4.js +0 -1
  523. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products-78e8e88f2a757a18.js +0 -1
  524. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-95ffcd3e2b27e567.js +0 -1
  525. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-b645a6d13ab9fe3a.js +0 -1
  526. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-1ed9045b2f1dfd65.js +0 -1
  527. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js +0 -1
  528. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +0 -1
  529. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-349af617d05f001b.js +0 -1
  530. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles-36fa165a48af586b.js +0 -1
  531. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-60d01d3887e31136.js +0 -1
  532. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-3433c8b22e8342aa.js +0 -1
  533. mage_ai/server/frontend_dist_base_path_template/_next/static/TdpLLFome13qvM0gXvpHs/_buildManifest.js +0 -1
  534. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2631-b9f9bea3f1cf906d.js +0 -1
  535. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-ef4cd4f0b52072d0.js +0 -1
  536. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4783-422429203610c318.js +0 -1
  537. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6d708c6b2153ea08.js +0 -1
  538. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/635-0d6b7c8804bcd2dc.js +0 -1
  539. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7022-0d52dd8868621fb0.js +0 -1
  540. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-8a23dd8360593e7a.js +0 -1
  541. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-b9b85ba10667e654.js +0 -1
  542. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8095-bdce03896ef9639a.js +0 -1
  543. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8146-6bed4e7401e067e6.js +0 -1
  544. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9265-d2a1aaec75ec69b8.js +0 -1
  545. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9440-4069842b90d4b801.js +0 -1
  546. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9832-67896490f6e8a014.js +0 -1
  547. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-2a69553d8c6eeb53.js +0 -1
  548. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/[...slug]-591abd392dc50ed4.js +0 -1
  549. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products-78e8e88f2a757a18.js +0 -1
  550. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-95ffcd3e2b27e567.js +0 -1
  551. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-b645a6d13ab9fe3a.js +0 -1
  552. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-1ed9045b2f1dfd65.js +0 -1
  553. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js +0 -1
  554. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +0 -1
  555. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-349af617d05f001b.js +0 -1
  556. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles-36fa165a48af586b.js +0 -1
  557. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-60d01d3887e31136.js +0 -1
  558. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-3433c8b22e8342aa.js +0 -1
  559. mage_ai/shared/memory.py +0 -90
  560. mage_ai/tests/data_preparation/models/block/dynamic/test_dynamic_helpers.py +0 -48
  561. /mage_ai/{tests/data_preparation/shared → ai/utils}/__init__.py +0 -0
  562. /mage_ai/server/frontend_dist/_next/static/{RhDiJSkcjCsh4xxX4BFBk → UZLabyPgcxtZvp0O0EUUS}/_ssgManifest.js +0 -0
  563. /mage_ai/server/frontend_dist_base_path_template/_next/static/{TdpLLFome13qvM0gXvpHs → kcptwoOU-JJJg6Vwpkfmx}/_ssgManifest.js +0 -0
  564. /mage_ai/tests/data_preparation/{shared → storage/shared}/test_secrets.py +0 -0
  565. {mage_ai-0.9.70.dist-info → mage_ai-0.9.71.dist-info}/LICENSE +0 -0
  566. {mage_ai-0.9.70.dist-info → mage_ai-0.9.71.dist-info}/WHEEL +0 -0
  567. {mage_ai-0.9.70.dist-info → mage_ai-0.9.71.dist-info}/entry_points.txt +0 -0
  568. {mage_ai-0.9.70.dist-info → mage_ai-0.9.71.dist-info}/top_level.txt +0 -0
@@ -37,7 +37,9 @@ class CreateWithInteractionsComponent(BaseComponent):
37
37
  if pipelines and len(pipelines) >= 1:
38
38
  pipeline = pipelines[0]
39
39
  if pipeline and pipeline.repo_config:
40
- if Project(pipeline.repo_config).is_feature_enabled(FeatureUUID.INTERACTIONS):
40
+ if Project(
41
+ repo_config=pipeline.repo_config,
42
+ ).is_feature_enabled(FeatureUUID.INTERACTIONS):
41
43
  results = await asyncio.gather(
42
44
  *[__validate_pipeline_interactions_permissions(
43
45
  pipeline,
@@ -0,0 +1,2 @@
1
+ def render_output_tags(output: str) -> str:
2
+ return f'<RenderOutput>{output}</RenderOutput>'
@@ -1,10 +1,11 @@
1
1
  from mage_ai.data_preparation.models.pipeline import Pipeline
2
2
  from mage_ai.server.api.base import BaseHandler
3
+ from mage_ai.settings.repo import get_repo_path
3
4
 
4
5
 
5
6
  class ApiPipelineBlockAnalysisHandler(BaseHandler):
6
7
  def get(self, pipeline_uuid, block_uuid):
7
- pipeline = Pipeline.get(pipeline_uuid)
8
+ pipeline = Pipeline.get(pipeline_uuid, repo_path=get_repo_path())
8
9
  block = pipeline.get_block(block_uuid)
9
10
  if block is None:
10
11
  raise Exception(f'Block {block_uuid} does not exist in pipeline {pipeline_uuid}')
@@ -22,6 +22,7 @@ class ApiDownloadHandler(BaseHandler):
22
22
 
23
23
  api_key = self.get_argument('api_key', None, True)
24
24
  token = self.get_argument('token', None, True)
25
+ user = None
25
26
  if REQUIRE_USER_AUTHENTICATION:
26
27
  authenticated = False
27
28
  if api_key and token:
@@ -30,13 +31,16 @@ class ApiDownloadHandler(BaseHandler):
30
31
  ).first()
31
32
  if oauth_client:
32
33
  oauth_token, valid = authenticate_client_and_token(oauth_client.id, token)
34
+ user = oauth_token.user
33
35
  authenticated = valid and \
34
36
  oauth_token and \
35
37
  oauth_token.user
36
38
  if not authenticated:
37
39
  raise Exception('Unauthorized access to download block output.')
38
40
 
39
- pipeline = Pipeline.get(pipeline_uuid)
41
+ repo_path = get_repo_path(user=user)
42
+
43
+ pipeline = Pipeline.get(pipeline_uuid, repo_path=repo_path)
40
44
  block = pipeline.get_block(block_uuid)
41
45
  pipeline_run_id = self.get_argument('pipeline_run_id', None)
42
46
  execution_partition = None
@@ -43,7 +43,9 @@ class ApiTriggerPipelineHandler(BaseHandler):
43
43
  continue
44
44
  payload['event_variables'][k] = v
45
45
 
46
- pipeline = Pipeline.get(pipeline_schedule.pipeline_uuid)
46
+ pipeline = Pipeline.get(
47
+ pipeline_schedule.pipeline_uuid, repo_path=pipeline_schedule.repo_path
48
+ )
47
49
  pipeline_run = create_and_start_pipeline_run(
48
50
  pipeline,
49
51
  pipeline_schedule,
@@ -12,4 +12,4 @@ DATAFRAME_OUTPUT_SAMPLE_COUNT = 10
12
12
  # Dockerfile depends on it because it runs ./scripts/install_mage.sh and uses
13
13
  # the last line to determine the version to install.
14
14
  VERSION = \
15
- '0.9.70'
15
+ '0.9.71'
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><title>Mage</title><meta content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=0" name="viewport"/><meta name="next-head-count" content="3"/><link href="/favicon.ico" rel="icon"/><link rel="preload" href="/_next/static/css/b59541b123fd7191.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b59541b123fd7191.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-d079359c241db804.js" defer=""></script><script src="/_next/static/chunks/framework-22b71764bf44ede4.js" defer=""></script><script src="/_next/static/chunks/main-77fe248a6fbd12d8.js" defer=""></script><script src="/_next/static/chunks/pages/_app-2a69553d8c6eeb53.js" defer=""></script><script src="/_next/static/chunks/pages/404-8ecd93274c427b76.js" defer=""></script><script src="/_next/static/RhDiJSkcjCsh4xxX4BFBk/_buildManifest.js" defer=""></script><script src="/_next/static/RhDiJSkcjCsh4xxX4BFBk/_ssgManifest.js" defer=""></script><style data-styled="" data-styled-version="5.3.6">html{-webkit-box-sizing:border-box;box-sizing:border-box;-ms-overflow-style:scrollbar;}/*!sc*/
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><title>Mage</title><meta content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=0" name="viewport"/><meta name="next-head-count" content="3"/><link href="/favicon.ico" rel="icon"/><link rel="preload" href="/_next/static/css/b59541b123fd7191.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b59541b123fd7191.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-ac7fdc472bedf682.js" defer=""></script><script src="/_next/static/chunks/framework-22b71764bf44ede4.js" defer=""></script><script src="/_next/static/chunks/main-b99d4e30a88d9dc7.js" defer=""></script><script src="/_next/static/chunks/pages/_app-9fe2d9d07c94e968.js" defer=""></script><script src="/_next/static/chunks/pages/404-8ecd93274c427b76.js" defer=""></script><script src="/_next/static/UZLabyPgcxtZvp0O0EUUS/_buildManifest.js" defer=""></script><script src="/_next/static/UZLabyPgcxtZvp0O0EUUS/_ssgManifest.js" defer=""></script><style data-styled="" data-styled-version="5.3.6">html{-webkit-box-sizing:border-box;box-sizing:border-box;-ms-overflow-style:scrollbar;}/*!sc*/
2
2
  *,*::before,*::after{-webkit-box-sizing:inherit;box-sizing:inherit;}/*!sc*/
3
3
  data-styled.g4[id="sc-global-czSCUT1"]{content:"sc-global-czSCUT1,"}/*!sc*/
4
4
  .cAAVhx{margin-top:16px;margin-bottom:16px;}/*!sc*/
@@ -6,9 +6,9 @@ data-styled.g7[id="Spacing__SpacingStyle-sc-1mpmtgj-0"]{content:"cAAVhx,"}/*!sc*
6
6
  .gjRqzz{margin:0;font-size:16px;line-height:22px;font-family:Roboto Regular,Helvetica Neue,Helvetica,sans-serif;color:#FFFFFF;}/*!sc*/
7
7
  data-styled.g8[id="Text__TextStyle-sc-sl5nur-0"]{content:"gjRqzz,"}/*!sc*/
8
8
  .dDWSWx{color:#FFFFFF;}/*!sc*/
9
- data-styled.g77[id="Headline__HeadlineContainerStyle-sc-12jzt2e-0"]{content:"dDWSWx,"}/*!sc*/
9
+ data-styled.g79[id="Headline__HeadlineContainerStyle-sc-12jzt2e-0"]{content:"dDWSWx,"}/*!sc*/
10
10
  .wPqQh{margin:0;font-size:14px;line-height:20px;font-family:Roboto Bold,Helvetica Neue,Helvetica,sans-serif;color:#FFFFFF;margin:0;font-family:Roboto Bold,Helvetica Neue,Helvetica,sans-serif;font-size:40px;line-height:48px;}/*!sc*/
11
- data-styled.g79[id="Headline__H1Style-sc-12jzt2e-2"]{content:"wPqQh,"}/*!sc*/
11
+ data-styled.g81[id="Headline__H1Style-sc-12jzt2e-2"]{content:"wPqQh,"}/*!sc*/
12
12
  .kOVcuR .Toastify__toast-container{margin-top:24px;padding:0 !important;width:500px !important;}/*!sc*/
13
13
  .kOVcuR .Toastify__toast{border-radius:8px !important;font-family:Greycliff Medium,Helvetica Neue,Helvetica,sans-serif !important;font-size:14px !important;line-height:20px !important;margin-bottom:0 !important;margin-left:0 !important;margin-right:0 !important;margin-top:16px !important;min-height:0 !important;padding:16px !important;}/*!sc*/
14
14
  .kOVcuR .Toastify__toast-body{margin:0 !important;}/*!sc*/
@@ -16,5 +16,5 @@ data-styled.g79[id="Headline__H1Style-sc-12jzt2e-2"]{content:"wPqQh,"}/*!sc*/
16
16
  .kOVcuR .Toastify__toast--info{background:#00A81A !important;color:#FFFFFF !important;}/*!sc*/
17
17
  .kOVcuR .Toastify__toast--success{background:#00A81A !important;color:#FFFFFF !important;}/*!sc*/
18
18
  .kOVcuR .Toastify__toast--warning{background:#DD9900 !important;color:#FFFFFF !important;}/*!sc*/
19
- data-styled.g275[id="ToastWrapper-sc-1a33ph1-0"]{content:"kOVcuR,"}/*!sc*/
20
- </style></head><body><div id="__next"><div class="" style="position:fixed;top:0;left:0;height:2px;background:transparent;z-index:99999999999;width:100%"><div class="" style="height:100%;background:#FF144D;transition:all 500ms ease;width:0%"><div style="box-shadow:0 0 10px #FF144D, 0 0 10px #FF144D;width:5%;opacity:1;position:absolute;height:100%;transition:all 500ms ease;transform:rotate(3deg) translate(0px, -4px);left:-10rem"></div></div></div><main style="align-items:center;display:flex;flex-direction:column;height:100vh;margin-top:16rem"><svg width="84.70857142857143" height="64" viewBox="0 0 20 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity="0.4" d="M15.3266 0L19.2641 1.82961e-06L11.9687 14L8.03125 14L15.3266 0Z" fill="url(#paint0_linear_1303_5)"></path><path d="M11.9692 1.82961e-06L8.03164 0L0.736328 14L4.67383 14L8.03164 7.55626V14H11.9691V8.38194e-05L11.9692 1.82961e-06Z" fill="url(#paint1_linear_1303_5)"></path><path d="M15.3269 2.57679e-06H19.2644V14H15.3269V2.57679e-06Z" fill="url(#paint2_linear_1303_5)"></path><defs><linearGradient id="paint0_linear_1303_5" x1="8.03125" y1="7" x2="19.2641" y2="7" gradientUnits="userSpaceOnUse"><stop offset="0.28125" stop-color="#7D55EC"></stop><stop offset="1" stop-color="#2AB2FE"></stop></linearGradient><linearGradient id="paint1_linear_1303_5" x1="0.736328" y1="7" x2="19.2644" y2="7" gradientUnits="userSpaceOnUse"><stop offset="0.28125" stop-color="#7D55EC"></stop><stop offset="1" stop-color="#2AB2FE"></stop></linearGradient><linearGradient id="paint2_linear_1303_5" x1="0.736328" y1="7" x2="19.2644" y2="7" gradientUnits="userSpaceOnUse"><stop offset="0.28125" stop-color="#7D55EC"></stop><stop offset="1" stop-color="#2AB2FE"></stop></linearGradient></defs></svg><div class="Spacing__SpacingStyle-sc-1mpmtgj-0 cAAVhx"><div class="Headline__HeadlineContainerStyle-sc-12jzt2e-0 dDWSWx"><h1 class="Headline__H1Style-sc-12jzt2e-2 wPqQh">404 - Page Not Found<!-- --></h1></div></div><p class="Text__TextStyle-sc-sl5nur-0 gjRqzz">You will be redirected to the Pipelines dashboard in <!-- -->5<!-- --> seconds.<!-- --></p></main><div id="command-center-root"></div><div></div><div></div><div></div><div class="ToastWrapper-sc-1a33ph1-0 kOVcuR"><div class="Toastify"></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{},"currentTheme":{"accent":{"alert":"#F6540B","blue":"#4877FF","blueLight":"rgba(72, 119, 255, 0.5)","contentDefaultTransparent":"rgba(174, 174, 174, 0.5)","cyan":"#65E3FF","cyanLight":"rgba(101, 227, 255, 0.3)","cyanTransparent":"rgba(101, 227, 255, 0.12)","dbt":"#fc6949","dbtDark":"rgba(252, 105, 73, 0.3)","dbtLight":"rgba(252, 105, 73, 0.5)","info":"#00ABFF","infoTransparent":"rgba(0, 171, 255, 0.5)","negative":"#FF1E59","negativeTransparent":"rgba(255, 30, 89, 0.3)","pink":"#FF4FF8","pinkLight":"rgb(255, 79, 248, 0.5)","positive":"#00A81A","primaryTransparent":"rgba(155, 108, 167, 0.5)","purple":"#7D55EC","purpleLight":"rgba(125, 85, 236, 0.5)","rose":"#D1A2AB","roseLight":"rgba(209, 162, 171, 0.5)","sky":"#6AA1E0","skyLight":"rgba(106, 161, 224, 0.5)","teal":"#00B4CC","tealLight":"rgba(0, 180, 204, 0.5)","warning":"#DD9900","warningTransparent":"rgba(221, 153, 0, 0.5)","yellow":"#FFCC19","yellowLight":"rgba(255, 204, 25, 0.5)"},"background":{"blackTransparent":"rgba(0, 0, 0, 0.6)","blackTransparentDark":"rgba(0, 0, 0, 0.8)","chartBlock":"#2E3036","codeArea":"#1E1F24","codeTextarea":"#000000","content":"#1B1C20","danger":"#FFD0DB","dark":"#B1B8C3","dashboard":"#18181C","dashboardTransparent":"rgba(24, 24, 28, 0.1)","header":"#1B1B1B","menu":"#0F4CFF","muted":"#F9FAFC","navigation":"#EDEDED","output":"#2E3036","page":"#1E1F24","panel":"#232429","panelTransparent":"rgba(35, 36, 41, 0.7)","popup":"#27292E","row":"#2C2C2C","row2":"#51535C","scrollbarThumb":"rgba(100, 100, 100, 0.5)","scrollbarThumbHover":"rgba(255, 255, 255, 0.3)","scrollbarTrack":"#2E3036","success":"#8ADE00","successLight":"rgb(138, 222, 0, 0.3)","table":"#292A2F","tag":"#3A4550"},"borders":{"button":"#454850","contrast":"#FFFFFF","danger":"#FF144D","dark":"#000000","darkLight":"#2E3036","info":"#FFCC19","light":"#2F3034","medium":"#1C1C1C","medium2":"#141414","success":"#2FCB52"},"brand":{"earth100":"#C6EEDB","earth200":"#9DDFBF","earth300":"#6BBF96","earth400":"#37A46F","earth400Transparent":"rgba(55, 164, 111, 0.4)","earth500":"#00954C","energy100":"#FFF4BA","energy200":"#FFED92","energy300":"#FFE662","energy400":"#FFDA19","energy400Transparent":"rgba(255, 218, 25, 0.04)","energy500":"#F6C000","fire100":"#FFD7E0","fire200":"#FFA3B9","fire300":"#FF547D","fire400":"#FF144D","fire400Transparent":"rgba(255, 20, 77, 0.4)","fire500":"#EB0032","stone100":"#F3E6D7","stone200":"#E3D4C2","stone400":"#BFA78B","stone500":"#AF8859","water100":"#BDCEFF","water200":"#81A1FF","water300":"#517DFF","water400":"#2A60FE","water400Transparent":"rgba(42, 96, 254, 0.4)","water500":"#0F4CFF","wind100":"#EEEAFF","wind200":"#CCC1F4","wind300":"#A698DD","wind400":"#6B50D7","wind400SuperTransparent":"rgba(107, 80, 215, 0.12)","wind400Transparent":"rgba(107, 80, 215, 0.4)","wind500":"#4E32BC"},"chart":{"backgroundPrimary":"#7D55EC","backgroundSecondary":"#FF144D","backgroundTertiary":"#86E2FF","button1":"#4877FF","button2":"#FFCC19","button3":"#8ADE00","button4":"#FF4FF8","button5":"#B98D95","lines":"#9B6CA7","primary":"#6B50D7","secondary":"#FF144D","tertiary":"#2A60FE"},"content":{"active":"#FFFFFF","default":"#AEAEAE","disabled":"rgba(255, 255, 255, 0.3)","inverted":"#2C2C2C","muted":"#787A85"},"elevation":{"visualizationAccent":"#996CFF","visualizationAccentAlt":"#C1ACF7"},"feature":{"active":"rgba(250, 248, 254, 0.14)","disabled":"rgba(201, 206, 218, 0.12)"},"icons":{"neutral":"#787878"},"interactive":{"activeBorder":"#060606","blackBackgroundTransparent":"rgba(0, 0, 0, 0.5)","checked":"#060606","dangerBorder":"#FF144D","defaultBackground":"#36383F","defaultBackgroundTransparent":"rgba(54, 56, 63, 0.5)","defaultBorder":"#ffffff1a","disabledBorder":"#B1B8C3","focusBackground":"#B1B8C3","focusBorder":"#86E2FF","hoverBackground":"#4E4E4E","hoverBackgroundTransparent":"rgba(78, 78, 78, 0.5)","hoverBlackBackgroundTransparent":"rgba(0, 0, 0, 0.7)","hoverBorder":"#B9BFCA","hoverOverlay":"rgba(255, 255, 255, 0.1)","linkPrimary":"#1752FF","linkPrimaryHover":"#4877FF","linkPrimaryLight":"#5982ff","linkSecondary":"#6B50D7","linkSecondaryDisabled":"#C4B9EF","linkText":"#6AA1E0","linkTextLight":"#9ECBFF","purple":"#885EFF","rowHoverBackground":"rgba(0, 0, 0, 0.1)","transparent":"rgba(255, 255, 255, 0)"},"loader":{"color":"#EB0032","colorInverted":"#8ADE00"},"logo":{"color":"#FFFFFF"},"monotone":{"black":"#060606","blackTransparent":"rgba(0, 0, 0, 0.6)","gray":"#B1B8C3","grey100":"#F2F2F2","grey200":"#D5D7DC","grey300":"#B4B8C0","grey400":"#70747C","grey500":"#51535C","purple":"#6B50D7","white":"#FFFFFF","whiteTransparent":"rgba(255, 255, 255, 0.6)"},"neutral":{"n100":"#E7E8EA","n200":"#D8DADE","n300":"#CBCCD0","n400":"#BCBEC4","n500":"#AEB0B6"},"progress":{"negative":"#FF144D","positive":"#6B50D7"},"shadow":{"base":"12px 40px 120px rgba(0, 0, 0, 0.3)","frame":"0px 10px 40px rgba(0, 0, 0, 0.26)","menu":"4px 10px 20px rgba(6, 6, 6, 0.12)","popup":"10px 20px 40px rgba(0, 0, 0, 0.2)","small":"0px, 4px, rgba(0, 0, 0, 0.25)","window":"0px 10px 60px rgba(0, 0, 0, 0.7)"},"status":{"negative":"#FF144D","positive":"#24B400"},"text":{"fileBrowser":"#787A85"}}},"page":"/404","query":{},"buildId":"RhDiJSkcjCsh4xxX4BFBk","nextExport":true,"isFallback":false,"appGip":true,"scriptLoader":[]}</script></body></html>
19
+ data-styled.g277[id="ToastWrapper-sc-1a33ph1-0"]{content:"kOVcuR,"}/*!sc*/
20
+ </style></head><body><div id="__next"><div class="" style="position:fixed;top:0;left:0;height:2px;background:transparent;z-index:99999999999;width:100%"><div class="" style="height:100%;background:#FF144D;transition:all 500ms ease;width:0%"><div style="box-shadow:0 0 10px #FF144D, 0 0 10px #FF144D;width:5%;opacity:1;position:absolute;height:100%;transition:all 500ms ease;transform:rotate(3deg) translate(0px, -4px);left:-10rem"></div></div></div><main style="align-items:center;display:flex;flex-direction:column;height:100vh;margin-top:16rem"><svg width="84.70857142857143" height="64" viewBox="0 0 20 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity="0.4" d="M15.3266 0L19.2641 1.82961e-06L11.9687 14L8.03125 14L15.3266 0Z" fill="url(#paint0_linear_1303_5)"></path><path d="M11.9692 1.82961e-06L8.03164 0L0.736328 14L4.67383 14L8.03164 7.55626V14H11.9691V8.38194e-05L11.9692 1.82961e-06Z" fill="url(#paint1_linear_1303_5)"></path><path d="M15.3269 2.57679e-06H19.2644V14H15.3269V2.57679e-06Z" fill="url(#paint2_linear_1303_5)"></path><defs><linearGradient id="paint0_linear_1303_5" x1="8.03125" y1="7" x2="19.2641" y2="7" gradientUnits="userSpaceOnUse"><stop offset="0.28125" stop-color="#7D55EC"></stop><stop offset="1" stop-color="#2AB2FE"></stop></linearGradient><linearGradient id="paint1_linear_1303_5" x1="0.736328" y1="7" x2="19.2644" y2="7" gradientUnits="userSpaceOnUse"><stop offset="0.28125" stop-color="#7D55EC"></stop><stop offset="1" stop-color="#2AB2FE"></stop></linearGradient><linearGradient id="paint2_linear_1303_5" x1="0.736328" y1="7" x2="19.2644" y2="7" gradientUnits="userSpaceOnUse"><stop offset="0.28125" stop-color="#7D55EC"></stop><stop offset="1" stop-color="#2AB2FE"></stop></linearGradient></defs></svg><div class="Spacing__SpacingStyle-sc-1mpmtgj-0 cAAVhx"><div class="Headline__HeadlineContainerStyle-sc-12jzt2e-0 dDWSWx"><h1 class="Headline__H1Style-sc-12jzt2e-2 wPqQh">404 - Page Not Found<!-- --></h1></div></div><p class="Text__TextStyle-sc-sl5nur-0 gjRqzz">You will be redirected to the Pipelines dashboard in <!-- -->5<!-- --> seconds.<!-- --></p></main><div id="command-center-root"></div><div></div><div></div><div></div><div class="ToastWrapper-sc-1a33ph1-0 kOVcuR"><div class="Toastify"></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{},"currentTheme":{"accent":{"alert":"#F6540B","blue":"#4877FF","blueLight":"rgba(72, 119, 255, 0.5)","contentDefaultTransparent":"rgba(174, 174, 174, 0.5)","cyan":"#65E3FF","cyanLight":"rgba(101, 227, 255, 0.3)","cyanTransparent":"rgba(101, 227, 255, 0.12)","dbt":"#fc6949","dbtDark":"rgba(252, 105, 73, 0.3)","dbtLight":"rgba(252, 105, 73, 0.5)","info":"#00ABFF","infoTransparent":"rgba(0, 171, 255, 0.5)","negative":"#FF1E59","negativeTransparent":"rgba(255, 30, 89, 0.3)","pink":"#FF4FF8","pinkLight":"rgb(255, 79, 248, 0.5)","positive":"#00A81A","primaryTransparent":"rgba(155, 108, 167, 0.5)","purple":"#7D55EC","purpleLight":"rgba(125, 85, 236, 0.5)","rose":"#D1A2AB","roseLight":"rgba(209, 162, 171, 0.5)","sky":"#6AA1E0","skyLight":"rgba(106, 161, 224, 0.5)","teal":"#00B4CC","tealLight":"rgba(0, 180, 204, 0.5)","warning":"#DD9900","warningTransparent":"rgba(221, 153, 0, 0.5)","yellow":"#FFCC19","yellowLight":"rgba(255, 204, 25, 0.5)"},"background":{"blackTransparent":"rgba(0, 0, 0, 0.6)","blackTransparentDark":"rgba(0, 0, 0, 0.8)","chartBlock":"#2E3036","codeArea":"#1E1F24","codeTextarea":"#000000","content":"#1B1C20","danger":"#FFD0DB","dark":"#B1B8C3","dashboard":"#18181C","dashboardTransparent":"rgba(24, 24, 28, 0.1)","header":"#1B1B1B","menu":"#0F4CFF","muted":"#F9FAFC","navigation":"#EDEDED","output":"#2E3036","page":"#1E1F24","panel":"#232429","panelTransparent":"rgba(35, 36, 41, 0.7)","popup":"#27292E","row":"#2C2C2C","row2":"#51535C","scrollbarThumb":"rgba(100, 100, 100, 0.5)","scrollbarThumbHover":"rgba(255, 255, 255, 0.3)","scrollbarTrack":"#2E3036","success":"#8ADE00","successLight":"rgb(138, 222, 0, 0.3)","table":"#292A2F","tag":"#3A4550"},"borders":{"button":"#454850","contrast":"#FFFFFF","danger":"#FF144D","dark":"#000000","darkLight":"#2E3036","info":"#FFCC19","light":"#2F3034","medium":"#1C1C1C","medium2":"#141414","success":"#2FCB52"},"brand":{"earth100":"#C6EEDB","earth200":"#9DDFBF","earth300":"#6BBF96","earth400":"#37A46F","earth400Transparent":"rgba(55, 164, 111, 0.4)","earth500":"#00954C","energy100":"#FFF4BA","energy200":"#FFED92","energy300":"#FFE662","energy400":"#FFDA19","energy400Transparent":"rgba(255, 218, 25, 0.04)","energy500":"#F6C000","fire100":"#FFD7E0","fire200":"#FFA3B9","fire300":"#FF547D","fire400":"#FF144D","fire400Transparent":"rgba(255, 20, 77, 0.4)","fire500":"#EB0032","stone100":"#F3E6D7","stone200":"#E3D4C2","stone400":"#BFA78B","stone500":"#AF8859","water100":"#BDCEFF","water200":"#81A1FF","water300":"#517DFF","water400":"#2A60FE","water400Transparent":"rgba(42, 96, 254, 0.4)","water500":"#0F4CFF","wind100":"#EEEAFF","wind200":"#CCC1F4","wind300":"#A698DD","wind400":"#6B50D7","wind400SuperTransparent":"rgba(107, 80, 215, 0.12)","wind400Transparent":"rgba(107, 80, 215, 0.4)","wind500":"#4E32BC"},"chart":{"backgroundPrimary":"#7D55EC","backgroundSecondary":"#FF144D","backgroundTertiary":"#86E2FF","button1":"#4877FF","button2":"#FFCC19","button3":"#8ADE00","button4":"#FF4FF8","button5":"#B98D95","lines":"#9B6CA7","primary":"#6B50D7","secondary":"#FF144D","tertiary":"#2A60FE"},"content":{"active":"#FFFFFF","default":"#AEAEAE","disabled":"rgba(255, 255, 255, 0.3)","inverted":"#2C2C2C","muted":"#787A85"},"elevation":{"visualizationAccent":"#996CFF","visualizationAccentAlt":"#C1ACF7"},"feature":{"active":"rgba(250, 248, 254, 0.14)","disabled":"rgba(201, 206, 218, 0.12)"},"icons":{"neutral":"#787878"},"interactive":{"activeBorder":"#060606","blackBackgroundTransparent":"rgba(0, 0, 0, 0.5)","checked":"#060606","dangerBorder":"#FF144D","defaultBackground":"#36383F","defaultBackgroundTransparent":"rgba(54, 56, 63, 0.5)","defaultBorder":"#ffffff1a","disabledBorder":"#B1B8C3","focusBackground":"#B1B8C3","focusBorder":"#86E2FF","hoverBackground":"#4E4E4E","hoverBackgroundTransparent":"rgba(78, 78, 78, 0.5)","hoverBlackBackgroundTransparent":"rgba(0, 0, 0, 0.7)","hoverBorder":"#B9BFCA","hoverOverlay":"rgba(255, 255, 255, 0.1)","linkPrimary":"#1752FF","linkPrimaryHover":"#4877FF","linkPrimaryLight":"#5982ff","linkSecondary":"#6B50D7","linkSecondaryDisabled":"#C4B9EF","linkText":"#6AA1E0","linkTextLight":"#9ECBFF","purple":"#885EFF","rowHoverBackground":"rgba(0, 0, 0, 0.1)","transparent":"rgba(255, 255, 255, 0)"},"loader":{"color":"#EB0032","colorInverted":"#8ADE00"},"logo":{"color":"#FFFFFF"},"monotone":{"black":"#060606","blackTransparent":"rgba(0, 0, 0, 0.6)","gray":"#B1B8C3","grey100":"#F2F2F2","grey200":"#D5D7DC","grey300":"#B4B8C0","grey400":"#70747C","grey500":"#51535C","purple":"#6B50D7","white":"#FFFFFF","whiteTransparent":"rgba(255, 255, 255, 0.6)"},"neutral":{"n100":"#E7E8EA","n200":"#D8DADE","n300":"#CBCCD0","n400":"#BCBEC4","n500":"#AEB0B6"},"progress":{"negative":"#FF144D","positive":"#6B50D7"},"shadow":{"base":"12px 40px 120px rgba(0, 0, 0, 0.3)","frame":"0px 10px 40px rgba(0, 0, 0, 0.26)","menu":"4px 10px 20px rgba(6, 6, 6, 0.12)","popup":"10px 20px 40px rgba(0, 0, 0, 0.2)","small":"0px, 4px, rgba(0, 0, 0, 0.25)","window":"0px 10px 60px rgba(0, 0, 0, 0.7)"},"status":{"negative":"#FF144D","positive":"#24B400"},"text":{"fileBrowser":"#787A85"}}},"page":"/404","query":{},"buildId":"UZLabyPgcxtZvp0O0EUUS","nextExport":true,"isFallback":false,"appGip":true,"scriptLoader":[]}</script></body></html>
@@ -0,0 +1 @@
1
+ self.__BUILD_MANIFEST=function(s,e,i,a,t,c,n,p,l,g,u,r,o,k,f,d,b,h,j,m,w,_,v,y,I,B,F,A,D,E,L,M,N){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":["static/chunks/pages/index-4e12783b064c1cfe.js"],"/404":["static/chunks/pages/404-8ecd93274c427b76.js"],"/_error":["static/chunks/pages/_error-e989623bffcbf724.js"],"/block-layout":[r,a,t,c,n,f,p,o,d,_,"static/chunks/pages/block-layout-7f4b735c67115df5.js"],"/compute":[s,B,"static/chunks/pages/compute-010d9ac728f8a517.js"],"/files":[s,"static/chunks/pages/files-98df0674eac4ec84.js"],"/global-data-products":[s,l,b,F,"static/chunks/pages/global-data-products-b943f31f050fc3a4.js"],"/global-data-products/[...slug]":[s,l,b,F,"static/chunks/pages/global-data-products/[...slug]-e7d48e6b0c3068ac.js"],"/global-hooks":[s,h,"static/chunks/pages/global-hooks-34966cfd2d89c366.js"],"/global-hooks/[...slug]":[s,h,"static/chunks/pages/global-hooks/[...slug]-fbc51d79d3196fa2.js"],"/manage":[s,g,j,"static/chunks/pages/manage-4bfc84ff07d7656f.js"],"/manage/files":[s,g,"static/chunks/pages/manage/files-f15a685682b1037b.js"],"/manage/settings":[s,g,"static/chunks/pages/manage/settings-52a597d0c674907a.js"],"/manage/users":[s,g,"static/chunks/pages/manage/users-b2896118903236c5.js"],"/manage/users/new":[s,g,"static/chunks/pages/manage/users/new-d0a403e8920104d2.js"],"/manage/users/[user]":[s,g,"static/chunks/pages/manage/users/[user]-8bbfa0c19b5e4cb3.js"],"/oauth":[s,"static/chunks/pages/oauth-30e34ee15d410331.js"],"/overview":[r,a,t,c,n,f,s,p,k,o,d,m,_,v,A,D,"static/chunks/pages/overview-9f1ac4ec003884f3.js"],"/pipeline-runs":[s,l,j,"static/chunks/pages/pipeline-runs-6d183f91a2ff6668.js"],"/pipelines":[s,k,j,m,v,A,"static/chunks/pages/pipelines-3591d035bb3bb2b8.js"],"/pipelines/[pipeline]":["static/chunks/pages/pipelines/[pipeline]-91a5d6a11e7d4c56.js"],"/pipelines/[pipeline]/backfills":[s,e,"static/chunks/pages/pipelines/[pipeline]/backfills-38e1fbcfbfc1014e.js"],"/pipelines/[pipeline]/backfills/[...slug]":[u,w,s,e,l,"static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-7e737f6fc7e83e9b.js"],"/pipelines/[pipeline]/dashboard":[r,a,t,c,n,f,s,e,p,o,d,_,"static/chunks/pages/pipelines/[pipeline]/dashboard-d94488e3f2eeef36.js"],"/pipelines/[pipeline]/edit":[r,a,t,c,u,n,f,s,p,k,o,d,m,y,v,B,"static/chunks/pages/pipelines/[pipeline]/edit-cc641a7fa8473796.js"],"/pipelines/[pipeline]/logs":[w,s,e,"static/chunks/pages/pipelines/[pipeline]/logs-3f5c14076ddde20e.js"],"/pipelines/[pipeline]/monitors":[a,c,s,e,D,"static/chunks/pages/pipelines/[pipeline]/monitors-5f4c8128b2413fd8.js"],"/pipelines/[pipeline]/monitors/block-runs":[a,c,s,e,"static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-284309877f3c5a5a.js"],"/pipelines/[pipeline]/monitors/block-runtime":[r,a,t,c,s,e,o,"static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-26250e5335194ade.js"],"/pipelines/[pipeline]/runs":[u,s,e,l,"static/chunks/pages/pipelines/[pipeline]/runs-6dae38250e135c54.js"],"/pipelines/[pipeline]/runs/[run]":[a,t,u,n,s,e,p,y,"static/chunks/pages/pipelines/[pipeline]/runs/[run]-4ebfc8e400315dda.js"],"/pipelines/[pipeline]/settings":[s,e,"static/chunks/pages/pipelines/[pipeline]/settings-e5e0150a256aadb3.js"],"/pipelines/[pipeline]/syncs":[s,e,"static/chunks/pages/pipelines/[pipeline]/syncs-90abafc7ed61c582.js"],"/pipelines/[pipeline]/triggers":[u,w,E,s,e,j,b,L,"static/chunks/pages/pipelines/[pipeline]/triggers-4612d15a65c35912.js"],"/pipelines/[pipeline]/triggers/[...slug]":[u,w,E,s,e,l,L,"static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-eb11c5390c982b49.js"],"/platform/global-hooks":[s,h,"static/chunks/pages/platform/global-hooks-c916c778b0764634.js"],"/platform/global-hooks/[...slug]":[s,h,"static/chunks/pages/platform/global-hooks/[...slug]-e187f4c2b4eccd00.js"],"/settings":["static/chunks/pages/settings-b39e5bca035dec41.js"],"/settings/account/profile":[s,i,I,"static/chunks/pages/settings/account/profile-3ae43c932537b254.js"],"/settings/platform/preferences":[s,i,"static/chunks/pages/settings/platform/preferences-b603d7fe4b175256.js"],"/settings/platform/settings":[s,i,"static/chunks/pages/settings/platform/settings-319ddbabc239e91b.js"],"/settings/workspace/permissions":[s,i,M,"static/chunks/pages/settings/workspace/permissions-fb29fa6c2bd90bb0.js"],"/settings/workspace/permissions/[...slug]":[s,i,M,"static/chunks/pages/settings/workspace/permissions/[...slug]-5c360f72e4498855.js"],"/settings/workspace/preferences":[s,i,"static/chunks/pages/settings/workspace/preferences-3b76fa959ffa09d3.js"],"/settings/workspace/roles":[s,i,N,"static/chunks/pages/settings/workspace/roles-0b83fbdd39e85f5b.js"],"/settings/workspace/roles/[...slug]":[s,i,N,"static/chunks/pages/settings/workspace/roles/[...slug]-3b787b42f1093b1f.js"],"/settings/workspace/sync-data":[a,t,n,s,i,p,y,"static/chunks/pages/settings/workspace/sync-data-a1e6950974d643a8.js"],"/settings/workspace/users":[s,i,I,"static/chunks/pages/settings/workspace/users-88c694d19207f2ec.js"],"/settings/workspace/users/[...slug]":[s,i,I,"static/chunks/pages/settings/workspace/users/[...slug]-0aa019d87db8b0b8.js"],"/sign-in":[s,"static/chunks/pages/sign-in-09414a8b66fb6f06.js"],"/templates":[s,k,m,"static/chunks/pages/templates-05a5312f50db749c.js"],"/templates/[...slug]":[s,k,"static/chunks/pages/templates/[...slug]-98a34c313012fc10.js"],"/terminal":[s,"static/chunks/pages/terminal-89e1b3e6799378a5.js"],"/test":["static/chunks/pages/test-bd51b3918b39329e.js"],"/triggers":[s,b,"static/chunks/pages/triggers-a599c6ac89be8c8d.js"],"/version-control":[s,"static/chunks/pages/version-control-31d0d50f7f30462b.js"],sortedPages:["/","/404","/_app","/_error","/block-layout","/compute","/files","/global-data-products","/global-data-products/[...slug]","/global-hooks","/global-hooks/[...slug]","/manage","/manage/files","/manage/settings","/manage/users","/manage/users/new","/manage/users/[user]","/oauth","/overview","/pipeline-runs","/pipelines","/pipelines/[pipeline]","/pipelines/[pipeline]/backfills","/pipelines/[pipeline]/backfills/[...slug]","/pipelines/[pipeline]/dashboard","/pipelines/[pipeline]/edit","/pipelines/[pipeline]/logs","/pipelines/[pipeline]/monitors","/pipelines/[pipeline]/monitors/block-runs","/pipelines/[pipeline]/monitors/block-runtime","/pipelines/[pipeline]/runs","/pipelines/[pipeline]/runs/[run]","/pipelines/[pipeline]/settings","/pipelines/[pipeline]/syncs","/pipelines/[pipeline]/triggers","/pipelines/[pipeline]/triggers/[...slug]","/platform/global-hooks","/platform/global-hooks/[...slug]","/settings","/settings/account/profile","/settings/platform/preferences","/settings/platform/settings","/settings/workspace/permissions","/settings/workspace/permissions/[...slug]","/settings/workspace/preferences","/settings/workspace/roles","/settings/workspace/roles/[...slug]","/settings/workspace/sync-data","/settings/workspace/users","/settings/workspace/users/[...slug]","/sign-in","/templates","/templates/[...slug]","/terminal","/test","/triggers","/version-control"]}}("static/chunks/1557-25a7d985d5564fd3.js","static/chunks/3782-129dd2a2448a2e36.js","static/chunks/5699-176f445e1313f001.js","static/chunks/125-abc06c39b97fd8aa.js","static/chunks/1799-c42db95a015689ee.js","static/chunks/2714-68fef54789d7eaeb.js","static/chunks/7162-7dd03f0f605de721.js","static/chunks/8095-c351b8a735d73e0c.js","static/chunks/7966-5446a8e43711e2f9.js","static/chunks/1598-3070ba5a71ce3e2d.js","static/chunks/9161-837b653aa849a76f.js","static/chunks/29107295-989a0767a635d9d5.js","static/chunks/4168-97fd1578d1a38315.js","static/chunks/4241-4499461184ba0d23.js","static/chunks/2996-2108b53b9d371d8d.js","static/chunks/8023-6c2f172f48dcb99b.js","static/chunks/9624-8b8e100079ab69e1.js","static/chunks/1187-c9537b3f51775d0c.js","static/chunks/5544-d10ee8ec70354aa1.js","static/chunks/523-be11ad59861d00ca.js","static/chunks/7674-5f8f0882b3411d98.js","static/chunks/1668-30b4619b9534519b.js","static/chunks/3548-9d26185b3fb663b1.js","static/chunks/4982-fa5a238b139fbdd2.js","static/chunks/3958-bcdfa414ccfa1eb2.js","static/chunks/3366-526b00bb494c02a4.js","static/chunks/3763-40780c6d1e4b261d.js","static/chunks/5627-237a3de578538022.js","static/chunks/5831-2abc4063e887a03e.js","static/chunks/26-38bc9380422f3900.js","static/chunks/2717-d9200be634dd6766.js","static/chunks/7779-68d2b72a90c5f925.js","static/chunks/1376-22de38b4ad008d8a.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1376],{17022:function(e,n,r){var i=r(75582),t=r(82394),s=r(21764),o=r(82684),l=r(69864),u=r(34376),c=r(71180),d=r(70652),a=r(15338),E=r(97618),f=r(55485),A=r(85854),I=r(65956),m=r(28274),L=r(38276),p=r(75499),Z=r(30160),j=r(17488),_=r(35686),v=r(8193),D=r(72473),h=r(70515),x=r(24755),S=r(3917),T=r(76417),R=r(36717),b=r(86735),O=r(42122),P=r(72619),g=r(95924),y=r(28598);function C(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,i)}return r}function B(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?C(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var N,k=2*h.iI;!function(e){e.PERMISSIONS="Permissions",e.USERS="Users"}(N||(N={})),n.Z=function(e){var n,r=e.contained,t=e.onCancel,C=e.slug,M=(0,u.useRouter)(),w=(0,o.useState)(!0),U=w[0],W=w[1],H=(0,o.useState)(null),Y=H[0],Q=H[1],F=(0,o.useState)({}),K=F[0],G=F[1],q=(0,o.useState)(null),V=q[0],z=q[1],$=(0,o.useCallback)((function(e,n,r){z(B(B({},e),{},{permissionsMapping:(0,b.HK)(n||[],(function(e){return e.id})),usersMapping:(0,b.HK)(r||[],(function(e){return e.id}))}))}),[z]),J=(0,o.useCallback)((function(e){G((function(n){return B(B({},n),e)})),z((function(n){return B(B({},n),e)}))}),[G,z]),X=_.ZP.roles.detail(C,{},{revalidateOnFocus:!1}).data,ee=(0,o.useMemo)((function(){return null===X||void 0===X?void 0:X.role}),[X]);(0,o.useEffect)((function(){ee&&$(ee,null===ee||void 0===ee?void 0:ee.role_permissions,null===ee||void 0===ee?void 0:ee.users)}),[$,ee]);var ne=(0,l.Db)(ee?_.ZP.roles.useUpdate(null===ee||void 0===ee?void 0:ee.id):_.ZP.roles.useCreate(),{onSuccess:function(e){return(0,P.wD)(e,{callback:function(e){var n=e.role;G({}),$(n,null===n||void 0===n?void 0:n.role_permissions,null===n||void 0===n?void 0:n.users),ee||M.push("/settings/workspace/roles/".concat(null===n||void 0===n?void 0:n.id)),s.Am.success(ee?"Role successfully updated.":"New role created successfully.",{position:s.Am.POSITION.BOTTOM_RIGHT,toastId:"role-mutate-success-".concat(n.id)})},onErrorCallback:function(e){var n=e.error,r=n.errors,i=n.exception,t=n.message,o=n.type;s.Am.error((null===r||void 0===r?void 0:r.error)||i||t,{position:s.Am.POSITION.BOTTOM_RIGHT,toastId:o})}})}}),re=(0,i.Z)(ne,2),ie=re[0],te=re[1].isLoading,se=(0,l.Db)(_.ZP.roles.useDelete(null===ee||void 0===ee?void 0:ee.id),{onSuccess:function(e){return(0,P.wD)(e,{callback:function(){M.push("/settings/workspace/roles"),s.Am.success("Role successfully delete.",{position:s.Am.POSITION.BOTTOM_RIGHT,toastId:"role-delete-success-".concat(null===ee||void 0===ee?void 0:ee.id)})},onErrorCallback:function(e){var n=e.error,r=n.errors,i=n.exception,t=n.message,o=n.type;s.Am.error((null===r||void 0===r?void 0:r.error)||i||t,{position:s.Am.POSITION.BOTTOM_RIGHT,toastId:o})}})}}),oe=(0,i.Z)(se,2),le=oe[0],ue=oe[1].isLoading,ce=_.ZP.permissions.list({_limit:1e3},{},{pauseFetch:!ee}).data,de=(0,o.useMemo)((function(){return(0,b.YC)((null===ce||void 0===ce?void 0:ce.permissions)||[],"entity_name")}),[ce]),ae=(0,o.useMemo)((function(){return(null===V||void 0===V?void 0:V.permissionsMapping)||{}}),[V]),Ee=(0,o.useMemo)((function(){return(0,b.YC)(Object.values(ae),"entity_name")}),[ae]),fe=_.ZP.users.list({},{},{pauseFetch:!ee}).data,Ae=(0,o.useMemo)((function(){return(0,b.YC)((null===fe||void 0===fe?void 0:fe.users)||[],(function(e){return(0,T.s)(e)}))}),[fe]),Ie=(0,o.useMemo)((function(){return(null===V||void 0===V?void 0:V.usersMapping)||{}}),[V]),me=(0,o.useMemo)((function(){return(0,b.YC)(Object.values(Ie),(function(e){return(0,T.s)(e)}))}),[Ie]),Le=(0,o.useMemo)((function(){return(null===Ee||void 0===Ee?void 0:Ee.length)>=1}),[Ee]),pe=(0,o.useMemo)((function(){return(0,y.jsx)(c.ZP,{beforeIcon:(0,y.jsx)(D.Add,{}),compact:!0,onClick:function(){Q(N.PERMISSIONS),W(!1)},primary:!Le,secondary:Le,small:!0,children:"Add permission"})}),[Le,Q,W]),Ze=(0,o.useMemo)((function(){return(null===me||void 0===me?void 0:me.length)>=1}),[me]),je=(0,o.useMemo)((function(){return(0,y.jsx)(c.ZP,{beforeIcon:(0,y.jsx)(D.Add,{}),compact:!0,onClick:function(){Q(N.USERS),W(!1)},primary:!Ze,secondary:Ze,small:!0,children:"Add user"})}),[Ze]),_e=(0,o.useCallback)((function(e,n){return(0,y.jsx)(p.Z,{columnFlex:[null,null,2,1,1,6],columns:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===ae||void 0===ae?void 0:ae[n]}));return(0,y.jsx)(d.Z,{checked:n,onClick:function(r){(0,g.j)(r),J(n?{permissionsMapping:{}}:{permissionsMapping:(0,b.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"},{uuid:"ID"},{uuid:"Entity"},{uuid:"Subtype"},{uuid:"Entity ID"},{rightAligned:!0,uuid:"Access"}],onClickRow:n?function(n){var r=e[n];r&&window.open("/settings/workspace/permissions/".concat(null===r||void 0===r?void 0:r.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.access,r=e.entity,i=e.entity_id,t=e.entity_name,s=e.entity_type,o=e.id,l=n?(0,R.q)(n):[],u=(null===l||void 0===l?void 0:l.length)||0,c=!(null===ae||void 0===ae||!ae[o]);return[(0,y.jsx)(d.Z,{checked:c,onClick:function(n){(0,g.j)(n);var r=B({},ae);c?null===r||void 0===r||delete r[o]:r[o]=e,J({permissionsMapping:r})}},"checkbox"),(0,y.jsx)(Z.ZP,{default:!0,monospace:!0,children:o},"id"),(0,y.jsx)(Z.ZP,{monospace:!0,children:t||r},"entityName"),(0,y.jsx)(Z.ZP,{default:!0,monospace:!!s,children:s||"-"},"entityType"),(0,y.jsx)(Z.ZP,{default:!0,monospace:!!i,children:i||"-"},"entityID"),(0,y.jsx)("div",{children:u>=1&&(0,y.jsx)(f.ZP,{alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end",children:null===l||void 0===l?void 0:l.map((function(e,n){return(0,y.jsx)("div",{children:(0,y.jsxs)(Z.ZP,{default:!0,monospace:!0,small:!0,children:[e,u>=2&&n<u-1&&(0,y.jsx)(Z.ZP,{inline:!0,muted:!0,small:!0,children:",\xa0"})]})},e)}))})},"access")]})),uuid:"permissions"})}),[ae,J]),ve=(0,o.useCallback)((function(e,n){return(0,y.jsx)(p.Z,{columnFlex:[null,1,1,1],columns:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===Ie||void 0===Ie?void 0:Ie[n]}));return(0,y.jsx)(d.Z,{checked:n,onClick:function(r){(0,g.j)(r),J(n?{usersMapping:{}}:{usersMapping:(0,b.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"},{uuid:"Username"},{uuid:"First name"},{uuid:"Last name"}],onClickRow:n?function(n){var r=e[n];r&&window.open("/settings/workspace/users/".concat(null===r||void 0===r?void 0:r.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.first_name,r=e.id,i=e.last_name,t=e.username,s=!(null===Ie||void 0===Ie||!Ie[r]);return[(0,y.jsx)(d.Z,{checked:s,onClick:function(n){(0,g.j)(n);var i=B({},Ie);s?null===i||void 0===i||delete i[r]:i[r]=e,J({usersMapping:i})}},"checkbox"),(0,y.jsx)(Z.ZP,{children:t},"username"),(0,y.jsx)(Z.ZP,{default:!0,children:n},"firstName"),(0,y.jsx)(Z.ZP,{default:!0,children:i},"lastName")]})),uuid:"users"})}),[Ie,J]),De=(0,o.useMemo)((function(){return _e(de)}),[_e,de]),he=(0,o.useMemo)((function(){return ve(Ae)}),[ve,Ae]),xe=(0,o.useMemo)((function(){return _e(Ee,!0)}),[_e,Ee]),Se=(0,o.useMemo)((function(){return ve(me,!0)}),[ve,me]),Te=(0,y.jsxs)(v.N,{children:[(0,y.jsxs)(I.Z,{noPadding:!0,children:[(0,y.jsx)(L.Z,{p:h.cd,children:(0,y.jsx)(A.Z,{level:4,children:"Role"})}),(0,y.jsx)(a.Z,{light:!0}),(0,y.jsx)(L.Z,{p:h.cd,children:(0,y.jsxs)(f.ZP,{alignItems:"center",children:[(0,y.jsxs)(Z.ZP,{danger:"name"in K&&!(null!==V&&void 0!==V&&V.name),default:!0,large:!0,children:["Name ","name"in K&&!(null!==V&&void 0!==V&&V.name)&&(0,y.jsx)(Z.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,y.jsx)(L.Z,{mr:h.cd}),(0,y.jsx)(E.Z,{flex:1,children:(0,y.jsx)(j.Z,{afterIcon:(0,y.jsx)(D.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:k,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return J({name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Archmage",value:(null===V||void 0===V?void 0:V.name)||""})})]})})]}),(0,y.jsx)(L.Z,{mb:h.HN}),ee&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(I.Z,{noPadding:!0,children:[(0,y.jsx)(L.Z,{p:h.cd,children:(0,y.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,y.jsx)(A.Z,{level:4,children:"Permissions"}),(0,y.jsx)(L.Z,{mr:h.cd}),Le&&(0,y.jsx)(f.ZP,{alignItems:"center",children:pe})]})}),(0,y.jsx)(a.Z,{light:!0}),!Le&&(0,y.jsxs)(L.Z,{p:h.cd,children:[(0,y.jsx)(L.Z,{mb:h.cd,children:(0,y.jsx)(Z.ZP,{default:!0,children:"This role currently has no permissions attached."})}),(0,y.jsx)(f.ZP,{alignItems:"center",children:pe})]}),Le&&(0,y.jsx)(L.Z,{pb:h.Mq,children:xe})]}),(0,y.jsx)(L.Z,{mb:h.HN}),(0,y.jsxs)(I.Z,{noPadding:!0,children:[(0,y.jsx)(L.Z,{p:h.cd,children:(0,y.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,y.jsx)(A.Z,{level:4,children:"Users"}),(0,y.jsx)(L.Z,{mr:h.cd}),Ze&&(0,y.jsx)(f.ZP,{alignItems:"center",children:je})]})}),(0,y.jsx)(a.Z,{light:!0}),!Ze&&(0,y.jsxs)(L.Z,{p:h.cd,children:[(0,y.jsx)(L.Z,{mb:h.cd,children:(0,y.jsx)(Z.ZP,{default:!0,children:"There are currently no users with this role."})}),(0,y.jsx)(f.ZP,{alignItems:"center",children:je})]}),Ze&&(0,y.jsx)(L.Z,{pb:h.Mq,children:Se})]}),(0,y.jsx)(L.Z,{mb:h.HN}),(0,y.jsxs)(I.Z,{noPadding:!0,children:[(0,y.jsx)(L.Z,{p:h.cd,children:(0,y.jsx)(A.Z,{level:4,children:"Metadata"})}),(0,y.jsx)(a.Z,{light:!0}),(0,y.jsx)(L.Z,{p:h.cd,children:(0,y.jsxs)(f.ZP,{alignItems:"center",children:[(0,y.jsx)(Z.ZP,{default:!0,large:!0,children:"Last updated"}),(0,y.jsx)(L.Z,{mr:h.cd}),(0,y.jsxs)(E.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,y.jsx)(Z.ZP,{large:!0,monospace:!0,muted:!0,children:(null===V||void 0===V?void 0:V.updated_at)&&(0,S.d$)(null===V||void 0===V?void 0:V.updated_at,{includeSeconds:!0})}),(0,y.jsx)(L.Z,{mr:h.cd}),(0,y.jsx)(D.Schedule,{muted:!0,size:k}),(0,y.jsx)(L.Z,{mr:1})]})]})}),(0,y.jsx)(a.Z,{light:!0}),(0,y.jsx)(L.Z,{p:h.cd,children:(0,y.jsxs)(f.ZP,{alignItems:"center",children:[(0,y.jsx)(Z.ZP,{default:!0,large:!0,children:"Created at"}),(0,y.jsx)(L.Z,{mr:h.cd}),(0,y.jsxs)(E.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,y.jsx)(Z.ZP,{large:!0,monospace:!0,muted:!0,children:(null===V||void 0===V?void 0:V.created_at)&&(0,S.d$)(null===V||void 0===V?void 0:V.created_at,{includeSeconds:!0})}),(0,y.jsx)(L.Z,{mr:h.cd}),(0,y.jsx)(D.Schedule,{muted:!0,size:k}),(0,y.jsx)(L.Z,{mr:1})]})]})}),(0,y.jsx)(a.Z,{light:!0}),(0,y.jsx)(L.Z,{p:h.cd,children:(0,y.jsxs)(f.ZP,{alignItems:"center",children:[(0,y.jsx)(Z.ZP,{default:!0,large:!0,children:"Created by"}),(0,y.jsx)(L.Z,{mr:h.cd}),(0,y.jsxs)(E.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,y.jsx)(Z.ZP,{large:!0,monospace:!0,muted:!0,children:(0,T.s)(null===ee||void 0===ee?void 0:ee.user)}),(0,y.jsx)(L.Z,{mr:h.cd}),(0,y.jsx)(D.UserSmileyFace,{muted:!0,size:k}),(0,y.jsx)(L.Z,{mr:1})]})]})})]}),(0,y.jsx)(L.Z,{mb:h.HN})]}),(0,y.jsxs)(f.ZP,{children:[(0,y.jsx)(c.ZP,{beforeIcon:(0,y.jsx)(D.Save,{}),disabled:!K||!(null!==(n=Object.keys(K))&&void 0!==n&&n.length),loading:te,onClick:function(){return ie({role:B(B({},(0,O.GL)(V,["name"],{include_blanks:!0})),{},{permission_ids:Object.keys((null===V||void 0===V?void 0:V.permissionsMapping)||{}).map((function(e){return Number(e)})),user_ids:Object.keys((null===V||void 0===V?void 0:V.usersMapping)||{}).map((function(e){return Number(e)}))})})},primary:!0,children:ee?"Save changes":"Create new role"}),t&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(L.Z,{mr:h.cd}),(0,y.jsx)(c.ZP,{onClick:function(){return null===t||void 0===t?void 0:t()},secondary:!0,children:"Cancel and go back"})]}),ee&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(L.Z,{mr:h.cd}),(0,y.jsx)(c.ZP,{beforeIcon:(0,y.jsx)(D.Trash,{}),danger:!0,loading:ue,onClick:function(){return le()},children:"Delete role"})]})]})]});return r?Te:(0,y.jsx)(m.Z,{after:N.PERMISSIONS===Y?De:N.USERS===Y?he:null,afterHeader:(0,y.jsx)(L.Z,{px:h.cd,children:(0,y.jsx)(Z.ZP,{bold:!0,children:Y})}),afterHidden:U,afterWidth:60*h.iI,appendBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Roles"},linkProps:{href:"/settings/workspace/roles"}},{bold:!0,label:function(){return null===ee||void 0===ee?void 0:ee.name}}],hideAfterCompletely:!0,setAfterHidden:W,title:null!==ee&&void 0!==ee&&ee.name?"".concat(null===ee||void 0===ee?void 0:ee.name," role"):"New role",uuidItemSelected:x.B2.ROLES,uuidWorkspaceSelected:x.Pl.USER_MANAGEMENT,children:ee&&Te})}},36288:function(e,n,r){r.d(n,{Fy:function(){return A},G9:function(){return d},H1:function(){return I},K4:function(){return u},ND:function(){return c},Pt:function(){return a},WG:function(){return s},hl:function(){return f},m_:function(){return o},oO:function(){return E}});var i,t,s,o,l=r(82394);!function(e){e[e.OWNER=1]="OWNER",e[e.ADMIN=2]="ADMIN",e[e.EDITOR=4]="EDITOR",e[e.VIEWER=8]="VIEWER",e[e.LIST=16]="LIST",e[e.DETAIL=32]="DETAIL",e[e.CREATE=64]="CREATE",e[e.UPDATE=128]="UPDATE",e[e.DELETE=512]="DELETE",e[e.OPERATION_ALL=1024]="OPERATION_ALL",e[e.QUERY=2048]="QUERY",e[e.QUERY_ALL=4096]="QUERY_ALL",e[e.READ=8192]="READ",e[e.READ_ALL=16384]="READ_ALL",e[e.WRITE=32768]="WRITE",e[e.WRITE_ALL=65536]="WRITE_ALL",e[e.ALL=131072]="ALL",e[e.DISABLE_LIST=262144]="DISABLE_LIST",e[e.DISABLE_DETAIL=524288]="DISABLE_DETAIL",e[e.DISABLE_CREATE=1048576]="DISABLE_CREATE",e[e.DISABLE_UPDATE=2097152]="DISABLE_UPDATE",e[e.DISABLE_DELETE=4194304]="DISABLE_DELETE",e[e.DISABLE_OPERATION_ALL=8388608]="DISABLE_OPERATION_ALL",e[e.DISABLE_QUERY=16777216]="DISABLE_QUERY",e[e.DISABLE_QUERY_ALL=33554432]="DISABLE_QUERY_ALL",e[e.DISABLE_READ=67108864]="DISABLE_READ",e[e.DISABLE_READ_ALL=134217728]="DISABLE_READ_ALL",e[e.DISABLE_WRITE=268435456]="DISABLE_WRITE",e[e.DISABLE_WRITE_ALL=536870912]="DISABLE_WRITE_ALL",e[e.DISABLE_UNLESS_CONDITIONS=1073741824]="DISABLE_UNLESS_CONDITIONS"}(s||(s={})),function(e){e.HAS_NOTEBOOK_EDIT_ACCESS="HAS_NOTEBOOK_EDIT_ACCESS",e.HAS_PIPELINE_EDIT_ACCESS="HAS_PIPELINE_EDIT_ACCESS",e.USER_OWNS_ENTITY="USER_OWNS_ENTITY"}(o||(o={}));var u=(i={},(0,l.Z)(i,s.OWNER,"Owner"),(0,l.Z)(i,s.ADMIN,"Admin"),(0,l.Z)(i,s.EDITOR,"Editor"),(0,l.Z)(i,s.VIEWER,"Viewer"),(0,l.Z)(i,s.LIST,"List"),(0,l.Z)(i,s.DETAIL,"Detail"),(0,l.Z)(i,s.CREATE,"Create"),(0,l.Z)(i,s.UPDATE,"Update"),(0,l.Z)(i,s.DELETE,"Delete"),(0,l.Z)(i,s.OPERATION_ALL,"All operations"),(0,l.Z)(i,s.QUERY,"Query"),(0,l.Z)(i,s.QUERY_ALL,"Query all attributes"),(0,l.Z)(i,s.READ,"Read"),(0,l.Z)(i,s.READ_ALL,"Read all attributes"),(0,l.Z)(i,s.WRITE,"Write"),(0,l.Z)(i,s.WRITE_ALL,"Write all attributes"),(0,l.Z)(i,s.ALL,"All"),(0,l.Z)(i,s.DISABLE_LIST,"Disable list"),(0,l.Z)(i,s.DISABLE_DETAIL,"Disable detail"),(0,l.Z)(i,s.DISABLE_CREATE,"Disable create"),(0,l.Z)(i,s.DISABLE_UPDATE,"Disable update"),(0,l.Z)(i,s.DISABLE_DELETE,"Disable delete"),(0,l.Z)(i,s.DISABLE_OPERATION_ALL,"Disable all operations"),(0,l.Z)(i,s.DISABLE_QUERY,"Disable query"),(0,l.Z)(i,s.DISABLE_QUERY_ALL,"Disable all query parameters"),(0,l.Z)(i,s.DISABLE_READ,"Disable read"),(0,l.Z)(i,s.DISABLE_READ_ALL,"Disable all read attributes"),(0,l.Z)(i,s.DISABLE_WRITE,"Disable write"),(0,l.Z)(i,s.DISABLE_WRITE_ALL,"Disable all write attributes"),i),c=(t={},(0,l.Z)(t,o.HAS_NOTEBOOK_EDIT_ACCESS,"Disable unless user has notebook edit access"),(0,l.Z)(t,o.HAS_PIPELINE_EDIT_ACCESS,"Disable unless user has pipeline edit access"),(0,l.Z)(t,o.USER_OWNS_ENTITY,"Disable unless user owns the current entity"),t),d=[s.OWNER,s.ADMIN,s.EDITOR,s.VIEWER,s.ALL],a=[s.LIST,s.DETAIL,s.CREATE,s.UPDATE,s.DELETE,s.OPERATION_ALL],E=[s.DISABLE_LIST,s.DISABLE_DETAIL,s.DISABLE_CREATE,s.DISABLE_UPDATE,s.DISABLE_DELETE,s.DISABLE_OPERATION_ALL],f=[s.QUERY,s.QUERY_ALL,s.DISABLE_QUERY,s.DISABLE_QUERY_ALL],A=[s.READ,s.READ_ALL,s.DISABLE_READ,s.DISABLE_READ_ALL],I=[s.WRITE,s.WRITE_ALL,s.DISABLE_WRITE,s.DISABLE_WRITE_ALL]},36717:function(e,n,r){r.d(n,{q:function(){return s}});var i=r(75582),t=r(36288);function s(e){return Object.entries(t.K4).reduce((function(n,r){var t=(0,i.Z)(r,2),s=t[0],o=t[1];return e&Number(s)?n.concat(o):n}),[])}},76417:function(e,n,r){function i(e){return null!==e&&void 0!==e&&e.first_name?[null===e||void 0===e?void 0:e.first_name,null===e||void 0===e?void 0:e.last_name].filter((function(e){return e})).join(" "):null===e||void 0===e?void 0:e.username}r.d(n,{s:function(){return i}})},80022:function(e,n,r){function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(n,{Z:function(){return i}})},15544:function(e,n,r){function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}r.d(n,{Z:function(){return i}})},13692:function(e,n,r){r.d(n,{Z:function(){return t}});var i=r(61049);function t(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&(0,i.Z)(e,n)}},93189:function(e,n,r){r.d(n,{Z:function(){return s}});var i=r(12539),t=r(80022);function s(e,n){if(n&&("object"===i(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,t.Z)(e)}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1557],{54750:function(e,n,t){var i=t(82394),r=t(12691),l=t.n(r),o=t(55485),c=t(48670),a=t(44085),s=t(38276),d=t(4190),u=t(30160),h=t(72473),f=t(70515),v=t(28598),p=t(82684);function m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function x(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.breadcrumbs,t=e.noMarginLeft,i=n.length,r=[];return n.forEach((function(e,n){var m=e.bold,j=e.danger,g=e.label,b=e.linkProps,y=e.loading,Z=e.monospace,C=void 0===Z||Z,M=e.onClick,F=e.options,O=g();i>=2&&n>=1&&r.push((0,v.jsx)(s.Z,{mx:1,children:(0,v.jsx)(h.ChevronRight,{muted:!0})},"divider-".concat(O)));var H=(0,v.jsx)(u.ZP,{bold:m,danger:j,default:!m,monospace:C,noWrapping:!0,children:O});if((null===F||void 0===F?void 0:F.length)>=1){var w,P,k=null===F||void 0===F?void 0:F.find((function(e){return!!e.selected}));if(k)(w=((null===k||void 0===k||null===(P=k.uuid)||void 0===P?void 0:P.length)||0)*f.ro)&&(w+=3*f.iI,y&&(w+=2*f.iI));H=(0,v.jsx)(o.ZP,{alignItems:"center",children:(0,v.jsx)(a.Z,{afterIcon:y?(0,v.jsx)(d.Z,{inverted:!0,small:!0}):null,danger:j,defaultTextColor:!m,maxWidth:w||null,monospace:C,noBackground:!0,noBorder:!0,onChange:function(e){var n,t=e.target.value,i=null===F||void 0===F?void 0:F.find((function(e){return e.uuid===t}));i&&null!==i&&void 0!==i&&i.onClick&&(null===i||void 0===i||null===(n=i.onClick)||void 0===n||n.call(i,t))},paddingHorizontal:0,paddingVertical:0,value:(null===k||void 0===k?void 0:k.uuid)||"",children:null===F||void 0===F?void 0:F.map((function(e){var n=e.label,t=e.selected,i=e.uuid,r=n?null===n||void 0===n?void 0:n():i;return(0,v.jsx)("option",{value:i,children:t?i:r},i)}))})})}var z=(0,v.jsx)(s.Z,{ml:t||0!==n?0:2,children:H},"breadcrumb-".concat(O));b?z=(0,p.createElement)(l(),x(x({},b),{},{key:"breadcrumb-link-".concat(O),passHref:!0}),(0,v.jsx)(c.Z,{block:!0,default:!m,noOutline:!0,sameColorAsText:m,children:z})):M&&(z=(0,v.jsx)(c.Z,{block:!0,default:!m,noOutline:!0,onClick:M,preventDefault:!0,sameColorAsText:m,children:z})),r.push(z)})),(0,v.jsx)(o.ZP,{alignItems:"center",children:r})}},31557:function(e,n,t){t.d(n,{Z:function(){return Qe}});var i=t(21831),r=t(82394),l=t(75582),o=t(12691),c=t.n(o),a=t(25976),s=t(82684),d=t(34376),u=t(40761),h=t(54750),f=t(71180),v=t(39867),p=t(50724),m=t(58036),x=t(97618),j=t(55485),g=t(70374),b=t(56085),y=t(69864),Z=t(70652),C=t(44085),M=t(38276),F=t(4190),O=t(28026),H=t(30160),w=t(35576),P=t(17488),k=t(69650),z=t(35686),_=t(72473),D=t(44897),S=t(42631),I=t(31353),E=t(47041),A=t(70515),L=a.default.div.withConfig({displayName:"GitActionsstyle__HeaderStyle",componentId:"sc-ynrhio-0"})(["border-bottom:1px solid #1B1C20;height:","px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;"],I.Mz),N=a.default.div.withConfig({displayName:"GitActionsstyle__TerminalStyle",componentId:"sc-ynrhio-1"})(["height:calc(75vh - ","px);position:relative;"],I.Mz),T=a.default.div.withConfig({displayName:"GitActionsstyle__PanelStyle",componentId:"sc-ynrhio-2"})(["height:75vh;min-height:300px;width:75vw;backgroundColor:#232429;border-radius:","px;",""],S.n_,(function(e){return"\n background-color: ".concat((e.theme.background||D.Z.background).panel,";\n ")})),B=a.default.div.withConfig({displayName:"GitActionsstyle__OutputStyle",componentId:"sc-ynrhio-3"})([""," padding:","px;height:calc(75vh - ","px);overflow-y:auto;"],E.w5,2*A.iI,I.Mz),U=t(4383),R=t(72619),W=t(86735),G=t(50178),Y=t(28598);function V(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function q(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?V(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):V(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var J={clone:"Clone repository",new_branch:"Create new branch",commit:"Commit & push",pull:"Pull",reset_hard:"Hard reset"};var Q=function(e){var n,t=e.branch,i=(e.fetchBranch,(0,s.useState)()),r=i[0],o=i[1],c=(0,s.useState)(),a=c[0],d=c[1],u=(0,s.useState)(),h=u[0],v=u[1],p=(0,s.useState)(),m=p[0],x=p[1],g=(0,s.useState)(),D=g[0],S=g[1],I=(0,s.useState)(),E=I[0],A=I[1],V=z.ZP.git_branches.list({include_remote_branches:1}),Q=V.data,$=V.isValidating,K=V.mutate,X=(0,s.useMemo)((function(){return null===Q||void 0===Q?void 0:Q.git_branches}),[Q]),ee=z.ZP.syncs.list().data,ne=(0,s.useMemo)((function(){var e;if(ee)return null===(e=ee.syncs)||void 0===e?void 0:e[0]}),[ee]),te=(0,y.Db)(z.ZP.git_branches.useCreate(),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(){K(),window.location.reload()},onErrorCallback:function(e){var n=e.error.exception;S(n)}})}}),ie=(0,l.Z)(te,2),re=ie[0],le=ie[1].isLoading,oe=(0,y.Db)((function(){return z.ZP.git_branches.useUpdate(encodeURIComponent(t))({git_branch:{action_type:"status"}})}),{onSuccess:function(e){return(0,R.wD)(e,{onErrorCallback:function(e){var n=e.error.exception;S(n)}})}}),ce=(0,l.Z)(oe,1)[0],ae=(0,y.Db)(z.ZP.git_branches.useUpdate(encodeURIComponent(t)),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(){S(null),x("DONE")},onErrorCallback:function(e){var n=e.error.exception;S(n)}})}}),se=(0,l.Z)(ae,2),de=se[0],ue=se[1].isLoading,he=(0,y.Db)(z.ZP.git_branches.useUpdate(encodeURIComponent(t)),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(){S(null),window.location.reload()},onErrorCallback:function(e){var n=e.error.exception;S(n)}})}}),fe=(0,l.Z)(he,2),ve=fe[0],pe=fe[1].isLoading,me=(0,s.useState)(),xe=me[0],je=me[1],ge=(0,s.useState)([]),be=ge[0],ye=ge[1],Ze=(0,s.useState)([]),Ce=Ze[0],Me=Ze[1],Fe=(0,s.useCallback)((function(){ce().then((function(e){var n=e.data,t=null===n||void 0===n?void 0:n.git_branch,i=null===t||void 0===t?void 0:t.status,r=null===t||void 0===t?void 0:t.modified_files,l=null===t||void 0===t?void 0:t.untracked_files;je(i),ye(l),Me(r)}))}),[ce]),Oe=(0,s.useMemo)((function(){return le||ue||pe}),[le,ue,pe]);(0,s.useEffect)((function(){$||Fe()}),[h,$,Fe]);var He=(0,s.useMemo)((function(){return(0,G.PR)()||{}}),[]),we=(0,s.useMemo)((function(){var e={term_name:null!==He&&void 0!==He&&He.id?"git_".concat(null===He||void 0===He?void 0:He.id):"git"};return null!==ne&&void 0!==ne&&ne.repo_path&&(e.cwd=null===ne||void 0===ne?void 0:ne.repo_path),e}),[null===ne||void 0===ne?void 0:ne.repo_path,He]),Pe=(0,b.ZP)((0,U.Ib)("terminal"),{shouldReconnect:function(){return!0}},"cwd"in we),ke=Pe.lastMessage,ze=Pe.sendMessage,_e=(0,s.useCallback)((function(e){return(0,Y.jsx)(Z.Z,{checked:((null===r||void 0===r?void 0:r.files)||[]).includes(e),label:(0,Y.jsx)(H.ZP,{small:!0,children:e}),onClick:function(){o((function(n){var t=(null===n||void 0===n?void 0:n.files)||[];return t=t.includes(e)?(0,W.Od)(t,(function(n){return n===e})):[e].concat(t),q(q({},n),{},{files:t})}))},small:!0},e)}),[r]),De=(0,s.useMemo)((function(){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(f.ZP,{onClick:function(){return o((function(e){return q(q({},e),{},{files:Ce.concat(be)})}))},children:"Include all changes"}),Ce&&Ce.length>0&&(0,Y.jsxs)(M.Z,{mb:1,children:[(0,Y.jsx)(M.Z,{my:1,children:(0,Y.jsx)(H.ZP,{children:"Modified files"})}),Ce.map(_e)]}),be&&be.length>0&&(0,Y.jsxs)(M.Z,{mb:1,children:[(0,Y.jsx)(M.Z,{my:1,children:(0,Y.jsx)(H.ZP,{children:"Untracked files"})}),be.map(_e)]})]})}),[_e,Ce,be]),Se=(0,s.useMemo)((function(){return(0,Y.jsx)(M.Z,{p:2,children:Oe?(0,Y.jsx)(F.Z,{color:"white"}):(0,Y.jsxs)(Y.Fragment,{children:["commit"===h&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(w.Z,{compact:!0,fullWidth:!0,label:"Commit message",monospace:!0,onChange:function(e){return o((function(n){return q(q({},n),{},{message:e.target.value})}))},required:!0,value:null===r||void 0===r?void 0:r.message}),(0,Y.jsx)(M.Z,{mt:1}),(0,Y.jsxs)(j.ZP,{children:[(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){de({git_branch:q({action_type:"commit"},r)}).then((function(){Fe(),o(null)}))},success:!0,children:"Commit"}),(0,Y.jsx)(M.Z,{mr:1}),(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){de({git_branch:{action_type:"push"}})},primary:!0,children:"Push"})]})]}),"new_branch"===h&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(P.Z,{compact:!0,fullWidth:!0,label:"Branch name",monospace:!0,onChange:function(e){return o({name:e.target.value})},value:null===r||void 0===r?void 0:r.name}),(0,Y.jsx)(M.Z,{mt:1}),(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){re({git_branch:r})},primary:!0,children:"Create"})]}),"clone"===h&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(H.ZP,{children:["Clone from ",(0,Y.jsx)(H.ZP,{default:!0,inline:!0,children:null===ne||void 0===ne?void 0:ne.remote_repo_link})," to ",(0,Y.jsx)(H.ZP,{default:!0,inline:!0,children:null===ne||void 0===ne?void 0:ne.repo_path}),". This ",(0,Y.jsx)(H.ZP,{danger:!0,inline:!0,children:"will overwrite"})," any existing data in the local repository."]}),(0,Y.jsx)(M.Z,{mt:1}),(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){ve({git_branch:{action_type:"clone"}})},primary:!0,children:"Clone"})]}),"pull"===h&&(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){ve({git_branch:{action_type:"pull"}})},primary:!0,children:"Pull"}),"reset_hard"===h&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(M.Z,{mb:1,children:(0,Y.jsx)(H.ZP,{children:a||"This will reset your local branch to match the remote branch."})}),a?(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){d(null),ve({git_branch:{action_type:"reset"}})},warning:!0,children:"Confirm"}):(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){return d("Are you sure you want to reset your branch? Your local changes may be erased.")},primary:!0,children:"Reset branch"})]}),(0,Y.jsx)(M.Z,{mt:1,children:!Oe&&(0,Y.jsxs)(Y.Fragment,{children:[!D&&m&&(0,Y.jsx)(H.ZP,{children:m}),D&&(0,Y.jsx)(H.ZP,{preWrap:!0,danger:!0,children:D})]})})]})})}),[Oe,h,D,ne,m,r,a,xe]),Ie=(0,s.useMemo)((function(){return(0,Y.jsx)(O.Z,{lastMessage:ke,sendMessage:ze})}),[ke,ze]);return(0,Y.jsxs)(T,{children:[(0,Y.jsxs)(L,{children:[(0,Y.jsx)(M.Z,{m:2,children:(0,Y.jsxs)(j.ZP,{children:[(0,Y.jsx)(C.Z,{beforeIcon:(0,Y.jsx)(_.Branch,{}),compact:!0,onChange:function(e){e.preventDefault(),re({git_branch:{name:e.target.value,remote:"mage-repo"}})},placeholder:"Select a branch",value:t,children:null===X||void 0===X?void 0:X.map((function(e){var n=e.name;return(0,Y.jsx)("option",{value:n,children:n},n)}))},"select_branch"),(0,Y.jsx)(M.Z,{ml:2}),(0,Y.jsxs)(C.Z,{compact:!0,onChange:function(e){e.preventDefault(),v(e.target.value),A(!1),x(null),o(null)},value:h,children:[(0,Y.jsx)("option",{value:"",children:"Select an action"}),Object.entries(J).map((function(e){var n=(0,l.Z)(e,2),t=n[0],i=n[1];return(0,Y.jsx)("option",{value:t,children:i},t)}))]},"select_git_action")]})}),(0,Y.jsx)(M.Z,{m:2,children:(0,Y.jsxs)(j.ZP,{alignItems:"center",children:[(0,Y.jsx)(H.ZP,{children:"UI"}),(0,Y.jsx)(M.Z,{ml:1}),(0,Y.jsx)(k.Z,{checked:!!E,monotone:!0,onCheck:function(){return A((function(e){return!e}))}}),(0,Y.jsx)(M.Z,{ml:1}),(0,Y.jsx)(H.ZP,{children:"Terminal"})]})})]}),(0,Y.jsxs)(j.ZP,{children:[(0,Y.jsx)("div",{style:{width:"50%"},children:(0,Y.jsx)(B,{children:"commit"===h?De:(0,Y.jsx)(Y.Fragment,{children:null===xe||void 0===xe||null===(n=xe.split("\\n"))||void 0===n?void 0:n.map((function(e){return(0,Y.jsx)(H.ZP,{monospace:!0,preWrap:!0,small:!0,children:e},e)}))})})}),(0,Y.jsx)("div",{style:{width:"50%"},children:E?(0,Y.jsx)(N,{children:Ie}):Se})]})]})},$=t(65186),K=t(68562),X=t(81106),ee=t(65927),ne=t(48670),te=t(63637),ie=t(89515),re=t(82359),le=t(26304),oe="12px 20px",ce="1px",ae=(0,a.default)(f.ZP).withConfig({displayName:"indexstyle__ButtonStyle",componentId:"sc-hssntx-0"})(["",";"],(function(e){return e.active&&"\n background-color: ".concat((e.theme.background||D.Z.background).dashboard,";\n ")})),se=a.default.div.withConfig({displayName:"indexstyle__DropdownContainerStyle",componentId:"sc-hssntx-1"})(["position:absolute;top:",";right:0;width:","px;display:flex;flex-direction:column;gap:",";overflow:hidden;background-color:",";border-radius:","px;border:1px solid ",";"],(function(e){return e.top||0}),45*A.iI,ce,(function(e){return(e.theme.borders||D.Z.borders).darkLight}),S.n_,(function(e){return(e.theme.borders||D.Z.borders).darkLight})),de=a.default.div.withConfig({displayName:"indexstyle__DropdownHeaderStyle",componentId:"sc-hssntx-2"})(["padding:",";background-color:",";"],oe,(function(e){return(e.theme.background||D.Z.background).panel})),ue=a.default.div.withConfig({displayName:"indexstyle__TimeListContainerStyle",componentId:"sc-hssntx-3"})(["height:","px;display:flex;gap:",";"],20*A.iI,ce),he=a.default.div.withConfig({displayName:"indexstyle__TimeColumnStyle",componentId:"sc-hssntx-4"})(["display:flex;flex-direction:column;align-items:center;flex:1;gap:",";"],ce),fe=a.default.div.withConfig({displayName:"indexstyle__DropdownCellStyle",componentId:"sc-hssntx-5"})(["width:100%;padding:",";display:flex;flex-direction:",";flex-grow:",";justify-content:center;align-items:center;background-color:",";"],oe,(function(e){return e.flexDirection||"unset"}),(function(e){return e.flexGrow||"unset"}),(function(e){return(e.theme.background||D.Z.background).dashboard})),ve=a.default.div.withConfig({displayName:"indexstyle__ToggleGroupStyle",componentId:"sc-hssntx-6"})(["display:flex;flex-direction:column;"]),pe=(0,a.default)(fe).withConfig({displayName:"indexstyle__ToggleDropdownCellStyle",componentId:"sc-hssntx-7"})(["justify-content:flex-start;gap:12px;padding-right:","px;"],1.25*A.iI),me=["active","mountedCallback","time","timeZone"];function xe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function je(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xe(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function ge(e){var n=e.active,t=e.mountedCallback,i=e.time,r=e.timeZone,l=(0,le.Z)(e,me),o=(0,s.useRef)(null);return(0,s.useEffect)((function(){null!==o&&void 0!==o&&o.current&&t(o.current.offsetHeight)}),[t]),(0,Y.jsx)(ae,je(je({},l),{},{active:n,borderLess:!0,borderRadius:"".concat(S.BG,"px"),compact:!0,highlightOnHoverAlt:!0,ref:o,transparent:!0,children:(0,Y.jsx)(H.ZP,{inline:!0,monospace:!0,noWrapping:!0,small:!0,children:"".concat(i," ").concat(r)})}))}var be=(0,s.memo)(ge),ye=t(12468),Ze=t(63055),Ce=t(72191),Me=t(70320),Fe=t(79633),Oe=t(3917),He=t(78419),we=t(53808);var Pe=t(23780);function ke(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function ze(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ke(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ke(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var _e=[Oe.Oh.UTC,Oe.Oh.LOCAL];var De=function(e){var n=e.disabled,t=e.disableTimezoneToggle,i=e.projectName,o=(0,s.useState)((0,Me.qB)()),c=o[0],a=o[1],d=(0,s.useState)((0,we.U2)(He.kL,!1)),u=d[0],h=d[1],f=(0,s.useState)(!1),v=f[0],m=f[1],x=(0,s.useState)((0,Oe.e)({includeSeconds:!0,timeZones:_e})),j=x[0],g=x[1],b=(0,s.useState)(0),Z=b[0],C=b[1],M=c?Oe.Oh.LOCAL:Oe.Oh.UTC,F=window.innerWidth<Ze.nc,O=(0,Pe.VI)(null,{},[],{uuid:"components/ServerTimeDropdown"}),w=(0,l.Z)(O,1)[0],P=(0,y.Db)(z.ZP.projects.useUpdate(i),{onSuccess:function(e){return(0,R.wD)(e,{onErrorCallback:function(e,n){return w({errors:n,response:e})}})}}),_=(0,l.Z)(P,1)[0],D=(0,s.useCallback)((function(){m((function(e){return!e}))}),[]),S=(0,s.useCallback)((function(e){C(e)}),[]),I=(0,s.useCallback)((function(){var e=(0,Oe.e)({includeSeconds:u,timeZones:_e});g((function(n){return n.size===e.size&&n.get(Oe.Oh.UTC)===e.get(Oe.Oh.UTC)?n:e}))}),[u]),E=[{checked:c,disabled:t,label:t?"Display local timezone (must be changed in platform preferences)":"Display local timezone (requires refresh)",onCheck:function(){var e=!c;a((0,Me.hY)(e)),_({project:{features:(0,r.Z)({},re.d.LOCAL_TIMEZONE,e)}})},uuid:re.d.LOCAL_TIMEZONE},{checked:u,label:"Include seconds in current time",onCheck:function(){var e;h((e=!u,!!(0,we.uN)(He.kL,e)))},uuid:"current_time_seconds"}];return(0,s.useEffect)((function(){var e=setInterval((function(){I()}),1e3);return function(){return clearInterval(e)}}),[I]),(0,s.useEffect)((function(){I()}),[u,I]),j?(0,Y.jsx)(p.Z,{onClickOutside:function(){return m(!1)},open:!0,children:(0,Y.jsxs)("div",{style:{position:"relative"},children:[(0,Y.jsx)(be,{active:v,disabled:F||n,mountedCallback:S,onClick:D,time:j.get(M),timeZone:(0,Oe.WT)(M)}),!F&&v&&(0,Y.jsxs)(se,{top:Z,children:[(0,Y.jsx)(de,{children:(0,Y.jsx)(H.ZP,{bold:!0,muted:!0,uppercase:!0,children:"Current Time"})}),(0,Y.jsx)(ue,{children:_e.map((function(e){return(0,Y.jsxs)(he,{children:[(0,Y.jsx)(fe,{children:(0,Y.jsx)(H.ZP,{bold:!0,center:!0,muted:!0,uppercase:!0,children:"".concat(e).concat(e===Oe.Oh.LOCAL?" - ".concat((0,Oe.WT)(e)):"")})}),(0,Y.jsxs)(fe,{flexDirection:"column",flexGrow:3,children:[(0,Y.jsx)(H.ZP,{bold:!0,center:!0,color:Fe.J$,largeLg:!0,children:j.get(e)}),(0,Y.jsx)(H.ZP,{center:!0,muted:!0,small:!0,children:e===Oe.Oh.UTC?"Universal Time":Oe.mi[e]})]})]},e)}))}),(0,Y.jsx)(ve,{children:E.map((function(e){return(0,Y.jsxs)(pe,{children:[(0,Y.jsx)(k.Z,{checked:e.checked,compact:!0,disabled:e.disabled,onCheck:e.onCheck,purpleBackground:!e.disabled}),(0,Y.jsx)(H.ZP,{children:e.label}),e.uuid===re.d.LOCAL_TIMEZONE&&(0,Y.jsx)(ye.Z,ze(ze({},Me.EB),{},{appearAbove:!0,appearBefore:!0,size:Ce.bL}))]},e.label)}))})]})]})}):null},Se=t(58401),Ie=t(59457),Ee=t(77417),Ae=t(46684),Le=t(16682),Ne=t(68804),Te=a.default.div.withConfig({displayName:"indexstyle__LinkStyle",componentId:"sc-y3uzxv-0"})(["padding:","px ","px;&:hover{cursor:pointer;","}",""],.5*A.iI,1.5*A.iI,(function(e){return"\n background-color: ".concat((e.theme.interactive||D.Z.interactive).hoverBackground,";\n ")}),(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme.interactive||D.Z.interactive).hoverBackground,";\n ")})),Be=t(95363),Ue=t(74445),Re=t(42122),We=t(66472),Ge=t(95924),Ye=t(69419),Ve=t(89538);function qe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function Je(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qe(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Qe=function(e){var n,t,o=e.breadcrumbs,b=e.hideActions,y=e.menuItems,Z=e.project,C=e.version,F=(0,Pe.VI)(null,{},[],{uuid:"shared/Header"}),O=(0,l.Z)(F,1)[0],w=(0,s.useContext)(a.ThemeContext),P=(0,G.PR)(),k=(0,s.useState)(null),D=k[0],S=k[1],I=(0,s.useState)(!1),E=I[0],L=I[1],N=(0,s.useState)(!1),T=N[0],B=N[1],U=(0,s.useState)(null),R=U[0],W=U[1],V=(0,s.useState)(!1),q=V[0],J=V[1],le=(0,s.useState)(null),oe=le[0],ce=le[1],ae=(0,s.useRef)(null),se=(0,s.useRef)(null),de=(0,s.useRef)(null),ue=(0,d.useRouter)(),he=u.Z.isLoggedIn(),fe=(0,Ie.Z)(z.ZP.git_branches.detail,"test",{_format:"with_basic_details"},{revalidateOnFocus:!1},{pauseFetch:(0,G.YB)()&&!he},{delay:11e3}),ve=fe.data,pe=fe.mutate,me=(0,s.useMemo)((function(){return(null===ve||void 0===ve?void 0:ve.git_branch)||{}}),[ve]),xe=me.is_git_integration_enabled,je=me.name,ge=(0,Se.Z)().design,be=(0,Ee.Z)({showError:O}),ye=be.featureEnabled,Ze=be.featureUUIDs,Ce=be.isLoadingProject,Oe=be.isLoadingUpdate,He=be.project,we=be.rootProject,ke=be.updateProject,ze=(0,s.useMemo)((function(){return Z||He}),[He,Z]),_e=(0,s.useMemo)((function(){return C||(null===ze||void 0===ze?void 0:ze.version)}),[ze,C]),qe=(0,s.useMemo)((function(){return Le.WH.CLOSED===D||Le.WH.OPEN===D||(null===ye||void 0===ye?void 0:ye(null===Ze||void 0===Ze?void 0:Ze.COMMAND_CENTER))}),[D,ye,Ze]),Qe=!(0,Re.Qr)(null===ze||void 0===ze?void 0:ze.features_override);se.current=ze;var $e=(0,s.useCallback)((function(){qe?(0,We.WJ)():(L(!0),ke({features:Je(Je({},(null===ze||void 0===ze?void 0:ze.features)||{}),{},(0,r.Z)({},null===Ze||void 0===Ze?void 0:Ze.COMMAND_CENTER,!0))}).then((function(e){var n;if(null!==e&&void 0!==e&&null!==(n=e.data)&&void 0!==n&&n.error){var t;L(!1),O({errors:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.error,response:e})}else{var i=new CustomEvent(Ne.YS.COMMAND_CENTER_ENABLED);window.dispatchEvent(i)}})))}),[qe,null===Ze||void 0===Ze?void 0:Ze.COMMAND_CENTER,null===ze||void 0===ze?void 0:ze.features,O,ke]),Ke=[];if(we&&Ke.push({label:function(){return null===we||void 0===we?void 0:we.name},linkProps:{href:"/"}}),ze){var Xe={label:function(){return null===ze||void 0===ze?void 0:ze.name}};we?(Xe.loading=Oe&&!E,Xe.options=Object.keys((null===we||void 0===we?void 0:we.projects)||{}).map((function(e){return{onClick:function(){ke({activate_project:e}).then((function(e){var n;if(null!==e&&void 0!==e&&null!==(n=e.data)&&void 0!==n&&n.error){var t;O({errors:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.error,response:e})}else{var i,r,l,o=!(null===e||void 0===e||null===(i=e.data)||void 0===i||null===(r=i.project)||void 0===r||null===(l=r.features)||void 0===l||!l.display_local_timezone);(0,Me.hY)(o),window.location.reload()}}))},selected:e===(null===ze||void 0===ze?void 0:ze.name),uuid:e}}))):Xe.linkProps={href:"/"},Ke.push(Xe)}else Ce||b||Ke.push({bold:!0,danger:!0,label:function(){return"Error loading project configuration"}});var en=(0,s.useMemo)((function(){return[].concat(Ke,(0,i.Z)(o||[]))}),[Ke,o,ze]),nn=ue.query.pipeline,tn=(ze||{}).latest_version,rn=(0,s.useState)(null),ln=rn[0],on=rn[1],cn=((0,s.useMemo)((function(){var e,n,t=null===ge||void 0===ge||null===(e=ge.components)||void 0===e||null===(n=e.header)||void 0===n?void 0:n.media;if(t){var i=new Image,r=(null===t||void 0===t?void 0:t.url)||(null===t||void 0===t?void 0:t.file_path);if("undefined"!==typeof r&&null!==r)return i.src=r,i.onload=function(){on(i)},i}}),[ge,on]),(0,s.useMemo)((function(){var e,n,t=Ae.y7,i=(0,Y.jsx)($.Z,{height:Ae.y7});if(null!==ge&&void 0!==ge&&null!==(e=ge.components)&&void 0!==e&&null!==(n=e.header)&&void 0!==n&&n.media){var r,l,o=null===ge||void 0===ge||null===(r=ge.components)||void 0===r||null===(l=r.header)||void 0===l?void 0:l.media;if(null!==ln){var a=((null===ln||void 0===ln?void 0:ln.width)||1)/((null===ln||void 0===ln?void 0:ln.height)||1);t=Ae.sQ,i=(0,Y.jsx)(Ae.XD,{height:Ae.sQ,width:Ae.sQ*a,url:(null===o||void 0===o?void 0:o.url)||(null===o||void 0===o?void 0:o.file_path)})}}return(0,Y.jsx)(c(),{as:"/",href:"/",passHref:!0,children:(0,Y.jsx)(ne.Z,{block:!0,height:t,noHoverUnderline:!0,noOutline:!0,children:i})})}),[ln,ge])),an=b?[]:[{label:function(){return"Settings"},linkProps:{href:"/settings/workspace/preferences"},uuid:"user_settings"},{label:function(){return"Launch command center"},onClick:function(e){(0,Ge.j)(e),$e()},uuid:"Launch command center"}];(0,G.YB)()&&an.push({label:function(){return"Sign out"},onClick:function(){u.Z.logout((function(){z.ZP.sessions.updateAsyncServer(null,1).then((function(){(0,Ye.nL)("/sign-in")})).catch((function(){(0,Ye.nL)("/")}))}))},uuid:"sign_out"});var sn=(0,Ve.dd)((function(){return(0,Y.jsx)(Q,{branch:je,fetchBranch:pe})}),{},[je,pe],{background:!0,uuid:"git_actions"}),dn=(0,l.Z)(sn,2),un=dn[0],hn=(dn[1],(0,s.useMemo)((function(){return(null===je||void 0===je?void 0:je.length)>=21?"".concat(je.slice(0,21),"..."):je}),[je])),fn=(0,s.useMemo)((function(){return!(!P||null===P||void 0===P||!P.avatar)&&!/[A-Za-z0-9]+/.exec((null===P||void 0===P?void 0:P.avatar)||"")}),[P]),vn=(0,s.useMemo)((function(){return!(!P||null===P||void 0===P||!P.avatar)&&!!/[A-Za-z0-9]+/.exec((null===P||void 0===P?void 0:P.avatar)||"")}),[P]),pn=(0,s.useMemo)((function(){var e;if(!P||null===P||void 0===P||!P.avatar)return(0,Y.jsx)(te.Z,{});var n={color:null===w||void 0===w||null===(e=w.content)||void 0===e?void 0:e.active,fontFamily:Be.v$};return vn?(n.fontSize=2*A.iI,n.lineHeight="".concat(2*A.iI,"px"),n.position="relative",n.top=1):n.fontSize=3*A.iI,(0,Y.jsx)("div",{style:n,children:null===P||void 0===P?void 0:P.avatar})}),[vn,P]);return(0,s.useEffect)((function(){var e=function(e){var n,t,i=e.detail;null!==i&&void 0!==i&&i.state&&(S(null===i||void 0===i?void 0:i.state),Le.WH.MOUNTED===(null===i||void 0===i?void 0:i.state)&&(null!==se&&void 0!==se&&null!==(n=se.current)&&void 0!==n&&null!==(t=n.features)&&void 0!==t&&t[re.d.COMMAND_CENTER]||setTimeout((function(){(0,We.WJ)(),L(!1)}),1)))};return window.addEventListener(Ne.Mt,e),function(){window.removeEventListener(Ne.Mt,e)}}),[]),(0,Y.jsx)(Ae.I5,{children:(0,Y.jsx)(m.Z,{children:(0,Y.jsxs)(j.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"space-between",children:[(0,Y.jsxs)(x.Z,{alignItems:"center",children:[cn,(0,Y.jsx)(h.Z,{breadcrumbs:en})]}),!!ze&&!b&&(0,Y.jsxs)(x.Z,{flex:1,alignItems:"center",justifyContent:"center",children:[(0,Y.jsx)(M.Z,{ml:A.cd}),(0,Y.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(e){(0,Ge.j)(e),$e()},children:(0,Y.jsx)(Ae._m,{active:Le.WH.OPEN===D,children:(0,Y.jsxs)(j.ZP,{alignItems:"center",children:[(0,Y.jsx)(Y.Fragment,{children:Le.WH.OPEN===D?(0,Y.jsx)(_.UFO,{muted:!0,size:2*A.iI}):(0,Y.jsx)(_.Planet,{size:2*A.iI,success:!E&&!qe,warning:E})}),(0,Y.jsx)("div",{style:{marginRight:1.5*A.iI}}),Le.WH.OPEN!==D&&(0,Y.jsx)(H.ZP,{default:!0,noWrapping:!0,weightStyle:4,children:qe?"Command Center":E?"Launching Command Center":"Launch Command Center"}),Le.WH.OPEN===D&&(0,Y.jsx)(H.ZP,{muted:!0,noWrapping:!0,children:"Command Center launched"}),E&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("div",{style:{marginRight:1.5*A.iI}}),(0,Y.jsx)(ee.Z,{color:null===w||void 0===w||null===(n=w.accent)||void 0===n?void 0:n.warning,loadingStyle:ee.F.BLOCKS,width:1.5*A.iI})]}),qe&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("div",{style:{marginRight:1.5*A.iI}}),(0,Y.jsx)(X.Z,{compact:!0,settings:(0,Ue.MK)(),small:!0})]})]})})}),(0,Y.jsx)(M.Z,{mr:A.cd})]}),(0,Y.jsxs)(x.Z,{alignItems:"center",children:[xe&&je&&(0,Y.jsx)(M.Z,{mr:1,children:(0,Y.jsx)(K.ZP,{compact:!0,highlightOnHoverAlt:!0,noBackground:!0,noHoverUnderline:!0,onClick:un,sameColorAsText:!0,title:je,uuid:"Header/GitActions",children:(0,Y.jsxs)(j.ZP,{alignItems:"center",children:[(0,Y.jsx)(_.BranchAlt,{size:1.5*A.iI}),(0,Y.jsx)(M.Z,{ml:1}),(0,Y.jsx)(H.ZP,{monospace:!0,noWrapping:!0,small:!0,children:hn})]})})}),tn&&_e&&tn!==_e&&(0,Y.jsx)(f.ZP,{backgroundColor:Fe.$R,borderLess:!0,compact:!0,linkProps:{href:"https://docs.mage.ai/about/releases"},noHoverUnderline:!0,pill:!0,sameColorAsText:!0,target:"_blank",title:"Update to version ".concat(tn),children:(0,Y.jsx)(H.ZP,{black:!0,bold:!0,children:"Update"})}),_e&&"undefined"!==typeof _e&&(0,Y.jsx)(M.Z,{px:1,children:(0,Y.jsx)(ne.Z,{href:"https://www.mage.ai/changelog",monospace:!0,noWrapping:!0,openNewWindow:!0,sameColorAsText:!0,small:!0,children:"v".concat(_e)})}),(0,Y.jsx)(M.Z,{ml:1,children:(0,Y.jsx)(De,{disableTimezoneToggle:Qe,disabled:b,projectName:null===ze||void 0===ze?void 0:ze.name})}),(0,Y.jsx)(M.Z,{ml:1,children:(0,Y.jsx)(K.ZP,{beforeElement:(0,Y.jsx)(_.Slack,{}),compact:!0,highlightOnHoverAlt:!0,inline:!0,linkProps:{as:"https://www.mage.ai/chat",href:"https://www.mage.ai/chat"},noBackground:!0,noHoverUnderline:!0,openNewTab:!0,sameColorAsText:!0,uuid:"Header/live_chat",children:"Live help"})}),y&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(M.Z,{ml:2}),(0,Y.jsx)(p.Z,{onClickOutside:function(){return W(null)},open:!0,style:{position:"relative"},children:(0,Y.jsxs)(j.ZP,{children:[(0,Y.jsx)(Te,{highlighted:0===R,onClick:function(){return W((function(e){return 0===e?null:0}))},onMouseEnter:function(){return W((function(e){return null!==e?0:null}))},ref:ae,children:(0,Y.jsx)(H.ZP,{children:"Menu"})}),(0,Y.jsx)(g.Z,{alternateBackground:!0,items:y,onClickCallback:function(){return W(null)},open:0===R,parentRef:ae,rightOffset:0,setConfirmationAction:ce,setConfirmationDialogueOpen:J,uuid:"PipelineDetail/Header/menu"})]})}),(0,Y.jsx)(p.Z,{onClickOutside:function(){return J(!1)},open:q,children:(0,Y.jsx)(ie.Z,{danger:!0,onCancel:function(){return J(!1)},onClick:oe,right:16*A.iI,subtitle:"This is irreversible and will immediately delete everything associated with the pipeline, including its blocks, triggers, runs, logs, and history.",title:"Are you sure you want to delete the pipeline ".concat(nn,"?"),width:40*A.iI})})]}),(he||!(0,G.YB)())&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(M.Z,{ml:1}),(0,Y.jsx)(p.Z,{onClickOutside:function(){return B(!1)},open:!0,style:{position:"relative"},children:(0,Y.jsxs)(j.ZP,{alignItems:"flex-end",flexDirection:"column",children:[(0,Y.jsx)(K.ZP,{compact:!0,highlightOnHoverAlt:!0,inline:!0,noBackground:!0,noHoverUnderline:!0,onClick:function(){return B(!0)},ref:de,uuid:"Header/menu",children:fn&&(null===P||void 0===P||null===(t=P.avatar)||void 0===t?void 0:t.length)>=2?pn:(0,Y.jsx)(v.Z,{color:Fe.Jm,size:4*A.iI,children:pn})}),(0,Y.jsx)(g.Z,{alternateBackground:!0,items:an,onClickCallback:function(){return B(!1)},open:T,parentRef:de,rightOffset:0,uuid:"shared/Header/user_menu"})]})})]})]})]})})})}},63637:function(e,n,t){var i=t(25976),r=t(28598),l=i.default.svg.withConfig({displayName:"Mage8Bit__SVGStyle",componentId:"sc-cj6ltf-0"})([""]);n.Z=function(e){var n=e.size,t=void 0===n?20:n,i=e.viewBox,o=void 0===i?"0 0 20 20":i;return(0,r.jsxs)(l,{height:t,viewBox:o,width:t,children:[(0,r.jsxs)("g",{clipPath:"url(#clip0_297_42814)",children:[(0,r.jsx)("path",{d:"M13.334 0h1.66667v1.66667H13.334zM11.666 1.6665h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M10 1.6665h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M8.33398 1.6665h1.66667v1.66667H8.33398z",fill:"#AF93FF"}),(0,r.jsx)("path",{d:"M8.33398 3.3335h1.66667v1.66667H8.33398z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 3.3335h1.66667v1.66667H6.66602z",fill:"#AF93FF"}),(0,r.jsx)("path",{d:"M3.33398 5h1.66667v1.66667H3.33398z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M5 5h1.66667v1.66667H5z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 5h1.66667v1.66667H6.66602z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 5h1.66667v1.66667H6.66602z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 8.3335h1.66667v1.66667H6.66602z",fill:"#000"}),(0,r.jsx)("path",{d:"M6.66602 6.6665h1.66667v1.66667H6.66602z",fill:"#AD8FFF"}),(0,r.jsx)("path",{d:"M6.66602 10h1.66667v1.66667H6.66602z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M8.33398 6.6665h1.66667v1.66667H8.33398z",fill:"#AD8FFF"}),(0,r.jsx)("path",{d:"M1.66602 13.3335h1.66667v1.66667H1.66602z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M1.66602 11.6665h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,r.jsx)("path",{d:"M1.66602 10h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,r.jsx)("path",{d:"M1.66602 8.3335h1.66667v1.66667H1.66602zM1.66602 6.6665h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,r.jsx)("path",{d:"M1.66602 6.6665h1.66667v1.66667H1.66602zM0 0h1.66667v1.66667H0zM3.33398 1.6665h1.66667v1.66667H3.33398zM0 3.3335h1.66667v1.66667H0z",fill:"#2ECDF7"}),(0,r.jsx)("path",{d:"M1.66602 16.6665h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,r.jsx)("path",{d:"M1.66602 16.6665h1.66667v1.66667H1.66602zM1.66602 18.3335h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,r.jsx)("path",{d:"M1.66602 15h1.66667v1.66667H1.66602zM3.33398 15h1.66667v1.66667H3.33398z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M3.33398 16.6665h1.66667v1.66667H3.33398z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M3.33398 13.3335h1.66667v1.66667H3.33398z",fill:"#AD8FFF"}),(0,r.jsx)("path",{d:"M8.33398 8.3335h1.66667v1.66667H8.33398z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M10 6.6665h1.66667v1.66667H10z",fill:"#AD8FFF"}),(0,r.jsx)("path",{d:"M10 10h1.66667v1.66667H10z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M11.666 6.6665h1.66667v1.66667H11.666z",fill:"#AD8FFF"}),(0,r.jsx)("path",{d:"M11.666 8.3335h1.66667v1.66667H11.666z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M8.33398 10h1.66667v1.66667H8.33398z",fill:"#FF8DA9"}),(0,r.jsx)("path",{d:"M8.33398 11.6665h1.66667v1.66667H8.33398z",fill:"#FF8DA9"}),(0,r.jsx)("path",{d:"M6.66602 11.6665h1.66667v1.66667H6.66602z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M6.66602 11.6665h1.66667v1.66667H6.66602z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M5 10h1.66667v1.66667H5z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M5 8.3335h1.66667v1.66667H5z",fill:"#232429"}),(0,r.jsx)("path",{d:"M8.33398 11.6665h1.66667v1.66667H8.33398zM8.33398 13.3335h1.66667v1.66667H8.33398z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M10 11.6665h1.66667v1.66667H10z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M11.666 10h1.66667v1.66667H11.666zM13.334 6.6665h1.66667v1.66667H13.334zM13.334 8.3335h1.66667v1.66667H13.334z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M15 8.3335h1.66667v1.66667H15z",fill:"#757575"}),(0,r.jsx)("path",{d:"M15 10h1.66667v1.66667H15z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M10 8.3335h1.66667v1.66667H10z",fill:"#000"}),(0,r.jsx)("path",{d:"M8.33398 5h1.66667v1.66667H8.33398zM11.666 5h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M13.334 10h1.66667v1.66667H13.334zM11.666 11.6665h1.66667v1.66667H11.666zM10 13.3335h1.66667v1.66667H10z",fill:"#501FD8"}),(0,r.jsx)("path",{d:"M8.33398 15h1.66667v1.66667H8.33398zM6.66602 13.3335h1.66667v1.66667H6.66602zM15 11.6665h1.66667v1.66667H15z",fill:"#501FD8"}),(0,r.jsx)("path",{d:"M16.666 11.6665h1.66667v1.66667H16.666zM16.666 13.3335h1.66667v1.66667H16.666z",fill:"#501FD8"}),(0,r.jsx)("path",{d:"M15 13.3335h1.66667v1.66667H15z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M13.334 13.3335h1.66667v1.66667H13.334zM13.334 11.6665h1.66667v1.66667H13.334zM11.666 13.3335h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M11.666 15h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M10 15h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M8.33398 16.6665h1.66667v1.66667H8.33398z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 15h1.66667v1.66667H6.66602z",fill:"#AF93FF"}),(0,r.jsx)("path",{d:"M6.66602 16.6665h1.66667v1.66667H6.66602z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M5 16.6665h1.66667v1.66667H5z",fill:"#AF93FF"}),(0,r.jsx)("path",{d:"M5 18.3335h1.66667v1.66667H5z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 18.3335h1.66667v1.66667H6.66602zM8.33398 18.3335h1.66667v1.66667H8.33398z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M10 18.3335h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M11.666 18.3335h1.66667v1.66667H11.666zM13.334 18.3335h1.66667v1.66667H13.334z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M15 18.3335h1.66667v1.66667H15z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M16.666 18.3335h1.66667v1.66667H16.666z",fill:"#652EFF"}),(0,r.jsx)("path",{d:"M3.33398 18.3335h1.66667v1.66667H3.33398zM10 16.6665h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M11.666 16.6665h1.66667v1.66667H11.666zM13.334 15h1.66667v1.66667H13.334z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M13.334 16.6665h1.66667v1.66667H13.334z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M15 16.6665h1.66667v1.66667H15z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M15 15h1.66667v1.66667H15z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M16.666 15h1.66667v1.66667H16.666zM18.334 16.6665h1.66667v1.66667H18.334zM18.334 18.3335h1.66667v1.66667H18.334z",fill:"#501FD8"}),(0,r.jsx)("path",{d:"M16.666 16.6665h1.66667v1.66667H16.666z",fill:"#652EFF"}),(0,r.jsx)("path",{d:"M13.334 5h1.66667v1.66667H13.334z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M15 5h1.66667v1.66667H15zM10 5h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M10 3.3335h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M11.666 3.3335h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M11.666 0h1.66667v1.66667H11.666z",fill:"#AF93FF"})]}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_297_42814",children:(0,r.jsx)("path",{d:"M0 0h20v20H0z",fill:"#fff"})})})]})}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1557],{54750:function(e,n,t){var i=t(82394),r=t(12691),l=t.n(r),o=t(55485),c=t(48670),a=t(44085),s=t(38276),d=t(4190),u=t(30160),h=t(72473),f=t(70515),v=t(28598),p=t(82684);function m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function x(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.breadcrumbs,t=e.noMarginLeft,i=n.length,r=[];return n.forEach((function(e,n){var m=e.bold,j=e.danger,g=e.label,b=e.linkProps,y=e.loading,Z=e.monospace,C=void 0===Z||Z,M=e.onClick,F=e.options,O=g();i>=2&&n>=1&&r.push((0,v.jsx)(s.Z,{mx:1,children:(0,v.jsx)(h.ChevronRight,{muted:!0})},"divider-".concat(O)));var H=(0,v.jsx)(u.ZP,{bold:m,danger:j,default:!m,monospace:C,noWrapping:!0,children:O});if((null===F||void 0===F?void 0:F.length)>=1){var w,P,k=null===F||void 0===F?void 0:F.find((function(e){return!!e.selected}));if(k)(w=((null===k||void 0===k||null===(P=k.uuid)||void 0===P?void 0:P.length)||0)*f.ro)&&(w+=3*f.iI,y&&(w+=2*f.iI));H=(0,v.jsx)(o.ZP,{alignItems:"center",children:(0,v.jsx)(a.Z,{afterIcon:y?(0,v.jsx)(d.Z,{inverted:!0,small:!0}):null,danger:j,defaultTextColor:!m,maxWidth:w||null,monospace:C,noBackground:!0,noBorder:!0,onChange:function(e){var n,t=e.target.value,i=null===F||void 0===F?void 0:F.find((function(e){return e.uuid===t}));i&&null!==i&&void 0!==i&&i.onClick&&(null===i||void 0===i||null===(n=i.onClick)||void 0===n||n.call(i,t))},paddingHorizontal:0,paddingVertical:0,value:(null===k||void 0===k?void 0:k.uuid)||"",children:null===F||void 0===F?void 0:F.map((function(e){var n=e.label,t=e.selected,i=e.uuid,r=n?null===n||void 0===n?void 0:n():i;return(0,v.jsx)("option",{value:i,children:t?i:r},i)}))})})}var z=(0,v.jsx)(s.Z,{ml:t||0!==n?0:2,children:H},"breadcrumb-".concat(O));b?z=(0,p.createElement)(l(),x(x({},b),{},{key:"breadcrumb-link-".concat(O),passHref:!0}),(0,v.jsx)(c.Z,{block:!0,default:!m,noOutline:!0,sameColorAsText:m,children:z})):M&&(z=(0,v.jsx)(c.Z,{block:!0,default:!m,noOutline:!0,onClick:M,preventDefault:!0,sameColorAsText:m,children:z})),r.push(z)})),(0,v.jsx)(o.ZP,{alignItems:"center",children:r})}},31557:function(e,n,t){t.d(n,{Z:function(){return Qe}});var i=t(21831),r=t(82394),l=t(75582),o=t(12691),c=t.n(o),a=t(25976),s=t(82684),d=t(34376),u=t(40761),h=t(54750),f=t(71180),v=t(39867),p=t(50724),m=t(58036),x=t(97618),j=t(55485),g=t(70374),b=t(56085),y=t(69864),Z=t(70652),C=t(44085),M=t(38276),F=t(4190),O=t(28026),H=t(30160),w=t(35576),P=t(17488),k=t(69650),z=t(35686),_=t(72473),D=t(44897),S=t(42631),I=t(31353),E=t(47041),A=t(70515),L=a.default.div.withConfig({displayName:"GitActionsstyle__HeaderStyle",componentId:"sc-ynrhio-0"})(["border-bottom:1px solid #1B1C20;height:","px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;"],I.Mz),N=a.default.div.withConfig({displayName:"GitActionsstyle__TerminalStyle",componentId:"sc-ynrhio-1"})(["height:calc(75vh - ","px);position:relative;"],I.Mz),T=a.default.div.withConfig({displayName:"GitActionsstyle__PanelStyle",componentId:"sc-ynrhio-2"})(["height:75vh;min-height:300px;width:75vw;backgroundColor:#232429;border-radius:","px;",""],S.n_,(function(e){return"\n background-color: ".concat((e.theme.background||D.Z.background).panel,";\n ")})),B=a.default.div.withConfig({displayName:"GitActionsstyle__OutputStyle",componentId:"sc-ynrhio-3"})([""," padding:","px;height:calc(75vh - ","px);overflow-y:auto;"],E.w5,2*A.iI,I.Mz),U=t(4383),R=t(72619),W=t(86735),G=t(50178),Y=t(28598);function V(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function q(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?V(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):V(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var J={clone:"Clone repository",new_branch:"Create new branch",commit:"Commit & push",pull:"Pull",reset_hard:"Hard reset"};var Q=function(e){var n,t=e.branch,i=(e.fetchBranch,(0,s.useState)()),r=i[0],o=i[1],c=(0,s.useState)(),a=c[0],d=c[1],u=(0,s.useState)(),h=u[0],v=u[1],p=(0,s.useState)(),m=p[0],x=p[1],g=(0,s.useState)(),D=g[0],S=g[1],I=(0,s.useState)(),E=I[0],A=I[1],V=z.ZP.git_branches.list({include_remote_branches:1}),Q=V.data,$=V.isValidating,K=V.mutate,X=(0,s.useMemo)((function(){return null===Q||void 0===Q?void 0:Q.git_branches}),[Q]),ee=z.ZP.syncs.list().data,ne=(0,s.useMemo)((function(){var e;if(ee)return null===(e=ee.syncs)||void 0===e?void 0:e[0]}),[ee]),te=(0,y.Db)(z.ZP.git_branches.useCreate(),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(){K(),window.location.reload()},onErrorCallback:function(e){var n=e.error.exception;S(n)}})}}),ie=(0,l.Z)(te,2),re=ie[0],le=ie[1].isLoading,oe=(0,y.Db)((function(){return z.ZP.git_branches.useUpdate(encodeURIComponent(t))({git_branch:{action_type:"status"}})}),{onSuccess:function(e){return(0,R.wD)(e,{onErrorCallback:function(e){var n=e.error.exception;S(n)}})}}),ce=(0,l.Z)(oe,1)[0],ae=(0,y.Db)(z.ZP.git_branches.useUpdate(encodeURIComponent(t)),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(){S(null),x("DONE")},onErrorCallback:function(e){var n=e.error.exception;S(n)}})}}),se=(0,l.Z)(ae,2),de=se[0],ue=se[1].isLoading,he=(0,y.Db)(z.ZP.git_branches.useUpdate(encodeURIComponent(t)),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(){S(null),window.location.reload()},onErrorCallback:function(e){var n=e.error.exception;S(n)}})}}),fe=(0,l.Z)(he,2),ve=fe[0],pe=fe[1].isLoading,me=(0,s.useState)(),xe=me[0],je=me[1],ge=(0,s.useState)([]),be=ge[0],ye=ge[1],Ze=(0,s.useState)([]),Ce=Ze[0],Me=Ze[1],Fe=(0,s.useCallback)((function(){ce().then((function(e){var n=e.data,t=null===n||void 0===n?void 0:n.git_branch,i=null===t||void 0===t?void 0:t.status,r=null===t||void 0===t?void 0:t.modified_files,l=null===t||void 0===t?void 0:t.untracked_files;je(i),ye(l),Me(r)}))}),[ce]),Oe=(0,s.useMemo)((function(){return le||ue||pe}),[le,ue,pe]);(0,s.useEffect)((function(){$||Fe()}),[h,$,Fe]);var He=(0,s.useMemo)((function(){return(0,G.PR)()||{}}),[]),we=(0,s.useMemo)((function(){var e={term_name:null!==He&&void 0!==He&&He.id?"git_".concat(null===He||void 0===He?void 0:He.id):"git"};return null!==ne&&void 0!==ne&&ne.repo_path&&(e.cwd=null===ne||void 0===ne?void 0:ne.repo_path),e}),[null===ne||void 0===ne?void 0:ne.repo_path,He]),Pe=(0,b.ZP)((0,U.Ib)("terminal"),{shouldReconnect:function(){return!0}},"cwd"in we),ke=Pe.lastMessage,ze=Pe.sendMessage,_e=(0,s.useCallback)((function(e){return(0,Y.jsx)(Z.Z,{checked:((null===r||void 0===r?void 0:r.files)||[]).includes(e),label:(0,Y.jsx)(H.ZP,{small:!0,children:e}),onClick:function(){o((function(n){var t=(null===n||void 0===n?void 0:n.files)||[];return t=t.includes(e)?(0,W.Od)(t,(function(n){return n===e})):[e].concat(t),q(q({},n),{},{files:t})}))},small:!0},e)}),[r]),De=(0,s.useMemo)((function(){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(f.ZP,{onClick:function(){return o((function(e){return q(q({},e),{},{files:Ce.concat(be)})}))},children:"Include all changes"}),Ce&&Ce.length>0&&(0,Y.jsxs)(M.Z,{mb:1,children:[(0,Y.jsx)(M.Z,{my:1,children:(0,Y.jsx)(H.ZP,{children:"Modified files"})}),Ce.map(_e)]}),be&&be.length>0&&(0,Y.jsxs)(M.Z,{mb:1,children:[(0,Y.jsx)(M.Z,{my:1,children:(0,Y.jsx)(H.ZP,{children:"Untracked files"})}),be.map(_e)]})]})}),[_e,Ce,be]),Se=(0,s.useMemo)((function(){return(0,Y.jsx)(M.Z,{p:2,children:Oe?(0,Y.jsx)(F.Z,{color:"white"}):(0,Y.jsxs)(Y.Fragment,{children:["commit"===h&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(w.Z,{compact:!0,fullWidth:!0,label:"Commit message",monospace:!0,onChange:function(e){return o((function(n){return q(q({},n),{},{message:e.target.value})}))},required:!0,value:null===r||void 0===r?void 0:r.message}),(0,Y.jsx)(M.Z,{mt:1}),(0,Y.jsxs)(j.ZP,{children:[(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){de({git_branch:q({action_type:"commit"},r)}).then((function(){Fe(),o(null)}))},success:!0,children:"Commit"}),(0,Y.jsx)(M.Z,{mr:1}),(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){de({git_branch:{action_type:"push"}})},primary:!0,children:"Push"})]})]}),"new_branch"===h&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(P.Z,{compact:!0,fullWidth:!0,label:"Branch name",monospace:!0,onChange:function(e){return o({name:e.target.value})},value:null===r||void 0===r?void 0:r.name}),(0,Y.jsx)(M.Z,{mt:1}),(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){re({git_branch:r})},primary:!0,children:"Create"})]}),"clone"===h&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(H.ZP,{children:["Clone from ",(0,Y.jsx)(H.ZP,{default:!0,inline:!0,children:null===ne||void 0===ne?void 0:ne.remote_repo_link})," to ",(0,Y.jsx)(H.ZP,{default:!0,inline:!0,children:null===ne||void 0===ne?void 0:ne.repo_path}),". This ",(0,Y.jsx)(H.ZP,{danger:!0,inline:!0,children:"will overwrite"})," any existing data in the local repository."]}),(0,Y.jsx)(M.Z,{mt:1}),(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){ve({git_branch:{action_type:"clone"}})},primary:!0,children:"Clone"})]}),"pull"===h&&(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){ve({git_branch:{action_type:"pull"}})},primary:!0,children:"Pull"}),"reset_hard"===h&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(M.Z,{mb:1,children:(0,Y.jsx)(H.ZP,{children:a||"This will reset your local branch to match the remote branch."})}),a?(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){d(null),ve({git_branch:{action_type:"reset"}})},warning:!0,children:"Confirm"}):(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){return d("Are you sure you want to reset your branch? Your local changes may be erased.")},primary:!0,children:"Reset branch"})]}),(0,Y.jsx)(M.Z,{mt:1,children:!Oe&&(0,Y.jsxs)(Y.Fragment,{children:[!D&&m&&(0,Y.jsx)(H.ZP,{children:m}),D&&(0,Y.jsx)(H.ZP,{preWrap:!0,danger:!0,children:D})]})})]})})}),[Oe,h,D,ne,m,r,a,xe]),Ie=(0,s.useMemo)((function(){return(0,Y.jsx)(O.Z,{lastMessage:ke,sendMessage:ze})}),[ke,ze]);return(0,Y.jsxs)(T,{children:[(0,Y.jsxs)(L,{children:[(0,Y.jsx)(M.Z,{m:2,children:(0,Y.jsxs)(j.ZP,{children:[(0,Y.jsx)(C.Z,{beforeIcon:(0,Y.jsx)(_.Branch,{}),compact:!0,onChange:function(e){e.preventDefault(),re({git_branch:{name:e.target.value,remote:"mage-repo"}})},placeholder:"Select a branch",value:t,children:null===X||void 0===X?void 0:X.map((function(e){var n=e.name;return(0,Y.jsx)("option",{value:n,children:n},n)}))},"select_branch"),(0,Y.jsx)(M.Z,{ml:2}),(0,Y.jsxs)(C.Z,{compact:!0,onChange:function(e){e.preventDefault(),v(e.target.value),A(!1),x(null),o(null)},value:h,children:[(0,Y.jsx)("option",{value:"",children:"Select an action"}),Object.entries(J).map((function(e){var n=(0,l.Z)(e,2),t=n[0],i=n[1];return(0,Y.jsx)("option",{value:t,children:i},t)}))]},"select_git_action")]})}),(0,Y.jsx)(M.Z,{m:2,children:(0,Y.jsxs)(j.ZP,{alignItems:"center",children:[(0,Y.jsx)(H.ZP,{children:"UI"}),(0,Y.jsx)(M.Z,{ml:1}),(0,Y.jsx)(k.Z,{checked:!!E,monotone:!0,onCheck:function(){return A((function(e){return!e}))}}),(0,Y.jsx)(M.Z,{ml:1}),(0,Y.jsx)(H.ZP,{children:"Terminal"})]})})]}),(0,Y.jsxs)(j.ZP,{children:[(0,Y.jsx)("div",{style:{width:"50%"},children:(0,Y.jsx)(B,{children:"commit"===h?De:(0,Y.jsx)(Y.Fragment,{children:null===xe||void 0===xe||null===(n=xe.split("\\n"))||void 0===n?void 0:n.map((function(e){return(0,Y.jsx)(H.ZP,{monospace:!0,preWrap:!0,small:!0,children:e},e)}))})})}),(0,Y.jsx)("div",{style:{width:"50%"},children:E?(0,Y.jsx)(N,{children:Ie}):Se})]})]})},$=t(65186),K=t(68562),X=t(81106),ee=t(65927),ne=t(48670),te=t(63637),ie=t(89515),re=t(82359),le=t(26304),oe="12px 20px",ce="1px",ae=(0,a.default)(f.ZP).withConfig({displayName:"indexstyle__ButtonStyle",componentId:"sc-hssntx-0"})(["",";"],(function(e){return e.active&&"\n background-color: ".concat((e.theme.background||D.Z.background).dashboard,";\n ")})),se=a.default.div.withConfig({displayName:"indexstyle__DropdownContainerStyle",componentId:"sc-hssntx-1"})(["position:absolute;top:",";right:0;width:","px;display:flex;flex-direction:column;gap:",";overflow:hidden;background-color:",";border-radius:","px;border:1px solid ",";"],(function(e){return e.top||0}),45*A.iI,ce,(function(e){return(e.theme.borders||D.Z.borders).darkLight}),S.n_,(function(e){return(e.theme.borders||D.Z.borders).darkLight})),de=a.default.div.withConfig({displayName:"indexstyle__DropdownHeaderStyle",componentId:"sc-hssntx-2"})(["padding:",";background-color:",";"],oe,(function(e){return(e.theme.background||D.Z.background).panel})),ue=a.default.div.withConfig({displayName:"indexstyle__TimeListContainerStyle",componentId:"sc-hssntx-3"})(["height:","px;display:flex;gap:",";"],20*A.iI,ce),he=a.default.div.withConfig({displayName:"indexstyle__TimeColumnStyle",componentId:"sc-hssntx-4"})(["display:flex;flex-direction:column;align-items:center;flex:1;gap:",";"],ce),fe=a.default.div.withConfig({displayName:"indexstyle__DropdownCellStyle",componentId:"sc-hssntx-5"})(["width:100%;padding:",";display:flex;flex-direction:",";flex-grow:",";justify-content:center;align-items:center;background-color:",";"],oe,(function(e){return e.flexDirection||"unset"}),(function(e){return e.flexGrow||"unset"}),(function(e){return(e.theme.background||D.Z.background).dashboard})),ve=a.default.div.withConfig({displayName:"indexstyle__ToggleGroupStyle",componentId:"sc-hssntx-6"})(["display:flex;flex-direction:column;"]),pe=(0,a.default)(fe).withConfig({displayName:"indexstyle__ToggleDropdownCellStyle",componentId:"sc-hssntx-7"})(["justify-content:flex-start;gap:12px;padding-right:","px;"],1.25*A.iI),me=["active","mountedCallback","time","timeZone"];function xe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function je(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xe(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function ge(e){var n=e.active,t=e.mountedCallback,i=e.time,r=e.timeZone,l=(0,le.Z)(e,me),o=(0,s.useRef)(null);return(0,s.useEffect)((function(){null!==o&&void 0!==o&&o.current&&t(o.current.offsetHeight)}),[t]),(0,Y.jsx)(ae,je(je({},l),{},{active:n,borderLess:!0,borderRadius:"".concat(S.BG,"px"),compact:!0,highlightOnHoverAlt:!0,ref:o,transparent:!0,children:(0,Y.jsx)(H.ZP,{inline:!0,monospace:!0,noWrapping:!0,small:!0,children:"".concat(i," ").concat(r)})}))}var be=(0,s.memo)(ge),ye=t(12468),Ze=t(63055),Ce=t(72191),Me=t(70320),Fe=t(79633),Oe=t(3917),He=t(78419),we=t(53808);var Pe=t(23780);function ke(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function ze(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ke(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ke(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var _e=[Oe.Oh.UTC,Oe.Oh.LOCAL];var De=function(e){var n=e.disabled,t=e.disableTimezoneToggle,i=e.projectName,o=(0,s.useState)((0,Me.qB)()),c=o[0],a=o[1],d=(0,s.useState)((0,we.U2)(He.kL,!1)),u=d[0],h=d[1],f=(0,s.useState)(!1),v=f[0],m=f[1],x=(0,s.useState)((0,Oe.e)({includeSeconds:!0,timeZones:_e})),j=x[0],g=x[1],b=(0,s.useState)(0),Z=b[0],C=b[1],M=c?Oe.Oh.LOCAL:Oe.Oh.UTC,F=window.innerWidth<Ze.nc,O=(0,Pe.VI)(null,{},[],{uuid:"components/ServerTimeDropdown"}),w=(0,l.Z)(O,1)[0],P=(0,y.Db)(z.ZP.projects.useUpdate(i),{onSuccess:function(e){return(0,R.wD)(e,{onErrorCallback:function(e,n){return w({errors:n,response:e})}})}}),_=(0,l.Z)(P,1)[0],D=(0,s.useCallback)((function(){m((function(e){return!e}))}),[]),S=(0,s.useCallback)((function(e){C(e)}),[]),I=(0,s.useCallback)((function(){var e=(0,Oe.e)({includeSeconds:u,timeZones:_e});g((function(n){return n.size===e.size&&n.get(Oe.Oh.UTC)===e.get(Oe.Oh.UTC)?n:e}))}),[u]),E=[{checked:c,disabled:t,label:t?"Display local timezone (must be changed in platform preferences)":"Display local timezone (requires refresh)",onCheck:function(){var e=!c;a((0,Me.hY)(e)),_({project:{features:(0,r.Z)({},re.d.LOCAL_TIMEZONE,e)}})},uuid:re.d.LOCAL_TIMEZONE},{checked:u,label:"Include seconds in current time",onCheck:function(){var e;h((e=!u,!!(0,we.uN)(He.kL,e)))},uuid:"current_time_seconds"}];return(0,s.useEffect)((function(){var e=setInterval((function(){I()}),1e3);return function(){return clearInterval(e)}}),[I]),(0,s.useEffect)((function(){I()}),[u,I]),j?(0,Y.jsx)(p.Z,{onClickOutside:function(){return m(!1)},open:!0,children:(0,Y.jsxs)("div",{style:{position:"relative"},children:[(0,Y.jsx)(be,{active:v,disabled:F||n,mountedCallback:S,onClick:D,time:j.get(M),timeZone:(0,Oe.WT)(M)}),!F&&v&&(0,Y.jsxs)(se,{top:Z,children:[(0,Y.jsx)(de,{children:(0,Y.jsx)(H.ZP,{bold:!0,muted:!0,uppercase:!0,children:"Current Time"})}),(0,Y.jsx)(ue,{children:_e.map((function(e){return(0,Y.jsxs)(he,{children:[(0,Y.jsx)(fe,{children:(0,Y.jsx)(H.ZP,{bold:!0,center:!0,muted:!0,uppercase:!0,children:"".concat(e).concat(e===Oe.Oh.LOCAL?" - ".concat((0,Oe.WT)(e)):"")})}),(0,Y.jsxs)(fe,{flexDirection:"column",flexGrow:3,children:[(0,Y.jsx)(H.ZP,{bold:!0,center:!0,color:Fe.J$,largeLg:!0,children:j.get(e)}),(0,Y.jsx)(H.ZP,{center:!0,muted:!0,small:!0,children:e===Oe.Oh.UTC?"Universal Time":Oe.mi[e]})]})]},e)}))}),(0,Y.jsx)(ve,{children:E.map((function(e){return(0,Y.jsxs)(pe,{children:[(0,Y.jsx)(k.Z,{checked:e.checked,compact:!0,disabled:e.disabled,onCheck:e.onCheck,purpleBackground:!e.disabled}),(0,Y.jsx)(H.ZP,{children:e.label}),e.uuid===re.d.LOCAL_TIMEZONE&&(0,Y.jsx)(ye.Z,ze(ze({},Me.EB),{},{appearAbove:!0,appearBefore:!0,size:Ce.bL}))]},e.label)}))})]})]})}):null},Se=t(58401),Ie=t(59457),Ee=t(77417),Ae=t(46684),Le=t(16682),Ne=t(68804),Te=a.default.div.withConfig({displayName:"indexstyle__LinkStyle",componentId:"sc-y3uzxv-0"})(["padding:","px ","px;&:hover{cursor:pointer;","}",""],.5*A.iI,1.5*A.iI,(function(e){return"\n background-color: ".concat((e.theme.interactive||D.Z.interactive).hoverBackground,";\n ")}),(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme.interactive||D.Z.interactive).hoverBackground,";\n ")})),Be=t(95363),Ue=t(74445),Re=t(42122),We=t(66472),Ge=t(95924),Ye=t(69419),Ve=t(89538);function qe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function Je(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qe(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Qe=function(e){var n,t,o=e.breadcrumbs,b=e.hideActions,y=e.menuItems,Z=e.project,C=e.version,F=(0,Pe.VI)(null,{},[],{uuid:"shared/Header"}),O=(0,l.Z)(F,1)[0],w=(0,s.useContext)(a.ThemeContext),P=(0,G.PR)(),k=(0,s.useState)(null),D=k[0],S=k[1],I=(0,s.useState)(!1),E=I[0],L=I[1],N=(0,s.useState)(!1),T=N[0],B=N[1],U=(0,s.useState)(null),R=U[0],W=U[1],V=(0,s.useState)(!1),q=V[0],J=V[1],le=(0,s.useState)(null),oe=le[0],ce=le[1],ae=(0,s.useRef)(null),se=(0,s.useRef)(null),de=(0,s.useRef)(null),ue=(0,d.useRouter)(),he=u.Z.isLoggedIn(),fe=(0,Ie.Z)(z.ZP.git_branches.detail,"test",{_format:"with_basic_details"},{revalidateOnFocus:!1},{pauseFetch:(0,G.YB)()&&!he},{delay:11e3}),ve=fe.data,pe=fe.mutate,me=(0,s.useMemo)((function(){return(null===ve||void 0===ve?void 0:ve.git_branch)||{}}),[ve]),xe=me.is_git_integration_enabled,je=me.name,ge=(0,Se.Z)().design,be=(0,Ee.Z)({showError:b?null:O}),ye=be.featureEnabled,Ze=be.featureUUIDs,Ce=be.isLoadingProject,Oe=be.isLoadingUpdate,He=be.project,we=be.rootProject,ke=be.updateProject,ze=(0,s.useMemo)((function(){return Z||He}),[He,Z]),_e=(0,s.useMemo)((function(){return C||(null===ze||void 0===ze?void 0:ze.version)}),[ze,C]),qe=(0,s.useMemo)((function(){return Le.WH.CLOSED===D||Le.WH.OPEN===D||(null===ye||void 0===ye?void 0:ye(null===Ze||void 0===Ze?void 0:Ze.COMMAND_CENTER))}),[D,ye,Ze]),Qe=!(0,Re.Qr)(null===ze||void 0===ze?void 0:ze.features_override);se.current=ze;var $e=(0,s.useCallback)((function(){qe?(0,We.WJ)():(L(!0),ke({features:Je(Je({},(null===ze||void 0===ze?void 0:ze.features)||{}),{},(0,r.Z)({},null===Ze||void 0===Ze?void 0:Ze.COMMAND_CENTER,!0))}).then((function(e){var n;if(null!==e&&void 0!==e&&null!==(n=e.data)&&void 0!==n&&n.error){var t;L(!1),O({errors:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.error,response:e})}else{var i=new CustomEvent(Ne.YS.COMMAND_CENTER_ENABLED);window.dispatchEvent(i)}})))}),[qe,null===Ze||void 0===Ze?void 0:Ze.COMMAND_CENTER,null===ze||void 0===ze?void 0:ze.features,O,ke]),Ke=[];if(we&&Ke.push({label:function(){return null===we||void 0===we?void 0:we.name},linkProps:{href:"/"}}),ze){var Xe={label:function(){return null===ze||void 0===ze?void 0:ze.name}};we?(Xe.loading=Oe&&!E,Xe.options=Object.keys((null===we||void 0===we?void 0:we.projects)||{}).map((function(e){return{onClick:function(){ke({activate_project:e}).then((function(e){var n;if(null!==e&&void 0!==e&&null!==(n=e.data)&&void 0!==n&&n.error){var t;O({errors:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.error,response:e})}else{var i,r,l,o=!(null===e||void 0===e||null===(i=e.data)||void 0===i||null===(r=i.project)||void 0===r||null===(l=r.features)||void 0===l||!l.display_local_timezone);(0,Me.hY)(o),window.location.reload()}}))},selected:e===(null===ze||void 0===ze?void 0:ze.name),uuid:e}}))):Xe.linkProps={href:"/"},Ke.push(Xe)}else Ce||b||Ke.push({bold:!0,danger:!0,label:function(){return"Error loading project configuration"}});var en=(0,s.useMemo)((function(){return[].concat(Ke,(0,i.Z)(o||[]))}),[Ke,o,ze]),nn=ue.query.pipeline,tn=(ze||{}).latest_version,rn=(0,s.useState)(null),ln=rn[0],on=rn[1],cn=((0,s.useMemo)((function(){var e,n,t=null===ge||void 0===ge||null===(e=ge.components)||void 0===e||null===(n=e.header)||void 0===n?void 0:n.media;if(t){var i=new Image,r=(null===t||void 0===t?void 0:t.url)||(null===t||void 0===t?void 0:t.file_path);if("undefined"!==typeof r&&null!==r)return i.src=r,i.onload=function(){on(i)},i}}),[ge,on]),(0,s.useMemo)((function(){var e,n,t=Ae.y7,i=(0,Y.jsx)($.Z,{height:Ae.y7});if(null!==ge&&void 0!==ge&&null!==(e=ge.components)&&void 0!==e&&null!==(n=e.header)&&void 0!==n&&n.media){var r,l,o=null===ge||void 0===ge||null===(r=ge.components)||void 0===r||null===(l=r.header)||void 0===l?void 0:l.media;if(null!==ln){var a=((null===ln||void 0===ln?void 0:ln.width)||1)/((null===ln||void 0===ln?void 0:ln.height)||1);t=Ae.sQ,i=(0,Y.jsx)(Ae.XD,{height:Ae.sQ,width:Ae.sQ*a,url:(null===o||void 0===o?void 0:o.url)||(null===o||void 0===o?void 0:o.file_path)})}}return(0,Y.jsx)(c(),{as:"/",href:"/",passHref:!0,children:(0,Y.jsx)(ne.Z,{block:!0,height:t,noHoverUnderline:!0,noOutline:!0,children:i})})}),[ln,ge])),an=b?[]:[{label:function(){return"Settings"},linkProps:{href:"/settings/workspace/preferences"},uuid:"user_settings"},{label:function(){return"Launch command center"},onClick:function(e){(0,Ge.j)(e),$e()},uuid:"Launch command center"}];(0,G.YB)()&&an.push({label:function(){return"Sign out"},onClick:function(){u.Z.logout((function(){z.ZP.sessions.updateAsyncServer(null,1).then((function(){(0,Ye.nL)("/sign-in")})).catch((function(){(0,Ye.nL)("/")}))}))},uuid:"sign_out"});var sn=(0,Ve.dd)((function(){return(0,Y.jsx)(Q,{branch:je,fetchBranch:pe})}),{},[je,pe],{background:!0,uuid:"git_actions"}),dn=(0,l.Z)(sn,2),un=dn[0],hn=(dn[1],(0,s.useMemo)((function(){return(null===je||void 0===je?void 0:je.length)>=21?"".concat(je.slice(0,21),"..."):je}),[je])),fn=(0,s.useMemo)((function(){return!(!P||null===P||void 0===P||!P.avatar)&&!/[A-Za-z0-9]+/.exec((null===P||void 0===P?void 0:P.avatar)||"")}),[P]),vn=(0,s.useMemo)((function(){return!(!P||null===P||void 0===P||!P.avatar)&&!!/[A-Za-z0-9]+/.exec((null===P||void 0===P?void 0:P.avatar)||"")}),[P]),pn=(0,s.useMemo)((function(){var e;if(!P||null===P||void 0===P||!P.avatar)return(0,Y.jsx)(te.Z,{});var n={color:null===w||void 0===w||null===(e=w.content)||void 0===e?void 0:e.active,fontFamily:Be.v$};return vn?(n.fontSize=2*A.iI,n.lineHeight="".concat(2*A.iI,"px"),n.position="relative",n.top=1):n.fontSize=3*A.iI,(0,Y.jsx)("div",{style:n,children:null===P||void 0===P?void 0:P.avatar})}),[vn,P]);return(0,s.useEffect)((function(){var e=function(e){var n,t,i=e.detail;null!==i&&void 0!==i&&i.state&&(S(null===i||void 0===i?void 0:i.state),Le.WH.MOUNTED===(null===i||void 0===i?void 0:i.state)&&(null!==se&&void 0!==se&&null!==(n=se.current)&&void 0!==n&&null!==(t=n.features)&&void 0!==t&&t[re.d.COMMAND_CENTER]||setTimeout((function(){(0,We.WJ)(),L(!1)}),1)))};return window.addEventListener(Ne.Mt,e),function(){window.removeEventListener(Ne.Mt,e)}}),[]),(0,Y.jsx)(Ae.I5,{children:(0,Y.jsx)(m.Z,{children:(0,Y.jsxs)(j.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"space-between",children:[(0,Y.jsxs)(x.Z,{alignItems:"center",children:[cn,(0,Y.jsx)(h.Z,{breadcrumbs:en})]}),!!ze&&!b&&(0,Y.jsxs)(x.Z,{flex:1,alignItems:"center",justifyContent:"center",children:[(0,Y.jsx)(M.Z,{ml:A.cd}),(0,Y.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(e){(0,Ge.j)(e),$e()},children:(0,Y.jsx)(Ae._m,{active:Le.WH.OPEN===D,children:(0,Y.jsxs)(j.ZP,{alignItems:"center",children:[(0,Y.jsx)(Y.Fragment,{children:Le.WH.OPEN===D?(0,Y.jsx)(_.UFO,{muted:!0,size:2*A.iI}):(0,Y.jsx)(_.Planet,{size:2*A.iI,success:!E&&!qe,warning:E})}),(0,Y.jsx)("div",{style:{marginRight:1.5*A.iI}}),Le.WH.OPEN!==D&&(0,Y.jsx)(H.ZP,{default:!0,noWrapping:!0,weightStyle:4,children:qe?"Command Center":E?"Launching Command Center":"Launch Command Center"}),Le.WH.OPEN===D&&(0,Y.jsx)(H.ZP,{muted:!0,noWrapping:!0,children:"Command Center launched"}),E&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("div",{style:{marginRight:1.5*A.iI}}),(0,Y.jsx)(ee.Z,{color:null===w||void 0===w||null===(n=w.accent)||void 0===n?void 0:n.warning,loadingStyle:ee.F.BLOCKS,width:1.5*A.iI})]}),qe&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("div",{style:{marginRight:1.5*A.iI}}),(0,Y.jsx)(X.Z,{compact:!0,settings:(0,Ue.MK)(),small:!0})]})]})})}),(0,Y.jsx)(M.Z,{mr:A.cd})]}),(0,Y.jsxs)(x.Z,{alignItems:"center",children:[xe&&je&&(0,Y.jsx)(M.Z,{mr:1,children:(0,Y.jsx)(K.ZP,{compact:!0,highlightOnHoverAlt:!0,noBackground:!0,noHoverUnderline:!0,onClick:un,sameColorAsText:!0,title:je,uuid:"Header/GitActions",children:(0,Y.jsxs)(j.ZP,{alignItems:"center",children:[(0,Y.jsx)(_.BranchAlt,{size:1.5*A.iI}),(0,Y.jsx)(M.Z,{ml:1}),(0,Y.jsx)(H.ZP,{monospace:!0,noWrapping:!0,small:!0,children:hn})]})})}),tn&&_e&&tn!==_e&&(0,Y.jsx)(f.ZP,{backgroundColor:Fe.$R,borderLess:!0,compact:!0,linkProps:{href:"https://docs.mage.ai/about/releases"},noHoverUnderline:!0,pill:!0,sameColorAsText:!0,target:"_blank",title:"Update to version ".concat(tn),children:(0,Y.jsx)(H.ZP,{black:!0,bold:!0,children:"Update"})}),_e&&"undefined"!==typeof _e&&(0,Y.jsx)(M.Z,{px:1,children:(0,Y.jsx)(ne.Z,{href:"https://www.mage.ai/changelog",monospace:!0,noWrapping:!0,openNewWindow:!0,sameColorAsText:!0,small:!0,children:"v".concat(_e)})}),(0,Y.jsx)(M.Z,{ml:1,children:(0,Y.jsx)(De,{disableTimezoneToggle:Qe,disabled:b,projectName:null===ze||void 0===ze?void 0:ze.name})}),(0,Y.jsx)(M.Z,{ml:1,children:(0,Y.jsx)(K.ZP,{beforeElement:(0,Y.jsx)(_.Slack,{}),compact:!0,highlightOnHoverAlt:!0,inline:!0,linkProps:{as:"https://www.mage.ai/chat",href:"https://www.mage.ai/chat"},noBackground:!0,noHoverUnderline:!0,openNewTab:!0,sameColorAsText:!0,uuid:"Header/live_chat",children:"Live help"})}),y&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(M.Z,{ml:2}),(0,Y.jsx)(p.Z,{onClickOutside:function(){return W(null)},open:!0,style:{position:"relative"},children:(0,Y.jsxs)(j.ZP,{children:[(0,Y.jsx)(Te,{highlighted:0===R,onClick:function(){return W((function(e){return 0===e?null:0}))},onMouseEnter:function(){return W((function(e){return null!==e?0:null}))},ref:ae,children:(0,Y.jsx)(H.ZP,{children:"Menu"})}),(0,Y.jsx)(g.Z,{alternateBackground:!0,items:y,onClickCallback:function(){return W(null)},open:0===R,parentRef:ae,rightOffset:0,setConfirmationAction:ce,setConfirmationDialogueOpen:J,uuid:"PipelineDetail/Header/menu"})]})}),(0,Y.jsx)(p.Z,{onClickOutside:function(){return J(!1)},open:q,children:(0,Y.jsx)(ie.Z,{danger:!0,onCancel:function(){return J(!1)},onClick:oe,right:16*A.iI,subtitle:"This is irreversible and will immediately delete everything associated with the pipeline, including its blocks, triggers, runs, logs, and history.",title:"Are you sure you want to delete the pipeline ".concat(nn,"?"),width:40*A.iI})})]}),(he||!(0,G.YB)())&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(M.Z,{ml:1}),(0,Y.jsx)(p.Z,{onClickOutside:function(){return B(!1)},open:!0,style:{position:"relative"},children:(0,Y.jsxs)(j.ZP,{alignItems:"flex-end",flexDirection:"column",children:[(0,Y.jsx)(K.ZP,{compact:!0,highlightOnHoverAlt:!0,inline:!0,noBackground:!0,noHoverUnderline:!0,onClick:function(){return B(!0)},ref:de,uuid:"Header/menu",children:fn&&(null===P||void 0===P||null===(t=P.avatar)||void 0===t?void 0:t.length)>=2?pn:(0,Y.jsx)(v.Z,{color:Fe.Jm,size:4*A.iI,children:pn})}),(0,Y.jsx)(g.Z,{alternateBackground:!0,items:an,onClickCallback:function(){return B(!1)},open:T,parentRef:de,rightOffset:0,uuid:"shared/Header/user_menu"})]})})]})]})]})})})}},63637:function(e,n,t){var i=t(25976),r=t(28598),l=i.default.svg.withConfig({displayName:"Mage8Bit__SVGStyle",componentId:"sc-cj6ltf-0"})([""]);n.Z=function(e){var n=e.size,t=void 0===n?20:n,i=e.viewBox,o=void 0===i?"0 0 20 20":i;return(0,r.jsxs)(l,{height:t,viewBox:o,width:t,children:[(0,r.jsxs)("g",{clipPath:"url(#clip0_297_42814)",children:[(0,r.jsx)("path",{d:"M13.334 0h1.66667v1.66667H13.334zM11.666 1.6665h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M10 1.6665h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M8.33398 1.6665h1.66667v1.66667H8.33398z",fill:"#AF93FF"}),(0,r.jsx)("path",{d:"M8.33398 3.3335h1.66667v1.66667H8.33398z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 3.3335h1.66667v1.66667H6.66602z",fill:"#AF93FF"}),(0,r.jsx)("path",{d:"M3.33398 5h1.66667v1.66667H3.33398z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M5 5h1.66667v1.66667H5z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 5h1.66667v1.66667H6.66602z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 5h1.66667v1.66667H6.66602z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 8.3335h1.66667v1.66667H6.66602z",fill:"#000"}),(0,r.jsx)("path",{d:"M6.66602 6.6665h1.66667v1.66667H6.66602z",fill:"#AD8FFF"}),(0,r.jsx)("path",{d:"M6.66602 10h1.66667v1.66667H6.66602z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M8.33398 6.6665h1.66667v1.66667H8.33398z",fill:"#AD8FFF"}),(0,r.jsx)("path",{d:"M1.66602 13.3335h1.66667v1.66667H1.66602z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M1.66602 11.6665h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,r.jsx)("path",{d:"M1.66602 10h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,r.jsx)("path",{d:"M1.66602 8.3335h1.66667v1.66667H1.66602zM1.66602 6.6665h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,r.jsx)("path",{d:"M1.66602 6.6665h1.66667v1.66667H1.66602zM0 0h1.66667v1.66667H0zM3.33398 1.6665h1.66667v1.66667H3.33398zM0 3.3335h1.66667v1.66667H0z",fill:"#2ECDF7"}),(0,r.jsx)("path",{d:"M1.66602 16.6665h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,r.jsx)("path",{d:"M1.66602 16.6665h1.66667v1.66667H1.66602zM1.66602 18.3335h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,r.jsx)("path",{d:"M1.66602 15h1.66667v1.66667H1.66602zM3.33398 15h1.66667v1.66667H3.33398z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M3.33398 16.6665h1.66667v1.66667H3.33398z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M3.33398 13.3335h1.66667v1.66667H3.33398z",fill:"#AD8FFF"}),(0,r.jsx)("path",{d:"M8.33398 8.3335h1.66667v1.66667H8.33398z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M10 6.6665h1.66667v1.66667H10z",fill:"#AD8FFF"}),(0,r.jsx)("path",{d:"M10 10h1.66667v1.66667H10z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M11.666 6.6665h1.66667v1.66667H11.666z",fill:"#AD8FFF"}),(0,r.jsx)("path",{d:"M11.666 8.3335h1.66667v1.66667H11.666z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M8.33398 10h1.66667v1.66667H8.33398z",fill:"#FF8DA9"}),(0,r.jsx)("path",{d:"M8.33398 11.6665h1.66667v1.66667H8.33398z",fill:"#FF8DA9"}),(0,r.jsx)("path",{d:"M6.66602 11.6665h1.66667v1.66667H6.66602z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M6.66602 11.6665h1.66667v1.66667H6.66602z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M5 10h1.66667v1.66667H5z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M5 8.3335h1.66667v1.66667H5z",fill:"#232429"}),(0,r.jsx)("path",{d:"M8.33398 11.6665h1.66667v1.66667H8.33398zM8.33398 13.3335h1.66667v1.66667H8.33398z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M10 11.6665h1.66667v1.66667H10z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M11.666 10h1.66667v1.66667H11.666zM13.334 6.6665h1.66667v1.66667H13.334zM13.334 8.3335h1.66667v1.66667H13.334z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M15 8.3335h1.66667v1.66667H15z",fill:"#757575"}),(0,r.jsx)("path",{d:"M15 10h1.66667v1.66667H15z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M10 8.3335h1.66667v1.66667H10z",fill:"#000"}),(0,r.jsx)("path",{d:"M8.33398 5h1.66667v1.66667H8.33398zM11.666 5h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M13.334 10h1.66667v1.66667H13.334zM11.666 11.6665h1.66667v1.66667H11.666zM10 13.3335h1.66667v1.66667H10z",fill:"#501FD8"}),(0,r.jsx)("path",{d:"M8.33398 15h1.66667v1.66667H8.33398zM6.66602 13.3335h1.66667v1.66667H6.66602zM15 11.6665h1.66667v1.66667H15z",fill:"#501FD8"}),(0,r.jsx)("path",{d:"M16.666 11.6665h1.66667v1.66667H16.666zM16.666 13.3335h1.66667v1.66667H16.666z",fill:"#501FD8"}),(0,r.jsx)("path",{d:"M15 13.3335h1.66667v1.66667H15z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M13.334 13.3335h1.66667v1.66667H13.334zM13.334 11.6665h1.66667v1.66667H13.334zM11.666 13.3335h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M11.666 15h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M10 15h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M8.33398 16.6665h1.66667v1.66667H8.33398z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 15h1.66667v1.66667H6.66602z",fill:"#AF93FF"}),(0,r.jsx)("path",{d:"M6.66602 16.6665h1.66667v1.66667H6.66602z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M5 16.6665h1.66667v1.66667H5z",fill:"#AF93FF"}),(0,r.jsx)("path",{d:"M5 18.3335h1.66667v1.66667H5z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 18.3335h1.66667v1.66667H6.66602zM8.33398 18.3335h1.66667v1.66667H8.33398z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M10 18.3335h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M11.666 18.3335h1.66667v1.66667H11.666zM13.334 18.3335h1.66667v1.66667H13.334z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M15 18.3335h1.66667v1.66667H15z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M16.666 18.3335h1.66667v1.66667H16.666z",fill:"#652EFF"}),(0,r.jsx)("path",{d:"M3.33398 18.3335h1.66667v1.66667H3.33398zM10 16.6665h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M11.666 16.6665h1.66667v1.66667H11.666zM13.334 15h1.66667v1.66667H13.334z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M13.334 16.6665h1.66667v1.66667H13.334z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M15 16.6665h1.66667v1.66667H15z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M15 15h1.66667v1.66667H15z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M16.666 15h1.66667v1.66667H16.666zM18.334 16.6665h1.66667v1.66667H18.334zM18.334 18.3335h1.66667v1.66667H18.334z",fill:"#501FD8"}),(0,r.jsx)("path",{d:"M16.666 16.6665h1.66667v1.66667H16.666z",fill:"#652EFF"}),(0,r.jsx)("path",{d:"M13.334 5h1.66667v1.66667H13.334z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M15 5h1.66667v1.66667H15zM10 5h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M10 3.3335h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M11.666 3.3335h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M11.666 0h1.66667v1.66667H11.666z",fill:"#AF93FF"})]}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_297_42814",children:(0,r.jsx)("path",{d:"M0 0h20v20H0z",fill:"#fff"})})})]})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1668],{48421:function(e,n,t){t.d(n,{Z:function(){return ke}});var o=t(21831),i=t(82394),r=t(75582),l=t(82684),u=t(65701),c=t(1254),a=t(69864),d=t(35686),s=t(72619),v=t(31882),f=t(55485),h=t(10305),p=t(44085),m=t(69650),x=t(38276),g=t(30160),b=t(17488),j=t(35058),y=t(85108),Z=t(81728),_=t(86735),k=t(35576),C=t(65956),P=t(70515),w=t(42122),I=t(28598);function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function S(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var M=function(e){var n=e.block,t=e.updateConfiguration,o=n||{},u=o.data,c=o.configuration,a=(c||{}).chart_type,d=(u||{}).columns,s=y.G8[a],O=(0,l.useMemo)((function(){return Object.entries(s||{}).reduce((function(e,n){var o=(0,r.Z)(n,2),l=o[0],u=o[1];return S(S({},e),{},(0,i.Z)({},l,u.map((function(e){var n,o=e.autoRun,r=e.description,l=e.label,u=e.monospace,a=e.options,s=e.settings,O=void 0===s?{}:s,M=e.type,E=e.uuid,L=function(e,n){var t=(n||{inline:!1}).inline,o=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(g.ZP,{bold:!0,children:null===D||void 0===D?void 0:D.label}),r&&(0,I.jsx)(x.Z,{mb:1,children:(Array.isArray(r)?r:[r]).map((function(e,n){return(0,I.jsx)(g.ZP,{monospace:u,muted:!0,xsmall:!0,children:(0,I.jsx)("span",{dangerouslySetInnerHTML:{__html:e}})},"".concat(e,"-").concat(n))}))}),e&&(0,I.jsx)(x.Z,{mt:2,children:e})]});return t?o:(0,I.jsx)(C.Z,{children:o})},D={fullWidth:!0,key:E,label:(0,Z.kC)(l()),monospace:u,onChange:function(e){return t(S({},(0,w.mv)(c,E,e.target.value)),{autoRun:o})},value:c?(0,w.t2)(c||{},E):""};if(y.VR.COLUMNS===M){var R=c[E]||[];n=(0,I.jsxs)(I.Fragment,{children:[(!O.maxValues||R.length<O.maxValues)&&(0,I.jsx)(p.Z,S(S({},D),{},{onChange:function(e){var n=c[E]||[],r=e.target.value;n.includes(r)?n=(0,_.Od)(n,(function(e){return e===r})):n.push(r),t((0,i.Z)({},E,n),{autoRun:o})},value:null,children:(0,_.YC)((d||[]).filter((function(e){return!R.includes(e)})),(function(e){return e})).map((function(e){return(0,I.jsx)("option",{value:e,children:e},e)}))})),R.length>0&&(0,I.jsx)("div",{style:{marginTop:4}}),R.map((function(e){return(0,I.jsx)("div",{style:{display:"inline-block",marginRight:2,marginTop:2},children:(0,I.jsx)(v.Z,{label:e,onClick:function(){t((0,i.Z)({},E,(0,_.Od)(R,(function(n){return n===e}))),{autoRun:o})}})},e)}))]})}else if(y.VR.METRICS===M){var N=c[E]||[];n=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(g.ZP,{bold:!0,children:"Metrics"}),(0,I.jsx)(g.ZP,{muted:!0,small:!0,children:"Select a column and an aggregation function."}),(0,I.jsxs)(h.Z,{onChange:function(e,n){var r=n.resetValues,l=n.setValues;2===e.filter((function(e){return!!e})).length&&(N.find((function(n){var t=n.aggregation;return n.column===e[1]&&t===e[0]}))||(t((0,i.Z)({},E,N.concat({aggregation:e[0],column:e[1]})),{autoRun:o}),l([null,null]),r()))},children:[(0,I.jsx)(p.Z,S(S({},D),{},{label:"aggregation",children:(0,_.YC)(j.bn,(function(e){return e})).map((function(e){return(0,I.jsx)("option",{value:e,children:e},e)}))})),(0,I.jsx)(p.Z,S(S({},D),{},{label:"column",children:(0,_.YC)(d||[],(function(e){return e})).map((function(e){return(0,I.jsx)("option",{value:e,children:e},e)}))}))]}),N.map((function(e){var n=e.aggregation,r=e.column;return(0,I.jsx)("div",{style:{display:"inline-block",marginRight:2,marginTop:4},children:(0,I.jsx)(v.Z,{label:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(g.ZP,{inline:!0,monospace:!0,children:[n,"("]}),r,(0,I.jsx)(g.ZP,{inline:!0,monospace:!0,children:")"})]}),onClick:function(){t((0,i.Z)({},E,(0,_.Od)(N,(function(e){var t=e.aggregation,o=e.column;return n===t&&r===o}))),{autoRun:o})}})},"".concat(n,"(").concat(r,")"))}))]})}else y.VR.CODE===M?n=L((0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(g.ZP,{monospace:!0,small:!0,children:[(0,I.jsx)(g.ZP,{color:"#00CC99",inline:!0,monospace:!0,small:!0,children:"function"})," ",(0,I.jsx)(g.ZP,{color:"#0080FF",inline:!0,monospace:!0,small:!0,children:"format"}),(0,I.jsx)(g.ZP,{color:"#FF9933",inline:!0,monospace:!0,small:!0,children:"("}),(0,I.jsx)(g.ZP,{color:"#00FFFF",inline:!0,monospace:!0,small:!0,children:"value"}),","," ",(0,I.jsx)(g.ZP,{color:"#00FFFF",inline:!0,monospace:!0,small:!0,children:"index"}),","," ",(0,I.jsx)(g.ZP,{color:"#00FFFF",inline:!0,monospace:!0,small:!0,children:"values"}),(0,I.jsx)(g.ZP,{color:"#FF9933",inline:!0,monospace:!0,small:!0,children:")"})," ",(0,I.jsx)(g.ZP,{color:"#FF9933",inline:!0,monospace:!0,small:!0,children:"{"})]}),(0,I.jsx)(k.Z,S(S({},D),{},{autoGrow:!0,borderless:!0,label:null,monospace:!0,onChange:function(e){t((0,i.Z)({},E,e.target.value),{skip_render:!0})},paddingVertical:0,primary:!0,rows:1,small:!0})),(0,I.jsx)(g.ZP,{color:"#FF9933",inline:!0,monospace:!0,small:!0,children:"}"})]})):a?n=(0,I.jsx)(p.Z,S(S({},D),{},{children:a.map((function(e){return(0,I.jsx)("option",{value:e,children:e},e)}))})):y.VR.TOGGLE===M?n=(0,I.jsx)(x.Z,{mt:P.cd,children:(0,I.jsxs)(f.ZP,{alignItems:"center",children:[(0,I.jsx)(m.Z,{checked:!(null===D||void 0===D||!D.value),compact:!0,onCheck:function(e){return null===D||void 0===D?void 0:D.onChange({target:{value:e(null===D||void 0===D?void 0:D.value)}})}}),(0,I.jsx)(x.Z,{mr:P.cd}),L(null,{inline:!0})]})}):(n=(0,I.jsx)(b.Z,S(S({},D),{},{label:r||null===D||void 0===D?void 0:D.label,placeholder:r?null===D||void 0===D?void 0:D.label:void 0,type:M})),r&&(n=L(n)));return(0,I.jsx)(x.Z,{mb:1,children:n},E)}))))}),{noCode:[]})}),[d,c,s,t]),M=(O.code,O.noCode);return(0,I.jsx)(I.Fragment,{children:M})},E=t(54750),L=t(89083),D=t(62547),R=t(2842),N=t(23780),F=t(75399),B=t(44425),U=t(97618),T=t(65927),A=t(4190),H=t(71180),W=t(15338),q=t(85854),z=t(48670),Y=t(72473),V=t(47041),G=t(53808);var J=function(){var e=(0,l.useRef)(null),n=(0,l.useCallback)((function(n,t){for(var o=arguments.length,i=new Array(o>2?o-2:0),r=2;r<o;r++)i[r-2]=arguments[r];e.current&&clearTimeout(e.current),e.current=setTimeout((function(){n.apply(void 0,i)}),t)}),[]);return[n,(0,l.useCallback)((function(){e.current&&(clearTimeout(e.current),e.current=null)}),[])]},K=t(19183),X=t(10975),Q=t(14567),$=3*P.iI;var ee=function(e){var n=e.buildChart,t=e.height,o=e.width,i=(0,l.useMemo)((function(){return t-(V.nn+$)}),[t]);return(0,I.jsx)(I.Fragment,{children:null===n||void 0===n?void 0:n({height:i,width:o})})},ne=t(24496),te=t(46732),oe=t(25976),ie=t(44897),re=t(42631),le=3*P.iI,ue=oe.default.div.withConfig({displayName:"indexstyle__DividerStyle",componentId:"sc-17acf36-0"})(["display:flex;position:relative;",";",";"],(function(e){return!e.horizontal&&"\n height: 100%;\n justify-content: center;\n width: ".concat(le,"px;\n ")}),(function(e){return e.horizontal&&"\n align-items: center;\n height: ".concat(le,"px;\n margin-left: ").concat(le,"px;\n margin-right: ").concat(le,"px;\n width: calc(100% - ").concat(2*le,"px);\n ")})),ce=oe.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-17acf36-1"})(["border-radius:","px;"," ",";",";"],re.Ro,(function(e){return"\n background-color: ".concat((e.theme||ie.Z).accent.blueLight,";\n ")}),(function(e){return!e.horizontal&&"\n height: 100%;\n width: ".concat(.5*P.iI,"px;\n ")}),(function(e){return e.horizontal&&"\n height: ".concat(.5*P.iI,"px;\n width: 100%;\n ")})),ae=oe.default.a.withConfig({displayName:"indexstyle__ButtonStyle",componentId:"sc-17acf36-2"})(["align-items:center;border-radius:50%;display:flex;height:","px;justify-content:center;position:absolute;width:","px;"," ",";",";"],3*P.iI,3*P.iI,(function(e){return"\n background-color: ".concat((e.theme||ie.Z).background.page,";\n border: ").concat(re.mP,"px solid ").concat((e.theme||ie.Z).accent.blueLight,";\n box-shadow:\n 0 0 0 ").concat(re.mP,"px ").concat((e.theme||ie.Z).background.page,";\n\n &:hover {\n background-color: ").concat((e.theme||ie.Z).interactive.linkPrimary,";\n border: ").concat(re.mP,"px solid ").concat((e.theme||ie.Z).interactive.linkPrimary,";\n cursor: pointer;\n }\n ")}),(function(e){return!e.horizontal&&"\n top: ".concat(3*P.iI,"px;\n ")}),(function(e){return e.horizontal&&"\n left: ".concat(3*P.iI,"px;\n ")}));var de=function(e){var n=e.horizontal,t=e.onClickAdd,o=(0,l.useState)(!1),i=o[0],r=o[1];return(0,I.jsx)(ue,{horizontal:n,onMouseEnter:function(){return r(!0)},onMouseLeave:function(){return r(!1)},children:i&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(ae,{horizontal:n,href:"#",onClick:function(e){e.preventDefault(),null===t||void 0===t||t()},children:(0,I.jsx)(Y.Add,{size:2*P.iI})}),(0,I.jsx)(ce,{horizontal:n})]})})},se=2*(re.YF+P.cd*P.iI)+le,ve=oe.default.div.withConfig({displayName:"indexstyle__ItemStyle",componentId:"sc-rcft6g-0"})(["border-radius:","px;padding:","px;",""],re.Ro,P.cd*P.iI,(function(e){return"\n border: ".concat(re.YF,"px ").concat(re.M8," ").concat((e.theme||ie.Z).interactive.defaultBorder,";\n background-color: ").concat((e.theme||ie.Z).background.chartBlock,";\n ")})),fe=t(77837),he=t(38860),pe=t.n(he);function me(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function xe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?me(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):me(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ge=function(e){var n=(0,l.useState)(null),t=n[0],o=n[1],i=(0,l.useState)(!1),r=i[0],u=i[1],c=(0,l.useState)(null),a=c[0],d=c[1],s=(0,l.useRef)(null),v=(0,l.useCallback)((0,fe.Z)(pe().mark((function n(){var t,i,r,l,c,a,v,f=arguments;return pe().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:for(u(!0),d(null),s.current&&s.current.abort(),s.current=new AbortController,t=s.current.signal,n.prev=5,i=f.length,r=new Array(i),l=0;l<i;l++)r[l]=f[l];return r.length>0&&"object"===typeof r[r.length-1]?(c=r[r.length-1],r[r.length-1]=xe(xe({},c),{},{signal:t})):r.push({signal:t}),n.next=10,e.apply(void 0,r);case 10:a=n.sent,o(a),n.next=18;break;case 14:n.prev=14,n.t0=n.catch(5),"AbortError"!==(v=n.t0).name&&d(v);case 18:return n.prev=18,u(!1),n.finish(18);case 21:case"end":return n.stop()}}),n,null,[[5,14,18,21]])}))),[e]);return(0,l.useEffect)((function(){return function(){s.current&&s.current.abort()}}),[]),{doFetch:v,data:t,isLoading:r,error:a}};function be(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function je(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?be(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):be(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ye=function(e){var n,t,o=e.block,u=e.blockLayoutItem,c=void 0===u?null:u,v=e.blockUUID,h=e.columnIndex,p=e.columnLayoutSettings,m=e.columnsInRow,y=e.createNewBlockItem,Z=e.detail,_=e.disableDrag,k=e.first,C=e.height,w=e.isLoading,O=e.onDrop,S=e.onFetchBlockLayoutItem,M=e.onSave,E=e.pageBlockLayoutUUID,L=e.removeBlockLayoutItem,D=e.rowIndex,R=e.setSelectedBlockItem,B=e.updateLayout,T=e.width,W=(0,l.useRef)(null),q=(0,l.useState)(!1),z=q[0],V=q[1],G=(0,l.useState)(!1),J=G[0],K=G[1],$=(0,l.useState)(!1),oe=$[0],ie=$[1],re=(0,l.useState)(p)[0],ue=(0,l.useState)(o),ce=ue[0],ae=(ue[1],(0,l.useMemo)((function(){return c||ce}),[c,ce])),fe=(0,N.VI)(null,{},[],{uuid:"BlockLayoutItem/".concat(E,"/").concat(v)}),he=(0,r.Z)(fe,1)[0],pe=(0,l.useState)({block_layout_item:ae}),me=pe[0],xe=(pe[1],(0,a.Db)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.ZP.block_layout_items.page_block_layouts.detailAsync(encodeURIComponent(E),encodeURIComponent(v),{skip_render:!(null===e||void 0===e||!e.skip_render)})}),{onSuccess:function(e){return(0,s.wD)(e,{callback:function(e){if(null!==e&&void 0!==e&&e.error)he({response:e});else{var n=null===e||void 0===e?void 0:e.block_layout_item;S&&(null===S||void 0===S||S(n))}}})}})),be=(0,r.Z)(xe,2),ye=be[0],Ze=be[1].isLoading,_e=ge((function(){return!Z&&ye()})),ke=_e.doFetch;_e.data,_e.isLoading,_e.error,(0,l.useEffect)((function(){ke()}),[]);var Ce=(0,l.useMemo)((function(){var e,n=null===ae||void 0===ae||null===(e=ae.data_source)||void 0===e?void 0:e.refresh_interval;return n||6e4}),[null===ae||void 0===ae||null===(n=ae.data_source)||void 0===n?void 0:n.refresh_interval]),Pe=(0,l.useRef)(null);(0,l.useEffect)((function(){return c&&(Pe.current=setInterval(ke,Ce)),function(){Pe.current&&clearInterval(Pe.current)}}),[c,Ce]);var we=(0,l.useMemo)((function(){return w&&Ze}),[w,Ze]),Ie=(0,l.useMemo)((function(){var e;return(null===ae||void 0===ae?void 0:ae.data)||(null===me||void 0===me||null===(e=me.block_layout_item)||void 0===e?void 0:e.data)}),[ae,me]),Oe=(0,l.useCallback)((function(e){var n,t=e.height,o=e.width;if(!Ie)return null;var r=null===Ie||void 0===Ie?void 0:Ie.render;if(r){var l=null===Ie||void 0===Ie?void 0:Ie.render_type;if(F.hN.JPEG===l||F.hN.JPG===l)return(0,I.jsx)("img",{height:t,src:"data:image/jpeg;base64,".concat(r),width:o});if(F.hN.PNG===l)return(0,I.jsx)("img",{height:t,src:"data:image/png;base64,".concat(r),width:o});if(F.hN.HTML===l)return(0,I.jsx)("iframe",{srcDoc:r,style:{height:t,width:o}})}return(0,I.jsx)(ne.Z,{block:je(je({},ae),{},{configuration:je(je({},null===ae||void 0===ae?void 0:ae.configuration),{},(0,i.Z)({},j.JJ,t))}),data:Ie,width:o,xAxisLabel:null===ae||void 0===ae||null===(n=ae.configuration)||void 0===n?void 0:n.x_axis_label})}),[ae,Ie]),Se=(0,X.c)((function(){return{collect:function(e){return{isDragging:!!e.isDragging()}},item:{blockLayoutItem:ae,columnIndex:h,rowIndex:D},type:"BlockLayoutItem"}}),[ae,h,D]),Me=(0,r.Z)(Se,2),Ee=Me[0],Le=Me[1],De=(0,Q.L)((function(){return{accept:"BlockLayoutItem",drop:function(e){return null===O||void 0===O?void 0:O(e)}}}),[O]),Re=(0,r.Z)(De,2)[1];return Z?(0,I.jsx)(ee,{buildChart:Oe,height:C,width:T}):(0,I.jsxs)(I.Fragment,{children:[k&&(0,I.jsx)(de,{onClickAdd:function(){return y({columnIndex:h,rowIndex:D})}}),(0,I.jsx)(U.Z,{flex:1,flexDirection:"column",children:(0,I.jsx)("div",{onMouseEnter:function(){return ie(!0)},onMouseLeave:function(){return ie(!1)},ref:Re,children:(0,I.jsxs)(ve,je(je({},Ee),{},{ref:_?null:Le,children:[(0,I.jsx)(x.Z,{mb:1,children:(0,I.jsxs)(f.ZP,{alignContent:"center",justifyContent:"space-between",children:[(0,I.jsx)(x.Z,{py:1,children:(0,I.jsx)(g.ZP,{bold:!0,default:!0,children:(null===ae||void 0===ae?void 0:ae.name)||v})}),(0,I.jsx)("div",{children:(0,I.jsx)(te.Z,{items:[{label:function(){return"Edit content"},onClick:function(){return null===R||void 0===R?void 0:R(ae)},uuid:"Edit content"},{label:function(){return"Change height and/or width"},onClick:function(){return K(!0)},uuid:"Change"},{label:function(){return"Remove chart"},onClick:function(){return null===L||void 0===L?void 0:L()},uuid:"Remove chart"}],onClickCallback:function(){return V(!1)},onClickOutside:function(){return V(!1)},open:z,parentRef:W,rightOffset:0,uuid:"BlockLayoutItem/".concat(v),children:(oe||z)&&(0,I.jsx)(H.ZP,{disabled:we,iconOnly:!0,loading:we,noBackground:!0,onClick:function(){V(!0)},children:(0,I.jsx)(Y.Ellipsis,{default:!0,size:2*P.iI})})})})]})}),J&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(f.ZP,{alignItems:"center",fullWidth:!0,children:[(0,I.jsxs)(U.Z,{flex:1,flexDirection:"column",children:[(0,I.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Width (flex box)"}),(0,I.jsx)(b.Z,{compact:!0,fullWidth:!0,onChange:function(e){return null===B||void 0===B?void 0:B(je(je({},p),{},{width:"undefined"!==typeof e.target.value?Number(e.target.value):e.target.value}))},primary:!0,setContentOnMount:!0,small:!0,type:"number",value:(null===p||void 0===p?void 0:p.width)||""})]}),(0,I.jsx)(x.Z,{mr:1}),(0,I.jsxs)(U.Z,{flex:1,flexDirection:"column",children:[(0,I.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Max width (%)"}),(0,I.jsx)(b.Z,{compact:!0,fullWidth:!0,label:"Max width percentage",onChange:function(e){return null===B||void 0===B?void 0:B(je(je({},p),{},{max_width_percentage:"undefined"!==typeof e.target.value?Number(e.target.value):e.target.value}))},primary:!0,setContentOnMount:!0,small:!0,type:"number",value:(null===p||void 0===p?void 0:p.max_width_percentage)||""})]}),(0,I.jsx)(x.Z,{mr:1}),(0,I.jsxs)(U.Z,{flex:1,flexDirection:"column",children:[(0,I.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Height (pixels)"}),(0,I.jsx)(b.Z,{compact:!0,fullWidth:!0,onChange:function(e){return null===B||void 0===B?void 0:B(je(je({},p),{},{height:"undefined"!==typeof e.target.value?Number(e.target.value):e.target.value}))},primary:!0,setContentOnMount:!0,small:!0,type:"number",value:(null===p||void 0===p?void 0:p.height)||""})]})]}),(0,I.jsx)(x.Z,{mt:P.cd,children:(0,I.jsxs)(f.ZP,{alignItems:"center",justifyContent:"flex-end",children:[(0,I.jsx)(H.ZP,{compact:!0,onClick:function(){null===M||void 0===M||M(),K(!1)},primary:!0,small:!0,children:"Save"}),(0,I.jsx)(x.Z,{mr:1}),(0,I.jsx)(H.ZP,{compact:!0,onClick:function(){K(!1),null===B||void 0===B||B(re)},small:!0,children:"Cancel"})]})})]}),!me&&(0,I.jsx)(x.Z,{p:P.cd,children:(0,I.jsx)(A.Z,{})}),me&&!Ie&&(0,I.jsx)(g.ZP,{muted:!0,children:"Chart hasn\u2019t been configured or no data was retrieved."}),Ie&&Oe({height:C||(null===ae||void 0===ae||null===(t=ae.configuration)||void 0===t?void 0:t[j.JJ]),width:T-(se+1)-(m?le/m:0)})]}))})}),(0,I.jsx)(de,{onClickAdd:function(){return y({columnIndex:h+1,rowIndex:D})}})]})};function Ze(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function _e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ze(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ze(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ke=function(e){var n,t=e.leftOffset,v=e.pageBlockLayoutTemplate,h=e.topOffset,m=e.uuid,y=(0,N.VI)(null,{},[],{uuid:"BlockLayout/".concat(m)}),k=(0,r.Z)(y,1)[0],C=J(),O=(0,r.Z)(C,1)[0],S=(0,l.useState)({}),X=(S[0],S[1],(0,l.useState)(null)),Q=X[0],$=X[1],ee=(0,l.useState)({}),ne=ee[0],te=ee[1],oe=(0,l.useState)(!1),ie=(oe[0],oe[1],"block_layout_after_width_".concat(m)),re="block_layout_before_width_".concat(m),le=(0,l.useRef)(null),ue=(0,l.useState)((0,G.U2)(ie,40*P.iI)),ce=ue[0],ae=ue[1],se=(0,l.useState)(!1),ve=se[0],fe=se[1],he=(0,l.useState)(Math.max((0,G.U2)(re),50*P.iI)),pe=he[0],me=he[1],xe=(0,l.useState)(!1),ge=xe[0],be=xe[1],je=(0,l.useRef)(null),Ze=(0,K.i)(),ke=(0,l.useState)(null),Ce=ke[0],Pe=ke[1],we=(0,l.useState)(null),Ie=we[0],Oe=we[1],Se=(0,l.useMemo)((function(){var e;return null===Ce||void 0===Ce||null===(e=Ce.data_source)||void 0===e?void 0:e.refresh_interval}),[Ce]),Me=(0,l.useMemo)((function(){return null===ne||void 0===ne?void 0:ne[null===Ce||void 0===Ce?void 0:Ce.uuid]}),[ne,Ce]),Ee=(0,l.useState)(null),Le=Ee[0],De=Ee[1],Re=(0,a.Db)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.ZP.block_layout_items.page_block_layouts.detailAsync(Ce&&encodeURIComponent(m),Ce&&encodeURIComponent(null===Ce||void 0===Ce?void 0:Ce.uuid),{configuration_override:encodeURIComponent(JSON.stringify((null===Q||void 0===Q?void 0:Q.configuration)||"")),content_override:encodeURIComponent((null===Q||void 0===Q?void 0:Q.content)||(null===Me||void 0===Me?void 0:Me.content)||""),data_source_override:encodeURIComponent(JSON.stringify((null===Q||void 0===Q?void 0:Q.data_source)||"")),skip_render:!(null===e||void 0===e||!e.skip_render)},{refreshInterval:Se,revalidateOnFocus:!Se})}),{onSuccess:function(e){return(0,s.wD)(e,{callback:function(e){return De((function(n){var t,o=null===e||void 0===e?void 0:e.block_layout_item;return(null===n||void 0===n||null===(t=n.block_layout_item)||void 0===t?void 0:t.uuid)!==(null===o||void 0===o?void 0:o.uuid)&&$((function(e){return _e(_e({},e),o)})),te((function(e){return _e(_e({},e),{},(0,i.Z)({},null===o||void 0===o?void 0:o.uuid,o))})),e}))}})}}),Ne=(0,r.Z)(Re,2),Fe=Ne[0],Be=Ne[1].isLoading,Ue=(0,l.useMemo)((function(){return null===Le||void 0===Le?void 0:Le.block_layout_item}),[Le]);(0,l.useEffect)((function(){var e;null!==Ue&&void 0!==Ue&&null!==(e=Ue.data)&&void 0!==e&&e.error&&k({response:null===Ue||void 0===Ue?void 0:Ue.data})}),[Ue,k]);var Te=(0,l.useCallback)((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};O((function(){return Fe({skip_render:!1})}),null!==n&&void 0!==n&&n.skip_render?3e3:1e3),$("function"===typeof e?e:function(n){return _e(_e({},n),e)})}),[Fe,O,$]),Ae=(0,l.useCallback)((function(e){Te(_e(_e({},e),{},{name_new:(null===e||void 0===e?void 0:e.name_new)||(null===e||void 0===e?void 0:e.name)||(0,Z.Y6)()})),Pe(e)}),[Te,Pe]),He=(0,l.useState)(null),We=He[0],qe=He[1],ze=(0,l.useMemo)((function(){return null===We||void 0===We?void 0:We.page_block_layout}),[We]),Ye=(0,a.Db)((function(){return d.ZP.page_block_layouts.detailAsync(encodeURIComponent(m))}),{onSuccess:function(e){return(0,s.wD)(e,{callback:function(e){qe(e)}})}}),Ve=(0,r.Z)(Ye,1)[0];(0,l.useEffect)((function(){Ve()}),[Ve]);var Ge=(0,l.useMemo)((function(){return null===ze||void 0===ze?void 0:ze.layout}),[ze]),Je=(0,a.Db)((function(e){return d.ZP.page_block_layouts.useUpdate(encodeURIComponent(m))(e)}),{onSuccess:function(e){return(0,s.wD)(e,{callback:function(e){var n=(null===e||void 0===e?void 0:e.page_block_layout).blocks;qe(e);var t=Object.values(n).find((function(e){return e.name===(null===Q||void 0===Q?void 0:Q.name_new)}));t&&Ae(t),Oe(null)},onErrorCallback:function(e,n){return k({errors:n,response:e})}})}}),Ke=(0,r.Z)(Je,2),Xe=Ke[0],Qe=Ke[1].isLoading,$e=(0,l.useCallback)((function(e){return Xe({page_block_layout:{blocks:_e(_e({},null===ze||void 0===ze?void 0:ze.blocks),{},(0,i.Z)({},null===e||void 0===e?void 0:e.uuid,(0,w.gR)(e,["data"]))),layout:null===ze||void 0===ze?void 0:ze.layout}})}),[ze,Xe]),en=(0,l.useCallback)((function(){return Xe({page_block_layout:{blocks:null===ze||void 0===ze?void 0:ze.blocks,layout:null===ze||void 0===ze?void 0:ze.layout}})}),[ze,Xe]),nn=(0,l.useMemo)((function(){return null===ze||void 0===ze?void 0:ze.blocks}),[ze]),tn=(0,l.useCallback)((function(e,n,t){var i,r=(0,o.Z)(Ge);r[e][n]=t,i=r,qe((function(e){return _e(_e({},e),{},{page_block_layout:_e(_e({},null===e||void 0===e?void 0:e.page_block_layout),{},{layout:i})})}))}),[Ge]),on=(0,l.useState)(null),rn=on[0],ln=on[1],un=(0,l.useState)(null),cn=un[0],an=un[1];(0,l.useEffect)((function(){var e;null===le||void 0===le||!le.current||ve||ge||ln(null===le||void 0===le||null===(e=le.current)||void 0===e?void 0:e.getBoundingClientRect())}),[ve,ge,le,Ce,Ze]),(0,l.useEffect)((function(){var e;null!==je&&void 0!==je&&je.current&&an(null===je||void 0===je||null===(e=je.current)||void 0===e?void 0:e.getBoundingClientRect())}),[je,Ce,Ze]),(0,l.useEffect)((function(){ve||(0,G.t8)(ie,ce)}),[ve,ce,ie]),(0,l.useEffect)((function(){ge||(0,G.t8)(re,pe)}),[ge,pe,re]);var dn=(0,l.useCallback)((function(e,n,t){var i=_e({},null===ze||void 0===ze?void 0:ze.blocks);null===i||void 0===i||delete i[e];var r=(0,o.Z)(null===ze||void 0===ze?void 0:ze.layout),l=r[n]||[],u=(0,_.oM)(l,t);0===(null===u||void 0===u?void 0:u.length)?r=(0,_.oM)(r,n):r[n]=u,Oe(e),Xe({page_block_layout:{blocks:i,layout:r}})}),[ze,Xe]),sn=(0,l.useCallback)((function(e,n,t,i){var r=(0,o.Z)(Ge||[]),l=r[e]||[],u=l[n];if(e===t&&n!==i){var c=(0,_.oM)(l,n);r[e]=(0,_.Hk)(u,i>n?i:i-1,c)}else{var a=(0,_.oM)(l,n);r[e]=a;var d=(0,_.Hk)(u,i,r[t]);r[t]=d,0===(null===a||void 0===a?void 0:a.length)&&(r=(0,_.oM)(r,e))}e===t&&n===i||Xe({page_block_layout:{blocks:null===ze||void 0===ze?void 0:ze.blocks,layout:r}})}),[Ge,ze,Xe]),vn=(0,l.useCallback)((function(e){var n=(0,Z.Y6)(),t={name:n,type:B.tf.CHART,uuid:(0,Z.kE)(n)},r=(0,o.Z)(Ge||[]),l={block_uuid:t.uuid,width:1};if(e){var u=e||{},c=u.columnIndex,a=void 0===c?0:c,d=u.rowIndex,s=u.rowIndexInsert;"undefined"!==typeof s?r=(0,_.Hk)([l],s,r):r[d]=(0,_.Hk)(l,a,r[d])}else r.push([l]);Xe({page_block_layout:{blocks:_e(_e({},null===ze||void 0===ze?void 0:ze.blocks),{},(0,i.Z)({},t.uuid,t)),layout:r}}),Ae(t),Te((function(){return{}}))}),[Ge,ze,Ae,Te,Xe]),fn=(0,l.useMemo)((function(){var e=[];return null===Ge||void 0===Ge||Ge.forEach((function(n,t){var o=[],r=(0,_.Sm)(null===n||void 0===n?void 0:n.map((function(e){return e.width||0})));n.forEach((function(e,l){var u=e.block_uuid,c=e.height,a=e.max_width_percentage,d=e.width,s=null===nn||void 0===nn?void 0:nn[u],v="undefined"!==typeof a&&null!==a?a>=0?a/100:a:null,f=d/r,h=v&&f>v?v:f,p=(null===rn||void 0===rn?void 0:rn.width)-V.nn;o.push((0,I.jsx)(U.Z,{flexBasis:"".concat(Math.floor(100*h),"%"),children:(0,I.jsx)(ye,{block:s,blockLayoutItem:null===ne||void 0===ne?void 0:ne[u],blockUUID:u,columnIndex:l,columnLayoutSettings:e,columnsInRow:null===n||void 0===n?void 0:n.length,createNewBlockItem:vn,first:0===l,height:c,isLoading:Ie===u&&Qe,onDrop:function(e){var n=e.columnIndex,o=e.rowIndex;sn(o,n,t,l)},onFetchBlockLayoutItem:function(e){return te((function(n){return _e(_e({},n),{},(0,i.Z)({},null===e||void 0===e?void 0:e.uuid,e))}))},onSave:en,pageBlockLayoutUUID:m,removeBlockLayoutItem:function(){return dn(u,t,l)},rowIndex:t,setSelectedBlockItem:Ae,updateLayout:function(e){return tn(t,l,e)},width:Math.floor(h*p)})},"row-".concat(t,"-column-").concat(l,"-").concat(u)))})),0===t&&e.push((0,I.jsx)(de,{horizontal:!0,onClickAdd:function(){return vn({rowIndexInsert:t})}},"layout-divider-".concat(t,"-top"))),e.push((0,I.jsx)(f.ZP,{children:o},"row-".concat(t))),e.push((0,I.jsx)(de,{horizontal:!0,onClickAdd:function(){return vn({rowIndexInsert:t+1})}},"layout-divider-".concat(t,"-bottom")))})),e}),[nn,rn,vn,Ie,Qe,ne,Ge,sn,dn,en,Ae,tn,m]),hn=(0,l.useMemo)((function(){return We&&0===(null===Ge||void 0===Ge?void 0:Ge.length)}),[We,Ge]),pn=(0,l.useMemo)((function(){return(0,I.jsx)(f.ZP,{justifyContent:"center",children:(0,I.jsxs)(x.Z,{my:3*P.HN,px:P.cd,children:[(0,I.jsxs)(x.Z,{mb:P.Mq,children:[(0,I.jsx)(x.Z,{mb:1,children:(0,I.jsx)(q.Z,{center:!0,children:"Create a custom dashboard"})}),(0,I.jsx)(g.ZP,{center:!0,default:!0,children:"Add customizable charts with the exact insights you need."}),v&&(0,I.jsx)(g.ZP,{center:!0,default:!0,children:"Start with a recommended set or freely define your own."})]}),(0,I.jsxs)(f.ZP,{alignContent:"center",justifyContent:"center",children:[v&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(H.ZP,{onClick:function(){return Xe({page_block_layout:v})},primary:!0,children:"Add recommended charts"}),(0,I.jsx)(x.Z,{mr:1})]}),(0,I.jsx)(H.ZP,{onClick:function(){return vn()},primary:!v,secondary:!!v,children:"Create new chart"})]})]})})}),[vn,v,Xe]),mn=(0,l.useMemo)((function(){return(null===rn||void 0===rn?void 0:rn.height)-(null===cn||void 0===cn?void 0:cn.height)}),[rn,cn]),xn=(0,l.useMemo)((function(){return!Ce}),[Ce]),gn=d.ZP.pipelines.detail(null===Q||void 0===Q||null===(n=Q.data_source)||void 0===n?void 0:n.pipeline_uuid).data,bn=(0,l.useMemo)((function(){return null===gn||void 0===gn?void 0:gn.pipeline}),[gn]),jn=(0,l.useMemo)((function(){return(0,_.YC)((null===bn||void 0===bn?void 0:bn.blocks)||[],"uuid")}),[bn]),yn=d.ZP.pipelines.list().data,Zn=(0,l.useMemo)((function(){return(0,_.YC)((null===yn||void 0===yn?void 0:yn.pipelines)||[],"uuid")}),[yn]),_n=d.ZP.pipeline_schedules.pipelines.list(null===bn||void 0===bn?void 0:bn.uuid).data,kn=(0,l.useMemo)((function(){return null===_n||void 0===_n?void 0:_n.pipeline_schedules}),[_n]),Cn=(0,l.useMemo)((function(){return _e(_e(_e({},Ce),Q),{},{data:_e(_e(_e({},null===Ce||void 0===Ce?void 0:Ce.data),null===Q||void 0===Q?void 0:Q.data),null===Ue||void 0===Ue?void 0:Ue.data)})}),[Ue,Q,Ce]),Pn=(0,l.useMemo)((function(){var e,n,t,o,i,r,l,u,c,a,d,s,v;return xn?null:(0,I.jsxs)("div",{style:{paddingBottom:P.Mq*P.iI,paddingTop:"undefined"===typeof h?R.Wi:0},children:[(0,I.jsxs)(x.Z,{mt:P.Mq,px:P.cd,children:[(0,I.jsxs)(x.Z,{mb:1,children:[(0,I.jsx)(g.ZP,{bold:!0,children:"Chart name"}),(0,I.jsx)(g.ZP,{muted:!0,small:!0,children:"Human readable name for your chart."})]}),(0,I.jsx)(b.Z,{onChange:function(e){return Te((function(n){return _e(_e({},n),{},{name_new:e.target.value})}),{skip_render:!0})},placeholder:"Type name for chart...",primary:!0,setContentOnMount:!0,value:(null===Q||void 0===Q?void 0:Q.name_new)||""})]}),(0,I.jsxs)(x.Z,{mt:P.Mq,px:P.cd,children:[(0,I.jsxs)(x.Z,{mb:1,children:[(0,I.jsx)(g.ZP,{bold:!0,children:"Chart type"}),(0,I.jsx)(g.ZP,{muted:!0,small:!0,children:"Choose how you want to display your data."})]}),(0,I.jsx)(p.Z,{onChange:function(e){return Te((function(n){return _e(_e({},n),{},{configuration:{chart_type:e.target.value}})}),{skip_render:!0})},placeholder:"Select chart type",primary:!0,value:(null===Q||void 0===Q||null===(e=Q.configuration)||void 0===e?void 0:e.chart_type)||"",children:j.CK.concat(j.oV.CUSTOM).map((function(e){return(0,I.jsx)("option",{value:e,children:(0,Z.kC)(e)},e)}))})]}),(0,I.jsx)(x.Z,{mt:P.Mq,children:(0,I.jsx)(W.Z,{light:!0})}),(0,I.jsx)(x.Z,{mt:P.Mq,px:P.cd,children:(0,I.jsx)(q.Z,{children:"Data source"})}),(0,I.jsxs)(x.Z,{mt:P.Mq,px:P.cd,children:[(0,I.jsxs)(x.Z,{mb:1,children:[(0,I.jsx)(g.ZP,{bold:!0,children:"Data source type"}),(0,I.jsx)(g.ZP,{muted:!0,small:!0,children:"Configure where the data for this chart comes from."})]}),(0,I.jsx)(p.Z,{onChange:function(e){return Te((function(n){return _e(_e({},n),{},{data_source:_e(_e({},null===n||void 0===n?void 0:n.data_source),{},{type:e.target.value})})}),{skip_render:!0})},placeholder:"Select data source type",primary:!0,value:(null===Q||void 0===Q||null===(n=Q.data_source)||void 0===n?void 0:n.type)||"",children:F.tW.map((function(e){return(0,I.jsx)("option",{value:e,children:(0,Z.kC)(F.Qj[e])},e)}))})]}),[F.XO.BLOCK,F.XO.BLOCK_RUNS,F.XO.PIPELINE_RUNS,F.XO.PIPELINE_SCHEDULES,F.XO.SYSTEM_METRICS].includes(null===Q||void 0===Q||null===(t=Q.data_source)||void 0===t?void 0:t.type)&&(0,I.jsx)(I.Fragment,{children:(0,I.jsxs)(x.Z,{mt:P.Mq,px:P.cd,children:[(0,I.jsxs)(x.Z,{mb:1,children:[(0,I.jsx)(g.ZP,{bold:!0,children:"Pipeline UUID"}),(0,I.jsx)(g.ZP,{muted:!0,small:!0,children:"Select the pipeline the data source comes from."})]}),(0,I.jsxs)(p.Z,{monospace:!0,onChange:function(e){return Te((function(n){return _e(_e({},n),{},{data_source:_e(_e({},null===n||void 0===n?void 0:n.data_source),{},{block_uuid:null,pipeline_schedule_id:null,pipeline_uuid:e.target.value})})}),{skip_render:!0})},primary:!0,value:(null===Q||void 0===Q||null===(o=Q.data_source)||void 0===o?void 0:o.pipeline_uuid)||"",children:[(0,I.jsx)("option",{value:null}),null===Zn||void 0===Zn?void 0:Zn.map((function(e){var n=e.uuid;return(0,I.jsx)("option",{value:n,children:n},n)}))]})]})}),[F.XO.PIPELINE_RUNS].includes(null===Q||void 0===Q||null===(i=Q.data_source)||void 0===i?void 0:i.type)&&(0,I.jsx)(I.Fragment,{children:(0,I.jsxs)(x.Z,{mt:P.Mq,px:P.cd,children:[(0,I.jsxs)(x.Z,{mb:1,children:[(0,I.jsx)(g.ZP,{bold:!0,children:"Trigger"}),(0,I.jsx)(g.ZP,{muted:!0,small:!0,children:"Select the trigger that the pipeline runs should belong to."})]}),(0,I.jsxs)(p.Z,{monospace:!0,onChange:function(e){return Te((function(n){return _e(_e({},n),{},{data_source:_e(_e({},null===n||void 0===n?void 0:n.data_source),{},{pipeline_schedule_id:e.target.value})})}),{skip_render:!0})},primary:!0,value:(null===Q||void 0===Q||null===(r=Q.data_source)||void 0===r?void 0:r.pipeline_schedule_id)||"",children:[(0,I.jsx)("option",{value:null}),null===kn||void 0===kn?void 0:kn.map((function(e){var n=e.id,t=e.name;return(0,I.jsx)("option",{value:n,children:t},n)}))]})]})}),[F.XO.BLOCK,F.XO.SYSTEM_METRICS].includes(null===Q||void 0===Q||null===(l=Q.data_source)||void 0===l?void 0:l.type)&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(x.Z,{mt:P.Mq,px:P.cd,children:[(0,I.jsxs)(x.Z,{mb:1,children:[(0,I.jsx)(g.ZP,{bold:!0,children:"Block UUID"}),(0,I.jsx)(g.ZP,{muted:!0,small:!0,children:"Select the block the data source comes from."})]}),(0,I.jsxs)(p.Z,{monospace:!0,onChange:function(e){return Te((function(n){return _e(_e({},n),{},{data_source:_e(_e({},null===n||void 0===n?void 0:n.data_source),{},{block_uuid:e.target.value})})}),{skip_render:!0})},primary:!0,value:(null===Q||void 0===Q||null===(u=Q.data_source)||void 0===u?void 0:u.block_uuid)||"",children:[(0,I.jsx)("option",{value:null}),null===jn||void 0===jn?void 0:jn.map((function(e){var n=e.uuid;return(0,I.jsx)("option",{value:n,children:n},n)}))]})]}),(0,I.jsxs)(x.Z,{mt:P.Mq,px:P.cd,children:[(0,I.jsxs)(x.Z,{mb:1,children:[(0,I.jsx)(g.ZP,{bold:!0,children:"Partitions"}),(0,I.jsx)(g.ZP,{muted:!0,small:!0,children:"Enter a positive or a negative number. If positive, then data from the block will be the most recent N partitions. If negative, then data from the block will be the oldest N partitions."}),(0,I.jsx)(x.Z,{mt:1,children:(0,I.jsx)(g.ZP,{muted:!0,small:!0,children:"Leave blank if you want the chart to execute the block and display the data produced from that ad hoc block execution."})})]}),(0,I.jsx)(b.Z,{monospace:!0,onChange:function(e){return Te((function(n){return _e(_e({},n),{},{data_source:_e(_e({},null===n||void 0===n?void 0:n.data_source),{},{partitions:"undefined"!==typeof e.target.value?Number(e.target.value):e.target.value})})}),{skip_render:!0})},placeholder:"Enter number of partitions",primary:!0,setContentOnMount:!0,type:"number",value:(null===Q||void 0===Q||null===(c=Q.data_source)||void 0===c?void 0:c.partitions)||""})]})]}),(0,I.jsxs)(x.Z,{mt:P.Mq,px:P.cd,children:[(0,I.jsxs)(x.Z,{mb:1,children:[(0,I.jsx)(g.ZP,{bold:!0,children:"Refresh interval"}),(0,I.jsx)(g.ZP,{muted:!0,small:!0,children:"How frequent do you want this chart to automatically fetch new data from its data source? Enter a number in milliseconds (e.g. 1000ms is 1 second)."})]}),(0,I.jsx)(b.Z,{monospace:!0,onChange:function(e){return Te((function(n){return _e(_e({},n),{},{data_source:_e(_e({},null===n||void 0===n?void 0:n.data_source),{},{refresh_interval:e.target.value})})}),{skip_render:!0})},placeholder:"Enter number for refresh interval",primary:!0,setContentOnMount:!0,type:"number",value:(null===Q||void 0===Q||null===(a=Q.data_source)||void 0===a?void 0:a.refresh_interval)||6e4})]}),(0,I.jsx)(x.Z,{mt:P.Mq,children:(0,I.jsx)(W.Z,{light:!0})}),(0,I.jsx)(x.Z,{mt:P.Mq,px:P.cd,children:(0,I.jsx)(q.Z,{children:"Chart display settings"})}),(0,I.jsx)(x.Z,{mt:P.Mq,px:P.cd,children:null!==Cn&&void 0!==Cn&&Cn.data_source?(0,I.jsxs)(g.ZP,{default:!0,children:["Number of columns from data source:"," ","undefined"!==typeof(null===Cn||void 0===Cn||null===(d=Cn.data)||void 0===d?void 0:d.columns)?(0,I.jsx)(g.ZP,{bold:!0,inline:!0,monospace:!0,children:null===Cn||void 0===Cn||null===(s=Cn.data)||void 0===s||null===(v=s.columns)||void 0===v?void 0:v.length}):(0,I.jsx)(x.Z,{mt:1,children:(0,I.jsx)(A.Z,{inverted:!0,small:!0})})]}):(0,I.jsx)(g.ZP,{default:!0,children:"Please select a data source type above."})}),(0,I.jsx)(x.Z,{mt:P.Mq,px:P.cd,children:(0,I.jsx)(M,{block:Cn,updateConfiguration:function(e,n){Te((function(n){return _e(_e({},n),{},{configuration:_e(_e({},null===n||void 0===n?void 0:n.configuration),e)})}),n)}})})]})}),[xn,Cn,jn,Q,kn,Zn,Te,h]),wn=(0,l.useMemo)((function(){return Ce&&(0,I.jsxs)(x.Z,{py:P.cd,children:[(0,I.jsxs)(x.Z,{mb:P.Mq,px:P.cd,children:[(0,I.jsx)(x.Z,{mb:1,children:(0,I.jsx)(q.Z,{children:"Custom code"})}),(0,I.jsxs)(g.ZP,{default:!0,children:["Write code for custom data sources, parsing, etc. For more information on what is possible, please check out the"," ",(0,I.jsx)(z.Z,{href:"https://docs.mage.ai/visualizations/dashboards#custom-code-for-chart",openNewWindow:!0,children:"chart documentation"}),"."]})]}),(0,I.jsx)(L.Z,{autoHeight:!0,block:_e(_e({},Me),Ce),onChange:function(e){Te((function(n){return _e(_e({},n),{},{content:e})}),{skip_render:!0})},value:(null===Q||void 0===Q?void 0:Q.content)||(null===Me||void 0===Me?void 0:Me.content)||"",width:"100%"})]})}),[Me,Q,Ce,Te]),In=(0,l.useMemo)((function(){return(0,I.jsx)(x.Z,{p:P.cd,children:(0,I.jsxs)(f.ZP,{children:[(0,I.jsx)(H.ZP,{fullWidth:!0,loading:Qe,onClick:function(){return $e(Q)},primary:!0,children:"Save changes"}),(0,I.jsx)(x.Z,{mr:1}),(0,I.jsx)(H.ZP,{fullWidth:!0,onClick:function(){return Ae(null)},secondary:!0,children:"Back to dashboard"})]})})}),[Qe,Q,Ae,$e]);return(0,I.jsxs)(D.Z,{after:wn,afterHeightOffset:h||0,afterHidden:xn,afterMousedownActive:ve,afterWidth:ce,before:Pn,beforeDraggableTopOffset:h?h-R.Wi:0,beforeFooter:!xn&&In,beforeHeader:(0,I.jsx)(I.Fragment,{children:(0,I.jsx)(E.Z,{breadcrumbs:[{label:function(){return"Back to dashboard"},onClick:function(){return Ae(null)}},{bold:!0,label:function(){return(null===Ce||void 0===Ce?void 0:Ce.name)||(null===Ce||void 0===Ce?void 0:Ce.uuid)}}]})}),beforeHeaderOffset:6*P.iI,beforeHeightOffset:h||0,beforeHidden:xn,beforeMousedownActive:ge,beforeWidth:pe,contained:!0,excludeOffsetFromBeforeDraggableLeft:!0,headerOffset:h||0,hideAfterCompletely:!0,hideBeforeCompletely:!0,leftOffset:t||0,mainContainerRef:le,setAfterMousedownActive:fe,setAfterWidth:ae,setBeforeMousedownActive:be,setBeforeWidth:me,children:[(0,I.jsxs)("div",{ref:je,style:{position:"relative"},children:[Ce&&Be&&(0,I.jsx)("div",{style:{position:"absolute",width:"100%"},children:(0,I.jsx)(T.Z,{})}),(0,I.jsxs)(f.ZP,{justifyContent:"space-between",children:[(0,I.jsx)(U.Z,{flex:1}),xn&&!hn&&(0,I.jsx)(x.Z,{p:P.cd,children:(0,I.jsx)(H.ZP,{beforeIcon:(0,I.jsx)(Y.Add,{size:2*P.iI}),onClick:function(){return vn()},primary:!0,children:"Create new chart"})})]})]}),(0,I.jsxs)(u.W,{backend:c.PD,children:[Ce&&(0,I.jsx)(ye,{block:_e(_e({},Me),Ce),blockLayoutItem:_e(_e(_e({},Me),Ue),{},{configuration:_e(_e(_e({},null===Me||void 0===Me?void 0:Me.configuration),null===Ue||void 0===Ue?void 0:Ue.configuration),null===Q||void 0===Q?void 0:Q.configuration),data:Ue?null===Ue||void 0===Ue?void 0:Ue.data:null===Me||void 0===Me?void 0:Me.data,data_source:_e(_e(_e({},null===Me||void 0===Me?void 0:Me.data_source),null===Ue||void 0===Ue?void 0:Ue.data_source),null===Q||void 0===Q?void 0:Q.data_source)}),blockUUID:null===Ce||void 0===Ce?void 0:Ce.uuid,detail:!0,disableDrag:!0,height:mn,pageBlockLayoutUUID:m,setSelectedBlockItem:Ae,width:null===rn||void 0===rn?void 0:rn.width}),(0,I.jsx)("div",{style:{display:Ce||hn?"none":null},children:fn}),!Ce&&hn&&pn]}),(0,I.jsx)(x.Z,{mb:2})]})}},75399:function(e,n,t){t.d(n,{Qj:function(){return c},XO:function(){return i},hN:function(){return r},tW:function(){return u}});var o,i,r,l=t(82394);!function(e){e.BLOCK="block",e.BLOCK_RUNS="block_runs",e.CHART_CODE="chart_code",e.PIPELINES="pipelines",e.PIPELINE_RUNS="pipeline_runs",e.PIPELINE_SCHEDULES="pipeline_schedules",e.SYSTEM_METRICS="system_metrics"}(i||(i={})),function(e){e.HTML="html",e.JPEG="jpeg",e.JPG="jpg",e.PNG="png"}(r||(r={}));var u=[i.BLOCK,i.BLOCK_RUNS,i.CHART_CODE,i.PIPELINES,i.PIPELINE_RUNS,i.PIPELINE_SCHEDULES,i.SYSTEM_METRICS],c=(o={},(0,l.Z)(o,i.BLOCK,"Block data output"),(0,l.Z)(o,i.BLOCK_RUNS,"Block runs"),(0,l.Z)(o,i.CHART_CODE,"Custom code"),(0,l.Z)(o,i.PIPELINES,"Pipelines"),(0,l.Z)(o,i.PIPELINE_RUNS,"Pipeline runs"),(0,l.Z)(o,i.PIPELINE_SCHEDULES,"Triggers"),(0,l.Z)(o,i.SYSTEM_METRICS,"System metrics"),o)}}]);